Tutorial #8

Tutorial #8

2-18-99

PCX Files into ASM Files

In this tutorial you will learn how to make PCX Picture files turn into ASM files for your calc. This tutorial is small and non-complex because you learned a lot in the last one... This should balance it out a little. First you will need 2 things... Neopaint by Neosoft. And Pic83 by Bill Nagel. You can get Neopaint at http://www.neosoftware.com and you can get Pic83 from http://www.ti-files.org. Now go into Neopaint and create a new picture, set the size to 96x64 then set the colors to 2. Then draw your image, then set the colors to 256 then save it as an pcx file. Then open Pic83 and type "Pic83 pic-name.pcx pic-name.asm" and then look in that directory for the asm file you just created and it should be a whole bunch of numbers...Save them for a minute and Type this code:

...CODE THAT BEGINS IN EVERY ASM PROG...
	ld hl,pic	;Loads pic into hl
	ld de,plotsscreen	;loads the plotsscreen into de
	ld bc,768		;bytes to copy
	ldir			;copys bytes to buffer
	call _grbufcpy_v	;copys to graph buffer
	call _getkey		;waits until you press a key
	ret			;returns to what it was doing
pic:
paste the code that is in the asm file you just created using pic83 here.
.end				;ends the program
END				;need for TASM

Thats about it...This is GREAT for creating backrounds for game, or just for fooling around.... _grbufcpy_v copies the plotscreen to the graph buffer and ldir copies the amount of bytes that you specified the line above it. Those are the only things you didn't know. If you have any questions e-mail me.

(KSA)Tekken (uncool3@juno.com)