flat assembler
Message board for the users of flat assembler.

Index > DOS > Two VGA intros with sources

Author
Thread Post new topic Reply to topic
Grenhald



Joined: 23 May 2006
Posts: 1
Location: Poland
Grenhald
Hello !
I would like to present my 256b intros, for which source code is available.
There are two MS-Dos programs written in flat assembler - of course ;)

Boxes download

Image


Astroids 2 download

Image

I hope that they can be useful...

You can see others my productions here
Post 15 Oct 2006, 11:18
View user's profile Send private message Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32
great!
Are there some Demoscene tutorials for fasm?
I need a intro for my packer...
Post 15 Oct 2006, 13:08
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Grenhald, excellent work! Smile

P.S. It seems to work best if run in a brand new CMD.EXE window (tested on Win XP Home SP2). DOSbox 0.65 also seems to work (for Hypnodelic and Boxes, at least). Very Happy
Post 18 Oct 2006, 23:08
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Nice work Smile, work fine in MiniDOS. if you change this "push 09000h" to this "push 05000h" as minidos uses that address.
Post 19 Oct 2006, 01:33
View user's profile Send private message Reply with quote
rhyno_dagreat



Joined: 31 Jul 2006
Posts: 487
Location: Maryland, Unol Daleithiau
rhyno_dagreat
Dex, you should try to implement some of these programs into your OS, maybe gain your OS a bit more recognition with the DOS group. After all, it's DOS Extended 4 U. Wink
Post 19 Oct 2006, 02:49
View user's profile Send private message Reply with quote
Goplat



Joined: 15 Sep 2006
Posts: 181
Goplat
Dex4u: real DOS uses that address too, the paragraph at 9FFF0 is the head of the UMCB chain.
Post 19 Oct 2006, 04:21
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
@rhyno_dagreat, here is a quick convert (note: not tested ) to run on Dex4u OS
Code:
;;       Astroids 2 - The noise within;       256b intro by Grenhald/Asenses;;       www:    grenhald.unterground.net;       ;;       compiled with: fasm 1.66;       October 2006;;       Quick convert to Dex4u OS by Dex (note: have not tryed);       If this does not work blame me (Dex).;       Assemble:;       C:\Fasm Astroids.asm Astroids.dexuse32        ORG 0x400000          ; where our program is loaded to        jmp start             ; jump to the start of program.        db 'DEX1'             ; We check for this, to make shore it a valid Dex4u file.start:        mov ax,18h            ; set ax to nonlinear base        mov ds,ax             ; add them to ds        mov es,ax             ; and es. ;----------------------------------------------------; ; Get calltable address.                             ; ;----------------------------------------------------;        mov edi,Functions     ; this is the interrupt        mov al,0              ; we use to load the DexFunction.inc        mov ah,0x0a           ; with the address to dex4u functions.        int 40h ;----------------------------------------------------; ; Change to mode 13h.                                ; ;----------------------------------------------------;        mov ax,0x0013         ;Dex4u realmode int, set to mode 13h        call [RealModeInt10h]        ; es - screen        ; fs - pixel buf        mov     esi, star_x        mov     [ds:esi], word -2500        push   es        mov    ax,8h        mov    es,ax        xor    eax,eax        mov    ebx,eax        mov    edx,eax        mov    ecx,eax;---setup palette-----------------------------------------        xchg    eax, ebx        mov     dx, 03C8h        out     dx, al        inc     dxpalette_loop:        out     dx, al          ; gray scale        out     dx, al        out     dx, al        inc     ax        jnz     palette_loop                xchg    eax, ebp                ; bp:=0 main_loop:;---------------------------------------------------------; z = 50-0    ( -= 1 ); x = R*cos^3(a); y = R*sin^3(a); a = 0-2pi   ( += 2pi/200 ); R = 50*b^2; b = 0-2pi   ( += 2pi/50 )        mov     ebx, 50        fldz                    ; 0.b_loop:        mov     ecx, 200        fldz                    ; 0 b.a_loop:        ; R - here, bit slower but smaler                                ; a b        mov     [ds:esi+10], bx        fild    word [ds:esi+10]   ; z a b        fld     st2             ; b z a b        fmul    st, st          ; b*b z a b        fimul   word [ds:esi-8] ; 50*b^2 a b        fld     st2             ; a R z a b        fsincos                 ; cos sin R z a b        fld     st              ; cos cos sin R z a b        fmul    st, st          ; cos^2 cos sin R z a b        fmulp                   ; cos^3 sin R z a b        fmul    st, st2         ; R*cos^3 sin R z a b        fxch    st1             ; sin x R z a b        fld     st              ; sin sin x R z a b        fmul    st, st          ; sin^2 sin x R z a b        fmulp                   ; sin^3 x R z a b        fmulp   st2, st         ; x R*sin^3 z a b        fld     st2             ; z x y z a b        fld     st2             ; y z x y z a b        fld     st2             ; x y z x y z a b        mov     [ds:esi+4], word -75        call    star                                ; x y z a b        mov     [ds:esi+4], word -25        call    star                                ; a b        fadd    dword [ds:esi-16]       ; a+da b        loop    .a_loop        ffreep  st              ; b        fadd    dword [ds:esi-12]       ; b+db        dec     ebx        jnz     .b_loop        ; move        inc     word [ds:esi]        cmp     word [ds:esi], 5050        jne     draw        ; reset and change direction        mov     word [ds:esi], -2500        not     ebp;---draw blur and clear buf-------------------------------draw:        pushad        xor     edi, edi.blur:        mov     al, [ds:edi+Buffer]        add     al, [ds:edi+Buffer+1]        adc     ah, 0        add     al, [ds:edi+Buffer+320+1]        adc     ah, 0        mov     ebx, 160        test    byte [ds:esi+1], 2        jnz     .b2        shl     ebx, 1.b2:        add     al,byte [ds:edi+Buffer+ebx]        adc     ah, 0        shr     ax, 2        mov     [es:edi+0xA0000], al        mov     [ds:edi+Buffer], ah     ; 0        inc     di        jnz     .blur        popad;---key ESC-----------------------------------------------        call [KeyPressedNoWait]        cmp ax,1        jne main_loop                           ;Dex4u no keypress then loop        pop  es        call  [SetDex4uFonts]                   ;Dex4u set text mode        ret                                     ;Dex4u return contol to CLI;---render star point----------------------------------------star:                                ; x y z        fiadd   word [ds:esi]   ; x+star_x y z        fxch    st1             ; y x z        fiadd   word [ds:esi]   ; y+star_x x z        fxch    st2             ; z y x        fiadd   word [ds:esi+4] ; z+star_z y x        ;z  form [0; 100] to [0.5; 1]        fiadd   word [ds:esi-6] ; z+za y x        fidiv   word [ds:esi-4] ; (z+za)/zb y x        fmul    st2, st         ; per y x*per        fmulp                   ; y*per x*per        fiadd   word [ds:esi-6] ; y*per+100 x*per        fistp   word [ds:esi+8] ; x*per        fiadd   word [ds:esi-2] ; x*per+160        or      ebp, ebp        jz      .next        fchs                    ; -x.next:        fistp   word [ds:esi+6] ;        ; put pixel        mov     ax, [ds:esi+8]        mul     word [ds:esi-2]        shl     ax, 1        add     ax, [ds:esi+6]        xchg    edi, eax        mov     [ds:edi+Buffer], bl     ; z-shading        retd_a     dd      0.0314  ;-16d_b     dd      0.1256  ;-12r       dw      50      ;-8za      dw      100     ;-6zb      dw      200     ;-4sw      dw      160     ;-2star_x  dw      ?       ; sistar_y  dw      ?       ;+2star_z  dw      ?       ;+4xs      dw      ?       ;+6ys      dw      ?       ;+8tmp     dw      ?       ;+10include 'DexFunctions.inc'                      ;Dex4u function call tableBuffer:    

You will need the 'DexFunctions.inc' which is in the kernel32.zip from here:
http://www.dex4u.com/download.htm

PS: If you mind Grenhald, let me know and i will delete it.


Last edited by Dex4u on 23 Oct 2006, 16:59; edited 1 time in total
Post 19 Oct 2006, 21:36
View user's profile Send private message Reply with quote
rhyno_dagreat



Joined: 31 Jul 2006
Posts: 487
Location: Maryland, Unol Daleithiau
rhyno_dagreat
Dex4U - O_O Cooooool....
Post 20 Oct 2006, 03:03
View user's profile Send private message Reply with quote
Adam Kachwalla



Joined: 01 Apr 2006
Posts: 150
Adam Kachwalla
Doesn't like Windows Server "Longhorn"! ERROR: The system does not support Full-Screen Mode
Post 07 May 2007, 08:27
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Yes, Windows Vista is worse than XP (and x86-64 XP or Vista won't work at all). Try DOSBox or DOSEMU instead (or even a pure FreeDOS boot disk, see links below).

Eric Auer wrote:

Joris made a 8086 compatible variant -->
http://www.xs4all.nl/~rjoris/freedos.html
of the updated first diskette -->
http://www.bootablecd.de/test/ ( http://www.bootablecd.de/freedos/ )
of the three diskette distro -->
http://www.coli.uni-saarland.de/~eric/threediskettes-freedos10.zip


Also check out Balder at http://www.finnix.org/Balder (intended to
replace ODIN, whose beta9r2 version in various sizes can be gotten at
http://odin.fdos.org/odin2005/ ).
Post 24 May 2007, 05:58
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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 GitHub, YouTube, Twitter.

Website powered by rwasa.