Skip to content

Commit

Permalink
Reformats
Browse files Browse the repository at this point in the history
  • Loading branch information
ChippyPlus committed Nov 30, 2024
1 parent 087f73d commit cd988e2
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 11 deletions.
3 changes: 0 additions & 3 deletions docs/Instruction-Set.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ stack underflow.
peek G1 // G1 = top of stack; stack unchanged
```


## Arithmetic Instructions

These instructions perform arithmetic operations. Results are pushed onto the stack.
Expand Down Expand Up @@ -406,7 +405,6 @@ syscall // Make the system call; result is on stack

## Miscellaneous Instructions


### HELP

**`help` `Topic` (Topic)**
Expand All @@ -417,7 +415,6 @@ Displays help information for the specified `Topic` (instruction or standard lib
help `"add"` // Display help for the ADD instruction
```


### SLEEP

**`sleep` `Milliseconds` (Milliseconds)**
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import engine.parser
import helpers.Config
import internals.Vm
Expand All @@ -13,7 +12,8 @@ import kotlin.system.exitProcess


val config = Config(File("./config.json"))
val hertz = config.hertz

//val hertz = config.hertz
val MEMORY_LIMIT = config.memorySize
val os = OS()
val init = KProcess(Vm(), File("idk the netherlands?"))
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/data/memory/Heap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import os
import kotlin.system.exitProcess

const val EMPTY_MEM_VAL = -255L

class Heap(val kp: KProcess) {
var m = os.mainMemory

Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/environment/VMErrors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ class VMErrors(val vm: Vm? = null, val pc: Long? = null) {
}



private fun prefix(): String {
return if (vm != null) {
"ERROR:${vm.pc}"
Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/helpers/stringToSuperRegisterType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ fun String.toRegisterType(): RegisterType? {
"r10" -> RegisterType.R10



"f1" -> RegisterType.F1
"f2" -> RegisterType.F2
"f3" -> RegisterType.F3
Expand Down
5 changes: 1 addition & 4 deletions src/main/kotlin/kernel/SnapShotManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class SnapShotManager(val vm: Vm) {
vm.registers.write(i.key, i.value)
}
}

fun snapShotRegisters(): Map<RegisterType, Long> {
val allRegisters = mutableMapOf<RegisterType, Long>()
allRegisters.forEach { if (!it.key.name.startsWith('I')) allRegisters.remove(it.key) }
Expand All @@ -20,10 +21,6 @@ class SnapShotManager(val vm: Vm) {
}






}


Expand Down

0 comments on commit cd988e2

Please sign in to comment.