Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   URGENT 8085 initialize positions in memory (http://www.go4expert.com/forums/urgent-8085-initialize-positions-memory-t15414/)

airmang 5Dec2008 20:36

URGENT 8085 initialize positions in memory
 
Hello!

I have an assignment for 8085 - convert a given string to uppercase.
The string is 'digital.'
The '.' means that this is the end of the string.
I'm not allowed to use pseudo-operands.

This is my code:
Code:

init:
lxi h,9001
mvi d,64    ;letter d
mov m,d
inx h

mvi d,69    ;letter i
mov m,d
inx h

mvi d,67    ;letter g
mov m,d
inx h

mvi d,69    ;letter i
mov m,d
inx h

mvi d,74    ;letter t
mov m,d
inx h

mvi d,61    ;letter a
mov m,d
inx h

mvi d,6c    ;letter l
mov m,d
inx h

mvi d,2e    ;.
mov m,d
inx h



main:
lxi h,9001
lxi d,9101
mov a,m
mvi b,2e

loop:
cmp b
jz end
sui 20    ;subtract 32
stax d
inx h
mov a,m
inx d
jnz loop

end:
hlt

My problem is the first part - 'init'
It doesn't look good at all!!! What else can I do?
How can I initialize the positions of the memory with ANY given string?
can I read from a file?
can I ask the user to give one by one the characters until the '.' is given??

how exactly? I haven't got any example I'm affraid.....:confused:

Help me please!
Thank you.


All times are GMT +5.5. The time now is 14:54.