DV3-Info
Start-Englisch
Results
Assembler and DV3
Downloads!
Mailing-List!
Thanks to...
Links!
Assembler and DV3

Chapter 2

At the moment, we do not know the adress of the routine which is called by tapping on the app.-symbol in the menu of the DV3.
Therefore the only way to try our own machine-code programs is to modify the NPLv111.bin-file.
To change the text-messages like we did in Chapter 1 only explains, that we can change the file in general.
We can also change parts of the machine-code without changing the basic function of the file.
And we can use the file as a container for our own machine-code programs !

Preparations :
Copy the disassembler SM6KDASM.exe and the file NPLv111.bin into a common directory. Start in MS-DOS-mode the disassembler by typing:
SM6KDASM -b 820000 NPLv111.bin >NPLv111.asm (+ Enter/Return-key).
You have now produced a new file: NPLv111.asm which can be viewed and formatted (use Courier 15cpi) by e.g. WordPad.
Produce a printout of page 1 to 3 and take a closer look:
As you see, our listing starts at adress 820000h. This is the real memory space inside the DV3 where the program is situated. 82h therefore specifies a segment of the memory and inside this segment the program starts at adress 0000h.
As we saw in Chapter 1 the segment adress 82h isn´t taken into account by he Hexeditor. This doesn´t matter. You have only to consider, that the content of adress e.g. 007Eh shown by the Hexeditor is the same like the content at adress 82007Eh shown by the disassembler !

As you remember, the Hexeditor showed besides the clear text-passages only chaotic letters and signs. This is, because all codes are interpreted by the Hex- editor as ASCII-Codes, representing a character-set.
The disassembler instead tries to interpret the same code as SM6010 Machine- Code and therefore produces a clear listing due to Chapter 8 “Instruction set” of the SM6010 Instruction Manual.
On the other side, the disassembler will produce errors where it faces code which is mentioned to be text-code and not machine-code.
Therefore you should mark on your printout the adresses 82007Eh to 8200E2h and 8201B4h to 8201CEh as a non machine-code area.

    Results :
    1. We have learnt how to use the disassembler and that it can interpret machine-code clearly but not text-code.
    2. We have produced a printout assembler-listing which we need for further examination of the program NPLv111.bin in the next chapter !

Note: As you see, the adress-numbers are marked with “h”. That means,  that these numbers are expressed hexadecimal and not decimal. Also all   other numbers of the assembler-listing are hexadecimal ones.
Inside the course all explanations are given to enable you to understand   and to try the given examples by yourself. But I recommend to take a look  into your arithmetic-books for learning the basics about the hexadecimal-  system. Also an ASCII-Code table where the first 256 numbers are enlisted  as decimal and hexadecimal has proofed to be very helpful !
 

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