; Recitation 10 ; Author: ; Date: ; Email: ; Class: CS270 ; Description: copies least significant byte to most significant ;-------------------------------------------------------------------------- ; Begin reserved section: do not change ANYTHING in reserved section! .ORIG x3000 JSR copy ; call function HALT ; Parameter and return value ; Try changing Param's .BLKW 1 to .FILL xNNNN where N is a hexadecimal value or #NNNN ; where N is a decimal value, this can save you time by not having to set these ; values in the simulator every time you run your code. This is the only change ; you should make to this section. Param .BLKW 1 ; space to specify parameter Result .BLKW 1 ; space to store result ; Constants, the use of One and Eight is optional One .FILL #1 ; the number 1 Eight .FILL #8 ; the number 8 Mask .FILL x00ff ; mask top bits ; End reserved section: do not change ANYTHING in reserved section! ;-------------------------------------------------------------------------- copy ; Copy bits 7:0 to 15:8 ; ~20 lines of assembly code LD R0,Param ; load pattern ; your code here ST R1,Result ; store result RET ;-------------------------------------------------------------------------- .END