When I run the written code, the error "this interrupt is not defined yet, it is availabe for custom functions. you can define this interrupt by modifying interrupt vector table refer to the list of supported interrupts and global memory table" occurs when initializing the array
This code was run in emu8086:
.model tiny
.code
ORG 100h
begin:
JMP start
start:
MOV AH,9 ; output message0
MOV DX, offset mess0
INT 21h
MOV DI, offset buff ; we will write STOSB in DI
MOV BX,4 ; line counter
MOV DX,4 ; number counter in line
create: ;<=====; start input and save ================//
MOV CX,2 ; limit the number to 2 characters
DEC DX ; decrement the number counter
@1:
MOV AH,1 ; input
INT 21h
STOSB ; store the first character in DI
LOOP @1 ; ..followed by the second.
MOV AL,' ' ; space/separator
INT 29h
STOSB ; its too in DI..
OR DX,DX ; is it the last number in the line?
JNZ create ; no - fill in the line further
MOV AH,9 ; line ended.
MOV DX,offset crlf ; new line!
INT 21h
DEC BX ; decrement the line count
OR BX,BX ; is it last line?
JZ next ; yes - exit the input loop
MOV DX,4 ; restore the number of numbers in a string
JMP create ; fill in the next line of the array
next: ;<=====; display the result on the screen ================//
MOV AH,9
MOV DX, offset mess1
INT 21h
MOV CX,4 ; how many pairs of digits to output
MOV SI, offset buff ; source - buffer
print:
LODSB ; read the first character
INT 29h ; display it on the screen
LODSB ; second character..
INT 29h
LODSB ; take a space
INT 29h
ADD SI,12 ; move the pointer to 4 triads of characters
LOOP print ; loop until CX > 0
exit: ; exit
XOR AX,AX
INT 16h
INT 20h
ret
mess0 DB 'CREATE ARRAY...',13,10
DB '====================',13,10,'$'
mess1 DB '====================',13,10
DB 'RESULT: $'
crlf DB 13,10,'$'
buff DB 80 DUP(0)
end begin
You're trying to use an interrupt that is not implemented by the emulator:
http://www.ctyme.com/intr/rb-4124.htm
You may need to extend the emulator with support for int 29h
or ask the emulator developers for help in extending it. Alternatively you can change the calls to int 29h
to int 21h
, service 02:
http://www.ctyme.com/intr/rb-2554.htm
E.g.
mov dl,'A' ; write 'A' to std out
mov ah,02h ; WRITE CHARACTER TO STANDARD OUTPUT
int 21h