CC:SWITCH/CASE

ASM:added \%
KERNEL:BUGFIX in DevMgr
LIBGUI:New API
This commit is contained in:
burniouf 2022-10-18 07:56:59 +02:00
parent 8e2918de4d
commit dad22dfc30
37 changed files with 2580 additions and 1906 deletions

Binary file not shown.

Binary file not shown.

View File

@ -525,10 +525,10 @@ T.LI .PS "ON"
.HS 00
*--------------------------------------
DIR.EscChars .AS "abefnrtv"
.HS 5C27223F \'"?
.HS 5C27223F25 \'"?%
DIR.EscChars.L .EQ *-DIR.EscChars
DIR.EscCodes .HS 07081B0C0A0D090B
.HS 5C27223F
.HS 5C27223F25
*---------------------------------------
SRC.MOD.RESERVED .PS "#/^<>"
SRC.EXP.RESERVED .PS "^!|&<=>+-*/"

View File

@ -142,7 +142,7 @@ CORE.CompileLine
jsr CORE.GetNCharNB Skip '}'
jsr CC.STMT.CPStmt.END
jsr STMT.CPStmt.END
bcs .9
bra CORE.CompileLine
@ -152,7 +152,7 @@ CORE.CompileLine
jsr CORE.GetNCharNB Skip ';'
jsr CC.STMT.Stmt.END
jsr STMT.Stmt.END
bcs .9
bra CORE.CompileLine
@ -181,7 +181,7 @@ CORE.CompileStmt
.1 >LDYA L.CC.SCSPEC
jsr CC.LookupID
bcs .2
jmp (J.CC.SCSPEC,x)
.2 >LDYA L.CC.TYPEQUAL
@ -513,35 +513,40 @@ CC.CheckCharNB cmp #C.SPACE
clc
.9 rts
*--------------------------------------
* https://riptutorial.com/c/example/16255/character-literals
* 'c', '\abefnrtv', '\123', '\xFF'
*--------------------------------------
CC.GetNextCharEsc
jsr CC.GetNextChar
bcs .9
cmp #'\'
bne .8
jsr CC.GetNextChar
bcs .8
ldx #CC.EscChars.Cnt-1
.1 cmp CC.EscChars,x
beq .6
dex
bpl .1
* TODO : \123, \xFF
sec
rts
.6 lda CC.EscCodes,x
bit .9
clc
rts
.8 clc
clv
.9 rts
.9 rts
*--------------------------------------
CC.GetNextChar inc ZPLineBufPtr
bne CC.GetChar

View File

@ -272,6 +272,35 @@ EXP.BOPS bit #SYM.Q.PPPOINTER
clc
rts
*--------------------------------------
EXP.GetIntegral jsr CC.GetCharNB
cmp #'''
bne .1
jsr CC.GetNextCharEsc
bcs .9
tay
jsr CC.GetNextChar
bcs .9
cmp #'''
bne .9
jsr CORE.GetNCharNB skip '
lda #0 Y,A = integral
clc
rts
.1 jsr CC.IsDigit10
bcc EXP.IntConst
.9 lda #E.CSYN
* sec
rts
*--------------------------------------
EXP.IntConst >PUSHW ZPLineBufPtr
>PUSHWI ZPLineBufPtr
>PUSHBI 10
@ -283,7 +312,7 @@ EXP.IntConst >PUSHW ZPLineBufPtr
>PULLA
inc pStack
inc pStack
inc pStack Y,A = integral
rts
*--------------------------------------
@ -346,9 +375,6 @@ EXP.GetNum cpy #SYM.T.FLOAT
* clc
.99 rts
*--------------------------------------
* https://riptutorial.com/c/example/16255/character-literals
* 'c', '\n', '\123', '\xAB'
*--------------------------------------
EXP.GetChar ldy ZPPtr2+1
bne .9
@ -373,7 +399,6 @@ EXP.GetChar ldy ZPPtr2+1
jsr CORE.GetNCharNB skip '
clc
rts

View File

@ -7,7 +7,7 @@ F.Decl stz LocalPtr
bcs .99
ldx #$80 CPStmt.fDef state
jsr CC.STMT.CPStmt.NEW
jsr STMT.CPStmt.NEW
bcs .99
jsr SYM.NewScope
@ -62,10 +62,10 @@ F.Decl stz LocalPtr
bne .7
jsr SYM.FreeScope discard local scope
lda CStackPtr
clc
adc #8
adc #CPS
sta CStackPtr discard this CPStmt + T/Q
stz LocalPtr reset for DEBUG Message
@ -129,9 +129,9 @@ F.DeclGetTQ lda (ZPLineBufPtr)
lda (ZPLookupSymPtr),y
cmp #SYM.SC.TYPEDEF
bne .9
jmp TYPE.GetTQInYA2
.6 >LDYA L.CC.TYPEQUAL
jsr CC.LookupID
bcs .9

View File

@ -3,7 +3,7 @@ NEW
*--------------------------------------
* Built in Keywords
*--------------------------------------
KW.IF jsr KW.BEGIN00
KW.IF jsr STMT.NewCPS00
bcs .99
jsr CC.GetCharNB
@ -34,7 +34,7 @@ KW.IF jsr KW.BEGIN00
cmp #')'
bne .9
jmp KW.STMT
jmp STMT.SetCPSType
.9 lda #E.CSYN
sec
@ -51,7 +51,7 @@ KW.IF.END jsr CORE.GetCharNBNL
bcc .2
.1 lda #'E' define ELSE Label
jsr KW.NewLabel
jsr STMT.NewLabelA
bcs .99
clv pop context
@ -66,16 +66,14 @@ KW.IF.END jsr CORE.GetCharNBNL
bcs .99
lda #'E' define ELSE Label
jsr KW.NewLabel
jsr STMT.NewLabelA
bcs .99
inc CStackPtr pop ; or }
lda #4 replace IF by ELSE keyword
lda #KW.ELSE.ID replace IF by ELSE keyword
ldy CStackPtr
sta (ZPCCStack),y
jsr KW.STMT
jsr STMT.SetCPSType
bcs .99
bit .99 set V : DONT pop context
@ -90,13 +88,13 @@ KW.ELSE lda #E.CSYN illegal
rts
*--------------------------------------
KW.ELSE.END lda #'X' define EXIT Label
jsr KW.NewLabel
jsr STMT.NewLabelA
bcs .99
clv pop context
.99 rts
*--------------------------------------
KW.WHILE jsr KW.BEGIN00
KW.WHILE jsr STMT.NewCPS00
bcs .99
lda #'C' define CONT Label
@ -131,7 +129,7 @@ KW.WHILE jsr KW.BEGIN00
cmp #')'
bne .9
jmp KW.STMT
jmp STMT.SetCPSType
.9 lda #E.CSYN
sec
@ -142,7 +140,7 @@ KW.WHILE.END >LDYA L.PCC.SLEEP
bcs .99
lda #'C'
jsr KW.GetLabel
jsr STMT.GetLabelA
bcs .99
lda #$4C
@ -150,21 +148,21 @@ KW.WHILE.END >LDYA L.PCC.SLEEP
bcs .99
lda #'B' define BREAK Label
jsr KW.NewLabel
jsr STMT.NewLabelA
bcs .99
clv pop context
.99 rts
*--------------------------------------
KW.DO jsr KW.BEGIN00
KW.DO jsr STMT.NewCPS00
bcs .99
lda #'C' define CONT Label
jsr SYM.NewA
bcs .99
jmp KW.STMT
jmp STMT.SetCPSType
.99 rts
*--------------------------------------
@ -187,7 +185,7 @@ KW.DO.END >LDYA L.CC.KW2.DO Check allowed KW for DO....
jsr KW.TestnZero
lda #'C'
jsr KW.GetLabel
jsr STMT.GetLabelA
bcs .99
lda #$4C emit JMP cont
@ -195,7 +193,7 @@ KW.DO.END >LDYA L.CC.KW2.DO Check allowed KW for DO....
bcs .99
lda #'B' define BREAK Label
jsr KW.NewLabel
jsr STMT.NewLabelA
bcs .99
jsr CC.GetCharNB
@ -237,7 +235,7 @@ KW.FOR jsr CC.GetCharNB
cmp #'('
bne .29
jsr KW.BEGIN00
jsr STMT.NewCPS00
bcs .29
jsr CORE.GetNCharNB skip '('
@ -325,7 +323,7 @@ KW.FOR jsr CC.GetCharNB
jsr SYM.NewA
bcs .99
jmp KW.STMT
jmp STMT.SetCPSType
.9 lda #E.CSYN
sec
@ -337,7 +335,7 @@ KW.FOR.END lda #$60
bcs .99
lda #'B' define BREAK Label
jsr KW.NewLabel
jsr STMT.NewLabelA
bcs .99
clv pop context
@ -362,21 +360,27 @@ KW.SWITCH jsr CC.GetCharNB
cpy #SYM.T.UCHAR
bcc .97
cpy #SYM.T.FLOAT
cpy #SYM.T.ULONG
bcs .97
phy
tya
jsr CC.Push push integral type
ply
cpy #SYM.T.SINT+1
bcs .1
>LDYA L.PCC.8to16 make char an int
jsr CODE.EmitPCC
bcs .99
lda CC.TYPESIZE-1,y
.1 >LDYAI 256
>SYSCALL GetMem
bcs .99
txa
jsr CC.Push push CPS.hMEM
jsr CC.Push push SizeOf(type)
lda #0
jsr CC.Push push CPS.Ptr
bcs .99
jsr KW.BEGIN
jsr STMT.NewCPS
bcs .99
jsr CC.GetCharNB
@ -385,7 +389,15 @@ KW.SWITCH jsr CC.GetCharNB
cmp #')'
bne .98
jmp KW.STMT
lda #'J'
jsr STMT.LookupLabelA
bcs .99
lda #$4C emit JMP JmpTable
jsr CODE.TOABSYX
bcs .99
jmp STMT.SetCPSType
.97 lda #E.TMISMATCH
sec
@ -393,58 +405,169 @@ KW.SWITCH jsr CC.GetCharNB
.98 lda #E.CSYN
sec
.99 rts
.99
KW.SWITCH.RTS rts
*--------------------------------------
KW.SWITCH.END
lda #'B' define BREAK Label
jsr KW.NewLabel
KW.SWITCH.END lda #'J' define JMP Label
jsr STMT.NewLabelA
bcs KW.SWITCH.RTS
lda CStackPtr
clc
adc #CPS.hMEM
tay
lda (ZPCCStack),y
>SYSCALL GetMemPtr
>STYA ZPPtr1
lda CStackPtr
clc
adc #CPS.Ptr
tay
lda (ZPCCStack),y
sta ZPPtr2+1
stz ZPPtr2
.1 ldy ZPPtr2
cpy ZPPtr2+1
beq .2
lda (ZPPtr1),y
pha
iny
lda (ZPPtr1),y
tax
pla
jsr CODE.LDAXI
bcs .99
>LDYA L.PCC.JmpOnYA
jsr CODE.EmitPCC
bcs .99
ldy ZPPtr2
iny
iny
lda (ZPPtr1),y
tax
iny
lda (ZPPtr1),y
iny
sty ZPPtr2
tay
lda #$4C emit JMP Case ...
jsr CODE.TOABSYX
bcs .99
bra .1
.2 >LDYA L.PCC.Pop16
jsr CODE.EmitPCC
bcs .99
lda #'D'
jsr STMT.LookupLabelA
bcs .3
lda #$4C emit JMP Default
jsr CODE.TOABSYX
bcs .99
.3 lda #'B' define BREAK Label
jsr STMT.NewLabelA
bcs .99
lda CStackPtr
clc
adc #CPS.hMEM
tay
lda (ZPCCStack),y
>SYSCALL FreeMem
clv pop context
.99 rts
*--------------------------------------
KW.CASE ldy CStackPtr
beq .9
beq .98
iny skip ; or }
lda (ZPCCStack),y
cmp #10 SWITCH ??
bne .9
cmp #KW.SWITCH.ID SWITCH ??
bne .98
tya
clc
adc #CPS.hMEM
tay
lda (ZPCCStack),y
>SYSCALL GetMemPtr
>STYA ZPPtr1
jsr EXP.GetIntegral
bcs .99
>STYA ZPPtr2
lda CStackPtr
clc
adc #7
adc #CPS.Ptr
tay
lda (ZPCCStack),y
tay
lda (ZPCCStack),y type
tay
lda #0 for integral type
lda ZPPtr2
sta (ZPPtr1),y
iny
lda ZPPtr2+1
sta (ZPPtr1),y
iny
jsr EXP.Eval
bcs .99
lda ZPCCCode
sta (ZPPtr1),y
iny
lda ZPCCCode+1
sta (ZPPtr1),y
iny
beq .97
phy
lda CStackPtr
clc
adc #CPS.Ptr
tay
pla
sta (ZPCCStack),y
jsr CC.GetCharNB
bcs .9
bcs .98
cmp #':'
bne .9
bne .98
jsr CORE.GetNCharNB skip ':'
clc
rts
.9 lda #E.CSYN
.97 lda #E.BUF
sec
rts
.98 lda #E.CSYN
sec
.99 rts
*--------------------------------------
KW.DEFAULT ldy CStackPtr
beq .9
iny skip ; or }
lda (ZPCCStack),y
cmp #10 SWITCH ??
cmp #KW.SWITCH.ID
bne .9
jsr CC.GetCharNB
@ -455,8 +578,8 @@ KW.DEFAULT ldy CStackPtr
jsr CORE.GetNCharNB skip ':'
clc
rts
lda #'D' define DEFAULT Label
jmp STMT.NewLabelA
.9 lda #E.CSYN
sec
@ -464,7 +587,7 @@ KW.DEFAULT ldy CStackPtr
*--------------------------------------
KW.BREAK lda #'B'
jsr KW.LookupLabel
jsr STMT.LookupLabelA
bcs .9
lda #$4C emit JMP break
@ -476,7 +599,7 @@ KW.BREAK lda #'B'
*--------------------------------------
KW.CONTINUE lda #'C'
jsr KW.LookupLabel
jsr STMT.LookupLabelA
bcs .9
lda #$4C emit JMP cont
@ -489,13 +612,12 @@ KW.CONTINUE lda #'C'
KW.RETURN ldy CStackPtr
beq .9
.1 iny skip ; or }
lda (ZPCCStack),y
.1 lda (ZPCCStack),y CPS.KW
bmi .7 f()
tya
clc
adc #5 skip CPStmt (6 bytes)
adc #CPS skip CPStmt (6 bytes)
tay
bcc .1
@ -503,21 +625,18 @@ KW.RETURN ldy CStackPtr
sec
.99 rts
.7 iny skip bState
iny skip Locals
iny
iny skip CPSID
iny get SYM.T
.7 tya
clc
adc #CPS.T
tay
lda (ZPCCStack),y
pha
iny get SYM.Q
iny get CPS.Q
lda (ZPCCStack),y
ply
ply T
jsr EXP.Eval
bcs .99
@ -535,135 +654,6 @@ KW.SIZEOF
sec
rts
*--------------------------------------
KW.BEGIN00 lda #0
jsr CC.Push no T/Q
bcs KW.BEGIN.RTS
jsr CC.Push
bcs KW.BEGIN.RTS
KW.BEGIN jsr SYM.NewCPSID
bcs .99
>LDA.G CC.CPSPFX+3
jsr CC.Push
bcs .99
>LDA.G CC.CPSPFX+2
jsr CC.Push
bcs .99
lda LocalPtr Locals
jsr CC.Push
bcs .99
lda #0 bState
jsr CC.Push
bcs .99
>LDA.G CC.CmdSave
jmp CC.Push
.99
KW.BEGIN.RTS rts
*--------------------------------------
KW.STMT jsr CORE.GetNCharNBNL
bcs .9
cmp #'{'
bne .1
jsr CORE.GetNCharNB skip '{'
bcs .99
lda #'}'
jmp CC.Push
.1 lda #';'
jmp CC.Push
.9 lda #E.CSYN
sec
.99 rts
*--------------------------------------
KW.NewLabel pha
lda CStackPtr
clc
adc #4
tay
lda (ZPCCStack),y
pha
iny
lda (ZPCCStack),y
ply
>STYA.G CC.CPSPFX+2
pla
jmp SYM.NewA
*--------------------------------------
KW.GetLabel pha
lda CStackPtr
clc
adc #4
tay
lda (ZPCCStack),y
pha
iny
lda (ZPCCStack),y
ply
>STYA.G CC.CPSPFX+2
pla
jmp SYM.LookupA
*--------------------------------------
KW.LookupLabel pha
ldy CStackPtr
sty ArgIndex
.1 ldy ArgIndex
beq .9
iny skip ; or }
lda (ZPCCStack),y
bmi .9 f()
iny
iny
iny
lda (ZPCCStack),y
pha
iny
lda (ZPCCStack),y
iny
iny
iny
sty ArgIndex
ply
>STYA.G CC.CPSPFX+2
pla
pha
jsr SYM.LookupA
bcs .1
pla
.8 rts
.9 pla
lda #E.CSYN
sec
.99 rts
*--------------------------------------
* Input : Value on Stack, Y,A = Type/Qual
*--------------------------------------
KW.TestZero jsr EXP.GetYASizeOfInAXC

View File

@ -33,19 +33,19 @@ PCC.FH.LIBS .EQ *-PCC.FH.ORG
PCC.FH.INIT >LDYA PCC.FH.ORG+PCC.FH.LIBS
>STYA ZS.RT.Ptr1
ldx #0
.1 lda (ZS.RT.Ptr1)
beq .8
phx
>LDYA ZS.RT.Ptr1
>SYSCALL LoadLib
plx
bcs .9
sta PCC.PH.hLIBs,x
phx
>SYSCALL GetMemPtr
@ -57,32 +57,32 @@ PCC.FH.INIT >LDYA PCC.FH.ORG+PCC.FH.LIBS
inx
ldy #0
.2 iny
lda (ZS.RT.Ptr1),y
bne .2
tya
sec
adc ZS.RT.Ptr1
sta ZS.RT.Ptr1
bcc .1
inc ZS.RT.Ptr1+1
bra .1
.8 clc
.9 rts
PCC.FH.QUIT ldx #12
.1 lda PCC.PH.hLIBs,x
beq .2
phx
>SYSCALL UnloadLib
plx
.2 dex
dex
dex
@ -93,7 +93,7 @@ PCC.FH.QUIT ldx #12
rts
PCC.PH.hLIBs .DA #0
PCC.PH.JMPLIBs jmp $FFFF
PCC.PH.JMPLIBs jmp $FFFF
.DA #0
jmp $FFFF
.DA #0
@ -139,7 +139,7 @@ PCC.FH.RUN lda #0
>PUSHA
>PUSHA int ARGC (hi byte)
ldy #S.PS.ARGC
lda (pPS),y
>PUSHA int ARGC (lo byte)
@ -214,6 +214,31 @@ PCC.SetRetValue .DA #PCC.SetRetValue.L
PCC.SetRetValue.L .EQ *-PCC.SetRetValue
*--------------------------------------
PCC.8to16 .DA #PCC.8to16.L
lda (pStack)
pha
lda #0
sta (pStack)
pla
>PUSHA
PCC.8to16.L .EQ *-PCC.8to16
*--------------------------------------
PCC.JmpOnYA .DA #PCC.JmpOnYA.L
cmp (pStack)
bne .2+5 skip JMP abs
txa
ldy #1
cmp (pStack),y
.2 bne .2+5 skip JMP abs
PCC.JmpOnYA.L .EQ *-PCC.JmpOnYA
*--------------------------------------
PCC.Pop16 .DA #PCC.Pop16.L
inc pStack
inc pStack
PCC.Pop16.L .EQ *-PCC.Pop16
*--------------------------------------
PCC.TestZero1 .DA #PCC.TestZero1.L
>PULLA
tay
@ -464,14 +489,14 @@ PCC.Inc2 .DA #PCC.Inc2.L
inc
sta (ZS.RT.Ptr2)
bne .1
ldy #1
lda (ZS.RT.Ptr2),y
inc
sta (ZS.RT.Ptr2),y
.1
.1
PCC.Inc2.L .EQ *-PCC.Inc2
*--------------------------------------
PCC.Inc4 .DA #PCC.Inc4.L
@ -479,20 +504,20 @@ PCC.Inc4 .DA #PCC.Inc4.L
inc
sta (ZS.RT.Ptr2)
bne .2
ldy #1
.1 lda (ZS.RT.Ptr2),y
inc
sta (ZS.RT.Ptr2),y
beq .2
iny
cpy #4
bne .1
.2
.2
PCC.Inc4.L .EQ *-PCC.Inc4
*--------------------------------------
PCC.Dec1 .DA #PCC.Dec1.L
@ -508,14 +533,14 @@ PCC.Dec2 .DA #PCC.Dec2.L
sta (ZS.RT.Ptr2)
plp
bne .1
ldy #1
lda (ZS.RT.Ptr2),y
dec
sta (ZS.RT.Ptr2),y
.1
.1
PCC.Dec2.L .EQ *-PCC.Dec2
*--------------------------------------
PCC.Dec4 .DA #PCC.Dec4.L
@ -524,31 +549,31 @@ PCC.Dec4 .DA #PCC.Dec4.L
sbc #0
sta (ZS.RT.Ptr2)
bcs .2
ldy #1
.1 lda (ZS.RT.Ptr2),y
sbc #0
sta (ZS.RT.Ptr2),y
bcs .2
iny
cpy #4
bne .1
.2
.2
PCC.Dec4.L .EQ *-PCC.Dec4
*--------------------------------------
PCC.BOPS.bMUL .DA #PCC.BOPS.bMUL.L
ldx #0 result
>PULLA
tay b2
.1 tya
beq .8
lsr
tay
bcc .2
@ -557,7 +582,7 @@ PCC.BOPS.bMUL .DA #PCC.BOPS.bMUL.L
txa
adc (pStack) b1
tax
.2 lda (pStack) b1*2
asl
sta (pStack)
@ -565,7 +590,7 @@ PCC.BOPS.bMUL .DA #PCC.BOPS.bMUL.L
.8 txa
sta (pStack)
PCC.BOPS.bMUL.L .EQ *-PCC.BOPS.bMUL
*--------------------------------------
PCC.BOPS.cMUL
@ -592,39 +617,39 @@ PCC.BOPS.SUB .DA #PCC.BOPS.SUB.L
sbc (pStack)
sta (pStack),y
inc pStack
PCC.BOPS.SUB.L .EQ *-PCC.BOPS.SUB
PCC.BOPS.SUB.L .EQ *-PCC.BOPS.SUB
*--------------------------------------
PCC.BOPS.SHL .DA #PCC.BOPS.SHL.L
>PULLA
tax
beq .8
lda (pStack)
.1 asl
dex
bne .1
sta (pStack)
.8
PCC.BOPS.SHL.L .EQ *-PCC.BOPS.SHL
PCC.BOPS.SHL.L .EQ *-PCC.BOPS.SHL
*--------------------------------------
PCC.BOPS.SHR .DA #PCC.BOPS.SHR.L
>PULLA
tax
beq .8
lda (pStack)
.1 lsr
dex
bne .1
sta (pStack)
.8
PCC.BOPS.SHR.L .EQ *-PCC.BOPS.SHR
PCC.BOPS.SHR.L .EQ *-PCC.BOPS.SHR
*--------------------------------------
PCC.BOPS.L .DA #PCC.BOPS.L.L
>PULLA
@ -634,7 +659,7 @@ PCC.BOPS.L .DA #PCC.BOPS.L.L
lda #0
sta (pStack)
rts
.8 lda #1
sta (pStack)
PCC.BOPS.L.L .EQ *-PCC.BOPS.L
@ -648,7 +673,7 @@ PCC.BOPS.G .DA #PCC.BOPS.G.L
.1 lda #0
sta (pStack)
rts
.8 lda #1
sta (pStack)
PCC.BOPS.G.L .EQ *-PCC.BOPS.G
@ -662,7 +687,7 @@ PCC.BOPS.LE .DA #PCC.BOPS.LE.L
lda #0
sta (pStack)
rts
.8 lda #1
sta (pStack)
PCC.BOPS.LE.L .EQ *-PCC.BOPS.LE
@ -675,7 +700,7 @@ PCC.BOPS.GE .DA #PCC.BOPS.GE.L
lda #0
sta (pStack)
rts
.8 lda #1
sta (pStack)
PCC.BOPS.GE.L .EQ *-PCC.BOPS.GE
@ -684,10 +709,10 @@ PCC.BOPS.EQ .DA #PCC.BOPS.EQ.L
>PULLA
cmp (pStack)
beq .1
lda #0
clc
.1 ror
sta (pStack)
@ -700,7 +725,7 @@ PCC.BOPS.NE .DA #PCC.BOPS.NE.L
PCC.BOPS.NE.L .EQ *-PCC.BOPS.NE
*--------------------------------------
PCC.BOPS.LAND
PCC.BOPS.LAND
*--------------------------------------
PCC.BOPS.AND .DA #PCC.BOPS.AND.L
>PULLA
@ -708,7 +733,7 @@ PCC.BOPS.AND .DA #PCC.BOPS.AND.L
sta (pStack)
PCC.BOPS.AND.L .EQ *-PCC.BOPS.AND
*--------------------------------------
PCC.BOPS.LOR
PCC.BOPS.LOR
*--------------------------------------
PCC.BOPS.OR .DA #PCC.BOPS.OR.L
>PULLA

View File

@ -22,7 +22,7 @@ STMT.Get jsr CC.GetCharNB
*--------------------------------------
jsr CORE.GetNCharNB
bcs .9
* >DEBUG
ldy #SYM.Q
lda (ZPLookupSymPtr),y
pha
@ -121,11 +121,25 @@ STMT.SetVar stz ExpState
.99 rts
*--------------------------------------
*--------------------------------------
STMT.Stmt.END ldy CStackPtr
beq .8
iny CPS.TERM
lda (ZPCCStack),y
cmp #'}'
beq .8
cmp #';' must be ';' on stack....
bra STMT.POP
.8 clc
rts
*--------------------------------------
* X = KW.ID
*--------------------------------------
CC.STMT.CPStmt.NEW
>LDA.G CC.CPSID+1
STMT.CPStmt.NEW >LDA.G CC.CPSID+1
jsr CC.Push
bcs .99
@ -141,58 +155,50 @@ CC.STMT.CPStmt.NEW
jsr CC.Push
bcs .99
txa
lda #'}'
jsr CC.Push
bcs .99
lda #'}'
txa
jmp CC.Push
.99 rts
*--------------------------------------
CC.STMT.Stmt.END
jsr CC.Get
bcs .8
cmp #'}'
beq .8
cmp #';' must be ';' on stack....
bra CC.STMT.POP
.8 clc
CC.STMT.Stmt.RTS
rts
*--------------------------------------
CC.STMT.CPStmt.END
jsr CC.Get
bcs CC.STMT.Stmt.RTS
cmp #'}' must be '}' on stack....
CC.STMT.POP bne .98
STMT.CPStmt.END ldy CStackPtr
beq STMT.POP.9
iny
lda (ZPCCStack),y
jsr .7
cmp #'}' must be '}' on stack....
STMT.POP bne .9
dey CPS.KW
lda (ZPCCStack),y
jsr STMT.CLOSE
bcs .99
bvs .1 DONT POP reused context (ELSE....)
lda CStackPtr
* clc
adc #7
sta CStackPtr
jsr CC.Pop Locals
ldy #CPS.LOCAL
lda (ZPCCStack),y
sta LocalPtr
lda CStackPtr
* clc
adc #CPS
sta CStackPtr
.1 clc
.99 rts
.9
STMT.POP.9 lda #E.STACKERROR
sec
rts
*--------------------------------------
.7 tax
STMT.CLOSE tax
bmi .8
jmp (J.CC.KW.END,x)
@ -203,6 +209,188 @@ CC.STMT.POP bne .98
sec
.99 rts
*--------------------------------------
STMT.NewCPS00 lda #0
jsr CC.Push no T/Q
bcs STMT.NewCPS.RTS
jsr CC.Push
bcs STMT.NewCPS.RTS
STMT.NewCPS jsr STMT.NewCPSID
bcs .99
lda #'*'
>SYSCALL putchar
>LEA.G CC.CPSPFX+2
>SYSCALL puts
* >DEBUG
>LDA.G CC.CPSPFX+3
jsr CC.Push
bcs .99
>LDA.G CC.CPSPFX+2
jsr CC.Push
bcs .99
lda LocalPtr Locals
jsr CC.Push
bcs .99
lda #0 bState
jsr CC.Push
bcs .99
lda #';' CPS.TERM
jsr CC.Push
bcs .99
>LDA.G CC.CmdSave
jmp CC.Push
.99
STMT.NewCPS.RTS rts
*--------------------------------------
STMT.SetCPSType jsr CORE.GetNCharNBNL
bcs .9
ldx #';'
cmp #'{'
bne .1
jsr CORE.GetNCharNB skip '{'
bcs .99
ldx #'}'
.1 txa
ldy CStackPtr
iny CPS.TERM
sta (ZPCCStack),y
.8 clc
rts
.9 lda #E.CSYN
sec
.99 rts
*--------------------------------------
STMT.NewLabelA pha
lda CStackPtr
jsr STMT.GetCPSIDA
* lda #'+'
* >SYSCALL putchar
* pla
* pha
* >SYSCALL putchar
* >LEA.G CC.CPSPFX+1
* >SYSCALL puts
* >DEBUG
pla
jmp SYM.NewA
*--------------------------------------
STMT.GetLabelA pha
lda CStackPtr
jsr STMT.GetCPSIDA
* lda #'?'
* >SYSCALL putchar
* pla
* pha
* >SYSCALL putchar
* >LEA.G CC.CPSPFX+1
* >SYSCALL puts
* >DEBUG
pla
jmp SYM.LookupA
*--------------------------------------
STMT.LookupLabelA
pha
ldy CStackPtr
sty ArgIndex
lda ArgIndex
beq .9
.1 jsr STMT.GetCPSIDA
* lda #'!'
* >SYSCALL putchar
* pla
* pha
* >SYSCALL putchar
* >LEA.G CC.CPSPFX+1
* >SYSCALL puts
* >DEBUG
pla
pha
jsr SYM.LookupA
bcc .8
lda ArgIndex
clc
adc #CPS
sta ArgIndex
bne .1
.9 lda #E.NOKEY
plx
* sec
rts
.8 pla
* clc
rts
*--------------------------------------
STMT.GetCPSIDA clc
adc #CPS.CPSID
tay
lda (ZPCCStack),y
pha
iny
lda (ZPCCStack),y
ply
>STYA.G CC.CPSPFX+2
rts
*--------------------------------------
STMT.NewCPSID >LDYA.G CC.CPSID
>STYA.G CC.CPSPFX+2
>LDA.G CC.CPSID+1
inc
cmp #'Z'+1
bne .1
dey CC.CPSID
lda (pData),y
inc
cmp #'Z'+1
beq .9
sta (pData),y
lda #'A'
iny CC.CPSID+1
.1 sta (pData),y
clc
rts
.9 lda #E.OOH
* sec
rts
*--------------------------------------
MAN
SAVE usr/src/bin/cc.s.stmt
LOAD usr/src/bin/cc.s

View File

@ -144,7 +144,7 @@ SYM.SetAddr ldy #SYM.SizeOf
jsr SYM.GetSymSizeOfInAXC
jsr SYM.SetSizeOf
.1 ldy #SYM.Q
lda (ZPSymBufPtr),y
and #SYM.Q.FUNC
@ -388,7 +388,7 @@ SYM.AddWord phy
sta (ZPSymBufPtr),y
dey
pla Y
pha
sta (ZPSymBufPtr),y
@ -427,7 +427,7 @@ SYM.AddName jsr CC.GetCharNB
iny
dex
bne .1
tya
jsr CC.SkipA
@ -460,34 +460,6 @@ SYM.AddByte pha
sec
rts
*--------------------------------------
SYM.NewCPSID >LDYA.G CC.CPSID
>STYA.G CC.CPSPFX+2
>LDA.G CC.CPSID+1
inc
cmp #'Z'+1
bne .1
dey CC.CPSID
lda (pData),y
inc
cmp #'Z'+1
beq .9
sta (pData),y
lda #'A'
iny CC.CPSID+1
.1 sta (pData),y
clc
rts
.9 lda #E.OOH
* sec
rts
*--------------------------------------
SYM.NewA bit bPass2
bmi .8

View File

@ -63,6 +63,20 @@ SU.F.BitO .EQ 4
SU.F.BitW .EQ 5
SU.F.Name .EQ 6
*--------------------------------------
CPS.hMEM .EQ 7 switch/case
CPS.Ptr .EQ 6
CPS.Q .EQ 7 f
CPS.T .EQ 6
CPS.CPSID .EQ 4
CPS.LOCAL .EQ 3
CPS.STATE .EQ 2
CPS.TERM .EQ 1
CPS.KW .EQ 0
*
CPS .EQ 8
*--------------------------------------
* Zero Page Segment, up to 32 bytes
*--------------------------------------
.DUMMY
@ -173,9 +187,11 @@ J.CC.POSTOPS .DA EXP.postinc
*--------------------------------------
J.CC.KW .DA KW.IF
.DA KW.WHILE
KW.ELSE.ID .EQ *-J.CC.KW
.DA KW.ELSE
.DA KW.DO
.DA KW.FOR
KW.SWITCH.ID .EQ *-J.CC.KW
.DA KW.SWITCH
.DA KW.CASE
.DA KW.DEFAULT
@ -227,6 +243,9 @@ L.PCC.ENTER .DA PCC.ENTER
L.PCC.LEAVE .DA PCC.LEAVE
L.PCC.ADDLOCAL .DA PCC.ADDLOCAL
L.PCC.SetRetValue .DA PCC.SetRetValue
L.PCC.8to16 .DA PCC.8to16
L.PCC.JmpOnYA .DA PCC.JmpOnYA
L.PCC.Pop16 .DA PCC.Pop16
L.PCC.TestZero1 .DA PCC.TestZero1
L.PCC.TestZero2 .DA PCC.TestZero2
L.PCC.TestZeroX .DA PCC.TestZeroX
@ -373,7 +392,7 @@ CS.RUN.CLOOP jsr CORE.CompileFile
cmp #MLI.E.EOF
bne .9
jsr CODE.EmitTail
bcs .9
@ -420,13 +439,13 @@ CS.RUN.ARGS inc ArgIndex
.2 cpx #4
bcc .3
inc ArgIndex
lda ArgIndex
>SYSCALL ArgV
bcs .90
jsr FIO.LoadLIB.o
bcc CS.RUN.ARGS
@ -473,11 +492,11 @@ CS.DOEVENT sec
*--------------------------------------
CS.QUIT jsr CODE.Quit
jsr CORE.Quit
.1 >LDA.G LibCount
beq .6
dec
dec
sta (pData),y
clc
@ -613,7 +632,7 @@ PrintSummary >PUSHW L.MSG.SUMMARY
>PUSHW ZPCCData
>PUSHBI 6
>SYSCALL PrintF
* >DEBUG
rts
*--------------------------------------
.INB usr/src/bin/cc.s.code

View File

@ -52,42 +52,56 @@ CS.INIT
.1 >INC.G Count
>SYSCALL ArgV
bcs .7
>STYA ZPPtr1
lda (ZPPtr1)
cmp #'-'
bne .4
ldy #1
lda (ZPPtr1),y
ldx OptionList
.2 cmp OptionList,x
beq .3
dex
bne .2
.99 >LDYA L.MSG.USAGE
>SYSCALL PrintF
>SYSCALL Puts
lda #E.SYN
sec
rts
.3 ldy OptionVars-1,x
lda #$80
sta (pData),y
bra .1
.4 >LDA.G hInputBuf
bne .5
jsr CS.INIT.OPENINPUT
bcc .1 scan for any other args
rts
.5 >LDA.G hOutputFile
bne .99
jsr CS.INIT.CREATEOUTPUT
bcc .1 scan for any other args
rts
.7 >LDA.G hOutputFile
beq .99
>LDYAI 8192 max 256x256 pixels
>SYSCALL GetMem
bcs CS.INIT.RTS
>STYA ZPCharBufPtr
txa
>STA.G hCharBuf
@ -95,28 +109,32 @@ CS.INIT
CS.INIT.RTS rts
*--------------------------------------
CS.INIT.OPENINPUT
>PUSHWZ Aux type
>PUSHBI 0 Type
>PUSHW ZPPtr1
>PUSHBI O.RDONLY
>LDYA ZPPtr1
>PUSHBI 0 Type
>PUSHWZ Aux type
>SYSCALL LoadFile
bcs CS.INIT.RTS
>PUSHYA
txa
>STA.G hInputBuf
>SYSCALL GetMemPtr
>STYA ZPInputBufPtr
>LDYA L.MSG.FILE.OK
>SYSCALL PrintF
>SYSCALL PutS
ldy #S.FNT.dfVersion
lda (ZPInputBufPtr),y
bne .99
iny
lda (ZPInputBufPtr),y
cmp #2
beq .1
cmp #3
bne .99
.1 asl *2 = Entry Len in Tbl
>STA.G FNT.Version
pha
@ -141,26 +159,30 @@ CS.INIT.OPENINPUT
>SYSCALL PrintF
clc
rts
.99 >LDYA L.MSG.HEADER.KO
>SYSCALL PrintF
>SYSCALL PutS
lda #E.IBIN
sec
rts
*--------------------------------------
CS.INIT.CREATEOUTPUT
>PUSHWZ Aux type
>PUSHBI $CC FON Type
>PUSHW ZPPtr1
>PUSHBI O.WRONLY+O.CREATE
>LDYA ZPPtr1
>PUSHBI $CC FON Type
>PUSHWZ Aux type
>SYSCALL FOpen
bcs .9
>STA.G hOutputFile
>LDYAI 256
>SYSCALL GetMem
bcs .9
>STYA ZPOutPutBufPtr
txa
>STA.G hOutPutBuf
.9 rts
*--------------------------------------
CS.RUN ldy #S.FNT.dfBreakChar
@ -185,6 +207,7 @@ CS.RUN ldy #S.FNT.dfBreakChar
>PUSHA
>LDYA L.MSG.RANGE
>SYSCALL PrintF
>LDA.G FON.Header+S.FON.Last
sec
>SBC.G FON.Header+S.FON.First
@ -201,6 +224,7 @@ CS.RUN ldy #S.FNT.dfBreakChar
ply
>SYSCALL GetMem
bcs .9
>STYA ZPOutPutTblPtr
txa
>STA.G hTblBuf
@ -221,12 +245,16 @@ CS.RUN ldy #S.FNT.dfBreakChar
>LDA.G hOutputFile
>SYSCALL FSeek
bcc .1
.9 rts
.1 >LDA.G FNT.Version
ldx #S.FNT.dfCharTable2
cmp #4
beq .2
ldx #S.FNT.dfCharTable3
.2 txa
clc
adc ZPInputBufPtr
@ -234,6 +262,7 @@ CS.RUN ldy #S.FNT.dfBreakChar
lda #0
adc ZPInputBufPtr+1
sta ZPInputTblPtr+1
*--------------------------------------
CS.RUN.LOOP >SLEEP
>SYSCALL GetChar
@ -241,8 +270,10 @@ CS.RUN.LOOP >SLEEP
cmp #$03 Ctrl-C
beq .9 Abort....
cmp #$13 Ctrl-S
bne .3
>LDA.G bPause
eor #$FF
sta (pData),y
@ -265,20 +296,26 @@ CS.RUN.LOOP >SLEEP
jsr CS.RUN.DumpChar
jsr CS.RUN.StoreChar
bcs .9
>INC.G CharIndex
>DEC.G CharCount
beq .8
lda ZPInputTblPtr
clc
>ADC.G FNT.Version
sta ZPInputTblPtr
bcc CS.RUN.LOOP
inc ZPInputTblPtr+1
bra CS.RUN.LOOP
.8 jsr CS.RUN.FlushOutPutBuf
bcs .9
jsr CS.RUN.WriteBMAndTbl
bcs .9
>LDYA L.MSG.DONE
>SYSCALL PrintF
lda #0
@ -300,11 +337,14 @@ CS.RUN.GetChar lda (ZPInputTblPtr) Get Char PixW
pla
and #7
beq .1
inx
.1 txa
>STA.G CharByteW
>STA.G CharOutByteW
lda #0 0 -> A -> CharByteW
.2 pha
clc
adc ZPCharBufPtr
@ -319,7 +359,9 @@ CS.RUN.GetChar lda (ZPInputTblPtr) Get Char PixW
inc ZPInputBMPtr
bne .4
inc ZPInputBMPtr+1
.4 tay
lda TWIST,y
sta (ZPPTR1)
@ -328,7 +370,9 @@ CS.RUN.GetChar lda (ZPInputTblPtr) Get Char PixW
>ADC.G CharByteW
sta ZPPTR1
bcc .5
inc ZPPTR1+1
.5 dex
bne .3
@ -336,6 +380,7 @@ CS.RUN.GetChar lda (ZPInputTblPtr) Get Char PixW
inc
>CMP.G CharByteW
bne .2
clc
rts
*--------------------------------------
@ -356,6 +401,7 @@ CS.RUN.DumpChar >LDA.G CharOutByteW
sta ZPPTR1+1
>LDA.G FON.Header+S.FON.PixH
.1 pha
lda #'|'
>SYSCALL PutChar
@ -363,25 +409,32 @@ CS.RUN.DumpChar >LDA.G CharOutByteW
>STA.G Count
ldy #0
.2 lda (ZPPTR1),y
phy
ldx #8
.4 lsr
pha
lda #' '
bcc .5
lda #'O'
.5 phx
>SYSCALL PutChar
plx
>DEC.G Count
beq .6
pla Get back BYTE
dex
bne .4
ply
iny
bra .2
.6 pla
pla
@ -396,16 +449,19 @@ CS.RUN.DumpChar >LDA.G CharOutByteW
>ADC.G CharByteW
sta ZPPTR1
bcc .7
inc ZPPTR1+1
.7 pla
dec
bne .1
rts
*--------------------------------------
CS.RUN.ShiftLChar
>LDA.G bNoShrink
bmi .9
.1 lda ZPCharBufPtr
sta ZPPTR1
lda ZPCharBufPtr+1
@ -415,6 +471,7 @@ CS.RUN.ShiftLChar
lda #0
pha
.2 pla
ora (ZPPTR1)
pha
@ -423,13 +480,18 @@ CS.RUN.ShiftLChar
>ADC.G CharByteW
sta ZPPTR1
bcc .3
inc ZPPTR1+1
.3 dex
bne .2
pla
beq .9 No pixel in first COL, must be SPACE or BREAK
lsr
bcs .9
lda ZPCharBufPtr
sta ZPPTR1
lda ZPCharBufPtr+1
@ -440,29 +502,37 @@ CS.RUN.ShiftLChar
.4 >LDA.G CharByteW
tay
clc
.5 dey
lda (ZPPTR1),y
ror
sta (ZPPTR1),y
tya
bne .5
lda ZPPTR1
clc
>ADC.G CharByteW
sta ZPPTR1
bcc .6
inc ZPPTR1+1
.6 dex
bne .4
>DEC.G CharOutPixW
and #7
bne .1
>DEC.G CharOutByteW
bra .1
.9 rts
*--------------------------------------
CS.RUN.CutRChar >LDA.G bNoShrink
bmi .9
.1 lda ZPCharBufPtr
sta ZPPTR1
lda ZPCharBufPtr+1
@ -475,6 +545,7 @@ CS.RUN.CutRChar >LDA.G bNoShrink
dey
lda #0
pha
.2 pla
ora (ZPPTR1),y
pha
@ -484,14 +555,18 @@ CS.RUN.CutRChar >LDA.G bNoShrink
>ADC.G CharByteW
sta ZPPTR1
bcc .3
inc ZPPTR1+1
.3 ply
dex
bne .2
pla
bmi .9 Bit 7 is colored....exit
bne .4
tya No bits in this COL
beq .9 was COL 0.....SPACE or BREAK
@ -501,6 +576,7 @@ CS.RUN.CutRChar >LDA.G bNoShrink
asl
>STA.G CharOutPixW
bra .1
.4 pha
>LDA.G CharOutByteW
asl
@ -508,9 +584,11 @@ CS.RUN.CutRChar >LDA.G bNoShrink
asl
tax
pla
.5 dex
asl
bpl .5
txa
>STA.G CharOutPixW
pha
@ -521,9 +599,12 @@ CS.RUN.CutRChar >LDA.G bNoShrink
pla
and #7
beq .7
inx
.7 txa
>STA.G CharOutByteW
.9 rts
*--------------------------------------
CS.RUN.StoreChar
@ -537,13 +618,17 @@ CS.RUN.StoreChar
adc #2
sta ZPOutPutTblPtr
bcc .1
inc ZPOutPutTblPtr+1
.1 >LDA.G CharOutPixW
jsr CS.RUN.WriteByte
bcs .99
>LDA.G CharOutByteW
jsr CS.RUN.WriteByte
bcs .99
lda ZPCharBufPtr
sta ZPPTR1
lda ZPCharBufPtr+1
@ -557,23 +642,30 @@ CS.RUN.StoreChar
.3 lda (ZPPTR1),y
jsr CS.RUN.WriteByte
bcs .9
iny
dex
bne .3
pla
dec
beq .8
pha
lda ZPPTR1
clc
>ADC.G CharByteW
sta ZPPTR1
bcc .2
inc ZPPTR1+1
bra .2
.8 clc
rts
.9 plx
.99 rts
*--------------------------------------
CS.RUN.WriteByte
@ -590,6 +682,7 @@ CS.RUN.WriteByte
tay
clc
bne .8
>PUSHWI 256
>PUSHW ZPOutPutBufPtr
>LDA.G hOutputFile
@ -598,6 +691,7 @@ CS.RUN.WriteByte
.8 inc ZPOutPutCharOfs
bne .9
inc ZPOutPutCharOfs+1
.9 plx
@ -625,17 +719,20 @@ CS.RUN.WriteBMAndTbl
iny
dex
bne .1
>LEA.G FileOffset
>PUSHYA
>PUSHBI SYS.FSeek.SET
>LDA.G hOutputFile
>SYSCALL FSeek
bcs .9
>PUSHWI S.FON
>PUSHEA.G FON.Header
>LDA.G hOutputFile
>SYSCALL FWrite
bcs .9
>LDA.G FON.Header+S.FON.Last
sec
>SBC.G FON.Header+S.FON.First
@ -661,21 +758,27 @@ CS.DOEVENT sec
*--------------------------------------
CS.QUIT >LDA.G hOutPutBuf
beq .1
>SYSCALL FreeMem
.1 >LDA.G hOutputFile
beq .2
>SYSCALL FClose
.2 >LDA.G hInputBuf
beq .3
>SYSCALL FreeMem
.3 >LDA.G hCharBuf
beq .4
>SYSCALL FreeMem
.4 >LDA.G hTblBuf
beq .8
>SYSCALL FreeMem
.8 clc
@ -685,15 +788,18 @@ CS.END
*--------------------------------------
.INB usr/src/shared/x.twist.g
*--------------------------------------
OptionList >PSTR "NnVv"
OptionList .PS "NnVv"
OptionVars .DA #bNoShrink,#bNoShrink,#bVerbose,#bVerbose
MSG.USAGE .AZ "Usage : FNT2FON FNT-File \r\n -V : Verbose Mode\r\n -N : No shrink\r\n"
MSG.FILE.OK .AZ "FNT File Loaded, %D Bytes Read\r\n"
MSG.HEADER.OK .AZ "FNT File Version : %d, Size : %d x %d pixels, Ascent : %d\r\n"
MSG.HEADER.KO .AZ "Invalid Input File Format\r\n"
MSG.RANGE .AZ "First/Last Char : %d/%d, Default : %d, Break : %d\r\n"
MSG.DUMP .AZ "Caracter ID : %d (0x0%2h), Width(P) : %d, Width(B) : %d\r\n"
MSG.DONE .AZ "All Done!!!\r\n"
*--------------------------------------
MSG.USAGE .CS "Usage : FNT2FON FNT-File \r\n"
.CS " -V : Verbose Mode\r\n"
.CZ -N : No shrink\r\n"
MSG.FILE.OK .CZ "FNT File Loaded, %D Bytes Read\r\n"
MSG.HEADER.OK .CZ "FNT File Version : %d, Size : %d x %d pixels, Ascent : %d\r\n"
MSG.HEADER.KO .CZ "Invalid Input File Format\r\n"
MSG.RANGE .CZ "First/Last Char : %d/%d, Default : %d, Break : %d\r\n"
MSG.DUMP .CZ "Caracter ID : %d (0x0%2h), Width(P) : %d, Width(B) : %d\r\n"
MSG.DONE .CZ "All Done!!!\r\n"
*--------------------------------------
.DUMMY
.OR 0

View File

@ -1,6 +1,6 @@
NEW
AUTO 3,1
.LIST OFF
.LIST OFF
.OP 65C02
.OR $2000
.TF bin/guitest1
@ -8,14 +8,14 @@ NEW
.INB inc/macros.i
.INB inc/a2osx.i
.INB inc/mli.i
.INB inc/gfx.i
.INB inc/libgui.i
.INB inc/libgui.i
*--------------------------------------
.DUMMY
.OR ZPBIN
ZS.START
hLogo .BS 2 00xx
hWND .BS 1
hMBAR .BS 1
ZS.END .ED
*--------------------------------------
* File Header (16 Bytes)
@ -37,7 +37,6 @@ CS.START cld
.DA CS.DOEVENT
.DA CS.QUIT
L.LIBGUI .DA LIBGUI
L.MouseData .DA MouseData
L.LOGOFILE .DA LOGOFILE
L.WND.TITLE .DA WND.TITLE
L.WND.MBAR .DA WND.MBAR
@ -63,15 +62,15 @@ CS.RUN >PUSHW L.LOGOFILE
bcs .9
stx hLogo
jsr WND.Test
bcs .9
.1 >SLEEP
bra .1
clc
.9 rts
@ -88,8 +87,8 @@ CS.QUIT.RTS rts
*--------------------------------------
WND.Test >PUSHBI S.WND.F.RESIZE+S.WND.F.MOVE+S.WND.F.CLOSE+S.WND.F.MAX+S.WND.F.MIN
>PUSHW MouseData+S.MOUSE.X1
>PUSHW MouseData+S.MOUSE.Y1
>PUSHWI 40
>PUSHWI 80
>PUSHWI 360
>PUSHWI 96
>LIBCALL hLIBGUI,LIBGUI.WND.New
@ -107,17 +106,21 @@ WND.Test >PUSHBI S.WND.F.RESIZE+S.WND.F.MOVE+S.WND.F.CLOSE+S.WND.F.MAX+S.WND.F.
>LIBCALL hLIBGUI,LIBGUI.OBJ.SetProp
>PUSHB hWND
>PUSHBI S.WND.TITLE
>PUSHBI S.WND.pTITLE
>PUSHW L.WND.TITLE
>LIBCALL hLIBGUI,LIBGUI.OBJ.SetProp
>PUSHB hWND
>PUSHBI S.WND.MBAR
>PUSHW L.WND.MBAR
>LIBCALL hLIBGUI,LIBGUI.OBJ.SetProp
>LIBCALL hLIBGUI,LIBGUI.MBAR.New
sta hMBAR
>PUSHB hWND
>PUSHBI S.WND.STATUS
>PUSHB hMBAR
>LIBCALL hLIBGUI,LIBGUI.WND.SetMBar
>PUSHB hWND
>PUSHBI S.WND.pSTATUS
>PUSHW L.WND.STATUS
>LIBCALL hLIBGUI,LIBGUI.OBJ.SetProp
@ -152,97 +155,119 @@ CS.END
LIBGUI .AZ "libgui"
hLIBGUI .BS 1
*--------------------------------------
MouseData .BS S.MOUSE
*--------------------------------------
LOGOFILE .AZ "${ROOT}A2osX.logo"
WND.TITLE .AZ "Window Title"
WND.STATUS .AZ "Window status bar message"
*--------------------------------------
WND.MBAR .DA #.1-* next
.DA #0 status
.DA 0 X1
.DA 0 XT
.DA 0 X2
.DA 0 MENU
.AZ "File"
.1 .DA #.2-* next
.DA #0 status
.DA 0 X1
.DA 0 XT
.DA 0 X2
.DA 0 MENU
WND.MBAR .AZ "File"
.DA WND.MENU.FILE
.AZ "Edit"
.2 .DA #.3-* next
.DA #0 status
.DA 0 X1
.DA 0 XT
.DA 0 X2
.DA 0 MENU
.DA WND.MENU.EDIT
.AZ "Options"
.3 .DA #.4-* next
.DA #0 status
.DA 0 X1
.DA 0 XT
.DA 0 X2
.DA 0 MENU
.DA WND.MENU.OPTIONS
.AZ "?"
.4 .DA #0
.DA WND.MENU.HELP
.DA #0
*--------------------------------------
WND.MENU.FILE .DA #02 ID
.DA #S.MITEM.KEYMOD.CTRL
.DA #'N'
WND.MENU.FILE .DA #S.MITEM.T.ITEM
.DA #02 ID
.DA #KEYMOD.CTRL,#'N'
.DA 0 pICON
.AZ "New"
.DA #04 ID
.DA #S.MITEM.KEYMOD.CTRL
.DA #'O'
.DA #S.MITEM.T.ITEM
.DA #04 ID
.DA #KEYMOD.CTRL,#'O'
.DA 0 pICON
.AZ "Open..."
.DA #06 ID
.DA #S.MITEM.KEYMOD.CTRL
.DA #'S'
.DA #S.MITEM.T.ITEM
.DA #06 ID
.DA #KEYMOD.CTRL,#'S'
.DA 0 pICON
.AZ "Save"
.DA #08 ID
.DA #S.MITEM.KEYMOD.OA+S.MITEM.KEYMOD.CTRL
.DA #'S'
.DA #S.MITEM.T.ITEM
.DA #08 ID
.DA #KEYMOD.OA+KEYMOD.CTRL,#'S'
.DA 0 pICON
.AZ "Save As..."
.DA #10 ID
.DA #S.MITEM.KEYMOD.CTRL
.DA #'Q'
.DA #S.MITEM.T.ITEM
.DA #10 ID
.DA #KEYMOD.CTRL,#'Q'
.DA 0 pICON
.AZ "Quit"
.DA #0
*--------------------------------------
WND.MENU.EDIT .DA #12 ID
.DA #S.MITEM.KEYMOD.OA
.DA #'X'
WND.MENU.EDIT .DA #S.MITEM.T.ITEM
.DA #12 ID
.DA #KEYMOD.CTRL,#'X'
.DA 0 pICON
.AZ "Cut"
.DA #14 ID
.DA #S.MITEM.KEYMOD.OA
.DA #'C'
.DA #S.MITEM.T.ITEM
.DA #14 ID
.DA #KEYMOD.CTRL,#'C'
.DA 0 pICON
.AZ "Copy"
.DA #16 ID
.DA #S.MITEM.KEYMOD.OA
.DA #'V'
.DA #S.MITEM.T.ITEM
.DA #16 ID
.DA #KEYMOD.CTRL,#'V'
.DA 0 pICON
.AZ "Paste"
.DA #0
*--------------------------------------
WND.MENU.OPTIONS .DA #18 ID
.DA #0
.DA #0
WND.MENU.OPTIONS
.DA #S.MITEM.T.ITEM
.DA #18 ID
.DA #0,#0
.DA 0 pICON
.AZ "Check Me"
.DA #S.MITEM.T.SEP
.DA #S.MITEM.T.SUBMENU
.DA WND.MENU.SUB
.DA 0 pICON
.AZ "Sub Menu"
.DA #0
*--------------------------------------
WND.MENU.HELP .DA #20 ID
.DA #0
.DA #0
WND.MENU.HELP .DA #S.MITEM.T.ITEM
.DA #20 ID
.DA #0,#0
.DA 0 pICON
.AZ "About..."
.DA #0
*--------------------------------------
WND.MENU.SUB .DA #S.MITEM.T.ITEM
.DA #18 ID
.DA #0,#0
.DA 0 pICON
.AZ "Sub 1"
.DA #S.MITEM.T.ITEM
.DA #18 ID
.DA #0,#0
.DA 0 pICON
.AZ "Sub 2"
.DA #S.MITEM.T.ITEM
.DA #18 ID
.DA #0,#0
.DA 0 pICON
.AZ "Sub 3"
.DA #0
*--------------------------------------
.DUMMY
.OR 0
DS.START
DS.START
DS.END .ED
*--------------------------------------
MAN

View File

@ -223,10 +223,9 @@ CS.QUIT clc
rts
*--------------------------------------
CS.END
MSG0 .DA #C.ESC
.AZ "[?7lhPS pPID PID cPID CPU% Status Flags UID Args"
MSG1 .AZ "%3d %3d %3d %3d %3d\% %6s %s %3d"
MSG2 .AS " %s"
MSG0 .CZ "\e[?7lhPS pPID PID cPID CPU% Status Flags UID Args"
MSG1 .CZ "%3d %3d %3d %3d %3d\% %6s %s %3d"
MSG2 .CS " %s"
MSG3 .DA #0
MSG.FLAGS .AS "HS???XEN"
MSG.INIT .AZ "Init"

View File

@ -927,6 +927,7 @@ CMD.FOR jsr CORE.StkGetCtx
lda (ZPArgVBufPtr)
cmp #'('
beq CMD.FOR.FILE
cmp #'`'
beq CMD.FOR.EXEC
*--------------------------------------

View File

@ -151,10 +151,50 @@ IO.StatYA >PUSHYA
.9 rts
*--------------------------------------
* set A = `sh -C ls|grep test`
IO.Exec >PUSHW ZPArgVBufPtr
>PUSHBI S.PS.F.CLOSEONX
>SYSCALL ExecL
rts
* >LDYAI 256
* >SYSCALL GetMem
* bcs .99
* >STYA ZPPtr1
* phx
* >PUSHYA
* >PUSHW L.EXECC
* >PUSHW.G SH
* >PUSHW ZPArgVBufPtr
* >PUSHBI 4
* >SYSCALL sprintf
* bcs .98
* ldy #S.PS.hStdErr
* lda (pPS),y
* >PUSHA
* >PUSHW ZPPtr1
* >SYSCALL fputs
* >DEBUG
* >PUSHW ZPPtr1
* >PUSHBI S.PS.F.CLOSEONX
* >SYSCALL ExecL
*.98 plx
* php
* pha
* txa
* >SYSCALL freemem
* pla
* plp
*.99 rts
*--------------------------------------
IO.PrintBatchErrMsg
>LDYA ZPInputBuf

View File

@ -195,8 +195,9 @@ L.EXP.OP.MATH .DA EXP.OP.MATH
L.EXP.OP.LOGIC .DA EXP.OP.LOGIC
L.HOME.PROFILE .DA HOME.PROFILE
L.PtrZero .DA PtrZero
L.HOME .DA HOME
L.PS1 .DA PS1
L.HOME .DA HOME
L.EXECC .DA EXECC
.DA 0
*--------------------------------------
CS.INIT clc
@ -205,6 +206,10 @@ CS.INIT clc
CS.RUN jsr CL.Init
jsr CORE.Init
lda #0
jsr GetArgV
>STYA.G SH
ldy #S.PS.ARGC
lda (pPS),y
beq .2 no arg, continue starting interactive
@ -227,17 +232,21 @@ CS.RUN jsr CL.Init
jsr ToUpperCase
cmp #'C'
bne .1
bne .19
iny
lda (ZPPtr1),y
bne .1
bne .19
* lda #0
jsr CMD.SHIFTA Remove $0 = -C
jsr GetArgV
jmp CS.RUN.CMDLINE
.19 lda #E.CSYN
sec
rts
*--------------------------------------
.1 jsr GetArgV Load SH batch file
>SYSCALL LoadTxtFile
@ -622,6 +631,7 @@ HOME.PROFILE .AS "${HOME}.profile"
PtrZero .HS 00
PS1 .AZ "${PS1}"
HOME .AZ "${HOME}"
EXECC .AZ "%s -C %s"
*--------------------------------------
EscChars .AS "DABC"
EscChars.Cnt .EQ *-EscChars
@ -727,6 +737,8 @@ CORE.STACK .BS CORE.STACK.MAX+1 pData (0 = Stack Ptr)
PUSHD.STACK .BS PUSHD.STACK.MAX+1
CODE.STACK .BS CODE.STACK.MAX*7+1
SH .BS 2
hAliases .BS 1
hFunctions .BS 1

View File

@ -1,6 +1,6 @@
NEW
AUTO 3,1
.LIST OFF
.LIST OFF
.OP 65C02
.OR $2000
.TF drv/dhgr.drv
@ -95,7 +95,7 @@ Dev.Detect >LDYA L.MSG.DETECT
bmi .3
>LDYA L.MSG.DETECT.80C
.3 >SYSCALL PutS
.3 >SYSCALL PutS
>PUSHWI DRV.END
>PUSHWI DRV.CS.END-DRV.CS.START
@ -107,7 +107,7 @@ Dev.Detect >LDYA L.MSG.DETECT
>STYA FD.DEV+S.FD.DEV.DRVPTR
jsr DrvReloc
>PUSHW L.FD.DEV
>PUSHW L.FD.DEV.NAME
>SYSCALL MKDev
@ -122,7 +122,7 @@ Dev.Detect >LDYA L.MSG.DETECT
sta CLRWRITEAUX
jsr ClrScr
jsr OSD.install
plp
@ -162,11 +162,11 @@ DrvReloc lda FD.DEV+S.FD.DEV.DRVPTR
clc
adc ZPPtr1
sta (ZPPtr2),y
lda (ZPPtr3),y
adc ZPPtr1+1
sta (ZPPtr3),y
dey
bpl .1
@ -194,11 +194,11 @@ DrvReloc lda FD.DEV+S.FD.DEV.DRVPTR
clc
adc ZPPtr1
sta (ZPPtr2),y
lda (ZPPtr3),y
adc ZPPtr1+1
sta (ZPPtr3),y
dey
bpl .2
@ -213,41 +213,41 @@ OSD.install >LDYA L.OSD
lda /X.OSD.LEN
eor #$ff
pha
lda #X.OSD.LEN
eor #$ff
tax
ldy #0
sta SETWRITEAUX
.1 inx
bne .2
pla
inc
beq .3
pha
.2 lda (ZPPtr1),y
sta (ZPPtr2),y
iny
bne .1
inc ZPPtr1+1
inc ZPPtr2+1
bra .1
.3 sta CLRWRITEAUX
rts
*--------------------------------------
ClrScr lda #$55
ldx #0
sta SETHIRES
sta SET80STORE
@ -260,7 +260,7 @@ ClrScr lda #$55
jsr .2
eor #$7F
sta CLRPAGE2
jsr .2
@ -362,7 +362,7 @@ STATUS >STYA ZPIOCTL
ldy #S.IOCTL.BUFPTR
lda (ZPIOCTL),y
sta ZPBasePtr
iny
iny
lda (ZPIOCTL),y
sta ZPBasePtr+1
@ -402,14 +402,14 @@ OPEN tax DEV.ID in A
lda #S.DIB.S.OPENED
bit DIB+S.DIB.S
bne CLOSE.IOE
lda A2osX.SCRNDEVS+9
beq .1
lda #E.OOH
sec
rts
.1 stx A2osX.SCRNDEVS+9
stx DCB+S.DCB.GFX.DEVID
@ -419,7 +419,7 @@ OPEN tax DEV.ID in A
CONTROL lda DCB+S.DCB.GFX.DEVID NON STANDARD
cmp A2osX.ASCREEN
beq .8
sta A2osX.ASCREEN
ldy #0
@ -446,9 +446,9 @@ CLOSE.IOE lda #MLI.E.IO
CLOSE lda #S.DIB.S.OPENED
bit DIB+S.DIB.S
beq CLOSE.IOE
trb DIB+S.DIB.S
stz A2osX.SCRNDEVS+9
clc
@ -458,18 +458,18 @@ WRITE >STYA ZPIOCTL NON STANDARD
lda (ZPIOCTL) Get Cmd
bmi .2
pha
lsr
tax
ldy CB.CmdLen-1,x
.1 lda (ZPIOCTL),y
sta CB.Cache,y
dey
bpl .1
plx
jmp (J.Cmds-2,x)
@ -533,7 +533,7 @@ YAMultX stx ZPTmpByte
ldy #0 Result LO
tya Result HI
bra .3
.1 pha
tya
clc
@ -541,7 +541,7 @@ YAMultX stx ZPTmpByte
tay
pla
adc ZPTmpWord+1
.2 asl ZPTmpWord
rol ZPTmpWord+1
@ -634,7 +634,7 @@ DIB .DA #0
.BS 3
.DA #S.DIB.T.GFX
.DA #0
.DA #94,#00
.DA #00,#94
*--------------------------------------
DCB .DA #S.DCB.T.GFX
.BS 1 DEV.ID

View File

@ -1,20 +1,22 @@
NEW
AUTO 3,1
*--------------------------------------
LIBGUI.SetCursor .EQ 4
LIBGUI.SetCursorPos .EQ 6
LIBGUI.HideCursor .EQ 8
LIBGUI.ShowCursor .EQ 10
LIBGUI.UpdateCursor .EQ 12
LIBGUI.PTR.Set .EQ 4
LIBGUI.PTR.SetPos .EQ 6
LIBGUI.PTR.Hide .EQ 8
LIBGUI.PTR.Show .EQ 10
LIBGUI.PTR.Update .EQ 12
LIBGUI.ReadMouse .EQ 14
LIBGUI.DrawLine .EQ 16
LIBGUI.DRAW.Line .EQ 16
LIBGUI.OBJ.SetProp .EQ 18
LIBGUI.OBJ.GetProp .EQ 20
LIBGUI.WND.New .EQ 22
LIBGUI.WND.Destroy .EQ 24
LIBGUI.WND.Show .EQ 26
LIBGUI.WND.Paint .EQ 28
LIBGUI.MSG.Get .EQ 30
LIBGUI.WND.SetMBar .EQ 30
LIBGUI.MSG.Get .EQ 32
LIBGUI.MBAR.New .EQ 34
*--------------------------------------
C.BLACK .EQ 0
C16.D.BLUE .EQ 1
@ -33,15 +35,19 @@ C16.PINK .EQ 13
C16.YELLOW .EQ 14
C.WHITE .EQ 255
*--------------------------------------
CUR.T.ARROW .EQ 0
CUR.T.MOVE .EQ 2
CUR.T.RESIZEX .EQ 4
CUR.T.RESIZEY .EQ 6
CUR.T.RESIZEXY1 .EQ 8
CUR.T.RESIZEXY2 .EQ 10
CUR.T.CROSS .EQ 12
CUR.T.TEXT .EQ 14
CUR.T.WAIT .EQ 16
PTR.T.ARROW .EQ 0
PTR.T.MOVE .EQ 2
PTR.T.RESIZEX .EQ 4
PTR.T.RESIZEY .EQ 6
PTR.T.RESIZEXY1 .EQ 8
PTR.T.RESIZEXY2 .EQ 10
PTR.T.CROSS .EQ 12
PTR.T.TEXT .EQ 14
PTR.T.WAIT .EQ 16
*--------------------------------------
KEYMOD.CTRL .EQ %10000000
KEYMOD.OA .EQ %01000000
KEYMOD.CA .EQ %00100000
*--------------------------------------
S.MSG.T .EQ 0
S.MSG.T.KEY .EQ 0
@ -126,13 +132,16 @@ S.WND.S.ACTIVE .EQ %01000000
*
S.WND.MinW .EQ S.OBJ
S.WND.MinH .EQ S.OBJ+2
S.WND.TITLE .EQ S.OBJ+4
S.WND.MBAR .EQ S.OBJ+6
S.WND.STATUS .EQ S.OBJ+8
S.WND.pTITLE .EQ S.OBJ+4
S.WND.pMBAR .EQ S.OBJ+6
S.WND.pSTATUS .EQ S.OBJ+8
S.WND.ICON .EQ S.OBJ+10
S.WND.BGCOLOR .EQ S.OBJ+12
S.WND.BGBM .EQ S.OBJ+14
S.WND.hCUR .EQ S.OBJ+16
*
* private
*
S.WND.TitleX1 .EQ S.OBJ+18
S.WND.TitleX2 .EQ S.OBJ+20
S.WND.TBarY2 .EQ S.OBJ+22
@ -151,51 +160,41 @@ S.WND.fPaint .EQ S.OBJ+40
*
S.WND .EQ S.OBJ+42
*--------------------------------------
S.MBAR.MBITEMS .EQ S.OBJ
S.MBAR.Selected .EQ S.OBJ+2
S.MBAR.Selected .EQ S.OBJ
S.MBAR.Items .EQ S.OBJ+2
*
S.MBAR .EQ S.OBJ+4
*--------------------------------------
S.MBITEM.NEXT .EQ 0
S.MBITEM.S .EQ 1
S.MBITEM.X1 .EQ 2
S.MBITEM.XT .EQ 4
S.MBITEM.X2 .EQ 6
S.MBITEM.MENU .EQ 8
S.MBITEM.TEXT .EQ 10
*--------------------------------------
S.MENU.MITEMS .EQ S.OBJ
S.MENU.hSAVEBUF .EQ S.OBJ+2
S.MENU.pX1 .EQ S.OBJ+4
S.MENU.pY1 .EQ S.OBJ+6
S.MENU.pX2 .EQ S.OBJ+8
S.MENU.pY2 .EQ S.OBJ+10
S.MENU.Selected .EQ S.OBJ+12
S.MENU.iW .EQ S.OBJ+13
S.MENU.tW .EQ S.OBJ+14
S.MENU.kW .EQ S.OBJ+16
S.MBITEM.X1 .EQ 0
S.MBITEM.XT .EQ 2
S.MBITEM.X2 .EQ 4
S.MBITEM.pTEXT .EQ 6
S.MBITEM.pMENU .EQ 8
*
S.MENU .EQ S.OBJ+18
S.MBITEM .EQ 10
*--------------------------------------
S.MITEM.NEXT .EQ 0
S.MITEM.F .EQ 1
S.MITEM.F.SEP .EQ 2
S.MITEM.F.ITEM .EQ 4
S.MITEM.F.SUBMENU .EQ 6
S.MITEM.S .EQ 2
S.MITEM.S.CHECKED .EQ %01000000
S.MITEM.S.DISABLED .EQ %10000000
S.MITEM.ID .EQ 3
S.MITEM.pICON .EQ 4
S.MENU.hSAVEBUF .EQ S.OBJ+0
S.MENU.iW .EQ S.OBJ+2
S.MENU.tW .EQ S.OBJ+4
S.MENU.kW .EQ S.OBJ+6
S.MENU.Items .EQ S.OBJ+8
*
*--------------------------------------
S.MITEM.T .EQ 0
S.MITEM.T.SEP .EQ 2
S.MITEM.T.ITEM .EQ 4
S.MITEM.T.SUBMENU .EQ 6
S.MITEM.S .EQ 1
S.MITEM.S.SELECTED .EQ %10000000
S.MITEM.S.DISABLED .EQ %00000010
S.MITEM.S.CHECKED .EQ %00000001
S.MITEM.pICON .EQ 2
S.MITEM.pTEXT .EQ 4
S.MITEM.pMENU .EQ 6
S.MITEM.KEYMOD .EQ 6
S.MITEM.KEYMOD.CA .EQ 2
S.MITEM.KEYMOD.OA .EQ 4
S.MITEM.KEYMOD.CTRL .EQ 8
S.MITEM.KEY .EQ 7
S.MITEM.KEYSTR .EQ 8
S.MITEM.TEXT .EQ 9 CSTR
* ...
S.MITEM.KEYMOD .EQ 8
S.MITEM.KEY .EQ 9
S.MITEM.ID .EQ 10
*
S.MITEM .EQ 12
*--------------------------------------
BM.ID.APPLE .EQ 2
BM.ID.CLOSE .EQ 4

View File

@ -1,411 +1,6 @@
NEW
AUTO 3,1
*--------------------------------------
CUR.T .BS 1
CUR.bVisible .BS 1
CUR.Pos .BS S.POINT
*--------------------------------------
CUR.HotPoints .DA #0,#0 CUR.T.ARROW
.DA #6,#6 CUR.T.MOVE
.DA #7,#4 CUR.ResizeX
.DA #6,#5 CUR.ResizeY
.DA #5,#5 CUR.ResizeXY1
.DA #5,#5 CUR.ResizeXY2
.DA #5,#5 CUR.Cross
.DA #5,#3 CUR.Text
.DA #5,#6 CUR.Wait1
.DA #5,#6 CUR.Wait2
.DA #5,#6 CUR.Wait3
.DA #5,#6 CUR.Wait4
.DA #8,#7 CUR.Wait5
.DA #8,#7 CUR.Wait6
*--------------------------------------
CUR.SaveBuf .BS 64 16*4
*--------------------------------------
CUR.Arrow .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 13 H
.DA CUR.Arrow.MASK-CUR.Arrow
.DA %000.00000000
.DA %000.00000010
.DA %000.00000110
.DA %000.00001110
.DA %000.00011110
.DA %000.00111110
.DA %000.01111110
.DA %000.11111110
.DA %001.11111110
.DA %010.01111110
.DA %000.11110010
.DA %000.11100000
.DA %000.00000000
CUR.Arrow.MASK .DA %111.11111100
.DA %111.11111000
.DA %111.11110000
.DA %111.11100000
.DA %111.11000000
.DA %111.10000000
.DA %111.00000000
.DA %110.00000000
.DA %100.00000000
.DA %000.00000000
.DA %000.00000000
.DA %110.00000000
.DA %110.00001111
*--------------------------------------
CUR.Move .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 11 H
.DA CUR.Move.MASK-CUR.Move
.DA %000.00100000
.DA %000.01010000
.DA %000.10001000
.DA %001.00000100
.DA %010.00000010
.DA %100.00000001
.DA %010.00000010
.DA %001.00000100
.DA %000.10001000
.DA %000.01010000
.DA %000.00100000
CUR.Move.MASK
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
*--------------------------------------
CUR.ResizeX .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 14 W
.DA 7 H
.DA CUR.ResizeX.MASK-CUR.ResizeX
.DA %000000.00000000
.DA %000100.00001000
.DA %001100.00001100
.DA %011111.11111110
.DA %001100.00001100
.DA %000100.00001000
.DA %000000.00000000
CUR.ResizeX.MASK
.DA %111001.11100111
.DA %110001.11100011
.DA %100000.00000001
.DA %000000.00000000
.DA %100000.00000001
.DA %110001.11100011
.DA %111001.11100111
*--------------------------------------
CUR.ResizeY .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 9 W
.DA 11 H
.DA CUR.ResizeY.MASK-CUR.ResizeY
.DA %0.00000000
.DA %0.00010000
.DA %0.01111100
.DA %0.11111110
.DA %0.00010000
.DA %0.00010000
.DA %0.00010000
.DA %0.11111110
.DA %0.01111100
.DA %0.00010000
.DA %0.00000000
CUR.ResizeY.MASK
.DA %1.11101111
.DA %1.11000111
.DA %1.00000001
.DA %0.00000000
.DA %0.00000000
.DA %1.11000111
.DA %1.11000111
.DA %0.00000000
.DA %1.00000001
.DA %1.11000111
.DA %1.11101111
*--------------------------------------
CUR.ResizeXY1 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 11 H
.DA CUR.ResizeXY1.MASK-CUR.ResizeXY1
.DA %000.00000000
.DA %011.11000000
.DA %011.10000000
.DA %011.10000000
.DA %010.01000000
.DA %000.00100000
.DA %000.00010010
.DA %000.00001110
.DA %000.00001110
.DA %000.00011110
.DA %000.00000000
CUR.ResizeXY1.MASK
.DA %000.00001111
.DA %000.00011111
.DA %000.00111111
.DA %000.00111111
.DA %000.00011110
.DA %001.10001100
.DA %011.11000000
.DA %111.11100000
.DA %111.11100000
.DA %111.11000000
.DA %111.10000000
*--------------------------------------
CUR.ResizeXY2 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 11 H
.DA CUR.ResizeXY2.MASK-CUR.ResizeXY2
.DA %000.00000000
.DA %000.00011110
.DA %000.00001110
.DA %000.00001110
.DA %000.00010010
.DA %000.00100000
.DA %010.01000000
.DA %011.10000000
.DA %011.10000000
.DA %011.11000000
.DA %000.00000000
CUR.ResizeXY2.MASK
.DA %111.10000000
.DA %111.11000000
.DA %111.11100000
.DA %111.11100000
.DA %011.11000000
.DA %001.10001100
.DA %000.00011110
.DA %000.00111111
.DA %000.00111111
.DA %000.00011111
.DA %000.00001111
*--------------------------------------
CUR.Cross .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 11 H
.DA CUR.Cross.MASK-CUR.Cross
.DA %000.00100000
.DA %000.01010000
.DA %000.01010000
.DA %000.01010000
.DA %011.11011110
.DA %100.00000001
.DA %011.11011110
.DA %000.01010000
.DA %000.01010000
.DA %000.01010000
.DA %000.00100000
CUR.Cross.MASK
.DA %111.11011111
.DA %111.10001111
.DA %111.10001111
.DA %111.10001111
.DA %100.00000001
.DA %000.00100000
.DA %100.00000001
.DA %111.10001111
.DA %111.10001111
.DA %111.10001111
.DA %111.11011111
*--------------------------------------
CUR.Text .DA #S.BM.F.BBP1
.DA #1 RowBytes
.DA 7 W
.DA 11 H
.DA CUR.Text.MASK-CUR.Text
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
CUR.Text.MASK
.DA #%0011100
.DA #%1101011
.DA #%1110111
.DA #%1110111
.DA #%1110111
.DA #%1110111
.DA #%1110111
.DA #%1110111
.DA #%1110111
.DA #%1101011
.DA #%0011100
*--------------------------------------
CUR.Wait1 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 13 H
.DA CUR.Wait4.MASK-CUR.Wait1
.DA %000.00000000
.DA %001.11111100
.DA %001.00000100
.DA %000.10001000
.DA %000.01010000
.DA %000.00100000
.DA %000.00100000
.DA %000.00100000
.DA %000.01110000
.DA %000.11111000
.DA %001.11111100
.DA %001.11111100
.DA %000.00000000
*--------------------------------------
CUR.Wait2 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 13 H
.DA CUR.Wait4.MASK-CUR.Wait2
.DA %000.00000000
.DA %001.11111100
.DA %001.11111100
.DA %000.10001000
.DA %000.01010000
.DA %000.00100000
.DA %000.00100000
.DA %000.00100000
.DA %000.01110000
.DA %000.11111000
.DA %001.00000100
.DA %001.11111100
.DA %000.00000000
*--------------------------------------
CUR.Wait3 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 13 H
.DA CUR.Wait4.MASK-CUR.Wait3
.DA %000.00000000
.DA %001.11111100
.DA %001.11111100
.DA %000.11111000
.DA %000.01010000
.DA %000.00100000
.DA %000.00100000
.DA %000.00100000
.DA %000.01110000
.DA %000.10001000
.DA %001.00000100
.DA %001.11111100
.DA %000.00000000
*--------------------------------------
CUR.Wait4 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 13 H
.DA CUR.Wait4.MASK-CUR.Wait4
.DA %000.00000000
.DA %001.11111100
.DA %001.11111100
.DA %000.11111000
.DA %000.01110000
.DA %000.00100000
.DA %000.00100000
.DA %000.00100000
.DA %000.01010000
.DA %000.10001000
.DA %001.00000100
.DA %001.11111100
.DA %000.00000000
CUR.Wait4.MASK .DA %110.00000011
.DA %100.00000001
.DA %100.00000001
.DA %110.00000011
.DA %111.00000111
.DA %111.10001111
.DA %111.10001111
.DA %111.10001111
.DA %111.00000111
.DA %110.00000011
.DA %100.00000001
.DA %100.00000001
.DA %110.00000011
*--------------------------------------
CUR.Wait5 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 16 W
.DA 14 H
.DA CUR.Wait5.MASK-CUR.Wait5
.DA %00000000.00000000
.DA %00000010.00000000
.DA %00000110.00000000
.DA %00001110.00000000
.DA %00011110.00000000
.DA %00111110.00000000
.DA %00000001.00000000
.DA %00000000.10000000
.DA %00000000.01111100
.DA %00000000.01001000
.DA %00000000.01010000
.DA %00000000.01100000
.DA %00000000.01000000
.DA %00000000.00000000
CUR.Wait5.MASK .DA %11111100.11111111
.DA %11111000.11111111
.DA %11110000.11111111
.DA %11100000.11111111
.DA %11000000.11111111
.DA %10000000.01111111
.DA %10000000.00111111
.DA %11111100.00000001
.DA %11111110.00000001
.DA %11111111.00000011
.DA %11111111.00000111
.DA %11111111.00001111
.DA %11111111.00011111
.DA %11111111.00111111
*--------------------------------------
CUR.Wait6 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 16 W
.DA 14 H
.DA CUR.Wait6.MASK-CUR.Wait6
.DA %00000000.00000000
.DA %00000000.01000000
.DA %00000000.01100000
.DA %00000000.01010000
.DA %00000000.01001000
.DA %00000000.01111100
.DA %00000000.10000000
.DA %00000001.00000000
.DA %00111110.00000000
.DA %00011110.00000000
.DA %00001110.00000000
.DA %00000110.00000000
.DA %00000010.00000000
.DA %00000000.00000000
CUR.Wait6.MASK .DA %11111111.00111111
.DA %11111111.00011111
.DA %11111111.00001111
.DA %11111111.00000111
.DA %11111111.00000011
.DA %11111110.00000001
.DA %11111100.00000001
.DA %10000000.00111111
.DA %10000000.01111111
.DA %11000000.11111111
.DA %11100000.11111111
.DA %11110000.11111111
.DA %11111000.11111111
.DA %11111100.11111111
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.g.cur

413
LIB/LIBGUI.G.PTR.txt Normal file
View File

@ -0,0 +1,413 @@
NEW
AUTO 3,1
*--------------------------------------
PTR.T .BS 1
PTR.bVisible .BS 1
PTR.Pos .BS S.POINT
*--------------------------------------
PTR.HotPoints .DA #0,#0 PTR.T.ARROW
.DA #6,#6 PTR.T.MOVE
.DA #7,#4 PTR.ResizeX
.DA #6,#5 PTR.ResizeY
.DA #5,#5 PTR.ResizeXY1
.DA #5,#5 PTR.ResizeXY2
.DA #5,#5 PTR.Cross
.DA #5,#3 PTR.Text
.DA #5,#6 PTR.Wait1
.DA #5,#6 PTR.Wait2
.DA #5,#6 PTR.Wait3
.DA #5,#6 PTR.Wait4
.DA #8,#7 PTR.Wait5
.DA #8,#7 PTR.Wait6
*--------------------------------------
PTR.SaveBuf .BS 64 16*4
*--------------------------------------
PTR.Arrow .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 13 H
.DA PTR.Arrow.MASK-PTR.Arrow
.DA %000.00000000
.DA %000.00000010
.DA %000.00000110
.DA %000.00001110
.DA %000.00011110
.DA %000.00111110
.DA %000.01111110
.DA %000.11111110
.DA %001.11111110
.DA %010.01111110
.DA %000.11110010
.DA %000.11100000
.DA %000.00000000
PTR.Arrow.MASK .DA %111.11111100
.DA %111.11111000
.DA %111.11110000
.DA %111.11100000
.DA %111.11000000
.DA %111.10000000
.DA %111.00000000
.DA %110.00000000
.DA %100.00000000
.DA %000.00000000
.DA %000.00000000
.DA %110.00000000
.DA %110.00001111
*--------------------------------------
PTR.Move .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 11 H
.DA PTR.Move.MASK-PTR.Move
.DA %000.00100000
.DA %000.01010000
.DA %000.10001000
.DA %001.00000100
.DA %010.00000010
.DA %100.00000001
.DA %010.00000010
.DA %001.00000100
.DA %000.10001000
.DA %000.01010000
.DA %000.00100000
PTR.Move.MASK
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
.DA %111.11111111
*--------------------------------------
PTR.ResizeX .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 14 W
.DA 7 H
.DA PTR.ResizeX.MASK-PTR.ResizeX
.DA %000000.00000000
.DA %000100.00001000
.DA %001100.00001100
.DA %011111.11111110
.DA %001100.00001100
.DA %000100.00001000
.DA %000000.00000000
PTR.ResizeX.MASK
.DA %111001.11100111
.DA %110001.11100011
.DA %100000.00000001
.DA %000000.00000000
.DA %100000.00000001
.DA %110001.11100011
.DA %111001.11100111
*--------------------------------------
PTR.ResizeY .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 9 W
.DA 11 H
.DA PTR.ResizeY.MASK-PTR.ResizeY
.DA %0.00000000
.DA %0.00010000
.DA %0.01111100
.DA %0.11111110
.DA %0.00010000
.DA %0.00010000
.DA %0.00010000
.DA %0.11111110
.DA %0.01111100
.DA %0.00010000
.DA %0.00000000
PTR.ResizeY.MASK
.DA %1.11101111
.DA %1.11000111
.DA %1.00000001
.DA %0.00000000
.DA %0.00000000
.DA %1.11000111
.DA %1.11000111
.DA %0.00000000
.DA %1.00000001
.DA %1.11000111
.DA %1.11101111
*--------------------------------------
PTR.ResizeXY1 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 11 H
.DA PTR.ResizeXY1.MASK-PTR.ResizeXY1
.DA %000.00000000
.DA %011.11000000
.DA %011.10000000
.DA %011.10000000
.DA %010.01000000
.DA %000.00100000
.DA %000.00010010
.DA %000.00001110
.DA %000.00001110
.DA %000.00011110
.DA %000.00000000
PTR.ResizeXY1.MASK
.DA %000.00001111
.DA %000.00011111
.DA %000.00111111
.DA %000.00111111
.DA %000.00011110
.DA %001.10001100
.DA %011.11000000
.DA %111.11100000
.DA %111.11100000
.DA %111.11000000
.DA %111.10000000
*--------------------------------------
PTR.ResizeXY2 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 11 H
.DA PTR.ResizeXY2.MASK-PTR.ResizeXY2
.DA %000.00000000
.DA %000.00011110
.DA %000.00001110
.DA %000.00001110
.DA %000.00010010
.DA %000.00100000
.DA %010.01000000
.DA %011.10000000
.DA %011.10000000
.DA %011.11000000
.DA %000.00000000
PTR.ResizeXY2.MASK
.DA %111.10000000
.DA %111.11000000
.DA %111.11100000
.DA %111.11100000
.DA %011.11000000
.DA %001.10001100
.DA %000.00011110
.DA %000.00111111
.DA %000.00111111
.DA %000.00011111
.DA %000.00001111
*--------------------------------------
PTR.Cross .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 11 H
.DA PTR.Cross.MASK-PTR.Cross
.DA %000.00100000
.DA %000.01010000
.DA %000.01010000
.DA %000.01010000
.DA %011.11011110
.DA %100.00000001
.DA %011.11011110
.DA %000.01010000
.DA %000.01010000
.DA %000.01010000
.DA %000.00100000
PTR.Cross.MASK
.DA %111.11011111
.DA %111.10001111
.DA %111.10001111
.DA %111.10001111
.DA %100.00000001
.DA %000.00100000
.DA %100.00000001
.DA %111.10001111
.DA %111.10001111
.DA %111.10001111
.DA %111.11011111
*--------------------------------------
PTR.Text .DA #S.BM.F.BBP1
.DA #1 RowBytes
.DA 7 W
.DA 11 H
.DA PTR.Text.MASK-PTR.Text
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
.DA #%0000000
PTR.Text.MASK
.DA #%0011100
.DA #%1101011
.DA #%1110111
.DA #%1110111
.DA #%1110111
.DA #%1110111
.DA #%1110111
.DA #%1110111
.DA #%1110111
.DA #%1101011
.DA #%0011100
*--------------------------------------
PTR.Wait1 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 13 H
.DA PTR.Wait4.MASK-PTR.Wait1
.DA %000.00000000
.DA %001.11111100
.DA %001.00000100
.DA %000.10001000
.DA %000.01010000
.DA %000.00100000
.DA %000.00100000
.DA %000.00100000
.DA %000.01110000
.DA %000.11111000
.DA %001.11111100
.DA %001.11111100
.DA %000.00000000
*--------------------------------------
PTR.Wait2 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 13 H
.DA PTR.Wait4.MASK-PTR.Wait2
.DA %000.00000000
.DA %001.11111100
.DA %001.11111100
.DA %000.10001000
.DA %000.01010000
.DA %000.00100000
.DA %000.00100000
.DA %000.00100000
.DA %000.01110000
.DA %000.11111000
.DA %001.00000100
.DA %001.11111100
.DA %000.00000000
*--------------------------------------
PTR.Wait3 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 13 H
.DA PTR.Wait4.MASK-PTR.Wait3
.DA %000.00000000
.DA %001.11111100
.DA %001.11111100
.DA %000.11111000
.DA %000.01010000
.DA %000.00100000
.DA %000.00100000
.DA %000.00100000
.DA %000.01110000
.DA %000.10001000
.DA %001.00000100
.DA %001.11111100
.DA %000.00000000
*--------------------------------------
PTR.Wait4 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 11 W
.DA 13 H
.DA PTR.Wait4.MASK-PTR.Wait4
.DA %000.00000000
.DA %001.11111100
.DA %001.11111100
.DA %000.11111000
.DA %000.01110000
.DA %000.00100000
.DA %000.00100000
.DA %000.00100000
.DA %000.01010000
.DA %000.10001000
.DA %001.00000100
.DA %001.11111100
.DA %000.00000000
PTR.Wait4.MASK .DA %110.00000011
.DA %100.00000001
.DA %100.00000001
.DA %110.00000011
.DA %111.00000111
.DA %111.10001111
.DA %111.10001111
.DA %111.10001111
.DA %111.00000111
.DA %110.00000011
.DA %100.00000001
.DA %100.00000001
.DA %110.00000011
*--------------------------------------
PTR.Wait5 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 16 W
.DA 14 H
.DA PTR.Wait5.MASK-PTR.Wait5
.DA %00000000.00000000
.DA %00000010.00000000
.DA %00000110.00000000
.DA %00001110.00000000
.DA %00011110.00000000
.DA %00111110.00000000
.DA %00000001.00000000
.DA %00000000.10000000
.DA %00000000.01111100
.DA %00000000.01001000
.DA %00000000.01010000
.DA %00000000.01100000
.DA %00000000.01000000
.DA %00000000.00000000
PTR.Wait5.MASK .DA %11111100.11111111
.DA %11111000.11111111
.DA %11110000.11111111
.DA %11100000.11111111
.DA %11000000.11111111
.DA %10000000.01111111
.DA %10000000.00111111
.DA %11111100.00000001
.DA %11111110.00000001
.DA %11111111.00000011
.DA %11111111.00000111
.DA %11111111.00001111
.DA %11111111.00011111
.DA %11111111.00111111
*--------------------------------------
PTR.Wait6 .DA #S.BM.F.BBP1
.DA #2 RowBytes
.DA 16 W
.DA 14 H
.DA PTR.Wait6.MASK-PTR.Wait6
.DA %00000000.00000000
.DA %00000000.01000000
.DA %00000000.01100000
.DA %00000000.01010000
.DA %00000000.01001000
.DA %00000000.01111100
.DA %00000000.10000000
.DA %00000001.00000000
.DA %00111110.00000000
.DA %00011110.00000000
.DA %00001110.00000000
.DA %00000110.00000000
.DA %00000010.00000000
.DA %00000000.00000000
PTR.Wait6.MASK .DA %11111111.00111111
.DA %11111111.00011111
.DA %11111111.00001111
.DA %11111111.00000111
.DA %11111111.00000011
.DA %11111110.00000001
.DA %11111100.00000001
.DA %10000000.00111111
.DA %10000000.01111111
.DA %11000000.11111111
.DA %11100000.11111111
.DA %11110000.11111111
.DA %11111000.11111111
.DA %11111100.11111111
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.g.ptr
LOAD usr/src/lib/libgui.s
ASM

View File

@ -1,155 +1,6 @@
NEW
AUTO 3,1
*--------------------------------------
UpdateCursor lda CUR.T
cmp #CUR.T.WAIT
bcc SetCursor.RTS
inc
inc
cmp #CUR.T.WAIT+12
bne SetCursor
lda #CUR.T.WAIT
*--------------------------------------
* Set X2,Y2,SrcPtr
*--------------------------------------
SetCursor sta CUR.T
lda CUR.bVisible
bpl .1
jsr HideCursor.I
.1 ldx CUR.T
lda L.Cursors,x
sta CB.PTR+S.CB.SrcPtr
sta ZPPtr1
lda L.Cursors+1,x
sta CB.PTR+S.CB.SrcPtr+1
sta ZPPtr1+1
ldy #S.BM.W
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcW
clc
adc CB.PTR+S.CB.X1
pha
iny
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcW+1
adc CB.PTR+S.CB.X1+1
tax
pla
bne .2
dex
.2 dec
sta CB.PTR+S.CB.X2
stx CB.PTR+S.CB.X2+1
iny S.BM.H
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcH
clc
adc CB.PTR+S.CB.Y1
pha
iny
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcH+1
adc CB.PTR+S.CB.Y1+1
tax
pla
bne .3
dex
.3 dec
sta CB.PTR+S.CB.Y2
stx CB.PTR+S.CB.Y2+1
lda CUR.bVisible
bmi ShowCursor.I
SetCursor.RTS rts
*--------------------------------------
* Set DestX,DestY
*--------------------------------------
SetCursorPos >PULLW ZPPtr1
lda CUR.bVisible
bpl .1
jsr HideCursor.I
.1 ldy #S.POINT-1
.2 lda (ZPPtr1),y
sta CUR.Pos,y
dey
bpl .2
lda CUR.bVisible
bmi ShowCursor.I
clc
rts
*--------------------------------------
HideCursor lda CUR.bVisible
bpl .9
jsr HideCursor.I
stz CUR.bVisible
.9 clc
rts
*--------------------------------------
ShowCursor lda CUR.bVisible
bmi .9
jsr ShowCursor.I
dec CUR.bVisible
.9 rts
*--------------------------------------
HideCursor.I lda #S.CB.OP.RESTORE
bra DrawCursor.I
*--------------------------------------
ShowCursor.I ldx CUR.T
lda CUR.Pos+S.POINT.X
sec
sbc CUR.HotPoints,x
sta CB.PTR+S.CB.X1
lda CUR.Pos+S.POINT.X+1
sbc #0
sta CB.PTR+S.CB.X1+1
lda CUR.Pos+S.POINT.Y
sec
sbc CUR.HotPoints+1,x
sta CB.PTR+S.CB.Y1
lda CUR.Pos+S.POINT.Y+1
sbc #0
sta CB.PTR+S.CB.Y1+1
lda #S.CB.OP.ORA+S.CB.OP.MASK+S.CB.OP.SAVE
DrawCursor.I sta CB.PTR+S.CB.OP
>LDYA L.WND.Screen
jsr OBJ.GetInCache
>LDYA L.CB.PTR
jsr CLIP.YA
bcs .8
jsr GFXWrite.CB
.8 clc
rts
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.s.cur

View File

@ -3,7 +3,7 @@ NEW
*--------------------------------------
* drawline(short int hWND, short int OP, short int COLOR, int X1, int Y1, int X2, int X2)
*--------------------------------------
DrawLine jsr DRAW.PullY2X2Y1X1
DRAW.Line jsr DRAW.PullY2X2Y1X1
>PULLB CB.Cache+S.CB.COLOR
>PULLB CB.Cache+S.CB.OP
@ -53,7 +53,7 @@ DrawLine jsr DRAW.PullY2X2Y1X1
jsr CLIP.CB.Cache
bcs .8
jmp GFXWrite.CB
jmp CB.GFXWrite
.8 rts
*--------------------------------------
.3 >NOT16 DY set DY=-DY
@ -65,21 +65,21 @@ DrawLine jsr DRAW.PullY2X2Y1X1
lda #S.CB.CMD.SETPIXEL
sta CB.Cache+S.CB.CMD
jsr GFXWrite.CB
jsr CB.GFXWrite
lda DX
sec
sbc DY
tax
lda DX+1
sbc DY+1
bmi DrawLine.IncY DY is greater than DX, we will increase on Y axis
bmi DRAW.Line.IncY DY is greater than DX, we will increase on Y axis
txa
beq DrawLine.IncXY DX=DY, go inc X & Y
beq DRAW.Line.IncXY DX=DY, go inc X & Y
jmp DrawLine.IncX DY is lower than DX, we will increase on X axis
jmp DRAW.Line.IncX DY is lower than DX, we will increase on X axis
*--------------------------------------
DrawLine.IncXY lda DX DX=DY
DRAW.Line.IncXY lda DX DX=DY
eor #$ff
sta Counter
lda DX+1
@ -100,12 +100,12 @@ DrawLine.IncXY lda DX DX=DY
clc
adc IY
sta CB.Cache+S.CB.Y1
jsr GFXWrite.CB
jsr CB.GFXWrite
bra .1
.8 rts
*--------------------------------------
DrawLine.IncY lda DY
DRAW.Line.IncY lda DY
eor #$ff
sta Counter
lda DY+1
@ -176,12 +176,12 @@ DrawLine.IncY lda DY
clc
adc IY
sta CB.Cache+S.CB.Y1
jsr GFXWrite.CB
jsr CB.GFXWrite
bra .1
.8 rts
*--------------------------------------
DrawLine.IncX lda DX
DRAW.Line.IncX lda DX
eor #$ff
sta Counter
lda DX+1
@ -253,7 +253,7 @@ DrawLine.IncX lda DX
inc CB.Cache+S.CB.X1+1
.6 jsr GFXWrite.CB
.6 jsr CB.GFXWrite
bra .1
.8 rts
@ -273,7 +273,7 @@ FillRectangle jsr DRAW.PullY2X2Y1X1
jsr CLIP.CB.Cache
bcs .8
jmp GFXWrite.CB
jmp CB.GFXWrite
.8 rts
*--------------------------------------
@ -294,7 +294,7 @@ DrawBitMap lda #S.CB.CMD.BITBLT
jsr CLIP.CB.Cache
bcs .8
jmp GFXWrite.CB
jmp CB.GFXWrite
.8 rts
*--------------------------------------
@ -333,7 +333,7 @@ DRAW.yaBMAtDXDY >STYA ZPBMPtr Src BM
lda ZPBMPtr+1
sta CB.Cache+S.CB.SrcPtr+1
jmp PutCBCache2CBBuf
jmp CB.Cache2CBBuf
*--------------------------------------
* drawtext (short int hWND, short int OP, short int hFONT, int X1, int Y1, char *str)
*--------------------------------------
@ -352,7 +352,7 @@ DrawText lda #S.CB.CMD.DRAWTEXT2
jsr CLIP.CB.Cache
bcs .8
jmp GFXWrite.CB
jmp CB.GFXWrite
.8 rts
*--------------------------------------
@ -384,7 +384,7 @@ DRAW.YATextAtDXDY
dex
bpl .1
jmp PutCBCache2CBBuf
jmp CB.Cache2CBBuf
*--------------------------------------
DRAW.PullY2X2Y1X1
ldx #7
@ -485,13 +485,16 @@ DRAW.AddP1YtoCBX
sta CB.Cache+1,x
rts
*--------------------------------------
DrawCBBufToYA pha
DrawCBBufToYA ldx hCBBuf
beq .80
pha
phy
bit CUR.bVisible
bit PTR.bVisible
bpl .1
jsr HideCursor.I
jsr PTR.Hide.I
.1 lda #0
sta (ZPCBBufPtr)
@ -512,13 +515,13 @@ DrawCBBufToYA pha
lda #S.CB.CMD.DRAWTEXT+S.CB.CMD.OSD
sta CB.Cache+S.CB.CMD
jsr GFXWrite.CB
jsr CB.GFXWrite
bcs .9
jsr CLIP.CB.Cache
bcs .3
jsr GFXWrite.CB
jsr CB.GFXWrite
.3 lda CB.Cache+S.CB.SrcPtr
>SYSCALL2 FreeStkObj
@ -527,7 +530,7 @@ DrawCBBufToYA pha
.6 jsr CLIP.CB.Cache
bcs .7
jsr GFXWrite.CB
jsr CB.GFXWrite
.7 lda (ZPCBPtr) Get Cmd
lsr
@ -545,13 +548,12 @@ DrawCBBufToYA pha
stz hCBBuf
>SYSCALL2 FreeMem
clc
bit PTR.bVisible
bpl .80
bit CUR.bVisible
bpl .9
jmp ShowCursor.I
jmp PTR.Show.I
.80 clc
.9 rts
*--------------------------------------
MAN

View File

@ -38,7 +38,7 @@ FON.GetTextSize >STYA CB.CACHE+S.CB.TxtPtr
lda #S.CB.CMD.GETTEXTSIZE+S.CB.CMD.OSD
sta CB.CACHE+S.CB.CMD
jmp GFXWrite.CB
jmp CB.GFXWrite
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.s.fon

View File

@ -1,84 +1,91 @@
NEW
AUTO 3,1
*--------------------------------------
* MBAR.New(*S.MBITEM mbitems)
* Y,A = MBAR definition
*--------------------------------------
MBAR.New >LDYAI S.MBAR
>SYSCALL2 getmem
bcs .99
MBAR.New >STYA ZPMENUPtr MBAR definition
>STYA ZPPtr1 for pass #2
lda #S.MBAR.Items+1 Ending\0
sta Counter
stz Counter+1
.10 lda (ZPMENUPtr)
beq .3
ldy #$ff
.1 iny
lda (ZPMENUPtr),y
bne .1
tya
sec text Ending\0
inc
inc skip pMENU
adc ZPMENUPtr
sta ZPMENUPtr
bcc .2
inc ZPMENUPtr+1
.2 tya
sec
adc #S.MBITEM
adc Counter
sta Counter
bcc .10
inc Counter+1
bra .10
.3 >LDYA Counter
>SYSCALL2 GetMem
bcs .9
>STYA ZPObjPtr
phx hMBAR
ldy #S.OBJ-1
lda #S.OBJ.T.MBAR
sta (ZPObjPtr) S.OBJ.T
lda #0
ldy #S.MBAR-1
.1 sta (ZPObjPtr),y
dey
bne .1
>PULLA
ldy #S.MBAR.MBITEMS
sta (ZPObjPtr),y
>PULLA
iny
sta (ZPObjPtr),y
jsr OBJ.Init
lda #S.MBAR.Items
clc
.99 rts
*--------------------------------------
MBAR.Init >STYA ZPMENUPtr
>STYA ZPPtr1
ldy #S.MBITEM.S
lda (ZPPtr1),y
bmi .80
adc ZPObjPtr
sta ZPObjPtr
bcc .4
stz DX
inc ZPObjPtr+1
.4 stz DX
stz DX+1
.1 lda (ZPPtr1)
.5 lda (ZPPtr1)
beq .8
lda #S.MBITEM.TEXT
clc
adc ZPPtr1
tay
lda ZPPtr1+1
adc #0
ldx hSYSFON
jsr FON.GetTextSize
ldy #S.MBITEM.X1
lda DX
sta (ZPPtr1),y
>LDYA DX
jsr OBJ.AddWord S.MBITEM.X1
iny
lda DX+1
sta (ZPPtr1),y
iny #S.MBITEM.XT
lda DX
clc
adc PREFS.MBARXMARGIN
sta DX
sta (ZPPtr1),y
bcc .6
iny
lda DX+1
adc #0
sta DX+1
sta (ZPPtr1),y
.6 >LDYA DX
jsr OBJ.AddWord S.MBITEM.XT
>LDYA ZPPtr1 pTEXT
ldx hSYSFON
jsr FON.GetTextSize
lda DX
clc
adc CB.CACHE+S.CB.SrcW
@ -87,36 +94,153 @@ MBAR.Init >STYA ZPMENUPtr
lda DX+1
adc CB.CACHE+S.CB.SrcW+1
sta DX+1
iny #S.MBITEM.X2
lda DX
clc
adc PREFS.MBARXMARGIN
sta DX
sta (ZPPtr1),y
iny
lda DX+1
adc #0
sta DX+1
sta (ZPPtr1),y
>LDYA DX
jsr OBJ.AddWord S.MBITEM.X2
>LDYA ZPPtr1 pTEXT
jsr OBJ.AddWord
jsr SkipStrZPtr1 skip "TEXT\0"
ldy #1
lda (ZPPtr1),y
jsr OBJ.AddByte pMENU+1
lda (ZPPtr1)
jsr OBJ.AddByte pMENU
lda ZPPtr1
clc
adc ZPPtr1
adc #2
sta ZPPtr1
bcc .1
bcc .5
inc ZPPtr1+1
bra .1
bra .5 stkip pMENU
.8 lda #$80
.8 pla hMBAR
clc
.9 rts
*--------------------------------------
*--------------------------------------
*--------------------------------------
* ZPWNDPtr = parent WND
*--------------------------------------
MBAR.Paint lda #S.CB.CMD.FILLRECT
jsr CB.InitCacheA
lda #S.CB.OP.SET
sta CB.Cache+S.CB.OP
lda #S.CB.M.MONO
sta CB.Cache+S.CB.M
lda PREFS.MBARCOLOR
sta CB.Cache+S.CB.COLOR
ldy #S.OBJ.X1
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.X1
iny
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.X1+1
ldy #S.OBJ.X2
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.X2
iny
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.X2+1
ldy #S.WND.MBarY1
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.Y1
iny
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.Y1+1
iny #S.WND.MBarY2
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.Y2
iny
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.Y2+1
jsr CB.Cache2CBBuf
ldy #S.WND.pMBAR
lda (ZPWNDPtr),y
sta ZPMENUPtr
iny
lda (ZPWNDPtr),y
sta ZPMENUPtr+1
.1 lda (ZPMENUPtr)
beq .8
jsr CB.ClearCache
lda #S.CB.CMD.DRAWTEXT2
sta CB.CACHE+S.CB.CMD
lda #S.CB.OP.SET+S.CB.OP.INVERSE
sta CB.Cache+S.CB.OP
lda #S.CB.M.MONO
sta CB.Cache+S.CB.M
lda hSYSFON
sta CB.CACHE+S.CB.hFont
ldy #S.MBITEM.XT
lda (ZPMENUPtr),y
clc
ldy #S.OBJ.X1
adc (ZPWNDPtr),y
sta CB.CACHE+S.CB.X1
ldy #S.MBITEM.XT+1
lda (ZPMENUPtr),y
ldy #S.OBJ.X1+1
adc (ZPWNDPtr),y
sta CB.CACHE+S.CB.X1+1
ldy #S.WND.MBarY1
lda (ZPWNDPtr),y
clc
adc #1
sta CB.CACHE+S.CB.Y1
iny
lda (ZPWNDPtr),y
adc #0
sta CB.CACHE+S.CB.Y1+1
lda #S.MBITEM.pTEXT
clc
adc ZPMENUPtr
sta CB.CACHE+S.CB.TxtPtr
lda #0
adc ZPMENUPtr+1
sta CB.CACHE+S.CB.TxtPtr+1
jsr CB.Cache2CBBuf
lda (ZPMENUPtr)
clc
adc ZPMENUPtr
sta ZPMENUPtr
bcc .1
inc ZPMENUPtr+1
bra .1
.8 clc
ldy #S.MBITEM.S
sta (ZPMENUPtr),y
.80 clc
rts
*--------------------------------------
* ZPWNDPtr parent WND

File diff suppressed because it is too large Load Diff

View File

@ -22,19 +22,19 @@ MOU.Init >PUSHW L.DEVNAME.MOUSE
MOU.Setup lda DCB.GFX+S.DCB.GFX.W+1
sta MouseClamp+3
lsr
sta CUR.Pos+S.POINT.X+1
sta PTR.Pos+S.POINT.X+1
lda DCB.GFX+S.DCB.GFX.W
sta MouseClamp+2
ror
sta CUR.Pos+S.POINT.X
sta PTR.Pos+S.POINT.X
lda DCB.GFX+S.DCB.GFX.H+1
sta MouseClamp+7
lsr
sta CUR.Pos+S.POINT.Y+1
sta PTR.Pos+S.POINT.Y+1
lda DCB.GFX+S.DCB.GFX.H
sta MouseClamp+6
ror
sta CUR.Pos+S.POINT.Y
sta PTR.Pos+S.POINT.Y
>PUSHB hDevMouse
>PUSHBI IOCTL.CONTROL
@ -42,7 +42,7 @@ MOU.Setup lda DCB.GFX+S.DCB.GFX.W+1
>SYSCALL2 IOCTL
bcs .9
>LDYA L.CUR.SaveBuf
>LDYA L.PTR.SaveBuf
>STYA CB.PTR+S.CB.DstPtr
* clc
@ -88,11 +88,13 @@ MOU.ReadMouse >PULLW ZPPtr1 pS.XY
.99 rts
*--------------------------------------
MOU.CheckOverMenu
.1 ldx MENU.Stack.Top
.1 ldx MENU.Stack.Cnt
beq .9
lda MENU.Stack-1,x
.2 phx
>SYSCALL2 GetMemPtr
>STYA ZPMENUPtr
pha
@ -103,28 +105,32 @@ MOU.CheckOverMenu
pla
adc /S.OBJ.X1
jsr MOU.InRectYA
bcs .2
bcc .3
jsr MENU.Enter
clc
plx
dex
bne .2
.9 sec
rts
.2 lda ZPMENUPtr
clc
adc #S.MENU.pX1
tay
lda ZPMENUPtr+1
adc /S.MENU.pX1
.3 plx
cpx MENU.Stack.Cnt
beq .7
jsr MOU.InRectYA
bcc .8
* TODO:destroy from TOP to current, then enter current
inx
phx
jsr MENU.Destroy
bra .3
bra .1
.7 jmp MENU.Enter
.9 sec
.8 rts
.8 clc
rts
*--------------------------------------
MOU.CheckOverSysBut
>LDYA L.RECT.SysBut
@ -208,14 +214,14 @@ MOU.CheckOverWND
.5 lda #CUR.T.ARROW
jsr SetCursor
.5 lda #PTR.T.ARROW
jsr PTR.Set
clc
rts
.6 lda #CUR.T.WAIT
jsr SetCursor
.6 lda #PTR.T.WAIT
jsr PTR.Set
clc
rts
@ -225,8 +231,8 @@ MOU.CheckOverWND
dex
bne .1
lda #CUR.T.ARROW
jsr SetCursor
lda #PTR.T.ARROW
jsr PTR.Set
.9 sec
.99 rts
@ -247,7 +253,7 @@ MOU.ChkWNDBorders
eor MSG+S.MSG.X1+1
bne .1
lda #CUR.T.RESIZEX
lda #PTR.T.RESIZEX
sta IY
.1 ldy #S.OBJ.Y1
@ -266,10 +272,10 @@ MOU.ChkWNDBorders
lda IY
beq .2
lda #CUR.T.RESIZEXY1
jmp SetCursor
lda #PTR.T.RESIZEXY1
jmp PTR.Set
.2 lda #CUR.T.RESIZEY
.2 lda #PTR.T.RESIZEY
sta IY
.3 ldy #S.OBJ.X2
@ -288,10 +294,10 @@ MOU.ChkWNDBorders
lda IY
beq .4
lda #CUR.T.RESIZEXY2
jmp SetCursor
lda #PTR.T.RESIZEXY2
jmp PTR.Set
.4 lda #CUR.T.RESIZEX
.4 lda #PTR.T.RESIZEX
sta IY
.5 ldy #S.OBJ.Y2
@ -307,8 +313,8 @@ MOU.ChkWNDBorders
eor MSG+S.MSG.Y2+1
bne .7
lda #CUR.T.RESIZEXY1
.6 jmp SetCursor
lda #PTR.T.RESIZEXY1
.6 jmp PTR.Set
.7 lda IY
bne .6

View File

@ -35,7 +35,7 @@ MSG.Get stz MSG+S.MSG.T
beq .2
>PUSHW L.XY
jsr SetCursorPos
jsr PTR.SetPos
lda XY+S.XY.S

View File

@ -1,7 +1,78 @@
NEW
AUTO 3,1
*--------------------------------------
OBJ.New
* A = Object Class
*--------------------------------------
OBJ.New pha
tax
ldy OBJ.SizeOf,x
lda #0
>SYSCALL GetMem
bcs .9
>STYA ZPObjPtr
pla
sta (ZPObjPtr)
phx hObj
tax
ldy OBJ.SizeOf,x
dey
lda #0
.1 sta (ZPObjPtr),y
dey
bne .1
>LDYA ZPObjPtr
* clc
.9 plx
rts
*--------------------------------------
OBJ.Init sta (ZPObjPtr)
lda #0
.1 sta (ZPObjPtr),y
dey
bne .1
rts
*--------------------------------------
OBJ.AddWord pha
tya
jsr OBJ.AddByte
pla
OBJ.AddByte sta (ZPObjPtr)
inc ZPObjPtr
bne .8
inc ZPObjPtr+1
.8 rts
*--------------------------------------
OBJ.PullY1X1.BAD
>PULLA
ldy #S.OBJ.Y1
sta (ZPMENUPtr),y
>PULLA
iny
sta (ZPMENUPtr),y
>PULLA
ldy #S.OBJ.X1
sta (ZPMENUPtr),y
>PULLA
iny
sta (ZPMENUPtr),y
rts
*--------------------------------------
* hOBJ, Prop8, Value16
*--------------------------------------
@ -52,6 +123,69 @@ OBJ.GetProp >PULLA
rts
*--------------------------------------
OBJ.SetX2Y2 >STYA ZPPtr1
ldy #S.OBJ.W
lda (ZPPtr1),y
clc
sbc #0
pha
iny
lda (ZPPtr1),y
sbc #0
tax
pla
clc
ldy #S.OBJ.X1
adc (ZPPtr1),y
pha
txa
iny
adc (ZPPtr1),y
ldy #S.OBJ.X2+1
sta (ZPPtr1),y
dey
pla
sta (ZPPtr1),y
ldy #S.OBJ.H
lda (ZPPtr1),y
clc
sbc #0
pha
iny
lda (ZPPtr1),y
sbc #0
tax
pla
clc
ldy #S.OBJ.Y1
adc (ZPPtr1),y
pha
txa
iny
adc (ZPPtr1),y
ldy #S.OBJ.Y2+1
sta (ZPPtr1),y
dey
pla
sta (ZPPtr1),y
rts
*--------------------------------------
OBJ.GetInCache >STYA .1+1
ldx #S.OBJ-1
.1 lda $ffff,x SELF MODIFIED
sta OBJ.Cache,x
dex
bpl .1
rts
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.s.obj
LOAD usr/src/lib/libgui.s

161
LIB/LIBGUI.S.PTR.txt Normal file
View File

@ -0,0 +1,161 @@
NEW
AUTO 3,1
*--------------------------------------
PTR.Update lda PTR.T
cmp #PTR.T.WAIT
bcc PTR.Set.RTS
inc
inc
cmp #PTR.T.WAIT+12
bne PTR.Set
lda #PTR.T.WAIT
*--------------------------------------
* Set X2,Y2,SrcPtr
*--------------------------------------
PTR.Set sta PTR.T
lda PTR.bVisible
bpl .1
jsr PTR.Hide.I
.1 ldx PTR.T
lda L.Cursors,x
sta CB.PTR+S.CB.SrcPtr
sta ZPPtr1
lda L.Cursors+1,x
sta CB.PTR+S.CB.SrcPtr+1
sta ZPPtr1+1
ldy #S.BM.W
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcW
clc
adc CB.PTR+S.CB.X1
pha
iny
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcW+1
adc CB.PTR+S.CB.X1+1
tax
pla
bne .2
dex
.2 dec
sta CB.PTR+S.CB.X2
stx CB.PTR+S.CB.X2+1
iny S.BM.H
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcH
clc
adc CB.PTR+S.CB.Y1
pha
iny
lda (ZPPtr1),y
sta CB.PTR+S.CB.SrcH+1
adc CB.PTR+S.CB.Y1+1
tax
pla
bne .3
dex
.3 dec
sta CB.PTR+S.CB.Y2
stx CB.PTR+S.CB.Y2+1
lda PTR.bVisible
bmi PTR.Show.I
PTR.Set.RTS rts
*--------------------------------------
* Set DestX,DestY
*--------------------------------------
PTR.SetPos >PULLW ZPPtr1
lda PTR.bVisible
bpl .1
jsr PTR.Hide.I
.1 ldy #S.POINT-1
.2 lda (ZPPtr1),y
sta PTR.Pos,y
dey
bpl .2
lda PTR.bVisible
bmi PTR.Show.I
clc
rts
*--------------------------------------
PTR.Hide lda PTR.bVisible
bpl .9
jsr PTR.Hide.I
stz PTR.bVisible
.9 clc
rts
*--------------------------------------
PTR.Show lda PTR.bVisible
bmi .9
jsr PTR.Show.I
dec PTR.bVisible
.9 rts
*--------------------------------------
PTR.Hide.I lda #S.CB.OP.RESTORE
bra PTR.Draw.I
*--------------------------------------
PTR.Show.I ldx PTR.T
lda PTR.Pos+S.POINT.X
sec
sbc PTR.HotPoints,x
sta CB.PTR+S.CB.X1
lda PTR.Pos+S.POINT.X+1
sbc #0
sta CB.PTR+S.CB.X1+1
lda PTR.Pos+S.POINT.Y
sec
sbc PTR.HotPoints+1,x
sta CB.PTR+S.CB.Y1
lda PTR.Pos+S.POINT.Y+1
sbc #0
sta CB.PTR+S.CB.Y1+1
lda #S.CB.OP.ORA+S.CB.OP.MASK+S.CB.OP.SAVE
PTR.Draw.I sta CB.PTR+S.CB.OP
>LDYA L.WND.Screen
jsr OBJ.GetInCache
>LDYA L.CB.PTR
jsr CLIP.YA
bcs .8
jsr CB.GFXWrite
.8 clc
rts
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.s.ptr
LOAD usr/src/lib/libgui.s
ASM

View File

@ -4,39 +4,24 @@ NEW
SYSBUT.Enter sec
ror WND.SYSBAR.bSysBut
jsr GetCBBuf
bcs .99
jsr CB.GetBuf
bcs .9
jsr SYSBAR.ShowSysBut
>LDYA L.WND.SysBar
jsr DrawCBBufToYA
>PUSHW L.MENU.Sys
>PUSHW WND.SysBar+S.OBJ.X1
>PUSHW WND.SysBar+S.OBJ.Y1
>PUSHW L.RECT.SysBut Parent RECT
>PUSHW L.MENU.Sys
jsr MENU.New
.99 bcs .9
bcs .9
sta hSysMenu
>PUSHA hSysMenu
>PUSHBI 4
>PUSHBI S.MITEM.pMENU
>PUSHW L.MENU.Sys.Programs
jsr MENU.SetMItemProp
jmp MENU.Draw
>PUSHB hSysMenu
>PUSHBI 6
>PUSHBI S.MITEM.pMENU
>PUSHW L.MENU.Sys.Settings
jsr MENU.SetMItemProp
lda hSysMenu
jsr MENU.Show
.8 clc
.9 rts
*--------------------------------------
SYSBUT.Leave bit WND.SYSBAR.bSysBut
@ -44,7 +29,7 @@ SYSBUT.Leave bit WND.SYSBAR.bSysBut
stz WND.SYSBAR.bSysBut
jsr GetCBBuf
jsr CB.GetBuf
bcs .9
jsr SYSBAR.ShowSysBut
@ -56,7 +41,7 @@ SYSBUT.Leave bit WND.SYSBAR.bSysBut
.8 clc
.9 rts
*--------------------------------------
SYSBAR.Show jsr GetCBBuf
SYSBAR.Show jsr CB.GetBuf
bcs .9
jsr SYSBAR.ShowSysBut
@ -96,7 +81,7 @@ SYSBAR.ShowSysBut
dex
bpl .2
jsr PutCBCache2CBBuf
jsr CB.Cache2CBBuf
lda RECT.SysBut+S.RECT.X1
clc
@ -157,7 +142,7 @@ SYSBAR.ShowSysWNDs
dex
bpl .1
jmp PutCBCache2CBBuf
jmp CB.Cache2CBBuf
*--------------------------------------
SYSBAR.ShowSysClk
lda #S.CB.CMD.FILLRECT
@ -179,7 +164,7 @@ SYSBAR.ShowSysClk
dex
bpl .1
jmp PutCBCache2CBBuf
jmp CB.Cache2CBBuf
*--------------------------------------
MAN
SAVE usr/src/lib/libgui.s.sysbar

View File

@ -22,7 +22,7 @@ WND.Init >PUSHW L.DEVNAME.GFX
*--------------------------------------
WND.Setup
* stz WND.Stack.Top
* stz MENU.Stack.Top
* stz MENU.Stack.Cnt
>LDYA DCB.GFX+S.DCB.GFX.W
>STYA WND.Screen+S.OBJ.W
@ -116,13 +116,7 @@ WND.Quit.RTS rts
*--------------------------------------
* F8, X116, Y116, W16, H16
*--------------------------------------
WND.New >LDYAI S.WND
>SYSCALL2 getmem
bcs .9
>STYA ZPWNDPtr
ldy WND.Stack.Top
WND.New ldy WND.Stack.Top
cpy #WND.MAX
bcc .10
@ -133,14 +127,10 @@ WND.New >LDYAI S.WND
rts
.10 lda #S.OBJ.T.WND
sta (ZPWNDPtr) S.OBJ.T
jsr OBJ.New
bcs .9
ldy #S.WND-1
lda #0
.1 sta (ZPWNDPtr),y
dey
bne .1
>STYA ZPWNDPtr
ldy #S.WND.fPaint
lda L.WND.fPaint
@ -259,7 +249,7 @@ WND.Show sta WND.hWND
lda #S.WND.S.ACTIVE
jsr WND.ClrStatus
jsr GetCBBuf
jsr CB.GetBuf
bcs WND.Activate.RTS
jsr WND.PaintTopBar
@ -274,7 +264,7 @@ WND.Show1 lda WND.hWND
jsr OBJ.SetX2Y2
WND.Show2 jsr GetCBBuf
WND.Show2 jsr CB.GetBuf
bcs WND.Activate.RTS
lda #S.WND.S.ACTIVE
@ -303,7 +293,7 @@ WND.Show2 jsr GetCBBuf
lda #1
jsr WND.ShowBorders
.1 ldy #S.WND.TITLE+1
.1 ldy #S.WND.pTITLE+1
lda (ZPWNDPtr),y
bne .2
@ -333,7 +323,7 @@ WND.Show2 jsr GetCBBuf
jsr WND.PaintTopBar
bcs .9
*--------------------------------------
.3 ldy #S.WND.MBAR+1
.3 ldy #S.WND.pMBAR+1
lda (ZPWNDPtr),y
beq .7
@ -360,9 +350,9 @@ WND.Show2 jsr GetCBBuf
lda #S.WND.S.HASMBAR
jsr WND.SetStatus
jsr WND.PaintMBar
jsr MBAR.Paint
*--------------------------------------
.7 ldy #S.WND.STATUS+1
.7 ldy #S.WND.pSTATUS+1
lda (ZPWNDPtr),y
beq .8
@ -432,7 +422,7 @@ WND.Paint1 ldy #S.WND.fPaint
WND.fPaint >SYSCALL2 GetMemPtr
>STYA ZPWNDPtr
jsr GetCBBuf
jsr CB.GetBuf
bcs WND.Show.RTS
lda #S.CB.CMD.FILLRECT
@ -482,7 +472,7 @@ WND.fPaint >SYSCALL2 GetMemPtr
sbc #0
sta CB.Cache+S.CB.Y2+1
jsr PutCBCache2CBBuf
jsr CB.Cache2CBBuf
ldy #S.WND.BGBM
lda (ZPWNDPtr),y
@ -512,7 +502,7 @@ WND.fPaint >SYSCALL2 GetMemPtr
lda #S.CB.CMD.BITBLT
sta CB.Cache+S.CB.CMD
jsr PutCBCache2CBBuf
jsr CB.Cache2CBBuf
.8 >LDYA L.WND.Desktop
jmp DrawCBBufToYA
@ -564,7 +554,7 @@ WND.ShowBorders sta IY
adc #0
sta CB.Cache+S.CB.X2+1
jsr PutCBCache2CBBuf
jsr CB.Cache2CBBuf
ldy #S.OBJ.Y2
lda (ZPWNDPtr),y
@ -578,7 +568,7 @@ WND.ShowBorders sta IY
sta CB.Cache+S.CB.Y1+1
sta CB.Cache+S.CB.Y2+1 bottom X1-1,Y2+1,X2+1,Y2+1
jsr PutCBCache2CBBuf
jsr CB.Cache2CBBuf
lda #S.CB.CMD.VLINE
sta CB.Cache+S.CB.CMD
@ -598,7 +588,7 @@ WND.ShowBorders sta IY
lda CB.Cache+S.CB.X1+1
sta CB.Cache+S.CB.X2+1 left X1-1,Y1-1,X1-1,Y2+1
jsr PutCBCache2CBBuf
jsr CB.Cache2CBBuf
ldy #S.OBJ.X2
lda (ZPWNDPtr),y
@ -612,7 +602,7 @@ WND.ShowBorders sta IY
sta CB.Cache+S.CB.X1+1
sta CB.Cache+S.CB.X2+1 right X2+1,Y1-1,X2+1,Y2+1
jmp PutCBCache2CBBuf
jmp CB.Cache2CBBuf
*--------------------------------------
WND.PaintTopBar lda #S.CB.CMD.FILLRECT
jsr CB.InitCacheA
@ -656,7 +646,7 @@ WND.PaintTopBar lda #S.CB.CMD.FILLRECT
sta DY+1
adc #0
sta CB.Cache+S.CB.Y2+1
jsr PutCBCache2CBBuf
jsr CB.Cache2CBBuf
inc DY
bne .12
@ -737,7 +727,7 @@ WND.PaintTopBar lda #S.CB.CMD.FILLRECT
.9 rts
*--------------------------------------
WND.PaintTopBarTitle
ldy #S.WND.TITLE
ldy #S.WND.pTITLE
lda (ZPWNDPtr),y
pha
iny
@ -774,7 +764,7 @@ WND.PaintTopBarTitle
adc DX+1
sta DX+1
ldy #S.WND.TITLE
ldy #S.WND.pTITLE
lda (ZPWNDPtr),y
pha
iny
@ -785,124 +775,6 @@ WND.PaintTopBarTitle
clc
jmp DRAW.YATextAtDXDY
*--------------------------------------
WND.PaintMBar lda #S.CB.CMD.FILLRECT
jsr CB.InitCacheA
lda #S.CB.OP.SET
sta CB.Cache+S.CB.OP
lda #S.CB.M.MONO
sta CB.Cache+S.CB.M
lda PREFS.MBARCOLOR
sta CB.Cache+S.CB.COLOR
ldy #S.OBJ.X1
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.X1
iny
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.X1+1
ldy #S.OBJ.X2
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.X2
iny
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.X2+1
ldy #S.WND.MBarY1
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.Y1
iny
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.Y1+1
iny #S.WND.MBarY2
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.Y2
iny
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.Y2+1
jsr PutCBCache2CBBuf
ldy #S.WND.MBAR
lda (ZPWNDPtr),y
pha
iny
lda (ZPWNDPtr),y
ply
jsr MBAR.Init
.1 lda (ZPMENUPtr)
beq .8
jsr CB.ClearCache
lda #S.CB.CMD.DRAWTEXT2
sta CB.CACHE+S.CB.CMD
lda #S.CB.OP.SET+S.CB.OP.INVERSE
sta CB.Cache+S.CB.OP
lda #S.CB.M.MONO
sta CB.Cache+S.CB.M
lda hSYSFON
sta CB.CACHE+S.CB.hFont
ldy #S.MBITEM.XT
lda (ZPMENUPtr),y
clc
ldy #S.OBJ.X1
adc (ZPWNDPtr),y
sta CB.CACHE+S.CB.X1
ldy #S.MBITEM.XT+1
lda (ZPMENUPtr),y
ldy #S.OBJ.X1+1
adc (ZPWNDPtr),y
sta CB.CACHE+S.CB.X1+1
ldy #S.WND.MBarY1
lda (ZPWNDPtr),y
clc
adc #1
sta CB.CACHE+S.CB.Y1
iny
lda (ZPWNDPtr),y
adc #0
sta CB.CACHE+S.CB.Y1+1
lda #S.MBITEM.TEXT
clc
adc ZPMENUPtr
sta CB.CACHE+S.CB.TxtPtr
lda #0
adc ZPMENUPtr+1
sta CB.CACHE+S.CB.TxtPtr+1
jsr PutCBCache2CBBuf
lda (ZPMENUPtr)
clc
adc ZPMENUPtr
sta ZPMENUPtr
bcc .1
inc ZPMENUPtr+1
bra .1
.8 clc
rts
*--------------------------------------
WND.PaintSBar lda #S.CB.CMD.HLINE
jsr CB.InitCacheA
@ -942,7 +814,7 @@ WND.PaintSBar lda #S.CB.CMD.HLINE
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.X2+1
jsr PutCBCache2CBBuf
jsr CB.Cache2CBBuf
lda #S.CB.CMD.FILLRECT
sta CB.Cache+S.CB.CMD
@ -964,9 +836,9 @@ WND.PaintSBar lda #S.CB.CMD.HLINE
lda (ZPWNDPtr),y
sta CB.Cache+S.CB.Y2+1
jsr PutCBCache2CBBuf
jsr CB.Cache2CBBuf
ldy #S.WND.STATUS
ldy #S.WND.pSTATUS
lda (ZPWNDPtr),y
pha
iny
@ -977,6 +849,18 @@ WND.PaintSBar lda #S.CB.CMD.HLINE
clc
jmp DRAW.YATextAtDXDY
*--------------------------------------
WND.SetMBar >PULLW ZPPtr1
>PULLA
>SYSCALL2 GetMemPtr
>STYA ZPWNDPtr
.9 rts
*--------------------------------------
WND.ClrStatus ldy #S.OBJ.S
eor #$ff
and (ZPWNDPtr),y

View File

@ -121,20 +121,22 @@ CS.START cld
*--------------------------------------
.1 .DA LIB.LOAD
.DA LIB.UNLOAD
.DA SetCursor
.DA SetCursorPos
.DA HideCursor
.DA ShowCursor
.DA UpdateCursor
.DA PTR.Set
.DA PTR.SetPos
.DA PTR.Hide
.DA PTR.Show
.DA PTR.Update
.DA MOU.ReadMouse
.DA DrawLine
.DA DRAW.Line
.DA OBJ.SetProp
.DA OBJ.GetProp
.DA WND.New
.DA WND.Destroy
.DA WND.Show
.DA WND.Paint
.DA WND.SetMBar
.DA MSG.Get
.DA MBAR.New
*--------------------------------------
L.WND.fPaint .DA WND.fPaint
*--------------------------------------
@ -161,6 +163,7 @@ L.RECT.SysClk .DA RECT.SysClk
L.MENU.Sys .DA MENU.Sys
L.MENU.Sys.Programs .DA MENU.Sys.Programs
L.MENU.Sys.Settings .DA MENU.Sys.Settings
L.TEXTBUF .DA TEXTBUF
*--------------------------------------
L.BMs .EQ *-2
L.BM.Apple .DA BM.Apple
@ -172,21 +175,22 @@ L.BM.Right .DA BM.Right
L.BM.Up .DA BM.Up
L.BM.Down .DA BM.Down
*--------------------------------------
L.CUR.SaveBuf .DA CUR.SaveBuf
L.Cursors .DA CUR.Arrow
.DA CUR.Move
.DA CUR.ResizeX
.DA CUR.ResizeY
.DA CUR.ResizeXY1
.DA CUR.ResizeXY2
.DA CUR.Cross
.DA CUR.Text
.DA CUR.Wait1
.DA CUR.Wait2
.DA CUR.Wait3
.DA CUR.Wait4
.DA CUR.Wait5
.DA CUR.Wait6
L.PTR.SaveBuf .DA PTR.SaveBuf
L.Cursors .DA PTR.Arrow
.DA PTR.Move
.DA PTR.ResizeX
.DA PTR.ResizeY
.DA PTR.ResizeXY1
.DA PTR.ResizeXY2
.DA PTR.Cross
.DA PTR.Text
.DA PTR.Wait1
.DA PTR.Wait2
.DA PTR.Wait3
.DA PTR.Wait4
.DA PTR.Wait5
.DA PTR.Wait6
*--------------------------------------
J.Clip .DA CLIP.Point SETPIXEL
.DA CLIP.Point GETPIXEL
.DA CLIP.HLine HLINE
@ -219,9 +223,9 @@ LIB.LOAD lda LibCount
.1 jsr WND.Setup
lda #CUR.T.ARROW
jsr SetCursor
jsr ShowCursor
lda #PTR.T.ARROW
jsr PTR.Set
jsr PTR.Show
inc LibCount
@ -257,7 +261,7 @@ CB.GetInCache >STYA .1+1
rts
*--------------------------------------
GetCBBuf clc
CB.GetBuf clc
ldx hCBBuf
bne .9
@ -272,7 +276,7 @@ GetCBBuf clc
.9 rts
*--------------------------------------
PutCBCache2CBBuf
CB.Cache2CBBuf
lda CB.Cache
lsr
tax
@ -293,74 +297,36 @@ PutCBCache2CBBuf
rts
*--------------------------------------
GFXWrite.CB >PUSHB WND.Screen+S.OBJ.hPARENT
CB.GFXWrite >PUSHB WND.Screen+S.OBJ.hPARENT
>PUSHBI IOCTL.WRITE
>PUSHW L.CB.Cache
>SYSCALL2 IOCTL
rts
*--------------------------------------
OBJ.GetInCache >STYA .1+1
ldx #S.OBJ-1
.1 lda $ffff,x SELF MODIFIED
sta OBJ.Cache,x
dex
bpl .1
rts
SkipAPtr1 clc
adc ZPPtr1
sta ZPPtr1
bcc .8
inc ZPPtr1+1
.8 rts
*--------------------------------------
OBJ.SetX2Y2 >STYA ZPPtr1
SkipStrZPtr1 ldy #$ff
ldy #S.OBJ.W
.1 iny
lda (ZPPtr1),y
clc
sbc #0
pha
iny
lda (ZPPtr1),y
sbc #0
tax
pla
clc
ldy #S.OBJ.X1
adc (ZPPtr1),y
pha
txa
iny
adc (ZPPtr1),y
ldy #S.OBJ.X2+1
sta (ZPPtr1),y
dey
pla
sta (ZPPtr1),y
ldy #S.OBJ.H
lda (ZPPtr1),y
clc
sbc #0
pha
iny
lda (ZPPtr1),y
sbc #0
tax
pla
clc
ldy #S.OBJ.Y1
adc (ZPPtr1),y
pha
txa
iny
adc (ZPPtr1),y
ldy #S.OBJ.Y2+1
sta (ZPPtr1),y
dey
pla
sta (ZPPtr1),y
rts
bne .1
tya
sec \0
adc ZPPtr1
sta ZPPtr1
bcc .8
inc ZPPtr1+1
.8 rts
*--------------------------------------
.INB usr/src/lib/libgui.s.bm
.INB usr/src/lib/libgui.s.but
@ -374,6 +340,7 @@ OBJ.SetX2Y2 >STYA ZPPtr1
.INB usr/src/lib/libgui.s.msg
.INB usr/src/lib/libgui.s.obj
.INB usr/src/lib/libgui.s.pat
.INB usr/src/lib/libgui.s.ptr
.INB usr/src/lib/libgui.s.sysbar
.INB usr/src/lib/libgui.s.text
.INB usr/src/lib/libgui.s.wnd
@ -383,6 +350,7 @@ CS.END
.INB usr/src/lib/libgui.g.bm
.INB usr/src/lib/libgui.g.cur
.INB usr/src/lib/libgui.g.fon
.INB usr/src/lib/libgui.g.ptr
*--------------------------------------
DEVNAME.GFX .AZ "/dev/gfx"
DEVNAME.MOUSE .AZ "/dev/mou1"
@ -393,6 +361,8 @@ SYSX7B .AZ "${ROOT}sbin/sysx7b"
LibCount .BS 1
hDevMouse .BS 1
*--------------------------------------
OBJ.SizeOf .DA S.WND
*--------------------------------------
CB.CmdLen .DA #S.CB.Y1+1 SETPIXEL
.DA #S.CB.Y1+1 GETPIXEL
.DA #S.CB.Y2+1 HLINE
@ -428,7 +398,7 @@ CB.PTR .DA #S.CB.CMD.BITBLT
CB.Cache .BS S.CB
OBJ.Cache .BS S.OBJ
*--------------------------------------
MENU.Stack.Top .BS 1
MENU.Stack.Cnt .BS 1
MENU.Stack .BS MENU.MAX
*--------------------------------------
WND.hWND .BS 1
@ -455,110 +425,79 @@ RECT.SysWNDs .BS S.RECT
RECT.SysClk .BS S.RECT
*--------------------------------------
hSysMenu .BS 1
MENU.Sys
.1 .DA #.2-* next
.DA #S.MITEM.F.ITEM F
.DA #0 S
*--------------------------------------
MENU.Sys .DA #S.MITEM.T.ITEM
.DA #2 ID
.DA #KEYMOD.CTRL+KEYMOD.OA+KEYMOD.CA,#'A'
.DA BM.ID.APPLE pICON
.DA #S.MITEM.KEYMOD.CTRL+S.MITEM.KEYMOD.OA+S.MITEM.KEYMOD.CA
.DA #'A'
.DA #.11-.1
.AZ "About..."
.11 .AS "Ctrl-"
.DA #1,#'-',#2,#'-',#'A',#0
.2 .DA #.3-* next
.DA #S.MITEM.F.SEP
.DA #S.MITEM.T.SEP
.3 .DA #.4-* next
.DA #S.MITEM.F.SUBMENU F
.DA #0 S
.DA #4 ID
.DA #S.MITEM.T.SUBMENU
.DA MENU.Sys.Programs
.DA 0 pICON
.DA 0 pMENU
.DA #0 KEYSTR
.AZ "Programs"
.4 .DA #.5-* next
.DA #S.MITEM.F.SUBMENU F
.DA #0 S
.DA #6 ID
.DA #S.MITEM.T.SUBMENU
.DA MENU.Sys.Settings
.DA 0 pICON
.DA 0 pMENU
.DA #0 KEYSTR
.AZ "Settings"
.5 .DA #.6-* next
.DA #S.MITEM.F.SEP
.DA #S.MITEM.T.SEP
.6 .DA #.7-* next
.DA #S.MITEM.F.ITEM F
.DA #0 S
.DA #S.MITEM.T.ITEM
.DA #8 ID
.DA #0,#0
.DA 0 pICON
.DA #0
.DA #0
.DA #0 KEYSTR
.AZ "Search..."
.7 .DA #.8-* next
.DA #S.MITEM.F.ITEM F
.DA #0 S
.DA #S.MITEM.T.ITEM
.DA #10 ID
.DA #KEYMOD.CTRL+KEYMOD.OA,#'R'
.DA 0 pICON
.DA #S.MITEM.KEYMOD.CTRL+S.MITEM.KEYMOD.OA
.DA #'R'
.DA #.77-.7
.AZ "Run..."
.77 .AZ "Ctrl-R"
.8 .DA #0
.DA #0
*--------------------------------------
MENU.Sys.Programs
.1 .DA #.2-* next
.DA #S.MITEM.F.ITEM F
.DA #0 S
.DA #S.MITEM.T.ITEM
.DA #42 ID
.DA #0,#0
.DA BM.ID.APPLE pICON
.DA #0
.DA #0
.DA #0 KEYSTR
.AZ "Test ASM"
.2 .DA #.3-* next
.DA #S.MITEM.F.ITEM F
.DA #0 S
.DA #S.MITEM.t.ITEM
.DA #44 ID
.DA #0,#0
.DA BM.ID.APPLE pICON
.DA #0
.DA #0
.DA #0 KEYSTR
.AZ "Test C"
.3 .DA #0
.DA #0
*--------------------------------------
MENU.Sys.Settings
.1 .DA #.2-* next
.DA #S.MITEM.F.ITEM F
.DA #0 S
.DA #S.MITEM.T.ITEM
.DA #62 ID
.DA #0,#0
.DA 0 pICON
.DA #0
.DA #0
.DA #0 KEYSTR
.AZ "Colors..."
.2 .DA #.3-* next
.DA #S.MITEM.F.ITEM F
.DA #0 S
.DA #S.MITEM.T.ITEM
.DA #64 ID
.DA #0,#0
.DA 0 pICON
.DA #0
.DA #0
.DA #0 KEYSTR
.AZ "SubItem2..."
.3 .DA #0
.DA #0
*--------------------------------------
KEYMOD.S.CTRL .EQ 0
KEYMOD.S .AZ "Ctrl-"
KEYMOD.S.OA .EQ *-KEYMOD.S
.DA #01,#'-',#0
KEYMOD.S.CA .EQ *-KEYMOD.S
.DA #02,#'-',#0
*--------------------------------------
TEXTBUF .BS 16 for composing HotKey strings
*--------------------------------------
PREFS.BESTVIEWEDX .DA #$FC
PREFS.bSYSBARTOP .DA #0

View File

@ -154,6 +154,7 @@ include/stdio.h
include/stdlib.h
include/string.h
include/unistd.h
include/libgui.h
include/libblkdev.h
include/libtui.h
include/sys/types.h

View File

@ -56,9 +56,9 @@ CS.INIT >LDYA L.LIBGUI
CS.INIT.RTS rts
*--------------------------------------
CS.RUN >SLEEP
>PUSHW L.MSG
>LIBCALL hLIBGUI,LIBGUI.GetMsg
>LIBCALL hLIBGUI,LIBGUI.MSG.Get
bcs CS.RUN
.1 lda MSG+S.MSG.T
@ -87,7 +87,7 @@ CS.RUN >SLEEP
CS.DOEVENT lda (pEvent)
bpl .9
>LIBCALL hLIBGUI,LIBGUI.UpdateCursor
>LIBCALL hLIBGUI,LIBGUI.PTR.Update
.9 sec
rts

View File

@ -114,10 +114,10 @@ DIR1.PS jsr GNNB
.9 jmp ERBA2
*--------------------------------------
DIR1.EscChars .AS "abefnrtv"
.HS 5C27223F \'"?
.HS 5C27223F25 \'"?%
DIR1.EscChars.L .EQ *-DIR1.EscChars
DIR1.EscCodes .HS 07081B0C0A0D090B
.HS 5C27223F
.HS 5C27223F25
*--------------------------------------
DIR1.CZ jsr DIR1.CS
jmp EMIT.ZERO

View File

@ -75,11 +75,10 @@ K.GetDev.9 rts
* `>SYSCALL MkFD`
* ## RETURN VALUE
*\--------------------------------------
K.MkFD
clc
rts
* clc
* rts
*/--------------------------------------
* # MKDev
* Create a hDEV
@ -202,8 +201,8 @@ K.IOCTL ldy #3 hFD
jmp (pDrv)
*--------------------------------------
DEV.OPEN ldx #IOCTL.OPEN
* lda IO.hFD
jsr DEV.pDrvJmp
lda IO.hFD
jsr DEV.pDrvJmp.1
bcs .9
lda IO.hFD
@ -237,7 +236,7 @@ DEV.GetStatus sta K.S.IOCTL+S.IOCTL.S
DEV.CLOSE ldx #IOCTL.CLOSE
*--------------------------------------
DEV.pDrvJmp >LDYAI K.S.IOCTL
jmp (pDrv)
DEV.pDrvJmp.1 jmp (pDrv)
*--------------------------------------
DEV.GetPFD sta IO.hFD
@ -307,6 +306,7 @@ DEV.GetFD ldx #1
* sec
rts
K.MkFD
DEV.GetFD.8 clc
rts
*--------------------------------------