mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-22 00:32:44 +00:00
Kernel 0.94++
This commit is contained in:
parent
70ec292f4a
commit
a4f22f87d3
@ -147,7 +147,7 @@ The definitions are listed in ASCII alphabetical order in several groups con
|
||||
| EXIT | | C | | When compiled within a colon-definition, terminate execution of that definition, at that point. May not be used within a DO...LOOP. | |
|
||||
| EXPECT | addr n -- | | | Transfer characters from the terminal beginning at addr, upward, until a "return" or the count of n has been received. Take no action for n less than or equal to zero. One or two nulls are added at the end of text. | |
|
||||
| FILL | addr n byte -- | I,C | Working | Fill memory starting at addr with n copies of byte | |
|
||||
| FIND | -- addr ||| Leave the compilation address of the next word name, which is accepted from the input stream. If that word cannot be found in the dictionary after a search of CONTEXT and FORTH leave zero. | |
|
||||
| FIND | -- addr | | | Leave the compilation address of the next word name, which is accepted from the input stream. If that word cannot be found in the dictionary after a search of CONTEXT and FORTH leave zero. | |
|
||||
| FORGET | -- | | | Execute in the form: <br>FORGET **name** <br>Delete from the dictionary **name** (which is in the CURRENT vocabulary) and all words added to the dictionary after **name**, regardless of their vocabulary. Failure to find **name** in CURRENT or FORTH is an error condition. | |
|
||||
| FORTH | -- | I | | The name of the primary vocabulary. Execution makes FORTH the CONTEXT vocabulary. New definitions become a part of the FORTH until a differing CURRENT vocabulary is established. User vocabularies conclude by 'chaining' to FORTH, so it should be considered that FORTH is 'contained' within each user's vocabulary.y | |
|
||||
| HERE | -- addr | | Working | Return address of next available dictionary location.| |
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,6 +1,11 @@
|
||||
NEW
|
||||
AUTO 3,1
|
||||
*--------------------------------------
|
||||
CL.PrintPrompt >PUSHW L.MSG.PROMPT
|
||||
>PUSHBI 0
|
||||
>SYSCALL PrintF
|
||||
rts
|
||||
*--------------------------------------
|
||||
CL.READN0A tax
|
||||
CL.READN0X >PUSHW ZPCLBuf
|
||||
>PUSHW L.FMT.Byte
|
||||
@ -120,7 +125,12 @@ CL.CHARIN.CTRL cpx #C.CR
|
||||
cpx #3 Ctrl-C
|
||||
beq CL.CLR
|
||||
|
||||
cpx #26 Ctrl-Z
|
||||
cpx #C.TAB
|
||||
bne .1
|
||||
|
||||
jmp HIS.Select
|
||||
|
||||
.1 cpx #26 Ctrl-Z
|
||||
bne .8
|
||||
|
||||
jmp CL.SUPPR
|
||||
@ -156,7 +166,7 @@ CL.CLR lda (ZPCLBuf)
|
||||
lda (ZPCLBuf),y
|
||||
bne .3
|
||||
|
||||
jsr CL.PrintCLBuf
|
||||
jsr CL.Print
|
||||
*--------------------------------------
|
||||
CL.Reset lda #0
|
||||
sta (ZPCLBuf)
|
||||
@ -249,7 +259,7 @@ CL.PrintEOL lda CL.Ptr
|
||||
CL.PrintEOL.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CL.PrintCLBuf ldy #S.PS.hStdOut
|
||||
CL.Print ldy #S.PS.hStdOut
|
||||
lda (pPS),y
|
||||
>PUSHA
|
||||
>PUSHW ZPCLBuf
|
||||
|
@ -8,17 +8,7 @@ GFX.Open >PUSHW L.DEV.GFX
|
||||
|
||||
>STA.G hDevGFX
|
||||
|
||||
rts
|
||||
|
||||
ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
bit #1
|
||||
beq .9
|
||||
|
||||
>PUSHA
|
||||
>PUSHBI IOCTL.CONTROL
|
||||
>PUSHWI 0
|
||||
>SYSCALL IOCTL
|
||||
bra GFX.TEXT
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
@ -29,6 +19,29 @@ GFX.Close >LDA.G hDevGFX
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
GFX.TEXT ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
|
||||
bit #1
|
||||
bne GFX.IOCTL
|
||||
|
||||
GFX.TEXT.RTS clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
GFX.GR ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
bit #1
|
||||
beq GFX.TEXT.RTS
|
||||
|
||||
>LDA.G hDevGFX
|
||||
beq GFX.TEXT.RTS
|
||||
|
||||
GFX.IOCTL >PUSHA
|
||||
>PUSHBI IOCTL.CONTROL
|
||||
>PUSHWI 0
|
||||
>SYSCALL IOCTL
|
||||
rts
|
||||
*--------------------------------------
|
||||
* (Y X C)
|
||||
*--------------------------------------
|
||||
GFX.PLOT ldx #S.CB.CMD.SETPIXEL
|
||||
|
@ -2,77 +2,138 @@ NEW
|
||||
AUTO 3,1
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
HIS.Init clc
|
||||
rts
|
||||
HIS.Init >LDYAI HISTORY.MAX Get a buffer for History
|
||||
|
||||
>LDYAI HISTORY.MAX Get a buffer for History
|
||||
>SYSCALL StrVNew
|
||||
bcs .9
|
||||
|
||||
txa
|
||||
>STA.G HIS.hBuf
|
||||
|
||||
>STZ.G HIS.Count
|
||||
>STA.G HIS.Index
|
||||
* >STZ.G HIS.Count
|
||||
* >STA.G HIS.Index
|
||||
* >STA.G HIS.LRU
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
HIS.Add >LDA.G HIS.hBuf
|
||||
beq .9
|
||||
|
||||
>LDA.G HIS.Count
|
||||
cmp #HIS.MAX
|
||||
bcc .2
|
||||
|
||||
>LDA.G HIS.LRU
|
||||
cmp #HIS.MAX
|
||||
bne .1
|
||||
|
||||
lda #0
|
||||
|
||||
.1 inc
|
||||
>STA.G HIS.LRU
|
||||
bra .7
|
||||
|
||||
.2 inc
|
||||
>STA.G HIS.Count
|
||||
|
||||
.7 tax
|
||||
>PUSHB.G HIS.hBuf
|
||||
>PUSHBI 0
|
||||
txa
|
||||
>PUSHA
|
||||
>PUSHW ZPCLBuf
|
||||
>SYSCALL StrVSet
|
||||
bcc .1
|
||||
|
||||
>PUSHB.G HIS.hBuf
|
||||
>PUSHWZ
|
||||
>SYSCALL StrVSet
|
||||
>DEC.G HIS.Count
|
||||
bra HIS.Add
|
||||
|
||||
.1 >STZ.G HIS.Index Reset Index
|
||||
>INC.G HIS.Count
|
||||
.9
|
||||
HIS.Add.RTS rts
|
||||
*--------------------------------------
|
||||
HIS.GetPrev >LDA.G HIS.hBuf
|
||||
beq HIS.Add.RTS
|
||||
|
||||
>LDA.G HIS.Count
|
||||
beq HIS.Add.RTS empty history,nothing to do
|
||||
>STZ.G HIS.Index Reset Index
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
HIS.Select >LDA.G HIS.Count
|
||||
bne .10
|
||||
|
||||
clc
|
||||
.99 rts
|
||||
|
||||
.10 jsr CL.Reset
|
||||
|
||||
>STZ.G HIS.Index
|
||||
|
||||
.1 >INC.G HIS.Index
|
||||
jsr HIS.GetIndex
|
||||
bcs .99
|
||||
|
||||
>PUSHW L.MSG.HIS
|
||||
>LDA.G HIS.Index
|
||||
dec
|
||||
>PUSHA
|
||||
>PUSHW ZPCLBuf
|
||||
>PUSHBI 3
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
|
||||
>LDA.G HIS.Index
|
||||
>CMP.G HIS.Count
|
||||
bne .1
|
||||
|
||||
>PUSHW L.MSG.HISPROMPT
|
||||
>PUSHBI 0
|
||||
>SYSCALL PrintF
|
||||
|
||||
>STZ.G HIS.Index
|
||||
|
||||
lda #0
|
||||
sta (ZPCLBuf)
|
||||
|
||||
>SYSCALL GetChar
|
||||
bcs HIS.Select.RTS
|
||||
|
||||
cmp #'0'
|
||||
bcc .7
|
||||
|
||||
cmp #'9'+1
|
||||
bcs .7
|
||||
|
||||
and #$f
|
||||
inc
|
||||
|
||||
>STA.G HIS.Index
|
||||
|
||||
.7 >PUSHW L.MSG.HISROMPTCLR
|
||||
>PUSHBI 0
|
||||
>SYSCALL PrintF
|
||||
|
||||
jsr CL.PrintPrompt
|
||||
bcc HIS.GetToCL1
|
||||
.9
|
||||
HIS.Select.RTS rts
|
||||
*--------------------------------------
|
||||
HIS.GetPrev >LDA.G HIS.Count
|
||||
beq HIS.Select.RTS empty history,nothing to do
|
||||
|
||||
>LDA.G HIS.Index
|
||||
bne .1
|
||||
|
||||
>LDA.G HIS.Count
|
||||
bra HIS.GetToCL
|
||||
|
||||
.1 dec
|
||||
bra HIS.GetToCl
|
||||
*--------------------------------------
|
||||
HIS.GetNext >LDA.G HIS.hBuf
|
||||
beq HIS.Add.RTS
|
||||
HIS.GetNext >LDA.G HIS.Count
|
||||
beq HIS.Select.RTS empty history,nothing to do
|
||||
|
||||
>LDA.G HIS.Count
|
||||
beq HIS.Add.RTS empty history,nothing to do
|
||||
>EOR.G HIS.Index
|
||||
beq HIS.GetToCL
|
||||
|
||||
>LDA.G HIS.Index
|
||||
inc
|
||||
>CMP.G HIS.Count
|
||||
bne HIS.GetToCl
|
||||
|
||||
lda #0
|
||||
>STA.G HIS.Index
|
||||
jmp CL.CLR
|
||||
*--------------------------------------
|
||||
HIS.GetToCl >STA.G HIS.Index
|
||||
|
||||
jsr CL.CLR
|
||||
|
||||
>PUSHB.G HIS.hBuf
|
||||
>PUSHBI 0
|
||||
>PUSHB.G HIS.Index
|
||||
>PUSHW ZPCLBuf
|
||||
HIS.GetToCL1 >LDA.G HIS.Index
|
||||
beq .9
|
||||
|
||||
>SYSCALL StrVGet
|
||||
jsr HIS.GetIndex
|
||||
bcs .9
|
||||
|
||||
ldy #$ff
|
||||
|
||||
@ -84,7 +145,16 @@ HIS.GetToCl >STA.G HIS.Index
|
||||
|
||||
sta CL.Ptr
|
||||
sta CL.Len
|
||||
jmp CL.PrintCLBuf
|
||||
jmp CL.Print
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
HIS.GetIndex >PUSHB.G HIS.hBuf
|
||||
>PUSHBI 0
|
||||
>PUSHB.G HIS.Index
|
||||
>PUSHW ZPCLBuf
|
||||
>SYSCALL StrVGet
|
||||
rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE usr/src/bin/forth.s.his
|
||||
|
@ -463,7 +463,7 @@ KW.AND jsr CheckStackPop4
|
||||
sta (pStack),y
|
||||
inc pStack
|
||||
|
||||
clc
|
||||
* clc
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
@ -481,7 +481,7 @@ KW.OR jsr CheckStackPop4
|
||||
sta (pStack),y
|
||||
inc pStack
|
||||
|
||||
clc
|
||||
* clc
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
@ -499,7 +499,7 @@ KW.XOR jsr CheckStackPop4
|
||||
sta (pStack),y
|
||||
inc pStack
|
||||
|
||||
clc
|
||||
* clc
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
@ -519,9 +519,11 @@ KW.LWR jsr CheckStackPop4
|
||||
|
||||
lda #0
|
||||
ror
|
||||
eor #$80
|
||||
|
||||
sta (pStack)
|
||||
|
||||
clc
|
||||
* clc
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
@ -541,10 +543,10 @@ KW.GTR jsr CheckStackPop4
|
||||
|
||||
lda #0
|
||||
ror
|
||||
eor #$80
|
||||
|
||||
sta (pStack)
|
||||
|
||||
clc
|
||||
* clc
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
@ -558,27 +560,26 @@ KW.EQ jsr CheckStackPop4
|
||||
ldy #2
|
||||
lda (pStack),y
|
||||
eor (pStack)
|
||||
tax
|
||||
|
||||
inc pStack
|
||||
tax
|
||||
bne .1
|
||||
|
||||
lda (pStack),y
|
||||
eor (pStack)
|
||||
|
||||
inc pStack
|
||||
|
||||
tay
|
||||
bne .1
|
||||
|
||||
txa
|
||||
bne .1
|
||||
|
||||
|
||||
sec
|
||||
|
||||
.1 inc pStack
|
||||
.1 lda #0
|
||||
ror
|
||||
|
||||
inc pStack
|
||||
inc pStack
|
||||
|
||||
sta (pStack)
|
||||
|
||||
clc
|
||||
* clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
KW.NEGATIVE inc pStack
|
||||
|
@ -5,7 +5,8 @@ NEW
|
||||
.OR $2000
|
||||
.TF bin/forth
|
||||
*--------------------------------------
|
||||
HISTORY.MAX .EQ 256
|
||||
HIS.MAX .EQ 10
|
||||
HISTORY.MAX .EQ 512
|
||||
*--------------------------------------
|
||||
.INB inc/macros.i
|
||||
.INB inc/a2osx.i
|
||||
@ -79,6 +80,9 @@ CS.START cld
|
||||
.DA CS.QUIT
|
||||
L.DEV.GFX .DA DEV.GFX
|
||||
L.MSG.GREETINGS .DA MSG.GREETINGS
|
||||
L.MSG.HIS .DA MSG.HIS
|
||||
L.MSG.HISPROMPT .DA MSG.HISPROMPT
|
||||
L.MSG.HISROMPTCLR .DA MSG.HISROMPTCLR
|
||||
L.MSG.USAGE .DA MSG.USAGE
|
||||
L.MSG.ECHOCRLF .DA MSG.ECHOCRLF
|
||||
L.MSG.DEBUG .DA MSG.DEBUG
|
||||
@ -99,7 +103,9 @@ J.ESC .DA CL.BS left arrow
|
||||
.DA HIS.GetPrev
|
||||
.DA CL.NAK right arrow
|
||||
L.KEYWORDS .DA KEYWORDS
|
||||
I.KEYWORDS .DA GFX.PLOT
|
||||
I.KEYWORDS .DA GFX.TEXT
|
||||
.DA GFX.GR
|
||||
.DA GFX.PLOT
|
||||
.DA GFX.RECT
|
||||
.DA KW.DUP
|
||||
.DA KW.DROP
|
||||
@ -206,7 +212,9 @@ KW.IF.ID .EQ *-I.KEYWORDS
|
||||
.DA KW.Rg
|
||||
.DA KW.R
|
||||
*--------------------------------------
|
||||
C.KEYWORDS .DA CP.JSRX GFX.PLOT
|
||||
C.KEYWORDS .DA CP.JSRX GFX.TEXT
|
||||
.DA CP.JSRX GFX.GR
|
||||
.DA CP.JSRX GFX.PLOT
|
||||
.DA CP.JSRX GFX.RECT
|
||||
.DA CP.JSRX KW.DUP
|
||||
.DA CP.JSRX KW.DROP
|
||||
@ -446,7 +454,7 @@ CS.FORTH.Run jsr CL.Reset
|
||||
lda #80
|
||||
sta CL.MaxCnt
|
||||
|
||||
jsr PrintPrompt
|
||||
jsr CL.PrintPrompt
|
||||
bcs .9
|
||||
|
||||
.1 >SYSCALL GetChar
|
||||
@ -734,11 +742,6 @@ CS.QUIT jsr GFX.Close
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
PrintPrompt >PUSHW L.MSG.PROMPT
|
||||
>PUSHBI 0
|
||||
>SYSCALL PrintF
|
||||
rts
|
||||
*--------------------------------------
|
||||
PrintDebugMsg lda pStack+1
|
||||
ldy pStack
|
||||
bne .1
|
||||
@ -907,6 +910,9 @@ CS.END
|
||||
*--------------------------------------
|
||||
DEV.GFX .AZ "/dev/gfx"
|
||||
MSG.GREETINGS .AZ "\e[?7h\r\nA2osX-FORTH %d.%d (FORTH-79)\r\n"
|
||||
MSG.HIS .AZ "\r\n%3d : %s"
|
||||
MSG.HISPROMPT .AZ "\r\n\r\n? "
|
||||
MSG.HISROMPTCLR .DA #C.BS,#C.BS,#0
|
||||
MSG.USAGE .AS "Usage : FORTH <option> file\r\n"
|
||||
.AS " -D : Debug Mode\r\n"
|
||||
.AS " -T : Trace On"
|
||||
@ -932,7 +938,9 @@ EscChars .AS 'DBAC'
|
||||
EscChars.Cnt .EQ *-EscChars
|
||||
EscChars.Remap .DA #C.BS,#C.VT,#C.LF,#C.FS
|
||||
*--------------------------------------
|
||||
KEYWORDS .AT "PLOT"
|
||||
KEYWORDS .AT "TEXT"
|
||||
.AT "GR"
|
||||
.AT "PLOT"
|
||||
.AT "RECT"
|
||||
*--------------------------------------
|
||||
.AT "DUP" ( n - n n ) Duplicate top of stack.
|
||||
@ -1170,6 +1178,7 @@ hCLBuf .BS 1
|
||||
HIS.hBuf .BS 1
|
||||
HIS.Count .BS 1
|
||||
HIS.Index .BS 1
|
||||
HIS.LRU .BS 1
|
||||
|
||||
hFile .BS 1
|
||||
LineCounter .BS 2
|
||||
|
@ -217,7 +217,7 @@ CS.RUN.LOGO.SHOW
|
||||
|
||||
inc
|
||||
sta CB.LOGO+S.CB.Y1
|
||||
cmp #151
|
||||
cmp #144
|
||||
bne .1
|
||||
|
||||
.7 lda yDir
|
||||
|
@ -19,13 +19,17 @@ BITBLT >LDYA CB.Cache+S.CB.X1
|
||||
lda CB.Cache+S.CB.X1
|
||||
clc
|
||||
adc CB.Cache+S.CB.SrcW
|
||||
tay
|
||||
pha
|
||||
|
||||
lda CB.Cache+S.CB.X1+1
|
||||
adc CB.Cache+S.CB.SrcW+1
|
||||
cpy #1
|
||||
bcs .0
|
||||
|
||||
ply
|
||||
bne .10
|
||||
|
||||
dec
|
||||
.0 dey
|
||||
|
||||
.10 dey
|
||||
|
||||
jsr LBUF.SetBounds2YA
|
||||
|
||||
@ -58,13 +62,7 @@ BITBLT >LDYA CB.Cache+S.CB.X1
|
||||
|
||||
ldx LBUF.C1
|
||||
|
||||
.3 txa
|
||||
and #1
|
||||
tay
|
||||
sta CLRPAGE2,y
|
||||
txa
|
||||
lsr
|
||||
tay
|
||||
.3 >X2PageY
|
||||
|
||||
lda (ZPBMSavePtr)
|
||||
sta (ZPBasePtr),y
|
||||
@ -110,13 +108,7 @@ BITBLT.0 bit #S.CB.OP.SAVE
|
||||
|
||||
ldx LBUF.C1
|
||||
|
||||
.3 txa
|
||||
and #1
|
||||
tay
|
||||
sta CLRPAGE2,y
|
||||
txa
|
||||
lsr
|
||||
tay
|
||||
.3 >X2PageY
|
||||
|
||||
lda (ZPBasePtr),y
|
||||
sta (ZPBMSavePtr)
|
||||
@ -178,6 +170,7 @@ BITBLT.2 ldy #S.BM-1
|
||||
adc #S.BM
|
||||
sta ZPBMDataPtr
|
||||
bcc .2
|
||||
|
||||
inc ZPBMDataPtr+1
|
||||
|
||||
.2 >LDYA CB.Cache+S.CB.SrcY
|
||||
|
@ -45,13 +45,7 @@ LBUF.DrawAtY.SET
|
||||
LBUF.DrawAtY.AND.SET
|
||||
ldx LBUF.C1 x C1->C2
|
||||
|
||||
txa
|
||||
and #1
|
||||
tay
|
||||
sta CLRPAGE2,y
|
||||
txa
|
||||
lsr
|
||||
tay
|
||||
>X2PageY
|
||||
|
||||
lda (ZPBasePtr),y Clear screen at C1
|
||||
and LBUF.C1.MASK with MASK bits
|
||||
@ -68,13 +62,7 @@ LBUF.DrawAtY.AND.SET
|
||||
|
||||
bcs .8 C1+1 > C2, we are done...
|
||||
|
||||
.1 txa
|
||||
and #1
|
||||
tay
|
||||
sta CLRPAGE2,y
|
||||
txa
|
||||
lsr
|
||||
tay
|
||||
.1 >X2PageY
|
||||
|
||||
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
||||
sta (ZPBasePtr),y
|
||||
@ -83,13 +71,7 @@ LBUF.DrawAtY.AND.SET
|
||||
cpx LBUF.C2
|
||||
bcc .1
|
||||
|
||||
.2 txa
|
||||
and #1
|
||||
tay
|
||||
sta CLRPAGE2,y
|
||||
txa
|
||||
lsr
|
||||
tay
|
||||
.2 >X2PageY
|
||||
|
||||
lda (ZPBasePtr),y Get C2
|
||||
and LBUF.C2.MASK clear ONLY bits ending at X2 mod 7
|
||||
@ -116,13 +98,7 @@ LBUF.DrawAtY.XXX
|
||||
|
||||
ldx LBUF.C1 x C1->C2
|
||||
|
||||
txa
|
||||
and #1
|
||||
tay
|
||||
sta CLRPAGE2,y
|
||||
txa
|
||||
lsr
|
||||
tay
|
||||
>X2PageY
|
||||
|
||||
lda (ZPBasePtr),y Get C1
|
||||
and LBUF.C1.MASK clear ONLY bits starting at X1 mod 7
|
||||
@ -139,13 +115,7 @@ LBUF.DrawAtY.XXX
|
||||
|
||||
bcs .8 C1+1 > C2, we are done...
|
||||
|
||||
.1 txa
|
||||
and #1
|
||||
tay
|
||||
sta CLRPAGE2,y
|
||||
txa
|
||||
lsr
|
||||
tay
|
||||
.1 >X2PageY
|
||||
|
||||
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
||||
.20 ora (ZPBasePtr),y
|
||||
@ -155,13 +125,7 @@ LBUF.DrawAtY.XXX
|
||||
cpx LBUF.C2
|
||||
bne .1
|
||||
|
||||
.2 txa
|
||||
and #1
|
||||
tay
|
||||
sta CLRPAGE2,y
|
||||
txa
|
||||
lsr
|
||||
tay
|
||||
.2 >X2PageY
|
||||
|
||||
lda (ZPBasePtr),y Get C2
|
||||
and LBUF.C2.MASK clear ONLY bits ending at X2 mod 7
|
||||
@ -178,13 +142,7 @@ LBUF.DrawAtY.XXX
|
||||
LBUF.DrawAtY.AND.ORA
|
||||
ldx LBUF.C1 x C1->C2
|
||||
|
||||
txa
|
||||
and #1
|
||||
tay
|
||||
sta CLRPAGE2,y
|
||||
txa
|
||||
lsr
|
||||
tay
|
||||
>X2PageY
|
||||
|
||||
lda LBUF.MASK,x get MASK bits
|
||||
ora LBUF.C1.MASK clear ONLY bits starting at X1 mod 7
|
||||
@ -212,13 +170,7 @@ LBUF.DrawAtY.AND.ORA
|
||||
|
||||
bra .3
|
||||
|
||||
.2 txa
|
||||
and #1
|
||||
tay
|
||||
sta CLRPAGE2,y
|
||||
txa
|
||||
lsr
|
||||
tay
|
||||
.2 >X2PageY
|
||||
|
||||
lda (ZPBasePtr),y
|
||||
and LBUF.MASK,x
|
||||
@ -230,13 +182,7 @@ LBUF.DrawAtY.AND.ORA
|
||||
cpx LBUF.C2
|
||||
bne .2
|
||||
|
||||
txa
|
||||
and #1
|
||||
tay
|
||||
sta CLRPAGE2,y
|
||||
txa
|
||||
lsr
|
||||
tay
|
||||
>X2PageY
|
||||
|
||||
lda LBUF.MASK,x get MASK bits
|
||||
ora LBUF.C2.MASK
|
||||
|
@ -77,16 +77,20 @@ VLINE.MONO >LDYA CB.Cache+S.CB.X1
|
||||
lsr
|
||||
sta ZPTmpByte Save COL (DIV)
|
||||
|
||||
lda #0
|
||||
rol
|
||||
tay
|
||||
sta CLRPAGE2,y Select proper BANK
|
||||
ldy #SETPAGE2
|
||||
bcc .1
|
||||
|
||||
dey CLRPAGE2
|
||||
|
||||
.1 sta $C000,y Select proper BANK
|
||||
|
||||
ldy CB.Cache+S.CB.Y1
|
||||
clc
|
||||
|
||||
lda CB.Cache+S.CB.OP
|
||||
* cmp #S.CB.OP.XOR
|
||||
beq VLINE.MONO.XOR
|
||||
|
||||
lda CB.Cache+S.CB.COLOR
|
||||
bne VLINE.MONO.WHITE
|
||||
|
||||
@ -94,12 +98,15 @@ VLINE.MONO.BLACK
|
||||
.1 lda BASEL,y
|
||||
adc ZPTmpByte
|
||||
sta ZPBasePtr
|
||||
|
||||
lda BASEH,y
|
||||
sta ZPBasePtr+1
|
||||
lda (ZPBasePtr)
|
||||
|
||||
and Mono.NMasks,x
|
||||
sta (ZPBasePtr)
|
||||
cpy CB.Cache+S.CB.Y2
|
||||
|
||||
iny
|
||||
bcc .1
|
||||
|
||||
@ -115,14 +122,18 @@ VLINE.MONO.XOR
|
||||
.1 lda BASEL,y
|
||||
adc ZPTmpByte
|
||||
sta ZPBasePtr
|
||||
|
||||
lda BASEH,y
|
||||
sta ZPBasePtr+1
|
||||
lda (ZPBasePtr)
|
||||
|
||||
.2 eor Mono.Masks,x SELF MODIFIED
|
||||
sta (ZPBasePtr)
|
||||
cpy CB.Cache+S.CB.Y2
|
||||
|
||||
iny
|
||||
bcc .1
|
||||
|
||||
rts
|
||||
|
||||
VLINE.C16 lda CB.Cache+S.CB.X1
|
||||
@ -143,6 +154,7 @@ VLINE.C16 lda CB.Cache+S.CB.X1
|
||||
cpy CB.Cache+S.CB.Y2
|
||||
iny
|
||||
bcc .1
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
|
@ -17,17 +17,22 @@ SETPIXEL.MONO >LDYA CB.Cache+S.CB.X1
|
||||
jsr DIVMOD7YA
|
||||
lsr
|
||||
php
|
||||
|
||||
ldy CB.Cache+S.CB.Y1
|
||||
clc
|
||||
adc BASEL,y
|
||||
sta ZPBasePtr
|
||||
lda BASEH,y
|
||||
sta ZPBasePtr+1
|
||||
|
||||
plp
|
||||
lda #0
|
||||
rol
|
||||
tay
|
||||
sta CLRPAGE2,y Select proper BANK
|
||||
ldy #0
|
||||
bcs .1
|
||||
|
||||
iny
|
||||
|
||||
.1 sta CLRPAGE2,y Select proper BANK
|
||||
|
||||
lda CB.Cache+S.CB.OP
|
||||
* cmp #S.CB.OP.XOR
|
||||
beq SETPIXEL.MONO.XOR
|
||||
|
@ -12,6 +12,19 @@ NEW
|
||||
.INB inc/io.i
|
||||
.INB inc/gfx.i
|
||||
.INB inc/gfx.eve.i
|
||||
*--------------------------------------
|
||||
.MA X2PageY
|
||||
txa
|
||||
lsr
|
||||
ldy #SETPAGE2 col 0,2,4...in AUX mem
|
||||
bcc :1 col 1,3,5...in MAIN mem
|
||||
|
||||
dey CLRPAGE2
|
||||
|
||||
:1 sta $C000,y
|
||||
|
||||
tay
|
||||
.EM
|
||||
*--------------------------------------
|
||||
ZPPtr1 .EQ ZPBIN
|
||||
ZPPtr2 .EQ ZPBIN+2
|
||||
|
@ -36,13 +36,17 @@ NEW
|
||||
Y @ X @ 4 * COLOR @ PLOT ;
|
||||
|
||||
: MANDELBROT
|
||||
." Press a key to start..."
|
||||
KEY GR
|
||||
MAXY 0 DO
|
||||
I Y !
|
||||
MAXX 0 DO
|
||||
I X !
|
||||
CELL
|
||||
LOOP
|
||||
LOOP ;
|
||||
LOOP
|
||||
TEXT
|
||||
." All done." ;
|
||||
|
||||
MANDELBROT
|
||||
MAN
|
||||
|
@ -4,7 +4,7 @@ NEW
|
||||
IO.D2.SeekTimeR .EQ 58 LIBBLKDEV Recalibration
|
||||
IO.D2.SeekTimeF .EQ 58 LIBBLKDEV Track Formatter
|
||||
IO.D2.SeekTimeB .EQ 58 LIBBLKDEV Boot Block
|
||||
IO.D2.SeekTimeP .EQ 38 ProDOS.FX initial
|
||||
IO.D2.SeekTimeP .EQ 48 ProDOS.FX initial
|
||||
IO.D2.SeekTimeI .EQ 10 ProDOS.FX increment -> until > 128
|
||||
*--------------------------------------
|
||||
IO.D2.Ph0Off .EQ $C080
|
||||
|
@ -14,6 +14,7 @@ S.SMB.H.CMD.TRANS2 .EQ $32
|
||||
S.SMB.H.CMD.NEGOTIATE .EQ $72
|
||||
S.SMB.H.CMD.SESSION.SETUP.ANDX .EQ $73
|
||||
S.SMB.H.CMD.TREE.CONNECT.ANDX .EQ $75
|
||||
S.SMB.H.CMD.NT.CREATE.ANDX .EQ $A0
|
||||
S.SMB.H.STATUS .EQ 5
|
||||
S.SMB.H.FLAGS .EQ 9
|
||||
S.SMB.H.FLAGS.LOCKANDREADOK .EQ 1
|
||||
|
@ -392,12 +392,12 @@ BB.Seek lda BB.HdrTrk get track we're on
|
||||
|
||||
lda IO.D2.Ph0Off,y
|
||||
|
||||
ldy #0
|
||||
|
||||
.10 dey
|
||||
bne .10
|
||||
ldy BB.Slotn0
|
||||
lda IO.D2.DrvOn,y
|
||||
|
||||
lda IO.D2.Ph0Off,x
|
||||
|
||||
lda IO.D2.DrvOn,y
|
||||
*--------------------------------------
|
||||
BB.Read ldx BB.Slotn0
|
||||
|
||||
|
@ -137,13 +137,13 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
|
||||
|
||||
lda IO.D2.Ph0Off,y
|
||||
|
||||
ldy #0
|
||||
ldy D2.Slotn0
|
||||
lda IO.D2.DrvOn,y
|
||||
|
||||
.10 dey
|
||||
bne .10
|
||||
|
||||
lda IO.D2.Ph0Off,x
|
||||
|
||||
lda IO.D2.DrvOn,y
|
||||
|
||||
rts
|
||||
|
||||
D2.SeekPhOnY and #6
|
||||
|
@ -533,6 +533,13 @@ CIFS2.ChOwn
|
||||
lda #MLI.E.BADCALL
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
*CIFS.FOpen >STYA pPath resolved path
|
||||
|
||||
* ldx #S.SMB.H.CMD.NT.CREATE.ANDX
|
||||
|
||||
|
||||
|
||||
*--------------------------------------
|
||||
CIFS.FOpen jsr MakeTrans2Req
|
||||
|
||||
@ -565,6 +572,10 @@ CIFS.FOpen jsr MakeTrans2Req
|
||||
ldy #S.NETBIOS+S.SMB.H+SMB.Trans2.H.Len+9 AccessMode
|
||||
sta (ZPReqPtr),y
|
||||
|
||||
lda #$52
|
||||
iny
|
||||
sta (ZPReqPtr),y
|
||||
|
||||
ldy #S.NETBIOS+S.SMB.H+SMB.Trans2.H.Len+19 OpenMode
|
||||
|
||||
pla
|
||||
@ -576,13 +587,17 @@ CIFS.FOpen jsr MakeTrans2Req
|
||||
sta (ZPReqPtr),y
|
||||
|
||||
.2 pla
|
||||
and #O.APPEND
|
||||
beq .3
|
||||
* and #O.APPEND
|
||||
* beq .3
|
||||
|
||||
lda (ZPReqPtr),y
|
||||
ora #1
|
||||
* sta (ZPReqPtr),y
|
||||
|
||||
ldy #S.NETBIOS+S.SMB.H.FLAGS2+1
|
||||
lda #$40
|
||||
sta (ZPReqPtr),y
|
||||
|
||||
.3 ply
|
||||
|
||||
jsr AppendPath
|
||||
|
@ -981,6 +981,30 @@ SMB.TreeConnect.H.Len .EQ *-SMB.TreeConnect.H
|
||||
SMB.TreeConnect.T
|
||||
.AZ "A:" Disk Share
|
||||
SMB.TreeConnect.T.Len .EQ *-SMB.TreeConnect.T
|
||||
*-------------------------------------- #$04
|
||||
SMB.ComCreate.H .DA #18 WORD COUNT
|
||||
.HS FF000000 NO MORE CMD
|
||||
.HS 00 Reserved
|
||||
.BS 2 NameLength
|
||||
.HS 00000000 Flags
|
||||
.BS 4 RootDirectoryFID
|
||||
.BS 4 DesiredAccess
|
||||
.HS 0000000000000000 AllocationSize
|
||||
.HS 00000000 ExtFileAttributes
|
||||
.HS 00000000 ShareAccess
|
||||
.BS 4 CreateDisposition
|
||||
.HS 00000000 CreateOptions
|
||||
.HS 00000000 ImpersonationLevel
|
||||
.HS 00 SecurityFlags
|
||||
.HS 00 SMB_Data
|
||||
SMB.ComCreate.H.Len .EQ *-SMB.ComCreate.H
|
||||
* .AZ "path\file"
|
||||
*-------------------------------------- #$04
|
||||
SMB.ComClose.H .DA #3 WORD COUNT
|
||||
.BS 2 FID
|
||||
.HS 00000000 LastTimeModified
|
||||
.HS 0000 ByteCount
|
||||
SMB.ComClose.H.Len .EQ *-SMB.ComClose.H
|
||||
*-------------------------------------- #$2E
|
||||
SMB.ComRead.H .DA #10 WORD COUNT
|
||||
.HS FF000000 NO MORE CMD
|
||||
@ -1008,12 +1032,6 @@ SMB.ComWrite.H.Len .EQ *-SMB.ComWrite.H
|
||||
SMB.ComWrite.T
|
||||
* DATA.....
|
||||
SMB.ComWrite.T.Len .EQ *-SMB.ComWrite.T
|
||||
*-------------------------------------- #$04
|
||||
SMB.ComClose.H .DA #3 WORD COUNT
|
||||
.BS 2 FID
|
||||
.HS 00000000 LastTimeModified
|
||||
.HS 0000 ByteCount
|
||||
SMB.ComClose.H.Len .EQ *-SMB.ComClose.H
|
||||
*--------------------------------------
|
||||
SMB.Trans2.H .DA #15 WORD COUNT
|
||||
.BS 2 TotalParamCount
|
||||
@ -1042,7 +1060,7 @@ SMB.Open2 .DA 0 TRANS2_OPEN2
|
||||
.BS 2 FileAttributes
|
||||
.HS 00000000 CreationTime
|
||||
.BS 2 OpenMode
|
||||
.HS 00020000 AllocationSize
|
||||
.HS 00000000 AllocationSize
|
||||
.HS 00000000000000000000 Reserved
|
||||
* .AZ "filename"
|
||||
SMB.Open2.Len .EQ *-SMB.Open2
|
||||
|
@ -91,7 +91,7 @@ WND.Setup
|
||||
sta RECT.SysClk+S.RECT.X1+1
|
||||
|
||||
lda DCB.GFX+S.DCB.GFX.W
|
||||
sec
|
||||
clc
|
||||
sbc #0
|
||||
sta RECT.SysClk+S.RECT.X2
|
||||
lda DCB.GFX+S.DCB.GFX.W
|
||||
|
@ -395,10 +395,12 @@ XRW.TestWP ldx A2L
|
||||
.LIST ON
|
||||
XRW.Write bit IO.D2.ReadProt,x (4) PREWRITE MODE
|
||||
.LIST OFF
|
||||
bit IO.D2.ReadMode,x (4)
|
||||
* bit IO.D2.ReadMode,x (4)
|
||||
|
||||
lda #$FF (2)
|
||||
|
||||
nop (2)
|
||||
|
||||
sta IO.D2.WriteMode,x (5) goto write mode
|
||||
ora IO.D2.WShift,x (4)
|
||||
|
||||
@ -835,12 +837,12 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
|
||||
|
||||
lda IO.D2.Ph0Off,y
|
||||
|
||||
ldy #0
|
||||
|
||||
.10 dey
|
||||
bne .10
|
||||
ldy A2L
|
||||
lda IO.D2.DrvOn,y
|
||||
|
||||
lda IO.D2.Ph0Off,x
|
||||
|
||||
lda IO.D2.DrvOn,y
|
||||
clc Exit wit CC (recalibrate)
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user