absolutely necessary.
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
; 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
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
;
writechr:
- jmp near writechr_simple ; NOT "short"!!!!
+ jmp near writechr_simple ; 3-byte jump
writechr_simple:
pushfd
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
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
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
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
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
; 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
TRACER 't'
mov eax,[di+4]
cmp edx,[di]
- je near .type_found
+ je .type_found
add di,8
loop .search_table
.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
;
mov di,syslinux_cfg
call open
- jz near no_config_file
+ jz no_config_file
;
; Now we have the config file open
;
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
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
jmp short .find
.found_keywd: lodsw ; Load argument into ax
- call near [si]
+ call [si]
clc
ret
; 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
; 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
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
mov ax,[PXENVEntry]
call writehex4
call crlf
- jmp near have_entrypoint
+ jmp have_entrypoint
have_pxe:
mov eax,[es:bx+10h]
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
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
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
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
; 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
mov bp,sp
call allocate_socket
- jz near .error
+ jz .error
mov ax,PKT_RETRY ; Retry counter
mov word [PktTimeout],PKT_TIMEOUT ; Initial timeout
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
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
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
;
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
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.
;
; 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
pop ds
get_next_opt: lodsb
and al,al
- jz near cmdline_end
+ jz cmdline_end
cmp al,' '
jbe get_next_opt
dec si
;
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
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
;
;
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