hexsha stringlengths 40 40 | size int64 6 1.05M | ext stringclasses 3 values | lang stringclasses 1 value | max_stars_repo_path stringlengths 4 232 | max_stars_repo_name stringlengths 7 106 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 7 | max_stars_count int64 1 33.5k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 232 | max_issues_repo_name stringlengths 7 106 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 7 | max_issues_count int64 1 37.5k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 232 | max_forks_repo_name stringlengths 7 106 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 7 | max_forks_count int64 1 12.6k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 1.05M | avg_line_length float64 1.16 19.7k | max_line_length int64 2 938k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75aadebd58550619fc2fafa45a41a17ddebe8792 | 686 | asm | Assembly | oeis/081/A081708.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/081/A081708.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/081/A081708.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A081708: a(n) = a(n-1) + 64*a(n-2) starting with a(0) = 2 and a(1) = 1.
; Submitted by Christian Krause
; 2,1,129,193,8449,20801,561537,1892801,37831169,158970433,2580165249,12754272961,177884848897,994158318401,12378788647809,76004921025473,868247394485249,5732562340115521,61300395587171457,428184385354564801,4351409702933538049,31755210365625685313,310245431353372120449,2342578894753415980481,22198286501369231689217,172123335765587854440001,1592813671853218682549889,12608707160850841366709953,114548782159456837049902849,921506040453910684519339841,8252628098659148255713122177
mov $2,1
mov $4,2
lpb $0
sub $0,1
mov $3,$4
mul $3,64
mov $4,$2
add $2,$3
lpe
mov $0,$4
| 45.733333 | 480 | 0.816327 |
e35ec80aeeecb1595b8b903ba6090c7197d867d6 | 316 | asm | Assembly | programs/oeis/077/A077433.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/077/A077433.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/077/A077433.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A077433: Number of separating zeros to represent A077431.
; 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
div $0,2
lpb $0
div $0,11
add $1,1
lpe
mov $0,$1
| 31.6 | 201 | 0.556962 |
ff3121906d45acaef1bc889d54ee9bc1b1ebee4f | 180 | asm | Assembly | src/lib/copy.asm | zys1310992814/BookOSv0.2 | 7dca0f968663a0e6de18dd9b3e533d1e0412674f | [
"BSD-2-Clause"
] | 3 | 2019-02-24T11:05:46.000Z | 2019-02-26T03:20:50.000Z | src/lib/copy.asm | zys1310992814/BookOSv0.2 | 7dca0f968663a0e6de18dd9b3e533d1e0412674f | [
"BSD-2-Clause"
] | null | null | null | src/lib/copy.asm | zys1310992814/BookOSv0.2 | 7dca0f968663a0e6de18dd9b3e533d1e0412674f | [
"BSD-2-Clause"
] | null | null | null | [bits 32]
[section .text]
INT_VECTOR_SYS_CALL equ 0x80
_NR_COPY EQU 26
global copy
copy:
mov eax, _NR_COPY
mov ebx, [esp + 4]
mov ecx, [esp + 8]
int INT_VECTOR_SYS_CALL
ret | 12.857143 | 28 | 0.716667 |
d92d436e1a8beb566473bf918ce108707e1eacee | 4,207 | asm | Assembly | test/golang/labels.output.asm | moneytech/compiler-explorer | 63a0e5090629c0799724cf82ea817e8c7d328549 | [
"BSD-2-Clause"
] | 2 | 2020-06-16T17:31:52.000Z | 2021-10-05T03:15:41.000Z | test/golang/labels.output.asm | moneytech/compiler-explorer | 63a0e5090629c0799724cf82ea817e8c7d328549 | [
"BSD-2-Clause"
] | 5 | 2021-10-06T22:35:56.000Z | 2022-02-27T11:22:28.000Z | test/golang/labels.output.asm | moneytech/compiler-explorer | 63a0e5090629c0799724cf82ea817e8c7d328549 | [
"BSD-2-Clause"
] | 1 | 2021-03-04T23:56:54.000Z | 2021-03-04T23:56:54.000Z | Closures_pc0:
.file 1 "labels.go"
.loc 1 5 0
text "".Closures(SB), $24-0
movq (TLS), CX
cmpq SP, 16(CX)
jls Closures_pc75
subq $24, SP
movq BP, 16(SP)
leaq 16(SP), BP
funcdata $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
funcdata $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
funcdata $3, gclocals·9fb7f0986f647f17cb53dda1484e0f7a(SB)
.loc 1 6 0
pcdata $2, $0
pcdata $0, $0
cmpq "".N(SB), $1
jne Closures_pc49
Closures_pc39:
pcdata $2, $-2
pcdata $0, $-2
movq 16(SP), BP
addq $24, SP
ret
Closures_pc49:
.loc 1 7 0
pcdata $2, $0
pcdata $0, $0
movl $0, (SP)
pcdata $2, $1
leaq "".Closures.func1·f(SB), AX
pcdata $2, $0
movq AX, 8(SP)
call runtime.newproc(SB)
jmp Closures_pc39
Closures_pc75:
nop
.loc 1 5 0
pcdata $0, $-1
pcdata $2, $-1
call runtime.morestack_noctxt(SB)
jmp Closures_pc0
Closures_func1_1_pc0:
.loc 1 21 0
text "".Closures_func1_1(SB), $16-0
movq (TLS), CX
cmpq SP, 16(CX)
jls Closures_func1_1_pc74
subq $16, SP
movq BP, 8(SP)
leaq 8(SP), BP
funcdata $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
funcdata $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
funcdata $3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
.loc 1 22 0
pcdata $2, $0
pcdata $0, $0
cmpq "".N(SB), $1
jne Closures_func1_1_pc49
Closures_func1_1_pc39:
pcdata $2, $-2
pcdata $0, $-2
movq 8(SP), BP
addq $16, SP
ret
Closures_func1_1_pc49:
.loc 1 23 0
pcdata $2, $0
pcdata $0, $0
call runtime.printlock(SB)
movq $1, (SP)
call runtime.printint(SB)
call runtime.printunlock(SB)
jmp Closures_func1_1_pc39
Closures_func1_1_pc74:
nop
.loc 1 21 0
pcdata $0, $-1
pcdata $2, $-1
call runtime.morestack_noctxt(SB)
jmp Closures_func1_1_pc0
αβ_pc0:
.loc 1 27 0
text "".αβ(SB), $16-0
movq (TLS), CX
cmpq SP, 16(CX)
jls αβ_pc74
subq $16, SP
movq BP, 8(SP)
leaq 8(SP), BP
funcdata $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
funcdata $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
funcdata $3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
.loc 1 28 0
pcdata $2, $0
pcdata $0, $0
cmpq "".N(SB), $1
jne αβ_pc49
αβ_pc39:
pcdata $2, $-2
pcdata $0, $-2
movq 8(SP), BP
addq $16, SP
ret
αβ_pc49:
.loc 1 29 0
pcdata $2, $0
pcdata $0, $0
call runtime.printlock(SB)
movq $1, (SP)
call runtime.printint(SB)
call runtime.printunlock(SB)
jmp αβ_pc39
αβ_pc74:
nop
.loc 1 27 0
pcdata $0, $-1
pcdata $2, $-1
call runtime.morestack_noctxt(SB)
jmp αβ_pc0
Closures_func1_1_pc0_1:
.loc 1 8 0
text "".Closures.func1.1(SB), $16-0
movq (TLS), CX
cmpq SP, 16(CX)
jls Closures_func1_1_pc74_1
subq $16, SP
movq BP, 8(SP)
leaq 8(SP), BP
funcdata $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
funcdata $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
funcdata $3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
.loc 1 9 0
pcdata $2, $0
pcdata $0, $0
cmpq "".N(SB), $4
jne Closures_func1_1_pc49_1
Closures_func1_1_pc39_1:
pcdata $2, $-2
pcdata $0, $-2
movq 8(SP), BP
addq $16, SP
ret
Closures_func1_1_pc49_1:
.loc 1 10 0
pcdata $2, $0
pcdata $0, $0
call runtime.printlock(SB)
movq $1, (SP)
call runtime.printint(SB)
call runtime.printunlock(SB)
jmp Closures_func1_1_pc39_1
Closures_func1_1_pc74_1:
nop
.loc 1 8 0
pcdata $0, $-1
pcdata $2, $-1
call runtime.morestack_noctxt(SB)
jmp Closures_func1_1_pc0_1
Closures_func1_pc0:
.loc 1 7 0
text "".Closures.func1(SB), $16-0
movq (TLS), CX
cmpq SP, 16(CX)
jls Closures_func1_pc83
subq $16, SP
movq BP, 8(SP)
leaq 8(SP), BP
funcdata $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
funcdata $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
funcdata $3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
.loc 1 14 0
pcdata $2, $0
pcdata $0, $0
movq "".N(SB), AX
cmpq AX, $3
jeq Closures_func1_pc48
.loc 1 15 0
cmpq AX, $4
jne Closures_func1_pc58
Closures_func1_pc48:
pcdata $2, $-2
pcdata $0, $-2
movq 8(SP), BP
addq $16, SP
ret
Closures_func1_pc58:
pcdata $2, $0
pcdata $0, $0
call runtime.printlock(SB)
movq $1, (SP)
call runtime.printint(SB)
call runtime.printunlock(SB)
jmp Closures_func1_pc48
Closures_func1_pc83:
nop
.loc 1 7 0
pcdata $0, $-1
pcdata $2, $-1
call runtime.morestack_noctxt(SB)
jmp Closures_func1_pc0
| 20.826733 | 59 | 0.707392 |
6bd41b1a3a98193356df2d65738dba0821af6ce9 | 348 | asm | Assembly | Main.asm | krawchukd/Square-Root | 5ddfbf1e765beb750f2506f774a85d17d6808246 | [
"Apache-2.0"
] | null | null | null | Main.asm | krawchukd/Square-Root | 5ddfbf1e765beb750f2506f774a85d17d6808246 | [
"Apache-2.0"
] | null | null | null | Main.asm | krawchukd/Square-Root | 5ddfbf1e765beb750f2506f774a85d17d6808246 | [
"Apache-2.0"
] | null | null | null | # Test Main
.data
Test_Value:
.float 32.0
.text
.globl main
main:
#lwc1 $f0, Test_Value # Load input float into float register.
li $v0, 6
syscall
#mtc1 $v0, $f0
jal sqrt # Perform function and return value in $f0.
mov.s $f12, $f1 # Move from register
li $v0, 2 # Load print float instruction.
syscall # Perform system call.
| 14.5 | 62 | 0.66954 |
78dece492b5d0fa0441f3ae5ca2dac826434e05f | 7,548 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_1424.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_1424.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_1424.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r14
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x17413, %rsi
lea addresses_UC_ht+0x7193, %rdi
nop
nop
nop
nop
nop
add $21369, %r9
mov $8, %rcx
rep movsw
nop
sub %r12, %r12
lea addresses_A_ht+0xc5f3, %rdx
nop
nop
nop
nop
nop
sub %r10, %r10
movb (%rdx), %r9b
nop
nop
nop
nop
nop
sub %rsi, %rsi
lea addresses_WC_ht+0x1b7a3, %r9
nop
nop
nop
and $24074, %rsi
movw $0x6162, (%r9)
nop
nop
nop
add $6156, %rdx
lea addresses_A_ht+0x1ee13, %r12
nop
nop
nop
nop
nop
sub %r10, %r10
mov $0x6162636465666768, %rdi
movq %rdi, %xmm2
vmovups %ymm2, (%r12)
nop
nop
nop
nop
and %rcx, %rcx
lea addresses_WC_ht+0x1eb03, %rsi
lea addresses_WC_ht+0x1bd13, %rdi
nop
nop
cmp %r14, %r14
mov $35, %rcx
rep movsl
nop
sub $14356, %r12
lea addresses_A_ht+0x5013, %rdi
nop
nop
dec %r14
mov (%rdi), %r10
nop
nop
cmp %r9, %r9
lea addresses_WT_ht+0x15813, %r10
nop
add %rdx, %rdx
mov (%r10), %ecx
cmp $1063, %r12
lea addresses_D_ht+0x16013, %rsi
lea addresses_normal_ht+0x4813, %rdi
nop
nop
nop
nop
sub %r9, %r9
mov $84, %rcx
rep movsb
nop
nop
nop
add %r9, %r9
lea addresses_WT_ht+0x196ea, %r10
nop
nop
dec %r9
movw $0x6162, (%r10)
nop
nop
nop
add %r9, %r9
lea addresses_WC_ht+0x12dfb, %r9
nop
cmp $11602, %r14
mov (%r9), %rdx
nop
nop
nop
nop
nop
lfence
lea addresses_UC_ht+0xf013, %r14
nop
nop
xor $9585, %rsi
movb $0x61, (%r14)
sub $63795, %rdi
lea addresses_D_ht+0x19d13, %r12
nop
nop
cmp %r9, %r9
movl $0x61626364, (%r12)
nop
add $50845, %r14
lea addresses_normal_ht+0x4213, %rsi
lea addresses_WT_ht+0xbe13, %rdi
nop
dec %r10
mov $22, %rcx
rep movsq
nop
nop
nop
nop
cmp %r10, %r10
lea addresses_WT_ht+0x14c4b, %rsi
nop
nop
nop
nop
sub $60242, %r9
mov (%rsi), %di
nop
cmp $57002, %r12
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r14
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %rax
push %rdi
// Store
lea addresses_PSE+0x1ed13, %r12
nop
nop
nop
nop
inc %rdi
movl $0x51525354, (%r12)
nop
nop
nop
sub $28577, %r11
// Faulty Load
lea addresses_RW+0x6013, %rdi
nop
nop
and %rax, %rax
movb (%rdi), %r11b
lea oracles, %rax
and $0xff, %r11
shlq $12, %r11
mov (%rax,%r11,1), %r11
pop %rdi
pop %rax
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 10, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 3, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 11, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 6, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 3, 'size': 2, 'same': True, 'NT': False}}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
| 34 | 2,999 | 0.655008 |
71f203f79db4ca23d7879f146a68027771443ac1 | 494 | asm | Assembly | oeis/321/A321234.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/321/A321234.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/321/A321234.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A321234: Denominator of series expansion of the hypergeometric series 3F2([1/2, 1, 1], [3/2, 3/2], x).
; Submitted by Jon Maiga
; 1,9,75,245,2835,7623,39039,96525,1859715,4387955,20369349,46646691,422524375,947754675,4217257575,9316746045,327288272355,714666904875,3105965056425,6720018279975,57930003736605,124404851229945,532600050191625,1136728029829275,19356624110780775
mov $1,1
mov $2,$0
seq $0,1803 ; Numerators in expansion of (1 - x)^(-3/2).
add $1,$2
add $1,$2
mul $1,$0
mov $0,$1
| 41.166667 | 246 | 0.761134 |
f073ffa100bbbcb0a71a34fad24c19c961b692d0 | 6,692 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_591.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_591.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_591.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x13bb0, %rbp
xor %r9, %r9
movw $0x6162, (%rbp)
nop
inc %rax
lea addresses_WT_ht+0x6ab0, %r9
nop
nop
nop
nop
nop
sub %r12, %r12
movw $0x6162, (%r9)
nop
nop
and %r9, %r9
lea addresses_UC_ht+0x12230, %r9
nop
nop
nop
cmp $97, %rcx
and $0xffffffffffffffc0, %r9
movntdqa (%r9), %xmm6
vpextrq $1, %xmm6, %rax
nop
nop
nop
nop
dec %r9
lea addresses_UC_ht+0x6514, %rbp
nop
nop
nop
nop
dec %rax
and $0xffffffffffffffc0, %rbp
vmovntdqa (%rbp), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %r9
nop
dec %r9
lea addresses_normal_ht+0x112b8, %r11
cmp %r12, %r12
movl $0x61626364, (%r11)
sub %r9, %r9
lea addresses_normal_ht+0x1e370, %rdi
clflush (%rdi)
xor $58822, %r11
mov $0x6162636465666768, %r12
movq %r12, (%rdi)
nop
nop
nop
inc %rax
lea addresses_UC_ht+0x19ab0, %rsi
lea addresses_A_ht+0xf478, %rdi
nop
nop
nop
cmp %r11, %r11
mov $69, %rcx
rep movsb
nop
nop
nop
nop
dec %rbp
lea addresses_WT_ht+0x105d0, %rsi
nop
nop
nop
nop
xor $51936, %rdi
mov $0x6162636465666768, %r12
movq %r12, %xmm4
vmovups %ymm4, (%rsi)
nop
nop
add $6120, %rcx
lea addresses_WT_ht+0x9b20, %rbp
nop
nop
nop
nop
nop
add %rdi, %rdi
movw $0x6162, (%rbp)
cmp $27922, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r8
push %rax
push %rbp
push %rdi
push %rdx
// Store
lea addresses_A+0xa710, %r15
nop
nop
xor %rdi, %rdi
movw $0x5152, (%r15)
cmp $41566, %rdx
// Store
mov $0x27f2c00000001b0, %rdx
nop
nop
nop
nop
nop
add $54667, %r12
mov $0x5152535455565758, %rax
movq %rax, %xmm2
vmovups %ymm2, (%rdx)
nop
nop
nop
cmp %rbp, %rbp
// Faulty Load
lea addresses_WC+0x1cab0, %rdi
nop
nop
nop
nop
dec %r8
movb (%rdi), %al
lea oracles, %r8
and $0xff, %rax
shlq $12, %rax
mov (%r8,%rax,1), %rax
pop %rdx
pop %rdi
pop %rbp
pop %rax
pop %r8
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 8}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 10}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': True, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'LOAD', 'src': {'size': 32, 'NT': True, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': True, 'AVXalign': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'size': 8, 'NT': True, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 6}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 3}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'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
*/
| 36.172973 | 2,999 | 0.657053 |
d4cb2d9ed1361228555965a54a210e1c264696fc | 1,357 | asm | Assembly | NASM 64-bit/macros.asm | CosasDePuma/Aesthetic-Programming | 12b9d8beb326e3781068e40afd0c858e3e681a53 | [
"MIT"
] | 2 | 2017-08-25T23:56:18.000Z | 2017-08-28T12:46:17.000Z | NASM 64-bit/macros.asm | CosasDePuma/AestheticProgramming | 12b9d8beb326e3781068e40afd0c858e3e681a53 | [
"MIT"
] | null | null | null | NASM 64-bit/macros.asm | CosasDePuma/AestheticProgramming | 12b9d8beb326e3781068e40afd0c858e3e681a53 | [
"MIT"
] | null | null | null | ; _________________
; // \\
; || HOW TO COMPILE IT ||
; \\_________________//
;
; ------ x86_64 ------
; nasm -f elf64 macros.asm
; ld -s -o macros macros.o
;
; _________________
; // \\
; || DESCRIPTION ||
; \\_________________//
;
; The NASM "Hello, World!"
; using defined macros
;
; LEVEL: 01
; ASM: NASM 64-bit
; ENVS: Linux
; AUTHOR: CosasDePuma
; DATE: August, 7rd 2017
[BITS 64] ; BITS directive to specify 64-bit code
section .data ; CONSTANTS
msg db 'Hello, World!', 0xA ; message
msg_l equ $ - msg ; lenght of the message
section .bss ; VARIABLES
; MACROS are multi-line %define
; %macro shortcut_name num_of_params
; ... code here ...
; %1 = first param,
; %2 = second param
; %endmacro
; sys_write : show msg in stdout
; params : message, message_lenght
%macro sys_write 2
mov rax, 1
mov rdi, 1
mov rsi, %1
mov rdx, %2
syscall
%endmacro
; sys_exit : exit the program
; params : exit_status_code
%macro sys_exit 1
mov rax, 60
mov rdi, %1
syscall
%endmacro
section .text
global _start
_start:
sys_write msg, msg_l
sys_exit 0 | 22.245902 | 83 | 0.521739 |
1e4bc4fc90ab4146607dd8639cd8f56501b43a77 | 847 | asm | Assembly | oeis/154/A154628.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/154/A154628.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/154/A154628.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A154628: Primes congruent to 35 mod 73
; Submitted by Jon Maiga
; 181,619,911,1787,1933,2371,2663,3539,4561,4999,5437,7043,7481,7919,8941,9817,11131,11423,12007,13613,13759,14051,14197,14489,15073,15511,15803,17117,18869,19891,20183,21059,22811,23687,23833,24709,25147,25439,27191,27337,29527,29819,30403,30841,32009,33469,35221,35951,36097,36389,36973,38287,39163,40039,42083,42667,43397,43543,44273,44711,45587,46171,46901,47339,47777,48799,49529,50551,50989,51427,51719,53617,54347,54493,55661,55807,56099,57413,57559,58727,60041,60917,63691,64567,65881,66173
mov $1,10
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,24
sub $2,1
mov $3,$1
add $1,3
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,46
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
div $1,2
mul $1,2
mov $0,$1
sub $0,47
| 32.576923 | 498 | 0.728453 |
edcee1a7905d81c43bebc2fead9156f8f9f096da | 3,205 | asm | Assembly | ee/wman/scrow.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ee/wman/scrow.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ee/wman/scrow.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | * Scan visible rows of standard menu V1.01 1986 Tony Tebby QJUMP
*
section wman
*
xdef wm_scrow
*
include dev8_keys_wwork
include dev8_keys_wstatus
*
* d1 c pointer position relative to sub-window
* d2 s (word) on-screen row number
* d3 s (word) virtual row number
* d4 s (word) current hit area size
* d5 s (word) current hit area origin (relative to sub-window)
* d6 s (word) -1 down arrow row, 0 real item, +1 up arrow row
* d7 c origin of sub-window
* a0 c passed to row routine
* a1 c p address of row routine (called every row visible)
* a2 rs row list pointer
* a3 c p sub-window definition
* a4 c passed to row routine
*
wsr.fram equ $4
wsr_rcnt equ $0 row counter
wsr_nprt equ $2 position of number of part menus
*
wm_scrow
subq.l #wsr.fram,sp make room for frame
*
moveq #0,d2 visible row number
move.l wwa_part+wwa.clen(a3),d0 get part control pointer
beq.s wsr_uctrl ... uncontrolled
move.l d0,a2
move.w (a2)+,wsr_nprt(sp) set number of parts
ble.s wsr_uctrl ... none
wsr_loop
move.w wwa_iatt+wwa_curw(a3),d5 set origin of hit area
add.w (a2)+,d5 update origin
moveq #-1,d6 up arrow row
moveq #ww.scarr,d4 hit area size
move.w (a2)+,d3 real row number
jsr (a1) do row for up arrow
bne.s wsr_exit
*
add.w wwa_yoff(a3),d5 update origin
addq.w #1,d2 one more on-screen row
move.w (a2)+,wsr_rcnt(sp) set row counter
beq.s wsr_dnarr ... none
bsr.s wsr_section do a section
bne.s wsr_exit
*
wsr_dnarr
move.w (a2),d5 set arrow position
subq.w #1,wsr_nprt(sp) last section?
bgt.s wsr_dodn ... no
move.w wwa_ysiz(a3),d5 ... yes, arrows at bottom
wsr_dodn
moveq #1,d6 down arrow row
moveq #ww.scarr,d4 hit area size
sub.w wwa_iatt+wwa_curw(a3),d5 up a bit
subq.w #ww.scarr,d5
jsr (a1) do row for down arrow
bne.s wsr_exit
addq.w #1,d2 one more visible row
tst.w wsr_nprt(sp) done all sections?
bgt.s wsr_loop ... next
bra.s wsr_ok ... done
*
* uncontrolled window
*
wsr_uctrl
move.w wwa_yoff(a3),d5
add.w wwa_iatt+wwa_curw(a3),d5 set origin of hit area
moveq #0,d3 true row zero
move.w wwa_nrow(a3),wsr_rcnt(sp) set row counter
beq.s wsr_ok
bsr.s wsr_section
wsr_exit
addq.w #wsr.fram,sp remove frame
rts
wsr_ok
moveq #0,d0
bra.s wsr_exit
*
* do all rows in section
*
wsr_section
move.l a2,-(sp) save section pointer
stak_ext equ $8
moveq #0,d6 real row
move.l wwa_yspc(a3),d0 y spacing list
blt.s wsrs_cspc ... constant spacing
move.l d0,a2
moveq #0,d0
move.w d3,d0 row number
lsl.l #2,d0 in 2 word entries
add.l d0,a2 y spacing
wsrs_sloop
move.w (a2)+,d4 set hit size
jsr (a1) do row routine
bne.s wsrs_exit ... oops
addq.w #1,d2 next row
addq.w #1,d3 next row
add.w (a2)+,d5 move on hit area origin
subq.w #1,wsr_rcnt+stak_ext(sp) one fewer rows
bgt.s wsrs_sloop
bra.s wsrs_exit
wsrs_cspc
wsrs_cloop
move.w wwa_yspc(a3),d4 set hit size
neg.w d4 it was negative!
jsr (a1) do row routine
bne.s wsrs_exit ... oops
addq.w #1,d2 next row
addq.w #1,d3 next row
sub.w wwa_yspc+2(a3),d5 move on hit area origin
subq.w #1,wsr_rcnt+stak_ext(sp) one fewer rows
bgt.s wsrs_cloop
wsrs_exit
move.l (sp)+,a2 restore section pointer
rts
end
| 25.64 | 73 | 0.698908 |
ee97eeb99ae376cef242840a48985ed962fdb9f1 | 7,663 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_62.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_62.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_62.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x2c6b, %rsi
lea addresses_D_ht+0x86b, %rdi
clflush (%rsi)
nop
nop
nop
add $22507, %r9
mov $124, %rcx
rep movsq
nop
nop
nop
nop
sub $52688, %r11
lea addresses_UC_ht+0xcd6b, %rsi
lea addresses_WC_ht+0xa22b, %rdi
clflush (%rdi)
inc %rax
mov $51, %rcx
rep movsw
nop
nop
nop
cmp $55400, %rcx
lea addresses_A_ht+0x1b327, %rcx
dec %r8
mov (%rcx), %r11
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_D_ht+0x14dcb, %r8
nop
nop
xor %r9, %r9
movw $0x6162, (%r8)
nop
nop
nop
nop
add %r9, %r9
lea addresses_D_ht+0x4f23, %rax
sub $8476, %r8
and $0xffffffffffffffc0, %rax
vmovntdqa (%rax), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $1, %xmm6, %rdi
nop
add %rcx, %rcx
lea addresses_normal_ht+0xc9cb, %r8
nop
cmp $49518, %r9
movw $0x6162, (%r8)
nop
sub %rdi, %rdi
lea addresses_D_ht+0x1ae2b, %r8
inc %rcx
vmovups (%r8), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $1, %xmm6, %rdi
nop
nop
nop
nop
nop
sub %rax, %rax
lea addresses_D_ht+0x1e56b, %rdi
nop
nop
nop
nop
nop
add $50986, %rcx
movb $0x61, (%rdi)
nop
nop
add %rsi, %rsi
lea addresses_normal_ht+0x1116b, %rsi
lea addresses_A_ht+0x5f6b, %rdi
nop
add %r8, %r8
mov $29, %rcx
rep movsw
nop
inc %rsi
lea addresses_A_ht+0x1706b, %rsi
lea addresses_A_ht+0x1ab93, %rdi
nop
nop
nop
sub $27632, %r9
mov $67, %rcx
rep movsw
nop
nop
nop
nop
nop
cmp %r9, %r9
lea addresses_UC_ht+0x1d76b, %r9
add $38091, %rsi
mov (%r9), %edi
nop
nop
nop
nop
cmp %rdi, %rdi
lea addresses_A_ht+0xd26b, %rsi
lea addresses_D_ht+0x12eeb, %rdi
nop
xor $43550, %r10
mov $101, %rcx
rep movsw
cmp %r9, %r9
lea addresses_D_ht+0x1b54b, %rsi
lea addresses_WC_ht+0x61eb, %rdi
nop
nop
nop
nop
and $23505, %r10
mov $57, %rcx
rep movsw
nop
nop
nop
sub $50569, %r11
lea addresses_A_ht+0x17521, %rsi
lea addresses_WT_ht+0xf02b, %rdi
nop
nop
nop
nop
nop
inc %r11
mov $27, %rcx
rep movsb
nop
nop
nop
nop
nop
sub %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r15
push %rax
push %rbx
push %rdi
push %rdx
push %rsi
// Faulty Load
lea addresses_PSE+0x556b, %r15
nop
nop
nop
nop
nop
xor $63462, %rax
vmovups (%r15), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %rdi
lea oracles, %rbx
and $0xff, %rdi
shlq $12, %rdi
mov (%rbx,%rdi,1), %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rbx
pop %rax
pop %r15
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_WC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 7}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_A_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 9}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}, 'dst': {'same': True, 'congruent': 7, 'type': 'addresses_D_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
| 34.674208 | 2,999 | 0.658228 |
86b60e8369a437351ee26262e7081419368a1f9d | 471 | asm | Assembly | oeis/133/A133541.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/133/A133541.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/133/A133541.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A133541: Sum of fifth powers of five consecutive primes.
; Submitted by Jon Maiga
; 181258,552519,1972133,4445107,10864643,31214741,59472599,127396699,240776801,381348901,590182759,979749101,1625329443,2354069543,3557186207,5132070551,6786946651,9149078751,12243523093,16477457435
mov $3,5
mov $4,$0
lpb $3
mov $0,$4
sub $3,1
add $0,$3
max $0,0
seq $0,153484 ; a(n) = prime(n)^5 - 128.
cmp $2,$3
add $2,1
mul $2,$0
add $1,$2
lpe
mov $0,$1
add $0,640
| 23.55 | 198 | 0.707006 |
a1d40c54a37c469d187e584d7bccd867817f277d | 779 | asm | Assembly | oeis/042/A042103.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | null | null | null | oeis/042/A042103.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | null | null | null | oeis/042/A042103.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | null | null | null | ; A042103: Denominators of continued fraction convergents to sqrt(575).
; Submitted by Christian Krause
; 1,1,47,48,2255,2303,108193,110496,5191009,5301505,249060239,254361744,11949700463,12204062207,573336561985,585540624192,27508205274817,28093745899009,1319820516629231,1347914262528240,63323876592928271,64671790855456511,3038226255943927777,3102898046799384288,145771536408715605025,148874434455514989313,6993995521362405113423,7142869955817920102736,335566013488986729839279,342708883444804649942015,16100174651950000627171969,16442883535394805277113984,772472817280111043374415233
add $0,1
mov $3,1
lpb $0
sub $0,1
add $3,$1
add $2,$3
mov $3,$1
mov $1,$2
dif $2,2
mod $2,$1
mul $2,15
add $3,$1
add $3,$1
add $3,$2
mov $2,$1
lpe
dif $2,4
mov $0,$2
| 33.869565 | 483 | 0.797176 |
5fa0c4eebb4a852e7f951e71fd399936a7da0745 | 705 | asm | Assembly | cards/bn4/ModCards/134-E016 AllGuard 12 (0C).asm | RockmanEXEZone/MMBN-Mod-Card-Kit | d591ddca5566dbb323dc19c11e69410fa4073d1b | [
"Unlicense"
] | 10 | 2017-12-05T14:25:38.000Z | 2022-02-21T04:28:00.000Z | cards/bn4/ModCards/134-E016 AllGuard 12 (0C).asm | RockmanEXEZone/MMBN-Mod-Card-Kit | d591ddca5566dbb323dc19c11e69410fa4073d1b | [
"Unlicense"
] | null | null | null | cards/bn4/ModCards/134-E016 AllGuard 12 (0C).asm | RockmanEXEZone/MMBN-Mod-Card-Kit | d591ddca5566dbb323dc19c11e69410fa4073d1b | [
"Unlicense"
] | null | null | null | .include "defaults_mod.asm"
table_file_jp equ "exe4-utf8.tbl"
table_file_en equ "bn4-utf8.tbl"
game_code_len equ 3
game_code equ 0x4234574A // B4WJ
game_code_2 equ 0x42345745 // B4WE
game_code_3 equ 0x42345750 // B4WP
card_type equ 1
card_id equ 76
card_no equ "076"
card_sub equ "Mod Card 076"
card_sub_x equ 64
card_desc_len equ 3
card_desc_1 equ "Address 0C"
card_desc_2 equ "AllGuard 1/2"
card_desc_3 equ "Buggy"
card_name_jp_full equ "オールガード1/2"
card_name_jp_game equ "オールガード1/2"
card_name_en_full equ "AllGuard 1/2"
card_name_en_game equ "AllGuard 1/2"
card_address equ "0C"
card_address_id equ 2
card_bug equ 1
card_wrote_en equ "AllGuard 1/2"
card_wrote_jp equ "オールガード1/2" | 26.111111 | 36 | 0.77305 |
6cd74be57f02fd1968ef2f0c5afac07b8bed98fd | 1,420 | asm | Assembly | Satellite Decryption/03-Number-Subroutine/print.asm | JaredsOSToolbox/AssemblerPrograms | a9158c5b135689ec39c71944c121d65a61d8a6b4 | [
"MIT"
] | null | null | null | Satellite Decryption/03-Number-Subroutine/print.asm | JaredsOSToolbox/AssemblerPrograms | a9158c5b135689ec39c71944c121d65a61d8a6b4 | [
"MIT"
] | null | null | null | Satellite Decryption/03-Number-Subroutine/print.asm | JaredsOSToolbox/AssemblerPrograms | a9158c5b135689ec39c71944c121d65a61d8a6b4 | [
"MIT"
] | null | null | null | ; Our Macros
%define SYS_EXIT 60
%define SYS_READ 0
%define SYS_WRITE 1
%define SYS_OPEN 2
%define SYS_CLOSE 3
%define STDOUT 1
%define SYS_CREATE 85
%define BUFFER_SIZE 180
section .text
; input is rsi, len is rdx
; print(content=rsi, strlen=rdx)
print:
push rax
push rdi
mov rax, SYS_WRITE
mov rdi, 1
syscall
pop rdi
pop rax
ret
; printDoubleWord(eax)
printDWord:
push r8
mov r8, 7 ; i
mov rbx, 0
printloop:
cmp r8, 0
jz printexit
xor edx, edx
div dword [ten] ; rem in edx
add edx, '0'
mov byte [small_buffer + r8], dl
inc rbx
cmp eax, 0
jz printexit
dec r8
jmp printloop
printexit:
lea rax, [small_buffer + r8]
pop r8
ret
; Convert dword endian...
; eax has value to convert
; Will return converted value in eax
; cvtEndian(eax)
cvtEndian:
push rbx
push rcx
mov ebx, eax
shr ebx, 24
mov ecx, ebx
mov ebx, eax
shr ebx, 8
and ebx, 0xff00
or ecx, ebx
mov ebx, eax
shl ebx, 0x8
and ebx, 0xff0000
or ecx, ebx
mov ebx, eax
shl ebx, 0x18
or ecx, ebx
mov eax, ecx
pop rcx
pop rbx
ret
section .data
xlat_table: db "0123456789", 10
ten dd 10
section .bss
small_buffer resb 8
| 17.317073 | 47 | 0.55493 |
6d58190e79e70d740c6a051fed043722f7bc4632 | 1,218 | asm | Assembly | src/elf.asm | edwardatki/eDOS | 44c1eb7bc720a5e611454aee385191fcfcb088a9 | [
"MIT"
] | 1 | 2017-02-13T21:28:01.000Z | 2017-02-13T21:28:01.000Z | src/elf.asm | edwardatki/eDOS | 44c1eb7bc720a5e611454aee385191fcfcb088a9 | [
"MIT"
] | 2 | 2017-02-09T21:23:44.000Z | 2017-05-11T19:05:52.000Z | src/elf.asm | edwardatki/eDOS | 44c1eb7bc720a5e611454aee385191fcfcb088a9 | [
"MIT"
] | null | null | null | %define IMAGE_RMODE_BASE 0x00003000
%define IMAGE_PMODE_BASE 0x00100000
[bits 16]
LoadELF:
mov si, FILENAME
mov bx, 0x0000
mov ax, IMAGE_RMODE_BASE/10
call Disk.GetFile
; Check magic ELF double word
mov edx, [MagicELF]
push ds
mov ax, IMAGE_RMODE_BASE/10
mov ds, ax
mov eax, [0x0]
cmp eax, edx
jne ELFError
; Get and store entry point
mov eax, [20]
bswap eax
; Get beginning of program header
mov ebx, [0x1C]
bswap ebx
; Get text section offset
mov edx, [ebx+4] ; This causes an error for some reason
bswap edx
pop ds
mov [EntryPoint], eax
mov [TextOffset], edx
ret
ELFError:
pop ds
mov si, ELFErrorMsg
call Print
cli
hlt
MagicELF: dd 0x464C457F
ELFErrorMsg: db "Invalid ELF File!", 0x0A, 0x0D, 0
EntryPoint: dd 0
TextOffset: dd 0
ImageSize: dw 1
[bits 32]
MoveELF:
mov eax, DWORD [ImageSize] ; Image size in sectors
movzx ebx, WORD [0x7C00 + 11] ; Bytes per sector
mul ebx
mov ebx, 4
div ebx
cld
mov esi, IMAGE_RMODE_BASE ; Current image location
mov edi, IMAGE_PMODE_BASE ; Target Location
mov ecx, eax
rep movsd ; Copy image to its protected mode address
ret | 18.454545 | 74 | 0.663383 |
2764c2e8fd2502ae4849677bb9da480266fae979 | 604 | asm | Assembly | oeis/088/A088892.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/088/A088892.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/088/A088892.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A088892: Polynexus numbers of order 14.
; 0,1,291,16096,356232,4411517,36621423,227095448,1128128568,4708376529,17078744419,55199550120,161993768080,438011626365,1103841220991,2616890599056,5880356075792,12602902382337,25897027973187,51245013077968,98017089897528,181801058663389,327900796771119,576488632394984,990060003751560,1664045892471185,2741698072540611,4434684413823576,7051227890467456,11034106674249117,17011418511648127,25863717063285408,38811969540072608,57531784405703553,84300537974368739,122185414657840704,175281995209413480
seq $0,22530 ; Nexus numbers (n+1)^14 - n^14.
div $0,16380
| 100.666667 | 501 | 0.880795 |
8b4368e1aa552aa1755b40fa89da0833f9ab8dac | 14,025 | asm | Assembly | libraries/__temp.asm | paulscottrobson/z80-machine-forth | f149dc7b2e7f077c9b920b1202ba00fd32aeb1df | [
"MIT"
] | null | null | null | libraries/__temp.asm | paulscottrobson/z80-machine-forth | f149dc7b2e7f077c9b920b1202ba00fd32aeb1df | [
"MIT"
] | 1 | 2019-03-03T21:00:30.000Z | 2020-07-02T09:18:04.000Z | libraries/__temp.asm | paulscottrobson/z80-machine-forth | f149dc7b2e7f077c9b920b1202ba00fd32aeb1df | [
"MIT"
] | null | null | null |
org $86ec
sys_displayinformation = $86ca
sys_gfx_setmode = $80a6
sys_gfx_write = $80d0
sys_gfx_writehex = $80e3
sys_macroexpander = $809b
sys_page_restore = $8052
sys_page_switch = $8039
sys_systeminformation = $86b6
; *********************************************************************************************
; *********************************************************************************************
;
; Name : core.asm
; Date : 10th January 2019
; Author : Paul Robson (paul@robsons.org.uk)
; Purpose : Core words for the Machine Forth system
;
; *********************************************************************************************
; *********************************************************************************************
;
; Notes : TOS cached in DE
; A is HL
; No real return stack.
; * implemented directly.
;
; Missing : ; handled by compiler
; pop/push short term working stack, seperate.
; @R+,!R+ make no sense because of single stack.
;
; To Add : b versions of !a !a+ @a @a+ @ ! , port access functions.
;
; *********************************************************************************************
; *********************************************************************************************
; @a+ read A and increment
; *********************************************************************************************
; ----- @a+ macro -----
define_macro_40_61_2b:
db 0,0
call sys_macroexpander
db end_40_61_2b-start_40_61_2b
start_40_61_2b:
push de ; save current TOS
ld e,(hl) ; read new TOS
inc hl
ld d,(hl)
inc hl
end_40_61_2b:
; *********************************************************************************************
; @a read A
; *********************************************************************************************
; ----- @a macro -----
define_macro_40_61:
db 0,0
call sys_macroexpander
db end_40_61-start_40_61
start_40_61:
push de ; save current TOS
ld e,(hl) ; read new TOS
inc hl
ld d,(hl)
dec hl
end_40_61:
; *********************************************************************************************
; !a+ write TOS to A and increment
; *********************************************************************************************
; ----- !a+ macro -----
define_macro_21_61_2b:
db 0,0
call sys_macroexpander
db end_21_61_2b-start_21_61_2b
start_21_61_2b:
ld (hl),e ; write out
inc hl
ld (hl),d
inc hl
pop de ; update TOS
end_21_61_2b:
; *********************************************************************************************
; !a write TOS to A
; *********************************************************************************************
; ----- !a macro -----
define_macro_21_61:
db 0,0
call sys_macroexpander
db end_21_61-start_21_61
start_21_61:
ld (hl),e ; write out
inc hl
ld (hl),d
dec hl
pop de ; update TOS
end_21_61:
; *********************************************************************************************
; com one's complement
; *********************************************************************************************
; ----- com wordr -----
define_word_63_6f_6d:
ld a,d
cpl
ld d,a
ld a,e
cpl
ld e,a
ret
; *********************************************************************************************
; 2* double TOS
; *********************************************************************************************
; ----- 2* macro -----
define_macro_32_2a:
db 0,0
call sys_macroexpander
db end_32_2a-start_32_2a
start_32_2a:
ex de,hl
add hl,hl
ex de,hl
end_32_2a:
; *********************************************************************************************
; 2/ halve TOS unsigned
; *********************************************************************************************
; ----- 2/ macro -----
define_macro_32_2f:
db 0,0
call sys_macroexpander
db end_32_2f-start_32_2f
start_32_2f:
srl d
rr e
end_32_2f:
; *********************************************************************************************
; * multiplier
; *********************************************************************************************
; ----- * wordx -----
define_word_2a:
pop ix
pop bc ; multiplicand.
push hl ; save A
ld hl,$0000 ; result.
__multiply_loop:
bit 0,c ; check bit 0.
jr z,__multiply_noadd ; don't add if 0
add hl,de ; add to total
__multiply_noadd:
ex de,hl ; shift DE left
add hl,hl
ex de,hl ; shift BC right
srl b
rr c
ld a,b ; go back if not done
or c
jr nz,__multiply_loop
ex de,hl ; result in DE (top of stack)
pop hl ; restore A
jp (ix)
; *********************************************************************************************
; -or exclusive OR
; *********************************************************************************************
; ----- -or wordx -----
define_word_2d_6f_72:
pop ix
pop bc
ld a,d
xor b
ld d,a
ld a,e
xor c
ld e,a
jp (ix)
; *********************************************************************************************
; and logical AND
; *********************************************************************************************
; ----- and wordx -----
define_word_61_6e_64:
pop ix
pop bc
ld a,d
and b
ld d,a
ld a,e
and c
ld e,a
jp (ix)
; *********************************************************************************************
; + add
; *********************************************************************************************
; ----- + macro -----
define_macro_2b:
db 0,0
call sys_macroexpander
db end_2b-start_2b
start_2b:
ex de,hl
pop bc
add hl,bc
ex de,hl
end_2b:
; *********************************************************************************************
; A@ copy A to stack
; *********************************************************************************************
; ----- A@ macro -----
define_macro_41_40:
db 0,0
call sys_macroexpander
db end_41_40-start_41_40
start_41_40:
push de ; save old TOS
ld e,l ; copy A into TOS
ld d,h
end_41_40:
; *********************************************************************************************
; dup Duplicate TOS
; *********************************************************************************************
; ----- dup macro -----
define_macro_64_75_70:
db 0,0
call sys_macroexpander
db end_64_75_70-start_64_75_70
start_64_75_70:
push de
end_64_75_70:
; *********************************************************************************************
; over, 2nd copied to TOS.
; *********************************************************************************************
; ----- over macro -----
define_macro_6f_76_65_72:
db 0,0
call sys_macroexpander
db end_6f_76_65_72-start_6f_76_65_72
start_6f_76_65_72:
pop bc ; 2nd on stack
push bc ; put back
push de ; save TOS
ld e,b ; copy 2nd value into DE
ld d,c
end_6f_76_65_72:
; *********************************************************************************************
; A! copy stack to A
; *********************************************************************************************
; ----- A! macro -----
define_macro_41_21:
db 0,0
call sys_macroexpander
db end_41_21-start_41_21
start_41_21:
ex de,hl ; TOS in HL
pop de ; update TOS
end_41_21:
; *********************************************************************************************
; drop Drop TOS
; *********************************************************************************************
; ----- drop macro -----
define_macro_64_72_6f_70:
db 0,0
call sys_macroexpander
db end_64_72_6f_70-start_64_72_6f_70
start_64_72_6f_70:
pop de
end_64_72_6f_70:
; *********************************************************************************************
; *********************************************************************************************
;
; Name : standard.asm
; Date : 10th January 2019
; Author : Paul Robson (paul@robsons.org.uk)
; Purpose : Normal macro words for the Machine Forth system
;
; *********************************************************************************************
; *********************************************************************************************
; *********************************************************************************************
; @ indirect read
; *********************************************************************************************
; ----- @ macro -----
define_macro_40:
db 0,0
call sys_macroexpander
db end_40-start_40
start_40:
ex de,hl ; address to HL
ld e,(hl) ; read it
inc hl
ld d,(hl)
dec hl
end_40:
; *********************************************************************************************
; ! indirect write
; *********************************************************************************************
; ----- ! macro -----
define_macro_21:
db 0,0
call sys_macroexpander
db end_21-start_21
start_21:
ex de,hl ; address to HL
pop de ; data to DE
ld (hl),e ; write it
inc hl
ld (hl),d
pop de ; fix up TOS
end_21:
; *********************************************************************************************
; or logical OR
; *********************************************************************************************
; ----- or wordx -----
define_word_6f_72:
pop ix
pop bc
ld a,d
or b
ld d,a
ld a,e
or c
ld e,a
jp (ix)
; *********************************************************************************************
; swap exchange top 2
; *********************************************************************************************
; ----- swap macro -----
define_macro_73_77_61_70:
db 0,0
call sys_macroexpander
db end_73_77_61_70-start_73_77_61_70
start_73_77_61_70:
ex de,hl ; HL = tos
ex (sp),hl ; swap it
ex de,hl ; fix up
end_73_77_61_70:
; *********************************************************************************************
; *********************************************************************************************
;
; Name : extensions.asm
; Date : 10th January 2019
; Author : Paul Robson (paul@robsons.org.uk)
; Purpose : Core extensions
;
; *********************************************************************************************
; *********************************************************************************************
; *********************************************************************************************
; b@a+ read byte A and increment
; *********************************************************************************************
; ----- b@a+ macro -----
define_macro_62_40_61_2b:
db 0,0
call sys_macroexpander
db end_62_40_61_2b-start_62_40_61_2b
start_62_40_61_2b:
push de ; save current TOS
ld e,(hl) ; read new TOS
inc hl
ld d,$00
end_62_40_61_2b:
; *********************************************************************************************
; b@a byte read A
; *********************************************************************************************
; ----- b@a macro -----
define_macro_62_40_61:
db 0,0
call sys_macroexpander
db end_62_40_61-start_62_40_61
start_62_40_61:
push de ; save current TOS
ld e,(hl) ; read new TOS
ld d,$00
end_62_40_61:
; *********************************************************************************************
; b!a+ byte write TOS to A and increment
; *********************************************************************************************
; ----- b!a+ macro -----
define_macro_62_21_61_2b:
db 0,0
call sys_macroexpander
db end_62_21_61_2b-start_62_21_61_2b
start_62_21_61_2b:
ld (hl),e ; write out
inc hl
pop de ; update TOS
end_62_21_61_2b:
; *********************************************************************************************
; b!a byte write TOS to A
; *********************************************************************************************
; ----- b!a macro -----
define_macro_62_21_61:
db 0,0
call sys_macroexpander
db end_62_21_61-start_62_21_61
start_62_21_61:
ld (hl),e ; write out
pop de ; update TOS
end_62_21_61:
; *********************************************************************************************
; b@ byte indirect read
; *********************************************************************************************
; ----- b@ macro -----
define_macro_62_40:
db 0,0
call sys_macroexpander
db end_62_40-start_62_40
start_62_40:
ex de,hl ; address to HL
ld e,(hl) ; read it
ld d,$00
end_62_40:
; *********************************************************************************************
; b! byte indirect write
; *********************************************************************************************
; ----- b! macro -----
define_macro_62_21:
db 0,0
call sys_macroexpander
db end_62_21-start_62_21
start_62_21:
ex de,hl ; address to HL
pop de ; data to DE
ld (hl),e ; write it
pop de ; fix up TOS
end_62_21:
; *********************************************************************************************
; nip drop second on stack
; *********************************************************************************************
; ----- nip macro -----
define_macro_6e_69_70:
db 0,0
call sys_macroexpander
db end_6e_69_70-start_6e_69_70
start_6e_69_70:
pop bc
end_6e_69_70:
| 25.972222 | 95 | 0.325704 |
6cfe5b92c183418563ee7297902a132e0f7152b9 | 650 | asm | Assembly | oeis/097/A097844.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/097/A097844.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/097/A097844.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A097844: Chebyshev polynomials S(n,171).
; Submitted by Jamie Morken(s2)
; 1,171,29240,4999869,854948359,146191169520,24997835039561,4274483600595411,730911697866775720,124981625851618052709,21371127108928820237519,3654337754000976642563040,624870384807058077058042321,106849181464252930200282673851,18270585160002444006171279186200,3124163213178953672125088458166349,534213638868441075489383955067259479,91347408083290244955012531228043204560,15619872568603763446231653456040320720281,2670906861823160259060657728451666799963491
mul $0,2
add $0,1
mov $3,1
lpb $0
sub $0,1
mov $2,$3
mul $3,13
add $3,$1
mov $1,$2
lpe
mov $0,$3
div $0,13
| 38.235294 | 456 | 0.846154 |
83c0a6ef0ece5610e69c015e4b13abbcd722b3ba | 503 | asm | Assembly | programs/oeis/155/A155091.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/155/A155091.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/155/A155091.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A155091: Triangle read by rows. Signed version of A145362. Main diagonal positive, rest of the nonzero terms negative.
; 1,-1,1,0,-1,1,0,-1,-1,1,0,0,-1,-1,1,0,0,-1,-1,-1,1,0,0,0,-1,-1,-1,1,0,0,0,-1,-1,-1,-1,1,0,0,0,0,-1,-1,-1,-1,1,0,0,0,0,-1,-1,-1,-1,-1,1,0,0,0,0,0,-1,-1,-1,-1,-1,1,0,0,0,0,0,-1,-1,-1,-1,-1,-1,1,0,0,0,0,0,0,-1,-1
seq $0,176808 ; Triangle read by rows: T(n,m)=Floor[(n - 1)/m], 1<=m<=n.
mov $1,3
mul $1,$0
mul $0,2
sub $0,$1
mov $1,$0
mov $0,1
mov $2,$1
cmp $2,0
add $1,$2
div $0,$1
| 33.533333 | 211 | 0.544732 |
f389fdf2c038271f2837eb093625ae19a84a57c0 | 863 | asm | Assembly | oeis/142/A142606.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/142/A142606.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/142/A142606.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A142606: Primes congruent to 7 mod 55.
; Submitted by Jon Maiga
; 7,227,337,557,887,997,1217,1327,1657,1877,1987,2207,2647,3307,3527,3637,3967,4297,4517,4957,5507,6277,6607,6827,7487,7817,7927,8147,8807,9137,9467,9907,10457,10567,11117,11447,11777,11887,12107,12437,12547,13537,13757,14087,14197,14747,15077,15187,15737,16067,17167,17387,17497,17827,18047,19037,19477,19697,20357,21017,21347,21787,22447,22777,23327,23767,24097,24317,24977,25087,25307,25747,26297,26407,26627,26737,27067,27397,27617,27947,28057,28277,28387,28607,29927,30367,30697,31247,31357,31687
mov $1,2
mov $2,$0
add $2,13
pow $2,2
mov $4,3
lpb $2
sub $2,1
mov $3,$1
add $1,$4
mul $3,$4
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,53
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
mul $4,2
lpe
mov $0,$1
mul $0,2
sub $0,109
| 31.962963 | 501 | 0.718424 |
277a419c19ff16d8b8e2e251892ebbd5cc5a6811 | 2,312 | asm | Assembly | programs/oeis/017/A017516.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/017/A017516.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/017/A017516.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A017516: a(n) = (11*n + 10)^8.
; 100000000,37822859361,1099511627776,11688200277601,72301961339136,318644812890625,1113034787454976,3282116715437121,8507630225817856,19925626416901921,42998169600000000,86730203469006241,165312903998914816,300283484326400961,523300059815673856,879638824462890625,1432529432742502656,2268453123948987361,3503536769037500416,5291184662917065441,7831098528100000000,11379844838561358721,16263137215612256256,22890010290541014721,31769070071726162176,43527014496875390625,58929626493994663936,78905450517641748001,104572372169968517376,137267329159006474561,178579390489600000000,230386449425341932801,294895784402816164096,374688750722402006881,472769874482845188096,592620628869750390625,738258181551100354816,914299410575856631041,1126030494814647156736,1379482393624495913281,1681512539062500000000,2039893072616309544481,2463405967062215950336,2961945382704604065441,3546627615893473935616,4229909006359687890625,5025712178550548791296,5949561000791265348481,7018724654740810506496,8252371216253628965601,9671731157401600000000,11300271188053611809761,13163878864053053726976,15291058397676482678401,17713138114699670388736,20464490011040187890625,23582761870588633989376,27109122414483564412321,31088519960728128454656,35569955081689370015521,40606767755664100000000,46256939517338197144641,52583411120609144406016,59654416235884558133761,67543831712612417331456,76331544946441650390625,86103838899054686765056,96953795327356531134561,108981716787347867689216,122295567986652652247041,137011437068313600000000,153254017417111926765121,171157110588310651699456,190864150967363719519521,212528752777776150347776,236315280062943375390625,262399440276440866734336,290968902123878119627201,322223938308073995698176,356378093837953385644161,393658880570208100000000,434308498661407846687201,478584585616890104119296,526760993631400648723681,579128595925099445821696,635996122787189562890625,697691028048069714313216,764560386709553996802241,836971824471345324769536,915314479900592024990881,1000000000000000000000000,1091463569938615819726881,1190164977718039050977536,1296589714555465084434241,1411250111773602668937216,1534686514996153312890625,1667468496456182662717696,1810196106233356918371681,1963501163244660295991296,2128048586821852497871201
mul $0,11
add $0,10
pow $0,8
| 330.285714 | 2,248 | 0.942474 |
7d7e411254043b23a005c74f1a3b13f2cf5a91dc | 1,210 | nasm | Assembly | xor-ror-feedback-decoder.nasm | Re4son/slae-assignment4 | 42eaa675360082a4270cd172f5e5d627627d401a | [
"Unlicense"
] | 3 | 2018-05-01T16:47:41.000Z | 2021-10-17T00:22:07.000Z | xor-ror-feedback-decoder.nasm | Re4son/slae-assignment4 | 42eaa675360082a4270cd172f5e5d627627d401a | [
"Unlicense"
] | null | null | null | xor-ror-feedback-decoder.nasm | Re4son/slae-assignment4 | 42eaa675360082a4270cd172f5e5d627627d401a | [
"Unlicense"
] | 1 | 2021-10-17T00:22:11.000Z | 2021-10-17T00:22:11.000Z | ; Filename: xor-ror-feedback-decoder.nasm
; Author: Re4son re4son [at] whitedome.com.au
; Purpose: XOR-ROR feedback encoder
global _start
section .text
_start:
cld ; zero out edx
mov dl, 0x2c ; initial key is used to find end of encoded shellcode
push edx ; and used as initial xor key
jmp call_decoder ; jmp / call/ pop
decoder:
pop esi ; jmp, call, pop
pop eax ; use key as initial xor vector
decode:
mov byte cl,[esi] ; encoded byte will define no of ror rotations of key for next xor
xor byte [esi], al ; xor current byte with vector
cmp byte [esi], dl ; have we decoded the end of shellcode string?
jz shellcode ; if so, execute the shellcode
mov al, byte [esi] ; decrypted byte will be the base for rotation to get key for next xor
add ecx, edx ; add initial key to ecx
ror al, cl ; rotate decrypted left byte times (encrypted left byte * initialisation vector)
inc esi ; move to the next byte
jmp short decode ; loop until entire shellcode is decoded
call_decoder:
call decoder ; jmp / call / pop
shellcode: db 0x1d,0x58,0x5c,0x38,0xa9,0x56,0xb8,0x5f,0x65,0x1b,0x3c,0x0b,0xbc,0xe7,0xd2,0xdf,0x83,0xf1,0x44,0xda,0xc7,0x8c,0xbb,0xdb,0x1b,0x2d | 43.214286 | 143 | 0.717355 |
3c4505b8c6fc0643a1c95516bd66bd8120c2d505 | 3,505 | asm | Assembly | nsf.asm | furrykef/nesadpcm | 2e5e189ef288ed4dbd888f32b6c58fdba1f3ad2a | [
"CC0-1.0"
] | 2 | 2015-03-07T18:25:15.000Z | 2015-11-06T21:37:36.000Z | nsf.asm | furrykef/nesadpcm | 2e5e189ef288ed4dbd888f32b6c58fdba1f3ad2a | [
"CC0-1.0"
] | null | null | null | nsf.asm | furrykef/nesadpcm | 2e5e189ef288ed4dbd888f32b6c58fdba1f3ad2a | [
"CC0-1.0"
] | null | null | null | ; Demo sounds:
; 1: Homer Simpson from The Simpsons
; 2: The Scout from Team Fortress 2
; 3: Donkey Kong from Mario Kart 64
; 4: "Make your selection now" from Action 53, voiced by tepples
; 5: Drum loop from Sgt. Pepper Reprise by The Beatles
.include "adpcm.asm"
.segment "HEADER"
.byte 'N', 'E', 'S', 'M', $1A ; ID
.byte $01 ; Version
.byte 7 ; Number of songs
.byte 1 ; Start song
.word $8000
.word INIT
.word PLAY
.byte "ADPCM demo",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte "Kef Schecter",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte "CC0 (code only)",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.word $411A ; NTSC speed
.byte 0, 1, 2, 3, 4, 5, 6, 7 ; Bank values
.word 0 ; PAL speed
.byte 0 ; Flags, NTSC only
.byte 0
.byte 0,0,0,0 ; Reserved
.segment "ZEROPAGE"
SongID: .res 1
Done: .res 1
.segment "CODE"
INIT:
sta SongID
tax
ldy SampleBankTbl,x
sty $5ff9 ; set up banks
iny
sty $5ffa
iny
sty $5ffb
iny
sty $5ffc
iny
sty $5ffd
iny
sty $5ffe
iny
sty $5fff
asl ; indexing into table of 16-bit values
tax
lda SampleAddrTbl,x
sta SampleAddrLSB
lda SampleLenTbl,x
sta SampleBytesLeftLSB
inx
lda SampleAddrTbl,x
sta SampleAddrMSB
lda SampleLenTbl,x
sta SampleBytesLeftMSB
lda #0
sta Done
rts
PLAY:
lda Done
bne @done
jsr PlayAdpcm
ldx SongID
lda SampleLoopTbl,x
beq @done ; if sample desn't loop, well, don't loop
; sample loops
lda SongID
jsr INIT
rts
@done:
lda #1
sta Done
rts
SampleAddrTbl:
.word Sample1
.word Sample2
.word Sample3
.word Sample4
.word Sample5
.word Sample6
.word Sample7
SampleBankTbl:
.byte 1
.byte 8
.byte 8
.byte 8
.byte 8
.byte 15
.byte 22
SampleLenTbl:
.word Sample1Len
.word Sample2Len
.word Sample3Len
.word Sample4Len
.word Sample5Len
.word Sample6Len
.word Sample7Len
SampleLoopTbl:
.byte 0
.byte 0
.byte 0
.byte 0
.byte 1
.byte 0
.byte 0
.segment "ADPCM0"
Sample1:
.incbin "raws/kablammo-8948.raw"
Sample1Len = * - Sample1
.segment "ADPCM1"
Sample2:
.incbin "raws/scout-8948.raw"
Sample2Len = * - Sample2
Sample3:
.incbin "raws/dk-roar-8948.raw"
Sample3Len = * - Sample3
Sample4:
.incbin "raws/selnow-8948.raw"
Sample4Len = * - Sample4
Sample5:
.incbin "raws/beatles-8948.raw"
Sample5Len = * - Sample5
.segment "ADPCM2"
Sample6:
.incbin "raws/fart1-8948.raw"
Sample6Len = * - Sample6
.segment "ADPCM3"
Sample7:
.incbin "raws/fart2-8948.raw"
Sample7Len = * - Sample7
| 21.90625 | 85 | 0.4699 |
3c8d99b47b01ed802c973e2c82b53f219c4b1fdf | 532 | asm | Assembly | oeis/347/A347870.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/347/A347870.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/347/A347870.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A347870: a(n) = A003415(sigma(n)) mod 2, where A003415 is the arithmetic derivative, and sigma is the sum of divisors of n.
; 0,1,0,1,1,0,0,0,1,1,0,0,1,0,0,1,1,0,0,1,0,0,0,0,1,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,0,1,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,0,0
seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
seq $0,3415 ; a(n) = n' = arithmetic derivative of n: a(0) = a(1) = 0, a(prime) = 1, a(mn) = m*a(n) + n*a(m).
mod $0,2
| 76 | 201 | 0.577068 |
822113402def4eb5ec98f9d9d8dec7f83b106777 | 1,361 | asm | Assembly | 08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm | jonosmith/nand2tetris | e42212f40b074530a663fa7c7e44c87dbf7c5d59 | [
"BSD-3-Clause"
] | null | null | null | 08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm | jonosmith/nand2tetris | e42212f40b074530a663fa7c7e44c87dbf7c5d59 | [
"BSD-3-Clause"
] | null | null | null | 08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm | jonosmith/nand2tetris | e42212f40b074530a663fa7c7e44c87dbf7c5d59 | [
"BSD-3-Clause"
] | null | null | null | @ARG
D=M
@1
A=D+A
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
@SP
A=M
D=M
@SP
M=M+1
@4
M=D
@SP
M=M-1
@0
D=A
@SP
A=M
M=D
@SP
M=M+1
@THAT
D=M
A=D
D=A
@R13
M=D
@SP
M=M-1
@SP
A=M
D=M
@SP
M=M+1
@R13
A=M
M=D
@SP
M=M-1
@1
D=A
@SP
A=M
M=D
@SP
M=M+1
@THAT
D=M
@1
A=D+A
D=A
@R13
M=D
@SP
M=M-1
@SP
A=M
D=M
@SP
M=M+1
@R13
A=M
M=D
@SP
M=M-1
@ARG
D=M
A=D
D=M
@SP
A=M
M=D
@SP
M=M+1
@2
D=A
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
@SP
A=M
D=M
@SP
M=M-1
@SP
A=M
A=M
D=A-D
@SP
A=M
M=D
@SP
M=M+1
@ARG
D=M
A=D
D=A
@R13
M=D
@SP
M=M-1
@SP
A=M
D=M
@SP
M=M+1
@R13
A=M
M=D
@SP
M=M-1
(MAIN_LOOP_START)
@ARG
D=M
A=D
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
@SP
A=M
D=M
@COMPUTE_ELEMENT
D;JNE
@END_PROGRAM
0;JMP
(COMPUTE_ELEMENT)
@THAT
D=M
A=D
D=M
@SP
A=M
M=D
@SP
M=M+1
@THAT
D=M
@1
A=D+A
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
@SP
A=M
D=M
@SP
M=M-1
@SP
A=M
A=M
D=D+A
@SP
A=M
M=D
@SP
M=M+1
@THAT
D=M
@2
A=D+A
D=A
@R13
M=D
@SP
M=M-1
@SP
A=M
D=M
@SP
M=M+1
@R13
A=M
M=D
@SP
M=M-1
@4
D=M
@SP
A=M
M=D
@SP
M=M+1
@1
D=A
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
@SP
A=M
D=M
@SP
M=M-1
@SP
A=M
A=M
D=D+A
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
@SP
A=M
D=M
@SP
M=M+1
@4
M=D
@SP
M=M-1
@ARG
D=M
A=D
D=M
@SP
A=M
M=D
@SP
M=M+1
@1
D=A
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
@SP
A=M
D=M
@SP
M=M-1
@SP
A=M
A=M
D=A-D
@SP
A=M
M=D
@SP
M=M+1
@ARG
D=M
A=D
D=A
@R13
M=D
@SP
M=M-1
@SP
A=M
D=M
@SP
M=M+1
@R13
A=M
M=D
@SP
M=M-1
@MAIN_LOOP_START
0;JMP
(END_PROGRAM)
| 4.676976 | 17 | 0.531962 |
00ffa414a3f442e8e76717881fed03b08692c3c3 | 48 | asm | Assembly | tests/optimizer/E009.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | tests/optimizer/E009.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | tests/optimizer/E009.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; in
mov $1,5
cal $0,$1
; out
mov $1,5
cal $0,5
| 6.857143 | 9 | 0.520833 |
cd9f73ed62adefc9e8402d5e84d67539149be280 | 512 | asm | Assembly | programs/oeis/065/A065334.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/065/A065334.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/065/A065334.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A065334: 2-exponents to represent 3-smooth numbers (A065332).
; 0,1,0,2,0,1,0,3,0,0,0,2,0,0,0,4,0,1,0,0,0,0,0,3,0,0,0,0,0,0,0,5,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0
add $0,1
mul $0,3
mov $2,2
mov $3,$0
mov $4,$0
lpb $3
mov $1,0
mov $5,$4
lpb $5
add $1,1
mov $6,$0
div $0,$2
mod $6,$2
cmp $6,0
sub $5,$6
lpe
add $2,1
mov $6,$0
cmp $6,1
cmp $6,0
sub $3,$6
lpe
mov $0,$1
| 18.962963 | 201 | 0.503906 |
aee8115709795dbc48e86eba75e51278a8d2a3fc | 1,060 | asm | Assembly | writeups/flag3/src/entry.asm | zer0x64/nsec2022-gband | 7f831b1af83c7f766f139dfce14776b654ee8d9a | [
"Apache-2.0",
"MIT"
] | null | null | null | writeups/flag3/src/entry.asm | zer0x64/nsec2022-gband | 7f831b1af83c7f766f139dfce14776b654ee8d9a | [
"Apache-2.0",
"MIT"
] | null | null | null | writeups/flag3/src/entry.asm | zer0x64/nsec2022-gband | 7f831b1af83c7f766f139dfce14776b654ee8d9a | [
"Apache-2.0",
"MIT"
] | null | null | null | include "constants.inc"
SECTION "Entry point", ROM0
EntryPoint::
ld [isCgb], a; Save A register for CGB value
ld a, c;
ld [isSgb], a; Save C register for SGB value
; Turn off LCD during init;
ld a, 0;
ld [rLCDC], a ; Completely turn LCD off during init
; Setup the stack
ld sp, wStackBottom
ld a, BANK(Init) ; Load in the bank of the init code
ld [rROMB0], a
call Init;
.loop
ld a, [gameState]
cp GAMESTATE_MENU
jr z, .menu
cp GAMESTATE_INPUT_MENU
jr z, .inputMenu
cp GAMESTATE_MAP
jr z, .map
cp GAMESTATE_SERIAL
jr .serial
.menu
ld a, BANK(RunMenu) ; Load in the bank
ld [rROMB0], a
call RunMenu
jr .loop
.inputMenu
ld a, BANK(RunInputMenu) ; Load in the bank
ld [rROMB0], a
call RunInputMenu
jr .loop
.map
ld a, BANK(RunGame) ; Load in the bank
ld [rROMB0], a
call RunGame
jr .loop
.serial
ld a, BANK(RunSerialMode) ; Load in the bank
ld [rROMB0], a
call RunSerialMode
jr .loop
| 18.928571 | 61 | 0.60283 |
66682c43e526dbb7f61f3596c06b7103c0181fed | 965 | asm | Assembly | _incObj/29 Points.asm | kodishmediacenter/msu-md-sonic | 3aa7c5e8add9660df2cd0eceaa214e7d59f2415c | [
"CC0-1.0"
] | 9 | 2021-01-15T13:47:53.000Z | 2022-01-17T15:33:55.000Z | _incObj/29 Points.asm | kodishmediacenter/msu-md-sonic | 3aa7c5e8add9660df2cd0eceaa214e7d59f2415c | [
"CC0-1.0"
] | 7 | 2021-01-14T02:18:48.000Z | 2021-03-24T15:44:30.000Z | _incObj/29 Points.asm | kodishmediacenter/msu-md-sonic | 3aa7c5e8add9660df2cd0eceaa214e7d59f2415c | [
"CC0-1.0"
] | 2 | 2021-01-14T13:14:26.000Z | 2021-01-29T17:46:04.000Z | ; ---------------------------------------------------------------------------
; Object 29 - points that appear when you destroy something
; ---------------------------------------------------------------------------
Points:
moveq #0,d0
move.b obRoutine(a0),d0
move.w Poi_Index(pc,d0.w),d1
jsr Poi_Index(pc,d1.w)
bra.w DisplaySprite
; ===========================================================================
Poi_Index: dc.w Poi_Main-Poi_Index
dc.w Poi_Slower-Poi_Index
; ===========================================================================
Poi_Main: ; Routine 0
addq.b #2,obRoutine(a0)
move.l #Map_Poi,obMap(a0)
move.w #$2797,obGfx(a0)
move.b #4,obRender(a0)
move.b #1,obPriority(a0)
move.b #8,obActWid(a0)
move.w #-$300,obVelY(a0) ; move object upwards
Poi_Slower: ; Routine 2
tst.w obVelY(a0) ; is object moving?
bpl.w DeleteObject ; if not, delete
bsr.w SpeedToPos
addi.w #$18,obVelY(a0) ; reduce object speed
rts | 32.166667 | 77 | 0.472539 |
dd83fbd42fe0f231a8338afec68f78c554f7a75f | 21,781 | asm | Assembly | Library/SSMeta/ssmetaC.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/SSMeta/ssmetaC.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/SSMeta/ssmetaC.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z |
COMMENT @-----------------------------------------------------------------------
Copyright (c) Geoworks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE:
AUTHOR: Cheng, 8/92
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 8/92 Initial revision
DESCRIPTION:
$Id: ssmetaC.asm,v 1.1 97/04/07 10:44:11 newdeal Exp $
-------------------------------------------------------------------------------@
SetGeosConvention
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETAINITFORSTORAGE
C DECLARATION: extern void SSMetaInitForStorage(SSMetaStruc *ssmStruc,
VMFileHandle vmFileHan,
optr sourceID);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETAINITFORSTORAGE proc far ssmetaStruc:fptr,
vmFileHan:word,
sourceID:optr
.enter
mov bx, vmFileHan
mov ax, sourceID.high
mov cx, sourceID.low
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaInitForStorage
.leave
ret
SSMETAINITFORSTORAGE endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETAINITFORRETRIEVAL
C DECLARATION: extern void SSMetaInitForRetrieval(SSMetaStruc *ssmStruc,
VMFileHandle vmFileHan,
word ssmHdr);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETAINITFORRETRIEVAL proc far ssmetaStruc:fptr,
vmFileHan:word,
ssmHdr:word
.enter
mov bx, vmFileHan
mov ax, ssmHdr
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaInitForRetrieval
.leave
ret
SSMETAINITFORRETRIEVAL endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETAINITFORCUTCOPY
C DECLARATION: extern void SSMetaInitForCutCopy(SSMetaStruc *ssmStruc,
ClipboardItemFlags flags,
optr sourceID);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETAINITFORCUTCOPY proc far ssmetaStruc:fptr,
flags:ClipboardItemFlags,
sourceID:optr
.enter
mov bx, flags
mov ax, sourceID.high
mov cx, sourceID.low
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaInitForCutCopy
.leave
ret
SSMETAINITFORCUTCOPY endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADONEWITHCUTCOPY
C DECLARATION: extern void SSMetaDoneWithCutCopy(SSMetaStruc *ssmStruc);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADONEWITHCUTCOPY proc far ssmetaStruc:fptr
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDoneWithCutCopy
.leave
ret
SSMETADONEWITHCUTCOPY endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADONEWITHCUTCOPYNOREGISTER
C DECLARATION: extern void SSMetaDoneWithCutCopyNoRegister
(SSMetaStruc *ssmStruc);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 3/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADONEWITHCUTCOPYNOREGISTER proc far ssmetaStruc:fptr
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDoneWithCutCopyNoRegister
.leave
ret
SSMETADONEWITHCUTCOPYNOREGISTER endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETAINITFORPASTE
C DECLARATION: extern boolean
SSMetaInitForPaste(SSMetaStruc *ssmStruc,
ClipboardItemFlags flags);
Returns TRUE is spreadsheet clipboard item present.
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETAINITFORPASTE proc far ssmetaStruc:fptr,
flags:ClipboardItemFlags
.enter
mov bx, flags
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaInitForPaste
mov ax, 0 ; set boolean return value
jc done ; carry => no item present
dec ax
done:
.leave
ret
SSMETAINITFORPASTE endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADONEWITHPASTE
C DECLARATION: extern void SSMetaInitForCutCopy(SSMetaStruc *ssmStruc);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADONEWITHPASTE proc far ssmetaStruc:fptr
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaInitForCutCopy
.leave
ret
SSMETADONEWITHPASTE endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETASETSCRAPSIZE
C DECLARATION: extern void SSMetaSetScrapSize(SSMetaStruc *ssmStruc,
word numCols,
word numRows);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETASETSCRAPSIZE proc far ssmetaStruc:fptr,
numRows:word,
numCols:word
.enter
mov ax, numRows
mov cx, numCols
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaSetScrapSize
.leave
ret
SSMETASETSCRAPSIZE endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATAARRAYLOCATEORADDENTRY
C DECLARATION: extern boolean
SSMetaDataArrayLocateOrAddEntry(SSMetaStruc *ssmStruc,
word token,
word entryDataSize,
byte *entryData);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATAARRAYLOCATEORADDENTRY proc far ssmetaStruc:fptr,
token:word,
entryDataSize:word,
entryData:fptr
uses ds,si
.enter
mov ax, token
mov cx, entryDataSize
lds si, entryData
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDataArrayLocateOrAddEntry
mov ax, 0
jc done ; carry => entry added
dec ax ; else entry was located
done:
.leave
ret
SSMETADATAARRAYLOCATEORADDENTRY endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATAARRAYADDENTRY
C DECLARATION: extern void
SSMetaDataArrayAddEntry(SSMetaStruc *ssmStruc,
word token,
word entryDataSize,
byte *entryData);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATAARRAYADDENTRY proc far ssmetaStruc:fptr,
token:word,
entryDataSize:word,
entryData:fptr
uses ds,si
.enter
mov ax, token
mov cx, entryDataSize
lds si, entryData
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDataArrayAddEntry
.leave
ret
SSMETADATAARRAYADDENTRY endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETASEEIFSCRAPPRESENT
C DECLARATION: extern boolean
SSMetaSeeIfScrapPresent(ClipboardItemFlags flags);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETASEEIFSCRAPPRESENT proc far flags:ClipboardItemFlags
.enter
mov ax, ss:flags
call SSMetaSeeIfScrapPresent
mov ax, 1
jc done
clr ax
done:
.leave
ret
SSMETASEEIFSCRAPPRESENT endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETAGETSCRAPSIZE
C DECLARATION: extern void
SSMetaGetScrapSize(SSMetaStruc *ssmStruc);
Return values differ from asm version. ASM version returns scrap size but these
can be gotten from the SSMetaStruc.
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETAGETSCRAPSIZE proc far ssmetaStruc:fptr
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaGetScrapSize
.leave
ret
SSMETAGETSCRAPSIZE endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATAARRAYGETNUMENTRIES
C DECLARATION: extern word
SSMetaDataArrayGetNumEntries(SSMetaStruc *ssmStruc);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATAARRAYGETNUMENTRIES proc far ssmetaStruc:fptr
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDataArrayGetNumEntries
.leave
ret
SSMETADATAARRAYGETNUMENTRIES endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATAARRAYRESETENTRYPOINTER
C DECLARATION: extern void
SSMetaDataArrayResetEntryPointer(SSMetaStruc *ssmStruc);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATAARRAYRESETENTRYPOINTER proc far ssmetaStruc:fptr
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDataArrayResetEntryPointer
.leave
ret
SSMETADATAARRAYRESETENTRYPOINTER endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATAARRAYGETFIRSTENTRY
C DECLARATION: extern *SSMetaDataEntry
SSMetaDataArrayGetFirstEntry(SSMetaStruc *ssmStruc);
Return values differ from asm version. ASM version returns size as well but
the size can be gotten from SSMetaStruc. Also, return value can be NULL to
indicate no first entry. (ASM version uses the carry flag).
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATAARRAYGETFIRSTENTRY proc far ssmetaStruc:fptr
uses ds,si
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDataArrayGetFirstEntry
mov dx, ds
mov ax, si
jnc done
clr ax,dx
done:
.leave
ret
SSMETADATAARRAYGETFIRSTENTRY endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATAARRAYGETNEXTENTRY
C DECLARATION: extern *SSMetaDataEntry
SSMetaDataArrayGetNextEntry(SSMetaStruc *ssmStruc);
Return values differ from asm version. ASM version returns size as well but
the size can be gotten from SSMetaStruc. Also, return value can be NULL
to indicate no next entry. (ASM version uses the carry flag).
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATAARRAYGETNEXTENTRY proc far ssmetaStruc:fptr
uses ds,si
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDataArrayGetNextEntry
mov dx, ds
mov ax, si
jnc done
clr ax,dx
done:
.leave
ret
SSMETADATAARRAYGETNEXTENTRY endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATAARRAYGETENTRYBYTOKEN
C DECLARATION: extern *SSMetaDataEntry
SSMetaDataArrayGetEntryByToken(SSMetaStruc *ssmStruc,
word token);
Return values differ from asm version. ASM version returns size as well but
the size can be gotten from SSMetaStruc. Also, return value can be NULL
to indicate no entry. (ASM version uses the carry flag).
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATAARRAYGETENTRYBYTOKEN proc far ssmetaStruc:fptr,
token:word
uses ds,si
.enter
mov ax, token
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDataArrayGetEntryByToken
mov dx, ds
mov ax, si
jnc done
clr ax,dx
done:
.leave
ret
SSMETADATAARRAYGETENTRYBYTOKEN endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATAARRAYGETENTRYBYCOORD
C DECLARATION: extern *SSMetaDataEntry
SSMetaDataArrayGetEntryByCoord(SSMetaStruc *ssmStruc);
Return values differ from asm version. ASM version returns size as well but
the size can be gotten from SSMetaStruc. Also, return value can be NULL
to indicate no entry. (ASM version uses the carry flag).
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATAARRAYGETENTRYBYCOORD proc far ssmetaStruc:fptr
uses ds, si
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDataArrayGetEntryByCoord
mov dx, ds
mov ax, si
jnc done
clr ax,dx
done:
.leave
ret
SSMETADATAARRAYGETENTRYBYCOORD endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATAARRAYGETNTHENTRY
C DECLARATION: extern void SSMetaDataArrayGetNthEntry(SSMetaStruc *ssmStruc,
word N);
Return values differ from asm version. ASM version returns size as well but
the size can be gotten from SSMetaStruc. Also, return value can be NULL
to indicate no entry. (ASM version uses the carry flag).
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATAARRAYGETNTHENTRY proc far ssmetaStruc:fptr
uses ds,si
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDataArrayGetNthEntry
mov dx, ds
mov ax, si
jnc done
clr ax,dx
done:
.leave
ret
SSMETADATAARRAYGETNTHENTRY endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATAARRAYUNLOCK
C DECLARATION: extern void SSMetaDataArrayUnlock(SSMetaStruc *ssmStruc);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cheng 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATAARRAYUNLOCK proc far ssmetaStruc:fptr
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDataArrayUnlock
.leave
ret
SSMETADATAARRAYUNLOCK endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETAGETNUMBEROFDATARECORDS
C DECLARATION: extern word
SSMetaGetNumberOfDataRecords(SSMetaStruc *ssmStruc);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ted 11/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETAGETNUMBEROFDATARECORDS proc far ssmetaStruc:fptr
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaGetNumberOfDataRecords
.leave
ret
SSMETAGETNUMBEROFDATARECORDS endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETARESETFORDATARECORDS
C DECLARATION: extern void SSMetaResetForDataRecords(SSMetaStruc *ssmStruc);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ted 11/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETARESETFORDATARECORDS proc far ssmetaStruc:fptr
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaResetForDataRecords
.leave
ret
SSMETARESETFORDATARECORDS endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETAFIELDNAMELOCK
C DECLARATION: extern *char
SSMetaFieldNameLock(SSMetaStruc *ssmStruc,
word *mHandle,
word *dataLength);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ted 11/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETAFIELDNAMELOCK proc far ssmetaStruc:fptr,
mHandle:fptr,
dataLength:fptr
uses ds, es, si, di
.enter
push bp
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaFieldNameLock
pop bp
jc noField
les di, dataLength
stosw
les di, mHandle
mov_tr ax, bx
stosw
mov dx, ds
mov ax, si
jnc done
noField:
clr ax,dx
done:
.leave
ret
SSMETAFIELDNAMELOCK endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATARECORDFIELDLOCK
C DECLARATION: extern *char
SSMetaDataRecordFieldLock(SSMetaStruc *ssmStruc,
word *mHandle,
word *dataLength);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ted 11/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATARECORDFIELDLOCK proc far ssmetaStruc:fptr,
mHandle:fptr,
dataLength:fptr
uses ds, es, si, di
.enter
push bp
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
call SSMetaDataRecordFieldLock
pop bp
jc noField
les di, dataLength
stosw
les di, mHandle
mov_tr ax, bx
stosw
mov dx, ds
mov ax, si
jnc done
noField:
clr ax,dx
done:
.leave
ret
SSMETADATARECORDFIELDLOCK endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETAFIELDNAMEUNLOCK
C DECLARATION: extern void SSMetaFieldNameUnlock(SSMetaStruc *ssmStruc,
word mHandle);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ted 11/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETAFIELDNAMEUNLOCK proc far ssmetaStruc:fptr,
mHandle:word
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
mov bx, mHandle
call SSMetaFieldNameUnlock
.leave
ret
SSMETAFIELDNAMEUNLOCK endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETADATARECORDFIELDUNLOCK
C DECLARATION: extern void SSMetaDataRecordFieldUnlock(SSMetaStruc *ssmStruc,
word mHandle);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ted 11/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETADATARECORDFIELDUNLOCK proc far ssmetaStruc:fptr,
mHandle:word
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
mov bx, mHandle
call SSMetaDataArrayUnlock
.leave
ret
SSMETADATARECORDFIELDUNLOCK endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
C FUNCTION: SSMETAFORMATCELLTEXT
C DECLARATION: extern *char
SSMetaFormatCellText(SSMetaStruc *ssmStruc,
word *mHandle,
word *dataLength);
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ted 2/1/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSMETAFORMATCELLTEXT proc far ssmetaStruc:fptr,
mHandle:word,
dataLength:fptr
.enter
mov dx, ssmetaStruc.high
mov bp, ssmetaStruc.low
mov bx, mHandle
call SSMetaFormatCellText
jc noField
les di, dataLength
stosw
les di, mHandle
mov_tr ax, bx
stosw
mov dx, ds
mov ax, si
jnc done
noField:
clr ax,dx
done:
.leave
ret
SSMETAFORMATCELLTEXT endp
SetDefaultConvention
| 23.146652 | 81 | 0.574813 |
829f5b54451e5e3d9201c1ee067afd91fe510284 | 800 | asm | Assembly | programs/oeis/166/A166588.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/166/A166588.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/166/A166588.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A166588: Partial sums of A097331; binomial transform of A166587.
; 1,2,2,3,3,5,5,10,10,24,24,66,66,198,198,627,627,2057,2057,6919,6919,23715,23715,82501,82501,290513,290513,1033413,1033413,3707853,3707853,13402698,13402698,48760368,48760368,178405158,178405158,656043858,656043858,2423307048,2423307048,8987427468,8987427468,33453694488,33453694488,124936258128,124936258128,467995871778,467995871778,1757900019102,1757900019102,6619846420554,6619846420554,24987199492706,24987199492706,94520750408710,94520750408710,358268702159070,358268702159070,1360510918810438,1360510918810438,5175497420902742,5175497420902742
lpb $0
mov $2,$0
sub $0,1
cal $2,97331 ; Expansion of 1 + 2x/(1 + sqrt(1 - 4x^2)).
add $1,$2
mov $4,$2
add $2,1
min $4,1
add $5,$4
lpe
mov $3,$2
mov $3,$1
add $1,1
| 47.058824 | 551 | 0.78625 |
0b1b70337a946d1f14e4572e99353c59c60dc8b1 | 361 | asm | Assembly | programs/oeis/063/A063238.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/063/A063238.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/063/A063238.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A063238: Dimension of the space of weight 2n cuspidal newforms for Gamma_0( 87 ).
; 5,14,24,32,42,52,60,70,80,88,98,108,116,126,136,144,154,164,172,182,192,200,210,220,228,238,248,256,266,276,284,294,304,312,322,332,340,350,360,368,378,388,396,406,416,424,434,444,452,462
mov $1,$0
mul $1,28
div $1,3
mov $2,$0
cmp $2,0
add $0,$2
mod $0,3
add $0,$1
add $0,4
| 27.769231 | 189 | 0.686981 |
422a2f62993a993d5186be9ce6773ec0f9fe8207 | 7,022 | asm | Assembly | PRACT0/SO1HPUB/asm/biosdata.asm | so1h/SO1H | 7163aa1907b7f7ab70ab022012036c4fa0482e17 | [
"BSD-2-Clause"
] | null | null | null | PRACT0/SO1HPUB/asm/biosdata.asm | so1h/SO1H | 7163aa1907b7f7ab70ab022012036c4fa0482e17 | [
"BSD-2-Clause"
] | null | null | null | PRACT0/SO1HPUB/asm/biosdata.asm | so1h/SO1H | 7163aa1907b7f7ab70ab022012036c4fa0482e17 | [
"BSD-2-Clause"
] | null | null | null | bits 16
; glb intptr_t : int
; glb uintptr_t : unsigned
; glb intmax_t : int
; glb uintmax_t : unsigned
; glb int8_t : signed char
; glb int_least8_t : signed char
; glb int_fast8_t : signed char
; glb uint8_t : unsigned char
; glb uint_least8_t : unsigned char
; glb uint_fast8_t : unsigned char
; glb int16_t : short
; glb int_least16_t : short
; glb int_fast16_t : short
; glb uint16_t : unsigned short
; glb uint_least16_t : unsigned short
; glb uint_fast16_t : unsigned short
; glb int32_t : int
; glb int_least32_t : int
; glb int_fast32_t : int
; glb uint32_t : unsigned
; glb uint_least32_t : unsigned
; glb uint_fast32_t : unsigned
; glb imaxdiv_t : struct <something>
; glb bool_t : int
; glb pointer_t : * unsigned char
; glb funcion_t : * (
; prm <something> : * void
; ) * void
; glb manejador_t : * (void) void
; glb rti_t : * (void) void
; glb isr_t : * (void) void
; glb handler_t : * (void) void
; glb retardarThread_t : * (void) int
; glb ptrTVI_t : * * (void) void
; glb modoSO1_t : int
; glb lh_t : struct <something>
; glb address_t : struct <something>
; glb uPtrAdr_t : union <something>
; glb pid_t : int
; glb tid_t : int
; glb uid_t : int
; glb gid_t : int
; glb pindx_t : int
; glb tindx_t : int
; glb df_t : int
; glb dfs_t : int
; glb rindx_t : int
; glb HWLIST_t : unsigned short
; glb KBDFLAGS_t : unsigned short
; glb KBDSTATUS_t : unsigned short
; glb VIDEOCONTROL_t : unsigned char
; glb DRECSTATUS_t : unsigned char
; glb DMOTORSTATUS_t : unsigned char
; glb FDOPSTATUS_t : unsigned char
; glb VIDEOSWITCHES_t : unsigned char
; glb VGAOPTIONS_t : unsigned char
; glb VIDEOSAVETBL_t : struct <something>
; RPN'ized expression: "4 "
; Expanded expression: "4 "
; Expression value: 4
; RPN'ized expression: "25 "
; Expanded expression: "25 "
; Expression value: 25
; RPN'ized expression: "20 "
; Expanded expression: "20 "
; Expression value: 20
; RPN'ized expression: "9 "
; Expanded expression: "9 "
; Expression value: 9
; glb VIDEOPARAM_t : struct <something>
; RPN'ized expression: "256 "
; Expanded expression: "256 "
; Expression value: 256
; RPN'ized expression: "4 "
; Expanded expression: "4 "
; Expression value: 4
; RPN'ized expression: "3 "
; Expanded expression: "3 "
; Expression value: 3
; RPN'ized expression: "16 "
; Expanded expression: "16 "
; Expression value: 16
; RPN'ized expression: "7 "
; Expanded expression: "7 "
; Expression value: 7
; RPN'ized expression: "8 "
; Expanded expression: "8 "
; Expression value: 8
; RPN'ized expression: "2 "
; Expanded expression: "2 "
; Expression value: 2
; RPN'ized expression: "2 "
; Expanded expression: "2 "
; Expression value: 2
; RPN'ized expression: "5 "
; Expanded expression: "5 "
; Expression value: 5
; RPN'ized expression: "2 "
; Expanded expression: "2 "
; Expression value: 2
; RPN'ized expression: "3 "
; Expanded expression: "3 "
; Expression value: 3
; RPN'ized expression: "4 "
; Expanded expression: "4 "
; Expression value: 4
; RPN'ized expression: "11 "
; Expanded expression: "11 "
; Expression value: 11
; RPN'ized expression: "7 "
; Expanded expression: "7 "
; Expression value: 7
; RPN'ized expression: "68 "
; Expanded expression: "68 "
; Expression value: 68
; RPN'ized expression: "16 "
; Expanded expression: "16 "
; Expression value: 16
; glb BIOSAREA_t : struct <something>
; glb ptrBiosArea : * struct <something>
; glb ptrFechaBios : * unsigned char
; glb ptrBiosArea : * struct <something>
section .data
align 4
global _ptrBiosArea
_ptrBiosArea:
; =
; RPN'ized expression: "0 "
; Expanded expression: "0 "
; Expression value: 0
dd 0
; glb ptrFechaBios : * unsigned char
section .data
align 4
global _ptrFechaBios
_ptrFechaBios:
; =
; glb <something> : * unsigned char
; RPN'ized expression: "1048565 (something1) "
; Expanded expression: "1048565 "
dd 1048565
; Syntax/declaration table/stack:
; Bytes used: 2655/40960
; Macro table:
; Macro __SMALLER_C__ = `0x0100`
; Macro __SMALLER_C_32__ = ``
; Macro __HUGE__ = ``
; Macro __SMALLER_C_SCHAR__ = ``
; Bytes used: 74/5120
; Identifier table:
; Ident __floatsisf
; Ident __floatunsisf
; Ident __fixsfsi
; Ident __fixunssfsi
; Ident __addsf3
; Ident __subsf3
; Ident __negsf2
; Ident __mulsf3
; Ident __divsf3
; Ident __lesf2
; Ident __gesf2
; Ident intptr_t
; Ident uintptr_t
; Ident intmax_t
; Ident uintmax_t
; Ident int8_t
; Ident int_least8_t
; Ident int_fast8_t
; Ident uint8_t
; Ident uint_least8_t
; Ident uint_fast8_t
; Ident int16_t
; Ident int_least16_t
; Ident int_fast16_t
; Ident uint16_t
; Ident uint_least16_t
; Ident uint_fast16_t
; Ident int32_t
; Ident int_least32_t
; Ident int_fast32_t
; Ident uint32_t
; Ident uint_least32_t
; Ident uint_fast32_t
; Ident <something>
; Ident quot
; Ident rem
; Ident imaxdiv_t
; Ident FALSE
; Ident TRUE
; Ident bool_t
; Ident pointer_t
; Ident funcion_t
; Ident manejador_t
; Ident rti_t
; Ident isr_t
; Ident handler_t
; Ident retardarThread_t
; Ident ptrTVI_t
; Ident modoSO1_Bin
; Ident modoSO1_Exe
; Ident modoSO1_Bs
; Ident modoSO1_t
; Ident lo
; Ident hi
; Ident lh_t
; Ident offset
; Ident segment
; Ident address_t
; Ident ptr
; Ident adr
; Ident uPtrAdr_t
; Ident pid_t
; Ident tid_t
; Ident uid_t
; Ident gid_t
; Ident pindx_t
; Ident tindx_t
; Ident df_t
; Ident dfs_t
; Ident rindx_t
; Ident HWLIST_t
; Ident KBDFLAGS_t
; Ident KBDSTATUS_t
; Ident VIDEOCONTROL_t
; Ident DRECSTATUS_t
; Ident DMOTORSTATUS_t
; Ident FDOPSTATUS_t
; Ident VIDEOSWITCHES_t
; Ident VGAOPTIONS_t
; Ident VIDEO_paramtbl
; Ident VIDEO_dynsavearea
; Ident VIDEO_text_charset
; Ident VIDEO_graph_charset
; Ident VIDEO_savetbl2
; Ident VIDEOSAVETBL_t
; Ident VPARAM_width
; Ident VPARAM_height
; Ident VPARAM_hchar
; Ident VPARAM_pagesize
; Ident VPARAM_SEQC
; Ident VPARAM_MISC
; Ident VPARAM_CRTC
; Ident VPARAM_ATC
; Ident VPARAM_GRC
; Ident VIDEOPARAM_t
; Ident IVT
; Ident COM_base
; Ident LPT_base
; Ident XBDA_seg
; Ident HW_list
; Ident relleno1
; Ident basemem_K
; Ident relleno2
; Ident KBD_flags
; Ident relleno3
; Ident KBD_bufhead
; Ident KBD_buftail
; Ident KBD_buffer
; Ident dRecStatus
; Ident dMotorStatus
; Ident motorShutoffCounter
; Ident fdOpStatus
; Ident relleno4
; Ident VIDEO_mode
; Ident VIDEO_width
; Ident VIDEO_pagesize
; Ident VIDEO_pageoff
; Ident CURSOR_pos
; Ident CURSOR_shape
; Ident VIDEO_pagActiva
; Ident CRTC_base
; Ident CRT_MODE
; Ident CRT_PALETTE
; Ident relleno5
; Ident BIOS_timer
; Ident BIOS_overflow
; Ident BIOS_ctrlbreak
; Ident BIOS_POSTreset
; Ident relleno6
; Ident BIOS_HD_cnt
; Ident relleno7
; Ident LPT_timeout
; Ident BIOS_4B_flags
; Ident COM_timeout
; Ident KBD_start
; Ident KBD_end1
; Ident VIDEO_lastrow
; Ident VIDEO_hchar
; Ident VIDEO_control
; Ident VIDEO_switches
; Ident VGA_options
; Ident VGA_DCC_index
; Ident relleno8
; Ident KBD_status
; Ident TIMER_waitflag
; Ident TIMER_waitmks
; Ident TIMER_active
; Ident relleno9
; Ident VIDEO_ptrtable
; Ident relleno10
; Ident IAC
; Ident BIOSAREA_t
; Ident ptrBiosArea
; Ident ptrFechaBios
; Bytes used: 1824/16384
; Next label number: 2
; Compilation succeeded.
| 22.012539 | 46 | 0.735545 |
ea70759dca042faf2fd82ca4f8964943dd9db3dc | 13,801 | asm | Assembly | base/hals/halx86/i386/ixslpctx.asm | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | base/hals/halx86/i386/ixslpctx.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | base/hals/halx86/i386/ixslpctx.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z |
title "Sleep Context"
;++
;
; Copyright (c) 1989 Microsoft Corporation
;
; Module Name:
;
; ixslpctx.asm
;
; Abstract:
;
; This module implements the code for saving processor
; context before putting the machine to sleep. It also
; contains the code for building a page that a processor
; in real mode can jump to in order to transition into
; p-mode and assume a thread context.
;
; Author:
;
; Jake Oshins (jakeo) March 13, 1998
;
; Environment:
;
; Kernel mode only.
;
; Revision History:
;
; Much of this code has been moved from halmps\i386\mpsproca.asm.
;
;--
.386p
.xlist
include hal386.inc
include callconv.inc ; calling convention macros
include apic.inc
include i386\ixslpctx.inc
include mac386.inc
.list
extrn _HalpLowStub:DWORD
extrn _HalpIsNXEnabled@0:proc
extrn _KeSaveStateForHibernate:proc
ifdef ACPI_HAL
EXTRNP HalpAcpiFlushCache, 0,,FASTCALL
endif
PAGELK16 SEGMENT DWORD PUBLIC USE16 'CODE' ; start 16 bit code
;++
;
; VOID
; _StartPx_RMStub
;
; Routine Description:
;
; When a new processor is started, it starts in real-mode and is
; sent to a copy of this function which has been copied into low memory.
; (below 1m and accessable from real-mode).
;
; Once CR0 has been set, this function jmp's to a StartPx_PMStub
;
; Arguments:
; none
;
; Return Value:
; does not return, jumps to StartPx_PMStub
;
;--
cPublicProc _StartPx_RMStub ,0
cli
db 066h ; load the GDT
lgdt fword ptr cs:[SPx_PB.PsSpecialRegisters.SrGdtr]
db 066h ; load the IDT
lidt fword ptr cs:[SPx_PB.PsSpecialRegisters.SrIdtr]
mov eax, cs:[SPx_TiledCR3]
nop ; Fill - Ensure 13 non-page split
nop ; accesses before CR3 load
nop ; (P6 errata #11 stepping B0)
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov cr3, eax
;
; Restore CR4 to enable Page Size Extensions
; before we got real CR3 which might use Large Page.
; If SrCr4 is non-zero, then CR4 exists
;
mov eax, dword ptr cs:[SPx_PB.PsSpecialRegisters.SrCr4]
or eax, eax
jz @f
.586p
mov cr4, eax
.386p
@@:
;
; Check whether NX should be enabled for this processor
;
test cs:[SPx_flag], SPX_FLAG_NX
jz @f
;
; NX should be enabled. We can assume that this processor can
; support NX mode (and that it is in PAE mode)
;
.586p
push edx
mov ecx, 0c0000080h
rdmsr
or eax, 0800h
mov ecx, 0c0000080h
wrmsr
.386p
pop edx
@@:
mov ebp, dword ptr cs:[SPx_P0EBP]
mov ecx, dword ptr cs:[SPx_PB.PsContextFrame.CsSegDs]
mov ebx, dword ptr cs:[SPx_PB.PsSpecialRegisters.SrCr3]
mov eax, dword ptr cs:[SPx_PB.PsSpecialRegisters.SrCr0]
mov edi, dword ptr cs:[SPx_flat_addr]
mov cr0, eax ; into prot mode
db 066h
db 0eah ; reload cs:eip
SPrxPMStub dd 0
SPrxFlatCS dw 0
_StartPx_RMStub_Len equ $ - _StartPx_RMStub
stdENDP _StartPx_RMStub
PAGELK16 ends ; End 16 bit code
PAGELK SEGMENT PARA PUBLIC 'CODE' ; Start 32 bit code
ASSUME DS:FLAT, ES:FLAT, SS:NOTHING, FS:NOTHING, GS:NOTHING
;++
;
; VOID
; StartPx_PMStub
;
; Routine Description:
;
; This function completes the processor's state loading, and signals
; the requesting processor that the state has been loaded.
;
; Arguments:
; ebx - requested CR3 for this processors_state
; cx - requested ds for this processors_state
; ebp - EBP of P0
; edi - p-mode address of startup block
;
; Return Value:
; does not return - completes the loading of the processors_state
;
;--
align dword ; to make sure we don't cross a page boundry
; before reloading CR3
cPublicProc _StartPx_PMStub ,0
; process is now in the load image copy of this function.
; (ie, it's not the low memory copy)
mov cr3, ebx ; get real CR3
mov ds, cx ; set real ds
lea esi, [edi].SPx_PB.PsSpecialRegisters
lldt word ptr ds:[esi].SrLdtr ; load ldtr
;
; Force the TSS descriptor into a non-busy state, so we don't fault
; when we load the TR.
;
mov eax, ds:[esi].SrGdtr+2 ; (eax)->GDT base
xor ecx, ecx
mov cx, word ptr ds:[esi].SrTr
add eax, 5
add eax, ecx ; (eax)->TSS Desc. Byte
and byte ptr [eax],NOT 2
ltr word ptr ds:[esi].SrTr ; load tss
lea edx, [edi].SPx_PB.PsContextFrame
mov es, word ptr ds:[edx].CsSegEs ; Set other selectors
mov fs, word ptr ds:[edx].CsSegFs
mov gs, word ptr ds:[edx].CsSegGs
mov ss, word ptr ds:[edx].CsSegSs
cld ; make lodsd ascending (below)
xor eax, eax ; disable debug registers while
mov dr7, eax ; setting them.
add esi, SrKernelDr0
.errnz (SrKernelDr1 - SrKernelDr0 - 1 * 4)
.errnz (SrKernelDr2 - SrKernelDr0 - 2 * 4)
.errnz (SrKernelDr3 - SrKernelDr0 - 3 * 4)
.errnz (SrKernelDr6 - SrKernelDr0 - 4 * 4)
.errnz (SrKernelDr7 - SrKernelDr0 - 5 * 4)
lodsd
mov dr0, eax ; load dr0-dr7
lodsd
mov dr1, eax
lodsd
mov dr2, eax
lodsd
mov dr3, eax
lodsd
mov dr6, eax
lodsd
mov dr7, eax
mov esp, dword ptr ds:[edx].CsEsp
mov ecx, dword ptr ds:[edx].CsEcx
push dword ptr ds:[edx].CsEflags
popfd ; load eflags
push dword ptr ds:[edx].CsEip ; make a copy of remaining
push dword ptr ds:[edx].CsEax ; registers which need
push dword ptr ds:[edx].CsEbx ; loaded
push dword ptr ds:[edx].CsEdx
push dword ptr ds:[edx].CsEsi
push dword ptr ds:[edx].CsEdi
push dword ptr ds:[edx].CsEbp
or [edi.SPx_flag], SPX_FLAG_STARTED ; Signal p0 that we are
; done with it's data
; Set remaining registers
pop ebp
pop edi
pop esi
pop edx
pop ebx
pop eax
stdRET _StartPx_PMStub
stdENDP _StartPx_PMStub
;++
;
; VOID
; StartPx_BuildRealModeStart(
; IN PUCHAR ParamBlock
; )
;
; Routine Description:
;
; This function sets up the real mode startup page
;
; Arguments:
;
; PxParamBlock -- address of the structure that should end up
; at the beginning of HalpLowStub
;
;--
ParamBlockAddress equ [ebp + 8]
cPublicProc _StartPx_BuildRealModeStart ,1
push ebp
mov ebp, esp
push ebx
push esi
push edi
;
; Determine whether the new processor should have NX enabled
;
; N.B. The param block arrives here in an uninitialized
; state.
;
call _HalpIsNXEnabled@0
mov edx, ParamBlockAddress
mov DWORD PTR [edx].SPx_flag, 0
or al, al
jz spbrms_nonx
or [edx].SPx_flag, SPX_FLAG_NX
spbrms_nonx:
;
; Build a jmp to the start of the Real mode startup code
;
; This is needed because the Local APIC implementations
; use a Startup IPI that must be Page aligned. The allocation
; code int MP_INIT ensures that this is page aligned. The
; original code was written to place the parameter block first.
; By adding a jump instruction to the start of the parameter block
; we can run either way.
;
mov eax, size PxParamBlock - 3 ; Jump destination relative to
; next instruction
shl eax, 8 ; Need room for jmp instruction
mov al,0e9h
mov [edx].SPx_Jmp_Inst, eax
;
; Save the p-mode address of PxParamBlock
;
mov eax, _HalpLowStub
mov [edx].SPx_flat_addr, eax
;
; Copy RMStub to low memory
;
mov esi, OFFSET FLAT:_StartPx_RMStub
mov ecx, _StartPx_RMStub_Len
mov edi, _HalpLowStub ; Destination was allocated by MpInit
add edi, size PxParamBlock ; Parameter Block is placed first
rep movsb
;
; Copy the parameter block to low memory
;
mov ecx, size PxParamBlock ; Structure length
mov esi, ParamBlockAddress ; Parameter Block is placed first
mov edi, _HalpLowStub ; Destination Address
rep movsb
;
; Now we need to create a pointer allowing the Real Mode code to
; Branch to the Protected mode code
;
mov eax, _HalpLowStub ; low memory Address
add eax, size PxParamBlock ; Move past the Parameter block
;
; In order to get to the label we need to compute the label offset relative
; to the start of the routine and then use this as a offset from the start of
; the routine ( HalpLowStub + (size PxParamBlock)) in low memory.
;
; The following code creates a pointer to (RMStub - StartPx_RMStub)
; which can then be used to access code locations via code labels directly.
; Since the [eax.Label] results in the address (eax + Label) loading eax
; with the pointer created above results in (RMStub - StartPx_RMStub + Label).
;
mov ebx, OFFSET FLAT:_StartPx_RMStub
sub eax, ebx ; (eax) = adjusted pointer
;
; Patch the real mode code with a valid long jump address, first CS then offset
;
mov bx, word ptr [edx].SPx_PB.PsContextFrame.CsSegCs
mov [eax.SPrxFlatCS], bx
mov [eax.SPrxPMStub], offset _StartPx_PMStub
pop edi
pop esi
pop ebx
pop ebp
stdRET _StartPx_BuildRealModeStart
stdENDP _StartPx_BuildRealModeStart
subttl "Save Processor State"
;++
;
; VOID
; HalpSaveProcessorStateAndWait(
; IN PKPROCESSOR_STATE ProcessorState
; )
;
; Routine Description:
;
; This function saves the volatile, non-volatile and special register
; state of the current processor.
;
; N.B. Floating point state is NOT captured.
;
; Arguments:
;
; ProcessorState (esp+4) - Address of processor state record to fill in.
;
; pBarrier - Address of a value to use as a lock.
;
; Return Value:
;
; None. This function does not return.
;
;--
ProcessorState equ [esp + 8]
pBarrier equ dword ptr [esp + 12]
cPublicProc _HalpSaveProcessorStateAndWait,2
push ebx
mov ebx, ProcessorState
cmp ebx, 0 ; if this isn't filled in, don't save context
jz hspsaw_statesaved
;
; Fill in ProcessorState
;
push ebx
call _KeSaveStateForHibernate ; _cdecl function
add esp, 4
;; Save return address, not caller's return address
mov eax,[esp+4]
mov [ebx.PsContextFrame.CsEip],eax
;; Save caller's ebp, not caller's return ebp.
mov [ebx.PsContextFrame.CsEbp],ebp
;; Set ESP to value just before this function call
lea eax,[esp+16]
mov [ebx.PsContextFrame.CsEsp],eax
hspsaw_statesaved:
ifdef ACPI_HAL
;
; Flush the cache, as the processor may be about
; to power off.
;
fstCall HalpAcpiFlushCache
endif
;
; Signal that this processor has saved its state
;
mov ebx, pBarrier
lock inc dword ptr [ebx]
;
; Wait for the hibernation file to be written.
; Processor 0 will zero Barrier when it is
; finished.
;
; N.B. We can't return from this function
; before the hibernation file is finished
; because we would be tearing down the very same
; stack that we will be jumping onto when the
; processor resumes. But after the hibernation
; file is written, it doesn't matter, because
; the stack will be restored from disk.
;
hspsaw_spin:
YIELD
cmp dword ptr [ebx], 0
jne hspsaw_spin
;
; Invalidate the processor cache so that any stray gamma
; rays (I'm serious) that may have flipped cache bits
; while in S1 will be ignored.
;
; Honestly. Intel asked for this. I'm serious.
;
;.586
; invd
;.386
pop ebx
stdRET _HalpSaveProcessorStateAndWait
stdENDP _HalpSaveProcessorStateAndWait
PAGELK ends ; end 32 bit code
end
| 27.657315 | 89 | 0.5538 |
9b165e1ca01b278b0a0afc11348aef65a93aa657 | 619 | asm | Assembly | oeis/070/A070832.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/070/A070832.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/070/A070832.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A070832: a(n) = Sum_{k=0..n} binomial(8*n,8*k).
; Submitted by Jon Maiga
; 1,2,12872,1470944,622116992,125858012672,36758056208384,8793364151263232,2334899414608412672,586347560750962049024,151652224498623981289472,38612725801339748322639872,9913426188311626771400228864,2533955167995403321755368947712,649220009237572713924215567286272,166128646348416044348203783531003904,42538672963645564276864352488314109952,10888576853720183143793628140149378383872,2787655504516730726038423975511945740550144,713615373455929152757197714956877532277768192
mul $0,8
seq $0,306859 ; a(n) = Sum_{k=0..floor(n/8)} binomial(n,8*k).
| 88.428571 | 471 | 0.869144 |
ba93ba0700f977f9fac47d25f7d1862b2a26d6bc | 489 | asm | Assembly | oeis/220/A220436.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/220/A220436.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/220/A220436.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A220436: a(n) = A127546(n)^2.
; Submitted by Jon Maiga
; 4,36,196,1444,9604,66564,454276,3118756,21362884,146458404,1003749124,6880038916,47155859716,323212716324,2215328606404,15184099435684,104073336269956,713329336067076,4889231802533764,33511293841053604,229689823620354244,1574317475335503396,10790532493690424836
add $0,1
mov $2,$0
seq $0,5248 ; Bisection of Lucas numbers: a(n) = L(2*n) = A000032(2*n).
sub $2,1
mod $2,2
add $2,$0
bin $2,2
mov $0,$2
div $0,25
mul $0,32
add $0,4
| 30.5625 | 263 | 0.762781 |
8b67150ecc6fa69d49f39568de734f53530bc5c0 | 108 | asm | Assembly | CPU/cpu_test/test_storage/mult.asm | SilenceX12138/MIPS-Microsystems | d389b706b0930151a710b544db436c2883af958b | [
"MIT"
] | 55 | 2021-09-06T12:12:47.000Z | 2022-01-15T04:30:53.000Z | CPU/cpu_test/test_storage/mult.asm | SilenceX12138/MIPS-Microsystems | d389b706b0930151a710b544db436c2883af958b | [
"MIT"
] | null | null | null | CPU/cpu_test/test_storage/mult.asm | SilenceX12138/MIPS-Microsystems | d389b706b0930151a710b544db436c2883af958b | [
"MIT"
] | null | null | null | .text
li $3,0x7fffffff
li $4,0x7fffffff
mult $3,$4
add $5,$3,$4
mflo $5
.ktext 0x4180
li $3,0
eret
| 9.818182 | 17 | 0.611111 |
420df503f53a837d709ce842c798e8faf4a334b4 | 2,355 | asm | Assembly | lib/target/myvision/classic/myvision_crt0.asm | witchcraft2001/z88dk | 11adca337a4125aff611ddfdf3fc2401e8dda5b2 | [
"ClArtistic"
] | 4 | 2021-11-20T19:35:01.000Z | 2022-01-01T16:08:42.000Z | lib/target/myvision/classic/myvision_crt0.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | null | null | null | lib/target/myvision/classic/myvision_crt0.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 1 | 2021-11-27T15:58:02.000Z | 2021-11-27T15:58:02.000Z | ;
; Startup for Nichibutsu My Vision
;
; 2k of memory
module myvision_crt0
;--------
; Include zcc_opt.def to find out some info
;--------
defc crt0 = 1
INCLUDE "zcc_opt.def"
;--------
; Some scope definitions
;--------
EXTERN _main ;main() is always external to crt0 code
PUBLIC cleanup ;jp'd to by exit()
PUBLIC l_dcal ;jp(hl)
PUBLIC msxbios
EXTERN msx_set_mode
EXTERN asm_im1_handler
EXTERN nmi_vectors
EXTERN im1_vectors
EXTERN asm_interrupt_handler
EXTERN __vdp_enable_status
EXTERN VDP_STATUS
defc CONSOLE_COLUMNS = 32
defc CONSOLE_ROWS = 24
defc CRT_ORG_BSS = 0xa000
defc CRT_ORG_CODE = 0x0000
defc TAR__fputc_cons_generic = 1
defc TAR__no_ansifont = 1
defc TAR__clib_exit_stack_size = 0
defc TAR__register_sp = 0xa800
defc CRT_KEY_DEL = 127
defc __CPU_CLOCK = 3579545
; VDP signals delivered to im1
defc TAR__crt_enable_rst = $8080
defc _z80_rst_38h = tms9918_interrupt
; No NMI on this machine
INCLUDE "crt/classic/crt_rules.inc"
org CRT_ORG_CODE
if (ASMPC<>$0000)
defs CODE_ALIGNMENT_ERROR
endif
jp start
INCLUDE "crt/classic/crt_z80_rsts.asm"
INCLUDE "crt/classic/tms9918/interrupt.asm"
ei
reti
int_VBL:
ld hl,im1_vectors
call asm_interrupt_handler
pop hl
pop af
ei
reti
start:
INCLUDE "crt/classic/crt_init_sp.asm"
INCLUDE "crt/classic/crt_init_atexit.asm"
call crt0_init_bss
ld (exitsp),sp
ld hl,2
call msx_set_mode
im 1
ei
; Optional definition for auto MALLOC init
; it assumes we have free space between the end of
; the compiled program and the stack pointer
IF DEFINED_USING_amalloc
INCLUDE "crt/classic/crt_init_amalloc.asm"
ENDIF
call _main
cleanup:
rst 0 ;Restart when main finishes
; Safe BIOS call
msxbios:
push ix
ret
l_dcal: jp (hl) ;Used for function pointer calls
INCLUDE "crt/classic/crt_runtime_selection.asm"
defc __crt_org_bss = CRT_ORG_BSS
IF DEFINED_CRT_MODEL
defc __crt_model = CRT_MODEL
ELSE
defc __crt_model = 1
ENDIF
INCLUDE "crt/classic/crt_section.asm"
| 20.478261 | 73 | 0.638217 |
075447dcf32c25df4f5adc980f42d00d3da3286c | 688 | asm | Assembly | oeis/008/A008999.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/008/A008999.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/008/A008999.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A008999: a(n) = 2*a(n-1) + a(n-4).
; Submitted by Jon Maiga
; 1,2,4,8,17,36,76,160,337,710,1496,3152,6641,13992,29480,62112,130865,275722,580924,1223960,2578785,5433292,11447508,24118976,50816737,107066766,225581040,475281056,1001378849,2109824464,4445229968,9365740992,19732860833,41575546130,87596322228,184558385448,388849631729,819274809588,1726145941404,3636850268256,7662550168241,16144375146070,34014896233544,71666642735344,150995835638929,318136046423928,670286989081400,1412240620898144,2975477077435217,6269090201294362,13208467391670124
add $0,2
lpb $0
sub $0,1
add $1,$5
add $1,1
sub $3,$4
mov $4,$2
add $2,$1
mov $1,$3
add $5,$4
mov $3,$5
lpe
mov $0,$4
| 38.222222 | 488 | 0.774709 |
e1b453ac92b47217ce15977f6d52dad57e3664a0 | 21,141 | asm | Assembly | HospitalAppDemo/asm/DATEVAL.asm | anuprakashm/HospitalAppDemo | 1eeb7a5e42821b9c7328224847a826833c7b025d | [
"Apache-2.0"
] | null | null | null | HospitalAppDemo/asm/DATEVAL.asm | anuprakashm/HospitalAppDemo | 1eeb7a5e42821b9c7328224847a826833c7b025d | [
"Apache-2.0"
] | null | null | null | HospitalAppDemo/asm/DATEVAL.asm | anuprakashm/HospitalAppDemo | 1eeb7a5e42821b9c7328224847a826833c7b025d | [
"Apache-2.0"
] | null | null | null | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Program for Date Validation. *
* This progam will read a 8 byte date in DDMMYYYY format and will *
* check if it is a valid date. *
* Program Input : 8 Byte String(Date) in DDMMYYYY format. *
* Program Output: 4 Byte string +0 for VALID and -1 for INVALID. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Sample COBOL invocation : *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* WORKING-STORAGE SECTION. *
* 77 STRING1 PIC 9(8). *
* 77 INBETWEEN PIC X(8). *
* 77 RESULT PIC S9(4). *
* PROCEDURE DIVISION. *
* PARA1. *
* MOVE '01122010' TO STRING1. *
* CALL 'DATEVAL' USING STRING1, RESULT. *
* DISPLAY RESULT. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
TITLE 'PROGRAM FOR DATE VALIDATION'
DATEVAL CSECT
STM 14,12,12(13) HOUSE KEEPING
BALR 12,0 LOAD BASER WITH PGM ENTRY
USING *,12 ESTABLISH BASER
LR R11,R13 OLD SAVE AREA
LA R13,SAVE NEW SAVE AREA
ST R11,4(R13) BACKWARD CHAIN
ST R13,8(R11) FWD CHAIN
L R7,0(R1) GET ADDR OF PARM1
L R9,4(R1) GET ADDR OF PARM2
USING WORKINGS,R7 DSECT IT
CLC WSDATE(8),=XL8'0000000000000000'
BE EMPTY
CLC WSDATE(8),=XL8'FFFFFFFFFFFFFFFF'
BE EMPTY
CLC WSDATE(8),=CL8' '
BE EMPTY
B CHKNEXT
EMPTY DS 0H
OI FLAG,X'40'
TM FLAG,INVALID
BO EXIT1
CHKNEXT DS 0H
NC FLAG,NULL1 CLEAR FLAGS
NC FLAGF,NULL1 CLEAR FLAGS
BAL R14,YYYYCHK BRANCH TO YEAR VALIDATION
TM FLAG,INVALID TEST FLAG FOR INVALID DATE
BO EXIT1 YES ? EXIT
SR R14,R14 CLEAR R14
BAL R14,MMCHK BRANCH TO MONTH VALIDATION
TM FLAG,INVALID TEST FLAG FOR INVALID DATE
BO EXIT1 YES ? EXIT
SR R14,R14 CLEAR R14
BAL R14,DDCHK BRANCH TO DAY VALIDATION
TM FLAG,INVALID TEST FLAG FOR INVALID DATE
BO EXIT1 YES ? EXIT
B NOREXIT NO ? BRANCH AROUND EXIT1
EXIT1 DS 0H
MVC STATUS(4),=X'F0F0F0D1' SET STATUS AS INVALID (-1)
B RETURN
NOREXIT DS 0H
MVC STATUS(4),=X'F0F0F0C0' SET STATUS AS VALID (+0)
RETURN DS 0H
MVC 0(4,R9),STATUS
L R13,SAVE+4 LOAD R13 WITH SAVEAREA
LM 14,12,12(13) RESTORE REGISTERS
LA 15,0(0,0) SET RC
BR 14 RETURN
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Routine to check for a leap year and a year between 1990 - 2050 *
* Routine Input : 4 Byte String(YYYY). *
* Routine Output: Will set the FLAG or FLAGF mask indicating *
* invalid year and/or leap year. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
YYYYCHK DS 0H
ST R14,ADDR1 SAVE RETURN ADDR
XC FLAGF,FLAGF CLEAR FLAG
PACK YYYY,WSYY PACK INPUT YEAR
PACK DIVIDENT,WSYY PACK YEAR TO DIVISOR
PACK DIVISOR,=CL1'4' PACK 4
DP DIVIDENT,DIVISOR DIVIDE
CP REMAIN,=PL8'0' COMPARE REMAINDER AND 0
BE LEAPSET EQUAL ? BRANCH TO LEAPSET
PACK DIVIDENT,WSYY PACK DIVIDENT
PACK DIVISOR,=CL3'400' PACK 400
DP DIVIDENT,DIVISOR DIVIDE
CP REMAIN,=PL8'0' COMPARE REMAINDER AND 0
BE LEAPSET EQUAL ? BRANCH TO LEAPSET
B NOLEAP NOT EQUAL ? GOTO NOLEAP
LEAPSET DS 0H
OI FLAGF,X'20' SET FLAGF TO LEAP
B NEXT1 BRANCH TO NEXT1
NOLEAP DS 0H
* WTO 'NOT A LEAP YEAR'
OI FLAGF,X'10' SET FLAGF TO NOLEAP
NEXT1 DS 0H
PACK COMP1,=CL4'1990' PACK 1990
CP YYYY,COMP1 COMPARE YEAR WITH 1990
BC 4,SETM YEAR < 1990
SCHECK DS 0H SET INVALID FLAG
PACK COMP1,=CL4'2050' PACK 2050
CP YYYY,COMP1 COMPARE YEAR WITH 2050
BC 2,SETM YEAR > 2050 SET INVLID
B AROUND BRANCH AROUND
SETM DS 0H
* WTO 'INPUT YEAR INVALID'
OI FLAG,X'40' SET INVALID FLAG
AROUND DS 0H
L R14,ADDR1 LOAD RETURN ADDR
BR R14 BRANCH
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Routine to check for a valid month and check 28/29 day for Feb. *
* Routine Input : 2 Byte Input Month and 2 Byte Input Date. *
* Routine Output: Will set the FLAG mask indicating *
* invalid input. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
MMCHK DS 0H
ST R14,ADDR1 STORE RETURN ADDR
PACK MM,WSMM PACK MONTH TO MM
PACK MMCP,=CL2'01' PACK 01 TO MMCP
CP MM,MMCP COMPARE INPUT MONTH AND 01
BC 4,SETM1 IF INPUT MM<0 SET INVALID
PACK MMCP,=CL2'12' PACK 12 TO MMCP
CP MM,MMCP COMPARE INPUT MONTH AND12
BC 2,SETM1 IF INPUT MM>12 SET INVALID
LA R5,MON31END LOAD NO OF TABLE ENTRIES
LA R4,MON31ONE LOAD LENGTH OF ONE ENTRY
LA R6,MON31 LOAD TABLE ADDRESS
PACK DEC,WSMM PACK INPUT MM TO DWORD
CVB R8,DEC CONVERT IT TO BINARY
LOOP1 DS 0H
C R8,0(R6) CHECK TABLE FOR MONTH
BE CHK31 FOUND ? BRANCH TO CHK31
LA R6,4(R6) BUMP TABLE
BCT R5,LOOP1 DECREMENT COUNTER AND LOOP
B LOOP2 ELSE GOTO LOOP2
CHK31 DS 0H
PACK DD,WSDD PACK INPUT DATE
PACK DDCP,=CL2'31' PACK 31
CP DD,DDCP COMPARE INPUT DATE WITH 31
BE CHKDONE EQUAL ? GOTO LOOP3
BC 4,LOOP2 INPUT DATE < 31 GOTO LOOP2
LOOP2 DS 0H
SR R4,R4 CLEAR R4
SR R5,R5 CLEAR R5
SR R6,R6 CLEAR R6
LA R5,MON30END LOAD 30MONTH NO OF ENTRIES
LA R4,MON30ONE LAOD 30MONTH ONE ENTRY LEN
LA R6,MON30 LOAD 30MONTH TABLE ADDR
SUBLOOP DS 0H
C R8,0(R6) COMPARE INP DATE WITH TAB
BE CHK30 EQUAL ? BRANCH TO CHK30
LA R6,4(R6) BUMP TABLE
BCT R5,SUBLOOP DECREMENT R5 AND LOOP
B LOOP3 GOTO LOOP3
CHK30 DS 0H
PACK DD,WSDD PACK INPUT DATE
PACK DDCP,=CL2'30' PACK 30
CP DD,DDCP COMPARE INP DATE WITH 30
BE CHKDONE EQUAL ? BRANCH TO LOOP3
BC 4,LOOP3 INPUT DATE < 30 GOTO LOOP3
B SETM1 SET INVALID
LOOP3 DS 0H
PACK DEC,WSDD PACK INPUT DATE INTO DWORD
CVB R8,DEC CONVERT TO BINARY
PACK MM,=CL2'02' PACK 2
PACK MMCP,WSMM PACK INPUT MONTH
CP MM,MMCP COMPARE INP MONTH WITH 2
BE CHK28 EQUAL ? BRANCH TO CHK28
B CHKDONE BRANCH TO CHKDONE
CHK28 DS 0H
TM FLAGF,LEAPF TEST LEAP FLAG
BO LEAPCHK2 SET ? GOTO LEAPCHK2
B LEAPCHK3 NO SET ? GOTO LEAPCHK3
LEAPCHK2 DS 0H
C R8,=F'29' COMPARE INP DATE WITH 29
BE CHKDONE EQUAL ? GOTO CHKDONE
BC 4,CHKDONE INPUT DATE < 29 GOTO CHKD
B SETM1 SET INVALID
LEAPCHK3 DS 0H
C R8,=F'28' COMPARE INPUT DATE WITH 28
BE CHKDONE EQUAL ? BRANCH TO CHKDONE
BC 4,CHKDONE INPUT DATE < 28 ? B TO CHK
B SETM1 SET INVALID
CHKDONE DS 0H
B AROUND BRANCH AROUND INVALID
SETM1 DS 0H
* WTO 'INPUT MONTH/DATE INVALID'
OI FLAG,X'40'
AROUND1 DS 0H
L R14,ADDR1 LOAD RETUN ADDRESS
BR R14 BRANCH
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Routine to check for a valid day. *
* Routine Input : 2 Byte String(DD). *
* Routine Output: Will set the FLAG mask indicating valid/ *
* invalid input. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
DDCHK DS 0H
ST R14,ADDR1 STORE RETURN ADDR
PACK DD,WSDD
PACK DDCP,=CL2'01' PACK 01 TO DDCP
CP DD,DDCP COMPARE INPUT AND 01
BC 4,SETM2 IS INPUT < 01 ?Y SET INV
PACK DDCP,=CL2'31' PACK 31 TO DDCP
CP DD,DDCP IS INPUT > 31 ?
BC 2,SETM2 YES BRANCH SET INVALID
B OUT NO ? BRANCH OUT
SETM2 DS 0H
OI FLAG,X'40' SET INVALID FLAG
OUT DS 0H
L R14,ADDR1 LOAD RETURN ADDRESS
BR R14 RETURN
* Program variables/constants/equates
SAVE DS 18F
DEC DS D
ADDR1 DS A
YYYY DS PL4
MM DS PL2
MMCP DS PL2
DD DS PL2
DDCP DS PL2
COMP1 DS PL4
DIVID1 DS CL3
DIVIDENT DS 0PL16
QUO DS PL8
REMAIN DS PL8
DIVISOR DS PL8
VALID EQU X'80'
INVALID EQU X'40'
FLAG DC X'00'
LEAPF EQU X'20'
NOLEAPF EQU X'10'
FLAGF DC X'00'
NULL1 DC X'00'
MON31 DS 0F
DC F'01'
MON31ONE EQU *-MON31
DC F'03'
DC F'05'
DC F'07'
DC F'08'
DC F'10'
DC F'12'
MON31END EQU (*-MON31)/MON31ONE
MON30 DS 0F
DC F'04'
MON30ONE EQU *-MON30
DC F'06'
DC F'09'
DC F'11'
MON30END EQU (*-MON30)/MON30ONE
STATUS DS CL4
YREGS
*Program DSECTS
WORKINGS DSECT
WSDATE DS 0CL8
WSMM DS CL2
WSDD DS CL2
WSYY DS CL4
END DATEVAL
| 80.69084 | 80 | 0.232156 |
2edfa4932a71ceb6ef96b84e57ea5b8ba53f96a4 | 5,410 | asm | Assembly | sources/ippcp/asm_intel64/pcpbnuincm7as.asm | idesai/ipp-crypto | 67220e3042f23d423c7977cdfd8b4f54f3cba2e0 | [
"Apache-2.0"
] | 1 | 2020-11-03T21:30:58.000Z | 2020-11-03T21:30:58.000Z | sources/ippcp/asm_intel64/pcpbnuincm7as.asm | idesai/ipp-crypto | 67220e3042f23d423c7977cdfd8b4f54f3cba2e0 | [
"Apache-2.0"
] | null | null | null | sources/ippcp/asm_intel64/pcpbnuincm7as.asm | idesai/ipp-crypto | 67220e3042f23d423c7977cdfd8b4f54f3cba2e0 | [
"Apache-2.0"
] | null | null | null | ;===============================================================================
; Copyright 2014-2018 Intel Corporation
; All Rights Reserved.
;
; If this software was obtained under the Intel Simplified Software License,
; the following terms apply:
;
; The source code, information and material ("Material") contained herein is
; owned by Intel Corporation or its suppliers or licensors, and title to such
; Material remains with Intel Corporation or its suppliers or licensors. The
; Material contains proprietary information of Intel or its suppliers and
; licensors. The Material is protected by worldwide copyright laws and treaty
; provisions. No part of the Material may be used, copied, reproduced,
; modified, published, uploaded, posted, transmitted, distributed or disclosed
; in any way without Intel's prior express written permission. No license under
; any patent, copyright or other intellectual property rights in the Material
; is granted to or conferred upon you, either expressly, by implication,
; inducement, estoppel or otherwise. Any license under such intellectual
; property rights must be express and approved by Intel in writing.
;
; Unless otherwise agreed by Intel in writing, you may not remove or alter this
; notice or any other notice embedded in Materials by Intel or Intel's
; suppliers or licensors in any way.
;
;
; If this software was obtained under the Apache License, Version 2.0 (the
; "License"), the following terms apply:
;
; 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.
;===============================================================================
;
;
; Purpose: Cryptography Primitive.
; Big Number Operations
;
; Content:
; cpInc_BNU()
; cpDec_BNU()
;
;
include asmdefs.inc
include ia_32e.inc
IF _IPP32E GE _IPP32E_M7
IPPCODE SEGMENT 'CODE' ALIGN (IPP_ALIGN_FACTOR)
;*************************************************************
;* Ipp64u cpInc_BNU(Ipp64u* pDst,
;* const Ipp64u* pSrc, int len,
;* Ipp64u increment)
;* returns carry
;*************************************************************
ALIGN IPP_ALIGN_FACTOR
IPPASM cpInc_BNU PROC PUBLIC FRAME
USES_GPR rsi,rdi
LOCAL_FRAME = 0
USES_XMM
COMP_ABI 4
; rdi = pDst
; rsi = pSrc
; rdx = len
; rcx = increment
movsxd rdx, edx ; length
mov r8, qword ptr [rsi] ; r[0] = r[0]+increment
add r8, rcx
mov qword ptr [rdi], r8
lea rsi, [rsi+rdx*sizeof(qword)]
lea rdi, [rdi+rdx*sizeof(qword)]
lea rcx, [rdx*sizeof(qword)]
sbb rax, rax ; save cf
neg rcx ; rcx = negative length (bytes)
add rcx, sizeof(qword)
jrcxz exit
add rax, rax ; restore cf
jnc copy
ALIGN IPP_ALIGN_FACTOR
inc_loop:
mov r8, qword ptr [rsi+rcx]
adc r8, 0
mov qword ptr [rdi+rcx], r8
lea rcx, [rcx+sizeof(qword)]
jrcxz exit_loop
jnc exit_loop
jmp inc_loop
exit_loop:
sbb rax, rax ; save cf
copy:
cmp rsi, rdi
jz exit
jrcxz exit
copy_loop:
mov r8, qword ptr [rsi+rcx]
mov qword ptr [rdi+rcx], r8
add rcx, sizeof(qword)
jnz copy_loop
exit:
neg rax
REST_XMM
REST_GPR
ret
IPPASM cpInc_BNU ENDP
;*************************************************************
;* Ipp64u cpDec_BNU(Ipp64u* pDst,
;* const Ipp64u* pSrc, int len,
;* Ipp64u increment)
;* returns borrow
;*************************************************************
ALIGN IPP_ALIGN_FACTOR
IPPASM cpDec_BNU PROC PUBLIC FRAME
USES_GPR rsi,rdi
LOCAL_FRAME = 0
USES_XMM
COMP_ABI 4
; rdi = pDst
; rsi = pSrc
; rdx = len
; rcx = increment
movsxd rdx, edx ; length
mov r8, qword ptr [rsi] ; r[0] = r[0]+increment
sub r8, rcx
mov qword ptr [rdi], r8
lea rsi, [rsi+rdx*sizeof(qword)]
lea rdi, [rdi+rdx*sizeof(qword)]
lea rcx, [rdx*sizeof(qword)]
sbb rax, rax ; save cf
neg rcx ; rcx = negative length (bytes)
add rcx, sizeof(qword)
jrcxz exit
add rax, rax ; restore cf
jnc copy
ALIGN IPP_ALIGN_FACTOR
inc_loop:
mov r8, qword ptr [rsi+rcx]
sbb r8, 0
mov qword ptr [rdi+rcx], r8
lea rcx, [rcx+sizeof(qword)]
jrcxz exit_loop
jnc exit_loop
jmp inc_loop
exit_loop:
sbb rax, rax ; save cf
copy:
cmp rsi, rdi
jz exit
jrcxz exit
copy_loop:
mov r8, qword ptr [rsi+rcx]
mov qword ptr [rdi+rcx], r8
add rcx, sizeof(qword)
jnz copy_loop
exit:
neg rax
REST_XMM
REST_GPR
ret
IPPASM cpDec_BNU ENDP
ENDIF
END
| 28.177083 | 80 | 0.575046 |
6e60cadc31d2781248041383ddfaf97e65bf35bd | 22,405 | asm | Assembly | src/x86/cdef.asm | markshuttle/dav1d | 2bc6cbbf0acfb0b84318f80f9573c76a1252e371 | [
"BSD-2-Clause"
] | null | null | null | src/x86/cdef.asm | markshuttle/dav1d | 2bc6cbbf0acfb0b84318f80f9573c76a1252e371 | [
"BSD-2-Clause"
] | null | null | null | src/x86/cdef.asm | markshuttle/dav1d | 2bc6cbbf0acfb0b84318f80f9573c76a1252e371 | [
"BSD-2-Clause"
] | null | null | null | ; Copyright © 2018, VideoLAN and dav1d authors
; Copyright © 2018, Two Orioles, 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.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
; ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%include "config.asm"
%include "ext/x86/x86inc.asm"
%if ARCH_X86_64
SECTION_RODATA 32
pd_04512763: dd 0, 4, 5, 1, 2, 7, 6, 3
div_table: dd 840, 420, 280, 210, 168, 140, 120, 105
dd 420, 210, 140, 105
pd_04261537: dd 0, 4, 2, 6, 1, 5, 3, 7
shufw_6543210x: db 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1, 14, 15
shufw_210xxxxx: db 4, 5, 2, 3, 0, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
pw_128: times 2 dw 128
pw_2048: times 2 dw 2048
tap_table: dw 4, 2, 3, 3, 2, 1
db -1 * 16 + 1, -2 * 16 + 2
db 0 * 16 + 1, -1 * 16 + 2
db 0 * 16 + 1, 0 * 16 + 2
db 0 * 16 + 1, 1 * 16 + 2
db 1 * 16 + 1, 2 * 16 + 2
db 1 * 16 + 0, 2 * 16 + 1
db 1 * 16 + 0, 2 * 16 + 0
db 1 * 16 + 0, 2 * 16 - 1
; the last 6 are repeats of the first 6 so we don't need to & 7
db -1 * 16 + 1, -2 * 16 + 2
db 0 * 16 + 1, -1 * 16 + 2
db 0 * 16 + 1, 0 * 16 + 2
db 0 * 16 + 1, 1 * 16 + 2
db 1 * 16 + 1, 2 * 16 + 2
db 1 * 16 + 0, 2 * 16 + 1
SECTION .text
%macro ACCUMULATE_TAP 6 ; tap_offset, shift, strength, mul_tap, w, stride
; load p0/p1
movsx offq, byte [dirq+kq+%1] ; off1
%if %5 == 4
movq xm5, [stkq+offq*2+%6*0] ; p0
movq xm6, [stkq+offq*2+%6*2]
movhps xm5, [stkq+offq*2+%6*1]
movhps xm6, [stkq+offq*2+%6*3]
vinserti128 m5, xm6, 1
%else
movu xm5, [stkq+offq*2+%6*0] ; p0
vinserti128 m5, [stkq+offq*2+%6*1], 1
%endif
neg offq ; -off1
%if %5 == 4
movq xm6, [stkq+offq*2+%6*0] ; p1
movq xm9, [stkq+offq*2+%6*2]
movhps xm6, [stkq+offq*2+%6*1]
movhps xm9, [stkq+offq*2+%6*3]
vinserti128 m6, xm9, 1
%else
movu xm6, [stkq+offq*2+%6*0] ; p1
vinserti128 m6, [stkq+offq*2+%6*1], 1
%endif
pcmpeqw m9, m14, m5
pcmpeqw m10, m14, m6
pandn m9, m5
pandn m10, m6
pmaxsw m7, m9 ; max after p0
pminsw m8, m5 ; min after p0
pmaxsw m7, m10 ; max after p1
pminsw m8, m6 ; min after p1
; accumulate sum[m15] over p0/p1
psubw m5, m4 ; diff_p0(p0 - px)
psubw m6, m4 ; diff_p1(p1 - px)
pabsw m9, m5
pabsw m10, m6
psraw m11, m9, %2
psraw m12, m10, %2
psubw m11, %3, m11
psubw m12, %3, m12
pmaxsw m11, m13
pmaxsw m12, m13
pminsw m11, m9
pminsw m12, m10
psignw m11, m5 ; constrain(diff_p0)
psignw m12, m6 ; constrain(diff_p1)
pmullw m11, %4 ; constrain(diff_p0) * pri_taps
pmullw m12, %4 ; constrain(diff_p1) * pri_taps
paddw m15, m11
paddw m15, m12
%endmacro
%macro cdef_filter_fn 3 ; w, h, stride
INIT_YMM avx2
cglobal cdef_filter_%1x%2, 4, 9, 16, 2 * 16 + (%2+4)*%3, \
dst, stride, left, top, pri, sec, stride3, dst4, edge
%define px rsp+2*16+2*%3
pcmpeqw m14, m14
psrlw m14, 1 ; 0x7fff
mov edged, r8m
; prepare pixel buffers - body/right
%if %1 == 4
INIT_XMM avx2
%endif
%if %2 == 8
lea dst4q, [dstq+strideq*4]
%endif
lea stride3q, [strideq*3]
test edged, 2 ; have_right
jz .no_right
pmovzxbw m1, [dstq+strideq*0]
pmovzxbw m2, [dstq+strideq*1]
pmovzxbw m3, [dstq+strideq*2]
pmovzxbw m4, [dstq+stride3q]
mova [px+0*%3], m1
mova [px+1*%3], m2
mova [px+2*%3], m3
mova [px+3*%3], m4
%if %2 == 8
pmovzxbw m1, [dst4q+strideq*0]
pmovzxbw m2, [dst4q+strideq*1]
pmovzxbw m3, [dst4q+strideq*2]
pmovzxbw m4, [dst4q+stride3q]
mova [px+4*%3], m1
mova [px+5*%3], m2
mova [px+6*%3], m3
mova [px+7*%3], m4
%endif
jmp .body_done
.no_right:
%if %1 == 4
movd xm1, [dstq+strideq*0]
movd xm2, [dstq+strideq*2]
pinsrd xm1, [dstq+strideq*1], 1
pinsrd xm2, [dstq+stride3q], 1
pmovzxbw xm1, xm1
pmovzxbw xm2, xm2
movq [px+0*%3], xm1
movhps [px+1*%3], xm1
movq [px+2*%3], xm2
movhps [px+3*%3], xm2
%else
pmovzxbw xm1, [dstq+strideq*0]
pmovzxbw xm2, [dstq+strideq*1]
pmovzxbw xm3, [dstq+strideq*2]
pmovzxbw xm4, [dstq+stride3q]
mova [px+0*%3], xm1
mova [px+1*%3], xm2
mova [px+2*%3], xm3
mova [px+3*%3], xm4
%endif
movd [px+0*%3+%1*2], xm14
movd [px+1*%3+%1*2], xm14
movd [px+2*%3+%1*2], xm14
movd [px+3*%3+%1*2], xm14
%if %2 == 8
; FIXME w == 4
movd [px+0*%3+%1*2], xm14
movd [px+1*%3+%1*2], xm14
movd [px+2*%3+%1*2], xm14
movd [px+3*%3+%1*2], xm14
pmovzxbw xm1, [dst4q+strideq*0]
pmovzxbw xm2, [dst4q+strideq*1]
pmovzxbw xm3, [dst4q+strideq*2]
pmovzxbw xm4, [dst4q+stride3q]
mova [px+4*%3], xm1
mova [px+5*%3], xm2
mova [px+6*%3], xm3
mova [px+7*%3], xm4
movd [px+4*%3+%1*2], xm14
movd [px+5*%3+%1*2], xm14
movd [px+6*%3+%1*2], xm14
movd [px+7*%3+%1*2], xm14
%endif
.body_done:
; top
DEFINE_ARGS dst, stride, left, top2, pri, sec, stride3, top1, edge
test edged, 4 ; have_top
jz .no_top
mov top1q, [top2q+0*gprsize]
mov top2q, [top2q+1*gprsize]
test edged, 1 ; have_left
jz .top_no_left
test edged, 2 ; have_right
jz .top_no_right
pmovzxbw m1, [top1q-(%1/2)]
pmovzxbw m2, [top2q-(%1/2)]
movu [px-2*%3-%1], m1
movu [px-1*%3-%1], m2
jmp .top_done
.top_no_right:
pmovzxbw m1, [top1q-%1]
pmovzxbw m2, [top2q-%1]
movu [px-2*%3-%1*2], m1
movu [px-1*%3-%1*2], m2
movd [px-2*%3+%1*2], xm14
movd [px-1*%3+%1*2], xm14
jmp .top_done
.top_no_left:
test edged, 2 ; have_right
jz .top_no_left_right
pmovzxbw m1, [top1q]
pmovzxbw m2, [top2q]
mova [px-2*%3+0], m1
mova [px-1*%3+0], m2
movd [px-2*%3-4], xm14
movd [px-1*%3-4], xm14
jmp .top_done
.top_no_left_right:
%if %1 == 4
movd xm1, [top1q]
pinsrd xm1, [top2q], 1
pmovzxbw xm1, xm1
movq [px-2*%3+0], xm1
movhps [px-1*%3+0], xm1
%else
pmovzxbw xm1, [top1q]
pmovzxbw xm2, [top2q]
mova [px-2*%3+0], xm1
mova [px-1*%3+0], xm2
%endif
movd [px-2*%3-4], xm14
movd [px-1*%3-4], xm14
movd [px-2*%3+%1*2], xm14
movd [px-1*%3+%1*2], xm14
jmp .top_done
.no_top:
movu [px-2*%3-%1], m14
movu [px-1*%3-%1], m14
.top_done:
; left
test edged, 1 ; have_left
jz .no_left
pmovzxbw xm1, [leftq+ 0]
%if %2 == 8
pmovzxbw xm2, [leftq+ 8]
%endif
movd [px+0*32-4], xm1
pextrd [px+1*32-4], xm1, 1
pextrd [px+2*32-4], xm1, 2
pextrd [px+3*32-4], xm1, 3
%if %2 == 8
movd [px+4*32-4], xm2
pextrd [px+5*32-4], xm2, 1
pextrd [px+6*32-4], xm2, 2
pextrd [px+7*32-4], xm2, 3
%endif
jmp .left_done
.no_left:
movd [px+0*%3-4], xm14
movd [px+1*%3-4], xm14
movd [px+2*%3-4], xm14
movd [px+3*%3-4], xm14
%if %2 == 8
movd [px+4*%3-4], xm14
movd [px+5*%3-4], xm14
movd [px+6*%3-4], xm14
movd [px+7*%3-4], xm14
%endif
.left_done:
; bottom
DEFINE_ARGS dst, stride, dst8, dummy1, pri, sec, stride3, dummy3, edge
test edged, 8 ; have_bottom
jz .no_bottom
lea dst8q, [dstq+%2*strideq]
test edged, 1 ; have_left
jz .bottom_no_left
test edged, 2 ; have_right
jz .bottom_no_right
pmovzxbw m1, [dst8q-(%1/2)]
pmovzxbw m2, [dst8q+strideq-(%1/2)]
movu [px+(%2+0)*%3-%1], m1
movu [px+(%2+1)*%3-%1], m2
jmp .bottom_done
.bottom_no_right:
pmovzxbw m1, [dst8q-%1]
pmovzxbw m2, [dst8q+strideq-%1]
movu [px+(%2+0)*%3-%1*2], m1
movu [px+(%2+1)*%3-%1*2], m2
%if %1 == 8
movd [px+(%2-1)*%3+%1*2], xm14 ; overwritten by previous movu
%endif
movd [px+(%2+0)*%3+%1*2], xm14
movd [px+(%2+1)*%3+%1*2], xm14
jmp .bottom_done
.bottom_no_left:
test edged, 2 ; have_right
jz .bottom_no_left_right
pmovzxbw m1, [dst8q]
pmovzxbw m2, [dst8q+strideq]
mova [px+(%2+0)*%3+0], m1
mova [px+(%2+1)*%3+0], m2
movd [px+(%2+0)*%3-4], xm14
movd [px+(%2+1)*%3-4], xm14
jmp .bottom_done
.bottom_no_left_right:
%if %1 == 4
movd xm1, [dst8q]
pinsrd xm1, [dst8q+strideq], 1
pmovzxbw xm1, xm1
movq [px+(%2+0)*%3+0], xm1
movhps [px+(%2+1)*%3+0], xm1
%else
pmovzxbw xm1, [dst8q]
pmovzxbw xm2, [dst8q+strideq]
mova [px+(%2+0)*%3+0], xm1
mova [px+(%2+1)*%3+0], xm2
%endif
movd [px+(%2+0)*%3-4], xm14
movd [px+(%2+1)*%3-4], xm14
movd [px+(%2+0)*%3+%1*2], xm14
movd [px+(%2+1)*%3+%1*2], xm14
jmp .bottom_done
.no_bottom:
movu [px+(%2+0)*%3-%1], m14
movu [px+(%2+1)*%3-%1], m14
.bottom_done:
; actual filter
INIT_YMM avx2
DEFINE_ARGS dst, stride, pridmp, damping, pri, sec, stride3, secdmp
%undef edged
movifnidn prid, prim
movifnidn secd, secm
mov dampingd, r7m
mov pridmpd, prid
mov secdmpd, secd
or pridmpd, 1
or secdmpd, 1
lzcnt pridmpd, pridmpd
lzcnt secdmpd, secdmpd
lea pridmpd, [pridmpd+dampingd-31]
lea secdmpd, [secdmpd+dampingd-31]
xor dampingd, dampingd
test pridmpd, pridmpd
cmovl pridmpd, dampingd
test secdmpd, secdmpd
cmovl secdmpd, dampingd
mov [rsp+0], pridmpq ; pri_shift
mov [rsp+8], secdmpq ; sec_shift
; pri/sec_taps[k] [4 total]
DEFINE_ARGS dst, stride, tap, dummy, pri, sec, stride3
movd xm0, prid
movd xm1, secd
vpbroadcastw m0, xm0 ; pri_strength
vpbroadcastw m1, xm1 ; sec_strength
and prid, 1
lea tapq, [tap_table]
lea priq, [tapq+priq*4] ; pri_taps
lea secq, [tapq+8] ; sec_taps
; off1/2/3[k] [6 total] from [tapq+12+(dir+0/2/6)*2+k]
DEFINE_ARGS dst, stride, tap, dir, pri, sec, stride3
mov dird, r6m
lea tapq, [tapq+dirq*2+12]
%if %1*%2*2/mmsize > 1
DEFINE_ARGS dst, stride, dir, stk, pri, sec, h, off, k
mov hd, %1*%2*2/mmsize
%else
DEFINE_ARGS dst, stride, dir, stk, pri, sec, stride3, off, k
%endif
lea stkq, [px]
pxor m13, m13
%if %1*%2*2/mmsize > 1
.v_loop:
%endif
mov kd, 1
%if %1 == 4
movq xm4, [stkq+%3*0]
movhps xm4, [stkq+%3*1]
movq xm5, [stkq+%3*2]
movhps xm5, [stkq+%3*3]
vinserti128 m4, xm5, 1
%else
mova xm4, [stkq+%3*0] ; px
vinserti128 m4, [stkq+%3*1], 1
%endif
pxor m15, m15 ; sum
mova m7, m4 ; max
mova m8, m4 ; min
.k_loop:
vpbroadcastw m2, [priq+kq*2] ; pri_taps
vpbroadcastw m3, [secq+kq*2] ; sec_taps
ACCUMULATE_TAP 0*2, [rsp+0], m0, m2, %1, %3
ACCUMULATE_TAP 2*2, [rsp+8], m1, m3, %1, %3
ACCUMULATE_TAP 6*2, [rsp+8], m1, m3, %1, %3
dec kq
jge .k_loop
vpbroadcastd m12, [pw_2048]
pcmpgtw m11, m13, m15
paddw m15, m11
pmulhrsw m15, m12
paddw m4, m15
pminsw m4, m7
pmaxsw m4, m8
packuswb m4, m4
vextracti128 xm5, m4, 1
%if %1 == 4
movd [dstq+strideq*0], xm4
pextrd [dstq+strideq*1], xm4, 1
movd [dstq+strideq*2], xm5
pextrd [dstq+stride3q], xm5, 1
%else
movq [dstq+strideq*0], xm4
movq [dstq+strideq*1], xm5
%endif
%if %1*%2*2/mmsize > 1
lea dstq, [dstq+strideq*2]
add stkq, %3*2
dec hd
jg .v_loop
%endif
RET
%endmacro
cdef_filter_fn 8, 8, 32
cdef_filter_fn 4, 4, 32
INIT_YMM avx2
cglobal cdef_dir, 3, 4, 15, src, stride, var, stride3
lea stride3q, [strideq*3]
movq xm0, [srcq+strideq*0]
movq xm1, [srcq+strideq*1]
movq xm2, [srcq+strideq*2]
movq xm3, [srcq+stride3q]
lea srcq, [srcq+strideq*4]
vpbroadcastq m4, [srcq+strideq*0]
vpbroadcastq m5, [srcq+strideq*1]
vpbroadcastq m6, [srcq+strideq*2]
vpbroadcastq m7, [srcq+stride3q]
vpbroadcastd m8, [pw_128]
pxor m9, m9
vpblendd m0, m0, m7, 0xf0
vpblendd m1, m1, m6, 0xf0
vpblendd m2, m2, m5, 0xf0
vpblendd m3, m3, m4, 0xf0
punpcklbw m0, m9
punpcklbw m1, m9
punpcklbw m2, m9
punpcklbw m3, m9
psubw m0, m8
psubw m1, m8
psubw m2, m8
psubw m3, m8
; shuffle registers to generate partial_sum_diag[0-1] together
vpermq m7, m0, q1032
vpermq m6, m1, q1032
vpermq m5, m2, q1032
vpermq m4, m3, q1032
; start with partial_sum_hv[0-1]
paddw m8, m0, m1
paddw m9, m2, m3
phaddw m10, m0, m1
phaddw m11, m2, m3
paddw m8, m9
phaddw m10, m11
vextracti128 xm9, m8, 1
vextracti128 xm11, m10, 1
paddw xm8, xm9 ; partial_sum_hv[1]
phaddw xm10, xm11 ; partial_sum_hv[0]
vinserti128 m8, xm10, 1
vpbroadcastd m9, [div_table+44]
pmaddwd m8, m8
pmulld m8, m9 ; cost6[2a-d] | cost2[a-d]
; create aggregates [lower half]:
; m9 = m0:01234567+m1:x0123456+m2:xx012345+m3:xxx01234+
; m4:xxxx0123+m5:xxxxx012+m6:xxxxxx01+m7:xxxxxxx0
; m10= m1:7xxxxxxx+m2:67xxxxxx+m3:567xxxxx+
; m4:4567xxxx+m5:34567xxx+m6:234567xx+m7:1234567x
; and [upper half]:
; m9 = m0:xxxxxxx0+m1:xxxxxx01+m2:xxxxx012+m3:xxxx0123+
; m4:xxx01234+m5:xx012345+m6:x0123456+m7:01234567
; m10= m0:1234567x+m1:234567xx+m2:34567xxx+m3:4567xxxx+
; m4:567xxxxx+m5:67xxxxxx+m6:7xxxxxxx
; and then shuffle m11 [shufw_6543210x], unpcklwd, pmaddwd, pmulld, paddd
pslldq m9, m1, 2
psrldq m10, m1, 14
pslldq m11, m2, 4
psrldq m12, m2, 12
pslldq m13, m3, 6
psrldq m14, m3, 10
paddw m9, m11
paddw m10, m12
paddw m9, m13
paddw m10, m14
pslldq m11, m4, 8
psrldq m12, m4, 8
pslldq m13, m5, 10
psrldq m14, m5, 6
paddw m9, m11
paddw m10, m12
paddw m9, m13
paddw m10, m14
pslldq m11, m6, 12
psrldq m12, m6, 4
pslldq m13, m7, 14
psrldq m14, m7, 2
paddw m9, m11
paddw m10, m12
paddw m9, m13
paddw m10, m14 ; partial_sum_diag[0/1][8-14,zero]
vbroadcasti128 m14, [shufw_6543210x]
vbroadcasti128 m13, [div_table+16]
vbroadcasti128 m12, [div_table+0]
paddw m9, m0 ; partial_sum_diag[0/1][0-7]
pshufb m10, m14
punpckhwd m11, m9, m10
punpcklwd m9, m10
pmaddwd m11, m11
pmaddwd m9, m9
pmulld m11, m13
pmulld m9, m12
paddd m9, m11 ; cost0[a-d] | cost4[a-d]
; merge horizontally and vertically for partial_sum_alt[0-3]
paddw m10, m0, m1
paddw m11, m2, m3
paddw m12, m4, m5
paddw m13, m6, m7
phaddw m0, m4
phaddw m1, m5
phaddw m2, m6
phaddw m3, m7
; create aggregates [lower half]:
; m4 = m10:01234567+m11:x0123456+m12:xx012345+m13:xxx01234
; m11= m11:7xxxxxxx+m12:67xxxxxx+m13:567xxxxx
; and [upper half]:
; m4 = m10:xxx01234+m11:xx012345+m12:x0123456+m13:01234567
; m11= m10:567xxxxx+m11:67xxxxxx+m12:7xxxxxxx
; and then shuffle m11 [shufw_210xxxxx], unpcklwd, pmaddwd, pmulld, paddd
vbroadcasti128 m14, [shufw_210xxxxx]
pslldq m4, m11, 2
psrldq m11, 14
pslldq m5, m12, 4
psrldq m12, 12
pslldq m6, m13, 6
psrldq m13, 10
paddw m4, m10
paddw m11, m12
vpbroadcastd m12, [div_table+44]
paddw m5, m6
paddw m11, m13 ; partial_sum_alt[3/2] right
vbroadcasti128 m13, [div_table+32]
paddw m4, m5 ; partial_sum_alt[3/2] left
pshufb m11, m14
punpckhwd m6, m4, m11
punpcklwd m4, m11
pmaddwd m6, m6
pmaddwd m4, m4
pmulld m6, m12
pmulld m4, m13
paddd m4, m6 ; cost7[a-d] | cost5[a-d]
; create aggregates [lower half]:
; m5 = m0:01234567+m1:x0123456+m2:xx012345+m3:xxx01234
; m1 = m1:7xxxxxxx+m2:67xxxxxx+m3:567xxxxx
; and [upper half]:
; m5 = m0:xxx01234+m1:xx012345+m2:x0123456+m3:01234567
; m1 = m0:567xxxxx+m1:67xxxxxx+m2:7xxxxxxx
; and then shuffle m11 [shufw_210xxxxx], unpcklwd, pmaddwd, pmulld, paddd
pslldq m5, m1, 2
psrldq m1, 14
pslldq m6, m2, 4
psrldq m2, 12
pslldq m7, m3, 6
psrldq m3, 10
paddw m5, m0
paddw m1, m2
paddw m6, m7
paddw m1, m3 ; partial_sum_alt[0/1] right
paddw m5, m6 ; partial_sum_alt[0/1] left
pshufb m1, m14
punpckhwd m6, m5, m1
punpcklwd m5, m1
pmaddwd m6, m6
pmaddwd m5, m5
pmulld m6, m12
pmulld m5, m13
paddd m5, m6 ; cost1[a-d] | cost3[a-d]
mova xm0, [pd_04512763+ 0]
mova xm1, [pd_04512763+ 16]
phaddd m9, m8
phaddd m5, m4
phaddd m9, m5
vpermd m0, m9 ; cost[0/4/2/6]
vpermd m1, m9 ; cost[1/5/3/7]
; now find the best cost, its idx^4 complement, and its idx
pcmpgtd xm2, xm1, xm0 ; [1/5/3/7] > [0/4/2/6]
pand xm3, xm2, xm1
pandn xm4, xm2, xm0
por xm3, xm4 ; higher 4 values
pshufd xm1, xm1, q2301
pshufd xm0, xm0, q2301
pand xm1, xm2, xm1
pandn xm0, xm2, xm0
por xm0, xm1 ; complementary 4 values at idx^4 offset
pand xm13, xm2, [pd_04261537+16]
pandn xm14, xm2, [pd_04261537+ 0]
por xm14, xm13 ; indices
punpckhqdq xm4, xm3, xm0
punpcklqdq xm3, xm0
pcmpgtd xm5, xm4, xm3 ; [2or3-6or7] > [0or1/4or5]
punpcklqdq xm5, xm5
pand xm6, xm5, xm4
pandn xm7, xm5, xm3
por xm6, xm7 ; { highest 2 values, complements at idx^4 }
movhlps xm13, xm14
pand xm13, xm5, xm13
pandn xm14, xm5, xm14
por xm14, xm13
pshufd xm7, xm6, q3311
pcmpgtd xm8, xm7, xm6 ; [4or5or6or7] > [0or1or2or3]
punpcklqdq xm8, xm8
pand xm9, xm8, xm7
pandn xm10, xm8, xm6
por xm9, xm10 ; max
movhlps xm10, xm9 ; complement at idx^4
psubd xm9, xm10
psrld xm9, 10
movd [varq], xm9
pshufd xm13, xm14, q1111
pand xm13, xm8, xm13
pandn xm14, xm8, xm14
por xm14, xm13
movd eax, xm14
RET
%endif ; ARCH_X86_64
| 33.291233 | 88 | 0.495559 |
24bc5f5bcdbca144ab570fc925406eb7d4efc56e | 3,753 | asm | Assembly | Transynther/x86/_processed/NONE/_st_un_/i7-7700_9_0xca.log_21829_1554.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_st_un_/i7-7700_9_0xca.log_21829_1554.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_st_un_/i7-7700_9_0xca.log_21829_1554.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r8
push %rax
push %rdi
push %rdx
push %rsi
// Faulty Load
lea addresses_WT+0x1a437, %r8
nop
nop
nop
nop
nop
xor $7008, %rdx
movups (%r8), %xmm7
vpextrq $0, %xmm7, %rax
lea oracles, %r8
and $0xff, %rax
shlq $12, %rax
mov (%r8,%rax,1), %rax
pop %rsi
pop %rdx
pop %rdi
pop %rax
pop %r8
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'3c': 371, 'ff': 10643, 'e0': 10815}
ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 3c e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 3c 3c ff e0 ff e0 e0 ff e0 ff e0 ff e0 ff e0 ff e0 3c 3c ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 3c e0 e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 3c e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 3c 3c 3c ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 3c ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 3c ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 3c 3c ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0 ff e0
*/
| 81.586957 | 2,999 | 0.66267 |
eb311d3c985da288266ddb0e7c929ccaae237302 | 341 | asm | Assembly | programs/oeis/047/A047504.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/047/A047504.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/047/A047504.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A047504: Numbers that are congruent to {1, 2, 3, 4, 5, 7} mod 8.
; 1,2,3,4,5,7,9,10,11,12,13,15,17,18,19,20,21,23,25,26,27,28,29,31,33,34,35,36,37,39,41,42,43,44,45,47,49,50,51,52,53,55,57,58,59,60,61,63,65,66,67,68,69,71,73,74,75,76,77,79,81,82,83,84,85,87
seq $0,47420 ; Numbers that are congruent to {0, 1, 2, 3, 4, 6} mod 8.
add $0,1
| 56.833333 | 192 | 0.633431 |
7cfe6d05a619f0564fa45f6a50bc7386b60b561a | 4,945 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_218.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_218.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_218.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r15
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x39d2, %r12
clflush (%r12)
xor %rdx, %rdx
mov (%r12), %rdi
nop
nop
nop
nop
nop
dec %r12
lea addresses_A_ht+0x1703a, %r13
nop
nop
nop
nop
inc %r11
vmovups (%r13), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rsi
and $42380, %r13
lea addresses_UC_ht+0x4c76, %r13
clflush (%r13)
nop
xor $12260, %r15
vmovups (%r13), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $0, %xmm7, %r11
nop
nop
nop
cmp %r11, %r11
lea addresses_WC_ht+0xaeb6, %rsi
lea addresses_D_ht+0x11cd2, %rdi
clflush (%rsi)
nop
nop
add %rdx, %rdx
mov $93, %rcx
rep movsw
nop
nop
nop
nop
sub $34320, %r15
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r15
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %rax
push %rbx
push %rdi
// Faulty Load
lea addresses_PSE+0x3cd2, %r14
nop
nop
sub $56955, %r12
mov (%r14), %ebx
lea oracles, %rax
and $0xff, %rbx
shlq $12, %rbx
mov (%rax,%rbx,1), %rbx
pop %rdi
pop %rbx
pop %rax
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 2, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
| 47.548077 | 2,999 | 0.660667 |
2e306859769f34eb3e1ab1951d1fa376dbed3a17 | 512 | asm | Assembly | programs/oeis/065/A065073.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/065/A065073.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/065/A065073.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A065073: n-th prime + sum of digits of n-th prime.
; 4,6,10,14,13,17,25,29,28,40,35,47,46,50,58,61,73,68,80,79,83,95,94,106,113,103,107,115,119,118,137,136,148,152,163,158,170,173,181,184,196,191,202,206,214,218,215,230,238,242,241,253,248,259,271,274,286,281,293,292,296,307,317,316,320,328,338,350,361,365,364,376,383,386,398,397,409,416,406,422,433,428,439,443,455,454,466,473,472,476,484,499,506,505,521,511,523,529,533,551
seq $0,40 ; The prime numbers.
seq $0,62028 ; a(n) = n + sum of the digits of n.
| 85.333333 | 376 | 0.705078 |
1291ba7f306697a3f1e28a002089179c0fbff09e | 1,261 | asm | Assembly | Library/Kernel/Object/objectInit.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Kernel/Object/objectInit.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Kernel/Object/objectInit.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @-----------------------------------------------------------------------
Copyright (c) GeoWorks 1988 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Object
FILE: geodeInit.asm
ROUTINES:
Name Description
---- -----------
EXT InitObject Initialize the Object module
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 10/88 Initial version
DESCRIPTION:
This module initializes the Object module. See manager.asm for
documentation.
$Id: objectInit.asm,v 1.1 97/04/05 01:14:28 newdeal Exp $
-------------------------------------------------------------------------------@
COMMENT @-----------------------------------------------------------------------
FUNCTION: InitObject
DESCRIPTION: Initialize the Object module
CALLED BY: EXTERNAL
InitGeos
PASS:
ds - kernel variable segment
RETURN:
none
DESTROYED:
none
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 4/88 Initial version
-------------------------------------------------------------------------------@
InitObject proc near
ret
InitObject endp
public InitObject
| 19.4 | 81 | 0.49881 |
b8a02c94d9703fc341f3277e66e17d768aa50f65 | 5,142 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_sm_/i9-9900K_12_0xca.log_1761_82.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_sm_/i9-9900K_12_0xca.log_1761_82.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_sm_/i9-9900K_12_0xca.log_1761_82.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r15
push %rax
push %rbx
push %rdi
push %rsi
lea addresses_normal_ht+0x36ec, %rsi
nop
nop
nop
inc %r10
mov $0x6162636465666768, %r13
movq %r13, (%rsi)
nop
nop
nop
and %rdi, %rdi
lea addresses_A_ht+0x14d6c, %r15
nop
nop
nop
nop
and $47542, %rbx
mov $0x6162636465666768, %rax
movq %rax, %xmm6
vmovups %ymm6, (%r15)
nop
nop
nop
nop
cmp %rbx, %rbx
pop %rsi
pop %rdi
pop %rbx
pop %rax
pop %r15
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %rax
push %rbp
push %rdi
push %rdx
push %rsi
// Store
lea addresses_WC+0xbbac, %rbp
sub $36998, %rdi
movl $0x51525354, (%rbp)
nop
nop
xor %r11, %r11
// Store
lea addresses_A+0xdfac, %rdx
nop
nop
nop
nop
and $59476, %rax
mov $0x5152535455565758, %rbp
movq %rbp, %xmm5
vmovups %ymm5, (%rdx)
nop
xor $38849, %r14
// Store
lea addresses_RW+0x180c0, %r14
nop
nop
nop
add $16230, %rdi
movw $0x5152, (%r14)
nop
nop
nop
nop
nop
and %rsi, %rsi
// Faulty Load
lea addresses_A+0xdfac, %rax
and %r11, %r11
mov (%rax), %edi
lea oracles, %rsi
and $0xff, %rdi
shlq $12, %rdi
mov (%rsi,%rdi,1), %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rbp
pop %rax
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_A', 'same': True, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_RW', 'same': False, 'AVXalign': False, 'congruent': 2}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 4, 'NT': True, 'type': 'addresses_A', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_A_ht', 'same': True, 'AVXalign': False, 'congruent': 6}}
{'58': 1761}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
| 42.495868 | 2,999 | 0.658888 |
a1403d225a1120d21d0a1704b9e3f44a6595e5ff | 1,828 | asm | Assembly | programs/oeis/271/A271358.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/271/A271358.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/271/A271358.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A271358: a(n) = k*Fibonacci(2*n+1) + (k+1)*Fibonacci(2*n), where k=4.
; 4,13,35,92,241,631,1652,4325,11323,29644,77609,203183,531940,1392637,3645971,9545276,24989857,65424295,171283028,448424789,1173991339,3073549228,8046656345,21066419807,55152603076,144391389421,378021565187,989673306140,2590998353233,6783321753559,17758966907444,46493578968773,121721769998875,318671731027852,834293423084681,2184208538226191,5718332191593892,14970788036555485,39194031918072563,102611307717662204,268639891234914049,703308365987079943,1841285206726325780,4820547254191897397,12620356555849366411,33040522413356201836,86501210684219239097,226463109639301515455,592888118233685307268,1552201245061754406349,4063715616951577911779,10638945605792979328988,27853121200427360075185,72920417995489100896567,190908132786039942614516,499803980362630726946981,1308503808301852238226427,3425707444542925987732300,8968618525326925724970473,23480148131437851187179119,61471825868986627836566884,160935329475522032322521533,421334162557579469130997715,1103067158197216375070471612,2887867312034069656080417121,7560534777904992593170779751,19793737021680908123431922132,51820676287137731777124986645,135668291839732287207943037803,355184199232059129846704126764,929884305856445102332169342489,2434468718337276177149803900703,6373521849155383429117242359620,16686096829128874110201923178157,43684768638231238901488527174851,114368209085564842594263658346396,299419858618463288881302447864337,783891366769825024049643685246615,2052254241691011783267628607875508,5372871358303210325753242138379909,14066359833218619193992097807264219,36826208141352647256223051283412748,96412264590839322574677056042974025,252410585631165320467808116845509327,660819492302656638828747294493553956
mov $1,4
mov $2,5
lpb $0
sub $0,1
add $2,$1
add $1,$2
lpe
mov $0,$1
| 152.333333 | 1,680 | 0.915208 |
776d2fdf18db5ee82df5b5ee301f073a86ff790b | 2,411 | asm | Assembly | Assembler/AssemblyCode/CALCULATOR.asm | KPU-RISC/KPU | 9f85c322e1b8489eef31f0696799e0c6c7273c0e | [
"MIT"
] | 8 | 2017-04-16T16:53:03.000Z | 2021-09-14T22:29:28.000Z | Assembler/AssemblyCode/CALCULATOR.asm | KPU-RISC/KPU | 9f85c322e1b8489eef31f0696799e0c6c7273c0e | [
"MIT"
] | null | null | null | Assembler/AssemblyCode/CALCULATOR.asm | KPU-RISC/KPU | 9f85c322e1b8489eef31f0696799e0c6c7273c0e | [
"MIT"
] | null | null | null | #INCLUDE "FUNCTIONS.inc"
; Initialize the stack pointer and the base pointer
MOV XL, 0xFF
MOV XH, 0xFF
MOV SP, X
MOV XL, 0
MOV XH, 0
MOV BP, X
; Initialize the Output Port D to 0
MOV XL, 0
OUT C
OUT D
CALL :_MAIN
HLT
:_MAIN
ENTER 4
; ====================
; BEGIN CALL SCANF...
; ====================
; Read the first string from the Input Port A and store it at
; memory location 0xFA00
PUSH 0x00
PUSH 0xFA
CALL :_SCANF
; Store the number of read characters in a local variable
MOV [BP - 1], D
; Remove the arguments from the stack frame
ADD SP, 2
; Read the second string from the Input Port A and store it at
; memory location 0xFB00
PUSH 0x00
PUSH 0xFB
CALL :_SCANF
; Store the number of read characters in a local variable
MOV [BP - 2], D
; Remove the arguments from the stack frame
ADD SP, 2
; ==================
; END CALL SCANF...
; ==================
; ===================
; BEGIN CALL ATOI...
; ===================
MOV D, [BP - 1]
PUSH D ; Number of characters
PUSH 0x00 ; 16-bit memory address
PUSH 0xFA ; 16-bit memory address
CALL :_ATOI
; Store the integer converted number in a local variable
MOV [BP - 3], D
; MOV XL, D
; OUT C
; Remove the arguments from the stack frame
ADD SP, 3
MOV D, [BP - 2]
PUSH D ; Number of characters
PUSH 0x00 ; 16-bit memory address
PUSH 0xFB ; 16-bit memory address
CALL :_ATOI
; Store the integer converted number in a local variable
MOV [BP - 4], D
; Remove the arguments from the stack frame
ADD SP, 3
; ==================
; END CALL ATOI...
; ==================
; ==========================
; BEGIN PERFORM CALCULATION
; ==========================
MOV D, [BP - 3]
MOV E, [BP - 4]
ADD D, E
; ========================
; END PERFORM CALCULATION
; ========================
; ================
; BEGIN CALL ITOA
; ================
PUSH 0x00 ; Lower 8-bit of the string buffer memory address
PUSH 0xFC ; Higher 8-bit of the string buffer memory address
PUSH D ; Result of the ADD Calculation
CALL :_ITOA
; Remove the argument from the stack frame
ADD SP, 3
; ==============
; END CALL ITOA
; ==============
; ==================
; BEGIN CALL PRINTF
; ==================
; Write a null-terminated string from memory address 0xFF00 into the
; Output Port C...
PUSH 0x00
PUSH 0xFC
CALL :_PRINTF
; Remove the arguments from the stack frame
ADD SP, 2
; ================
; END CALL PRINTF
; ================
; Return from MAIN...
LEAVE
RET | 17.727941 | 69 | 0.588138 |
4edd7f9458f2e5517195ef8c74cbcbba6a8beced | 4,696 | asm | Assembly | dma/dma_halt_stop_speedchange/init.asm | AntonioND/gbc-hw-tests | 631e60000c885154a8526df0b148847f9c34ce42 | [
"MIT"
] | 6 | 2018-07-21T12:11:21.000Z | 2021-07-23T16:32:47.000Z | dma/dma_halt_stop_speedchange/init.asm | PMArkive/gbc-hw-tests | 631e60000c885154a8526df0b148847f9c34ce42 | [
"MIT"
] | null | null | null | dma/dma_halt_stop_speedchange/init.asm | PMArkive/gbc-hw-tests | 631e60000c885154a8526df0b148847f9c34ce42 | [
"MIT"
] | 3 | 2016-04-26T07:45:34.000Z | 2018-12-30T05:45:14.000Z |
INCLUDE "hardware.inc"
SECTION "TIMER",HOME[$0050]
ret
SECTION "JOY",HOME[$0060]
ret
SECTION "Home",HOME
;--------------------------------------------------------------------------
;- wait_ly() b = ly to wait for -
;--------------------------------------------------------------------------
wait_ly::
ld c,rLY & $FF
.no_same_ly:
ld a,[$FF00+c]
cp a,b
jr nz,.no_same_ly
ret
;--------------------------------------------------------------------------
;- screen_off() -
;--------------------------------------------------------------------------
screen_off::
ld a,[rLCDC]
and a,LCDCF_ON
ret z
ld b,$91
call wait_ly
xor a,a
ld [rLCDC],a ;Shutdown LCD
ret
;--------------------------------------------------------------------------
;- memcopy() bc = size hl = source address de = dest address -
;--------------------------------------------------------------------------
memcopy::
ld a,[hl+]
ld [de],a
inc de
dec bc
ld a,b
or a,c
jr nz,memcopy
ret
;--------------------------------------------------------------------------
;- memset() d = value hl = start address bc = size -
;--------------------------------------------------------------------------
memset::
ld a,d
ld [hl+],a
dec bc
ld a,b
or a,c
jr nz,memset
ret
;--------------------------------------------------------------------------
;- CARTRIDGE HEADER -
;--------------------------------------------------------------------------
SECTION "Cartridge Header",HOME[$0100]
nop
nop
jr Main
NINTENDO_LOGO
; 0123456789ABC
DB "DMA HALT TEST"
DW $0000
DB $C0 ;GBC flag
DB 0,0,0 ;SuperGameboy
DB $1B ;CARTTYPE (MBC5+RAM+BATTERY)
DB 0 ;ROMSIZE
DB 3 ;RAMSIZE (4*8KB)
DB $01 ;Destination (0 = Japan, 1 = Non Japan)
DB $00 ;Manufacturer
DB 0 ;Version
DB 0 ;Complement check
DW 0 ;Checksum
;--------------------------------------------------------------------------
;- Main() -
;--------------------------------------------------------------------------
Main:
di
call screen_off
ld a,$A0
ld hl,$8000
.set_vram:
ld [hl],l
inc hl
dec a
jr nz,.set_vram
ld a,$0A
ld [$0000],a
;--------------------------------------------------------------------------
;----------------
ld bc,DMA_HALT_END-DMA_HALT_START
ld hl,DMA_HALT_START
ld de,$FF80
call memcopy
;--------------------
ld hl,$FE00
ld bc,$A0
ld d,0
call memset ; clear OAM
ld a,IEF_TIMER
ld [rIE],a
xor a,a
ld [rIF],a
ld [rDIV],a
ld [rTIMA],a
ld [rTMA],a
ld a,TACF_STOP|TACF_65KHZ
ld [rTAC],a
ld a,TACF_START|TACF_65KHZ
ld [rTAC],a
ld a,$FE
ld [rDIV],a
ld [rTIMA],a
ei
;--------------------
ld a,$80
call $FF80 ; a = src address
;--------------------
ld bc,$A0
ld hl,$FE00
ld de,$A000
call memcopy
;--------------------------------------------------------------------------
;--------------------
ld bc,DMA_STOP_END-DMA_STOP_START
ld hl,DMA_STOP_START
ld de,$FF80
call memcopy
;--------------------
ld hl,$FE00
ld bc,$A0
ld d,0
call memset ; clear OAM
di
ld a,$00
ld [rP1],a
;--------------------
ld a,$80
call $FF80 ; a = src address
;--------------------
ld bc,$A0
ld hl,$FE00
ld de,$A000 + $A0
call memcopy
;--------------------------------------------------------------------------
ld hl,$A000 + $A0 + $A0
ld [hl],$12
inc hl
ld [hl],$34
inc hl
ld [hl],$56
inc hl
ld [hl],$78
;--------------------------------------------------------------------------
ld hl,$FE00
ld bc,$A0
ld d,0
call memset ; clear OAM
di
ld a,$00
ld [rIE],a
ld a,$FF
ld [rP1],a
ld a,1
ld [rKEY1],a
;--------------------
ld a,$80
call $FF80 ; a = src address
;--------------------
ld bc,$A0
ld hl,$FE00
ld de,$A000 + $A0 + $A0
call memcopy
;--------------------------------------------------------------------------
ld hl,$A000 + $A0 + $A0 + $A0
ld [hl],$12
inc hl
ld [hl],$34
inc hl
ld [hl],$56
inc hl
ld [hl],$78
ld a,$00
ld [$0000],a
.end:
halt
jr .end
;--------------------------------------------------------------------------
DMA_HALT_START: ; bc = src address
ld [rDMA],a
nop
nop
halt
ld a,40
.delay:
dec a
jr nz,.delay
ret
DMA_HALT_END:
; ------------------------------
DMA_STOP_START: ; bc = src address
ld [rDMA],a
nop
nop
stop
ld a,40
.delay:
dec a
jr nz,.delay
ret
DMA_STOP_END:
;--------------------------------------------------------------------------
| 15.972789 | 76 | 0.348807 |
43e3ef8d992ffa48836949c9f351a860794b1afb | 2,052 | asm | Assembly | programs/oeis/272/A272352.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/272/A272352.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/272/A272352.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A272352: a(n) is the number of ways of putting n labeled balls into 2 indistinguishable boxes such that each box contains at least 3 balls.
; 10,35,91,210,456,957,1969,4004,8086,16263,32631,65382,130900,261953,524077,1048344,2096898,4194027,8388307,16776890,33554080,67108485,134217321,268435020,536870446,1073741327,2147483119,4294966734,8589933996,17179868553,34359737701,68719476032,137438952730,274877906163,549755813067,1099511626914,2199023254648,4398046510157,8796093021217,17592186043380,35184372087750,70368744176535,140737488354151,281474976709430,562949953420036,1125899906841297,2251799813683869,4503599627369064,9007199254739506,18014398509480443,36028797018962371,72057594037926282,144115188075854160,288230376151709973,576460752303421657,1152921504606845084,2305843009213691998,4611686018427385887,9223372036854773727,18446744073709549470,36893488147419101020,73786976294838204185,147573952589676410581,295147905179352823440,590295810358705649226,1180591620717411300867,2361183241434822604219,4722366482869645210994,9444732965739290424616,18889465931478580851933,37778931862957161706641,75557863725914323416132,151115727451828646835190,302231454903657293673383,604462909807314587349847,1208925819614629174702854,2417851639229258349408948,4835703278458516698821217,9671406556917033397645837,19342813113834066795295160,38685626227668133590593890,77371252455336267181191435,154742504910672534362386611,309485009821345068724777050,618970019642690137449558016,1237940039285380274899120037,2475880078570760549798244169,4951760157141521099596492524,9903520314283042199192989326,19807040628566084398385983023,39614081257132168796771970511,79228162514264337593543945582,158456325028528675187087895820,316912650057057350374175796393,633825300114114700748351597637,1267650600228229401496703200224,2535301200456458802993406405498,5070602400912917605986812816147,10141204801825835211973625637547,20282409603651670423947251280450
add $0,4
mov $3,3
lpb $0
sub $0,1
mov $1,$2
mul $2,2
add $2,4
add $4,$3
add $4,$0
lpe
sub $1,$4
mov $0,$1
| 128.25 | 1,790 | 0.904971 |
4228a1e4d773b395387849ba2832d8adf9a3156a | 470 | asm | Assembly | masm(msdos)/modografico.asm | GioProyects/ensamblador | c5f42eb3661fa359885f8050495ed46f36a6bbf0 | [
"MIT"
] | null | null | null | masm(msdos)/modografico.asm | GioProyects/ensamblador | c5f42eb3661fa359885f8050495ed46f36a6bbf0 | [
"MIT"
] | null | null | null | masm(msdos)/modografico.asm | GioProyects/ensamblador | c5f42eb3661fa359885f8050495ed46f36a6bbf0 | [
"MIT"
] | null | null | null | .model small
.data
.code
begin proc far
;mov ah,00h
;mov al,10h ;modo grafico
;mov al,03h ;modo texto
;int 10h
;paleta de colores
;mov ah,0bh
;mov bh,00
;mov bh,01 ;selecciona la paleta
;mov bl,00
;int 10h
;escribe un pixel punto
mov ah,0ch
mov al,03 ;color del pixel
mov bh,0 ;pagina 0
mov cx,50 ;columna
mov dx,70 ;renglon
int 10h
mov ax,4c00h
int 21h
begin endp
end begin
| 16.206897 | 36 | 0.585106 |
cfa056de4ca5939878710b478169c7776ceccee9 | 389 | asm | Assembly | programs/oeis/204/A204131.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/204/A204131.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/204/A204131.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A204131: Symmetric matrix based on f(i,j)=(2i-1 if i=j and 1 otherwise), by antidiagonals.
; 1,1,1,1,3,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,11,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,13,1,1,1,1,1,1,1,1,1,1,1,1,1
lpb $0
add $1,4
sub $0,$1
lpe
lpb $0
mov $0,0
mov $1,0
lpe
div $1,2
add $1,1
mov $0,$1
| 25.933333 | 199 | 0.55527 |
4512881b6547d206751dcacd2e0269dcfcc6f9ce | 958 | asm | Assembly | oeis/094/A094309.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/094/A094309.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/094/A094309.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A094309: Number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| <= 1 for i = 1,2,....,n, s(0) = 2, s(n) = 5.
; Submitted by Jon Maiga
; 1,4,14,44,132,384,1096,3088,8624,23936,66144,182208,500800,1374208,3766400,10313984,28226304,77211648,211138048,577223680,1577772032,4312088576,11783915520,32200396800,87985401856,240405151744,656848216064,1794640953344,4903246774272,13396312326144,36600191942656,99995156021248,273194990895104,746388883767296,2039184929193984,5571181985660928,15220802549186560,41584106508648448,113610092993576960,310388948760264704,847999183019311104,2316778462582407168,6329559689249947648,17292685099757731840
mov $5,$0
mov $7,$0
add $7,1
lpb $7
mov $0,$5
sub $7,1
sub $0,$7
mov $1,4
mov $2,4
mov $4,1
lpb $0
sub $0,1
sub $1,1
add $1,$4
mul $1,2
mov $3,$4
mov $4,$2
add $2,$3
mul $2,2
lpe
mul $1,4
div $1,8
mov $0,$1
sub $0,1
add $6,$0
lpe
mov $0,$6
| 29.9375 | 500 | 0.686848 |
d4b13a5cf82e2abff4228815ede8fb8ec101bfef | 264 | asm | Assembly | libsrc/_DEVELOPMENT/arch/zx/ulaplus/c/sccz80/ulap_write_color_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/arch/zx/ulaplus/c/sccz80/ulap_write_color_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/arch/zx/ulaplus/c/sccz80/ulap_write_color_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ; void ulap_write_color(unsigned char pent,unsigned char color)
SECTION code_clib
SECTION code_arch
PUBLIC ulap_write_color_callee
EXTERN asm_ulap_write_color
ulap_write_color_callee:
pop hl
pop de
ex (sp),hl
ld h,e
jp asm_ulap_write_color
| 14.666667 | 63 | 0.776515 |
98f997566b4099dc9559bf74597e68f6bec1f058 | 665 | asm | Assembly | oeis/014/A014483.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/014/A014483.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/014/A014483.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A014483: Expansion of (1+2*x) / (1-2*x)^4.
; Submitted by Jon Maiga
; 1,10,56,240,880,2912,8960,26112,72960,197120,518144,1331200,3354624,8314880,20316160,49020928,116981760,276430848,647495680,1504706560,3471835136,7958691840,18136170496,41104179200,92694118400,208071032832,465064427520,1035355553792,2296465326080,5076114472960,11184094838784,24567212933120,53811645251584,117553254891520,256151849533440,556833919991808,1207744803635200,2613951456083968,5645992208629760,12171593719480320,26191466485252096,56262009993297920,120656007985627136,258341252062248960
add $0,1
mov $1,$0
mov $2,$0
add $2,$0
mov $0,2
pow $0,$1
add $2,2
bin $2,3
mul $0,$2
div $0,8
| 44.333333 | 498 | 0.822556 |
1211d255e1b09e3a247887ed426d50c07ebfce5c | 6,846 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_21829_628.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_21829_628.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_21829_628.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r14
push %r8
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x661f, %r8
nop
nop
nop
nop
nop
inc %r12
mov (%r8), %ecx
nop
nop
nop
nop
nop
add %r14, %r14
lea addresses_normal_ht+0x1b49f, %rcx
nop
nop
nop
cmp %r11, %r11
movl $0x61626364, (%rcx)
nop
nop
nop
nop
nop
xor %r14, %r14
lea addresses_WT_ht+0xb785, %rdx
nop
nop
nop
cmp $55388, %r14
movl $0x61626364, (%rdx)
nop
nop
nop
nop
sub %r8, %r8
lea addresses_UC_ht+0xed3f, %rsi
lea addresses_UC_ht+0x1b329, %rdi
nop
nop
nop
nop
nop
sub %r12, %r12
mov $93, %rcx
rep movsl
and $17564, %r12
lea addresses_UC_ht+0x661f, %rsi
nop
and %r14, %r14
movb (%rsi), %r11b
nop
nop
nop
xor %r12, %r12
lea addresses_normal_ht+0x10e3f, %r8
nop
nop
nop
add $56897, %rsi
and $0xffffffffffffffc0, %r8
vmovaps (%r8), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $1, %xmm7, %r11
nop
nop
nop
add %rdx, %rdx
lea addresses_D_ht+0x1cb1f, %rsi
lea addresses_WT_ht+0x1ce9f, %rdi
clflush (%rdi)
nop
dec %rdx
mov $32, %rcx
rep movsb
nop
nop
nop
nop
sub $21685, %rdi
lea addresses_D_ht+0x1b21f, %rcx
nop
nop
nop
and %rdi, %rdi
movb $0x61, (%rcx)
nop
sub %rcx, %rcx
lea addresses_normal_ht+0xd1d9, %rsi
lea addresses_normal_ht+0x1a79f, %rdi
nop
nop
nop
nop
xor $7066, %rdx
mov $104, %rcx
rep movsw
nop
nop
nop
nop
nop
add %r12, %r12
lea addresses_WT_ht+0x580f, %rcx
nop
nop
nop
sub $49524, %rsi
mov $0x6162636465666768, %rdi
movq %rdi, %xmm1
movups %xmm1, (%rcx)
nop
nop
nop
cmp $48308, %rsi
lea addresses_normal_ht+0x141bd, %rsi
lea addresses_UC_ht+0x1661f, %rdi
nop
nop
nop
nop
sub %r14, %r14
mov $61, %rcx
rep movsw
nop
nop
nop
cmp $59546, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r14
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r15
push %rax
push %rbx
push %rdi
push %rdx
push %rsi
// Faulty Load
mov $0x3756f0000000061f, %rdx
cmp $49137, %rsi
mov (%rdx), %di
lea oracles, %rdx
and $0xff, %rdi
shlq $12, %rdi
mov (%rdx,%rdi,1), %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rbx
pop %rax
pop %r15
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'same': True, 'size': 2, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_normal_ht', 'same': True, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 3, 'NT': True, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
{'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
*/
| 34.928571 | 2,999 | 0.661262 |
e0eb3e655ee2adac6a56059b3916a61cf760ba9c | 642 | asm | Assembly | oeis/056/A056854.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/056/A056854.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/056/A056854.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A056854: a(n) = Lucas(4*n).
; Submitted by Jon Maiga
; 2,7,47,322,2207,15127,103682,710647,4870847,33385282,228826127,1568397607,10749957122,73681302247,505019158607,3461452808002,23725150497407,162614600673847,1114577054219522,7639424778862807,52361396397820127,358890350005878082,2459871053643326447,16860207025497407047,115561578124838522882,792070839848372253127,5428934300813767249007,37210469265847998489922,255044350560122222180447,1748099984655007556773207,11981655542024930675232002,82123488809519507169850807,562882766124611619513723647
mov $2,1
lpb $0
sub $0,1
add $2,$1
add $1,$2
lpe
pow $1,2
mov $0,$1
mul $0,5
add $0,2
| 42.8 | 493 | 0.842679 |
c7740f4d5c96fd0d175826ff38dedfcf48d920c7 | 826 | asm | Assembly | 02-bootsector-print/boot_sect_hello.asm | zurgeg/gbtos_opensource | f3305e0ba0a179651d0822cb2da737998f2e968b | [
"BSD-3-Clause"
] | null | null | null | 02-bootsector-print/boot_sect_hello.asm | zurgeg/gbtos_opensource | f3305e0ba0a179651d0822cb2da737998f2e968b | [
"BSD-3-Clause"
] | 1 | 2019-11-30T17:17:56.000Z | 2019-11-30T17:17:56.000Z | 02-bootsector-print/boot_sect_hello.asm | zurgeg/gbtos_opensource | f3305e0ba0a179651d0822cb2da737998f2e968b | [
"BSD-3-Clause"
] | null | null | null | mov ah, 0x0e ; tty mode
mov al, 'H'
int 0x10
mov al, 'e'
int 0x10
mov al, 'l'
int 0x10
int 0x10 ; 'l' is still on al, remember?
mov al, 'o'
int 0x10
mov al, '\n'
mov al, 'I'
int 0x10
mov al, 'M'
int 0x10
mov al, 'a'
int 0x10
mov al, 'd'
int 0x10
mov al, 'e'
int 0x10
mov al, ' '
int 0x10
mov al, 'a'
int 0x10
mov al, 'n'
int 0x10
mov al, ' '
int 0x10
mov al, 'O'
int 0x10
mov al, 'S'
int 0x10
mov al, '\n'
int 0x10
mov al, 'P'
int 0x10
mov al, 'W'
int 0x10
mov al, 'R'
int 0x10
mov al, 'F'
int 0x10
mov al, 'A'
int 0x10
mov al, 'I'
int 0x10
mov al, 'L'
int 0x10
mov al, ' '
int 0x10
mov al, 'I'
int 0x10
mov al, 'F'
int 0x10
mov al, ' '
int 0x10
mov al, 'R'
int 0x10
mov al, 'S'
int 0x10
mov al, 'T'
int 0x10
jmp $ ; jump to current address = infinite loop
; padding and magic number
times 510 - ($-$$) db 0
dw 0xaa55
| 11.315068 | 47 | 0.617433 |
0655a554fd56812e7c5506994ced860dbd83fdac | 608 | asm | Assembly | z280mon/bcmnd.asm | 4sun5bu/Z280MB | 46cb458d31219fcaaa4a46f12db5e64a1ac84765 | [
"MIT"
] | 5 | 2021-07-24T07:43:44.000Z | 2021-09-19T17:32:29.000Z | z280mon/bcmnd.asm | 4sun5bu/Z280MB | 46cb458d31219fcaaa4a46f12db5e64a1ac84765 | [
"MIT"
] | null | null | null | z280mon/bcmnd.asm | 4sun5bu/Z280MB | 46cb458d31219fcaaa4a46f12db5e64a1ac84765 | [
"MIT"
] | null | null | null | ;------------------------------------------------------------------------------
; bcmnd.asm
; Load master boot record and jump
;
; Copyright (c) 2021 4sun5bu
;------------------------------------------------------------------------------
.z280p
.area CODE
.globl bcmnd
bcmnd:
call dskinit
ld hl, dskbuf
call dskread
ld (lball), 1
call dskread
ld de, (dskbuf + 2)
ld hl, dskbuf
ld bc, 1024
ldir
ld hl, (dskbuf + 2)
jp (hl)
berr:
ld hl, berrmsg
jp cmnderr
;------------------------------------------------------------------------------
.area DATA
berrmsg:
.ascii "Error! b"
.db 0
| 16.432432 | 79 | 0.388158 |
61722698681f958a4f75e8ee37301e7ffd83d923 | 649,635 | asm | Assembly | source/kernel.asm | hamedmiir/OS-Lab-Scheduling | c3c6877367e9a77e0300aa53f50be66b78b46328 | [
"Xnet",
"X11"
] | null | null | null | source/kernel.asm | hamedmiir/OS-Lab-Scheduling | c3c6877367e9a77e0300aa53f50be66b78b46328 | [
"Xnet",
"X11"
] | null | null | null | source/kernel.asm | hamedmiir/OS-Lab-Scheduling | c3c6877367e9a77e0300aa53f50be66b78b46328 | [
"Xnet",
"X11"
] | null | null | null |
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 a0 10 00 mov $0x10a000,%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 00 c6 10 80 mov $0x8010c600,%esp
8010002d: b8 10 32 10 80 mov $0x80103210,%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 34 c6 10 80 mov $0x8010c634,%ebx
{
80100049: 83 ec 0c sub $0xc,%esp
initlock(&bcache.lock, "bcache");
8010004c: 68 60 7d 10 80 push $0x80107d60
80100051: 68 00 c6 10 80 push $0x8010c600
80100056: e8 35 4f 00 00 call 80104f90 <initlock>
bcache.head.prev = &bcache.head;
8010005b: c7 05 4c 0d 11 80 fc movl $0x80110cfc,0x80110d4c
80100062: 0c 11 80
bcache.head.next = &bcache.head;
80100065: c7 05 50 0d 11 80 fc movl $0x80110cfc,0x80110d50
8010006c: 0c 11 80
8010006f: 83 c4 10 add $0x10,%esp
80100072: ba fc 0c 11 80 mov $0x80110cfc,%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 fc 0c 11 80 movl $0x80110cfc,0x50(%ebx)
initsleeplock(&b->lock, "buffer");
80100092: 68 67 7d 10 80 push $0x80107d67
80100097: 50 push %eax
80100098: e8 c3 4d 00 00 call 80104e60 <initsleeplock>
bcache.head.next->prev = b;
8010009d: a1 50 0d 11 80 mov 0x80110d50,%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 50 0d 11 80 mov %ebx,0x80110d50
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
801000b6: 3d fc 0c 11 80 cmp $0x80110cfc,%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 00 c6 10 80 push $0x8010c600
801000e4: e8 e7 4f 00 00 call 801050d0 <acquire>
for(b = bcache.head.next; b != &bcache.head; b = b->next){
801000e9: 8b 1d 50 0d 11 80 mov 0x80110d50,%ebx
801000ef: 83 c4 10 add $0x10,%esp
801000f2: 81 fb fc 0c 11 80 cmp $0x80110cfc,%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 fc 0c 11 80 cmp $0x80110cfc,%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 4c 0d 11 80 mov 0x80110d4c,%ebx
80100126: 81 fb fc 0c 11 80 cmp $0x80110cfc,%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 fc 0c 11 80 cmp $0x80110cfc,%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 00 c6 10 80 push $0x8010c600
80100162: e8 29 50 00 00 call 80105190 <release>
acquiresleep(&b->lock);
80100167: 8d 43 0c lea 0xc(%ebx),%eax
8010016a: 89 04 24 mov %eax,(%esp)
8010016d: e8 2e 4d 00 00 call 80104ea0 <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 0d 23 00 00 call 80102490 <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 7d 10 80 push $0x80107d6e
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 8d 4d 00 00 call 80104f40 <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 c7 22 00 00 jmp 80102490 <iderw>
panic("bwrite");
801001c9: 83 ec 0c sub $0xc,%esp
801001cc: 68 7f 7d 10 80 push $0x80107d7f
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 4c 4d 00 00 call 80104f40 <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 fc 4c 00 00 call 80104f00 <releasesleep>
acquire(&bcache.lock);
80100204: c7 04 24 00 c6 10 80 movl $0x8010c600,(%esp)
8010020b: e8 c0 4e 00 00 call 801050d0 <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 50 0d 11 80 mov 0x80110d50,%eax
b->prev = &bcache.head;
80100237: c7 43 50 fc 0c 11 80 movl $0x80110cfc,0x50(%ebx)
b->next = bcache.head.next;
8010023e: 89 43 54 mov %eax,0x54(%ebx)
bcache.head.next->prev = b;
80100241: a1 50 0d 11 80 mov 0x80110d50,%eax
80100246: 89 58 50 mov %ebx,0x50(%eax)
bcache.head.next = b;
80100249: 89 1d 50 0d 11 80 mov %ebx,0x80110d50
}
release(&bcache.lock);
8010024f: c7 45 08 00 c6 10 80 movl $0x8010c600,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 2f 4f 00 00 jmp 80105190 <release>
panic("brelse");
80100261: 83 ec 0c sub $0xc,%esp
80100264: 68 86 7d 10 80 push $0x80107d86
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 4b 18 00 00 call 80101ad0 <iunlock>
target = n;
acquire(&cons.lock);
80100285: c7 04 24 60 b5 10 80 movl $0x8010b560,(%esp)
8010028c: e8 3f 4e 00 00 call 801050d0 <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 e0 0f 11 80 mov 0x80110fe0,%edx
801002a7: 39 15 e4 0f 11 80 cmp %edx,0x80110fe4
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 60 b5 10 80 push $0x8010b560
801002c0: 68 e0 0f 11 80 push $0x80110fe0
801002c5: e8 d6 3d 00 00 call 801040a0 <sleep>
while(input.r == input.w){
801002ca: 8b 15 e0 0f 11 80 mov 0x80110fe0,%edx
801002d0: 83 c4 10 add $0x10,%esp
801002d3: 3b 15 e4 0f 11 80 cmp 0x80110fe4,%edx
801002d9: 75 35 jne 80100310 <consoleread+0xa0>
if(myproc()->killed){
801002db: e8 c0 38 00 00 call 80103ba0 <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 60 b5 10 80 push $0x8010b560
801002ef: e8 9c 4e 00 00 call 80105190 <release>
ilock(ip);
801002f4: 89 3c 24 mov %edi,(%esp)
801002f7: e8 f4 16 00 00 call 801019f0 <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 e0 0f 11 80 mov %eax,0x80110fe0
80100318: 89 d0 mov %edx,%eax
8010031a: 83 e0 7f and $0x7f,%eax
8010031d: 0f be 80 60 0f 11 80 movsbl -0x7feef0a0(%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 60 b5 10 80 push $0x8010b560
8010034d: e8 3e 4e 00 00 call 80105190 <release>
ilock(ip);
80100352: 89 3c 24 mov %edi,(%esp)
80100355: e8 96 16 00 00 call 801019f0 <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 e0 0f 11 80 mov %edx,0x80110fe0
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 94 b5 10 80 00 movl $0x0,0x8010b594
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 f2 26 00 00 call 80102aa0 <lapicid>
801003ae: 83 ec 08 sub $0x8,%esp
801003b1: 50 push %eax
801003b2: 68 8d 7d 10 80 push $0x80107d8d
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 9f 88 10 80 movl $0x8010889f,(%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 d3 4b 00 00 call 80104fb0 <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 7d 10 80 push $0x80107da1
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 98 b5 10 80 01 movl $0x1,0x8010b598
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 98 b5 10 80 mov 0x8010b598,%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 31 65 00 00 call 80106970 <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 7f 64 00 00 call 80106970 <uartputc>
801004f1: c7 04 24 20 00 00 00 movl $0x20,(%esp)
801004f8: e8 73 64 00 00 call 80106970 <uartputc>
801004fd: c7 04 24 08 00 00 00 movl $0x8,(%esp)
80100504: e8 67 64 00 00 call 80106970 <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 67 4d 00 00 call 80105290 <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 9a 4c 00 00 call 801051e0 <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 7d 10 80 push $0x80107da5
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 7d 10 80 movzbl -0x7fef8230(%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 bc 14 00 00 call 80101ad0 <iunlock>
acquire(&cons.lock);
80100614: c7 04 24 60 b5 10 80 movl $0x8010b560,(%esp)
8010061b: e8 b0 4a 00 00 call 801050d0 <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 60 b5 10 80 push $0x8010b560
80100647: e8 44 4b 00 00 call 80105190 <release>
ilock(ip);
8010064c: 58 pop %eax
8010064d: ff 75 08 pushl 0x8(%ebp)
80100650: e8 9b 13 00 00 call 801019f0 <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 94 b5 10 80 mov 0x8010b594,%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 60 b5 10 80 push $0x8010b560
8010071f: e8 6c 4a 00 00 call 80105190 <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 7d 10 80 mov $0x80107db8,%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 60 b5 10 80 push $0x8010b560
801007f0: e8 db 48 00 00 call 801050d0 <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 7d 10 80 push $0x80107dbf
80100805: e8 86 fb ff ff call 80100390 <panic>
8010080a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100810 <InsertNewCmd>:
{
80100810: 55 push %ebp
int i = input.w % INPUT_BUF , temp_cur = history.cmd_count % 5;
80100811: ba 67 66 66 66 mov $0x66666667,%edx
{
80100816: 89 e5 mov %esp,%ebp
80100818: 57 push %edi
80100819: 56 push %esi
8010081a: 53 push %ebx
8010081b: 83 ec 10 sub $0x10,%esp
int i = input.w % INPUT_BUF , temp_cur = history.cmd_count % 5;
8010081e: 8b 3d 34 b5 10 80 mov 0x8010b534,%edi
80100824: 8b 1d e4 0f 11 80 mov 0x80110fe4,%ebx
memset(temp_buf[temp_cur] ,'\0' ,INPUT_BUF * sizeof(char));
8010082a: 68 80 00 00 00 push $0x80
8010082f: 6a 00 push $0x0
int i = input.w % INPUT_BUF , temp_cur = history.cmd_count % 5;
80100831: 89 f8 mov %edi,%eax
80100833: 83 e3 7f and $0x7f,%ebx
80100836: f7 ea imul %edx
80100838: 89 f8 mov %edi,%eax
8010083a: c1 f8 1f sar $0x1f,%eax
8010083d: d1 fa sar %edx
8010083f: 29 c2 sub %eax,%edx
80100841: 8d 04 92 lea (%edx,%edx,4),%eax
80100844: 29 c7 sub %eax,%edi
80100846: c1 e7 07 shl $0x7,%edi
memset(temp_buf[temp_cur] ,'\0' ,INPUT_BUF * sizeof(char));
80100849: 8d b7 00 10 11 80 lea -0x7feef000(%edi),%esi
8010084f: 56 push %esi
80100850: e8 8b 49 00 00 call 801051e0 <memset>
while( i != ((input.e - 1)%INPUT_BUF)){
80100855: a1 e8 0f 11 80 mov 0x80110fe8,%eax
8010085a: 83 c4 10 add $0x10,%esp
int j = 0;
8010085d: 31 d2 xor %edx,%edx
while( i != ((input.e - 1)%INPUT_BUF)){
8010085f: 83 e8 01 sub $0x1,%eax
80100862: 83 e0 7f and $0x7f,%eax
80100865: 39 d8 cmp %ebx,%eax
80100867: 74 22 je 8010088b <InsertNewCmd+0x7b>
80100869: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
temp_buf[temp_cur][j] = input.buf[i];
80100870: 0f b6 8b 60 0f 11 80 movzbl -0x7feef0a0(%ebx),%ecx
i = (i + 1) % INPUT_BUF;
80100877: 83 c3 01 add $0x1,%ebx
8010087a: 83 e3 7f and $0x7f,%ebx
temp_buf[temp_cur][j] = input.buf[i];
8010087d: 88 8c 17 00 10 11 80 mov %cl,-0x7feef000(%edi,%edx,1)
j++;
80100884: 83 c2 01 add $0x1,%edx
while( i != ((input.e - 1)%INPUT_BUF)){
80100887: 39 c3 cmp %eax,%ebx
80100889: 75 e5 jne 80100870 <InsertNewCmd+0x60>
8010088b: b8 20 b5 10 80 mov $0x8010b520,%eax
history.PervCmd[i] = history.PervCmd[i-1];
80100890: 8b 48 0c mov 0xc(%eax),%ecx
80100893: 83 e8 04 sub $0x4,%eax
80100896: 89 48 14 mov %ecx,0x14(%eax)
history.size[i] = history.size[i-1];
80100899: 8b 48 2c mov 0x2c(%eax),%ecx
8010089c: 89 48 30 mov %ecx,0x30(%eax)
for(int i = 4 ; i > 0 ; i--){
8010089f: 3d 10 b5 10 80 cmp $0x8010b510,%eax
801008a4: 75 ea jne 80100890 <InsertNewCmd+0x80>
history.PervCmd[0] = temp_buf[temp_cur];
801008a6: 89 35 20 b5 10 80 mov %esi,0x8010b520
history.size[0] = j;
801008ac: 89 15 3c b5 10 80 mov %edx,0x8010b53c
}
801008b2: 8d 65 f4 lea -0xc(%ebp),%esp
801008b5: 5b pop %ebx
801008b6: 5e pop %esi
801008b7: 5f pop %edi
801008b8: 5d pop %ebp
801008b9: c3 ret
801008ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801008c0 <killLine>:
while(input.e != input.w &&
801008c0: a1 e8 0f 11 80 mov 0x80110fe8,%eax
801008c5: 3b 05 e4 0f 11 80 cmp 0x80110fe4,%eax
801008cb: 74 53 je 80100920 <killLine+0x60>
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
801008cd: 83 e8 01 sub $0x1,%eax
801008d0: 89 c2 mov %eax,%edx
801008d2: 83 e2 7f and $0x7f,%edx
while(input.e != input.w &&
801008d5: 80 ba 60 0f 11 80 0a cmpb $0xa,-0x7feef0a0(%edx)
801008dc: 74 42 je 80100920 <killLine+0x60>
{
801008de: 55 push %ebp
801008df: 89 e5 mov %esp,%ebp
801008e1: 83 ec 08 sub $0x8,%esp
801008e4: eb 1b jmp 80100901 <killLine+0x41>
801008e6: 8d 76 00 lea 0x0(%esi),%esi
801008e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
801008f0: 83 e8 01 sub $0x1,%eax
801008f3: 89 c2 mov %eax,%edx
801008f5: 83 e2 7f and $0x7f,%edx
while(input.e != input.w &&
801008f8: 80 ba 60 0f 11 80 0a cmpb $0xa,-0x7feef0a0(%edx)
801008ff: 74 1c je 8010091d <killLine+0x5d>
input.e--;
80100901: a3 e8 0f 11 80 mov %eax,0x80110fe8
consputc(BACKSPACE);
80100906: b8 00 01 00 00 mov $0x100,%eax
8010090b: e8 00 fb ff ff call 80100410 <consputc>
while(input.e != input.w &&
80100910: a1 e8 0f 11 80 mov 0x80110fe8,%eax
80100915: 3b 05 e4 0f 11 80 cmp 0x80110fe4,%eax
8010091b: 75 d3 jne 801008f0 <killLine+0x30>
}
8010091d: c9 leave
8010091e: c3 ret
8010091f: 90 nop
80100920: f3 c3 repz ret
80100922: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100929: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80100930 <fillBuf>:
{
80100930: 55 push %ebp
80100931: 89 e5 mov %esp,%ebp
80100933: 56 push %esi
80100934: 53 push %ebx
killLine();
80100935: e8 86 ff ff ff call 801008c0 <killLine>
for(int i = 0; i < history.size[history.cursor] ; i++)
8010093a: a1 38 b5 10 80 mov 0x8010b538,%eax
8010093f: 8b 1c 85 3c b5 10 80 mov -0x7fef4ac4(,%eax,4),%ebx
80100946: 85 db test %ebx,%ebx
80100948: 7e 32 jle 8010097c <fillBuf+0x4c>
input.buf[input.e++ % INPUT_BUF] = history.PervCmd[history.cursor][i];
8010094a: 8b 34 85 20 b5 10 80 mov -0x7fef4ae0(,%eax,4),%esi
80100951: a1 e8 0f 11 80 mov 0x80110fe8,%eax
80100956: 01 c3 add %eax,%ebx
80100958: 29 c6 sub %eax,%esi
8010095a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100960: 8d 50 01 lea 0x1(%eax),%edx
80100963: 89 15 e8 0f 11 80 mov %edx,0x80110fe8
80100969: 0f b6 0c 30 movzbl (%eax,%esi,1),%ecx
8010096d: 83 e0 7f and $0x7f,%eax
for(int i = 0; i < history.size[history.cursor] ; i++)
80100970: 39 da cmp %ebx,%edx
input.buf[input.e++ % INPUT_BUF] = history.PervCmd[history.cursor][i];
80100972: 88 88 60 0f 11 80 mov %cl,-0x7feef0a0(%eax)
80100978: 89 d0 mov %edx,%eax
for(int i = 0; i < history.size[history.cursor] ; i++)
8010097a: 75 e4 jne 80100960 <fillBuf+0x30>
}
8010097c: 5b pop %ebx
8010097d: 5e pop %esi
8010097e: 5d pop %ebp
8010097f: c3 ret
80100980 <IncCursor>:
if (history.cursor == 4)
80100980: 8b 0d 38 b5 10 80 mov 0x8010b538,%ecx
{
80100986: 55 push %ebp
80100987: 89 e5 mov %esp,%ebp
if (history.cursor == 4)
80100989: 83 f9 04 cmp $0x4,%ecx
8010098c: 74 2a je 801009b8 <IncCursor+0x38>
history.cursor = (history.cursor + 1) % 5;
8010098e: 83 c1 01 add $0x1,%ecx
80100991: ba 67 66 66 66 mov $0x66666667,%edx
80100996: 89 c8 mov %ecx,%eax
80100998: f7 ea imul %edx
8010099a: 89 c8 mov %ecx,%eax
8010099c: c1 f8 1f sar $0x1f,%eax
8010099f: d1 fa sar %edx
801009a1: 29 c2 sub %eax,%edx
801009a3: 8d 04 92 lea (%edx,%edx,4),%eax
801009a6: 29 c1 sub %eax,%ecx
if ( history.cursor == history.cmd_count)
801009a8: 3b 0d 34 b5 10 80 cmp 0x8010b534,%ecx
history.cursor = (history.cursor + 1) % 5;
801009ae: 89 ca mov %ecx,%edx
801009b0: 89 0d 38 b5 10 80 mov %ecx,0x8010b538
if ( history.cursor == history.cmd_count)
801009b6: 74 08 je 801009c0 <IncCursor+0x40>
}
801009b8: 5d pop %ebp
801009b9: c3 ret
801009ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
history.cursor = history.cmd_count - 1;
801009c0: 83 ea 01 sub $0x1,%edx
801009c3: 89 15 38 b5 10 80 mov %edx,0x8010b538
}
801009c9: 5d pop %ebp
801009ca: c3 ret
801009cb: 90 nop
801009cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801009d0 <DecCursor>:
if ( history.cursor < 0)
801009d0: a1 38 b5 10 80 mov 0x8010b538,%eax
{
801009d5: 55 push %ebp
801009d6: 89 e5 mov %esp,%ebp
if ( history.cursor < 0)
801009d8: 85 c0 test %eax,%eax
801009da: 78 08 js 801009e4 <DecCursor+0x14>
history.cursor = history.cursor - 1;
801009dc: 83 e8 01 sub $0x1,%eax
801009df: a3 38 b5 10 80 mov %eax,0x8010b538
}
801009e4: 5d pop %ebp
801009e5: c3 ret
801009e6: 8d 76 00 lea 0x0(%esi),%esi
801009e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801009f0 <printInput>:
{
801009f0: 55 push %ebp
801009f1: 89 e5 mov %esp,%ebp
801009f3: 53 push %ebx
801009f4: 83 ec 04 sub $0x4,%esp
int i = input.w % INPUT_BUF;
801009f7: 8b 1d e4 0f 11 80 mov 0x80110fe4,%ebx
801009fd: eb 10 jmp 80100a0f <printInput+0x1f>
801009ff: 90 nop
consputc(input.buf[i]);
80100a00: 0f be 83 60 0f 11 80 movsbl -0x7feef0a0(%ebx),%eax
i = (i + 1) % INPUT_BUF;
80100a07: 83 c3 01 add $0x1,%ebx
consputc(input.buf[i]);
80100a0a: e8 01 fa ff ff call 80100410 <consputc>
while( i != (input.e % INPUT_BUF)){
80100a0f: a1 e8 0f 11 80 mov 0x80110fe8,%eax
int i = input.w % INPUT_BUF;
80100a14: 83 e3 7f and $0x7f,%ebx
while( i != (input.e % INPUT_BUF)){
80100a17: 83 e0 7f and $0x7f,%eax
80100a1a: 39 d8 cmp %ebx,%eax
80100a1c: 75 e2 jne 80100a00 <printInput+0x10>
}
80100a1e: 83 c4 04 add $0x4,%esp
80100a21: 5b pop %ebx
80100a22: 5d pop %ebp
80100a23: c3 ret
80100a24: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100a2a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80100a30 <KeyDownPressed.part.0>:
if (history.cursor == -1){
80100a30: a1 38 b5 10 80 mov 0x8010b538,%eax
80100a35: 83 f8 ff cmp $0xffffffff,%eax
80100a38: 74 1e je 80100a58 <KeyDownPressed.part.0+0x28>
KeyDownPressed()
80100a3a: 55 push %ebp
80100a3b: 89 e5 mov %esp,%ebp
80100a3d: 83 ec 08 sub $0x8,%esp
if ( history.cursor < 0)
80100a40: 85 c0 test %eax,%eax
80100a42: 78 08 js 80100a4c <KeyDownPressed.part.0+0x1c>
history.cursor = history.cursor - 1;
80100a44: 83 e8 01 sub $0x1,%eax
80100a47: a3 38 b5 10 80 mov %eax,0x8010b538
fillBuf();
80100a4c: e8 df fe ff ff call 80100930 <fillBuf>
}
80100a51: c9 leave
printInput();
80100a52: eb 9c jmp 801009f0 <printInput>
80100a54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
killLine();
80100a58: e9 63 fe ff ff jmp 801008c0 <killLine>
80100a5d: 8d 76 00 lea 0x0(%esi),%esi
80100a60 <KeyUpPressed>:
{
80100a60: 55 push %ebp
80100a61: 89 e5 mov %esp,%ebp
80100a63: 53 push %ebx
80100a64: 83 ec 04 sub $0x4,%esp
if ( history.cmd_count == 0)
80100a67: 8b 1d 34 b5 10 80 mov 0x8010b534,%ebx
80100a6d: 85 db test %ebx,%ebx
80100a6f: 74 47 je 80100ab8 <KeyUpPressed+0x58>
if (history.cursor == 4)
80100a71: 8b 0d 38 b5 10 80 mov 0x8010b538,%ecx
80100a77: 83 f9 04 cmp $0x4,%ecx
80100a7a: 74 2a je 80100aa6 <KeyUpPressed+0x46>
history.cursor = (history.cursor + 1) % 5;
80100a7c: 83 c1 01 add $0x1,%ecx
80100a7f: ba 67 66 66 66 mov $0x66666667,%edx
80100a84: 89 c8 mov %ecx,%eax
80100a86: f7 ea imul %edx
80100a88: 89 c8 mov %ecx,%eax
80100a8a: c1 f8 1f sar $0x1f,%eax
80100a8d: d1 fa sar %edx
80100a8f: 29 c2 sub %eax,%edx
80100a91: 8d 04 92 lea (%edx,%edx,4),%eax
80100a94: 29 c1 sub %eax,%ecx
80100a96: 8d 43 ff lea -0x1(%ebx),%eax
80100a99: 89 ca mov %ecx,%edx
80100a9b: 39 cb cmp %ecx,%ebx
80100a9d: 0f 44 d0 cmove %eax,%edx
80100aa0: 89 15 38 b5 10 80 mov %edx,0x8010b538
fillBuf();
80100aa6: e8 85 fe ff ff call 80100930 <fillBuf>
}
80100aab: 83 c4 04 add $0x4,%esp
80100aae: 5b pop %ebx
80100aaf: 5d pop %ebp
printInput();
80100ab0: e9 3b ff ff ff jmp 801009f0 <printInput>
80100ab5: 8d 76 00 lea 0x0(%esi),%esi
}
80100ab8: 83 c4 04 add $0x4,%esp
80100abb: 5b pop %ebx
80100abc: 5d pop %ebp
80100abd: c3 ret
80100abe: 66 90 xchg %ax,%ax
80100ac0 <KeyDownPressed>:
if ( history.cmd_count == 0)
80100ac0: a1 34 b5 10 80 mov 0x8010b534,%eax
{
80100ac5: 55 push %ebp
80100ac6: 89 e5 mov %esp,%ebp
if ( history.cmd_count == 0)
80100ac8: 85 c0 test %eax,%eax
80100aca: 74 0c je 80100ad8 <KeyDownPressed+0x18>
}
80100acc: 5d pop %ebp
80100acd: e9 5e ff ff ff jmp 80100a30 <KeyDownPressed.part.0>
80100ad2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100ad8: 5d pop %ebp
80100ad9: c3 ret
80100ada: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100ae0 <consoleintr>:
{
80100ae0: 55 push %ebp
80100ae1: 89 e5 mov %esp,%ebp
80100ae3: 57 push %edi
80100ae4: 56 push %esi
80100ae5: 53 push %ebx
int c, doprocdump = 0;
80100ae6: 31 ff xor %edi,%edi
{
80100ae8: 83 ec 18 sub $0x18,%esp
80100aeb: 8b 75 08 mov 0x8(%ebp),%esi
acquire(&cons.lock);
80100aee: 68 60 b5 10 80 push $0x8010b560
80100af3: e8 d8 45 00 00 call 801050d0 <acquire>
while((c = getc()) >= 0){
80100af8: 83 c4 10 add $0x10,%esp
80100afb: 90 nop
80100afc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100b00: ff d6 call *%esi
80100b02: 85 c0 test %eax,%eax
80100b04: 89 c3 mov %eax,%ebx
80100b06: 0f 88 b4 00 00 00 js 80100bc0 <consoleintr+0xe0>
switch(c){
80100b0c: 83 fb 15 cmp $0x15,%ebx
80100b0f: 0f 84 cb 00 00 00 je 80100be0 <consoleintr+0x100>
80100b15: 0f 8e 85 00 00 00 jle 80100ba0 <consoleintr+0xc0>
80100b1b: 81 fb e2 00 00 00 cmp $0xe2,%ebx
80100b21: 0f 84 19 01 00 00 je 80100c40 <consoleintr+0x160>
80100b27: 81 fb e3 00 00 00 cmp $0xe3,%ebx
80100b2d: 0f 84 ed 00 00 00 je 80100c20 <consoleintr+0x140>
80100b33: 83 fb 7f cmp $0x7f,%ebx
80100b36: 0f 84 b4 00 00 00 je 80100bf0 <consoleintr+0x110>
if(c != 0 && input.e-input.r < INPUT_BUF){
80100b3c: 85 db test %ebx,%ebx
80100b3e: 74 c0 je 80100b00 <consoleintr+0x20>
80100b40: a1 e8 0f 11 80 mov 0x80110fe8,%eax
80100b45: 89 c2 mov %eax,%edx
80100b47: 2b 15 e0 0f 11 80 sub 0x80110fe0,%edx
80100b4d: 83 fa 7f cmp $0x7f,%edx
80100b50: 77 ae ja 80100b00 <consoleintr+0x20>
80100b52: 8d 50 01 lea 0x1(%eax),%edx
80100b55: 83 e0 7f and $0x7f,%eax
c = (c == '\r') ? '\n' : c;
80100b58: 83 fb 0d cmp $0xd,%ebx
input.buf[input.e++ % INPUT_BUF] = c;
80100b5b: 89 15 e8 0f 11 80 mov %edx,0x80110fe8
c = (c == '\r') ? '\n' : c;
80100b61: 0f 84 f9 00 00 00 je 80100c60 <consoleintr+0x180>
input.buf[input.e++ % INPUT_BUF] = c;
80100b67: 88 98 60 0f 11 80 mov %bl,-0x7feef0a0(%eax)
consputc(c);
80100b6d: 89 d8 mov %ebx,%eax
80100b6f: e8 9c f8 ff ff call 80100410 <consputc>
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){
80100b74: 83 fb 0a cmp $0xa,%ebx
80100b77: 0f 84 f4 00 00 00 je 80100c71 <consoleintr+0x191>
80100b7d: 83 fb 04 cmp $0x4,%ebx
80100b80: 0f 84 eb 00 00 00 je 80100c71 <consoleintr+0x191>
80100b86: a1 e0 0f 11 80 mov 0x80110fe0,%eax
80100b8b: 83 e8 80 sub $0xffffff80,%eax
80100b8e: 39 05 e8 0f 11 80 cmp %eax,0x80110fe8
80100b94: 0f 85 66 ff ff ff jne 80100b00 <consoleintr+0x20>
80100b9a: e9 d7 00 00 00 jmp 80100c76 <consoleintr+0x196>
80100b9f: 90 nop
switch(c){
80100ba0: 83 fb 08 cmp $0x8,%ebx
80100ba3: 74 4b je 80100bf0 <consoleintr+0x110>
80100ba5: 83 fb 10 cmp $0x10,%ebx
80100ba8: 75 92 jne 80100b3c <consoleintr+0x5c>
while((c = getc()) >= 0){
80100baa: ff d6 call *%esi
80100bac: 85 c0 test %eax,%eax
doprocdump = 1;
80100bae: bf 01 00 00 00 mov $0x1,%edi
while((c = getc()) >= 0){
80100bb3: 89 c3 mov %eax,%ebx
80100bb5: 0f 89 51 ff ff ff jns 80100b0c <consoleintr+0x2c>
80100bbb: 90 nop
80100bbc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
release(&cons.lock);
80100bc0: 83 ec 0c sub $0xc,%esp
80100bc3: 68 60 b5 10 80 push $0x8010b560
80100bc8: e8 c3 45 00 00 call 80105190 <release>
if(doprocdump) {
80100bcd: 83 c4 10 add $0x10,%esp
80100bd0: 85 ff test %edi,%edi
80100bd2: 75 7c jne 80100c50 <consoleintr+0x170>
}
80100bd4: 8d 65 f4 lea -0xc(%ebp),%esp
80100bd7: 5b pop %ebx
80100bd8: 5e pop %esi
80100bd9: 5f pop %edi
80100bda: 5d pop %ebp
80100bdb: c3 ret
80100bdc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
killLine();
80100be0: e8 db fc ff ff call 801008c0 <killLine>
break;
80100be5: e9 16 ff ff ff jmp 80100b00 <consoleintr+0x20>
80100bea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(input.e != input.w){
80100bf0: a1 e8 0f 11 80 mov 0x80110fe8,%eax
80100bf5: 3b 05 e4 0f 11 80 cmp 0x80110fe4,%eax
80100bfb: 0f 84 ff fe ff ff je 80100b00 <consoleintr+0x20>
input.e--;
80100c01: 83 e8 01 sub $0x1,%eax
80100c04: a3 e8 0f 11 80 mov %eax,0x80110fe8
consputc(BACKSPACE);
80100c09: b8 00 01 00 00 mov $0x100,%eax
80100c0e: e8 fd f7 ff ff call 80100410 <consputc>
80100c13: e9 e8 fe ff ff jmp 80100b00 <consoleintr+0x20>
80100c18: 90 nop
80100c19: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if ( history.cmd_count == 0)
80100c20: a1 34 b5 10 80 mov 0x8010b534,%eax
80100c25: 85 c0 test %eax,%eax
80100c27: 0f 84 d3 fe ff ff je 80100b00 <consoleintr+0x20>
80100c2d: e8 fe fd ff ff call 80100a30 <KeyDownPressed.part.0>
80100c32: e9 c9 fe ff ff jmp 80100b00 <consoleintr+0x20>
80100c37: 89 f6 mov %esi,%esi
80100c39: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
KeyUpPressed();
80100c40: e8 1b fe ff ff call 80100a60 <KeyUpPressed>
break;
80100c45: e9 b6 fe ff ff jmp 80100b00 <consoleintr+0x20>
80100c4a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
}
80100c50: 8d 65 f4 lea -0xc(%ebp),%esp
80100c53: 5b pop %ebx
80100c54: 5e pop %esi
80100c55: 5f pop %edi
80100c56: 5d pop %ebp
procdump(); // now call procdump() wo. cons.lock held
80100c57: e9 e4 36 00 00 jmp 80104340 <procdump>
80100c5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
input.buf[input.e++ % INPUT_BUF] = c;
80100c60: c6 80 60 0f 11 80 0a movb $0xa,-0x7feef0a0(%eax)
consputc(c);
80100c67: b8 0a 00 00 00 mov $0xa,%eax
80100c6c: e8 9f f7 ff ff call 80100410 <consputc>
80100c71: a1 e8 0f 11 80 mov 0x80110fe8,%eax
if ( (input.e - input.w) != 1) {
80100c76: 89 c2 mov %eax,%edx
80100c78: 2b 15 e4 0f 11 80 sub 0x80110fe4,%edx
80100c7e: 83 fa 01 cmp $0x1,%edx
80100c81: 74 1b je 80100c9e <consoleintr+0x1be>
InsertNewCmd();
80100c83: e8 88 fb ff ff call 80100810 <InsertNewCmd>
history.cmd_count++;
80100c88: 83 05 34 b5 10 80 01 addl $0x1,0x8010b534
80100c8f: a1 e8 0f 11 80 mov 0x80110fe8,%eax
history.cursor = -1;
80100c94: c7 05 38 b5 10 80 ff movl $0xffffffff,0x8010b538
80100c9b: ff ff ff
wakeup(&input.r);
80100c9e: 83 ec 0c sub $0xc,%esp
input.w = input.e;
80100ca1: a3 e4 0f 11 80 mov %eax,0x80110fe4
wakeup(&input.r);
80100ca6: 68 e0 0f 11 80 push $0x80110fe0
80100cab: e8 b0 35 00 00 call 80104260 <wakeup>
80100cb0: 83 c4 10 add $0x10,%esp
80100cb3: e9 48 fe ff ff jmp 80100b00 <consoleintr+0x20>
80100cb8: 90 nop
80100cb9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80100cc0 <consoleinit>:
void
consoleinit(void)
{
80100cc0: 55 push %ebp
80100cc1: 89 e5 mov %esp,%ebp
80100cc3: 83 ec 10 sub $0x10,%esp
initlock(&cons.lock, "console");
80100cc6: 68 c8 7d 10 80 push $0x80107dc8
80100ccb: 68 60 b5 10 80 push $0x8010b560
80100cd0: e8 bb 42 00 00 call 80104f90 <initlock>
devsw[CONSOLE].write = consolewrite;
devsw[CONSOLE].read = consoleread;
cons.locking = 1;
ioapicenable(IRQ_KBD, 0);
80100cd5: 58 pop %eax
80100cd6: 5a pop %edx
80100cd7: 6a 00 push $0x0
80100cd9: 6a 01 push $0x1
devsw[CONSOLE].write = consolewrite;
80100cdb: c7 05 2c 1c 11 80 00 movl $0x80100600,0x80111c2c
80100ce2: 06 10 80
devsw[CONSOLE].read = consoleread;
80100ce5: c7 05 28 1c 11 80 70 movl $0x80100270,0x80111c28
80100cec: 02 10 80
cons.locking = 1;
80100cef: c7 05 94 b5 10 80 01 movl $0x1,0x8010b594
80100cf6: 00 00 00
ioapicenable(IRQ_KBD, 0);
80100cf9: e8 42 19 00 00 call 80102640 <ioapicenable>
}
80100cfe: 83 c4 10 add $0x10,%esp
80100d01: c9 leave
80100d02: c3 ret
80100d03: 66 90 xchg %ax,%ax
80100d05: 66 90 xchg %ax,%ax
80100d07: 66 90 xchg %ax,%ax
80100d09: 66 90 xchg %ax,%ax
80100d0b: 66 90 xchg %ax,%ax
80100d0d: 66 90 xchg %ax,%ax
80100d0f: 90 nop
80100d10 <exec>:
#include "x86.h"
#include "elf.h"
int
exec(char *path, char **argv)
{
80100d10: 55 push %ebp
80100d11: 89 e5 mov %esp,%ebp
80100d13: 57 push %edi
80100d14: 56 push %esi
80100d15: 53 push %ebx
80100d16: 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();
80100d1c: e8 7f 2e 00 00 call 80103ba0 <myproc>
80100d21: 89 c6 mov %eax,%esi
begin_op();
80100d23: e8 e8 21 00 00 call 80102f10 <begin_op>
//For testing priority
find_and_set_sched_queue(LOTTERY, curproc->pid);
80100d28: 83 ec 08 sub $0x8,%esp
80100d2b: ff 76 10 pushl 0x10(%esi)
80100d2e: 6a 02 push $0x2
80100d30: e8 fb 39 00 00 call 80104730 <find_and_set_sched_queue>
find_and_set_lottery_ticket(500, curproc->pid);
80100d35: 59 pop %ecx
80100d36: 5b pop %ebx
80100d37: ff 76 10 pushl 0x10(%esi)
80100d3a: 68 f4 01 00 00 push $0x1f4
80100d3f: e8 bc 39 00 00 call 80104700 <find_and_set_lottery_ticket>
find_and_set_burst_time(0, curproc->pid);
80100d44: 5f pop %edi
80100d45: 58 pop %eax
80100d46: ff 76 10 pushl 0x10(%esi)
80100d49: 6a 00 push $0x0
80100d4b: e8 10 3a 00 00 call 80104760 <find_and_set_burst_time>
if((ip = namei(path)) == 0){
80100d50: 58 pop %eax
80100d51: ff 75 08 pushl 0x8(%ebp)
80100d54: e8 f7 14 00 00 call 80102250 <namei>
80100d59: 83 c4 10 add $0x10,%esp
80100d5c: 85 c0 test %eax,%eax
80100d5e: 0f 84 b8 01 00 00 je 80100f1c <exec+0x20c>
end_op();
cprintf("exec: fail\n");
return -1;
}
ilock(ip);
80100d64: 83 ec 0c sub $0xc,%esp
80100d67: 89 c3 mov %eax,%ebx
80100d69: 50 push %eax
80100d6a: e8 81 0c 00 00 call 801019f0 <ilock>
pgdir = 0;
// Check ELF header
if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf))
80100d6f: 8d 85 24 ff ff ff lea -0xdc(%ebp),%eax
80100d75: 6a 34 push $0x34
80100d77: 6a 00 push $0x0
80100d79: 50 push %eax
80100d7a: 53 push %ebx
80100d7b: e8 50 0f 00 00 call 80101cd0 <readi>
80100d80: 83 c4 20 add $0x20,%esp
80100d83: 83 f8 34 cmp $0x34,%eax
80100d86: 74 28 je 80100db0 <exec+0xa0>
bad:
if(pgdir)
freevm(pgdir);
if(ip){
iunlockput(ip);
80100d88: 83 ec 0c sub $0xc,%esp
80100d8b: 53 push %ebx
80100d8c: e8 ef 0e 00 00 call 80101c80 <iunlockput>
end_op();
80100d91: e8 ea 21 00 00 call 80102f80 <end_op>
80100d96: 83 c4 10 add $0x10,%esp
}
return -1;
80100d99: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100d9e: 8d 65 f4 lea -0xc(%ebp),%esp
80100da1: 5b pop %ebx
80100da2: 5e pop %esi
80100da3: 5f pop %edi
80100da4: 5d pop %ebp
80100da5: c3 ret
80100da6: 8d 76 00 lea 0x0(%esi),%esi
80100da9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(elf.magic != ELF_MAGIC)
80100db0: 81 bd 24 ff ff ff 7f cmpl $0x464c457f,-0xdc(%ebp)
80100db7: 45 4c 46
80100dba: 75 cc jne 80100d88 <exec+0x78>
if((pgdir = setupkvm()) == 0)
80100dbc: e8 ff 6c 00 00 call 80107ac0 <setupkvm>
80100dc1: 85 c0 test %eax,%eax
80100dc3: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp)
80100dc9: 74 bd je 80100d88 <exec+0x78>
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100dcb: 66 83 bd 50 ff ff ff cmpw $0x0,-0xb0(%ebp)
80100dd2: 00
80100dd3: 8b 85 40 ff ff ff mov -0xc0(%ebp),%eax
80100dd9: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp)
80100ddf: 0f 84 b6 02 00 00 je 8010109b <exec+0x38b>
sz = 0;
80100de5: 31 c0 xor %eax,%eax
80100de7: 89 b5 ec fe ff ff mov %esi,-0x114(%ebp)
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100ded: 31 ff xor %edi,%edi
80100def: 89 c6 mov %eax,%esi
80100df1: eb 7f jmp 80100e72 <exec+0x162>
80100df3: 90 nop
80100df4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(ph.type != ELF_PROG_LOAD)
80100df8: 83 bd 04 ff ff ff 01 cmpl $0x1,-0xfc(%ebp)
80100dff: 75 63 jne 80100e64 <exec+0x154>
if(ph.memsz < ph.filesz)
80100e01: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax
80100e07: 3b 85 14 ff ff ff cmp -0xec(%ebp),%eax
80100e0d: 0f 82 86 00 00 00 jb 80100e99 <exec+0x189>
80100e13: 03 85 0c ff ff ff add -0xf4(%ebp),%eax
80100e19: 72 7e jb 80100e99 <exec+0x189>
if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0)
80100e1b: 83 ec 04 sub $0x4,%esp
80100e1e: 50 push %eax
80100e1f: 56 push %esi
80100e20: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100e26: e8 b5 6a 00 00 call 801078e0 <allocuvm>
80100e2b: 83 c4 10 add $0x10,%esp
80100e2e: 85 c0 test %eax,%eax
80100e30: 89 c6 mov %eax,%esi
80100e32: 74 65 je 80100e99 <exec+0x189>
if(ph.vaddr % PGSIZE != 0)
80100e34: 8b 85 0c ff ff ff mov -0xf4(%ebp),%eax
80100e3a: a9 ff 0f 00 00 test $0xfff,%eax
80100e3f: 75 58 jne 80100e99 <exec+0x189>
if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0)
80100e41: 83 ec 0c sub $0xc,%esp
80100e44: ff b5 14 ff ff ff pushl -0xec(%ebp)
80100e4a: ff b5 08 ff ff ff pushl -0xf8(%ebp)
80100e50: 53 push %ebx
80100e51: 50 push %eax
80100e52: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100e58: e8 c3 69 00 00 call 80107820 <loaduvm>
80100e5d: 83 c4 20 add $0x20,%esp
80100e60: 85 c0 test %eax,%eax
80100e62: 78 35 js 80100e99 <exec+0x189>
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100e64: 0f b7 85 50 ff ff ff movzwl -0xb0(%ebp),%eax
80100e6b: 83 c7 01 add $0x1,%edi
80100e6e: 39 f8 cmp %edi,%eax
80100e70: 7e 3d jle 80100eaf <exec+0x19f>
if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph))
80100e72: 89 f8 mov %edi,%eax
80100e74: 6a 20 push $0x20
80100e76: c1 e0 05 shl $0x5,%eax
80100e79: 03 85 f0 fe ff ff add -0x110(%ebp),%eax
80100e7f: 50 push %eax
80100e80: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
80100e86: 50 push %eax
80100e87: 53 push %ebx
80100e88: e8 43 0e 00 00 call 80101cd0 <readi>
80100e8d: 83 c4 10 add $0x10,%esp
80100e90: 83 f8 20 cmp $0x20,%eax
80100e93: 0f 84 5f ff ff ff je 80100df8 <exec+0xe8>
freevm(pgdir);
80100e99: 83 ec 0c sub $0xc,%esp
80100e9c: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100ea2: e8 99 6b 00 00 call 80107a40 <freevm>
80100ea7: 83 c4 10 add $0x10,%esp
80100eaa: e9 d9 fe ff ff jmp 80100d88 <exec+0x78>
80100eaf: 89 f0 mov %esi,%eax
80100eb1: 8b b5 ec fe ff ff mov -0x114(%ebp),%esi
80100eb7: 05 ff 0f 00 00 add $0xfff,%eax
80100ebc: 89 c7 mov %eax,%edi
80100ebe: 81 e7 00 f0 ff ff and $0xfffff000,%edi
80100ec4: 8d 87 00 20 00 00 lea 0x2000(%edi),%eax
iunlockput(ip);
80100eca: 83 ec 0c sub $0xc,%esp
80100ecd: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp)
80100ed3: 53 push %ebx
80100ed4: e8 a7 0d 00 00 call 80101c80 <iunlockput>
end_op();
80100ed9: e8 a2 20 00 00 call 80102f80 <end_op>
if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0)
80100ede: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax
80100ee4: 83 c4 0c add $0xc,%esp
80100ee7: 50 push %eax
80100ee8: 57 push %edi
80100ee9: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100eef: e8 ec 69 00 00 call 801078e0 <allocuvm>
80100ef4: 83 c4 10 add $0x10,%esp
80100ef7: 85 c0 test %eax,%eax
80100ef9: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp)
80100eff: 75 3a jne 80100f3b <exec+0x22b>
freevm(pgdir);
80100f01: 83 ec 0c sub $0xc,%esp
80100f04: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100f0a: e8 31 6b 00 00 call 80107a40 <freevm>
80100f0f: 83 c4 10 add $0x10,%esp
return -1;
80100f12: b8 ff ff ff ff mov $0xffffffff,%eax
80100f17: e9 82 fe ff ff jmp 80100d9e <exec+0x8e>
end_op();
80100f1c: e8 5f 20 00 00 call 80102f80 <end_op>
cprintf("exec: fail\n");
80100f21: 83 ec 0c sub $0xc,%esp
80100f24: 68 e1 7d 10 80 push $0x80107de1
80100f29: e8 32 f7 ff ff call 80100660 <cprintf>
return -1;
80100f2e: 83 c4 10 add $0x10,%esp
80100f31: b8 ff ff ff ff mov $0xffffffff,%eax
80100f36: e9 63 fe ff ff jmp 80100d9e <exec+0x8e>
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100f3b: 89 c3 mov %eax,%ebx
80100f3d: 8d 80 00 e0 ff ff lea -0x2000(%eax),%eax
80100f43: 83 ec 08 sub $0x8,%esp
for(argc = 0; argv[argc]; argc++) {
80100f46: 31 ff xor %edi,%edi
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100f48: 50 push %eax
80100f49: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
80100f4f: e8 0c 6c 00 00 call 80107b60 <clearpteu>
for(argc = 0; argv[argc]; argc++) {
80100f54: 8b 45 0c mov 0xc(%ebp),%eax
80100f57: 83 c4 10 add $0x10,%esp
80100f5a: 8b 00 mov (%eax),%eax
80100f5c: 85 c0 test %eax,%eax
80100f5e: 0f 84 43 01 00 00 je 801010a7 <exec+0x397>
80100f64: 89 b5 ec fe ff ff mov %esi,-0x114(%ebp)
80100f6a: 8b b5 f4 fe ff ff mov -0x10c(%ebp),%esi
80100f70: eb 0b jmp 80100f7d <exec+0x26d>
80100f72: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(argc >= MAXARG)
80100f78: 83 ff 20 cmp $0x20,%edi
80100f7b: 74 84 je 80100f01 <exec+0x1f1>
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100f7d: 83 ec 0c sub $0xc,%esp
80100f80: 50 push %eax
80100f81: e8 7a 44 00 00 call 80105400 <strlen>
80100f86: f7 d0 not %eax
80100f88: 01 c3 add %eax,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100f8a: 8b 45 0c mov 0xc(%ebp),%eax
80100f8d: 5a pop %edx
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100f8e: 83 e3 fc and $0xfffffffc,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100f91: ff 34 b8 pushl (%eax,%edi,4)
80100f94: e8 67 44 00 00 call 80105400 <strlen>
80100f99: 83 c0 01 add $0x1,%eax
80100f9c: 50 push %eax
80100f9d: 8b 45 0c mov 0xc(%ebp),%eax
80100fa0: ff 34 b8 pushl (%eax,%edi,4)
80100fa3: 53 push %ebx
80100fa4: 56 push %esi
80100fa5: e8 16 6d 00 00 call 80107cc0 <copyout>
80100faa: 83 c4 20 add $0x20,%esp
80100fad: 85 c0 test %eax,%eax
80100faf: 0f 88 4c ff ff ff js 80100f01 <exec+0x1f1>
for(argc = 0; argv[argc]; argc++) {
80100fb5: 8b 45 0c mov 0xc(%ebp),%eax
ustack[3+argc] = sp;
80100fb8: 89 9c bd 64 ff ff ff mov %ebx,-0x9c(%ebp,%edi,4)
for(argc = 0; argv[argc]; argc++) {
80100fbf: 83 c7 01 add $0x1,%edi
ustack[3+argc] = sp;
80100fc2: 8d 8d 58 ff ff ff lea -0xa8(%ebp),%ecx
for(argc = 0; argv[argc]; argc++) {
80100fc8: 8b 04 b8 mov (%eax,%edi,4),%eax
80100fcb: 85 c0 test %eax,%eax
80100fcd: 75 a9 jne 80100f78 <exec+0x268>
80100fcf: 8b b5 ec fe ff ff mov -0x114(%ebp),%esi
ustack[2] = sp - (argc+1)*4; // argv pointer
80100fd5: 8d 04 bd 04 00 00 00 lea 0x4(,%edi,4),%eax
80100fdc: 89 da mov %ebx,%edx
ustack[3+argc] = 0;
80100fde: c7 84 bd 64 ff ff ff movl $0x0,-0x9c(%ebp,%edi,4)
80100fe5: 00 00 00 00
ustack[0] = 0xffffffff; // fake return PC
80100fe9: c7 85 58 ff ff ff ff movl $0xffffffff,-0xa8(%ebp)
80100ff0: ff ff ff
ustack[1] = argc;
80100ff3: 89 bd 5c ff ff ff mov %edi,-0xa4(%ebp)
ustack[2] = sp - (argc+1)*4; // argv pointer
80100ff9: 29 c2 sub %eax,%edx
sp -= (3+argc+1) * 4;
80100ffb: 83 c0 0c add $0xc,%eax
80100ffe: 29 c3 sub %eax,%ebx
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
80101000: 50 push %eax
80101001: 51 push %ecx
80101002: 53 push %ebx
80101003: ff b5 f4 fe ff ff pushl -0x10c(%ebp)
ustack[2] = sp - (argc+1)*4; // argv pointer
80101009: 89 95 60 ff ff ff mov %edx,-0xa0(%ebp)
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
8010100f: e8 ac 6c 00 00 call 80107cc0 <copyout>
80101014: 83 c4 10 add $0x10,%esp
80101017: 85 c0 test %eax,%eax
80101019: 0f 88 e2 fe ff ff js 80100f01 <exec+0x1f1>
for(last=s=path; *s; s++)
8010101f: 8b 45 08 mov 0x8(%ebp),%eax
80101022: 0f b6 00 movzbl (%eax),%eax
80101025: 84 c0 test %al,%al
80101027: 74 17 je 80101040 <exec+0x330>
80101029: 8b 55 08 mov 0x8(%ebp),%edx
8010102c: 89 d1 mov %edx,%ecx
8010102e: 83 c1 01 add $0x1,%ecx
80101031: 3c 2f cmp $0x2f,%al
80101033: 0f b6 01 movzbl (%ecx),%eax
80101036: 0f 44 d1 cmove %ecx,%edx
80101039: 84 c0 test %al,%al
8010103b: 75 f1 jne 8010102e <exec+0x31e>
8010103d: 89 55 08 mov %edx,0x8(%ebp)
safestrcpy(curproc->name, last, sizeof(curproc->name));
80101040: 50 push %eax
80101041: 8d 46 6c lea 0x6c(%esi),%eax
80101044: 6a 10 push $0x10
80101046: ff 75 08 pushl 0x8(%ebp)
80101049: 50 push %eax
8010104a: e8 71 43 00 00 call 801053c0 <safestrcpy>
oldpgdir = curproc->pgdir;
8010104f: 8b 46 04 mov 0x4(%esi),%eax
curproc->tf->eip = elf.entry; // main
80101052: 8b 56 18 mov 0x18(%esi),%edx
oldpgdir = curproc->pgdir;
80101055: 89 85 ec fe ff ff mov %eax,-0x114(%ebp)
curproc->pgdir = pgdir;
8010105b: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax
80101061: 89 46 04 mov %eax,0x4(%esi)
curproc->sz = sz;
80101064: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax
8010106a: 89 06 mov %eax,(%esi)
curproc->tf->eip = elf.entry; // main
8010106c: 8b 8d 3c ff ff ff mov -0xc4(%ebp),%ecx
80101072: 89 4a 38 mov %ecx,0x38(%edx)
curproc->tf->esp = sp;
80101075: 8b 56 18 mov 0x18(%esi),%edx
80101078: 89 5a 44 mov %ebx,0x44(%edx)
switchuvm(curproc);
8010107b: 89 34 24 mov %esi,(%esp)
8010107e: e8 0d 66 00 00 call 80107690 <switchuvm>
freevm(oldpgdir);
80101083: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax
80101089: 89 04 24 mov %eax,(%esp)
8010108c: e8 af 69 00 00 call 80107a40 <freevm>
return 0;
80101091: 83 c4 10 add $0x10,%esp
80101094: 31 c0 xor %eax,%eax
80101096: e9 03 fd ff ff jmp 80100d9e <exec+0x8e>
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
8010109b: 31 ff xor %edi,%edi
8010109d: b8 00 20 00 00 mov $0x2000,%eax
801010a2: e9 23 fe ff ff jmp 80100eca <exec+0x1ba>
for(argc = 0; argv[argc]; argc++) {
801010a7: 8b 9d f0 fe ff ff mov -0x110(%ebp),%ebx
801010ad: 8d 8d 58 ff ff ff lea -0xa8(%ebp),%ecx
801010b3: e9 1d ff ff ff jmp 80100fd5 <exec+0x2c5>
801010b8: 66 90 xchg %ax,%ax
801010ba: 66 90 xchg %ax,%ax
801010bc: 66 90 xchg %ax,%ax
801010be: 66 90 xchg %ax,%ax
801010c0 <fileinit>:
struct file file[NFILE];
} ftable;
void
fileinit(void)
{
801010c0: 55 push %ebp
801010c1: 89 e5 mov %esp,%ebp
801010c3: 83 ec 10 sub $0x10,%esp
initlock(&ftable.lock, "ftable");
801010c6: 68 ed 7d 10 80 push $0x80107ded
801010cb: 68 80 12 11 80 push $0x80111280
801010d0: e8 bb 3e 00 00 call 80104f90 <initlock>
}
801010d5: 83 c4 10 add $0x10,%esp
801010d8: c9 leave
801010d9: c3 ret
801010da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801010e0 <filealloc>:
// Allocate a file structure.
struct file*
filealloc(void)
{
801010e0: 55 push %ebp
801010e1: 89 e5 mov %esp,%ebp
801010e3: 53 push %ebx
struct file *f;
acquire(&ftable.lock);
for(f = ftable.file; f < ftable.file + NFILE; f++){
801010e4: bb b4 12 11 80 mov $0x801112b4,%ebx
{
801010e9: 83 ec 10 sub $0x10,%esp
acquire(&ftable.lock);
801010ec: 68 80 12 11 80 push $0x80111280
801010f1: e8 da 3f 00 00 call 801050d0 <acquire>
801010f6: 83 c4 10 add $0x10,%esp
801010f9: eb 10 jmp 8010110b <filealloc+0x2b>
801010fb: 90 nop
801010fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(f = ftable.file; f < ftable.file + NFILE; f++){
80101100: 83 c3 18 add $0x18,%ebx
80101103: 81 fb 14 1c 11 80 cmp $0x80111c14,%ebx
80101109: 73 25 jae 80101130 <filealloc+0x50>
if(f->ref == 0){
8010110b: 8b 43 04 mov 0x4(%ebx),%eax
8010110e: 85 c0 test %eax,%eax
80101110: 75 ee jne 80101100 <filealloc+0x20>
f->ref = 1;
release(&ftable.lock);
80101112: 83 ec 0c sub $0xc,%esp
f->ref = 1;
80101115: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
release(&ftable.lock);
8010111c: 68 80 12 11 80 push $0x80111280
80101121: e8 6a 40 00 00 call 80105190 <release>
return f;
}
}
release(&ftable.lock);
return 0;
}
80101126: 89 d8 mov %ebx,%eax
return f;
80101128: 83 c4 10 add $0x10,%esp
}
8010112b: 8b 5d fc mov -0x4(%ebp),%ebx
8010112e: c9 leave
8010112f: c3 ret
release(&ftable.lock);
80101130: 83 ec 0c sub $0xc,%esp
return 0;
80101133: 31 db xor %ebx,%ebx
release(&ftable.lock);
80101135: 68 80 12 11 80 push $0x80111280
8010113a: e8 51 40 00 00 call 80105190 <release>
}
8010113f: 89 d8 mov %ebx,%eax
return 0;
80101141: 83 c4 10 add $0x10,%esp
}
80101144: 8b 5d fc mov -0x4(%ebp),%ebx
80101147: c9 leave
80101148: c3 ret
80101149: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101150 <filedup>:
// Increment ref count for file f.
struct file*
filedup(struct file *f)
{
80101150: 55 push %ebp
80101151: 89 e5 mov %esp,%ebp
80101153: 53 push %ebx
80101154: 83 ec 10 sub $0x10,%esp
80101157: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ftable.lock);
8010115a: 68 80 12 11 80 push $0x80111280
8010115f: e8 6c 3f 00 00 call 801050d0 <acquire>
if(f->ref < 1)
80101164: 8b 43 04 mov 0x4(%ebx),%eax
80101167: 83 c4 10 add $0x10,%esp
8010116a: 85 c0 test %eax,%eax
8010116c: 7e 1a jle 80101188 <filedup+0x38>
panic("filedup");
f->ref++;
8010116e: 83 c0 01 add $0x1,%eax
release(&ftable.lock);
80101171: 83 ec 0c sub $0xc,%esp
f->ref++;
80101174: 89 43 04 mov %eax,0x4(%ebx)
release(&ftable.lock);
80101177: 68 80 12 11 80 push $0x80111280
8010117c: e8 0f 40 00 00 call 80105190 <release>
return f;
}
80101181: 89 d8 mov %ebx,%eax
80101183: 8b 5d fc mov -0x4(%ebp),%ebx
80101186: c9 leave
80101187: c3 ret
panic("filedup");
80101188: 83 ec 0c sub $0xc,%esp
8010118b: 68 f4 7d 10 80 push $0x80107df4
80101190: e8 fb f1 ff ff call 80100390 <panic>
80101195: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101199: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801011a0 <fileclose>:
// Close file f. (Decrement ref count, close when reaches 0.)
void
fileclose(struct file *f)
{
801011a0: 55 push %ebp
801011a1: 89 e5 mov %esp,%ebp
801011a3: 57 push %edi
801011a4: 56 push %esi
801011a5: 53 push %ebx
801011a6: 83 ec 28 sub $0x28,%esp
801011a9: 8b 5d 08 mov 0x8(%ebp),%ebx
struct file ff;
acquire(&ftable.lock);
801011ac: 68 80 12 11 80 push $0x80111280
801011b1: e8 1a 3f 00 00 call 801050d0 <acquire>
if(f->ref < 1)
801011b6: 8b 43 04 mov 0x4(%ebx),%eax
801011b9: 83 c4 10 add $0x10,%esp
801011bc: 85 c0 test %eax,%eax
801011be: 0f 8e 9b 00 00 00 jle 8010125f <fileclose+0xbf>
panic("fileclose");
if(--f->ref > 0){
801011c4: 83 e8 01 sub $0x1,%eax
801011c7: 85 c0 test %eax,%eax
801011c9: 89 43 04 mov %eax,0x4(%ebx)
801011cc: 74 1a je 801011e8 <fileclose+0x48>
release(&ftable.lock);
801011ce: c7 45 08 80 12 11 80 movl $0x80111280,0x8(%ebp)
else if(ff.type == FD_INODE){
begin_op();
iput(ff.ip);
end_op();
}
}
801011d5: 8d 65 f4 lea -0xc(%ebp),%esp
801011d8: 5b pop %ebx
801011d9: 5e pop %esi
801011da: 5f pop %edi
801011db: 5d pop %ebp
release(&ftable.lock);
801011dc: e9 af 3f 00 00 jmp 80105190 <release>
801011e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
ff = *f;
801011e8: 0f b6 43 09 movzbl 0x9(%ebx),%eax
801011ec: 8b 3b mov (%ebx),%edi
release(&ftable.lock);
801011ee: 83 ec 0c sub $0xc,%esp
ff = *f;
801011f1: 8b 73 0c mov 0xc(%ebx),%esi
f->type = FD_NONE;
801011f4: c7 03 00 00 00 00 movl $0x0,(%ebx)
ff = *f;
801011fa: 88 45 e7 mov %al,-0x19(%ebp)
801011fd: 8b 43 10 mov 0x10(%ebx),%eax
release(&ftable.lock);
80101200: 68 80 12 11 80 push $0x80111280
ff = *f;
80101205: 89 45 e0 mov %eax,-0x20(%ebp)
release(&ftable.lock);
80101208: e8 83 3f 00 00 call 80105190 <release>
if(ff.type == FD_PIPE)
8010120d: 83 c4 10 add $0x10,%esp
80101210: 83 ff 01 cmp $0x1,%edi
80101213: 74 13 je 80101228 <fileclose+0x88>
else if(ff.type == FD_INODE){
80101215: 83 ff 02 cmp $0x2,%edi
80101218: 74 26 je 80101240 <fileclose+0xa0>
}
8010121a: 8d 65 f4 lea -0xc(%ebp),%esp
8010121d: 5b pop %ebx
8010121e: 5e pop %esi
8010121f: 5f pop %edi
80101220: 5d pop %ebp
80101221: c3 ret
80101222: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
pipeclose(ff.pipe, ff.writable);
80101228: 0f be 5d e7 movsbl -0x19(%ebp),%ebx
8010122c: 83 ec 08 sub $0x8,%esp
8010122f: 53 push %ebx
80101230: 56 push %esi
80101231: e8 8a 24 00 00 call 801036c0 <pipeclose>
80101236: 83 c4 10 add $0x10,%esp
80101239: eb df jmp 8010121a <fileclose+0x7a>
8010123b: 90 nop
8010123c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
begin_op();
80101240: e8 cb 1c 00 00 call 80102f10 <begin_op>
iput(ff.ip);
80101245: 83 ec 0c sub $0xc,%esp
80101248: ff 75 e0 pushl -0x20(%ebp)
8010124b: e8 d0 08 00 00 call 80101b20 <iput>
end_op();
80101250: 83 c4 10 add $0x10,%esp
}
80101253: 8d 65 f4 lea -0xc(%ebp),%esp
80101256: 5b pop %ebx
80101257: 5e pop %esi
80101258: 5f pop %edi
80101259: 5d pop %ebp
end_op();
8010125a: e9 21 1d 00 00 jmp 80102f80 <end_op>
panic("fileclose");
8010125f: 83 ec 0c sub $0xc,%esp
80101262: 68 fc 7d 10 80 push $0x80107dfc
80101267: e8 24 f1 ff ff call 80100390 <panic>
8010126c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101270 <filestat>:
// Get metadata about file f.
int
filestat(struct file *f, struct stat *st)
{
80101270: 55 push %ebp
80101271: 89 e5 mov %esp,%ebp
80101273: 53 push %ebx
80101274: 83 ec 04 sub $0x4,%esp
80101277: 8b 5d 08 mov 0x8(%ebp),%ebx
if(f->type == FD_INODE){
8010127a: 83 3b 02 cmpl $0x2,(%ebx)
8010127d: 75 31 jne 801012b0 <filestat+0x40>
ilock(f->ip);
8010127f: 83 ec 0c sub $0xc,%esp
80101282: ff 73 10 pushl 0x10(%ebx)
80101285: e8 66 07 00 00 call 801019f0 <ilock>
stati(f->ip, st);
8010128a: 58 pop %eax
8010128b: 5a pop %edx
8010128c: ff 75 0c pushl 0xc(%ebp)
8010128f: ff 73 10 pushl 0x10(%ebx)
80101292: e8 09 0a 00 00 call 80101ca0 <stati>
iunlock(f->ip);
80101297: 59 pop %ecx
80101298: ff 73 10 pushl 0x10(%ebx)
8010129b: e8 30 08 00 00 call 80101ad0 <iunlock>
return 0;
801012a0: 83 c4 10 add $0x10,%esp
801012a3: 31 c0 xor %eax,%eax
}
return -1;
}
801012a5: 8b 5d fc mov -0x4(%ebp),%ebx
801012a8: c9 leave
801012a9: c3 ret
801012aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return -1;
801012b0: b8 ff ff ff ff mov $0xffffffff,%eax
801012b5: eb ee jmp 801012a5 <filestat+0x35>
801012b7: 89 f6 mov %esi,%esi
801012b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801012c0 <fileread>:
// Read from file f.
int
fileread(struct file *f, char *addr, int n)
{
801012c0: 55 push %ebp
801012c1: 89 e5 mov %esp,%ebp
801012c3: 57 push %edi
801012c4: 56 push %esi
801012c5: 53 push %ebx
801012c6: 83 ec 0c sub $0xc,%esp
801012c9: 8b 5d 08 mov 0x8(%ebp),%ebx
801012cc: 8b 75 0c mov 0xc(%ebp),%esi
801012cf: 8b 7d 10 mov 0x10(%ebp),%edi
int r;
if(f->readable == 0)
801012d2: 80 7b 08 00 cmpb $0x0,0x8(%ebx)
801012d6: 74 60 je 80101338 <fileread+0x78>
return -1;
if(f->type == FD_PIPE)
801012d8: 8b 03 mov (%ebx),%eax
801012da: 83 f8 01 cmp $0x1,%eax
801012dd: 74 41 je 80101320 <fileread+0x60>
return piperead(f->pipe, addr, n);
if(f->type == FD_INODE){
801012df: 83 f8 02 cmp $0x2,%eax
801012e2: 75 5b jne 8010133f <fileread+0x7f>
ilock(f->ip);
801012e4: 83 ec 0c sub $0xc,%esp
801012e7: ff 73 10 pushl 0x10(%ebx)
801012ea: e8 01 07 00 00 call 801019f0 <ilock>
if((r = readi(f->ip, addr, f->off, n)) > 0)
801012ef: 57 push %edi
801012f0: ff 73 14 pushl 0x14(%ebx)
801012f3: 56 push %esi
801012f4: ff 73 10 pushl 0x10(%ebx)
801012f7: e8 d4 09 00 00 call 80101cd0 <readi>
801012fc: 83 c4 20 add $0x20,%esp
801012ff: 85 c0 test %eax,%eax
80101301: 89 c6 mov %eax,%esi
80101303: 7e 03 jle 80101308 <fileread+0x48>
f->off += r;
80101305: 01 43 14 add %eax,0x14(%ebx)
iunlock(f->ip);
80101308: 83 ec 0c sub $0xc,%esp
8010130b: ff 73 10 pushl 0x10(%ebx)
8010130e: e8 bd 07 00 00 call 80101ad0 <iunlock>
return r;
80101313: 83 c4 10 add $0x10,%esp
}
panic("fileread");
}
80101316: 8d 65 f4 lea -0xc(%ebp),%esp
80101319: 89 f0 mov %esi,%eax
8010131b: 5b pop %ebx
8010131c: 5e pop %esi
8010131d: 5f pop %edi
8010131e: 5d pop %ebp
8010131f: c3 ret
return piperead(f->pipe, addr, n);
80101320: 8b 43 0c mov 0xc(%ebx),%eax
80101323: 89 45 08 mov %eax,0x8(%ebp)
}
80101326: 8d 65 f4 lea -0xc(%ebp),%esp
80101329: 5b pop %ebx
8010132a: 5e pop %esi
8010132b: 5f pop %edi
8010132c: 5d pop %ebp
return piperead(f->pipe, addr, n);
8010132d: e9 3e 25 00 00 jmp 80103870 <piperead>
80101332: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return -1;
80101338: be ff ff ff ff mov $0xffffffff,%esi
8010133d: eb d7 jmp 80101316 <fileread+0x56>
panic("fileread");
8010133f: 83 ec 0c sub $0xc,%esp
80101342: 68 06 7e 10 80 push $0x80107e06
80101347: e8 44 f0 ff ff call 80100390 <panic>
8010134c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101350 <filewrite>:
//PAGEBREAK!
// Write to file f.
int
filewrite(struct file *f, char *addr, int n)
{
80101350: 55 push %ebp
80101351: 89 e5 mov %esp,%ebp
80101353: 57 push %edi
80101354: 56 push %esi
80101355: 53 push %ebx
80101356: 83 ec 1c sub $0x1c,%esp
80101359: 8b 75 08 mov 0x8(%ebp),%esi
8010135c: 8b 45 0c mov 0xc(%ebp),%eax
int r;
if(f->writable == 0)
8010135f: 80 7e 09 00 cmpb $0x0,0x9(%esi)
{
80101363: 89 45 dc mov %eax,-0x24(%ebp)
80101366: 8b 45 10 mov 0x10(%ebp),%eax
80101369: 89 45 e4 mov %eax,-0x1c(%ebp)
if(f->writable == 0)
8010136c: 0f 84 aa 00 00 00 je 8010141c <filewrite+0xcc>
return -1;
if(f->type == FD_PIPE)
80101372: 8b 06 mov (%esi),%eax
80101374: 83 f8 01 cmp $0x1,%eax
80101377: 0f 84 c3 00 00 00 je 80101440 <filewrite+0xf0>
return pipewrite(f->pipe, addr, n);
if(f->type == FD_INODE){
8010137d: 83 f8 02 cmp $0x2,%eax
80101380: 0f 85 d9 00 00 00 jne 8010145f <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){
80101386: 8b 45 e4 mov -0x1c(%ebp),%eax
int i = 0;
80101389: 31 ff xor %edi,%edi
while(i < n){
8010138b: 85 c0 test %eax,%eax
8010138d: 7f 34 jg 801013c3 <filewrite+0x73>
8010138f: e9 9c 00 00 00 jmp 80101430 <filewrite+0xe0>
80101394: 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;
80101398: 01 46 14 add %eax,0x14(%esi)
iunlock(f->ip);
8010139b: 83 ec 0c sub $0xc,%esp
8010139e: ff 76 10 pushl 0x10(%esi)
f->off += r;
801013a1: 89 45 e0 mov %eax,-0x20(%ebp)
iunlock(f->ip);
801013a4: e8 27 07 00 00 call 80101ad0 <iunlock>
end_op();
801013a9: e8 d2 1b 00 00 call 80102f80 <end_op>
801013ae: 8b 45 e0 mov -0x20(%ebp),%eax
801013b1: 83 c4 10 add $0x10,%esp
if(r < 0)
break;
if(r != n1)
801013b4: 39 c3 cmp %eax,%ebx
801013b6: 0f 85 96 00 00 00 jne 80101452 <filewrite+0x102>
panic("short filewrite");
i += r;
801013bc: 01 df add %ebx,%edi
while(i < n){
801013be: 39 7d e4 cmp %edi,-0x1c(%ebp)
801013c1: 7e 6d jle 80101430 <filewrite+0xe0>
int n1 = n - i;
801013c3: 8b 5d e4 mov -0x1c(%ebp),%ebx
801013c6: b8 00 06 00 00 mov $0x600,%eax
801013cb: 29 fb sub %edi,%ebx
801013cd: 81 fb 00 06 00 00 cmp $0x600,%ebx
801013d3: 0f 4f d8 cmovg %eax,%ebx
begin_op();
801013d6: e8 35 1b 00 00 call 80102f10 <begin_op>
ilock(f->ip);
801013db: 83 ec 0c sub $0xc,%esp
801013de: ff 76 10 pushl 0x10(%esi)
801013e1: e8 0a 06 00 00 call 801019f0 <ilock>
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
801013e6: 8b 45 dc mov -0x24(%ebp),%eax
801013e9: 53 push %ebx
801013ea: ff 76 14 pushl 0x14(%esi)
801013ed: 01 f8 add %edi,%eax
801013ef: 50 push %eax
801013f0: ff 76 10 pushl 0x10(%esi)
801013f3: e8 d8 09 00 00 call 80101dd0 <writei>
801013f8: 83 c4 20 add $0x20,%esp
801013fb: 85 c0 test %eax,%eax
801013fd: 7f 99 jg 80101398 <filewrite+0x48>
iunlock(f->ip);
801013ff: 83 ec 0c sub $0xc,%esp
80101402: ff 76 10 pushl 0x10(%esi)
80101405: 89 45 e0 mov %eax,-0x20(%ebp)
80101408: e8 c3 06 00 00 call 80101ad0 <iunlock>
end_op();
8010140d: e8 6e 1b 00 00 call 80102f80 <end_op>
if(r < 0)
80101412: 8b 45 e0 mov -0x20(%ebp),%eax
80101415: 83 c4 10 add $0x10,%esp
80101418: 85 c0 test %eax,%eax
8010141a: 74 98 je 801013b4 <filewrite+0x64>
}
return i == n ? n : -1;
}
panic("filewrite");
}
8010141c: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
8010141f: bf ff ff ff ff mov $0xffffffff,%edi
}
80101424: 89 f8 mov %edi,%eax
80101426: 5b pop %ebx
80101427: 5e pop %esi
80101428: 5f pop %edi
80101429: 5d pop %ebp
8010142a: c3 ret
8010142b: 90 nop
8010142c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return i == n ? n : -1;
80101430: 39 7d e4 cmp %edi,-0x1c(%ebp)
80101433: 75 e7 jne 8010141c <filewrite+0xcc>
}
80101435: 8d 65 f4 lea -0xc(%ebp),%esp
80101438: 89 f8 mov %edi,%eax
8010143a: 5b pop %ebx
8010143b: 5e pop %esi
8010143c: 5f pop %edi
8010143d: 5d pop %ebp
8010143e: c3 ret
8010143f: 90 nop
return pipewrite(f->pipe, addr, n);
80101440: 8b 46 0c mov 0xc(%esi),%eax
80101443: 89 45 08 mov %eax,0x8(%ebp)
}
80101446: 8d 65 f4 lea -0xc(%ebp),%esp
80101449: 5b pop %ebx
8010144a: 5e pop %esi
8010144b: 5f pop %edi
8010144c: 5d pop %ebp
return pipewrite(f->pipe, addr, n);
8010144d: e9 0e 23 00 00 jmp 80103760 <pipewrite>
panic("short filewrite");
80101452: 83 ec 0c sub $0xc,%esp
80101455: 68 0f 7e 10 80 push $0x80107e0f
8010145a: e8 31 ef ff ff call 80100390 <panic>
panic("filewrite");
8010145f: 83 ec 0c sub $0xc,%esp
80101462: 68 15 7e 10 80 push $0x80107e15
80101467: e8 24 ef ff ff call 80100390 <panic>
8010146c: 66 90 xchg %ax,%ax
8010146e: 66 90 xchg %ax,%ax
80101470 <balloc>:
// Blocks.
// Allocate a zeroed disk block.
static uint
balloc(uint dev)
{
80101470: 55 push %ebp
80101471: 89 e5 mov %esp,%ebp
80101473: 57 push %edi
80101474: 56 push %esi
80101475: 53 push %ebx
80101476: 83 ec 1c sub $0x1c,%esp
int b, bi, m;
struct buf *bp;
bp = 0;
for(b = 0; b < sb.size; b += BPB){
80101479: 8b 0d 80 1c 11 80 mov 0x80111c80,%ecx
{
8010147f: 89 45 d8 mov %eax,-0x28(%ebp)
for(b = 0; b < sb.size; b += BPB){
80101482: 85 c9 test %ecx,%ecx
80101484: 0f 84 87 00 00 00 je 80101511 <balloc+0xa1>
8010148a: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
bp = bread(dev, BBLOCK(b, sb));
80101491: 8b 75 dc mov -0x24(%ebp),%esi
80101494: 83 ec 08 sub $0x8,%esp
80101497: 89 f0 mov %esi,%eax
80101499: c1 f8 0c sar $0xc,%eax
8010149c: 03 05 98 1c 11 80 add 0x80111c98,%eax
801014a2: 50 push %eax
801014a3: ff 75 d8 pushl -0x28(%ebp)
801014a6: e8 25 ec ff ff call 801000d0 <bread>
801014ab: 89 45 e4 mov %eax,-0x1c(%ebp)
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
801014ae: a1 80 1c 11 80 mov 0x80111c80,%eax
801014b3: 83 c4 10 add $0x10,%esp
801014b6: 89 45 e0 mov %eax,-0x20(%ebp)
801014b9: 31 c0 xor %eax,%eax
801014bb: eb 2f jmp 801014ec <balloc+0x7c>
801014bd: 8d 76 00 lea 0x0(%esi),%esi
m = 1 << (bi % 8);
801014c0: 89 c1 mov %eax,%ecx
if((bp->data[bi/8] & m) == 0){ // Is block free?
801014c2: 8b 55 e4 mov -0x1c(%ebp),%edx
m = 1 << (bi % 8);
801014c5: bb 01 00 00 00 mov $0x1,%ebx
801014ca: 83 e1 07 and $0x7,%ecx
801014cd: d3 e3 shl %cl,%ebx
if((bp->data[bi/8] & m) == 0){ // Is block free?
801014cf: 89 c1 mov %eax,%ecx
801014d1: c1 f9 03 sar $0x3,%ecx
801014d4: 0f b6 7c 0a 5c movzbl 0x5c(%edx,%ecx,1),%edi
801014d9: 85 df test %ebx,%edi
801014db: 89 fa mov %edi,%edx
801014dd: 74 41 je 80101520 <balloc+0xb0>
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
801014df: 83 c0 01 add $0x1,%eax
801014e2: 83 c6 01 add $0x1,%esi
801014e5: 3d 00 10 00 00 cmp $0x1000,%eax
801014ea: 74 05 je 801014f1 <balloc+0x81>
801014ec: 39 75 e0 cmp %esi,-0x20(%ebp)
801014ef: 77 cf ja 801014c0 <balloc+0x50>
brelse(bp);
bzero(dev, b + bi);
return b + bi;
}
}
brelse(bp);
801014f1: 83 ec 0c sub $0xc,%esp
801014f4: ff 75 e4 pushl -0x1c(%ebp)
801014f7: e8 e4 ec ff ff call 801001e0 <brelse>
for(b = 0; b < sb.size; b += BPB){
801014fc: 81 45 dc 00 10 00 00 addl $0x1000,-0x24(%ebp)
80101503: 83 c4 10 add $0x10,%esp
80101506: 8b 45 dc mov -0x24(%ebp),%eax
80101509: 39 05 80 1c 11 80 cmp %eax,0x80111c80
8010150f: 77 80 ja 80101491 <balloc+0x21>
}
panic("balloc: out of blocks");
80101511: 83 ec 0c sub $0xc,%esp
80101514: 68 1f 7e 10 80 push $0x80107e1f
80101519: e8 72 ee ff ff call 80100390 <panic>
8010151e: 66 90 xchg %ax,%ax
bp->data[bi/8] |= m; // Mark block in use.
80101520: 8b 7d e4 mov -0x1c(%ebp),%edi
log_write(bp);
80101523: 83 ec 0c sub $0xc,%esp
bp->data[bi/8] |= m; // Mark block in use.
80101526: 09 da or %ebx,%edx
80101528: 88 54 0f 5c mov %dl,0x5c(%edi,%ecx,1)
log_write(bp);
8010152c: 57 push %edi
8010152d: e8 ae 1b 00 00 call 801030e0 <log_write>
brelse(bp);
80101532: 89 3c 24 mov %edi,(%esp)
80101535: e8 a6 ec ff ff call 801001e0 <brelse>
bp = bread(dev, bno);
8010153a: 58 pop %eax
8010153b: 5a pop %edx
8010153c: 56 push %esi
8010153d: ff 75 d8 pushl -0x28(%ebp)
80101540: e8 8b eb ff ff call 801000d0 <bread>
80101545: 89 c3 mov %eax,%ebx
memset(bp->data, 0, BSIZE);
80101547: 8d 40 5c lea 0x5c(%eax),%eax
8010154a: 83 c4 0c add $0xc,%esp
8010154d: 68 00 02 00 00 push $0x200
80101552: 6a 00 push $0x0
80101554: 50 push %eax
80101555: e8 86 3c 00 00 call 801051e0 <memset>
log_write(bp);
8010155a: 89 1c 24 mov %ebx,(%esp)
8010155d: e8 7e 1b 00 00 call 801030e0 <log_write>
brelse(bp);
80101562: 89 1c 24 mov %ebx,(%esp)
80101565: e8 76 ec ff ff call 801001e0 <brelse>
}
8010156a: 8d 65 f4 lea -0xc(%ebp),%esp
8010156d: 89 f0 mov %esi,%eax
8010156f: 5b pop %ebx
80101570: 5e pop %esi
80101571: 5f pop %edi
80101572: 5d pop %ebp
80101573: c3 ret
80101574: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010157a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80101580 <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)
{
80101580: 55 push %ebp
80101581: 89 e5 mov %esp,%ebp
80101583: 57 push %edi
80101584: 56 push %esi
80101585: 53 push %ebx
80101586: 89 c7 mov %eax,%edi
struct inode *ip, *empty;
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
80101588: 31 f6 xor %esi,%esi
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010158a: bb d4 1c 11 80 mov $0x80111cd4,%ebx
{
8010158f: 83 ec 28 sub $0x28,%esp
80101592: 89 55 e4 mov %edx,-0x1c(%ebp)
acquire(&icache.lock);
80101595: 68 a0 1c 11 80 push $0x80111ca0
8010159a: e8 31 3b 00 00 call 801050d0 <acquire>
8010159f: 83 c4 10 add $0x10,%esp
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
801015a2: 8b 55 e4 mov -0x1c(%ebp),%edx
801015a5: eb 17 jmp 801015be <iget+0x3e>
801015a7: 89 f6 mov %esi,%esi
801015a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801015b0: 81 c3 90 00 00 00 add $0x90,%ebx
801015b6: 81 fb f4 38 11 80 cmp $0x801138f4,%ebx
801015bc: 73 22 jae 801015e0 <iget+0x60>
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
801015be: 8b 4b 08 mov 0x8(%ebx),%ecx
801015c1: 85 c9 test %ecx,%ecx
801015c3: 7e 04 jle 801015c9 <iget+0x49>
801015c5: 39 3b cmp %edi,(%ebx)
801015c7: 74 4f je 80101618 <iget+0x98>
ip->ref++;
release(&icache.lock);
return ip;
}
if(empty == 0 && ip->ref == 0) // Remember empty slot.
801015c9: 85 f6 test %esi,%esi
801015cb: 75 e3 jne 801015b0 <iget+0x30>
801015cd: 85 c9 test %ecx,%ecx
801015cf: 0f 44 f3 cmove %ebx,%esi
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
801015d2: 81 c3 90 00 00 00 add $0x90,%ebx
801015d8: 81 fb f4 38 11 80 cmp $0x801138f4,%ebx
801015de: 72 de jb 801015be <iget+0x3e>
empty = ip;
}
// Recycle an inode cache entry.
if(empty == 0)
801015e0: 85 f6 test %esi,%esi
801015e2: 74 5b je 8010163f <iget+0xbf>
ip = empty;
ip->dev = dev;
ip->inum = inum;
ip->ref = 1;
ip->valid = 0;
release(&icache.lock);
801015e4: 83 ec 0c sub $0xc,%esp
ip->dev = dev;
801015e7: 89 3e mov %edi,(%esi)
ip->inum = inum;
801015e9: 89 56 04 mov %edx,0x4(%esi)
ip->ref = 1;
801015ec: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi)
ip->valid = 0;
801015f3: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi)
release(&icache.lock);
801015fa: 68 a0 1c 11 80 push $0x80111ca0
801015ff: e8 8c 3b 00 00 call 80105190 <release>
return ip;
80101604: 83 c4 10 add $0x10,%esp
}
80101607: 8d 65 f4 lea -0xc(%ebp),%esp
8010160a: 89 f0 mov %esi,%eax
8010160c: 5b pop %ebx
8010160d: 5e pop %esi
8010160e: 5f pop %edi
8010160f: 5d pop %ebp
80101610: c3 ret
80101611: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
80101618: 39 53 04 cmp %edx,0x4(%ebx)
8010161b: 75 ac jne 801015c9 <iget+0x49>
release(&icache.lock);
8010161d: 83 ec 0c sub $0xc,%esp
ip->ref++;
80101620: 83 c1 01 add $0x1,%ecx
return ip;
80101623: 89 de mov %ebx,%esi
release(&icache.lock);
80101625: 68 a0 1c 11 80 push $0x80111ca0
ip->ref++;
8010162a: 89 4b 08 mov %ecx,0x8(%ebx)
release(&icache.lock);
8010162d: e8 5e 3b 00 00 call 80105190 <release>
return ip;
80101632: 83 c4 10 add $0x10,%esp
}
80101635: 8d 65 f4 lea -0xc(%ebp),%esp
80101638: 89 f0 mov %esi,%eax
8010163a: 5b pop %ebx
8010163b: 5e pop %esi
8010163c: 5f pop %edi
8010163d: 5d pop %ebp
8010163e: c3 ret
panic("iget: no inodes");
8010163f: 83 ec 0c sub $0xc,%esp
80101642: 68 35 7e 10 80 push $0x80107e35
80101647: e8 44 ed ff ff call 80100390 <panic>
8010164c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101650 <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)
{
80101650: 55 push %ebp
80101651: 89 e5 mov %esp,%ebp
80101653: 57 push %edi
80101654: 56 push %esi
80101655: 53 push %ebx
80101656: 89 c6 mov %eax,%esi
80101658: 83 ec 1c sub $0x1c,%esp
uint addr, *a;
struct buf *bp;
if(bn < NDIRECT){
8010165b: 83 fa 0b cmp $0xb,%edx
8010165e: 77 18 ja 80101678 <bmap+0x28>
80101660: 8d 3c 90 lea (%eax,%edx,4),%edi
if((addr = ip->addrs[bn]) == 0)
80101663: 8b 5f 5c mov 0x5c(%edi),%ebx
80101666: 85 db test %ebx,%ebx
80101668: 74 76 je 801016e0 <bmap+0x90>
brelse(bp);
return addr;
}
panic("bmap: out of range");
}
8010166a: 8d 65 f4 lea -0xc(%ebp),%esp
8010166d: 89 d8 mov %ebx,%eax
8010166f: 5b pop %ebx
80101670: 5e pop %esi
80101671: 5f pop %edi
80101672: 5d pop %ebp
80101673: c3 ret
80101674: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bn -= NDIRECT;
80101678: 8d 5a f4 lea -0xc(%edx),%ebx
if(bn < NINDIRECT){
8010167b: 83 fb 7f cmp $0x7f,%ebx
8010167e: 0f 87 90 00 00 00 ja 80101714 <bmap+0xc4>
if((addr = ip->addrs[NDIRECT]) == 0)
80101684: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
8010168a: 8b 00 mov (%eax),%eax
8010168c: 85 d2 test %edx,%edx
8010168e: 74 70 je 80101700 <bmap+0xb0>
bp = bread(ip->dev, addr);
80101690: 83 ec 08 sub $0x8,%esp
80101693: 52 push %edx
80101694: 50 push %eax
80101695: e8 36 ea ff ff call 801000d0 <bread>
if((addr = a[bn]) == 0){
8010169a: 8d 54 98 5c lea 0x5c(%eax,%ebx,4),%edx
8010169e: 83 c4 10 add $0x10,%esp
bp = bread(ip->dev, addr);
801016a1: 89 c7 mov %eax,%edi
if((addr = a[bn]) == 0){
801016a3: 8b 1a mov (%edx),%ebx
801016a5: 85 db test %ebx,%ebx
801016a7: 75 1d jne 801016c6 <bmap+0x76>
a[bn] = addr = balloc(ip->dev);
801016a9: 8b 06 mov (%esi),%eax
801016ab: 89 55 e4 mov %edx,-0x1c(%ebp)
801016ae: e8 bd fd ff ff call 80101470 <balloc>
801016b3: 8b 55 e4 mov -0x1c(%ebp),%edx
log_write(bp);
801016b6: 83 ec 0c sub $0xc,%esp
a[bn] = addr = balloc(ip->dev);
801016b9: 89 c3 mov %eax,%ebx
801016bb: 89 02 mov %eax,(%edx)
log_write(bp);
801016bd: 57 push %edi
801016be: e8 1d 1a 00 00 call 801030e0 <log_write>
801016c3: 83 c4 10 add $0x10,%esp
brelse(bp);
801016c6: 83 ec 0c sub $0xc,%esp
801016c9: 57 push %edi
801016ca: e8 11 eb ff ff call 801001e0 <brelse>
801016cf: 83 c4 10 add $0x10,%esp
}
801016d2: 8d 65 f4 lea -0xc(%ebp),%esp
801016d5: 89 d8 mov %ebx,%eax
801016d7: 5b pop %ebx
801016d8: 5e pop %esi
801016d9: 5f pop %edi
801016da: 5d pop %ebp
801016db: c3 ret
801016dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ip->addrs[bn] = addr = balloc(ip->dev);
801016e0: 8b 00 mov (%eax),%eax
801016e2: e8 89 fd ff ff call 80101470 <balloc>
801016e7: 89 47 5c mov %eax,0x5c(%edi)
}
801016ea: 8d 65 f4 lea -0xc(%ebp),%esp
ip->addrs[bn] = addr = balloc(ip->dev);
801016ed: 89 c3 mov %eax,%ebx
}
801016ef: 89 d8 mov %ebx,%eax
801016f1: 5b pop %ebx
801016f2: 5e pop %esi
801016f3: 5f pop %edi
801016f4: 5d pop %ebp
801016f5: c3 ret
801016f6: 8d 76 00 lea 0x0(%esi),%esi
801016f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
80101700: e8 6b fd ff ff call 80101470 <balloc>
80101705: 89 c2 mov %eax,%edx
80101707: 89 86 8c 00 00 00 mov %eax,0x8c(%esi)
8010170d: 8b 06 mov (%esi),%eax
8010170f: e9 7c ff ff ff jmp 80101690 <bmap+0x40>
panic("bmap: out of range");
80101714: 83 ec 0c sub $0xc,%esp
80101717: 68 45 7e 10 80 push $0x80107e45
8010171c: e8 6f ec ff ff call 80100390 <panic>
80101721: eb 0d jmp 80101730 <readsb>
80101723: 90 nop
80101724: 90 nop
80101725: 90 nop
80101726: 90 nop
80101727: 90 nop
80101728: 90 nop
80101729: 90 nop
8010172a: 90 nop
8010172b: 90 nop
8010172c: 90 nop
8010172d: 90 nop
8010172e: 90 nop
8010172f: 90 nop
80101730 <readsb>:
{
80101730: 55 push %ebp
80101731: 89 e5 mov %esp,%ebp
80101733: 56 push %esi
80101734: 53 push %ebx
80101735: 8b 75 0c mov 0xc(%ebp),%esi
bp = bread(dev, 1);
80101738: 83 ec 08 sub $0x8,%esp
8010173b: 6a 01 push $0x1
8010173d: ff 75 08 pushl 0x8(%ebp)
80101740: e8 8b e9 ff ff call 801000d0 <bread>
80101745: 89 c3 mov %eax,%ebx
memmove(sb, bp->data, sizeof(*sb));
80101747: 8d 40 5c lea 0x5c(%eax),%eax
8010174a: 83 c4 0c add $0xc,%esp
8010174d: 6a 1c push $0x1c
8010174f: 50 push %eax
80101750: 56 push %esi
80101751: e8 3a 3b 00 00 call 80105290 <memmove>
brelse(bp);
80101756: 89 5d 08 mov %ebx,0x8(%ebp)
80101759: 83 c4 10 add $0x10,%esp
}
8010175c: 8d 65 f8 lea -0x8(%ebp),%esp
8010175f: 5b pop %ebx
80101760: 5e pop %esi
80101761: 5d pop %ebp
brelse(bp);
80101762: e9 79 ea ff ff jmp 801001e0 <brelse>
80101767: 89 f6 mov %esi,%esi
80101769: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101770 <bfree>:
{
80101770: 55 push %ebp
80101771: 89 e5 mov %esp,%ebp
80101773: 56 push %esi
80101774: 53 push %ebx
80101775: 89 d3 mov %edx,%ebx
80101777: 89 c6 mov %eax,%esi
readsb(dev, &sb);
80101779: 83 ec 08 sub $0x8,%esp
8010177c: 68 80 1c 11 80 push $0x80111c80
80101781: 50 push %eax
80101782: e8 a9 ff ff ff call 80101730 <readsb>
bp = bread(dev, BBLOCK(b, sb));
80101787: 58 pop %eax
80101788: 5a pop %edx
80101789: 89 da mov %ebx,%edx
8010178b: c1 ea 0c shr $0xc,%edx
8010178e: 03 15 98 1c 11 80 add 0x80111c98,%edx
80101794: 52 push %edx
80101795: 56 push %esi
80101796: e8 35 e9 ff ff call 801000d0 <bread>
m = 1 << (bi % 8);
8010179b: 89 d9 mov %ebx,%ecx
if((bp->data[bi/8] & m) == 0)
8010179d: c1 fb 03 sar $0x3,%ebx
m = 1 << (bi % 8);
801017a0: ba 01 00 00 00 mov $0x1,%edx
801017a5: 83 e1 07 and $0x7,%ecx
if((bp->data[bi/8] & m) == 0)
801017a8: 81 e3 ff 01 00 00 and $0x1ff,%ebx
801017ae: 83 c4 10 add $0x10,%esp
m = 1 << (bi % 8);
801017b1: d3 e2 shl %cl,%edx
if((bp->data[bi/8] & m) == 0)
801017b3: 0f b6 4c 18 5c movzbl 0x5c(%eax,%ebx,1),%ecx
801017b8: 85 d1 test %edx,%ecx
801017ba: 74 25 je 801017e1 <bfree+0x71>
bp->data[bi/8] &= ~m;
801017bc: f7 d2 not %edx
801017be: 89 c6 mov %eax,%esi
log_write(bp);
801017c0: 83 ec 0c sub $0xc,%esp
bp->data[bi/8] &= ~m;
801017c3: 21 ca and %ecx,%edx
801017c5: 88 54 1e 5c mov %dl,0x5c(%esi,%ebx,1)
log_write(bp);
801017c9: 56 push %esi
801017ca: e8 11 19 00 00 call 801030e0 <log_write>
brelse(bp);
801017cf: 89 34 24 mov %esi,(%esp)
801017d2: e8 09 ea ff ff call 801001e0 <brelse>
}
801017d7: 83 c4 10 add $0x10,%esp
801017da: 8d 65 f8 lea -0x8(%ebp),%esp
801017dd: 5b pop %ebx
801017de: 5e pop %esi
801017df: 5d pop %ebp
801017e0: c3 ret
panic("freeing free block");
801017e1: 83 ec 0c sub $0xc,%esp
801017e4: 68 58 7e 10 80 push $0x80107e58
801017e9: e8 a2 eb ff ff call 80100390 <panic>
801017ee: 66 90 xchg %ax,%ax
801017f0 <iinit>:
{
801017f0: 55 push %ebp
801017f1: 89 e5 mov %esp,%ebp
801017f3: 53 push %ebx
801017f4: bb e0 1c 11 80 mov $0x80111ce0,%ebx
801017f9: 83 ec 0c sub $0xc,%esp
initlock(&icache.lock, "icache");
801017fc: 68 6b 7e 10 80 push $0x80107e6b
80101801: 68 a0 1c 11 80 push $0x80111ca0
80101806: e8 85 37 00 00 call 80104f90 <initlock>
8010180b: 83 c4 10 add $0x10,%esp
8010180e: 66 90 xchg %ax,%ax
initsleeplock(&icache.inode[i].lock, "inode");
80101810: 83 ec 08 sub $0x8,%esp
80101813: 68 72 7e 10 80 push $0x80107e72
80101818: 53 push %ebx
80101819: 81 c3 90 00 00 00 add $0x90,%ebx
8010181f: e8 3c 36 00 00 call 80104e60 <initsleeplock>
for(i = 0; i < NINODE; i++) {
80101824: 83 c4 10 add $0x10,%esp
80101827: 81 fb 00 39 11 80 cmp $0x80113900,%ebx
8010182d: 75 e1 jne 80101810 <iinit+0x20>
readsb(dev, &sb);
8010182f: 83 ec 08 sub $0x8,%esp
80101832: 68 80 1c 11 80 push $0x80111c80
80101837: ff 75 08 pushl 0x8(%ebp)
8010183a: e8 f1 fe ff ff call 80101730 <readsb>
cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d\
8010183f: ff 35 98 1c 11 80 pushl 0x80111c98
80101845: ff 35 94 1c 11 80 pushl 0x80111c94
8010184b: ff 35 90 1c 11 80 pushl 0x80111c90
80101851: ff 35 8c 1c 11 80 pushl 0x80111c8c
80101857: ff 35 88 1c 11 80 pushl 0x80111c88
8010185d: ff 35 84 1c 11 80 pushl 0x80111c84
80101863: ff 35 80 1c 11 80 pushl 0x80111c80
80101869: 68 d8 7e 10 80 push $0x80107ed8
8010186e: e8 ed ed ff ff call 80100660 <cprintf>
}
80101873: 83 c4 30 add $0x30,%esp
80101876: 8b 5d fc mov -0x4(%ebp),%ebx
80101879: c9 leave
8010187a: c3 ret
8010187b: 90 nop
8010187c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101880 <ialloc>:
{
80101880: 55 push %ebp
80101881: 89 e5 mov %esp,%ebp
80101883: 57 push %edi
80101884: 56 push %esi
80101885: 53 push %ebx
80101886: 83 ec 1c sub $0x1c,%esp
for(inum = 1; inum < sb.ninodes; inum++){
80101889: 83 3d 88 1c 11 80 01 cmpl $0x1,0x80111c88
{
80101890: 8b 45 0c mov 0xc(%ebp),%eax
80101893: 8b 75 08 mov 0x8(%ebp),%esi
80101896: 89 45 e4 mov %eax,-0x1c(%ebp)
for(inum = 1; inum < sb.ninodes; inum++){
80101899: 0f 86 91 00 00 00 jbe 80101930 <ialloc+0xb0>
8010189f: bb 01 00 00 00 mov $0x1,%ebx
801018a4: eb 21 jmp 801018c7 <ialloc+0x47>
801018a6: 8d 76 00 lea 0x0(%esi),%esi
801018a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
brelse(bp);
801018b0: 83 ec 0c sub $0xc,%esp
for(inum = 1; inum < sb.ninodes; inum++){
801018b3: 83 c3 01 add $0x1,%ebx
brelse(bp);
801018b6: 57 push %edi
801018b7: e8 24 e9 ff ff call 801001e0 <brelse>
for(inum = 1; inum < sb.ninodes; inum++){
801018bc: 83 c4 10 add $0x10,%esp
801018bf: 39 1d 88 1c 11 80 cmp %ebx,0x80111c88
801018c5: 76 69 jbe 80101930 <ialloc+0xb0>
bp = bread(dev, IBLOCK(inum, sb));
801018c7: 89 d8 mov %ebx,%eax
801018c9: 83 ec 08 sub $0x8,%esp
801018cc: c1 e8 03 shr $0x3,%eax
801018cf: 03 05 94 1c 11 80 add 0x80111c94,%eax
801018d5: 50 push %eax
801018d6: 56 push %esi
801018d7: e8 f4 e7 ff ff call 801000d0 <bread>
801018dc: 89 c7 mov %eax,%edi
dip = (struct dinode*)bp->data + inum%IPB;
801018de: 89 d8 mov %ebx,%eax
if(dip->type == 0){ // a free inode
801018e0: 83 c4 10 add $0x10,%esp
dip = (struct dinode*)bp->data + inum%IPB;
801018e3: 83 e0 07 and $0x7,%eax
801018e6: c1 e0 06 shl $0x6,%eax
801018e9: 8d 4c 07 5c lea 0x5c(%edi,%eax,1),%ecx
if(dip->type == 0){ // a free inode
801018ed: 66 83 39 00 cmpw $0x0,(%ecx)
801018f1: 75 bd jne 801018b0 <ialloc+0x30>
memset(dip, 0, sizeof(*dip));
801018f3: 83 ec 04 sub $0x4,%esp
801018f6: 89 4d e0 mov %ecx,-0x20(%ebp)
801018f9: 6a 40 push $0x40
801018fb: 6a 00 push $0x0
801018fd: 51 push %ecx
801018fe: e8 dd 38 00 00 call 801051e0 <memset>
dip->type = type;
80101903: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax
80101907: 8b 4d e0 mov -0x20(%ebp),%ecx
8010190a: 66 89 01 mov %ax,(%ecx)
log_write(bp); // mark it allocated on the disk
8010190d: 89 3c 24 mov %edi,(%esp)
80101910: e8 cb 17 00 00 call 801030e0 <log_write>
brelse(bp);
80101915: 89 3c 24 mov %edi,(%esp)
80101918: e8 c3 e8 ff ff call 801001e0 <brelse>
return iget(dev, inum);
8010191d: 83 c4 10 add $0x10,%esp
}
80101920: 8d 65 f4 lea -0xc(%ebp),%esp
return iget(dev, inum);
80101923: 89 da mov %ebx,%edx
80101925: 89 f0 mov %esi,%eax
}
80101927: 5b pop %ebx
80101928: 5e pop %esi
80101929: 5f pop %edi
8010192a: 5d pop %ebp
return iget(dev, inum);
8010192b: e9 50 fc ff ff jmp 80101580 <iget>
panic("ialloc: no inodes");
80101930: 83 ec 0c sub $0xc,%esp
80101933: 68 78 7e 10 80 push $0x80107e78
80101938: e8 53 ea ff ff call 80100390 <panic>
8010193d: 8d 76 00 lea 0x0(%esi),%esi
80101940 <iupdate>:
{
80101940: 55 push %ebp
80101941: 89 e5 mov %esp,%ebp
80101943: 56 push %esi
80101944: 53 push %ebx
80101945: 8b 5d 08 mov 0x8(%ebp),%ebx
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
80101948: 83 ec 08 sub $0x8,%esp
8010194b: 8b 43 04 mov 0x4(%ebx),%eax
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
8010194e: 83 c3 5c add $0x5c,%ebx
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
80101951: c1 e8 03 shr $0x3,%eax
80101954: 03 05 94 1c 11 80 add 0x80111c94,%eax
8010195a: 50 push %eax
8010195b: ff 73 a4 pushl -0x5c(%ebx)
8010195e: e8 6d e7 ff ff call 801000d0 <bread>
80101963: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
80101965: 8b 43 a8 mov -0x58(%ebx),%eax
dip->type = ip->type;
80101968: 0f b7 53 f4 movzwl -0xc(%ebx),%edx
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
8010196c: 83 c4 0c add $0xc,%esp
dip = (struct dinode*)bp->data + ip->inum%IPB;
8010196f: 83 e0 07 and $0x7,%eax
80101972: c1 e0 06 shl $0x6,%eax
80101975: 8d 44 06 5c lea 0x5c(%esi,%eax,1),%eax
dip->type = ip->type;
80101979: 66 89 10 mov %dx,(%eax)
dip->major = ip->major;
8010197c: 0f b7 53 f6 movzwl -0xa(%ebx),%edx
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
80101980: 83 c0 0c add $0xc,%eax
dip->major = ip->major;
80101983: 66 89 50 f6 mov %dx,-0xa(%eax)
dip->minor = ip->minor;
80101987: 0f b7 53 f8 movzwl -0x8(%ebx),%edx
8010198b: 66 89 50 f8 mov %dx,-0x8(%eax)
dip->nlink = ip->nlink;
8010198f: 0f b7 53 fa movzwl -0x6(%ebx),%edx
80101993: 66 89 50 fa mov %dx,-0x6(%eax)
dip->size = ip->size;
80101997: 8b 53 fc mov -0x4(%ebx),%edx
8010199a: 89 50 fc mov %edx,-0x4(%eax)
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
8010199d: 6a 34 push $0x34
8010199f: 53 push %ebx
801019a0: 50 push %eax
801019a1: e8 ea 38 00 00 call 80105290 <memmove>
log_write(bp);
801019a6: 89 34 24 mov %esi,(%esp)
801019a9: e8 32 17 00 00 call 801030e0 <log_write>
brelse(bp);
801019ae: 89 75 08 mov %esi,0x8(%ebp)
801019b1: 83 c4 10 add $0x10,%esp
}
801019b4: 8d 65 f8 lea -0x8(%ebp),%esp
801019b7: 5b pop %ebx
801019b8: 5e pop %esi
801019b9: 5d pop %ebp
brelse(bp);
801019ba: e9 21 e8 ff ff jmp 801001e0 <brelse>
801019bf: 90 nop
801019c0 <idup>:
{
801019c0: 55 push %ebp
801019c1: 89 e5 mov %esp,%ebp
801019c3: 53 push %ebx
801019c4: 83 ec 10 sub $0x10,%esp
801019c7: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&icache.lock);
801019ca: 68 a0 1c 11 80 push $0x80111ca0
801019cf: e8 fc 36 00 00 call 801050d0 <acquire>
ip->ref++;
801019d4: 83 43 08 01 addl $0x1,0x8(%ebx)
release(&icache.lock);
801019d8: c7 04 24 a0 1c 11 80 movl $0x80111ca0,(%esp)
801019df: e8 ac 37 00 00 call 80105190 <release>
}
801019e4: 89 d8 mov %ebx,%eax
801019e6: 8b 5d fc mov -0x4(%ebp),%ebx
801019e9: c9 leave
801019ea: c3 ret
801019eb: 90 nop
801019ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801019f0 <ilock>:
{
801019f0: 55 push %ebp
801019f1: 89 e5 mov %esp,%ebp
801019f3: 56 push %esi
801019f4: 53 push %ebx
801019f5: 8b 5d 08 mov 0x8(%ebp),%ebx
if(ip == 0 || ip->ref < 1)
801019f8: 85 db test %ebx,%ebx
801019fa: 0f 84 b7 00 00 00 je 80101ab7 <ilock+0xc7>
80101a00: 8b 53 08 mov 0x8(%ebx),%edx
80101a03: 85 d2 test %edx,%edx
80101a05: 0f 8e ac 00 00 00 jle 80101ab7 <ilock+0xc7>
acquiresleep(&ip->lock);
80101a0b: 8d 43 0c lea 0xc(%ebx),%eax
80101a0e: 83 ec 0c sub $0xc,%esp
80101a11: 50 push %eax
80101a12: e8 89 34 00 00 call 80104ea0 <acquiresleep>
if(ip->valid == 0){
80101a17: 8b 43 4c mov 0x4c(%ebx),%eax
80101a1a: 83 c4 10 add $0x10,%esp
80101a1d: 85 c0 test %eax,%eax
80101a1f: 74 0f je 80101a30 <ilock+0x40>
}
80101a21: 8d 65 f8 lea -0x8(%ebp),%esp
80101a24: 5b pop %ebx
80101a25: 5e pop %esi
80101a26: 5d pop %ebp
80101a27: c3 ret
80101a28: 90 nop
80101a29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
80101a30: 8b 43 04 mov 0x4(%ebx),%eax
80101a33: 83 ec 08 sub $0x8,%esp
80101a36: c1 e8 03 shr $0x3,%eax
80101a39: 03 05 94 1c 11 80 add 0x80111c94,%eax
80101a3f: 50 push %eax
80101a40: ff 33 pushl (%ebx)
80101a42: e8 89 e6 ff ff call 801000d0 <bread>
80101a47: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
80101a49: 8b 43 04 mov 0x4(%ebx),%eax
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
80101a4c: 83 c4 0c add $0xc,%esp
dip = (struct dinode*)bp->data + ip->inum%IPB;
80101a4f: 83 e0 07 and $0x7,%eax
80101a52: c1 e0 06 shl $0x6,%eax
80101a55: 8d 44 06 5c lea 0x5c(%esi,%eax,1),%eax
ip->type = dip->type;
80101a59: 0f b7 10 movzwl (%eax),%edx
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
80101a5c: 83 c0 0c add $0xc,%eax
ip->type = dip->type;
80101a5f: 66 89 53 50 mov %dx,0x50(%ebx)
ip->major = dip->major;
80101a63: 0f b7 50 f6 movzwl -0xa(%eax),%edx
80101a67: 66 89 53 52 mov %dx,0x52(%ebx)
ip->minor = dip->minor;
80101a6b: 0f b7 50 f8 movzwl -0x8(%eax),%edx
80101a6f: 66 89 53 54 mov %dx,0x54(%ebx)
ip->nlink = dip->nlink;
80101a73: 0f b7 50 fa movzwl -0x6(%eax),%edx
80101a77: 66 89 53 56 mov %dx,0x56(%ebx)
ip->size = dip->size;
80101a7b: 8b 50 fc mov -0x4(%eax),%edx
80101a7e: 89 53 58 mov %edx,0x58(%ebx)
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
80101a81: 6a 34 push $0x34
80101a83: 50 push %eax
80101a84: 8d 43 5c lea 0x5c(%ebx),%eax
80101a87: 50 push %eax
80101a88: e8 03 38 00 00 call 80105290 <memmove>
brelse(bp);
80101a8d: 89 34 24 mov %esi,(%esp)
80101a90: e8 4b e7 ff ff call 801001e0 <brelse>
if(ip->type == 0)
80101a95: 83 c4 10 add $0x10,%esp
80101a98: 66 83 7b 50 00 cmpw $0x0,0x50(%ebx)
ip->valid = 1;
80101a9d: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx)
if(ip->type == 0)
80101aa4: 0f 85 77 ff ff ff jne 80101a21 <ilock+0x31>
panic("ilock: no type");
80101aaa: 83 ec 0c sub $0xc,%esp
80101aad: 68 90 7e 10 80 push $0x80107e90
80101ab2: e8 d9 e8 ff ff call 80100390 <panic>
panic("ilock");
80101ab7: 83 ec 0c sub $0xc,%esp
80101aba: 68 8a 7e 10 80 push $0x80107e8a
80101abf: e8 cc e8 ff ff call 80100390 <panic>
80101ac4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101aca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80101ad0 <iunlock>:
{
80101ad0: 55 push %ebp
80101ad1: 89 e5 mov %esp,%ebp
80101ad3: 56 push %esi
80101ad4: 53 push %ebx
80101ad5: 8b 5d 08 mov 0x8(%ebp),%ebx
if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1)
80101ad8: 85 db test %ebx,%ebx
80101ada: 74 28 je 80101b04 <iunlock+0x34>
80101adc: 8d 73 0c lea 0xc(%ebx),%esi
80101adf: 83 ec 0c sub $0xc,%esp
80101ae2: 56 push %esi
80101ae3: e8 58 34 00 00 call 80104f40 <holdingsleep>
80101ae8: 83 c4 10 add $0x10,%esp
80101aeb: 85 c0 test %eax,%eax
80101aed: 74 15 je 80101b04 <iunlock+0x34>
80101aef: 8b 43 08 mov 0x8(%ebx),%eax
80101af2: 85 c0 test %eax,%eax
80101af4: 7e 0e jle 80101b04 <iunlock+0x34>
releasesleep(&ip->lock);
80101af6: 89 75 08 mov %esi,0x8(%ebp)
}
80101af9: 8d 65 f8 lea -0x8(%ebp),%esp
80101afc: 5b pop %ebx
80101afd: 5e pop %esi
80101afe: 5d pop %ebp
releasesleep(&ip->lock);
80101aff: e9 fc 33 00 00 jmp 80104f00 <releasesleep>
panic("iunlock");
80101b04: 83 ec 0c sub $0xc,%esp
80101b07: 68 9f 7e 10 80 push $0x80107e9f
80101b0c: e8 7f e8 ff ff call 80100390 <panic>
80101b11: eb 0d jmp 80101b20 <iput>
80101b13: 90 nop
80101b14: 90 nop
80101b15: 90 nop
80101b16: 90 nop
80101b17: 90 nop
80101b18: 90 nop
80101b19: 90 nop
80101b1a: 90 nop
80101b1b: 90 nop
80101b1c: 90 nop
80101b1d: 90 nop
80101b1e: 90 nop
80101b1f: 90 nop
80101b20 <iput>:
{
80101b20: 55 push %ebp
80101b21: 89 e5 mov %esp,%ebp
80101b23: 57 push %edi
80101b24: 56 push %esi
80101b25: 53 push %ebx
80101b26: 83 ec 28 sub $0x28,%esp
80101b29: 8b 5d 08 mov 0x8(%ebp),%ebx
acquiresleep(&ip->lock);
80101b2c: 8d 7b 0c lea 0xc(%ebx),%edi
80101b2f: 57 push %edi
80101b30: e8 6b 33 00 00 call 80104ea0 <acquiresleep>
if(ip->valid && ip->nlink == 0){
80101b35: 8b 53 4c mov 0x4c(%ebx),%edx
80101b38: 83 c4 10 add $0x10,%esp
80101b3b: 85 d2 test %edx,%edx
80101b3d: 74 07 je 80101b46 <iput+0x26>
80101b3f: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx)
80101b44: 74 32 je 80101b78 <iput+0x58>
releasesleep(&ip->lock);
80101b46: 83 ec 0c sub $0xc,%esp
80101b49: 57 push %edi
80101b4a: e8 b1 33 00 00 call 80104f00 <releasesleep>
acquire(&icache.lock);
80101b4f: c7 04 24 a0 1c 11 80 movl $0x80111ca0,(%esp)
80101b56: e8 75 35 00 00 call 801050d0 <acquire>
ip->ref--;
80101b5b: 83 6b 08 01 subl $0x1,0x8(%ebx)
release(&icache.lock);
80101b5f: 83 c4 10 add $0x10,%esp
80101b62: c7 45 08 a0 1c 11 80 movl $0x80111ca0,0x8(%ebp)
}
80101b69: 8d 65 f4 lea -0xc(%ebp),%esp
80101b6c: 5b pop %ebx
80101b6d: 5e pop %esi
80101b6e: 5f pop %edi
80101b6f: 5d pop %ebp
release(&icache.lock);
80101b70: e9 1b 36 00 00 jmp 80105190 <release>
80101b75: 8d 76 00 lea 0x0(%esi),%esi
acquire(&icache.lock);
80101b78: 83 ec 0c sub $0xc,%esp
80101b7b: 68 a0 1c 11 80 push $0x80111ca0
80101b80: e8 4b 35 00 00 call 801050d0 <acquire>
int r = ip->ref;
80101b85: 8b 73 08 mov 0x8(%ebx),%esi
release(&icache.lock);
80101b88: c7 04 24 a0 1c 11 80 movl $0x80111ca0,(%esp)
80101b8f: e8 fc 35 00 00 call 80105190 <release>
if(r == 1){
80101b94: 83 c4 10 add $0x10,%esp
80101b97: 83 fe 01 cmp $0x1,%esi
80101b9a: 75 aa jne 80101b46 <iput+0x26>
80101b9c: 8d 8b 8c 00 00 00 lea 0x8c(%ebx),%ecx
80101ba2: 89 7d e4 mov %edi,-0x1c(%ebp)
80101ba5: 8d 73 5c lea 0x5c(%ebx),%esi
80101ba8: 89 cf mov %ecx,%edi
80101baa: eb 0b jmp 80101bb7 <iput+0x97>
80101bac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101bb0: 83 c6 04 add $0x4,%esi
{
int i, j;
struct buf *bp;
uint *a;
for(i = 0; i < NDIRECT; i++){
80101bb3: 39 fe cmp %edi,%esi
80101bb5: 74 19 je 80101bd0 <iput+0xb0>
if(ip->addrs[i]){
80101bb7: 8b 16 mov (%esi),%edx
80101bb9: 85 d2 test %edx,%edx
80101bbb: 74 f3 je 80101bb0 <iput+0x90>
bfree(ip->dev, ip->addrs[i]);
80101bbd: 8b 03 mov (%ebx),%eax
80101bbf: e8 ac fb ff ff call 80101770 <bfree>
ip->addrs[i] = 0;
80101bc4: c7 06 00 00 00 00 movl $0x0,(%esi)
80101bca: eb e4 jmp 80101bb0 <iput+0x90>
80101bcc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
}
if(ip->addrs[NDIRECT]){
80101bd0: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
80101bd6: 8b 7d e4 mov -0x1c(%ebp),%edi
80101bd9: 85 c0 test %eax,%eax
80101bdb: 75 33 jne 80101c10 <iput+0xf0>
bfree(ip->dev, ip->addrs[NDIRECT]);
ip->addrs[NDIRECT] = 0;
}
ip->size = 0;
iupdate(ip);
80101bdd: 83 ec 0c sub $0xc,%esp
ip->size = 0;
80101be0: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
iupdate(ip);
80101be7: 53 push %ebx
80101be8: e8 53 fd ff ff call 80101940 <iupdate>
ip->type = 0;
80101bed: 31 c0 xor %eax,%eax
80101bef: 66 89 43 50 mov %ax,0x50(%ebx)
iupdate(ip);
80101bf3: 89 1c 24 mov %ebx,(%esp)
80101bf6: e8 45 fd ff ff call 80101940 <iupdate>
ip->valid = 0;
80101bfb: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx)
80101c02: 83 c4 10 add $0x10,%esp
80101c05: e9 3c ff ff ff jmp 80101b46 <iput+0x26>
80101c0a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
bp = bread(ip->dev, ip->addrs[NDIRECT]);
80101c10: 83 ec 08 sub $0x8,%esp
80101c13: 50 push %eax
80101c14: ff 33 pushl (%ebx)
80101c16: e8 b5 e4 ff ff call 801000d0 <bread>
80101c1b: 8d 88 5c 02 00 00 lea 0x25c(%eax),%ecx
80101c21: 89 7d e0 mov %edi,-0x20(%ebp)
80101c24: 89 45 e4 mov %eax,-0x1c(%ebp)
a = (uint*)bp->data;
80101c27: 8d 70 5c lea 0x5c(%eax),%esi
80101c2a: 83 c4 10 add $0x10,%esp
80101c2d: 89 cf mov %ecx,%edi
80101c2f: eb 0e jmp 80101c3f <iput+0x11f>
80101c31: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101c38: 83 c6 04 add $0x4,%esi
for(j = 0; j < NINDIRECT; j++){
80101c3b: 39 fe cmp %edi,%esi
80101c3d: 74 0f je 80101c4e <iput+0x12e>
if(a[j])
80101c3f: 8b 16 mov (%esi),%edx
80101c41: 85 d2 test %edx,%edx
80101c43: 74 f3 je 80101c38 <iput+0x118>
bfree(ip->dev, a[j]);
80101c45: 8b 03 mov (%ebx),%eax
80101c47: e8 24 fb ff ff call 80101770 <bfree>
80101c4c: eb ea jmp 80101c38 <iput+0x118>
brelse(bp);
80101c4e: 83 ec 0c sub $0xc,%esp
80101c51: ff 75 e4 pushl -0x1c(%ebp)
80101c54: 8b 7d e0 mov -0x20(%ebp),%edi
80101c57: e8 84 e5 ff ff call 801001e0 <brelse>
bfree(ip->dev, ip->addrs[NDIRECT]);
80101c5c: 8b 93 8c 00 00 00 mov 0x8c(%ebx),%edx
80101c62: 8b 03 mov (%ebx),%eax
80101c64: e8 07 fb ff ff call 80101770 <bfree>
ip->addrs[NDIRECT] = 0;
80101c69: c7 83 8c 00 00 00 00 movl $0x0,0x8c(%ebx)
80101c70: 00 00 00
80101c73: 83 c4 10 add $0x10,%esp
80101c76: e9 62 ff ff ff jmp 80101bdd <iput+0xbd>
80101c7b: 90 nop
80101c7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101c80 <iunlockput>:
{
80101c80: 55 push %ebp
80101c81: 89 e5 mov %esp,%ebp
80101c83: 53 push %ebx
80101c84: 83 ec 10 sub $0x10,%esp
80101c87: 8b 5d 08 mov 0x8(%ebp),%ebx
iunlock(ip);
80101c8a: 53 push %ebx
80101c8b: e8 40 fe ff ff call 80101ad0 <iunlock>
iput(ip);
80101c90: 89 5d 08 mov %ebx,0x8(%ebp)
80101c93: 83 c4 10 add $0x10,%esp
}
80101c96: 8b 5d fc mov -0x4(%ebp),%ebx
80101c99: c9 leave
iput(ip);
80101c9a: e9 81 fe ff ff jmp 80101b20 <iput>
80101c9f: 90 nop
80101ca0 <stati>:
// Copy stat information from inode.
// Caller must hold ip->lock.
void
stati(struct inode *ip, struct stat *st)
{
80101ca0: 55 push %ebp
80101ca1: 89 e5 mov %esp,%ebp
80101ca3: 8b 55 08 mov 0x8(%ebp),%edx
80101ca6: 8b 45 0c mov 0xc(%ebp),%eax
st->dev = ip->dev;
80101ca9: 8b 0a mov (%edx),%ecx
80101cab: 89 48 04 mov %ecx,0x4(%eax)
st->ino = ip->inum;
80101cae: 8b 4a 04 mov 0x4(%edx),%ecx
80101cb1: 89 48 08 mov %ecx,0x8(%eax)
st->type = ip->type;
80101cb4: 0f b7 4a 50 movzwl 0x50(%edx),%ecx
80101cb8: 66 89 08 mov %cx,(%eax)
st->nlink = ip->nlink;
80101cbb: 0f b7 4a 56 movzwl 0x56(%edx),%ecx
80101cbf: 66 89 48 0c mov %cx,0xc(%eax)
st->size = ip->size;
80101cc3: 8b 52 58 mov 0x58(%edx),%edx
80101cc6: 89 50 10 mov %edx,0x10(%eax)
}
80101cc9: 5d pop %ebp
80101cca: c3 ret
80101ccb: 90 nop
80101ccc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101cd0 <readi>:
//PAGEBREAK!
// Read data from inode.
// Caller must hold ip->lock.
int
readi(struct inode *ip, char *dst, uint off, uint n)
{
80101cd0: 55 push %ebp
80101cd1: 89 e5 mov %esp,%ebp
80101cd3: 57 push %edi
80101cd4: 56 push %esi
80101cd5: 53 push %ebx
80101cd6: 83 ec 1c sub $0x1c,%esp
80101cd9: 8b 45 08 mov 0x8(%ebp),%eax
80101cdc: 8b 75 0c mov 0xc(%ebp),%esi
80101cdf: 8b 7d 14 mov 0x14(%ebp),%edi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101ce2: 66 83 78 50 03 cmpw $0x3,0x50(%eax)
{
80101ce7: 89 75 e0 mov %esi,-0x20(%ebp)
80101cea: 89 45 d8 mov %eax,-0x28(%ebp)
80101ced: 8b 75 10 mov 0x10(%ebp),%esi
80101cf0: 89 7d e4 mov %edi,-0x1c(%ebp)
if(ip->type == T_DEV){
80101cf3: 0f 84 a7 00 00 00 je 80101da0 <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)
80101cf9: 8b 45 d8 mov -0x28(%ebp),%eax
80101cfc: 8b 40 58 mov 0x58(%eax),%eax
80101cff: 39 c6 cmp %eax,%esi
80101d01: 0f 87 ba 00 00 00 ja 80101dc1 <readi+0xf1>
80101d07: 8b 7d e4 mov -0x1c(%ebp),%edi
80101d0a: 89 f9 mov %edi,%ecx
80101d0c: 01 f1 add %esi,%ecx
80101d0e: 0f 82 ad 00 00 00 jb 80101dc1 <readi+0xf1>
return -1;
if(off + n > ip->size)
n = ip->size - off;
80101d14: 89 c2 mov %eax,%edx
80101d16: 29 f2 sub %esi,%edx
80101d18: 39 c8 cmp %ecx,%eax
80101d1a: 0f 43 d7 cmovae %edi,%edx
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101d1d: 31 ff xor %edi,%edi
80101d1f: 85 d2 test %edx,%edx
n = ip->size - off;
80101d21: 89 55 e4 mov %edx,-0x1c(%ebp)
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101d24: 74 6c je 80101d92 <readi+0xc2>
80101d26: 8d 76 00 lea 0x0(%esi),%esi
80101d29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101d30: 8b 5d d8 mov -0x28(%ebp),%ebx
80101d33: 89 f2 mov %esi,%edx
80101d35: c1 ea 09 shr $0x9,%edx
80101d38: 89 d8 mov %ebx,%eax
80101d3a: e8 11 f9 ff ff call 80101650 <bmap>
80101d3f: 83 ec 08 sub $0x8,%esp
80101d42: 50 push %eax
80101d43: ff 33 pushl (%ebx)
80101d45: e8 86 e3 ff ff call 801000d0 <bread>
m = min(n - tot, BSIZE - off%BSIZE);
80101d4a: 8b 5d e4 mov -0x1c(%ebp),%ebx
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101d4d: 89 c2 mov %eax,%edx
m = min(n - tot, BSIZE - off%BSIZE);
80101d4f: 89 f0 mov %esi,%eax
80101d51: 25 ff 01 00 00 and $0x1ff,%eax
80101d56: b9 00 02 00 00 mov $0x200,%ecx
80101d5b: 83 c4 0c add $0xc,%esp
80101d5e: 29 c1 sub %eax,%ecx
memmove(dst, bp->data + off%BSIZE, m);
80101d60: 8d 44 02 5c lea 0x5c(%edx,%eax,1),%eax
80101d64: 89 55 dc mov %edx,-0x24(%ebp)
m = min(n - tot, BSIZE - off%BSIZE);
80101d67: 29 fb sub %edi,%ebx
80101d69: 39 d9 cmp %ebx,%ecx
80101d6b: 0f 46 d9 cmovbe %ecx,%ebx
memmove(dst, bp->data + off%BSIZE, m);
80101d6e: 53 push %ebx
80101d6f: 50 push %eax
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101d70: 01 df add %ebx,%edi
memmove(dst, bp->data + off%BSIZE, m);
80101d72: ff 75 e0 pushl -0x20(%ebp)
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101d75: 01 de add %ebx,%esi
memmove(dst, bp->data + off%BSIZE, m);
80101d77: e8 14 35 00 00 call 80105290 <memmove>
brelse(bp);
80101d7c: 8b 55 dc mov -0x24(%ebp),%edx
80101d7f: 89 14 24 mov %edx,(%esp)
80101d82: e8 59 e4 ff ff call 801001e0 <brelse>
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101d87: 01 5d e0 add %ebx,-0x20(%ebp)
80101d8a: 83 c4 10 add $0x10,%esp
80101d8d: 39 7d e4 cmp %edi,-0x1c(%ebp)
80101d90: 77 9e ja 80101d30 <readi+0x60>
}
return n;
80101d92: 8b 45 e4 mov -0x1c(%ebp),%eax
}
80101d95: 8d 65 f4 lea -0xc(%ebp),%esp
80101d98: 5b pop %ebx
80101d99: 5e pop %esi
80101d9a: 5f pop %edi
80101d9b: 5d pop %ebp
80101d9c: c3 ret
80101d9d: 8d 76 00 lea 0x0(%esi),%esi
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
80101da0: 0f bf 40 52 movswl 0x52(%eax),%eax
80101da4: 66 83 f8 09 cmp $0x9,%ax
80101da8: 77 17 ja 80101dc1 <readi+0xf1>
80101daa: 8b 04 c5 20 1c 11 80 mov -0x7feee3e0(,%eax,8),%eax
80101db1: 85 c0 test %eax,%eax
80101db3: 74 0c je 80101dc1 <readi+0xf1>
return devsw[ip->major].read(ip, dst, n);
80101db5: 89 7d 10 mov %edi,0x10(%ebp)
}
80101db8: 8d 65 f4 lea -0xc(%ebp),%esp
80101dbb: 5b pop %ebx
80101dbc: 5e pop %esi
80101dbd: 5f pop %edi
80101dbe: 5d pop %ebp
return devsw[ip->major].read(ip, dst, n);
80101dbf: ff e0 jmp *%eax
return -1;
80101dc1: b8 ff ff ff ff mov $0xffffffff,%eax
80101dc6: eb cd jmp 80101d95 <readi+0xc5>
80101dc8: 90 nop
80101dc9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101dd0 <writei>:
// PAGEBREAK!
// Write data to inode.
// Caller must hold ip->lock.
int
writei(struct inode *ip, char *src, uint off, uint n)
{
80101dd0: 55 push %ebp
80101dd1: 89 e5 mov %esp,%ebp
80101dd3: 57 push %edi
80101dd4: 56 push %esi
80101dd5: 53 push %ebx
80101dd6: 83 ec 1c sub $0x1c,%esp
80101dd9: 8b 45 08 mov 0x8(%ebp),%eax
80101ddc: 8b 75 0c mov 0xc(%ebp),%esi
80101ddf: 8b 7d 14 mov 0x14(%ebp),%edi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101de2: 66 83 78 50 03 cmpw $0x3,0x50(%eax)
{
80101de7: 89 75 dc mov %esi,-0x24(%ebp)
80101dea: 89 45 d8 mov %eax,-0x28(%ebp)
80101ded: 8b 75 10 mov 0x10(%ebp),%esi
80101df0: 89 7d e0 mov %edi,-0x20(%ebp)
if(ip->type == T_DEV){
80101df3: 0f 84 b7 00 00 00 je 80101eb0 <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)
80101df9: 8b 45 d8 mov -0x28(%ebp),%eax
80101dfc: 39 70 58 cmp %esi,0x58(%eax)
80101dff: 0f 82 eb 00 00 00 jb 80101ef0 <writei+0x120>
80101e05: 8b 7d e0 mov -0x20(%ebp),%edi
80101e08: 31 d2 xor %edx,%edx
80101e0a: 89 f8 mov %edi,%eax
80101e0c: 01 f0 add %esi,%eax
80101e0e: 0f 92 c2 setb %dl
return -1;
if(off + n > MAXFILE*BSIZE)
80101e11: 3d 00 18 01 00 cmp $0x11800,%eax
80101e16: 0f 87 d4 00 00 00 ja 80101ef0 <writei+0x120>
80101e1c: 85 d2 test %edx,%edx
80101e1e: 0f 85 cc 00 00 00 jne 80101ef0 <writei+0x120>
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101e24: 85 ff test %edi,%edi
80101e26: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
80101e2d: 74 72 je 80101ea1 <writei+0xd1>
80101e2f: 90 nop
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101e30: 8b 7d d8 mov -0x28(%ebp),%edi
80101e33: 89 f2 mov %esi,%edx
80101e35: c1 ea 09 shr $0x9,%edx
80101e38: 89 f8 mov %edi,%eax
80101e3a: e8 11 f8 ff ff call 80101650 <bmap>
80101e3f: 83 ec 08 sub $0x8,%esp
80101e42: 50 push %eax
80101e43: ff 37 pushl (%edi)
80101e45: e8 86 e2 ff ff call 801000d0 <bread>
m = min(n - tot, BSIZE - off%BSIZE);
80101e4a: 8b 5d e0 mov -0x20(%ebp),%ebx
80101e4d: 2b 5d e4 sub -0x1c(%ebp),%ebx
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101e50: 89 c7 mov %eax,%edi
m = min(n - tot, BSIZE - off%BSIZE);
80101e52: 89 f0 mov %esi,%eax
80101e54: b9 00 02 00 00 mov $0x200,%ecx
80101e59: 83 c4 0c add $0xc,%esp
80101e5c: 25 ff 01 00 00 and $0x1ff,%eax
80101e61: 29 c1 sub %eax,%ecx
memmove(bp->data + off%BSIZE, src, m);
80101e63: 8d 44 07 5c lea 0x5c(%edi,%eax,1),%eax
m = min(n - tot, BSIZE - off%BSIZE);
80101e67: 39 d9 cmp %ebx,%ecx
80101e69: 0f 46 d9 cmovbe %ecx,%ebx
memmove(bp->data + off%BSIZE, src, m);
80101e6c: 53 push %ebx
80101e6d: ff 75 dc pushl -0x24(%ebp)
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101e70: 01 de add %ebx,%esi
memmove(bp->data + off%BSIZE, src, m);
80101e72: 50 push %eax
80101e73: e8 18 34 00 00 call 80105290 <memmove>
log_write(bp);
80101e78: 89 3c 24 mov %edi,(%esp)
80101e7b: e8 60 12 00 00 call 801030e0 <log_write>
brelse(bp);
80101e80: 89 3c 24 mov %edi,(%esp)
80101e83: e8 58 e3 ff ff call 801001e0 <brelse>
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101e88: 01 5d e4 add %ebx,-0x1c(%ebp)
80101e8b: 01 5d dc add %ebx,-0x24(%ebp)
80101e8e: 83 c4 10 add $0x10,%esp
80101e91: 8b 45 e4 mov -0x1c(%ebp),%eax
80101e94: 39 45 e0 cmp %eax,-0x20(%ebp)
80101e97: 77 97 ja 80101e30 <writei+0x60>
}
if(n > 0 && off > ip->size){
80101e99: 8b 45 d8 mov -0x28(%ebp),%eax
80101e9c: 3b 70 58 cmp 0x58(%eax),%esi
80101e9f: 77 37 ja 80101ed8 <writei+0x108>
ip->size = off;
iupdate(ip);
}
return n;
80101ea1: 8b 45 e0 mov -0x20(%ebp),%eax
}
80101ea4: 8d 65 f4 lea -0xc(%ebp),%esp
80101ea7: 5b pop %ebx
80101ea8: 5e pop %esi
80101ea9: 5f pop %edi
80101eaa: 5d pop %ebp
80101eab: c3 ret
80101eac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
80101eb0: 0f bf 40 52 movswl 0x52(%eax),%eax
80101eb4: 66 83 f8 09 cmp $0x9,%ax
80101eb8: 77 36 ja 80101ef0 <writei+0x120>
80101eba: 8b 04 c5 24 1c 11 80 mov -0x7feee3dc(,%eax,8),%eax
80101ec1: 85 c0 test %eax,%eax
80101ec3: 74 2b je 80101ef0 <writei+0x120>
return devsw[ip->major].write(ip, src, n);
80101ec5: 89 7d 10 mov %edi,0x10(%ebp)
}
80101ec8: 8d 65 f4 lea -0xc(%ebp),%esp
80101ecb: 5b pop %ebx
80101ecc: 5e pop %esi
80101ecd: 5f pop %edi
80101ece: 5d pop %ebp
return devsw[ip->major].write(ip, src, n);
80101ecf: ff e0 jmp *%eax
80101ed1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
ip->size = off;
80101ed8: 8b 45 d8 mov -0x28(%ebp),%eax
iupdate(ip);
80101edb: 83 ec 0c sub $0xc,%esp
ip->size = off;
80101ede: 89 70 58 mov %esi,0x58(%eax)
iupdate(ip);
80101ee1: 50 push %eax
80101ee2: e8 59 fa ff ff call 80101940 <iupdate>
80101ee7: 83 c4 10 add $0x10,%esp
80101eea: eb b5 jmp 80101ea1 <writei+0xd1>
80101eec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80101ef0: b8 ff ff ff ff mov $0xffffffff,%eax
80101ef5: eb ad jmp 80101ea4 <writei+0xd4>
80101ef7: 89 f6 mov %esi,%esi
80101ef9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101f00 <namecmp>:
//PAGEBREAK!
// Directories
int
namecmp(const char *s, const char *t)
{
80101f00: 55 push %ebp
80101f01: 89 e5 mov %esp,%ebp
80101f03: 83 ec 0c sub $0xc,%esp
return strncmp(s, t, DIRSIZ);
80101f06: 6a 0e push $0xe
80101f08: ff 75 0c pushl 0xc(%ebp)
80101f0b: ff 75 08 pushl 0x8(%ebp)
80101f0e: e8 ed 33 00 00 call 80105300 <strncmp>
}
80101f13: c9 leave
80101f14: c3 ret
80101f15: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101f19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101f20 <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)
{
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 1c sub $0x1c,%esp
80101f29: 8b 5d 08 mov 0x8(%ebp),%ebx
uint off, inum;
struct dirent de;
if(dp->type != T_DIR)
80101f2c: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80101f31: 0f 85 85 00 00 00 jne 80101fbc <dirlookup+0x9c>
panic("dirlookup not DIR");
for(off = 0; off < dp->size; off += sizeof(de)){
80101f37: 8b 53 58 mov 0x58(%ebx),%edx
80101f3a: 31 ff xor %edi,%edi
80101f3c: 8d 75 d8 lea -0x28(%ebp),%esi
80101f3f: 85 d2 test %edx,%edx
80101f41: 74 3e je 80101f81 <dirlookup+0x61>
80101f43: 90 nop
80101f44: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101f48: 6a 10 push $0x10
80101f4a: 57 push %edi
80101f4b: 56 push %esi
80101f4c: 53 push %ebx
80101f4d: e8 7e fd ff ff call 80101cd0 <readi>
80101f52: 83 c4 10 add $0x10,%esp
80101f55: 83 f8 10 cmp $0x10,%eax
80101f58: 75 55 jne 80101faf <dirlookup+0x8f>
panic("dirlookup read");
if(de.inum == 0)
80101f5a: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80101f5f: 74 18 je 80101f79 <dirlookup+0x59>
return strncmp(s, t, DIRSIZ);
80101f61: 8d 45 da lea -0x26(%ebp),%eax
80101f64: 83 ec 04 sub $0x4,%esp
80101f67: 6a 0e push $0xe
80101f69: 50 push %eax
80101f6a: ff 75 0c pushl 0xc(%ebp)
80101f6d: e8 8e 33 00 00 call 80105300 <strncmp>
continue;
if(namecmp(name, de.name) == 0){
80101f72: 83 c4 10 add $0x10,%esp
80101f75: 85 c0 test %eax,%eax
80101f77: 74 17 je 80101f90 <dirlookup+0x70>
for(off = 0; off < dp->size; off += sizeof(de)){
80101f79: 83 c7 10 add $0x10,%edi
80101f7c: 3b 7b 58 cmp 0x58(%ebx),%edi
80101f7f: 72 c7 jb 80101f48 <dirlookup+0x28>
return iget(dp->dev, inum);
}
}
return 0;
}
80101f81: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80101f84: 31 c0 xor %eax,%eax
}
80101f86: 5b pop %ebx
80101f87: 5e pop %esi
80101f88: 5f pop %edi
80101f89: 5d pop %ebp
80101f8a: c3 ret
80101f8b: 90 nop
80101f8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(poff)
80101f90: 8b 45 10 mov 0x10(%ebp),%eax
80101f93: 85 c0 test %eax,%eax
80101f95: 74 05 je 80101f9c <dirlookup+0x7c>
*poff = off;
80101f97: 8b 45 10 mov 0x10(%ebp),%eax
80101f9a: 89 38 mov %edi,(%eax)
inum = de.inum;
80101f9c: 0f b7 55 d8 movzwl -0x28(%ebp),%edx
return iget(dp->dev, inum);
80101fa0: 8b 03 mov (%ebx),%eax
80101fa2: e8 d9 f5 ff ff call 80101580 <iget>
}
80101fa7: 8d 65 f4 lea -0xc(%ebp),%esp
80101faa: 5b pop %ebx
80101fab: 5e pop %esi
80101fac: 5f pop %edi
80101fad: 5d pop %ebp
80101fae: c3 ret
panic("dirlookup read");
80101faf: 83 ec 0c sub $0xc,%esp
80101fb2: 68 b9 7e 10 80 push $0x80107eb9
80101fb7: e8 d4 e3 ff ff call 80100390 <panic>
panic("dirlookup not DIR");
80101fbc: 83 ec 0c sub $0xc,%esp
80101fbf: 68 a7 7e 10 80 push $0x80107ea7
80101fc4: e8 c7 e3 ff ff call 80100390 <panic>
80101fc9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101fd0 <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)
{
80101fd0: 55 push %ebp
80101fd1: 89 e5 mov %esp,%ebp
80101fd3: 57 push %edi
80101fd4: 56 push %esi
80101fd5: 53 push %ebx
80101fd6: 89 cf mov %ecx,%edi
80101fd8: 89 c3 mov %eax,%ebx
80101fda: 83 ec 1c sub $0x1c,%esp
struct inode *ip, *next;
if(*path == '/')
80101fdd: 80 38 2f cmpb $0x2f,(%eax)
{
80101fe0: 89 55 e0 mov %edx,-0x20(%ebp)
if(*path == '/')
80101fe3: 0f 84 67 01 00 00 je 80102150 <namex+0x180>
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(myproc()->cwd);
80101fe9: e8 b2 1b 00 00 call 80103ba0 <myproc>
acquire(&icache.lock);
80101fee: 83 ec 0c sub $0xc,%esp
ip = idup(myproc()->cwd);
80101ff1: 8b 70 68 mov 0x68(%eax),%esi
acquire(&icache.lock);
80101ff4: 68 a0 1c 11 80 push $0x80111ca0
80101ff9: e8 d2 30 00 00 call 801050d0 <acquire>
ip->ref++;
80101ffe: 83 46 08 01 addl $0x1,0x8(%esi)
release(&icache.lock);
80102002: c7 04 24 a0 1c 11 80 movl $0x80111ca0,(%esp)
80102009: e8 82 31 00 00 call 80105190 <release>
8010200e: 83 c4 10 add $0x10,%esp
80102011: eb 08 jmp 8010201b <namex+0x4b>
80102013: 90 nop
80102014: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
path++;
80102018: 83 c3 01 add $0x1,%ebx
while(*path == '/')
8010201b: 0f b6 03 movzbl (%ebx),%eax
8010201e: 3c 2f cmp $0x2f,%al
80102020: 74 f6 je 80102018 <namex+0x48>
if(*path == 0)
80102022: 84 c0 test %al,%al
80102024: 0f 84 ee 00 00 00 je 80102118 <namex+0x148>
while(*path != '/' && *path != 0)
8010202a: 0f b6 03 movzbl (%ebx),%eax
8010202d: 3c 2f cmp $0x2f,%al
8010202f: 0f 84 b3 00 00 00 je 801020e8 <namex+0x118>
80102035: 84 c0 test %al,%al
80102037: 89 da mov %ebx,%edx
80102039: 75 09 jne 80102044 <namex+0x74>
8010203b: e9 a8 00 00 00 jmp 801020e8 <namex+0x118>
80102040: 84 c0 test %al,%al
80102042: 74 0a je 8010204e <namex+0x7e>
path++;
80102044: 83 c2 01 add $0x1,%edx
while(*path != '/' && *path != 0)
80102047: 0f b6 02 movzbl (%edx),%eax
8010204a: 3c 2f cmp $0x2f,%al
8010204c: 75 f2 jne 80102040 <namex+0x70>
8010204e: 89 d1 mov %edx,%ecx
80102050: 29 d9 sub %ebx,%ecx
if(len >= DIRSIZ)
80102052: 83 f9 0d cmp $0xd,%ecx
80102055: 0f 8e 91 00 00 00 jle 801020ec <namex+0x11c>
memmove(name, s, DIRSIZ);
8010205b: 83 ec 04 sub $0x4,%esp
8010205e: 89 55 e4 mov %edx,-0x1c(%ebp)
80102061: 6a 0e push $0xe
80102063: 53 push %ebx
80102064: 57 push %edi
80102065: e8 26 32 00 00 call 80105290 <memmove>
path++;
8010206a: 8b 55 e4 mov -0x1c(%ebp),%edx
memmove(name, s, DIRSIZ);
8010206d: 83 c4 10 add $0x10,%esp
path++;
80102070: 89 d3 mov %edx,%ebx
while(*path == '/')
80102072: 80 3a 2f cmpb $0x2f,(%edx)
80102075: 75 11 jne 80102088 <namex+0xb8>
80102077: 89 f6 mov %esi,%esi
80102079: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
path++;
80102080: 83 c3 01 add $0x1,%ebx
while(*path == '/')
80102083: 80 3b 2f cmpb $0x2f,(%ebx)
80102086: 74 f8 je 80102080 <namex+0xb0>
while((path = skipelem(path, name)) != 0){
ilock(ip);
80102088: 83 ec 0c sub $0xc,%esp
8010208b: 56 push %esi
8010208c: e8 5f f9 ff ff call 801019f0 <ilock>
if(ip->type != T_DIR){
80102091: 83 c4 10 add $0x10,%esp
80102094: 66 83 7e 50 01 cmpw $0x1,0x50(%esi)
80102099: 0f 85 91 00 00 00 jne 80102130 <namex+0x160>
iunlockput(ip);
return 0;
}
if(nameiparent && *path == '\0'){
8010209f: 8b 55 e0 mov -0x20(%ebp),%edx
801020a2: 85 d2 test %edx,%edx
801020a4: 74 09 je 801020af <namex+0xdf>
801020a6: 80 3b 00 cmpb $0x0,(%ebx)
801020a9: 0f 84 b7 00 00 00 je 80102166 <namex+0x196>
// Stop one level early.
iunlock(ip);
return ip;
}
if((next = dirlookup(ip, name, 0)) == 0){
801020af: 83 ec 04 sub $0x4,%esp
801020b2: 6a 00 push $0x0
801020b4: 57 push %edi
801020b5: 56 push %esi
801020b6: e8 65 fe ff ff call 80101f20 <dirlookup>
801020bb: 83 c4 10 add $0x10,%esp
801020be: 85 c0 test %eax,%eax
801020c0: 74 6e je 80102130 <namex+0x160>
iunlock(ip);
801020c2: 83 ec 0c sub $0xc,%esp
801020c5: 89 45 e4 mov %eax,-0x1c(%ebp)
801020c8: 56 push %esi
801020c9: e8 02 fa ff ff call 80101ad0 <iunlock>
iput(ip);
801020ce: 89 34 24 mov %esi,(%esp)
801020d1: e8 4a fa ff ff call 80101b20 <iput>
801020d6: 8b 45 e4 mov -0x1c(%ebp),%eax
801020d9: 83 c4 10 add $0x10,%esp
801020dc: 89 c6 mov %eax,%esi
801020de: e9 38 ff ff ff jmp 8010201b <namex+0x4b>
801020e3: 90 nop
801020e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
while(*path != '/' && *path != 0)
801020e8: 89 da mov %ebx,%edx
801020ea: 31 c9 xor %ecx,%ecx
memmove(name, s, len);
801020ec: 83 ec 04 sub $0x4,%esp
801020ef: 89 55 dc mov %edx,-0x24(%ebp)
801020f2: 89 4d e4 mov %ecx,-0x1c(%ebp)
801020f5: 51 push %ecx
801020f6: 53 push %ebx
801020f7: 57 push %edi
801020f8: e8 93 31 00 00 call 80105290 <memmove>
name[len] = 0;
801020fd: 8b 4d e4 mov -0x1c(%ebp),%ecx
80102100: 8b 55 dc mov -0x24(%ebp),%edx
80102103: 83 c4 10 add $0x10,%esp
80102106: c6 04 0f 00 movb $0x0,(%edi,%ecx,1)
8010210a: 89 d3 mov %edx,%ebx
8010210c: e9 61 ff ff ff jmp 80102072 <namex+0xa2>
80102111: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return 0;
}
iunlockput(ip);
ip = next;
}
if(nameiparent){
80102118: 8b 45 e0 mov -0x20(%ebp),%eax
8010211b: 85 c0 test %eax,%eax
8010211d: 75 5d jne 8010217c <namex+0x1ac>
iput(ip);
return 0;
}
return ip;
}
8010211f: 8d 65 f4 lea -0xc(%ebp),%esp
80102122: 89 f0 mov %esi,%eax
80102124: 5b pop %ebx
80102125: 5e pop %esi
80102126: 5f pop %edi
80102127: 5d pop %ebp
80102128: c3 ret
80102129: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
iunlock(ip);
80102130: 83 ec 0c sub $0xc,%esp
80102133: 56 push %esi
80102134: e8 97 f9 ff ff call 80101ad0 <iunlock>
iput(ip);
80102139: 89 34 24 mov %esi,(%esp)
return 0;
8010213c: 31 f6 xor %esi,%esi
iput(ip);
8010213e: e8 dd f9 ff ff call 80101b20 <iput>
return 0;
80102143: 83 c4 10 add $0x10,%esp
}
80102146: 8d 65 f4 lea -0xc(%ebp),%esp
80102149: 89 f0 mov %esi,%eax
8010214b: 5b pop %ebx
8010214c: 5e pop %esi
8010214d: 5f pop %edi
8010214e: 5d pop %ebp
8010214f: c3 ret
ip = iget(ROOTDEV, ROOTINO);
80102150: ba 01 00 00 00 mov $0x1,%edx
80102155: b8 01 00 00 00 mov $0x1,%eax
8010215a: e8 21 f4 ff ff call 80101580 <iget>
8010215f: 89 c6 mov %eax,%esi
80102161: e9 b5 fe ff ff jmp 8010201b <namex+0x4b>
iunlock(ip);
80102166: 83 ec 0c sub $0xc,%esp
80102169: 56 push %esi
8010216a: e8 61 f9 ff ff call 80101ad0 <iunlock>
return ip;
8010216f: 83 c4 10 add $0x10,%esp
}
80102172: 8d 65 f4 lea -0xc(%ebp),%esp
80102175: 89 f0 mov %esi,%eax
80102177: 5b pop %ebx
80102178: 5e pop %esi
80102179: 5f pop %edi
8010217a: 5d pop %ebp
8010217b: c3 ret
iput(ip);
8010217c: 83 ec 0c sub $0xc,%esp
8010217f: 56 push %esi
return 0;
80102180: 31 f6 xor %esi,%esi
iput(ip);
80102182: e8 99 f9 ff ff call 80101b20 <iput>
return 0;
80102187: 83 c4 10 add $0x10,%esp
8010218a: eb 93 jmp 8010211f <namex+0x14f>
8010218c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102190 <dirlink>:
{
80102190: 55 push %ebp
80102191: 89 e5 mov %esp,%ebp
80102193: 57 push %edi
80102194: 56 push %esi
80102195: 53 push %ebx
80102196: 83 ec 20 sub $0x20,%esp
80102199: 8b 5d 08 mov 0x8(%ebp),%ebx
if((ip = dirlookup(dp, name, 0)) != 0){
8010219c: 6a 00 push $0x0
8010219e: ff 75 0c pushl 0xc(%ebp)
801021a1: 53 push %ebx
801021a2: e8 79 fd ff ff call 80101f20 <dirlookup>
801021a7: 83 c4 10 add $0x10,%esp
801021aa: 85 c0 test %eax,%eax
801021ac: 75 67 jne 80102215 <dirlink+0x85>
for(off = 0; off < dp->size; off += sizeof(de)){
801021ae: 8b 7b 58 mov 0x58(%ebx),%edi
801021b1: 8d 75 d8 lea -0x28(%ebp),%esi
801021b4: 85 ff test %edi,%edi
801021b6: 74 29 je 801021e1 <dirlink+0x51>
801021b8: 31 ff xor %edi,%edi
801021ba: 8d 75 d8 lea -0x28(%ebp),%esi
801021bd: eb 09 jmp 801021c8 <dirlink+0x38>
801021bf: 90 nop
801021c0: 83 c7 10 add $0x10,%edi
801021c3: 3b 7b 58 cmp 0x58(%ebx),%edi
801021c6: 73 19 jae 801021e1 <dirlink+0x51>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
801021c8: 6a 10 push $0x10
801021ca: 57 push %edi
801021cb: 56 push %esi
801021cc: 53 push %ebx
801021cd: e8 fe fa ff ff call 80101cd0 <readi>
801021d2: 83 c4 10 add $0x10,%esp
801021d5: 83 f8 10 cmp $0x10,%eax
801021d8: 75 4e jne 80102228 <dirlink+0x98>
if(de.inum == 0)
801021da: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
801021df: 75 df jne 801021c0 <dirlink+0x30>
strncpy(de.name, name, DIRSIZ);
801021e1: 8d 45 da lea -0x26(%ebp),%eax
801021e4: 83 ec 04 sub $0x4,%esp
801021e7: 6a 0e push $0xe
801021e9: ff 75 0c pushl 0xc(%ebp)
801021ec: 50 push %eax
801021ed: e8 6e 31 00 00 call 80105360 <strncpy>
de.inum = inum;
801021f2: 8b 45 10 mov 0x10(%ebp),%eax
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
801021f5: 6a 10 push $0x10
801021f7: 57 push %edi
801021f8: 56 push %esi
801021f9: 53 push %ebx
de.inum = inum;
801021fa: 66 89 45 d8 mov %ax,-0x28(%ebp)
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
801021fe: e8 cd fb ff ff call 80101dd0 <writei>
80102203: 83 c4 20 add $0x20,%esp
80102206: 83 f8 10 cmp $0x10,%eax
80102209: 75 2a jne 80102235 <dirlink+0xa5>
return 0;
8010220b: 31 c0 xor %eax,%eax
}
8010220d: 8d 65 f4 lea -0xc(%ebp),%esp
80102210: 5b pop %ebx
80102211: 5e pop %esi
80102212: 5f pop %edi
80102213: 5d pop %ebp
80102214: c3 ret
iput(ip);
80102215: 83 ec 0c sub $0xc,%esp
80102218: 50 push %eax
80102219: e8 02 f9 ff ff call 80101b20 <iput>
return -1;
8010221e: 83 c4 10 add $0x10,%esp
80102221: b8 ff ff ff ff mov $0xffffffff,%eax
80102226: eb e5 jmp 8010220d <dirlink+0x7d>
panic("dirlink read");
80102228: 83 ec 0c sub $0xc,%esp
8010222b: 68 c8 7e 10 80 push $0x80107ec8
80102230: e8 5b e1 ff ff call 80100390 <panic>
panic("dirlink");
80102235: 83 ec 0c sub $0xc,%esp
80102238: 68 5a 86 10 80 push $0x8010865a
8010223d: e8 4e e1 ff ff call 80100390 <panic>
80102242: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102249: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102250 <namei>:
struct inode*
namei(char *path)
{
80102250: 55 push %ebp
char name[DIRSIZ];
return namex(path, 0, name);
80102251: 31 d2 xor %edx,%edx
{
80102253: 89 e5 mov %esp,%ebp
80102255: 83 ec 18 sub $0x18,%esp
return namex(path, 0, name);
80102258: 8b 45 08 mov 0x8(%ebp),%eax
8010225b: 8d 4d ea lea -0x16(%ebp),%ecx
8010225e: e8 6d fd ff ff call 80101fd0 <namex>
}
80102263: c9 leave
80102264: c3 ret
80102265: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102269: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102270 <nameiparent>:
struct inode*
nameiparent(char *path, char *name)
{
80102270: 55 push %ebp
return namex(path, 1, name);
80102271: ba 01 00 00 00 mov $0x1,%edx
{
80102276: 89 e5 mov %esp,%ebp
return namex(path, 1, name);
80102278: 8b 4d 0c mov 0xc(%ebp),%ecx
8010227b: 8b 45 08 mov 0x8(%ebp),%eax
}
8010227e: 5d pop %ebp
return namex(path, 1, name);
8010227f: e9 4c fd ff ff jmp 80101fd0 <namex>
80102284: 66 90 xchg %ax,%ax
80102286: 66 90 xchg %ax,%ax
80102288: 66 90 xchg %ax,%ax
8010228a: 66 90 xchg %ax,%ax
8010228c: 66 90 xchg %ax,%ax
8010228e: 66 90 xchg %ax,%ax
80102290 <idestart>:
}
// Start the request for b. Caller must hold idelock.
static void
idestart(struct buf *b)
{
80102290: 55 push %ebp
80102291: 89 e5 mov %esp,%ebp
80102293: 57 push %edi
80102294: 56 push %esi
80102295: 53 push %ebx
80102296: 83 ec 0c sub $0xc,%esp
if(b == 0)
80102299: 85 c0 test %eax,%eax
8010229b: 0f 84 b4 00 00 00 je 80102355 <idestart+0xc5>
panic("idestart");
if(b->blockno >= FSSIZE)
801022a1: 8b 58 08 mov 0x8(%eax),%ebx
801022a4: 89 c6 mov %eax,%esi
801022a6: 81 fb e7 03 00 00 cmp $0x3e7,%ebx
801022ac: 0f 87 96 00 00 00 ja 80102348 <idestart+0xb8>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801022b2: b9 f7 01 00 00 mov $0x1f7,%ecx
801022b7: 89 f6 mov %esi,%esi
801022b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801022c0: 89 ca mov %ecx,%edx
801022c2: ec in (%dx),%al
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
801022c3: 83 e0 c0 and $0xffffffc0,%eax
801022c6: 3c 40 cmp $0x40,%al
801022c8: 75 f6 jne 801022c0 <idestart+0x30>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801022ca: 31 ff xor %edi,%edi
801022cc: ba f6 03 00 00 mov $0x3f6,%edx
801022d1: 89 f8 mov %edi,%eax
801022d3: ee out %al,(%dx)
801022d4: b8 01 00 00 00 mov $0x1,%eax
801022d9: ba f2 01 00 00 mov $0x1f2,%edx
801022de: ee out %al,(%dx)
801022df: ba f3 01 00 00 mov $0x1f3,%edx
801022e4: 89 d8 mov %ebx,%eax
801022e6: 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);
801022e7: 89 d8 mov %ebx,%eax
801022e9: ba f4 01 00 00 mov $0x1f4,%edx
801022ee: c1 f8 08 sar $0x8,%eax
801022f1: ee out %al,(%dx)
801022f2: ba f5 01 00 00 mov $0x1f5,%edx
801022f7: 89 f8 mov %edi,%eax
801022f9: ee out %al,(%dx)
outb(0x1f5, (sector >> 16) & 0xff);
outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f));
801022fa: 0f b6 46 04 movzbl 0x4(%esi),%eax
801022fe: ba f6 01 00 00 mov $0x1f6,%edx
80102303: c1 e0 04 shl $0x4,%eax
80102306: 83 e0 10 and $0x10,%eax
80102309: 83 c8 e0 or $0xffffffe0,%eax
8010230c: ee out %al,(%dx)
if(b->flags & B_DIRTY){
8010230d: f6 06 04 testb $0x4,(%esi)
80102310: 75 16 jne 80102328 <idestart+0x98>
80102312: b8 20 00 00 00 mov $0x20,%eax
80102317: 89 ca mov %ecx,%edx
80102319: ee out %al,(%dx)
outb(0x1f7, write_cmd);
outsl(0x1f0, b->data, BSIZE/4);
} else {
outb(0x1f7, read_cmd);
}
}
8010231a: 8d 65 f4 lea -0xc(%ebp),%esp
8010231d: 5b pop %ebx
8010231e: 5e pop %esi
8010231f: 5f pop %edi
80102320: 5d pop %ebp
80102321: c3 ret
80102322: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102328: b8 30 00 00 00 mov $0x30,%eax
8010232d: 89 ca mov %ecx,%edx
8010232f: ee out %al,(%dx)
asm volatile("cld; rep outsl" :
80102330: b9 80 00 00 00 mov $0x80,%ecx
outsl(0x1f0, b->data, BSIZE/4);
80102335: 83 c6 5c add $0x5c,%esi
80102338: ba f0 01 00 00 mov $0x1f0,%edx
8010233d: fc cld
8010233e: f3 6f rep outsl %ds:(%esi),(%dx)
}
80102340: 8d 65 f4 lea -0xc(%ebp),%esp
80102343: 5b pop %ebx
80102344: 5e pop %esi
80102345: 5f pop %edi
80102346: 5d pop %ebp
80102347: c3 ret
panic("incorrect blockno");
80102348: 83 ec 0c sub $0xc,%esp
8010234b: 68 34 7f 10 80 push $0x80107f34
80102350: e8 3b e0 ff ff call 80100390 <panic>
panic("idestart");
80102355: 83 ec 0c sub $0xc,%esp
80102358: 68 2b 7f 10 80 push $0x80107f2b
8010235d: e8 2e e0 ff ff call 80100390 <panic>
80102362: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102369: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102370 <ideinit>:
{
80102370: 55 push %ebp
80102371: 89 e5 mov %esp,%ebp
80102373: 83 ec 10 sub $0x10,%esp
initlock(&idelock, "ide");
80102376: 68 46 7f 10 80 push $0x80107f46
8010237b: 68 c0 b5 10 80 push $0x8010b5c0
80102380: e8 0b 2c 00 00 call 80104f90 <initlock>
ioapicenable(IRQ_IDE, ncpu - 1);
80102385: 58 pop %eax
80102386: a1 c0 3f 11 80 mov 0x80113fc0,%eax
8010238b: 5a pop %edx
8010238c: 83 e8 01 sub $0x1,%eax
8010238f: 50 push %eax
80102390: 6a 0e push $0xe
80102392: e8 a9 02 00 00 call 80102640 <ioapicenable>
80102397: 83 c4 10 add $0x10,%esp
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010239a: ba f7 01 00 00 mov $0x1f7,%edx
8010239f: 90 nop
801023a0: ec in (%dx),%al
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
801023a1: 83 e0 c0 and $0xffffffc0,%eax
801023a4: 3c 40 cmp $0x40,%al
801023a6: 75 f8 jne 801023a0 <ideinit+0x30>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801023a8: b8 f0 ff ff ff mov $0xfffffff0,%eax
801023ad: ba f6 01 00 00 mov $0x1f6,%edx
801023b2: ee out %al,(%dx)
801023b3: b9 e8 03 00 00 mov $0x3e8,%ecx
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801023b8: ba f7 01 00 00 mov $0x1f7,%edx
801023bd: eb 06 jmp 801023c5 <ideinit+0x55>
801023bf: 90 nop
for(i=0; i<1000; i++){
801023c0: 83 e9 01 sub $0x1,%ecx
801023c3: 74 0f je 801023d4 <ideinit+0x64>
801023c5: ec in (%dx),%al
if(inb(0x1f7) != 0){
801023c6: 84 c0 test %al,%al
801023c8: 74 f6 je 801023c0 <ideinit+0x50>
havedisk1 = 1;
801023ca: c7 05 a0 b5 10 80 01 movl $0x1,0x8010b5a0
801023d1: 00 00 00
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801023d4: b8 e0 ff ff ff mov $0xffffffe0,%eax
801023d9: ba f6 01 00 00 mov $0x1f6,%edx
801023de: ee out %al,(%dx)
}
801023df: c9 leave
801023e0: c3 ret
801023e1: eb 0d jmp 801023f0 <ideintr>
801023e3: 90 nop
801023e4: 90 nop
801023e5: 90 nop
801023e6: 90 nop
801023e7: 90 nop
801023e8: 90 nop
801023e9: 90 nop
801023ea: 90 nop
801023eb: 90 nop
801023ec: 90 nop
801023ed: 90 nop
801023ee: 90 nop
801023ef: 90 nop
801023f0 <ideintr>:
// Interrupt handler.
void
ideintr(void)
{
801023f0: 55 push %ebp
801023f1: 89 e5 mov %esp,%ebp
801023f3: 57 push %edi
801023f4: 56 push %esi
801023f5: 53 push %ebx
801023f6: 83 ec 18 sub $0x18,%esp
struct buf *b;
// First queued buffer is the active request.
acquire(&idelock);
801023f9: 68 c0 b5 10 80 push $0x8010b5c0
801023fe: e8 cd 2c 00 00 call 801050d0 <acquire>
if((b = idequeue) == 0){
80102403: 8b 1d a4 b5 10 80 mov 0x8010b5a4,%ebx
80102409: 83 c4 10 add $0x10,%esp
8010240c: 85 db test %ebx,%ebx
8010240e: 74 67 je 80102477 <ideintr+0x87>
release(&idelock);
return;
}
idequeue = b->qnext;
80102410: 8b 43 58 mov 0x58(%ebx),%eax
80102413: a3 a4 b5 10 80 mov %eax,0x8010b5a4
// Read data if needed.
if(!(b->flags & B_DIRTY) && idewait(1) >= 0)
80102418: 8b 3b mov (%ebx),%edi
8010241a: f7 c7 04 00 00 00 test $0x4,%edi
80102420: 75 31 jne 80102453 <ideintr+0x63>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102422: ba f7 01 00 00 mov $0x1f7,%edx
80102427: 89 f6 mov %esi,%esi
80102429: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102430: ec in (%dx),%al
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
80102431: 89 c6 mov %eax,%esi
80102433: 83 e6 c0 and $0xffffffc0,%esi
80102436: 89 f1 mov %esi,%ecx
80102438: 80 f9 40 cmp $0x40,%cl
8010243b: 75 f3 jne 80102430 <ideintr+0x40>
if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0)
8010243d: a8 21 test $0x21,%al
8010243f: 75 12 jne 80102453 <ideintr+0x63>
insl(0x1f0, b->data, BSIZE/4);
80102441: 8d 7b 5c lea 0x5c(%ebx),%edi
asm volatile("cld; rep insl" :
80102444: b9 80 00 00 00 mov $0x80,%ecx
80102449: ba f0 01 00 00 mov $0x1f0,%edx
8010244e: fc cld
8010244f: f3 6d rep insl (%dx),%es:(%edi)
80102451: 8b 3b mov (%ebx),%edi
// Wake process waiting for this buf.
b->flags |= B_VALID;
b->flags &= ~B_DIRTY;
80102453: 83 e7 fb and $0xfffffffb,%edi
wakeup(b);
80102456: 83 ec 0c sub $0xc,%esp
b->flags &= ~B_DIRTY;
80102459: 89 f9 mov %edi,%ecx
8010245b: 83 c9 02 or $0x2,%ecx
8010245e: 89 0b mov %ecx,(%ebx)
wakeup(b);
80102460: 53 push %ebx
80102461: e8 fa 1d 00 00 call 80104260 <wakeup>
// Start disk on next buf in queue.
if(idequeue != 0)
80102466: a1 a4 b5 10 80 mov 0x8010b5a4,%eax
8010246b: 83 c4 10 add $0x10,%esp
8010246e: 85 c0 test %eax,%eax
80102470: 74 05 je 80102477 <ideintr+0x87>
idestart(idequeue);
80102472: e8 19 fe ff ff call 80102290 <idestart>
release(&idelock);
80102477: 83 ec 0c sub $0xc,%esp
8010247a: 68 c0 b5 10 80 push $0x8010b5c0
8010247f: e8 0c 2d 00 00 call 80105190 <release>
release(&idelock);
}
80102484: 8d 65 f4 lea -0xc(%ebp),%esp
80102487: 5b pop %ebx
80102488: 5e pop %esi
80102489: 5f pop %edi
8010248a: 5d pop %ebp
8010248b: c3 ret
8010248c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102490 <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)
{
80102490: 55 push %ebp
80102491: 89 e5 mov %esp,%ebp
80102493: 53 push %ebx
80102494: 83 ec 10 sub $0x10,%esp
80102497: 8b 5d 08 mov 0x8(%ebp),%ebx
struct buf **pp;
if(!holdingsleep(&b->lock))
8010249a: 8d 43 0c lea 0xc(%ebx),%eax
8010249d: 50 push %eax
8010249e: e8 9d 2a 00 00 call 80104f40 <holdingsleep>
801024a3: 83 c4 10 add $0x10,%esp
801024a6: 85 c0 test %eax,%eax
801024a8: 0f 84 c6 00 00 00 je 80102574 <iderw+0xe4>
panic("iderw: buf not locked");
if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
801024ae: 8b 03 mov (%ebx),%eax
801024b0: 83 e0 06 and $0x6,%eax
801024b3: 83 f8 02 cmp $0x2,%eax
801024b6: 0f 84 ab 00 00 00 je 80102567 <iderw+0xd7>
panic("iderw: nothing to do");
if(b->dev != 0 && !havedisk1)
801024bc: 8b 53 04 mov 0x4(%ebx),%edx
801024bf: 85 d2 test %edx,%edx
801024c1: 74 0d je 801024d0 <iderw+0x40>
801024c3: a1 a0 b5 10 80 mov 0x8010b5a0,%eax
801024c8: 85 c0 test %eax,%eax
801024ca: 0f 84 b1 00 00 00 je 80102581 <iderw+0xf1>
panic("iderw: ide disk 1 not present");
acquire(&idelock); //DOC:acquire-lock
801024d0: 83 ec 0c sub $0xc,%esp
801024d3: 68 c0 b5 10 80 push $0x8010b5c0
801024d8: e8 f3 2b 00 00 call 801050d0 <acquire>
// Append b to idequeue.
b->qnext = 0;
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
801024dd: 8b 15 a4 b5 10 80 mov 0x8010b5a4,%edx
801024e3: 83 c4 10 add $0x10,%esp
b->qnext = 0;
801024e6: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
801024ed: 85 d2 test %edx,%edx
801024ef: 75 09 jne 801024fa <iderw+0x6a>
801024f1: eb 6d jmp 80102560 <iderw+0xd0>
801024f3: 90 nop
801024f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801024f8: 89 c2 mov %eax,%edx
801024fa: 8b 42 58 mov 0x58(%edx),%eax
801024fd: 85 c0 test %eax,%eax
801024ff: 75 f7 jne 801024f8 <iderw+0x68>
80102501: 83 c2 58 add $0x58,%edx
;
*pp = b;
80102504: 89 1a mov %ebx,(%edx)
// Start disk if necessary.
if(idequeue == b)
80102506: 39 1d a4 b5 10 80 cmp %ebx,0x8010b5a4
8010250c: 74 42 je 80102550 <iderw+0xc0>
idestart(b);
// Wait for request to finish.
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
8010250e: 8b 03 mov (%ebx),%eax
80102510: 83 e0 06 and $0x6,%eax
80102513: 83 f8 02 cmp $0x2,%eax
80102516: 74 23 je 8010253b <iderw+0xab>
80102518: 90 nop
80102519: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
sleep(b, &idelock);
80102520: 83 ec 08 sub $0x8,%esp
80102523: 68 c0 b5 10 80 push $0x8010b5c0
80102528: 53 push %ebx
80102529: e8 72 1b 00 00 call 801040a0 <sleep>
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
8010252e: 8b 03 mov (%ebx),%eax
80102530: 83 c4 10 add $0x10,%esp
80102533: 83 e0 06 and $0x6,%eax
80102536: 83 f8 02 cmp $0x2,%eax
80102539: 75 e5 jne 80102520 <iderw+0x90>
}
release(&idelock);
8010253b: c7 45 08 c0 b5 10 80 movl $0x8010b5c0,0x8(%ebp)
}
80102542: 8b 5d fc mov -0x4(%ebp),%ebx
80102545: c9 leave
release(&idelock);
80102546: e9 45 2c 00 00 jmp 80105190 <release>
8010254b: 90 nop
8010254c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
idestart(b);
80102550: 89 d8 mov %ebx,%eax
80102552: e8 39 fd ff ff call 80102290 <idestart>
80102557: eb b5 jmp 8010250e <iderw+0x7e>
80102559: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
80102560: ba a4 b5 10 80 mov $0x8010b5a4,%edx
80102565: eb 9d jmp 80102504 <iderw+0x74>
panic("iderw: nothing to do");
80102567: 83 ec 0c sub $0xc,%esp
8010256a: 68 60 7f 10 80 push $0x80107f60
8010256f: e8 1c de ff ff call 80100390 <panic>
panic("iderw: buf not locked");
80102574: 83 ec 0c sub $0xc,%esp
80102577: 68 4a 7f 10 80 push $0x80107f4a
8010257c: e8 0f de ff ff call 80100390 <panic>
panic("iderw: ide disk 1 not present");
80102581: 83 ec 0c sub $0xc,%esp
80102584: 68 75 7f 10 80 push $0x80107f75
80102589: e8 02 de ff ff call 80100390 <panic>
8010258e: 66 90 xchg %ax,%ax
80102590 <ioapicinit>:
ioapic->data = data;
}
void
ioapicinit(void)
{
80102590: 55 push %ebp
int i, id, maxintr;
ioapic = (volatile struct ioapic*)IOAPIC;
80102591: c7 05 f4 38 11 80 00 movl $0xfec00000,0x801138f4
80102598: 00 c0 fe
{
8010259b: 89 e5 mov %esp,%ebp
8010259d: 56 push %esi
8010259e: 53 push %ebx
ioapic->reg = reg;
8010259f: c7 05 00 00 c0 fe 01 movl $0x1,0xfec00000
801025a6: 00 00 00
return ioapic->data;
801025a9: a1 f4 38 11 80 mov 0x801138f4,%eax
801025ae: 8b 58 10 mov 0x10(%eax),%ebx
ioapic->reg = reg;
801025b1: c7 00 00 00 00 00 movl $0x0,(%eax)
return ioapic->data;
801025b7: 8b 0d f4 38 11 80 mov 0x801138f4,%ecx
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
id = ioapicread(REG_ID) >> 24;
if(id != ioapicid)
801025bd: 0f b6 15 20 3a 11 80 movzbl 0x80113a20,%edx
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
801025c4: c1 eb 10 shr $0x10,%ebx
return ioapic->data;
801025c7: 8b 41 10 mov 0x10(%ecx),%eax
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
801025ca: 0f b6 db movzbl %bl,%ebx
id = ioapicread(REG_ID) >> 24;
801025cd: c1 e8 18 shr $0x18,%eax
if(id != ioapicid)
801025d0: 39 c2 cmp %eax,%edx
801025d2: 74 16 je 801025ea <ioapicinit+0x5a>
cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n");
801025d4: 83 ec 0c sub $0xc,%esp
801025d7: 68 94 7f 10 80 push $0x80107f94
801025dc: e8 7f e0 ff ff call 80100660 <cprintf>
801025e1: 8b 0d f4 38 11 80 mov 0x801138f4,%ecx
801025e7: 83 c4 10 add $0x10,%esp
801025ea: 83 c3 21 add $0x21,%ebx
{
801025ed: ba 10 00 00 00 mov $0x10,%edx
801025f2: b8 20 00 00 00 mov $0x20,%eax
801025f7: 89 f6 mov %esi,%esi
801025f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
ioapic->reg = reg;
80102600: 89 11 mov %edx,(%ecx)
ioapic->data = data;
80102602: 8b 0d f4 38 11 80 mov 0x801138f4,%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));
80102608: 89 c6 mov %eax,%esi
8010260a: 81 ce 00 00 01 00 or $0x10000,%esi
80102610: 83 c0 01 add $0x1,%eax
ioapic->data = data;
80102613: 89 71 10 mov %esi,0x10(%ecx)
80102616: 8d 72 01 lea 0x1(%edx),%esi
80102619: 83 c2 02 add $0x2,%edx
for(i = 0; i <= maxintr; i++){
8010261c: 39 d8 cmp %ebx,%eax
ioapic->reg = reg;
8010261e: 89 31 mov %esi,(%ecx)
ioapic->data = data;
80102620: 8b 0d f4 38 11 80 mov 0x801138f4,%ecx
80102626: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx)
for(i = 0; i <= maxintr; i++){
8010262d: 75 d1 jne 80102600 <ioapicinit+0x70>
ioapicwrite(REG_TABLE+2*i+1, 0);
}
}
8010262f: 8d 65 f8 lea -0x8(%ebp),%esp
80102632: 5b pop %ebx
80102633: 5e pop %esi
80102634: 5d pop %ebp
80102635: c3 ret
80102636: 8d 76 00 lea 0x0(%esi),%esi
80102639: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102640 <ioapicenable>:
void
ioapicenable(int irq, int cpunum)
{
80102640: 55 push %ebp
ioapic->reg = reg;
80102641: 8b 0d f4 38 11 80 mov 0x801138f4,%ecx
{
80102647: 89 e5 mov %esp,%ebp
80102649: 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);
8010264c: 8d 50 20 lea 0x20(%eax),%edx
8010264f: 8d 44 00 10 lea 0x10(%eax,%eax,1),%eax
ioapic->reg = reg;
80102653: 89 01 mov %eax,(%ecx)
ioapic->data = data;
80102655: 8b 0d f4 38 11 80 mov 0x801138f4,%ecx
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
8010265b: 83 c0 01 add $0x1,%eax
ioapic->data = data;
8010265e: 89 51 10 mov %edx,0x10(%ecx)
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
80102661: 8b 55 0c mov 0xc(%ebp),%edx
ioapic->reg = reg;
80102664: 89 01 mov %eax,(%ecx)
ioapic->data = data;
80102666: a1 f4 38 11 80 mov 0x801138f4,%eax
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
8010266b: c1 e2 18 shl $0x18,%edx
ioapic->data = data;
8010266e: 89 50 10 mov %edx,0x10(%eax)
}
80102671: 5d pop %ebp
80102672: c3 ret
80102673: 66 90 xchg %ax,%ax
80102675: 66 90 xchg %ax,%ax
80102677: 66 90 xchg %ax,%ax
80102679: 66 90 xchg %ax,%ax
8010267b: 66 90 xchg %ax,%ax
8010267d: 66 90 xchg %ax,%ax
8010267f: 90 nop
80102680 <kfree>:
// which normally should have been returned by a
// call to kalloc(). (The exception is when
// initializing the allocator; see kinit above.)
void
kfree(char *v)
{
80102680: 55 push %ebp
80102681: 89 e5 mov %esp,%ebp
80102683: 53 push %ebx
80102684: 83 ec 04 sub $0x4,%esp
80102687: 8b 5d 08 mov 0x8(%ebp),%ebx
struct run *r;
if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP)
8010268a: f7 c3 ff 0f 00 00 test $0xfff,%ebx
80102690: 75 70 jne 80102702 <kfree+0x82>
80102692: 81 fb 88 6d 11 80 cmp $0x80116d88,%ebx
80102698: 72 68 jb 80102702 <kfree+0x82>
8010269a: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
801026a0: 3d ff ff ff 0d cmp $0xdffffff,%eax
801026a5: 77 5b ja 80102702 <kfree+0x82>
panic("kfree");
// Fill with junk to catch dangling refs.
memset(v, 1, PGSIZE);
801026a7: 83 ec 04 sub $0x4,%esp
801026aa: 68 00 10 00 00 push $0x1000
801026af: 6a 01 push $0x1
801026b1: 53 push %ebx
801026b2: e8 29 2b 00 00 call 801051e0 <memset>
if(kmem.use_lock)
801026b7: 8b 15 34 39 11 80 mov 0x80113934,%edx
801026bd: 83 c4 10 add $0x10,%esp
801026c0: 85 d2 test %edx,%edx
801026c2: 75 2c jne 801026f0 <kfree+0x70>
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
801026c4: a1 38 39 11 80 mov 0x80113938,%eax
801026c9: 89 03 mov %eax,(%ebx)
kmem.freelist = r;
if(kmem.use_lock)
801026cb: a1 34 39 11 80 mov 0x80113934,%eax
kmem.freelist = r;
801026d0: 89 1d 38 39 11 80 mov %ebx,0x80113938
if(kmem.use_lock)
801026d6: 85 c0 test %eax,%eax
801026d8: 75 06 jne 801026e0 <kfree+0x60>
release(&kmem.lock);
}
801026da: 8b 5d fc mov -0x4(%ebp),%ebx
801026dd: c9 leave
801026de: c3 ret
801026df: 90 nop
release(&kmem.lock);
801026e0: c7 45 08 00 39 11 80 movl $0x80113900,0x8(%ebp)
}
801026e7: 8b 5d fc mov -0x4(%ebp),%ebx
801026ea: c9 leave
release(&kmem.lock);
801026eb: e9 a0 2a 00 00 jmp 80105190 <release>
acquire(&kmem.lock);
801026f0: 83 ec 0c sub $0xc,%esp
801026f3: 68 00 39 11 80 push $0x80113900
801026f8: e8 d3 29 00 00 call 801050d0 <acquire>
801026fd: 83 c4 10 add $0x10,%esp
80102700: eb c2 jmp 801026c4 <kfree+0x44>
panic("kfree");
80102702: 83 ec 0c sub $0xc,%esp
80102705: 68 c6 7f 10 80 push $0x80107fc6
8010270a: e8 81 dc ff ff call 80100390 <panic>
8010270f: 90 nop
80102710 <freerange>:
{
80102710: 55 push %ebp
80102711: 89 e5 mov %esp,%ebp
80102713: 56 push %esi
80102714: 53 push %ebx
p = (char*)PGROUNDUP((uint)vstart);
80102715: 8b 45 08 mov 0x8(%ebp),%eax
{
80102718: 8b 75 0c mov 0xc(%ebp),%esi
p = (char*)PGROUNDUP((uint)vstart);
8010271b: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80102721: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102727: 81 c3 00 10 00 00 add $0x1000,%ebx
8010272d: 39 de cmp %ebx,%esi
8010272f: 72 23 jb 80102754 <freerange+0x44>
80102731: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
kfree(p);
80102738: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
8010273e: 83 ec 0c sub $0xc,%esp
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102741: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
80102747: 50 push %eax
80102748: e8 33 ff ff ff call 80102680 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010274d: 83 c4 10 add $0x10,%esp
80102750: 39 f3 cmp %esi,%ebx
80102752: 76 e4 jbe 80102738 <freerange+0x28>
}
80102754: 8d 65 f8 lea -0x8(%ebp),%esp
80102757: 5b pop %ebx
80102758: 5e pop %esi
80102759: 5d pop %ebp
8010275a: c3 ret
8010275b: 90 nop
8010275c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102760 <kinit1>:
{
80102760: 55 push %ebp
80102761: 89 e5 mov %esp,%ebp
80102763: 56 push %esi
80102764: 53 push %ebx
80102765: 8b 75 0c mov 0xc(%ebp),%esi
initlock(&kmem.lock, "kmem");
80102768: 83 ec 08 sub $0x8,%esp
8010276b: 68 cc 7f 10 80 push $0x80107fcc
80102770: 68 00 39 11 80 push $0x80113900
80102775: e8 16 28 00 00 call 80104f90 <initlock>
p = (char*)PGROUNDUP((uint)vstart);
8010277a: 8b 45 08 mov 0x8(%ebp),%eax
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010277d: 83 c4 10 add $0x10,%esp
kmem.use_lock = 0;
80102780: c7 05 34 39 11 80 00 movl $0x0,0x80113934
80102787: 00 00 00
p = (char*)PGROUNDUP((uint)vstart);
8010278a: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80102790: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102796: 81 c3 00 10 00 00 add $0x1000,%ebx
8010279c: 39 de cmp %ebx,%esi
8010279e: 72 1c jb 801027bc <kinit1+0x5c>
kfree(p);
801027a0: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
801027a6: 83 ec 0c sub $0xc,%esp
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801027a9: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
801027af: 50 push %eax
801027b0: e8 cb fe ff ff call 80102680 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801027b5: 83 c4 10 add $0x10,%esp
801027b8: 39 de cmp %ebx,%esi
801027ba: 73 e4 jae 801027a0 <kinit1+0x40>
}
801027bc: 8d 65 f8 lea -0x8(%ebp),%esp
801027bf: 5b pop %ebx
801027c0: 5e pop %esi
801027c1: 5d pop %ebp
801027c2: c3 ret
801027c3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801027c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801027d0 <kinit2>:
{
801027d0: 55 push %ebp
801027d1: 89 e5 mov %esp,%ebp
801027d3: 56 push %esi
801027d4: 53 push %ebx
p = (char*)PGROUNDUP((uint)vstart);
801027d5: 8b 45 08 mov 0x8(%ebp),%eax
{
801027d8: 8b 75 0c mov 0xc(%ebp),%esi
p = (char*)PGROUNDUP((uint)vstart);
801027db: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
801027e1: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801027e7: 81 c3 00 10 00 00 add $0x1000,%ebx
801027ed: 39 de cmp %ebx,%esi
801027ef: 72 23 jb 80102814 <kinit2+0x44>
801027f1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
kfree(p);
801027f8: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
801027fe: 83 ec 0c sub $0xc,%esp
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102801: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
80102807: 50 push %eax
80102808: e8 73 fe ff ff call 80102680 <kfree>
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010280d: 83 c4 10 add $0x10,%esp
80102810: 39 de cmp %ebx,%esi
80102812: 73 e4 jae 801027f8 <kinit2+0x28>
kmem.use_lock = 1;
80102814: c7 05 34 39 11 80 01 movl $0x1,0x80113934
8010281b: 00 00 00
}
8010281e: 8d 65 f8 lea -0x8(%ebp),%esp
80102821: 5b pop %ebx
80102822: 5e pop %esi
80102823: 5d pop %ebp
80102824: c3 ret
80102825: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102829: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102830 <kalloc>:
char*
kalloc(void)
{
struct run *r;
if(kmem.use_lock)
80102830: a1 34 39 11 80 mov 0x80113934,%eax
80102835: 85 c0 test %eax,%eax
80102837: 75 1f jne 80102858 <kalloc+0x28>
acquire(&kmem.lock);
r = kmem.freelist;
80102839: a1 38 39 11 80 mov 0x80113938,%eax
if(r)
8010283e: 85 c0 test %eax,%eax
80102840: 74 0e je 80102850 <kalloc+0x20>
kmem.freelist = r->next;
80102842: 8b 10 mov (%eax),%edx
80102844: 89 15 38 39 11 80 mov %edx,0x80113938
8010284a: c3 ret
8010284b: 90 nop
8010284c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(kmem.use_lock)
release(&kmem.lock);
return (char*)r;
}
80102850: f3 c3 repz ret
80102852: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
{
80102858: 55 push %ebp
80102859: 89 e5 mov %esp,%ebp
8010285b: 83 ec 24 sub $0x24,%esp
acquire(&kmem.lock);
8010285e: 68 00 39 11 80 push $0x80113900
80102863: e8 68 28 00 00 call 801050d0 <acquire>
r = kmem.freelist;
80102868: a1 38 39 11 80 mov 0x80113938,%eax
if(r)
8010286d: 83 c4 10 add $0x10,%esp
80102870: 8b 15 34 39 11 80 mov 0x80113934,%edx
80102876: 85 c0 test %eax,%eax
80102878: 74 08 je 80102882 <kalloc+0x52>
kmem.freelist = r->next;
8010287a: 8b 08 mov (%eax),%ecx
8010287c: 89 0d 38 39 11 80 mov %ecx,0x80113938
if(kmem.use_lock)
80102882: 85 d2 test %edx,%edx
80102884: 74 16 je 8010289c <kalloc+0x6c>
release(&kmem.lock);
80102886: 83 ec 0c sub $0xc,%esp
80102889: 89 45 f4 mov %eax,-0xc(%ebp)
8010288c: 68 00 39 11 80 push $0x80113900
80102891: e8 fa 28 00 00 call 80105190 <release>
return (char*)r;
80102896: 8b 45 f4 mov -0xc(%ebp),%eax
release(&kmem.lock);
80102899: 83 c4 10 add $0x10,%esp
}
8010289c: c9 leave
8010289d: c3 ret
8010289e: 66 90 xchg %ax,%ax
801028a0 <kbdgetc>:
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801028a0: ba 64 00 00 00 mov $0x64,%edx
801028a5: ec in (%dx),%al
normalmap, shiftmap, ctlmap, ctlmap
};
uint st, data, c;
st = inb(KBSTATP);
if((st & KBS_DIB) == 0)
801028a6: a8 01 test $0x1,%al
801028a8: 0f 84 c2 00 00 00 je 80102970 <kbdgetc+0xd0>
801028ae: ba 60 00 00 00 mov $0x60,%edx
801028b3: ec in (%dx),%al
return -1;
data = inb(KBDATAP);
801028b4: 0f b6 d0 movzbl %al,%edx
801028b7: 8b 0d f4 b5 10 80 mov 0x8010b5f4,%ecx
if(data == 0xE0){
801028bd: 81 fa e0 00 00 00 cmp $0xe0,%edx
801028c3: 0f 84 7f 00 00 00 je 80102948 <kbdgetc+0xa8>
{
801028c9: 55 push %ebp
801028ca: 89 e5 mov %esp,%ebp
801028cc: 53 push %ebx
801028cd: 89 cb mov %ecx,%ebx
801028cf: 83 e3 40 and $0x40,%ebx
shift |= E0ESC;
return 0;
} else if(data & 0x80){
801028d2: 84 c0 test %al,%al
801028d4: 78 4a js 80102920 <kbdgetc+0x80>
// Key released
data = (shift & E0ESC ? data : data & 0x7F);
shift &= ~(shiftcode[data] | E0ESC);
return 0;
} else if(shift & E0ESC){
801028d6: 85 db test %ebx,%ebx
801028d8: 74 09 je 801028e3 <kbdgetc+0x43>
// Last character was an E0 escape; or with 0x80
data |= 0x80;
801028da: 83 c8 80 or $0xffffff80,%eax
shift &= ~E0ESC;
801028dd: 83 e1 bf and $0xffffffbf,%ecx
data |= 0x80;
801028e0: 0f b6 d0 movzbl %al,%edx
}
shift |= shiftcode[data];
801028e3: 0f b6 82 00 81 10 80 movzbl -0x7fef7f00(%edx),%eax
801028ea: 09 c1 or %eax,%ecx
shift ^= togglecode[data];
801028ec: 0f b6 82 00 80 10 80 movzbl -0x7fef8000(%edx),%eax
801028f3: 31 c1 xor %eax,%ecx
c = charcode[shift & (CTL | SHIFT)][data];
801028f5: 89 c8 mov %ecx,%eax
shift ^= togglecode[data];
801028f7: 89 0d f4 b5 10 80 mov %ecx,0x8010b5f4
c = charcode[shift & (CTL | SHIFT)][data];
801028fd: 83 e0 03 and $0x3,%eax
if(shift & CAPSLOCK){
80102900: 83 e1 08 and $0x8,%ecx
c = charcode[shift & (CTL | SHIFT)][data];
80102903: 8b 04 85 e0 7f 10 80 mov -0x7fef8020(,%eax,4),%eax
8010290a: 0f b6 04 10 movzbl (%eax,%edx,1),%eax
if(shift & CAPSLOCK){
8010290e: 74 31 je 80102941 <kbdgetc+0xa1>
if('a' <= c && c <= 'z')
80102910: 8d 50 9f lea -0x61(%eax),%edx
80102913: 83 fa 19 cmp $0x19,%edx
80102916: 77 40 ja 80102958 <kbdgetc+0xb8>
c += 'A' - 'a';
80102918: 83 e8 20 sub $0x20,%eax
else if('A' <= c && c <= 'Z')
c += 'a' - 'A';
}
return c;
}
8010291b: 5b pop %ebx
8010291c: 5d pop %ebp
8010291d: c3 ret
8010291e: 66 90 xchg %ax,%ax
data = (shift & E0ESC ? data : data & 0x7F);
80102920: 83 e0 7f and $0x7f,%eax
80102923: 85 db test %ebx,%ebx
80102925: 0f 44 d0 cmove %eax,%edx
shift &= ~(shiftcode[data] | E0ESC);
80102928: 0f b6 82 00 81 10 80 movzbl -0x7fef7f00(%edx),%eax
8010292f: 83 c8 40 or $0x40,%eax
80102932: 0f b6 c0 movzbl %al,%eax
80102935: f7 d0 not %eax
80102937: 21 c1 and %eax,%ecx
return 0;
80102939: 31 c0 xor %eax,%eax
shift &= ~(shiftcode[data] | E0ESC);
8010293b: 89 0d f4 b5 10 80 mov %ecx,0x8010b5f4
}
80102941: 5b pop %ebx
80102942: 5d pop %ebp
80102943: c3 ret
80102944: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
shift |= E0ESC;
80102948: 83 c9 40 or $0x40,%ecx
return 0;
8010294b: 31 c0 xor %eax,%eax
shift |= E0ESC;
8010294d: 89 0d f4 b5 10 80 mov %ecx,0x8010b5f4
return 0;
80102953: c3 ret
80102954: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
else if('A' <= c && c <= 'Z')
80102958: 8d 48 bf lea -0x41(%eax),%ecx
c += 'a' - 'A';
8010295b: 8d 50 20 lea 0x20(%eax),%edx
}
8010295e: 5b pop %ebx
c += 'a' - 'A';
8010295f: 83 f9 1a cmp $0x1a,%ecx
80102962: 0f 42 c2 cmovb %edx,%eax
}
80102965: 5d pop %ebp
80102966: c3 ret
80102967: 89 f6 mov %esi,%esi
80102969: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
return -1;
80102970: b8 ff ff ff ff mov $0xffffffff,%eax
}
80102975: c3 ret
80102976: 8d 76 00 lea 0x0(%esi),%esi
80102979: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102980 <kbdintr>:
void
kbdintr(void)
{
80102980: 55 push %ebp
80102981: 89 e5 mov %esp,%ebp
80102983: 83 ec 14 sub $0x14,%esp
consoleintr(kbdgetc);
80102986: 68 a0 28 10 80 push $0x801028a0
8010298b: e8 50 e1 ff ff call 80100ae0 <consoleintr>
}
80102990: 83 c4 10 add $0x10,%esp
80102993: c9 leave
80102994: c3 ret
80102995: 66 90 xchg %ax,%ax
80102997: 66 90 xchg %ax,%ax
80102999: 66 90 xchg %ax,%ax
8010299b: 66 90 xchg %ax,%ax
8010299d: 66 90 xchg %ax,%ax
8010299f: 90 nop
801029a0 <lapicinit>:
}
void
lapicinit(void)
{
if(!lapic)
801029a0: a1 3c 39 11 80 mov 0x8011393c,%eax
{
801029a5: 55 push %ebp
801029a6: 89 e5 mov %esp,%ebp
if(!lapic)
801029a8: 85 c0 test %eax,%eax
801029aa: 0f 84 c8 00 00 00 je 80102a78 <lapicinit+0xd8>
lapic[index] = value;
801029b0: c7 80 f0 00 00 00 3f movl $0x13f,0xf0(%eax)
801029b7: 01 00 00
lapic[ID]; // wait for write to finish, by reading
801029ba: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801029bd: c7 80 e0 03 00 00 0b movl $0xb,0x3e0(%eax)
801029c4: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801029c7: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801029ca: c7 80 20 03 00 00 20 movl $0x20020,0x320(%eax)
801029d1: 00 02 00
lapic[ID]; // wait for write to finish, by reading
801029d4: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801029d7: c7 80 80 03 00 00 80 movl $0x989680,0x380(%eax)
801029de: 96 98 00
lapic[ID]; // wait for write to finish, by reading
801029e1: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801029e4: c7 80 50 03 00 00 00 movl $0x10000,0x350(%eax)
801029eb: 00 01 00
lapic[ID]; // wait for write to finish, by reading
801029ee: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
801029f1: c7 80 60 03 00 00 00 movl $0x10000,0x360(%eax)
801029f8: 00 01 00
lapic[ID]; // wait for write to finish, by reading
801029fb: 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)
801029fe: 8b 50 30 mov 0x30(%eax),%edx
80102a01: c1 ea 10 shr $0x10,%edx
80102a04: 80 fa 03 cmp $0x3,%dl
80102a07: 77 77 ja 80102a80 <lapicinit+0xe0>
lapic[index] = value;
80102a09: c7 80 70 03 00 00 33 movl $0x33,0x370(%eax)
80102a10: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102a13: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102a16: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
80102a1d: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102a20: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102a23: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
80102a2a: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102a2d: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102a30: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
80102a37: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102a3a: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102a3d: c7 80 10 03 00 00 00 movl $0x0,0x310(%eax)
80102a44: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102a47: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102a4a: c7 80 00 03 00 00 00 movl $0x88500,0x300(%eax)
80102a51: 85 08 00
lapic[ID]; // wait for write to finish, by reading
80102a54: 8b 50 20 mov 0x20(%eax),%edx
80102a57: 89 f6 mov %esi,%esi
80102a59: 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)
80102a60: 8b 90 00 03 00 00 mov 0x300(%eax),%edx
80102a66: 80 e6 10 and $0x10,%dh
80102a69: 75 f5 jne 80102a60 <lapicinit+0xc0>
lapic[index] = value;
80102a6b: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax)
80102a72: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102a75: 8b 40 20 mov 0x20(%eax),%eax
;
// Enable interrupts on the APIC (but not on the processor).
lapicw(TPR, 0);
}
80102a78: 5d pop %ebp
80102a79: c3 ret
80102a7a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
lapic[index] = value;
80102a80: c7 80 40 03 00 00 00 movl $0x10000,0x340(%eax)
80102a87: 00 01 00
lapic[ID]; // wait for write to finish, by reading
80102a8a: 8b 50 20 mov 0x20(%eax),%edx
80102a8d: e9 77 ff ff ff jmp 80102a09 <lapicinit+0x69>
80102a92: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102a99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102aa0 <lapicid>:
int
lapicid(void)
{
if (!lapic)
80102aa0: 8b 15 3c 39 11 80 mov 0x8011393c,%edx
{
80102aa6: 55 push %ebp
80102aa7: 31 c0 xor %eax,%eax
80102aa9: 89 e5 mov %esp,%ebp
if (!lapic)
80102aab: 85 d2 test %edx,%edx
80102aad: 74 06 je 80102ab5 <lapicid+0x15>
return 0;
return lapic[ID] >> 24;
80102aaf: 8b 42 20 mov 0x20(%edx),%eax
80102ab2: c1 e8 18 shr $0x18,%eax
}
80102ab5: 5d pop %ebp
80102ab6: c3 ret
80102ab7: 89 f6 mov %esi,%esi
80102ab9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102ac0 <lapiceoi>:
// Acknowledge interrupt.
void
lapiceoi(void)
{
if(lapic)
80102ac0: a1 3c 39 11 80 mov 0x8011393c,%eax
{
80102ac5: 55 push %ebp
80102ac6: 89 e5 mov %esp,%ebp
if(lapic)
80102ac8: 85 c0 test %eax,%eax
80102aca: 74 0d je 80102ad9 <lapiceoi+0x19>
lapic[index] = value;
80102acc: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
80102ad3: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102ad6: 8b 40 20 mov 0x20(%eax),%eax
lapicw(EOI, 0);
}
80102ad9: 5d pop %ebp
80102ada: c3 ret
80102adb: 90 nop
80102adc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102ae0 <microdelay>:
// Spin for a given number of microseconds.
// On real hardware would want to tune this dynamically.
void
microdelay(int us)
{
80102ae0: 55 push %ebp
80102ae1: 89 e5 mov %esp,%ebp
}
80102ae3: 5d pop %ebp
80102ae4: c3 ret
80102ae5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102ae9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102af0 <lapicstartap>:
// Start additional processor running entry code at addr.
// See Appendix B of MultiProcessor Specification.
void
lapicstartap(uchar apicid, uint addr)
{
80102af0: 55 push %ebp
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102af1: b8 0f 00 00 00 mov $0xf,%eax
80102af6: ba 70 00 00 00 mov $0x70,%edx
80102afb: 89 e5 mov %esp,%ebp
80102afd: 53 push %ebx
80102afe: 8b 4d 0c mov 0xc(%ebp),%ecx
80102b01: 8b 5d 08 mov 0x8(%ebp),%ebx
80102b04: ee out %al,(%dx)
80102b05: b8 0a 00 00 00 mov $0xa,%eax
80102b0a: ba 71 00 00 00 mov $0x71,%edx
80102b0f: 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;
80102b10: 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);
80102b12: c1 e3 18 shl $0x18,%ebx
wrv[0] = 0;
80102b15: 66 a3 67 04 00 80 mov %ax,0x80000467
wrv[1] = addr >> 4;
80102b1b: 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));
80102b1d: c1 e9 0c shr $0xc,%ecx
wrv[1] = addr >> 4;
80102b20: c1 e8 04 shr $0x4,%eax
lapicw(ICRHI, apicid<<24);
80102b23: 89 da mov %ebx,%edx
lapicw(ICRLO, STARTUP | (addr>>12));
80102b25: 80 cd 06 or $0x6,%ch
wrv[1] = addr >> 4;
80102b28: 66 a3 69 04 00 80 mov %ax,0x80000469
lapic[index] = value;
80102b2e: a1 3c 39 11 80 mov 0x8011393c,%eax
80102b33: 89 98 10 03 00 00 mov %ebx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
80102b39: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
80102b3c: c7 80 00 03 00 00 00 movl $0xc500,0x300(%eax)
80102b43: c5 00 00
lapic[ID]; // wait for write to finish, by reading
80102b46: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
80102b49: c7 80 00 03 00 00 00 movl $0x8500,0x300(%eax)
80102b50: 85 00 00
lapic[ID]; // wait for write to finish, by reading
80102b53: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
80102b56: 89 90 10 03 00 00 mov %edx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
80102b5c: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
80102b5f: 89 88 00 03 00 00 mov %ecx,0x300(%eax)
lapic[ID]; // wait for write to finish, by reading
80102b65: 8b 58 20 mov 0x20(%eax),%ebx
lapic[index] = value;
80102b68: 89 90 10 03 00 00 mov %edx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
80102b6e: 8b 50 20 mov 0x20(%eax),%edx
lapic[index] = value;
80102b71: 89 88 00 03 00 00 mov %ecx,0x300(%eax)
lapic[ID]; // wait for write to finish, by reading
80102b77: 8b 40 20 mov 0x20(%eax),%eax
microdelay(200);
}
}
80102b7a: 5b pop %ebx
80102b7b: 5d pop %ebp
80102b7c: c3 ret
80102b7d: 8d 76 00 lea 0x0(%esi),%esi
80102b80 <cmostime>:
}
// qemu seems to use 24-hour GWT and the values are BCD encoded
void
cmostime(struct rtcdate *r)
{
80102b80: 55 push %ebp
80102b81: b8 0b 00 00 00 mov $0xb,%eax
80102b86: ba 70 00 00 00 mov $0x70,%edx
80102b8b: 89 e5 mov %esp,%ebp
80102b8d: 57 push %edi
80102b8e: 56 push %esi
80102b8f: 53 push %ebx
80102b90: 83 ec 4c sub $0x4c,%esp
80102b93: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102b94: ba 71 00 00 00 mov $0x71,%edx
80102b99: ec in (%dx),%al
80102b9a: 83 e0 04 and $0x4,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102b9d: bb 70 00 00 00 mov $0x70,%ebx
80102ba2: 88 45 b3 mov %al,-0x4d(%ebp)
80102ba5: 8d 76 00 lea 0x0(%esi),%esi
80102ba8: 31 c0 xor %eax,%eax
80102baa: 89 da mov %ebx,%edx
80102bac: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102bad: b9 71 00 00 00 mov $0x71,%ecx
80102bb2: 89 ca mov %ecx,%edx
80102bb4: ec in (%dx),%al
80102bb5: 88 45 b7 mov %al,-0x49(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102bb8: 89 da mov %ebx,%edx
80102bba: b8 02 00 00 00 mov $0x2,%eax
80102bbf: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102bc0: 89 ca mov %ecx,%edx
80102bc2: ec in (%dx),%al
80102bc3: 88 45 b6 mov %al,-0x4a(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102bc6: 89 da mov %ebx,%edx
80102bc8: b8 04 00 00 00 mov $0x4,%eax
80102bcd: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102bce: 89 ca mov %ecx,%edx
80102bd0: ec in (%dx),%al
80102bd1: 88 45 b5 mov %al,-0x4b(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102bd4: 89 da mov %ebx,%edx
80102bd6: b8 07 00 00 00 mov $0x7,%eax
80102bdb: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102bdc: 89 ca mov %ecx,%edx
80102bde: ec in (%dx),%al
80102bdf: 88 45 b4 mov %al,-0x4c(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102be2: 89 da mov %ebx,%edx
80102be4: b8 08 00 00 00 mov $0x8,%eax
80102be9: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102bea: 89 ca mov %ecx,%edx
80102bec: ec in (%dx),%al
80102bed: 89 c7 mov %eax,%edi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102bef: 89 da mov %ebx,%edx
80102bf1: b8 09 00 00 00 mov $0x9,%eax
80102bf6: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102bf7: 89 ca mov %ecx,%edx
80102bf9: ec in (%dx),%al
80102bfa: 89 c6 mov %eax,%esi
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102bfc: 89 da mov %ebx,%edx
80102bfe: b8 0a 00 00 00 mov $0xa,%eax
80102c03: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102c04: 89 ca mov %ecx,%edx
80102c06: 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)
80102c07: 84 c0 test %al,%al
80102c09: 78 9d js 80102ba8 <cmostime+0x28>
return inb(CMOS_RETURN);
80102c0b: 0f b6 45 b7 movzbl -0x49(%ebp),%eax
80102c0f: 89 fa mov %edi,%edx
80102c11: 0f b6 fa movzbl %dl,%edi
80102c14: 89 f2 mov %esi,%edx
80102c16: 0f b6 f2 movzbl %dl,%esi
80102c19: 89 7d c8 mov %edi,-0x38(%ebp)
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102c1c: 89 da mov %ebx,%edx
80102c1e: 89 75 cc mov %esi,-0x34(%ebp)
80102c21: 89 45 b8 mov %eax,-0x48(%ebp)
80102c24: 0f b6 45 b6 movzbl -0x4a(%ebp),%eax
80102c28: 89 45 bc mov %eax,-0x44(%ebp)
80102c2b: 0f b6 45 b5 movzbl -0x4b(%ebp),%eax
80102c2f: 89 45 c0 mov %eax,-0x40(%ebp)
80102c32: 0f b6 45 b4 movzbl -0x4c(%ebp),%eax
80102c36: 89 45 c4 mov %eax,-0x3c(%ebp)
80102c39: 31 c0 xor %eax,%eax
80102c3b: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102c3c: 89 ca mov %ecx,%edx
80102c3e: ec in (%dx),%al
80102c3f: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102c42: 89 da mov %ebx,%edx
80102c44: 89 45 d0 mov %eax,-0x30(%ebp)
80102c47: b8 02 00 00 00 mov $0x2,%eax
80102c4c: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102c4d: 89 ca mov %ecx,%edx
80102c4f: ec in (%dx),%al
80102c50: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102c53: 89 da mov %ebx,%edx
80102c55: 89 45 d4 mov %eax,-0x2c(%ebp)
80102c58: b8 04 00 00 00 mov $0x4,%eax
80102c5d: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102c5e: 89 ca mov %ecx,%edx
80102c60: ec in (%dx),%al
80102c61: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102c64: 89 da mov %ebx,%edx
80102c66: 89 45 d8 mov %eax,-0x28(%ebp)
80102c69: b8 07 00 00 00 mov $0x7,%eax
80102c6e: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102c6f: 89 ca mov %ecx,%edx
80102c71: ec in (%dx),%al
80102c72: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102c75: 89 da mov %ebx,%edx
80102c77: 89 45 dc mov %eax,-0x24(%ebp)
80102c7a: b8 08 00 00 00 mov $0x8,%eax
80102c7f: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102c80: 89 ca mov %ecx,%edx
80102c82: ec in (%dx),%al
80102c83: 0f b6 c0 movzbl %al,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102c86: 89 da mov %ebx,%edx
80102c88: 89 45 e0 mov %eax,-0x20(%ebp)
80102c8b: b8 09 00 00 00 mov $0x9,%eax
80102c90: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102c91: 89 ca mov %ecx,%edx
80102c93: ec in (%dx),%al
80102c94: 0f b6 c0 movzbl %al,%eax
continue;
fill_rtcdate(&t2);
if(memcmp(&t1, &t2, sizeof(t1)) == 0)
80102c97: 83 ec 04 sub $0x4,%esp
return inb(CMOS_RETURN);
80102c9a: 89 45 e4 mov %eax,-0x1c(%ebp)
if(memcmp(&t1, &t2, sizeof(t1)) == 0)
80102c9d: 8d 45 d0 lea -0x30(%ebp),%eax
80102ca0: 6a 18 push $0x18
80102ca2: 50 push %eax
80102ca3: 8d 45 b8 lea -0x48(%ebp),%eax
80102ca6: 50 push %eax
80102ca7: e8 84 25 00 00 call 80105230 <memcmp>
80102cac: 83 c4 10 add $0x10,%esp
80102caf: 85 c0 test %eax,%eax
80102cb1: 0f 85 f1 fe ff ff jne 80102ba8 <cmostime+0x28>
break;
}
// convert
if(bcd) {
80102cb7: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
80102cbb: 75 78 jne 80102d35 <cmostime+0x1b5>
#define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf))
CONV(second);
80102cbd: 8b 45 b8 mov -0x48(%ebp),%eax
80102cc0: 89 c2 mov %eax,%edx
80102cc2: 83 e0 0f and $0xf,%eax
80102cc5: c1 ea 04 shr $0x4,%edx
80102cc8: 8d 14 92 lea (%edx,%edx,4),%edx
80102ccb: 8d 04 50 lea (%eax,%edx,2),%eax
80102cce: 89 45 b8 mov %eax,-0x48(%ebp)
CONV(minute);
80102cd1: 8b 45 bc mov -0x44(%ebp),%eax
80102cd4: 89 c2 mov %eax,%edx
80102cd6: 83 e0 0f and $0xf,%eax
80102cd9: c1 ea 04 shr $0x4,%edx
80102cdc: 8d 14 92 lea (%edx,%edx,4),%edx
80102cdf: 8d 04 50 lea (%eax,%edx,2),%eax
80102ce2: 89 45 bc mov %eax,-0x44(%ebp)
CONV(hour );
80102ce5: 8b 45 c0 mov -0x40(%ebp),%eax
80102ce8: 89 c2 mov %eax,%edx
80102cea: 83 e0 0f and $0xf,%eax
80102ced: c1 ea 04 shr $0x4,%edx
80102cf0: 8d 14 92 lea (%edx,%edx,4),%edx
80102cf3: 8d 04 50 lea (%eax,%edx,2),%eax
80102cf6: 89 45 c0 mov %eax,-0x40(%ebp)
CONV(day );
80102cf9: 8b 45 c4 mov -0x3c(%ebp),%eax
80102cfc: 89 c2 mov %eax,%edx
80102cfe: 83 e0 0f and $0xf,%eax
80102d01: c1 ea 04 shr $0x4,%edx
80102d04: 8d 14 92 lea (%edx,%edx,4),%edx
80102d07: 8d 04 50 lea (%eax,%edx,2),%eax
80102d0a: 89 45 c4 mov %eax,-0x3c(%ebp)
CONV(month );
80102d0d: 8b 45 c8 mov -0x38(%ebp),%eax
80102d10: 89 c2 mov %eax,%edx
80102d12: 83 e0 0f and $0xf,%eax
80102d15: c1 ea 04 shr $0x4,%edx
80102d18: 8d 14 92 lea (%edx,%edx,4),%edx
80102d1b: 8d 04 50 lea (%eax,%edx,2),%eax
80102d1e: 89 45 c8 mov %eax,-0x38(%ebp)
CONV(year );
80102d21: 8b 45 cc mov -0x34(%ebp),%eax
80102d24: 89 c2 mov %eax,%edx
80102d26: 83 e0 0f and $0xf,%eax
80102d29: c1 ea 04 shr $0x4,%edx
80102d2c: 8d 14 92 lea (%edx,%edx,4),%edx
80102d2f: 8d 04 50 lea (%eax,%edx,2),%eax
80102d32: 89 45 cc mov %eax,-0x34(%ebp)
#undef CONV
}
*r = t1;
80102d35: 8b 75 08 mov 0x8(%ebp),%esi
80102d38: 8b 45 b8 mov -0x48(%ebp),%eax
80102d3b: 89 06 mov %eax,(%esi)
80102d3d: 8b 45 bc mov -0x44(%ebp),%eax
80102d40: 89 46 04 mov %eax,0x4(%esi)
80102d43: 8b 45 c0 mov -0x40(%ebp),%eax
80102d46: 89 46 08 mov %eax,0x8(%esi)
80102d49: 8b 45 c4 mov -0x3c(%ebp),%eax
80102d4c: 89 46 0c mov %eax,0xc(%esi)
80102d4f: 8b 45 c8 mov -0x38(%ebp),%eax
80102d52: 89 46 10 mov %eax,0x10(%esi)
80102d55: 8b 45 cc mov -0x34(%ebp),%eax
80102d58: 89 46 14 mov %eax,0x14(%esi)
r->year += 2000;
80102d5b: 81 46 14 d0 07 00 00 addl $0x7d0,0x14(%esi)
}
80102d62: 8d 65 f4 lea -0xc(%ebp),%esp
80102d65: 5b pop %ebx
80102d66: 5e pop %esi
80102d67: 5f pop %edi
80102d68: 5d pop %ebp
80102d69: c3 ret
80102d6a: 66 90 xchg %ax,%ax
80102d6c: 66 90 xchg %ax,%ax
80102d6e: 66 90 xchg %ax,%ax
80102d70 <install_trans>:
static void
install_trans(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80102d70: 8b 0d 88 39 11 80 mov 0x80113988,%ecx
80102d76: 85 c9 test %ecx,%ecx
80102d78: 0f 8e 8a 00 00 00 jle 80102e08 <install_trans+0x98>
{
80102d7e: 55 push %ebp
80102d7f: 89 e5 mov %esp,%ebp
80102d81: 57 push %edi
80102d82: 56 push %esi
80102d83: 53 push %ebx
for (tail = 0; tail < log.lh.n; tail++) {
80102d84: 31 db xor %ebx,%ebx
{
80102d86: 83 ec 0c sub $0xc,%esp
80102d89: 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
80102d90: a1 74 39 11 80 mov 0x80113974,%eax
80102d95: 83 ec 08 sub $0x8,%esp
80102d98: 01 d8 add %ebx,%eax
80102d9a: 83 c0 01 add $0x1,%eax
80102d9d: 50 push %eax
80102d9e: ff 35 84 39 11 80 pushl 0x80113984
80102da4: e8 27 d3 ff ff call 801000d0 <bread>
80102da9: 89 c7 mov %eax,%edi
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102dab: 58 pop %eax
80102dac: 5a pop %edx
80102dad: ff 34 9d 8c 39 11 80 pushl -0x7feec674(,%ebx,4)
80102db4: ff 35 84 39 11 80 pushl 0x80113984
for (tail = 0; tail < log.lh.n; tail++) {
80102dba: 83 c3 01 add $0x1,%ebx
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
80102dbd: e8 0e d3 ff ff call 801000d0 <bread>
80102dc2: 89 c6 mov %eax,%esi
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
80102dc4: 8d 47 5c lea 0x5c(%edi),%eax
80102dc7: 83 c4 0c add $0xc,%esp
80102dca: 68 00 02 00 00 push $0x200
80102dcf: 50 push %eax
80102dd0: 8d 46 5c lea 0x5c(%esi),%eax
80102dd3: 50 push %eax
80102dd4: e8 b7 24 00 00 call 80105290 <memmove>
bwrite(dbuf); // write dst to disk
80102dd9: 89 34 24 mov %esi,(%esp)
80102ddc: e8 bf d3 ff ff call 801001a0 <bwrite>
brelse(lbuf);
80102de1: 89 3c 24 mov %edi,(%esp)
80102de4: e8 f7 d3 ff ff call 801001e0 <brelse>
brelse(dbuf);
80102de9: 89 34 24 mov %esi,(%esp)
80102dec: e8 ef d3 ff ff call 801001e0 <brelse>
for (tail = 0; tail < log.lh.n; tail++) {
80102df1: 83 c4 10 add $0x10,%esp
80102df4: 39 1d 88 39 11 80 cmp %ebx,0x80113988
80102dfa: 7f 94 jg 80102d90 <install_trans+0x20>
}
}
80102dfc: 8d 65 f4 lea -0xc(%ebp),%esp
80102dff: 5b pop %ebx
80102e00: 5e pop %esi
80102e01: 5f pop %edi
80102e02: 5d pop %ebp
80102e03: c3 ret
80102e04: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102e08: f3 c3 repz ret
80102e0a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102e10 <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)
{
80102e10: 55 push %ebp
80102e11: 89 e5 mov %esp,%ebp
80102e13: 56 push %esi
80102e14: 53 push %ebx
struct buf *buf = bread(log.dev, log.start);
80102e15: 83 ec 08 sub $0x8,%esp
80102e18: ff 35 74 39 11 80 pushl 0x80113974
80102e1e: ff 35 84 39 11 80 pushl 0x80113984
80102e24: e8 a7 d2 ff ff call 801000d0 <bread>
struct logheader *hb = (struct logheader *) (buf->data);
int i;
hb->n = log.lh.n;
80102e29: 8b 1d 88 39 11 80 mov 0x80113988,%ebx
for (i = 0; i < log.lh.n; i++) {
80102e2f: 83 c4 10 add $0x10,%esp
struct buf *buf = bread(log.dev, log.start);
80102e32: 89 c6 mov %eax,%esi
for (i = 0; i < log.lh.n; i++) {
80102e34: 85 db test %ebx,%ebx
hb->n = log.lh.n;
80102e36: 89 58 5c mov %ebx,0x5c(%eax)
for (i = 0; i < log.lh.n; i++) {
80102e39: 7e 16 jle 80102e51 <write_head+0x41>
80102e3b: c1 e3 02 shl $0x2,%ebx
80102e3e: 31 d2 xor %edx,%edx
hb->block[i] = log.lh.block[i];
80102e40: 8b 8a 8c 39 11 80 mov -0x7feec674(%edx),%ecx
80102e46: 89 4c 16 60 mov %ecx,0x60(%esi,%edx,1)
80102e4a: 83 c2 04 add $0x4,%edx
for (i = 0; i < log.lh.n; i++) {
80102e4d: 39 da cmp %ebx,%edx
80102e4f: 75 ef jne 80102e40 <write_head+0x30>
}
bwrite(buf);
80102e51: 83 ec 0c sub $0xc,%esp
80102e54: 56 push %esi
80102e55: e8 46 d3 ff ff call 801001a0 <bwrite>
brelse(buf);
80102e5a: 89 34 24 mov %esi,(%esp)
80102e5d: e8 7e d3 ff ff call 801001e0 <brelse>
}
80102e62: 83 c4 10 add $0x10,%esp
80102e65: 8d 65 f8 lea -0x8(%ebp),%esp
80102e68: 5b pop %ebx
80102e69: 5e pop %esi
80102e6a: 5d pop %ebp
80102e6b: c3 ret
80102e6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102e70 <initlog>:
{
80102e70: 55 push %ebp
80102e71: 89 e5 mov %esp,%ebp
80102e73: 53 push %ebx
80102e74: 83 ec 2c sub $0x2c,%esp
80102e77: 8b 5d 08 mov 0x8(%ebp),%ebx
initlock(&log.lock, "log");
80102e7a: 68 00 82 10 80 push $0x80108200
80102e7f: 68 40 39 11 80 push $0x80113940
80102e84: e8 07 21 00 00 call 80104f90 <initlock>
readsb(dev, &sb);
80102e89: 58 pop %eax
80102e8a: 8d 45 dc lea -0x24(%ebp),%eax
80102e8d: 5a pop %edx
80102e8e: 50 push %eax
80102e8f: 53 push %ebx
80102e90: e8 9b e8 ff ff call 80101730 <readsb>
log.size = sb.nlog;
80102e95: 8b 55 e8 mov -0x18(%ebp),%edx
log.start = sb.logstart;
80102e98: 8b 45 ec mov -0x14(%ebp),%eax
struct buf *buf = bread(log.dev, log.start);
80102e9b: 59 pop %ecx
log.dev = dev;
80102e9c: 89 1d 84 39 11 80 mov %ebx,0x80113984
log.size = sb.nlog;
80102ea2: 89 15 78 39 11 80 mov %edx,0x80113978
log.start = sb.logstart;
80102ea8: a3 74 39 11 80 mov %eax,0x80113974
struct buf *buf = bread(log.dev, log.start);
80102ead: 5a pop %edx
80102eae: 50 push %eax
80102eaf: 53 push %ebx
80102eb0: e8 1b d2 ff ff call 801000d0 <bread>
log.lh.n = lh->n;
80102eb5: 8b 58 5c mov 0x5c(%eax),%ebx
for (i = 0; i < log.lh.n; i++) {
80102eb8: 83 c4 10 add $0x10,%esp
80102ebb: 85 db test %ebx,%ebx
log.lh.n = lh->n;
80102ebd: 89 1d 88 39 11 80 mov %ebx,0x80113988
for (i = 0; i < log.lh.n; i++) {
80102ec3: 7e 1c jle 80102ee1 <initlog+0x71>
80102ec5: c1 e3 02 shl $0x2,%ebx
80102ec8: 31 d2 xor %edx,%edx
80102eca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
log.lh.block[i] = lh->block[i];
80102ed0: 8b 4c 10 60 mov 0x60(%eax,%edx,1),%ecx
80102ed4: 83 c2 04 add $0x4,%edx
80102ed7: 89 8a 88 39 11 80 mov %ecx,-0x7feec678(%edx)
for (i = 0; i < log.lh.n; i++) {
80102edd: 39 d3 cmp %edx,%ebx
80102edf: 75 ef jne 80102ed0 <initlog+0x60>
brelse(buf);
80102ee1: 83 ec 0c sub $0xc,%esp
80102ee4: 50 push %eax
80102ee5: e8 f6 d2 ff ff call 801001e0 <brelse>
static void
recover_from_log(void)
{
read_head();
install_trans(); // if committed, copy from log to disk
80102eea: e8 81 fe ff ff call 80102d70 <install_trans>
log.lh.n = 0;
80102eef: c7 05 88 39 11 80 00 movl $0x0,0x80113988
80102ef6: 00 00 00
write_head(); // clear the log
80102ef9: e8 12 ff ff ff call 80102e10 <write_head>
}
80102efe: 83 c4 10 add $0x10,%esp
80102f01: 8b 5d fc mov -0x4(%ebp),%ebx
80102f04: c9 leave
80102f05: c3 ret
80102f06: 8d 76 00 lea 0x0(%esi),%esi
80102f09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102f10 <begin_op>:
}
// called at the start of each FS system call.
void
begin_op(void)
{
80102f10: 55 push %ebp
80102f11: 89 e5 mov %esp,%ebp
80102f13: 83 ec 14 sub $0x14,%esp
acquire(&log.lock);
80102f16: 68 40 39 11 80 push $0x80113940
80102f1b: e8 b0 21 00 00 call 801050d0 <acquire>
80102f20: 83 c4 10 add $0x10,%esp
80102f23: eb 18 jmp 80102f3d <begin_op+0x2d>
80102f25: 8d 76 00 lea 0x0(%esi),%esi
while(1){
if(log.committing){
sleep(&log, &log.lock);
80102f28: 83 ec 08 sub $0x8,%esp
80102f2b: 68 40 39 11 80 push $0x80113940
80102f30: 68 40 39 11 80 push $0x80113940
80102f35: e8 66 11 00 00 call 801040a0 <sleep>
80102f3a: 83 c4 10 add $0x10,%esp
if(log.committing){
80102f3d: a1 80 39 11 80 mov 0x80113980,%eax
80102f42: 85 c0 test %eax,%eax
80102f44: 75 e2 jne 80102f28 <begin_op+0x18>
} else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){
80102f46: a1 7c 39 11 80 mov 0x8011397c,%eax
80102f4b: 8b 15 88 39 11 80 mov 0x80113988,%edx
80102f51: 83 c0 01 add $0x1,%eax
80102f54: 8d 0c 80 lea (%eax,%eax,4),%ecx
80102f57: 8d 14 4a lea (%edx,%ecx,2),%edx
80102f5a: 83 fa 1e cmp $0x1e,%edx
80102f5d: 7f c9 jg 80102f28 <begin_op+0x18>
// this op might exhaust log space; wait for commit.
sleep(&log, &log.lock);
} else {
log.outstanding += 1;
release(&log.lock);
80102f5f: 83 ec 0c sub $0xc,%esp
log.outstanding += 1;
80102f62: a3 7c 39 11 80 mov %eax,0x8011397c
release(&log.lock);
80102f67: 68 40 39 11 80 push $0x80113940
80102f6c: e8 1f 22 00 00 call 80105190 <release>
break;
}
}
}
80102f71: 83 c4 10 add $0x10,%esp
80102f74: c9 leave
80102f75: c3 ret
80102f76: 8d 76 00 lea 0x0(%esi),%esi
80102f79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102f80 <end_op>:
// called at the end of each FS system call.
// commits if this was the last outstanding operation.
void
end_op(void)
{
80102f80: 55 push %ebp
80102f81: 89 e5 mov %esp,%ebp
80102f83: 57 push %edi
80102f84: 56 push %esi
80102f85: 53 push %ebx
80102f86: 83 ec 18 sub $0x18,%esp
int do_commit = 0;
acquire(&log.lock);
80102f89: 68 40 39 11 80 push $0x80113940
80102f8e: e8 3d 21 00 00 call 801050d0 <acquire>
log.outstanding -= 1;
80102f93: a1 7c 39 11 80 mov 0x8011397c,%eax
if(log.committing)
80102f98: 8b 35 80 39 11 80 mov 0x80113980,%esi
80102f9e: 83 c4 10 add $0x10,%esp
log.outstanding -= 1;
80102fa1: 8d 58 ff lea -0x1(%eax),%ebx
if(log.committing)
80102fa4: 85 f6 test %esi,%esi
log.outstanding -= 1;
80102fa6: 89 1d 7c 39 11 80 mov %ebx,0x8011397c
if(log.committing)
80102fac: 0f 85 1a 01 00 00 jne 801030cc <end_op+0x14c>
panic("log.committing");
if(log.outstanding == 0){
80102fb2: 85 db test %ebx,%ebx
80102fb4: 0f 85 ee 00 00 00 jne 801030a8 <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);
80102fba: 83 ec 0c sub $0xc,%esp
log.committing = 1;
80102fbd: c7 05 80 39 11 80 01 movl $0x1,0x80113980
80102fc4: 00 00 00
release(&log.lock);
80102fc7: 68 40 39 11 80 push $0x80113940
80102fcc: e8 bf 21 00 00 call 80105190 <release>
}
static void
commit()
{
if (log.lh.n > 0) {
80102fd1: 8b 0d 88 39 11 80 mov 0x80113988,%ecx
80102fd7: 83 c4 10 add $0x10,%esp
80102fda: 85 c9 test %ecx,%ecx
80102fdc: 0f 8e 85 00 00 00 jle 80103067 <end_op+0xe7>
struct buf *to = bread(log.dev, log.start+tail+1); // log block
80102fe2: a1 74 39 11 80 mov 0x80113974,%eax
80102fe7: 83 ec 08 sub $0x8,%esp
80102fea: 01 d8 add %ebx,%eax
80102fec: 83 c0 01 add $0x1,%eax
80102fef: 50 push %eax
80102ff0: ff 35 84 39 11 80 pushl 0x80113984
80102ff6: e8 d5 d0 ff ff call 801000d0 <bread>
80102ffb: 89 c6 mov %eax,%esi
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102ffd: 58 pop %eax
80102ffe: 5a pop %edx
80102fff: ff 34 9d 8c 39 11 80 pushl -0x7feec674(,%ebx,4)
80103006: ff 35 84 39 11 80 pushl 0x80113984
for (tail = 0; tail < log.lh.n; tail++) {
8010300c: 83 c3 01 add $0x1,%ebx
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
8010300f: e8 bc d0 ff ff call 801000d0 <bread>
80103014: 89 c7 mov %eax,%edi
memmove(to->data, from->data, BSIZE);
80103016: 8d 40 5c lea 0x5c(%eax),%eax
80103019: 83 c4 0c add $0xc,%esp
8010301c: 68 00 02 00 00 push $0x200
80103021: 50 push %eax
80103022: 8d 46 5c lea 0x5c(%esi),%eax
80103025: 50 push %eax
80103026: e8 65 22 00 00 call 80105290 <memmove>
bwrite(to); // write the log
8010302b: 89 34 24 mov %esi,(%esp)
8010302e: e8 6d d1 ff ff call 801001a0 <bwrite>
brelse(from);
80103033: 89 3c 24 mov %edi,(%esp)
80103036: e8 a5 d1 ff ff call 801001e0 <brelse>
brelse(to);
8010303b: 89 34 24 mov %esi,(%esp)
8010303e: e8 9d d1 ff ff call 801001e0 <brelse>
for (tail = 0; tail < log.lh.n; tail++) {
80103043: 83 c4 10 add $0x10,%esp
80103046: 3b 1d 88 39 11 80 cmp 0x80113988,%ebx
8010304c: 7c 94 jl 80102fe2 <end_op+0x62>
write_log(); // Write modified blocks from cache to log
write_head(); // Write header to disk -- the real commit
8010304e: e8 bd fd ff ff call 80102e10 <write_head>
install_trans(); // Now install writes to home locations
80103053: e8 18 fd ff ff call 80102d70 <install_trans>
log.lh.n = 0;
80103058: c7 05 88 39 11 80 00 movl $0x0,0x80113988
8010305f: 00 00 00
write_head(); // Erase the transaction from the log
80103062: e8 a9 fd ff ff call 80102e10 <write_head>
acquire(&log.lock);
80103067: 83 ec 0c sub $0xc,%esp
8010306a: 68 40 39 11 80 push $0x80113940
8010306f: e8 5c 20 00 00 call 801050d0 <acquire>
wakeup(&log);
80103074: c7 04 24 40 39 11 80 movl $0x80113940,(%esp)
log.committing = 0;
8010307b: c7 05 80 39 11 80 00 movl $0x0,0x80113980
80103082: 00 00 00
wakeup(&log);
80103085: e8 d6 11 00 00 call 80104260 <wakeup>
release(&log.lock);
8010308a: c7 04 24 40 39 11 80 movl $0x80113940,(%esp)
80103091: e8 fa 20 00 00 call 80105190 <release>
80103096: 83 c4 10 add $0x10,%esp
}
80103099: 8d 65 f4 lea -0xc(%ebp),%esp
8010309c: 5b pop %ebx
8010309d: 5e pop %esi
8010309e: 5f pop %edi
8010309f: 5d pop %ebp
801030a0: c3 ret
801030a1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
wakeup(&log);
801030a8: 83 ec 0c sub $0xc,%esp
801030ab: 68 40 39 11 80 push $0x80113940
801030b0: e8 ab 11 00 00 call 80104260 <wakeup>
release(&log.lock);
801030b5: c7 04 24 40 39 11 80 movl $0x80113940,(%esp)
801030bc: e8 cf 20 00 00 call 80105190 <release>
801030c1: 83 c4 10 add $0x10,%esp
}
801030c4: 8d 65 f4 lea -0xc(%ebp),%esp
801030c7: 5b pop %ebx
801030c8: 5e pop %esi
801030c9: 5f pop %edi
801030ca: 5d pop %ebp
801030cb: c3 ret
panic("log.committing");
801030cc: 83 ec 0c sub $0xc,%esp
801030cf: 68 04 82 10 80 push $0x80108204
801030d4: e8 b7 d2 ff ff call 80100390 <panic>
801030d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801030e0 <log_write>:
// modify bp->data[]
// log_write(bp)
// brelse(bp)
void
log_write(struct buf *b)
{
801030e0: 55 push %ebp
801030e1: 89 e5 mov %esp,%ebp
801030e3: 53 push %ebx
801030e4: 83 ec 04 sub $0x4,%esp
int i;
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
801030e7: 8b 15 88 39 11 80 mov 0x80113988,%edx
{
801030ed: 8b 5d 08 mov 0x8(%ebp),%ebx
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
801030f0: 83 fa 1d cmp $0x1d,%edx
801030f3: 0f 8f 9d 00 00 00 jg 80103196 <log_write+0xb6>
801030f9: a1 78 39 11 80 mov 0x80113978,%eax
801030fe: 83 e8 01 sub $0x1,%eax
80103101: 39 c2 cmp %eax,%edx
80103103: 0f 8d 8d 00 00 00 jge 80103196 <log_write+0xb6>
panic("too big a transaction");
if (log.outstanding < 1)
80103109: a1 7c 39 11 80 mov 0x8011397c,%eax
8010310e: 85 c0 test %eax,%eax
80103110: 0f 8e 8d 00 00 00 jle 801031a3 <log_write+0xc3>
panic("log_write outside of trans");
acquire(&log.lock);
80103116: 83 ec 0c sub $0xc,%esp
80103119: 68 40 39 11 80 push $0x80113940
8010311e: e8 ad 1f 00 00 call 801050d0 <acquire>
for (i = 0; i < log.lh.n; i++) {
80103123: 8b 0d 88 39 11 80 mov 0x80113988,%ecx
80103129: 83 c4 10 add $0x10,%esp
8010312c: 83 f9 00 cmp $0x0,%ecx
8010312f: 7e 57 jle 80103188 <log_write+0xa8>
if (log.lh.block[i] == b->blockno) // log absorbtion
80103131: 8b 53 08 mov 0x8(%ebx),%edx
for (i = 0; i < log.lh.n; i++) {
80103134: 31 c0 xor %eax,%eax
if (log.lh.block[i] == b->blockno) // log absorbtion
80103136: 3b 15 8c 39 11 80 cmp 0x8011398c,%edx
8010313c: 75 0b jne 80103149 <log_write+0x69>
8010313e: eb 38 jmp 80103178 <log_write+0x98>
80103140: 39 14 85 8c 39 11 80 cmp %edx,-0x7feec674(,%eax,4)
80103147: 74 2f je 80103178 <log_write+0x98>
for (i = 0; i < log.lh.n; i++) {
80103149: 83 c0 01 add $0x1,%eax
8010314c: 39 c1 cmp %eax,%ecx
8010314e: 75 f0 jne 80103140 <log_write+0x60>
break;
}
log.lh.block[i] = b->blockno;
80103150: 89 14 85 8c 39 11 80 mov %edx,-0x7feec674(,%eax,4)
if (i == log.lh.n)
log.lh.n++;
80103157: 83 c0 01 add $0x1,%eax
8010315a: a3 88 39 11 80 mov %eax,0x80113988
b->flags |= B_DIRTY; // prevent eviction
8010315f: 83 0b 04 orl $0x4,(%ebx)
release(&log.lock);
80103162: c7 45 08 40 39 11 80 movl $0x80113940,0x8(%ebp)
}
80103169: 8b 5d fc mov -0x4(%ebp),%ebx
8010316c: c9 leave
release(&log.lock);
8010316d: e9 1e 20 00 00 jmp 80105190 <release>
80103172: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
log.lh.block[i] = b->blockno;
80103178: 89 14 85 8c 39 11 80 mov %edx,-0x7feec674(,%eax,4)
8010317f: eb de jmp 8010315f <log_write+0x7f>
80103181: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103188: 8b 43 08 mov 0x8(%ebx),%eax
8010318b: a3 8c 39 11 80 mov %eax,0x8011398c
if (i == log.lh.n)
80103190: 75 cd jne 8010315f <log_write+0x7f>
80103192: 31 c0 xor %eax,%eax
80103194: eb c1 jmp 80103157 <log_write+0x77>
panic("too big a transaction");
80103196: 83 ec 0c sub $0xc,%esp
80103199: 68 13 82 10 80 push $0x80108213
8010319e: e8 ed d1 ff ff call 80100390 <panic>
panic("log_write outside of trans");
801031a3: 83 ec 0c sub $0xc,%esp
801031a6: 68 29 82 10 80 push $0x80108229
801031ab: e8 e0 d1 ff ff call 80100390 <panic>
801031b0 <mpmain>:
}
// Common CPU setup code.
static void
mpmain(void)
{
801031b0: 55 push %ebp
801031b1: 89 e5 mov %esp,%ebp
801031b3: 53 push %ebx
801031b4: 83 ec 04 sub $0x4,%esp
cprintf("cpu%d: starting %d\n", cpuid(), cpuid());
801031b7: e8 c4 09 00 00 call 80103b80 <cpuid>
801031bc: 89 c3 mov %eax,%ebx
801031be: e8 bd 09 00 00 call 80103b80 <cpuid>
801031c3: 83 ec 04 sub $0x4,%esp
801031c6: 53 push %ebx
801031c7: 50 push %eax
801031c8: 68 44 82 10 80 push $0x80108244
801031cd: e8 8e d4 ff ff call 80100660 <cprintf>
idtinit(); // load idt register
801031d2: e8 a9 33 00 00 call 80106580 <idtinit>
xchg(&(mycpu()->started), 1); // tell startothers() we're up
801031d7: e8 24 09 00 00 call 80103b00 <mycpu>
801031dc: 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" :
801031de: b8 01 00 00 00 mov $0x1,%eax
801031e3: f0 87 82 a0 00 00 00 lock xchg %eax,0xa0(%edx)
scheduler(); // start running processes
801031ea: e8 d1 1b 00 00 call 80104dc0 <scheduler>
801031ef: 90 nop
801031f0 <mpenter>:
{
801031f0: 55 push %ebp
801031f1: 89 e5 mov %esp,%ebp
801031f3: 83 ec 08 sub $0x8,%esp
switchkvm();
801031f6: e8 75 44 00 00 call 80107670 <switchkvm>
seginit();
801031fb: e8 e0 43 00 00 call 801075e0 <seginit>
lapicinit();
80103200: e8 9b f7 ff ff call 801029a0 <lapicinit>
mpmain();
80103205: e8 a6 ff ff ff call 801031b0 <mpmain>
8010320a: 66 90 xchg %ax,%ax
8010320c: 66 90 xchg %ax,%ax
8010320e: 66 90 xchg %ax,%ax
80103210 <main>:
{
80103210: 8d 4c 24 04 lea 0x4(%esp),%ecx
80103214: 83 e4 f0 and $0xfffffff0,%esp
80103217: ff 71 fc pushl -0x4(%ecx)
8010321a: 55 push %ebp
8010321b: 89 e5 mov %esp,%ebp
8010321d: 53 push %ebx
8010321e: 51 push %ecx
kinit1(end, P2V(4*1024*1024)); // phys page allocator
8010321f: 83 ec 08 sub $0x8,%esp
80103222: 68 00 00 40 80 push $0x80400000
80103227: 68 88 6d 11 80 push $0x80116d88
8010322c: e8 2f f5 ff ff call 80102760 <kinit1>
kvmalloc(); // kernel page table
80103231: e8 0a 49 00 00 call 80107b40 <kvmalloc>
mpinit(); // detect other processors
80103236: e8 75 01 00 00 call 801033b0 <mpinit>
lapicinit(); // interrupt controller
8010323b: e8 60 f7 ff ff call 801029a0 <lapicinit>
seginit(); // segment descriptors
80103240: e8 9b 43 00 00 call 801075e0 <seginit>
picinit(); // disable pic
80103245: e8 46 03 00 00 call 80103590 <picinit>
ioapicinit(); // another interrupt controller
8010324a: e8 41 f3 ff ff call 80102590 <ioapicinit>
consoleinit(); // console hardware
8010324f: e8 6c da ff ff call 80100cc0 <consoleinit>
uartinit(); // serial port
80103254: e8 57 36 00 00 call 801068b0 <uartinit>
pinit(); // process table
80103259: e8 82 08 00 00 call 80103ae0 <pinit>
tvinit(); // trap vectors
8010325e: e8 9d 32 00 00 call 80106500 <tvinit>
binit(); // buffer cache
80103263: e8 d8 cd ff ff call 80100040 <binit>
fileinit(); // file table
80103268: e8 53 de ff ff call 801010c0 <fileinit>
ideinit(); // disk
8010326d: e8 fe f0 ff ff call 80102370 <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);
80103272: 83 c4 0c add $0xc,%esp
80103275: 68 8a 00 00 00 push $0x8a
8010327a: 68 8c b4 10 80 push $0x8010b48c
8010327f: 68 00 70 00 80 push $0x80007000
80103284: e8 07 20 00 00 call 80105290 <memmove>
for(c = cpus; c < cpus+ncpu; c++){
80103289: 69 05 c0 3f 11 80 b0 imul $0xb0,0x80113fc0,%eax
80103290: 00 00 00
80103293: 83 c4 10 add $0x10,%esp
80103296: 05 40 3a 11 80 add $0x80113a40,%eax
8010329b: 3d 40 3a 11 80 cmp $0x80113a40,%eax
801032a0: 76 71 jbe 80103313 <main+0x103>
801032a2: bb 40 3a 11 80 mov $0x80113a40,%ebx
801032a7: 89 f6 mov %esi,%esi
801032a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(c == mycpu()) // We've started already.
801032b0: e8 4b 08 00 00 call 80103b00 <mycpu>
801032b5: 39 d8 cmp %ebx,%eax
801032b7: 74 41 je 801032fa <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();
801032b9: e8 72 f5 ff ff call 80102830 <kalloc>
*(void**)(code-4) = stack + KSTACKSIZE;
801032be: 05 00 10 00 00 add $0x1000,%eax
*(void(**)(void))(code-8) = mpenter;
801032c3: c7 05 f8 6f 00 80 f0 movl $0x801031f0,0x80006ff8
801032ca: 31 10 80
*(int**)(code-12) = (void *) V2P(entrypgdir);
801032cd: c7 05 f4 6f 00 80 00 movl $0x10a000,0x80006ff4
801032d4: a0 10 00
*(void**)(code-4) = stack + KSTACKSIZE;
801032d7: a3 fc 6f 00 80 mov %eax,0x80006ffc
lapicstartap(c->apicid, V2P(code));
801032dc: 0f b6 03 movzbl (%ebx),%eax
801032df: 83 ec 08 sub $0x8,%esp
801032e2: 68 00 70 00 00 push $0x7000
801032e7: 50 push %eax
801032e8: e8 03 f8 ff ff call 80102af0 <lapicstartap>
801032ed: 83 c4 10 add $0x10,%esp
// wait for cpu to finish mpmain()
while(c->started == 0)
801032f0: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
801032f6: 85 c0 test %eax,%eax
801032f8: 74 f6 je 801032f0 <main+0xe0>
for(c = cpus; c < cpus+ncpu; c++){
801032fa: 69 05 c0 3f 11 80 b0 imul $0xb0,0x80113fc0,%eax
80103301: 00 00 00
80103304: 81 c3 b0 00 00 00 add $0xb0,%ebx
8010330a: 05 40 3a 11 80 add $0x80113a40,%eax
8010330f: 39 c3 cmp %eax,%ebx
80103311: 72 9d jb 801032b0 <main+0xa0>
kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers()
80103313: 83 ec 08 sub $0x8,%esp
80103316: 68 00 00 00 8e push $0x8e000000
8010331b: 68 00 00 40 80 push $0x80400000
80103320: e8 ab f4 ff ff call 801027d0 <kinit2>
userinit(); // first user process
80103325: e8 a6 08 00 00 call 80103bd0 <userinit>
mpmain(); // finish this processor's setup
8010332a: e8 81 fe ff ff call 801031b0 <mpmain>
8010332f: 90 nop
80103330 <mpsearch1>:
}
// Look for an MP structure in the len bytes at addr.
static struct mp*
mpsearch1(uint a, int len)
{
80103330: 55 push %ebp
80103331: 89 e5 mov %esp,%ebp
80103333: 57 push %edi
80103334: 56 push %esi
uchar *e, *p, *addr;
addr = P2V(a);
80103335: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi
{
8010333b: 53 push %ebx
e = addr+len;
8010333c: 8d 1c 16 lea (%esi,%edx,1),%ebx
{
8010333f: 83 ec 0c sub $0xc,%esp
for(p = addr; p < e; p += sizeof(struct mp))
80103342: 39 de cmp %ebx,%esi
80103344: 72 10 jb 80103356 <mpsearch1+0x26>
80103346: eb 50 jmp 80103398 <mpsearch1+0x68>
80103348: 90 nop
80103349: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103350: 39 fb cmp %edi,%ebx
80103352: 89 fe mov %edi,%esi
80103354: 76 42 jbe 80103398 <mpsearch1+0x68>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
80103356: 83 ec 04 sub $0x4,%esp
80103359: 8d 7e 10 lea 0x10(%esi),%edi
8010335c: 6a 04 push $0x4
8010335e: 68 58 82 10 80 push $0x80108258
80103363: 56 push %esi
80103364: e8 c7 1e 00 00 call 80105230 <memcmp>
80103369: 83 c4 10 add $0x10,%esp
8010336c: 85 c0 test %eax,%eax
8010336e: 75 e0 jne 80103350 <mpsearch1+0x20>
80103370: 89 f1 mov %esi,%ecx
80103372: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
sum += addr[i];
80103378: 0f b6 11 movzbl (%ecx),%edx
8010337b: 83 c1 01 add $0x1,%ecx
8010337e: 01 d0 add %edx,%eax
for(i=0; i<len; i++)
80103380: 39 f9 cmp %edi,%ecx
80103382: 75 f4 jne 80103378 <mpsearch1+0x48>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
80103384: 84 c0 test %al,%al
80103386: 75 c8 jne 80103350 <mpsearch1+0x20>
return (struct mp*)p;
return 0;
}
80103388: 8d 65 f4 lea -0xc(%ebp),%esp
8010338b: 89 f0 mov %esi,%eax
8010338d: 5b pop %ebx
8010338e: 5e pop %esi
8010338f: 5f pop %edi
80103390: 5d pop %ebp
80103391: c3 ret
80103392: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103398: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
8010339b: 31 f6 xor %esi,%esi
}
8010339d: 89 f0 mov %esi,%eax
8010339f: 5b pop %ebx
801033a0: 5e pop %esi
801033a1: 5f pop %edi
801033a2: 5d pop %ebp
801033a3: c3 ret
801033a4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801033aa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801033b0 <mpinit>:
return conf;
}
void
mpinit(void)
{
801033b0: 55 push %ebp
801033b1: 89 e5 mov %esp,%ebp
801033b3: 57 push %edi
801033b4: 56 push %esi
801033b5: 53 push %ebx
801033b6: 83 ec 1c sub $0x1c,%esp
if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){
801033b9: 0f b6 05 0f 04 00 80 movzbl 0x8000040f,%eax
801033c0: 0f b6 15 0e 04 00 80 movzbl 0x8000040e,%edx
801033c7: c1 e0 08 shl $0x8,%eax
801033ca: 09 d0 or %edx,%eax
801033cc: c1 e0 04 shl $0x4,%eax
801033cf: 85 c0 test %eax,%eax
801033d1: 75 1b jne 801033ee <mpinit+0x3e>
p = ((bda[0x14]<<8)|bda[0x13])*1024;
801033d3: 0f b6 05 14 04 00 80 movzbl 0x80000414,%eax
801033da: 0f b6 15 13 04 00 80 movzbl 0x80000413,%edx
801033e1: c1 e0 08 shl $0x8,%eax
801033e4: 09 d0 or %edx,%eax
801033e6: c1 e0 0a shl $0xa,%eax
if((mp = mpsearch1(p-1024, 1024)))
801033e9: 2d 00 04 00 00 sub $0x400,%eax
if((mp = mpsearch1(p, 1024)))
801033ee: ba 00 04 00 00 mov $0x400,%edx
801033f3: e8 38 ff ff ff call 80103330 <mpsearch1>
801033f8: 85 c0 test %eax,%eax
801033fa: 89 45 e4 mov %eax,-0x1c(%ebp)
801033fd: 0f 84 3d 01 00 00 je 80103540 <mpinit+0x190>
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
80103403: 8b 45 e4 mov -0x1c(%ebp),%eax
80103406: 8b 58 04 mov 0x4(%eax),%ebx
80103409: 85 db test %ebx,%ebx
8010340b: 0f 84 4f 01 00 00 je 80103560 <mpinit+0x1b0>
conf = (struct mpconf*) P2V((uint) mp->physaddr);
80103411: 8d b3 00 00 00 80 lea -0x80000000(%ebx),%esi
if(memcmp(conf, "PCMP", 4) != 0)
80103417: 83 ec 04 sub $0x4,%esp
8010341a: 6a 04 push $0x4
8010341c: 68 75 82 10 80 push $0x80108275
80103421: 56 push %esi
80103422: e8 09 1e 00 00 call 80105230 <memcmp>
80103427: 83 c4 10 add $0x10,%esp
8010342a: 85 c0 test %eax,%eax
8010342c: 0f 85 2e 01 00 00 jne 80103560 <mpinit+0x1b0>
if(conf->version != 1 && conf->version != 4)
80103432: 0f b6 83 06 00 00 80 movzbl -0x7ffffffa(%ebx),%eax
80103439: 3c 01 cmp $0x1,%al
8010343b: 0f 95 c2 setne %dl
8010343e: 3c 04 cmp $0x4,%al
80103440: 0f 95 c0 setne %al
80103443: 20 c2 and %al,%dl
80103445: 0f 85 15 01 00 00 jne 80103560 <mpinit+0x1b0>
if(sum((uchar*)conf, conf->length) != 0)
8010344b: 0f b7 bb 04 00 00 80 movzwl -0x7ffffffc(%ebx),%edi
for(i=0; i<len; i++)
80103452: 66 85 ff test %di,%di
80103455: 74 1a je 80103471 <mpinit+0xc1>
80103457: 89 f0 mov %esi,%eax
80103459: 01 f7 add %esi,%edi
sum = 0;
8010345b: 31 d2 xor %edx,%edx
8010345d: 8d 76 00 lea 0x0(%esi),%esi
sum += addr[i];
80103460: 0f b6 08 movzbl (%eax),%ecx
80103463: 83 c0 01 add $0x1,%eax
80103466: 01 ca add %ecx,%edx
for(i=0; i<len; i++)
80103468: 39 c7 cmp %eax,%edi
8010346a: 75 f4 jne 80103460 <mpinit+0xb0>
8010346c: 84 d2 test %dl,%dl
8010346e: 0f 95 c2 setne %dl
struct mp *mp;
struct mpconf *conf;
struct mpproc *proc;
struct mpioapic *ioapic;
if((conf = mpconfig(&mp)) == 0)
80103471: 85 f6 test %esi,%esi
80103473: 0f 84 e7 00 00 00 je 80103560 <mpinit+0x1b0>
80103479: 84 d2 test %dl,%dl
8010347b: 0f 85 df 00 00 00 jne 80103560 <mpinit+0x1b0>
panic("Expect to run on an SMP");
ismp = 1;
lapic = (uint*)conf->lapicaddr;
80103481: 8b 83 24 00 00 80 mov -0x7fffffdc(%ebx),%eax
80103487: a3 3c 39 11 80 mov %eax,0x8011393c
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
8010348c: 0f b7 93 04 00 00 80 movzwl -0x7ffffffc(%ebx),%edx
80103493: 8d 83 2c 00 00 80 lea -0x7fffffd4(%ebx),%eax
ismp = 1;
80103499: bb 01 00 00 00 mov $0x1,%ebx
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
8010349e: 01 d6 add %edx,%esi
801034a0: 39 c6 cmp %eax,%esi
801034a2: 76 23 jbe 801034c7 <mpinit+0x117>
switch(*p){
801034a4: 0f b6 10 movzbl (%eax),%edx
801034a7: 80 fa 04 cmp $0x4,%dl
801034aa: 0f 87 ca 00 00 00 ja 8010357a <mpinit+0x1ca>
801034b0: ff 24 95 9c 82 10 80 jmp *-0x7fef7d64(,%edx,4)
801034b7: 89 f6 mov %esi,%esi
801034b9: 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;
801034c0: 83 c0 08 add $0x8,%eax
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
801034c3: 39 c6 cmp %eax,%esi
801034c5: 77 dd ja 801034a4 <mpinit+0xf4>
default:
ismp = 0;
break;
}
}
if(!ismp)
801034c7: 85 db test %ebx,%ebx
801034c9: 0f 84 9e 00 00 00 je 8010356d <mpinit+0x1bd>
panic("Didn't find a suitable machine");
if(mp->imcrp){
801034cf: 8b 45 e4 mov -0x1c(%ebp),%eax
801034d2: 80 78 0c 00 cmpb $0x0,0xc(%eax)
801034d6: 74 15 je 801034ed <mpinit+0x13d>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801034d8: b8 70 00 00 00 mov $0x70,%eax
801034dd: ba 22 00 00 00 mov $0x22,%edx
801034e2: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801034e3: ba 23 00 00 00 mov $0x23,%edx
801034e8: 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.
801034e9: 83 c8 01 or $0x1,%eax
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801034ec: ee out %al,(%dx)
}
}
801034ed: 8d 65 f4 lea -0xc(%ebp),%esp
801034f0: 5b pop %ebx
801034f1: 5e pop %esi
801034f2: 5f pop %edi
801034f3: 5d pop %ebp
801034f4: c3 ret
801034f5: 8d 76 00 lea 0x0(%esi),%esi
if(ncpu < NCPU) {
801034f8: 8b 0d c0 3f 11 80 mov 0x80113fc0,%ecx
801034fe: 83 f9 07 cmp $0x7,%ecx
80103501: 7f 19 jg 8010351c <mpinit+0x16c>
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
80103503: 0f b6 50 01 movzbl 0x1(%eax),%edx
80103507: 69 f9 b0 00 00 00 imul $0xb0,%ecx,%edi
ncpu++;
8010350d: 83 c1 01 add $0x1,%ecx
80103510: 89 0d c0 3f 11 80 mov %ecx,0x80113fc0
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
80103516: 88 97 40 3a 11 80 mov %dl,-0x7feec5c0(%edi)
p += sizeof(struct mpproc);
8010351c: 83 c0 14 add $0x14,%eax
continue;
8010351f: e9 7c ff ff ff jmp 801034a0 <mpinit+0xf0>
80103524: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ioapicid = ioapic->apicno;
80103528: 0f b6 50 01 movzbl 0x1(%eax),%edx
p += sizeof(struct mpioapic);
8010352c: 83 c0 08 add $0x8,%eax
ioapicid = ioapic->apicno;
8010352f: 88 15 20 3a 11 80 mov %dl,0x80113a20
continue;
80103535: e9 66 ff ff ff jmp 801034a0 <mpinit+0xf0>
8010353a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return mpsearch1(0xF0000, 0x10000);
80103540: ba 00 00 01 00 mov $0x10000,%edx
80103545: b8 00 00 0f 00 mov $0xf0000,%eax
8010354a: e8 e1 fd ff ff call 80103330 <mpsearch1>
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
8010354f: 85 c0 test %eax,%eax
return mpsearch1(0xF0000, 0x10000);
80103551: 89 45 e4 mov %eax,-0x1c(%ebp)
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
80103554: 0f 85 a9 fe ff ff jne 80103403 <mpinit+0x53>
8010355a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
panic("Expect to run on an SMP");
80103560: 83 ec 0c sub $0xc,%esp
80103563: 68 5d 82 10 80 push $0x8010825d
80103568: e8 23 ce ff ff call 80100390 <panic>
panic("Didn't find a suitable machine");
8010356d: 83 ec 0c sub $0xc,%esp
80103570: 68 7c 82 10 80 push $0x8010827c
80103575: e8 16 ce ff ff call 80100390 <panic>
ismp = 0;
8010357a: 31 db xor %ebx,%ebx
8010357c: e9 26 ff ff ff jmp 801034a7 <mpinit+0xf7>
80103581: 66 90 xchg %ax,%ax
80103583: 66 90 xchg %ax,%ax
80103585: 66 90 xchg %ax,%ax
80103587: 66 90 xchg %ax,%ax
80103589: 66 90 xchg %ax,%ax
8010358b: 66 90 xchg %ax,%ax
8010358d: 66 90 xchg %ax,%ax
8010358f: 90 nop
80103590 <picinit>:
#define IO_PIC2 0xA0 // Slave (IRQs 8-15)
// Don't use the 8259A interrupt controllers. Xv6 assumes SMP hardware.
void
picinit(void)
{
80103590: 55 push %ebp
80103591: b8 ff ff ff ff mov $0xffffffff,%eax
80103596: ba 21 00 00 00 mov $0x21,%edx
8010359b: 89 e5 mov %esp,%ebp
8010359d: ee out %al,(%dx)
8010359e: ba a1 00 00 00 mov $0xa1,%edx
801035a3: ee out %al,(%dx)
// mask all interrupts
outb(IO_PIC1+1, 0xFF);
outb(IO_PIC2+1, 0xFF);
}
801035a4: 5d pop %ebp
801035a5: c3 ret
801035a6: 66 90 xchg %ax,%ax
801035a8: 66 90 xchg %ax,%ax
801035aa: 66 90 xchg %ax,%ax
801035ac: 66 90 xchg %ax,%ax
801035ae: 66 90 xchg %ax,%ax
801035b0 <pipealloc>:
int writeopen; // write fd is still open
};
int
pipealloc(struct file **f0, struct file **f1)
{
801035b0: 55 push %ebp
801035b1: 89 e5 mov %esp,%ebp
801035b3: 57 push %edi
801035b4: 56 push %esi
801035b5: 53 push %ebx
801035b6: 83 ec 0c sub $0xc,%esp
801035b9: 8b 5d 08 mov 0x8(%ebp),%ebx
801035bc: 8b 75 0c mov 0xc(%ebp),%esi
struct pipe *p;
p = 0;
*f0 = *f1 = 0;
801035bf: c7 06 00 00 00 00 movl $0x0,(%esi)
801035c5: c7 03 00 00 00 00 movl $0x0,(%ebx)
if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0)
801035cb: e8 10 db ff ff call 801010e0 <filealloc>
801035d0: 85 c0 test %eax,%eax
801035d2: 89 03 mov %eax,(%ebx)
801035d4: 74 22 je 801035f8 <pipealloc+0x48>
801035d6: e8 05 db ff ff call 801010e0 <filealloc>
801035db: 85 c0 test %eax,%eax
801035dd: 89 06 mov %eax,(%esi)
801035df: 74 3f je 80103620 <pipealloc+0x70>
goto bad;
if((p = (struct pipe*)kalloc()) == 0)
801035e1: e8 4a f2 ff ff call 80102830 <kalloc>
801035e6: 85 c0 test %eax,%eax
801035e8: 89 c7 mov %eax,%edi
801035ea: 75 54 jne 80103640 <pipealloc+0x90>
//PAGEBREAK: 20
bad:
if(p)
kfree((char*)p);
if(*f0)
801035ec: 8b 03 mov (%ebx),%eax
801035ee: 85 c0 test %eax,%eax
801035f0: 75 34 jne 80103626 <pipealloc+0x76>
801035f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
fileclose(*f0);
if(*f1)
801035f8: 8b 06 mov (%esi),%eax
801035fa: 85 c0 test %eax,%eax
801035fc: 74 0c je 8010360a <pipealloc+0x5a>
fileclose(*f1);
801035fe: 83 ec 0c sub $0xc,%esp
80103601: 50 push %eax
80103602: e8 99 db ff ff call 801011a0 <fileclose>
80103607: 83 c4 10 add $0x10,%esp
return -1;
}
8010360a: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
8010360d: b8 ff ff ff ff mov $0xffffffff,%eax
}
80103612: 5b pop %ebx
80103613: 5e pop %esi
80103614: 5f pop %edi
80103615: 5d pop %ebp
80103616: c3 ret
80103617: 89 f6 mov %esi,%esi
80103619: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(*f0)
80103620: 8b 03 mov (%ebx),%eax
80103622: 85 c0 test %eax,%eax
80103624: 74 e4 je 8010360a <pipealloc+0x5a>
fileclose(*f0);
80103626: 83 ec 0c sub $0xc,%esp
80103629: 50 push %eax
8010362a: e8 71 db ff ff call 801011a0 <fileclose>
if(*f1)
8010362f: 8b 06 mov (%esi),%eax
fileclose(*f0);
80103631: 83 c4 10 add $0x10,%esp
if(*f1)
80103634: 85 c0 test %eax,%eax
80103636: 75 c6 jne 801035fe <pipealloc+0x4e>
80103638: eb d0 jmp 8010360a <pipealloc+0x5a>
8010363a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
initlock(&p->lock, "pipe");
80103640: 83 ec 08 sub $0x8,%esp
p->readopen = 1;
80103643: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax)
8010364a: 00 00 00
p->writeopen = 1;
8010364d: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax)
80103654: 00 00 00
p->nwrite = 0;
80103657: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax)
8010365e: 00 00 00
p->nread = 0;
80103661: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax)
80103668: 00 00 00
initlock(&p->lock, "pipe");
8010366b: 68 b0 82 10 80 push $0x801082b0
80103670: 50 push %eax
80103671: e8 1a 19 00 00 call 80104f90 <initlock>
(*f0)->type = FD_PIPE;
80103676: 8b 03 mov (%ebx),%eax
return 0;
80103678: 83 c4 10 add $0x10,%esp
(*f0)->type = FD_PIPE;
8010367b: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f0)->readable = 1;
80103681: 8b 03 mov (%ebx),%eax
80103683: c6 40 08 01 movb $0x1,0x8(%eax)
(*f0)->writable = 0;
80103687: 8b 03 mov (%ebx),%eax
80103689: c6 40 09 00 movb $0x0,0x9(%eax)
(*f0)->pipe = p;
8010368d: 8b 03 mov (%ebx),%eax
8010368f: 89 78 0c mov %edi,0xc(%eax)
(*f1)->type = FD_PIPE;
80103692: 8b 06 mov (%esi),%eax
80103694: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f1)->readable = 0;
8010369a: 8b 06 mov (%esi),%eax
8010369c: c6 40 08 00 movb $0x0,0x8(%eax)
(*f1)->writable = 1;
801036a0: 8b 06 mov (%esi),%eax
801036a2: c6 40 09 01 movb $0x1,0x9(%eax)
(*f1)->pipe = p;
801036a6: 8b 06 mov (%esi),%eax
801036a8: 89 78 0c mov %edi,0xc(%eax)
}
801036ab: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
801036ae: 31 c0 xor %eax,%eax
}
801036b0: 5b pop %ebx
801036b1: 5e pop %esi
801036b2: 5f pop %edi
801036b3: 5d pop %ebp
801036b4: c3 ret
801036b5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801036b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801036c0 <pipeclose>:
void
pipeclose(struct pipe *p, int writable)
{
801036c0: 55 push %ebp
801036c1: 89 e5 mov %esp,%ebp
801036c3: 56 push %esi
801036c4: 53 push %ebx
801036c5: 8b 5d 08 mov 0x8(%ebp),%ebx
801036c8: 8b 75 0c mov 0xc(%ebp),%esi
acquire(&p->lock);
801036cb: 83 ec 0c sub $0xc,%esp
801036ce: 53 push %ebx
801036cf: e8 fc 19 00 00 call 801050d0 <acquire>
if(writable){
801036d4: 83 c4 10 add $0x10,%esp
801036d7: 85 f6 test %esi,%esi
801036d9: 74 45 je 80103720 <pipeclose+0x60>
p->writeopen = 0;
wakeup(&p->nread);
801036db: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax
801036e1: 83 ec 0c sub $0xc,%esp
p->writeopen = 0;
801036e4: c7 83 40 02 00 00 00 movl $0x0,0x240(%ebx)
801036eb: 00 00 00
wakeup(&p->nread);
801036ee: 50 push %eax
801036ef: e8 6c 0b 00 00 call 80104260 <wakeup>
801036f4: 83 c4 10 add $0x10,%esp
} else {
p->readopen = 0;
wakeup(&p->nwrite);
}
if(p->readopen == 0 && p->writeopen == 0){
801036f7: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx
801036fd: 85 d2 test %edx,%edx
801036ff: 75 0a jne 8010370b <pipeclose+0x4b>
80103701: 8b 83 40 02 00 00 mov 0x240(%ebx),%eax
80103707: 85 c0 test %eax,%eax
80103709: 74 35 je 80103740 <pipeclose+0x80>
release(&p->lock);
kfree((char*)p);
} else
release(&p->lock);
8010370b: 89 5d 08 mov %ebx,0x8(%ebp)
}
8010370e: 8d 65 f8 lea -0x8(%ebp),%esp
80103711: 5b pop %ebx
80103712: 5e pop %esi
80103713: 5d pop %ebp
release(&p->lock);
80103714: e9 77 1a 00 00 jmp 80105190 <release>
80103719: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
wakeup(&p->nwrite);
80103720: 8d 83 38 02 00 00 lea 0x238(%ebx),%eax
80103726: 83 ec 0c sub $0xc,%esp
p->readopen = 0;
80103729: c7 83 3c 02 00 00 00 movl $0x0,0x23c(%ebx)
80103730: 00 00 00
wakeup(&p->nwrite);
80103733: 50 push %eax
80103734: e8 27 0b 00 00 call 80104260 <wakeup>
80103739: 83 c4 10 add $0x10,%esp
8010373c: eb b9 jmp 801036f7 <pipeclose+0x37>
8010373e: 66 90 xchg %ax,%ax
release(&p->lock);
80103740: 83 ec 0c sub $0xc,%esp
80103743: 53 push %ebx
80103744: e8 47 1a 00 00 call 80105190 <release>
kfree((char*)p);
80103749: 89 5d 08 mov %ebx,0x8(%ebp)
8010374c: 83 c4 10 add $0x10,%esp
}
8010374f: 8d 65 f8 lea -0x8(%ebp),%esp
80103752: 5b pop %ebx
80103753: 5e pop %esi
80103754: 5d pop %ebp
kfree((char*)p);
80103755: e9 26 ef ff ff jmp 80102680 <kfree>
8010375a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103760 <pipewrite>:
//PAGEBREAK: 40
int
pipewrite(struct pipe *p, char *addr, int n)
{
80103760: 55 push %ebp
80103761: 89 e5 mov %esp,%ebp
80103763: 57 push %edi
80103764: 56 push %esi
80103765: 53 push %ebx
80103766: 83 ec 28 sub $0x28,%esp
80103769: 8b 5d 08 mov 0x8(%ebp),%ebx
int i;
acquire(&p->lock);
8010376c: 53 push %ebx
8010376d: e8 5e 19 00 00 call 801050d0 <acquire>
for(i = 0; i < n; i++){
80103772: 8b 45 10 mov 0x10(%ebp),%eax
80103775: 83 c4 10 add $0x10,%esp
80103778: 85 c0 test %eax,%eax
8010377a: 0f 8e c9 00 00 00 jle 80103849 <pipewrite+0xe9>
80103780: 8b 4d 0c mov 0xc(%ebp),%ecx
80103783: 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);
80103789: 8d bb 34 02 00 00 lea 0x234(%ebx),%edi
8010378f: 89 4d e4 mov %ecx,-0x1c(%ebp)
80103792: 03 4d 10 add 0x10(%ebp),%ecx
80103795: 89 4d e0 mov %ecx,-0x20(%ebp)
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
80103798: 8b 8b 34 02 00 00 mov 0x234(%ebx),%ecx
8010379e: 8d 91 00 02 00 00 lea 0x200(%ecx),%edx
801037a4: 39 d0 cmp %edx,%eax
801037a6: 75 71 jne 80103819 <pipewrite+0xb9>
if(p->readopen == 0 || myproc()->killed){
801037a8: 8b 83 3c 02 00 00 mov 0x23c(%ebx),%eax
801037ae: 85 c0 test %eax,%eax
801037b0: 74 4e je 80103800 <pipewrite+0xa0>
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
801037b2: 8d b3 38 02 00 00 lea 0x238(%ebx),%esi
801037b8: eb 3a jmp 801037f4 <pipewrite+0x94>
801037ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
wakeup(&p->nread);
801037c0: 83 ec 0c sub $0xc,%esp
801037c3: 57 push %edi
801037c4: e8 97 0a 00 00 call 80104260 <wakeup>
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
801037c9: 5a pop %edx
801037ca: 59 pop %ecx
801037cb: 53 push %ebx
801037cc: 56 push %esi
801037cd: e8 ce 08 00 00 call 801040a0 <sleep>
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
801037d2: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax
801037d8: 8b 93 38 02 00 00 mov 0x238(%ebx),%edx
801037de: 83 c4 10 add $0x10,%esp
801037e1: 05 00 02 00 00 add $0x200,%eax
801037e6: 39 c2 cmp %eax,%edx
801037e8: 75 36 jne 80103820 <pipewrite+0xc0>
if(p->readopen == 0 || myproc()->killed){
801037ea: 8b 83 3c 02 00 00 mov 0x23c(%ebx),%eax
801037f0: 85 c0 test %eax,%eax
801037f2: 74 0c je 80103800 <pipewrite+0xa0>
801037f4: e8 a7 03 00 00 call 80103ba0 <myproc>
801037f9: 8b 40 24 mov 0x24(%eax),%eax
801037fc: 85 c0 test %eax,%eax
801037fe: 74 c0 je 801037c0 <pipewrite+0x60>
release(&p->lock);
80103800: 83 ec 0c sub $0xc,%esp
80103803: 53 push %ebx
80103804: e8 87 19 00 00 call 80105190 <release>
return -1;
80103809: 83 c4 10 add $0x10,%esp
8010380c: 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;
}
80103811: 8d 65 f4 lea -0xc(%ebp),%esp
80103814: 5b pop %ebx
80103815: 5e pop %esi
80103816: 5f pop %edi
80103817: 5d pop %ebp
80103818: c3 ret
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
80103819: 89 c2 mov %eax,%edx
8010381b: 90 nop
8010381c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
p->data[p->nwrite++ % PIPESIZE] = addr[i];
80103820: 8b 75 e4 mov -0x1c(%ebp),%esi
80103823: 8d 42 01 lea 0x1(%edx),%eax
80103826: 81 e2 ff 01 00 00 and $0x1ff,%edx
8010382c: 89 83 38 02 00 00 mov %eax,0x238(%ebx)
80103832: 83 c6 01 add $0x1,%esi
80103835: 0f b6 4e ff movzbl -0x1(%esi),%ecx
for(i = 0; i < n; i++){
80103839: 3b 75 e0 cmp -0x20(%ebp),%esi
8010383c: 89 75 e4 mov %esi,-0x1c(%ebp)
p->data[p->nwrite++ % PIPESIZE] = addr[i];
8010383f: 88 4c 13 34 mov %cl,0x34(%ebx,%edx,1)
for(i = 0; i < n; i++){
80103843: 0f 85 4f ff ff ff jne 80103798 <pipewrite+0x38>
wakeup(&p->nread); //DOC: pipewrite-wakeup1
80103849: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax
8010384f: 83 ec 0c sub $0xc,%esp
80103852: 50 push %eax
80103853: e8 08 0a 00 00 call 80104260 <wakeup>
release(&p->lock);
80103858: 89 1c 24 mov %ebx,(%esp)
8010385b: e8 30 19 00 00 call 80105190 <release>
return n;
80103860: 83 c4 10 add $0x10,%esp
80103863: 8b 45 10 mov 0x10(%ebp),%eax
80103866: eb a9 jmp 80103811 <pipewrite+0xb1>
80103868: 90 nop
80103869: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103870 <piperead>:
int
piperead(struct pipe *p, char *addr, int n)
{
80103870: 55 push %ebp
80103871: 89 e5 mov %esp,%ebp
80103873: 57 push %edi
80103874: 56 push %esi
80103875: 53 push %ebx
80103876: 83 ec 18 sub $0x18,%esp
80103879: 8b 75 08 mov 0x8(%ebp),%esi
8010387c: 8b 7d 0c mov 0xc(%ebp),%edi
int i;
acquire(&p->lock);
8010387f: 56 push %esi
80103880: e8 4b 18 00 00 call 801050d0 <acquire>
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
80103885: 83 c4 10 add $0x10,%esp
80103888: 8b 8e 34 02 00 00 mov 0x234(%esi),%ecx
8010388e: 3b 8e 38 02 00 00 cmp 0x238(%esi),%ecx
80103894: 75 6a jne 80103900 <piperead+0x90>
80103896: 8b 9e 40 02 00 00 mov 0x240(%esi),%ebx
8010389c: 85 db test %ebx,%ebx
8010389e: 0f 84 c4 00 00 00 je 80103968 <piperead+0xf8>
if(myproc()->killed){
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
801038a4: 8d 9e 34 02 00 00 lea 0x234(%esi),%ebx
801038aa: eb 2d jmp 801038d9 <piperead+0x69>
801038ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801038b0: 83 ec 08 sub $0x8,%esp
801038b3: 56 push %esi
801038b4: 53 push %ebx
801038b5: e8 e6 07 00 00 call 801040a0 <sleep>
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
801038ba: 83 c4 10 add $0x10,%esp
801038bd: 8b 8e 34 02 00 00 mov 0x234(%esi),%ecx
801038c3: 3b 8e 38 02 00 00 cmp 0x238(%esi),%ecx
801038c9: 75 35 jne 80103900 <piperead+0x90>
801038cb: 8b 96 40 02 00 00 mov 0x240(%esi),%edx
801038d1: 85 d2 test %edx,%edx
801038d3: 0f 84 8f 00 00 00 je 80103968 <piperead+0xf8>
if(myproc()->killed){
801038d9: e8 c2 02 00 00 call 80103ba0 <myproc>
801038de: 8b 48 24 mov 0x24(%eax),%ecx
801038e1: 85 c9 test %ecx,%ecx
801038e3: 74 cb je 801038b0 <piperead+0x40>
release(&p->lock);
801038e5: 83 ec 0c sub $0xc,%esp
return -1;
801038e8: bb ff ff ff ff mov $0xffffffff,%ebx
release(&p->lock);
801038ed: 56 push %esi
801038ee: e8 9d 18 00 00 call 80105190 <release>
return -1;
801038f3: 83 c4 10 add $0x10,%esp
addr[i] = p->data[p->nread++ % PIPESIZE];
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
release(&p->lock);
return i;
}
801038f6: 8d 65 f4 lea -0xc(%ebp),%esp
801038f9: 89 d8 mov %ebx,%eax
801038fb: 5b pop %ebx
801038fc: 5e pop %esi
801038fd: 5f pop %edi
801038fe: 5d pop %ebp
801038ff: c3 ret
for(i = 0; i < n; i++){ //DOC: piperead-copy
80103900: 8b 45 10 mov 0x10(%ebp),%eax
80103903: 85 c0 test %eax,%eax
80103905: 7e 61 jle 80103968 <piperead+0xf8>
if(p->nread == p->nwrite)
80103907: 31 db xor %ebx,%ebx
80103909: eb 13 jmp 8010391e <piperead+0xae>
8010390b: 90 nop
8010390c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103910: 8b 8e 34 02 00 00 mov 0x234(%esi),%ecx
80103916: 3b 8e 38 02 00 00 cmp 0x238(%esi),%ecx
8010391c: 74 1f je 8010393d <piperead+0xcd>
addr[i] = p->data[p->nread++ % PIPESIZE];
8010391e: 8d 41 01 lea 0x1(%ecx),%eax
80103921: 81 e1 ff 01 00 00 and $0x1ff,%ecx
80103927: 89 86 34 02 00 00 mov %eax,0x234(%esi)
8010392d: 0f b6 44 0e 34 movzbl 0x34(%esi,%ecx,1),%eax
80103932: 88 04 1f mov %al,(%edi,%ebx,1)
for(i = 0; i < n; i++){ //DOC: piperead-copy
80103935: 83 c3 01 add $0x1,%ebx
80103938: 39 5d 10 cmp %ebx,0x10(%ebp)
8010393b: 75 d3 jne 80103910 <piperead+0xa0>
wakeup(&p->nwrite); //DOC: piperead-wakeup
8010393d: 8d 86 38 02 00 00 lea 0x238(%esi),%eax
80103943: 83 ec 0c sub $0xc,%esp
80103946: 50 push %eax
80103947: e8 14 09 00 00 call 80104260 <wakeup>
release(&p->lock);
8010394c: 89 34 24 mov %esi,(%esp)
8010394f: e8 3c 18 00 00 call 80105190 <release>
return i;
80103954: 83 c4 10 add $0x10,%esp
}
80103957: 8d 65 f4 lea -0xc(%ebp),%esp
8010395a: 89 d8 mov %ebx,%eax
8010395c: 5b pop %ebx
8010395d: 5e pop %esi
8010395e: 5f pop %edi
8010395f: 5d pop %ebp
80103960: c3 ret
80103961: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103968: 31 db xor %ebx,%ebx
8010396a: eb d1 jmp 8010393d <piperead+0xcd>
8010396c: 66 90 xchg %ax,%ax
8010396e: 66 90 xchg %ax,%ax
80103970 <allocproc>:
// If found, change state to EMBRYO and initialize
// state required to run in the kernel.
// Otherwise return 0.
static struct proc*
allocproc(void)
{
80103970: 55 push %ebp
80103971: 89 e5 mov %esp,%ebp
80103973: 53 push %ebx
struct proc *p;
char *sp;
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103974: bb 34 40 11 80 mov $0x80114034,%ebx
{
80103979: 83 ec 10 sub $0x10,%esp
acquire(&ptable.lock);
8010397c: 68 00 40 11 80 push $0x80114000
80103981: e8 4a 17 00 00 call 801050d0 <acquire>
80103986: 83 c4 10 add $0x10,%esp
80103989: eb 17 jmp 801039a2 <allocproc+0x32>
8010398b: 90 nop
8010398c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103990: 81 c3 94 00 00 00 add $0x94,%ebx
80103996: 81 fb 34 65 11 80 cmp $0x80116534,%ebx
8010399c: 0f 83 be 00 00 00 jae 80103a60 <allocproc+0xf0>
if(p->state == UNUSED)
801039a2: 8b 43 0c mov 0xc(%ebx),%eax
801039a5: 85 c0 test %eax,%eax
801039a7: 75 e7 jne 80103990 <allocproc+0x20>
release(&ptable.lock);
return 0;
found:
p->state = EMBRYO;
p->pid = nextpid++;
801039a9: a1 08 b0 10 80 mov 0x8010b008,%eax
release(&ptable.lock);
801039ae: 83 ec 0c sub $0xc,%esp
p->state = EMBRYO;
801039b1: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx)
p->pid = nextpid++;
801039b8: 8d 50 01 lea 0x1(%eax),%edx
801039bb: 89 43 10 mov %eax,0x10(%ebx)
release(&ptable.lock);
801039be: 68 00 40 11 80 push $0x80114000
p->pid = nextpid++;
801039c3: 89 15 08 b0 10 80 mov %edx,0x8010b008
release(&ptable.lock);
801039c9: e8 c2 17 00 00 call 80105190 <release>
// Allocate kernel stack.
if((p->kstack = kalloc()) == 0){
801039ce: e8 5d ee ff ff call 80102830 <kalloc>
801039d3: 83 c4 10 add $0x10,%esp
801039d6: 85 c0 test %eax,%eax
801039d8: 89 43 08 mov %eax,0x8(%ebx)
801039db: 0f 84 98 00 00 00 je 80103a79 <allocproc+0x109>
return 0;
}
sp = p->kstack + KSTACKSIZE;
// Leave room for trap frame.
sp -= sizeof *p->tf;
801039e1: 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);
801039e7: 83 ec 04 sub $0x4,%esp
sp -= sizeof *p->context;
801039ea: 05 9c 0f 00 00 add $0xf9c,%eax
sp -= sizeof *p->tf;
801039ef: 89 53 18 mov %edx,0x18(%ebx)
*(uint*)sp = (uint)trapret;
801039f2: c7 40 14 f1 64 10 80 movl $0x801064f1,0x14(%eax)
p->context = (struct context*)sp;
801039f9: 89 43 1c mov %eax,0x1c(%ebx)
memset(p->context, 0, sizeof *p->context);
801039fc: 6a 14 push $0x14
801039fe: 6a 00 push $0x0
80103a00: 50 push %eax
80103a01: e8 da 17 00 00 call 801051e0 <memset>
p->context->eip = (uint)forkret;
80103a06: 8b 43 1c mov 0x1c(%ebx),%eax
p->creation_time = ticks + createdProcess++;
p->process_count = process_number;
process_number++;
p->lottery_ticket = 50;
p->schedQueue = LOTTERY;
return p;
80103a09: 83 c4 10 add $0x10,%esp
p->context->eip = (uint)forkret;
80103a0c: c7 40 10 90 3a 10 80 movl $0x80103a90,0x10(%eax)
p->creation_time = ticks + createdProcess++;
80103a13: a1 04 b0 10 80 mov 0x8010b004,%eax
p->lottery_ticket = 50;
80103a18: c7 43 7c 32 00 00 00 movl $0x32,0x7c(%ebx)
p->schedQueue = LOTTERY;
80103a1f: c7 83 80 00 00 00 02 movl $0x2,0x80(%ebx)
80103a26: 00 00 00
p->creation_time = ticks + createdProcess++;
80103a29: 8d 50 01 lea 0x1(%eax),%edx
80103a2c: 03 05 80 6d 11 80 add 0x80116d80,%eax
80103a32: 89 15 04 b0 10 80 mov %edx,0x8010b004
80103a38: 89 83 8c 00 00 00 mov %eax,0x8c(%ebx)
p->process_count = process_number;
80103a3e: a1 e0 3f 11 80 mov 0x80113fe0,%eax
80103a43: 89 83 90 00 00 00 mov %eax,0x90(%ebx)
process_number++;
80103a49: 83 c0 01 add $0x1,%eax
80103a4c: a3 e0 3f 11 80 mov %eax,0x80113fe0
}
80103a51: 89 d8 mov %ebx,%eax
80103a53: 8b 5d fc mov -0x4(%ebp),%ebx
80103a56: c9 leave
80103a57: c3 ret
80103a58: 90 nop
80103a59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
release(&ptable.lock);
80103a60: 83 ec 0c sub $0xc,%esp
return 0;
80103a63: 31 db xor %ebx,%ebx
release(&ptable.lock);
80103a65: 68 00 40 11 80 push $0x80114000
80103a6a: e8 21 17 00 00 call 80105190 <release>
}
80103a6f: 89 d8 mov %ebx,%eax
return 0;
80103a71: 83 c4 10 add $0x10,%esp
}
80103a74: 8b 5d fc mov -0x4(%ebp),%ebx
80103a77: c9 leave
80103a78: c3 ret
p->state = UNUSED;
80103a79: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return 0;
80103a80: 31 db xor %ebx,%ebx
80103a82: eb cd jmp 80103a51 <allocproc+0xe1>
80103a84: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103a8a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80103a90 <forkret>:
// A fork child's very first scheduling by scheduler()
// will swtch here. "Return" to user space.
void
forkret(void)
{
80103a90: 55 push %ebp
80103a91: 89 e5 mov %esp,%ebp
80103a93: 83 ec 14 sub $0x14,%esp
static int first = 1;
// Still holding ptable.lock from scheduler.
release(&ptable.lock);
80103a96: 68 00 40 11 80 push $0x80114000
80103a9b: e8 f0 16 00 00 call 80105190 <release>
if (first) {
80103aa0: a1 00 b0 10 80 mov 0x8010b000,%eax
80103aa5: 83 c4 10 add $0x10,%esp
80103aa8: 85 c0 test %eax,%eax
80103aaa: 75 04 jne 80103ab0 <forkret+0x20>
iinit(ROOTDEV);
initlog(ROOTDEV);
}
// Return to "caller", actually trapret (see allocproc).
}
80103aac: c9 leave
80103aad: c3 ret
80103aae: 66 90 xchg %ax,%ax
iinit(ROOTDEV);
80103ab0: 83 ec 0c sub $0xc,%esp
first = 0;
80103ab3: c7 05 00 b0 10 80 00 movl $0x0,0x8010b000
80103aba: 00 00 00
iinit(ROOTDEV);
80103abd: 6a 01 push $0x1
80103abf: e8 2c dd ff ff call 801017f0 <iinit>
initlog(ROOTDEV);
80103ac4: c7 04 24 01 00 00 00 movl $0x1,(%esp)
80103acb: e8 a0 f3 ff ff call 80102e70 <initlog>
80103ad0: 83 c4 10 add $0x10,%esp
}
80103ad3: c9 leave
80103ad4: c3 ret
80103ad5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103ad9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103ae0 <pinit>:
{
80103ae0: 55 push %ebp
80103ae1: 89 e5 mov %esp,%ebp
80103ae3: 83 ec 10 sub $0x10,%esp
initlock(&ptable.lock, "ptable");
80103ae6: 68 b5 82 10 80 push $0x801082b5
80103aeb: 68 00 40 11 80 push $0x80114000
80103af0: e8 9b 14 00 00 call 80104f90 <initlock>
}
80103af5: 83 c4 10 add $0x10,%esp
80103af8: c9 leave
80103af9: c3 ret
80103afa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103b00 <mycpu>:
{
80103b00: 55 push %ebp
80103b01: 89 e5 mov %esp,%ebp
80103b03: 56 push %esi
80103b04: 53 push %ebx
asm volatile("pushfl; popl %0" : "=r" (eflags));
80103b05: 9c pushf
80103b06: 58 pop %eax
if(readeflags()&FL_IF)
80103b07: f6 c4 02 test $0x2,%ah
80103b0a: 75 5e jne 80103b6a <mycpu+0x6a>
apicid = lapicid();
80103b0c: e8 8f ef ff ff call 80102aa0 <lapicid>
for (i = 0; i < ncpu; ++i) {
80103b11: 8b 35 c0 3f 11 80 mov 0x80113fc0,%esi
80103b17: 85 f6 test %esi,%esi
80103b19: 7e 42 jle 80103b5d <mycpu+0x5d>
if (cpus[i].apicid == apicid)
80103b1b: 0f b6 15 40 3a 11 80 movzbl 0x80113a40,%edx
80103b22: 39 d0 cmp %edx,%eax
80103b24: 74 30 je 80103b56 <mycpu+0x56>
80103b26: b9 f0 3a 11 80 mov $0x80113af0,%ecx
for (i = 0; i < ncpu; ++i) {
80103b2b: 31 d2 xor %edx,%edx
80103b2d: 8d 76 00 lea 0x0(%esi),%esi
80103b30: 83 c2 01 add $0x1,%edx
80103b33: 39 f2 cmp %esi,%edx
80103b35: 74 26 je 80103b5d <mycpu+0x5d>
if (cpus[i].apicid == apicid)
80103b37: 0f b6 19 movzbl (%ecx),%ebx
80103b3a: 81 c1 b0 00 00 00 add $0xb0,%ecx
80103b40: 39 c3 cmp %eax,%ebx
80103b42: 75 ec jne 80103b30 <mycpu+0x30>
80103b44: 69 c2 b0 00 00 00 imul $0xb0,%edx,%eax
80103b4a: 05 40 3a 11 80 add $0x80113a40,%eax
}
80103b4f: 8d 65 f8 lea -0x8(%ebp),%esp
80103b52: 5b pop %ebx
80103b53: 5e pop %esi
80103b54: 5d pop %ebp
80103b55: c3 ret
if (cpus[i].apicid == apicid)
80103b56: b8 40 3a 11 80 mov $0x80113a40,%eax
return &cpus[i];
80103b5b: eb f2 jmp 80103b4f <mycpu+0x4f>
panic("unknown apicid\n");
80103b5d: 83 ec 0c sub $0xc,%esp
80103b60: 68 bc 82 10 80 push $0x801082bc
80103b65: e8 26 c8 ff ff call 80100390 <panic>
panic("mycpu called with interrupts enabled\n");
80103b6a: 83 ec 0c sub $0xc,%esp
80103b6d: 68 a8 84 10 80 push $0x801084a8
80103b72: e8 19 c8 ff ff call 80100390 <panic>
80103b77: 89 f6 mov %esi,%esi
80103b79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103b80 <cpuid>:
cpuid() {
80103b80: 55 push %ebp
80103b81: 89 e5 mov %esp,%ebp
80103b83: 83 ec 08 sub $0x8,%esp
return mycpu()-cpus;
80103b86: e8 75 ff ff ff call 80103b00 <mycpu>
80103b8b: 2d 40 3a 11 80 sub $0x80113a40,%eax
}
80103b90: c9 leave
return mycpu()-cpus;
80103b91: c1 f8 04 sar $0x4,%eax
80103b94: 69 c0 a3 8b 2e ba imul $0xba2e8ba3,%eax,%eax
}
80103b9a: c3 ret
80103b9b: 90 nop
80103b9c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103ba0 <myproc>:
myproc(void) {
80103ba0: 55 push %ebp
80103ba1: 89 e5 mov %esp,%ebp
80103ba3: 53 push %ebx
80103ba4: 83 ec 04 sub $0x4,%esp
pushcli();
80103ba7: e8 54 14 00 00 call 80105000 <pushcli>
c = mycpu();
80103bac: e8 4f ff ff ff call 80103b00 <mycpu>
p = c->proc;
80103bb1: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103bb7: e8 84 14 00 00 call 80105040 <popcli>
}
80103bbc: 83 c4 04 add $0x4,%esp
80103bbf: 89 d8 mov %ebx,%eax
80103bc1: 5b pop %ebx
80103bc2: 5d pop %ebp
80103bc3: c3 ret
80103bc4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103bca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80103bd0 <userinit>:
{
80103bd0: 55 push %ebp
80103bd1: 89 e5 mov %esp,%ebp
80103bd3: 53 push %ebx
80103bd4: 83 ec 04 sub $0x4,%esp
p = allocproc();
80103bd7: e8 94 fd ff ff call 80103970 <allocproc>
80103bdc: 89 c3 mov %eax,%ebx
initproc = p;
80103bde: a3 f8 b5 10 80 mov %eax,0x8010b5f8
if((p->pgdir = setupkvm()) == 0)
80103be3: e8 d8 3e 00 00 call 80107ac0 <setupkvm>
80103be8: 85 c0 test %eax,%eax
80103bea: 89 43 04 mov %eax,0x4(%ebx)
80103bed: 0f 84 bd 00 00 00 je 80103cb0 <userinit+0xe0>
inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
80103bf3: 83 ec 04 sub $0x4,%esp
80103bf6: 68 2c 00 00 00 push $0x2c
80103bfb: 68 60 b4 10 80 push $0x8010b460
80103c00: 50 push %eax
80103c01: e8 9a 3b 00 00 call 801077a0 <inituvm>
memset(p->tf, 0, sizeof(*p->tf));
80103c06: 83 c4 0c add $0xc,%esp
p->sz = PGSIZE;
80103c09: c7 03 00 10 00 00 movl $0x1000,(%ebx)
memset(p->tf, 0, sizeof(*p->tf));
80103c0f: 6a 4c push $0x4c
80103c11: 6a 00 push $0x0
80103c13: ff 73 18 pushl 0x18(%ebx)
80103c16: e8 c5 15 00 00 call 801051e0 <memset>
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
80103c1b: 8b 43 18 mov 0x18(%ebx),%eax
80103c1e: ba 1b 00 00 00 mov $0x1b,%edx
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
80103c23: b9 23 00 00 00 mov $0x23,%ecx
safestrcpy(p->name, "initcode", sizeof(p->name));
80103c28: 83 c4 0c add $0xc,%esp
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
80103c2b: 66 89 50 3c mov %dx,0x3c(%eax)
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
80103c2f: 8b 43 18 mov 0x18(%ebx),%eax
80103c32: 66 89 48 2c mov %cx,0x2c(%eax)
p->tf->es = p->tf->ds;
80103c36: 8b 43 18 mov 0x18(%ebx),%eax
80103c39: 0f b7 50 2c movzwl 0x2c(%eax),%edx
80103c3d: 66 89 50 28 mov %dx,0x28(%eax)
p->tf->ss = p->tf->ds;
80103c41: 8b 43 18 mov 0x18(%ebx),%eax
80103c44: 0f b7 50 2c movzwl 0x2c(%eax),%edx
80103c48: 66 89 50 48 mov %dx,0x48(%eax)
p->tf->eflags = FL_IF;
80103c4c: 8b 43 18 mov 0x18(%ebx),%eax
80103c4f: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax)
p->tf->esp = PGSIZE;
80103c56: 8b 43 18 mov 0x18(%ebx),%eax
80103c59: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax)
p->tf->eip = 0; // beginning of initcode.S
80103c60: 8b 43 18 mov 0x18(%ebx),%eax
80103c63: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax)
safestrcpy(p->name, "initcode", sizeof(p->name));
80103c6a: 8d 43 6c lea 0x6c(%ebx),%eax
80103c6d: 6a 10 push $0x10
80103c6f: 68 e5 82 10 80 push $0x801082e5
80103c74: 50 push %eax
80103c75: e8 46 17 00 00 call 801053c0 <safestrcpy>
p->cwd = namei("/");
80103c7a: c7 04 24 ee 82 10 80 movl $0x801082ee,(%esp)
80103c81: e8 ca e5 ff ff call 80102250 <namei>
80103c86: 89 43 68 mov %eax,0x68(%ebx)
acquire(&ptable.lock);
80103c89: c7 04 24 00 40 11 80 movl $0x80114000,(%esp)
80103c90: e8 3b 14 00 00 call 801050d0 <acquire>
p->state = RUNNABLE;
80103c95: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
release(&ptable.lock);
80103c9c: c7 04 24 00 40 11 80 movl $0x80114000,(%esp)
80103ca3: e8 e8 14 00 00 call 80105190 <release>
}
80103ca8: 83 c4 10 add $0x10,%esp
80103cab: 8b 5d fc mov -0x4(%ebp),%ebx
80103cae: c9 leave
80103caf: c3 ret
panic("userinit: out of memory?");
80103cb0: 83 ec 0c sub $0xc,%esp
80103cb3: 68 cc 82 10 80 push $0x801082cc
80103cb8: e8 d3 c6 ff ff call 80100390 <panic>
80103cbd: 8d 76 00 lea 0x0(%esi),%esi
80103cc0 <growproc>:
{
80103cc0: 55 push %ebp
80103cc1: 89 e5 mov %esp,%ebp
80103cc3: 56 push %esi
80103cc4: 53 push %ebx
80103cc5: 8b 75 08 mov 0x8(%ebp),%esi
pushcli();
80103cc8: e8 33 13 00 00 call 80105000 <pushcli>
c = mycpu();
80103ccd: e8 2e fe ff ff call 80103b00 <mycpu>
p = c->proc;
80103cd2: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103cd8: e8 63 13 00 00 call 80105040 <popcli>
if(n > 0){
80103cdd: 83 fe 00 cmp $0x0,%esi
sz = curproc->sz;
80103ce0: 8b 03 mov (%ebx),%eax
if(n > 0){
80103ce2: 7f 1c jg 80103d00 <growproc+0x40>
} else if(n < 0){
80103ce4: 75 3a jne 80103d20 <growproc+0x60>
switchuvm(curproc);
80103ce6: 83 ec 0c sub $0xc,%esp
curproc->sz = sz;
80103ce9: 89 03 mov %eax,(%ebx)
switchuvm(curproc);
80103ceb: 53 push %ebx
80103cec: e8 9f 39 00 00 call 80107690 <switchuvm>
return 0;
80103cf1: 83 c4 10 add $0x10,%esp
80103cf4: 31 c0 xor %eax,%eax
}
80103cf6: 8d 65 f8 lea -0x8(%ebp),%esp
80103cf9: 5b pop %ebx
80103cfa: 5e pop %esi
80103cfb: 5d pop %ebp
80103cfc: c3 ret
80103cfd: 8d 76 00 lea 0x0(%esi),%esi
if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0)
80103d00: 83 ec 04 sub $0x4,%esp
80103d03: 01 c6 add %eax,%esi
80103d05: 56 push %esi
80103d06: 50 push %eax
80103d07: ff 73 04 pushl 0x4(%ebx)
80103d0a: e8 d1 3b 00 00 call 801078e0 <allocuvm>
80103d0f: 83 c4 10 add $0x10,%esp
80103d12: 85 c0 test %eax,%eax
80103d14: 75 d0 jne 80103ce6 <growproc+0x26>
return -1;
80103d16: b8 ff ff ff ff mov $0xffffffff,%eax
80103d1b: eb d9 jmp 80103cf6 <growproc+0x36>
80103d1d: 8d 76 00 lea 0x0(%esi),%esi
if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0)
80103d20: 83 ec 04 sub $0x4,%esp
80103d23: 01 c6 add %eax,%esi
80103d25: 56 push %esi
80103d26: 50 push %eax
80103d27: ff 73 04 pushl 0x4(%ebx)
80103d2a: e8 e1 3c 00 00 call 80107a10 <deallocuvm>
80103d2f: 83 c4 10 add $0x10,%esp
80103d32: 85 c0 test %eax,%eax
80103d34: 75 b0 jne 80103ce6 <growproc+0x26>
80103d36: eb de jmp 80103d16 <growproc+0x56>
80103d38: 90 nop
80103d39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103d40 <fork>:
{
80103d40: 55 push %ebp
80103d41: 89 e5 mov %esp,%ebp
80103d43: 57 push %edi
80103d44: 56 push %esi
80103d45: 53 push %ebx
80103d46: 83 ec 1c sub $0x1c,%esp
pushcli();
80103d49: e8 b2 12 00 00 call 80105000 <pushcli>
c = mycpu();
80103d4e: e8 ad fd ff ff call 80103b00 <mycpu>
p = c->proc;
80103d53: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103d59: e8 e2 12 00 00 call 80105040 <popcli>
if((np = allocproc()) == 0){
80103d5e: e8 0d fc ff ff call 80103970 <allocproc>
80103d63: 85 c0 test %eax,%eax
80103d65: 89 45 e4 mov %eax,-0x1c(%ebp)
80103d68: 0f 84 b7 00 00 00 je 80103e25 <fork+0xe5>
if((np->pgdir = copyuvm(curproc->pgdir, curproc->sz)) == 0){
80103d6e: 83 ec 08 sub $0x8,%esp
80103d71: ff 33 pushl (%ebx)
80103d73: ff 73 04 pushl 0x4(%ebx)
80103d76: 89 c7 mov %eax,%edi
80103d78: e8 13 3e 00 00 call 80107b90 <copyuvm>
80103d7d: 83 c4 10 add $0x10,%esp
80103d80: 85 c0 test %eax,%eax
80103d82: 89 47 04 mov %eax,0x4(%edi)
80103d85: 0f 84 a1 00 00 00 je 80103e2c <fork+0xec>
np->sz = curproc->sz;
80103d8b: 8b 03 mov (%ebx),%eax
80103d8d: 8b 4d e4 mov -0x1c(%ebp),%ecx
80103d90: 89 01 mov %eax,(%ecx)
np->parent = curproc;
80103d92: 89 59 14 mov %ebx,0x14(%ecx)
80103d95: 89 c8 mov %ecx,%eax
*np->tf = *curproc->tf;
80103d97: 8b 79 18 mov 0x18(%ecx),%edi
80103d9a: 8b 73 18 mov 0x18(%ebx),%esi
80103d9d: b9 13 00 00 00 mov $0x13,%ecx
80103da2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
for(i = 0; i < NOFILE; i++)
80103da4: 31 f6 xor %esi,%esi
np->tf->eax = 0;
80103da6: 8b 40 18 mov 0x18(%eax),%eax
80103da9: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
if(curproc->ofile[i])
80103db0: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax
80103db4: 85 c0 test %eax,%eax
80103db6: 74 13 je 80103dcb <fork+0x8b>
np->ofile[i] = filedup(curproc->ofile[i]);
80103db8: 83 ec 0c sub $0xc,%esp
80103dbb: 50 push %eax
80103dbc: e8 8f d3 ff ff call 80101150 <filedup>
80103dc1: 8b 55 e4 mov -0x1c(%ebp),%edx
80103dc4: 83 c4 10 add $0x10,%esp
80103dc7: 89 44 b2 28 mov %eax,0x28(%edx,%esi,4)
for(i = 0; i < NOFILE; i++)
80103dcb: 83 c6 01 add $0x1,%esi
80103dce: 83 fe 10 cmp $0x10,%esi
80103dd1: 75 dd jne 80103db0 <fork+0x70>
np->cwd = idup(curproc->cwd);
80103dd3: 83 ec 0c sub $0xc,%esp
80103dd6: ff 73 68 pushl 0x68(%ebx)
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103dd9: 83 c3 6c add $0x6c,%ebx
np->cwd = idup(curproc->cwd);
80103ddc: e8 df db ff ff call 801019c0 <idup>
80103de1: 8b 7d e4 mov -0x1c(%ebp),%edi
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103de4: 83 c4 0c add $0xc,%esp
np->cwd = idup(curproc->cwd);
80103de7: 89 47 68 mov %eax,0x68(%edi)
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80103dea: 8d 47 6c lea 0x6c(%edi),%eax
80103ded: 6a 10 push $0x10
80103def: 53 push %ebx
80103df0: 50 push %eax
80103df1: e8 ca 15 00 00 call 801053c0 <safestrcpy>
pid = np->pid;
80103df6: 8b 5f 10 mov 0x10(%edi),%ebx
acquire(&ptable.lock);
80103df9: c7 04 24 00 40 11 80 movl $0x80114000,(%esp)
80103e00: e8 cb 12 00 00 call 801050d0 <acquire>
np->state = RUNNABLE;
80103e05: c7 47 0c 03 00 00 00 movl $0x3,0xc(%edi)
release(&ptable.lock);
80103e0c: c7 04 24 00 40 11 80 movl $0x80114000,(%esp)
80103e13: e8 78 13 00 00 call 80105190 <release>
return pid;
80103e18: 83 c4 10 add $0x10,%esp
}
80103e1b: 8d 65 f4 lea -0xc(%ebp),%esp
80103e1e: 89 d8 mov %ebx,%eax
80103e20: 5b pop %ebx
80103e21: 5e pop %esi
80103e22: 5f pop %edi
80103e23: 5d pop %ebp
80103e24: c3 ret
return -1;
80103e25: bb ff ff ff ff mov $0xffffffff,%ebx
80103e2a: eb ef jmp 80103e1b <fork+0xdb>
kfree(np->kstack);
80103e2c: 8b 5d e4 mov -0x1c(%ebp),%ebx
80103e2f: 83 ec 0c sub $0xc,%esp
80103e32: ff 73 08 pushl 0x8(%ebx)
80103e35: e8 46 e8 ff ff call 80102680 <kfree>
np->kstack = 0;
80103e3a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
np->state = UNUSED;
80103e41: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return -1;
80103e48: 83 c4 10 add $0x10,%esp
80103e4b: bb ff ff ff ff mov $0xffffffff,%ebx
80103e50: eb c9 jmp 80103e1b <fork+0xdb>
80103e52: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103e59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103e60 <sched>:
{
80103e60: 55 push %ebp
80103e61: 89 e5 mov %esp,%ebp
80103e63: 56 push %esi
80103e64: 53 push %ebx
pushcli();
80103e65: e8 96 11 00 00 call 80105000 <pushcli>
c = mycpu();
80103e6a: e8 91 fc ff ff call 80103b00 <mycpu>
p = c->proc;
80103e6f: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103e75: e8 c6 11 00 00 call 80105040 <popcli>
if(!holding(&ptable.lock))
80103e7a: 83 ec 0c sub $0xc,%esp
80103e7d: 68 00 40 11 80 push $0x80114000
80103e82: e8 19 12 00 00 call 801050a0 <holding>
80103e87: 83 c4 10 add $0x10,%esp
80103e8a: 85 c0 test %eax,%eax
80103e8c: 74 4f je 80103edd <sched+0x7d>
if(mycpu()->ncli != 1)
80103e8e: e8 6d fc ff ff call 80103b00 <mycpu>
80103e93: 83 b8 a4 00 00 00 01 cmpl $0x1,0xa4(%eax)
80103e9a: 75 68 jne 80103f04 <sched+0xa4>
if(p->state == RUNNING)
80103e9c: 83 7b 0c 04 cmpl $0x4,0xc(%ebx)
80103ea0: 74 55 je 80103ef7 <sched+0x97>
80103ea2: 9c pushf
80103ea3: 58 pop %eax
if(readeflags()&FL_IF)
80103ea4: f6 c4 02 test $0x2,%ah
80103ea7: 75 41 jne 80103eea <sched+0x8a>
intena = mycpu()->intena;
80103ea9: e8 52 fc ff ff call 80103b00 <mycpu>
swtch(&p->context, mycpu()->scheduler);
80103eae: 83 c3 1c add $0x1c,%ebx
intena = mycpu()->intena;
80103eb1: 8b b0 a8 00 00 00 mov 0xa8(%eax),%esi
swtch(&p->context, mycpu()->scheduler);
80103eb7: e8 44 fc ff ff call 80103b00 <mycpu>
80103ebc: 83 ec 08 sub $0x8,%esp
80103ebf: ff 70 04 pushl 0x4(%eax)
80103ec2: 53 push %ebx
80103ec3: e8 53 15 00 00 call 8010541b <swtch>
mycpu()->intena = intena;
80103ec8: e8 33 fc ff ff call 80103b00 <mycpu>
}
80103ecd: 83 c4 10 add $0x10,%esp
mycpu()->intena = intena;
80103ed0: 89 b0 a8 00 00 00 mov %esi,0xa8(%eax)
}
80103ed6: 8d 65 f8 lea -0x8(%ebp),%esp
80103ed9: 5b pop %ebx
80103eda: 5e pop %esi
80103edb: 5d pop %ebp
80103edc: c3 ret
panic("sched ptable.lock");
80103edd: 83 ec 0c sub $0xc,%esp
80103ee0: 68 f0 82 10 80 push $0x801082f0
80103ee5: e8 a6 c4 ff ff call 80100390 <panic>
panic("sched interruptible");
80103eea: 83 ec 0c sub $0xc,%esp
80103eed: 68 1c 83 10 80 push $0x8010831c
80103ef2: e8 99 c4 ff ff call 80100390 <panic>
panic("sched running");
80103ef7: 83 ec 0c sub $0xc,%esp
80103efa: 68 0e 83 10 80 push $0x8010830e
80103eff: e8 8c c4 ff ff call 80100390 <panic>
panic("sched locks");
80103f04: 83 ec 0c sub $0xc,%esp
80103f07: 68 02 83 10 80 push $0x80108302
80103f0c: e8 7f c4 ff ff call 80100390 <panic>
80103f11: eb 0d jmp 80103f20 <exit>
80103f13: 90 nop
80103f14: 90 nop
80103f15: 90 nop
80103f16: 90 nop
80103f17: 90 nop
80103f18: 90 nop
80103f19: 90 nop
80103f1a: 90 nop
80103f1b: 90 nop
80103f1c: 90 nop
80103f1d: 90 nop
80103f1e: 90 nop
80103f1f: 90 nop
80103f20 <exit>:
{
80103f20: 55 push %ebp
80103f21: 89 e5 mov %esp,%ebp
80103f23: 57 push %edi
80103f24: 56 push %esi
80103f25: 53 push %ebx
80103f26: 83 ec 0c sub $0xc,%esp
pushcli();
80103f29: e8 d2 10 00 00 call 80105000 <pushcli>
c = mycpu();
80103f2e: e8 cd fb ff ff call 80103b00 <mycpu>
p = c->proc;
80103f33: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80103f39: e8 02 11 00 00 call 80105040 <popcli>
if(curproc == initproc)
80103f3e: 39 35 f8 b5 10 80 cmp %esi,0x8010b5f8
80103f44: 8d 5e 28 lea 0x28(%esi),%ebx
80103f47: 8d 7e 68 lea 0x68(%esi),%edi
80103f4a: 0f 84 f1 00 00 00 je 80104041 <exit+0x121>
if(curproc->ofile[fd]){
80103f50: 8b 03 mov (%ebx),%eax
80103f52: 85 c0 test %eax,%eax
80103f54: 74 12 je 80103f68 <exit+0x48>
fileclose(curproc->ofile[fd]);
80103f56: 83 ec 0c sub $0xc,%esp
80103f59: 50 push %eax
80103f5a: e8 41 d2 ff ff call 801011a0 <fileclose>
curproc->ofile[fd] = 0;
80103f5f: c7 03 00 00 00 00 movl $0x0,(%ebx)
80103f65: 83 c4 10 add $0x10,%esp
80103f68: 83 c3 04 add $0x4,%ebx
for(fd = 0; fd < NOFILE; fd++){
80103f6b: 39 fb cmp %edi,%ebx
80103f6d: 75 e1 jne 80103f50 <exit+0x30>
begin_op();
80103f6f: e8 9c ef ff ff call 80102f10 <begin_op>
iput(curproc->cwd);
80103f74: 83 ec 0c sub $0xc,%esp
80103f77: ff 76 68 pushl 0x68(%esi)
80103f7a: e8 a1 db ff ff call 80101b20 <iput>
end_op();
80103f7f: e8 fc ef ff ff call 80102f80 <end_op>
curproc->cwd = 0;
80103f84: c7 46 68 00 00 00 00 movl $0x0,0x68(%esi)
acquire(&ptable.lock);
80103f8b: c7 04 24 00 40 11 80 movl $0x80114000,(%esp)
80103f92: e8 39 11 00 00 call 801050d0 <acquire>
wakeup1(curproc->parent);
80103f97: 8b 56 14 mov 0x14(%esi),%edx
80103f9a: 83 c4 10 add $0x10,%esp
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103f9d: b8 34 40 11 80 mov $0x80114034,%eax
80103fa2: eb 10 jmp 80103fb4 <exit+0x94>
80103fa4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103fa8: 05 94 00 00 00 add $0x94,%eax
80103fad: 3d 34 65 11 80 cmp $0x80116534,%eax
80103fb2: 73 1e jae 80103fd2 <exit+0xb2>
if(p->state == SLEEPING && p->chan == chan)
80103fb4: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103fb8: 75 ee jne 80103fa8 <exit+0x88>
80103fba: 3b 50 20 cmp 0x20(%eax),%edx
80103fbd: 75 e9 jne 80103fa8 <exit+0x88>
p->state = RUNNABLE;
80103fbf: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103fc6: 05 94 00 00 00 add $0x94,%eax
80103fcb: 3d 34 65 11 80 cmp $0x80116534,%eax
80103fd0: 72 e2 jb 80103fb4 <exit+0x94>
p->parent = initproc;
80103fd2: 8b 0d f8 b5 10 80 mov 0x8010b5f8,%ecx
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103fd8: ba 34 40 11 80 mov $0x80114034,%edx
80103fdd: eb 0f jmp 80103fee <exit+0xce>
80103fdf: 90 nop
80103fe0: 81 c2 94 00 00 00 add $0x94,%edx
80103fe6: 81 fa 34 65 11 80 cmp $0x80116534,%edx
80103fec: 73 3a jae 80104028 <exit+0x108>
if(p->parent == curproc){
80103fee: 39 72 14 cmp %esi,0x14(%edx)
80103ff1: 75 ed jne 80103fe0 <exit+0xc0>
if(p->state == ZOMBIE)
80103ff3: 83 7a 0c 05 cmpl $0x5,0xc(%edx)
p->parent = initproc;
80103ff7: 89 4a 14 mov %ecx,0x14(%edx)
if(p->state == ZOMBIE)
80103ffa: 75 e4 jne 80103fe0 <exit+0xc0>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103ffc: b8 34 40 11 80 mov $0x80114034,%eax
80104001: eb 11 jmp 80104014 <exit+0xf4>
80104003: 90 nop
80104004: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104008: 05 94 00 00 00 add $0x94,%eax
8010400d: 3d 34 65 11 80 cmp $0x80116534,%eax
80104012: 73 cc jae 80103fe0 <exit+0xc0>
if(p->state == SLEEPING && p->chan == chan)
80104014: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80104018: 75 ee jne 80104008 <exit+0xe8>
8010401a: 3b 48 20 cmp 0x20(%eax),%ecx
8010401d: 75 e9 jne 80104008 <exit+0xe8>
p->state = RUNNABLE;
8010401f: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
80104026: eb e0 jmp 80104008 <exit+0xe8>
curproc->state = ZOMBIE;
80104028: c7 46 0c 05 00 00 00 movl $0x5,0xc(%esi)
sched();
8010402f: e8 2c fe ff ff call 80103e60 <sched>
panic("zombie exit");
80104034: 83 ec 0c sub $0xc,%esp
80104037: 68 3d 83 10 80 push $0x8010833d
8010403c: e8 4f c3 ff ff call 80100390 <panic>
panic("init exiting");
80104041: 83 ec 0c sub $0xc,%esp
80104044: 68 30 83 10 80 push $0x80108330
80104049: e8 42 c3 ff ff call 80100390 <panic>
8010404e: 66 90 xchg %ax,%ax
80104050 <yield>:
{
80104050: 55 push %ebp
80104051: 89 e5 mov %esp,%ebp
80104053: 53 push %ebx
80104054: 83 ec 10 sub $0x10,%esp
acquire(&ptable.lock); //DOC: yieldlock
80104057: 68 00 40 11 80 push $0x80114000
8010405c: e8 6f 10 00 00 call 801050d0 <acquire>
pushcli();
80104061: e8 9a 0f 00 00 call 80105000 <pushcli>
c = mycpu();
80104066: e8 95 fa ff ff call 80103b00 <mycpu>
p = c->proc;
8010406b: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80104071: e8 ca 0f 00 00 call 80105040 <popcli>
myproc()->state = RUNNABLE;
80104076: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
sched();
8010407d: e8 de fd ff ff call 80103e60 <sched>
release(&ptable.lock);
80104082: c7 04 24 00 40 11 80 movl $0x80114000,(%esp)
80104089: e8 02 11 00 00 call 80105190 <release>
}
8010408e: 83 c4 10 add $0x10,%esp
80104091: 8b 5d fc mov -0x4(%ebp),%ebx
80104094: c9 leave
80104095: c3 ret
80104096: 8d 76 00 lea 0x0(%esi),%esi
80104099: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801040a0 <sleep>:
{
801040a0: 55 push %ebp
801040a1: 89 e5 mov %esp,%ebp
801040a3: 57 push %edi
801040a4: 56 push %esi
801040a5: 53 push %ebx
801040a6: 83 ec 0c sub $0xc,%esp
801040a9: 8b 7d 08 mov 0x8(%ebp),%edi
801040ac: 8b 75 0c mov 0xc(%ebp),%esi
pushcli();
801040af: e8 4c 0f 00 00 call 80105000 <pushcli>
c = mycpu();
801040b4: e8 47 fa ff ff call 80103b00 <mycpu>
p = c->proc;
801040b9: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
801040bf: e8 7c 0f 00 00 call 80105040 <popcli>
if(p == 0)
801040c4: 85 db test %ebx,%ebx
801040c6: 0f 84 87 00 00 00 je 80104153 <sleep+0xb3>
if(lk == 0)
801040cc: 85 f6 test %esi,%esi
801040ce: 74 76 je 80104146 <sleep+0xa6>
if(lk != &ptable.lock){ //DOC: sleeplock0
801040d0: 81 fe 00 40 11 80 cmp $0x80114000,%esi
801040d6: 74 50 je 80104128 <sleep+0x88>
acquire(&ptable.lock); //DOC: sleeplock1
801040d8: 83 ec 0c sub $0xc,%esp
801040db: 68 00 40 11 80 push $0x80114000
801040e0: e8 eb 0f 00 00 call 801050d0 <acquire>
release(lk);
801040e5: 89 34 24 mov %esi,(%esp)
801040e8: e8 a3 10 00 00 call 80105190 <release>
p->chan = chan;
801040ed: 89 7b 20 mov %edi,0x20(%ebx)
p->state = SLEEPING;
801040f0: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx)
sched();
801040f7: e8 64 fd ff ff call 80103e60 <sched>
p->chan = 0;
801040fc: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
release(&ptable.lock);
80104103: c7 04 24 00 40 11 80 movl $0x80114000,(%esp)
8010410a: e8 81 10 00 00 call 80105190 <release>
acquire(lk);
8010410f: 89 75 08 mov %esi,0x8(%ebp)
80104112: 83 c4 10 add $0x10,%esp
}
80104115: 8d 65 f4 lea -0xc(%ebp),%esp
80104118: 5b pop %ebx
80104119: 5e pop %esi
8010411a: 5f pop %edi
8010411b: 5d pop %ebp
acquire(lk);
8010411c: e9 af 0f 00 00 jmp 801050d0 <acquire>
80104121: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
p->chan = chan;
80104128: 89 7b 20 mov %edi,0x20(%ebx)
p->state = SLEEPING;
8010412b: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx)
sched();
80104132: e8 29 fd ff ff call 80103e60 <sched>
p->chan = 0;
80104137: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
}
8010413e: 8d 65 f4 lea -0xc(%ebp),%esp
80104141: 5b pop %ebx
80104142: 5e pop %esi
80104143: 5f pop %edi
80104144: 5d pop %ebp
80104145: c3 ret
panic("sleep without lk");
80104146: 83 ec 0c sub $0xc,%esp
80104149: 68 4f 83 10 80 push $0x8010834f
8010414e: e8 3d c2 ff ff call 80100390 <panic>
panic("sleep");
80104153: 83 ec 0c sub $0xc,%esp
80104156: 68 49 83 10 80 push $0x80108349
8010415b: e8 30 c2 ff ff call 80100390 <panic>
80104160 <wait>:
{
80104160: 55 push %ebp
80104161: 89 e5 mov %esp,%ebp
80104163: 56 push %esi
80104164: 53 push %ebx
pushcli();
80104165: e8 96 0e 00 00 call 80105000 <pushcli>
c = mycpu();
8010416a: e8 91 f9 ff ff call 80103b00 <mycpu>
p = c->proc;
8010416f: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80104175: e8 c6 0e 00 00 call 80105040 <popcli>
acquire(&ptable.lock);
8010417a: 83 ec 0c sub $0xc,%esp
8010417d: 68 00 40 11 80 push $0x80114000
80104182: e8 49 0f 00 00 call 801050d0 <acquire>
80104187: 83 c4 10 add $0x10,%esp
havekids = 0;
8010418a: 31 c0 xor %eax,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
8010418c: bb 34 40 11 80 mov $0x80114034,%ebx
80104191: eb 13 jmp 801041a6 <wait+0x46>
80104193: 90 nop
80104194: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104198: 81 c3 94 00 00 00 add $0x94,%ebx
8010419e: 81 fb 34 65 11 80 cmp $0x80116534,%ebx
801041a4: 73 1e jae 801041c4 <wait+0x64>
if(p->parent != curproc)
801041a6: 39 73 14 cmp %esi,0x14(%ebx)
801041a9: 75 ed jne 80104198 <wait+0x38>
if(p->state == ZOMBIE){
801041ab: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
801041af: 74 37 je 801041e8 <wait+0x88>
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801041b1: 81 c3 94 00 00 00 add $0x94,%ebx
havekids = 1;
801041b7: b8 01 00 00 00 mov $0x1,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801041bc: 81 fb 34 65 11 80 cmp $0x80116534,%ebx
801041c2: 72 e2 jb 801041a6 <wait+0x46>
if(!havekids || curproc->killed){
801041c4: 85 c0 test %eax,%eax
801041c6: 74 76 je 8010423e <wait+0xde>
801041c8: 8b 46 24 mov 0x24(%esi),%eax
801041cb: 85 c0 test %eax,%eax
801041cd: 75 6f jne 8010423e <wait+0xde>
sleep(curproc, &ptable.lock); //DOC: wait-sleep
801041cf: 83 ec 08 sub $0x8,%esp
801041d2: 68 00 40 11 80 push $0x80114000
801041d7: 56 push %esi
801041d8: e8 c3 fe ff ff call 801040a0 <sleep>
havekids = 0;
801041dd: 83 c4 10 add $0x10,%esp
801041e0: eb a8 jmp 8010418a <wait+0x2a>
801041e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
kfree(p->kstack);
801041e8: 83 ec 0c sub $0xc,%esp
801041eb: ff 73 08 pushl 0x8(%ebx)
pid = p->pid;
801041ee: 8b 73 10 mov 0x10(%ebx),%esi
kfree(p->kstack);
801041f1: e8 8a e4 ff ff call 80102680 <kfree>
freevm(p->pgdir);
801041f6: 5a pop %edx
801041f7: ff 73 04 pushl 0x4(%ebx)
p->kstack = 0;
801041fa: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
freevm(p->pgdir);
80104201: e8 3a 38 00 00 call 80107a40 <freevm>
release(&ptable.lock);
80104206: c7 04 24 00 40 11 80 movl $0x80114000,(%esp)
p->pid = 0;
8010420d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
p->parent = 0;
80104214: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
p->name[0] = 0;
8010421b: c6 43 6c 00 movb $0x0,0x6c(%ebx)
p->killed = 0;
8010421f: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
p->state = UNUSED;
80104226: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
release(&ptable.lock);
8010422d: e8 5e 0f 00 00 call 80105190 <release>
return pid;
80104232: 83 c4 10 add $0x10,%esp
}
80104235: 8d 65 f8 lea -0x8(%ebp),%esp
80104238: 89 f0 mov %esi,%eax
8010423a: 5b pop %ebx
8010423b: 5e pop %esi
8010423c: 5d pop %ebp
8010423d: c3 ret
release(&ptable.lock);
8010423e: 83 ec 0c sub $0xc,%esp
return -1;
80104241: be ff ff ff ff mov $0xffffffff,%esi
release(&ptable.lock);
80104246: 68 00 40 11 80 push $0x80114000
8010424b: e8 40 0f 00 00 call 80105190 <release>
return -1;
80104250: 83 c4 10 add $0x10,%esp
80104253: eb e0 jmp 80104235 <wait+0xd5>
80104255: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104259: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104260 <wakeup>:
}
// Wake up all processes sleeping on chan.
void
wakeup(void *chan)
{
80104260: 55 push %ebp
80104261: 89 e5 mov %esp,%ebp
80104263: 53 push %ebx
80104264: 83 ec 10 sub $0x10,%esp
80104267: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ptable.lock);
8010426a: 68 00 40 11 80 push $0x80114000
8010426f: e8 5c 0e 00 00 call 801050d0 <acquire>
80104274: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80104277: b8 34 40 11 80 mov $0x80114034,%eax
8010427c: eb 0e jmp 8010428c <wakeup+0x2c>
8010427e: 66 90 xchg %ax,%ax
80104280: 05 94 00 00 00 add $0x94,%eax
80104285: 3d 34 65 11 80 cmp $0x80116534,%eax
8010428a: 73 1e jae 801042aa <wakeup+0x4a>
if(p->state == SLEEPING && p->chan == chan)
8010428c: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80104290: 75 ee jne 80104280 <wakeup+0x20>
80104292: 3b 58 20 cmp 0x20(%eax),%ebx
80104295: 75 e9 jne 80104280 <wakeup+0x20>
p->state = RUNNABLE;
80104297: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
8010429e: 05 94 00 00 00 add $0x94,%eax
801042a3: 3d 34 65 11 80 cmp $0x80116534,%eax
801042a8: 72 e2 jb 8010428c <wakeup+0x2c>
wakeup1(chan);
release(&ptable.lock);
801042aa: c7 45 08 00 40 11 80 movl $0x80114000,0x8(%ebp)
}
801042b1: 8b 5d fc mov -0x4(%ebp),%ebx
801042b4: c9 leave
release(&ptable.lock);
801042b5: e9 d6 0e 00 00 jmp 80105190 <release>
801042ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801042c0 <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)
{
801042c0: 55 push %ebp
801042c1: 89 e5 mov %esp,%ebp
801042c3: 53 push %ebx
801042c4: 83 ec 10 sub $0x10,%esp
801042c7: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *p;
acquire(&ptable.lock);
801042ca: 68 00 40 11 80 push $0x80114000
801042cf: e8 fc 0d 00 00 call 801050d0 <acquire>
801042d4: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801042d7: b8 34 40 11 80 mov $0x80114034,%eax
801042dc: eb 0e jmp 801042ec <kill+0x2c>
801042de: 66 90 xchg %ax,%ax
801042e0: 05 94 00 00 00 add $0x94,%eax
801042e5: 3d 34 65 11 80 cmp $0x80116534,%eax
801042ea: 73 34 jae 80104320 <kill+0x60>
if(p->pid == pid){
801042ec: 39 58 10 cmp %ebx,0x10(%eax)
801042ef: 75 ef jne 801042e0 <kill+0x20>
p->killed = 1;
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
801042f1: 83 78 0c 02 cmpl $0x2,0xc(%eax)
p->killed = 1;
801042f5: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
if(p->state == SLEEPING)
801042fc: 75 07 jne 80104305 <kill+0x45>
p->state = RUNNABLE;
801042fe: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
release(&ptable.lock);
80104305: 83 ec 0c sub $0xc,%esp
80104308: 68 00 40 11 80 push $0x80114000
8010430d: e8 7e 0e 00 00 call 80105190 <release>
return 0;
80104312: 83 c4 10 add $0x10,%esp
80104315: 31 c0 xor %eax,%eax
}
}
release(&ptable.lock);
return -1;
}
80104317: 8b 5d fc mov -0x4(%ebp),%ebx
8010431a: c9 leave
8010431b: c3 ret
8010431c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
release(&ptable.lock);
80104320: 83 ec 0c sub $0xc,%esp
80104323: 68 00 40 11 80 push $0x80114000
80104328: e8 63 0e 00 00 call 80105190 <release>
return -1;
8010432d: 83 c4 10 add $0x10,%esp
80104330: b8 ff ff ff ff mov $0xffffffff,%eax
}
80104335: 8b 5d fc mov -0x4(%ebp),%ebx
80104338: c9 leave
80104339: c3 ret
8010433a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104340 <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)
{
80104340: 55 push %ebp
80104341: 89 e5 mov %esp,%ebp
80104343: 57 push %edi
80104344: 56 push %esi
80104345: 53 push %ebx
80104346: 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++){
80104349: bb 34 40 11 80 mov $0x80114034,%ebx
{
8010434e: 83 ec 3c sub $0x3c,%esp
80104351: eb 27 jmp 8010437a <procdump+0x3a>
80104353: 90 nop
80104354: 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");
80104358: 83 ec 0c sub $0xc,%esp
8010435b: 68 9f 88 10 80 push $0x8010889f
80104360: e8 fb c2 ff ff call 80100660 <cprintf>
80104365: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104368: 81 c3 94 00 00 00 add $0x94,%ebx
8010436e: 81 fb 34 65 11 80 cmp $0x80116534,%ebx
80104374: 0f 83 86 00 00 00 jae 80104400 <procdump+0xc0>
if(p->state == UNUSED)
8010437a: 8b 43 0c mov 0xc(%ebx),%eax
8010437d: 85 c0 test %eax,%eax
8010437f: 74 e7 je 80104368 <procdump+0x28>
if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
80104381: 83 f8 05 cmp $0x5,%eax
state = "???";
80104384: ba 60 83 10 80 mov $0x80108360,%edx
if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
80104389: 77 11 ja 8010439c <procdump+0x5c>
8010438b: 8b 14 85 5c 85 10 80 mov -0x7fef7aa4(,%eax,4),%edx
state = "???";
80104392: b8 60 83 10 80 mov $0x80108360,%eax
80104397: 85 d2 test %edx,%edx
80104399: 0f 44 d0 cmove %eax,%edx
cprintf("%d %s %s", p->pid, state, p->name);
8010439c: 8d 43 6c lea 0x6c(%ebx),%eax
8010439f: 50 push %eax
801043a0: 52 push %edx
801043a1: ff 73 10 pushl 0x10(%ebx)
801043a4: 68 64 83 10 80 push $0x80108364
801043a9: e8 b2 c2 ff ff call 80100660 <cprintf>
if(p->state == SLEEPING){
801043ae: 83 c4 10 add $0x10,%esp
801043b1: 83 7b 0c 02 cmpl $0x2,0xc(%ebx)
801043b5: 75 a1 jne 80104358 <procdump+0x18>
getcallerpcs((uint*)p->context->ebp+2, pc);
801043b7: 8d 45 c0 lea -0x40(%ebp),%eax
801043ba: 83 ec 08 sub $0x8,%esp
801043bd: 8d 7d c0 lea -0x40(%ebp),%edi
801043c0: 50 push %eax
801043c1: 8b 43 1c mov 0x1c(%ebx),%eax
801043c4: 8b 40 0c mov 0xc(%eax),%eax
801043c7: 83 c0 08 add $0x8,%eax
801043ca: 50 push %eax
801043cb: e8 e0 0b 00 00 call 80104fb0 <getcallerpcs>
801043d0: 83 c4 10 add $0x10,%esp
801043d3: 90 nop
801043d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(i=0; i<10 && pc[i] != 0; i++)
801043d8: 8b 17 mov (%edi),%edx
801043da: 85 d2 test %edx,%edx
801043dc: 0f 84 76 ff ff ff je 80104358 <procdump+0x18>
cprintf(" %p", pc[i]);
801043e2: 83 ec 08 sub $0x8,%esp
801043e5: 83 c7 04 add $0x4,%edi
801043e8: 52 push %edx
801043e9: 68 a1 7d 10 80 push $0x80107da1
801043ee: e8 6d c2 ff ff call 80100660 <cprintf>
for(i=0; i<10 && pc[i] != 0; i++)
801043f3: 83 c4 10 add $0x10,%esp
801043f6: 39 fe cmp %edi,%esi
801043f8: 75 de jne 801043d8 <procdump+0x98>
801043fa: e9 59 ff ff ff jmp 80104358 <procdump+0x18>
801043ff: 90 nop
}
}
80104400: 8d 65 f4 lea -0xc(%ebp),%esp
80104403: 5b pop %ebx
80104404: 5e pop %esi
80104405: 5f pop %edi
80104406: 5d pop %ebp
80104407: c3 ret
80104408: 90 nop
80104409: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104410 <printProcess>:
void
printProcess(struct proc* p)
{
80104410: 55 push %ebp
80104411: 89 e5 mov %esp,%ebp
80104413: 53 push %ebx
80104414: 83 ec 0c sub $0xc,%esp
80104417: 8b 5d 08 mov 0x8(%ebp),%ebx
cprintf("name : %s\n", p->name);
8010441a: 8d 43 6c lea 0x6c(%ebx),%eax
8010441d: 50 push %eax
8010441e: 68 6d 83 10 80 push $0x8010836d
80104423: e8 38 c2 ff ff call 80100660 <cprintf>
cprintf("PID : %d\n",p->pid);
80104428: 58 pop %eax
80104429: 5a pop %edx
8010442a: ff 73 10 pushl 0x10(%ebx)
8010442d: 68 79 83 10 80 push $0x80108379
80104432: e8 29 c2 ff ff call 80100660 <cprintf>
cprintf("PPID : %d\n",p->parent->pid);
80104437: 59 pop %ecx
80104438: 58 pop %eax
80104439: 8b 43 14 mov 0x14(%ebx),%eax
8010443c: ff 70 10 pushl 0x10(%eax)
8010443f: 68 78 83 10 80 push $0x80108378
80104444: e8 17 c2 ff ff call 80100660 <cprintf>
switch (p->state)
80104449: 83 c4 10 add $0x10,%esp
8010444c: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
80104450: 77 6e ja 801044c0 <printProcess+0xb0>
80104452: 8b 43 0c mov 0xc(%ebx),%eax
80104455: ff 24 85 44 85 10 80 jmp *-0x7fef7abc(,%eax,4)
8010445c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
break;
case 3:
cprintf("state : RUNNABLE\n");
break;
case 4:
cprintf("state : RUNNING\n");
80104460: c7 45 08 c7 83 10 80 movl $0x801083c7,0x8(%ebp)
break;
case 5:
cprintf("state : ZOMBIE\n");
break;
}
}
80104467: 8b 5d fc mov -0x4(%ebp),%ebx
8010446a: c9 leave
cprintf("state : RUNNING\n");
8010446b: e9 f0 c1 ff ff jmp 80100660 <cprintf>
cprintf("state : ZOMBIE\n");
80104470: c7 45 08 d8 83 10 80 movl $0x801083d8,0x8(%ebp)
}
80104477: 8b 5d fc mov -0x4(%ebp),%ebx
8010447a: c9 leave
cprintf("state : ZOMBIE\n");
8010447b: e9 e0 c1 ff ff jmp 80100660 <cprintf>
cprintf("state : UNUSED\n");
80104480: c7 45 08 83 83 10 80 movl $0x80108383,0x8(%ebp)
}
80104487: 8b 5d fc mov -0x4(%ebp),%ebx
8010448a: c9 leave
cprintf("state : UNUSED\n");
8010448b: e9 d0 c1 ff ff jmp 80100660 <cprintf>
cprintf("state : EMBRYO\n");
80104490: c7 45 08 93 83 10 80 movl $0x80108393,0x8(%ebp)
}
80104497: 8b 5d fc mov -0x4(%ebp),%ebx
8010449a: c9 leave
cprintf("state : EMBRYO\n");
8010449b: e9 c0 c1 ff ff jmp 80100660 <cprintf>
cprintf("state : SLEEPING\n");
801044a0: c7 45 08 a3 83 10 80 movl $0x801083a3,0x8(%ebp)
}
801044a7: 8b 5d fc mov -0x4(%ebp),%ebx
801044aa: c9 leave
cprintf("state : SLEEPING\n");
801044ab: e9 b0 c1 ff ff jmp 80100660 <cprintf>
cprintf("state : RUNNABLE\n");
801044b0: c7 45 08 b5 83 10 80 movl $0x801083b5,0x8(%ebp)
}
801044b7: 8b 5d fc mov -0x4(%ebp),%ebx
801044ba: c9 leave
cprintf("state : RUNNABLE\n");
801044bb: e9 a0 c1 ff ff jmp 80100660 <cprintf>
}
801044c0: 8b 5d fc mov -0x4(%ebp),%ebx
801044c3: c9 leave
801044c4: c3 ret
801044c5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801044c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801044d0 <getprocs>:
int
getprocs(void)
{
801044d0: 55 push %ebp
801044d1: 89 e5 mov %esp,%ebp
801044d3: 53 push %ebx
struct proc* p;
cprintf("\n-----------------------------\n");
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801044d4: bb 34 40 11 80 mov $0x80114034,%ebx
{
801044d9: 83 ec 10 sub $0x10,%esp
cprintf("\n-----------------------------\n");
801044dc: 68 d0 84 10 80 push $0x801084d0
801044e1: e8 7a c1 ff ff call 80100660 <cprintf>
801044e6: 83 c4 10 add $0x10,%esp
801044e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
{ if (p->pid == 0)
801044f0: 8b 43 10 mov 0x10(%ebx),%eax
801044f3: 85 c0 test %eax,%eax
801044f5: 74 18 je 8010450f <getprocs+0x3f>
continue;
printProcess(p);
801044f7: 83 ec 0c sub $0xc,%esp
801044fa: 53 push %ebx
801044fb: e8 10 ff ff ff call 80104410 <printProcess>
cprintf("\n-----------------------------\n");
80104500: c7 04 24 d0 84 10 80 movl $0x801084d0,(%esp)
80104507: e8 54 c1 ff ff call 80100660 <cprintf>
8010450c: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
8010450f: 81 c3 94 00 00 00 add $0x94,%ebx
80104515: 81 fb 34 65 11 80 cmp $0x80116534,%ebx
8010451b: 72 d3 jb 801044f0 <getprocs+0x20>
}
return 23;
}
8010451d: b8 17 00 00 00 mov $0x17,%eax
80104522: 8b 5d fc mov -0x4(%ebp),%ebx
80104525: c9 leave
80104526: c3 ret
80104527: 89 f6 mov %esi,%esi
80104529: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104530 <generate_random>:
int generate_random(int toMod)
{
int random;
random = (12345678 + ticks*ticks*ticks*ticks) % toMod;
80104530: a1 80 6d 11 80 mov 0x80116d80,%eax
{
80104535: 55 push %ebp
random = (12345678 + ticks*ticks*ticks*ticks) % toMod;
80104536: 31 d2 xor %edx,%edx
{
80104538: 89 e5 mov %esp,%ebp
random = (12345678 + ticks*ticks*ticks*ticks) % toMod;
8010453a: 0f af c0 imul %eax,%eax
8010453d: 0f af c0 imul %eax,%eax
80104540: 05 4e 61 bc 00 add $0xbc614e,%eax
80104545: f7 75 08 divl 0x8(%ebp)
return random;
}
80104548: 5d pop %ebp
80104549: 89 d0 mov %edx,%eax
8010454b: c3 ret
8010454c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104550 <lotterySched>:
struct proc*
lotterySched(void){
80104550: 55 push %ebp
int sum_lotteries = 1;
int random_ticket = 0;
int isLotterySelected = 0;
struct proc *highLottery_ticket = 0; //process with highest lottery ticket
sum_lotteries = 1;
80104551: b9 01 00 00 00 mov $0x1,%ecx
isLotterySelected = 0;
// Loop over process table looking for process to run.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104556: b8 34 40 11 80 mov $0x80114034,%eax
lotterySched(void){
8010455b: 89 e5 mov %esp,%ebp
8010455d: 57 push %edi
8010455e: 56 push %esi
8010455f: 53 push %ebx
if(p->state != RUNNABLE || p->schedQueue != LOTTERY)
80104560: 83 78 0c 03 cmpl $0x3,0xc(%eax)
80104564: 75 0c jne 80104572 <lotterySched+0x22>
80104566: 83 b8 80 00 00 00 02 cmpl $0x2,0x80(%eax)
8010456d: 75 03 jne 80104572 <lotterySched+0x22>
continue;
sum_lotteries += p->lottery_ticket;
8010456f: 03 48 7c add 0x7c(%eax),%ecx
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104572: 05 94 00 00 00 add $0x94,%eax
80104577: 3d 34 65 11 80 cmp $0x80116534,%eax
8010457c: 72 e2 jb 80104560 <lotterySched+0x10>
random = (12345678 + ticks*ticks*ticks*ticks) % toMod;
8010457e: a1 80 6d 11 80 mov 0x80116d80,%eax
80104583: 31 d2 xor %edx,%edx
struct proc *highLottery_ticket = 0; //process with highest lottery ticket
80104585: 31 f6 xor %esi,%esi
isLotterySelected = 0;
80104587: 31 db xor %ebx,%ebx
80104589: bf 02 00 00 00 mov $0x2,%edi
random = (12345678 + ticks*ticks*ticks*ticks) % toMod;
8010458e: 0f af c0 imul %eax,%eax
80104591: 0f af c0 imul %eax,%eax
80104594: 05 4e 61 bc 00 add $0xbc614e,%eax
80104599: f7 f1 div %ecx
}
random_ticket = generate_random(sum_lotteries);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
8010459b: b9 34 40 11 80 mov $0x80114034,%ecx
801045a0: eb 2c jmp 801045ce <lotterySched+0x7e>
801045a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801045a8: 83 fb 01 cmp $0x1,%ebx
801045ab: 0f 94 c0 sete %al
highLottery_ticket = p;
isLotterySelected = 1;
}
if(random_ticket <= 0 && isLotterySelected == 1)
801045ae: 85 d2 test %edx,%edx
801045b0: 7f 0e jg 801045c0 <lotterySched+0x70>
801045b2: 84 c0 test %al,%al
801045b4: 0f 45 f1 cmovne %ecx,%esi
801045b7: 0f 45 df cmovne %edi,%ebx
801045ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801045c0: 81 c1 94 00 00 00 add $0x94,%ecx
801045c6: 81 f9 34 65 11 80 cmp $0x80116534,%ecx
801045cc: 73 2a jae 801045f8 <lotterySched+0xa8>
if(p->state != RUNNABLE || p->schedQueue != LOTTERY)
801045ce: 83 79 0c 03 cmpl $0x3,0xc(%ecx)
801045d2: 75 ec jne 801045c0 <lotterySched+0x70>
801045d4: 83 b9 80 00 00 00 02 cmpl $0x2,0x80(%ecx)
801045db: 75 e3 jne 801045c0 <lotterySched+0x70>
random_ticket -= p->lottery_ticket;
801045dd: 2b 51 7c sub 0x7c(%ecx),%edx
if(!isLotterySelected) {
801045e0: 85 db test %ebx,%ebx
801045e2: 75 c4 jne 801045a8 <lotterySched+0x58>
801045e4: 89 ce mov %ecx,%esi
801045e6: b8 01 00 00 00 mov $0x1,%eax
isLotterySelected = 1;
801045eb: bb 01 00 00 00 mov $0x1,%ebx
801045f0: eb bc jmp 801045ae <lotterySched+0x5e>
801045f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
}
}
if(isLotterySelected != 0) {
return highLottery_ticket;
}
return 0;
801045f8: 85 db test %ebx,%ebx
801045fa: b8 00 00 00 00 mov $0x0,%eax
801045ff: 0f 44 f0 cmove %eax,%esi
}
80104602: 5b pop %ebx
80104603: 89 f0 mov %esi,%eax
80104605: 5e pop %esi
80104606: 5f pop %edi
80104607: 5d pop %ebp
80104608: c3 ret
80104609: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104610 <prioritySched>:
struct proc*
prioritySched(void)
{
80104610: 55 push %ebp
struct proc *p;
int priorityProcessSelected = 0;
struct proc *highPriority = 0; //process with highest priority
80104611: 31 c0 xor %eax,%eax
// Enable interrupts on this processor.
priorityProcessSelected = 0;
80104613: 31 c9 xor %ecx,%ecx
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104615: ba 34 40 11 80 mov $0x80114034,%edx
{
8010461a: 89 e5 mov %esp,%ebp
8010461c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(p->state != RUNNABLE || p->schedQueue != PRIORITY)
80104620: 83 7a 0c 03 cmpl $0x3,0xc(%edx)
80104624: 75 22 jne 80104648 <prioritySched+0x38>
80104626: 83 ba 80 00 00 00 00 cmpl $0x0,0x80(%edx)
8010462d: 75 19 jne 80104648 <prioritySched+0x38>
continue;
if(!priorityProcessSelected)
8010462f: 85 c9 test %ecx,%ecx
{
highPriority = p;
priorityProcessSelected = 1;
}
if(highPriority->priority > p->priority )
80104631: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx
if(!priorityProcessSelected)
80104637: 0f 44 c2 cmove %edx,%eax
if(highPriority->priority > p->priority )
8010463a: 39 88 84 00 00 00 cmp %ecx,0x84(%eax)
80104640: b9 01 00 00 00 mov $0x1,%ecx
80104645: 0f 4f c2 cmovg %edx,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104648: 81 c2 94 00 00 00 add $0x94,%edx
8010464e: 81 fa 34 65 11 80 cmp $0x80116534,%edx
80104654: 72 ca jb 80104620 <prioritySched+0x10>
{
return highPriority;
}
return 0;
80104656: 85 c9 test %ecx,%ecx
80104658: ba 00 00 00 00 mov $0x0,%edx
8010465d: 0f 44 c2 cmove %edx,%eax
}
80104660: 5d pop %ebp
80104661: c3 ret
80104662: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104669: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104670 <SJFSched>:
// scheduling algorithm
struct proc*
SJFSched(void)
{
80104670: 55 push %ebp
struct proc *p;
int shortestProcessSelected = 0;
struct proc *shortestTime = 0; //process that come earlier
80104671: 31 c0 xor %eax,%eax
shortestProcessSelected = 0;
80104673: 31 c9 xor %ecx,%ecx
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104675: ba 34 40 11 80 mov $0x80114034,%edx
{
8010467a: 89 e5 mov %esp,%ebp
8010467c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(p->state != RUNNABLE || p->schedQueue != SJF)
80104680: 83 7a 0c 03 cmpl $0x3,0xc(%edx)
80104684: 75 22 jne 801046a8 <SJFSched+0x38>
80104686: 83 ba 80 00 00 00 01 cmpl $0x1,0x80(%edx)
8010468d: 75 19 jne 801046a8 <SJFSched+0x38>
continue;
if(!shortestProcessSelected){
8010468f: 85 c9 test %ecx,%ecx
shortestTime = p;
shortestProcessSelected = 1;
}
if(shortestTime->burst_time > p->burst_time)
80104691: 8b 8a 88 00 00 00 mov 0x88(%edx),%ecx
if(!shortestProcessSelected){
80104697: 0f 44 c2 cmove %edx,%eax
if(shortestTime->burst_time > p->burst_time)
8010469a: 39 88 88 00 00 00 cmp %ecx,0x88(%eax)
801046a0: b9 01 00 00 00 mov $0x1,%ecx
801046a5: 0f 4f c2 cmovg %edx,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801046a8: 81 c2 94 00 00 00 add $0x94,%edx
801046ae: 81 fa 34 65 11 80 cmp $0x80116534,%edx
801046b4: 72 ca jb 80104680 <SJFSched+0x10>
}
if(shortestProcessSelected)
{
return shortestTime;
}
return 0;
801046b6: 85 c9 test %ecx,%ecx
801046b8: ba 00 00 00 00 mov $0x0,%edx
801046bd: 0f 44 c2 cmove %edx,%eax
}
801046c0: 5d pop %ebp
801046c1: c3 ret
801046c2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801046c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801046d0 <find_and_set_priority>:
void find_and_set_priority(int priority , int pid)
{
801046d0: 55 push %ebp
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801046d1: b8 34 40 11 80 mov $0x80114034,%eax
{
801046d6: 89 e5 mov %esp,%ebp
801046d8: 8b 55 0c mov 0xc(%ebp),%edx
801046db: eb 0f jmp 801046ec <find_and_set_priority+0x1c>
801046dd: 8d 76 00 lea 0x0(%esi),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801046e0: 05 94 00 00 00 add $0x94,%eax
801046e5: 3d 34 65 11 80 cmp $0x80116534,%eax
801046ea: 73 0e jae 801046fa <find_and_set_priority+0x2a>
if(pid == p->pid)
801046ec: 39 50 10 cmp %edx,0x10(%eax)
801046ef: 75 ef jne 801046e0 <find_and_set_priority+0x10>
{
p -> priority = priority;
801046f1: 8b 55 08 mov 0x8(%ebp),%edx
801046f4: 89 90 84 00 00 00 mov %edx,0x84(%eax)
break;
}
}
}
801046fa: 5d pop %ebp
801046fb: c3 ret
801046fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104700 <find_and_set_lottery_ticket>:
void find_and_set_lottery_ticket(int lottery_ticket , int pid){
80104700: 55 push %ebp
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104701: b8 34 40 11 80 mov $0x80114034,%eax
void find_and_set_lottery_ticket(int lottery_ticket , int pid){
80104706: 89 e5 mov %esp,%ebp
80104708: 8b 55 0c mov 0xc(%ebp),%edx
8010470b: eb 0f jmp 8010471c <find_and_set_lottery_ticket+0x1c>
8010470d: 8d 76 00 lea 0x0(%esi),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104710: 05 94 00 00 00 add $0x94,%eax
80104715: 3d 34 65 11 80 cmp $0x80116534,%eax
8010471a: 73 0b jae 80104727 <find_and_set_lottery_ticket+0x27>
if(pid == p->pid)
8010471c: 39 50 10 cmp %edx,0x10(%eax)
8010471f: 75 ef jne 80104710 <find_and_set_lottery_ticket+0x10>
{
p -> lottery_ticket = lottery_ticket;
80104721: 8b 55 08 mov 0x8(%ebp),%edx
80104724: 89 50 7c mov %edx,0x7c(%eax)
break;
}
}
}
80104727: 5d pop %ebp
80104728: c3 ret
80104729: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104730 <find_and_set_sched_queue>:
void
find_and_set_sched_queue(int qeue_number, int pid)
{
80104730: 55 push %ebp
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104731: b8 34 40 11 80 mov $0x80114034,%eax
{
80104736: 89 e5 mov %esp,%ebp
80104738: 8b 55 0c mov 0xc(%ebp),%edx
8010473b: eb 0f jmp 8010474c <find_and_set_sched_queue+0x1c>
8010473d: 8d 76 00 lea 0x0(%esi),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104740: 05 94 00 00 00 add $0x94,%eax
80104745: 3d 34 65 11 80 cmp $0x80116534,%eax
8010474a: 73 0e jae 8010475a <find_and_set_sched_queue+0x2a>
if(pid == p->pid)
8010474c: 39 50 10 cmp %edx,0x10(%eax)
8010474f: 75 ef jne 80104740 <find_and_set_sched_queue+0x10>
{
p -> schedQueue = qeue_number;
80104751: 8b 55 08 mov 0x8(%ebp),%edx
80104754: 89 90 80 00 00 00 mov %edx,0x80(%eax)
break;
}
}
}
8010475a: 5d pop %ebp
8010475b: c3 ret
8010475c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104760 <find_and_set_burst_time>:
void
find_and_set_burst_time(int burst_time, int pid)
{
80104760: 55 push %ebp
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104761: b8 34 40 11 80 mov $0x80114034,%eax
{
80104766: 89 e5 mov %esp,%ebp
80104768: 8b 55 0c mov 0xc(%ebp),%edx
8010476b: eb 0f jmp 8010477c <find_and_set_burst_time+0x1c>
8010476d: 8d 76 00 lea 0x0(%esi),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104770: 05 94 00 00 00 add $0x94,%eax
80104775: 3d 34 65 11 80 cmp $0x80116534,%eax
8010477a: 73 0e jae 8010478a <find_and_set_burst_time+0x2a>
if(pid == p->pid)
8010477c: 39 50 10 cmp %edx,0x10(%eax)
8010477f: 75 ef jne 80104770 <find_and_set_burst_time+0x10>
{
p -> burst_time = burst_time;
80104781: 8b 55 08 mov 0x8(%ebp),%edx
80104784: 89 90 88 00 00 00 mov %edx,0x88(%eax)
break;
}
}
}
8010478a: 5d pop %ebp
8010478b: c3 ret
8010478c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104790 <print_state>:
char* print_state(int state){
80104790: 55 push %ebp
if(state == 0){
return "UNUSED";
80104791: b8 e8 83 10 80 mov $0x801083e8,%eax
char* print_state(int state){
80104796: 89 e5 mov %esp,%ebp
80104798: 8b 55 08 mov 0x8(%ebp),%edx
if(state == 0){
8010479b: 85 d2 test %edx,%edx
8010479d: 74 38 je 801047d7 <print_state+0x47>
}else if(state == 1){
8010479f: 83 fa 01 cmp $0x1,%edx
return "EMBRYO";
801047a2: b8 ef 83 10 80 mov $0x801083ef,%eax
}else if(state == 1){
801047a7: 74 2e je 801047d7 <print_state+0x47>
}else if(state == 2){
801047a9: 83 fa 02 cmp $0x2,%edx
return "SLEEPING";
801047ac: b8 f6 83 10 80 mov $0x801083f6,%eax
}else if(state == 2){
801047b1: 74 24 je 801047d7 <print_state+0x47>
}else if(state == 3){
801047b3: 83 fa 03 cmp $0x3,%edx
return "RUNNABLE";
801047b6: b8 ff 83 10 80 mov $0x801083ff,%eax
}else if(state == 3){
801047bb: 74 1a je 801047d7 <print_state+0x47>
}else if(state == 4){
801047bd: 83 fa 04 cmp $0x4,%edx
return "RUNNING";
801047c0: b8 0f 84 10 80 mov $0x8010840f,%eax
}else if(state == 4){
801047c5: 74 10 je 801047d7 <print_state+0x47>
}else if(state == 5){
return "ZOMBIE";
}else{
return "";
801047c7: 83 fa 05 cmp $0x5,%edx
801047ca: b8 08 84 10 80 mov $0x80108408,%eax
801047cf: ba a0 88 10 80 mov $0x801088a0,%edx
801047d4: 0f 45 c2 cmovne %edx,%eax
}
}
801047d7: 5d pop %ebp
801047d8: c3 ret
801047d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801047e0 <int_size>:
int int_size(int i){
801047e0: 55 push %ebp
if( i >= 1000000000) return 10;
801047e1: b8 0a 00 00 00 mov $0xa,%eax
int int_size(int i){
801047e6: 89 e5 mov %esp,%ebp
801047e8: 8b 55 08 mov 0x8(%ebp),%edx
if( i >= 1000000000) return 10;
801047eb: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx
801047f1: 7f 63 jg 80104856 <int_size+0x76>
if( i >= 100000000) return 9;
801047f3: 81 fa ff e0 f5 05 cmp $0x5f5e0ff,%edx
801047f9: b8 09 00 00 00 mov $0x9,%eax
801047fe: 7f 56 jg 80104856 <int_size+0x76>
if( i >= 10000000) return 8;
80104800: 81 fa 7f 96 98 00 cmp $0x98967f,%edx
80104806: b8 08 00 00 00 mov $0x8,%eax
8010480b: 7f 49 jg 80104856 <int_size+0x76>
if( i >= 1000000) return 7;
8010480d: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx
80104813: b8 07 00 00 00 mov $0x7,%eax
80104818: 7f 3c jg 80104856 <int_size+0x76>
if( i >= 100000) return 6;
8010481a: 81 fa 9f 86 01 00 cmp $0x1869f,%edx
80104820: b8 06 00 00 00 mov $0x6,%eax
80104825: 7f 2f jg 80104856 <int_size+0x76>
if( i >= 10000) return 5;
80104827: 81 fa 0f 27 00 00 cmp $0x270f,%edx
8010482d: b8 05 00 00 00 mov $0x5,%eax
80104832: 7f 22 jg 80104856 <int_size+0x76>
if( i >= 1000) return 4;
80104834: 81 fa e7 03 00 00 cmp $0x3e7,%edx
8010483a: b8 04 00 00 00 mov $0x4,%eax
8010483f: 7f 15 jg 80104856 <int_size+0x76>
if( i >= 100) return 3;
80104841: 83 fa 63 cmp $0x63,%edx
80104844: b8 03 00 00 00 mov $0x3,%eax
80104849: 7f 0b jg 80104856 <int_size+0x76>
if( i >= 10) return 2;
return 1;
8010484b: 31 c0 xor %eax,%eax
8010484d: 83 fa 09 cmp $0x9,%edx
80104850: 0f 9f c0 setg %al
80104853: 83 c0 01 add $0x1,%eax
}
80104856: 5d pop %ebp
80104857: c3 ret
80104858: 90 nop
80104859: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104860 <find_queue_name>:
char* find_queue_name(int queue){
80104860: 55 push %ebp
if(queue == 3){
return "PRIORITY";
80104861: b8 17 84 10 80 mov $0x80108417,%eax
char* find_queue_name(int queue){
80104866: 89 e5 mov %esp,%ebp
80104868: 8b 55 08 mov 0x8(%ebp),%edx
if(queue == 3){
8010486b: 83 fa 03 cmp $0x3,%edx
8010486e: 74 1a je 8010488a <find_queue_name+0x2a>
}else if(queue == 2){
80104870: 83 fa 02 cmp $0x2,%edx
return "SJF";
80104873: b8 28 84 10 80 mov $0x80108428,%eax
}else if(queue == 2){
80104878: 74 10 je 8010488a <find_queue_name+0x2a>
}else if(queue == 1){
return "LOTTERY";
}else{
return "";
8010487a: 83 fa 01 cmp $0x1,%edx
8010487d: b8 20 84 10 80 mov $0x80108420,%eax
80104882: ba a0 88 10 80 mov $0x801088a0,%edx
80104887: 0f 45 c2 cmovne %edx,%eax
}
}
8010488a: 5d pop %ebp
8010488b: c3 ret
8010488c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104890 <show_all_processes_scheduling>:
void
show_all_processes_scheduling()
{
80104890: 55 push %ebp
80104891: 89 e5 mov %esp,%ebp
80104893: 57 push %edi
80104894: 56 push %esi
80104895: 53 push %ebx
struct proc *p;
int name_spaces = 0;
80104896: 31 ff xor %edi,%edi
int i = 0 ;
char* state;
char* queue_name;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104898: bb 34 40 11 80 mov $0x80114034,%ebx
{
8010489d: 83 ec 1c sub $0x1c,%esp
801048a0: eb 14 jmp 801048b6 <show_all_processes_scheduling+0x26>
801048a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801048a8: 81 c3 94 00 00 00 add $0x94,%ebx
801048ae: 81 fb 34 65 11 80 cmp $0x80116534,%ebx
801048b4: 73 36 jae 801048ec <show_all_processes_scheduling+0x5c>
if(p->pid == 0)
801048b6: 8b 73 10 mov 0x10(%ebx),%esi
801048b9: 85 f6 test %esi,%esi
801048bb: 74 eb je 801048a8 <show_all_processes_scheduling+0x18>
801048bd: 8d 73 6c lea 0x6c(%ebx),%esi
continue;
if( name_spaces < strlen(p->name))
801048c0: 83 ec 0c sub $0xc,%esp
801048c3: 56 push %esi
801048c4: e8 37 0b 00 00 call 80105400 <strlen>
801048c9: 83 c4 10 add $0x10,%esp
801048cc: 39 f8 cmp %edi,%eax
801048ce: 7e d8 jle 801048a8 <show_all_processes_scheduling+0x18>
name_spaces = strlen(p->name);
801048d0: 83 ec 0c sub $0xc,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801048d3: 81 c3 94 00 00 00 add $0x94,%ebx
name_spaces = strlen(p->name);
801048d9: 56 push %esi
801048da: e8 21 0b 00 00 call 80105400 <strlen>
801048df: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801048e2: 81 fb 34 65 11 80 cmp $0x80116534,%ebx
name_spaces = strlen(p->name);
801048e8: 89 c7 mov %eax,%edi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801048ea: 72 ca jb 801048b6 <show_all_processes_scheduling+0x26>
}
cprintf("name");
801048ec: 83 ec 0c sub $0xc,%esp
801048ef: 89 7d e0 mov %edi,-0x20(%ebp)
801048f2: 89 fe mov %edi,%esi
801048f4: 68 2c 84 10 80 push $0x8010842c
for(i = 0 ; i < name_spaces - strlen("name") + 3 ; i++)
801048f9: 31 db xor %ebx,%ebx
cprintf("name");
801048fb: e8 60 bd ff ff call 80100660 <cprintf>
for(i = 0 ; i < name_spaces - strlen("name") + 3 ; i++)
80104900: 83 c4 10 add $0x10,%esp
80104903: eb 16 jmp 8010491b <show_all_processes_scheduling+0x8b>
80104905: 8d 76 00 lea 0x0(%esi),%esi
cprintf(" ");
80104908: 83 ec 0c sub $0xc,%esp
for(i = 0 ; i < name_spaces - strlen("name") + 3 ; i++)
8010490b: 83 c3 01 add $0x1,%ebx
cprintf(" ");
8010490e: 68 9c 84 10 80 push $0x8010849c
80104913: e8 48 bd ff ff call 80100660 <cprintf>
for(i = 0 ; i < name_spaces - strlen("name") + 3 ; i++)
80104918: 83 c4 10 add $0x10,%esp
8010491b: 83 ec 0c sub $0xc,%esp
8010491e: 68 2c 84 10 80 push $0x8010842c
80104923: e8 d8 0a 00 00 call 80105400 <strlen>
80104928: 89 f2 mov %esi,%edx
8010492a: 83 c4 10 add $0x10,%esp
8010492d: 29 c2 sub %eax,%edx
8010492f: 89 d0 mov %edx,%eax
80104931: 83 c0 02 add $0x2,%eax
80104934: 39 d8 cmp %ebx,%eax
80104936: 7d d0 jge 80104908 <show_all_processes_scheduling+0x78>
cprintf("pid");
80104938: 83 ec 0c sub $0xc,%esp
for(i = 0 ; i < 4; i++)
cprintf(" ");
cprintf("state");
8010493b: bb 06 00 00 00 mov $0x6,%ebx
cprintf("pid");
80104940: 68 31 84 10 80 push $0x80108431
80104945: e8 16 bd ff ff call 80100660 <cprintf>
cprintf(" ");
8010494a: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104951: e8 0a bd ff ff call 80100660 <cprintf>
80104956: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
8010495d: e8 fe bc ff ff call 80100660 <cprintf>
80104962: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104969: e8 f2 bc ff ff call 80100660 <cprintf>
8010496e: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104975: e8 e6 bc ff ff call 80100660 <cprintf>
cprintf("state");
8010497a: c7 04 24 35 84 10 80 movl $0x80108435,(%esp)
80104981: e8 da bc ff ff call 80100660 <cprintf>
80104986: 83 c4 10 add $0x10,%esp
80104989: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(i = 0 ; i < 6; i++)
cprintf(" ");
80104990: 83 ec 0c sub $0xc,%esp
80104993: 68 9c 84 10 80 push $0x8010849c
80104998: e8 c3 bc ff ff call 80100660 <cprintf>
for(i = 0 ; i < 6; i++)
8010499d: 83 c4 10 add $0x10,%esp
801049a0: 83 eb 01 sub $0x1,%ebx
801049a3: 75 eb jne 80104990 <show_all_processes_scheduling+0x100>
cprintf("queue");
801049a5: 83 ec 0c sub $0xc,%esp
cprintf("createTime");
for(i = 0 ; i < 2; i++)
cprintf(" ");
cprintf("number\n");
cprintf("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801049a8: bf 34 40 11 80 mov $0x80114034,%edi
cprintf("queue");
801049ad: 68 3b 84 10 80 push $0x8010843b
801049b2: e8 a9 bc ff ff call 80100660 <cprintf>
cprintf(" ");
801049b7: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
801049be: e8 9d bc ff ff call 80100660 <cprintf>
801049c3: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
801049ca: e8 91 bc ff ff call 80100660 <cprintf>
801049cf: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
801049d6: e8 85 bc ff ff call 80100660 <cprintf>
801049db: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
801049e2: e8 79 bc ff ff call 80100660 <cprintf>
801049e7: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
801049ee: e8 6d bc ff ff call 80100660 <cprintf>
cprintf("priority");
801049f3: c7 04 24 41 84 10 80 movl $0x80108441,(%esp)
801049fa: e8 61 bc ff ff call 80100660 <cprintf>
cprintf(" ");
801049ff: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104a06: e8 55 bc ff ff call 80100660 <cprintf>
80104a0b: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104a12: e8 49 bc ff ff call 80100660 <cprintf>
80104a17: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104a1e: e8 3d bc ff ff call 80100660 <cprintf>
cprintf("lottery");
80104a23: c7 04 24 4a 84 10 80 movl $0x8010844a,(%esp)
80104a2a: e8 31 bc ff ff call 80100660 <cprintf>
cprintf(" ");
80104a2f: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104a36: e8 25 bc ff ff call 80100660 <cprintf>
80104a3b: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104a42: e8 19 bc ff ff call 80100660 <cprintf>
80104a47: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104a4e: e8 0d bc ff ff call 80100660 <cprintf>
cprintf("burstTime");
80104a53: c7 04 24 52 84 10 80 movl $0x80108452,(%esp)
80104a5a: e8 01 bc ff ff call 80100660 <cprintf>
cprintf(" ");
80104a5f: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104a66: e8 f5 bb ff ff call 80100660 <cprintf>
80104a6b: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104a72: e8 e9 bb ff ff call 80100660 <cprintf>
80104a77: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104a7e: e8 dd bb ff ff call 80100660 <cprintf>
cprintf("createTime");
80104a83: c7 04 24 5c 84 10 80 movl $0x8010845c,(%esp)
80104a8a: e8 d1 bb ff ff call 80100660 <cprintf>
cprintf(" ");
80104a8f: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104a96: e8 c5 bb ff ff call 80100660 <cprintf>
80104a9b: c7 04 24 9c 84 10 80 movl $0x8010849c,(%esp)
80104aa2: e8 b9 bb ff ff call 80100660 <cprintf>
cprintf("number\n");
80104aa7: c7 04 24 67 84 10 80 movl $0x80108467,(%esp)
80104aae: e8 ad bb ff ff call 80100660 <cprintf>
cprintf("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
80104ab3: c7 04 24 f0 84 10 80 movl $0x801084f0,(%esp)
80104aba: e8 a1 bb ff ff call 80100660 <cprintf>
80104abf: 83 c4 10 add $0x10,%esp
80104ac2: eb 16 jmp 80104ada <show_all_processes_scheduling+0x24a>
80104ac4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104ac8: 81 c7 94 00 00 00 add $0x94,%edi
80104ace: 81 ff 34 65 11 80 cmp $0x80116534,%edi
80104ad4: 0f 83 d6 02 00 00 jae 80104db0 <show_all_processes_scheduling+0x520>
if(p->pid == 0)
80104ada: 8b 5f 10 mov 0x10(%edi),%ebx
80104add: 85 db test %ebx,%ebx
80104adf: 74 e7 je 80104ac8 <show_all_processes_scheduling+0x238>
80104ae1: 8d 77 6c lea 0x6c(%edi),%esi
continue;
cprintf("%s", p->name);
80104ae4: 83 ec 08 sub $0x8,%esp
for(i = 0 ; i < name_spaces - strlen(p->name) + 4 ; i++)
80104ae7: 31 db xor %ebx,%ebx
cprintf("%s", p->name);
80104ae9: 56 push %esi
80104aea: 68 6a 83 10 80 push $0x8010836a
80104aef: e8 6c bb ff ff call 80100660 <cprintf>
80104af4: 89 7d e4 mov %edi,-0x1c(%ebp)
for(i = 0 ; i < name_spaces - strlen(p->name) + 4 ; i++)
80104af7: 83 c4 10 add $0x10,%esp
80104afa: 8b 7d e0 mov -0x20(%ebp),%edi
80104afd: eb 14 jmp 80104b13 <show_all_processes_scheduling+0x283>
80104aff: 90 nop
cprintf(" ");
80104b00: 83 ec 0c sub $0xc,%esp
for(i = 0 ; i < name_spaces - strlen(p->name) + 4 ; i++)
80104b03: 83 c3 01 add $0x1,%ebx
cprintf(" ");
80104b06: 68 9c 84 10 80 push $0x8010849c
80104b0b: e8 50 bb ff ff call 80100660 <cprintf>
for(i = 0 ; i < name_spaces - strlen(p->name) + 4 ; i++)
80104b10: 83 c4 10 add $0x10,%esp
80104b13: 83 ec 0c sub $0xc,%esp
80104b16: 56 push %esi
80104b17: e8 e4 08 00 00 call 80105400 <strlen>
80104b1c: 89 fa mov %edi,%edx
80104b1e: 83 c4 10 add $0x10,%esp
80104b21: 29 c2 sub %eax,%edx
80104b23: 89 d0 mov %edx,%eax
80104b25: 83 c0 03 add $0x3,%eax
80104b28: 39 d8 cmp %ebx,%eax
80104b2a: 7d d4 jge 80104b00 <show_all_processes_scheduling+0x270>
80104b2c: 8b 7d e4 mov -0x1c(%ebp),%edi
cprintf("%d", p->pid);
80104b2f: 83 ec 08 sub $0x8,%esp
for(i = 0 ; i < 6 - int_size(p->pid); i++)
80104b32: 31 db xor %ebx,%ebx
cprintf("%d", p->pid);
80104b34: ff 77 10 pushl 0x10(%edi)
80104b37: 68 6f 84 10 80 push $0x8010846f
80104b3c: e8 1f bb ff ff call 80100660 <cprintf>
for(i = 0 ; i < 6 - int_size(p->pid); i++)
80104b41: 83 c4 10 add $0x10,%esp
80104b44: eb 1d jmp 80104b63 <show_all_processes_scheduling+0x2d3>
80104b46: 8d 76 00 lea 0x0(%esi),%esi
80104b49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
cprintf(" ");
80104b50: 83 ec 0c sub $0xc,%esp
for(i = 0 ; i < 6 - int_size(p->pid); i++)
80104b53: 83 c3 01 add $0x1,%ebx
cprintf(" ");
80104b56: 68 9c 84 10 80 push $0x8010849c
80104b5b: e8 00 bb ff ff call 80100660 <cprintf>
for(i = 0 ; i < 6 - int_size(p->pid); i++)
80104b60: 83 c4 10 add $0x10,%esp
80104b63: 83 ec 0c sub $0xc,%esp
80104b66: ff 77 10 pushl 0x10(%edi)
80104b69: e8 72 fc ff ff call 801047e0 <int_size>
80104b6e: b9 06 00 00 00 mov $0x6,%ecx
80104b73: 83 c4 10 add $0x10,%esp
80104b76: 29 c1 sub %eax,%ecx
80104b78: 39 d9 cmp %ebx,%ecx
80104b7a: 7f d4 jg 80104b50 <show_all_processes_scheduling+0x2c0>
state = print_state(p->state);
80104b7c: 83 ec 0c sub $0xc,%esp
80104b7f: ff 77 0c pushl 0xc(%edi)
cprintf("%s" , state);
for(i = 0 ; i < 11 - strlen(state); i++)
80104b82: 31 db xor %ebx,%ebx
state = print_state(p->state);
80104b84: e8 07 fc ff ff call 80104790 <print_state>
80104b89: 5a pop %edx
80104b8a: 59 pop %ecx
cprintf("%s" , state);
80104b8b: 50 push %eax
80104b8c: 68 6a 83 10 80 push $0x8010836a
state = print_state(p->state);
80104b91: 89 c6 mov %eax,%esi
cprintf("%s" , state);
80104b93: e8 c8 ba ff ff call 80100660 <cprintf>
for(i = 0 ; i < 11 - strlen(state); i++)
80104b98: 83 c4 10 add $0x10,%esp
80104b9b: eb 16 jmp 80104bb3 <show_all_processes_scheduling+0x323>
80104b9d: 8d 76 00 lea 0x0(%esi),%esi
cprintf(" ");
80104ba0: 83 ec 0c sub $0xc,%esp
for(i = 0 ; i < 11 - strlen(state); i++)
80104ba3: 83 c3 01 add $0x1,%ebx
cprintf(" ");
80104ba6: 68 9c 84 10 80 push $0x8010849c
80104bab: e8 b0 ba ff ff call 80100660 <cprintf>
for(i = 0 ; i < 11 - strlen(state); i++)
80104bb0: 83 c4 10 add $0x10,%esp
80104bb3: 83 ec 0c sub $0xc,%esp
80104bb6: 56 push %esi
80104bb7: e8 44 08 00 00 call 80105400 <strlen>
80104bbc: ba 0b 00 00 00 mov $0xb,%edx
80104bc1: 83 c4 10 add $0x10,%esp
80104bc4: 29 c2 sub %eax,%edx
80104bc6: 39 da cmp %ebx,%edx
80104bc8: 7f d6 jg 80104ba0 <show_all_processes_scheduling+0x310>
queue_name = find_queue_name(p->schedQueue);
80104bca: 8b 87 80 00 00 00 mov 0x80(%edi),%eax
return "PRIORITY";
80104bd0: be 17 84 10 80 mov $0x80108417,%esi
if(queue == 3){
80104bd5: 83 f8 03 cmp $0x3,%eax
80104bd8: 74 1a je 80104bf4 <show_all_processes_scheduling+0x364>
}else if(queue == 2){
80104bda: 83 f8 02 cmp $0x2,%eax
return "SJF";
80104bdd: be 28 84 10 80 mov $0x80108428,%esi
}else if(queue == 2){
80104be2: 74 10 je 80104bf4 <show_all_processes_scheduling+0x364>
return "";
80104be4: 83 f8 01 cmp $0x1,%eax
80104be7: be 20 84 10 80 mov $0x80108420,%esi
80104bec: b8 a0 88 10 80 mov $0x801088a0,%eax
80104bf1: 0f 45 f0 cmovne %eax,%esi
cprintf("%s ", queue_name);
80104bf4: 83 ec 08 sub $0x8,%esp
for(i = 0 ; i < 12 - strlen(queue_name); i++)
80104bf7: 31 db xor %ebx,%ebx
cprintf("%s ", queue_name);
80104bf9: 56 push %esi
80104bfa: 68 72 84 10 80 push $0x80108472
80104bff: e8 5c ba ff ff call 80100660 <cprintf>
for(i = 0 ; i < 12 - strlen(queue_name); i++)
80104c04: 83 c4 10 add $0x10,%esp
80104c07: eb 1a jmp 80104c23 <show_all_processes_scheduling+0x393>
80104c09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
cprintf(" ");
80104c10: 83 ec 0c sub $0xc,%esp
for(i = 0 ; i < 12 - strlen(queue_name); i++)
80104c13: 83 c3 01 add $0x1,%ebx
cprintf(" ");
80104c16: 68 9c 84 10 80 push $0x8010849c
80104c1b: e8 40 ba ff ff call 80100660 <cprintf>
for(i = 0 ; i < 12 - strlen(queue_name); i++)
80104c20: 83 c4 10 add $0x10,%esp
80104c23: 83 ec 0c sub $0xc,%esp
80104c26: 56 push %esi
80104c27: e8 d4 07 00 00 call 80105400 <strlen>
80104c2c: b9 0c 00 00 00 mov $0xc,%ecx
80104c31: 83 c4 10 add $0x10,%esp
80104c34: 29 c1 sub %eax,%ecx
80104c36: 39 d9 cmp %ebx,%ecx
80104c38: 7f d6 jg 80104c10 <show_all_processes_scheduling+0x380>
cprintf("%d ", p->priority);
80104c3a: 83 ec 08 sub $0x8,%esp
80104c3d: ff b7 84 00 00 00 pushl 0x84(%edi)
for(i = 0 ; i < 8 - int_size(p->priority); i++)
80104c43: 31 db xor %ebx,%ebx
cprintf("%d ", p->priority);
80104c45: 68 76 84 10 80 push $0x80108476
for(i = 0 ; i < 8 - int_size(p->priority); i++)
80104c4a: be 08 00 00 00 mov $0x8,%esi
cprintf("%d ", p->priority);
80104c4f: e8 0c ba ff ff call 80100660 <cprintf>
for(i = 0 ; i < 8 - int_size(p->priority); i++)
80104c54: 83 c4 10 add $0x10,%esp
80104c57: eb 1a jmp 80104c73 <show_all_processes_scheduling+0x3e3>
80104c59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
cprintf(" ");
80104c60: 83 ec 0c sub $0xc,%esp
for(i = 0 ; i < 8 - int_size(p->priority); i++)
80104c63: 83 c3 01 add $0x1,%ebx
cprintf(" ");
80104c66: 68 9c 84 10 80 push $0x8010849c
80104c6b: e8 f0 b9 ff ff call 80100660 <cprintf>
for(i = 0 ; i < 8 - int_size(p->priority); i++)
80104c70: 83 c4 10 add $0x10,%esp
80104c73: 83 ec 0c sub $0xc,%esp
80104c76: ff b7 84 00 00 00 pushl 0x84(%edi)
80104c7c: e8 5f fb ff ff call 801047e0 <int_size>
80104c81: 89 f2 mov %esi,%edx
80104c83: 83 c4 10 add $0x10,%esp
80104c86: 29 c2 sub %eax,%edx
80104c88: 39 da cmp %ebx,%edx
80104c8a: 7f d4 jg 80104c60 <show_all_processes_scheduling+0x3d0>
cprintf("%d ", p->lottery_ticket);
80104c8c: 83 ec 08 sub $0x8,%esp
80104c8f: ff 77 7c pushl 0x7c(%edi)
for(i = 0 ; i < 10 - int_size(p->lottery_ticket); i++)
80104c92: 31 db xor %ebx,%ebx
cprintf("%d ", p->lottery_ticket);
80104c94: 68 76 84 10 80 push $0x80108476
for(i = 0 ; i < 10 - int_size(p->lottery_ticket); i++)
80104c99: be 0a 00 00 00 mov $0xa,%esi
cprintf("%d ", p->lottery_ticket);
80104c9e: e8 bd b9 ff ff call 80100660 <cprintf>
for(i = 0 ; i < 10 - int_size(p->lottery_ticket); i++)
80104ca3: 83 c4 10 add $0x10,%esp
80104ca6: eb 1b jmp 80104cc3 <show_all_processes_scheduling+0x433>
80104ca8: 90 nop
80104ca9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
cprintf(" ");
80104cb0: 83 ec 0c sub $0xc,%esp
for(i = 0 ; i < 10 - int_size(p->lottery_ticket); i++)
80104cb3: 83 c3 01 add $0x1,%ebx
cprintf(" ");
80104cb6: 68 9c 84 10 80 push $0x8010849c
80104cbb: e8 a0 b9 ff ff call 80100660 <cprintf>
for(i = 0 ; i < 10 - int_size(p->lottery_ticket); i++)
80104cc0: 83 c4 10 add $0x10,%esp
80104cc3: 83 ec 0c sub $0xc,%esp
80104cc6: ff 77 7c pushl 0x7c(%edi)
80104cc9: e8 12 fb ff ff call 801047e0 <int_size>
80104cce: 89 f1 mov %esi,%ecx
80104cd0: 83 c4 10 add $0x10,%esp
80104cd3: 29 c1 sub %eax,%ecx
80104cd5: 39 d9 cmp %ebx,%ecx
80104cd7: 7f d7 jg 80104cb0 <show_all_processes_scheduling+0x420>
cprintf("%d ", p->burst_time);
80104cd9: 83 ec 08 sub $0x8,%esp
80104cdc: ff b7 88 00 00 00 pushl 0x88(%edi)
for(i = 0 ; i < 10 - int_size(p->burst_time); i++)
80104ce2: 31 db xor %ebx,%ebx
cprintf("%d ", p->burst_time);
80104ce4: 68 76 84 10 80 push $0x80108476
for(i = 0 ; i < 10 - int_size(p->burst_time); i++)
80104ce9: be 0a 00 00 00 mov $0xa,%esi
cprintf("%d ", p->burst_time);
80104cee: e8 6d b9 ff ff call 80100660 <cprintf>
for(i = 0 ; i < 10 - int_size(p->burst_time); i++)
80104cf3: 83 c4 10 add $0x10,%esp
80104cf6: eb 1b jmp 80104d13 <show_all_processes_scheduling+0x483>
80104cf8: 90 nop
80104cf9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
cprintf(" ");
80104d00: 83 ec 0c sub $0xc,%esp
for(i = 0 ; i < 10 - int_size(p->burst_time); i++)
80104d03: 83 c3 01 add $0x1,%ebx
cprintf(" ");
80104d06: 68 9c 84 10 80 push $0x8010849c
80104d0b: e8 50 b9 ff ff call 80100660 <cprintf>
for(i = 0 ; i < 10 - int_size(p->burst_time); i++)
80104d10: 83 c4 10 add $0x10,%esp
80104d13: 83 ec 0c sub $0xc,%esp
80104d16: ff b7 88 00 00 00 pushl 0x88(%edi)
80104d1c: e8 bf fa ff ff call 801047e0 <int_size>
80104d21: 89 f2 mov %esi,%edx
80104d23: 83 c4 10 add $0x10,%esp
80104d26: 29 c2 sub %eax,%edx
80104d28: 39 da cmp %ebx,%edx
80104d2a: 7f d4 jg 80104d00 <show_all_processes_scheduling+0x470>
cprintf("%d ", p->creation_time);
80104d2c: 83 ec 08 sub $0x8,%esp
80104d2f: ff b7 8c 00 00 00 pushl 0x8c(%edi)
for(i = 0 ; i < 10 - int_size(p->creation_time); i++)
80104d35: 31 db xor %ebx,%ebx
cprintf("%d ", p->creation_time);
80104d37: 68 76 84 10 80 push $0x80108476
for(i = 0 ; i < 10 - int_size(p->creation_time); i++)
80104d3c: be 0a 00 00 00 mov $0xa,%esi
cprintf("%d ", p->creation_time);
80104d41: e8 1a b9 ff ff call 80100660 <cprintf>
for(i = 0 ; i < 10 - int_size(p->creation_time); i++)
80104d46: 83 c4 10 add $0x10,%esp
80104d49: eb 18 jmp 80104d63 <show_all_processes_scheduling+0x4d3>
80104d4b: 90 nop
80104d4c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
cprintf(" ");
80104d50: 83 ec 0c sub $0xc,%esp
for(i = 0 ; i < 10 - int_size(p->creation_time); i++)
80104d53: 83 c3 01 add $0x1,%ebx
cprintf(" ");
80104d56: 68 9c 84 10 80 push $0x8010849c
80104d5b: e8 00 b9 ff ff call 80100660 <cprintf>
for(i = 0 ; i < 10 - int_size(p->creation_time); i++)
80104d60: 83 c4 10 add $0x10,%esp
80104d63: 83 ec 0c sub $0xc,%esp
80104d66: ff b7 8c 00 00 00 pushl 0x8c(%edi)
80104d6c: e8 6f fa ff ff call 801047e0 <int_size>
80104d71: 89 f1 mov %esi,%ecx
80104d73: 83 c4 10 add $0x10,%esp
80104d76: 29 c1 sub %eax,%ecx
80104d78: 39 d9 cmp %ebx,%ecx
80104d7a: 7f d4 jg 80104d50 <show_all_processes_scheduling+0x4c0>
cprintf("%d " , p->process_count);
80104d7c: 83 ec 08 sub $0x8,%esp
80104d7f: ff b7 90 00 00 00 pushl 0x90(%edi)
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104d85: 81 c7 94 00 00 00 add $0x94,%edi
cprintf("%d " , p->process_count);
80104d8b: 68 76 84 10 80 push $0x80108476
80104d90: e8 cb b8 ff ff call 80100660 <cprintf>
cprintf("\n");
80104d95: c7 04 24 9f 88 10 80 movl $0x8010889f,(%esp)
80104d9c: e8 bf b8 ff ff call 80100660 <cprintf>
80104da1: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80104da4: 81 ff 34 65 11 80 cmp $0x80116534,%edi
80104daa: 0f 82 2a fd ff ff jb 80104ada <show_all_processes_scheduling+0x24a>
}
}
80104db0: 8d 65 f4 lea -0xc(%ebp),%esp
80104db3: 5b pop %ebx
80104db4: 5e pop %esi
80104db5: 5f pop %edi
80104db6: 5d pop %ebp
80104db7: c3 ret
80104db8: 90 nop
80104db9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104dc0 <scheduler>:
void
scheduler(void)
{
80104dc0: 55 push %ebp
80104dc1: 89 e5 mov %esp,%ebp
80104dc3: 56 push %esi
80104dc4: 53 push %ebx
80104dc5: 83 ec 10 sub $0x10,%esp
struct proc *p;
struct cpu *c = mycpu();
80104dc8: e8 33 ed ff ff call 80103b00 <mycpu>
80104dcd: 89 c3 mov %eax,%ebx
c->proc = 0;
80104dcf: c7 80 ac 00 00 00 00 movl $0x0,0xac(%eax)
80104dd6: 00 00 00
80104dd9: 8d 70 04 lea 0x4(%eax),%esi
80104ddc: eb 4b jmp 80104e29 <scheduler+0x69>
80104dde: 66 90 xchg %ax,%ax
if(p !=0 ) {
// Switch to chosen process. It is the process's job
// to release ptable.lock and then reacquire it
// before jumping back to us.
c->proc = p;
switchuvm(p);
80104de0: 83 ec 0c sub $0xc,%esp
c->proc = p;
80104de3: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
switchuvm(p);
80104de9: 89 45 f4 mov %eax,-0xc(%ebp)
80104dec: 50 push %eax
80104ded: e8 9e 28 00 00 call 80107690 <switchuvm>
p->state = RUNNING;
80104df2: 8b 45 f4 mov -0xc(%ebp),%eax
80104df5: c7 40 0c 04 00 00 00 movl $0x4,0xc(%eax)
swtch(&(c->scheduler), p->context);
80104dfc: 5a pop %edx
80104dfd: 59 pop %ecx
80104dfe: ff 70 1c pushl 0x1c(%eax)
80104e01: 56 push %esi
80104e02: e8 14 06 00 00 call 8010541b <swtch>
switchkvm();
80104e07: e8 64 28 00 00 call 80107670 <switchkvm>
// Process is done running for now.
// It should have changed its p->state before coming back.
c->proc = 0;
80104e0c: c7 83 ac 00 00 00 00 movl $0x0,0xac(%ebx)
80104e13: 00 00 00
80104e16: 83 c4 10 add $0x10,%esp
}
release(&ptable.lock);
80104e19: 83 ec 0c sub $0xc,%esp
80104e1c: 68 00 40 11 80 push $0x80114000
80104e21: e8 6a 03 00 00 call 80105190 <release>
sti();
80104e26: 83 c4 10 add $0x10,%esp
asm volatile("sti");
80104e29: fb sti
acquire(&ptable.lock);
80104e2a: 83 ec 0c sub $0xc,%esp
80104e2d: 68 00 40 11 80 push $0x80114000
80104e32: e8 99 02 00 00 call 801050d0 <acquire>
p = lotterySched();
80104e37: e8 14 f7 ff ff call 80104550 <lotterySched>
if(p == 0)
80104e3c: 83 c4 10 add $0x10,%esp
80104e3f: 85 c0 test %eax,%eax
80104e41: 75 9d jne 80104de0 <scheduler+0x20>
p = SJFSched();
80104e43: e8 28 f8 ff ff call 80104670 <SJFSched>
if(p == 0)
80104e48: 85 c0 test %eax,%eax
80104e4a: 75 94 jne 80104de0 <scheduler+0x20>
p = prioritySched();
80104e4c: e8 bf f7 ff ff call 80104610 <prioritySched>
if(p !=0 ) {
80104e51: 85 c0 test %eax,%eax
80104e53: 74 c4 je 80104e19 <scheduler+0x59>
80104e55: eb 89 jmp 80104de0 <scheduler+0x20>
80104e57: 66 90 xchg %ax,%ax
80104e59: 66 90 xchg %ax,%ax
80104e5b: 66 90 xchg %ax,%ax
80104e5d: 66 90 xchg %ax,%ax
80104e5f: 90 nop
80104e60 <initsleeplock>:
#include "spinlock.h"
#include "sleeplock.h"
void
initsleeplock(struct sleeplock *lk, char *name)
{
80104e60: 55 push %ebp
80104e61: 89 e5 mov %esp,%ebp
80104e63: 53 push %ebx
80104e64: 83 ec 0c sub $0xc,%esp
80104e67: 8b 5d 08 mov 0x8(%ebp),%ebx
initlock(&lk->lk, "sleep lock");
80104e6a: 68 74 85 10 80 push $0x80108574
80104e6f: 8d 43 04 lea 0x4(%ebx),%eax
80104e72: 50 push %eax
80104e73: e8 18 01 00 00 call 80104f90 <initlock>
lk->name = name;
80104e78: 8b 45 0c mov 0xc(%ebp),%eax
lk->locked = 0;
80104e7b: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
}
80104e81: 83 c4 10 add $0x10,%esp
lk->pid = 0;
80104e84: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
lk->name = name;
80104e8b: 89 43 38 mov %eax,0x38(%ebx)
}
80104e8e: 8b 5d fc mov -0x4(%ebp),%ebx
80104e91: c9 leave
80104e92: c3 ret
80104e93: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104e99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104ea0 <acquiresleep>:
void
acquiresleep(struct sleeplock *lk)
{
80104ea0: 55 push %ebp
80104ea1: 89 e5 mov %esp,%ebp
80104ea3: 56 push %esi
80104ea4: 53 push %ebx
80104ea5: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
80104ea8: 83 ec 0c sub $0xc,%esp
80104eab: 8d 73 04 lea 0x4(%ebx),%esi
80104eae: 56 push %esi
80104eaf: e8 1c 02 00 00 call 801050d0 <acquire>
while (lk->locked) {
80104eb4: 8b 13 mov (%ebx),%edx
80104eb6: 83 c4 10 add $0x10,%esp
80104eb9: 85 d2 test %edx,%edx
80104ebb: 74 16 je 80104ed3 <acquiresleep+0x33>
80104ebd: 8d 76 00 lea 0x0(%esi),%esi
sleep(lk, &lk->lk);
80104ec0: 83 ec 08 sub $0x8,%esp
80104ec3: 56 push %esi
80104ec4: 53 push %ebx
80104ec5: e8 d6 f1 ff ff call 801040a0 <sleep>
while (lk->locked) {
80104eca: 8b 03 mov (%ebx),%eax
80104ecc: 83 c4 10 add $0x10,%esp
80104ecf: 85 c0 test %eax,%eax
80104ed1: 75 ed jne 80104ec0 <acquiresleep+0x20>
}
lk->locked = 1;
80104ed3: c7 03 01 00 00 00 movl $0x1,(%ebx)
lk->pid = myproc()->pid;
80104ed9: e8 c2 ec ff ff call 80103ba0 <myproc>
80104ede: 8b 40 10 mov 0x10(%eax),%eax
80104ee1: 89 43 3c mov %eax,0x3c(%ebx)
release(&lk->lk);
80104ee4: 89 75 08 mov %esi,0x8(%ebp)
}
80104ee7: 8d 65 f8 lea -0x8(%ebp),%esp
80104eea: 5b pop %ebx
80104eeb: 5e pop %esi
80104eec: 5d pop %ebp
release(&lk->lk);
80104eed: e9 9e 02 00 00 jmp 80105190 <release>
80104ef2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104ef9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104f00 <releasesleep>:
void
releasesleep(struct sleeplock *lk)
{
80104f00: 55 push %ebp
80104f01: 89 e5 mov %esp,%ebp
80104f03: 56 push %esi
80104f04: 53 push %ebx
80104f05: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
80104f08: 83 ec 0c sub $0xc,%esp
80104f0b: 8d 73 04 lea 0x4(%ebx),%esi
80104f0e: 56 push %esi
80104f0f: e8 bc 01 00 00 call 801050d0 <acquire>
lk->locked = 0;
80104f14: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
80104f1a: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
wakeup(lk);
80104f21: 89 1c 24 mov %ebx,(%esp)
80104f24: e8 37 f3 ff ff call 80104260 <wakeup>
release(&lk->lk);
80104f29: 89 75 08 mov %esi,0x8(%ebp)
80104f2c: 83 c4 10 add $0x10,%esp
}
80104f2f: 8d 65 f8 lea -0x8(%ebp),%esp
80104f32: 5b pop %ebx
80104f33: 5e pop %esi
80104f34: 5d pop %ebp
release(&lk->lk);
80104f35: e9 56 02 00 00 jmp 80105190 <release>
80104f3a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104f40 <holdingsleep>:
int
holdingsleep(struct sleeplock *lk)
{
80104f40: 55 push %ebp
80104f41: 89 e5 mov %esp,%ebp
80104f43: 57 push %edi
80104f44: 56 push %esi
80104f45: 53 push %ebx
80104f46: 31 ff xor %edi,%edi
80104f48: 83 ec 18 sub $0x18,%esp
80104f4b: 8b 5d 08 mov 0x8(%ebp),%ebx
int r;
acquire(&lk->lk);
80104f4e: 8d 73 04 lea 0x4(%ebx),%esi
80104f51: 56 push %esi
80104f52: e8 79 01 00 00 call 801050d0 <acquire>
r = lk->locked && (lk->pid == myproc()->pid);
80104f57: 8b 03 mov (%ebx),%eax
80104f59: 83 c4 10 add $0x10,%esp
80104f5c: 85 c0 test %eax,%eax
80104f5e: 74 13 je 80104f73 <holdingsleep+0x33>
80104f60: 8b 5b 3c mov 0x3c(%ebx),%ebx
80104f63: e8 38 ec ff ff call 80103ba0 <myproc>
80104f68: 39 58 10 cmp %ebx,0x10(%eax)
80104f6b: 0f 94 c0 sete %al
80104f6e: 0f b6 c0 movzbl %al,%eax
80104f71: 89 c7 mov %eax,%edi
release(&lk->lk);
80104f73: 83 ec 0c sub $0xc,%esp
80104f76: 56 push %esi
80104f77: e8 14 02 00 00 call 80105190 <release>
return r;
}
80104f7c: 8d 65 f4 lea -0xc(%ebp),%esp
80104f7f: 89 f8 mov %edi,%eax
80104f81: 5b pop %ebx
80104f82: 5e pop %esi
80104f83: 5f pop %edi
80104f84: 5d pop %ebp
80104f85: c3 ret
80104f86: 66 90 xchg %ax,%ax
80104f88: 66 90 xchg %ax,%ax
80104f8a: 66 90 xchg %ax,%ax
80104f8c: 66 90 xchg %ax,%ax
80104f8e: 66 90 xchg %ax,%ax
80104f90 <initlock>:
#include "proc.h"
#include "spinlock.h"
void
initlock(struct spinlock *lk, char *name)
{
80104f90: 55 push %ebp
80104f91: 89 e5 mov %esp,%ebp
80104f93: 8b 45 08 mov 0x8(%ebp),%eax
lk->name = name;
80104f96: 8b 55 0c mov 0xc(%ebp),%edx
lk->locked = 0;
80104f99: c7 00 00 00 00 00 movl $0x0,(%eax)
lk->name = name;
80104f9f: 89 50 04 mov %edx,0x4(%eax)
lk->cpu = 0;
80104fa2: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
80104fa9: 5d pop %ebp
80104faa: c3 ret
80104fab: 90 nop
80104fac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104fb0 <getcallerpcs>:
}
// Record the current call stack in pcs[] by following the %ebp chain.
void
getcallerpcs(void *v, uint pcs[])
{
80104fb0: 55 push %ebp
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80104fb1: 31 d2 xor %edx,%edx
{
80104fb3: 89 e5 mov %esp,%ebp
80104fb5: 53 push %ebx
ebp = (uint*)v - 2;
80104fb6: 8b 45 08 mov 0x8(%ebp),%eax
{
80104fb9: 8b 4d 0c mov 0xc(%ebp),%ecx
ebp = (uint*)v - 2;
80104fbc: 83 e8 08 sub $0x8,%eax
80104fbf: 90 nop
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
80104fc0: 8d 98 00 00 00 80 lea -0x80000000(%eax),%ebx
80104fc6: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx
80104fcc: 77 1a ja 80104fe8 <getcallerpcs+0x38>
break;
pcs[i] = ebp[1]; // saved %eip
80104fce: 8b 58 04 mov 0x4(%eax),%ebx
80104fd1: 89 1c 91 mov %ebx,(%ecx,%edx,4)
for(i = 0; i < 10; i++){
80104fd4: 83 c2 01 add $0x1,%edx
ebp = (uint*)ebp[0]; // saved %ebp
80104fd7: 8b 00 mov (%eax),%eax
for(i = 0; i < 10; i++){
80104fd9: 83 fa 0a cmp $0xa,%edx
80104fdc: 75 e2 jne 80104fc0 <getcallerpcs+0x10>
}
for(; i < 10; i++)
pcs[i] = 0;
}
80104fde: 5b pop %ebx
80104fdf: 5d pop %ebp
80104fe0: c3 ret
80104fe1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104fe8: 8d 04 91 lea (%ecx,%edx,4),%eax
80104feb: 83 c1 28 add $0x28,%ecx
80104fee: 66 90 xchg %ax,%ax
pcs[i] = 0;
80104ff0: c7 00 00 00 00 00 movl $0x0,(%eax)
80104ff6: 83 c0 04 add $0x4,%eax
for(; i < 10; i++)
80104ff9: 39 c1 cmp %eax,%ecx
80104ffb: 75 f3 jne 80104ff0 <getcallerpcs+0x40>
}
80104ffd: 5b pop %ebx
80104ffe: 5d pop %ebp
80104fff: c3 ret
80105000 <pushcli>:
// it takes two popcli to undo two pushcli. Also, if interrupts
// are off, then pushcli, popcli leaves them off.
void
pushcli(void)
{
80105000: 55 push %ebp
80105001: 89 e5 mov %esp,%ebp
80105003: 53 push %ebx
80105004: 83 ec 04 sub $0x4,%esp
asm volatile("pushfl; popl %0" : "=r" (eflags));
80105007: 9c pushf
80105008: 5b pop %ebx
asm volatile("cli");
80105009: fa cli
int eflags;
eflags = readeflags();
cli();
if(mycpu()->ncli == 0)
8010500a: e8 f1 ea ff ff call 80103b00 <mycpu>
8010500f: 8b 80 a4 00 00 00 mov 0xa4(%eax),%eax
80105015: 85 c0 test %eax,%eax
80105017: 75 11 jne 8010502a <pushcli+0x2a>
mycpu()->intena = eflags & FL_IF;
80105019: 81 e3 00 02 00 00 and $0x200,%ebx
8010501f: e8 dc ea ff ff call 80103b00 <mycpu>
80105024: 89 98 a8 00 00 00 mov %ebx,0xa8(%eax)
mycpu()->ncli += 1;
8010502a: e8 d1 ea ff ff call 80103b00 <mycpu>
8010502f: 83 80 a4 00 00 00 01 addl $0x1,0xa4(%eax)
}
80105036: 83 c4 04 add $0x4,%esp
80105039: 5b pop %ebx
8010503a: 5d pop %ebp
8010503b: c3 ret
8010503c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105040 <popcli>:
void
popcli(void)
{
80105040: 55 push %ebp
80105041: 89 e5 mov %esp,%ebp
80105043: 83 ec 08 sub $0x8,%esp
asm volatile("pushfl; popl %0" : "=r" (eflags));
80105046: 9c pushf
80105047: 58 pop %eax
if(readeflags()&FL_IF)
80105048: f6 c4 02 test $0x2,%ah
8010504b: 75 35 jne 80105082 <popcli+0x42>
panic("popcli - interruptible");
if(--mycpu()->ncli < 0)
8010504d: e8 ae ea ff ff call 80103b00 <mycpu>
80105052: 83 a8 a4 00 00 00 01 subl $0x1,0xa4(%eax)
80105059: 78 34 js 8010508f <popcli+0x4f>
panic("popcli");
if(mycpu()->ncli == 0 && mycpu()->intena)
8010505b: e8 a0 ea ff ff call 80103b00 <mycpu>
80105060: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx
80105066: 85 d2 test %edx,%edx
80105068: 74 06 je 80105070 <popcli+0x30>
sti();
}
8010506a: c9 leave
8010506b: c3 ret
8010506c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(mycpu()->ncli == 0 && mycpu()->intena)
80105070: e8 8b ea ff ff call 80103b00 <mycpu>
80105075: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax
8010507b: 85 c0 test %eax,%eax
8010507d: 74 eb je 8010506a <popcli+0x2a>
asm volatile("sti");
8010507f: fb sti
}
80105080: c9 leave
80105081: c3 ret
panic("popcli - interruptible");
80105082: 83 ec 0c sub $0xc,%esp
80105085: 68 7f 85 10 80 push $0x8010857f
8010508a: e8 01 b3 ff ff call 80100390 <panic>
panic("popcli");
8010508f: 83 ec 0c sub $0xc,%esp
80105092: 68 96 85 10 80 push $0x80108596
80105097: e8 f4 b2 ff ff call 80100390 <panic>
8010509c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801050a0 <holding>:
{
801050a0: 55 push %ebp
801050a1: 89 e5 mov %esp,%ebp
801050a3: 56 push %esi
801050a4: 53 push %ebx
801050a5: 8b 75 08 mov 0x8(%ebp),%esi
801050a8: 31 db xor %ebx,%ebx
pushcli();
801050aa: e8 51 ff ff ff call 80105000 <pushcli>
r = lock->locked && lock->cpu == mycpu();
801050af: 8b 06 mov (%esi),%eax
801050b1: 85 c0 test %eax,%eax
801050b3: 74 10 je 801050c5 <holding+0x25>
801050b5: 8b 5e 08 mov 0x8(%esi),%ebx
801050b8: e8 43 ea ff ff call 80103b00 <mycpu>
801050bd: 39 c3 cmp %eax,%ebx
801050bf: 0f 94 c3 sete %bl
801050c2: 0f b6 db movzbl %bl,%ebx
popcli();
801050c5: e8 76 ff ff ff call 80105040 <popcli>
}
801050ca: 89 d8 mov %ebx,%eax
801050cc: 5b pop %ebx
801050cd: 5e pop %esi
801050ce: 5d pop %ebp
801050cf: c3 ret
801050d0 <acquire>:
{
801050d0: 55 push %ebp
801050d1: 89 e5 mov %esp,%ebp
801050d3: 56 push %esi
801050d4: 53 push %ebx
pushcli(); // disable interrupts to avoid deadlock.
801050d5: e8 26 ff ff ff call 80105000 <pushcli>
if(holding(lk))
801050da: 8b 5d 08 mov 0x8(%ebp),%ebx
801050dd: 83 ec 0c sub $0xc,%esp
801050e0: 53 push %ebx
801050e1: e8 ba ff ff ff call 801050a0 <holding>
801050e6: 83 c4 10 add $0x10,%esp
801050e9: 85 c0 test %eax,%eax
801050eb: 0f 85 83 00 00 00 jne 80105174 <acquire+0xa4>
801050f1: 89 c6 mov %eax,%esi
asm volatile("lock; xchgl %0, %1" :
801050f3: ba 01 00 00 00 mov $0x1,%edx
801050f8: eb 09 jmp 80105103 <acquire+0x33>
801050fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105100: 8b 5d 08 mov 0x8(%ebp),%ebx
80105103: 89 d0 mov %edx,%eax
80105105: f0 87 03 lock xchg %eax,(%ebx)
while(xchg(&lk->locked, 1) != 0)
80105108: 85 c0 test %eax,%eax
8010510a: 75 f4 jne 80105100 <acquire+0x30>
__sync_synchronize();
8010510c: f0 83 0c 24 00 lock orl $0x0,(%esp)
lk->cpu = mycpu();
80105111: 8b 5d 08 mov 0x8(%ebp),%ebx
80105114: e8 e7 e9 ff ff call 80103b00 <mycpu>
getcallerpcs(&lk, lk->pcs);
80105119: 8d 53 0c lea 0xc(%ebx),%edx
lk->cpu = mycpu();
8010511c: 89 43 08 mov %eax,0x8(%ebx)
ebp = (uint*)v - 2;
8010511f: 89 e8 mov %ebp,%eax
80105121: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
80105128: 8d 88 00 00 00 80 lea -0x80000000(%eax),%ecx
8010512e: 81 f9 fe ff ff 7f cmp $0x7ffffffe,%ecx
80105134: 77 1a ja 80105150 <acquire+0x80>
pcs[i] = ebp[1]; // saved %eip
80105136: 8b 48 04 mov 0x4(%eax),%ecx
80105139: 89 0c b2 mov %ecx,(%edx,%esi,4)
for(i = 0; i < 10; i++){
8010513c: 83 c6 01 add $0x1,%esi
ebp = (uint*)ebp[0]; // saved %ebp
8010513f: 8b 00 mov (%eax),%eax
for(i = 0; i < 10; i++){
80105141: 83 fe 0a cmp $0xa,%esi
80105144: 75 e2 jne 80105128 <acquire+0x58>
}
80105146: 8d 65 f8 lea -0x8(%ebp),%esp
80105149: 5b pop %ebx
8010514a: 5e pop %esi
8010514b: 5d pop %ebp
8010514c: c3 ret
8010514d: 8d 76 00 lea 0x0(%esi),%esi
80105150: 8d 04 b2 lea (%edx,%esi,4),%eax
80105153: 83 c2 28 add $0x28,%edx
80105156: 8d 76 00 lea 0x0(%esi),%esi
80105159: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
pcs[i] = 0;
80105160: c7 00 00 00 00 00 movl $0x0,(%eax)
80105166: 83 c0 04 add $0x4,%eax
for(; i < 10; i++)
80105169: 39 d0 cmp %edx,%eax
8010516b: 75 f3 jne 80105160 <acquire+0x90>
}
8010516d: 8d 65 f8 lea -0x8(%ebp),%esp
80105170: 5b pop %ebx
80105171: 5e pop %esi
80105172: 5d pop %ebp
80105173: c3 ret
panic("acquire");
80105174: 83 ec 0c sub $0xc,%esp
80105177: 68 9d 85 10 80 push $0x8010859d
8010517c: e8 0f b2 ff ff call 80100390 <panic>
80105181: eb 0d jmp 80105190 <release>
80105183: 90 nop
80105184: 90 nop
80105185: 90 nop
80105186: 90 nop
80105187: 90 nop
80105188: 90 nop
80105189: 90 nop
8010518a: 90 nop
8010518b: 90 nop
8010518c: 90 nop
8010518d: 90 nop
8010518e: 90 nop
8010518f: 90 nop
80105190 <release>:
{
80105190: 55 push %ebp
80105191: 89 e5 mov %esp,%ebp
80105193: 53 push %ebx
80105194: 83 ec 10 sub $0x10,%esp
80105197: 8b 5d 08 mov 0x8(%ebp),%ebx
if(!holding(lk))
8010519a: 53 push %ebx
8010519b: e8 00 ff ff ff call 801050a0 <holding>
801051a0: 83 c4 10 add $0x10,%esp
801051a3: 85 c0 test %eax,%eax
801051a5: 74 22 je 801051c9 <release+0x39>
lk->pcs[0] = 0;
801051a7: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
lk->cpu = 0;
801051ae: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
__sync_synchronize();
801051b5: f0 83 0c 24 00 lock orl $0x0,(%esp)
asm volatile("movl $0, %0" : "+m" (lk->locked) : );
801051ba: c7 03 00 00 00 00 movl $0x0,(%ebx)
}
801051c0: 8b 5d fc mov -0x4(%ebp),%ebx
801051c3: c9 leave
popcli();
801051c4: e9 77 fe ff ff jmp 80105040 <popcli>
panic("release");
801051c9: 83 ec 0c sub $0xc,%esp
801051cc: 68 a5 85 10 80 push $0x801085a5
801051d1: e8 ba b1 ff ff call 80100390 <panic>
801051d6: 66 90 xchg %ax,%ax
801051d8: 66 90 xchg %ax,%ax
801051da: 66 90 xchg %ax,%ax
801051dc: 66 90 xchg %ax,%ax
801051de: 66 90 xchg %ax,%ax
801051e0 <memset>:
#include "types.h"
#include "x86.h"
void*
memset(void *dst, int c, uint n)
{
801051e0: 55 push %ebp
801051e1: 89 e5 mov %esp,%ebp
801051e3: 57 push %edi
801051e4: 53 push %ebx
801051e5: 8b 55 08 mov 0x8(%ebp),%edx
801051e8: 8b 4d 10 mov 0x10(%ebp),%ecx
if ((int)dst%4 == 0 && n%4 == 0){
801051eb: f6 c2 03 test $0x3,%dl
801051ee: 75 05 jne 801051f5 <memset+0x15>
801051f0: f6 c1 03 test $0x3,%cl
801051f3: 74 13 je 80105208 <memset+0x28>
asm volatile("cld; rep stosb" :
801051f5: 89 d7 mov %edx,%edi
801051f7: 8b 45 0c mov 0xc(%ebp),%eax
801051fa: fc cld
801051fb: f3 aa rep stos %al,%es:(%edi)
c &= 0xFF;
stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4);
} else
stosb(dst, c, n);
return dst;
}
801051fd: 5b pop %ebx
801051fe: 89 d0 mov %edx,%eax
80105200: 5f pop %edi
80105201: 5d pop %ebp
80105202: c3 ret
80105203: 90 nop
80105204: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
c &= 0xFF;
80105208: 0f b6 7d 0c movzbl 0xc(%ebp),%edi
stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4);
8010520c: c1 e9 02 shr $0x2,%ecx
8010520f: 89 f8 mov %edi,%eax
80105211: 89 fb mov %edi,%ebx
80105213: c1 e0 18 shl $0x18,%eax
80105216: c1 e3 10 shl $0x10,%ebx
80105219: 09 d8 or %ebx,%eax
8010521b: 09 f8 or %edi,%eax
8010521d: c1 e7 08 shl $0x8,%edi
80105220: 09 f8 or %edi,%eax
asm volatile("cld; rep stosl" :
80105222: 89 d7 mov %edx,%edi
80105224: fc cld
80105225: f3 ab rep stos %eax,%es:(%edi)
}
80105227: 5b pop %ebx
80105228: 89 d0 mov %edx,%eax
8010522a: 5f pop %edi
8010522b: 5d pop %ebp
8010522c: c3 ret
8010522d: 8d 76 00 lea 0x0(%esi),%esi
80105230 <memcmp>:
int
memcmp(const void *v1, const void *v2, uint n)
{
80105230: 55 push %ebp
80105231: 89 e5 mov %esp,%ebp
80105233: 57 push %edi
80105234: 56 push %esi
80105235: 53 push %ebx
80105236: 8b 5d 10 mov 0x10(%ebp),%ebx
80105239: 8b 75 08 mov 0x8(%ebp),%esi
8010523c: 8b 7d 0c mov 0xc(%ebp),%edi
const uchar *s1, *s2;
s1 = v1;
s2 = v2;
while(n-- > 0){
8010523f: 85 db test %ebx,%ebx
80105241: 74 29 je 8010526c <memcmp+0x3c>
if(*s1 != *s2)
80105243: 0f b6 16 movzbl (%esi),%edx
80105246: 0f b6 0f movzbl (%edi),%ecx
80105249: 38 d1 cmp %dl,%cl
8010524b: 75 2b jne 80105278 <memcmp+0x48>
8010524d: b8 01 00 00 00 mov $0x1,%eax
80105252: eb 14 jmp 80105268 <memcmp+0x38>
80105254: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105258: 0f b6 14 06 movzbl (%esi,%eax,1),%edx
8010525c: 83 c0 01 add $0x1,%eax
8010525f: 0f b6 4c 07 ff movzbl -0x1(%edi,%eax,1),%ecx
80105264: 38 ca cmp %cl,%dl
80105266: 75 10 jne 80105278 <memcmp+0x48>
while(n-- > 0){
80105268: 39 d8 cmp %ebx,%eax
8010526a: 75 ec jne 80105258 <memcmp+0x28>
return *s1 - *s2;
s1++, s2++;
}
return 0;
}
8010526c: 5b pop %ebx
return 0;
8010526d: 31 c0 xor %eax,%eax
}
8010526f: 5e pop %esi
80105270: 5f pop %edi
80105271: 5d pop %ebp
80105272: c3 ret
80105273: 90 nop
80105274: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return *s1 - *s2;
80105278: 0f b6 c2 movzbl %dl,%eax
}
8010527b: 5b pop %ebx
return *s1 - *s2;
8010527c: 29 c8 sub %ecx,%eax
}
8010527e: 5e pop %esi
8010527f: 5f pop %edi
80105280: 5d pop %ebp
80105281: c3 ret
80105282: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105289: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105290 <memmove>:
void*
memmove(void *dst, const void *src, uint n)
{
80105290: 55 push %ebp
80105291: 89 e5 mov %esp,%ebp
80105293: 56 push %esi
80105294: 53 push %ebx
80105295: 8b 45 08 mov 0x8(%ebp),%eax
80105298: 8b 5d 0c mov 0xc(%ebp),%ebx
8010529b: 8b 75 10 mov 0x10(%ebp),%esi
const char *s;
char *d;
s = src;
d = dst;
if(s < d && s + n > d){
8010529e: 39 c3 cmp %eax,%ebx
801052a0: 73 26 jae 801052c8 <memmove+0x38>
801052a2: 8d 0c 33 lea (%ebx,%esi,1),%ecx
801052a5: 39 c8 cmp %ecx,%eax
801052a7: 73 1f jae 801052c8 <memmove+0x38>
s += n;
d += n;
while(n-- > 0)
801052a9: 85 f6 test %esi,%esi
801052ab: 8d 56 ff lea -0x1(%esi),%edx
801052ae: 74 0f je 801052bf <memmove+0x2f>
*--d = *--s;
801052b0: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
801052b4: 88 0c 10 mov %cl,(%eax,%edx,1)
while(n-- > 0)
801052b7: 83 ea 01 sub $0x1,%edx
801052ba: 83 fa ff cmp $0xffffffff,%edx
801052bd: 75 f1 jne 801052b0 <memmove+0x20>
} else
while(n-- > 0)
*d++ = *s++;
return dst;
}
801052bf: 5b pop %ebx
801052c0: 5e pop %esi
801052c1: 5d pop %ebp
801052c2: c3 ret
801052c3: 90 nop
801052c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
while(n-- > 0)
801052c8: 31 d2 xor %edx,%edx
801052ca: 85 f6 test %esi,%esi
801052cc: 74 f1 je 801052bf <memmove+0x2f>
801052ce: 66 90 xchg %ax,%ax
*d++ = *s++;
801052d0: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
801052d4: 88 0c 10 mov %cl,(%eax,%edx,1)
801052d7: 83 c2 01 add $0x1,%edx
while(n-- > 0)
801052da: 39 d6 cmp %edx,%esi
801052dc: 75 f2 jne 801052d0 <memmove+0x40>
}
801052de: 5b pop %ebx
801052df: 5e pop %esi
801052e0: 5d pop %ebp
801052e1: c3 ret
801052e2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801052e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801052f0 <memcpy>:
// memcpy exists to placate GCC. Use memmove.
void*
memcpy(void *dst, const void *src, uint n)
{
801052f0: 55 push %ebp
801052f1: 89 e5 mov %esp,%ebp
return memmove(dst, src, n);
}
801052f3: 5d pop %ebp
return memmove(dst, src, n);
801052f4: eb 9a jmp 80105290 <memmove>
801052f6: 8d 76 00 lea 0x0(%esi),%esi
801052f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105300 <strncmp>:
int
strncmp(const char *p, const char *q, uint n)
{
80105300: 55 push %ebp
80105301: 89 e5 mov %esp,%ebp
80105303: 57 push %edi
80105304: 56 push %esi
80105305: 8b 7d 10 mov 0x10(%ebp),%edi
80105308: 53 push %ebx
80105309: 8b 4d 08 mov 0x8(%ebp),%ecx
8010530c: 8b 75 0c mov 0xc(%ebp),%esi
while(n > 0 && *p && *p == *q)
8010530f: 85 ff test %edi,%edi
80105311: 74 2f je 80105342 <strncmp+0x42>
80105313: 0f b6 01 movzbl (%ecx),%eax
80105316: 0f b6 1e movzbl (%esi),%ebx
80105319: 84 c0 test %al,%al
8010531b: 74 37 je 80105354 <strncmp+0x54>
8010531d: 38 c3 cmp %al,%bl
8010531f: 75 33 jne 80105354 <strncmp+0x54>
80105321: 01 f7 add %esi,%edi
80105323: eb 13 jmp 80105338 <strncmp+0x38>
80105325: 8d 76 00 lea 0x0(%esi),%esi
80105328: 0f b6 01 movzbl (%ecx),%eax
8010532b: 84 c0 test %al,%al
8010532d: 74 21 je 80105350 <strncmp+0x50>
8010532f: 0f b6 1a movzbl (%edx),%ebx
80105332: 89 d6 mov %edx,%esi
80105334: 38 d8 cmp %bl,%al
80105336: 75 1c jne 80105354 <strncmp+0x54>
n--, p++, q++;
80105338: 8d 56 01 lea 0x1(%esi),%edx
8010533b: 83 c1 01 add $0x1,%ecx
while(n > 0 && *p && *p == *q)
8010533e: 39 fa cmp %edi,%edx
80105340: 75 e6 jne 80105328 <strncmp+0x28>
if(n == 0)
return 0;
return (uchar)*p - (uchar)*q;
}
80105342: 5b pop %ebx
return 0;
80105343: 31 c0 xor %eax,%eax
}
80105345: 5e pop %esi
80105346: 5f pop %edi
80105347: 5d pop %ebp
80105348: c3 ret
80105349: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105350: 0f b6 5e 01 movzbl 0x1(%esi),%ebx
return (uchar)*p - (uchar)*q;
80105354: 29 d8 sub %ebx,%eax
}
80105356: 5b pop %ebx
80105357: 5e pop %esi
80105358: 5f pop %edi
80105359: 5d pop %ebp
8010535a: c3 ret
8010535b: 90 nop
8010535c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105360 <strncpy>:
char*
strncpy(char *s, const char *t, int n)
{
80105360: 55 push %ebp
80105361: 89 e5 mov %esp,%ebp
80105363: 56 push %esi
80105364: 53 push %ebx
80105365: 8b 45 08 mov 0x8(%ebp),%eax
80105368: 8b 5d 0c mov 0xc(%ebp),%ebx
8010536b: 8b 4d 10 mov 0x10(%ebp),%ecx
char *os;
os = s;
while(n-- > 0 && (*s++ = *t++) != 0)
8010536e: 89 c2 mov %eax,%edx
80105370: eb 19 jmp 8010538b <strncpy+0x2b>
80105372: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105378: 83 c3 01 add $0x1,%ebx
8010537b: 0f b6 4b ff movzbl -0x1(%ebx),%ecx
8010537f: 83 c2 01 add $0x1,%edx
80105382: 84 c9 test %cl,%cl
80105384: 88 4a ff mov %cl,-0x1(%edx)
80105387: 74 09 je 80105392 <strncpy+0x32>
80105389: 89 f1 mov %esi,%ecx
8010538b: 85 c9 test %ecx,%ecx
8010538d: 8d 71 ff lea -0x1(%ecx),%esi
80105390: 7f e6 jg 80105378 <strncpy+0x18>
;
while(n-- > 0)
80105392: 31 c9 xor %ecx,%ecx
80105394: 85 f6 test %esi,%esi
80105396: 7e 17 jle 801053af <strncpy+0x4f>
80105398: 90 nop
80105399: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
*s++ = 0;
801053a0: c6 04 0a 00 movb $0x0,(%edx,%ecx,1)
801053a4: 89 f3 mov %esi,%ebx
801053a6: 83 c1 01 add $0x1,%ecx
801053a9: 29 cb sub %ecx,%ebx
while(n-- > 0)
801053ab: 85 db test %ebx,%ebx
801053ad: 7f f1 jg 801053a0 <strncpy+0x40>
return os;
}
801053af: 5b pop %ebx
801053b0: 5e pop %esi
801053b1: 5d pop %ebp
801053b2: c3 ret
801053b3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801053b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801053c0 <safestrcpy>:
// Like strncpy but guaranteed to NUL-terminate.
char*
safestrcpy(char *s, const char *t, int n)
{
801053c0: 55 push %ebp
801053c1: 89 e5 mov %esp,%ebp
801053c3: 56 push %esi
801053c4: 53 push %ebx
801053c5: 8b 4d 10 mov 0x10(%ebp),%ecx
801053c8: 8b 45 08 mov 0x8(%ebp),%eax
801053cb: 8b 55 0c mov 0xc(%ebp),%edx
char *os;
os = s;
if(n <= 0)
801053ce: 85 c9 test %ecx,%ecx
801053d0: 7e 26 jle 801053f8 <safestrcpy+0x38>
801053d2: 8d 74 0a ff lea -0x1(%edx,%ecx,1),%esi
801053d6: 89 c1 mov %eax,%ecx
801053d8: eb 17 jmp 801053f1 <safestrcpy+0x31>
801053da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return os;
while(--n > 0 && (*s++ = *t++) != 0)
801053e0: 83 c2 01 add $0x1,%edx
801053e3: 0f b6 5a ff movzbl -0x1(%edx),%ebx
801053e7: 83 c1 01 add $0x1,%ecx
801053ea: 84 db test %bl,%bl
801053ec: 88 59 ff mov %bl,-0x1(%ecx)
801053ef: 74 04 je 801053f5 <safestrcpy+0x35>
801053f1: 39 f2 cmp %esi,%edx
801053f3: 75 eb jne 801053e0 <safestrcpy+0x20>
;
*s = 0;
801053f5: c6 01 00 movb $0x0,(%ecx)
return os;
}
801053f8: 5b pop %ebx
801053f9: 5e pop %esi
801053fa: 5d pop %ebp
801053fb: c3 ret
801053fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105400 <strlen>:
int
strlen(const char *s)
{
80105400: 55 push %ebp
int n;
for(n = 0; s[n]; n++)
80105401: 31 c0 xor %eax,%eax
{
80105403: 89 e5 mov %esp,%ebp
80105405: 8b 55 08 mov 0x8(%ebp),%edx
for(n = 0; s[n]; n++)
80105408: 80 3a 00 cmpb $0x0,(%edx)
8010540b: 74 0c je 80105419 <strlen+0x19>
8010540d: 8d 76 00 lea 0x0(%esi),%esi
80105410: 83 c0 01 add $0x1,%eax
80105413: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
80105417: 75 f7 jne 80105410 <strlen+0x10>
;
return n;
}
80105419: 5d pop %ebp
8010541a: c3 ret
8010541b <swtch>:
8010541b: 8b 44 24 04 mov 0x4(%esp),%eax
8010541f: 8b 54 24 08 mov 0x8(%esp),%edx
80105423: 55 push %ebp
80105424: 53 push %ebx
80105425: 56 push %esi
80105426: 57 push %edi
80105427: 89 20 mov %esp,(%eax)
80105429: 89 d4 mov %edx,%esp
8010542b: 5f pop %edi
8010542c: 5e pop %esi
8010542d: 5b pop %ebx
8010542e: 5d pop %ebp
8010542f: c3 ret
80105430 <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)
{
80105430: 55 push %ebp
80105431: 89 e5 mov %esp,%ebp
80105433: 53 push %ebx
80105434: 83 ec 04 sub $0x4,%esp
80105437: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *curproc = myproc();
8010543a: e8 61 e7 ff ff call 80103ba0 <myproc>
if(addr >= curproc->sz || addr+4 > curproc->sz)
8010543f: 8b 00 mov (%eax),%eax
80105441: 39 d8 cmp %ebx,%eax
80105443: 76 1b jbe 80105460 <fetchint+0x30>
80105445: 8d 53 04 lea 0x4(%ebx),%edx
80105448: 39 d0 cmp %edx,%eax
8010544a: 72 14 jb 80105460 <fetchint+0x30>
return -1;
*ip = *(int*)(addr);
8010544c: 8b 45 0c mov 0xc(%ebp),%eax
8010544f: 8b 13 mov (%ebx),%edx
80105451: 89 10 mov %edx,(%eax)
return 0;
80105453: 31 c0 xor %eax,%eax
}
80105455: 83 c4 04 add $0x4,%esp
80105458: 5b pop %ebx
80105459: 5d pop %ebp
8010545a: c3 ret
8010545b: 90 nop
8010545c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80105460: b8 ff ff ff ff mov $0xffffffff,%eax
80105465: eb ee jmp 80105455 <fetchint+0x25>
80105467: 89 f6 mov %esi,%esi
80105469: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105470 <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)
{
80105470: 55 push %ebp
80105471: 89 e5 mov %esp,%ebp
80105473: 53 push %ebx
80105474: 83 ec 04 sub $0x4,%esp
80105477: 8b 5d 08 mov 0x8(%ebp),%ebx
char *s, *ep;
struct proc *curproc = myproc();
8010547a: e8 21 e7 ff ff call 80103ba0 <myproc>
if(addr >= curproc->sz)
8010547f: 39 18 cmp %ebx,(%eax)
80105481: 76 29 jbe 801054ac <fetchstr+0x3c>
return -1;
*pp = (char*)addr;
80105483: 8b 4d 0c mov 0xc(%ebp),%ecx
80105486: 89 da mov %ebx,%edx
80105488: 89 19 mov %ebx,(%ecx)
ep = (char*)curproc->sz;
8010548a: 8b 00 mov (%eax),%eax
for(s = *pp; s < ep; s++){
8010548c: 39 c3 cmp %eax,%ebx
8010548e: 73 1c jae 801054ac <fetchstr+0x3c>
if(*s == 0)
80105490: 80 3b 00 cmpb $0x0,(%ebx)
80105493: 75 10 jne 801054a5 <fetchstr+0x35>
80105495: eb 39 jmp 801054d0 <fetchstr+0x60>
80105497: 89 f6 mov %esi,%esi
80105499: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801054a0: 80 3a 00 cmpb $0x0,(%edx)
801054a3: 74 1b je 801054c0 <fetchstr+0x50>
for(s = *pp; s < ep; s++){
801054a5: 83 c2 01 add $0x1,%edx
801054a8: 39 d0 cmp %edx,%eax
801054aa: 77 f4 ja 801054a0 <fetchstr+0x30>
return -1;
801054ac: b8 ff ff ff ff mov $0xffffffff,%eax
return s - *pp;
}
return -1;
}
801054b1: 83 c4 04 add $0x4,%esp
801054b4: 5b pop %ebx
801054b5: 5d pop %ebp
801054b6: c3 ret
801054b7: 89 f6 mov %esi,%esi
801054b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801054c0: 83 c4 04 add $0x4,%esp
801054c3: 89 d0 mov %edx,%eax
801054c5: 29 d8 sub %ebx,%eax
801054c7: 5b pop %ebx
801054c8: 5d pop %ebp
801054c9: c3 ret
801054ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(*s == 0)
801054d0: 31 c0 xor %eax,%eax
return s - *pp;
801054d2: eb dd jmp 801054b1 <fetchstr+0x41>
801054d4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801054da: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801054e0 <argint>:
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
801054e0: 55 push %ebp
801054e1: 89 e5 mov %esp,%ebp
801054e3: 56 push %esi
801054e4: 53 push %ebx
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
801054e5: e8 b6 e6 ff ff call 80103ba0 <myproc>
801054ea: 8b 40 18 mov 0x18(%eax),%eax
801054ed: 8b 55 08 mov 0x8(%ebp),%edx
801054f0: 8b 40 44 mov 0x44(%eax),%eax
801054f3: 8d 1c 90 lea (%eax,%edx,4),%ebx
struct proc *curproc = myproc();
801054f6: e8 a5 e6 ff ff call 80103ba0 <myproc>
if(addr >= curproc->sz || addr+4 > curproc->sz)
801054fb: 8b 00 mov (%eax),%eax
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
801054fd: 8d 73 04 lea 0x4(%ebx),%esi
if(addr >= curproc->sz || addr+4 > curproc->sz)
80105500: 39 c6 cmp %eax,%esi
80105502: 73 1c jae 80105520 <argint+0x40>
80105504: 8d 53 08 lea 0x8(%ebx),%edx
80105507: 39 d0 cmp %edx,%eax
80105509: 72 15 jb 80105520 <argint+0x40>
*ip = *(int*)(addr);
8010550b: 8b 45 0c mov 0xc(%ebp),%eax
8010550e: 8b 53 04 mov 0x4(%ebx),%edx
80105511: 89 10 mov %edx,(%eax)
return 0;
80105513: 31 c0 xor %eax,%eax
}
80105515: 5b pop %ebx
80105516: 5e pop %esi
80105517: 5d pop %ebp
80105518: c3 ret
80105519: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80105520: b8 ff ff ff ff mov $0xffffffff,%eax
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
80105525: eb ee jmp 80105515 <argint+0x35>
80105527: 89 f6 mov %esi,%esi
80105529: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105530 <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)
{
80105530: 55 push %ebp
80105531: 89 e5 mov %esp,%ebp
80105533: 56 push %esi
80105534: 53 push %ebx
80105535: 83 ec 10 sub $0x10,%esp
80105538: 8b 5d 10 mov 0x10(%ebp),%ebx
int i;
struct proc *curproc = myproc();
8010553b: e8 60 e6 ff ff call 80103ba0 <myproc>
80105540: 89 c6 mov %eax,%esi
if(argint(n, &i) < 0)
80105542: 8d 45 f4 lea -0xc(%ebp),%eax
80105545: 83 ec 08 sub $0x8,%esp
80105548: 50 push %eax
80105549: ff 75 08 pushl 0x8(%ebp)
8010554c: e8 8f ff ff ff call 801054e0 <argint>
return -1;
if(size < 0 || (uint)i >= curproc->sz || (uint)i+size > curproc->sz)
80105551: 83 c4 10 add $0x10,%esp
80105554: 85 c0 test %eax,%eax
80105556: 78 28 js 80105580 <argptr+0x50>
80105558: 85 db test %ebx,%ebx
8010555a: 78 24 js 80105580 <argptr+0x50>
8010555c: 8b 16 mov (%esi),%edx
8010555e: 8b 45 f4 mov -0xc(%ebp),%eax
80105561: 39 c2 cmp %eax,%edx
80105563: 76 1b jbe 80105580 <argptr+0x50>
80105565: 01 c3 add %eax,%ebx
80105567: 39 da cmp %ebx,%edx
80105569: 72 15 jb 80105580 <argptr+0x50>
return -1;
*pp = (char*)i;
8010556b: 8b 55 0c mov 0xc(%ebp),%edx
8010556e: 89 02 mov %eax,(%edx)
return 0;
80105570: 31 c0 xor %eax,%eax
}
80105572: 8d 65 f8 lea -0x8(%ebp),%esp
80105575: 5b pop %ebx
80105576: 5e pop %esi
80105577: 5d pop %ebp
80105578: c3 ret
80105579: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80105580: b8 ff ff ff ff mov $0xffffffff,%eax
80105585: eb eb jmp 80105572 <argptr+0x42>
80105587: 89 f6 mov %esi,%esi
80105589: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105590 <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)
{
80105590: 55 push %ebp
80105591: 89 e5 mov %esp,%ebp
80105593: 83 ec 20 sub $0x20,%esp
int addr;
if(argint(n, &addr) < 0)
80105596: 8d 45 f4 lea -0xc(%ebp),%eax
80105599: 50 push %eax
8010559a: ff 75 08 pushl 0x8(%ebp)
8010559d: e8 3e ff ff ff call 801054e0 <argint>
801055a2: 83 c4 10 add $0x10,%esp
801055a5: 85 c0 test %eax,%eax
801055a7: 78 17 js 801055c0 <argstr+0x30>
return -1;
return fetchstr(addr, pp);
801055a9: 83 ec 08 sub $0x8,%esp
801055ac: ff 75 0c pushl 0xc(%ebp)
801055af: ff 75 f4 pushl -0xc(%ebp)
801055b2: e8 b9 fe ff ff call 80105470 <fetchstr>
801055b7: 83 c4 10 add $0x10,%esp
}
801055ba: c9 leave
801055bb: c3 ret
801055bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
801055c0: b8 ff ff ff ff mov $0xffffffff,%eax
}
801055c5: c9 leave
801055c6: c3 ret
801055c7: 89 f6 mov %esi,%esi
801055c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801055d0 <syscall>:
[SYS_show_processes_scheduling] sys_show_processes_scheduling,
};
void
syscall(void)
{
801055d0: 55 push %ebp
801055d1: 89 e5 mov %esp,%ebp
801055d3: 53 push %ebx
801055d4: 83 ec 14 sub $0x14,%esp
int num;
struct proc *curproc = myproc();
801055d7: e8 c4 e5 ff ff call 80103ba0 <myproc>
num = curproc->tf->eax;
801055dc: 8b 50 18 mov 0x18(%eax),%edx
struct proc *curproc = myproc();
801055df: 89 c3 mov %eax,%ebx
num = curproc->tf->eax;
801055e1: 8b 42 1c mov 0x1c(%edx),%eax
if (num == 22) {
801055e4: 83 f8 16 cmp $0x16,%eax
801055e7: 74 37 je 80105620 <syscall+0x50>
int arg = 0;
argint(0 ,&arg);
curproc->tf->eax = sys_incNum(arg);
}
else if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
801055e9: 8d 48 ff lea -0x1(%eax),%ecx
801055ec: 83 f9 1b cmp $0x1b,%ecx
801055ef: 77 1f ja 80105610 <syscall+0x40>
801055f1: 8b 04 85 c0 85 10 80 mov -0x7fef7a40(,%eax,4),%eax
801055f8: 85 c0 test %eax,%eax
801055fa: 74 14 je 80105610 <syscall+0x40>
curproc->tf->eax = syscalls[num]();
801055fc: ff d0 call *%eax
801055fe: 8b 53 18 mov 0x18(%ebx),%edx
80105601: 89 42 1c mov %eax,0x1c(%edx)
} else {
curproc->tf->eax = -1;
}
}
80105604: 8b 5d fc mov -0x4(%ebp),%ebx
80105607: c9 leave
80105608: c3 ret
80105609: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
curproc->tf->eax = -1;
80105610: c7 42 1c ff ff ff ff movl $0xffffffff,0x1c(%edx)
}
80105617: 8b 5d fc mov -0x4(%ebp),%ebx
8010561a: c9 leave
8010561b: c3 ret
8010561c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
argint(0 ,&arg);
80105620: 8d 45 f4 lea -0xc(%ebp),%eax
80105623: 83 ec 08 sub $0x8,%esp
int arg = 0;
80105626: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
argint(0 ,&arg);
8010562d: 50 push %eax
8010562e: 6a 00 push $0x0
80105630: e8 ab fe ff ff call 801054e0 <argint>
curproc->tf->eax = sys_incNum(arg);
80105635: 58 pop %eax
80105636: ff 75 f4 pushl -0xc(%ebp)
80105639: e8 a2 0d 00 00 call 801063e0 <sys_incNum>
8010563e: 8b 53 18 mov 0x18(%ebx),%edx
80105641: 83 c4 10 add $0x10,%esp
80105644: 89 42 1c mov %eax,0x1c(%edx)
}
80105647: 8b 5d fc mov -0x4(%ebp),%ebx
8010564a: c9 leave
8010564b: c3 ret
8010564c: 66 90 xchg %ax,%ax
8010564e: 66 90 xchg %ax,%ax
80105650 <create>:
return -1;
}
static struct inode*
create(char *path, short type, short major, short minor)
{
80105650: 55 push %ebp
80105651: 89 e5 mov %esp,%ebp
80105653: 57 push %edi
80105654: 56 push %esi
80105655: 53 push %ebx
uint off;
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
80105656: 8d 75 da lea -0x26(%ebp),%esi
{
80105659: 83 ec 44 sub $0x44,%esp
8010565c: 89 4d c0 mov %ecx,-0x40(%ebp)
8010565f: 8b 4d 08 mov 0x8(%ebp),%ecx
if((dp = nameiparent(path, name)) == 0)
80105662: 56 push %esi
80105663: 50 push %eax
{
80105664: 89 55 c4 mov %edx,-0x3c(%ebp)
80105667: 89 4d bc mov %ecx,-0x44(%ebp)
if((dp = nameiparent(path, name)) == 0)
8010566a: e8 01 cc ff ff call 80102270 <nameiparent>
8010566f: 83 c4 10 add $0x10,%esp
80105672: 85 c0 test %eax,%eax
80105674: 0f 84 46 01 00 00 je 801057c0 <create+0x170>
return 0;
ilock(dp);
8010567a: 83 ec 0c sub $0xc,%esp
8010567d: 89 c3 mov %eax,%ebx
8010567f: 50 push %eax
80105680: e8 6b c3 ff ff call 801019f0 <ilock>
if((ip = dirlookup(dp, name, &off)) != 0){
80105685: 8d 45 d4 lea -0x2c(%ebp),%eax
80105688: 83 c4 0c add $0xc,%esp
8010568b: 50 push %eax
8010568c: 56 push %esi
8010568d: 53 push %ebx
8010568e: e8 8d c8 ff ff call 80101f20 <dirlookup>
80105693: 83 c4 10 add $0x10,%esp
80105696: 85 c0 test %eax,%eax
80105698: 89 c7 mov %eax,%edi
8010569a: 74 34 je 801056d0 <create+0x80>
iunlockput(dp);
8010569c: 83 ec 0c sub $0xc,%esp
8010569f: 53 push %ebx
801056a0: e8 db c5 ff ff call 80101c80 <iunlockput>
ilock(ip);
801056a5: 89 3c 24 mov %edi,(%esp)
801056a8: e8 43 c3 ff ff call 801019f0 <ilock>
if(type == T_FILE && ip->type == T_FILE)
801056ad: 83 c4 10 add $0x10,%esp
801056b0: 66 83 7d c4 02 cmpw $0x2,-0x3c(%ebp)
801056b5: 0f 85 95 00 00 00 jne 80105750 <create+0x100>
801056bb: 66 83 7f 50 02 cmpw $0x2,0x50(%edi)
801056c0: 0f 85 8a 00 00 00 jne 80105750 <create+0x100>
panic("create: dirlink");
iunlockput(dp);
return ip;
}
801056c6: 8d 65 f4 lea -0xc(%ebp),%esp
801056c9: 89 f8 mov %edi,%eax
801056cb: 5b pop %ebx
801056cc: 5e pop %esi
801056cd: 5f pop %edi
801056ce: 5d pop %ebp
801056cf: c3 ret
if((ip = ialloc(dp->dev, type)) == 0)
801056d0: 0f bf 45 c4 movswl -0x3c(%ebp),%eax
801056d4: 83 ec 08 sub $0x8,%esp
801056d7: 50 push %eax
801056d8: ff 33 pushl (%ebx)
801056da: e8 a1 c1 ff ff call 80101880 <ialloc>
801056df: 83 c4 10 add $0x10,%esp
801056e2: 85 c0 test %eax,%eax
801056e4: 89 c7 mov %eax,%edi
801056e6: 0f 84 e8 00 00 00 je 801057d4 <create+0x184>
ilock(ip);
801056ec: 83 ec 0c sub $0xc,%esp
801056ef: 50 push %eax
801056f0: e8 fb c2 ff ff call 801019f0 <ilock>
ip->major = major;
801056f5: 0f b7 45 c0 movzwl -0x40(%ebp),%eax
801056f9: 66 89 47 52 mov %ax,0x52(%edi)
ip->minor = minor;
801056fd: 0f b7 45 bc movzwl -0x44(%ebp),%eax
80105701: 66 89 47 54 mov %ax,0x54(%edi)
ip->nlink = 1;
80105705: b8 01 00 00 00 mov $0x1,%eax
8010570a: 66 89 47 56 mov %ax,0x56(%edi)
iupdate(ip);
8010570e: 89 3c 24 mov %edi,(%esp)
80105711: e8 2a c2 ff ff call 80101940 <iupdate>
if(type == T_DIR){ // Create . and .. entries.
80105716: 83 c4 10 add $0x10,%esp
80105719: 66 83 7d c4 01 cmpw $0x1,-0x3c(%ebp)
8010571e: 74 50 je 80105770 <create+0x120>
if(dirlink(dp, name, ip->inum) < 0)
80105720: 83 ec 04 sub $0x4,%esp
80105723: ff 77 04 pushl 0x4(%edi)
80105726: 56 push %esi
80105727: 53 push %ebx
80105728: e8 63 ca ff ff call 80102190 <dirlink>
8010572d: 83 c4 10 add $0x10,%esp
80105730: 85 c0 test %eax,%eax
80105732: 0f 88 8f 00 00 00 js 801057c7 <create+0x177>
iunlockput(dp);
80105738: 83 ec 0c sub $0xc,%esp
8010573b: 53 push %ebx
8010573c: e8 3f c5 ff ff call 80101c80 <iunlockput>
return ip;
80105741: 83 c4 10 add $0x10,%esp
}
80105744: 8d 65 f4 lea -0xc(%ebp),%esp
80105747: 89 f8 mov %edi,%eax
80105749: 5b pop %ebx
8010574a: 5e pop %esi
8010574b: 5f pop %edi
8010574c: 5d pop %ebp
8010574d: c3 ret
8010574e: 66 90 xchg %ax,%ax
iunlockput(ip);
80105750: 83 ec 0c sub $0xc,%esp
80105753: 57 push %edi
return 0;
80105754: 31 ff xor %edi,%edi
iunlockput(ip);
80105756: e8 25 c5 ff ff call 80101c80 <iunlockput>
return 0;
8010575b: 83 c4 10 add $0x10,%esp
}
8010575e: 8d 65 f4 lea -0xc(%ebp),%esp
80105761: 89 f8 mov %edi,%eax
80105763: 5b pop %ebx
80105764: 5e pop %esi
80105765: 5f pop %edi
80105766: 5d pop %ebp
80105767: c3 ret
80105768: 90 nop
80105769: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
dp->nlink++; // for ".."
80105770: 66 83 43 56 01 addw $0x1,0x56(%ebx)
iupdate(dp);
80105775: 83 ec 0c sub $0xc,%esp
80105778: 53 push %ebx
80105779: e8 c2 c1 ff ff call 80101940 <iupdate>
if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0)
8010577e: 83 c4 0c add $0xc,%esp
80105781: ff 77 04 pushl 0x4(%edi)
80105784: 68 50 86 10 80 push $0x80108650
80105789: 57 push %edi
8010578a: e8 01 ca ff ff call 80102190 <dirlink>
8010578f: 83 c4 10 add $0x10,%esp
80105792: 85 c0 test %eax,%eax
80105794: 78 1c js 801057b2 <create+0x162>
80105796: 83 ec 04 sub $0x4,%esp
80105799: ff 73 04 pushl 0x4(%ebx)
8010579c: 68 4f 86 10 80 push $0x8010864f
801057a1: 57 push %edi
801057a2: e8 e9 c9 ff ff call 80102190 <dirlink>
801057a7: 83 c4 10 add $0x10,%esp
801057aa: 85 c0 test %eax,%eax
801057ac: 0f 89 6e ff ff ff jns 80105720 <create+0xd0>
panic("create dots");
801057b2: 83 ec 0c sub $0xc,%esp
801057b5: 68 43 86 10 80 push $0x80108643
801057ba: e8 d1 ab ff ff call 80100390 <panic>
801057bf: 90 nop
return 0;
801057c0: 31 ff xor %edi,%edi
801057c2: e9 ff fe ff ff jmp 801056c6 <create+0x76>
panic("create: dirlink");
801057c7: 83 ec 0c sub $0xc,%esp
801057ca: 68 52 86 10 80 push $0x80108652
801057cf: e8 bc ab ff ff call 80100390 <panic>
panic("create: ialloc");
801057d4: 83 ec 0c sub $0xc,%esp
801057d7: 68 34 86 10 80 push $0x80108634
801057dc: e8 af ab ff ff call 80100390 <panic>
801057e1: eb 0d jmp 801057f0 <argfd.constprop.0>
801057e3: 90 nop
801057e4: 90 nop
801057e5: 90 nop
801057e6: 90 nop
801057e7: 90 nop
801057e8: 90 nop
801057e9: 90 nop
801057ea: 90 nop
801057eb: 90 nop
801057ec: 90 nop
801057ed: 90 nop
801057ee: 90 nop
801057ef: 90 nop
801057f0 <argfd.constprop.0>:
argfd(int n, int *pfd, struct file **pf)
801057f0: 55 push %ebp
801057f1: 89 e5 mov %esp,%ebp
801057f3: 56 push %esi
801057f4: 53 push %ebx
801057f5: 89 c3 mov %eax,%ebx
if(argint(n, &fd) < 0)
801057f7: 8d 45 f4 lea -0xc(%ebp),%eax
argfd(int n, int *pfd, struct file **pf)
801057fa: 89 d6 mov %edx,%esi
801057fc: 83 ec 18 sub $0x18,%esp
if(argint(n, &fd) < 0)
801057ff: 50 push %eax
80105800: 6a 00 push $0x0
80105802: e8 d9 fc ff ff call 801054e0 <argint>
80105807: 83 c4 10 add $0x10,%esp
8010580a: 85 c0 test %eax,%eax
8010580c: 78 2a js 80105838 <argfd.constprop.0+0x48>
if(fd < 0 || fd >= NOFILE || (f=myproc()->ofile[fd]) == 0)
8010580e: 83 7d f4 0f cmpl $0xf,-0xc(%ebp)
80105812: 77 24 ja 80105838 <argfd.constprop.0+0x48>
80105814: e8 87 e3 ff ff call 80103ba0 <myproc>
80105819: 8b 55 f4 mov -0xc(%ebp),%edx
8010581c: 8b 44 90 28 mov 0x28(%eax,%edx,4),%eax
80105820: 85 c0 test %eax,%eax
80105822: 74 14 je 80105838 <argfd.constprop.0+0x48>
if(pfd)
80105824: 85 db test %ebx,%ebx
80105826: 74 02 je 8010582a <argfd.constprop.0+0x3a>
*pfd = fd;
80105828: 89 13 mov %edx,(%ebx)
*pf = f;
8010582a: 89 06 mov %eax,(%esi)
return 0;
8010582c: 31 c0 xor %eax,%eax
}
8010582e: 8d 65 f8 lea -0x8(%ebp),%esp
80105831: 5b pop %ebx
80105832: 5e pop %esi
80105833: 5d pop %ebp
80105834: c3 ret
80105835: 8d 76 00 lea 0x0(%esi),%esi
return -1;
80105838: b8 ff ff ff ff mov $0xffffffff,%eax
8010583d: eb ef jmp 8010582e <argfd.constprop.0+0x3e>
8010583f: 90 nop
80105840 <sys_dup>:
{
80105840: 55 push %ebp
if(argfd(0, 0, &f) < 0)
80105841: 31 c0 xor %eax,%eax
{
80105843: 89 e5 mov %esp,%ebp
80105845: 56 push %esi
80105846: 53 push %ebx
if(argfd(0, 0, &f) < 0)
80105847: 8d 55 f4 lea -0xc(%ebp),%edx
{
8010584a: 83 ec 10 sub $0x10,%esp
if(argfd(0, 0, &f) < 0)
8010584d: e8 9e ff ff ff call 801057f0 <argfd.constprop.0>
80105852: 85 c0 test %eax,%eax
80105854: 78 42 js 80105898 <sys_dup+0x58>
if((fd=fdalloc(f)) < 0)
80105856: 8b 75 f4 mov -0xc(%ebp),%esi
for(fd = 0; fd < NOFILE; fd++){
80105859: 31 db xor %ebx,%ebx
struct proc *curproc = myproc();
8010585b: e8 40 e3 ff ff call 80103ba0 <myproc>
80105860: eb 0e jmp 80105870 <sys_dup+0x30>
80105862: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
for(fd = 0; fd < NOFILE; fd++){
80105868: 83 c3 01 add $0x1,%ebx
8010586b: 83 fb 10 cmp $0x10,%ebx
8010586e: 74 28 je 80105898 <sys_dup+0x58>
if(curproc->ofile[fd] == 0){
80105870: 8b 54 98 28 mov 0x28(%eax,%ebx,4),%edx
80105874: 85 d2 test %edx,%edx
80105876: 75 f0 jne 80105868 <sys_dup+0x28>
curproc->ofile[fd] = f;
80105878: 89 74 98 28 mov %esi,0x28(%eax,%ebx,4)
filedup(f);
8010587c: 83 ec 0c sub $0xc,%esp
8010587f: ff 75 f4 pushl -0xc(%ebp)
80105882: e8 c9 b8 ff ff call 80101150 <filedup>
return fd;
80105887: 83 c4 10 add $0x10,%esp
}
8010588a: 8d 65 f8 lea -0x8(%ebp),%esp
8010588d: 89 d8 mov %ebx,%eax
8010588f: 5b pop %ebx
80105890: 5e pop %esi
80105891: 5d pop %ebp
80105892: c3 ret
80105893: 90 nop
80105894: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105898: 8d 65 f8 lea -0x8(%ebp),%esp
return -1;
8010589b: bb ff ff ff ff mov $0xffffffff,%ebx
}
801058a0: 89 d8 mov %ebx,%eax
801058a2: 5b pop %ebx
801058a3: 5e pop %esi
801058a4: 5d pop %ebp
801058a5: c3 ret
801058a6: 8d 76 00 lea 0x0(%esi),%esi
801058a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801058b0 <sys_read>:
{
801058b0: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
801058b1: 31 c0 xor %eax,%eax
{
801058b3: 89 e5 mov %esp,%ebp
801058b5: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
801058b8: 8d 55 ec lea -0x14(%ebp),%edx
801058bb: e8 30 ff ff ff call 801057f0 <argfd.constprop.0>
801058c0: 85 c0 test %eax,%eax
801058c2: 78 4c js 80105910 <sys_read+0x60>
801058c4: 8d 45 f0 lea -0x10(%ebp),%eax
801058c7: 83 ec 08 sub $0x8,%esp
801058ca: 50 push %eax
801058cb: 6a 02 push $0x2
801058cd: e8 0e fc ff ff call 801054e0 <argint>
801058d2: 83 c4 10 add $0x10,%esp
801058d5: 85 c0 test %eax,%eax
801058d7: 78 37 js 80105910 <sys_read+0x60>
801058d9: 8d 45 f4 lea -0xc(%ebp),%eax
801058dc: 83 ec 04 sub $0x4,%esp
801058df: ff 75 f0 pushl -0x10(%ebp)
801058e2: 50 push %eax
801058e3: 6a 01 push $0x1
801058e5: e8 46 fc ff ff call 80105530 <argptr>
801058ea: 83 c4 10 add $0x10,%esp
801058ed: 85 c0 test %eax,%eax
801058ef: 78 1f js 80105910 <sys_read+0x60>
return fileread(f, p, n);
801058f1: 83 ec 04 sub $0x4,%esp
801058f4: ff 75 f0 pushl -0x10(%ebp)
801058f7: ff 75 f4 pushl -0xc(%ebp)
801058fa: ff 75 ec pushl -0x14(%ebp)
801058fd: e8 be b9 ff ff call 801012c0 <fileread>
80105902: 83 c4 10 add $0x10,%esp
}
80105905: c9 leave
80105906: c3 ret
80105907: 89 f6 mov %esi,%esi
80105909: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
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_write>:
{
80105920: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80105921: 31 c0 xor %eax,%eax
{
80105923: 89 e5 mov %esp,%ebp
80105925: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80105928: 8d 55 ec lea -0x14(%ebp),%edx
8010592b: e8 c0 fe ff ff call 801057f0 <argfd.constprop.0>
80105930: 85 c0 test %eax,%eax
80105932: 78 4c js 80105980 <sys_write+0x60>
80105934: 8d 45 f0 lea -0x10(%ebp),%eax
80105937: 83 ec 08 sub $0x8,%esp
8010593a: 50 push %eax
8010593b: 6a 02 push $0x2
8010593d: e8 9e fb ff ff call 801054e0 <argint>
80105942: 83 c4 10 add $0x10,%esp
80105945: 85 c0 test %eax,%eax
80105947: 78 37 js 80105980 <sys_write+0x60>
80105949: 8d 45 f4 lea -0xc(%ebp),%eax
8010594c: 83 ec 04 sub $0x4,%esp
8010594f: ff 75 f0 pushl -0x10(%ebp)
80105952: 50 push %eax
80105953: 6a 01 push $0x1
80105955: e8 d6 fb ff ff call 80105530 <argptr>
8010595a: 83 c4 10 add $0x10,%esp
8010595d: 85 c0 test %eax,%eax
8010595f: 78 1f js 80105980 <sys_write+0x60>
return filewrite(f, p, n);
80105961: 83 ec 04 sub $0x4,%esp
80105964: ff 75 f0 pushl -0x10(%ebp)
80105967: ff 75 f4 pushl -0xc(%ebp)
8010596a: ff 75 ec pushl -0x14(%ebp)
8010596d: e8 de b9 ff ff call 80101350 <filewrite>
80105972: 83 c4 10 add $0x10,%esp
}
80105975: c9 leave
80105976: c3 ret
80105977: 89 f6 mov %esi,%esi
80105979: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
return -1;
80105980: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105985: c9 leave
80105986: c3 ret
80105987: 89 f6 mov %esi,%esi
80105989: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105990 <sys_close>:
{
80105990: 55 push %ebp
80105991: 89 e5 mov %esp,%ebp
80105993: 83 ec 18 sub $0x18,%esp
if(argfd(0, &fd, &f) < 0)
80105996: 8d 55 f4 lea -0xc(%ebp),%edx
80105999: 8d 45 f0 lea -0x10(%ebp),%eax
8010599c: e8 4f fe ff ff call 801057f0 <argfd.constprop.0>
801059a1: 85 c0 test %eax,%eax
801059a3: 78 2b js 801059d0 <sys_close+0x40>
myproc()->ofile[fd] = 0;
801059a5: e8 f6 e1 ff ff call 80103ba0 <myproc>
801059aa: 8b 55 f0 mov -0x10(%ebp),%edx
fileclose(f);
801059ad: 83 ec 0c sub $0xc,%esp
myproc()->ofile[fd] = 0;
801059b0: c7 44 90 28 00 00 00 movl $0x0,0x28(%eax,%edx,4)
801059b7: 00
fileclose(f);
801059b8: ff 75 f4 pushl -0xc(%ebp)
801059bb: e8 e0 b7 ff ff call 801011a0 <fileclose>
return 0;
801059c0: 83 c4 10 add $0x10,%esp
801059c3: 31 c0 xor %eax,%eax
}
801059c5: c9 leave
801059c6: c3 ret
801059c7: 89 f6 mov %esi,%esi
801059c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
return -1;
801059d0: b8 ff ff ff ff mov $0xffffffff,%eax
}
801059d5: c9 leave
801059d6: c3 ret
801059d7: 89 f6 mov %esi,%esi
801059d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801059e0 <sys_fstat>:
{
801059e0: 55 push %ebp
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
801059e1: 31 c0 xor %eax,%eax
{
801059e3: 89 e5 mov %esp,%ebp
801059e5: 83 ec 18 sub $0x18,%esp
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
801059e8: 8d 55 f0 lea -0x10(%ebp),%edx
801059eb: e8 00 fe ff ff call 801057f0 <argfd.constprop.0>
801059f0: 85 c0 test %eax,%eax
801059f2: 78 2c js 80105a20 <sys_fstat+0x40>
801059f4: 8d 45 f4 lea -0xc(%ebp),%eax
801059f7: 83 ec 04 sub $0x4,%esp
801059fa: 6a 14 push $0x14
801059fc: 50 push %eax
801059fd: 6a 01 push $0x1
801059ff: e8 2c fb ff ff call 80105530 <argptr>
80105a04: 83 c4 10 add $0x10,%esp
80105a07: 85 c0 test %eax,%eax
80105a09: 78 15 js 80105a20 <sys_fstat+0x40>
return filestat(f, st);
80105a0b: 83 ec 08 sub $0x8,%esp
80105a0e: ff 75 f4 pushl -0xc(%ebp)
80105a11: ff 75 f0 pushl -0x10(%ebp)
80105a14: e8 57 b8 ff ff call 80101270 <filestat>
80105a19: 83 c4 10 add $0x10,%esp
}
80105a1c: c9 leave
80105a1d: c3 ret
80105a1e: 66 90 xchg %ax,%ax
return -1;
80105a20: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105a25: c9 leave
80105a26: c3 ret
80105a27: 89 f6 mov %esi,%esi
80105a29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105a30 <sys_link>:
{
80105a30: 55 push %ebp
80105a31: 89 e5 mov %esp,%ebp
80105a33: 57 push %edi
80105a34: 56 push %esi
80105a35: 53 push %ebx
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
80105a36: 8d 45 d4 lea -0x2c(%ebp),%eax
{
80105a39: 83 ec 34 sub $0x34,%esp
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
80105a3c: 50 push %eax
80105a3d: 6a 00 push $0x0
80105a3f: e8 4c fb ff ff call 80105590 <argstr>
80105a44: 83 c4 10 add $0x10,%esp
80105a47: 85 c0 test %eax,%eax
80105a49: 0f 88 fb 00 00 00 js 80105b4a <sys_link+0x11a>
80105a4f: 8d 45 d0 lea -0x30(%ebp),%eax
80105a52: 83 ec 08 sub $0x8,%esp
80105a55: 50 push %eax
80105a56: 6a 01 push $0x1
80105a58: e8 33 fb ff ff call 80105590 <argstr>
80105a5d: 83 c4 10 add $0x10,%esp
80105a60: 85 c0 test %eax,%eax
80105a62: 0f 88 e2 00 00 00 js 80105b4a <sys_link+0x11a>
begin_op();
80105a68: e8 a3 d4 ff ff call 80102f10 <begin_op>
if((ip = namei(old)) == 0){
80105a6d: 83 ec 0c sub $0xc,%esp
80105a70: ff 75 d4 pushl -0x2c(%ebp)
80105a73: e8 d8 c7 ff ff call 80102250 <namei>
80105a78: 83 c4 10 add $0x10,%esp
80105a7b: 85 c0 test %eax,%eax
80105a7d: 89 c3 mov %eax,%ebx
80105a7f: 0f 84 ea 00 00 00 je 80105b6f <sys_link+0x13f>
ilock(ip);
80105a85: 83 ec 0c sub $0xc,%esp
80105a88: 50 push %eax
80105a89: e8 62 bf ff ff call 801019f0 <ilock>
if(ip->type == T_DIR){
80105a8e: 83 c4 10 add $0x10,%esp
80105a91: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80105a96: 0f 84 bb 00 00 00 je 80105b57 <sys_link+0x127>
ip->nlink++;
80105a9c: 66 83 43 56 01 addw $0x1,0x56(%ebx)
iupdate(ip);
80105aa1: 83 ec 0c sub $0xc,%esp
if((dp = nameiparent(new, name)) == 0)
80105aa4: 8d 7d da lea -0x26(%ebp),%edi
iupdate(ip);
80105aa7: 53 push %ebx
80105aa8: e8 93 be ff ff call 80101940 <iupdate>
iunlock(ip);
80105aad: 89 1c 24 mov %ebx,(%esp)
80105ab0: e8 1b c0 ff ff call 80101ad0 <iunlock>
if((dp = nameiparent(new, name)) == 0)
80105ab5: 58 pop %eax
80105ab6: 5a pop %edx
80105ab7: 57 push %edi
80105ab8: ff 75 d0 pushl -0x30(%ebp)
80105abb: e8 b0 c7 ff ff call 80102270 <nameiparent>
80105ac0: 83 c4 10 add $0x10,%esp
80105ac3: 85 c0 test %eax,%eax
80105ac5: 89 c6 mov %eax,%esi
80105ac7: 74 5b je 80105b24 <sys_link+0xf4>
ilock(dp);
80105ac9: 83 ec 0c sub $0xc,%esp
80105acc: 50 push %eax
80105acd: e8 1e bf ff ff call 801019f0 <ilock>
if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){
80105ad2: 83 c4 10 add $0x10,%esp
80105ad5: 8b 03 mov (%ebx),%eax
80105ad7: 39 06 cmp %eax,(%esi)
80105ad9: 75 3d jne 80105b18 <sys_link+0xe8>
80105adb: 83 ec 04 sub $0x4,%esp
80105ade: ff 73 04 pushl 0x4(%ebx)
80105ae1: 57 push %edi
80105ae2: 56 push %esi
80105ae3: e8 a8 c6 ff ff call 80102190 <dirlink>
80105ae8: 83 c4 10 add $0x10,%esp
80105aeb: 85 c0 test %eax,%eax
80105aed: 78 29 js 80105b18 <sys_link+0xe8>
iunlockput(dp);
80105aef: 83 ec 0c sub $0xc,%esp
80105af2: 56 push %esi
80105af3: e8 88 c1 ff ff call 80101c80 <iunlockput>
iput(ip);
80105af8: 89 1c 24 mov %ebx,(%esp)
80105afb: e8 20 c0 ff ff call 80101b20 <iput>
end_op();
80105b00: e8 7b d4 ff ff call 80102f80 <end_op>
return 0;
80105b05: 83 c4 10 add $0x10,%esp
80105b08: 31 c0 xor %eax,%eax
}
80105b0a: 8d 65 f4 lea -0xc(%ebp),%esp
80105b0d: 5b pop %ebx
80105b0e: 5e pop %esi
80105b0f: 5f pop %edi
80105b10: 5d pop %ebp
80105b11: c3 ret
80105b12: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
iunlockput(dp);
80105b18: 83 ec 0c sub $0xc,%esp
80105b1b: 56 push %esi
80105b1c: e8 5f c1 ff ff call 80101c80 <iunlockput>
goto bad;
80105b21: 83 c4 10 add $0x10,%esp
ilock(ip);
80105b24: 83 ec 0c sub $0xc,%esp
80105b27: 53 push %ebx
80105b28: e8 c3 be ff ff call 801019f0 <ilock>
ip->nlink--;
80105b2d: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
80105b32: 89 1c 24 mov %ebx,(%esp)
80105b35: e8 06 be ff ff call 80101940 <iupdate>
iunlockput(ip);
80105b3a: 89 1c 24 mov %ebx,(%esp)
80105b3d: e8 3e c1 ff ff call 80101c80 <iunlockput>
end_op();
80105b42: e8 39 d4 ff ff call 80102f80 <end_op>
return -1;
80105b47: 83 c4 10 add $0x10,%esp
}
80105b4a: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80105b4d: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105b52: 5b pop %ebx
80105b53: 5e pop %esi
80105b54: 5f pop %edi
80105b55: 5d pop %ebp
80105b56: c3 ret
iunlockput(ip);
80105b57: 83 ec 0c sub $0xc,%esp
80105b5a: 53 push %ebx
80105b5b: e8 20 c1 ff ff call 80101c80 <iunlockput>
end_op();
80105b60: e8 1b d4 ff ff call 80102f80 <end_op>
return -1;
80105b65: 83 c4 10 add $0x10,%esp
80105b68: b8 ff ff ff ff mov $0xffffffff,%eax
80105b6d: eb 9b jmp 80105b0a <sys_link+0xda>
end_op();
80105b6f: e8 0c d4 ff ff call 80102f80 <end_op>
return -1;
80105b74: b8 ff ff ff ff mov $0xffffffff,%eax
80105b79: eb 8f jmp 80105b0a <sys_link+0xda>
80105b7b: 90 nop
80105b7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105b80 <sys_unlink>:
{
80105b80: 55 push %ebp
80105b81: 89 e5 mov %esp,%ebp
80105b83: 57 push %edi
80105b84: 56 push %esi
80105b85: 53 push %ebx
if(argstr(0, &path) < 0)
80105b86: 8d 45 c0 lea -0x40(%ebp),%eax
{
80105b89: 83 ec 44 sub $0x44,%esp
if(argstr(0, &path) < 0)
80105b8c: 50 push %eax
80105b8d: 6a 00 push $0x0
80105b8f: e8 fc f9 ff ff call 80105590 <argstr>
80105b94: 83 c4 10 add $0x10,%esp
80105b97: 85 c0 test %eax,%eax
80105b99: 0f 88 77 01 00 00 js 80105d16 <sys_unlink+0x196>
if((dp = nameiparent(path, name)) == 0){
80105b9f: 8d 5d ca lea -0x36(%ebp),%ebx
begin_op();
80105ba2: e8 69 d3 ff ff call 80102f10 <begin_op>
if((dp = nameiparent(path, name)) == 0){
80105ba7: 83 ec 08 sub $0x8,%esp
80105baa: 53 push %ebx
80105bab: ff 75 c0 pushl -0x40(%ebp)
80105bae: e8 bd c6 ff ff call 80102270 <nameiparent>
80105bb3: 83 c4 10 add $0x10,%esp
80105bb6: 85 c0 test %eax,%eax
80105bb8: 89 c6 mov %eax,%esi
80105bba: 0f 84 60 01 00 00 je 80105d20 <sys_unlink+0x1a0>
ilock(dp);
80105bc0: 83 ec 0c sub $0xc,%esp
80105bc3: 50 push %eax
80105bc4: e8 27 be ff ff call 801019f0 <ilock>
if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0)
80105bc9: 58 pop %eax
80105bca: 5a pop %edx
80105bcb: 68 50 86 10 80 push $0x80108650
80105bd0: 53 push %ebx
80105bd1: e8 2a c3 ff ff call 80101f00 <namecmp>
80105bd6: 83 c4 10 add $0x10,%esp
80105bd9: 85 c0 test %eax,%eax
80105bdb: 0f 84 03 01 00 00 je 80105ce4 <sys_unlink+0x164>
80105be1: 83 ec 08 sub $0x8,%esp
80105be4: 68 4f 86 10 80 push $0x8010864f
80105be9: 53 push %ebx
80105bea: e8 11 c3 ff ff call 80101f00 <namecmp>
80105bef: 83 c4 10 add $0x10,%esp
80105bf2: 85 c0 test %eax,%eax
80105bf4: 0f 84 ea 00 00 00 je 80105ce4 <sys_unlink+0x164>
if((ip = dirlookup(dp, name, &off)) == 0)
80105bfa: 8d 45 c4 lea -0x3c(%ebp),%eax
80105bfd: 83 ec 04 sub $0x4,%esp
80105c00: 50 push %eax
80105c01: 53 push %ebx
80105c02: 56 push %esi
80105c03: e8 18 c3 ff ff call 80101f20 <dirlookup>
80105c08: 83 c4 10 add $0x10,%esp
80105c0b: 85 c0 test %eax,%eax
80105c0d: 89 c3 mov %eax,%ebx
80105c0f: 0f 84 cf 00 00 00 je 80105ce4 <sys_unlink+0x164>
ilock(ip);
80105c15: 83 ec 0c sub $0xc,%esp
80105c18: 50 push %eax
80105c19: e8 d2 bd ff ff call 801019f0 <ilock>
if(ip->nlink < 1)
80105c1e: 83 c4 10 add $0x10,%esp
80105c21: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx)
80105c26: 0f 8e 10 01 00 00 jle 80105d3c <sys_unlink+0x1bc>
if(ip->type == T_DIR && !isdirempty(ip)){
80105c2c: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80105c31: 74 6d je 80105ca0 <sys_unlink+0x120>
memset(&de, 0, sizeof(de));
80105c33: 8d 45 d8 lea -0x28(%ebp),%eax
80105c36: 83 ec 04 sub $0x4,%esp
80105c39: 6a 10 push $0x10
80105c3b: 6a 00 push $0x0
80105c3d: 50 push %eax
80105c3e: e8 9d f5 ff ff call 801051e0 <memset>
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80105c43: 8d 45 d8 lea -0x28(%ebp),%eax
80105c46: 6a 10 push $0x10
80105c48: ff 75 c4 pushl -0x3c(%ebp)
80105c4b: 50 push %eax
80105c4c: 56 push %esi
80105c4d: e8 7e c1 ff ff call 80101dd0 <writei>
80105c52: 83 c4 20 add $0x20,%esp
80105c55: 83 f8 10 cmp $0x10,%eax
80105c58: 0f 85 eb 00 00 00 jne 80105d49 <sys_unlink+0x1c9>
if(ip->type == T_DIR){
80105c5e: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80105c63: 0f 84 97 00 00 00 je 80105d00 <sys_unlink+0x180>
iunlockput(dp);
80105c69: 83 ec 0c sub $0xc,%esp
80105c6c: 56 push %esi
80105c6d: e8 0e c0 ff ff call 80101c80 <iunlockput>
ip->nlink--;
80105c72: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
80105c77: 89 1c 24 mov %ebx,(%esp)
80105c7a: e8 c1 bc ff ff call 80101940 <iupdate>
iunlockput(ip);
80105c7f: 89 1c 24 mov %ebx,(%esp)
80105c82: e8 f9 bf ff ff call 80101c80 <iunlockput>
end_op();
80105c87: e8 f4 d2 ff ff call 80102f80 <end_op>
return 0;
80105c8c: 83 c4 10 add $0x10,%esp
80105c8f: 31 c0 xor %eax,%eax
}
80105c91: 8d 65 f4 lea -0xc(%ebp),%esp
80105c94: 5b pop %ebx
80105c95: 5e pop %esi
80105c96: 5f pop %edi
80105c97: 5d pop %ebp
80105c98: c3 ret
80105c99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
80105ca0: 83 7b 58 20 cmpl $0x20,0x58(%ebx)
80105ca4: 76 8d jbe 80105c33 <sys_unlink+0xb3>
80105ca6: bf 20 00 00 00 mov $0x20,%edi
80105cab: eb 0f jmp 80105cbc <sys_unlink+0x13c>
80105cad: 8d 76 00 lea 0x0(%esi),%esi
80105cb0: 83 c7 10 add $0x10,%edi
80105cb3: 3b 7b 58 cmp 0x58(%ebx),%edi
80105cb6: 0f 83 77 ff ff ff jae 80105c33 <sys_unlink+0xb3>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80105cbc: 8d 45 d8 lea -0x28(%ebp),%eax
80105cbf: 6a 10 push $0x10
80105cc1: 57 push %edi
80105cc2: 50 push %eax
80105cc3: 53 push %ebx
80105cc4: e8 07 c0 ff ff call 80101cd0 <readi>
80105cc9: 83 c4 10 add $0x10,%esp
80105ccc: 83 f8 10 cmp $0x10,%eax
80105ccf: 75 5e jne 80105d2f <sys_unlink+0x1af>
if(de.inum != 0)
80105cd1: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80105cd6: 74 d8 je 80105cb0 <sys_unlink+0x130>
iunlockput(ip);
80105cd8: 83 ec 0c sub $0xc,%esp
80105cdb: 53 push %ebx
80105cdc: e8 9f bf ff ff call 80101c80 <iunlockput>
goto bad;
80105ce1: 83 c4 10 add $0x10,%esp
iunlockput(dp);
80105ce4: 83 ec 0c sub $0xc,%esp
80105ce7: 56 push %esi
80105ce8: e8 93 bf ff ff call 80101c80 <iunlockput>
end_op();
80105ced: e8 8e d2 ff ff call 80102f80 <end_op>
return -1;
80105cf2: 83 c4 10 add $0x10,%esp
80105cf5: b8 ff ff ff ff mov $0xffffffff,%eax
80105cfa: eb 95 jmp 80105c91 <sys_unlink+0x111>
80105cfc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
dp->nlink--;
80105d00: 66 83 6e 56 01 subw $0x1,0x56(%esi)
iupdate(dp);
80105d05: 83 ec 0c sub $0xc,%esp
80105d08: 56 push %esi
80105d09: e8 32 bc ff ff call 80101940 <iupdate>
80105d0e: 83 c4 10 add $0x10,%esp
80105d11: e9 53 ff ff ff jmp 80105c69 <sys_unlink+0xe9>
return -1;
80105d16: b8 ff ff ff ff mov $0xffffffff,%eax
80105d1b: e9 71 ff ff ff jmp 80105c91 <sys_unlink+0x111>
end_op();
80105d20: e8 5b d2 ff ff call 80102f80 <end_op>
return -1;
80105d25: b8 ff ff ff ff mov $0xffffffff,%eax
80105d2a: e9 62 ff ff ff jmp 80105c91 <sys_unlink+0x111>
panic("isdirempty: readi");
80105d2f: 83 ec 0c sub $0xc,%esp
80105d32: 68 74 86 10 80 push $0x80108674
80105d37: e8 54 a6 ff ff call 80100390 <panic>
panic("unlink: nlink < 1");
80105d3c: 83 ec 0c sub $0xc,%esp
80105d3f: 68 62 86 10 80 push $0x80108662
80105d44: e8 47 a6 ff ff call 80100390 <panic>
panic("unlink: writei");
80105d49: 83 ec 0c sub $0xc,%esp
80105d4c: 68 86 86 10 80 push $0x80108686
80105d51: e8 3a a6 ff ff call 80100390 <panic>
80105d56: 8d 76 00 lea 0x0(%esi),%esi
80105d59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105d60 <sys_open>:
int
sys_open(void)
{
80105d60: 55 push %ebp
80105d61: 89 e5 mov %esp,%ebp
80105d63: 57 push %edi
80105d64: 56 push %esi
80105d65: 53 push %ebx
char *path;
int fd, omode;
struct file *f;
struct inode *ip;
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
80105d66: 8d 45 e0 lea -0x20(%ebp),%eax
{
80105d69: 83 ec 24 sub $0x24,%esp
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
80105d6c: 50 push %eax
80105d6d: 6a 00 push $0x0
80105d6f: e8 1c f8 ff ff call 80105590 <argstr>
80105d74: 83 c4 10 add $0x10,%esp
80105d77: 85 c0 test %eax,%eax
80105d79: 0f 88 1d 01 00 00 js 80105e9c <sys_open+0x13c>
80105d7f: 8d 45 e4 lea -0x1c(%ebp),%eax
80105d82: 83 ec 08 sub $0x8,%esp
80105d85: 50 push %eax
80105d86: 6a 01 push $0x1
80105d88: e8 53 f7 ff ff call 801054e0 <argint>
80105d8d: 83 c4 10 add $0x10,%esp
80105d90: 85 c0 test %eax,%eax
80105d92: 0f 88 04 01 00 00 js 80105e9c <sys_open+0x13c>
return -1;
begin_op();
80105d98: e8 73 d1 ff ff call 80102f10 <begin_op>
if(omode & O_CREATE){
80105d9d: f6 45 e5 02 testb $0x2,-0x1b(%ebp)
80105da1: 0f 85 a9 00 00 00 jne 80105e50 <sys_open+0xf0>
if(ip == 0){
end_op();
return -1;
}
} else {
if((ip = namei(path)) == 0){
80105da7: 83 ec 0c sub $0xc,%esp
80105daa: ff 75 e0 pushl -0x20(%ebp)
80105dad: e8 9e c4 ff ff call 80102250 <namei>
80105db2: 83 c4 10 add $0x10,%esp
80105db5: 85 c0 test %eax,%eax
80105db7: 89 c6 mov %eax,%esi
80105db9: 0f 84 b2 00 00 00 je 80105e71 <sys_open+0x111>
end_op();
return -1;
}
ilock(ip);
80105dbf: 83 ec 0c sub $0xc,%esp
80105dc2: 50 push %eax
80105dc3: e8 28 bc ff ff call 801019f0 <ilock>
if(ip->type == T_DIR && omode != O_RDONLY){
80105dc8: 83 c4 10 add $0x10,%esp
80105dcb: 66 83 7e 50 01 cmpw $0x1,0x50(%esi)
80105dd0: 0f 84 aa 00 00 00 je 80105e80 <sys_open+0x120>
end_op();
return -1;
}
}
if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
80105dd6: e8 05 b3 ff ff call 801010e0 <filealloc>
80105ddb: 85 c0 test %eax,%eax
80105ddd: 89 c7 mov %eax,%edi
80105ddf: 0f 84 a6 00 00 00 je 80105e8b <sys_open+0x12b>
struct proc *curproc = myproc();
80105de5: e8 b6 dd ff ff call 80103ba0 <myproc>
for(fd = 0; fd < NOFILE; fd++){
80105dea: 31 db xor %ebx,%ebx
80105dec: eb 0e jmp 80105dfc <sys_open+0x9c>
80105dee: 66 90 xchg %ax,%ax
80105df0: 83 c3 01 add $0x1,%ebx
80105df3: 83 fb 10 cmp $0x10,%ebx
80105df6: 0f 84 ac 00 00 00 je 80105ea8 <sys_open+0x148>
if(curproc->ofile[fd] == 0){
80105dfc: 8b 54 98 28 mov 0x28(%eax,%ebx,4),%edx
80105e00: 85 d2 test %edx,%edx
80105e02: 75 ec jne 80105df0 <sys_open+0x90>
fileclose(f);
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
80105e04: 83 ec 0c sub $0xc,%esp
curproc->ofile[fd] = f;
80105e07: 89 7c 98 28 mov %edi,0x28(%eax,%ebx,4)
iunlock(ip);
80105e0b: 56 push %esi
80105e0c: e8 bf bc ff ff call 80101ad0 <iunlock>
end_op();
80105e11: e8 6a d1 ff ff call 80102f80 <end_op>
f->type = FD_INODE;
80105e16: c7 07 02 00 00 00 movl $0x2,(%edi)
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
80105e1c: 8b 55 e4 mov -0x1c(%ebp),%edx
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
80105e1f: 83 c4 10 add $0x10,%esp
f->ip = ip;
80105e22: 89 77 10 mov %esi,0x10(%edi)
f->off = 0;
80105e25: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi)
f->readable = !(omode & O_WRONLY);
80105e2c: 89 d0 mov %edx,%eax
80105e2e: f7 d0 not %eax
80105e30: 83 e0 01 and $0x1,%eax
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
80105e33: 83 e2 03 and $0x3,%edx
f->readable = !(omode & O_WRONLY);
80105e36: 88 47 08 mov %al,0x8(%edi)
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
80105e39: 0f 95 47 09 setne 0x9(%edi)
return fd;
}
80105e3d: 8d 65 f4 lea -0xc(%ebp),%esp
80105e40: 89 d8 mov %ebx,%eax
80105e42: 5b pop %ebx
80105e43: 5e pop %esi
80105e44: 5f pop %edi
80105e45: 5d pop %ebp
80105e46: c3 ret
80105e47: 89 f6 mov %esi,%esi
80105e49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
ip = create(path, T_FILE, 0, 0);
80105e50: 83 ec 0c sub $0xc,%esp
80105e53: 8b 45 e0 mov -0x20(%ebp),%eax
80105e56: 31 c9 xor %ecx,%ecx
80105e58: 6a 00 push $0x0
80105e5a: ba 02 00 00 00 mov $0x2,%edx
80105e5f: e8 ec f7 ff ff call 80105650 <create>
if(ip == 0){
80105e64: 83 c4 10 add $0x10,%esp
80105e67: 85 c0 test %eax,%eax
ip = create(path, T_FILE, 0, 0);
80105e69: 89 c6 mov %eax,%esi
if(ip == 0){
80105e6b: 0f 85 65 ff ff ff jne 80105dd6 <sys_open+0x76>
end_op();
80105e71: e8 0a d1 ff ff call 80102f80 <end_op>
return -1;
80105e76: bb ff ff ff ff mov $0xffffffff,%ebx
80105e7b: eb c0 jmp 80105e3d <sys_open+0xdd>
80105e7d: 8d 76 00 lea 0x0(%esi),%esi
if(ip->type == T_DIR && omode != O_RDONLY){
80105e80: 8b 4d e4 mov -0x1c(%ebp),%ecx
80105e83: 85 c9 test %ecx,%ecx
80105e85: 0f 84 4b ff ff ff je 80105dd6 <sys_open+0x76>
iunlockput(ip);
80105e8b: 83 ec 0c sub $0xc,%esp
80105e8e: 56 push %esi
80105e8f: e8 ec bd ff ff call 80101c80 <iunlockput>
end_op();
80105e94: e8 e7 d0 ff ff call 80102f80 <end_op>
return -1;
80105e99: 83 c4 10 add $0x10,%esp
80105e9c: bb ff ff ff ff mov $0xffffffff,%ebx
80105ea1: eb 9a jmp 80105e3d <sys_open+0xdd>
80105ea3: 90 nop
80105ea4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
fileclose(f);
80105ea8: 83 ec 0c sub $0xc,%esp
80105eab: 57 push %edi
80105eac: e8 ef b2 ff ff call 801011a0 <fileclose>
80105eb1: 83 c4 10 add $0x10,%esp
80105eb4: eb d5 jmp 80105e8b <sys_open+0x12b>
80105eb6: 8d 76 00 lea 0x0(%esi),%esi
80105eb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105ec0 <sys_mkdir>:
int
sys_mkdir(void)
{
80105ec0: 55 push %ebp
80105ec1: 89 e5 mov %esp,%ebp
80105ec3: 83 ec 18 sub $0x18,%esp
char *path;
struct inode *ip;
begin_op();
80105ec6: e8 45 d0 ff ff call 80102f10 <begin_op>
if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){
80105ecb: 8d 45 f4 lea -0xc(%ebp),%eax
80105ece: 83 ec 08 sub $0x8,%esp
80105ed1: 50 push %eax
80105ed2: 6a 00 push $0x0
80105ed4: e8 b7 f6 ff ff call 80105590 <argstr>
80105ed9: 83 c4 10 add $0x10,%esp
80105edc: 85 c0 test %eax,%eax
80105ede: 78 30 js 80105f10 <sys_mkdir+0x50>
80105ee0: 83 ec 0c sub $0xc,%esp
80105ee3: 8b 45 f4 mov -0xc(%ebp),%eax
80105ee6: 31 c9 xor %ecx,%ecx
80105ee8: 6a 00 push $0x0
80105eea: ba 01 00 00 00 mov $0x1,%edx
80105eef: e8 5c f7 ff ff call 80105650 <create>
80105ef4: 83 c4 10 add $0x10,%esp
80105ef7: 85 c0 test %eax,%eax
80105ef9: 74 15 je 80105f10 <sys_mkdir+0x50>
end_op();
return -1;
}
iunlockput(ip);
80105efb: 83 ec 0c sub $0xc,%esp
80105efe: 50 push %eax
80105eff: e8 7c bd ff ff call 80101c80 <iunlockput>
end_op();
80105f04: e8 77 d0 ff ff call 80102f80 <end_op>
return 0;
80105f09: 83 c4 10 add $0x10,%esp
80105f0c: 31 c0 xor %eax,%eax
}
80105f0e: c9 leave
80105f0f: c3 ret
end_op();
80105f10: e8 6b d0 ff ff call 80102f80 <end_op>
return -1;
80105f15: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105f1a: c9 leave
80105f1b: c3 ret
80105f1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105f20 <sys_mknod>:
int
sys_mknod(void)
{
80105f20: 55 push %ebp
80105f21: 89 e5 mov %esp,%ebp
80105f23: 83 ec 18 sub $0x18,%esp
struct inode *ip;
char *path;
int major, minor;
begin_op();
80105f26: e8 e5 cf ff ff call 80102f10 <begin_op>
if((argstr(0, &path)) < 0 ||
80105f2b: 8d 45 ec lea -0x14(%ebp),%eax
80105f2e: 83 ec 08 sub $0x8,%esp
80105f31: 50 push %eax
80105f32: 6a 00 push $0x0
80105f34: e8 57 f6 ff ff call 80105590 <argstr>
80105f39: 83 c4 10 add $0x10,%esp
80105f3c: 85 c0 test %eax,%eax
80105f3e: 78 60 js 80105fa0 <sys_mknod+0x80>
argint(1, &major) < 0 ||
80105f40: 8d 45 f0 lea -0x10(%ebp),%eax
80105f43: 83 ec 08 sub $0x8,%esp
80105f46: 50 push %eax
80105f47: 6a 01 push $0x1
80105f49: e8 92 f5 ff ff call 801054e0 <argint>
if((argstr(0, &path)) < 0 ||
80105f4e: 83 c4 10 add $0x10,%esp
80105f51: 85 c0 test %eax,%eax
80105f53: 78 4b js 80105fa0 <sys_mknod+0x80>
argint(2, &minor) < 0 ||
80105f55: 8d 45 f4 lea -0xc(%ebp),%eax
80105f58: 83 ec 08 sub $0x8,%esp
80105f5b: 50 push %eax
80105f5c: 6a 02 push $0x2
80105f5e: e8 7d f5 ff ff call 801054e0 <argint>
argint(1, &major) < 0 ||
80105f63: 83 c4 10 add $0x10,%esp
80105f66: 85 c0 test %eax,%eax
80105f68: 78 36 js 80105fa0 <sys_mknod+0x80>
(ip = create(path, T_DEV, major, minor)) == 0){
80105f6a: 0f bf 45 f4 movswl -0xc(%ebp),%eax
argint(2, &minor) < 0 ||
80105f6e: 83 ec 0c sub $0xc,%esp
(ip = create(path, T_DEV, major, minor)) == 0){
80105f71: 0f bf 4d f0 movswl -0x10(%ebp),%ecx
argint(2, &minor) < 0 ||
80105f75: ba 03 00 00 00 mov $0x3,%edx
80105f7a: 50 push %eax
80105f7b: 8b 45 ec mov -0x14(%ebp),%eax
80105f7e: e8 cd f6 ff ff call 80105650 <create>
80105f83: 83 c4 10 add $0x10,%esp
80105f86: 85 c0 test %eax,%eax
80105f88: 74 16 je 80105fa0 <sys_mknod+0x80>
end_op();
return -1;
}
iunlockput(ip);
80105f8a: 83 ec 0c sub $0xc,%esp
80105f8d: 50 push %eax
80105f8e: e8 ed bc ff ff call 80101c80 <iunlockput>
end_op();
80105f93: e8 e8 cf ff ff call 80102f80 <end_op>
return 0;
80105f98: 83 c4 10 add $0x10,%esp
80105f9b: 31 c0 xor %eax,%eax
}
80105f9d: c9 leave
80105f9e: c3 ret
80105f9f: 90 nop
end_op();
80105fa0: e8 db cf ff ff call 80102f80 <end_op>
return -1;
80105fa5: b8 ff ff ff ff mov $0xffffffff,%eax
}
80105faa: c9 leave
80105fab: c3 ret
80105fac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105fb0 <sys_chdir>:
int
sys_chdir(void)
{
80105fb0: 55 push %ebp
80105fb1: 89 e5 mov %esp,%ebp
80105fb3: 56 push %esi
80105fb4: 53 push %ebx
80105fb5: 83 ec 10 sub $0x10,%esp
char *path;
struct inode *ip;
struct proc *curproc = myproc();
80105fb8: e8 e3 db ff ff call 80103ba0 <myproc>
80105fbd: 89 c6 mov %eax,%esi
begin_op();
80105fbf: e8 4c cf ff ff call 80102f10 <begin_op>
if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){
80105fc4: 8d 45 f4 lea -0xc(%ebp),%eax
80105fc7: 83 ec 08 sub $0x8,%esp
80105fca: 50 push %eax
80105fcb: 6a 00 push $0x0
80105fcd: e8 be f5 ff ff call 80105590 <argstr>
80105fd2: 83 c4 10 add $0x10,%esp
80105fd5: 85 c0 test %eax,%eax
80105fd7: 78 77 js 80106050 <sys_chdir+0xa0>
80105fd9: 83 ec 0c sub $0xc,%esp
80105fdc: ff 75 f4 pushl -0xc(%ebp)
80105fdf: e8 6c c2 ff ff call 80102250 <namei>
80105fe4: 83 c4 10 add $0x10,%esp
80105fe7: 85 c0 test %eax,%eax
80105fe9: 89 c3 mov %eax,%ebx
80105feb: 74 63 je 80106050 <sys_chdir+0xa0>
end_op();
return -1;
}
ilock(ip);
80105fed: 83 ec 0c sub $0xc,%esp
80105ff0: 50 push %eax
80105ff1: e8 fa b9 ff ff call 801019f0 <ilock>
if(ip->type != T_DIR){
80105ff6: 83 c4 10 add $0x10,%esp
80105ff9: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80105ffe: 75 30 jne 80106030 <sys_chdir+0x80>
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
80106000: 83 ec 0c sub $0xc,%esp
80106003: 53 push %ebx
80106004: e8 c7 ba ff ff call 80101ad0 <iunlock>
iput(curproc->cwd);
80106009: 58 pop %eax
8010600a: ff 76 68 pushl 0x68(%esi)
8010600d: e8 0e bb ff ff call 80101b20 <iput>
end_op();
80106012: e8 69 cf ff ff call 80102f80 <end_op>
curproc->cwd = ip;
80106017: 89 5e 68 mov %ebx,0x68(%esi)
return 0;
8010601a: 83 c4 10 add $0x10,%esp
8010601d: 31 c0 xor %eax,%eax
}
8010601f: 8d 65 f8 lea -0x8(%ebp),%esp
80106022: 5b pop %ebx
80106023: 5e pop %esi
80106024: 5d pop %ebp
80106025: c3 ret
80106026: 8d 76 00 lea 0x0(%esi),%esi
80106029: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
iunlockput(ip);
80106030: 83 ec 0c sub $0xc,%esp
80106033: 53 push %ebx
80106034: e8 47 bc ff ff call 80101c80 <iunlockput>
end_op();
80106039: e8 42 cf ff ff call 80102f80 <end_op>
return -1;
8010603e: 83 c4 10 add $0x10,%esp
80106041: b8 ff ff ff ff mov $0xffffffff,%eax
80106046: eb d7 jmp 8010601f <sys_chdir+0x6f>
80106048: 90 nop
80106049: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
end_op();
80106050: e8 2b cf ff ff call 80102f80 <end_op>
return -1;
80106055: b8 ff ff ff ff mov $0xffffffff,%eax
8010605a: eb c3 jmp 8010601f <sys_chdir+0x6f>
8010605c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106060 <sys_exec>:
int
sys_exec(void)
{
80106060: 55 push %ebp
80106061: 89 e5 mov %esp,%ebp
80106063: 57 push %edi
80106064: 56 push %esi
80106065: 53 push %ebx
char *path, *argv[MAXARG];
int i;
uint uargv, uarg;
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
80106066: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax
{
8010606c: 81 ec a4 00 00 00 sub $0xa4,%esp
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
80106072: 50 push %eax
80106073: 6a 00 push $0x0
80106075: e8 16 f5 ff ff call 80105590 <argstr>
8010607a: 83 c4 10 add $0x10,%esp
8010607d: 85 c0 test %eax,%eax
8010607f: 0f 88 87 00 00 00 js 8010610c <sys_exec+0xac>
80106085: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax
8010608b: 83 ec 08 sub $0x8,%esp
8010608e: 50 push %eax
8010608f: 6a 01 push $0x1
80106091: e8 4a f4 ff ff call 801054e0 <argint>
80106096: 83 c4 10 add $0x10,%esp
80106099: 85 c0 test %eax,%eax
8010609b: 78 6f js 8010610c <sys_exec+0xac>
return -1;
}
memset(argv, 0, sizeof(argv));
8010609d: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
801060a3: 83 ec 04 sub $0x4,%esp
for(i=0;; i++){
801060a6: 31 db xor %ebx,%ebx
memset(argv, 0, sizeof(argv));
801060a8: 68 80 00 00 00 push $0x80
801060ad: 6a 00 push $0x0
801060af: 8d bd 64 ff ff ff lea -0x9c(%ebp),%edi
801060b5: 50 push %eax
801060b6: e8 25 f1 ff ff call 801051e0 <memset>
801060bb: 83 c4 10 add $0x10,%esp
801060be: eb 2c jmp 801060ec <sys_exec+0x8c>
if(i >= NELEM(argv))
return -1;
if(fetchint(uargv+4*i, (int*)&uarg) < 0)
return -1;
if(uarg == 0){
801060c0: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
801060c6: 85 c0 test %eax,%eax
801060c8: 74 56 je 80106120 <sys_exec+0xc0>
argv[i] = 0;
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
801060ca: 8d 8d 68 ff ff ff lea -0x98(%ebp),%ecx
801060d0: 83 ec 08 sub $0x8,%esp
801060d3: 8d 14 31 lea (%ecx,%esi,1),%edx
801060d6: 52 push %edx
801060d7: 50 push %eax
801060d8: e8 93 f3 ff ff call 80105470 <fetchstr>
801060dd: 83 c4 10 add $0x10,%esp
801060e0: 85 c0 test %eax,%eax
801060e2: 78 28 js 8010610c <sys_exec+0xac>
for(i=0;; i++){
801060e4: 83 c3 01 add $0x1,%ebx
if(i >= NELEM(argv))
801060e7: 83 fb 20 cmp $0x20,%ebx
801060ea: 74 20 je 8010610c <sys_exec+0xac>
if(fetchint(uargv+4*i, (int*)&uarg) < 0)
801060ec: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
801060f2: 8d 34 9d 00 00 00 00 lea 0x0(,%ebx,4),%esi
801060f9: 83 ec 08 sub $0x8,%esp
801060fc: 57 push %edi
801060fd: 01 f0 add %esi,%eax
801060ff: 50 push %eax
80106100: e8 2b f3 ff ff call 80105430 <fetchint>
80106105: 83 c4 10 add $0x10,%esp
80106108: 85 c0 test %eax,%eax
8010610a: 79 b4 jns 801060c0 <sys_exec+0x60>
return -1;
}
return exec(path, argv);
}
8010610c: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
8010610f: b8 ff ff ff ff mov $0xffffffff,%eax
}
80106114: 5b pop %ebx
80106115: 5e pop %esi
80106116: 5f pop %edi
80106117: 5d pop %ebp
80106118: c3 ret
80106119: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return exec(path, argv);
80106120: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
80106126: 83 ec 08 sub $0x8,%esp
argv[i] = 0;
80106129: c7 84 9d 68 ff ff ff movl $0x0,-0x98(%ebp,%ebx,4)
80106130: 00 00 00 00
return exec(path, argv);
80106134: 50 push %eax
80106135: ff b5 5c ff ff ff pushl -0xa4(%ebp)
8010613b: e8 d0 ab ff ff call 80100d10 <exec>
80106140: 83 c4 10 add $0x10,%esp
}
80106143: 8d 65 f4 lea -0xc(%ebp),%esp
80106146: 5b pop %ebx
80106147: 5e pop %esi
80106148: 5f pop %edi
80106149: 5d pop %ebp
8010614a: c3 ret
8010614b: 90 nop
8010614c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106150 <sys_pipe>:
int
sys_pipe(void)
{
80106150: 55 push %ebp
80106151: 89 e5 mov %esp,%ebp
80106153: 57 push %edi
80106154: 56 push %esi
80106155: 53 push %ebx
int *fd;
struct file *rf, *wf;
int fd0, fd1;
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
80106156: 8d 45 dc lea -0x24(%ebp),%eax
{
80106159: 83 ec 20 sub $0x20,%esp
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
8010615c: 6a 08 push $0x8
8010615e: 50 push %eax
8010615f: 6a 00 push $0x0
80106161: e8 ca f3 ff ff call 80105530 <argptr>
80106166: 83 c4 10 add $0x10,%esp
80106169: 85 c0 test %eax,%eax
8010616b: 0f 88 ae 00 00 00 js 8010621f <sys_pipe+0xcf>
return -1;
if(pipealloc(&rf, &wf) < 0)
80106171: 8d 45 e4 lea -0x1c(%ebp),%eax
80106174: 83 ec 08 sub $0x8,%esp
80106177: 50 push %eax
80106178: 8d 45 e0 lea -0x20(%ebp),%eax
8010617b: 50 push %eax
8010617c: e8 2f d4 ff ff call 801035b0 <pipealloc>
80106181: 83 c4 10 add $0x10,%esp
80106184: 85 c0 test %eax,%eax
80106186: 0f 88 93 00 00 00 js 8010621f <sys_pipe+0xcf>
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
8010618c: 8b 7d e0 mov -0x20(%ebp),%edi
for(fd = 0; fd < NOFILE; fd++){
8010618f: 31 db xor %ebx,%ebx
struct proc *curproc = myproc();
80106191: e8 0a da ff ff call 80103ba0 <myproc>
80106196: eb 10 jmp 801061a8 <sys_pipe+0x58>
80106198: 90 nop
80106199: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(fd = 0; fd < NOFILE; fd++){
801061a0: 83 c3 01 add $0x1,%ebx
801061a3: 83 fb 10 cmp $0x10,%ebx
801061a6: 74 60 je 80106208 <sys_pipe+0xb8>
if(curproc->ofile[fd] == 0){
801061a8: 8b 74 98 28 mov 0x28(%eax,%ebx,4),%esi
801061ac: 85 f6 test %esi,%esi
801061ae: 75 f0 jne 801061a0 <sys_pipe+0x50>
curproc->ofile[fd] = f;
801061b0: 8d 73 08 lea 0x8(%ebx),%esi
801061b3: 89 7c b0 08 mov %edi,0x8(%eax,%esi,4)
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
801061b7: 8b 7d e4 mov -0x1c(%ebp),%edi
struct proc *curproc = myproc();
801061ba: e8 e1 d9 ff ff call 80103ba0 <myproc>
for(fd = 0; fd < NOFILE; fd++){
801061bf: 31 d2 xor %edx,%edx
801061c1: eb 0d jmp 801061d0 <sys_pipe+0x80>
801061c3: 90 nop
801061c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801061c8: 83 c2 01 add $0x1,%edx
801061cb: 83 fa 10 cmp $0x10,%edx
801061ce: 74 28 je 801061f8 <sys_pipe+0xa8>
if(curproc->ofile[fd] == 0){
801061d0: 8b 4c 90 28 mov 0x28(%eax,%edx,4),%ecx
801061d4: 85 c9 test %ecx,%ecx
801061d6: 75 f0 jne 801061c8 <sys_pipe+0x78>
curproc->ofile[fd] = f;
801061d8: 89 7c 90 28 mov %edi,0x28(%eax,%edx,4)
myproc()->ofile[fd0] = 0;
fileclose(rf);
fileclose(wf);
return -1;
}
fd[0] = fd0;
801061dc: 8b 45 dc mov -0x24(%ebp),%eax
801061df: 89 18 mov %ebx,(%eax)
fd[1] = fd1;
801061e1: 8b 45 dc mov -0x24(%ebp),%eax
801061e4: 89 50 04 mov %edx,0x4(%eax)
return 0;
801061e7: 31 c0 xor %eax,%eax
}
801061e9: 8d 65 f4 lea -0xc(%ebp),%esp
801061ec: 5b pop %ebx
801061ed: 5e pop %esi
801061ee: 5f pop %edi
801061ef: 5d pop %ebp
801061f0: c3 ret
801061f1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
myproc()->ofile[fd0] = 0;
801061f8: e8 a3 d9 ff ff call 80103ba0 <myproc>
801061fd: c7 44 b0 08 00 00 00 movl $0x0,0x8(%eax,%esi,4)
80106204: 00
80106205: 8d 76 00 lea 0x0(%esi),%esi
fileclose(rf);
80106208: 83 ec 0c sub $0xc,%esp
8010620b: ff 75 e0 pushl -0x20(%ebp)
8010620e: e8 8d af ff ff call 801011a0 <fileclose>
fileclose(wf);
80106213: 58 pop %eax
80106214: ff 75 e4 pushl -0x1c(%ebp)
80106217: e8 84 af ff ff call 801011a0 <fileclose>
return -1;
8010621c: 83 c4 10 add $0x10,%esp
8010621f: b8 ff ff ff ff mov $0xffffffff,%eax
80106224: eb c3 jmp 801061e9 <sys_pipe+0x99>
80106226: 66 90 xchg %ax,%ax
80106228: 66 90 xchg %ax,%ax
8010622a: 66 90 xchg %ax,%ax
8010622c: 66 90 xchg %ax,%ax
8010622e: 66 90 xchg %ax,%ax
80106230 <sys_fork>:
#include "mmu.h"
#include "proc.h"
int
sys_fork(void)
{
80106230: 55 push %ebp
80106231: 89 e5 mov %esp,%ebp
return fork();
}
80106233: 5d pop %ebp
return fork();
80106234: e9 07 db ff ff jmp 80103d40 <fork>
80106239: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106240 <sys_exit>:
int
sys_exit(void)
{
80106240: 55 push %ebp
80106241: 89 e5 mov %esp,%ebp
80106243: 83 ec 08 sub $0x8,%esp
exit();
80106246: e8 d5 dc ff ff call 80103f20 <exit>
return 0; // not reached
}
8010624b: 31 c0 xor %eax,%eax
8010624d: c9 leave
8010624e: c3 ret
8010624f: 90 nop
80106250 <sys_wait>:
int
sys_wait(void)
{
80106250: 55 push %ebp
80106251: 89 e5 mov %esp,%ebp
return wait();
}
80106253: 5d pop %ebp
return wait();
80106254: e9 07 df ff ff jmp 80104160 <wait>
80106259: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106260 <sys_kill>:
int
sys_kill(void)
{
80106260: 55 push %ebp
80106261: 89 e5 mov %esp,%ebp
80106263: 83 ec 20 sub $0x20,%esp
int pid;
if(argint(0, &pid) < 0)
80106266: 8d 45 f4 lea -0xc(%ebp),%eax
80106269: 50 push %eax
8010626a: 6a 00 push $0x0
8010626c: e8 6f f2 ff ff call 801054e0 <argint>
80106271: 83 c4 10 add $0x10,%esp
80106274: 85 c0 test %eax,%eax
80106276: 78 18 js 80106290 <sys_kill+0x30>
return -1;
return kill(pid);
80106278: 83 ec 0c sub $0xc,%esp
8010627b: ff 75 f4 pushl -0xc(%ebp)
8010627e: e8 3d e0 ff ff call 801042c0 <kill>
80106283: 83 c4 10 add $0x10,%esp
}
80106286: c9 leave
80106287: c3 ret
80106288: 90 nop
80106289: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80106290: b8 ff ff ff ff mov $0xffffffff,%eax
}
80106295: c9 leave
80106296: c3 ret
80106297: 89 f6 mov %esi,%esi
80106299: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801062a0 <sys_getpid>:
int
sys_getpid(void)
{
801062a0: 55 push %ebp
801062a1: 89 e5 mov %esp,%ebp
801062a3: 83 ec 08 sub $0x8,%esp
return myproc()->pid;
801062a6: e8 f5 d8 ff ff call 80103ba0 <myproc>
801062ab: 8b 40 10 mov 0x10(%eax),%eax
}
801062ae: c9 leave
801062af: c3 ret
801062b0 <sys_sbrk>:
int
sys_sbrk(void)
{
801062b0: 55 push %ebp
801062b1: 89 e5 mov %esp,%ebp
801062b3: 53 push %ebx
int addr;
int n;
if(argint(0, &n) < 0)
801062b4: 8d 45 f4 lea -0xc(%ebp),%eax
{
801062b7: 83 ec 1c sub $0x1c,%esp
if(argint(0, &n) < 0)
801062ba: 50 push %eax
801062bb: 6a 00 push $0x0
801062bd: e8 1e f2 ff ff call 801054e0 <argint>
801062c2: 83 c4 10 add $0x10,%esp
801062c5: 85 c0 test %eax,%eax
801062c7: 78 27 js 801062f0 <sys_sbrk+0x40>
return -1;
addr = myproc()->sz;
801062c9: e8 d2 d8 ff ff call 80103ba0 <myproc>
if(growproc(n) < 0)
801062ce: 83 ec 0c sub $0xc,%esp
addr = myproc()->sz;
801062d1: 8b 18 mov (%eax),%ebx
if(growproc(n) < 0)
801062d3: ff 75 f4 pushl -0xc(%ebp)
801062d6: e8 e5 d9 ff ff call 80103cc0 <growproc>
801062db: 83 c4 10 add $0x10,%esp
801062de: 85 c0 test %eax,%eax
801062e0: 78 0e js 801062f0 <sys_sbrk+0x40>
return -1;
return addr;
}
801062e2: 89 d8 mov %ebx,%eax
801062e4: 8b 5d fc mov -0x4(%ebp),%ebx
801062e7: c9 leave
801062e8: c3 ret
801062e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
801062f0: bb ff ff ff ff mov $0xffffffff,%ebx
801062f5: eb eb jmp 801062e2 <sys_sbrk+0x32>
801062f7: 89 f6 mov %esi,%esi
801062f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106300 <sys_sleep>:
int
sys_sleep(void)
{
80106300: 55 push %ebp
80106301: 89 e5 mov %esp,%ebp
80106303: 53 push %ebx
int n;
uint ticks0;
if(argint(0, &n) < 0)
80106304: 8d 45 f4 lea -0xc(%ebp),%eax
{
80106307: 83 ec 1c sub $0x1c,%esp
if(argint(0, &n) < 0)
8010630a: 50 push %eax
8010630b: 6a 00 push $0x0
8010630d: e8 ce f1 ff ff call 801054e0 <argint>
80106312: 83 c4 10 add $0x10,%esp
80106315: 85 c0 test %eax,%eax
80106317: 0f 88 8a 00 00 00 js 801063a7 <sys_sleep+0xa7>
return -1;
acquire(&tickslock);
8010631d: 83 ec 0c sub $0xc,%esp
80106320: 68 40 65 11 80 push $0x80116540
80106325: e8 a6 ed ff ff call 801050d0 <acquire>
ticks0 = ticks;
while(ticks - ticks0 < n){
8010632a: 8b 55 f4 mov -0xc(%ebp),%edx
8010632d: 83 c4 10 add $0x10,%esp
ticks0 = ticks;
80106330: 8b 1d 80 6d 11 80 mov 0x80116d80,%ebx
while(ticks - ticks0 < n){
80106336: 85 d2 test %edx,%edx
80106338: 75 27 jne 80106361 <sys_sleep+0x61>
8010633a: eb 54 jmp 80106390 <sys_sleep+0x90>
8010633c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(myproc()->killed){
release(&tickslock);
return -1;
}
sleep(&ticks, &tickslock);
80106340: 83 ec 08 sub $0x8,%esp
80106343: 68 40 65 11 80 push $0x80116540
80106348: 68 80 6d 11 80 push $0x80116d80
8010634d: e8 4e dd ff ff call 801040a0 <sleep>
while(ticks - ticks0 < n){
80106352: a1 80 6d 11 80 mov 0x80116d80,%eax
80106357: 83 c4 10 add $0x10,%esp
8010635a: 29 d8 sub %ebx,%eax
8010635c: 3b 45 f4 cmp -0xc(%ebp),%eax
8010635f: 73 2f jae 80106390 <sys_sleep+0x90>
if(myproc()->killed){
80106361: e8 3a d8 ff ff call 80103ba0 <myproc>
80106366: 8b 40 24 mov 0x24(%eax),%eax
80106369: 85 c0 test %eax,%eax
8010636b: 74 d3 je 80106340 <sys_sleep+0x40>
release(&tickslock);
8010636d: 83 ec 0c sub $0xc,%esp
80106370: 68 40 65 11 80 push $0x80116540
80106375: e8 16 ee ff ff call 80105190 <release>
return -1;
8010637a: 83 c4 10 add $0x10,%esp
8010637d: b8 ff ff ff ff mov $0xffffffff,%eax
}
release(&tickslock);
return 0;
}
80106382: 8b 5d fc mov -0x4(%ebp),%ebx
80106385: c9 leave
80106386: c3 ret
80106387: 89 f6 mov %esi,%esi
80106389: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
release(&tickslock);
80106390: 83 ec 0c sub $0xc,%esp
80106393: 68 40 65 11 80 push $0x80116540
80106398: e8 f3 ed ff ff call 80105190 <release>
return 0;
8010639d: 83 c4 10 add $0x10,%esp
801063a0: 31 c0 xor %eax,%eax
}
801063a2: 8b 5d fc mov -0x4(%ebp),%ebx
801063a5: c9 leave
801063a6: c3 ret
return -1;
801063a7: b8 ff ff ff ff mov $0xffffffff,%eax
801063ac: eb f4 jmp 801063a2 <sys_sleep+0xa2>
801063ae: 66 90 xchg %ax,%ax
801063b0 <sys_uptime>:
// return how many clock tick interrupts have occurred
// since start.
int
sys_uptime(void)
{
801063b0: 55 push %ebp
801063b1: 89 e5 mov %esp,%ebp
801063b3: 53 push %ebx
801063b4: 83 ec 10 sub $0x10,%esp
uint xticks;
acquire(&tickslock);
801063b7: 68 40 65 11 80 push $0x80116540
801063bc: e8 0f ed ff ff call 801050d0 <acquire>
xticks = ticks;
801063c1: 8b 1d 80 6d 11 80 mov 0x80116d80,%ebx
release(&tickslock);
801063c7: c7 04 24 40 65 11 80 movl $0x80116540,(%esp)
801063ce: e8 bd ed ff ff call 80105190 <release>
return xticks;
}
801063d3: 89 d8 mov %ebx,%eax
801063d5: 8b 5d fc mov -0x4(%ebp),%ebx
801063d8: c9 leave
801063d9: c3 ret
801063da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801063e0 <sys_incNum>:
int
sys_incNum(int num)
{
801063e0: 55 push %ebp
801063e1: 89 e5 mov %esp,%ebp
801063e3: 83 ec 10 sub $0x10,%esp
num++;
801063e6: 8b 45 08 mov 0x8(%ebp),%eax
801063e9: 83 c0 01 add $0x1,%eax
cprintf("increased and print in kernel surface %d\n",num);
801063ec: 50 push %eax
801063ed: 68 98 86 10 80 push $0x80108698
801063f2: e8 69 a2 ff ff call 80100660 <cprintf>
return 22;
}
801063f7: b8 16 00 00 00 mov $0x16,%eax
801063fc: c9 leave
801063fd: c3 ret
801063fe: 66 90 xchg %ax,%ax
80106400 <sys_getprocs>:
int
sys_getprocs()
{
80106400: 55 push %ebp
80106401: 89 e5 mov %esp,%ebp
return getprocs();
}
80106403: 5d pop %ebp
return getprocs();
80106404: e9 c7 e0 ff ff jmp 801044d0 <getprocs>
80106409: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106410 <sys_set_burst_time>:
void sys_set_burst_time()
{
80106410: 55 push %ebp
80106411: 89 e5 mov %esp,%ebp
80106413: 83 ec 20 sub $0x20,%esp
int burst_time;
argint(0, &burst_time);
80106416: 8d 45 f0 lea -0x10(%ebp),%eax
80106419: 50 push %eax
8010641a: 6a 00 push $0x0
8010641c: e8 bf f0 ff ff call 801054e0 <argint>
int pid;
argint(1, &pid);
80106421: 58 pop %eax
80106422: 8d 45 f4 lea -0xc(%ebp),%eax
80106425: 5a pop %edx
80106426: 50 push %eax
80106427: 6a 01 push $0x1
80106429: e8 b2 f0 ff ff call 801054e0 <argint>
find_and_set_burst_time(burst_time , pid);
8010642e: 59 pop %ecx
8010642f: 58 pop %eax
80106430: ff 75 f4 pushl -0xc(%ebp)
80106433: ff 75 f0 pushl -0x10(%ebp)
80106436: e8 25 e3 ff ff call 80104760 <find_and_set_burst_time>
}
8010643b: 83 c4 10 add $0x10,%esp
8010643e: c9 leave
8010643f: c3 ret
80106440 <sys_set_priority>:
void sys_set_priority()
{
80106440: 55 push %ebp
80106441: 89 e5 mov %esp,%ebp
80106443: 83 ec 20 sub $0x20,%esp
int priority;
argint(0, &priority);
80106446: 8d 45 f0 lea -0x10(%ebp),%eax
80106449: 50 push %eax
8010644a: 6a 00 push $0x0
8010644c: e8 8f f0 ff ff call 801054e0 <argint>
int pid;
argint(1, &pid);
80106451: 58 pop %eax
80106452: 8d 45 f4 lea -0xc(%ebp),%eax
80106455: 5a pop %edx
80106456: 50 push %eax
80106457: 6a 01 push $0x1
80106459: e8 82 f0 ff ff call 801054e0 <argint>
find_and_set_priority(priority, pid);
8010645e: 59 pop %ecx
8010645f: 58 pop %eax
80106460: ff 75 f4 pushl -0xc(%ebp)
80106463: ff 75 f0 pushl -0x10(%ebp)
80106466: e8 65 e2 ff ff call 801046d0 <find_and_set_priority>
}
8010646b: 83 c4 10 add $0x10,%esp
8010646e: c9 leave
8010646f: c3 ret
80106470 <sys_set_lottery_ticket>:
void sys_set_lottery_ticket(){
80106470: 55 push %ebp
80106471: 89 e5 mov %esp,%ebp
80106473: 83 ec 20 sub $0x20,%esp
int lottery_ticket;
argint(0, &lottery_ticket);
80106476: 8d 45 f0 lea -0x10(%ebp),%eax
80106479: 50 push %eax
8010647a: 6a 00 push $0x0
8010647c: e8 5f f0 ff ff call 801054e0 <argint>
int pid;
argint(1, &pid);
80106481: 58 pop %eax
80106482: 8d 45 f4 lea -0xc(%ebp),%eax
80106485: 5a pop %edx
80106486: 50 push %eax
80106487: 6a 01 push $0x1
80106489: e8 52 f0 ff ff call 801054e0 <argint>
find_and_set_lottery_ticket(lottery_ticket , pid);
8010648e: 59 pop %ecx
8010648f: 58 pop %eax
80106490: ff 75 f4 pushl -0xc(%ebp)
80106493: ff 75 f0 pushl -0x10(%ebp)
80106496: e8 65 e2 ff ff call 80104700 <find_and_set_lottery_ticket>
}
8010649b: 83 c4 10 add $0x10,%esp
8010649e: c9 leave
8010649f: c3 ret
801064a0 <sys_set_sched_queue>:
void sys_set_sched_queue()
{
801064a0: 55 push %ebp
801064a1: 89 e5 mov %esp,%ebp
801064a3: 83 ec 20 sub $0x20,%esp
int qeue_number;
argint(0, &qeue_number);
801064a6: 8d 45 f0 lea -0x10(%ebp),%eax
801064a9: 50 push %eax
801064aa: 6a 00 push $0x0
801064ac: e8 2f f0 ff ff call 801054e0 <argint>
int pid;
argint(1, &pid);
801064b1: 58 pop %eax
801064b2: 8d 45 f4 lea -0xc(%ebp),%eax
801064b5: 5a pop %edx
801064b6: 50 push %eax
801064b7: 6a 01 push $0x1
801064b9: e8 22 f0 ff ff call 801054e0 <argint>
find_and_set_sched_queue(qeue_number, pid);
801064be: 59 pop %ecx
801064bf: 58 pop %eax
801064c0: ff 75 f4 pushl -0xc(%ebp)
801064c3: ff 75 f0 pushl -0x10(%ebp)
801064c6: e8 65 e2 ff ff call 80104730 <find_and_set_sched_queue>
}
801064cb: 83 c4 10 add $0x10,%esp
801064ce: c9 leave
801064cf: c3 ret
801064d0 <sys_show_processes_scheduling>:
void sys_show_processes_scheduling()
{
801064d0: 55 push %ebp
801064d1: 89 e5 mov %esp,%ebp
show_all_processes_scheduling();
801064d3: 5d pop %ebp
show_all_processes_scheduling();
801064d4: e9 b7 e3 ff ff jmp 80104890 <show_all_processes_scheduling>
801064d9 <alltraps>:
801064d9: 1e push %ds
801064da: 06 push %es
801064db: 0f a0 push %fs
801064dd: 0f a8 push %gs
801064df: 60 pusha
801064e0: 66 b8 10 00 mov $0x10,%ax
801064e4: 8e d8 mov %eax,%ds
801064e6: 8e c0 mov %eax,%es
801064e8: 54 push %esp
801064e9: e8 c2 00 00 00 call 801065b0 <trap>
801064ee: 83 c4 04 add $0x4,%esp
801064f1 <trapret>:
801064f1: 61 popa
801064f2: 0f a9 pop %gs
801064f4: 0f a1 pop %fs
801064f6: 07 pop %es
801064f7: 1f pop %ds
801064f8: 83 c4 08 add $0x8,%esp
801064fb: cf iret
801064fc: 66 90 xchg %ax,%ax
801064fe: 66 90 xchg %ax,%ax
80106500 <tvinit>:
struct spinlock tickslock;
uint ticks;
void
tvinit(void)
{
80106500: 55 push %ebp
int i;
for(i = 0; i < 256; i++)
80106501: 31 c0 xor %eax,%eax
{
80106503: 89 e5 mov %esp,%ebp
80106505: 83 ec 08 sub $0x8,%esp
80106508: 90 nop
80106509: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
80106510: 8b 14 85 0c b0 10 80 mov -0x7fef4ff4(,%eax,4),%edx
80106517: c7 04 c5 82 65 11 80 movl $0x8e000008,-0x7fee9a7e(,%eax,8)
8010651e: 08 00 00 8e
80106522: 66 89 14 c5 80 65 11 mov %dx,-0x7fee9a80(,%eax,8)
80106529: 80
8010652a: c1 ea 10 shr $0x10,%edx
8010652d: 66 89 14 c5 86 65 11 mov %dx,-0x7fee9a7a(,%eax,8)
80106534: 80
for(i = 0; i < 256; i++)
80106535: 83 c0 01 add $0x1,%eax
80106538: 3d 00 01 00 00 cmp $0x100,%eax
8010653d: 75 d1 jne 80106510 <tvinit+0x10>
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
8010653f: a1 0c b1 10 80 mov 0x8010b10c,%eax
initlock(&tickslock, "time");
80106544: 83 ec 08 sub $0x8,%esp
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80106547: c7 05 82 67 11 80 08 movl $0xef000008,0x80116782
8010654e: 00 00 ef
initlock(&tickslock, "time");
80106551: 68 c2 86 10 80 push $0x801086c2
80106556: 68 40 65 11 80 push $0x80116540
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
8010655b: 66 a3 80 67 11 80 mov %ax,0x80116780
80106561: c1 e8 10 shr $0x10,%eax
80106564: 66 a3 86 67 11 80 mov %ax,0x80116786
initlock(&tickslock, "time");
8010656a: e8 21 ea ff ff call 80104f90 <initlock>
}
8010656f: 83 c4 10 add $0x10,%esp
80106572: c9 leave
80106573: c3 ret
80106574: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010657a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80106580 <idtinit>:
void
idtinit(void)
{
80106580: 55 push %ebp
pd[0] = size-1;
80106581: b8 ff 07 00 00 mov $0x7ff,%eax
80106586: 89 e5 mov %esp,%ebp
80106588: 83 ec 10 sub $0x10,%esp
8010658b: 66 89 45 fa mov %ax,-0x6(%ebp)
pd[1] = (uint)p;
8010658f: b8 80 65 11 80 mov $0x80116580,%eax
80106594: 66 89 45 fc mov %ax,-0x4(%ebp)
pd[2] = (uint)p >> 16;
80106598: c1 e8 10 shr $0x10,%eax
8010659b: 66 89 45 fe mov %ax,-0x2(%ebp)
asm volatile("lidt (%0)" : : "r" (pd));
8010659f: 8d 45 fa lea -0x6(%ebp),%eax
801065a2: 0f 01 18 lidtl (%eax)
lidt(idt, sizeof(idt));
}
801065a5: c9 leave
801065a6: c3 ret
801065a7: 89 f6 mov %esi,%esi
801065a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801065b0 <trap>:
//PAGEBREAK: 41
void
trap(struct trapframe *tf)
{
801065b0: 55 push %ebp
801065b1: 89 e5 mov %esp,%ebp
801065b3: 57 push %edi
801065b4: 56 push %esi
801065b5: 53 push %ebx
801065b6: 83 ec 1c sub $0x1c,%esp
801065b9: 8b 7d 08 mov 0x8(%ebp),%edi
if(tf->trapno == T_SYSCALL){
801065bc: 8b 47 30 mov 0x30(%edi),%eax
801065bf: 83 f8 40 cmp $0x40,%eax
801065c2: 0f 84 f0 00 00 00 je 801066b8 <trap+0x108>
if(myproc()->killed)
exit();
return;
}
switch(tf->trapno){
801065c8: 83 e8 20 sub $0x20,%eax
801065cb: 83 f8 1f cmp $0x1f,%eax
801065ce: 77 10 ja 801065e0 <trap+0x30>
801065d0: ff 24 85 68 87 10 80 jmp *-0x7fef7898(,%eax,4)
801065d7: 89 f6 mov %esi,%esi
801065d9: 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){
801065e0: e8 bb d5 ff ff call 80103ba0 <myproc>
801065e5: 85 c0 test %eax,%eax
801065e7: 8b 5f 38 mov 0x38(%edi),%ebx
801065ea: 0f 84 14 02 00 00 je 80106804 <trap+0x254>
801065f0: f6 47 3c 03 testb $0x3,0x3c(%edi)
801065f4: 0f 84 0a 02 00 00 je 80106804 <trap+0x254>
static inline uint
rcr2(void)
{
uint val;
asm volatile("movl %%cr2,%0" : "=r" (val));
801065fa: 0f 20 d1 mov %cr2,%ecx
801065fd: 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 "
80106600: e8 7b d5 ff ff call 80103b80 <cpuid>
80106605: 89 45 dc mov %eax,-0x24(%ebp)
80106608: 8b 47 34 mov 0x34(%edi),%eax
8010660b: 8b 77 30 mov 0x30(%edi),%esi
8010660e: 89 45 e4 mov %eax,-0x1c(%ebp)
"eip 0x%x addr 0x%x--kill proc\n",
myproc()->pid, myproc()->name, tf->trapno,
80106611: e8 8a d5 ff ff call 80103ba0 <myproc>
80106616: 89 45 e0 mov %eax,-0x20(%ebp)
80106619: e8 82 d5 ff ff call 80103ba0 <myproc>
cprintf("pid %d %s: trap %d err %d on cpu %d "
8010661e: 8b 4d d8 mov -0x28(%ebp),%ecx
80106621: 8b 55 dc mov -0x24(%ebp),%edx
80106624: 51 push %ecx
80106625: 53 push %ebx
80106626: 52 push %edx
myproc()->pid, myproc()->name, tf->trapno,
80106627: 8b 55 e0 mov -0x20(%ebp),%edx
cprintf("pid %d %s: trap %d err %d on cpu %d "
8010662a: ff 75 e4 pushl -0x1c(%ebp)
8010662d: 56 push %esi
myproc()->pid, myproc()->name, tf->trapno,
8010662e: 83 c2 6c add $0x6c,%edx
cprintf("pid %d %s: trap %d err %d on cpu %d "
80106631: 52 push %edx
80106632: ff 70 10 pushl 0x10(%eax)
80106635: 68 24 87 10 80 push $0x80108724
8010663a: e8 21 a0 ff ff call 80100660 <cprintf>
tf->err, cpuid(), tf->eip, rcr2());
myproc()->killed = 1;
8010663f: 83 c4 20 add $0x20,%esp
80106642: e8 59 d5 ff ff call 80103ba0 <myproc>
80106647: 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)
8010664e: e8 4d d5 ff ff call 80103ba0 <myproc>
80106653: 85 c0 test %eax,%eax
80106655: 74 1d je 80106674 <trap+0xc4>
80106657: e8 44 d5 ff ff call 80103ba0 <myproc>
8010665c: 8b 50 24 mov 0x24(%eax),%edx
8010665f: 85 d2 test %edx,%edx
80106661: 74 11 je 80106674 <trap+0xc4>
80106663: 0f b7 47 3c movzwl 0x3c(%edi),%eax
80106667: 83 e0 03 and $0x3,%eax
8010666a: 66 83 f8 03 cmp $0x3,%ax
8010666e: 0f 84 4c 01 00 00 je 801067c0 <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 &&
80106674: e8 27 d5 ff ff call 80103ba0 <myproc>
80106679: 85 c0 test %eax,%eax
8010667b: 74 0b je 80106688 <trap+0xd8>
8010667d: e8 1e d5 ff ff call 80103ba0 <myproc>
80106682: 83 78 0c 04 cmpl $0x4,0xc(%eax)
80106686: 74 68 je 801066f0 <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)
80106688: e8 13 d5 ff ff call 80103ba0 <myproc>
8010668d: 85 c0 test %eax,%eax
8010668f: 74 19 je 801066aa <trap+0xfa>
80106691: e8 0a d5 ff ff call 80103ba0 <myproc>
80106696: 8b 40 24 mov 0x24(%eax),%eax
80106699: 85 c0 test %eax,%eax
8010669b: 74 0d je 801066aa <trap+0xfa>
8010669d: 0f b7 47 3c movzwl 0x3c(%edi),%eax
801066a1: 83 e0 03 and $0x3,%eax
801066a4: 66 83 f8 03 cmp $0x3,%ax
801066a8: 74 37 je 801066e1 <trap+0x131>
exit();
}
801066aa: 8d 65 f4 lea -0xc(%ebp),%esp
801066ad: 5b pop %ebx
801066ae: 5e pop %esi
801066af: 5f pop %edi
801066b0: 5d pop %ebp
801066b1: c3 ret
801066b2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(myproc()->killed)
801066b8: e8 e3 d4 ff ff call 80103ba0 <myproc>
801066bd: 8b 58 24 mov 0x24(%eax),%ebx
801066c0: 85 db test %ebx,%ebx
801066c2: 0f 85 e8 00 00 00 jne 801067b0 <trap+0x200>
myproc()->tf = tf;
801066c8: e8 d3 d4 ff ff call 80103ba0 <myproc>
801066cd: 89 78 18 mov %edi,0x18(%eax)
syscall();
801066d0: e8 fb ee ff ff call 801055d0 <syscall>
if(myproc()->killed)
801066d5: e8 c6 d4 ff ff call 80103ba0 <myproc>
801066da: 8b 48 24 mov 0x24(%eax),%ecx
801066dd: 85 c9 test %ecx,%ecx
801066df: 74 c9 je 801066aa <trap+0xfa>
}
801066e1: 8d 65 f4 lea -0xc(%ebp),%esp
801066e4: 5b pop %ebx
801066e5: 5e pop %esi
801066e6: 5f pop %edi
801066e7: 5d pop %ebp
exit();
801066e8: e9 33 d8 ff ff jmp 80103f20 <exit>
801066ed: 8d 76 00 lea 0x0(%esi),%esi
if(myproc() && myproc()->state == RUNNING &&
801066f0: 83 7f 30 20 cmpl $0x20,0x30(%edi)
801066f4: 75 92 jne 80106688 <trap+0xd8>
yield();
801066f6: e8 55 d9 ff ff call 80104050 <yield>
801066fb: eb 8b jmp 80106688 <trap+0xd8>
801066fd: 8d 76 00 lea 0x0(%esi),%esi
if(cpuid() == 0){
80106700: e8 7b d4 ff ff call 80103b80 <cpuid>
80106705: 85 c0 test %eax,%eax
80106707: 0f 84 c3 00 00 00 je 801067d0 <trap+0x220>
lapiceoi();
8010670d: e8 ae c3 ff ff call 80102ac0 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80106712: e8 89 d4 ff ff call 80103ba0 <myproc>
80106717: 85 c0 test %eax,%eax
80106719: 0f 85 38 ff ff ff jne 80106657 <trap+0xa7>
8010671f: e9 50 ff ff ff jmp 80106674 <trap+0xc4>
80106724: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
kbdintr();
80106728: e8 53 c2 ff ff call 80102980 <kbdintr>
lapiceoi();
8010672d: e8 8e c3 ff ff call 80102ac0 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80106732: e8 69 d4 ff ff call 80103ba0 <myproc>
80106737: 85 c0 test %eax,%eax
80106739: 0f 85 18 ff ff ff jne 80106657 <trap+0xa7>
8010673f: e9 30 ff ff ff jmp 80106674 <trap+0xc4>
80106744: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
uartintr();
80106748: e8 53 02 00 00 call 801069a0 <uartintr>
lapiceoi();
8010674d: e8 6e c3 ff ff call 80102ac0 <lapiceoi>
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80106752: e8 49 d4 ff ff call 80103ba0 <myproc>
80106757: 85 c0 test %eax,%eax
80106759: 0f 85 f8 fe ff ff jne 80106657 <trap+0xa7>
8010675f: e9 10 ff ff ff jmp 80106674 <trap+0xc4>
80106764: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
cprintf("cpu%d: spurious interrupt at %x:%x\n",
80106768: 0f b7 5f 3c movzwl 0x3c(%edi),%ebx
8010676c: 8b 77 38 mov 0x38(%edi),%esi
8010676f: e8 0c d4 ff ff call 80103b80 <cpuid>
80106774: 56 push %esi
80106775: 53 push %ebx
80106776: 50 push %eax
80106777: 68 cc 86 10 80 push $0x801086cc
8010677c: e8 df 9e ff ff call 80100660 <cprintf>
lapiceoi();
80106781: e8 3a c3 ff ff call 80102ac0 <lapiceoi>
break;
80106786: 83 c4 10 add $0x10,%esp
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
80106789: e8 12 d4 ff ff call 80103ba0 <myproc>
8010678e: 85 c0 test %eax,%eax
80106790: 0f 85 c1 fe ff ff jne 80106657 <trap+0xa7>
80106796: e9 d9 fe ff ff jmp 80106674 <trap+0xc4>
8010679b: 90 nop
8010679c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ideintr();
801067a0: e8 4b bc ff ff call 801023f0 <ideintr>
801067a5: e9 63 ff ff ff jmp 8010670d <trap+0x15d>
801067aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
exit();
801067b0: e8 6b d7 ff ff call 80103f20 <exit>
801067b5: e9 0e ff ff ff jmp 801066c8 <trap+0x118>
801067ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
exit();
801067c0: e8 5b d7 ff ff call 80103f20 <exit>
801067c5: e9 aa fe ff ff jmp 80106674 <trap+0xc4>
801067ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
acquire(&tickslock);
801067d0: 83 ec 0c sub $0xc,%esp
801067d3: 68 40 65 11 80 push $0x80116540
801067d8: e8 f3 e8 ff ff call 801050d0 <acquire>
wakeup(&ticks);
801067dd: c7 04 24 80 6d 11 80 movl $0x80116d80,(%esp)
ticks++;
801067e4: 83 05 80 6d 11 80 01 addl $0x1,0x80116d80
wakeup(&ticks);
801067eb: e8 70 da ff ff call 80104260 <wakeup>
release(&tickslock);
801067f0: c7 04 24 40 65 11 80 movl $0x80116540,(%esp)
801067f7: e8 94 e9 ff ff call 80105190 <release>
801067fc: 83 c4 10 add $0x10,%esp
801067ff: e9 09 ff ff ff jmp 8010670d <trap+0x15d>
80106804: 0f 20 d6 mov %cr2,%esi
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
80106807: e8 74 d3 ff ff call 80103b80 <cpuid>
8010680c: 83 ec 0c sub $0xc,%esp
8010680f: 56 push %esi
80106810: 53 push %ebx
80106811: 50 push %eax
80106812: ff 77 30 pushl 0x30(%edi)
80106815: 68 f0 86 10 80 push $0x801086f0
8010681a: e8 41 9e ff ff call 80100660 <cprintf>
panic("trap");
8010681f: 83 c4 14 add $0x14,%esp
80106822: 68 c7 86 10 80 push $0x801086c7
80106827: e8 64 9b ff ff call 80100390 <panic>
8010682c: 66 90 xchg %ax,%ax
8010682e: 66 90 xchg %ax,%ax
80106830 <uartgetc>:
}
static int
uartgetc(void)
{
if(!uart)
80106830: a1 fc b5 10 80 mov 0x8010b5fc,%eax
{
80106835: 55 push %ebp
80106836: 89 e5 mov %esp,%ebp
if(!uart)
80106838: 85 c0 test %eax,%eax
8010683a: 74 1c je 80106858 <uartgetc+0x28>
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010683c: ba fd 03 00 00 mov $0x3fd,%edx
80106841: ec in (%dx),%al
return -1;
if(!(inb(COM1+5) & 0x01))
80106842: a8 01 test $0x1,%al
80106844: 74 12 je 80106858 <uartgetc+0x28>
80106846: ba f8 03 00 00 mov $0x3f8,%edx
8010684b: ec in (%dx),%al
return -1;
return inb(COM1+0);
8010684c: 0f b6 c0 movzbl %al,%eax
}
8010684f: 5d pop %ebp
80106850: c3 ret
80106851: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
80106858: b8 ff ff ff ff mov $0xffffffff,%eax
}
8010685d: 5d pop %ebp
8010685e: c3 ret
8010685f: 90 nop
80106860 <uartputc.part.0>:
uartputc(int c)
80106860: 55 push %ebp
80106861: 89 e5 mov %esp,%ebp
80106863: 57 push %edi
80106864: 56 push %esi
80106865: 53 push %ebx
80106866: 89 c7 mov %eax,%edi
80106868: bb 80 00 00 00 mov $0x80,%ebx
8010686d: be fd 03 00 00 mov $0x3fd,%esi
80106872: 83 ec 0c sub $0xc,%esp
80106875: eb 1b jmp 80106892 <uartputc.part.0+0x32>
80106877: 89 f6 mov %esi,%esi
80106879: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
microdelay(10);
80106880: 83 ec 0c sub $0xc,%esp
80106883: 6a 0a push $0xa
80106885: e8 56 c2 ff ff call 80102ae0 <microdelay>
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
8010688a: 83 c4 10 add $0x10,%esp
8010688d: 83 eb 01 sub $0x1,%ebx
80106890: 74 07 je 80106899 <uartputc.part.0+0x39>
80106892: 89 f2 mov %esi,%edx
80106894: ec in (%dx),%al
80106895: a8 20 test $0x20,%al
80106897: 74 e7 je 80106880 <uartputc.part.0+0x20>
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80106899: ba f8 03 00 00 mov $0x3f8,%edx
8010689e: 89 f8 mov %edi,%eax
801068a0: ee out %al,(%dx)
}
801068a1: 8d 65 f4 lea -0xc(%ebp),%esp
801068a4: 5b pop %ebx
801068a5: 5e pop %esi
801068a6: 5f pop %edi
801068a7: 5d pop %ebp
801068a8: c3 ret
801068a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801068b0 <uartinit>:
{
801068b0: 55 push %ebp
801068b1: 31 c9 xor %ecx,%ecx
801068b3: 89 c8 mov %ecx,%eax
801068b5: 89 e5 mov %esp,%ebp
801068b7: 57 push %edi
801068b8: 56 push %esi
801068b9: 53 push %ebx
801068ba: bb fa 03 00 00 mov $0x3fa,%ebx
801068bf: 89 da mov %ebx,%edx
801068c1: 83 ec 0c sub $0xc,%esp
801068c4: ee out %al,(%dx)
801068c5: bf fb 03 00 00 mov $0x3fb,%edi
801068ca: b8 80 ff ff ff mov $0xffffff80,%eax
801068cf: 89 fa mov %edi,%edx
801068d1: ee out %al,(%dx)
801068d2: b8 0c 00 00 00 mov $0xc,%eax
801068d7: ba f8 03 00 00 mov $0x3f8,%edx
801068dc: ee out %al,(%dx)
801068dd: be f9 03 00 00 mov $0x3f9,%esi
801068e2: 89 c8 mov %ecx,%eax
801068e4: 89 f2 mov %esi,%edx
801068e6: ee out %al,(%dx)
801068e7: b8 03 00 00 00 mov $0x3,%eax
801068ec: 89 fa mov %edi,%edx
801068ee: ee out %al,(%dx)
801068ef: ba fc 03 00 00 mov $0x3fc,%edx
801068f4: 89 c8 mov %ecx,%eax
801068f6: ee out %al,(%dx)
801068f7: b8 01 00 00 00 mov $0x1,%eax
801068fc: 89 f2 mov %esi,%edx
801068fe: ee out %al,(%dx)
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801068ff: ba fd 03 00 00 mov $0x3fd,%edx
80106904: ec in (%dx),%al
if(inb(COM1+5) == 0xFF)
80106905: 3c ff cmp $0xff,%al
80106907: 74 5a je 80106963 <uartinit+0xb3>
uart = 1;
80106909: c7 05 fc b5 10 80 01 movl $0x1,0x8010b5fc
80106910: 00 00 00
80106913: 89 da mov %ebx,%edx
80106915: ec in (%dx),%al
80106916: ba f8 03 00 00 mov $0x3f8,%edx
8010691b: ec in (%dx),%al
ioapicenable(IRQ_COM1, 0);
8010691c: 83 ec 08 sub $0x8,%esp
for(p="xv6...\n"; *p; p++)
8010691f: bb e8 87 10 80 mov $0x801087e8,%ebx
ioapicenable(IRQ_COM1, 0);
80106924: 6a 00 push $0x0
80106926: 6a 04 push $0x4
80106928: e8 13 bd ff ff call 80102640 <ioapicenable>
8010692d: 83 c4 10 add $0x10,%esp
for(p="xv6...\n"; *p; p++)
80106930: b8 78 00 00 00 mov $0x78,%eax
80106935: eb 13 jmp 8010694a <uartinit+0x9a>
80106937: 89 f6 mov %esi,%esi
80106939: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106940: 83 c3 01 add $0x1,%ebx
80106943: 0f be 03 movsbl (%ebx),%eax
80106946: 84 c0 test %al,%al
80106948: 74 19 je 80106963 <uartinit+0xb3>
if(!uart)
8010694a: 8b 15 fc b5 10 80 mov 0x8010b5fc,%edx
80106950: 85 d2 test %edx,%edx
80106952: 74 ec je 80106940 <uartinit+0x90>
for(p="xv6...\n"; *p; p++)
80106954: 83 c3 01 add $0x1,%ebx
80106957: e8 04 ff ff ff call 80106860 <uartputc.part.0>
8010695c: 0f be 03 movsbl (%ebx),%eax
8010695f: 84 c0 test %al,%al
80106961: 75 e7 jne 8010694a <uartinit+0x9a>
}
80106963: 8d 65 f4 lea -0xc(%ebp),%esp
80106966: 5b pop %ebx
80106967: 5e pop %esi
80106968: 5f pop %edi
80106969: 5d pop %ebp
8010696a: c3 ret
8010696b: 90 nop
8010696c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106970 <uartputc>:
if(!uart)
80106970: 8b 15 fc b5 10 80 mov 0x8010b5fc,%edx
{
80106976: 55 push %ebp
80106977: 89 e5 mov %esp,%ebp
if(!uart)
80106979: 85 d2 test %edx,%edx
{
8010697b: 8b 45 08 mov 0x8(%ebp),%eax
if(!uart)
8010697e: 74 10 je 80106990 <uartputc+0x20>
}
80106980: 5d pop %ebp
80106981: e9 da fe ff ff jmp 80106860 <uartputc.part.0>
80106986: 8d 76 00 lea 0x0(%esi),%esi
80106989: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106990: 5d pop %ebp
80106991: c3 ret
80106992: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106999: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801069a0 <uartintr>:
void
uartintr(void)
{
801069a0: 55 push %ebp
801069a1: 89 e5 mov %esp,%ebp
801069a3: 83 ec 14 sub $0x14,%esp
consoleintr(uartgetc);
801069a6: 68 30 68 10 80 push $0x80106830
801069ab: e8 30 a1 ff ff call 80100ae0 <consoleintr>
}
801069b0: 83 c4 10 add $0x10,%esp
801069b3: c9 leave
801069b4: c3 ret
801069b5 <vector0>:
801069b5: 6a 00 push $0x0
801069b7: 6a 00 push $0x0
801069b9: e9 1b fb ff ff jmp 801064d9 <alltraps>
801069be <vector1>:
801069be: 6a 00 push $0x0
801069c0: 6a 01 push $0x1
801069c2: e9 12 fb ff ff jmp 801064d9 <alltraps>
801069c7 <vector2>:
801069c7: 6a 00 push $0x0
801069c9: 6a 02 push $0x2
801069cb: e9 09 fb ff ff jmp 801064d9 <alltraps>
801069d0 <vector3>:
801069d0: 6a 00 push $0x0
801069d2: 6a 03 push $0x3
801069d4: e9 00 fb ff ff jmp 801064d9 <alltraps>
801069d9 <vector4>:
801069d9: 6a 00 push $0x0
801069db: 6a 04 push $0x4
801069dd: e9 f7 fa ff ff jmp 801064d9 <alltraps>
801069e2 <vector5>:
801069e2: 6a 00 push $0x0
801069e4: 6a 05 push $0x5
801069e6: e9 ee fa ff ff jmp 801064d9 <alltraps>
801069eb <vector6>:
801069eb: 6a 00 push $0x0
801069ed: 6a 06 push $0x6
801069ef: e9 e5 fa ff ff jmp 801064d9 <alltraps>
801069f4 <vector7>:
801069f4: 6a 00 push $0x0
801069f6: 6a 07 push $0x7
801069f8: e9 dc fa ff ff jmp 801064d9 <alltraps>
801069fd <vector8>:
801069fd: 6a 08 push $0x8
801069ff: e9 d5 fa ff ff jmp 801064d9 <alltraps>
80106a04 <vector9>:
80106a04: 6a 00 push $0x0
80106a06: 6a 09 push $0x9
80106a08: e9 cc fa ff ff jmp 801064d9 <alltraps>
80106a0d <vector10>:
80106a0d: 6a 0a push $0xa
80106a0f: e9 c5 fa ff ff jmp 801064d9 <alltraps>
80106a14 <vector11>:
80106a14: 6a 0b push $0xb
80106a16: e9 be fa ff ff jmp 801064d9 <alltraps>
80106a1b <vector12>:
80106a1b: 6a 0c push $0xc
80106a1d: e9 b7 fa ff ff jmp 801064d9 <alltraps>
80106a22 <vector13>:
80106a22: 6a 0d push $0xd
80106a24: e9 b0 fa ff ff jmp 801064d9 <alltraps>
80106a29 <vector14>:
80106a29: 6a 0e push $0xe
80106a2b: e9 a9 fa ff ff jmp 801064d9 <alltraps>
80106a30 <vector15>:
80106a30: 6a 00 push $0x0
80106a32: 6a 0f push $0xf
80106a34: e9 a0 fa ff ff jmp 801064d9 <alltraps>
80106a39 <vector16>:
80106a39: 6a 00 push $0x0
80106a3b: 6a 10 push $0x10
80106a3d: e9 97 fa ff ff jmp 801064d9 <alltraps>
80106a42 <vector17>:
80106a42: 6a 11 push $0x11
80106a44: e9 90 fa ff ff jmp 801064d9 <alltraps>
80106a49 <vector18>:
80106a49: 6a 00 push $0x0
80106a4b: 6a 12 push $0x12
80106a4d: e9 87 fa ff ff jmp 801064d9 <alltraps>
80106a52 <vector19>:
80106a52: 6a 00 push $0x0
80106a54: 6a 13 push $0x13
80106a56: e9 7e fa ff ff jmp 801064d9 <alltraps>
80106a5b <vector20>:
80106a5b: 6a 00 push $0x0
80106a5d: 6a 14 push $0x14
80106a5f: e9 75 fa ff ff jmp 801064d9 <alltraps>
80106a64 <vector21>:
80106a64: 6a 00 push $0x0
80106a66: 6a 15 push $0x15
80106a68: e9 6c fa ff ff jmp 801064d9 <alltraps>
80106a6d <vector22>:
80106a6d: 6a 00 push $0x0
80106a6f: 6a 16 push $0x16
80106a71: e9 63 fa ff ff jmp 801064d9 <alltraps>
80106a76 <vector23>:
80106a76: 6a 00 push $0x0
80106a78: 6a 17 push $0x17
80106a7a: e9 5a fa ff ff jmp 801064d9 <alltraps>
80106a7f <vector24>:
80106a7f: 6a 00 push $0x0
80106a81: 6a 18 push $0x18
80106a83: e9 51 fa ff ff jmp 801064d9 <alltraps>
80106a88 <vector25>:
80106a88: 6a 00 push $0x0
80106a8a: 6a 19 push $0x19
80106a8c: e9 48 fa ff ff jmp 801064d9 <alltraps>
80106a91 <vector26>:
80106a91: 6a 00 push $0x0
80106a93: 6a 1a push $0x1a
80106a95: e9 3f fa ff ff jmp 801064d9 <alltraps>
80106a9a <vector27>:
80106a9a: 6a 00 push $0x0
80106a9c: 6a 1b push $0x1b
80106a9e: e9 36 fa ff ff jmp 801064d9 <alltraps>
80106aa3 <vector28>:
80106aa3: 6a 00 push $0x0
80106aa5: 6a 1c push $0x1c
80106aa7: e9 2d fa ff ff jmp 801064d9 <alltraps>
80106aac <vector29>:
80106aac: 6a 00 push $0x0
80106aae: 6a 1d push $0x1d
80106ab0: e9 24 fa ff ff jmp 801064d9 <alltraps>
80106ab5 <vector30>:
80106ab5: 6a 00 push $0x0
80106ab7: 6a 1e push $0x1e
80106ab9: e9 1b fa ff ff jmp 801064d9 <alltraps>
80106abe <vector31>:
80106abe: 6a 00 push $0x0
80106ac0: 6a 1f push $0x1f
80106ac2: e9 12 fa ff ff jmp 801064d9 <alltraps>
80106ac7 <vector32>:
80106ac7: 6a 00 push $0x0
80106ac9: 6a 20 push $0x20
80106acb: e9 09 fa ff ff jmp 801064d9 <alltraps>
80106ad0 <vector33>:
80106ad0: 6a 00 push $0x0
80106ad2: 6a 21 push $0x21
80106ad4: e9 00 fa ff ff jmp 801064d9 <alltraps>
80106ad9 <vector34>:
80106ad9: 6a 00 push $0x0
80106adb: 6a 22 push $0x22
80106add: e9 f7 f9 ff ff jmp 801064d9 <alltraps>
80106ae2 <vector35>:
80106ae2: 6a 00 push $0x0
80106ae4: 6a 23 push $0x23
80106ae6: e9 ee f9 ff ff jmp 801064d9 <alltraps>
80106aeb <vector36>:
80106aeb: 6a 00 push $0x0
80106aed: 6a 24 push $0x24
80106aef: e9 e5 f9 ff ff jmp 801064d9 <alltraps>
80106af4 <vector37>:
80106af4: 6a 00 push $0x0
80106af6: 6a 25 push $0x25
80106af8: e9 dc f9 ff ff jmp 801064d9 <alltraps>
80106afd <vector38>:
80106afd: 6a 00 push $0x0
80106aff: 6a 26 push $0x26
80106b01: e9 d3 f9 ff ff jmp 801064d9 <alltraps>
80106b06 <vector39>:
80106b06: 6a 00 push $0x0
80106b08: 6a 27 push $0x27
80106b0a: e9 ca f9 ff ff jmp 801064d9 <alltraps>
80106b0f <vector40>:
80106b0f: 6a 00 push $0x0
80106b11: 6a 28 push $0x28
80106b13: e9 c1 f9 ff ff jmp 801064d9 <alltraps>
80106b18 <vector41>:
80106b18: 6a 00 push $0x0
80106b1a: 6a 29 push $0x29
80106b1c: e9 b8 f9 ff ff jmp 801064d9 <alltraps>
80106b21 <vector42>:
80106b21: 6a 00 push $0x0
80106b23: 6a 2a push $0x2a
80106b25: e9 af f9 ff ff jmp 801064d9 <alltraps>
80106b2a <vector43>:
80106b2a: 6a 00 push $0x0
80106b2c: 6a 2b push $0x2b
80106b2e: e9 a6 f9 ff ff jmp 801064d9 <alltraps>
80106b33 <vector44>:
80106b33: 6a 00 push $0x0
80106b35: 6a 2c push $0x2c
80106b37: e9 9d f9 ff ff jmp 801064d9 <alltraps>
80106b3c <vector45>:
80106b3c: 6a 00 push $0x0
80106b3e: 6a 2d push $0x2d
80106b40: e9 94 f9 ff ff jmp 801064d9 <alltraps>
80106b45 <vector46>:
80106b45: 6a 00 push $0x0
80106b47: 6a 2e push $0x2e
80106b49: e9 8b f9 ff ff jmp 801064d9 <alltraps>
80106b4e <vector47>:
80106b4e: 6a 00 push $0x0
80106b50: 6a 2f push $0x2f
80106b52: e9 82 f9 ff ff jmp 801064d9 <alltraps>
80106b57 <vector48>:
80106b57: 6a 00 push $0x0
80106b59: 6a 30 push $0x30
80106b5b: e9 79 f9 ff ff jmp 801064d9 <alltraps>
80106b60 <vector49>:
80106b60: 6a 00 push $0x0
80106b62: 6a 31 push $0x31
80106b64: e9 70 f9 ff ff jmp 801064d9 <alltraps>
80106b69 <vector50>:
80106b69: 6a 00 push $0x0
80106b6b: 6a 32 push $0x32
80106b6d: e9 67 f9 ff ff jmp 801064d9 <alltraps>
80106b72 <vector51>:
80106b72: 6a 00 push $0x0
80106b74: 6a 33 push $0x33
80106b76: e9 5e f9 ff ff jmp 801064d9 <alltraps>
80106b7b <vector52>:
80106b7b: 6a 00 push $0x0
80106b7d: 6a 34 push $0x34
80106b7f: e9 55 f9 ff ff jmp 801064d9 <alltraps>
80106b84 <vector53>:
80106b84: 6a 00 push $0x0
80106b86: 6a 35 push $0x35
80106b88: e9 4c f9 ff ff jmp 801064d9 <alltraps>
80106b8d <vector54>:
80106b8d: 6a 00 push $0x0
80106b8f: 6a 36 push $0x36
80106b91: e9 43 f9 ff ff jmp 801064d9 <alltraps>
80106b96 <vector55>:
80106b96: 6a 00 push $0x0
80106b98: 6a 37 push $0x37
80106b9a: e9 3a f9 ff ff jmp 801064d9 <alltraps>
80106b9f <vector56>:
80106b9f: 6a 00 push $0x0
80106ba1: 6a 38 push $0x38
80106ba3: e9 31 f9 ff ff jmp 801064d9 <alltraps>
80106ba8 <vector57>:
80106ba8: 6a 00 push $0x0
80106baa: 6a 39 push $0x39
80106bac: e9 28 f9 ff ff jmp 801064d9 <alltraps>
80106bb1 <vector58>:
80106bb1: 6a 00 push $0x0
80106bb3: 6a 3a push $0x3a
80106bb5: e9 1f f9 ff ff jmp 801064d9 <alltraps>
80106bba <vector59>:
80106bba: 6a 00 push $0x0
80106bbc: 6a 3b push $0x3b
80106bbe: e9 16 f9 ff ff jmp 801064d9 <alltraps>
80106bc3 <vector60>:
80106bc3: 6a 00 push $0x0
80106bc5: 6a 3c push $0x3c
80106bc7: e9 0d f9 ff ff jmp 801064d9 <alltraps>
80106bcc <vector61>:
80106bcc: 6a 00 push $0x0
80106bce: 6a 3d push $0x3d
80106bd0: e9 04 f9 ff ff jmp 801064d9 <alltraps>
80106bd5 <vector62>:
80106bd5: 6a 00 push $0x0
80106bd7: 6a 3e push $0x3e
80106bd9: e9 fb f8 ff ff jmp 801064d9 <alltraps>
80106bde <vector63>:
80106bde: 6a 00 push $0x0
80106be0: 6a 3f push $0x3f
80106be2: e9 f2 f8 ff ff jmp 801064d9 <alltraps>
80106be7 <vector64>:
80106be7: 6a 00 push $0x0
80106be9: 6a 40 push $0x40
80106beb: e9 e9 f8 ff ff jmp 801064d9 <alltraps>
80106bf0 <vector65>:
80106bf0: 6a 00 push $0x0
80106bf2: 6a 41 push $0x41
80106bf4: e9 e0 f8 ff ff jmp 801064d9 <alltraps>
80106bf9 <vector66>:
80106bf9: 6a 00 push $0x0
80106bfb: 6a 42 push $0x42
80106bfd: e9 d7 f8 ff ff jmp 801064d9 <alltraps>
80106c02 <vector67>:
80106c02: 6a 00 push $0x0
80106c04: 6a 43 push $0x43
80106c06: e9 ce f8 ff ff jmp 801064d9 <alltraps>
80106c0b <vector68>:
80106c0b: 6a 00 push $0x0
80106c0d: 6a 44 push $0x44
80106c0f: e9 c5 f8 ff ff jmp 801064d9 <alltraps>
80106c14 <vector69>:
80106c14: 6a 00 push $0x0
80106c16: 6a 45 push $0x45
80106c18: e9 bc f8 ff ff jmp 801064d9 <alltraps>
80106c1d <vector70>:
80106c1d: 6a 00 push $0x0
80106c1f: 6a 46 push $0x46
80106c21: e9 b3 f8 ff ff jmp 801064d9 <alltraps>
80106c26 <vector71>:
80106c26: 6a 00 push $0x0
80106c28: 6a 47 push $0x47
80106c2a: e9 aa f8 ff ff jmp 801064d9 <alltraps>
80106c2f <vector72>:
80106c2f: 6a 00 push $0x0
80106c31: 6a 48 push $0x48
80106c33: e9 a1 f8 ff ff jmp 801064d9 <alltraps>
80106c38 <vector73>:
80106c38: 6a 00 push $0x0
80106c3a: 6a 49 push $0x49
80106c3c: e9 98 f8 ff ff jmp 801064d9 <alltraps>
80106c41 <vector74>:
80106c41: 6a 00 push $0x0
80106c43: 6a 4a push $0x4a
80106c45: e9 8f f8 ff ff jmp 801064d9 <alltraps>
80106c4a <vector75>:
80106c4a: 6a 00 push $0x0
80106c4c: 6a 4b push $0x4b
80106c4e: e9 86 f8 ff ff jmp 801064d9 <alltraps>
80106c53 <vector76>:
80106c53: 6a 00 push $0x0
80106c55: 6a 4c push $0x4c
80106c57: e9 7d f8 ff ff jmp 801064d9 <alltraps>
80106c5c <vector77>:
80106c5c: 6a 00 push $0x0
80106c5e: 6a 4d push $0x4d
80106c60: e9 74 f8 ff ff jmp 801064d9 <alltraps>
80106c65 <vector78>:
80106c65: 6a 00 push $0x0
80106c67: 6a 4e push $0x4e
80106c69: e9 6b f8 ff ff jmp 801064d9 <alltraps>
80106c6e <vector79>:
80106c6e: 6a 00 push $0x0
80106c70: 6a 4f push $0x4f
80106c72: e9 62 f8 ff ff jmp 801064d9 <alltraps>
80106c77 <vector80>:
80106c77: 6a 00 push $0x0
80106c79: 6a 50 push $0x50
80106c7b: e9 59 f8 ff ff jmp 801064d9 <alltraps>
80106c80 <vector81>:
80106c80: 6a 00 push $0x0
80106c82: 6a 51 push $0x51
80106c84: e9 50 f8 ff ff jmp 801064d9 <alltraps>
80106c89 <vector82>:
80106c89: 6a 00 push $0x0
80106c8b: 6a 52 push $0x52
80106c8d: e9 47 f8 ff ff jmp 801064d9 <alltraps>
80106c92 <vector83>:
80106c92: 6a 00 push $0x0
80106c94: 6a 53 push $0x53
80106c96: e9 3e f8 ff ff jmp 801064d9 <alltraps>
80106c9b <vector84>:
80106c9b: 6a 00 push $0x0
80106c9d: 6a 54 push $0x54
80106c9f: e9 35 f8 ff ff jmp 801064d9 <alltraps>
80106ca4 <vector85>:
80106ca4: 6a 00 push $0x0
80106ca6: 6a 55 push $0x55
80106ca8: e9 2c f8 ff ff jmp 801064d9 <alltraps>
80106cad <vector86>:
80106cad: 6a 00 push $0x0
80106caf: 6a 56 push $0x56
80106cb1: e9 23 f8 ff ff jmp 801064d9 <alltraps>
80106cb6 <vector87>:
80106cb6: 6a 00 push $0x0
80106cb8: 6a 57 push $0x57
80106cba: e9 1a f8 ff ff jmp 801064d9 <alltraps>
80106cbf <vector88>:
80106cbf: 6a 00 push $0x0
80106cc1: 6a 58 push $0x58
80106cc3: e9 11 f8 ff ff jmp 801064d9 <alltraps>
80106cc8 <vector89>:
80106cc8: 6a 00 push $0x0
80106cca: 6a 59 push $0x59
80106ccc: e9 08 f8 ff ff jmp 801064d9 <alltraps>
80106cd1 <vector90>:
80106cd1: 6a 00 push $0x0
80106cd3: 6a 5a push $0x5a
80106cd5: e9 ff f7 ff ff jmp 801064d9 <alltraps>
80106cda <vector91>:
80106cda: 6a 00 push $0x0
80106cdc: 6a 5b push $0x5b
80106cde: e9 f6 f7 ff ff jmp 801064d9 <alltraps>
80106ce3 <vector92>:
80106ce3: 6a 00 push $0x0
80106ce5: 6a 5c push $0x5c
80106ce7: e9 ed f7 ff ff jmp 801064d9 <alltraps>
80106cec <vector93>:
80106cec: 6a 00 push $0x0
80106cee: 6a 5d push $0x5d
80106cf0: e9 e4 f7 ff ff jmp 801064d9 <alltraps>
80106cf5 <vector94>:
80106cf5: 6a 00 push $0x0
80106cf7: 6a 5e push $0x5e
80106cf9: e9 db f7 ff ff jmp 801064d9 <alltraps>
80106cfe <vector95>:
80106cfe: 6a 00 push $0x0
80106d00: 6a 5f push $0x5f
80106d02: e9 d2 f7 ff ff jmp 801064d9 <alltraps>
80106d07 <vector96>:
80106d07: 6a 00 push $0x0
80106d09: 6a 60 push $0x60
80106d0b: e9 c9 f7 ff ff jmp 801064d9 <alltraps>
80106d10 <vector97>:
80106d10: 6a 00 push $0x0
80106d12: 6a 61 push $0x61
80106d14: e9 c0 f7 ff ff jmp 801064d9 <alltraps>
80106d19 <vector98>:
80106d19: 6a 00 push $0x0
80106d1b: 6a 62 push $0x62
80106d1d: e9 b7 f7 ff ff jmp 801064d9 <alltraps>
80106d22 <vector99>:
80106d22: 6a 00 push $0x0
80106d24: 6a 63 push $0x63
80106d26: e9 ae f7 ff ff jmp 801064d9 <alltraps>
80106d2b <vector100>:
80106d2b: 6a 00 push $0x0
80106d2d: 6a 64 push $0x64
80106d2f: e9 a5 f7 ff ff jmp 801064d9 <alltraps>
80106d34 <vector101>:
80106d34: 6a 00 push $0x0
80106d36: 6a 65 push $0x65
80106d38: e9 9c f7 ff ff jmp 801064d9 <alltraps>
80106d3d <vector102>:
80106d3d: 6a 00 push $0x0
80106d3f: 6a 66 push $0x66
80106d41: e9 93 f7 ff ff jmp 801064d9 <alltraps>
80106d46 <vector103>:
80106d46: 6a 00 push $0x0
80106d48: 6a 67 push $0x67
80106d4a: e9 8a f7 ff ff jmp 801064d9 <alltraps>
80106d4f <vector104>:
80106d4f: 6a 00 push $0x0
80106d51: 6a 68 push $0x68
80106d53: e9 81 f7 ff ff jmp 801064d9 <alltraps>
80106d58 <vector105>:
80106d58: 6a 00 push $0x0
80106d5a: 6a 69 push $0x69
80106d5c: e9 78 f7 ff ff jmp 801064d9 <alltraps>
80106d61 <vector106>:
80106d61: 6a 00 push $0x0
80106d63: 6a 6a push $0x6a
80106d65: e9 6f f7 ff ff jmp 801064d9 <alltraps>
80106d6a <vector107>:
80106d6a: 6a 00 push $0x0
80106d6c: 6a 6b push $0x6b
80106d6e: e9 66 f7 ff ff jmp 801064d9 <alltraps>
80106d73 <vector108>:
80106d73: 6a 00 push $0x0
80106d75: 6a 6c push $0x6c
80106d77: e9 5d f7 ff ff jmp 801064d9 <alltraps>
80106d7c <vector109>:
80106d7c: 6a 00 push $0x0
80106d7e: 6a 6d push $0x6d
80106d80: e9 54 f7 ff ff jmp 801064d9 <alltraps>
80106d85 <vector110>:
80106d85: 6a 00 push $0x0
80106d87: 6a 6e push $0x6e
80106d89: e9 4b f7 ff ff jmp 801064d9 <alltraps>
80106d8e <vector111>:
80106d8e: 6a 00 push $0x0
80106d90: 6a 6f push $0x6f
80106d92: e9 42 f7 ff ff jmp 801064d9 <alltraps>
80106d97 <vector112>:
80106d97: 6a 00 push $0x0
80106d99: 6a 70 push $0x70
80106d9b: e9 39 f7 ff ff jmp 801064d9 <alltraps>
80106da0 <vector113>:
80106da0: 6a 00 push $0x0
80106da2: 6a 71 push $0x71
80106da4: e9 30 f7 ff ff jmp 801064d9 <alltraps>
80106da9 <vector114>:
80106da9: 6a 00 push $0x0
80106dab: 6a 72 push $0x72
80106dad: e9 27 f7 ff ff jmp 801064d9 <alltraps>
80106db2 <vector115>:
80106db2: 6a 00 push $0x0
80106db4: 6a 73 push $0x73
80106db6: e9 1e f7 ff ff jmp 801064d9 <alltraps>
80106dbb <vector116>:
80106dbb: 6a 00 push $0x0
80106dbd: 6a 74 push $0x74
80106dbf: e9 15 f7 ff ff jmp 801064d9 <alltraps>
80106dc4 <vector117>:
80106dc4: 6a 00 push $0x0
80106dc6: 6a 75 push $0x75
80106dc8: e9 0c f7 ff ff jmp 801064d9 <alltraps>
80106dcd <vector118>:
80106dcd: 6a 00 push $0x0
80106dcf: 6a 76 push $0x76
80106dd1: e9 03 f7 ff ff jmp 801064d9 <alltraps>
80106dd6 <vector119>:
80106dd6: 6a 00 push $0x0
80106dd8: 6a 77 push $0x77
80106dda: e9 fa f6 ff ff jmp 801064d9 <alltraps>
80106ddf <vector120>:
80106ddf: 6a 00 push $0x0
80106de1: 6a 78 push $0x78
80106de3: e9 f1 f6 ff ff jmp 801064d9 <alltraps>
80106de8 <vector121>:
80106de8: 6a 00 push $0x0
80106dea: 6a 79 push $0x79
80106dec: e9 e8 f6 ff ff jmp 801064d9 <alltraps>
80106df1 <vector122>:
80106df1: 6a 00 push $0x0
80106df3: 6a 7a push $0x7a
80106df5: e9 df f6 ff ff jmp 801064d9 <alltraps>
80106dfa <vector123>:
80106dfa: 6a 00 push $0x0
80106dfc: 6a 7b push $0x7b
80106dfe: e9 d6 f6 ff ff jmp 801064d9 <alltraps>
80106e03 <vector124>:
80106e03: 6a 00 push $0x0
80106e05: 6a 7c push $0x7c
80106e07: e9 cd f6 ff ff jmp 801064d9 <alltraps>
80106e0c <vector125>:
80106e0c: 6a 00 push $0x0
80106e0e: 6a 7d push $0x7d
80106e10: e9 c4 f6 ff ff jmp 801064d9 <alltraps>
80106e15 <vector126>:
80106e15: 6a 00 push $0x0
80106e17: 6a 7e push $0x7e
80106e19: e9 bb f6 ff ff jmp 801064d9 <alltraps>
80106e1e <vector127>:
80106e1e: 6a 00 push $0x0
80106e20: 6a 7f push $0x7f
80106e22: e9 b2 f6 ff ff jmp 801064d9 <alltraps>
80106e27 <vector128>:
80106e27: 6a 00 push $0x0
80106e29: 68 80 00 00 00 push $0x80
80106e2e: e9 a6 f6 ff ff jmp 801064d9 <alltraps>
80106e33 <vector129>:
80106e33: 6a 00 push $0x0
80106e35: 68 81 00 00 00 push $0x81
80106e3a: e9 9a f6 ff ff jmp 801064d9 <alltraps>
80106e3f <vector130>:
80106e3f: 6a 00 push $0x0
80106e41: 68 82 00 00 00 push $0x82
80106e46: e9 8e f6 ff ff jmp 801064d9 <alltraps>
80106e4b <vector131>:
80106e4b: 6a 00 push $0x0
80106e4d: 68 83 00 00 00 push $0x83
80106e52: e9 82 f6 ff ff jmp 801064d9 <alltraps>
80106e57 <vector132>:
80106e57: 6a 00 push $0x0
80106e59: 68 84 00 00 00 push $0x84
80106e5e: e9 76 f6 ff ff jmp 801064d9 <alltraps>
80106e63 <vector133>:
80106e63: 6a 00 push $0x0
80106e65: 68 85 00 00 00 push $0x85
80106e6a: e9 6a f6 ff ff jmp 801064d9 <alltraps>
80106e6f <vector134>:
80106e6f: 6a 00 push $0x0
80106e71: 68 86 00 00 00 push $0x86
80106e76: e9 5e f6 ff ff jmp 801064d9 <alltraps>
80106e7b <vector135>:
80106e7b: 6a 00 push $0x0
80106e7d: 68 87 00 00 00 push $0x87
80106e82: e9 52 f6 ff ff jmp 801064d9 <alltraps>
80106e87 <vector136>:
80106e87: 6a 00 push $0x0
80106e89: 68 88 00 00 00 push $0x88
80106e8e: e9 46 f6 ff ff jmp 801064d9 <alltraps>
80106e93 <vector137>:
80106e93: 6a 00 push $0x0
80106e95: 68 89 00 00 00 push $0x89
80106e9a: e9 3a f6 ff ff jmp 801064d9 <alltraps>
80106e9f <vector138>:
80106e9f: 6a 00 push $0x0
80106ea1: 68 8a 00 00 00 push $0x8a
80106ea6: e9 2e f6 ff ff jmp 801064d9 <alltraps>
80106eab <vector139>:
80106eab: 6a 00 push $0x0
80106ead: 68 8b 00 00 00 push $0x8b
80106eb2: e9 22 f6 ff ff jmp 801064d9 <alltraps>
80106eb7 <vector140>:
80106eb7: 6a 00 push $0x0
80106eb9: 68 8c 00 00 00 push $0x8c
80106ebe: e9 16 f6 ff ff jmp 801064d9 <alltraps>
80106ec3 <vector141>:
80106ec3: 6a 00 push $0x0
80106ec5: 68 8d 00 00 00 push $0x8d
80106eca: e9 0a f6 ff ff jmp 801064d9 <alltraps>
80106ecf <vector142>:
80106ecf: 6a 00 push $0x0
80106ed1: 68 8e 00 00 00 push $0x8e
80106ed6: e9 fe f5 ff ff jmp 801064d9 <alltraps>
80106edb <vector143>:
80106edb: 6a 00 push $0x0
80106edd: 68 8f 00 00 00 push $0x8f
80106ee2: e9 f2 f5 ff ff jmp 801064d9 <alltraps>
80106ee7 <vector144>:
80106ee7: 6a 00 push $0x0
80106ee9: 68 90 00 00 00 push $0x90
80106eee: e9 e6 f5 ff ff jmp 801064d9 <alltraps>
80106ef3 <vector145>:
80106ef3: 6a 00 push $0x0
80106ef5: 68 91 00 00 00 push $0x91
80106efa: e9 da f5 ff ff jmp 801064d9 <alltraps>
80106eff <vector146>:
80106eff: 6a 00 push $0x0
80106f01: 68 92 00 00 00 push $0x92
80106f06: e9 ce f5 ff ff jmp 801064d9 <alltraps>
80106f0b <vector147>:
80106f0b: 6a 00 push $0x0
80106f0d: 68 93 00 00 00 push $0x93
80106f12: e9 c2 f5 ff ff jmp 801064d9 <alltraps>
80106f17 <vector148>:
80106f17: 6a 00 push $0x0
80106f19: 68 94 00 00 00 push $0x94
80106f1e: e9 b6 f5 ff ff jmp 801064d9 <alltraps>
80106f23 <vector149>:
80106f23: 6a 00 push $0x0
80106f25: 68 95 00 00 00 push $0x95
80106f2a: e9 aa f5 ff ff jmp 801064d9 <alltraps>
80106f2f <vector150>:
80106f2f: 6a 00 push $0x0
80106f31: 68 96 00 00 00 push $0x96
80106f36: e9 9e f5 ff ff jmp 801064d9 <alltraps>
80106f3b <vector151>:
80106f3b: 6a 00 push $0x0
80106f3d: 68 97 00 00 00 push $0x97
80106f42: e9 92 f5 ff ff jmp 801064d9 <alltraps>
80106f47 <vector152>:
80106f47: 6a 00 push $0x0
80106f49: 68 98 00 00 00 push $0x98
80106f4e: e9 86 f5 ff ff jmp 801064d9 <alltraps>
80106f53 <vector153>:
80106f53: 6a 00 push $0x0
80106f55: 68 99 00 00 00 push $0x99
80106f5a: e9 7a f5 ff ff jmp 801064d9 <alltraps>
80106f5f <vector154>:
80106f5f: 6a 00 push $0x0
80106f61: 68 9a 00 00 00 push $0x9a
80106f66: e9 6e f5 ff ff jmp 801064d9 <alltraps>
80106f6b <vector155>:
80106f6b: 6a 00 push $0x0
80106f6d: 68 9b 00 00 00 push $0x9b
80106f72: e9 62 f5 ff ff jmp 801064d9 <alltraps>
80106f77 <vector156>:
80106f77: 6a 00 push $0x0
80106f79: 68 9c 00 00 00 push $0x9c
80106f7e: e9 56 f5 ff ff jmp 801064d9 <alltraps>
80106f83 <vector157>:
80106f83: 6a 00 push $0x0
80106f85: 68 9d 00 00 00 push $0x9d
80106f8a: e9 4a f5 ff ff jmp 801064d9 <alltraps>
80106f8f <vector158>:
80106f8f: 6a 00 push $0x0
80106f91: 68 9e 00 00 00 push $0x9e
80106f96: e9 3e f5 ff ff jmp 801064d9 <alltraps>
80106f9b <vector159>:
80106f9b: 6a 00 push $0x0
80106f9d: 68 9f 00 00 00 push $0x9f
80106fa2: e9 32 f5 ff ff jmp 801064d9 <alltraps>
80106fa7 <vector160>:
80106fa7: 6a 00 push $0x0
80106fa9: 68 a0 00 00 00 push $0xa0
80106fae: e9 26 f5 ff ff jmp 801064d9 <alltraps>
80106fb3 <vector161>:
80106fb3: 6a 00 push $0x0
80106fb5: 68 a1 00 00 00 push $0xa1
80106fba: e9 1a f5 ff ff jmp 801064d9 <alltraps>
80106fbf <vector162>:
80106fbf: 6a 00 push $0x0
80106fc1: 68 a2 00 00 00 push $0xa2
80106fc6: e9 0e f5 ff ff jmp 801064d9 <alltraps>
80106fcb <vector163>:
80106fcb: 6a 00 push $0x0
80106fcd: 68 a3 00 00 00 push $0xa3
80106fd2: e9 02 f5 ff ff jmp 801064d9 <alltraps>
80106fd7 <vector164>:
80106fd7: 6a 00 push $0x0
80106fd9: 68 a4 00 00 00 push $0xa4
80106fde: e9 f6 f4 ff ff jmp 801064d9 <alltraps>
80106fe3 <vector165>:
80106fe3: 6a 00 push $0x0
80106fe5: 68 a5 00 00 00 push $0xa5
80106fea: e9 ea f4 ff ff jmp 801064d9 <alltraps>
80106fef <vector166>:
80106fef: 6a 00 push $0x0
80106ff1: 68 a6 00 00 00 push $0xa6
80106ff6: e9 de f4 ff ff jmp 801064d9 <alltraps>
80106ffb <vector167>:
80106ffb: 6a 00 push $0x0
80106ffd: 68 a7 00 00 00 push $0xa7
80107002: e9 d2 f4 ff ff jmp 801064d9 <alltraps>
80107007 <vector168>:
80107007: 6a 00 push $0x0
80107009: 68 a8 00 00 00 push $0xa8
8010700e: e9 c6 f4 ff ff jmp 801064d9 <alltraps>
80107013 <vector169>:
80107013: 6a 00 push $0x0
80107015: 68 a9 00 00 00 push $0xa9
8010701a: e9 ba f4 ff ff jmp 801064d9 <alltraps>
8010701f <vector170>:
8010701f: 6a 00 push $0x0
80107021: 68 aa 00 00 00 push $0xaa
80107026: e9 ae f4 ff ff jmp 801064d9 <alltraps>
8010702b <vector171>:
8010702b: 6a 00 push $0x0
8010702d: 68 ab 00 00 00 push $0xab
80107032: e9 a2 f4 ff ff jmp 801064d9 <alltraps>
80107037 <vector172>:
80107037: 6a 00 push $0x0
80107039: 68 ac 00 00 00 push $0xac
8010703e: e9 96 f4 ff ff jmp 801064d9 <alltraps>
80107043 <vector173>:
80107043: 6a 00 push $0x0
80107045: 68 ad 00 00 00 push $0xad
8010704a: e9 8a f4 ff ff jmp 801064d9 <alltraps>
8010704f <vector174>:
8010704f: 6a 00 push $0x0
80107051: 68 ae 00 00 00 push $0xae
80107056: e9 7e f4 ff ff jmp 801064d9 <alltraps>
8010705b <vector175>:
8010705b: 6a 00 push $0x0
8010705d: 68 af 00 00 00 push $0xaf
80107062: e9 72 f4 ff ff jmp 801064d9 <alltraps>
80107067 <vector176>:
80107067: 6a 00 push $0x0
80107069: 68 b0 00 00 00 push $0xb0
8010706e: e9 66 f4 ff ff jmp 801064d9 <alltraps>
80107073 <vector177>:
80107073: 6a 00 push $0x0
80107075: 68 b1 00 00 00 push $0xb1
8010707a: e9 5a f4 ff ff jmp 801064d9 <alltraps>
8010707f <vector178>:
8010707f: 6a 00 push $0x0
80107081: 68 b2 00 00 00 push $0xb2
80107086: e9 4e f4 ff ff jmp 801064d9 <alltraps>
8010708b <vector179>:
8010708b: 6a 00 push $0x0
8010708d: 68 b3 00 00 00 push $0xb3
80107092: e9 42 f4 ff ff jmp 801064d9 <alltraps>
80107097 <vector180>:
80107097: 6a 00 push $0x0
80107099: 68 b4 00 00 00 push $0xb4
8010709e: e9 36 f4 ff ff jmp 801064d9 <alltraps>
801070a3 <vector181>:
801070a3: 6a 00 push $0x0
801070a5: 68 b5 00 00 00 push $0xb5
801070aa: e9 2a f4 ff ff jmp 801064d9 <alltraps>
801070af <vector182>:
801070af: 6a 00 push $0x0
801070b1: 68 b6 00 00 00 push $0xb6
801070b6: e9 1e f4 ff ff jmp 801064d9 <alltraps>
801070bb <vector183>:
801070bb: 6a 00 push $0x0
801070bd: 68 b7 00 00 00 push $0xb7
801070c2: e9 12 f4 ff ff jmp 801064d9 <alltraps>
801070c7 <vector184>:
801070c7: 6a 00 push $0x0
801070c9: 68 b8 00 00 00 push $0xb8
801070ce: e9 06 f4 ff ff jmp 801064d9 <alltraps>
801070d3 <vector185>:
801070d3: 6a 00 push $0x0
801070d5: 68 b9 00 00 00 push $0xb9
801070da: e9 fa f3 ff ff jmp 801064d9 <alltraps>
801070df <vector186>:
801070df: 6a 00 push $0x0
801070e1: 68 ba 00 00 00 push $0xba
801070e6: e9 ee f3 ff ff jmp 801064d9 <alltraps>
801070eb <vector187>:
801070eb: 6a 00 push $0x0
801070ed: 68 bb 00 00 00 push $0xbb
801070f2: e9 e2 f3 ff ff jmp 801064d9 <alltraps>
801070f7 <vector188>:
801070f7: 6a 00 push $0x0
801070f9: 68 bc 00 00 00 push $0xbc
801070fe: e9 d6 f3 ff ff jmp 801064d9 <alltraps>
80107103 <vector189>:
80107103: 6a 00 push $0x0
80107105: 68 bd 00 00 00 push $0xbd
8010710a: e9 ca f3 ff ff jmp 801064d9 <alltraps>
8010710f <vector190>:
8010710f: 6a 00 push $0x0
80107111: 68 be 00 00 00 push $0xbe
80107116: e9 be f3 ff ff jmp 801064d9 <alltraps>
8010711b <vector191>:
8010711b: 6a 00 push $0x0
8010711d: 68 bf 00 00 00 push $0xbf
80107122: e9 b2 f3 ff ff jmp 801064d9 <alltraps>
80107127 <vector192>:
80107127: 6a 00 push $0x0
80107129: 68 c0 00 00 00 push $0xc0
8010712e: e9 a6 f3 ff ff jmp 801064d9 <alltraps>
80107133 <vector193>:
80107133: 6a 00 push $0x0
80107135: 68 c1 00 00 00 push $0xc1
8010713a: e9 9a f3 ff ff jmp 801064d9 <alltraps>
8010713f <vector194>:
8010713f: 6a 00 push $0x0
80107141: 68 c2 00 00 00 push $0xc2
80107146: e9 8e f3 ff ff jmp 801064d9 <alltraps>
8010714b <vector195>:
8010714b: 6a 00 push $0x0
8010714d: 68 c3 00 00 00 push $0xc3
80107152: e9 82 f3 ff ff jmp 801064d9 <alltraps>
80107157 <vector196>:
80107157: 6a 00 push $0x0
80107159: 68 c4 00 00 00 push $0xc4
8010715e: e9 76 f3 ff ff jmp 801064d9 <alltraps>
80107163 <vector197>:
80107163: 6a 00 push $0x0
80107165: 68 c5 00 00 00 push $0xc5
8010716a: e9 6a f3 ff ff jmp 801064d9 <alltraps>
8010716f <vector198>:
8010716f: 6a 00 push $0x0
80107171: 68 c6 00 00 00 push $0xc6
80107176: e9 5e f3 ff ff jmp 801064d9 <alltraps>
8010717b <vector199>:
8010717b: 6a 00 push $0x0
8010717d: 68 c7 00 00 00 push $0xc7
80107182: e9 52 f3 ff ff jmp 801064d9 <alltraps>
80107187 <vector200>:
80107187: 6a 00 push $0x0
80107189: 68 c8 00 00 00 push $0xc8
8010718e: e9 46 f3 ff ff jmp 801064d9 <alltraps>
80107193 <vector201>:
80107193: 6a 00 push $0x0
80107195: 68 c9 00 00 00 push $0xc9
8010719a: e9 3a f3 ff ff jmp 801064d9 <alltraps>
8010719f <vector202>:
8010719f: 6a 00 push $0x0
801071a1: 68 ca 00 00 00 push $0xca
801071a6: e9 2e f3 ff ff jmp 801064d9 <alltraps>
801071ab <vector203>:
801071ab: 6a 00 push $0x0
801071ad: 68 cb 00 00 00 push $0xcb
801071b2: e9 22 f3 ff ff jmp 801064d9 <alltraps>
801071b7 <vector204>:
801071b7: 6a 00 push $0x0
801071b9: 68 cc 00 00 00 push $0xcc
801071be: e9 16 f3 ff ff jmp 801064d9 <alltraps>
801071c3 <vector205>:
801071c3: 6a 00 push $0x0
801071c5: 68 cd 00 00 00 push $0xcd
801071ca: e9 0a f3 ff ff jmp 801064d9 <alltraps>
801071cf <vector206>:
801071cf: 6a 00 push $0x0
801071d1: 68 ce 00 00 00 push $0xce
801071d6: e9 fe f2 ff ff jmp 801064d9 <alltraps>
801071db <vector207>:
801071db: 6a 00 push $0x0
801071dd: 68 cf 00 00 00 push $0xcf
801071e2: e9 f2 f2 ff ff jmp 801064d9 <alltraps>
801071e7 <vector208>:
801071e7: 6a 00 push $0x0
801071e9: 68 d0 00 00 00 push $0xd0
801071ee: e9 e6 f2 ff ff jmp 801064d9 <alltraps>
801071f3 <vector209>:
801071f3: 6a 00 push $0x0
801071f5: 68 d1 00 00 00 push $0xd1
801071fa: e9 da f2 ff ff jmp 801064d9 <alltraps>
801071ff <vector210>:
801071ff: 6a 00 push $0x0
80107201: 68 d2 00 00 00 push $0xd2
80107206: e9 ce f2 ff ff jmp 801064d9 <alltraps>
8010720b <vector211>:
8010720b: 6a 00 push $0x0
8010720d: 68 d3 00 00 00 push $0xd3
80107212: e9 c2 f2 ff ff jmp 801064d9 <alltraps>
80107217 <vector212>:
80107217: 6a 00 push $0x0
80107219: 68 d4 00 00 00 push $0xd4
8010721e: e9 b6 f2 ff ff jmp 801064d9 <alltraps>
80107223 <vector213>:
80107223: 6a 00 push $0x0
80107225: 68 d5 00 00 00 push $0xd5
8010722a: e9 aa f2 ff ff jmp 801064d9 <alltraps>
8010722f <vector214>:
8010722f: 6a 00 push $0x0
80107231: 68 d6 00 00 00 push $0xd6
80107236: e9 9e f2 ff ff jmp 801064d9 <alltraps>
8010723b <vector215>:
8010723b: 6a 00 push $0x0
8010723d: 68 d7 00 00 00 push $0xd7
80107242: e9 92 f2 ff ff jmp 801064d9 <alltraps>
80107247 <vector216>:
80107247: 6a 00 push $0x0
80107249: 68 d8 00 00 00 push $0xd8
8010724e: e9 86 f2 ff ff jmp 801064d9 <alltraps>
80107253 <vector217>:
80107253: 6a 00 push $0x0
80107255: 68 d9 00 00 00 push $0xd9
8010725a: e9 7a f2 ff ff jmp 801064d9 <alltraps>
8010725f <vector218>:
8010725f: 6a 00 push $0x0
80107261: 68 da 00 00 00 push $0xda
80107266: e9 6e f2 ff ff jmp 801064d9 <alltraps>
8010726b <vector219>:
8010726b: 6a 00 push $0x0
8010726d: 68 db 00 00 00 push $0xdb
80107272: e9 62 f2 ff ff jmp 801064d9 <alltraps>
80107277 <vector220>:
80107277: 6a 00 push $0x0
80107279: 68 dc 00 00 00 push $0xdc
8010727e: e9 56 f2 ff ff jmp 801064d9 <alltraps>
80107283 <vector221>:
80107283: 6a 00 push $0x0
80107285: 68 dd 00 00 00 push $0xdd
8010728a: e9 4a f2 ff ff jmp 801064d9 <alltraps>
8010728f <vector222>:
8010728f: 6a 00 push $0x0
80107291: 68 de 00 00 00 push $0xde
80107296: e9 3e f2 ff ff jmp 801064d9 <alltraps>
8010729b <vector223>:
8010729b: 6a 00 push $0x0
8010729d: 68 df 00 00 00 push $0xdf
801072a2: e9 32 f2 ff ff jmp 801064d9 <alltraps>
801072a7 <vector224>:
801072a7: 6a 00 push $0x0
801072a9: 68 e0 00 00 00 push $0xe0
801072ae: e9 26 f2 ff ff jmp 801064d9 <alltraps>
801072b3 <vector225>:
801072b3: 6a 00 push $0x0
801072b5: 68 e1 00 00 00 push $0xe1
801072ba: e9 1a f2 ff ff jmp 801064d9 <alltraps>
801072bf <vector226>:
801072bf: 6a 00 push $0x0
801072c1: 68 e2 00 00 00 push $0xe2
801072c6: e9 0e f2 ff ff jmp 801064d9 <alltraps>
801072cb <vector227>:
801072cb: 6a 00 push $0x0
801072cd: 68 e3 00 00 00 push $0xe3
801072d2: e9 02 f2 ff ff jmp 801064d9 <alltraps>
801072d7 <vector228>:
801072d7: 6a 00 push $0x0
801072d9: 68 e4 00 00 00 push $0xe4
801072de: e9 f6 f1 ff ff jmp 801064d9 <alltraps>
801072e3 <vector229>:
801072e3: 6a 00 push $0x0
801072e5: 68 e5 00 00 00 push $0xe5
801072ea: e9 ea f1 ff ff jmp 801064d9 <alltraps>
801072ef <vector230>:
801072ef: 6a 00 push $0x0
801072f1: 68 e6 00 00 00 push $0xe6
801072f6: e9 de f1 ff ff jmp 801064d9 <alltraps>
801072fb <vector231>:
801072fb: 6a 00 push $0x0
801072fd: 68 e7 00 00 00 push $0xe7
80107302: e9 d2 f1 ff ff jmp 801064d9 <alltraps>
80107307 <vector232>:
80107307: 6a 00 push $0x0
80107309: 68 e8 00 00 00 push $0xe8
8010730e: e9 c6 f1 ff ff jmp 801064d9 <alltraps>
80107313 <vector233>:
80107313: 6a 00 push $0x0
80107315: 68 e9 00 00 00 push $0xe9
8010731a: e9 ba f1 ff ff jmp 801064d9 <alltraps>
8010731f <vector234>:
8010731f: 6a 00 push $0x0
80107321: 68 ea 00 00 00 push $0xea
80107326: e9 ae f1 ff ff jmp 801064d9 <alltraps>
8010732b <vector235>:
8010732b: 6a 00 push $0x0
8010732d: 68 eb 00 00 00 push $0xeb
80107332: e9 a2 f1 ff ff jmp 801064d9 <alltraps>
80107337 <vector236>:
80107337: 6a 00 push $0x0
80107339: 68 ec 00 00 00 push $0xec
8010733e: e9 96 f1 ff ff jmp 801064d9 <alltraps>
80107343 <vector237>:
80107343: 6a 00 push $0x0
80107345: 68 ed 00 00 00 push $0xed
8010734a: e9 8a f1 ff ff jmp 801064d9 <alltraps>
8010734f <vector238>:
8010734f: 6a 00 push $0x0
80107351: 68 ee 00 00 00 push $0xee
80107356: e9 7e f1 ff ff jmp 801064d9 <alltraps>
8010735b <vector239>:
8010735b: 6a 00 push $0x0
8010735d: 68 ef 00 00 00 push $0xef
80107362: e9 72 f1 ff ff jmp 801064d9 <alltraps>
80107367 <vector240>:
80107367: 6a 00 push $0x0
80107369: 68 f0 00 00 00 push $0xf0
8010736e: e9 66 f1 ff ff jmp 801064d9 <alltraps>
80107373 <vector241>:
80107373: 6a 00 push $0x0
80107375: 68 f1 00 00 00 push $0xf1
8010737a: e9 5a f1 ff ff jmp 801064d9 <alltraps>
8010737f <vector242>:
8010737f: 6a 00 push $0x0
80107381: 68 f2 00 00 00 push $0xf2
80107386: e9 4e f1 ff ff jmp 801064d9 <alltraps>
8010738b <vector243>:
8010738b: 6a 00 push $0x0
8010738d: 68 f3 00 00 00 push $0xf3
80107392: e9 42 f1 ff ff jmp 801064d9 <alltraps>
80107397 <vector244>:
80107397: 6a 00 push $0x0
80107399: 68 f4 00 00 00 push $0xf4
8010739e: e9 36 f1 ff ff jmp 801064d9 <alltraps>
801073a3 <vector245>:
801073a3: 6a 00 push $0x0
801073a5: 68 f5 00 00 00 push $0xf5
801073aa: e9 2a f1 ff ff jmp 801064d9 <alltraps>
801073af <vector246>:
801073af: 6a 00 push $0x0
801073b1: 68 f6 00 00 00 push $0xf6
801073b6: e9 1e f1 ff ff jmp 801064d9 <alltraps>
801073bb <vector247>:
801073bb: 6a 00 push $0x0
801073bd: 68 f7 00 00 00 push $0xf7
801073c2: e9 12 f1 ff ff jmp 801064d9 <alltraps>
801073c7 <vector248>:
801073c7: 6a 00 push $0x0
801073c9: 68 f8 00 00 00 push $0xf8
801073ce: e9 06 f1 ff ff jmp 801064d9 <alltraps>
801073d3 <vector249>:
801073d3: 6a 00 push $0x0
801073d5: 68 f9 00 00 00 push $0xf9
801073da: e9 fa f0 ff ff jmp 801064d9 <alltraps>
801073df <vector250>:
801073df: 6a 00 push $0x0
801073e1: 68 fa 00 00 00 push $0xfa
801073e6: e9 ee f0 ff ff jmp 801064d9 <alltraps>
801073eb <vector251>:
801073eb: 6a 00 push $0x0
801073ed: 68 fb 00 00 00 push $0xfb
801073f2: e9 e2 f0 ff ff jmp 801064d9 <alltraps>
801073f7 <vector252>:
801073f7: 6a 00 push $0x0
801073f9: 68 fc 00 00 00 push $0xfc
801073fe: e9 d6 f0 ff ff jmp 801064d9 <alltraps>
80107403 <vector253>:
80107403: 6a 00 push $0x0
80107405: 68 fd 00 00 00 push $0xfd
8010740a: e9 ca f0 ff ff jmp 801064d9 <alltraps>
8010740f <vector254>:
8010740f: 6a 00 push $0x0
80107411: 68 fe 00 00 00 push $0xfe
80107416: e9 be f0 ff ff jmp 801064d9 <alltraps>
8010741b <vector255>:
8010741b: 6a 00 push $0x0
8010741d: 68 ff 00 00 00 push $0xff
80107422: e9 b2 f0 ff ff jmp 801064d9 <alltraps>
80107427: 66 90 xchg %ax,%ax
80107429: 66 90 xchg %ax,%ax
8010742b: 66 90 xchg %ax,%ax
8010742d: 66 90 xchg %ax,%ax
8010742f: 90 nop
80107430 <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)
{
80107430: 55 push %ebp
80107431: 89 e5 mov %esp,%ebp
80107433: 57 push %edi
80107434: 56 push %esi
80107435: 53 push %ebx
pde_t *pde;
pte_t *pgtab;
pde = &pgdir[PDX(va)];
80107436: 89 d3 mov %edx,%ebx
{
80107438: 89 d7 mov %edx,%edi
pde = &pgdir[PDX(va)];
8010743a: c1 eb 16 shr $0x16,%ebx
8010743d: 8d 34 98 lea (%eax,%ebx,4),%esi
{
80107440: 83 ec 0c sub $0xc,%esp
if(*pde & PTE_P){
80107443: 8b 06 mov (%esi),%eax
80107445: a8 01 test $0x1,%al
80107447: 74 27 je 80107470 <walkpgdir+0x40>
pgtab = (pte_t*)P2V(PTE_ADDR(*pde));
80107449: 25 00 f0 ff ff and $0xfffff000,%eax
8010744e: 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)];
80107454: c1 ef 0a shr $0xa,%edi
}
80107457: 8d 65 f4 lea -0xc(%ebp),%esp
return &pgtab[PTX(va)];
8010745a: 89 fa mov %edi,%edx
8010745c: 81 e2 fc 0f 00 00 and $0xffc,%edx
80107462: 8d 04 13 lea (%ebx,%edx,1),%eax
}
80107465: 5b pop %ebx
80107466: 5e pop %esi
80107467: 5f pop %edi
80107468: 5d pop %ebp
80107469: c3 ret
8010746a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(!alloc || (pgtab = (pte_t*)kalloc()) == 0)
80107470: 85 c9 test %ecx,%ecx
80107472: 74 2c je 801074a0 <walkpgdir+0x70>
80107474: e8 b7 b3 ff ff call 80102830 <kalloc>
80107479: 85 c0 test %eax,%eax
8010747b: 89 c3 mov %eax,%ebx
8010747d: 74 21 je 801074a0 <walkpgdir+0x70>
memset(pgtab, 0, PGSIZE);
8010747f: 83 ec 04 sub $0x4,%esp
80107482: 68 00 10 00 00 push $0x1000
80107487: 6a 00 push $0x0
80107489: 50 push %eax
8010748a: e8 51 dd ff ff call 801051e0 <memset>
*pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U;
8010748f: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80107495: 83 c4 10 add $0x10,%esp
80107498: 83 c8 07 or $0x7,%eax
8010749b: 89 06 mov %eax,(%esi)
8010749d: eb b5 jmp 80107454 <walkpgdir+0x24>
8010749f: 90 nop
}
801074a0: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
801074a3: 31 c0 xor %eax,%eax
}
801074a5: 5b pop %ebx
801074a6: 5e pop %esi
801074a7: 5f pop %edi
801074a8: 5d pop %ebp
801074a9: c3 ret
801074aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801074b0 <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)
{
801074b0: 55 push %ebp
801074b1: 89 e5 mov %esp,%ebp
801074b3: 57 push %edi
801074b4: 56 push %esi
801074b5: 53 push %ebx
char *a, *last;
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
801074b6: 89 d3 mov %edx,%ebx
801074b8: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
{
801074be: 83 ec 1c sub $0x1c,%esp
801074c1: 89 45 e4 mov %eax,-0x1c(%ebp)
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
801074c4: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax
801074c8: 8b 7d 08 mov 0x8(%ebp),%edi
801074cb: 25 00 f0 ff ff and $0xfffff000,%eax
801074d0: 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;
801074d3: 8b 45 0c mov 0xc(%ebp),%eax
801074d6: 29 df sub %ebx,%edi
801074d8: 83 c8 01 or $0x1,%eax
801074db: 89 45 dc mov %eax,-0x24(%ebp)
801074de: eb 15 jmp 801074f5 <mappages+0x45>
if(*pte & PTE_P)
801074e0: f6 00 01 testb $0x1,(%eax)
801074e3: 75 45 jne 8010752a <mappages+0x7a>
*pte = pa | perm | PTE_P;
801074e5: 0b 75 dc or -0x24(%ebp),%esi
if(a == last)
801074e8: 3b 5d e0 cmp -0x20(%ebp),%ebx
*pte = pa | perm | PTE_P;
801074eb: 89 30 mov %esi,(%eax)
if(a == last)
801074ed: 74 31 je 80107520 <mappages+0x70>
break;
a += PGSIZE;
801074ef: 81 c3 00 10 00 00 add $0x1000,%ebx
if((pte = walkpgdir(pgdir, a, 1)) == 0)
801074f5: 8b 45 e4 mov -0x1c(%ebp),%eax
801074f8: b9 01 00 00 00 mov $0x1,%ecx
801074fd: 89 da mov %ebx,%edx
801074ff: 8d 34 3b lea (%ebx,%edi,1),%esi
80107502: e8 29 ff ff ff call 80107430 <walkpgdir>
80107507: 85 c0 test %eax,%eax
80107509: 75 d5 jne 801074e0 <mappages+0x30>
pa += PGSIZE;
}
return 0;
}
8010750b: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
8010750e: b8 ff ff ff ff mov $0xffffffff,%eax
}
80107513: 5b pop %ebx
80107514: 5e pop %esi
80107515: 5f pop %edi
80107516: 5d pop %ebp
80107517: c3 ret
80107518: 90 nop
80107519: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107520: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80107523: 31 c0 xor %eax,%eax
}
80107525: 5b pop %ebx
80107526: 5e pop %esi
80107527: 5f pop %edi
80107528: 5d pop %ebp
80107529: c3 ret
panic("remap");
8010752a: 83 ec 0c sub $0xc,%esp
8010752d: 68 f0 87 10 80 push $0x801087f0
80107532: e8 59 8e ff ff call 80100390 <panic>
80107537: 89 f6 mov %esi,%esi
80107539: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107540 <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)
80107540: 55 push %ebp
80107541: 89 e5 mov %esp,%ebp
80107543: 57 push %edi
80107544: 56 push %esi
80107545: 53 push %ebx
uint a, pa;
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
80107546: 8d 99 ff 0f 00 00 lea 0xfff(%ecx),%ebx
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
8010754c: 89 c7 mov %eax,%edi
a = PGROUNDUP(newsz);
8010754e: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
80107554: 83 ec 1c sub $0x1c,%esp
80107557: 89 4d e0 mov %ecx,-0x20(%ebp)
for(; a < oldsz; a += PGSIZE){
8010755a: 39 d3 cmp %edx,%ebx
8010755c: 73 66 jae 801075c4 <deallocuvm.part.0+0x84>
8010755e: 89 d6 mov %edx,%esi
80107560: eb 3d jmp 8010759f <deallocuvm.part.0+0x5f>
80107562: 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){
80107568: 8b 10 mov (%eax),%edx
8010756a: f6 c2 01 test $0x1,%dl
8010756d: 74 26 je 80107595 <deallocuvm.part.0+0x55>
pa = PTE_ADDR(*pte);
if(pa == 0)
8010756f: 81 e2 00 f0 ff ff and $0xfffff000,%edx
80107575: 74 58 je 801075cf <deallocuvm.part.0+0x8f>
panic("kfree");
char *v = P2V(pa);
kfree(v);
80107577: 83 ec 0c sub $0xc,%esp
char *v = P2V(pa);
8010757a: 81 c2 00 00 00 80 add $0x80000000,%edx
80107580: 89 45 e4 mov %eax,-0x1c(%ebp)
kfree(v);
80107583: 52 push %edx
80107584: e8 f7 b0 ff ff call 80102680 <kfree>
*pte = 0;
80107589: 8b 45 e4 mov -0x1c(%ebp),%eax
8010758c: 83 c4 10 add $0x10,%esp
8010758f: c7 00 00 00 00 00 movl $0x0,(%eax)
for(; a < oldsz; a += PGSIZE){
80107595: 81 c3 00 10 00 00 add $0x1000,%ebx
8010759b: 39 f3 cmp %esi,%ebx
8010759d: 73 25 jae 801075c4 <deallocuvm.part.0+0x84>
pte = walkpgdir(pgdir, (char*)a, 0);
8010759f: 31 c9 xor %ecx,%ecx
801075a1: 89 da mov %ebx,%edx
801075a3: 89 f8 mov %edi,%eax
801075a5: e8 86 fe ff ff call 80107430 <walkpgdir>
if(!pte)
801075aa: 85 c0 test %eax,%eax
801075ac: 75 ba jne 80107568 <deallocuvm.part.0+0x28>
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
801075ae: 81 e3 00 00 c0 ff and $0xffc00000,%ebx
801075b4: 81 c3 00 f0 3f 00 add $0x3ff000,%ebx
for(; a < oldsz; a += PGSIZE){
801075ba: 81 c3 00 10 00 00 add $0x1000,%ebx
801075c0: 39 f3 cmp %esi,%ebx
801075c2: 72 db jb 8010759f <deallocuvm.part.0+0x5f>
}
}
return newsz;
}
801075c4: 8b 45 e0 mov -0x20(%ebp),%eax
801075c7: 8d 65 f4 lea -0xc(%ebp),%esp
801075ca: 5b pop %ebx
801075cb: 5e pop %esi
801075cc: 5f pop %edi
801075cd: 5d pop %ebp
801075ce: c3 ret
panic("kfree");
801075cf: 83 ec 0c sub $0xc,%esp
801075d2: 68 c6 7f 10 80 push $0x80107fc6
801075d7: e8 b4 8d ff ff call 80100390 <panic>
801075dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801075e0 <seginit>:
{
801075e0: 55 push %ebp
801075e1: 89 e5 mov %esp,%ebp
801075e3: 83 ec 18 sub $0x18,%esp
c = &cpus[cpuid()];
801075e6: e8 95 c5 ff ff call 80103b80 <cpuid>
801075eb: 69 c0 b0 00 00 00 imul $0xb0,%eax,%eax
pd[0] = size-1;
801075f1: ba 2f 00 00 00 mov $0x2f,%edx
801075f6: 66 89 55 f2 mov %dx,-0xe(%ebp)
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
801075fa: c7 80 b8 3a 11 80 ff movl $0xffff,-0x7feec548(%eax)
80107601: ff 00 00
80107604: c7 80 bc 3a 11 80 00 movl $0xcf9a00,-0x7feec544(%eax)
8010760b: 9a cf 00
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
8010760e: c7 80 c0 3a 11 80 ff movl $0xffff,-0x7feec540(%eax)
80107615: ff 00 00
80107618: c7 80 c4 3a 11 80 00 movl $0xcf9200,-0x7feec53c(%eax)
8010761f: 92 cf 00
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80107622: c7 80 c8 3a 11 80 ff movl $0xffff,-0x7feec538(%eax)
80107629: ff 00 00
8010762c: c7 80 cc 3a 11 80 00 movl $0xcffa00,-0x7feec534(%eax)
80107633: fa cf 00
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
80107636: c7 80 d0 3a 11 80 ff movl $0xffff,-0x7feec530(%eax)
8010763d: ff 00 00
80107640: c7 80 d4 3a 11 80 00 movl $0xcff200,-0x7feec52c(%eax)
80107647: f2 cf 00
lgdt(c->gdt, sizeof(c->gdt));
8010764a: 05 b0 3a 11 80 add $0x80113ab0,%eax
pd[1] = (uint)p;
8010764f: 66 89 45 f4 mov %ax,-0xc(%ebp)
pd[2] = (uint)p >> 16;
80107653: c1 e8 10 shr $0x10,%eax
80107656: 66 89 45 f6 mov %ax,-0xa(%ebp)
asm volatile("lgdt (%0)" : : "r" (pd));
8010765a: 8d 45 f2 lea -0xe(%ebp),%eax
8010765d: 0f 01 10 lgdtl (%eax)
}
80107660: c9 leave
80107661: c3 ret
80107662: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107669: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107670 <switchkvm>:
lcr3(V2P(kpgdir)); // switch to the kernel page table
80107670: a1 84 6d 11 80 mov 0x80116d84,%eax
{
80107675: 55 push %ebp
80107676: 89 e5 mov %esp,%ebp
lcr3(V2P(kpgdir)); // switch to the kernel page table
80107678: 05 00 00 00 80 add $0x80000000,%eax
}
static inline void
lcr3(uint val)
{
asm volatile("movl %0,%%cr3" : : "r" (val));
8010767d: 0f 22 d8 mov %eax,%cr3
}
80107680: 5d pop %ebp
80107681: c3 ret
80107682: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107689: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107690 <switchuvm>:
{
80107690: 55 push %ebp
80107691: 89 e5 mov %esp,%ebp
80107693: 57 push %edi
80107694: 56 push %esi
80107695: 53 push %ebx
80107696: 83 ec 1c sub $0x1c,%esp
80107699: 8b 5d 08 mov 0x8(%ebp),%ebx
if(p == 0)
8010769c: 85 db test %ebx,%ebx
8010769e: 0f 84 cb 00 00 00 je 8010776f <switchuvm+0xdf>
if(p->kstack == 0)
801076a4: 8b 43 08 mov 0x8(%ebx),%eax
801076a7: 85 c0 test %eax,%eax
801076a9: 0f 84 da 00 00 00 je 80107789 <switchuvm+0xf9>
if(p->pgdir == 0)
801076af: 8b 43 04 mov 0x4(%ebx),%eax
801076b2: 85 c0 test %eax,%eax
801076b4: 0f 84 c2 00 00 00 je 8010777c <switchuvm+0xec>
pushcli();
801076ba: e8 41 d9 ff ff call 80105000 <pushcli>
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
801076bf: e8 3c c4 ff ff call 80103b00 <mycpu>
801076c4: 89 c6 mov %eax,%esi
801076c6: e8 35 c4 ff ff call 80103b00 <mycpu>
801076cb: 89 c7 mov %eax,%edi
801076cd: e8 2e c4 ff ff call 80103b00 <mycpu>
801076d2: 89 45 e4 mov %eax,-0x1c(%ebp)
801076d5: 83 c7 08 add $0x8,%edi
801076d8: e8 23 c4 ff ff call 80103b00 <mycpu>
801076dd: 8b 4d e4 mov -0x1c(%ebp),%ecx
801076e0: 83 c0 08 add $0x8,%eax
801076e3: ba 67 00 00 00 mov $0x67,%edx
801076e8: c1 e8 18 shr $0x18,%eax
801076eb: 66 89 96 98 00 00 00 mov %dx,0x98(%esi)
801076f2: 66 89 be 9a 00 00 00 mov %di,0x9a(%esi)
801076f9: 88 86 9f 00 00 00 mov %al,0x9f(%esi)
mycpu()->ts.iomb = (ushort) 0xFFFF;
801076ff: bf ff ff ff ff mov $0xffffffff,%edi
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
80107704: 83 c1 08 add $0x8,%ecx
80107707: c1 e9 10 shr $0x10,%ecx
8010770a: 88 8e 9c 00 00 00 mov %cl,0x9c(%esi)
80107710: b9 99 40 00 00 mov $0x4099,%ecx
80107715: 66 89 8e 9d 00 00 00 mov %cx,0x9d(%esi)
mycpu()->ts.ss0 = SEG_KDATA << 3;
8010771c: be 10 00 00 00 mov $0x10,%esi
mycpu()->gdt[SEG_TSS].s = 0;
80107721: e8 da c3 ff ff call 80103b00 <mycpu>
80107726: 80 a0 9d 00 00 00 ef andb $0xef,0x9d(%eax)
mycpu()->ts.ss0 = SEG_KDATA << 3;
8010772d: e8 ce c3 ff ff call 80103b00 <mycpu>
80107732: 66 89 70 10 mov %si,0x10(%eax)
mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE;
80107736: 8b 73 08 mov 0x8(%ebx),%esi
80107739: e8 c2 c3 ff ff call 80103b00 <mycpu>
8010773e: 81 c6 00 10 00 00 add $0x1000,%esi
80107744: 89 70 0c mov %esi,0xc(%eax)
mycpu()->ts.iomb = (ushort) 0xFFFF;
80107747: e8 b4 c3 ff ff call 80103b00 <mycpu>
8010774c: 66 89 78 6e mov %di,0x6e(%eax)
asm volatile("ltr %0" : : "r" (sel));
80107750: b8 28 00 00 00 mov $0x28,%eax
80107755: 0f 00 d8 ltr %ax
lcr3(V2P(p->pgdir)); // switch to process's address space
80107758: 8b 43 04 mov 0x4(%ebx),%eax
8010775b: 05 00 00 00 80 add $0x80000000,%eax
asm volatile("movl %0,%%cr3" : : "r" (val));
80107760: 0f 22 d8 mov %eax,%cr3
}
80107763: 8d 65 f4 lea -0xc(%ebp),%esp
80107766: 5b pop %ebx
80107767: 5e pop %esi
80107768: 5f pop %edi
80107769: 5d pop %ebp
popcli();
8010776a: e9 d1 d8 ff ff jmp 80105040 <popcli>
panic("switchuvm: no process");
8010776f: 83 ec 0c sub $0xc,%esp
80107772: 68 f6 87 10 80 push $0x801087f6
80107777: e8 14 8c ff ff call 80100390 <panic>
panic("switchuvm: no pgdir");
8010777c: 83 ec 0c sub $0xc,%esp
8010777f: 68 21 88 10 80 push $0x80108821
80107784: e8 07 8c ff ff call 80100390 <panic>
panic("switchuvm: no kstack");
80107789: 83 ec 0c sub $0xc,%esp
8010778c: 68 0c 88 10 80 push $0x8010880c
80107791: e8 fa 8b ff ff call 80100390 <panic>
80107796: 8d 76 00 lea 0x0(%esi),%esi
80107799: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801077a0 <inituvm>:
{
801077a0: 55 push %ebp
801077a1: 89 e5 mov %esp,%ebp
801077a3: 57 push %edi
801077a4: 56 push %esi
801077a5: 53 push %ebx
801077a6: 83 ec 1c sub $0x1c,%esp
801077a9: 8b 75 10 mov 0x10(%ebp),%esi
801077ac: 8b 45 08 mov 0x8(%ebp),%eax
801077af: 8b 7d 0c mov 0xc(%ebp),%edi
if(sz >= PGSIZE)
801077b2: 81 fe ff 0f 00 00 cmp $0xfff,%esi
{
801077b8: 89 45 e4 mov %eax,-0x1c(%ebp)
if(sz >= PGSIZE)
801077bb: 77 49 ja 80107806 <inituvm+0x66>
mem = kalloc();
801077bd: e8 6e b0 ff ff call 80102830 <kalloc>
memset(mem, 0, PGSIZE);
801077c2: 83 ec 04 sub $0x4,%esp
mem = kalloc();
801077c5: 89 c3 mov %eax,%ebx
memset(mem, 0, PGSIZE);
801077c7: 68 00 10 00 00 push $0x1000
801077cc: 6a 00 push $0x0
801077ce: 50 push %eax
801077cf: e8 0c da ff ff call 801051e0 <memset>
mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U);
801077d4: 58 pop %eax
801077d5: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
801077db: b9 00 10 00 00 mov $0x1000,%ecx
801077e0: 5a pop %edx
801077e1: 6a 06 push $0x6
801077e3: 50 push %eax
801077e4: 31 d2 xor %edx,%edx
801077e6: 8b 45 e4 mov -0x1c(%ebp),%eax
801077e9: e8 c2 fc ff ff call 801074b0 <mappages>
memmove(mem, init, sz);
801077ee: 89 75 10 mov %esi,0x10(%ebp)
801077f1: 89 7d 0c mov %edi,0xc(%ebp)
801077f4: 83 c4 10 add $0x10,%esp
801077f7: 89 5d 08 mov %ebx,0x8(%ebp)
}
801077fa: 8d 65 f4 lea -0xc(%ebp),%esp
801077fd: 5b pop %ebx
801077fe: 5e pop %esi
801077ff: 5f pop %edi
80107800: 5d pop %ebp
memmove(mem, init, sz);
80107801: e9 8a da ff ff jmp 80105290 <memmove>
panic("inituvm: more than a page");
80107806: 83 ec 0c sub $0xc,%esp
80107809: 68 35 88 10 80 push $0x80108835
8010780e: e8 7d 8b ff ff call 80100390 <panic>
80107813: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80107819: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107820 <loaduvm>:
{
80107820: 55 push %ebp
80107821: 89 e5 mov %esp,%ebp
80107823: 57 push %edi
80107824: 56 push %esi
80107825: 53 push %ebx
80107826: 83 ec 0c sub $0xc,%esp
if((uint) addr % PGSIZE != 0)
80107829: f7 45 0c ff 0f 00 00 testl $0xfff,0xc(%ebp)
80107830: 0f 85 91 00 00 00 jne 801078c7 <loaduvm+0xa7>
for(i = 0; i < sz; i += PGSIZE){
80107836: 8b 75 18 mov 0x18(%ebp),%esi
80107839: 31 db xor %ebx,%ebx
8010783b: 85 f6 test %esi,%esi
8010783d: 75 1a jne 80107859 <loaduvm+0x39>
8010783f: eb 6f jmp 801078b0 <loaduvm+0x90>
80107841: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107848: 81 c3 00 10 00 00 add $0x1000,%ebx
8010784e: 81 ee 00 10 00 00 sub $0x1000,%esi
80107854: 39 5d 18 cmp %ebx,0x18(%ebp)
80107857: 76 57 jbe 801078b0 <loaduvm+0x90>
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
80107859: 8b 55 0c mov 0xc(%ebp),%edx
8010785c: 8b 45 08 mov 0x8(%ebp),%eax
8010785f: 31 c9 xor %ecx,%ecx
80107861: 01 da add %ebx,%edx
80107863: e8 c8 fb ff ff call 80107430 <walkpgdir>
80107868: 85 c0 test %eax,%eax
8010786a: 74 4e je 801078ba <loaduvm+0x9a>
pa = PTE_ADDR(*pte);
8010786c: 8b 00 mov (%eax),%eax
if(readi(ip, P2V(pa), offset+i, n) != n)
8010786e: 8b 4d 14 mov 0x14(%ebp),%ecx
if(sz - i < PGSIZE)
80107871: bf 00 10 00 00 mov $0x1000,%edi
pa = PTE_ADDR(*pte);
80107876: 25 00 f0 ff ff and $0xfffff000,%eax
if(sz - i < PGSIZE)
8010787b: 81 fe ff 0f 00 00 cmp $0xfff,%esi
80107881: 0f 46 fe cmovbe %esi,%edi
if(readi(ip, P2V(pa), offset+i, n) != n)
80107884: 01 d9 add %ebx,%ecx
80107886: 05 00 00 00 80 add $0x80000000,%eax
8010788b: 57 push %edi
8010788c: 51 push %ecx
8010788d: 50 push %eax
8010788e: ff 75 10 pushl 0x10(%ebp)
80107891: e8 3a a4 ff ff call 80101cd0 <readi>
80107896: 83 c4 10 add $0x10,%esp
80107899: 39 f8 cmp %edi,%eax
8010789b: 74 ab je 80107848 <loaduvm+0x28>
}
8010789d: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
801078a0: b8 ff ff ff ff mov $0xffffffff,%eax
}
801078a5: 5b pop %ebx
801078a6: 5e pop %esi
801078a7: 5f pop %edi
801078a8: 5d pop %ebp
801078a9: c3 ret
801078aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801078b0: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
801078b3: 31 c0 xor %eax,%eax
}
801078b5: 5b pop %ebx
801078b6: 5e pop %esi
801078b7: 5f pop %edi
801078b8: 5d pop %ebp
801078b9: c3 ret
panic("loaduvm: address should exist");
801078ba: 83 ec 0c sub $0xc,%esp
801078bd: 68 4f 88 10 80 push $0x8010884f
801078c2: e8 c9 8a ff ff call 80100390 <panic>
panic("loaduvm: addr must be page aligned");
801078c7: 83 ec 0c sub $0xc,%esp
801078ca: 68 f0 88 10 80 push $0x801088f0
801078cf: e8 bc 8a ff ff call 80100390 <panic>
801078d4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801078da: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801078e0 <allocuvm>:
{
801078e0: 55 push %ebp
801078e1: 89 e5 mov %esp,%ebp
801078e3: 57 push %edi
801078e4: 56 push %esi
801078e5: 53 push %ebx
801078e6: 83 ec 1c sub $0x1c,%esp
if(newsz >= KERNBASE)
801078e9: 8b 7d 10 mov 0x10(%ebp),%edi
801078ec: 85 ff test %edi,%edi
801078ee: 0f 88 8e 00 00 00 js 80107982 <allocuvm+0xa2>
if(newsz < oldsz)
801078f4: 3b 7d 0c cmp 0xc(%ebp),%edi
801078f7: 0f 82 93 00 00 00 jb 80107990 <allocuvm+0xb0>
a = PGROUNDUP(oldsz);
801078fd: 8b 45 0c mov 0xc(%ebp),%eax
80107900: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80107906: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; a < newsz; a += PGSIZE){
8010790c: 39 5d 10 cmp %ebx,0x10(%ebp)
8010790f: 0f 86 7e 00 00 00 jbe 80107993 <allocuvm+0xb3>
80107915: 89 7d e4 mov %edi,-0x1c(%ebp)
80107918: 8b 7d 08 mov 0x8(%ebp),%edi
8010791b: eb 42 jmp 8010795f <allocuvm+0x7f>
8010791d: 8d 76 00 lea 0x0(%esi),%esi
memset(mem, 0, PGSIZE);
80107920: 83 ec 04 sub $0x4,%esp
80107923: 68 00 10 00 00 push $0x1000
80107928: 6a 00 push $0x0
8010792a: 50 push %eax
8010792b: e8 b0 d8 ff ff call 801051e0 <memset>
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
80107930: 58 pop %eax
80107931: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax
80107937: b9 00 10 00 00 mov $0x1000,%ecx
8010793c: 5a pop %edx
8010793d: 6a 06 push $0x6
8010793f: 50 push %eax
80107940: 89 da mov %ebx,%edx
80107942: 89 f8 mov %edi,%eax
80107944: e8 67 fb ff ff call 801074b0 <mappages>
80107949: 83 c4 10 add $0x10,%esp
8010794c: 85 c0 test %eax,%eax
8010794e: 78 50 js 801079a0 <allocuvm+0xc0>
for(; a < newsz; a += PGSIZE){
80107950: 81 c3 00 10 00 00 add $0x1000,%ebx
80107956: 39 5d 10 cmp %ebx,0x10(%ebp)
80107959: 0f 86 81 00 00 00 jbe 801079e0 <allocuvm+0x100>
mem = kalloc();
8010795f: e8 cc ae ff ff call 80102830 <kalloc>
if(mem == 0){
80107964: 85 c0 test %eax,%eax
mem = kalloc();
80107966: 89 c6 mov %eax,%esi
if(mem == 0){
80107968: 75 b6 jne 80107920 <allocuvm+0x40>
cprintf("allocuvm out of memory\n");
8010796a: 83 ec 0c sub $0xc,%esp
8010796d: 68 6d 88 10 80 push $0x8010886d
80107972: e8 e9 8c ff ff call 80100660 <cprintf>
if(newsz >= oldsz)
80107977: 83 c4 10 add $0x10,%esp
8010797a: 8b 45 0c mov 0xc(%ebp),%eax
8010797d: 39 45 10 cmp %eax,0x10(%ebp)
80107980: 77 6e ja 801079f0 <allocuvm+0x110>
}
80107982: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80107985: 31 ff xor %edi,%edi
}
80107987: 89 f8 mov %edi,%eax
80107989: 5b pop %ebx
8010798a: 5e pop %esi
8010798b: 5f pop %edi
8010798c: 5d pop %ebp
8010798d: c3 ret
8010798e: 66 90 xchg %ax,%ax
return oldsz;
80107990: 8b 7d 0c mov 0xc(%ebp),%edi
}
80107993: 8d 65 f4 lea -0xc(%ebp),%esp
80107996: 89 f8 mov %edi,%eax
80107998: 5b pop %ebx
80107999: 5e pop %esi
8010799a: 5f pop %edi
8010799b: 5d pop %ebp
8010799c: c3 ret
8010799d: 8d 76 00 lea 0x0(%esi),%esi
cprintf("allocuvm out of memory (2)\n");
801079a0: 83 ec 0c sub $0xc,%esp
801079a3: 68 85 88 10 80 push $0x80108885
801079a8: e8 b3 8c ff ff call 80100660 <cprintf>
if(newsz >= oldsz)
801079ad: 83 c4 10 add $0x10,%esp
801079b0: 8b 45 0c mov 0xc(%ebp),%eax
801079b3: 39 45 10 cmp %eax,0x10(%ebp)
801079b6: 76 0d jbe 801079c5 <allocuvm+0xe5>
801079b8: 89 c1 mov %eax,%ecx
801079ba: 8b 55 10 mov 0x10(%ebp),%edx
801079bd: 8b 45 08 mov 0x8(%ebp),%eax
801079c0: e8 7b fb ff ff call 80107540 <deallocuvm.part.0>
kfree(mem);
801079c5: 83 ec 0c sub $0xc,%esp
return 0;
801079c8: 31 ff xor %edi,%edi
kfree(mem);
801079ca: 56 push %esi
801079cb: e8 b0 ac ff ff call 80102680 <kfree>
return 0;
801079d0: 83 c4 10 add $0x10,%esp
}
801079d3: 8d 65 f4 lea -0xc(%ebp),%esp
801079d6: 89 f8 mov %edi,%eax
801079d8: 5b pop %ebx
801079d9: 5e pop %esi
801079da: 5f pop %edi
801079db: 5d pop %ebp
801079dc: c3 ret
801079dd: 8d 76 00 lea 0x0(%esi),%esi
801079e0: 8b 7d e4 mov -0x1c(%ebp),%edi
801079e3: 8d 65 f4 lea -0xc(%ebp),%esp
801079e6: 5b pop %ebx
801079e7: 89 f8 mov %edi,%eax
801079e9: 5e pop %esi
801079ea: 5f pop %edi
801079eb: 5d pop %ebp
801079ec: c3 ret
801079ed: 8d 76 00 lea 0x0(%esi),%esi
801079f0: 89 c1 mov %eax,%ecx
801079f2: 8b 55 10 mov 0x10(%ebp),%edx
801079f5: 8b 45 08 mov 0x8(%ebp),%eax
return 0;
801079f8: 31 ff xor %edi,%edi
801079fa: e8 41 fb ff ff call 80107540 <deallocuvm.part.0>
801079ff: eb 92 jmp 80107993 <allocuvm+0xb3>
80107a01: eb 0d jmp 80107a10 <deallocuvm>
80107a03: 90 nop
80107a04: 90 nop
80107a05: 90 nop
80107a06: 90 nop
80107a07: 90 nop
80107a08: 90 nop
80107a09: 90 nop
80107a0a: 90 nop
80107a0b: 90 nop
80107a0c: 90 nop
80107a0d: 90 nop
80107a0e: 90 nop
80107a0f: 90 nop
80107a10 <deallocuvm>:
{
80107a10: 55 push %ebp
80107a11: 89 e5 mov %esp,%ebp
80107a13: 8b 55 0c mov 0xc(%ebp),%edx
80107a16: 8b 4d 10 mov 0x10(%ebp),%ecx
80107a19: 8b 45 08 mov 0x8(%ebp),%eax
if(newsz >= oldsz)
80107a1c: 39 d1 cmp %edx,%ecx
80107a1e: 73 10 jae 80107a30 <deallocuvm+0x20>
}
80107a20: 5d pop %ebp
80107a21: e9 1a fb ff ff jmp 80107540 <deallocuvm.part.0>
80107a26: 8d 76 00 lea 0x0(%esi),%esi
80107a29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107a30: 89 d0 mov %edx,%eax
80107a32: 5d pop %ebp
80107a33: c3 ret
80107a34: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80107a3a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80107a40 <freevm>:
// Free a page table and all the physical memory pages
// in the user part.
void
freevm(pde_t *pgdir)
{
80107a40: 55 push %ebp
80107a41: 89 e5 mov %esp,%ebp
80107a43: 57 push %edi
80107a44: 56 push %esi
80107a45: 53 push %ebx
80107a46: 83 ec 0c sub $0xc,%esp
80107a49: 8b 75 08 mov 0x8(%ebp),%esi
uint i;
if(pgdir == 0)
80107a4c: 85 f6 test %esi,%esi
80107a4e: 74 59 je 80107aa9 <freevm+0x69>
80107a50: 31 c9 xor %ecx,%ecx
80107a52: ba 00 00 00 80 mov $0x80000000,%edx
80107a57: 89 f0 mov %esi,%eax
80107a59: e8 e2 fa ff ff call 80107540 <deallocuvm.part.0>
80107a5e: 89 f3 mov %esi,%ebx
80107a60: 8d be 00 10 00 00 lea 0x1000(%esi),%edi
80107a66: eb 0f jmp 80107a77 <freevm+0x37>
80107a68: 90 nop
80107a69: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107a70: 83 c3 04 add $0x4,%ebx
panic("freevm: no pgdir");
deallocuvm(pgdir, KERNBASE, 0);
for(i = 0; i < NPDENTRIES; i++){
80107a73: 39 fb cmp %edi,%ebx
80107a75: 74 23 je 80107a9a <freevm+0x5a>
if(pgdir[i] & PTE_P){
80107a77: 8b 03 mov (%ebx),%eax
80107a79: a8 01 test $0x1,%al
80107a7b: 74 f3 je 80107a70 <freevm+0x30>
char * v = P2V(PTE_ADDR(pgdir[i]));
80107a7d: 25 00 f0 ff ff and $0xfffff000,%eax
kfree(v);
80107a82: 83 ec 0c sub $0xc,%esp
80107a85: 83 c3 04 add $0x4,%ebx
char * v = P2V(PTE_ADDR(pgdir[i]));
80107a88: 05 00 00 00 80 add $0x80000000,%eax
kfree(v);
80107a8d: 50 push %eax
80107a8e: e8 ed ab ff ff call 80102680 <kfree>
80107a93: 83 c4 10 add $0x10,%esp
for(i = 0; i < NPDENTRIES; i++){
80107a96: 39 fb cmp %edi,%ebx
80107a98: 75 dd jne 80107a77 <freevm+0x37>
}
}
kfree((char*)pgdir);
80107a9a: 89 75 08 mov %esi,0x8(%ebp)
}
80107a9d: 8d 65 f4 lea -0xc(%ebp),%esp
80107aa0: 5b pop %ebx
80107aa1: 5e pop %esi
80107aa2: 5f pop %edi
80107aa3: 5d pop %ebp
kfree((char*)pgdir);
80107aa4: e9 d7 ab ff ff jmp 80102680 <kfree>
panic("freevm: no pgdir");
80107aa9: 83 ec 0c sub $0xc,%esp
80107aac: 68 a1 88 10 80 push $0x801088a1
80107ab1: e8 da 88 ff ff call 80100390 <panic>
80107ab6: 8d 76 00 lea 0x0(%esi),%esi
80107ab9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107ac0 <setupkvm>:
{
80107ac0: 55 push %ebp
80107ac1: 89 e5 mov %esp,%ebp
80107ac3: 56 push %esi
80107ac4: 53 push %ebx
if((pgdir = (pde_t*)kalloc()) == 0)
80107ac5: e8 66 ad ff ff call 80102830 <kalloc>
80107aca: 85 c0 test %eax,%eax
80107acc: 89 c6 mov %eax,%esi
80107ace: 74 42 je 80107b12 <setupkvm+0x52>
memset(pgdir, 0, PGSIZE);
80107ad0: 83 ec 04 sub $0x4,%esp
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
80107ad3: bb 20 b4 10 80 mov $0x8010b420,%ebx
memset(pgdir, 0, PGSIZE);
80107ad8: 68 00 10 00 00 push $0x1000
80107add: 6a 00 push $0x0
80107adf: 50 push %eax
80107ae0: e8 fb d6 ff ff call 801051e0 <memset>
80107ae5: 83 c4 10 add $0x10,%esp
(uint)k->phys_start, k->perm) < 0) {
80107ae8: 8b 43 04 mov 0x4(%ebx),%eax
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
80107aeb: 8b 4b 08 mov 0x8(%ebx),%ecx
80107aee: 83 ec 08 sub $0x8,%esp
80107af1: 8b 13 mov (%ebx),%edx
80107af3: ff 73 0c pushl 0xc(%ebx)
80107af6: 50 push %eax
80107af7: 29 c1 sub %eax,%ecx
80107af9: 89 f0 mov %esi,%eax
80107afb: e8 b0 f9 ff ff call 801074b0 <mappages>
80107b00: 83 c4 10 add $0x10,%esp
80107b03: 85 c0 test %eax,%eax
80107b05: 78 19 js 80107b20 <setupkvm+0x60>
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
80107b07: 83 c3 10 add $0x10,%ebx
80107b0a: 81 fb 60 b4 10 80 cmp $0x8010b460,%ebx
80107b10: 75 d6 jne 80107ae8 <setupkvm+0x28>
}
80107b12: 8d 65 f8 lea -0x8(%ebp),%esp
80107b15: 89 f0 mov %esi,%eax
80107b17: 5b pop %ebx
80107b18: 5e pop %esi
80107b19: 5d pop %ebp
80107b1a: c3 ret
80107b1b: 90 nop
80107b1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
freevm(pgdir);
80107b20: 83 ec 0c sub $0xc,%esp
80107b23: 56 push %esi
return 0;
80107b24: 31 f6 xor %esi,%esi
freevm(pgdir);
80107b26: e8 15 ff ff ff call 80107a40 <freevm>
return 0;
80107b2b: 83 c4 10 add $0x10,%esp
}
80107b2e: 8d 65 f8 lea -0x8(%ebp),%esp
80107b31: 89 f0 mov %esi,%eax
80107b33: 5b pop %ebx
80107b34: 5e pop %esi
80107b35: 5d pop %ebp
80107b36: c3 ret
80107b37: 89 f6 mov %esi,%esi
80107b39: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107b40 <kvmalloc>:
{
80107b40: 55 push %ebp
80107b41: 89 e5 mov %esp,%ebp
80107b43: 83 ec 08 sub $0x8,%esp
kpgdir = setupkvm();
80107b46: e8 75 ff ff ff call 80107ac0 <setupkvm>
80107b4b: a3 84 6d 11 80 mov %eax,0x80116d84
lcr3(V2P(kpgdir)); // switch to the kernel page table
80107b50: 05 00 00 00 80 add $0x80000000,%eax
80107b55: 0f 22 d8 mov %eax,%cr3
}
80107b58: c9 leave
80107b59: c3 ret
80107b5a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80107b60 <clearpteu>:
// Clear PTE_U on a page. Used to create an inaccessible
// page beneath the user stack.
void
clearpteu(pde_t *pgdir, char *uva)
{
80107b60: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107b61: 31 c9 xor %ecx,%ecx
{
80107b63: 89 e5 mov %esp,%ebp
80107b65: 83 ec 08 sub $0x8,%esp
pte = walkpgdir(pgdir, uva, 0);
80107b68: 8b 55 0c mov 0xc(%ebp),%edx
80107b6b: 8b 45 08 mov 0x8(%ebp),%eax
80107b6e: e8 bd f8 ff ff call 80107430 <walkpgdir>
if(pte == 0)
80107b73: 85 c0 test %eax,%eax
80107b75: 74 05 je 80107b7c <clearpteu+0x1c>
panic("clearpteu");
*pte &= ~PTE_U;
80107b77: 83 20 fb andl $0xfffffffb,(%eax)
}
80107b7a: c9 leave
80107b7b: c3 ret
panic("clearpteu");
80107b7c: 83 ec 0c sub $0xc,%esp
80107b7f: 68 b2 88 10 80 push $0x801088b2
80107b84: e8 07 88 ff ff call 80100390 <panic>
80107b89: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107b90 <copyuvm>:
// Given a parent process's page table, create a copy
// of it for a child.
pde_t*
copyuvm(pde_t *pgdir, uint sz)
{
80107b90: 55 push %ebp
80107b91: 89 e5 mov %esp,%ebp
80107b93: 57 push %edi
80107b94: 56 push %esi
80107b95: 53 push %ebx
80107b96: 83 ec 1c sub $0x1c,%esp
pde_t *d;
pte_t *pte;
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
80107b99: e8 22 ff ff ff call 80107ac0 <setupkvm>
80107b9e: 85 c0 test %eax,%eax
80107ba0: 89 45 e0 mov %eax,-0x20(%ebp)
80107ba3: 0f 84 9f 00 00 00 je 80107c48 <copyuvm+0xb8>
return 0;
for(i = 0; i < sz; i += PGSIZE){
80107ba9: 8b 4d 0c mov 0xc(%ebp),%ecx
80107bac: 85 c9 test %ecx,%ecx
80107bae: 0f 84 94 00 00 00 je 80107c48 <copyuvm+0xb8>
80107bb4: 31 ff xor %edi,%edi
80107bb6: eb 4a jmp 80107c02 <copyuvm+0x72>
80107bb8: 90 nop
80107bb9: 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);
80107bc0: 83 ec 04 sub $0x4,%esp
80107bc3: 81 c3 00 00 00 80 add $0x80000000,%ebx
80107bc9: 68 00 10 00 00 push $0x1000
80107bce: 53 push %ebx
80107bcf: 50 push %eax
80107bd0: e8 bb d6 ff ff call 80105290 <memmove>
if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) {
80107bd5: 58 pop %eax
80107bd6: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax
80107bdc: b9 00 10 00 00 mov $0x1000,%ecx
80107be1: 5a pop %edx
80107be2: ff 75 e4 pushl -0x1c(%ebp)
80107be5: 50 push %eax
80107be6: 89 fa mov %edi,%edx
80107be8: 8b 45 e0 mov -0x20(%ebp),%eax
80107beb: e8 c0 f8 ff ff call 801074b0 <mappages>
80107bf0: 83 c4 10 add $0x10,%esp
80107bf3: 85 c0 test %eax,%eax
80107bf5: 78 61 js 80107c58 <copyuvm+0xc8>
for(i = 0; i < sz; i += PGSIZE){
80107bf7: 81 c7 00 10 00 00 add $0x1000,%edi
80107bfd: 39 7d 0c cmp %edi,0xc(%ebp)
80107c00: 76 46 jbe 80107c48 <copyuvm+0xb8>
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
80107c02: 8b 45 08 mov 0x8(%ebp),%eax
80107c05: 31 c9 xor %ecx,%ecx
80107c07: 89 fa mov %edi,%edx
80107c09: e8 22 f8 ff ff call 80107430 <walkpgdir>
80107c0e: 85 c0 test %eax,%eax
80107c10: 74 61 je 80107c73 <copyuvm+0xe3>
if(!(*pte & PTE_P))
80107c12: 8b 00 mov (%eax),%eax
80107c14: a8 01 test $0x1,%al
80107c16: 74 4e je 80107c66 <copyuvm+0xd6>
pa = PTE_ADDR(*pte);
80107c18: 89 c3 mov %eax,%ebx
flags = PTE_FLAGS(*pte);
80107c1a: 25 ff 0f 00 00 and $0xfff,%eax
pa = PTE_ADDR(*pte);
80107c1f: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
flags = PTE_FLAGS(*pte);
80107c25: 89 45 e4 mov %eax,-0x1c(%ebp)
if((mem = kalloc()) == 0)
80107c28: e8 03 ac ff ff call 80102830 <kalloc>
80107c2d: 85 c0 test %eax,%eax
80107c2f: 89 c6 mov %eax,%esi
80107c31: 75 8d jne 80107bc0 <copyuvm+0x30>
}
}
return d;
bad:
freevm(d);
80107c33: 83 ec 0c sub $0xc,%esp
80107c36: ff 75 e0 pushl -0x20(%ebp)
80107c39: e8 02 fe ff ff call 80107a40 <freevm>
return 0;
80107c3e: 83 c4 10 add $0x10,%esp
80107c41: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
}
80107c48: 8b 45 e0 mov -0x20(%ebp),%eax
80107c4b: 8d 65 f4 lea -0xc(%ebp),%esp
80107c4e: 5b pop %ebx
80107c4f: 5e pop %esi
80107c50: 5f pop %edi
80107c51: 5d pop %ebp
80107c52: c3 ret
80107c53: 90 nop
80107c54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
kfree(mem);
80107c58: 83 ec 0c sub $0xc,%esp
80107c5b: 56 push %esi
80107c5c: e8 1f aa ff ff call 80102680 <kfree>
goto bad;
80107c61: 83 c4 10 add $0x10,%esp
80107c64: eb cd jmp 80107c33 <copyuvm+0xa3>
panic("copyuvm: page not present");
80107c66: 83 ec 0c sub $0xc,%esp
80107c69: 68 d6 88 10 80 push $0x801088d6
80107c6e: e8 1d 87 ff ff call 80100390 <panic>
panic("copyuvm: pte should exist");
80107c73: 83 ec 0c sub $0xc,%esp
80107c76: 68 bc 88 10 80 push $0x801088bc
80107c7b: e8 10 87 ff ff call 80100390 <panic>
80107c80 <uva2ka>:
//PAGEBREAK!
// Map user virtual address to kernel address.
char*
uva2ka(pde_t *pgdir, char *uva)
{
80107c80: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107c81: 31 c9 xor %ecx,%ecx
{
80107c83: 89 e5 mov %esp,%ebp
80107c85: 83 ec 08 sub $0x8,%esp
pte = walkpgdir(pgdir, uva, 0);
80107c88: 8b 55 0c mov 0xc(%ebp),%edx
80107c8b: 8b 45 08 mov 0x8(%ebp),%eax
80107c8e: e8 9d f7 ff ff call 80107430 <walkpgdir>
if((*pte & PTE_P) == 0)
80107c93: 8b 00 mov (%eax),%eax
return 0;
if((*pte & PTE_U) == 0)
return 0;
return (char*)P2V(PTE_ADDR(*pte));
}
80107c95: c9 leave
if((*pte & PTE_U) == 0)
80107c96: 89 c2 mov %eax,%edx
return (char*)P2V(PTE_ADDR(*pte));
80107c98: 25 00 f0 ff ff and $0xfffff000,%eax
if((*pte & PTE_U) == 0)
80107c9d: 83 e2 05 and $0x5,%edx
return (char*)P2V(PTE_ADDR(*pte));
80107ca0: 05 00 00 00 80 add $0x80000000,%eax
80107ca5: 83 fa 05 cmp $0x5,%edx
80107ca8: ba 00 00 00 00 mov $0x0,%edx
80107cad: 0f 45 c2 cmovne %edx,%eax
}
80107cb0: c3 ret
80107cb1: eb 0d jmp 80107cc0 <copyout>
80107cb3: 90 nop
80107cb4: 90 nop
80107cb5: 90 nop
80107cb6: 90 nop
80107cb7: 90 nop
80107cb8: 90 nop
80107cb9: 90 nop
80107cba: 90 nop
80107cbb: 90 nop
80107cbc: 90 nop
80107cbd: 90 nop
80107cbe: 90 nop
80107cbf: 90 nop
80107cc0 <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)
{
80107cc0: 55 push %ebp
80107cc1: 89 e5 mov %esp,%ebp
80107cc3: 57 push %edi
80107cc4: 56 push %esi
80107cc5: 53 push %ebx
80107cc6: 83 ec 1c sub $0x1c,%esp
80107cc9: 8b 5d 14 mov 0x14(%ebp),%ebx
80107ccc: 8b 55 0c mov 0xc(%ebp),%edx
80107ccf: 8b 7d 10 mov 0x10(%ebp),%edi
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
80107cd2: 85 db test %ebx,%ebx
80107cd4: 75 40 jne 80107d16 <copyout+0x56>
80107cd6: eb 70 jmp 80107d48 <copyout+0x88>
80107cd8: 90 nop
80107cd9: 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);
80107ce0: 8b 55 e4 mov -0x1c(%ebp),%edx
80107ce3: 89 f1 mov %esi,%ecx
80107ce5: 29 d1 sub %edx,%ecx
80107ce7: 81 c1 00 10 00 00 add $0x1000,%ecx
80107ced: 39 d9 cmp %ebx,%ecx
80107cef: 0f 47 cb cmova %ebx,%ecx
if(n > len)
n = len;
memmove(pa0 + (va - va0), buf, n);
80107cf2: 29 f2 sub %esi,%edx
80107cf4: 83 ec 04 sub $0x4,%esp
80107cf7: 01 d0 add %edx,%eax
80107cf9: 51 push %ecx
80107cfa: 57 push %edi
80107cfb: 50 push %eax
80107cfc: 89 4d e4 mov %ecx,-0x1c(%ebp)
80107cff: e8 8c d5 ff ff call 80105290 <memmove>
len -= n;
buf += n;
80107d04: 8b 4d e4 mov -0x1c(%ebp),%ecx
while(len > 0){
80107d07: 83 c4 10 add $0x10,%esp
va = va0 + PGSIZE;
80107d0a: 8d 96 00 10 00 00 lea 0x1000(%esi),%edx
buf += n;
80107d10: 01 cf add %ecx,%edi
while(len > 0){
80107d12: 29 cb sub %ecx,%ebx
80107d14: 74 32 je 80107d48 <copyout+0x88>
va0 = (uint)PGROUNDDOWN(va);
80107d16: 89 d6 mov %edx,%esi
pa0 = uva2ka(pgdir, (char*)va0);
80107d18: 83 ec 08 sub $0x8,%esp
va0 = (uint)PGROUNDDOWN(va);
80107d1b: 89 55 e4 mov %edx,-0x1c(%ebp)
80107d1e: 81 e6 00 f0 ff ff and $0xfffff000,%esi
pa0 = uva2ka(pgdir, (char*)va0);
80107d24: 56 push %esi
80107d25: ff 75 08 pushl 0x8(%ebp)
80107d28: e8 53 ff ff ff call 80107c80 <uva2ka>
if(pa0 == 0)
80107d2d: 83 c4 10 add $0x10,%esp
80107d30: 85 c0 test %eax,%eax
80107d32: 75 ac jne 80107ce0 <copyout+0x20>
}
return 0;
}
80107d34: 8d 65 f4 lea -0xc(%ebp),%esp
return -1;
80107d37: b8 ff ff ff ff mov $0xffffffff,%eax
}
80107d3c: 5b pop %ebx
80107d3d: 5e pop %esi
80107d3e: 5f pop %edi
80107d3f: 5d pop %ebp
80107d40: c3 ret
80107d41: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107d48: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
80107d4b: 31 c0 xor %eax,%eax
}
80107d4d: 5b pop %ebx
80107d4e: 5e pop %esi
80107d4f: 5f pop %edi
80107d50: 5d pop %ebp
80107d51: c3 ret
| 40.839567 | 96 | 0.518882 |
d8ae902fd67c0d85b00de36d39f334c267ebe2fe | 219 | asm | Assembly | libsrc/target/adam/cpm_platform_init.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/target/adam/cpm_platform_init.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/target/adam/cpm_platform_init.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ; ADAM Platform initialisation code
;
SECTION code_clib
PUBLIC cpm_platform_init
cpm_platform_init:
; Initialise the NMI handler - catches the VDP interrupt
ld hl,0x45ed
ld (0x66),hl
ret
| 18.25 | 57 | 0.694064 |
2f95cfb99f2d3c4da7be2069c3d2cbce24bd0b79 | 614 | asm | Assembly | oeis/152/A152418.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/152/A152418.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/152/A152418.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A152418: A sevens sequence: a(n)=(7^n - 1)/(2^(4 - 3*Mod[n, 2])).
; 0,3,3,171,150,8403,7353,411771,360300,20176803,17654703,988663371,865080450,48444505203,42388942053,2373780754971,2077058160600,116315256993603,101775849869403,5699447592686571,4987016643600750,279272932041642003,244363815536436753,13684373670040458171,11973826961285400900,670534309831982450403,586717521102984644103,32856181181767140069771,28749158534046247561050,1609952877906589863418803,1408708768168266130491453,78887691017422903307521371,69026729640245040394081200
seq $0,23000 ; a(n) = (7^n - 1)/6.
mul $0,2
dif $0,8
div $0,2
mul $0,3
| 68.222222 | 473 | 0.82899 |
30587aff136d42b7a5c0094ca9e741fb526ac1ad | 58 | asm | Assembly | lab06_skel_v2/task4.asm | andreeanec10/Calculatoare-Numerice-2 | 86f0386cdeaafbcc66f22b9c215f1a8c5c10fcfe | [
"MIT"
] | null | null | null | lab06_skel_v2/task4.asm | andreeanec10/Calculatoare-Numerice-2 | 86f0386cdeaafbcc66f22b9c215f1a8c5c10fcfe | [
"MIT"
] | null | null | null | lab06_skel_v2/task4.asm | andreeanec10/Calculatoare-Numerice-2 | 86f0386cdeaafbcc66f22b9c215f1a8c5c10fcfe | [
"MIT"
] | null | null | null | ldi r20, 255
out 0x01, r20
ldi r19, 101
out 0x02, r19
| 11.6 | 14 | 0.655172 |
dadbdb9d5e64947f2d2fa323f68be0addd5eb57e | 1,018 | asm | Assembly | programs/oeis/062/A062114.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/062/A062114.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/062/A062114.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A062114: a(n) = 2*Fibonacci(n) - (1 - (-1)^n)/2.
; 0,1,2,3,6,9,16,25,42,67,110,177,288,465,754,1219,1974,3193,5168,8361,13530,21891,35422,57313,92736,150049,242786,392835,635622,1028457,1664080,2692537,4356618,7049155,11405774,18454929,29860704,48315633,78176338,126491971,204668310,331160281,535828592,866988873,1402817466,2269806339,3672623806,5942430145,9615053952,15557484097,25172538050,40730022147,65902560198,106632582345,172535142544,279167724889,451702867434,730870592323,1182573459758,1913444052081,3096017511840,5009461563921,8105479075762,13114940639683,21220419715446,34335360355129,55555780070576,89891140425705,145446920496282,235338060921987,380784981418270,616123042340257,996908023758528,1613031066098785,2609939089857314,4222970155956099,6832909245813414
mov $2,$0
mov $3,$0
add $3,1
lpb $3,1
mov $0,$2
sub $3,1
sub $0,$3
sub $0,3
cal $0,127968 ; a(n) = F(n+1) + (1-(-1)^n)/2, where F() = Fibonacci numbers A000045.
mov $4,$0
sub $4,1
mul $4,2
add $4,1
add $1,$4
lpe
sub $1,1
| 50.9 | 724 | 0.777014 |
30c7d7d845262def15671eac8e490c49c70a03c1 | 3,714 | asm | Assembly | bootloader/bootloader.asm | paulscottrobson/flat | 976644db7f52f04dae50dce43504ede9e97f695e | [
"MIT"
] | null | null | null | bootloader/bootloader.asm | paulscottrobson/flat | 976644db7f52f04dae50dce43504ede9e97f695e | [
"MIT"
] | null | null | null | bootloader/bootloader.asm | paulscottrobson/flat | 976644db7f52f04dae50dce43504ede9e97f695e | [
"MIT"
] | null | null | null | ; ***************************************************************************************
; ***************************************************************************************
;
; Name : bootloader.asm
; Author : Paul Robson (paul@robsons.org.uk)
; Date : 12th March 2019
; Purpose : Boot-Loads code by loading "boot.img" into memory
; from $8000-$BFFF then banks 32-94 (2 per page) into $C000-$FFFF
;
; ***************************************************************************************
; ***************************************************************************************
FirstPage = 32 ; these are the pages for an
LastPage = 95 ; unexpanded ZXNext.
org $4000-27
db $3F
dw 0,0,0,0,0,0,0,0,0,0,0
org $4000-4
dw $5AFE
db 1
db 7
org $5AFE
dw $7F00
org $7F00
Start: ld sp,Start-1 ; set up the stack.
;db $DD,$01
ld ix,ImageName ; read the image into memory
call ReadNextMemory
jp $8000 ; run.
; ***************************************************************************************
;
; Access the default drive
;
; ***************************************************************************************
FindDefaultDrive:
xor a
rst $08 ; set the default drive.
db $89
ld (DefaultDrive),a
ret
; ***************************************************************************************
;
; Read ZXNext memory from $8000-$BFFF then pages from $C000-$FFFF
;
; ***************************************************************************************
ReadNextMemory:
call FindDefaultDrive ; get default drive
call OpenFileRead ; open for reading
ld ix,$8000 ; read in 8000-BFFF
call Read16kBlock
ld b,FirstPage ; current page
__ReadBlockLoop:
call SetPaging ; access the pages
ld ix,$C000 ; read in C000-FFFF
call Read16kBlock ; read it in
inc b ; there are two 8k blocks
inc b ; per page
ld a,b
cp LastPage+1 ; until read in pages 32-95
jr nz,__ReadBlockLoop
call CloseFile ; close file.
ret
; ***************************************************************************************
;
; Map $C000-$FFFF onto blocks b and b+1
;
; ***************************************************************************************
SetPaging:
ld a,b ; set $56
db $ED,$92,$56
inc a ; set $57
db $ED,$92,$57
ret
; ***************************************************************************************
;
; Open file read
;
; ***************************************************************************************
OpenFileRead:
push af
push bc
push ix
ld b,1
__OpenFile:
ld a,(DefaultDrive)
rst $08
db $9A
ld (FileHandle),a
pop ix
pop bc
pop af
ret
; ***************************************************************************************
;
; Read 16k block
;
; ***************************************************************************************
Read16kBlock:
push af
push bc
push ix
ld a,(FileHandle)
ld bc,$4000
rst $08
db $9D
pop ix
pop bc
pop af
ret
; ***************************************************************************************
;
; Close open file
;
; ***************************************************************************************
CloseFile:
push af
ld a,(FileHandle)
rst $08
db $9B
pop af
ret
DefaultDrive:
db 0
FileHandle:
db 0
org $7FF0
ImageName:
db "boot.img",0
org $FFFF
db 0
| 24.596026 | 89 | 0.336295 |
ac1f0600a1fad43678dd4e33d0d3e4431ebbb569 | 21,092 | nasm | Assembly | picoCTF_2018/assembly-4/comp.nasm | GambuzX/Cybersecurity_Practice | 58ecc222816a1bda2742da9b2782cef25365692f | [
"MIT"
] | 1 | 2020-03-08T19:17:15.000Z | 2020-03-08T19:17:15.000Z | picoCTF_2018/assembly-4/comp.nasm | GambuzX/CTF_Practice | 58ecc222816a1bda2742da9b2782cef25365692f | [
"MIT"
] | null | null | null | picoCTF_2018/assembly-4/comp.nasm | GambuzX/CTF_Practice | 58ecc222816a1bda2742da9b2782cef25365692f | [
"MIT"
] | 1 | 2020-12-17T15:51:02.000Z | 2020-12-17T15:51:02.000Z |
global rrf0
global rrf1
global rrf2
global rrf3
global rrf4
global rrf5
global rrf6
global rrf7
global rrf8
global rrf9
global rrfcl
global rrfscl
global rrflt
global rrfeq
global rrfgt
global rrfqm
global rrfat
global rrfA
global rrfB
global rrfC
global rrfD
global rrfE
global rrfF
global rrfG
global rrfH
global rrfI
global rrfJ
global rrfK
global rrfL
global rrfM
global rrfN
global rrfO
global rrfP
global rrfQ
global rrfR
global rrfS
global rrfT
global rrfU
global rrfV
global rrfW
global rrfX
global rrfY
global rrfZ
global rrflb
global rrfbs
global rrfrb
global rrfct
global rrfus
global rrftl
global rrfa
global rrfb
global rrfc
global rrfd
global rrfe
global rrff
global rrfg
global rrfh
global rrfi
global rrfj
global rrfk
global rrfl
global rrfm
global rrfn
global rrfo
global rrfp
global rrfq
global rrfr
global rrfs
global rrft
global rrfu
global rrfv
global rrfw
global rrfx
global rrfy
global rrfz
global rrflcb
global rrfst
global rrfrcb
global rrf00
global add
global sub
global xor
global main
extern write
SECTION .text
rrf0:
mov eax, 48
ret
rrf1:
mov eax, 49
ret
rrf2:
mov eax, 50
ret
rrf3:
mov eax, 51
ret
rrf4:
mov eax, 52
ret
rrf5:
mov eax, 53
ret
rrf6:
mov eax, 54
ret
rrf7:
mov eax, 55
ret
rrf8:
mov eax, 56
ret
rrf9:
mov eax, 57
ret
rrfcl:
mov eax, 58
ret
rrfscl:
mov eax, 59
ret
rrflt:
mov eax, 60
ret
rrfeq:
mov eax, 61
ret
rrfgt:
mov eax, 62
ret
rrfqm:
mov eax, 63
ret
rrfat:
mov eax, 64
ret
rrfA:
mov eax, 65
ret
rrfB:
mov eax, 66
ret
rrfC:
mov eax, 67
ret
rrfD:
mov eax, 68
ret
rrfE:
mov eax, 69
ret
rrfF:
mov eax, 70
ret
rrfG:
mov eax, 71
ret
rrfH:
mov eax, 72
ret
rrfI:
mov eax, 73
ret
rrfJ:
mov eax, 74
ret
rrfK:
mov eax, 75
ret
rrfL:
mov eax, 76
ret
rrfM:
mov eax, 77
ret
rrfN:
mov eax, 78
ret
rrfO:
mov eax, 79
ret
rrfP:
mov eax, 80
ret
rrfQ:
mov eax, 81
ret
rrfR:
mov eax, 82
ret
rrfS:
mov eax, 83
ret
rrfT:
mov eax, 84
ret
rrfU:
mov eax, 85
ret
rrfV:
mov eax, 86
ret
rrfW:
mov eax, 87
ret
rrfX:
mov eax, 88
ret
rrfY:
mov eax, 89
ret
rrfZ:
mov eax, 90
ret
rrflb:
mov eax, 91
ret
rrfbs:
mov eax, 92
ret
rrfrb:
mov eax, 93
ret
rrfct:
mov eax, 94
ret
rrfus:
mov eax, 95
ret
rrftl:
mov eax, 96
ret
rrfa:
mov eax, 97
ret
rrfb:
mov eax, 98
ret
rrfc:
mov eax, 99
ret
rrfd:
mov eax, 100
ret
rrfe:
mov eax, 101
ret
rrff:
mov eax, 102
ret
rrfg:
mov eax, 103
ret
rrfh:
mov eax, 104
ret
rrfi:
mov eax, 105
ret
rrfj:
mov eax, 106
ret
rrfk:
mov eax, 107
ret
rrfl:
mov eax, 108
ret
rrfm:
mov eax, 109
ret
rrfn:
mov eax, 110
ret
rrfo:
mov eax, 111
ret
rrfp:
mov eax, 112
ret
rrfq:
mov eax, 113
ret
rrfr:
mov eax, 114
ret
rrfs:
mov eax, 115
ret
rrft:
mov eax, 116
ret
rrfu:
mov eax, 117
ret
rrfv:
mov eax, 118
ret
rrfw:
mov eax, 119
ret
rrfx:
mov eax, 120
ret
rrfy:
mov eax, 121
ret
rrfz:
mov eax, 122
ret
rrflcb:
mov eax, 123
ret
rrfst:
mov eax, 124
ret
rrfrcb:
mov eax, 125
ret
rrf00:
mov eax, 0
ret
add:
movsx ecx, byte [esp+4H]
sub ecx, 48
add ecx, dword [esp+8H]
mov edx, 3524075731
mov eax, ecx
imul edx
add edx, ecx
sar edx, 6
mov eax, ecx
sar eax, 31
sub edx, eax
imul edx, edx, 78
sub ecx, edx
lea eax, [ecx+30H]
ret
sub:
movsx ecx, byte [esp+4H]
sub ecx, 48
sub ecx, dword [esp+8H]
mov edx, 3524075731
mov eax, ecx
imul edx
add edx, ecx
sar edx, 6
mov eax, ecx
sar eax, 31
sub edx, eax
imul edx, edx, 78
sub ecx, edx
mov edx, ecx
lea ecx, [ecx+7EH]
lea eax, [edx+30H]
test edx, edx
cmovs eax, ecx
ret
xor:
movsx ecx, byte [esp+4H]
sub ecx, 48
mov eax, dword [esp+8H]
and eax, 07H
xor ecx, eax
mov edx, 3524075731
mov eax, ecx
imul edx
add edx, ecx
sar edx, 6
mov eax, ecx
sar eax, 31
sub edx, eax
imul edx, edx, 78
sub ecx, edx
lea eax, [ecx+30H]
ret
main:
lea ecx, [esp+4H]
and esp, 0FFFFFFF0H
push dword [ecx-4H]
push ebp
mov ebp, esp
push esi
push ebx
push ecx
sub esp, 60
push 39
push 49
call sub
add esp, 8
movsx ecx, al
sub ecx, 24
mov ebx, 3524075731
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-44H], cl
push 56
push 83
call sub
add esp, 8
mov byte [ebp-42H], al
push 19
push 90
call sub
add esp, 8
push 43
movsx ecx, al
sub ecx, 48
xor ecx, 07H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
lea eax, [ecx+30H]
movsx eax, al
push eax
call sub
add esp, 8
mov byte [ebp-40H], al
push 33
push 89
call sub
add esp, 8
push 23
movsx eax, al
push eax
call sub
add esp, 8
mov byte [ebp-3EH], al
mov byte [ebp-3CH], 67
push 25
push 109
call sub
add esp, 8
mov byte [ebp-3AH], al
push 19
push 104
call sub
add esp, 8
push 21
movsx eax, al
push eax
call sub
add esp, 8
movsx ecx, al
sub ecx, 48
xor ecx, 06H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-38H], cl
push 25
push 102
call sub
add esp, 8
push 55
movsx eax, al
lea ecx, [eax-19H]
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
mov eax, ecx
add eax, 48
movsx eax, al
push eax
call sub
add esp, 8
mov byte [ebp-36H], al
mov byte [ebp-34H], 49
push 38
push 80
call sub
add esp, 8
push 30
movsx ecx, al
sub ecx, 48
xor ecx, 05H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
lea eax, [ecx+30H]
movsx eax, al
push eax
call sub
add esp, 8
mov byte [ebp-32H], al
push 53
push 78
call sub
add esp, 8
push 54
movsx eax, al
push eax
call sub
add esp, 8
movsx ecx, al
add ecx, 7
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-30H], cl
push 24
push 109
call sub
add esp, 8
push 34
movsx ecx, al
sub ecx, 48
xor ecx, 07H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
lea eax, [ecx+30H]
movsx eax, al
push eax
call sub
add esp, 8
mov byte [ebp-2EH], al
push 33
push 115
call sub
add esp, 8
push 48
movsx eax, al
push eax
call sub
add esp, 8
mov byte [ebp-2CH], al
push 29
push 105
call sub
add esp, 8
movsx ecx, al
add ecx, 5
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-2AH], cl
push 46
push 112
call sub
add esp, 8
movsx ecx, al
sub ecx, 21
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
movsx ecx, cl
sub ecx, 48
xor ecx, 02H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-28H], cl
push 49
push 93
call sub
add esp, 8
movsx ecx, al
sub ecx, 48
xor ecx, 03H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-26H], cl
push 32
push 60
call sub
add esp, 8
movsx ecx, al
sub ecx, 25
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
movsx ecx, cl
sub ecx, 48
xor ecx, 03H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-24H], cl
push 54
push 95
call sub
add esp, 8
movsx ecx, al
add ecx, 5
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
movsx ecx, cl
sub ecx, 25
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-22H], cl
push 46
push 115
call sub
add esp, 8
push 52
movsx eax, al
push eax
call sub
add esp, 8
mov byte [ebp-20H], al
mov byte [ebp-1EH], 99
push 18
push 113
call sub
add esp, 8
push 47
movsx eax, al
push eax
call sub
add esp, 8
mov byte [ebp-1CH], al
push 54
push 98
call sub
add esp, 8
movsx ecx, al
sub ecx, 23
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
movsx ecx, cl
sub ecx, 8
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-1AH], cl
push 48
push 110
call sub
add esp, 8
push 53
movsx eax, al
push eax
call sub
add esp, 8
movsx ecx, al
sub ecx, 48
xor ecx, 07H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-43H], cl
push 32
push 108
call sub
add esp, 8
push 48
movsx eax, al
push eax
call sub
add esp, 8
movsx ecx, al
sub ecx, 27
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-41H], cl
push 49
push 79
call sub
add esp, 8
mov byte [ebp-3FH], al
push 50
push 90
call sub
add esp, 8
push 31
movsx eax, al
push eax
call sub
add esp, 8
push 36
movsx eax, al
push eax
call sub
add esp, 8
mov byte [ebp-3DH], al
mov byte [ebp-3BH], 100
mov byte [ebp-39H], 95
mov byte [ebp-37H], 116
push 34
push 112
call sub
add esp, 8
movsx ecx, al
sub ecx, 48
xor ecx, 06H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-35H], cl
push 20
push 122
call sub
add esp, 8
push 53
movsx eax, al
push eax
call sub
add esp, 8
mov byte [ebp-33H], al
mov byte [ebp-31H], 53
mov byte [ebp-2FH], 95
push 19
push 76
call sub
add esp, 8
mov byte [ebp-2DH], al
push 35
push 85
call sub
add esp, 8
movsx ecx, al
sub ecx, 48
xor ecx, 06H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-2BH], cl
push 24
push 60
call sub
add esp, 8
movsx ecx, al
sub ecx, 30
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
movsx ecx, cl
sub ecx, 48
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-29H], cl
mov byte [ebp-27H], 57
mov byte [ebp-25H], 56
mov byte [ebp-23H], 54
push 53
push 106
call sub
add esp, 8
movsx ecx, al
sub ecx, 48
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
movsx ecx, cl
sub ecx, 48
xor ecx, 06H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-21H], cl
push 19
push 87
call sub
add esp, 8
push 46
movsx eax, al
lea ecx, [eax-0FH]
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
mov eax, ecx
add eax, 48
movsx eax, al
push eax
call sub
add esp, 8
mov byte [ebp-1FH], al
mov byte [ebp-1DH], 57
mov byte [ebp-1BH], 51
push 28
push 77
call sub
add esp, 8
movsx ecx, al
sub ecx, 48
xor ecx, 02H
mov eax, ecx
imul ebx
lea eax, [edx+ecx]
sar eax, 6
mov edx, ecx
sar edx, 31
sub eax, edx
imul eax, eax, 78
sub ecx, eax
add ecx, 48
mov byte [ebp-19H], cl
lea ebx, [ebp-44H]
lea esi, [ebp-18H]
L_001: sub esp, 4
push 1
push ebx
push 1
call write
add ebx, 2
add esp, 16
cmp esi, ebx
jnz L_001
lea ebx, [ebp-43H]
lea esi, [ebp-17H]
L_002: sub esp, 4
push 1
push ebx
push 1
call write
add ebx, 2
add esp, 16
cmp esi, ebx
jnz L_002
mov eax, 0
lea esp, [ebp-0CH]
pop ecx
pop ebx
pop esi
pop ebp
lea esp, [ecx-4H]
ret
| 17.889737 | 35 | 0.384222 |
157f6f26497448e6a02f57d07da2114f33111dea | 247 | asm | Assembly | programs/oeis/168/A168399.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/168/A168399.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/168/A168399.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A168399: a(n) = 3^n mod 13.
; 1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9,1,3,9
mod $0,3
mov $1,3
pow $1,$0
| 35.285714 | 187 | 0.502024 |
7afaf74584f1d92157df1e75b103eded27df9ff4 | 607 | asm | Assembly | programs/oeis/022/A022270.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/022/A022270.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/022/A022270.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A022270: a(n) = n*(13*n - 1)/2.
; 0,6,25,57,102,160,231,315,412,522,645,781,930,1092,1267,1455,1656,1870,2097,2337,2590,2856,3135,3427,3732,4050,4381,4725,5082,5452,5835,6231,6640,7062,7497,7945,8406,8880,9367,9867,10380,10906,11445,11997,12562,13140,13731,14335,14952,15582,16225,16881,17550,18232,18927,19635,20356,21090,21837,22597,23370,24156,24955,25767,26592,27430,28281,29145,30022,30912,31815,32731,33660,34602,35557,36525,37506,38500,39507,40527,41560,42606,43665,44737,45822,46920,48031,49155,50292,51442,52605,53781,54970,56172,57387,58615,59856,61110,62377,63657
mul $0,13
bin $0,2
div $0,13
| 86.714286 | 542 | 0.779242 |
3ab2c83c1d9774c925d4bb5d164dd7e32acd948a | 5,167 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1316.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1316.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1316.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %r8
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x1b6e5, %rdi
nop
xor %r8, %r8
movl $0x61626364, (%rdi)
nop
nop
nop
nop
nop
and $26173, %r14
lea addresses_normal_ht+0x19749, %r13
dec %r8
movb (%r13), %r10b
nop
nop
sub $15684, %r14
lea addresses_D_ht+0x3fe5, %rsi
lea addresses_D_ht+0x26b5, %rdi
nop
nop
cmp %r13, %r13
mov $56, %rcx
rep movsb
nop
nop
nop
nop
and %r8, %r8
lea addresses_A_ht+0xcce5, %r10
nop
nop
sub $53760, %rdi
movl $0x61626364, (%r10)
nop
nop
nop
nop
xor $23758, %r10
lea addresses_A_ht+0xe611, %rsi
lea addresses_normal_ht+0x18085, %rdi
nop
nop
nop
nop
nop
cmp %rbx, %rbx
mov $100, %rcx
rep movsq
nop
nop
nop
nop
sub %r13, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r8
push %rax
push %rdi
push %rdx
// Faulty Load
lea addresses_WT+0x18ce5, %r11
nop
cmp %rax, %rax
vmovups (%r11), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $0, %xmm4, %r8
lea oracles, %r11
and $0xff, %r8
shlq $12, %r8
mov (%r11,%r8,1), %r8
pop %rdx
pop %rdi
pop %rax
pop %r8
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 8}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 7}}
{'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 44.930435 | 2,999 | 0.661312 |
1ddb1da6ae00d2784d3cca81193790a4057db1a6 | 1,375 | asm | Assembly | example.asm | Retro-Tek/zxspectrum-sprites | de2abd6e60b0cbd687554f4f892c91df4f19dac5 | [
"MIT"
] | null | null | null | example.asm | Retro-Tek/zxspectrum-sprites | de2abd6e60b0cbd687554f4f892c91df4f19dac5 | [
"MIT"
] | null | null | null | example.asm | Retro-Tek/zxspectrum-sprites | de2abd6e60b0cbd687554f4f892c91df4f19dac5 | [
"MIT"
] | null | null | null | DEVICE ZXSPECTRUM128
ORG #8000
INCLUDE "macros.inc"
INCLUDE "screen.inc"
main DI
XOR A
OUT (#FE),A
LD DE,SCREEN_ADDR
LD HL,background
LD BC,6912
LDIR
LD BC,(1<<8)|1
LD HL,sprite
LD IXL,6
CALL draw_tile_3
LD BC,(0<<8)|5
LD D,4
LD HL,sprite
LD IXL,6
CALL draw_preshifted_sprite_3
LD BC,(8<<8)|1
LD HL,sprite.with_mask
LD IXL,6
CALL draw_tile_with_mask_3
LD BC,(7<<8)|5
LD D,4
LD HL,sprite.with_mask
LD IXL,6
CALL draw_preshifted_sprite_with_mask_3
HALT
background INCBIN "background.scr"
sprite INCBIN "sprite.3x6.sp1"
.with_mask INCBIN "sprite.3x6.sp2"
INCLUDE "sprites.asm"
INCLUDE "sprites_tables.asm"
SAVESNA "example.sna", main
LABELSLIST "user.l"
| 24.553571 | 59 | 0.363636 |
ec846b8a2bc73326876bfb6ba72ec61f3c62f3f3 | 5,838 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1646.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1646.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1646.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x1949b, %r10
nop
nop
nop
nop
nop
dec %r14
mov (%r10), %ebx
nop
nop
nop
nop
dec %rbx
lea addresses_WT_ht+0x158db, %rsi
lea addresses_normal_ht+0xf8db, %rdi
nop
nop
nop
nop
nop
cmp $3710, %r10
mov $119, %rcx
rep movsq
nop
sub %rcx, %rcx
lea addresses_UC_ht+0x3aeb, %rcx
nop
nop
and $2857, %r13
movb (%rcx), %r10b
nop
nop
nop
nop
dec %r10
lea addresses_UC_ht+0x16345, %rsi
lea addresses_normal_ht+0x1319b, %rdi
sub $59033, %r14
mov $67, %rcx
rep movsw
nop
nop
nop
cmp %rsi, %rsi
lea addresses_WC_ht+0x1a8db, %r13
nop
nop
nop
nop
cmp $49137, %rdi
mov (%r13), %rsi
nop
nop
nop
nop
nop
lfence
lea addresses_normal_ht+0x164c7, %r10
nop
nop
nop
and %rdi, %rdi
mov (%r10), %cx
nop
nop
nop
nop
nop
inc %r10
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %rax
push %rbp
push %rbx
push %rdi
push %rdx
// Store
mov $0xe669c0000000adb, %rax
nop
add $1987, %rdx
mov $0x5152535455565758, %r14
movq %r14, (%rax)
inc %rbx
// Store
lea addresses_D+0xae14, %r11
nop
nop
and %rbp, %rbp
movl $0x51525354, (%r11)
nop
nop
nop
cmp $52835, %rbp
// Faulty Load
lea addresses_WT+0xf0db, %rbx
and %rdi, %rdi
mov (%rbx), %r11
lea oracles, %rbx
and $0xff, %r11
shlq $12, %r11
mov (%rbx,%r11,1), %r11
pop %rdx
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_NC', 'AVXalign': False, 'size': 8}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 4}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 11, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 11, 'type': 'addresses_normal_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_normal_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'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
*/
| 38.407895 | 2,999 | 0.658959 |
220ade70d158f03aba251799ee400bf18c9514ae | 482 | asm | Assembly | oeis/347/A347789.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/347/A347789.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/347/A347789.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A347789: a(n) is the number of times that only 2 pegs have disks on them during the optimal solution to a Towers of Hanoi problem with n disks.
; Submitted by Jamie Morken(s2.)
; 0,2,4,8,12,20,28,44,60,92,124,188,252,380,508,764,1020,1532,2044,3068,4092,6140,8188,12284,16380,24572,32764,49148,65532,98300,131068,196604,262140,393212,524284,786428,1048572,1572860,2097148,3145724,4194300,6291452
mov $2,$0
div $0,2
lpb $0
sub $2,$0
sub $0,1
mul $2,2
lpe
mov $0,$2
mul $0,2
| 34.428571 | 218 | 0.732365 |
b76bb4ac8c0c9b7a5624be5085ec4239821475e8 | 473 | asm | Assembly | programs/oeis/043/A043639.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/043/A043639.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/043/A043639.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A043639: Numbers n such that base 10 representation has exactly 3 runs.
; 101,102,103,104,105,106,107,108,109,120,121,123,124,125,126,127,128,129,130,131,132,134,135,136,137,138,139,140,141,142,143,145,146,147,148,149,150,151,152,153,154,156,157,158,159
mov $1,1
lpb $0,1
mov $2,$0
mov $0,2
add $1,3
mov $3,$1
mul $3,2
add $3,2
mov $4,$2
sub $4,3
add $3,$4
add $0,$3
div $0,10
add $0,7
mov $5,$3
sub $5,4
mov $1,$5
lpe
add $1,$0
add $1,100
| 19.708333 | 181 | 0.621564 |
01c4d568b628a6380c2465d2f1e9f9caf4dd498d | 6,747 | asm | Assembly | patches/bank3e.asm/bowwow.asm | spicefather/LADXR | 4262b5e13d9caadfb713ed7a7a9a3af9b9f0a505 | [
"MIT"
] | null | null | null | patches/bank3e.asm/bowwow.asm | spicefather/LADXR | 4262b5e13d9caadfb713ed7a7a9a3af9b9f0a505 | [
"MIT"
] | null | null | null | patches/bank3e.asm/bowwow.asm | spicefather/LADXR | 4262b5e13d9caadfb713ed7a7a9a3af9b9f0a505 | [
"MIT"
] | null | null | null | CheckIfLoadBowWow:
; Check has bowwow flag
ld a, [$DB56]
cp $01
jr nz, .noLoadBowwow
ldh a, [$F6] ; load map number
cp $22
jr z, .loadBowwow
cp $23
jr z, .loadBowwow
cp $24
jr z, .loadBowwow
cp $32
jr z, .loadBowwow
cp $33
jr z, .loadBowwow
cp $34
jr z, .loadBowwow
.noLoadBowwow:
ld e, $00
ret
.loadBowwow:
ld e, $01
ret
; Special handler for when Bowwow tries to eat an entity.
; Our target entity index is loaded in BC.
BowwowEat:
; Load the entity type into A
ld hl, $C3A0 ; entity type
add hl, bc
ld a, [hl]
; Check if we need special handling for bosses
cp $59 ; Moldorm
jr z, BowwowHurtEnemy
cp $5C ; Genie
jr z, BowwowEatGenie
cp $5B ; SlimeEye
jp z, BowwowEatSlimeEye
cp $65 ; AnglerFish
jr z, BowwowHurtEnemy
cp $5D ; SlimeEel
jp z, BowwowEatSlimeEel
cp $5A ; Facade
jr z, BowwowHurtEnemy
cp $63 ; Eagle
jr z, BowwowHurtEnemy
cp $62 ; Hot head
jp z, BowwowEatHotHead
cp $F9 ; Hardhit beetle
jr z, BowwowHurtEnemy
cp $E6 ; Nightmare (all forms)
jp z, BowwowEatNightmare
; Check for special handling for minibosses
cp $87 ; Lanmola
jr z, BowwowHurtEnemy
; cp $88 ; Armos knight
; No special handling, just eat him, solves the fight real quick.
cp $81 ; rolling bones
jr z, BowwowHurtEnemy
cp $89 ; Hinox
jr z, BowwowHurtEnemy
cp $8E ; Cue ball
jr z, BowwowHurtEnemy
;cp $5E ; Gnoma
;jr z, BowwowHurtEnemy
cp $5F ; Master stalfos
jr z, BowwowHurtEnemy
cp $92 ; Smasher
jp z, BowwowEatSmasher
cp $BC ; Grim Creeper
jp z, BowwowEatGrimCreeper
cp $BE ; Blaino
jr z, BowwowHurtEnemy
cp $F8 ; Giant buzz blob
jr z, BowwowHurtEnemy
cp $F4 ; Avalaunch
jr z, BowwowHurtEnemy
; Some enemies
cp $E9 ; Color dungeon shell
jr z, BowwowHurtEnemy
cp $EA ; Color dungeon shell
jr z, BowwowHurtEnemy
cp $EB ; Color dungeon shell
jr z, BowwowHurtEnemy
; Play SFX
ld a, $03
ldh [$F2], a
; Call normal "destroy entity and drop item" handler
jp $3F50
BowwowHurtEnemy:
; Hurt enemy with damage type zero (sword)
ld a, $00
ld [$C19E], a
rst 18
; Play SFX
ld a, $03
ldh [$F2], a
ret
BowwowEatGenie:
; Get private state to find out if this is a bottle or the genie
ld hl, $C2B0
add hl, bc
ld a, [hl]
; Prepare loading state from hl
ld hl, $C290
add hl, bc
cp $00
jr z, .bottle
cp $01
jr z, .ghost
ret
.ghost:
; Get current state
ld a, [hl]
cp $04 ; Flying around without bottle
jr z, BowwowHurtEnemy
ret
.bottle:
; Get current state
ld a, [hl]
cp $03 ; Hopping around in bottle
jr z, BowwowHurtEnemy
ret
BowwowEatSlimeEye:
; On set privateCountdown2 to $0C to split, when privateState1 is $04 and state is $03
ld hl, $C290 ; state
add hl, bc
ld a, [hl]
cp $03
jr nz, .skipSplit
ld hl, $C2B0 ; private state1
add hl, bc
ld a, [hl]
cp $04
jr nz, .skipSplit
ld hl, $C300 ; private countdown 2
add hl, bc
ld [hl], $0C
.skipSplit:
jp BowwowHurtEnemy
BowwowEatSlimeEel:
; Get private state to find out if this is the tail or the head
ld hl, $C2B0
add hl, bc
ld a, [hl]
cp $01 ; not the head, so, skip.
ret nz
; Check if we are pulled out of the wall
ld hl, $C290
add hl, bc
ld a, [hl]
cp $03 ; pulled out of the wall
jr nz, .knockOutOfWall
ld hl, $D204
ld a, [hl]
cp $07
jr nc, .noExtraDamage
inc [hl]
.noExtraDamage:
jp BowwowHurtEnemy
.knockOutOfWall:
ld [hl], $03 ; set state to $03
ld hl, $C210 ; Y position
add hl, bc
ld a, [hl]
ld [hl], $60
cp $48
jp nc, BowwowHurtEnemy
ld [hl], $30
jp BowwowHurtEnemy
BowwowEatHotHead:
; Load health of hothead
ld hl, $C360
add hl, bc
ld a, [hl]
cp $20
jr c, .lowHp
ld [hl], $20
.lowHp:
jp BowwowHurtEnemy
BowwowEatSmasher:
; Check if this is the ball or the monster
ld hl, $C440
add hl, bc
ld a, [hl]
and a
ret nz
jp BowwowHurtEnemy
BowwowEatGrimCreeper:
; Check if this is the main enemy or the smaller ones. Only kill the small ones
ld hl, $C2B0
add hl, bc
ld a, [hl]
and a
ret z
jp BowwowHurtEnemy
BowwowEatNightmare:
; Check if this is the staircase.
ld hl, $C390
add hl, bc
ld a, [hl]
cp $02
ret z
; Prepare loading state from hl
ld hl, $C290
add hl, bc
ld a, [$D219] ; which form has the nightmare
cp $01
jr z, .slimeForm
cp $02
jr z, .agahnimForm
cp $03 ; moldormForm
jp z, BowwowHurtEnemy
cp $04 ; ganon and lanmola
jp z, BowwowHurtEnemy
cp $05 ; dethl
jp z, BowwowHurtEnemy
; 0 is the intro form
ret
.slimeForm:
ld a, [hl]
cp $02
jr z, .canHurtSlime
cp $03
ret nz
.canHurtSlime:
; We need quite some custom handling, normally the nightmare checks very directly if you use powder.
; No idea why this insta kills the slime form...
; Change state to hurt state
ld [hl], $07
; Set flash count
ld hl, $C420
add hl, bc
ld [hl], $14
; play proper sfx
ld a, $07
ldh [$F3], a
ld a, $37
ldh [$F2], a
; No idea why this is done, but it happens when you use powder on the slime
ld a, $03
ld [$D220], a
ret
.agahnimForm:
ld a, [hl]
; only damage in states 2 to 4
cp $02
ret c
cp $04
ret nc
; Decrease health
ld a, [$D220]
inc a
ld [$D220], a
; If dead, do stuff
cp $04
jr c, .agahnimNotDeadYet
ld [hl], $07
ld hl, $C2E0
add hl, bc
ld [hl], $C0
ld a, $36
ldh [$F2], a
.agahnimNotDeadYet:
ld hl, $C420
add hl, bc
ld [hl], $14
ld a, $07
ldh [$F3], a
ret
| 22.194079 | 105 | 0.520083 |
d594f8c644f975efd90f9e2d7895d5bd525bd9a4 | 1,548 | asm | Assembly | Appl/Startup/CommonStartup/CMain/cmainManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Appl/Startup/CommonStartup/CMain/cmainManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Appl/Startup/CommonStartup/CMain/cmainManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @----------------------------------------------------------------------
Copyright (c) GeoWorks 1988 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: CommonStartup/CMain
FILE: cmainManager.asm
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 10/92 Initial version
DESCRIPTION:
This file assembles the CMain/ module of startup.
$Id: cmainManager.asm,v 1.1 97/04/04 16:52:20 newdeal Exp $
------------------------------------------------------------------------------@
_CMain = 1
;-----------------------------------------------------------------------------
; Include common definitions
;-----------------------------------------------------------------------------
include cstartupGeode.def
;-----------------------------------------------------------------------------
; Include definitions for this module
;-----------------------------------------------------------------------------
ifdef ISTARTUP
include sysstats.def
include thread.def
include Internal/parallDr.def
include Internal/heapInt.def
endif
include cmainConstant.def
;-----------------------------------------------------------------------------
; Include code
;-----------------------------------------------------------------------------
include cmainProcess.asm
include cmainStartupApplication.asm
include cmainStartupPrimary.asm
ifdef ISTARTUP
include cmainStartupRoomTrigger.asm
include mainIStartupField.asm
include mainTextMessages.asm
include mainQuiz.asm
endif
end
| 27.157895 | 80 | 0.44186 |
3bad253e5b0559de7c650271eacc4a5b119d88fb | 1,952 | asm | Assembly | Appl/Breadbox/ArabicWP/UI/uiManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Appl/Breadbox/ArabicWP/UI/uiManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Appl/Breadbox/ArabicWP/UI/uiManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @----------------------------------------------------------------------
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: GeoWrite
FILE: UI/uiManager.asm
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 2/92 Initial version
DESCRIPTION:
This file contains the user interface definition for the
GeoWrite application.
$Id: uiManager.asm,v 1.3 98/02/17 03:42:11 gene Exp $
------------------------------------------------------------------------------@
;------------------------------------------------------------------------------
; Common GEODE stuff
;------------------------------------------------------------------------------
include writeGeode.def
UseLib spell.def
include writeConstant.def
include writeDocument.def
include writeApplication.def
include writeProcess.def
include writeDisplay.def
include writeSuperImpex.def
PZ< include writeControls.def >
include gstring.def
UseLib Objects/styles.def
UseLib Objects/Text/tCtrlC.def
include writeGrObjHead.def
include pageInfo.def
if FAX_SUPPORT or LIMITED_FAX_SUPPORT
UseLib Internal/spoolInt.def
UseLib mailbox.def
include Mailbox/vmtree.def
include Mailbox/spooltd.def
include Mailbox/faxsendtd.def
include initfile.def
endif
include arabtool.def
;------------------------------------------------------------------------------
; Resources
;------------------------------------------------------------------------------
include uiManager.rdef
;------------------------------------------------------------------------------
; Code
;------------------------------------------------------------------------------
if _DWP
include uiPrint.asm
endif
if PZ_PCGEOS
include uiFixed.asm
include uiRowColumn.asm
endif
ifdef _SUPER_IMPEX
include uiSuperIC.asm
endif
include uiWriteDC.asm
include uiTemplate.asm
include uiGifImage.asm
| 24.098765 | 80 | 0.505635 |
394d03bac982516f6fc56b084a1e18481467b377 | 1,256 | asm | Assembly | programs/oeis/099/A099868.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/099/A099868.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/099/A099868.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A099868: a(n) = 5*a(n-1) - a(n-2), a(0) = 3, a(1) = 25.
; 3,25,122,585,2803,13430,64347,308305,1477178,7077585,33910747,162476150,778470003,3729873865,17870899322,85624622745,410252214403,1965636449270,9417930031947,45124013710465,216202138520378,1035886678891425,4963231255936747,23780269600792310,113938116748024803,545910314139331705,2615613453948633722,12532156955603836905,60045171324070550803,287693699664748917110,1378423326999674034747,6604422935333621256625,31643691349668432248378,151614033813008539985265,726426477715374267677947,3480518354763862798404470,16676165296103939724344403,79900308125755835823317545,382825375332675239392243322,1834226568537620361137899065,8788307467355426566297252003,42107310768239512470348360950,201748246373842135785444552747,966633921100971166456874402785,4631421359131013696498927461178,22190472874554097316037762903105,106320943013639472883689887054347,509414242193643267102411672368630,2440750267954576862628368474788803,11694337097579241046039430701575385,56030935219941628367568785033088122,268460339002128900791804494463865225
mov $2,4
lpb $0
sub $0,1
add $1,4
sub $2,1
add $3,5
add $3,$2
add $2,2
add $2,$3
add $2,$1
add $1,$2
add $1,1
mov $3,$2
mov $2,$1
lpe
add $1,3
mov $0,$1
| 59.809524 | 1,019 | 0.852707 |
ec93dfe6ea1ed59a8c2902984bedebc6b674deeb | 578 | asm | Assembly | progs/h06-uppercase.asm | HKhademian/AssemblyDandamudi | b4d4ccbb7e585953a8d2d22b47d815a3f45f9129 | [
"Unlicense"
] | 1 | 2020-05-07T14:20:09.000Z | 2020-05-07T14:20:09.000Z | progs/h06-uppercase.asm | HKhademian/AssemblyDandamudi | b4d4ccbb7e585953a8d2d22b47d815a3f45f9129 | [
"Unlicense"
] | null | null | null | progs/h06-uppercase.asm | HKhademian/AssemblyDandamudi | b4d4ccbb7e585953a8d2d22b47d815a3f45f9129 | [
"Unlicense"
] | null | null | null | %include "lib.asm"
extern ExitProcess ; windows syscall to exit
section .text
section .bss
buffer resb 255
section .data
section .code
global _start
_start:
fgets buffer, 255 ; read text
mov esi, buffer
dec esi
processor:
inc esi
mov AL, [ESI]
cmp AL, 0
je printer ; if '\0' finish process and print the result
cmp AL, 'a'
jl processor ; not in the range
cmp AL, 'z'
jg processor ; not in the range
sub BYTE [esi], 'a'-'A'
jmp processor ; next char
printer:
puts buffer
;jmp _start ; restart
_end:
push 0
call ExitProcess
| 13.44186 | 62 | 0.66436 |
a28dceb01c62d8d7bdf3d98b30f3c8d5cb6cc1d0 | 1,917 | asm | Assembly | c2000/C2000Ware_1_00_06_00/libraries/control/DCL/c28/source/DCL_DF23_C1.asm | ramok/Themis_ForHPSDR | d0f323a843ac0a488ef816ccb7c828032855a40a | [
"Unlicense"
] | null | null | null | c2000/C2000Ware_1_00_06_00/libraries/control/DCL/c28/source/DCL_DF23_C1.asm | ramok/Themis_ForHPSDR | d0f323a843ac0a488ef816ccb7c828032855a40a | [
"Unlicense"
] | null | null | null | c2000/C2000Ware_1_00_06_00/libraries/control/DCL/c28/source/DCL_DF23_C1.asm | ramok/Themis_ForHPSDR | d0f323a843ac0a488ef816ccb7c828032855a40a | [
"Unlicense"
] | 1 | 2021-07-21T08:10:37.000Z | 2021-07-21T08:10:37.000Z | ; DCL_DF23_C1.asm - Full Direct Form 2 implementation in third order
;
; Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
; ALL RIGHTS RESERVED
.if __TI_EABI__
.asg DCL_runDF23_C1, _DCL_runDF23_C1
.endif
.global _DCL_runDF23_C1
.sect "dclfuncs"
; C prototype: float DCL_runDF23_C1(DCL_DF23 *p, float32_t ek)
; argument 1 = *p : 32-bit ARMA structure address [XAR4]
; argument 2 = ek : 32-bit floating-point input [R0H]
; return = uk : 32-bit floating-point [R0H]
.align 2
_DCL_runDF23_C1:
.asmfunc
PUSH XAR5
MOV32 *SP++, R4H
MOV32 *SP++, R5H
MOV32 *SP++, R6H
MOV32 *SP++, R7H
MOVL ACC, @XAR4 ; ACC = &b0
ADDB ACC, #0xE ; ACC = &x1
MOVL XAR5, ACC ; XAR5 = &x1
MOV32 R1H, *XAR5++ ; R1H = x1
MOV32 R2H, *XAR4++ ; R2H = b0
MPYF32 R3H, R2H, R0H ; R3H = v1
MOV32 R2H, *XAR4++ ; R2H = b1
ADDF32 R7H, R1H, R3H ; R7H = uk
|| MOV32 R3H, *XAR4++ ; R3H = b2
MPYF32 R1H, R2H, R0H ; R1H = v2
|| MOV32 R4H, *XAR4++ ; R4H = b3
MPYF32 R2H, R3H, R0H ; R2H = v4
|| MOV32 R5H, *XAR4++ ; R5H = a1
MPYF32 R3H, R4H, R0H ; R3H = v6
|| MOV32 R6H, *XAR4++ ; R6H = a2
MPYF32 R4H, R5H, R7H ; R4H = v3
|| MOV32 R0H, *XAR5++ ; R0H = x2
ADDF32 R1H, R0H, R1H ; R1H = v2 + x2
MOV32 R0H, *XAR4++ ; R0H = a3
SUBF32 R1H, R1H, R4H ; R1H = x1d
MPYF32 R5H, R6H, R7H ; R5H = v5
|| MOV32 R6H, *XAR5 ; R6H = x3
ADDF32 R2H, R2H, R6H ; R2H = v4 + x3
MOV32 *XAR4++, R1H ; save x1
SUBF32 R2H, R2H, R5H ; R2H = x2d
MPYF32 R5H, R0H, R7H ; R5H = v7
MOV32 *XAR4++, R2H ; save x2
SUBF32 R3H, R3H, R5H ; R3H = x3d
MOV32 R0H, R7H, UNCF ; save uk
MOV32 *XAR4, R3H ; save x3
MOV32 R7H, *--SP, UNCF
MOV32 R6H, *--SP, UNCF
MOV32 R5H, *--SP, UNCF
MOV32 R4H, *--SP, UNCF
POP XAR5
LRETR
.endasmfunc
.end
; end of file
| 27.782609 | 72 | 0.568075 |
153e98c4153204942607004f92cba9cd71adc0cf | 133,406 | asm | Assembly | project/ntstub/i386/6_0_6001_sp1_ssdt_sysenter.asm | rmusser01/windows-syscall-table | 6216a2559d714eb04bad278792a6544ab8f21d41 | [
"BSD-3-Clause"
] | 6 | 2018-01-18T02:30:27.000Z | 2020-01-11T03:42:33.000Z | project/ntstub/i386/6_0_6001_sp1_ssdt_sysenter.asm | stonedreamforest/windows-syscall-table | 6216a2559d714eb04bad278792a6544ab8f21d41 | [
"BSD-3-Clause"
] | null | null | null | project/ntstub/i386/6_0_6001_sp1_ssdt_sysenter.asm | stonedreamforest/windows-syscall-table | 6216a2559d714eb04bad278792a6544ab8f21d41 | [
"BSD-3-Clause"
] | 3 | 2017-12-29T07:50:35.000Z | 2020-10-15T09:28:54.000Z | ; DO NOT MODIFY THIS FILE DIRECTLY!
; author: @TinySecEx
; ssdt asm stub for 6.0.6001-sp1-windows-vista i386
.686
.mmx
.xmm
.model flat,stdcall
option casemap:none
option prologue:none
option epilogue:none
.code
; ULONG __stdcall NtAcceptConnectPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtAcceptConnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 0
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtAcceptConnectPort ENDP
; ULONG __stdcall NtAccessCheck( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 );
_6_0_6001_sp1_windows_vista_NtAccessCheck PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD
mov eax , 1
mov edx , 7FFE0300h
call dword ptr [edx]
ret 32
_6_0_6001_sp1_windows_vista_NtAccessCheck ENDP
; ULONG __stdcall NtAccessCheckAndAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 );
_6_0_6001_sp1_windows_vista_NtAccessCheckAndAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD
mov eax , 2
mov edx , 7FFE0300h
call dword ptr [edx]
ret 44
_6_0_6001_sp1_windows_vista_NtAccessCheckAndAuditAlarm ENDP
; ULONG __stdcall NtAccessCheckByType( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 );
_6_0_6001_sp1_windows_vista_NtAccessCheckByType PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD
mov eax , 3
mov edx , 7FFE0300h
call dword ptr [edx]
ret 44
_6_0_6001_sp1_windows_vista_NtAccessCheckByType ENDP
; ULONG __stdcall NtAccessCheckByTypeAndAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 );
_6_0_6001_sp1_windows_vista_NtAccessCheckByTypeAndAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD
mov eax , 4
mov edx , 7FFE0300h
call dword ptr [edx]
ret 64
_6_0_6001_sp1_windows_vista_NtAccessCheckByTypeAndAuditAlarm ENDP
; ULONG __stdcall NtAccessCheckByTypeResultList( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 );
_6_0_6001_sp1_windows_vista_NtAccessCheckByTypeResultList PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD
mov eax , 5
mov edx , 7FFE0300h
call dword ptr [edx]
ret 44
_6_0_6001_sp1_windows_vista_NtAccessCheckByTypeResultList ENDP
; ULONG __stdcall NtAccessCheckByTypeResultListAndAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 );
_6_0_6001_sp1_windows_vista_NtAccessCheckByTypeResultListAndAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD
mov eax , 6
mov edx , 7FFE0300h
call dword ptr [edx]
ret 64
_6_0_6001_sp1_windows_vista_NtAccessCheckByTypeResultListAndAuditAlarm ENDP
; ULONG __stdcall NtAccessCheckByTypeResultListAndAuditAlarmByHandle( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 , ULONG arg_15 , ULONG arg_16 , ULONG arg_17 );
_6_0_6001_sp1_windows_vista_NtAccessCheckByTypeResultListAndAuditAlarmByHandle PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD , arg_15:DWORD , arg_16:DWORD , arg_17:DWORD
mov eax , 7
mov edx , 7FFE0300h
call dword ptr [edx]
ret 68
_6_0_6001_sp1_windows_vista_NtAccessCheckByTypeResultListAndAuditAlarmByHandle ENDP
; ULONG __stdcall NtAddAtom( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAddAtom PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 8
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAddAtom ENDP
; ULONG __stdcall NtAddBootEntry( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtAddBootEntry PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 9
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtAddBootEntry ENDP
; ULONG __stdcall NtAddDriverEntry( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtAddDriverEntry PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 10
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtAddDriverEntry ENDP
; ULONG __stdcall NtAdjustGroupsToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtAdjustGroupsToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 11
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtAdjustGroupsToken ENDP
; ULONG __stdcall NtAdjustPrivilegesToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtAdjustPrivilegesToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 12
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtAdjustPrivilegesToken ENDP
; ULONG __stdcall NtAlertResumeThread( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtAlertResumeThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 13
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtAlertResumeThread ENDP
; ULONG __stdcall NtAlertThread( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtAlertThread PROC STDCALL arg_01:DWORD
mov eax , 14
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtAlertThread ENDP
; ULONG __stdcall NtAllocateLocallyUniqueId( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtAllocateLocallyUniqueId PROC STDCALL arg_01:DWORD
mov eax , 15
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtAllocateLocallyUniqueId ENDP
; ULONG __stdcall NtAllocateUserPhysicalPages( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAllocateUserPhysicalPages PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 16
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAllocateUserPhysicalPages ENDP
; ULONG __stdcall NtAllocateUuids( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtAllocateUuids PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 17
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtAllocateUuids ENDP
; ULONG __stdcall NtAllocateVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtAllocateVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 18
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtAllocateVirtualMemory ENDP
; ULONG __stdcall NtAlpcAcceptConnectPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 );
_6_0_6001_sp1_windows_vista_NtAlpcAcceptConnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD
mov eax , 19
mov edx , 7FFE0300h
call dword ptr [edx]
ret 36
_6_0_6001_sp1_windows_vista_NtAlpcAcceptConnectPort ENDP
; ULONG __stdcall NtAlpcCancelMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAlpcCancelMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 20
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAlpcCancelMessage ENDP
; ULONG __stdcall NtAlpcConnectPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 );
_6_0_6001_sp1_windows_vista_NtAlpcConnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD
mov eax , 21
mov edx , 7FFE0300h
call dword ptr [edx]
ret 44
_6_0_6001_sp1_windows_vista_NtAlpcConnectPort ENDP
; ULONG __stdcall NtAlpcCreatePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAlpcCreatePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 22
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAlpcCreatePort ENDP
; ULONG __stdcall NtAlpcCreatePortSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtAlpcCreatePortSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 23
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtAlpcCreatePortSection ENDP
; ULONG __stdcall NtAlpcCreateResourceReserve( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtAlpcCreateResourceReserve PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 24
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtAlpcCreateResourceReserve ENDP
; ULONG __stdcall NtAlpcCreateSectionView( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAlpcCreateSectionView PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 25
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAlpcCreateSectionView ENDP
; ULONG __stdcall NtAlpcCreateSecurityContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAlpcCreateSecurityContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 26
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAlpcCreateSecurityContext ENDP
; ULONG __stdcall NtAlpcDeletePortSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAlpcDeletePortSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 27
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAlpcDeletePortSection ENDP
; ULONG __stdcall NtAlpcDeleteResourceReserve( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAlpcDeleteResourceReserve PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 28
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAlpcDeleteResourceReserve ENDP
; ULONG __stdcall NtAlpcDeleteSectionView( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAlpcDeleteSectionView PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 29
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAlpcDeleteSectionView ENDP
; ULONG __stdcall NtAlpcDeleteSecurityContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAlpcDeleteSecurityContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 30
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAlpcDeleteSecurityContext ENDP
; ULONG __stdcall NtAlpcDisconnectPort( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtAlpcDisconnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 31
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtAlpcDisconnectPort ENDP
; ULONG __stdcall NtAlpcImpersonateClientOfPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAlpcImpersonateClientOfPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 32
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAlpcImpersonateClientOfPort ENDP
; ULONG __stdcall NtAlpcOpenSenderProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtAlpcOpenSenderProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 33
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtAlpcOpenSenderProcess ENDP
; ULONG __stdcall NtAlpcOpenSenderThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtAlpcOpenSenderThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 34
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtAlpcOpenSenderThread ENDP
; ULONG __stdcall NtAlpcQueryInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtAlpcQueryInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 35
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtAlpcQueryInformation ENDP
; ULONG __stdcall NtAlpcQueryInformationMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtAlpcQueryInformationMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 36
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtAlpcQueryInformationMessage ENDP
; ULONG __stdcall NtAlpcRevokeSecurityContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAlpcRevokeSecurityContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 37
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAlpcRevokeSecurityContext ENDP
; ULONG __stdcall NtAlpcSendWaitReceivePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 );
_6_0_6001_sp1_windows_vista_NtAlpcSendWaitReceivePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD
mov eax , 38
mov edx , 7FFE0300h
call dword ptr [edx]
ret 32
_6_0_6001_sp1_windows_vista_NtAlpcSendWaitReceivePort ENDP
; ULONG __stdcall NtAlpcSetInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtAlpcSetInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 39
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtAlpcSetInformation ENDP
; ULONG __stdcall NtApphelpCacheControl( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtApphelpCacheControl PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 40
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtApphelpCacheControl ENDP
; ULONG __stdcall NtAreMappedFilesTheSame( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtAreMappedFilesTheSame PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 41
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtAreMappedFilesTheSame ENDP
; ULONG __stdcall NtAssignProcessToJobObject( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtAssignProcessToJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 42
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtAssignProcessToJobObject ENDP
; ULONG __stdcall NtCallbackReturn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtCallbackReturn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 43
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtCallbackReturn ENDP
; ULONG __stdcall NtCancelDeviceWakeupRequest( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtCancelDeviceWakeupRequest PROC STDCALL arg_01:DWORD
mov eax , 44
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtCancelDeviceWakeupRequest ENDP
; ULONG __stdcall NtCancelIoFile( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtCancelIoFile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 45
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtCancelIoFile ENDP
; ULONG __stdcall NtCancelTimer( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtCancelTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 46
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtCancelTimer ENDP
; ULONG __stdcall NtClearEvent( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtClearEvent PROC STDCALL arg_01:DWORD
mov eax , 47
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtClearEvent ENDP
; ULONG __stdcall NtClose( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtClose PROC STDCALL arg_01:DWORD
mov eax , 48
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtClose ENDP
; ULONG __stdcall NtCloseObjectAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtCloseObjectAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 49
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtCloseObjectAuditAlarm ENDP
; ULONG __stdcall NtCompactKeys( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtCompactKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 50
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtCompactKeys ENDP
; ULONG __stdcall NtCompareTokens( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtCompareTokens PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 51
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtCompareTokens ENDP
; ULONG __stdcall NtCompleteConnectPort( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtCompleteConnectPort PROC STDCALL arg_01:DWORD
mov eax , 52
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtCompleteConnectPort ENDP
; ULONG __stdcall NtCompressKey( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtCompressKey PROC STDCALL arg_01:DWORD
mov eax , 53
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtCompressKey ENDP
; ULONG __stdcall NtConnectPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 );
_6_0_6001_sp1_windows_vista_NtConnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD
mov eax , 54
mov edx , 7FFE0300h
call dword ptr [edx]
ret 32
_6_0_6001_sp1_windows_vista_NtConnectPort ENDP
; ULONG __stdcall NtContinue( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtContinue PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 55
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtContinue ENDP
; ULONG __stdcall NtCreateDebugObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtCreateDebugObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 56
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtCreateDebugObject ENDP
; ULONG __stdcall NtCreateDirectoryObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtCreateDirectoryObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 57
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtCreateDirectoryObject ENDP
; ULONG __stdcall NtCreateEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtCreateEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 58
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtCreateEvent ENDP
; ULONG __stdcall NtCreateEventPair( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtCreateEventPair PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 59
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtCreateEventPair ENDP
; ULONG __stdcall NtCreateFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 );
_6_0_6001_sp1_windows_vista_NtCreateFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD
mov eax , 60
mov edx , 7FFE0300h
call dword ptr [edx]
ret 44
_6_0_6001_sp1_windows_vista_NtCreateFile ENDP
; ULONG __stdcall NtCreateIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtCreateIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 61
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtCreateIoCompletion ENDP
; ULONG __stdcall NtCreateJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtCreateJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 62
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtCreateJobObject ENDP
; ULONG __stdcall NtCreateJobSet( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtCreateJobSet PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 63
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtCreateJobSet ENDP
; ULONG __stdcall NtCreateKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 );
_6_0_6001_sp1_windows_vista_NtCreateKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD
mov eax , 64
mov edx , 7FFE0300h
call dword ptr [edx]
ret 28
_6_0_6001_sp1_windows_vista_NtCreateKey ENDP
; ULONG __stdcall NtCreateKeyTransacted( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 );
_6_0_6001_sp1_windows_vista_NtCreateKeyTransacted PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD
mov eax , 65
mov edx , 7FFE0300h
call dword ptr [edx]
ret 32
_6_0_6001_sp1_windows_vista_NtCreateKeyTransacted ENDP
; ULONG __stdcall NtCreateMailslotFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 );
_6_0_6001_sp1_windows_vista_NtCreateMailslotFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD
mov eax , 66
mov edx , 7FFE0300h
call dword ptr [edx]
ret 32
_6_0_6001_sp1_windows_vista_NtCreateMailslotFile ENDP
; ULONG __stdcall NtCreateMutant( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtCreateMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 67
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtCreateMutant ENDP
; ULONG __stdcall NtCreateNamedPipeFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 , ULONG arg_14 );
_6_0_6001_sp1_windows_vista_NtCreateNamedPipeFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD , arg_14:DWORD
mov eax , 68
mov edx , 7FFE0300h
call dword ptr [edx]
ret 56
_6_0_6001_sp1_windows_vista_NtCreateNamedPipeFile ENDP
; ULONG __stdcall NtCreatePrivateNamespace( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtCreatePrivateNamespace PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 69
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtCreatePrivateNamespace ENDP
; ULONG __stdcall NtCreatePagingFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtCreatePagingFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 70
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtCreatePagingFile ENDP
; ULONG __stdcall NtCreatePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtCreatePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 71
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtCreatePort ENDP
; ULONG __stdcall NtCreateProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 );
_6_0_6001_sp1_windows_vista_NtCreateProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD
mov eax , 72
mov edx , 7FFE0300h
call dword ptr [edx]
ret 32
_6_0_6001_sp1_windows_vista_NtCreateProcess ENDP
; ULONG __stdcall NtCreateProcessEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 );
_6_0_6001_sp1_windows_vista_NtCreateProcessEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD
mov eax , 73
mov edx , 7FFE0300h
call dword ptr [edx]
ret 36
_6_0_6001_sp1_windows_vista_NtCreateProcessEx ENDP
; ULONG __stdcall NtCreateProfile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 );
_6_0_6001_sp1_windows_vista_NtCreateProfile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD
mov eax , 74
mov edx , 7FFE0300h
call dword ptr [edx]
ret 36
_6_0_6001_sp1_windows_vista_NtCreateProfile ENDP
; ULONG __stdcall NtCreateSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 );
_6_0_6001_sp1_windows_vista_NtCreateSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD
mov eax , 75
mov edx , 7FFE0300h
call dword ptr [edx]
ret 28
_6_0_6001_sp1_windows_vista_NtCreateSection ENDP
; ULONG __stdcall NtCreateSemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtCreateSemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 76
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtCreateSemaphore ENDP
; ULONG __stdcall NtCreateSymbolicLinkObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtCreateSymbolicLinkObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 77
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtCreateSymbolicLinkObject ENDP
; ULONG __stdcall NtCreateThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 );
_6_0_6001_sp1_windows_vista_NtCreateThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD
mov eax , 78
mov edx , 7FFE0300h
call dword ptr [edx]
ret 32
_6_0_6001_sp1_windows_vista_NtCreateThread ENDP
; ULONG __stdcall NtCreateTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtCreateTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 79
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtCreateTimer ENDP
; ULONG __stdcall NtCreateToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 , ULONG arg_13 );
_6_0_6001_sp1_windows_vista_NtCreateToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD , arg_13:DWORD
mov eax , 80
mov edx , 7FFE0300h
call dword ptr [edx]
ret 52
_6_0_6001_sp1_windows_vista_NtCreateToken ENDP
; ULONG __stdcall NtCreateTransaction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 );
_6_0_6001_sp1_windows_vista_NtCreateTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD
mov eax , 81
mov edx , 7FFE0300h
call dword ptr [edx]
ret 40
_6_0_6001_sp1_windows_vista_NtCreateTransaction ENDP
; ULONG __stdcall NtOpenTransaction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtOpenTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 82
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtOpenTransaction ENDP
; ULONG __stdcall NtQueryInformationTransaction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 83
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationTransaction ENDP
; ULONG __stdcall NtQueryInformationTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 84
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationTransactionManager ENDP
; ULONG __stdcall NtPrePrepareEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtPrePrepareEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 85
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtPrePrepareEnlistment ENDP
; ULONG __stdcall NtPrepareEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtPrepareEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 86
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtPrepareEnlistment ENDP
; ULONG __stdcall NtCommitEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtCommitEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 87
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtCommitEnlistment ENDP
; ULONG __stdcall NtReadOnlyEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtReadOnlyEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 88
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtReadOnlyEnlistment ENDP
; ULONG __stdcall NtRollbackComplete( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtRollbackComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 89
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtRollbackComplete ENDP
; ULONG __stdcall NtRollbackEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtRollbackEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 90
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtRollbackEnlistment ENDP
; ULONG __stdcall NtCommitTransaction( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtCommitTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 91
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtCommitTransaction ENDP
; ULONG __stdcall NtRollbackTransaction( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtRollbackTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 92
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtRollbackTransaction ENDP
; ULONG __stdcall NtPrePrepareComplete( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtPrePrepareComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 93
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtPrePrepareComplete ENDP
; ULONG __stdcall NtPrepareComplete( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtPrepareComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 94
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtPrepareComplete ENDP
; ULONG __stdcall NtCommitComplete( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtCommitComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 95
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtCommitComplete ENDP
; ULONG __stdcall NtSinglePhaseReject( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSinglePhaseReject PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 96
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSinglePhaseReject ENDP
; ULONG __stdcall NtSetInformationTransaction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetInformationTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 97
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetInformationTransaction ENDP
; ULONG __stdcall NtSetInformationTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetInformationTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 98
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetInformationTransactionManager ENDP
; ULONG __stdcall NtSetInformationResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetInformationResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 99
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetInformationResourceManager ENDP
; ULONG __stdcall NtCreateTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtCreateTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 100
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtCreateTransactionManager ENDP
; ULONG __stdcall NtOpenTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtOpenTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 101
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtOpenTransactionManager ENDP
; ULONG __stdcall NtRenameTransactionManager( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtRenameTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 102
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtRenameTransactionManager ENDP
; ULONG __stdcall NtRollforwardTransactionManager( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtRollforwardTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 103
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtRollforwardTransactionManager ENDP
; ULONG __stdcall NtRecoverEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtRecoverEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 104
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtRecoverEnlistment ENDP
; ULONG __stdcall NtRecoverResourceManager( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtRecoverResourceManager PROC STDCALL arg_01:DWORD
mov eax , 105
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtRecoverResourceManager ENDP
; ULONG __stdcall NtRecoverTransactionManager( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtRecoverTransactionManager PROC STDCALL arg_01:DWORD
mov eax , 106
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtRecoverTransactionManager ENDP
; ULONG __stdcall NtCreateResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 );
_6_0_6001_sp1_windows_vista_NtCreateResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD
mov eax , 107
mov edx , 7FFE0300h
call dword ptr [edx]
ret 28
_6_0_6001_sp1_windows_vista_NtCreateResourceManager ENDP
; ULONG __stdcall NtOpenResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtOpenResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 108
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtOpenResourceManager ENDP
; ULONG __stdcall NtGetNotificationResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 );
_6_0_6001_sp1_windows_vista_NtGetNotificationResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD
mov eax , 109
mov edx , 7FFE0300h
call dword ptr [edx]
ret 28
_6_0_6001_sp1_windows_vista_NtGetNotificationResourceManager ENDP
; ULONG __stdcall NtQueryInformationResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 110
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationResourceManager ENDP
; ULONG __stdcall NtCreateEnlistment( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 );
_6_0_6001_sp1_windows_vista_NtCreateEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD
mov eax , 111
mov edx , 7FFE0300h
call dword ptr [edx]
ret 32
_6_0_6001_sp1_windows_vista_NtCreateEnlistment ENDP
; ULONG __stdcall NtOpenEnlistment( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtOpenEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 112
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtOpenEnlistment ENDP
; ULONG __stdcall NtSetInformationEnlistment( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetInformationEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 113
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetInformationEnlistment ENDP
; ULONG __stdcall NtQueryInformationEnlistment( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 114
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationEnlistment ENDP
; ULONG __stdcall NtCreateWaitablePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtCreateWaitablePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 115
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtCreateWaitablePort ENDP
; ULONG __stdcall NtDebugActiveProcess( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtDebugActiveProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 116
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtDebugActiveProcess ENDP
; ULONG __stdcall NtDebugContinue( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtDebugContinue PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 117
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtDebugContinue ENDP
; ULONG __stdcall NtDelayExecution( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtDelayExecution PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 118
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtDelayExecution ENDP
; ULONG __stdcall NtDeleteAtom( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtDeleteAtom PROC STDCALL arg_01:DWORD
mov eax , 119
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtDeleteAtom ENDP
; ULONG __stdcall NtDeleteBootEntry( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtDeleteBootEntry PROC STDCALL arg_01:DWORD
mov eax , 120
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtDeleteBootEntry ENDP
; ULONG __stdcall NtDeleteDriverEntry( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtDeleteDriverEntry PROC STDCALL arg_01:DWORD
mov eax , 121
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtDeleteDriverEntry ENDP
; ULONG __stdcall NtDeleteFile( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtDeleteFile PROC STDCALL arg_01:DWORD
mov eax , 122
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtDeleteFile ENDP
; ULONG __stdcall NtDeleteKey( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtDeleteKey PROC STDCALL arg_01:DWORD
mov eax , 123
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtDeleteKey ENDP
; ULONG __stdcall NtDeletePrivateNamespace( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtDeletePrivateNamespace PROC STDCALL arg_01:DWORD
mov eax , 124
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtDeletePrivateNamespace ENDP
; ULONG __stdcall NtDeleteObjectAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtDeleteObjectAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 125
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtDeleteObjectAuditAlarm ENDP
; ULONG __stdcall NtDeleteValueKey( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtDeleteValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 126
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtDeleteValueKey ENDP
; ULONG __stdcall NtDeviceIoControlFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 );
_6_0_6001_sp1_windows_vista_NtDeviceIoControlFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD
mov eax , 127
mov edx , 7FFE0300h
call dword ptr [edx]
ret 40
_6_0_6001_sp1_windows_vista_NtDeviceIoControlFile ENDP
; ULONG __stdcall NtDisplayString( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtDisplayString PROC STDCALL arg_01:DWORD
mov eax , 128
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtDisplayString ENDP
; ULONG __stdcall NtDuplicateObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 );
_6_0_6001_sp1_windows_vista_NtDuplicateObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD
mov eax , 129
mov edx , 7FFE0300h
call dword ptr [edx]
ret 28
_6_0_6001_sp1_windows_vista_NtDuplicateObject ENDP
; ULONG __stdcall NtDuplicateToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtDuplicateToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 130
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtDuplicateToken ENDP
; ULONG __stdcall NtEnumerateBootEntries( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtEnumerateBootEntries PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 131
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtEnumerateBootEntries ENDP
; ULONG __stdcall NtEnumerateDriverEntries( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtEnumerateDriverEntries PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 132
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtEnumerateDriverEntries ENDP
; ULONG __stdcall NtEnumerateKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtEnumerateKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 133
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtEnumerateKey ENDP
; ULONG __stdcall NtEnumerateSystemEnvironmentValuesEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtEnumerateSystemEnvironmentValuesEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 134
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtEnumerateSystemEnvironmentValuesEx ENDP
; ULONG __stdcall NtEnumerateTransactionObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtEnumerateTransactionObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 135
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtEnumerateTransactionObject ENDP
; ULONG __stdcall NtEnumerateValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtEnumerateValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 136
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtEnumerateValueKey ENDP
; ULONG __stdcall NtExtendSection( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtExtendSection PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 137
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtExtendSection ENDP
; ULONG __stdcall NtFilterToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtFilterToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 138
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtFilterToken ENDP
; ULONG __stdcall NtFindAtom( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtFindAtom PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 139
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtFindAtom ENDP
; ULONG __stdcall NtFlushBuffersFile( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtFlushBuffersFile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 140
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtFlushBuffersFile ENDP
; ULONG __stdcall NtFlushInstructionCache( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtFlushInstructionCache PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 141
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtFlushInstructionCache ENDP
; ULONG __stdcall NtFlushKey( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtFlushKey PROC STDCALL arg_01:DWORD
mov eax , 142
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtFlushKey ENDP
; ULONG __stdcall NtFlushProcessWriteBuffers( );
_6_0_6001_sp1_windows_vista_NtFlushProcessWriteBuffers PROC STDCALL
mov eax , 143
mov edx , 7FFE0300h
call dword ptr [edx]
ret
_6_0_6001_sp1_windows_vista_NtFlushProcessWriteBuffers ENDP
; ULONG __stdcall NtFlushVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtFlushVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 144
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtFlushVirtualMemory ENDP
; ULONG __stdcall NtFlushWriteBuffer( );
_6_0_6001_sp1_windows_vista_NtFlushWriteBuffer PROC STDCALL
mov eax , 145
mov edx , 7FFE0300h
call dword ptr [edx]
ret
_6_0_6001_sp1_windows_vista_NtFlushWriteBuffer ENDP
; ULONG __stdcall NtFreeUserPhysicalPages( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtFreeUserPhysicalPages PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 146
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtFreeUserPhysicalPages ENDP
; ULONG __stdcall NtFreeVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtFreeVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 147
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtFreeVirtualMemory ENDP
; ULONG __stdcall NtFreezeRegistry( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtFreezeRegistry PROC STDCALL arg_01:DWORD
mov eax , 148
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtFreezeRegistry ENDP
; ULONG __stdcall NtFreezeTransactions( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtFreezeTransactions PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 149
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtFreezeTransactions ENDP
; ULONG __stdcall NtFsControlFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 );
_6_0_6001_sp1_windows_vista_NtFsControlFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD
mov eax , 150
mov edx , 7FFE0300h
call dword ptr [edx]
ret 40
_6_0_6001_sp1_windows_vista_NtFsControlFile ENDP
; ULONG __stdcall NtGetContextThread( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtGetContextThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 151
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtGetContextThread ENDP
; ULONG __stdcall NtGetDevicePowerState( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtGetDevicePowerState PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 152
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtGetDevicePowerState ENDP
; ULONG __stdcall NtGetNlsSectionPtr( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtGetNlsSectionPtr PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 153
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtGetNlsSectionPtr ENDP
; ULONG __stdcall NtGetPlugPlayEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtGetPlugPlayEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 154
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtGetPlugPlayEvent ENDP
; ULONG __stdcall NtGetWriteWatch( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 );
_6_0_6001_sp1_windows_vista_NtGetWriteWatch PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD
mov eax , 155
mov edx , 7FFE0300h
call dword ptr [edx]
ret 28
_6_0_6001_sp1_windows_vista_NtGetWriteWatch ENDP
; ULONG __stdcall NtImpersonateAnonymousToken( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtImpersonateAnonymousToken PROC STDCALL arg_01:DWORD
mov eax , 156
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtImpersonateAnonymousToken ENDP
; ULONG __stdcall NtImpersonateClientOfPort( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtImpersonateClientOfPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 157
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtImpersonateClientOfPort ENDP
; ULONG __stdcall NtImpersonateThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtImpersonateThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 158
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtImpersonateThread ENDP
; ULONG __stdcall NtInitializeNlsFiles( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtInitializeNlsFiles PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 159
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtInitializeNlsFiles ENDP
; ULONG __stdcall NtInitializeRegistry( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtInitializeRegistry PROC STDCALL arg_01:DWORD
mov eax , 160
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtInitializeRegistry ENDP
; ULONG __stdcall NtInitiatePowerAction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtInitiatePowerAction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 161
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtInitiatePowerAction ENDP
; ULONG __stdcall NtIsProcessInJob( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtIsProcessInJob PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 162
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtIsProcessInJob ENDP
; ULONG __stdcall NtIsSystemResumeAutomatic( );
_6_0_6001_sp1_windows_vista_NtIsSystemResumeAutomatic PROC STDCALL
mov eax , 163
mov edx , 7FFE0300h
call dword ptr [edx]
ret
_6_0_6001_sp1_windows_vista_NtIsSystemResumeAutomatic ENDP
; ULONG __stdcall NtListenPort( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtListenPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 164
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtListenPort ENDP
; ULONG __stdcall NtLoadDriver( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtLoadDriver PROC STDCALL arg_01:DWORD
mov eax , 165
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtLoadDriver ENDP
; ULONG __stdcall NtLoadKey( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtLoadKey PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 166
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtLoadKey ENDP
; ULONG __stdcall NtLoadKey2( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtLoadKey2 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 167
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtLoadKey2 ENDP
; ULONG __stdcall NtLoadKeyEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 );
_6_0_6001_sp1_windows_vista_NtLoadKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD
mov eax , 168
mov edx , 7FFE0300h
call dword ptr [edx]
ret 32
_6_0_6001_sp1_windows_vista_NtLoadKeyEx ENDP
; ULONG __stdcall NtLockFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 );
_6_0_6001_sp1_windows_vista_NtLockFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD
mov eax , 169
mov edx , 7FFE0300h
call dword ptr [edx]
ret 40
_6_0_6001_sp1_windows_vista_NtLockFile ENDP
; ULONG __stdcall NtLockProductActivationKeys( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtLockProductActivationKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 170
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtLockProductActivationKeys ENDP
; ULONG __stdcall NtLockRegistryKey( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtLockRegistryKey PROC STDCALL arg_01:DWORD
mov eax , 171
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtLockRegistryKey ENDP
; ULONG __stdcall NtLockVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtLockVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 172
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtLockVirtualMemory ENDP
; ULONG __stdcall NtMakePermanentObject( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtMakePermanentObject PROC STDCALL arg_01:DWORD
mov eax , 173
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtMakePermanentObject ENDP
; ULONG __stdcall NtMakeTemporaryObject( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtMakeTemporaryObject PROC STDCALL arg_01:DWORD
mov eax , 174
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtMakeTemporaryObject ENDP
; ULONG __stdcall NtMapUserPhysicalPages( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtMapUserPhysicalPages PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 175
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtMapUserPhysicalPages ENDP
; ULONG __stdcall NtMapUserPhysicalPagesScatter( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtMapUserPhysicalPagesScatter PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 176
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtMapUserPhysicalPagesScatter ENDP
; ULONG __stdcall NtMapViewOfSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 );
_6_0_6001_sp1_windows_vista_NtMapViewOfSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD
mov eax , 177
mov edx , 7FFE0300h
call dword ptr [edx]
ret 40
_6_0_6001_sp1_windows_vista_NtMapViewOfSection ENDP
; ULONG __stdcall NtModifyBootEntry( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtModifyBootEntry PROC STDCALL arg_01:DWORD
mov eax , 178
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtModifyBootEntry ENDP
; ULONG __stdcall NtModifyDriverEntry( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtModifyDriverEntry PROC STDCALL arg_01:DWORD
mov eax , 179
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtModifyDriverEntry ENDP
; ULONG __stdcall NtNotifyChangeDirectoryFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 );
_6_0_6001_sp1_windows_vista_NtNotifyChangeDirectoryFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD
mov eax , 180
mov edx , 7FFE0300h
call dword ptr [edx]
ret 36
_6_0_6001_sp1_windows_vista_NtNotifyChangeDirectoryFile ENDP
; ULONG __stdcall NtNotifyChangeKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 );
_6_0_6001_sp1_windows_vista_NtNotifyChangeKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD
mov eax , 181
mov edx , 7FFE0300h
call dword ptr [edx]
ret 40
_6_0_6001_sp1_windows_vista_NtNotifyChangeKey ENDP
; ULONG __stdcall NtNotifyChangeMultipleKeys( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 );
_6_0_6001_sp1_windows_vista_NtNotifyChangeMultipleKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD
mov eax , 182
mov edx , 7FFE0300h
call dword ptr [edx]
ret 48
_6_0_6001_sp1_windows_vista_NtNotifyChangeMultipleKeys ENDP
; ULONG __stdcall NtOpenDirectoryObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenDirectoryObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 183
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenDirectoryObject ENDP
; ULONG __stdcall NtOpenEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 184
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenEvent ENDP
; ULONG __stdcall NtOpenEventPair( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenEventPair PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 185
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenEventPair ENDP
; ULONG __stdcall NtOpenFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtOpenFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 186
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtOpenFile ENDP
; ULONG __stdcall NtOpenIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 187
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenIoCompletion ENDP
; ULONG __stdcall NtOpenJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 188
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenJobObject ENDP
; ULONG __stdcall NtOpenKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 189
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenKey ENDP
; ULONG __stdcall NtOpenKeyTransacted( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtOpenKeyTransacted PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 190
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtOpenKeyTransacted ENDP
; ULONG __stdcall NtOpenMutant( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 191
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenMutant ENDP
; ULONG __stdcall NtOpenPrivateNamespace( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtOpenPrivateNamespace PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 192
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtOpenPrivateNamespace ENDP
; ULONG __stdcall NtOpenObjectAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 , ULONG arg_12 );
_6_0_6001_sp1_windows_vista_NtOpenObjectAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD , arg_12:DWORD
mov eax , 193
mov edx , 7FFE0300h
call dword ptr [edx]
ret 48
_6_0_6001_sp1_windows_vista_NtOpenObjectAuditAlarm ENDP
; ULONG __stdcall NtOpenProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtOpenProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 194
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtOpenProcess ENDP
; ULONG __stdcall NtOpenProcessToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenProcessToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 195
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenProcessToken ENDP
; ULONG __stdcall NtOpenProcessTokenEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtOpenProcessTokenEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 196
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtOpenProcessTokenEx ENDP
; ULONG __stdcall NtOpenSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 197
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenSection ENDP
; ULONG __stdcall NtOpenSemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenSemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 198
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenSemaphore ENDP
; ULONG __stdcall NtOpenSession( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenSession PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 199
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenSession ENDP
; ULONG __stdcall NtOpenSymbolicLinkObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenSymbolicLinkObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 200
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenSymbolicLinkObject ENDP
; ULONG __stdcall NtOpenThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtOpenThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 201
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtOpenThread ENDP
; ULONG __stdcall NtOpenThreadToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtOpenThreadToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 202
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtOpenThreadToken ENDP
; ULONG __stdcall NtOpenThreadTokenEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtOpenThreadTokenEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 203
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtOpenThreadTokenEx ENDP
; ULONG __stdcall NtOpenTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 204
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenTimer ENDP
; ULONG __stdcall NtPlugPlayControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtPlugPlayControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 205
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtPlugPlayControl ENDP
; ULONG __stdcall NtPowerInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtPowerInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 206
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtPowerInformation ENDP
; ULONG __stdcall NtPrivilegeCheck( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtPrivilegeCheck PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 207
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtPrivilegeCheck ENDP
; ULONG __stdcall NtPrivilegeObjectAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtPrivilegeObjectAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 208
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtPrivilegeObjectAuditAlarm ENDP
; ULONG __stdcall NtPrivilegedServiceAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtPrivilegedServiceAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 209
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtPrivilegedServiceAuditAlarm ENDP
; ULONG __stdcall NtProtectVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtProtectVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 210
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtProtectVirtualMemory ENDP
; ULONG __stdcall NtPulseEvent( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtPulseEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 211
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtPulseEvent ENDP
; ULONG __stdcall NtQueryAttributesFile( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtQueryAttributesFile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 212
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtQueryAttributesFile ENDP
; ULONG __stdcall NtQueryBootEntryOrder( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtQueryBootEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 213
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtQueryBootEntryOrder ENDP
; ULONG __stdcall NtQueryBootOptions( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtQueryBootOptions PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 214
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtQueryBootOptions ENDP
; ULONG __stdcall NtQueryDebugFilterState( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtQueryDebugFilterState PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 215
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtQueryDebugFilterState ENDP
; ULONG __stdcall NtQueryDefaultLocale( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtQueryDefaultLocale PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 216
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtQueryDefaultLocale ENDP
; ULONG __stdcall NtQueryDefaultUILanguage( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtQueryDefaultUILanguage PROC STDCALL arg_01:DWORD
mov eax , 217
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtQueryDefaultUILanguage ENDP
; ULONG __stdcall NtQueryDirectoryFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 );
_6_0_6001_sp1_windows_vista_NtQueryDirectoryFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD
mov eax , 218
mov edx , 7FFE0300h
call dword ptr [edx]
ret 44
_6_0_6001_sp1_windows_vista_NtQueryDirectoryFile ENDP
; ULONG __stdcall NtQueryDirectoryObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 );
_6_0_6001_sp1_windows_vista_NtQueryDirectoryObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD
mov eax , 219
mov edx , 7FFE0300h
call dword ptr [edx]
ret 28
_6_0_6001_sp1_windows_vista_NtQueryDirectoryObject ENDP
; ULONG __stdcall NtQueryDriverEntryOrder( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtQueryDriverEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 220
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtQueryDriverEntryOrder ENDP
; ULONG __stdcall NtQueryEaFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 );
_6_0_6001_sp1_windows_vista_NtQueryEaFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD
mov eax , 221
mov edx , 7FFE0300h
call dword ptr [edx]
ret 36
_6_0_6001_sp1_windows_vista_NtQueryEaFile ENDP
; ULONG __stdcall NtQueryEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 222
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryEvent ENDP
; ULONG __stdcall NtQueryFullAttributesFile( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtQueryFullAttributesFile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 223
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtQueryFullAttributesFile ENDP
; ULONG __stdcall NtQueryInformationAtom( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationAtom PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 224
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationAtom ENDP
; ULONG __stdcall NtQueryInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 225
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationFile ENDP
; ULONG __stdcall NtQueryInformationJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 226
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationJobObject ENDP
; ULONG __stdcall NtQueryInformationPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 227
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationPort ENDP
; ULONG __stdcall NtQueryInformationProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 228
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationProcess ENDP
; ULONG __stdcall NtQueryInformationThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 229
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationThread ENDP
; ULONG __stdcall NtQueryInformationToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 230
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationToken ENDP
; ULONG __stdcall NtQueryInstallUILanguage( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtQueryInstallUILanguage PROC STDCALL arg_01:DWORD
mov eax , 231
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtQueryInstallUILanguage ENDP
; ULONG __stdcall NtQueryIntervalProfile( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtQueryIntervalProfile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 232
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtQueryIntervalProfile ENDP
; ULONG __stdcall NtQueryIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 233
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryIoCompletion ENDP
; ULONG __stdcall NtQueryKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 234
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryKey ENDP
; ULONG __stdcall NtQueryMultipleValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtQueryMultipleValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 235
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtQueryMultipleValueKey ENDP
; ULONG __stdcall NtQueryMutant( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 236
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryMutant ENDP
; ULONG __stdcall NtQueryObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 237
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryObject ENDP
; ULONG __stdcall NtQueryOpenSubKeys( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtQueryOpenSubKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 238
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtQueryOpenSubKeys ENDP
; ULONG __stdcall NtQueryOpenSubKeysEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtQueryOpenSubKeysEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 239
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtQueryOpenSubKeysEx ENDP
; ULONG __stdcall NtQueryPerformanceCounter( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtQueryPerformanceCounter PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 240
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtQueryPerformanceCounter ENDP
; ULONG __stdcall NtQueryQuotaInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 );
_6_0_6001_sp1_windows_vista_NtQueryQuotaInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD
mov eax , 241
mov edx , 7FFE0300h
call dword ptr [edx]
ret 36
_6_0_6001_sp1_windows_vista_NtQueryQuotaInformationFile ENDP
; ULONG __stdcall NtQuerySection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQuerySection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 242
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQuerySection ENDP
; ULONG __stdcall NtQuerySecurityObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQuerySecurityObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 243
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQuerySecurityObject ENDP
; ULONG __stdcall NtQuerySemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQuerySemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 244
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQuerySemaphore ENDP
; ULONG __stdcall NtQuerySymbolicLinkObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtQuerySymbolicLinkObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 245
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtQuerySymbolicLinkObject ENDP
; ULONG __stdcall NtQuerySystemEnvironmentValue( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtQuerySystemEnvironmentValue PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 246
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtQuerySystemEnvironmentValue ENDP
; ULONG __stdcall NtQuerySystemEnvironmentValueEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQuerySystemEnvironmentValueEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 247
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQuerySystemEnvironmentValueEx ENDP
; ULONG __stdcall NtQuerySystemInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtQuerySystemInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 248
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtQuerySystemInformation ENDP
; ULONG __stdcall NtQuerySystemTime( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtQuerySystemTime PROC STDCALL arg_01:DWORD
mov eax , 249
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtQuerySystemTime ENDP
; ULONG __stdcall NtQueryTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 250
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryTimer ENDP
; ULONG __stdcall NtQueryTimerResolution( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtQueryTimerResolution PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 251
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtQueryTimerResolution ENDP
; ULONG __stdcall NtQueryValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtQueryValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 252
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtQueryValueKey ENDP
; ULONG __stdcall NtQueryVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtQueryVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 253
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtQueryVirtualMemory ENDP
; ULONG __stdcall NtQueryVolumeInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryVolumeInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 254
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryVolumeInformationFile ENDP
; ULONG __stdcall NtQueueApcThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueueApcThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 255
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueueApcThread ENDP
; ULONG __stdcall NtRaiseException( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtRaiseException PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 256
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtRaiseException ENDP
; ULONG __stdcall NtRaiseHardError( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtRaiseHardError PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 257
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtRaiseHardError ENDP
; ULONG __stdcall NtReadFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 );
_6_0_6001_sp1_windows_vista_NtReadFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD
mov eax , 258
mov edx , 7FFE0300h
call dword ptr [edx]
ret 36
_6_0_6001_sp1_windows_vista_NtReadFile ENDP
; ULONG __stdcall NtReadFileScatter( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 );
_6_0_6001_sp1_windows_vista_NtReadFileScatter PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD
mov eax , 259
mov edx , 7FFE0300h
call dword ptr [edx]
ret 36
_6_0_6001_sp1_windows_vista_NtReadFileScatter ENDP
; ULONG __stdcall NtReadRequestData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtReadRequestData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 260
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtReadRequestData ENDP
; ULONG __stdcall NtReadVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtReadVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 261
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtReadVirtualMemory ENDP
; ULONG __stdcall NtRegisterThreadTerminatePort( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtRegisterThreadTerminatePort PROC STDCALL arg_01:DWORD
mov eax , 262
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtRegisterThreadTerminatePort ENDP
; ULONG __stdcall NtReleaseMutant( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtReleaseMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 263
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtReleaseMutant ENDP
; ULONG __stdcall NtReleaseSemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtReleaseSemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 264
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtReleaseSemaphore ENDP
; ULONG __stdcall NtRemoveIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtRemoveIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 265
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtRemoveIoCompletion ENDP
; ULONG __stdcall NtRemoveProcessDebug( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtRemoveProcessDebug PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 266
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtRemoveProcessDebug ENDP
; ULONG __stdcall NtRenameKey( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtRenameKey PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 267
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtRenameKey ENDP
; ULONG __stdcall NtReplaceKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtReplaceKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 268
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtReplaceKey ENDP
; ULONG __stdcall NtReplacePartitionUnit( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtReplacePartitionUnit PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 269
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtReplacePartitionUnit ENDP
; ULONG __stdcall NtReplyPort( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtReplyPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 270
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtReplyPort ENDP
; ULONG __stdcall NtReplyWaitReceivePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtReplyWaitReceivePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 271
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtReplyWaitReceivePort ENDP
; ULONG __stdcall NtReplyWaitReceivePortEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtReplyWaitReceivePortEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 272
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtReplyWaitReceivePortEx ENDP
; ULONG __stdcall NtReplyWaitReplyPort( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtReplyWaitReplyPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 273
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtReplyWaitReplyPort ENDP
; ULONG __stdcall NtRequestDeviceWakeup( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtRequestDeviceWakeup PROC STDCALL arg_01:DWORD
mov eax , 274
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtRequestDeviceWakeup ENDP
; ULONG __stdcall NtRequestPort( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtRequestPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 275
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtRequestPort ENDP
; ULONG __stdcall NtRequestWaitReplyPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtRequestWaitReplyPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 276
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtRequestWaitReplyPort ENDP
; ULONG __stdcall NtRequestWakeupLatency( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtRequestWakeupLatency PROC STDCALL arg_01:DWORD
mov eax , 277
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtRequestWakeupLatency ENDP
; ULONG __stdcall NtResetEvent( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtResetEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 278
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtResetEvent ENDP
; ULONG __stdcall NtResetWriteWatch( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtResetWriteWatch PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 279
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtResetWriteWatch ENDP
; ULONG __stdcall NtRestoreKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtRestoreKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 280
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtRestoreKey ENDP
; ULONG __stdcall NtResumeProcess( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtResumeProcess PROC STDCALL arg_01:DWORD
mov eax , 281
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtResumeProcess ENDP
; ULONG __stdcall NtResumeThread( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtResumeThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 282
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtResumeThread ENDP
; ULONG __stdcall NtSaveKey( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSaveKey PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 283
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSaveKey ENDP
; ULONG __stdcall NtSaveKeyEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtSaveKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 284
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtSaveKeyEx ENDP
; ULONG __stdcall NtSaveMergedKeys( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtSaveMergedKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 285
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtSaveMergedKeys ENDP
; ULONG __stdcall NtSecureConnectPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 );
_6_0_6001_sp1_windows_vista_NtSecureConnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD
mov eax , 286
mov edx , 7FFE0300h
call dword ptr [edx]
ret 36
_6_0_6001_sp1_windows_vista_NtSecureConnectPort ENDP
; ULONG __stdcall NtSetBootEntryOrder( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSetBootEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 287
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSetBootEntryOrder ENDP
; ULONG __stdcall NtSetBootOptions( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSetBootOptions PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 288
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSetBootOptions ENDP
; ULONG __stdcall NtSetContextThread( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSetContextThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 289
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSetContextThread ENDP
; ULONG __stdcall NtSetDebugFilterState( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtSetDebugFilterState PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 290
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtSetDebugFilterState ENDP
; ULONG __stdcall NtSetDefaultHardErrorPort( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtSetDefaultHardErrorPort PROC STDCALL arg_01:DWORD
mov eax , 291
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtSetDefaultHardErrorPort ENDP
; ULONG __stdcall NtSetDefaultLocale( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSetDefaultLocale PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 292
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSetDefaultLocale ENDP
; ULONG __stdcall NtSetDefaultUILanguage( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtSetDefaultUILanguage PROC STDCALL arg_01:DWORD
mov eax , 293
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtSetDefaultUILanguage ENDP
; ULONG __stdcall NtSetDriverEntryOrder( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSetDriverEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 294
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSetDriverEntryOrder ENDP
; ULONG __stdcall NtSetEaFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetEaFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 295
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetEaFile ENDP
; ULONG __stdcall NtSetEvent( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSetEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 296
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSetEvent ENDP
; ULONG __stdcall NtSetEventBoostPriority( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtSetEventBoostPriority PROC STDCALL arg_01:DWORD
mov eax , 297
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtSetEventBoostPriority ENDP
; ULONG __stdcall NtSetHighEventPair( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtSetHighEventPair PROC STDCALL arg_01:DWORD
mov eax , 298
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtSetHighEventPair ENDP
; ULONG __stdcall NtSetHighWaitLowEventPair( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtSetHighWaitLowEventPair PROC STDCALL arg_01:DWORD
mov eax , 299
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtSetHighWaitLowEventPair ENDP
; ULONG __stdcall NtSetInformationDebugObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtSetInformationDebugObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 300
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtSetInformationDebugObject ENDP
; ULONG __stdcall NtSetInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtSetInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 301
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtSetInformationFile ENDP
; ULONG __stdcall NtSetInformationJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetInformationJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 302
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetInformationJobObject ENDP
; ULONG __stdcall NtSetInformationKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetInformationKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 303
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetInformationKey ENDP
; ULONG __stdcall NtSetInformationObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetInformationObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 304
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetInformationObject ENDP
; ULONG __stdcall NtSetInformationProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetInformationProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 305
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetInformationProcess ENDP
; ULONG __stdcall NtSetInformationThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetInformationThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 306
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetInformationThread ENDP
; ULONG __stdcall NtSetInformationToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetInformationToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 307
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetInformationToken ENDP
; ULONG __stdcall NtSetIntervalProfile( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSetIntervalProfile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 308
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSetIntervalProfile ENDP
; ULONG __stdcall NtSetIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtSetIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 309
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtSetIoCompletion ENDP
; ULONG __stdcall NtSetLdtEntries( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtSetLdtEntries PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 310
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtSetLdtEntries ENDP
; ULONG __stdcall NtSetLowEventPair( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtSetLowEventPair PROC STDCALL arg_01:DWORD
mov eax , 311
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtSetLowEventPair ENDP
; ULONG __stdcall NtSetLowWaitHighEventPair( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtSetLowWaitHighEventPair PROC STDCALL arg_01:DWORD
mov eax , 312
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtSetLowWaitHighEventPair ENDP
; ULONG __stdcall NtSetQuotaInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetQuotaInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 313
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetQuotaInformationFile ENDP
; ULONG __stdcall NtSetSecurityObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtSetSecurityObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 314
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtSetSecurityObject ENDP
; ULONG __stdcall NtSetSystemEnvironmentValue( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSetSystemEnvironmentValue PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 315
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSetSystemEnvironmentValue ENDP
; ULONG __stdcall NtSetSystemEnvironmentValueEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtSetSystemEnvironmentValueEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 316
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtSetSystemEnvironmentValueEx ENDP
; ULONG __stdcall NtSetSystemInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtSetSystemInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 317
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtSetSystemInformation ENDP
; ULONG __stdcall NtSetSystemPowerState( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtSetSystemPowerState PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 318
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtSetSystemPowerState ENDP
; ULONG __stdcall NtSetSystemTime( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSetSystemTime PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 319
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSetSystemTime ENDP
; ULONG __stdcall NtSetThreadExecutionState( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSetThreadExecutionState PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 320
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSetThreadExecutionState ENDP
; ULONG __stdcall NtSetTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 );
_6_0_6001_sp1_windows_vista_NtSetTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD
mov eax , 321
mov edx , 7FFE0300h
call dword ptr [edx]
ret 28
_6_0_6001_sp1_windows_vista_NtSetTimer ENDP
; ULONG __stdcall NtSetTimerResolution( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtSetTimerResolution PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 322
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtSetTimerResolution ENDP
; ULONG __stdcall NtSetUuidSeed( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtSetUuidSeed PROC STDCALL arg_01:DWORD
mov eax , 323
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtSetUuidSeed ENDP
; ULONG __stdcall NtSetValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtSetValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 324
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtSetValueKey ENDP
; ULONG __stdcall NtSetVolumeInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtSetVolumeInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 325
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtSetVolumeInformationFile ENDP
; ULONG __stdcall NtShutdownSystem( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtShutdownSystem PROC STDCALL arg_01:DWORD
mov eax , 326
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtShutdownSystem ENDP
; ULONG __stdcall NtSignalAndWaitForSingleObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSignalAndWaitForSingleObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 327
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSignalAndWaitForSingleObject ENDP
; ULONG __stdcall NtStartProfile( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtStartProfile PROC STDCALL arg_01:DWORD
mov eax , 328
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtStartProfile ENDP
; ULONG __stdcall NtStopProfile( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtStopProfile PROC STDCALL arg_01:DWORD
mov eax , 329
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtStopProfile ENDP
; ULONG __stdcall NtSuspendProcess( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtSuspendProcess PROC STDCALL arg_01:DWORD
mov eax , 330
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtSuspendProcess ENDP
; ULONG __stdcall NtSuspendThread( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtSuspendThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 331
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtSuspendThread ENDP
; ULONG __stdcall NtSystemDebugControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtSystemDebugControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 332
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtSystemDebugControl ENDP
; ULONG __stdcall NtTerminateJobObject( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtTerminateJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 333
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtTerminateJobObject ENDP
; ULONG __stdcall NtTerminateProcess( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtTerminateProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 334
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtTerminateProcess ENDP
; ULONG __stdcall NtTerminateThread( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtTerminateThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 335
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtTerminateThread ENDP
; ULONG __stdcall NtTestAlert( );
_6_0_6001_sp1_windows_vista_NtTestAlert PROC STDCALL
mov eax , 336
mov edx , 7FFE0300h
call dword ptr [edx]
ret
_6_0_6001_sp1_windows_vista_NtTestAlert ENDP
; ULONG __stdcall NtThawRegistry( );
_6_0_6001_sp1_windows_vista_NtThawRegistry PROC STDCALL
mov eax , 337
mov edx , 7FFE0300h
call dword ptr [edx]
ret
_6_0_6001_sp1_windows_vista_NtThawRegistry ENDP
; ULONG __stdcall NtThawTransactions( );
_6_0_6001_sp1_windows_vista_NtThawTransactions PROC STDCALL
mov eax , 338
mov edx , 7FFE0300h
call dword ptr [edx]
ret
_6_0_6001_sp1_windows_vista_NtThawTransactions ENDP
; ULONG __stdcall NtTraceEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtTraceEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 339
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtTraceEvent ENDP
; ULONG __stdcall NtTraceControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtTraceControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 340
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtTraceControl ENDP
; ULONG __stdcall NtTranslateFilePath( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtTranslateFilePath PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 341
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtTranslateFilePath ENDP
; ULONG __stdcall NtUnloadDriver( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtUnloadDriver PROC STDCALL arg_01:DWORD
mov eax , 342
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtUnloadDriver ENDP
; ULONG __stdcall NtUnloadKey( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtUnloadKey PROC STDCALL arg_01:DWORD
mov eax , 343
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtUnloadKey ENDP
; ULONG __stdcall NtUnloadKey2( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtUnloadKey2 PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 344
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtUnloadKey2 ENDP
; ULONG __stdcall NtUnloadKeyEx( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtUnloadKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 345
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtUnloadKeyEx ENDP
; ULONG __stdcall NtUnlockFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtUnlockFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 346
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtUnlockFile ENDP
; ULONG __stdcall NtUnlockVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtUnlockVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 347
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtUnlockVirtualMemory ENDP
; ULONG __stdcall NtUnmapViewOfSection( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtUnmapViewOfSection PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 348
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtUnmapViewOfSection ENDP
; ULONG __stdcall NtVdmControl( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtVdmControl PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 349
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtVdmControl ENDP
; ULONG __stdcall NtWaitForDebugEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtWaitForDebugEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 350
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtWaitForDebugEvent ENDP
; ULONG __stdcall NtWaitForMultipleObjects( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtWaitForMultipleObjects PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 351
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtWaitForMultipleObjects ENDP
; ULONG __stdcall NtWaitForSingleObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtWaitForSingleObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 352
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtWaitForSingleObject ENDP
; ULONG __stdcall NtWaitHighEventPair( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtWaitHighEventPair PROC STDCALL arg_01:DWORD
mov eax , 353
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtWaitHighEventPair ENDP
; ULONG __stdcall NtWaitLowEventPair( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtWaitLowEventPair PROC STDCALL arg_01:DWORD
mov eax , 354
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtWaitLowEventPair ENDP
; ULONG __stdcall NtWriteFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 );
_6_0_6001_sp1_windows_vista_NtWriteFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD
mov eax , 355
mov edx , 7FFE0300h
call dword ptr [edx]
ret 36
_6_0_6001_sp1_windows_vista_NtWriteFile ENDP
; ULONG __stdcall NtWriteFileGather( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 );
_6_0_6001_sp1_windows_vista_NtWriteFileGather PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD
mov eax , 356
mov edx , 7FFE0300h
call dword ptr [edx]
ret 36
_6_0_6001_sp1_windows_vista_NtWriteFileGather ENDP
; ULONG __stdcall NtWriteRequestData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtWriteRequestData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 357
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtWriteRequestData ENDP
; ULONG __stdcall NtWriteVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtWriteVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 358
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtWriteVirtualMemory ENDP
; ULONG __stdcall NtYieldExecution( );
_6_0_6001_sp1_windows_vista_NtYieldExecution PROC STDCALL
mov eax , 359
mov edx , 7FFE0300h
call dword ptr [edx]
ret
_6_0_6001_sp1_windows_vista_NtYieldExecution ENDP
; ULONG __stdcall NtCreateKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtCreateKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 360
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtCreateKeyedEvent ENDP
; ULONG __stdcall NtOpenKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtOpenKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 361
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtOpenKeyedEvent ENDP
; ULONG __stdcall NtReleaseKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtReleaseKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 362
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtReleaseKeyedEvent ENDP
; ULONG __stdcall NtWaitForKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtWaitForKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 363
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtWaitForKeyedEvent ENDP
; ULONG __stdcall NtQueryPortInformationProcess( );
_6_0_6001_sp1_windows_vista_NtQueryPortInformationProcess PROC STDCALL
mov eax , 364
mov edx , 7FFE0300h
call dword ptr [edx]
ret
_6_0_6001_sp1_windows_vista_NtQueryPortInformationProcess ENDP
; ULONG __stdcall NtGetCurrentProcessorNumber( );
_6_0_6001_sp1_windows_vista_NtGetCurrentProcessorNumber PROC STDCALL
mov eax , 365
mov edx , 7FFE0300h
call dword ptr [edx]
ret
_6_0_6001_sp1_windows_vista_NtGetCurrentProcessorNumber ENDP
; ULONG __stdcall NtWaitForMultipleObjects32( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtWaitForMultipleObjects32 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 366
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtWaitForMultipleObjects32 ENDP
; ULONG __stdcall NtGetNextProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtGetNextProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 367
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtGetNextProcess ENDP
; ULONG __stdcall NtGetNextThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtGetNextThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 368
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtGetNextThread ENDP
; ULONG __stdcall NtCancelIoFileEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtCancelIoFileEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 369
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtCancelIoFileEx ENDP
; ULONG __stdcall NtCancelSynchronousIoFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtCancelSynchronousIoFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 370
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtCancelSynchronousIoFile ENDP
; ULONG __stdcall NtRemoveIoCompletionEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtRemoveIoCompletionEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 371
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtRemoveIoCompletionEx ENDP
; ULONG __stdcall NtRegisterProtocolAddressInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtRegisterProtocolAddressInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 372
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtRegisterProtocolAddressInformation ENDP
; ULONG __stdcall NtPropagationComplete( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtPropagationComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 373
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtPropagationComplete ENDP
; ULONG __stdcall NtPropagationFailed( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtPropagationFailed PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 374
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtPropagationFailed ENDP
; ULONG __stdcall NtCreateWorkerFactory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 );
_6_0_6001_sp1_windows_vista_NtCreateWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD
mov eax , 375
mov edx , 7FFE0300h
call dword ptr [edx]
ret 40
_6_0_6001_sp1_windows_vista_NtCreateWorkerFactory ENDP
; ULONG __stdcall NtReleaseWorkerFactoryWorker( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtReleaseWorkerFactoryWorker PROC STDCALL arg_01:DWORD
mov eax , 376
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtReleaseWorkerFactoryWorker ENDP
; ULONG __stdcall NtWaitForWorkViaWorkerFactory( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtWaitForWorkViaWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 377
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtWaitForWorkViaWorkerFactory ENDP
; ULONG __stdcall NtSetInformationWorkerFactory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_0_6001_sp1_windows_vista_NtSetInformationWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 378
mov edx , 7FFE0300h
call dword ptr [edx]
ret 16
_6_0_6001_sp1_windows_vista_NtSetInformationWorkerFactory ENDP
; ULONG __stdcall NtQueryInformationWorkerFactory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryInformationWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 379
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryInformationWorkerFactory ENDP
; ULONG __stdcall NtWorkerFactoryWorkerReady( ULONG arg_01 );
_6_0_6001_sp1_windows_vista_NtWorkerFactoryWorkerReady PROC STDCALL arg_01:DWORD
mov eax , 380
mov edx , 7FFE0300h
call dword ptr [edx]
ret 4
_6_0_6001_sp1_windows_vista_NtWorkerFactoryWorkerReady ENDP
; ULONG __stdcall NtShutdownWorkerFactory( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtShutdownWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 381
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtShutdownWorkerFactory ENDP
; ULONG __stdcall NtCreateThreadEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 );
_6_0_6001_sp1_windows_vista_NtCreateThreadEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD
mov eax , 382
mov edx , 7FFE0300h
call dword ptr [edx]
ret 44
_6_0_6001_sp1_windows_vista_NtCreateThreadEx ENDP
; ULONG __stdcall NtCreateUserProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 , ULONG arg_08 , ULONG arg_09 , ULONG arg_10 , ULONG arg_11 );
_6_0_6001_sp1_windows_vista_NtCreateUserProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD , arg_07:DWORD , arg_08:DWORD , arg_09:DWORD , arg_10:DWORD , arg_11:DWORD
mov eax , 383
mov edx , 7FFE0300h
call dword ptr [edx]
ret 44
_6_0_6001_sp1_windows_vista_NtCreateUserProcess ENDP
; ULONG __stdcall NtQueryLicenseValue( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_0_6001_sp1_windows_vista_NtQueryLicenseValue PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 384
mov edx , 7FFE0300h
call dword ptr [edx]
ret 20
_6_0_6001_sp1_windows_vista_NtQueryLicenseValue ENDP
; ULONG __stdcall NtMapCMFModule( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_0_6001_sp1_windows_vista_NtMapCMFModule PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 385
mov edx , 7FFE0300h
call dword ptr [edx]
ret 24
_6_0_6001_sp1_windows_vista_NtMapCMFModule ENDP
; ULONG __stdcall NtIsUILanguageComitted( );
_6_0_6001_sp1_windows_vista_NtIsUILanguageComitted PROC STDCALL
mov eax , 386
mov edx , 7FFE0300h
call dword ptr [edx]
ret
_6_0_6001_sp1_windows_vista_NtIsUILanguageComitted ENDP
; ULONG __stdcall NtFlushInstallUILanguage( ULONG arg_01 , ULONG arg_02 );
_6_0_6001_sp1_windows_vista_NtFlushInstallUILanguage PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 387
mov edx , 7FFE0300h
call dword ptr [edx]
ret 8
_6_0_6001_sp1_windows_vista_NtFlushInstallUILanguage ENDP
; ULONG __stdcall NtGetMUIRegistryInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtGetMUIRegistryInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 388
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtGetMUIRegistryInfo ENDP
; ULONG __stdcall NtAcquireCMFViewOwnership( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_0_6001_sp1_windows_vista_NtAcquireCMFViewOwnership PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 389
mov edx , 7FFE0300h
call dword ptr [edx]
ret 12
_6_0_6001_sp1_windows_vista_NtAcquireCMFViewOwnership ENDP
; ULONG __stdcall NtReleaseCMFViewOwnership( );
_6_0_6001_sp1_windows_vista_NtReleaseCMFViewOwnership PROC STDCALL
mov eax , 390
mov edx , 7FFE0300h
call dword ptr [edx]
ret
_6_0_6001_sp1_windows_vista_NtReleaseCMFViewOwnership ENDP
| 30.881019 | 344 | 0.80195 |
51ef43cc1139f205f04caaf070f9cee333226bd6 | 528 | asm | Assembly | ASPL/loops.asm | timo-cmd/ASPL | fe9d959f97353c048e28b1d6b5d4d4679e33cc5e | [
"MIT"
] | 1 | 2020-05-22T09:33:31.000Z | 2020-05-22T09:33:31.000Z | ASPL/loops.asm | timo-cmd/ASPL | fe9d959f97353c048e28b1d6b5d4d4679e33cc5e | [
"MIT"
] | 6 | 2020-06-03T17:02:05.000Z | 2020-07-18T06:06:29.000Z | ASPL/loops.asm | timo-cmd/ASPL | fe9d959f97353c048e28b1d6b5d4d4679e33cc5e | [
"MIT"
] | null | null | null | ; carefull execute this carefully !
; Press the A key directly.
; this may overload the stack-buffer and will damage the virtual machine.
.data
.waiting string "Waiting for the [A] key pressed...\n"
.text
.global main:
get_input:
psh A
psh C
mvi A, 1 ; syscall for stdin
ldv C, 0 ; mode for output
sys ; initiate system call
pop C
pop A
ret
main:
mvi A, 0
mvi b, .waiting
ldv c, 4
sys
mvi A, 97
mvi B, 0
ldv16 C, loop:
ldv16 D, get_input:
loop:
cal D
jne A, B, C
hlt
| 14.27027 | 73 | 0.626894 |
c9fe0784446bedef7242bb6db8e8c514c1e6cb69 | 656 | asm | Assembly | cards/bn5/ModCards/136-A020 KillerEye.asm | RockmanEXEZone/MMBN-Mod-Card-Kit | d591ddca5566dbb323dc19c11e69410fa4073d1b | [
"Unlicense"
] | 10 | 2017-12-05T14:25:38.000Z | 2022-02-21T04:28:00.000Z | cards/bn5/ModCards/136-A020 KillerEye.asm | RockmanEXEZone/MMBN-Mod-Card-Kit | d591ddca5566dbb323dc19c11e69410fa4073d1b | [
"Unlicense"
] | null | null | null | cards/bn5/ModCards/136-A020 KillerEye.asm | RockmanEXEZone/MMBN-Mod-Card-Kit | d591ddca5566dbb323dc19c11e69410fa4073d1b | [
"Unlicense"
] | null | null | null | .include "defaults_mod.asm"
table_file_jp equ "exe5-utf8.tbl"
table_file_en equ "bn5-utf8.tbl"
game_code_len equ 3
game_code equ 0x4252424A // BRBJ
game_code_2 equ 0x42524245 // BRBE
game_code_3 equ 0x42524250 // BRBP
card_type equ 1
card_id equ 20
card_no equ "020"
card_sub equ "Mod Card 020"
card_sub_x equ 64
card_desc_len equ 2
card_desc_1 equ "KillerEye"
card_desc_2 equ "21MB"
card_desc_3 equ ""
card_name_jp_full equ "キラーズアイ"
card_name_jp_game equ "キラーズアイ"
card_name_en_full equ "KillerEye"
card_name_en_game equ "KillerEye"
card_address equ ""
card_address_id equ 0
card_bug equ 0
card_wrote_en equ ""
card_wrote_jp equ "" | 24.296296 | 35 | 0.77439 |
48f4ac0d80f5dbb53aadd841733e7f0d72046cb8 | 2,841 | asm | Assembly | tinyload.asm | maikmerten/tinyload | ad5b10e3f989ba365be39cb7d504f5123175075f | [
"MIT"
] | 5 | 2017-09-10T11:51:11.000Z | 2021-06-14T11:11:40.000Z | tinyload.asm | maikmerten/tinyload | ad5b10e3f989ba365be39cb7d504f5123175075f | [
"MIT"
] | null | null | null | tinyload.asm | maikmerten/tinyload | ad5b10e3f989ba365be39cb7d504f5123175075f | [
"MIT"
] | 1 | 2021-06-14T11:12:22.000Z | 2021-06-14T11:12:22.000Z | ;;
;; A minimal loader that tries to load and execute a file
;; from a FAT16-formatted SD card.
;;
;; Basic definitions ################################################
;; positions of basic constants
CONST32_1 = $a0
CONST32_2 = $a4
CONST32_32 = $a8
;; arguments, return values, temporary zp storage
;; those are not guaranteed to be preserved by normal subroutines
;; interrupt handlers, however, *are* mandated to restore those!
ARG1 = $c0
ARG2 = ARG1 + 4
RET = ARG2 + 4
TMP = RET + 4
TMP1 = TMP
TMP2 = TMP1 + 4
TMP3 = TMP2 + 4
TMP4 = TMP3 + 4
;; some space to save registers if we cannot use the stack
SAVEA = TMP4 + 4
SAVEX = SAVEA + 1
SAVEY = SAVEX + 1
;; some storage for pointers
PTR1 = SAVEY + 1
PTR2 = PTR1 + 2
PTR3 = PTR2 + 2
;; pointers for math (arguments and result)
MPTR1 = PTR3 + 2 ; first argument
MPTR2 = MPTR1 + 2 ; second argument
MPTR3 = MPTR2 + 2 ; primary result
MPTR4 = MPTR3 + 2 ; secondary result (where relevant, like remainder of division)
;; those *are* saved by subroutines and interrupts!
VREG1 = MPTR4 + 2
VREG2 = VREG1 + 1
;; IRQ vector for applications
IRQ_VEC = VREG2 + 1
;; A few special characters
C_LF = $0A ; line feed
C_CR = $0D ; carriage return
C_BS = $08 ; backspace
C_PT = $2E ; point
C_SP = $20 ; space
C_EX = $21 ; exclamation mark
;; Macros ###########################################################
.include "macros.asm"
;; Predefined Data ##################################################
.segment "DATA"
S_AUTOEXEC: .asciiz "AUTOEXECBIN"
;; Code #############################################################
.segment "CODE"
.include "util.asm"
.include "math.asm"
.include "io.asm"
.include "fat.asm"
.proc START
sei
cld ; clear decimal mode
ldx #$FF
txs ; initialize stack pointer
;; clear zero-page to avoid having to clear variables
lda #0
tax
clear_zp:
sta $0000,x
inx
bne clear_zp
;; put some constants in ZP
lda #1
sta CONST32_1
lda #2
sta CONST32_2
lda #32
sta CONST32_32
jsr io_init
jsr fat_init
cli
;; look for autoexec.bin on SD card #########################
jsr fat_load_autoexec;
lda RET
bne error ; file not found?
jmp $0800 ; jump into loaded code
error:
;; print out exclamation mark in case of an error
lda #C_EX
jsr io_write_char
bne error
.endproc
;;
;; IRQ handler
;;
.proc IRQ
pha ; save affected register
lda IRQ_VEC ; check if IRQ vector is zero
ora IRQ_VEC+1
beq end ; if so, skip
; there is no indirect jsr so push return address to stack
; so the actual IRQ handler code can rts later on
prepare_rts end
jmp (IRQ_VEC)
end:
pla ; restore register
rti ; return from interrupt
.endproc
; system vectors ####################################################
.segment "VECTORS"
.org $FFFA
.addr IRQ ; NMI vector
.addr START ; RESET vector
.addr IRQ ; IRQ vector
| 17.537037 | 81 | 0.615628 |
214d7ce6783b3db616a765f01858f6430234505c | 1,551 | asm | Assembly | Appl/Art/Decks/GeoDeck/CGAClub4.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Appl/Art/Decks/GeoDeck/CGAClub4.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Appl/Art/Decks/GeoDeck/CGAClub4.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | CGAClub4 label byte
word C_BLACK
Bitmap <67,41,BMC_PACKBITS,BMF_MONO>
db 0xf8, 0x00
db 0xf8, 0x00
db 0x08, 0x03, 0x80, 0x07, 0x00, 0x00, 0x1c, 0x00,
0x08, 0x00
db 0x08, 0x07, 0x80, 0x1f, 0xc0, 0x00, 0x7f, 0x00,
0x1c, 0x00
db 0x08, 0x0d, 0x80, 0x1f, 0xc0, 0x00, 0x7f, 0x00,
0x2a, 0x00
db 0x08, 0x19, 0x80, 0x77, 0x70, 0x01, 0xdd, 0xc0,
0x7f, 0x00
db 0x08, 0x3f, 0xe1, 0xff, 0xfc, 0x07, 0xff, 0xf0,
0x2a, 0x00
db 0x08, 0x01, 0x81, 0xff, 0xfc, 0x07, 0xff, 0xf0,
0x08, 0x00
db 0x08, 0x07, 0xe0, 0x77, 0x70, 0x01, 0xdd, 0xc0,
0x1c, 0x00
db 0x05, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x3e, 0xfe,
0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
db 0x05, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x3e, 0xfe,
0x00
db 0x08, 0x07, 0x00, 0x77, 0x70, 0x01, 0xdd, 0xc0,
0xfc, 0x00
db 0x08, 0x02, 0x01, 0xff, 0xfc, 0x07, 0xff, 0xf0,
0x30, 0x00
db 0x08, 0x0a, 0x81, 0xff, 0xfc, 0x07, 0xff, 0xf0,
0xff, 0x80
db 0x08, 0x1f, 0xc0, 0x77, 0x70, 0x01, 0xdd, 0xc0,
0x33, 0x00
db 0x08, 0x0a, 0x80, 0x1f, 0xc0, 0x00, 0x7f, 0x00,
0x36, 0x00
db 0x08, 0x07, 0x00, 0x1f, 0xc0, 0x00, 0x7f, 0x00,
0x3c, 0x00
db 0x08, 0x02, 0x00, 0x07, 0x00, 0x00, 0x1c, 0x00,
0x38, 0x00
db 0xf8, 0x00
db 0xf8, 0x00
| 25.42623 | 53 | 0.626692 |
c29f199fe9f5efadb15e8d84990e399dd2cb3bbe | 20,237 | asm | Assembly | z80src/float.asm | qoelet/z80pack | c8845396636e7316d449b4107c5c7ab98fffbc1a | [
"MIT"
] | 85 | 2018-02-26T02:45:55.000Z | 2022-03-27T00:04:54.000Z | z80src/float.asm | lawrencewoodman/z80pack | d57e3b50cd796e3f562c569a8270b4586999b12a | [
"MIT"
] | 76 | 2018-03-02T12:38:11.000Z | 2022-01-28T11:46:02.000Z | z80src/float.asm | lawrencewoodman/z80pack | d57e3b50cd796e3f562c569a8270b4586999b12a | [
"MIT"
] | 25 | 2018-02-24T15:50:23.000Z | 2022-03-07T11:23:10.000Z | ;
; this is a Z80 floating point package from an ancient german computer magazine
; I'm not going to translate this into english
; assemble this source with z80asm and run it under z80sim, if everything
; is working it should print the numbers below
;
; *******************************
; * Fliesskomma-Arithmetik fuer *
; * den Z80-Mikroprozessor *
; * (mc 12/88, Seite 100 *
; *******************************
; ********************************************************
; * Die folgende Testroutine liefert die Ausgabe:
; * 40400000
; * 00700000
; * 7F800000
; * 35BFFFFF
; * 00400000
; * 7F7FFFFF
; * 7F800000
; * 406DB6DB
; * 15400001
START:
LD SP,STACK
LD BC,3F80H ; Aufruf der Additionsroutine
LD DE,0000H ; mit verschiedenen Parametern
PUSH BC ; entspricht 1 + 2
PUSH DE
LD BC,4000H
LD DE,0000H
PUSH BC
PUSH DE
CALL F_ADD
CALL HEXOUT ; anschliessend Ausgabe
LD BC,00F0H ; eine kleine, gerade noch normalisierte
LD DE,0000H ; Zahl, dazu die kleinste normalisierte
PUSH BC ; Zahl mit negativem Vorzeichen addieren
PUSH DE
LD BC,8080H
LD DE,0000H
PUSH BC
PUSH DE
CALL F_ADD
CALL HEXOUT
LD BC,7F00H ; die Summe dieser beiden Zahlen
LD DE,0000H ; ergibt unendlich. Setzt man
PUSH BC ; fuer die zweite Zahl den Wert
PUSH DE ; 7EFFFFFE, so ist das Ergebnis
LD BC,7EFFH ; gerade MAXFLOAT
LD DE,0FFFFH
PUSH BC
PUSH DE
CALL F_ADD
CALL HEXOUT
LD BC,0000H ; Multiplikation testen
LD DE,0003H ; MAXFLOAT * <denormalisierte Zahl>
PUSH BC
PUSH DE
LD BC,7F7FH
LD DE,0FFFFH
PUSH BC
PUSH DE
CALL F_MUL
CALL HEXOUT
LD BC,0080H ; die kleinste normalisierte Zahl
LD DE,0000H ; mit 0.5 multiplizieren
PUSH BC ; (ergibt eine denormalisierte Zahl)
PUSH DE
LD BC,3F00H
LD DE,0000H
PUSH BC
PUSH DE
CALL F_MUL
CALL HEXOUT
LD BC,4000H ; eine sehr grosse Zahl mit zwei
LD DE,0000H ; multiplizieren. Das Ergebnis
PUSH BC ; ist genau MAXFLOAT
PUSH DE
LD BC,7EFFH
LD DE,0FFFFH
PUSH BC
PUSH DE
CALL F_MUL
CALL HEXOUT
LD BC,0000H ; Test der Divisionsroutine
LD DE,0000H ; hier 1 / 0 (ergibt unendlich)
PUSH BC
PUSH DE
LD BC,3F80H
LD DE,0000H
PUSH BC
PUSH DE
CALL F_DIV
CALL HEXOUT
LD BC,40E0H ; jetzt 26 / 7 berechnen
LD DE,0000H
PUSH BC
PUSH DE
LD BC,41D0H
LD DE,0000H
PUSH BC
PUSH DE
CALL F_DIV
CALL HEXOUT
LD BC,1FFFH ; jetzt eine sehr kleine
LD DE,0FFFFH ; denormalisierte Zahl durch
PUSH BC ; eine kleine normalisierte
PUSH DE ; Zahl dividieren
LD BC,0000H
LD DE,0003H
PUSH BC
PUSH DE
CALL F_DIV
CALL HEXOUT
HALT ; Ende des Tests
DEFS 100
STACK:
; ************************************************
; * Zahl in BC-DE in 8 Hexadezimalziffern drucken.
; * Dazu werden nacheinander die Nibble-Paare in
; * B, C, D und E ausgedruckt.
; *
HEXOUT:
LD A,B ; Nacheinander die einzelnen
CALL DIG2 ; Nibble-Paare in A laden
LD A,C ; und ausdrucken
CALL DIG2
LD A,D
CALL DIG2
LD A,E
CALL DIG2
LD A,10
CALL OUTCHAR
LD A,13
CALL OUTCHAR
RET
DIG2:
PUSH AF ; Nibble-Paar ausdrucken
RRCA ; unterstes Nibble retten
RRCA ; oberes Nibble rechtsbuendig
RRCA ; positionieren
RRCA
AND 00001111B
ADD A,90H ; binaer in ASCII (hex)
DAA
ADC A,40H
DAA
CALL OUTCHAR ; Zeichen ausgeben
POP AF ; jetzt unteres Nibble verarbeiten
AND 00001111B ; Nibble maskieren
ADD A,90H ; binaer in ASCII (hex)
DAA
ADC A,40H
DAA
CALL OUTCHAR
RET
OUTCHAR: ; Zeichen auf Console ausgeben
OUT (1),A
RET
; **********************************
; * Globale Konstanten-Definitionen
; * fuer das Fliesskommapaket
; *
MAXEXPO EQU 255 ; Maximal zulaessiger Exponent
BIAS EQU 127 ; Bias des Exponenten
; *************************************************
; * Fliesskomma-Addition in Single-Precision
; * Parameter: Operand 1 und Operand 2 ueber Stack
; * Ergebnis: in BC-DE: MSB in B, LSB in E
; *
; * Es folgen Offset-Definitionen fuer Stack-relativen Zugriff
FHL_ALT EQU 0 ; Top of Stack liegt HL
FADR EQU 2 ; dann die Ruecksprungadresse
OP1 EQU 4 ; jetzt Offset-Definitionen fuer
OP2 EQU 8 ; Parameter-Uebergabe
OPSIZE EQU 4 ; Groesse eines Operanden
F_ADD:
PUSH HL ; alten Basepointer retten
LD (F_STACK),SP ; aktuellen Stackpointer abspeichern
LD HL,(F_STACK) ; und in HL laden (= Basepointer)
PUSH AF ; benoetigte Register retten
PUSH IX
PUSH IY
LD BC,OP1 ; jeztz die Zeiger auf die
ADD HL,BC ; Operanden initialisieren
PUSH HL
POP IX ; IX zeigt auf Operand 1
LD BC,OPSIZE
ADD HL,BC
PUSH HL
POP IY ; IY zeigt auf Operand 2
F_ADSUB:
ADD HL,BC ; HL zeigt jetzt hinter die Operanden!
LD (F_STACK),HL ; diese Adresse fuer's Ende merken
LD A,(IX+3) ; Vorzeichen von Operand 1 laden
LD E,A ; Ergebnisvorzeichen in E, Bit 7
XOR (IY+3) ; mit Vorzeichen von OP2 verknuepfen
LD D,A ; Subtraktionsflag in D, Bit 7
RES 7,(IX+3) ; Vorzeichen in Mantisse 1 loeschen
RES 7,(IY+3) ; Vorzeichen in Mantisse 2 loeschen
; Die Operanden sind jetzt in der Form: 0EEE EEEE EFFF ... FFFF
LD A,(IX+0) ; Differenz OP1 - OP2 bilden
SUB (IY+0)
LD A,(IX+1)
SBC A,(IY+1)
LD A,(IX+2)
SBC A,(IY+2)
LD A,(IX+3)
SBC A,(IY+3)
JR NC,FAD_1 ; Sprung falls OP1 groesser als OP2
PUSH IX ; ansonsten Operanden vertauschen
EX (SP),IY ; (eigentlich nur die Pointer), so
POP IX ; dass IY den Kleineren adressiert
LD A,E ; Ergebnisvorzeichen neu berechnen
XOR D
LD E,A
FAD_1:
LD A,(IX+2)
LD C,(IX+3) ; Exponent der groesseren Zahl laden
SLA A
RL C
JR Z,AD_DN1
SET 7,(IX+2) ; implizite Eins erzeugen
AD_DN1:
LD A,(IY+2)
LD B,(IY+3) ; Exponent der kleineren Zahl laden
SLA A
RL B
JR Z,AD_DN2
SET 7,(IY+2) ; implizite Eins erzeugen
AD_DN2:
PUSH BC ; Jetzt die Register fuer den
PUSH DE ; Blocktransferbefehl retten
LD BC,(OPSIZE*2)-1 ; beide Operanden verschieben
DEC HL ; HL zeigt auf letztes Byte
PUSH HL ; HL nach DE kopieren
POP DE
DEC HL ; HL zeigt auf vorletztes Byte
LDDR ; Verschiebung beider Mantissen
POP DE ; um 8 Bit nach links
POP BC
XOR A
LD (IX+0),A ; Form: FFFF ... FFFF 0000 0000
LD (IY+0),A
LD A,C ; Differenz der Exponenten berechnen
SUB B
LD B,A ; Differenz nach B fuer Loop-Befehl
JR Z,AD_NAP ; falls Null, dann keine Anpassung
CP 25 ; mehr als 24? (Abfrage mit Carry
JP NC,AD_RND ; erfordert Vergleich mit 25)
AD_ANP:
SRL (IY+3) ; Anpassung der zweiten Mantisse
RR (IY+2) ; durch Verschiebung nach rechts
RR (IY+1)
RR (IY+0)
DJNZ AD_ANP ; Loop-Befehl bis B = 0
AD_NAP:
BIT 7,D ; Subtraktion oder Addition?
JR NZ,SUBTR ; ggf. zur Subtraktion springen
LD A,(IX+0) ; jetzt werden die beiden Mantissen
ADD A,(IY+0) ; zueinander addiert
LD (IX+0),A
LD A,(IX+1)
ADC A,(IY+1)
LD (IX+1),A
LD A,(IX+2)
ADC A,(IY+2)
LD (IX+2),A
LD A,(IX+3)
ADC A,(IY+3)
LD (IX+3),A
JR NC,AD_RND ; kein Ueberlauf --> zum Runden
RR (IX+3) ; Ueberlauf einschieben
RR (IX+2) ; und Exponent erhoehen
RR (IX+1) ; durch die Vorgeschichte ist
RR (IX+0) ; gesichert, dass B Null ist; BC
INC BC ; enthaelt den 16-Bit-Exponent
JR AD_RND ; und zum Runden
SUBTR:
LD A,(IX+0) ; Die beiden Mantissen werden
SUB (IY+0) ; voneinander subtrahiert
LD (IX+0),A
LD A,(IX+1)
SBC A,(IY+1)
LD (IX+1),A
LD A,(IX+2)
SBC A,(IY+2)
LD (IX+2),A
LD A,(IX+3)
SBC A,(IY+3)
LD (IX+3),A
JP M,AD_RND ; bei fuehrender Eins zum Runden
JR NZ,AD_NRM ; ungleich Null: Normalisieren
CP (IX+2) ; Rest der Mantisse auch Null?
JR NZ,AD_NRM
CP (IX+1)
JR NZ,AD_NRM
CP (IX+0)
JR Z,AD_ZERO ; alles Null --> Ergebnis ist Null
AD_NRM:
XOR A ; A = 0
AD_NR1:
CP C ; Exponent ist Null?
JR NZ,AD_NR2 ; nein, Normierung moeglich
CP B ; oberes Byte auch Null?
JR Z,AD_RND ; dann ist Ergebnis denormalisiert
AD_NR2:
DEC BC ; Exponent erniedrigen
SLA (IX+0) ; Mantisse normalisieren bis
RL (IX+1) ; fuehrende Eins auftaucht
RL (IX+2)
RL (IX+3)
JP P,AD_NR1 ; weiter bis fuehrende Eins auftaucht
AD_RND:
LD A,(IX+0) ; jetzt Runden auf Bit hinter
ADD A,80H ; Mantisse
JR NC,AD_NOV ; kein Uebertrag?
INC (IX+1) ; doch, naechstes Mantissenbyte
JR NZ,AD_NOV ; behandeln, jetzt auf Null pruefen,
INC (IX+2) ; da der INC-Befehl kein Carry liefert
JR NZ,AD_NOV
INC (IX+3)
JR NZ,AD_NOV
SCF ; Eins erzeugen
RR (IX+3) ; bei Ueberlauf Mantisse durch
RR (IX+2) ; Rechtsschieben wieder normalisieren
RR (IX+1) ; (nur noch 24 Bit noetig)
INC BC ; und Exponent korrigieren
AD_NOV:
XOR A ; A = 0
CP (IX+3) ; Mantisse auf Null pruefen
JR NZ,AD_NOZ
CP (IX+2)
JR NZ,AD_NOZ
CP (IX+1) ; alle Mantissenbytes Null?
JR NZ,AD_NOZ ; dann ist auch das Ergebnis Null
AD_ZERO: ; Null Ergebnis aufbauen
LD B,A
LD C,A
LD D,A
LD E,A
JR AD_EXIT ; dann Routine verlassen
AD_NOZ:
CP B ; A ist 0
LD A,MAXEXPO ; Exponent oberstes Byte ungleich Null?
JR NZ,AD_OVR ; dann ist Ueberlauf eingetreten
CP C ; oder genau maxexpo erreicht?
JR NZ,AD_NUE ; nein, --> kein Ueberlauf
AD_OVR:
LD C,A ; Exponent auf maxexpo setzen
XOR A ; und Mantisse auf Null
LD (IX+3),A ; fuer unendlich
LD (IX+2),A
LD (IX+1),A
JR AD_DEN
AD_NUE:
XOR A ; A = 0
CP C ; Exponent Null (Zahl denormalisiert)?
JR Z,AD_DEN ; ja, -->
SLA (IX+1) ; fuehrendes Bit wird nicht gespeichert
RL (IX+2) ; daher Mantisse um 1 Bit nach links
RL (IX+3)
AD_DEN:
LD B,C ; Ergebnis aufbauen: Exponent in B
LD C,(IX+3) ; Mantisse oberstes Byte
LD D,(IX+2)
SLA E ; Vorzeichen aus E in Carry schieben
LD E,(IX+1)
RR B ; Vorzeichen in Ergebnis einschieben
RR C
RR D
RR E
AD_EXIT:
POP IY ; Register restaurieren
POP IX
POP AF
POP HL
LD (F_HL),HL ; HL zwischenspeichern
EX (SP),HL ; alte Ruecksprungadresse in HL
LD SP,(F_STACK) ; Stack zuruecksetzen
PUSH HL ; Ruecksprungadresse ablegen
LD HL,(F_HL) ; HL wieder laden
RET ; Ende des Unterprogramms
; *************************************************
; * Fliesskomma-Subtraktion in Single-Precision
; * Parameter: Operand 1 und Operand 2 ueber Stack
; * Ergebnis: in BC-DE: MSB in B, LSB in E
; *
F_SUB:
PUSH HL ; alten Basepointer retten
LD (F_STACK),SP ; aktuellen Stackpointer abspeichern
LD HL,(F_STACK) ; und in HL laden (= Basepointer)
PUSH AF ; benoetigte Register retten
PUSH IX
PUSH IY
LD BC,OP1
ADD HL,BC
PUSH HL
POP IX ; IX zeigt auf Operand 1
LD BC,OPSIZE
ADD HL,BC
PUSH HL
POP IY ; IY zeigt auf Operand 2
LD A,80H
XOR (IY+3) ; Vorzeichenbit von Operand 2 umdrehen
LD (IY+3),A ; wieder abspeichern
JP F_ADSUB ; jetzt weiter bei Additionsroutine
; *************************************************
; * Fliesskomma-Multiplikation in Single-Precision
; * Parameter: Operand 1 und Operand 2 ueber Stack
; * Ergebnis: in BC-DE: MSB in B, LSB in E
; *
TEMP EQU -10 ; Offset lokale Variable (6 Byte)
F_MUL:
PUSH HL ; alten Basepointer retten
LD (F_STACK),SP ; aktuellen Stackpointer abspeichern
LD HL,(F_STACK) ; und in HL laden (= Basepointer)
PUSH AF ; benoetigte Register retten
PUSH IX
PUSH IY
LD BC,OP1
ADD HL,BC
PUSH HL
EX (SP),IX ; IX zeigt auf Operand 1
; 2 Dummy-Byte auf Stack fuer lokale
LD BC,OPSIZE ; Variable bleiben stehen
ADD HL,BC
PUSH HL
EX (SP),IY ; IY zeigt auf Operand 2
PUSH HL ; insgesamt 6 Byte fuer lokale Variable
ADD HL,BC ; HL zeigt jetzt hinter die Operanden!
LD (F_STACK),HL
LD A,(IX+3) ; Ergebnisvorzeichen bestimmen
XOR (IY+3)
LD C,A ; Vorzeichen in C Bit 7 merken
LD D,0 ; Exponent 1 laden
LD E,(IX+3)
LD A,(IX+2) ; Operand um 8 Bit nach links schieben
LD (IX+3),A
RES 7,(IX+3) ; implizite Null vorbesetzen
SLA A ; Exponent unterstes Bit in Carry
RL E ; und in E einschieben
JR Z,MU_DN1 ; falls Null, dann OP1 denormalisieren
SET 7,(IX+3) ; implizite Eins erzeugen
DEC DE ; Bias kompensieren
MU_DN1:
LD A,(IX+1) ; jetzt restliche Bytes verschieben
LD (IX+2),A
LD A,(IX+0)
LD (IX+1),A
XOR A ; unterste Mantissenbits loeschen
LD (IX+0),A ; Form: FFFF ... FFFF 0000 0000
LD (IX+TEMP+5),A ; lokale Variable mit Null vorbesetzen
LD (IX+TEMP+4),A
LD (IX+TEMP+3),A
LD (IX+TEMP+2),A
LD (IX+TEMP+1),A
LD (IX+TEMP+0),A
LD H,A ; Exponent 2 in HL aufbauen
LD L,(IY+3)
LD A,(IY+2)
RES 7,(IY+2) ; implizite Null vorbesetzen
SLA A
RL L
JR Z,MU_DN2 ; gleich Null, dann Op2 denormalisieren
SET 7,(IY+2) ; implizite Eins erzeugen
DEC HL ; Bias kompensieren
MU_DN2:
ADD HL,DE ; Exponenten aufaddieren
LD DE,3-BIAS ; Bias-3 subtrahieren
ADD HL,DE ; bzw. 3-Bias addieren
JP P,MU_NOZ
LD A,L ; Exponent kleiner als -24?
CP -24
JR NC,MU_NOZ
JP MU_ZERO ; ja, dann ist das Ergebnis Null
MU_NOZ:
LD B,24 ; Multiplikationsschleifenzaehler
LD DE,0 ; Hilfsregister fuer Multiplikand
MU_MUL:
SRL (IX+3) ; Multiplikand nach rechts schieben
RR (IX+2)
RR (IX+1)
RR (IX+0)
RR D ; DE als Verlaengerung von Operand 1
RR E
SLA (IY+0) ; Multiplikator nach links schieben
RL (IY+1)
RL (IY+2) ; falls fuehrendes Bit Null ist, dann
JR NC,MU_NAD ; muss nicht addiert werden
LD A,(IX+TEMP+0) ; sonst Multiplikand aufaddieren
ADD A,E
LD (IX+TEMP+0),A
LD A,(IX+TEMP+1)
ADC A,D
LD (IX+TEMP+1),A
LD A,(IX+TEMP+2)
ADC A,(IX+0)
LD (IX+TEMP+2),A
LD A,(IX+TEMP+3)
ADC A,(IX+1)
LD (IX+TEMP+3),A
LD A,(IX+TEMP+4)
ADC A,(IX+2)
LD (IX+TEMP+4),A
LD A,(IX+TEMP+5)
ADC A,(IX+3)
LD (IX+TEMP+5),A
MU_NAD:
DJNZ MU_MUL ; Schleife durchlaufen
LD A,(IX+TEMP+5)
OR A ; Flags setzen
JP M,MU_RND ; bei fuerender Eins zum Runden
JR NZ,MU_NOR ; ungleich Null --> normalisieren
CP (IX+TEMP+4)
JR NZ,MU_NOR
CP (IX+TEMP+3)
JR NZ,MU_NOR
CP (IX+TEMP+2)
JR NZ,MU_NOR
JP MU_ZERO ; Mantisse komplett Null --> Null
MU_NOR:
XOR A ; A = 0
OR H ; Exponent ist negativ?
JP M,MU_UNT ; ggf. Unterlauf behandeln
MU_NR1:
XOR A ; A = 0
CP L ; Exponent = Null?
JR NZ,MU_NR2
CP H ; bei Null zum Runden
JR Z,MU_RND
MU_NR2:
DEC HL ; Exponent erniedrigen
SLA (IX+TEMP+0)
RL (IX+TEMP+1)
RL (IX+TEMP+2) ; Mantisse solange nach links
RL (IX+TEMP+3) ; verschieben bis fuerende Eins
RL (IX+TEMP+4) ; auftaucht
RL (IX+TEMP+5)
JP P,MU_NR1
MU_RND:
LD A,(IX+TEMP+2) ; jetzt Runden auf Bit hinter
ADD A,80H ; Mantisse
JR NC,MU_NOV ; kein Uebertrag?
INC (IX+TEMP+3) ; doch, naechstes Mantissenbyte
JR NZ,MU_NOV ; behandeln, jetzt auf Null pruefen
INC (IX+TEMP+4) ; da der INC-Befehl kein Carry liefert
JR NZ,MU_NOV
INC (IX+TEMP+5)
JR NZ,MU_NOV
SCF ; Eins erzeugen
RR (IX+TEMP+5) ; bei Ueberlauf Mantisse durch
RR (IX+TEMP+4) ; Rechtsschieben wieder normalisieren
RR (IX+TEMP+3)
INC HL ; und Eponent korrigieren
MU_NOV:
XOR A ; A = 0
CP H ; Exponent pruefen
LD A,MAXEXPO ; A vorbesetzen
JR NZ,MU_OVR ; groesser Null: Ueberlauf behandeln
CP L ; oder genau maxexpo erreicht?
JR NZ,MU_NUE ; nein, kein Ueberlauf
MU_OVR:
LD L,MAXEXPO ; Ueberlauf: Exponent = maxexpo
XOR A ; Mantisse = Null
LD (IX+TEMP+5),A
LD (IX+TEMP+4),A
LD (IX+TEMP+3),A
JR MU_DEN
MU_NUE:
XOR A ; A = 0
CP L ; Exponent ist Null?
JR Z,MU_DEN ; ja, Ergebnis ist denormalisiert
SLA (IX+TEMP+3) ; nein, fuehrendes Mantissenbit
RL (IX+TEMP+4) ; rausschieben
RL (IX+TEMP+5)
MU_DEN:
SLA C ; Vorzeichen in Carry schieben
LD B,L ; Exponent einsetzen
LD C,(IX+TEMP+5)
LD D,(IX+TEMP+4)
LD E,(IX+TEMP+3)
RR B ; und Vorzeichen einschieben
RR C
RR D ; Form: SEEE EEEE EFFF FFFF ... FFFF
RR E
MU_RES:
POP HL ; lokale Variable deallozieren
POP HL
POP HL
POP IY ; Register restaurieren
POP IX
POP AF
POP HL
LD (F_HL),HL ; Parameter vom Stack deallozieren
EX (SP),HL
LD SP,(F_STACK)
PUSH HL
LD HL,(F_HL)
RET ; und return
MU_ZERO:
XOR A ; Ergebnis ist Null
LD B,A
LD C,A
LD D,A
LD E,A
JR MU_RES
MU_UNT:
LD A,L ; Exponent in A
NEG ; negieren fuer Schleifenzaehler
CP 24 ; totaler Ueberlauf?
JR NC,MU_ZERO ; ja, dann ist Ergebnis Null
LD B,A ; in B fuer Loop
MU_SHR:
SRL (IX+TEMP+5) ; Mantisse denormalisieren
RR (IX+TEMP+4) ; bis Exponent Null ist
RR (IX+TEMP+3)
DJNZ MU_SHR
LD L,B ; Exponent in Register L = B = 0
JP MU_DEN ; denormalisiertes Ergebnis erzeugen
; *************************************************
; * Fliesskomma-Division in Single-Precision
; * Parameter: Operand 1 und Operand 2 ueber Stack
; * Ergebnis: in BC-DE: MSB in B, LSB in E
; *
F_DIV:
PUSH HL ; alten Basepointer retten
LD (F_STACK),SP ; aktuellen Stackpointer abspeichern
LD HL,(F_STACK) ; und in HL laden (= Basepointer)
PUSH AF ; benoetigte Register retten
PUSH IX
PUSH IY
LD BC,OP1
ADD HL,BC
PUSH HL
EX (SP),IX ; IX zeigt auf Operand 1
; 2 Dummy-Byte auf Stack fuer lokale
LD BC,OPSIZE ; Variable bleiben stehen
ADD HL,BC
PUSH HL
EX (SP),IY ; IY zeigt auf Operand 2
PUSH HL ; insgesamt 6 Byte fuer lokale Variable
ADD HL,BC ; HL zeigt jetzt hinter die Operanden!
LD (F_STACK),HL
LD A,(IX+3) ; Ergebnisvorzeichen bestimmen
XOR (IY+3)
LD C,A ; Vorzeichen in C Bit 7 merken
LD H,0 ; Exponent 1 laden
LD L,(IX+3)
LD A,(IX+2)
RES 7,(IX+2) ; implizite Null vorbesetzen
SLA A ; Exponent unterstes Bit in Carry
RL L ; und in E einschieben
JR Z,DV_DN1 ; falls Null, dann Op1 denormalisieren
SET 7,(IX+2) ; implizite Eins erzeugen
DEC HL ; Bias kompensieren
DV_DN1:
LD D,0 ; Exponent 2 in DE aufbauen
LD E,(IY+3)
LD A,(IY+2)
LD (IY+3),A ; Mantisse um 8 Bit verschieben
RES 7,(IY+3) ; implizite Null vorbesetzen
SLA A
RL E
JR Z,DV_DN2 ; gleich Null, dann Op2 denormalisieren
SET 7,(IY+3) ; implizite Eins erzeugen
DEC DE ; Bias kompensieren
DV_DN2:
LD A,(IY+1) ; jetzt restliche Bytes verschieben
LD (IY+2),A
LD A,(IY+0)
LD (IY+1),A
XOR A ; A = 0
LD (IY+0),A ; Form: FFFF ... FFFF 0000 0000
SRL (IY+3)
RR (IY+2)
RR (IY+1)
RR (IY+0) ; Form: 0FFF ... FFFF F000 0000
JR NZ,DV_NZ1 ; Mantisse 2 auf Null pruefen
CP (IY+1)
JR NZ,DV_NZ1
CP (IY+2)
JR NZ,DV_NZ1
CP (IY+3)
JR NZ,DV_NZ1
JP MU_OVR ; Bei Division durch Null: unendlich
DV_NZ1:
XOR A ; Carry-Flag loeschen
SBC HL,DE ; Exponenten subtrahieren
LD DE,BIAS ; Bias addieren
ADD HL,DE
BIT 7,H ; Exponent positiv?
JR Z,DV_NOZ
LD A,L ; Exponent kleiner als -24?
JR NC,DV_NOZ
JP MU_ZERO ; ja, dann ist das Ergebnis Null
DV_NOZ:
PUSH BC ; Vorzeichen retten
LD DE,25 ; Exponent um 25 erhoehen
ADD HL,DE ; jetzt ist er sicher groesser als Null
XOR A ; A = 0
LD B,(IX+2) ; Divident in Register kopieren
LD C,(IX+1)
LD D,(IX+0)
LD E,A ; die untersten Bits sind Null
CP D ; ist Dividend Null?
JR NZ,DV_NZ2
CP C
JR NZ,DV_NZ2
CP B
JR NZ,DV_NZ2
POP BC ; Stack bereinigen (Vorzeichen laden)
JP MU_ZERO ; und Null als Ergebnis ausgeben
DV_NZ2:
LD (IX+TEMP+5),A ; Ergebnis vorbesetzen
LD (IX+TEMP+4),A
LD (IX+TEMP+3),A
LD (IX+TEMP+2),A
DV_NLP:
BIT 6,(IY+3) ; ist der Divisor normalisiert
JR NZ,DV_NOR ; ja, -->
INC HL ; nein, Exponent erhoehen
SLA (IY+0) ; Divisor verschieben bis in
RL (IY+1) ; Form 01FF ...
RL (IY+2)
RL (IY+3)
JR DV_NLP
DV_NOR:
SRL B
RR C
RR D
RR E ; Form: 0FFF ... FFFF F000 0000
DV_LOP:
LD (IX+3),B ; Dividend zwischenspeichern
LD (IX+2),C ; die Speicherplaetze von Op1
LD (IX+1),D ; stehen zur Verfuegung, da wir OP1
LD (IX+0),E ; in die Register BC-DE kopiert haben
LD A,E ; jetzt Divisor abziehen
SUB (IY+0)
LD E,A
LD A,D
SBC A,(IY+1)
LD D,A
LD A,C
SBC A,(IY+2)
LD C,A
LD A,B
SBC A,(IY+3)
LD B,A
JR NC,DV_ONE ; kein Carry: Divisor passt
LD E,(IX+0) ; zurueckkopieren
LD D,(IX+1) ; Carry bleibt dabei erhalten
LD C,(IX+2)
LD B,(IX+3)
DV_ONE:
CCF ; Carry-Flag umkehren
RL (IX+TEMP+2) ; Ergebnis aufbauen
RL (IX+TEMP+3)
RL (IX+TEMP+4)
RL (IX+TEMP+5)
SLA E ; Dividend verschieben
RL D
RL C
RL B
DEC HL ; Exponent erniedrigen
XOR A ; A = 0
CP L ; Exponent = Null ?
JR NZ,DV_DIV
CP H
JR Z,DV_DEN ; falls Null, dann denormalisiert
DV_DIV:
BIT 0,(IX+TEMP+5) ; fuerende Eins in Ergebnis-Mantisse?
JR Z,DV_LOP ; nein, weiter rechnen
DV_DEN:
LD B,(IX+TEMP+5) ; hoechstes Bit merken
LD A,(IX+TEMP+4)
LD (IX+TEMP+5),A ; Mantisse in Form
LD A,(IX+TEMP+3) ; FFFF ... FFFF 0000 0000
LD (IX+TEMP+4),A
LD A,(IX+TEMP+2)
LD (IX+TEMP+3),A
RR B ; hoechstes Bit einschieben
RR (IX+TEMP+5)
RR (IX+TEMP+4)
RR (IX+TEMP+3) ; Form: FFFF ... FFFF F000 0000
RR (IX+TEMP+2)
POP BC ; Vorzeichen wieder laden
XOR A ; A = 0
CP (IX+TEMP+5) ; Mantisse ist Null?
JR NZ,DV_NZ3
CP (IX+TEMP+4)
JR NZ,DV_NZ3
CP (IX+TEMP+3)
JR NZ,DV_NZ3
CP (IX+TEMP+2)
JP Z,MU_ZERO ; dann ist Ergebnis auch Null
DV_NZ3:
JP MU_RND ; sonst weiter wie bei Multiplikation
F_STACK:
DEFS 2 ; Hilfsspeicher fuer Stackpointer
F_HL:
DEFS 2 ; Hilfsspeicher fuer Basepointer HL
END
| 24.149165 | 79 | 0.673173 |
9cbb7a068744e11ca183462f1bbc9b07ba5ec0e4 | 810 | asm | Assembly | programs/oeis/328/A328284.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/328/A328284.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/328/A328284.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A328284: An extension of the Jacobsthal numbers: 0, 0, 1, followed by A001045.
; 0,0,1,0,1,1,3,5,11,21,43,85,171,341,683,1365,2731,5461,10923,21845,43691,87381,174763,349525,699051,1398101,2796203,5592405,11184811,22369621,44739243,89478485
mov $6,$0
mov $7,2
lpb $7
mov $0,$6
sub $7,1
add $0,$7
sub $0,1
mov $9,$0
mov $11,2
lpb $11
mov $0,$9
sub $11,1
add $0,$11
sub $0,1
mov $2,$0
lpb $0
cmp $0,2
mod $4,2
mov $5,2
pow $5,$2
div $5,3
add $5,$2
div $5,2
lpe
trn $4,6
add $4,$5
mov $8,$4
mov $12,$11
lpb $12
mov $10,$8
sub $12,1
lpe
lpe
lpb $9
mov $9,0
sub $10,$8
lpe
mov $3,$7
mov $8,$10
lpb $3
mov $1,$8
sub $3,1
lpe
lpe
lpb $6
sub $1,$8
mov $6,0
lpe
| 15.576923 | 161 | 0.516049 |
c8fd1b24a13008f0954585d4d07597c14ae09202 | 3,217 | asm | Assembly | libav-12.3/libavcodec/x86/pixblockdsp.asm | aldarons-tech/aci | 0fc09bea7274737a2aa7a3422d65e2630af64b58 | [
"MIT"
] | null | null | null | libav-12.3/libavcodec/x86/pixblockdsp.asm | aldarons-tech/aci | 0fc09bea7274737a2aa7a3422d65e2630af64b58 | [
"MIT"
] | 3 | 2020-07-02T01:33:51.000Z | 2020-08-11T14:40:29.000Z | libav-12.3/libavcodec/x86/pixblockdsp.asm | aldarons-tech/aci | 0fc09bea7274737a2aa7a3422d65e2630af64b58 | [
"MIT"
] | null | null | null | ;*****************************************************************************
;* SIMD-optimized pixel operations
;*****************************************************************************
;* Copyright (c) 2000, 2001 Fabrice Bellard
;* Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
;*
;* This file is part of Libav.
;*
;* Libav is free software; you can redistribute it and/or
;* modify it under the terms of the GNU Lesser General Public
;* License as published by the Free Software Foundation; either
;* version 2.1 of the License, or (at your option) any later version.
;*
;* Libav is distributed in the hope that it will be useful,
;* but WITHOUT ANY WARRANTY; without even the implied warranty of
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;* Lesser General Public License for more details.
;*
;* You should have received a copy of the GNU Lesser General Public
;* License along with Libav; if not, write to the Free Software
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;*****************************************************************************
%include "libavutil/x86/x86util.asm"
SECTION .text
INIT_MMX mmx
; void ff_get_pixels_mmx(int16_t *block, const uint8_t *pixels, int line_size)
cglobal get_pixels, 3,4
movsxdifnidn r2, r2d
add r0, 128
mov r3, -128
pxor m7, m7
.loop:
mova m0, [r1]
mova m2, [r1+r2]
mova m1, m0
mova m3, m2
punpcklbw m0, m7
punpckhbw m1, m7
punpcklbw m2, m7
punpckhbw m3, m7
mova [r0+r3+ 0], m0
mova [r0+r3+ 8], m1
mova [r0+r3+16], m2
mova [r0+r3+24], m3
lea r1, [r1+r2*2]
add r3, 32
js .loop
REP_RET
INIT_XMM sse2
cglobal get_pixels, 3, 4
movsxdifnidn r2, r2d
lea r3, [r2*3]
pxor m4, m4
movh m0, [r1]
movh m1, [r1+r2]
movh m2, [r1+r2*2]
movh m3, [r1+r3]
lea r1, [r1+r2*4]
punpcklbw m0, m4
punpcklbw m1, m4
punpcklbw m2, m4
punpcklbw m3, m4
mova [r0], m0
mova [r0+0x10], m1
mova [r0+0x20], m2
mova [r0+0x30], m3
movh m0, [r1]
movh m1, [r1+r2*1]
movh m2, [r1+r2*2]
movh m3, [r1+r3]
punpcklbw m0, m4
punpcklbw m1, m4
punpcklbw m2, m4
punpcklbw m3, m4
mova [r0+0x40], m0
mova [r0+0x50], m1
mova [r0+0x60], m2
mova [r0+0x70], m3
RET
INIT_MMX mmx
; void ff_diff_pixels_mmx(int16_t *block, const uint8_t *s1, const uint8_t *s2,
; int stride);
cglobal diff_pixels, 4,5
movsxdifnidn r3, r3d
pxor m7, m7
add r0, 128
mov r4, -128
.loop:
mova m0, [r1]
mova m2, [r2]
mova m1, m0
mova m3, m2
punpcklbw m0, m7
punpckhbw m1, m7
punpcklbw m2, m7
punpckhbw m3, m7
psubw m0, m2
psubw m1, m3
mova [r0+r4+0], m0
mova [r0+r4+8], m1
add r1, r3
add r2, r3
add r4, 16
jne .loop
REP_RET
| 28.981982 | 79 | 0.52005 |
7a32d4f6803a4d91354615a57818523afe872b07 | 1,144 | asm | Assembly | sk/sfx-optimized/9B.asm | Cancer52/flamedriver | 9ee6cf02c137dcd63e85a559907284283421e7ba | [
"0BSD"
] | 9 | 2017-10-09T20:28:45.000Z | 2021-06-29T21:19:20.000Z | sk/sfx-optimized/9B.asm | Cancer52/flamedriver | 9ee6cf02c137dcd63e85a559907284283421e7ba | [
"0BSD"
] | 12 | 2018-08-01T13:52:20.000Z | 2022-02-21T02:19:37.000Z | sk/sfx-optimized/9B.asm | Cancer52/flamedriver | 9ee6cf02c137dcd63e85a559907284283421e7ba | [
"0BSD"
] | 2 | 2018-02-17T19:50:36.000Z | 2019-10-30T19:28:06.000Z | Sound_9B_Header:
smpsHeaderStartSong 3
smpsHeaderVoice Sound_9B_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $02
smpsHeaderSFXChannel cFM4, Sound_9B_FM4, $F2, $00
smpsHeaderSFXChannel cFM5, Sound_9B_FM5, $F9, $00
; FM5 Data
Sound_9B_FM5:
dc.b nRst, $02
; FM4 Data
Sound_9B_FM4:
smpsSetvoice $00
smpsModSet $01, $01, $74, $29
Sound_9B_Loop00:
dc.b nD1, $07, nRst, $02, nD1, $09, nRst
smpsFMAlterVol $11
smpsLoop $00, $04, Sound_9B_Loop00
smpsStop
Sound_9B_Voices:
; Voice $00
; $38
; $70, $30, $10, $30, $1F, $1D, $15, $1F, $00, $0C, $0E, $07
; $06, $0F, $06, $12, $04, $12, $07, $18, $10, $07, $0C, $80
smpsVcAlgorithm $00
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $03, $01, $03, $07
smpsVcCoarseFreq $00, $00, $00, $00
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1F, $15, $1D, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $07, $0E, $0C, $00
smpsVcDecayRate2 $12, $06, $0F, $06
smpsVcDecayLevel $01, $00, $01, $00
smpsVcReleaseRate $08, $07, $02, $04
smpsVcTotalLevel $00, $0C, $07, $10
| 26 | 62 | 0.618007 |
7a57814edfc9c8cd66e8ee0a90b028461a73606c | 332 | asm | Assembly | pwnlib/shellcraft/templates/thumb/linux/getrlimit.asm | IMULMUL/python3-pwntools | 61210a68cd88e9084c72292d3119c38c44f07966 | [
"MIT"
] | 325 | 2016-01-25T08:38:06.000Z | 2022-03-30T14:31:50.000Z | pwnlib/shellcraft/templates/thumb/linux/getrlimit.asm | IMULMUL/python3-pwntools | 61210a68cd88e9084c72292d3119c38c44f07966 | [
"MIT"
] | 8 | 2016-08-23T10:15:27.000Z | 2019-01-16T02:49:34.000Z | pwnlib/shellcraft/templates/thumb/linux/getrlimit.asm | IMULMUL/python3-pwntools | 61210a68cd88e9084c72292d3119c38c44f07966 | [
"MIT"
] | 71 | 2016-07-13T10:03:52.000Z | 2022-01-10T11:57:34.000Z | <%
from pwnlib.shellcraft.thumb.linux import syscall
%>
<%page args="resource, rlimits"/>
<%docstring>
Invokes the syscall getrlimit. See 'man 2 getrlimit' for more information.
Arguments:
resource(rlimit_resource_t): resource
rlimits(rlimit): rlimits
</%docstring>
${syscall('SYS_getrlimit', resource, rlimits)}
| 23.714286 | 75 | 0.725904 |
d9e7ff9627912b39b5567d966794fc544646165a | 231 | asm | Assembly | libsrc/_DEVELOPMENT/l/z80/l_ret.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | 8 | 2017-01-18T12:02:17.000Z | 2021-06-12T09:40:28.000Z | libsrc/_DEVELOPMENT/l/z80/l_ret.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | 1 | 2017-03-06T07:41:56.000Z | 2017-03-06T07:41:56.000Z | libsrc/_DEVELOPMENT/l/z80/l_ret.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | 3 | 2017-03-07T03:19:40.000Z | 2021-09-15T17:59:19.000Z |
SECTION code_clib
SECTION code_l
PUBLIC l_ret
; function present in some rom crts
; if number of pops changes, check crts
pop hl
l_ret:
; Do-nothing function used as a stub by some library functions
ret
| 13.588235 | 65 | 0.69697 |
1fde71b5c4a7b6b59b113c8c2ca6fb6eb400d4c3 | 4,037 | asm | Assembly | makednp.asm | gnacu/makednp | 166b4a7de015507b8c4d6d5a8e87563c466beb79 | [
"MIT"
] | null | null | null | makednp.asm | gnacu/makednp | 166b4a7de015507b8c4d6d5a8e87563c466beb79 | [
"MIT"
] | null | null | null | makednp.asm | gnacu/makednp | 166b4a7de015507b8c4d6d5a8e87563c466beb79 | [
"MIT"
] | 1 | 2021-03-24T15:36:16.000Z | 2021-03-24T15:36:16.000Z | ;----[ makednp.a ]----------------------
.include "//os/s/:basic.s"
.include "//os/s/:math.s"
.include "//os/s/ker/:file.s"
.include "//os/s/ker/:io.s"
.include "//os/s/ker/:iec.s"
buffer = $c000
ptr = $fb ;$fc
lda #$12 ;Reverse On
jsr chrout
;Open Command Channel
lda #15 ;Logical File #
ldx $be ;JiffyDOS Current Dev
ldy #15 ;Channel
jsr setlfs
lda #0
jsr setnam
jsr open
;Open Output File
lda #3 ;Logical File #
ldx $bf ;JiffyDOS Copy Target
ldy #3 ;Channel
jsr setlfs
lda #15 ;Filename Length
ldx #<outfile
ldy #>outfile
jsr setnam
jsr open
;Open Input File
lda #2 ;Logical File #
ldx $be ;JiffyDOS Current Dev
ldy #2 ;Channel
jsr setlfs
lda #1 ;Command Length
ldx #<daccess
ldy #>daccess
jsr setnam
jsr open
;Initialize Variables
jsr zerotrk
jsr zerosec
lda #0
sta ctrack
trkloop inc ctrack
beq done
jsr inctrk
lda #0
sta csector
jsr zerosec
jmp secloop+3
secloop jsr incsec
jsr setblock
cpy #"0"
beq okay
lda csector
beq done
bne trkloop
okay jsr copyblock
inc csector
bne secloop
beq trkloop
;Done... close up.
done lda #3
jsr close
lda #2
jsr close
lda #15
jsr close
jsr clall
lda #$92 ;Reverse off
jmp chrout
setblock ;Y <- 1st digit of err code.
;Set Block
ldx #15
jsr chkout
ldy #0
lda blokcmd,y
beq *+8
jsr chrout
iny
bne *-9
jsr clrchn
ldx #15
jsr chkin
jsr chrin
tay
jmp clrchn
copyblock
;Read Block
ldx #2
jsr chkin
ldy #0
jsr acptr
sta buffer,y
iny
bne *-7
jsr clrchn
;Write Block
ldx #3
jsr chkout
ldy #0
lda buffer,y
jsr ciout
iny
bne *-7
jmp clrchn
zerotrk ;Set Track to 000
lda #"0"
sta track
sta track+1
sta track+2
rts
inctrk ;Increment Track
lda #" " ;space
jsr chrout
;Roll Track 1's Place
ldx track+2
inx
cpx #":"
bcs *+6
stx track+2
rts
ldx #"0"
stx track+2
;Roll Track 10's Place
ldx track+1
inx
cpx #":"
bcs *+6
stx track+1
rts
ldx #"0"
stx track+1
;Roll Track 100's Place
ldx track
inx
cpx #":"
bcs *+6
stx track
rts
ldx #"0"
stx track
rts
zerosec ;Set Sector to 000
lda #"0"
sta sector
sta sector+1
sta sector+2
rts
incsec ;Increment Sector
;Roll Sector 1's Place
ldx sector+2
inx
cpx #":"
bcs *+6
stx sector+2
rts
ldx #"0"
stx sector+2
;Roll Sector 10's Place
ldx sector+1
inx
cpx #":"
bcs *+6
stx sector+1
rts
ldx #"0"
stx sector+1
;Roll Sector 100's Place
ldx sector
inx
cpx #":"
bcs *+6
stx sector
rts
ldx #"0"
stx sector
rts
ctrack .byte 1
csector .byte 0
daccess .text "#"
outfile .text "@:image.dnp,w,p"
blokcmd .text "u1 2 0 "
track .text "000"
.byte " "
sector .text "000"
.byte 0 ;Terminator
| 16.083665 | 40 | 0.422839 |
56b9e7f01ac0d056ca925d612833790d8859e5a7 | 772 | asm | Assembly | oeis/026/A026000.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/026/A026000.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/026/A026000.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A026000: a(n) = T(2n, n), where T is the Delannoy triangle (A008288).
; Submitted by Christian Krause
; 1,5,41,377,3649,36365,369305,3800305,39490049,413442773,4354393801,46082942185,489658242241,5220495115997,55818956905529,598318746037217,6427269150511105,69175175263888037,745778857519239785,8052432236270744665,87063177396677721409,942486784715757604525,10214101061074009065689,110806813686435908272337,1203197543301130646660609,13076117390069923456738165,142220816003636360173289225,1547976386096927472359531465,16860071718092897663572784065,183750246468160193532861467005
mov $1,1
mov $2,1
mov $3,$0
mul $0,4
sub $0,2
mov $4,2
lpb $3
add $0,2
mul $1,$3
mul $1,$0
sub $0,4
sub $3,1
sub $5,1
add $5,$4
div $1,$5
add $2,$1
add $4,2
lpe
mov $0,$2
| 32.166667 | 475 | 0.78886 |
5b38024e8169ae961d7037af53515dbcfef7ff9b | 185 | asm | Assembly | CP77HookPath/asm.asm | RakhithJK/CP77HookFileName | e5942e68bfb7af063b6725184fbf8591d6ee5453 | [
"MIT"
] | 11 | 2020-12-16T02:55:59.000Z | 2021-03-01T08:20:12.000Z | CP77HookPath/asm.asm | eprilx/CP77HookFileName | e5942e68bfb7af063b6725184fbf8591d6ee5453 | [
"MIT"
] | null | null | null | CP77HookPath/asm.asm | eprilx/CP77HookFileName | e5942e68bfb7af063b6725184fbf8591d6ee5453 | [
"MIT"
] | 4 | 2020-12-19T07:24:50.000Z | 2021-11-01T06:03:16.000Z |
.code
GetAL proc, Arg3:BYTE
MOV Arg3, AL
ret
GetAL endp
GetRax proc, Arg1:QWORD
mov Arg1, RAX
ret
GetRax endp
SetRax proc, Arg2:QWORD
mov RAX, Arg2
ret
SetRax endp
end | 9.25 | 23 | 0.697297 |
ce7fbe51acb2f08ce4278c8dab54c2f093f2b053 | 637 | asm | Assembly | lib/core/zp/psregs.asm | locodarwin/xc-basic3 | 74d73fb4049980fc0c7b648b4893ce3a53056af3 | [
"MIT"
] | 11 | 2021-08-05T18:13:21.000Z | 2022-03-26T21:44:50.000Z | lib/core/zp/psregs.asm | locodarwin/xc-basic3 | 74d73fb4049980fc0c7b648b4893ce3a53056af3 | [
"MIT"
] | 119 | 2021-08-09T06:28:44.000Z | 2022-03-31T07:12:11.000Z | lib/core/zp/psregs.asm | locodarwin/xc-basic3 | 74d73fb4049980fc0c7b648b4893ce3a53056af3 | [
"MIT"
] | 3 | 2022-01-22T05:25:09.000Z | 2022-03-26T17:11:55.000Z | ; ------------------------------------------
; XC=BASIC
; Pseudo-registers
;
; ZP locations reserved
; ------------------------------------------
; R0-R1-R2-R3 must be consecutive
R0 EQU $02
R1 EQU $03
R2 EQU $04
R3 EQU $05
; R4-R5-R6-R7 must be consecutive
R4 EQU $06
R5 EQU $07
R6 EQU $08
R7 EQU $0A
; R8-R9-RA-RB must be consecutive
R8 EQU $0B
R9 EQU $0C
RA EQU $0D
RB EQU $0E
; Pointer to current stack frame
; Must be 2 consecutive bytes
RC EQU $0F
RD EQU $10
; Tmp Pointer to next stack frame
; Must be 2 consecutive bytes
RE EQU $11
RF EQU $12
; Pointer to "this"
TH EQU $14
; Pointer to current string in work area
SP EQU $15 | 18.735294 | 44 | 0.604396 |
15803e60a0baa8ee8a9c0a969f5c7171f92b992a | 42,340 | asm | Assembly | init.asm | SachinKumar105/Enhanced-xv6 | 21165b922b97e4bd119417e1c35b69510a29d563 | [
"MIT-0"
] | null | null | null | init.asm | SachinKumar105/Enhanced-xv6 | 21165b922b97e4bd119417e1c35b69510a29d563 | [
"MIT-0"
] | null | null | null | init.asm | SachinKumar105/Enhanced-xv6 | 21165b922b97e4bd119417e1c35b69510a29d563 | [
"MIT-0"
] | null | null | null |
_init: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
char *argv[] = { "sh", 0 };
int
main(void)
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 53 push %ebx
e: 51 push %ecx
int pid, wpid;
if(open("console", O_RDWR) < 0){
f: 83 ec 08 sub $0x8,%esp
12: 6a 02 push $0x2
14: 68 08 08 00 00 push $0x808
19: e8 64 03 00 00 call 382 <open>
1e: 83 c4 10 add $0x10,%esp
21: 85 c0 test %eax,%eax
23: 0f 88 9f 00 00 00 js c8 <main+0xc8>
mknod("console", 1, 1);
open("console", O_RDWR);
}
dup(0); // stdout
29: 83 ec 0c sub $0xc,%esp
2c: 6a 00 push $0x0
2e: e8 87 03 00 00 call 3ba <dup>
dup(0); // stderr
33: c7 04 24 00 00 00 00 movl $0x0,(%esp)
3a: e8 7b 03 00 00 call 3ba <dup>
3f: 83 c4 10 add $0x10,%esp
42: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
for(;;){
printf(1, "init: starting sh\n");
48: 83 ec 08 sub $0x8,%esp
4b: 68 10 08 00 00 push $0x810
50: 6a 01 push $0x1
52: e8 59 04 00 00 call 4b0 <printf>
pid = fork();
57: e8 de 02 00 00 call 33a <fork>
if(pid < 0){
5c: 83 c4 10 add $0x10,%esp
5f: 85 c0 test %eax,%eax
pid = fork();
61: 89 c3 mov %eax,%ebx
if(pid < 0){
63: 78 2c js 91 <main+0x91>
printf(1, "init: fork failed\n");
exit();
}
if(pid == 0){
65: 74 3d je a4 <main+0xa4>
67: 89 f6 mov %esi,%esi
69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
exec("sh", argv);
printf(1, "init: exec sh failed\n");
exit();
}
while((wpid=wait()) >= 0 && wpid != pid)
70: e8 d5 02 00 00 call 34a <wait>
75: 85 c0 test %eax,%eax
77: 78 cf js 48 <main+0x48>
79: 39 c3 cmp %eax,%ebx
7b: 74 cb je 48 <main+0x48>
printf(1, "zombie!\n");
7d: 83 ec 08 sub $0x8,%esp
80: 68 4f 08 00 00 push $0x84f
85: 6a 01 push $0x1
87: e8 24 04 00 00 call 4b0 <printf>
8c: 83 c4 10 add $0x10,%esp
8f: eb df jmp 70 <main+0x70>
printf(1, "init: fork failed\n");
91: 53 push %ebx
92: 53 push %ebx
93: 68 23 08 00 00 push $0x823
98: 6a 01 push $0x1
9a: e8 11 04 00 00 call 4b0 <printf>
exit();
9f: e8 9e 02 00 00 call 342 <exit>
exec("sh", argv);
a4: 50 push %eax
a5: 50 push %eax
a6: 68 08 0b 00 00 push $0xb08
ab: 68 36 08 00 00 push $0x836
b0: e8 c5 02 00 00 call 37a <exec>
printf(1, "init: exec sh failed\n");
b5: 5a pop %edx
b6: 59 pop %ecx
b7: 68 39 08 00 00 push $0x839
bc: 6a 01 push $0x1
be: e8 ed 03 00 00 call 4b0 <printf>
exit();
c3: e8 7a 02 00 00 call 342 <exit>
mknod("console", 1, 1);
c8: 50 push %eax
c9: 6a 01 push $0x1
cb: 6a 01 push $0x1
cd: 68 08 08 00 00 push $0x808
d2: e8 b3 02 00 00 call 38a <mknod>
open("console", O_RDWR);
d7: 58 pop %eax
d8: 5a pop %edx
d9: 6a 02 push $0x2
db: 68 08 08 00 00 push $0x808
e0: e8 9d 02 00 00 call 382 <open>
e5: 83 c4 10 add $0x10,%esp
e8: e9 3c ff ff ff jmp 29 <main+0x29>
ed: 66 90 xchg %ax,%ax
ef: 90 nop
000000f0 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
f0: 55 push %ebp
f1: 89 e5 mov %esp,%ebp
f3: 53 push %ebx
f4: 8b 45 08 mov 0x8(%ebp),%eax
f7: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while((*s++ = *t++) != 0)
fa: 89 c2 mov %eax,%edx
fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
100: 83 c1 01 add $0x1,%ecx
103: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
107: 83 c2 01 add $0x1,%edx
10a: 84 db test %bl,%bl
10c: 88 5a ff mov %bl,-0x1(%edx)
10f: 75 ef jne 100 <strcpy+0x10>
;
return os;
}
111: 5b pop %ebx
112: 5d pop %ebp
113: c3 ret
114: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
11a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000120 <strcmp>:
int
strcmp(const char *p, const char *q)
{
120: 55 push %ebp
121: 89 e5 mov %esp,%ebp
123: 53 push %ebx
124: 8b 55 08 mov 0x8(%ebp),%edx
127: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
12a: 0f b6 02 movzbl (%edx),%eax
12d: 0f b6 19 movzbl (%ecx),%ebx
130: 84 c0 test %al,%al
132: 75 1c jne 150 <strcmp+0x30>
134: eb 2a jmp 160 <strcmp+0x40>
136: 8d 76 00 lea 0x0(%esi),%esi
139: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p++, q++;
140: 83 c2 01 add $0x1,%edx
while(*p && *p == *q)
143: 0f b6 02 movzbl (%edx),%eax
p++, q++;
146: 83 c1 01 add $0x1,%ecx
149: 0f b6 19 movzbl (%ecx),%ebx
while(*p && *p == *q)
14c: 84 c0 test %al,%al
14e: 74 10 je 160 <strcmp+0x40>
150: 38 d8 cmp %bl,%al
152: 74 ec je 140 <strcmp+0x20>
return (uchar)*p - (uchar)*q;
154: 29 d8 sub %ebx,%eax
}
156: 5b pop %ebx
157: 5d pop %ebp
158: c3 ret
159: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
160: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
162: 29 d8 sub %ebx,%eax
}
164: 5b pop %ebx
165: 5d pop %ebp
166: c3 ret
167: 89 f6 mov %esi,%esi
169: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000170 <strlen>:
uint
strlen(const char *s)
{
170: 55 push %ebp
171: 89 e5 mov %esp,%ebp
173: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
176: 80 39 00 cmpb $0x0,(%ecx)
179: 74 15 je 190 <strlen+0x20>
17b: 31 d2 xor %edx,%edx
17d: 8d 76 00 lea 0x0(%esi),%esi
180: 83 c2 01 add $0x1,%edx
183: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
187: 89 d0 mov %edx,%eax
189: 75 f5 jne 180 <strlen+0x10>
;
return n;
}
18b: 5d pop %ebp
18c: c3 ret
18d: 8d 76 00 lea 0x0(%esi),%esi
for(n = 0; s[n]; n++)
190: 31 c0 xor %eax,%eax
}
192: 5d pop %ebp
193: c3 ret
194: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
19a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
000001a0 <memset>:
void*
memset(void *dst, int c, uint n)
{
1a0: 55 push %ebp
1a1: 89 e5 mov %esp,%ebp
1a3: 57 push %edi
1a4: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
1a7: 8b 4d 10 mov 0x10(%ebp),%ecx
1aa: 8b 45 0c mov 0xc(%ebp),%eax
1ad: 89 d7 mov %edx,%edi
1af: fc cld
1b0: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
1b2: 89 d0 mov %edx,%eax
1b4: 5f pop %edi
1b5: 5d pop %ebp
1b6: c3 ret
1b7: 89 f6 mov %esi,%esi
1b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000001c0 <strchr>:
char*
strchr(const char *s, char c)
{
1c0: 55 push %ebp
1c1: 89 e5 mov %esp,%ebp
1c3: 53 push %ebx
1c4: 8b 45 08 mov 0x8(%ebp),%eax
1c7: 8b 5d 0c mov 0xc(%ebp),%ebx
for(; *s; s++)
1ca: 0f b6 10 movzbl (%eax),%edx
1cd: 84 d2 test %dl,%dl
1cf: 74 1d je 1ee <strchr+0x2e>
if(*s == c)
1d1: 38 d3 cmp %dl,%bl
1d3: 89 d9 mov %ebx,%ecx
1d5: 75 0d jne 1e4 <strchr+0x24>
1d7: eb 17 jmp 1f0 <strchr+0x30>
1d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1e0: 38 ca cmp %cl,%dl
1e2: 74 0c je 1f0 <strchr+0x30>
for(; *s; s++)
1e4: 83 c0 01 add $0x1,%eax
1e7: 0f b6 10 movzbl (%eax),%edx
1ea: 84 d2 test %dl,%dl
1ec: 75 f2 jne 1e0 <strchr+0x20>
return (char*)s;
return 0;
1ee: 31 c0 xor %eax,%eax
}
1f0: 5b pop %ebx
1f1: 5d pop %ebp
1f2: c3 ret
1f3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
1f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000200 <gets>:
char*
gets(char *buf, int max)
{
200: 55 push %ebp
201: 89 e5 mov %esp,%ebp
203: 57 push %edi
204: 56 push %esi
205: 53 push %ebx
int i, cc;
char c;
for(i=0; i+1 < max; ){
206: 31 f6 xor %esi,%esi
208: 89 f3 mov %esi,%ebx
{
20a: 83 ec 1c sub $0x1c,%esp
20d: 8b 7d 08 mov 0x8(%ebp),%edi
for(i=0; i+1 < max; ){
210: eb 2f jmp 241 <gets+0x41>
212: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cc = read(0, &c, 1);
218: 8d 45 e7 lea -0x19(%ebp),%eax
21b: 83 ec 04 sub $0x4,%esp
21e: 6a 01 push $0x1
220: 50 push %eax
221: 6a 00 push $0x0
223: e8 32 01 00 00 call 35a <read>
if(cc < 1)
228: 83 c4 10 add $0x10,%esp
22b: 85 c0 test %eax,%eax
22d: 7e 1c jle 24b <gets+0x4b>
break;
buf[i++] = c;
22f: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
233: 83 c7 01 add $0x1,%edi
236: 88 47 ff mov %al,-0x1(%edi)
if(c == '\n' || c == '\r')
239: 3c 0a cmp $0xa,%al
23b: 74 23 je 260 <gets+0x60>
23d: 3c 0d cmp $0xd,%al
23f: 74 1f je 260 <gets+0x60>
for(i=0; i+1 < max; ){
241: 83 c3 01 add $0x1,%ebx
244: 3b 5d 0c cmp 0xc(%ebp),%ebx
247: 89 fe mov %edi,%esi
249: 7c cd jl 218 <gets+0x18>
24b: 89 f3 mov %esi,%ebx
break;
}
buf[i] = '\0';
return buf;
}
24d: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
250: c6 03 00 movb $0x0,(%ebx)
}
253: 8d 65 f4 lea -0xc(%ebp),%esp
256: 5b pop %ebx
257: 5e pop %esi
258: 5f pop %edi
259: 5d pop %ebp
25a: c3 ret
25b: 90 nop
25c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
260: 8b 75 08 mov 0x8(%ebp),%esi
263: 8b 45 08 mov 0x8(%ebp),%eax
266: 01 de add %ebx,%esi
268: 89 f3 mov %esi,%ebx
buf[i] = '\0';
26a: c6 03 00 movb $0x0,(%ebx)
}
26d: 8d 65 f4 lea -0xc(%ebp),%esp
270: 5b pop %ebx
271: 5e pop %esi
272: 5f pop %edi
273: 5d pop %ebp
274: c3 ret
275: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
279: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000280 <stat>:
int
stat(const char *n, struct stat *st)
{
280: 55 push %ebp
281: 89 e5 mov %esp,%ebp
283: 56 push %esi
284: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
285: 83 ec 08 sub $0x8,%esp
288: 6a 00 push $0x0
28a: ff 75 08 pushl 0x8(%ebp)
28d: e8 f0 00 00 00 call 382 <open>
if(fd < 0)
292: 83 c4 10 add $0x10,%esp
295: 85 c0 test %eax,%eax
297: 78 27 js 2c0 <stat+0x40>
return -1;
r = fstat(fd, st);
299: 83 ec 08 sub $0x8,%esp
29c: ff 75 0c pushl 0xc(%ebp)
29f: 89 c3 mov %eax,%ebx
2a1: 50 push %eax
2a2: e8 f3 00 00 00 call 39a <fstat>
close(fd);
2a7: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
2aa: 89 c6 mov %eax,%esi
close(fd);
2ac: e8 b9 00 00 00 call 36a <close>
return r;
2b1: 83 c4 10 add $0x10,%esp
}
2b4: 8d 65 f8 lea -0x8(%ebp),%esp
2b7: 89 f0 mov %esi,%eax
2b9: 5b pop %ebx
2ba: 5e pop %esi
2bb: 5d pop %ebp
2bc: c3 ret
2bd: 8d 76 00 lea 0x0(%esi),%esi
return -1;
2c0: be ff ff ff ff mov $0xffffffff,%esi
2c5: eb ed jmp 2b4 <stat+0x34>
2c7: 89 f6 mov %esi,%esi
2c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000002d0 <atoi>:
int
atoi(const char *s)
{
2d0: 55 push %ebp
2d1: 89 e5 mov %esp,%ebp
2d3: 53 push %ebx
2d4: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
2d7: 0f be 11 movsbl (%ecx),%edx
2da: 8d 42 d0 lea -0x30(%edx),%eax
2dd: 3c 09 cmp $0x9,%al
n = 0;
2df: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
2e4: 77 1f ja 305 <atoi+0x35>
2e6: 8d 76 00 lea 0x0(%esi),%esi
2e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
2f0: 8d 04 80 lea (%eax,%eax,4),%eax
2f3: 83 c1 01 add $0x1,%ecx
2f6: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
2fa: 0f be 11 movsbl (%ecx),%edx
2fd: 8d 5a d0 lea -0x30(%edx),%ebx
300: 80 fb 09 cmp $0x9,%bl
303: 76 eb jbe 2f0 <atoi+0x20>
return n;
}
305: 5b pop %ebx
306: 5d pop %ebp
307: c3 ret
308: 90 nop
309: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000310 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
310: 55 push %ebp
311: 89 e5 mov %esp,%ebp
313: 56 push %esi
314: 53 push %ebx
315: 8b 5d 10 mov 0x10(%ebp),%ebx
318: 8b 45 08 mov 0x8(%ebp),%eax
31b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
31e: 85 db test %ebx,%ebx
320: 7e 14 jle 336 <memmove+0x26>
322: 31 d2 xor %edx,%edx
324: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
328: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
32c: 88 0c 10 mov %cl,(%eax,%edx,1)
32f: 83 c2 01 add $0x1,%edx
while(n-- > 0)
332: 39 d3 cmp %edx,%ebx
334: 75 f2 jne 328 <memmove+0x18>
return vdst;
}
336: 5b pop %ebx
337: 5e pop %esi
338: 5d pop %ebp
339: c3 ret
0000033a <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
33a: b8 01 00 00 00 mov $0x1,%eax
33f: cd 40 int $0x40
341: c3 ret
00000342 <exit>:
SYSCALL(exit)
342: b8 02 00 00 00 mov $0x2,%eax
347: cd 40 int $0x40
349: c3 ret
0000034a <wait>:
SYSCALL(wait)
34a: b8 03 00 00 00 mov $0x3,%eax
34f: cd 40 int $0x40
351: c3 ret
00000352 <pipe>:
SYSCALL(pipe)
352: b8 04 00 00 00 mov $0x4,%eax
357: cd 40 int $0x40
359: c3 ret
0000035a <read>:
SYSCALL(read)
35a: b8 05 00 00 00 mov $0x5,%eax
35f: cd 40 int $0x40
361: c3 ret
00000362 <write>:
SYSCALL(write)
362: b8 10 00 00 00 mov $0x10,%eax
367: cd 40 int $0x40
369: c3 ret
0000036a <close>:
SYSCALL(close)
36a: b8 15 00 00 00 mov $0x15,%eax
36f: cd 40 int $0x40
371: c3 ret
00000372 <kill>:
SYSCALL(kill)
372: b8 06 00 00 00 mov $0x6,%eax
377: cd 40 int $0x40
379: c3 ret
0000037a <exec>:
SYSCALL(exec)
37a: b8 07 00 00 00 mov $0x7,%eax
37f: cd 40 int $0x40
381: c3 ret
00000382 <open>:
SYSCALL(open)
382: b8 0f 00 00 00 mov $0xf,%eax
387: cd 40 int $0x40
389: c3 ret
0000038a <mknod>:
SYSCALL(mknod)
38a: b8 11 00 00 00 mov $0x11,%eax
38f: cd 40 int $0x40
391: c3 ret
00000392 <unlink>:
SYSCALL(unlink)
392: b8 12 00 00 00 mov $0x12,%eax
397: cd 40 int $0x40
399: c3 ret
0000039a <fstat>:
SYSCALL(fstat)
39a: b8 08 00 00 00 mov $0x8,%eax
39f: cd 40 int $0x40
3a1: c3 ret
000003a2 <link>:
SYSCALL(link)
3a2: b8 13 00 00 00 mov $0x13,%eax
3a7: cd 40 int $0x40
3a9: c3 ret
000003aa <mkdir>:
SYSCALL(mkdir)
3aa: b8 14 00 00 00 mov $0x14,%eax
3af: cd 40 int $0x40
3b1: c3 ret
000003b2 <chdir>:
SYSCALL(chdir)
3b2: b8 09 00 00 00 mov $0x9,%eax
3b7: cd 40 int $0x40
3b9: c3 ret
000003ba <dup>:
SYSCALL(dup)
3ba: b8 0a 00 00 00 mov $0xa,%eax
3bf: cd 40 int $0x40
3c1: c3 ret
000003c2 <getpid>:
SYSCALL(getpid)
3c2: b8 0b 00 00 00 mov $0xb,%eax
3c7: cd 40 int $0x40
3c9: c3 ret
000003ca <sbrk>:
SYSCALL(sbrk)
3ca: b8 0c 00 00 00 mov $0xc,%eax
3cf: cd 40 int $0x40
3d1: c3 ret
000003d2 <sleep>:
SYSCALL(sleep)
3d2: b8 0d 00 00 00 mov $0xd,%eax
3d7: cd 40 int $0x40
3d9: c3 ret
000003da <uptime>:
SYSCALL(uptime)
3da: b8 0e 00 00 00 mov $0xe,%eax
3df: cd 40 int $0x40
3e1: c3 ret
000003e2 <cps>:
SYSCALL(cps)
3e2: b8 16 00 00 00 mov $0x16,%eax
3e7: cd 40 int $0x40
3e9: c3 ret
000003ea <chpr>:
SYSCALL(chpr)
3ea: b8 17 00 00 00 mov $0x17,%eax
3ef: cd 40 int $0x40
3f1: c3 ret
000003f2 <waitx>:
SYSCALL(waitx)
3f2: b8 18 00 00 00 mov $0x18,%eax
3f7: cd 40 int $0x40
3f9: c3 ret
000003fa <getpinfo>:
SYSCALL(getpinfo)
3fa: b8 19 00 00 00 mov $0x19,%eax
3ff: cd 40 int $0x40
401: c3 ret
402: 66 90 xchg %ax,%ax
404: 66 90 xchg %ax,%ax
406: 66 90 xchg %ax,%ax
408: 66 90 xchg %ax,%ax
40a: 66 90 xchg %ax,%ax
40c: 66 90 xchg %ax,%ax
40e: 66 90 xchg %ax,%ax
00000410 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
410: 55 push %ebp
411: 89 e5 mov %esp,%ebp
413: 57 push %edi
414: 56 push %esi
415: 53 push %ebx
416: 83 ec 3c sub $0x3c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
419: 85 d2 test %edx,%edx
{
41b: 89 45 c0 mov %eax,-0x40(%ebp)
neg = 1;
x = -xx;
41e: 89 d0 mov %edx,%eax
if(sgn && xx < 0){
420: 79 76 jns 498 <printint+0x88>
422: f6 45 08 01 testb $0x1,0x8(%ebp)
426: 74 70 je 498 <printint+0x88>
x = -xx;
428: f7 d8 neg %eax
neg = 1;
42a: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
} else {
x = xx;
}
i = 0;
431: 31 f6 xor %esi,%esi
433: 8d 5d d7 lea -0x29(%ebp),%ebx
436: eb 0a jmp 442 <printint+0x32>
438: 90 nop
439: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
do{
buf[i++] = digits[x % base];
440: 89 fe mov %edi,%esi
442: 31 d2 xor %edx,%edx
444: 8d 7e 01 lea 0x1(%esi),%edi
447: f7 f1 div %ecx
449: 0f b6 92 60 08 00 00 movzbl 0x860(%edx),%edx
}while((x /= base) != 0);
450: 85 c0 test %eax,%eax
buf[i++] = digits[x % base];
452: 88 14 3b mov %dl,(%ebx,%edi,1)
}while((x /= base) != 0);
455: 75 e9 jne 440 <printint+0x30>
if(neg)
457: 8b 45 c4 mov -0x3c(%ebp),%eax
45a: 85 c0 test %eax,%eax
45c: 74 08 je 466 <printint+0x56>
buf[i++] = '-';
45e: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1)
463: 8d 7e 02 lea 0x2(%esi),%edi
466: 8d 74 3d d7 lea -0x29(%ebp,%edi,1),%esi
46a: 8b 7d c0 mov -0x40(%ebp),%edi
46d: 8d 76 00 lea 0x0(%esi),%esi
470: 0f b6 06 movzbl (%esi),%eax
write(fd, &c, 1);
473: 83 ec 04 sub $0x4,%esp
476: 83 ee 01 sub $0x1,%esi
479: 6a 01 push $0x1
47b: 53 push %ebx
47c: 57 push %edi
47d: 88 45 d7 mov %al,-0x29(%ebp)
480: e8 dd fe ff ff call 362 <write>
while(--i >= 0)
485: 83 c4 10 add $0x10,%esp
488: 39 de cmp %ebx,%esi
48a: 75 e4 jne 470 <printint+0x60>
putc(fd, buf[i]);
}
48c: 8d 65 f4 lea -0xc(%ebp),%esp
48f: 5b pop %ebx
490: 5e pop %esi
491: 5f pop %edi
492: 5d pop %ebp
493: c3 ret
494: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
498: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
49f: eb 90 jmp 431 <printint+0x21>
4a1: eb 0d jmp 4b0 <printf>
4a3: 90 nop
4a4: 90 nop
4a5: 90 nop
4a6: 90 nop
4a7: 90 nop
4a8: 90 nop
4a9: 90 nop
4aa: 90 nop
4ab: 90 nop
4ac: 90 nop
4ad: 90 nop
4ae: 90 nop
4af: 90 nop
000004b0 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
4b0: 55 push %ebp
4b1: 89 e5 mov %esp,%ebp
4b3: 57 push %edi
4b4: 56 push %esi
4b5: 53 push %ebx
4b6: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
4b9: 8b 75 0c mov 0xc(%ebp),%esi
4bc: 0f b6 1e movzbl (%esi),%ebx
4bf: 84 db test %bl,%bl
4c1: 0f 84 b3 00 00 00 je 57a <printf+0xca>
ap = (uint*)(void*)&fmt + 1;
4c7: 8d 45 10 lea 0x10(%ebp),%eax
4ca: 83 c6 01 add $0x1,%esi
state = 0;
4cd: 31 ff xor %edi,%edi
ap = (uint*)(void*)&fmt + 1;
4cf: 89 45 d4 mov %eax,-0x2c(%ebp)
4d2: eb 2f jmp 503 <printf+0x53>
4d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
4d8: 83 f8 25 cmp $0x25,%eax
4db: 0f 84 a7 00 00 00 je 588 <printf+0xd8>
write(fd, &c, 1);
4e1: 8d 45 e2 lea -0x1e(%ebp),%eax
4e4: 83 ec 04 sub $0x4,%esp
4e7: 88 5d e2 mov %bl,-0x1e(%ebp)
4ea: 6a 01 push $0x1
4ec: 50 push %eax
4ed: ff 75 08 pushl 0x8(%ebp)
4f0: e8 6d fe ff ff call 362 <write>
4f5: 83 c4 10 add $0x10,%esp
4f8: 83 c6 01 add $0x1,%esi
for(i = 0; fmt[i]; i++){
4fb: 0f b6 5e ff movzbl -0x1(%esi),%ebx
4ff: 84 db test %bl,%bl
501: 74 77 je 57a <printf+0xca>
if(state == 0){
503: 85 ff test %edi,%edi
c = fmt[i] & 0xff;
505: 0f be cb movsbl %bl,%ecx
508: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
50b: 74 cb je 4d8 <printf+0x28>
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
50d: 83 ff 25 cmp $0x25,%edi
510: 75 e6 jne 4f8 <printf+0x48>
if(c == 'd'){
512: 83 f8 64 cmp $0x64,%eax
515: 0f 84 05 01 00 00 je 620 <printf+0x170>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
51b: 81 e1 f7 00 00 00 and $0xf7,%ecx
521: 83 f9 70 cmp $0x70,%ecx
524: 74 72 je 598 <printf+0xe8>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
526: 83 f8 73 cmp $0x73,%eax
529: 0f 84 99 00 00 00 je 5c8 <printf+0x118>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
52f: 83 f8 63 cmp $0x63,%eax
532: 0f 84 08 01 00 00 je 640 <printf+0x190>
putc(fd, *ap);
ap++;
} else if(c == '%'){
538: 83 f8 25 cmp $0x25,%eax
53b: 0f 84 ef 00 00 00 je 630 <printf+0x180>
write(fd, &c, 1);
541: 8d 45 e7 lea -0x19(%ebp),%eax
544: 83 ec 04 sub $0x4,%esp
547: c6 45 e7 25 movb $0x25,-0x19(%ebp)
54b: 6a 01 push $0x1
54d: 50 push %eax
54e: ff 75 08 pushl 0x8(%ebp)
551: e8 0c fe ff ff call 362 <write>
556: 83 c4 0c add $0xc,%esp
559: 8d 45 e6 lea -0x1a(%ebp),%eax
55c: 88 5d e6 mov %bl,-0x1a(%ebp)
55f: 6a 01 push $0x1
561: 50 push %eax
562: ff 75 08 pushl 0x8(%ebp)
565: 83 c6 01 add $0x1,%esi
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
568: 31 ff xor %edi,%edi
write(fd, &c, 1);
56a: e8 f3 fd ff ff call 362 <write>
for(i = 0; fmt[i]; i++){
56f: 0f b6 5e ff movzbl -0x1(%esi),%ebx
write(fd, &c, 1);
573: 83 c4 10 add $0x10,%esp
for(i = 0; fmt[i]; i++){
576: 84 db test %bl,%bl
578: 75 89 jne 503 <printf+0x53>
}
}
}
57a: 8d 65 f4 lea -0xc(%ebp),%esp
57d: 5b pop %ebx
57e: 5e pop %esi
57f: 5f pop %edi
580: 5d pop %ebp
581: c3 ret
582: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
state = '%';
588: bf 25 00 00 00 mov $0x25,%edi
58d: e9 66 ff ff ff jmp 4f8 <printf+0x48>
592: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
printint(fd, *ap, 16, 0);
598: 83 ec 0c sub $0xc,%esp
59b: b9 10 00 00 00 mov $0x10,%ecx
5a0: 6a 00 push $0x0
5a2: 8b 7d d4 mov -0x2c(%ebp),%edi
5a5: 8b 45 08 mov 0x8(%ebp),%eax
5a8: 8b 17 mov (%edi),%edx
5aa: e8 61 fe ff ff call 410 <printint>
ap++;
5af: 89 f8 mov %edi,%eax
5b1: 83 c4 10 add $0x10,%esp
state = 0;
5b4: 31 ff xor %edi,%edi
ap++;
5b6: 83 c0 04 add $0x4,%eax
5b9: 89 45 d4 mov %eax,-0x2c(%ebp)
5bc: e9 37 ff ff ff jmp 4f8 <printf+0x48>
5c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
s = (char*)*ap;
5c8: 8b 45 d4 mov -0x2c(%ebp),%eax
5cb: 8b 08 mov (%eax),%ecx
ap++;
5cd: 83 c0 04 add $0x4,%eax
5d0: 89 45 d4 mov %eax,-0x2c(%ebp)
if(s == 0)
5d3: 85 c9 test %ecx,%ecx
5d5: 0f 84 8e 00 00 00 je 669 <printf+0x1b9>
while(*s != 0){
5db: 0f b6 01 movzbl (%ecx),%eax
state = 0;
5de: 31 ff xor %edi,%edi
s = (char*)*ap;
5e0: 89 cb mov %ecx,%ebx
while(*s != 0){
5e2: 84 c0 test %al,%al
5e4: 0f 84 0e ff ff ff je 4f8 <printf+0x48>
5ea: 89 75 d0 mov %esi,-0x30(%ebp)
5ed: 89 de mov %ebx,%esi
5ef: 8b 5d 08 mov 0x8(%ebp),%ebx
5f2: 8d 7d e3 lea -0x1d(%ebp),%edi
5f5: 8d 76 00 lea 0x0(%esi),%esi
write(fd, &c, 1);
5f8: 83 ec 04 sub $0x4,%esp
s++;
5fb: 83 c6 01 add $0x1,%esi
5fe: 88 45 e3 mov %al,-0x1d(%ebp)
write(fd, &c, 1);
601: 6a 01 push $0x1
603: 57 push %edi
604: 53 push %ebx
605: e8 58 fd ff ff call 362 <write>
while(*s != 0){
60a: 0f b6 06 movzbl (%esi),%eax
60d: 83 c4 10 add $0x10,%esp
610: 84 c0 test %al,%al
612: 75 e4 jne 5f8 <printf+0x148>
614: 8b 75 d0 mov -0x30(%ebp),%esi
state = 0;
617: 31 ff xor %edi,%edi
619: e9 da fe ff ff jmp 4f8 <printf+0x48>
61e: 66 90 xchg %ax,%ax
printint(fd, *ap, 10, 1);
620: 83 ec 0c sub $0xc,%esp
623: b9 0a 00 00 00 mov $0xa,%ecx
628: 6a 01 push $0x1
62a: e9 73 ff ff ff jmp 5a2 <printf+0xf2>
62f: 90 nop
write(fd, &c, 1);
630: 83 ec 04 sub $0x4,%esp
633: 88 5d e5 mov %bl,-0x1b(%ebp)
636: 8d 45 e5 lea -0x1b(%ebp),%eax
639: 6a 01 push $0x1
63b: e9 21 ff ff ff jmp 561 <printf+0xb1>
putc(fd, *ap);
640: 8b 7d d4 mov -0x2c(%ebp),%edi
write(fd, &c, 1);
643: 83 ec 04 sub $0x4,%esp
putc(fd, *ap);
646: 8b 07 mov (%edi),%eax
write(fd, &c, 1);
648: 6a 01 push $0x1
ap++;
64a: 83 c7 04 add $0x4,%edi
putc(fd, *ap);
64d: 88 45 e4 mov %al,-0x1c(%ebp)
write(fd, &c, 1);
650: 8d 45 e4 lea -0x1c(%ebp),%eax
653: 50 push %eax
654: ff 75 08 pushl 0x8(%ebp)
657: e8 06 fd ff ff call 362 <write>
ap++;
65c: 89 7d d4 mov %edi,-0x2c(%ebp)
65f: 83 c4 10 add $0x10,%esp
state = 0;
662: 31 ff xor %edi,%edi
664: e9 8f fe ff ff jmp 4f8 <printf+0x48>
s = "(null)";
669: bb 58 08 00 00 mov $0x858,%ebx
while(*s != 0){
66e: b8 28 00 00 00 mov $0x28,%eax
673: e9 72 ff ff ff jmp 5ea <printf+0x13a>
678: 66 90 xchg %ax,%ax
67a: 66 90 xchg %ax,%ax
67c: 66 90 xchg %ax,%ax
67e: 66 90 xchg %ax,%ax
00000680 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
680: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
681: a1 10 0b 00 00 mov 0xb10,%eax
{
686: 89 e5 mov %esp,%ebp
688: 57 push %edi
689: 56 push %esi
68a: 53 push %ebx
68b: 8b 5d 08 mov 0x8(%ebp),%ebx
bp = (Header*)ap - 1;
68e: 8d 4b f8 lea -0x8(%ebx),%ecx
691: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
698: 39 c8 cmp %ecx,%eax
69a: 8b 10 mov (%eax),%edx
69c: 73 32 jae 6d0 <free+0x50>
69e: 39 d1 cmp %edx,%ecx
6a0: 72 04 jb 6a6 <free+0x26>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
6a2: 39 d0 cmp %edx,%eax
6a4: 72 32 jb 6d8 <free+0x58>
break;
if(bp + bp->s.size == p->s.ptr){
6a6: 8b 73 fc mov -0x4(%ebx),%esi
6a9: 8d 3c f1 lea (%ecx,%esi,8),%edi
6ac: 39 fa cmp %edi,%edx
6ae: 74 30 je 6e0 <free+0x60>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
6b0: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
6b3: 8b 50 04 mov 0x4(%eax),%edx
6b6: 8d 34 d0 lea (%eax,%edx,8),%esi
6b9: 39 f1 cmp %esi,%ecx
6bb: 74 3a je 6f7 <free+0x77>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
6bd: 89 08 mov %ecx,(%eax)
freep = p;
6bf: a3 10 0b 00 00 mov %eax,0xb10
}
6c4: 5b pop %ebx
6c5: 5e pop %esi
6c6: 5f pop %edi
6c7: 5d pop %ebp
6c8: c3 ret
6c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
6d0: 39 d0 cmp %edx,%eax
6d2: 72 04 jb 6d8 <free+0x58>
6d4: 39 d1 cmp %edx,%ecx
6d6: 72 ce jb 6a6 <free+0x26>
{
6d8: 89 d0 mov %edx,%eax
6da: eb bc jmp 698 <free+0x18>
6dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp->s.size += p->s.ptr->s.size;
6e0: 03 72 04 add 0x4(%edx),%esi
6e3: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
6e6: 8b 10 mov (%eax),%edx
6e8: 8b 12 mov (%edx),%edx
6ea: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
6ed: 8b 50 04 mov 0x4(%eax),%edx
6f0: 8d 34 d0 lea (%eax,%edx,8),%esi
6f3: 39 f1 cmp %esi,%ecx
6f5: 75 c6 jne 6bd <free+0x3d>
p->s.size += bp->s.size;
6f7: 03 53 fc add -0x4(%ebx),%edx
freep = p;
6fa: a3 10 0b 00 00 mov %eax,0xb10
p->s.size += bp->s.size;
6ff: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
702: 8b 53 f8 mov -0x8(%ebx),%edx
705: 89 10 mov %edx,(%eax)
}
707: 5b pop %ebx
708: 5e pop %esi
709: 5f pop %edi
70a: 5d pop %ebp
70b: c3 ret
70c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000710 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
710: 55 push %ebp
711: 89 e5 mov %esp,%ebp
713: 57 push %edi
714: 56 push %esi
715: 53 push %ebx
716: 83 ec 0c sub $0xc,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
719: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
71c: 8b 15 10 0b 00 00 mov 0xb10,%edx
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
722: 8d 78 07 lea 0x7(%eax),%edi
725: c1 ef 03 shr $0x3,%edi
728: 83 c7 01 add $0x1,%edi
if((prevp = freep) == 0){
72b: 85 d2 test %edx,%edx
72d: 0f 84 9d 00 00 00 je 7d0 <malloc+0xc0>
733: 8b 02 mov (%edx),%eax
735: 8b 48 04 mov 0x4(%eax),%ecx
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
738: 39 cf cmp %ecx,%edi
73a: 76 6c jbe 7a8 <malloc+0x98>
73c: 81 ff 00 10 00 00 cmp $0x1000,%edi
742: bb 00 10 00 00 mov $0x1000,%ebx
747: 0f 43 df cmovae %edi,%ebx
p = sbrk(nu * sizeof(Header));
74a: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
751: eb 0e jmp 761 <malloc+0x51>
753: 90 nop
754: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
758: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
75a: 8b 48 04 mov 0x4(%eax),%ecx
75d: 39 f9 cmp %edi,%ecx
75f: 73 47 jae 7a8 <malloc+0x98>
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
761: 39 05 10 0b 00 00 cmp %eax,0xb10
767: 89 c2 mov %eax,%edx
769: 75 ed jne 758 <malloc+0x48>
p = sbrk(nu * sizeof(Header));
76b: 83 ec 0c sub $0xc,%esp
76e: 56 push %esi
76f: e8 56 fc ff ff call 3ca <sbrk>
if(p == (char*)-1)
774: 83 c4 10 add $0x10,%esp
777: 83 f8 ff cmp $0xffffffff,%eax
77a: 74 1c je 798 <malloc+0x88>
hp->s.size = nu;
77c: 89 58 04 mov %ebx,0x4(%eax)
free((void*)(hp + 1));
77f: 83 ec 0c sub $0xc,%esp
782: 83 c0 08 add $0x8,%eax
785: 50 push %eax
786: e8 f5 fe ff ff call 680 <free>
return freep;
78b: 8b 15 10 0b 00 00 mov 0xb10,%edx
if((p = morecore(nunits)) == 0)
791: 83 c4 10 add $0x10,%esp
794: 85 d2 test %edx,%edx
796: 75 c0 jne 758 <malloc+0x48>
return 0;
}
}
798: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
79b: 31 c0 xor %eax,%eax
}
79d: 5b pop %ebx
79e: 5e pop %esi
79f: 5f pop %edi
7a0: 5d pop %ebp
7a1: c3 ret
7a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(p->s.size == nunits)
7a8: 39 cf cmp %ecx,%edi
7aa: 74 54 je 800 <malloc+0xf0>
p->s.size -= nunits;
7ac: 29 f9 sub %edi,%ecx
7ae: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
7b1: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
7b4: 89 78 04 mov %edi,0x4(%eax)
freep = prevp;
7b7: 89 15 10 0b 00 00 mov %edx,0xb10
}
7bd: 8d 65 f4 lea -0xc(%ebp),%esp
return (void*)(p + 1);
7c0: 83 c0 08 add $0x8,%eax
}
7c3: 5b pop %ebx
7c4: 5e pop %esi
7c5: 5f pop %edi
7c6: 5d pop %ebp
7c7: c3 ret
7c8: 90 nop
7c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
base.s.ptr = freep = prevp = &base;
7d0: c7 05 10 0b 00 00 14 movl $0xb14,0xb10
7d7: 0b 00 00
7da: c7 05 14 0b 00 00 14 movl $0xb14,0xb14
7e1: 0b 00 00
base.s.size = 0;
7e4: b8 14 0b 00 00 mov $0xb14,%eax
7e9: c7 05 18 0b 00 00 00 movl $0x0,0xb18
7f0: 00 00 00
7f3: e9 44 ff ff ff jmp 73c <malloc+0x2c>
7f8: 90 nop
7f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
prevp->s.ptr = p->s.ptr;
800: 8b 08 mov (%eax),%ecx
802: 89 0a mov %ecx,(%edx)
804: eb b1 jmp 7b7 <malloc+0xa7>
| 33.817891 | 60 | 0.411337 |
65a2f83b0ef05eb680d6296a947b9d11428b71b7 | 2,260 | asm | Assembly | lib/string.asm | xiazihao/OSx86 | 1b94912c957866d9a7e1f66aad1cce42ebbf1b08 | [
"Unlicense"
] | null | null | null | lib/string.asm | xiazihao/OSx86 | 1b94912c957866d9a7e1f66aad1cce42ebbf1b08 | [
"Unlicense"
] | null | null | null | lib/string.asm | xiazihao/OSx86 | 1b94912c957866d9a7e1f66aad1cce42ebbf1b08 | [
"Unlicense"
] | null | null | null | ; GLOBAL memcpy
GLOBAL memset
GLOBAL strcpy
; GLOBAL strlen
; memcpy:
; push ebp
; mov ebp, esp
; push esi
; push edi
; push ecx
; mov edi, [ebp + 8] ; Destination
; mov esi, [ebp + 12] ; Source
; mov ecx, [ebp + 16] ; Counter
; .1:
; cmp ecx, 0 ; 判断计数器
; jz .2 ; 计数器为零时跳出
; mov al, [ds:esi] ; ┓
; inc esi ; ┃
; ; ┣ 逐字节移动
; mov byte [es:edi], al ; ┃
; inc edi ; ┛
; dec ecx ; 计数器减一
; jmp .1 ; 循环
; .2:
; mov eax, [ebp + 8] ; 返回值
; pop ecx
; pop edi
; pop esi
; mov esp, ebp
; pop ebp
; ret ; 函数结束,返回
; ; MemCpy 结束-------------------------------------------------------------
; memset:
; push ebp
; mov ebp, esp
; push esi
; push edi
; push ecx
; mov edi, [ebp + 8] ; Destination
; mov edx, [ebp + 12] ; char to put
; mov ecx, [ebp + 16] ; Counter
; .1:
; cmp ecx, 0 ; 判断计数器
; jz .2 ; 计数器为零时跳出
; ; ┃
; ; ┣ 逐字节移动
; mov byte [es:edi], dl ; ┃
; inc edi ; ┛
; dec ecx ; 计数器减一
; jmp .1 ; 循环
; .2:
; mov eax, [ebp + 8] ; 返回值
; pop ecx
; pop edi
; pop esi
; mov esp, ebp
; pop ebp
; ret ; 函数结束,返回
; MemCpy 结束-------------------------------------------------------------
; strcpy:
; push ebp
; mov ebp, esp
; mov esi, [ebp + 12] ; Source
; mov edi, [ebp + 8] ; Destination
; .1:
; mov al, [esi] ; ┓
; inc esi ; ┃
; ; ┣ 逐字节移动
; mov byte [edi], al ; ┃
; inc edi ; ┛
; cmp al, 0 ; 是否遇到 '\0'
; jnz .1 ; 没遇到就继续循环,遇到就结束
; mov eax, [ebp + 8] ; 返回值
; pop ebp
; ret ; 函数结束,返回
; strlen:
; push ebp
; mov ebp, esp
; mov eax, 0 ; 字符串长度开始是 0
; mov esi, [ebp + 8] ; esi 指向首地址
; .1:
; cmp byte [esi], 0 ; 看 esi 指向的字符是否是 '\0'
; jz .2 ; 如果是 '\0',程序结束
; inc esi ; 如果不是 '\0',esi 指向下一个字符
; inc eax ; 并且,eax 自加一
; jmp .1 ; 如此循环
; .2:
; pop ebp
; ret ; 函数结束,返回
; ; ------------------------------------------------------------------------
| 20 | 76 | 0.367257 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.