Skip to content

Commit

Permalink
load: accept slt # b-field in 88 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bobertlo committed Nov 25, 2024
1 parent aadb921 commit f2b3658
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions load.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,12 @@ func getOpModeAndValidate88(Op OpCode, AMode AddressMode, BMode AddressMode) (Op

case SLT:
// SLT;
// AB if #A, B otherwise, no #B allowed
if BMode == IMMEDIATE {
return 0, fmt.Errorf("invalid b mode '#' for op 'slt'")
}
// AB if #A, B otherwise

// #B is not allowed by the 88 standard but is allowed on hills
// if BMode == IMMEDIATE {
// return 0, fmt.Errorf("invalid b mode '#' for op 'slt'")
// }
if AMode == IMMEDIATE {
return AB, nil
} else {
Expand Down

0 comments on commit f2b3658

Please sign in to comment.