Professional Documents
Culture Documents
; ADDITION-2
;****************************************************************************
.global _c_int00
.data
aguend .word 0002h ; .word directive is used to initialize a label .The label
;has value 400h. (memory location 400h)
.mmregs
.text
_c_int00:
STM #aguend,AR1
STM #addend,AR2
STM #sum,AR3
LD *AR1,A
ADD *AR2,A
STL A,*AR3
hlt: B hlt
.end
;****************************************************************************
; ARRAY ADDITION
;****************************************************************************
.global _c_int00
.data
array .word 0003h, 0002h, 0002h, 0001h ; .word directive is used to initialize
; several words, A label would point to the
; first word. Here label (array) start from
; the value 400h.
.text
_c_int00:
STM #array, AR1
STM #sum, AR2
STM #N-1, AR3
LD *AR1+, A
STL A, *AR2
hlt: B hlt
.end