I complied this code, but there is an error message indicating there is a problem with the code. Please anybody help me fix it.
SAMPLE program for arithmetic operation:
ORG 0100H
MOV AL,X ; Move X into AL
MOV BL,02H ; Move 2 into BL
MUL BL ; Multiply AL by BL, the result will be in AX
MOV CX,AX ; Store the answer in CX
MOV AL,Y ; Move Y into AL
MOV BA,05H ; Move 5 into BL
MUL BL ; Multiply AL by BL, the result will be in AX
ADD AX,CX ; ADD first arithmetic result to second one
MOV CL,W ; Move the dividend (W) into CL
DIV CL ; Divide CL into AX, the result will be in AH,AL
I complied this code, but there is an error message
How exactly did you compile it, and what exactly is the error message.
Note that this program is written for 16-bit x86 platform and expects to be executed by MS-DOS operating system (or compatible), it may take some work to find an assembler and an emulator to run this today.
Well the complier indicates a problem in the seventh line form the code, which is MOV BA,05H. It states that is probably not defined and a wrong parameter in the code. And I found a program online that runs it.
Hey thanks guys, Sorry for the late reply. Anyways, a thanks to Chervil and BluesMatt for stating that mistake from the source code. The code was able to compile after fixing that careless mistake.