Download presentation
Presentation is loading. Please wait.
Published byBartosz Lisowski Modified over 5 years ago
1
Introduction Lab1 A crash course in assembler programming
Learn how a processor works! Decode a coded text passage
2
Lab 1 Procedure calls. Byte and word array indexing, pointers.
Conditional branch instructions. Simple loops. Reading/ writing from/to data memory.
3
Branch instruction (part of)
Beq rs rt label Bne rs rt label Together with Slt-instruction and $0 enough for first lab.
4
Register conventions (fig A9)
Reg. name Nr Usage zero Constant 0 at 1 Reserved for assembler v0 - v Expr. evaluation, function results a0 - a Argument 1-4 t0 - t Temporary (not saved) s0 - s Saved Temporary t8 - t Temporary (not saved) k0 - k Reserved for OS kernel gp 28 Pointer to global area sp 29 Stack pointer fp 30 Frame pointer ra 31 Return address
5
Lab 1 register usage Use only $sx $tx $r0 (=$0)
6
Lab 1 - How to represent characters?
Use the ASCII-code Complete table at WWW
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.