mirror of
https://github.com/mist64/msbasic.git
synced 2025-03-13 06:30:46 +00:00
77 lines
1.5 KiB
ArmAsm
77 lines
1.5 KiB
ArmAsm
.segment "CODE"
|
|
|
|
; ----------------------------------------------------------------------------
|
|
; "PEEK" FUNCTION
|
|
; ----------------------------------------------------------------------------
|
|
PEEK:
|
|
.ifdef CBM2_KBD
|
|
lda $12
|
|
pha
|
|
lda $11
|
|
pha
|
|
.endif
|
|
jsr GETADR
|
|
ldy #$00
|
|
.ifdef CBM1
|
|
cmp #$C0
|
|
bcc LD6F3
|
|
cmp #$E1
|
|
bcc LD6F6
|
|
LD6F3:
|
|
.endif
|
|
.ifdef CBM2_KBD
|
|
nop ; patch that disables the compares above
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
.endif
|
|
lda (LINNUM),y
|
|
tay
|
|
.ifdef CBM2_KBD
|
|
pla
|
|
sta $11
|
|
pla
|
|
sta $12
|
|
.endif
|
|
LD6F6:
|
|
jmp SNGFLT
|
|
|
|
; ----------------------------------------------------------------------------
|
|
; "POKE" STATEMENT
|
|
; ----------------------------------------------------------------------------
|
|
POKE:
|
|
jsr GTNUM
|
|
txa
|
|
ldy #$00
|
|
sta (LINNUM),y
|
|
rts
|
|
|
|
; ----------------------------------------------------------------------------
|
|
; "WAIT" STATEMENT
|
|
; ----------------------------------------------------------------------------
|
|
WAIT:
|
|
jsr GTNUM
|
|
stx FORPNT
|
|
ldx #$00
|
|
jsr CHRGOT
|
|
.ifdef CBM2
|
|
beq EASTER_EGG
|
|
.else
|
|
beq L3628
|
|
.endif
|
|
jsr COMBYTE
|
|
L3628:
|
|
stx FORPNT+1
|
|
ldy #$00
|
|
L362C:
|
|
lda (LINNUM),y
|
|
eor FORPNT+1
|
|
and FORPNT
|
|
beq L362C
|
|
RTS3:
|
|
rts
|