Added "popptr1" which is of common use to save some bytes.

This commit is contained in:
IrgendwerA8
2018-05-20 15:30:18 +02:00
parent 3a6430b13d
commit c95ed4b8b5
35 changed files with 113 additions and 151 deletions

View File

@@ -8,7 +8,7 @@
.include "tgi-kernel.inc"
.importzp ptr1, ptr2, ptr3, ptr4
.import popax
.import popax, popptr1
.proc _tgi_bar
@@ -24,9 +24,7 @@
sta ptr2 ; Y1
stx ptr2+1
jsr popax
sta ptr1 ; X1
stx ptr1+1
jsr popptr1 ; X1
; Make sure X1 is less than X2. Swap both if not.

View File

@@ -6,17 +6,14 @@
.include "tgi-kernel.inc"
.import popax
.import popptr1
.importzp ptr1, ptr2
.proc tgi_popxy
sta ptr2 ; Y
stx ptr2+1
jsr popax
sta ptr1 ; X
stx ptr1+1
rts
jmp popptr1 ; X
.endproc