34 lines
566 B
Plaintext
34 lines
566 B
Plaintext
TITLE HW2 - Print diamond on screen (Homework 2)
|
|
SEARCH MONSYM
|
|
|
|
Comment $ (Gorin p. 65) $
|
|
|
|
START: RESET
|
|
MOVEI 10,7 ;lines in top triangle
|
|
MOVEI 12,6 ;first star on line
|
|
MOVEI 13,10 ;last star on line
|
|
TOP: MOVEI 11,15 ;char. position countdown
|
|
AOS 12
|
|
SOS 13
|
|
TOPCHR: HRROI 1,ASTER
|
|
PSOUT
|
|
SOJG 11,TOPCHR
|
|
HRROI 1,NEWLIN
|
|
PSOUT
|
|
SOJG 10,TOP
|
|
MOVEI 10,6 ;lines in bottom triangle
|
|
BOTTOM: MOVEI 11,15
|
|
BOTCHR: HRROI 1,ASTER
|
|
PSOUT
|
|
SOJG 11,BOTCHR
|
|
HRROI 1,NEWLIN
|
|
PSOUT
|
|
SOJG 10,BOTTOM
|
|
HALTF
|
|
|
|
ASTER: ASCIZ /*/
|
|
SPACE: ASCIZ / /
|
|
NEWLIN: ASCIZ /
|
|
/
|
|
END START
|