This commit is contained in:
Michael Steil 2008-10-16 06:53:45 +00:00
parent fa5b615f84
commit 453fef0e3a
13 changed files with 85 additions and 71 deletions

View File

@ -95,7 +95,7 @@ USR_FUNC:
sta FAC+5
jmp (FAC+4)
L29DA:
jmp (GOSTROUT)
jmp (GOAYINT)
brk
brk
brk

View File

@ -24,7 +24,7 @@ LOWTRX = LOWTR
Z00 := $0000
L0001 := $000B
GOWARM := $0003
GOSTROUT := $0006
GOAYINT := $0006
GOGIVEAYF := $0008
USR := $000A

View File

@ -46,7 +46,7 @@ L0001 := $0001
L0002 := $0002
GOWARM := $0003
Z03 := $0003 ; same
GOSTROUT := $0006
GOAYINT := $0006
GOGIVEAYF := $0008
Z15 := $0004
@ -93,7 +93,7 @@ CPRMASK := $0063-82-5
Z14 := $0064-82-5 ; Ctrl+O flag
Z17 := $0006
GOSTROUT := $0006
GOAYINT := $0006
Z18 := $0007
GOGIVEAYF := $0008
Z03 := $000E;3 ; same

View File

@ -19,7 +19,7 @@ Z00 := $0700
L0001 := $0001
L0002 := $0002
GOWARM := $0003
GOSTROUT := $0006
GOAYINT := $0006
GOGIVEAYF := $0008
USR := $000A

View File

@ -21,7 +21,7 @@ Z00 := $0000
L0001 := $0001
L0002 := $0002
GOWARM := $0003
GOSTROUT := $0006
GOAYINT := $0006
GOGIVEAYF := $0008
CHARAC := $000A

View File

@ -27,7 +27,7 @@ Z00 := $0017
L0001 := $0001
L0002 := $0002
GOWARM := $001A
GOSTROUT := $001D
GOAYINT := $001D
GOGIVEAYF := $001F
CHARAC := $000A+$1A
@ -55,7 +55,7 @@ MONCOUT := $E216
STACK_TOP := $FE
SPACE_FOR_GOSUB := $3E
NULL_MAX := $F0 ; probably different in original version; the image I have seems to be modified; see PDF
NULL_MAX := $F0
RAMSTART2 := $0400

View File

@ -17,7 +17,7 @@ Z00 := $0000
L0001 := $0001
L0002 := $0002
GOWARM := $0003
GOSTROUT := $0006
GOAYINT := $0006
GOGIVEAYF := $0008
USR := $000A

View File

@ -36,11 +36,12 @@ define_error ERR_ZERODIV, "DIVISION BY ZERO"
define_error ERR_ILLDIR, "ILLEGAL DIRECT"
define_error ERR_BADTYPE, "TYPE MISMATCH"
define_error ERR_STRLONG, "STRING TOO LONG"
.ifdef CBM1
.ifdef CONFIG_FILE
.ifdef CBM1
define_error ERR_BADDATA, "BAD DATA"
.endif
.ifdef CBM2
.else
define_error ERR_BADDATA, "FILE DATA"
.endif
.endif
define_error ERR_FRMCPX, "FORMULA TOO COMPLEX"
define_error ERR_CANTCONT, "CAN'T CONTINUE"

58
init.s
View File

@ -43,8 +43,8 @@ COLD_START2:
sty GOWARM+2
lda #<AYINT
ldy #>AYINT
sta GOSTROUT
sty GOSTROUT+1
sta GOAYINT
sty GOAYINT+1
lda #<GIVAYF
ldy #>GIVAYF
sta GOGIVEAYF
@ -104,11 +104,11 @@ COLD_START2:
.endif /* KBD */
.ifdef CONFIG_SMALL
.ifdef KBD
.ifdef KBD
ldx #GENERIC_CHRGET_END-GENERIC_CHRGET+4
.else
.else
ldx #GENERIC_CHRGET_END-GENERIC_CHRGET
.endif
.endif
.else
ldx #GENERIC_CHRGET_END-GENERIC_CHRGET-1 ; XXX
.endif
@ -124,31 +124,31 @@ L4098:
.ifndef KBD
txa
sta SHIFTSIGNEXT
.ifdef CONFIG_CBM_ALL
.ifdef CONFIG_CBM_ALL
sta Z03
.endif
.endif
sta LASTPT+1
.if .defined(CONFIG_NULL) || .defined(CONFIG_PRINTNULLS)
.if .defined(CONFIG_NULL) || .defined(CONFIG_PRINTNULLS)
sta Z15
.endif
.ifndef CONFIG_11
.endif
.ifndef CONFIG_11
sta POSX
.endif
.endif
pha
sta Z14
.ifdef CBM2_KBD
.ifdef CBM2_KBD
inx
stx $01FD
stx $01FC
.else
.ifndef MICROTAN
.else
.ifndef MICROTAN
lda #$03
sta DSCLEN
.endif
.ifndef KIM_APPLE
.endif
.ifndef KIM_APPLE
lda #$2C
sta LINNUM+1
.endif
.endif
jsr CRDO
.endif
.ifdef APPLE
@ -162,11 +162,11 @@ L4098:
lda #<QT_MEMORY_SIZE
ldy #>QT_MEMORY_SIZE
jsr STROUT
.ifdef APPLE
.ifdef APPLE
jsr INLINX
.else
.else
jsr NXIN
.endif
.endif
stx TXTPTR
sty TXTPTR+1
jsr CHRGET
@ -217,13 +217,13 @@ L40DD:
.ifdef CONFIG_CBM_ALL
beq L40D7
.else
.ifdef CONFIG_SMALL
.ifdef CONFIG_SMALL
beq L40D7
bne L40FA
.else
.else
bne L40FA
beq L40D7
.endif
.endif
L40EE:
jsr CHRGOT
jsr LINGET
@ -242,17 +242,17 @@ L40FA:
.endif
L4106:
.ifndef CONFIG_CBM_ALL
.ifdef APPLE
.ifdef APPLE
lda #$FF
jmp L2829
.word STROUT ; PATCH!
jsr NXIN
.else
.else
lda #<QT_TERMINAL_WIDTH
ldy #>QT_TERMINAL_WIDTH
jsr STROUT
jsr NXIN
.endif
.endif
stx TXTPTR
sty TXTPTR+1
jsr CHRGET
@ -276,7 +276,7 @@ L4129:
sta Z18
L4136:
.endif
.ifdef KIM
.ifdef KIM /* RAM? */
lda #<QT_WANT
ldy #>QT_WANT
jsr STROUT
@ -360,9 +360,9 @@ L4192:
ldy #>STROUT
sta GOWARM+1
sty GOWARM+2
.if CONFIG_SCRTCH_ORDER = 3
.if CONFIG_SCRTCH_ORDER = 3
jsr SCRTCH
.endif
.endif
lda #<RESTART
ldy #>RESTART
sta Z00+1

View File

@ -1,3 +1,7 @@
; generic stack and memory management code
; this code is identical across all versions of
; BASIC
.segment "CODE"
; ----------------------------------------------------------------------------

View File

@ -1,55 +1,64 @@
; global messages: "error", "in", "ready", "break"
.segment "CODE"
CR=13
LF=10
QT_ERROR:
.ifdef KBD
.byte " err"
.else
.ifdef APPLE
.ifdef APPLE
.byte " ERR"
.byte $07,$07
.else
.else
.byte " ERROR"
.endif
.endif
.endif
.byte $00
.byte 0
.ifndef KBD
QT_IN:
.byte " IN "
.byte $00
QT_OK:
.ifdef APPLE
.byte $0D,$00,$00
.byte "K"
.else
.byte $0D,$0A
.ifdef CONFIG_CBM_ALL
.byte "READY."
.else
.byte "OK"
.endif
.endif
.byte $0D,$0A,$00
.else
.ifdef KBD
.byte $54,$D2 ; ???
OKPRT:
jsr LDE42
.byte $0D,$0D
.byte ">>"
.byte $0D,$0A,$00
.byte CR,CR,">>",CR,LF
.byte 0
rts
nop
.else
QT_OK:
.ifdef CONFIG_CBM_ALL
.byte CR,LF,"READY.",CR,LF
.else
.ifdef APPLE
; binary patch!
.byte CR,0,0,"K",CR,LF
.else
.byte CR,LF,"OK",CR,LF
.endif
.endif
.byte 0
.endif
QT_BREAK:
.ifdef KBD
.byte $0D,$0A
.byte " Brk"
.byte $00
.byte CR,LF," Brk"
.byte 0
.byte $54,$D0 ; ???
.else
.byte $0D,$0A
.ifdef MICROTAN
.byte " "
.byte CR,LF," BREAK"
.byte 0
.else
.byte CR,LF,"BREAK"
.byte 0
.endif
.byte "BREAK"
.byte $00
.endif

View File

@ -12,7 +12,7 @@ MEMERR:
; ----------------------------------------------------------------------------
ERROR:
lsr Z14
.ifdef CONFIG_CBM_ALL
.ifdef CONFIG_FILE
lda Z03 ; output
beq LC366 ; is screen
jsr CLRCH ; otherwise redirect output back to screen
@ -950,5 +950,5 @@ L25FD:
lda TOKEN_NAME_TABLE,y
bmi L25CA
jsr OUTDO
bne L25FD
bne L25FD ; always

View File

@ -109,7 +109,7 @@ UNFNC:
keyword_addr "SGN", SGN, TOKEN_SGN
keyword_addr "INT", INT
keyword_addr "ABS", ABS
.ifdef KBD
.ifdef CONFIG_NO_POKE
keyword_addr "VER", VER
.else
.ifdef KIM