Inspector Clueseau by Petrocci Associates - I think the archive has the cassette version (for the character generator?) CLEAR 1480,31563 ($7B4B) DEFUSR8=31564 ($7B4C) (Called with PRINT @ location 0-767 - good for 32x24) DEFUSE9=31574 ($7B56) (Called with ptr to string to print on screen) CLUESEAU.BIN - EXEC address is $3FDE? (may be nonsensical) 7B4C JSR $B3ED Convert passed floating point number to 16 bit Integer 7B4F STD 1,PC Save it at $7B53-$7B54 for text draw routine (PRINT @ location) 7B52 RTS Return to BASIC 7B53 RMB 2 Print @ location 7B55 RMB 1 # of chars left to print in string * Main graphics text draw routine. NOTE: Since it uses signed offsets for drawing the 8 rows of pixels * (always 1 byte wide), the screen locations are offset by 4 lines ($0080 : $0020*4) to point to the * middle of the character (Vertically) that we are drawing. * Routine is set up to print upper/lowercase and some symbols (CHR$($21)-CHR$($7A) at a 32x24 resolution * I assume the ptr to the string from BASIC is in X on entry 7B56 LDA ,X Get length of string to print 7B58 STA -6,PC Save string character count ($7B55) 7B5B LDY 2,X ??? from passed string 7B5E LDD -$E,PC Get PRINT @ location ($7B53) 7B61 LDX #$0680 CASSETTE! Position on graphics screen (start 4 line down) ($0E80 FOR DISK) 7B64 CMPD #$0020 Are we done figuring out Y location? 7B68 BLO $7B73 Yes, go add X character offset (0-31) 7B6A SUBD #$0020 No, drop Y by 32 chars (1 line) 7B6D LEAX $0100,X Bump screen ptr by 8 pixel rows 7B71 BRA $7B64 And keep going until we have Y offset 7B73 LEAX D,X Add remainder (X offset 0-31) 7B75 CMPX #$1D9F CASSETTE! (+$800 FOR DISK) (pixel line 188 or less?) ($259F FOR DISK) 7B78 BLO $7B7B Within range, skip ahead 7B7A RTS Not, just return without printing anything 7B7B LDA ,Y+ Get next char from passed string 7B7D CMPA #$21 below '!'? 7B7F BLO $7B89 Yes, control character, skip ahead (SPACE AS WELL?!?) 7B81 CMPA #$7A lower case Z? 7B83 BHI $7B89 > than our normal ASCII range, skip ahead 7B85 SUBA #$21 Adjust char down to be 0 based offset into our character graphics table 7B87 BRA $7B8B and go draw character 7B89 LDA #$3F All 'illegal' characters print a '?' instead 7B8B LDB #8 # of bytes per graphics character 7B8D MUL Get offset into graphics character table our character is at 7B8E TFR PC,U Copy our current code position to U (to make position independent) (U=$7B90) 7B90 LEAU D,U Add table offset 7B92 LEAU $20,U Add offset (character table is at $7BB0) 7B95 LDB #-128 ($80) Offset 4 lines up 7B97 LDA ,U+ Get graphic byte for character 7B99 COMA Invert it 7B9A STA B,X Save inverted pixels to screen 7B9C ADDB #$20 Offset 1 graphic line down 7B9E CMPB #$80 Finished all 8 lines? 7BA0 BNE $7B97 No, keep going until all 8 are done 7BA2 TFR X,D Copy screen ptr (middle line of char) to D 7BA4 CMPB #$9F Is LSB of screen address $9f? (Did we just finish the last char on a screen row?) 7BA6 BEQ $7BAF Yes, can't print any more, exit back to BASIC (even if string wasn't finished) 7BA8 LEAX 1,X No, bump screen ptr to the right by 1 7BAA DEC -$58,PC ($7B55) - Dec # chars in string left to print 7BAD BNE $7B7B Still more, keep printing 7BAF RTS Done, return to BASIC