0 Members and 1 Guest are viewing this topic.
Rect(X,22-E,1,E*2+1)
Axe:X:asm(E5) ;push hl:^8:asm(23E5) ;inc hl, push hl (gets the number of rotating cycles needed):E:asm(The routine)
Stack: #Rotation cycles, XHL : E pop bc ; #Rotation cycles , Stack: 1 pop de ; X Stack: 0 srl e ; Div 8 srl e srl e ; DE: X/8 ld a,l ; A: E add hl,hl ; 2E inc hl ; 2E+1 ld b,l ; B: 2E+1, #Lines push bc ; #Lines, #Rotation cycles , Stack: 1 ld b,a ; B: E ld a, 22 ; A: 22 sub b ; A: 22-E ld l,a ; HL: 22-E ld c,l ld b,h ; BC: 22-E MUL 12 add hl,hl ; *2 add hl,bc ; *3 add hl,hl ; *6 add hl,hl ; *12 add hl,de ; HL: (22-E)*12+(X/8) ld de, $9340 ; plotsscreen add hl,de ; HL: Start byte pop bc ; #Lines, #Rotation cycles , Stack: 0Lineloop: ld d,b ; backup b ld b,c ; #Rotation cycles ld a,(hl) ; A: Byte to modifySloop1: rla ; rotate djnz Sloop1 scf ; Pixel on ld b,c ; #Rotation cyclesSloop2: rra ; rotate back djnz Sloop2 ld (hl),a ; restore modified byte ld b,d ; Restore b ld de,12 ; DE: 12 add hl,de ; Next line djnz Lineloop ; until #Lines-- = 0