10 ; LISTING 2 15 ; INFOBITS.ASM 30 ICCOM = $0342 40 ICBAL = $0344 50 ICBAH = $0345 60 ICBLL = $0348 70 ICBLH = $0349 80 CIOV = $E456 90 PUTREC = $09 0100 GETREC = $05 0110 ROWCUR = $54 0120 CH = $02FC 0130 EOL = $9B 0140 RBLL = $0358 0150 SBUFL = $E0 0160 SBUFH = $E1 0170 SBLL = $E2 0180 R = $E3 0190 RBUF = $03FD 0200 *= $0600 0210 PLA 0220 PLA 0230 STA SBUFH 0240 PLA 0250 STA SBUFL 0260 PLA 0270 PLA 0280 STA SBLL 0290 ; 0300 GET LDX #$10 0310 LDA #GETREC 0320 STA ICCOM,X 0330 LDA #RBUF&$FF 0340 STA ICBAL,X 0350 LDA #RBUF/256 0360 STA ICBAH,X 0361 LDA #131 0363 STA ICBLL,X 0365 LDA #0 0367 STA ICBLH,X 0370 JSR CIOV 0380 BMI END 0390 ; 0400 LDX #0 0420 LDY #0 0450 P1 LDA RBUF,X 0460 P2 CMP (SBUFL),Y 0470 BEQ P3 0480 CPY #0 0490 BEQ P4 0500 LDY #0 0505 LDX R 0510 JMP P4 0520 P3 INY 0530 CPY SBLL 0540 BCS PRINT 0560 P4 INX 0570 CPX RBLL 0580 BCS GET 0585 CPY #0 0590 BNE P1 0595 STX R 0600 JMP P1 0610 ; 0620 END RTS 0630 ; 0800 PRINT LDX #$20 0810 LDA #PUTREC 0820 STA ICCOM,X 0830 LDA #131 0840 STA ICBLL,X 0850 LDA #0 0860 STA ICBLH,X 0870 ; 0880 LDA ROWCUR 0890 CMP #20 0900 BCS PROMPT 0910 ; 0920 LDA #RBUF+$0A&$FF 0930 STA ICBAL,X 0940 LDA #RBUF+$0A/256 0950 STA ICBAH,X 0970 JSR CIOV 0980 JMP GET 0990 ; 1000 PROMPT LDA #MESSAGE&$FF 1010 STA ICBAL,X 1020 LDA #MESSAGE/256 1030 STA ICBAH,X 1040 JSR CIOV 1050 WAIT LDA CH 1060 CMP #255 1070 BEQ WAIT 1072 LDA #255 1074 STA CH 1080 LDA #CLEAR&$FF 1090 STA ICBAL,X 1100 LDA #CLEAR/256 1110 STA ICBAH,X 1120 LDA #5 1130 STA ICBLL,X 1140 LDA #0 1150 STA ICBLH,X 1160 JSR CIOV 1170 JMP PRINT 2000 ; 2010 MESSAGE .BYTE "���٠��٠",EOL 2015 CLEAR .BYTE "}",EOL
Back to previous page