If it doesn't fit elsewhere, it should go here
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 11 Apr 2012, 23:39
So I guess you heard notch is making a new game about ships and that shit. The best thing the new Computer, the DCPU 16, programmed in a modified version of Assembly.
Here is something I made in 2 seconds:
Code: Select all
;SOME CRAP
SET A, 4 ; sets register A to 4
SET B, 5 ; sets register B to 5
ADD A, B; sets register A to A+B (4+5)
So... this is a general discussion thread, but you can post your code too, i'll post a link to the emulator too.
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Apr 2012, 01:35
Confused?
-
LightningFire
- Posts: 1828
- Joined: 10 Mar 2012, 17:24
Post
» 12 Apr 2012, 01:44
Eeyup!
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Apr 2012, 01:57
Not really hard if you learnt Assembly.
Some shit:
Code: Select all
SET X, 10
SET Y, 10
:loop
IFE X, 10000
SET PC, end
IFG 10000, X
ADD X,Y
:end
SET PC, end
count to 10000 in 10s
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Apr 2012, 02:03
Questions?
-
Kyle Prior
- Posts: 469
- Joined: 02 Feb 2012, 23:38
Post
» 12 Apr 2012, 02:28
Emulator?
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Apr 2012, 02:31
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Apr 2012, 04:15
?Confused even more?
-
Kyle Prior
- Posts: 469
- Joined: 02 Feb 2012, 23:38
Post
» 12 Apr 2012, 04:22
I'm not. I got it.
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Apr 2012, 04:24
Kyle Prior wrote:I'm not. I got it.
Give us your new creation, sir.
-
Kyle Prior
- Posts: 469
- Joined: 02 Feb 2012, 23:38
Post
» 12 Apr 2012, 04:25
nnnnnnnnnnnnnnno.
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Apr 2012, 04:32
why?
-
Kyle Prior
- Posts: 469
- Joined: 02 Feb 2012, 23:38
Post
» 12 Apr 2012, 04:33
(it's a secret)
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Apr 2012, 04:33
Kyle Prior wrote:(it's a secret)
(that doesn't exist)
-
Kyle Prior
- Posts: 469
- Joined: 02 Feb 2012, 23:38
Post
» 12 Apr 2012, 04:34
(true)
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Apr 2012, 04:35
(lol, you don't get it)
-
Lawnboy
- Posts: 836
- Joined: 03 Feb 2012, 02:24
Post
» 12 Apr 2012, 04:36
i coded CoD in this
-
Kyle Prior
- Posts: 469
- Joined: 02 Feb 2012, 23:38
Post
» 12 Apr 2012, 04:36
Pfft.. I know what it is. I'm jut rubbish at programming. or whatever.
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Apr 2012, 04:38
Code: Select all
SET A, 1 ; set register A to 1
SET B, 1 ; set register B to 1
ADD A, B ; set register A to A+B
That was my first script. SIMPLES
-
rokit
- Posts: 2095
- Joined: 03 Feb 2012, 00:47
Post
» 12 Apr 2012, 15:06
All registers: A, B, C, X, Y, Z, I, J and the others: SP (stack point), PC (program counter), O (overflow).
If you wan't more you can set them into the memory like so:
Code: Select all
SET [0x8000], 1 ; Set the memory of 0x8000 to 1
SET A, 1 ; Set the register A to 1
ADD A, [0x8000] ; Set a to A+[0x8000]
-
penguin321
- Posts: 165
- Joined: 03 Mar 2012, 23:01
Post
» 14 Apr 2012, 03:04
I found this code:
Code: Select all
; Hello, World!
set x, 0x8000
set y, text
:loop
ife [y], 0
set PC, end
; the new IO spec stupidly defaults to black text on a black background. We use the line below to set it to white on black.
set [x], 0xF000
bor [x], [y]
add x, 1
add y, 1
set PC, loop
; variables
:text
dat 72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33, 0
:end
sub PC, 1
It displays "Hello world!"