diff --git a/Fall-2024/CS-3843/Assignments/10/Assignment.typ b/Fall-2024/CS-3843/Assignments/10/Assignment.typ new file mode 100644 index 0000000..fccd378 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/Assignment.typ @@ -0,0 +1,144 @@ +#show link: set text(blue) +#set text(font: "Calibri") +#show raw: set text(font: "Fira Code") +#set table.cell(breakable: false) +#set table(stroke: (x, y) => ( + left: if x > 0 { + .1pt + }, + top: if y == 1 { + 0.5pt + } else if y > 1 { + 0.1pt + }, +)) + +#set page(margin: (y: .25in, x: .5in)) +#let solve(solution) = { + block( + outset: 3pt, + inset: 3pt, + stroke: blue + .3pt, + fill: rgb(0, 149, 255, 15%), + radius: 4pt, + )[#solution] +} + +#let solvein(solution) = { + let outset = 3pt + h(outset) + box( + outset: outset, + stroke: blue + .3pt, + fill: rgb(0, 149, 255, 15%), + radius: 4pt, + )[#solution] +} + +#let note(content) = { + block( + outset: 3pt, + inset: 5pt, + stroke: luma(20%) + .3pt, + fill: luma(95%), + radius: 4pt, + )[#content] +} + +#let notein(content) = { + let outset = 3pt + h(outset) + box( + outset: outset, + stroke: luma(20%) + .3pt, + fill: luma(95%), + radius: 4pt, + )[#content] +} + +#align(center)[ + = CS 3843 Computer Organization + HW 10\ + #underline[Price Hiller] *|* #underline[zfp106] +] +#line(length: 100%, stroke: .25pt) + +1. Given the 32-bit hex `0x4C4B4016` + + What is the: + + 1. Least Significant Byte (LSB) + #solve[`0x16`] + 2. Most Significant Byte (MSB) + #solve[`0x4C`] +2. Given the 32-bit hex `0x4C4B4016`, show the little-endian memory layout showing each byte in memory. Provide visualization. + #solve( + table( + columns: 2, + table.header([Byte Index], [Byte]), + [0], [`0x16`], + [1], [`0x40`], + [2], [`0x4B`], + [3], [`0x4C`], + ), + ) + +3. If the `%rax` register is set to `0x0123456789ABCDEF`, what are the contents of the following registers in hex? + 1. al + #solve[`0xEF`] + 2. ax + #solve[`0xCDEF`] + 3. eax + #solve[`0x89ABCDEF`] + 4. rax + #solve[`0x0123456789ABCDEF`] + +// #align(center + horizon, text(size: 3em, note[See Next Page])) +// #pagebreak() + +4. For this value, `0xFEDCBA9876543210`, how this value will be stored in stack top location for x86-64 assembly language (hint: little-endian or big-endian). Explain and provide visualization + #solve[ + #table( + align: center, + columns: (50%, 50%), + [ + #underline[Little Endian]\ + #solve( + table( + columns: 2, + table.header([Example Address], [Byte]), + [7], [`0xFE`], + [6], [`0xDC`], + [5], [`0xBA`], + [4], [`0x98`], + [3], [`0x76`], + [2], [`0x54`], + [1], [`0x32`], + [0], [`0x10`], + ), + ) + + Little Endian stores the most significant byte at the at the highest memory address and the least significant byte at the lowest memory address. + ], + [ + #underline[Big Endian]\ + #solve( + table( + columns: 2, + table.header([Example Address], [Byte]), + [7], [`0x10`], + [6], [`0x32`], + [5], [`0x54`], + [4], [`0x76`], + [3], [`0x98`], + [2], [`0xBA`], + [1], [`0xDC`], + [0], [`0xFE`], + ), + ) + + Big Endian stores the most significant byte at the at the lowest memory address and the least significant byte at the highest memory address. + ], + table.cell(colspan: 2, notein[x86-64 assembly is not _necessarily_ Little Endian. Technically it's possible for it to be Big Endian.]) + ) + ] diff --git a/Fall-2024/CS-3843/Assignments/10/assets/10.png b/Fall-2024/CS-3843/Assignments/10/assets/10.png new file mode 100644 index 0000000..3e5a922 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/10.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/13.png b/Fall-2024/CS-3843/Assignments/10/assets/13.png new file mode 100644 index 0000000..ac52ec0 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/13.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/18.png b/Fall-2024/CS-3843/Assignments/10/assets/18.png new file mode 100644 index 0000000..702ee79 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/18.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/20.png b/Fall-2024/CS-3843/Assignments/10/assets/20.png new file mode 100644 index 0000000..3f2c4c4 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/20.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/21.png b/Fall-2024/CS-3843/Assignments/10/assets/21.png new file mode 100644 index 0000000..9979c0b Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/21.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/22.png b/Fall-2024/CS-3843/Assignments/10/assets/22.png new file mode 100644 index 0000000..e43f58c Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/22.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/23.png b/Fall-2024/CS-3843/Assignments/10/assets/23.png new file mode 100644 index 0000000..28c139c Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/23.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/25.png b/Fall-2024/CS-3843/Assignments/10/assets/25.png new file mode 100644 index 0000000..14fb2e6 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/25.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/26.png b/Fall-2024/CS-3843/Assignments/10/assets/26.png new file mode 100644 index 0000000..f9f3e09 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/26.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/28.png b/Fall-2024/CS-3843/Assignments/10/assets/28.png new file mode 100644 index 0000000..4bad143 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/28.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/5.png b/Fall-2024/CS-3843/Assignments/10/assets/5.png new file mode 100644 index 0000000..fb2eb29 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/5.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/9-1.png b/Fall-2024/CS-3843/Assignments/10/assets/9-1.png new file mode 100644 index 0000000..47bfa20 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/9-1.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/9-2.png b/Fall-2024/CS-3843/Assignments/10/assets/9-2.png new file mode 100644 index 0000000..613e706 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/9-2.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/assets/full-prog.png b/Fall-2024/CS-3843/Assignments/10/assets/full-prog.png new file mode 100644 index 0000000..c33a358 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/assets/full-prog.png differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/Cargo.lock b/Fall-2024/CS-3843/Assignments/10/registers/Cargo.lock new file mode 100644 index 0000000..e34b848 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "registers" +version = "0.1.0" diff --git a/Fall-2024/CS-3843/Assignments/10/registers/Cargo.toml b/Fall-2024/CS-3843/Assignments/10/registers/Cargo.toml new file mode 100644 index 0000000..e71af34 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "registers" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/Fall-2024/CS-3843/Assignments/10/registers/src/main.rs b/Fall-2024/CS-3843/Assignments/10/registers/src/main.rs new file mode 100644 index 0000000..c52ef53 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/src/main.rs @@ -0,0 +1,7 @@ +use std::arch::asm; + +fn main() { + let val: u64 = 0x0123456789ABCDEF; + let eax: u32 = val as u32; + println!("{val:#0x}"); +} diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/.rustc_info.json b/Fall-2024/CS-3843/Assignments/10/registers/target/.rustc_info.json new file mode 100644 index 0000000..2906e70 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/.rustc_info.json @@ -0,0 +1 @@ +{"rustc_fingerprint":2833596615532030163,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/nix/store/11ca83vjx4kpfnslzhgcaiihz57jmw2m-rust-nightly-complete-with-components-2024-11-15\noff\npacked\nunpacked\n___\ndebug_assertions\nfmt_debug=\"full\"\noverflow_checks\npanic=\"unwind\"\nproc_macro\nrelocation_model=\"pic\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nub_checks\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.84.0-nightly (90ab8eaed 2024-11-14)\nbinary: rustc\ncommit-hash: 90ab8eaedd3efd7919bffa7638db66e67df3f0b8\ncommit-date: 2024-11-14\nhost: x86_64-unknown-linux-gnu\nrelease: 1.84.0-nightly\nLLVM version: 19.1.3\n","stderr":""}},"successes":{}} \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/CACHEDIR.TAG b/Fall-2024/CS-3843/Assignments/10/registers/target/CACHEDIR.TAG new file mode 100644 index 0000000..20d7c31 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/CACHEDIR.TAG @@ -0,0 +1,3 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by cargo. +# For information about cache directory tags see https://bford.info/cachedir/ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.cargo-lock b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.cargo-lock new file mode 100644 index 0000000..e69de29 diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/bin-registers new file mode 100644 index 0000000..aee41f2 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/bin-registers @@ -0,0 +1 @@ +b5dc1679863cd888 \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/bin-registers.json b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/bin-registers.json new file mode 100644 index 0000000..f2e0b42 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/bin-registers.json @@ -0,0 +1 @@ +{"rustc":7940070502224439395,"features":"[]","declared_features":"[]","target":17630001637475328777,"profile":11597332650809196192,"path":10602529704205407992,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/registers-3ab1016305b4f322/dep-bin-registers","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/dep-bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/dep-bin-registers new file mode 100644 index 0000000..5c54f74 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/dep-bin-registers differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/invoked.timestamp b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/output-bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/output-bin-registers new file mode 100644 index 0000000..6c2343f --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-3ab1016305b4f322/output-bin-registers @@ -0,0 +1,3 @@ +{"$message_type":"diagnostic","message":"unused import: `std::arch::asm`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":4,"byte_end":18,"line_start":1,"line_end":1,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"use std::arch::asm;","highlight_start":5,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":20,"line_start":1,"line_end":2,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use std::arch::asm;","highlight_start":1,"highlight_end":20},{"text":"","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `std::arch::asm`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:1:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::arch::asm;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"} +{"$message_type":"diagnostic","message":"unused variable: `eax`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":80,"byte_end":83,"line_start":5,"line_end":5,"column_start":9,"column_end":12,"is_primary":true,"text":[{"text":" let eax: u32 = val as u32;","highlight_start":9,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":80,"byte_end":83,"line_start":5,"line_end":5,"column_start":9,"column_end":12,"is_primary":true,"text":[{"text":" let eax: u32 = val as u32;","highlight_start":9,"highlight_end":12}],"label":null,"suggested_replacement":"_eax","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `eax`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:5:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m5\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let eax: u32 = val as u32;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: if this is intentional, prefix it with an underscore: `_eax`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"} +{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"} diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/bin-registers new file mode 100644 index 0000000..917cb50 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/bin-registers @@ -0,0 +1 @@ +0fc2244e460ce138 \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/bin-registers.json b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/bin-registers.json new file mode 100644 index 0000000..dd407ed --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/bin-registers.json @@ -0,0 +1 @@ +{"rustc":7940070502224439395,"features":"[]","declared_features":"[]","target":17630001637475328777,"profile":5601947868832436996,"path":10602529704205407992,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/registers-5d9fa6fea18e1974/dep-bin-registers","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/dep-bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/dep-bin-registers new file mode 100644 index 0000000..c36b8c9 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/dep-bin-registers differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/invoked.timestamp b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/output-bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/output-bin-registers new file mode 100644 index 0000000..6c2343f --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-5d9fa6fea18e1974/output-bin-registers @@ -0,0 +1,3 @@ +{"$message_type":"diagnostic","message":"unused import: `std::arch::asm`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":4,"byte_end":18,"line_start":1,"line_end":1,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"use std::arch::asm;","highlight_start":5,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":20,"line_start":1,"line_end":2,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use std::arch::asm;","highlight_start":1,"highlight_end":20},{"text":"","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `std::arch::asm`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:1:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::arch::asm;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"} +{"$message_type":"diagnostic","message":"unused variable: `eax`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":80,"byte_end":83,"line_start":5,"line_end":5,"column_start":9,"column_end":12,"is_primary":true,"text":[{"text":" let eax: u32 = val as u32;","highlight_start":9,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":80,"byte_end":83,"line_start":5,"line_end":5,"column_start":9,"column_end":12,"is_primary":true,"text":[{"text":" let eax: u32 = val as u32;","highlight_start":9,"highlight_end":12}],"label":null,"suggested_replacement":"_eax","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `eax`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:5:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m5\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let eax: u32 = val as u32;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: if this is intentional, prefix it with an underscore: `_eax`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"} +{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"} diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-65e9c140dae6389c/bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-65e9c140dae6389c/bin-registers new file mode 100644 index 0000000..3f760aa --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-65e9c140dae6389c/bin-registers @@ -0,0 +1 @@ +8a6f8ecce26ae516 \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-65e9c140dae6389c/bin-registers.json b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-65e9c140dae6389c/bin-registers.json new file mode 100644 index 0000000..07b2cc5 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-65e9c140dae6389c/bin-registers.json @@ -0,0 +1 @@ +{"rustc":7940070502224439395,"features":"[]","declared_features":"[]","target":17630001637475328777,"profile":5601947868832436996,"path":10602529704205407992,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/registers-65e9c140dae6389c/dep-bin-registers","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-65e9c140dae6389c/invoked.timestamp b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-65e9c140dae6389c/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-65e9c140dae6389c/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/dep-test-bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/dep-test-bin-registers new file mode 100644 index 0000000..c36b8c9 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/dep-test-bin-registers differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/invoked.timestamp b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/output-test-bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/output-test-bin-registers new file mode 100644 index 0000000..6c2343f --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/output-test-bin-registers @@ -0,0 +1,3 @@ +{"$message_type":"diagnostic","message":"unused import: `std::arch::asm`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":4,"byte_end":18,"line_start":1,"line_end":1,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"use std::arch::asm;","highlight_start":5,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":20,"line_start":1,"line_end":2,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use std::arch::asm;","highlight_start":1,"highlight_end":20},{"text":"","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `std::arch::asm`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:1:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::arch::asm;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"} +{"$message_type":"diagnostic","message":"unused variable: `eax`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":80,"byte_end":83,"line_start":5,"line_end":5,"column_start":9,"column_end":12,"is_primary":true,"text":[{"text":" let eax: u32 = val as u32;","highlight_start":9,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":80,"byte_end":83,"line_start":5,"line_end":5,"column_start":9,"column_end":12,"is_primary":true,"text":[{"text":" let eax: u32 = val as u32;","highlight_start":9,"highlight_end":12}],"label":null,"suggested_replacement":"_eax","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `eax`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:5:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m5\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let eax: u32 = val as u32;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: if this is intentional, prefix it with an underscore: `_eax`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"} +{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"} diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/test-bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/test-bin-registers new file mode 100644 index 0000000..4081e20 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/test-bin-registers @@ -0,0 +1 @@ +1b27e06e0c197588 \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/test-bin-registers.json b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/test-bin-registers.json new file mode 100644 index 0000000..34d2fc9 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a2faa7a6383c0439/test-bin-registers.json @@ -0,0 +1 @@ +{"rustc":7940070502224439395,"features":"[]","declared_features":"[]","target":17630001637475328777,"profile":11983525691607113661,"path":10602529704205407992,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/registers-a2faa7a6383c0439/dep-test-bin-registers","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/dep-test-bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/dep-test-bin-registers new file mode 100644 index 0000000..5c54f74 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/dep-test-bin-registers differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/invoked.timestamp b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/test-bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/test-bin-registers new file mode 100644 index 0000000..cae5386 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/test-bin-registers @@ -0,0 +1 @@ +e0fb7959e414329d \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/test-bin-registers.json b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/test-bin-registers.json new file mode 100644 index 0000000..160fbec --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a5769e160b175648/test-bin-registers.json @@ -0,0 +1 @@ +{"rustc":7940070502224439395,"features":"[]","declared_features":"[]","target":17630001637475328777,"profile":15632368228915330634,"path":10602529704205407992,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/registers-a5769e160b175648/dep-test-bin-registers","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a8e5936099d64b0f/invoked.timestamp b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a8e5936099d64b0f/invoked.timestamp new file mode 100644 index 0000000..e00328d --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a8e5936099d64b0f/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a8e5936099d64b0f/test-bin-registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a8e5936099d64b0f/test-bin-registers new file mode 100644 index 0000000..ecd492b --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a8e5936099d64b0f/test-bin-registers @@ -0,0 +1 @@ +6e2e0c501af9653a \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a8e5936099d64b0f/test-bin-registers.json b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a8e5936099d64b0f/test-bin-registers.json new file mode 100644 index 0000000..ebaa664 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/.fingerprint/registers-a8e5936099d64b0f/test-bin-registers.json @@ -0,0 +1 @@ +{"rustc":7940070502224439395,"features":"[]","declared_features":"[]","target":17630001637475328777,"profile":11983525691607113661,"path":10602529704205407992,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/registers-a8e5936099d64b0f/dep-test-bin-registers","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0} \ No newline at end of file diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/libregisters-5d9fa6fea18e1974.rmeta b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/libregisters-5d9fa6fea18e1974.rmeta new file mode 100644 index 0000000..e69de29 diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/libregisters-a2faa7a6383c0439.rmeta b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/libregisters-a2faa7a6383c0439.rmeta new file mode 100644 index 0000000..e69de29 diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-3ab1016305b4f322 b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-3ab1016305b4f322 new file mode 100755 index 0000000..0e17faa Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-3ab1016305b4f322 differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-3ab1016305b4f322.d b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-3ab1016305b4f322.d new file mode 100644 index 0000000..fca358a --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-3ab1016305b4f322.d @@ -0,0 +1,5 @@ +/home/price/Git/College/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-3ab1016305b4f322: src/main.rs + +/home/price/Git/College/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-3ab1016305b4f322.d: src/main.rs + +src/main.rs: diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-5d9fa6fea18e1974.d b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-5d9fa6fea18e1974.d new file mode 100644 index 0000000..5589348 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-5d9fa6fea18e1974.d @@ -0,0 +1,9 @@ +/home/price/Git/College/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/libregisters-5d9fa6fea18e1974.rmeta: src/main.rs Cargo.toml + +/home/price/Git/College/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-5d9fa6fea18e1974.d: src/main.rs Cargo.toml + +src/main.rs: +Cargo.toml: + +# env-dep:CLIPPY_ARGS= +# env-dep:CLIPPY_CONF_DIR diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a2faa7a6383c0439.d b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a2faa7a6383c0439.d new file mode 100644 index 0000000..d0563d8 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a2faa7a6383c0439.d @@ -0,0 +1,9 @@ +/home/price/Git/College/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/libregisters-a2faa7a6383c0439.rmeta: src/main.rs Cargo.toml + +/home/price/Git/College/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a2faa7a6383c0439.d: src/main.rs Cargo.toml + +src/main.rs: +Cargo.toml: + +# env-dep:CLIPPY_ARGS= +# env-dep:CLIPPY_CONF_DIR diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a5769e160b175648 b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a5769e160b175648 new file mode 100755 index 0000000..e1eb0ca Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a5769e160b175648 differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a5769e160b175648.d b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a5769e160b175648.d new file mode 100644 index 0000000..c8cdeb8 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a5769e160b175648.d @@ -0,0 +1,5 @@ +/home/price/Git/College/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a5769e160b175648: src/main.rs + +/home/price/Git/College/Fall-2024/CS-3843/Assignments/10/registers/target/debug/deps/registers-a5769e160b175648.d: src/main.rs + +src/main.rs: diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1lxuv9ng2yft4/s-h26kbklr6w-082d0l6-dlsime0ntbql15yjtjrehuiys/dep-graph.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1lxuv9ng2yft4/s-h26kbklr6w-082d0l6-dlsime0ntbql15yjtjrehuiys/dep-graph.bin new file mode 100644 index 0000000..5483a36 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1lxuv9ng2yft4/s-h26kbklr6w-082d0l6-dlsime0ntbql15yjtjrehuiys/dep-graph.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1lxuv9ng2yft4/s-h26kbklr6w-082d0l6-dlsime0ntbql15yjtjrehuiys/query-cache.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1lxuv9ng2yft4/s-h26kbklr6w-082d0l6-dlsime0ntbql15yjtjrehuiys/query-cache.bin new file mode 100644 index 0000000..2814585 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1lxuv9ng2yft4/s-h26kbklr6w-082d0l6-dlsime0ntbql15yjtjrehuiys/query-cache.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1lxuv9ng2yft4/s-h26kbklr6w-082d0l6-dlsime0ntbql15yjtjrehuiys/work-products.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1lxuv9ng2yft4/s-h26kbklr6w-082d0l6-dlsime0ntbql15yjtjrehuiys/work-products.bin new file mode 100644 index 0000000..2ece87b Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1lxuv9ng2yft4/s-h26kbklr6w-082d0l6-dlsime0ntbql15yjtjrehuiys/work-products.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1lxuv9ng2yft4/s-h26kbklr6w-082d0l6.lock b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1lxuv9ng2yft4/s-h26kbklr6w-082d0l6.lock new file mode 100644 index 0000000..e69de29 diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/3hdu6c61fwrtcpm9is3m61wgz.o b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/3hdu6c61fwrtcpm9is3m61wgz.o new file mode 100644 index 0000000..c9bc269 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/3hdu6c61fwrtcpm9is3m61wgz.o differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/3xvsu6rkqwjv7ykwn7h4vyjja.o b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/3xvsu6rkqwjv7ykwn7h4vyjja.o new file mode 100644 index 0000000..1357110 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/3xvsu6rkqwjv7ykwn7h4vyjja.o differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/b3qc8k4wmdi7cq46y2mn9t4ke.o b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/b3qc8k4wmdi7cq46y2mn9t4ke.o new file mode 100644 index 0000000..edd497e Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/b3qc8k4wmdi7cq46y2mn9t4ke.o differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/b9lrfca0qx1gu5gzgova42tzq.o b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/b9lrfca0qx1gu5gzgova42tzq.o new file mode 100644 index 0000000..9e64292 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/b9lrfca0qx1gu5gzgova42tzq.o differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/bwe8pvwglu47ynpmq7tr2gzyg.o b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/bwe8pvwglu47ynpmq7tr2gzyg.o new file mode 100644 index 0000000..b422744 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/bwe8pvwglu47ynpmq7tr2gzyg.o differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/dep-graph.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/dep-graph.bin new file mode 100644 index 0000000..640ba50 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/dep-graph.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/query-cache.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/query-cache.bin new file mode 100644 index 0000000..9665f41 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/query-cache.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/work-products.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/work-products.bin new file mode 100644 index 0000000..7b5c0d6 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz-f1r2uxkct34t0xplebmjat7b1/work-products.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz.lock b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-1v46m8glqi5u0/s-h26jwi3zws-1vz5uaz.lock new file mode 100644 index 0000000..e69de29 diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/48zkfjyhbzupnxjc0mt544nau.o b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/48zkfjyhbzupnxjc0mt544nau.o new file mode 100644 index 0000000..8dbc71b Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/48zkfjyhbzupnxjc0mt544nau.o differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/4zewbcv2c4yu815hzbbhxyaw3.o b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/4zewbcv2c4yu815hzbbhxyaw3.o new file mode 100644 index 0000000..ad06591 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/4zewbcv2c4yu815hzbbhxyaw3.o differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/599jpoa46x5qhbrlyra6e1w5v.o b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/599jpoa46x5qhbrlyra6e1w5v.o new file mode 100644 index 0000000..2d0a7cd Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/599jpoa46x5qhbrlyra6e1w5v.o differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/7qso23gnsomvydopkx2j5ww4t.o b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/7qso23gnsomvydopkx2j5ww4t.o new file mode 100644 index 0000000..ffd11e1 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/7qso23gnsomvydopkx2j5ww4t.o differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/ahqb9mpovky8wsmf2sfdx2bip.o b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/ahqb9mpovky8wsmf2sfdx2bip.o new file mode 100644 index 0000000..44c94ca Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/ahqb9mpovky8wsmf2sfdx2bip.o differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/cl96hurqx18l69nfziswdiqao.o b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/cl96hurqx18l69nfziswdiqao.o new file mode 100644 index 0000000..7f06240 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/cl96hurqx18l69nfziswdiqao.o differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/dep-graph.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/dep-graph.bin new file mode 100644 index 0000000..40e20cd Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/dep-graph.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/query-cache.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/query-cache.bin new file mode 100644 index 0000000..7d85d1b Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/query-cache.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/work-products.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/work-products.bin new file mode 100644 index 0000000..8868ca7 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej-3hkltikmvqc0rm7a76j6mwei4/work-products.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej.lock b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-23nsh6rwyxkdn/s-h26kbku2h1-18x6eej.lock new file mode 100644 index 0000000..e69de29 diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-2vhtbkt9y1a65/s-h26kbklsf2-108ret8-d4fsh6fmucze7qcznbgl0in7n/dep-graph.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-2vhtbkt9y1a65/s-h26kbklsf2-108ret8-d4fsh6fmucze7qcznbgl0in7n/dep-graph.bin new file mode 100644 index 0000000..3f5a8c2 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-2vhtbkt9y1a65/s-h26kbklsf2-108ret8-d4fsh6fmucze7qcznbgl0in7n/dep-graph.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-2vhtbkt9y1a65/s-h26kbklsf2-108ret8-d4fsh6fmucze7qcznbgl0in7n/query-cache.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-2vhtbkt9y1a65/s-h26kbklsf2-108ret8-d4fsh6fmucze7qcznbgl0in7n/query-cache.bin new file mode 100644 index 0000000..49f2cc2 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-2vhtbkt9y1a65/s-h26kbklsf2-108ret8-d4fsh6fmucze7qcznbgl0in7n/query-cache.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-2vhtbkt9y1a65/s-h26kbklsf2-108ret8-d4fsh6fmucze7qcznbgl0in7n/work-products.bin b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-2vhtbkt9y1a65/s-h26kbklsf2-108ret8-d4fsh6fmucze7qcznbgl0in7n/work-products.bin new file mode 100644 index 0000000..2ece87b Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-2vhtbkt9y1a65/s-h26kbklsf2-108ret8-d4fsh6fmucze7qcznbgl0in7n/work-products.bin differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-2vhtbkt9y1a65/s-h26kbklsf2-108ret8.lock b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/incremental/registers-2vhtbkt9y1a65/s-h26kbklsf2-108ret8.lock new file mode 100644 index 0000000..e69de29 diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/registers b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/registers new file mode 100755 index 0000000..0e17faa Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/registers differ diff --git a/Fall-2024/CS-3843/Assignments/10/registers/target/debug/registers.d b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/registers.d new file mode 100644 index 0000000..2840c45 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/10/registers/target/debug/registers.d @@ -0,0 +1 @@ +/home/price/Git/College/Fall-2024/CS-3843/Assignments/10/registers/target/debug/registers: /home/price/Git/College/Fall-2024/CS-3843/Assignments/10/registers/src/main.rs diff --git a/Fall-2024/CS-3843/Assignments/9/Assignment.typ b/Fall-2024/CS-3843/Assignments/9/Assignment.typ new file mode 100644 index 0000000..59e0c55 --- /dev/null +++ b/Fall-2024/CS-3843/Assignments/9/Assignment.typ @@ -0,0 +1,218 @@ +#show link: set text(blue) +#set text(font: "Calibri") +#show raw: set text(font: "Fira Code") +#set table.cell(breakable: false) +#set table(stroke: (x, y) => ( + left: if x > 0 { + .1pt + }, + top: if y == 1 { + 0.5pt + } else if y > 1 { + 0.1pt + }, +)) + +#set page(margin: (y: .5in, x: .5in)) +#let solve(solution) = { + block( + outset: 3pt, + inset: 3pt, + stroke: blue + .3pt, + fill: rgb(0, 149, 255, 15%), + radius: 4pt, + )[#solution] +} + +#let solvein(solution) = { + let outset = 3pt + h(outset) + box( + outset: outset, + stroke: blue + .3pt, + fill: rgb(0, 149, 255, 15%), + radius: 4pt, + )[#solution] +} + +#let note(content) = { + block( + outset: 3pt, + inset: 3pt, + stroke: luma(20%) + .3pt, + fill: luma(95%), + radius: 4pt, + )[#content] +} + +#let notein(content) = { + let outset = 3pt + h(outset) + box( + outset: outset, + stroke: luma(20%) + .3pt, + fill: luma(95%), + radius: 4pt, + )[#content] +} + +#align(center)[ + = CS 3843 Computer Organization + HW 9\ + #underline[Price Hiller] *|* #underline[zfp106] +] +#line(length: 100%, stroke: .25pt) + + +1. [24 points] The disassembled code for two functions `first` and `last` is shown below, along with the code for a call of `first` by function `main`: + #image("./assets/q-1-code.png") + + Each of these instructions is given a label. Starting with the calling of `first(10)` by `main`, fill in the following table to trace the instruction execution through to the point where the program returns back to `main`. + + #solve( + table( + column-gutter: auto, + columns: 9, + align: (left, left, left, center, center, center, center, center, left), + stroke: (x, y) => { + let out = (left: none, right: none, top: none, bottom: none) + + if (y == 1) { + out.top = 1.5pt + black + } else { + if (x == 0) { + out.right = .7pt + black + } else if (x == 1) { + out.left = .7pt + black + } else { + out.left = .7pt + blue + } + out.bottom = .7pt + blue + } + + if (x == 3 or x == 8) { + out.left = 1.0pt + black + } + + if (x == 0) { + out.left = none + } + out + + }, + table.header( + table.cell( + colspan: 3, + align: center, + [Instruction], + ), + table.cell( + colspan: 5, + align: center, + [State values (at beginning)], + ), + table.cell([]), + [Label], + [PC], + [Instruction], + [%rdi], + [%rsi], + [%rax], + [%rsp], + [\*%rsp], + [Description], + table.hline(stroke: 1.5pt), + ), + + [`M1`], [`0x400560`], [`callq`], [`10`], [—], [—], [`0x7fffffffe820`], [—], [Call `first(10)`], + [`F1`], [`0x400548`], [`lea`], [`10`], [—], [—], [`0x7fffffffe818`], [—], [Load `&x + 1` into `%rsi`], + [`F2`], [`0x40054c`], [`sub`], [`10`], [`11`], [—], [`0x7fffffffe818`], [—], [Decrement `%rdi` by 1], + [`F3`], [`0x400550`], [`callq`], [`9`], [`11`], [—], [`0x7fffffffe810`], [—], [Call `last(9, 11)`], + [`L1`], [`0x400540`], [`mov`], [`9`], [`11`], [—], [`0x7fffffffe808`], [—], [Copy `%rdi` $->$ `%rax`], + [`L2`], [`0x400543`], [`imul`], [`9`], [`11`], [`9`], [`0x7fffffffe808`], [—], [Multiply `rdi` × `rax`, putting `99` into `rax`], + [`L3`], [`0x400547`], [`retq`], [`9`], [`11`], [`99`], [`0x7fffffffe810`], [—], [Return to first], + [`F4`], [`0x400555`], [`repz retq`], [—], [—], [`99`], [`0x7fffffffe818`], [—], [Return to main], + [`M2`], + [`0x400565`], + [`mov`], + [—], + [—], + [`99`], + [`0x7fffffffe820`], + [—], + [Copy the calculated value from `first(10)` (stored in `%rax`) to `%rdx`], + ), + ) + +#pagebreak() +2. [24 points] Consider a function `P`, which generates local values, named `a0`-`a8`. It then calls function `Q` using these generated values as arguments. GCC produces the following code for the first part of `P`: + + #align(left)[ + #image("./assets/q-2-code.png", width: 40%) + ] + + #enum( + numbering: "A.", + [ + Identify which local values get stored in callee-saved registers. + #solve[ + Local values are stored in callee-saved registers from lines 9 to 14, those being: + #block(inset: (left: 1em, bottom: .5em))[ + - `%rdi -> %rbx` (`a0`) + - `%1(rdi) -> %r15` (`a1`) + - `%2(rdi) -> %r14` (`a2`) + - `%3(rdi) -> %r13` (`a3`) + - `%4(rdi) -> %r12` (`a4`) + - `%5(rdi) -> %rbp` (`a5`) + ] + ] + ], + [ + Identify which local values get stored on the stack. + #solve[ + The first local value that is stored on the stack is `a6` via the indirection of `leaq 6(%rdi), %rax` & `movq %rax, (%rsp)`. + + The second local value is `a7` via `leaq 7(%rdi), %rdx` & `movq %rdx, 8(%rsp)`. + ] + ], + [ + Explain why the program could not store all of the local values in callee saved registers. + #solve[ + There are no more callee-saved registers available. It must store the last two values on the stack as that's largely the only place to put them (unless we want to start doing some heap allocations). + ] + ], + ) + +#pagebreak() + +3. [16 points] For a C function having the general structure: + + #align(left)[ + #image("./assets/q-3-code.png", height: 50%) + ] + #enum( + numbering: "A.", + [ + What value does `rfun` store in the callee-saved register `%rbx`? + #solve[ + `rfun` stores `x` in `%rbx`, see line 3 of the assembly code. + + Alternatively, we can say that `rfun` stores `%rdi` in `%rbx`. + ] + ], + [ + Fill in the missing expressions in the C code shown above. + #solve[ + #note[It's odd that we have the `movl $0, %eax` _before_ the test instructions... definitely sent me for a loop.] + ```c + long rfun (unsigned long x) { + if (x == 0) + return 0; + unsigned long nx = x >> 2; + long rv = rfun(nx); + return rv + x; + } + ``` + ] + ], + ) diff --git a/Fall-2024/CS-3843/Assignments/9/assets/q-1-code.png b/Fall-2024/CS-3843/Assignments/9/assets/q-1-code.png new file mode 100644 index 0000000..f75129c Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/9/assets/q-1-code.png differ diff --git a/Fall-2024/CS-3843/Assignments/9/assets/q-2-code.png b/Fall-2024/CS-3843/Assignments/9/assets/q-2-code.png new file mode 100644 index 0000000..da24f12 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/9/assets/q-2-code.png differ diff --git a/Fall-2024/CS-3843/Assignments/9/assets/q-3-code.png b/Fall-2024/CS-3843/Assignments/9/assets/q-3-code.png new file mode 100644 index 0000000..0260c36 Binary files /dev/null and b/Fall-2024/CS-3843/Assignments/9/assets/q-3-code.png differ