
; LIST USR 30474

7702                          .ORG   $7702   
7702                BITMAP:                 ; prefix the code with bitmap data
7702   0251307209049249       DB   $02,$51,$30,$72,$09,$04,$92,$49   
770A                START:       
770A   C5                     PUSH   bc     ;  start = $770A => BC
770B   E1                     POP   hl      ;  copy $77 => H and 10 => L (column)
770C                COL:         
770C   41                     LD   b,c      ; start each col on row 10, and immediately
770D                ROTATE:                 ; plot an asterisk and its 4 rotations
770D   3E 16                  LD   a,22   
770F   D7                     RST   16      ; PRINT AT command
7710   A2                     AND   d       ; STKEND = $5Cxx => DE, A = 22 AND $5C = 20
7711   95                     SUB   l       ; A = 20 - old col
7712   D7                     RST   16      ; position new row
7713   68                     LD   l,b      ; new col (L) = B = old row
7714   47                     LD   b,a      ; new row (B) = A = 20 - old col
7715   7D                     LD   a,l      ; => rotate 90º anticlockwise around (9,9)
7716   D7                     RST   16      ; position new col
7717   3E 2A                  LD   a,"*"    ; A = asterisk
7719   D7                     RST   16      ; print it
771A   CB 0C                  RRC   h       ; 8-bit rotate H, exit loop every 4 rotations
771C                CHECK:       
771C   38 EF                  JR   c,rotate ; plot if set / exit loop every 4th time
771E   CB 3E                  SRL   (hl)    ; grab 1 bit from bitmap
7720   10 FA                  DJNZ   check  ; use this bit for next row, until we run out
7722   2D                     DEC   l       ; otherwise, move on to next col
7723   C8                     RET   z       ; exit if we have run out of columns
7724   18 E6                  JR   col      ; print the next col and its rotations
7726                END:         
