Browse code

(asma) Minor optimisations

Andrew Alderwick authored on 07/06/2022 23:53:14
Showing 1 changed files
... ...
@@ -202,10 +202,10 @@
202 202
 @asma-init-next-pass ( -- )
203 203
 	;asma/pass LDA INC ;asma/pass STA
204 204
 	;asma-write-buffer ;asma-output/ptr STA2
205
-	#0000 DUP2
205
+	#0100 DUP DUP2 ( 0100 00 0000 )
206 206
 		;asma/addr STA2
207 207
 		;asma/state STA
208
-	#01 SWP ( 0100 ) ;asma/written-addr STA2
208
+		;asma/written-addr STA2
209 209
 	;&preamble-end ;&preamble SUB2k ;asma-assemble-chunk JSR2 POP2 POP2
210 210
 	JMP2r
211 211
 
... ...
@@ -511,11 +511,6 @@
511 511
 	POP2 #01
512 512
 	JMP2r
513 513
 
514
-@asma-write-short ( short -- )
515
-	SWP
516
-	,asma-write-byte JSR
517
-	,asma-write-byte JMP ( tail call )
518
-
519 514
 @asma-write-lit ( byte -- )
520 515
 	;asma/lit LDA2 ,&present JCN
521 516
 	,asma-flush-held JSR
... ...
@@ -553,6 +548,11 @@
553 548
 	#00 ;asma/jsr STA
554 549
 	JMP2r
555 550
 
551
+@asma-write-short ( short -- )
552
+	SWP
553
+	,asma-write-byte JSR
554
+	( fall through )
555
+
556 556
 @asma-write-byte ( byte -- )
557 557
 	,asma-flush-held JSR
558 558
 	&raw