i have the numbers in the array now, both in single and double digits now what i am trying to do is display them back out to the screen.
this is what i have and i dont know why it aint working
mov bx,offset numarray
mov cx,count
outtake:mov al,[bx]
cmp al,9 ;to check...
so if i wanted to put another variable in the next position do i increment bx?
inc bx
also if i want bx to point to the first postion of the array do i
mov bx,'0'
to repostion it at the start?
or
mov bx,offset numarray
again
i just want to thank u have been a great help..
now i do what ever calculations i want with al and add 48 back to it to be displayed.
add al,48
mov ah,2
mov dl,al
int 21h
this should display the answer in decimal
in assembly language how do i place numbers into an array
numarray db 5 dup(?)
firstnum db 0
mov ah,1
int 21h
mov firstnum,al
mov bx,offset numarray
mov [bx],firstnum
now i aint sure if a variable can be placed into an array like this.. does it have to come from a...
hey there.. i am having trouble converting a decimal double digit number that is in a variable out of ascii.. when ever i try to print to the screen it gives me the ascii value for the number e.g 40 = (
when i just want to print 40
ok here is what i have now. at the moment i have the decimal value i want in the variable but when i try and display it again it changes back to ascii..
mov ah,1
int 21h
sub ax,48
mov firstd,al
mov al,10
mul firstd
mov firstd,al
mov ah,1
int 21h
sub ax,48
add firstd,al
mov...
sorry the machine was beeping that part wasnt imortant i just took it to mean that there was an error.. not sure what assembler can u give me examples and i will let u know which one sounds familiar.. sorry for not knowing something as simple as that but i am learning.. i swear!
hi how u doing.. what i am trying to do is take in 2 digits and then place them in a variable.
i use mov ah,1 to take in the first didit which i then place in a db then i use another mov ah,1 to take in the second digit which places the character in al. i then place the stored db back into ah. i...
hi who ever is reading this..
what i need to do is take write a procedure which can take input of 2 digit values and another procedure to output 2 digit values. this is to be written in assembly
thanks in advance and any help at all would be great
HI I KNOW THAT THIS IS HANDY TO EVERYONE ELSE BUT I DONT KNOW WHAT I AM DOING WRONG.. I AM ADDING TWO NUMBERS FROM AX AND BX AND RESULT IN AX AND WHEN THE ANSWER IS BELOW 10 IT OUTPUTS THE ANSWER FINE BUT WHEN THE ANSWER IS 10 OR OVER IT GOES MAD ON ME.. PLEASE HELP
G
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.