; Program: SYSTEM
; Assembler: Netwide Assembler v0.97
; Generated by P32 v0.5á2 (c) 1996-1999 Johan Prins
BITS 32


SECTION .text
%include '..\RTL\SYSTEM.ASI'
      ALIGN 16
SYSTEM$_ASCIIZ$$STRING$POINTER:
      push  ebp
      mov ebp, esp
      mov esi, dword [ebp + 8]
      movzx ecx, byte [esi]
      inc esi
      mov edi, dword [ebp + 12]
      mov eax, ecx
      shr ecx, 02h
      cld 
      rep 
      movsd 
      mov ecx, eax
      and ecx, 03h
      rep 
      movsb 
      mov byte [edi], 0h
L1:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
strcopy:
      push  ebp
      mov ebp, esp
      push  eax
      mov edi, dword [ebp + 8]
      mov esi, dword [ebp + 12]
      mov ecx, dword [ebp + 16]
      cld 
      lodsb 
      cmp al, cl
      jbe _SYS_STRCOPY@1
      mov al, cl
_SYS_STRCOPY@1:
      movzx eax, al
      mov ecx, eax
      stosb 
      shr ecx, 02h
      rep 
      movsd 
      mov cl, al
      and cl, 03h
      rep 
      movsb 
      pop eax
L2:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
strcat:
      push  ebp
      mov ebp, esp
      push  eax
      mov edi, dword [ebp + 8]
      movzx ecx, byte [edi]
      lea edi, [edi + ecx + 1]
      neg ecx
      add ecx, 0FFh
      mov esi, dword [ebp + 12]
      cld 
      lodsb 
      cmp al, cl
      jbe _SYS_STRCAT@2
      mov al, cl
_SYS_STRCAT@2:
      mov cl, al
      mov ebx, dword [ebp + 8]
      add byte [ebx], cl
      movzx ecx, cl
      mov eax, ecx
      shr ecx, 02h
      rep 
      movsd 
      mov ecx, eax
      and ecx, 03h
      rep 
      movsb 
      pop eax
L3:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
strcmp:
      push  ebp
      mov ebp, esp
      push  eax
      mov esi, dword [ebp + 12]
      mov edi, dword [ebp + 8]
      cld 
      lodsb 
      mov ah, [edi]
      inc edi
      cmp cl, al
      jbe _SYS_STRCMP@STRCMP_3
      mov cl, ah
_SYS_STRCMP@STRCMP_3:
      or  cl, cl
      jz  _SYS_STRCMP@STRCMP_4
      movzx ecx, cl
      rep 
      cmpsb 
      jne _SYS_STRCMP@STRCMP_5
_SYS_STRCMP@STRCMP_4:
      cmp al, ah
_SYS_STRCMP@STRCMP_5:
      pop eax
L4:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_MOVE$$$$LONGINT:
      push  ebp
      mov ebp, esp
      mov edi, dword [ebp + 12]
      mov esi, dword [ebp + 8]
      mov ecx, dword [ebp + 16]
      mov ebx, ecx
      cmp edi, esi
      jg  _MOVE@1
      je  _MOVE@2
      sar ecx, 02h
      js  _MOVE@2
      cld 
      rep 
      movsd 
      mov ecx, ebx
      and ecx, 03h
      rep 
      movsb 
      jmp _MOVE@2
_MOVE@1:
      lea esi, [esi + ecx - 4]
      lea edi, [edi + ecx - 4]
      sar ecx, 02h
      js  _MOVE@2
      std 
      rep 
      movsd 
      mov ecx, ebx
      and ecx, 03h
      add esi, 03h
      add edi, 03h
      rep 
      movsb 
_MOVE@2:
L5:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
SYSTEM$_FILLCHAR$$POINTER$LONGINT$BYTE:
      push  ebp
      mov ebp, esp
      mov edi, dword [ebp + 8]
      mov ecx, dword [ebp + 12]
      mov al, byte [ebp + 16]
      mov ah, al
      mov bx, ax
      shl eax, 010h
      mov ax, bx
      mov ebx, ecx
      shr ecx, 02h
      rep 
      stosd 
      and ebx, 03h
      mov ecx, ebx
      rep 
      stosb 
L6:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
SYSTEM$_UPCASE$$CHAR:
      push  ebp
      mov ebp, esp
      sub esp, 01h
      cmp al, 061h
      jb  _UPCASE@EXIT
      cmp al, 07Ah
      ja  _UPCASE@EXIT
      sub al, 020h
_UPCASE@EXIT:
L7:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_COPY$$STRING$LONGINT$LONGINT:
      push  ebp
      mov ebp, esp
      cld 
      mov edi, dword [ebp + 20]
      mov esi, [ebp + 8]
      mov al, [esi]
      xor ah, ah
      mov ecx, [ebp + 12]
      or  ecx, ecx
      jg  _COPY@C1
      mov ecx, 01h
_COPY@C1:
      add esi, ecx
      sub eax, ecx
      jb  _COPY@C3
      inc eax
      mov ecx, [ebp + 16]
      or  ecx, ecx
      jge _COPY@C2
      xor ecx, ecx
_COPY@C2:
      cmp eax, ecx
      jbe _COPY@C4
      mov eax, ecx
      jmp _COPY@C4
_COPY@C3:
      xor eax, eax
_COPY@C4:
      stosb 
      mov ecx, eax
      rep 
      movsb 
L8:
      mov esp, ebp
      pop ebp
      ret 010h
      ALIGN 16
SYSTEM$_CONCAT$$STRING$STRING:
      push  ebp
      mov ebp, esp
      cld 
      mov edi, [ebp + 8]
      mov esi, [ebp + 12]
      mov cl, [edi]
      xor ch, ch
      lodsb 
      add [edi], al
      jnc _CONCAT@CC1
      mov byte [edi], 0FFh
      mov al, cl
      not al
_CONCAT@CC1:
      add edi, ecx
      inc edi
      mov cl, al
      rep 
      movsb 
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 16]
      push  dword 0FFh
      lea ecx, [eax]
      push  ecx
      push  edx
      call  strcopy
L9:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
SYSTEM$_POS$$STRING$STRING:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov esi, [ebp + 8]
      cld 
      lodsb 
      or  al, al
      je  _POS@LAB2
      movzx eax, al
      mov edx, eax
      mov edi, [ebp + 12]
      movzx ecx, byte [edi]
      sub ecx, edx
      jb  _POS@LAB2
      inc ecx
      inc edi
_POS@LAB1:
      lodsb 
      repne 
      scasb 
      jne _POS@LAB2
      mov eax, edi
      mov ebx, ecx
      mov ecx, edx
      dec ecx
      rep 
      cmpsb 
      je  _POS@LAB3
      mov edi, eax
      mov ecx, ebx
      mov esi, [ebp + 8]
      inc esi
      jmp _POS@LAB1
_POS@LAB2:
      xor eax, eax
      jmp _POS@LAB4
_POS@LAB3:
      dec eax
      sub eax, [ebp + 12]
_POS@LAB4:
      and eax, 0FFh
L10:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_INSERT$$STRING$STRING$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 0400h
      mov eax, dword [ebp + 8]
      movzx eax, byte [eax]
      test  eax, eax
      jnz near  L13
L12:
      jmp L11
L13:
L14:
      mov eax, dword [ebp + 12]
      movzx eax, byte [eax]
      test  eax, eax
      jnz near  L16
L15:
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 12]
      push  dword 0FFh
      lea ecx, [eax]
      push  ecx
      lea ecx, [edx]
      push  ecx
      call  strcopy
      jmp L11
L16:
L17:
      cmp dword [ebp + 16], 01h
      jge near  L19
L18:
      mov dword [ebp + 16], 01h
L19:
L20:
      mov eax, dword [ebp + 12]
      movzx eax, byte [eax]
      mov edx, dword [ebp + 16]
      cmp edx, eax
      jle near  L22
L21:
      mov eax, dword [ebp + 12]
      movzx eax, byte [eax]
      inc eax
      mov dword [ebp + 16], eax
L22:
L23:
      lea eax, [ebp - 512]
      push  eax
      mov eax, dword [ebp + 16]
      dec eax
      push  eax
      push  dword 01h
      mov eax, dword [ebp + 12]
      lea edx, [eax]
      push  edx
      call  SYSTEM$_COPY$$STRING$LONGINT$LONGINT
      push  dword 0FFh
      lea eax, [ebp - 512]
      push  eax
      lea eax, [ebp - 768]
      push  eax
      call  strcopy
      mov eax, dword [ebp + 8]
      lea eax, [eax]
      push  eax
      lea eax, [ebp - 768]
      push  eax
      call  strcat
      lea eax, [ebp - 1024]
      push  eax
      mov eax, dword [ebp + 12]
      movzx eax, byte [eax]
      sub eax, dword [ebp + 16]
      inc eax
      push  eax
      push  dword [ebp + 16]
      mov eax, dword [ebp + 12]
      lea edx, [eax]
      push  edx
      call  SYSTEM$_COPY$$STRING$LONGINT$LONGINT
      lea eax, [ebp - 1024]
      push  eax
      lea eax, [ebp - 768]
      push  eax
      call  strcat
      push  dword 0FFh
      lea eax, [ebp - 768]
      push  eax
      lea eax, [ebp - 256]
      push  eax
      call  strcopy
      mov eax, dword [ebp + 12]
      push  dword 0FFh
      lea edx, [ebp - 256]
      push  edx
      lea edx, [eax]
      push  edx
      call  strcopy
L11:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
SYSTEM$_DELETE$$STRING$LONGINT$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 0400h
      cmp dword [ebp + 12], 01h
      jge near  L26
L25:
      jmp L24
L26:
L27:
      mov eax, dword [ebp + 8]
      movzx eax, byte [eax]
      mov edx, dword [ebp + 12]
      cmp edx, eax
      jle near  L29
L28:
      jmp L24
L29:
L30:
      cmp dword [ebp + 16], 01h
      jge near  L32
L31:
      jmp L24
L32:
L33:
      mov eax, dword [ebp + 12]
      add eax, dword [ebp + 16]
      mov edx, dword [ebp + 8]
      movzx edx, byte [edx]
      cmp eax, edx
      jbe near  L35
L34:
      mov eax, dword [ebp + 8]
      movzx eax, byte [eax]
      sub eax, dword [ebp + 12]
      inc eax
      mov dword [ebp + 16], eax
L35:
L36:
      lea eax, [ebp - 512]
      push  eax
      mov eax, dword [ebp + 12]
      dec eax
      push  eax
      push  dword 01h
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  SYSTEM$_COPY$$STRING$LONGINT$LONGINT
      push  dword 0FFh
      lea eax, [ebp - 512]
      push  eax
      lea eax, [ebp - 768]
      push  eax
      call  strcopy
      lea eax, [ebp - 1024]
      push  eax
      mov eax, dword [ebp + 8]
      movzx eax, byte [eax]
      sub eax, dword [ebp + 12]
      sub eax, dword [ebp + 16]
      inc eax
      push  eax
      mov eax, dword [ebp + 12]
      add eax, dword [ebp + 16]
      push  eax
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  SYSTEM$_COPY$$STRING$LONGINT$LONGINT
      lea eax, [ebp - 1024]
      push  eax
      lea eax, [ebp - 768]
      push  eax
      call  strcat
      push  dword 0FFh
      lea eax, [ebp - 768]
      push  eax
      lea eax, [ebp - 256]
      push  eax
      call  strcopy
      mov eax, dword [ebp + 8]
      push  dword 0FFh
      lea edx, [ebp - 256]
      push  edx
      lea edx, [eax]
      push  edx
      call  strcopy
L24:
      mov esp, ebp
      pop ebp
      ret 0Ch
ALIGN 16
SYSTEM$_RANDOMIZE$:
      xor eax, eax
      mov ah, 02Ch
      int 021h
      mov word [SYSTEM$_RANDSEED + 2], cx
      mov word [SYSTEM$_RANDSEED], dx
L37:
      ret 
      ALIGN 16
SYSTEM$_RANDOM$$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov eax, 08088405h
      mul dword [SYSTEM$_RANDSEED]
      inc eax
      mov dword [SYSTEM$_RANDSEED], eax
      xor edx, edx
      div dword [ebp + 8]
      mov eax, edx
L38:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_ABS$$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov eax, dword [ebp + 8]
      or  eax, eax
      jns _ABS@ABS_EXIT
      neg eax
_ABS@ABS_EXIT:
L39:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_ODD$$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 01h
      mov eax, dword [ebp + 8]
      and eax, 01h
      setnz al
L40:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_SWAP$$INTEGER:
      push  ebp
      mov ebp, esp
      sub esp, 02h
      and eax, 0FFFFh
      mov bl, al
      shr eax, 08h
      mov ah, bl
L41:
      mov esp, ebp
      pop ebp
      ret 
      ALIGN 16
SYSTEM$_ADDR$$:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      mov dword [ebp - 4], edx
L42:
      mov eax, dword [ebp - 4]
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_ROUND$$DOUBLE:
      push  ebp
      mov ebp, esp
      sub esp, 018h
      fld qword [C1]
      fstp  qword [ebp - 12]
      fstcw word [ebp - 20]
      mov ax, word [ebp - 20]
      and ax, 0F3FFh
      or  ax, 0C00h
      mov word [ebp - 16], ax
      fldcw word [ebp - 16]
      fld qword [ebp + 8]
      fld qword [ebp - 12]
      test  dword [ebp + 12], 080000000h
      jns _ROUND@ROUNDPOSITIVE
      fchs  
_ROUND@ROUNDPOSITIVE:
      fadd ST0
      fistp dword [ebp - 4]
      fldcw word [ebp - 20]
      mov eax, dword [ebp - 4]
      mov dword [ebp - 24], eax
L43:
      mov eax, dword [ebp - 24]
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_TRUNC$$DOUBLE:
      push  ebp
      mov ebp, esp
      sub esp, 010h
      fstcw word [ebp - 12]
      mov ax, word [ebp - 12]
      and ax, 0F3FFh
      or  ax, 0C00h
      mov word [ebp - 8], ax
      fldcw word [ebp - 8]
      fld qword [ebp + 8]
      fistp dword [ebp - 4]
      fldcw word [ebp - 12]
      mov eax, dword [ebp - 4]
      mov dword [ebp - 16], eax
L44:
      mov eax, dword [ebp - 16]
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_IORESULT$:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov eax, dword [SYSTEM$_INOUTRES]
      mov dword [ebp - 4], eax
      mov dword [SYSTEM$_INOUTRES], 0h
L45:
      mov eax, dword [ebp - 4]
      mov esp, ebp
      pop ebp
      ret 
      ALIGN 16
iocheck:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      call  SYSTEM$_IORESULT$
      mov dword [ebp - 4], eax
      cmp dword [ebp - 4], 0h
      jz  near  L48
L47:
      push  dword 0h
      push  dword C2
      push  dword SYSTEM$_OUTPUT
      call  writestring
      push  dword 0h
      push  dword [ebp - 4]
      push  dword SYSTEM$_OUTPUT
      call  writesint
      push  dword 0h
      push  dword C3
      push  dword SYSTEM$_OUTPUT
      call  writestring
      push  dword 0h
      push  dword [ebp + 8]
      push  dword SYSTEM$_OUTPUT
      call  writesint
      push  dword SYSTEM$_OUTPUT
      call  writeline
      call  flushoutput
      push  dword 01h
      call  SYSTEM$_HALT$$BYTE
L48:
L49:
L46:
      mov esp, ebp
      pop ebp
      ret 04h
ALIGN 16
SYSTEM$_HALT$:
      mov eax, 04C00h
      int 021h
L50:
      ret 
      ALIGN 16
SYSTEM$_HALT$$BYTE:
      push  ebp
      mov ebp, esp
      mov ah, 04Ch
      mov al, byte [ebp + 8]
      int 021h
L51:
      mov esp, ebp
      pop ebp
      ret 04h
ALIGN 16
programexit:
      mov eax, 04C00h
      int 021h
L52:
      ret 
      ALIGN 16
SYSTEM$_SYS_OPEN$$POINTER$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov eax, dword [ebp + 12]
      mov edx, dword [ebp + 8]
      int 021h
      jnc _SYS_OPEN@SYS_OPEN_EXIT
      mov word [SYSTEM$_INOUTRES], ax
      xor eax, eax
_SYS_OPEN@SYS_OPEN_EXIT:
      movzx eax, ax
L53:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_SYS_CLOSE$$LONGINT:
      push  ebp
      mov ebp, esp
      mov ah, 03Eh
      mov ebx, dword [ebp + 8]
      int 021h
      jnc _SYS_CLOSE@SYS_CLOSE_EXIT
      mov word [SYSTEM$_INOUTRES], ax
_SYS_CLOSE@SYS_CLOSE_EXIT:
L54:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_SYS_ERASE$$POINTER:
      push  ebp
      mov ebp, esp
      mov ah, 041h
      mov edx, dword [ebp + 8]
      int 021h
      jnc _SYS_ERASE@SYS_ERASE_EXIT
      mov word [SYSTEM$_INOUTRES], ax
_SYS_ERASE@SYS_ERASE_EXIT:
L55:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_SYS_RENAME$$POINTER$POINTER:
      push  ebp
      mov ebp, esp
      mov edx, dword [ebp + 8]
      mov edi, dword [ebp + 12]
      mov ah, 056h
      int 021h
      jnc _SYS_RENAME@SYS_RENAME_EXIT
      mov word [SYSTEM$_INOUTRES], ax
_SYS_RENAME@SYS_RENAME_EXIT:
L56:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_SYS_WRITE$$LONGINT$POINTER$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov ebx, eax
      mov ah, 040h
      int 021h
      jnc _SYS_WRITE@SYS_WRITE_EXIT
      mov word [SYSTEM$_INOUTRES], ax
_SYS_WRITE@SYS_WRITE_EXIT:
L57:
      mov esp, ebp
      pop ebp
      ret 
      ALIGN 16
SYSTEM$_SYS_READ$$POINTER$POINTER$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov ebx, eax
      mov ah, 03Fh
      int 021h
      jnc _SYS_READ@SYS_READ_EXIT
      mov word [SYSTEM$_INOUTRES], ax
      xor eax, eax
_SYS_READ@SYS_READ_EXIT:
L58:
      mov esp, ebp
      pop ebp
      ret 
      ALIGN 16
SYSTEM$_SYS_SEEK$$LONGINT$LONGINT:
      push  ebp
      mov ebp, esp
      mov ax, 04200h
      mov ebx, dword [ebp + 8]
      mov edx, dword [ebp + 12]
      int 021h
      jnc _SYS_SEEK@EXIT
      mov word [SYSTEM$_INOUTRES], ax
_SYS_SEEK@EXIT:
L59:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_SYS_FILEPOS$$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      xor edx, edx
      mov ax, 04201h
      mov ebx, dword [ebp + 8]
      int 021h
      jnc _SYS_FILEPOS@EXIT
      mov word [SYSTEM$_INOUTRES], ax
      xor eax, eax
_SYS_FILEPOS@EXIT:
L60:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_SYS_SEEKEND$$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov ax, 04202h
      mov ebx, dword [ebp + 8]
      xor edx, edx
      int 021h
      jnc _SYS_SEEKEND@EXIT
      mov word [SYSTEM$_INOUTRES], ax
      xor eax, eax
_SYS_SEEKEND@EXIT:
L61:
      mov esp, ebp
      pop ebp
      ret 04h
ALIGN 16
SYSTEM$_ULTOA$$LONGINT$POINTER$LONGINT:
      test  edx, edx
      jz  _ULTOA@ULTOA_EXIT
      mov ebx, edx
      add ebx, 021h
      mov edi, edx
_ULTOA@ULTOA_LOOP:
      xor edx, edx
      div ecx
      dec ebx
      mov dl, byte [C4 + edx + 1]
      test  eax, eax
      mov byte [ebx], dl
      jnz _ULTOA@ULTOA_LOOP
      mov edx, edi
      add edx, 021h
      sub edx, ebx
      dec ebx
      mov byte [ebx], dl
      mov esi, ebx
      movzx ecx, dl
      inc ecx
      mov eax, ecx
      shr ecx, 02h
      cld 
      rep 
      movsd 
      mov ecx, eax
      and ecx, 03h
      rep 
      movsb 
      jmp _ULTOA@END
_ULTOA@ULTOA_EXIT:
      xor eax, eax
_ULTOA@END:
L62:
      ret 
ALIGN 16
SYSTEM$_LTOA$$LONGINT$POINTER$LONGINT:
      test  edx, edx
      jz  _LTOA@LTOA_EXIT
      push  eax
      or  eax, eax
      jns _LTOA@LTOA_NEXT
      neg eax
_LTOA@LTOA_NEXT:
      mov ebx, edx
      add ebx, 021h
      mov edi, edx
_LTOA@LTOA_LOOP:
      xor edx, edx
      div ecx
      dec ebx
      mov dl, byte [C4 + edx + 1]
      test  eax, eax
      mov byte [ebx], dl
      jnz _LTOA@LTOA_LOOP
      mov edx, edi
      add edx, 021h
      sub edx, ebx
      pop eax
      or  eax, eax
      jns _LTOA@LTOA_NEXT2
      neg eax
      dec ebx
      inc edx
      mov byte [ebx], 02Dh
_LTOA@LTOA_NEXT2:
      dec ebx
      mov byte [ebx], dl
      mov esi, ebx
      movzx ecx, dl
      inc ecx
      mov eax, ecx
      shr ecx, 02h
      cld 
      rep 
      movsd 
      mov ecx, eax
      and ecx, 03h
      rep 
      movsb 
      jmp _LTOA@END
_LTOA@LTOA_EXIT:
      xor eax, eax
_LTOA@END:
L63:
      ret 
      ALIGN 16
SYSTEM$_ATOI$$POINTER:
      push  ebp
      mov ebp, esp
      sub esp, 0Ch
      mov edi, dword [ebp + 8]
      mov ecx, dword [SYSTEM$_RADIX]
      dec ecx
_ATOI@SKIP_CH:
      mov word [ebp - 4], 0h
      cmp byte [edi], 02Dh
      jne _ATOI@GOTSIGN
      mov word [ebp - 4], 01h
      inc esi
_ATOI@GOTSIGN:
      xor edx, edx
      mov al, byte [edi]
      sub al, 030h
      cmp al, cl
      ja  _ATOI@ERROR
      jmp _ATOI@LOOPSTART
_ATOI@DEC_LOOP:
      sub al, 030h
      cmp al, cl
      ja  _ATOI@GOTNUMBER
      inc ecx
      and eax, 0FFh
      imul  edx, dword [SYSTEM$_RADIX]
      add edx, eax
_ATOI@LOOPSTART:
      mov al, byte [edi]
      inc edi
      jmp _ATOI@DEC_LOOP
_ATOI@GOTNUMBER:
      cmp word [ebp - 4], 0h
      je  _ATOI@J99
      neg edx
_ATOI@J99:
      mov dword [ebp - 12], edx
      mov dword [ebp - 8], 0h
      jmp _ATOI@EXIT
_ATOI@ERROR:
      mov dword [ebp - 8], 0FFFFFFFFh
      mov dword [ebp - 12], 0h
      jmp _ATOI@EXIT
_ATOI@EXIT:
      mov eax, edx
      cmp dword [ebp - 8], 0h
      jz  near  L66
L65:
      push  dword 0h
      push  dword C5
      push  dword SYSTEM$_OUTPUT
      call  writestring
      push  dword SYSTEM$_OUTPUT
      call  writeline
      call  flushoutput
L66:
L67:
L64:
      mov eax, dword [ebp - 12]
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_POWER10$:
      push  ebp
      mov ebp, esp
      sub esp, 08h
      fldl2t  
      fmulp st1, st0
      fld st0
      fstcw word [ebp - 8]
      movsx eax, word [ebp - 8]
      and eax, 0F3FFh
      or  eax, 0400h
      mov word [ebp - 4], ax
      fldcw word [ebp - 4]
      frndint 
      fldcw word [ebp - 8]
      fld st0
      fxch  st2
      fsubrp  st1, st0
      fld1  
      fchs  
      fxch  st1
      fscale  
      fstp  st1
      f2xm1 
      fld1  
      faddp st1, st0
      fmul  st0, st0
      fscale  
      fstp  st1
      fmulp st1
L68:
      mov esp, ebp
      pop ebp
      ret 
      ALIGN 16
SYSTEM$_FTOA$$POINTER$POINTER$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 048h
      fld qword [C6]
      fstp  qword [ebp - 68]
      mov word [ebp - 60], 0133Fh
      mov dword [ebp - 72], 0Ah
      mov edi, dword [ebp + 8]
      fld qword [edi]
      mov edi, dword [ebp + 12]
      mov ecx, dword [ebp + 16]
      fstcw word [ebp - 4]
      fldcw word [ebp - 60]
      fstp  tword [ebp - 36]
      push  edi
      inc edi
      cmp ecx, 012h
      jle _FTOA@1
      mov ecx, 012h
_FTOA@1:
      cmp ecx, 0FFFFFFEEh
      jge _FTOA@2
      mov ecx, 0FFFFFFEEh
_FTOA@2:
      mov word [ebp - 12], cx
      cld 
      movsx eax, word [ebp - 28]
      mov word [ebp - 20], ax
      and eax, 07FFFh
      je  _FTOA@5
      cmp eax, 07FFFh
      jne _FTOA@10
      cmp word [ebp - 30], 08000h
      je  _FTOA@3
      mov byte [edi], 06Eh
      mov byte [edi + 1], 061h
      mov byte [edi + 2], 06Eh
      add edi, 03h
      jmp _FTOA@90
_FTOA@3:
      cmp word [ebp - 20], 0h
      jns _FTOA@4
      mov byte [edi], 02Dh
      inc edi
_FTOA@4:
      mov byte [edi], 069h
      mov byte [edi + 1], 06Eh
      mov byte [edi + 2], 066h
      add edi, 03h
      jmp _FTOA@90
_FTOA@5:
      mov word [ebp - 16], ax
      mov byte [ebp - 56], al
      jmp _FTOA@30
_FTOA@10:
      mov word [ebp - 28], ax
      fld tword [ebp - 36]
      sub eax, 03FFFh
      mov edx, 04D10h
      imul  edx
      shr eax, 010h
      mov edx, eax
      mov word [ebp - 16], dx
      mov eax, 011h
      sub eax, edx
      mov word [ebp - 24], ax
      fild  word [ebp - 24]
      call  SYSTEM$_POWER10$
      frndint 
      fld qword [ebp - 68]
      fcomp ST0
      fstsw word [ebp - 8]
      test  word [ebp - 8], 04100h
      je  _FTOA@11
      fidiv dword [ebp - 72]
      inc word [ebp - 16]
_FTOA@11:
      fbstp tword [ebp - 36]
      lea ebx, [ebp - 56]
      mov ecx, 04h
      mov esi, 09h
_FTOA@13:
      mov al, byte [ebp + esi - 37]
      mov ah, al
      shr al, cl
      and ah, 0Fh
      add ax, 03030h
      mov word [ebx], ax
      add ebx, 02h
      dec esi
      jne _FTOA@13
      mov word [ebx], si
_FTOA@20:
      cmp word [ebp - 12], 0h
      jl  _FTOA@21
      cmp word [ebp - 16], 024h
      jl  _FTOA@21
      mov word [ebp - 12], 0FFFFFFEEh
_FTOA@21:
      movsx esi, word [ebp - 12]
      or  esi, esi
      js  _FTOA@22
      movsx ecx, word [ebp - 16]
      add esi, ecx
      inc esi
      jns _FTOA@23
      mov byte [ebp - 56], 0h
      jmp _FTOA@30
_FTOA@22:
      neg esi
_FTOA@23:
      cmp esi, 012h
      jae _FTOA@30
      cmp byte [ebp + esi - 56], 035h
      mov byte [ebp + esi - 56], 0h
      jb  _FTOA@30
_FTOA@24:
      dec esi
      js  _FTOA@25
      inc byte [ebp + esi - 56]
      cmp byte [ebp + esi - 56], 039h
      jbe _FTOA@30
      mov byte [ebp + esi - 56], 0h
      jmp _FTOA@24
_FTOA@25:
      mov word [ebp - 56], 031h
      inc word [ebp - 16]
_FTOA@30:
      xor esi, esi
      movsx edx, word [ebp - 12]
      or  edx, edx
      js  _FTOA@40
      cmp word [ebp - 20], 0h
      jns _FTOA@31
      mov byte [edi], 02Dh
      inc edi
_FTOA@31:
      movsx ecx, word [ebp - 16]
      or  ecx, ecx
      jns _FTOA@32
      mov byte [edi], 030h
      inc edi
      jmp _FTOA@33
_FTOA@32:
      call  _FTOA@GETDIGIT
      mov byte [edi], al
      inc edi
      dec ecx
      jns _FTOA@32
_FTOA@33:
      or  edx, edx
      je  near  _FTOA@90
      mov byte [edi], 02Eh
      inc edi
_FTOA@34:
      inc ecx
      je  _FTOA@35
      mov byte [edi], 030h
      inc edi
      dec edx
      jne _FTOA@34
_FTOA@35:
      dec edx
      js  _FTOA@90
      call  _FTOA@GETDIGIT
      mov byte [edi], al
      inc edi
      jmp _FTOA@35
_FTOA@40:
      mov al, 020h
      cmp word [ebp - 20], 0h
      jns _FTOA@46
      mov al, 02Dh
_FTOA@46:
      mov byte [edi], al
      inc edi
      call  _FTOA@GETDIGIT
      mov byte [edi], al
      inc edi
      inc edx
      je  _FTOA@42
      mov byte [edi], 02Eh
      inc edi
_FTOA@41:
      call  _FTOA@GETDIGIT
      mov byte [edi], al
      inc edi
      inc edx
      jne _FTOA@41
_FTOA@42:
      mov al, 065h
      mov byte [edi], al
      inc edi
      mov al, 02Bh
      movsx edx, word [ebp - 16]
      or  edx, edx
      jns _FTOA@43
      mov al, 02Dh
      neg edx
_FTOA@43:
      mov byte [edi], al
      inc edi
      mov eax, 0640Ah
      xchg  eax, edx
      div dh
      mov dh, ah
      cbw 
      div dl
      add ax, 03030h
      mov word [edi], ax
      add edi, 02h
      mov al, dh
      cbw 
      div dl
      add ax, 03030h
      mov word [edi], ax
      add edi, 02h
_FTOA@90:
      mov ecx, edi
      pop edi
      sub ecx, edi
      dec ecx
      mov byte [edi], cl
      fclex 
      fldcw word [ebp - 4]
      jmp _FTOA@END
_FTOA@GETDIGIT:
      mov al, byte [ebp + esi - 56]
      inc esi
      or  al, al
      jne _FTOA@STOP
      mov al, 030h
      dec esi
_FTOA@STOP:
      ret 0h
_FTOA@END:
L69:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
SYSTEM$_ATOF$$STRING:
      push  ebp
      mov ebp, esp
      sub esp, 024h
      mov word [ebp - 4], 0133Fh
      mov dword [ebp - 28], 0Ah
      mov edi, dword [ebp + 8]
      xor ecx, ecx
      mov cl, byte [edi]
      inc edi
      fstcw word [ebp - 8]
      fclex 
      fldcw word [ebp - 4]
      fldz  
      test  ecx, ecx
      jz  near  _ATOF@7
      mov al, byte [edi]
      mov byte [ebp - 20], al
      cmp al, 020h
      je  _ATOF@1
      cmp al, 02Bh
      je  _ATOF@1
      cmp al, 02Dh
      jne _ATOF@2
_ATOF@1:
      inc edi
      dec ecx
_ATOF@2:
      push  ecx
      call  _ATOF@DIGITSTR
      xor ebx, ebx
      jcxz  _ATOF@3
      mov al, byte [edi]
      cmp al, 02Eh
      jne _ATOF@3
      inc edi
      dec ecx
      call  _ATOF@DIGITSTR
      neg ebx
_ATOF@3:
      pop eax
      cmp eax, ecx
      je  _ATOF@7
      jecxz _ATOF@5
      mov al, byte [edi]
      cmp al, 065h
      je  _ATOF@4
      cmp al, 065h
      jne _ATOF@5
_ATOF@4:
      inc edi
      dec ecx
      push  ecx
      push  edi
      call  SYSTEM$_ATOI$$POINTER
      pop ecx
      jc  _ATOF@7
      push  eax
      shr eax, 010h
      mov edx, eax
      pop eax
      mov si, dx
      cwd 
      cmp si, dx
      jne _ATOF@7
      cmp ax, 01387h
      jge _ATOF@7
      cmp ax, 0FFFFEC79h
      jle _ATOF@7
      add bx, ax
_ATOF@5:
      mov ax, bx
      mov word [ebp - 16], ax
      fild  word [ebp - 16]
      call  SYSTEM$_POWER10$
      cmp byte [ebp - 20], 02Dh
      jne _ATOF@6
      fchs  
_ATOF@6:
      fstsw word [ebp - 12]
      test  word [ebp - 12], 09h
      je  _ATOF@8
_ATOF@7:
      stc 
_ATOF@8:
      fclex 
      fldcw word [ebp - 8]
      jmp _ATOF@EXIT
_ATOF@DIGITSTR:
      xor ebx, ebx
_ATOF@D1:
      jcxz  _ATOF@D2
      mov al, byte [edi]
      sub al, 03Ah
      add al, 0Ah
      jnc _ATOF@D2
      fimul dword [ebp - 28]
      cbw 
      mov word [ebp - 12], ax
      fiadd word [ebp - 12]
      inc ebx
      inc edi
      dec ecx
      jmp _ATOF@D1
_ATOF@D2:
      ret 0h
_ATOF@EXIT:
      fstp  qword [ebp - 32]
L70:
      fld qword [ebp - 36]
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_VAL$$STRING$DOUBLE$LONGINT:
      push  ebp
      mov ebp, esp
      mov edi, dword [ebp + 8]
      xor ecx, ecx
      mov cl, byte [edi]
      inc edi
      jecxz _VAL@V2
_VAL@V1:
      cmp byte [edi], 020h
      jne _VAL@V2
      inc edi
      loop  _VAL@V1
_VAL@V2:
      dec edi
      push  edi
      call  SYSTEM$_ATOF$$STRING
      jc  _VAL@V3
      jecxz _VAL@V4
_VAL@V3:
      mov ecx, edi
      sub ecx, dword [ebp + 8]
      mov eax, dword [ebp + 12]
      fstp  qword [eax]
      fldz  
_VAL@V4:
      mov edi, dword [ebp + 16]
      mov dword [edi], ecx
      mov eax, dword [ebp + 12]
      fstp  qword [eax]
L71:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
SYSTEM$_TEXT_CLOSE$$TEXTREC:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      push  dword [eax]
      call  SYSTEM$_SYS_CLOSE$$LONGINT
L72:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_TEXT_IO$$TEXTREC:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      mov eax, dword [eax + 4]
      cmp eax, 0D7B2h
      jnz near  L78
      mov eax, dword [ebp + 8]
      mov ecx, dword [eax + 12]
      mov eax, dword [ebp + 8]
      mov edx, dword [eax + 20]
      mov eax, dword [ebp + 8]
      mov eax, dword [eax]
      call  SYSTEM$_SYS_WRITE$$LONGINT$POINTER$LONGINT
      jmp L75
L78:
      cmp eax, 0D7B1h
      jnz near  L76
L77:
      mov eax, dword [ebp + 8]
      mov ecx, dword [eax + 8]
      mov eax, dword [ebp + 8]
      mov edx, dword [eax + 20]
      mov eax, dword [ebp + 8]
      mov eax, dword [eax]
      call  SYSTEM$_SYS_READ$$POINTER$POINTER$LONGINT
      mov edx, dword [ebp + 8]
      mov dword [edx + 16], eax
      jmp L75
L76:
L74:
      push  dword 064h
      call  SYSTEM$_HALT$$BYTE
L75:
      mov eax, dword [ebp + 8]
      mov dword [eax + 12], 0h
L73:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_TEXT_OPEN$$TEXTREC:
      push  ebp
      mov ebp, esp
      sub esp, 0100h
      lea eax, [ebp - 256]
      push  eax
      mov eax, dword [ebp + 8]
      lea edx, [eax + 40]
      push  edx
      call  SYSTEM$_ASCIIZ$$STRING$POINTER
      mov eax, dword SYSTEM$_TEXT_IO$$TEXTREC
      mov edx, dword [ebp + 8]
      mov dword [edx + 28], eax
      mov eax, dword SYSTEM$_TEXT_IO$$TEXTREC
      mov edx, dword [ebp + 8]
      mov dword [edx + 32], eax
      mov eax, dword SYSTEM$_TEXT_CLOSE$$TEXTREC
      mov edx, dword [ebp + 8]
      mov dword [edx + 36], eax
      mov eax, dword [ebp + 8]
      mov eax, dword [eax + 4]
      cmp eax, 0D7B1h
      jnz near  L84
      push  dword 03D00h
      lea eax, [ebp - 256]
      push  eax
      call  SYSTEM$_SYS_OPEN$$POINTER$LONGINT
      mov edx, dword [ebp + 8]
      mov dword [edx], eax
      jmp L81
L84:
      cmp eax, 0D7B2h
      jnz near  L82
L83:
      push  dword 03C00h
      lea eax, [ebp - 256]
      push  eax
      call  SYSTEM$_SYS_OPEN$$POINTER$LONGINT
      mov edx, dword [ebp + 8]
      mov dword [edx], eax
      jmp L81
L82:
L80:
L81:
L79:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_ASSIGN$$TEXT$STRING:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      mov dword [eax + 4], 0D7B0h
      mov eax, dword [ebp + 8]
      mov dword [eax + 8], 080h
      mov eax, dword [ebp + 8]
      mov dword [eax + 12], 0h
      mov eax, dword [ebp + 8]
      mov dword [eax + 16], 0h
      mov eax, dword [ebp + 8]
      lea edx, [eax + 169]
      mov eax, dword [ebp + 8]
      mov dword [eax + 20], edx
      mov eax, dword [ebp + 12]
      mov edx, dword [ebp + 8]
      push  dword 080h
      lea ecx, [eax]
      push  ecx
      lea ecx, [edx + 40]
      push  ecx
      call  strcopy
      mov eax, dword SYSTEM$_TEXT_OPEN$$TEXTREC
      mov edx, dword [ebp + 8]
      mov dword [edx + 24], eax
L85:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_REWRITE$$TEXT:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      mov dword [eax + 4], 0D7B2h
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 24]
L86:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_RESET$$TEXT:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      mov dword [eax + 4], 0D7B1h
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 24]
L87:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_APPEND$$TEXT:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      mov dword [eax + 4], 0D7B2h
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 20]
L88:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_FLUSH$$TEXT:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      cmp dword [eax + 4], 0D7B2h
      jnz near  L91
L90:
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 32]
L91:
L92:
L89:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_CLOSE$$TEXT:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      cmp dword [eax + 4], 0D7B0h
      jz  near  L95
L94:
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 32]
      mov eax, dword [ebp + 8]
      mov dword [eax + 4], 0D7B0h
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 36]
L95:
L96:
L93:
      mov esp, ebp
      pop ebp
      ret 04h
ALIGN 16
flushoutput:
      lea eax, [SYSTEM$_OUTPUT]
      push  eax
      call  [eax + 32]
L97:
      ret 
      ALIGN 16
SYSTEM$_SPACES$$LONGINT$STRING:
      push  ebp
      mov ebp, esp
      mov edi, dword [ebp + 12]
      mov cl, byte [ebp + 8]
      mov byte [edi], cl
      mov dl, cl
      inc edi
      jecxz _SPACES@EXIT
      cld 
      mov eax, 020202020h
      shr cl, 02h
      rep 
      stosd 
      mov cl, dl
      and cl, 03h
      rep 
      stosb 
_SPACES@EXIT:
L98:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
writestring:
      push  ebp
      mov ebp, esp
      sub esp, 020Ch
      mov eax, dword [ebp + 12]
      movzx eax, byte [eax]
      mov edx, dword [ebp + 16]
      sub edx, eax
      mov dword [ebp + 16], edx
      cmp dword [ebp + 16], 0h
      jle near  L101
L100:
      lea eax, [ebp - 268]
      push  eax
      push  dword [ebp + 16]
      call  SYSTEM$_SPACES$$LONGINT$STRING
      push  dword 0FFh
      lea eax, [ebp - 268]
      push  eax
      lea eax, [ebp - 524]
      push  eax
      call  strcopy
      mov eax, dword [ebp + 12]
      lea eax, [eax]
      push  eax
      lea eax, [ebp - 524]
      push  eax
      call  strcat
      mov eax, dword [ebp + 12]
      push  dword 0FFh
      lea edx, [ebp - 524]
      push  edx
      lea edx, [eax]
      push  edx
      call  strcopy
L101:
L102:
      mov eax, dword [ebp + 8]
      cmp dword [eax + 4], 0D7B2h
      jnz near  L104
L103:
      mov eax, dword [ebp + 12]
      movzx eax, byte [eax]
      mov dword [ebp - 8], eax
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 8]
      mov eax, dword [eax + 8]
      sub eax, dword [edx + 12]
      mov dword [ebp - 4], eax
      mov dword [ebp - 12], 01h
      cmp dword [ebp - 4], 0h
      jnz near  L107
L106:
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 32]
L107:
L108:
L109:
      mov eax, dword [ebp - 8]
      cmp eax, dword [ebp - 4]
      jle near  L110
L111:
      push  dword [ebp - 4]
      mov eax, dword [ebp + 8]
      mov eax, dword [eax + 20]
      mov edx, dword [ebp + 8]
      mov edx, dword [edx + 12]
      lea ecx, [eax + edx]
      push  ecx
      mov eax, dword [ebp + 12]
      mov edx, dword [ebp - 12]
      lea ecx, [eax + edx]
      push  ecx
      call  SYSTEM$_MOVE$$$$LONGINT
      mov eax, dword [ebp + 8]
      mov eax, dword [eax + 12]
      add eax, dword [ebp - 4]
      mov edx, dword [ebp + 8]
      mov dword [edx + 12], eax
      mov eax, dword [ebp - 4]
      sub dword [ebp - 8], eax
      mov eax, dword [ebp - 4]
      add dword [ebp - 12], eax
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 28]
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 8]
      mov eax, dword [eax + 8]
      sub eax, dword [edx + 12]
      mov dword [ebp - 4], eax
      jmp L109
L110:
      push  dword [ebp - 8]
      mov eax, dword [ebp + 8]
      mov eax, dword [eax + 20]
      mov edx, dword [ebp + 8]
      mov edx, dword [edx + 12]
      lea ecx, [eax + edx]
      push  ecx
      mov eax, dword [ebp + 12]
      mov edx, dword [ebp - 12]
      lea ecx, [eax + edx]
      push  ecx
      call  SYSTEM$_MOVE$$$$LONGINT
      mov eax, dword [ebp + 8]
      mov eax, dword [eax + 12]
      add eax, dword [ebp - 8]
      mov edx, dword [ebp + 8]
      mov dword [edx + 12], eax
L104:
L105:
L99:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
writeline:
      push  ebp
      mov ebp, esp
      push  dword 0h
      push  dword C7
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  writestring
L112:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
writeboolean:
      push  ebp
      mov ebp, esp
      cmp byte [ebp + 12], 01h
      jnz near  L115
L114:
      push  dword 0h
      push  dword C8
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  writestring
      jmp L116
L115:
      push  dword 0h
      push  dword C9
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  writestring
L116:
L113:
      mov esp, ebp
      pop ebp
      ret 09h
      ALIGN 16
writechar:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov byte [ebp - 4], 01h
      mov eax, dword [ebp + 12]
      mov byte [ebp - 3], al
      push  dword [ebp + 16]
      lea eax, [ebp - 4]
      push  eax
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  writestring
L117:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
writeuint:
      push  ebp
      mov ebp, esp
      sub esp, 0100h
      mov ecx, dword [SYSTEM$_RADIX]
      lea eax, [ebp - 256]
      mov edx, eax
      mov eax, dword [ebp + 12]
      call  SYSTEM$_ULTOA$$LONGINT$POINTER$LONGINT
      push  dword [ebp + 16]
      lea eax, [ebp - 256]
      push  eax
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  writestring
L118:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
writesint:
      push  ebp
      mov ebp, esp
      sub esp, 0100h
      mov ecx, dword [SYSTEM$_RADIX]
      lea eax, [ebp - 256]
      mov edx, eax
      mov eax, dword [ebp + 12]
      call  SYSTEM$_LTOA$$LONGINT$POINTER$LONGINT
      push  dword [ebp + 16]
      lea eax, [ebp - 256]
      push  eax
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  writestring
L119:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
writepointer:
      push  ebp
      mov ebp, esp
      sub esp, 0204h
      mov ecx, 010h
      lea eax, [ebp - 256]
      mov edx, eax
      mov eax, dword [ebp + 12]
      call  SYSTEM$_ULTOA$$LONGINT$POINTER$LONGINT
      push  dword 0FFh
      push  dword C10
      lea eax, [ebp - 512]
      push  eax
      call  strcopy
      mov eax, 09h
      sub al, byte [ebp - 256]
      lea esi, [ebp - 256]
      lea edi, [ebp - 512]
      add edi, eax
      inc esi
      movzx ecx, byte [ebp - 256]
      rep 
      movsb 
      push  dword [ebp + 16]
      lea eax, [ebp - 512]
      push  eax
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  writestring
L120:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
writereal:
      push  ebp
      mov ebp, esp
      sub esp, 0100h
      push  dword 0FFFFFFF3h
      lea eax, [ebp - 256]
      push  eax
      lea eax, [ebp + 12]
      push  eax
      call  SYSTEM$_FTOA$$POINTER$POINTER$LONGINT
      push  dword [ebp + 20]
      lea eax, [ebp - 256]
      push  eax
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  writestring
L121:
      mov esp, ebp
      pop ebp
      ret 010h
      ALIGN 16
readstring:
      push  ebp
      mov ebp, esp
      sub esp, 08h
      mov eax, dword [ebp + 8]
      cmp dword [eax + 4], 0D7B1h
      jnz near  L124
L123:
      mov eax, dword [ebp + 12]
      mov byte [eax], 0h
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 8]
      mov eax, dword [eax + 12]
      cmp eax, dword [edx + 16]
      jb  near  L127
L126:
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 28]
L127:
L128:
      mov eax, dword [ebp + 8]
      mov eax, dword [eax + 12]
      mov dword [ebp - 4], eax
      mov dword [ebp - 8], 01h
L129:
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 8]
      mov eax, dword [eax + 12]
      cmp eax, dword [edx + 16]
      jae near  L130
      mov eax, dword [ebp + 8]
      mov eax, dword [eax + 20]
      mov edx, dword [ebp - 4]
      cmp byte [eax + edx], 0Ah
      jz  near  L130
L131:
L132:
      mov eax, dword [ebp + 8]
      mov eax, dword [eax + 20]
      mov edx, dword [ebp - 4]
      cmp byte [eax + edx], 0Ah
      jz  near  L133
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp - 4]
      cmp edx, dword [eax + 16]
      jge near  L133
L134:
      inc dword [ebp - 4]
      jmp L132
L133:
      mov eax, dword [ebp - 8]
      add eax, dword [ebp - 4]
      mov edx, dword [ebp + 8]
      sub eax, dword [edx + 12]
      cmp eax, dword [ebp + 16]
      ja  near  L136
L135:
      mov edx, dword [ebp + 8]
      mov ecx, dword [ebp - 4]
      sub ecx, dword [edx + 12]
      push  ecx
      mov edx, dword [ebp + 12]
      mov ecx, dword [ebp - 8]
      lea ebx, [edx + ecx]
      push  ebx
      mov edx, dword [ebp + 8]
      mov edx, dword [edx + 20]
      mov ecx, dword [ebp + 8]
      mov ecx, dword [ecx + 12]
      lea ebx, [edx + ecx]
      push  ebx
      call  SYSTEM$_MOVE$$$$LONGINT
      mov edx, dword [ebp - 8]
      add edx, dword [ebp - 4]
      mov ecx, dword [ebp + 8]
      sub edx, dword [ecx + 12]
      mov dword [ebp - 8], edx
      mov edx, dword [ebp + 12]
      mov ecx, dword [ebp - 8]
      dec ecx
      cmp byte [edx + ecx], 0Dh
      jnz near  L139
L138:
      dec dword [ebp - 8]
L139:
L140:
      jmp L137
L136:
      mov edx, dword [ebp - 8]
      cmp edx, dword [ebp + 16]
      jg  near  L142
L141:
      mov edx, dword [ebp + 16]
      inc edx
      sub edx, dword [ebp - 8]
      push  edx
      mov edx, dword [ebp + 12]
      mov ecx, dword [ebp - 8]
      lea ebx, [edx + ecx]
      push  ebx
      mov edx, dword [ebp + 8]
      mov edx, dword [edx + 20]
      mov ecx, dword [ebp + 8]
      mov ecx, dword [ecx + 12]
      lea ebx, [edx + ecx]
      push  ebx
      call  SYSTEM$_MOVE$$$$LONGINT
L142:
L143:
      mov edx, dword [ebp + 16]
      inc edx
      mov dword [ebp - 8], edx
L137:
      mov edx, dword [ebp + 8]
      mov ecx, dword [ebp - 4]
      mov dword [edx + 12], ecx
      mov edx, dword [ebp + 8]
      mov ecx, dword [ebp - 4]
      cmp ecx, dword [edx + 16]
      jl  near  L145
L144:
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 28]
      mov edx, dword [ebp + 8]
      mov edx, dword [edx + 12]
      mov dword [ebp - 4], edx
L145:
L146:
      jmp L129
L130:
      mov edx, dword [ebp - 8]
      dec edx
      mov ecx, dword [ebp + 12]
      mov byte [ecx], dl
L124:
L125:
L122:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
readline:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      cmp dword [eax + 4], 0D7B1h
      jnz near  L149
L148:
L151:
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 8]
      mov eax, dword [eax + 12]
      cmp eax, dword [edx + 16]
      jb  near  L155
L154:
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 28]
L155:
L156:
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 8]
      mov eax, dword [eax + 12]
      cmp eax, dword [edx + 16]
      jb  near  L158
L157:
      jmp L147
L158:
L159:
      mov eax, dword [ebp + 8]
      inc dword [eax + 12]
L153:
      mov edx, dword [ebp + 8]
      mov edx, dword [edx + 20]
      mov ecx, dword [ebp + 8]
      mov ecx, dword [ecx + 12]
      dec ecx
      cmp byte [edx + ecx], 0Ah
      jnz near  L151
L152:
      mov edx, dword [ebp + 8]
      inc dword [edx + 12]
L149:
L150:
L147:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
readint:
      push  ebp
      mov ebp, esp
      sub esp, 0208h
      mov eax, dword [ebp + 8]
      cmp dword [eax + 4], 0D7B1h
      jnz near  L162
L161:
L164:
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 8]
      mov eax, dword [eax + 12]
      cmp eax, dword [edx + 16]
      jb  near  L168
L167:
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 28]
L168:
L169:
      mov eax, dword [ebp + 8]
      mov eax, dword [eax + 20]
      mov edx, dword [ebp + 8]
      mov edx, dword [edx + 12]
      mov al, byte [eax + edx]
      mov byte [ebp - 4], al
      mov eax, dword [ebp + 8]
      inc dword [eax + 12]
L166:
      cmp byte [ebp - 4], 0Dh
      jz  near  L164
      cmp byte [ebp - 4], 0Ah
      jz  near  L164
      cmp byte [ebp - 4], 09h
      jz  near  L164
      cmp byte [ebp - 4], 020h
      jz  near  L164
L165:
      mov edx, dword [ebp + 8]
      dec dword [edx + 12]
      mov byte [ebp - 260], 0h
L170:
      mov ecx, dword [ebp + 8]
      mov ebx, dword [ebp + 8]
      mov ecx, dword [ecx + 12]
      cmp ecx, dword [ebx + 16]
      jb  near  L174
L173:
      mov eax, dword [ebp + 8]
      lea edi, [eax]
      push  edi
      call  [eax + 28]
L174:
L175:
      mov ecx, dword [ebp + 8]
      mov ecx, dword [ecx + 20]
      mov ebx, dword [ebp + 8]
      mov ebx, dword [ebx + 12]
      mov cl, byte [ecx + ebx]
      mov byte [ebp - 4], cl
      push  dword 0FFh
      lea ecx, [ebp - 260]
      push  ecx
      lea ecx, [ebp - 520]
      push  ecx
      call  strcopy
      cmp byte [ebp - 520], 0FFh
      jz  L176
      inc byte [ebp - 520]
      lea edi, [ebp - 520]
      movzx ecx, byte [ebp - 520]
      add edi, ecx
      mov cl, byte [ebp - 4]
      mov byte [edi], cl
L176:
      push  dword 0FFh
      lea ecx, [ebp - 520]
      push  ecx
      lea ecx, [ebp - 260]
      push  ecx
      call  strcopy
      mov ecx, dword [ebp + 8]
      inc dword [ecx + 12]
L172:
      cmp byte [ebp - 4], 0Dh
      jz  near  L171
L179:
      cmp byte [ebp - 4], 0Ah
      jz  near  L171
      jmp L178
L178:
      cmp byte [ebp - 4], 09h
      jz  near  L171
      jmp L177
L177:
      cmp byte [ebp - 4], 020h
      jz  near  L171
      jmp L170
L171:
      push  eax
      lea eax, [ebp - 259]
      push  eax
      call  SYSTEM$_ATOI$$POINTER
      mov ebx, eax
      pop eax
      pop eax
      mov eax, dword [ebp + 12]
      mov dword [eax], ebx
L162:
L163:
L160:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_ASSIGN$$FILE$STRING:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      mov dword [eax + 4], 0D7B0h
      mov eax, dword [ebp + 12]
      mov edx, dword [ebp + 8]
      push  dword 07Fh
      lea ecx, [eax]
      push  ecx
      lea ecx, [edx + 54]
      push  ecx
      call  strcopy
L180:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_RESET$$FILE$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 0100h
      mov eax, dword [ebp + 8]
      cmp dword [eax + 4], 0D7B0h
      jz  near  L183
L182:
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  SYSTEM$_CLOSE$$FILE
L183:
L184:
      cmp dword [ebp + 12], 0h
      jnz near  L186
L185:
      mov dword [SYSTEM$_INOUTRES], 02h
      jmp L187
L186:
      mov eax, dword [ebp + 8]
      mov dword [eax + 4], 0D7B1h
      lea eax, [ebp - 256]
      push  eax
      mov eax, dword [ebp + 8]
      lea edx, [eax + 54]
      push  edx
      call  SYSTEM$_ASCIIZ$$STRING$POINTER
      mov eax, dword [_SYSTEM$_FILEMODE]
      add eax, 03D00h
      push  eax
      lea eax, [ebp - 256]
      push  eax
      call  SYSTEM$_SYS_OPEN$$POINTER$LONGINT
      mov edx, dword [ebp + 8]
      mov dword [edx], eax
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 12]
      mov dword [eax + 8], edx
L187:
L181:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_RESET$$FILE:
      push  ebp
      mov ebp, esp
      push  dword 080h
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  SYSTEM$_RESET$$FILE$LONGINT
L188:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_REWRITE$$FILE$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 0100h
      cmp dword [ebp + 12], 0h
      jnz near  L191
L190:
      mov dword [SYSTEM$_INOUTRES], 02h
      jmp L192
L191:
      mov eax, dword [ebp + 8]
      mov dword [eax + 4], 0D7B2h
      lea eax, [ebp - 256]
      push  eax
      mov eax, dword [ebp + 8]
      lea edx, [eax + 54]
      push  edx
      call  SYSTEM$_ASCIIZ$$STRING$POINTER
      push  dword 03C00h
      lea eax, [ebp - 256]
      push  eax
      call  SYSTEM$_SYS_OPEN$$POINTER$LONGINT
      mov edx, dword [ebp + 8]
      mov dword [edx], eax
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 12]
      mov dword [eax + 8], edx
L192:
L189:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_REWRITE$$FILE:
      push  ebp
      mov ebp, esp
      push  dword 080h
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  SYSTEM$_REWRITE$$FILE$LONGINT
L193:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_CLOSE$$FILE:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      cmp dword [eax + 4], 0D7B0h
      jz  near  L196
L195:
      mov eax, dword [ebp + 8]
      mov dword [eax + 4], 0D7B0h
      mov eax, dword [ebp + 8]
      push  dword [eax]
      call  SYSTEM$_SYS_CLOSE$$LONGINT
L196:
L197:
L194:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_BLOCKWRITE$$FILE$$LONGINT$LONGINT:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 16]
      imul  edx, dword [eax + 8]
      mov ecx, edx
      mov eax, dword [ebp + 12]
      lea edx, [eax]
      mov edx, edx
      mov eax, dword [ebp + 8]
      mov eax, dword [eax]
      call  SYSTEM$_SYS_WRITE$$LONGINT$POINTER$LONGINT
      mov edx, dword [ebp + 8]
      mov edi, dword [edx + 8]
      mov edx, eax
      sar edx, 01Fh
      idiv  edi
      mov edx, dword [ebp + 20]
      mov dword [edx], eax
L198:
      mov esp, ebp
      pop ebp
      ret 010h
      ALIGN 16
SYSTEM$_BLOCKWRITE$$FILE$$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      lea eax, [ebp - 4]
      push  eax
      push  dword [ebp + 16]
      mov eax, dword [ebp + 12]
      lea edx, [eax]
      push  edx
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  SYSTEM$_BLOCKWRITE$$FILE$$LONGINT$LONGINT
      cmp dword [ebp - 4], 0h
      jnz near  L201
      cmp dword [ebp + 16], 0h
      jle near  L201
L200:
      mov dword [SYSTEM$_INOUTRES], 065h
L201:
L202:
L199:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
SYSTEM$_BLOCKREAD$$FILE$$LONGINT$LONGINT:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 16]
      imul  edx, dword [eax + 8]
      mov ecx, edx
      mov eax, dword [ebp + 12]
      lea edx, [eax]
      mov edx, edx
      mov eax, dword [ebp + 8]
      mov eax, dword [eax]
      call  SYSTEM$_SYS_READ$$POINTER$POINTER$LONGINT
      mov edx, dword [ebp + 8]
      mov edi, dword [edx + 8]
      mov edx, eax
      sar edx, 01Fh
      idiv  edi
      mov edx, dword [ebp + 20]
      mov dword [edx], eax
L203:
      mov esp, ebp
      pop ebp
      ret 010h
      ALIGN 16
SYSTEM$_BLOCKREAD$$FILE$$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      lea eax, [ebp - 4]
      push  eax
      push  dword [ebp + 16]
      mov eax, dword [ebp + 12]
      lea edx, [eax]
      push  edx
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      call  SYSTEM$_BLOCKREAD$$FILE$$LONGINT$LONGINT
L204:
      mov esp, ebp
      pop ebp
      ret 0Ch
      ALIGN 16
SYSTEM$_FILEPOS$$FILE:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov eax, dword [ebp + 8]
      push  dword [eax]
      call  SYSTEM$_SYS_FILEPOS$$LONGINT
      mov edx, dword [ebp + 8]
      mov edi, dword [edx + 8]
      mov edx, eax
      sar edx, 01Fh
      idiv  edi
      mov dword [ebp - 4], eax
L205:
      mov eax, dword [ebp - 4]
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_SEEK$$FILE$LONGINT:
      push  ebp
      mov ebp, esp
      mov eax, dword [ebp + 8]
      mov edx, dword [ebp + 12]
      imul  edx, dword [eax + 8]
      push  edx
      mov eax, dword [ebp + 8]
      push  dword [eax]
      call  SYSTEM$_SYS_SEEK$$LONGINT$LONGINT
L206:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_FILESIZE$$FILE:
      push  ebp
      mov ebp, esp
      sub esp, 08h
      mov eax, dword [ebp + 8]
      push  dword [eax]
      call  SYSTEM$_SYS_FILEPOS$$LONGINT
      mov dword [ebp - 4], eax
      mov eax, dword [ebp + 8]
      push  dword [eax]
      call  SYSTEM$_SYS_SEEKEND$$LONGINT
      mov dword [ebp - 8], eax
      push  dword [ebp - 4]
      mov eax, dword [ebp + 8]
      push  dword [eax]
      call  SYSTEM$_SYS_SEEK$$LONGINT$LONGINT
L207:
      mov eax, dword [ebp - 8]
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_GETCMDLINE$$STRING:
      push  ebp
      mov ebp, esp
      sub esp, 08h
      mov eax, 0EE02h
      int 031h
      add esi, 080h
      mov dword [ebp - 4], esi
      mov al, byte [esi]
      inc al
      mov byte [ebp - 8], al
      movzx eax, byte [ebp - 8]
      push  eax
      mov eax, dword [ebp + 8]
      lea edx, [eax]
      push  edx
      mov eax, dword [ebp - 4]
      push  eax
      call  SYSTEM$_MOVE$$$$LONGINT
L208:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_PARAMSTR$$LONGINT:
      push  ebp
      mov ebp, esp
      sub esp, 0214h
      cmp dword [ebp + 8], 0h
      jnz near  L211
L210:
      mov eax, 0EE02h
      int 031h
      mov dword [ebp - 4], ecx
      mov esi, ecx
      cld 
_PARAMSTR@1:
      cmp byte [esi], 0h
      jz  _PARAMSTR@2
      inc esi
      jmp _PARAMSTR@1
_PARAMSTR@2:
      mov eax, esi
      sub eax, ecx
      mov dword [ebp - 276], eax
      push  dword [ebp - 276]
      lea eax, [ebp - 259]
      push  eax
      mov eax, dword [ebp - 4]
      push  eax
      call  SYSTEM$_MOVE$$$$LONGINT
      mov eax, dword [ebp - 276]
      mov byte [ebp - 260], al
      jmp L212
L211:
      mov dword [ebp - 268], 0h
      mov dword [ebp - 264], 0h
      mov byte [ebp - 260], 0h
      movzx eax, byte [SYSTEM$_CMDLINE]
      mov dword [ebp - 272], eax
      cmp dword [ebp - 272], 0h
      jz  near  L214
L213:
L216:
      inc dword [ebp - 268]
      mov eax, dword [ebp - 268]
      cmp byte [SYSTEM$_CMDLINE + eax], 020h
      jnz near  L220
L219:
      inc dword [ebp - 264]
L222:
      mov eax, dword [ebp - 268]
      cmp eax, dword [ebp - 272]
      jz  near  L223
      mov eax, dword [ebp - 268]
      cmp byte [SYSTEM$_CMDLINE + eax], 020h
      jnz near  L223
L224:
      inc dword [ebp - 268]
      jmp L222
L223:
L220:
L221:
      mov eax, dword [ebp - 264]
      cmp eax, dword [ebp + 8]
      jnz near  L226
L225:
L228:
      mov eax, dword [ebp - 272]
      inc eax
      mov edx, dword [ebp - 268]
      cmp edx, eax
      jz  near  L229
      mov eax, dword [ebp - 268]
      cmp byte [SYSTEM$_CMDLINE + eax], 020h
      jz  near  L229
L230:
      push  dword 0FFh
      lea eax, [ebp - 260]
      push  eax
      lea eax, [ebp - 532]
      push  eax
      call  strcopy
      mov eax, dword [ebp - 268]
      cmp byte [ebp - 532], 0FFh
      jz  L231
      inc byte [ebp - 532]
      lea edi, [ebp - 532]
      movzx edx, byte [ebp - 532]
      add edi, edx
      mov dl, byte [SYSTEM$_CMDLINE + eax]
      mov byte [edi], dl
L231:
      push  dword 0FFh
      lea edx, [ebp - 532]
      push  edx
      lea edx, [ebp - 260]
      push  edx
      call  strcopy
      inc dword [ebp - 268]
      jmp L228
L229:
      jmp L217
L226:
L227:
L218:
      mov edx, dword [ebp - 268]
      cmp edx, dword [ebp - 272]
      jb  near  L216
L217:
L214:
L215:
L212:
      mov edx, dword [ebp + 12]
      push  dword 0FFh
      lea ecx, [ebp - 260]
      push  ecx
      push  edx
      call  strcopy
L209:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_PARAMCOUNT$:
      push  ebp
      mov ebp, esp
      sub esp, 010h
      mov dword [ebp - 4], 0h
      mov dword [ebp - 8], 0h
      movzx eax, byte [SYSTEM$_CMDLINE]
      mov dword [ebp - 12], eax
L233:
      mov eax, dword [ebp - 8]
      cmp eax, dword [ebp - 12]
      jz  near  L234
L235:
      inc dword [ebp - 8]
      mov eax, dword [ebp - 8]
      cmp byte [SYSTEM$_CMDLINE + eax], 020h
      jnz near  L237
L236:
      inc dword [ebp - 4]
L239:
      mov eax, dword [ebp - 8]
      cmp eax, dword [ebp - 12]
      jz  near  L240
      mov eax, dword [ebp - 8]
      cmp byte [SYSTEM$_CMDLINE + eax], 020h
      jnz near  L240
L241:
      inc dword [ebp - 8]
      jmp L239
L240:
L237:
L238:
      jmp L233
L234:
      mov eax, dword [ebp - 4]
      mov dword [ebp - 16], eax
L232:
      mov eax, dword [ebp - 16]
      mov esp, ebp
      pop ebp
      ret 
      ALIGN 16
getmem:
      push  ebp
      mov ebp, esp
      sub esp, 0Ch
      mov eax, dword [ebp + 8]
      mov dword [eax], 0h
      mov eax, dword [ebp + 12]
      cmp eax, 0h
      jz  _GETMEM@1
      mov ebx, dword [SYSTEM$_FREELIST]
      cmp ebx, 0h
      jz  _GETMEM@1
      add eax, 07h
      and eax, 0FFFFFFF8h
      mov ecx, 0h
_GETMEM@3:
      cmp [ebx + 4], eax
      jae _GETMEM@2
      mov ecx, ebx
      mov ebx, [ebx]
      cmp ebx, 0h
      jz  _GETMEM@1
      jmp _GETMEM@3
_GETMEM@2:
      mov edx, eax
      add edx, 08h
      cmp [ebx + 4], edx
      jb  _GETMEM@4
      mov esi, ebx
      add esi, eax
      mov edx, [ebx]
      mov [esi], edx
      mov edx, [ebx + 4]
      sub edx, eax
      mov [esi + 4], edx
      jmp _GETMEM@5
_GETMEM@4:
      mov esi, [ebx]
_GETMEM@5:
      mov eax, dword [SYSTEM$_FREELIST]
      cmp eax, ebx
      jnz _GETMEM@6
      mov dword [SYSTEM$_FREELIST], esi
_GETMEM@6:
      cmp ecx, 0h
      jz  _GETMEM@7
      mov [ecx], esi
_GETMEM@7:
      mov eax, dword [ebp + 8]
      mov [eax], ebx
_GETMEM@1:
L242:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
freemem:
      push  ebp
      mov ebp, esp
      sub esp, 014h
      mov eax, dword [ebp + 8]
      mov eax, [eax]
      cmp eax, 0h
      jnz _FREEMEM@1
      jmp _FREEMEM@10
_FREEMEM@1:
      mov ebx, dword [ebp + 12]
      cmp ebx, 0h
      jnz _FREEMEM@2
      jmp _FREEMEM@10
_FREEMEM@2:
      add ebx, 07h
      and ebx, 0FFFFFFF8h
      mov ecx, dword [SYSTEM$_FREELIST]
      cmp ecx, 0h
      jnz _FREEMEM@3
      mov dword [SYSTEM$_FREELIST], eax
      mov dword [eax], 0h
      mov [eax + 4], ebx
      mov eax, dword [ebp + 8]
      mov dword [eax], 0h
      jmp _FREEMEM@10
_FREEMEM@3:
      cmp ecx, eax
      jae _FREEMEM@4
      mov dword [ebp - 4], ecx
      mov dword [ebp - 8], ecx
      mov edx, ecx
      cmp dword [edx], 0h
      jz  _FREEMEM@5
_FREEMEM@6:
      cmp dword [edx], eax
      jae _FREEMEM@5
      mov edx, [edx]
      mov [ebp - 8], edx
      cmp dword [edx], 0h
      jz  _FREEMEM@5
      jmp _FREEMEM@6
_FREEMEM@5:
      mov [ebp - 12], eax
      mov edi, [ebp - 8]
      mov esi, [edi]
      mov [eax], esi
      mov [eax + 4], ebx
      mov [edi], eax
      jmp _FREEMEM@7
_FREEMEM@4:
      mov dword [ebp - 8], 0h
      mov dword [ebp - 12], eax
      mov edi, dword [SYSTEM$_FREELIST]
      mov [eax], edi
      mov [eax + 4], ebx
      mov dword [SYSTEM$_FREELIST], eax
_FREEMEM@7:
      mov eax, dword [ebp - 12]
      mov ebx, [eax]
      cmp ebx, 0h
      jz  _FREEMEM@8
      sub ebx, eax
      mov ecx, [eax + 4]
      add ecx, 08h
      cmp ebx, ecx
      jge _FREEMEM@8
      mov edx, [eax]
      add ebx, [edx + 4]
      mov [eax + 4], ebx
      mov edx, [edx]
      mov [eax], edx
_FREEMEM@8:
      mov eax, dword [ebp - 8]
      cmp eax, 0h
      jz  _FREEMEM@9
      mov ebx, [eax]
      sub ebx, eax
      mov ecx, [eax + 4]
      add ecx, 08h
      cmp ebx, ecx
      jge _FREEMEM@9
      mov edx, [eax]
      mov ecx, [edx + 4]
      add ebx, ecx
      mov [eax + 4], ebx
      mov ecx, [edx]
      mov [eax], ecx
_FREEMEM@9:
      mov ebx, dword [ebp + 8]
      mov dword [ebx], 0h
_FREEMEM@10:
L243:
      mov esp, ebp
      pop ebp
      ret 08h
      ALIGN 16
SYSTEM$_HEAPINIT$$DWORD:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov dword [ebp - 4], 0h
      mov eax, dword [ebp + 8]
      mov eax, dword [eax]
      add eax, 0FFFh
      and eax, 0FFFFF000h
      mov edx, dword [ebp + 8]
      mov dword [edx], eax
      mov eax, 0501h
      mov ebx, dword [ebp + 8]
      mov ebx, [ebx]
      push  ebx
      pop cx
      pop bx
      int 031h
      jnc _HEAPINIT@1
      jmp _HEAPINIT@2
_HEAPINIT@1:
      mov byte [ebp - 4], 01h
      push  si
      push  di
      pop eax
      mov dword [SYSTEM$_HEAPHANDLE], eax
      push  bx
      push  cx
      pop eax
      mov dword [SYSTEM$_HEAPORG], eax
      mov eax, 06h
      mov bx, ds
      int 031h
      push  cx
      push  dx
      pop eax
      neg eax
      add dword [SYSTEM$_HEAPORG], eax
_HEAPINIT@2:
      cmp dword [ebp - 4], 01h
      jz  near  L246
L245:
      push  dword 0h
      push  dword C11
      push  dword SYSTEM$_OUTPUT
      call  writestring
      push  dword SYSTEM$_OUTPUT
      call  writeline
      call  flushoutput
      push  dword 01h
      call  SYSTEM$_HALT$$BYTE
L246:
L247:
      mov eax, dword [SYSTEM$_HEAPORG]
      mov ebx, dword [ebp + 8]
      mov ecx, [ebx]
      cmp eax, 0h
      jnz _HEAPINIT@3
      add eax, 08h
      mov dword [SYSTEM$_HEAPORG], eax
      sub ecx, 08h
      mov [ebx], ecx
_HEAPINIT@3:
      mov dword [SYSTEM$_FREELIST], eax
      mov dword [eax], 0h
      mov dword [eax + 4], ecx
      add eax, ecx
      mov dword [SYSTEM$_HEAPEND], eax
L244:
      mov esp, ebp
      pop ebp
      ret 04h
      ALIGN 16
SYSTEM$_HEAPDONE$:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      mov dword [ebp - 4], 0h
      mov eax, dword [SYSTEM$_HEAPHANDLE]
      push  eax
      pop di
      pop si
      mov eax, 0502h
      int 031h
      jc  _HEAPDONE@RELEASEERROR
      mov byte [ebp - 4], 01h
_HEAPDONE@RELEASEERROR:
      cmp dword [ebp - 4], 0h
      jnz near  L250
L249:
      push  dword 0h
      push  dword C12
      push  dword SYSTEM$_OUTPUT
      call  writestring
      push  dword SYSTEM$_OUTPUT
      call  writeline
      call  flushoutput
L250:
L251:
L248:
      mov esp, ebp
      pop ebp
      ret 
      ALIGN 16
SYSTEM$_MEMAVAIL$:
      push  ebp
      mov ebp, esp
      sub esp, 04h
      xor eax, eax
      mov edx, dword [SYSTEM$_FREELIST]
_MEMAVAIL@LOOP:
      or  edx, edx
      jz  _MEMAVAIL@1
      add eax, dword [edx + 4]
      mov edx, dword [edx]
      jmp _MEMAVAIL@LOOP
_MEMAVAIL@1:
L252:
      mov esp, ebp
      pop ebp
      ret 
ALIGN 16
createobject:
      push  eax
      mov eax, esi
      push  eax
      sub esp, 04h
      mov esi, esp
      push  esi
      push  dword [eax]
      push  esi
      call  getmem
      pop esi
      mov esi, dword [esi]
      add esp, 04h
      pop eax
      mov edi, esi
      mov dword [esi], eax
      pop eax
L253:
      ret 
ALIGN 16
destroyobject:
      sub esp, 04h
      mov edi, esp
      mov esi, dword [esi]
      mov eax, dword [esi]
      push  dword [eax]
      mov dword [edi], esi
      push  edi
      call  freemem
      add esp, 04h
L254:
      ret 

      ALIGN 16
_SYSTEM$MAIN:
      push  ds
      pop es
      sub eax, eax
      mov cx, 01h
      int 031h
      jc  @00
      mov ebx, eax
      mov ax, 08h
      stc 
      sbb ecx, ecx
      sbb edx, edx
      int 031h
      jc  @00
      lar cx, bx
      mov cl, ch
      and cl, 060h
      or  cl, 092h
      mov ch, 0CFh
      mov eax, 09h
      int 031h
      jc  @00
      sub ecx, ecx
      sub edx, edx
      mov eax, 07h
      int 031h
      jc  @00
      mov fs, bx
@00:
      mov dword [SYSTEM$_RADIX], 0Ah
      push  dword 0
      push  dword SYSTEM$_INPUT
      call  SYSTEM$_ASSIGN$$TEXT$STRING
      mov dword [SYSTEM$_INPUT], 0h
      mov dword [SYSTEM$_INPUT + 4], 0D7B1h
      mov eax, dword SYSTEM$_TEXT_IO$$TEXTREC
      mov dword [SYSTEM$_INPUT + 28], eax
      mov eax, dword SYSTEM$_TEXT_IO$$TEXTREC
      mov dword [SYSTEM$_INPUT + 32], eax
      push  dword 0
      push  dword SYSTEM$_OUTPUT
      call  SYSTEM$_ASSIGN$$TEXT$STRING
      mov dword [SYSTEM$_OUTPUT], 01h
      mov dword [SYSTEM$_OUTPUT + 4], 0D7B2h
      mov eax, dword SYSTEM$_TEXT_IO$$TEXTREC
      mov dword [SYSTEM$_OUTPUT + 28], eax
      mov eax, dword SYSTEM$_TEXT_IO$$TEXTREC
      mov dword [SYSTEM$_OUTPUT + 32], eax
      mov dword [SYSTEM$_INOUTRES], 0h
      push  dword SYSTEM$_HEAPSIZE
      call  SYSTEM$_HEAPINIT$$DWORD
      ret 
;--- Global variables, initialized

SECTION .data
ALIGN 16

_SYSTEM$_FILEMODE DB  2, 0, 0, 0
;C1  DQ   5.00000E-0001
C1  DQ   0.5
C2  DB  10, 73, 47, 79, 45, 69, 114, 114, 111, 114, 32
ALIGN_C2  RESB  1 
C3  DB  4, 32, 97, 116, 32
ALIGN_C3  RESB  3 
C4  DB  36, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90
ALIGN_C4  RESB  3 
C5  DB  14, 105, 110, 118, 97, 108, 105, 100, 32, 110, 117, 109, 98, 101, 114
ALIGN_C5  RESB  1 
C6  DQ   1.00000E+0018
C7  DB  2, 13, 10
ALIGN_C7  RESB  1 
C8  DB  4, 84, 82, 85, 69
ALIGN_C8  RESB  3 
C9  DB  5, 70, 65, 76, 83, 69
ALIGN_C9  RESB  2 
C10 DB  8, 48, 48, 48, 48, 48, 48, 48, 48
ALIGN_C10 RESB  3 
C11 DB  39, 69, 114, 114, 111, 114, 32, 97, 108, 108, 111, 99, 97, 116, 105, 110, 103, 32, 104, 101, 97, 112, 32, 109, 101, 109, 111, 114, 121, 46, 32, 65, 98, 111, 114, 116, 105, 110, 103, 46
C12 DB  28, 69, 114, 114, 111, 114, 32, 114, 101, 108, 101, 97, 115, 105, 110, 103, 32, 104, 101, 97, 112, 32, 109, 101, 109, 111, 114, 121, 46

;--- Global variables, uninitialized

SECTION .bss
ALIGN 16

SYSTEM$_PORT  RESB  1 
ALIGNSYSTEM$_PORT RESB  3 
SYSTEM$_PORTW RESB  2 
ALIGNSYSTEM$_PORTW  RESB  2 
SYSTEM$_PORTL RESB  4 
SYSTEM$_INPUT RESB  512 
SYSTEM$_OUTPUT  RESB  512 
SYSTEM$_RADIX RESB  4 
SYSTEM$_FREELIST  RESB  4 
SYSTEM$_HEAPHANDLE  RESB  4 
SYSTEM$_HEAPORG RESB  4 
SYSTEM$_HEAPEND RESB  4 
SYSTEM$_RANDSEED  RESB  4 
SYSTEM$_INOUTRES  RESB  4 
SYSTEM$_CMDLINE RESB  256 


