39 lines
818 B
Odin
39 lines
818 B
Odin
package sim_8086
|
|
|
|
import "core:os"
|
|
import "core:fmt"
|
|
import "core:math"
|
|
import "core:strings"
|
|
import "core:text/regex"
|
|
|
|
extract_expected_cpu_state :: proc(listing_num: int) -> (Cpu, bool) {
|
|
cpu: Cpu
|
|
|
|
// filename := fmt.aprintf("./asm_files/list-%04d.txt", listing_num)
|
|
// fmt.println(filename)
|
|
// data,ok := os.read_entire_file(filename)
|
|
// if !ok {
|
|
// return cpu, false
|
|
// }
|
|
// defer delete(data)
|
|
|
|
// content := string(data)
|
|
// lines := strings.split(content, "\n")
|
|
// defer delete(lines)
|
|
|
|
// for line in lines {
|
|
// for c in line {
|
|
// if c != ' ' {
|
|
// continue
|
|
// } else {
|
|
// fmt.print(c)
|
|
// }
|
|
// }
|
|
// fmt.println()
|
|
// }
|
|
|
|
|
|
// cpu.registers[]
|
|
return cpu, true
|
|
}
|