flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Programming Language Design > Challenger Interpreter

Goto page Previous  1, 2, 3
Author
Thread Post new topic Reply to topic
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6301
Location: Kraków, Poland
Some funny program I made as an experiment - it makes the data pointer travel inside the box and turn right if it meets any obstacle. Of course you can add obstacles in real-time with the Poke operation.

Code:
1"0-\7:):v):!?<
         >" - |
         ^   .<

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
O                            O
O                            O
O                            O
O                            O
O                            O
O                            O
O                            O
O                            O
O                            O
O                            O
O                            O
O                            O
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

Maybe this could be made into some kind of game, but I definitely do not have so much spare time.


Last edited by Tomasz Grysztar on 09 Sep 2009, 15:33; edited 1 time in total
Post 09 Sep 2009, 15:30
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 14671
Location: Origae-6
Nokia phones have the silly snake game. So perhaps you can make it like that.
Post 09 Sep 2009, 15:32
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2109
Location: Usono (aka, USA)
No way, someone should make a full-featured Blackjack: split, doubledown, surrender, insurance, etc. Smile
Post 09 Sep 2009, 18:59
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6301
Location: Kraków, Poland
As I have some ideas for Challenger 2.0, but it is likely I will not have any time to work on it soon, I'm going to write them down here, so they can wait for better times. Wink

What I'd like to have is to get a kind of Core Wars, so Challenger 2.0 would allow unlimited multithreading - there would be a new instruction 'f', splitting any thread into two, the second one traveling perpendicularly. Each thread would have its own accumulator, DP and SP, but they all would share the same plane. So that they would be able to compete, communicate, and perhaps even interact in other interesting ways. Any thread reaching an exception state would simply vanish.

As for the interpreter implementation, it would be optimized for more large-scale operation. The plane would be divided into large blocks, each one connected to four neighbours (just like the segments in Challenger 1.0), or with zero pointers when at the edge of allocated rectangular space. When plane needs to be expanded, the new row of blocks would be allocated and linked to the blocks on the current edge (again, like with segments in Challenger 1.0). Interpreter would start with just one block allocated.
Internally, each block would consist of pointers to segments - each segment being a rectangular part of plane, like 100x100 cells. When some part of plane was not initialized yet, the pointer would still be zero, and the segment would get allocated only when needed. One block would be 100x100 segments, and since pointer to segment and cell would have the same size, the block data and segment data would be of the same size aswell (well, it's not really important, but nice anyway).

Large scale would be necessary to try to simulate some evolutionary behaviors. Perhaps some randomization features would be needed to add, too (though I'm not really sure about this one, see the article about Tierran Mutants linked earlier in this thread).
Post 19 Sep 2009, 12:07
View user's profile Send private message Visit poster's website Reply with quote
SFeLi



Joined: 03 Nov 2004
Posts: 140
Location: Severodvinsk, Russia
Tomasz Grysztar, there is a bug in your interpreter: pop edi after .program_initialized is excess as it actually pops an lpvAddress argument for VirtualFree, and thus changes ControllerDialogProc return address. It works in XP by accident, but in 9x it reboots/hangs an OS.
Post 15 Dec 2010, 09:52
View user's profile Send private message Visit poster's website Yahoo Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6301
Location: Kraków, Poland
Thanks, I updated it.
Post 15 Dec 2010, 13:06
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4155
Location: Thank you :D

SFeLi wrote:
Tomasz Grysztar, there is a bug in your interpreter: pop edi after .program_initialized is excess as it actually pops an lpvAddress argument for VirtualFree, and thus changes ControllerDialogProc return address. It works in XP by accident, but in 9x it reboots/hangs an OS.



ok, it was the cause of the reboot i had when i tryed it... then, it's time to retest it.

_________________
Smile fool
Post 15 Dec 2010, 22:06
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3

< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.