From: Robert Pengelly Date: Mon, 30 Sep 2024 11:42:45 +0000 (+0100) Subject: Batch improvements X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=9aca619193b72222a2539d0caf137537d55c6d35;p=chimaera.git Batch improvements --- diff --git a/build/chimaera.img b/build/chimaera.img index a57cbef..1fa0819 100644 Binary files a/build/chimaera.img and b/build/chimaera.img differ diff --git a/build/chimaera.vhd b/build/chimaera.vhd index 6fde73c..433ddb8 100644 Binary files a/build/chimaera.vhd and b/build/chimaera.vhd differ diff --git a/src/apps/pcomm/pcomm.asm b/src/apps/pcomm/pcomm.asm index f1b5362..ac9d971 100644 --- a/src/apps/pcomm/pcomm.asm +++ b/src/apps/pcomm/pcomm.asm @@ -39,66 +39,11 @@ _main: mov ax, cs:[_echo_line] mov word ptr [bp - 4], ax - -.L119: - + push es push di push cx - mov ax, cs:[_vec_scratch + 0] - mov es, ax - - mov cx, cs:[_vec_scratch + 4] - xor di, di - -.L110: - - and cx, cx - jz .L109 - -.L125: - - mov dx, 1 - push dx - - mov ax, es:[di] - push ax - - mov ax, offset _scratch_list - push ax - - call _list_push - add sp, 6 - - add di, 2 - - dec cx - jnz .L110 - -.L109: - - mov ax, es - - and ax, ax - jz .L117 - - push ax - - call _free - add sp, 2 - -.L117: - - mov ax, cs - mov es, ax - - mov di, offset _vec_scratch - xor al, al - - mov cx, 6 - rep stosb - mov ax, [_scratch_list] xor di, di @@ -167,14 +112,7 @@ _main: mov [_scratch_list], ax mov word ptr [bp - 2], ax - cmp word ptr cs:[_vec_scratch + 4], 0 - je .L112 - - pop cx - pop di - pop es - - jmp .L119 + jmp .L112 .L111: @@ -3023,16 +2961,20 @@ _read_batch.check: push ds push di + + mov ax, 1 + push ax + push es mov ax, cs mov ds, ax - mov ax, offset _vec_scratch + mov ax, offset _scratch_list push ax - call _vec_push - add sp, 4 + call _list_push + add sp, 6 pop di pop ds @@ -3046,8 +2988,6 @@ _read_batch.check: _read_batch.next: - inc word ptr cs:[_in_batch] - pop ds pop bx pop ax @@ -3174,9 +3114,6 @@ _vec_env: db 6 dup (0) global _vec_paths _vec_paths: db 6 dup (0) -global _vec_scratch -_vec_scratch: db 6 dup (0) - global _curr_row _curr_row: db HEX (00)