From 5271d896e9e1ff561096255cd2cd36f6d4abfff3 Mon Sep 17 00:00:00 2001 From: Duncan Smith Date: Fri, 11 Jun 2010 20:28:50 -0700 Subject: PUSHW corrected --- main.asm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index 7534f06..abc7b89 100644 --- a/main.asm +++ b/main.asm @@ -84,15 +84,22 @@ PUSHW MACRO subq.w #1,d1 move.w d2,d1 bsr deref - move.b \1,(a0) ; \1_l + LOHI \1 + move.b \1,(a0) ; high byte + HILO \1 + subq.w #1,d1 + move.b \1,(a0) ; low byte bsr deref - move.b \1,(a0) ; \1_h subq.w #2,d2 ENDM ;; Pop the word at the top of stack d2 (pre-swapped) into \1. ;; Destroys d0, a0. + + ;; \1_h <- (SP+1) + ;; \1_l <- (SP) + ;; SP <- SP + 2 POPW MACRO move.b d2,d1 bsr deref ; low byte -- cgit v1.2.3