mirror of
https://github.com/irmen/ksim65.git
synced 2024-11-15 09:05:52 +00:00
fix 'a' command
This commit is contained in:
parent
be8716c4a4
commit
99d8f5cd97
@ -49,7 +49,6 @@ class Assembler(cpu: Cpu6502, val memory: MemMappedComponent, initialStartAddres
|
||||
fun assemble(lines: Iterable<String>): Result {
|
||||
for(line in lines) {
|
||||
val result = assemble(line)
|
||||
println("line: $line -> ${result.success} ${result.error}") // TODO
|
||||
if(!result.success)
|
||||
return result
|
||||
assembledSize += result.numBytes
|
||||
|
@ -83,7 +83,8 @@ class Monitor(val bus: Bus, val cpu: Cpu6502) {
|
||||
IVirtualMachine.MonitorCmdResult("", "", true)
|
||||
}
|
||||
'a' -> {
|
||||
val address = 0 // TODO parse from line
|
||||
val parts = command.substring(1).trim().split(' ')
|
||||
val address = if(parts.size>=2) Assembler.parseNumber(parts[0]) else 0
|
||||
val assembler = Assembler(cpu, bus.memoryComponentFor(address), address)
|
||||
val result = assembler.assemble(command.substring(1).trimStart())
|
||||
if(result.success) {
|
||||
|
Loading…
Reference in New Issue
Block a user