EE 308 -- LAB 2
Further Use of SIM11 and the EVBU
This laboratory will give you more experience with the tools we will use this semester.
.area CODE (ABS) .org 0x0100 ldaa #12 ldab #195 aba std *0x10 swi
Do (a), (b) and (c) before coming to lab.
; 68HC11 demo program ; Bill Rison ; 1/2/96 ; This is a program to take a table of data, and create a new table ; which is the original table divided by 2 .title LAB 1 Demo Program EVBRAM = 0x0000 ;0x0000 is start of user ram on 68HC11EVBU DATARAM = EVBRAM PROG = EVBRAM+0x100 ;start program above BUFFALO COUNT = 10 ;number of entries in table .area CODE (ABS) .org PROG ;set program counter to 0x0100 ldab #COUNT ;ACC B holds number of entries left to process ldx #table1 ;Reg X points to entry to process repeat: ldaa 0,x ;Get table1 entry into ACC A asra ;Divide by 2 staa COUNT,x ;Save in table2 inx ;REG X points to next entry in table1 decb ;Decrement number left to process bne repeat ;If not done, process next table1 entry swi ;Done -- Exit .area DATA (ABS) .org DATARAM ;initialize table1 (COUNT bytes long) table1: .db 0x07,0xae,0x4a,0xf3,0x6c,0x30,0x7f,0x12,0x67,0xcf table2: .ds COUNT ;reserve COUNT bytes for table2.
ldab #100 loop1: ldx #33333 loop2: dex bne loop2 decb bne loop1