Subversion Repositories Kolibri OS

Rev

Rev 738 | Rev 749 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. struc VBE_VGAInfo {
  3.   .VESASignature          dd ?    ; char
  4.   .VESAVersion            dw ?    ; short
  5.   .OemStringPtr           dd ?    ; char *
  6.   .Capabilities           dd ?    ; ulong
  7.   .VideoModePtr           dd ?    ; ulong
  8.   .TotalMemory            dw ?    ; short
  9.   ; VBE 2.0+
  10.   .OemSoftwareRev         db ?    ; short
  11.   .OemVendorNamePtr       dw ?    ; char *
  12.   .OemProductNamePtr      dw ?    ; char *
  13.   .OemProductRevPtr       dw ?    ; char *
  14.   .reserved               rb 222  ; char
  15.   .OemData                rb 256  ; char
  16. }
  17.  
  18. struc VBE_ModeInfo {
  19.   .ModeAttributes         dw ?    ; short
  20.   .WinAAttributes         db ?    ; char
  21.   .WinBAttributes         db ?    ; char
  22.   .WinGranularity         dw ?    ; short
  23.   .WinSize                dw ?    ; short
  24.   .WinASegment            dw ?    ; ushort
  25.   .WinBSegment            dw ?    ; ushort
  26.   .WinFuncPtr             dd ?    ; void *
  27.   .BytesPerScanLine       dw ?    ; short
  28.   .XRes                   dw ?    ; short
  29.   .YRes                   dw ?    ; short
  30.   .XCharSize              db ?    ; char
  31.   .YCharSize              db ?    ; char
  32.   .NumberOfPlanes         db ?    ; char
  33.   .BitsPerPixel           db ?    ; char
  34.   .NumberOfBanks          db ?    ; char
  35.   .MemoryModel            db ?    ; char
  36.   .BankSize               db ?    ; char
  37.   .NumberOfImagePages     db ?    ; char
  38.   .res1                   db ?    ; char
  39.   .RedMaskSize            db ?    ; char
  40.   .RedFieldPosition       db ?    ; char
  41.   .GreenMaskSize          db ?    ; char
  42.   .GreenFieldPosition     db ?    ; char
  43.   .BlueMaskSize           db ?    ; char
  44.   .BlueFieldPosition      db ?    ; char
  45.   .RsvedMaskSize          db ?    ; char
  46.   .RsvedFieldPosition     db ?    ; char
  47.   .DirectColorModeInfo    db ?    ; char ; MISSED IN THIS TUTORIAL!! SEE ABOVE
  48.   ; VBE 2.0+
  49.   .PhysBasePtr            dd ?    ; ulong
  50.   .OffScreenMemOffset     dd ?    ; ulong
  51.   .OffScreenMemSize       dw ?    ; short
  52.   ; VBE 3.0+
  53.   .LinbytesPerScanLine    dw ?    ; short
  54.   .BankNumberOfImagePages db ?    ; char
  55.   .LinNumberOfImagePages  db ?    ; char
  56.   .LinRedMaskSize         db ?    ; char
  57.   .LinRedFieldPosition    db ?    ; char
  58.   .LingreenMaskSize       db ?    ; char
  59.   .LinGreenFieldPosition  db ?    ; char
  60.   .LinBlueMaskSize        db ?    ; char
  61.   .LinBlueFieldPosition   db ?    ; char
  62.   .LinRsvdMaskSize        db ?    ; char
  63.   .LinRsvdFieldPosition   db ?    ; char
  64.   .MaxPixelClock          dd ?    ; ulong
  65.   .res2                   rb 190  ; char
  66. }
  67.  
  68. virtual at $A000
  69.   vi VBE_VGAInfo
  70.   mi VBE_ModeInfo
  71. modes_table:
  72. end virtual
  73. cursor_pos  dw 0         ;âðåìåííîå õðàíåíèå êóðñîðà.
  74. home_cursor dw 0    ;current shows rows a table
  75. end_cursor  dw 0     ;end of position current shows rows a table
  76. long_v_table equ 9   ;long of visible video table
  77. size_of_step equ 10
  78. scroll_area_size equ (long_v_table-2)
  79. int2str:
  80.         dec     bl
  81.         jz      @f
  82.         xor     edx,edx
  83.         div     ecx
  84.         push    edx
  85.         call    int2str
  86.         pop     eax
  87.     @@: or      al,0x30
  88.         mov     [ds:di],al
  89.         inc     di
  90.         ret
  91.  
  92. int2strnz:
  93.         cmp     eax,ecx
  94.         jb      @f
  95.         xor     edx,edx
  96.         div     ecx
  97.         push    edx
  98.         call    int2strnz
  99.         pop     eax
  100.     @@: or      al,0x30
  101.         mov     [es:di],al
  102.         inc     di
  103.         ret
  104. ;-------------------------------------------------------
  105. ;Write message about incorrect v_mode and write message about jmp on swith v_mode
  106. v_mode_error:
  107.         _setcursor 19,2
  108.         mov     si, fatalsel
  109.         call    printplain
  110.         _setcursor 20,2
  111.         mov     si,pres_key
  112.         call    printplain
  113.         xor     eax,eax
  114.         int     16h
  115.         jmp     cfgmanager.d
  116. ;-------------------------------------------------------
  117. ;
  118.  
  119.  
  120.  
  121. ;-------------------------------------------------------
  122. print_vesa_info:
  123.         _setcursor 5,2
  124.  
  125.         mov     [es:vi.VESASignature],'VBE2'
  126.         mov     ax,0x4F00
  127.         mov     di,vi      ;0xa000
  128.         int     0x10
  129.         or      ah,ah
  130.         jz      @f
  131.         mov     [es:vi.VESASignature],'VESA'
  132.         mov     ax,$4F00
  133.         mov     di,vi
  134.         int     0x10
  135.         or      ah,ah
  136.         jnz     .exit
  137.   @@:
  138.         cmp     [es:vi.VESASignature],'VESA'
  139.         jne     .exit
  140.         cmp     [es:vi.VESAVersion],0x0100
  141.         jb      .exit
  142.         jmp     .vesaok2
  143.  
  144.   .exit:
  145.         mov     si,novesa
  146.         call    printplain
  147.         ret
  148.  
  149.   .vesaok2:
  150.         mov     ax,[es:vi.VESAVersion]
  151.         add     ax,'00'
  152.  
  153.         mov     [s_vesa.ver], ah
  154.         mov     [s_vesa.ver+2], al
  155.         mov     si,s_vesa
  156.         call    printplain
  157.  
  158.         _setcursor 4,2
  159.         mov     si,word[es:vi.OemStringPtr]
  160.         mov     di,si
  161.  
  162.         push    ds
  163.         mov     ds,word[es:vi.OemStringPtr+2]
  164.         call    printplain
  165.         pop     ds
  166.  
  167.         ret
  168. ;-----------------------------------------------------------------------------
  169.  
  170. calc_vmodes_table:
  171.         pushad
  172.  
  173. ;        push    0
  174. ;        pop     es
  175.  
  176.         lfs     si, [es:vi.VideoModePtr]
  177.  
  178.         mov     bx,modes_table
  179. ;save no vesa mode of work 320x200, EGA/CGA 256 梥⮢ and 640x480, VGA 16 梥⮢
  180.         mov     word [es:bx],640
  181.         mov     word [es:bx+2],480
  182.         mov     word [es:bx+6],0x13
  183.        
  184.         mov     word [es:bx+10],640
  185.         mov     word [es:bx+12],480
  186.         mov     word [es:bx+16],0x12
  187.         add     bx,20
  188.   .next_mode:
  189.         mov     cx,word [fs:si] ; mode number
  190.         cmp     cx,-1
  191.         je      .modes_ok.2
  192.  
  193.         mov     ax,0x4F01
  194.         mov     di,mi
  195.         int     0x10
  196.  
  197.         or      ah,ah
  198.         jnz     .modes_ok.2;vesa_info.exit
  199.  
  200.         test    [es:mi.ModeAttributes],00000001b   ;videomode support ?
  201.         jz      @f
  202.         test    [es:mi.ModeAttributes],00010000b   ;picture ?
  203.         jz      @f
  204.         test    [es:mi.ModeAttributes],10000000b   ;LFB ?
  205.         jz      @f
  206.  
  207. ;        cmp     [es:mi.BitsPerPixel], 24
  208. ;        jb      @f
  209.  
  210.         cmp     [es:mi.BitsPerPixel],16
  211.         jne     .l0
  212.         cmp     [es:mi.GreenMaskSize],5
  213.         jne     .l0
  214.         mov     [es:mi.BitsPerPixel],15
  215.  
  216.  
  217.   .l0:
  218.         cmp     [es:mi.XRes],640
  219.         jb      @f
  220.         cmp     [es:mi.YRes],480
  221.         jb      @f
  222. ;        cmp     [es:mi.BitsPerPixel],8
  223. ;        jb      @f
  224.  
  225.         mov     ax,[es:mi.XRes]
  226.         mov     [es:bx+0],ax               ; +0[2] : resolution X
  227.         mov     ax,[es:mi.YRes]
  228.         mov     [es:bx+2],ax               ; +2[2] : resolution Y
  229.         mov     ax,[es:mi.ModeAttributes]
  230.         mov     [es:bx+4],ax               ; +4[2] : attributes
  231.  
  232.         cmp     [s_vesa.ver],'2'
  233.         jb      .lp1
  234.  
  235.         or      cx,0x4000  ; use LFB
  236.   .lp1: mov     [es:bx+6],cx               ; +6 : mode number
  237.         movzx   ax,byte [es:mi.BitsPerPixel]
  238.         mov     word [es:bx+8],ax               ; +8 : bits per pixel
  239.         add     bx,size_of_step
  240.  
  241.     @@:
  242.         add     si,2
  243.         jmp     .next_mode
  244.  
  245.   .modes_ok.2:
  246.  
  247.         mov     word[es:bx],-1  ;end video table
  248.         mov     word[end_cursor],bx     ;save end cursor position
  249. ;;;;;;;;;;;;;;;;;;
  250. ;Sort array
  251. ;        mov     si,modes_table
  252. ;.new_mode:
  253. ;        mov     ax,word [es:si]
  254. ;        cmp     ax,-1
  255. ;        je      .exxit
  256. ;        add     ax,word [es:si+2]
  257. ;        add     ax,word [es:si+8]
  258. ;        mov     bp,si
  259. ;.again:
  260. ;        add     bp,12
  261. ;        mov     bx,word [es:bp]
  262. ;        cmp     bx,-1
  263. ;        je      .exit
  264. ;        add     bx,word [es:bp+2]
  265. ;        add     bx,word [es:bp+8]
  266. ;        
  267. ;        cmp     ax,bx
  268. ;        ja      .loops
  269. ;        jmp     .again
  270. ;.loops:
  271. ;        push    dword [es:si]
  272. ;        push    dword [es:si+4]
  273. ;        push    dword [es:si+8]
  274. ;        push    dword [es:bp]
  275. ;        push    dword [es:bp+4]
  276. ;        push    dword [es:bp+8]
  277. ;
  278. ;        pop     dword [es:si+8]
  279. ;        pop     dword [es:si+4]
  280. ;        pop     dword [es:si]
  281. ;        pop     dword [es:bp+8]
  282. ;        pop     dword [es:bp+4]
  283. ;        pop     dword [es:bp]
  284. ;        jmp     .new_mode
  285. ;
  286. ;.exit:  add     si,12
  287. ;        jmp     .new_mode
  288. ;.exxit:
  289.         popad
  290.         ret
  291.  
  292. ;-----------------------------------------------------------------------------
  293.  
  294. draw_current_vmode:
  295.         push    0
  296.         pop     es
  297.  
  298.         mov     si,word [cursor_pos]
  299.  
  300.         cmp     word [es:si+6],0x12
  301.         je      .no_vesa_0x12
  302.  
  303.         cmp     word [es:si+6],0x13
  304.         je      .no_vesa_0x13
  305.  
  306.         mov     di,loader_block_error
  307.         movzx   eax,word[es:si+0]
  308.         mov     ecx,10
  309.         call    int2strnz
  310.         mov     byte[es:di],'x'
  311.         inc     di
  312.         movzx   eax,word[es:si+2]
  313.         call    int2strnz
  314.         mov     byte[es:di],'x'
  315.         inc     di
  316.         movzx   eax,word[es:si+8]
  317.         call    int2strnz
  318.         mov     dword[es:di],0x00000d0a
  319.         mov     si,loader_block_error
  320.         push    ds
  321.         push    es
  322.         pop     ds
  323.         call    printplain
  324.         pop     ds
  325.         ret
  326. .no_vesa_0x13:
  327.         mov     si,mode0
  328.         jmp     .print
  329. .no_vesa_0x12:
  330.         mov     si,mode9
  331. .print:
  332.         call    printplain
  333.         ret        
  334. ;-----------------------------------------------------------------------------
  335. check_first_parm:
  336.         mov     ax,word [preboot_graph]
  337.         test    ax,ax
  338.         jnz      .no_zero        ;if no zero
  339. .zerro:
  340. ;        mov     ax,modes_table
  341. ;        mov     word [cursor_pos],ax
  342. ;        mov     word [home_cursor],ax
  343. ;        mov     word [preboot_graph],ax
  344. ;SET default video of mode first probe will fined a move of work 1024x768@32
  345.  
  346.         mov     ax,1024
  347.         mov     bx,768
  348.         mov     si,modes_table
  349.         call    .loops
  350.         test    ax,ax
  351.         jz     .ok_found_mode
  352.         mov     ax,800
  353.         mov     bx,600
  354.         mov     si,modes_table
  355.         call    .loops
  356.         test    ax,ax
  357.         jz     .ok_found_mode
  358.         mov     ax,640
  359.         mov     bx,480
  360.         mov     si,modes_table
  361.         call    .loops
  362.         test    ax,ax
  363.         jz     .ok_found_mode
  364.  
  365.         mov     si,modes_table
  366.         jmp     .ok_found_mode
  367.  
  368.  
  369.  
  370. .no_zero:
  371.         mov     ax,word [x_save]
  372.         mov     bx,word [y_save]
  373.         mov     si,modes_table
  374.         call    .loops
  375.         test    ax,ax
  376.         jz     .ok_found_mode
  377.  
  378. ;        cmp     ax,modes_table
  379. ;        jb      .zerro           ;check on correct if bellow
  380. ;        cmp     ax,word [end_cursor]
  381. ;        ja      .zerro           ;check on correct if anymore
  382.  
  383. .ok_found_mode:
  384.         mov     word [home_cursor],si
  385. ;        mov     word [cursor_pos],si
  386.         mov     word [preboot_graph],si
  387.         mov     ax,si
  388.  
  389.         mov     ecx,long_v_table
  390.  
  391. .loop:  add     ax,size_of_step
  392.         cmp     ax,word [end_cursor]
  393.         jae     .next_step
  394.         loop    .loop
  395. .next_step:
  396.         sub     ax,size_of_step*long_v_table
  397.         cmp     ax,modes_table
  398.         jae     @f
  399.         mov     ax,modes_table
  400. @@:
  401.  
  402.         mov     word[home_cursor],ax
  403.         push    word [preboot_graph]
  404.         pop     word [cursor_pos]
  405.         ret
  406. ;;;;;;;;;;;;;;;;;;;;;;;;;;;
  407. .loops:
  408.         cmp     ax,word [es:si]
  409.         jne     .next
  410.         cmp     bx,word [es:si+2]
  411.         jne     .next
  412.         cmp     word [es:si+8],32
  413.         je      .ok
  414.         cmp     word [es:si+8],24
  415.         je      .ok
  416. .next:  add     si,size_of_step
  417.         cmp     word [es:si],-1
  418.         je      .exit
  419.         jmp     .loops
  420. .ok:    xor     ax,ax        
  421. .exit:  ret
  422.  
  423.  
  424. ;-----------------------------------------------------------------------------
  425.  
  426. ;default_vmode:
  427.        
  428. ;-----------------------------------------------------------------------------
  429. draw_vmodes_table:
  430.         _setcursor 9, 2
  431.         mov     si,gr_mode
  432.         call    printplain
  433.  
  434.         mov     si,_st
  435.         call    printplain
  436.  
  437.         push    word [cursor_pos]
  438.         pop     ax
  439.         push    word [home_cursor]
  440.         pop     si
  441.         mov     cx,si
  442.  
  443.         cmp     ax,si
  444.         je      .ok
  445.         jb      .low
  446.  
  447.  
  448.         add     cx,size_of_step*long_v_table
  449.        
  450.         cmp     ax,cx
  451.         jb      .ok
  452.        
  453.         sub     cx,size_of_step*long_v_table
  454.         add     cx,size_of_step
  455.         cmp     cx,word[end_cursor]
  456.         jae     .ok
  457.         add     si,size_of_step
  458.         push    si
  459.         pop     word [home_cursor]
  460.         jmp     .ok
  461.  
  462.  
  463. .low:   sub     cx,size_of_step
  464.         cmp     cx,modes_table
  465.         jb      .ok
  466.         push    cx
  467.         push    cx
  468.         pop     word [home_cursor]
  469.         pop     si
  470.  
  471.  
  472. .ok:
  473.         mov     bp,long_v_table               ;show rows
  474. .@@_next_bit:
  475.         cmp     word [es:si+6],0x12
  476.         je      .show_0x12
  477.         cmp     word [es:si+6],0x13
  478.         je      .show_0x13
  479.  
  480.         movzx   eax,word[es:si]
  481.         cmp     ax,-1
  482.         je      .@@_end
  483.         mov     di,_rs+23          
  484.         mov     ecx,10
  485.         mov     bl,4
  486.         call    int2str
  487.         movzx   eax,word[es:si+2]
  488.         inc     di
  489.         mov     bl,4
  490.         call    int2str
  491.  
  492.         movzx   eax,word[es:si+8]
  493.         inc     di
  494.         mov     bl,2
  495.         call    int2str
  496. ;clear cursor
  497.         mov     word[ds:_r1+21],'  '
  498.         mov     word[ds:_r1+50],'  '
  499.  
  500.         mov     word[ds:_r2+21],'  '
  501.         mov     word[ds:_r2+45],'  '
  502.  
  503.         mov     word[ds:_rs+21],'  '
  504.         mov     word[ds:_rs+46],'  '
  505.  
  506.         cmp     si, word [cursor_pos]
  507.         jne     .next
  508. ;draw   cursor
  509.         mov     word[ds:_rs+21],'>>'
  510.         mov     word[ds:_rs+46],'<<'
  511.        
  512.  
  513.  
  514. .next:
  515.         push    si
  516.         mov     si,_rs
  517. .@@_sh:
  518.         call    printplain
  519.         pop     si
  520.         add     si,size_of_step
  521.  
  522.         dec     bp
  523.         jnz     .@@_next_bit
  524.  
  525. .@@_end:
  526.         mov     si,_bt
  527.         call    printplain
  528. ; show scroll
  529.         push    es
  530.         push    0xB800
  531.         pop     es
  532. ; arrows
  533.         mov     di, (11*80+53)*2
  534.         mov     al, 30
  535.         stosb
  536.         add     di, 80*2-1
  537.         mov     al, 32
  538.         mov     cx, scroll_area_size
  539. @@:
  540.         stosb
  541.         add     di, 80*2-1
  542.         loop    @b
  543.         mov     al, 31
  544.         stosb
  545. ; calculate scroll size
  546.         mov     ax, [end_cursor]
  547.         sub     ax, modes_table
  548.         mov     bx, size_of_step
  549.         cwd
  550.         div     bx
  551.         mov     si, ax          ; si = size of list
  552.         mov     ax, [home_cursor]
  553.         sub     ax, modes_table
  554.         cwd
  555.         div     bx
  556.         mov     di, ax
  557.         mov     ax, scroll_area_size*long_v_table
  558.         cwd
  559.         div     si
  560.         test    ax, ax
  561.         jnz     @f
  562.         inc     ax
  563. @@:
  564.         cmp     al, scroll_area_size
  565.         jb      @f
  566.         mov     al, scroll_area_size
  567. @@:
  568.         mov     cx, ax
  569. ; cx = scroll height
  570. ; calculate scroll pos
  571.         xor     bx, bx          ; initialize scroll pos
  572.         sub     al, scroll_area_size+1
  573.         neg     al
  574.         sub     si, long_v_table-1
  575.         jbe     .draw_scroll
  576.         mul     di
  577.         div     si
  578.         mov     bx, ax
  579. .draw_scroll:
  580.         mov     al, 0xDB
  581.         imul    di, bx, 80*2
  582.         add     di, (12*80+53)*2
  583. @@:
  584.         stosb
  585.         add     di, 80*2-1
  586.         loop    @b
  587.         pop     es
  588.         ret
  589. .show_0x13:
  590.         push    si
  591.  
  592.         cmp     si, word [cursor_pos]
  593.         jne     @f
  594.         mov     word[ds:_r1+21],'>>'
  595.         mov     word[ds:_r1+50],'<<'        
  596. @@:
  597.         mov     si,_r1
  598.         jmp     .@@_sh
  599. .show_0x12:
  600.         push    si
  601.         cmp     si, word [cursor_pos]
  602.         jne     @f
  603.  
  604.         mov     word[ds:_r2+21],'>>'
  605.         mov     word[ds:_r2+45],'<<'
  606. @@:
  607.         mov     si,_r2
  608.         jmp     .@@_sh
  609.  
  610. ;-----------------------------------------------------------------------------
  611. ;Clear arrea of current video page (0xb800)
  612. clear_vmodes_table:
  613.         pusha
  614.        ; draw frames
  615.         push    es
  616.         push    0xb800
  617.         pop     es
  618.         mov     di,1444
  619.         xor     ax,ax
  620.         mov     ah, 1*16+15
  621.         mov     cx,70
  622.         mov     bp,12
  623. .loop_start:
  624.         rep     stosw
  625.         mov     cx,70
  626.         add     di,20
  627.         dec     bp               ; 㬥­ìè¨âì DX,
  628.         jns        .loop_start      
  629.         pop     es
  630.         popa
  631.         ret
  632.  
  633. ;-----------------------------------------------------------------------------
  634.  
  635. set_vmode:
  636.         push    0 ;0;x1000
  637.         pop     es
  638.  
  639.         mov     si,word [preboot_graph]            ;[preboot_graph]
  640.         mov     cx,word [es:si+6]            ; number of mode
  641.        
  642.  
  643.         mov     ax,word [es:si+0]            ; resolution X
  644.         mov     bx,word [es:si+2]            ; resolution Y
  645.  
  646.  
  647.         mov     word [es:0x900A],ax              ; resolution X
  648.         mov     word [es:0x900C],bx              ; resolution Y
  649.         mov     word [es:0x9008],cx              ; number of mode
  650.  
  651.         cmp     cx,0x12
  652.         je      .mode0x12_0x13
  653.         cmp     cx,0x13
  654.         je      .mode0x12_0x13
  655.  
  656.  
  657.         cmp     byte [s_vesa.ver],'2'
  658.         jb      .vesa12
  659.  
  660. ;  VESA 2 and Vesa 3
  661.  
  662.         mov     ax,0x4f01
  663.         and     cx,0xfff
  664.         mov     di,mi;0xa000
  665.         int     0x10
  666.         ; LFB
  667.         mov     eax,[es:mi.PhysBasePtr];di+0x28]
  668.         mov     [es:0x9018],eax
  669.         ; ---- vbe voodoo
  670.         BytesPerLine equ 0x10
  671.         mov     ax, [es:di+BytesPerLine]
  672.         mov     [es:0x9001], ax
  673.         ; BPP
  674.         cmp     [es:mi.BitsPerPixel],16
  675.         jne     .l0
  676.         cmp     [es:mi.GreenMaskSize],5
  677.         jne     .l0
  678.         mov     [es:mi.BitsPerPixel],15
  679. .l0:
  680.         mov     al, byte [es:di+0x19]
  681.         mov     [es:0x9000], al
  682.         jmp     .exit
  683.  
  684. .mode0x12_0x13:
  685.         mov     byte [es:0x9000], 32
  686.         or      dword [es:0x9018], 0xFFFFFFFF; 0x800000
  687.  
  688.  
  689. ;  VESA 1.2 PM BANK SWITCH ADDRESS
  690.  
  691. .vesa12:
  692.  
  693.  
  694.         mov     ax,0x4f0A
  695.         xor     bx,bx
  696.         int     0x10
  697.         xor     eax,eax
  698.         xor     ebx,ebx
  699.         mov     ax,es
  700.         shl     eax,4
  701.         mov     bx,di
  702.         add     eax,ebx
  703.         movzx   ebx,word[es:di]
  704.         add     eax,ebx
  705.         push    0x0000
  706.         pop     es
  707.         mov     [es:0x9014],eax
  708.   .exit:
  709.         ret
  710.  
  711.  
  712. ;        mov     dword[es:0x9018],0x000A0000
  713. ;        ret
  714.  
  715. ;=============================================================================
  716. ;=============================================================================
  717. ;=============================================================================
  718.  
  719.