Exercise 6.4-1 Pag 160 ;; Space.asm-A procedure which takes as input an integer in ax and displays that number of space characters on the CRT screen. ;; If ax <= 0, no spaces are displayed. All registers are preserved. ;; INCLUDE PCMAC.INC .MODEL SMALL .586 .CODE ; No. .DATA required .PUBLIC space Space PROC push ax push cx push dx ; _PutCh destroys ax and dx cmp ax, 0 jle Done mov cx, ax SpaceLoop: _PutCh ' ' dec cx jnz SpaceLoop Done: pop dx pop cx pop ax ret Space ENDP END