This is a process interrupted,I do not know where the error happen.
I run the process int windows-dos ,use nasmw hello.asm -0 hello.com,but have error!
"binary output format does not support segment base references"
but I have another question,who can write the Correct process for me !
org 0100h
[section .text]
mov ax,cs
mov ds,ax
mov es,ax
; mov ss,ax
; mov sp,04c00h
mov ax,3580h ;get the interrupt address
int 21h
mov [int1choff],bx ;save the interrupt address
mov [int1chseg],es
push ds
mov dx,newint80h ;set the new interrupt address
mov ax,seg newint80h ; get the section address
mov ds,ax
mov ax,2508h
int 21h
pop ds
int 80h
mov dx,[int1choff] ;Resumption
mov ax,[int1chseg]
mov ds,ax
mov ax,2580h
int 21h
mov ax,4c00h ;exit
int 21h
newint80h:
sti
push ax
push bx
push cx
call DispStr
iret
DispStr:
mov ax,BootMessage
mov bp,ax
mov cx,25
mov ax,01301h
mov bh,0h
mov bl,0Ah
mov dl,0
int 10h
ret
[section .data]
BootMessage: db "hello word! "
int1choff: dw 0
int1chseg: dw 0