Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 52
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
One birthday today, congrats!
mileswaldron (59)


Next birthdays
06/04 muze801 (33)
06/05 HVgeek (33)
06/05 jmorlockny (50)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: Computer Science
« Previous topic | Next topic »   

Graphics demo to show off your old PC

Move Thread LAN_403
Bjørn
Wed Nov 01 2006, 07:28PM Print
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
Requirements:
* 77 bytes of disk space
* 64 kB of RAM
* VGA card

Handmade in assembly language for a quality experience.
]1162409316_27_FT0_pattern.zip[/file]
Back to top
Nucleophobe
Wed Nov 01 2006, 10:15PM
Nucleophobe Registered Member #108 Joined: Thu Feb 09 2006, 11:44PM
Location: Billings, MT
Posts: 61
Wow. I opened it up in a hex editor for fun.

How did you learn to do this? I remember small but amazing 3D app a group made in assembly (something like 174KB).

cheesey I'm jealous

*EDIT If you change the last byte from '21' to '32' you can't quit and instead it does some funky stuff...
Back to top
Bjørn
Wed Nov 01 2006, 10:58PM
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
The 21 you changed is not part of my program but code the assembler put in to terminate the program. I don't think 32 is defined as a standard DOS call so I have no idea what happens.

On the commandline type debug pattern3.com and use the u command several times to see the assembly code and you will see INT 21 at the end.

I learned this ages ago before internet and search engines by randomly typing in things to see what happened and gradually figuring out how it worked.
Back to top
Nucleophobe
Thu Nov 02 2006, 12:15AM
Nucleophobe Registered Member #108 Joined: Thu Feb 09 2006, 11:44PM
Location: Billings, MT
Posts: 61
Cool. I've never used the command-line debug program before.

I also noticed that you can change the colors by messing with the line 'FEC375F6'. For instance, try 'FEC275F6'. For some reason, this makes the program use 256-bit colors it looks like.

Does each hex pair correspond to one assembly instruction? I've never really understood how it works after you compile...

//google time
Back to top
Simon
Thu Nov 02 2006, 12:43AM
Simon Registered Member #32 Joined: Sat Feb 04 2006, 08:58AM
Location: Australia
Posts: 549
Ken Aycock wrote ...

Does each hex pair correspond to one assembly instruction? I've never really understood how it works after you compile...
Unfortunately it's more complicated than that. Each two digit hex number is a byte. Some commands are single byte, some are two, some are three and so on.

Give me a little time and I'll come up with my own response.

If you want to learn assembler, this is a good tute. Years back I learnt asm from that. Wow, that feels like a long time ago...
Back to top
...
Thu Nov 02 2006, 01:03AM
... Registered Member #56 Joined: Thu Feb 09 2006, 05:02AM
Location: Southern Califorina, USA
Posts: 2445
One interisting thing to note is that if you run this under winxp it takes 740k or ram tongue

I was somwhat suprised at how good it looked considering that it was being upscaled to 1400x1050, just the strait command prompt looks like crap wink

Now if I only had something arround that this would be usefull on... Not old enough ;)

I wonder how long it will be before we are writing code in C bragging about how you can run it on a 1ghz p4 with 256mb of ram 100mb of disk space, and a video card with 128mb of....
Back to top
Bjørn
Thu Nov 02 2006, 02:27AM
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
I also noticed that you can change the colors by messing with the line 'FEC375F6'. For instance, try 'FEC275F6'. For some reason, this makes the program use 256-bit colors it looks like.
That change breaks the loop that generates the blue palette so the program runs with the standard DOS palette.
Back to top
Carbon_Rod
Fri Nov 03 2006, 03:49AM
Carbon_Rod Registered Member #65 Joined: Thu Feb 09 2006, 06:43AM
Location:
Posts: 1155
Nice Bjorn,
NT emulated dos will not show frame buffer blinking flags. However, if you run it full screen with this it will work.
rem Try this in a batch file:
%windir%\System32\CMD.EXE /C someapp

The classic prime number checker is a good exercise in ASM. You may find inline assembly inside C is often faster than linked ASM objects with the identical code or optimized C. A rather bizarre phenomena caused by virus scanners and Microsoft’s linker.

Here is a very old 5KB piano demonstrating IRQ chaining in the XP Virtual DOS window (file parser increases the size, no error handling, and not optimized.)

Cheers,





]1162525783_65_FT17490_lab.zip[/file]
Back to top

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.