From 45c0ccf6c341f9a4edc4ac97787b6bf073d04bce Mon Sep 17 00:00:00 2001 From: Martin Haye Date: Sun, 20 Jul 2014 15:52:51 -0700 Subject: [PATCH] Splitting strings into words. --- .../Apple/virtual/src/plasma/gameloop.pla | 55 +++++++++++++++---- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/Platform/Apple/virtual/src/plasma/gameloop.pla b/Platform/Apple/virtual/src/plasma/gameloop.pla index 0e7c5a4f..526e256e 100644 --- a/Platform/Apple/virtual/src/plasma/gameloop.pla +++ b/Platform/Apple/virtual/src/plasma/gameloop.pla @@ -369,18 +369,49 @@ end ; Display a string using the font engine asm displayStr ; (str) - txa - pha - bit setROM - txa - ldy evalStkL,x - lda evalStkH,x - tax - jsr printSTR - bit setLcRW+lcBank2 - pla - tax - rts + txa + pha + bit setROM + txa + lda evalStkL,x + sta pTmp + lda evalStkH,x + sta pTmp+1 + ldy #0 + lda (pTmp),y + beq ++ + inc pTmp + bne + + inc pTmp+1 ++ +-- tax + ldy #0 +- lda (pTmp),y + dex + cmp #$20 + beq + + sta $281,y + iny + cpx #0 + bne - ++ sty $280 + tya + sec + adc pTmp + sta pTmp + bcc + + inc pTmp+1 ++ txa + pha + ldy #$80 + ldx #2 + jsr printSTR + pla + bne -- +++ bit setLcRW+lcBank2 + pla + tax + rts end ;==================================================================================================