mirror of
https://github.com/mist64/msbasic.git
synced 2024-10-08 17:55:03 +00:00
separated out chrget and init
This commit is contained in:
parent
aa1b5377ae
commit
c4f4578d97
@ -10,6 +10,8 @@ SEGMENTS {
|
||||
VECTORS: load = BASROM, type = ro;
|
||||
KEYWORDS: load = BASROM, type = ro;
|
||||
CODE: load = BASROM, type = ro;
|
||||
CHRGET: load = BASROM, type = ro;
|
||||
INIT: load = BASROM, type = ro;
|
||||
DUMMY: load = DUMMY; # don't include
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@ SEGMENTS {
|
||||
VECTORS: load = BASROM, type = ro;
|
||||
KEYWORDS: load = BASROM, type = ro;
|
||||
CODE: load = BASROM, type = ro;
|
||||
CHRGET: load = BASROM, type = ro;
|
||||
INIT: load = BASROM, type = ro;
|
||||
DUMMY: load = DUMMY; # don't include
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@ SEGMENTS {
|
||||
VECTORS: load = BASROM, type = ro;
|
||||
KEYWORDS: load = BASROM, type = ro;
|
||||
CODE: load = BASROM, type = ro;
|
||||
CHRGET: load = BASROM, type = ro;
|
||||
INIT: load = BASROM, type = ro;
|
||||
DUMMY: load = DUMMY; # don't include
|
||||
}
|
||||
|
||||
|
22
chrget.s
Normal file
22
chrget.s
Normal file
@ -0,0 +1,22 @@
|
||||
.segment "CHRGET"
|
||||
RAMSTART1:
|
||||
GENERIC_CHRGET:
|
||||
inc TXTPTR
|
||||
bne GENERIC_CHRGOT
|
||||
inc TXTPTR+1
|
||||
GENERIC_CHRGOT:
|
||||
GENERIC_TXTPTR = GENERIC_CHRGOT + 1
|
||||
lda $EA60
|
||||
.ifdef KBD
|
||||
jsr LF430
|
||||
.endif
|
||||
cmp #$3A
|
||||
bcs L4058
|
||||
cmp #$20
|
||||
beq GENERIC_CHRGET
|
||||
sec
|
||||
sbc #$30
|
||||
sec
|
||||
sbc #$D0
|
||||
L4058:
|
||||
rts
|
4
float.s
4
float.s
@ -1,3 +1,5 @@
|
||||
.segment "CODE"
|
||||
|
||||
TEMP1X = TEMP1+(5-BYTES_FP)
|
||||
|
||||
; ----------------------------------------------------------------------------
|
||||
@ -1885,5 +1887,5 @@ L3ECB:
|
||||
ldy #$00
|
||||
dec SERLEN
|
||||
bne L3EBE
|
||||
L3EDA:
|
||||
RTS19:
|
||||
rts
|
||||
|
2
kb9.cfg
2
kb9.cfg
@ -10,6 +10,8 @@ SEGMENTS {
|
||||
VECTORS: load = BASROM, type = ro;
|
||||
KEYWORDS: load = BASROM, type = ro;
|
||||
CODE: load = BASROM, type = ro;
|
||||
CHRGET: load = BASROM, type = ro;
|
||||
INIT: load = BASROM, type = ro;
|
||||
DUMMY: load = DUMMY; # don't include
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@ SEGMENTS {
|
||||
VECTORS: load = BASROM, type = ro;
|
||||
KEYWORDS: load = BASROM, type = ro;
|
||||
CODE: load = BASROM, type = ro;
|
||||
CHRGET: load = BASROM, type = ro;
|
||||
INIT: load = BASROM, type = ro;
|
||||
DUMMY: load = DUMMY; # don't include
|
||||
}
|
||||
|
||||
|
2
osi.cfg
2
osi.cfg
@ -10,6 +10,8 @@ SEGMENTS {
|
||||
VECTORS: load = BASROM, type = ro;
|
||||
KEYWORDS: load = BASROM, type = ro;
|
||||
CODE: load = BASROM, type = ro;
|
||||
CHRGET: load = BASROM, type = ro;
|
||||
INIT: load = BASROM, type = ro;
|
||||
DUMMY: load = DUMMY; # don't include
|
||||
}
|
||||
|
||||
|
33
rnd.s
33
rnd.s
@ -1,3 +1,9 @@
|
||||
.segment "CODE"
|
||||
|
||||
; ----------------------------------------------------------------------------
|
||||
; "RND" FUNCTION
|
||||
; ----------------------------------------------------------------------------
|
||||
|
||||
.ifdef KBD
|
||||
RND:
|
||||
ldx #$10
|
||||
@ -43,6 +49,8 @@ GOMOVMF:
|
||||
bne LFBFA
|
||||
.byte $F0
|
||||
.else
|
||||
; <<< THESE ARE MISSING ONE BYTE FOR FP VALUES >>>
|
||||
; (non CONFIG_SMALL)
|
||||
CONRND1:
|
||||
.byte $98,$35,$44,$7A
|
||||
CONRND2:
|
||||
@ -71,7 +79,7 @@ LDF63:
|
||||
jsr LOAD_FAC_FROM_YA
|
||||
.ifndef CONFIG_CBM_ALL
|
||||
txa
|
||||
beq L3EDA
|
||||
beq RTS19
|
||||
.endif
|
||||
lda #<CONRND1
|
||||
ldy #>CONRND1
|
||||
@ -103,3 +111,26 @@ LDF88:
|
||||
GOMOVMF:
|
||||
jmp STORE_FAC_AT_YX_ROUNDED
|
||||
.endif
|
||||
|
||||
; ----------------------------------------------------------------------------
|
||||
; INITIAL VALUE FOR RANDOM NUMBER, ALSO COPIED
|
||||
; IN ALONG WITH CHRGET, BUT ERRONEOUSLY:
|
||||
; <<< THE LAST BYTE IS NOT COPIED >>>
|
||||
; ----------------------------------------------------------------------------
|
||||
|
||||
.segment "CHRGET"
|
||||
|
||||
GENERIC_RNDSEED:
|
||||
.ifndef KBD
|
||||
; random number seed
|
||||
.ifdef OSI
|
||||
.byte $80,$4F,$C7,$52
|
||||
.endif
|
||||
.ifdef CONFIG_11
|
||||
.byte $80,$4F,$C7,$52,$58
|
||||
.endif
|
||||
.ifdef CBM1
|
||||
.byte $80,$4F,$C7,$52,$59
|
||||
.endif
|
||||
.endif
|
||||
GENERIC_CHRGET_END:
|
||||
|
2
trig.s
2
trig.s
@ -1,3 +1,5 @@
|
||||
.segment "CODE"
|
||||
|
||||
SIN_COS_TAN_ATN:
|
||||
; ----------------------------------------------------------------------------
|
||||
; "COS" FUNCTION
|
||||
|
@ -116,6 +116,5 @@ CHRGOT = GENERIC_CHRGOT-GENERIC_CHRGET + CHRGET
|
||||
TXTPTR = <(GENERIC_TXTPTR-GENERIC_CHRGET + CHRGET)
|
||||
.ifndef CONFIG_SMALL
|
||||
L00CF:
|
||||
.res 11
|
||||
RNDSEED:
|
||||
RNDSEED = <(GENERIC_RNDSEED-GENERIC_CHRGET + CHRGET)
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user