Raster bar?

DOS specific questions.
Post Reply
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Raster bar?

Post by angros47 »

I have found this article:

http://www.hristogueorguiev.com/the-not ... s-example/

This is a rough attempt to port it to FreeBasic. On DosBox it doesn't seem to work. Anyone wants to try on a real DOS machine?

Code: Select all

#include "dos\dos.bi"

do
	do while(inp(&h3da) and 8):loop
	do until(inp(&h3da) and 8):loop

	for i as integer=1 to 20
		do while(inp(&h3da) and 1):loop
		do until(inp(&h3da) and 1):loop
	next
	out &h3c8, &h0
	out &h3c9, 100
	out &h3c9, 10
	out &h3c9, &h99
	delay(1)
	
	out &h3c8, &h0
	out &h3c9, &h00
	out &h3c9, &h00
	out &h3c9, &h00
	
loop until multikey (1)
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: Raster bar?

Post by angros47 »

Ok, I tried it on a machine with Windows XP: it works under the dos prompt (as long as it's used in full screen mode)

Code: Select all

#include "dos\dos.bi"

do
   do while(inp(&h3da) and 8):loop
   do until(inp(&h3da) and 8):loop

   for i as integer=1 to (150+150*sin(timer))
      do while(inp(&h3da) and 1):loop
      do until(inp(&h3da) and 1):loop
   next
   out &h3c8, &h0
   out &h3c9, 100
   out &h3c9, 10
   out &h3c9, &h99
'   delay(1)

   for i as integer=1 to 13
      do while(inp(&h3da) and 1):loop
      do until(inp(&h3da) and 1):loop
   next
   
   out &h3c8, &h0
   out &h3c9, &h00
   out &h3c9, &h00
   out &h3c9, &h00
   
loop until multikey (1)
This variant will make a raster bar that moves up and down. This trick is almost useless nowadays, but it was more important in the past (especially on the Amiga), to extend graphic capabilities
fatman2021
Posts: 215
Joined: Dec 14, 2013 0:43

Re: Raster bar?

Post by fatman2021 »

Also works in DOSBox-X(Text mode only, crashes in graphics mode)
Post Reply