While OTW Vortex/12 is under way, another highschool retro I’ve found. The original challenge was to draw out a 200×200 spiral as you can see it on the picture. In hungarian spiral is csigavonal, where csiga means snail and vonal means line. It was necessary, to do it in 320×200 video mode, and wait for a keypress before switching back to textmode and exit. Smaller bytecode wins!
I’ve tried different approaches, the best I could reach was the following, with 52 bytes:
.286 Progx Segment Assume Cs:Progx,Ds:Progx Org 100h Start: Mov Ax,13h Int 10h Mov Ax,0A000h Mov Es,Ax Shr Ax,08 Xor Di,Di Mov Dx,201 Csiga: Mov Cx,Dx Cld Dec Di Rep Stosb Dec Dx Dec Dx Mov Cx,Dx Mov Bx,320 Call Vert Dec Di Mov Cx,Dx Std Inc Di Rep Stosb Dec Dx Dec Dx Mov Cx,Dx Mov Bx,-320 Call Vert Inc Di Cmp Dx,3 Jl Exit Jmp Csiga Exit: Xor Ax,Ax Int 16h Mov Ax,03h Int 10h Vert Proc Near Vert_1: Mov Es:[Di],Al Add Di,Bx Loop Vert_1 Ret Vert Endp Progx EndS End Start
I’m sure it can be done using fewer bytes!