Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Why can we not use a WYSIWIG editor like WORD to edit the assembly language file lab1.asm the file below is lab1.asm? What is the

  1. Why can we not use a WYSIWIG editor like WORD to edit the assembly language file lab1.asm the file below is lab1.asm? What is the result of the change made in step 4? What is the line with hex numbers displayed on the Buffalo monitor when the program stops? Step 4 is open with notepad program in the subroutine OUTCRLF change the line LDAA#$00 to LDAA #$0A. save the file
  2. image text in transcribedimage text in transcribedimage text in transcribed
* HELLO.ASM * 600 JOU AWNE Simple program for testing the Axiom CMx11A8 boards. A text string is sent to the terminal using COM1. *************** * EQUATES * 10 *************** 11 REGBS EQU $1000 start of registers 16 13 BAUD EQU REGBS+$2B Sci baud reg 14 SCCR1 EQU REGBS+$2C Sci controll reg SCCR2 EQU REGBS+$2D sci control2 reg SCSR EQU REGBS+$2E sci status reg 17 SCDAT EQU REGBS+$2F sci data reg 18 COPRST EQU REGBS+$3A cop reset reg 19 20 IBUFSIZ EQU 35 input buffer size 21 EOT E QU 904 end of text/table 24 25 26 *************** * RAM * *************** ORG $2000 28 INBUFF RMB 29 ENDBUFF EQU 30 COUNT RMB IBUFSIZ input buffer, defined but not used * 1 # characters read, also unused 32 * * * * * * * * * * * * * * * * * * * * * * * 33 * Program starts here * 35 *********************** 36 ORG $2400 ORG SE000 38 START LDS #$23FF set stack pointer, DO NOT set when running under monitor WNHO JSR ONSCI initialize serial port LDX #MSG get message string JSR OUTSTRG send it out serial port JSR OUTSTRG send it out serial port *eloop nop bra endless loop eloop w RTS ********* * ONSCI() - Initialize the SCI for 9600 baud at 8 MHZ Extal. ********** ONSCI LDAA #$30 STAA BAUD baud register LDAA #$00 STAA SCCR1 LDAA #$0C STAA SCCR2 enable RTS 64 ********** * OUTSTRG (x) - Output string of ASCII bytes * starting at x until end of text ($04). 66 ********** 67 OUTSTRG JSR OUTCRLF 68 OUTSTRGO PSHA 69 OUTSTRG1 LDAA 0,X read char into a 70 # 71 BEQOUTSTRG3 jump if eot JSR OUTPUT output character INX incriment pointer BRA OUTSTRG1 loop 75 OUTSTRG3 PULA RTS 77 78. ********** 79 * OUTCRLF) - Output a Carriage return and 80 * a line feed. Returns a = cr. 81 ********** 82 OUTCRLF LDAA #SOD cr 83 JSR OUTPUT output a LDAA #SOA JSR OUTPUT output padding LDAA #SOD 76 - 86 RTS 91 93 95 ********** 90 * OUTPUT() - Output A to sci. ********** 92 OUTPUT OUTSCI2 LDAB SCSR read status 94 BITB #$80 BEQ OUTSCI2 loop until tdre=1 96 ANDA #$7F mask parity STAA SCDAT send character 98 OUTSCI3 RTS 99 100 101 *** TEXT TABLES *** 102 103 MSG FCC 'Hello World' 104 FCB EOT 105 106 107 ORG SFFFE set the reset vector 108 FDB START 109 110 END * HELLO.ASM * 600 JOU AWNE Simple program for testing the Axiom CMx11A8 boards. A text string is sent to the terminal using COM1. *************** * EQUATES * 10 *************** 11 REGBS EQU $1000 start of registers 16 13 BAUD EQU REGBS+$2B Sci baud reg 14 SCCR1 EQU REGBS+$2C Sci controll reg SCCR2 EQU REGBS+$2D sci control2 reg SCSR EQU REGBS+$2E sci status reg 17 SCDAT EQU REGBS+$2F sci data reg 18 COPRST EQU REGBS+$3A cop reset reg 19 20 IBUFSIZ EQU 35 input buffer size 21 EOT E QU 904 end of text/table 24 25 26 *************** * RAM * *************** ORG $2000 28 INBUFF RMB 29 ENDBUFF EQU 30 COUNT RMB IBUFSIZ input buffer, defined but not used * 1 # characters read, also unused 32 * * * * * * * * * * * * * * * * * * * * * * * 33 * Program starts here * 35 *********************** 36 ORG $2400 ORG SE000 38 START LDS #$23FF set stack pointer, DO NOT set when running under monitor WNHO JSR ONSCI initialize serial port LDX #MSG get message string JSR OUTSTRG send it out serial port JSR OUTSTRG send it out serial port *eloop nop bra endless loop eloop w RTS ********* * ONSCI() - Initialize the SCI for 9600 baud at 8 MHZ Extal. ********** ONSCI LDAA #$30 STAA BAUD baud register LDAA #$00 STAA SCCR1 LDAA #$0C STAA SCCR2 enable RTS 64 ********** * OUTSTRG (x) - Output string of ASCII bytes * starting at x until end of text ($04). 66 ********** 67 OUTSTRG JSR OUTCRLF 68 OUTSTRGO PSHA 69 OUTSTRG1 LDAA 0,X read char into a 70 # 71 BEQOUTSTRG3 jump if eot JSR OUTPUT output character INX incriment pointer BRA OUTSTRG1 loop 75 OUTSTRG3 PULA RTS 77 78. ********** 79 * OUTCRLF) - Output a Carriage return and 80 * a line feed. Returns a = cr. 81 ********** 82 OUTCRLF LDAA #SOD cr 83 JSR OUTPUT output a LDAA #SOA JSR OUTPUT output padding LDAA #SOD 76 - 86 RTS 91 93 95 ********** 90 * OUTPUT() - Output A to sci. ********** 92 OUTPUT OUTSCI2 LDAB SCSR read status 94 BITB #$80 BEQ OUTSCI2 loop until tdre=1 96 ANDA #$7F mask parity STAA SCDAT send character 98 OUTSCI3 RTS 99 100 101 *** TEXT TABLES *** 102 103 MSG FCC 'Hello World' 104 FCB EOT 105 106 107 ORG SFFFE set the reset vector 108 FDB START 109 110 END

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

Students also viewed these Databases questions