Computer Science Notes

Notes From CS Undergrad Courses FSU

This project is maintained by awa03

Branch target/ branch displacement/ branch offset: the number of instructions between the branch instruction and the target instruction

l2:     instruction                     # Opcode :4
		instruction                     # rs: t0(8), rt: t1 (9)
		instruction                     # branch target:-4 (16 b)
		BEQ $t1, $t0, L2

Mips J Format

This is done by...

Enter NOTES from 5/31 here

Multiply and Divide Instructions

2 Address Forms. These instructions implicitly use the internal registers hi and lo. We would then need to move the values from these internal registers into the programmer-usable registers.

% is the same then as normal division within MIPS programming

Character and String Operations

Sys call 4 - Prints the string with the starting address 0 Sys call 11 - Prints character stored in a0 Sys call 8 - reads a string from console. a0 should contain the starting address of the unformatted free space, and a1 should contain the maximum number of characters to read Sys call 12 - reads a character from the console and returns it in v0

Functions

jal l1 - Jump and link so the computer knows where to return to following the jump