Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
25
Task/Machine-code/S-BASIC/machine-code.basic
Normal file
25
Task/Machine-code/S-BASIC/machine-code.basic
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
$constant CODESIZE = 4 rem - size of our ml routine
|
||||
$constant ML_LOC = 011AH rem - beginning of common data area
|
||||
|
||||
dim common byte ml_code(CODESIZE)
|
||||
var hl, de, bc, a_psw = integer
|
||||
|
||||
comment
|
||||
The 8080 machine language routine adds two unsigned
|
||||
8-bit numbers passed as the low-order bytes in the
|
||||
BC and DE registers, and leaves the result in HL.
|
||||
end
|
||||
|
||||
ml_code(1) = 79H rem MOV A,C
|
||||
ml_code(2) = 83H rem ADD E
|
||||
ml_code(3) = 6FH rem MOV L,A
|
||||
ml_code(4) = 0C9H rem RET
|
||||
|
||||
bc = 7 rem first number
|
||||
de = 12 rem second number
|
||||
|
||||
rem - call the routine and display the result (returned in HL)
|
||||
call (ML_LOC, hl, de, bc, a_psw)
|
||||
print bc; " plus"; de; " equals"; hl
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue