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: 8359
Location: Kraków, Poland
Tomasz Grysztar 12 Apr 2020, 10:55
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: 734
Ali.Z 12 Apr 2020, 11:02
@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: 8359
Location: Kraków, Poland
Tomasz Grysztar 12 Apr 2020, 11:36
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: 4075
Location: vpcmpistri
bitRAKE 12 Apr 2020, 17:07
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: 20453
Location: In your JS exploiting you and your system
revolution 12 Apr 2020, 18:52
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 21 Apr 2020, 15:23
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: 1228
Location: Belarus
DimonSoft 22 Apr 2020, 05:03
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: 4353
Location: Now
edfed 22 Apr 2020, 22:29
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 26 Apr 2020, 08:40
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 14 May 2020, 14:37
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: 734
Ali.Z 14 May 2020, 18:51
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.