Kernel 0.9.1 : Code reorganization & move to CSTR : new MACROS set for DS access

This commit is contained in:
Rémy GIBERT 2017-09-26 08:27:34 +02:00
parent 3e3aa41e87
commit 6a46705d34
4 changed files with 28 additions and 38 deletions

Binary file not shown.

Binary file not shown.

View File

@ -13,11 +13,9 @@ AUTO 6
*--------------------------------------
.MA DEBUGOA
bit $C061
bpl :2
:1 bit $C000
bpl :1
sta $C010
:2 .EQ *
>DEBUG
:1 .EQ *
.EM
*--------------------------------------
* SYSCALLs Macros
@ -125,18 +123,8 @@ AUTO 6
.EM
*--------------------------------------
.MA PUSHEA.G
clc
lda pData
adc #]1
tay
lda pData+1
adc /]1
dec pStack
sta (pStack)
tya
dec pStack
sta (pStack)
>LEA.G ]1
>PUSHYA
.EM
*--------------------------------------
.MA LDA.G
@ -153,6 +141,11 @@ AUTO 6
ldy #]1
cmp (pData),y
.EM
*--------------------------------------
.MA ADC.G
ldy #]1
adc (pData),y
.EM
*--------------------------------------
.MA SBC.G
ldy #]1
@ -160,24 +153,19 @@ AUTO 6
.EM
*--------------------------------------
.MA DEC.G
ldy #]1
lda (pData),y
>LDA.G ]1
dec
sta (pData),y
.EM
*--------------------------------------
.MA INC.G
ldy #]1
lda (pData),y
>LDA.G ]1
inc
sta (pData),y
.EM
*--------------------------------------
.MA INCW.G
ldy #]1
lda (pData),y
inc
sta (pData),y
>INC.G ]1
bne :1
iny
@ -189,8 +177,7 @@ AUTO 6
.EM
*--------------------------------------
.MA LDYA.G
ldy #]1
lda (pData),y
>LDA.G ]1
pha
iny
lda (pData),y

View File

@ -25,16 +25,15 @@ HIS.Add >LDA.G HIS.hBuf
.10 lda #$ff
jsr HIS.GetA Y=ending 0
phy
tya
sec add len+1
adc CmdBuflen CmdBuffer length
>ADC.G CmdBuflen CmdBuffer length
pla
bcc .2 enough room
>DEC.G HIS.Count we must remove oldest
ldy #$ff
ldy #$ff we must remove oldest
.12 iny
lda (ZPPTR1),y get len of oldest string
@ -60,16 +59,16 @@ HIS.Add >LDA.G HIS.hBuf
sta (ZPPTR1),y
bne .1
>DEC.G HIS.Count
bra .10 retry....
.2 tya Y=Array Ending 0
sec
.2 clc A = ending O offset
adc ZPPTR1
sta ZPPTR2
lda ZPPTR1+1
adc #0
sta ZPPTR2+1
sta ZPPTR1
bcc .3
inc ZPPTR1+1
.3 ldy #$ff
.4 iny
@ -92,6 +91,8 @@ HIS.GetPrev >LDA.G HIS.hBuf
>SYSCALL GetMemPtr.A
>STYA ZPPTR1
>DEBUG
>LDA.G HIS.Count
beq HISTORY.RTS empty history,nothing to do
@ -114,6 +115,8 @@ HIS.GetNext >LDA.G HIS.hBuf
>SYSCALL GetMemPtr.A
>STYA ZPPTR1
>DEBUG
>LDA.G HIS.Count
beq HISTORY.RTS empty history,nothing to do