Assembler and DV3
Thanks to...
Assembler and DV3

Chapter 4

DV3 character set matrix :
Taking a closer look on characters printed on the LCD-screen it seems, that their width is 5 pixels and their max. height 7 pixels.
By trying the experiments described in chapter 3 we can proof, that it is impossible to print two characters directly side by side. Even if one character starts to overwrite another one we can see, that there will be always a gap of at last one pixel. Indeed, the character set matrix is 7 x 9 using the outer pixel- rows as a blank frame !

Line and Column positioning of characters :
Changing the line-value of one of the output strings to 0 (e.g. adress 8201A0h D8 F2 46 00 -> D8 F2 00 00) will cause in printing the string at the very first line of the screen (including one blank pixel row of the character set matrix !).
Changing the column-value to 0 (e.g. adress 8201A6h C9 23 -> C9 20) will cause in printing the string at the very left side of the screen (again with the gap of one pixel to the real edge of the screen !).
By raising the line-value the output string will wander from the top of the screen down to the lower edge.
By using a max. value of 98h (152 dec.) the output string will be printed exactly at the very lower edge of the screen without the gap of the lower blank pixel frame of the character. This is, because this lower pixel row is already printed outside the screen. You can even raise the line-value some pixels more and you will observe, that only e.g. the upper half of the characters will remain visible on the screen !
Considering, that the line-value is positioning the first upper pixel row of a character we are dicovering, that the vertical height (Y-value) of our LCD- screen results in 160 pixels (152 + 1 of line zero + 7 visible pixels of the character) !

The problem of Column positioning :
Now we will try to investigate in the same way the horizontal width (X-value) of the DV3 LCD-screen.
To get usable results we will shorten the fourth output string down to one character by changing the value of adress 8200CAh from 6Ch to 00h.
Because 00h marks the end of an output string only the letter F will now be printed on the screen.
Now we are raising the column-value of the MOV-command at adress 8201A6h. The structure of this command is as follows :

    C9 23  ->  MOV R2, 03h -> C9 = MOV; 2 = R2; 3 = 03h

But here we are facing a problem :   This command (a 2-byte-command) only gives place for a digit of one figure. That means, that we can only modify the column-value from 0 to Fh (0 to 15 dec.) ! We can only select the first 16 pixel positions in that way.
We can easily solve this dilemma by another MOV-command, which was previously used for the line-value :

D8 F2 46 00 -> MOV R2, 0046h -> D8 = MOV; F2 = R2; 4600 = 0046h

This command (a 4-byte-command) offers place for a digit of four figures !
But therefore we also need two storage locations more than with the 2-byte- command.
We are leaving now the frame of only modifying the given machine-codes and are writing our first line of assembler !
Overwrite with the Hexeditor the old MOV-command (C9 23) with the new one (D8 F2 46 00). Afterwards chain the following commands E2 82 E0 1E and 18 F8. At last close your first selfwritten program with the code F1 FF which is the HALT-command.
Save the file and disassemble it again. Because we needed four storage locations (bytes) more for our modifications (two bytes for the MOV-command and two bytes for the HALT-command) the old SCALL-command at adress 8201AEh has vanished.
We dont use NPLv111.bin anymore for its original purpose but as a container for our own machine code program which prints text to certain positions and then stops !

Note: Its anyway a good idea to use the HALT-command if you want to repeat several experiments without repeating the erasing- and updating- process of the DV3. You can spare much of battery-power and much of time in that way !

Now, by raising the column-value in our new MOV-command, our output string, the F, will wander from the left to the right edge of the screen.
Using a max. value of 99h (153 dec.) the F will be printed at the very right edge of the screen, including the gap of one pixel.
Indeed you can raise the value to 9Ah (154 dec.) so that even the one pixel gap will vanish. But to print beyond the defined area will cause an error - the output string will be printed at a lower position than it was defined by the line-value !

By the same calculation we used to sum up the vertical pixel size (Y-value) of the DV3 LCD-screen, we can now figure out, that the horizontal pixel size (X-value) is also 160 !

    Results :
    1. The size of the DV3 LCD-screen is 160 x 160 pixels.
    2. We are using NPLv111.bin not for its original purpose anymore but as a container to transport selfwritten programs into the DV3 !

[DV3-Info] [Start-Deutsch] [Ergebnisse] [Start-Englisch] [Results]