Announcement

Collapse
No announcement yet.

mars.exe - 3kb amazing graphic feast (terrain generation fly-through)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Nathan Evans
    replied
    If any is concerned about the slightly larger 9kb one, i disassembled
    it and it's clean, just a load of GDI APIs and USER APIs for creating
    its window and responding to the mouse.



    - Nath.

    Leave a comment:


  • Vladimir Shulakov
    replied
    Also
    You can use this code as:

    tasm /m2 mars.asm
    tlink /3 mars.obj

    for mars controls - keyboard (up,....

    ------------------

    Leave a comment:


  • Vladimir Shulakov
    replied
    Yes Wayne,
    I found Mars.exe (for Windows) 9kb ,09-22-1997
    Maybe you talk about mars.exe for DOS

    maybe this is mars 3kb: (asm code)

    ---------------------------------------------
    .model small
    .code
    .286p

    mars segment dword para public 'code'
    assume cs:mars , ds:mars_d

    begin_mars :


    mov ax,mars_d
    mov ds,ax
    mov cs:save_ds,ax
    mov es,ax

    cli
    mov ax,cs
    mov ss,ax
    mov sp, offset _stack
    sub sp,2
    sti

    cld
    ; ïîëó÷èòü çíà÷íèå òàéìåðà äëÿ çàïóñêà ãåíåðàòîðà ïîâåðõíîñòè
    xor ah,ah
    int 1Ah
    and dh,7Fh
    mov word ptr rand_1,dx
    ; ãðàôè÷åñêèé ðåæèì :
    mov ax,0013h
    int 10h
    xor ax,ax
    nop
    nop
    ; ïàëèòðà :
    mov ax,0FFFFh
    .386p
    sete byte ptr v_035B
    mov si,offset cs allette
    mov ax,cs
    mov ds,ax
    .286p
    cli
    mov dx,03C8h
    xor al,al
    out dx,al
    inc dx
    mov cx,288
    rep outsb
    sti
    mov ax,cs:save_ds
    mov ds,ax
    ; ïðîðèñîâàòü ëåéáàê ïî òî÷êàì :
    .386p
    mov fs,v_033D
    mov fs:byte ptr [0F9FFh],60h
    mov fs:byte ptr [0F9FEh],60h
    mov fs:byte ptr [0F9FDh],60h
    mov fs:byte ptr [0F8BDh],60h
    mov fs:byte ptr [0F77Dh],60h
    mov fs:byte ptr [0F77Eh],60h
    mov fs:byte ptr [0F77Fh],60h
    mov fs:byte ptr [0F77Bh],60h
    mov fs:byte ptr [0F77Ah],60h
    mov fs:byte ptr [0F779h],60h
    mov fs:byte ptr [0F8BAh],60h
    mov fs:byte ptr [0F9FAh],60h
    mov fs:byte ptr [0F9F9h],60h
    mov fs:byte ptr [0F777h],60h
    mov fs:byte ptr [0F776h],60h
    mov fs:byte ptr [0F775h],60h
    mov fs:byte ptr [0F8B6h],60h
    mov fs:byte ptr [0F9F6h],60h

    ; ïðîèìèòèðîâàòü ñòðóêòóðó äàííûõ :
    mov ax,ds
    add ax,0cfbh
    mov ground_data_seg_1,ax
    add ax,01000h
    mov ground_data_seg_2,ax
    add ax,01000h
    mov sky_data_seg,ax

    ; ïîñòàâèòü îáðàáîò÷èê êëàâèàòóðû :
    call set_09

    ; ãåíåðàöèÿ íåáà :
    call sub_00F3
    ; ãåíåðàöèÿ çåìëè :
    call sub_0153
    ;jmp end_mars
    .286p
    mov byte ptr v_035F,00h
    mov word ptr v_0351,03E8h
    mov word ptr v_0353,03E8h

    ; ãåíåðàöèÿ òàáëèöû ñìåùåíèé äëÿ óïðàâëåíÿ îòêðûòûì öèêëîì
    ; â ïðîãðàììå ïðîðèñîâêè çåìëè
    mov bx, offset cs:start_offset
    xor di,di
    mov cx,200
    loop_make_offset :
    mov jmp_table[di],bx
    add di,2
    add bx,6
    loop loop_make_offset

    ; êàäðîâûé öèêë :
    frame_loop :
    ; óïðàâëåíèå è êîððåêòèðîêà âûñîòû :
    call sub_0408
    ; ïðîðèñîâêà íåáà :
    call sub_0459
    ; ïðîðèñîâêà çåìëè :
    call sub_0A1F

    ; âûâîä êàäðà íà ýêðàí
    mov si,07AAh
    mov es,word ptr v_033D
    mov di,0020h
    mov bl,0C8h
    string_loop :
    mov cx,0040h
    .386p
    rep movsd
    .286p
    add di,0040h
    dec bl
    jne string_loop
    mov es,word ptr cs:save_ds ; 0345
    cmp byte ptr v_035F,00h
    je frame_loop

    ; âûõîä
    end_mars :
    call reset_09
    mov ax,0003h
    int 10h
    mov ax,4C00h
    int 21h
    ; ..........................


    sub_00f3 proc near

    mov es,sky_data_seg
    xor di,di
    .386p
    mov eax,0FFFFFFFFh
    mov cx,4000h
    rep stosd
    .286p
    mov ax,00ABh
    mul word ptr rand_1
    add ax,2BCDh
    adc dx,0000h
    div word ptr rand_2
    mov rand_1,dx
    mov si,dx
    mov es:byte ptr [0000h],00h
    mov es:byte ptr [0080h],0FEh
    mov es:byte ptr [8000h],0FEh
    mov es:byte ptr [8080h],00h
    ;call pause
    push 0000h
    push 0100h
    call sub_0219
    add sp,0004h
    ;call pause
    xor di,di
    label_0141 :
    mov al,es:[di]
    shr al,03h
    add al,40h
    stosb
    or di,di
    jne label_0141
    mov es,cs:save_ds
    ret
    sub_00f3 endp

    ; ..........................


    sub_0219 proc near

    mov bp,sp
    mov bx,[bp+04h]
    mov cx,[bp+02h]
    shr cx,1
    mov dl,es:[bx]
    add bl,cl
    mov di,bx
    add bl,cl
    cmp es:byte ptr [di],0FFh
    jne label_0276
    xor dh,dh
    add dl,es:[bx]
    adc dh,00h
    shr dx,1
    mov ch,dl
    mov ax,00ABh
    mul si
    add ax,2BCDh
    adc dx,0000h
    div word ptr rand_2
    mov si,dx
    sub dx,67C2h
    mov al,cl
    xor ah,ah
    imul dx
    mov al,ah
    mov ah,dl
    sar ax,05h
    cbw
    add al,ch
    adc ah,00h
    js label_0271
    cmp ax,00FEh
    jbe label_0273
    mov al,0FEh
    jmp label_0273
    label_0271 :
    xor al,al
    label_0273 :
    mov es:[di],al
    label_0276 :
    mov dl,es:[bx]
    add bh,cl
    mov di,bx
    add bh,cl
    cmp es:byte ptr [di],0FFh
    jne label_02C9
    xor dh,dh
    add dl,es:[bx]
    adc dh,00h
    shr dx,1
    mov ch,dl
    mov ax,00ABh
    mul si
    add ax,2BCDh
    adc dx,0000h
    div word ptr rand_2
    mov si,dx
    sub dx,67C2h
    mov al,cl
    xor ah,ah
    imul dx
    mov al,ah
    mov ah,dl
    sar ax,05h
    cbw
    add al,ch
    adc ah,00h
    js label_02C4
    cmp ax,00FEh
    jbe label_02C6
    mov al,0FEh
    jmp label_02C6
    label_02c4 :
    xor al,al
    label_02c6 :
    mov es:[di],al
    label_02c9 :
    mov dl,es:[bx]
    sub bl,cl
    mov di,bx
    sub bl,cl
    cmp es:byte ptr [di],0FFh
    jne label_031C
    xor dh,dh
    add dl,es:[bx]
    adc dh,00h
    shr dx,1
    mov ch,dl
    mov ax,00ABh
    mul si
    add ax,2BCDh
    adc dx,0000h
    div word ptr rand_2
    mov si,dx
    sub dx,67C2h
    mov al,cl
    xor ah,ah
    imul dx
    mov al,ah
    mov ah,dl
    sar ax,05h
    cbw
    add al,ch
    adc ah,00h
    js label_0317
    cmp ax,00FEh
    jbe label_0319
    mov al,0FEh
    jmp label_0319
    label_0317 :
    xor al,al
    label_0319 :
    mov es:[di],al
    label_031c :
    mov dl,es:[bx]
    sub bh,cl
    mov di,bx
    sub bh,cl
    cmp es:byte ptr [di],0FFh
    jne label_036F
    xor dh,dh
    add dl,es:[bx]
    adc dh,00h
    shr dx,1
    mov ch,dl
    mov ax,00ABh
    mul si
    add ax,2BCDh
    adc dx,0000h
    div word ptr rand_2
    mov si,dx
    sub dx,67C2h
    mov al,cl
    xor ah,ah
    imul dx
    mov al,ah
    mov ah,dl
    sar ax,05h
    cbw
    add al,ch
    adc ah,00h
    js label_036A
    cmp ax,00FEh
    jbe label_036C
    mov al,0FEh
    jmp label_036C
    label_036a :
    xor al,al
    label_036c :
    mov es:[di],al
    label_036f :
    mov dl,es:[bx]
    xor dh,dh
    add bl,cl
    add bl,cl
    add dl,es:[bx]
    adc dh,00h
    add bh,cl
    add bh,cl
    add dl,es:[bx]
    adc dh,00h
    sub bl,cl
    sub bl,cl
    add dl,es:[bx]
    adc dh,00h
    shr dx,02h
    mov ch,dl
    mov ax,00ABh
    mul si
    add ax,2BCDh
    adc dx,0000h
    div word ptr rand_2
    mov si,dx
    sub dx,67C2h
    mov al,cl
    xor ah,ah
    imul dx
    mov al,ah
    mov ah,dl
    sar ax,05h
    cbw
    add al,ch
    adc ah,00h
    js label_03CA
    cmp ax,00FEh
    jbe label_03CC
    mov al,0FEh
    jmp label_03CC
    label_03ca :
    xor al,al
    label_03cc :
    add bl,cl
    sub bh,cl
    mov es:[bx],al
    cmp cl,01h
    je label_0407
    xor ch,ch
    sub bl,cl
    sub bh,cl
    push bx
    push cx
    call sub_0219
    mov bp,sp
    mov cl,[bp]
    add [bp+02h],cl
    call sub_0219
    mov bp,sp
    mov cl,[bp]
    add [bp+03h],cl
    call sub_0219
    mov bp,sp
    mov cl,[bp]
    sub [bp+02h],cl
    call sub_0219
    add sp,0004h
    label_0407 :
    ret
    sub_0219 endp

    ; ..........................


    sub_0153 proc near

    mov es,ground_data_seg_1
    .386p
    mov fs,ground_data_seg_2
    xor di,di
    mov eax,0FFFFFFFFh
    mov cx,4000h
    rep stosd
    .286p
    mov ax,00ABh
    mul word ptr rand_1
    add ax,2BCDh
    adc dx,0000h
    div word ptr rand_2
    mov rand_1,dx
    mov si,dx
    mov es:byte ptr [0000h],80h
    push 0000h
    push 0100h
    call sub_0219
    add sp,0004h
    xor si,si
    mov di,v_034f
    shl di,04h
    label_019a :
    mov bx,v_032f
    mov al,es:[bx+si]
    xor ah,ah
    mov bx,v_0331
    add al,es:[bx+si]
    adc ah,00h
    mov bx,v_0333
    add al,es:[bx+si]
    adc ah,00h
    mov bx,v_0335
    add al,es:[bx+si]
    adc ah,00h
    shr ax,02h
    mov es:[si],al
    inc si
    jne label_019A
    xor si,si
    label_01cc :
    mov al,es:[si]
    xor ah,ah
    sub al,es:[si+03h]
    sbb ah,00h
    add ax,0020h
    jns label_01DF
    xor ax,ax
    label_01df :
    cmp ax,003Fh
    jbe label_01E7
    mov ax,003Fh
    label_01e7 :
    .386p
    mov fs:[si],al
    .286p
    inc si
    jne label_01CC
    xor si,si
    label_01ef :
    mov al,es:[si]
    xor ah,ah
    add al,es:[si+01h]
    adc ah,00h
    add al,es:[si+0100h]
    adc ah,00h
    add al,es:[si+0101h]
    adc ah,00h
    shr ax,02h
    mov es:[si],al
    inc si
    jne label_01EF
    mov es,cs:save_ds
    ret
    sub_0153 endp


    ; ..........................

    sub_0459 proc near

    mov di,07AAh
    .386p
    mov ecx,00000063h
    xor eax,eax
    .286p
    mov ax,v_0359
    neg ax
    shr ax,03h
    add ax,4000h
    .386p
    shl eax,0Dh
    mov v_0360,eax
    xor eax,eax
    mov ax,v_0355
    shl eax,09h
    mov dword ptr v_0364,eax
    xor eax,eax
    mov ax,v_0357
    shl eax,09h
    mov dword ptr v_0368,eax
    push ds
    mov gs,cs:save_ds ; 0345
    mov ds,sky_data_seg ; 034b
    label_049d :
    mov eax,gs:v_0360
    xor edx,edx
    div ecx
    mov esi,dword ptr gs:v_0364
    mov ebp,dword ptr gs:v_0368
    sub esi,eax
    add ebp,eax
    shr eax,07h
    mov bx,si
    shr esi,10h
    and si,00FFh
    shr ebp,08h
    and bp,0FF00h
    or si,bp
    mov ebp,eax
    shr ebp,10h
    dec bp
    .286p
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp

    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp

    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp

    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp

    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp

    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb
    add bx,ax
    adc si,bp
    movsb

    .386p
    dec cl
    jne label_049D
    pop ds
    mov eax,50505050h
    mov cx,0040h
    rep stosd
    mov si,v_0359
    shr si,1h
    add si,000Ah
    mov bx,0004h
    label_09f5 :
    mov ax,si
    xor dx,dx
    div bx
    shr ax,07h
    cmp ax,003Fh
    jbe label_0A05
    mov al,3Fh
    label_0a05 :
    mov ah,al
    mov dl,al
    shl eax,10h
    mov al,dl
    mov ah,al
    mov cx,0040h
    rep stosd
    inc bl
    cmp bl,2Ch
    jne label_09F5
    ret
    sub_0459 endp

    ;.............................

    sub_0a1f proc near
    .386p
    mov fs,ground_data_seg_1
    mov gs,ground_data_seg_2
    mov eax,07D007D00h
    mov di,03AAh
    mov cx,0080h
    rep stosd
    xor eax,eax
    mov di,05AAh
    mov cx,0080h
    rep stosd
    .286p
    mov word ptr v_03A0,0078h
    label_0a48 :
    mov si,v_03A0
    mov si,word ptr table_2[si]
    shl si,04h
    mov ax,v_0357
    and ax,000Fh
    xor al,0Fh
    add si,ax
    mov ax,v_0359
    xor dx,dx
    div si
    add ax,0064h
    mov v_03A2,ax
    .386p
    xor eax,eax
    mov ax,si
    shl eax,06h
    mov dword ptr v_03A6,eax
    cmp word ptr v_03A0,0002h
    jne label_0A8C
    mov word ptr v_03A2,7D00h
    mov word ptr v_03A4,0000h
    jmp label_0A96
    .286p
    label_0a8c :
    xor ax,ax
    mov dx,0001h
    div si
    mov v_03A4,ax
    label_0a96 :
    .386p
    xor ecx,ecx
    .286p
    mov cx,v_0355
    .386p
    shl ecx,0Ch
    mov eax,dword ptr v_03A6
    shl eax,07h
    sub ecx,eax
    mov dx,v_0357
    shl dx,04h
    mov ebx,ecx
    shr ebx,10h
    .286p
    mov bh,dh
    mov ax,si
    shr ax,04h
    add bh,al
    shr cx,1h
    mov si,01FEh
    mov word ptr v_0364,07AAh
    label_0ace :
    shl cx,1h
    add cx,word ptr v_03A6
    adc bl,v_03A8
    shr cx,1h
    .386p
    mov al,fs:[bx+01h]
    xor ah,ah
    sub al,fs:[bx]
    sbb ah,00h
    imul cx
    shrd ax,dx,07h
    add ah,fs:[bx]
    .286p
    mul word ptr v_03A4
    mov di,v_03A2
    sub di,dx
    jns label_0AFE
    mov di,0FFFFh
    label_0afe :
    cmp di,00C8h
    jl label_0B07
    mov di,00C7h
    label_0b07 :
    mov bp, [si+03AAh]
    mov [si+03AAh], di
    sub bp,di
    .386p
    jns label_101A
    .286p
    shl di,08h
    add di,v_0364
    .386p
    mov al,gs:[bx+01]
    sub al,gs:[bx]
    imul ch
    shl ax,1
    add ah,gs:[bx]
    mov dx,ax
    xchg [si+05AAh], ax
    push ax
    sub ax,dx
    cwd
    idiv bp
    pop dx
    shl bp,1
    jmp jmp_table[bp+0190h]

    start_offset label byte

    mov [di+3900h],dh
    add dx,ax
    mov [di+3A00h],dh
    add dx,ax
    mov [di+3B00h],dh
    add dx,ax
    mov [di+3C00h],dh
    add dx,ax
    mov [di+3D00h],dh
    add dx,ax
    mov [di+3E00h],dh
    add dx,ax
    mov [di+3F00h],dh
    add dx,ax
    mov [di+4000h],dh
    add dx,ax
    mov [di+4100h],dh
    add dx,ax
    mov [di+4200h],dh
    add dx,ax
    mov [di+4300h],dh
    add dx,ax
    mov [di+4400h],dh
    add dx,ax
    mov [di+4500h],dh
    add dx,ax
    mov [di+4600h],dh
    add dx,ax
    mov [di+4700h],dh
    add dx,ax
    mov [di+4800h],dh
    add dx,ax
    mov [di+4900h],dh
    add dx,ax
    mov [di+4A00h],dh
    add dx,ax
    mov [di+4B00h],dh
    add dx,ax
    mov [di+4C00h],dh
    add dx,ax
    mov [di+4D00h],dh
    add dx,ax
    mov [di+4E00h],dh
    add dx,ax
    mov [di+4F00h],dh
    add dx,ax
    mov [di+5000h],dh
    add dx,ax
    mov [di+5100h],dh
    add dx,ax
    mov [di+5200h],dh
    add dx,ax
    mov [di+5300h],dh
    add dx,ax
    mov [di+5400h],dh
    add dx,ax
    mov [di+5500h],dh
    add dx,ax
    mov [di+5600h],dh
    add dx,ax
    mov [di+5700h],dh
    add dx,ax
    mov [di+5800h],dh
    add dx,ax
    mov [di+5900h],dh
    add dx,ax
    mov [di+5A00h],dh
    add dx,ax
    mov [di+5B00h],dh
    add dx,ax
    mov [di+5C00h],dh
    add dx,ax
    mov [di+5D00h],dh
    add dx,ax
    mov [di+5E00h],dh
    add dx,ax
    mov [di+5F00h],dh
    add dx,ax
    mov [di+6000h],dh
    add dx,ax
    mov [di+6100h],dh
    add dx,ax
    mov [di+6200h],dh
    add dx,ax
    mov [di+6300h],dh
    add dx,ax
    mov [di+6400h],dh
    add dx,ax
    mov [di+6500h],dh
    add dx,ax
    mov [di+6600h],dh
    add dx,ax
    mov [di+6700h],dh
    add dx,ax
    mov [di+6800h],dh
    add dx,ax
    mov [di+6900h],dh
    add dx,ax
    mov [di+6A00h],dh ; 50
    add dx,ax
    mov [di+6B00h],dh
    add dx,ax
    mov [di+6C00h],dh
    add dx,ax
    mov [di+6D00h],dh
    add dx,ax
    mov [di+6E00h],dh
    add dx,ax
    mov [di+6F00h],dh
    add dx,ax
    mov [di+7000h],dh
    add dx,ax
    mov [di+7100h],dh
    add dx,ax
    mov [di+7200h],dh
    add dx,ax
    mov [di+7300h],dh
    add dx,ax
    mov [di+7400h],dh
    add dx,ax
    mov [di+7500h],dh
    add dx,ax
    mov [di+7600h],dh
    add dx,ax
    mov [di+7700h],dh
    add dx,ax
    mov [di+7800h],dh
    add dx,ax
    mov [di+7900h],dh
    add dx,ax
    mov [di+7A00h],dh
    add dx,ax
    mov [di+7B00h],dh
    add dx,ax
    mov [di+7C00h],dh
    add dx,ax
    mov [di+7D00h],dh
    add dx,ax
    mov [di+7E00h],dh
    add dx,ax
    mov [di+7F00h],dh
    add dx,ax
    mov [di-8000h],dh
    add dx,ax
    mov [di-7F00h],dh
    add dx,ax
    mov [di-7E00h],dh
    add dx,ax
    mov [di-7D00h],dh
    add dx,ax
    mov [di-7C00h],dh
    add dx,ax
    mov [di-7B00h],dh
    add dx,ax
    mov [di-7A00h],dh
    add dx,ax
    mov [di-7900h],dh
    add dx,ax
    mov [di-7800h],dh
    add dx,ax
    mov [di-7700h],dh
    add dx,ax
    mov [di-7600h],dh
    add dx,ax
    mov [di-7500h],dh
    add dx,ax
    mov [di-7400h],dh
    add dx,ax
    mov [di-7300h],dh
    add dx,ax
    mov [di-7200h],dh
    add dx,ax
    mov [di-7100h],dh
    add dx,ax
    mov [di-7000h],dh
    add dx,ax
    mov [di-6F00h],dh
    add dx,ax
    mov [di-6E00h],dh
    add dx,ax
    mov [di-6D00h],dh
    add dx,ax
    mov [di-6C00h],dh
    add dx,ax
    mov [di-6B00h],dh
    add dx,ax
    mov [di-6A00h],dh
    add dx,ax
    mov [di-6900h],dh
    add dx,ax
    mov [di-6800h],dh
    add dx,ax
    mov [di-6700h],dh
    add dx,ax
    mov [di-6600h],dh
    add dx,ax
    mov [di-6500h],dh
    add dx,ax
    mov [di-6400h],dh ; 100
    add dx,ax
    mov [di-6300h],dh
    add dx,ax
    mov [di-6200h],dh
    add dx,ax
    mov [di-6100h],dh
    add dx,ax
    mov [di-6000h],dh
    add dx,ax
    mov [di-5F00h],dh
    add dx,ax
    mov [di-5E00h],dh
    add dx,ax
    mov [di-5D00h],dh
    add dx,ax
    mov [di-5C00h],dh
    add dx,ax
    mov [di-5B00h],dh
    add dx,ax
    mov [di-5A00h],dh
    add dx,ax
    mov [di-5900h],dh
    add dx,ax
    mov [di-5800h],dh
    add dx,ax
    mov [di-5700h],dh
    add dx,ax
    mov [di-5600h],dh
    add dx,ax
    mov [di-5500h],dh
    add dx,ax
    mov [di-5400h],dh
    add dx,ax
    mov [di-5300h],dh
    add dx,ax
    mov [di-5200h],dh
    add dx,ax
    mov [di-5100h],dh
    add dx,ax
    mov [di-5000h],dh
    add dx,ax
    mov [di-4F00h],dh
    add dx,ax
    mov [di-4E00h],dh
    add dx,ax
    mov [di-4D00h],dh
    add dx,ax
    mov [di-4C00h],dh
    add dx,ax
    mov [di-4B00h],dh
    add dx,ax
    mov [di-4A00h],dh
    add dx,ax
    mov [di-4900h],dh
    add dx,ax
    mov [di-4800h],dh
    add dx,ax
    mov [di-4700h],dh
    add dx,ax
    mov [di-4600h],dh
    add dx,ax
    mov [di-4500h],dh
    add dx,ax
    mov [di-4400h],dh
    add dx,ax
    mov [di-4300h],dh
    add dx,ax
    mov [di-4200h],dh
    add dx,ax
    mov [di-4100h],dh
    add dx,ax
    mov [di-4000h],dh
    add dx,ax
    mov [di-3F00h],dh
    add dx,ax
    mov [di-3E00h],dh
    add dx,ax
    mov [di-3D00h],dh
    add dx,ax
    mov [di-3C00h],dh
    add dx,ax
    mov [di-3B00h],dh
    add dx,ax
    mov [di-3A00h],dh
    add dx,ax
    mov [di-3900h],dh
    add dx,ax
    mov [di-3800h],dh
    add dx,ax
    mov [di-3700h],dh
    add dx,ax
    mov [di-3600h],dh
    add dx,ax
    mov [di-3500h],dh
    add dx,ax
    mov [di-3400h],dh
    add dx,ax
    mov [di-3300h],dh
    add dx,ax
    mov [di-3200h],dh
    add dx,ax
    mov [di-3100h],dh
    add dx,ax
    mov [di-3000h],dh
    add dx,ax
    mov [di-2F00h],dh
    add dx,ax
    mov [di-2E00h],dh
    add dx,ax
    mov [di-2D00h],dh
    add dx,ax
    mov [di-2C00h],dh
    add dx,ax
    mov [di-2B00h],dh
    add dx,ax
    mov [di-2A00h],dh
    add dx,ax
    mov [di-2900h],dh
    add dx,ax
    mov [di-2800h],dh
    add dx,ax
    mov [di-2700h],dh
    add dx,ax
    mov [di-2600h],dh
    add dx,ax
    mov [di-2500h],dh
    add dx,ax
    mov [di-2400h],dh
    add dx,ax
    mov [di-2300h],dh
    add dx,ax
    mov [di-2200h],dh
    add dx,ax
    mov [di-2100h],dh
    add dx,ax
    mov [di-2000h],dh
    add dx,ax
    mov [di-1F00h],dh
    add dx,ax
    mov [di-1E00h],dh
    add dx,ax
    mov [di-1D00h],dh
    add dx,ax
    mov [di-1C00h],dh
    add dx,ax
    mov [di-1B00h],dh
    add dx,ax
    mov [di-1A00h],dh
    add dx,ax
    mov [di-1900h],dh
    add dx,ax
    mov [di-1800h],dh
    add dx,ax
    mov [di-1700h],dh
    add dx,ax
    mov [di-1600h],dh
    add dx,ax
    mov [di-1500h],dh
    add dx,ax
    mov [di-1400h],dh
    add dx,ax
    mov [di-1300h],dh
    add dx,ax
    mov [di-1200h],dh
    add dx,ax
    mov [di-1100h],dh
    add dx,ax
    mov [di-1000h],dh
    add dx,ax
    mov [di-0F00h],dh
    add dx,ax
    mov [di-0E00h],dh
    add dx,ax
    mov [di-0D00h],dh
    add dx,ax
    mov [di-0C00h],dh
    add dx,ax
    mov [di-0B00h],dh
    add dx,ax
    mov [di-0A00h],dh
    add dx,ax
    mov [di-0900h],dh
    add dx,ax
    mov [di-0800h],dh
    add dx,ax
    mov [di-0700h],dh
    add dx,ax
    mov [di-0600h],dh
    add dx,ax
    mov [di-0500h],dh
    add dx,ax
    mov [di-0400h],dh
    add dx,ax
    mov [di-0300h],dh
    add dx,ax
    mov [di-0200h],dh
    add dx,ax
    mov [di-0100h],dh
    add dx,ax
    mov [di],dh


    inc word ptr v_0364
    sub si,0002h
    jns label_0ACE
    sub word ptr v_03A0,0002h
    mov si,v_03A0
    mov si,word ptr table_2[si]
    test si,0003h
    jne label_1010
    shr si,02h
    cmp si,000Fh
    ja label_1010
    label_1010 :
    cmp word ptr v_03A0,0000h
    jne label_0A48
    ret
    label_101a :
    .386p
    mov al,gs:[bx+01h]
    sub al,gs:[bx]
    imul ch
    shl ax,1
    add ah,gs:[bx]
    .286p
    mov [si+05AAh],ax
    inc word ptr v_0364
    sub si,0002h
    .386p
    jns label_0ACE
    .286p
    sub word ptr v_03A0,0002h
    mov si,v_03A0
    mov si,word ptr table_2[si]
    test si,0003h
    jne label_1052
    shr si,02h
    cmp si,000Fh
    ja label_1052
    .386p
    label_1052 :
    cmp word ptr v_03A0,0000
    jne label_0A48
    .286
    ret
    sub_0a1f endp

    ;.............................


    sub_0408 proc near
    xor cx,cx
    xor dx,dx
    xor ax,ax
    ; cmp byte ptr v_035B,00h
    ; je label_0423
    ; nop
    ; nop
    ; nop
    ; nop
    ; nop
    ; nop
    ; nop
    ; nop

    mov ax,1
    call chk_09
    cmp al,0
    je chk_up
    mov byte ptr v_035F,01h
    chk_up :
    mov ax,72
    call chk_09
    cmp al,0
    je chk_right
    mov dx,0FFEFh
    chk_right :
    mov ax,75
    call chk_09
    cmp al,0
    je chk_left
    mov cx,0FFEFh
    chk_left :
    mov ax,77
    call chk_09
    cmp al,0
    je chk_down
    mov cx,20
    chk_down :
    mov ax,80
    call chk_09
    cmp al,0
    je chk_pgup
    mov dx,20
    chk_pgup :
    mov ax,73
    call chk_09
    cmp al,0
    je chk_pgdn
    add byte ptr d_hight,3
    jmp chk_hight
    chk_pgdn :
    mov ax,81
    call chk_09
    cmp al,0
    je cont
    sub byte ptr d_hight,3
    chk_hight :
    cmp byte ptr d_hight,21h
    jae chk_hight_2
    mov byte ptr d_hight,21h
    chk_hight_2 :
    cmp byte ptr d_hight,200
    jbe cont
    mov byte ptr d_hight,200

    cont :

    add v_0351,cx
    sub v_0353,dx
    mov cx,v_0351
    mov dx,v_0353
    mov v_0355,cx
    mov v_0357,dx
    call sub_105C
    ; add ah,19h
    ; mov ax,9000h
    ; int 3
    add ah,d_hight
    jnb label_0446
    mov ax,0FFFFh
    label_0446 :
    mov v_0359,ax

    ; mov ah,01h
    ; int 16h
    ; je label_0458
    ; mov byte ptr v_035F,01h
    ; xor ah,ah
    ; int 16h


    label_0458 :
    ret
    sub_0408 endp


    ;.............................
    ; îïðåäåëåíèå òåêóùåé âûñîòû çåìíîé ïîâåðõíîñòè
    sub_105c proc near
    .386p
    mov fs,ground_data_seg_1
    ror cx,04h
    ror dx,04h
    mov bl,cl
    mov bh,dl
    shr cx,0Ch
    shr dx,0Ch
    inc bl
    mov al,fs:[bx]
    xor ah,ah
    dec bl
    sub al,fs:[bx]
    sbb ah,00h
    push dx
    imul cx
    mov dl,fs:[bx]
    xor dh,dh
    shl dx,04h
    add ax,dx
    pop dx
    mov si,ax
    inc bh
    inc bl
    mov al,fs:[bx]
    xor ah,ah
    dec bl
    sub al,fs:[bx]
    sbb ah,00h
    push dx
    imul cx
    mov dl,fs:[bx]
    xor dh,dh
    shl dx,04h
    add ax,dx
    pop dx
    mov di,ax
    mov ax,di
    sub ax,si
    imul dx
    shl si,04h
    add ax,si
    ret
    sub_105c endp
    ;.............................

    pause proc near
    push ax
    xor ax,ax
    int 16h
    pop ax
    ret
    pause endp
    ;...........................
    .286p

    set_09 proc near
    mov ax,3509h
    int 21h
    mov ax,es
    mov seg_k,ax
    mov off_k,bx
    mov ax,cs
    mov ds,ax
    mov dx, offset cs:ch9
    mov ax, 2509h
    int 21h
    mov ds,cs:save_ds
    ret
    set_09 endp
    ;........................................
    reset_09 proc near
    mov dx,off_k
    mov ax,seg_k
    mov ds,ax
    mov ax,2509h
    int 21h
    mov ds,cs:save_ds
    ret
    reset_09 endp
    ;......................................

    chk_09 proc near
    push si
    mov si,ax
    mov al,byte ptr key_tab[si]
    pop si
    ret
    chk_09 endp

    ;.....................................

    ch9 label dword
    push ds
    push ax
    push bx
    push si
    mov ds,cs:save_ds
    ; interupt 09h handler :
    in al,60h
    mov bh,al
    and al,7fh ; clear release bit
    xor ah,ah
    mov si,ax
    test bh,80h ; check release bit
    jz press
    mov byte ptr key_tab[si],0
    jmp ret_ch9
    press :
    mov byte ptr key_tab[si],1
    ret_ch9 :
    in al,61h
    mov ah,al
    or al,80h
    out 61h,al
    xchg ah,al
    out 61h,al
    mov al,20h
    out 20h,al
    pop si
    pop bx
    pop ax
    pop ds
    iret
    ;........................................

    save_ds dw ? ; 0345

    pallette :
    db 00h, 00h, 00h, 01h, 00h, 00h, 02h, 00h
    db 00h, 03h, 00h, 00h, 03h, 01h, 00h, 04h
    db 00h, 00h, 05h, 00h, 00h, 06h, 00h, 00h
    db 07h, 00h, 00h, 08h, 00h, 00h, 09h, 00h
    db 00h, 0Ah, 00h, 00h, 0Bh, 00h, 00h, 0Ch
    db 00h, 00h, 0Dh, 00h, 00h, 0Eh, 00h, 00h
    db 0Fh, 00h, 00h, 10h, 00h, 00h, 11h, 00h
    db 00h, 12h, 00h, 00h, 13h, 00h, 00h, 14h
    db 00h, 00h, 15h, 00h, 00h, 16h, 00h, 00h
    db 17h, 00h, 00h, 18h, 00h, 00h, 19h, 00h
    db 00h, 1Ah, 00h, 00h, 1Bh, 00h, 00h, 1Ch
    db 00h, 00h, 1Dh, 01h, 00h, 1Eh, 02h, 00h
    db 1Fh, 03h, 00h, 20h, 04h, 00h, 21h, 05h
    db 00h, 22h, 06h, 00h, 23h, 07h, 01h, 24h
    db 08h, 02h, 25h, 09h, 03h, 26h, 0Ah, 04h
    db 27h, 0Bh, 05h, 28h, 0Ch, 06h, 29h, 0Dh
    db 07h, 2Ah, 0Eh, 08h, 2Bh, 0Fh, 09h, 2Ch
    db 10h, 0Ah, 2Dh, 11h, 0Bh, 2Eh, 12h, 0Ch
    db 2Fh, 13h, 0Dh, 30h, 14h, 0Eh, 31h, 15h
    db 0Fh, 32h, 16h, 10h, 33h, 17h, 11h, 34h
    db 18h, 12h, 35h, 19h, 13h, 36h, 1Ah, 14h
    db 37h, 1Bh, 15h, 38h, 1Ch, 16h, 39h, 1Dh
    db 17h, 3Ah, 1Eh, 18h, 3Bh, 1Fh, 19h, 3Ch
    db 20h, 1Ah, 3Dh, 21h, 1Bh, 3Eh, 22h, 1Ch
    db 32h, 0Ah, 0Ah, 32h, 0Bh, 0Bh, 32h, 0Ch
    db 0Ch, 32h, 0Dh, 0Dh, 32h, 0Eh, 0Eh, 32h
    db 0Fh, 0Fh, 32h, 10h, 10h, 32h, 11h, 11h
    db 32h, 12h, 12h, 32h, 13h, 13h, 32h, 14h
    db 14h, 32h, 15h, 15h, 32h, 16h, 16h, 32h
    db 17h, 17h, 32h, 18h, 18h, 32h, 19h, 19h
    db 32h, 1Ah, 1Ah, 32h, 1Bh, 1Bh, 32h, 1Ch
    db 1Ch, 32h, 1Dh, 1Dh, 32h, 1Eh, 1Eh, 32h
    db 1Fh, 1Fh, 32h, 20h, 20h, 32h, 21h, 21h
    db 32h, 22h, 22h, 32h, 23h, 23h, 32h, 24h
    db 24h, 32h, 25h, 25h, 32h, 26h, 26h, 32h
    db 27h, 27h, 32h, 28h, 28h, 32h, 29h, 29h

    ; ...........................
    BEG_STACK :
    dw 100 dup( 0 )
    _stack :
    dw 9

    mars ends
    ;...........................

    mars_d segment word para public 'data'

    d_hight db 32h

    v_032f dw 0

    v_0331 dw 4
    v_0333 dw 0202h
    v_0335 dw 0feffh

    v_033d dw 0a000h ; screen_seg

    ground_data_seg_1 dw ? ; 0347
    ground_data_seg_2 dw ? ; 0349
    sky_data_seg dw ? ; 034b
    rand_2 dw 0cf85h ; 034d
    v_034f dw 1

    v_0351 dw ?
    v_0353 dw ?
    v_0355 dw 03e8h
    v_0357 dw 03f9h
    v_0359 dw 0ffffh

    v_035b dw ?
    rand_1 dw ? ; 035d
    v_035f db ?

    v_0360 dd ?
    v_0364 dw ?
    dw ?

    v_0368 dd ?

    v_03a0 dw ?
    v_03a2 dw ?
    v_03a4 dw ?
    v_03a6 dw ?
    v_03a8 db ?

    ;............................

    jmp_table dw 200 dup (0)
    dw ?
    dw ?
    dw ?
    ;...........................
    key db 0
    seg_k dw ?
    off_k dw ?
    ;..........................
    table_2 label byte
    dw 00h, 01h, 02h, 03h
    dw 04h, 05h, 06h, 07h
    dw 08h, 09h, 0Ah, 0Bh
    dw 0Ch, 0Dh, 0Eh, 0Fh
    dw 10h, 11h, 12h, 13h
    dw 14h, 15h, 16h, 17h
    dw 18h, 19h, 1Ah, 1Bh
    dw 1Ch, 1Dh, 1Eh, 1Fh
    dw 20h, 21h, 22h, 23h
    dw 24h, 25h, 26h, 27h
    dw 28h, 2Ah, 2Ch, 2Eh
    dw 30h, 32h, 34h, 36h
    dw 38h, 3Ah, 3Ch, 40h
    dw 44h, 48h, 4Ch, 50h
    dw 54h, 58h, 5Ch, 60h
    dw 64h, 00h, 00h, 00h

    key_tab label byte
    dw 256 dup( 0 )

    mars_d ends

    end begin_mars



    ------------------

    Leave a comment:


  • Wayne Diamond
    replied
    Vladimir, 9kb??? The one ive got (the actual exe) is 3121 bytes ...
    11/11/96 02:36p 3,121 mars.exe

    Do a search for mars.exe at www.google.com and look for different variants, you must have a different one to mine but mine is dated (internal datestamp) November 1996

    Best regards,
    Wayne, your #1 gfx demo fan!


    ------------------

    Leave a comment:


  • Vladimir Shulakov
    replied
    Yes,Wayne
    this is good work (I think good ASM work).

    normal size mars.zip 3.701 bytes
    normal size mars.exe 9.380 bytes

    PBDLL analog can be 16 - 22 kb ...




    ------------------

    Leave a comment:


  • Wayne Diamond
    replied
    Lance, if he can squeeze all of that out of 3kb, then he's probably got a virus, half a dozen trojans, a family of worms and a polymorphic engine built in as well


    ------------------

    Leave a comment:


  • Lance Edmonds
    replied
    Wow! 3kb... I hope there was no room for any virus code in there...



    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Nathan Evans
    replied
    That's a fine piece of work

    -Nath.

    Leave a comment:


  • Ian Cairns
    replied
    It is available from:

    http://home.global.co.za/~skorsman/dnload/dnload.htm

    regards,

    ------------------
    [email protected]

    Leave a comment:


  • mars.exe - 3kb amazing graphic feast (terrain generation fly-through)

    I first saw this in 1996 and unlike most software developed then I'm still just as impressed today as I was with it back then, some of you have probably already seen it.
    The program is mars.exe and it's a ridiculous 3.04kb. How a program so small can produce such stunning visuals is beyond me, but its an absolute gem
    You can download it from http://www.geocities.com/TelevisionC.../6662/mars.zip , approximate download time - 2 seconds.
    Move your mouse when the program is loaded to 'fly' through the martian terrain, and when you fly just remember that all of that has been done somehow in 3.04kb. Vladimir will appreciate this one
    Admins, sorry for the off-topic post, please feel free to delete this thread at any time but this was a little gem I wanted to share, if only for a brief post

    Enjoy the rest of the week,
    Wayne


    ------------------
Working...
X