mirror of
https://github.com/daniel-e/tetros.git
synced 2025-04-19 08:28:06 +02:00
update
This commit is contained in:
parent
19fc07bd76
commit
2b8a0cdfc3
1 changed files with 21 additions and 0 deletions
21
code.asm
21
code.asm
|
@ -8,6 +8,7 @@
|
|||
|
||||
; TODO position in memory
|
||||
; TODO current brick in memory
|
||||
; TODO highscore (persist on disc)
|
||||
|
||||
org 7c00h
|
||||
|
||||
|
@ -304,10 +305,30 @@ is_zero:
|
|||
|
||||
; ==============================================================================
|
||||
|
||||
; in : AX = brick pattern
|
||||
; out: BC = new brick pattern
|
||||
; ABCD DHLP
|
||||
; EFGH CGKO
|
||||
; IJKL BFJN
|
||||
; MNOP AEIM
|
||||
; in : AX = ABCD EFGH IJKL MNOP
|
||||
; out: BX = DHLP CGKO BFJN AEIM
|
||||
%macro rotate 0
|
||||
xor bx, bx
|
||||
mov dx, 0001000000000000b
|
||||
rr: push dx
|
||||
ww: test ax, dx
|
||||
jz qq
|
||||
inc bx
|
||||
qq: shl bx, 1
|
||||
shr dx, 4
|
||||
jnz ww
|
||||
pop dx
|
||||
shl dx, 1
|
||||
jnz rr
|
||||
%endmacro
|
||||
|
||||
|
||||
|
||||
bricks:
|
||||
; in AL in AH
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue