home *** CD-ROM | disk | FTP | other *** search
- ;* ------------------------------------------------------- *
- ;* TP3GR.INC *
- ;* Textausgabe und Aufruf von TP3-Grafik *
- ;* ------------------------------------------------------- *
-
- write proc
- ; Gibt String aus, der am Ende mit einem $ abge-
- ; schlossen sein muß.
- ; 1,1 ist linke obere Ecke
- ; DH = Y DL = X BL = Zeichenfarbe
- ; DS:SI = Adresse des String's
- xor bh,bh
- mov cx,1
- dec dl
- dec dh
- push bp
- push dx
- mov bp,sp
- cld
- wr1:
- push bx
- mov ah,02h
- int 10h ; Cursor positionieren
- pop bx
- lodsb
- cmp al,'$' ; Ende des Strings
- jz WrEnde ; dann WRITE verlassen
- cmp al,0dh ; CR-Code ?
- jnz wr2
- mov dl,[bp] ; X Koordinate wiederherstellen
- jmp wr1
- wr2:
- cmp al,0ah ; LF-Code ?
- jnz wr3
- inc dh
- jmp wr1 ; y:= y+1
- wr3:
- mov ah,09h
- int 10h
- inc dl
- cmp dl,40
- jnz wr1
- inc dh
- mov dl,[bp]
- jmp wr1
- WrEnde:
- pop dx
- pop bp
- inc dl
- inc dh
- ret
- write endp
-
- GrFunction proc near
- ; ruft Grafikroutinen aus GRAPH auf
- mov bx,offset graph
- add bx,di
- jmp bx
- ; GRAPH holt sich Rücksprungadresse selbst
- GrFunction endp
- ;* ------------------------------------------------------- *
- ;* Ende von TP3GR.INC *
-
-