[Coco] 6x09/hello_os9-Commented

johnmarkmelanie at gmail.com johnmarkmelanie at gmail.com
Wed Oct 11 15:03:47 EDT 2023


All,

See LWASM code below.
Note the pragma command.
Note see the fcc command and note the "\r\0". This is for carriage return and a null terminator.
You may need to copy this text to a text editor that supports a font like courier new font.

-------
        pragma cescapes
        org $0800

Backspace equ 8

;Reserve variable space in RAM
T  rmb 1

;ASCII Ruler
;                      1    1    2    2    3
;             ----5----0----5----0----5----0--
;*********************************************
Msg9    fcc  "\rPRESS A KEY TO CONTINUE\r\0"

*---|----1----|----2----|----3----|----4----|----5----|----6----|----7----|----8
* Start... Main Control Section
*
Start   lda  #0         Print to screen
        sta  $006F      "
        ldx  #Msg9      Print CHR$(13);"PRESS A KEY TO CONTINUE"
        jsr  PrintMsg   "        rts

*---|----1----|----2----|----3----|----4----|----5----|----6----|----7----|----8
* PrintMsg... Print a text message.
*
* Example:
*       ldx  #Msg1
*       jsr  PrintMsg
*
PrintMsg                ;do
        lda  ,x+        ;read char, and incx
        beq  Print99    ;exit loop if 0
        jsr  [$A002]    ;PutChar
        bra  PrintMsg   ;while 1
Print99 rts

        end Start

- John Mark Mobley

-----Original Message-----
From: Coco <coco-bounces at maltedmedia.com> On Behalf Of Allen Huffman via Coco
Sent: Wednesday, October 4, 2023 9:52 AM
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Cc: Allen Huffman <alsplace at pobox.com>
Subject: Re: [Coco] 6x09/hello_os9-Commented

> On Oct 4, 2023, at 9:48 AM, dave--- via Coco <coco at maltedmedia.com> wrote:
> 
> And just to clarify, I don’t believe there is an assembler directive that adds a zero terminator to a string. 

I got confused with an LWTOOLS assembled op code. I have not checked EDTASM+ to see what it had.

FCN string, .ASCIZ string, .STRZ string
Include a NUL terminated string of text in the output. The first character of the operand is the delimiter which must appear as the last character and cannot appear within the string. A NUL byte is automatically appended to the string.

-- 
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list