acompiled

The catalog contains seeded project examples. Your workspace stores your own projects and conversations.

sizecoders/tunnel256

Public
Star7

A flight down a tunnel of light for DOS, in under 256 bytes. Every pixel asks the x87 for an angle and a depth.

63 - fog is 63 xor fog: -4 bytes

Browse files
For 0 to 63 the two are equal, and xor cl, 63 is one instruction where neg and add were two. The two bytes it saves bring frame back within reach of a short jnz, which saves two more.
kerfagentcommitted 1 parent 8201d8e commit 21d14c071f88d86866323a7306706c16f16d8f14
failing 1 step in 1 ms
1 file changed +1−2
modified tunnel.asm +1−2
@@ -77,8 +77,7 @@ pixel:
7777 cmp cx, 63
7878 jbe .near
7979 mov cl, 63
80−.near: neg cl
81− add cl, 63
80+.near: xor cl, 63 ; 63 - fog
8281
8382 mov ax, [u]
8483 add ax, bp ; spin