diff --git a/Documentation.md b/Documentation.md index 0197403..7cafeb4 100644 --- a/Documentation.md +++ b/Documentation.md @@ -812,8 +812,13 @@ Prints a string into the current view, at the *local* cursor position. The text X: WGPrint PARAM0: Pointer to null-terminated string (LSB) PARAM1: Pointer to null-terminated string (MSB) +Overflow: If set, characters are printed raw, with no high bit manipulation. Only works in NORMAL mode.
 &PRINT("string")
+
+or
+
+&PRINT(raw_character)
 
diff --git a/ReadMe.md b/ReadMe.md index 814d5d7..bb888a8 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -8,7 +8,6 @@ Known issues To Do: ------ -- Clicking on scroll arrows in basicdemo messes up title rendering - Write sample code - Update side effects in assembly API - Support for frameless views diff --git a/applesoft.s b/applesoft.s index cfe3caa..027181e 100644 --- a/applesoft.s +++ b/applesoft.s @@ -611,6 +611,10 @@ WGAmpersand_CURSR: WGAmpersand_PRINT: jsr WGAmpersandBeginArguments + jsr CHRGOT ; Experimental alternate parameter support + cmp #'"' + bne WGAmpersand_PRINTint + jsr WGAmpersandTempStrArgument stx PARAM0 sty PARAM1 @@ -637,6 +641,24 @@ WGAmpersand_PRINT: rts +WGAmpersand_PRINTint: + ; User passed a non-string, so interpret as an ASCII code + jsr WGAmpersandIntArgument + sta WGAmpersand_PRINTintBuffer + jsr WGAmpersandEndArguments + + lda #WGAmpersand_PRINTintBuffer + sta PARAM1 + bit WGAmpersand_PRINTrts ; Set overflow + jsr WGPrint + +WGAmpersand_PRINTrts: + rts + +WGAmpersand_PRINTintBuffer: + .byte 0,0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; WGAmpersand_SCR diff --git a/painting.s b/painting.s index d317398..dcf329e 100644 --- a/painting.s +++ b/painting.s @@ -130,12 +130,22 @@ WGPlot_done: ; cursor position. Clips to current view. ; PARAM0: String pointer, LSB ; PARAM1: String pointer, MSB +; V: If set, characters are printed raw with no high bit alterations ; Side effects: Clobbers SA,BASL,BASH ; WGPrint: SAVE_AXY SAVE_ZPS + lda #%10000000 + bvc WGPrint_setupMask + lda #0 + clv + +WGPrint_setupMask: + sta WGPrint_specialMask + + ; Start checking clipping boundaries lda WG_LOCALCURSORY cmp WG_VIEWCLIP+3 bcs WGPrint_leapDone ; Entire string is below the clip box @@ -220,7 +230,7 @@ WGPrint_visibleChars: WGPrint_charLoopNormal: lda (PARAM0),y ; Draw current character beq WGPrint_done - ora #%10000000 + ora WGPrint_specialMask jsr WGPlot iny @@ -286,3 +296,5 @@ WGPrint_charLoopInversePlot: beq WGPrint_endVisible bra WGPrint_charLoopInverse +WGPrint_specialMask: + .byte 0 diff --git a/weegui.dsk b/weegui.dsk index f261858..f67fd17 100644 Binary files a/weegui.dsk and b/weegui.dsk differ