Fix wnd_number in 016_#f01_#draw_all.t

This commit is contained in:
Ivan Baravy 2021-07-17 05:15:14 +03:00
parent ffa2480f2a
commit ba8e7940b4
5 changed files with 45 additions and 46 deletions

View File

@ -567,7 +567,7 @@ shell_dump_taskdata(int argc, char **argv) {
return;
}
int idx = strtol(argv[1], NULL, 0);
taskdata_t *t = kos_task_data + idx;
taskdata_t *t = kos_task_table + idx;
fprintf(fout, "event_mask: %" PRIx32 "\n", t->event_mask);
fprintf(fout, "pid: %" PRId32 "\n", t->pid);
fprintf(fout, "state: 0x%" PRIx8 "\n", t->state);

View File

@ -42,42 +42,36 @@ font smoothing: 0 - off
0x007e7e7e work_graph
/> set_window_colors 0 0 0 0 0 0 0 0 0 0
/> dump_win_stack 5
/> dump_win_stack 2
0: 0
1: 1
2: 2
3: 3
4: 4
/> dump_win_pos 5
/> dump_win_pos 2
0: 0
1: 1
2: 2
3: 3
4: 4
/> dump_taskdata 5
/> dump_taskdata 2
event_mask: 0
pid: 0
pid: 2
state: 0x0
wnd_number: 0
wnd_number: 2
counter_sum: 0
counter_add: 0
cpu_usage: 0
/> dump_appdata 5
app_name:
/> dump_appdata 2
app_name: OS
except_mask: 0
dbg_state: 0
cur_dir: (null)
cur_dir:
draw_bgr_x: 0
draw_bgr_y: 0
event_mask: 0
terminate_protection: 0
terminate_protection: 1
keyboard_mode: 0
captionEncoding: 0
exec_params: (null)
wnd_caption: (null)
wnd_clientbox (ltwh): 0 0 0 0
wnd_caption:
wnd_clientbox (ltwh): 5 24 291 172
priority: 0
in_schedule: prev (4294306402), next (4294306402)
in_schedule: prev (2), next (2)
/> process_info -1
cpu_usage: 0

View File

@ -28,10 +28,10 @@ get_font_smoothing
get_window_colors
set_window_colors 0 0 0 0 0 0 0 0 0 0
dump_win_stack 5
dump_win_pos 5
dump_taskdata 5
dump_appdata 5
dump_win_stack 2
dump_win_pos 2
dump_taskdata 2
dump_appdata 2
process_info -1
get_skin_height

View File

@ -32,7 +32,12 @@ public sha3_256_oneshot as 'hash_oneshot'
public kos_time_to_epoch
public umka_init
public current_process as 'kos_current_process'
public current_slot as 'kos_current_slot'
public current_slot_idx as 'kos_current_slot_idx'
public thread_count as 'kos_thread_count'
public TASK_TABLE as 'kos_task_table'
public TASK_BASE as 'kos_task_base'
public TASK_DATA as 'kos_task_data'
public SLOT_BASE as 'kos_slot_base'
@ -192,18 +197,18 @@ macro call target {
call target
end if
}
macro mov r, v {
if r eq byte [current_slot_idx] & v eq bh
push eax
mov eax, ebx
sub eax, SLOT_BASE
shr eax, BSF sizeof.APPDATA
mov [current_slot_idx], eax
pop eax
else
mov r, v
end if
}
;macro mov r, v {
; if r eq byte [current_slot_idx] & v eq bh
; push eax
; mov eax, ebx
; sub eax, SLOT_BASE
; shr eax, BSF sizeof.APPDATA
; mov [current_slot_idx], eax
; pop eax
; else
; mov r, v
; end if
;}
do_change_task equ hjk
irq0 equ jhg
include 'core/sched.inc'
@ -719,15 +724,14 @@ uglobal
align 64
os_base: rb PAGE_SIZE
window_data: rb sizeof.WDATA * 256
TASK_TABLE: rb 4
rb 12
TASK_BASE rd 4
TASK_DATA rd 0x7f8
CDDataBuf: rd 0x1840
idts rd 0x3c0
WIN_STACK rw 0x200
WIN_POS rw 0x600
FDD_BUFF rb 0x2300
TASK_TABLE: rb 16
TASK_BASE: rd 4
TASK_DATA: rd sizeof.TASKDATA * 255 / 4
CDDataBuf: rb 0x1000
idts rb IRQ_RESERVED * 8 ; IDT descriptor is 8 bytes long
WIN_STACK rw 0x200 ; why not 0x100?
WIN_POS rw 0x200
FDD_BUFF: rb 0x400
WIN_TEMP_XY rb 0x100
KEY_COUNT db ?
KEY_BUFF rb 255 ; 120*2 + 2*2 = 244 bytes, actually 255 bytes
@ -736,7 +740,8 @@ BTN_BUFF rd 0x261
BTN_ADDR dd ?
MEM_AMOUNT rd 0x1d
SYS_SHUTDOWN db ?
sys_proc: rb sizeof.TASKDATA * 256
sys_proc: rb sizeof.PROC * 256
rb 0x10000 - (($-bss_base) AND (0x10000-1)) ; align on 0x10000
SLOT_BASE: rb sizeof.APPDATA * 256
VGABasePtr rb 640*480
rb PAGE_SIZE - (($-bss_base) AND (PAGE_SIZE-1)) ; align on page

2
umka.h
View File

@ -624,7 +624,7 @@ extern appdata_t *kos_scheduler_current[NR_SCHED_QUEUES];
extern uint32_t umka_tool;
extern size_t kos_task_count;
extern taskdata_t *kos_task_base;
extern taskdata_t kos_task_data[];
extern taskdata_t kos_task_table[];
extern appdata_t kos_slot_base[];
extern void umka_do_change_task(appdata_t *new);
extern void scheduler_add_thread(void);