Skip to content

Commit

Permalink
OSCLI fx fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanizag committed Aug 22, 2021
1 parent c3627dd commit e05e17d
Show file tree
Hide file tree
Showing 5 changed files with 271,746 additions and 5 deletions.
3 changes: 1 addition & 2 deletions osByte.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ func execOSBYTE(env *environment) {
env.mem.Poke(zpA, a)
env.mem.Poke(zpX, x)
env.mem.Poke(zpY, y)
cmd := uint8(serviceOSBYTE)
env.cpu.SetAXYP(cmd, x, y, p)
newA = uint8(serviceOSBYTE)
env.cpu.SetPC(procServiceRoms)
env.log(fmt.Sprintf("OSBYTE%02x_to_roms(X=0x%02x,Y=0x%02x)", a, x, y))
// procServiceRoms issues a 254-Bad command if the command is not handled by any ROM
Expand Down
6 changes: 3 additions & 3 deletions osCLI.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func execOSCLI(env *environment) {

func execOSCLIfx(env *environment, argA uint8, params []string) {
argX := 0
if len(params) >= 2 {
if len(params) >= 1 {
var err error
argX, err = strconv.Atoi(strings.TrimSpace(params[0]))
if err != nil || (argX&0xff) != argX {
Expand All @@ -187,9 +187,9 @@ func execOSCLIfx(env *environment, argA uint8, params []string) {
}
}
argY := 0
if len(params) >= 3 {
if len(params) >= 2 {
var err error
argY, err = strconv.Atoi(strings.TrimSpace(params[2]))
argY, err = strconv.Atoi(strings.TrimSpace(params[1]))
if err != nil || (argY&0xff) != argY {
env.raiseError(254, "Bad Command")
return
Expand Down
Loading

0 comments on commit e05e17d

Please sign in to comment.