2010-10-01 11:21:55 +02:00
|
|
|
|
; Copyright (c) 2009, <Lrz>
|
|
|
|
|
; All rights reserved.
|
|
|
|
|
;
|
|
|
|
|
; Redistribution and use in source and binary forms, with or without
|
|
|
|
|
; modification, are permitted provided that the following conditions are met:
|
|
|
|
|
; * Redistributions of source code must retain the above copyright
|
|
|
|
|
; notice, this list of conditions and the following disclaimer.
|
|
|
|
|
; * Redistributions in binary form must reproduce the above copyright
|
|
|
|
|
; notice, this list of conditions and the following disclaimer in the
|
|
|
|
|
; documentation and/or other materials provided with the distribution.
|
|
|
|
|
; * Neither the name of the <organization> nor the
|
|
|
|
|
; names of its contributors may be used to endorse or promote products
|
|
|
|
|
; derived from this software without specific prior written permission.
|
|
|
|
|
;
|
|
|
|
|
; THIS SOFTWARE IS PROVIDED BY Alexey Teplov aka <Lrz> ''AS IS'' AND ANY
|
|
|
|
|
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
|
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
|
; DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
|
|
|
|
|
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
|
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
|
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
|
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
|
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
;*****************************************************************************
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> secondary loader
|
2012-03-08 09:33:38 +01:00
|
|
|
|
color_sym_black equ 0
|
|
|
|
|
color_sym_blue equ 1
|
|
|
|
|
color_sym_green equ 2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
color_sym_turquoise equ 3
|
2012-03-08 09:33:38 +01:00
|
|
|
|
color_sym_red equ 4
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
color_sym_lightgray equ 7
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
color_sym_lightblue equ 9
|
2010-10-01 11:21:55 +02:00
|
|
|
|
color_sym_lettuce equ 10
|
2012-03-08 09:33:38 +01:00
|
|
|
|
color_sym_pink equ 12
|
|
|
|
|
color_sym_yellow equ 14
|
|
|
|
|
color_sym_white equ 15
|
2010-10-01 11:21:55 +02:00
|
|
|
|
if DEBUG
|
|
|
|
|
decode:
|
|
|
|
|
;input eax - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, es:di <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, cx=10
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp eax, ecx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jb @f
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor edx, edx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
div ecx
|
|
|
|
|
push edx
|
|
|
|
|
call decode
|
|
|
|
|
pop eax
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
or al, 0x30
|
|
|
|
|
mov [ds:di], al
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc di
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
putchar:
|
|
|
|
|
; in: al=character
|
|
|
|
|
mov ah, 0Eh
|
|
|
|
|
mov bh, 0
|
|
|
|
|
int 10h
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
printplain:
|
|
|
|
|
; in: si->string
|
|
|
|
|
pushad
|
|
|
|
|
lodsb
|
|
|
|
|
@@:
|
|
|
|
|
call putchar
|
|
|
|
|
lodsb
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test al, al
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz @b
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, 13
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call putchar
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, 10
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call putchar
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
getkey:
|
|
|
|
|
; get number in range [bl,bh] (bl,bh in ['0'..'9'])
|
|
|
|
|
; in: bx=range
|
|
|
|
|
; out: ax=digit (1..9, 10 for 0)
|
|
|
|
|
mov ah, 0
|
|
|
|
|
int 16h
|
|
|
|
|
cmp al, bl
|
|
|
|
|
jb getkey
|
|
|
|
|
cmp al, bh
|
|
|
|
|
ja getkey
|
|
|
|
|
push ax
|
|
|
|
|
call putchar
|
|
|
|
|
pop ax
|
|
|
|
|
and ax, 0Fh
|
|
|
|
|
jnz @f
|
|
|
|
|
mov al, 10
|
|
|
|
|
@@:
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
;setcursor:
|
|
|
|
|
; in: dl=column, dh=row
|
|
|
|
|
; mov ah, 2
|
|
|
|
|
; mov bh, 0
|
|
|
|
|
; int 10h
|
|
|
|
|
; ret
|
|
|
|
|
|
|
|
|
|
;macro _setcursor row,column
|
|
|
|
|
;{
|
|
|
|
|
; mov dx, row*256 + column
|
|
|
|
|
; call setcursor
|
|
|
|
|
;}
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
get_firs_sym:
|
|
|
|
|
.start:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, byte [es:di]
|
|
|
|
|
inc di
|
|
|
|
|
dec cx
|
|
|
|
|
jcxz .exit
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0xa ;cmp al,0xa
|
|
|
|
|
jz ._entry
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, ';'
|
|
|
|
|
jnz .start
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
.first_com:
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, 0xa
|
|
|
|
|
repnz scasb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jcxz .exit
|
|
|
|
|
._entry:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, byte [es:di]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.first_sp:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, ' '
|
|
|
|
|
jnz .not_space
|
|
|
|
|
|
|
|
|
|
; mov al,' ' ;cut ' '
|
|
|
|
|
repe scasb
|
|
|
|
|
dec di
|
|
|
|
|
inc cx
|
|
|
|
|
mov al, byte [es:di]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.not_space:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, ';'
|
|
|
|
|
jz .first_com
|
|
|
|
|
.exit:
|
|
|
|
|
ret
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
show_name_section:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push si
|
|
|
|
|
push ini_data_
|
|
|
|
|
pop es
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, ']'
|
|
|
|
|
repnz scasb
|
|
|
|
|
test cx, cx
|
|
|
|
|
jz error.incorect_section_def
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.find_val_name_fb1:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, 'n'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.find_val_name_fb:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
repnz scasb
|
|
|
|
|
jcxz .not_name_sec_fb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, parse_name
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push cx
|
|
|
|
|
push di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, parse_name_e -parse_name
|
|
|
|
|
repe cmpsb
|
|
|
|
|
pop di
|
|
|
|
|
pop cx
|
|
|
|
|
jz .yaaa_find_value
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
jmp .find_val_name_fb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
.yaaa_find_value:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub cx, parse_name_e -parse_name
|
|
|
|
|
add di, parse_name_e -parse_name
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 0x3d20 ; ah='='
|
|
|
|
|
repe scasb
|
|
|
|
|
test cx, cx
|
|
|
|
|
jz .not_name_sec_fb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp ah, byte [es:di-1] ;find '='
|
|
|
|
|
jnz .find_val_name_fb1
|
|
|
|
|
|
|
|
|
|
repe scasb ;cut ' '
|
|
|
|
|
inc cx
|
|
|
|
|
dec di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ))
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push es
|
|
|
|
|
pop ds
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
.def_sect_name:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push 0xb800
|
|
|
|
|
pop es
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;clear array for message
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
if DEBUG
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 0x0720
|
2010-10-01 11:21:55 +02:00
|
|
|
|
end if
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, 39
|
|
|
|
|
mov si, di
|
|
|
|
|
mov di, dx
|
|
|
|
|
sub di, 2
|
|
|
|
|
rep stosw
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;//////////////////////
|
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, dx
|
|
|
|
|
mov ah, color_sym_white;color_sym_lightblue
|
|
|
|
|
mov cx, 36
|
|
|
|
|
lodsb
|
|
|
|
|
sub di, 2
|
|
|
|
|
cmp al, '"'
|
|
|
|
|
jz @f
|
|
|
|
|
cmp al, "'"
|
|
|
|
|
jnz .end_sh_name_sec
|
2010-10-01 11:21:55 +02:00
|
|
|
|
@@:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
lodsb
|
|
|
|
|
@@:
|
|
|
|
|
stosw
|
|
|
|
|
lodsb
|
|
|
|
|
cmp al, '"'
|
|
|
|
|
jz .end_sh_name_sec
|
|
|
|
|
cmp al, "'"
|
|
|
|
|
jz .end_sh_name_sec
|
|
|
|
|
loop @b
|
|
|
|
|
|
|
|
|
|
mov al, '}'
|
|
|
|
|
mov ah, color_sym_yellow
|
|
|
|
|
stosw
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.end_sh_name_sec:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push cs
|
|
|
|
|
pop ds
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
pop si
|
|
|
|
|
ret
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
.not_name_sec_fb: ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push cs
|
|
|
|
|
pop ds
|
|
|
|
|
mov di, default_section_name
|
|
|
|
|
jmp .def_sect_name
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD> point_default <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
find_before_sect:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, point_default
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.e:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push ini_data_
|
|
|
|
|
pop es
|
|
|
|
|
mov cx, di ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> di = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov bx, cx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.find_start_section:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
std ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. '[' <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, 0xa
|
|
|
|
|
repnz scasb ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jcxz .go_ ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ;(( <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov find_sec_di, di ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov cx, di ;
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub bx, cx
|
|
|
|
|
mov cx, bx ;<EFBFBD> <EFBFBD>x <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cld
|
|
|
|
|
call get_firs_sym
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.ret_go:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
jcxz ._not_section ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0xa ... ; hello [<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp di, point_loader; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> loader <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jz ._not_section
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, '['
|
|
|
|
|
jnz ._not_section
|
|
|
|
|
mov point_default, di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.exit_scan_sect:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
ret
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;;;;;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ))
|
|
|
|
|
._not_section:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, find_sec_di
|
|
|
|
|
mov cx, di
|
|
|
|
|
mov bx, cx
|
|
|
|
|
jmp .find_start_section
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.go_:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cld
|
|
|
|
|
mov cx, bx ;<EFBFBD> <EFBFBD>x <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
mov al, byte [es:di]
|
|
|
|
|
push word .f_go
|
|
|
|
|
cmp al, ' '
|
|
|
|
|
jz @f
|
|
|
|
|
jmp get_firs_sym.not_space
|
2010-10-01 11:21:55 +02:00
|
|
|
|
@@:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
jmp get_firs_sym.first_sp
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
.f_go:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
jcxz .exit_scan_sect ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0xa ... ; hello [<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp di, point_loader; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> loader <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jz .exit_scan_sect
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, '['
|
|
|
|
|
jnz .exit_scan_sect
|
|
|
|
|
mov point_default, di
|
|
|
|
|
ret
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
find_next_sect:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, point_default
|
|
|
|
|
push ini_data_
|
|
|
|
|
pop es
|
|
|
|
|
mov cx, save_cx;di ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> di = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
sub cx, di ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> cx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jmp .let_s_go
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.h:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push ini_data_
|
|
|
|
|
pop es
|
|
|
|
|
mov cx, save_cx;di ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> di = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; sub cx,di ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> cx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
mov al, byte [es:di]
|
|
|
|
|
push word .let_s_go_ret
|
|
|
|
|
cmp al, ' '
|
|
|
|
|
jz @f
|
|
|
|
|
jmp get_firs_sym.not_space
|
2010-10-01 11:21:55 +02:00
|
|
|
|
@@:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
jmp get_firs_sym.first_sp
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.let_s_go:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
call get_firs_sym
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.let_s_go_ret:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
jcxz .exit_scan_sect ; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0xa ... ; hello [<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cmp al, '['
|
|
|
|
|
jnz .let_s_go
|
|
|
|
|
cmp di, point_loader
|
|
|
|
|
jz .let_s_go
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov point_default, di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.exit_scan_sect:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
ret
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;clean old cursor
|
|
|
|
|
clean_active_cursor:
|
|
|
|
|
;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ax
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
lea si, point_to_hframe
|
|
|
|
|
mov di, 962-160
|
|
|
|
|
mov dx, point_default
|
|
|
|
|
mov cx, 18
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.clean_show_cur:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, [si]
|
|
|
|
|
add di, 160
|
|
|
|
|
cmp bx, dx
|
|
|
|
|
jz .clean_cursor_
|
|
|
|
|
sub si, 2
|
|
|
|
|
loop .clean_show_cur
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
; jmp $
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
.clean_cursor_:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push 0xb800
|
|
|
|
|
pop es
|
|
|
|
|
push ax
|
|
|
|
|
mov point_to_point_def, si
|
|
|
|
|
xor ax, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
if DEBUG
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 0x0720
|
2010-10-01 11:21:55 +02:00
|
|
|
|
end if
|
2012-03-08 09:33:38 +01:00
|
|
|
|
stosw
|
|
|
|
|
add di, 68
|
|
|
|
|
stosw
|
|
|
|
|
pop ax
|
|
|
|
|
ret
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
gettime:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ah, 0
|
2010-10-01 11:21:55 +02:00
|
|
|
|
int 1Ah
|
|
|
|
|
xchg ax, cx
|
|
|
|
|
shl eax, 10h
|
|
|
|
|
xchg ax, dx
|
|
|
|
|
ret
|
|
|
|
|
newtimer:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push ds
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
push cs
|
|
|
|
|
pop ds
|
|
|
|
|
|
|
|
|
|
pushf
|
2012-03-08 09:33:38 +01:00
|
|
|
|
call far dword [old_timer]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
pushad
|
|
|
|
|
call gettime
|
|
|
|
|
|
|
|
|
|
sub eax, dword[start_timer]
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, word [value_timeout]
|
|
|
|
|
imul bx, 18
|
2010-10-01 11:21:55 +02:00
|
|
|
|
sub bx, ax
|
|
|
|
|
jbe .timergo
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push es
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push 0xb800
|
|
|
|
|
pop es
|
|
|
|
|
mov ax, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
mov bx, 18
|
|
|
|
|
xor dx, dx
|
|
|
|
|
div bx
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, 10
|
|
|
|
|
mov di, 3734
|
|
|
|
|
call .decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
|
|
|
|
stosw
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
; wait 5/4/3/2 seconds, 1 second
|
2012-03-08 09:33:38 +01:00
|
|
|
|
pop es
|
2010-10-01 11:21:55 +02:00
|
|
|
|
popad
|
2012-03-08 09:33:38 +01:00
|
|
|
|
pop ds
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
iret
|
|
|
|
|
.timergo:
|
|
|
|
|
push 0
|
|
|
|
|
pop es
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov eax, dword [old_timer]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
mov [es:8*4], eax
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov dword [timer_], eax
|
|
|
|
|
mov sp, word [start_stack]
|
|
|
|
|
mov bp, word [save_bp_from_timer]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> :(
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sti
|
|
|
|
|
jmp parse_start.parse_run_only
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.decode:
|
|
|
|
|
;input ax - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, es:di <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, bx=10
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp ax, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jb @f
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor dx, dx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
div bx
|
|
|
|
|
push dx
|
|
|
|
|
call .decode
|
|
|
|
|
pop ax
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
or al, 0x30
|
|
|
|
|
push ax
|
|
|
|
|
mov ah, 9
|
2010-10-01 11:21:55 +02:00
|
|
|
|
stosw
|
2012-03-08 09:33:38 +01:00
|
|
|
|
pop ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
show_bl_sc_sect:
|
|
|
|
|
;1) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Section unname
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> es:di -<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - cx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
; push bp
|
|
|
|
|
mov bx, point_to_eframe
|
|
|
|
|
lea si, point_to_hframe
|
|
|
|
|
mov dx, 966
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
.home_show_fb:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp si, bx
|
|
|
|
|
jb ._show_space_fb
|
|
|
|
|
mov di, [si]
|
|
|
|
|
sub si, 2
|
|
|
|
|
mov cx, [si]
|
|
|
|
|
sub cx, di ;home first section it's end before section
|
|
|
|
|
call show_name_section
|
|
|
|
|
add dx, 160
|
|
|
|
|
jmp .home_show_fb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
._show_space_fb:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub dx, 4
|
|
|
|
|
push 0xb800
|
|
|
|
|
pop es
|
2010-10-01 11:21:55 +02:00
|
|
|
|
@@:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp dx, 0xE64
|
|
|
|
|
ja .exit_show_fb
|
|
|
|
|
mov di, dx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;clear array for message
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
if DEBUG
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 0x0720
|
2010-10-01 11:21:55 +02:00
|
|
|
|
end if
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, 39
|
|
|
|
|
rep stosw
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;//////////////////////
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
add dx, 160
|
|
|
|
|
jmp @b
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.exit_show_fb:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
; pop bp
|
|
|
|
|
ret
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|