summaryrefslogtreecommitdiff
path: root/ldlinux.asm
diff options
context:
space:
mode:
authorhpa <hpa>1998-04-14 05:27:20 +0000
committerhpa <hpa>1998-04-14 05:27:20 +0000
commit06e8eeeb75a44bd6df54c7e120cfa95a2dd6f8a1 (patch)
treeb14294afd5dbb58dec40875e57b48aa9f9a87537 /ldlinux.asm
parentec539247246461dc67b7f141b0c17be7b7caa226 (diff)
downloadsyslinux-06e8eeeb75a44bd6df54c7e120cfa95a2dd6f8a1.tar.gz
Patch generator for the -s (stupid) option.
Diffstat (limited to 'ldlinux.asm')
-rw-r--r--ldlinux.asm17
1 files changed, 6 insertions, 11 deletions
diff --git a/ldlinux.asm b/ldlinux.asm
index bc0c78a8..46631b11 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -638,8 +638,9 @@ getonesec:
; On return, BX points to the first byte after the transferred
; block.
;
-; When compiling with the STUPID option, this is replaced by a
-; routine which loads one sector at a time.
+; The "stupid patch area" gets replaced by the code
+; mov bp,1 ; nop ... (BD 01 00 90 90...) when installing with
+; the -s option.
;
getlinsec:
mov si,[bsSecPerTrack]
@@ -654,20 +655,14 @@ getlinsec:
;
gls_nextchunk: push si ; <A> bsSecPerTrack
push bp ; <B> Sectors to transfer
-%ifdef STUPID
- mov bp,1
- nop ; Minimize size of patch
- nop
- nop
- nop
- nop
-%else
+
+__BEGIN_STUPID_PATCH_AREA:
sub si,cx ; Sectors left on track
cmp bp,si
jna gls_lastchunk
mov bp,si ; No more than a trackful, please!
+__END_STUPID_PATCH_AREA:
gls_lastchunk:
-%endif
push ax ; <C> Cylinder #
push dx ; <D> Head #
push bp ; <E> Number of sectors we're transferring