🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #1535

This EGA blit don't work

#1535
From: Baylor
Date: Tue, 15 Dec 1992 01:55
47 lines
1793 bytes
	This is my very first attempt at EGA programming, and as
expected, my program doesn't work. Problem is that doing it under
Borland's IDE makes it hard to debug because graphics programs are
imposibble to trace.
	This is supposed to take an array 1..128 of byte representing
an icon 16x16, always byte aligned. It is divided into 4 32-byte planes,
each plane either solid $ff or solid $00, meaning it's a solid bar
icon that should show SOME color (hopefully light green, 1010, and
i've also tried white, which means the whole array is FFh).
	This routine takes a blank screen in mode 0D (320x200x16)
and unfortunately just keeps the screen blank. At least the machine
doesn't completely freeze like normal *8-)


(---------------------- EGA LOOP ------------------)
          push ds
          push es

          mov CurrentPlane,0
   @@Plane_Loop:
          xor di,di
          mov di,0
          mov ax,Screen_Offset
          mov es,ax
          lds si,Pic

          mov dx,Sequencer_Index
          mov al,Color_Plane_Index
          out dx,al
          inc dx
          mov al,CurrentPlane
          out dx,al

   @@Height_Loop:
          mov cx,16

   @@Width_Loop:
              movsw
              add di,318
          loop @@Width_Loop
          shl CurrentPlane,1
          cmp CurrentPlane,3
          jle @@Plane_Loop

          pop es
          pop ds
Technical Details
Message-ID: <85360@ut-emx.uucp>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!ut-emx!ccwf.cc.utexas.edu

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!ut-emx!ccwf.cc.utexas.edu
From: baylor@ccwf.cc.utexas.edu (Baylor)
Newsgroups: rec.games.programmer
Subject: This EGA blit don't work
Message-ID: <85360@ut-emx.uucp>
Date: 15 Dec 92 01:55:28 GMT
Sender: news@ut-emx.uucp
Organization: The University of Texas at Austin, Austin TX
Lines: 47