CS240 Lecture Notes - Standard Streams, Machine Code

42 views2 pages

Document Summary

. word 0x04 add , , b: jr lis . word 0xbad beq , sh, a add , , a: jr endprogram: . word endprogram. A relocation entry in a merl le has the form: . word 0x01 (the relocation format code, a 32-bit word containing the location in the merl le of the value we want to relocate. The printmerl tool (available on the linux servers after running source /u/cs241/setup) reads a merl. Le from standard input and prints out its contents in a nice human-readable format. Below is printmerl"s output for two example les, m1. merl and m2. merl . (note that all the integers displayed by printmerl are in hexadecimal, even though there is no 0x preceding them. ) printmerl < m1. merl cookie length clen. 10 def printmerl < m2. merl cookie length clen. Suppose that m1. merl and m2. merl were linked to produce a new le, linked. merl .

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers