Kernel 0.92

This commit is contained in:
Rémy GIBERT 2018-11-24 19:20:48 +01:00
parent f7be5fb740
commit 288bd3303e
5 changed files with 55 additions and 21 deletions

Binary file not shown.

View File

@ -190,6 +190,9 @@ CL.SUPPR >LDA.G CL.Len
beq CL.PrintEOL.8
>LDA.G CL.Ptr
>CMP.G CL.Len
beq CL.PrintEOL.8
bra CL.DEL.1
*--------------------------------------
* Erase char BEFORE cursor

View File

@ -824,36 +824,40 @@ Cmd.GetEXP >LDA.G CMD.ArgIndex
jsr Cmd.GetArgX
rts
.1 >PUSHYA
.1 >LDA.G CMD.ArgIndex
tax
jsr Cmd.GetArgX
>SYSCALL AToL
bcs .99
>PULLL.G M32.ACC
jsr Cmd.GetEXP.GetNext
.2 >PUSHYA
>LDYA L.CMD.IF.TOKEN4 + - .... ?
jsr Lookup
bcs .90
bcs .9
txa
>STA.G CMD.Operator
>LDA.G CMD.ArgIndex
tax
jsr Cmd.GetArgX
jsr M32.ACC2ARG
jsr Cmd.GetEXP.GetNext get next argument in ACC
.99 bcs .9
>SYSCALL AToL
bcs .9
>PULLL.G M32.ACC
>LDA.G CMD.ArgIndex
inc
inc
tax
jsr Cmd.GetArgX
jsr Cmd.GetEXP.Op
bcs .9
>SYSCALL AToL
bcs .9
>PULLL.G M32.ARG
jsr .80
.90 bcs .9
>PUSHL.G M32.ACC
jsr Cmd.GetEXP.GetNext another op ?
bcc .2
.8 >PUSHL.G M32.ACC
>PUSHBI 4
>PUSHW L.M32.Printf
>LEA.G M32.BUF
@ -867,10 +871,16 @@ Cmd.GetEXP >LDA.G CMD.ArgIndex
.9 lda #E.BADEXP
rts
.80 >LDA.G CMD.Operator
Cmd.GetEXP.Op >LDA.G CMD.Operator
tax
jmp (J.CMD.IF.TOKEN4,x)
*--------------------------------------
Cmd.GetEXP.GetNext
>INC.G CMD.ArgIndex
tax
jsr Cmd.GetArgX
rts
*--------------------------------------
Cmd.GetValue tax
jsr Cmd.GetArgX
>STYA ZPPtr1

View File

@ -1,6 +1,7 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SHELL
ECHO *** A2osX INIT Script ***
SET PS1='$PWD'
# Main Screen

View File

@ -8,6 +8,10 @@ AUTO 4,1
* M32.ARG .BS 4
* M32.TMP .BS 4
*--------------------------------------
* TODO : Make it SIGNED 32 bits
* TODO : Implement mul, div, mod ...
* http://6502.org/source/integers/32muldiv.htm
*--------------------------------------
M32.Add ldy #M32.ARG+4 ARG+ACC->ACC
.1 dey
@ -58,8 +62,6 @@ M32.Sub ldy #M32.ARG+4 ARG+ACC->ACC
.8 clc
rts
*--------------------------------------
* http://6502.org/source/integers/32muldiv.htm
*--------------------------------------
M32.Mul
*--------------------------------------
M32.Div
@ -73,5 +75,23 @@ M32.Mod
clc
rts
*--------------------------------------
M32.ACC2ARG ldy #M32.ACC+4 ACC->ARG
.1 dey
lda (pData),y
pha
cpy #M32.ACC
bne .1
ldy #M32.ARG
.2 pla
sta (pData),y
iny
cpy #M32.ARG+4
bne .2
rts
*--------------------------------------
MAN
SAVE USR/SRC/X.M32.S