Introduction Lab1 A crash course in assembler programming Learn how a processor works! Decode a coded text passage
Lab 1 Procedure calls. Byte and word array indexing, pointers. Conditional branch instructions. Simple loops. Reading/ writing from/to data memory.
Branch instruction (part of) Beq rs rt label Bne rs rt label Together with Slt-instruction and $0 enough for first lab.
Register conventions (fig A9) Reg. name Nr Usage zero 0 Constant 0 at 1 Reserved for assembler v0 - v1 2-3 Expr. evaluation, function results a0 - a3 4-7 Argument 1-4 t0 - t7 8-15 Temporary (not saved) s0 - s7 16-23 Saved Temporary t8 - t9 24-25 Temporary (not saved) k0 - k1 26-27 Reserved for OS kernel gp 28 Pointer to global area sp 29 Stack pointer fp 30 Frame pointer ra 31 Return address
Lab 1 register usage Use only $sx $tx $r0 (=$0)
Lab 1 - How to represent characters? Use the ASCII-code Complete table at WWW