' ************************************************** ' * * ' * POKE.BAS * ' * * ' * Print Character or String * ' * to screen using POKE * ' * * ' * Judson D. McClendon * ' * Sun Valley Systems * ' * 329 37th Court N.E. * ' * Birmingham, AL 35215 * ' * 205-853-8440 * ' * * ' ************************************************** ' DECLARE FUNCTION BufAdd% (Lin%, Col%) DECLARE SUB PokeByte (Lin AS INTEGER, Col AS INTEGER, Byte AS STRING) DECLARE SUB PokeString (Lin AS INTEGER, Col AS INTEGER, Str AS STRING) CLS CALL PokeString(12, 34, "Hello World!") END FUNCTION BufAdd% (Lin AS INTEGER, Col AS INTEGER) BufAdd% = (Lin - 1) * 160 + (Col - 1) * 2 END FUNCTION SUB PokeByte (Lin AS INTEGER, Col AS INTEGER, Byte AS STRING) DEF SEG = &HB800 POKE BufAdd%(Lin, Col), ASC(Byte) DEF SEG END SUB SUB PokeString (Lin AS INTEGER, Col AS INTEGER, Str AS STRING) DIM I AS INTEGER DEF SEG = &HB800 FOR I = 1 TO LEN(Str) POKE BufAdd%(Lin, Col + I - 1), ASC(MID$(Str, I, 1)) NEXT DEF SEG END SUB