xXFrostXx
New Member
Yeah, we're supposed to create an 8085 assembly program to check if words/sentences that the user types in are palindromes (ex. racecar). I found a flow chart online for a program that checks if a number defined in the program(not user input) is a palindrome, and from that I get the general sense of what I need to do(RLC, RRC, and CMP stuff mostly) but there's one thing that's confusing me and it's driving me nuts. User. input. The code I know for reading user input sends one character at a time to the A register. For this program to work(far as I know), my thinking is I need to be able to have it send a whole string of letters to the A register(I can have it weed out any non-letter characters and ignore them) so I can then rotate the register.
I know two ways of printing output to the screen:
mvi c, 2
mov e,'A'
call bdos ;bdos defined at the start of the program as 05 hex
and
mvi c,9
mov d,mess1 ;mess1 is a string like 'Hi, please enter a letter.$' defined after the program code
call bdos
The latter prints a string whereas the former prints only one character. So I'm thinking
mvi c,1
call bdos
isn't the only code for reading user input. Please tell me if any of my thinking here is even close to correct, because this is driving me nuts and I'm not getting myself dinner until I finish this stupid thing.
I know two ways of printing output to the screen:
mvi c, 2
mov e,'A'
call bdos ;bdos defined at the start of the program as 05 hex
and
mvi c,9
mov d,mess1 ;mess1 is a string like 'Hi, please enter a letter.$' defined after the program code
call bdos
The latter prints a string whereas the former prints only one character. So I'm thinking
mvi c,1
call bdos
isn't the only code for reading user input. Please tell me if any of my thinking here is even close to correct, because this is driving me nuts and I'm not getting myself dinner until I finish this stupid thing.