Page 1 of 1

Storing screen data in ASM code ?

Posted: 16 Apr 2020 15:38
by exxos
Rather than load a picture from file to screen, does anyone know how to load this into a ASM routine as DATA and copy it to the screen ?

I can do this in basic,but it takes 8 seconds to poke a single pixel line to screen :(

Re: Storing screen data in ASM code ?

Posted: 16 Apr 2020 15:47
by thorsten.otto
Most assemblers have an INCBIN directive or similar. With this, you can include any binary file into the executable. From there, just copy it to screen.

Alternatively, you can write a simple tool that spits out "dc.b" directives, and include that.

Re: Storing screen data in ASM code ?

Posted: 16 Apr 2020 16:19
by stephen_usher
You mean something a like:

Code: Select all

		LEA #DATA_START, A0
		LEA #SCR_START, A1
		MOVE.L #SCR_SIZE_IN_LONGS, D0
Loop:		MOVE.L (A0)+,(A1)+
		DBNE D0, Loop
I'm trying to remember my M68K assembler from a long time ago.

Re: Storing screen data in ASM code ?

Posted: 16 Apr 2020 16:29
by thorsten.otto
Oh, almost forgot, there is also a nice tutorial made by Vincent,