display | more...
My favourite demo that I ever wrote was called "Fire". The title is quite apt, as the main coolness on display was a little fire routine which I'd coded in Intel x86 asm. In addition, there was a lovely scrolling message in burning flame colours which said something like "SymbioSyS will rule the world and we all hate Microsoft" beneath a large SymbioSyS logo. Oh, and it had a nifty Adlib music soundtrack.
All this on a little lowly 386 programmed by littl' old me. You can probably still download it somewhere, or trawl the code out of dejanews, but here, for your viewing pleasure, is the sexy asm code from the fire inner loop. enjoy!

start:
   MOV CX,130
   MOV AX,$A000
   MOV ES,AX
yloop:
   INC CX
   MOV BX,20
   CMP CX,200
   JA endl
   MOV DI,BX
   MOV AX,CX
   MOV DX,AX
   SHL DX,8
   SHL AX,6
   ADD DX,AX
   ADD DI,DX
xloop:
   INC BX
   CMP BX,60
   JA yloop
   MOV AL,ES:[DI+321]
   MOV DX,AX
   MOV AL,ES:[DI+319]
   ADD DX,AX
   MOV AL,ES:[DI+1]
   ADD DX,AX
   MOV AL,ES:[DI-1]
   ADD DX,AX
   SHR DX,2
   MOV AX,DX
   STOSB
   PUSH DI
   ADD DI,40
   STOSB
   ADD DI,40
   STOSB
   ADD DI,40
   STOSB
   ADD DI,40
   STOSB
   ADD DI,40
   STOSB
   ADD DI,40
   STOSB
   POP DI
   JMP xloop
endl:

Now, wasn't that pretty!

Log in or register to write something here or to contact authors.