mirror of
https://github.com/mist64/msbasic.git
synced 2024-06-14 19:29:36 +00:00
...
This commit is contained in:
parent
bb6af5f8f6
commit
8334c8b86a
4
init.s
4
init.s
|
@ -1,10 +1,12 @@
|
||||||
.segment "INIT"
|
.segment "INIT"
|
||||||
|
|
||||||
.ifdef KBD
|
.ifdef KBD
|
||||||
LFD3E:
|
FNDLIN2:
|
||||||
php
|
php
|
||||||
jmp FNDLIN
|
jmp FNDLIN
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
; ----------------------------------------------------------------------------
|
||||||
COLD_START:
|
COLD_START:
|
||||||
.ifdef KBD
|
.ifdef KBD
|
||||||
lda #$81
|
lda #$81
|
||||||
|
|
106
program.s
106
program.s
|
@ -106,7 +106,7 @@ NUMBERED_LINE:
|
||||||
jsr PARSE_INPUT_LINE
|
jsr PARSE_INPUT_LINE
|
||||||
sty EOLPNTR
|
sty EOLPNTR
|
||||||
.ifdef KBD
|
.ifdef KBD
|
||||||
jsr LFD3E
|
jsr FNDLIN2
|
||||||
lda JMPADRS+1
|
lda JMPADRS+1
|
||||||
sta LOWTR
|
sta LOWTR
|
||||||
sta $96
|
sta $96
|
||||||
|
@ -209,14 +209,14 @@ PUT_NEW_LINE:
|
||||||
beq L2351
|
beq L2351
|
||||||
clc
|
clc
|
||||||
.else
|
.else
|
||||||
.ifndef KBD
|
.ifndef KBD
|
||||||
lda INPUTBUFFER
|
lda INPUTBUFFER
|
||||||
beq FIX_LINKS
|
beq FIX_LINKS
|
||||||
lda MEMSIZ
|
lda MEMSIZ
|
||||||
ldy MEMSIZ+1
|
ldy MEMSIZ+1
|
||||||
sta FRETOP
|
sta FRETOP
|
||||||
sty FRETOP+1
|
sty FRETOP+1
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
lda VARTAB
|
lda VARTAB
|
||||||
sta HIGHTR
|
sta HIGHTR
|
||||||
|
@ -272,8 +272,8 @@ L23FA:
|
||||||
.else
|
.else
|
||||||
bne L2403
|
bne L2403
|
||||||
jmp L2351
|
jmp L2351
|
||||||
.endif
|
|
||||||
L2403:
|
L2403:
|
||||||
|
.endif
|
||||||
ldy #$04
|
ldy #$04
|
||||||
L2405:
|
L2405:
|
||||||
iny
|
iny
|
||||||
|
@ -291,7 +291,9 @@ L2405:
|
||||||
sta (INDEX),y
|
sta (INDEX),y
|
||||||
stx INDEX
|
stx INDEX
|
||||||
sta INDEX+1
|
sta INDEX+1
|
||||||
bcc L23FA
|
bcc L23FA ; always
|
||||||
|
|
||||||
|
; ----------------------------------------------------------------------------
|
||||||
.ifdef KBD
|
.ifdef KBD
|
||||||
SLOD:
|
SLOD:
|
||||||
ldx #$01
|
ldx #$01
|
||||||
|
@ -310,9 +312,9 @@ PLOD:
|
||||||
jsr LE39A
|
jsr LE39A
|
||||||
jsr LE33D
|
jsr LE33D
|
||||||
jmp CLEARC
|
jmp CLEARC
|
||||||
.byte $FF
|
.byte $FF,$FF,$FF
|
||||||
.byte $FF
|
|
||||||
.byte $FF
|
; ----------------------------------------------------------------------------
|
||||||
VER:
|
VER:
|
||||||
lda #$13
|
lda #$13
|
||||||
ldx FAC
|
ldx FAC
|
||||||
|
@ -330,13 +332,32 @@ LE39A:
|
||||||
sta VARTAB+1,y
|
sta VARTAB+1,y
|
||||||
RET3:
|
RET3:
|
||||||
rts
|
rts
|
||||||
.else
|
.endif
|
||||||
|
|
||||||
|
.ifdef CBM2
|
||||||
|
RET3:
|
||||||
|
rts
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if .def(CBM1) || .def(OSI) || .def(KIM)
|
||||||
|
L2420:
|
||||||
|
.ifdef OSI
|
||||||
|
jsr OUTDO
|
||||||
|
.endif
|
||||||
|
dex
|
||||||
|
bpl INLIN2
|
||||||
|
L2423:
|
||||||
|
.ifdef OSI
|
||||||
|
jsr OUTDO
|
||||||
|
.endif
|
||||||
|
jsr CRDO
|
||||||
|
.endif
|
||||||
|
|
||||||
; ----------------------------------------------------------------------------
|
; ----------------------------------------------------------------------------
|
||||||
; READ A LINE, AND STRIP OFF SIGN BITS
|
; READ A LINE, AND STRIP OFF SIGN BITS
|
||||||
; ----------------------------------------------------------------------------
|
; ----------------------------------------------------------------------------
|
||||||
.ifdef APPLE
|
|
||||||
INLIN:
|
INLIN:
|
||||||
|
.ifdef APPLE
|
||||||
ldx #$DD
|
ldx #$DD
|
||||||
INLIN1:
|
INLIN1:
|
||||||
stx $33
|
stx $33
|
||||||
|
@ -350,37 +371,22 @@ L0C32:
|
||||||
ldx #<INPUTBUFFER-1
|
ldx #<INPUTBUFFER-1
|
||||||
ldy #>INPUTBUFFER-1
|
ldy #>INPUTBUFFER-1
|
||||||
rts
|
rts
|
||||||
RDKEY:
|
|
||||||
jsr LFD0C
|
|
||||||
and #$7F
|
|
||||||
.else
|
|
||||||
.ifdef CBM2
|
|
||||||
RET3:
|
|
||||||
rts
|
|
||||||
.else
|
|
||||||
L2420:
|
|
||||||
.ifdef OSI
|
|
||||||
jsr OUTDO
|
|
||||||
.endif
|
.endif
|
||||||
dex
|
|
||||||
bpl INLIN2
|
|
||||||
L2423:
|
|
||||||
.ifdef OSI
|
.ifndef KBD
|
||||||
jsr OUTDO
|
.ifndef APPLE
|
||||||
.endif
|
|
||||||
jsr CRDO
|
|
||||||
.endif
|
|
||||||
INLIN:
|
|
||||||
ldx #$00
|
ldx #$00
|
||||||
INLIN2:
|
INLIN2:
|
||||||
jsr GETLN
|
jsr GETLN
|
||||||
.ifndef CONFIG_CBM_ALL
|
.ifndef CONFIG_CBM_ALL
|
||||||
cmp #$07
|
cmp #$07
|
||||||
beq L2443
|
beq L2443
|
||||||
.endif
|
.endif
|
||||||
cmp #$0D
|
cmp #$0D
|
||||||
beq L2453
|
beq L2453
|
||||||
.ifndef CONFIG_CBM_ALL
|
.ifndef CONFIG_CBM_ALL
|
||||||
cmp #$20 ; line editing
|
cmp #$20 ; line editing
|
||||||
bcc INLIN2
|
bcc INLIN2
|
||||||
cmp #$7D
|
cmp #$7D
|
||||||
|
@ -392,31 +398,36 @@ INLIN2:
|
||||||
L2443:
|
L2443:
|
||||||
cpx #$47
|
cpx #$47
|
||||||
bcs L244C
|
bcs L244C
|
||||||
.endif
|
.endif
|
||||||
sta INPUTBUFFER,x
|
sta INPUTBUFFER,x
|
||||||
inx
|
inx
|
||||||
.ifdef OSI
|
.ifdef OSI
|
||||||
.byte $2C
|
.byte $2C
|
||||||
.else
|
.else
|
||||||
bne INLIN2
|
bne INLIN2
|
||||||
.endif
|
.endif
|
||||||
L244C:
|
L244C:
|
||||||
.ifndef CONFIG_CBM_ALL
|
.ifndef CONFIG_CBM_ALL
|
||||||
lda #$07
|
lda #$07
|
||||||
jsr OUTDO
|
jsr OUTDO
|
||||||
bne INLIN2
|
bne INLIN2
|
||||||
.endif
|
.endif
|
||||||
L2453:
|
L2453:
|
||||||
jmp L29B9
|
jmp L29B9
|
||||||
|
.endif
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.ifndef KBD
|
||||||
|
.ifndef APPLE
|
||||||
GETLN:
|
GETLN:
|
||||||
.ifdef CONFIG_CBM_ALL
|
.ifdef CONFIG_CBM_ALL
|
||||||
jsr CHRIN
|
jsr CHRIN
|
||||||
ldy Z03
|
ldy Z03
|
||||||
bne L2465
|
bne L2465
|
||||||
.else
|
.else
|
||||||
jsr MONRDKEY
|
jsr MONRDKEY
|
||||||
.endif
|
.endif
|
||||||
.ifdef OSI
|
.ifdef OSI
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
|
@ -432,8 +443,13 @@ GETLN:
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
and #$7F
|
and #$7F
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif /* APPLE */
|
||||||
|
.ifdef APPLE
|
||||||
|
RDKEY:
|
||||||
|
jsr LFD0C
|
||||||
|
and #$7F
|
||||||
|
.endif
|
||||||
cmp #$0F
|
cmp #$0F
|
||||||
bne L2465
|
bne L2465
|
||||||
pha
|
pha
|
||||||
|
|
Loading…
Reference in New Issue
Block a user