Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update F32A docs #42

Merged
merged 3 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/f32a.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Most of the instructions drop the carry flag. Exceptions: `add`, `dup`.
- **Multiply Step**
- **Syntax:** `+*`
- **Description:** Perform a multiplication step.
- **Operation:** `T <- T + (if A[0] then S else 0); A <- A >> 1; T <- T >> 1; if T[0] then A[31] <- 1 else A[31] <- 0`
- **Operation:** `T <- T + (if A[0] then S else 0); A <- A >> 1; if T[0] then A[31] <- 1 else A[31] <- 0; T <- T >> 1`

- **Divide Step**
- **Syntax:** `+/`
Expand Down Expand Up @@ -156,8 +156,8 @@ Most of the instructions drop the carry flag. Exceptions: `add`, `dup`.

- **Over**
- **Syntax:** `over`
- **Description:** Copy the second value from the top of the data stack to the top.
- **Operation:** `dataStack.push(dataStack[1])`
- **Description:** Swap the top two values of the data stack.
- **Operation:** `T <- dataStack.pop(); S <- dataStack.pop(); dataStack.push(T); dataStack.push(S)`

### Control Flow Instructions

Expand Down Expand Up @@ -188,8 +188,8 @@ Most of the instructions drop the carry flag. Exceptions: `add`, `dup`.

- **Minus If**
- **Syntax:** `-if <label>`
- **Description:** Jump to the specified label if the top value of the data stack is negative.
- **Operation:** `if dataStack.pop() < 0 then p <- <label>`
- **Description:** Jump to the specified label if the top value of the data stack is nonnegative.
- **Operation:** `if dataStack.pop() >= 0 then p <- <label>`

- **Halt**
- **Syntax:** `halt`
Expand Down
2 changes: 1 addition & 1 deletion src/Isa/F32a.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ data Isa w l
Jump l
| -- | __if__ If T is nonzero, continues with the next instruction word addressed by P. If T is zero, jumps
If l
| -- | __-if__ Minus-if. If T is negative (T17 set), continues with the next instruction word addressed by P. If T is positive, jumps
| -- | __-if__ Minus-if. If T is negative (T[31] set), continues with the next instruction word addressed by P. If T is nonnegative, jumps
MinusIf l
| -- | __a!__ A-Store. Stores T into register A, popping the data stack
AStore
Expand Down