Actually this is pure Assembly. I thought A86 was an x86 assembler... well, it must be otherwise it wouldn't even run on my machine, now would it. no, it isn't an external operation, pure ASM code for A86. Now, I'll post all of my code in here, and maybe someone can tell me why it doesn't compile with NASM. For those who are just interested, it's also commented:
start: mov ds,cs ;data segment same as code segment
jmp goahd ;go ahead jump over defines no1-no2
no1: db 'PRESS THE ESC KEY AT ANY TIME TO EXIT TO THE DOS> PROMPT',0
no2: db 'Hello World!',0 ;no1 & no2 = zero terminated strings
goahd: mov ax,3 ;reset video to text mode
int 10h ;to clear the screen
call cursof ;turn off the cursor
mov es,0b800h ;text mode video segment address
call newpaj ;set video page bright white on blue
mov di,no1 ;ESC key message above
mov si,1460 ;line 10 on video display
call display ;display it
mov di,no2 ;Hello World! message above
mov si,2138 ;line 14 on video display
call display ;display it
await: mov ah,0 ;wait for keyboard press
int 16h ;interrupt 16h returns key value
cmp ah,1 ;ESC key pressed ?
if z jmp exit ;if so, exit to DOS> prompt
jmp await ;wait for ESC key to exit
newpaj: pusha ;save most all regs on stack
mov cx,2000 ;num bytes per screen - add x 2
mov ah,31 ;bright white text on blue background
mov al,20h ;= ASCII space to erase anything
mov di,0 ;top of video address
b2: mov es:[di],ax ;display it
add di,2 ;next video location
loop b2 ;continue till cx zero
popa ;restore most all regs from stack
ret ;all done
exit: call curson ;restore the cursor
mov ax,3 ;reset video text mode =
int 10h ;clear the screen
mov ax,4c00h ;exit pointer and
int 21h ;interrupt 21h returns to DOS> prompt
display: mov al,[di] ;get ASCII byte to display
cmp al,0 ;zero terminated string = the end ?
if z ret ;if so return after call if all done
mov ah,31 ;31 decimal = blue background + bright white letters
inc di ;next byte to display
mov es:[si],ax ;display byte and attribute on video
add si,2 ;requires 2 bytes
jmp display ;go do next one
curson: mov cx,11 ;cursor video bios display
curs: mov bh,0 ;this part
mov ah,1 ;of video
int 10h ;do it
ret ;return to instruction after call
cursof: mov cx,0e00h ;cursor video move out of sight
jmp curs