flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
vid
At least i found some time to release this somewhat old thingy.
Sources are included so you can maybe learn few tricks from that. have fun and spread it over the world ![]() [edit] This was originally Para513. It was changed to Para512 after optimization idea by ATV
Last edited by vid on 24 Oct 2006, 13:54; edited 1 time in total |
|||||||||||
![]() |
|
f0dder
Hehe - it needs to be ONE byte smaller though
![]() |
|||
![]() |
|
vid
no it doesn't!
read the docs and comments in source code ![]() ![]() |
|||
![]() |
|
ATV
Very easy 2 bytes remove
Move end_objects: (lines 484-490) before line 323 then one jnb 32bit -> jb 8bit Then it have 511 bytes |
|||
![]() |
|
vid
great, why didn't i think about it?
![]() so i am migrating to Para512 ![]() |
|||
![]() |
|
rugxulo
One quick comment: the above .ZIP is made by which compressor? I'm just curious as to why the compressed size of the .COM is 516 bytes (uses Deflate even though Stored would be better!).
In other words, Info-Zip would compress smaller. |
|||
![]() |
|
vid
Total Commander builtin ZIP
|
|||
![]() |
|
sylwek32
hey vid, maybe you should publish it to pouet.net ?
|
|||
![]() |
|
vid
it's public domain, feel free to send anywhere for me. i don't know many sites on this
|
|||
![]() |
|
sylwek32
I have published it at
http://pouet.net/prod.php?which=26868 |
|||
![]() |
|
vid
thx
|
|||
![]() |
|
sylwek32
no problem..
I am currently working on a 32byte program in fasm.. Maybe you can help me.. ![]() |
|||
![]() |
|
vid
just post your question(s)
|
|||
![]() |
|
vid
"mov [es:di],al" -> stosb
why do you call int 21h/ah=10/dx=" " ??? |
|||
![]() |
|
ATV
Second look of paratrooper
Code: line 97 save 1 byte inc al -> inc ax line 152- movzx dx,byte [bp + angletab-BPVAL + si] shld bx,dx,12 ;BL = high 4 bits (y gun size) and dl,0Fh ;DL = low 4 bits (x gun size), DH=0 (counter of y overlap) mov bh,bl ;BH = y size (counter of Y loops) new 152- save 2 bytes mov al,byte [bp + angletab-BPVAL + si] aam 10h movzx dx,al ;DL = low 4 bits (x gun size), DH=0 (counter of y overlap) xchg ax,bx ;BH = y size (counter of Y loops) mov bl,bh ;BL = high 4 bits (y gun size) line 215- mov al,ah cbw ;------------------------------------------------------------------ ;ESC dec ax jz exit ;----------------------------------------------------------------- ;check left key mov cl,byte [bp+dir-BPVAL] sub al,4Bh-1 jz change_gun_angle new 216- save 3 bytes (and uses keys j,k,l = works also in laptop) cbw ;------------------------------------------------------------------ ;ESC cmp al,27 jnz dont_exit ;expensive 4byte jz removed ret dont_exit: ;----------------------------------------------------------------- ;check left key mov cl,byte [bp+dir-BPVAL] sub al,'k'-1 jz change_gun_angle lines 358,360,364,366,505 mov can be replace with xchg (save 5 bytes) total 512-11=501 bytes (soon there is room for score handling) |
|||
![]() |
|
vid
about first: i knew i shold study "AAM", it is used in every optimizing compo. i was just too lazy
![]() second: matter of taste, i wanted not to affect playability xchg ax: great idea! seems you've done some optimizations before ![]() |
|||
![]() |
|
vid
so, i tried your tricks, work well. By the way, moving to JKL only saves one byte, so i will keep numeric arrow keys for now, until that one byte is strongly needed.
thx for interest. do you have any idea HOW could the score work? There could be end-after-4-parachutist-on-ground, similar to original. |
|||
![]() |
|
ATV
Tetris like game in Hugi Compo 22
http://www.hugi.scene.org/compo/compoold.htm#compo22 has score handling, maybe little over 20 bytes. |
|||
![]() |
|
sylwek32
vid:
why do you call int 21h/ah=10/dx=" " ??? it was dx=" x" i forgot to write a x behind of that Code: org 100h ; .COM + 0 Byte MOV AL, 13H ; + 2 Bytes INT 10H ; + 2 Bytes UX: ; INC BYTE [2] ; + 4 Bytes MOV DX, " x" ; + 3 Bytes MOV AH, 10H ; + 2 Bytes INT 21H ; + 2 Bytes LES BP, [BX] ; + 2 Bytes PUSH DI ; + 1 Byte ADD DI, CX ; + 2 Bytes MOV AL, BYTE [2] ; + 3 Bytes ;MOV [ES:DI], AL ; + 3 Bytes stosb ; /Upper Line/ + 1 Byte POP CX ; + 1 Byte ADD DX,DI ; + 2 Bytes JMP UX ; + 2 Bytes Is current code.. Last edited by sylwek32 on 26 Oct 2006, 11:23; edited 2 times in total |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.