; tunnel256: a flight down a tunnel of light, for DOS. ; ; Target: DOS .COM, 386+, VGA mode 13h (320x200, 256 colours). ; Build: nasm -f bin tunnel.asm -o tunnel.com ; ; No tunnel yet: row xor column, scrolled by the frame counter in BP. bits 16 cpu 386 org 0x100 start: mov ax, 0x0013 ; 320x200, 256 colours int 0x10 push word 0xA000 pop es cld frame: xor di, di pixel: mov ax, di xor dx, dx mov cx, 320 div cx ; ax = row, dx = column xor ax, dx add ax, bp stosb cmp di, 64000 jb pixel inc bp ; next frame in al, 0x60 ; Esc has scancode 1 dec al jnz frame ret