flat assembler
Message board for the users of flat assembler.

Index > Main > Forget 512 bytes, you can do everything in 256

Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7756
Location: Kraków, Poland
Tomasz Grysztar
Post 12 Apr 2020, 10:55
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 365
Ali.Z
@tomasz your post reminds me of Wolfenstein 3D game



another one 32b:
https://www.youtube.com/watch?v=uTCnMpNHBIw

_________________
Asm For Wise Humans
Post 12 Apr 2020, 11:02
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7756
Location: Kraków, Poland
Tomasz Grysztar
One thing that always feels clunky to me in such style coding is the non-reliability of starting conditions in DOS, which leads to having variants of code that work only in a very specific environment (or even worse - under a specific configuration of a specific emulator). If only MS/PC DOS had defined something like a standard values for registers at entry point of a program! But - of course - this would add another layer of legacy compatibility that any version of OS would need to provide, and in these days when every byte of memory still mattered, this certainly was not an option.

Even worse version of this problem lingers in the rules for PC Booter category of our 512-byte coding contest. At least at the entry point of a DOS program we know the values of IP and SP registers, while during bootstrap we are not even guaranteed to have IP=7C00h, as it might be 0 (with CS=7C0h). My TetrOS example needs 8 lines of code just to set up an uniform starting point because of that.

This gives me an idea - perhaps something to consider for some future contests - that we could design a well-defined starting conditions for coding small demos, and provide a universal launcher program that would execute the demos as such. There could even be separate but compatible launchers that could either boot or run from DOS command line (this reminds me of something I had done while l was still working solely under DOS - for testing boot sector code I had a small tool that could start a boot sector directly from a freshly assembled file).
Post 12 Apr 2020, 11:36
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2945
Location: vpcmipstrm
bitRAKE
Should/Can things be done to enhance disp8 addressing in terms of the initial execution environment?

I do miss PUSHA/POPA (MOVEM on 68k) in long mode. Sad
Post 12 Apr 2020, 17:07
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: 17492
Location: In your JS exploiting you and your system
revolution
256 bytes should be enough for anyone.
Post 12 Apr 2020, 18:52
View user's profile Send private message Visit poster's website Reply with quote
graudeejs



Joined: 19 Apr 2020
Posts: 3
Location: Riga, Latvia
graudeejs
Funny enough, I have interesting case with my 512B MBR entry (not submitted yet)
It works in Bochs, Qemu, VirtualBox, Thinkpad T420

However it doesn't work correctly when executed with boot option in DOSBox.

Same code works fine in DOSBox if executed as COM file, or when loaded via Turbo Debugger
Post 21 Apr 2020, 15:23
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 777
Location: Belarus
DimonSoft
Relies on some initial register values except DL?
Post 22 Apr 2020, 05:03
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
all the archive from this marvelous contest on pouet.net.

i feel admirative for those who coded some of theses incredible demos.

http://f00l.codercat.org/misc/256b_complete_demos_archive.zip

enjoy them Wink
Post 22 Apr 2020, 22:29
View user's profile Send private message Visit poster's website Reply with quote
graudeejs



Joined: 19 Apr 2020
Posts: 3
Location: Riga, Latvia
graudeejs
DimonSoft wrote:
Relies on some initial register values except DL?

Thanks for hint. I initialized almost everything.... the one thing that I didn't was stack. I wrongly expected it to be initialized (haven't been coding assembler of almost 10 years).

Thank you very much
Post 26 Apr 2020, 08:40
View user's profile Send private message Visit poster's website Reply with quote
Ivan2k2



Joined: 08 Sep 2004
Posts: 80
Location: Russia, Angarsk
Ivan2k2
Post 14 May 2020, 14:37
View user's profile Send private message ICQ Number Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 365
Ali.Z
Ivan2k2 wrote:
This is my favorite
https://www.youtube.com/watch?v=BzfsDfHqIM4


awesome one, download link:
https://files.scene.org/view/parties/2002/0a000h/256b/comatose.zip

running it on dosbox with the settings:
core=dynamic
cycles=max


and its still slow, but better than default dosbox configurations.

edit: and graphics are bad, i will run it on 32-bit machine whenever i have time.

_________________
Asm For Wise Humans
Post 14 May 2020, 18:51
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.