Browse code

(asma) Correct relative offsets

Andrew Alderwick authored on 28/11/2021 17:45:02
Showing 1 changed files
... ...
@@ -466,10 +466,10 @@
466 466
 @asma-write-lit ( byte -- )
467 467
 	;asma/lit LDA2 ,&present JCN
468 468
 	POP #01 ;asma/lit STA2
469
-	;asma/addr LDA2k INC2 SWP2 STA2
469
+	;asma/addr LDA2k INC2 INC2 SWP2 STA2
470 470
 	JMP2r
471 471
 	&present
472
-	;asma/addr LDA2k #0001 SUB2 SWP2 STA2
472
+	;asma/addr LDA2k #0002 SUB2 SWP2 STA2
473 473
 	LIT LIT2 ,asma-write-byte/raw JSR
474 474
 	,asma-write-byte/raw JSR
475 475
 	,asma-write-byte/raw JSR
... ...
@@ -480,7 +480,7 @@
480 480
 	;asma/lit LDA2 ,&present JCN
481 481
 	POP JMP2r
482 482
 	&present
483
-	;asma/addr LDA2k #0001 SUB2 SWP2 STA2
483
+	;asma/addr LDA2k #0002 SUB2 SWP2 STA2
484 484
 	LIT LIT ,asma-write-byte/raw JSR
485 485
 	,asma-write-byte/raw JSR
486 486
 	#0000 ;asma/lit STA2
... ...
@@ -702,7 +702,9 @@
702 702
 	JMP2r
703 703
 
704 704
 @asma-literal-rel-addr
705
-	,asma-addr-helper JSR ;asma/addr LDA2 SUB2 #0003 SUB2
705
+	,asma-addr-helper JSR
706
+	;asma/addr LDA2 SUB2
707
+	#0003 ;asma/lit-present LDA SUB SUB2
706 708
 
707 709
 	DUP2 #0080 LTH2 STH
708 710
 	DUP2 #ff7f GTH2 STHr ORA ,&in-bounds JCN