1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-30 08:57:49 +00:00

Change MOVE routine calling conventions

git-svn-id: svn://svn.cc65.org/cc65/trunk@2965 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2004-03-29 16:44:39 +00:00
parent 5c63b08d26
commit 663bce6cd7
2 changed files with 15 additions and 11 deletions

View File

@ -175,8 +175,10 @@ BOX: ldy #5
rts
;----------------------------------------------------------------------------
; MOVE: Move the mouse to a new position which is passed in X=ptr1, Y=a/x.
; No checks are done if the new position is valid (within the bounding box or
; MOVE: Move the mouse to a new position. The position is passed as it comes
; from the C program, that is: X on the stack and Y in a/x. The C wrapper will
; remove the parameter from the stack on return.
; No checks are done if the new position is valid (within the bounding box or
; the screen). No return code required.
;
@ -186,10 +188,13 @@ MOVE: sei ; No interrupts
stx YPos+1 ; New Y position
jsr CMOVEY ; Set it
lda ptr1
ldx ptr1+1
sta XPos
stx XPos+1 ; New X position
ldy #$01
lda (sp),y
sta XPos+1
tax
dey
lda (sp),y
sta XPos ; New X position
jsr CMOVEX ; Move the cursor

View File

@ -9,16 +9,15 @@
; */
;
.import ptr1: zp
.import incsp2
.import ptr1: zp
.include "mouse-kernel.inc"
.proc _mouse_move
sta ptr1
stx ptr1+1 ; Store x into ptr1
jsr popax
jmp mouse_move ; Call the driver
jsr mouse_move ; Call the driver
jmp incsp2 ; Drop the parameter
.endproc