Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9095 → Rev 9096

/programs/develop/libraries/console_coff/console.asm
755,6 → 755,8
jz .write_esc
cmp al, 8
jz .write_bs
cmp al, 7
jz .bell
cmp al, 9
jnz con.write_char
.write_tab:
790,6 → 792,15
@@:
pop eax
ret
.bell:
pusha
push 55
pop eax
mov ebx, eax
mov esi, con.beep2
int 0x40
popa
ret
.write_esc:
mov [con_esc], 1
mov [con_esc_attr_n], 1
868,6 → 879,8
je .dec_rst
cmp al, 'h'
je .dec_set
cmp al, 'K'
je .erase_in_line
ret ; simply skip unknown sequences
 
.dec_rst:
896,6 → 909,58
.show_cursor:
mov [con.cursor_height], (15*font_height+50)/100 ; default height
ret
 
.erase_in_line:
mov eax, [con_esc_attrs]
test eax, eax
jz .erase_till_end_of_line ; <esc>[0K (or <esc>[K)
dec eax
jz .erase_till_start_of_line ; <esc>[1K
dec eax
je .erase_current_line ; <esc>[2K
ret ; unknown sequence
 
.erase_till_end_of_line:
push edi ecx
mov edi, [con.cur_y]
imul edi, [con.scr_width]
add edi, [con.cur_x]
shl edi, 1
add edi, [con.data]
mov ecx, [con.scr_width]
sub ecx, [con.cur_x]
mov ah, byte[con_flags]
mov al, ' '
rep stosw
pop ecx edi
ret
 
.erase_till_start_of_line:
push edi ecx
mov edi, [con.cur_y]
imul edi, [con.scr_width]
shl edi, 1
add edi, [con.data]
mov ecx, [con.cur_y]
mov ah, byte[con_flags]
mov al, ' '
rep stosw
pop ecx edi
ret
 
.erase_current_line:
push edi ecx
mov edi, [con.cur_y]
imul edi, [con.scr_width]
shl edi, 1
add edi, [con.data]
mov ecx, [con.scr_width]
mov ah, byte[con_flags]
mov al, ' '
rep stosw
pop ecx edi
ret
 
.clear:
mov eax, [con_esc_attrs]
test eax, eax
2648,6 → 2713,7
con.aFinished db ' [Finished]',0
con.aNull db '(null)',0
con.beep db 0x90, 0x3C, 0x00
con.beep2 db 0x85, 0x25, 0x85, 0x40, 0x00
con.ipc_buf dd 0,8,0,0
db 0