mirror of
https://github.com/cc65/cc65.git
synced 2025-01-24 04:34:35 +00:00
Fixed some code, to adapt to register-use changes caused by pull request #652.
This commit is contained in:
parent
e86a7db18b
commit
e6fc904e3c
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
;
|
||||
; Piotr Fusik, 18.11.2001
|
||||
; 2001-11-18, Piotr Fusik
|
||||
; 2018-05-20, Christian Kruger
|
||||
;
|
||||
; unsigned long __fastcall__ adler32 (unsigned long adler, unsigned char* buf,
|
||||
; unsigned len);
|
||||
@ -78,6 +79,7 @@ _adler32:
|
||||
; return 1L
|
||||
@L0: sta sreg
|
||||
sta sreg+1
|
||||
tax ; (popptr1 doesn't set .X)
|
||||
lda #1
|
||||
; ignore adler
|
||||
jmp incsp4
|
||||
|
@ -1,5 +1,6 @@
|
||||
;
|
||||
; Piotr Fusik, 14.11.2001
|
||||
; 2001-11-14, Piotr Fusik
|
||||
; 2018-05-20, Christian Kruger
|
||||
;
|
||||
; unsigned long __fastcall__ crc32 (unsigned long crc, unsigned char* buf,
|
||||
; unsigned len);
|
||||
@ -116,6 +117,7 @@ _crc32:
|
||||
; return 0L
|
||||
@L0: sta sreg
|
||||
sta sreg+1
|
||||
tax ; (popptr1 doesn't set .X)
|
||||
; ignore crc
|
||||
jmp incsp4
|
||||
|
||||
@ -128,5 +130,3 @@ table_0: .res 256
|
||||
table_1: .res 256
|
||||
table_2: .res 256
|
||||
table_3: .res 256
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user