A | DS 2 | ; allocate 2 bytes for A |
MOV A, 10 | ; put 10 in var A | |
AGAIN: | CALL PRINT | ; call subroutine PRINT |
DEC A | ; decrement the contents of A by 1 | |
JNZ AGAIN | ; continue at AGAIN if previous | |
; operation produces zero |
(i) Indicate which type is each of the above statements of.
(ii) How many machine instructions will be produced due to the above program ?
(iii) What will be the contents of the main data structures during the assembly process ? (Indicate the entries, the exact values are not important)
(iv) Which instructions are address sensitive in the above program segment ? Why ?
LIR 4, TERMHow will you represent this in intermediate code between two passes of an assembler. Justify the representation assuming any suitable format for the intermediate code.
short a, count, *p;