working on ass3, todo pc, nixbpe

This commit is contained in:
Jaka Furlan 2025-12-14 23:31:52 +01:00
parent 6261d9fe37
commit beabcde7db
15 changed files with 412 additions and 194 deletions

View file

@ -41,7 +41,8 @@ let writeMemAddr (state : state) (address : int) (value : int) : unit =
let byte1 = Char.chr ((value lsr 16) land 0xFF) in
let byte2 = Char.chr ((value lsr 8) land 0xFF) in
let byte3 = Char.chr (value land 0xFF) in
Printf.printf "[Procesor/writeMemAddr]Napisal byte %02X %02X %02X na %06X\n"
(int_of_char byte1) (int_of_char byte2) (int_of_char byte3) address;
(* Write bytes into memory *)
Bytes.set state.memory address byte1;
Bytes.set state.memory (address+1) byte2;