| MagixFly | ||||||||
|---|---|---|---|---|---|---|---|---|
 
 | 
 
  | 
|||||||
  | 
 
popularity : 52% | 
|||||||
 alltime top: #36612   | 
 
  | 
|||||||
  | 
||||||||
| added on the 2025-04-23 15:35:18 by orac81  | 
||||||||
popularity helper
comments
Welcome to the playground:)
Youi might want to check 32 bytes versions of
Tilted scrolling plane effects
Platforms 32b
Floorcast 32b
  
Youi might want to check 32 bytes versions of
Tilted scrolling plane effects
Platforms 32b
Floorcast 32b
Welcome!
Here's how to make the code 51 bytes without changing very much how it works, just switching some registers:
  
Here's how to make the code 51 bytes without changing very much how it works, just switching some registers:
Code:
; es:di = pixel address, bx=time, bp=y, cx=x
OFFSETY equ 12
  org 100h
  mov al,19
  int 10h
  push 0A000h
  pop es
reloop:
  mov bp,OFFSETY
loopY:
  inc bp
  mov ax,0A00h
  cwd  ; dx=0 (ax=2560)
  div bp
  add ax,bx
  xchg ax,si
  mov cx,320
loopX:
   imul ax,cx,16
   cwd  ; dx=0 (ax<=5120)
   div bp
   xor ax,si
   add al,bh
   and al,31
   stosb
  test di,di
  loopnz loopX
  jnz loopY
; di=0 after the loop
  inc bx
  mov ah,1
  int 16h
  je reloop
  ret
smooth. and as they said: welcome to the playground!
  
Nice!
  
submit changes
if this prod is a fake, some info is false or the download link is broken,
do not post about it in the comments, it will get lost.
instead, click here !

---------------------------------------------------------------------------
Released as free/open software under the terms of the GNU GPL3 license.
See: www.gnu.org/licenses/gpl-3.0.html
This is an old-school DOS/VGA graphics demo program.
It gives the (classic) effect of flying over a changing landscape.
The x86 assembler source code (MAGIXFLY.ASM) is included, and there
are comments with suggestions for changes, if you want to experiment.
It can run on an 8086 (or later) PC with VGA under MSDOS/Freedos.
An FPU is not needed.
For modern PCs, it will run on Linux/Windows in DOSBOX, or other emulators.
To run, boot DOS and type:
MAGIXFLY.COM <ENTER>
Hit ESC to exit the demo. Type CLS or MODE 80 to return to 80 col display.
All variables held in registers, which makes the code smaller/faster.
AX,DX,SI are temp calc regs.
DS (data seg) points to VGA screen (A000h)
BX = Pixel position for plotting.
CX = time (frame count)
DI - Y position (for fx calc)
BP = X position (for fx calc)
It uses the open source NETWORK x86 assembler, NASM, but can easily be adapted to others.
Build with: NAS2COM magixfly
or NASM -f bin magixfly.asm -o magixfly.com
Also included on the TurboC folder is a C version compiled with
my TCTINY build util, the exe is only 144 bytes.
The demo isnt wildly new/original, but does have a few little ideas of its own,
and it all neatly fits into 63 bytes. Enjoy!