diff options
author | hpa <hpa> | 1999-03-05 15:23:02 +0000 |
---|---|---|
committer | hpa <hpa> | 1999-03-05 15:23:02 +0000 |
commit | a7c4c8b7cef92678797e98284a101e4e73655196 (patch) | |
tree | 8ab93b6a65c42af6c2d191a4ed21ac5103201883 | |
parent | 6d2eb4fe523e906ddb6d974abf06e827bf7dbdee (diff) | |
download | syslinux-a7c4c8b7cef92678797e98284a101e4e73655196.tar.gz |
Make io_delay a subroutine, and preserve ax across it. This should also
make the binary slightly smaller.
-rw-r--r-- | ldlinux.asm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ldlinux.asm b/ldlinux.asm index 91f12740..e790a9ae 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -2341,9 +2341,17 @@ bcopy: push eax ; ; We typically toggle A20 twice for every 64K transferred. ; -%define io_delay times 4 in al,080h ; Invalid port (we hope) -%define delaytime 1024 ; 4 x ISA bus cycles (@ 1.5 µs) - +%define io_delay call _io_delay +%define io_delay_port 80h ; Invalid port (we hope!) +%define delaytime 1024 ; 4 x ISA bus cycles (@ 1.5 µs) + +_io_delay: push ax + in ax,IO_DELAY_PORT + in ax,IO_DELAY_PORT + in ax,IO_DELAY_PORT + in ax,IO_DELAY_PORT + pop ax + ret enable_a20: mov byte [ss:A20Tries],255 ; Times to try to make this work |