40 lines
328 B
PHP
40 lines
328 B
PHP
; IN:
|
|
; ds:si = start of asciz string
|
|
printz:
|
|
push ax
|
|
push si
|
|
|
|
.loop:
|
|
lodsb
|
|
test al, al
|
|
jz .end
|
|
|
|
call printc
|
|
|
|
jmp .loop
|
|
|
|
.end:
|
|
|
|
pop si
|
|
pop ax
|
|
ret
|
|
|
|
; IN:
|
|
; al = cp437 character
|
|
printc:
|
|
push ax
|
|
|
|
cmp al, 10
|
|
jne .output
|
|
|
|
mov ax, 0x0e0d
|
|
int 0x10
|
|
mov al, 10
|
|
|
|
.output:
|
|
mov ah, 0xe
|
|
int 0x10
|
|
|
|
pop ax
|
|
ret
|