From the very restricted amount of code you've given us, and completely free of context, I'd suggest you may be missing a ret
from the second procedure.
My program in 8086/8088 assembly prints extra characters
سؤال
A wrote a program in emu8086 that reads 2 32-bit hex numbers and calculates their product which is a 64-bit number. Because the registers are 16-bit I read 4 digits every time and store them in one of them. My problem is that when i read and print (for the user to see what he typed) the digits, every 4 digits my program prints an extra character. I cannot find any mistakes so i put here the routines that i assume must cause this.
READ_HEX PROC NEAR
LL: READ
CMP AL,'0'
JL LL
CMP AL,'9'
JLE NEXT1
CMP AL,'A'
JL LL
CMP AL,'F'
JLE NEXT2
NEXT1:
PRINT AL
SUB AL,30H
RET
NEXT2:
PRINT AL
SUB AL,37H
RET
READ_HEX ENDP
MAKE_16_BIT PROC NEAR
MOV CX,4
MOV BX,0
MOV AX,0
L: CALL READ_HEX
MOV AH,0
ROL BX,4
ADD BX,AX
LOOP L
MAKE_16_BIT ENDP
المحلول
لا تنتمي إلى StackOverflow