Professional Documents
Culture Documents
The two
numbers are stored in the memory at the symbolic addresses VALUE1 and VALUE2. The
result of the addition is found after the calculation in the register A.
You can also add other values ??(for this you have to change the two values ??for
VALUE1 and VALUE2 in the MC8ASM) and observe how the flags are set depending on the
result.
In addition to the material in the exercises, it is also relevant for the exam to
familiarize you with all the commands used in this code!
Beispielprogramm A
;BESPIELPROGRAMM
;DIGITALE SYSTEME UE 384.047
;2. Labor "MC8" - Fernlehre
;The addition
ADD B ;A := A+B
HALT
;Result (sum) is now in the A register
;(Without taking account of a possible transfer)
WERT1: DB 22h ;1. Summand
WERT2: DB 44h ;2. Summand
MC8ASM.select the menu item Own program in the configuration ROM and enter the
machine code of the program to be simulated in IntelHex format.
:030000003A0900BA
:0100030047B5
:030004003A0A00B5
:010007008078
:010008007681
:0100090022D4
:01000A0044B1
:00000001FF