EX3      START   1000
FIRST    LDA     ONE
         STA     I
LOOP1    LDX     ZERO
LOOP2    JSUB    PSTAR
         TIX     I
         JLT     LOOP2
         JSUB    NEWLINE
         LDA     I
         ADD     ONE
         STA     I
         COMP    K
         JLT     LOOP1
         RSUB
ONE      WORD    1
ZERO     WORD    0
I        RESW    1
K        WORD    11
.
. Subroutine for printing a star (*)
.
PSTAR    TD      OUTDEV
         JEQ     PSTAR
         LDCH    STAR
         WD      OUTDEV
         RSUB
.
. Subroutine for moving the cursor to the beginning of a newline
.
NEWLINE  TD      OUTDEV
         JEQ     NEWLINE
         LDCH    CRLF
         WD      OUTDEV
         RSUB
OUTDEV   BYTE    x'06'
STAR     BYTE    c'*'
CRLF     BYTE    x'00'
         END     FIRST
