;------------------------------------------------------------------------------ ; The Source Code .... code by GEORGE STARK/YAKUZA DS+HS ; ; I have implemented all tables 'cause it is easier to understand and to handle ; Okay ... read the comments .. I guess it's enough to understand ....... ;------------------------------------------------------------------------------ .model small .386 .stack 100h .data datas db 802 dup(0h) vesa_message db 'VESA Mode detected ..',10,13,'$' vesa_error_ db 'Install your VESA Driver first !',10,13,'$' vesa2_error_ db 'Error using VESA functions !',10,13,'$' vesa3_error_ db 'Monitor doesn''t support 640x400.256 ..',10,13,'$' vesa4_error_ db 'Sorry .. but your VESA (driver?) doesn''t support PAGE-FAR-CALL routine ..',10,13,'$' computer db 'Please notice that a 386 computer is at least required ..',10,13,10,13 db 10,13,'Strike any key to start the intro and wait app. 3 secs while initializing ...$' color db 0 x dw 0 y dw 0 z dw 0 x1 dw 0 y1 dw 0 z1 dw 0 color_pos dw 0 which_vector dw 0 char db 0 start_ dw 0 end_ dw 0 alpha dw 0 VESA_ dw 0,0 goil_ db 10,0,13,0,15,0,18,0,20,0,22,0,24,0,26 db 0,28,0,29,0,30,0,31,0,31,0,31,0,31,0 db 30,0,29,0,28,0,26,0,25,0,23,0,21,0,19 db 0,16,0,14,0,12,0,9,0,7,0,5,0,3,0 db 1,0,0,0,255,255,254,255,253,255,252,255,252,255,252 db 255,253,255,253,255,254,255,255,255,0,0,2,0,3,0 db 5,0,7,0,8,0,10,0,12,0,13,0,14,0,15 db 0,16,0,17,0,18,0,18,0,18,0,17,0,17,0 db 16,0,15,0,13,0,12,0,10,0,8,0,6,0,4 db 0,2,0,255,255,253,255,251,255,249,255,247,255,246,255 db 244,255,243,255,242,255,241,255,241,255,241,255,241,255,242 db 255,242,255,244,255,245,255,246,255,248,255,250,255,252,255 db 254,255,0,0,2,0,4,0,6,0,8,0,10,0,11 db 0,12,0,13,0,14,0,15,0,15,0,15,0,14,0 db 13,0,12,0,11,0,9,0,8,0,6,0,3,0,1 db 0,255,255,253,255,250,255,248,255,246,255,244,255,242,255 db 240,255,238,255,237,255,236,255,235,255,235,255,235,255,235 db 255,235,255,236,255,237,255,238,255,239,255,240,255,242,255 db 243,255,245,255,247,255,248,255,250,255,251,255,253,255,254 db 255,255,255,0,0,0,0,0,0,0,0,0,0,255,255 db 254,255,253,255,252,255,251,255,249,255,247,255,245,255,243 db 255,241,255,239,255,237,255,235,255,233,255,232,255,230,255 db 229,255,228,255,228,255,228,255,228,255,228,255,229,255,230 db 255,231,255,233,255,234,255,237,255,239,255,242,255,244,255 db 247,255,250,255,253,255,0,0,2,0,5,0,8,0,10 db 0,12,0,14,0,16,0,17,0,18,0,19,0,20,0 db 20,0,20,0,20,0,19,0,19,0,18,0,17,0,16 db 0,15,0,13,0,12,0,11,0,10,0,9,0,8,0 db 7,0,7,0,6,0,6,0,6,0,7,0,7,0,8 db 0,10,0,11,0,13,0,14,0,16,0,18,0,20,0 db 23,0,25,0,27,0,29,0,31,0,32,0,34,0,35 db 0,36,0,37,0,37,0,37,0,37,0,36,0,35,0 db 34,0,32,0,31,0,28,0,26,0,24,0,21,0,18 db 0,15,0,12,0,9,0,6,0,3,0,0,0,254,255 db 251,255,249,255,247,255,245,255,244,255,243,255,242,255,242 db 255,241,255,241,255,242,255,242,255,243,255,244,255,245,255 db 246,255,247,255,248,255,249,255,250,255,251,255,252,255,253 db 255,253,255,254,255,254,255,254,255,253,255,253,255,252,255 db 251,255,249,255,248,255,246,255,244,255,242,255,240,255,238 db 255,236,255,233,255,231,255,229,255,227,255,226,255,224,255 db 223,255,222,255,221,255,221,255,221,255,221,255,222,255,223 db 255,224,255,225,255,227,255,229,255,231,255,234,255,236,255 db 239,255,242,255,244,255,247,255,250,255,252,255,255,255,1 db 0,3,0,5,0,6,0,7,0,8,0,9,0,9,0 db 9,0,9,0,9,0,8,0,7,0,6,0,5,0,3 db 0,2,0,0,0,255,255,253,255,252,255,251,255,249,255 db 249,255,248,255,247,255,247,255,247,255,247,255,248,255,249 db 255,250,255,251,255,252,255,254,255,0,0,2,0,4,0 db 6,0,8,0,11,0,13,0,15,0,17,0,18,0,20 db 0,21,0,22,0,23,0,23,0,23,0,23,0,23,0 db 22,0,21,0,19,0,18,0,16,0,14,0,12,0,10 db 0,8,0,5,0,3,0,1,0,255,255,253,255,251,255 db 250,255,249,255,248,255,247,255,246,255,246,255,246,255,247 db 255,248,255,249,255,250,255,25,0,24,0,24,0,23,0 db 23,0,22,0,21,0,20,0,19,0,18,0,17,0,16 db 0,15,0,14,0,12,0,11,0,10,0,8,0,7,0 db 5,0,3,0,2,0,0,0,255,255,253,255,252,255,250 db 255,249,255,247,255,246,255,244,255,243,255,242,255,240,255 db 239,255,238,255,237,255,236,255,235,255,234,255,234,255,233 db 255,232,255,232,255,232,255,231,255,231,255,231,255,231,255 db 231,255,231,255,232,255,232,255,233,255,233,255,234,255,235 db 255,236,255,237,255,238,255,239,255,240,255,241,255,242,255 db 244,255,245,255,246,255,248,255,249,255,251,255,253,255,254 db 255,0,0,1,0,3,0,4,0,6,0,7,0,9,0 db 10,0,12,0,13,0,14,0,16,0,17,0,18,0,19 db 0,20,0,21,0,22,0,22,0,23,0,24,0,24,0 db 24,0,25,0,25,0,25,0,25,0,25,0,25,0,24 db 0,24,0,23,0,23,0,22,0,21,0,20,0,19,0 db 18,0,17,0,16,0,15,0,14,0,12,0,11,0,10 db 0,8,0,7,0,5,0,3,0,2,0,0,0,255,255 db 253,255,252,255,250,255,249,255,247,255,246,255,244,255,243 db 255,242,255,240,255,239,255,238,255,237,255,236,255,235,255 db 234,255,234,255,233,255,232,255,232,255,232,255,231,255,231 db 255,231,255,231,255,231,255,231,255,232,255,232,255,233,255 db 233,255,234,255,235,255,236,255,237,255,238,255,239,255,240 db 255,241,255,242,255,244,255,245,255,246,255,248,255,249,255 db 251,255,253,255,254,255,0,0,1,0,3,0,4,0,6 db 0,7,0,9,0,10,0,12,0,13,0,14,0,16,0 db 17,0,18,0,19,0,20,0,21,0,22,0,22,0,23 db 0,24,0,24,0,24,0,25,0,25,0,25,0,25,0 db 25,0,25,0,24,0,24,0,23,0,23,0,22,0,21 db 0,20,0,19,0,18,0,17,0,16,0,15,0,14,0 db 12,0,11,0,10,0,8,0,7,0,5,0,3,0,2 db 0,0,0,255,255,253,255,252,255,250,255,249,255,247,255 db 246,255,244,255,243,255,242,255,240,255,239,255,238,255,237 db 255,236,255,235,255,234,255,234,255,233,255,232,255,232,255 db 232,255,231,255,231,255,231,255,231,255,231,255,231,255,232 db 255,232,255,233,255,233,255,234,255,235,255,236,255,237,255 db 238,255,239,255,240,255,241,255,242,255,244,255,245,255,246 db 255,248,255,249,255,251,255,253,255,254,255,0,0,1,0 db 3,0,4,0,6,0,7,0,9,0,10,0,12,0,13 db 0,14,0,16,0,17,0,18,0,19,0,20,0,21,0 db 22,0,22,0,23,0,24,0,24,0,24,0,25,0,25 db 0,25,0,25,0,25,0,25,0,24,0,24,0,23,0 db 23,0,22,0,21,0,20,0,19,0,18,0,17,0,16 db 0,15,0,14,0,12,0,11,0,10,0,8,0,7,0 db 5,0,3,0,2,0,0,0,255,255,253,255,252,255,250 db 255,249,255,247,255,246,255,244,255,243,255,242,255,240,255 db 239,255,238,255,237,255,236,255,235,255,234,255,234,255,233 db 255,232,255,232,255,232,255,231,255,231,255,231,255,231,255 db 231,255,231,255,232,255,232,255,233,255,233,255,234,255,235 db 255,236,255,237,255,238,255,239,255,240,255,241,255,242,255 db 244,255,245,255,246,255,248,255,249,255,251,255,253,255,254 db 255,0,0,1,0,3,0,4,0,6,0,7,0,9,0 db 10,0,12,0,13,0,14,0,16,0,17,0,18,0,19 db 0,20,0,21,0,22,0,22,0,23,0,24,0,24,0 db 24,0,25,0,25,0,25,0,25,0,25,0,25,0 the_end db 90h dw 500,120 ; x,y cyl db 45,0,65,0,201,255,36,0,185,255,30,0,79,0,8 ; Cylinder db 0,226,255,182,255,228,255,75,0,182,255,29,0,23,0 ; Vectors .. db 23,0,180,255,235,255,66,0,44,0,191,255,23,0,180 ; x,y,z: words db 255,34,0,178,255,13,0,64,0,176,255,0,0,208,255 ; 201 Vecs .. db 15,0,178,255,50,0,78,0,16,0,192,255,236,255,77 db 0,9,0,179,255,17,0,35,0,69,0,40,0,200,255 db 49,0,193,255,54,0,230,255,76,0,75,0,68,0,215 db 255,211,255,189,255,43,0,13,0,28,0,182,255,40,0 db 77,0,17,0,55,0,59,0,203,255,233,255,183,255,31 db 0,40,0,187,255,38,0,58,0,209,255,192,255,68,0 db 203,255,197,255,217,255,29,0,182,255,72,0,179,255,239 db 255,194,255,229,255,75,0,38,0,190,255,44,0,211,255 db 212,255,190,255,28,0,77,0,236,255,5,0,221,255,72 db 0,239,255,178,255,16,0,178,255,56,0,200,255,203,255 db 188,255,41,0,189,255,49,0,63,0,252,255,178,255,15 db 0,24,0,227,255,74,0,194,255,31,0,183,255,77,0 db 53,0,59,0,74,0,50,0,62,0,52,0,214,255,188 db 255,227,255,49,0,193,255,24,0,36,0,71,0,215,255 db 244,255,79,0,55,0,1,0,80,0,6,0,64,0,209 db 255,206,255,70,0,37,0,202,255,80,0,7,0,195,255 db 187,255,218,255,219,255,29,0,74,0,239,255,29,0,182 db 255,198,255,176,255,7,0,221,255,255,255,176,255,30,0 db 199,255,55,0,240,255,177,255,244,255,235,255,244,255,177 db 255,47,0,189,255,213,255,17,0,212,255,66,0,56,0 db 186,255,37,0,187,255,68,0,214,255,204,255,249,255,176 db 255,255,255,207,255,63,0,15,0,192,255,47,0,44,0 db 70,0,219,255,37,0,196,255,52,0,12,0,178,255,243 db 255,178,255,179,255,239,255,35,0,27,0,75,0,66,0 db 78,0,241,255,80,0,186,255,219,255,59,0,200,255,56 db 0,222,255,68,0,215,255,204,255,184,255,221,255,180,255 db 72,0,221,255,36,0,79,0,11,0,252,255,176,255,2 db 0,251,255,22,0,76,0,228,255,66,0,44,0,69,0 db 74,0,29,0,255,255,197,255,53,0,208,255,52,0,196 db 255,227,255,194,255,50,0,200,255,244,255,79,0,234,255 db 33,0,72,0,58,0,188,255,42,0,13,0,78,0,240 db 255,0,0,31,0,73,0,16,0,74,0,29,0,197,255 db 245,255,79,0,224,255,59,0,53,0,207,255,190,255,44 db 0,78,0,177,255,247,255,16,0,73,0,225,255,51,0 db 76,0,232,255,43,0,20,0,179,255,232,255,187,255,38 db 0,80,0,240,255,78,0,212,255,216,255,69,0,68,0 db 184,255,33,0,251,255,205,255,61,0,189,255,236,255,179 db 255,77,0,36,0,71,0,51,0,187,255,40,0,77,0 db 207,255,63,0,74,0,73,0,31,0,28,0,80,0,255 db 255,184,255,180,255,22,0,239,255,33,0,184,255,190,255 db 187,255,40,0,47,0,43,0,189,255,188,255,241,255,78 db 0,198,255,57,0,201,255,40,0,199,255,201,255,7,0 db 178,255,13,0,227,255,53,0,197,255,35,0,79,0,245 db 255,202,255,232,255,180,255,42,0,66,0,212,255,37,0 db 177,255,11,0,56,0,27,0,181,255,193,255,79,0,11 db 0,66,0,11,0,79,0,78,0,176,255,251,255,40,0 db 180,255,230,255,192,255,215,255,68,0,187,255,7,0,176 db 255,208,255,42,0,68,0,243,255,182,255,29,0,210,255 db 181,255,229,255,183,255,176,255,249,255,213,255,63,0,207 db 255,183,255,192,255,208,255,231,255,185,255,36,0,3,0 db 75,0,229,255,6,0,247,255,177,255,241,255,252,255,80 db 0,199,255,72,0,224,255,221,255,75,0,27,0,15,0 db 206,255,62,0,237,255,23,0,76,0,247,255,188,255,215 db 255,253,255,20,0,179,255,61,0,79,0,12,0,3,0 db 193,255,207,255,222,255,178,255,15,0,177,255,251,255,176 db 255,245,255,243,255,78,0,25,0,52,0,60,0,254,255 db 54,0,58,0,54,0,45,0,65,0,66,0,176,255,1 db 0,16,0,199,255,55,0,47,0,245,255,79,0,10,0 db 233,255,76,0,230,255,4,0,80,0,59,0,187,255,216 db 255,9,0,249,255,80,0,63,0,71,0,36,0,218,255 db 188,255,41,0,4,0,237,255,179,255,178,255,182,255,28 db 0,212,255,80,0,1,0,15,0,5,0,80,0,180,255 db 27,0,181,255,195,255,251,255,80,0,229,255,177,255,12 db 0,72,0,77,0,20,0,202,255,216,255,187,255,68,0 db 9,0,79,0,188,255,209,255,64,0,14,0,49,0,193 db 255,189,255,41,0,188,255,3,0,216,255,187,255,202,255 db 44,0,190,255,57,0,37,0,186,255,224,255,69,0,216 db 255,12,0,249,255,80,0,178,255,254,255,176,255,220,255 db 180,255,24,0,62,0,38,0,69,0,238,255,178,255,13 db 0,22,0,72,0,221,255,195,255,188,255,214,255,14,0 db 181,255,27,0,5,0,230,255,180,255,21,0,28,0,74 db 0,15,0,211,255,65,0,195,255,183,255,31,0,187,255 db 230,255,76,0,207,255,188,255,42,0,14,0,237,255,179 db 255,251,255,17,0,77,0,224,255,185,255,36,0,208,255 db 79,0,247,255,68,0,78,0,16,0,214,255,62,0,50 db 0,191,255,195,255,205,255,239,255,194,255,206,255,219,255 db 223,255,72,0,196,255 dw 130,300 ; x,y sphere db 0,0,0,0,80,0,237,255,197,255,50,0,218,255,188 ; Sphere db 255,245,255,38,0,61,0,224,255,205,255,25,0,201,255 ; Vectors db 219,255,6,0,69,0,17,0,228,255,72,0,249,255,27 ; x,y,z: words db 0,74,0,26,0,227,255,69,0,37,0,187,255,11,0 ; 201 Vecs .. db 215,255,63,0,230,255,26,0,183,255,240,255,225,255,59 db 0,42,0,0,0,17,0,179,255,12,0,187,255,36,0 db 5,0,7,0,177,255,12,0,201,255,55,0,178,255,12 db 0,11,0,3,0,254,255,176,255,186,255,248,255,36,0 db 38,0,48,0,51,0,0,0,0,0,176,255,213,255,254 db 255,189,255,46,0,64,0,11,0,22,0,76,0,9,0 db 249,255,230,255,181,255,61,0,39,0,223,255,14,0,18 db 0,76,0,0,0,255,255,80,0,19,0,188,255,220,255 db 5,0,217,255,69,0,1,0,255,255,176,255,3,0,1 db 0,176,255,9,0,21,0,76,0,68,0,2,0,215,255 db 180,255,5,0,233,255,1,0,79,0,11,0,47,0,59 db 0,26,0,248,255,41,0,68,0,229,255,31,0,188,255 db 16,0,184,255,227,255,227,255,225,255,67,0,55,0,201 db 255,243,255,247,255,67,0,42,0,236,255,5,0,179,255 db 39,0,58,0,37,0,35,0,70,0,248,255,36,0,0 db 0,185,255,43,0,65,0,240,255,3,0,50,0,194,255 db 186,255,219,255,254,255,33,0,12,0,71,0,13,0,209 db 255,63,0,54,0,205,255,27,0,47,0,237,255,195,255 db 80,0,252,255,251,255,27,0,195,255,214,255,210,255,200 db 255,32,0,39,0,17,0,67,0,10,0,26,0,74,0 db 245,255,187,255,219,255,0,0,223,255,184,255,31,0,205 db 255,204,255,228,255,67,0,225,255,23,0,61,0,212,255 db 18,0,215,255,65,0,253,255,10,0,177,255,5,0,79 db 0,8,0,4,0,24,0,180,255,215,255,245,255,188,255 db 224,255,30,0,190,255,203,255,212,255,216,255,244,255,8 db 0,178,255,50,0,17,0,60,0,10,0,20,0,180,255 db 33,0,238,255,69,0,28,0,62,0,41,0,5,0,221 db 255,71,0,7,0,75,0,232,255,0,0,255,255,176,255 db 9,0,65,0,44,0,17,0,236,255,75,0,56,0,251 db 255,56,0,71,0,24,0,229,255,31,0,222,255,64,0 db 8,0,24,0,180,255,233,255,215,255,64,0,254,255,6 db 0,80,0,44,0,9,0,65,0,190,255,25,0,220,255 db 26,0,217,255,64,0,192,255,5,0,208,255,19,0,229 db 255,72,0,221,255,184,255,4,0,37,0,255,255,70,0 db 44,0,221,255,56,0,12,0,43,0,191,255,64,0,39 db 0,27,0,220,255,222,255,62,0,34,0,8,0,71,0 db 189,255,23,0,220,255,32,0,72,0,12,0,182,255,2 db 0,227,255,21,0,53,0,201,255,241,255,246,255,179,255 db 208,255,192,255,254,255,57,0,202,255,9,0,71,0,226 db 255,237,255,250,255,247,255,79,0,7,0,17,0,77,0 db 254,255,2,0,80,0,225,255,38,0,193,255,220,255,11 db 0,69,0,1,0,0,0,176,255,227,255,64,0,220,255 db 0,0,224,255,184,255,206,255,229,255,201,255,45,0,35 db 0,55,0,229,255,181,255,254,255,237,255,18,0,181,255 db 215,255,46,0,206,255,247,255,53,0,198,255,6,0,21 db 0,180,255,217,255,65,0,230,255,192,255,47,0,0,0 db 11,0,184,255,31,0,234,255,76,0,248,255,73,0,235 db 255,233,255,250,255,240,255,77,0,0,0,5,0,80,0 db 21,0,213,255,64,0,252,255,61,0,51,0,2,0,239 db 255,77,0,25,0,214,255,193,255,0,0,9,0,79,0 db 232,255,0,0,76,0,37,0,0,0,186,255,240,255,194 db 255,47,0,198,255,46,0,227,255,1,0,233,255,180,255 db 240,255,62,0,47,0,246,255,222,255,71,0,16,0,188 db 255,219,255,60,0,25,0,211,255,207,255,251,255,63,0 db 59,0,203,255,254,255,185,255,243,255,224,255,37,0,54 db 0,44,0,220,255,21,0,188,255,62,0,1,0,50,0 db 0,0,13,0,178,255,252,255,223,255,184,255,199,255,234 db 255,51,0,7,0,3,0,177,255,226,255,206,255,203,255 db 25,0,184,255,22,0,8,0,252,255,177,255,19,0,0 db 0,77,0,64,0,18,0,43,0,23,0,16,0,74,0 db 184,255,22,0,26,0,12,0,51,0,60,0,177,255,11 db 0,5,0,1,0,0,0,176,255,243,255,41,0,189,255 db 37,0,2,0,70,0,189,255,1,0,213,255,17,0,76 db 0,8,0,206,255,1,0,62,0,241,255,77,0,247,255 db 251,255,6,0,79,0,65,0,32,0,223,255,3,0,178 db 255,16,0,201,255,32,0,48,0,18,0,242,255,76,0 db 37,0,253,255,70,0,53,0,205,255,227,255,255,255,218 db 255,187,255,39,0,193,255,229,255,57,0,2,0,201,255 db 243,255,247,255,78,0,251,255,0,0,80,0,32,0,215 db 255,196,255,2,0,3,0,176,255,49,0,55,0,28,0 db 24,0,0,0,76,0,8,0,0,0,177,255,26,0,76 db 0,5,0,245,255,227,255,183,255,178,255,241,255,4,0 db 241,255,48,0,195,255,8,0,15,0,179,255,203,255,230 db 255,203,255,252,255,18,0,77,0,52,0,231,255,54,0 db 0,0,2,0,80,0,230,255,24,0,185,255,228,255,4 db 0,74,0,234,255,24,0,72,0,11,0,61,0,50,0 db 254,255,247,255,79,0 old_sphere db 1206 dup(0) old_cyl db 1206 dup(0) color_cyc db 603 dup(0) sine db 0,2,3,5,7,9,10,12,14,16,17,19,21,22,24 db 26,28,29,31,33,34,36,37,39,41,42,44,45,47,48 db 50,52,53,54,56,57,59,60,62,63,64,66,67,68,69 db 71,72,73,74,75,77,78,79,80,81,82,83,84,85,86 db 87,87,88,89,90,91,91,92,93,93,94,95,95,96,96 db 97,97,97,98,98,98,99,99,99,99,100,100,100,100,100 db 100,100,100,100,100,100,99,99,99,99,98,98,98,97,97 db 97,96,96,95,95,94,93,93,92,91,91,90,89,88,87 db 87,86,85,84,83,82,81,80,79,78,77,75,74,73,72 db 71,69,68,67,66,64,63,62,60,59,57,56,54,53,52 db 50,48,47,45,44,42,41,39,37,36,34,33,31,29,28 db 26,24,22,21,19,17,16,14,12,10,9,7,5,3,2 db 0,254,253,251,249,247,246,244,242,240,239,237,235,234,232 db 230,228,227,225,223,222,220,219,217,215,214,212,211,209,208 db 206,204,203,202,200,199,197,196,194,193,192,190,189,188,187 db 185,184,183,182,181,179,178,177,176,175,174,173,172,171,170 db 169,169,168,167,166,165,165,164,163,163,162,161,161,160,160 db 159,159,159,158,158,158,157,157,157,157,156,156,156,156,156 db 156,156,156,156,156,156,157,157,157,157,158,158,158,159,159 db 159,160,160,161,161,162,163,163,164,165,165,166,167,168,169 db 169,170,171,172,173,174,175,176,177,178,179,181,182,183,184 db 185,187,188,189,190,192,193,194,196,197,199,200,202,203,204 db 206,208,209,211,212,214,215,217,219,220,222,223,225,227,228 db 230,232,234,235,237,239,240,242,244,246,247,249,251,253,254 cosine db 100,100,100,100,100,100,99,99,99,99,98,98,98,97,97 db 97,96,96,95,95,94,93,93,92,91,91,90,89,88,87 db 87,86,85,84,83,82,81,80,79,78,77,75,74,73,72 db 71,69,68,67,66,64,63,62,60,59,57,56,54,53,52 db 50,48,47,45,44,42,41,39,37,36,34,33,31,29,28 db 26,24,22,21,19,17,16,14,12,10,9,7,5,3,2 db 0,254,253,251,249,247,246,244,242,240,239,237,235,234,232 db 230,228,227,225,223,222,220,219,217,215,214,212,211,209,208 db 206,204,203,202,200,199,197,196,194,193,192,190,189,188,187 db 185,184,183,182,181,179,178,177,176,175,174,173,172,171,170 db 169,169,168,167,166,165,165,164,163,163,162,161,161,160,160 db 159,159,159,158,158,158,157,157,157,157,156,156,156,156,156 db 156,156,156,156,156,156,157,157,157,157,158,158,158,159,159 db 159,160,160,161,161,162,163,163,164,165,165,166,167,168,169 db 169,170,171,172,173,174,175,176,177,178,179,181,182,183,184 db 185,187,188,189,190,192,193,194,196,197,199,200,202,203,204 db 206,208,209,211,212,214,215,217,219,220,222,223,225,227,228 db 230,232,234,235,237,239,240,242,244,246,247,249,251,253,254 db 0,2,3,5,7,9,10,12,14,16,17,19,21,22,24 db 26,28,29,31,33,34,36,37,39,41,42,44,45,47,48 db 50,52,53,54,56,57,59,60,62,63,64,66,67,68,69 db 71,72,73,74,75,77,78,79,80,81,82,83,84,85,86 db 87,87,88,89,90,91,91,92,93,93,94,95,95,96,96 db 97,97,97,98,98,98,99,99,99,99,100,100,100,100,100 color_left db 400 dup(0) color_right db 400 dup(0) font db 3584 dup(0) ; 8x14 font message_on_screen db 'This short and hopefully',0 db 'nice VESA intro was coded',0 db 'to help you learning ASM.',0 db 'It''s working but wasn''t',0 db 'optimized for speed or',0 db 'size ''cause it would only',0 db 'confuse you understanding',0 db 'the principles ....',0,0 db 'Code by GEORGE STARK/YAKUZA',0FFh message2_on_screen db 'If you like it and want to',0 db 'use it for your own code or',0 db 'you want to use it as BBStro',0 db 'you are allowed to do it but',0 db 'you have to mention who has',0 db 'coded it ... and some greetz',0 db '(additional) to me and Yakuza',0 db 'would be really nice hehe ...',0FFh bit_struc db 128,64,32,16,8,4,2,1 .code putpixel proc near pusha xor eax,eax xor ecx,ecx xor ebx,ebx mov bx,x mov ax,640 ; calculate Offset mov cx,y ; y*640+x mul ecx add eax,ebx ; -> ofs in eax mov edi,eax shr eax,16 ; ofs div 65536 mov dx,ax mov si,dx ; save dx - ax mov ax,054Fh ; function 05 xor bx,bx call dword ptr VESA_ ; set win PAGE xor eax,eax mov ax,si shl eax,16 ; ax mul 65536 sub edi,eax ; relative ofs cld push es mov al,color mov dx,0A000h mov es,dx stosb pop es popa retn putpixel endp linex_x proc near pusha mov cx,end_ mov dx,start_ cmp cx,dx je error_yo jb other_direction mov bx,offset color_left add bx,y mov al,[bx] mov color,al jodel: sub cx,dx ; width do_it: mov x,dx call putpixel inc dx loop do_it error_yo: popa retn other_direction: xchg dx,cx mov bx,offset color_right add bx,y mov al,[bx] mov color,al jmp jodel linex_x endp create_colors proc near mov dx,03C8h mov al,00h out dx,al inc dx mov cx,101 ; 201 colors .. mov si,0 ; color RGB mov bl,100 ; /100 mov di,offset color_cyc set_colors: mov ax,si div bl out dx,al mov ds:[di],al xor ax,ax out dx,al out dx,al mov ds:[di+1],ax add si,40 ; si=si+0.40 add di,3 loop set_colors mov cx,100 ; 201 colors .. mov bl,100 ; /100 set_colors2: mov ax,si div bl out dx,al mov ds:[di],al xor ax,ax out dx,al out dx,al mov ds:[di+1],ax sub si,40 ; si=si+0.40 add di,3 loop set_colors2 dec dx mov al,254 out dx,al inc dx mov al,63 out dx,al out dx,al out dx,al dec dx mov al,253 out dx,al inc dx xor al,al out dx,al out dx,al out dx,al mov bx,offset color_left mov cx,200 xor al,al first_part: mov [bx],al inc al inc bx loop first_part mov cx,200 second_part: mov [bx],cl inc bx loop second_part mov bx,offset color_left mov si,offset color_right mov dx,si ; end of 'left' add bx,200 ; start color mov cx,400 ; 400 entries right_side: mov al,[bx] mov [si],al inc si inc bx cmp bx,dx ; end reached ? jae set_to_zero the_rest: loop right_side retn set_to_zero: mov bx,offset color_left jmp the_rest create_colors endp show_text proc near pusha ; BX - Ofs mov si,x mov di,y ; many bytes ; x - x pos the_text_string: mov al,[bx] ; y - y pos cmp al,0 je carrige_return cmp al,0FFh je that_is_the_end mov char,al call show_one_letter add x,9 next_parts: inc bx jmp the_text_string that_is_the_end: popa retn carrige_return: mov x,si add di,15 mov y,di jmp next_parts show_text endp read_vga_font proc near pusha push es push ds mov ah,11h mov al,30h mov bh,2 ; read 8x14 int 10h cld push ds mov dx,es ; 3584 mov ds,dx ; ds to es pop es ; es to ds mov si,bp ; ds:si - adr mov di,offset font mov cx,3584 ; 14 Bytes * 256 rep movsb pop ds pop es popa retn read_vga_font endp show_one_letter proc near pusha add y,14 mov color,254 ; color ... mov bx,offset font ; adr font mov cl,char ; which char ? mov ax,14 ; 14 bytes/char mul cl add bx,ax ; adr of char add bx,14 mov cx,14 ; read it the_whole_char: push cx mov cx,8 ; 8 bits mov al,[bx] ; next bits mov si,offset bit_struc ; test structur the_char: test al,[si] ; bit set ? jne set_pixel ; jo - Putpixel and_jump_back: add x,1 ; x back inc si loop the_char pop cx sub y,1 sub x,8 sub bx,1 loop the_whole_char popa retn set_pixel: call putpixel jmp and_jump_back show_one_letter endp rotate_one_vec proc near ; BX - Vecs_ofs pusha mov bp,bx add bx,which_vector ; SI - Old_vecs add si,which_vector push bp push si mov di,offset sine add di,alpha ; sine of alpha mov si,offset cosine add si,alpha ; cosine of alpha xor dx,dx ; x-Rotation xor cx,cx mov al,[si] ; cosine cbw mov cx,[bx+2] ; y imul cx ; y*cos(alpha) mov cx,100 idiv cx mov bp,ax xor dx,dx xor cx,cx mov al,[di] ; sine cbw mov cx,[bx+4] ; z imul cx ; z*sin(alpha) mov cx,100 idiv cx sub bp,ax ; y*cos-z*sin mov y,bp xor dx,dx xor cx,cx mov al,[di] ; sine cbw mov cx,[bx+2] ; y imul cx ; y*sin(alpha) mov cx,100 idiv cx mov bp,ax xor dx,dx xor cx,cx mov al,[si] ; cosine cbw mov cx,[bx+4] ; z imul cx ; z*cos(alpha) mov cx,100 idiv cx add ax,bp ; y*sin+z*cos mov z,ax mov ax,[bx] ; x mov x,ax xor dx,dx ; y-Rotation xor cx,cx mov al,[si] ; cosine cbw mov cx,x ; x imul cx ; x*cos(alpha) mov cx,100 idiv cx mov bp,ax xor dx,dx xor cx,cx mov al,[di] ; sine cbw mov cx,z ; z imul cx ; z*sin(alpha) mov cx,100 idiv cx sub bp,ax ; x*cos-z*sin mov x1,bp xor dx,dx xor cx,cx mov al,[di] ; sine cbw mov cx,x ; x imul cx ; x*sin(alpha) mov cx,100 idiv cx mov bp,ax xor dx,dx xor cx,cx mov al,[si] ; cosine cbw mov cx,z ; z imul cx ; z*cos(alpha) mov cx,100 idiv cx add ax,bp ; x*sin+z*cos mov z1,ax mov ax,y ; y mov y1,ax pop si pop bp mov ax,[si] mov x,ax ; old x mov ax,[si+2] mov y,ax ; old y cmp x,320 jbe right_side_now mov bx,offset color_left set_background: add bx,y mov al,[bx] ; background mov color,al jmp set_old_pixel right_side_now: mov bx,offset color_right jmp set_background set_old_pixel: call putpixel mov bx,bp mov ax,[bx-4] add x1,ax mov ax,[bx-2] add y1,ax mov ax,x1 ; set new pixel mov bx,y1 mov color,254 mov x,ax mov y,bx call putpixel mov ax,x1 mov [si],ax ; save old mov ax,y1 mov [si+2],ax ; vector mov ax,z1 mov [si+4],ax popa retn rotate_one_vec endp db 'Code by GEORGE STARK/YAKUZA DS+HS' vertical proc near push dx push ax mov dx,03DAh mov ah,8 active: in al,dx and al,ah je active test_again: in al,dx and al,ah jne test_again pop ax pop dx retn vertical endp vesa_error: mov dx,offset vesa_error_ bye_bye: mov ah,09h int 21h mov ah,4Ch int 21h vesa2_error: mov dx,offset vesa2_error_ jmp bye_bye vesa3_error: mov dx,offset vesa3_error_ jmp bye_bye check_dx: cmp dx,0 jne supported mov dx,offset vesa4_error_ jmp bye_bye supported: jmp everything_ok start: mov dx,@data mov ds,dx mov es,dx mov di,offset datas ; special mov ah,4Fh ; Puffer mov al,00h int 10h cmp ah,0 jne vesa_error ; Bad function mov ah,4Fh ; return mov al,01h mov cx,101h ; 640x400.256 int 10h ; ask for mode cmp ah,0 jne vesa2_error ; doesn't exist mov bx,offset datas mov ax,[bx] ; Mode flag test ax,1 ; first bit je vesa3_error ; bad Monitor mov ax,[bx+0Ch] ; VESA_ ofs mov vesa_,ax mov dx,[bx+0Ch+2] ; VESA_ seg mov vesa_+2,dx cmp ax,0 je check_dx everything_ok: mov ah,09h mov dx,offset vesa_message int 21h mov dx,offset computer int 21h mov ah,08h int 21h mov ah,4Fh mov al,02h mov bx,101h int 10h cmp ah,0 jne vesa3_error mov di,offset datas cld mov ax,320 mov cx,401 rep stosw mov ah,12h mov bl,36h mov al,1 int 10h call read_vga_font call create_colors mov start_,320 mov end_,0 mov cx,400 fill_screen: mov y,cx call linex_x loop fill_screen mov start_,320 mov end_,640 mov cx,400 fill_screen2: mov y,cx call linex_x loop fill_screen2 mov bx,offset message_on_screen mov x,10 mov y,10 call show_text mov x,370 mov y,270 mov bx,offset message2_on_screen call show_text mov ah,10h mov al,01h mov bh,253 int 10h mov ah,12h mov bl,36h mov al,0 int 10h mov bp,offset goil_ add bp,802 ; change func over_and_over: mov cx,400 ; y's mov bx,offset goil_ ; norm func mov si,offset datas all: mov y,cx mov dx,[si] ; old x mov end_,dx mov di,[bx] mov dx,ds:[bp] add di,dx ; new x mov dx,320 sub dx,di ; 320-x mov [si],dx ; save old ! mov start_,dx call linex_x add bx,2 add bp,4 ; change factor mov dx,offset the_end cmp bp,dx jae back_to_start go_on: add si,2 loop all mov ax,alpha add ax,3 cmp ax,360 jae alpha_to_zero write_it_: mov alpha,ax mov which_vector,0 mov cx,201 rotate_and_show_all_vecs: mov bx,offset cyl mov si,offset old_cyl call rotate_one_vec mov bx,offset sphere mov si,offset old_sphere call rotate_one_vec add which_vector,6 loop rotate_and_show_all_vecs mov si,offset color_cyc add si,color_pos mov dx,03C8h xor al,al out dx,al inc dx mov cx,201 cycle_palette: push cx mov cx,3 rep outsb cmp si,offset sine jae back_to_ now_pop_cx: pop cx loop cycle_palette mov ax,color_pos add ax,6 cmp ax,603 jae color_0 write_color_pos: mov color_pos,ax call vertical mov ah,01h int 16h je over_and_over mov ax,03h int 10h mov ah,4Ch int 21h back_to_start: sub bp,802 jmp go_on alpha_to_zero: sub ax,360 jmp write_it_ back_to_: mov si,offset color_cyc jmp now_pop_cx color_0: sub ax,603 jmp write_color_pos end start