Lines Matching +full:read +full:- +full:1

81  * Trampoline used by boot2 to call read to read data from the disk via
84 * %cx:%ax - long - LBA to read in
85 * %es:(%bx) - caddr_t - buffer to read data into
86 * %dl - byte - drive to read from
87 * %dh - byte - num sectors to read
93 * Setup an EDD disk packet and pass it to read
95 xread.1: # Starting
106 callw read # Read from disk
140 * FreeBSD slice. The second pass looks for the first non-active FreeBSD
147 callw nread # Read MBR
149 main.1: mov $MEM_BUF+PRT_OFF,%si # Partition table
161 jcxz main.1 # passes
176 * we read it in, we conveniently use 0x8c00 as our transfer buffer. Thus,
188 callw nread # Read disk
193 mov $MEM_BTX+(NSECT-1)*SIZ_SEC,%cx # Byte
199 * Enable A20 so we can access memory above 1 meg.
200 * Use the zero-valued %cx as a timeout for embedded hardware which do not
204 seta20.1: dec %cx # Timeout?
208 jnz seta20.1 # Yes
218 jmp start+MEM_JMP-MEM_ORG # Start BTX
222 * Trampoline used to call read from within boot1.
227 push %cs # Read from
228 callw xread.1 # disk
245 * Display a null-terminated string using the BIOS output.
256 * read function. Since we assume putstr succeeds, we (ab)use the
269 * %dl - byte - drive number
270 * stack - 10 bytes - EDD Packet
272 read: testb $FL_PACKET,%cs:MEM_REL+flags-start # LBA support enabled? label
273 jz read.1 # No, use CHS
275 jb read.1 # No, use CHS
281 jc read.1 # If error, use CHS
283 jne read.1 # No, so use CHS
285 jz read.1 # No, so use CHS
288 int $0x13 # read
290 read.1: push %dx # Save
321 mov 0x2(%bp),%ah # Blocks to read
322 cmpb %ah,%al # To read
323 jb read.2 # this
327 movb $1,%al # one sector
329 read.2: mov $0x5,%di # Try count
330 read.3: les 0x4(%bp),%bx # Transfer buffer
332 movb $0x2,%ah # BIOS: Read
335 jnc read.4 # If success
337 jz read.6 # No
341 jmp read.3 # Continue
342 read.4: movzbw %bl,%ax # Sectors read
344 jnc read.5 # LBA,
346 read.5: shlb %bl # buffer
349 ja read.1 # If not done
350 read.6: retw # To caller
354 msg_read: .asciz "Read"