flat assembler
Message board for the users of flat assembler.

Index > DOS > 17 byte demo!

Goto page Previous  1, 2, 3
Author
Thread Post new topic Reply to topic
bitshifter



Joined: 04 Dec 2007
Posts: 764
Location: Massachusetts, USA
bitshifter
asmdemon wrote:
Here is my compo entry for EFnet's ASM compo #9. Very similar program. The actual entry, hell, won that competition. I modified it one day to include exit on keypress.

Hello asmdemon
Funny that you should mention this.
Indeed your HELL demo was my inspiration for this cool micro.
I figured i could slim it down a bunch while using the same render algo.

_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 23 Apr 2009, 23:45
View user's profile Send private message Reply with quote
catafest



Joined: 05 Aug 2010
Posts: 120
catafest
Code:
use16
org 0x100
mov ah,0x00
mov ax,0x13 
int 0x10 
push word 0xA000
mov es, ax
mov ax,0
mov di,ax
mov dl,16
mov[es:di],dl
pop es 
paint: 
add cx,ax
stosd
loop paint
inc ax
jmp paint
mov ax,3
int 10h      

what do think about that ? Smile
Post 16 Jan 2011, 16:53
View user's profile Send private message Visit poster's website Yahoo Messenger Reply with quote
Coty



Joined: 17 May 2010
Posts: 546
Location: ␀
Coty
Nice Very Happy

[EDIT2] 20 bytes Very Happy
Code:
  use16
  org  0x100
  mov  ax, 0x13
  int  0x10
  push word 0xA000
  xor  di, di
  pop  es
paint:
    add  cx, ax
    .loop:
      stosd
      loop .loop
    inc  ax
    jmp  paint         
    


I honestly like it more with stosw instead of stosd, witch makes it 19 bytes, but it does not look the same as the lines are not as well spaced.

[EDIT3] Just realized that you can remove "xor di, di" and it will compile to 17bytes and still work under winXP... Witch makes it a 17byte demo...

[EDIT4] If you follow this trick here: http://board.flatassembler.net/topic.php?p=81875#81875

You can get it to 15 bytes and still working...
Code:
  use16
  org  0x100
  mov  ax, 0x0013
  int  0x10
  les  ax, [bx]     ; Trick I stoll from this thread...
paint:
    add  cx, ax
    .loop:
      stosw
      loop .loop
    inc  ax
    jmp  paint      

OK ... I'm done...
Post 16 Jan 2011, 18:20
View user's profile Send private message Send e-mail Visit poster's website AIM Address Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 764
Location: Massachusetts, USA
bitshifter
Assuming regs are zero'ed at startup, yes.
Just be sure to warn people of this...
Post 17 Jan 2011, 04:33
View user's profile Send private message Reply with quote
16bitPM



Joined: 08 Jul 2011
Posts: 28
16bitPM
catafest wrote:
Code:
use16
org 0x100
mov ah,0x00
mov ax,0x13 
int 0x10 
push word 0xA000
mov es, ax
mov ax,0
mov di,ax
mov dl,16
mov[es:di],dl
pop es 
paint: 
add cx,ax
stosd
loop paint
inc ax
jmp paint
mov ax,3
int 10h      

what do think about that ? Smile


Errr?

Why the first mov ah,0?

Why do you write to an unused area of the interrupt vector table?
(ax = 13 ; ax → es ; di=0 so address 130h ?!?)
So on my computer you change INT vector 4C from F000:1060 to F000:1016 Rolling Eyes

Why the exit code after jmp which is never reached?
Post 29 Mar 2012, 19:28
View user's profile Send private message Reply with quote
16bitPM



Joined: 08 Jul 2011
Posts: 28
16bitPM
Same code with palette reprogramming, in 28 bytes:

Code:
mov al,13
int 10
mov dx,03c8h
mov al,0
out dx,al
inc dx
loop1: out dx,al
out dx,al
out dx,al
inc al
jnz loop1
les bx,[bx]
adc ax,cx
stosb
loop 114
inc ax
jmp 114 
    
Post 07 Apr 2012, 20:44
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1288
Location: behind the arc
Picnic
I found these two 32byte demos on frag's blog.
Take a look.

Moss
Oil
Post 27 Aug 2012, 13:40
View user's profile Send private message Reply with quote
freecrac



Joined: 19 Oct 2011
Posts: 117
Location: Germany Hamburg
freecrac
neville wrote:
Can anybody write a paged VESA version of my linear VESA code above in less than 66 bytes? I don't expect it to run faster, just smaller code :!:


Example for to set the page with a "call far"-instruction to the vesa routine:
Code:
          mov      eax, DWORD PTR[di+0Ch] ; make sure that DS:DI points to the modeinfobuffer before
     and      eax, eax
   jz  ERROR
   mov     DWORD PTR cs:[PAGESET], eax
;--------------------------------------


;--------------------------------------
       cmp      dx, bp               ; compare pagenumbers
         jz  short NOSET               ; same pagenumber?
    xor      bx, bx
     mov      bp, dx               ; save the actual number of the page
;--------------------------
          DB 9Ah                        ; CALL FAR: SETPAGE
PAGESET   DD ?
;--------------------------
NOSET:                                  ; Now we can draw our pixel

    


Dirk
Post 29 Aug 2012, 05:35
View user's profile Send private message Send e-mail Reply with quote
Lucy Berie



Joined: 08 Dec 2012
Posts: 13
Lucy Berie
Hey, I have a funny code (Modified a bit)
Code:
org 100h

 mov al,13h
 int 10h
 les ax,[bx]
paint:
 sbb ax,di
 stosb
 add di,3
 jmp paint
    


(Trying implementing some basic assembly calculation commands...) Wink

Or :
Code:
org 100h

 mov al,13h
 int 10h
 les ax,[bx]
paint:
 sbb ax,di
 stosb
 add di,5
 jmp paint
    


Code:
org 100h

 mov al,13h
 int 10h
 les ax,[bx]
paint:
 sbb ax,di
 stosb
 add di,7
 jmp paint
    



Looks much nicer... Very Happy

Ok,
Code:
 
mov al,13h 
int 10h
    

I think these code are used to call graphics...

Code:
 les ax,[bx]
......................
 sbb ax,di
 stosb
    


I don't really understand this...
Post 09 Dec 2012, 03:01
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.