The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Assembly question
#27
yes that is what I need for sprites,

but I am trying to do some scrolling

got it to work Big Grin
Code:
function FASTCALL drawthis() as ubyte asm LD HL,16384 LD BC,8 ;LD A,3 ;RRC A ;RRC A ;RRC A OR 7 LD L,A drawblokes: LD A,255 LD (HL),A INC H DEC BC LD (blockiter),BC LD BC,(delayiter) wait1: dec BC ld a,B or C jr nz, wait1 LD BC,(blockiter) LD A, B OR C JP NZ,drawblokes LD BC,8 LD (blockiter),BC LD A,31 LD (screenwidthiter),A LD A,7 LD (screenheightiter),A LD HL,6000 LD (scrolliter),HL LD DE,(scrolliter) LD HL,16384 scroll: DEC DE LD BC,(delayiter) wait2: dec BC ld a,B or C jr nz, wait2 LD B,(screenwidthiter) ;LD C,(screenheightiter) screenhori: LD L,B ;shift graphic LD A,(HL) RLA LD (HL),A DEC B LD A,B jr nz,screenhori LD DE,(scrolliter) LD A, D OR E jp nz,scroll end asm end function drawthis() Print "done" STOP ASM blockiter: defw 8 delayiter: defw 60000 screenwidthiter: defb 31 screenheightiter: defb 23 scrolliter: defw 10000 end asm

I slowed it down intentionally so you can see whats going on
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)