Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Signed arithmetic/control-flow in DCPU-16?

Tags:

dcpu-16

DCPU-16 (the CPU in Notch's new game) doesn't seem to have any signed IF/MUL/DIV instructions.

Is there still a way to do signed arithmetic/control-flow that isn't super incredibly painful?

like image 424
BlueRaja - Danny Pflughoeft Avatar asked Apr 13 '12 21:04

BlueRaja - Danny Pflughoeft


1 Answers

The new DCPU spec published by Notch the other day, does have signed arithmetic instructions:

Unsigned  | Signed
==================
MUL       | MLI
DIV       | DVI
SHR       | ASR
IFG       | IFA
IFL       | IFU
like image 179
jimt Avatar answered Sep 28 '22 10:09

jimt