; 8085 Source code test program ; for Rolf Dieter Klein's ; EF9366-based video board CRT3. ; ; 2021-10-30 Code assembled online at https://www.asm80.com/ ; and checked against original scanned text. ; ; Listing format differs from the format in the book, ; which used a different assembler. ; ; BDOS EINSPRUNG = BDOS ENTRY ; zeileinit = line unit ; rueck = back ; zeichen in akku = characters in accumulator ; ; A few additional lines: ; CR equ 0dh ; Carriage Return LF equ 0ah ; Line Feed org 0 ; just to be explicit ; ; code below from original listing: ; wboot equ 0000h ; =BDOS EINSPRUNG bdos equ 0005h cmd equ 30h ctrl1 equ cmd+1 ctrl2 equ cmd+2 csize equ cmd+3 deltax equ cmd+5 deltay equ cmd+7 xmsb equ cmd+8 xlsb equ cmd+9 ymsb equ cmd+10 ylsb equ cmd+11 start: call setstep lxi h,504 lp2: call zeileinit call xaus lxi d,255 lp1: call yaus call rueck lda awert call chr lda awert call chr push h xchg lxi d,-1 dad d xchg pop h mov a,d ora a jp lp1 call crlf push d lxi d,-8 dad d pop d mov a,h ora a jp lp2 call wboot ; hlt ; txt1: db "HARDCOPY", 0,CR,LF,27,'A',7,255 txt2: db 27,'K',0,2,255 setstep: push h lxi h,txt1 call lprint pop h ret zeileinit: push h lxi h,txt2 call lprint pop h ret crlf: push h lxi h,crtxt call lprint pop h ret crtxt: db CR, LF, 255 xaus: mov a,l out xlsb mov a,h out xmsb ret yaus: mov a,e out ylsb mov a,d out ymsb ret rueck: mvi a,0fh out cmd ; wai: in cmd ani 4 jz wai ; in cmd+15 nop sta awert ret ; chr: ; zeichen in akku push h push d push b mov e,a mvi c,5 call bdos pop b pop d pop h ret lprint: push h lpr1: mov a,m cpi 255 jz lpr2 call chr inx h jmp lpr1 lpr2: pop h ret ; awert: db 0 end