00000000: 00 0A 20 6C 73 74 20 6F 66 66 0D 0D 2A A0 A0 A0 |.. lst off..*...|
00000010: A0 A0 A0 A0 A0 69 6E 70 75 74 A0 61 6E 79 0D 2A |.....input.any.*|
00000020: A0 62 79 A0 61 6C 61 6E A0 6F 72 A0 6A 6F 65 A0 |.by.alan.or.joe.|
00000030: 6F 72 A0 77 65 69 6C 65 72 0D 2A A0 A0 A0 A0 6C |or.weiler.*....l|
00000040: 6F 6E 67 2C A0 6C 6F 6E 67 A0 74 69 6D 65 A0 61 |ong,.long.time.a|
00000050: 67 6F 0D 0D 20 6F 72 67 20 34 39 31 35 32 0D 0D |go.. org 49152..|
00000060: 63 68 72 67 65 74 20 65 71 75 20 31 31 35 0D 63 |chrget equ 115.c|
00000070: 6F 6D 6E 75 6D 20 65 71 75 20 34 37 30 38 39 0D |omnum equ 47089.|
00000080: 63 68 6B 63 6F 6D 20 65 71 75 20 34 34 37 39 37 |chkcom equ 44797|
00000090: 0D 67 65 74 6E 75 6D 20 65 71 75 20 34 37 30 30 |.getnum equ 4700|
000000A0: 36 0D 63 68 6B 69 6E 20 65 71 75 20 36 35 34 37 |6.chkin equ 6547|
000000B0: 38 0D 63 68 72 69 6E 20 65 71 75 20 36 35 34 38 |8.chrin equ 6548|
000000C0: 37 0D 63 6C 72 63 68 6E 20 65 71 75 20 36 35 34 |7.clrchn equ 654|
000000D0: 38 34 0D 76 61 72 74 61 62 20 65 71 75 20 34 35 |84.vartab equ 45|
000000E0: 0D 0D 2A A0 A0 A0 A0 67 65 74 A0 6E 75 6D A0 6F |..*....get.num.o|
000000F0: 66 A0 63 68 61 72 73 A0 74 6F A0 72 65 61 64 0D |f.chars.to.read.|
00000100: 2A A0 28 73 74 6F 70 73 A0 77 68 65 6E A0 74 68 |*.(stops.when.th|
00000110: 69 73 A0 69 73 A0 7A 65 72 6F A0 6F 72 0D 2A A0 |is.is.zero.or.*.|
00000120: A0 72 65 74 75 72 6E A0 69 73 A0 66 6F 75 6E 64 |.return.is.found|
00000130: 29 0D 20 6A 73 72 20 63 6F 6D 6E 75 6D 0D 20 73 |). jsr comnum. s|
00000140: 74 78 20 6C 65 6E 67 74 68 0D 0D 2A A0 A0 67 65 |tx length..*..ge|
00000150: 74 A0 74 68 65 A0 66 69 6C 65 A0 6E 75 6D 62 65 |t.the.file.numbe|
00000160: 72 A0 66 72 6F 6D A0 73 79 73 0D 2A A0 A0 73 75 |r.from.sys.*..su|
00000170: 62 74 72 61 63 74 A0 34 38 A0 74 6F A0 67 65 74 |btract.48.to.get|
00000180: A0 61 63 74 75 61 6C A0 6E 75 6D 0D 20 6A 73 72 |.actual.num. jsr|
00000190: 20 63 6F 6D 6E 75 6D 0D 20 73 74 78 20 66 69 6C | comnum. stx fil|
000001A0: 65 6E 75 6D 0D 0D 2A A0 A0 63 68 61 6E 67 65 A0 |enum..*..change.|
000001B0: 69 6E 70 75 74 A0 64 65 76 69 63 65 A0 74 6F A0 |input.device.to.|
000001C0: 66 69 6C 65 0D 20 6A 73 72 20 63 68 6B 69 6E 0D |file. jsr chkin.|
000001D0: 0D 2A A0 A0 A0 67 65 74 A0 63 68 61 72 73 A0 74 |.*...get.chars.t|
000001E0: 69 6C 6C A0 3C 63 72 3E A0 6F 72 A0 6C 65 6E 0D |ill.<cr>.or.len.|
000001F0: 20 6C 64 78 20 23 30 30 0D 5D 6C 6F 6F 70 20 6A | ldx #00.]loop j|
00000200: 73 72 20 63 68 72 69 6E 0D 20 63 6D 70 20 23 31 |sr chrin. cmp #1|
00000210: 33 0D 20 62 65 71 20 61 68 65 61 64 0D 20 73 74 |3. beq ahead. st|
00000220: 61 20 73 74 72 69 6E 67 2C 78 0D 20 69 6E 78 0D |a string,x. inx.|
00000230: 20 63 70 78 20 6C 65 6E 67 74 68 0D 20 62 6E 65 | cpx length. bne|
00000240: 20 5D 6C 6F 6F 70 0D 0D 2A A0 A0 A0 A0 6D 61 6B | ]loop..*....mak|
00000250: 65 A0 66 69 72 73 74 A0 73 74 72 69 6E 67 A0 70 |e.first.string.p|
00000260: 6F 69 6E 74 A0 74 6F 0D 2A A0 74 68 65 A0 74 65 |oint.to.*.the.te|
00000270: 78 74 A0 74 68 61 74 A0 77 61 73 A0 72 65 61 64 |xt.that.was.read|
00000280: 0D 61 68 65 61 64 20 6C 64 79 20 23 30 32 0D 20 |.ahead ldy #02. |
00000290: 74 78 61 0D 20 73 74 61 20 28 76 61 72 74 61 62 |txa. sta (vartab|
000002A0: 29 2C 79 0D 20 69 6E 79 0D 20 6C 64 61 20 23 3C |),y. iny. lda #<|
000002B0: 73 74 72 69 6E 67 0D 20 73 74 61 20 28 76 61 72 |string. sta (var|
000002C0: 74 61 62 29 2C 79 0D 20 69 6E 79 0D 20 6C 64 61 |tab),y. iny. lda|
000002D0: 20 23 3E 73 74 72 69 6E 67 0D 20 73 74 61 20 28 | #>string. sta (|
000002E0: 76 61 72 74 61 62 29 2C 79 0D 0D 2A A0 A0 A0 A0 |vartab),y..*....|
000002F0: 72 65 73 65 74 A0 64 65 66 61 75 6C 74 A0 64 65 |reset.default.de|
00000300: 76 69 63 65 73 0D 2A A0 A0 A0 A0 A0 61 6E 64 A0 |vices.*.....and.|
00000310: 72 65 74 75 72 6E A0 74 6F A0 62 61 73 69 63 0D |return.to.basic.|
00000320: 20 6A 73 72 20 63 6C 72 63 68 6E 0D 20 72 74 73 | jsr clrchn. rts|
00000330: 0D 0D 66 69 6C 65 6E 75 6D 20 64 66 62 20 30 30 |..filenum dfb 00|
00000340: 0D 6C 65 6E 67 74 68 20 64 66 62 20 30 30 0D 0D |.length dfb 00..|
00000350: 73 74 72 69 6E 67 20 64 66 62 20 30 30 0D |string dfb 00. |
.. LST OFF..* INPUT ANY.* BY ALAN
OR JOE OR WEILER.* LONG, LONG TIME A
GO.. ORG 49152..CHRGET EQU 115.COMNUM EQ
U 47089.CHKCOM EQU 44797.GETNUM EQU 4700
6.CHKIN EQU 65478.CHRIN EQU 65487.CLRCHN
EQU 65484.VARTAB EQU 45..* GET NUM O
F CHARS TO READ.* (STOPS WHEN THIS IS ZE
RO OR.* RETURN IS FOUND). JSR COMNUM. S
TX LENGTH..* GET THE FILE NUMBER FROM S
YS.* SUBTRACT 48 TO GET ACTUAL NUM. JSR
COMNUM. STX FILENUM..* CHANGE INPUT DE
VICE TO FILE. JSR CHKIN..* GET CHARS T
ILL <CR> OR LEN. LDX #00.]LOOP JSR CHRIN
. CMP #13. BEQ AHEAD. STA STRING,X. INX.
CPX LENGTH. BNE ]LOOP..* MAKE FIRST
STRING POINT TO.* THE TEXT THAT WAS READ
.AHEAD LDY #02. TXA. STA (VARTAB),Y. INY
. LDA #<STRING. STA (VARTAB),Y. INY. LDA
#>STRING. STA (VARTAB),Y..* RESET DE
FAULT DEVICES.* AND RETURN TO BASIC.
JSR CLRCHN. RTS..FILENUM DFB 00.LENGTH
DFB 00..STRING DFB 00.
×
C64 Image
> CLICK IMAGE PREVIEW FOR FULL MODAL