First commit

This commit is contained in:
Alberto Venturini 2014-01-27 10:02:18 +01:00
commit 7d6d50e432
50 changed files with 5737 additions and 0 deletions

BIN
PROGRAMS/FIRE/ELINK.EXE Normal file

Binary file not shown.

53
PROGRAMS/FIRE/GRAPH32.ASM Normal file
View file

@ -0,0 +1,53 @@
.386
Code segment
assume cs:Code
Main proc
mov ah,03h
mov dx,64
int 2fh
xor ax,ax
mov es,ax
mov ax,0401h
mov cx,32768
push edi
Main1:
mov es:[edi],ax
add edi,2
loop Main1
pop edi
mov ax,0013h
int 10h
mov esi,0a0000h
mov cx,32768
Main2:
mov ax,es:[edi]
mov es:[esi],ax
add edi,2
add esi,2
loop Main2
mov ah,00h
int 25h
mov ax,0003h
int 10h
mov ah,02h
mov bl,0
int 20h
Main endp
Code ends
end

BIN
PROGRAMS/FIRE/GRAPH32.BIN Normal file

Binary file not shown.

191
PROGRAMS/FIRE/MYFIRE.ASM Normal file
View file

@ -0,0 +1,191 @@
;Fire effect for NXOS
org 0h
main:
mov al,13h
int 10h
xor cx,cx
p1:
mov ah,cl
mov bh,cl
shr bh,2
call setpal
inc cx
cmp cx,11
jne p1
p2:
mov ah,cl
mov bh,4
call setpal
inc cx
cmp cx,21
jne p2
p3:
mov ah,cl
mov bl,cl
sub bl,20
mov bh,4
call setpal
inc cx
cmp cx,64
jne p3
p4:
mov ah,63
mov bl,cl
sub bl,20
mov bh,2
call setpal
inc cx
cmp cx,84
jne p4
p5:
mov bl,63
xor bh,bh
call setpal
inc cx
cmp cx,101
jne p5
p6:
mov bh,63
call setpal
inc cl
test cl,cl
jne p6
setseg:
; mov ax,8000h ;some free memory...somewhere...
; mov es,ax
; mov cx,32000 ;let's free this mem!
mov dx,64 ;allocate memory
mov ah,00h
int 23h
xor di,di
mov ch,7dh
xor ax,ax
rep stosw ;free it
push es
pop ds
mov ax,0a000h
mov es,ax
l0:
mov cx,220
l1:
push cx
mov bx,320
call random
pop cx
l2:
add ax,64320
mov si,ax
mov al,255
mov ds:[si],al
dec cx
jnz l1
xor si,si
fireup: ;the fire algorythm
xor ax,ax
; cwd
xor dx,dx ;xor is faster...
mov al,byte ptr ds:[si-640]
add dx,ax
mov al,byte ptr ds:[si-1]
add dx,ax
mov al,byte ptr ds:[si+1]
add dx,ax
mov al,byte ptr ds:[si+320]
add dx,ax
shr dx,2
mov byte ptr ds:[si-320],dl
mov byte ptr ds:[si-640],dl
inc si
jnz fireup
mov cx,((64000-960)/2)
f1:
mov ax,word ptr ds:[si]
mov word ptr es:[si],ax
add si,2
dec cx
jnz f1
mov ah,11h
int 16h
jz l0
mov ah,00h
int 16h
mov ah,01h
mov dx,64
push ds
pop es
int 23h
mov ax,0003h
int 10h
mov ah,02h
mov bl,0
int 20h
;------------------------------------------------------------------------------
setpal:
;input cl=color
;ah=red
;bl=green
;bh=blu
mov dx,3c8h
mov al,cl
out dx,al
inc dx
mov al,ah
out dx,al
mov al,bl
out dx,al
mov al,bh
out dx,al
ret
;------------------------------------------------------------------------------
random:
;input BX=max num
push es
xor ax,ax
mov es,ax
mov ax,cs:cont
mov cx,cs:a1
mov dx,cs:a2
add ax,dx
add cx,es:[3083]
sub dx,es:[3083]
add dx,cx
mov cs:cont,ax
mov cs:a1,cx
mov cs:a2,dx
and ax,11111111111b
l1_r:
cmp ax,bx
jbe fine_r
sub ax,bx
jmp l1_r
fine_r:
pop es
ret
;------------------------------------------------------------------------------
a1 dw 10001
a2 dw 101
cont dw 23923

BIN
PROGRAMS/FIRE/MYFIRE.BIN Normal file

Binary file not shown.

BIN
PROGRAMS/FIRE/MYFIRE.SYM Normal file

Binary file not shown.

229
PROGRAMS/FIRE/MYFIRE32.ASM Normal file
View file

@ -0,0 +1,229 @@
.386
;Fire effect for NXOS
Code segment
assume cs:Code
org 0h
main proc
mov al,13h
int 10h
xor cx,cx
p1:
mov ah,cl
mov bh,cl
shr bh,2
call setpal
inc cx
cmp cx,11
jne p1
p2:
mov ah,cl
mov bh,4
call setpal
inc cx
cmp cx,21
jne p2
p3:
mov ah,cl
mov bl,cl
sub bl,20
mov bh,4
call setpal
inc cx
cmp cx,64
jne p3
p4:
mov ah,63
mov bl,cl
sub bl,20
mov bh,2
call setpal
inc cx
cmp cx,84
jne p4
p5:
mov bl,63
xor bh,bh
call setpal
inc cx
cmp cx,101
jne p5
p6:
mov bh,63
call setpal
inc cl
test cl,cl
jne p6
setseg:
; mov ax,8000h ;some free memory...somewhere...
; mov es,ax
; mov cx,32000 ;let's free this mem!
; mov dx,64 ;allocate memory
; mov ah,00h
; int 23h
mov ah,03h
mov dx,64
int 2fh
; xor di,di
;
; mov ch,7dh
; xor ax,ax
; rep stosw ;free it
; push es
; pop ds
mov cs:[BaseOfst],edi
xor ax,ax
mov es,ax
mov ds,ax
mov cx,32768
freemem1:
mov es:[edi],ax
add edi,2
loop freemem1
mov ax,0a000h
mov es,ax
xor eax,eax
l0:
mov esi,cs:[BaseOfst]
xor edi,edi
mov cx,220
l1:
push cx
mov bx,320
call random
pop cx
l2:
add ax,64320
; mov esi,eax
push esi
add esi,eax
mov al,255
mov ds:[esi],al
pop esi
dec cx
jnz l1
xor esi,esi
fireup: ;the fire algorythm
xor ax,ax
; cwd
xor dx,dx ;xor is faster...
mov al,byte ptr ds:[esi-640]
add dx,ax
mov al,byte ptr ds:[esi-1]
add dx,ax
mov al,byte ptr ds:[esi+1]
add dx,ax
mov al,byte ptr ds:[esi+320]
add dx,ax
shr dx,2
mov byte ptr ds:[esi-320],dl
mov byte ptr ds:[esi-640],dl
inc esi
jnz fireup
mov cx,((64000-960)/2)
f1:
mov ax,word ptr ds:[esi]
mov word ptr es:[di],ax
add esi,2
add di,2
dec cx
jnz f1
mov ah,11h
int 16h
jz l0
mov ah,00h
int 16h
; mov ah,01h
; mov dx,64
; push ds
; pop es
; int 23h
mov ax,0003h
int 10h
mov ah,02h
mov bl,0
int 20h
main endp
;------------------------------------------------------------------------------
setpal:
;input cl=color
;ah=red
;bl=green
;bh=blu
mov dx,3c8h
mov al,cl
out dx,al
inc dx
mov al,ah
out dx,al
mov al,bl
out dx,al
mov al,bh
out dx,al
ret
;------------------------------------------------------------------------------
random:
;input BX=max num
push es
xor ax,ax
mov es,ax
mov ax,cs:cont
mov cx,cs:a1
mov dx,cs:a2
add ax,dx
add cx,es:[3083]
sub dx,es:[3083]
add dx,cx
mov cs:cont,ax
mov cs:a1,cx
mov cs:a2,dx
and ax,11111111111b
l1_r:
cmp ax,bx
jbe fine_r
sub ax,bx
jmp l1_r
fine_r:
pop es
ret
;------------------------------------------------------------------------------
a1 dw 10001
a2 dw 101
cont dw 23923
BaseOfst dd ?
code ends
end

BIN
PROGRAMS/FIRE/MYFIRE32.BIN Normal file

Binary file not shown.

BIN
PROGRAMS/FIRE/graph32.OBJ Normal file

Binary file not shown.

BIN
PROGRAMS/FIRE/myfire32.OBJ Normal file

Binary file not shown.