     1                                  ; ****************************************************************************
     2                                  ; boardz32.s (TRDOS 386, TRDOS v2.0 - sample binary file, 'boardz32.prg')
     3                                  ; ----------------------------------------------------------------------------
     4                                  ; BOARDZ32.PRG ! TEST program !  TRDOS 386 VGA Functionality test !
     5                                  ;
     6                                  ; 01/10/2016
     7                                  ;
     8                                  ; [ Last Modification: 02/10/2016 ]
     9                                  ;
    10                                  ; Derived from source code of 'BOARDZ.EXE' (MSDOS) intro file
    11                                  ; (BOARDZ.ASM, 13/02/1995)
    12                                  ;
    13                                  ; BOARDZ.ASM by by Vulture.
    14                                  ; NASM version of BOARDZ.ASM: Erdogan Tan, 01/10/2016 (boardz32.s)
    15                                  ;
    16                                  ; Assembler: NASM 2.11
    17                                  ;
    18                                  ; (Original -msdos- code has been modifed for TRDOS 386 system calls and
    19                                  ; other protected mode (TRDOS 386) interrupts.)
    20                                  ; ****************************************************************************
    21                                  
    22                                  ; 19/05/2016
    23                                  ; 29/04/2016
    24                                  ; TRDOS 386 system calls (temporary list!)
    25                                  _ver 	equ 0
    26                                  _exit 	equ 1
    27                                  _fork 	equ 2
    28                                  _read 	equ 3
    29                                  _write	equ 4
    30                                  _open	equ 5
    31                                  _close 	equ 6
    32                                  _wait 	equ 7
    33                                  _creat 	equ 8
    34                                  _link 	equ 9
    35                                  _unlink	equ 10
    36                                  _exec	equ 11
    37                                  _chdir	equ 12
    38                                  _time 	equ 13
    39                                  _mkdir 	equ 14
    40                                  _chmod	equ 15
    41                                  _chown	equ 16
    42                                  _break	equ 17
    43                                  _stat	equ 18
    44                                  _seek	equ 19
    45                                  _tell 	equ 20
    46                                  _mount	equ 21
    47                                  _umount	equ 22
    48                                  _setuid	equ 23
    49                                  _getuid	equ 24
    50                                  _stime	equ 25
    51                                  _quit	equ 26	
    52                                  _intr	equ 27
    53                                  _fstat	equ 28
    54                                  _emt 	equ 29
    55                                  _mdate 	equ 30
    56                                  _video	equ 31
    57                                  _audio	equ 32
    58                                  _timer	equ 33
    59                                  _sleep	equ 34
    60                                  _msg    equ 35
    61                                  _geterr equ 36
    62                                  _rsrvd1	equ 37
    63                                  _pri	equ 38
    64                                  _rele 	equ 39
    65                                  
    66                                  %macro sys 1-4
    67                                      ; 29/04/2016 - TRDOS 386 (TRDOS v2.0)	
    68                                      ; 03/09/2015	
    69                                      ; 13/04/2015
    70                                      ; Retro UNIX 386 v1 system call.	
    71                                      %if %0 >= 2   
    72                                          mov ebx, %2
    73                                          %if %0 >= 3    
    74                                              mov ecx, %3
    75                                              %if %0 = 4
    76                                                 mov edx, %4   
    77                                              %endif
    78                                          %endif
    79                                      %endif
    80                                      mov eax, %1
    81                                      ;int 30h
    82                                      int 40h ; TRDOS 386 (TRDOS v2.0)	   
    83                                  %endmacro
    84                                  
    85                                  ; TRDOS 386 (and Retro UNIX 386 v1) system call format:
    86                                  ; sys systemcall (eax) <arg1 (ebx)>, <arg2 (ecx)>, <arg3 (edx)>
    87                                  
    88                                  ; BOARDZ.S (NASM version of BOARDZ.ASM)
    89                                  ;==============================================================================;
    90                                  ;                                                                              ;
    91                                  ;       Assembler program by Vulture.                                          ;
    92                                  ;       This program scrolls a text and displays a 3d-starfield.               ;
    93                                  ;       It's a BBS advertisement.                                              ;
    94                                  ;                                                                              ;
    95                                  ;       Current Date: 13-2-95         Vulture                                  ;
    96                                  ;                                                                              ;
    97                                  ;==============================================================================;
    98                                  
    99                                  ; NASM version: Erdogan Tan, 01/10/2016
   100                                  
   101                                  ; === MAIN PROGRAM ===
   102                                  
   103                                  [Bits 32]   ; Protected Mode (TRDOS 386) Program
   104                                  
   105                                  [org 0]  ; TRDOS 386 PRG File
   106                                  
   107                                  START:
   108                                      ; DIRECT VGA MEMORY ACCESS
   109                                      ;xor    ebx, ebx
   110 00000000 B705                        mov     bh, 5 ; Direct access/map to VGA memory (0A0000h)
   111                                      ;mov    eax, _video ; 1Fh
   112 00000002 B01F                        mov     al, 1Fh ; sys _video ; TRDOS 386 Video functions
   113 00000004 CD40                        int     40h   ; TRDOS 386 system call
   114                                  
   115                                      ; eax = 0A0000h
   116 00000006 21C0                        and     eax, eax
   117 00000008 0F84E2000000                jz      terminate ; error (eax = 0)
   118                                  
   119 0000000E E8E6000000                  call    SetVGA              ; Get in GFX-mode
   120                                  
   121                                  ; === Set the palette ===
   122                                  
   123 00000013 66B81210                    mov     ax,1012h            ; Select write palette function
   124 00000017 6631DB                      xor     bx,bx               ; Start at color 0
   125 0000001A B917000000                  mov     ecx,23              ; Write 23 colors
   126 0000001F BA[38130000]                mov     edx,Palette   	; es:dx points to palette data
   127                                      ;int    10h                 ; Call VID interrupt & set palette
   128 00000024 CD31                        int	    31h ; TRDOS 386 - Video interrupt
   129 00000026 E8EF000000                  call    SavePalette         ; And save palette into array
   130                                  
   131                                  ; === Initialize pointers ===
   132 0000002B BF00000A00                  mov     edi, 0A0000h	; es = 0A000h (VGA)
   133                                  
   134                                  ; === Start scroll ===
   135                                  Reset:
   136 00000030 8D35[1D030000]              lea     esi, [Text]         ; si points to start of Text
   137                                  Mainthing:                      ; Main loop
   138 00000036 AC                          lodsb                       ; Load a character in al (si increased)
   139 00000037 3C00                        cmp     al,0                ; Have we reached the end of da text ?
   140 00000039 74F5                        je      short Reset         ; Yep => Start over
   141 0000003B 56                          push    esi                 ; Save character-offset on stack
   142 0000003C 88C3                        mov     bl,al               ; Save the character into bx
   143 0000003E 66B90000                    mov     cx,0                ; Set character-counter for position in font
   144 00000042 8D35[DE030000]              lea     esi, [Order]        ; si points to offset Order
   145                                  Again:
   146 00000048 AC                          lodsb                       ; Load the order-character (abcdef etc...)
   147 00000049 38D8                        cmp     al,bl               ; Is it da same letter/character ?
   148 0000004B 7404                        je      short Found         ; Yeah => Found it. . .
   149 0000004D 6641                        inc     cx                  ; Nope => Increase character-counter
   150 0000004F EBF7                        jmp     short Again         ; Compare with next character
   151                                  Found:
   152 00000051 66B80800                    mov     ax,8                ; 7 pixels + black pixel = 8 pixels
   153 00000055 66F7E1                      mul     cx                  ; ax=ax*cx    (e.g:  E := 4 * 10;)
   154                                  
   155 00000058 66BB0400                    mov     bx,4                ; Draw 4 * 2 vertical lines
   156                                  Hloop:
   157 0000005C 8D35[06040000]              lea     esi, [Font]         ; si points to start of Font
   158 00000062 6601C6                      add     si,ax               ; si now points to character
   159 00000065 66BFC071                    mov     di,320*91           ; di points to startposition on VGA
   160 00000069 66B90900                    mov     cx,9                ; Write 9 horizontal
   161                                  Vloop:
   162 0000006D 6651                        push    cx                  ; Save first loop-counter
   163 0000006F 66B90200                    mov     cx,2                ; Draw 2 new horizontal pixels
   164 00000073 F3A4                        repz    movsb               ; And go !
   165 00000075 6681C73E01                  add     di,318              ; Point to next location on VGA
   166 0000007A 6681C63E01                  add     si,318              ; Point to next source-location
   167 0000007F 6659                        pop     cx                  ; Restore loop-counter
   168 00000081 E2EA                        loop    Vloop               ; Loop 9 times
   169                                  ; === Scroll the text and improve stars ===
   170 00000083 50                          push    eax                 ; Save pointer to character
   171 00000084 BE00000A00                  mov	    esi, 0A0000h        ; ds = 0A000h (VGA-segment)
   172 00000089 66BE8270                    mov     si,320*90+2         ; Destination offset
   173 0000008D 66BF8070                    mov     di,320*90           ; Source offset
   174 00000091 66B9800C                    mov     cx,10*320           ; Repeat factor => Number of bytes to copy
   175 00000095 F3A4                        rep     movsb               ; And go ! (Hint: why not use words instead)
   176                                  
   177 00000097 66BF407E                    mov     di,320*101          ; On some slow VGA-cards we have to plot
   178 0000009B 66B90500                    mov     cx,5                ; 5 black pixels just below the scroller
   179 0000009F B000                        mov     al,0                ; on the left on the screen. Erase this
   180 000000A1 F3AA                        rep     stosb               ; code to see what I mean.
   181                                  
   182 000000A3 E85F000000                  call    WaitVrt             ; Wait for vertical retrace
   183 000000A8 E8E6000000                  call    CalcStar            ; Calculate new stars
   184 000000AD E889010000                  call    ShowStars           ; Show all stars on VGA
   185                                  
   186                                  ; === Want to quit ? ===
   187 000000B2 B401                        mov     ah, 1
   188                                      ;int    16h
   189 000000B4 CD32                        int     32h	; TRDOS 386 Keyboard interrupt
   190 000000B6 7407                        jz      short no_quit
   191 000000B8 6631C0                      xor     ax, ax
   192                                      ;int    16h
   193 000000BB CD32                        int     32h	; TRDOS 386 Keyboard interrupt
   194 000000BD EB0F                        jmp     short QuitNow
   195                                  
   196                                  no_quit:
   197                                  ; === No quit ? then continue ===
   198 000000BF 58                          pop     eax                 ; Restore pointer to character
   199 000000C0 6683C002                    add     ax,2                ; And add 2 to point to next 2 vertical lines
   200 000000C4 664B                        dec     bx                  ; Decrease line-counter
   201 000000C6 7594                        jnz     Hloop               ; If it's 0 then jump
   202 000000C8 5E                          pop     esi                 ; Restore character-offset to do next char
   203 000000C9 E968FFFFFF                  jmp     Mainthing           ; And start over again
   204                                  
   205                                  QuitNow:                        ; Quit everything
   206 000000CE 58                          pop     eax
   207 000000CF 5E                          pop     esi
   208                                  	
   209 000000D0 E869000000                  call    FadeOut             ; Fade da screen to black
   210 000000D5 E826000000                  call    SetText             ; Get in TXT-mode
   211                                  
   212 000000DA BB[D3020000]                mov     ebx, Message ; message offset
   213 000000DF B9FF000000                  mov     ecx, 255 ; message length 
   214 000000E4 BA0F000000                  mov     edx, 0Fh ; white color
   215 000000E9 B823000000                  mov     eax, 35 ; 'sysmsg'
   216 000000EE CD40                        int     40h     ; TRDOS 386 system call
   217                                  
   218                                  terminate:
   219                                      sys     _exit   ; INT 40h
   220                              <1> 
   221                              <1> 
   222                              <1> 
   223                              <1> 
   224                              <1>  %if %0 >= 2
   225                              <1>  mov ebx, %2
   226                              <1>  %if %0 >= 3
   227                              <1>  mov ecx, %3
   228                              <1>  %if %0 = 4
   229                              <1>  mov edx, %4
   230                              <1>  %endif
   231                              <1>  %endif
   232                              <1>  %endif
   233 000000F0 B801000000          <1>  mov eax, %1
   234                              <1> 
   235 000000F5 CD40                <1>  int 40h
   236                                  here:
   237 000000F7 EBFE                        jmp	    short here
   238                                  
   239                                  ; === PROCEDURES ===
   240                                  
   241                                  SetVGA:				; Get into VGA mode
   242 000000F9 66B81300                    mov     ax,0013h            ; Set the videomode 320*200*256
   243                                      ;int    10h                 ; Call VID interrupt
   244 000000FD CD31                        int     31h ; TRDOS 386 - Video interrupt
   245 000000FF C3                          retn
   246                                  
   247                                  SetText:			; Get into character mode
   248 00000100 66B80300                    mov     ax,0003h            ; Set 80x25x16 char mode
   249                                      ;int    10h                 ; Call VID interrupt
   250 00000104 CD31                        int     31h ; TRDOS 386 - Video interrupt
   251 00000106 C3                          retn
   252                                  
   253                                  WaitVrt:			; Waits for vertical retrace to reduce "snow"
   254 00000107 66BADA03                    mov     dx,3dah
   255 0000010B B400                        mov     ah, 0 ; in (byte)
   256                                  Vrt:
   257                                      ;in     al,dx
   258 0000010D CD34                        int     34h ; TRDOS 386 - IOCTL interrupt
   259 0000010F A808                        test    al, 8
   260 00000111 75FA                        jnz     short Vrt		; Wait until Verticle Retrace starts
   261                                  NoVrt:
   262                                      ;in     al,dx
   263 00000113 CD34                        int     34h ; TRDOS 386 - IOCTL interrupt
   264 00000115 A808                        test    al, 8
   265 00000117 74FA                        jz      short NoVrt		; Wait until Verticle Retrace ends
   266 00000119 C3                          retn                        ; Return to main program
   267                                  
   268                                  SavePalette:			; Saves entire palette in array
   269 0000011A BD[7A130000]                mov     ebp, PaletteArray   ; Point to start of array
   270 0000011F 66B90003                    mov     cx,768              ; Save all R,G,B registers
   271 00000123 66BAC703                    mov     dx,03c7h            ; Read register
   272 00000127 B000                        mov     al,0                ; Start at 0
   273                                      ;out    dx,al               ; Write to port
   274 00000129 B401                        mov     ah, 1 ; out (byte)
   275 0000012B CD34                        int     34h ; TRDOS 386 - IOCTL interrupt
   276 0000012D 66BAC903                    mov     dx,03c9h            ; Read data register
   277 00000131 B400                        mov     ah, 0 ; in (byte)
   278                                  Grab:
   279                                      ;in     al,dx               ; Read value from port
   280 00000133 CD34                        int     34h ; TRDOS 386 - IOCTL interrupt
   281 00000135 243F                        and     al,3fh              ; Mask of upper 2 bits
   282 00000137 884500                      mov     byte [ebp],al       ; Store the value in array
   283 0000013A 45                          inc     ebp                 ; Point to the next one
   284 0000013B E2F6                        loop    Grab                ; Loop until cx = 0
   285 0000013D C3                          retn                        ; Return to main program
   286                                  
   287                                  FadeOut:			; Fades screen to black
   288 0000013E BD[7A130000]                mov     ebp, PaletteArray   ; Point to start of array
   289 00000143 66B94000                    mov     cx,64               ; Repeat 64 times (0..63)
   290                                  OneCycle:
   291 00000147 66BB0000                    mov     bx,0                ; Set counter
   292                                  Decrease:
   293 0000014B 807D0000                    cmp     byte [ebp],0        ; Is it 0 already ?
   294 0000014F 7403                        je      short Fading        ; Yep => Do the next
   295 00000151 FE4D00                      dec     byte [ebp]          ; Nope => Decrease by one
   296                                  Fading:
   297 00000154 45                          inc     ebp                 ; Point to next value
   298 00000155 6643                        inc     bx                  ; Increase counter
   299 00000157 6681FB0003                  cmp     bx,768              ; Have we reached the end ?
   300 0000015C 7CED                        jl      short Decrease      ; No => Do another one
   301 0000015E 6651                        push    cx                  ; Save 1st loop counter
   302 00000160 E8A2FFFFFF                  call    WaitVrt             ; Wait for retrace
   303 00000165 6681ED0003                  sub     bp,768              ; Point to start
   304 0000016A 66BB0000                    mov     bx,0                ; Reset counter
   305 0000016E 66B90003                    mov     cx,768              ; Do all colors
   306 00000172 66BAC803                    mov     dx,03c8h            ; Write register
   307 00000176 B000                        mov     al,0                ; Start at 0
   308                                      ;out    dx,al               ; Write to port
   309 00000178 B401                        mov     ah, 1 ; out (byte)
   310 0000017A CD34                        int     34h ; TRDOS 386 - IOCTL interrupt
   311 0000017C 6642                        inc     dx                  ; Writing => 03c8h + 1 = 03c9h
   312                                  WriteAll:
   313 0000017E 8A4500                      mov     al,byte [ebp]       ; Store value in al
   314                                      ;out    dx,al               ; Give it to the VGA
   315                                      ;mov    ah, 1 ; out (byte)
   316 00000181 CD34                        int     34h ; TRDOS 386 - IOCTL interrupt
   317 00000183 45                          inc     ebp                 ; Point to next one
   318 00000184 6643                        inc     bx                  ; Increase counter
   319 00000186 E2F6                        loop    WriteAll            ; Loop while cx > 0
   320 00000188 6659                        pop     cx                  ; Restore 1st loop counter
   321 0000018A 81ED00030000                sub     ebp,768             ; Point to start
   322 00000190 E2B5                        loop    OneCycle            ; Loop while cx > 0
   323 00000192 C3                          retn                        ; Return to main program
   324                                  
   325                                  CalcStar:
   326 00000193 60                          pusha                               ; Put all registers on stack
   327 00000194 BE[7A160000]                mov     esi, Stars                  ; si points to first star
   328                                  StartCalc:                              ; Start searching for empty slots
   329 00000199 66813D[36130000]FA-         cmp     word [NumActive], MaxStars  ; Check for room
   330 000001A1 00                 
   331 000001A2 0F8391000000                jae     NoEmptySpace		; No room => exit
   332                                  
   333                                  SearchSlot:
   334 000001A8 66837E0400                  cmp     word [Stars_Z+esi],MinZ  ; If Z = 0 then slot is empty
   335 000001AD 740D                        je      short FillSlot
   336                                  
   337 000001AF 83C609                      add     esi,StarStrucSize           ; si points to next star
   338 000001B2 81FE[441F0000]              cmp     esi,Stars+(StarStrucSize*MaxStars) ; Have we done entire array ?
   339 000001B8 72EE                        jb      short SearchSlot		; No => search again
   340 000001BA EB7D                        jmp     short NoEmptySpace		; Yes => exit
   341                                  
   342                                  FillSlot:
   343 000001BC 668B1D[30130000]            mov     bx,[XIndex]                 ; Grab Xindex and put it in di
   344 000001C3 6601DB                      add     bx,bx                       ; Make WORD index
   345 000001C6 668B83[460F0000]            mov     ax,[Numbers+ebx]            ; Get the number
   346 000001CD 66C1E003                    shl     ax,3                        ; Multiply by 8   
   347 000001D1 668906                      mov     [Stars_X+esi],ax            ; Save the number
   348                                  
   349 000001D4 668B1D[32130000]            mov     bx,[YIndex]                 ; Do the same for Y
   350 000001DB 6601DB                      add     bx,bx
   351 000001DE 668B83[460F0000]            mov     ax,[Numbers+ebx]
   352 000001E5 66C1E003                    shl     ax,3
   353 000001E9 66894602                    mov     [Stars_Y+esi],ax
   354                                  
   355 000001ED 66C746040010                mov     word [Stars_Z+esi],MaxZ     ; Give star the Z offset
   356 000001F3 B000                        mov     al,0                        ; Also give it basecolor 0 (black)   
   357 000001F5 884608                      mov     [Stars_Col+esi],al          ; Store the color
   358                                  
   359 000001F8 66FF05[36130000]            inc     word [NumActive]            ; Increase star counter
   360                                  
   361 000001FF 66FF05[30130000]            inc     word [XIndex]               ; Increase the X index
   362 00000206 66813D[30130000]F4-         cmp     word [XIndex],MaxNumbers    ; Have we reached the end of the list?
   363 0000020E 01                 
   364 0000020F 7209                        jb      short XindNotMax            ; No => continue
   365 00000211 66C705[30130000]00-         mov     word [XIndex],0             ; Yes => go to start of list
   366 00000219 00                 
   367                                  
   368                                  XindNotMax:
   369 0000021A 66FF05[32130000]            inc     word [YIndex]               ; Increase the Y index   
   370 00000221 66813D[32130000]F4-         cmp     word [YIndex],MaxNumbers    ; Have we reached the end of the list?
   371 00000229 01                 
   372 0000022A 0F8269FFFFFF                jb      StartCalc                   ; No => continue
   373 00000230 66C705[32130000]00-         mov     word [YIndex],0             ; Yes => go to start of list
   374 00000238 00                 
   375                                      
   376                                  NoEmptySpace:
   377 00000239 61                          popa                                ; Restore all registers
   378 0000023A C3                          retn                                ; Return to main program   
   379                                  
   380                                  ShowStars:
   381 0000023B 60                          pusha                        ; Save all registers
   382 0000023C BE[7A160000]                mov     esi, Stars           ; si points to first record
   383                                  ShowLoop:
   384 00000241 668B4E04                    mov     cx,[Stars_Z+esi]     ; Grab Z value of star
   385 00000245 6683F900                    cmp     cx,0                 ; If Z = 0 then exit
   386 00000249 7477                        je      short ContinueStar   ; Do the next star
   387                                  
   388 0000024B 668B7E06                    mov     di,[Stars_Old+esi]   ; Get old position of star
   389 0000024F C60700                      mov     byte [edi],0         ; Erase the old star
   390                                  
   391 00000252 668B06                      mov     ax,[Stars_X+esi]     ; Grab X value of star
   392 00000255 66BA0001                    mov     dx,256               ; Multiply X with 256
   393 00000259 66F7EA                      imul    dx
   394 0000025C 66F7F9                      idiv    cx                   ; Divide by Z
   395 0000025F 6605A000                    add     ax,ScreenWidth/2     ; Add 160 to center it on the screen
   396 00000263 6689C7                      mov     di,ax                ; di = X
   397 00000266 6681FF4001                  cmp     di,ScreenWidth       ; Is the star in range ?
   398 0000026B 7348                        jae     short TermStar       ; No => Do next star
   399                                  
   400 0000026D 668B4602                    mov     ax,[Stars_Y+esi]     ; Grab an Y value
   401 00000271 66BA0001                    mov     dx,256               ; Multiply Y with 256
   402 00000275 66F7EA                      imul    dx
   403 00000278 66F7F9                      idiv    cx                   ; Divide by Z (a bit slow but who carez)
   404 0000027B 6683C064                    add     ax,ScreenHeight/2    ; Add 100 to center it on the screen
   405 0000027F 663DC800                    cmp     ax,ScreenHeight      ; Is the star in range ?
   406 00000283 7330                        jae     short TermStar       ; No => Do next star
   407 00000285 6683F85A                    cmp     ax,90                ; Do not affect scroller
   408 00000289 7C06                        jl      short InRange
   409 0000028B 6683F864                    cmp     ax,100               ; Text scrolls between 90 & 100
   410 0000028F 7624                        jna     short TermStar       ; Star affects scroller so terminate it
   411                                  
   412                                  InRange:
   413 00000291 6669C04001                  imul    ax,ScreenWidth       ; ax = Y * ScreenWidth
   414 00000296 6601C7                      add     di,ax                ; di = X + (Y * 320) 
   415                                  
   416 00000299 66897E06                    mov     [Stars_Old+esi],di   ; Save the position
   417                                  
   418 0000029D 026E08                      add     ch,[Stars_Col+esi]   ; Divide Z by 256 & add basecolor 0
   419 000002A0 88E8                        mov     al,ch                ; Move color into al
   420 000002A2 0405                        add     al,5                 ; Add 5 to avoid fontcolors
   421                                  
   422 000002A4 8807                        mov     byte [edi],al  	 ; Place the dot on the screen
   423                                  
   424 000002A6 66A1[34130000]              mov     ax,[WarpSpeed]
   425 000002AC 6629C1                      sub     cx,ax                ; Decrease Z with WarpSpeed
   426 000002AF 66894E04                    mov     [Stars_Z+esi],cx     ; Save the new Z
   427                                  
   428 000002B3 EB0D                        jmp     short ContinueStar   ; Do the next star
   429                                  
   430                                  TermStar:
   431 000002B5 66C746040000                mov     word [Stars_Z+esi],MinZ ; Set Z to 0 => Star is terminated
   432 000002BB 66FF0D[36130000]            dec     word [NumActive]     ; Decrease number of active stars
   433                                  
   434                                  ContinueStar:
   435 000002C2 83C609                      add     esi,StarStrucSize    ; si points to next record
   436 000002C5 81FE[441F0000]              cmp     esi,Stars+(StarStrucSize*MaxStars) ; Reached end of array ?
   437 000002CB 0F8270FFFFFF                jb      ShowLoop             ; Continue with next star
   438                                  
   439 000002D1 61                          popa                         ; Restore all registers
   440 000002D2 C3                          retn                         ; Return to main program
   441                                  
   442                                  ; === DATA ===   
   443                                  
   444                                  ;%include 'FONT.DAT'    ; File with font data
   445                                  ;%include 'NUMBERS.DAT' ; Include 500 random numbers between -200 and 200
   446                                  
   447                                  ;Message: DB   13,10,"Code by Vulture.",13,10,"$"  ; Important message  :)
   448 000002D3 0D0A436F6465206279-     Message: DB   13,10,"Code by Vulture.",13,10
   449 000002DC 2056756C747572652E-
   450 000002E5 0D0A               
   451 000002E7 526570726F6772616D-     NewMessage: DB "Reprogrammed by Erdogan Tan (via NASM), 02/10/2016." 
   452 000002F0 6D6564206279204572-
   453 000002F9 646F67616E2054616E-
   454 00000302 2028766961204E4153-
   455 0000030B 4D292C2030322F3130-
   456 00000314 2F323031362E       
   457 0000031A 0D0A00                           DB 13, 10, 0
   458                                  Text:
   459 0000031D 696620752077616E6E-             DB 'if u wanna experience some cewl boardz in the netherlands '
   460 00000326 612065787065726965-
   461 0000032F 6E636520736F6D6520-
   462 00000338 6365776C20626F6172-
   463 00000341 647A20696E20746865-
   464 0000034A 206E65746865726C61-
   465 00000353 6E647320           
   466 00000357 63616C6C2066697265-             DB 'call firehouse 058-661590    detonator 05111-4307   or   '
   467 00000360 686F75736520303538-
   468 00000369 2D3636313539302020-
   469 00000372 20206465746F6E6174-
   470 0000037B 6F722030353131312D-
   471 00000384 343330372020206F72-
   472 0000038D 202020             
   473 00000390 6D61726B206F662063-             DB 'mark of cain 058-672111      cu around. . . . . .'
   474 00000399 61696E203035382D36-
   475 000003A2 373231313120202020-
   476 000003AB 202063752061726F75-
   477 000003B4 6E642E202E202E202E-
   478 000003BD 202E202E           
   479 000003C1 202020202020202020-             DB '                            ', 0           ; Text to scroll
   480 000003CA 202020202020202020-
   481 000003D3 202020202020202020-
   482 000003DC 2000               
   483                                  
   484 000003DE 616263646566676869-     Order:  DB 'abcdefghijklmnopqrstuvwxyz0123456789-. '  ; Order of characters
   485 000003E7 6A6B6C6D6E6F707172-
   486 000003F0 737475767778797A30-
   487 000003F9 313233343536373839-
   488 00000402 2D2E20             
   489                                  
   490 00000405 90                      align 2
   491                                  
   492                                  Font:
   493 00000406 000202020202000002-     db 0,2,2,2,2,2,0,0,2,2,2,2,2,2,0,0,0,2,2,2
   494 0000040F 020202020200000002-
   495 00000418 0202               
   496 0000041A 020200000202020202-     db 2,2,0,0,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,0
   497 00000423 020000020202020202-
   498 0000042C 0200               
   499 0000042E 020202020202030000-     db 2,2,2,2,2,2,3,0,0,2,2,2,2,2,0,0,2,2,0,0
   500 00000437 020202020200000202-
   501 00000440 0000               
   502 00000442 000202000202020202-     db 0,2,2,0,2,2,2,2,2,3,3,0,0,0,0,0,0,2,3,0
   503 0000044B 030300000000000002-
   504 00000454 0300               
   505 00000456 020200000002030002-     db 2,2,0,0,0,2,3,0,2,2,0,0,0,0,0,0,2,2,3,0
   506 0000045F 020000000000000202-
   507 00000468 0300               
   508 0000046A 020202000202020202-     db 2,2,2,0,2,2,2,2,2,2,0,0,0,2,2,2,2,2,0,0
   509 00000473 020000000202020202-
   510 0000047C 0000               
   511 0000047E 020202020202000000-     db 2,2,2,2,2,2,0,0,0,2,2,2,2,2,0,0,2,2,2,2
   512 00000487 020202020200000202-
   513 00000490 0202               
   514 00000492 020200000002020202-     db 2,2,0,0,0,2,2,2,2,2,2,0,2,2,2,2,2,3,3,0
   515 0000049B 020200020202020203-
   516 000004A4 0300               
   517 000004A6 020200000002020002-     db 2,2,0,0,0,2,2,0,2,3,0,0,0,2,2,0,2,2,0,0
   518 000004AF 030000000202000202-
   519 000004B8 0000               
   520 000004BA 000202000202000000-     db 0,2,2,0,2,2,0,0,0,2,2,0,2,2,0,0,0,2,2,0
   521 000004C3 020200020200000002-
   522 000004CC 0200               
   523 000004CE 020202020202020000-     db 2,2,2,2,2,2,2,0,0,0,2,2,2,2,2,0,0,0,0,0
   524 000004D7 000202020202000000-
   525 000004E0 0000               
   526 000004E2 020200000002020202-     db 2,2,0,0,0,2,2,2,2,2,2,0,0,2,2,2,2,2,2,0
   527 000004EB 020200000202020202-
   528 000004F4 0200               
   529 000004F6 000202000000020200-     db 0,2,2,0,0,0,2,2,0,2,2,2,2,2,2,2,0,0,2,2
   530 000004FF 020202020202020000-
   531 00000508 0202               
   532 0000050A 020202000002020202-     db 2,2,2,0,0,2,2,2,2,2,2,0,0,0,2,2,2,2,2,0
   533 00000513 020200000002020202-
   534 0000051C 0200               
   535 0000051E 000002020202020000-     db 0,0,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0
   536 00000527 000000000000000000-
   537 00000530 0000               
   538 00000532 000000000000000000-     db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   539 0000053B 000000000000000000-
   540 00000544 0000               
   541 00000546 020200000002020002-     db 2,2,0,0,0,2,2,0,2,2,0,0,0,2,2,0,2,2,0,0
   542 0000054F 020000000202000202-
   543 00000558 0000               
   544 0000055A 000203000202000003-     db 0,2,3,0,2,2,0,0,3,2,3,0,2,2,0,0,0,0,0,0
   545 00000563 020300020200000000-
   546 0000056C 0000               
   547 0000056E 020200000000000002-     db 2,2,0,0,0,0,0,0,2,2,0,0,0,2,3,0,2,2,0,0
   548 00000577 020000000203000202-
   549 00000580 0000               
   550 00000582 000203000000020200-     db 0,2,3,0,0,0,2,2,0,0,0,0,0,0,0,0,0,2,3,0
   551 0000058B 000000000000000002-
   552 00000594 0300               
   553 00000596 020200000203000002-     db 2,2,0,0,2,3,0,0,2,2,0,0,0,0,0,0,2,2,2,2
   554 0000059F 020000000000000202-
   555 000005A8 0202               
   556 000005AA 030203000203000003-     db 3,2,3,0,2,3,0,0,3,2,3,0,2,2,0,0,0,2,3,0
   557 000005B3 020300020200000002-
   558 000005BC 0300               
   559 000005BE 020200000002020002-     db 2,2,0,0,0,2,2,0,2,2,0,0,0,2,2,0,2,2,0,0
   560 000005C7 020000000202000202-
   561 000005D0 0000               
   562 000005D2 000202000202000000-     db 0,2,2,0,2,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0
   563 000005DB 000000000002020000-
   564 000005E4 0000               
   565 000005E6 020300000002030002-     db 2,3,0,0,0,2,3,0,2,3,0,0,0,2,3,0,2,3,0,0
   566 000005EF 030000000203000203-
   567 000005F8 0000               
   568 000005FA 000203000302030003-     db 0,2,3,0,3,2,3,0,3,2,3,0,2,2,0,0,0,2,3,0
   569 00000603 020300020200000002-
   570 0000060C 0300               
   571 0000060E 000000000002020000-     db 0,0,0,0,0,2,2,0,0,2,2,0,0,0,2,3,0,0,0,0
   572 00000617 020200000002030000-
   573 00000620 0000               
   574 00000622 020200000000000000-     db 2,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,2,2
   575 0000062B 000202000000000000-
   576 00000634 0202               
   577 00000636 000203000000020300-     db 0,2,3,0,0,0,2,3,0,2,2,0,0,0,0,0,0,2,2,0
   578 0000063F 020200000000000002-
   579 00000648 0200               
   580 0000064A 000002030000000000-     db 0,0,2,3,0,0,0,0,0,3,2,3,0,2,2,0,0,0,2,3
   581 00000653 030203000202000000-
   582 0000065C 0203               
   583 0000065E 000202000000020300-     db 0,2,2,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0
   584 00000667 000000000000000000-
   585 00000670 0000               
   586 00000672 000000000000000000-     db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   587 0000067B 000000000000000000-
   588 00000684 0000               
   589 00000686 020200000002020002-     db 2,2,0,0,0,2,2,0,2,2,0,0,0,2,2,0,2,3,0,0
   590 0000068F 020000000202000203-
   591 00000698 0000               
   592 0000069A 000000000203000000-     db 0,0,0,0,2,3,0,0,0,2,3,0,2,3,0,0,0,0,0,0
   593 000006A3 020300020300000000-
   594 000006AC 0000               
   595 000006AE 020300000000000002-     db 2,3,0,0,0,0,0,0,2,3,0,0,0,0,0,0,2,3,0,0
   596 000006B7 030000000000000203-
   597 000006C0 0000               
   598 000006C2 000203000000020300-     db 0,2,3,0,0,0,2,3,0,0,0,0,0,0,0,0,0,2,3,0
   599 000006CB 000000000000000002-
   600 000006D4 0300               
   601 000006D6 020300020300000002-     db 2,3,0,2,3,0,0,0,2,3,0,0,0,0,0,0,2,3,0,3
   602 000006DF 030000000000000203-
   603 000006E8 0003               
   604 000006EA 000203000203000000-     db 0,2,3,0,2,3,0,0,0,2,3,0,2,3,0,0,0,2,3,0
   605 000006F3 020300020300000002-
   606 000006FC 0300               
   607 000006FE 020200000002030002-     db 2,2,0,0,0,2,3,0,2,3,0,0,0,2,3,0,2,2,0,0
   608 00000707 030000000203000202-
   609 00000710 0000               
   610 00000712 000203000203000000-     db 0,2,3,0,2,3,0,0,0,0,0,0,0,0,2,3,0,0,0,0
   611 0000071B 000000000002030000-
   612 00000724 0000               
   613 00000726 020300000002030002-     db 2,3,0,0,0,2,3,0,2,2,0,0,0,2,3,0,2,3,0,0
   614 0000072F 020000000203000203-
   615 00000738 0000               
   616 0000073A 000203000003020302-     db 0,2,3,0,0,3,2,3,2,3,0,0,2,2,3,0,2,2,3,0
   617 00000743 030000020203000202-
   618 0000074C 0300               
   619 0000074E 000000000302030000-     db 0,0,0,0,3,2,3,0,0,2,3,0,0,2,2,3,0,0,0,2
   620 00000757 020300000202030000-
   621 00000760 0002               
   622 00000762 020300000000000000-     db 2,3,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,2,2
   623 0000076B 000202000000000000-
   624 00000774 0202               
   625 00000776 000203000000020300-     db 0,2,3,0,0,0,2,3,0,2,2,0,0,0,0,0,0,2,3,0
   626 0000077F 020200000000000002-
   627 00000788 0300               
   628 0000078A 000000000000000000-     db 0,0,0,0,0,0,0,0,0,0,2,3,0,2,3,0,0,0,2,3
   629 00000793 000203000203000000-
   630 0000079C 0203               
   631 0000079E 000203000000020300-     db 0,2,3,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0
   632 000007A7 000000000000000000-
   633 000007B0 0000               
   634 000007B2 000000000000000000-     db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   635 000007BB 000000000000000000-
   636 000007C4 0000               
   637 000007C6 020202030302020002-     db 2,2,2,3,3,2,2,0,2,2,2,3,3,2,0,0,2,3,0,0
   638 000007CF 020203030200000203-
   639 000007D8 0000               
   640 000007DA 000000000203000000-     db 0,0,0,0,2,3,0,0,0,2,3,0,2,3,2,2,2,3,0,0
   641 000007E3 020300020302020203-
   642 000007EC 0000               
   643 000007EE 020302020203000002-     db 2,3,2,2,2,3,0,0,2,3,0,0,2,2,2,0,2,3,2,2
   644 000007F7 030000020202000203-
   645 00000800 0202               
   646 00000802 020203000000020300-     db 2,2,3,0,0,0,2,3,0,0,0,0,0,0,0,0,0,2,3,0
   647 0000080B 000000000000000002-
   648 00000814 0300               
   649 00000816 020302020000000002-     db 2,3,2,2,0,0,0,0,2,3,0,0,0,0,0,0,2,3,0,0
   650 0000081F 030000000000000203-
   651 00000828 0000               
   652 0000082A 000203000203000000-     db 0,2,3,0,2,3,0,0,0,2,3,0,2,3,0,0,0,2,3,0
   653 00000833 020300020300000002-
   654 0000083C 0300               
   655 0000083E 020202030203000002-     db 2,2,2,3,2,3,0,0,2,3,0,0,0,2,3,0,2,2,2,3
   656 00000847 030000000203000202-
   657 00000850 0203               
   658 00000852 020300000002020202-     db 2,3,0,0,0,2,2,2,2,2,0,0,0,0,2,3,0,0,0,0
   659 0000085B 020000000002030000-
   660 00000864 0000               
   661 00000866 020300000002030003-     db 2,3,0,0,0,2,3,0,3,2,3,0,2,2,3,0,2,3,0,2
   662 0000086F 020300020203000203-
   663 00000878 0002               
   664 0000087A 000203000000030203-     db 0,2,3,0,0,0,3,2,3,0,0,0,0,2,2,3,2,3,0,0
   665 00000883 000000000202030203-
   666 0000088C 0000               
   667 0000088E 000202020203000000-     db 0,2,2,2,2,3,0,0,0,2,3,0,2,2,2,3,0,0,0,0
   668 00000897 020300020202030000-
   669 000008A0 0000               
   670 000008A2 020300000000020202-     db 2,3,0,0,0,0,2,2,2,3,2,0,0,0,0,2,2,3,2,0
   671 000008AB 030200000000020203-
   672 000008B4 0200               
   673 000008B6 000202020202020300-     db 0,2,2,2,2,2,2,3,0,2,2,2,3,3,3,0,0,2,3,3
   674 000008BF 020202030303000002-
   675 000008C8 0303               
   676 000008CA 020202000000000000-     db 2,2,2,0,0,0,0,0,0,0,2,3,0,0,2,2,2,2,2,0
   677 000008D3 000203000002020202-
   678 000008DC 0200               
   679 000008DE 000002020202020300-     db 0,0,2,2,2,2,2,3,0,0,2,2,2,2,0,0,0,0,0,0
   680 000008E7 000202020200000000-
   681 000008F0 0000               
   682 000008F2 000000000000000000-     db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   683 000008FB 000000000000000000-
   684 00000904 0000               
   685 00000906 020203000002030002-     db 2,2,3,0,0,2,3,0,2,2,2,0,0,2,2,0,2,2,3,0
   686 0000090F 020200000202000202-
   687 00000918 0300               
   688 0000091A 000000000202030000-     db 0,0,0,0,2,2,3,0,0,2,3,0,2,2,2,0,0,0,0,0
   689 00000923 020300020202000000-
   690 0000092C 0000               
   691 0000092E 020203000000000002-     db 2,2,3,0,0,0,0,0,2,2,3,0,0,2,3,0,2,2,3,0
   692 00000937 020300000203000202-
   693 00000940 0300               
   694 00000942 000203000000020203-     db 0,2,3,0,0,0,2,2,3,0,0,0,0,0,0,0,2,2,3,0
   695 0000094B 000000000000000202-
   696 00000954 0300               
   697 00000956 020202020300000002-     db 2,2,2,2,3,0,0,0,2,2,3,0,0,0,0,0,2,2,3,0
   698 0000095F 020300000000000202-
   699 00000968 0300               
   700 0000096A 000203000202030000-     db 0,2,3,0,2,2,3,0,0,2,3,0,2,2,3,0,0,2,3,0
   701 00000973 020300020203000002-
   702 0000097C 0300               
   703 0000097E 020203000000000002-     db 2,2,3,0,0,0,0,0,2,2,3,0,0,2,3,0,2,2,3,0
   704 00000987 020300000203000202-
   705 00000990 0300               
   706 00000992 030203000000000003-     db 3,2,3,0,0,0,0,0,3,2,2,0,0,0,2,2,3,0,0,0
   707 0000099B 020200000002020300-
   708 000009A4 0000               
   709 000009A6 020203000002030000-     db 2,2,3,0,0,2,3,0,0,2,2,0,2,2,0,0,2,2,0,2
   710 000009AF 020200020200000202-
   711 000009B8 0002               
   712 000009BA 000203000000020203-     db 0,2,3,0,0,0,2,2,3,0,0,0,0,0,2,2,3,0,0,0
   713 000009C3 000000000002020300-
   714 000009CC 0000               
   715 000009CE 020202030000000000-     db 2,2,2,3,0,0,0,0,0,2,2,2,2,3,2,3,0,0,0,0
   716 000009D7 020202020302030000-
   717 000009E0 0000               
   718 000009E2 020300000002020203-     db 2,3,0,0,0,2,2,2,3,0,0,0,0,0,0,0,0,0,2,2
   719 000009EB 000000000000000000-
   720 000009F4 0202               
   721 000009F6 000000000000020300-     db 0,0,0,0,0,0,2,3,0,0,0,0,3,2,2,2,0,2,2,3
   722 000009FF 000000030202020002-
   723 00000A08 0203               
   724 00000A0A 000002030000000000-     db 0,0,2,3,0,0,0,0,0,0,2,3,0,2,2,3,0,0,2,3
   725 00000A13 000203000202030000-
   726 00000A1C 0203               
   727 00000A1E 000000000000020300-     db 0,0,0,0,0,0,2,3,0,0,3,3,3,3,0,0,0,0,0,0
   728 00000A27 000303030300000000-
   729 00000A30 0000               
   730 00000A32 000000000000000000-     db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   731 00000A3B 000000000000000000-
   732 00000A44 0000               
   733 00000A46 020203000002030002-     db 2,2,3,0,0,2,3,0,2,2,3,0,0,2,3,0,2,2,3,0
   734 00000A4F 020300000203000202-
   735 00000A58 0300               
   736 00000A5A 000202000202030000-     db 0,2,2,0,2,2,3,0,0,2,3,0,2,2,3,0,0,0,0,0
   737 00000A63 020300020203000000-
   738 00000A6C 0000               
   739 00000A6E 020203000000000002-     db 2,2,3,0,0,0,0,0,2,2,3,0,0,2,3,0,2,2,3,0
   740 00000A77 020300000203000202-
   741 00000A80 0300               
   742 00000A82 000203000000020203-     db 0,2,3,0,0,0,2,2,3,0,0,0,2,2,0,0,2,2,3,0
   743 00000A8B 000000020200000202-
   744 00000A94 0300               
   745 00000A96 020203020203000002-     db 2,2,3,2,2,3,0,0,2,2,3,0,0,0,0,0,2,2,3,0
   746 00000A9F 020300000000000202-
   747 00000AA8 0300               
   748 00000AAA 000203000202030000-     db 0,2,3,0,2,2,3,0,0,2,3,0,2,2,3,0,0,2,3,0
   749 00000AB3 020300020203000002-
   750 00000ABC 0300               
   751 00000ABE 020203000000000002-     db 2,2,3,0,0,0,0,0,2,2,3,0,0,2,3,0,2,2,3,0
   752 00000AC7 020300000203000202-
   753 00000AD0 0300               
   754 00000AD2 000203000000000000-     db 0,2,3,0,0,0,0,0,0,2,3,0,0,0,2,2,3,0,0,0
   755 00000ADB 020300000002020300-
   756 00000AE4 0000               
   757 00000AE6 020203000002030000-     db 2,2,3,0,0,2,3,0,0,3,2,3,2,3,0,0,2,2,0,2
   758 00000AEF 030203020300000202-
   759 00000AF8 0002               
   760 00000AFA 000203000002020302-     db 0,2,3,0,0,2,2,3,2,3,0,0,0,0,2,2,3,0,0,0
   761 00000B03 030000000002020300-
   762 00000B0C 0000               
   763 00000B0E 020203000000000000-     db 2,2,3,0,0,0,0,0,0,2,2,3,3,0,2,3,0,0,0,0
   764 00000B17 020203030002030000-
   765 00000B20 0000               
   766 00000B22 020300000002020300-     db 2,3,0,0,0,2,2,3,0,0,0,0,0,0,0,0,0,0,2,3
   767 00000B2B 000000000000000000-
   768 00000B34 0203               
   769 00000B36 000000000000020300-     db 0,0,0,0,0,0,2,3,0,0,0,0,0,2,2,3,0,2,2,3
   770 00000B3F 000000000202030002-
   771 00000B48 0203               
   772 00000B4A 000002030000000000-     db 0,0,2,3,0,0,0,0,0,0,2,3,0,2,2,3,0,0,2,3
   773 00000B53 000203000202030000-
   774 00000B5C 0203               
   775 00000B5E 000000000000020300-     db 0,0,0,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0
   776 00000B67 000000000000000000-
   777 00000B70 0000               
   778 00000B72 000000000000000000-     db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   779 00000B7B 000000000000000000-
   780 00000B84 0000               
   781 00000B86 020203000002030002-     db 2,2,3,0,0,2,3,0,2,2,3,0,0,2,3,0,2,2,3,0
   782 00000B8F 020300000203000202-
   783 00000B98 0300               
   784 00000B9A 000203000202030000-     db 0,2,3,0,2,2,3,0,0,2,3,0,2,2,3,0,0,0,0,0
   785 00000BA3 020300020203000000-
   786 00000BAC 0000               
   787 00000BAE 020203000000000002-     db 2,2,3,0,0,0,0,0,2,2,3,0,0,2,3,0,2,2,3,0
   788 00000BB7 020300000203000202-
   789 00000BC0 0300               
   790 00000BC2 000203000000020203-     db 0,2,3,0,0,0,2,2,3,0,0,0,2,3,0,0,2,2,3,0
   791 00000BCB 000000020300000202-
   792 00000BD4 0300               
   793 00000BD6 020203000202000002-     db 2,2,3,0,2,2,0,0,2,2,3,0,0,0,0,0,2,2,3,0
   794 00000BDF 020300000000000202-
   795 00000BE8 0300               
   796 00000BEA 000203000202030000-     db 0,2,3,0,2,2,3,0,0,2,3,0,2,2,3,0,0,2,3,0
   797 00000BF3 020300020203000002-
   798 00000BFC 0300               
   799 00000BFE 020203000000000002-     db 2,2,3,0,0,0,0,0,2,2,3,0,0,2,0,0,2,2,3,0
   800 00000C07 020300000200000202-
   801 00000C10 0300               
   802 00000C12 000203000000000000-     db 0,2,3,0,0,0,0,0,0,2,3,0,0,0,2,2,3,0,0,0
   803 00000C1B 020300000002020300-
   804 00000C24 0000               
   805 00000C26 020203000002030000-     db 2,2,3,0,0,2,3,0,0,0,2,2,2,0,0,0,2,2,0,2
   806 00000C2F 000202020000000202-
   807 00000C38 0002               
   808 00000C3A 000203000202030002-     db 0,2,3,0,2,2,3,0,2,2,3,0,0,0,2,2,3,0,0,0
   809 00000C43 020300000002020300-
   810 00000C4C 0000               
   811 00000C4E 020203000000000000-     db 2,2,3,0,0,0,0,0,0,2,2,3,0,0,2,3,0,0,0,0
   812 00000C57 020203000002030000-
   813 00000C60 0000               
   814 00000C62 020300000002020300-     db 2,3,0,0,0,2,2,3,0,0,0,0,0,0,0,0,0,0,2,3
   815 00000C6B 000000000000000000-
   816 00000C74 0203               
   817 00000C76 000000000000020300-     db 0,0,0,0,0,0,2,3,0,0,0,0,0,2,2,3,0,2,2,3
   818 00000C7F 000000000202030002-
   819 00000C88 0203               
   820 00000C8A 000002030000000000-     db 0,0,2,3,0,0,0,0,0,0,2,3,0,2,2,3,0,0,2,3
   821 00000C93 000203000202030000-
   822 00000C9C 0203               
   823 00000C9E 000000000000020300-     db 0,0,0,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,2
   824 00000CA7 000000000000000000-
   825 00000CB0 0002               
   826 00000CB2 030000000000000000-     db 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   827 00000CBB 000000000000000000-
   828 00000CC4 0000               
   829 00000CC6 020203000002030002-     db 2,2,3,0,0,2,3,0,2,2,3,0,0,2,3,0,2,2,3,0
   830 00000CCF 020300000203000202-
   831 00000CD8 0300               
   832 00000CDA 000203000202030003-     db 0,2,3,0,2,2,3,0,3,2,3,0,2,2,3,0,0,0,0,0
   833 00000CE3 020300020203000000-
   834 00000CEC 0000               
   835 00000CEE 020203000000000002-     db 2,2,3,0,0,0,0,0,2,2,3,0,0,2,3,0,2,2,3,0
   836 00000CF7 020300000203000202-
   837 00000D00 0300               
   838 00000D02 000203000000020203-     db 0,2,3,0,0,0,2,2,3,0,0,0,2,3,0,0,2,2,3,0
   839 00000D0B 000000020300000202-
   840 00000D14 0300               
   841 00000D16 020203000302030002-     db 2,2,3,0,3,2,3,0,2,2,3,0,0,0,0,0,2,2,3,0
   842 00000D1F 020300000000000202-
   843 00000D28 0300               
   844 00000D2A 000203000202030000-     db 0,2,3,0,2,2,3,0,0,2,3,0,2,2,3,0,0,2,3,0
   845 00000D33 020300020203000002-
   846 00000D3C 0300               
   847 00000D3E 020203000000000002-     db 2,2,3,0,0,0,0,0,2,2,3,0,2,2,2,0,2,2,3,0
   848 00000D47 020300020202000202-
   849 00000D50 0300               
   850 00000D52 000203000000000003-     db 0,2,3,0,0,0,0,0,3,2,3,0,0,0,2,2,3,0,0,0
   851 00000D5B 020300000002020300-
   852 00000D64 0000               
   853 00000D66 020203000002030000-     db 2,2,3,0,0,2,3,0,0,0,3,2,3,0,0,0,2,2,2,2
   854 00000D6F 000302030000000202-
   855 00000D78 0202               
   856 00000D7A 030203000202000000-     db 3,2,3,0,2,2,0,0,0,2,3,0,0,0,2,2,3,0,0,0
   857 00000D83 020300000002020300-
   858 00000D8C 0000               
   859 00000D8E 020203000000000000-     db 2,2,3,0,0,0,0,0,0,2,2,3,0,0,2,3,0,0,0,0
   860 00000D97 020203000002030000-
   861 00000DA0 0000               
   862 00000DA2 020200000002020300-     db 2,2,0,0,0,2,2,3,0,0,0,0,0,0,0,0,0,0,2,3
   863 00000DAB 000000000000000000-
   864 00000DB4 0203               
   865 00000DB6 000000000000020300-     db 0,0,0,0,0,0,2,3,0,0,0,0,3,2,2,3,0,2,2,3
   866 00000DBF 000000030202030002-
   867 00000DC8 0203               
   868 00000DCA 000002030000000000-     db 0,0,2,3,0,0,0,0,0,0,2,3,0,2,2,3,0,0,2,3
   869 00000DD3 000203000202030000-
   870 00000DDC 0203               
   871 00000DDE 000000000003020300-     db 0,0,0,0,0,3,2,3,0,0,0,0,0,0,0,0,0,0,0,2
   872 00000DE7 000000000000000000-
   873 00000DF0 0002               
   874 00000DF2 030000000000000000-     db 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   875 00000DFB 000000000000000000-
   876 00000E04 0000               
   877 00000E06 030303000003030003-     db 3,3,3,0,0,3,3,0,3,3,3,3,3,3,0,0,0,3,3,3
   878 00000E0F 030303030300000003-
   879 00000E18 0303               
   880 00000E1A 030300000303030303-     db 3,3,0,0,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,0
   881 00000E23 030000030303030303-
   882 00000E2C 0300               
   883 00000E2E 030303000000000000-     db 3,3,3,0,0,0,0,0,0,3,3,3,3,3,0,0,3,3,3,0
   884 00000E37 030303030300000303-
   885 00000E40 0300               
   886 00000E42 000203000202020303-     db 0,2,3,0,2,2,2,3,3,3,3,0,0,2,3,3,3,3,0,0
   887 00000E4B 030300000203030303-
   888 00000E54 0000               
   889 00000E56 030303000002030003-     db 3,3,3,0,0,2,3,0,3,3,3,3,3,3,3,0,3,3,3,0
   890 00000E5F 030303030303000303-
   891 00000E68 0300               
   892 00000E6A 000303000303030000-     db 0,3,3,0,3,3,3,0,0,3,3,0,0,3,3,3,3,3,0,0
   893 00000E73 030300000303030303-
   894 00000E7C 0000               
   895 00000E7E 030303000000000000-     db 3,3,3,0,0,0,0,0,0,3,3,3,2,3,3,0,3,3,3,0
   896 00000E87 030303020303000303-
   897 00000E90 0300               
   898 00000E92 000203000303030303-     db 0,2,3,0,3,3,3,3,3,3,0,0,0,0,2,3,3,0,0,0
   899 00000E9B 030000000002030300-
   900 00000EA4 0000               
   901 00000EA6 000303030303000000-     db 0,3,3,3,3,3,0,0,0,0,0,3,0,0,0,0,0,3,3,3
   902 00000EAF 000003000000000003-
   903 00000EB8 0303               
   904 00000EBA 030300000203000000-     db 3,3,0,0,2,3,0,0,0,2,3,0,0,0,2,3,3,0,0,0
   905 00000EC3 020300000002030300-
   906 00000ECC 0000               
   907 00000ECE 030303030303030000-     db 3,3,3,3,3,3,3,0,0,0,3,3,3,3,3,0,0,2,2,2
   908 00000ED7 000303030303000002-
   909 00000EE0 0202               
   910 00000EE2 020303030003030303-     db 2,3,3,3,0,3,3,3,3,3,3,3,0,3,3,3,3,3,3,0
   911 00000EEB 030303000303030303-
   912 00000EF4 0300               
   913 00000EF6 000000000000020300-     db 0,0,0,0,0,0,2,3,0,3,3,3,3,3,3,0,0,0,3,3
   914 00000EFF 030303030303000000-
   915 00000F08 0303               
   916 00000F0A 030303000000000000-     db 3,3,3,0,0,0,0,0,0,0,3,3,0,0,3,3,3,3,3,0
   917 00000F13 000303000003030303-
   918 00000F1C 0300               
   919 00000F1E 000303030303030000-     db 0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0
   920 00000F27 000000000000000000-
   921 00000F30 0000               
   922 00000F32 000000000000000000-     db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
   923 00000F3B 000000000000000000-
   924 00000F44 0000               
   925                                  
   926 00000F46 0B00                    Numbers: DW 11
   927 00000F48 AA008A000EFFD9FFE5-     dw 170,138,-242,-39,-283,-72,-129,-164,-14,-4
   928 00000F51 FEB8FF7FFF5CFFF2FF-
   929 00000F5A FCFF               
   930 00000F5C 650042FFA7FF040065-     dw 101,-190,-89,4,101,-218,-14,-201,-157,150
   931 00000F65 0026FFF2FF37FF63FF-
   932 00000F6E 9600               
   933 00000F70 53FFB8FF18FF490039-     dw -173,-72,-232,73,-199,1,-278,72,-98,-185
   934 00000F79 FF0100EAFE48009EFF-
   935 00000F82 47FF               
   936 00000F84 8900CFFFC20003FF6E-     dw 137,-49,194,-253,110,113,-276,74,84,-16
   937 00000F8D 007100ECFE4A005400-
   938 00000F96 F0FF               
   939 00000F98 F1FFF2FF240083FF5E-     dw -15,-14,36,-125,94,-291,131,-239,-4,-274
   940 00000FA1 00DDFE830011FFFCFF-
   941 00000FAA EEFE               
   942 00000FAC F3FF260077002CFF18-     dw -13,38,119,-212,-232,-11,40,-49,-4,-214
   943 00000FB5 FFF5FF2800CFFFFCFF-
   944 00000FBE 2AFF               
   945 00000FC0 5DFF3D003500F8FFBE-     dw -163,61,53,-8,-66,199,6,141,-129,-262
   946 00000FC9 FFC70006008D007FFF-
   947 00000FD2 FAFE               
   948 00000FD4 F8FF7C002D002AFF14-     dw -8,124,45,-214,20,197,116,-83,-296,84
   949 00000FDD 00C5007400ADFFD8FE-
   950 00000FE6 5400               
   951 00000FE8 7BFFC400190014FFD6-     dw -133,196,25,-236,-42,178,-133,136,128,120
   952 00000FF1 FFB2007BFF88008000-
   953 00000FFA 7800               
   954 00000FFC DCFEAFFF140054FFC3-     dw -292,-81,20,-172,-61,-264,-66,155,-57,-36
   955 00001005 FFF8FEBEFF9B00C7FF-
   956 0000100E DCFF               
   957 00001010 C9FF35FFA9004800BD-     dw -55,-203,169,72,-67,161,66,-218,-294,-297
   958 00001019 FFA100420026FFDAFE-
   959 00001022 D7FE               
   960 00001024 8AFFFDFF180017FFB5-     dw -118,-3,24,-233,-75,111,-50,58,50,-120
   961 0000102D FF6F00CEFF3A003200-
   962 00001036 88FF               
   963 00001038 57002A00E7FEE6FE80-     dw 87,42,-281,-282,-128,147,144,-142,-254,-183
   964 00001041 FF9300900072FF02FF-
   965 0000104A 49FF               
   966 0000104C 7100EAFF75002C0012-     dw 113,-22,117,44,-238,-5,171,164,135,-135
   967 00001055 FFFBFFAB00A4008700-
   968 0000105E 79FF               
   969 00001060 EBFE3EFF2E0069FF9A-     dw -277,-194,46,-151,-102,32,-148,-161,82,-198
   970 00001069 FF20006CFF5FFF5200-
   971 00001072 3AFF               
   972 00001074 81FFC4FFBF0029005D-     dw -127,-60,191,41,-163,154,-57,-286,-166,131
   973 0000107D FF9A00C7FFE2FE5AFF-
   974 00001086 8300               
   975 00001088 BDFFB4FF9FFF3A00C6-     dw -67,-76,-97,58,-58,185,-12,-88,42,140
   976 00001091 FFB900F4FFA8FF2A00-
   977 0000109A 8C00               
   978 0000109C 8200A3FFA10082009C-     dw 130,-93,161,130,-100,90,-71,128,166,186
   979 000010A5 FF5A00B9FF8000A600-
   980 000010AE BA00               
   981 000010B0 ECFEC500DCFF8DFFEA-     dw -276,197,-36,-115,-22,-271,-186,-72,-81,-111
   982 000010B9 FFF1FE46FFB8FFAFFF-
   983 000010C2 91FF               
   984 000010C4 FEFFBCFF3C000BFF98-     dw -2,-68,60,-245,-104,52,-145,-162,132,194
   985 000010CD FF34006FFF5EFF8400-
   986 000010D6 C200               
   987 000010D8 5300E8FE9FFF610091-     dw 83,-280,-97,97,145,-259,-34,-227,63,-272
   988 000010E1 00FDFEDEFF1DFF3F00-
   989 000010EA F0FE               
   990 000010EC B2FF77FF8000C9FF11-     dw -78,-137,128,-55,17,136,-261,10,-153,-35
   991 000010F5 008800FBFE0A0067FF-
   992 000010FE DDFF               
   993 00001100 7500C400C7FFFAFEDA-     dw 117,196,-57,-262,-294,129,-132,-212,175,38
   994 00001109 FE81007CFF2CFFAF00-
   995 00001112 2600               
   996 00001114 34003D005C0054FF04-     dw 52,61,92,-172,-252,-152,-66,-130,88,51
   997 0000111D FF68FFBEFF7EFF5800-
   998 00001126 3300               
   999 00001128 0CFF2B007EFF3D00BB-     dw -244,43,-130,61,-69,162,-199,-34,25,75
  1000 00001131 FFA20039FFDEFF1900-
  1001 0000113A 4B00               
  1002 0000113C 4F00AEFFF2FF50FF36-     dw 79,-82,-14,-176,-202,129,-47,-98,-206,68
  1003 00001145 FF8100D1FF9EFF32FF-
  1004 0000114E 4400               
  1005 00001150 6A00F5FEAF0058007B-     dw 106,-267,175,88,123,172,-94,-199,-80,-87
  1006 00001159 00AC00A2FF39FFB0FF-
  1007 00001162 A9FF               
  1008 00001164 B9FFB200E3FF53FFD4-     dw -71,178,-29,-173,-44,-54,151,-122,153,-1
  1009 0000116D FFCAFF970086FF9900-
  1010 00001176 FFFF               
  1011 00001178 91009EFF6400A6006E-     dw 145,-98,100,166,110,125,12,-215,-107,-29
  1012 00001181 007D000C0029FF95FF-
  1013 0000118A E3FF               
  1014 0000118C 62FFAB00F3FE29FFFF-     dw -158,171,-269,-215,-1,199,-11,-247,63,-176
  1015 00001195 FFC700F5FF09FF3F00-
  1016 0000119E 50FF               
  1017 000011A0 7F00B9FFE5FF0C00B2-     dw 127,-71,-27,12,178,-131,-178,160,189,38
  1018 000011A9 007DFF4EFFA000BD00-
  1019 000011B2 2600               
  1020 000011B4 EDFFDEFEA50012FFC6-     dw -19,-290,165,-238,-58,-185,-295,115,-147,-10
  1021 000011BD FF47FFD9FE73006DFF-
  1022 000011C6 F6FF               
  1023 000011C8 7F001BFF82FF6EFF12-     dw 127,-229,-126,-146,18,-31,90,171,-240,-140
  1024 000011D1 00E1FF5A00AB0010FF-
  1025 000011DA 74FF               
  1026 000011DC 6AFF0A00E0FE8D0018-     dw -150,10,-288,141,24,11,-144,-1,-198,-177
  1027 000011E5 000B0070FFFFFF3AFF-
  1028 000011EE 4FFF               
  1029 000011F0 55FFFEFF12FFB8FFA5-     dw -171,-2,-238,-72,-91,-287,84,197,119,-25
  1030 000011F9 FFE1FE5400C5007700-
  1031 00001202 E7FF               
  1032 00001204 A7FF7E0011FF21FFD0-     dw -89,126,-239,-223,-48,-150,-182,-24,88,132
  1033 0000120D FF6AFF4AFFE8FF5800-
  1034 00001216 8400               
  1035 00001218 14FF460064FFB400DD-     dw -236,70,-156,180,-35,-63,-293,-266,-10,86
  1036 00001221 FFC1FFDBFEF6FEF6FF-
  1037 0000122A 5600               
  1038 0000122C BAFF1F00FBFE20002C-     dw -70,31,-261,32,44,-169,-40,102,-49,-130
  1039 00001235 0057FFD8FF6600CFFF-
  1040 0000123E 7EFF               
  1041 00001240 59FF30005F00B400A6-     dw -167,48,95,180,-90,1,-172,-133,-135,-89
  1042 00001249 FF010054FF7BFF79FF-
  1043 00001252 A7FF               
  1044 00001254 D5FE3E00570006FF42-     dw -299,62,87,-250,66,-119,-190,-132,-34,-156
  1045 0000125D 0089FF42FF7CFFDEFF-
  1046 00001266 64FF               
  1047 00001268 4C002600BCFF70FFDF-     dw 76,38,-68,-144,-33,-175,-53,-51,157,65
  1048 00001271 FF51FFCBFFCDFF9D00-
  1049 0000127A 4100               
  1050 0000127C A8FF7800DAFF63FF87-     dw -88,120,-38,-157,135,-262,198,-4,-48,90
  1051 00001285 00FAFEC600FCFFD0FF-
  1052 0000128E 5A00               
  1053 00001290 1EFF2FFFDBFE30FF49-     dw -226,-209,-293,-208,73,56,-15,-114,-199,149
  1054 00001299 003800F1FF8EFF39FF-
  1055 000012A2 9500               
  1056 000012A4 4200650072003AFFF3-     dw 66,101,114,-198,-269,-153,-53,-22,159,164
  1057 000012AD FE67FFCBFFEAFF9F00-
  1058 000012B6 A400               
  1059 000012B8 62001D0026FFD7FF09-     dw 98,29,-218,-41,-247,34,82,-10,-245,-147
  1060 000012C1 FF22005200F6FF0BFF-
  1061 000012CA 6DFF               
  1062 000012CC E1FFB8002D003100D4-     dw -31,184,45,49,-44,5,-177,-66,12,197
  1063 000012D5 FF05004FFFBEFF0C00-
  1064 000012DE C500               
  1065 000012E0 7F00A1005D0080FF73-     dw 127,161,93,-128,115,-137,-57,31,-6,5
  1066 000012E9 0077FFC7FF1F00FAFF-
  1067 000012F2 0500               
  1068 000012F4 C4FFDFFE8900DBFE4D-     dw -60,-289,137,-293,-179,126,85,-44,-194,-275
  1069 000012FD FF7E005500D4FF3EFF-
  1070 00001306 EDFE               
  1071 00001308 E8FED8FEE9FE29FF3A-     dw -280,-296,-279,-215,58,30,-134,-265,196,117
  1072 00001311 001E007AFFF7FEC400-
  1073 0000131A 7500               
  1074 0000131C 060027006D00CAFFD0-     dw 6,39,109,-54,-48,122,97,-252,-117,-92
  1075 00001325 FF7A00610004FF8BFF-
  1076 0000132E A4FF               
  1077                                  
  1078                                  ScreenWidth   EQU 320   ; Obvious
  1079                                  ScreenHeight  EQU 200   ; Obvious
  1080                                  MaxStars      EQU 250   ; Maximum number of stars
  1081                                  MaxNumbers    EQU 500   ; Number of random numbers defined  
  1082                                  MaxZ          EQU 4096  ; StartZvalue for all stars
  1083                                  MinZ          EQU 0     ; If Z = 0 then star is dead
  1084                                  
  1085 00001330 FA00                    XIndex:       DW  250   ; Index to X-numbers
  1086 00001332 7D00                    YIndex:       DW  125   ; Index to Y-numbers
  1087 00001334 1400                    WarpSpeed:    DW  20    ; Speed of stars  
  1088 00001336 0000                    NumActive:    DW  0     ; Number of stars active
  1089                                  
  1090                                  ;Star_Struc      STRUC   ; Format of star (like a record in Pascal)
  1091                                  ;     X   DW   0         ; X-position of star
  1092                                  ;     Y   DW   0         ; Y-position of star
  1093                                  ;     Z   DW   0         ; Z-position of star
  1094                                  ;     Old DW   0         ; Where to erase old star
  1095                                  ;     Col DB   0         ; Color of star
  1096                                  ;Star_Struc      ENDS
  1097                                  
  1098                                  Palette:
  1099 00001338 000000                  	DB 0,0,0        ; Palette info for first 5 colors (font)
  1100 0000133B 000000                          DB 0,0,0
  1101 0000133E 340000                          DB 52,0,0
  1102 00001341 2A0000                          DB 42,0,0
  1103 00001344 200000                          DB 32,0,0
  1104 00001347 000000                          DB 0,0,0                    ; Base color black => R,G,B
  1105                                      	; 16 grey shades
  1106 0000134A 2D2D2D                          DB 3*15,3*15,3*15
  1107 0000134D 2A2A2A                          DB 3*14,3*14,3*14
  1108 00001350 272727                          DB 3*13,3*13,3*13
  1109 00001353 242424                          DB 3*12,3*12,3*12
  1110 00001356 212121                          DB 3*11,3*11,3*11
  1111 00001359 1E1E1E                          DB 3*10,3*10,3*10
  1112 0000135C 1B1B1B                          DB 3*9,3*9,3*9
  1113 0000135F 181818                          DB 3*8,3*8,3*8
  1114 00001362 151515                          DB 3*7,3*7,3*7
  1115 00001365 121212                          DB 3*6,3*6,3*6
  1116 00001368 0F0F0F                          DB 3*5,3*5,3*5
  1117 0000136B 0C0C0C                          DB 3*4,3*4,3*4
  1118 0000136E 090909                          DB 3*3,3*3,3*3
  1119 00001371 060606                          DB 3*2,3*2,3*2
  1120 00001374 030303                          DB 3*1,3*1,3*1
  1121 00001377 000000                          DB 3*0,3*0,3*0
  1122                                  
  1123                                  bss_start:
  1124                                  
  1125                                  ABSOLUTE bss_start
  1126                                  
  1127                                  PaletteArray:
  1128 0000137A <res 00000300>               resb 768		      ; Array to hold the palette
  1129                                  
  1130                                  alignb 2
  1131                                  
  1132                                  Star_Struct:
  1133                                       Stars_X   equ   0        ; X-position of star
  1134                                       Stars_Y   equ   2        ; Y-position of star
  1135                                       Stars_Z   equ   4        ; Z-position of star
  1136                                       Stars_Old equ   6        ; Where to erase old star
  1137                                       Stars_Col equ   8        ; Color of star
  1138                                  
  1139                                  StarStrucSize equ 9    ; Number of bytes per entry ( 4 wordz and a byte )
  1140                                  
  1141                                  Stars:
  1142 0000167A <res 000008CA>               resb StarStrucSize * MaxStars  ; Array of star-records
  1143                                  
  1144                                  bss_end:
  1145                                  
  1146                                  ; Code by Vulture.
  1147                                  ; Thanx to Draeden of VLA for example code.
  1148                                  ; Don't be lame. Don't just rip the code.
  1149                                  ; Give credit where it should be. I did.
  1150                                  ; See ya in the next release.
  1151                                  
  1152                                  _end:                       	; End Of C<><>L Program !!!
