Menu

Control Characters???

2015-12-11
2015-12-12
  • Ronald Herrera

    Ronald Herrera - 2015-12-11

    Can the Graphic Character symbols represented by the Control Characters (e.g. ASCII: 11 = ♂, 12=♀ or 13=♪) can be reproduced or displayed with a statement or function by PC-BASIC? /Ron.

     
    • Rob Hagemans

      Rob Hagemans - 2015-12-11

      In text mode, you can do: DEF SEG=&HB800: POKE 0,11: POKE 2,12: POKE 4,13 etc. You cannot produce these characters with PRINT as they will be interpreted as controls.
      Rob

       
  • Ronald Herrera

    Ronald Herrera - 2015-12-11

    I see... thank you! /Ron.

     
  • Ronald Herrera

    Ronald Herrera - 2015-12-11

    Hi, can you test this to see if you notice something between PC-BASIC and GWBASIC? Probably is nothing, but again it can be something. In PC-BASIC I can't see the characters of the POKE in column 80's, Try both programs to test:

    10 'CONTROL CHARACTERS -- CopyMade Division <(AöC)> Ver. 20151211
    20 'SAVE "CTRLCHR1.BAS",A
    30 KEY OFF: SCREEN 0: WIDTH 80: CLS: DEF SEG = &HB800: L = -2
    40 FOR B = 0 TO 255
    50 L = L + 2
    60 POKE L, B
    70 NEXT B: LOCATE 6,1: PRINT "B="; B-1 ;"L=";L
    80 DEF SEG: END
    90 '
    100 CLS: DEF SEG = &HB800: 'For TEST type: RUN 100 (Enter)
    110 LOCATE 2, 1: INPUT "ROW: ", RW: INPUT "COL: ", CL: CLS
    120 IF RW < 1 OR RW > 25 OR CL < 1 OR CL > 80 THEN GOTO 80
    130 PS = (((RW * 80) - (80 - CL)) * 2) - 2
    140 POKE PS, 12
    150 WHILE INKEY$ = "": WEND
    160 LOCATE RW, CL: COLOR 0, 7: PRINT "*";: COLOR 7, 0: GOTO 110

     
    • Rob Hagemans

      Rob Hagemans - 2015-12-12

      Cheers, that's a very subtle bug. Working to fix it now.