Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
a1k0n
on April 4, 2012
|
parent
|
context
|
favorite
| on:
C-based Virtual Machine for Notch's DCPU-16
And I'm pretty sure the O register isn't supposed to be set in all cases. And what was lit[] supposed to be for?
swetland
on April 5, 2012
|
next
[–]
Yeah, think you're right. I'm out of spec there. That's what you get for trying to be cute. Fixed now.
a1k0n
on April 5, 2012
|
parent
|
next
[–]
I think your lit table also implies you can write to literals. So I can 'SET 2, 0x1f; SET A, 2' and now A is 0x1f.
swetland
on April 5, 2012
|
root
|
parent
|
next
[–]
There's a check in the writeback phase that prevents that.
a1k0n
on April 5, 2012
|
root
|
parent
|
next
[–]
Ah-ha, yes there is. Sorry.
jpd
on April 4, 2012
|
prev
[–]
He needs 'lit' so dcpu_opr() can uniformly return a pointer for all results, including literal values.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: