'MPASM memory allocation..'
Janusz J. Mlodzianowski
I remember a while ago somone asked similar question, but I could not find
where I have the answer..
I need to allocate some 16C84 data memory. My old copy of MPASM (I do not
remember the version #) has DB and DW directives. I understand that those
could allocate programme memory. The Parallax assembler(I do not have it)
has a DS directive which I belive could do the job.
Being z80/i86 oriented I would like to maintain even using PICs similar
programming fashion. I would not like to use EQUs like I have seen in many
The second problem I have is how to efficiently initiate the allocated memory?
I would like to write a code equivalent to:
;somewhere in the data memory
location: DB 'storage','$'
BTW is there a public domain assembler that works in the above fashion,
uses object files and has a linker and librarian
Thanks for suggestions,
|>;somewhere in the data memory
>location: DB 'storage','$'
>BTW is there a public domain assembler that works in the above fashion,
>uses object files and has a linker and librarian
Parallax assembler uses DS to reserve space. For the above example, one
location: RETW 'storage','$'
You must remember that you cannot initialize RAM in this manner, only ROM
If you want to see the message, do the following in Parallax assembler
org (somewhere in RAM)
MsgPntr ds 1
org (somewhere such that all characters are below address 25
6 in current
Msg jmp PC+W
Then later in your code
:Loop movf temp1,W
xorlw '$' ; TEst for end
goto :Done ; Found, then exit
xorlw '$' ; Fix bits back again
continue with rest of program
FWIW, I use 0x00 as end-of-string. Not only is it understood by more
stuff, but then you can actually send "$" character easily.
Andy Kunz - Montana Design - 409 S 6th St - Phillipsburg, NJ 08865
Hardware & Software for Industry & R/C Hobbies
"Go fast, turn right, and keep the wet side down!"
More... (looser matching)
- Last day of these posts
- In 1997
, 1998 only
- New search...