Author Topic: colours in mode 13h  (Read 14371 times)

0 Members and 1 Guest are viewing this topic.

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: colours in mode 13h
« Reply #20 on: February 15, 2007 »
That's right, under VGA/MCGA you only have 6bit colour guns, so 262144 colours instead of the present day 16.7million.  Means there are only 64 shades of red.

Jim
Challenge Trophies Won:

Offline Clanky

  • Laser Guided Memories
  • Amiga 1200
  • ****
  • Posts: 340
  • Karma: 16
  • kiss that sound that pounds your senses
    • View Profile
Re: colours in mode 13h
« Reply #21 on: March 14, 2007 »
Wow! What's ASM!?
Seem's like an impossible language eeeeee  ???
Don't think I'll be starting this one! lol
He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: colours in mode 13h
« Reply #22 on: March 14, 2007 »
Assembler - mostly the code posted here is Intel x86 assembler, which is written in mnemonics (assembler instructions) and assembled directly to machine code.  There's no high level language stuff, just the basic instructions for moving data around, processing it, and access directly to the CPU registers.  It's a lot of fun, and every CPU from every manufacturer is different!

Jim
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: colours in mode 13h
« Reply #23 on: March 14, 2007 »
Clanky, if you want to see what can be done in asm, go over to intro-inferno and search for productions from a group called wamma
There's a guy called Yobi who codes some of the most amazing low byte stuff you've ever seen! Honestly, you would not believe the effects you can do in 256 bytes!!
Typically asm instruction sets are not so bad to learn, for a start, there are far fewer commands to worry about and on the pc, you just use them to do the stuff that jim says.. You can also invoke interrupts to open screens etc..

Code: [Select]
mov al,13h <-- That just puts the desired gfx mode into the register al
int 10h <-- Initialise the video mode

There are several registers, you can think of them like variables, and you can store memory addresses in them or data and perform operations on that data exactly the same as you would in basic, only the command set is different.

Assembly language was developed a long time ago to help programmers write programs for the first computers.. Originally all programs were written in binary on punch cards, assembly language (because of it's limited command list and simple commands) is very easily translatable into machine code that the computer understands. It's cool to use, very powerful and produces extremely efficient programs!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Agent Smith

  • ZX 81
  • *
  • Posts: 24
  • Karma: 3
    • View Profile
Re: colours in mode 13h
« Reply #24 on: March 14, 2007 »
Out of curiosity, why do you guys still use 16-bit real mode (with BIOS interrupts etc) for your assembly language stuff?  ???

Is it just because it's easier, or because of like the 'retro' appeal?

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: colours in mode 13h
« Reply #25 on: March 14, 2007 »
Because mode 13 is the best mode for 256 colour tiny intros. You can make intros that are even smaller than 256 bytes, sometimes there are even 64 byte or 32 byte intros released.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: colours in mode 13h
« Reply #26 on: March 14, 2007 »
Also 16-bit x86 (DOS) assembler is the most documented form of assembler so its a good variant to cut your teeth on MASM32 and other 32 bit assemblers expect that the programmer is not new to the language and so the basics are not covered in a way that suits learnin the stuff with no experience. And you can thank Ralf Brown for making 16-bit DOS so accessable to the masses

Challenge Trophies Won:

Offline Agent Smith

  • ZX 81
  • *
  • Posts: 24
  • Karma: 3
    • View Profile
Re: colours in mode 13h
« Reply #27 on: March 15, 2007 »
Thanks. I see, so it's all about optimizing for size over speed. I'd never actually heard of Ralf Brown until I just googled  :-\
But is there an actual requirement for such micro-sized executables, or is it just about the hacker kudos to see who can shave off maximum bytes?

I mean, I could understand it if the target platform had only a couple of k of RAM installed, but for a modern PC with a couple of G's and a 32/64-bit OS?   ???
Please forgive my ignorance about the demo/intro scene - and don't get me wrong, I'm not trying to knock it or anything. I really admire what you guys do, just tryin' to understand the motivation behind it.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: colours in mode 13h
« Reply #28 on: March 15, 2007 »
Here's some research for you :)

WAMMA

These are all 256b dos intros in pure assembler using 13h. (some of them you may have to quit using alt and tab as the coder tries to squeeze as much into 256b as possible), this is a demo making forum, not a games place so it's understandable that games coders can have some trouble understanding the motivation.. But if you check out those intros by Wamma you will either get it or not.

For me, and most of the people here they are art.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: colours in mode 13h
« Reply #29 on: March 15, 2007 »
Whoops.

Just type wamma into the search box on the page that comes up :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Agent Smith

  • ZX 81
  • *
  • Posts: 24
  • Karma: 3
    • View Profile
Re: colours in mode 13h
« Reply #30 on: March 15, 2007 »
Thanks for the link, and also for taking the time to enlighten this ignorant peasant - yes, the penny has dropped and I can certainly relate to the 'minimalist art' thing. In one sense this is programming in it's purest form.

I have to confess that I previously visited here solely out of interest in the general applicability of the programming techniques discussed, but you may have made a convert out of me  ;)

Time to dust off my old DOS-era assembly skills and have a crack at some of this good stuff myself!  :)
« Last Edit: March 15, 2007 by Agent Smith »

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: colours in mode 13h
« Reply #31 on: March 15, 2007 »
Thats a mighty fine collection of tiny code there here is also a good site they deal exclusively in 256b and some 32b/64b

http://www.256b.com/home.php

Challenge Trophies Won: