Remove all explicit "near" declarations, except the ones that are
authorhpa <hpa>
Mon, 10 Jun 2002 18:32:42 +0000 (18:32 +0000)
committerhpa <hpa>
Mon, 10 Jun 2002 18:32:42 +0000 (18:32 +0000)
absolutely necessary.

conio.inc
graphics.inc
isolinux.asm
ldlinux.asm
parsecmd.inc
pxelinux.asm
runkernel.inc

index bfb6257..5850b9d 100644 (file)
--- a/conio.inc
+++ b/conio.inc
@@ -98,12 +98,12 @@ msg_putchar:                                    ; Normal character
                 cmp al,0Ch                      ; <FF> = clear screen
                 je msg_formfeed
                cmp al,19h                      ; <EM> = return to text mode
-               je near msg_novga
+               je msg_novga
                cmp al,18h                      ; <CAN> = VGA filename follows
-               je near msg_vga
+               je msg_vga
                jnb .not_modectl
                cmp al,10h                      ; 10h to 17h are mode controls
-               jae near msg_modectl
+               jae msg_modectl
 .not_modectl:
 
 msg_normal:    call write_serial_displaymask   ; Write to serial port
index 0dd850e..bd4b5c7 100644 (file)
@@ -42,7 +42,7 @@ vgadisplayfile:
 
                ; The header WILL be in the first chunk.
                cmp dword [es:xbs_vgabuf],0x1413f33d    ; Magic number
-.error_nz:     jne near .error
+.error_nz:     jne .error
                mov ax,[es:xbs_vgabuf+4]
                mov [GraphXSize],ax
 
index 9c529b5..6c84773 100644 (file)
@@ -283,10 +283,10 @@ initial_csum:     xor edi,edi
                mov dl,[DriveNo]
                mov si,spec_packet
                int 13h
-               jc near spec_query_failed       ; Shouldn't happen (BIOS bug)
+               jc spec_query_failed    ; Shouldn't happen (BIOS bug)
                mov dl,[DriveNo]
                cmp [sp_drive],dl               ; Should contain the drive number
-               jne near spec_query_failed
+               jne spec_query_failed
 
 %ifdef DEBUG_MESSAGES
                mov si,spec_ok_msg
@@ -480,7 +480,7 @@ writemsg:   push ax
 ;
 
 writechr:
-               jmp near writechr_simple        ; NOT "short"!!!!
+               jmp near writechr_simple        ; 3-byte jump
 
 writechr_simple:
                pushfd
@@ -857,7 +857,7 @@ load_config:
 
                mov di,isolinux_cfg
                call open
-               jz near no_config_file          ; Not found or empty
+               jz no_config_file               ; Not found or empty
 
 %ifdef DEBUG_MESSAGES
                mov si,dbg_configok_msg
@@ -876,7 +876,7 @@ check_for_key:
                cmp word [ForcePrompt],byte 0   ; Force prompt?
                jnz enter_command
                test byte [KbdFlags],5Bh        ; Caps, Scroll, Shift, Alt
-               jz near auto_boot               ; If neither, default boot
+               jz auto_boot            ; If neither, default boot
 
 enter_command:
                mov si,boot_prompt
@@ -946,7 +946,7 @@ enter_char: test byte [FuncFlag],1
 get_char_2:    jmp short get_char
 not_ascii:     mov byte [FuncFlag],0
                cmp al,0Dh                      ; Enter
-               je near command_done
+               je command_done
                cmp al,06h                      ; <Ctrl-F>
                je set_func_flag
                cmp al,08h                      ; Backspace
@@ -1052,7 +1052,7 @@ clin_opt_ptr:   dec si                          ; Point to first nonblank
 vk_check:      pusha
                mov cx,FILENAME_MAX
                repe cmpsb                      ; Is this it?
-               je near vk_found
+               je vk_found
                popa
                add si,vk_size
                loop vk_check
@@ -1091,7 +1091,7 @@ get_kernel:     mov byte [KernelName+FILENAME_MAX],0      ; Zero-terminate filename/e
                 mov di,KernelName              ; Search on disk
                 call searchdir
                pop bx
-                jnz near kernel_good
+                jnz kernel_good
                mov eax,[bx]                    ; Try a different extension
                mov si,[KernelExtPtr]
                mov [si],eax
@@ -1146,7 +1146,7 @@ vk_found: popa
 
                ; Is this a "localboot" pseudo-kernel?
                cmp byte [VKernelBuf+vk_rname], 0
-               jne near get_kernel             ; No, it's real, go get it
+               jne get_kernel          ; No, it's real, go get it
 
                mov ax, [VKernelBuf+vk_rname+1]
                jmp local_boot
@@ -1252,7 +1252,7 @@ is_disk_image:
                TRACER 't'
                mov eax,[di+4]
                cmp edx,[di]
-               je near .type_found
+               je .type_found
                add di,8
                loop .search_table
 
@@ -1261,14 +1261,14 @@ is_disk_image:
 .hard_disk_image:
                TRACER 'h'
                cmp edx,512
-               jb near .bad_image
+               jb .bad_image
 
                mov bx,trackbuf
                mov cx,1                        ; Load 1 sector
                call getfssec
                
                cmp word [trackbuf+510],0aa55h  ; Boot signature
-               jne near .bad_image             ; Image not bootable
+               jne .bad_image          ; Image not bootable
 
                mov cx,4                        ; 4 partition entries
                mov di,trackbuf+446             ; Start of partition table
index 955665a..bf8ebbc 100644 (file)
@@ -1024,7 +1024,7 @@ mkkeymap: stosb
 ;
                mov di,syslinux_cfg
                call open
-               jz near no_config_file
+               jz no_config_file
 ;
 ; Now we have the config file open
 ;
@@ -1037,7 +1037,7 @@ check_for_key:
                cmp word [ForcePrompt],byte 0   ; Force prompt?
                jnz enter_command
                test byte [KbdFlags],5Bh        ; Caps, Scroll, Shift, Alt
-               jz near auto_boot               ; If neither, default boot
+               jz auto_boot            ; If neither, default boot
 
 enter_command:
                mov si,boot_prompt
@@ -1214,7 +1214,7 @@ clin_opt_ptr:   dec si                          ; Point to first nonblank
 vk_check:      pusha
                mov cx,11
                repe cmpsb                      ; Is this it?
-               je near vk_found
+               je vk_found
                popa
                add si,vk_size
                loop vk_check
index 5639db9..9e69319 100644 (file)
@@ -72,7 +72,7 @@ getcommand:
                jmp short .find
 
 .found_keywd:  lodsw                   ; Load argument into ax
-               call near [si]
+               call [si]
                clc
                ret
 
index d6b9ed7..bb08d6e 100644 (file)
@@ -309,7 +309,7 @@ _start1:
 ; to by SS:[SP+4], but support INT 1Ah, AX=5650h method as well.
 ;
                cmp dword [es:bx], '!PXE'
-               je near have_pxe
+               je have_pxe
 
                ; Uh-oh, not there... try plan B
                mov ax, 5650h
@@ -327,7 +327,7 @@ _start1:
 
                ; Nothing there either.  Last-ditch: scan memory
                call memory_scan_for_pxe_struct         ; !PXE scan
-               jnc near have_pxe
+               jnc have_pxe
                call memory_scan_for_pxenv_struct       ; PXENV+ scan
                jnc have_pxenv
 
@@ -351,12 +351,12 @@ have_pxenv:
                mov ax,es
                les bx,[es:bx+28h]              ; !PXE structure pointer
                cmp dword [es:bx],'!PXE'
-               je near have_pxe
+               je have_pxe
 
                ; Nope, !PXE structure missing despite API 2.1+, or at least
                ; the pointer is missing.  Do a last-ditch attempt to find it.
                call memory_scan_for_pxe_struct
-               jnc near have_pxe
+               jnc have_pxe
 
                ; Otherwise, no dice, use PXENV+ structure
                mov bx,si
@@ -415,7 +415,7 @@ old_api:    ; Need to use a PXENV+ structure
                mov ax,[PXENVEntry]
                call writehex4
                call crlf
-               jmp near have_entrypoint
+               jmp have_entrypoint
 
 have_pxe:
                mov eax,[es:bx+10h]
@@ -748,7 +748,7 @@ check_for_key:
                cmp word [ForcePrompt],byte 0   ; Force prompt?
                jnz enter_command
                test byte [KbdFlags],5Bh        ; Caps, Scroll, Shift, Alt
-               jz near auto_boot               ; If neither, default boot
+               jz auto_boot            ; If neither, default boot
 
 enter_command:
                mov si,boot_prompt
@@ -818,7 +818,7 @@ enter_char: test byte [FuncFlag],1
 get_char_2:    jmp short get_char
 not_ascii:     mov byte [FuncFlag],0
                cmp al,0Dh                      ; Enter
-               je near command_done
+               je command_done
                cmp al,06h                      ; <Ctrl-F>
                je set_func_flag
                cmp al,08h                      ; Backspace
@@ -924,7 +924,7 @@ clin_opt_ptr:   dec si                          ; Point to first nonblank
 vk_check:      pusha
                mov cx,FILENAME_MAX
                repe cmpsb                      ; Is this it?
-               je near vk_found
+               je vk_found
                popa
                add si,vk_size
                loop vk_check
@@ -963,7 +963,7 @@ get_kernel:     mov byte [KernelName+FILENAME_MAX],0        ; Zero-terminate filename/e
                 mov di,KernelName              ; Search on disk
                 call searchdir
                pop bx
-                jnz near kernel_good
+                jnz kernel_good
                mov eax,[bx]                    ; Try a different extension
                mov si,[KernelExtPtr]
                mov [si],eax
@@ -1020,7 +1020,7 @@ vk_found: popa
 
                ; Is this a "localboot" pseudo-kernel?
                cmp byte [VKernelBuf+vk_rname], 0
-               jne near get_kernel             ; No, it's real, go get it
+               jne get_kernel          ; No, it's real, go get it
 
                mov ax, [VKernelBuf+vk_rname+1]
                jmp local_boot
@@ -1364,7 +1364,7 @@ searchdir:
                mov bp,sp
 
                call allocate_socket
-               jz near .error
+               jz .error
 
                mov ax,PKT_RETRY        ; Retry counter
                mov word [PktTimeout],PKT_TIMEOUT       ; Initial timeout
@@ -1399,9 +1399,9 @@ searchdir:
                mov di,pxe_udp_write_pkt
                mov bx,PXENV_UDP_WRITE
                call far [PXENVEntry]
-               jc near .failure
+               jc .failure
                cmp word [pxe_udp_write_pkt.status],byte 0
-               jne near .failure
+               jne .failure
 
                ;
                ; Danger, Will Robinson!  We need to support timeout
@@ -1457,10 +1457,10 @@ searchdir:
 
                movzx eax,word [pxe_udp_read_pkt.buffersize]
                sub eax, byte 2
-               jb near .failure                ; Garbled reply
+               jb .failure             ; Garbled reply
 
                cmp word [packet_buf], TFTP_ERROR
-               je near .bailnow                ; ERROR reply: don't try again
+               je .bailnow             ; ERROR reply: don't try again
 
                cmp word [packet_buf], TFTP_OACK
                jne .err_reply
@@ -1547,7 +1547,7 @@ searchdir:
                pop si
                pop ax
                dec ax                  ; Retry counter
-               jnz near .sendreq       ; Try again
+               jnz .sendreq    ; Try again
 
 .error:                xor si,si               ; ZF <- 1
                pop bp
index b87c921..eabb792 100644 (file)
 ;
 is_linux_kernel:
                 cmp dx,80h                     ; 8 megs
-               ja near kernel_corrupt
+               ja kernel_corrupt
                and dx,dx
                jnz kernel_sane
                cmp ax,1024                     ; Bootsect + 1 setup sect
-               jb near kernel_corrupt
+               jb kernel_corrupt
 kernel_sane:   push ax
                push dx
                push si
@@ -95,7 +95,7 @@ kernel_sane:  push ax
                 pop si                          ; Cluster pointer on stack
                call getfssec
                 cmp word [es:bs_bootsign],0AA55h
-               jne near kernel_corrupt         ; Boot sec signature missing
+               jne kernel_corrupt              ; Boot sec signature missing
 ;
 ; Get the BIOS' idea of what the size of high memory is.
 ;
@@ -136,7 +136,7 @@ get_e820:
 
                ; Now EAX contains the size of memory 1 MB...up
                cmp dword [E820Buf+16], byte 1
-               jne near err_nohighmem          ; High memory isn't usable memory!!!!
+               jne err_nohighmem               ; High memory isn't usable memory!!!!
 
                ; We're good!
                pop es
@@ -210,7 +210,7 @@ construct_cmdline:
                 pop ds
 get_next_opt:   lodsb
                and al,al
-               jz near cmdline_end
+               jz cmdline_end
                cmp al,' '
                jbe get_next_opt
                dec si
@@ -274,9 +274,9 @@ cmdline_end:
 ;
                mov dword [RamdiskMax], HIGHMEM_MAX     ; Default initrd limit
                cmp dword [es:su_header],HEADER_ID      ; New setup code ID
-               jne near old_kernel             ; Old kernel, load low
+               jne old_kernel          ; Old kernel, load low
                cmp word [es:su_version],0200h  ; Setup code version 2.0
-               jb near old_kernel              ; Old kernel, load low
+               jb old_kernel           ; Old kernel, load low
                 cmp word [es:su_version],0201h ; Version 2.01+?
                 jb new_kernel                   ; If 2.00, skip this step
                 mov word [es:su_heapend],linux_stack   ; Set up the heap
@@ -314,7 +314,7 @@ read_kernel:
                 mov eax,[HighMemSize]
                sub eax,100000h                 ; Load address
                cmp eax,[KernelSize]
-               jb near no_high_mem             ; Not enough high memory
+               jb no_high_mem          ; Not enough high memory
 ;
 ; Move the stuff beyond the setup code to high memory at 100000h
 ;
@@ -357,7 +357,7 @@ high_load_done:
 ;
 load_initrd:
                 test byte [initrd_flag],1
-                jz near nk_noinitrd
+                jz nk_noinitrd
                 push es                         ; ES->real_mode_seg
                 push ds
                 pop es                          ; We need ES==DS