1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-23 23:17:45 +00:00

Fixed some code, to adapt to register-use changes caused by pull request #652.

This commit is contained in:
Greg King
2018-07-27 09:07:40 -04:00
parent e86a7db18b
commit e6fc904e3c
4 changed files with 19 additions and 16 deletions
+9 -8
View File
@@ -1,8 +1,9 @@
;
; Ullrich von Bassewitz, 22.06.2002
; 2002-06-22, Ullrich von Bassewitz
; 2018-07-27, Greg King
;
; Helper function for getpixel/setpixel. Load X/Y from stack and check if
; the coordinates are valid. Return carry clear if so.
; Helper function for getpixel/setpixel. Load X/Y from arguments;
; and, check if the co-ordinates are valid. Return carry clear if so.
;
.include "tgi-kernel.inc"
@@ -15,13 +16,14 @@
jsr tgi_popxy ; Pop X/Y into ptr1/ptr2
; Are the coordinates out of range? First check if any coord is negative.
; Are the co-ordinates out of range? First, check if any coord is negative.
txa
ora ptr2+1
txa ; (.X = ptr2+1 from tgi_popxy)
ora ptr1+1
sec ; Return carry set if number is negative
bmi @L9 ; Bail out if negative
; Check if X is larger than the maximum x coord. If so, bail out
; Check if X is larger than the maximum x coord. If so, bail out.
lda ptr1
cmp _tgi_xres
@@ -38,4 +40,3 @@
@L9: rts
.endproc
+4 -4
View File
@@ -1,13 +1,14 @@
;
; Ullrich von Bassewitz, 02.10.2002
; 2002-10-02, Ullrich von Bassewitz
; 2018-05-20, Christian Kruger
;
; Helper function for tgi functions. Pops X/Y from stack into ptr1/ptr2
; Helper function for TGI functions. Pops X/Y from arguments into ptr1/ptr2.
;
.include "tgi-kernel.inc"
.import popptr1
.importzp ptr1, ptr2
.importzp ptr2
.proc tgi_popxy
@@ -16,4 +17,3 @@
jmp popptr1 ; X
.endproc