This commit is contained in:
Michael Steil 2008-10-18 06:59:14 +00:00
parent c60f652a6d
commit 41dad9474a
6 changed files with 35 additions and 13 deletions

View File

@ -2,4 +2,7 @@
files without ifdefs (not much in common!)
* move all machine specific code into separate files
* rename all labels that point to RTS to RTSn
* add AppleSoft comments
* add AppleSoft comments
* look for all " $", i.e. (zeropage) constants, replace them
with symbols
* check all .ifdef OSI; they might be .ifdef CONFIG_SMALL

View File

@ -1342,7 +1342,7 @@ GETEXP:
.endif
jmp OVERFLOW
LDC70:
.ifdef CBM1
.ifndef CONFIG_10A
lda #$0B
.endif
L3C2C:
@ -1373,7 +1373,7 @@ CON_BILLION:
CON_99999999_9:
.byte $9B,$3E,$BC,$1F,$FD
CON_999999999:
.ifdef CBM1
.ifndef CONFIG_10A
.byte $9E,$6E,$6B,$27,$FE
.else
.byte $9E,$6E,$6B,$27,$FD

18
init.s
View File

@ -100,6 +100,22 @@ COLD_START2:
.endif
.endif /* KBD */
; All non-CONFIG_SMALL versions of BASIC have
; the same bug here: While the number of bytes
; to be copied is correct for CONFIG_SMALL,
; it is one byte short on non-CONFIG_SMALL:
; It seems the "ldx" value below has been
; hardcoded. So on these configurations,
; the last byte of GENERIC_RNDSEED, which
; is 5 bytes instead of 4, does not get copied -
; which is nothing major, because it is just
; the least significant 8 bits of the mantissa
; of the random number seed.
; KBD added three bytes to CHRGET and removed
; the random number seed, but only adjusted
; the number of bytes by adding 3 - this
; copies four bytes too many, which is no
; problem.
.ifdef CONFIG_SMALL
.ifdef KBD
ldx #GENERIC_CHRGET_END-GENERIC_CHRGET+4
@ -192,7 +208,7 @@ L40D7:
bne L40DD
inc LINNUM+1
.ifdef CBM1
lda $09
lda LINNUM+1
cmp #$80
beq L40FA
.endif

1
poke.s
View File

@ -53,6 +53,7 @@ PEEK:
jsr GETADR
ldy #$00
.ifdef CBM1
; disallow PEEK between $C000 and $DFFF
cmp #$C0
bcc LD6F3
cmp #$E1

View File

@ -293,6 +293,7 @@ OUTDO:
bmi L2A56
.endif
.if .def(CONFIG_PRINT_CR) || .def(CBM1)
; Commodore forgot to remove this in CBM1
pha
.endif
.ifdef CBM1
@ -339,6 +340,7 @@ L2A4C:
.endif
L2A4E:
.if .def(CONFIG_PRINT_CR) || .def(CBM1)
; Commodore forgot to remove this in CBM1
pla
.endif
.ifdef CONFIG_MONCOUT_DESTROYS_Y

18
rnd.s
View File

@ -112,25 +112,25 @@ GOMOVMF:
jmp STORE_FAC_AT_YX_ROUNDED
.endif
.segment "CHRGET"
; ----------------------------------------------------------------------------
; INITIAL VALUE FOR RANDOM NUMBER, ALSO COPIED
; IN ALONG WITH CHRGET, BUT ERRONEOUSLY:
; <<< THE LAST BYTE IS NOT COPIED >>>
; (on all non-CONFIG_SMALL)
; ----------------------------------------------------------------------------
.segment "CHRGET"
GENERIC_RNDSEED:
.ifndef KBD
; random number seed
.ifdef OSI
.ifdef CONFIG_SMALL
.byte $80,$4F,$C7,$52
.endif
.ifdef CONFIG_11
.else
.ifdef CONFIG_11
.byte $80,$4F,$C7,$52,$58
.endif
.ifdef CBM1
.endif
.ifdef CBM1
.byte $80,$4F,$C7,$52,$59
.endif
.endif
.endif
.endif
GENERIC_CHRGET_END: