I have this small little program written in assembly that squares a number.
Org 2010h
Db 0ah
Org 2013h
Db 00h
Org 1000h
mvi a, 00h
lxi hl, 2010h
mov b, m
mov c, m
CYCLE:
add b
dcr c
jnz CYCLE
lxi hl, 2013h
mov m, a
hlt
I have a few questions regarding this program.
The first task is to determine the number of program memory cells necessary to store the program part in memory if each memory cell stores exactly a byte of information. The second task is to determine how many clock cycles are necessary to run the program.
What would be the logic here? How would I go about calculating these things? I don't understand this at all, any help would be appreciated. Cheers.