Streaming game development: https://www.twitch.tv/stabyourself Image

DCPU 16 by Notch.

If it doesn't fit elsewhere, it should go here
rokit
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

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
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

Post » 12 Apr 2012, 01:35

Confused?

LightningFire
User avatar
Posts: 1907
Joined: 10 Mar 2012, 17:24
Reputation: 134
Contact:

Post » 12 Apr 2012, 01:44

Eeyup!

rokit
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

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
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

Post » 12 Apr 2012, 02:03

Questions?

Kyle Prior
User avatar
Posts: 477
Joined: 02 Feb 2012, 23:38
Reputation: 5

Post » 12 Apr 2012, 02:28

Emulator?

rokit
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

Post » 12 Apr 2012, 02:31

Well Emulator with built in IDE:
http://badsector.github.com/dcpustud/

rokit
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

Post » 12 Apr 2012, 04:15

?Confused even more?

Kyle Prior
User avatar
Posts: 477
Joined: 02 Feb 2012, 23:38
Reputation: 5

Post » 12 Apr 2012, 04:22

I'm not. I got it.

rokit
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

Post » 12 Apr 2012, 04:24

Kyle Prior wrote:I'm not. I got it.

Give us your new creation, sir.

Kyle Prior
User avatar
Posts: 477
Joined: 02 Feb 2012, 23:38
Reputation: 5

Post » 12 Apr 2012, 04:25

nnnnnnnnnnnnnnno.

rokit
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

Post » 12 Apr 2012, 04:32

why?

Kyle Prior
User avatar
Posts: 477
Joined: 02 Feb 2012, 23:38
Reputation: 5

Post » 12 Apr 2012, 04:33

(it's a secret)

rokit
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

Post » 12 Apr 2012, 04:33

Kyle Prior wrote:(it's a secret)

(that doesn't exist)

Kyle Prior
User avatar
Posts: 477
Joined: 02 Feb 2012, 23:38
Reputation: 5

Post » 12 Apr 2012, 04:34

(true)

rokit
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

Post » 12 Apr 2012, 04:35

(lol, you don't get it)

Lawnboy
User avatar
Posts: 837
Joined: 03 Feb 2012, 02:24
Reputation: 20

Post » 12 Apr 2012, 04:36

i coded CoD in this

Kyle Prior
User avatar
Posts: 477
Joined: 02 Feb 2012, 23:38
Reputation: 5

Post » 12 Apr 2012, 04:36

Pfft.. I know what it is. I'm jut rubbish at programming. or whatever.

rokit
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

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
User avatar
Posts: 2108
Joined: 03 Feb 2012, 00:47
Reputation: 98

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
User avatar
Posts: 165
Joined: 03 Mar 2012, 23:01
Reputation: 6

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!"


Return to “Twatter”

Who is online

Users browsing this forum: cracking open a cold one and 1 guest

cron