Hi , I wrote this assembly code in TASM but when "CL=11" output is "0;" .
What is wrong in this code??? (And sorry for my bad english (((((-: )
MOV AL,CL
MOV AH,0
I DB 10
DIV I
MOV BL,AL
MOV BH,AH
ADD BL,48
ADD BH,48
MOV AH,02
MOV DL,BH
INT 21H
MOV DL,BL
INT 21H
1
Expert's answer
2011-06-09T04:54:30-0400
MOV AL,CL MOV AH,0 ;xor ah, ah looks much better JMP DEF ;!!!!!!!!!!!!!!!!!!!!! I DB 10 ;Later this memory was read and understood as operation. now it is data. DEF: ;!!!!!!!!!!!!!!!!! DIV I MOV BL,AL MOV BH,AH ADD BL,48 ADD BH,48 ;in this case number is reversed MOV AH,02 MOV DL,BH ;change bh on BL INT 21H MOV DL,BL ;change bl on BH INT 21H
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment