Ok so you want sprites in your gameboy game/demo. You've got a DMA routine, you know how it works. What you don't know is what is the quickest, best way to copy it into HRAM at $FF80. That's where document comes in. I'm going to teach you how to use a routine that will allow you to easily copy data to ram. and this isn't only good for copying your DMA routine, you can use it to copy tile data and other bits of assorted code into ram, easily. the first thing you do is you put the following routine at $0028, like this: SECTION "COPY DATA",home[$0028] POP HL PUSH BC LD A,[HLI] LD B,A LD A,[HLI] LD C,A copydataloop: LD A,[HLI] LD [DE],A INC DE DEC BC LD A,B OR C JR NZ, copydataloop POP BC JP [HL] The reason we put it at $0028 is because it's a reset code. which means you only need one byte to call the code that's there, as opposed to the 3 bytes you use in a normal call. I'll explain this code a little later, but for now I will show you how to use it. We'll create a new file called "DMA.INC". in this file you put this: DMACOPY: LD DE, $FF80 ;$FF80 is where we want to copy this data RST $28 ;Call the copy routine DB $00, $0D ;the amount of bytes we want to copy, ;represented in a 16 bit unsigned integer. ;And now the data. This is a DMA routine. ;Hand assembled. It copies data from $C100 DB $F5, $3E, $C1, $EA, $46, $FF, $3E, $28, $3D, $20, $FD, $F1, $D9 RET now save this file, and include it in your main file. then when you want to copy the DMA routine to $FF80, CALL DMACOPY simple huh? ok now let's explore how the routine itself works. POP HL ;when you call RST $28, it pushes the address of the ;byte immediately following it, onto the stack. ;this instruction stores that address into HL PUSH BC ;(preserve BC) LD A,[HLI] ;This copies the byte at that address into B LD B,A ;which is the MSB of the amount of bytes we want to LD A,[HLI] ;copy. Then this copies the LSB into C. LD C,A ;Now HL should point at the first byte of our data copydataloop: LD A,[HLI] ;Copy that byte into a LD [DE],A ;then copy a to the address contained in DE ($FF80) INC DE ;Increment the address in DE. DEC BC ;One byte down, BC to go LD A,B ;then OR B and C together OR C ;to find out if BC = 0 JR NZ, copydataloop ;if it isn't, copy another byte POP BC ;(restore BC) JP [HL] ;Jump to the byte after the data, which is a RET Pretty clever eh? If you have any questions or comments, E-mail me at ZenPsycho@yahoo.com