Copy Link
Add to Bookmark
Report

NULL mag Issue 09 22 Fire demo textmod

eZine's profile picture
Published in 
null magazine
 · 26 Dec 2020

this is a fire effect demo for text mode! compile it with turbo pascal 7 inside DOSBOX. remember to extract the FASTCRT unit, from this issue also, which is needed for the program to run.

the code is not mine, i found it in an old CDROM with various TP7 goodies i had and remember it again, while searching some old stuff.

the thing is, that after looking in the net, i found many more text mode demos, with AWESOME graphics and effects. i mean... it's unbelievable what those guys did in text mode, back then...

it's almost depressing that all these things (source code, demos) are lost in history and no one knows about them any more. very sad... :(

Program FireDemo; 
Uses fastcrt;
Var
i,x,y : Integer;
FirePos : Array[1..80,1..50] of Byte;
FireDiv : Real;
BEGIN { Main }
{ Randomizing Š Fire routine :) }
Randomize;

clrscr;
asm
mov ax, 1112h
xor bl, bl
int 10h
end;

{ Changing palette colors }
For i := 1 to 5 do
Begin
Port[$3c8] := i;
Port[$3c9] := i*11; Port[$3c9] := i*3; Port[$3c9] := 0;
End;
For i := 6 to 12 do
Begin
Port[$3c8] := i;
Port[$3c9] := i*5; Port[$3c9] := i*5; Port[$3c9] := 0;
End;

{ Calculating 1st 2 rows of the fire routine. }

{ Start of Routine }
While not KeyPressed do
Begin { while loop }
wait_retrace;
For y := 49 to 50 do
Begin { y }
For x := 5 to 75 do FirePos[x,y] := Random(8) + 5;
End;

For y := 50 downto 10 do
Begin { y }
For x := 10 to 70 do
begin { x }
i := Random(5) + 1;
Case i of
1: FirePos[x,y] := FirePos[x-1,y+1];
2: FirePos[x,y] := FirePos[x+1,y+1];
3: FirePos[x,y] := FirePos[x,y+1];
4: FirePos[x,y] := FirePos[x,y];
ELSE
begin { else }
FireDiv := Int((FirePos[x+1,y] + FirePos[x-1,y] +
FirePos[x,y+1] ) / 3.1) ;
FirePos[x,y] := Round(FireDiv);
end; { else }
end; { case }
{Mem [$a000:x+(y*320)]:=FirePos[x,y];}
fastout(x,y,chr(219),FirePos[x,y]);
end; { x }
end; { y }
End; { While loop }

{ Set Text mode 3}
asm
mov ax,0003h
int 10h
End;

END. { Main }

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT