START_CLASSIFIED_TRANSMISSION

TITLE: dcpu specs, classified, not final
TO: redacted
DATE: 20120328
VERSION: 4

16 bit architecture
0x10000 words of ram (128kb)
8 registers (A, B, C, X, Y, Z, I, J)
program counter (PC)
stack pointer (SP)
overflow (O)

all values are 16 bit unsigned and are set to 0 on startup

opcodes, 16bits: bbbbbbaaaaaaoooo

oooo: - all values are stored in a
0: -RESERVED-
1: SET a, b - sets value of b to a
2: ADD a, b - adds b to a, sets O
3: SUB a, b - subtracts b from a, sets O
4: MUL a, b - multiplies a by b, sets O
5: DIV a, b - divides a by b, sets O
6: MOD a, b - remainder of a over b
7: SHL a, b - shifts a left b places, sets O
8: SHR a, b - shifts a right b places, sets O
9: AND a, b - binary and of a and b
10: BOR a, b - binary or of a and b
11: XOR a, b - binary xor of a and b
12: IFE a, b - skips one instruction if a!=b
13: IFN a, b - skips one instruction if a==b
14: IFG a, b - skips one instruction if a<=b
15: IFB a, b - skips one instruction if (a&b)==0

aaaaaa, bbbbbb: - brackets = memory lookup of value
0-7: register value - register values
8-15: [register value] - value at address in registries
16-23: [next word of ram + register value] - memory address offset by register value
24: POP - value at stack address, then increases stack counter
25: PEEK - value at stack address
26: PUSH - decreases stack address, then value at stack address
27: SP - current stack pointer value - current stack address
28: PC - program counter - current program counter
29: O - overflow - current value of the overflow
30: [next word of ram] - memory address
31: next word of ram - literal, does nothing on assign
32-63: literal value 0-31 - literal, does nothing on assign

assembler example: http://pastebin.com/raw.php?i=qb7k8fNa

END_CLASSIFIED_TRANSMISSION

  1. daedalus-wings reblogged this from notch
  2. thatextracharacter reblogged this from notch
  3. ninjaspaaaace reblogged this from notch and added:
    Greeeat… “Data: Hello World> Freeze CPU Forever.” YAY. NOTCH TRIED TO TAKE OVER THE WORLD AGAIN!
  4. bassposaune reblogged this from notch and added:
    This is the shit I’m majoring in? God damnit.
  5. deathfiyr reblogged this from notch and added:
    Check this out
  6. jeffandonutsvstheworld reblogged this from notch
  7. okauu reblogged this from notch
  8. tuft64 reblogged this from notch
  9. gedonlinediploma reblogged this from notch
  10. 10000101 reblogged this from notch
  11. algarvetaxi reblogged this from notch and added:
    faro Transfers
  12. bwengineering reblogged this from notch
  13. thebestnurse reblogged this from notch
  14. quickfinance reblogged this from notch
  15. optimizareweb reblogged this from notch
  16. agent951 reblogged this from notch and added:
    I lost my worlds...power surge, I had 12 single player worlds. I also lost my ahevments...
  17. mskarloff reblogged this from notch
  18. siapran reblogged this from notch and added:
    Notch is developing...new game for coders. This is gonna be awesome.
  19. matteyed reblogged this from notch
  20. nadleehb reblogged this from notch