home *** CD-ROM | disk | FTP | other *** search
- ; NAME vputs
- ; Function: Call IBM ROM BIOS to display a string in graphics mode
- ; Caller: C:
- ; int putstty(const char *s, unsigned char color);
- ARGS equ dword ptr [bp+06]
- ARGS_s equ word ptr [bp+08]
- ARGS_o equ word ptr [bp+06]
- ARGC equ byte ptr [bp+0ah]
- ;
- ARGX equ byte ptr [bp+06]
- ARGY equ byte ptr [bp+08]
- ;
- VPUTS_TEXT SEGMENT byte public 'CODE'
- public _putstty
- ASSUME cs:VPUTS_TEXT
- ;
- _putstty PROC far
- push bp
- mov bp,sp
- push es
- push si
- pushf
- cld
- les si,ARGS
- mov al,ARGC
- mov bl,al
- mov ah,0eh
-
- @again: ;
- lodsb ; mov al,es:[si]
- cmp al,0
- jz @out
- int 10h
- jmp @again
-
- @out: xor ah,ah
- dec si
- lodsb
- popf
- pop si
- pop es
- pop bp
- ret
- _putstty endp
- public _Vputs
- ; int Vputs(char *s)
- extrn __foreground_color:BYTE
- _Vputs PROC far
- push bp
- mov bp,sp
- push es
- push si
- pushf
- cld
- les si,ARGS
- mov bl,__foreground_color
- mov ah,0eh
-
- jmp @again ; jump into _putstty
-
- _Vputs endp
- ;
- public _Vgotoxy
- ;
- _Vgotoxy PROC far
- push bp
- mov bp,sp
- push ds
-
- xor ax,ax
- mov ds,ax
- mov bh,ds:[0462h] ; assume current display page
- mov ah,02
- mov dh,ARGY
- mov dl,ARGX
- int 10h
-
- pop ds
- pop bp
- ret
- _Vgotoxy endp
- ;
- VPUTS_TEXT ENDS
- END
-
-