aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>1998-02-01 19:14:38 +0000
committerhpa <hpa>1998-02-01 19:14:38 +0000
commit09a5b378ba9275e0709528f30aa9c7227cbe11e2 (patch)
tree4a2561ae0fccb03a98b617c9157f447debc9dae8
parentc289930ccd1a919445a58fdc70f2631653e980b1 (diff)
downloadsyslinux.git-09a5b378ba9275e0709528f30aa9c7227cbe11e2.tar.gz
syslinux.git-09a5b378ba9275e0709528f30aa9c7227cbe11e2.tar.xz
syslinux.git-09a5b378ba9275e0709528f30aa9c7227cbe11e2.zip
Additional optimizations. Do an ls -l in the Makefile so we know just
how much we bloat the code.
-rw-r--r--Makefile2
-rw-r--r--ldlinux.asm26
2 files changed, 15 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 07399070..5fcc5401 100644
--- a/Makefile
+++ b/Makefile
@@ -21,12 +21,14 @@ all: bootsect.bin ldlinux.sys
ldlinux.bin: ldlinux.asm
$(NASM) -f bin -dHEX_TIME="`perl now.pl`" -l ldlinux.lst -o ldlinux.bin ldlinux.asm
+ ls -l ldlinux.bin
bootsect.bin: ldlinux.bin
dd if=ldlinux.bin of=bootsect.bin bs=512 count=1
ldlinux.sys: ldlinux.bin
dd if=ldlinux.bin of=ldlinux.sys bs=512 skip=1
+ ls -l ldlinux.sys
clean:
rm -f *.bin *.lst *.sys
diff --git a/ldlinux.asm b/ldlinux.asm
index 7113b9b9..ac99da8a 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -691,7 +691,7 @@ ldlinux_ent:
mov ax,[bsHidden1] ; Hidden sectors
mov dx,[bsHidden2]
add ax,[bsResSectors] ; plus reserved sectors = FAT
- adc dx,0
+ adc dx,byte 0
mov bp,[bsFATsecs] ; Sectors/FAT
call getlinsec ; Load it in...
;
@@ -996,7 +996,7 @@ pc_app1: mov [AppendLen],di
pc_append_vk: mov di,VKernelBuf+vk_append ; "append" command (vkernel)
call getline
sub di,VKernelBuf+vk_append
- cmp di,2
+ cmp di,byte 2
jne pc_app2
cmp byte [VKernelBuf+vk_append],'-'
jne pc_app2
@@ -1357,7 +1357,7 @@ kernel_good:
; more than 8M, we need to change the logic for loading it anyway...)
;
load_it:
- cmp dx,80h ; 8 megs
+ cmp dx,byte 80h ; 8 megs
ja kernel_corrupt
and dx,dx
jz kernel_corrupt
@@ -1853,7 +1853,7 @@ rd_last_moby:
popf
jc rd_load_done ; EOF?
add word [InitRDat],100h ; Point to next 64K
- cmp word [InitRDClust],0 ; Are we done?
+ cmp word [InitRDClust],byte 0 ; Are we done?
jne rd_load_loop ; Apparently not
rd_load_done:
pop si ; Clean up the stack
@@ -2053,13 +2053,13 @@ dir_test_name: cmp byte [si],0 ; Directory high water mark
pop si
pop di
je dir_success
-dir_not_this: add si,32
+dir_not_this: add si,byte 32
dec word [DirScanCtr]
jz dir_return ; Out of it...
cmp si,[EndofDirSec]
jb dir_test_name
add ax,bp ; Increment linear sector number
- adc dx,0
+ adc dx,byte 0
jmp short scan_group
dir_success:
mov ax,[si+28] ; Length of file
@@ -2116,8 +2116,8 @@ print_msg_file: push cx
pop dx
pop ax
pop cx
- sub ax,1
- sbb dx,0
+ sub ax,byte 1
+ sbb dx,byte 0
mov bx,ax
or bx,dx
jz msg_done
@@ -2125,7 +2125,7 @@ print_msg_file: push cx
pop si
jmp short get_msg_chunk
msg_done_pop:
- add sp,6 ; Lose 3 words on the stack
+ add sp,byte 6 ; Lose 3 words on the stack
msg_done:
pop si
ret
@@ -2214,9 +2214,9 @@ open:
mov [FBytes1],ax
mov [FBytes2],dx
add ax,[ClustSize]
- adc dx,0
- sub ax,1
- sbb dx,0
+ adc dx,byte 0
+ sub ax,byte 1
+ sbb dx,byte 0
div word [ClustSize]
mov [FClust],ax ; Number of clusters
mov [FNextClust],si ; Cluster pointer
@@ -2537,7 +2537,7 @@ dumpregs proc near ; When calling, IP is on stack
mov si,offset crlf
call writestr
mov bx,sp
- add bx,26
+ add bx,byte 26
mov si,offset regnames
mov cx,2 ; 2*7 registers to dump
dump_line: push cx