8-Bit Software Online Conversion
Modes + - Listing
10REM modes 8,9 and 10.
20REM by Ian Robertson
30REM MODE Dimensions colors Kbs
40REM 8 10x32 16 10k
50REM 9 10x25 16 8k
60REM 10 20x25 4 8k
70REM modes 9 and 10 are called from
80REM Mode 6, mode 8 from Mode 5
90REM Syntax *CODE n (n=8,9 or 10)
100CD%=&900
110?&200=CD%MOD256
120?&201=CD%DIV256
130FORT%=0TO2STEP2
140P%=CD%
150[:OPT T%
160PHP:PHA:TXA:PHA:TYA:PHA
170CMP#0:BEQ SKIP
180.error
190BRK
200OPT FNequb(255):OPT FNequs("Syntax
*CODE n (n=8,9 or 10)")
210BRK:.SKIP
220CPX#8:BEQ mode8
230CPX#9:BEQ mode9
240CPX#10:BEQ mode10
250JMP error
260.mode8
270LDA#22:JSR&FFEE:LDA#5:JSR&FFEE
280LDA#154:LDX#224:JSR&FFF4
290.SKIP2
300LDA#15:STA&360:LDA#1:STA&361:LDA#32
:STA&34F:LDA#&55:STA&363:LDA#&AA:STA&362
:LDA#9:STA&30A
310JMP RESET
320.mode9
330LDA#22:JSR&FFEE:LDA#6:JSR&FFEE
340LDA#154:LDX#128:JSR&FFF4
350JMP SKIP2
360.mode10
370LDA#22:JSR&FFEE:LDA#6:JSR&FFEE
380LDA#154:LDX#132:JSR&FFF4
390LDA#3:STA&360:LDA#2:STA&361:LDA#16:
STA&34F:LDA#&55:STA&363:LDA#&AA:STA&362:
LDA#19:STA&30A
400.RESET:LDA#20:JSR&FFEE:PLA:TAY:PLA:
TAX:PLA:PLP:RTS:]
410NEXT
420END
430DEFFNequs(string$)
440$P%=string$
450P%=P%+LEN(string$)
460=T%
470DEFFNequb(byte%)
480?P%=byte%
490P%=P%+1
500=T%