Project “Moving Message” - Part 1
In chapter 4 we wrote our first line of assembler !
That´s of course not the end of the story !
Now we are going to write our first assembler-program !
We do know now, how to control the output
of text by modifying the values of lines and columns. Indeed we can move characters on the screen in that way. Until now the way to do this is of course very complicated :
We have to edit e.g. the column-value of
an output string, download the whole program to the DV3 and will be quiet happy to see the text or single character at the position where we wanted it to be (hopefully). If we want to move the string further, we
have to edit the column value again, download the program to the DV3 etc. etc.
Another possibility would be, to write several
“text to screen”-blocks one after another, with slightly raising column values. In that way we could really observe moving characters on the LCD-screen of the DV3 !
But this would be a boring way of programming
and even worse the size of the program would grow very very fast !
But, where will we store our program and what is the max. size we can use ?
The file NPLv111.bin offers all in all 16 Kb but entering code we have to take care of not destroying (overwriting)
routines of the original program which shall still be used by our new one (like the subroutine which sends an output string to the LCD-screen) !
So without fear we can only use the storage areas of these parts of
the original program NPLv111.bin, of which we know exactly, that we will not need them anymore. These are :
1.) Adresses 82007Eh to 8200E2h and 8201B4h to 8201CEh
-> 1. and 2. text-passages (ref. chapter 2)
2.) Adresses 82013Ah to 8201B2h
-> output 1. text-passage
If we are limiting ourselves to that storage area (and we want to do that for now for the purpose of exercising) it´s clear to see, that we can´t produce a moving message in the way mentioned above.
But programmed in the right way this storage area offers place enough for a complete moving message program as you will see now on the screen of your DV3 !
In the Download - Area of this page you will find the moving message program “DV3-Info.bin”. Just download it instead of “NPLv111.bin” to your DV3 and it will start automatically !
The moving message and other data are stored at the adresses 82007Eh to 8200A7h (-> use the Hexeditor).
The program itself starts at 82013Ah with the command NOP (FF FF) and ends at 82019Eh with the
command HALT (F1 FF), introduced in chapter 4. But also the NOP-command is explained very fast :
NOP stands for “no operation” and that´s exactly what this command does !
It forces the processor to do nothing
during the (minimal) time of executing this command. It can be used to take a place in a program on behalf of other com- mands, which might be inserted later or, stringed one after another, to connect different
parts of a program or easily to delay the execution of the program.
Produce a printout assembler-listing (using the disassembler) of the program for further discussion in the next chapter !