mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
dad22dfc30
ASM:added \% KERNEL:BUGFIX in DevMgr LIBGUI:New API
193 lines
2.7 KiB
Plaintext
193 lines
2.7 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
* 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
|
||
*--------------------------------------
|
||
OBJ.SetProp ldy #3
|
||
|
||
lda (pStack),y hOBJ
|
||
|
||
>SYSCALL2 GetMemPtr
|
||
>STYA ZPObjPtr
|
||
|
||
ldy #2
|
||
lda (pStack),y
|
||
|
||
tay
|
||
|
||
lda (ZPObjPtr),y
|
||
pha old value
|
||
>PULLA
|
||
sta (ZPObjPtr),y
|
||
|
||
iny
|
||
lda (ZPObjPtr),y
|
||
tax
|
||
>PULLA
|
||
sta (ZPObjPtr),y
|
||
|
||
txa
|
||
ply
|
||
|
||
>RET 2
|
||
*--------------------------------------
|
||
* hOBJ, Prop8
|
||
*--------------------------------------
|
||
OBJ.GetProp >PULLA
|
||
pha
|
||
|
||
>PULLA
|
||
>SYSCALL2 GetMemPtr
|
||
>STYA ZPObjPtr
|
||
|
||
ply
|
||
|
||
lda (ZPObjPtr),y
|
||
pha
|
||
iny
|
||
lda (ZPObjPtr),y
|
||
ply
|
||
|
||
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
|
||
ASM
|