RE: AttoWPU - experimental "avant-garde" processor and programming language 05-20-2011, 08:59 PM
#11
(05-20-2011, 08:56 PM)Frooxius Wrote: Hi, somebody recently (a few dozen minutes ago) attempted to write Hello World code for my processor. In case anybody here tried to do same thing as the first app... well I don't recommend it, because it's a little bit more difficult for a first app, I recommend trying to light up a LED or something like that. For illustration, I wrote the Hello World in my language myself. It's quite funny for an Hello World app
Hello World in AttoASM
Code:/* Hello World in AttoASM by Frooxius, slightly optimized, 5/20/2011, www.attowpu.solirax.org */ EXE { CTRL+7(2) ! } // execute command ADDR+4 [01H, 4] // attocode memory CTRL+3 [01H, 4] // write new address DATA [TEXT] EXE DATA+24 1(8) // prepare for data exchange LOOP: // cleanup after jump CTRL+7 0 ADDR+4 [05H, 4] // out register CTRL+3 [00H, 4] // stop the output EXE // Write the character ADDR+4 [01H, 4] // attocode memory CTRL+3 [03H, 4] // output addressed data EXE ADDR+4 [0BH, 4] // address text display CTRL+3 [03H, 4] // write character and increment address EXE // Maintain the loop if end of string wasn't reached yet ADDR+4 [01H, 4] // address attocode memory CTRL+3 [07H, 4] // move to the next element EXE ADDR+4 [02H, 4] // address TEMP register CTRL+3 [03H, 4] // write value without mask from the databus EXE ADDR+4 [01H, 4] // attocode memory CTRL+3 [00H, 4] // stop data output EXE ADDR+4 [04H, 4] // address ALU CTRL [29H, 7] // ZeroSet DATA [ENDLOOP] EXE CTRL [2AH, 7] // NotZeroSet DATA [LOOP] EXE CTRL 000 // clear three MSB DATA+24 1(8) // prepare for data exchange ADDR+4 [05H, 4] // OUT register CTRL+3 [01H, 4] // output its contents EXE ADDR+4 [00H, 4] // aPC CTRL+3 [01H, 4] // write new address from the databus EXE ENDLOOP: // cleanup after jump CTRL+7 0 ADDR+4 [05H, 4] // out register CTRL+3 [00H, 4] // stop the output EXE // infinite loop to stop the program from executing following (nonexistent - gibberish) code AJMP [INFLOOP, 15] INFLOOP: AJMP+15(2) ! text: "Hello world" $00
all of that for just a hello world? :O
how do you even memorize it?
(This post was last modified: 05-20-2011, 08:59 PM by Skullmeat.)
Pierce the life fibers with your drill.





![[+]](https://sinister.li/images/modern/collapse_collapsed.png)

![[Image: wpu_poster___photo_by_frooxius-d3ja04i.jpg]](http://fc06.deviantart.net/fs70/i/2011/169/e/e/wpu_poster___photo_by_frooxius-d3ja04i.jpg)
![[Image: wpu_stand___stretech_expo_by_frooxius-d3jkfno.jpg]](http://th01.deviantart.net/fs70/PRE/i/2011/172/4/6/wpu_stand___stretech_expo_by_frooxius-d3jkfno.jpg)
![[Image: cat_studying_wpu_poster_by_frooxius-d3jkf5i.jpg]](http://th02.deviantart.net/fs71/PRE/i/2011/172/f/8/cat_studying_wpu_poster_by_frooxius-d3jkf5i.jpg)

![[Image: rytwG00.png]](http://i.imgur.com/rytwG00.png)