Skip to content

Commit e6e8b79

Browse files
Fixed POS, VPOS
1 parent 97c7b76 commit e6e8b79

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/zds/agon_os.asm

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
; 11/12/2024: Added ESC key handling
1010
; Added OSWORD
1111
; 12/12/2024: Added OSRDCH, OSBYTE_81 and fixed *EDIT
12-
; 17/12/2024: Added OSWORD_01, OSWORD_02, OSWORD_0E, GET$(x,y), fixed INKEY and autoload
12+
; 17/12/2024: Added OSWORD_01, OSWORD_02, OSWORD_0E, GET$(x,y), fixed INKEY, POS, VPOS and autoload
1313

1414
.ASSUME ADL = 0
1515
@@ -888,8 +888,8 @@ BITLOOKUP: DB 01h, 02h, 04h, 08h
888888

889889
; OSBYTE 0x86: Fetch cursor coordinates
890890
; Returns:
891-
; - DE: X Coordinate (POS)
892-
; - HL: Y Coordinate (VPOS)
891+
; - L: X Coordinate (POS)
892+
; - H: Y Coordinate (VPOS)
893893
;
894894
OSBYTE_86: PUSH IX ; Get the system vars in IX
895895
MOSCALL mos_sysvars ; Reset the semaphore
@@ -899,10 +899,8 @@ OSBYTE_86: PUSH IX ; Get the system vars in IX
899899
VDU vdp_cursor
900900
$$: BIT.LIL 0, (IX+sysvar_vpd_pflags)
901901
JR Z, $B ; Wait for the result
902-
LD D, 0
903-
LD H, D
904-
LD.LIL E, (IX + sysvar_cursorX)
905-
LD.LIL L, (IX + sysvar_cursorY)
902+
LD.LIL L, (IX + sysvar_cursorX)
903+
LD.LIL H, (IX + sysvar_cursorY)
906904
POP IX
907905
RET
908906

0 commit comments

Comments
 (0)