Subversion Repositories Kolibri OS

Rev

Rev 1617 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;                                                 ;;
  3. ;;  flat assembler source                          ;;
  4. ;;  Copyright (c) 1999-2006, Tomasz Grysztar       ;;
  5. ;;  All rights reserved.                           ;;
  6. ;;                                                 ;;
  7. ;;  Menuet port by VT                              ;;
  8. ;;                                                 ;;
  9. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  10.  
  11. NORMAL_MODE    = 8
  12. CONSOLE_MODE   = 32
  13.  
  14. MAGIC1         = 6*(text.line_size-1)+14
  15. MAX_PATH       = 100
  16.  
  17. APP_MEMORY     = 0x00800000
  18.  
  19. ;; Menuet header
  20.  
  21. appname equ "flat assembler "
  22.  
  23. use32
  24.  
  25.   org 0x0
  26.   db 'MENUET01'  ; 8 byte id
  27.   dd 0x01        ; header version
  28.   dd START       ; program start
  29.   dd program_end ; program image size
  30.   dd stacktop    ; required amount of memory
  31.   dd stacktop    ; stack
  32.   dd params,cur_dir_path  ; parameters,icon
  33.  
  34. include 'lang.inc'
  35. include '../../../macros.inc'
  36. purge add,sub    ; macros.inc does incorrect substitution
  37. include 'fasm.inc'
  38.  
  39. include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
  40. include '../../../develop/libraries/box_lib/load_lib.mac'
  41.   @use_library
  42.  
  43.  
  44.  
  45. center fix true
  46.  
  47. START:      ; Start of execution
  48.         mov     edi, fileinfos
  49.         mov     ecx, (fileinfos_end-fileinfos)/4
  50.         or      eax, -1
  51.         rep     stosd
  52.         push    68
  53.         pop     eax
  54.         push    11
  55.         pop     ebx
  56.         mcall
  57.  
  58.    cmp    [params],0
  59.    jz       start_1
  60.  
  61.    mov    ecx,10
  62.    mov    eax,'    '
  63.    mov    edi,infile
  64.    push   ecx
  65.    cld
  66.    rep    stosd
  67.    mov    ecx,[esp]
  68.    mov    edi,outfile
  69.    rep    stosd
  70.    pop    ecx
  71.    mov    edi,path
  72.    rep    stosd
  73.  
  74.    mov     esi,params
  75. ;  DEBUGF  "params: %s\n",esi
  76.    mov     edi,infile
  77.    call    mov_param_str
  78. ;  mov     edi,infile
  79. ;  DEBUGF  " input: %s\n",edi
  80.    mov     edi,outfile
  81.    call    mov_param_str
  82. ;  mov     edi,outfile
  83. ;  DEBUGF  "output: %s\n",edi
  84.    mov     edi,path
  85.    call    mov_param_str
  86. ;  mov     edi,path
  87. ;  DEBUGF  "  path: %s\n",edi
  88.    dec     esi
  89.    cmp     [esi], dword ',run'
  90.    jne     @f
  91.    mov     [_run_outfile],1
  92.   @@:
  93.  
  94.    mov     [_mode],CONSOLE_MODE
  95.    jmp     start
  96.  
  97. start_1:
  98. ;sys_
  99. load_libraries l_libs_start,load_lib_end
  100.  
  101.   cmp eax,-1
  102.   jne @f
  103.     mcall -1 ;exit if not open box_lib.obj
  104.   @@:
  105.   mcall 40,0x27 ;¬ áª  á¨á⥬­ëå ᮡë⨩
  106.  
  107.   get_sys_colors 1,0
  108.   edit_boxes_set_sys_color edit1,editboxes_end,sc
  109.   check_boxes_set_sys_color ch1_dbg,ch1_dbg+ch_struc_size,sc
  110.  
  111.   ; OpenDialog initialisation
  112.   push dword OpenDialog_data
  113.   call dword [OpenDialog_Init]
  114.  
  115. red:    ; Redraw
  116.     call draw_window
  117.  
  118. still: 
  119.     push 10          ; Wait here for event
  120.     pop eax
  121.     mcall
  122.     cmp al,6
  123.     je  call_mouse
  124.     dec eax
  125.     je  red          ; Redraw request
  126.     dec eax
  127.     jne button       ; Button in buffer
  128.  
  129. key:                 ; Key
  130.     mov  al,2        ; Read it and ignore
  131.     mcall
  132.  
  133.     push dword edit1
  134.     call [edit_box_key]
  135.     push dword edit2
  136.     call [edit_box_key]
  137.     push dword edit3
  138.     call [edit_box_key]
  139.  
  140.     jmp  still
  141.  
  142. call_mouse:
  143.     call mouse
  144.     jmp  still
  145.  
  146. button:    ; Button in Window
  147.  
  148.     mov  al,17
  149.     mcall
  150.  
  151.     cmp     ah,1
  152.     jne     noclose
  153.     or      eax,-1
  154.     mcall
  155.  
  156. noclose:    
  157.         cmp ah,5 ;press button for OpenDialog
  158.         jne @f
  159.                 call fun_opn_dlg
  160.         @@:
  161.     cmp  ah,2         ; Start compiling
  162.     je   start
  163.     cmp  ah,3         ; Start compiled file
  164.     jnz  norunout
  165.  
  166.     mov  edx,outfile
  167.     call make_fullpaths
  168.     mcall  70,file_info_start
  169. ;   xor   ecx,ecx
  170.     jmp  still
  171.    norunout:
  172.     cmp  ah,4
  173.     jnz  norundebug
  174.  
  175.     mov  edx,outfile
  176.     call make_fullpaths
  177.     mcall 70,file_info_debug
  178.     jmp  still
  179.  
  180.    norundebug:
  181.  
  182.     jmp  still
  183.  
  184.  
  185. mouse:
  186.   push dword edit1
  187.   call [edit_box_mouse]
  188.   push dword edit2
  189.   call [edit_box_mouse]
  190.   push dword edit3
  191.   call [edit_box_mouse]
  192.   push dword ch1_dbg
  193.   call [check_box_mouse]
  194.   ret
  195.  
  196. draw_window:
  197.     pusha
  198.  
  199.     mcall  12,1 ; Start of draw
  200.  
  201.     ;get_sys_colors 1,0
  202.  
  203.     xor  eax,eax                     
  204.     mov  ebx,100*65536+280
  205.     mov  ecx,90*65536+260
  206.     mov  edx,[sc.work]
  207.     or   edx,0x33000000
  208.     mov  edi,title             ; Draw Window Label Text
  209.     mcall
  210.  
  211.     mcall 9,PROCESSINFO,-1         
  212.  
  213.     cmp dword[pinfo.box.width],230 ; ïðîâåðÿåì øèðèíó îêíà
  214.     jge @f
  215.       mov dword[pinfo.box.width],230 ; åñëè îêíî î÷åíü óçêîå, óâåëè÷èâàåì øèðèíó äëÿ èçáåæàíèÿ ãëþêîâ
  216.     @@:
  217.  
  218.     mpack ecx,1,1
  219.     mov   ebx,[pinfo.box.width]
  220.     sub   ebx,10
  221.  
  222.     mov eax,8
  223.     mov edx,0x4000000B
  224.     mpack ebx,[pinfo.box.width],MAGIC1
  225.     msub  ebx,MAGIC1+10+1,0
  226.     mpack ecx,0, (14*3+16)/3-1
  227.     madd  ecx,1,0
  228.     mcall  ,,,0x00000002,[sc.work_button]
  229.     madd  ecx, (14*3+16)/3+1,0
  230.     mcall  ,,,0x00000003
  231.     madd  ecx, (14*3+16)/3+1,0
  232.     mcall ,,,4
  233.  
  234.         ;button for OpenDialog [..]
  235.         mov ebx, 5*65536+47
  236.         mov ecx, 33*65536+14
  237.         mcall ,,,5
  238.  
  239.     mpack ebx,6,0    ; Draw Window Text
  240.     add  ebx,1+ 14/2-3
  241.     mov  ecx,[sc.work_text]
  242.     mov  edx,text
  243.     mov  esi,text.line_size
  244.     mov  eax,4
  245.  
  246.     mcall ;InFile
  247.     add  ebx, 16 ;14
  248.     add  edx,text.line_size
  249.     mcall ;OutFile
  250.         mov ecx,[sc.work_button_text]
  251.     add  ebx, 16 ;14
  252.     add  edx,text.line_size
  253.         mcall ;Path
  254.  
  255.     mov   ebx,[pinfo.box.width]
  256.     sub   ebx,MAGIC1+10+1-9
  257.     shl   ebx,16
  258.     add   ebx,1+( (14*3+16)/3-1)/2-3
  259.     mcall  ,,[sc.work_button_text],s_compile,7
  260.     add   ebx,(14*3+16)/3+1
  261.     mcall ,,,s_run
  262.     add   ebx,(14*3+16)/3+1
  263.     mcall ,,,s_debug
  264.  
  265.     mpack ebx,MAGIC1+6,0
  266.     add   ebx,1+ 14/2-3+ 14*0
  267.     mov   esi,[pinfo.box.width]
  268.     sub   esi,MAGIC1*2+5*2+6+3
  269.     mov   eax,esi
  270.     mov   cl,6
  271.     div   cl
  272.     cmp   al,MAX_PATH
  273.     jbe   @f
  274.     mov   al,MAX_PATH
  275. @@: movzx esi,al
  276.  
  277.     call draw_messages
  278.  
  279.     mov eax,dword[pinfo.box.width]
  280.     sub eax,127
  281.     mov dword[edit1.width],eax ; óñòàíàâëèâàåì øèðèíó òåêñòîâûõ ïîëåé
  282.     mov dword[edit2.width],eax
  283.     mov dword[edit3.width],eax
  284.  
  285.     push dword edit1
  286.     call [edit_box_draw]
  287.     push dword edit2
  288.     call [edit_box_draw]
  289.     push dword edit3
  290.     call [edit_box_draw]
  291.     push dword ch1_dbg
  292.     call [check_box_draw]
  293.  
  294.     mcall  12,2 ; End of Draw
  295.  
  296.     popa
  297.     ret
  298.  
  299. bottom_right dd ?
  300.  
  301. align 4
  302. fun_opn_dlg: ;äã­ªæ¨ï ¤«ï ¢ë§®¢  OpenFile ¤¨ «®£ 
  303.         pushad
  304.         copy_path open_dialog_name,communication_area_default_path,library_path,0
  305.         mov [OpenDialog_data.type],0
  306.  
  307.         xor al,al
  308.         mov edi,dword[edit3.text]
  309.         mov ecx,dword[edit3.max]
  310.         cld
  311.         repne scasb
  312.         cmp byte[edi-2],'/'
  313.         jne @f
  314.                 mov byte[edi-2],0 ;¥á«¨ ¢ ª®­æ¥ ¯ã⨠¥áâì á«¥è, â® ¯ãâì 㪮à ç¨¢ ¥¬ ­  1 ᨬ¢®«
  315.         @@:
  316.  
  317.         push dword OpenDialog_data
  318.         call dword [OpenDialog_Start]
  319.         cmp [OpenDialog_data.status],2
  320.         je @f
  321.                 xor al,al
  322.                 mov edi,dword[edit3.text]
  323.                 mov ebx,edi ;copy text pointer
  324.                 mov ecx,dword[edit3.max]
  325.                 cld
  326.                 repne scasb
  327.                 cmp byte[edi-2],'/'
  328.                 jne .no_slash
  329.                         dec edi ;¥á«¨ ¢ ª®­æ¥ ¯ã⨠¥áâì á«¥è, â® ¯ãâì 㪮à ç¨¢ ¥¬ ­  1 ᨬ¢®«
  330.                 .no_slash:
  331.                 mov byte[edi-1],'/' ;áâ ¢¨¬ ¢ ª®­æ¥ ¯ã⨠᫥è
  332.                 mov byte[edi],0 ;®â१ ¥¬ ¨¬ï ­ ©¤¥­­®£® ä ©« 
  333.                 sub edi,ebx ;edi = strlen(edit3.text)
  334.                 mov [edit3.size],edi
  335.                 mov [edit3.pos],edi
  336.  
  337.                 push dword [OpenDialog_data.filename_area]
  338.                 push dword edit1
  339.                 call dword [edit_box_set_text]
  340.  
  341.                 push dword edit1
  342.                 call dword [edit_box_draw]
  343.                 push dword edit3
  344.                 call dword [edit_box_draw]
  345.         @@:
  346.         popad
  347.         ret
  348.  
  349. draw_messages:
  350.     mov    eax,13      ; clear work area
  351.     mpack  ebx,7-2,[pinfo.box.width]
  352.     sub    ebx,5*2+7*2-1-2*2
  353.     mpack  ecx,0,[pinfo.box.height]
  354.     madd   ecx, 14*3+16+1+7+1,-( 14*3+16+1+7*2+25)
  355.     mov    word[bottom_right+2],bx
  356.     mov    word[bottom_right],cx
  357.     msub   [bottom_right],7,11
  358.     add    [bottom_right],7 shl 16 + 53
  359.     mov    edx,[sc.work]
  360.     mcall
  361. _cy = 0
  362. _sy = 2
  363. _cx = 4
  364. _sx = 6
  365.     push   ebx ecx
  366.     mpack  ebx,4,5
  367.     add    bx,[esp+_cx]
  368.     mov    ecx,[esp+_sy-2]
  369.     mov    cx,[esp+_sy]
  370.     msub   ecx,1,1
  371.     mcall  38,,,[sc.work_graph]
  372.     mov    si,[esp+_cy]
  373.     add    cx,si
  374.     shl    esi,16
  375.     add    ecx,esi
  376.     madd   ecx,1,1
  377.     mcall
  378.     mpack  ebx,4,4
  379.     mov    esi,[esp+_sy-2]
  380.     mov    si,cx
  381.     mov    ecx,esi
  382.     mcall
  383.     mov    si,[esp+_cx]
  384.     add    bx,si
  385.     shl    esi,16
  386.     add    ebx,esi
  387.     madd   ebx,1,1
  388.     mcall
  389.     pop    ecx ebx
  390.     ret
  391.  
  392.  
  393. ; DATA
  394.  
  395. if lang eq ru
  396. text:
  397.   db ' ‚å” ©«:'
  398. .line_size = $-text
  399.   db '‚ë唠©«:'
  400.   db '   ãâì:'
  401.   ;db 'x'
  402.  
  403.   s_compile db 'Š®¬¯¨«.'
  404.   s_run     db ' ã᪠ '
  405.   s_debug   db 'Žâ« ¤ª '
  406.   s_dbgdescr db '‘®§¤ ¢ âì ®â« ¤®ç­ãî ¨­ä®à¬ æ¨î',0
  407.   s_dbgdescr_end:
  408.  
  409.   err_message_found_lib0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  box_lib.obj',0  ;áâப , ª®â®à ï ¡ã¤¥â ¢ áä®à¬¨à®¢ ­­®¬ ®ª­¥, ¥á«¨ ¡¨¡«¨®â¥ª  ­¥ ¡ã¤¥â ­ ©¤¥­ 
  410.   err_message_import0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ box_lib.obj',0
  411.   err_message_found_lib1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  proc_lib.obj',0
  412.   err_message_import1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ proc_lib.obj',0
  413.   head_f_i:
  414.   head_f_l db '‘¨á⥬­ ï ®è¨¡ª ',0 ;§ £®«®¢®ª ®ª­ , ¯à¨ ¢®§­¨ª­®¢¥­¨¨ ®è¨¡ª¨
  415. else
  416. text:
  417.   db ' InFile:'
  418. .line_size = $-text
  419.   db 'OutFile:'
  420.   db '   Path:'
  421.   ;db 'x'
  422.  
  423.   s_compile db 'COMPILE'
  424.   s_run     db '  RUN  '
  425.   s_debug   db ' DEBUG '
  426.   s_dbgdescr db 'Generate debug information',0
  427.   s_dbgdescr_end:
  428.  
  429.   err_message_found_lib0 db 'Sorry I cannot found library box_lib.obj',0
  430.   err_message_import0 db 'Error on load import library box_lib.obj',0
  431.   err_message_found_lib1 db 'Sorry I cannot found library proc_lib.obj',0
  432.   err_message_import1 db 'Error on load import library proc_lib.obj',0
  433.  
  434.   head_f_i:
  435.   head_f_l db 'System error',0 ;§ £®«®¢®ª ®ª­ , ¯à¨ ¢®§­¨ª­®¢¥­¨¨ ®è¨¡ª¨
  436. end if
  437.  
  438.   system_dir0 db '/sys/lib/'
  439.   lib0_name db 'box_lib.obj',0
  440.  
  441.   system_dir1 db '/sys/lib/'
  442.   lib1_name db 'proc_lib.obj',0
  443.  
  444.  
  445. align 4
  446. import_box_lib:
  447.         edit_box_draw  dd aEdit_box_draw
  448.         edit_box_key     dd aEdit_box_key
  449.         edit_box_mouse dd aEdit_box_mouse
  450.         edit_box_set_text dd aEdit_box_set_text
  451.         ;version_ed     dd aVersion_ed
  452.  
  453.   check_box_draw  dd aCheck_box_draw
  454.   check_box_mouse dd aCheck_box_mouse
  455.   ;version_ch      dd aVersion_ch
  456.  
  457.   dd 0,0
  458.  
  459.   aEdit_box_draw  db 'edit_box',0
  460.   aEdit_box_key   db 'edit_box_key',0
  461.   aEdit_box_mouse db 'edit_box_mouse',0
  462.   aEdit_box_set_text db 'edit_box_set_text',0
  463.   ;aVersion_ed     db 'version_ed',0
  464.  
  465.   aCheck_box_draw  db 'check_box_draw',0
  466.   aCheck_box_mouse db 'check_box_mouse',0
  467.   ;aVersion_ch      db 'version_ch',0
  468.  
  469. align 4
  470. import_proc_lib:
  471.         OpenDialog_Init dd aOpenDialog_Init
  472.         OpenDialog_Start dd aOpenDialog_Start
  473. dd 0,0
  474.         aOpenDialog_Init db 'OpenDialog_init',0
  475.         aOpenDialog_Start db 'OpenDialog_start',0
  476.  
  477. ;library structures
  478. l_libs_start:
  479.   lib0 l_libs lib0_name, cur_dir_path, library_path, system_dir0, err_message_found_lib0, head_f_l, import_box_lib, err_message_import0, head_f_i
  480.   lib1 l_libs lib1_name, cur_dir_path, library_path, system_dir1, err_message_found_lib1, head_f_l, import_proc_lib,err_message_import1, head_f_i
  481. load_lib_end:
  482.  
  483. edit1 edit_box 153, 56, 1, 0xffffff, 0xff, 0x80ff, 0, 0x8000, (outfile-infile-1), infile, mouse_dd, 0, 11,11
  484. edit2 edit_box 153, 56, 17, 0xffffff, 0xff, 0x80ff, 0, 0x8000,(path-outfile-1), outfile, mouse_dd, 0, 7,7
  485. edit3 edit_box 153, 56, 33, 0xffffff, 0xff, 0x80ff, 0, 0x8000,(path_end-path-1), path, mouse_dd, 0, 6,6
  486. editboxes_end:
  487. ch1_dbg check_box 5, 49, 6, 12, 0xffffff, 0x80ff, 0, s_dbgdescr,(s_dbgdescr_end-s_dbgdescr)
  488.  
  489. ;---------------------------------------------------------------------
  490. align 4
  491. OpenDialog_data:
  492. .type                   dd 0
  493. .procinfo               dd pinfo        ;+4
  494. .com_area_name          dd communication_area_name      ;+8
  495. .com_area               dd 0    ;+12
  496. .opendir_path           dd path ;+16
  497. .dir_default_path       dd default_dir ;+20
  498. .start_path             dd library_path ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
  499. .draw_window            dd draw_window  ;+28
  500. .status                 dd 0    ;+32
  501. .openfile_path          dd path ;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
  502. .filename_area          dd filename_area        ;+40
  503. .filter_area            dd Filter
  504. .x:
  505. .x_size                 dw 420 ;+48 ; Window X size
  506. .x_start                dw 10 ;+50 ; Window X position
  507. .y:
  508. .y_size                 dw 320 ;+52 ; Window y size
  509. .y_start                dw 10 ;+54 ; Window Y position
  510.  
  511. default_dir db '/rd/1',0 ;¤¨à¥ªâ®à¨ï ¯® 㬮«ç ­¨î
  512.  
  513. communication_area_name:
  514.         db 'FFFFFFFF_open_dialog',0
  515. open_dialog_name:
  516.         db 'opendial',0
  517. communication_area_default_path:
  518.         db '/rd/1/File managers/',0
  519.  
  520. Filter:
  521. dd Filter.end - Filter
  522. .1:
  523. db 'ASM',0
  524. .end:
  525. db 0
  526.  
  527. mouse_dd dd 0 ;íóæíî äëÿ Shift-à â editbox
  528.  
  529. infile    db 'example.asm'
  530.   times MAX_PATH-$+infile  db 0
  531. outfile db 'example'
  532.   times MAX_PATH-$+outfile db 0
  533. path    db '/rd/1//' ;OpenDialog ¯à¨ § ¯ã᪥ 㡨ࠥ⠯®á«¥¤­¨© á«¥è, ­® ¤¨ «®£ ¬®¦¥â ¨á¯®«ì§®¢ âìáï ­¥ ¢á¥£¤ , ¯®â®¬ã á«¥è  2
  534.   times MAX_PATH-$+path    db 0
  535. path_end:
  536. lf db 13,10,0
  537.  
  538.  
  539. mov_param_str:
  540.     cld
  541. @@:
  542.     lodsb
  543.     cmp    al,','
  544.     je     @f
  545.     stosb
  546.     test   al,al
  547.     jnz    @b
  548. @@:
  549.     xor    al,al
  550.     stosb
  551.     ret
  552.  
  553.  
  554.  
  555. start:
  556.     cmp    [_mode],NORMAL_MODE
  557.     jne    @f
  558.     call   draw_messages
  559.     mov    [textxy],7 shl 16 + 70
  560. @@:
  561.     mov    esi,_logo
  562.     call   display_string
  563.  
  564.  ;
  565.  ;   Fasm native code
  566.  ;
  567.  
  568.     mov    [input_file],infile
  569.     mov    [output_file],outfile
  570.  
  571.     call   init_memory
  572.  
  573.     call   make_timestamp
  574.     mov    [start_time],eax
  575.  
  576.     call   preprocessor
  577.     call   parser
  578.     call   assembler
  579.     bt     dword[ch1_dbg.flags],1 ;cmp [bGenerateDebugInfo], 0
  580.     jae    @f                     ;jz @f
  581.     call   symbol_dump
  582. @@:
  583.     call   formatter
  584.  
  585.     call   display_user_messages
  586.     movzx  eax,[current_pass]
  587.     inc    eax
  588.     call   display_number
  589.     mov    esi,_passes_suffix
  590.     call   display_string
  591.     call   make_timestamp
  592.     sub    eax,[start_time]
  593.     xor    edx,edx
  594.     mov    ebx,100
  595.     div    ebx
  596.     or       eax,eax
  597.     jz       display_bytes_count
  598.     xor    edx,edx
  599.     mov    ebx,10
  600.     div    ebx
  601.     push   edx
  602.     call   display_number
  603.     mov    dl,'.'
  604.     call   display_character
  605.     pop    eax
  606.     call   display_number
  607.     mov    esi,_seconds_suffix
  608.     call   display_string
  609.   display_bytes_count:
  610.     mov    eax,[written_size]
  611.     call   display_number
  612.     mov    esi,_bytes_suffix
  613.     call   display_string
  614.     xor    al,al
  615.  
  616.     cmp    [_run_outfile],0
  617.     je     @f
  618.     mov    edx,outfile
  619.     call   make_fullpaths
  620.     mov    eax,70
  621.     mov    ebx,file_info_start
  622.     xor    ecx,ecx
  623.     mcall
  624. @@:
  625.     jmp    exit_program
  626.  
  627.  
  628. include 'system.inc'
  629. include 'version.inc'
  630. include 'errors.inc'
  631. include 'expressi.inc'
  632. include 'preproce.inc'
  633. include 'parser.inc'
  634. include 'assemble.inc'
  635. include 'formats.inc'
  636. include 'x86_64.inc'
  637. include 'tables.inc'
  638. include 'symbdump.inc'
  639. include 'messages.inc'
  640.  
  641. title db appname,VERSION_STRING,0
  642.  
  643. _logo db 'flat assembler  version ',VERSION_STRING,13,10,0
  644.  
  645. _passes_suffix db ' passes, ',0
  646. _seconds_suffix db ' seconds, ',0
  647. _bytes_suffix db ' bytes.',13,10,0
  648.  
  649. _include db 'INCLUDE',0
  650.  
  651. _counter db 4,'0000'
  652.  
  653. _mode          dd NORMAL_MODE
  654. _run_outfile  dd 0
  655. ;bGenerateDebugInfo db 0
  656.  
  657. sub_table:
  658. times $41 db $00
  659. times $1A db $20
  660. times $25 db $00
  661. times $10 db $20
  662. times $30 db $00
  663. times $10 db $50
  664. times $04 db $00,$01
  665. times $08 db $00
  666.  
  667. ;include_debug_strings
  668. program_end:
  669. ;  params db 0 ; 'TINYPAD.ASM,TINYPAD,/HD/1/TPAD4/',
  670. params  rb 4096
  671. cur_dir_path rb 4096
  672. library_path rb 4096
  673. filename_area rb 256
  674.  
  675. align 4
  676.  
  677. include 'variable.inc'
  678.  
  679. program_base dd ?
  680. buffer_address dd ?
  681. memory_setting dd ?
  682. start_time dd ?
  683. memblock        dd      ?
  684.  
  685. predefinitions rb 1000h
  686.  
  687. dbgfilename     rb      MAX_PATH+4
  688.  
  689. sc    system_colors
  690. max_handles = 8
  691. fileinfos rb (4+20+MAX_PATH)*max_handles
  692. fileinfos_end:
  693. pinfo process_information
  694.  
  695. align 1000h
  696. rb 1000h
  697. stacktop:
  698.