PROC PrintLastLine
push ax si di ds es
lea si,[LastLine]
cmp [Byte Ptr cs:si],0
je PLLEnd1
mov di,3686
mov ax,0B800h
mov es,ax
mov al,"["
mov ah,[cs:Color]
mov [es:di],ax
add di,2
PLL1: mov al,[cs:si]
or al,al
je PLLEnd
mov ah,[cs:Color]
mov [es:di],ax
inc di
inc di
inc si
jmp PLL1
PLLEnd: mov al,"]"
mov ah,[cs:Color]
mov [es:di],ax
PLLEnd1: pop es ds di si ax
ret
ENDP PrintLastLine
; Задать сроку статуса #(DS:DI)###############################################
PROC SetLastLine
push ax si di cx
call MyLastLine
mov al,[cs:LastLineFlag]
cmp [cs:numtask],al
jne SLLEnd
lea si,[LastLine]
xor cx,cx
SLL1: mov al,[ds:di]
or al,al
je SLLEnd
mov [cs:si],al
inc si
inc di
inc cx
cmp cx,72
je SLLEnd
jmp SLL1
SLLEnd: mov [Byte Ptr cs:si],0
pop cx di si ax
ret
ENDP SetLastLine
; Очистить строку статуса ####################################################
PROC ClearLastLine
push ax
mov al,[cs:LastLineFlag]
cmp [cs:numtask],al
jne CLLEnd
mov [Byte Ptr cs:LastLine],0
CLLEnd: pop ax
ret
ENDP ClearLastLine
; Захапать строку статуса ####################################################
PROC MyLastLine
mov ax,0FFFFh
cmp [Byte cs:LastLineFlag],0
jne MLLEnd
mov al,[cs:numtask]
mov [Byte Ptr cs:LastLineFlag],al
xor ax,ax
MLLEnd: ret
ENDP MyLastLine
|