[Coco] Hello World part2

Roger Taylor rtaylor at bayou.com
Wed Jan 21 14:31:07 EST 2004


I copied and pasted the source code below right into Portal-9 and as 
expected it only reported 3 lines that needed correction, all 
highlighted... so I changed the .NEQ. to <>   , and the two .EQU.s to =

It runs fine.  Nice job.


At 08:32 AM 1/21/2004 -0500, you wrote:
>Here is a slightly modified version of Theodore's Hello World program. It 
>is selectable for true lowercase or color mode for text. Unfortunately 
>numbers and punctuation have only one color set.
>
>* SLIGHTLY MODIFIED PROGRAM POSTED BY THEODORE EVANS
>* NEXT LINE SELECTS BLACK LETTERS GREEN BACKGROUND
>* GREEN LETTERS BLACK BACKGROUND OR TRUE LOWERCASE
>* ON GREEN BACKGROUND
>
>LETTER  EQU     -1      0=BLACK ON GREEN, 1=GREEN ON BLACK, -1=TRUE
>
>* NEXT LINE CAN BE CHANGED OR REMOVED
>         ORG     $7000
>* HELLO, WORLD
>* CLEAR SCREEN
>START    LDX #$0400
>         LDA     #$20
>         COND    LETTER.NEQ.0
>         ADDA    #$40
>         ENDC
>CLRLP    STA ,X+
>         CMPX #$0600
>         BLO CLRLP
>         COND    LETTER.EQU.-1
>         LDA     $FF22
>         ORA     #%00010000      ACTIVATE LOWERCASE
>         STA     $FF22
>         ENDC
>* WRITE 'HELLO, WORLD' TO MIDDLE OF SCREEN
>         LDX #$04EA
>         LDY #HELLO
>WRTLP    LDA ,Y+
>         BEQ     QUIT
>         COND    LETTER.EQU.0
>         CMPA    #$20
>         BEQ     NOFLP
>         ENDC
>         CMPA    #'@
>         BLO     FLIP
>         CMPA    #$60
>         BLO     NOFLP
>         ANDA    #$DF
>FLIP    EORA    #$40
>NOFLP   STA ,X+
>         BNE WRTLP
>QUIT    BRA     QUIT
>HELLO   FCC 'Hello, World'
>         FCB 0
>         END START
>
>
>--
>Coco mailing list
>Coco at maltedmedia.com
>http://five.pairlist.net/mailman/listinfo/coco


----------
Roger Taylor






More information about the Coco mailing list