hw7final - ADDR B1 B2 B3 B4 C:\Users\zxcv888\Documents\ECE...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
ADDR B1 B2 B3 B4 C:\Users\zxcv888\Documents\ECE 265\hw7final.asm PAGE 1 org $0000 locx rmb 2 str rmb 2 0004 79 6F 75 20 stl fcc "you have entered :$" . 0008 68 61 76 65 . 000C 20 36 6E 74 . 0010 65 72 65 64 . 0014 20 3A 24 0017 00 fcb 0 0018 51 51 51 51 Coins fcc "QQQQQQQQQQNDNDDDNNPPN" . 001C 51 51 51 51 . 0020 51 51 4E 44 . 0024 4E 44 44 44 . 0028 4E 4E 50 38 . 002C 4E 002D 00 fcb 0 org $c000 C000 4F start clra C001 5F clrb C002 DD 00 std locx C004 CE 00 18 ldx #Coins C007 6D 00 count tst 0,x C009 27 44 beq jump C00B C6 50 ldab #'P C00D E1 00 cmpb 0,x C00F 27 12 beq addP C011 C6 4E ldab #'N C013 E1 00 cmpb 0,x C015 27 17 beq addN C017 C6 44 ldab #'D C019 E1 00 cmpb 0,x C01B 27 1C beq addD C01D C6 51 ldab #'Q C01F E1 00 cmpb 0,x C021 27 21 beq addQ C023 DC 00 addP ldd locx C025 C3 00 01 addd #1 C028 DD 00 std locx C02A 08 inx C02B BD C0 07 jsr count C02E DC 00 addN ldd locx C030 C3 00 05 addd #5 C033 DD 00 std locx C035 08 inx
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
C036 BD C0 07 jsr count C039 DC 00 addD ldd locx C03B C3 00 0A
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

hw7final - ADDR B1 B2 B3 B4 C:\Users\zxcv888\Documents\ECE...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online