0% found this document useful (0 votes)
34 views5 pages

Programming

1. The document contains assembly code for a 6809 microprocessor that loads a value into a register, stores it to memory at a given address, decrements the value in the register, and repeats in a loop until the value reaches zero. 2. A second code sample loads two values into registers, stores them to consecutive memory addresses, increments one address and decrements the other in a nested loop structure. 3. A third code sample initializes registers with values, performs logic operations between the registers and memory, and returns.

Uploaded by

Illa Krebit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views5 pages

Programming

1. The document contains assembly code for a 6809 microprocessor that loads a value into a register, stores it to memory at a given address, decrements the value in the register, and repeats in a loop until the value reaches zero. 2. A second code sample loads two values into registers, stores them to consecutive memory addresses, increments one address and decrements the other in a nested loop structure. 3. A third code sample initializes registers with values, performs logic operations between the registers and memory, and returns.

Uploaded by

Illa Krebit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Assm Stat: File C:\ECAL\PROGRAMS\LAB4 Using 6809

Code 0000ED85-0000ED93 Var 00000000-00000000 Syms 1

Ref: 21 October 2009 Time 11:59

--------------------------------------------------------------------------------------------------------------

: ORG $ED85
2 ED85 C620: LDB #$20
3 ED87 8EEE20 : LDX #$EE20
4 ED8A E700 :LOOP STB 0,X
5 ED8C 301F : DEX
6 ED8E 5A : DECB
7 ED8F 26F9: BNE LOOP
8 ED91 E700 : STB 0,X
9 ED93 39 : RTS
--------------------------------------------------------------------------------------------------------------

Assm Stat: File C:\ECAL\PROGRAMS\LAB4 Using 6809


Code 0000ED85-0000EDA3 Var 00000000-00000000 Syms 2

Ref: 21 October 2009 Time 12:51

--------------------------------------------------------------------------------------------------------------

: ORG $ED85
2 ED85 8600 : LDA #$00
3 ED87 C620: LDB #$20
4 ED89 8EEE20 : LDX #$EE20
5 ED8C A700 :LOOP STA 0,X
6 ED8E 301F: DEX
7 ED90 5A : DECB
8 ED91 26F9 : BNE LOOP
9 ED93 E700 : STB 0,X

11 ED95 8600: LDA #$00


12 ED97 C600 : LDB #$00
13 ED99 8EEE00 : LDX #$EE00
:LOOP1
15 ED9C 3001 : INX
16 ED9E 5C : INCB
17 ED9F A600 : LDA 0,X
18 EDA1 27F9 : BEQ LOOP1

20 EDA3 39 : RTS
--------------------------------------------------------------------------------------------------------------

Assm Stat: File C:\ECAL\PROGRAMS\LOOPLAB.ASM Using 6809


Code 0000ED90-0000ED9C Var 00000000-00000000 Syms 3

Ref: 14 October 2009 Time 12:50

--------------------------------------------------------------------------------------------------------------

: ORG $ED90
2 ED90 8E1300 :START: LDX #$1300
3 ED93 C6FF :OUTER: LDB #$FF
4 ED95 5A :INNER: DECB
5 ED96 26FD : BNE INNER
6 ED98 301F : DEX
7 ED9A 26F7 : BNE OUTER
8 ED9C 39 : RTS
Assm Stat: File C:\ECAL\PROGRAMS\TEST1.ASM Using 6809
Code 0000ED80-0000ED91 Var 00000000-00000000 Syms 0

Ref: 30 September 2009 Time 11:58

--------------------------------------------------------------------------------------------------------------

: ORG $ED80
2 ED80 86AB : LDA #$AB
3 ED82 C6DE : LDB #$DE
4 ED84 F7EE00 : STB $EE00
5 ED87 B8EE00 : EORA $EE00
6 ED8A BAEE00 : ORA $EE00
7 ED8D 40 : NEGA
8 ED8E B4EE00 : ANDA $EE00
9 ED91 39 : RTS
Assm Stat: File C:\ECAL\PROGRAMS\TEST1.ASM Using 6809
Code 0000ED80-0000ED91 Var 00000000-00000000 Syms 0

Ref: 30 September 2009 Time 11:58

--------------------------------------------------------------------------------------------------------------

: ORG $ED80
2 ED80 86AB : LDA #$AB
3 ED82 C6DE : LDB #$DE
4 ED84 F7EE00 : STB $EE00
5 ED87 B8EE00 : EORA $EE00
6 ED8A BAEE00 : ORA $EE00
7 ED8D 40 : NEGA
8 ED8E B4EE00 : ANDA $EE00
9 ED91 39 : RTS

You might also like