Kernel 0.9.1 : GUI, API & Driver......RECT & BitBLT

This commit is contained in:
Rémy GIBERT 2017-11-17 17:16:05 +01:00
parent 5240c1195e
commit ef62a7d69f
30 changed files with 376 additions and 267 deletions

Binary file not shown.

Binary file not shown.

View File

@ -23,9 +23,8 @@ CS.START cld
.DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1
.DA 0
.DA CS.END-CS.START
.DA DS.END-DS.START Data Segment to Allocate
.DA 0
.DA #16 SS
.DA #2 ZP
.DA 0
*--------------------------------------
* Relocation Table
@ -44,7 +43,7 @@ L.MSG2 .DA MSG2
.DA 0
*--------------------------------------
CS.INIT >LDYA L.LIBTCPIP
>SYSCALL LoadLibYA
>SYSCALL LoadLib.YA
sta hLIBTCPIP
lda (pPs)
@ -53,7 +52,8 @@ CS.INIT >LDYA L.LIBTCPIP
clc
rts
*--------------------------------------
CS.RUN >SYSCALL GetArgC
CS.RUN ldy #S.PS.ARGC
lda (pPs),y
cmp #1
bne .1
jmp CS.RUN.DUMP
@ -81,8 +81,8 @@ CS.RUN.QUERY jsr Init.Timeout
jsr Wait.TimeOut
bcs .9
>SYSCALL Sleep
>SYSCALL GetC
>SLEEP
>SYSCALL GetChar
bcs .1
cmp #3
beq .8
@ -106,7 +106,7 @@ CS.RUN.QUERY jsr Init.Timeout
.9 sec
rts
*--------------------------------------
CS.RUN.DUMP >LIBCALL hLIBTCPIP,LIBTCPIP.ARP.GetC.ACHE
CS.RUN.DUMP >LIBCALL hLIBTCPIP,LIBTCPIP.ARP.GETCACHE
>STYA ZPPTR1
>LDYA L.MSG0
@ -166,7 +166,7 @@ CS.DOEVENT lda (pEvent)
rts
*--------------------------------------
CS.QUIT lda hLIBTCPIP
>SYSCALL UnloadLibA
>SYSCALL UnloadLib.A
clc
rts
*--------------------------------------

View File

@ -136,7 +136,7 @@ CS.RUN >LDYA L.SEQ.DETECT
>SYSCALL PrintF.YA Send Query for term W & H
bcs .9
.1 >SYSCALL Sleep
.1 >SLEEP
>SYSCALL GetChar
bcs .1
@ -153,7 +153,7 @@ CS.RUN >LDYA L.SEQ.DETECT
lda (pData),y
bne .99
>SYSCALL Sleep
>SLEEP
>SYSCALL GetChar
bcs .2

View File

@ -84,7 +84,7 @@ CS.RUN.IPOK >SYSCALL GetArgC
>PUSHYA
>LIBCALL hLIBTCPIP,LIBTCPIP.HST.GETBYNAME
bcc CS.RUN.HOSTOK
>SYSCALL Sleep
>SLEEP
jsr Wait.Timeout
bcc .2
@ -183,7 +183,7 @@ CS.RUN.SEND.ECHO
jsr Init.Timeout
CS.RUN.WAIT.REPLY
>SYSCALL Sleep
>SLEEP
>SYSCALL GetC
bcs .1
cmp #3 Ctrl-C

View File

@ -88,7 +88,7 @@ CS.RUN jsr Init.Timeout
>LIBCALL hLIBTCPIP,LIBTCPIP.HST.GETBYNAME
bcc .2
>SYSCALL Sleep
>SLEEP
jsr Wait.Timeout
bcc .1
@ -122,7 +122,7 @@ CS.RUN jsr Init.Timeout
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Write
bcc .4
>SYSCALL Sleep
>SLEEP
jsr Wait.Timeout
bcc .3
.91 bra .99
@ -134,7 +134,7 @@ CS.RUN jsr Init.Timeout
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.ReadA
bcc .6
>SYSCALL Sleep
>SLEEP
jsr Wait.Timeout
bcc .5
bra .99

View File

@ -344,7 +344,7 @@ CS.RUN.DIR jsr CS.RUN.DIR.MSG
jsr CS.RUN.OVERWRITE.MSG
bcs CS.RUN.DIR.RTS
.1 >SYSCALL Sleep
.1 >SLEEP
>SYSCALL GetChar
bcs .1
cmp #3
@ -408,7 +408,7 @@ CS.RUN.FILE jsr CS.RUN.FILE.MSG
jsr CS.RUN.OVERWRITE.MSG
bcs .9
.1 >SYSCALL Sleep
.1 >SLEEP
>SYSCALL GetChar
bcs .1
cmp #3

View File

@ -42,7 +42,67 @@ LBUF.SetBounds2YA
LBUF.DrawAtY lda BASEL,y setup line Base Ptr
sta ZPBasePtr
lda BASEH,y
sta ZPBasePtr+1
sta ZPBasePtr+1
lda CB.Cache+S.CB.OP
bit #S.CB.OP.RESTORE
bne .8
bit #S.CB.OP.SAVE
beq .1
lda CB.Cache+S.CB.OP
.1 and #$f
tax
jmp (J.LBUF.DrawAtY,x)
.8 rts
*--------------------------------------
LBUF.DrawAtY.XOR
ldx LBUF.C1 x C1->C2
ldy COL.BANK,x
sta $C000,y
ldy COL.OFS,x
lda (ZPBasePtr),y Get C1
and LBUF.C1.MASK clear ONLY bits starting at X1 mod 7
sta GBYTE
lda LBUF.DATA,x get DATA bits
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
ora GBYTE
sta (ZPBasePtr),y update screen
inx
cpx LBUF.C2
beq .2 C1=C2, go setup C2
bcs .8 C1+1 > C2, we are done...
.1 ldy COL.BANK,x
sta $C000,y
ldy COL.OFS,x
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
sta (ZPBasePtr),y
inx
cpx LBUF.C2
bne .1
.2 ldy COL.BANK,x
sta $C000,y
ldy COL.OFS,x
lda (ZPBasePtr),y Get C2
and LBUF.C2.MASK clear ONLY bits ending at X2 mod 7
sta GBYTE
lda LBUF.DATA,x get DATA bits
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
ora GBYTE
sta (ZPBasePtr),y update screen
.8 rts
*--------------------------------------
LBUF.DrawAtY.SET
ldx LBUF.C1 x C1->C2
@ -90,40 +150,94 @@ LBUF.DrawAtY.SET
.8 rts
*--------------------------------------
LBUF.DrawAtY.ORA
ldy LBUF.C1 y C1->C2
ldx LBUF.C1 x C1->C2
.1 ldx COL.BANK,y
sta $C000,x
ldy COL.BANK,x
sta $C000,y
ldy COL.OFS,x
lda (ZPBasePtr),y
and LBUF.MASK,y
lda (ZPBasePtr),y Get C1
and LBUF.C1.MASK clear ONLY bits starting at X1 mod 7
sta GBYTE
lda LBUF.DATA,x get DATA bits
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
ora GBYTE
sta (ZPBasePtr),y update screen
ora LBUF.DATA,y
inx
cpx LBUF.C2
beq .2 C1=C2, go setup C2
bcs .8 C1+1 > C2, we are done...
.1 ldy COL.BANK,x
sta $C000,y
ldy COL.OFS,x
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
sta (ZPBasePtr),y
cpy LBUF.C2
iny
bcc .1
inx
cpx LBUF.C2
bne .1
rts
*--------------------------------------
LBUF.DrawAtY.XOR
ldy LBUF.C1 y C1->C2
.2 ldy COL.BANK,x
sta $C000,y
ldy COL.OFS,x
.1 ldx COL.BANK,y
sta $C000,x
lda (ZPBasePtr),y Get C2
and LBUF.C2.MASK clear ONLY bits ending at X2 mod 7
sta GBYTE
lda LBUF.DATA,x get DATA bits
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
ora GBYTE
sta (ZPBasePtr),y update screen
lda (ZPBasePtr),y
and LBUF.MASK,y
.8 rts
*--------------------------------------
LBUF.DrawAtY.AND
ldx LBUF.C1 x C1->C2
eor LBUF.DATA,y
ldy COL.BANK,x
sta $C000,y
ldy COL.OFS,x
lda (ZPBasePtr),y Get C1
and LBUF.C1.MASK clear ONLY bits starting at X1 mod 7
sta GBYTE
lda LBUF.DATA,x get DATA bits
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
ora GBYTE
sta (ZPBasePtr),y update screen
inx
cpx LBUF.C2
beq .2 C1=C2, go setup C2
bcs .8 C1+1 > C2, we are done...
.1 ldy COL.BANK,x
sta $C000,y
ldy COL.OFS,x
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
sta (ZPBasePtr),y
cpy LBUF.C2
iny
bcs .1
inx
cpx LBUF.C2
bne .1
rts
.2 ldy COL.BANK,x
sta $C000,y
ldy COL.OFS,x
lda (ZPBasePtr),y Get C2
and LBUF.C2.MASK clear ONLY bits ending at X2 mod 7
sta GBYTE
lda LBUF.DATA,x get DATA bits
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
ora GBYTE
sta (ZPBasePtr),y update screen
.8 rts
*--------------------------------------
MAN
SAVE /A2OSX.SRC/DRV/DHGR.DRV.S.LBUF

View File

@ -5,7 +5,7 @@ INC 1
AUTO 6
.LIST OFF
*--------------------------------------
* HLINE X1,X2 at Y1
* HLINE X1,X2 at Y1 (XOR,SET,ORA)
*--------------------------------------
HLINE lda CB.Cache+S.CB.MODE
@ -80,70 +80,79 @@ HLINE.C16 lda CB.Cache+S.CB.X1
rts
*--------------------------------------
* VLINE Y1,Y2 at X1
* VLINE Y1,Y2 at X1 (XOR,SET,ORA)
*--------------------------------------
VLINE lda CB.Cache+S.CB.OP
beq VLINE.OP0
VLINE lda CB.Cache+S.CB.MODE
cmp #S.CB.MODE.MONO
bne VLINE.C16
VLINE.XOR jsr VLINE.DIVMOD7
VLINE.MONO >LDYA CB.Cache+S.CB.X1
jsr DIVMOD7YA
tay
lda COL.OFS,y
sta GBYTE Save COL (DIV)
ldy XMOD7
lda Mono.Masks,y
sta .2+1
lda COL.BANK,y
tay
sta $C000,y Select proper BANK
ldy XCOL7
lda CB.Cache+S.CB.OP
* cmp #S.CB.OP.XOR
beq VLINE.MONO.XOR
ldx CB.Cache+S.CB.Y1
lda CB.Cache+S.CB.COLOR
bne VLINE.MONO.WHITE
.1 lda BASEL,x
VLINE.MONO.BLACK
ldy CB.Cache+S.CB.Y1
clc
.1 lda BASEL,y
adc GBYTE
sta ZPBasePtr
lda BASEH,x
lda BASEH,y
sta ZPBasePtr+1
lda (ZPBasePtr),y XOR
.2 eor #$ff
sta (ZPBasePtr),y
inx
cpx CB.Cache+S.CB.Y2
lda (ZPBasePtr)
and Mono.NMasks,x
sta (ZPBasePtr)
cpy CB.Cache+S.CB.Y2
iny
bcc .1
beq .1
rts
VLINE.OP0 lda CB.Cache+S.CB.MODE
dec
bne VLINE.C16
VLINE.MONO jsr VLINE.DIVMOD7
ldy XMOD7
lda Mono.NMasks,y includes And $7F for mono
sta .3+1
lda CB.Cache+S.CB.COLOR get color
beq .1
lda Mono.Masks,y
.1 sta .4+1
ldy XCOL7
ldx CB.Cache+S.CB.Y1
.2 lda BASEL,x
VLINE.MONO.WHITE
.1 lda BASEL,y
adc GBYTE
sta ZPBasePtr
lda BASEH,x
lda BASEH,y
sta ZPBasePtr+1
lda (ZPBasePtr),y
.3 and #$ff
.4 ora #$ff
sta (ZPBasePtr),y
lda (ZPBasePtr)
ora Mono.Masks,x
sta (ZPBasePtr)
cpy CB.Cache+S.CB.Y2
iny
bcc .1
inx
cpx CB.Cache+S.CB.Y2
bcc .2
beq .2
rts
VLINE.MONO.XOR
.1 lda BASEL,y
adc GBYTE
sta ZPBasePtr
lda BASEH,y
sta ZPBasePtr+1
lda (ZPBasePtr)
eor Mono.Masks,x
sta (ZPBasePtr)
cpy CB.Cache+S.CB.Y2
iny
bcc .1
rts
@ -177,6 +186,7 @@ VLINE.C16 lda CB.Cache+S.CB.X1
lda Color.Masks,x bits in 1st byte to light?
beq .10
and Color.Pixels,y apply color
sta GBYTE
@ -192,6 +202,7 @@ VLINE.C16 lda CB.Cache+S.CB.X1
lda Color.Masks,x
beq .11
and Color.Pixels,y apply color
sta GBYTE
@ -208,6 +219,7 @@ VLINE.C16 lda CB.Cache+S.CB.X1
lda Color.Masks,x
beq .12
and Color.Pixels,y apply color
sta GBYTE
@ -223,6 +235,7 @@ VLINE.C16 lda CB.Cache+S.CB.X1
lda Color.Masks,x
beq .13
and Color.Pixels,y apply color
sta GBYTE
@ -234,37 +247,6 @@ VLINE.C16 lda CB.Cache+S.CB.X1
sta (ZPBasePtr)
.13 rts
*--------------------------------------
VLINE.DIVMOD7 ldx CB.Cache+S.CB.X1+1 Get X HI byte....
lda DIV7.lo,x
sta .2+1
lda DIV7.hi,x
sta .2+2
lda MOD7.lo,x
sta .3+1
lda MOD7.hi,x
sta .3+2
lda DIV7.BASE,x
ldx CB.Cache+S.CB.X1 Get X LO byte....
clc
.2 adc $ffff,x DIV7 : x = X.LO, a = X DIV 7
sta XDIV7 save X DIV 7
tay
lsr
sta XCOL7
ldx COL.BANK,y
sta $C000,x
.3 lda $ffff,x MOD7 : x = X.LO, y = X MOD 7
sta XMOD7
rts
*--------------------------------------
MAN
SAVE /A2OSX.SRC/DRV/DHGR.DRV.S.LINE

View File

@ -6,8 +6,7 @@ AUTO 6
.LIST OFF
*--------------------------------------
* SETPIXEL
* In : YA = Ptr to CtrlBlk :
* 1 : OP (XOR only)
* 1 : OP (XOR,SET,ORA)
* 2 : Mode
* 3 : Color
* 4 : SrcX1
@ -17,60 +16,51 @@ SETPIXEL lda CB.Cache+S.CB.MODE
bit #S.CB.MODE.C16
bne SETPIXEL.C16
SETPIXEL.MONO ldx CB.Cache+S.CB.X1+1 Get X Hi byte....
SETPIXEL.MONO >LDYA CB.Cache+S.CB.X1
lda DIV7.lo,x
sta .1+1
lda DIV7.hi,x
sta .1+2
jsr DIVMOD7YA
tay
lda COL.OFS,y
phy
lda MOD7.lo,x
sta .2+1
lda MOD7.hi,x
sta .2+2
lda DIV7.BASE,x
ldx CB.Cache+S.CB.X1
clc
.1 adc $ffff,x DIV7 : x = X.LO, a = X DIV 7
pha save X DIV 7
lsr
ldy CB.Cache+S.CB.Y1
clc
adc BASEL,y setup line Base Ptr (A=Col)
adc BASEL,y
sta ZPBasePtr
lda BASEH,y
sta ZPBasePtr+1
ply
lda COL.BANK,y
tay
sta $c000,y
.2 ldy $ffff,x MOD7 : x = X.LO, y = X MOD 7
sta $C000,y Select proper BANK
lda CB.Cache+S.CB.OP
* cmp #S.CB.OP.XOR
beq SETPIXEL.MONO.XOR
bne .5
lda CB.Cache+S.CB.COLOR
bne SETPIXEL.MONO.WHITE
lda (ZPBasePtr) XOR
eor Mono.Masks,y y = mod 7
SETPIXEL.MONO.BLACK
lda (ZPBasePtr)
and Mono.NMasks,x
sta (ZPBasePtr)
rts
SETPIXEL.MONO.WHITE
lda (ZPBasePtr)
ora Mono.Masks,x
sta (ZPBasePtr)
rts
.5 lda (ZPBasePtr)
ldx CB.Cache+S.CB.COLOR get color
bne .6
and Mono.NMasks,y includes And $7F for mono
SETPIXEL.MONO.XOR
lda (ZPBasePtr)
eor Mono.Masks,x
sta (ZPBasePtr)
rts
.6 and #$7F switch back this byte to mono
ora Mono.Masks,y
sta (ZPBasePtr)
rts
SETPIXEL.C16 lda CB.Cache+S.CB.X1

View File

@ -6,6 +6,7 @@ AUTO 6
.LIST OFF
*--------------------------------------
* FILLRECT
* 1 : OP (XOR,SET,ORA)
* 2 : Mode
* 3 : Color
* 4 : SrcX1
@ -28,6 +29,37 @@ FILLRECT jsr HLINE
.8 rts
*--------------------------------------
* 4 : SrcX1
* 6 : SrcY1
* 8 : SrcX2
* 10 : SrcY2
* 18 : S.CB.DstPtr = Size in Bytes to save this RECT
*--------------------------------------
GETRECTBUFSIZE >LDYA CB.Cache+S.CB.X1
jsr DIVMOD7YA
sta GBYTE
>LDYA CB.Cache+S.CB.X2
jsr DIVMOD7YA
inc COL2 + 1
sec
sbc GBYTE (COL2+1)-COL1
tax
>LDYA CB.Cache+S.CB.Y1
jsr YAMultX
phy
ldy #S.CB.DstPtr+1
sta (ZPCmdPtr),y
pla
dey
sta (ZPCmdPtr),y
rts
*--------------------------------------
MAN
SAVE /A2OSX.SRC/DRV/DHGR.DRV.S.BLT
LOAD /A2OSX.SRC/DRV/DHGR.DRV.S

View File

@ -18,6 +18,7 @@ ZPBasePtr .EQ ZPDRV+2
ZPPalettePtr .EQ ZPDRV+4
ZPBMDataPtr .EQ ZPDRV+6
ZPBMMaskPtr .EQ ZPDRV+8
ZPBMSavePtr .EQ ZPDRV+10
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
@ -74,7 +75,12 @@ J.Cmds .DA SETPIXEL
.DA VLINE
.DA FILLRECT
.DA BITBLT
.DA GETRECTBUFSIZE
*--------------------------------------
J.LBUF.DrawAtY .DA LBUF.DrawAtY.XOR
.DA LBUF.DrawAtY.SET
.DA LBUF.DrawAtY.ORA
.DA LBUF.DrawAtY.AND
L.DSTAT .DA DSTAT
L.DIV7.0 .DA DIV7.0
.DA DIV7.256
@ -168,24 +174,23 @@ WRITE >STYA ZPCmdPtr
* X = MOD
*--------------------------------------
DIVMOD7YA dec
beq DIVMOD7Y1
bpl DIVMOD7Y2
DIVMOD7Y0 lda DIV7.0,y
ldx MOD7.0,y
rts
DIVMOD7Y1 lda DIV7.256,y
bmi .2
clc
beq .1
lda DIV7.512,y
adc #$49
ldx MOD7.512,y
rts
.1 lda DIV7.256,y
adc #$24
ldx MOD7.256,y
rts
DIVMOD7Y2 lda DIV7.512,y
clc
adc #$49
ldx MOD7.512,y
rts
.2 lda DIV7.0,y
ldx MOD7.0,y
rts
*--------------------------------------
* IN:
* Y,A = num1 (16)
@ -234,7 +239,8 @@ CB.CmdLen .DA S.CB.Y1+1 SETPIXEL
.DA S.CB.X2+1 HLINE
.DA S.CB.Y2+1 VLINE
.DA S.CB.Y2+1 FILLRECT
.DA S.CB.DstPtr+1 BITBLT
.DA S.CB.DstPtr+1 BITBLT
.DA S.CB.DstPtr+1 GETRECTBUFSIZE
*--------------------------------------
CB.Cache .BS S.CB
BM.Cache .BS S.BM
@ -253,9 +259,6 @@ LBUF.C2.DATA .BS 1
LBUF.MASK .BS 80
LBUF.DATA .BS 80
*--------------------------------------
XDIV7 .BS 1
XMOD7 .BS 1
XCOL7 .BS 1
GBYTE .BS 1
GWORD .BS 2
*--------------------------------------

View File

@ -32,6 +32,7 @@ A2osX.ROMCALL .EQ $BD09
A2osX.BADCALL .EQ $BD0C
*--------------------------------------
pDevJmp .EQ $BD10
A2osx.SLEEP .EQ $BD13
*--------------------------------------
* $BEE0->$BEEF : Public Variables
*--------------------------------------
@ -214,7 +215,7 @@ SYS.GetMem0.YA .EQ $EA
SYS.NewStr.YA .EQ $EC
SYS.GetMemStat.YA .EQ $EE
SYS.Sleep .EQ $F0
* .EQ $F0
* .EQ $F2
* .EQ $F4
* .EQ $F6

View File

@ -97,7 +97,13 @@ K.MLI.PATH .EQ $03B0 64+1 -> $03F0
* Main/Aux $800 -> $BFF : System Screen
*--------------------------------------
PS.Table.PID .EQ $0C00 K.PS.MAX
PS.Table.hMem .EQ $0C00+K.PS.MAX
PS.Table.hMem .EQ $0C20 K.PS.MAX
*--------------------------------------
Evt.Table .EQ $0C40 K.EVT.MAX*S.EVT.SIZE=8*8=64b
*--------------------------------------
Flt.Table .EQ $0C80 K.FLT.MAX*S.FLT.SIZE=4*32=128b
*--------------------------------------
K.IOBuf256 .EQ $0D00 Main
K.Buf256 .EQ $0E00 Main
*--------------------------------------
K.STACKTOP .EQ $0F20 down to $0f00
@ -107,11 +113,9 @@ K.STACKTOP .EQ $0F20 down to $0f00
Z80STACK .EQ $0FFF (0FFFFh) Down to $0F20
Z80JMP .EQ $1000 (00000h) Up To $10FF
*--------------------------------------
Flt.Table .EQ $1100 K.FLT.MAX*S.FLT.SIZE=8*32=128b
* free $1100->15FF = $500
*--------------------------------------
Evt.Table .EQ $1180 K.EVT.MAX*S.EVT.SIZE=16*8=128b
*--------------------------------------
Dev.Table .EQ $1200 K.DEV.MAX*S.DEV.SIZE=32*16=512b
Dev.Table .EQ $1600 K.DEV.MAX*S.DEV=32*16=512b
*--------------------------------------
* MemMgr : $1800->$1FFF MAIN/AUX (2 kBytes)
*--------------------------------------

View File

@ -13,13 +13,15 @@ S.CB.CMD.HLINE .EQ 4
S.CB.CMD.VLINE .EQ 6
S.CB.CMD.FILLRECT .EQ 8
S.CB.CMD.BITBLT .EQ 10
S.CB.CMD.DRAWLINE .EQ 12
S.CB.CMD.GETRECTBUFSIZE .EQ 12
S.CB.CMD.DRAWLINE .EQ 14
S.CB.OP .EQ 1
S.CB.OP.XOR .EQ %00000000 screen EOR bitmap -> Screen
S.CB.OP.SET .EQ %00000001 replace screen with bitmap
S.CB.OP.ORA .EQ %00000010 combine screen & bitmap -> Screen
S.CB.OP.SET .EQ %00000010 replace screen with bitmap
S.CB.OP.ORA .EQ %00000100 combine screen & bitmap -> Screen
S.CB.OP.AND .EQ %00000110 Apply BitMap mask before painting
S.CB.OP.SAVE .EQ %00010000 Save Screen to DstPtr before painting
S.CB.OP.AND .EQ %00100000 Apply BitMap mask before painting
S.CB.OP.RESTORE .EQ %00100000 Restore Screen From DstPtr before painting
S.CB.OP.COLOR .EQ %01000000 Assume BitMap is COLOR
S.CB.MODE .EQ 2
S.CB.MODE.MONO .EQ %00000001 b/w (1 bit/pixel)
@ -55,6 +57,7 @@ CUR.T.WAIT .EQ 4
CUR.T.RESIZEX .EQ 6
CUR.T.RESIZEY .EQ 8
CUR.T.RESIZEXY .EQ 10
CUT.T.TEXT .EQ 12
*--------------------------------------
S.CUR.HotPointX .EQ 0
S.CUR.HotPointY .EQ 1
@ -81,7 +84,6 @@ LIBGUI.SetCursor.A .EQ 10
LIBGUI.SetCursorPos .EQ 12
LIBGUI.HideCursor .EQ 14
LIBGUI.ShowCursor .EQ 16
LIBGUI.DrawLine .EQ 18
*--------------------------------------
MAN
SAVE /A2OSX.BUILD/INC/LIBGUI.I

View File

@ -31,12 +31,12 @@ LIBTCPIP.PULSEA .EQ 10
LIBTCPIP.ARP.Clear .EQ 12
LIBTCPIP.ARP.Query .EQ 14
LIBTCPIP.ARP.Add .EQ 16
LIBTCPIP.ARP.GetC.Ache .EQ 18
LIBTCPIP.ARP.GetCache .EQ 18
LIBTCPIP.DNS.Clear .EQ 20
LIBTCPIP.DNS.Query .EQ 22
LIBTCPIP.DNS.Add .EQ 24
LIBTCPIP.DNS.GetC.Ache .EQ 26
LIBTCPIP.DNS.GetCache .EQ 26
LIBTCPIP.HST.GetByName .EQ 28
LIBTCPIP.HST.GetByAddr .EQ 30

View File

@ -19,6 +19,10 @@ AUTO 6
.EM
*--------------------------------------
* SYSCALLs Macros
*--------------------------------------
.MA SLEEP
jsr A2osX.SLEEP
.EM
*--------------------------------------
.MA SYSCALL
ldx #SYS.]1

View File

@ -51,8 +51,8 @@ CS.START cld
*--------------------------------------
.1 .DA LIB.LOAD
.DA LIB.UNLOAD
.DA InitGUI.A
J.Cmds .DA CloseGUI J.Cmds-12 !!!
J.Cmds .DA InitGUI.A
.DA CloseGUI J.Cmds-12 !!!
.DA Draw
.DA SetCursor.A
.DA SetCursorPos

View File

@ -131,7 +131,7 @@ CS.RUN.SDISC ldy #hSocket
.1 lda #S.IPCFG.STATUS.SDISC
sta IPCFG
CS.RUN.ROFFER >SYSCALL Sleep
CS.RUN.ROFFER >SLEEP
jsr CS.RUN.SKT.RCVD
bcc .1
@ -167,7 +167,7 @@ CS.RUN.SREQ ldx #3
lda #S.IPCFG.STATUS.SREQ
sta IPCFG
CS.RUN.RACK >SYSCALL Sleep
CS.RUN.RACK >SLEEP
jsr CS.RUN.SKT.RCVD
bcc .1

View File

@ -83,13 +83,13 @@ CS.INIT ldy #S.PS.ARGC
sec
.9 rts
*--------------------------------------
CS.RUN >SYSCALL Sleep
CS.RUN >SLEEP
>SYSCALL GetChar
bcs CS.RUN
.11
* jsr PRINTA2
>SYSCALL Sleep
>SLEEP
>SYSCALL GetChar
bcc .11
@ -112,7 +112,7 @@ CS.RUN >SYSCALL Sleep
CS.RUN.LOOP
.1 >SYSCALL Sleep
.1 >SLEEP
>SYSCALL GetChar
bcs .4
@ -140,14 +140,14 @@ CS.RUN.LOOP
.8 clc
rts
*--------------------------------------
CS.RUN.IACMODE >SYSCALL Sleep Wait for IAC VERB (or SB)
CS.RUN.IACMODE >SLEEP Wait for IAC VERB (or SB)
>SYSCALL GetChar
bcs CS.RUN.IACMODE
>STA.G IAC.VERB
* jsr PRINTA
.1 >SYSCALL Sleep Wait for IAC OPT
.1 >SLEEP Wait for IAC OPT
>SYSCALL GetChar
bcs .1
@ -164,7 +164,7 @@ CS.RUN.IACVERB
jmp CS.RUN.LOOP
*--------------------------------------
CS.RUN.IACSB
.1 >SYSCALL Sleep
.1 >SLEEP
>SYSCALL GetChar
bcs .1
@ -175,7 +175,7 @@ CS.RUN.IACSB
lda #0
sta (pData) reset IAC.SB.DATA
.2 >SYSCALL Sleep
.2 >SLEEP
>SYSCALL GetChar
bcs .2
@ -198,7 +198,7 @@ CS.RUN.IACSB
sta (pData),y
bra .2
.4 >SYSCALL Sleep
.4 >SLEEP
>SYSCALL GetChar
bcs .4

View File

@ -179,6 +179,9 @@ CS.QUIT clc
*--------------------------------------
Destop.Paint >PUSHW L.Rect.CB
>LIBCALL hLIBGUI,LIBGUI.Draw
>PUSHW L.DrawLines.CB
>LIBCALL hLIBGUI,LIBGUI.Draw
lda #S.CB.MODE.C16
sta SetPixel.Mode
@ -222,12 +225,7 @@ Destop.Paint >PUSHW L.Rect.CB
cmp #16
bne .1
.4
>PUSHW L.DrawLines.CB
>LIBCALL hLIBGUI,LIBGUI.Draw
rts
.4 rts
*--------------------------------------
*--------------------------------------
*--------------------------------------
@ -292,14 +290,6 @@ Rect.CB .DA #S.CB.CMD.FILLRECT
.DA #0
*--------------------------------------
SetPixel.CB .DA #S.CB.CMD.SETPIXEL
SetPixel.OP .BS 1
SetPixel.Mode .BS 1
SetPixel.Color .BS 1
SetPixel.X .BS 2
SetPixel.Y .BS 2
.DA #0
*--------------------------------------
DrawLines.CB .DA #S.CB.CMD.DRAWLINE
.DA #S.CB.OP.ORA
.DA #S.CB.MODE.C16
@ -337,7 +327,7 @@ DrawLines.CB .DA #S.CB.CMD.DRAWLINE
.DA 191
.DA #S.CB.CMD.DRAWLINE
.DA #S.CB.OP.ORA
.DA #S.CB.OP.SET
.DA #S.CB.MODE.MONO
.DA #1
.DA 28
@ -346,7 +336,7 @@ DrawLines.CB .DA #S.CB.CMD.DRAWLINE
.DA 191
.DA #S.CB.CMD.DRAWLINE
.DA #S.CB.OP.ORA
.DA #S.CB.OP.SET
.DA #S.CB.MODE.MONO
.DA #1
.DA 84
@ -355,7 +345,7 @@ DrawLines.CB .DA #S.CB.CMD.DRAWLINE
.DA 191
.DA #S.CB.CMD.DRAWLINE
.DA #S.CB.OP.ORA
.DA #S.CB.OP.XOR
.DA #S.CB.MODE.MONO
.DA #1
.DA 0
@ -365,6 +355,14 @@ DrawLines.CB .DA #S.CB.CMD.DRAWLINE
.DA #0
*--------------------------------------
SetPixel.CB .DA #S.CB.CMD.SETPIXEL
SetPixel.OP .BS 1
SetPixel.Mode .BS 1
SetPixel.Color .BS 1
SetPixel.X .BS 2
SetPixel.Y .BS 2
.DA #0
*--------------------------------------
.DUMMY
.OR 0
DS.START

View File

@ -69,7 +69,7 @@ CS.RUN jsr Init.Timeout
lda (ZPIPCfgPtr) Configured ?
bmi CS.RUN.INIT
>SYSCALL Sleep
>SLEEP
jsr Wait.Timeout
bcc .1
>SYSCALL GetC
@ -102,7 +102,7 @@ CS.RUN.INIT ldx #3
>LDYA L.MSG.INITOK
>SYSCALL PrintF.YA
.2 >SYSCALL Sleep
.2 >SLEEP
jsr CS.RUN.SERVER
bcs CS.RUN.ERR

View File

@ -96,7 +96,7 @@ CS.RUN.REPaint >LDYA L.MSG.FCONF
>LDYA ZPCfgPtr
jsr CS.RUN.DumpConfYA
CS.RUN.Loop >SYSCALL Sleep
CS.RUN.Loop >SLEEP
>SYSCALL GetChar
bcs CS.RUN.Loop

View File

@ -58,7 +58,7 @@ CS.RUN lda #0
lda #0 Echo all caracters
jsr INPUT.RESET
.1 >SYSCALL Sleep
.1 >SLEEP
>SYSCALL GetChar
bcs .1 no char
jsr INPUT.CHARIN
@ -72,7 +72,7 @@ CS.RUN lda #0
lda #'*'
jsr INPUT.RESET
.2 >SYSCALL Sleep
.2 >SLEEP
>SYSCALL GetChar
bcs .2 no char
jsr INPUT.CHARIN

View File

@ -68,7 +68,7 @@ CS.RUN jsr Init.Timeout
lda (ZPIPCfgPtr) Configured ?
bmi CS.RUN.INIT
>SYSCALL Sleep
>SLEEP
jsr Wait.Timeout
bcc .1
@ -96,7 +96,7 @@ CS.RUN.INIT ldx #3
>LDYA L.MSG.INITOK
>SYSCALL PrintF.YA
.11 >SYSCALL Sleep
.11 >SLEEP
ldy #bCTRLC
lda (pData),y
bmi .99

View File

@ -174,7 +174,7 @@ CS.RUN >LDA.G bReadMode READ Command ?
.12 jsr CL.PrintPrompt
bcs .9
.1 >SYSCALL Sleep
.1 >SLEEP
>SYSCALL GetChar
bcs .1 no char
@ -211,7 +211,7 @@ CS.RUN >LDA.G bReadMode READ Command ?
CS.RUN.READ lda #0 reset Buffer
sta (ZPCMDBuf)
.1 >SYSCALL Sleep
.1 >SLEEP
>SYSCALL GetChar
bcs .1 no char

View File

@ -69,7 +69,7 @@ CS.RUN jsr Init.Timeout
lda (ZPIPCfgPtr) Configured ?
bmi CS.RUN.INIT
>SYSCALL Sleep
>SLEEP
jsr Wait.Timeout
bcc .1
>SYSCALL GetC
@ -102,7 +102,7 @@ CS.RUN.INIT ldx #3
>LDYA L.MSG.INITOK
>SYSCALL PrintF.YA
.2 >SYSCALL Sleep
.2 >SLEEP
jsr CS.RUN.SERVER
bcs CS.RUN.ERR

View File

@ -117,21 +117,7 @@ CORE.Events jsr CORE.GetEvents
lda CORE.EvtCount
bne .1
*--------------------------------------
.4 lda A2osX.ASCREEN
cmp #2 is SYS active?
bne .6
ldx CORE.CPULoadI
lda CORE.CPULoadC,x
sta SYS.BASL0+38
dex
bpl .5
ldx #3
.5 stx CORE.CPULoadI
.6 bit OPENAPPLE
.4 bit OPENAPPLE
bpl .8
lda KBD
@ -429,28 +415,6 @@ CORE.PSSelect0 >LDYAI CORE.S.PS0 Select PS0
>LDYA CORE.S.PS0+S.PS.ZP+4
>STYA pStack
rts
*/--------------------------------------
* # Sleep
* Make current process suspend until next RUN
* ## In :
* (none)
* ## Out :
* (none)
*\--------------------------------------
K.Sleep pla get PC LO
sec
sbc pCode
ldy #S.PS.PC
sta (pPs),y
pla get PC HI
sbc pCode+1
iny
sta (pPs),y
lda (pPs)
ora #S.PS.F.SLEEP
sta (pPs)
*--------------------------------------
CORE.PSLeave ldy #S.PS.ZP+23
ldx #23
@ -505,8 +469,6 @@ CORE.TickPer10t .BS 1
CORE.TickSec .BS 1
CORE.Tick10t .BS 1
*--------------------------------------
CORE.CPULoadI .BS 1
CORE.CPULoadC .AS -"/-\|"
CORE.Counter .BS 1
CORE.PSCount .DA #0
CORE.LastPSID .DA #0

View File

@ -43,6 +43,23 @@ AUTO 6
rts
*--------------------------------------
jmp (pDev) pDevJmp
*--------------------------------------
pla get PC LO
sec
sbc pCode
ldy #S.PS.PC
sta (pPs),y
pla get PC HI
sbc pCode+1
iny
sta (pPs),y
lda (pPs)
ora #S.PS.F.SLEEP
sta (pPs)
clc
rts
*--------------------------------------
* *** MUST BE REINTRANT ***
*--------------------------------------

View File

@ -147,7 +147,7 @@ K.SYSCALL.JMP .DA 0 $00
.DA K.NewStr.YA
.DA K.GetMemStat.YA
*--------------------------------------
.DA K.Sleep $F0
.DA 0 $F0
.DA 0
.DA 0
.DA 0