94cc8f561e80057c899aa32004ddc47f6d9dd980
[dragonfly.git] / sys / boot / pc32 / cdboot / cdboot.S
1 /*
2  * Copyright (c) 2001 John Baldwin
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are freely
6  * permitted provided that the above copyright notice and this
7  * paragraph and the following disclaimer are duplicated in all
8  * such forms.
9  *
10  * This software is provided "AS IS" and without any express or
11  * implied warranties, including, without limitation, the implied
12  * warranties of merchantability and fitness for a particular
13  * purpose.
14  *
15  *
16  * $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.9 2001/11/07 01:20:33 jhb Exp $
17  * $DragonFly: src/sys/boot/pc32/cdboot/cdboot.S,v 1.8 2007/05/18 07:41:43 dillon Exp $
18  */
19
20 /*
21  * This program is a freestanding boot program to load an a.out binary
22  * from a CD-ROM booted with no emulation mode as described by the El
23  * Torito standard.  Due to broken BIOSen that do not load the desired
24  * number of sectors, we try to fit this in as small a space as possible.
25  *
26  * Basically, we first create a set of boot arguments to pass to the loaded
27  * binary.  Then we attempt to load /boot/loader from the CD we were booted
28  * off of. 
29  */
30
31 #include "../bootasm.h"
32
33                 /*
34                  * a.out header fields
35                  */
36                 .set AOUT_TEXT,0x04             # text segment size
37                 .set AOUT_DATA,0x08             # data segment size
38                 .set AOUT_BSS,0x0c              # zerod BSS size
39                 .set AOUT_SYMBOLS,0x10          # symbol table
40                 .set AOUT_ENTRY,0x14            # entry point
41                 .set AOUT_HEADER,MEM_PAGE_SIZE  # size of the a.out header
42
43                 /*
44                  * Flags for kargs->bootflags
45                  */
46                 .set KARGS_FLAGS_CD,0x1         # flag to indicate booting from
47                                                 #  CD loader
48                 /*
49                  * Segment selectors.
50                  */
51                 .set SEL_SDATA,0x8              # Supervisor data
52                 .set SEL_RDATA,0x10             # Real mode data
53                 .set SEL_SCODE,0x18             # PM-32 code
54                 .set SEL_SCODE16,0x20           # PM-16 code
55
56                 /*
57                  * BTX constants
58                  */
59                 .set INT_SYS,0x30               # BTX syscall interrupt
60
61                 /*
62                  * Constants for reading from the CD.
63                  */
64                 .set ERROR_TIMEOUT,0x80         # BIOS timeout on read
65                 .set NUM_RETRIES,3              # Num times to retry
66                 .set SECTOR_SIZE,0x800          # size of a sector
67                 .set SECTOR_SHIFT,11            # number of place to shift
68                 .set BUFFER_LEN,0x100           # number of sectors in buffer
69                 .set MAX_READ,0x10000           # max we can read at a time
70                 .set MAX_READ_SEC,MAX_READ >> SECTOR_SHIFT
71                 .set MEM_READ_BUFFER,0x9000     # buffer to read from CD
72                 .set MEM_VOLDESC,MEM_READ_BUFFER # volume descriptor
73                 .set MEM_DIR,MEM_VOLDESC+SECTOR_SIZE # Lookup buffer
74                 .set VOLDESC_LBA,0x10           # LBA of vol descriptor
75                 .set VD_PRIMARY,1               # Primary VD
76                 .set VD_END,255                 # VD Terminator
77                 .set VD_ROOTDIR,156             # Offset of Root Dir Record
78                 .set DIR_LEN,0                  # Offset of Dir Record length
79                 .set DIR_EA_LEN,1               # Offset of EA length
80                 .set DIR_EXTENT,2               # Offset of 64-bit LBA
81                 .set DIR_SIZE,10                # Offset of 64-bit length
82                 .set DIR_NAMELEN,32             # Offset of 8-bit name len
83                 .set DIR_NAME,33                # Offset of dir name
84
85                 /*
86                  * Program start.
87                  *
88                  * We expect to be loaded by the BIOS at 0x7c00 (standard
89                  * boot loader entry point)
90                  */
91                 .code16
92                 .globl start
93                 .org 0x0, 0x0
94
95 start:          cld                             # string ops inc
96                 xor %ax,%ax                     # zero %ax
97                 mov %ax,%ss                     # setup the
98                 mov $start,%sp                  #  stack
99                 mov %ax,%ds                     # setup the
100                 mov %ax,%es                     #  data segments
101                 mov %dl,drive                   # Save BIOS boot device
102                 mov $msg_welcome,%si            # %ds:(%si) -> welcome message
103                 call putstr                     # display the welcome message
104
105                 /*
106                  * Setup the arguments that the loader is expecting from
107                  * boot[12]
108                  */
109                 mov $msg_bootinfo,%si           # %ds:(%si) -> boot args message
110                 call putstr                     # display the message
111                 mov $MEM_ARG,%bx                # %ds:(%bx) -> boot args
112                 mov %bx,%di                     # %es:(%di) -> boot args
113                 xor %eax,%eax                   # zero %eax
114                 mov $(MEM_ARG_SIZE/4),%cx       # Size of arguments in 32-bit
115                                                 #  dwords
116                 rep                             # Clear the arguments
117                 stosl                           #  to zero
118                 mov drive,%dl                   # Store BIOS boot device
119                 mov %dl,0x4(%bx)                #  in kargs->bootdev
120                 or $KARGS_FLAGS_CD,0x8(%bx)     # kargs->bootflags |=
121                                                 #  KARGS_FLAGS_CD
122                 /*
123                  * Load Volume Descriptor
124                  */
125                 mov $VOLDESC_LBA,%eax           # Set LBA of first VD
126 load_vd:
127                 mov $1,%dh                      # One sector
128                 mov $MEM_VOLDESC,%ebx           # Destination
129                 call read                       # Read it in
130                 cmpb $VD_PRIMARY,(%bx)          # Primary VD?
131                 je have_vd                      # Yes
132                 inc %eax                        #  try next
133                 cmpb $VD_END,(%bx)              # Last VD?
134                 jne load_vd                     # No, read next
135                 mov $msg_novd,%si               # No VD
136                 jmp error                       # Halt
137 have_vd:                                        # Have Primary VD
138
139                 /*
140                  * Lookup the loader binary.
141                  */
142                 mov $loader_path,%si            # File to lookup
143                 call lookup                     # Try to find it
144
145                 /*
146                  * Load the binary into the buffer.  Due to real mode
147                  * addressing limitations we have to read it in in 64k
148                  * chunks.
149                  */
150                 mov DIR_SIZE(%bx),%eax          # Read file length
151                 add $SECTOR_SIZE-1,%eax         # Convert length to sectors
152                 shr $11,%eax
153                 cmp $BUFFER_LEN,%eax
154                 jbe load_sizeok
155                 mov $msg_load2big,%si           # Error message
156                 call error
157 load_sizeok:    movzbw %al,%cx                  # Num sectors to read
158                 mov DIR_EXTENT(%bx),%eax        # Load extent
159                 xor %edx,%edx
160                 mov DIR_EA_LEN(%bx),%dl
161                 add %edx,%eax                   # Skip extended
162                 mov $MEM_READ_BUFFER,%ebx       # Read into the buffer
163 load_loop:      mov %cl,%dh
164                 cmp $MAX_READ_SEC,%cl           # Truncate to max read size
165                 jbe load_notrunc
166                 mov $MAX_READ_SEC,%dh
167 load_notrunc:   sub %dh,%cl                     # Update count
168                 call read                       # Read it in
169                 add $MAX_READ_SEC,%eax          # Update LBA
170                 add $MAX_READ,%ebx              # Update dest addr
171                 jcxz load_done                  # Done?
172                 jmp load_loop                   # Keep going
173 load_done:
174                 /*
175                  * Turn on the A20 address line.
176                  */
177                 call seta20                     # Turn A20 on
178
179                 /*
180                  * Relocate the loader and BTX using a very lazy
181                  * protected mode.
182                  */
183                 mov $msg_relocate,%si           # Display the
184                 call putstr                     #  relocation message
185                 mov MEM_READ_BUFFER+AOUT_ENTRY,%edi # %edi is the destination
186                 mov $(MEM_READ_BUFFER+AOUT_HEADER),%esi # %esi is
187                                                 #  the start of the text
188                                                 #  segment
189                 mov MEM_READ_BUFFER+AOUT_TEXT,%ecx # %ecx = length of the text
190                                                 #  segment
191                 push %edi                       # Save entry point for later
192                 lgdt gdtdesc                    # setup our own gdt
193                 cli                             # turn off interrupts
194                 mov %cr0,%eax                   # Turn on
195                 or $0x1,%al                     #  protected
196                 mov %eax,%cr0                   #  mode
197                 ljmp $SEL_SCODE,$pm_start       # long jump to clear the
198                                                 #  instruction pre-fetch queue
199                 .code32
200 pm_start:       mov $SEL_SDATA,%ax              # Initialize
201                 mov %ax,%ds                     #  %ds and
202                 mov %ax,%es                     #  %es to a flat selector
203                 rep                             # Relocate the
204                 movsb                           #  text segment
205                 add $(MEM_PAGE_SIZE - 1),%edi   # pad %edi out to a new page
206                 and $~(MEM_PAGE_SIZE - 1),%edi #  for the data segment
207                 mov MEM_READ_BUFFER+AOUT_DATA,%ecx # size of the data segment
208                 rep                             # Relocate the
209                 movsb                           #  data segment
210                 mov MEM_READ_BUFFER+AOUT_BSS,%ecx # size of the bss
211                 xor %eax,%eax                   # zero %eax
212                 add $3,%cl                      # round %ecx up to
213                 shr $2,%ecx                     #  a multiple of 4
214                 rep                             # zero the
215                 stosl                           #  bss
216                 mov MEM_READ_BUFFER+AOUT_ENTRY,%esi # %esi -> relocated loader
217                 add $MEM_BTX_LDR_OFF,%esi       # %esi -> BTX in the loader
218                 mov $MEM_BTX_ORG,%edi   # %edi -> where BTX needs to go
219                 movzwl 0xa(%esi),%ecx           # %ecx -> length of BTX
220                 rep                             # Relocate
221                 movsb                           #  BTX
222                 ljmp $SEL_SCODE16,$pm_16        # Jump to 16-bit PM
223                 .code16
224 pm_16:          mov $SEL_RDATA,%ax              # Initialize
225                 mov %ax,%ds                     #  %ds and
226                 mov %ax,%es                     #  %es to a real mode selector
227                 mov %cr0,%eax                   # Turn off
228                 and $~0x1,%al                   #  protected
229                 mov %eax,%cr0                   #  mode
230                 ljmp $0,$pm_end                 # Long jump to clear the
231                                                 #  instruction pre-fetch queue
232 pm_end:         sti                             # Turn interrupts back on now
233
234                 /*
235                  * Copy the BTX client to MEM_BTX_USR.
236                  */
237                 xor %ax,%ax                     # zero %ax and set
238                 mov %ax,%ds                     #  %ds and %es
239                 mov %ax,%es                     #  to segment 0
240                 mov $MEM_BTX_USR,%di            # Prepare to relocate
241                 mov $btx_client,%si             #  the simple btx client
242                 mov $(btx_client_end-btx_client),%cx # length of btx client
243                 rep                             # Relocate the
244                 movsb                           #  simple BTX client
245
246                 /*
247                  * Copy the boot[12] args to where the BTX client
248                  * can see them.
249                  */
250                 mov $MEM_ARG,%si                # where the args are at now
251                 mov $MEM_BTX_USR_ARG,%di        # where the args are moving to
252                 mov $(MEM_ARG_SIZE/4),%cx       # size of the arguments in longs
253                 rep                             # Relocate
254                 movsl                           #  the words
255
256                 /*
257                  * Save the entry point so the client can get to it
258                  * later on
259                  */
260                 pop %eax                        # Restore saved entry point
261                 stosl                           #  and add it to the end of
262                                                 #  the arguments
263                 /*
264                  * Now we just start up BTX and let it do the rest
265                  */
266                 mov $msg_jump,%si               # Display the
267                 call putstr                     #  jump message
268                 ljmp $0,$MEM_BTX_ENTRY          # Jump to the BTX entry point
269
270                 /*
271                  * Lookup the file in the path at [SI] from the root 
272                  * directory.
273                  *
274                  * Trashes: All but BX
275                  * Returns: BX = pointer to record
276                  */
277 lookup:         mov $VD_ROOTDIR+MEM_VOLDESC,%bx # Root directory record
278                 push %si
279                 mov $msg_lookup,%si             # Display lookup message
280                 call putstr
281                 pop %si
282                 push %si
283                 call putstr
284                 mov $msg_lookup2,%si
285                 call putstr
286                 pop %si
287 lookup_dir:     lodsb                           # Get first char of path
288                 cmp $0,%al                      # Are we done?
289                 je lookup_done                  # Yes
290                 cmp $'/',%al                    # Skip path separator.
291                 je lookup_dir
292                 dec %si                         # Undo lodsb side effect
293                 call find_file                  # Lookup first path item
294                 jnc lookup_dir                  # Try next component
295                 mov $msg_lookupfail,%si         # Not found.
296                 jmp error
297 lookup_done:    mov $msg_lookupok,%si           # Success message
298                 call putstr
299                 ret
300
301                 /*
302                  * Lookup file at [SI] in directory whose record is at [BX].
303                  *
304                  * Trashes: All but returns
305                  *
306                  * Returns:     CF = 0 (success)
307                  *              BX = pointer to record,
308                  *              SX = next path item
309                  *              CF = 1 (not found)
310                  *              SI = preserved
311                  */
312 find_file:      mov DIR_EXTENT(%bx),%eax        # Load extent
313                 xor %edx,%edx
314                 mov DIR_EA_LEN(%bx),%dl
315                 add %edx,%eax                   # Skip extended attributes
316                 mov %eax,rec_lba                # Save LBA
317                 mov DIR_SIZE(%bx),%eax          # Save size
318                 mov %eax,rec_size
319                 xor %cl,%cl                     # Zero length
320                 push %si                        # Save
321 ff.namelen:     inc %cl                         # Update length
322                 lodsb                           # Read char
323                 cmp $0,%al                      # Nul?
324                 je ff.namedone                  # Yes
325                 cmp $'/',%al                    # Path separator?
326                 jnz ff.namelen                  # No, keep going
327 ff.namedone:    dec %cl                         # Adjust length and save
328                 mov %cl,name_len
329                 pop %si                         # Restore
330 ff.load:        mov rec_lba,%eax                # Load LBA
331                 mov $MEM_DIR,%ebx               # Address buffer
332                 mov $1,%dh                      # One sector
333                 call read                       # Read directory block
334                 incl rec_lba                    # Update LBA to next block
335 ff.scan:        mov %ebx,%edx                   # Check for EOF
336                 sub $MEM_DIR,%edx
337                 cmp %edx,rec_size
338                 ja ff.scan.1
339                 stc                             # EOF reached
340                 ret
341 ff.scan.1:      cmpb $0,DIR_LEN(%bx)            # Last record in block?
342                 je ff.nextblock
343                 push %si                        # Save
344                 movzbw DIR_NAMELEN(%bx),%si     # Find end of string
345 ff.checkver:    cmpb $'0',DIR_NAME-1(%bx,%si)   # Less than '0'?
346                 jb ff.checkver.1
347                 cmpb $'9',DIR_NAME-1(%bx,%si)   # Greater than '9'?
348                 ja ff.checkver.1
349                 dec %si                         # Next char
350                 jnz ff.checkver
351                 jmp ff.checklen                 # All numbers in name, so
352                                                 #  no version
353 ff.checkver.1:  movzbw DIR_NAMELEN(%bx),%cx
354                 cmp %cx,%si                     # Did we find any digits?
355                 je ff.checkdot                  # No
356                 cmpb $';',DIR_NAME-1(%bx,%si)   # Check for semicolon
357                 jne ff.checkver.2
358                 dec %si                         # Skip semicolon
359                 mov %si,%cx
360                 mov %cl,DIR_NAMELEN(%bx)        # Adjust length
361                 jmp ff.checkdot
362 ff.checkver.2:  mov %cx,%si                     # Restore %si to end of string
363 ff.checkdot:    cmpb $'.',DIR_NAME-1(%bx,%si)   # Trailing dot?
364                 jne ff.checklen                 # No
365                 decb DIR_NAMELEN(%bx)           # Adjust length
366 ff.checklen:    pop %si                         # Restore
367                 movzbw name_len,%cx             # Load length of name
368                 cmp %cl,DIR_NAMELEN(%bx)        # Does length match?
369                 je ff.checkname                 # Yes, check name
370 ff.nextrec:     add DIR_LEN(%bx),%bl            # Next record
371                 adc $0,%bh
372                 jmp ff.scan
373 ff.nextblock:   subl $SECTOR_SIZE,rec_size      # Adjust size
374                 jnc ff.load                     # If subtract ok, keep going
375                 ret                             # End of file, so not found
376 ff.checkname:   lea DIR_NAME(%bx),%di           # Address name in record
377                 push %si                        # Save
378                 repe cmpsb                      # Compare name
379                 jcxz ff.match                   # We have a winner!
380                 pop %si                         # Restore
381                 jmp ff.nextrec                  # Keep looking.
382 ff.match:       add $2,%sp                      # Discard saved %si
383                 clc                             # Clear carry
384                 ret
385
386                 /*
387                  * Load DH sectors starting at LBA EAX into [EBX].  No
388                  * registers are destroyed.  Don't trust the BIOS, especially
389                  * with regards to the msb 16 bits of our registers.
390                  */
391 read:           pushal                          # dont screw around
392                 mov %eax,edd_lba                # LBA to read from
393                 mov %ebx,%eax                   # Convert address
394                 shr $4,%eax                     #  to segment
395                 mov %ax,edd_addr+0x2            #  and store
396 read.retry:     call twiddle                    # Entertain the user
397                 push %dx                        # Save
398                 mov $edd_packet,%si             # Address Packet
399                 mov %dh,edd_len                 # Set length
400                 mov drive,%dl                   # BIOS Device
401                 mov $0x42,%ah                   # BIOS: Extended Read
402                 int $0x13                       # Call BIOS
403                 pop %dx                         # Restore
404                 jc read.fail                    # Worked?
405                 popal
406                 ret                             # Return
407 read.fail:      cmp $ERROR_TIMEOUT,%ah          # Timeout?
408                 je read.retry                   # Yes, Retry.
409 read.error:     mov %ah,%al                     # Save error
410                 mov $hex_error,%di              # Format it
411                 call hex8                       #  as hex
412                 mov $msg_badread,%si            # Display Read error message
413
414                 /*
415                  * Display error message at [SI] and halt.
416                  */
417 error:          call putstr                     # Display message
418 halt:           hlt
419                 jmp halt                        # Spin
420
421                 /*
422                  * Display a null-terminated string.
423                  *
424                  * Trashes: AX, SI
425                  */
426 putstr:
427 putstr.load:    lodsb                           # load %al from %ds:(%si)
428                 test %al,%al                    # stop at null
429                 jnz putstr.putc                 # if the char != null, output it
430                 ret                             # return when null is hit
431 putstr.putc:    call putc                       # output char
432                 jmp putstr.load                 # next char
433
434                 /*
435                  * Display a single char(%al).  Don't trust the bios to save
436                  * our regs.
437                  */
438 putc:           pushal
439                 mov $0x7,%bx                    # attribute for output
440                 mov $0xe,%ah                    # BIOS: put_char
441                 int $0x10                       # call BIOS, print char in %al
442                 popal
443                 ret                             # Return to caller
444
445                 /*
446                  * Output the "twiddle"
447                  */
448 twiddle:        push %ax                        # Save
449                 push %bx                        # Save
450                 mov twiddle_index,%al           # Load index
451                 mov $twiddle_chars,%bx          # Address table
452                 inc %al                         # Next
453                 and $3,%al                      #  char
454                 mov %al,twiddle_index           # Save index for next call
455                 xlat                            # Get char
456                 call putc                       # Output it
457                 mov $8,%al                      # Backspace
458                 call putc                       # Output it
459                 pop %bx                         # Restore
460                 pop %ax                         # Restore
461                 ret
462
463                 /*
464                  * Enable A20. Put upper limit on amount of time we wait for the
465                  * keyboard controller to get ready (65K x ISA access time). If
466                  * we wait more than that amount it's likely that the hardware
467                  * is legacy-free and simply doesn't have keyboard controller
468                  * and don't need enabling A20 at all.
469                  */
470 seta20:         cli                             # Disable interrupts
471                 xor %cx,%cx                     # Clear
472 seta20.1:       inc %cx                         # Increment, overflow?
473                 jz seta20.3                     # Yes
474                 in $0x64,%al                    # Get status
475                 test $0x2,%al                   # Busy?
476                 jnz seta20.1                    # Yes
477                 mov $0xd1,%al                   # Command: Write
478                 out %al,$0x64                   #  output port
479 seta20.2:       in $0x64,%al                    # Get status
480                 test $0x2,%al                   # Busy?
481                 jnz seta20.2                    # Yes
482                 mov $0xdf,%al                   # Enable
483                 out %al,$0x60                   #  A20
484 seta20.3:       sti                             # Enable interrupts
485                 ret                             # To caller
486
487                 /*
488                  * Convert AL to hex, saving the result to [EDI].
489                  */
490 hex8:           pushl %eax                      # Save
491                 shrb $0x4,%al                   # Do upper
492                 call hex8.1                     #  4
493                 popl %eax                       # Restore
494 hex8.1:         andb $0xf,%al                   # Get lower 4
495                 cmpb $0xa,%al                   # Convert
496                 sbbb $0x69,%al                  #  to hex
497                 das                             #  digit
498                 orb $0x20,%al                   # To lower case
499                 stosb                           # Save char
500                 ret                             # (Recursive)
501
502                 /*
503                  * BTX client to start btxldr
504                  */
505                 .code32
506 btx_client:     mov $(MEM_BTX_USR_ARG-MEM_BTX_USR+MEM_ARG_SIZE-4), %esi
507                                                 # %ds:(%esi) -> end
508                                                 #  of boot[12] args
509                 mov $(MEM_ARG_SIZE/4),%ecx      # Number of words to push
510                 std                             # Go backwards
511 push_arg:       lodsl                           # Read argument
512                 push %eax                       # Push it onto the stack
513                 loop push_arg                   # Push all of the arguments
514                 cld                             # In case anyone depends on this
515                 pushl MEM_BTX_USR_ARG-MEM_BTX_USR+MEM_ARG_SIZE # Entry point of
516                                                 #  the loader
517                 push %eax                       # Emulate a near call
518                 mov $0x1,%eax                   # "exec" system call
519                 int $INT_SYS                    # BTX system call
520 btx_client_end:
521                 .code16
522
523                 .p2align 4
524
525                 /*
526                  * Global descriptor table.
527                  */
528 gdt:            .word 0x0,0x0,0x0,0x0           # Null entry
529                 .word 0xffff,0x0,0x9200,0xcf    # SEL_SDATA
530                 .word 0xffff,0x0,0x9200,0x0     # SEL_RDATA
531                 .word 0xffff,0x0,0x9a00,0xcf    # SEL_SCODE (32-bit)
532                 .word 0xffff,0x0,0x9a00,0x8f    # SEL_SCODE16 (16-bit)
533 gdt.1:
534
535                 /*
536                  * Pseudo-descriptors.
537                  */
538 gdtdesc:        .word gdt.1-gdt-1               # Limit
539                 .long gdt                       # Base
540
541                 /*
542                  * EDD Packet
543                  */
544 edd_packet:     .byte 0x10                      # Length
545                 .byte 0                         # Reserved
546 edd_len:        .byte 0x0                       # Num to read
547                 .byte 0                         # Reserved
548 edd_addr:       .word 0x0,0x0                   # Seg:Off
549 edd_lba:        .quad 0x0                       # LBA
550
551 drive:          .byte 0
552
553                 /*
554                  * State for searching dir
555                  */
556 rec_lba:        .long 0x0                       # LBA (adjusted for EA)
557 rec_size:       .long 0x0                       # File size
558 name_len:       .byte 0x0                       # Length of current name
559
560 twiddle_index:  .byte 0x0
561
562 msg_welcome:    .asciz  "CD Loader 1.01\r\n\n"
563 msg_bootinfo:   .asciz  "Building the boot loader arguments\r\n"
564 msg_relocate:   .asciz  "Relocating the loader and the BTX\r\n"
565 msg_jump:       .asciz  "Starting the BTX loader\r\n"
566 msg_badread:    .ascii  "Read Error: 0x"
567 hex_error:      .ascii  "00\r\n"
568 msg_novd:       .asciz  "Could not find Primary Volume Descriptor\r\n"
569 msg_lookup:     .asciz  "Looking up "
570 msg_lookup2:    .asciz  "... "
571 msg_lookupok:   .asciz  "Found\r\n"
572 msg_lookupfail: .asciz  "File not found\r\n"
573 msg_load2big:   .asciz  "File too big\r\n"
574 loader_path:    .asciz  "/BOOT/LOADER"
575 twiddle_chars:  .ascii  "|/-\\"
576