diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2000-07-17 19:39:50 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2000-07-17 19:39:50 +0000 |
| commit | f15da231c58ddddb9492713e62a7f5719a9c58d1 (patch) | |
| tree | d506f9fa97f3abc050f56c8a56c348cb9237ec27 | |
| parent | bda0fa93eb69df8743e22d67288990b70c574b6d (diff) | |
Notes
| -rw-r--r-- | sys/boot/i386/boot0/boot0.s | 69 |
1 files changed, 3 insertions, 66 deletions
diff --git a/sys/boot/i386/boot0/boot0.s b/sys/boot/i386/boot0/boot0.s index 7b2e130659b2..85ce25adcccd 100644 --- a/sys/boot/i386/boot0/boot0.s +++ b/sys/boot/i386/boot0/boot0.s @@ -301,12 +301,6 @@ main.15: movw $LOAD,%bx # Address for read jne main.10 # No callw putn # Leave some space jmp *%bx # Invoke bootstrap -/* - movw %bx,%si # Memory to dump - movw $SECTOR_SIZE/16,%dx # Lines to display - callw memdump # Dump memory -hang: jmp hang # Spin -*/ # # Display routines @@ -485,66 +479,9 @@ os_netbsd: .ascii "NetBS"; .byte 'D'|0x80 os_bsdos: .ascii "BSD/O"; .byte 'S'|0x80 # -# A set of functions to print out various parts of %ax in hex -# -hex16: callw hex16.1 # Do upper 8 -hex16.1: xchgb %ah,%al # Save/restore -hex8: push %ax # Save - shrb $0x4,%al # Do upper - callw hex8.1 # 4 - pop %ax # Restore -hex8.1: andb $0xf,%al # Get lower 4 - cmpb $0xa,%al # Convert - sbbb $0x69,%al # to hex - das # digit - orb $0x20,%al # To lower case - push %ax # Save - callw putchr # Print char - pop %ax # Restore - retw # (Recursive) - +# Fake partition entry created at the end of the table used when loading +# boot0 at the very beginning and when loading an MBR from another disk when +# F5 is pressed. # -# Function to display a hexdump of memory. Call with: -# -# %dx - word - number of lines to display, each line is 16 bytes -# %ds:(%si) - caddr_t - memory to display -# -memdump: movw %si,%ax # Display the - callw hex16 # memory offset - movb $':',%al # Output a seperator - callw putchr # between the - movb $' ',%al # offset and - callw putchr # the data - push %si # Save %si - movw $16,%cx # Bytes per line -memdump.1: lodsb # Get next byte - callw hex8 # and display it - movb $' ',%al # Determine which - cmpb $9,%cl # seperator - jne memdump.2 # to use - movb $'-',%al # and then -memdump.2: callw putchr # display it - loop memdump.1 # Next byte - movb $'|',%al # Start of character - callw putchr # display - pop %si # Restore %si - movb $16,%cl # Bytes per line -memdump.3: lodsb # Get next byte - cmpb $32,%al # Control character? - jb memdump.4 # Yes, so modify - cmpb $0x80,%al # Upper ASCII? - jb memdump.5 # No, use raw characer -memdump.4: movb $'.',%al # Use '.' instead of bad char -memdump.5: callw putchr # Output character - loop memdump.3 # Do whole line - movb $'|',%al # Start of character - callw putchr # display - push %si # Save %si - callw putn # New line - pop %si # Restore %si - dec %dx # Done yet? - jnz memdump # No, keep going - retw # Yes, return - .org SECTOR_SIZE*NUM_SECTORS, 0x0 fake: |
