Question
I am getting an error: HW#5.s: error: A1021U: No input file. Whats wrong with my code? ;HW #5 ;IEEE to TNS AREA HW5Conversion, CODE, READONLY
I am getting an error: HW#5.s: error: A1021U: No input file. Whats wrong with my code?
;HW #5 ;IEEE to TNS
AREA HW5Conversion, CODE, READONLY EXPORT Start TNSNumber DCD 0x7F200107 ;Enter TNS IEEENumber DCD 0x433F9000 ;Enter IEEE ;ENTRY Start LDR r3,TNSNumber ;Load TNSNumber into r3 LDR r4,IEEENumber ;Load IEEENumber into r4 BL TNStoIEEE ;Branch with link to TNStoIEEE CMP r4,r8 ;Compares source IEEE with converted TNS MOVEQ r10,#&FFFFFFFF ;Test equivalence for debugging BL IEEEtoTNS ;Branch with link to IEEEtoTNS CMP r3,r9 ;Compares source TNS with converted IEEE MOVEQ r11,#&FFFFFFFF ;Test equivalence for debugging B exit ;Branch to exit TNStoIEEE LDR r10,maskSignTNS ;Load mask AND r5,r3,r10 ;Mask sign digit LDR r10,maskExponentTNS ;Load mask AND r6,r3,r10 ;Mask Exponent SUB r6,#&100 ;Subtract 256 ADD r6,#&7F ;Add 127 CMP r6,#&FE ;Compare if Exponent is greater than 254 MOVGT r8,#&11111111 ;For debugging BGT exit ;Terminate if greater - cannot convert LSL r6,r6,#23 ;Logical shift left 23 bits LDR r10,maskSignificantTNS ;Load mask AND r7,r3,r10 ;Mask Significant LSR r7,r7,#9 ;Logical shift right 9 bits ORR r8,r5,r6 ;Combine bits to create IEEE format ORR r8,r7 ;Combine bits to create IEEE format BX lr ;Branch to program counter IEEEToTNS LDR r11,maskSignIEEE ;Load mask AND r5,r4,r11 ;Mask sign digit LDR r11,maskExponentIEEE ;Load mask AND r6,r4,r11 ;Mask Exponent LSR r6,r6,#23 ;Logical shift right 23 bits ADD r6,#&100 ;Add 256 SUB r6,#&7F ;Subtract 127 LDR r11,maskSignificantTNS ;Load mask AND r7,r4,r11 ;Mask Significant LSL r7,r7,#9 ;Logical shift left 9 bits ORR r9,r5,r6 ;Combine bits to create TNS format ORR r9,r7 ;Combine bits to create TNS format BX lr ;Branch to program counter exit B . ;Branch to self ALIGN maskSignTNS DCD 0x80000000 maskExponentTNS DCD 0x000001FF maskSignificantTNS DCD 0x7FFFFE00 maskSignIEEE DCD 0x80000000 maskExponentIEEE DCD 0x7F800000 maskSignificantIEEE DCD 0x007FFFFF END
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started