Compare commits
No commits in common. "9e49d228ed1e82a96b7a8a02ff7f743b91c520bc" and "528025d0ff4811cbeff252686dbea7340085cc07" have entirely different histories.
9e49d228ed
...
528025d0ff
2 changed files with 4 additions and 8 deletions
|
@ -79,7 +79,7 @@ module Hence
|
||||||
@reg_inp = 0_u16,
|
@reg_inp = 0_u16,
|
||||||
@reg_out = 0_u16,
|
@reg_out = 0_u16,
|
||||||
@stack = Slice(UInt16).new({{ 8 * 1024 }}),
|
@stack = Slice(UInt16).new({{ 8 * 1024 }}),
|
||||||
@memory = Slice(UInt16).new({{ 16 * 1024 }})
|
@memory = Slice(UInt16).new({{ 24 * 1024 }})
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -226,10 +226,8 @@ module Hence
|
||||||
@program[address].to_u16
|
@program[address].to_u16
|
||||||
elsif address < {{ 40 * 1024 }}
|
elsif address < {{ 40 * 1024 }}
|
||||||
@stack[address - {{ 32 * 1024 }}]
|
@stack[address - {{ 32 * 1024 }}]
|
||||||
elsif address < {{ 56 * 1024 }}
|
|
||||||
@memory[address - {{ 40 * 1024 }}]
|
|
||||||
else
|
else
|
||||||
0_u16
|
@memory[address - {{ 40 * 1024 }}]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -240,10 +238,8 @@ module Hence
|
||||||
@stack[address - {{ 32 * 1024 }}] = value
|
@stack[address - {{ 32 * 1024 }}] = value
|
||||||
|
|
||||||
value
|
value
|
||||||
elsif address < {{ 56 * 1024 }}
|
|
||||||
@memory[address - {{ 40 * 1024 }}] = value
|
|
||||||
else
|
else
|
||||||
0_u16
|
@memory[address - {{ 40 * 1024 }}] = value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -29,7 +29,7 @@ Opcode | Name
|
||||||
<% output = " " + output unless output.blank? -%>
|
<% output = " " + output unless output.blank? -%>
|
||||||
Opcode | Argument | Stack
|
Opcode | Argument | Stack
|
||||||
---|---|---
|
---|---|---
|
||||||
`0x<%= sorted_opcodes.find! { |opc| opc[1].name == opcode.name }[0].to_s(16).rjust(2, '0') %>` | <%= opcode.arg && "`#{opcode.arg}`" %> | <%= (opcode.stack.input.size > 0 || opcode.stack.output.size > 0) ? "`#{input}--#{output}`" : nil %>
|
`0x<%= sorted_opcodes.find! { |opc| opc[1].name == opcode.name }[0].to_s(16).rjust(2, '0') %>` | <%= opcode.arg && "`#{opcode.arg}`" %> | <%= (opcode.stack.input.size > 0 && opcode.stack.output.size > 0) ? "`#{input}--#{output}`" : nil %>
|
||||||
<%- if opcode.example -%>
|
<%- if opcode.example -%>
|
||||||
|
|
||||||
```gnuassembler
|
```gnuassembler
|
||||||
|
|
Loading…
Reference in a new issue