EEL4767HWK4 - #$30 PSHA JSR CRLF JSR INCHAR JSR OUTA SUBA...

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

View Full Document Right Arrow Icon
Problem 4.1 ORG $3000 START LDS #$00FF JSR INCHAR JSR OUTA PSHA JSR CRLF PULA ADDA #$20 JSR OUTA JSR CRLF DONE LDAA #$00 OUTA PSHB WCHR1 LDAB $102e ANDB #$80 BEQ WCHR1 STAA $102f PULB RTS CRLF PSHA LDAA #$0D JSR OUTA LDAA #$0A JSR OUTA PULA RTS INCHAR PSHB RCHR1 LDAB $102e ANDB #$20 BEQ RCHR1 LDAA $102f PULB RTS Problem 4.2 ORG $2000 DATA1 RMB 1 DATA2 RMB 1 ORG $3000 START LDS #$00FF JSR HEXIN STAA DATA1 JSR CRLF JSR HEXIN STAA DATA2 JSR CRLF LDAA DATA1 ADDA DATA2 JSR HEXOUT JSR CRLF DONE LDAA #$00 HEXOUT PSHB PSHA ANDA #$F0 LSRA LSRA LSRA LSRA CMPA #$0A BLO SKIP3 ADDA #$07 SKIP3 ADDA #$30 JSR OUTA PULA ANDA #$0F CMPA #$0A BLO SKIP4 ADDA #$07 SKIP4 ADDA #$30 JSR OUTA PULB RTS HEXIN PSHB JSR INCHAR JSR OUTA SUBA #$30 CMPA #$0A BLO SKIP SUBA #$07 SKIP ASLA ASLA ASLA ASLA PSHA JSR INCHAR JSR OUTA SUBA #$30 CMPA #$0A BLO SKIP1 SUBA #$07 SKIP1 PULB ABA PULB RTS OUTA PSHB WCHR1 LDAB $102e ANDB #$80 BEQ WCHR1 STAA $102f PULB RTS
Background image of page 1

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

View Full DocumentRight Arrow Icon
Problem 4.3 ORG $3000 START LDS #$00FF JSR INCHAR JSR OUTA SUBA
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: #$30 PSHA JSR CRLF JSR INCHAR JSR OUTA SUBA #$30 TAB PULA SBA BPL POS COMA ADDA #$01 ADDA #$30 PSHA JSR CRLF LDAA #'-' JSR OUTA PULA JSR OUTA BRA DONE POS ADDA #$30 JSR CRLF JSR OUTA DONE JSR CRLF LDAA #$00 OUTA PSHB WCHR1 LDAB $102e ANDB #$80 BEQ WCHR1 STAA $102f PULB RTS CRLF PSHA LDAA #$0D JSR OUTA LDAA #$0A JSR OUTA PULA RTS INCHAR PSHB RCHR1 LDAB $102e ANDB #$20 BEQ RCHR1 LDAA $102f PULB RTS Problem 4.4 ORG $2000 DATA FCB $1F, $06, $32, $7F, $FE, $1B, $46, $0A, $E7, $D2 TEMP FCB $00 TEMP2 FCB $00 TEMP3 FCB $00 CNT FCB $00 ORG $3000 LDS #$00FF LDX #$09 LPX PSHX LDX #DATA STX TEMP LDY #$09 LPY LDX TEMP LDAA 0,X LDAB 1,X CBA BLO SWAP BRA L1 SWAP PSHA PSHB PULA PULB STAA 0,X STAB 1,X L1 INX STX TEMP DEY CPY #$0000 BNE LPY PULX DEX CPX #$0000 BNE LPX DONE LDAA #$00 END...
View Full Document

Page1 / 2

EEL4767HWK4 - #$30 PSHA JSR CRLF JSR INCHAR JSR OUTA SUBA...

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

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