From 4cddb13ba8e0355e30d9d408efa48ed9fd21f309 Mon Sep 17 00:00:00 2001 From: John Lorentzson Date: Thu, 31 Jul 2025 23:21:46 +0200 Subject: [PATCH] Add user procedures bitor, shiftleft, and shiftright --- host/src/mainloop.s | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/host/src/mainloop.s b/host/src/mainloop.s index c6a17bb..651a067 100644 --- a/host/src/mainloop.s +++ b/host/src/mainloop.s @@ -76,6 +76,38 @@ ml: rts .endproc +.proc bitor ; user-procedure + lda ARGVEC+0 + ora ARGVEC+1 + rts +.endproc + +.proc shiftleft ; user-procedure + lda ARGVEC+0 + ldx ARGVEC+1 +@loop: + cpx #$00 + beq @done + asl + dex + jmp @loop +@done: + rts +.endproc + +.proc shiftright ; user-procedure + lda ARGVEC+0 + ldx ARGVEC+1 +@loop: + cpx #$00 + beq @done + lsr + dex + jmp @loop +@done: + rts +.endproc + FRAMECOUNT: .byte 0 FIRSTTIME: .byte 1