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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
59d3119223b04f8c57a547c834e2bbe6f4fcaa0e | 193 | asm | Assembly | srcs/ft_list_size.asm | caio-vinicius/libasm | f8e22fa21f79cdee80de6eb9ee72e3414054c804 | [
"MIT"
] | null | null | null | srcs/ft_list_size.asm | caio-vinicius/libasm | f8e22fa21f79cdee80de6eb9ee72e3414054c804 | [
"MIT"
] | null | null | null | srcs/ft_list_size.asm | caio-vinicius/libasm | f8e22fa21f79cdee80de6eb9ee72e3414054c804 | [
"MIT"
] | null | null | null | section .text
global ft_list_size
ft_list_size:
xor rax, rax
ft_list_size_next:
cmp rdi, 0
je ft_list_size_null
inc rax
mov rdi, [rdi+8]
jmp ft_list_size_next
ft_list_size_null:
ret
| 12.0625 | 22 | 0.772021 |
d37909a1f7418a5b48b444f7b99b8a0f93fb2ba3 | 1,728 | asm | Assembly | _maps/obj4E.asm | vladjester2020/Sonic1TMR | 22e749a2aab74cc725729e476d6252b071c12e42 | [
"Apache-2.0"
] | null | null | null | _maps/obj4E.asm | vladjester2020/Sonic1TMR | 22e749a2aab74cc725729e476d6252b071c12e42 | [
"Apache-2.0"
] | 2 | 2019-06-13T14:26:59.000Z | 2019-10-10T13:15:14.000Z | _maps/obj4E.asm | vladjester2020/Sonic1TMR | 22e749a2aab74cc725729e476d6252b071c12e42 | [
"Apache-2.0"
] | null | null | null | ; ---------------------------------------------------------------------------
; Sprite mappings - advancing wall of lava (MZ)
; ---------------------------------------------------------------------------
dc.w byte_F538-Map_obj4E
dc.w byte_F566-Map_obj4E
dc.w byte_F594-Map_obj4E
dc.w byte_F5C2-Map_obj4E
dc.w byte_F5F0-Map_obj4E
byte_F538: dc.b 9
dc.b $E0, $F, 0, $60, $20
dc.b 0, $F, 0, $70, $3C
dc.b 0, $F, $FF, $2A, $20
dc.b $E0, $F, $FF, $2A, 0
dc.b 0, $F, $FF, $2A, 0
dc.b $E0, $F, $FF, $2A, $E0
dc.b 0, $F, $FF, $2A, $E0
dc.b $E0, $F, $FF, $2A, $C0
dc.b 0, $F, $FF, $2A, $C0
byte_F566: dc.b 9
dc.b $E0, $F, 0, $70, $20
dc.b 0, $F, 0, $80, $3C
dc.b 0, $F, $FF, $2A, $20
dc.b $E0, $F, $FF, $2A, 0
dc.b 0, $F, $FF, $2A, 0
dc.b $E0, $F, $FF, $2A, $E0
dc.b 0, $F, $FF, $2A, $E0
dc.b $E0, $F, $FF, $2A, $C0
dc.b 0, $F, $FF, $2A, $C0
byte_F594: dc.b 9
dc.b $E0, $F, 0, $80, $20
dc.b 0, $F, 0, $70, $3C
dc.b 0, $F, $FF, $2A, $20
dc.b $E0, $F, $FF, $2A, 0
dc.b 0, $F, $FF, $2A, 0
dc.b $E0, $F, $FF, $2A, $E0
dc.b 0, $F, $FF, $2A, $E0
dc.b $E0, $F, $FF, $2A, $C0
dc.b 0, $F, $FF, $2A, $C0
byte_F5C2: dc.b 9
dc.b $E0, $F, 0, $70, $20
dc.b 0, $F, 0, $60, $3C
dc.b 0, $F, $FF, $2A, $20
dc.b $E0, $F, $FF, $2A, 0
dc.b 0, $F, $FF, $2A, 0
dc.b $E0, $F, $FF, $2A, $E0
dc.b 0, $F, $FF, $2A, $E0
dc.b $E0, $F, $FF, $2A, $C0
dc.b 0, $F, $FF, $2A, $C0
byte_F5F0: dc.b 8
dc.b $E0, $F, $FF, $2A, $20
dc.b 0, $F, $FF, $2A, $20
dc.b $E0, $F, $FF, $2A, 0
dc.b 0, $F, $FF, $2A, 0
dc.b $E0, $F, $FF, $2A, $E0
dc.b 0, $F, $FF, $2A, $E0
dc.b $E0, $F, $FF, $2A, $C0
dc.b 0, $F, $FF, $2A, $C0
even | 29.793103 | 78 | 0.402199 |
e0aef6fd9d624fc71d505efd8b77b2ef454e7df9 | 597 | asm | Assembly | programs/oeis/184/A184653.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/184/A184653.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/184/A184653.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A184653: floor(n*s+h-h*s), where s=(3+sqrt(3))/2, h=-1/2; complement of A184638.
; 3,5,7,10,12,14,17,19,21,24,26,29,31,33,36,38,40,43,45,48,50,52,55,57,59,62,64,66,69,71,74,76,78,81,83,85,88,90,92,95,97,100,102,104,107,109,111,114,116,118,121,123,126,128,130,133,135,137,140,142,145,147,149,152,154,156,159,161,163,166,168,171,173,175,178,180,182,185,187,189,192,194,197,199,201,204,206,208,211,213,215,218,220,223,225,227,230
add $0,1
mul $0,2
mov $1,$0
seq $1,3511 ; A Beatty sequence: floor( n * (1 + sqrt(3))/2 ).
add $1,$0
sub $1,1
mov $0,$1
mul $0,$1
div $0,2
add $1,3
div $0,$1
add $0,2
| 37.3125 | 345 | 0.653266 |
4610e21711cec73b5c5b6039d1a7e774027bdd95 | 649 | asm | Assembly | oeis/334/A334680.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/334/A334680.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/334/A334680.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A334680: a(n) is the total number of down-steps after the final up-step in all 2-Dyck paths of length 3*n (n up-steps and 2*n down-steps).
; Submitted by Christian Krause
; 0,2,9,43,218,1155,6324,35511,203412,1184040,6983925,41652468,250763464,1521935948,9301989144,57203999295,353701790376,2197600497330,13713291247635,85907187607395,540072341320050,3406202392821375,21545888897092560,136655834260685220,868897745157965328
add $0,1
mov $2,2
mov $3,$0
lpb $2
mov $0,$3
sub $2,1
sub $0,$2
seq $0,1764 ; a(n) = binomial(3*n,n)/(2*n+1) (enumerates ternary trees and also noncrossing trees).
mov $1,$0
sub $1,$4
add $4,$1
lpe
mov $0,$1
| 36.055556 | 252 | 0.739599 |
38dbf09639281f5ef1cffb9f08880fb22eef2fca | 166,674 | asm | Assembly | project/ntstub/i386/6_3_9600_sp0_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_3_9600_sp0_ssdt_sysenter.asm | stonedreamforest/windows-syscall-table | 6216a2559d714eb04bad278792a6544ab8f21d41 | [
"BSD-3-Clause"
] | null | null | null | project/ntstub/i386/6_3_9600_sp0_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.3.9600-sp0-windows-8.1 i386
.686
.mmx
.xmm
.model flat,stdcall
option casemap:none
option prologue:none
option epilogue:none
.code
; ULONG __stdcall NtWorkerFactoryWorkerReady( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtWorkerFactoryWorkerReady PROC STDCALL arg_01:DWORD
mov eax , 0
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWorkerFactoryWorkerReady ENDP
; ULONG __stdcall NtAcceptConnectPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtAcceptConnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 1
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAcceptConnectPort ENDP
; ULONG __stdcall NtYieldExecution( );
_6_3_9600_sp0_windows_8_1_NtYieldExecution PROC STDCALL
mov eax , 2
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtYieldExecution ENDP
; ULONG __stdcall NtWriteVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtWriteVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 3
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWriteVirtualMemory ENDP
; ULONG __stdcall NtWriteRequestData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtWriteRequestData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 4
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWriteRequestData 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_3_9600_sp0_windows_8_1_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 , 5
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWriteFileGather 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_3_9600_sp0_windows_8_1_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 , 6
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWriteFile ENDP
; ULONG __stdcall NtWaitLowEventPair( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtWaitLowEventPair PROC STDCALL arg_01:DWORD
mov eax , 7
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWaitLowEventPair ENDP
; ULONG __stdcall NtWaitHighEventPair( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtWaitHighEventPair PROC STDCALL arg_01:DWORD
mov eax , 8
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWaitHighEventPair ENDP
; ULONG __stdcall NtWaitForWorkViaWorkerFactory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtWaitForWorkViaWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 9
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWaitForWorkViaWorkerFactory ENDP
; ULONG __stdcall NtWaitForSingleObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtWaitForSingleObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 10
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWaitForSingleObject ENDP
; ULONG __stdcall NtWaitForMultipleObjects32( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtWaitForMultipleObjects32 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 11
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWaitForMultipleObjects32 ENDP
; ULONG __stdcall NtWaitForMultipleObjects( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtWaitForMultipleObjects PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 12
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWaitForMultipleObjects ENDP
; ULONG __stdcall NtWaitForKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtWaitForKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 13
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWaitForKeyedEvent ENDP
; ULONG __stdcall NtWaitForDebugEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtWaitForDebugEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 14
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWaitForDebugEvent ENDP
; ULONG __stdcall NtWaitForAlertByThreadId( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtWaitForAlertByThreadId PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 15
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtWaitForAlertByThreadId ENDP
; ULONG __stdcall NtVdmControl( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtVdmControl PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 16
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtVdmControl ENDP
; ULONG __stdcall NtUnsubscribeWnfStateChange( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtUnsubscribeWnfStateChange PROC STDCALL arg_01:DWORD
mov eax , 17
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtUnsubscribeWnfStateChange ENDP
; ULONG __stdcall NtUpdateWnfStateData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 );
_6_3_9600_sp0_windows_8_1_NtUpdateWnfStateData 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 , 18
call _label_sysenter
ret 28
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtUpdateWnfStateData ENDP
; ULONG __stdcall NtUnmapViewOfSection( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtUnmapViewOfSection PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 19
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtUnmapViewOfSection ENDP
; ULONG __stdcall NtUnmapViewOfSectionEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtUnmapViewOfSectionEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 20
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtUnmapViewOfSectionEx ENDP
; ULONG __stdcall NtUnlockVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtUnlockVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 21
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtUnlockVirtualMemory ENDP
; ULONG __stdcall NtUnlockFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtUnlockFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 22
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtUnlockFile ENDP
; ULONG __stdcall NtUnloadKeyEx( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtUnloadKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 23
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtUnloadKeyEx ENDP
; ULONG __stdcall NtUnloadKey2( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtUnloadKey2 PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 24
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtUnloadKey2 ENDP
; ULONG __stdcall NtUnloadKey( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtUnloadKey PROC STDCALL arg_01:DWORD
mov eax , 25
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtUnloadKey ENDP
; ULONG __stdcall NtUnloadDriver( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtUnloadDriver PROC STDCALL arg_01:DWORD
mov eax , 26
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtUnloadDriver ENDP
; ULONG __stdcall NtUmsThreadYield( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtUmsThreadYield PROC STDCALL arg_01:DWORD
mov eax , 27
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtUmsThreadYield ENDP
; ULONG __stdcall NtTranslateFilePath( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtTranslateFilePath PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 28
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtTranslateFilePath ENDP
; ULONG __stdcall NtTraceEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtTraceEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 29
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtTraceEvent ENDP
; ULONG __stdcall NtTraceControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtTraceControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 30
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtTraceControl ENDP
; ULONG __stdcall NtThawTransactions( );
_6_3_9600_sp0_windows_8_1_NtThawTransactions PROC STDCALL
mov eax , 31
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtThawTransactions ENDP
; ULONG __stdcall NtThawRegistry( );
_6_3_9600_sp0_windows_8_1_NtThawRegistry PROC STDCALL
mov eax , 32
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtThawRegistry ENDP
; ULONG __stdcall NtTestAlert( );
_6_3_9600_sp0_windows_8_1_NtTestAlert PROC STDCALL
mov eax , 33
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtTestAlert ENDP
; ULONG __stdcall NtTerminateThread( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtTerminateThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 34
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtTerminateThread ENDP
; ULONG __stdcall NtTerminateProcess( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtTerminateProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 35
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtTerminateProcess ENDP
; ULONG __stdcall NtTerminateJobObject( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtTerminateJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 36
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtTerminateJobObject ENDP
; ULONG __stdcall NtSystemDebugControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtSystemDebugControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 37
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSystemDebugControl ENDP
; ULONG __stdcall NtSuspendThread( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSuspendThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 38
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSuspendThread ENDP
; ULONG __stdcall NtSuspendProcess( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtSuspendProcess PROC STDCALL arg_01:DWORD
mov eax , 39
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSuspendProcess ENDP
; ULONG __stdcall NtSubscribeWnfStateChange( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSubscribeWnfStateChange PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 40
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSubscribeWnfStateChange ENDP
; ULONG __stdcall NtStopProfile( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtStopProfile PROC STDCALL arg_01:DWORD
mov eax , 41
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtStopProfile ENDP
; ULONG __stdcall NtStartProfile( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtStartProfile PROC STDCALL arg_01:DWORD
mov eax , 42
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtStartProfile ENDP
; ULONG __stdcall NtSinglePhaseReject( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSinglePhaseReject PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 43
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSinglePhaseReject ENDP
; ULONG __stdcall NtSignalAndWaitForSingleObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSignalAndWaitForSingleObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 44
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSignalAndWaitForSingleObject ENDP
; ULONG __stdcall NtShutdownWorkerFactory( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtShutdownWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 45
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtShutdownWorkerFactory ENDP
; ULONG __stdcall NtShutdownSystem( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtShutdownSystem PROC STDCALL arg_01:DWORD
mov eax , 46
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtShutdownSystem ENDP
; ULONG __stdcall NtSetWnfProcessNotificationEvent( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtSetWnfProcessNotificationEvent PROC STDCALL arg_01:DWORD
mov eax , 47
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetWnfProcessNotificationEvent ENDP
; ULONG __stdcall NtSetVolumeInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtSetVolumeInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 48
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetVolumeInformationFile ENDP
; ULONG __stdcall NtSetValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtSetValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 49
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetValueKey ENDP
; ULONG __stdcall NtSetUuidSeed( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtSetUuidSeed PROC STDCALL arg_01:DWORD
mov eax , 50
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetUuidSeed ENDP
; ULONG __stdcall NtSetTimerResolution( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtSetTimerResolution PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 51
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetTimerResolution ENDP
; ULONG __stdcall NtSetTimerEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetTimerEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 52
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetTimerEx 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_3_9600_sp0_windows_8_1_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 , 53
call _label_sysenter
ret 28
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetTimer ENDP
; ULONG __stdcall NtSetThreadExecutionState( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSetThreadExecutionState PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 54
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetThreadExecutionState ENDP
; ULONG __stdcall NtSetSystemTime( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSetSystemTime PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 55
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetSystemTime ENDP
; ULONG __stdcall NtSetSystemPowerState( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtSetSystemPowerState PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 56
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetSystemPowerState ENDP
; ULONG __stdcall NtSetSystemInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtSetSystemInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 57
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetSystemInformation ENDP
; ULONG __stdcall NtSetSystemEnvironmentValueEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtSetSystemEnvironmentValueEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 58
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetSystemEnvironmentValueEx ENDP
; ULONG __stdcall NtSetSystemEnvironmentValue( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSetSystemEnvironmentValue PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 59
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetSystemEnvironmentValue ENDP
; ULONG __stdcall NtSetSecurityObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtSetSecurityObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 60
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetSecurityObject ENDP
; ULONG __stdcall NtSetQuotaInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetQuotaInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 61
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetQuotaInformationFile ENDP
; ULONG __stdcall NtSetLowWaitHighEventPair( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtSetLowWaitHighEventPair PROC STDCALL arg_01:DWORD
mov eax , 62
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetLowWaitHighEventPair ENDP
; ULONG __stdcall NtSetLowEventPair( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtSetLowEventPair PROC STDCALL arg_01:DWORD
mov eax , 63
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetLowEventPair ENDP
; ULONG __stdcall NtSetLdtEntries( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtSetLdtEntries PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 64
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetLdtEntries ENDP
; ULONG __stdcall NtSetIRTimer( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSetIRTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 65
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetIRTimer ENDP
; ULONG __stdcall NtSetTimer2( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetTimer2 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 66
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetTimer2 ENDP
; ULONG __stdcall NtCancelTimer2( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtCancelTimer2 PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 67
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCancelTimer2 ENDP
; ULONG __stdcall NtSetIoCompletionEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtSetIoCompletionEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 68
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetIoCompletionEx ENDP
; ULONG __stdcall NtSetIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtSetIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 69
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetIoCompletion ENDP
; ULONG __stdcall NtSetIntervalProfile( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSetIntervalProfile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 70
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetIntervalProfile ENDP
; ULONG __stdcall NtSetInformationWorkerFactory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetInformationWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 71
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationWorkerFactory ENDP
; ULONG __stdcall NtSetInformationTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetInformationTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 72
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationTransactionManager ENDP
; ULONG __stdcall NtSetInformationTransaction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetInformationTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 73
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationTransaction ENDP
; ULONG __stdcall NtSetInformationToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetInformationToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 74
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationToken ENDP
; ULONG __stdcall NtSetInformationThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetInformationThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 75
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationThread ENDP
; ULONG __stdcall NtSetInformationResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetInformationResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 76
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationResourceManager ENDP
; ULONG __stdcall NtSetInformationProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetInformationProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 77
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationProcess ENDP
; ULONG __stdcall NtSetInformationObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetInformationObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 78
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationObject ENDP
; ULONG __stdcall NtSetInformationKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetInformationKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 79
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationKey ENDP
; ULONG __stdcall NtSetInformationJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetInformationJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 80
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationJobObject ENDP
; ULONG __stdcall NtSetInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtSetInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 81
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationFile ENDP
; ULONG __stdcall NtSetInformationEnlistment( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetInformationEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 82
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationEnlistment ENDP
; ULONG __stdcall NtSetInformationDebugObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtSetInformationDebugObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 83
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationDebugObject ENDP
; ULONG __stdcall NtSetHighWaitLowEventPair( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtSetHighWaitLowEventPair PROC STDCALL arg_01:DWORD
mov eax , 84
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetHighWaitLowEventPair ENDP
; ULONG __stdcall NtSetHighEventPair( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtSetHighEventPair PROC STDCALL arg_01:DWORD
mov eax , 85
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetHighEventPair ENDP
; ULONG __stdcall NtSetEventBoostPriority( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtSetEventBoostPriority PROC STDCALL arg_01:DWORD
mov eax , 86
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetEventBoostPriority ENDP
; ULONG __stdcall NtSetEvent( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSetEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 87
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetEvent ENDP
; ULONG __stdcall NtSetEaFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtSetEaFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 88
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetEaFile ENDP
; ULONG __stdcall NtSetDriverEntryOrder( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSetDriverEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 89
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetDriverEntryOrder ENDP
; ULONG __stdcall NtSetDefaultUILanguage( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtSetDefaultUILanguage PROC STDCALL arg_01:DWORD
mov eax , 90
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetDefaultUILanguage ENDP
; ULONG __stdcall NtSetDefaultLocale( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSetDefaultLocale PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 91
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetDefaultLocale ENDP
; ULONG __stdcall NtSetDefaultHardErrorPort( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtSetDefaultHardErrorPort PROC STDCALL arg_01:DWORD
mov eax , 92
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetDefaultHardErrorPort ENDP
; ULONG __stdcall NtSetDebugFilterState( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtSetDebugFilterState PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 93
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetDebugFilterState ENDP
; ULONG __stdcall NtSetContextThread( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSetContextThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 94
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetContextThread ENDP
; ULONG __stdcall NtSetCachedSigningLevel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtSetCachedSigningLevel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 95
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetCachedSigningLevel ENDP
; ULONG __stdcall NtSetBootOptions( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSetBootOptions PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 96
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetBootOptions ENDP
; ULONG __stdcall NtSetBootEntryOrder( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSetBootEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 97
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetBootEntryOrder ENDP
; ULONG __stdcall NtSerializeBoot( );
_6_3_9600_sp0_windows_8_1_NtSerializeBoot PROC STDCALL
mov eax , 98
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSerializeBoot 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_3_9600_sp0_windows_8_1_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 , 99
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSecureConnectPort ENDP
; ULONG __stdcall NtSaveMergedKeys( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtSaveMergedKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 100
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSaveMergedKeys ENDP
; ULONG __stdcall NtSaveKeyEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtSaveKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 101
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSaveKeyEx ENDP
; ULONG __stdcall NtSaveKey( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtSaveKey PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 102
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSaveKey ENDP
; ULONG __stdcall NtRollforwardTransactionManager( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtRollforwardTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 103
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRollforwardTransactionManager ENDP
; ULONG __stdcall NtRollbackTransaction( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtRollbackTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 104
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRollbackTransaction ENDP
; ULONG __stdcall NtRollbackEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtRollbackEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 105
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRollbackEnlistment ENDP
; ULONG __stdcall NtRollbackComplete( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtRollbackComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 106
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRollbackComplete ENDP
; ULONG __stdcall NtResumeThread( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtResumeThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 107
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtResumeThread ENDP
; ULONG __stdcall NtResumeProcess( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtResumeProcess PROC STDCALL arg_01:DWORD
mov eax , 108
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtResumeProcess ENDP
; ULONG __stdcall NtRestoreKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtRestoreKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 109
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRestoreKey ENDP
; ULONG __stdcall NtResetWriteWatch( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtResetWriteWatch PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 110
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtResetWriteWatch ENDP
; ULONG __stdcall NtResetEvent( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtResetEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 111
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtResetEvent ENDP
; ULONG __stdcall NtRequestWaitReplyPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtRequestWaitReplyPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 112
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRequestWaitReplyPort ENDP
; ULONG __stdcall NtRequestPort( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtRequestPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 113
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRequestPort ENDP
; ULONG __stdcall NtReplyWaitReplyPort( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtReplyWaitReplyPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 114
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReplyWaitReplyPort ENDP
; ULONG __stdcall NtReplyWaitReceivePortEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtReplyWaitReceivePortEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 115
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReplyWaitReceivePortEx ENDP
; ULONG __stdcall NtReplyWaitReceivePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtReplyWaitReceivePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 116
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReplyWaitReceivePort ENDP
; ULONG __stdcall NtReplyPort( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtReplyPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 117
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReplyPort ENDP
; ULONG __stdcall NtReplacePartitionUnit( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtReplacePartitionUnit PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 118
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReplacePartitionUnit ENDP
; ULONG __stdcall NtReplaceKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtReplaceKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 119
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReplaceKey ENDP
; ULONG __stdcall NtRenameTransactionManager( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtRenameTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 120
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRenameTransactionManager ENDP
; ULONG __stdcall NtRenameKey( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtRenameKey PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 121
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRenameKey ENDP
; ULONG __stdcall NtRemoveProcessDebug( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtRemoveProcessDebug PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 122
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRemoveProcessDebug ENDP
; ULONG __stdcall NtRemoveIoCompletionEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtRemoveIoCompletionEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 123
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRemoveIoCompletionEx ENDP
; ULONG __stdcall NtRemoveIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtRemoveIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 124
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRemoveIoCompletion ENDP
; ULONG __stdcall NtReleaseWorkerFactoryWorker( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtReleaseWorkerFactoryWorker PROC STDCALL arg_01:DWORD
mov eax , 125
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReleaseWorkerFactoryWorker ENDP
; ULONG __stdcall NtReleaseSemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtReleaseSemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 126
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReleaseSemaphore ENDP
; ULONG __stdcall NtReleaseMutant( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtReleaseMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 127
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReleaseMutant ENDP
; ULONG __stdcall NtReleaseKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtReleaseKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 128
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReleaseKeyedEvent ENDP
; ULONG __stdcall NtRegisterThreadTerminatePort( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtRegisterThreadTerminatePort PROC STDCALL arg_01:DWORD
mov eax , 129
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRegisterThreadTerminatePort ENDP
; ULONG __stdcall NtRegisterProtocolAddressInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtRegisterProtocolAddressInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 130
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRegisterProtocolAddressInformation ENDP
; ULONG __stdcall NtRecoverTransactionManager( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtRecoverTransactionManager PROC STDCALL arg_01:DWORD
mov eax , 131
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRecoverTransactionManager ENDP
; ULONG __stdcall NtRecoverResourceManager( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtRecoverResourceManager PROC STDCALL arg_01:DWORD
mov eax , 132
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRecoverResourceManager ENDP
; ULONG __stdcall NtRecoverEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtRecoverEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 133
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRecoverEnlistment ENDP
; ULONG __stdcall NtReadVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtReadVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 134
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReadVirtualMemory ENDP
; ULONG __stdcall NtReadRequestData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtReadRequestData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 135
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReadRequestData ENDP
; ULONG __stdcall NtReadOnlyEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtReadOnlyEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 136
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReadOnlyEnlistment 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_3_9600_sp0_windows_8_1_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 , 137
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReadFileScatter 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_3_9600_sp0_windows_8_1_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 , 138
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtReadFile ENDP
; ULONG __stdcall NtRaiseHardError( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtRaiseHardError PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 139
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRaiseHardError ENDP
; ULONG __stdcall NtRaiseException( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtRaiseException PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 140
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtRaiseException ENDP
; ULONG __stdcall NtQueueApcThreadEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtQueueApcThreadEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 141
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueueApcThreadEx ENDP
; ULONG __stdcall NtQueueApcThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueueApcThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 142
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueueApcThread ENDP
; ULONG __stdcall NtQueryWnfStateData( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtQueryWnfStateData PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 143
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryWnfStateData ENDP
; ULONG __stdcall NtQueryWnfStateNameInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryWnfStateNameInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 144
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryWnfStateNameInformation ENDP
; ULONG __stdcall NtQueryVolumeInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryVolumeInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 145
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryVolumeInformationFile ENDP
; ULONG __stdcall NtQueryVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtQueryVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 146
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryVirtualMemory ENDP
; ULONG __stdcall NtQueryValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtQueryValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 147
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryValueKey ENDP
; ULONG __stdcall NtQueryTimerResolution( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtQueryTimerResolution PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 148
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryTimerResolution ENDP
; ULONG __stdcall NtQueryTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 149
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryTimer ENDP
; ULONG __stdcall NtQuerySystemTime( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtQuerySystemTime PROC STDCALL arg_01:DWORD
mov eax , 150
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQuerySystemTime ENDP
; ULONG __stdcall NtQuerySystemInformationEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtQuerySystemInformationEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 151
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQuerySystemInformationEx ENDP
; ULONG __stdcall NtQuerySystemInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtQuerySystemInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 152
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQuerySystemInformation ENDP
; ULONG __stdcall NtQuerySystemEnvironmentValueEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQuerySystemEnvironmentValueEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 153
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQuerySystemEnvironmentValueEx ENDP
; ULONG __stdcall NtQuerySystemEnvironmentValue( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtQuerySystemEnvironmentValue PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 154
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQuerySystemEnvironmentValue ENDP
; ULONG __stdcall NtQuerySymbolicLinkObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtQuerySymbolicLinkObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 155
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQuerySymbolicLinkObject ENDP
; ULONG __stdcall NtQuerySemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQuerySemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 156
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQuerySemaphore ENDP
; ULONG __stdcall NtQuerySecurityObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQuerySecurityObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 157
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQuerySecurityObject ENDP
; ULONG __stdcall NtQuerySecurityAttributesToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtQuerySecurityAttributesToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 158
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQuerySecurityAttributesToken ENDP
; ULONG __stdcall NtQuerySection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQuerySection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 159
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQuerySection 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_3_9600_sp0_windows_8_1_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 , 160
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryQuotaInformationFile ENDP
; ULONG __stdcall NtQueryPortInformationProcess( );
_6_3_9600_sp0_windows_8_1_NtQueryPortInformationProcess PROC STDCALL
mov eax , 161
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryPortInformationProcess ENDP
; ULONG __stdcall NtQueryPerformanceCounter( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtQueryPerformanceCounter PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 162
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryPerformanceCounter ENDP
; ULONG __stdcall NtQueryOpenSubKeysEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtQueryOpenSubKeysEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 163
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryOpenSubKeysEx ENDP
; ULONG __stdcall NtQueryOpenSubKeys( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtQueryOpenSubKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 164
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryOpenSubKeys ENDP
; ULONG __stdcall NtQueryObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 165
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryObject ENDP
; ULONG __stdcall NtQueryMutant( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 166
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryMutant ENDP
; ULONG __stdcall NtQueryMultipleValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtQueryMultipleValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 167
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryMultipleValueKey ENDP
; ULONG __stdcall NtQueryLicenseValue( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryLicenseValue PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 168
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryLicenseValue ENDP
; ULONG __stdcall NtQueryKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 169
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryKey ENDP
; ULONG __stdcall NtQueryIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 170
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryIoCompletion ENDP
; ULONG __stdcall NtQueryIntervalProfile( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtQueryIntervalProfile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 171
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryIntervalProfile ENDP
; ULONG __stdcall NtQueryInstallUILanguage( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtQueryInstallUILanguage PROC STDCALL arg_01:DWORD
mov eax , 172
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInstallUILanguage ENDP
; ULONG __stdcall NtQueryInformationWorkerFactory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationWorkerFactory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 173
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationWorkerFactory ENDP
; ULONG __stdcall NtQueryInformationTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 174
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationTransactionManager ENDP
; ULONG __stdcall NtQueryInformationTransaction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 175
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationTransaction ENDP
; ULONG __stdcall NtQueryInformationToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 176
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationToken ENDP
; ULONG __stdcall NtQueryInformationThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 177
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationThread ENDP
; ULONG __stdcall NtQueryInformationResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 178
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationResourceManager ENDP
; ULONG __stdcall NtQueryInformationProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 179
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationProcess ENDP
; ULONG __stdcall NtQueryInformationPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 180
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationPort ENDP
; ULONG __stdcall NtQueryInformationJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 181
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationJobObject ENDP
; ULONG __stdcall NtQueryInformationFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 182
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationFile ENDP
; ULONG __stdcall NtQueryInformationEnlistment( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 183
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationEnlistment ENDP
; ULONG __stdcall NtQueryInformationAtom( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryInformationAtom PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 184
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryInformationAtom ENDP
; ULONG __stdcall NtQueryFullAttributesFile( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtQueryFullAttributesFile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 185
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryFullAttributesFile ENDP
; ULONG __stdcall NtQueryEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtQueryEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 186
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryEvent 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_3_9600_sp0_windows_8_1_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 , 187
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryEaFile ENDP
; ULONG __stdcall NtQueryDriverEntryOrder( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtQueryDriverEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 188
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryDriverEntryOrder 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_3_9600_sp0_windows_8_1_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 , 189
call _label_sysenter
ret 28
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryDirectoryObject 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_3_9600_sp0_windows_8_1_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 , 190
call _label_sysenter
ret 44
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryDirectoryFile ENDP
; ULONG __stdcall NtQueryDefaultUILanguage( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtQueryDefaultUILanguage PROC STDCALL arg_01:DWORD
mov eax , 191
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryDefaultUILanguage ENDP
; ULONG __stdcall NtQueryDefaultLocale( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtQueryDefaultLocale PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 192
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryDefaultLocale ENDP
; ULONG __stdcall NtQueryDebugFilterState( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtQueryDebugFilterState PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 193
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryDebugFilterState ENDP
; ULONG __stdcall NtQueryBootOptions( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtQueryBootOptions PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 194
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryBootOptions ENDP
; ULONG __stdcall NtQueryBootEntryOrder( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtQueryBootEntryOrder PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 195
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryBootEntryOrder ENDP
; ULONG __stdcall NtQueryAttributesFile( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtQueryAttributesFile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 196
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtQueryAttributesFile ENDP
; ULONG __stdcall NtPulseEvent( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtPulseEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 197
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPulseEvent ENDP
; ULONG __stdcall NtProtectVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtProtectVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 198
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtProtectVirtualMemory ENDP
; ULONG __stdcall NtPropagationFailed( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtPropagationFailed PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 199
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPropagationFailed ENDP
; ULONG __stdcall NtPropagationComplete( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtPropagationComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 200
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPropagationComplete ENDP
; ULONG __stdcall NtPrivilegeObjectAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtPrivilegeObjectAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 201
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPrivilegeObjectAuditAlarm ENDP
; ULONG __stdcall NtPrivilegedServiceAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtPrivilegedServiceAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 202
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPrivilegedServiceAuditAlarm ENDP
; ULONG __stdcall NtPrivilegeCheck( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtPrivilegeCheck PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 203
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPrivilegeCheck ENDP
; ULONG __stdcall NtSetInformationVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtSetInformationVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 204
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtSetInformationVirtualMemory ENDP
; ULONG __stdcall NtPrePrepareEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtPrePrepareEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 205
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPrePrepareEnlistment ENDP
; ULONG __stdcall NtPrePrepareComplete( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtPrePrepareComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 206
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPrePrepareComplete ENDP
; ULONG __stdcall NtPrepareEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtPrepareEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 207
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPrepareEnlistment ENDP
; ULONG __stdcall NtPrepareComplete( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtPrepareComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 208
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPrepareComplete ENDP
; ULONG __stdcall NtPowerInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtPowerInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 209
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPowerInformation ENDP
; ULONG __stdcall NtPlugPlayControl( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtPlugPlayControl PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 210
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtPlugPlayControl ENDP
; ULONG __stdcall NtOpenTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtOpenTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 211
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenTransactionManager ENDP
; ULONG __stdcall NtOpenTransaction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtOpenTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 212
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenTransaction ENDP
; ULONG __stdcall NtOpenTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 213
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenTimer ENDP
; ULONG __stdcall NtOpenThreadTokenEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtOpenThreadTokenEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 214
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenThreadTokenEx ENDP
; ULONG __stdcall NtOpenThreadToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtOpenThreadToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 215
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenThreadToken ENDP
; ULONG __stdcall NtOpenThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtOpenThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 216
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenThread ENDP
; ULONG __stdcall NtOpenSymbolicLinkObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenSymbolicLinkObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 217
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenSymbolicLinkObject ENDP
; ULONG __stdcall NtOpenSession( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenSession PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 218
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenSession ENDP
; ULONG __stdcall NtOpenSemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenSemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 219
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenSemaphore ENDP
; ULONG __stdcall NtOpenSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 220
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenSection ENDP
; ULONG __stdcall NtOpenResourceManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtOpenResourceManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 221
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenResourceManager ENDP
; ULONG __stdcall NtOpenProcessTokenEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtOpenProcessTokenEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 222
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenProcessTokenEx ENDP
; ULONG __stdcall NtOpenProcessToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenProcessToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 223
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenProcessToken ENDP
; ULONG __stdcall NtOpenProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtOpenProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 224
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenProcess ENDP
; ULONG __stdcall NtOpenPrivateNamespace( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtOpenPrivateNamespace PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 225
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_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_3_9600_sp0_windows_8_1_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 , 226
call _label_sysenter
ret 48
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenObjectAuditAlarm ENDP
; ULONG __stdcall NtOpenMutant( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 227
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenMutant ENDP
; ULONG __stdcall NtOpenKeyTransactedEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtOpenKeyTransactedEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 228
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenKeyTransactedEx ENDP
; ULONG __stdcall NtOpenKeyTransacted( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtOpenKeyTransacted PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 229
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenKeyTransacted ENDP
; ULONG __stdcall NtOpenKeyEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtOpenKeyEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 230
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenKeyEx ENDP
; ULONG __stdcall NtOpenKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 231
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenKeyedEvent ENDP
; ULONG __stdcall NtOpenKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 232
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenKey ENDP
; ULONG __stdcall NtOpenJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 233
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenJobObject ENDP
; ULONG __stdcall NtOpenIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 234
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenIoCompletion ENDP
; ULONG __stdcall NtOpenFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtOpenFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 235
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenFile ENDP
; ULONG __stdcall NtOpenEventPair( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenEventPair PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 236
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenEventPair ENDP
; ULONG __stdcall NtOpenEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 237
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenEvent ENDP
; ULONG __stdcall NtOpenEnlistment( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtOpenEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 238
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenEnlistment ENDP
; ULONG __stdcall NtOpenDirectoryObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtOpenDirectoryObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 239
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtOpenDirectoryObject ENDP
; ULONG __stdcall NtNotifyChangeSession( 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_3_9600_sp0_windows_8_1_NtNotifyChangeSession 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 , 240
call _label_sysenter
ret 32
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtNotifyChangeSession 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_3_9600_sp0_windows_8_1_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 , 241
call _label_sysenter
ret 48
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtNotifyChangeMultipleKeys 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_3_9600_sp0_windows_8_1_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 , 242
call _label_sysenter
ret 40
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtNotifyChangeKey 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_3_9600_sp0_windows_8_1_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 , 243
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtNotifyChangeDirectoryFile ENDP
; ULONG __stdcall NtModifyDriverEntry( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtModifyDriverEntry PROC STDCALL arg_01:DWORD
mov eax , 244
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtModifyDriverEntry ENDP
; ULONG __stdcall NtModifyBootEntry( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtModifyBootEntry PROC STDCALL arg_01:DWORD
mov eax , 245
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtModifyBootEntry 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_3_9600_sp0_windows_8_1_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 , 246
call _label_sysenter
ret 40
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtMapViewOfSection ENDP
; ULONG __stdcall NtMapUserPhysicalPagesScatter( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtMapUserPhysicalPagesScatter PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 247
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtMapUserPhysicalPagesScatter ENDP
; ULONG __stdcall NtMapUserPhysicalPages( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtMapUserPhysicalPages PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 248
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtMapUserPhysicalPages ENDP
; ULONG __stdcall NtMapCMFModule( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtMapCMFModule PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 249
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtMapCMFModule ENDP
; ULONG __stdcall NtMakeTemporaryObject( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtMakeTemporaryObject PROC STDCALL arg_01:DWORD
mov eax , 250
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtMakeTemporaryObject ENDP
; ULONG __stdcall NtMakePermanentObject( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtMakePermanentObject PROC STDCALL arg_01:DWORD
mov eax , 251
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtMakePermanentObject ENDP
; ULONG __stdcall NtLockVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtLockVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 252
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtLockVirtualMemory ENDP
; ULONG __stdcall NtLockRegistryKey( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtLockRegistryKey PROC STDCALL arg_01:DWORD
mov eax , 253
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtLockRegistryKey ENDP
; ULONG __stdcall NtLockProductActivationKeys( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtLockProductActivationKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 254
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtLockProductActivationKeys 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_3_9600_sp0_windows_8_1_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 , 255
call _label_sysenter
ret 40
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtLockFile 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_3_9600_sp0_windows_8_1_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 , 256
call _label_sysenter
ret 32
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtLoadKeyEx ENDP
; ULONG __stdcall NtLoadKey2( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtLoadKey2 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 257
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtLoadKey2 ENDP
; ULONG __stdcall NtLoadKey( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtLoadKey PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 258
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtLoadKey ENDP
; ULONG __stdcall NtLoadDriver( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtLoadDriver PROC STDCALL arg_01:DWORD
mov eax , 259
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtLoadDriver ENDP
; ULONG __stdcall NtListenPort( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtListenPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 260
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtListenPort ENDP
; ULONG __stdcall NtIsUILanguageComitted( );
_6_3_9600_sp0_windows_8_1_NtIsUILanguageComitted PROC STDCALL
mov eax , 261
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtIsUILanguageComitted ENDP
; ULONG __stdcall NtIsSystemResumeAutomatic( );
_6_3_9600_sp0_windows_8_1_NtIsSystemResumeAutomatic PROC STDCALL
mov eax , 262
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtIsSystemResumeAutomatic ENDP
; ULONG __stdcall NtIsProcessInJob( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtIsProcessInJob PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 263
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtIsProcessInJob ENDP
; ULONG __stdcall NtInitiatePowerAction( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtInitiatePowerAction PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 264
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtInitiatePowerAction ENDP
; ULONG __stdcall NtInitializeRegistry( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtInitializeRegistry PROC STDCALL arg_01:DWORD
mov eax , 265
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtInitializeRegistry ENDP
; ULONG __stdcall NtInitializeNlsFiles( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtInitializeNlsFiles PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 266
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtInitializeNlsFiles ENDP
; ULONG __stdcall NtImpersonateThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtImpersonateThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 267
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtImpersonateThread ENDP
; ULONG __stdcall NtImpersonateClientOfPort( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtImpersonateClientOfPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 268
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtImpersonateClientOfPort ENDP
; ULONG __stdcall NtImpersonateAnonymousToken( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtImpersonateAnonymousToken PROC STDCALL arg_01:DWORD
mov eax , 269
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtImpersonateAnonymousToken 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_3_9600_sp0_windows_8_1_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 , 270
call _label_sysenter
ret 28
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtGetWriteWatch 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_3_9600_sp0_windows_8_1_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 , 271
call _label_sysenter
ret 28
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtGetNotificationResourceManager ENDP
; ULONG __stdcall NtGetNlsSectionPtr( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtGetNlsSectionPtr PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 272
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtGetNlsSectionPtr ENDP
; ULONG __stdcall NtGetNextThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtGetNextThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 273
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtGetNextThread ENDP
; ULONG __stdcall NtGetNextProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtGetNextProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 274
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtGetNextProcess ENDP
; ULONG __stdcall NtGetMUIRegistryInfo( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtGetMUIRegistryInfo PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 275
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtGetMUIRegistryInfo ENDP
; ULONG __stdcall NtGetDevicePowerState( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtGetDevicePowerState PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 276
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtGetDevicePowerState ENDP
; ULONG __stdcall NtGetCurrentProcessorNumber( );
_6_3_9600_sp0_windows_8_1_NtGetCurrentProcessorNumber PROC STDCALL
mov eax , 277
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtGetCurrentProcessorNumber ENDP
; ULONG __stdcall NtGetContextThread( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtGetContextThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 278
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtGetContextThread ENDP
; ULONG __stdcall NtGetCompleteWnfStateSubscription( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtGetCompleteWnfStateSubscription PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 279
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtGetCompleteWnfStateSubscription ENDP
; ULONG __stdcall NtGetCachedSigningLevel( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtGetCachedSigningLevel PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 280
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtGetCachedSigningLevel 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_3_9600_sp0_windows_8_1_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 , 281
call _label_sysenter
ret 40
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFsControlFile ENDP
; ULONG __stdcall NtFreezeTransactions( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtFreezeTransactions PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 282
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFreezeTransactions ENDP
; ULONG __stdcall NtFreezeRegistry( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtFreezeRegistry PROC STDCALL arg_01:DWORD
mov eax , 283
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFreezeRegistry ENDP
; ULONG __stdcall NtFreeVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtFreeVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 284
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFreeVirtualMemory ENDP
; ULONG __stdcall NtFreeUserPhysicalPages( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtFreeUserPhysicalPages PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 285
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFreeUserPhysicalPages ENDP
; ULONG __stdcall NtFlushWriteBuffer( );
_6_3_9600_sp0_windows_8_1_NtFlushWriteBuffer PROC STDCALL
mov eax , 286
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFlushWriteBuffer ENDP
; ULONG __stdcall NtFlushVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtFlushVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 287
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFlushVirtualMemory ENDP
; ULONG __stdcall NtFlushProcessWriteBuffers( );
_6_3_9600_sp0_windows_8_1_NtFlushProcessWriteBuffers PROC STDCALL
mov eax , 288
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFlushProcessWriteBuffers ENDP
; ULONG __stdcall NtFlushKey( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtFlushKey PROC STDCALL arg_01:DWORD
mov eax , 289
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFlushKey ENDP
; ULONG __stdcall NtFlushInstructionCache( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtFlushInstructionCache PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 290
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFlushInstructionCache ENDP
; ULONG __stdcall NtFlushInstallUILanguage( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtFlushInstallUILanguage PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 291
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFlushInstallUILanguage ENDP
; ULONG __stdcall NtFlushBuffersFile( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtFlushBuffersFile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 292
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFlushBuffersFile ENDP
; ULONG __stdcall NtFlushBuffersFileEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtFlushBuffersFileEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 293
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFlushBuffersFileEx ENDP
; ULONG __stdcall NtFindAtom( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtFindAtom PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 294
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFindAtom ENDP
; ULONG __stdcall NtFilterToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtFilterToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 295
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFilterToken ENDP
; ULONG __stdcall NtFilterTokenEx( 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_3_9600_sp0_windows_8_1_NtFilterTokenEx 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 , 296
call _label_sysenter
ret 56
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFilterTokenEx ENDP
; ULONG __stdcall NtFilterBootOption( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtFilterBootOption PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 297
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtFilterBootOption ENDP
; ULONG __stdcall NtExtendSection( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtExtendSection PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 298
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtExtendSection ENDP
; ULONG __stdcall NtEnumerateValueKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtEnumerateValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 299
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtEnumerateValueKey ENDP
; ULONG __stdcall NtEnumerateTransactionObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtEnumerateTransactionObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 300
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtEnumerateTransactionObject ENDP
; ULONG __stdcall NtEnumerateSystemEnvironmentValuesEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtEnumerateSystemEnvironmentValuesEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 301
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtEnumerateSystemEnvironmentValuesEx ENDP
; ULONG __stdcall NtEnumerateKey( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtEnumerateKey PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 302
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtEnumerateKey ENDP
; ULONG __stdcall NtEnumerateDriverEntries( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtEnumerateDriverEntries PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 303
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtEnumerateDriverEntries ENDP
; ULONG __stdcall NtEnumerateBootEntries( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtEnumerateBootEntries PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 304
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtEnumerateBootEntries ENDP
; ULONG __stdcall NtEnableLastKnownGood( );
_6_3_9600_sp0_windows_8_1_NtEnableLastKnownGood PROC STDCALL
mov eax , 305
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtEnableLastKnownGood ENDP
; ULONG __stdcall NtDuplicateToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtDuplicateToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 306
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDuplicateToken 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_3_9600_sp0_windows_8_1_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 , 307
call _label_sysenter
ret 28
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDuplicateObject ENDP
; ULONG __stdcall NtDrawText( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtDrawText PROC STDCALL arg_01:DWORD
mov eax , 308
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDrawText ENDP
; ULONG __stdcall NtDisplayString( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtDisplayString PROC STDCALL arg_01:DWORD
mov eax , 309
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDisplayString ENDP
; ULONG __stdcall NtDisableLastKnownGood( );
_6_3_9600_sp0_windows_8_1_NtDisableLastKnownGood PROC STDCALL
mov eax , 310
call _label_sysenter
ret
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDisableLastKnownGood 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_3_9600_sp0_windows_8_1_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 , 311
call _label_sysenter
ret 40
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDeviceIoControlFile ENDP
; ULONG __stdcall NtDeleteWnfStateName( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtDeleteWnfStateName PROC STDCALL arg_01:DWORD
mov eax , 312
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDeleteWnfStateName ENDP
; ULONG __stdcall NtDeleteWnfStateData( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtDeleteWnfStateData PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 313
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDeleteWnfStateData ENDP
; ULONG __stdcall NtDeleteValueKey( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtDeleteValueKey PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 314
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDeleteValueKey ENDP
; ULONG __stdcall NtDeletePrivateNamespace( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtDeletePrivateNamespace PROC STDCALL arg_01:DWORD
mov eax , 315
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDeletePrivateNamespace ENDP
; ULONG __stdcall NtDeleteObjectAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtDeleteObjectAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 316
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDeleteObjectAuditAlarm ENDP
; ULONG __stdcall NtDeleteKey( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtDeleteKey PROC STDCALL arg_01:DWORD
mov eax , 317
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDeleteKey ENDP
; ULONG __stdcall NtDeleteFile( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtDeleteFile PROC STDCALL arg_01:DWORD
mov eax , 318
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDeleteFile ENDP
; ULONG __stdcall NtDeleteDriverEntry( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtDeleteDriverEntry PROC STDCALL arg_01:DWORD
mov eax , 319
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDeleteDriverEntry ENDP
; ULONG __stdcall NtDeleteBootEntry( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtDeleteBootEntry PROC STDCALL arg_01:DWORD
mov eax , 320
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDeleteBootEntry ENDP
; ULONG __stdcall NtDeleteAtom( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtDeleteAtom PROC STDCALL arg_01:DWORD
mov eax , 321
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDeleteAtom ENDP
; ULONG __stdcall NtDelayExecution( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtDelayExecution PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 322
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDelayExecution ENDP
; ULONG __stdcall NtDebugContinue( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtDebugContinue PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 323
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDebugContinue ENDP
; ULONG __stdcall NtDebugActiveProcess( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtDebugActiveProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 324
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtDebugActiveProcess 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_3_9600_sp0_windows_8_1_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 , 325
call _label_sysenter
ret 40
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateWorkerFactory ENDP
; ULONG __stdcall NtCreateWnfStateName( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 , ULONG arg_07 );
_6_3_9600_sp0_windows_8_1_NtCreateWnfStateName 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 , 326
call _label_sysenter
ret 28
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateWnfStateName ENDP
; ULONG __stdcall NtCreateWaitCompletionPacket( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtCreateWaitCompletionPacket PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 327
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateWaitCompletionPacket ENDP
; ULONG __stdcall NtCreateWaitablePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtCreateWaitablePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 328
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateWaitablePort 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_3_9600_sp0_windows_8_1_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 , 329
call _label_sysenter
ret 44
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateUserProcess ENDP
; ULONG __stdcall NtCreateTransactionManager( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtCreateTransactionManager PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 330
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateTransactionManager 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_3_9600_sp0_windows_8_1_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 , 331
call _label_sysenter
ret 40
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateTransaction 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_3_9600_sp0_windows_8_1_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 , 332
call _label_sysenter
ret 52
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateToken ENDP
; ULONG __stdcall NtCreateLowBoxToken( 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_3_9600_sp0_windows_8_1_NtCreateLowBoxToken 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 , 333
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateLowBoxToken ENDP
; ULONG __stdcall NtCreateTokenEx( 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_3_9600_sp0_windows_8_1_NtCreateTokenEx 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 , 334
call _label_sysenter
ret 68
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateTokenEx ENDP
; ULONG __stdcall NtCreateTimer( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtCreateTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 335
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateTimer 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_3_9600_sp0_windows_8_1_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 , 336
call _label_sysenter
ret 44
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateThreadEx 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_3_9600_sp0_windows_8_1_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 , 337
call _label_sysenter
ret 32
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateThread ENDP
; ULONG __stdcall NtCreateSymbolicLinkObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtCreateSymbolicLinkObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 338
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateSymbolicLinkObject ENDP
; ULONG __stdcall NtCreateSemaphore( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtCreateSemaphore PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 339
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateSemaphore 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_3_9600_sp0_windows_8_1_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 , 340
call _label_sysenter
ret 28
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateSection 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_3_9600_sp0_windows_8_1_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 , 341
call _label_sysenter
ret 28
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateResourceManager ENDP
; ULONG __stdcall NtCreateProfileEx( 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_3_9600_sp0_windows_8_1_NtCreateProfileEx 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 , 342
call _label_sysenter
ret 40
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateProfileEx 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_3_9600_sp0_windows_8_1_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 , 343
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateProfile 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_3_9600_sp0_windows_8_1_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 , 344
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateProcessEx 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_3_9600_sp0_windows_8_1_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 , 345
call _label_sysenter
ret 32
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateProcess ENDP
; ULONG __stdcall NtCreatePrivateNamespace( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtCreatePrivateNamespace PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 346
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreatePrivateNamespace ENDP
; ULONG __stdcall NtCreatePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtCreatePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 347
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreatePort ENDP
; ULONG __stdcall NtCreatePagingFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtCreatePagingFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 348
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreatePagingFile 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_3_9600_sp0_windows_8_1_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 , 349
call _label_sysenter
ret 56
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateNamedPipeFile ENDP
; ULONG __stdcall NtCreateMutant( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtCreateMutant PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 350
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateMutant 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_3_9600_sp0_windows_8_1_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 , 351
call _label_sysenter
ret 32
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateMailslotFile 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_3_9600_sp0_windows_8_1_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 , 352
call _label_sysenter
ret 32
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateKeyTransacted ENDP
; ULONG __stdcall NtCreateKeyedEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtCreateKeyedEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 353
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateKeyedEvent 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_3_9600_sp0_windows_8_1_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 , 354
call _label_sysenter
ret 28
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateKey ENDP
; ULONG __stdcall NtCreateJobSet( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtCreateJobSet PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 355
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateJobSet ENDP
; ULONG __stdcall NtCreateJobObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtCreateJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 356
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateJobObject ENDP
; ULONG __stdcall NtCreateIRTimer( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtCreateIRTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 357
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateIRTimer ENDP
; ULONG __stdcall NtCreateTimer2( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtCreateTimer2 PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 358
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateTimer2 ENDP
; ULONG __stdcall NtCreateIoCompletion( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtCreateIoCompletion PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 359
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateIoCompletion 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_3_9600_sp0_windows_8_1_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 , 360
call _label_sysenter
ret 44
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateFile ENDP
; ULONG __stdcall NtCreateEventPair( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtCreateEventPair PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 361
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateEventPair ENDP
; ULONG __stdcall NtCreateEvent( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtCreateEvent PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 362
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateEvent 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_3_9600_sp0_windows_8_1_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 , 363
call _label_sysenter
ret 32
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateEnlistment ENDP
; ULONG __stdcall NtCreateDirectoryObjectEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtCreateDirectoryObjectEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 364
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateDirectoryObjectEx ENDP
; ULONG __stdcall NtCreateDirectoryObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtCreateDirectoryObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 365
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateDirectoryObject ENDP
; ULONG __stdcall NtCreateDebugObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtCreateDebugObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 366
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCreateDebugObject ENDP
; ULONG __stdcall NtContinue( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtContinue PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 367
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtContinue 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_3_9600_sp0_windows_8_1_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 , 368
call _label_sysenter
ret 32
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtConnectPort ENDP
; ULONG __stdcall NtCompressKey( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtCompressKey PROC STDCALL arg_01:DWORD
mov eax , 369
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCompressKey ENDP
; ULONG __stdcall NtCompleteConnectPort( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtCompleteConnectPort PROC STDCALL arg_01:DWORD
mov eax , 370
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCompleteConnectPort ENDP
; ULONG __stdcall NtCompareTokens( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtCompareTokens PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 371
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCompareTokens ENDP
; ULONG __stdcall NtCompactKeys( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtCompactKeys PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 372
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCompactKeys ENDP
; ULONG __stdcall NtCommitTransaction( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtCommitTransaction PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 373
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCommitTransaction ENDP
; ULONG __stdcall NtCommitEnlistment( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtCommitEnlistment PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 374
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCommitEnlistment ENDP
; ULONG __stdcall NtCommitComplete( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtCommitComplete PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 375
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCommitComplete ENDP
; ULONG __stdcall NtCloseObjectAuditAlarm( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtCloseObjectAuditAlarm PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 376
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCloseObjectAuditAlarm ENDP
; ULONG __stdcall NtClose( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtClose PROC STDCALL arg_01:DWORD
mov eax , 377
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtClose ENDP
; ULONG __stdcall NtClearEvent( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtClearEvent PROC STDCALL arg_01:DWORD
mov eax , 378
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtClearEvent ENDP
; ULONG __stdcall NtCancelWaitCompletionPacket( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtCancelWaitCompletionPacket PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 379
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCancelWaitCompletionPacket ENDP
; ULONG __stdcall NtCancelTimer( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtCancelTimer PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 380
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCancelTimer ENDP
; ULONG __stdcall NtCancelSynchronousIoFile( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtCancelSynchronousIoFile PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 381
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCancelSynchronousIoFile ENDP
; ULONG __stdcall NtCancelIoFileEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtCancelIoFileEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 382
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCancelIoFileEx ENDP
; ULONG __stdcall NtCancelIoFile( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtCancelIoFile PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 383
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCancelIoFile ENDP
; ULONG __stdcall NtCallbackReturn( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtCallbackReturn PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 384
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtCallbackReturn ENDP
; ULONG __stdcall NtAssociateWaitCompletionPacket( 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_3_9600_sp0_windows_8_1_NtAssociateWaitCompletionPacket 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 , 385
call _label_sysenter
ret 32
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAssociateWaitCompletionPacket ENDP
; ULONG __stdcall NtAssignProcessToJobObject( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtAssignProcessToJobObject PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 386
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAssignProcessToJobObject ENDP
; ULONG __stdcall NtAreMappedFilesTheSame( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtAreMappedFilesTheSame PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 387
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAreMappedFilesTheSame ENDP
; ULONG __stdcall NtApphelpCacheControl( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtApphelpCacheControl PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 388
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtApphelpCacheControl ENDP
; ULONG __stdcall NtAlpcSetInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtAlpcSetInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 389
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcSetInformation 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_3_9600_sp0_windows_8_1_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 , 390
call _label_sysenter
ret 32
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcSendWaitReceivePort ENDP
; ULONG __stdcall NtAlpcRevokeSecurityContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAlpcRevokeSecurityContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 391
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcRevokeSecurityContext ENDP
; ULONG __stdcall NtAlpcQueryInformationMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtAlpcQueryInformationMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 392
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcQueryInformationMessage ENDP
; ULONG __stdcall NtAlpcQueryInformation( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 );
_6_3_9600_sp0_windows_8_1_NtAlpcQueryInformation PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD
mov eax , 393
call _label_sysenter
ret 20
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcQueryInformation ENDP
; ULONG __stdcall NtAlpcOpenSenderThread( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtAlpcOpenSenderThread PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 394
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcOpenSenderThread ENDP
; ULONG __stdcall NtAlpcOpenSenderProcess( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtAlpcOpenSenderProcess PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 395
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcOpenSenderProcess ENDP
; ULONG __stdcall NtAlpcImpersonateClientOfPort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAlpcImpersonateClientOfPort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 396
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcImpersonateClientOfPort ENDP
; ULONG __stdcall NtAlpcDisconnectPort( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtAlpcDisconnectPort PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 397
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcDisconnectPort ENDP
; ULONG __stdcall NtAlpcDeleteSecurityContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAlpcDeleteSecurityContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 398
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcDeleteSecurityContext ENDP
; ULONG __stdcall NtAlpcDeleteSectionView( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAlpcDeleteSectionView PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 399
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcDeleteSectionView ENDP
; ULONG __stdcall NtAlpcDeleteResourceReserve( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAlpcDeleteResourceReserve PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 400
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcDeleteResourceReserve ENDP
; ULONG __stdcall NtAlpcDeletePortSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAlpcDeletePortSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 401
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcDeletePortSection ENDP
; ULONG __stdcall NtAlpcCreateSecurityContext( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAlpcCreateSecurityContext PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 402
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcCreateSecurityContext ENDP
; ULONG __stdcall NtAlpcCreateSectionView( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAlpcCreateSectionView PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 403
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcCreateSectionView ENDP
; ULONG __stdcall NtAlpcCreateResourceReserve( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtAlpcCreateResourceReserve PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 404
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcCreateResourceReserve ENDP
; ULONG __stdcall NtAlpcCreatePortSection( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtAlpcCreatePortSection PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 405
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcCreatePortSection ENDP
; ULONG __stdcall NtAlpcCreatePort( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAlpcCreatePort PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 406
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcCreatePort 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_3_9600_sp0_windows_8_1_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 , 407
call _label_sysenter
ret 44
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcConnectPort ENDP
; ULONG __stdcall NtAlpcConnectPortEx( 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_3_9600_sp0_windows_8_1_NtAlpcConnectPortEx 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 , 408
call _label_sysenter
ret 44
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcConnectPortEx ENDP
; ULONG __stdcall NtAlpcCancelMessage( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAlpcCancelMessage PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 409
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcCancelMessage 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_3_9600_sp0_windows_8_1_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 , 410
call _label_sysenter
ret 36
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlpcAcceptConnectPort ENDP
; ULONG __stdcall NtAllocateVirtualMemory( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtAllocateVirtualMemory PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 411
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAllocateVirtualMemory ENDP
; ULONG __stdcall NtAllocateUuids( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtAllocateUuids PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 412
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAllocateUuids ENDP
; ULONG __stdcall NtAllocateUserPhysicalPages( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAllocateUserPhysicalPages PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 413
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAllocateUserPhysicalPages ENDP
; ULONG __stdcall NtAllocateReserveObject( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAllocateReserveObject PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 414
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAllocateReserveObject ENDP
; ULONG __stdcall NtAllocateLocallyUniqueId( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtAllocateLocallyUniqueId PROC STDCALL arg_01:DWORD
mov eax , 415
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAllocateLocallyUniqueId ENDP
; ULONG __stdcall NtAlertThreadByThreadId( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtAlertThreadByThreadId PROC STDCALL arg_01:DWORD
mov eax , 416
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlertThreadByThreadId ENDP
; ULONG __stdcall NtAlertThread( ULONG arg_01 );
_6_3_9600_sp0_windows_8_1_NtAlertThread PROC STDCALL arg_01:DWORD
mov eax , 417
call _label_sysenter
ret 4
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlertThread ENDP
; ULONG __stdcall NtAlertResumeThread( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtAlertResumeThread PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 418
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAlertResumeThread ENDP
; ULONG __stdcall NtAdjustPrivilegesToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtAdjustPrivilegesToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 419
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAdjustPrivilegesToken ENDP
; ULONG __stdcall NtAdjustGroupsToken( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 , ULONG arg_05 , ULONG arg_06 );
_6_3_9600_sp0_windows_8_1_NtAdjustGroupsToken PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD , arg_05:DWORD , arg_06:DWORD
mov eax , 420
call _label_sysenter
ret 24
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAdjustGroupsToken ENDP
; ULONG __stdcall NtAdjustTokenClaimsAndDeviceGroups( 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_3_9600_sp0_windows_8_1_NtAdjustTokenClaimsAndDeviceGroups 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 , 421
call _label_sysenter
ret 64
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAdjustTokenClaimsAndDeviceGroups ENDP
; ULONG __stdcall NtAddDriverEntry( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtAddDriverEntry PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 422
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAddDriverEntry ENDP
; ULONG __stdcall NtAddBootEntry( ULONG arg_01 , ULONG arg_02 );
_6_3_9600_sp0_windows_8_1_NtAddBootEntry PROC STDCALL arg_01:DWORD , arg_02:DWORD
mov eax , 423
call _label_sysenter
ret 8
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAddBootEntry ENDP
; ULONG __stdcall NtAddAtom( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 );
_6_3_9600_sp0_windows_8_1_NtAddAtom PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD
mov eax , 424
call _label_sysenter
ret 12
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAddAtom ENDP
; ULONG __stdcall NtAddAtomEx( ULONG arg_01 , ULONG arg_02 , ULONG arg_03 , ULONG arg_04 );
_6_3_9600_sp0_windows_8_1_NtAddAtomEx PROC STDCALL arg_01:DWORD , arg_02:DWORD , arg_03:DWORD , arg_04:DWORD
mov eax , 425
call _label_sysenter
ret 16
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAddAtomEx 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_3_9600_sp0_windows_8_1_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 , 426
call _label_sysenter
ret 68
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeResultListAndAuditAlarmByHandle 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_3_9600_sp0_windows_8_1_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 , 427
call _label_sysenter
ret 64
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeResultListAndAuditAlarm 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_3_9600_sp0_windows_8_1_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 , 428
call _label_sysenter
ret 44
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeResultList 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_3_9600_sp0_windows_8_1_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 , 429
call _label_sysenter
ret 64
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAccessCheckByTypeAndAuditAlarm 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_3_9600_sp0_windows_8_1_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 , 430
call _label_sysenter
ret 44
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAccessCheckByType 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_3_9600_sp0_windows_8_1_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 , 431
call _label_sysenter
ret 44
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAccessCheckAndAuditAlarm 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_3_9600_sp0_windows_8_1_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 , 432
call _label_sysenter
ret 32
_label_sysenter:
mov edx , esp
;sysenter
db 0Fh , 34h
ret
_6_3_9600_sp0_windows_8_1_NtAccessCheck ENDP
| 22.584553 | 342 | 0.792799 |
5135b80067e4c50c446e3695703b70ac55260748 | 92 | asm | Assembly | bdshemu_test/basic/test_64_basic05.asm | andreaswimmer/bddisasm | 960e9eaeee4f87d8269095031cd6cfb8aabb998b | [
"Apache-2.0"
] | 1 | 2020-11-18T21:57:38.000Z | 2020-11-18T21:57:38.000Z | bdshemu_test/basic/test_64_basic05.asm | andreaswimmer/bddisasm | 960e9eaeee4f87d8269095031cd6cfb8aabb998b | [
"Apache-2.0"
] | null | null | null | bdshemu_test/basic/test_64_basic05.asm | andreaswimmer/bddisasm | 960e9eaeee4f87d8269095031cd6cfb8aabb998b | [
"Apache-2.0"
] | 1 | 2020-08-20T15:22:02.000Z | 2020-08-20T15:22:02.000Z |
bits 64
_xxx:
lea rbp, [rel _xxx]
sub rbp, 1
jmp rbp
| 11.5 | 27 | 0.391304 |
948365085c23d6e42ccfaa444e2a8ff69c14ad31 | 307 | asm | Assembly | libsrc/_DEVELOPMENT/adt/wv_priority_queue/c/sccz80/wv_priority_queue_reserve_callee.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | 8 | 2017-01-18T12:02:17.000Z | 2021-06-12T09:40:28.000Z | libsrc/_DEVELOPMENT/adt/wv_priority_queue/c/sccz80/wv_priority_queue_reserve_callee.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | 1 | 2017-03-06T07:41:56.000Z | 2017-03-06T07:41:56.000Z | libsrc/_DEVELOPMENT/adt/wv_priority_queue/c/sccz80/wv_priority_queue_reserve_callee.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | 3 | 2017-03-07T03:19:40.000Z | 2021-09-15T17:59:19.000Z |
; int wv_priority_queue_reserve(wv_priority_queue_t *q, size_t n)
SECTION code_clib
SECTION code_adt_wv_priority_queue
PUBLIC wv_priority_queue_reserve_callee
EXTERN asm_wv_priority_queue_reserve
wv_priority_queue_reserve_callee:
pop hl
pop bc
ex (sp),hl
jp asm_wv_priority_queue_reserve
| 17.055556 | 65 | 0.833876 |
76aec6ae86d27588d872dd24b5a7477dc027285a | 4,830 | asm | Assembly | Examples/ch14/Cluster.asm | satadriver/LiunuxOS | 693174ac2b3e503d72782fc7a14f18c8a4f2756c | [
"Apache-2.0"
] | null | null | null | Examples/ch14/Cluster.asm | satadriver/LiunuxOS | 693174ac2b3e503d72782fc7a14f18c8a4f2756c | [
"Apache-2.0"
] | null | null | null | Examples/ch14/Cluster.asm | satadriver/LiunuxOS | 693174ac2b3e503d72782fc7a14f18c8a4f2756c | [
"Apache-2.0"
] | null | null | null | TITLE Cluster Display Program (Cluster.asm)
; This program reads the directory of drive A, decodes
; the file allocation table, and displays the list of
; clusters allocated to each file.
; Last update: 9/21/01
INCLUDE Irvine16.inc
; Attributes specific to 1.44MB diskettes:
FATSectors = 9 ; num sectors, first copy of FAT
DIRSectors = 14 ; num sectors, root directory
DIR_START = 19 ; starting directory sector num
SECTOR_SIZE = 512
DRIVE_A = 0
FAT_START = 1 ; starting sector of FAT
EOLN equ <0dh,0ah>
Directory STRUCT
fileName BYTE 8 dup(?)
extension BYTE 3 dup(?)
attribute BYTE ?
reserved BYTE 10 dup(?)
time WORD ?
date WORD ?
startingCluster WORD ?
fileSize DWORD ?
Directory ENDS
ENTRIES_PER_SECTOR = SECTOR_SIZE / (size Directory)
.data
heading LABEL byte
BYTE 'Cluster Display Program (CLUSTER.EXE)'
BYTE EOLN,EOLN,'The following clusters are allocated '
BYTE 'to each file:',EOLN,EOLN,0
fattable WORD ((FATSectors * SECTOR_SIZE) / 2) DUP(?)
dirbuf Directory (DIRSectors * ENTRIES_PER_SECTOR) DUP(<>)
driveNumber BYTE ?
.code
main PROC
call Initialize
mov ax,OFFSET dirbuf
mov ax,OFFSET driveNumber
call LoadFATandDir
jc A3 ; quit if we failed
mov si,OFFSET dirbuf ; index into the directory
A1: cmp (Directory PTR [si]).filename,0 ; entry never used?
je A3 ; yes: must be the end
cmp (Directory PTR [si]).filename,0E5h ; entry deleted?
je A2 ; yes: skip to next entry
cmp (Directory PTR [si]).filename,2Eh ; parent directory?
je A2 ; yes: skip to next entry
cmp (Directory PTR [si]).attribute,0Fh ; extended filename?
je A2
test (Directory PTR [si]).attribute,18h ; vol or directory name?
jnz A2 ; yes: skip to next entry
call displayClusters ; must be a valid entry
A2: add si,32 ; point to next entry
jmp A1
A3: .exit
main ENDP
;----------------------------------------------------------
LoadFATandDir PROC
; Load FAT and root directory sectors.
; Receives: nothing
; Returns: nothing
;----------------------------------------------------------
pusha
; Load the FAT
mov al,DRIVE_A
mov cx,FATsectors
mov dx,FAT_START
mov bx,OFFSET fattable
int 25h ; read sectors
add sp,2 ; pop old flags off stack
; Load the Directory
mov cx,DIRsectors
mov dx,DIR_START
mov bx,OFFSET dirbuf
int 25h
add sp,2
popa
ret
LoadFATandDir ENDP
;----------------------------------------------------------
DisplayClusters PROC
; Display all clusters allocated to a single file.
; Receives: SI contains the offset of the directory entry.
;----------------------------------------------------------
push ax
call displayFilename ; display the filename
mov ax,[si+1Ah] ; get first cluster
C1: cmp ax,0FFFh ; last cluster?
je C2 ; yes: quit
mov bx,10 ; choose decimal radix
call WriteDec ; display the number
call writeSpace ; display a space
call next_FAT_entry ; returns cluster # in AX
jmp C1 ; find next cluster
C2: call Crlf
pop ax
ret
DisplayClusters ENDP
;----------------------------------------------------------
WriteSpace PROC
; Write a single space to standard output.
;----------------------------------------------------------
push ax
mov ah,2 ; function: display character
mov dl,20h ; 20h = space
int 21h
pop ax
ret
WriteSpace ENDP
;----------------------------------------------------------
Next_FAT_entry PROC
; Find the next cluster in the FAT.
; Receives: AX = current cluster number
; Returns: AX = new cluster number
;----------------------------------------------------------
push bx ; save regs
push cx
mov bx,ax ; copy the number
shr bx,1 ; divide by 2
add bx,ax ; new cluster OFFSET
mov dx,fattable[bx] ; DX = new cluster value
shr ax,1 ; old cluster even?
jc E1 ; no: keep high 12 bits
and dx,0FFFh ; yes: keep low 12 bits
jmp E2
E1: shr dx,4 ; shift 4 bits to the right
E2: mov ax,dx ; return new cluster number
pop cx ; restore regs
pop bx
ret
Next_FAT_entry ENDP
;----------------------------------------------------------
DisplayFilename PROC
; Display the file name.
;----------------------------------------------------------
mov byte ptr [si+11],0 ; SI points to filename
mov dx,si
call Writestring
mov ah,2 ; display a space
mov dl,20h
int 21h
ret
DisplayFilename ENDP
;----------------------------------------------------------
Initialize PROC
; Set upt DS, clear screen, display a heading.
;----------------------------------------------------------
mov ax,@data
mov ds,ax
call ClrScr
mov dx,OFFSET heading ; display program heading
call Writestring
ret
Initialize ENDP
END main | 28.081395 | 66 | 0.578054 |
29aad3043606e5c57e8c24667be9cdd10bcfc61d | 1,603 | asm | Assembly | programs/oeis/179/A179060.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/179/A179060.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/179/A179060.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A179060: Number of non-attacking placements of 5 rooks on an n X n board.
; 0,0,0,0,120,4320,52920,376320,1905120,7620480,25613280,75271680,198764280,480960480,1082161080,2289530880,4594961280,8809274880,16225246080,28844881920,49689816120,83217546720,135870624120,216790801920,338735628000,519241008000,782079948000,1159075008000,1692330003000,2436955204320,3464369750520,4866275205120,6759405227520,9291168184320,12646312250880,17054756167680,22800743353080,30233492563680,39779534765880,51956943367680,67391683488480,86836325546880,111191389152480,141529605127680,179123406489720,225475983421920,282356262686520,351838198609920,436344790734720,538697272512000,662169946032000,810551169792000,988211039907000,1200176340012000,1452213371414520,1750919312862720,2103822798628320,2519494444494720,3007668093719520,3579373599137280,4247082003313080,5024864026080480,5928562817929080,6975981988577280,8187089972705280,9584241849262080,11192419787028480,13039493347246080,15156500934140280,17577953746103520,20342163644193720,23491596420472320,27073252016586720,31139073312923520,35746385180652000,40958365563072000,46844550428907000,53481374518572000,60952749885027000,69350684313630720,78775941790465920,89338747275947520,101159538130177920,114369764628510720,129112742100154680,145544557319424480,163835031878453880,184168745371860480,206746121328019680,231784578928298880,259519753664851680,290206790199406080,324121710799930680,361562862849158880,402852449038723320,448338143985131520,498394801129029120,553426253907179520,613867215317368320,680185280130048000
add $0,1
bin $0,5
pow $0,2
mul $0,120
| 200.375 | 1,487 | 0.913911 |
aff12d383106210a4ddf4a16e44921233b527f19 | 1,782 | asm | Assembly | game/data/charsets/qr_code.asm | sgadrat/super-tilt-bro | f918731c63a32dc3d0c80f10e7b053d6fa218c50 | [
"WTFPL"
] | 91 | 2017-08-06T18:30:13.000Z | 2022-02-17T00:26:45.000Z | game/data/charsets/qr_code.asm | sgadrat/super-tilt-bro | f918731c63a32dc3d0c80f10e7b053d6fa218c50 | [
"WTFPL"
] | 2 | 2018-10-12T04:34:13.000Z | 2021-12-25T17:01:18.000Z | game/data/charsets/qr_code.asm | sgadrat/super-tilt-bro | f918731c63a32dc3d0c80f10e7b053d6fa218c50 | [
"WTFPL"
] | 9 | 2016-10-08T21:24:37.000Z | 2022-02-05T00:13:31.000Z | CHARSET_QR_CODE_BANK_NUMBER = CURRENT_BANK_NUMBER
;
; This is actually tiles of 4x4 pixels. Main use is drawing QR codes, but could find other uses.
;
charset_qr_code:
; Tileset's size in tiles (zero means 256)
.byt (charset_qr_code_end-charset_qr_code_tiles)/8
charset_qr_code_tiles:
.byt %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.byt %00000000, %00000000, %00000000, %00000000, %00001111, %00001111, %00001111, %00001111
.byt %00000000, %00000000, %00000000, %00000000, %11110000, %11110000, %11110000, %11110000
.byt %00000000, %00000000, %00000000, %00000000, %11111111, %11111111, %11111111, %11111111
.byt %00001111, %00001111, %00001111, %00001111, %00000000, %00000000, %00000000, %00000000
.byt %00001111, %00001111, %00001111, %00001111, %00001111, %00001111, %00001111, %00001111
.byt %00001111, %00001111, %00001111, %00001111, %11110000, %11110000, %11110000, %11110000
.byt %00001111, %00001111, %00001111, %00001111, %11111111, %11111111, %11111111, %11111111
.byt %11110000, %11110000, %11110000, %11110000, %00000000, %00000000, %00000000, %00000000
.byt %11110000, %11110000, %11110000, %11110000, %00001111, %00001111, %00001111, %00001111
.byt %11110000, %11110000, %11110000, %11110000, %11110000, %11110000, %11110000, %11110000
.byt %11110000, %11110000, %11110000, %11110000, %11111111, %11111111, %11111111, %11111111
.byt %11111111, %11111111, %11111111, %11111111, %00000000, %00000000, %00000000, %00000000
.byt %11111111, %11111111, %11111111, %11111111, %00001111, %00001111, %00001111, %00001111
.byt %11111111, %11111111, %11111111, %11111111, %11110000, %11110000, %11110000, %11110000
.byt %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111, %11111111
charset_qr_code_end:
| 59.4 | 96 | 0.741863 |
19cbb9ec2a431e077d9da4b570a9d56296a952b4 | 1,417 | asm | Assembly | programs/oeis/156/A156795.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/156/A156795.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/156/A156795.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A156795: 81*n - 59.
; 22,103,184,265,346,427,508,589,670,751,832,913,994,1075,1156,1237,1318,1399,1480,1561,1642,1723,1804,1885,1966,2047,2128,2209,2290,2371,2452,2533,2614,2695,2776,2857,2938,3019,3100,3181,3262,3343,3424,3505,3586,3667,3748,3829,3910,3991,4072,4153,4234,4315,4396,4477,4558,4639,4720,4801,4882,4963,5044,5125,5206,5287,5368,5449,5530,5611,5692,5773,5854,5935,6016,6097,6178,6259,6340,6421,6502,6583,6664,6745,6826,6907,6988,7069,7150,7231,7312,7393,7474,7555,7636,7717,7798,7879,7960,8041,8122,8203,8284,8365,8446,8527,8608,8689,8770,8851,8932,9013,9094,9175,9256,9337,9418,9499,9580,9661,9742,9823,9904,9985,10066,10147,10228,10309,10390,10471,10552,10633,10714,10795,10876,10957,11038,11119,11200,11281,11362,11443,11524,11605,11686,11767,11848,11929,12010,12091,12172,12253,12334,12415,12496,12577,12658,12739,12820,12901,12982,13063,13144,13225,13306,13387,13468,13549,13630,13711,13792,13873,13954,14035,14116,14197,14278,14359,14440,14521,14602,14683,14764,14845,14926,15007,15088,15169,15250,15331,15412,15493,15574,15655,15736,15817,15898,15979,16060,16141,16222,16303,16384,16465,16546,16627,16708,16789,16870,16951,17032,17113,17194,17275,17356,17437,17518,17599,17680,17761,17842,17923,18004,18085,18166,18247,18328,18409,18490,18571,18652,18733,18814,18895,18976,19057,19138,19219,19300,19381,19462,19543,19624,19705,19786,19867,19948,20029,20110,20191
mov $1,$0
mul $1,81
add $1,22
| 202.428571 | 1,363 | 0.805222 |
ed2d208ed75eb6d771d1f4022c0b5ce34e359f98 | 799 | asm | Assembly | sorting_algorithms/BubbleSort_.asm | zer0chance/algorithms | aeb4bc9c9ea85bb6acccbb8d9ff979965ab6b1d8 | [
"Apache-2.0"
] | null | null | null | sorting_algorithms/BubbleSort_.asm | zer0chance/algorithms | aeb4bc9c9ea85bb6acccbb8d9ff979965ab6b1d8 | [
"Apache-2.0"
] | null | null | null | sorting_algorithms/BubbleSort_.asm | zer0chance/algorithms | aeb4bc9c9ea85bb6acccbb8d9ff979965ab6b1d8 | [
"Apache-2.0"
] | null | null | null | .model flat,c ; This code is suppose to be called from C++ function
extern N: dword ; N - array size, defined in main.cpp
.code
Foo_ proc
push ebp
mov ebp,esp
push esi
push edi
mov eax, [ebp + 8] ; eax = x
xor esi, esi ; esi = i = 0
xor edi, edi ; edi = j = 0
xor ecx, ecx
mov ebx, -1 ;ebx - i counter
;ecx - j counter
iLoop:
inc ebx
cmp ebx, N
je Finish ; je - jump if equal
mov ecx, N ; j = N
jLoop:
dec ecx
cmp ecx, ebx
je iLoop
mov esi, [eax + ecx*4]
mov edi, [eax + ecx*4 - 4]
cmp edi, esi
jle jLoop
mov dl, [eax + ecx*4]
mov dh, [eax + ecx*4 - 4]
mov [eax + ecx*4], dh
mov [eax + ecx*4 - 4], dl
jmp jLoop
Finish:
pop edi
pop esi
pop ebp
ret
Foo_ endp
end
| 16.306122 | 73 | 0.531915 |
51ae48b5d67be74934ae18d4cb53fc2caba7e1ac | 1,609 | asm | Assembly | programs/oeis/027/A027649.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/027/A027649.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/027/A027649.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A027649: a(n) = 2*(3^n) - 2^n.
; 1,4,14,46,146,454,1394,4246,12866,38854,117074,352246,1058786,3180454,9549554,28665046,86027906,258149254,774578834,2323998646,6972520226,20918609254,62757924914,188277969046,564842295746,1694543664454,5083664547794,15251060752246,45753316474466,137260217858854,411781190447474,1235344645084246,3706036082736386,11118112543176454,33354346219463954,100063055838261046,300189201874521506,900567674343041254,2701703160468077234,8105109756282138646,24315329818602229826,72945990555318317254,218837973864978207314,656513925992981133046,1969541786775036421346,5908625377917295308454,17725876168936258014194,53177628577177518220246,159532885872270043016066,478598657898285105758854,1435795974257805270697874,4307387923899315718936246,12922163773949746970493986,38766491326352840538852454,116299473988065720871298354,348898421982211561123377046,1046695265982663480389095106,3140085798020048035205213254,9420257394204259293691495634,28260772182901008257226198646,84782316549279485523982019426,254346949648991378076552905254,763040848949279977238872409714,2289122546852451617735044617046,6867367640566578225241988626946,20602102921718181419799675432454,61806308765191437747546445400594,185418926295648100218934174408246,556256778887091874609392199637666,1668770336661570771733355951738854,5006311009985302611010426560868274,15018933029957088424651997093908246,45056799089873626457197426104331586,135170397269625601738075147958208454,405511191808886249947191183165052754
add $0,1
mov $1,2
pow $1,$0
mov $2,3
pow $2,$0
sub $2,$1
mul $2,4
add $1,$2
sub $1,6
div $1,6
add $1,1
mov $0,$1
| 100.5625 | 1,461 | 0.906774 |
a2e4742e547e284034e4dc4b65ff5c76a4a90e88 | 105,456 | asm | Assembly | sh.asm | bilalsaad/realos | 892614a47482ccbb6bdf1d071b74b85bf12fcd4e | [
"MIT-0"
] | null | null | null | sh.asm | bilalsaad/realos | 892614a47482ccbb6bdf1d071b74b85bf12fcd4e | [
"MIT-0"
] | null | null | null | sh.asm | bilalsaad/realos | 892614a47482ccbb6bdf1d071b74b85bf12fcd4e | [
"MIT-0"
] | null | null | null |
_sh: file format elf32-i386
Disassembly of section .text:
00000000 <strcmpaa>:
void panic(char*);
struct cmd *parsecmd(char*);
void display_history();
int
strcmpaa(const char *p, const char *q, uint n)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
while(n > 0 && *p && *p == *q)
3: eb 0c jmp 11 <strcmpaa+0x11>
n--, p++, q++;
5: 83 6d 10 01 subl $0x1,0x10(%ebp)
9: 83 45 08 01 addl $0x1,0x8(%ebp)
d: 83 45 0c 01 addl $0x1,0xc(%ebp)
struct cmd *parsecmd(char*);
void display_history();
int
strcmpaa(const char *p, const char *q, uint n)
{
while(n > 0 && *p && *p == *q)
11: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
15: 74 1a je 31 <strcmpaa+0x31>
17: 8b 45 08 mov 0x8(%ebp),%eax
1a: 0f b6 00 movzbl (%eax),%eax
1d: 84 c0 test %al,%al
1f: 74 10 je 31 <strcmpaa+0x31>
21: 8b 45 08 mov 0x8(%ebp),%eax
24: 0f b6 10 movzbl (%eax),%edx
27: 8b 45 0c mov 0xc(%ebp),%eax
2a: 0f b6 00 movzbl (%eax),%eax
2d: 38 c2 cmp %al,%dl
2f: 74 d4 je 5 <strcmpaa+0x5>
n--, p++, q++;
if(n == 0)
31: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
35: 75 07 jne 3e <strcmpaa+0x3e>
return 0;
37: b8 00 00 00 00 mov $0x0,%eax
3c: eb 16 jmp 54 <strcmpaa+0x54>
return (uchar)*p - (uchar)*q;
3e: 8b 45 08 mov 0x8(%ebp),%eax
41: 0f b6 00 movzbl (%eax),%eax
44: 0f b6 d0 movzbl %al,%edx
47: 8b 45 0c mov 0xc(%ebp),%eax
4a: 0f b6 00 movzbl (%eax),%eax
4d: 0f b6 c0 movzbl %al,%eax
50: 29 c2 sub %eax,%edx
52: 89 d0 mov %edx,%eax
}
54: 5d pop %ebp
55: c3 ret
00000056 <runcmd>:
// Execute cmd. Never returns.
void
runcmd(struct cmd *cmd)
{
56: 55 push %ebp
57: 89 e5 mov %esp,%ebp
59: 83 ec 38 sub $0x38,%esp
struct execcmd *ecmd;
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
5c: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
60: 75 05 jne 67 <runcmd+0x11>
exit();
62: e8 c0 0f 00 00 call 1027 <exit>
switch(cmd->type){
67: 8b 45 08 mov 0x8(%ebp),%eax
6a: 8b 00 mov (%eax),%eax
6c: 83 f8 05 cmp $0x5,%eax
6f: 77 09 ja 7a <runcmd+0x24>
71: 8b 04 85 b8 15 00 00 mov 0x15b8(,%eax,4),%eax
78: ff e0 jmp *%eax
default:
panic("runcmd");
7a: c7 04 24 8c 15 00 00 movl $0x158c,(%esp)
81: e8 46 03 00 00 call 3cc <panic>
case EXEC:
ecmd = (struct execcmd*)cmd;
86: 8b 45 08 mov 0x8(%ebp),%eax
89: 89 45 f4 mov %eax,-0xc(%ebp)
if(ecmd->argv[0] == 0)
8c: 8b 45 f4 mov -0xc(%ebp),%eax
8f: 8b 40 04 mov 0x4(%eax),%eax
92: 85 c0 test %eax,%eax
94: 75 05 jne 9b <runcmd+0x45>
exit();
96: e8 8c 0f 00 00 call 1027 <exit>
exec(ecmd->argv[0], ecmd->argv);
9b: 8b 45 f4 mov -0xc(%ebp),%eax
9e: 8d 50 04 lea 0x4(%eax),%edx
a1: 8b 45 f4 mov -0xc(%ebp),%eax
a4: 8b 40 04 mov 0x4(%eax),%eax
a7: 89 54 24 04 mov %edx,0x4(%esp)
ab: 89 04 24 mov %eax,(%esp)
ae: e8 ac 0f 00 00 call 105f <exec>
printf(2, "exec %s failed\n", ecmd->argv[0]);
b3: 8b 45 f4 mov -0xc(%ebp),%eax
b6: 8b 40 04 mov 0x4(%eax),%eax
b9: 89 44 24 08 mov %eax,0x8(%esp)
bd: c7 44 24 04 93 15 00 movl $0x1593,0x4(%esp)
c4: 00
c5: c7 04 24 02 00 00 00 movl $0x2,(%esp)
cc: e8 ee 10 00 00 call 11bf <printf>
break;
d1: e9 86 01 00 00 jmp 25c <runcmd+0x206>
case REDIR:
rcmd = (struct redircmd*)cmd;
d6: 8b 45 08 mov 0x8(%ebp),%eax
d9: 89 45 f0 mov %eax,-0x10(%ebp)
close(rcmd->fd);
dc: 8b 45 f0 mov -0x10(%ebp),%eax
df: 8b 40 14 mov 0x14(%eax),%eax
e2: 89 04 24 mov %eax,(%esp)
e5: e8 65 0f 00 00 call 104f <close>
if(open(rcmd->file, rcmd->mode) < 0){
ea: 8b 45 f0 mov -0x10(%ebp),%eax
ed: 8b 50 10 mov 0x10(%eax),%edx
f0: 8b 45 f0 mov -0x10(%ebp),%eax
f3: 8b 40 08 mov 0x8(%eax),%eax
f6: 89 54 24 04 mov %edx,0x4(%esp)
fa: 89 04 24 mov %eax,(%esp)
fd: e8 65 0f 00 00 call 1067 <open>
102: 85 c0 test %eax,%eax
104: 79 23 jns 129 <runcmd+0xd3>
printf(2, "open %s failed\n", rcmd->file);
106: 8b 45 f0 mov -0x10(%ebp),%eax
109: 8b 40 08 mov 0x8(%eax),%eax
10c: 89 44 24 08 mov %eax,0x8(%esp)
110: c7 44 24 04 a3 15 00 movl $0x15a3,0x4(%esp)
117: 00
118: c7 04 24 02 00 00 00 movl $0x2,(%esp)
11f: e8 9b 10 00 00 call 11bf <printf>
exit();
124: e8 fe 0e 00 00 call 1027 <exit>
}
runcmd(rcmd->cmd);
129: 8b 45 f0 mov -0x10(%ebp),%eax
12c: 8b 40 04 mov 0x4(%eax),%eax
12f: 89 04 24 mov %eax,(%esp)
132: e8 1f ff ff ff call 56 <runcmd>
break;
137: e9 20 01 00 00 jmp 25c <runcmd+0x206>
case LIST:
lcmd = (struct listcmd*)cmd;
13c: 8b 45 08 mov 0x8(%ebp),%eax
13f: 89 45 ec mov %eax,-0x14(%ebp)
if(fork1() == 0)
142: e8 ab 02 00 00 call 3f2 <fork1>
147: 85 c0 test %eax,%eax
149: 75 0e jne 159 <runcmd+0x103>
runcmd(lcmd->left);
14b: 8b 45 ec mov -0x14(%ebp),%eax
14e: 8b 40 04 mov 0x4(%eax),%eax
151: 89 04 24 mov %eax,(%esp)
154: e8 fd fe ff ff call 56 <runcmd>
wait();
159: e8 d1 0e 00 00 call 102f <wait>
runcmd(lcmd->right);
15e: 8b 45 ec mov -0x14(%ebp),%eax
161: 8b 40 08 mov 0x8(%eax),%eax
164: 89 04 24 mov %eax,(%esp)
167: e8 ea fe ff ff call 56 <runcmd>
break;
16c: e9 eb 00 00 00 jmp 25c <runcmd+0x206>
case PIPE:
pcmd = (struct pipecmd*)cmd;
171: 8b 45 08 mov 0x8(%ebp),%eax
174: 89 45 e8 mov %eax,-0x18(%ebp)
if(pipe(p) < 0)
177: 8d 45 dc lea -0x24(%ebp),%eax
17a: 89 04 24 mov %eax,(%esp)
17d: e8 b5 0e 00 00 call 1037 <pipe>
182: 85 c0 test %eax,%eax
184: 79 0c jns 192 <runcmd+0x13c>
panic("pipe");
186: c7 04 24 b3 15 00 00 movl $0x15b3,(%esp)
18d: e8 3a 02 00 00 call 3cc <panic>
if(fork1() == 0){
192: e8 5b 02 00 00 call 3f2 <fork1>
197: 85 c0 test %eax,%eax
199: 75 3b jne 1d6 <runcmd+0x180>
close(1);
19b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1a2: e8 a8 0e 00 00 call 104f <close>
dup(p[1]);
1a7: 8b 45 e0 mov -0x20(%ebp),%eax
1aa: 89 04 24 mov %eax,(%esp)
1ad: e8 ed 0e 00 00 call 109f <dup>
close(p[0]);
1b2: 8b 45 dc mov -0x24(%ebp),%eax
1b5: 89 04 24 mov %eax,(%esp)
1b8: e8 92 0e 00 00 call 104f <close>
close(p[1]);
1bd: 8b 45 e0 mov -0x20(%ebp),%eax
1c0: 89 04 24 mov %eax,(%esp)
1c3: e8 87 0e 00 00 call 104f <close>
runcmd(pcmd->left);
1c8: 8b 45 e8 mov -0x18(%ebp),%eax
1cb: 8b 40 04 mov 0x4(%eax),%eax
1ce: 89 04 24 mov %eax,(%esp)
1d1: e8 80 fe ff ff call 56 <runcmd>
}
if(fork1() == 0){
1d6: e8 17 02 00 00 call 3f2 <fork1>
1db: 85 c0 test %eax,%eax
1dd: 75 3b jne 21a <runcmd+0x1c4>
close(0);
1df: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1e6: e8 64 0e 00 00 call 104f <close>
dup(p[0]);
1eb: 8b 45 dc mov -0x24(%ebp),%eax
1ee: 89 04 24 mov %eax,(%esp)
1f1: e8 a9 0e 00 00 call 109f <dup>
close(p[0]);
1f6: 8b 45 dc mov -0x24(%ebp),%eax
1f9: 89 04 24 mov %eax,(%esp)
1fc: e8 4e 0e 00 00 call 104f <close>
close(p[1]);
201: 8b 45 e0 mov -0x20(%ebp),%eax
204: 89 04 24 mov %eax,(%esp)
207: e8 43 0e 00 00 call 104f <close>
runcmd(pcmd->right);
20c: 8b 45 e8 mov -0x18(%ebp),%eax
20f: 8b 40 08 mov 0x8(%eax),%eax
212: 89 04 24 mov %eax,(%esp)
215: e8 3c fe ff ff call 56 <runcmd>
}
close(p[0]);
21a: 8b 45 dc mov -0x24(%ebp),%eax
21d: 89 04 24 mov %eax,(%esp)
220: e8 2a 0e 00 00 call 104f <close>
close(p[1]);
225: 8b 45 e0 mov -0x20(%ebp),%eax
228: 89 04 24 mov %eax,(%esp)
22b: e8 1f 0e 00 00 call 104f <close>
wait();
230: e8 fa 0d 00 00 call 102f <wait>
wait();
235: e8 f5 0d 00 00 call 102f <wait>
break;
23a: eb 20 jmp 25c <runcmd+0x206>
case BACK:
bcmd = (struct backcmd*)cmd;
23c: 8b 45 08 mov 0x8(%ebp),%eax
23f: 89 45 e4 mov %eax,-0x1c(%ebp)
if(fork1() == 0)
242: e8 ab 01 00 00 call 3f2 <fork1>
247: 85 c0 test %eax,%eax
249: 75 10 jne 25b <runcmd+0x205>
runcmd(bcmd->cmd);
24b: 8b 45 e4 mov -0x1c(%ebp),%eax
24e: 8b 40 04 mov 0x4(%eax),%eax
251: 89 04 24 mov %eax,(%esp)
254: e8 fd fd ff ff call 56 <runcmd>
break;
259: eb 00 jmp 25b <runcmd+0x205>
25b: 90 nop
}
exit();
25c: e8 c6 0d 00 00 call 1027 <exit>
00000261 <getcmd>:
}
int
getcmd(char *buf, int nbuf)
{
261: 55 push %ebp
262: 89 e5 mov %esp,%ebp
264: 83 ec 18 sub $0x18,%esp
printf(2, "$ ");
267: c7 44 24 04 d0 15 00 movl $0x15d0,0x4(%esp)
26e: 00
26f: c7 04 24 02 00 00 00 movl $0x2,(%esp)
276: e8 44 0f 00 00 call 11bf <printf>
memset(buf, 0, nbuf);
27b: 8b 45 0c mov 0xc(%ebp),%eax
27e: 89 44 24 08 mov %eax,0x8(%esp)
282: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
289: 00
28a: 8b 45 08 mov 0x8(%ebp),%eax
28d: 89 04 24 mov %eax,(%esp)
290: e8 e5 0b 00 00 call e7a <memset>
gets(buf, nbuf);
295: 8b 45 0c mov 0xc(%ebp),%eax
298: 89 44 24 04 mov %eax,0x4(%esp)
29c: 8b 45 08 mov 0x8(%ebp),%eax
29f: 89 04 24 mov %eax,(%esp)
2a2: e8 2a 0c 00 00 call ed1 <gets>
if(buf[0] == 0) // EOF
2a7: 8b 45 08 mov 0x8(%ebp),%eax
2aa: 0f b6 00 movzbl (%eax),%eax
2ad: 84 c0 test %al,%al
2af: 75 07 jne 2b8 <getcmd+0x57>
return -1;
2b1: b8 ff ff ff ff mov $0xffffffff,%eax
2b6: eb 05 jmp 2bd <getcmd+0x5c>
return 0;
2b8: b8 00 00 00 00 mov $0x0,%eax
}
2bd: c9 leave
2be: c3 ret
000002bf <main>:
int
main(void)
{
2bf: 55 push %ebp
2c0: 89 e5 mov %esp,%ebp
2c2: 83 e4 f0 and $0xfffffff0,%esp
2c5: 83 ec 20 sub $0x20,%esp
static char buf[100];
int fd;
// Assumes three file descriptors open.
while((fd = open("console", O_RDWR)) >= 0){
2c8: eb 15 jmp 2df <main+0x20>
if(fd >= 3){
2ca: 83 7c 24 1c 02 cmpl $0x2,0x1c(%esp)
2cf: 7e 0e jle 2df <main+0x20>
close(fd);
2d1: 8b 44 24 1c mov 0x1c(%esp),%eax
2d5: 89 04 24 mov %eax,(%esp)
2d8: e8 72 0d 00 00 call 104f <close>
break;
2dd: eb 1f jmp 2fe <main+0x3f>
{
static char buf[100];
int fd;
// Assumes three file descriptors open.
while((fd = open("console", O_RDWR)) >= 0){
2df: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
2e6: 00
2e7: c7 04 24 d3 15 00 00 movl $0x15d3,(%esp)
2ee: e8 74 0d 00 00 call 1067 <open>
2f3: 89 44 24 1c mov %eax,0x1c(%esp)
2f7: 83 7c 24 1c 00 cmpl $0x0,0x1c(%esp)
2fc: 79 cc jns 2ca <main+0xb>
break;
}
}
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
2fe: e9 a8 00 00 00 jmp 3ab <main+0xec>
if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){
303: 0f b6 05 80 1b 00 00 movzbl 0x1b80,%eax
30a: 3c 63 cmp $0x63,%al
30c: 75 5c jne 36a <main+0xab>
30e: 0f b6 05 81 1b 00 00 movzbl 0x1b81,%eax
315: 3c 64 cmp $0x64,%al
317: 75 51 jne 36a <main+0xab>
319: 0f b6 05 82 1b 00 00 movzbl 0x1b82,%eax
320: 3c 20 cmp $0x20,%al
322: 75 46 jne 36a <main+0xab>
// Clumsy but will have to do for now.
// Chdir has no effect on the parent if run in the child.
buf[strlen(buf)-1] = 0; // chop \n
324: c7 04 24 80 1b 00 00 movl $0x1b80,(%esp)
32b: e8 23 0b 00 00 call e53 <strlen>
330: 83 e8 01 sub $0x1,%eax
333: c6 80 80 1b 00 00 00 movb $0x0,0x1b80(%eax)
if(chdir(buf+3) < 0)
33a: c7 04 24 83 1b 00 00 movl $0x1b83,(%esp)
341: e8 51 0d 00 00 call 1097 <chdir>
346: 85 c0 test %eax,%eax
348: 79 1e jns 368 <main+0xa9>
printf(2, "cannot cd %s\n", buf+3);
34a: c7 44 24 08 83 1b 00 movl $0x1b83,0x8(%esp)
351: 00
352: c7 44 24 04 db 15 00 movl $0x15db,0x4(%esp)
359: 00
35a: c7 04 24 02 00 00 00 movl $0x2,(%esp)
361: e8 59 0e 00 00 call 11bf <printf>
continue;
366: eb 43 jmp 3ab <main+0xec>
368: eb 41 jmp 3ab <main+0xec>
} else if (strcmp("history\n", buf) == 0) {
36a: c7 44 24 04 80 1b 00 movl $0x1b80,0x4(%esp)
371: 00
372: c7 04 24 e9 15 00 00 movl $0x15e9,(%esp)
379: e8 96 0a 00 00 call e14 <strcmp>
37e: 85 c0 test %eax,%eax
380: 75 07 jne 389 <main+0xca>
display_history();
382: e8 e7 09 00 00 call d6e <display_history>
continue;
387: eb 22 jmp 3ab <main+0xec>
}
if(fork1() == 0)
389: e8 64 00 00 00 call 3f2 <fork1>
38e: 85 c0 test %eax,%eax
390: 75 14 jne 3a6 <main+0xe7>
runcmd(parsecmd(buf));
392: c7 04 24 80 1b 00 00 movl $0x1b80,(%esp)
399: e8 c9 03 00 00 call 767 <parsecmd>
39e: 89 04 24 mov %eax,(%esp)
3a1: e8 b0 fc ff ff call 56 <runcmd>
wait();
3a6: e8 84 0c 00 00 call 102f <wait>
break;
}
}
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
3ab: c7 44 24 04 64 00 00 movl $0x64,0x4(%esp)
3b2: 00
3b3: c7 04 24 80 1b 00 00 movl $0x1b80,(%esp)
3ba: e8 a2 fe ff ff call 261 <getcmd>
3bf: 85 c0 test %eax,%eax
3c1: 0f 89 3c ff ff ff jns 303 <main+0x44>
}
if(fork1() == 0)
runcmd(parsecmd(buf));
wait();
}
exit();
3c7: e8 5b 0c 00 00 call 1027 <exit>
000003cc <panic>:
}
void
panic(char *s)
{
3cc: 55 push %ebp
3cd: 89 e5 mov %esp,%ebp
3cf: 83 ec 18 sub $0x18,%esp
printf(2, "%s\n", s);
3d2: 8b 45 08 mov 0x8(%ebp),%eax
3d5: 89 44 24 08 mov %eax,0x8(%esp)
3d9: c7 44 24 04 f2 15 00 movl $0x15f2,0x4(%esp)
3e0: 00
3e1: c7 04 24 02 00 00 00 movl $0x2,(%esp)
3e8: e8 d2 0d 00 00 call 11bf <printf>
exit();
3ed: e8 35 0c 00 00 call 1027 <exit>
000003f2 <fork1>:
}
int
fork1(void)
{
3f2: 55 push %ebp
3f3: 89 e5 mov %esp,%ebp
3f5: 83 ec 28 sub $0x28,%esp
int pid;
pid = fork();
3f8: e8 22 0c 00 00 call 101f <fork>
3fd: 89 45 f4 mov %eax,-0xc(%ebp)
if(pid == -1)
400: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
404: 75 0c jne 412 <fork1+0x20>
panic("fork");
406: c7 04 24 f6 15 00 00 movl $0x15f6,(%esp)
40d: e8 ba ff ff ff call 3cc <panic>
return pid;
412: 8b 45 f4 mov -0xc(%ebp),%eax
}
415: c9 leave
416: c3 ret
00000417 <execcmd>:
//PAGEBREAK!
// Constructors
struct cmd*
execcmd(void)
{
417: 55 push %ebp
418: 89 e5 mov %esp,%ebp
41a: 83 ec 28 sub $0x28,%esp
struct execcmd *cmd;
cmd = malloc(sizeof(*cmd));
41d: c7 04 24 54 00 00 00 movl $0x54,(%esp)
424: e8 82 10 00 00 call 14ab <malloc>
429: 89 45 f4 mov %eax,-0xc(%ebp)
memset(cmd, 0, sizeof(*cmd));
42c: c7 44 24 08 54 00 00 movl $0x54,0x8(%esp)
433: 00
434: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
43b: 00
43c: 8b 45 f4 mov -0xc(%ebp),%eax
43f: 89 04 24 mov %eax,(%esp)
442: e8 33 0a 00 00 call e7a <memset>
cmd->type = EXEC;
447: 8b 45 f4 mov -0xc(%ebp),%eax
44a: c7 00 01 00 00 00 movl $0x1,(%eax)
return (struct cmd*)cmd;
450: 8b 45 f4 mov -0xc(%ebp),%eax
}
453: c9 leave
454: c3 ret
00000455 <redircmd>:
struct cmd*
redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd)
{
455: 55 push %ebp
456: 89 e5 mov %esp,%ebp
458: 83 ec 28 sub $0x28,%esp
struct redircmd *cmd;
cmd = malloc(sizeof(*cmd));
45b: c7 04 24 18 00 00 00 movl $0x18,(%esp)
462: e8 44 10 00 00 call 14ab <malloc>
467: 89 45 f4 mov %eax,-0xc(%ebp)
memset(cmd, 0, sizeof(*cmd));
46a: c7 44 24 08 18 00 00 movl $0x18,0x8(%esp)
471: 00
472: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
479: 00
47a: 8b 45 f4 mov -0xc(%ebp),%eax
47d: 89 04 24 mov %eax,(%esp)
480: e8 f5 09 00 00 call e7a <memset>
cmd->type = REDIR;
485: 8b 45 f4 mov -0xc(%ebp),%eax
488: c7 00 02 00 00 00 movl $0x2,(%eax)
cmd->cmd = subcmd;
48e: 8b 45 f4 mov -0xc(%ebp),%eax
491: 8b 55 08 mov 0x8(%ebp),%edx
494: 89 50 04 mov %edx,0x4(%eax)
cmd->file = file;
497: 8b 45 f4 mov -0xc(%ebp),%eax
49a: 8b 55 0c mov 0xc(%ebp),%edx
49d: 89 50 08 mov %edx,0x8(%eax)
cmd->efile = efile;
4a0: 8b 45 f4 mov -0xc(%ebp),%eax
4a3: 8b 55 10 mov 0x10(%ebp),%edx
4a6: 89 50 0c mov %edx,0xc(%eax)
cmd->mode = mode;
4a9: 8b 45 f4 mov -0xc(%ebp),%eax
4ac: 8b 55 14 mov 0x14(%ebp),%edx
4af: 89 50 10 mov %edx,0x10(%eax)
cmd->fd = fd;
4b2: 8b 45 f4 mov -0xc(%ebp),%eax
4b5: 8b 55 18 mov 0x18(%ebp),%edx
4b8: 89 50 14 mov %edx,0x14(%eax)
return (struct cmd*)cmd;
4bb: 8b 45 f4 mov -0xc(%ebp),%eax
}
4be: c9 leave
4bf: c3 ret
000004c0 <pipecmd>:
struct cmd*
pipecmd(struct cmd *left, struct cmd *right)
{
4c0: 55 push %ebp
4c1: 89 e5 mov %esp,%ebp
4c3: 83 ec 28 sub $0x28,%esp
struct pipecmd *cmd;
cmd = malloc(sizeof(*cmd));
4c6: c7 04 24 0c 00 00 00 movl $0xc,(%esp)
4cd: e8 d9 0f 00 00 call 14ab <malloc>
4d2: 89 45 f4 mov %eax,-0xc(%ebp)
memset(cmd, 0, sizeof(*cmd));
4d5: c7 44 24 08 0c 00 00 movl $0xc,0x8(%esp)
4dc: 00
4dd: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
4e4: 00
4e5: 8b 45 f4 mov -0xc(%ebp),%eax
4e8: 89 04 24 mov %eax,(%esp)
4eb: e8 8a 09 00 00 call e7a <memset>
cmd->type = PIPE;
4f0: 8b 45 f4 mov -0xc(%ebp),%eax
4f3: c7 00 03 00 00 00 movl $0x3,(%eax)
cmd->left = left;
4f9: 8b 45 f4 mov -0xc(%ebp),%eax
4fc: 8b 55 08 mov 0x8(%ebp),%edx
4ff: 89 50 04 mov %edx,0x4(%eax)
cmd->right = right;
502: 8b 45 f4 mov -0xc(%ebp),%eax
505: 8b 55 0c mov 0xc(%ebp),%edx
508: 89 50 08 mov %edx,0x8(%eax)
return (struct cmd*)cmd;
50b: 8b 45 f4 mov -0xc(%ebp),%eax
}
50e: c9 leave
50f: c3 ret
00000510 <listcmd>:
struct cmd*
listcmd(struct cmd *left, struct cmd *right)
{
510: 55 push %ebp
511: 89 e5 mov %esp,%ebp
513: 83 ec 28 sub $0x28,%esp
struct listcmd *cmd;
cmd = malloc(sizeof(*cmd));
516: c7 04 24 0c 00 00 00 movl $0xc,(%esp)
51d: e8 89 0f 00 00 call 14ab <malloc>
522: 89 45 f4 mov %eax,-0xc(%ebp)
memset(cmd, 0, sizeof(*cmd));
525: c7 44 24 08 0c 00 00 movl $0xc,0x8(%esp)
52c: 00
52d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
534: 00
535: 8b 45 f4 mov -0xc(%ebp),%eax
538: 89 04 24 mov %eax,(%esp)
53b: e8 3a 09 00 00 call e7a <memset>
cmd->type = LIST;
540: 8b 45 f4 mov -0xc(%ebp),%eax
543: c7 00 04 00 00 00 movl $0x4,(%eax)
cmd->left = left;
549: 8b 45 f4 mov -0xc(%ebp),%eax
54c: 8b 55 08 mov 0x8(%ebp),%edx
54f: 89 50 04 mov %edx,0x4(%eax)
cmd->right = right;
552: 8b 45 f4 mov -0xc(%ebp),%eax
555: 8b 55 0c mov 0xc(%ebp),%edx
558: 89 50 08 mov %edx,0x8(%eax)
return (struct cmd*)cmd;
55b: 8b 45 f4 mov -0xc(%ebp),%eax
}
55e: c9 leave
55f: c3 ret
00000560 <backcmd>:
struct cmd*
backcmd(struct cmd *subcmd)
{
560: 55 push %ebp
561: 89 e5 mov %esp,%ebp
563: 83 ec 28 sub $0x28,%esp
struct backcmd *cmd;
cmd = malloc(sizeof(*cmd));
566: c7 04 24 08 00 00 00 movl $0x8,(%esp)
56d: e8 39 0f 00 00 call 14ab <malloc>
572: 89 45 f4 mov %eax,-0xc(%ebp)
memset(cmd, 0, sizeof(*cmd));
575: c7 44 24 08 08 00 00 movl $0x8,0x8(%esp)
57c: 00
57d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
584: 00
585: 8b 45 f4 mov -0xc(%ebp),%eax
588: 89 04 24 mov %eax,(%esp)
58b: e8 ea 08 00 00 call e7a <memset>
cmd->type = BACK;
590: 8b 45 f4 mov -0xc(%ebp),%eax
593: c7 00 05 00 00 00 movl $0x5,(%eax)
cmd->cmd = subcmd;
599: 8b 45 f4 mov -0xc(%ebp),%eax
59c: 8b 55 08 mov 0x8(%ebp),%edx
59f: 89 50 04 mov %edx,0x4(%eax)
return (struct cmd*)cmd;
5a2: 8b 45 f4 mov -0xc(%ebp),%eax
}
5a5: c9 leave
5a6: c3 ret
000005a7 <gettoken>:
char whitespace[] = " \t\r\n\v";
char symbols[] = "<|>&;()";
int
gettoken(char **ps, char *es, char **q, char **eq)
{
5a7: 55 push %ebp
5a8: 89 e5 mov %esp,%ebp
5aa: 83 ec 28 sub $0x28,%esp
char *s;
int ret;
s = *ps;
5ad: 8b 45 08 mov 0x8(%ebp),%eax
5b0: 8b 00 mov (%eax),%eax
5b2: 89 45 f4 mov %eax,-0xc(%ebp)
while(s < es && strchr(whitespace, *s))
5b5: eb 04 jmp 5bb <gettoken+0x14>
s++;
5b7: 83 45 f4 01 addl $0x1,-0xc(%ebp)
{
char *s;
int ret;
s = *ps;
while(s < es && strchr(whitespace, *s))
5bb: 8b 45 f4 mov -0xc(%ebp),%eax
5be: 3b 45 0c cmp 0xc(%ebp),%eax
5c1: 73 1d jae 5e0 <gettoken+0x39>
5c3: 8b 45 f4 mov -0xc(%ebp),%eax
5c6: 0f b6 00 movzbl (%eax),%eax
5c9: 0f be c0 movsbl %al,%eax
5cc: 89 44 24 04 mov %eax,0x4(%esp)
5d0: c7 04 24 58 1b 00 00 movl $0x1b58,(%esp)
5d7: e8 c2 08 00 00 call e9e <strchr>
5dc: 85 c0 test %eax,%eax
5de: 75 d7 jne 5b7 <gettoken+0x10>
s++;
if(q)
5e0: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
5e4: 74 08 je 5ee <gettoken+0x47>
*q = s;
5e6: 8b 45 10 mov 0x10(%ebp),%eax
5e9: 8b 55 f4 mov -0xc(%ebp),%edx
5ec: 89 10 mov %edx,(%eax)
ret = *s;
5ee: 8b 45 f4 mov -0xc(%ebp),%eax
5f1: 0f b6 00 movzbl (%eax),%eax
5f4: 0f be c0 movsbl %al,%eax
5f7: 89 45 f0 mov %eax,-0x10(%ebp)
switch(*s){
5fa: 8b 45 f4 mov -0xc(%ebp),%eax
5fd: 0f b6 00 movzbl (%eax),%eax
600: 0f be c0 movsbl %al,%eax
603: 83 f8 29 cmp $0x29,%eax
606: 7f 14 jg 61c <gettoken+0x75>
608: 83 f8 28 cmp $0x28,%eax
60b: 7d 28 jge 635 <gettoken+0x8e>
60d: 85 c0 test %eax,%eax
60f: 0f 84 94 00 00 00 je 6a9 <gettoken+0x102>
615: 83 f8 26 cmp $0x26,%eax
618: 74 1b je 635 <gettoken+0x8e>
61a: eb 3c jmp 658 <gettoken+0xb1>
61c: 83 f8 3e cmp $0x3e,%eax
61f: 74 1a je 63b <gettoken+0x94>
621: 83 f8 3e cmp $0x3e,%eax
624: 7f 0a jg 630 <gettoken+0x89>
626: 83 e8 3b sub $0x3b,%eax
629: 83 f8 01 cmp $0x1,%eax
62c: 77 2a ja 658 <gettoken+0xb1>
62e: eb 05 jmp 635 <gettoken+0x8e>
630: 83 f8 7c cmp $0x7c,%eax
633: 75 23 jne 658 <gettoken+0xb1>
case '(':
case ')':
case ';':
case '&':
case '<':
s++;
635: 83 45 f4 01 addl $0x1,-0xc(%ebp)
break;
639: eb 6f jmp 6aa <gettoken+0x103>
case '>':
s++;
63b: 83 45 f4 01 addl $0x1,-0xc(%ebp)
if(*s == '>'){
63f: 8b 45 f4 mov -0xc(%ebp),%eax
642: 0f b6 00 movzbl (%eax),%eax
645: 3c 3e cmp $0x3e,%al
647: 75 0d jne 656 <gettoken+0xaf>
ret = '+';
649: c7 45 f0 2b 00 00 00 movl $0x2b,-0x10(%ebp)
s++;
650: 83 45 f4 01 addl $0x1,-0xc(%ebp)
}
break;
654: eb 54 jmp 6aa <gettoken+0x103>
656: eb 52 jmp 6aa <gettoken+0x103>
default:
ret = 'a';
658: c7 45 f0 61 00 00 00 movl $0x61,-0x10(%ebp)
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
65f: eb 04 jmp 665 <gettoken+0xbe>
s++;
661: 83 45 f4 01 addl $0x1,-0xc(%ebp)
s++;
}
break;
default:
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
665: 8b 45 f4 mov -0xc(%ebp),%eax
668: 3b 45 0c cmp 0xc(%ebp),%eax
66b: 73 3a jae 6a7 <gettoken+0x100>
66d: 8b 45 f4 mov -0xc(%ebp),%eax
670: 0f b6 00 movzbl (%eax),%eax
673: 0f be c0 movsbl %al,%eax
676: 89 44 24 04 mov %eax,0x4(%esp)
67a: c7 04 24 58 1b 00 00 movl $0x1b58,(%esp)
681: e8 18 08 00 00 call e9e <strchr>
686: 85 c0 test %eax,%eax
688: 75 1d jne 6a7 <gettoken+0x100>
68a: 8b 45 f4 mov -0xc(%ebp),%eax
68d: 0f b6 00 movzbl (%eax),%eax
690: 0f be c0 movsbl %al,%eax
693: 89 44 24 04 mov %eax,0x4(%esp)
697: c7 04 24 5e 1b 00 00 movl $0x1b5e,(%esp)
69e: e8 fb 07 00 00 call e9e <strchr>
6a3: 85 c0 test %eax,%eax
6a5: 74 ba je 661 <gettoken+0xba>
s++;
break;
6a7: eb 01 jmp 6aa <gettoken+0x103>
if(q)
*q = s;
ret = *s;
switch(*s){
case 0:
break;
6a9: 90 nop
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
s++;
break;
}
if(eq)
6aa: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
6ae: 74 0a je 6ba <gettoken+0x113>
*eq = s;
6b0: 8b 45 14 mov 0x14(%ebp),%eax
6b3: 8b 55 f4 mov -0xc(%ebp),%edx
6b6: 89 10 mov %edx,(%eax)
while(s < es && strchr(whitespace, *s))
6b8: eb 06 jmp 6c0 <gettoken+0x119>
6ba: eb 04 jmp 6c0 <gettoken+0x119>
s++;
6bc: 83 45 f4 01 addl $0x1,-0xc(%ebp)
break;
}
if(eq)
*eq = s;
while(s < es && strchr(whitespace, *s))
6c0: 8b 45 f4 mov -0xc(%ebp),%eax
6c3: 3b 45 0c cmp 0xc(%ebp),%eax
6c6: 73 1d jae 6e5 <gettoken+0x13e>
6c8: 8b 45 f4 mov -0xc(%ebp),%eax
6cb: 0f b6 00 movzbl (%eax),%eax
6ce: 0f be c0 movsbl %al,%eax
6d1: 89 44 24 04 mov %eax,0x4(%esp)
6d5: c7 04 24 58 1b 00 00 movl $0x1b58,(%esp)
6dc: e8 bd 07 00 00 call e9e <strchr>
6e1: 85 c0 test %eax,%eax
6e3: 75 d7 jne 6bc <gettoken+0x115>
s++;
*ps = s;
6e5: 8b 45 08 mov 0x8(%ebp),%eax
6e8: 8b 55 f4 mov -0xc(%ebp),%edx
6eb: 89 10 mov %edx,(%eax)
return ret;
6ed: 8b 45 f0 mov -0x10(%ebp),%eax
}
6f0: c9 leave
6f1: c3 ret
000006f2 <peek>:
int
peek(char **ps, char *es, char *toks)
{
6f2: 55 push %ebp
6f3: 89 e5 mov %esp,%ebp
6f5: 83 ec 28 sub $0x28,%esp
char *s;
s = *ps;
6f8: 8b 45 08 mov 0x8(%ebp),%eax
6fb: 8b 00 mov (%eax),%eax
6fd: 89 45 f4 mov %eax,-0xc(%ebp)
while(s < es && strchr(whitespace, *s))
700: eb 04 jmp 706 <peek+0x14>
s++;
702: 83 45 f4 01 addl $0x1,-0xc(%ebp)
peek(char **ps, char *es, char *toks)
{
char *s;
s = *ps;
while(s < es && strchr(whitespace, *s))
706: 8b 45 f4 mov -0xc(%ebp),%eax
709: 3b 45 0c cmp 0xc(%ebp),%eax
70c: 73 1d jae 72b <peek+0x39>
70e: 8b 45 f4 mov -0xc(%ebp),%eax
711: 0f b6 00 movzbl (%eax),%eax
714: 0f be c0 movsbl %al,%eax
717: 89 44 24 04 mov %eax,0x4(%esp)
71b: c7 04 24 58 1b 00 00 movl $0x1b58,(%esp)
722: e8 77 07 00 00 call e9e <strchr>
727: 85 c0 test %eax,%eax
729: 75 d7 jne 702 <peek+0x10>
s++;
*ps = s;
72b: 8b 45 08 mov 0x8(%ebp),%eax
72e: 8b 55 f4 mov -0xc(%ebp),%edx
731: 89 10 mov %edx,(%eax)
return *s && strchr(toks, *s);
733: 8b 45 f4 mov -0xc(%ebp),%eax
736: 0f b6 00 movzbl (%eax),%eax
739: 84 c0 test %al,%al
73b: 74 23 je 760 <peek+0x6e>
73d: 8b 45 f4 mov -0xc(%ebp),%eax
740: 0f b6 00 movzbl (%eax),%eax
743: 0f be c0 movsbl %al,%eax
746: 89 44 24 04 mov %eax,0x4(%esp)
74a: 8b 45 10 mov 0x10(%ebp),%eax
74d: 89 04 24 mov %eax,(%esp)
750: e8 49 07 00 00 call e9e <strchr>
755: 85 c0 test %eax,%eax
757: 74 07 je 760 <peek+0x6e>
759: b8 01 00 00 00 mov $0x1,%eax
75e: eb 05 jmp 765 <peek+0x73>
760: b8 00 00 00 00 mov $0x0,%eax
}
765: c9 leave
766: c3 ret
00000767 <parsecmd>:
struct cmd *parseexec(char**, char*);
struct cmd *nulterminate(struct cmd*);
struct cmd*
parsecmd(char *s)
{
767: 55 push %ebp
768: 89 e5 mov %esp,%ebp
76a: 53 push %ebx
76b: 83 ec 24 sub $0x24,%esp
char *es;
struct cmd *cmd;
es = s + strlen(s);
76e: 8b 5d 08 mov 0x8(%ebp),%ebx
771: 8b 45 08 mov 0x8(%ebp),%eax
774: 89 04 24 mov %eax,(%esp)
777: e8 d7 06 00 00 call e53 <strlen>
77c: 01 d8 add %ebx,%eax
77e: 89 45 f4 mov %eax,-0xc(%ebp)
cmd = parseline(&s, es);
781: 8b 45 f4 mov -0xc(%ebp),%eax
784: 89 44 24 04 mov %eax,0x4(%esp)
788: 8d 45 08 lea 0x8(%ebp),%eax
78b: 89 04 24 mov %eax,(%esp)
78e: e8 60 00 00 00 call 7f3 <parseline>
793: 89 45 f0 mov %eax,-0x10(%ebp)
peek(&s, es, "");
796: c7 44 24 08 fb 15 00 movl $0x15fb,0x8(%esp)
79d: 00
79e: 8b 45 f4 mov -0xc(%ebp),%eax
7a1: 89 44 24 04 mov %eax,0x4(%esp)
7a5: 8d 45 08 lea 0x8(%ebp),%eax
7a8: 89 04 24 mov %eax,(%esp)
7ab: e8 42 ff ff ff call 6f2 <peek>
if(s != es){
7b0: 8b 45 08 mov 0x8(%ebp),%eax
7b3: 3b 45 f4 cmp -0xc(%ebp),%eax
7b6: 74 27 je 7df <parsecmd+0x78>
printf(2, "leftovers: %s\n", s);
7b8: 8b 45 08 mov 0x8(%ebp),%eax
7bb: 89 44 24 08 mov %eax,0x8(%esp)
7bf: c7 44 24 04 fc 15 00 movl $0x15fc,0x4(%esp)
7c6: 00
7c7: c7 04 24 02 00 00 00 movl $0x2,(%esp)
7ce: e8 ec 09 00 00 call 11bf <printf>
panic("syntax");
7d3: c7 04 24 0b 16 00 00 movl $0x160b,(%esp)
7da: e8 ed fb ff ff call 3cc <panic>
}
nulterminate(cmd);
7df: 8b 45 f0 mov -0x10(%ebp),%eax
7e2: 89 04 24 mov %eax,(%esp)
7e5: e8 a3 04 00 00 call c8d <nulterminate>
return cmd;
7ea: 8b 45 f0 mov -0x10(%ebp),%eax
}
7ed: 83 c4 24 add $0x24,%esp
7f0: 5b pop %ebx
7f1: 5d pop %ebp
7f2: c3 ret
000007f3 <parseline>:
struct cmd*
parseline(char **ps, char *es)
{
7f3: 55 push %ebp
7f4: 89 e5 mov %esp,%ebp
7f6: 83 ec 28 sub $0x28,%esp
struct cmd *cmd;
cmd = parsepipe(ps, es);
7f9: 8b 45 0c mov 0xc(%ebp),%eax
7fc: 89 44 24 04 mov %eax,0x4(%esp)
800: 8b 45 08 mov 0x8(%ebp),%eax
803: 89 04 24 mov %eax,(%esp)
806: e8 bc 00 00 00 call 8c7 <parsepipe>
80b: 89 45 f4 mov %eax,-0xc(%ebp)
while(peek(ps, es, "&")){
80e: eb 30 jmp 840 <parseline+0x4d>
gettoken(ps, es, 0, 0);
810: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
817: 00
818: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
81f: 00
820: 8b 45 0c mov 0xc(%ebp),%eax
823: 89 44 24 04 mov %eax,0x4(%esp)
827: 8b 45 08 mov 0x8(%ebp),%eax
82a: 89 04 24 mov %eax,(%esp)
82d: e8 75 fd ff ff call 5a7 <gettoken>
cmd = backcmd(cmd);
832: 8b 45 f4 mov -0xc(%ebp),%eax
835: 89 04 24 mov %eax,(%esp)
838: e8 23 fd ff ff call 560 <backcmd>
83d: 89 45 f4 mov %eax,-0xc(%ebp)
parseline(char **ps, char *es)
{
struct cmd *cmd;
cmd = parsepipe(ps, es);
while(peek(ps, es, "&")){
840: c7 44 24 08 12 16 00 movl $0x1612,0x8(%esp)
847: 00
848: 8b 45 0c mov 0xc(%ebp),%eax
84b: 89 44 24 04 mov %eax,0x4(%esp)
84f: 8b 45 08 mov 0x8(%ebp),%eax
852: 89 04 24 mov %eax,(%esp)
855: e8 98 fe ff ff call 6f2 <peek>
85a: 85 c0 test %eax,%eax
85c: 75 b2 jne 810 <parseline+0x1d>
gettoken(ps, es, 0, 0);
cmd = backcmd(cmd);
}
if(peek(ps, es, ";")){
85e: c7 44 24 08 14 16 00 movl $0x1614,0x8(%esp)
865: 00
866: 8b 45 0c mov 0xc(%ebp),%eax
869: 89 44 24 04 mov %eax,0x4(%esp)
86d: 8b 45 08 mov 0x8(%ebp),%eax
870: 89 04 24 mov %eax,(%esp)
873: e8 7a fe ff ff call 6f2 <peek>
878: 85 c0 test %eax,%eax
87a: 74 46 je 8c2 <parseline+0xcf>
gettoken(ps, es, 0, 0);
87c: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
883: 00
884: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
88b: 00
88c: 8b 45 0c mov 0xc(%ebp),%eax
88f: 89 44 24 04 mov %eax,0x4(%esp)
893: 8b 45 08 mov 0x8(%ebp),%eax
896: 89 04 24 mov %eax,(%esp)
899: e8 09 fd ff ff call 5a7 <gettoken>
cmd = listcmd(cmd, parseline(ps, es));
89e: 8b 45 0c mov 0xc(%ebp),%eax
8a1: 89 44 24 04 mov %eax,0x4(%esp)
8a5: 8b 45 08 mov 0x8(%ebp),%eax
8a8: 89 04 24 mov %eax,(%esp)
8ab: e8 43 ff ff ff call 7f3 <parseline>
8b0: 89 44 24 04 mov %eax,0x4(%esp)
8b4: 8b 45 f4 mov -0xc(%ebp),%eax
8b7: 89 04 24 mov %eax,(%esp)
8ba: e8 51 fc ff ff call 510 <listcmd>
8bf: 89 45 f4 mov %eax,-0xc(%ebp)
}
return cmd;
8c2: 8b 45 f4 mov -0xc(%ebp),%eax
}
8c5: c9 leave
8c6: c3 ret
000008c7 <parsepipe>:
struct cmd*
parsepipe(char **ps, char *es)
{
8c7: 55 push %ebp
8c8: 89 e5 mov %esp,%ebp
8ca: 83 ec 28 sub $0x28,%esp
struct cmd *cmd;
cmd = parseexec(ps, es);
8cd: 8b 45 0c mov 0xc(%ebp),%eax
8d0: 89 44 24 04 mov %eax,0x4(%esp)
8d4: 8b 45 08 mov 0x8(%ebp),%eax
8d7: 89 04 24 mov %eax,(%esp)
8da: e8 68 02 00 00 call b47 <parseexec>
8df: 89 45 f4 mov %eax,-0xc(%ebp)
if(peek(ps, es, "|")){
8e2: c7 44 24 08 16 16 00 movl $0x1616,0x8(%esp)
8e9: 00
8ea: 8b 45 0c mov 0xc(%ebp),%eax
8ed: 89 44 24 04 mov %eax,0x4(%esp)
8f1: 8b 45 08 mov 0x8(%ebp),%eax
8f4: 89 04 24 mov %eax,(%esp)
8f7: e8 f6 fd ff ff call 6f2 <peek>
8fc: 85 c0 test %eax,%eax
8fe: 74 46 je 946 <parsepipe+0x7f>
gettoken(ps, es, 0, 0);
900: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
907: 00
908: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
90f: 00
910: 8b 45 0c mov 0xc(%ebp),%eax
913: 89 44 24 04 mov %eax,0x4(%esp)
917: 8b 45 08 mov 0x8(%ebp),%eax
91a: 89 04 24 mov %eax,(%esp)
91d: e8 85 fc ff ff call 5a7 <gettoken>
cmd = pipecmd(cmd, parsepipe(ps, es));
922: 8b 45 0c mov 0xc(%ebp),%eax
925: 89 44 24 04 mov %eax,0x4(%esp)
929: 8b 45 08 mov 0x8(%ebp),%eax
92c: 89 04 24 mov %eax,(%esp)
92f: e8 93 ff ff ff call 8c7 <parsepipe>
934: 89 44 24 04 mov %eax,0x4(%esp)
938: 8b 45 f4 mov -0xc(%ebp),%eax
93b: 89 04 24 mov %eax,(%esp)
93e: e8 7d fb ff ff call 4c0 <pipecmd>
943: 89 45 f4 mov %eax,-0xc(%ebp)
}
return cmd;
946: 8b 45 f4 mov -0xc(%ebp),%eax
}
949: c9 leave
94a: c3 ret
0000094b <parseredirs>:
struct cmd*
parseredirs(struct cmd *cmd, char **ps, char *es)
{
94b: 55 push %ebp
94c: 89 e5 mov %esp,%ebp
94e: 83 ec 38 sub $0x38,%esp
int tok;
char *q, *eq;
while(peek(ps, es, "<>")){
951: e9 f6 00 00 00 jmp a4c <parseredirs+0x101>
tok = gettoken(ps, es, 0, 0);
956: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
95d: 00
95e: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
965: 00
966: 8b 45 10 mov 0x10(%ebp),%eax
969: 89 44 24 04 mov %eax,0x4(%esp)
96d: 8b 45 0c mov 0xc(%ebp),%eax
970: 89 04 24 mov %eax,(%esp)
973: e8 2f fc ff ff call 5a7 <gettoken>
978: 89 45 f4 mov %eax,-0xc(%ebp)
if(gettoken(ps, es, &q, &eq) != 'a')
97b: 8d 45 ec lea -0x14(%ebp),%eax
97e: 89 44 24 0c mov %eax,0xc(%esp)
982: 8d 45 f0 lea -0x10(%ebp),%eax
985: 89 44 24 08 mov %eax,0x8(%esp)
989: 8b 45 10 mov 0x10(%ebp),%eax
98c: 89 44 24 04 mov %eax,0x4(%esp)
990: 8b 45 0c mov 0xc(%ebp),%eax
993: 89 04 24 mov %eax,(%esp)
996: e8 0c fc ff ff call 5a7 <gettoken>
99b: 83 f8 61 cmp $0x61,%eax
99e: 74 0c je 9ac <parseredirs+0x61>
panic("missing file for redirection");
9a0: c7 04 24 18 16 00 00 movl $0x1618,(%esp)
9a7: e8 20 fa ff ff call 3cc <panic>
switch(tok){
9ac: 8b 45 f4 mov -0xc(%ebp),%eax
9af: 83 f8 3c cmp $0x3c,%eax
9b2: 74 0f je 9c3 <parseredirs+0x78>
9b4: 83 f8 3e cmp $0x3e,%eax
9b7: 74 38 je 9f1 <parseredirs+0xa6>
9b9: 83 f8 2b cmp $0x2b,%eax
9bc: 74 61 je a1f <parseredirs+0xd4>
9be: e9 89 00 00 00 jmp a4c <parseredirs+0x101>
case '<':
cmd = redircmd(cmd, q, eq, O_RDONLY, 0);
9c3: 8b 55 ec mov -0x14(%ebp),%edx
9c6: 8b 45 f0 mov -0x10(%ebp),%eax
9c9: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
9d0: 00
9d1: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
9d8: 00
9d9: 89 54 24 08 mov %edx,0x8(%esp)
9dd: 89 44 24 04 mov %eax,0x4(%esp)
9e1: 8b 45 08 mov 0x8(%ebp),%eax
9e4: 89 04 24 mov %eax,(%esp)
9e7: e8 69 fa ff ff call 455 <redircmd>
9ec: 89 45 08 mov %eax,0x8(%ebp)
break;
9ef: eb 5b jmp a4c <parseredirs+0x101>
case '>':
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
9f1: 8b 55 ec mov -0x14(%ebp),%edx
9f4: 8b 45 f0 mov -0x10(%ebp),%eax
9f7: c7 44 24 10 01 00 00 movl $0x1,0x10(%esp)
9fe: 00
9ff: c7 44 24 0c 01 02 00 movl $0x201,0xc(%esp)
a06: 00
a07: 89 54 24 08 mov %edx,0x8(%esp)
a0b: 89 44 24 04 mov %eax,0x4(%esp)
a0f: 8b 45 08 mov 0x8(%ebp),%eax
a12: 89 04 24 mov %eax,(%esp)
a15: e8 3b fa ff ff call 455 <redircmd>
a1a: 89 45 08 mov %eax,0x8(%ebp)
break;
a1d: eb 2d jmp a4c <parseredirs+0x101>
case '+': // >>
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
a1f: 8b 55 ec mov -0x14(%ebp),%edx
a22: 8b 45 f0 mov -0x10(%ebp),%eax
a25: c7 44 24 10 01 00 00 movl $0x1,0x10(%esp)
a2c: 00
a2d: c7 44 24 0c 01 02 00 movl $0x201,0xc(%esp)
a34: 00
a35: 89 54 24 08 mov %edx,0x8(%esp)
a39: 89 44 24 04 mov %eax,0x4(%esp)
a3d: 8b 45 08 mov 0x8(%ebp),%eax
a40: 89 04 24 mov %eax,(%esp)
a43: e8 0d fa ff ff call 455 <redircmd>
a48: 89 45 08 mov %eax,0x8(%ebp)
break;
a4b: 90 nop
parseredirs(struct cmd *cmd, char **ps, char *es)
{
int tok;
char *q, *eq;
while(peek(ps, es, "<>")){
a4c: c7 44 24 08 35 16 00 movl $0x1635,0x8(%esp)
a53: 00
a54: 8b 45 10 mov 0x10(%ebp),%eax
a57: 89 44 24 04 mov %eax,0x4(%esp)
a5b: 8b 45 0c mov 0xc(%ebp),%eax
a5e: 89 04 24 mov %eax,(%esp)
a61: e8 8c fc ff ff call 6f2 <peek>
a66: 85 c0 test %eax,%eax
a68: 0f 85 e8 fe ff ff jne 956 <parseredirs+0xb>
case '+': // >>
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
break;
}
}
return cmd;
a6e: 8b 45 08 mov 0x8(%ebp),%eax
}
a71: c9 leave
a72: c3 ret
00000a73 <parseblock>:
struct cmd*
parseblock(char **ps, char *es)
{
a73: 55 push %ebp
a74: 89 e5 mov %esp,%ebp
a76: 83 ec 28 sub $0x28,%esp
struct cmd *cmd;
if(!peek(ps, es, "("))
a79: c7 44 24 08 38 16 00 movl $0x1638,0x8(%esp)
a80: 00
a81: 8b 45 0c mov 0xc(%ebp),%eax
a84: 89 44 24 04 mov %eax,0x4(%esp)
a88: 8b 45 08 mov 0x8(%ebp),%eax
a8b: 89 04 24 mov %eax,(%esp)
a8e: e8 5f fc ff ff call 6f2 <peek>
a93: 85 c0 test %eax,%eax
a95: 75 0c jne aa3 <parseblock+0x30>
panic("parseblock");
a97: c7 04 24 3a 16 00 00 movl $0x163a,(%esp)
a9e: e8 29 f9 ff ff call 3cc <panic>
gettoken(ps, es, 0, 0);
aa3: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
aaa: 00
aab: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
ab2: 00
ab3: 8b 45 0c mov 0xc(%ebp),%eax
ab6: 89 44 24 04 mov %eax,0x4(%esp)
aba: 8b 45 08 mov 0x8(%ebp),%eax
abd: 89 04 24 mov %eax,(%esp)
ac0: e8 e2 fa ff ff call 5a7 <gettoken>
cmd = parseline(ps, es);
ac5: 8b 45 0c mov 0xc(%ebp),%eax
ac8: 89 44 24 04 mov %eax,0x4(%esp)
acc: 8b 45 08 mov 0x8(%ebp),%eax
acf: 89 04 24 mov %eax,(%esp)
ad2: e8 1c fd ff ff call 7f3 <parseline>
ad7: 89 45 f4 mov %eax,-0xc(%ebp)
if(!peek(ps, es, ")"))
ada: c7 44 24 08 45 16 00 movl $0x1645,0x8(%esp)
ae1: 00
ae2: 8b 45 0c mov 0xc(%ebp),%eax
ae5: 89 44 24 04 mov %eax,0x4(%esp)
ae9: 8b 45 08 mov 0x8(%ebp),%eax
aec: 89 04 24 mov %eax,(%esp)
aef: e8 fe fb ff ff call 6f2 <peek>
af4: 85 c0 test %eax,%eax
af6: 75 0c jne b04 <parseblock+0x91>
panic("syntax - missing )");
af8: c7 04 24 47 16 00 00 movl $0x1647,(%esp)
aff: e8 c8 f8 ff ff call 3cc <panic>
gettoken(ps, es, 0, 0);
b04: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
b0b: 00
b0c: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
b13: 00
b14: 8b 45 0c mov 0xc(%ebp),%eax
b17: 89 44 24 04 mov %eax,0x4(%esp)
b1b: 8b 45 08 mov 0x8(%ebp),%eax
b1e: 89 04 24 mov %eax,(%esp)
b21: e8 81 fa ff ff call 5a7 <gettoken>
cmd = parseredirs(cmd, ps, es);
b26: 8b 45 0c mov 0xc(%ebp),%eax
b29: 89 44 24 08 mov %eax,0x8(%esp)
b2d: 8b 45 08 mov 0x8(%ebp),%eax
b30: 89 44 24 04 mov %eax,0x4(%esp)
b34: 8b 45 f4 mov -0xc(%ebp),%eax
b37: 89 04 24 mov %eax,(%esp)
b3a: e8 0c fe ff ff call 94b <parseredirs>
b3f: 89 45 f4 mov %eax,-0xc(%ebp)
return cmd;
b42: 8b 45 f4 mov -0xc(%ebp),%eax
}
b45: c9 leave
b46: c3 ret
00000b47 <parseexec>:
struct cmd*
parseexec(char **ps, char *es)
{
b47: 55 push %ebp
b48: 89 e5 mov %esp,%ebp
b4a: 83 ec 38 sub $0x38,%esp
char *q, *eq;
int tok, argc;
struct execcmd *cmd;
struct cmd *ret;
if(peek(ps, es, "("))
b4d: c7 44 24 08 38 16 00 movl $0x1638,0x8(%esp)
b54: 00
b55: 8b 45 0c mov 0xc(%ebp),%eax
b58: 89 44 24 04 mov %eax,0x4(%esp)
b5c: 8b 45 08 mov 0x8(%ebp),%eax
b5f: 89 04 24 mov %eax,(%esp)
b62: e8 8b fb ff ff call 6f2 <peek>
b67: 85 c0 test %eax,%eax
b69: 74 17 je b82 <parseexec+0x3b>
return parseblock(ps, es);
b6b: 8b 45 0c mov 0xc(%ebp),%eax
b6e: 89 44 24 04 mov %eax,0x4(%esp)
b72: 8b 45 08 mov 0x8(%ebp),%eax
b75: 89 04 24 mov %eax,(%esp)
b78: e8 f6 fe ff ff call a73 <parseblock>
b7d: e9 09 01 00 00 jmp c8b <parseexec+0x144>
ret = execcmd();
b82: e8 90 f8 ff ff call 417 <execcmd>
b87: 89 45 f0 mov %eax,-0x10(%ebp)
cmd = (struct execcmd*)ret;
b8a: 8b 45 f0 mov -0x10(%ebp),%eax
b8d: 89 45 ec mov %eax,-0x14(%ebp)
argc = 0;
b90: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
ret = parseredirs(ret, ps, es);
b97: 8b 45 0c mov 0xc(%ebp),%eax
b9a: 89 44 24 08 mov %eax,0x8(%esp)
b9e: 8b 45 08 mov 0x8(%ebp),%eax
ba1: 89 44 24 04 mov %eax,0x4(%esp)
ba5: 8b 45 f0 mov -0x10(%ebp),%eax
ba8: 89 04 24 mov %eax,(%esp)
bab: e8 9b fd ff ff call 94b <parseredirs>
bb0: 89 45 f0 mov %eax,-0x10(%ebp)
while(!peek(ps, es, "|)&;")){
bb3: e9 8f 00 00 00 jmp c47 <parseexec+0x100>
if((tok=gettoken(ps, es, &q, &eq)) == 0)
bb8: 8d 45 e0 lea -0x20(%ebp),%eax
bbb: 89 44 24 0c mov %eax,0xc(%esp)
bbf: 8d 45 e4 lea -0x1c(%ebp),%eax
bc2: 89 44 24 08 mov %eax,0x8(%esp)
bc6: 8b 45 0c mov 0xc(%ebp),%eax
bc9: 89 44 24 04 mov %eax,0x4(%esp)
bcd: 8b 45 08 mov 0x8(%ebp),%eax
bd0: 89 04 24 mov %eax,(%esp)
bd3: e8 cf f9 ff ff call 5a7 <gettoken>
bd8: 89 45 e8 mov %eax,-0x18(%ebp)
bdb: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
bdf: 75 05 jne be6 <parseexec+0x9f>
break;
be1: e9 83 00 00 00 jmp c69 <parseexec+0x122>
if(tok != 'a')
be6: 83 7d e8 61 cmpl $0x61,-0x18(%ebp)
bea: 74 0c je bf8 <parseexec+0xb1>
panic("syntax");
bec: c7 04 24 0b 16 00 00 movl $0x160b,(%esp)
bf3: e8 d4 f7 ff ff call 3cc <panic>
cmd->argv[argc] = q;
bf8: 8b 4d e4 mov -0x1c(%ebp),%ecx
bfb: 8b 45 ec mov -0x14(%ebp),%eax
bfe: 8b 55 f4 mov -0xc(%ebp),%edx
c01: 89 4c 90 04 mov %ecx,0x4(%eax,%edx,4)
cmd->eargv[argc] = eq;
c05: 8b 55 e0 mov -0x20(%ebp),%edx
c08: 8b 45 ec mov -0x14(%ebp),%eax
c0b: 8b 4d f4 mov -0xc(%ebp),%ecx
c0e: 83 c1 08 add $0x8,%ecx
c11: 89 54 88 0c mov %edx,0xc(%eax,%ecx,4)
argc++;
c15: 83 45 f4 01 addl $0x1,-0xc(%ebp)
if(argc >= MAXARGS)
c19: 83 7d f4 09 cmpl $0x9,-0xc(%ebp)
c1d: 7e 0c jle c2b <parseexec+0xe4>
panic("too many args");
c1f: c7 04 24 5a 16 00 00 movl $0x165a,(%esp)
c26: e8 a1 f7 ff ff call 3cc <panic>
ret = parseredirs(ret, ps, es);
c2b: 8b 45 0c mov 0xc(%ebp),%eax
c2e: 89 44 24 08 mov %eax,0x8(%esp)
c32: 8b 45 08 mov 0x8(%ebp),%eax
c35: 89 44 24 04 mov %eax,0x4(%esp)
c39: 8b 45 f0 mov -0x10(%ebp),%eax
c3c: 89 04 24 mov %eax,(%esp)
c3f: e8 07 fd ff ff call 94b <parseredirs>
c44: 89 45 f0 mov %eax,-0x10(%ebp)
ret = execcmd();
cmd = (struct execcmd*)ret;
argc = 0;
ret = parseredirs(ret, ps, es);
while(!peek(ps, es, "|)&;")){
c47: c7 44 24 08 68 16 00 movl $0x1668,0x8(%esp)
c4e: 00
c4f: 8b 45 0c mov 0xc(%ebp),%eax
c52: 89 44 24 04 mov %eax,0x4(%esp)
c56: 8b 45 08 mov 0x8(%ebp),%eax
c59: 89 04 24 mov %eax,(%esp)
c5c: e8 91 fa ff ff call 6f2 <peek>
c61: 85 c0 test %eax,%eax
c63: 0f 84 4f ff ff ff je bb8 <parseexec+0x71>
argc++;
if(argc >= MAXARGS)
panic("too many args");
ret = parseredirs(ret, ps, es);
}
cmd->argv[argc] = 0;
c69: 8b 45 ec mov -0x14(%ebp),%eax
c6c: 8b 55 f4 mov -0xc(%ebp),%edx
c6f: c7 44 90 04 00 00 00 movl $0x0,0x4(%eax,%edx,4)
c76: 00
cmd->eargv[argc] = 0;
c77: 8b 45 ec mov -0x14(%ebp),%eax
c7a: 8b 55 f4 mov -0xc(%ebp),%edx
c7d: 83 c2 08 add $0x8,%edx
c80: c7 44 90 0c 00 00 00 movl $0x0,0xc(%eax,%edx,4)
c87: 00
return ret;
c88: 8b 45 f0 mov -0x10(%ebp),%eax
}
c8b: c9 leave
c8c: c3 ret
00000c8d <nulterminate>:
// NUL-terminate all the counted strings.
struct cmd*
nulterminate(struct cmd *cmd)
{
c8d: 55 push %ebp
c8e: 89 e5 mov %esp,%ebp
c90: 83 ec 38 sub $0x38,%esp
struct execcmd *ecmd;
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
c93: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
c97: 75 0a jne ca3 <nulterminate+0x16>
return 0;
c99: b8 00 00 00 00 mov $0x0,%eax
c9e: e9 c9 00 00 00 jmp d6c <nulterminate+0xdf>
switch(cmd->type){
ca3: 8b 45 08 mov 0x8(%ebp),%eax
ca6: 8b 00 mov (%eax),%eax
ca8: 83 f8 05 cmp $0x5,%eax
cab: 0f 87 b8 00 00 00 ja d69 <nulterminate+0xdc>
cb1: 8b 04 85 70 16 00 00 mov 0x1670(,%eax,4),%eax
cb8: ff e0 jmp *%eax
case EXEC:
ecmd = (struct execcmd*)cmd;
cba: 8b 45 08 mov 0x8(%ebp),%eax
cbd: 89 45 f0 mov %eax,-0x10(%ebp)
for(i=0; ecmd->argv[i]; i++)
cc0: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
cc7: eb 14 jmp cdd <nulterminate+0x50>
*ecmd->eargv[i] = 0;
cc9: 8b 45 f0 mov -0x10(%ebp),%eax
ccc: 8b 55 f4 mov -0xc(%ebp),%edx
ccf: 83 c2 08 add $0x8,%edx
cd2: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax
cd6: c6 00 00 movb $0x0,(%eax)
return 0;
switch(cmd->type){
case EXEC:
ecmd = (struct execcmd*)cmd;
for(i=0; ecmd->argv[i]; i++)
cd9: 83 45 f4 01 addl $0x1,-0xc(%ebp)
cdd: 8b 45 f0 mov -0x10(%ebp),%eax
ce0: 8b 55 f4 mov -0xc(%ebp),%edx
ce3: 8b 44 90 04 mov 0x4(%eax,%edx,4),%eax
ce7: 85 c0 test %eax,%eax
ce9: 75 de jne cc9 <nulterminate+0x3c>
*ecmd->eargv[i] = 0;
break;
ceb: eb 7c jmp d69 <nulterminate+0xdc>
case REDIR:
rcmd = (struct redircmd*)cmd;
ced: 8b 45 08 mov 0x8(%ebp),%eax
cf0: 89 45 ec mov %eax,-0x14(%ebp)
nulterminate(rcmd->cmd);
cf3: 8b 45 ec mov -0x14(%ebp),%eax
cf6: 8b 40 04 mov 0x4(%eax),%eax
cf9: 89 04 24 mov %eax,(%esp)
cfc: e8 8c ff ff ff call c8d <nulterminate>
*rcmd->efile = 0;
d01: 8b 45 ec mov -0x14(%ebp),%eax
d04: 8b 40 0c mov 0xc(%eax),%eax
d07: c6 00 00 movb $0x0,(%eax)
break;
d0a: eb 5d jmp d69 <nulterminate+0xdc>
case PIPE:
pcmd = (struct pipecmd*)cmd;
d0c: 8b 45 08 mov 0x8(%ebp),%eax
d0f: 89 45 e8 mov %eax,-0x18(%ebp)
nulterminate(pcmd->left);
d12: 8b 45 e8 mov -0x18(%ebp),%eax
d15: 8b 40 04 mov 0x4(%eax),%eax
d18: 89 04 24 mov %eax,(%esp)
d1b: e8 6d ff ff ff call c8d <nulterminate>
nulterminate(pcmd->right);
d20: 8b 45 e8 mov -0x18(%ebp),%eax
d23: 8b 40 08 mov 0x8(%eax),%eax
d26: 89 04 24 mov %eax,(%esp)
d29: e8 5f ff ff ff call c8d <nulterminate>
break;
d2e: eb 39 jmp d69 <nulterminate+0xdc>
case LIST:
lcmd = (struct listcmd*)cmd;
d30: 8b 45 08 mov 0x8(%ebp),%eax
d33: 89 45 e4 mov %eax,-0x1c(%ebp)
nulterminate(lcmd->left);
d36: 8b 45 e4 mov -0x1c(%ebp),%eax
d39: 8b 40 04 mov 0x4(%eax),%eax
d3c: 89 04 24 mov %eax,(%esp)
d3f: e8 49 ff ff ff call c8d <nulterminate>
nulterminate(lcmd->right);
d44: 8b 45 e4 mov -0x1c(%ebp),%eax
d47: 8b 40 08 mov 0x8(%eax),%eax
d4a: 89 04 24 mov %eax,(%esp)
d4d: e8 3b ff ff ff call c8d <nulterminate>
break;
d52: eb 15 jmp d69 <nulterminate+0xdc>
case BACK:
bcmd = (struct backcmd*)cmd;
d54: 8b 45 08 mov 0x8(%ebp),%eax
d57: 89 45 e0 mov %eax,-0x20(%ebp)
nulterminate(bcmd->cmd);
d5a: 8b 45 e0 mov -0x20(%ebp),%eax
d5d: 8b 40 04 mov 0x4(%eax),%eax
d60: 89 04 24 mov %eax,(%esp)
d63: e8 25 ff ff ff call c8d <nulterminate>
break;
d68: 90 nop
}
return cmd;
d69: 8b 45 08 mov 0x8(%ebp),%eax
}
d6c: c9 leave
d6d: c3 ret
00000d6e <display_history>:
void display_history(void) {
d6e: 55 push %ebp
d6f: 89 e5 mov %esp,%ebp
d71: 83 ec 28 sub $0x28,%esp
static char buff[100];
int index = 0;
d74: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
while(history(buff, index++) == 0)
d7b: eb 23 jmp da0 <display_history+0x32>
printf(1,"%d: %s \n", index, buff);
d7d: c7 44 24 0c 00 1c 00 movl $0x1c00,0xc(%esp)
d84: 00
d85: 8b 45 f4 mov -0xc(%ebp),%eax
d88: 89 44 24 08 mov %eax,0x8(%esp)
d8c: c7 44 24 04 88 16 00 movl $0x1688,0x4(%esp)
d93: 00
d94: c7 04 24 01 00 00 00 movl $0x1,(%esp)
d9b: e8 1f 04 00 00 call 11bf <printf>
void display_history(void) {
static char buff[100];
int index = 0;
while(history(buff, index++) == 0)
da0: 8b 45 f4 mov -0xc(%ebp),%eax
da3: 8d 50 01 lea 0x1(%eax),%edx
da6: 89 55 f4 mov %edx,-0xc(%ebp)
da9: 89 44 24 04 mov %eax,0x4(%esp)
dad: c7 04 24 00 1c 00 00 movl $0x1c00,(%esp)
db4: e8 0e 03 00 00 call 10c7 <history>
db9: 85 c0 test %eax,%eax
dbb: 74 c0 je d7d <display_history+0xf>
printf(1,"%d: %s \n", index, buff);
}
dbd: c9 leave
dbe: c3 ret
00000dbf <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
dbf: 55 push %ebp
dc0: 89 e5 mov %esp,%ebp
dc2: 57 push %edi
dc3: 53 push %ebx
asm volatile("cld; rep stosb" :
dc4: 8b 4d 08 mov 0x8(%ebp),%ecx
dc7: 8b 55 10 mov 0x10(%ebp),%edx
dca: 8b 45 0c mov 0xc(%ebp),%eax
dcd: 89 cb mov %ecx,%ebx
dcf: 89 df mov %ebx,%edi
dd1: 89 d1 mov %edx,%ecx
dd3: fc cld
dd4: f3 aa rep stos %al,%es:(%edi)
dd6: 89 ca mov %ecx,%edx
dd8: 89 fb mov %edi,%ebx
dda: 89 5d 08 mov %ebx,0x8(%ebp)
ddd: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
de0: 5b pop %ebx
de1: 5f pop %edi
de2: 5d pop %ebp
de3: c3 ret
00000de4 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
de4: 55 push %ebp
de5: 89 e5 mov %esp,%ebp
de7: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
dea: 8b 45 08 mov 0x8(%ebp),%eax
ded: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
df0: 90 nop
df1: 8b 45 08 mov 0x8(%ebp),%eax
df4: 8d 50 01 lea 0x1(%eax),%edx
df7: 89 55 08 mov %edx,0x8(%ebp)
dfa: 8b 55 0c mov 0xc(%ebp),%edx
dfd: 8d 4a 01 lea 0x1(%edx),%ecx
e00: 89 4d 0c mov %ecx,0xc(%ebp)
e03: 0f b6 12 movzbl (%edx),%edx
e06: 88 10 mov %dl,(%eax)
e08: 0f b6 00 movzbl (%eax),%eax
e0b: 84 c0 test %al,%al
e0d: 75 e2 jne df1 <strcpy+0xd>
;
return os;
e0f: 8b 45 fc mov -0x4(%ebp),%eax
}
e12: c9 leave
e13: c3 ret
00000e14 <strcmp>:
int
strcmp(const char *p, const char *q)
{
e14: 55 push %ebp
e15: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
e17: eb 08 jmp e21 <strcmp+0xd>
p++, q++;
e19: 83 45 08 01 addl $0x1,0x8(%ebp)
e1d: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
e21: 8b 45 08 mov 0x8(%ebp),%eax
e24: 0f b6 00 movzbl (%eax),%eax
e27: 84 c0 test %al,%al
e29: 74 10 je e3b <strcmp+0x27>
e2b: 8b 45 08 mov 0x8(%ebp),%eax
e2e: 0f b6 10 movzbl (%eax),%edx
e31: 8b 45 0c mov 0xc(%ebp),%eax
e34: 0f b6 00 movzbl (%eax),%eax
e37: 38 c2 cmp %al,%dl
e39: 74 de je e19 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
e3b: 8b 45 08 mov 0x8(%ebp),%eax
e3e: 0f b6 00 movzbl (%eax),%eax
e41: 0f b6 d0 movzbl %al,%edx
e44: 8b 45 0c mov 0xc(%ebp),%eax
e47: 0f b6 00 movzbl (%eax),%eax
e4a: 0f b6 c0 movzbl %al,%eax
e4d: 29 c2 sub %eax,%edx
e4f: 89 d0 mov %edx,%eax
}
e51: 5d pop %ebp
e52: c3 ret
00000e53 <strlen>:
uint
strlen(char *s)
{
e53: 55 push %ebp
e54: 89 e5 mov %esp,%ebp
e56: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
e59: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
e60: eb 04 jmp e66 <strlen+0x13>
e62: 83 45 fc 01 addl $0x1,-0x4(%ebp)
e66: 8b 55 fc mov -0x4(%ebp),%edx
e69: 8b 45 08 mov 0x8(%ebp),%eax
e6c: 01 d0 add %edx,%eax
e6e: 0f b6 00 movzbl (%eax),%eax
e71: 84 c0 test %al,%al
e73: 75 ed jne e62 <strlen+0xf>
;
return n;
e75: 8b 45 fc mov -0x4(%ebp),%eax
}
e78: c9 leave
e79: c3 ret
00000e7a <memset>:
void*
memset(void *dst, int c, uint n)
{
e7a: 55 push %ebp
e7b: 89 e5 mov %esp,%ebp
e7d: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
e80: 8b 45 10 mov 0x10(%ebp),%eax
e83: 89 44 24 08 mov %eax,0x8(%esp)
e87: 8b 45 0c mov 0xc(%ebp),%eax
e8a: 89 44 24 04 mov %eax,0x4(%esp)
e8e: 8b 45 08 mov 0x8(%ebp),%eax
e91: 89 04 24 mov %eax,(%esp)
e94: e8 26 ff ff ff call dbf <stosb>
return dst;
e99: 8b 45 08 mov 0x8(%ebp),%eax
}
e9c: c9 leave
e9d: c3 ret
00000e9e <strchr>:
char*
strchr(const char *s, char c)
{
e9e: 55 push %ebp
e9f: 89 e5 mov %esp,%ebp
ea1: 83 ec 04 sub $0x4,%esp
ea4: 8b 45 0c mov 0xc(%ebp),%eax
ea7: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
eaa: eb 14 jmp ec0 <strchr+0x22>
if(*s == c)
eac: 8b 45 08 mov 0x8(%ebp),%eax
eaf: 0f b6 00 movzbl (%eax),%eax
eb2: 3a 45 fc cmp -0x4(%ebp),%al
eb5: 75 05 jne ebc <strchr+0x1e>
return (char*)s;
eb7: 8b 45 08 mov 0x8(%ebp),%eax
eba: eb 13 jmp ecf <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
ebc: 83 45 08 01 addl $0x1,0x8(%ebp)
ec0: 8b 45 08 mov 0x8(%ebp),%eax
ec3: 0f b6 00 movzbl (%eax),%eax
ec6: 84 c0 test %al,%al
ec8: 75 e2 jne eac <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
eca: b8 00 00 00 00 mov $0x0,%eax
}
ecf: c9 leave
ed0: c3 ret
00000ed1 <gets>:
char*
gets(char *buf, int max)
{
ed1: 55 push %ebp
ed2: 89 e5 mov %esp,%ebp
ed4: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
ed7: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
ede: eb 4c jmp f2c <gets+0x5b>
cc = read(0, &c, 1);
ee0: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
ee7: 00
ee8: 8d 45 ef lea -0x11(%ebp),%eax
eeb: 89 44 24 04 mov %eax,0x4(%esp)
eef: c7 04 24 00 00 00 00 movl $0x0,(%esp)
ef6: e8 44 01 00 00 call 103f <read>
efb: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
efe: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
f02: 7f 02 jg f06 <gets+0x35>
break;
f04: eb 31 jmp f37 <gets+0x66>
buf[i++] = c;
f06: 8b 45 f4 mov -0xc(%ebp),%eax
f09: 8d 50 01 lea 0x1(%eax),%edx
f0c: 89 55 f4 mov %edx,-0xc(%ebp)
f0f: 89 c2 mov %eax,%edx
f11: 8b 45 08 mov 0x8(%ebp),%eax
f14: 01 c2 add %eax,%edx
f16: 0f b6 45 ef movzbl -0x11(%ebp),%eax
f1a: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
f1c: 0f b6 45 ef movzbl -0x11(%ebp),%eax
f20: 3c 0a cmp $0xa,%al
f22: 74 13 je f37 <gets+0x66>
f24: 0f b6 45 ef movzbl -0x11(%ebp),%eax
f28: 3c 0d cmp $0xd,%al
f2a: 74 0b je f37 <gets+0x66>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
f2c: 8b 45 f4 mov -0xc(%ebp),%eax
f2f: 83 c0 01 add $0x1,%eax
f32: 3b 45 0c cmp 0xc(%ebp),%eax
f35: 7c a9 jl ee0 <gets+0xf>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
f37: 8b 55 f4 mov -0xc(%ebp),%edx
f3a: 8b 45 08 mov 0x8(%ebp),%eax
f3d: 01 d0 add %edx,%eax
f3f: c6 00 00 movb $0x0,(%eax)
return buf;
f42: 8b 45 08 mov 0x8(%ebp),%eax
}
f45: c9 leave
f46: c3 ret
00000f47 <stat>:
int
stat(char *n, struct stat *st)
{
f47: 55 push %ebp
f48: 89 e5 mov %esp,%ebp
f4a: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
f4d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
f54: 00
f55: 8b 45 08 mov 0x8(%ebp),%eax
f58: 89 04 24 mov %eax,(%esp)
f5b: e8 07 01 00 00 call 1067 <open>
f60: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
f63: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
f67: 79 07 jns f70 <stat+0x29>
return -1;
f69: b8 ff ff ff ff mov $0xffffffff,%eax
f6e: eb 23 jmp f93 <stat+0x4c>
r = fstat(fd, st);
f70: 8b 45 0c mov 0xc(%ebp),%eax
f73: 89 44 24 04 mov %eax,0x4(%esp)
f77: 8b 45 f4 mov -0xc(%ebp),%eax
f7a: 89 04 24 mov %eax,(%esp)
f7d: e8 fd 00 00 00 call 107f <fstat>
f82: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
f85: 8b 45 f4 mov -0xc(%ebp),%eax
f88: 89 04 24 mov %eax,(%esp)
f8b: e8 bf 00 00 00 call 104f <close>
return r;
f90: 8b 45 f0 mov -0x10(%ebp),%eax
}
f93: c9 leave
f94: c3 ret
00000f95 <atoi>:
int
atoi(const char *s)
{
f95: 55 push %ebp
f96: 89 e5 mov %esp,%ebp
f98: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
f9b: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
fa2: eb 25 jmp fc9 <atoi+0x34>
n = n*10 + *s++ - '0';
fa4: 8b 55 fc mov -0x4(%ebp),%edx
fa7: 89 d0 mov %edx,%eax
fa9: c1 e0 02 shl $0x2,%eax
fac: 01 d0 add %edx,%eax
fae: 01 c0 add %eax,%eax
fb0: 89 c1 mov %eax,%ecx
fb2: 8b 45 08 mov 0x8(%ebp),%eax
fb5: 8d 50 01 lea 0x1(%eax),%edx
fb8: 89 55 08 mov %edx,0x8(%ebp)
fbb: 0f b6 00 movzbl (%eax),%eax
fbe: 0f be c0 movsbl %al,%eax
fc1: 01 c8 add %ecx,%eax
fc3: 83 e8 30 sub $0x30,%eax
fc6: 89 45 fc mov %eax,-0x4(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
fc9: 8b 45 08 mov 0x8(%ebp),%eax
fcc: 0f b6 00 movzbl (%eax),%eax
fcf: 3c 2f cmp $0x2f,%al
fd1: 7e 0a jle fdd <atoi+0x48>
fd3: 8b 45 08 mov 0x8(%ebp),%eax
fd6: 0f b6 00 movzbl (%eax),%eax
fd9: 3c 39 cmp $0x39,%al
fdb: 7e c7 jle fa4 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
fdd: 8b 45 fc mov -0x4(%ebp),%eax
}
fe0: c9 leave
fe1: c3 ret
00000fe2 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
fe2: 55 push %ebp
fe3: 89 e5 mov %esp,%ebp
fe5: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
fe8: 8b 45 08 mov 0x8(%ebp),%eax
feb: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
fee: 8b 45 0c mov 0xc(%ebp),%eax
ff1: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
ff4: eb 17 jmp 100d <memmove+0x2b>
*dst++ = *src++;
ff6: 8b 45 fc mov -0x4(%ebp),%eax
ff9: 8d 50 01 lea 0x1(%eax),%edx
ffc: 89 55 fc mov %edx,-0x4(%ebp)
fff: 8b 55 f8 mov -0x8(%ebp),%edx
1002: 8d 4a 01 lea 0x1(%edx),%ecx
1005: 89 4d f8 mov %ecx,-0x8(%ebp)
1008: 0f b6 12 movzbl (%edx),%edx
100b: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
100d: 8b 45 10 mov 0x10(%ebp),%eax
1010: 8d 50 ff lea -0x1(%eax),%edx
1013: 89 55 10 mov %edx,0x10(%ebp)
1016: 85 c0 test %eax,%eax
1018: 7f dc jg ff6 <memmove+0x14>
*dst++ = *src++;
return vdst;
101a: 8b 45 08 mov 0x8(%ebp),%eax
}
101d: c9 leave
101e: c3 ret
0000101f <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
101f: b8 01 00 00 00 mov $0x1,%eax
1024: cd 40 int $0x40
1026: c3 ret
00001027 <exit>:
SYSCALL(exit)
1027: b8 02 00 00 00 mov $0x2,%eax
102c: cd 40 int $0x40
102e: c3 ret
0000102f <wait>:
SYSCALL(wait)
102f: b8 03 00 00 00 mov $0x3,%eax
1034: cd 40 int $0x40
1036: c3 ret
00001037 <pipe>:
SYSCALL(pipe)
1037: b8 04 00 00 00 mov $0x4,%eax
103c: cd 40 int $0x40
103e: c3 ret
0000103f <read>:
SYSCALL(read)
103f: b8 05 00 00 00 mov $0x5,%eax
1044: cd 40 int $0x40
1046: c3 ret
00001047 <write>:
SYSCALL(write)
1047: b8 10 00 00 00 mov $0x10,%eax
104c: cd 40 int $0x40
104e: c3 ret
0000104f <close>:
SYSCALL(close)
104f: b8 15 00 00 00 mov $0x15,%eax
1054: cd 40 int $0x40
1056: c3 ret
00001057 <kill>:
SYSCALL(kill)
1057: b8 06 00 00 00 mov $0x6,%eax
105c: cd 40 int $0x40
105e: c3 ret
0000105f <exec>:
SYSCALL(exec)
105f: b8 07 00 00 00 mov $0x7,%eax
1064: cd 40 int $0x40
1066: c3 ret
00001067 <open>:
SYSCALL(open)
1067: b8 0f 00 00 00 mov $0xf,%eax
106c: cd 40 int $0x40
106e: c3 ret
0000106f <mknod>:
SYSCALL(mknod)
106f: b8 11 00 00 00 mov $0x11,%eax
1074: cd 40 int $0x40
1076: c3 ret
00001077 <unlink>:
SYSCALL(unlink)
1077: b8 12 00 00 00 mov $0x12,%eax
107c: cd 40 int $0x40
107e: c3 ret
0000107f <fstat>:
SYSCALL(fstat)
107f: b8 08 00 00 00 mov $0x8,%eax
1084: cd 40 int $0x40
1086: c3 ret
00001087 <link>:
SYSCALL(link)
1087: b8 13 00 00 00 mov $0x13,%eax
108c: cd 40 int $0x40
108e: c3 ret
0000108f <mkdir>:
SYSCALL(mkdir)
108f: b8 14 00 00 00 mov $0x14,%eax
1094: cd 40 int $0x40
1096: c3 ret
00001097 <chdir>:
SYSCALL(chdir)
1097: b8 09 00 00 00 mov $0x9,%eax
109c: cd 40 int $0x40
109e: c3 ret
0000109f <dup>:
SYSCALL(dup)
109f: b8 0a 00 00 00 mov $0xa,%eax
10a4: cd 40 int $0x40
10a6: c3 ret
000010a7 <getpid>:
SYSCALL(getpid)
10a7: b8 0b 00 00 00 mov $0xb,%eax
10ac: cd 40 int $0x40
10ae: c3 ret
000010af <sbrk>:
SYSCALL(sbrk)
10af: b8 0c 00 00 00 mov $0xc,%eax
10b4: cd 40 int $0x40
10b6: c3 ret
000010b7 <sleep>:
SYSCALL(sleep)
10b7: b8 0d 00 00 00 mov $0xd,%eax
10bc: cd 40 int $0x40
10be: c3 ret
000010bf <uptime>:
SYSCALL(uptime)
10bf: b8 0e 00 00 00 mov $0xe,%eax
10c4: cd 40 int $0x40
10c6: c3 ret
000010c7 <history>:
SYSCALL(history)
10c7: b8 16 00 00 00 mov $0x16,%eax
10cc: cd 40 int $0x40
10ce: c3 ret
000010cf <wait2>:
SYSCALL(wait2)
10cf: b8 17 00 00 00 mov $0x17,%eax
10d4: cd 40 int $0x40
10d6: c3 ret
000010d7 <set_prio>:
SYSCALL(set_prio)
10d7: b8 18 00 00 00 mov $0x18,%eax
10dc: cd 40 int $0x40
10de: c3 ret
000010df <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
10df: 55 push %ebp
10e0: 89 e5 mov %esp,%ebp
10e2: 83 ec 18 sub $0x18,%esp
10e5: 8b 45 0c mov 0xc(%ebp),%eax
10e8: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
10eb: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10f2: 00
10f3: 8d 45 f4 lea -0xc(%ebp),%eax
10f6: 89 44 24 04 mov %eax,0x4(%esp)
10fa: 8b 45 08 mov 0x8(%ebp),%eax
10fd: 89 04 24 mov %eax,(%esp)
1100: e8 42 ff ff ff call 1047 <write>
}
1105: c9 leave
1106: c3 ret
00001107 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
1107: 55 push %ebp
1108: 89 e5 mov %esp,%ebp
110a: 56 push %esi
110b: 53 push %ebx
110c: 83 ec 30 sub $0x30,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
110f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
1116: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
111a: 74 17 je 1133 <printint+0x2c>
111c: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
1120: 79 11 jns 1133 <printint+0x2c>
neg = 1;
1122: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
1129: 8b 45 0c mov 0xc(%ebp),%eax
112c: f7 d8 neg %eax
112e: 89 45 ec mov %eax,-0x14(%ebp)
1131: eb 06 jmp 1139 <printint+0x32>
} else {
x = xx;
1133: 8b 45 0c mov 0xc(%ebp),%eax
1136: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
1139: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
1140: 8b 4d f4 mov -0xc(%ebp),%ecx
1143: 8d 41 01 lea 0x1(%ecx),%eax
1146: 89 45 f4 mov %eax,-0xc(%ebp)
1149: 8b 5d 10 mov 0x10(%ebp),%ebx
114c: 8b 45 ec mov -0x14(%ebp),%eax
114f: ba 00 00 00 00 mov $0x0,%edx
1154: f7 f3 div %ebx
1156: 89 d0 mov %edx,%eax
1158: 0f b6 80 66 1b 00 00 movzbl 0x1b66(%eax),%eax
115f: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
1163: 8b 75 10 mov 0x10(%ebp),%esi
1166: 8b 45 ec mov -0x14(%ebp),%eax
1169: ba 00 00 00 00 mov $0x0,%edx
116e: f7 f6 div %esi
1170: 89 45 ec mov %eax,-0x14(%ebp)
1173: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1177: 75 c7 jne 1140 <printint+0x39>
if(neg)
1179: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
117d: 74 10 je 118f <printint+0x88>
buf[i++] = '-';
117f: 8b 45 f4 mov -0xc(%ebp),%eax
1182: 8d 50 01 lea 0x1(%eax),%edx
1185: 89 55 f4 mov %edx,-0xc(%ebp)
1188: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
118d: eb 1f jmp 11ae <printint+0xa7>
118f: eb 1d jmp 11ae <printint+0xa7>
putc(fd, buf[i]);
1191: 8d 55 dc lea -0x24(%ebp),%edx
1194: 8b 45 f4 mov -0xc(%ebp),%eax
1197: 01 d0 add %edx,%eax
1199: 0f b6 00 movzbl (%eax),%eax
119c: 0f be c0 movsbl %al,%eax
119f: 89 44 24 04 mov %eax,0x4(%esp)
11a3: 8b 45 08 mov 0x8(%ebp),%eax
11a6: 89 04 24 mov %eax,(%esp)
11a9: e8 31 ff ff ff call 10df <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
11ae: 83 6d f4 01 subl $0x1,-0xc(%ebp)
11b2: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
11b6: 79 d9 jns 1191 <printint+0x8a>
putc(fd, buf[i]);
}
11b8: 83 c4 30 add $0x30,%esp
11bb: 5b pop %ebx
11bc: 5e pop %esi
11bd: 5d pop %ebp
11be: c3 ret
000011bf <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
11bf: 55 push %ebp
11c0: 89 e5 mov %esp,%ebp
11c2: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
11c5: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
11cc: 8d 45 0c lea 0xc(%ebp),%eax
11cf: 83 c0 04 add $0x4,%eax
11d2: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
11d5: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
11dc: e9 7c 01 00 00 jmp 135d <printf+0x19e>
c = fmt[i] & 0xff;
11e1: 8b 55 0c mov 0xc(%ebp),%edx
11e4: 8b 45 f0 mov -0x10(%ebp),%eax
11e7: 01 d0 add %edx,%eax
11e9: 0f b6 00 movzbl (%eax),%eax
11ec: 0f be c0 movsbl %al,%eax
11ef: 25 ff 00 00 00 and $0xff,%eax
11f4: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
11f7: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
11fb: 75 2c jne 1229 <printf+0x6a>
if(c == '%'){
11fd: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
1201: 75 0c jne 120f <printf+0x50>
state = '%';
1203: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
120a: e9 4a 01 00 00 jmp 1359 <printf+0x19a>
} else {
putc(fd, c);
120f: 8b 45 e4 mov -0x1c(%ebp),%eax
1212: 0f be c0 movsbl %al,%eax
1215: 89 44 24 04 mov %eax,0x4(%esp)
1219: 8b 45 08 mov 0x8(%ebp),%eax
121c: 89 04 24 mov %eax,(%esp)
121f: e8 bb fe ff ff call 10df <putc>
1224: e9 30 01 00 00 jmp 1359 <printf+0x19a>
}
} else if(state == '%'){
1229: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
122d: 0f 85 26 01 00 00 jne 1359 <printf+0x19a>
if(c == 'd'){
1233: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
1237: 75 2d jne 1266 <printf+0xa7>
printint(fd, *ap, 10, 1);
1239: 8b 45 e8 mov -0x18(%ebp),%eax
123c: 8b 00 mov (%eax),%eax
123e: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
1245: 00
1246: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
124d: 00
124e: 89 44 24 04 mov %eax,0x4(%esp)
1252: 8b 45 08 mov 0x8(%ebp),%eax
1255: 89 04 24 mov %eax,(%esp)
1258: e8 aa fe ff ff call 1107 <printint>
ap++;
125d: 83 45 e8 04 addl $0x4,-0x18(%ebp)
1261: e9 ec 00 00 00 jmp 1352 <printf+0x193>
} else if(c == 'x' || c == 'p'){
1266: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
126a: 74 06 je 1272 <printf+0xb3>
126c: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
1270: 75 2d jne 129f <printf+0xe0>
printint(fd, *ap, 16, 0);
1272: 8b 45 e8 mov -0x18(%ebp),%eax
1275: 8b 00 mov (%eax),%eax
1277: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
127e: 00
127f: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
1286: 00
1287: 89 44 24 04 mov %eax,0x4(%esp)
128b: 8b 45 08 mov 0x8(%ebp),%eax
128e: 89 04 24 mov %eax,(%esp)
1291: e8 71 fe ff ff call 1107 <printint>
ap++;
1296: 83 45 e8 04 addl $0x4,-0x18(%ebp)
129a: e9 b3 00 00 00 jmp 1352 <printf+0x193>
} else if(c == 's'){
129f: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
12a3: 75 45 jne 12ea <printf+0x12b>
s = (char*)*ap;
12a5: 8b 45 e8 mov -0x18(%ebp),%eax
12a8: 8b 00 mov (%eax),%eax
12aa: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
12ad: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
12b1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
12b5: 75 09 jne 12c0 <printf+0x101>
s = "(null)";
12b7: c7 45 f4 91 16 00 00 movl $0x1691,-0xc(%ebp)
while(*s != 0){
12be: eb 1e jmp 12de <printf+0x11f>
12c0: eb 1c jmp 12de <printf+0x11f>
putc(fd, *s);
12c2: 8b 45 f4 mov -0xc(%ebp),%eax
12c5: 0f b6 00 movzbl (%eax),%eax
12c8: 0f be c0 movsbl %al,%eax
12cb: 89 44 24 04 mov %eax,0x4(%esp)
12cf: 8b 45 08 mov 0x8(%ebp),%eax
12d2: 89 04 24 mov %eax,(%esp)
12d5: e8 05 fe ff ff call 10df <putc>
s++;
12da: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
12de: 8b 45 f4 mov -0xc(%ebp),%eax
12e1: 0f b6 00 movzbl (%eax),%eax
12e4: 84 c0 test %al,%al
12e6: 75 da jne 12c2 <printf+0x103>
12e8: eb 68 jmp 1352 <printf+0x193>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
12ea: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
12ee: 75 1d jne 130d <printf+0x14e>
putc(fd, *ap);
12f0: 8b 45 e8 mov -0x18(%ebp),%eax
12f3: 8b 00 mov (%eax),%eax
12f5: 0f be c0 movsbl %al,%eax
12f8: 89 44 24 04 mov %eax,0x4(%esp)
12fc: 8b 45 08 mov 0x8(%ebp),%eax
12ff: 89 04 24 mov %eax,(%esp)
1302: e8 d8 fd ff ff call 10df <putc>
ap++;
1307: 83 45 e8 04 addl $0x4,-0x18(%ebp)
130b: eb 45 jmp 1352 <printf+0x193>
} else if(c == '%'){
130d: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
1311: 75 17 jne 132a <printf+0x16b>
putc(fd, c);
1313: 8b 45 e4 mov -0x1c(%ebp),%eax
1316: 0f be c0 movsbl %al,%eax
1319: 89 44 24 04 mov %eax,0x4(%esp)
131d: 8b 45 08 mov 0x8(%ebp),%eax
1320: 89 04 24 mov %eax,(%esp)
1323: e8 b7 fd ff ff call 10df <putc>
1328: eb 28 jmp 1352 <printf+0x193>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
132a: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
1331: 00
1332: 8b 45 08 mov 0x8(%ebp),%eax
1335: 89 04 24 mov %eax,(%esp)
1338: e8 a2 fd ff ff call 10df <putc>
putc(fd, c);
133d: 8b 45 e4 mov -0x1c(%ebp),%eax
1340: 0f be c0 movsbl %al,%eax
1343: 89 44 24 04 mov %eax,0x4(%esp)
1347: 8b 45 08 mov 0x8(%ebp),%eax
134a: 89 04 24 mov %eax,(%esp)
134d: e8 8d fd ff ff call 10df <putc>
}
state = 0;
1352: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
1359: 83 45 f0 01 addl $0x1,-0x10(%ebp)
135d: 8b 55 0c mov 0xc(%ebp),%edx
1360: 8b 45 f0 mov -0x10(%ebp),%eax
1363: 01 d0 add %edx,%eax
1365: 0f b6 00 movzbl (%eax),%eax
1368: 84 c0 test %al,%al
136a: 0f 85 71 fe ff ff jne 11e1 <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
1370: c9 leave
1371: c3 ret
00001372 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
1372: 55 push %ebp
1373: 89 e5 mov %esp,%ebp
1375: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
1378: 8b 45 08 mov 0x8(%ebp),%eax
137b: 83 e8 08 sub $0x8,%eax
137e: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
1381: a1 6c 1c 00 00 mov 0x1c6c,%eax
1386: 89 45 fc mov %eax,-0x4(%ebp)
1389: eb 24 jmp 13af <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
138b: 8b 45 fc mov -0x4(%ebp),%eax
138e: 8b 00 mov (%eax),%eax
1390: 3b 45 fc cmp -0x4(%ebp),%eax
1393: 77 12 ja 13a7 <free+0x35>
1395: 8b 45 f8 mov -0x8(%ebp),%eax
1398: 3b 45 fc cmp -0x4(%ebp),%eax
139b: 77 24 ja 13c1 <free+0x4f>
139d: 8b 45 fc mov -0x4(%ebp),%eax
13a0: 8b 00 mov (%eax),%eax
13a2: 3b 45 f8 cmp -0x8(%ebp),%eax
13a5: 77 1a ja 13c1 <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
13a7: 8b 45 fc mov -0x4(%ebp),%eax
13aa: 8b 00 mov (%eax),%eax
13ac: 89 45 fc mov %eax,-0x4(%ebp)
13af: 8b 45 f8 mov -0x8(%ebp),%eax
13b2: 3b 45 fc cmp -0x4(%ebp),%eax
13b5: 76 d4 jbe 138b <free+0x19>
13b7: 8b 45 fc mov -0x4(%ebp),%eax
13ba: 8b 00 mov (%eax),%eax
13bc: 3b 45 f8 cmp -0x8(%ebp),%eax
13bf: 76 ca jbe 138b <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
13c1: 8b 45 f8 mov -0x8(%ebp),%eax
13c4: 8b 40 04 mov 0x4(%eax),%eax
13c7: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
13ce: 8b 45 f8 mov -0x8(%ebp),%eax
13d1: 01 c2 add %eax,%edx
13d3: 8b 45 fc mov -0x4(%ebp),%eax
13d6: 8b 00 mov (%eax),%eax
13d8: 39 c2 cmp %eax,%edx
13da: 75 24 jne 1400 <free+0x8e>
bp->s.size += p->s.ptr->s.size;
13dc: 8b 45 f8 mov -0x8(%ebp),%eax
13df: 8b 50 04 mov 0x4(%eax),%edx
13e2: 8b 45 fc mov -0x4(%ebp),%eax
13e5: 8b 00 mov (%eax),%eax
13e7: 8b 40 04 mov 0x4(%eax),%eax
13ea: 01 c2 add %eax,%edx
13ec: 8b 45 f8 mov -0x8(%ebp),%eax
13ef: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
13f2: 8b 45 fc mov -0x4(%ebp),%eax
13f5: 8b 00 mov (%eax),%eax
13f7: 8b 10 mov (%eax),%edx
13f9: 8b 45 f8 mov -0x8(%ebp),%eax
13fc: 89 10 mov %edx,(%eax)
13fe: eb 0a jmp 140a <free+0x98>
} else
bp->s.ptr = p->s.ptr;
1400: 8b 45 fc mov -0x4(%ebp),%eax
1403: 8b 10 mov (%eax),%edx
1405: 8b 45 f8 mov -0x8(%ebp),%eax
1408: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
140a: 8b 45 fc mov -0x4(%ebp),%eax
140d: 8b 40 04 mov 0x4(%eax),%eax
1410: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
1417: 8b 45 fc mov -0x4(%ebp),%eax
141a: 01 d0 add %edx,%eax
141c: 3b 45 f8 cmp -0x8(%ebp),%eax
141f: 75 20 jne 1441 <free+0xcf>
p->s.size += bp->s.size;
1421: 8b 45 fc mov -0x4(%ebp),%eax
1424: 8b 50 04 mov 0x4(%eax),%edx
1427: 8b 45 f8 mov -0x8(%ebp),%eax
142a: 8b 40 04 mov 0x4(%eax),%eax
142d: 01 c2 add %eax,%edx
142f: 8b 45 fc mov -0x4(%ebp),%eax
1432: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
1435: 8b 45 f8 mov -0x8(%ebp),%eax
1438: 8b 10 mov (%eax),%edx
143a: 8b 45 fc mov -0x4(%ebp),%eax
143d: 89 10 mov %edx,(%eax)
143f: eb 08 jmp 1449 <free+0xd7>
} else
p->s.ptr = bp;
1441: 8b 45 fc mov -0x4(%ebp),%eax
1444: 8b 55 f8 mov -0x8(%ebp),%edx
1447: 89 10 mov %edx,(%eax)
freep = p;
1449: 8b 45 fc mov -0x4(%ebp),%eax
144c: a3 6c 1c 00 00 mov %eax,0x1c6c
}
1451: c9 leave
1452: c3 ret
00001453 <morecore>:
static Header*
morecore(uint nu)
{
1453: 55 push %ebp
1454: 89 e5 mov %esp,%ebp
1456: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
1459: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
1460: 77 07 ja 1469 <morecore+0x16>
nu = 4096;
1462: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
1469: 8b 45 08 mov 0x8(%ebp),%eax
146c: c1 e0 03 shl $0x3,%eax
146f: 89 04 24 mov %eax,(%esp)
1472: e8 38 fc ff ff call 10af <sbrk>
1477: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
147a: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
147e: 75 07 jne 1487 <morecore+0x34>
return 0;
1480: b8 00 00 00 00 mov $0x0,%eax
1485: eb 22 jmp 14a9 <morecore+0x56>
hp = (Header*)p;
1487: 8b 45 f4 mov -0xc(%ebp),%eax
148a: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
148d: 8b 45 f0 mov -0x10(%ebp),%eax
1490: 8b 55 08 mov 0x8(%ebp),%edx
1493: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
1496: 8b 45 f0 mov -0x10(%ebp),%eax
1499: 83 c0 08 add $0x8,%eax
149c: 89 04 24 mov %eax,(%esp)
149f: e8 ce fe ff ff call 1372 <free>
return freep;
14a4: a1 6c 1c 00 00 mov 0x1c6c,%eax
}
14a9: c9 leave
14aa: c3 ret
000014ab <malloc>:
void*
malloc(uint nbytes)
{
14ab: 55 push %ebp
14ac: 89 e5 mov %esp,%ebp
14ae: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
14b1: 8b 45 08 mov 0x8(%ebp),%eax
14b4: 83 c0 07 add $0x7,%eax
14b7: c1 e8 03 shr $0x3,%eax
14ba: 83 c0 01 add $0x1,%eax
14bd: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
14c0: a1 6c 1c 00 00 mov 0x1c6c,%eax
14c5: 89 45 f0 mov %eax,-0x10(%ebp)
14c8: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
14cc: 75 23 jne 14f1 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
14ce: c7 45 f0 64 1c 00 00 movl $0x1c64,-0x10(%ebp)
14d5: 8b 45 f0 mov -0x10(%ebp),%eax
14d8: a3 6c 1c 00 00 mov %eax,0x1c6c
14dd: a1 6c 1c 00 00 mov 0x1c6c,%eax
14e2: a3 64 1c 00 00 mov %eax,0x1c64
base.s.size = 0;
14e7: c7 05 68 1c 00 00 00 movl $0x0,0x1c68
14ee: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
14f1: 8b 45 f0 mov -0x10(%ebp),%eax
14f4: 8b 00 mov (%eax),%eax
14f6: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
14f9: 8b 45 f4 mov -0xc(%ebp),%eax
14fc: 8b 40 04 mov 0x4(%eax),%eax
14ff: 3b 45 ec cmp -0x14(%ebp),%eax
1502: 72 4d jb 1551 <malloc+0xa6>
if(p->s.size == nunits)
1504: 8b 45 f4 mov -0xc(%ebp),%eax
1507: 8b 40 04 mov 0x4(%eax),%eax
150a: 3b 45 ec cmp -0x14(%ebp),%eax
150d: 75 0c jne 151b <malloc+0x70>
prevp->s.ptr = p->s.ptr;
150f: 8b 45 f4 mov -0xc(%ebp),%eax
1512: 8b 10 mov (%eax),%edx
1514: 8b 45 f0 mov -0x10(%ebp),%eax
1517: 89 10 mov %edx,(%eax)
1519: eb 26 jmp 1541 <malloc+0x96>
else {
p->s.size -= nunits;
151b: 8b 45 f4 mov -0xc(%ebp),%eax
151e: 8b 40 04 mov 0x4(%eax),%eax
1521: 2b 45 ec sub -0x14(%ebp),%eax
1524: 89 c2 mov %eax,%edx
1526: 8b 45 f4 mov -0xc(%ebp),%eax
1529: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
152c: 8b 45 f4 mov -0xc(%ebp),%eax
152f: 8b 40 04 mov 0x4(%eax),%eax
1532: c1 e0 03 shl $0x3,%eax
1535: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
1538: 8b 45 f4 mov -0xc(%ebp),%eax
153b: 8b 55 ec mov -0x14(%ebp),%edx
153e: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
1541: 8b 45 f0 mov -0x10(%ebp),%eax
1544: a3 6c 1c 00 00 mov %eax,0x1c6c
return (void*)(p + 1);
1549: 8b 45 f4 mov -0xc(%ebp),%eax
154c: 83 c0 08 add $0x8,%eax
154f: eb 38 jmp 1589 <malloc+0xde>
}
if(p == freep)
1551: a1 6c 1c 00 00 mov 0x1c6c,%eax
1556: 39 45 f4 cmp %eax,-0xc(%ebp)
1559: 75 1b jne 1576 <malloc+0xcb>
if((p = morecore(nunits)) == 0)
155b: 8b 45 ec mov -0x14(%ebp),%eax
155e: 89 04 24 mov %eax,(%esp)
1561: e8 ed fe ff ff call 1453 <morecore>
1566: 89 45 f4 mov %eax,-0xc(%ebp)
1569: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
156d: 75 07 jne 1576 <malloc+0xcb>
return 0;
156f: b8 00 00 00 00 mov $0x0,%eax
1574: eb 13 jmp 1589 <malloc+0xde>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
1576: 8b 45 f4 mov -0xc(%ebp),%eax
1579: 89 45 f0 mov %eax,-0x10(%ebp)
157c: 8b 45 f4 mov -0xc(%ebp),%eax
157f: 8b 00 mov (%eax),%eax
1581: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
1584: e9 70 ff ff ff jmp 14f9 <malloc+0x4e>
}
1589: c9 leave
158a: c3 ret
| 37.87931 | 71 | 0.426149 |
0c22b9a5791a824cd298cdf7887d79389f570e08 | 8,971 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_zr_4k_/i7-7700_9_0x48.log_21829_2684.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_zr_4k_/i7-7700_9_0x48.log_21829_2684.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_zr_4k_/i7-7700_9_0x48.log_21829_2684.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 %r12
push %r13
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x7a4e, %r12
add $37320, %r11
mov $0x6162636465666768, %rax
movq %rax, (%r12)
nop
nop
nop
nop
nop
cmp $35647, %rbx
lea addresses_WC_ht+0x17536, %r13
nop
nop
nop
nop
nop
inc %rdi
vmovups (%r13), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $1, %xmm5, %r10
nop
add %r13, %r13
lea addresses_D_ht+0x11a4e, %r10
nop
nop
sub $4152, %r11
movb $0x61, (%r10)
nop
nop
xor %r11, %r11
lea addresses_UC_ht+0xe886, %r11
nop
nop
nop
nop
nop
and $5439, %r10
mov $0x6162636465666768, %r13
movq %r13, (%r11)
nop
nop
and %r12, %r12
lea addresses_normal_ht+0x1624e, %rdi
nop
nop
nop
nop
add $5442, %r13
movw $0x6162, (%rdi)
nop
nop
dec %rax
lea addresses_WC_ht+0x1824e, %rsi
lea addresses_D_ht+0x100e, %rdi
clflush (%rsi)
nop
nop
nop
nop
sub $38239, %rax
mov $26, %rcx
rep movsb
nop
nop
nop
nop
cmp $60756, %rsi
lea addresses_WC_ht+0x4076, %rsi
lea addresses_WT_ht+0x1224e, %rdi
nop
nop
nop
add %r10, %r10
mov $73, %rcx
rep movsl
nop
nop
nop
nop
nop
xor %rbx, %rbx
lea addresses_A_ht+0x156ae, %rbx
nop
nop
nop
nop
cmp %r11, %r11
and $0xffffffffffffffc0, %rbx
vmovaps (%rbx), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $1, %xmm0, %r10
nop
nop
nop
nop
add $8218, %rdi
lea addresses_UC_ht+0x153fa, %rsi
lea addresses_A_ht+0x173b6, %rdi
nop
nop
nop
nop
add $27865, %rbx
mov $26, %rcx
rep movsw
sub %rbx, %rbx
lea addresses_UC_ht+0xb3c, %rcx
nop
nop
nop
nop
nop
cmp $24771, %rax
vmovups (%rcx), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $1, %xmm0, %r11
nop
nop
dec %r13
lea addresses_WT_ht+0x1f6e, %rbx
nop
nop
nop
add %r13, %r13
mov $0x6162636465666768, %rsi
movq %rsi, %xmm2
vmovups %ymm2, (%rbx)
nop
nop
add %r10, %r10
lea addresses_WC_ht+0xdb8e, %rcx
nop
nop
inc %r10
mov (%rcx), %r12w
nop
nop
nop
and %rax, %rax
lea addresses_D_ht+0xa54e, %rsi
lea addresses_D_ht+0x37c0, %rdi
nop
nop
nop
and %r12, %r12
mov $126, %rcx
rep movsw
nop
nop
sub %rax, %rax
lea addresses_WC_ht+0x27de, %r11
add %r12, %r12
movups (%r11), %xmm1
vpextrq $1, %xmm1, %rcx
nop
xor $52059, %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r13
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
// Load
lea addresses_WT+0xe9a6, %rsi
nop
nop
nop
add %r10, %r10
movb (%rsi), %dl
cmp %r13, %r13
// Store
lea addresses_UC+0x880e, %r10
nop
xor %rdx, %rdx
mov $0x5152535455565758, %r13
movq %r13, %xmm6
movups %xmm6, (%r10)
nop
nop
nop
nop
and $63790, %rcx
// Store
lea addresses_PSE+0x1864e, %r13
nop
nop
and $44497, %r9
movl $0x51525354, (%r13)
nop
nop
nop
sub %rdx, %rdx
// Store
mov $0xa4e, %r10
cmp %rcx, %rcx
mov $0x5152535455565758, %rdi
movq %rdi, (%r10)
nop
nop
nop
nop
and $849, %r9
// Store
lea addresses_PSE+0xb24e, %rcx
nop
nop
add %r9, %r9
movw $0x5152, (%rcx)
nop
nop
add $20821, %rdx
// Faulty Load
lea addresses_UC+0x1724e, %r13
inc %r10
vmovaps (%r13), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %rdx
lea oracles, %rcx
and $0xff, %rdx
shlq $12, %rdx
mov (%rcx,%rdx,1), %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 3, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 10, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 11, 'size': 8, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 11, 'size': 2, 'same': False, 'NT': True}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': True, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 10, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': True, 'congruent': 3, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 10, 'size': 2, 'same': False, 'NT': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': True, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 6, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 2, 'size': 16, 'same': False, 'NT': False}}
{'52': 10212, '00': 11617}
52 52 00 52 52 00 00 00 52 00 52 52 00 00 00 52 52 52 00 00 00 52 00 00 00 00 00 52 52 52 52 00 00 52 52 52 00 00 00 52 52 52 00 00 00 00 00 00 00 00 00 52 52 52 52 00 00 00 52 00 00 52 00 00 00 52 00 52 00 00 00 00 00 52 52 52 00 00 52 52 00 52 52 52 00 00 52 00 00 00 52 00 00 00 00 00 00 52 00 00 52 52 00 00 52 00 52 52 00 52 52 52 00 00 52 52 00 00 00 52 52 00 52 52 00 00 00 52 52 00 52 00 52 52 52 00 00 00 52 52 00 00 52 52 00 52 52 00 52 00 00 52 52 00 52 00 00 00 00 52 52 52 52 52 00 00 00 52 00 52 00 52 00 52 52 52 52 52 52 00 00 52 00 52 00 00 00 52 52 00 52 00 00 00 52 00 52 52 52 52 52 52 00 52 52 52 00 00 52 00 00 52 00 52 52 00 00 52 52 52 00 00 00 00 52 52 00 00 52 00 00 00 52 52 00 00 52 00 00 52 52 00 00 00 52 52 52 00 00 00 52 00 00 52 52 00 00 00 00 52 00 00 00 52 52 00 00 52 52 00 52 00 00 00 00 52 00 00 52 52 00 00 00 52 00 00 00 00 00 52 52 52 52 52 00 52 52 00 00 52 00 52 00 00 52 00 00 00 52 00 00 52 00 00 00 52 52 00 00 00 52 52 00 52 00 52 00 00 52 00 52 52 52 00 52 52 00 00 52 52 52 52 00 52 52 00 00 52 00 00 52 52 00 00 00 52 00 52 00 00 52 00 00 00 52 00 52 52 00 52 52 00 52 00 52 00 52 00 52 52 52 00 00 00 52 00 52 00 00 00 52 52 52 00 52 00 52 00 00 52 52 00 00 00 00 52 00 00 00 52 00 52 52 00 00 52 52 00 00 52 00 00 52 00 52 00 00 52 00 00 00 00 52 52 00 52 52 00 00 52 52 52 00 00 52 00 00 00 00 52 52 00 00 00 00 52 52 52 52 52 52 52 00 52 52 52 00 52 00 52 00 00 52 00 00 00 52 52 52 52 52 52 52 52 00 00 00 00 00 52 52 00 52 00 52 00 00 52 52 00 52 52 00 00 52 52 52 00 00 00 00 00 52 52 00 00 00 52 00 52 52 52 52 00 00 52 00 52 52 52 00 52 00 00 00 00 52 00 52 00 00 52 52 52 00 00 52 00 52 00 00 00 00 52 00 00 52 52 52 52 52 00 00 52 00 52 00 00 00 00 52 00 00 52 52 52 00 00 52 52 52 00 00 00 52 52 00 00 00 52 00 00 52 52 52 52 52 52 52 00 52 52 52 00 52 52 52 00 00 00 52 00 00 52 00 00 00 00 00 00 52 00 00 52 52 00 52 52 52 52 00 52 52 00 52 00 52 00 00 52 52 00 00 52 52 52 00 52 52 00 00 52 00 00 52 52 00 52 52 00 00 52 00 00 00 00 52 52 00 52 00 00 00 00 00 52 52 00 00 52 00 52 52 00 00 52 00 52 52 00 00 00 52 00 00 00 52 52 52 52 00 52 00 00 00 52 00 00 52 00 52 00 52 52 00 00 00 00 52 00 00 52 52 00 52 00 52 00 00 52 00 00 52 52 00 00 00 00 52 52 00 00 00 00 00 52 00 00 00 00 52 00 00 52 00 00 00 52 52 00 00 00 00 52 52 00 00 52 52 00 52 00 52 00 52 00 52 52 00 52 52 52 52 00 52 00 00 52 52 52 52 00 00 00 00 00 52 00 00 00 52 00 00 52 52 52 00 52 00 00 00 52 52 00 52 52 52 00 52 52 00 52 00 52 52 52 52 52 52 52 00 52 00 52 00 52 00 00 52 52 52 52 52 52 00 00 00 00 52 52 00 52 00 52 52 00 52 52 00 00 52 00 00 00 52 00 00 00 00 00 52 00 00 00 52 52 00 52 00 00 52 52 00 00 00 52 52 00 00 52 52 52 52 52 00 00 00 52 52 52 52 00 00 00 52 00 00 00 00 00 00 52 52 52 00 52 00 00 52 52 52 52 52 00 52 00 52 52 00 00 00 00 00 52 52 00 00 00 00 52 52 00 00 00 52 52 00 52 00 52 00 00 00 00 00 00 00 52 00 52 52 00 52 52 00 00 00 00 52 52 00 00 52 52 52 00 52 52 00 00 00 00 00 52 52 00 00 00 00 52 00 00 00 52 52 00 00 00 52 00
*/
| 30.828179 | 2,999 | 0.653662 |
d6da0a962c2b2cbd6848f0712328d78a2e93c521 | 1,023 | asm | Assembly | mbr/HelloWorld.asm | icecoobe/oslab | bd282e0f1249f6db5f0cc8daa2da05976f173012 | [
"Unlicense"
] | 52 | 2019-04-13T01:50:34.000Z | 2022-01-14T02:08:32.000Z | mbr/HelloWorld.asm | icecoobe/oslab | bd282e0f1249f6db5f0cc8daa2da05976f173012 | [
"Unlicense"
] | 1 | 2016-04-08T08:35:34.000Z | 2018-08-31T16:45:06.000Z | mbr/HelloWorld.asm | icecoobe/nasm | bd282e0f1249f6db5f0cc8daa2da05976f173012 | [
"Unlicense"
] | 19 | 2019-04-21T03:48:31.000Z | 2022-01-07T08:18:57.000Z |
;; HelloWorld.asm
;;
;; Print "Hello World!" on screen when booting PC.
;;
;; Build with below command:
;; $ nasm -f bin -o HelloWorld -l HelloWorld.lst HelloWorld.asm
;; TODO:
;; 1.添加CLI, STI等暂停处理中断的指令
;;[bits 16]
;%define DOS
;%ifdef DOS
;org 100h
;%else
;org 7c00h
;%endif
org 7c00h
section .data
msg db 'Hello World!'
crlf db 13,10,'$' ;; 回车换行
mov ax, msg
call func_puts
hlt
jmp $
;; func_puts
;; 使用ax传递字符串的首地址
func_puts:
;;mov ax, BootMessage
mov bp, ax ; ES:BP = 串地址
mov cx, 12 ; CX = 串长度
mov ax, 1301h ; AH = 13, AL = 01h
;;mov bx, 000ch ; 页号为0(BH = 0) 黑底红字(BL = 0Ch,高亮)
mov bx, 00AFh ; 页号为0(BH = 0) 绿底白字(BL = AFh,高亮)
mov dl, 0
int 10h ; 10h 号中断
ret
%warning Nasm ver: __NASM_VER__ __FILE__ __LINE__ __line__
;; 不影响编译结果
%warning 'warning-1'
;; 影响编译结果,不会生成结果文件, 后续编译会继续
;;%error 'error-1'
%warning 'warning-2'
times (512-($-$$) - 2) db 0
;;size equ $ - start
;;%if size+2 >512
;;%error "code is too large forboot sector"
;;%endif
db 0x55, 0xAA ;2 byte boot signature | 17.637931 | 63 | 0.633431 |
ded2a9d39f2f60efdf7549e092ce0206d25d936a | 5,195 | asm | Assembly | asm/mxeeotxr.asm | rscott-rocket/mxe | 0e0d2eec0ab861aed64408886f1c2b84affec9cf | [
"Apache-2.0"
] | 8 | 2020-03-02T13:30:58.000Z | 2021-12-17T11:04:48.000Z | asm/mxeeotxr.asm | zBit31/mxe | d8c2d26a38caaecd06a1d5a89d5bde7b3e7bd047 | [
"Apache-2.0"
] | null | null | null | asm/mxeeotxr.asm | zBit31/mxe | d8c2d26a38caaecd06a1d5a89d5bde7b3e7bd047 | [
"Apache-2.0"
] | 3 | 2020-03-02T08:11:58.000Z | 2020-03-03T11:17:58.000Z | MXEEOTXR TITLE 'MXE COMMON END OF TASK EXIT ROUTINE'
*--------+---------+---------+---------+---------+---------+---------+-
* Name : MXEEOTXR
*
* Function : General purpose end of task exit routine
*
* : Lookup the MXETASK control block for the related
* terminating TCB. The MXETASK is anchored by a
* name/token using a known label suffixed by the
* TCB address as the name. The MXETASK control
* block is the first doubleword in the token.
*
*
* Register Usage :
* r1 - parameter passed : TCB
* r2 -
* r3 -
* r4 -
* r5 -
* r6 -
* r7 -
* r8 -
* r9 - TCB
* r10 - MXETASK
* r11 -
* r12 - Data
* r13 -
*
*--------+---------+---------+---------+---------+---------+---------+-
* Changes
* 2019/01/09 RDS Code Written
*--------+---------+---------+---------+---------+---------+---------+-
MXEEOTXR MXEMAIN DATAREG=(R12),PARMS=(R9)
USING TCB,R9
TESTAUTH FCTN=1 Are we auth ?
IF (LTR,R15,R15,Z) ..yes flip to supervisor
MODESET MODE=SUP,KEY=NZERO
ENDIF
*--------+---------+---------+---------+---------+---------+---------+-
* Grab a small workarea
*--------+---------+---------+---------+---------+---------+---------+-
STORAGE OBTAIN,LENGTH=WA@LEN, +
SP=WA@SP,KEY=WA@KEY, +
ADDR=(R13), +
COND=NO
USING WA,R13
MXEMAC INIT,WA,LENGTH==AL4(WA@LEN) Clear
MXEMAC SET_ID,WA Init block
USING SAVF4SA,WA_SAVEAREA
MVC SAVF4SAID,=A(SAVF4SAID_VALUE)
*--------+---------+---------+---------+---------+---------+---------+-
* Attempt to find the MXETASK address for this TCB
* (o) Build the "name"
* (o) Locate the EPA of IEANTRT via macro assist
* (o) Call IEANTRT to retrieve the token
*--------+---------+---------+---------+---------+---------+---------+-
DO ,
MXETASK REQ=SET_NAME,NAME=WA_NAME,TCB=(R9)
MXEMAC GET_IEANTRT,R15
CALL (R15),(=AL4(IEANT_HOME_LEVEL), +
WA_NAME, +
WA_TOKEN, +
WA_RC), +
MF=(E,WA_PLIST)
DOEXIT (CLC,WA_RC,NE,=F'0')
*--------+---------+---------+---------+---------+---------+---------+-
* (o) We have a token, valid the address and eye-catcher
*--------+---------+---------+---------+---------+---------+---------+-
DOEXIT (LTG,R10,WA_TOKEN_ADDR,Z)
USING MXETASK,R10
MXEMAC VER_ID,MXETASK valid eye-catcher?
DOEXIT (LTR,R15,R15,NZ) No - badness
DETACH MXETASK_TCB DETACH TCB
POST MXETASK_DETACH_ECB and tell mother
MXEMAC ZERO,(R9) Zero TCB address
ENDDO
*--------+---------+---------+---------+---------+---------+---------+-
* (o) If validation fails, we just DETACH with no MXETASK
*--------+---------+---------+---------+---------+---------+---------+-
IF (LTR,R9,R9,NZ)
DETACH (R9)
ENDIF
*--------+---------+---------+---------+---------+---------+---------+-
* Release workarea
*--------+---------+---------+---------+---------+---------+---------+-
STORAGE RELEASE,LENGTH=WA@LEN,ADDR=(R13), +
SP=WA@SP,KEY=WA@KEY, +
COND=NO
MXEMAIN RETURN
MXEMAIN END
*--------+---------+---------+---------+---------+---------+---------+-
*--------+---------+---------+---------+---------+---------+---------+-
* DSECTS
*--------+---------+---------+---------+---------+---------+---------+-
*--------+---------+---------+---------+---------+---------+---------+-
WA DSECT
WA_SAVEAREA DS XL(SAVF4SA_LEN)
WA_ID DS CL8 Eye-catcher
WA_VER DS X Version
WA@VER_CURRENT EQU X'01'
WA_FLG1 DS X
WA_FLG2 DS X
WA_FLG3 DS X
WA_LEN DS F
WA_WA DS AD Self
WA_STCK DS XL8 Obtained STCK
WA_RC DS F
WA_RSN DS F
WA_NAME DS CL16 Name/token "NAME"
DS 0D
WA_TOKEN DS 0CL16 Name/token "TOKEN"
WA_TOKEN_ADDR DS CL8
WA_TOKEN_SEQ DS XL8
DS 0D
WA_PLIST DS XL(8*4) General PLIST
DS 0D
WA@LEN EQU *-WA
WA@SP EQU 230
WA@KEY EQU KEY@2
*
MXEGBVT
MXETASK DSECT=YES
MXEMAC REG_EQU
*
IKJTCB
IHASAVER
IEANTASM
*
END
| 39.961538 | 72 | 0.33513 |
9cee8e3b916edb0a6d64a1c416c8e323b08e7d05 | 8,366 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_21829_506.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_21829_506.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_21829_506.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 %r14
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x2f9, %rsi
lea addresses_UC_ht+0x5331, %rdi
nop
nop
nop
nop
nop
sub %rbx, %rbx
mov $106, %rcx
rep movsw
sub %r11, %r11
lea addresses_normal_ht+0x18851, %rbx
sub $48969, %rax
vmovups (%rbx), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %rsi
nop
nop
nop
nop
nop
xor $18591, %rdi
lea addresses_A_ht+0x8d79, %rbx
nop
nop
nop
nop
sub %rax, %rax
mov $0x6162636465666768, %rsi
movq %rsi, (%rbx)
add $45731, %rsi
lea addresses_D_ht+0x14086, %rbx
nop
add %r11, %r11
mov (%rbx), %rax
nop
inc %rbx
lea addresses_normal_ht+0x16391, %rsi
lea addresses_WC_ht+0x15591, %rdi
xor $3216, %r14
mov $112, %rcx
rep movsq
nop
nop
nop
nop
and %r14, %r14
lea addresses_normal_ht+0x196b1, %rax
clflush (%rax)
nop
nop
sub $58700, %r11
mov $0x6162636465666768, %r14
movq %r14, (%rax)
nop
nop
inc %r11
lea addresses_UC_ht+0x1b8a1, %r14
nop
cmp $34505, %r11
mov (%r14), %edi
nop
xor %r14, %r14
lea addresses_UC_ht+0x1d511, %rdi
nop
nop
dec %rax
movb (%rdi), %r11b
nop
nop
and %r14, %r14
lea addresses_WC_ht+0x1b249, %rbx
nop
nop
nop
nop
and $16485, %rsi
movw $0x6162, (%rbx)
nop
nop
nop
nop
nop
and $11333, %rcx
lea addresses_UC_ht+0x114a9, %rbx
nop
add %r14, %r14
movups (%rbx), %xmm7
vpextrq $0, %xmm7, %rcx
nop
nop
nop
dec %rbx
lea addresses_A_ht+0x26fd, %rcx
nop
nop
inc %r11
movups (%rcx), %xmm2
vpextrq $0, %xmm2, %rbx
nop
inc %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r8
push %r9
push %rax
push %rdi
push %rdx
// Store
mov $0x861, %r8
sub %rdx, %rdx
mov $0x5152535455565758, %rax
movq %rax, (%r8)
nop
nop
inc %r15
// Store
lea addresses_D+0x13491, %rdi
clflush (%rdi)
nop
nop
nop
nop
xor $31602, %r11
mov $0x5152535455565758, %r9
movq %r9, %xmm2
movups %xmm2, (%rdi)
nop
nop
nop
nop
dec %r15
// Store
lea addresses_D+0x9e51, %r9
inc %rax
mov $0x5152535455565758, %rdx
movq %rdx, %xmm6
movaps %xmm6, (%r9)
nop
nop
nop
nop
nop
cmp $49113, %rdx
// Store
lea addresses_UC+0xdfba, %r9
add $4047, %rdi
movb $0x51, (%r9)
nop
nop
nop
sub %r15, %r15
// Store
lea addresses_PSE+0xfa91, %rdi
nop
nop
inc %r9
movb $0x51, (%rdi)
nop
add %rax, %rax
// Store
lea addresses_PSE+0x7c11, %rdx
nop
nop
nop
nop
cmp $32013, %r8
mov $0x5152535455565758, %r11
movq %r11, (%rdx)
nop
nop
nop
add $9365, %rdi
// Load
lea addresses_US+0x211, %rax
nop
add %rdi, %rdi
mov (%rax), %r9
add $33479, %rdx
// Faulty Load
lea addresses_D+0x13491, %rdi
nop
nop
nop
nop
and $1194, %r15
movups (%rdi), %xmm7
vpextrq $1, %xmm7, %r11
lea oracles, %r8
and $0xff, %r11
shlq $12, %r11
mov (%r8,%r11,1), %r11
pop %rdx
pop %rdi
pop %rax
pop %r9
pop %r8
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 16, 'AVXalign': True, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'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
*/
| 32.426357 | 2,999 | 0.650371 |
672e8ef9516e98eb75cf5481a12354aae410168d | 535 | asm | Assembly | logical_and.asm | tor4z/nasm_training | 0d7be19c9ff66ca7972e6270388a385c85829814 | [
"Unlicense"
] | null | null | null | logical_and.asm | tor4z/nasm_training | 0d7be19c9ff66ca7972e6270388a385c85829814 | [
"Unlicense"
] | null | null | null | logical_and.asm | tor4z/nasm_training | 0d7be19c9ff66ca7972e6270388a385c85829814 | [
"Unlicense"
] | null | null | null | global _start
section .data
msgEven db 'Event number!', 0xA
msgEvenLen equ $ - msgEven
msgOdd db 'Odd number!', 0xA
msgOddLen equ $ - msgOdd
section .text
_start:
mov ax, 0x8 ; move 0x8 to ax
and ax, 0x1 ; and ax with 0x1
jz even ; If Zero Flag is set jump to even
; Print odd msg
mov eax, 4
mov ebx, 1
mov ecx, msgOdd
mov edx, msgOddLen
int 0x80
jmp exit
even:
; Print even msg
mov eax, 4
mov ebx, 1
mov ecx, msgEven
mov edx, msgEvenLen
int 0x80
jmp exit
exit:
; exit
mov eax, 1
mov ebx, 0
int 0x80
| 13.375 | 44 | 0.671028 |
640a71b6c798b03bb4c101ed1cf8e356684f9bb9 | 63 | asm | Assembly | data/maps/headers/ViridianGym.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | 1 | 2022-02-15T00:19:44.000Z | 2022-02-15T00:19:44.000Z | data/maps/headers/ViridianGym.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | data/maps/headers/ViridianGym.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null |
map_header ViridianGym, VIRIDIAN_GYM, GYM, 0
end_map_header
| 15.75 | 45 | 0.809524 |
6bbf26e57fab36a9ffe76d4832ee23fa96138781 | 665 | asm | Assembly | oeis/285/A285899.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/285/A285899.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/285/A285899.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A285899: Total number of parts in all partitions of all positive integers <= n into consecutive parts.
; 1,2,5,6,9,13,16,17,23,28,31,35,38,43,54,55,58,66,69,75,87,92,95,99,107,112,124,132,135,148,151,152,164,169,184,196,199,204,216,222,225,240,243,252,278,283,286,290,300,310,322,331,334,351,369,377,389,394,397,414,417,422,450,451,469,488,491,500,512,529
mov $4,$0
add $4,1
mov $6,$0
lpb $4
mov $0,$6
mov $1,0
sub $4,1
sub $0,$4
add $0,1
mov $2,$0
mov $7,0
lpb $0
add $7,1
min $0,$7
mov $3,$2
dif $3,$0
cmp $3,$2
sub $2,$7
cmp $3,0
mul $3,$0
mov $0,$2
add $1,$3
lpe
add $1,1
add $5,$1
lpe
mov $0,$5
| 21.451613 | 252 | 0.589474 |
6d9788753b5d1005d1c564d5e048855d92c6993e | 689 | asm | Assembly | oeis/322/A322889.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/322/A322889.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/322/A322889.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A322889: Chebyshev T-polynomials T_n(18).
; Submitted by Jon Maiga
; 1,18,647,23274,837217,30116538,1083358151,38970776898,1401864610177,50428155189474,1814011722210887,65253993844402458,2347329766676277601,84438617606501591178,3037442904067381004807,109263505928819214581874,3930448770533424343942657,141386892233274457167353778,5085997671627347033680793351,182954529286351218755341206858,6581277056637016528158602653537,236743019509646243794954354320474,8516167425290627760090198152883527,306345284290952953119452179149486498,11019914067049015684540188251228630401
mov $3,1
lpb $0
sub $0,1
mul $1,34
add $3,$1
add $2,$3
mov $1,$2
add $3,2
lpe
mov $0,$1
mul $0,17
add $0,1
| 40.529412 | 499 | 0.847605 |
a7583b0c06be8d5e927151aada1f2ad7df0a78a2 | 2,912 | asm | Assembly | source/miscellany/saveload.asm | paulscottrobson/rpl-32 | 7bd0c6dc9edc7f5ca4e9e9dac24a75cb32a29acc | [
"MIT"
] | null | null | null | source/miscellany/saveload.asm | paulscottrobson/rpl-32 | 7bd0c6dc9edc7f5ca4e9e9dac24a75cb32a29acc | [
"MIT"
] | null | null | null | source/miscellany/saveload.asm | paulscottrobson/rpl-32 | 7bd0c6dc9edc7f5ca4e9e9dac24a75cb32a29acc | [
"MIT"
] | null | null | null | ; *******************************************************************************************
; *******************************************************************************************
;
; Name : saveload.asm
; Purpose : Save/Load program
; Date : 8th October 2019
; Author : Paul Robson (paul@robsons.org.uk)
;
; *******************************************************************************************
; *******************************************************************************************
; *******************************************************************************************
;
; Save Program
;
; *******************************************************************************************
System_Save: ;; [save]
phx
phy
jsr ResetVarMemory ; make sure start/end are right
jsr SLGetFileName ; get filename -> zTemp0
lda VarMemory ; end address
sta zTemp1
lda VarMemory+1
sta zTemp1+1
lda #ProgramStart & $FF ; program start to YA
ldy #ProgramStart >> 8
jsr ExternSave
ply
plx
jmp WarmStart
; *******************************************************************************************
;
; Load Program
;
; *******************************************************************************************
System_Load: ;; [load]
phy
jsr SLGetFileName ; get filename -> zTemp0
lda #ProgramStart & $FF ; program start to YA
ldy #ProgramStart >> 8
jsr ExternLoad
jsr ResetForRun ; re-initialise everything
ply
jmp WarmStart
; *******************************************************************************************
;
; Get filename -> zTemp1
;
; *******************************************************************************************
SLGetFileName:
cpx #0 ; gotta be something on the stack
beq _SLFNFail
lda stack2,x ; must be a tokenise buffer address
ora stack3,x
bne _SLFNFail
lda stack1,x
cmp #TokeniseBuffer >> 8
bne _SLFNFail
sta zTemp1+1 ; copy the filename address to zTemp0/1
lda stack0,x
sta zTemp1
lda #InputBuffer & $FF ; f/n in input buffer.
sta zTemp0
lda #InputBuffer >> 8
sta zTemp0+1
phx ; save XY
phy
ldy #255 ; go to the end, copying into input buffer
_SLCheckEnd: ; (it may be in the tokenised buffer.)
iny
lda (zTemp1),y
sta InputBuffer,y
bne _SLCheckEnd
sty zTemp2 ; save end position
;
ldx #3 ; check to see if ends in .RPL
_SLCheckDotRPL:
dey
lda _SLEXT,x
cmp (zTemp1),y
bne _SLNotMatch
dex
bpl _SLCheckDotRPL
bra _SLExit ; yes it does
;
_SLNotMatch: ; it doesn't, add it.
ldx #0
ldy zTemp2
_SLAppend:
lda _SLEXT,x
sta (zTemp0),y
beq _SLExit
inx
iny
bra _SLAppend
_SLExit:
ply
plx
rts
_SLFNFail:
rerror "BAD FILENAME"
_SLEXT:
.text ".RPL",0
| 24.677966 | 93 | 0.418269 |
6671be13c4b9cc2e4548e54d608e7eb7b1a09e87 | 71 | asm | Assembly | src/main/fragment/mos6502-selfmod/_deref_(qbuz1_derefidx_vbuyy)=vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/main/fragment/mos6502-selfmod/_deref_(qbuz1_derefidx_vbuyy)=vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/main/fragment/mos6502-selfmod/_deref_(qbuz1_derefidx_vbuyy)=vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | pha
lda ({z1}),y
sta !+ +1
iny
lda ({z1}),y
sta !+ +2
pla
!: sta $ffff
| 7.888889 | 12 | 0.507042 |
52c1ac2a898e2eb744335be6b0a7415a97267cff | 289 | asm | Assembly | programs/oeis/040/A040811.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/040/A040811.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/040/A040811.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A040811: Continued fraction for sqrt(840).
; 28,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56
mov $1,28
lpb $0
mod $0,2
mul $1,2
lpe
gcd $1,$0
| 28.9 | 189 | 0.605536 |
ef11b46d5f73411d18c446a352d86919c0f0169c | 4,441 | asm | Assembly | sim/asm/fn61.asm | nanamake/avr_cpu | b557e64f471bbcabe7ef104e24ae9b3024cddcba | [
"MIT"
] | 2 | 2021-01-21T01:36:26.000Z | 2022-03-30T21:01:04.000Z | sim/asm/fn61.asm | nanamake/avr_cpu | b557e64f471bbcabe7ef104e24ae9b3024cddcba | [
"MIT"
] | null | null | null | sim/asm/fn61.asm | nanamake/avr_cpu | b557e64f471bbcabe7ef104e24ae9b3024cddcba | [
"MIT"
] | 1 | 2020-03-05T06:04:24.000Z | 2020-03-05T06:04:24.000Z | ;-------------------
; test for sub/sreg
;-------------------
.equ sreg = 0x3f
;-------------------
ldi r16,0x28
ldi r24,0x70
mov r7 ,r16
mov r8 ,r24
ldi r16,0xc0
ldi r24,0xd8
ldi r17,0x00
ldi r25,0x7f
mov r6 ,r17
mov r9 ,r25
ldi r17,0x80
ldi r25,0xff
;-------------------
mov r5 ,r7
sub r5 ,r7
in r5 ,sreg
mov r4 ,r8
sub r4 ,r7
in r4 ,sreg
mov r3 ,r7
sub r3 ,r8
in r3 ,sreg
sez
mov r2 ,r6
sub r2 ,r25
in r2 ,sreg
mov r1 ,r7
sub r1 ,r24
in r1 ,sreg
mov r0 ,r8
sub r0 ,r16
in r0 ,sreg
sez
mov r10,r17
sub r10,r9
in r10,sreg
mov r11,r16
sub r11,r8
in r11,sreg
mov r12,r24
sub r12,r7
in r12,sreg
sez
mov r13,r16
sub r13,r16
in r13,sreg
mov r14,r24
sub r14,r16
in r14,sreg
mov r15,r16
sub r15,r24
in r15,sreg
;-------------------
clc
mov r18,r7
sbc r18,r7
in r18,sreg
mov r19,r8
sbc r19,r7
in r19,sreg
mov r20,r7
sbc r20,r8
in r20,sreg
sez
mov r21,r6
sbc r21,r25
in r21,sreg
mov r22,r7
sbc r22,r24
in r22,sreg
mov r23,r8
sbc r23,r16
in r23,sreg
sez
mov r26,r17
sbc r26,r9
in r26,sreg
mov r27,r16
sbc r27,r8
in r27,sreg
mov r28,r24
sbc r28,r7
in r28,sreg
sez
mov r29,r16
sbc r29,r16
in r29,sreg
mov r30,r24
sbc r30,r16
in r30,sreg
mov r31,r16
sbc r31,r24
in r31,sreg
;-------------------
sts 0x0100,r7 ; (ldi) 0x28
sts 0x0101,r7 ; (ldi) 0x28
sts 0x0102,r5 ; (sub) 0x28 0x28 (cf=0 zf=0) ----z-
sts 0x0103,r18 ; (sbc) 0x28 0x28 (cf=0 zf=0) ------
sts 0x0104,r8 ; (ldi) 0x70
sts 0x0105,r7 ; (ldi) 0x28
sts 0x0106,r4 ; (sub) 0x70 0x28 (cf=0) h-----
sts 0x0107,r19 ; (sbc) 0x70 0x28 (cf=0) h-----
sts 0x0108,r7 ; (ldi) 0x28
sts 0x0109,r8 ; (ldi) 0x70
sts 0x010a,r3 ; (sub) 0x28 0x70 (cf=0) -s-n-c
sts 0x010b,r20 ; (sbc) 0x28 0x70 (cf=0) -s-n-c
;-------------------
sts 0x0110,r6 ; (ldi) 0x00
sts 0x0111,r25 ; (ldi) 0xff
sts 0x0112,r2 ; (sub) 0x00 0xff (cf=1 zf=1) h----c
sts 0x0113,r21 ; (sbc) 0x00 0xff (cf=1 zf=1) h---zc
sts 0x0114,r7 ; (ldi) 0x28
sts 0x0115,r24 ; (ldi) 0xd8
sts 0x0116,r1 ; (sub) 0x28 0xd8 (cf=1) -----c
sts 0x0117,r22 ; (sbc) 0x28 0xd8 (cf=1) h----c
sts 0x0118,r8 ; (ldi) 0x70
sts 0x0119,r16 ; (ldi) 0xc0
sts 0x011a,r0 ; (sub) 0x70 0xc0 (cf=1) --vn-c
sts 0x011b,r23 ; (sbc) 0x70 0xc0 (cf=1) h-vn-c
;-------------------
sts 0x0120,r17 ; (ldi) 0x80
sts 0x0121,r9 ; (ldi) 0x7f
sts 0x0122,r10 ; (sub) 0x80 0x7f (cf=1 zf=1) hsv---
sts 0x0123,r26 ; (sbc) 0x80 0x7f (cf=1 zf=1) hsv-z-
sts 0x0124,r16 ; (ldi) 0xc0
sts 0x0125,r8 ; (ldi) 0x70
sts 0x0126,r11 ; (sub) 0xc0 0x70 (cf=0) -sv---
sts 0x0127,r27 ; (sbc) 0xc0 0x70 (cf=0) -sv---
sts 0x0128,r24 ; (ldi) 0xd8
sts 0x0129,r7 ; (ldi) 0x28
sts 0x012a,r12 ; (sub) 0xd8 0x28 (cf=0) -s-n--
sts 0x012b,r28 ; (sbc) 0xd8 0x28 (cf=0) -s-n--
;-------------------
sts 0x0130,r16 ; (ldi) 0xc0
sts 0x0131,r16 ; (ldi) 0xc0
sts 0x0132,r13 ; (sub) 0xc0 0xc0 (cf=0 zf=1) ----z-
sts 0x0133,r29 ; (sbc) 0xc0 0xc0 (cf=0 zf=1) ----z-
sts 0x0134,r24 ; (ldi) 0xd8
sts 0x0135,r16 ; (ldi) 0xc0
sts 0x0136,r14 ; (sub) 0xd8 0xc0 (cf=0) ------
sts 0x0137,r30 ; (sbc) 0xd8 0xc0 (cf=0) ------
sts 0x0138,r16 ; (ldi) 0xc0
sts 0x0139,r24 ; (ldi) 0xd8
sts 0x013a,r15 ; (sub) 0xc0 0xd8 (cf=0) hs-n-c
sts 0x013b,r31 ; (sbc) 0xc0 0xd8 (cf=0) hs-n-c
;-------------------
out sreg,r25
mov r14,r24
sub r14,r16
in r14,sreg
out sreg,r25
mov r30,r24
sbc r30,r16
in r30,sreg
sts 0x013c,r24 ; (ldi) 0xd8
sts 0x013d,r16 ; (ldi) 0xc0
sts 0x013e,r14 ; (sub) 0xd8 0xc0 (cf=1) it------
sts 0x013f,r30 ; (sbc) 0xd8 0xc0 (cf=1) it------
;-------------------
ldi r16,0xff
sts 0xffff,r16
halt:
rjmp halt
| 23.876344 | 60 | 0.473092 |
acd70c6e43089edc31758adb1b9373cda40775ea | 638 | asm | Assembly | oeis/082/A082140.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/082/A082140.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/082/A082140.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A082140: A transform of binomial(n,6).
; 1,7,56,336,1680,7392,29568,109824,384384,1281280,4100096,12673024,38019072,111132672,317521920,889061376,2444918784,6615662592,17641766912,46425702400,120706826240,310388981760,790081044480,1992378286080,4980945715200,12352745373696,30406757842944,74327630282752,180509959258112,435713694760960,1045712867426304,2496217812566016,5928517304844288,14012859084177408,32971433139240960,77247357640507392,180243834494517248,418945128825094144,970188719384428544,2238897044733296640,5149463202886582272
mov $1,-2
pow $1,$0
mov $2,-7
bin $2,$0
mul $1,$2
mul $1,6
sub $1,6
div $1,12
add $1,1
mov $0,$1
| 45.571429 | 498 | 0.840125 |
14a4a4699afa20bd84417caefb6cc351cf7d55bc | 671 | asm | Assembly | oeis/051/A051560.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/051/A051560.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/051/A051560.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A051560: Second unsigned column of triangle A051379.
; Submitted by Jon Maiga
; 0,1,17,242,3382,48504,725592,11393808,188204400,3270729600,59753750400,1146140409600,23046980025600,485075533132800,10669304848204800,244861798361241600,5854837379724748800,145645465513966387200,3764241479462897664000,100947899506378788864000,2805611433721156988928000,80717610114513497309184000,2401304412489882267303936000,73793450230597202533908480000,2340226492825535313994874880000,76518763376404813146591068160000,2577327690812964692997667553280000,89352021967563792914206052843520000
mov $1,1
mov $2,7
lpb $0
sub $0,1
add $2,1
mul $3,$2
add $3,$1
mul $1,$2
lpe
mov $0,$3
| 44.733333 | 492 | 0.853949 |
743ac2d6e22ac600a2a6f01904f67baddfc4b6e5 | 2,022 | asm | Assembly | asm/macros_text.asm | b00lduck/cbmpet-asm | 82c886fec30eb2720caa4b49a09fc1ae3bd9d2df | [
"MIT"
] | null | null | null | asm/macros_text.asm | b00lduck/cbmpet-asm | 82c886fec30eb2720caa4b49a09fc1ae3bd9d2df | [
"MIT"
] | null | null | null | asm/macros_text.asm | b00lduck/cbmpet-asm | 82c886fec30eb2720caa4b49a09fc1ae3bd9d2df | [
"MIT"
] | null | null | null | // draw text
.macro DrawText(tx, ty, text, len) {
pha
.var addr = VRAM + tx + ty * 40
ldx #$00
loop:
lda text, x
sta addr, x
inx
cpx #len
bne loop
pla
}
// draw zero terminated text
.macro DrawTextZt(tx, ty, text) {
pha
.var addr = VRAM + tx + ty * 40
ldx #$00
loop:
lda text, x
cmp #$00
beq end
sta addr, x
inx
jmp loop
end:
pla
}
.macro DisplayHexWord(addr,vram) {
// DIGIT 4
lda addr
and #$0f
sed
clc
adc #$90 // Produce $90-$99 (C=0) or $00-$05 (C=1)
adc #$40 // Produce $30-$39 or $41-$46
cld
sta vram+3
// DIGIT 3
lda addr
and #$f0
clc
ror
ror
ror
ror
sed
clc
adc #$90 // Produce $90-$99 (C=0) or $00-$05 (C=1)
adc #$40 // Produce $30-$39 or $41-$46
cld
sta vram+2
// DIGIT 2
lda addr+1
and #$0f
sed
clc
adc #$90 // Produce $90-$99 (C=0) or $00-$05 (C=1)
adc #$40 // Produce $30-$39 or $41-$46
cld
sta vram+1
// DIGIT 1
lda addr+1
and #$f0
clc
ror
ror
ror
ror
sed
clc
adc #$90 // Produce $90-$99 (C=0) or $00-$05 (C=1)
adc #$40 // Produce $30-$39 or $41-$46
cld
sta vram
}
//reads one byte from the source address and writes two bytes to the target address
.macro ItoA(target, source) {
pha
lda source
lsr
lsr
lsr
lsr
ora #'0'
sta target
lda source
and #$0f
ora #'0'
sta target + 1
pla
}
// clear the screen
.macro ClearScreen() {
:FillScreen($20)
}
// clear hove via ROM call
.macro ClearHome() {
lda #$93
jsr $ffd2
}
// switch to upeprcase/lowercase mode
.macro SwitchLowercase() {
pha
lda #$0e
sta $e84c
pla
}
// switch to uppercase/graphics mode
.macro SwitchGraphics() {
pha
lda #$0c
sta $e84c
pla
} | 14.867647 | 84 | 0.484669 |
9376bca872b3b4cfe7adedc45dd58e5c5c4c5a3e | 469 | asm | Assembly | programs/oeis/100/A100665.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/100/A100665.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/100/A100665.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A100665: a(n) = round(F(n)^(1/2)) where F(n) is the n-th Fibonacci number (A000045).
; 0,1,1,1,2,2,3,4,5,6,7,9,12,15,19,25,31,40,51,65,82,105,133,169,215,274,348,443,564,717,912,1160,1476,1877,2388,3038,3864,4915,6252,7953,10116,12868,16368,20821,26484,33688,42852,54509,69336,88197,112189,142706
seq $0,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
seq $0,194 ; n appears 2n times, for n >= 1; also nearest integer to square root of n.
| 78.166667 | 211 | 0.673774 |
ad8c074a38a933bed41846bff073261d8e7b811a | 21,480 | asm | Assembly | bahamut/source/text.asm | higan-emu/bahamut-lagoon-translation-kit | 6f08de5b92b597c0b9ecebd485cc975b99acfc13 | [
"0BSD"
] | 2 | 2021-08-15T04:10:10.000Z | 2021-08-15T20:14:13.000Z | bahamut/source/text.asm | higan-emu/bahamut-lagoon-translation-kit | 6f08de5b92b597c0b9ecebd485cc975b99acfc13 | [
"0BSD"
] | 1 | 2022-02-16T02:46:39.000Z | 2022-02-16T04:30:29.000Z | bahamut/source/text.asm | higan-emu/bahamut-lagoon-translation-kit | 6f08de5b92b597c0b9ecebd485cc975b99acfc13 | [
"0BSD"
] | 1 | 2021-12-25T11:34:57.000Z | 2021-12-25T11:34:57.000Z | //utility functions to build text strings for dynamic text rendering
//append macros output to the specified target string with X as an index
//emit functions output to their own variables
seek(codeCursor)
namespace append {
//X => target index
//Y => source index
macro string(variable target, variable source) {
phb; php; sep #$20; pha
ldb #source>>16
loop{#}: {
lda.w source,y; iny
sta.l target,x; inx
cmp #$ff; bne loop{#}
}
dex; dey //point cursors at the $ff terminal
pla; plp; plb
}
macro string(variable source) {
append.string(render.text, source)
}
//A => pointer index
//X => target index
macro stringIndexed(variable target, variable source) {
php; rep #$30; pha; phy
phx; asl; tax
lda.l source,x; tay
plx; append.string(target, source)
ply; pla; plp
}
macro stringIndexed(variable source) {
append.stringIndexed(render.text, source)
}
//X => target index
macro literal(variable target, define source) {
phb; php; rep #$30; pha; phy
sep #$20; phk; plb; ldy #$0000
loop{#}: {
lda.w text{#},y; iny
sta.l target,x; inx
cmp #$ff; bne loop{#}
}
dex //point cursor at the $ff terminal
rep #$30; ply; pla; plp; plb
bra skip{#}; text{#}:; db {source},$ff; skip{#}:
}
macro literal(define source) {
append.literal(render.text, {source})
}
//X => target index
macro byte(variable target, define byte) {
php; rep #$20; pha
lda.w #$ff00|{byte}; sta.l target,x; inx
pla; plp
}
macro byte(variable byte) {
append.byte(render.text, byte)
}
//X => target index
macro alignLeft(variable target) {
append.byte(target, command.alignLeft)
}
macro alignLeft() {
append.alignLeft(render.text)
}
//X => target index
macro alignCenter(variable target) {
append.byte(target, command.alignCenter)
}
macro alignCenter() {
append.alignCenter(render.text)
}
//X => target index
macro alignRight(variable target) {
append.byte(target, command.alignRight)
}
macro alignRight() {
append.alignRight(render.text)
}
//A => pixels
//X => target index
macro alignSkip(variable target, variable pixels) {
append.byte(target, command.alignSkip)
append.byte(target, pixels)
}
macro alignSkip(variable pixels) {
append.alignSkip(render.text, pixels)
}
//A => name
//X => target index
macro namePointer(variable target, variable name) {
append.byte(target, command.name)
append.byte(target, name)
}
macro namePointer(variable name) {
append.namePointer(render.text, name)
}
//X => target index
macro redirect(variable target) {
append.byte(target, command.redirect)
}
macro redirect() {
append.redirect(render.text)
}
//X => target index
macro styleNormal(variable target) {
append.byte(target, command.styleNormal)
}
macro styleNormal() {
append.styleNormal(render.text)
}
//X => target index
macro styleItalic(variable target) {
append.byte(target, command.styleItalic)
}
macro styleItalic() {
append.styleItalic(render.text)
}
//X => target index
macro styleTiny(variable target) {
append.byte(target, command.styleTiny)
}
macro styleTiny() {
append.styleTiny(render.text)
}
//X => target index
macro colorNormal(variable target) {
append.byte(target, command.colorNormal)
}
macro colorNormal() {
append.colorNormal(render.text)
}
//X => target index
macro colorYellow(variable target) {
append.byte(target, command.colorYellow)
}
macro colorYellow() {
append.colorYellow(render.text)
}
//A => pause duration
//X => target index
macro pause(variable target, variable pause) {
append.byte(command.pause)
append.byte(pause)
}
macro pause(variable pause) {
append.pause(render.text, pause)
}
//X => target index
macro wait(variable target) {
append.byte(target, command.wait)
}
macro wait() {
append.wait(render.text)
}
//X => target index
macro lineFeed(variable target) {
append.byte(target, command.lineFeed)
}
macro lineFeed() {
append.lineFeed(render.text)
}
//X => target index
macro terminal(variable target) {
append.byte(target, command.terminal)
}
macro terminal() {
append.terminal(render.text)
}
macro emitter1(define type) {
php; rep #$10; phy
jsl emit.{type}; ldy #$0000
append.string({target}, emit.{type}.output)
ply; plp
}
macro integer02(target) {; append.emitter1(integer02); }
macro integer_2(target) {; append.emitter1(integer_2); }
macro integer_3(target) {; append.emitter1(integer_3); }
macro integer_4(target) {; append.emitter1(integer_4); }
macro integer_5(target) {; append.emitter1(integer_5); }
macro integer_8(target) {; append.emitter1(integer_8); }
macro integer1 (target) {; append.emitter1(integer1); }
macro integer3 (target) {; append.emitter1(integer3); }
macro integer5 (target) {; append.emitter1(integer5); }
macro integer10(target) {; append.emitter1(integer10); }
macro hex02 (target) {; append.emitter1(hex02); }
macro hex04 (target) {; append.emitter1(hex04); }
macro name (target) {; append.emitter1(name); }
macro dragon (target) {; append.emitter1(dragon); }
macro enemy (target) {; append.emitter1(enemy); }
macro technique(target) {; append.emitter1(technique); }
macro hpValue (target) {; append.emitter1(hpValue); }
macro hpRange (target) {; append.emitter1(hpRange); }
macro mpValue (target) {; append.emitter1(mpValue); }
macro mpRange (target) {; append.emitter1(mpRange); }
macro spValue (target) {; append.emitter1(spValue); }
macro spRange (target) {; append.emitter1(spRange); }
}
namespace emit {
//converts a 16-bit integer into "00"-"99"
//A => integer
function integer02 {
variable(4, output)
enter
-;cmp.w #10000; bcc +; sub.w #10000; bra -; + //discard 10000s digit
-;cmp.w #1000; bcc +; sub.w #1000; bra -; + //discard 1000s digit
-;cmp.w #100; bcc +; sub.w #100; bra -; + //discard 100s digit
ldy #$0000
-;cmp.w #10; bcc +; sub.w #10; iny; bra -
+;pha; tya; add.w #'0'; sta output+0; pla
add.w #'0'; ora #$ff00; sta output+1
leave; rtl
}
//converts a 16-bit integer into " 0"-"99"
//A => integer
function integer_2 {
variable(4, output)
enter
-;cmp.w #10000; bcc +; sub.w #10000; bra -; + //discard 10000s digit
-;cmp.w #1000; bcc +; sub.w #1000; bra -; + //discard 1000s digit
-;cmp.w #100; bcc +; sub.w #100; bra -; + //discard 100s digit
cmp.w #10; bcs +; pha; lda.w #'_'; sta output+0; pla; + //add 10s space
cmp.w #10; bcc _1 //skip 10s zero
_10:; ldy.w #0
-;cmp.w #10; bcc +; sub.w #10; iny; bra -
+;pha; tya; add.w #'0'; sta output+0; pla
_1:
add.w #'0'; ora #$ff00; sta output+1
leave; rtl
}
//converts a 16-bit integer into " 0"-"999"
//A => integer
function integer_3 {
variable(8, output)
enter
-;cmp.w #10000; bcc +; sub.w #10000; bra -; + //discard 10000s digit
-;cmp.w #1000; bcc +; sub.w #1000; bra -; + //discard 1000s digit
cmp.w #100; bcs +; pha; lda.w #'_'; sta output+0; pla; + //add 100s space
cmp.w #10; bcs +; pha; lda.w #'_'; sta output+1; pla; + //add 10s space
cmp.w #10; bcc _1 //skip 10s zero
cmp.w #100; bcc _10 //skip 100s zero
_100:; ldy.w #0
-;cmp.w #100; bcc +; sub.w #100; iny; bra -
+;pha; tya; add.w #'0'; sta output+0; pla
_10:; ldy.w #0
-;cmp.w #10; bcc +; sub.w #10; iny; bra -
+;pha; tya; add.w #'0'; sta output+1; pla
_1:
add.w #'0'; ora #$ff00; sta output+2
leave; rtl
}
//converts a 16-bit integer into " 0"-"9999"
//A => integer
function integer_4 {
variable(8, output)
enter
-;cmp.w #10000; bcc +; sub.w #10000; bra -; + //discard 10000s digit
cmp.w #1000; bcs +; pha; lda.w #'_'; sta output+0; pla; + //add 1000s space
cmp.w #100; bcs +; pha; lda.w #'_'; sta output+1; pla; + //add 100s space
cmp.w #10; bcs +; pha; lda.w #'_'; sta output+2; pla; + //add 10s space
cmp.w #10; bcc _1 //skip 10s zero
cmp.w #100; bcc _10 //skip 100s zero
cmp.w #1000; bcc _100 //skip 1000s zero
_1000:; ldy.w #0
-;cmp.w #1000; bcc +; sub.w #1000; iny; bra -
+;pha; tya; add.w #'0'; sta output+0; pla
_100:; ldy.w #0
-;cmp.w #100; bcc +; sub.w #100; iny; bra -
+;pha; tya; add.w #'0'; sta output+1; pla
_10:; ldy.w #0
-;cmp.w #10; bcc +; sub.w #10; iny; bra -
+;pha; tya; add.w #'0'; sta output+2; pla
_1:
add.w #'0'; ora #$ff00; sta output+3
leave; rtl
}
//converts a 16-bit integer into " 0"-"65535"
//A => integer
function integer_5 {
variable(8, output)
enter
cmp.w #10000; bcs +; pha; lda.w #'_'; sta output+0; pla; + //add 10000s space
cmp.w #1000; bcs +; pha; lda.w #'_'; sta output+1; pla; + //add 1000s space
cmp.w #100; bcs +; pha; lda.w #'_'; sta output+2; pla; + //add 100s space
cmp.w #10; bcs +; pha; lda.w #'_'; sta output+3; pla; + //add 10s space
cmp.w #10; bcc _1 //skip 10s zero
cmp.w #100; bcc _10 //skip 100s zero
cmp.w #1000; bcc _100 //skip 1000s zero
cmp.w #10000; bcc _1000 //skip 10000s zero
_10000:; ldy.w #0
-;cmp.w #10000; bcc +; sub.w #10000; iny; bra -
+;pha; tya; add.w #'0'; sta output+0; pla
_1000:; ldy.w #0
-;cmp.w #1000; bcc +; sub.w #1000; iny; bra -
+;pha; tya; add.w #'0'; sta output+1; pla
_100:; ldy.w #0
-;cmp.w #100; bcc +; sub.w #100; iny; bra -
+;pha; tya; add.w #'0'; sta output+2; pla
_10:; ldy.w #0
-;cmp.w #10; bcc +; sub.w #10; iny; bra -
+;pha; tya; add.w #'0'; sta output+3; pla
_1:
add.w #'0'; ora #$ff00; sta output+4
leave; rtl
}
//converts a 32-bit integer into " 0"-"99999999"
//A => lower 16-bits
//Y => upper 16-bits
function integer_8 {
variable( 6, input)
variable(12, output)
enter
sta input+0; tya
sta input+2
ldy #$0000
skip: {
tya; mul(4); tax
lda input+2; cmp table+2,x; bcc +; bne ++
lda input+0; cmp table+0,x; bcc +; bra ++
+;iny; cpy.w #9; bcc skip
};+
ldx #$0000; phy; cpy.w #0
-;beq +; lda.w #'_'; sta output-2,x; inx; dey; bra -
+;ply
digit: {
phx; phy
tya; mul(4); tax
ldy #$0000
loop: {
lda input+2; cmp table+2,x; bcc +; bne greater
lda input+0; cmp table+0,x; bcc +
greater: {
lda input+0; sub table+0,x; sta input+0
lda input+2; sbc table+2,x; sta input+2
iny; bra loop
}
}
+;tya; ply; plx
add.w #'0'; sta output-2,x; inx
iny; cpy.w #10; bcc digit
}
lda #$ffff; sta output-2,x
leave; rtl
table: {
dd 1000000000
dd 100000000
dd 10000000
dd 1000000
dd 100000
dd 10000
dd 1000
dd 100
dd 10
dd 1
}
}
//converts a 16-bit integer into "0"-"9"
//A => integer
function integer1 {
variable(2, output)
enter
-;cmp.w #10000; bcc +; sub.w #10000; bra -; + //discard 10000s
-;cmp.w #1000; bcc +; sub.w #1000; bra -; + //discard 1000s
-;cmp.w #100; bcc +; sub.w #100; bra -; + //discard 100s
-;cmp.w #10; bcc +; sub.w #10; bra -; + //discard 10s
add.w #'0'; ora #$ff00; sta output
leave; rtl
}
//converts a 16-bit integer into "0"-"999"
//A => integer
function integer3 {
variable(8, output)
enter; ldx.w #0
-;cmp.w #10000; bcc +; sub.w #10000; bra -; + //discard 10000s
-;cmp.w #1000; bcc +; sub.w #1000; bra -; + //discard 1000s
cmp.w #10; bcc _1 //skip leading 10s zero
cmp.w #100; bcc _10 //skip leading 100s zero
_100:; ldy.w #0
-;cmp.w #100; bcc +; sub.w #100; iny; bra -
+;pha; tya; add.w #'0'; sta output,x; inx; pla
_10:; ldy.w #0
-;cmp.w #10; bcc +; sub.w #10; iny; bra -
+;pha; tya; add.w #'0'; sta output,x; inx; pla
_1:;
add.w #'0'; ora #$ff00; sta output,x
leave; rtl
}
//converts a 16-bit integer into "0"-"65535"
//A => integer
function integer5 {
variable(8, output)
enter; ldx.w #0
cmp.w #10; bcc _1 //skip leading 10s zero
cmp.w #100; bcc _10 //skip leading 100s zero
cmp.w #1000; bcc _100 //skip leading 1000s zero
cmp.w #10000; bcc _1000 //skip leading 10000s zero
_10000:; ldy.w #0
-;cmp.w #10000; bcc +; sub.w #10000; iny; bra -
+;pha; tya; add.w #'0'; sta output,x; inx; pla
_1000:; ldy.w #0
-;cmp.w #1000; bcc +; sub.w #1000; iny; bra -
+;pha; tya; add.w #'0'; sta output,x; inx; pla
_100:; ldy.w #0
-;cmp.w #100; bcc +; sub.w #100; iny; bra -
+;pha; tya; add.w #'0'; sta output,x; inx; pla
_10:; ldy.w #0
-;cmp.w #10; bcc +; sub.w #10; iny; bra -
+;pha; tya; add.w #'0'; sta output,x; inx; pla
_1:;
add.w #'0'; ora #$ff00; sta output,x
leave; rtl
}
//converts a 32-bit integer into "0"-"4294967295"
//A => lower 16-bits
//Y => upper 16-bits
function integer10 {
variable( 4, input)
variable(12, output)
enter
sta input+0; tya
sta input+2
ldy #$0000
skip: {
tya; mul(4); tax
lda input+2; cmp table+2,x; bcc +; bne ++
lda input+0; cmp table+0,x; bcc +; bra ++
+;iny; cpy.w #9; bcc skip
};+
ldx #$0000
digit: {
phx; phy
tya; mul(4); tax
ldy #$0000
loop: {
lda input+2; cmp table+2,x; bcc +; bne greater
lda input+0; cmp table+0,x; bcc +
greater: {
lda input+0; sub table+0,x; sta input+0
lda input+2; sbc table+2,x; sta input+2
iny; bra loop
}
}
+;tya; ply; plx
add.w #'0'; sta output,x; inx
iny; cpy.w #10; bcc digit
}
lda #$ffff; sta output,x
leave; rtl
table: {
dd 1000000000
dd 100000000
dd 10000000
dd 1000000
dd 100000
dd 10000
dd 1000
dd 100
dd 10
dd 1
}
}
//converts an 8-bit integer into "00"-"FF"
//A => integer
function hex02 {
variable(4, output)
enter; sep #$30
pha; lsr #4; tax; lda table,x; sta output+0
pla; and #$0f; tax; lda table,x; sta output+1
lda #$ff; sta output+2
leave; rtl
table:; db "0123456789",map.hexA,map.hexB,map.hexC,map.hexD,map.hexE,map.hexF
}
//converts a 16-bit integer into "0000"-"FFFF"
//A => integer
function hex04 {
variable(8, output)
enter; sep #$30
xba; pha; lsr #4; tax; lda table,x; sta output+0
pla; and #$0f; tax; lda table,x; sta output+1
xba; pha; lsr #4; tax; lda table,x; sta output+2
pla; and #$0f; tax; lda table,x; sta output+3
lda #$ff; sta output+4
leave; rtl
table:; db "0123456789",map.hexA,map.hexB,map.hexC,map.hexD,map.hexE,map.hexF
}
//A => player or dragon name index
function name {
variable(16, output)
enter
and #$00ff; cmp #$000a; bcs static
dynamic:
mul(8); tay; ldb #$7e
lda $2b00,y; sta base56.decode.input+0
lda $2b02,y; sta base56.decode.input+2
lda $2b04,y; sta base56.decode.input+4
lda $2b06,y; sta base56.decode.input+6
jsl base56.decode
ldb #base56.decode.output>>16
sep #$20; ldx #$0000; txy
-;lda.w base56.decode.output,y; iny
sta.l output,x; inx
cmp #$ff; bne -
bra finished
static:
ldb #lists.names.text>>16
asl; tax; lda.w lists.names.text,x; tay
sep #$20; ldx #$0000
-;lda.w lists.names.text,y; iny
sta.l output,x; inx
cmp #$ff; bne -
finished:
leave; rtl
}
//A => dragon class index
function dragon {
variable(16, output)
enter
and #$00ff
ldb #lists.dragons.text>>16
asl; tax; lda.w lists.dragons.text,x; tay
sep #$20; ldx #$0000
-;lda.w lists.dragons.text,y; iny
sta.l output,x; inx
cmp #$ff; bne -
leave; rtl
}
//A => enemy name index
function enemy {
variable(16, output)
enter
and #$00ff
ldb #lists.enemies.text>>16
asl; tax; lda.w lists.enemies.text,x; tay
sep #$20; ldx #$0000
-;lda.w lists.enemies.text,y; iny
sta.l output,x; inx
cmp #$ff; bne -
leave; rtl
}
//A => technique name index
function technique {
variable(32, output)
enter
and #$00ff
ldb #lists.techniques.text>>16
asl; tax; lda.w lists.techniques.text,x; tay
sep #$20; ldx #$0000
-;lda.w lists.techniques.text,y; iny
sta.l output,x; inx
cmp #$ff; bne -
leave; rtl
}
//A => HP
//>9999 => "????"
function hpValue {
variable(16, output)
php; rep #$10; phx; ldx #$0000
append.literal(output, "HP"); append.alignRight(output)
cmp.w #10000; bcc _1; append.literal(output, "^^^^"); bra _2; _1:
append.integer_4(output); _2:
plx; plp; rtl
}
inline magicValue(define type) {
variable(16, output)
php; rep #$10; phx; ldx #$0000
append.literal(output, {type}); append.alignRight(output)
cmp.w #65535; bne _1; append.literal(output, "_~~~"); bra _3; _1:
cmp.w #1000; bcc _2; append.literal(output, "_^^^"); bra _3; _2:
append.integer_4(output); _3:
plx; plp; rtl
}
//A => MP
//65535 => "---" (no magic skill)
//>999 => "???"
function mpValue {
magicValue("MP")
}
//A => SP
//65535 => "---" (no magic skill)
//>999 => "???"
function spValue {
magicValue("SP")
}
//A => current HP
//Y => maximum HP
//>9999 => "????"
function hpRange {
variable(32, output)
php; rep #$10; phx; ldx #$0000
append.literal(output, "HP"); append.alignRight(output)
cmp.w #10000; bcc _1; append.literal(output, "^^^^"); bra _2; _1:
append.integer_4(output); _2:
append.literal(output, "/"); tya
cmp.w #10000; bcc _3; append.literal(output, "^^^^"); bra _4; _3:
append.integer_4(output); _4:
plx; plp; rtl
}
//A => current MP/SP
//Y => maximum MP/SP
inline magicRange(define type) {
variable(32, output)
php; rep #$10; phx; ldx #$0000
append.literal(output, {type}); append.alignRight(output)
cmp.w #65535; bne _1; append.literal(output, "_~~~"); bra _3; _1:
cmp.w #1000; bcc _2; append.literal(output, "_^^^"); bra _3; _2:
append.integer_4(output); _3:
append.literal(output, "/"); tya
cmp.w #65535; bne _4; append.literal(output, "_~~~"); bra _6; _4:
cmp.w #1000; bcc _5; append.literal(output, "_^^^"); bra _5; _5:
append.integer_4(output); _6:
plx; plp; rtl
}
//A => current MP
//Y => maximum MP
//65535 = "---" (no magic skill)
//>999 = "???"
function mpRange {
magicRange("MP")
}
//A => current SP
//Y => maximum SP
//65535 = "---" (no magic skill)
//>999 = "???"
function spRange {
magicRange("SP")
}
}
namespace append {
macro emitter2(define type) {
php; rep #$10; phy
jsl emit.{type}; ldy #$0000
append.string(render.text, emit.{type}.output)
ply; plp; rtl
}
//functions reduce code generation size
function integer02 {; append.emitter2(integer02); }
function integer_2 {; append.emitter2(integer_2); }
function integer_3 {; append.emitter2(integer_3); }
function integer_4 {; append.emitter2(integer_4); }
function integer_5 {; append.emitter2(integer_5); }
function integer_8 {; append.emitter2(integer_8); }
function integer1 {; append.emitter2(integer1); }
function integer3 {; append.emitter2(integer3); }
function integer5 {; append.emitter2(integer5); }
function integer10 {; append.emitter2(integer10); }
function hex02 {; append.emitter2(hex02); }
function hex04 {; append.emitter2(hex04); }
function name {; append.emitter2(name); }
function dragon {; append.emitter2(dragon); }
function enemy {; append.emitter2(enemy); }
function technique {; append.emitter2(technique); }
function hpValue {; append.emitter2(hpValue); }
function hpRange {; append.emitter2(hpRange); }
function mpValue {; append.emitter2(mpValue); }
function mpRange {; append.emitter2(mpRange); }
function spValue {; append.emitter2(spValue); }
function spRange {; append.emitter2(spRange); }
//macros provide consistent interface with argument-taking macros
macro integer02() {; jsl append.integer02; }
macro integer_2() {; jsl append.integer_2; }
macro integer_3() {; jsl append.integer_3; }
macro integer_4() {; jsl append.integer_4; }
macro integer_5() {; jsl append.integer_5; }
macro integer_8() {; jsl append.integer_8; }
macro integer1 () {; jsl append.integer1; }
macro integer3 () {; jsl append.integer3; }
macro integer5 () {; jsl append.integer5; }
macro integer10() {; jsl append.integer10; }
macro hex02 () {; jsl append.hex02; }
macro hex04 () {; jsl append.hex04; }
macro name () {; jsl append.name; }
macro dragon () {; jsl append.dragon; }
macro enemy () {; jsl append.enemy; }
macro technique() {; jsl append.technique; }
macro hpValue () {; jsl append.hpValue; }
macro hpRange () {; jsl append.hpRange; }
macro mpValue () {; jsl append.mpValue; }
macro mpRange () {; jsl append.mpRange; }
macro spValue () {; jsl append.spValue; }
macro spRange () {; jsl append.spRange; }
}
codeCursor = pc()
| 26.749689 | 82 | 0.58608 |
26f637210eea78465a7f028569a265bcf5ef10dd | 418 | asm | Assembly | oeis/026/A026583.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/026/A026583.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/026/A026583.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A026583: a(n) = Sum{T(i,j)}, 0<=j<=i, 0<=i<=2n, T given by A026568.
; Submitted by Jon Maiga
; 1,4,11,30,77,200,511,1314,3361,8620,22067,56550,144821,371024,950311,2434410,6235657,15973300,40915931,104809134,268472861,687709400,1761600847,4512438450,11558841841,29608595644,75843963011
mov $1,2
mov $4,1
lpb $0
sub $0,1
mov $3,$2
mul $4,4
add $3,$4
mov $4,$1
add $1,$3
sub $1,1
lpe
mov $0,$1
sub $0,1
| 23.222222 | 192 | 0.674641 |
cf7d166ff15417955284e524dfd5bf657c347752 | 5,080 | asm | Assembly | final.asm | Phoenix1153/Compiler | d7fc4a84a82be9f5754ced95bc682264de454e7d | [
"MIT"
] | 7 | 2019-05-06T15:04:45.000Z | 2021-11-03T00:59:08.000Z | final.asm | Phoenix1153/Compiler | d7fc4a84a82be9f5754ced95bc682264de454e7d | [
"MIT"
] | null | null | null | final.asm | Phoenix1153/Compiler | d7fc4a84a82be9f5754ced95bc682264de454e7d | [
"MIT"
] | 6 | 2018-11-15T14:49:04.000Z | 2021-05-08T03:13:09.000Z | .data
max_num: .word 1024
S31: .asciiz "OVERFLOW! "
S44: .asciiz "complete number: "
S48: .asciiz " "
S53: .asciiz " "
S59: .asciiz "---------------------------------------------------------------\\n"
S81: .asciiz " "
S89: .asciiz " "
S97: .asciiz "The total is "
.text
move $fp $sp
j main
complete_num:
move $s7 $fp
move $fp $sp
subi $fp $fp 4
sw $s7 0($fp)
sw $ra -4($fp)
subi $sp $sp 4152
li $t0 2
sw $t0 -4108($fp)
LABEL0:
li $t0 0
li $t1 1
sub $t0 $t0 $t1
sw $t0 -4144($fp)
lw $t0 -4144($fp)
sw $t0 -4112($fp)
lw $t0 -4108($fp)
sw $t0 -4116($fp)
li $t0 1
sw $t0 -4104($fp)
LABEL1:
lw $t0 -4108($fp)
lw $t1 -4104($fp)
div $t0 $t1
mflo $t0
sw $t0 -4144($fp)
lw $t0 -4144($fp)
lw $t1 -4104($fp)
mul $t0 $t0 $t1
sw $t0 -4148($fp)
lw $t0 -4148($fp)
sw $t0 -4120($fp)
lw $t0 -4120($fp)
lw $t1 -4108($fp)
beq $t0 $t1 LABEL12
sw $zero -4144($fp)
j LABEL13
LABEL12:
li $t2 1
sw $t2 -4144($fp)
LABEL13:
lw $t0 -4144($fp)
beq $t0 $zero LABEL2
lw $t0 -4112($fp)
li $t1 1
add $t0 $t0 $t1
sw $t0 -4144($fp)
lw $t0 -4144($fp)
sw $t0 -4112($fp)
lw $t0 -4116($fp)
lw $t1 -4104($fp)
sub $t0 $t0 $t1
sw $t0 -4144($fp)
lw $t0 -4144($fp)
sw $t0 -4116($fp)
lw $t0 -4112($fp)
li $t1 1024
bge $t0 $t1 LABEL14
sw $zero -4144($fp)
j LABEL15
LABEL14:
li $t2 1
sw $t2 -4144($fp)
LABEL15:
lw $t0 -4144($fp)
beq $t0 $zero LABEL3
la $a0 S31
li $v0 4
syscall
LABEL3:
lw $t0 -4112($fp)
li $t1 1024
blt $t0 $t1 LABEL16
sw $zero -4144($fp)
j LABEL17
LABEL16:
li $t2 1
sw $t2 -4144($fp)
LABEL17:
lw $t0 -4144($fp)
beq $t0 $zero LABEL4
lw $t0 -4104($fp)
lw $t1 -4112($fp)
li $s6 4
mul $s6 $s6 $t1
subi $s7 $fp 4100
add $s7 $s7 $s6
sw $t0 0($s7)
LABEL4:
LABEL2:
lw $t0 -4104($fp)
li $t1 1
add $t0 $t0 $t1
sw $t0 -4144($fp)
lw $t0 -4144($fp)
sw $t0 -4104($fp)
lw $t0 -4104($fp)
lw $t1 -4108($fp)
blt $t0 $t1 LABEL18
sw $zero -4148($fp)
j LABEL19
LABEL18:
li $t2 1
sw $t2 -4148($fp)
LABEL19:
lw $t0 -4148($fp)
bne $t0 $zero LABEL1
lw $t0 -4116($fp)
li $t1 0
beq $t0 $t1 LABEL20
sw $zero -4144($fp)
j LABEL21
LABEL20:
li $t2 1
sw $t2 -4144($fp)
LABEL21:
lw $t0 -4144($fp)
beq $t0 $zero LABEL5
la $a0 S44
li $v0 4
syscall
lw $t0 -4108($fp)
move $a0 $t0
li $v0 1
syscall
li $t0 0
sw $t0 -4104($fp)
LABEL6:
lw $t0 -4104($fp)
li $s6 4
mul $s6 $s6 $t0
subi $s7 $fp 4100
add $s7 $s7 $s6
lw $t1 0($s7)
sw $t1 -4144($fp)
la $a0 S48
li $v0 4
syscall
lw $t0 -4144($fp)
move $a0 $t0
li $v0 1
syscall
lw $t0 -4104($fp)
li $t1 1
add $t0 $t0 $t1
sw $t0 -4144($fp)
lw $t0 -4144($fp)
sw $t0 -4104($fp)
lw $t0 -4104($fp)
lw $t1 -4112($fp)
ble $t0 $t1 LABEL22
sw $zero -4148($fp)
j LABEL23
LABEL22:
li $t2 1
sw $t2 -4148($fp)
LABEL23:
lw $t0 -4148($fp)
bne $t0 $zero LABEL6
la $a0 S53
li $v0 4
syscall
LABEL5:
lw $t0 -4108($fp)
li $t1 1
add $t0 $t0 $t1
sw $t0 -4144($fp)
lw $t0 -4144($fp)
sw $t0 -4108($fp)
lw $t0 -4108($fp)
li $t1 1024
blt $t0 $t1 LABEL24
sw $zero -4148($fp)
j LABEL25
LABEL24:
li $t2 1
sw $t2 -4148($fp)
LABEL25:
lw $t0 -4148($fp)
bne $t0 $zero LABEL0
la $a0 S59
li $v0 4
syscall
li $t0 0
sw $t0 -4132($fp)
li $t0 1
sw $t0 -4136($fp)
li $t0 2
sw $t0 -4124($fp)
LABEL7:
lw $t0 -4124($fp)
li $t1 1
sub $t0 $t0 $t1
sw $t0 -4144($fp)
lw $t0 -4144($fp)
sw $t0 -4128($fp)
li $t0 2
sw $t0 -4104($fp)
LABEL8:
lw $t0 -4124($fp)
lw $t1 -4104($fp)
div $t0 $t1
mflo $t0
sw $t0 -4144($fp)
lw $t0 -4144($fp)
lw $t1 -4104($fp)
mul $t0 $t0 $t1
sw $t0 -4148($fp)
lw $t0 -4148($fp)
sw $t0 -4140($fp)
lw $t0 -4140($fp)
lw $t1 -4124($fp)
beq $t0 $t1 LABEL26
sw $zero -4144($fp)
j LABEL27
LABEL26:
li $t2 1
sw $t2 -4144($fp)
LABEL27:
lw $t0 -4144($fp)
beq $t0 $zero LABEL9
li $t0 0
sw $t0 -4136($fp)
LABEL9:
lw $t0 -4104($fp)
li $t1 1
add $t0 $t0 $t1
sw $t0 -4144($fp)
lw $t0 -4144($fp)
sw $t0 -4104($fp)
lw $t0 -4104($fp)
lw $t1 -4128($fp)
ble $t0 $t1 LABEL28
sw $zero -4148($fp)
j LABEL29
LABEL28:
li $t2 1
sw $t2 -4148($fp)
LABEL29:
lw $t0 -4148($fp)
bne $t0 $zero LABEL8
lw $t0 -4136($fp)
li $t1 1
beq $t0 $t1 LABEL30
sw $zero -4144($fp)
j LABEL31
LABEL30:
li $t2 1
sw $t2 -4144($fp)
LABEL31:
lw $t0 -4144($fp)
beq $t0 $zero LABEL10
la $a0 S81
li $v0 4
syscall
lw $t0 -4124($fp)
move $a0 $t0
li $v0 1
syscall
lw $t0 -4132($fp)
li $t1 1
add $t0 $t0 $t1
sw $t0 -4144($fp)
lw $t0 -4144($fp)
sw $t0 -4132($fp)
lw $t0 -4132($fp)
li $t1 10
div $t0 $t1
mflo $t0
sw $t0 -4144($fp)
lw $t0 -4144($fp)
li $t1 10
mul $t0 $t0 $t1
sw $t0 -4148($fp)
lw $t0 -4148($fp)
sw $t0 -4140($fp)
lw $t0 -4140($fp)
lw $t1 -4132($fp)
beq $t0 $t1 LABEL32
sw $zero -4144($fp)
j LABEL33
LABEL32:
li $t2 1
sw $t2 -4144($fp)
LABEL33:
lw $t0 -4144($fp)
beq $t0 $zero LABEL11
la $a0 S89
li $v0 4
syscall
LABEL11:
LABEL10:
li $t0 1
sw $t0 -4136($fp)
lw $t0 -4124($fp)
li $t1 1
add $t0 $t0 $t1
sw $t0 -4144($fp)
lw $t0 -4144($fp)
sw $t0 -4124($fp)
lw $t0 -4124($fp)
li $t1 1024
ble $t0 $t1 LABEL34
sw $zero -4148($fp)
j LABEL35
LABEL34:
li $t2 1
sw $t2 -4148($fp)
LABEL35:
lw $t0 -4148($fp)
bne $t0 $zero LABEL7
la $a0 S97
li $v0 4
syscall
lw $t0 -4132($fp)
move $a0 $t0
li $v0 1
syscall
lw $ra -4($fp)
addi $sp $fp 4
lw $fp 0($fp)
jr $ra
main:
move $s7 $fp
move $fp $sp
subi $fp $fp 4
sw $s7 0($fp)
sw $ra -4($fp)
subi $sp $sp 8
jal complete_num
li $v0 10
syscall
| 14.682081 | 81 | 0.601181 |
4fcdd599ebf9209a114b3e7c74ab0b6b114e9f70 | 2,845 | asm | Assembly | KickAssembler/Examples/CharConverter_and_Scroll/2x2scroll.asm | hculpan/6502-sbc | 83afc86caa61d6e0781a806f9fefddccc6d74073 | [
"MIT"
] | null | null | null | KickAssembler/Examples/CharConverter_and_Scroll/2x2scroll.asm | hculpan/6502-sbc | 83afc86caa61d6e0781a806f9fefddccc6d74073 | [
"MIT"
] | null | null | null | KickAssembler/Examples/CharConverter_and_Scroll/2x2scroll.asm | hculpan/6502-sbc | 83afc86caa61d6e0781a806f9fefddccc6d74073 | [
"MIT"
] | null | null | null |
.pc =$0801 "Basic Upstart Program"
:BasicUpstart($0810)
//---------------------------------------------------------
//---------------------------------------------------------
// 2x2 Scroll
//---------------------------------------------------------
//---------------------------------------------------------
.var music = LoadSid("My_Glamrous_Life.sid")
.pc = $0810 "Main Program"
ldx #0
!loop:
.for(var i=0; i<4; i++) {
lda #$20
sta $0400+i*$100,x
lda #$0f
sta $d800+i*$100,x
}
inx
bne !loop-
lda #$00
sta $d020
sta $d021
ldx #0
ldy #0
lda #music.startSong-1
jsr music.init
sei
lda #<irq1
sta $0314
lda #>irq1
sta $0315
asl $d019
lda #$7b
sta $dc0d
lda #$81
sta $d01a
lda #$1b
sta $d011
lda #$80
sta $d012
cli
this: jmp this
//---------------------------------------------------------
irq1:
asl $d019
inc $d020
jsr music.play
inc $d020
jsr scroll
lda #$c0
ora scroll_xpos
sta $d016
lda #$1e
sta $d018
lda #0
sta $d020
pla
tay
pla
tax
pla
rti
//---------------------------------------------------------
.var scroll_screen = $0400
scroll:
lda scroll_xpos
sec
sbc scroll_speed
and #$07
sta scroll_xpos
bcc !moveChars+
rts
!moveChars:
// Move the chars
ldx #0
!loop:
lda scroll_screen+1,x
sta scroll_screen,x
lda scroll_screen+1+40,x
sta scroll_screen+40,x
inx
cpx #40
bne !loop-
// print the new chars
!txtPtr: lda scroll_text
cmp #$ff
bne !noWrap+
lda #<scroll_text
sta !txtPtr-+1
lda #>scroll_text
sta !txtPtr-+2
jmp !txtPtr-
!noWrap:
ora scroll_charNo
sta scroll_screen+39
clc
adc #$40
sta scroll_screen+39+40
// Advance textpointer
lda scroll_charNo
eor #$80
sta scroll_charNo
bne !over+
!incr:
inc !txtPtr-+1
bne !over+
inc !txtPtr-+2
!over:
rts
scroll_xpos: .byte 0
scroll_speed: .byte 2
scroll_charNo: .byte 0
scroll_text:
.text "hello world.. here is a scroll with a converted charset. the charset was "
.text "drawn by trifox who asked how to convert it on csdb. this is a quick example of "
.text "how it can be done in kick assembler... .. .. . . . "
.byte $ff
//---------------------------------------------------------
.pc=music.location "Music"
.fill music.size, music.getData(i)
//---------------------------------------------------------
.pc = $3800
.var charsetPic = LoadPicture("2x2char.gif", List().add($000000, $ffffff))
.function picToCharset(byteNo, picture) {
.var ypos = [byteNo&7] + 8*[[byteNo>>9]&1]
.var xpos = 2*[[byteNo>>3]&$3f] + [[byteNo>>10]&1]
.return picture.getSinglecolorByte(xpos,ypos)
}
.fill $800, picToCharset(i,charsetPic)
| 19.486301 | 90 | 0.493146 |
d30311fa1255adfecf074650e7d455b00e4460bf | 183 | asm | Assembly | code/5-E-3.asm | gdzhang2012/Assembly-Language-by-Wangshuang | 7c53cfc60d83c19165e674d66015759f49663985 | [
"Apache-2.0"
] | null | null | null | code/5-E-3.asm | gdzhang2012/Assembly-Language-by-Wangshuang | 7c53cfc60d83c19165e674d66015759f49663985 | [
"Apache-2.0"
] | null | null | null | code/5-E-3.asm | gdzhang2012/Assembly-Language-by-Wangshuang | 7c53cfc60d83c19165e674d66015759f49663985 | [
"Apache-2.0"
] | null | null | null | assume cs:code
code segment
mov ax,cs
mov ds,ax
mov ax,0020h
mov es,ax
mov bx,0
mov cx,17h
s: mov al,[bx]
mov es:[bx],al
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end
| 9.631579 | 15 | 0.666667 |
852204b9b01f15127a6373bcea16127e83c08f41 | 5,560 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48.log_7611_469.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48.log_7611_469.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48.log_7611_469.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 %r13
push %r8
push %r9
push %rax
push %rbx
push %rdx
lea addresses_D_ht+0xda1f, %rdx
nop
sub %rbx, %rbx
and $0xffffffffffffffc0, %rdx
vmovaps (%rdx), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $1, %xmm0, %r9
nop
nop
and $14538, %rax
lea addresses_D_ht+0x36bf, %rbx
add $50842, %r8
movups (%rbx), %xmm3
vpextrq $1, %xmm3, %r13
xor %r8, %r8
pop %rdx
pop %rbx
pop %rax
pop %r9
pop %r8
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r15
push %r8
push %r9
push %rax
push %rbp
push %rsi
// Store
lea addresses_normal+0x1e91f, %r9
and $37959, %rax
movl $0x51525354, (%r9)
nop
nop
nop
add %r15, %r15
// Load
mov $0x2cc5f8000000009f, %r8
nop
nop
nop
nop
sub $29616, %rsi
movb (%r8), %r9b
nop
nop
nop
xor %rsi, %rsi
// Load
lea addresses_D+0x11f1f, %r9
nop
nop
sub %rbp, %rbp
mov (%r9), %r15
nop
cmp $34083, %r15
// Store
lea addresses_normal+0x1e91f, %r8
cmp $42131, %rsi
movw $0x5152, (%r8)
nop
nop
cmp $23, %rsi
// Store
mov $0x3a5f6d0000000e3f, %rsi
clflush (%rsi)
nop
add %rbp, %rbp
mov $0x5152535455565758, %r15
movq %r15, %xmm7
vmovups %ymm7, (%rsi)
and %r9, %r9
// Faulty Load
lea addresses_normal+0x1e91f, %rbp
nop
cmp $15973, %r14
movb (%rbp), %al
lea oracles, %r15
and $0xff, %rax
shlq $12, %rax
mov (%r15,%rax,1), %rax
pop %rsi
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r15
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': True, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 6, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': True, 'congruent': 8, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}}
{'52': 7611}
52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52
*/
| 44.126984 | 2,999 | 0.652878 |
d13801b6cc615c7d496bc42e202bfa1b7029a44d | 329 | asm | Assembly | programs/oeis/057/A057367.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/057/A057367.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/057/A057367.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A057367: a(n) = floor(11*n/30).
; 0,0,0,1,1,1,2,2,2,3,3,4,4,4,5,5,5,6,6,6,7,7,8,8,8,9,9,9,10,10,11,11,11,12,12,12,13,13,13,14,14,15,15,15,16,16,16,17,17,17,18,18,19,19,19,20,20,20,21,21,22,22,22,23,23,23,24,24,24,25,25,26,26,26,27,27,27,28,28,28,29,29,30,30,30,31,31,31,32,32,33,33,33,34,34,34,35,35,35,36
mul $0,11
div $0,30
| 54.833333 | 273 | 0.617021 |
60ebd553ee7d61c62ad3a95cd92716491644d204 | 4,735 | asm | Assembly | audio/music/museumguy.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | 1 | 2022-02-15T00:19:44.000Z | 2022-02-15T00:19:44.000Z | audio/music/museumguy.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | audio/music/museumguy.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | Music_MuseumGuy_Ch1::
tempo 128
volume 7, 7
duty_cycle 2
toggle_perfect_pitch
note_type 12, 11, 1
octave 3
note B_, 2
note A_, 2
note G#, 2
note A_, 2
note G#, 2
note F#, 2
note E_, 2
note D#, 2
octave 2
note B_, 4
note B_, 1
octave 3
note D#, 1
note E_, 1
note G#, 1
note B_, 10
sound_call Music_MuseumGuy_branch_ade7
sound_call Music_MuseumGuy_branch_adec
sound_call Music_MuseumGuy_branch_ade7
note E_, 4
note E_, 4
note E_, 2
note E_, 6
Music_MuseumGuy_branch_add6::
sound_call Music_MuseumGuy_branch_ade7
sound_call Music_MuseumGuy_branch_adec
sound_call Music_MuseumGuy_branch_ade7
note E_, 4
note E_, 4
note E_, 2
note E_, 6
sound_loop 0, Music_MuseumGuy_branch_add6
Music_MuseumGuy_branch_ade7::
note E_, 2
note E_, 6
note F#, 2
note F#, 6
sound_ret
Music_MuseumGuy_branch_adec::
note E_, 2
note E_, 6
note D_, 2
note D_, 6
sound_ret
Music_MuseumGuy_Ch2::
duty_cycle 2
note_type 12, 12, 1
octave 4
note E_, 2
note D_, 2
note C#, 2
note D_, 2
note C#, 2
octave 3
note B_, 2
note A_, 2
note G#, 2
note E_, 4
note E_, 1
note G#, 1
note B_, 1
octave 4
note D#, 1
note E_, 8
octave 3
note A_, 2
octave 4
note C#, 2
note E_, 4
note D_, 2
note F#, 2
note A_, 4
octave 3
note A_, 2
octave 4
note C#, 2
note E_, 4
note D_, 2
note C#, 2
octave 3
note B_, 4
note A_, 2
octave 4
note C#, 2
note E_, 4
note D_, 2
note F#, 2
note A_, 2
note A_, 2
note G#, 2
note E_, 2
note F#, 2
note G#, 2
note A_, 2
note A_, 2
note A_, 4
Music_MuseumGuy_branch_ae26::
octave 3
note A_, 2
octave 4
note C#, 2
note E_, 3
note_type 12, 8, 1
note E_, 1
note_type 12, 12, 1
note D_, 2
note F#, 2
note A_, 3
note_type 12, 9, 1
note A_, 1
note_type 12, 12, 1
octave 3
note A_, 2
octave 4
note C#, 2
note E_, 4
note D_, 1
note C#, 1
note C_, 1
octave 3
note B_, 1
note B_, 3
note_type 12, 10, 1
note G#, 1
note_type 12, 12, 1
note A_, 2
octave 4
note C#, 2
note E_, 3
note_type 12, 9, 1
note E_, 1
note_type 12, 12, 1
note D_, 2
note F#, 2
note A_, 3
note_type 12, 8, 1
note A_, 1
note_type 12, 12, 1
note G#, 2
note E_, 1
note_type 12, 8, 1
note E_, 1
note_type 12, 12, 1
note F#, 2
note_type 12, 8, 1
note F#, 1
note_type 12, 12, 1
note G#, 1
note A_, 2
note A_, 2
note A_, 4
sound_loop 0, Music_MuseumGuy_branch_ae26
Music_MuseumGuy_Ch3::
note_type 12, 1, 0
rest 16
octave 4
note E_, 1
rest 3
note E_, 1
rest 3
note E_, 1
rest 9
sound_call Music_MuseumGuy_branch_aeb8
note A_, 1
rest 1
note A_, 1
rest 5
note G#, 1
rest 1
note G#, 1
rest 5
sound_call Music_MuseumGuy_branch_aeb8
note B_, 1
rest 3
note G#, 1
rest 3
note A_, 1
rest 1
note A_, 1
rest 3
Music_MuseumGuy_branch_ae8e::
sound_call Music_MuseumGuy_branch_aec1
rest 3
octave 6
note E_, 1
rest 1
octave 5
note A_, 1
rest 1
note A_, 1
rest 3
note B_, 1
rest 1
note G#, 1
rest 1
note G#, 1
rest 3
sound_call Music_MuseumGuy_branch_aec1
rest 1
octave 6
note E_, 1
rest 1
note D_, 1
rest 1
octave 5
note B_, 1
rest 1
note A_, 1
rest 1
note G#, 1
rest 3
note A_, 1
rest 1
note A_, 1
rest 3
sound_loop 0, Music_MuseumGuy_branch_ae8e
Music_MuseumGuy_branch_aeb8::
note A_, 1
rest 1
note A_, 1
rest 5
note A_, 1
rest 1
note A_, 1
rest 5
sound_ret
Music_MuseumGuy_branch_aec1::
octave 6
note C#, 1
rest 1
octave 5
note A_, 1
rest 1
note A_, 1
rest 3
octave 6
note F#, 1
rest 1
octave 5
note A_, 1
rest 1
note A_, 1
sound_ret
Music_MuseumGuy_Ch4::
drum_speed 12
rest 16
rest 16
rest 16
rest 16
rest 16
rest 14
drum_speed 6
drum_note 19, 1
drum_note 19, 1
drum_note 18, 1
drum_note 18, 1
Music_MuseumGuy_branch_aee1::
drum_note 17, 4
drum_note 17, 6
drum_note 17, 2
drum_note 17, 2
drum_note 17, 2
drum_note 17, 4
drum_note 17, 2
drum_note 19, 1
drum_note 19, 1
drum_note 17, 6
drum_note 19, 1
drum_note 19, 1
drum_note 17, 4
drum_note 17, 6
drum_note 17, 2
drum_note 18, 1
drum_note 18, 1
drum_note 17, 2
drum_note 17, 2
drum_note 17, 2
drum_note 19, 1
drum_note 19, 1
drum_note 18, 1
drum_note 18, 1
drum_note 17, 6
drum_note 17, 2
drum_note 17, 4
drum_note 17, 4
drum_note 19, 1
drum_note 19, 1
drum_note 17, 2
drum_note 18, 1
drum_note 18, 1
drum_note 17, 2
drum_note 17, 4
drum_note 17, 4
drum_note 17, 2
drum_note 19, 1
drum_note 19, 1
drum_note 18, 1
drum_note 18, 1
drum_note 17, 2
drum_note 17, 2
drum_note 17, 4
drum_note 17, 2
drum_note 19, 1
drum_note 19, 1
drum_note 18, 1
drum_note 18, 1
drum_note 17, 6
drum_note 19, 1
drum_note 19, 1
drum_note 17, 4
drum_note 17, 4
drum_note 19, 1
drum_note 19, 1
drum_note 18, 1
drum_note 18, 1
sound_loop 0, Music_MuseumGuy_branch_aee1
| 14.008876 | 42 | 0.683844 |
ef8e5a73471542491c7ec92bff32f50fd4e90cc1 | 793 | asm | Assembly | oeis/142/A142508.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/142/A142508.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/142/A142508.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A142508: Primes congruent to 1 mod 52.
; Submitted by Jon Maiga
; 53,157,313,521,677,937,1093,1249,1301,1613,1873,2029,2081,2237,2341,2393,2549,2861,3121,3329,3433,3797,4057,4421,4733,4889,4993,5669,5981,6397,6449,6553,6709,6761,6917,7177,7229,7333,7489,7541,7853,8009,8269,8581,8737,8893,9049,9257,9413,9829,10037,10141,10193,10453,10973,11597,11701,11909,12377,12637,12689,13001,13313,13417,13469,13729,13781,14197,14249,14561,14717,14821,15289,15497,15601,15809,15913,16069,16381,16433,16693,16901,17317,17681,17837,18097,18149,18253,18461,18617,18773,19501
mov $2,$0
add $2,6
pow $2,2
lpb $2
mov $3,$4
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
mov $1,$0
max $1,0
cmp $1,$0
mul $2,$1
sub $2,1
add $4,52
lpe
mov $0,$4
add $0,1
| 37.761905 | 496 | 0.7314 |
77fa0e9bad33188e0c97e929893b90eb3f4b0198 | 6,168 | asm | Assembly | Transynther/x86/_processed/NC/_st_zr_4k_/i7-7700_9_0x48_notsx.log_21829_480.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_st_zr_4k_/i7-7700_9_0x48_notsx.log_21829_480.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_st_zr_4k_/i7-7700_9_0x48_notsx.log_21829_480.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 %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x1e745, %rbp
inc %rdx
movups (%rbp), %xmm0
vpextrq $1, %xmm0, %r11
nop
nop
nop
nop
sub %r9, %r9
lea addresses_A_ht+0x108e5, %r8
and %r12, %r12
mov $0x6162636465666768, %rdi
movq %rdi, %xmm0
movups %xmm0, (%r8)
nop
nop
nop
nop
cmp %r9, %r9
lea addresses_UC_ht+0x1577f, %rdi
nop
nop
nop
nop
nop
cmp $14423, %r11
mov (%rdi), %r12d
dec %r12
lea addresses_WT_ht+0x8c75, %r12
nop
nop
nop
nop
add %r8, %r8
movb (%r12), %r9b
nop
and %r9, %r9
lea addresses_D_ht+0x130e5, %rsi
lea addresses_WT_ht+0x13205, %rdi
nop
nop
nop
add $32311, %rdx
mov $27, %rcx
rep movsl
nop
nop
sub %rcx, %rcx
lea addresses_A_ht+0x15cc5, %r12
nop
nop
nop
nop
nop
sub %rsi, %rsi
movups (%r12), %xmm7
vpextrq $1, %xmm7, %rcx
nop
nop
add $28001, %r9
lea addresses_normal_ht+0x973d, %rsi
lea addresses_WC_ht+0x5fe5, %rdi
clflush (%rdi)
nop
nop
nop
nop
xor $40039, %rbp
mov $112, %rcx
rep movsl
dec %rdi
lea addresses_normal_ht+0x1545, %r11
dec %rbp
mov (%r11), %rdi
cmp $4693, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r8
push %r9
push %rbp
push %rdi
push %rsi
// Store
lea addresses_A+0x138e5, %rdi
and %r9, %r9
mov $0x5152535455565758, %r11
movq %r11, %xmm0
vmovups %ymm0, (%rdi)
nop
nop
nop
nop
nop
sub $10691, %rbp
// Faulty Load
mov $0x46f87100000008e5, %r9
nop
nop
nop
xor %r8, %r8
mov (%r9), %r11w
lea oracles, %rsi
and $0xff, %r11
shlq $12, %r11
mov (%rsi,%r11,1), %r11
pop %rsi
pop %rdi
pop %rbp
pop %r9
pop %r8
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_NC', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A', 'congruent': 11}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_NC', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_D_ht', 'congruent': 1}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A_ht', 'congruent': 8}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 4}}
{'dst': {'same': True, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A_ht', 'congruent': 1}}
{'dst': {'same': True, 'congruent': 8, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 5}}
{'58': 3823, '00': 18006}
58 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 58 58 58 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 58 58 58 58 58 58 58 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 58 58 00 58 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 00 58 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 58 58 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 39.037975 | 2,999 | 0.656128 |
aa4dea3086dc8062dd461efd847709f899b5b8c1 | 904 | asm | Assembly | programs/oeis/044/A044910.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/044/A044910.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/044/A044910.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A044910: Numbers whose base-9 run lengths alternate: odd, even, odd, ...
; 1,2,3,4,5,6,7,8,81,91,101,111,121,131,141,151,161,162,172,182,192,202,212,222,232,242,243,253,263,273,283,293,303,313,323,324,334,344,354,364,374,384,394,404,405,415,425,435,445,455
mov $2,$0
add $2,1
mov $7,$0
lpb $2
mov $0,$7
sub $2,1
sub $0,$2
mov $8,2
mov $11,$0
lpb $8
mov $0,$11
sub $8,1
add $0,$8
sub $0,1
mov $3,$0
div $0,7
add $0,$3
mov $5,9
mov $6,0
mov $10,$3
lpb $0
mov $4,1
pow $5,2
sub $10,6
add $4,$10
add $4,7
mul $4,4
mov $10,18
mul $10,$4
div $10,$5
mov $0,$10
mov $5,6
mov $6,$10
lpe
mov $4,$6
mov $9,$8
lpb $9
sub $9,1
mov $12,$4
lpe
lpe
lpb $11
mov $11,0
sub $12,$4
lpe
mov $4,$12
mul $4,9
add $4,1
add $1,$4
lpe
mov $0,$1
| 16.436364 | 183 | 0.487832 |
afa233e3018870ab32e36eaf6d481230c01be762 | 144 | asm | Assembly | libsrc/_DEVELOPMENT/font/fzx/fonts/kk/_ff_kk_MischkeLatin1.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/font/fzx/fonts/kk/_ff_kk_MischkeLatin1.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/font/fzx/fonts/kk/_ff_kk_MischkeLatin1.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION rodata_font
SECTION rodata_font_fzx
PUBLIC _ff_kk_MischkeLatin1
_ff_kk_MischkeLatin1:
BINARY "font/fzx/fonts/kk/Mischke_Latin1.fzx"
| 14.4 | 45 | 0.854167 |
e81353b2e2a81be75301a939d1b73132a8cdc3c8 | 488 | asm | Assembly | src/cmtCrypMx86.asm | dexnab/CommonCtil | 3831c3affbf0c170d7e9ab5a6ebc56f964389ca6 | [
"MIT"
] | null | null | null | src/cmtCrypMx86.asm | dexnab/CommonCtil | 3831c3affbf0c170d7e9ab5a6ebc56f964389ca6 | [
"MIT"
] | null | null | null | src/cmtCrypMx86.asm | dexnab/CommonCtil | 3831c3affbf0c170d7e9ab5a6ebc56f964389ca6 | [
"MIT"
] | null | null | null | ;cmtCryp assembly support
;i386 version for masm
.model flat
.code
;cx dx
;void cmtRealRand(cmtUint64* buf, cmtUint64 len)
@cmtRealRand@8 proc
push ebx
mov ebx, ecx
xor ecx, ecx
;ebx = buf
;edx = len
;ecx = r
cRR_GenLoopStart:
cmp ecx, edx
jae cRR_End
;生成随机数
cRR_GenRand:
rdrand eax
;检查结果,失败重来
jnc cRR_GenRand
;写入数组
mov dword ptr [ebx + ecx*4], eax
;i++
inc ecx
jmp cRR_GenLoopStart
cRR_End:
pop ebx
ret
@cmtRealRand@8 endp
end | 13.942857 | 49 | 0.657787 |
8973ad1f2ce3358ef492de83b64f3b03850c9686 | 218 | asm | Assembly | hello.asm | JesusCrie/MoreOrLessAssembly | c6ebf9b33507638628041d7ca8c608e1b293e014 | [
"MIT"
] | 4 | 2019-05-13T19:00:20.000Z | 2019-07-08T20:54:28.000Z | hello.asm | JesusCrie/MoreOrLessAssembly | c6ebf9b33507638628041d7ca8c608e1b293e014 | [
"MIT"
] | null | null | null | hello.asm | JesusCrie/MoreOrLessAssembly | c6ebf9b33507638628041d7ca8c608e1b293e014 | [
"MIT"
] | null | null | null | global main
extern printf
section .text ; code section
main:
lea rdi, qword [hello] ; pointer string
mov eax, 0
call printf
section .rodata ; read only section (constant)
hello db "Hello World", 0x0a, 0x00 | 16.769231 | 48 | 0.711009 |
83a2e98069dd41d687b22d0b1ff7a96bb07241e5 | 4,951 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_173.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_0xca.log_21829_173.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_0xca.log_21829_173.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 %r14
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x82fd, %rsi
lea addresses_normal_ht+0x733d, %rdi
nop
nop
nop
nop
dec %r9
mov $43, %rcx
rep movsl
nop
nop
inc %r8
lea addresses_WC_ht+0x10b33, %rsi
lea addresses_normal_ht+0x743d, %rdi
nop
nop
cmp $48899, %rbx
mov $56, %rcx
rep movsl
nop
nop
nop
sub %rbx, %rbx
lea addresses_normal_ht+0x7cb5, %r9
nop
cmp %r14, %r14
movb $0x61, (%r9)
nop
nop
sub $27463, %r14
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r15
push %rbx
push %rdi
push %rsi
// Store
lea addresses_normal+0xf01d, %r14
cmp %r15, %r15
mov $0x5152535455565758, %rdi
movq %rdi, %xmm1
and $0xffffffffffffffc0, %r14
movntdq %xmm1, (%r14)
nop
nop
sub %rsi, %rsi
// Faulty Load
lea addresses_normal+0xe43d, %r15
nop
nop
nop
nop
add $13394, %rdi
mov (%r15), %rsi
lea oracles, %rdi
and $0xff, %rsi
shlq $12, %rsi
mov (%rdi,%rsi,1), %rsi
pop %rsi
pop %rdi
pop %rbx
pop %r15
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 16, 'NT': True, 'type': 'addresses_normal'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 6, 'same': True, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': True, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal_ht'}}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 49.019802 | 2,999 | 0.66532 |
0f160ab4af1941deb47c19746a78127b04ee0d8e | 426 | asm | Assembly | programs/oeis/002/A002740.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/002/A002740.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/002/A002740.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A002740: Number of tree-rooted bridgeless planar maps with two vertices and n faces.
; 0,0,0,2,15,84,420,1980,9009,40040,175032,755820,3233230,13728792,57946200,243374040,1017958725,4242920400,17631691440,73078721100,302202005490,1247182879800,5137916074200,21132472200840,86794082253450,356013544661424,1458583920435600,5969389748449400
mov $1,$0
trn $1,2
mov $2,1
add $2,$0
sub $2,2
mul $2,2
bin $2,$1
mul $1,$2
div $1,2
| 32.769231 | 252 | 0.79108 |
3f5996119c1a617139e51bb0cb3af2b15f7f7f68 | 7,881 | asm | Assembly | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca_notsx.log_21829_1695.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca_notsx.log_21829_1695.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca_notsx.log_21829_1695.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 %r15
push %r8
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x3fec, %r10
nop
nop
nop
nop
and $28987, %rdx
movups (%r10), %xmm5
vpextrq $1, %xmm5, %rbx
nop
nop
nop
nop
and $17077, %rbx
lea addresses_UC_ht+0x2a52, %r8
nop
add $59719, %r11
mov (%r8), %r15d
nop
nop
nop
nop
inc %r10
lea addresses_WT_ht+0x17852, %rsi
lea addresses_WC_ht+0x10112, %rdi
xor $43760, %r8
mov $96, %rcx
rep movsl
nop
nop
nop
and %rbx, %rbx
lea addresses_D_ht+0x15e52, %rsi
nop
nop
nop
nop
nop
and %r15, %r15
movb (%rsi), %r8b
nop
nop
add %rcx, %rcx
lea addresses_WT_ht+0x47e3, %rbx
nop
nop
and $2173, %r11
movb (%rbx), %r15b
nop
nop
nop
cmp $12603, %r8
lea addresses_A_ht+0x1c2d2, %r11
nop
add %rdx, %rdx
mov (%r11), %cx
xor %r10, %r10
lea addresses_WT_ht+0x1a252, %r8
nop
cmp $18610, %r15
movw $0x6162, (%r8)
nop
nop
nop
nop
inc %rsi
lea addresses_WT_ht+0x1af72, %rsi
lea addresses_UC_ht+0xc3a2, %rdi
nop
add $14868, %r11
mov $108, %rcx
rep movsb
nop
nop
nop
nop
dec %rdi
lea addresses_UC_ht+0x10e81, %r8
nop
nop
nop
sub $60345, %r15
mov (%r8), %dx
nop
nop
nop
nop
inc %rdi
lea addresses_UC_ht+0x111e2, %r10
nop
nop
xor %rdx, %rdx
movb $0x61, (%r10)
nop
nop
nop
nop
cmp $30594, %rsi
lea addresses_WC_ht+0x14e52, %rbx
nop
cmp %rdi, %rdi
mov $0x6162636465666768, %r8
movq %r8, (%rbx)
nop
add $58554, %r10
lea addresses_D_ht+0x18652, %rsi
nop
nop
nop
and $51674, %rbx
movw $0x6162, (%rsi)
nop
xor $62762, %rbx
lea addresses_WT_ht+0x17052, %rcx
nop
nop
sub $32797, %r10
and $0xffffffffffffffc0, %rcx
movntdqa (%rcx), %xmm6
vpextrq $0, %xmm6, %rdx
nop
nop
add %r8, %r8
lea addresses_WT_ht+0x1d52, %rsi
lea addresses_normal_ht+0x18622, %rdi
clflush (%rsi)
add %r11, %r11
mov $123, %rcx
rep movsq
nop
nop
nop
nop
nop
sub %rsi, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r15
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r8
push %rax
push %rbx
push %rcx
push %rsi
// Store
lea addresses_A+0x1510a, %rcx
cmp %rax, %rax
movw $0x5152, (%rcx)
nop
nop
nop
nop
add $46011, %r10
// Load
lea addresses_UC+0x1ca52, %rbx
and $12841, %r8
vmovups (%rbx), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $1, %xmm5, %r14
nop
nop
nop
nop
nop
add %r10, %r10
// Faulty Load
mov $0x1b82500000000a52, %r10
nop
nop
add $64524, %r14
mov (%r10), %ebx
lea oracles, %r14
and $0xff, %rbx
shlq $12, %rbx
mov (%r14,%rbx,1), %rbx
pop %rsi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 11}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 11}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}}
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WC_ht', 'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 8}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_normal_ht'}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 33.53617 | 2,999 | 0.652963 |
9478e0513f43abcefabbea7c87922985d94df47b | 178 | asm | Assembly | data/wildPokemon/seafoamisland1.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | null | null | null | data/wildPokemon/seafoamisland1.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | null | null | null | data/wildPokemon/seafoamisland1.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | null | null | null | IslandMons1:
db $0F
db 28,GLIGAR
db 25,KRABBY
db 27,KRABBY
db 27,SNEASEL
db 36,SNEASEL
db 28,SLOWPOKE
db 30,SLOWPOKE
db 28,JYNX
db 27,BOMBSEEKER
db 36,GOLBAT
db $00
| 11.866667 | 17 | 0.713483 |
ce93f244792c601329a75d477b7f9130f5dda247 | 1,268 | asm | Assembly | book-01/Assembly/asm/avx-2/scalar/avx2_s_flagless_instructions.asm | gfurtadoalmeida/study-assembly-x64 | 4acdefb015d44706c60bd7ea5d94f726c4dbcbb4 | [
"MIT"
] | 2 | 2021-02-27T04:50:26.000Z | 2022-03-15T23:27:12.000Z | book-01/Assembly/asm/avx-2/scalar/avx2_s_flagless_instructions.asm | gfurtadoalmeida/study-assembly-x64 | 4acdefb015d44706c60bd7ea5d94f726c4dbcbb4 | [
"MIT"
] | null | null | null | book-01/Assembly/asm/avx-2/scalar/avx2_s_flagless_instructions.asm | gfurtadoalmeida/study-assembly-x64 | 4acdefb015d44706c60bd7ea5d94f726c4dbcbb4 | [
"MIT"
] | null | null | null | .code
; uint64_t AVX2_Scalar_Flagless_Multiply_UInt_(uint32_t a, uint32_t b, uint64_t flags[2])
AVX2_Scalar_Flagless_Multiply_UInt_ proc
; Save original flags
pushfq
pop rax
mov qword ptr [r8], rax
; Multiply the source operand (rcx) with rdx.
; Stores the low half of the result in the second operand and
; the high half of the result in the first operand.
; r10d = result[0:31]
; r11d = result[32:63]
mulx r11d, r10d, ecx
; Save flags after multiplication
pushfq
pop rax
mov qword ptr [r8+type qword], rax
; Build the result
mov eax, r10d
shl r11, 32
or rax, r11
ret
AVX2_Scalar_Flagless_Multiply_UInt_ endp
; void AVX2_Scalar_Flagless_Shift_UInt_(uint32_t value, uint32_t count, uint32_t results[3], uint64_t flags[4])
AVX2_Scalar_Flagless_Shift_UInt_ proc
; Save original flags
pushfq
pop rax
mov qword ptr [r9], rax
; Shifts:
; - Arithmetic right
; - Logical left
; - Logical right
;
; For each shift, the flags after the operation
; is saved.
sarx eax, ecx, edx
mov dword ptr [r8], eax
pushfq
pop rax
mov qword ptr [r9+8], rax
shlx eax, ecx, edx
mov dword ptr [r8+4], eax
pushfq
pop rax
mov qword ptr [r9+16], rax
shrx eax, ecx, edx
mov dword ptr [r8+8], eax
pushfq
pop rax
mov qword ptr [r9+24], rax
ret
AVX2_Scalar_Flagless_Shift_UInt_ endp
end | 18.114286 | 111 | 0.752366 |
29a1a716ced359afdd1d9dec75d8e792f397ff61 | 2,161 | asm | Assembly | src/test/ref/bool-ifs.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/test/ref/bool-ifs.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/test/ref/bool-ifs.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | // A test of boolean conditions using && || and !
// Commodore 64 PRG executable file
.file [name="bool-ifs.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
.segment Code
main: {
// bool_and()
jsr bool_and
// bool_or()
jsr bool_or
// bool_not()
jsr bool_not
// bool_complex()
jsr bool_complex
// }
rts
}
bool_and: {
.label screen = $400
ldx #0
__b1:
// i&1
txa
and #1
// if( (i<10) && ((i&1)==0) )
cpx #$a
bcs __b4
cmp #0
beq __b2
__b4:
// screen[i] = ' '
lda #' '
sta screen,x
__b3:
// for( byte i : 0..20)
inx
cpx #$15
bne __b1
// }
rts
__b2:
// screen[i] = '*'
lda #'*'
sta screen,x
jmp __b3
}
bool_or: {
.label screen = $428
ldx #0
__b1:
// i&1
txa
and #1
// if( (i<10) || ((i&1)==0) )
cpx #$a
bcc __b2
cmp #0
beq __b2
// screen[i] = ' '
lda #' '
sta screen,x
__b3:
// for( byte i : 0..20)
inx
cpx #$15
bne __b1
// }
rts
__b2:
// screen[i] = '*'
lda #'*'
sta screen,x
jmp __b3
}
bool_not: {
.label screen = $450
ldx #0
__b1:
// i&1
txa
and #1
// if( !((i<10) || (i&1)==0))
cpx #$a
bcc __b4
cmp #0
beq __b4
// screen[i] = '*'
lda #'*'
sta screen,x
__b3:
// for( byte i : 0..20)
inx
cpx #$15
bne __b1
// }
rts
__b4:
// screen[i] = ' '
lda #' '
sta screen,x
jmp __b3
}
bool_complex: {
.label screen = $478
ldx #0
__b1:
// i&1
txa
and #1
// if( ((i<10) && (i&1)==0) || !((i<10) || (i&1)==0) )
cpx #$a
bcs __b5
cmp #0
beq __b2
__b5:
cpx #$a
bcc __b4
cmp #0
beq __b4
__b2:
// screen[i] = '*'
lda #'*'
sta screen,x
__b3:
// for( byte i : 0..20)
inx
cpx #$15
bne __b1
// }
rts
__b4:
// screen[i] = ' '
lda #' '
sta screen,x
jmp __b3
}
| 15.21831 | 59 | 0.460435 |
5cbab270805dbc50108949bcbf0f862ad1b19c21 | 8,768 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca_notsx.log_21829_760.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca_notsx.log_21829_760.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca_notsx.log_21829_760.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 %r15
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0xcc6b, %rsi
nop
nop
nop
nop
inc %rbp
mov (%rsi), %r11d
nop
xor $14783, %rbx
lea addresses_WT_ht+0x8e4f, %rbx
nop
nop
nop
nop
nop
add $33688, %r10
movl $0x61626364, (%rbx)
nop
xor $34336, %rbx
lea addresses_normal_ht+0x718d, %rsi
lea addresses_normal_ht+0x1a46b, %rdi
nop
nop
nop
dec %r15
mov $63, %rcx
rep movsl
nop
dec %r10
lea addresses_WC_ht+0x14f6b, %rsi
lea addresses_A_ht+0x1154b, %rdi
sub %rbp, %rbp
mov $123, %rcx
rep movsb
xor %r10, %r10
lea addresses_A_ht+0x171eb, %rbx
nop
nop
nop
inc %rdi
movb $0x61, (%rbx)
nop
nop
nop
nop
inc %rbx
lea addresses_normal_ht+0xfa6b, %rsi
lea addresses_D_ht+0xb13d, %rdi
cmp %r10, %r10
mov $96, %rcx
rep movsb
nop
sub %rcx, %rcx
lea addresses_D_ht+0x1a6b, %rsi
lea addresses_UC_ht+0xf66b, %rdi
nop
nop
nop
nop
nop
sub %r11, %r11
mov $21, %rcx
rep movsl
nop
nop
nop
sub %rdi, %rdi
lea addresses_D_ht+0x1e5db, %rbp
nop
nop
nop
add $43667, %r10
movups (%rbp), %xmm2
vpextrq $0, %xmm2, %rdi
add %rbx, %rbx
lea addresses_WT_ht+0x5f6b, %rbx
clflush (%rbx)
nop
nop
nop
sub %r15, %r15
vmovups (%rbx), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %r10
add $63743, %rbp
lea addresses_A_ht+0x108eb, %rbp
nop
nop
nop
nop
and %rbx, %rbx
mov $0x6162636465666768, %r10
movq %r10, %xmm6
vmovups %ymm6, (%rbp)
sub %rsi, %rsi
lea addresses_A_ht+0xa5fc, %rbp
nop
nop
nop
nop
dec %r10
mov $0x6162636465666768, %r11
movq %r11, %xmm2
and $0xffffffffffffffc0, %rbp
vmovntdq %ymm2, (%rbp)
add $42374, %r11
lea addresses_WT_ht+0x1936b, %rbx
nop
nop
nop
cmp $18976, %r10
vmovups (%rbx), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rcx
nop
and %rdi, %rdi
lea addresses_D_ht+0x296b, %rsi
lea addresses_UC_ht+0x164f2, %rdi
nop
nop
cmp %r11, %r11
mov $33, %rcx
rep movsb
and $50422, %rbp
lea addresses_A_ht+0xf16b, %r15
clflush (%r15)
nop
xor %r10, %r10
mov $0x6162636465666768, %rdi
movq %rdi, %xmm4
movups %xmm4, (%r15)
nop
nop
nop
nop
nop
and %rcx, %rcx
lea addresses_WT_ht+0x346b, %rcx
nop
nop
nop
inc %r11
mov $0x6162636465666768, %rsi
movq %rsi, (%rcx)
nop
nop
nop
nop
add $48364, %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r15
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r15
push %r8
push %r9
push %rax
push %rbp
// Store
lea addresses_normal+0x1c46b, %r8
nop
nop
nop
xor %r15, %r15
mov $0x5152535455565758, %r10
movq %r10, (%r8)
nop
nop
nop
nop
nop
cmp %rbp, %rbp
// Store
lea addresses_D+0xa86b, %rax
nop
and %r9, %r9
mov $0x5152535455565758, %r15
movq %r15, %xmm1
vmovups %ymm1, (%rax)
nop
nop
nop
nop
and %r10, %r10
// Store
lea addresses_PSE+0x1c16b, %r8
nop
and $41432, %r13
mov $0x5152535455565758, %r10
movq %r10, %xmm4
vmovups %ymm4, (%r8)
nop
nop
nop
xor $54860, %r13
// Faulty Load
lea addresses_normal+0x1c46b, %r13
nop
nop
nop
nop
sub $55480, %rax
mov (%r13), %bp
lea oracles, %r10
and $0xff, %rbp
shlq $12, %rbp
mov (%r10,%rbp,1), %rbp
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r15
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 10, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 5, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 9, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
| 32.594796 | 2,999 | 0.658075 |
6bf155ab8dd2211460364001e6b8a67220eb8390 | 117 | asm | Assembly | backup/boot_sect3.asm | zurgeg/gbtos_opensource | f3305e0ba0a179651d0822cb2da737998f2e968b | [
"BSD-3-Clause"
] | null | null | null | backup/boot_sect3.asm | zurgeg/gbtos_opensource | f3305e0ba0a179651d0822cb2da737998f2e968b | [
"BSD-3-Clause"
] | 1 | 2019-11-30T17:17:56.000Z | 2019-11-30T17:17:56.000Z | backup/boot_sect3.asm | zurgeg/gbtos_opensource | f3305e0ba0a179651d0822cb2da737998f2e968b | [
"BSD-3-Clause"
] | null | null | null | [org 0x7c00]
mov ah, 0x0e
mov al, [the_secret]
int 0x10
the_secret:
db "X"
times 510-($-$$) db 0
dw 0xaa55 | 7.8 | 21 | 0.615385 |
11bc5af10d42d825f416d717d88114b978f0886b | 1,421 | asm | Assembly | libsrc/_DEVELOPMENT/arch/zxn/esxdos/z80/asm_esx_m_getsetdrv.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/arch/zxn/esxdos/z80/asm_esx_m_getsetdrv.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/arch/zxn/esxdos/z80/asm_esx_m_getsetdrv.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ; unsigned char esx_m_getdrv(void)
; unsigned char esx_m_setdrv(unsigned char drive)
INCLUDE "config_private.inc"
SECTION code_esxdos
PUBLIC asm_esx_m_getdrv
PUBLIC asm_esx_m_setdrv
EXTERN __esxdos_error_mc
asm_esx_m_getdrv:
IF __ZXNEXT
xor a
jr join
ELSE
ld l,0
ENDIF
asm_esx_m_setdrv:
; enter : l = drive
;
; exit : l = default drive
;
; uses : af, bc, de, hl
ld a,l
IF __ZXNEXT
or $01
join:
ENDIF
rst __ESX_RST_SYS
defb __ESX_M_GETSETDRV
ld l,a
ld h,0
ret nc
jp __esxdos_error_mc
; ***************************************************************************
; * M_GETSETDRV ($89) *
; ***************************************************************************
; Get or set the default drive.
; Entry:
; A=0, get the default drive
; A<>0, set the default drive to A
; bits 7..3=drive letter (0=A...15=P)
; bits 2..0=drive number (0) -- change: set a bit so drive A can be selected
; Exit (success):
; Fc=0
; A=default drive, encoded as:
; bits 7..3=drive letter (0=A...15=P)
; bits 2..0=drive number (0)
; Exit (failure):
; Fc=1
; A=error code
;
; NOTE:
; This call isn't really very useful, as it is not necessary to provide a
; specific drive to calls which need a drive/filename.
; For such calls, you can instead provide:
; A='*' use the default drive
; A='$' use the system drive (C:, where the NEXTOS and BIN directories are)
| 18.217949 | 77 | 0.593948 |
edd44c8f862380c92e2c185b29f7c307662119a0 | 6,154 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48_notsx.log_21829_1075.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48_notsx.log_21829_1075.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48_notsx.log_21829_1075.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 %r13
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0xc6fd, %rbx
nop
nop
nop
sub %rax, %rax
movb $0x61, (%rbx)
nop
nop
nop
cmp %rbp, %rbp
lea addresses_A_ht+0x18b59, %rsi
lea addresses_normal_ht+0xce09, %rdi
nop
nop
nop
nop
nop
sub %r11, %r11
mov $42, %rcx
rep movsb
sub %r13, %r13
lea addresses_WC_ht+0xe359, %rsi
lea addresses_D_ht+0x76f6, %rdi
nop
nop
nop
nop
xor %rbp, %rbp
mov $13, %rcx
rep movsl
xor $42633, %rsi
lea addresses_UC_ht+0x1cb59, %rdi
nop
nop
and %rbp, %rbp
mov (%rdi), %r13w
nop
inc %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r8
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_normal+0x1eb59, %rax
nop
nop
sub $2115, %r8
mov $0x5152535455565758, %rsi
movq %rsi, %xmm0
vmovups %ymm0, (%rax)
xor $46162, %rbx
// Store
lea addresses_WT+0xc329, %rdi
nop
nop
nop
inc %rcx
mov $0x5152535455565758, %rbx
movq %rbx, %xmm1
vmovups %ymm1, (%rdi)
nop
cmp $1854, %rax
// Store
lea addresses_WC+0x5b59, %rcx
clflush (%rcx)
nop
nop
nop
sub %r8, %r8
movl $0x51525354, (%rcx)
nop
nop
add %rax, %rax
// Store
lea addresses_RW+0x17179, %rbx
xor $64501, %rbp
movw $0x5152, (%rbx)
nop
nop
nop
nop
cmp $57009, %rdi
// Load
lea addresses_D+0x12ef9, %rax
nop
nop
add %r8, %r8
mov (%rax), %rbp
nop
nop
nop
nop
add %rsi, %rsi
// Faulty Load
lea addresses_normal+0x1eb59, %rdi
xor %r8, %r8
movb (%rdi), %al
lea oracles, %rbx
and $0xff, %rax
shlq $12, %rax
mov (%rbx,%rax,1), %rax
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r8
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal', 'congruent': 0}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT', 'congruent': 4}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WC', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_RW', 'congruent': 5}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_D', 'congruent': 5}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_normal', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WC_ht', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': True, 'congruent': 2, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 11, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 2, 'type': 'addresses_UC_ht', 'congruent': 8}}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
| 38.223602 | 2,999 | 0.655509 |
32f17d659e2dd9633579d4f0d28c75beff3ce1a3 | 222 | asm | Assembly | scripts/DiglettsCaveRoute2.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | 1 | 2022-02-15T00:19:44.000Z | 2022-02-15T00:19:44.000Z | scripts/DiglettsCaveRoute2.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | scripts/DiglettsCaveRoute2.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | DiglettsCaveRoute2_Script:
ld a, ROUTE_2
ld [wLastMap], a
jp EnableAutoTextBoxDrawing
DiglettsCaveRoute2_TextPointers:
dw DiglettsCaveRoute2Text1
DiglettsCaveRoute2Text1:
text_far _DiglettsCaveRoute2Text1
text_end
| 18.5 | 34 | 0.86036 |
9bb7461afb834f1b40aa235687100f4257416940 | 296 | asm | Assembly | programs/oeis/139/A139757.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/139/A139757.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/139/A139757.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A139757: a(n) = (n+1)*(2n+1)^2.
; 1,18,75,196,405,726,1183,1800,2601,3610,4851,6348,8125,10206,12615,15376,18513,22050,26011,30420,35301,40678,46575,53016,60025,67626,75843,84700,94221,104430,115351,127008,139425,152626,166635,181476
mov $1,1
add $1,$0
add $0,$1
mul $1,$0
mul $1,$0
mov $0,$1
| 29.6 | 201 | 0.706081 |
f7902f8a16610791152ba55bedd809872b04dc13 | 209 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sccz80/ceil.asm | witchcraft2001/z88dk | 11adca337a4125aff611ddfdf3fc2401e8dda5b2 | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sccz80/ceil.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sccz80/ceil.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_fp_math16
PUBLIC ceilf16
EXTERN asm_f16_ceil
defc ceilf16 = asm_f16_ceil
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _ceilf16
EXTERN cm16_sdcc_ceil
defc _ceilf16 = cm16_sdcc_ceil
ENDIF
| 13.0625 | 30 | 0.818182 |
50398b93dee06669a61ab84713e35ae7e69dbfab | 464 | asm | Assembly | sources/scheduler/threads.asm | SzymonGoldberg/kaffenOS | 6feefa770ec58795ad20b49753cb88fa826a502f | [
"BSD-2-Clause"
] | 2 | 2021-04-27T11:00:14.000Z | 2021-04-27T11:54:35.000Z | sources/scheduler/threads.asm | SzymonGoldberg/kaffenOS | 6feefa770ec58795ad20b49753cb88fa826a502f | [
"BSD-2-Clause"
] | null | null | null | sources/scheduler/threads.asm | SzymonGoldberg/kaffenOS | 6feefa770ec58795ad20b49753cb88fa826a502f | [
"BSD-2-Clause"
] | 1 | 2021-02-27T17:42:42.000Z | 2021-02-27T17:42:42.000Z | ;inspired by: https://wiki.osdev.org/Brendan%27s_Multi-tasking_Tutorial
global switch_task ;function from here (used in pit.c)
extern current_task_esp ;current task stack
extern scheduler ;scheduler written in C (file: threads.c)
switch_task:
push ebx
push esi
push edi
push ebp
mov [current_task_esp], esp
call scheduler
mov esp, [current_task_esp]
pop ebp
pop edi
pop esi
pop ebx
ret | 19.333333 | 71 | 0.665948 |
42f155f9938ceb2cb24e270fbf2d88ae0a653cc9 | 141 | asm | Assembly | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/Net.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/Net.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/Net.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | Name: Net.asm
Type: file
Size: 14595
Last-Modified: '1992-11-18T01:48:24Z'
SHA-1: 5779A79E0059201779C4052E55B5ED4AA3F39C2A
Description: null
| 20.142857 | 47 | 0.808511 |
4533c667e662bfaa251cd5ed9f7c9a5ef1fbfd36 | 291 | asm | Assembly | programs/oeis/216/A216147.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/216/A216147.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/216/A216147.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A216147: 2*n^n + 1.
; 3,3,9,55,513,6251,93313,1647087,33554433,774840979,20000000001,570623341223,17832200896513,605750213184507,22224013651116033,875787780761718751,36893488147419103233,1654480523772673528355,78692816150593075150849,3956839311320627178247959
pow $0,$0
mul $0,2
add $0,1
| 41.571429 | 239 | 0.838488 |
b3db97ab172dcc36b0d7fdbaa629979988cf6133 | 1,145 | asm | Assembly | examples/str_parse.asm | mossx-dev/Mycore | eb84409f1a263204d30ef0b9d4254a96a121726f | [
"MIT"
] | null | null | null | examples/str_parse.asm | mossx-dev/Mycore | eb84409f1a263204d30ef0b9d4254a96a121726f | [
"MIT"
] | null | null | null | examples/str_parse.asm | mossx-dev/Mycore | eb84409f1a263204d30ef0b9d4254a96a121726f | [
"MIT"
] | null | null | null | ;; Author: Moss Gallagher
;; Date: 20-Oct-21
%include "std/sys.asm"
%include "std/args.asm"
%include "std/str.asm"
global _start
section .data
is_num: db " is a number", 0
not_num: db " is not a number", 0
arg1: db "<number>", 0
section .text
_start:
mov r15, rsp
call main
mov eax, esi ; exit code
call sys~exit ; call exit
main:
mov rax, 1
push arg1
call args~require
pop rax
mov rax, 2
call args~get
mov rax, rsi
call str#new_cs
mov r9, rsi
mov rax, r9
call str~is_int
jne .non_number
mov rax, r9
call str~print
mov rax, is_num ; Move false value
call cstr~println
mov rax, r9
call str~to_int
mov r10, rsi
mov rax, rsi
call int~println
mov rax, r10
shl rax, 1
call int~println
jmp .return
.non_number:
lea rax, [r9]
call str~print
mov rax, not_num
call cstr~println
.return:
mov rsi, 0
ret
| 15.472973 | 50 | 0.50131 |
a17dbc7961b67d4cd81d003d1c80934ce16e7073 | 306 | asm | Assembly | programs/oeis/085/A085278.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/085/A085278.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/085/A085278.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A085278: Expansion of (1+2x)^2/((1-x^2)(1-2x)).
; 1,6,17,38,81,166,337,678,1361,2726,5457,10918,21841,43686,87377,174758,349521,699046,1398097,2796198,5592401,11184806,22369617,44739238,89478481,178956966,357913937,715827878,1431655761,2863311526
add $0,4
mov $1,2
pow $1,$0
div $1,3
sub $1,4
mov $0,$1
| 30.6 | 198 | 0.735294 |
40be7aa84fea55108d4676fb7bcac3239e5beb7f | 252 | asm | Assembly | libpal/intel_64bit_systemv_nasm/vmclear_checked.asm | mars-research/pal | 5977394cda8750ff5dcb89c2bf193ec1ef4cd137 | [
"MIT"
] | 26 | 2020-01-06T23:53:17.000Z | 2022-02-01T08:58:21.000Z | libpal/intel_64bit_systemv_nasm/vmclear_checked.asm | mars-research/pal | 5977394cda8750ff5dcb89c2bf193ec1ef4cd137 | [
"MIT"
] | 30 | 2019-11-13T00:55:22.000Z | 2022-01-06T08:09:35.000Z | libpal/intel_64bit_systemv_nasm/vmclear_checked.asm | mars-research/pal | 5977394cda8750ff5dcb89c2bf193ec1ef4cd137 | [
"MIT"
] | 14 | 2019-11-15T16:56:22.000Z | 2021-12-22T10:14:17.000Z | bits 64
default rel
section .text
global pal_execute_vmclear_checked
pal_execute_vmclear_checked :
vmclear [rdi]
jbe pal_execute_vmclear_checked_failure
mov rax, 0x1
ret
pal_execute_vmclear_checked_failure :
mov rax, 0x0
ret
| 15.75 | 43 | 0.769841 |
36cfafd7a8cee961ac2315dfad756eb8a6220634 | 836 | asm | Assembly | oeis/142/A142893.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/142/A142893.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/142/A142893.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A142893: Primes congruent to 8 mod 63.
; Submitted by Jon Maiga
; 71,197,449,701,827,953,1583,1709,2087,2213,2339,2591,2843,2969,3221,3347,3851,4229,4481,4733,5237,5741,5867,7001,7127,7253,7757,7883,8009,8387,8513,9521,10151,10529,10781,11159,11411,11789,12041,12671,12923,13049,13553,13679,13931,14057,14561,14813,14939,15443,15569,16073,16451,16703,16829,17207,17333,17837,18089,18341,18593,18719,19727,19853,19979,20231,20357,20483,21491,21617,22247,22751,22877,23003,23633,24137,24767,25523,26153,26783,27539,27791,27917,28547,29303,29429,30059,30689,30941
mov $1,14
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,21
sub $2,2
mov $3,$1
mul $3,2
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,42
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,83
| 33.44 | 496 | 0.72488 |
2aec8bf4df21ae32d86e3cc59a9669b47adc2ea9 | 18,834 | asm | Assembly | helloworld.asm | jeema101/avhelloworld | 1e085f51e36239068691b8655cc2656681f15fbd | [
"MIT"
] | null | null | null | helloworld.asm | jeema101/avhelloworld | 1e085f51e36239068691b8655cc2656681f15fbd | [
"MIT"
] | null | null | null | helloworld.asm | jeema101/avhelloworld | 1e085f51e36239068691b8655cc2656681f15fbd | [
"MIT"
] | null | null | null | ; *************************************************************************
; * HelloWorld.asm - 'Hello World' program for the Entex Adventure Vision *
; *************************************************************************
.include "av.h"
; Variable Locations
.equ TextStringX #32
.equ TextStringY #33
.equ Temp1 #34
.equ Temp2 #35
; 0x0000-0x03FF is shared between the first 1k of program ROM and the BIOS. Only one can be loaded in at a time.
.org 0x0000
; Jump to 0x8000 if we happen to start here so we can load the BIOS into this area
SEL MB1
JMP Startup
; The BIOS should jump to here if it was loaded on startup
.org 0x0800
Startup:
; (0x0802-0x80B is reserved for certain BIOS routine callbacks so we should probably skip it)
JMP Main
; ********
; * MAIN *
; ********
.org 0x080C
Main:
; ******************
; * INITIALIZATION *
; ******************
CLR A
; Load BIOS into 0x0000-0x07FF if not already loaded
OUTL P1, A
; Reset the stack pointer, select register bank 0, and clear flags
MOV PSW, A
; Clear the internal RAM (64 bytes)
MOV R0, #63 ; Start at the highest address and decrement with each loop
ClearInternalRAMLoopTop:
MOV @R0, A ; Clear the current memory location
DJNZ R0, ClearInternalRAMLoopTop
MOV @R0, A ; Clear final memory location
; Clear the external RAM (4 banks, each one 256 bytes)
MOV R0, #4 ; Start at the highest bank and decrement with each loop
ClearExternalRAMLoopTop:
DEC R0
MOV A, R0
OUTL P1, A ; Set the current bank
MOV R1, #255 ; Start at the highest address and decrement with each loop
CLR A
ClearExternalRAMInnerLoopTop:
MOVX @R1, A ; Clear the current memory location for this bank
DJNZ R1, ClearExternalRAMInnerLoopTop
MOVX @R1, A ; Clear final memory location for this bank
MOV A, R0
JNZ ClearExternalRAMLoopTop
; Clear any sounds that might be playing
MOV R1, #0x00
SEL MB0
CALL WriteSound
SEL MB1
; Initialize the text string's X and Y position
MOV A, #30
MOV R0, TextStringX
MOV @R0, A
MOV A, #16
MOV R0, TextStringY
MOV @R0, A
; *************
; * MAIN LOOP *
; *************
MainLoopTop:
; Blank the video RAM
CALL BlankVideoRAM
; Copy the 'H' sprite (sprite byte offset 0) into video RAM at the correct position
MOV R1, #0
MOV R0, TextStringX
MOV A, @R0
MOV R2, A
MOV R0, TextStringY
MOV A, @R0
MOV R3, A
MOV R4, #8
CALL CopySprite
; Copy the 'e' (sprite byte offset 8) into video RAM
MOV R1, #8
CALL CopySprite
; Copy the two 'l's (sprite byte offset 16) into video RAM
MOV R1, #16
CALL CopySprite
CALL CopySprite
; Copy the 'o' (sprite byte offset 24) into video RAM
MOV R1, #24
CALL CopySprite
; Copy the 'W' (sprite byte offset 32) into video RAM
MOV R1, #32
MOV A, R2
CLR C
ADD A, #8
MOV R2, A
CALL CopySprite
; Copy the 'o' (sprite byte offset 24) into video RAM
MOV R1, #24
CALL CopySprite
; Copy the 'r' (sprite byte offset 40) into video RAM
MOV R1, #40
CALL CopySprite
; Copy the 'l (sprite byte offset 16) into video RAM
MOV R1, #16
CALL CopySprite
; Copy the 'd (sprite byte offset 48) into video RAM
MOV R1, #48
CALL CopySprite
; Call the BIOS routine to draw the screen
SEL MB0
CALL DisplayVideo
SEL MB1
; Adjust the positioning of the text, based on the controller input
CALL UpdateTextPositioning
; Loop forever
JMP MainLoopTop
.org 0x0E00
; **************************************
; * UPDATE TEXT POSITIONING SUBROUTINE *
; **************************************
;
; Registers used:
;
; * R0-R1 = Temp storage
;
UpdateTextPositioning:
MOV A, Controller_Read
OUTL P1, A ; Write to port 1 bits 3-7 to ready them for input
IN A, P1 ; Read port 1 to get the controller input
ANL A, Controller_Read ; (AND the lower 3 bits out just to be safe)
MOV R0, A ; Store the controller input in R0
XRL A, Controller_Read ; XOR with controller read bitmask to see if anything is being pressed at all
JZ EndUpdateTextPositioning ; If not, return
; Check for controller stick 'up' and increment the Y position if it's being pressed
MOV A, R0 ; Load the controller input again
XRL A, Stick_Up ; XOR with the bit pattern for 'stick up' to see if it's being pressed
JNZ NoStickUp
MOV R1, TextStringY
MOV A, @R1 ; Load the Y position
INC A ; Add 1
MOV @R1, A ; Store the Y position
XRL A, #33 ; XOR with 33 to see if we've gone off the top edge of the screen
JNZ EndUpdateTextPositioning
MOV A, #32
MOV @R1, A ; If so, just reset the Y position to 32
JMP EndUpdateTextPositioning
NoStickUp:
; Check for controller stick 'down' and decrement the Y position if it's being pressed
MOV A, R0 ; Load the controller input again
XRL A, Stick_Down ; XOR with the bit pattern for 'stick down' to see if it's being pressed
JNZ NoStickDown
MOV R1, TextStringY
MOV A, @R1 ; Load the Y position
DEC A ; Subtract 1
MOV @R1, A ; Store the Y position
XRL A, #255 ; XOR with 255 to see if we've gone off the bottom edge of the screen
JNZ EndUpdateTextPositioning
CLR A
MOV @R1, A ; If so, just reset the Y position to 0
JMP EndUpdateTextPositioning
NoStickDown:
; Check for controller stick 'left' and decrement the X position if it's being pressed
MOV A, R0 ; Load the controller input again
XRL A, Stick_Left ; XOR with the bit pattern for 'stick left' to see if it's being pressed
JNZ NoStickLeft
MOV R1, TextStringX
MOV A, @R1 ; Load the X position
DEC A ; Subtract 1
MOV @R1, A ; Store the X position
XRL A, #255 ; XOR with 255 to see if we've gone off the left edge of the screen
JNZ EndUpdateTextPositioning
CLR A
MOV @R1, A ; If so, just reset the X position to 0
JMP EndUpdateTextPositioning
NoStickLeft:
; Check for controller stick 'right' and increment the X position if it's being pressed
MOV A, R0 ; Load the controller input again
XRL A, Stick_Right ; XOR with the bit pattern for 'stick right' to see if it's being pressed
JNZ EndUpdateTextPositioning
MOV R1, TextStringX
MOV A, @R1 ; Load the X position
INC A ; add 1
MOV @R1, A ; Store the X position
XRL A, #62 ; XOR with 62 to see if we've gone off the right edge of the screen
JNZ EndUpdateTextPositioning
MOV A, #61
MOV @R1, A ; If so, just reset the X position to 61
JMP EndUpdateTextPositioning
EndUpdateTextPositioning:
RET
; ******************************
; * BLANK VIDEO RAM SUBROUTINE *
; ******************************
;
; Registers used:
;
; * R0-R1 = Temp storage
;
BlankVideoRAM:
; Blank video RAM (aka external RAM banks 1-3 addresses 6-255) by filling with 0xFFs.
; 0xFF is actually an 'off' pixel and 0x00 is 'on' for whatever reason.
MOV R0, #3 ; Start at the highest bank and decrement with each loop
BlankVideoRAMLoopTop:
MOV A, R0
OUTL P1, A ; Set the current bank
MOV R1, #255 ; Start at the highest address and decrement with each loop
BlankVideoRAMInnerLoopTop:
MOV A, #0xFF
MOVX @R1, A ; Fill the current memory location for this bank with 0xFF
DEC R1
MOV A, R1
XRL A, #5 ; XOR mask current loop iteration with 5 so that we stop at 5
JNZ BlankVideoRAMInnerLoopTop
DJNZ R0, BlankVideoRAMLoopTop
RET
; **************************
; * COPY SPRITE SUBROUTINE *
; **************************
;
; Input parameters:
;
; * R1 = Byte offset of the 8 pixel high sprite to read from the data page
; * R2 = X position of the sprite, where 0 is the left side of the screen and 152 is the right
; (R2 gets incremented automatically by the subroutine)
; * R3 = Y position of the sprite, where 0 is the bottom of the screen and 32 is the top
; * R4 = The width of the sprite in pixels
;
; Additional registers/memory used:
;
; * R0 = Temp storage
; * Temp1 = Temp storage for sprite width that gets passed in via R4
; * R4 = Byte offset location where the sprite will be copied into video memory
; * R5-R6 = Temp storage, sprite data upper and lower registers
; * R7 = Loop iterator
;
CopySprite:
; Save sprite width in Temp1
MOV R0, Temp1
MOV A, R4
MOV @R0, A
MOV R7, #0
CopySpriteTop:
; Select the appropriate RAM bank for the given X position. Also get the RAM bank column index and save it in R0
MOV A, R2
MOV R0, A ; The default column index will just be the original X position.
MOV A, #206
CLR C
ADD A, R2 ; Add X position to 206 to see if it overflows
JC SpriteBankNotBank1 ; If carry is set, then X position was >= 50, so we don't want bank 1
MOV A, RAM_Bank_1_Enable ; Select external RAM bank 1
JMP SpriteBankEndIf
SpriteBankNotBank1:
MOV R0, A ; Update the column index to the outcome of the last addition (which presumably overflowed and wrapped around)
MOV A, #156
CLR C
ADD A, R2 ; Add X position to 156 to see if it overflows
JC SpriteBankNotBank2 ; If carry is set, then X position was >= 100, so we don't want bank 2
MOV A, RAM_Bank_2_Enable ; Select external RAM bank 2
JMP SpriteBankEndIf
SpriteBankNotBank2:
MOV R0, A ; Update the column index to the outcome of the last addition (which presumably overflowed and wrapped around)
MOV A, RAM_Bank_3_Enable ; Select external RAM bank 3
SpriteBankEndIf:
OUTL P1, A ; Do the actual RAM bank selection
; Take the column index and multiply it by 5 to compute the column byte offset. Store it in R4
MOV A, R0
RL A
RL A
ANL A, #0xFC ; First multiply it by 4 using bit shifts
CLR C
ADD A, R0 ; Then add R0 to the result of that to get 'multiply by 5'
MOV R4, A
; Compute the sprite's vertical positioning byte offset and add that to the column byte offset
MOV A, R3 ; Load the sprite Y position
RR A ; Divide TextStringY by 8 to determine the starting byte index to place the sprite at
RR A
RR A
ANL A, #0x07
CLR C
ADD A, #6 ; Add 6 to the starting byte index, since video RAM goes from 6-255 in each bank
ADD A, R4 ; Add this to the column byte offset computed above
MOV R4, A
; Now get the fine positioning bit offset and copy that into R0
MOV A, R3 ; Load the sprite Y position again
ANL A, #0x07 ; AND with the low 3 bytes to get the fine positioning offset
MOV R0, A
; Load the current line of sprite data from the data page
MOV A, R1 ; Get the byte offset of the sprite we want
CLR C
ADD A, R7 ; Now add to that the current loop iteration
MOV R5, A ; Save it in R5 which will be the input parameter to 'GetSpriteData'
CALL GetSpriteData
; Load the sprite data into R5. Fill R6 with 0xFF - it will be the upper sprite register we rotate bits into
MOV R5, A
MOV A, #0xFF
MOV R6, A
; Fine positioning while loop - bit shift the sprite data left by one bit for each iteration
FinePositioningLoopTop:
MOV A, R0
JZ FinePositioningLoopEnd
MOV A, R5 ; Load the sprite data lower register
CLR C
CPL C ; '1' is an off pixel so we want to make sure the carry is set
RLC A ; Shift it left one bit
MOV R5, A ; Save the data back into the sprite data lower register
MOV A, R6 ; Load the sprite data upper register
RLC A ; Shift it left one bit, shifting the carry from the previous shift into bit 0
MOV R6, A ; Save the data back into the sprite data upper register
DEC R0
JMP FinePositioningLoopTop
FinePositioningLoopEnd:
; Write the shifted sprite registers to the video display at the proper locations
MOV A, R4
MOV R0, A ; Load the video memory starting byte index
MOVX A, @R0 ; Get the current value in video memory
ANL A, R5 ; AND it with the sprite data lower register
MOVX @R0, A ; Store it in video memory
INC R0
MOVX A, @R0 ; Get the current value in video memory
ANL A, R6 ; AND it with the sprite data upper register
MOVX @R0, A ; Store it in video memory
INC R2 ; Increment the X position
INC R7 ; Increment the loop counter
MOV R0, Temp1 ; Put the address of Temp1 into R0. Temp1 is where the sprite width is saved
MOV A, R7
XRL A, @R0 ; XOR mask current loop iteration with the sprite width so that we stop at the right place
JNZ CopySpriteTop
; Put the sprite width back into R4
MOV R0, Temp1
MOV A, @R0
MOV R4, A
RET
; ******************************
; * GET SPRITE DATA SUBROUTINE *
; ******************************
;
; Input parameters:
;
; * R5 = Byte offset to fetch the data from
;
.org 0x0F00
GetSpriteData:
MOV A, #SpriteData % 256
CLR C
ADD A, R5
MOVP A, @A
RET
SpriteData:
; Capital H
.db 0xFF ; 11111111
.db 0x80 ; 10000000
.db 0xF7 ; 11110111
.db 0xF7 ; 11110111
.db 0xF7 ; 11110111
.db 0xF7 ; 11110111
.db 0x80 ; 10000000
.db 0xFF ; 11111111
; Lowercase E
.db 0xFF ; 11111111
.db 0xF1 ; 11110001
.db 0xEA ; 11101010
.db 0xEA ; 11101010
.db 0xEA ; 11101010
.db 0xEA ; 11101010
.db 0xF3 ; 11110011
.db 0xFF ; 11111111
; Lowercase L
.db 0xFF ; 11111111
.db 0xFF ; 11111111
.db 0xFF ; 11111111
.db 0x81 ; 10000001
.db 0xFE ; 11111110
.db 0xFF ; 11111111
.db 0xFF ; 11111111
.db 0xFF ; 11111111
; Lowercase O
.db 0xFF ; 11111111
.db 0xF1 ; 11110001
.db 0xEE ; 11101110
.db 0xEE ; 11101110
.db 0xEE ; 11101110
.db 0xEE ; 11101110
.db 0xF1 ; 11110001
.db 0xFF ; 11111111
; Capital W
.db 0xFF ; 11111111
.db 0x80 ; 10000000
.db 0xFD ; 11111101
.db 0xFB ; 11111011
.db 0xFB ; 11111011
.db 0xFD ; 11111101
.db 0x80 ; 10000000
.db 0xFF ; 11111111
; Lowercase R
.db 0xFF ; 11111111
.db 0xFF ; 11111111
.db 0xF0 ; 11110000
.db 0xEF ; 11101111
.db 0xEF ; 11101111
.db 0xEF ; 11101111
.db 0xEF ; 11101111
.db 0xFF ; 11111111
; Lowercase D
.db 0xFF ; 11111111
.db 0xF1 ; 11110001
.db 0xEE ; 11101110
.db 0xEE ; 11101110
.db 0xEE ; 11101110
.db 0xEE ; 11101110
.db 0x80 ; 10000000
.db 0xFF ; 11111111
.org 0x1000 ; End of the 4K ROM memory area | 38.358452 | 147 | 0.494425 |
2714da069051b5196e09901446c29d60e4f0b643 | 726,127 | asm | Assembly | kernel.asm | shruti512/xv6 | c053016fb2934f5164a881dfc3a966df3e046e17 | [
"MIT-0"
] | null | null | null | kernel.asm | shruti512/xv6 | c053016fb2934f5164a881dfc3a966df3e046e17 | [
"MIT-0"
] | null | null | null | kernel.asm | shruti512/xv6 | c053016fb2934f5164a881dfc3a966df3e046e17 | [
"MIT-0"
] | 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 c0 c5 10 80 mov $0x8010c5c0,%esp
8010002d: b8 60 2e 10 80 mov $0x80102e60,%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
initlock(&bcache.lock, "bcache");
// 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 f4 c5 10 80 mov $0x8010c5f4,%ebx
struct buf head;
} bcache;
void
binit(void)
{
80100049: 83 ec 0c sub $0xc,%esp
struct buf *b;
initlock(&bcache.lock, "bcache");
8010004c: 68 40 76 10 80 push $0x80107640
80100051: 68 c0 c5 10 80 push $0x8010c5c0
80100056: e8 65 47 00 00 call 801047c0 <initlock>
// Create linked list of buffers
bcache.head.prev = &bcache.head;
8010005b: c7 05 0c 0d 11 80 bc movl $0x80110cbc,0x80110d0c
80100062: 0c 11 80
bcache.head.next = &bcache.head;
80100065: c7 05 10 0d 11 80 bc movl $0x80110cbc,0x80110d10
8010006c: 0c 11 80
8010006f: 83 c4 10 add $0x10,%esp
80100072: ba bc 0c 11 80 mov $0x80110cbc,%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
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
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
// Create linked list of buffers
bcache.head.prev = &bcache.head;
bcache.head.next = &bcache.head;
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
b->next = bcache.head.next;
80100088: 89 53 54 mov %edx,0x54(%ebx)
b->prev = &bcache.head;
8010008b: c7 43 50 bc 0c 11 80 movl $0x80110cbc,0x50(%ebx)
initsleeplock(&b->lock, "buffer");
80100092: 68 47 76 10 80 push $0x80107647
80100097: 50 push %eax
80100098: e8 13 46 00 00 call 801046b0 <initsleeplock>
bcache.head.next->prev = b;
8010009d: a1 10 0d 11 80 mov 0x80110d10,%eax
initlock(&bcache.lock, "bcache");
// Create linked list of buffers
bcache.head.prev = &bcache.head;
bcache.head.next = &bcache.head;
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
801000a2: 83 c4 10 add $0x10,%esp
801000a5: 89 da mov %ebx,%edx
b->next = bcache.head.next;
b->prev = &bcache.head;
initsleeplock(&b->lock, "buffer");
bcache.head.next->prev = b;
801000a7: 89 58 50 mov %ebx,0x50(%eax)
initlock(&bcache.lock, "bcache");
// Create linked list of buffers
bcache.head.prev = &bcache.head;
bcache.head.next = &bcache.head;
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
801000aa: 8d 83 5c 02 00 00 lea 0x25c(%ebx),%eax
b->next = bcache.head.next;
b->prev = &bcache.head;
initsleeplock(&b->lock, "buffer");
bcache.head.next->prev = b;
bcache.head.next = b;
801000b0: 89 1d 10 0d 11 80 mov %ebx,0x80110d10
initlock(&bcache.lock, "bcache");
// Create linked list of buffers
bcache.head.prev = &bcache.head;
bcache.head.next = &bcache.head;
for(b = bcache.buf; b < bcache.buf+NBUF; b++){
801000b6: 3d bc 0c 11 80 cmp $0x80110cbc,%eax
801000bb: 75 c3 jne 80100080 <binit+0x40>
b->prev = &bcache.head;
initsleeplock(&b->lock, "buffer");
bcache.head.next->prev = b;
bcache.head.next = b;
}
}
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
static struct buf*
bget(uint dev, uint blockno)
{
struct buf *b;
acquire(&bcache.lock);
801000df: 68 c0 c5 10 80 push $0x8010c5c0
801000e4: e8 d7 47 00 00 call 801048c0 <acquire>
// Is the block already cached?
for(b = bcache.head.next; b != &bcache.head; b = b->next){
801000e9: 8b 1d 10 0d 11 80 mov 0x80110d10,%ebx
801000ef: 83 c4 10 add $0x10,%esp
801000f2: 81 fb bc 0c 11 80 cmp $0x80110cbc,%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 bc 0c 11 80 cmp $0x80110cbc,%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
}
// Not cached; recycle an unused buffer.
// Even if refcnt==0, B_DIRTY indicates a buffer is in use
// because log.c has modified it but not yet committed it.
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
80100120: 8b 1d 0c 0d 11 80 mov 0x80110d0c,%ebx
80100126: 81 fb bc 0c 11 80 cmp $0x80110cbc,%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 bc 0c 11 80 cmp $0x80110cbc,%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 c0 c5 10 80 push $0x8010c5c0
80100162: e8 79 48 00 00 call 801049e0 <release>
acquiresleep(&b->lock);
80100167: 8d 43 0c lea 0xc(%ebx),%eax
8010016a: 89 04 24 mov %eax,(%esp)
8010016d: e8 7e 45 00 00 call 801046f0 <acquiresleep>
80100172: 83 c4 10 add $0x10,%esp
bread(uint dev, uint blockno)
{
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 6d 1f 00 00 call 801020f0 <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
release(&bcache.lock);
acquiresleep(&b->lock);
return b;
}
}
panic("bget: no buffers");
80100190: 83 ec 0c sub $0xc,%esp
80100193: 68 4e 76 10 80 push $0x8010764e
80100198: e8 d3 01 00 00 call 80100370 <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 dd 45 00 00 call 80104790 <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
bwrite(struct buf *b)
{
if(!holdingsleep(&b->lock))
panic("bwrite");
b->flags |= B_DIRTY;
iderw(b);
801001c4: e9 27 1f 00 00 jmp 801020f0 <iderw>
// Write b's contents to disk. Must be locked.
void
bwrite(struct buf *b)
{
if(!holdingsleep(&b->lock))
panic("bwrite");
801001c9: 83 ec 0c sub $0xc,%esp
801001cc: 68 5f 76 10 80 push $0x8010765f
801001d1: e8 9a 01 00 00 call 80100370 <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 9c 45 00 00 call 80104790 <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 4c 45 00 00 call 80104750 <releasesleep>
acquire(&bcache.lock);
80100204: c7 04 24 c0 c5 10 80 movl $0x8010c5c0,(%esp)
8010020b: e8 b0 46 00 00 call 801048c0 <acquire>
b->refcnt--;
80100210: 8b 43 4c mov 0x4c(%ebx),%eax
if (b->refcnt == 0) {
80100213: 83 c4 10 add $0x10,%esp
panic("brelse");
releasesleep(&b->lock);
acquire(&bcache.lock);
b->refcnt--;
80100216: 83 e8 01 sub $0x1,%eax
if (b->refcnt == 0) {
80100219: 85 c0 test %eax,%eax
panic("brelse");
releasesleep(&b->lock);
acquire(&bcache.lock);
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 10 0d 11 80 mov 0x80110d10,%eax
b->prev = &bcache.head;
80100237: c7 43 50 bc 0c 11 80 movl $0x80110cbc,0x50(%ebx)
b->refcnt--;
if (b->refcnt == 0) {
// no one is waiting for it.
b->next->prev = b->prev;
b->prev->next = b->next;
b->next = bcache.head.next;
8010023e: 89 43 54 mov %eax,0x54(%ebx)
b->prev = &bcache.head;
bcache.head.next->prev = b;
80100241: a1 10 0d 11 80 mov 0x80110d10,%eax
80100246: 89 58 50 mov %ebx,0x50(%eax)
bcache.head.next = b;
80100249: 89 1d 10 0d 11 80 mov %ebx,0x80110d10
}
release(&bcache.lock);
8010024f: c7 45 08 c0 c5 10 80 movl $0x8010c5c0,0x8(%ebp)
}
80100256: 8d 65 f8 lea -0x8(%ebp),%esp
80100259: 5b pop %ebx
8010025a: 5e pop %esi
8010025b: 5d pop %ebp
b->prev = &bcache.head;
bcache.head.next->prev = b;
bcache.head.next = b;
}
release(&bcache.lock);
8010025c: e9 7f 47 00 00 jmp 801049e0 <release>
// Move to the head of the MRU list.
void
brelse(struct buf *b)
{
if(!holdingsleep(&b->lock))
panic("brelse");
80100261: 83 ec 0c sub $0xc,%esp
80100264: 68 66 76 10 80 push $0x80107666
80100269: e8 02 01 00 00 call 80100370 <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 cb 14 00 00 call 80101750 <iunlock>
target = n;
acquire(&cons.lock);
80100285: c7 04 24 20 b5 10 80 movl $0x8010b520,(%esp)
8010028c: e8 2f 46 00 00 call 801048c0 <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 9a 00 00 00 jle 8010033b <consoleread+0xcb>
while(input.r == input.w){
801002a1: a1 a0 0f 11 80 mov 0x80110fa0,%eax
801002a6: 3b 05 a4 0f 11 80 cmp 0x80110fa4,%eax
801002ac: 74 24 je 801002d2 <consoleread+0x62>
801002ae: eb 58 jmp 80100308 <consoleread+0x98>
if(myproc()->killed){
release(&cons.lock);
ilock(ip);
return -1;
}
sleep(&input.r, &cons.lock);
801002b0: 83 ec 08 sub $0x8,%esp
801002b3: 68 20 b5 10 80 push $0x8010b520
801002b8: 68 a0 0f 11 80 push $0x80110fa0
801002bd: e8 ae 3b 00 00 call 80103e70 <sleep>
iunlock(ip);
target = n;
acquire(&cons.lock);
while(n > 0){
while(input.r == input.w){
801002c2: a1 a0 0f 11 80 mov 0x80110fa0,%eax
801002c7: 83 c4 10 add $0x10,%esp
801002ca: 3b 05 a4 0f 11 80 cmp 0x80110fa4,%eax
801002d0: 75 36 jne 80100308 <consoleread+0x98>
if(myproc()->killed){
801002d2: e8 c9 34 00 00 call 801037a0 <myproc>
801002d7: 8b 40 24 mov 0x24(%eax),%eax
801002da: 85 c0 test %eax,%eax
801002dc: 74 d2 je 801002b0 <consoleread+0x40>
release(&cons.lock);
801002de: 83 ec 0c sub $0xc,%esp
801002e1: 68 20 b5 10 80 push $0x8010b520
801002e6: e8 f5 46 00 00 call 801049e0 <release>
ilock(ip);
801002eb: 89 3c 24 mov %edi,(%esp)
801002ee: e8 7d 13 00 00 call 80101670 <ilock>
return -1;
801002f3: 83 c4 10 add $0x10,%esp
801002f6: b8 ff ff ff ff mov $0xffffffff,%eax
}
release(&cons.lock);
ilock(ip);
return target - n;
}
801002fb: 8d 65 f4 lea -0xc(%ebp),%esp
801002fe: 5b pop %ebx
801002ff: 5e pop %esi
80100300: 5f pop %edi
80100301: 5d pop %ebp
80100302: c3 ret
80100303: 90 nop
80100304: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ilock(ip);
return -1;
}
sleep(&input.r, &cons.lock);
}
c = input.buf[input.r++ % INPUT_BUF];
80100308: 8d 50 01 lea 0x1(%eax),%edx
8010030b: 89 15 a0 0f 11 80 mov %edx,0x80110fa0
80100311: 89 c2 mov %eax,%edx
80100313: 83 e2 7f and $0x7f,%edx
80100316: 0f be 92 20 0f 11 80 movsbl -0x7feef0e0(%edx),%edx
if(c == C('D')){ // EOF
8010031d: 83 fa 04 cmp $0x4,%edx
80100320: 74 39 je 8010035b <consoleread+0xeb>
// caller gets a 0-byte result.
input.r--;
}
break;
}
*dst++ = c;
80100322: 83 c6 01 add $0x1,%esi
--n;
80100325: 83 eb 01 sub $0x1,%ebx
if(c == '\n')
80100328: 83 fa 0a cmp $0xa,%edx
// caller gets a 0-byte result.
input.r--;
}
break;
}
*dst++ = c;
8010032b: 88 56 ff mov %dl,-0x1(%esi)
--n;
if(c == '\n')
8010032e: 74 35 je 80100365 <consoleread+0xf5>
int c;
iunlock(ip);
target = n;
acquire(&cons.lock);
while(n > 0){
80100330: 85 db test %ebx,%ebx
80100332: 0f 85 69 ff ff ff jne 801002a1 <consoleread+0x31>
80100338: 8b 45 10 mov 0x10(%ebp),%eax
*dst++ = c;
--n;
if(c == '\n')
break;
}
release(&cons.lock);
8010033b: 83 ec 0c sub $0xc,%esp
8010033e: 89 45 e4 mov %eax,-0x1c(%ebp)
80100341: 68 20 b5 10 80 push $0x8010b520
80100346: e8 95 46 00 00 call 801049e0 <release>
ilock(ip);
8010034b: 89 3c 24 mov %edi,(%esp)
8010034e: e8 1d 13 00 00 call 80101670 <ilock>
return target - n;
80100353: 83 c4 10 add $0x10,%esp
80100356: 8b 45 e4 mov -0x1c(%ebp),%eax
80100359: eb a0 jmp 801002fb <consoleread+0x8b>
}
sleep(&input.r, &cons.lock);
}
c = input.buf[input.r++ % INPUT_BUF];
if(c == C('D')){ // EOF
if(n < target){
8010035b: 39 5d 10 cmp %ebx,0x10(%ebp)
8010035e: 76 05 jbe 80100365 <consoleread+0xf5>
// Save ^D for next time, to make sure
// caller gets a 0-byte result.
input.r--;
80100360: a3 a0 0f 11 80 mov %eax,0x80110fa0
80100365: 8b 45 10 mov 0x10(%ebp),%eax
80100368: 29 d8 sub %ebx,%eax
8010036a: eb cf jmp 8010033b <consoleread+0xcb>
8010036c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100370 <panic>:
release(&cons.lock);
}
void
panic(char *s)
{
80100370: 55 push %ebp
80100371: 89 e5 mov %esp,%ebp
80100373: 56 push %esi
80100374: 53 push %ebx
80100375: 83 ec 30 sub $0x30,%esp
}
static inline void
cli(void)
{
asm volatile("cli");
80100378: fa cli
int i;
uint pcs[10];
cli();
cons.locking = 0;
80100379: c7 05 54 b5 10 80 00 movl $0x0,0x8010b554
80100380: 00 00 00
// use lapiccpunum so that we can call panic from mycpu()
cprintf("lapicid %d: panic: ", lapicid());
cprintf(s);
cprintf("\n");
getcallerpcs(&s, pcs);
80100383: 8d 5d d0 lea -0x30(%ebp),%ebx
80100386: 8d 75 f8 lea -0x8(%ebp),%esi
uint pcs[10];
cli();
cons.locking = 0;
// use lapiccpunum so that we can call panic from mycpu()
cprintf("lapicid %d: panic: ", lapicid());
80100389: e8 62 23 00 00 call 801026f0 <lapicid>
8010038e: 83 ec 08 sub $0x8,%esp
80100391: 50 push %eax
80100392: 68 6d 76 10 80 push $0x8010766d
80100397: e8 c4 02 00 00 call 80100660 <cprintf>
cprintf(s);
8010039c: 58 pop %eax
8010039d: ff 75 08 pushl 0x8(%ebp)
801003a0: e8 bb 02 00 00 call 80100660 <cprintf>
cprintf("\n");
801003a5: c7 04 24 2b 80 10 80 movl $0x8010802b,(%esp)
801003ac: e8 af 02 00 00 call 80100660 <cprintf>
getcallerpcs(&s, pcs);
801003b1: 5a pop %edx
801003b2: 8d 45 08 lea 0x8(%ebp),%eax
801003b5: 59 pop %ecx
801003b6: 53 push %ebx
801003b7: 50 push %eax
801003b8: e8 23 44 00 00 call 801047e0 <getcallerpcs>
801003bd: 83 c4 10 add $0x10,%esp
for(i=0; i<10; i++)
cprintf(" %p", pcs[i]);
801003c0: 83 ec 08 sub $0x8,%esp
801003c3: ff 33 pushl (%ebx)
801003c5: 83 c3 04 add $0x4,%ebx
801003c8: 68 81 76 10 80 push $0x80107681
801003cd: e8 8e 02 00 00 call 80100660 <cprintf>
// use lapiccpunum so that we can call panic from mycpu()
cprintf("lapicid %d: panic: ", lapicid());
cprintf(s);
cprintf("\n");
getcallerpcs(&s, pcs);
for(i=0; i<10; i++)
801003d2: 83 c4 10 add $0x10,%esp
801003d5: 39 f3 cmp %esi,%ebx
801003d7: 75 e7 jne 801003c0 <panic+0x50>
cprintf(" %p", pcs[i]);
panicked = 1; // freeze other CPU
801003d9: c7 05 58 b5 10 80 01 movl $0x1,0x8010b558
801003e0: 00 00 00
801003e3: eb fe jmp 801003e3 <panic+0x73>
801003e5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801003e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801003f0 <consputc>:
}
void
consputc(int c)
{
if(panicked){
801003f0: 8b 15 58 b5 10 80 mov 0x8010b558,%edx
801003f6: 85 d2 test %edx,%edx
801003f8: 74 06 je 80100400 <consputc+0x10>
801003fa: fa cli
801003fb: eb fe jmp 801003fb <consputc+0xb>
801003fd: 8d 76 00 lea 0x0(%esi),%esi
crt[pos] = ' ' | 0x0700;
}
void
consputc(int c)
{
80100400: 55 push %ebp
80100401: 89 e5 mov %esp,%ebp
80100403: 57 push %edi
80100404: 56 push %esi
80100405: 53 push %ebx
80100406: 89 c3 mov %eax,%ebx
80100408: 83 ec 0c sub $0xc,%esp
cli();
for(;;)
;
}
if(c == BACKSPACE){
8010040b: 3d 00 01 00 00 cmp $0x100,%eax
80100410: 0f 84 b8 00 00 00 je 801004ce <consputc+0xde>
uartputc('\b'); uartputc(' '); uartputc('\b');
} else
uartputc(c);
80100416: 83 ec 0c sub $0xc,%esp
80100419: 50 push %eax
8010041a: e8 f1 5d 00 00 call 80106210 <uartputc>
8010041f: 83 c4 10 add $0x10,%esp
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80100422: bf d4 03 00 00 mov $0x3d4,%edi
80100427: b8 0e 00 00 00 mov $0xe,%eax
8010042c: 89 fa mov %edi,%edx
8010042e: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010042f: be d5 03 00 00 mov $0x3d5,%esi
80100434: 89 f2 mov %esi,%edx
80100436: ec in (%dx),%al
{
int pos;
// Cursor position: col + 80*row.
outb(CRTPORT, 14);
pos = inb(CRTPORT+1) << 8;
80100437: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
8010043a: 89 fa mov %edi,%edx
8010043c: c1 e0 08 shl $0x8,%eax
8010043f: 89 c1 mov %eax,%ecx
80100441: b8 0f 00 00 00 mov $0xf,%eax
80100446: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80100447: 89 f2 mov %esi,%edx
80100449: ec in (%dx),%al
outb(CRTPORT, 15);
pos |= inb(CRTPORT+1);
8010044a: 0f b6 c0 movzbl %al,%eax
8010044d: 09 c8 or %ecx,%eax
if(c == '\n')
8010044f: 83 fb 0a cmp $0xa,%ebx
80100452: 0f 84 0b 01 00 00 je 80100563 <consputc+0x173>
pos += 80 - pos%80;
else if(c == BACKSPACE){
80100458: 81 fb 00 01 00 00 cmp $0x100,%ebx
8010045e: 0f 84 e6 00 00 00 je 8010054a <consputc+0x15a>
if(pos > 0) --pos;
} else
crt[pos++] = (c&0xff) | 0x0700; // black on white
80100464: 0f b6 d3 movzbl %bl,%edx
80100467: 8d 78 01 lea 0x1(%eax),%edi
8010046a: 80 ce 07 or $0x7,%dh
8010046d: 66 89 94 00 00 80 0b mov %dx,-0x7ff48000(%eax,%eax,1)
80100474: 80
if(pos < 0 || pos > 25*80)
80100475: 81 ff d0 07 00 00 cmp $0x7d0,%edi
8010047b: 0f 8f bc 00 00 00 jg 8010053d <consputc+0x14d>
panic("pos under/overflow");
if((pos/80) >= 24){ // Scroll up.
80100481: 81 ff 7f 07 00 00 cmp $0x77f,%edi
80100487: 7f 6f jg 801004f8 <consputc+0x108>
80100489: 89 f8 mov %edi,%eax
8010048b: 8d 8c 3f 00 80 0b 80 lea -0x7ff48000(%edi,%edi,1),%ecx
80100492: 89 fb mov %edi,%ebx
80100494: c1 e8 08 shr $0x8,%eax
80100497: 89 c6 mov %eax,%esi
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80100499: bf d4 03 00 00 mov $0x3d4,%edi
8010049e: b8 0e 00 00 00 mov $0xe,%eax
801004a3: 89 fa mov %edi,%edx
801004a5: ee out %al,(%dx)
801004a6: ba d5 03 00 00 mov $0x3d5,%edx
801004ab: 89 f0 mov %esi,%eax
801004ad: ee out %al,(%dx)
801004ae: b8 0f 00 00 00 mov $0xf,%eax
801004b3: 89 fa mov %edi,%edx
801004b5: ee out %al,(%dx)
801004b6: ba d5 03 00 00 mov $0x3d5,%edx
801004bb: 89 d8 mov %ebx,%eax
801004bd: ee out %al,(%dx)
outb(CRTPORT, 14);
outb(CRTPORT+1, pos>>8);
outb(CRTPORT, 15);
outb(CRTPORT+1, pos);
crt[pos] = ' ' | 0x0700;
801004be: b8 20 07 00 00 mov $0x720,%eax
801004c3: 66 89 01 mov %ax,(%ecx)
if(c == BACKSPACE){
uartputc('\b'); uartputc(' '); uartputc('\b');
} else
uartputc(c);
cgaputc(c);
}
801004c6: 8d 65 f4 lea -0xc(%ebp),%esp
801004c9: 5b pop %ebx
801004ca: 5e pop %esi
801004cb: 5f pop %edi
801004cc: 5d pop %ebp
801004cd: c3 ret
for(;;)
;
}
if(c == BACKSPACE){
uartputc('\b'); uartputc(' '); uartputc('\b');
801004ce: 83 ec 0c sub $0xc,%esp
801004d1: 6a 08 push $0x8
801004d3: e8 38 5d 00 00 call 80106210 <uartputc>
801004d8: c7 04 24 20 00 00 00 movl $0x20,(%esp)
801004df: e8 2c 5d 00 00 call 80106210 <uartputc>
801004e4: c7 04 24 08 00 00 00 movl $0x8,(%esp)
801004eb: e8 20 5d 00 00 call 80106210 <uartputc>
801004f0: 83 c4 10 add $0x10,%esp
801004f3: e9 2a ff ff ff jmp 80100422 <consputc+0x32>
if(pos < 0 || pos > 25*80)
panic("pos under/overflow");
if((pos/80) >= 24){ // Scroll up.
memmove(crt, crt+80, sizeof(crt[0])*23*80);
801004f8: 83 ec 04 sub $0x4,%esp
pos -= 80;
801004fb: 8d 5f b0 lea -0x50(%edi),%ebx
if(pos < 0 || pos > 25*80)
panic("pos under/overflow");
if((pos/80) >= 24){ // Scroll up.
memmove(crt, crt+80, sizeof(crt[0])*23*80);
801004fe: 68 60 0e 00 00 push $0xe60
80100503: 68 a0 80 0b 80 push $0x800b80a0
80100508: 68 00 80 0b 80 push $0x800b8000
pos -= 80;
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
8010050d: 8d b4 1b 00 80 0b 80 lea -0x7ff48000(%ebx,%ebx,1),%esi
if(pos < 0 || pos > 25*80)
panic("pos under/overflow");
if((pos/80) >= 24){ // Scroll up.
memmove(crt, crt+80, sizeof(crt[0])*23*80);
80100514: e8 c7 45 00 00 call 80104ae0 <memmove>
pos -= 80;
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
80100519: b8 80 07 00 00 mov $0x780,%eax
8010051e: 83 c4 0c add $0xc,%esp
80100521: 29 d8 sub %ebx,%eax
80100523: 01 c0 add %eax,%eax
80100525: 50 push %eax
80100526: 6a 00 push $0x0
80100528: 56 push %esi
80100529: e8 02 45 00 00 call 80104a30 <memset>
8010052e: 89 f1 mov %esi,%ecx
80100530: 83 c4 10 add $0x10,%esp
80100533: be 07 00 00 00 mov $0x7,%esi
80100538: e9 5c ff ff ff jmp 80100499 <consputc+0xa9>
if(pos > 0) --pos;
} else
crt[pos++] = (c&0xff) | 0x0700; // black on white
if(pos < 0 || pos > 25*80)
panic("pos under/overflow");
8010053d: 83 ec 0c sub $0xc,%esp
80100540: 68 85 76 10 80 push $0x80107685
80100545: e8 26 fe ff ff call 80100370 <panic>
pos |= inb(CRTPORT+1);
if(c == '\n')
pos += 80 - pos%80;
else if(c == BACKSPACE){
if(pos > 0) --pos;
8010054a: 85 c0 test %eax,%eax
8010054c: 8d 78 ff lea -0x1(%eax),%edi
8010054f: 0f 85 20 ff ff ff jne 80100475 <consputc+0x85>
80100555: b9 00 80 0b 80 mov $0x800b8000,%ecx
8010055a: 31 db xor %ebx,%ebx
8010055c: 31 f6 xor %esi,%esi
8010055e: e9 36 ff ff ff jmp 80100499 <consputc+0xa9>
pos = inb(CRTPORT+1) << 8;
outb(CRTPORT, 15);
pos |= inb(CRTPORT+1);
if(c == '\n')
pos += 80 - pos%80;
80100563: ba 67 66 66 66 mov $0x66666667,%edx
80100568: f7 ea imul %edx
8010056a: 89 d0 mov %edx,%eax
8010056c: c1 e8 05 shr $0x5,%eax
8010056f: 8d 04 80 lea (%eax,%eax,4),%eax
80100572: c1 e0 04 shl $0x4,%eax
80100575: 8d 78 50 lea 0x50(%eax),%edi
80100578: e9 f8 fe ff ff jmp 80100475 <consputc+0x85>
8010057d: 8d 76 00 lea 0x0(%esi),%esi
80100580 <printint>:
int locking;
} cons;
static void
printint(int xx, int base, int sign)
{
80100580: 55 push %ebp
80100581: 89 e5 mov %esp,%ebp
80100583: 57 push %edi
80100584: 56 push %esi
80100585: 53 push %ebx
80100586: 89 d6 mov %edx,%esi
80100588: 83 ec 2c sub $0x2c,%esp
static char digits[] = "0123456789abcdef";
char buf[16];
int i;
uint x;
if(sign && (sign = xx < 0))
8010058b: 85 c9 test %ecx,%ecx
int locking;
} cons;
static void
printint(int xx, int base, int sign)
{
8010058d: 89 4d d4 mov %ecx,-0x2c(%ebp)
static char digits[] = "0123456789abcdef";
char buf[16];
int i;
uint x;
if(sign && (sign = xx < 0))
80100590: 74 0c je 8010059e <printint+0x1e>
80100592: 89 c7 mov %eax,%edi
80100594: c1 ef 1f shr $0x1f,%edi
80100597: 85 c0 test %eax,%eax
80100599: 89 7d d4 mov %edi,-0x2c(%ebp)
8010059c: 78 51 js 801005ef <printint+0x6f>
x = -xx;
else
x = xx;
i = 0;
8010059e: 31 ff xor %edi,%edi
801005a0: 8d 5d d7 lea -0x29(%ebp),%ebx
801005a3: eb 05 jmp 801005aa <printint+0x2a>
801005a5: 8d 76 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
801005a8: 89 cf mov %ecx,%edi
801005aa: 31 d2 xor %edx,%edx
801005ac: 8d 4f 01 lea 0x1(%edi),%ecx
801005af: f7 f6 div %esi
801005b1: 0f b6 92 b0 76 10 80 movzbl -0x7fef8950(%edx),%edx
}while((x /= base) != 0);
801005b8: 85 c0 test %eax,%eax
else
x = xx;
i = 0;
do{
buf[i++] = digits[x % base];
801005ba: 88 14 0b mov %dl,(%ebx,%ecx,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 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1)
801005cb: 8d 4f 02 lea 0x2(%edi),%ecx
801005ce: 8d 74 0d d7 lea -0x29(%ebp,%ecx,1),%esi
801005d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
while(--i >= 0)
consputc(buf[i]);
801005d8: 0f be 06 movsbl (%esi),%eax
801005db: 83 ee 01 sub $0x1,%esi
801005de: e8 0d fe ff ff call 801003f0 <consputc>
}while((x /= base) != 0);
if(sign)
buf[i++] = '-';
while(--i >= 0)
801005e3: 39 de cmp %ebx,%esi
801005e5: 75 f1 jne 801005d8 <printint+0x58>
consputc(buf[i]);
}
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
char buf[16];
int i;
uint x;
if(sign && (sign = xx < 0))
x = -xx;
801005ef: f7 d8 neg %eax
801005f1: eb ab jmp 8010059e <printint+0x1e>
801005f3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801005f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80100600 <consolewrite>:
return target - n;
}
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
int i;
iunlock(ip);
80100609: ff 75 08 pushl 0x8(%ebp)
return target - n;
}
int
consolewrite(struct inode *ip, char *buf, int n)
{
8010060c: 8b 75 10 mov 0x10(%ebp),%esi
int i;
iunlock(ip);
8010060f: e8 3c 11 00 00 call 80101750 <iunlock>
acquire(&cons.lock);
80100614: c7 04 24 20 b5 10 80 movl $0x8010b520,(%esp)
8010061b: e8 a0 42 00 00 call 801048c0 <acquire>
80100620: 8b 7d 0c mov 0xc(%ebp),%edi
for(i = 0; i < n; i++)
80100623: 83 c4 10 add $0x10,%esp
80100626: 85 f6 test %esi,%esi
80100628: 8d 1c 37 lea (%edi,%esi,1),%ebx
8010062b: 7e 12 jle 8010063f <consolewrite+0x3f>
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 b5 fd ff ff call 801003f0 <consputc>
{
int i;
iunlock(ip);
acquire(&cons.lock);
for(i = 0; i < n; i++)
8010063b: 39 df cmp %ebx,%edi
8010063d: 75 f1 jne 80100630 <consolewrite+0x30>
consputc(buf[i] & 0xff);
release(&cons.lock);
8010063f: 83 ec 0c sub $0xc,%esp
80100642: 68 20 b5 10 80 push $0x8010b520
80100647: e8 94 43 00 00 call 801049e0 <release>
ilock(ip);
8010064c: 58 pop %eax
8010064d: ff 75 08 pushl 0x8(%ebp)
80100650: e8 1b 10 00 00 call 80101670 <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>:
}
// Print to the console. only understands %d, %x, %p, %s.
void
cprintf(char *fmt, ...)
{
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
int i, c, locking;
uint *argp;
char *s;
locking = cons.locking;
80100669: a1 54 b5 10 80 mov 0x8010b554,%eax
if(locking)
8010066e: 85 c0 test %eax,%eax
{
int i, c, locking;
uint *argp;
char *s;
locking = cons.locking;
80100670: 89 45 e0 mov %eax,-0x20(%ebp)
if(locking)
80100673: 0f 85 47 01 00 00 jne 801007c0 <cprintf+0x160>
acquire(&cons.lock);
if (fmt == 0)
80100679: 8b 45 08 mov 0x8(%ebp),%eax
8010067c: 85 c0 test %eax,%eax
8010067e: 89 c1 mov %eax,%ecx
80100680: 0f 84 4f 01 00 00 je 801007d5 <cprintf+0x175>
panic("null fmt");
argp = (uint*)(void*)(&fmt + 1);
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
80100686: 0f b6 00 movzbl (%eax),%eax
80100689: 31 db xor %ebx,%ebx
8010068b: 8d 75 0c lea 0xc(%ebp),%esi
8010068e: 89 cf mov %ecx,%edi
80100690: 85 c0 test %eax,%eax
80100692: 75 55 jne 801006e9 <cprintf+0x89>
80100694: eb 68 jmp 801006fe <cprintf+0x9e>
80100696: 8d 76 00 lea 0x0(%esi),%esi
80100699: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(c != '%'){
consputc(c);
continue;
}
c = fmt[++i] & 0xff;
801006a0: 83 c3 01 add $0x1,%ebx
801006a3: 0f b6 14 1f movzbl (%edi,%ebx,1),%edx
if(c == 0)
801006a7: 85 d2 test %edx,%edx
801006a9: 74 53 je 801006fe <cprintf+0x9e>
break;
switch(c){
801006ab: 83 fa 70 cmp $0x70,%edx
801006ae: 74 7a je 8010072a <cprintf+0xca>
801006b0: 7f 6e jg 80100720 <cprintf+0xc0>
801006b2: 83 fa 25 cmp $0x25,%edx
801006b5: 0f 84 ad 00 00 00 je 80100768 <cprintf+0x108>
801006bb: 83 fa 64 cmp $0x64,%edx
801006be: 0f 85 84 00 00 00 jne 80100748 <cprintf+0xe8>
case 'd':
printint(*argp++, 10, 1);
801006c4: 8d 46 04 lea 0x4(%esi),%eax
801006c7: b9 01 00 00 00 mov $0x1,%ecx
801006cc: ba 0a 00 00 00 mov $0xa,%edx
801006d1: 89 45 e4 mov %eax,-0x1c(%ebp)
801006d4: 8b 06 mov (%esi),%eax
801006d6: e8 a5 fe ff ff call 80100580 <printint>
801006db: 8b 75 e4 mov -0x1c(%ebp),%esi
if (fmt == 0)
panic("null fmt");
argp = (uint*)(void*)(&fmt + 1);
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
801006de: 83 c3 01 add $0x1,%ebx
801006e1: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax
801006e5: 85 c0 test %eax,%eax
801006e7: 74 15 je 801006fe <cprintf+0x9e>
if(c != '%'){
801006e9: 83 f8 25 cmp $0x25,%eax
801006ec: 74 b2 je 801006a0 <cprintf+0x40>
s = "(null)";
for(; *s; s++)
consputc(*s);
break;
case '%':
consputc('%');
801006ee: e8 fd fc ff ff call 801003f0 <consputc>
if (fmt == 0)
panic("null fmt");
argp = (uint*)(void*)(&fmt + 1);
for(i = 0; (c = fmt[i] & 0xff) != 0; i++){
801006f3: 83 c3 01 add $0x1,%ebx
801006f6: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax
801006fa: 85 c0 test %eax,%eax
801006fc: 75 eb jne 801006e9 <cprintf+0x89>
consputc(c);
break;
}
}
if(locking)
801006fe: 8b 45 e0 mov -0x20(%ebp),%eax
80100701: 85 c0 test %eax,%eax
80100703: 74 10 je 80100715 <cprintf+0xb5>
release(&cons.lock);
80100705: 83 ec 0c sub $0xc,%esp
80100708: 68 20 b5 10 80 push $0x8010b520
8010070d: e8 ce 42 00 00 call 801049e0 <release>
80100712: 83 c4 10 add $0x10,%esp
}
80100715: 8d 65 f4 lea -0xc(%ebp),%esp
80100718: 5b pop %ebx
80100719: 5e pop %esi
8010071a: 5f pop %edi
8010071b: 5d pop %ebp
8010071c: c3 ret
8010071d: 8d 76 00 lea 0x0(%esi),%esi
continue;
}
c = fmt[++i] & 0xff;
if(c == 0)
break;
switch(c){
80100720: 83 fa 73 cmp $0x73,%edx
80100723: 74 5b je 80100780 <cprintf+0x120>
80100725: 83 fa 78 cmp $0x78,%edx
80100728: 75 1e jne 80100748 <cprintf+0xe8>
case 'd':
printint(*argp++, 10, 1);
break;
case 'x':
case 'p':
printint(*argp++, 16, 0);
8010072a: 8d 46 04 lea 0x4(%esi),%eax
8010072d: 31 c9 xor %ecx,%ecx
8010072f: ba 10 00 00 00 mov $0x10,%edx
80100734: 89 45 e4 mov %eax,-0x1c(%ebp)
80100737: 8b 06 mov (%esi),%eax
80100739: e8 42 fe ff ff call 80100580 <printint>
8010073e: 8b 75 e4 mov -0x1c(%ebp),%esi
break;
80100741: eb 9b jmp 801006de <cprintf+0x7e>
80100743: 90 nop
80100744: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
case '%':
consputc('%');
break;
default:
// Print unknown % sequence to draw attention.
consputc('%');
80100748: b8 25 00 00 00 mov $0x25,%eax
8010074d: 89 55 e4 mov %edx,-0x1c(%ebp)
80100750: e8 9b fc ff ff call 801003f0 <consputc>
consputc(c);
80100755: 8b 55 e4 mov -0x1c(%ebp),%edx
80100758: 89 d0 mov %edx,%eax
8010075a: e8 91 fc ff ff call 801003f0 <consputc>
break;
8010075f: e9 7a ff ff ff jmp 801006de <cprintf+0x7e>
80100764: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
s = "(null)";
for(; *s; s++)
consputc(*s);
break;
case '%':
consputc('%');
80100768: b8 25 00 00 00 mov $0x25,%eax
8010076d: e8 7e fc ff ff call 801003f0 <consputc>
80100772: e9 7c ff ff ff jmp 801006f3 <cprintf+0x93>
80100777: 89 f6 mov %esi,%esi
80100779: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
case 'x':
case 'p':
printint(*argp++, 16, 0);
break;
case 's':
if((s = (char*)*argp++) == 0)
80100780: 8d 46 04 lea 0x4(%esi),%eax
80100783: 8b 36 mov (%esi),%esi
80100785: 89 45 e4 mov %eax,-0x1c(%ebp)
s = "(null)";
80100788: b8 98 76 10 80 mov $0x80107698,%eax
8010078d: 85 f6 test %esi,%esi
8010078f: 0f 44 f0 cmove %eax,%esi
for(; *s; s++)
80100792: 0f be 06 movsbl (%esi),%eax
80100795: 84 c0 test %al,%al
80100797: 74 16 je 801007af <cprintf+0x14f>
80100799: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801007a0: 83 c6 01 add $0x1,%esi
consputc(*s);
801007a3: e8 48 fc ff ff call 801003f0 <consputc>
printint(*argp++, 16, 0);
break;
case 's':
if((s = (char*)*argp++) == 0)
s = "(null)";
for(; *s; s++)
801007a8: 0f be 06 movsbl (%esi),%eax
801007ab: 84 c0 test %al,%al
801007ad: 75 f1 jne 801007a0 <cprintf+0x140>
case 'x':
case 'p':
printint(*argp++, 16, 0);
break;
case 's':
if((s = (char*)*argp++) == 0)
801007af: 8b 75 e4 mov -0x1c(%ebp),%esi
801007b2: e9 27 ff ff ff jmp 801006de <cprintf+0x7e>
801007b7: 89 f6 mov %esi,%esi
801007b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
uint *argp;
char *s;
locking = cons.locking;
if(locking)
acquire(&cons.lock);
801007c0: 83 ec 0c sub $0xc,%esp
801007c3: 68 20 b5 10 80 push $0x8010b520
801007c8: e8 f3 40 00 00 call 801048c0 <acquire>
801007cd: 83 c4 10 add $0x10,%esp
801007d0: e9 a4 fe ff ff jmp 80100679 <cprintf+0x19>
if (fmt == 0)
panic("null fmt");
801007d5: 83 ec 0c sub $0xc,%esp
801007d8: 68 9f 76 10 80 push $0x8010769f
801007dd: e8 8e fb ff ff call 80100370 <panic>
801007e2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801007e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801007f0 <consoleintr>:
#define C(x) ((x)-'@') // Control-x
void
consoleintr(int (*getc)(void))
{
801007f0: 55 push %ebp
801007f1: 89 e5 mov %esp,%ebp
801007f3: 57 push %edi
801007f4: 56 push %esi
801007f5: 53 push %ebx
int c, doprocdump = 0;
801007f6: 31 f6 xor %esi,%esi
#define C(x) ((x)-'@') // Control-x
void
consoleintr(int (*getc)(void))
{
801007f8: 83 ec 18 sub $0x18,%esp
801007fb: 8b 5d 08 mov 0x8(%ebp),%ebx
int c, doprocdump = 0;
acquire(&cons.lock);
801007fe: 68 20 b5 10 80 push $0x8010b520
80100803: e8 b8 40 00 00 call 801048c0 <acquire>
while((c = getc()) >= 0){
80100808: 83 c4 10 add $0x10,%esp
8010080b: 90 nop
8010080c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100810: ff d3 call *%ebx
80100812: 85 c0 test %eax,%eax
80100814: 89 c7 mov %eax,%edi
80100816: 78 48 js 80100860 <consoleintr+0x70>
switch(c){
80100818: 83 ff 10 cmp $0x10,%edi
8010081b: 0f 84 3f 01 00 00 je 80100960 <consoleintr+0x170>
80100821: 7e 5d jle 80100880 <consoleintr+0x90>
80100823: 83 ff 15 cmp $0x15,%edi
80100826: 0f 84 dc 00 00 00 je 80100908 <consoleintr+0x118>
8010082c: 83 ff 7f cmp $0x7f,%edi
8010082f: 75 54 jne 80100885 <consoleintr+0x95>
input.e--;
consputc(BACKSPACE);
}
break;
case C('H'): case '\x7f': // Backspace
if(input.e != input.w){
80100831: a1 a8 0f 11 80 mov 0x80110fa8,%eax
80100836: 3b 05 a4 0f 11 80 cmp 0x80110fa4,%eax
8010083c: 74 d2 je 80100810 <consoleintr+0x20>
input.e--;
8010083e: 83 e8 01 sub $0x1,%eax
80100841: a3 a8 0f 11 80 mov %eax,0x80110fa8
consputc(BACKSPACE);
80100846: b8 00 01 00 00 mov $0x100,%eax
8010084b: e8 a0 fb ff ff call 801003f0 <consputc>
consoleintr(int (*getc)(void))
{
int c, doprocdump = 0;
acquire(&cons.lock);
while((c = getc()) >= 0){
80100850: ff d3 call *%ebx
80100852: 85 c0 test %eax,%eax
80100854: 89 c7 mov %eax,%edi
80100856: 79 c0 jns 80100818 <consoleintr+0x28>
80100858: 90 nop
80100859: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}
}
break;
}
}
release(&cons.lock);
80100860: 83 ec 0c sub $0xc,%esp
80100863: 68 20 b5 10 80 push $0x8010b520
80100868: e8 73 41 00 00 call 801049e0 <release>
if(doprocdump) {
8010086d: 83 c4 10 add $0x10,%esp
80100870: 85 f6 test %esi,%esi
80100872: 0f 85 f8 00 00 00 jne 80100970 <consoleintr+0x180>
procdump(); // now call procdump() wo. cons.lock held
}
}
80100878: 8d 65 f4 lea -0xc(%ebp),%esp
8010087b: 5b pop %ebx
8010087c: 5e pop %esi
8010087d: 5f pop %edi
8010087e: 5d pop %ebp
8010087f: c3 ret
{
int c, doprocdump = 0;
acquire(&cons.lock);
while((c = getc()) >= 0){
switch(c){
80100880: 83 ff 08 cmp $0x8,%edi
80100883: 74 ac je 80100831 <consoleintr+0x41>
input.e--;
consputc(BACKSPACE);
}
break;
default:
if(c != 0 && input.e-input.r < INPUT_BUF){
80100885: 85 ff test %edi,%edi
80100887: 74 87 je 80100810 <consoleintr+0x20>
80100889: a1 a8 0f 11 80 mov 0x80110fa8,%eax
8010088e: 89 c2 mov %eax,%edx
80100890: 2b 15 a0 0f 11 80 sub 0x80110fa0,%edx
80100896: 83 fa 7f cmp $0x7f,%edx
80100899: 0f 87 71 ff ff ff ja 80100810 <consoleintr+0x20>
c = (c == '\r') ? '\n' : c;
input.buf[input.e++ % INPUT_BUF] = c;
8010089f: 8d 50 01 lea 0x1(%eax),%edx
801008a2: 83 e0 7f and $0x7f,%eax
consputc(BACKSPACE);
}
break;
default:
if(c != 0 && input.e-input.r < INPUT_BUF){
c = (c == '\r') ? '\n' : c;
801008a5: 83 ff 0d cmp $0xd,%edi
input.buf[input.e++ % INPUT_BUF] = c;
801008a8: 89 15 a8 0f 11 80 mov %edx,0x80110fa8
consputc(BACKSPACE);
}
break;
default:
if(c != 0 && input.e-input.r < INPUT_BUF){
c = (c == '\r') ? '\n' : c;
801008ae: 0f 84 c8 00 00 00 je 8010097c <consoleintr+0x18c>
input.buf[input.e++ % INPUT_BUF] = c;
801008b4: 89 f9 mov %edi,%ecx
801008b6: 88 88 20 0f 11 80 mov %cl,-0x7feef0e0(%eax)
consputc(c);
801008bc: 89 f8 mov %edi,%eax
801008be: e8 2d fb ff ff call 801003f0 <consputc>
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){
801008c3: 83 ff 0a cmp $0xa,%edi
801008c6: 0f 84 c1 00 00 00 je 8010098d <consoleintr+0x19d>
801008cc: 83 ff 04 cmp $0x4,%edi
801008cf: 0f 84 b8 00 00 00 je 8010098d <consoleintr+0x19d>
801008d5: a1 a0 0f 11 80 mov 0x80110fa0,%eax
801008da: 83 e8 80 sub $0xffffff80,%eax
801008dd: 39 05 a8 0f 11 80 cmp %eax,0x80110fa8
801008e3: 0f 85 27 ff ff ff jne 80100810 <consoleintr+0x20>
input.w = input.e;
wakeup(&input.r);
801008e9: 83 ec 0c sub $0xc,%esp
if(c != 0 && input.e-input.r < INPUT_BUF){
c = (c == '\r') ? '\n' : c;
input.buf[input.e++ % INPUT_BUF] = c;
consputc(c);
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){
input.w = input.e;
801008ec: a3 a4 0f 11 80 mov %eax,0x80110fa4
wakeup(&input.r);
801008f1: 68 a0 0f 11 80 push $0x80110fa0
801008f6: e8 35 37 00 00 call 80104030 <wakeup>
801008fb: 83 c4 10 add $0x10,%esp
801008fe: e9 0d ff ff ff jmp 80100810 <consoleintr+0x20>
80100903: 90 nop
80100904: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
case C('P'): // Process listing.
// procdump() locks cons.lock indirectly; invoke later
doprocdump = 1;
break;
case C('U'): // Kill line.
while(input.e != input.w &&
80100908: a1 a8 0f 11 80 mov 0x80110fa8,%eax
8010090d: 39 05 a4 0f 11 80 cmp %eax,0x80110fa4
80100913: 75 2b jne 80100940 <consoleintr+0x150>
80100915: e9 f6 fe ff ff jmp 80100810 <consoleintr+0x20>
8010091a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
input.e--;
80100920: a3 a8 0f 11 80 mov %eax,0x80110fa8
consputc(BACKSPACE);
80100925: b8 00 01 00 00 mov $0x100,%eax
8010092a: e8 c1 fa ff ff call 801003f0 <consputc>
case C('P'): // Process listing.
// procdump() locks cons.lock indirectly; invoke later
doprocdump = 1;
break;
case C('U'): // Kill line.
while(input.e != input.w &&
8010092f: a1 a8 0f 11 80 mov 0x80110fa8,%eax
80100934: 3b 05 a4 0f 11 80 cmp 0x80110fa4,%eax
8010093a: 0f 84 d0 fe ff ff je 80100810 <consoleintr+0x20>
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
80100940: 83 e8 01 sub $0x1,%eax
80100943: 89 c2 mov %eax,%edx
80100945: 83 e2 7f and $0x7f,%edx
case C('P'): // Process listing.
// procdump() locks cons.lock indirectly; invoke later
doprocdump = 1;
break;
case C('U'): // Kill line.
while(input.e != input.w &&
80100948: 80 ba 20 0f 11 80 0a cmpb $0xa,-0x7feef0e0(%edx)
8010094f: 75 cf jne 80100920 <consoleintr+0x130>
80100951: e9 ba fe ff ff jmp 80100810 <consoleintr+0x20>
80100956: 8d 76 00 lea 0x0(%esi),%esi
80100959: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
acquire(&cons.lock);
while((c = getc()) >= 0){
switch(c){
case C('P'): // Process listing.
// procdump() locks cons.lock indirectly; invoke later
doprocdump = 1;
80100960: be 01 00 00 00 mov $0x1,%esi
80100965: e9 a6 fe ff ff jmp 80100810 <consoleintr+0x20>
8010096a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
}
release(&cons.lock);
if(doprocdump) {
procdump(); // now call procdump() wo. cons.lock held
}
}
80100970: 8d 65 f4 lea -0xc(%ebp),%esp
80100973: 5b pop %ebx
80100974: 5e pop %esi
80100975: 5f pop %edi
80100976: 5d pop %ebp
break;
}
}
release(&cons.lock);
if(doprocdump) {
procdump(); // now call procdump() wo. cons.lock held
80100977: e9 a4 37 00 00 jmp 80104120 <procdump>
}
break;
default:
if(c != 0 && input.e-input.r < INPUT_BUF){
c = (c == '\r') ? '\n' : c;
input.buf[input.e++ % INPUT_BUF] = c;
8010097c: c6 80 20 0f 11 80 0a movb $0xa,-0x7feef0e0(%eax)
consputc(c);
80100983: b8 0a 00 00 00 mov $0xa,%eax
80100988: e8 63 fa ff ff call 801003f0 <consputc>
8010098d: a1 a8 0f 11 80 mov 0x80110fa8,%eax
80100992: e9 52 ff ff ff jmp 801008e9 <consoleintr+0xf9>
80100997: 89 f6 mov %esi,%esi
80100999: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801009a0 <consoleinit>:
return n;
}
void
consoleinit(void)
{
801009a0: 55 push %ebp
801009a1: 89 e5 mov %esp,%ebp
801009a3: 83 ec 10 sub $0x10,%esp
initlock(&cons.lock, "console");
801009a6: 68 a8 76 10 80 push $0x801076a8
801009ab: 68 20 b5 10 80 push $0x8010b520
801009b0: e8 0b 3e 00 00 call 801047c0 <initlock>
devsw[CONSOLE].write = consolewrite;
devsw[CONSOLE].read = consoleread;
cons.locking = 1;
ioapicenable(IRQ_KBD, 0);
801009b5: 58 pop %eax
801009b6: 5a pop %edx
801009b7: 6a 00 push $0x0
801009b9: 6a 01 push $0x1
void
consoleinit(void)
{
initlock(&cons.lock, "console");
devsw[CONSOLE].write = consolewrite;
801009bb: c7 05 6c 19 11 80 00 movl $0x80100600,0x8011196c
801009c2: 06 10 80
devsw[CONSOLE].read = consoleread;
801009c5: c7 05 68 19 11 80 70 movl $0x80100270,0x80111968
801009cc: 02 10 80
cons.locking = 1;
801009cf: c7 05 54 b5 10 80 01 movl $0x1,0x8010b554
801009d6: 00 00 00
ioapicenable(IRQ_KBD, 0);
801009d9: e8 c2 18 00 00 call 801022a0 <ioapicenable>
}
801009de: 83 c4 10 add $0x10,%esp
801009e1: c9 leave
801009e2: c3 ret
801009e3: 66 90 xchg %ax,%ax
801009e5: 66 90 xchg %ax,%ax
801009e7: 66 90 xchg %ax,%ax
801009e9: 66 90 xchg %ax,%ax
801009eb: 66 90 xchg %ax,%ax
801009ed: 66 90 xchg %ax,%ax
801009ef: 90 nop
801009f0 <exec>:
#include "x86.h"
#include "elf.h"
int
exec(char *path, char **argv)
{
801009f0: 55 push %ebp
801009f1: 89 e5 mov %esp,%ebp
801009f3: 57 push %edi
801009f4: 56 push %esi
801009f5: 53 push %ebx
801009f6: 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();
801009fc: e8 9f 2d 00 00 call 801037a0 <myproc>
80100a01: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp)
begin_op();
80100a07: e8 44 21 00 00 call 80102b50 <begin_op>
if((ip = namei(path)) == 0){
80100a0c: 83 ec 0c sub $0xc,%esp
80100a0f: ff 75 08 pushl 0x8(%ebp)
80100a12: e8 a9 14 00 00 call 80101ec0 <namei>
80100a17: 83 c4 10 add $0x10,%esp
80100a1a: 85 c0 test %eax,%eax
80100a1c: 0f 84 9c 01 00 00 je 80100bbe <exec+0x1ce>
end_op();
cprintf("exec: fail\n");
return -1;
}
ilock(ip);
80100a22: 83 ec 0c sub $0xc,%esp
80100a25: 89 c3 mov %eax,%ebx
80100a27: 50 push %eax
80100a28: e8 43 0c 00 00 call 80101670 <ilock>
pgdir = 0;
// Check ELF header
if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf))
80100a2d: 8d 85 24 ff ff ff lea -0xdc(%ebp),%eax
80100a33: 6a 34 push $0x34
80100a35: 6a 00 push $0x0
80100a37: 50 push %eax
80100a38: 53 push %ebx
80100a39: e8 12 0f 00 00 call 80101950 <readi>
80100a3e: 83 c4 20 add $0x20,%esp
80100a41: 83 f8 34 cmp $0x34,%eax
80100a44: 74 22 je 80100a68 <exec+0x78>
bad:
if(pgdir)
freevm(pgdir);
if(ip){
iunlockput(ip);
80100a46: 83 ec 0c sub $0xc,%esp
80100a49: 53 push %ebx
80100a4a: e8 b1 0e 00 00 call 80101900 <iunlockput>
end_op();
80100a4f: e8 6c 21 00 00 call 80102bc0 <end_op>
80100a54: 83 c4 10 add $0x10,%esp
}
return -1;
80100a57: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100a5c: 8d 65 f4 lea -0xc(%ebp),%esp
80100a5f: 5b pop %ebx
80100a60: 5e pop %esi
80100a61: 5f pop %edi
80100a62: 5d pop %ebp
80100a63: c3 ret
80100a64: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
pgdir = 0;
// Check ELF header
if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf))
goto bad;
if(elf.magic != ELF_MAGIC)
80100a68: 81 bd 24 ff ff ff 7f cmpl $0x464c457f,-0xdc(%ebp)
80100a6f: 45 4c 46
80100a72: 75 d2 jne 80100a46 <exec+0x56>
goto bad;
if((pgdir = setupkvm()) == 0)
80100a74: e8 27 69 00 00 call 801073a0 <setupkvm>
80100a79: 85 c0 test %eax,%eax
80100a7b: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp)
80100a81: 74 c3 je 80100a46 <exec+0x56>
goto bad;
// Load program into memory.
sz = 0;
for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
80100a83: 66 83 bd 50 ff ff ff cmpw $0x0,-0xb0(%ebp)
80100a8a: 00
80100a8b: 8b b5 40 ff ff ff mov -0xc0(%ebp),%esi
80100a91: c7 85 ec fe ff ff 00 movl $0x0,-0x114(%ebp)
80100a98: 00 00 00
80100a9b: 0f 84 c5 00 00 00 je 80100b66 <exec+0x176>
80100aa1: 31 ff xor %edi,%edi
80100aa3: eb 18 jmp 80100abd <exec+0xcd>
80100aa5: 8d 76 00 lea 0x0(%esi),%esi
80100aa8: 0f b7 85 50 ff ff ff movzwl -0xb0(%ebp),%eax
80100aaf: 83 c7 01 add $0x1,%edi
80100ab2: 83 c6 20 add $0x20,%esi
80100ab5: 39 f8 cmp %edi,%eax
80100ab7: 0f 8e a9 00 00 00 jle 80100b66 <exec+0x176>
if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph))
80100abd: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax
80100ac3: 6a 20 push $0x20
80100ac5: 56 push %esi
80100ac6: 50 push %eax
80100ac7: 53 push %ebx
80100ac8: e8 83 0e 00 00 call 80101950 <readi>
80100acd: 83 c4 10 add $0x10,%esp
80100ad0: 83 f8 20 cmp $0x20,%eax
80100ad3: 75 7b jne 80100b50 <exec+0x160>
goto bad;
if(ph.type != ELF_PROG_LOAD)
80100ad5: 83 bd 04 ff ff ff 01 cmpl $0x1,-0xfc(%ebp)
80100adc: 75 ca jne 80100aa8 <exec+0xb8>
continue;
if(ph.memsz < ph.filesz)
80100ade: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax
80100ae4: 3b 85 14 ff ff ff cmp -0xec(%ebp),%eax
80100aea: 72 64 jb 80100b50 <exec+0x160>
goto bad;
if(ph.vaddr + ph.memsz < ph.vaddr)
80100aec: 03 85 0c ff ff ff add -0xf4(%ebp),%eax
80100af2: 72 5c jb 80100b50 <exec+0x160>
goto bad;
if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0)
80100af4: 83 ec 04 sub $0x4,%esp
80100af7: 50 push %eax
80100af8: ff b5 ec fe ff ff pushl -0x114(%ebp)
80100afe: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100b04: e8 e7 66 00 00 call 801071f0 <allocuvm>
80100b09: 83 c4 10 add $0x10,%esp
80100b0c: 85 c0 test %eax,%eax
80100b0e: 89 85 ec fe ff ff mov %eax,-0x114(%ebp)
80100b14: 74 3a je 80100b50 <exec+0x160>
goto bad;
if(ph.vaddr % PGSIZE != 0)
80100b16: 8b 85 0c ff ff ff mov -0xf4(%ebp),%eax
80100b1c: a9 ff 0f 00 00 test $0xfff,%eax
80100b21: 75 2d jne 80100b50 <exec+0x160>
goto bad;
if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0)
80100b23: 83 ec 0c sub $0xc,%esp
80100b26: ff b5 14 ff ff ff pushl -0xec(%ebp)
80100b2c: ff b5 08 ff ff ff pushl -0xf8(%ebp)
80100b32: 53 push %ebx
80100b33: 50 push %eax
80100b34: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100b3a: e8 f1 65 00 00 call 80107130 <loaduvm>
80100b3f: 83 c4 20 add $0x20,%esp
80100b42: 85 c0 test %eax,%eax
80100b44: 0f 89 5e ff ff ff jns 80100aa8 <exec+0xb8>
80100b4a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
freevm(oldpgdir);
return 0;
bad:
if(pgdir)
freevm(pgdir);
80100b50: 83 ec 0c sub $0xc,%esp
80100b53: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100b59: e8 c2 67 00 00 call 80107320 <freevm>
80100b5e: 83 c4 10 add $0x10,%esp
80100b61: e9 e0 fe ff ff jmp 80100a46 <exec+0x56>
if(ph.vaddr % PGSIZE != 0)
goto bad;
if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0)
goto bad;
}
iunlockput(ip);
80100b66: 83 ec 0c sub $0xc,%esp
80100b69: 53 push %ebx
80100b6a: e8 91 0d 00 00 call 80101900 <iunlockput>
end_op();
80100b6f: e8 4c 20 00 00 call 80102bc0 <end_op>
ip = 0;
// Allocate two pages at the next page boundary.
// Make the first inaccessible. Use the second as the user stack.
sz = PGROUNDUP(sz);
80100b74: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax
if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0)
80100b7a: 83 c4 0c add $0xc,%esp
end_op();
ip = 0;
// Allocate two pages at the next page boundary.
// Make the first inaccessible. Use the second as the user stack.
sz = PGROUNDUP(sz);
80100b7d: 05 ff 0f 00 00 add $0xfff,%eax
80100b82: 25 00 f0 ff ff and $0xfffff000,%eax
if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0)
80100b87: 8d 90 00 20 00 00 lea 0x2000(%eax),%edx
80100b8d: 52 push %edx
80100b8e: 50 push %eax
80100b8f: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100b95: e8 56 66 00 00 call 801071f0 <allocuvm>
80100b9a: 83 c4 10 add $0x10,%esp
80100b9d: 85 c0 test %eax,%eax
80100b9f: 89 c6 mov %eax,%esi
80100ba1: 75 3a jne 80100bdd <exec+0x1ed>
freevm(oldpgdir);
return 0;
bad:
if(pgdir)
freevm(pgdir);
80100ba3: 83 ec 0c sub $0xc,%esp
80100ba6: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100bac: e8 6f 67 00 00 call 80107320 <freevm>
80100bb1: 83 c4 10 add $0x10,%esp
if(ip){
iunlockput(ip);
end_op();
}
return -1;
80100bb4: b8 ff ff ff ff mov $0xffffffff,%eax
80100bb9: e9 9e fe ff ff jmp 80100a5c <exec+0x6c>
struct proc *curproc = myproc();
begin_op();
if((ip = namei(path)) == 0){
end_op();
80100bbe: e8 fd 1f 00 00 call 80102bc0 <end_op>
cprintf("exec: fail\n");
80100bc3: 83 ec 0c sub $0xc,%esp
80100bc6: 68 c1 76 10 80 push $0x801076c1
80100bcb: e8 90 fa ff ff call 80100660 <cprintf>
return -1;
80100bd0: 83 c4 10 add $0x10,%esp
80100bd3: b8 ff ff ff ff mov $0xffffffff,%eax
80100bd8: e9 7f fe ff ff jmp 80100a5c <exec+0x6c>
// Allocate two pages at the next page boundary.
// Make the first inaccessible. Use the second as the user stack.
sz = PGROUNDUP(sz);
if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0)
goto bad;
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100bdd: 8d 80 00 e0 ff ff lea -0x2000(%eax),%eax
80100be3: 83 ec 08 sub $0x8,%esp
sp = sz;
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
80100be6: 31 ff xor %edi,%edi
80100be8: 89 f3 mov %esi,%ebx
// Allocate two pages at the next page boundary.
// Make the first inaccessible. Use the second as the user stack.
sz = PGROUNDUP(sz);
if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0)
goto bad;
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
80100bea: 50 push %eax
80100beb: ff b5 f0 fe ff ff pushl -0x110(%ebp)
80100bf1: e8 4a 68 00 00 call 80107440 <clearpteu>
sp = sz;
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
80100bf6: 8b 45 0c mov 0xc(%ebp),%eax
80100bf9: 83 c4 10 add $0x10,%esp
80100bfc: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
80100c02: 8b 00 mov (%eax),%eax
80100c04: 85 c0 test %eax,%eax
80100c06: 74 79 je 80100c81 <exec+0x291>
80100c08: 89 b5 ec fe ff ff mov %esi,-0x114(%ebp)
80100c0e: 8b b5 f0 fe ff ff mov -0x110(%ebp),%esi
80100c14: eb 13 jmp 80100c29 <exec+0x239>
80100c16: 8d 76 00 lea 0x0(%esi),%esi
80100c19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(argc >= MAXARG)
80100c20: 83 ff 20 cmp $0x20,%edi
80100c23: 0f 84 7a ff ff ff je 80100ba3 <exec+0x1b3>
goto bad;
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100c29: 83 ec 0c sub $0xc,%esp
80100c2c: 50 push %eax
80100c2d: e8 3e 40 00 00 call 80104c70 <strlen>
80100c32: f7 d0 not %eax
80100c34: 01 c3 add %eax,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100c36: 8b 45 0c mov 0xc(%ebp),%eax
80100c39: 5a pop %edx
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
if(argc >= MAXARG)
goto bad;
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
80100c3a: 83 e3 fc and $0xfffffffc,%ebx
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
80100c3d: ff 34 b8 pushl (%eax,%edi,4)
80100c40: e8 2b 40 00 00 call 80104c70 <strlen>
80100c45: 83 c0 01 add $0x1,%eax
80100c48: 50 push %eax
80100c49: 8b 45 0c mov 0xc(%ebp),%eax
80100c4c: ff 34 b8 pushl (%eax,%edi,4)
80100c4f: 53 push %ebx
80100c50: 56 push %esi
80100c51: e8 4a 69 00 00 call 801075a0 <copyout>
80100c56: 83 c4 20 add $0x20,%esp
80100c59: 85 c0 test %eax,%eax
80100c5b: 0f 88 42 ff ff ff js 80100ba3 <exec+0x1b3>
goto bad;
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
sp = sz;
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
80100c61: 8b 45 0c mov 0xc(%ebp),%eax
if(argc >= MAXARG)
goto bad;
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
goto bad;
ustack[3+argc] = sp;
80100c64: 89 9c bd 64 ff ff ff mov %ebx,-0x9c(%ebp,%edi,4)
goto bad;
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
sp = sz;
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
80100c6b: 83 c7 01 add $0x1,%edi
if(argc >= MAXARG)
goto bad;
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
goto bad;
ustack[3+argc] = sp;
80100c6e: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
goto bad;
clearpteu(pgdir, (char*)(sz - 2*PGSIZE));
sp = sz;
// Push argument strings, prepare rest of stack in ustack.
for(argc = 0; argv[argc]; argc++) {
80100c74: 8b 04 b8 mov (%eax,%edi,4),%eax
80100c77: 85 c0 test %eax,%eax
80100c79: 75 a5 jne 80100c20 <exec+0x230>
80100c7b: 8b b5 ec fe ff ff mov -0x114(%ebp),%esi
}
ustack[3+argc] = 0;
ustack[0] = 0xffffffff; // fake return PC
ustack[1] = argc;
ustack[2] = sp - (argc+1)*4; // argv pointer
80100c81: 8d 04 bd 04 00 00 00 lea 0x4(,%edi,4),%eax
80100c88: 89 d9 mov %ebx,%ecx
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
goto bad;
ustack[3+argc] = sp;
}
ustack[3+argc] = 0;
80100c8a: c7 84 bd 64 ff ff ff movl $0x0,-0x9c(%ebp,%edi,4)
80100c91: 00 00 00 00
ustack[0] = 0xffffffff; // fake return PC
80100c95: c7 85 58 ff ff ff ff movl $0xffffffff,-0xa8(%ebp)
80100c9c: ff ff ff
ustack[1] = argc;
80100c9f: 89 bd 5c ff ff ff mov %edi,-0xa4(%ebp)
ustack[2] = sp - (argc+1)*4; // argv pointer
80100ca5: 29 c1 sub %eax,%ecx
sp -= (3+argc+1) * 4;
80100ca7: 83 c0 0c add $0xc,%eax
80100caa: 29 c3 sub %eax,%ebx
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
80100cac: 50 push %eax
80100cad: 52 push %edx
80100cae: 53 push %ebx
80100caf: ff b5 f0 fe ff ff pushl -0x110(%ebp)
}
ustack[3+argc] = 0;
ustack[0] = 0xffffffff; // fake return PC
ustack[1] = argc;
ustack[2] = sp - (argc+1)*4; // argv pointer
80100cb5: 89 8d 60 ff ff ff mov %ecx,-0xa0(%ebp)
sp -= (3+argc+1) * 4;
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
80100cbb: e8 e0 68 00 00 call 801075a0 <copyout>
80100cc0: 83 c4 10 add $0x10,%esp
80100cc3: 85 c0 test %eax,%eax
80100cc5: 0f 88 d8 fe ff ff js 80100ba3 <exec+0x1b3>
goto bad;
// Save program name for debugging.
for(last=s=path; *s; s++)
80100ccb: 8b 45 08 mov 0x8(%ebp),%eax
80100cce: 0f b6 10 movzbl (%eax),%edx
80100cd1: 84 d2 test %dl,%dl
80100cd3: 74 19 je 80100cee <exec+0x2fe>
80100cd5: 8b 4d 08 mov 0x8(%ebp),%ecx
80100cd8: 83 c0 01 add $0x1,%eax
if(*s == '/')
last = s+1;
80100cdb: 80 fa 2f cmp $0x2f,%dl
sp -= (3+argc+1) * 4;
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
goto bad;
// Save program name for debugging.
for(last=s=path; *s; s++)
80100cde: 0f b6 10 movzbl (%eax),%edx
if(*s == '/')
last = s+1;
80100ce1: 0f 44 c8 cmove %eax,%ecx
80100ce4: 83 c0 01 add $0x1,%eax
sp -= (3+argc+1) * 4;
if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0)
goto bad;
// Save program name for debugging.
for(last=s=path; *s; s++)
80100ce7: 84 d2 test %dl,%dl
80100ce9: 75 f0 jne 80100cdb <exec+0x2eb>
80100ceb: 89 4d 08 mov %ecx,0x8(%ebp)
if(*s == '/')
last = s+1;
safestrcpy(curproc->name, last, sizeof(curproc->name));
80100cee: 8b bd f4 fe ff ff mov -0x10c(%ebp),%edi
80100cf4: 50 push %eax
80100cf5: 6a 10 push $0x10
80100cf7: ff 75 08 pushl 0x8(%ebp)
80100cfa: 89 f8 mov %edi,%eax
80100cfc: 83 c0 6c add $0x6c,%eax
80100cff: 50 push %eax
80100d00: e8 2b 3f 00 00 call 80104c30 <safestrcpy>
// Commit to the user image.
oldpgdir = curproc->pgdir;
curproc->pgdir = pgdir;
80100d05: 8b 8d f0 fe ff ff mov -0x110(%ebp),%ecx
if(*s == '/')
last = s+1;
safestrcpy(curproc->name, last, sizeof(curproc->name));
// Commit to the user image.
oldpgdir = curproc->pgdir;
80100d0b: 89 f8 mov %edi,%eax
80100d0d: 8b 7f 04 mov 0x4(%edi),%edi
curproc->pgdir = pgdir;
curproc->sz = sz;
80100d10: 89 30 mov %esi,(%eax)
last = s+1;
safestrcpy(curproc->name, last, sizeof(curproc->name));
// Commit to the user image.
oldpgdir = curproc->pgdir;
curproc->pgdir = pgdir;
80100d12: 89 48 04 mov %ecx,0x4(%eax)
curproc->sz = sz;
curproc->tf->eip = elf.entry; // main
80100d15: 89 c1 mov %eax,%ecx
80100d17: 8b 95 3c ff ff ff mov -0xc4(%ebp),%edx
80100d1d: 8b 40 18 mov 0x18(%eax),%eax
80100d20: 89 50 38 mov %edx,0x38(%eax)
curproc->tf->esp = sp;
80100d23: 8b 41 18 mov 0x18(%ecx),%eax
80100d26: 89 58 44 mov %ebx,0x44(%eax)
curproc->priority=2;
80100d29: c7 41 7c 02 00 00 00 movl $0x2,0x7c(%ecx)
switchuvm(curproc);
80100d30: 89 0c 24 mov %ecx,(%esp)
80100d33: e8 68 62 00 00 call 80106fa0 <switchuvm>
freevm(oldpgdir);
80100d38: 89 3c 24 mov %edi,(%esp)
80100d3b: e8 e0 65 00 00 call 80107320 <freevm>
return 0;
80100d40: 83 c4 10 add $0x10,%esp
80100d43: 31 c0 xor %eax,%eax
80100d45: e9 12 fd ff ff jmp 80100a5c <exec+0x6c>
80100d4a: 66 90 xchg %ax,%ax
80100d4c: 66 90 xchg %ax,%ax
80100d4e: 66 90 xchg %ax,%ax
80100d50 <fileinit>:
struct file file[NFILE];
} ftable;
void
fileinit(void)
{
80100d50: 55 push %ebp
80100d51: 89 e5 mov %esp,%ebp
80100d53: 83 ec 10 sub $0x10,%esp
initlock(&ftable.lock, "ftable");
80100d56: 68 cd 76 10 80 push $0x801076cd
80100d5b: 68 c0 0f 11 80 push $0x80110fc0
80100d60: e8 5b 3a 00 00 call 801047c0 <initlock>
}
80100d65: 83 c4 10 add $0x10,%esp
80100d68: c9 leave
80100d69: c3 ret
80100d6a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100d70 <filealloc>:
// Allocate a file structure.
struct file*
filealloc(void)
{
80100d70: 55 push %ebp
80100d71: 89 e5 mov %esp,%ebp
80100d73: 53 push %ebx
struct file *f;
acquire(&ftable.lock);
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100d74: bb f4 0f 11 80 mov $0x80110ff4,%ebx
}
// Allocate a file structure.
struct file*
filealloc(void)
{
80100d79: 83 ec 10 sub $0x10,%esp
struct file *f;
acquire(&ftable.lock);
80100d7c: 68 c0 0f 11 80 push $0x80110fc0
80100d81: e8 3a 3b 00 00 call 801048c0 <acquire>
80100d86: 83 c4 10 add $0x10,%esp
80100d89: eb 10 jmp 80100d9b <filealloc+0x2b>
80100d8b: 90 nop
80100d8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(f = ftable.file; f < ftable.file + NFILE; f++){
80100d90: 83 c3 18 add $0x18,%ebx
80100d93: 81 fb 54 19 11 80 cmp $0x80111954,%ebx
80100d99: 74 25 je 80100dc0 <filealloc+0x50>
if(f->ref == 0){
80100d9b: 8b 43 04 mov 0x4(%ebx),%eax
80100d9e: 85 c0 test %eax,%eax
80100da0: 75 ee jne 80100d90 <filealloc+0x20>
f->ref = 1;
release(&ftable.lock);
80100da2: 83 ec 0c sub $0xc,%esp
struct file *f;
acquire(&ftable.lock);
for(f = ftable.file; f < ftable.file + NFILE; f++){
if(f->ref == 0){
f->ref = 1;
80100da5: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
release(&ftable.lock);
80100dac: 68 c0 0f 11 80 push $0x80110fc0
80100db1: e8 2a 3c 00 00 call 801049e0 <release>
return f;
80100db6: 89 d8 mov %ebx,%eax
80100db8: 83 c4 10 add $0x10,%esp
}
}
release(&ftable.lock);
return 0;
}
80100dbb: 8b 5d fc mov -0x4(%ebp),%ebx
80100dbe: c9 leave
80100dbf: c3 ret
f->ref = 1;
release(&ftable.lock);
return f;
}
}
release(&ftable.lock);
80100dc0: 83 ec 0c sub $0xc,%esp
80100dc3: 68 c0 0f 11 80 push $0x80110fc0
80100dc8: e8 13 3c 00 00 call 801049e0 <release>
return 0;
80100dcd: 83 c4 10 add $0x10,%esp
80100dd0: 31 c0 xor %eax,%eax
}
80100dd2: 8b 5d fc mov -0x4(%ebp),%ebx
80100dd5: c9 leave
80100dd6: c3 ret
80100dd7: 89 f6 mov %esi,%esi
80100dd9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80100de0 <filedup>:
// Increment ref count for file f.
struct file*
filedup(struct file *f)
{
80100de0: 55 push %ebp
80100de1: 89 e5 mov %esp,%ebp
80100de3: 53 push %ebx
80100de4: 83 ec 10 sub $0x10,%esp
80100de7: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ftable.lock);
80100dea: 68 c0 0f 11 80 push $0x80110fc0
80100def: e8 cc 3a 00 00 call 801048c0 <acquire>
if(f->ref < 1)
80100df4: 8b 43 04 mov 0x4(%ebx),%eax
80100df7: 83 c4 10 add $0x10,%esp
80100dfa: 85 c0 test %eax,%eax
80100dfc: 7e 1a jle 80100e18 <filedup+0x38>
panic("filedup");
f->ref++;
80100dfe: 83 c0 01 add $0x1,%eax
release(&ftable.lock);
80100e01: 83 ec 0c sub $0xc,%esp
filedup(struct file *f)
{
acquire(&ftable.lock);
if(f->ref < 1)
panic("filedup");
f->ref++;
80100e04: 89 43 04 mov %eax,0x4(%ebx)
release(&ftable.lock);
80100e07: 68 c0 0f 11 80 push $0x80110fc0
80100e0c: e8 cf 3b 00 00 call 801049e0 <release>
return f;
}
80100e11: 89 d8 mov %ebx,%eax
80100e13: 8b 5d fc mov -0x4(%ebp),%ebx
80100e16: c9 leave
80100e17: c3 ret
struct file*
filedup(struct file *f)
{
acquire(&ftable.lock);
if(f->ref < 1)
panic("filedup");
80100e18: 83 ec 0c sub $0xc,%esp
80100e1b: 68 d4 76 10 80 push $0x801076d4
80100e20: e8 4b f5 ff ff call 80100370 <panic>
80100e25: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100e29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80100e30 <fileclose>:
}
// Close file f. (Decrement ref count, close when reaches 0.)
void
fileclose(struct file *f)
{
80100e30: 55 push %ebp
80100e31: 89 e5 mov %esp,%ebp
80100e33: 57 push %edi
80100e34: 56 push %esi
80100e35: 53 push %ebx
80100e36: 83 ec 28 sub $0x28,%esp
80100e39: 8b 7d 08 mov 0x8(%ebp),%edi
struct file ff;
acquire(&ftable.lock);
80100e3c: 68 c0 0f 11 80 push $0x80110fc0
80100e41: e8 7a 3a 00 00 call 801048c0 <acquire>
if(f->ref < 1)
80100e46: 8b 47 04 mov 0x4(%edi),%eax
80100e49: 83 c4 10 add $0x10,%esp
80100e4c: 85 c0 test %eax,%eax
80100e4e: 0f 8e 9b 00 00 00 jle 80100eef <fileclose+0xbf>
panic("fileclose");
if(--f->ref > 0){
80100e54: 83 e8 01 sub $0x1,%eax
80100e57: 85 c0 test %eax,%eax
80100e59: 89 47 04 mov %eax,0x4(%edi)
80100e5c: 74 1a je 80100e78 <fileclose+0x48>
release(&ftable.lock);
80100e5e: c7 45 08 c0 0f 11 80 movl $0x80110fc0,0x8(%ebp)
else if(ff.type == FD_INODE){
begin_op();
iput(ff.ip);
end_op();
}
}
80100e65: 8d 65 f4 lea -0xc(%ebp),%esp
80100e68: 5b pop %ebx
80100e69: 5e pop %esi
80100e6a: 5f pop %edi
80100e6b: 5d pop %ebp
acquire(&ftable.lock);
if(f->ref < 1)
panic("fileclose");
if(--f->ref > 0){
release(&ftable.lock);
80100e6c: e9 6f 3b 00 00 jmp 801049e0 <release>
80100e71: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return;
}
ff = *f;
80100e78: 0f b6 47 09 movzbl 0x9(%edi),%eax
80100e7c: 8b 1f mov (%edi),%ebx
f->ref = 0;
f->type = FD_NONE;
release(&ftable.lock);
80100e7e: 83 ec 0c sub $0xc,%esp
panic("fileclose");
if(--f->ref > 0){
release(&ftable.lock);
return;
}
ff = *f;
80100e81: 8b 77 0c mov 0xc(%edi),%esi
f->ref = 0;
f->type = FD_NONE;
80100e84: c7 07 00 00 00 00 movl $0x0,(%edi)
panic("fileclose");
if(--f->ref > 0){
release(&ftable.lock);
return;
}
ff = *f;
80100e8a: 88 45 e7 mov %al,-0x19(%ebp)
80100e8d: 8b 47 10 mov 0x10(%edi),%eax
f->ref = 0;
f->type = FD_NONE;
release(&ftable.lock);
80100e90: 68 c0 0f 11 80 push $0x80110fc0
panic("fileclose");
if(--f->ref > 0){
release(&ftable.lock);
return;
}
ff = *f;
80100e95: 89 45 e0 mov %eax,-0x20(%ebp)
f->ref = 0;
f->type = FD_NONE;
release(&ftable.lock);
80100e98: e8 43 3b 00 00 call 801049e0 <release>
if(ff.type == FD_PIPE)
80100e9d: 83 c4 10 add $0x10,%esp
80100ea0: 83 fb 01 cmp $0x1,%ebx
80100ea3: 74 13 je 80100eb8 <fileclose+0x88>
pipeclose(ff.pipe, ff.writable);
else if(ff.type == FD_INODE){
80100ea5: 83 fb 02 cmp $0x2,%ebx
80100ea8: 74 26 je 80100ed0 <fileclose+0xa0>
begin_op();
iput(ff.ip);
end_op();
}
}
80100eaa: 8d 65 f4 lea -0xc(%ebp),%esp
80100ead: 5b pop %ebx
80100eae: 5e pop %esi
80100eaf: 5f pop %edi
80100eb0: 5d pop %ebp
80100eb1: c3 ret
80100eb2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
f->ref = 0;
f->type = FD_NONE;
release(&ftable.lock);
if(ff.type == FD_PIPE)
pipeclose(ff.pipe, ff.writable);
80100eb8: 0f be 5d e7 movsbl -0x19(%ebp),%ebx
80100ebc: 83 ec 08 sub $0x8,%esp
80100ebf: 53 push %ebx
80100ec0: 56 push %esi
80100ec1: e8 2a 24 00 00 call 801032f0 <pipeclose>
80100ec6: 83 c4 10 add $0x10,%esp
80100ec9: eb df jmp 80100eaa <fileclose+0x7a>
80100ecb: 90 nop
80100ecc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
else if(ff.type == FD_INODE){
begin_op();
80100ed0: e8 7b 1c 00 00 call 80102b50 <begin_op>
iput(ff.ip);
80100ed5: 83 ec 0c sub $0xc,%esp
80100ed8: ff 75 e0 pushl -0x20(%ebp)
80100edb: e8 c0 08 00 00 call 801017a0 <iput>
end_op();
80100ee0: 83 c4 10 add $0x10,%esp
}
}
80100ee3: 8d 65 f4 lea -0xc(%ebp),%esp
80100ee6: 5b pop %ebx
80100ee7: 5e pop %esi
80100ee8: 5f pop %edi
80100ee9: 5d pop %ebp
if(ff.type == FD_PIPE)
pipeclose(ff.pipe, ff.writable);
else if(ff.type == FD_INODE){
begin_op();
iput(ff.ip);
end_op();
80100eea: e9 d1 1c 00 00 jmp 80102bc0 <end_op>
{
struct file ff;
acquire(&ftable.lock);
if(f->ref < 1)
panic("fileclose");
80100eef: 83 ec 0c sub $0xc,%esp
80100ef2: 68 dc 76 10 80 push $0x801076dc
80100ef7: e8 74 f4 ff ff call 80100370 <panic>
80100efc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100f00 <filestat>:
}
// Get metadata about file f.
int
filestat(struct file *f, struct stat *st)
{
80100f00: 55 push %ebp
80100f01: 89 e5 mov %esp,%ebp
80100f03: 53 push %ebx
80100f04: 83 ec 04 sub $0x4,%esp
80100f07: 8b 5d 08 mov 0x8(%ebp),%ebx
if(f->type == FD_INODE){
80100f0a: 83 3b 02 cmpl $0x2,(%ebx)
80100f0d: 75 31 jne 80100f40 <filestat+0x40>
ilock(f->ip);
80100f0f: 83 ec 0c sub $0xc,%esp
80100f12: ff 73 10 pushl 0x10(%ebx)
80100f15: e8 56 07 00 00 call 80101670 <ilock>
stati(f->ip, st);
80100f1a: 58 pop %eax
80100f1b: 5a pop %edx
80100f1c: ff 75 0c pushl 0xc(%ebp)
80100f1f: ff 73 10 pushl 0x10(%ebx)
80100f22: e8 f9 09 00 00 call 80101920 <stati>
iunlock(f->ip);
80100f27: 59 pop %ecx
80100f28: ff 73 10 pushl 0x10(%ebx)
80100f2b: e8 20 08 00 00 call 80101750 <iunlock>
return 0;
80100f30: 83 c4 10 add $0x10,%esp
80100f33: 31 c0 xor %eax,%eax
}
return -1;
}
80100f35: 8b 5d fc mov -0x4(%ebp),%ebx
80100f38: c9 leave
80100f39: c3 ret
80100f3a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
ilock(f->ip);
stati(f->ip, st);
iunlock(f->ip);
return 0;
}
return -1;
80100f40: b8 ff ff ff ff mov $0xffffffff,%eax
}
80100f45: 8b 5d fc mov -0x4(%ebp),%ebx
80100f48: c9 leave
80100f49: c3 ret
80100f4a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80100f50 <fileread>:
// Read from file f.
int
fileread(struct file *f, char *addr, int n)
{
80100f50: 55 push %ebp
80100f51: 89 e5 mov %esp,%ebp
80100f53: 57 push %edi
80100f54: 56 push %esi
80100f55: 53 push %ebx
80100f56: 83 ec 0c sub $0xc,%esp
80100f59: 8b 5d 08 mov 0x8(%ebp),%ebx
80100f5c: 8b 75 0c mov 0xc(%ebp),%esi
80100f5f: 8b 7d 10 mov 0x10(%ebp),%edi
int r;
if(f->readable == 0)
80100f62: 80 7b 08 00 cmpb $0x0,0x8(%ebx)
80100f66: 74 60 je 80100fc8 <fileread+0x78>
return -1;
if(f->type == FD_PIPE)
80100f68: 8b 03 mov (%ebx),%eax
80100f6a: 83 f8 01 cmp $0x1,%eax
80100f6d: 74 41 je 80100fb0 <fileread+0x60>
return piperead(f->pipe, addr, n);
if(f->type == FD_INODE){
80100f6f: 83 f8 02 cmp $0x2,%eax
80100f72: 75 5b jne 80100fcf <fileread+0x7f>
ilock(f->ip);
80100f74: 83 ec 0c sub $0xc,%esp
80100f77: ff 73 10 pushl 0x10(%ebx)
80100f7a: e8 f1 06 00 00 call 80101670 <ilock>
if((r = readi(f->ip, addr, f->off, n)) > 0)
80100f7f: 57 push %edi
80100f80: ff 73 14 pushl 0x14(%ebx)
80100f83: 56 push %esi
80100f84: ff 73 10 pushl 0x10(%ebx)
80100f87: e8 c4 09 00 00 call 80101950 <readi>
80100f8c: 83 c4 20 add $0x20,%esp
80100f8f: 85 c0 test %eax,%eax
80100f91: 89 c6 mov %eax,%esi
80100f93: 7e 03 jle 80100f98 <fileread+0x48>
f->off += r;
80100f95: 01 43 14 add %eax,0x14(%ebx)
iunlock(f->ip);
80100f98: 83 ec 0c sub $0xc,%esp
80100f9b: ff 73 10 pushl 0x10(%ebx)
80100f9e: e8 ad 07 00 00 call 80101750 <iunlock>
return r;
80100fa3: 83 c4 10 add $0x10,%esp
return -1;
if(f->type == FD_PIPE)
return piperead(f->pipe, addr, n);
if(f->type == FD_INODE){
ilock(f->ip);
if((r = readi(f->ip, addr, f->off, n)) > 0)
80100fa6: 89 f0 mov %esi,%eax
f->off += r;
iunlock(f->ip);
return r;
}
panic("fileread");
}
80100fa8: 8d 65 f4 lea -0xc(%ebp),%esp
80100fab: 5b pop %ebx
80100fac: 5e pop %esi
80100fad: 5f pop %edi
80100fae: 5d pop %ebp
80100faf: c3 ret
int r;
if(f->readable == 0)
return -1;
if(f->type == FD_PIPE)
return piperead(f->pipe, addr, n);
80100fb0: 8b 43 0c mov 0xc(%ebx),%eax
80100fb3: 89 45 08 mov %eax,0x8(%ebp)
f->off += r;
iunlock(f->ip);
return r;
}
panic("fileread");
}
80100fb6: 8d 65 f4 lea -0xc(%ebp),%esp
80100fb9: 5b pop %ebx
80100fba: 5e pop %esi
80100fbb: 5f pop %edi
80100fbc: 5d pop %ebp
int r;
if(f->readable == 0)
return -1;
if(f->type == FD_PIPE)
return piperead(f->pipe, addr, n);
80100fbd: e9 ce 24 00 00 jmp 80103490 <piperead>
80100fc2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
fileread(struct file *f, char *addr, int n)
{
int r;
if(f->readable == 0)
return -1;
80100fc8: b8 ff ff ff ff mov $0xffffffff,%eax
80100fcd: eb d9 jmp 80100fa8 <fileread+0x58>
if((r = readi(f->ip, addr, f->off, n)) > 0)
f->off += r;
iunlock(f->ip);
return r;
}
panic("fileread");
80100fcf: 83 ec 0c sub $0xc,%esp
80100fd2: 68 e6 76 10 80 push $0x801076e6
80100fd7: e8 94 f3 ff ff call 80100370 <panic>
80100fdc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80100fe0 <filewrite>:
}
// Write to file f.
int
filewrite(struct file *f, char *addr, int n)
{
80100fe0: 55 push %ebp
80100fe1: 89 e5 mov %esp,%ebp
80100fe3: 57 push %edi
80100fe4: 56 push %esi
80100fe5: 53 push %ebx
80100fe6: 83 ec 1c sub $0x1c,%esp
80100fe9: 8b 75 08 mov 0x8(%ebp),%esi
80100fec: 8b 45 0c mov 0xc(%ebp),%eax
int r;
if(f->writable == 0)
80100fef: 80 7e 09 00 cmpb $0x0,0x9(%esi)
}
// Write to file f.
int
filewrite(struct file *f, char *addr, int n)
{
80100ff3: 89 45 dc mov %eax,-0x24(%ebp)
80100ff6: 8b 45 10 mov 0x10(%ebp),%eax
80100ff9: 89 45 e4 mov %eax,-0x1c(%ebp)
int r;
if(f->writable == 0)
80100ffc: 0f 84 aa 00 00 00 je 801010ac <filewrite+0xcc>
return -1;
if(f->type == FD_PIPE)
80101002: 8b 06 mov (%esi),%eax
80101004: 83 f8 01 cmp $0x1,%eax
80101007: 0f 84 c2 00 00 00 je 801010cf <filewrite+0xef>
return pipewrite(f->pipe, addr, n);
if(f->type == FD_INODE){
8010100d: 83 f8 02 cmp $0x2,%eax
80101010: 0f 85 d8 00 00 00 jne 801010ee <filewrite+0x10e>
// and 2 blocks of slop for non-aligned writes.
// this really belongs lower down, since writei()
// might be writing a device like the console.
int max = ((LOGSIZE-1-1-2) / 2) * 512;
int i = 0;
while(i < n){
80101016: 8b 45 e4 mov -0x1c(%ebp),%eax
80101019: 31 ff xor %edi,%edi
8010101b: 85 c0 test %eax,%eax
8010101d: 7f 34 jg 80101053 <filewrite+0x73>
8010101f: e9 9c 00 00 00 jmp 801010c0 <filewrite+0xe0>
80101024: 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;
80101028: 01 46 14 add %eax,0x14(%esi)
iunlock(f->ip);
8010102b: 83 ec 0c sub $0xc,%esp
8010102e: ff 76 10 pushl 0x10(%esi)
n1 = max;
begin_op();
ilock(f->ip);
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
f->off += r;
80101031: 89 45 e0 mov %eax,-0x20(%ebp)
iunlock(f->ip);
80101034: e8 17 07 00 00 call 80101750 <iunlock>
end_op();
80101039: e8 82 1b 00 00 call 80102bc0 <end_op>
8010103e: 8b 45 e0 mov -0x20(%ebp),%eax
80101041: 83 c4 10 add $0x10,%esp
if(r < 0)
break;
if(r != n1)
80101044: 39 d8 cmp %ebx,%eax
80101046: 0f 85 95 00 00 00 jne 801010e1 <filewrite+0x101>
panic("short filewrite");
i += r;
8010104c: 01 c7 add %eax,%edi
// and 2 blocks of slop for non-aligned writes.
// this really belongs lower down, since writei()
// might be writing a device like the console.
int max = ((LOGSIZE-1-1-2) / 2) * 512;
int i = 0;
while(i < n){
8010104e: 39 7d e4 cmp %edi,-0x1c(%ebp)
80101051: 7e 6d jle 801010c0 <filewrite+0xe0>
int n1 = n - i;
80101053: 8b 5d e4 mov -0x1c(%ebp),%ebx
80101056: b8 00 1a 00 00 mov $0x1a00,%eax
8010105b: 29 fb sub %edi,%ebx
8010105d: 81 fb 00 1a 00 00 cmp $0x1a00,%ebx
80101063: 0f 4f d8 cmovg %eax,%ebx
if(n1 > max)
n1 = max;
begin_op();
80101066: e8 e5 1a 00 00 call 80102b50 <begin_op>
ilock(f->ip);
8010106b: 83 ec 0c sub $0xc,%esp
8010106e: ff 76 10 pushl 0x10(%esi)
80101071: e8 fa 05 00 00 call 80101670 <ilock>
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
80101076: 8b 45 dc mov -0x24(%ebp),%eax
80101079: 53 push %ebx
8010107a: ff 76 14 pushl 0x14(%esi)
8010107d: 01 f8 add %edi,%eax
8010107f: 50 push %eax
80101080: ff 76 10 pushl 0x10(%esi)
80101083: e8 c8 09 00 00 call 80101a50 <writei>
80101088: 83 c4 20 add $0x20,%esp
8010108b: 85 c0 test %eax,%eax
8010108d: 7f 99 jg 80101028 <filewrite+0x48>
f->off += r;
iunlock(f->ip);
8010108f: 83 ec 0c sub $0xc,%esp
80101092: ff 76 10 pushl 0x10(%esi)
80101095: 89 45 e0 mov %eax,-0x20(%ebp)
80101098: e8 b3 06 00 00 call 80101750 <iunlock>
end_op();
8010109d: e8 1e 1b 00 00 call 80102bc0 <end_op>
if(r < 0)
801010a2: 8b 45 e0 mov -0x20(%ebp),%eax
801010a5: 83 c4 10 add $0x10,%esp
801010a8: 85 c0 test %eax,%eax
801010aa: 74 98 je 80101044 <filewrite+0x64>
i += r;
}
return i == n ? n : -1;
}
panic("filewrite");
}
801010ac: 8d 65 f4 lea -0xc(%ebp),%esp
break;
if(r != n1)
panic("short filewrite");
i += r;
}
return i == n ? n : -1;
801010af: b8 ff ff ff ff mov $0xffffffff,%eax
}
panic("filewrite");
}
801010b4: 5b pop %ebx
801010b5: 5e pop %esi
801010b6: 5f pop %edi
801010b7: 5d pop %ebp
801010b8: c3 ret
801010b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
break;
if(r != n1)
panic("short filewrite");
i += r;
}
return i == n ? n : -1;
801010c0: 3b 7d e4 cmp -0x1c(%ebp),%edi
801010c3: 75 e7 jne 801010ac <filewrite+0xcc>
}
panic("filewrite");
}
801010c5: 8d 65 f4 lea -0xc(%ebp),%esp
801010c8: 89 f8 mov %edi,%eax
801010ca: 5b pop %ebx
801010cb: 5e pop %esi
801010cc: 5f pop %edi
801010cd: 5d pop %ebp
801010ce: c3 ret
int r;
if(f->writable == 0)
return -1;
if(f->type == FD_PIPE)
return pipewrite(f->pipe, addr, n);
801010cf: 8b 46 0c mov 0xc(%esi),%eax
801010d2: 89 45 08 mov %eax,0x8(%ebp)
i += r;
}
return i == n ? n : -1;
}
panic("filewrite");
}
801010d5: 8d 65 f4 lea -0xc(%ebp),%esp
801010d8: 5b pop %ebx
801010d9: 5e pop %esi
801010da: 5f pop %edi
801010db: 5d pop %ebp
int r;
if(f->writable == 0)
return -1;
if(f->type == FD_PIPE)
return pipewrite(f->pipe, addr, n);
801010dc: e9 af 22 00 00 jmp 80103390 <pipewrite>
end_op();
if(r < 0)
break;
if(r != n1)
panic("short filewrite");
801010e1: 83 ec 0c sub $0xc,%esp
801010e4: 68 ef 76 10 80 push $0x801076ef
801010e9: e8 82 f2 ff ff call 80100370 <panic>
i += r;
}
return i == n ? n : -1;
}
panic("filewrite");
801010ee: 83 ec 0c sub $0xc,%esp
801010f1: 68 f5 76 10 80 push $0x801076f5
801010f6: e8 75 f2 ff ff call 80100370 <panic>
801010fb: 66 90 xchg %ax,%ax
801010fd: 66 90 xchg %ax,%ax
801010ff: 90 nop
80101100 <balloc>:
// Blocks.
// Allocate a zeroed disk block.
static uint
balloc(uint dev)
{
80101100: 55 push %ebp
80101101: 89 e5 mov %esp,%ebp
80101103: 57 push %edi
80101104: 56 push %esi
80101105: 53 push %ebx
80101106: 83 ec 1c sub $0x1c,%esp
int b, bi, m;
struct buf *bp;
bp = 0;
for(b = 0; b < sb.size; b += BPB){
80101109: 8b 0d c0 19 11 80 mov 0x801119c0,%ecx
// Blocks.
// Allocate a zeroed disk block.
static uint
balloc(uint dev)
{
8010110f: 89 45 d8 mov %eax,-0x28(%ebp)
int b, bi, m;
struct buf *bp;
bp = 0;
for(b = 0; b < sb.size; b += BPB){
80101112: 85 c9 test %ecx,%ecx
80101114: 0f 84 85 00 00 00 je 8010119f <balloc+0x9f>
8010111a: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
bp = bread(dev, BBLOCK(b, sb));
80101121: 8b 75 dc mov -0x24(%ebp),%esi
80101124: 83 ec 08 sub $0x8,%esp
80101127: 89 f0 mov %esi,%eax
80101129: c1 f8 0c sar $0xc,%eax
8010112c: 03 05 d8 19 11 80 add 0x801119d8,%eax
80101132: 50 push %eax
80101133: ff 75 d8 pushl -0x28(%ebp)
80101136: e8 95 ef ff ff call 801000d0 <bread>
8010113b: 89 45 e4 mov %eax,-0x1c(%ebp)
8010113e: a1 c0 19 11 80 mov 0x801119c0,%eax
80101143: 83 c4 10 add $0x10,%esp
80101146: 89 45 e0 mov %eax,-0x20(%ebp)
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
80101149: 31 c0 xor %eax,%eax
8010114b: eb 2d jmp 8010117a <balloc+0x7a>
8010114d: 8d 76 00 lea 0x0(%esi),%esi
m = 1 << (bi % 8);
80101150: 89 c1 mov %eax,%ecx
80101152: ba 01 00 00 00 mov $0x1,%edx
if((bp->data[bi/8] & m) == 0){ // Is block free?
80101157: 8b 5d e4 mov -0x1c(%ebp),%ebx
bp = 0;
for(b = 0; b < sb.size; b += BPB){
bp = bread(dev, BBLOCK(b, sb));
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
m = 1 << (bi % 8);
8010115a: 83 e1 07 and $0x7,%ecx
8010115d: d3 e2 shl %cl,%edx
if((bp->data[bi/8] & m) == 0){ // Is block free?
8010115f: 89 c1 mov %eax,%ecx
80101161: c1 f9 03 sar $0x3,%ecx
80101164: 0f b6 7c 0b 5c movzbl 0x5c(%ebx,%ecx,1),%edi
80101169: 85 d7 test %edx,%edi
8010116b: 74 43 je 801011b0 <balloc+0xb0>
struct buf *bp;
bp = 0;
for(b = 0; b < sb.size; b += BPB){
bp = bread(dev, BBLOCK(b, sb));
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
8010116d: 83 c0 01 add $0x1,%eax
80101170: 83 c6 01 add $0x1,%esi
80101173: 3d 00 10 00 00 cmp $0x1000,%eax
80101178: 74 05 je 8010117f <balloc+0x7f>
8010117a: 3b 75 e0 cmp -0x20(%ebp),%esi
8010117d: 72 d1 jb 80101150 <balloc+0x50>
brelse(bp);
bzero(dev, b + bi);
return b + bi;
}
}
brelse(bp);
8010117f: 83 ec 0c sub $0xc,%esp
80101182: ff 75 e4 pushl -0x1c(%ebp)
80101185: e8 56 f0 ff ff call 801001e0 <brelse>
{
int b, bi, m;
struct buf *bp;
bp = 0;
for(b = 0; b < sb.size; b += BPB){
8010118a: 81 45 dc 00 10 00 00 addl $0x1000,-0x24(%ebp)
80101191: 83 c4 10 add $0x10,%esp
80101194: 8b 45 dc mov -0x24(%ebp),%eax
80101197: 39 05 c0 19 11 80 cmp %eax,0x801119c0
8010119d: 77 82 ja 80101121 <balloc+0x21>
return b + bi;
}
}
brelse(bp);
}
panic("balloc: out of blocks");
8010119f: 83 ec 0c sub $0xc,%esp
801011a2: 68 ff 76 10 80 push $0x801076ff
801011a7: e8 c4 f1 ff ff call 80100370 <panic>
801011ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(b = 0; b < sb.size; b += BPB){
bp = bread(dev, BBLOCK(b, sb));
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
m = 1 << (bi % 8);
if((bp->data[bi/8] & m) == 0){ // Is block free?
bp->data[bi/8] |= m; // Mark block in use.
801011b0: 09 fa or %edi,%edx
801011b2: 8b 7d e4 mov -0x1c(%ebp),%edi
log_write(bp);
801011b5: 83 ec 0c sub $0xc,%esp
for(b = 0; b < sb.size; b += BPB){
bp = bread(dev, BBLOCK(b, sb));
for(bi = 0; bi < BPB && b + bi < sb.size; bi++){
m = 1 << (bi % 8);
if((bp->data[bi/8] & m) == 0){ // Is block free?
bp->data[bi/8] |= m; // Mark block in use.
801011b8: 88 54 0f 5c mov %dl,0x5c(%edi,%ecx,1)
log_write(bp);
801011bc: 57 push %edi
801011bd: e8 6e 1b 00 00 call 80102d30 <log_write>
brelse(bp);
801011c2: 89 3c 24 mov %edi,(%esp)
801011c5: e8 16 f0 ff ff call 801001e0 <brelse>
static void
bzero(int dev, int bno)
{
struct buf *bp;
bp = bread(dev, bno);
801011ca: 58 pop %eax
801011cb: 5a pop %edx
801011cc: 56 push %esi
801011cd: ff 75 d8 pushl -0x28(%ebp)
801011d0: e8 fb ee ff ff call 801000d0 <bread>
801011d5: 89 c3 mov %eax,%ebx
memset(bp->data, 0, BSIZE);
801011d7: 8d 40 5c lea 0x5c(%eax),%eax
801011da: 83 c4 0c add $0xc,%esp
801011dd: 68 00 02 00 00 push $0x200
801011e2: 6a 00 push $0x0
801011e4: 50 push %eax
801011e5: e8 46 38 00 00 call 80104a30 <memset>
log_write(bp);
801011ea: 89 1c 24 mov %ebx,(%esp)
801011ed: e8 3e 1b 00 00 call 80102d30 <log_write>
brelse(bp);
801011f2: 89 1c 24 mov %ebx,(%esp)
801011f5: e8 e6 ef ff ff call 801001e0 <brelse>
}
}
brelse(bp);
}
panic("balloc: out of blocks");
}
801011fa: 8d 65 f4 lea -0xc(%ebp),%esp
801011fd: 89 f0 mov %esi,%eax
801011ff: 5b pop %ebx
80101200: 5e pop %esi
80101201: 5f pop %edi
80101202: 5d pop %ebp
80101203: c3 ret
80101204: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010120a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80101210 <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)
{
80101210: 55 push %ebp
80101211: 89 e5 mov %esp,%ebp
80101213: 57 push %edi
80101214: 56 push %esi
80101215: 53 push %ebx
80101216: 89 c7 mov %eax,%edi
struct inode *ip, *empty;
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
80101218: 31 f6 xor %esi,%esi
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010121a: bb 14 1a 11 80 mov $0x80111a14,%ebx
// 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)
{
8010121f: 83 ec 28 sub $0x28,%esp
80101222: 89 55 e4 mov %edx,-0x1c(%ebp)
struct inode *ip, *empty;
acquire(&icache.lock);
80101225: 68 e0 19 11 80 push $0x801119e0
8010122a: e8 91 36 00 00 call 801048c0 <acquire>
8010122f: 83 c4 10 add $0x10,%esp
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
80101232: 8b 55 e4 mov -0x1c(%ebp),%edx
80101235: eb 1b jmp 80101252 <iget+0x42>
80101237: 89 f6 mov %esi,%esi
80101239: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
ip->ref++;
release(&icache.lock);
return ip;
}
if(empty == 0 && ip->ref == 0) // Remember empty slot.
80101240: 85 f6 test %esi,%esi
80101242: 74 44 je 80101288 <iget+0x78>
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
80101244: 81 c3 90 00 00 00 add $0x90,%ebx
8010124a: 81 fb 34 36 11 80 cmp $0x80113634,%ebx
80101250: 74 4e je 801012a0 <iget+0x90>
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
80101252: 8b 4b 08 mov 0x8(%ebx),%ecx
80101255: 85 c9 test %ecx,%ecx
80101257: 7e e7 jle 80101240 <iget+0x30>
80101259: 39 3b cmp %edi,(%ebx)
8010125b: 75 e3 jne 80101240 <iget+0x30>
8010125d: 39 53 04 cmp %edx,0x4(%ebx)
80101260: 75 de jne 80101240 <iget+0x30>
ip->ref++;
release(&icache.lock);
80101262: 83 ec 0c sub $0xc,%esp
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
ip->ref++;
80101265: 83 c1 01 add $0x1,%ecx
release(&icache.lock);
return ip;
80101268: 89 de mov %ebx,%esi
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
ip->ref++;
release(&icache.lock);
8010126a: 68 e0 19 11 80 push $0x801119e0
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
ip->ref++;
8010126f: 89 4b 08 mov %ecx,0x8(%ebx)
release(&icache.lock);
80101272: e8 69 37 00 00 call 801049e0 <release>
return ip;
80101277: 83 c4 10 add $0x10,%esp
ip->ref = 1;
ip->valid = 0;
release(&icache.lock);
return ip;
}
8010127a: 8d 65 f4 lea -0xc(%ebp),%esp
8010127d: 89 f0 mov %esi,%eax
8010127f: 5b pop %ebx
80101280: 5e pop %esi
80101281: 5f pop %edi
80101282: 5d pop %ebp
80101283: c3 ret
80101284: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){
ip->ref++;
release(&icache.lock);
return ip;
}
if(empty == 0 && ip->ref == 0) // Remember empty slot.
80101288: 85 c9 test %ecx,%ecx
8010128a: 0f 44 f3 cmove %ebx,%esi
acquire(&icache.lock);
// Is the inode already cached?
empty = 0;
for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){
8010128d: 81 c3 90 00 00 00 add $0x90,%ebx
80101293: 81 fb 34 36 11 80 cmp $0x80113634,%ebx
80101299: 75 b7 jne 80101252 <iget+0x42>
8010129b: 90 nop
8010129c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(empty == 0 && ip->ref == 0) // Remember empty slot.
empty = ip;
}
// Recycle an inode cache entry.
if(empty == 0)
801012a0: 85 f6 test %esi,%esi
801012a2: 74 2d je 801012d1 <iget+0xc1>
ip = empty;
ip->dev = dev;
ip->inum = inum;
ip->ref = 1;
ip->valid = 0;
release(&icache.lock);
801012a4: 83 ec 0c sub $0xc,%esp
// Recycle an inode cache entry.
if(empty == 0)
panic("iget: no inodes");
ip = empty;
ip->dev = dev;
801012a7: 89 3e mov %edi,(%esi)
ip->inum = inum;
801012a9: 89 56 04 mov %edx,0x4(%esi)
ip->ref = 1;
801012ac: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi)
ip->valid = 0;
801012b3: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi)
release(&icache.lock);
801012ba: 68 e0 19 11 80 push $0x801119e0
801012bf: e8 1c 37 00 00 call 801049e0 <release>
return ip;
801012c4: 83 c4 10 add $0x10,%esp
}
801012c7: 8d 65 f4 lea -0xc(%ebp),%esp
801012ca: 89 f0 mov %esi,%eax
801012cc: 5b pop %ebx
801012cd: 5e pop %esi
801012ce: 5f pop %edi
801012cf: 5d pop %ebp
801012d0: c3 ret
empty = ip;
}
// Recycle an inode cache entry.
if(empty == 0)
panic("iget: no inodes");
801012d1: 83 ec 0c sub $0xc,%esp
801012d4: 68 15 77 10 80 push $0x80107715
801012d9: e8 92 f0 ff ff call 80100370 <panic>
801012de: 66 90 xchg %ax,%ax
801012e0 <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)
{
801012e0: 55 push %ebp
801012e1: 89 e5 mov %esp,%ebp
801012e3: 57 push %edi
801012e4: 56 push %esi
801012e5: 53 push %ebx
801012e6: 89 c6 mov %eax,%esi
801012e8: 83 ec 1c sub $0x1c,%esp
uint addr, *a;
struct buf *bp;
if(bn < NDIRECT){
801012eb: 83 fa 0b cmp $0xb,%edx
801012ee: 77 18 ja 80101308 <bmap+0x28>
801012f0: 8d 1c 90 lea (%eax,%edx,4),%ebx
if((addr = ip->addrs[bn]) == 0)
801012f3: 8b 43 5c mov 0x5c(%ebx),%eax
801012f6: 85 c0 test %eax,%eax
801012f8: 74 76 je 80101370 <bmap+0x90>
brelse(bp);
return addr;
}
panic("bmap: out of range");
}
801012fa: 8d 65 f4 lea -0xc(%ebp),%esp
801012fd: 5b pop %ebx
801012fe: 5e pop %esi
801012ff: 5f pop %edi
80101300: 5d pop %ebp
80101301: c3 ret
80101302: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(bn < NDIRECT){
if((addr = ip->addrs[bn]) == 0)
ip->addrs[bn] = addr = balloc(ip->dev);
return addr;
}
bn -= NDIRECT;
80101308: 8d 5a f4 lea -0xc(%edx),%ebx
if(bn < NINDIRECT){
8010130b: 83 fb 7f cmp $0x7f,%ebx
8010130e: 0f 87 83 00 00 00 ja 80101397 <bmap+0xb7>
// Load indirect block, allocating if necessary.
if((addr = ip->addrs[NDIRECT]) == 0)
80101314: 8b 80 8c 00 00 00 mov 0x8c(%eax),%eax
8010131a: 85 c0 test %eax,%eax
8010131c: 74 6a je 80101388 <bmap+0xa8>
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
bp = bread(ip->dev, addr);
8010131e: 83 ec 08 sub $0x8,%esp
80101321: 50 push %eax
80101322: ff 36 pushl (%esi)
80101324: e8 a7 ed ff ff call 801000d0 <bread>
a = (uint*)bp->data;
if((addr = a[bn]) == 0){
80101329: 8d 54 98 5c lea 0x5c(%eax,%ebx,4),%edx
8010132d: 83 c4 10 add $0x10,%esp
if(bn < NINDIRECT){
// Load indirect block, allocating if necessary.
if((addr = ip->addrs[NDIRECT]) == 0)
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
bp = bread(ip->dev, addr);
80101330: 89 c7 mov %eax,%edi
a = (uint*)bp->data;
if((addr = a[bn]) == 0){
80101332: 8b 1a mov (%edx),%ebx
80101334: 85 db test %ebx,%ebx
80101336: 75 1d jne 80101355 <bmap+0x75>
a[bn] = addr = balloc(ip->dev);
80101338: 8b 06 mov (%esi),%eax
8010133a: 89 55 e4 mov %edx,-0x1c(%ebp)
8010133d: e8 be fd ff ff call 80101100 <balloc>
80101342: 8b 55 e4 mov -0x1c(%ebp),%edx
log_write(bp);
80101345: 83 ec 0c sub $0xc,%esp
if((addr = ip->addrs[NDIRECT]) == 0)
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
bp = bread(ip->dev, addr);
a = (uint*)bp->data;
if((addr = a[bn]) == 0){
a[bn] = addr = balloc(ip->dev);
80101348: 89 c3 mov %eax,%ebx
8010134a: 89 02 mov %eax,(%edx)
log_write(bp);
8010134c: 57 push %edi
8010134d: e8 de 19 00 00 call 80102d30 <log_write>
80101352: 83 c4 10 add $0x10,%esp
}
brelse(bp);
80101355: 83 ec 0c sub $0xc,%esp
80101358: 57 push %edi
80101359: e8 82 ee ff ff call 801001e0 <brelse>
8010135e: 83 c4 10 add $0x10,%esp
return addr;
}
panic("bmap: out of range");
}
80101361: 8d 65 f4 lea -0xc(%ebp),%esp
a = (uint*)bp->data;
if((addr = a[bn]) == 0){
a[bn] = addr = balloc(ip->dev);
log_write(bp);
}
brelse(bp);
80101364: 89 d8 mov %ebx,%eax
return addr;
}
panic("bmap: out of range");
}
80101366: 5b pop %ebx
80101367: 5e pop %esi
80101368: 5f pop %edi
80101369: 5d pop %ebp
8010136a: c3 ret
8010136b: 90 nop
8010136c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
uint addr, *a;
struct buf *bp;
if(bn < NDIRECT){
if((addr = ip->addrs[bn]) == 0)
ip->addrs[bn] = addr = balloc(ip->dev);
80101370: 8b 06 mov (%esi),%eax
80101372: e8 89 fd ff ff call 80101100 <balloc>
80101377: 89 43 5c mov %eax,0x5c(%ebx)
brelse(bp);
return addr;
}
panic("bmap: out of range");
}
8010137a: 8d 65 f4 lea -0xc(%ebp),%esp
8010137d: 5b pop %ebx
8010137e: 5e pop %esi
8010137f: 5f pop %edi
80101380: 5d pop %ebp
80101381: c3 ret
80101382: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
bn -= NDIRECT;
if(bn < NINDIRECT){
// Load indirect block, allocating if necessary.
if((addr = ip->addrs[NDIRECT]) == 0)
ip->addrs[NDIRECT] = addr = balloc(ip->dev);
80101388: 8b 06 mov (%esi),%eax
8010138a: e8 71 fd ff ff call 80101100 <balloc>
8010138f: 89 86 8c 00 00 00 mov %eax,0x8c(%esi)
80101395: eb 87 jmp 8010131e <bmap+0x3e>
}
brelse(bp);
return addr;
}
panic("bmap: out of range");
80101397: 83 ec 0c sub $0xc,%esp
8010139a: 68 25 77 10 80 push $0x80107725
8010139f: e8 cc ef ff ff call 80100370 <panic>
801013a4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801013aa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801013b0 <readsb>:
struct superblock sb;
// Read the super block.
void
readsb(int dev, struct superblock *sb)
{
801013b0: 55 push %ebp
801013b1: 89 e5 mov %esp,%ebp
801013b3: 56 push %esi
801013b4: 53 push %ebx
801013b5: 8b 75 0c mov 0xc(%ebp),%esi
struct buf *bp;
bp = bread(dev, 1);
801013b8: 83 ec 08 sub $0x8,%esp
801013bb: 6a 01 push $0x1
801013bd: ff 75 08 pushl 0x8(%ebp)
801013c0: e8 0b ed ff ff call 801000d0 <bread>
801013c5: 89 c3 mov %eax,%ebx
memmove(sb, bp->data, sizeof(*sb));
801013c7: 8d 40 5c lea 0x5c(%eax),%eax
801013ca: 83 c4 0c add $0xc,%esp
801013cd: 6a 1c push $0x1c
801013cf: 50 push %eax
801013d0: 56 push %esi
801013d1: e8 0a 37 00 00 call 80104ae0 <memmove>
brelse(bp);
801013d6: 89 5d 08 mov %ebx,0x8(%ebp)
801013d9: 83 c4 10 add $0x10,%esp
}
801013dc: 8d 65 f8 lea -0x8(%ebp),%esp
801013df: 5b pop %ebx
801013e0: 5e pop %esi
801013e1: 5d pop %ebp
{
struct buf *bp;
bp = bread(dev, 1);
memmove(sb, bp->data, sizeof(*sb));
brelse(bp);
801013e2: e9 f9 ed ff ff jmp 801001e0 <brelse>
801013e7: 89 f6 mov %esi,%esi
801013e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801013f0 <bfree>:
}
// Free a disk block.
static void
bfree(int dev, uint b)
{
801013f0: 55 push %ebp
801013f1: 89 e5 mov %esp,%ebp
801013f3: 56 push %esi
801013f4: 53 push %ebx
801013f5: 89 d3 mov %edx,%ebx
801013f7: 89 c6 mov %eax,%esi
struct buf *bp;
int bi, m;
readsb(dev, &sb);
801013f9: 83 ec 08 sub $0x8,%esp
801013fc: 68 c0 19 11 80 push $0x801119c0
80101401: 50 push %eax
80101402: e8 a9 ff ff ff call 801013b0 <readsb>
bp = bread(dev, BBLOCK(b, sb));
80101407: 58 pop %eax
80101408: 5a pop %edx
80101409: 89 da mov %ebx,%edx
8010140b: c1 ea 0c shr $0xc,%edx
8010140e: 03 15 d8 19 11 80 add 0x801119d8,%edx
80101414: 52 push %edx
80101415: 56 push %esi
80101416: e8 b5 ec ff ff call 801000d0 <bread>
bi = b % BPB;
m = 1 << (bi % 8);
8010141b: 89 d9 mov %ebx,%ecx
if((bp->data[bi/8] & m) == 0)
8010141d: 81 e3 ff 0f 00 00 and $0xfff,%ebx
int bi, m;
readsb(dev, &sb);
bp = bread(dev, BBLOCK(b, sb));
bi = b % BPB;
m = 1 << (bi % 8);
80101423: ba 01 00 00 00 mov $0x1,%edx
80101428: 83 e1 07 and $0x7,%ecx
if((bp->data[bi/8] & m) == 0)
8010142b: c1 fb 03 sar $0x3,%ebx
8010142e: 83 c4 10 add $0x10,%esp
int bi, m;
readsb(dev, &sb);
bp = bread(dev, BBLOCK(b, sb));
bi = b % BPB;
m = 1 << (bi % 8);
80101431: d3 e2 shl %cl,%edx
if((bp->data[bi/8] & m) == 0)
80101433: 0f b6 4c 18 5c movzbl 0x5c(%eax,%ebx,1),%ecx
80101438: 85 d1 test %edx,%ecx
8010143a: 74 27 je 80101463 <bfree+0x73>
8010143c: 89 c6 mov %eax,%esi
panic("freeing free block");
bp->data[bi/8] &= ~m;
8010143e: f7 d2 not %edx
80101440: 89 c8 mov %ecx,%eax
log_write(bp);
80101442: 83 ec 0c sub $0xc,%esp
bp = bread(dev, BBLOCK(b, sb));
bi = b % BPB;
m = 1 << (bi % 8);
if((bp->data[bi/8] & m) == 0)
panic("freeing free block");
bp->data[bi/8] &= ~m;
80101445: 21 d0 and %edx,%eax
80101447: 88 44 1e 5c mov %al,0x5c(%esi,%ebx,1)
log_write(bp);
8010144b: 56 push %esi
8010144c: e8 df 18 00 00 call 80102d30 <log_write>
brelse(bp);
80101451: 89 34 24 mov %esi,(%esp)
80101454: e8 87 ed ff ff call 801001e0 <brelse>
}
80101459: 83 c4 10 add $0x10,%esp
8010145c: 8d 65 f8 lea -0x8(%ebp),%esp
8010145f: 5b pop %ebx
80101460: 5e pop %esi
80101461: 5d pop %ebp
80101462: c3 ret
readsb(dev, &sb);
bp = bread(dev, BBLOCK(b, sb));
bi = b % BPB;
m = 1 << (bi % 8);
if((bp->data[bi/8] & m) == 0)
panic("freeing free block");
80101463: 83 ec 0c sub $0xc,%esp
80101466: 68 38 77 10 80 push $0x80107738
8010146b: e8 00 ef ff ff call 80100370 <panic>
80101470 <iinit>:
struct inode inode[NINODE];
} icache;
void
iinit(int dev)
{
80101470: 55 push %ebp
80101471: 89 e5 mov %esp,%ebp
80101473: 53 push %ebx
80101474: bb 20 1a 11 80 mov $0x80111a20,%ebx
80101479: 83 ec 0c sub $0xc,%esp
int i = 0;
initlock(&icache.lock, "icache");
8010147c: 68 4b 77 10 80 push $0x8010774b
80101481: 68 e0 19 11 80 push $0x801119e0
80101486: e8 35 33 00 00 call 801047c0 <initlock>
8010148b: 83 c4 10 add $0x10,%esp
8010148e: 66 90 xchg %ax,%ax
for(i = 0; i < NINODE; i++) {
initsleeplock(&icache.inode[i].lock, "inode");
80101490: 83 ec 08 sub $0x8,%esp
80101493: 68 52 77 10 80 push $0x80107752
80101498: 53 push %ebx
80101499: 81 c3 90 00 00 00 add $0x90,%ebx
8010149f: e8 0c 32 00 00 call 801046b0 <initsleeplock>
iinit(int dev)
{
int i = 0;
initlock(&icache.lock, "icache");
for(i = 0; i < NINODE; i++) {
801014a4: 83 c4 10 add $0x10,%esp
801014a7: 81 fb 40 36 11 80 cmp $0x80113640,%ebx
801014ad: 75 e1 jne 80101490 <iinit+0x20>
initsleeplock(&icache.inode[i].lock, "inode");
}
readsb(dev, &sb);
801014af: 83 ec 08 sub $0x8,%esp
801014b2: 68 c0 19 11 80 push $0x801119c0
801014b7: ff 75 08 pushl 0x8(%ebp)
801014ba: e8 f1 fe ff ff call 801013b0 <readsb>
cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d\
801014bf: ff 35 d8 19 11 80 pushl 0x801119d8
801014c5: ff 35 d4 19 11 80 pushl 0x801119d4
801014cb: ff 35 d0 19 11 80 pushl 0x801119d0
801014d1: ff 35 cc 19 11 80 pushl 0x801119cc
801014d7: ff 35 c8 19 11 80 pushl 0x801119c8
801014dd: ff 35 c4 19 11 80 pushl 0x801119c4
801014e3: ff 35 c0 19 11 80 pushl 0x801119c0
801014e9: 68 b8 77 10 80 push $0x801077b8
801014ee: e8 6d f1 ff ff call 80100660 <cprintf>
inodestart %d bmap start %d\n", sb.size, sb.nblocks,
sb.ninodes, sb.nlog, sb.logstart, sb.inodestart,
sb.bmapstart);
}
801014f3: 83 c4 30 add $0x30,%esp
801014f6: 8b 5d fc mov -0x4(%ebp),%ebx
801014f9: c9 leave
801014fa: c3 ret
801014fb: 90 nop
801014fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101500 <ialloc>:
// Allocate an inode on device dev.
// Mark it as allocated by giving it type type.
// Returns an unlocked but allocated and referenced inode.
struct inode*
ialloc(uint dev, short type)
{
80101500: 55 push %ebp
80101501: 89 e5 mov %esp,%ebp
80101503: 57 push %edi
80101504: 56 push %esi
80101505: 53 push %ebx
80101506: 83 ec 1c sub $0x1c,%esp
int inum;
struct buf *bp;
struct dinode *dip;
for(inum = 1; inum < sb.ninodes; inum++){
80101509: 83 3d c8 19 11 80 01 cmpl $0x1,0x801119c8
// Allocate an inode on device dev.
// Mark it as allocated by giving it type type.
// Returns an unlocked but allocated and referenced inode.
struct inode*
ialloc(uint dev, short type)
{
80101510: 8b 45 0c mov 0xc(%ebp),%eax
80101513: 8b 75 08 mov 0x8(%ebp),%esi
80101516: 89 45 e4 mov %eax,-0x1c(%ebp)
int inum;
struct buf *bp;
struct dinode *dip;
for(inum = 1; inum < sb.ninodes; inum++){
80101519: 0f 86 91 00 00 00 jbe 801015b0 <ialloc+0xb0>
8010151f: bb 01 00 00 00 mov $0x1,%ebx
80101524: eb 21 jmp 80101547 <ialloc+0x47>
80101526: 8d 76 00 lea 0x0(%esi),%esi
80101529: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
dip->type = type;
log_write(bp); // mark it allocated on the disk
brelse(bp);
return iget(dev, inum);
}
brelse(bp);
80101530: 83 ec 0c sub $0xc,%esp
{
int inum;
struct buf *bp;
struct dinode *dip;
for(inum = 1; inum < sb.ninodes; inum++){
80101533: 83 c3 01 add $0x1,%ebx
dip->type = type;
log_write(bp); // mark it allocated on the disk
brelse(bp);
return iget(dev, inum);
}
brelse(bp);
80101536: 57 push %edi
80101537: e8 a4 ec ff ff call 801001e0 <brelse>
{
int inum;
struct buf *bp;
struct dinode *dip;
for(inum = 1; inum < sb.ninodes; inum++){
8010153c: 83 c4 10 add $0x10,%esp
8010153f: 39 1d c8 19 11 80 cmp %ebx,0x801119c8
80101545: 76 69 jbe 801015b0 <ialloc+0xb0>
bp = bread(dev, IBLOCK(inum, sb));
80101547: 89 d8 mov %ebx,%eax
80101549: 83 ec 08 sub $0x8,%esp
8010154c: c1 e8 03 shr $0x3,%eax
8010154f: 03 05 d4 19 11 80 add 0x801119d4,%eax
80101555: 50 push %eax
80101556: 56 push %esi
80101557: e8 74 eb ff ff call 801000d0 <bread>
8010155c: 89 c7 mov %eax,%edi
dip = (struct dinode*)bp->data + inum%IPB;
8010155e: 89 d8 mov %ebx,%eax
if(dip->type == 0){ // a free inode
80101560: 83 c4 10 add $0x10,%esp
struct buf *bp;
struct dinode *dip;
for(inum = 1; inum < sb.ninodes; inum++){
bp = bread(dev, IBLOCK(inum, sb));
dip = (struct dinode*)bp->data + inum%IPB;
80101563: 83 e0 07 and $0x7,%eax
80101566: c1 e0 06 shl $0x6,%eax
80101569: 8d 4c 07 5c lea 0x5c(%edi,%eax,1),%ecx
if(dip->type == 0){ // a free inode
8010156d: 66 83 39 00 cmpw $0x0,(%ecx)
80101571: 75 bd jne 80101530 <ialloc+0x30>
memset(dip, 0, sizeof(*dip));
80101573: 83 ec 04 sub $0x4,%esp
80101576: 89 4d e0 mov %ecx,-0x20(%ebp)
80101579: 6a 40 push $0x40
8010157b: 6a 00 push $0x0
8010157d: 51 push %ecx
8010157e: e8 ad 34 00 00 call 80104a30 <memset>
dip->type = type;
80101583: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax
80101587: 8b 4d e0 mov -0x20(%ebp),%ecx
8010158a: 66 89 01 mov %ax,(%ecx)
log_write(bp); // mark it allocated on the disk
8010158d: 89 3c 24 mov %edi,(%esp)
80101590: e8 9b 17 00 00 call 80102d30 <log_write>
brelse(bp);
80101595: 89 3c 24 mov %edi,(%esp)
80101598: e8 43 ec ff ff call 801001e0 <brelse>
return iget(dev, inum);
8010159d: 83 c4 10 add $0x10,%esp
}
brelse(bp);
}
panic("ialloc: no inodes");
}
801015a0: 8d 65 f4 lea -0xc(%ebp),%esp
if(dip->type == 0){ // a free inode
memset(dip, 0, sizeof(*dip));
dip->type = type;
log_write(bp); // mark it allocated on the disk
brelse(bp);
return iget(dev, inum);
801015a3: 89 da mov %ebx,%edx
801015a5: 89 f0 mov %esi,%eax
}
brelse(bp);
}
panic("ialloc: no inodes");
}
801015a7: 5b pop %ebx
801015a8: 5e pop %esi
801015a9: 5f pop %edi
801015aa: 5d pop %ebp
if(dip->type == 0){ // a free inode
memset(dip, 0, sizeof(*dip));
dip->type = type;
log_write(bp); // mark it allocated on the disk
brelse(bp);
return iget(dev, inum);
801015ab: e9 60 fc ff ff jmp 80101210 <iget>
}
brelse(bp);
}
panic("ialloc: no inodes");
801015b0: 83 ec 0c sub $0xc,%esp
801015b3: 68 58 77 10 80 push $0x80107758
801015b8: e8 b3 ed ff ff call 80100370 <panic>
801015bd: 8d 76 00 lea 0x0(%esi),%esi
801015c0 <iupdate>:
// Must be called after every change to an ip->xxx field
// that lives on disk, since i-node cache is write-through.
// Caller must hold ip->lock.
void
iupdate(struct inode *ip)
{
801015c0: 55 push %ebp
801015c1: 89 e5 mov %esp,%ebp
801015c3: 56 push %esi
801015c4: 53 push %ebx
801015c5: 8b 5d 08 mov 0x8(%ebp),%ebx
struct buf *bp;
struct dinode *dip;
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801015c8: 83 ec 08 sub $0x8,%esp
801015cb: 8b 43 04 mov 0x4(%ebx),%eax
dip->type = ip->type;
dip->major = ip->major;
dip->minor = ip->minor;
dip->nlink = ip->nlink;
dip->size = ip->size;
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
801015ce: 83 c3 5c add $0x5c,%ebx
iupdate(struct inode *ip)
{
struct buf *bp;
struct dinode *dip;
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801015d1: c1 e8 03 shr $0x3,%eax
801015d4: 03 05 d4 19 11 80 add 0x801119d4,%eax
801015da: 50 push %eax
801015db: ff 73 a4 pushl -0x5c(%ebx)
801015de: e8 ed ea ff ff call 801000d0 <bread>
801015e3: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
801015e5: 8b 43 a8 mov -0x58(%ebx),%eax
dip->type = ip->type;
801015e8: 0f b7 53 f4 movzwl -0xc(%ebx),%edx
dip->major = ip->major;
dip->minor = ip->minor;
dip->nlink = ip->nlink;
dip->size = ip->size;
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
801015ec: 83 c4 0c add $0xc,%esp
{
struct buf *bp;
struct dinode *dip;
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
dip = (struct dinode*)bp->data + ip->inum%IPB;
801015ef: 83 e0 07 and $0x7,%eax
801015f2: c1 e0 06 shl $0x6,%eax
801015f5: 8d 44 06 5c lea 0x5c(%esi,%eax,1),%eax
dip->type = ip->type;
801015f9: 66 89 10 mov %dx,(%eax)
dip->major = ip->major;
801015fc: 0f b7 53 f6 movzwl -0xa(%ebx),%edx
dip->minor = ip->minor;
dip->nlink = ip->nlink;
dip->size = ip->size;
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
80101600: 83 c0 0c add $0xc,%eax
struct dinode *dip;
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
dip = (struct dinode*)bp->data + ip->inum%IPB;
dip->type = ip->type;
dip->major = ip->major;
80101603: 66 89 50 f6 mov %dx,-0xa(%eax)
dip->minor = ip->minor;
80101607: 0f b7 53 f8 movzwl -0x8(%ebx),%edx
8010160b: 66 89 50 f8 mov %dx,-0x8(%eax)
dip->nlink = ip->nlink;
8010160f: 0f b7 53 fa movzwl -0x6(%ebx),%edx
80101613: 66 89 50 fa mov %dx,-0x6(%eax)
dip->size = ip->size;
80101617: 8b 53 fc mov -0x4(%ebx),%edx
8010161a: 89 50 fc mov %edx,-0x4(%eax)
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
8010161d: 6a 34 push $0x34
8010161f: 53 push %ebx
80101620: 50 push %eax
80101621: e8 ba 34 00 00 call 80104ae0 <memmove>
log_write(bp);
80101626: 89 34 24 mov %esi,(%esp)
80101629: e8 02 17 00 00 call 80102d30 <log_write>
brelse(bp);
8010162e: 89 75 08 mov %esi,0x8(%ebp)
80101631: 83 c4 10 add $0x10,%esp
}
80101634: 8d 65 f8 lea -0x8(%ebp),%esp
80101637: 5b pop %ebx
80101638: 5e pop %esi
80101639: 5d pop %ebp
dip->minor = ip->minor;
dip->nlink = ip->nlink;
dip->size = ip->size;
memmove(dip->addrs, ip->addrs, sizeof(ip->addrs));
log_write(bp);
brelse(bp);
8010163a: e9 a1 eb ff ff jmp 801001e0 <brelse>
8010163f: 90 nop
80101640 <idup>:
// Increment reference count for ip.
// Returns ip to enable ip = idup(ip1) idiom.
struct inode*
idup(struct inode *ip)
{
80101640: 55 push %ebp
80101641: 89 e5 mov %esp,%ebp
80101643: 53 push %ebx
80101644: 83 ec 10 sub $0x10,%esp
80101647: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&icache.lock);
8010164a: 68 e0 19 11 80 push $0x801119e0
8010164f: e8 6c 32 00 00 call 801048c0 <acquire>
ip->ref++;
80101654: 83 43 08 01 addl $0x1,0x8(%ebx)
release(&icache.lock);
80101658: c7 04 24 e0 19 11 80 movl $0x801119e0,(%esp)
8010165f: e8 7c 33 00 00 call 801049e0 <release>
return ip;
}
80101664: 89 d8 mov %ebx,%eax
80101666: 8b 5d fc mov -0x4(%ebp),%ebx
80101669: c9 leave
8010166a: c3 ret
8010166b: 90 nop
8010166c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101670 <ilock>:
// Lock the given inode.
// Reads the inode from disk if necessary.
void
ilock(struct inode *ip)
{
80101670: 55 push %ebp
80101671: 89 e5 mov %esp,%ebp
80101673: 56 push %esi
80101674: 53 push %ebx
80101675: 8b 5d 08 mov 0x8(%ebp),%ebx
struct buf *bp;
struct dinode *dip;
if(ip == 0 || ip->ref < 1)
80101678: 85 db test %ebx,%ebx
8010167a: 0f 84 b7 00 00 00 je 80101737 <ilock+0xc7>
80101680: 8b 53 08 mov 0x8(%ebx),%edx
80101683: 85 d2 test %edx,%edx
80101685: 0f 8e ac 00 00 00 jle 80101737 <ilock+0xc7>
panic("ilock");
acquiresleep(&ip->lock);
8010168b: 8d 43 0c lea 0xc(%ebx),%eax
8010168e: 83 ec 0c sub $0xc,%esp
80101691: 50 push %eax
80101692: e8 59 30 00 00 call 801046f0 <acquiresleep>
if(ip->valid == 0){
80101697: 8b 43 4c mov 0x4c(%ebx),%eax
8010169a: 83 c4 10 add $0x10,%esp
8010169d: 85 c0 test %eax,%eax
8010169f: 74 0f je 801016b0 <ilock+0x40>
brelse(bp);
ip->valid = 1;
if(ip->type == 0)
panic("ilock: no type");
}
}
801016a1: 8d 65 f8 lea -0x8(%ebp),%esp
801016a4: 5b pop %ebx
801016a5: 5e pop %esi
801016a6: 5d pop %ebp
801016a7: c3 ret
801016a8: 90 nop
801016a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
panic("ilock");
acquiresleep(&ip->lock);
if(ip->valid == 0){
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
801016b0: 8b 43 04 mov 0x4(%ebx),%eax
801016b3: 83 ec 08 sub $0x8,%esp
801016b6: c1 e8 03 shr $0x3,%eax
801016b9: 03 05 d4 19 11 80 add 0x801119d4,%eax
801016bf: 50 push %eax
801016c0: ff 33 pushl (%ebx)
801016c2: e8 09 ea ff ff call 801000d0 <bread>
801016c7: 89 c6 mov %eax,%esi
dip = (struct dinode*)bp->data + ip->inum%IPB;
801016c9: 8b 43 04 mov 0x4(%ebx),%eax
ip->type = dip->type;
ip->major = dip->major;
ip->minor = dip->minor;
ip->nlink = dip->nlink;
ip->size = dip->size;
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
801016cc: 83 c4 0c add $0xc,%esp
acquiresleep(&ip->lock);
if(ip->valid == 0){
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
dip = (struct dinode*)bp->data + ip->inum%IPB;
801016cf: 83 e0 07 and $0x7,%eax
801016d2: c1 e0 06 shl $0x6,%eax
801016d5: 8d 44 06 5c lea 0x5c(%esi,%eax,1),%eax
ip->type = dip->type;
801016d9: 0f b7 10 movzwl (%eax),%edx
ip->major = dip->major;
ip->minor = dip->minor;
ip->nlink = dip->nlink;
ip->size = dip->size;
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
801016dc: 83 c0 0c add $0xc,%eax
acquiresleep(&ip->lock);
if(ip->valid == 0){
bp = bread(ip->dev, IBLOCK(ip->inum, sb));
dip = (struct dinode*)bp->data + ip->inum%IPB;
ip->type = dip->type;
801016df: 66 89 53 50 mov %dx,0x50(%ebx)
ip->major = dip->major;
801016e3: 0f b7 50 f6 movzwl -0xa(%eax),%edx
801016e7: 66 89 53 52 mov %dx,0x52(%ebx)
ip->minor = dip->minor;
801016eb: 0f b7 50 f8 movzwl -0x8(%eax),%edx
801016ef: 66 89 53 54 mov %dx,0x54(%ebx)
ip->nlink = dip->nlink;
801016f3: 0f b7 50 fa movzwl -0x6(%eax),%edx
801016f7: 66 89 53 56 mov %dx,0x56(%ebx)
ip->size = dip->size;
801016fb: 8b 50 fc mov -0x4(%eax),%edx
801016fe: 89 53 58 mov %edx,0x58(%ebx)
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
80101701: 6a 34 push $0x34
80101703: 50 push %eax
80101704: 8d 43 5c lea 0x5c(%ebx),%eax
80101707: 50 push %eax
80101708: e8 d3 33 00 00 call 80104ae0 <memmove>
brelse(bp);
8010170d: 89 34 24 mov %esi,(%esp)
80101710: e8 cb ea ff ff call 801001e0 <brelse>
ip->valid = 1;
if(ip->type == 0)
80101715: 83 c4 10 add $0x10,%esp
80101718: 66 83 7b 50 00 cmpw $0x0,0x50(%ebx)
ip->minor = dip->minor;
ip->nlink = dip->nlink;
ip->size = dip->size;
memmove(ip->addrs, dip->addrs, sizeof(ip->addrs));
brelse(bp);
ip->valid = 1;
8010171d: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx)
if(ip->type == 0)
80101724: 0f 85 77 ff ff ff jne 801016a1 <ilock+0x31>
panic("ilock: no type");
8010172a: 83 ec 0c sub $0xc,%esp
8010172d: 68 70 77 10 80 push $0x80107770
80101732: e8 39 ec ff ff call 80100370 <panic>
{
struct buf *bp;
struct dinode *dip;
if(ip == 0 || ip->ref < 1)
panic("ilock");
80101737: 83 ec 0c sub $0xc,%esp
8010173a: 68 6a 77 10 80 push $0x8010776a
8010173f: e8 2c ec ff ff call 80100370 <panic>
80101744: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010174a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80101750 <iunlock>:
}
// Unlock the given inode.
void
iunlock(struct inode *ip)
{
80101750: 55 push %ebp
80101751: 89 e5 mov %esp,%ebp
80101753: 56 push %esi
80101754: 53 push %ebx
80101755: 8b 5d 08 mov 0x8(%ebp),%ebx
if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1)
80101758: 85 db test %ebx,%ebx
8010175a: 74 28 je 80101784 <iunlock+0x34>
8010175c: 8d 73 0c lea 0xc(%ebx),%esi
8010175f: 83 ec 0c sub $0xc,%esp
80101762: 56 push %esi
80101763: e8 28 30 00 00 call 80104790 <holdingsleep>
80101768: 83 c4 10 add $0x10,%esp
8010176b: 85 c0 test %eax,%eax
8010176d: 74 15 je 80101784 <iunlock+0x34>
8010176f: 8b 43 08 mov 0x8(%ebx),%eax
80101772: 85 c0 test %eax,%eax
80101774: 7e 0e jle 80101784 <iunlock+0x34>
panic("iunlock");
releasesleep(&ip->lock);
80101776: 89 75 08 mov %esi,0x8(%ebp)
}
80101779: 8d 65 f8 lea -0x8(%ebp),%esp
8010177c: 5b pop %ebx
8010177d: 5e pop %esi
8010177e: 5d pop %ebp
iunlock(struct inode *ip)
{
if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1)
panic("iunlock");
releasesleep(&ip->lock);
8010177f: e9 cc 2f 00 00 jmp 80104750 <releasesleep>
// Unlock the given inode.
void
iunlock(struct inode *ip)
{
if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1)
panic("iunlock");
80101784: 83 ec 0c sub $0xc,%esp
80101787: 68 7f 77 10 80 push $0x8010777f
8010178c: e8 df eb ff ff call 80100370 <panic>
80101791: eb 0d jmp 801017a0 <iput>
80101793: 90 nop
80101794: 90 nop
80101795: 90 nop
80101796: 90 nop
80101797: 90 nop
80101798: 90 nop
80101799: 90 nop
8010179a: 90 nop
8010179b: 90 nop
8010179c: 90 nop
8010179d: 90 nop
8010179e: 90 nop
8010179f: 90 nop
801017a0 <iput>:
// to it, free the inode (and its content) on disk.
// All calls to iput() must be inside a transaction in
// case it has to free the inode.
void
iput(struct inode *ip)
{
801017a0: 55 push %ebp
801017a1: 89 e5 mov %esp,%ebp
801017a3: 57 push %edi
801017a4: 56 push %esi
801017a5: 53 push %ebx
801017a6: 83 ec 28 sub $0x28,%esp
801017a9: 8b 75 08 mov 0x8(%ebp),%esi
acquiresleep(&ip->lock);
801017ac: 8d 7e 0c lea 0xc(%esi),%edi
801017af: 57 push %edi
801017b0: e8 3b 2f 00 00 call 801046f0 <acquiresleep>
if(ip->valid && ip->nlink == 0){
801017b5: 8b 56 4c mov 0x4c(%esi),%edx
801017b8: 83 c4 10 add $0x10,%esp
801017bb: 85 d2 test %edx,%edx
801017bd: 74 07 je 801017c6 <iput+0x26>
801017bf: 66 83 7e 56 00 cmpw $0x0,0x56(%esi)
801017c4: 74 32 je 801017f8 <iput+0x58>
ip->type = 0;
iupdate(ip);
ip->valid = 0;
}
}
releasesleep(&ip->lock);
801017c6: 83 ec 0c sub $0xc,%esp
801017c9: 57 push %edi
801017ca: e8 81 2f 00 00 call 80104750 <releasesleep>
acquire(&icache.lock);
801017cf: c7 04 24 e0 19 11 80 movl $0x801119e0,(%esp)
801017d6: e8 e5 30 00 00 call 801048c0 <acquire>
ip->ref--;
801017db: 83 6e 08 01 subl $0x1,0x8(%esi)
release(&icache.lock);
801017df: 83 c4 10 add $0x10,%esp
801017e2: c7 45 08 e0 19 11 80 movl $0x801119e0,0x8(%ebp)
}
801017e9: 8d 65 f4 lea -0xc(%ebp),%esp
801017ec: 5b pop %ebx
801017ed: 5e pop %esi
801017ee: 5f pop %edi
801017ef: 5d pop %ebp
}
releasesleep(&ip->lock);
acquire(&icache.lock);
ip->ref--;
release(&icache.lock);
801017f0: e9 eb 31 00 00 jmp 801049e0 <release>
801017f5: 8d 76 00 lea 0x0(%esi),%esi
void
iput(struct inode *ip)
{
acquiresleep(&ip->lock);
if(ip->valid && ip->nlink == 0){
acquire(&icache.lock);
801017f8: 83 ec 0c sub $0xc,%esp
801017fb: 68 e0 19 11 80 push $0x801119e0
80101800: e8 bb 30 00 00 call 801048c0 <acquire>
int r = ip->ref;
80101805: 8b 5e 08 mov 0x8(%esi),%ebx
release(&icache.lock);
80101808: c7 04 24 e0 19 11 80 movl $0x801119e0,(%esp)
8010180f: e8 cc 31 00 00 call 801049e0 <release>
if(r == 1){
80101814: 83 c4 10 add $0x10,%esp
80101817: 83 fb 01 cmp $0x1,%ebx
8010181a: 75 aa jne 801017c6 <iput+0x26>
8010181c: 8d 8e 8c 00 00 00 lea 0x8c(%esi),%ecx
80101822: 89 7d e4 mov %edi,-0x1c(%ebp)
80101825: 8d 5e 5c lea 0x5c(%esi),%ebx
80101828: 89 cf mov %ecx,%edi
8010182a: eb 0b jmp 80101837 <iput+0x97>
8010182c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101830: 83 c3 04 add $0x4,%ebx
{
int i, j;
struct buf *bp;
uint *a;
for(i = 0; i < NDIRECT; i++){
80101833: 39 fb cmp %edi,%ebx
80101835: 74 19 je 80101850 <iput+0xb0>
if(ip->addrs[i]){
80101837: 8b 13 mov (%ebx),%edx
80101839: 85 d2 test %edx,%edx
8010183b: 74 f3 je 80101830 <iput+0x90>
bfree(ip->dev, ip->addrs[i]);
8010183d: 8b 06 mov (%esi),%eax
8010183f: e8 ac fb ff ff call 801013f0 <bfree>
ip->addrs[i] = 0;
80101844: c7 03 00 00 00 00 movl $0x0,(%ebx)
8010184a: eb e4 jmp 80101830 <iput+0x90>
8010184c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
}
if(ip->addrs[NDIRECT]){
80101850: 8b 86 8c 00 00 00 mov 0x8c(%esi),%eax
80101856: 8b 7d e4 mov -0x1c(%ebp),%edi
80101859: 85 c0 test %eax,%eax
8010185b: 75 33 jne 80101890 <iput+0xf0>
bfree(ip->dev, ip->addrs[NDIRECT]);
ip->addrs[NDIRECT] = 0;
}
ip->size = 0;
iupdate(ip);
8010185d: 83 ec 0c sub $0xc,%esp
brelse(bp);
bfree(ip->dev, ip->addrs[NDIRECT]);
ip->addrs[NDIRECT] = 0;
}
ip->size = 0;
80101860: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi)
iupdate(ip);
80101867: 56 push %esi
80101868: e8 53 fd ff ff call 801015c0 <iupdate>
int r = ip->ref;
release(&icache.lock);
if(r == 1){
// inode has no links and no other references: truncate and free.
itrunc(ip);
ip->type = 0;
8010186d: 31 c0 xor %eax,%eax
8010186f: 66 89 46 50 mov %ax,0x50(%esi)
iupdate(ip);
80101873: 89 34 24 mov %esi,(%esp)
80101876: e8 45 fd ff ff call 801015c0 <iupdate>
ip->valid = 0;
8010187b: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi)
80101882: 83 c4 10 add $0x10,%esp
80101885: e9 3c ff ff ff jmp 801017c6 <iput+0x26>
8010188a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
ip->addrs[i] = 0;
}
}
if(ip->addrs[NDIRECT]){
bp = bread(ip->dev, ip->addrs[NDIRECT]);
80101890: 83 ec 08 sub $0x8,%esp
80101893: 50 push %eax
80101894: ff 36 pushl (%esi)
80101896: e8 35 e8 ff ff call 801000d0 <bread>
8010189b: 8d 88 5c 02 00 00 lea 0x25c(%eax),%ecx
801018a1: 89 7d e0 mov %edi,-0x20(%ebp)
801018a4: 89 45 e4 mov %eax,-0x1c(%ebp)
a = (uint*)bp->data;
801018a7: 8d 58 5c lea 0x5c(%eax),%ebx
801018aa: 83 c4 10 add $0x10,%esp
801018ad: 89 cf mov %ecx,%edi
801018af: eb 0e jmp 801018bf <iput+0x11f>
801018b1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801018b8: 83 c3 04 add $0x4,%ebx
for(j = 0; j < NINDIRECT; j++){
801018bb: 39 fb cmp %edi,%ebx
801018bd: 74 0f je 801018ce <iput+0x12e>
if(a[j])
801018bf: 8b 13 mov (%ebx),%edx
801018c1: 85 d2 test %edx,%edx
801018c3: 74 f3 je 801018b8 <iput+0x118>
bfree(ip->dev, a[j]);
801018c5: 8b 06 mov (%esi),%eax
801018c7: e8 24 fb ff ff call 801013f0 <bfree>
801018cc: eb ea jmp 801018b8 <iput+0x118>
}
brelse(bp);
801018ce: 83 ec 0c sub $0xc,%esp
801018d1: ff 75 e4 pushl -0x1c(%ebp)
801018d4: 8b 7d e0 mov -0x20(%ebp),%edi
801018d7: e8 04 e9 ff ff call 801001e0 <brelse>
bfree(ip->dev, ip->addrs[NDIRECT]);
801018dc: 8b 96 8c 00 00 00 mov 0x8c(%esi),%edx
801018e2: 8b 06 mov (%esi),%eax
801018e4: e8 07 fb ff ff call 801013f0 <bfree>
ip->addrs[NDIRECT] = 0;
801018e9: c7 86 8c 00 00 00 00 movl $0x0,0x8c(%esi)
801018f0: 00 00 00
801018f3: 83 c4 10 add $0x10,%esp
801018f6: e9 62 ff ff ff jmp 8010185d <iput+0xbd>
801018fb: 90 nop
801018fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101900 <iunlockput>:
}
// Common idiom: unlock, then put.
void
iunlockput(struct inode *ip)
{
80101900: 55 push %ebp
80101901: 89 e5 mov %esp,%ebp
80101903: 53 push %ebx
80101904: 83 ec 10 sub $0x10,%esp
80101907: 8b 5d 08 mov 0x8(%ebp),%ebx
iunlock(ip);
8010190a: 53 push %ebx
8010190b: e8 40 fe ff ff call 80101750 <iunlock>
iput(ip);
80101910: 89 5d 08 mov %ebx,0x8(%ebp)
80101913: 83 c4 10 add $0x10,%esp
}
80101916: 8b 5d fc mov -0x4(%ebp),%ebx
80101919: c9 leave
// Common idiom: unlock, then put.
void
iunlockput(struct inode *ip)
{
iunlock(ip);
iput(ip);
8010191a: e9 81 fe ff ff jmp 801017a0 <iput>
8010191f: 90 nop
80101920 <stati>:
// Copy stat information from inode.
// Caller must hold ip->lock.
void
stati(struct inode *ip, struct stat *st)
{
80101920: 55 push %ebp
80101921: 89 e5 mov %esp,%ebp
80101923: 8b 55 08 mov 0x8(%ebp),%edx
80101926: 8b 45 0c mov 0xc(%ebp),%eax
st->dev = ip->dev;
80101929: 8b 0a mov (%edx),%ecx
8010192b: 89 48 04 mov %ecx,0x4(%eax)
st->ino = ip->inum;
8010192e: 8b 4a 04 mov 0x4(%edx),%ecx
80101931: 89 48 08 mov %ecx,0x8(%eax)
st->type = ip->type;
80101934: 0f b7 4a 50 movzwl 0x50(%edx),%ecx
80101938: 66 89 08 mov %cx,(%eax)
st->nlink = ip->nlink;
8010193b: 0f b7 4a 56 movzwl 0x56(%edx),%ecx
8010193f: 66 89 48 0c mov %cx,0xc(%eax)
st->size = ip->size;
80101943: 8b 52 58 mov 0x58(%edx),%edx
80101946: 89 50 10 mov %edx,0x10(%eax)
}
80101949: 5d pop %ebp
8010194a: c3 ret
8010194b: 90 nop
8010194c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101950 <readi>:
// Read data from inode.
// Caller must hold ip->lock.
int
readi(struct inode *ip, char *dst, uint off, uint n)
{
80101950: 55 push %ebp
80101951: 89 e5 mov %esp,%ebp
80101953: 57 push %edi
80101954: 56 push %esi
80101955: 53 push %ebx
80101956: 83 ec 1c sub $0x1c,%esp
80101959: 8b 45 08 mov 0x8(%ebp),%eax
8010195c: 8b 7d 0c mov 0xc(%ebp),%edi
8010195f: 8b 75 10 mov 0x10(%ebp),%esi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101962: 66 83 78 50 03 cmpw $0x3,0x50(%eax)
// Read data from inode.
// Caller must hold ip->lock.
int
readi(struct inode *ip, char *dst, uint off, uint n)
{
80101967: 89 7d e0 mov %edi,-0x20(%ebp)
8010196a: 8b 7d 14 mov 0x14(%ebp),%edi
8010196d: 89 45 d8 mov %eax,-0x28(%ebp)
80101970: 89 7d e4 mov %edi,-0x1c(%ebp)
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101973: 0f 84 a7 00 00 00 je 80101a20 <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)
80101979: 8b 45 d8 mov -0x28(%ebp),%eax
8010197c: 8b 40 58 mov 0x58(%eax),%eax
8010197f: 39 f0 cmp %esi,%eax
80101981: 0f 82 c1 00 00 00 jb 80101a48 <readi+0xf8>
80101987: 8b 7d e4 mov -0x1c(%ebp),%edi
8010198a: 89 fa mov %edi,%edx
8010198c: 01 f2 add %esi,%edx
8010198e: 0f 82 b4 00 00 00 jb 80101a48 <readi+0xf8>
return -1;
if(off + n > ip->size)
n = ip->size - off;
80101994: 89 c1 mov %eax,%ecx
80101996: 29 f1 sub %esi,%ecx
80101998: 39 d0 cmp %edx,%eax
8010199a: 0f 43 cf cmovae %edi,%ecx
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
8010199d: 31 ff xor %edi,%edi
8010199f: 85 c9 test %ecx,%ecx
}
if(off > ip->size || off + n < off)
return -1;
if(off + n > ip->size)
n = ip->size - off;
801019a1: 89 4d e4 mov %ecx,-0x1c(%ebp)
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
801019a4: 74 6d je 80101a13 <readi+0xc3>
801019a6: 8d 76 00 lea 0x0(%esi),%esi
801019a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
bp = bread(ip->dev, bmap(ip, off/BSIZE));
801019b0: 8b 5d d8 mov -0x28(%ebp),%ebx
801019b3: 89 f2 mov %esi,%edx
801019b5: c1 ea 09 shr $0x9,%edx
801019b8: 89 d8 mov %ebx,%eax
801019ba: e8 21 f9 ff ff call 801012e0 <bmap>
801019bf: 83 ec 08 sub $0x8,%esp
801019c2: 50 push %eax
801019c3: ff 33 pushl (%ebx)
m = min(n - tot, BSIZE - off%BSIZE);
801019c5: bb 00 02 00 00 mov $0x200,%ebx
return -1;
if(off + n > ip->size)
n = ip->size - off;
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
bp = bread(ip->dev, bmap(ip, off/BSIZE));
801019ca: e8 01 e7 ff ff call 801000d0 <bread>
801019cf: 89 c2 mov %eax,%edx
m = min(n - tot, BSIZE - off%BSIZE);
801019d1: 8b 45 e4 mov -0x1c(%ebp),%eax
801019d4: 89 f1 mov %esi,%ecx
801019d6: 81 e1 ff 01 00 00 and $0x1ff,%ecx
801019dc: 83 c4 0c add $0xc,%esp
memmove(dst, bp->data + off%BSIZE, m);
801019df: 89 55 dc mov %edx,-0x24(%ebp)
if(off + n > ip->size)
n = ip->size - off;
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
bp = bread(ip->dev, bmap(ip, off/BSIZE));
m = min(n - tot, BSIZE - off%BSIZE);
801019e2: 29 cb sub %ecx,%ebx
801019e4: 29 f8 sub %edi,%eax
801019e6: 39 c3 cmp %eax,%ebx
801019e8: 0f 47 d8 cmova %eax,%ebx
memmove(dst, bp->data + off%BSIZE, m);
801019eb: 8d 44 0a 5c lea 0x5c(%edx,%ecx,1),%eax
801019ef: 53 push %ebx
if(off > ip->size || off + n < off)
return -1;
if(off + n > ip->size)
n = ip->size - off;
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
801019f0: 01 df add %ebx,%edi
801019f2: 01 de add %ebx,%esi
bp = bread(ip->dev, bmap(ip, off/BSIZE));
m = min(n - tot, BSIZE - off%BSIZE);
memmove(dst, bp->data + off%BSIZE, m);
801019f4: 50 push %eax
801019f5: ff 75 e0 pushl -0x20(%ebp)
801019f8: e8 e3 30 00 00 call 80104ae0 <memmove>
brelse(bp);
801019fd: 8b 55 dc mov -0x24(%ebp),%edx
80101a00: 89 14 24 mov %edx,(%esp)
80101a03: e8 d8 e7 ff ff call 801001e0 <brelse>
if(off > ip->size || off + n < off)
return -1;
if(off + n > ip->size)
n = ip->size - off;
for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
80101a08: 01 5d e0 add %ebx,-0x20(%ebp)
80101a0b: 83 c4 10 add $0x10,%esp
80101a0e: 39 7d e4 cmp %edi,-0x1c(%ebp)
80101a11: 77 9d ja 801019b0 <readi+0x60>
bp = bread(ip->dev, bmap(ip, off/BSIZE));
m = min(n - tot, BSIZE - off%BSIZE);
memmove(dst, bp->data + off%BSIZE, m);
brelse(bp);
}
return n;
80101a13: 8b 45 e4 mov -0x1c(%ebp),%eax
}
80101a16: 8d 65 f4 lea -0xc(%ebp),%esp
80101a19: 5b pop %ebx
80101a1a: 5e pop %esi
80101a1b: 5f pop %edi
80101a1c: 5d pop %ebp
80101a1d: c3 ret
80101a1e: 66 90 xchg %ax,%ax
{
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
80101a20: 0f bf 40 52 movswl 0x52(%eax),%eax
80101a24: 66 83 f8 09 cmp $0x9,%ax
80101a28: 77 1e ja 80101a48 <readi+0xf8>
80101a2a: 8b 04 c5 60 19 11 80 mov -0x7feee6a0(,%eax,8),%eax
80101a31: 85 c0 test %eax,%eax
80101a33: 74 13 je 80101a48 <readi+0xf8>
return -1;
return devsw[ip->major].read(ip, dst, n);
80101a35: 89 7d 10 mov %edi,0x10(%ebp)
m = min(n - tot, BSIZE - off%BSIZE);
memmove(dst, bp->data + off%BSIZE, m);
brelse(bp);
}
return n;
}
80101a38: 8d 65 f4 lea -0xc(%ebp),%esp
80101a3b: 5b pop %ebx
80101a3c: 5e pop %esi
80101a3d: 5f pop %edi
80101a3e: 5d pop %ebp
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
return -1;
return devsw[ip->major].read(ip, dst, n);
80101a3f: ff e0 jmp *%eax
80101a41: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
return -1;
80101a48: b8 ff ff ff ff mov $0xffffffff,%eax
80101a4d: eb c7 jmp 80101a16 <readi+0xc6>
80101a4f: 90 nop
80101a50 <writei>:
// Write data to inode.
// Caller must hold ip->lock.
int
writei(struct inode *ip, char *src, uint off, uint n)
{
80101a50: 55 push %ebp
80101a51: 89 e5 mov %esp,%ebp
80101a53: 57 push %edi
80101a54: 56 push %esi
80101a55: 53 push %ebx
80101a56: 83 ec 1c sub $0x1c,%esp
80101a59: 8b 45 08 mov 0x8(%ebp),%eax
80101a5c: 8b 75 0c mov 0xc(%ebp),%esi
80101a5f: 8b 7d 14 mov 0x14(%ebp),%edi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101a62: 66 83 78 50 03 cmpw $0x3,0x50(%eax)
// Write data to inode.
// Caller must hold ip->lock.
int
writei(struct inode *ip, char *src, uint off, uint n)
{
80101a67: 89 75 dc mov %esi,-0x24(%ebp)
80101a6a: 89 45 d8 mov %eax,-0x28(%ebp)
80101a6d: 8b 75 10 mov 0x10(%ebp),%esi
80101a70: 89 7d e0 mov %edi,-0x20(%ebp)
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
80101a73: 0f 84 b7 00 00 00 je 80101b30 <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)
80101a79: 8b 45 d8 mov -0x28(%ebp),%eax
80101a7c: 39 70 58 cmp %esi,0x58(%eax)
80101a7f: 0f 82 eb 00 00 00 jb 80101b70 <writei+0x120>
80101a85: 8b 7d e0 mov -0x20(%ebp),%edi
80101a88: 89 f8 mov %edi,%eax
80101a8a: 01 f0 add %esi,%eax
return -1;
if(off + n > MAXFILE*BSIZE)
80101a8c: 3d 00 18 01 00 cmp $0x11800,%eax
80101a91: 0f 87 d9 00 00 00 ja 80101b70 <writei+0x120>
80101a97: 39 c6 cmp %eax,%esi
80101a99: 0f 87 d1 00 00 00 ja 80101b70 <writei+0x120>
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101a9f: 85 ff test %edi,%edi
80101aa1: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
80101aa8: 74 78 je 80101b22 <writei+0xd2>
80101aaa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101ab0: 8b 7d d8 mov -0x28(%ebp),%edi
80101ab3: 89 f2 mov %esi,%edx
m = min(n - tot, BSIZE - off%BSIZE);
80101ab5: bb 00 02 00 00 mov $0x200,%ebx
return -1;
if(off + n > MAXFILE*BSIZE)
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
bp = bread(ip->dev, bmap(ip, off/BSIZE));
80101aba: c1 ea 09 shr $0x9,%edx
80101abd: 89 f8 mov %edi,%eax
80101abf: e8 1c f8 ff ff call 801012e0 <bmap>
80101ac4: 83 ec 08 sub $0x8,%esp
80101ac7: 50 push %eax
80101ac8: ff 37 pushl (%edi)
80101aca: e8 01 e6 ff ff call 801000d0 <bread>
80101acf: 89 c7 mov %eax,%edi
m = min(n - tot, BSIZE - off%BSIZE);
80101ad1: 8b 45 e0 mov -0x20(%ebp),%eax
80101ad4: 2b 45 e4 sub -0x1c(%ebp),%eax
80101ad7: 89 f1 mov %esi,%ecx
80101ad9: 83 c4 0c add $0xc,%esp
80101adc: 81 e1 ff 01 00 00 and $0x1ff,%ecx
80101ae2: 29 cb sub %ecx,%ebx
80101ae4: 39 c3 cmp %eax,%ebx
80101ae6: 0f 47 d8 cmova %eax,%ebx
memmove(bp->data + off%BSIZE, src, m);
80101ae9: 8d 44 0f 5c lea 0x5c(%edi,%ecx,1),%eax
80101aed: 53 push %ebx
80101aee: ff 75 dc pushl -0x24(%ebp)
if(off > ip->size || off + n < off)
return -1;
if(off + n > MAXFILE*BSIZE)
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101af1: 01 de add %ebx,%esi
bp = bread(ip->dev, bmap(ip, off/BSIZE));
m = min(n - tot, BSIZE - off%BSIZE);
memmove(bp->data + off%BSIZE, src, m);
80101af3: 50 push %eax
80101af4: e8 e7 2f 00 00 call 80104ae0 <memmove>
log_write(bp);
80101af9: 89 3c 24 mov %edi,(%esp)
80101afc: e8 2f 12 00 00 call 80102d30 <log_write>
brelse(bp);
80101b01: 89 3c 24 mov %edi,(%esp)
80101b04: e8 d7 e6 ff ff call 801001e0 <brelse>
if(off > ip->size || off + n < off)
return -1;
if(off + n > MAXFILE*BSIZE)
return -1;
for(tot=0; tot<n; tot+=m, off+=m, src+=m){
80101b09: 01 5d e4 add %ebx,-0x1c(%ebp)
80101b0c: 01 5d dc add %ebx,-0x24(%ebp)
80101b0f: 83 c4 10 add $0x10,%esp
80101b12: 8b 55 e4 mov -0x1c(%ebp),%edx
80101b15: 39 55 e0 cmp %edx,-0x20(%ebp)
80101b18: 77 96 ja 80101ab0 <writei+0x60>
memmove(bp->data + off%BSIZE, src, m);
log_write(bp);
brelse(bp);
}
if(n > 0 && off > ip->size){
80101b1a: 8b 45 d8 mov -0x28(%ebp),%eax
80101b1d: 3b 70 58 cmp 0x58(%eax),%esi
80101b20: 77 36 ja 80101b58 <writei+0x108>
ip->size = off;
iupdate(ip);
}
return n;
80101b22: 8b 45 e0 mov -0x20(%ebp),%eax
}
80101b25: 8d 65 f4 lea -0xc(%ebp),%esp
80101b28: 5b pop %ebx
80101b29: 5e pop %esi
80101b2a: 5f pop %edi
80101b2b: 5d pop %ebp
80101b2c: c3 ret
80101b2d: 8d 76 00 lea 0x0(%esi),%esi
{
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
80101b30: 0f bf 40 52 movswl 0x52(%eax),%eax
80101b34: 66 83 f8 09 cmp $0x9,%ax
80101b38: 77 36 ja 80101b70 <writei+0x120>
80101b3a: 8b 04 c5 64 19 11 80 mov -0x7feee69c(,%eax,8),%eax
80101b41: 85 c0 test %eax,%eax
80101b43: 74 2b je 80101b70 <writei+0x120>
return -1;
return devsw[ip->major].write(ip, src, n);
80101b45: 89 7d 10 mov %edi,0x10(%ebp)
if(n > 0 && off > ip->size){
ip->size = off;
iupdate(ip);
}
return n;
}
80101b48: 8d 65 f4 lea -0xc(%ebp),%esp
80101b4b: 5b pop %ebx
80101b4c: 5e pop %esi
80101b4d: 5f pop %edi
80101b4e: 5d pop %ebp
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
return -1;
return devsw[ip->major].write(ip, src, n);
80101b4f: ff e0 jmp *%eax
80101b51: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
log_write(bp);
brelse(bp);
}
if(n > 0 && off > ip->size){
ip->size = off;
80101b58: 8b 45 d8 mov -0x28(%ebp),%eax
iupdate(ip);
80101b5b: 83 ec 0c sub $0xc,%esp
log_write(bp);
brelse(bp);
}
if(n > 0 && off > ip->size){
ip->size = off;
80101b5e: 89 70 58 mov %esi,0x58(%eax)
iupdate(ip);
80101b61: 50 push %eax
80101b62: e8 59 fa ff ff call 801015c0 <iupdate>
80101b67: 83 c4 10 add $0x10,%esp
80101b6a: eb b6 jmp 80101b22 <writei+0xd2>
80101b6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
uint tot, m;
struct buf *bp;
if(ip->type == T_DEV){
if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
return -1;
80101b70: b8 ff ff ff ff mov $0xffffffff,%eax
80101b75: eb ae jmp 80101b25 <writei+0xd5>
80101b77: 89 f6 mov %esi,%esi
80101b79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101b80 <namecmp>:
// Directories
int
namecmp(const char *s, const char *t)
{
80101b80: 55 push %ebp
80101b81: 89 e5 mov %esp,%ebp
80101b83: 83 ec 0c sub $0xc,%esp
return strncmp(s, t, DIRSIZ);
80101b86: 6a 0e push $0xe
80101b88: ff 75 0c pushl 0xc(%ebp)
80101b8b: ff 75 08 pushl 0x8(%ebp)
80101b8e: e8 cd 2f 00 00 call 80104b60 <strncmp>
}
80101b93: c9 leave
80101b94: c3 ret
80101b95: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101b99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101ba0 <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)
{
80101ba0: 55 push %ebp
80101ba1: 89 e5 mov %esp,%ebp
80101ba3: 57 push %edi
80101ba4: 56 push %esi
80101ba5: 53 push %ebx
80101ba6: 83 ec 1c sub $0x1c,%esp
80101ba9: 8b 5d 08 mov 0x8(%ebp),%ebx
uint off, inum;
struct dirent de;
if(dp->type != T_DIR)
80101bac: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80101bb1: 0f 85 80 00 00 00 jne 80101c37 <dirlookup+0x97>
panic("dirlookup not DIR");
for(off = 0; off < dp->size; off += sizeof(de)){
80101bb7: 8b 53 58 mov 0x58(%ebx),%edx
80101bba: 31 ff xor %edi,%edi
80101bbc: 8d 75 d8 lea -0x28(%ebp),%esi
80101bbf: 85 d2 test %edx,%edx
80101bc1: 75 0d jne 80101bd0 <dirlookup+0x30>
80101bc3: eb 5b jmp 80101c20 <dirlookup+0x80>
80101bc5: 8d 76 00 lea 0x0(%esi),%esi
80101bc8: 83 c7 10 add $0x10,%edi
80101bcb: 39 7b 58 cmp %edi,0x58(%ebx)
80101bce: 76 50 jbe 80101c20 <dirlookup+0x80>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101bd0: 6a 10 push $0x10
80101bd2: 57 push %edi
80101bd3: 56 push %esi
80101bd4: 53 push %ebx
80101bd5: e8 76 fd ff ff call 80101950 <readi>
80101bda: 83 c4 10 add $0x10,%esp
80101bdd: 83 f8 10 cmp $0x10,%eax
80101be0: 75 48 jne 80101c2a <dirlookup+0x8a>
panic("dirlookup read");
if(de.inum == 0)
80101be2: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80101be7: 74 df je 80101bc8 <dirlookup+0x28>
// Directories
int
namecmp(const char *s, const char *t)
{
return strncmp(s, t, DIRSIZ);
80101be9: 8d 45 da lea -0x26(%ebp),%eax
80101bec: 83 ec 04 sub $0x4,%esp
80101bef: 6a 0e push $0xe
80101bf1: 50 push %eax
80101bf2: ff 75 0c pushl 0xc(%ebp)
80101bf5: e8 66 2f 00 00 call 80104b60 <strncmp>
for(off = 0; off < dp->size; off += sizeof(de)){
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("dirlookup read");
if(de.inum == 0)
continue;
if(namecmp(name, de.name) == 0){
80101bfa: 83 c4 10 add $0x10,%esp
80101bfd: 85 c0 test %eax,%eax
80101bff: 75 c7 jne 80101bc8 <dirlookup+0x28>
// entry matches path element
if(poff)
80101c01: 8b 45 10 mov 0x10(%ebp),%eax
80101c04: 85 c0 test %eax,%eax
80101c06: 74 05 je 80101c0d <dirlookup+0x6d>
*poff = off;
80101c08: 8b 45 10 mov 0x10(%ebp),%eax
80101c0b: 89 38 mov %edi,(%eax)
inum = de.inum;
return iget(dp->dev, inum);
80101c0d: 0f b7 55 d8 movzwl -0x28(%ebp),%edx
80101c11: 8b 03 mov (%ebx),%eax
80101c13: e8 f8 f5 ff ff call 80101210 <iget>
}
}
return 0;
}
80101c18: 8d 65 f4 lea -0xc(%ebp),%esp
80101c1b: 5b pop %ebx
80101c1c: 5e pop %esi
80101c1d: 5f pop %edi
80101c1e: 5d pop %ebp
80101c1f: c3 ret
80101c20: 8d 65 f4 lea -0xc(%ebp),%esp
inum = de.inum;
return iget(dp->dev, inum);
}
}
return 0;
80101c23: 31 c0 xor %eax,%eax
}
80101c25: 5b pop %ebx
80101c26: 5e pop %esi
80101c27: 5f pop %edi
80101c28: 5d pop %ebp
80101c29: c3 ret
if(dp->type != T_DIR)
panic("dirlookup not DIR");
for(off = 0; off < dp->size; off += sizeof(de)){
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("dirlookup read");
80101c2a: 83 ec 0c sub $0xc,%esp
80101c2d: 68 99 77 10 80 push $0x80107799
80101c32: e8 39 e7 ff ff call 80100370 <panic>
{
uint off, inum;
struct dirent de;
if(dp->type != T_DIR)
panic("dirlookup not DIR");
80101c37: 83 ec 0c sub $0xc,%esp
80101c3a: 68 87 77 10 80 push $0x80107787
80101c3f: e8 2c e7 ff ff call 80100370 <panic>
80101c44: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101c4a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80101c50 <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)
{
80101c50: 55 push %ebp
80101c51: 89 e5 mov %esp,%ebp
80101c53: 57 push %edi
80101c54: 56 push %esi
80101c55: 53 push %ebx
80101c56: 89 cf mov %ecx,%edi
80101c58: 89 c3 mov %eax,%ebx
80101c5a: 83 ec 1c sub $0x1c,%esp
struct inode *ip, *next;
if(*path == '/')
80101c5d: 80 38 2f cmpb $0x2f,(%eax)
// If parent != 0, return the inode for the parent and copy the final
// path element into name, which must have room for DIRSIZ bytes.
// Must be called inside a transaction since it calls iput().
static struct inode*
namex(char *path, int nameiparent, char *name)
{
80101c60: 89 55 e0 mov %edx,-0x20(%ebp)
struct inode *ip, *next;
if(*path == '/')
80101c63: 0f 84 53 01 00 00 je 80101dbc <namex+0x16c>
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(myproc()->cwd);
80101c69: e8 32 1b 00 00 call 801037a0 <myproc>
// Increment reference count for ip.
// Returns ip to enable ip = idup(ip1) idiom.
struct inode*
idup(struct inode *ip)
{
acquire(&icache.lock);
80101c6e: 83 ec 0c sub $0xc,%esp
struct inode *ip, *next;
if(*path == '/')
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(myproc()->cwd);
80101c71: 8b 70 68 mov 0x68(%eax),%esi
// Increment reference count for ip.
// Returns ip to enable ip = idup(ip1) idiom.
struct inode*
idup(struct inode *ip)
{
acquire(&icache.lock);
80101c74: 68 e0 19 11 80 push $0x801119e0
80101c79: e8 42 2c 00 00 call 801048c0 <acquire>
ip->ref++;
80101c7e: 83 46 08 01 addl $0x1,0x8(%esi)
release(&icache.lock);
80101c82: c7 04 24 e0 19 11 80 movl $0x801119e0,(%esp)
80101c89: e8 52 2d 00 00 call 801049e0 <release>
80101c8e: 83 c4 10 add $0x10,%esp
80101c91: eb 08 jmp 80101c9b <namex+0x4b>
80101c93: 90 nop
80101c94: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
{
char *s;
int len;
while(*path == '/')
path++;
80101c98: 83 c3 01 add $0x1,%ebx
skipelem(char *path, char *name)
{
char *s;
int len;
while(*path == '/')
80101c9b: 0f b6 03 movzbl (%ebx),%eax
80101c9e: 3c 2f cmp $0x2f,%al
80101ca0: 74 f6 je 80101c98 <namex+0x48>
path++;
if(*path == 0)
80101ca2: 84 c0 test %al,%al
80101ca4: 0f 84 e3 00 00 00 je 80101d8d <namex+0x13d>
return 0;
s = path;
while(*path != '/' && *path != 0)
80101caa: 0f b6 03 movzbl (%ebx),%eax
80101cad: 89 da mov %ebx,%edx
80101caf: 84 c0 test %al,%al
80101cb1: 0f 84 ac 00 00 00 je 80101d63 <namex+0x113>
80101cb7: 3c 2f cmp $0x2f,%al
80101cb9: 75 09 jne 80101cc4 <namex+0x74>
80101cbb: e9 a3 00 00 00 jmp 80101d63 <namex+0x113>
80101cc0: 84 c0 test %al,%al
80101cc2: 74 0a je 80101cce <namex+0x7e>
path++;
80101cc4: 83 c2 01 add $0x1,%edx
while(*path == '/')
path++;
if(*path == 0)
return 0;
s = path;
while(*path != '/' && *path != 0)
80101cc7: 0f b6 02 movzbl (%edx),%eax
80101cca: 3c 2f cmp $0x2f,%al
80101ccc: 75 f2 jne 80101cc0 <namex+0x70>
80101cce: 89 d1 mov %edx,%ecx
80101cd0: 29 d9 sub %ebx,%ecx
path++;
len = path - s;
if(len >= DIRSIZ)
80101cd2: 83 f9 0d cmp $0xd,%ecx
80101cd5: 0f 8e 8d 00 00 00 jle 80101d68 <namex+0x118>
memmove(name, s, DIRSIZ);
80101cdb: 83 ec 04 sub $0x4,%esp
80101cde: 89 55 e4 mov %edx,-0x1c(%ebp)
80101ce1: 6a 0e push $0xe
80101ce3: 53 push %ebx
80101ce4: 57 push %edi
80101ce5: e8 f6 2d 00 00 call 80104ae0 <memmove>
path++;
if(*path == 0)
return 0;
s = path;
while(*path != '/' && *path != 0)
path++;
80101cea: 8b 55 e4 mov -0x1c(%ebp),%edx
len = path - s;
if(len >= DIRSIZ)
memmove(name, s, DIRSIZ);
80101ced: 83 c4 10 add $0x10,%esp
path++;
if(*path == 0)
return 0;
s = path;
while(*path != '/' && *path != 0)
path++;
80101cf0: 89 d3 mov %edx,%ebx
memmove(name, s, DIRSIZ);
else {
memmove(name, s, len);
name[len] = 0;
}
while(*path == '/')
80101cf2: 80 3a 2f cmpb $0x2f,(%edx)
80101cf5: 75 11 jne 80101d08 <namex+0xb8>
80101cf7: 89 f6 mov %esi,%esi
80101cf9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
path++;
80101d00: 83 c3 01 add $0x1,%ebx
memmove(name, s, DIRSIZ);
else {
memmove(name, s, len);
name[len] = 0;
}
while(*path == '/')
80101d03: 80 3b 2f cmpb $0x2f,(%ebx)
80101d06: 74 f8 je 80101d00 <namex+0xb0>
ip = iget(ROOTDEV, ROOTINO);
else
ip = idup(myproc()->cwd);
while((path = skipelem(path, name)) != 0){
ilock(ip);
80101d08: 83 ec 0c sub $0xc,%esp
80101d0b: 56 push %esi
80101d0c: e8 5f f9 ff ff call 80101670 <ilock>
if(ip->type != T_DIR){
80101d11: 83 c4 10 add $0x10,%esp
80101d14: 66 83 7e 50 01 cmpw $0x1,0x50(%esi)
80101d19: 0f 85 7f 00 00 00 jne 80101d9e <namex+0x14e>
iunlockput(ip);
return 0;
}
if(nameiparent && *path == '\0'){
80101d1f: 8b 55 e0 mov -0x20(%ebp),%edx
80101d22: 85 d2 test %edx,%edx
80101d24: 74 09 je 80101d2f <namex+0xdf>
80101d26: 80 3b 00 cmpb $0x0,(%ebx)
80101d29: 0f 84 a3 00 00 00 je 80101dd2 <namex+0x182>
// Stop one level early.
iunlock(ip);
return ip;
}
if((next = dirlookup(ip, name, 0)) == 0){
80101d2f: 83 ec 04 sub $0x4,%esp
80101d32: 6a 00 push $0x0
80101d34: 57 push %edi
80101d35: 56 push %esi
80101d36: e8 65 fe ff ff call 80101ba0 <dirlookup>
80101d3b: 83 c4 10 add $0x10,%esp
80101d3e: 85 c0 test %eax,%eax
80101d40: 74 5c je 80101d9e <namex+0x14e>
// Common idiom: unlock, then put.
void
iunlockput(struct inode *ip)
{
iunlock(ip);
80101d42: 83 ec 0c sub $0xc,%esp
80101d45: 89 45 e4 mov %eax,-0x1c(%ebp)
80101d48: 56 push %esi
80101d49: e8 02 fa ff ff call 80101750 <iunlock>
iput(ip);
80101d4e: 89 34 24 mov %esi,(%esp)
80101d51: e8 4a fa ff ff call 801017a0 <iput>
80101d56: 8b 45 e4 mov -0x1c(%ebp),%eax
80101d59: 83 c4 10 add $0x10,%esp
80101d5c: 89 c6 mov %eax,%esi
80101d5e: e9 38 ff ff ff jmp 80101c9b <namex+0x4b>
while(*path == '/')
path++;
if(*path == 0)
return 0;
s = path;
while(*path != '/' && *path != 0)
80101d63: 31 c9 xor %ecx,%ecx
80101d65: 8d 76 00 lea 0x0(%esi),%esi
path++;
len = path - s;
if(len >= DIRSIZ)
memmove(name, s, DIRSIZ);
else {
memmove(name, s, len);
80101d68: 83 ec 04 sub $0x4,%esp
80101d6b: 89 55 dc mov %edx,-0x24(%ebp)
80101d6e: 89 4d e4 mov %ecx,-0x1c(%ebp)
80101d71: 51 push %ecx
80101d72: 53 push %ebx
80101d73: 57 push %edi
80101d74: e8 67 2d 00 00 call 80104ae0 <memmove>
name[len] = 0;
80101d79: 8b 4d e4 mov -0x1c(%ebp),%ecx
80101d7c: 8b 55 dc mov -0x24(%ebp),%edx
80101d7f: 83 c4 10 add $0x10,%esp
80101d82: c6 04 0f 00 movb $0x0,(%edi,%ecx,1)
80101d86: 89 d3 mov %edx,%ebx
80101d88: e9 65 ff ff ff jmp 80101cf2 <namex+0xa2>
return 0;
}
iunlockput(ip);
ip = next;
}
if(nameiparent){
80101d8d: 8b 45 e0 mov -0x20(%ebp),%eax
80101d90: 85 c0 test %eax,%eax
80101d92: 75 54 jne 80101de8 <namex+0x198>
80101d94: 89 f0 mov %esi,%eax
iput(ip);
return 0;
}
return ip;
}
80101d96: 8d 65 f4 lea -0xc(%ebp),%esp
80101d99: 5b pop %ebx
80101d9a: 5e pop %esi
80101d9b: 5f pop %edi
80101d9c: 5d pop %ebp
80101d9d: c3 ret
// Common idiom: unlock, then put.
void
iunlockput(struct inode *ip)
{
iunlock(ip);
80101d9e: 83 ec 0c sub $0xc,%esp
80101da1: 56 push %esi
80101da2: e8 a9 f9 ff ff call 80101750 <iunlock>
iput(ip);
80101da7: 89 34 24 mov %esi,(%esp)
80101daa: e8 f1 f9 ff ff call 801017a0 <iput>
iunlock(ip);
return ip;
}
if((next = dirlookup(ip, name, 0)) == 0){
iunlockput(ip);
return 0;
80101daf: 83 c4 10 add $0x10,%esp
if(nameiparent){
iput(ip);
return 0;
}
return ip;
}
80101db2: 8d 65 f4 lea -0xc(%ebp),%esp
iunlock(ip);
return ip;
}
if((next = dirlookup(ip, name, 0)) == 0){
iunlockput(ip);
return 0;
80101db5: 31 c0 xor %eax,%eax
if(nameiparent){
iput(ip);
return 0;
}
return ip;
}
80101db7: 5b pop %ebx
80101db8: 5e pop %esi
80101db9: 5f pop %edi
80101dba: 5d pop %ebp
80101dbb: c3 ret
namex(char *path, int nameiparent, char *name)
{
struct inode *ip, *next;
if(*path == '/')
ip = iget(ROOTDEV, ROOTINO);
80101dbc: ba 01 00 00 00 mov $0x1,%edx
80101dc1: b8 01 00 00 00 mov $0x1,%eax
80101dc6: e8 45 f4 ff ff call 80101210 <iget>
80101dcb: 89 c6 mov %eax,%esi
80101dcd: e9 c9 fe ff ff jmp 80101c9b <namex+0x4b>
iunlockput(ip);
return 0;
}
if(nameiparent && *path == '\0'){
// Stop one level early.
iunlock(ip);
80101dd2: 83 ec 0c sub $0xc,%esp
80101dd5: 56 push %esi
80101dd6: e8 75 f9 ff ff call 80101750 <iunlock>
return ip;
80101ddb: 83 c4 10 add $0x10,%esp
if(nameiparent){
iput(ip);
return 0;
}
return ip;
}
80101dde: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
}
if(nameiparent && *path == '\0'){
// Stop one level early.
iunlock(ip);
return ip;
80101de1: 89 f0 mov %esi,%eax
if(nameiparent){
iput(ip);
return 0;
}
return ip;
}
80101de3: 5b pop %ebx
80101de4: 5e pop %esi
80101de5: 5f pop %edi
80101de6: 5d pop %ebp
80101de7: c3 ret
}
iunlockput(ip);
ip = next;
}
if(nameiparent){
iput(ip);
80101de8: 83 ec 0c sub $0xc,%esp
80101deb: 56 push %esi
80101dec: e8 af f9 ff ff call 801017a0 <iput>
return 0;
80101df1: 83 c4 10 add $0x10,%esp
80101df4: 31 c0 xor %eax,%eax
80101df6: eb 9e jmp 80101d96 <namex+0x146>
80101df8: 90 nop
80101df9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101e00 <dirlink>:
}
// Write a new directory entry (name, inum) into the directory dp.
int
dirlink(struct inode *dp, char *name, uint inum)
{
80101e00: 55 push %ebp
80101e01: 89 e5 mov %esp,%ebp
80101e03: 57 push %edi
80101e04: 56 push %esi
80101e05: 53 push %ebx
80101e06: 83 ec 20 sub $0x20,%esp
80101e09: 8b 5d 08 mov 0x8(%ebp),%ebx
int off;
struct dirent de;
struct inode *ip;
// Check that name is not present.
if((ip = dirlookup(dp, name, 0)) != 0){
80101e0c: 6a 00 push $0x0
80101e0e: ff 75 0c pushl 0xc(%ebp)
80101e11: 53 push %ebx
80101e12: e8 89 fd ff ff call 80101ba0 <dirlookup>
80101e17: 83 c4 10 add $0x10,%esp
80101e1a: 85 c0 test %eax,%eax
80101e1c: 75 67 jne 80101e85 <dirlink+0x85>
iput(ip);
return -1;
}
// Look for an empty dirent.
for(off = 0; off < dp->size; off += sizeof(de)){
80101e1e: 8b 7b 58 mov 0x58(%ebx),%edi
80101e21: 8d 75 d8 lea -0x28(%ebp),%esi
80101e24: 85 ff test %edi,%edi
80101e26: 74 29 je 80101e51 <dirlink+0x51>
80101e28: 31 ff xor %edi,%edi
80101e2a: 8d 75 d8 lea -0x28(%ebp),%esi
80101e2d: eb 09 jmp 80101e38 <dirlink+0x38>
80101e2f: 90 nop
80101e30: 83 c7 10 add $0x10,%edi
80101e33: 39 7b 58 cmp %edi,0x58(%ebx)
80101e36: 76 19 jbe 80101e51 <dirlink+0x51>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101e38: 6a 10 push $0x10
80101e3a: 57 push %edi
80101e3b: 56 push %esi
80101e3c: 53 push %ebx
80101e3d: e8 0e fb ff ff call 80101950 <readi>
80101e42: 83 c4 10 add $0x10,%esp
80101e45: 83 f8 10 cmp $0x10,%eax
80101e48: 75 4e jne 80101e98 <dirlink+0x98>
panic("dirlink read");
if(de.inum == 0)
80101e4a: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80101e4f: 75 df jne 80101e30 <dirlink+0x30>
break;
}
strncpy(de.name, name, DIRSIZ);
80101e51: 8d 45 da lea -0x26(%ebp),%eax
80101e54: 83 ec 04 sub $0x4,%esp
80101e57: 6a 0e push $0xe
80101e59: ff 75 0c pushl 0xc(%ebp)
80101e5c: 50 push %eax
80101e5d: e8 6e 2d 00 00 call 80104bd0 <strncpy>
de.inum = inum;
80101e62: 8b 45 10 mov 0x10(%ebp),%eax
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101e65: 6a 10 push $0x10
80101e67: 57 push %edi
80101e68: 56 push %esi
80101e69: 53 push %ebx
if(de.inum == 0)
break;
}
strncpy(de.name, name, DIRSIZ);
de.inum = inum;
80101e6a: 66 89 45 d8 mov %ax,-0x28(%ebp)
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
80101e6e: e8 dd fb ff ff call 80101a50 <writei>
80101e73: 83 c4 20 add $0x20,%esp
80101e76: 83 f8 10 cmp $0x10,%eax
80101e79: 75 2a jne 80101ea5 <dirlink+0xa5>
panic("dirlink");
return 0;
80101e7b: 31 c0 xor %eax,%eax
}
80101e7d: 8d 65 f4 lea -0xc(%ebp),%esp
80101e80: 5b pop %ebx
80101e81: 5e pop %esi
80101e82: 5f pop %edi
80101e83: 5d pop %ebp
80101e84: c3 ret
struct dirent de;
struct inode *ip;
// Check that name is not present.
if((ip = dirlookup(dp, name, 0)) != 0){
iput(ip);
80101e85: 83 ec 0c sub $0xc,%esp
80101e88: 50 push %eax
80101e89: e8 12 f9 ff ff call 801017a0 <iput>
return -1;
80101e8e: 83 c4 10 add $0x10,%esp
80101e91: b8 ff ff ff ff mov $0xffffffff,%eax
80101e96: eb e5 jmp 80101e7d <dirlink+0x7d>
}
// Look for an empty dirent.
for(off = 0; off < dp->size; off += sizeof(de)){
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("dirlink read");
80101e98: 83 ec 0c sub $0xc,%esp
80101e9b: 68 a8 77 10 80 push $0x801077a8
80101ea0: e8 cb e4 ff ff call 80100370 <panic>
}
strncpy(de.name, name, DIRSIZ);
de.inum = inum;
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("dirlink");
80101ea5: 83 ec 0c sub $0xc,%esp
80101ea8: 68 12 7e 10 80 push $0x80107e12
80101ead: e8 be e4 ff ff call 80100370 <panic>
80101eb2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80101eb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101ec0 <namei>:
return ip;
}
struct inode*
namei(char *path)
{
80101ec0: 55 push %ebp
char name[DIRSIZ];
return namex(path, 0, name);
80101ec1: 31 d2 xor %edx,%edx
return ip;
}
struct inode*
namei(char *path)
{
80101ec3: 89 e5 mov %esp,%ebp
80101ec5: 83 ec 18 sub $0x18,%esp
char name[DIRSIZ];
return namex(path, 0, name);
80101ec8: 8b 45 08 mov 0x8(%ebp),%eax
80101ecb: 8d 4d ea lea -0x16(%ebp),%ecx
80101ece: e8 7d fd ff ff call 80101c50 <namex>
}
80101ed3: c9 leave
80101ed4: c3 ret
80101ed5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101ed9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101ee0 <nameiparent>:
struct inode*
nameiparent(char *path, char *name)
{
80101ee0: 55 push %ebp
return namex(path, 1, name);
80101ee1: ba 01 00 00 00 mov $0x1,%edx
return namex(path, 0, name);
}
struct inode*
nameiparent(char *path, char *name)
{
80101ee6: 89 e5 mov %esp,%ebp
return namex(path, 1, name);
80101ee8: 8b 4d 0c mov 0xc(%ebp),%ecx
80101eeb: 8b 45 08 mov 0x8(%ebp),%eax
}
80101eee: 5d pop %ebp
}
struct inode*
nameiparent(char *path, char *name)
{
return namex(path, 1, name);
80101eef: e9 5c fd ff ff jmp 80101c50 <namex>
80101ef4: 66 90 xchg %ax,%ax
80101ef6: 66 90 xchg %ax,%ax
80101ef8: 66 90 xchg %ax,%ax
80101efa: 66 90 xchg %ax,%ax
80101efc: 66 90 xchg %ax,%ax
80101efe: 66 90 xchg %ax,%ax
80101f00 <idestart>:
}
// Start the request for b. Caller must hold idelock.
static void
idestart(struct buf *b)
{
80101f00: 55 push %ebp
if(b == 0)
80101f01: 85 c0 test %eax,%eax
}
// Start the request for b. Caller must hold idelock.
static void
idestart(struct buf *b)
{
80101f03: 89 e5 mov %esp,%ebp
80101f05: 56 push %esi
80101f06: 53 push %ebx
if(b == 0)
80101f07: 0f 84 ad 00 00 00 je 80101fba <idestart+0xba>
panic("idestart");
if(b->blockno >= FSSIZE)
80101f0d: 8b 58 08 mov 0x8(%eax),%ebx
80101f10: 89 c1 mov %eax,%ecx
80101f12: 81 fb e7 03 00 00 cmp $0x3e7,%ebx
80101f18: 0f 87 8f 00 00 00 ja 80101fad <idestart+0xad>
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80101f1e: ba f7 01 00 00 mov $0x1f7,%edx
80101f23: 90 nop
80101f24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80101f28: ec in (%dx),%al
static int
idewait(int checkerr)
{
int r;
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
80101f29: 83 e0 c0 and $0xffffffc0,%eax
80101f2c: 3c 40 cmp $0x40,%al
80101f2e: 75 f8 jne 80101f28 <idestart+0x28>
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80101f30: 31 f6 xor %esi,%esi
80101f32: ba f6 03 00 00 mov $0x3f6,%edx
80101f37: 89 f0 mov %esi,%eax
80101f39: ee out %al,(%dx)
80101f3a: ba f2 01 00 00 mov $0x1f2,%edx
80101f3f: b8 01 00 00 00 mov $0x1,%eax
80101f44: ee out %al,(%dx)
80101f45: ba f3 01 00 00 mov $0x1f3,%edx
80101f4a: 89 d8 mov %ebx,%eax
80101f4c: ee out %al,(%dx)
80101f4d: 89 d8 mov %ebx,%eax
80101f4f: ba f4 01 00 00 mov $0x1f4,%edx
80101f54: c1 f8 08 sar $0x8,%eax
80101f57: ee out %al,(%dx)
80101f58: ba f5 01 00 00 mov $0x1f5,%edx
80101f5d: 89 f0 mov %esi,%eax
80101f5f: ee out %al,(%dx)
80101f60: 0f b6 41 04 movzbl 0x4(%ecx),%eax
80101f64: ba f6 01 00 00 mov $0x1f6,%edx
80101f69: 83 e0 01 and $0x1,%eax
80101f6c: c1 e0 04 shl $0x4,%eax
80101f6f: 83 c8 e0 or $0xffffffe0,%eax
80101f72: ee out %al,(%dx)
outb(0x1f2, sector_per_block); // number of sectors
outb(0x1f3, sector & 0xff);
outb(0x1f4, (sector >> 8) & 0xff);
outb(0x1f5, (sector >> 16) & 0xff);
outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f));
if(b->flags & B_DIRTY){
80101f73: f6 01 04 testb $0x4,(%ecx)
80101f76: ba f7 01 00 00 mov $0x1f7,%edx
80101f7b: 75 13 jne 80101f90 <idestart+0x90>
80101f7d: b8 20 00 00 00 mov $0x20,%eax
80101f82: ee out %al,(%dx)
outb(0x1f7, write_cmd);
outsl(0x1f0, b->data, BSIZE/4);
} else {
outb(0x1f7, read_cmd);
}
}
80101f83: 8d 65 f8 lea -0x8(%ebp),%esp
80101f86: 5b pop %ebx
80101f87: 5e pop %esi
80101f88: 5d pop %ebp
80101f89: c3 ret
80101f8a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80101f90: b8 30 00 00 00 mov $0x30,%eax
80101f95: ee out %al,(%dx)
}
static inline void
outsl(int port, const void *addr, int cnt)
{
asm volatile("cld; rep outsl" :
80101f96: ba f0 01 00 00 mov $0x1f0,%edx
outb(0x1f4, (sector >> 8) & 0xff);
outb(0x1f5, (sector >> 16) & 0xff);
outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f));
if(b->flags & B_DIRTY){
outb(0x1f7, write_cmd);
outsl(0x1f0, b->data, BSIZE/4);
80101f9b: 8d 71 5c lea 0x5c(%ecx),%esi
80101f9e: b9 80 00 00 00 mov $0x80,%ecx
80101fa3: fc cld
80101fa4: f3 6f rep outsl %ds:(%esi),(%dx)
} else {
outb(0x1f7, read_cmd);
}
}
80101fa6: 8d 65 f8 lea -0x8(%ebp),%esp
80101fa9: 5b pop %ebx
80101faa: 5e pop %esi
80101fab: 5d pop %ebp
80101fac: c3 ret
idestart(struct buf *b)
{
if(b == 0)
panic("idestart");
if(b->blockno >= FSSIZE)
panic("incorrect blockno");
80101fad: 83 ec 0c sub $0xc,%esp
80101fb0: 68 14 78 10 80 push $0x80107814
80101fb5: e8 b6 e3 ff ff call 80100370 <panic>
// Start the request for b. Caller must hold idelock.
static void
idestart(struct buf *b)
{
if(b == 0)
panic("idestart");
80101fba: 83 ec 0c sub $0xc,%esp
80101fbd: 68 0b 78 10 80 push $0x8010780b
80101fc2: e8 a9 e3 ff ff call 80100370 <panic>
80101fc7: 89 f6 mov %esi,%esi
80101fc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80101fd0 <ideinit>:
return 0;
}
void
ideinit(void)
{
80101fd0: 55 push %ebp
80101fd1: 89 e5 mov %esp,%ebp
80101fd3: 83 ec 10 sub $0x10,%esp
int i;
initlock(&idelock, "ide");
80101fd6: 68 26 78 10 80 push $0x80107826
80101fdb: 68 80 b5 10 80 push $0x8010b580
80101fe0: e8 db 27 00 00 call 801047c0 <initlock>
ioapicenable(IRQ_IDE, ncpu - 1);
80101fe5: 58 pop %eax
80101fe6: a1 00 3d 11 80 mov 0x80113d00,%eax
80101feb: 5a pop %edx
80101fec: 83 e8 01 sub $0x1,%eax
80101fef: 50 push %eax
80101ff0: 6a 0e push $0xe
80101ff2: e8 a9 02 00 00 call 801022a0 <ioapicenable>
80101ff7: 83 c4 10 add $0x10,%esp
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80101ffa: ba f7 01 00 00 mov $0x1f7,%edx
80101fff: 90 nop
80102000: ec in (%dx),%al
static int
idewait(int checkerr)
{
int r;
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
80102001: 83 e0 c0 and $0xffffffc0,%eax
80102004: 3c 40 cmp $0x40,%al
80102006: 75 f8 jne 80102000 <ideinit+0x30>
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102008: ba f6 01 00 00 mov $0x1f6,%edx
8010200d: b8 f0 ff ff ff mov $0xfffffff0,%eax
80102012: ee out %al,(%dx)
80102013: b9 e8 03 00 00 mov $0x3e8,%ecx
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102018: ba f7 01 00 00 mov $0x1f7,%edx
8010201d: eb 06 jmp 80102025 <ideinit+0x55>
8010201f: 90 nop
ioapicenable(IRQ_IDE, ncpu - 1);
idewait(0);
// Check if disk 1 is present
outb(0x1f6, 0xe0 | (1<<4));
for(i=0; i<1000; i++){
80102020: 83 e9 01 sub $0x1,%ecx
80102023: 74 0f je 80102034 <ideinit+0x64>
80102025: ec in (%dx),%al
if(inb(0x1f7) != 0){
80102026: 84 c0 test %al,%al
80102028: 74 f6 je 80102020 <ideinit+0x50>
havedisk1 = 1;
8010202a: c7 05 60 b5 10 80 01 movl $0x1,0x8010b560
80102031: 00 00 00
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102034: ba f6 01 00 00 mov $0x1f6,%edx
80102039: b8 e0 ff ff ff mov $0xffffffe0,%eax
8010203e: ee out %al,(%dx)
}
}
// Switch back to disk 0.
outb(0x1f6, 0xe0 | (0<<4));
}
8010203f: c9 leave
80102040: c3 ret
80102041: eb 0d jmp 80102050 <ideintr>
80102043: 90 nop
80102044: 90 nop
80102045: 90 nop
80102046: 90 nop
80102047: 90 nop
80102048: 90 nop
80102049: 90 nop
8010204a: 90 nop
8010204b: 90 nop
8010204c: 90 nop
8010204d: 90 nop
8010204e: 90 nop
8010204f: 90 nop
80102050 <ideintr>:
}
// Interrupt handler.
void
ideintr(void)
{
80102050: 55 push %ebp
80102051: 89 e5 mov %esp,%ebp
80102053: 57 push %edi
80102054: 56 push %esi
80102055: 53 push %ebx
80102056: 83 ec 18 sub $0x18,%esp
struct buf *b;
// First queued buffer is the active request.
acquire(&idelock);
80102059: 68 80 b5 10 80 push $0x8010b580
8010205e: e8 5d 28 00 00 call 801048c0 <acquire>
if((b = idequeue) == 0){
80102063: 8b 1d 64 b5 10 80 mov 0x8010b564,%ebx
80102069: 83 c4 10 add $0x10,%esp
8010206c: 85 db test %ebx,%ebx
8010206e: 74 34 je 801020a4 <ideintr+0x54>
release(&idelock);
return;
}
idequeue = b->qnext;
80102070: 8b 43 58 mov 0x58(%ebx),%eax
80102073: a3 64 b5 10 80 mov %eax,0x8010b564
// Read data if needed.
if(!(b->flags & B_DIRTY) && idewait(1) >= 0)
80102078: 8b 33 mov (%ebx),%esi
8010207a: f7 c6 04 00 00 00 test $0x4,%esi
80102080: 74 3e je 801020c0 <ideintr+0x70>
insl(0x1f0, b->data, BSIZE/4);
// Wake process waiting for this buf.
b->flags |= B_VALID;
b->flags &= ~B_DIRTY;
80102082: 83 e6 fb and $0xfffffffb,%esi
wakeup(b);
80102085: 83 ec 0c sub $0xc,%esp
if(!(b->flags & B_DIRTY) && idewait(1) >= 0)
insl(0x1f0, b->data, BSIZE/4);
// Wake process waiting for this buf.
b->flags |= B_VALID;
b->flags &= ~B_DIRTY;
80102088: 83 ce 02 or $0x2,%esi
8010208b: 89 33 mov %esi,(%ebx)
wakeup(b);
8010208d: 53 push %ebx
8010208e: e8 9d 1f 00 00 call 80104030 <wakeup>
// Start disk on next buf in queue.
if(idequeue != 0)
80102093: a1 64 b5 10 80 mov 0x8010b564,%eax
80102098: 83 c4 10 add $0x10,%esp
8010209b: 85 c0 test %eax,%eax
8010209d: 74 05 je 801020a4 <ideintr+0x54>
idestart(idequeue);
8010209f: e8 5c fe ff ff call 80101f00 <idestart>
// First queued buffer is the active request.
acquire(&idelock);
if((b = idequeue) == 0){
release(&idelock);
801020a4: 83 ec 0c sub $0xc,%esp
801020a7: 68 80 b5 10 80 push $0x8010b580
801020ac: e8 2f 29 00 00 call 801049e0 <release>
// Start disk on next buf in queue.
if(idequeue != 0)
idestart(idequeue);
release(&idelock);
}
801020b1: 8d 65 f4 lea -0xc(%ebp),%esp
801020b4: 5b pop %ebx
801020b5: 5e pop %esi
801020b6: 5f pop %edi
801020b7: 5d pop %ebp
801020b8: c3 ret
801020b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801020c0: ba f7 01 00 00 mov $0x1f7,%edx
801020c5: 8d 76 00 lea 0x0(%esi),%esi
801020c8: ec in (%dx),%al
static int
idewait(int checkerr)
{
int r;
while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY)
801020c9: 89 c1 mov %eax,%ecx
801020cb: 83 e1 c0 and $0xffffffc0,%ecx
801020ce: 80 f9 40 cmp $0x40,%cl
801020d1: 75 f5 jne 801020c8 <ideintr+0x78>
;
if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0)
801020d3: a8 21 test $0x21,%al
801020d5: 75 ab jne 80102082 <ideintr+0x32>
}
idequeue = b->qnext;
// Read data if needed.
if(!(b->flags & B_DIRTY) && idewait(1) >= 0)
insl(0x1f0, b->data, BSIZE/4);
801020d7: 8d 7b 5c lea 0x5c(%ebx),%edi
}
static inline void
insl(int port, void *addr, int cnt)
{
asm volatile("cld; rep insl" :
801020da: b9 80 00 00 00 mov $0x80,%ecx
801020df: ba f0 01 00 00 mov $0x1f0,%edx
801020e4: fc cld
801020e5: f3 6d rep insl (%dx),%es:(%edi)
801020e7: 8b 33 mov (%ebx),%esi
801020e9: eb 97 jmp 80102082 <ideintr+0x32>
801020eb: 90 nop
801020ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801020f0 <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)
{
801020f0: 55 push %ebp
801020f1: 89 e5 mov %esp,%ebp
801020f3: 53 push %ebx
801020f4: 83 ec 10 sub $0x10,%esp
801020f7: 8b 5d 08 mov 0x8(%ebp),%ebx
struct buf **pp;
if(!holdingsleep(&b->lock))
801020fa: 8d 43 0c lea 0xc(%ebx),%eax
801020fd: 50 push %eax
801020fe: e8 8d 26 00 00 call 80104790 <holdingsleep>
80102103: 83 c4 10 add $0x10,%esp
80102106: 85 c0 test %eax,%eax
80102108: 0f 84 ad 00 00 00 je 801021bb <iderw+0xcb>
panic("iderw: buf not locked");
if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
8010210e: 8b 03 mov (%ebx),%eax
80102110: 83 e0 06 and $0x6,%eax
80102113: 83 f8 02 cmp $0x2,%eax
80102116: 0f 84 b9 00 00 00 je 801021d5 <iderw+0xe5>
panic("iderw: nothing to do");
if(b->dev != 0 && !havedisk1)
8010211c: 8b 53 04 mov 0x4(%ebx),%edx
8010211f: 85 d2 test %edx,%edx
80102121: 74 0d je 80102130 <iderw+0x40>
80102123: a1 60 b5 10 80 mov 0x8010b560,%eax
80102128: 85 c0 test %eax,%eax
8010212a: 0f 84 98 00 00 00 je 801021c8 <iderw+0xd8>
panic("iderw: ide disk 1 not present");
acquire(&idelock); //DOC:acquire-lock
80102130: 83 ec 0c sub $0xc,%esp
80102133: 68 80 b5 10 80 push $0x8010b580
80102138: e8 83 27 00 00 call 801048c0 <acquire>
// Append b to idequeue.
b->qnext = 0;
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
8010213d: 8b 15 64 b5 10 80 mov 0x8010b564,%edx
80102143: 83 c4 10 add $0x10,%esp
panic("iderw: ide disk 1 not present");
acquire(&idelock); //DOC:acquire-lock
// Append b to idequeue.
b->qnext = 0;
80102146: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
8010214d: 85 d2 test %edx,%edx
8010214f: 75 09 jne 8010215a <iderw+0x6a>
80102151: eb 58 jmp 801021ab <iderw+0xbb>
80102153: 90 nop
80102154: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102158: 89 c2 mov %eax,%edx
8010215a: 8b 42 58 mov 0x58(%edx),%eax
8010215d: 85 c0 test %eax,%eax
8010215f: 75 f7 jne 80102158 <iderw+0x68>
80102161: 83 c2 58 add $0x58,%edx
;
*pp = b;
80102164: 89 1a mov %ebx,(%edx)
// Start disk if necessary.
if(idequeue == b)
80102166: 3b 1d 64 b5 10 80 cmp 0x8010b564,%ebx
8010216c: 74 44 je 801021b2 <iderw+0xc2>
idestart(b);
// Wait for request to finish.
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
8010216e: 8b 03 mov (%ebx),%eax
80102170: 83 e0 06 and $0x6,%eax
80102173: 83 f8 02 cmp $0x2,%eax
80102176: 74 23 je 8010219b <iderw+0xab>
80102178: 90 nop
80102179: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
sleep(b, &idelock);
80102180: 83 ec 08 sub $0x8,%esp
80102183: 68 80 b5 10 80 push $0x8010b580
80102188: 53 push %ebx
80102189: e8 e2 1c 00 00 call 80103e70 <sleep>
// Start disk if necessary.
if(idequeue == b)
idestart(b);
// Wait for request to finish.
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
8010218e: 8b 03 mov (%ebx),%eax
80102190: 83 c4 10 add $0x10,%esp
80102193: 83 e0 06 and $0x6,%eax
80102196: 83 f8 02 cmp $0x2,%eax
80102199: 75 e5 jne 80102180 <iderw+0x90>
sleep(b, &idelock);
}
release(&idelock);
8010219b: c7 45 08 80 b5 10 80 movl $0x8010b580,0x8(%ebp)
}
801021a2: 8b 5d fc mov -0x4(%ebp),%ebx
801021a5: c9 leave
while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){
sleep(b, &idelock);
}
release(&idelock);
801021a6: e9 35 28 00 00 jmp 801049e0 <release>
acquire(&idelock); //DOC:acquire-lock
// Append b to idequeue.
b->qnext = 0;
for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue
801021ab: ba 64 b5 10 80 mov $0x8010b564,%edx
801021b0: eb b2 jmp 80102164 <iderw+0x74>
;
*pp = b;
// Start disk if necessary.
if(idequeue == b)
idestart(b);
801021b2: 89 d8 mov %ebx,%eax
801021b4: e8 47 fd ff ff call 80101f00 <idestart>
801021b9: eb b3 jmp 8010216e <iderw+0x7e>
iderw(struct buf *b)
{
struct buf **pp;
if(!holdingsleep(&b->lock))
panic("iderw: buf not locked");
801021bb: 83 ec 0c sub $0xc,%esp
801021be: 68 2a 78 10 80 push $0x8010782a
801021c3: e8 a8 e1 ff ff call 80100370 <panic>
if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
panic("iderw: nothing to do");
if(b->dev != 0 && !havedisk1)
panic("iderw: ide disk 1 not present");
801021c8: 83 ec 0c sub $0xc,%esp
801021cb: 68 55 78 10 80 push $0x80107855
801021d0: e8 9b e1 ff ff call 80100370 <panic>
struct buf **pp;
if(!holdingsleep(&b->lock))
panic("iderw: buf not locked");
if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
panic("iderw: nothing to do");
801021d5: 83 ec 0c sub $0xc,%esp
801021d8: 68 40 78 10 80 push $0x80107840
801021dd: e8 8e e1 ff ff call 80100370 <panic>
801021e2: 66 90 xchg %ax,%ax
801021e4: 66 90 xchg %ax,%ax
801021e6: 66 90 xchg %ax,%ax
801021e8: 66 90 xchg %ax,%ax
801021ea: 66 90 xchg %ax,%ax
801021ec: 66 90 xchg %ax,%ax
801021ee: 66 90 xchg %ax,%ax
801021f0 <ioapicinit>:
ioapic->data = data;
}
void
ioapicinit(void)
{
801021f0: 55 push %ebp
int i, id, maxintr;
ioapic = (volatile struct ioapic*)IOAPIC;
801021f1: c7 05 34 36 11 80 00 movl $0xfec00000,0x80113634
801021f8: 00 c0 fe
ioapic->data = data;
}
void
ioapicinit(void)
{
801021fb: 89 e5 mov %esp,%ebp
801021fd: 56 push %esi
801021fe: 53 push %ebx
};
static uint
ioapicread(int reg)
{
ioapic->reg = reg;
801021ff: c7 05 00 00 c0 fe 01 movl $0x1,0xfec00000
80102206: 00 00 00
return ioapic->data;
80102209: 8b 15 34 36 11 80 mov 0x80113634,%edx
8010220f: 8b 72 10 mov 0x10(%edx),%esi
};
static uint
ioapicread(int reg)
{
ioapic->reg = reg;
80102212: c7 02 00 00 00 00 movl $0x0,(%edx)
return ioapic->data;
80102218: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
int i, id, maxintr;
ioapic = (volatile struct ioapic*)IOAPIC;
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
id = ioapicread(REG_ID) >> 24;
if(id != ioapicid)
8010221e: 0f b6 15 60 37 11 80 movzbl 0x80113760,%edx
ioapicinit(void)
{
int i, id, maxintr;
ioapic = (volatile struct ioapic*)IOAPIC;
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
80102225: 89 f0 mov %esi,%eax
80102227: c1 e8 10 shr $0x10,%eax
8010222a: 0f b6 f0 movzbl %al,%esi
static uint
ioapicread(int reg)
{
ioapic->reg = reg;
return ioapic->data;
8010222d: 8b 41 10 mov 0x10(%ecx),%eax
int i, id, maxintr;
ioapic = (volatile struct ioapic*)IOAPIC;
maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;
id = ioapicread(REG_ID) >> 24;
if(id != ioapicid)
80102230: c1 e8 18 shr $0x18,%eax
80102233: 39 d0 cmp %edx,%eax
80102235: 74 16 je 8010224d <ioapicinit+0x5d>
cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n");
80102237: 83 ec 0c sub $0xc,%esp
8010223a: 68 74 78 10 80 push $0x80107874
8010223f: e8 1c e4 ff ff call 80100660 <cprintf>
80102244: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
8010224a: 83 c4 10 add $0x10,%esp
8010224d: 83 c6 21 add $0x21,%esi
ioapic->data = data;
}
void
ioapicinit(void)
{
80102250: ba 10 00 00 00 mov $0x10,%edx
80102255: b8 20 00 00 00 mov $0x20,%eax
8010225a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
}
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
80102260: 89 11 mov %edx,(%ecx)
ioapic->data = data;
80102262: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n");
// Mark all interrupts edge-triggered, active high, disabled,
// and not routed to any CPUs.
for(i = 0; i <= maxintr; i++){
ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i));
80102268: 89 c3 mov %eax,%ebx
8010226a: 81 cb 00 00 01 00 or $0x10000,%ebx
80102270: 83 c0 01 add $0x1,%eax
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
ioapic->data = data;
80102273: 89 59 10 mov %ebx,0x10(%ecx)
80102276: 8d 5a 01 lea 0x1(%edx),%ebx
80102279: 83 c2 02 add $0x2,%edx
if(id != ioapicid)
cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n");
// Mark all interrupts edge-triggered, active high, disabled,
// and not routed to any CPUs.
for(i = 0; i <= maxintr; i++){
8010227c: 39 f0 cmp %esi,%eax
}
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
8010227e: 89 19 mov %ebx,(%ecx)
ioapic->data = data;
80102280: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
80102286: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx)
if(id != ioapicid)
cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n");
// Mark all interrupts edge-triggered, active high, disabled,
// and not routed to any CPUs.
for(i = 0; i <= maxintr; i++){
8010228d: 75 d1 jne 80102260 <ioapicinit+0x70>
ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i));
ioapicwrite(REG_TABLE+2*i+1, 0);
}
}
8010228f: 8d 65 f8 lea -0x8(%ebp),%esp
80102292: 5b pop %ebx
80102293: 5e pop %esi
80102294: 5d pop %ebp
80102295: c3 ret
80102296: 8d 76 00 lea 0x0(%esi),%esi
80102299: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801022a0 <ioapicenable>:
void
ioapicenable(int irq, int cpunum)
{
801022a0: 55 push %ebp
}
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
801022a1: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
}
}
void
ioapicenable(int irq, int cpunum)
{
801022a7: 89 e5 mov %esp,%ebp
801022a9: 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);
801022ac: 8d 50 20 lea 0x20(%eax),%edx
801022af: 8d 44 00 10 lea 0x10(%eax,%eax,1),%eax
}
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
801022b3: 89 01 mov %eax,(%ecx)
ioapic->data = data;
801022b5: 8b 0d 34 36 11 80 mov 0x80113634,%ecx
}
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
801022bb: 83 c0 01 add $0x1,%eax
ioapic->data = data;
801022be: 89 51 10 mov %edx,0x10(%ecx)
{
// 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);
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
801022c1: 8b 55 0c mov 0xc(%ebp),%edx
}
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
801022c4: 89 01 mov %eax,(%ecx)
ioapic->data = data;
801022c6: a1 34 36 11 80 mov 0x80113634,%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);
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
801022cb: c1 e2 18 shl $0x18,%edx
static void
ioapicwrite(int reg, uint data)
{
ioapic->reg = reg;
ioapic->data = data;
801022ce: 89 50 10 mov %edx,0x10(%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);
ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24);
}
801022d1: 5d pop %ebp
801022d2: c3 ret
801022d3: 66 90 xchg %ax,%ax
801022d5: 66 90 xchg %ax,%ax
801022d7: 66 90 xchg %ax,%ax
801022d9: 66 90 xchg %ax,%ax
801022db: 66 90 xchg %ax,%ax
801022dd: 66 90 xchg %ax,%ax
801022df: 90 nop
801022e0 <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)
{
801022e0: 55 push %ebp
801022e1: 89 e5 mov %esp,%ebp
801022e3: 53 push %ebx
801022e4: 83 ec 04 sub $0x4,%esp
801022e7: 8b 5d 08 mov 0x8(%ebp),%ebx
struct run *r;
if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP)
801022ea: f7 c3 ff 0f 00 00 test $0xfff,%ebx
801022f0: 75 70 jne 80102362 <kfree+0x82>
801022f2: 81 fb a8 67 11 80 cmp $0x801167a8,%ebx
801022f8: 72 68 jb 80102362 <kfree+0x82>
801022fa: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
80102300: 3d ff ff ff 0d cmp $0xdffffff,%eax
80102305: 77 5b ja 80102362 <kfree+0x82>
panic("kfree");
// Fill with junk to catch dangling refs.
memset(v, 1, PGSIZE);
80102307: 83 ec 04 sub $0x4,%esp
8010230a: 68 00 10 00 00 push $0x1000
8010230f: 6a 01 push $0x1
80102311: 53 push %ebx
80102312: e8 19 27 00 00 call 80104a30 <memset>
if(kmem.use_lock)
80102317: 8b 15 74 36 11 80 mov 0x80113674,%edx
8010231d: 83 c4 10 add $0x10,%esp
80102320: 85 d2 test %edx,%edx
80102322: 75 2c jne 80102350 <kfree+0x70>
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
80102324: a1 78 36 11 80 mov 0x80113678,%eax
80102329: 89 03 mov %eax,(%ebx)
kmem.freelist = r;
if(kmem.use_lock)
8010232b: a1 74 36 11 80 mov 0x80113674,%eax
if(kmem.use_lock)
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
kmem.freelist = r;
80102330: 89 1d 78 36 11 80 mov %ebx,0x80113678
if(kmem.use_lock)
80102336: 85 c0 test %eax,%eax
80102338: 75 06 jne 80102340 <kfree+0x60>
release(&kmem.lock);
}
8010233a: 8b 5d fc mov -0x4(%ebp),%ebx
8010233d: c9 leave
8010233e: c3 ret
8010233f: 90 nop
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
kmem.freelist = r;
if(kmem.use_lock)
release(&kmem.lock);
80102340: c7 45 08 40 36 11 80 movl $0x80113640,0x8(%ebp)
}
80102347: 8b 5d fc mov -0x4(%ebp),%ebx
8010234a: c9 leave
acquire(&kmem.lock);
r = (struct run*)v;
r->next = kmem.freelist;
kmem.freelist = r;
if(kmem.use_lock)
release(&kmem.lock);
8010234b: e9 90 26 00 00 jmp 801049e0 <release>
// Fill with junk to catch dangling refs.
memset(v, 1, PGSIZE);
if(kmem.use_lock)
acquire(&kmem.lock);
80102350: 83 ec 0c sub $0xc,%esp
80102353: 68 40 36 11 80 push $0x80113640
80102358: e8 63 25 00 00 call 801048c0 <acquire>
8010235d: 83 c4 10 add $0x10,%esp
80102360: eb c2 jmp 80102324 <kfree+0x44>
kfree(char *v)
{
struct run *r;
if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP)
panic("kfree");
80102362: 83 ec 0c sub $0xc,%esp
80102365: 68 a6 78 10 80 push $0x801078a6
8010236a: e8 01 e0 ff ff call 80100370 <panic>
8010236f: 90 nop
80102370 <freerange>:
kmem.use_lock = 1;
}
void
freerange(void *vstart, void *vend)
{
80102370: 55 push %ebp
80102371: 89 e5 mov %esp,%ebp
80102373: 56 push %esi
80102374: 53 push %ebx
char *p;
p = (char*)PGROUNDUP((uint)vstart);
80102375: 8b 45 08 mov 0x8(%ebp),%eax
kmem.use_lock = 1;
}
void
freerange(void *vstart, void *vend)
{
80102378: 8b 75 0c mov 0xc(%ebp),%esi
char *p;
p = (char*)PGROUNDUP((uint)vstart);
8010237b: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80102381: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102387: 81 c3 00 10 00 00 add $0x1000,%ebx
8010238d: 39 de cmp %ebx,%esi
8010238f: 72 23 jb 801023b4 <freerange+0x44>
80102391: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
kfree(p);
80102398: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
8010239e: 83 ec 0c sub $0xc,%esp
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801023a1: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
801023a7: 50 push %eax
801023a8: e8 33 ff ff ff call 801022e0 <kfree>
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801023ad: 83 c4 10 add $0x10,%esp
801023b0: 39 f3 cmp %esi,%ebx
801023b2: 76 e4 jbe 80102398 <freerange+0x28>
kfree(p);
}
801023b4: 8d 65 f8 lea -0x8(%ebp),%esp
801023b7: 5b pop %ebx
801023b8: 5e pop %esi
801023b9: 5d pop %ebp
801023ba: c3 ret
801023bb: 90 nop
801023bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801023c0 <kinit1>:
// the pages mapped by entrypgdir on free list.
// 2. main() calls kinit2() with the rest of the physical pages
// after installing a full page table that maps them on all cores.
void
kinit1(void *vstart, void *vend)
{
801023c0: 55 push %ebp
801023c1: 89 e5 mov %esp,%ebp
801023c3: 56 push %esi
801023c4: 53 push %ebx
801023c5: 8b 75 0c mov 0xc(%ebp),%esi
initlock(&kmem.lock, "kmem");
801023c8: 83 ec 08 sub $0x8,%esp
801023cb: 68 ac 78 10 80 push $0x801078ac
801023d0: 68 40 36 11 80 push $0x80113640
801023d5: e8 e6 23 00 00 call 801047c0 <initlock>
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
801023da: 8b 45 08 mov 0x8(%ebp),%eax
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801023dd: 83 c4 10 add $0x10,%esp
// after installing a full page table that maps them on all cores.
void
kinit1(void *vstart, void *vend)
{
initlock(&kmem.lock, "kmem");
kmem.use_lock = 0;
801023e0: c7 05 74 36 11 80 00 movl $0x0,0x80113674
801023e7: 00 00 00
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
801023ea: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
801023f0: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
801023f6: 81 c3 00 10 00 00 add $0x1000,%ebx
801023fc: 39 de cmp %ebx,%esi
801023fe: 72 1c jb 8010241c <kinit1+0x5c>
kfree(p);
80102400: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
80102406: 83 ec 0c sub $0xc,%esp
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102409: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
8010240f: 50 push %eax
80102410: e8 cb fe ff ff call 801022e0 <kfree>
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102415: 83 c4 10 add $0x10,%esp
80102418: 39 de cmp %ebx,%esi
8010241a: 73 e4 jae 80102400 <kinit1+0x40>
kinit1(void *vstart, void *vend)
{
initlock(&kmem.lock, "kmem");
kmem.use_lock = 0;
freerange(vstart, vend);
}
8010241c: 8d 65 f8 lea -0x8(%ebp),%esp
8010241f: 5b pop %ebx
80102420: 5e pop %esi
80102421: 5d pop %ebp
80102422: c3 ret
80102423: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102429: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102430 <kinit2>:
void
kinit2(void *vstart, void *vend)
{
80102430: 55 push %ebp
80102431: 89 e5 mov %esp,%ebp
80102433: 56 push %esi
80102434: 53 push %ebx
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
80102435: 8b 45 08 mov 0x8(%ebp),%eax
freerange(vstart, vend);
}
void
kinit2(void *vstart, void *vend)
{
80102438: 8b 75 0c mov 0xc(%ebp),%esi
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
8010243b: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80102441: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102447: 81 c3 00 10 00 00 add $0x1000,%ebx
8010244d: 39 de cmp %ebx,%esi
8010244f: 72 23 jb 80102474 <kinit2+0x44>
80102451: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
kfree(p);
80102458: 8d 83 00 f0 ff ff lea -0x1000(%ebx),%eax
8010245e: 83 ec 0c sub $0xc,%esp
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
80102461: 81 c3 00 10 00 00 add $0x1000,%ebx
kfree(p);
80102467: 50 push %eax
80102468: e8 73 fe ff ff call 801022e0 <kfree>
void
freerange(void *vstart, void *vend)
{
char *p;
p = (char*)PGROUNDUP((uint)vstart);
for(; p + PGSIZE <= (char*)vend; p += PGSIZE)
8010246d: 83 c4 10 add $0x10,%esp
80102470: 39 de cmp %ebx,%esi
80102472: 73 e4 jae 80102458 <kinit2+0x28>
void
kinit2(void *vstart, void *vend)
{
freerange(vstart, vend);
kmem.use_lock = 1;
80102474: c7 05 74 36 11 80 01 movl $0x1,0x80113674
8010247b: 00 00 00
}
8010247e: 8d 65 f8 lea -0x8(%ebp),%esp
80102481: 5b pop %ebx
80102482: 5e pop %esi
80102483: 5d pop %ebp
80102484: c3 ret
80102485: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102489: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102490 <kalloc>:
// Allocate one 4096-byte page of physical memory.
// Returns a pointer that the kernel can use.
// Returns 0 if the memory cannot be allocated.
char*
kalloc(void)
{
80102490: 55 push %ebp
80102491: 89 e5 mov %esp,%ebp
80102493: 53 push %ebx
80102494: 83 ec 04 sub $0x4,%esp
struct run *r;
if(kmem.use_lock)
80102497: a1 74 36 11 80 mov 0x80113674,%eax
8010249c: 85 c0 test %eax,%eax
8010249e: 75 30 jne 801024d0 <kalloc+0x40>
acquire(&kmem.lock);
r = kmem.freelist;
801024a0: 8b 1d 78 36 11 80 mov 0x80113678,%ebx
if(r)
801024a6: 85 db test %ebx,%ebx
801024a8: 74 1c je 801024c6 <kalloc+0x36>
kmem.freelist = r->next;
801024aa: 8b 13 mov (%ebx),%edx
801024ac: 89 15 78 36 11 80 mov %edx,0x80113678
if(kmem.use_lock)
801024b2: 85 c0 test %eax,%eax
801024b4: 74 10 je 801024c6 <kalloc+0x36>
release(&kmem.lock);
801024b6: 83 ec 0c sub $0xc,%esp
801024b9: 68 40 36 11 80 push $0x80113640
801024be: e8 1d 25 00 00 call 801049e0 <release>
801024c3: 83 c4 10 add $0x10,%esp
return (char*)r;
}
801024c6: 89 d8 mov %ebx,%eax
801024c8: 8b 5d fc mov -0x4(%ebp),%ebx
801024cb: c9 leave
801024cc: c3 ret
801024cd: 8d 76 00 lea 0x0(%esi),%esi
kalloc(void)
{
struct run *r;
if(kmem.use_lock)
acquire(&kmem.lock);
801024d0: 83 ec 0c sub $0xc,%esp
801024d3: 68 40 36 11 80 push $0x80113640
801024d8: e8 e3 23 00 00 call 801048c0 <acquire>
r = kmem.freelist;
801024dd: 8b 1d 78 36 11 80 mov 0x80113678,%ebx
if(r)
801024e3: 83 c4 10 add $0x10,%esp
801024e6: a1 74 36 11 80 mov 0x80113674,%eax
801024eb: 85 db test %ebx,%ebx
801024ed: 75 bb jne 801024aa <kalloc+0x1a>
801024ef: eb c1 jmp 801024b2 <kalloc+0x22>
801024f1: 66 90 xchg %ax,%ax
801024f3: 66 90 xchg %ax,%ax
801024f5: 66 90 xchg %ax,%ax
801024f7: 66 90 xchg %ax,%ax
801024f9: 66 90 xchg %ax,%ax
801024fb: 66 90 xchg %ax,%ax
801024fd: 66 90 xchg %ax,%ax
801024ff: 90 nop
80102500 <kbdgetc>:
#include "defs.h"
#include "kbd.h"
int
kbdgetc(void)
{
80102500: 55 push %ebp
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102501: ba 64 00 00 00 mov $0x64,%edx
80102506: 89 e5 mov %esp,%ebp
80102508: ec in (%dx),%al
normalmap, shiftmap, ctlmap, ctlmap
};
uint st, data, c;
st = inb(KBSTATP);
if((st & KBS_DIB) == 0)
80102509: a8 01 test $0x1,%al
8010250b: 0f 84 af 00 00 00 je 801025c0 <kbdgetc+0xc0>
80102511: ba 60 00 00 00 mov $0x60,%edx
80102516: ec in (%dx),%al
return -1;
data = inb(KBDATAP);
80102517: 0f b6 d0 movzbl %al,%edx
if(data == 0xE0){
8010251a: 81 fa e0 00 00 00 cmp $0xe0,%edx
80102520: 74 7e je 801025a0 <kbdgetc+0xa0>
shift |= E0ESC;
return 0;
} else if(data & 0x80){
80102522: 84 c0 test %al,%al
// Key released
data = (shift & E0ESC ? data : data & 0x7F);
80102524: 8b 0d b4 b5 10 80 mov 0x8010b5b4,%ecx
data = inb(KBDATAP);
if(data == 0xE0){
shift |= E0ESC;
return 0;
} else if(data & 0x80){
8010252a: 79 24 jns 80102550 <kbdgetc+0x50>
// Key released
data = (shift & E0ESC ? data : data & 0x7F);
8010252c: f6 c1 40 test $0x40,%cl
8010252f: 75 05 jne 80102536 <kbdgetc+0x36>
80102531: 89 c2 mov %eax,%edx
80102533: 83 e2 7f and $0x7f,%edx
shift &= ~(shiftcode[data] | E0ESC);
80102536: 0f b6 82 e0 79 10 80 movzbl -0x7fef8620(%edx),%eax
8010253d: 83 c8 40 or $0x40,%eax
80102540: 0f b6 c0 movzbl %al,%eax
80102543: f7 d0 not %eax
80102545: 21 c8 and %ecx,%eax
80102547: a3 b4 b5 10 80 mov %eax,0x8010b5b4
return 0;
8010254c: 31 c0 xor %eax,%eax
c += 'A' - 'a';
else if('A' <= c && c <= 'Z')
c += 'a' - 'A';
}
return c;
}
8010254e: 5d pop %ebp
8010254f: c3 ret
} else if(data & 0x80){
// Key released
data = (shift & E0ESC ? data : data & 0x7F);
shift &= ~(shiftcode[data] | E0ESC);
return 0;
} else if(shift & E0ESC){
80102550: f6 c1 40 test $0x40,%cl
80102553: 74 09 je 8010255e <kbdgetc+0x5e>
// Last character was an E0 escape; or with 0x80
data |= 0x80;
80102555: 83 c8 80 or $0xffffff80,%eax
shift &= ~E0ESC;
80102558: 83 e1 bf and $0xffffffbf,%ecx
data = (shift & E0ESC ? data : data & 0x7F);
shift &= ~(shiftcode[data] | E0ESC);
return 0;
} else if(shift & E0ESC){
// Last character was an E0 escape; or with 0x80
data |= 0x80;
8010255b: 0f b6 d0 movzbl %al,%edx
shift &= ~E0ESC;
}
shift |= shiftcode[data];
shift ^= togglecode[data];
8010255e: 0f b6 82 e0 79 10 80 movzbl -0x7fef8620(%edx),%eax
80102565: 09 c1 or %eax,%ecx
80102567: 0f b6 82 e0 78 10 80 movzbl -0x7fef8720(%edx),%eax
8010256e: 31 c1 xor %eax,%ecx
c = charcode[shift & (CTL | SHIFT)][data];
80102570: 89 c8 mov %ecx,%eax
data |= 0x80;
shift &= ~E0ESC;
}
shift |= shiftcode[data];
shift ^= togglecode[data];
80102572: 89 0d b4 b5 10 80 mov %ecx,0x8010b5b4
c = charcode[shift & (CTL | SHIFT)][data];
80102578: 83 e0 03 and $0x3,%eax
if(shift & CAPSLOCK){
8010257b: 83 e1 08 and $0x8,%ecx
shift &= ~E0ESC;
}
shift |= shiftcode[data];
shift ^= togglecode[data];
c = charcode[shift & (CTL | SHIFT)][data];
8010257e: 8b 04 85 c0 78 10 80 mov -0x7fef8740(,%eax,4),%eax
80102585: 0f b6 04 10 movzbl (%eax,%edx,1),%eax
if(shift & CAPSLOCK){
80102589: 74 c3 je 8010254e <kbdgetc+0x4e>
if('a' <= c && c <= 'z')
8010258b: 8d 50 9f lea -0x61(%eax),%edx
8010258e: 83 fa 19 cmp $0x19,%edx
80102591: 77 1d ja 801025b0 <kbdgetc+0xb0>
c += 'A' - 'a';
80102593: 83 e8 20 sub $0x20,%eax
else if('A' <= c && c <= 'Z')
c += 'a' - 'A';
}
return c;
}
80102596: 5d pop %ebp
80102597: c3 ret
80102598: 90 nop
80102599: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
data = inb(KBDATAP);
if(data == 0xE0){
shift |= E0ESC;
return 0;
801025a0: 31 c0 xor %eax,%eax
if((st & KBS_DIB) == 0)
return -1;
data = inb(KBDATAP);
if(data == 0xE0){
shift |= E0ESC;
801025a2: 83 0d b4 b5 10 80 40 orl $0x40,0x8010b5b4
c += 'A' - 'a';
else if('A' <= c && c <= 'Z')
c += 'a' - 'A';
}
return c;
}
801025a9: 5d pop %ebp
801025aa: c3 ret
801025ab: 90 nop
801025ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
shift ^= togglecode[data];
c = charcode[shift & (CTL | SHIFT)][data];
if(shift & CAPSLOCK){
if('a' <= c && c <= 'z')
c += 'A' - 'a';
else if('A' <= c && c <= 'Z')
801025b0: 8d 48 bf lea -0x41(%eax),%ecx
c += 'a' - 'A';
801025b3: 8d 50 20 lea 0x20(%eax),%edx
}
return c;
}
801025b6: 5d pop %ebp
c = charcode[shift & (CTL | SHIFT)][data];
if(shift & CAPSLOCK){
if('a' <= c && c <= 'z')
c += 'A' - 'a';
else if('A' <= c && c <= 'Z')
c += 'a' - 'A';
801025b7: 83 f9 19 cmp $0x19,%ecx
801025ba: 0f 46 c2 cmovbe %edx,%eax
}
return c;
}
801025bd: c3 ret
801025be: 66 90 xchg %ax,%ax
};
uint st, data, c;
st = inb(KBSTATP);
if((st & KBS_DIB) == 0)
return -1;
801025c0: b8 ff ff ff ff mov $0xffffffff,%eax
c += 'A' - 'a';
else if('A' <= c && c <= 'Z')
c += 'a' - 'A';
}
return c;
}
801025c5: 5d pop %ebp
801025c6: c3 ret
801025c7: 89 f6 mov %esi,%esi
801025c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801025d0 <kbdintr>:
void
kbdintr(void)
{
801025d0: 55 push %ebp
801025d1: 89 e5 mov %esp,%ebp
801025d3: 83 ec 14 sub $0x14,%esp
consoleintr(kbdgetc);
801025d6: 68 00 25 10 80 push $0x80102500
801025db: e8 10 e2 ff ff call 801007f0 <consoleintr>
}
801025e0: 83 c4 10 add $0x10,%esp
801025e3: c9 leave
801025e4: c3 ret
801025e5: 66 90 xchg %ax,%ax
801025e7: 66 90 xchg %ax,%ax
801025e9: 66 90 xchg %ax,%ax
801025eb: 66 90 xchg %ax,%ax
801025ed: 66 90 xchg %ax,%ax
801025ef: 90 nop
801025f0 <lapicinit>:
}
void
lapicinit(void)
{
if(!lapic)
801025f0: a1 7c 36 11 80 mov 0x8011367c,%eax
lapic[ID]; // wait for write to finish, by reading
}
void
lapicinit(void)
{
801025f5: 55 push %ebp
801025f6: 89 e5 mov %esp,%ebp
if(!lapic)
801025f8: 85 c0 test %eax,%eax
801025fa: 0f 84 c8 00 00 00 je 801026c8 <lapicinit+0xd8>
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102600: c7 80 f0 00 00 00 3f movl $0x13f,0xf0(%eax)
80102607: 01 00 00
lapic[ID]; // wait for write to finish, by reading
8010260a: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010260d: c7 80 e0 03 00 00 0b movl $0xb,0x3e0(%eax)
80102614: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102617: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010261a: c7 80 20 03 00 00 20 movl $0x20020,0x320(%eax)
80102621: 00 02 00
lapic[ID]; // wait for write to finish, by reading
80102624: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102627: c7 80 80 03 00 00 80 movl $0x989680,0x380(%eax)
8010262e: 96 98 00
lapic[ID]; // wait for write to finish, by reading
80102631: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102634: c7 80 50 03 00 00 00 movl $0x10000,0x350(%eax)
8010263b: 00 01 00
lapic[ID]; // wait for write to finish, by reading
8010263e: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102641: c7 80 60 03 00 00 00 movl $0x10000,0x360(%eax)
80102648: 00 01 00
lapic[ID]; // wait for write to finish, by reading
8010264b: 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)
8010264e: 8b 50 30 mov 0x30(%eax),%edx
80102651: c1 ea 10 shr $0x10,%edx
80102654: 80 fa 03 cmp $0x3,%dl
80102657: 77 77 ja 801026d0 <lapicinit+0xe0>
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102659: c7 80 70 03 00 00 33 movl $0x33,0x370(%eax)
80102660: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102663: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102666: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
8010266d: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102670: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102673: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax)
8010267a: 00 00 00
lapic[ID]; // wait for write to finish, by reading
8010267d: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102680: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
80102687: 00 00 00
lapic[ID]; // wait for write to finish, by reading
8010268a: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010268d: c7 80 10 03 00 00 00 movl $0x0,0x310(%eax)
80102694: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102697: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010269a: c7 80 00 03 00 00 00 movl $0x88500,0x300(%eax)
801026a1: 85 08 00
lapic[ID]; // wait for write to finish, by reading
801026a4: 8b 50 20 mov 0x20(%eax),%edx
801026a7: 89 f6 mov %esi,%esi
801026a9: 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)
801026b0: 8b 90 00 03 00 00 mov 0x300(%eax),%edx
801026b6: 80 e6 10 and $0x10,%dh
801026b9: 75 f5 jne 801026b0 <lapicinit+0xc0>
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801026bb: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax)
801026c2: 00 00 00
lapic[ID]; // wait for write to finish, by reading
801026c5: 8b 40 20 mov 0x20(%eax),%eax
while(lapic[ICRLO] & DELIVS)
;
// Enable interrupts on the APIC (but not on the processor).
lapicw(TPR, 0);
}
801026c8: 5d pop %ebp
801026c9: c3 ret
801026ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801026d0: c7 80 40 03 00 00 00 movl $0x10000,0x340(%eax)
801026d7: 00 01 00
lapic[ID]; // wait for write to finish, by reading
801026da: 8b 50 20 mov 0x20(%eax),%edx
801026dd: e9 77 ff ff ff jmp 80102659 <lapicinit+0x69>
801026e2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801026e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801026f0 <lapicid>:
}
int
lapicid(void)
{
if (!lapic)
801026f0: a1 7c 36 11 80 mov 0x8011367c,%eax
lapicw(TPR, 0);
}
int
lapicid(void)
{
801026f5: 55 push %ebp
801026f6: 89 e5 mov %esp,%ebp
if (!lapic)
801026f8: 85 c0 test %eax,%eax
801026fa: 74 0c je 80102708 <lapicid+0x18>
return 0;
return lapic[ID] >> 24;
801026fc: 8b 40 20 mov 0x20(%eax),%eax
}
801026ff: 5d pop %ebp
int
lapicid(void)
{
if (!lapic)
return 0;
return lapic[ID] >> 24;
80102700: c1 e8 18 shr $0x18,%eax
}
80102703: c3 ret
80102704: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
int
lapicid(void)
{
if (!lapic)
return 0;
80102708: 31 c0 xor %eax,%eax
return lapic[ID] >> 24;
}
8010270a: 5d pop %ebp
8010270b: c3 ret
8010270c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102710 <lapiceoi>:
// Acknowledge interrupt.
void
lapiceoi(void)
{
if(lapic)
80102710: a1 7c 36 11 80 mov 0x8011367c,%eax
}
// Acknowledge interrupt.
void
lapiceoi(void)
{
80102715: 55 push %ebp
80102716: 89 e5 mov %esp,%ebp
if(lapic)
80102718: 85 c0 test %eax,%eax
8010271a: 74 0d je 80102729 <lapiceoi+0x19>
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010271c: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax)
80102723: 00 00 00
lapic[ID]; // wait for write to finish, by reading
80102726: 8b 40 20 mov 0x20(%eax),%eax
void
lapiceoi(void)
{
if(lapic)
lapicw(EOI, 0);
}
80102729: 5d pop %ebp
8010272a: c3 ret
8010272b: 90 nop
8010272c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102730 <microdelay>:
// Spin for a given number of microseconds.
// On real hardware would want to tune this dynamically.
void
microdelay(int us)
{
80102730: 55 push %ebp
80102731: 89 e5 mov %esp,%ebp
}
80102733: 5d pop %ebp
80102734: c3 ret
80102735: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102739: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102740 <lapicstartap>:
// Start additional processor running entry code at addr.
// See Appendix B of MultiProcessor Specification.
void
lapicstartap(uchar apicid, uint addr)
{
80102740: 55 push %ebp
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102741: ba 70 00 00 00 mov $0x70,%edx
80102746: b8 0f 00 00 00 mov $0xf,%eax
8010274b: 89 e5 mov %esp,%ebp
8010274d: 53 push %ebx
8010274e: 8b 4d 0c mov 0xc(%ebp),%ecx
80102751: 8b 5d 08 mov 0x8(%ebp),%ebx
80102754: ee out %al,(%dx)
80102755: ba 71 00 00 00 mov $0x71,%edx
8010275a: b8 0a 00 00 00 mov $0xa,%eax
8010275f: 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;
80102760: 31 c0 xor %eax,%eax
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102762: c1 e3 18 shl $0x18,%ebx
// 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;
80102765: 66 a3 67 04 00 80 mov %ax,0x80000467
wrv[1] = addr >> 4;
8010276b: 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));
8010276d: c1 e9 0c shr $0xc,%ecx
// 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;
wrv[1] = addr >> 4;
80102770: c1 e8 04 shr $0x4,%eax
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102773: 89 da mov %ebx,%edx
// 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));
80102775: 80 cd 06 or $0x6,%ch
// 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;
wrv[1] = addr >> 4;
80102778: 66 a3 69 04 00 80 mov %ax,0x80000469
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010277e: a1 7c 36 11 80 mov 0x8011367c,%eax
80102783: 89 98 10 03 00 00 mov %ebx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
80102789: 8b 58 20 mov 0x20(%eax),%ebx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
8010278c: c7 80 00 03 00 00 00 movl $0xc500,0x300(%eax)
80102793: c5 00 00
lapic[ID]; // wait for write to finish, by reading
80102796: 8b 58 20 mov 0x20(%eax),%ebx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
80102799: c7 80 00 03 00 00 00 movl $0x8500,0x300(%eax)
801027a0: 85 00 00
lapic[ID]; // wait for write to finish, by reading
801027a3: 8b 58 20 mov 0x20(%eax),%ebx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801027a6: 89 90 10 03 00 00 mov %edx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
801027ac: 8b 58 20 mov 0x20(%eax),%ebx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801027af: 89 88 00 03 00 00 mov %ecx,0x300(%eax)
lapic[ID]; // wait for write to finish, by reading
801027b5: 8b 58 20 mov 0x20(%eax),%ebx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801027b8: 89 90 10 03 00 00 mov %edx,0x310(%eax)
lapic[ID]; // wait for write to finish, by reading
801027be: 8b 50 20 mov 0x20(%eax),%edx
volatile uint *lapic; // Initialized in mp.c
static void
lapicw(int index, int value)
{
lapic[index] = value;
801027c1: 89 88 00 03 00 00 mov %ecx,0x300(%eax)
lapic[ID]; // wait for write to finish, by reading
801027c7: 8b 40 20 mov 0x20(%eax),%eax
for(i = 0; i < 2; i++){
lapicw(ICRHI, apicid<<24);
lapicw(ICRLO, STARTUP | (addr>>12));
microdelay(200);
}
}
801027ca: 5b pop %ebx
801027cb: 5d pop %ebp
801027cc: c3 ret
801027cd: 8d 76 00 lea 0x0(%esi),%esi
801027d0 <cmostime>:
r->year = cmos_read(YEAR);
}
// qemu seems to use 24-hour GWT and the values are BCD encoded
void cmostime(struct rtcdate *r)
{
801027d0: 55 push %ebp
801027d1: ba 70 00 00 00 mov $0x70,%edx
801027d6: b8 0b 00 00 00 mov $0xb,%eax
801027db: 89 e5 mov %esp,%ebp
801027dd: 57 push %edi
801027de: 56 push %esi
801027df: 53 push %ebx
801027e0: 83 ec 4c sub $0x4c,%esp
801027e3: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801027e4: ba 71 00 00 00 mov $0x71,%edx
801027e9: ec in (%dx),%al
801027ea: 83 e0 04 and $0x4,%eax
801027ed: 8d 75 d0 lea -0x30(%ebp),%esi
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801027f0: 31 db xor %ebx,%ebx
801027f2: 88 45 b7 mov %al,-0x49(%ebp)
801027f5: bf 70 00 00 00 mov $0x70,%edi
801027fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102800: 89 d8 mov %ebx,%eax
80102802: 89 fa mov %edi,%edx
80102804: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102805: b9 71 00 00 00 mov $0x71,%ecx
8010280a: 89 ca mov %ecx,%edx
8010280c: ec in (%dx),%al
return inb(CMOS_RETURN);
}
static void fill_rtcdate(struct rtcdate *r)
{
r->second = cmos_read(SECS);
8010280d: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102810: 89 fa mov %edi,%edx
80102812: 89 45 b8 mov %eax,-0x48(%ebp)
80102815: b8 02 00 00 00 mov $0x2,%eax
8010281a: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010281b: 89 ca mov %ecx,%edx
8010281d: ec in (%dx),%al
r->minute = cmos_read(MINS);
8010281e: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102821: 89 fa mov %edi,%edx
80102823: 89 45 bc mov %eax,-0x44(%ebp)
80102826: b8 04 00 00 00 mov $0x4,%eax
8010282b: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010282c: 89 ca mov %ecx,%edx
8010282e: ec in (%dx),%al
r->hour = cmos_read(HOURS);
8010282f: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102832: 89 fa mov %edi,%edx
80102834: 89 45 c0 mov %eax,-0x40(%ebp)
80102837: b8 07 00 00 00 mov $0x7,%eax
8010283c: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010283d: 89 ca mov %ecx,%edx
8010283f: ec in (%dx),%al
r->day = cmos_read(DAY);
80102840: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102843: 89 fa mov %edi,%edx
80102845: 89 45 c4 mov %eax,-0x3c(%ebp)
80102848: b8 08 00 00 00 mov $0x8,%eax
8010284d: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010284e: 89 ca mov %ecx,%edx
80102850: ec in (%dx),%al
r->month = cmos_read(MONTH);
80102851: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102854: 89 fa mov %edi,%edx
80102856: 89 45 c8 mov %eax,-0x38(%ebp)
80102859: b8 09 00 00 00 mov $0x9,%eax
8010285e: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010285f: 89 ca mov %ecx,%edx
80102861: ec in (%dx),%al
r->year = cmos_read(YEAR);
80102862: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102865: 89 fa mov %edi,%edx
80102867: 89 45 cc mov %eax,-0x34(%ebp)
8010286a: b8 0a 00 00 00 mov $0xa,%eax
8010286f: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80102870: 89 ca mov %ecx,%edx
80102872: 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)
80102873: 84 c0 test %al,%al
80102875: 78 89 js 80102800 <cmostime+0x30>
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102877: 89 d8 mov %ebx,%eax
80102879: 89 fa mov %edi,%edx
8010287b: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010287c: 89 ca mov %ecx,%edx
8010287e: ec in (%dx),%al
return inb(CMOS_RETURN);
}
static void fill_rtcdate(struct rtcdate *r)
{
r->second = cmos_read(SECS);
8010287f: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102882: 89 fa mov %edi,%edx
80102884: 89 45 d0 mov %eax,-0x30(%ebp)
80102887: b8 02 00 00 00 mov $0x2,%eax
8010288c: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010288d: 89 ca mov %ecx,%edx
8010288f: ec in (%dx),%al
r->minute = cmos_read(MINS);
80102890: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80102893: 89 fa mov %edi,%edx
80102895: 89 45 d4 mov %eax,-0x2c(%ebp)
80102898: b8 04 00 00 00 mov $0x4,%eax
8010289d: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010289e: 89 ca mov %ecx,%edx
801028a0: ec in (%dx),%al
r->hour = cmos_read(HOURS);
801028a1: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801028a4: 89 fa mov %edi,%edx
801028a6: 89 45 d8 mov %eax,-0x28(%ebp)
801028a9: b8 07 00 00 00 mov $0x7,%eax
801028ae: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801028af: 89 ca mov %ecx,%edx
801028b1: ec in (%dx),%al
r->day = cmos_read(DAY);
801028b2: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801028b5: 89 fa mov %edi,%edx
801028b7: 89 45 dc mov %eax,-0x24(%ebp)
801028ba: b8 08 00 00 00 mov $0x8,%eax
801028bf: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801028c0: 89 ca mov %ecx,%edx
801028c2: ec in (%dx),%al
r->month = cmos_read(MONTH);
801028c3: 0f b6 c0 movzbl %al,%eax
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
801028c6: 89 fa mov %edi,%edx
801028c8: 89 45 e0 mov %eax,-0x20(%ebp)
801028cb: b8 09 00 00 00 mov $0x9,%eax
801028d0: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801028d1: 89 ca mov %ecx,%edx
801028d3: ec in (%dx),%al
r->year = cmos_read(YEAR);
801028d4: 0f b6 c0 movzbl %al,%eax
for(;;) {
fill_rtcdate(&t1);
if(cmos_read(CMOS_STATA) & CMOS_UIP)
continue;
fill_rtcdate(&t2);
if(memcmp(&t1, &t2, sizeof(t1)) == 0)
801028d7: 83 ec 04 sub $0x4,%esp
r->second = cmos_read(SECS);
r->minute = cmos_read(MINS);
r->hour = cmos_read(HOURS);
r->day = cmos_read(DAY);
r->month = cmos_read(MONTH);
r->year = cmos_read(YEAR);
801028da: 89 45 e4 mov %eax,-0x1c(%ebp)
for(;;) {
fill_rtcdate(&t1);
if(cmos_read(CMOS_STATA) & CMOS_UIP)
continue;
fill_rtcdate(&t2);
if(memcmp(&t1, &t2, sizeof(t1)) == 0)
801028dd: 8d 45 b8 lea -0x48(%ebp),%eax
801028e0: 6a 18 push $0x18
801028e2: 56 push %esi
801028e3: 50 push %eax
801028e4: e8 97 21 00 00 call 80104a80 <memcmp>
801028e9: 83 c4 10 add $0x10,%esp
801028ec: 85 c0 test %eax,%eax
801028ee: 0f 85 0c ff ff ff jne 80102800 <cmostime+0x30>
break;
}
// convert
if(bcd) {
801028f4: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
801028f8: 75 78 jne 80102972 <cmostime+0x1a2>
#define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf))
CONV(second);
801028fa: 8b 45 b8 mov -0x48(%ebp),%eax
801028fd: 89 c2 mov %eax,%edx
801028ff: 83 e0 0f and $0xf,%eax
80102902: c1 ea 04 shr $0x4,%edx
80102905: 8d 14 92 lea (%edx,%edx,4),%edx
80102908: 8d 04 50 lea (%eax,%edx,2),%eax
8010290b: 89 45 b8 mov %eax,-0x48(%ebp)
CONV(minute);
8010290e: 8b 45 bc mov -0x44(%ebp),%eax
80102911: 89 c2 mov %eax,%edx
80102913: 83 e0 0f and $0xf,%eax
80102916: c1 ea 04 shr $0x4,%edx
80102919: 8d 14 92 lea (%edx,%edx,4),%edx
8010291c: 8d 04 50 lea (%eax,%edx,2),%eax
8010291f: 89 45 bc mov %eax,-0x44(%ebp)
CONV(hour );
80102922: 8b 45 c0 mov -0x40(%ebp),%eax
80102925: 89 c2 mov %eax,%edx
80102927: 83 e0 0f and $0xf,%eax
8010292a: c1 ea 04 shr $0x4,%edx
8010292d: 8d 14 92 lea (%edx,%edx,4),%edx
80102930: 8d 04 50 lea (%eax,%edx,2),%eax
80102933: 89 45 c0 mov %eax,-0x40(%ebp)
CONV(day );
80102936: 8b 45 c4 mov -0x3c(%ebp),%eax
80102939: 89 c2 mov %eax,%edx
8010293b: 83 e0 0f and $0xf,%eax
8010293e: c1 ea 04 shr $0x4,%edx
80102941: 8d 14 92 lea (%edx,%edx,4),%edx
80102944: 8d 04 50 lea (%eax,%edx,2),%eax
80102947: 89 45 c4 mov %eax,-0x3c(%ebp)
CONV(month );
8010294a: 8b 45 c8 mov -0x38(%ebp),%eax
8010294d: 89 c2 mov %eax,%edx
8010294f: 83 e0 0f and $0xf,%eax
80102952: c1 ea 04 shr $0x4,%edx
80102955: 8d 14 92 lea (%edx,%edx,4),%edx
80102958: 8d 04 50 lea (%eax,%edx,2),%eax
8010295b: 89 45 c8 mov %eax,-0x38(%ebp)
CONV(year );
8010295e: 8b 45 cc mov -0x34(%ebp),%eax
80102961: 89 c2 mov %eax,%edx
80102963: 83 e0 0f and $0xf,%eax
80102966: c1 ea 04 shr $0x4,%edx
80102969: 8d 14 92 lea (%edx,%edx,4),%edx
8010296c: 8d 04 50 lea (%eax,%edx,2),%eax
8010296f: 89 45 cc mov %eax,-0x34(%ebp)
#undef CONV
}
*r = t1;
80102972: 8b 75 08 mov 0x8(%ebp),%esi
80102975: 8b 45 b8 mov -0x48(%ebp),%eax
80102978: 89 06 mov %eax,(%esi)
8010297a: 8b 45 bc mov -0x44(%ebp),%eax
8010297d: 89 46 04 mov %eax,0x4(%esi)
80102980: 8b 45 c0 mov -0x40(%ebp),%eax
80102983: 89 46 08 mov %eax,0x8(%esi)
80102986: 8b 45 c4 mov -0x3c(%ebp),%eax
80102989: 89 46 0c mov %eax,0xc(%esi)
8010298c: 8b 45 c8 mov -0x38(%ebp),%eax
8010298f: 89 46 10 mov %eax,0x10(%esi)
80102992: 8b 45 cc mov -0x34(%ebp),%eax
80102995: 89 46 14 mov %eax,0x14(%esi)
r->year += 2000;
80102998: 81 46 14 d0 07 00 00 addl $0x7d0,0x14(%esi)
}
8010299f: 8d 65 f4 lea -0xc(%ebp),%esp
801029a2: 5b pop %ebx
801029a3: 5e pop %esi
801029a4: 5f pop %edi
801029a5: 5d pop %ebp
801029a6: c3 ret
801029a7: 66 90 xchg %ax,%ax
801029a9: 66 90 xchg %ax,%ax
801029ab: 66 90 xchg %ax,%ax
801029ad: 66 90 xchg %ax,%ax
801029af: 90 nop
801029b0 <install_trans>:
static void
install_trans(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
801029b0: 8b 0d c8 36 11 80 mov 0x801136c8,%ecx
801029b6: 85 c9 test %ecx,%ecx
801029b8: 0f 8e 85 00 00 00 jle 80102a43 <install_trans+0x93>
}
// Copy committed blocks from log to their home location
static void
install_trans(void)
{
801029be: 55 push %ebp
801029bf: 89 e5 mov %esp,%ebp
801029c1: 57 push %edi
801029c2: 56 push %esi
801029c3: 53 push %ebx
801029c4: 31 db xor %ebx,%ebx
801029c6: 83 ec 0c sub $0xc,%esp
801029c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block
801029d0: a1 b4 36 11 80 mov 0x801136b4,%eax
801029d5: 83 ec 08 sub $0x8,%esp
801029d8: 01 d8 add %ebx,%eax
801029da: 83 c0 01 add $0x1,%eax
801029dd: 50 push %eax
801029de: ff 35 c4 36 11 80 pushl 0x801136c4
801029e4: e8 e7 d6 ff ff call 801000d0 <bread>
801029e9: 89 c7 mov %eax,%edi
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
801029eb: 58 pop %eax
801029ec: 5a pop %edx
801029ed: ff 34 9d cc 36 11 80 pushl -0x7feec934(,%ebx,4)
801029f4: ff 35 c4 36 11 80 pushl 0x801136c4
static void
install_trans(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
801029fa: 83 c3 01 add $0x1,%ebx
struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block
struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst
801029fd: e8 ce d6 ff ff call 801000d0 <bread>
80102a02: 89 c6 mov %eax,%esi
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
80102a04: 8d 47 5c lea 0x5c(%edi),%eax
80102a07: 83 c4 0c add $0xc,%esp
80102a0a: 68 00 02 00 00 push $0x200
80102a0f: 50 push %eax
80102a10: 8d 46 5c lea 0x5c(%esi),%eax
80102a13: 50 push %eax
80102a14: e8 c7 20 00 00 call 80104ae0 <memmove>
bwrite(dbuf); // write dst to disk
80102a19: 89 34 24 mov %esi,(%esp)
80102a1c: e8 7f d7 ff ff call 801001a0 <bwrite>
brelse(lbuf);
80102a21: 89 3c 24 mov %edi,(%esp)
80102a24: e8 b7 d7 ff ff call 801001e0 <brelse>
brelse(dbuf);
80102a29: 89 34 24 mov %esi,(%esp)
80102a2c: e8 af d7 ff ff call 801001e0 <brelse>
static void
install_trans(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80102a31: 83 c4 10 add $0x10,%esp
80102a34: 39 1d c8 36 11 80 cmp %ebx,0x801136c8
80102a3a: 7f 94 jg 801029d0 <install_trans+0x20>
memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst
bwrite(dbuf); // write dst to disk
brelse(lbuf);
brelse(dbuf);
}
}
80102a3c: 8d 65 f4 lea -0xc(%ebp),%esp
80102a3f: 5b pop %ebx
80102a40: 5e pop %esi
80102a41: 5f pop %edi
80102a42: 5d pop %ebp
80102a43: f3 c3 repz ret
80102a45: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80102a49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102a50 <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)
{
80102a50: 55 push %ebp
80102a51: 89 e5 mov %esp,%ebp
80102a53: 53 push %ebx
80102a54: 83 ec 0c sub $0xc,%esp
struct buf *buf = bread(log.dev, log.start);
80102a57: ff 35 b4 36 11 80 pushl 0x801136b4
80102a5d: ff 35 c4 36 11 80 pushl 0x801136c4
80102a63: e8 68 d6 ff ff call 801000d0 <bread>
struct logheader *hb = (struct logheader *) (buf->data);
int i;
hb->n = log.lh.n;
80102a68: 8b 0d c8 36 11 80 mov 0x801136c8,%ecx
for (i = 0; i < log.lh.n; i++) {
80102a6e: 83 c4 10 add $0x10,%esp
// This is the true point at which the
// current transaction commits.
static void
write_head(void)
{
struct buf *buf = bread(log.dev, log.start);
80102a71: 89 c3 mov %eax,%ebx
struct logheader *hb = (struct logheader *) (buf->data);
int i;
hb->n = log.lh.n;
for (i = 0; i < log.lh.n; i++) {
80102a73: 85 c9 test %ecx,%ecx
write_head(void)
{
struct buf *buf = bread(log.dev, log.start);
struct logheader *hb = (struct logheader *) (buf->data);
int i;
hb->n = log.lh.n;
80102a75: 89 48 5c mov %ecx,0x5c(%eax)
for (i = 0; i < log.lh.n; i++) {
80102a78: 7e 1f jle 80102a99 <write_head+0x49>
80102a7a: 8d 04 8d 00 00 00 00 lea 0x0(,%ecx,4),%eax
80102a81: 31 d2 xor %edx,%edx
80102a83: 90 nop
80102a84: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
hb->block[i] = log.lh.block[i];
80102a88: 8b 8a cc 36 11 80 mov -0x7feec934(%edx),%ecx
80102a8e: 89 4c 13 60 mov %ecx,0x60(%ebx,%edx,1)
80102a92: 83 c2 04 add $0x4,%edx
{
struct buf *buf = bread(log.dev, log.start);
struct logheader *hb = (struct logheader *) (buf->data);
int i;
hb->n = log.lh.n;
for (i = 0; i < log.lh.n; i++) {
80102a95: 39 c2 cmp %eax,%edx
80102a97: 75 ef jne 80102a88 <write_head+0x38>
hb->block[i] = log.lh.block[i];
}
bwrite(buf);
80102a99: 83 ec 0c sub $0xc,%esp
80102a9c: 53 push %ebx
80102a9d: e8 fe d6 ff ff call 801001a0 <bwrite>
brelse(buf);
80102aa2: 89 1c 24 mov %ebx,(%esp)
80102aa5: e8 36 d7 ff ff call 801001e0 <brelse>
}
80102aaa: 8b 5d fc mov -0x4(%ebp),%ebx
80102aad: c9 leave
80102aae: c3 ret
80102aaf: 90 nop
80102ab0 <initlog>:
static void recover_from_log(void);
static void commit();
void
initlog(int dev)
{
80102ab0: 55 push %ebp
80102ab1: 89 e5 mov %esp,%ebp
80102ab3: 53 push %ebx
80102ab4: 83 ec 2c sub $0x2c,%esp
80102ab7: 8b 5d 08 mov 0x8(%ebp),%ebx
if (sizeof(struct logheader) >= BSIZE)
panic("initlog: too big logheader");
struct superblock sb;
initlock(&log.lock, "log");
80102aba: 68 e0 7a 10 80 push $0x80107ae0
80102abf: 68 80 36 11 80 push $0x80113680
80102ac4: e8 f7 1c 00 00 call 801047c0 <initlock>
readsb(dev, &sb);
80102ac9: 58 pop %eax
80102aca: 8d 45 dc lea -0x24(%ebp),%eax
80102acd: 5a pop %edx
80102ace: 50 push %eax
80102acf: 53 push %ebx
80102ad0: e8 db e8 ff ff call 801013b0 <readsb>
log.start = sb.logstart;
log.size = sb.nlog;
80102ad5: 8b 55 e8 mov -0x18(%ebp),%edx
panic("initlog: too big logheader");
struct superblock sb;
initlock(&log.lock, "log");
readsb(dev, &sb);
log.start = sb.logstart;
80102ad8: 8b 45 ec mov -0x14(%ebp),%eax
// Read the log header from disk into the in-memory log header
static void
read_head(void)
{
struct buf *buf = bread(log.dev, log.start);
80102adb: 59 pop %ecx
struct superblock sb;
initlock(&log.lock, "log");
readsb(dev, &sb);
log.start = sb.logstart;
log.size = sb.nlog;
log.dev = dev;
80102adc: 89 1d c4 36 11 80 mov %ebx,0x801136c4
struct superblock sb;
initlock(&log.lock, "log");
readsb(dev, &sb);
log.start = sb.logstart;
log.size = sb.nlog;
80102ae2: 89 15 b8 36 11 80 mov %edx,0x801136b8
panic("initlog: too big logheader");
struct superblock sb;
initlock(&log.lock, "log");
readsb(dev, &sb);
log.start = sb.logstart;
80102ae8: a3 b4 36 11 80 mov %eax,0x801136b4
// Read the log header from disk into the in-memory log header
static void
read_head(void)
{
struct buf *buf = bread(log.dev, log.start);
80102aed: 5a pop %edx
80102aee: 50 push %eax
80102aef: 53 push %ebx
80102af0: e8 db d5 ff ff call 801000d0 <bread>
struct logheader *lh = (struct logheader *) (buf->data);
int i;
log.lh.n = lh->n;
80102af5: 8b 48 5c mov 0x5c(%eax),%ecx
for (i = 0; i < log.lh.n; i++) {
80102af8: 83 c4 10 add $0x10,%esp
80102afb: 85 c9 test %ecx,%ecx
read_head(void)
{
struct buf *buf = bread(log.dev, log.start);
struct logheader *lh = (struct logheader *) (buf->data);
int i;
log.lh.n = lh->n;
80102afd: 89 0d c8 36 11 80 mov %ecx,0x801136c8
for (i = 0; i < log.lh.n; i++) {
80102b03: 7e 1c jle 80102b21 <initlog+0x71>
80102b05: 8d 1c 8d 00 00 00 00 lea 0x0(,%ecx,4),%ebx
80102b0c: 31 d2 xor %edx,%edx
80102b0e: 66 90 xchg %ax,%ax
log.lh.block[i] = lh->block[i];
80102b10: 8b 4c 10 60 mov 0x60(%eax,%edx,1),%ecx
80102b14: 83 c2 04 add $0x4,%edx
80102b17: 89 8a c8 36 11 80 mov %ecx,-0x7feec938(%edx)
{
struct buf *buf = bread(log.dev, log.start);
struct logheader *lh = (struct logheader *) (buf->data);
int i;
log.lh.n = lh->n;
for (i = 0; i < log.lh.n; i++) {
80102b1d: 39 da cmp %ebx,%edx
80102b1f: 75 ef jne 80102b10 <initlog+0x60>
log.lh.block[i] = lh->block[i];
}
brelse(buf);
80102b21: 83 ec 0c sub $0xc,%esp
80102b24: 50 push %eax
80102b25: e8 b6 d6 ff ff call 801001e0 <brelse>
static void
recover_from_log(void)
{
read_head();
install_trans(); // if committed, copy from log to disk
80102b2a: e8 81 fe ff ff call 801029b0 <install_trans>
log.lh.n = 0;
80102b2f: c7 05 c8 36 11 80 00 movl $0x0,0x801136c8
80102b36: 00 00 00
write_head(); // clear the log
80102b39: e8 12 ff ff ff call 80102a50 <write_head>
readsb(dev, &sb);
log.start = sb.logstart;
log.size = sb.nlog;
log.dev = dev;
recover_from_log();
}
80102b3e: 8b 5d fc mov -0x4(%ebp),%ebx
80102b41: c9 leave
80102b42: c3 ret
80102b43: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80102b49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102b50 <begin_op>:
}
// called at the start of each FS system call.
void
begin_op(void)
{
80102b50: 55 push %ebp
80102b51: 89 e5 mov %esp,%ebp
80102b53: 83 ec 14 sub $0x14,%esp
acquire(&log.lock);
80102b56: 68 80 36 11 80 push $0x80113680
80102b5b: e8 60 1d 00 00 call 801048c0 <acquire>
80102b60: 83 c4 10 add $0x10,%esp
80102b63: eb 18 jmp 80102b7d <begin_op+0x2d>
80102b65: 8d 76 00 lea 0x0(%esi),%esi
while(1){
if(log.committing){
sleep(&log, &log.lock);
80102b68: 83 ec 08 sub $0x8,%esp
80102b6b: 68 80 36 11 80 push $0x80113680
80102b70: 68 80 36 11 80 push $0x80113680
80102b75: e8 f6 12 00 00 call 80103e70 <sleep>
80102b7a: 83 c4 10 add $0x10,%esp
void
begin_op(void)
{
acquire(&log.lock);
while(1){
if(log.committing){
80102b7d: a1 c0 36 11 80 mov 0x801136c0,%eax
80102b82: 85 c0 test %eax,%eax
80102b84: 75 e2 jne 80102b68 <begin_op+0x18>
sleep(&log, &log.lock);
} else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){
80102b86: a1 bc 36 11 80 mov 0x801136bc,%eax
80102b8b: 8b 15 c8 36 11 80 mov 0x801136c8,%edx
80102b91: 83 c0 01 add $0x1,%eax
80102b94: 8d 0c 80 lea (%eax,%eax,4),%ecx
80102b97: 8d 14 4a lea (%edx,%ecx,2),%edx
80102b9a: 83 fa 1e cmp $0x1e,%edx
80102b9d: 7f c9 jg 80102b68 <begin_op+0x18>
// this op might exhaust log space; wait for commit.
sleep(&log, &log.lock);
} else {
log.outstanding += 1;
release(&log.lock);
80102b9f: 83 ec 0c sub $0xc,%esp
sleep(&log, &log.lock);
} else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){
// this op might exhaust log space; wait for commit.
sleep(&log, &log.lock);
} else {
log.outstanding += 1;
80102ba2: a3 bc 36 11 80 mov %eax,0x801136bc
release(&log.lock);
80102ba7: 68 80 36 11 80 push $0x80113680
80102bac: e8 2f 1e 00 00 call 801049e0 <release>
break;
}
}
}
80102bb1: 83 c4 10 add $0x10,%esp
80102bb4: c9 leave
80102bb5: c3 ret
80102bb6: 8d 76 00 lea 0x0(%esi),%esi
80102bb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80102bc0 <end_op>:
// called at the end of each FS system call.
// commits if this was the last outstanding operation.
void
end_op(void)
{
80102bc0: 55 push %ebp
80102bc1: 89 e5 mov %esp,%ebp
80102bc3: 57 push %edi
80102bc4: 56 push %esi
80102bc5: 53 push %ebx
80102bc6: 83 ec 18 sub $0x18,%esp
int do_commit = 0;
acquire(&log.lock);
80102bc9: 68 80 36 11 80 push $0x80113680
80102bce: e8 ed 1c 00 00 call 801048c0 <acquire>
log.outstanding -= 1;
80102bd3: a1 bc 36 11 80 mov 0x801136bc,%eax
if(log.committing)
80102bd8: 8b 1d c0 36 11 80 mov 0x801136c0,%ebx
80102bde: 83 c4 10 add $0x10,%esp
end_op(void)
{
int do_commit = 0;
acquire(&log.lock);
log.outstanding -= 1;
80102be1: 83 e8 01 sub $0x1,%eax
if(log.committing)
80102be4: 85 db test %ebx,%ebx
end_op(void)
{
int do_commit = 0;
acquire(&log.lock);
log.outstanding -= 1;
80102be6: a3 bc 36 11 80 mov %eax,0x801136bc
if(log.committing)
80102beb: 0f 85 23 01 00 00 jne 80102d14 <end_op+0x154>
panic("log.committing");
if(log.outstanding == 0){
80102bf1: 85 c0 test %eax,%eax
80102bf3: 0f 85 f7 00 00 00 jne 80102cf0 <end_op+0x130>
// begin_op() may be waiting for log space,
// and decrementing log.outstanding has decreased
// the amount of reserved space.
wakeup(&log);
}
release(&log.lock);
80102bf9: 83 ec 0c sub $0xc,%esp
log.outstanding -= 1;
if(log.committing)
panic("log.committing");
if(log.outstanding == 0){
do_commit = 1;
log.committing = 1;
80102bfc: c7 05 c0 36 11 80 01 movl $0x1,0x801136c0
80102c03: 00 00 00
}
static void
commit()
{
if (log.lh.n > 0) {
80102c06: 31 db xor %ebx,%ebx
// begin_op() may be waiting for log space,
// and decrementing log.outstanding has decreased
// the amount of reserved space.
wakeup(&log);
}
release(&log.lock);
80102c08: 68 80 36 11 80 push $0x80113680
80102c0d: e8 ce 1d 00 00 call 801049e0 <release>
}
static void
commit()
{
if (log.lh.n > 0) {
80102c12: 8b 0d c8 36 11 80 mov 0x801136c8,%ecx
80102c18: 83 c4 10 add $0x10,%esp
80102c1b: 85 c9 test %ecx,%ecx
80102c1d: 0f 8e 8a 00 00 00 jle 80102cad <end_op+0xed>
80102c23: 90 nop
80102c24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
write_log(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
struct buf *to = bread(log.dev, log.start+tail+1); // log block
80102c28: a1 b4 36 11 80 mov 0x801136b4,%eax
80102c2d: 83 ec 08 sub $0x8,%esp
80102c30: 01 d8 add %ebx,%eax
80102c32: 83 c0 01 add $0x1,%eax
80102c35: 50 push %eax
80102c36: ff 35 c4 36 11 80 pushl 0x801136c4
80102c3c: e8 8f d4 ff ff call 801000d0 <bread>
80102c41: 89 c6 mov %eax,%esi
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102c43: 58 pop %eax
80102c44: 5a pop %edx
80102c45: ff 34 9d cc 36 11 80 pushl -0x7feec934(,%ebx,4)
80102c4c: ff 35 c4 36 11 80 pushl 0x801136c4
static void
write_log(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80102c52: 83 c3 01 add $0x1,%ebx
struct buf *to = bread(log.dev, log.start+tail+1); // log block
struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block
80102c55: e8 76 d4 ff ff call 801000d0 <bread>
80102c5a: 89 c7 mov %eax,%edi
memmove(to->data, from->data, BSIZE);
80102c5c: 8d 40 5c lea 0x5c(%eax),%eax
80102c5f: 83 c4 0c add $0xc,%esp
80102c62: 68 00 02 00 00 push $0x200
80102c67: 50 push %eax
80102c68: 8d 46 5c lea 0x5c(%esi),%eax
80102c6b: 50 push %eax
80102c6c: e8 6f 1e 00 00 call 80104ae0 <memmove>
bwrite(to); // write the log
80102c71: 89 34 24 mov %esi,(%esp)
80102c74: e8 27 d5 ff ff call 801001a0 <bwrite>
brelse(from);
80102c79: 89 3c 24 mov %edi,(%esp)
80102c7c: e8 5f d5 ff ff call 801001e0 <brelse>
brelse(to);
80102c81: 89 34 24 mov %esi,(%esp)
80102c84: e8 57 d5 ff ff call 801001e0 <brelse>
static void
write_log(void)
{
int tail;
for (tail = 0; tail < log.lh.n; tail++) {
80102c89: 83 c4 10 add $0x10,%esp
80102c8c: 3b 1d c8 36 11 80 cmp 0x801136c8,%ebx
80102c92: 7c 94 jl 80102c28 <end_op+0x68>
static void
commit()
{
if (log.lh.n > 0) {
write_log(); // Write modified blocks from cache to log
write_head(); // Write header to disk -- the real commit
80102c94: e8 b7 fd ff ff call 80102a50 <write_head>
install_trans(); // Now install writes to home locations
80102c99: e8 12 fd ff ff call 801029b0 <install_trans>
log.lh.n = 0;
80102c9e: c7 05 c8 36 11 80 00 movl $0x0,0x801136c8
80102ca5: 00 00 00
write_head(); // Erase the transaction from the log
80102ca8: e8 a3 fd ff ff call 80102a50 <write_head>
if(do_commit){
// call commit w/o holding locks, since not allowed
// to sleep with locks.
commit();
acquire(&log.lock);
80102cad: 83 ec 0c sub $0xc,%esp
80102cb0: 68 80 36 11 80 push $0x80113680
80102cb5: e8 06 1c 00 00 call 801048c0 <acquire>
log.committing = 0;
wakeup(&log);
80102cba: c7 04 24 80 36 11 80 movl $0x80113680,(%esp)
if(do_commit){
// call commit w/o holding locks, since not allowed
// to sleep with locks.
commit();
acquire(&log.lock);
log.committing = 0;
80102cc1: c7 05 c0 36 11 80 00 movl $0x0,0x801136c0
80102cc8: 00 00 00
wakeup(&log);
80102ccb: e8 60 13 00 00 call 80104030 <wakeup>
release(&log.lock);
80102cd0: c7 04 24 80 36 11 80 movl $0x80113680,(%esp)
80102cd7: e8 04 1d 00 00 call 801049e0 <release>
80102cdc: 83 c4 10 add $0x10,%esp
}
}
80102cdf: 8d 65 f4 lea -0xc(%ebp),%esp
80102ce2: 5b pop %ebx
80102ce3: 5e pop %esi
80102ce4: 5f pop %edi
80102ce5: 5d pop %ebp
80102ce6: c3 ret
80102ce7: 89 f6 mov %esi,%esi
80102ce9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
log.committing = 1;
} else {
// begin_op() may be waiting for log space,
// and decrementing log.outstanding has decreased
// the amount of reserved space.
wakeup(&log);
80102cf0: 83 ec 0c sub $0xc,%esp
80102cf3: 68 80 36 11 80 push $0x80113680
80102cf8: e8 33 13 00 00 call 80104030 <wakeup>
}
release(&log.lock);
80102cfd: c7 04 24 80 36 11 80 movl $0x80113680,(%esp)
80102d04: e8 d7 1c 00 00 call 801049e0 <release>
80102d09: 83 c4 10 add $0x10,%esp
acquire(&log.lock);
log.committing = 0;
wakeup(&log);
release(&log.lock);
}
}
80102d0c: 8d 65 f4 lea -0xc(%ebp),%esp
80102d0f: 5b pop %ebx
80102d10: 5e pop %esi
80102d11: 5f pop %edi
80102d12: 5d pop %ebp
80102d13: c3 ret
int do_commit = 0;
acquire(&log.lock);
log.outstanding -= 1;
if(log.committing)
panic("log.committing");
80102d14: 83 ec 0c sub $0xc,%esp
80102d17: 68 e4 7a 10 80 push $0x80107ae4
80102d1c: e8 4f d6 ff ff call 80100370 <panic>
80102d21: eb 0d jmp 80102d30 <log_write>
80102d23: 90 nop
80102d24: 90 nop
80102d25: 90 nop
80102d26: 90 nop
80102d27: 90 nop
80102d28: 90 nop
80102d29: 90 nop
80102d2a: 90 nop
80102d2b: 90 nop
80102d2c: 90 nop
80102d2d: 90 nop
80102d2e: 90 nop
80102d2f: 90 nop
80102d30 <log_write>:
// modify bp->data[]
// log_write(bp)
// brelse(bp)
void
log_write(struct buf *b)
{
80102d30: 55 push %ebp
80102d31: 89 e5 mov %esp,%ebp
80102d33: 53 push %ebx
80102d34: 83 ec 04 sub $0x4,%esp
int i;
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
80102d37: 8b 15 c8 36 11 80 mov 0x801136c8,%edx
// modify bp->data[]
// log_write(bp)
// brelse(bp)
void
log_write(struct buf *b)
{
80102d3d: 8b 5d 08 mov 0x8(%ebp),%ebx
int i;
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
80102d40: 83 fa 1d cmp $0x1d,%edx
80102d43: 0f 8f 97 00 00 00 jg 80102de0 <log_write+0xb0>
80102d49: a1 b8 36 11 80 mov 0x801136b8,%eax
80102d4e: 83 e8 01 sub $0x1,%eax
80102d51: 39 c2 cmp %eax,%edx
80102d53: 0f 8d 87 00 00 00 jge 80102de0 <log_write+0xb0>
panic("too big a transaction");
if (log.outstanding < 1)
80102d59: a1 bc 36 11 80 mov 0x801136bc,%eax
80102d5e: 85 c0 test %eax,%eax
80102d60: 0f 8e 87 00 00 00 jle 80102ded <log_write+0xbd>
panic("log_write outside of trans");
acquire(&log.lock);
80102d66: 83 ec 0c sub $0xc,%esp
80102d69: 68 80 36 11 80 push $0x80113680
80102d6e: e8 4d 1b 00 00 call 801048c0 <acquire>
for (i = 0; i < log.lh.n; i++) {
80102d73: 8b 15 c8 36 11 80 mov 0x801136c8,%edx
80102d79: 83 c4 10 add $0x10,%esp
80102d7c: 83 fa 00 cmp $0x0,%edx
80102d7f: 7e 50 jle 80102dd1 <log_write+0xa1>
if (log.lh.block[i] == b->blockno) // log absorbtion
80102d81: 8b 4b 08 mov 0x8(%ebx),%ecx
panic("too big a transaction");
if (log.outstanding < 1)
panic("log_write outside of trans");
acquire(&log.lock);
for (i = 0; i < log.lh.n; i++) {
80102d84: 31 c0 xor %eax,%eax
if (log.lh.block[i] == b->blockno) // log absorbtion
80102d86: 3b 0d cc 36 11 80 cmp 0x801136cc,%ecx
80102d8c: 75 0b jne 80102d99 <log_write+0x69>
80102d8e: eb 38 jmp 80102dc8 <log_write+0x98>
80102d90: 39 0c 85 cc 36 11 80 cmp %ecx,-0x7feec934(,%eax,4)
80102d97: 74 2f je 80102dc8 <log_write+0x98>
panic("too big a transaction");
if (log.outstanding < 1)
panic("log_write outside of trans");
acquire(&log.lock);
for (i = 0; i < log.lh.n; i++) {
80102d99: 83 c0 01 add $0x1,%eax
80102d9c: 39 d0 cmp %edx,%eax
80102d9e: 75 f0 jne 80102d90 <log_write+0x60>
if (log.lh.block[i] == b->blockno) // log absorbtion
break;
}
log.lh.block[i] = b->blockno;
80102da0: 89 0c 95 cc 36 11 80 mov %ecx,-0x7feec934(,%edx,4)
if (i == log.lh.n)
log.lh.n++;
80102da7: 83 c2 01 add $0x1,%edx
80102daa: 89 15 c8 36 11 80 mov %edx,0x801136c8
b->flags |= B_DIRTY; // prevent eviction
80102db0: 83 0b 04 orl $0x4,(%ebx)
release(&log.lock);
80102db3: c7 45 08 80 36 11 80 movl $0x80113680,0x8(%ebp)
}
80102dba: 8b 5d fc mov -0x4(%ebp),%ebx
80102dbd: c9 leave
}
log.lh.block[i] = b->blockno;
if (i == log.lh.n)
log.lh.n++;
b->flags |= B_DIRTY; // prevent eviction
release(&log.lock);
80102dbe: e9 1d 1c 00 00 jmp 801049e0 <release>
80102dc3: 90 nop
80102dc4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
acquire(&log.lock);
for (i = 0; i < log.lh.n; i++) {
if (log.lh.block[i] == b->blockno) // log absorbtion
break;
}
log.lh.block[i] = b->blockno;
80102dc8: 89 0c 85 cc 36 11 80 mov %ecx,-0x7feec934(,%eax,4)
80102dcf: eb df jmp 80102db0 <log_write+0x80>
80102dd1: 8b 43 08 mov 0x8(%ebx),%eax
80102dd4: a3 cc 36 11 80 mov %eax,0x801136cc
if (i == log.lh.n)
80102dd9: 75 d5 jne 80102db0 <log_write+0x80>
80102ddb: eb ca jmp 80102da7 <log_write+0x77>
80102ddd: 8d 76 00 lea 0x0(%esi),%esi
log_write(struct buf *b)
{
int i;
if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1)
panic("too big a transaction");
80102de0: 83 ec 0c sub $0xc,%esp
80102de3: 68 f3 7a 10 80 push $0x80107af3
80102de8: e8 83 d5 ff ff call 80100370 <panic>
if (log.outstanding < 1)
panic("log_write outside of trans");
80102ded: 83 ec 0c sub $0xc,%esp
80102df0: 68 09 7b 10 80 push $0x80107b09
80102df5: e8 76 d5 ff ff call 80100370 <panic>
80102dfa: 66 90 xchg %ax,%ax
80102dfc: 66 90 xchg %ax,%ax
80102dfe: 66 90 xchg %ax,%ax
80102e00 <mpmain>:
}
// Common CPU setup code.
static void
mpmain(void)
{
80102e00: 55 push %ebp
80102e01: 89 e5 mov %esp,%ebp
80102e03: 53 push %ebx
80102e04: 83 ec 04 sub $0x4,%esp
cprintf("cpu%d: starting %d\n", cpuid(), cpuid());
80102e07: e8 74 09 00 00 call 80103780 <cpuid>
80102e0c: 89 c3 mov %eax,%ebx
80102e0e: e8 6d 09 00 00 call 80103780 <cpuid>
80102e13: 83 ec 04 sub $0x4,%esp
80102e16: 53 push %ebx
80102e17: 50 push %eax
80102e18: 68 24 7b 10 80 push $0x80107b24
80102e1d: e8 3e d8 ff ff call 80100660 <cprintf>
idtinit(); // load idt register
80102e22: e8 39 30 00 00 call 80105e60 <idtinit>
xchg(&(mycpu()->started), 1); // tell startothers() we're up
80102e27: e8 d4 08 00 00 call 80103700 <mycpu>
80102e2c: 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" :
80102e2e: b8 01 00 00 00 mov $0x1,%eax
80102e33: f0 87 82 a0 00 00 00 lock xchg %eax,0xa0(%edx)
scheduler(); // start running processes
80102e3a: e8 11 0d 00 00 call 80103b50 <scheduler>
80102e3f: 90 nop
80102e40 <mpenter>:
}
// Other CPUs jump here from entryother.S.
static void
mpenter(void)
{
80102e40: 55 push %ebp
80102e41: 89 e5 mov %esp,%ebp
80102e43: 83 ec 08 sub $0x8,%esp
switchkvm();
80102e46: e8 35 41 00 00 call 80106f80 <switchkvm>
seginit();
80102e4b: e8 30 40 00 00 call 80106e80 <seginit>
lapicinit();
80102e50: e8 9b f7 ff ff call 801025f0 <lapicinit>
mpmain();
80102e55: e8 a6 ff ff ff call 80102e00 <mpmain>
80102e5a: 66 90 xchg %ax,%ax
80102e5c: 66 90 xchg %ax,%ax
80102e5e: 66 90 xchg %ax,%ax
80102e60 <main>:
// Bootstrap processor starts running C code here.
// Allocate a real stack and switch to it, first
// doing some setup required for memory allocator to work.
int
main(void)
{
80102e60: 8d 4c 24 04 lea 0x4(%esp),%ecx
80102e64: 83 e4 f0 and $0xfffffff0,%esp
80102e67: ff 71 fc pushl -0x4(%ecx)
80102e6a: 55 push %ebp
80102e6b: 89 e5 mov %esp,%ebp
80102e6d: 53 push %ebx
80102e6e: 51 push %ecx
// The linker has placed the image of entryother.S in
// _binary_entryother_start.
code = P2V(0x7000);
memmove(code, _binary_entryother_start, (uint)_binary_entryother_size);
for(c = cpus; c < cpus+ncpu; c++){
80102e6f: bb 80 37 11 80 mov $0x80113780,%ebx
// Allocate a real stack and switch to it, first
// doing some setup required for memory allocator to work.
int
main(void)
{
kinit1(end, P2V(4*1024*1024)); // phys page allocator
80102e74: 83 ec 08 sub $0x8,%esp
80102e77: 68 00 00 40 80 push $0x80400000
80102e7c: 68 a8 67 11 80 push $0x801167a8
80102e81: e8 3a f5 ff ff call 801023c0 <kinit1>
kvmalloc(); // kernel page table
80102e86: e8 95 45 00 00 call 80107420 <kvmalloc>
mpinit(); // detect other processors
80102e8b: e8 70 01 00 00 call 80103000 <mpinit>
lapicinit(); // interrupt controller
80102e90: e8 5b f7 ff ff call 801025f0 <lapicinit>
seginit(); // segment descriptors
80102e95: e8 e6 3f 00 00 call 80106e80 <seginit>
picinit(); // disable pic
80102e9a: e8 31 03 00 00 call 801031d0 <picinit>
ioapicinit(); // another interrupt controller
80102e9f: e8 4c f3 ff ff call 801021f0 <ioapicinit>
consoleinit(); // console hardware
80102ea4: e8 f7 da ff ff call 801009a0 <consoleinit>
uartinit(); // serial port
80102ea9: e8 a2 32 00 00 call 80106150 <uartinit>
pinit(); // process table
80102eae: e8 2d 08 00 00 call 801036e0 <pinit>
tvinit(); // trap vectors
80102eb3: e8 08 2f 00 00 call 80105dc0 <tvinit>
binit(); // buffer cache
80102eb8: e8 83 d1 ff ff call 80100040 <binit>
fileinit(); // file table
80102ebd: e8 8e de ff ff call 80100d50 <fileinit>
ideinit(); // disk
80102ec2: e8 09 f1 ff ff call 80101fd0 <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);
80102ec7: 83 c4 0c add $0xc,%esp
80102eca: 68 8a 00 00 00 push $0x8a
80102ecf: 68 8c b4 10 80 push $0x8010b48c
80102ed4: 68 00 70 00 80 push $0x80007000
80102ed9: e8 02 1c 00 00 call 80104ae0 <memmove>
for(c = cpus; c < cpus+ncpu; c++){
80102ede: 69 05 00 3d 11 80 b0 imul $0xb0,0x80113d00,%eax
80102ee5: 00 00 00
80102ee8: 83 c4 10 add $0x10,%esp
80102eeb: 05 80 37 11 80 add $0x80113780,%eax
80102ef0: 39 d8 cmp %ebx,%eax
80102ef2: 76 6f jbe 80102f63 <main+0x103>
80102ef4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(c == mycpu()) // We've started already.
80102ef8: e8 03 08 00 00 call 80103700 <mycpu>
80102efd: 39 d8 cmp %ebx,%eax
80102eff: 74 49 je 80102f4a <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();
80102f01: e8 8a f5 ff ff call 80102490 <kalloc>
*(void**)(code-4) = stack + KSTACKSIZE;
80102f06: 05 00 10 00 00 add $0x1000,%eax
*(void**)(code-8) = mpenter;
80102f0b: c7 05 f8 6f 00 80 40 movl $0x80102e40,0x80006ff8
80102f12: 2e 10 80
*(int**)(code-12) = (void *) V2P(entrypgdir);
80102f15: c7 05 f4 6f 00 80 00 movl $0x10a000,0x80006ff4
80102f1c: a0 10 00
// 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();
*(void**)(code-4) = stack + KSTACKSIZE;
80102f1f: a3 fc 6f 00 80 mov %eax,0x80006ffc
*(void**)(code-8) = mpenter;
*(int**)(code-12) = (void *) V2P(entrypgdir);
lapicstartap(c->apicid, V2P(code));
80102f24: 0f b6 03 movzbl (%ebx),%eax
80102f27: 83 ec 08 sub $0x8,%esp
80102f2a: 68 00 70 00 00 push $0x7000
80102f2f: 50 push %eax
80102f30: e8 0b f8 ff ff call 80102740 <lapicstartap>
80102f35: 83 c4 10 add $0x10,%esp
80102f38: 90 nop
80102f39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
// wait for cpu to finish mpmain()
while(c->started == 0)
80102f40: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
80102f46: 85 c0 test %eax,%eax
80102f48: 74 f6 je 80102f40 <main+0xe0>
// The linker has placed the image of entryother.S in
// _binary_entryother_start.
code = P2V(0x7000);
memmove(code, _binary_entryother_start, (uint)_binary_entryother_size);
for(c = cpus; c < cpus+ncpu; c++){
80102f4a: 69 05 00 3d 11 80 b0 imul $0xb0,0x80113d00,%eax
80102f51: 00 00 00
80102f54: 81 c3 b0 00 00 00 add $0xb0,%ebx
80102f5a: 05 80 37 11 80 add $0x80113780,%eax
80102f5f: 39 c3 cmp %eax,%ebx
80102f61: 72 95 jb 80102ef8 <main+0x98>
tvinit(); // trap vectors
binit(); // buffer cache
fileinit(); // file table
ideinit(); // disk
startothers(); // start other processors
kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers()
80102f63: 83 ec 08 sub $0x8,%esp
80102f66: 68 00 00 00 8e push $0x8e000000
80102f6b: 68 00 00 40 80 push $0x80400000
80102f70: e8 bb f4 ff ff call 80102430 <kinit2>
userinit(); // first user process
80102f75: e8 56 08 00 00 call 801037d0 <userinit>
mpmain(); // finish this processor's setup
80102f7a: e8 81 fe ff ff call 80102e00 <mpmain>
80102f7f: 90 nop
80102f80 <mpsearch1>:
}
// Look for an MP structure in the len bytes at addr.
static struct mp*
mpsearch1(uint a, int len)
{
80102f80: 55 push %ebp
80102f81: 89 e5 mov %esp,%ebp
80102f83: 57 push %edi
80102f84: 56 push %esi
uchar *e, *p, *addr;
addr = P2V(a);
80102f85: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi
}
// Look for an MP structure in the len bytes at addr.
static struct mp*
mpsearch1(uint a, int len)
{
80102f8b: 53 push %ebx
uchar *e, *p, *addr;
addr = P2V(a);
e = addr+len;
80102f8c: 8d 1c 16 lea (%esi,%edx,1),%ebx
}
// Look for an MP structure in the len bytes at addr.
static struct mp*
mpsearch1(uint a, int len)
{
80102f8f: 83 ec 0c sub $0xc,%esp
uchar *e, *p, *addr;
addr = P2V(a);
e = addr+len;
for(p = addr; p < e; p += sizeof(struct mp))
80102f92: 39 de cmp %ebx,%esi
80102f94: 73 48 jae 80102fde <mpsearch1+0x5e>
80102f96: 8d 76 00 lea 0x0(%esi),%esi
80102f99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
80102fa0: 83 ec 04 sub $0x4,%esp
80102fa3: 8d 7e 10 lea 0x10(%esi),%edi
80102fa6: 6a 04 push $0x4
80102fa8: 68 38 7b 10 80 push $0x80107b38
80102fad: 56 push %esi
80102fae: e8 cd 1a 00 00 call 80104a80 <memcmp>
80102fb3: 83 c4 10 add $0x10,%esp
80102fb6: 85 c0 test %eax,%eax
80102fb8: 75 1e jne 80102fd8 <mpsearch1+0x58>
80102fba: 8d 7e 10 lea 0x10(%esi),%edi
80102fbd: 89 f2 mov %esi,%edx
80102fbf: 31 c9 xor %ecx,%ecx
80102fc1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
sum += addr[i];
80102fc8: 0f b6 02 movzbl (%edx),%eax
80102fcb: 83 c2 01 add $0x1,%edx
80102fce: 01 c1 add %eax,%ecx
sum(uchar *addr, int len)
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
80102fd0: 39 fa cmp %edi,%edx
80102fd2: 75 f4 jne 80102fc8 <mpsearch1+0x48>
uchar *e, *p, *addr;
addr = P2V(a);
e = addr+len;
for(p = addr; p < e; p += sizeof(struct mp))
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
80102fd4: 84 c9 test %cl,%cl
80102fd6: 74 10 je 80102fe8 <mpsearch1+0x68>
{
uchar *e, *p, *addr;
addr = P2V(a);
e = addr+len;
for(p = addr; p < e; p += sizeof(struct mp))
80102fd8: 39 fb cmp %edi,%ebx
80102fda: 89 fe mov %edi,%esi
80102fdc: 77 c2 ja 80102fa0 <mpsearch1+0x20>
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
return (struct mp*)p;
return 0;
}
80102fde: 8d 65 f4 lea -0xc(%ebp),%esp
addr = P2V(a);
e = addr+len;
for(p = addr; p < e; p += sizeof(struct mp))
if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
return (struct mp*)p;
return 0;
80102fe1: 31 c0 xor %eax,%eax
}
80102fe3: 5b pop %ebx
80102fe4: 5e pop %esi
80102fe5: 5f pop %edi
80102fe6: 5d pop %ebp
80102fe7: c3 ret
80102fe8: 8d 65 f4 lea -0xc(%ebp),%esp
80102feb: 89 f0 mov %esi,%eax
80102fed: 5b pop %ebx
80102fee: 5e pop %esi
80102fef: 5f pop %edi
80102ff0: 5d pop %ebp
80102ff1: c3 ret
80102ff2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80102ff9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103000 <mpinit>:
return conf;
}
void
mpinit(void)
{
80103000: 55 push %ebp
80103001: 89 e5 mov %esp,%ebp
80103003: 57 push %edi
80103004: 56 push %esi
80103005: 53 push %ebx
80103006: 83 ec 1c sub $0x1c,%esp
uchar *bda;
uint p;
struct mp *mp;
bda = (uchar *) P2V(0x400);
if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){
80103009: 0f b6 05 0f 04 00 80 movzbl 0x8000040f,%eax
80103010: 0f b6 15 0e 04 00 80 movzbl 0x8000040e,%edx
80103017: c1 e0 08 shl $0x8,%eax
8010301a: 09 d0 or %edx,%eax
8010301c: c1 e0 04 shl $0x4,%eax
8010301f: 85 c0 test %eax,%eax
80103021: 75 1b jne 8010303e <mpinit+0x3e>
if((mp = mpsearch1(p, 1024)))
return mp;
} else {
p = ((bda[0x14]<<8)|bda[0x13])*1024;
if((mp = mpsearch1(p-1024, 1024)))
80103023: 0f b6 05 14 04 00 80 movzbl 0x80000414,%eax
8010302a: 0f b6 15 13 04 00 80 movzbl 0x80000413,%edx
80103031: c1 e0 08 shl $0x8,%eax
80103034: 09 d0 or %edx,%eax
80103036: c1 e0 0a shl $0xa,%eax
80103039: 2d 00 04 00 00 sub $0x400,%eax
uint p;
struct mp *mp;
bda = (uchar *) P2V(0x400);
if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){
if((mp = mpsearch1(p, 1024)))
8010303e: ba 00 04 00 00 mov $0x400,%edx
80103043: e8 38 ff ff ff call 80102f80 <mpsearch1>
80103048: 85 c0 test %eax,%eax
8010304a: 89 45 e4 mov %eax,-0x1c(%ebp)
8010304d: 0f 84 37 01 00 00 je 8010318a <mpinit+0x18a>
mpconfig(struct mp **pmp)
{
struct mpconf *conf;
struct mp *mp;
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
80103053: 8b 45 e4 mov -0x1c(%ebp),%eax
80103056: 8b 58 04 mov 0x4(%eax),%ebx
80103059: 85 db test %ebx,%ebx
8010305b: 0f 84 43 01 00 00 je 801031a4 <mpinit+0x1a4>
return 0;
conf = (struct mpconf*) P2V((uint) mp->physaddr);
80103061: 8d b3 00 00 00 80 lea -0x80000000(%ebx),%esi
if(memcmp(conf, "PCMP", 4) != 0)
80103067: 83 ec 04 sub $0x4,%esp
8010306a: 6a 04 push $0x4
8010306c: 68 3d 7b 10 80 push $0x80107b3d
80103071: 56 push %esi
80103072: e8 09 1a 00 00 call 80104a80 <memcmp>
80103077: 83 c4 10 add $0x10,%esp
8010307a: 85 c0 test %eax,%eax
8010307c: 0f 85 22 01 00 00 jne 801031a4 <mpinit+0x1a4>
return 0;
if(conf->version != 1 && conf->version != 4)
80103082: 0f b6 83 06 00 00 80 movzbl -0x7ffffffa(%ebx),%eax
80103089: 3c 01 cmp $0x1,%al
8010308b: 74 08 je 80103095 <mpinit+0x95>
8010308d: 3c 04 cmp $0x4,%al
8010308f: 0f 85 0f 01 00 00 jne 801031a4 <mpinit+0x1a4>
return 0;
if(sum((uchar*)conf, conf->length) != 0)
80103095: 0f b7 bb 04 00 00 80 movzwl -0x7ffffffc(%ebx),%edi
sum(uchar *addr, int len)
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
8010309c: 85 ff test %edi,%edi
8010309e: 74 21 je 801030c1 <mpinit+0xc1>
801030a0: 31 d2 xor %edx,%edx
801030a2: 31 c0 xor %eax,%eax
801030a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
sum += addr[i];
801030a8: 0f b6 8c 03 00 00 00 movzbl -0x80000000(%ebx,%eax,1),%ecx
801030af: 80
sum(uchar *addr, int len)
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
801030b0: 83 c0 01 add $0x1,%eax
sum += addr[i];
801030b3: 01 ca add %ecx,%edx
sum(uchar *addr, int len)
{
int i, sum;
sum = 0;
for(i=0; i<len; i++)
801030b5: 39 c7 cmp %eax,%edi
801030b7: 75 ef jne 801030a8 <mpinit+0xa8>
conf = (struct mpconf*) P2V((uint) mp->physaddr);
if(memcmp(conf, "PCMP", 4) != 0)
return 0;
if(conf->version != 1 && conf->version != 4)
return 0;
if(sum((uchar*)conf, conf->length) != 0)
801030b9: 84 d2 test %dl,%dl
801030bb: 0f 85 e3 00 00 00 jne 801031a4 <mpinit+0x1a4>
struct mp *mp;
struct mpconf *conf;
struct mpproc *proc;
struct mpioapic *ioapic;
if((conf = mpconfig(&mp)) == 0)
801030c1: 85 f6 test %esi,%esi
801030c3: 0f 84 db 00 00 00 je 801031a4 <mpinit+0x1a4>
panic("Expect to run on an SMP");
ismp = 1;
lapic = (uint*)conf->lapicaddr;
801030c9: 8b 83 24 00 00 80 mov -0x7fffffdc(%ebx),%eax
801030cf: a3 7c 36 11 80 mov %eax,0x8011367c
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
801030d4: 0f b7 93 04 00 00 80 movzwl -0x7ffffffc(%ebx),%edx
801030db: 8d 83 2c 00 00 80 lea -0x7fffffd4(%ebx),%eax
struct mpproc *proc;
struct mpioapic *ioapic;
if((conf = mpconfig(&mp)) == 0)
panic("Expect to run on an SMP");
ismp = 1;
801030e1: bb 01 00 00 00 mov $0x1,%ebx
lapic = (uint*)conf->lapicaddr;
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
801030e6: 01 d6 add %edx,%esi
801030e8: 90 nop
801030e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801030f0: 39 c6 cmp %eax,%esi
801030f2: 76 23 jbe 80103117 <mpinit+0x117>
801030f4: 0f b6 10 movzbl (%eax),%edx
switch(*p){
801030f7: 80 fa 04 cmp $0x4,%dl
801030fa: 0f 87 c0 00 00 00 ja 801031c0 <mpinit+0x1c0>
80103100: ff 24 95 7c 7b 10 80 jmp *-0x7fef8484(,%edx,4)
80103107: 89 f6 mov %esi,%esi
80103109: 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;
80103110: 83 c0 08 add $0x8,%eax
if((conf = mpconfig(&mp)) == 0)
panic("Expect to run on an SMP");
ismp = 1;
lapic = (uint*)conf->lapicaddr;
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
80103113: 39 c6 cmp %eax,%esi
80103115: 77 dd ja 801030f4 <mpinit+0xf4>
default:
ismp = 0;
break;
}
}
if(!ismp)
80103117: 85 db test %ebx,%ebx
80103119: 0f 84 92 00 00 00 je 801031b1 <mpinit+0x1b1>
panic("Didn't find a suitable machine");
if(mp->imcrp){
8010311f: 8b 45 e4 mov -0x1c(%ebp),%eax
80103122: 80 78 0c 00 cmpb $0x0,0xc(%eax)
80103126: 74 15 je 8010313d <mpinit+0x13d>
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80103128: ba 22 00 00 00 mov $0x22,%edx
8010312d: b8 70 00 00 00 mov $0x70,%eax
80103132: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
80103133: ba 23 00 00 00 mov $0x23,%edx
80103138: ec in (%dx),%al
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80103139: 83 c8 01 or $0x1,%eax
8010313c: ee out %al,(%dx)
// 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.
}
}
8010313d: 8d 65 f4 lea -0xc(%ebp),%esp
80103140: 5b pop %ebx
80103141: 5e pop %esi
80103142: 5f pop %edi
80103143: 5d pop %ebp
80103144: c3 ret
80103145: 8d 76 00 lea 0x0(%esi),%esi
lapic = (uint*)conf->lapicaddr;
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
switch(*p){
case MPPROC:
proc = (struct mpproc*)p;
if(ncpu < NCPU) {
80103148: 8b 0d 00 3d 11 80 mov 0x80113d00,%ecx
8010314e: 83 f9 07 cmp $0x7,%ecx
80103151: 7f 19 jg 8010316c <mpinit+0x16c>
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
80103153: 0f b6 50 01 movzbl 0x1(%eax),%edx
80103157: 69 f9 b0 00 00 00 imul $0xb0,%ecx,%edi
ncpu++;
8010315d: 83 c1 01 add $0x1,%ecx
80103160: 89 0d 00 3d 11 80 mov %ecx,0x80113d00
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
switch(*p){
case MPPROC:
proc = (struct mpproc*)p;
if(ncpu < NCPU) {
cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu
80103166: 88 97 80 37 11 80 mov %dl,-0x7feec880(%edi)
ncpu++;
}
p += sizeof(struct mpproc);
8010316c: 83 c0 14 add $0x14,%eax
continue;
8010316f: e9 7c ff ff ff jmp 801030f0 <mpinit+0xf0>
80103174: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
case MPIOAPIC:
ioapic = (struct mpioapic*)p;
ioapicid = ioapic->apicno;
80103178: 0f b6 50 01 movzbl 0x1(%eax),%edx
p += sizeof(struct mpioapic);
8010317c: 83 c0 08 add $0x8,%eax
}
p += sizeof(struct mpproc);
continue;
case MPIOAPIC:
ioapic = (struct mpioapic*)p;
ioapicid = ioapic->apicno;
8010317f: 88 15 60 37 11 80 mov %dl,0x80113760
p += sizeof(struct mpioapic);
continue;
80103185: e9 66 ff ff ff jmp 801030f0 <mpinit+0xf0>
} else {
p = ((bda[0x14]<<8)|bda[0x13])*1024;
if((mp = mpsearch1(p-1024, 1024)))
return mp;
}
return mpsearch1(0xF0000, 0x10000);
8010318a: ba 00 00 01 00 mov $0x10000,%edx
8010318f: b8 00 00 0f 00 mov $0xf0000,%eax
80103194: e8 e7 fd ff ff call 80102f80 <mpsearch1>
mpconfig(struct mp **pmp)
{
struct mpconf *conf;
struct mp *mp;
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
80103199: 85 c0 test %eax,%eax
} else {
p = ((bda[0x14]<<8)|bda[0x13])*1024;
if((mp = mpsearch1(p-1024, 1024)))
return mp;
}
return mpsearch1(0xF0000, 0x10000);
8010319b: 89 45 e4 mov %eax,-0x1c(%ebp)
mpconfig(struct mp **pmp)
{
struct mpconf *conf;
struct mp *mp;
if((mp = mpsearch()) == 0 || mp->physaddr == 0)
8010319e: 0f 85 af fe ff ff jne 80103053 <mpinit+0x53>
struct mpconf *conf;
struct mpproc *proc;
struct mpioapic *ioapic;
if((conf = mpconfig(&mp)) == 0)
panic("Expect to run on an SMP");
801031a4: 83 ec 0c sub $0xc,%esp
801031a7: 68 42 7b 10 80 push $0x80107b42
801031ac: e8 bf d1 ff ff call 80100370 <panic>
ismp = 0;
break;
}
}
if(!ismp)
panic("Didn't find a suitable machine");
801031b1: 83 ec 0c sub $0xc,%esp
801031b4: 68 5c 7b 10 80 push $0x80107b5c
801031b9: e8 b2 d1 ff ff call 80100370 <panic>
801031be: 66 90 xchg %ax,%ax
case MPIOINTR:
case MPLINTR:
p += 8;
continue;
default:
ismp = 0;
801031c0: 31 db xor %ebx,%ebx
801031c2: e9 30 ff ff ff jmp 801030f7 <mpinit+0xf7>
801031c7: 66 90 xchg %ax,%ax
801031c9: 66 90 xchg %ax,%ax
801031cb: 66 90 xchg %ax,%ax
801031cd: 66 90 xchg %ax,%ax
801031cf: 90 nop
801031d0 <picinit>:
801031d0: 55 push %ebp
801031d1: ba 21 00 00 00 mov $0x21,%edx
801031d6: b8 ff ff ff ff mov $0xffffffff,%eax
801031db: 89 e5 mov %esp,%ebp
801031dd: ee out %al,(%dx)
801031de: ba a1 00 00 00 mov $0xa1,%edx
801031e3: ee out %al,(%dx)
801031e4: 5d pop %ebp
801031e5: c3 ret
801031e6: 66 90 xchg %ax,%ax
801031e8: 66 90 xchg %ax,%ax
801031ea: 66 90 xchg %ax,%ax
801031ec: 66 90 xchg %ax,%ax
801031ee: 66 90 xchg %ax,%ax
801031f0 <pipealloc>:
int writeopen; // write fd is still open
};
int
pipealloc(struct file **f0, struct file **f1)
{
801031f0: 55 push %ebp
801031f1: 89 e5 mov %esp,%ebp
801031f3: 57 push %edi
801031f4: 56 push %esi
801031f5: 53 push %ebx
801031f6: 83 ec 0c sub $0xc,%esp
801031f9: 8b 75 08 mov 0x8(%ebp),%esi
801031fc: 8b 5d 0c mov 0xc(%ebp),%ebx
struct pipe *p;
p = 0;
*f0 = *f1 = 0;
801031ff: c7 03 00 00 00 00 movl $0x0,(%ebx)
80103205: c7 06 00 00 00 00 movl $0x0,(%esi)
if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0)
8010320b: e8 60 db ff ff call 80100d70 <filealloc>
80103210: 85 c0 test %eax,%eax
80103212: 89 06 mov %eax,(%esi)
80103214: 0f 84 a8 00 00 00 je 801032c2 <pipealloc+0xd2>
8010321a: e8 51 db ff ff call 80100d70 <filealloc>
8010321f: 85 c0 test %eax,%eax
80103221: 89 03 mov %eax,(%ebx)
80103223: 0f 84 87 00 00 00 je 801032b0 <pipealloc+0xc0>
goto bad;
if((p = (struct pipe*)kalloc()) == 0)
80103229: e8 62 f2 ff ff call 80102490 <kalloc>
8010322e: 85 c0 test %eax,%eax
80103230: 89 c7 mov %eax,%edi
80103232: 0f 84 b0 00 00 00 je 801032e8 <pipealloc+0xf8>
goto bad;
p->readopen = 1;
p->writeopen = 1;
p->nwrite = 0;
p->nread = 0;
initlock(&p->lock, "pipe");
80103238: 83 ec 08 sub $0x8,%esp
*f0 = *f1 = 0;
if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0)
goto bad;
if((p = (struct pipe*)kalloc()) == 0)
goto bad;
p->readopen = 1;
8010323b: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax)
80103242: 00 00 00
p->writeopen = 1;
80103245: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax)
8010324c: 00 00 00
p->nwrite = 0;
8010324f: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax)
80103256: 00 00 00
p->nread = 0;
80103259: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax)
80103260: 00 00 00
initlock(&p->lock, "pipe");
80103263: 68 90 7b 10 80 push $0x80107b90
80103268: 50 push %eax
80103269: e8 52 15 00 00 call 801047c0 <initlock>
(*f0)->type = FD_PIPE;
8010326e: 8b 06 mov (%esi),%eax
(*f0)->pipe = p;
(*f1)->type = FD_PIPE;
(*f1)->readable = 0;
(*f1)->writable = 1;
(*f1)->pipe = p;
return 0;
80103270: 83 c4 10 add $0x10,%esp
p->readopen = 1;
p->writeopen = 1;
p->nwrite = 0;
p->nread = 0;
initlock(&p->lock, "pipe");
(*f0)->type = FD_PIPE;
80103273: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f0)->readable = 1;
80103279: 8b 06 mov (%esi),%eax
8010327b: c6 40 08 01 movb $0x1,0x8(%eax)
(*f0)->writable = 0;
8010327f: 8b 06 mov (%esi),%eax
80103281: c6 40 09 00 movb $0x0,0x9(%eax)
(*f0)->pipe = p;
80103285: 8b 06 mov (%esi),%eax
80103287: 89 78 0c mov %edi,0xc(%eax)
(*f1)->type = FD_PIPE;
8010328a: 8b 03 mov (%ebx),%eax
8010328c: c7 00 01 00 00 00 movl $0x1,(%eax)
(*f1)->readable = 0;
80103292: 8b 03 mov (%ebx),%eax
80103294: c6 40 08 00 movb $0x0,0x8(%eax)
(*f1)->writable = 1;
80103298: 8b 03 mov (%ebx),%eax
8010329a: c6 40 09 01 movb $0x1,0x9(%eax)
(*f1)->pipe = p;
8010329e: 8b 03 mov (%ebx),%eax
801032a0: 89 78 0c mov %edi,0xc(%eax)
if(*f0)
fileclose(*f0);
if(*f1)
fileclose(*f1);
return -1;
}
801032a3: 8d 65 f4 lea -0xc(%ebp),%esp
(*f0)->pipe = p;
(*f1)->type = FD_PIPE;
(*f1)->readable = 0;
(*f1)->writable = 1;
(*f1)->pipe = p;
return 0;
801032a6: 31 c0 xor %eax,%eax
if(*f0)
fileclose(*f0);
if(*f1)
fileclose(*f1);
return -1;
}
801032a8: 5b pop %ebx
801032a9: 5e pop %esi
801032aa: 5f pop %edi
801032ab: 5d pop %ebp
801032ac: c3 ret
801032ad: 8d 76 00 lea 0x0(%esi),%esi
return 0;
bad:
if(p)
kfree((char*)p);
if(*f0)
801032b0: 8b 06 mov (%esi),%eax
801032b2: 85 c0 test %eax,%eax
801032b4: 74 1e je 801032d4 <pipealloc+0xe4>
fileclose(*f0);
801032b6: 83 ec 0c sub $0xc,%esp
801032b9: 50 push %eax
801032ba: e8 71 db ff ff call 80100e30 <fileclose>
801032bf: 83 c4 10 add $0x10,%esp
if(*f1)
801032c2: 8b 03 mov (%ebx),%eax
801032c4: 85 c0 test %eax,%eax
801032c6: 74 0c je 801032d4 <pipealloc+0xe4>
fileclose(*f1);
801032c8: 83 ec 0c sub $0xc,%esp
801032cb: 50 push %eax
801032cc: e8 5f db ff ff call 80100e30 <fileclose>
801032d1: 83 c4 10 add $0x10,%esp
return -1;
}
801032d4: 8d 65 f4 lea -0xc(%ebp),%esp
kfree((char*)p);
if(*f0)
fileclose(*f0);
if(*f1)
fileclose(*f1);
return -1;
801032d7: b8 ff ff ff ff mov $0xffffffff,%eax
}
801032dc: 5b pop %ebx
801032dd: 5e pop %esi
801032de: 5f pop %edi
801032df: 5d pop %ebp
801032e0: c3 ret
801032e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return 0;
bad:
if(p)
kfree((char*)p);
if(*f0)
801032e8: 8b 06 mov (%esi),%eax
801032ea: 85 c0 test %eax,%eax
801032ec: 75 c8 jne 801032b6 <pipealloc+0xc6>
801032ee: eb d2 jmp 801032c2 <pipealloc+0xd2>
801032f0 <pipeclose>:
return -1;
}
void
pipeclose(struct pipe *p, int writable)
{
801032f0: 55 push %ebp
801032f1: 89 e5 mov %esp,%ebp
801032f3: 56 push %esi
801032f4: 53 push %ebx
801032f5: 8b 5d 08 mov 0x8(%ebp),%ebx
801032f8: 8b 75 0c mov 0xc(%ebp),%esi
acquire(&p->lock);
801032fb: 83 ec 0c sub $0xc,%esp
801032fe: 53 push %ebx
801032ff: e8 bc 15 00 00 call 801048c0 <acquire>
if(writable){
80103304: 83 c4 10 add $0x10,%esp
80103307: 85 f6 test %esi,%esi
80103309: 74 45 je 80103350 <pipeclose+0x60>
p->writeopen = 0;
wakeup(&p->nread);
8010330b: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax
80103311: 83 ec 0c sub $0xc,%esp
void
pipeclose(struct pipe *p, int writable)
{
acquire(&p->lock);
if(writable){
p->writeopen = 0;
80103314: c7 83 40 02 00 00 00 movl $0x0,0x240(%ebx)
8010331b: 00 00 00
wakeup(&p->nread);
8010331e: 50 push %eax
8010331f: e8 0c 0d 00 00 call 80104030 <wakeup>
80103324: 83 c4 10 add $0x10,%esp
} else {
p->readopen = 0;
wakeup(&p->nwrite);
}
if(p->readopen == 0 && p->writeopen == 0){
80103327: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx
8010332d: 85 d2 test %edx,%edx
8010332f: 75 0a jne 8010333b <pipeclose+0x4b>
80103331: 8b 83 40 02 00 00 mov 0x240(%ebx),%eax
80103337: 85 c0 test %eax,%eax
80103339: 74 35 je 80103370 <pipeclose+0x80>
release(&p->lock);
kfree((char*)p);
} else
release(&p->lock);
8010333b: 89 5d 08 mov %ebx,0x8(%ebp)
}
8010333e: 8d 65 f8 lea -0x8(%ebp),%esp
80103341: 5b pop %ebx
80103342: 5e pop %esi
80103343: 5d pop %ebp
}
if(p->readopen == 0 && p->writeopen == 0){
release(&p->lock);
kfree((char*)p);
} else
release(&p->lock);
80103344: e9 97 16 00 00 jmp 801049e0 <release>
80103349: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(writable){
p->writeopen = 0;
wakeup(&p->nread);
} else {
p->readopen = 0;
wakeup(&p->nwrite);
80103350: 8d 83 38 02 00 00 lea 0x238(%ebx),%eax
80103356: 83 ec 0c sub $0xc,%esp
acquire(&p->lock);
if(writable){
p->writeopen = 0;
wakeup(&p->nread);
} else {
p->readopen = 0;
80103359: c7 83 3c 02 00 00 00 movl $0x0,0x23c(%ebx)
80103360: 00 00 00
wakeup(&p->nwrite);
80103363: 50 push %eax
80103364: e8 c7 0c 00 00 call 80104030 <wakeup>
80103369: 83 c4 10 add $0x10,%esp
8010336c: eb b9 jmp 80103327 <pipeclose+0x37>
8010336e: 66 90 xchg %ax,%ax
}
if(p->readopen == 0 && p->writeopen == 0){
release(&p->lock);
80103370: 83 ec 0c sub $0xc,%esp
80103373: 53 push %ebx
80103374: e8 67 16 00 00 call 801049e0 <release>
kfree((char*)p);
80103379: 89 5d 08 mov %ebx,0x8(%ebp)
8010337c: 83 c4 10 add $0x10,%esp
} else
release(&p->lock);
}
8010337f: 8d 65 f8 lea -0x8(%ebp),%esp
80103382: 5b pop %ebx
80103383: 5e pop %esi
80103384: 5d pop %ebp
p->readopen = 0;
wakeup(&p->nwrite);
}
if(p->readopen == 0 && p->writeopen == 0){
release(&p->lock);
kfree((char*)p);
80103385: e9 56 ef ff ff jmp 801022e0 <kfree>
8010338a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103390 <pipewrite>:
release(&p->lock);
}
int
pipewrite(struct pipe *p, char *addr, int n)
{
80103390: 55 push %ebp
80103391: 89 e5 mov %esp,%ebp
80103393: 57 push %edi
80103394: 56 push %esi
80103395: 53 push %ebx
80103396: 83 ec 28 sub $0x28,%esp
80103399: 8b 5d 08 mov 0x8(%ebp),%ebx
int i;
acquire(&p->lock);
8010339c: 53 push %ebx
8010339d: e8 1e 15 00 00 call 801048c0 <acquire>
for(i = 0; i < n; i++){
801033a2: 8b 45 10 mov 0x10(%ebp),%eax
801033a5: 83 c4 10 add $0x10,%esp
801033a8: 85 c0 test %eax,%eax
801033aa: 0f 8e b9 00 00 00 jle 80103469 <pipewrite+0xd9>
801033b0: 8b 4d 0c mov 0xc(%ebp),%ecx
801033b3: 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);
801033b9: 8d bb 34 02 00 00 lea 0x234(%ebx),%edi
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
801033bf: 8d b3 38 02 00 00 lea 0x238(%ebx),%esi
801033c5: 89 4d e4 mov %ecx,-0x1c(%ebp)
801033c8: 03 4d 10 add 0x10(%ebp),%ecx
801033cb: 89 4d e0 mov %ecx,-0x20(%ebp)
{
int i;
acquire(&p->lock);
for(i = 0; i < n; i++){
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
801033ce: 8b 8b 34 02 00 00 mov 0x234(%ebx),%ecx
801033d4: 8d 91 00 02 00 00 lea 0x200(%ecx),%edx
801033da: 39 d0 cmp %edx,%eax
801033dc: 74 38 je 80103416 <pipewrite+0x86>
801033de: eb 59 jmp 80103439 <pipewrite+0xa9>
if(p->readopen == 0 || myproc()->killed){
801033e0: e8 bb 03 00 00 call 801037a0 <myproc>
801033e5: 8b 48 24 mov 0x24(%eax),%ecx
801033e8: 85 c9 test %ecx,%ecx
801033ea: 75 34 jne 80103420 <pipewrite+0x90>
release(&p->lock);
return -1;
}
wakeup(&p->nread);
801033ec: 83 ec 0c sub $0xc,%esp
801033ef: 57 push %edi
801033f0: e8 3b 0c 00 00 call 80104030 <wakeup>
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
801033f5: 58 pop %eax
801033f6: 5a pop %edx
801033f7: 53 push %ebx
801033f8: 56 push %esi
801033f9: e8 72 0a 00 00 call 80103e70 <sleep>
{
int i;
acquire(&p->lock);
for(i = 0; i < n; i++){
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
801033fe: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax
80103404: 8b 93 38 02 00 00 mov 0x238(%ebx),%edx
8010340a: 83 c4 10 add $0x10,%esp
8010340d: 05 00 02 00 00 add $0x200,%eax
80103412: 39 c2 cmp %eax,%edx
80103414: 75 2a jne 80103440 <pipewrite+0xb0>
if(p->readopen == 0 || myproc()->killed){
80103416: 8b 83 3c 02 00 00 mov 0x23c(%ebx),%eax
8010341c: 85 c0 test %eax,%eax
8010341e: 75 c0 jne 801033e0 <pipewrite+0x50>
release(&p->lock);
80103420: 83 ec 0c sub $0xc,%esp
80103423: 53 push %ebx
80103424: e8 b7 15 00 00 call 801049e0 <release>
return -1;
80103429: 83 c4 10 add $0x10,%esp
8010342c: 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;
}
80103431: 8d 65 f4 lea -0xc(%ebp),%esp
80103434: 5b pop %ebx
80103435: 5e pop %esi
80103436: 5f pop %edi
80103437: 5d pop %ebp
80103438: c3 ret
{
int i;
acquire(&p->lock);
for(i = 0; i < n; i++){
while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full
80103439: 89 c2 mov %eax,%edx
8010343b: 90 nop
8010343c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
}
wakeup(&p->nread);
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
}
p->data[p->nwrite++ % PIPESIZE] = addr[i];
80103440: 8b 4d e4 mov -0x1c(%ebp),%ecx
80103443: 8d 42 01 lea 0x1(%edx),%eax
80103446: 83 45 e4 01 addl $0x1,-0x1c(%ebp)
8010344a: 81 e2 ff 01 00 00 and $0x1ff,%edx
80103450: 89 83 38 02 00 00 mov %eax,0x238(%ebx)
80103456: 0f b6 09 movzbl (%ecx),%ecx
80103459: 88 4c 13 34 mov %cl,0x34(%ebx,%edx,1)
8010345d: 8b 4d e4 mov -0x1c(%ebp),%ecx
pipewrite(struct pipe *p, char *addr, int n)
{
int i;
acquire(&p->lock);
for(i = 0; i < n; i++){
80103460: 3b 4d e0 cmp -0x20(%ebp),%ecx
80103463: 0f 85 65 ff ff ff jne 801033ce <pipewrite+0x3e>
wakeup(&p->nread);
sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep
}
p->data[p->nwrite++ % PIPESIZE] = addr[i];
}
wakeup(&p->nread); //DOC: pipewrite-wakeup1
80103469: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax
8010346f: 83 ec 0c sub $0xc,%esp
80103472: 50 push %eax
80103473: e8 b8 0b 00 00 call 80104030 <wakeup>
release(&p->lock);
80103478: 89 1c 24 mov %ebx,(%esp)
8010347b: e8 60 15 00 00 call 801049e0 <release>
return n;
80103480: 83 c4 10 add $0x10,%esp
80103483: 8b 45 10 mov 0x10(%ebp),%eax
80103486: eb a9 jmp 80103431 <pipewrite+0xa1>
80103488: 90 nop
80103489: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103490 <piperead>:
}
int
piperead(struct pipe *p, char *addr, int n)
{
80103490: 55 push %ebp
80103491: 89 e5 mov %esp,%ebp
80103493: 57 push %edi
80103494: 56 push %esi
80103495: 53 push %ebx
80103496: 83 ec 18 sub $0x18,%esp
80103499: 8b 5d 08 mov 0x8(%ebp),%ebx
8010349c: 8b 7d 0c mov 0xc(%ebp),%edi
int i;
acquire(&p->lock);
8010349f: 53 push %ebx
801034a0: e8 1b 14 00 00 call 801048c0 <acquire>
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
801034a5: 83 c4 10 add $0x10,%esp
801034a8: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax
801034ae: 39 83 38 02 00 00 cmp %eax,0x238(%ebx)
801034b4: 75 6a jne 80103520 <piperead+0x90>
801034b6: 8b b3 40 02 00 00 mov 0x240(%ebx),%esi
801034bc: 85 f6 test %esi,%esi
801034be: 0f 84 cc 00 00 00 je 80103590 <piperead+0x100>
if(myproc()->killed){
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
801034c4: 8d b3 34 02 00 00 lea 0x234(%ebx),%esi
801034ca: eb 2d jmp 801034f9 <piperead+0x69>
801034cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801034d0: 83 ec 08 sub $0x8,%esp
801034d3: 53 push %ebx
801034d4: 56 push %esi
801034d5: e8 96 09 00 00 call 80103e70 <sleep>
piperead(struct pipe *p, char *addr, int n)
{
int i;
acquire(&p->lock);
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
801034da: 83 c4 10 add $0x10,%esp
801034dd: 8b 83 38 02 00 00 mov 0x238(%ebx),%eax
801034e3: 39 83 34 02 00 00 cmp %eax,0x234(%ebx)
801034e9: 75 35 jne 80103520 <piperead+0x90>
801034eb: 8b 93 40 02 00 00 mov 0x240(%ebx),%edx
801034f1: 85 d2 test %edx,%edx
801034f3: 0f 84 97 00 00 00 je 80103590 <piperead+0x100>
if(myproc()->killed){
801034f9: e8 a2 02 00 00 call 801037a0 <myproc>
801034fe: 8b 48 24 mov 0x24(%eax),%ecx
80103501: 85 c9 test %ecx,%ecx
80103503: 74 cb je 801034d0 <piperead+0x40>
release(&p->lock);
80103505: 83 ec 0c sub $0xc,%esp
80103508: 53 push %ebx
80103509: e8 d2 14 00 00 call 801049e0 <release>
return -1;
8010350e: 83 c4 10 add $0x10,%esp
addr[i] = p->data[p->nread++ % PIPESIZE];
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
release(&p->lock);
return i;
}
80103511: 8d 65 f4 lea -0xc(%ebp),%esp
acquire(&p->lock);
while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty
if(myproc()->killed){
release(&p->lock);
return -1;
80103514: b8 ff ff ff ff mov $0xffffffff,%eax
addr[i] = p->data[p->nread++ % PIPESIZE];
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
release(&p->lock);
return i;
}
80103519: 5b pop %ebx
8010351a: 5e pop %esi
8010351b: 5f pop %edi
8010351c: 5d pop %ebp
8010351d: c3 ret
8010351e: 66 90 xchg %ax,%ax
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
}
for(i = 0; i < n; i++){ //DOC: piperead-copy
80103520: 8b 45 10 mov 0x10(%ebp),%eax
80103523: 85 c0 test %eax,%eax
80103525: 7e 69 jle 80103590 <piperead+0x100>
if(p->nread == p->nwrite)
80103527: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax
8010352d: 31 c9 xor %ecx,%ecx
8010352f: eb 15 jmp 80103546 <piperead+0xb6>
80103531: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103538: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax
8010353e: 3b 83 38 02 00 00 cmp 0x238(%ebx),%eax
80103544: 74 5a je 801035a0 <piperead+0x110>
break;
addr[i] = p->data[p->nread++ % PIPESIZE];
80103546: 8d 70 01 lea 0x1(%eax),%esi
80103549: 25 ff 01 00 00 and $0x1ff,%eax
8010354e: 89 b3 34 02 00 00 mov %esi,0x234(%ebx)
80103554: 0f b6 44 03 34 movzbl 0x34(%ebx,%eax,1),%eax
80103559: 88 04 0f mov %al,(%edi,%ecx,1)
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
}
for(i = 0; i < n; i++){ //DOC: piperead-copy
8010355c: 83 c1 01 add $0x1,%ecx
8010355f: 39 4d 10 cmp %ecx,0x10(%ebp)
80103562: 75 d4 jne 80103538 <piperead+0xa8>
if(p->nread == p->nwrite)
break;
addr[i] = p->data[p->nread++ % PIPESIZE];
}
wakeup(&p->nwrite); //DOC: piperead-wakeup
80103564: 8d 83 38 02 00 00 lea 0x238(%ebx),%eax
8010356a: 83 ec 0c sub $0xc,%esp
8010356d: 50 push %eax
8010356e: e8 bd 0a 00 00 call 80104030 <wakeup>
release(&p->lock);
80103573: 89 1c 24 mov %ebx,(%esp)
80103576: e8 65 14 00 00 call 801049e0 <release>
return i;
8010357b: 8b 45 10 mov 0x10(%ebp),%eax
8010357e: 83 c4 10 add $0x10,%esp
}
80103581: 8d 65 f4 lea -0xc(%ebp),%esp
80103584: 5b pop %ebx
80103585: 5e pop %esi
80103586: 5f pop %edi
80103587: 5d pop %ebp
80103588: c3 ret
80103589: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
release(&p->lock);
return -1;
}
sleep(&p->nread, &p->lock); //DOC: piperead-sleep
}
for(i = 0; i < n; i++){ //DOC: piperead-copy
80103590: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
80103597: eb cb jmp 80103564 <piperead+0xd4>
80103599: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801035a0: 89 4d 10 mov %ecx,0x10(%ebp)
801035a3: eb bf jmp 80103564 <piperead+0xd4>
801035a5: 66 90 xchg %ax,%ax
801035a7: 66 90 xchg %ax,%ax
801035a9: 66 90 xchg %ax,%ax
801035ab: 66 90 xchg %ax,%ax
801035ad: 66 90 xchg %ax,%ax
801035af: 90 nop
801035b0 <allocproc>:
// If found, change state to EMBRYO and initialize
// state required to run in the kernel.
// Otherwise return 0.
static struct proc*
allocproc(void)
{
801035b0: 55 push %ebp
801035b1: 89 e5 mov %esp,%ebp
801035b3: 53 push %ebx
struct proc *p;
char *sp;
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801035b4: bb 54 3d 11 80 mov $0x80113d54,%ebx
// If found, change state to EMBRYO and initialize
// state required to run in the kernel.
// Otherwise return 0.
static struct proc*
allocproc(void)
{
801035b9: 83 ec 10 sub $0x10,%esp
struct proc *p;
char *sp;
acquire(&ptable.lock);
801035bc: 68 20 3d 11 80 push $0x80113d20
801035c1: e8 fa 12 00 00 call 801048c0 <acquire>
801035c6: 83 c4 10 add $0x10,%esp
801035c9: eb 17 jmp 801035e2 <allocproc+0x32>
801035cb: 90 nop
801035cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801035d0: 81 c3 88 00 00 00 add $0x88,%ebx
801035d6: 81 fb 54 5f 11 80 cmp $0x80115f54,%ebx
801035dc: 0f 84 8e 00 00 00 je 80103670 <allocproc+0xc0>
if(p->state == UNUSED)
801035e2: 8b 43 0c mov 0xc(%ebx),%eax
801035e5: 85 c0 test %eax,%eax
801035e7: 75 e7 jne 801035d0 <allocproc+0x20>
release(&ptable.lock);
return 0;
found:
p->state = EMBRYO;
p->pid = nextpid++;
801035e9: a1 04 b0 10 80 mov 0x8010b004,%eax
p->priority = 10;
p->tid=1;
release(&ptable.lock);
801035ee: 83 ec 0c sub $0xc,%esp
release(&ptable.lock);
return 0;
found:
p->state = EMBRYO;
801035f1: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx)
p->pid = nextpid++;
p->priority = 10;
p->tid=1;
release(&ptable.lock);
801035f8: 68 20 3d 11 80 push $0x80113d20
return 0;
found:
p->state = EMBRYO;
p->pid = nextpid++;
p->priority = 10;
801035fd: c7 43 7c 0a 00 00 00 movl $0xa,0x7c(%ebx)
p->tid=1;
80103604: c7 83 80 00 00 00 01 movl $0x1,0x80(%ebx)
8010360b: 00 00 00
release(&ptable.lock);
return 0;
found:
p->state = EMBRYO;
p->pid = nextpid++;
8010360e: 8d 50 01 lea 0x1(%eax),%edx
80103611: 89 43 10 mov %eax,0x10(%ebx)
80103614: 89 15 04 b0 10 80 mov %edx,0x8010b004
p->priority = 10;
p->tid=1;
release(&ptable.lock);
8010361a: e8 c1 13 00 00 call 801049e0 <release>
// Allocate kernel stack.
if((p->kstack = kalloc()) == 0){
8010361f: e8 6c ee ff ff call 80102490 <kalloc>
80103624: 83 c4 10 add $0x10,%esp
80103627: 85 c0 test %eax,%eax
80103629: 89 43 08 mov %eax,0x8(%ebx)
8010362c: 74 59 je 80103687 <allocproc+0xd7>
return 0;
}
sp = p->kstack + KSTACKSIZE;
// Leave room for trap frame.
sp -= sizeof *p->tf;
8010362e: 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);
80103634: 83 ec 04 sub $0x4,%esp
// Set up new context to start executing at forkret,
// which returns to trapret.
sp -= 4;
*(uint*)sp = (uint)trapret;
sp -= sizeof *p->context;
80103637: 05 9c 0f 00 00 add $0xf9c,%eax
return 0;
}
sp = p->kstack + KSTACKSIZE;
// Leave room for trap frame.
sp -= sizeof *p->tf;
8010363c: 89 53 18 mov %edx,0x18(%ebx)
p->tf = (struct trapframe*)sp;
// Set up new context to start executing at forkret,
// which returns to trapret.
sp -= 4;
*(uint*)sp = (uint)trapret;
8010363f: c7 40 14 b1 5d 10 80 movl $0x80105db1,0x14(%eax)
sp -= sizeof *p->context;
p->context = (struct context*)sp;
memset(p->context, 0, sizeof *p->context);
80103646: 6a 14 push $0x14
80103648: 6a 00 push $0x0
8010364a: 50 push %eax
// which returns to trapret.
sp -= 4;
*(uint*)sp = (uint)trapret;
sp -= sizeof *p->context;
p->context = (struct context*)sp;
8010364b: 89 43 1c mov %eax,0x1c(%ebx)
memset(p->context, 0, sizeof *p->context);
8010364e: e8 dd 13 00 00 call 80104a30 <memset>
p->context->eip = (uint)forkret;
80103653: 8b 43 1c mov 0x1c(%ebx),%eax
return p;
80103656: 83 c4 10 add $0x10,%esp
*(uint*)sp = (uint)trapret;
sp -= sizeof *p->context;
p->context = (struct context*)sp;
memset(p->context, 0, sizeof *p->context);
p->context->eip = (uint)forkret;
80103659: c7 40 10 90 36 10 80 movl $0x80103690,0x10(%eax)
return p;
80103660: 89 d8 mov %ebx,%eax
}
80103662: 8b 5d fc mov -0x4(%ebp),%ebx
80103665: c9 leave
80103666: c3 ret
80103667: 89 f6 mov %esi,%esi
80103669: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
if(p->state == UNUSED)
goto found;
release(&ptable.lock);
80103670: 83 ec 0c sub $0xc,%esp
80103673: 68 20 3d 11 80 push $0x80113d20
80103678: e8 63 13 00 00 call 801049e0 <release>
return 0;
8010367d: 83 c4 10 add $0x10,%esp
80103680: 31 c0 xor %eax,%eax
p->context = (struct context*)sp;
memset(p->context, 0, sizeof *p->context);
p->context->eip = (uint)forkret;
return p;
}
80103682: 8b 5d fc mov -0x4(%ebp),%ebx
80103685: c9 leave
80103686: c3 ret
release(&ptable.lock);
// Allocate kernel stack.
if((p->kstack = kalloc()) == 0){
p->state = UNUSED;
80103687: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return 0;
8010368e: eb d2 jmp 80103662 <allocproc+0xb2>
80103690 <forkret>:
// A fork child's very first scheduling by scheduler()
// will swtch here. "Return" to user space.
void
forkret(void)
{
80103690: 55 push %ebp
80103691: 89 e5 mov %esp,%ebp
80103693: 83 ec 14 sub $0x14,%esp
static int first = 1;
// Still holding ptable.lock from scheduler.
release(&ptable.lock);
80103696: 68 20 3d 11 80 push $0x80113d20
8010369b: e8 40 13 00 00 call 801049e0 <release>
if (first) {
801036a0: a1 00 b0 10 80 mov 0x8010b000,%eax
801036a5: 83 c4 10 add $0x10,%esp
801036a8: 85 c0 test %eax,%eax
801036aa: 75 04 jne 801036b0 <forkret+0x20>
iinit(ROOTDEV);
initlog(ROOTDEV);
}
// Return to "caller", actually trapret (see allocproc).
}
801036ac: c9 leave
801036ad: c3 ret
801036ae: 66 90 xchg %ax,%ax
if (first) {
// Some initialization functions must be run in the context
// of a regular process (e.g., they call sleep), and thus cannot
// be run from main().
first = 0;
iinit(ROOTDEV);
801036b0: 83 ec 0c sub $0xc,%esp
if (first) {
// Some initialization functions must be run in the context
// of a regular process (e.g., they call sleep), and thus cannot
// be run from main().
first = 0;
801036b3: c7 05 00 b0 10 80 00 movl $0x0,0x8010b000
801036ba: 00 00 00
iinit(ROOTDEV);
801036bd: 6a 01 push $0x1
801036bf: e8 ac dd ff ff call 80101470 <iinit>
initlog(ROOTDEV);
801036c4: c7 04 24 01 00 00 00 movl $0x1,(%esp)
801036cb: e8 e0 f3 ff ff call 80102ab0 <initlog>
801036d0: 83 c4 10 add $0x10,%esp
}
// Return to "caller", actually trapret (see allocproc).
}
801036d3: c9 leave
801036d4: c3 ret
801036d5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801036d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801036e0 <pinit>:
static void wakeup1(void *chan);
void
pinit(void)
{
801036e0: 55 push %ebp
801036e1: 89 e5 mov %esp,%ebp
801036e3: 83 ec 10 sub $0x10,%esp
initlock(&ptable.lock, "ptable");
801036e6: 68 95 7b 10 80 push $0x80107b95
801036eb: 68 20 3d 11 80 push $0x80113d20
801036f0: e8 cb 10 00 00 call 801047c0 <initlock>
}
801036f5: 83 c4 10 add $0x10,%esp
801036f8: c9 leave
801036f9: c3 ret
801036fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80103700 <mycpu>:
// Must be called with interrupts disabled to avoid the caller being
// rescheduled between reading lapicid and running through the loop.
struct cpu*
mycpu(void)
{
80103700: 55 push %ebp
80103701: 89 e5 mov %esp,%ebp
80103703: 56 push %esi
80103704: 53 push %ebx
static inline uint
readeflags(void)
{
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
80103705: 9c pushf
80103706: 58 pop %eax
int apicid, i;
if(readeflags()&FL_IF)
80103707: f6 c4 02 test $0x2,%ah
8010370a: 75 5b jne 80103767 <mycpu+0x67>
panic("mycpu called with interrupts enabled\n");
apicid = lapicid();
8010370c: e8 df ef ff ff call 801026f0 <lapicid>
// APIC IDs are not guaranteed to be contiguous. Maybe we should have
// a reverse map, or reserve a register to store &cpus[i].
for (i = 0; i < ncpu; ++i) {
80103711: 8b 35 00 3d 11 80 mov 0x80113d00,%esi
80103717: 85 f6 test %esi,%esi
80103719: 7e 3f jle 8010375a <mycpu+0x5a>
if (cpus[i].apicid == apicid)
8010371b: 0f b6 15 80 37 11 80 movzbl 0x80113780,%edx
80103722: 39 d0 cmp %edx,%eax
80103724: 74 30 je 80103756 <mycpu+0x56>
80103726: b9 30 38 11 80 mov $0x80113830,%ecx
8010372b: 31 d2 xor %edx,%edx
8010372d: 8d 76 00 lea 0x0(%esi),%esi
panic("mycpu called with interrupts enabled\n");
apicid = lapicid();
// APIC IDs are not guaranteed to be contiguous. Maybe we should have
// a reverse map, or reserve a register to store &cpus[i].
for (i = 0; i < ncpu; ++i) {
80103730: 83 c2 01 add $0x1,%edx
80103733: 39 f2 cmp %esi,%edx
80103735: 74 23 je 8010375a <mycpu+0x5a>
if (cpus[i].apicid == apicid)
80103737: 0f b6 19 movzbl (%ecx),%ebx
8010373a: 81 c1 b0 00 00 00 add $0xb0,%ecx
80103740: 39 d8 cmp %ebx,%eax
80103742: 75 ec jne 80103730 <mycpu+0x30>
return &cpus[i];
80103744: 69 c2 b0 00 00 00 imul $0xb0,%edx,%eax
}
panic("unknown apicid\n");
}
8010374a: 8d 65 f8 lea -0x8(%ebp),%esp
8010374d: 5b pop %ebx
apicid = lapicid();
// APIC IDs are not guaranteed to be contiguous. Maybe we should have
// a reverse map, or reserve a register to store &cpus[i].
for (i = 0; i < ncpu; ++i) {
if (cpus[i].apicid == apicid)
return &cpus[i];
8010374e: 05 80 37 11 80 add $0x80113780,%eax
}
panic("unknown apicid\n");
}
80103753: 5e pop %esi
80103754: 5d pop %ebp
80103755: c3 ret
panic("mycpu called with interrupts enabled\n");
apicid = lapicid();
// APIC IDs are not guaranteed to be contiguous. Maybe we should have
// a reverse map, or reserve a register to store &cpus[i].
for (i = 0; i < ncpu; ++i) {
80103756: 31 d2 xor %edx,%edx
80103758: eb ea jmp 80103744 <mycpu+0x44>
if (cpus[i].apicid == apicid)
return &cpus[i];
}
panic("unknown apicid\n");
8010375a: 83 ec 0c sub $0xc,%esp
8010375d: 68 9c 7b 10 80 push $0x80107b9c
80103762: e8 09 cc ff ff call 80100370 <panic>
mycpu(void)
{
int apicid, i;
if(readeflags()&FL_IF)
panic("mycpu called with interrupts enabled\n");
80103767: 83 ec 0c sub $0xc,%esp
8010376a: 68 b0 7c 10 80 push $0x80107cb0
8010376f: e8 fc cb ff ff call 80100370 <panic>
80103774: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010377a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80103780 <cpuid>:
initlock(&ptable.lock, "ptable");
}
// Must be called with interrupts disabled
int
cpuid() {
80103780: 55 push %ebp
80103781: 89 e5 mov %esp,%ebp
80103783: 83 ec 08 sub $0x8,%esp
return mycpu()-cpus;
80103786: e8 75 ff ff ff call 80103700 <mycpu>
8010378b: 2d 80 37 11 80 sub $0x80113780,%eax
}
80103790: c9 leave
}
// Must be called with interrupts disabled
int
cpuid() {
return mycpu()-cpus;
80103791: c1 f8 04 sar $0x4,%eax
80103794: 69 c0 a3 8b 2e ba imul $0xba2e8ba3,%eax,%eax
}
8010379a: c3 ret
8010379b: 90 nop
8010379c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801037a0 <myproc>:
}
// Disable interrupts so that we are not rescheduled
// while reading proc from the cpu structure
struct proc*
myproc(void) {
801037a0: 55 push %ebp
801037a1: 89 e5 mov %esp,%ebp
801037a3: 53 push %ebx
801037a4: 83 ec 04 sub $0x4,%esp
struct cpu *c;
struct proc *p;
pushcli();
801037a7: e8 d4 10 00 00 call 80104880 <pushcli>
c = mycpu();
801037ac: e8 4f ff ff ff call 80103700 <mycpu>
p = c->proc;
801037b1: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
801037b7: e8 b4 11 00 00 call 80104970 <popcli>
return p;
}
801037bc: 83 c4 04 add $0x4,%esp
801037bf: 89 d8 mov %ebx,%eax
801037c1: 5b pop %ebx
801037c2: 5d pop %ebp
801037c3: c3 ret
801037c4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801037ca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801037d0 <userinit>:
}
// Set up first user process.
void
userinit(void)
{
801037d0: 55 push %ebp
801037d1: 89 e5 mov %esp,%ebp
801037d3: 53 push %ebx
801037d4: 83 ec 04 sub $0x4,%esp
struct proc *p;
extern char _binary_initcode_start[], _binary_initcode_size[];
p = allocproc();
801037d7: e8 d4 fd ff ff call 801035b0 <allocproc>
801037dc: 89 c3 mov %eax,%ebx
initproc = p;
801037de: a3 b8 b5 10 80 mov %eax,0x8010b5b8
if((p->pgdir = setupkvm()) == 0)
801037e3: e8 b8 3b 00 00 call 801073a0 <setupkvm>
801037e8: 85 c0 test %eax,%eax
801037ea: 89 43 04 mov %eax,0x4(%ebx)
801037ed: 0f 84 bd 00 00 00 je 801038b0 <userinit+0xe0>
panic("userinit: out of memory?");
inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
801037f3: 83 ec 04 sub $0x4,%esp
801037f6: 68 2c 00 00 00 push $0x2c
801037fb: 68 60 b4 10 80 push $0x8010b460
80103800: 50 push %eax
80103801: e8 aa 38 00 00 call 801070b0 <inituvm>
p->sz = PGSIZE;
memset(p->tf, 0, sizeof(*p->tf));
80103806: 83 c4 0c add $0xc,%esp
initproc = p;
if((p->pgdir = setupkvm()) == 0)
panic("userinit: out of memory?");
inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
p->sz = PGSIZE;
80103809: c7 03 00 10 00 00 movl $0x1000,(%ebx)
memset(p->tf, 0, sizeof(*p->tf));
8010380f: 6a 4c push $0x4c
80103811: 6a 00 push $0x0
80103813: ff 73 18 pushl 0x18(%ebx)
80103816: e8 15 12 00 00 call 80104a30 <memset>
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
8010381b: 8b 43 18 mov 0x18(%ebx),%eax
8010381e: ba 1b 00 00 00 mov $0x1b,%edx
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
80103823: b9 23 00 00 00 mov $0x23,%ecx
p->tf->ss = p->tf->ds;
p->tf->eflags = FL_IF;
p->tf->esp = PGSIZE;
p->tf->eip = 0; // beginning of initcode.S
safestrcpy(p->name, "initcode", sizeof(p->name));
80103828: 83 c4 0c add $0xc,%esp
if((p->pgdir = setupkvm()) == 0)
panic("userinit: out of memory?");
inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
p->sz = PGSIZE;
memset(p->tf, 0, sizeof(*p->tf));
p->tf->cs = (SEG_UCODE << 3) | DPL_USER;
8010382b: 66 89 50 3c mov %dx,0x3c(%eax)
p->tf->ds = (SEG_UDATA << 3) | DPL_USER;
8010382f: 8b 43 18 mov 0x18(%ebx),%eax
80103832: 66 89 48 2c mov %cx,0x2c(%eax)
p->tf->es = p->tf->ds;
80103836: 8b 43 18 mov 0x18(%ebx),%eax
80103839: 0f b7 50 2c movzwl 0x2c(%eax),%edx
8010383d: 66 89 50 28 mov %dx,0x28(%eax)
p->tf->ss = p->tf->ds;
80103841: 8b 43 18 mov 0x18(%ebx),%eax
80103844: 0f b7 50 2c movzwl 0x2c(%eax),%edx
80103848: 66 89 50 48 mov %dx,0x48(%eax)
p->tf->eflags = FL_IF;
8010384c: 8b 43 18 mov 0x18(%ebx),%eax
8010384f: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax)
p->tf->esp = PGSIZE;
80103856: 8b 43 18 mov 0x18(%ebx),%eax
80103859: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax)
p->tf->eip = 0; // beginning of initcode.S
80103860: 8b 43 18 mov 0x18(%ebx),%eax
80103863: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax)
safestrcpy(p->name, "initcode", sizeof(p->name));
8010386a: 8d 43 6c lea 0x6c(%ebx),%eax
8010386d: 6a 10 push $0x10
8010386f: 68 c5 7b 10 80 push $0x80107bc5
80103874: 50 push %eax
80103875: e8 b6 13 00 00 call 80104c30 <safestrcpy>
p->cwd = namei("/");
8010387a: c7 04 24 ce 7b 10 80 movl $0x80107bce,(%esp)
80103881: e8 3a e6 ff ff call 80101ec0 <namei>
80103886: 89 43 68 mov %eax,0x68(%ebx)
// this assignment to p->state lets other cores
// run this process. the acquire forces the above
// writes to be visible, and the lock is also needed
// because the assignment might not be atomic.
acquire(&ptable.lock);
80103889: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103890: e8 2b 10 00 00 call 801048c0 <acquire>
p->state = RUNNABLE;
80103895: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
release(&ptable.lock);
8010389c: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
801038a3: e8 38 11 00 00 call 801049e0 <release>
}
801038a8: 83 c4 10 add $0x10,%esp
801038ab: 8b 5d fc mov -0x4(%ebp),%ebx
801038ae: c9 leave
801038af: c3 ret
p = allocproc();
initproc = p;
if((p->pgdir = setupkvm()) == 0)
panic("userinit: out of memory?");
801038b0: 83 ec 0c sub $0xc,%esp
801038b3: 68 ac 7b 10 80 push $0x80107bac
801038b8: e8 b3 ca ff ff call 80100370 <panic>
801038bd: 8d 76 00 lea 0x0(%esi),%esi
801038c0 <growproc>:
// Grow current process's memory by n bytes.
// Return 0 on success, -1 on failure.
int
growproc(int n)
{
801038c0: 55 push %ebp
801038c1: 89 e5 mov %esp,%ebp
801038c3: 56 push %esi
801038c4: 53 push %ebx
801038c5: 8b 75 08 mov 0x8(%ebp),%esi
// while reading proc from the cpu structure
struct proc*
myproc(void) {
struct cpu *c;
struct proc *p;
pushcli();
801038c8: e8 b3 0f 00 00 call 80104880 <pushcli>
c = mycpu();
801038cd: e8 2e fe ff ff call 80103700 <mycpu>
p = c->proc;
801038d2: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
801038d8: e8 93 10 00 00 call 80104970 <popcli>
{
uint sz;
struct proc *curproc = myproc();
sz = curproc->sz;
if(n > 0){
801038dd: 83 fe 00 cmp $0x0,%esi
growproc(int n)
{
uint sz;
struct proc *curproc = myproc();
sz = curproc->sz;
801038e0: 8b 03 mov (%ebx),%eax
if(n > 0){
801038e2: 7e 34 jle 80103918 <growproc+0x58>
if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0)
801038e4: 83 ec 04 sub $0x4,%esp
801038e7: 01 c6 add %eax,%esi
801038e9: 56 push %esi
801038ea: 50 push %eax
801038eb: ff 73 04 pushl 0x4(%ebx)
801038ee: e8 fd 38 00 00 call 801071f0 <allocuvm>
801038f3: 83 c4 10 add $0x10,%esp
801038f6: 85 c0 test %eax,%eax
801038f8: 74 36 je 80103930 <growproc+0x70>
} else if(n < 0){
if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0)
return -1;
}
curproc->sz = sz;
switchuvm(curproc);
801038fa: 83 ec 0c sub $0xc,%esp
return -1;
} else if(n < 0){
if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0)
return -1;
}
curproc->sz = sz;
801038fd: 89 03 mov %eax,(%ebx)
switchuvm(curproc);
801038ff: 53 push %ebx
80103900: e8 9b 36 00 00 call 80106fa0 <switchuvm>
return 0;
80103905: 83 c4 10 add $0x10,%esp
80103908: 31 c0 xor %eax,%eax
}
8010390a: 8d 65 f8 lea -0x8(%ebp),%esp
8010390d: 5b pop %ebx
8010390e: 5e pop %esi
8010390f: 5d pop %ebp
80103910: c3 ret
80103911: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
sz = curproc->sz;
if(n > 0){
if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0)
return -1;
} else if(n < 0){
80103918: 74 e0 je 801038fa <growproc+0x3a>
if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0)
8010391a: 83 ec 04 sub $0x4,%esp
8010391d: 01 c6 add %eax,%esi
8010391f: 56 push %esi
80103920: 50 push %eax
80103921: ff 73 04 pushl 0x4(%ebx)
80103924: e8 c7 39 00 00 call 801072f0 <deallocuvm>
80103929: 83 c4 10 add $0x10,%esp
8010392c: 85 c0 test %eax,%eax
8010392e: 75 ca jne 801038fa <growproc+0x3a>
struct proc *curproc = myproc();
sz = curproc->sz;
if(n > 0){
if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0)
return -1;
80103930: b8 ff ff ff ff mov $0xffffffff,%eax
80103935: eb d3 jmp 8010390a <growproc+0x4a>
80103937: 89 f6 mov %esi,%esi
80103939: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103940 <fork>:
// Create a new process copying p as the parent.
// Sets up stack to return as if from system call.
// Caller must set state of returned proc to RUNNABLE.
int
fork(void)
{
80103940: 55 push %ebp
80103941: 89 e5 mov %esp,%ebp
80103943: 57 push %edi
80103944: 56 push %esi
80103945: 53 push %ebx
80103946: 83 ec 1c sub $0x1c,%esp
// while reading proc from the cpu structure
struct proc*
myproc(void) {
struct cpu *c;
struct proc *p;
pushcli();
80103949: e8 32 0f 00 00 call 80104880 <pushcli>
c = mycpu();
8010394e: e8 ad fd ff ff call 80103700 <mycpu>
p = c->proc;
80103953: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103959: e8 12 10 00 00 call 80104970 <popcli>
int i, pid;
struct proc *np;
struct proc *curproc = myproc();
// Allocate process.
if((np = allocproc()) == 0){
8010395e: e8 4d fc ff ff call 801035b0 <allocproc>
80103963: 85 c0 test %eax,%eax
80103965: 89 c7 mov %eax,%edi
80103967: 89 45 e4 mov %eax,-0x1c(%ebp)
8010396a: 0f 84 b5 00 00 00 je 80103a25 <fork+0xe5>
return -1;
}
// Copy process state from proc.
if((np->pgdir = copyuvm(curproc->pgdir, curproc->sz)) == 0){
80103970: 83 ec 08 sub $0x8,%esp
80103973: ff 33 pushl (%ebx)
80103975: ff 73 04 pushl 0x4(%ebx)
80103978: e8 f3 3a 00 00 call 80107470 <copyuvm>
8010397d: 83 c4 10 add $0x10,%esp
80103980: 85 c0 test %eax,%eax
80103982: 89 47 04 mov %eax,0x4(%edi)
80103985: 0f 84 a1 00 00 00 je 80103a2c <fork+0xec>
kfree(np->kstack);
np->kstack = 0;
np->state = UNUSED;
return -1;
}
np->sz = curproc->sz;
8010398b: 8b 03 mov (%ebx),%eax
8010398d: 8b 4d e4 mov -0x1c(%ebp),%ecx
80103990: 89 01 mov %eax,(%ecx)
np->parent = curproc;
80103992: 89 59 14 mov %ebx,0x14(%ecx)
*np->tf = *curproc->tf;
80103995: 89 c8 mov %ecx,%eax
80103997: 8b 79 18 mov 0x18(%ecx),%edi
8010399a: 8b 73 18 mov 0x18(%ebx),%esi
8010399d: b9 13 00 00 00 mov $0x13,%ecx
801039a2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
// Clear %eax so that fork returns 0 in the child.
np->tf->eax = 0;
for(i = 0; i < NOFILE; i++)
801039a4: 31 f6 xor %esi,%esi
np->sz = curproc->sz;
np->parent = curproc;
*np->tf = *curproc->tf;
// Clear %eax so that fork returns 0 in the child.
np->tf->eax = 0;
801039a6: 8b 40 18 mov 0x18(%eax),%eax
801039a9: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
for(i = 0; i < NOFILE; i++)
if(curproc->ofile[i])
801039b0: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax
801039b4: 85 c0 test %eax,%eax
801039b6: 74 13 je 801039cb <fork+0x8b>
np->ofile[i] = filedup(curproc->ofile[i]);
801039b8: 83 ec 0c sub $0xc,%esp
801039bb: 50 push %eax
801039bc: e8 1f d4 ff ff call 80100de0 <filedup>
801039c1: 8b 55 e4 mov -0x1c(%ebp),%edx
801039c4: 83 c4 10 add $0x10,%esp
801039c7: 89 44 b2 28 mov %eax,0x28(%edx,%esi,4)
*np->tf = *curproc->tf;
// Clear %eax so that fork returns 0 in the child.
np->tf->eax = 0;
for(i = 0; i < NOFILE; i++)
801039cb: 83 c6 01 add $0x1,%esi
801039ce: 83 fe 10 cmp $0x10,%esi
801039d1: 75 dd jne 801039b0 <fork+0x70>
if(curproc->ofile[i])
np->ofile[i] = filedup(curproc->ofile[i]);
np->cwd = idup(curproc->cwd);
801039d3: 83 ec 0c sub $0xc,%esp
801039d6: ff 73 68 pushl 0x68(%ebx)
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
801039d9: 83 c3 6c add $0x6c,%ebx
np->tf->eax = 0;
for(i = 0; i < NOFILE; i++)
if(curproc->ofile[i])
np->ofile[i] = filedup(curproc->ofile[i]);
np->cwd = idup(curproc->cwd);
801039dc: e8 5f dc ff ff call 80101640 <idup>
801039e1: 8b 7d e4 mov -0x1c(%ebp),%edi
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
801039e4: 83 c4 0c add $0xc,%esp
np->tf->eax = 0;
for(i = 0; i < NOFILE; i++)
if(curproc->ofile[i])
np->ofile[i] = filedup(curproc->ofile[i]);
np->cwd = idup(curproc->cwd);
801039e7: 89 47 68 mov %eax,0x68(%edi)
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
801039ea: 8d 47 6c lea 0x6c(%edi),%eax
801039ed: 6a 10 push $0x10
801039ef: 53 push %ebx
801039f0: 50 push %eax
801039f1: e8 3a 12 00 00 call 80104c30 <safestrcpy>
pid = np->pid;
801039f6: 8b 5f 10 mov 0x10(%edi),%ebx
acquire(&ptable.lock);
801039f9: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103a00: e8 bb 0e 00 00 call 801048c0 <acquire>
np->state = RUNNABLE;
80103a05: c7 47 0c 03 00 00 00 movl $0x3,0xc(%edi)
release(&ptable.lock);
80103a0c: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103a13: e8 c8 0f 00 00 call 801049e0 <release>
return pid;
80103a18: 83 c4 10 add $0x10,%esp
80103a1b: 89 d8 mov %ebx,%eax
}
80103a1d: 8d 65 f4 lea -0xc(%ebp),%esp
80103a20: 5b pop %ebx
80103a21: 5e pop %esi
80103a22: 5f pop %edi
80103a23: 5d pop %ebp
80103a24: c3 ret
struct proc *np;
struct proc *curproc = myproc();
// Allocate process.
if((np = allocproc()) == 0){
return -1;
80103a25: b8 ff ff ff ff mov $0xffffffff,%eax
80103a2a: eb f1 jmp 80103a1d <fork+0xdd>
}
// Copy process state from proc.
if((np->pgdir = copyuvm(curproc->pgdir, curproc->sz)) == 0){
kfree(np->kstack);
80103a2c: 8b 7d e4 mov -0x1c(%ebp),%edi
80103a2f: 83 ec 0c sub $0xc,%esp
80103a32: ff 77 08 pushl 0x8(%edi)
80103a35: e8 a6 e8 ff ff call 801022e0 <kfree>
np->kstack = 0;
80103a3a: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
np->state = UNUSED;
80103a41: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
return -1;
80103a48: 83 c4 10 add $0x10,%esp
80103a4b: b8 ff ff ff ff mov $0xffffffff,%eax
80103a50: eb cb jmp 80103a1d <fork+0xdd>
80103a52: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80103a59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103a60 <cps>:
// Exit the current process. Does not return.
// An exited process remains in the zombie state
// until its parent calls wait() to find out it exited.
int cps() {
80103a60: 55 push %ebp
80103a61: 89 e5 mov %esp,%ebp
80103a63: 53 push %ebx
80103a64: 83 ec 10 sub $0x10,%esp
}
static inline void
sti(void)
{
asm volatile("sti");
80103a67: fb sti
struct proc *p;// Enable interrupts on this processor.
sti();
// Loop over process table looking for process with pid.
acquire(&ptable.lock);
80103a68: 68 20 3d 11 80 push $0x80113d20
80103a6d: bb c0 3d 11 80 mov $0x80113dc0,%ebx
80103a72: e8 49 0e 00 00 call 801048c0 <acquire>
cprintf("name \t pid \t state \t Priority \n");
80103a77: c7 04 24 d8 7c 10 80 movl $0x80107cd8,(%esp)
80103a7e: e8 dd cb ff ff call 80100660 <cprintf>
80103a83: 83 c4 10 add $0x10,%esp
80103a86: eb 1b jmp 80103aa3 <cps+0x43>
80103a88: 90 nop
80103a89: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if ( p->state == SLEEPING )
cprintf("%s \t %d \t SLEEPING \t %d \n ", p->name, p->pid , p-> priority);
else if ( p->state == RUNNING )
80103a90: 83 f8 04 cmp $0x4,%eax
80103a93: 74 53 je 80103ae8 <cps+0x88>
80103a95: 81 c3 88 00 00 00 add $0x88,%ebx
struct proc *p;// Enable interrupts on this processor.
sti();
// Loop over process table looking for process with pid.
acquire(&ptable.lock);
cprintf("name \t pid \t state \t Priority \n");
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103a9b: 81 fb c0 5f 11 80 cmp $0x80115fc0,%ebx
80103aa1: 74 2a je 80103acd <cps+0x6d>
if ( p->state == SLEEPING )
80103aa3: 8b 43 a0 mov -0x60(%ebx),%eax
80103aa6: 83 f8 02 cmp $0x2,%eax
80103aa9: 75 e5 jne 80103a90 <cps+0x30>
cprintf("%s \t %d \t SLEEPING \t %d \n ", p->name, p->pid , p-> priority);
80103aab: ff 73 10 pushl 0x10(%ebx)
80103aae: ff 73 a4 pushl -0x5c(%ebx)
80103ab1: 53 push %ebx
80103ab2: 68 d0 7b 10 80 push $0x80107bd0
80103ab7: 81 c3 88 00 00 00 add $0x88,%ebx
80103abd: e8 9e cb ff ff call 80100660 <cprintf>
80103ac2: 83 c4 10 add $0x10,%esp
struct proc *p;// Enable interrupts on this processor.
sti();
// Loop over process table looking for process with pid.
acquire(&ptable.lock);
cprintf("name \t pid \t state \t Priority \n");
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103ac5: 81 fb c0 5f 11 80 cmp $0x80115fc0,%ebx
80103acb: 75 d6 jne 80103aa3 <cps+0x43>
if ( p->state == SLEEPING )
cprintf("%s \t %d \t SLEEPING \t %d \n ", p->name, p->pid , p-> priority);
else if ( p->state == RUNNING )
cprintf("%s \t %d \t RUNNING \t %d \n ", p->name, p->pid , p->priority );
}
release(&ptable.lock);
80103acd: 83 ec 0c sub $0xc,%esp
80103ad0: 68 20 3d 11 80 push $0x80113d20
80103ad5: e8 06 0f 00 00 call 801049e0 <release>
return 22;
}
80103ada: b8 16 00 00 00 mov $0x16,%eax
80103adf: 8b 5d fc mov -0x4(%ebp),%ebx
80103ae2: c9 leave
80103ae3: c3 ret
80103ae4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
cprintf("name \t pid \t state \t Priority \n");
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if ( p->state == SLEEPING )
cprintf("%s \t %d \t SLEEPING \t %d \n ", p->name, p->pid , p-> priority);
else if ( p->state == RUNNING )
cprintf("%s \t %d \t RUNNING \t %d \n ", p->name, p->pid , p->priority );
80103ae8: ff 73 10 pushl 0x10(%ebx)
80103aeb: ff 73 a4 pushl -0x5c(%ebx)
80103aee: 53 push %ebx
80103aef: 68 ec 7b 10 80 push $0x80107bec
80103af4: e8 67 cb ff ff call 80100660 <cprintf>
80103af9: 83 c4 10 add $0x10,%esp
80103afc: eb 97 jmp 80103a95 <cps+0x35>
80103afe: 66 90 xchg %ax,%ax
80103b00 <chpr>:
}
//change priority
int
chpr( int pid, int priority )
{
80103b00: 55 push %ebp
80103b01: 89 e5 mov %esp,%ebp
80103b03: 53 push %ebx
80103b04: 83 ec 10 sub $0x10,%esp
80103b07: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *p;
acquire(&ptable.lock);
80103b0a: 68 20 3d 11 80 push $0x80113d20
80103b0f: e8 ac 0d 00 00 call 801048c0 <acquire>
80103b14: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103b17: ba 54 3d 11 80 mov $0x80113d54,%edx
80103b1c: eb 10 jmp 80103b2e <chpr+0x2e>
80103b1e: 66 90 xchg %ax,%ax
80103b20: 81 c2 88 00 00 00 add $0x88,%edx
80103b26: 81 fa 54 5f 11 80 cmp $0x80115f54,%edx
80103b2c: 74 0b je 80103b39 <chpr+0x39>
if(p->pid == pid ) {
80103b2e: 39 5a 10 cmp %ebx,0x10(%edx)
80103b31: 75 ed jne 80103b20 <chpr+0x20>
p->priority = priority;
80103b33: 8b 45 0c mov 0xc(%ebp),%eax
80103b36: 89 42 7c mov %eax,0x7c(%edx)
break;
}
}
release(&ptable.lock);
80103b39: 83 ec 0c sub $0xc,%esp
80103b3c: 68 20 3d 11 80 push $0x80113d20
80103b41: e8 9a 0e 00 00 call 801049e0 <release>
return pid;
}
80103b46: 89 d8 mov %ebx,%eax
80103b48: 8b 5d fc mov -0x4(%ebp),%ebx
80103b4b: c9 leave
80103b4c: c3 ret
80103b4d: 8d 76 00 lea 0x0(%esi),%esi
80103b50 <scheduler>:
// - eventually that process transfers control
// via swtch back to the scheduler.
#define NULL 0
void
scheduler(void)
{
80103b50: 55 push %ebp
80103b51: 89 e5 mov %esp,%ebp
80103b53: 57 push %edi
80103b54: 56 push %esi
80103b55: 53 push %ebx
80103b56: 83 ec 0c sub $0xc,%esp
struct proc *p;
struct proc *p1;
struct cpu *c = mycpu();
80103b59: e8 a2 fb ff ff call 80103700 <mycpu>
80103b5e: 8d 70 04 lea 0x4(%eax),%esi
80103b61: 89 c3 mov %eax,%ebx
c->proc = 0;
80103b63: c7 80 ac 00 00 00 00 movl $0x0,0xac(%eax)
80103b6a: 00 00 00
80103b6d: fb sti
// Enable interrupts on this processor.
sti();
struct proc *highP = NULL;
// Loop over process table looking for process to run.
acquire(&ptable.lock);
80103b6e: 83 ec 0c sub $0xc,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103b71: bf 54 3d 11 80 mov $0x80113d54,%edi
// Enable interrupts on this processor.
sti();
struct proc *highP = NULL;
// Loop over process table looking for process to run.
acquire(&ptable.lock);
80103b76: 68 20 3d 11 80 push $0x80113d20
80103b7b: e8 40 0d 00 00 call 801048c0 <acquire>
80103b80: 83 c4 10 add $0x10,%esp
80103b83: eb 11 jmp 80103b96 <scheduler+0x46>
80103b85: 8d 76 00 lea 0x0(%esi),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103b88: 81 c7 88 00 00 00 add $0x88,%edi
80103b8e: 81 ff 54 5f 11 80 cmp $0x80115f54,%edi
80103b94: 73 7a jae 80103c10 <scheduler+0xc0>
if(p->state != RUNNABLE)
80103b96: 83 7f 0c 03 cmpl $0x3,0xc(%edi)
80103b9a: 75 ec jne 80103b88 <scheduler+0x38>
80103b9c: b8 54 3d 11 80 mov $0x80113d54,%eax
80103ba1: eb 11 jmp 80103bb4 <scheduler+0x64>
80103ba3: 90 nop
80103ba4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
continue;
highP = p;
// choose one with highest priority
for(p1 = ptable.proc; p1 < &ptable.proc[NPROC]; p1++){
80103ba8: 05 88 00 00 00 add $0x88,%eax
80103bad: 3d 54 5f 11 80 cmp $0x80115f54,%eax
80103bb2: 74 1b je 80103bcf <scheduler+0x7f>
if(p1->state != RUNNABLE)
80103bb4: 83 78 0c 03 cmpl $0x3,0xc(%eax)
80103bb8: 75 ee jne 80103ba8 <scheduler+0x58>
continue;
if ( highP->priority > p1->priority )
80103bba: 8b 50 7c mov 0x7c(%eax),%edx
80103bbd: 39 57 7c cmp %edx,0x7c(%edi)
80103bc0: 0f 4f f8 cmovg %eax,%edi
if(p->state != RUNNABLE)
continue;
highP = p;
// choose one with highest priority
for(p1 = ptable.proc; p1 < &ptable.proc[NPROC]; p1++){
80103bc3: 05 88 00 00 00 add $0x88,%eax
80103bc8: 3d 54 5f 11 80 cmp $0x80115f54,%eax
80103bcd: 75 e5 jne 80103bb4 <scheduler+0x64>
// 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);
80103bcf: 83 ec 0c sub $0xc,%esp
p = highP;
// 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;
80103bd2: 89 bb ac 00 00 00 mov %edi,0xac(%ebx)
switchuvm(p);
80103bd8: 57 push %edi
sti();
struct proc *highP = NULL;
// Loop over process table looking for process to run.
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103bd9: 81 c7 88 00 00 00 add $0x88,%edi
// 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);
80103bdf: e8 bc 33 00 00 call 80106fa0 <switchuvm>
p->state = RUNNING;
80103be4: c7 47 84 04 00 00 00 movl $0x4,-0x7c(%edi)
swtch(&(c->scheduler), p->context);
80103beb: 58 pop %eax
80103bec: 5a pop %edx
80103bed: ff 77 94 pushl -0x6c(%edi)
80103bf0: 56 push %esi
80103bf1: e8 95 10 00 00 call 80104c8b <swtch>
switchkvm();
80103bf6: e8 85 33 00 00 call 80106f80 <switchkvm>
// Process is done running for now.
// It should have changed its p->state before coming back.
c->proc = 0;
80103bfb: 83 c4 10 add $0x10,%esp
sti();
struct proc *highP = NULL;
// Loop over process table looking for process to run.
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103bfe: 81 ff 54 5f 11 80 cmp $0x80115f54,%edi
swtch(&(c->scheduler), p->context);
switchkvm();
// Process is done running for now.
// It should have changed its p->state before coming back.
c->proc = 0;
80103c04: c7 83 ac 00 00 00 00 movl $0x0,0xac(%ebx)
80103c0b: 00 00 00
sti();
struct proc *highP = NULL;
// Loop over process table looking for process to run.
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103c0e: 72 86 jb 80103b96 <scheduler+0x46>
// Process is done running for now.
// It should have changed its p->state before coming back.
c->proc = 0;
}
release(&ptable.lock);
80103c10: 83 ec 0c sub $0xc,%esp
80103c13: 68 20 3d 11 80 push $0x80113d20
80103c18: e8 c3 0d 00 00 call 801049e0 <release>
}
80103c1d: 83 c4 10 add $0x10,%esp
80103c20: e9 48 ff ff ff jmp 80103b6d <scheduler+0x1d>
80103c25: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103c29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103c30 <sched>:
// be proc->intena and proc->ncli, but that would
// break in the few places where a lock is held but
// there's no process.
void
sched(void)
{
80103c30: 55 push %ebp
80103c31: 89 e5 mov %esp,%ebp
80103c33: 56 push %esi
80103c34: 53 push %ebx
// while reading proc from the cpu structure
struct proc*
myproc(void) {
struct cpu *c;
struct proc *p;
pushcli();
80103c35: e8 46 0c 00 00 call 80104880 <pushcli>
c = mycpu();
80103c3a: e8 c1 fa ff ff call 80103700 <mycpu>
p = c->proc;
80103c3f: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103c45: e8 26 0d 00 00 call 80104970 <popcli>
sched(void)
{
int intena;
struct proc *p = myproc();
if(!holding(&ptable.lock))
80103c4a: 83 ec 0c sub $0xc,%esp
80103c4d: 68 20 3d 11 80 push $0x80113d20
80103c52: e8 e9 0b 00 00 call 80104840 <holding>
80103c57: 83 c4 10 add $0x10,%esp
80103c5a: 85 c0 test %eax,%eax
80103c5c: 74 4f je 80103cad <sched+0x7d>
panic("sched ptable.lock");
if(mycpu()->ncli != 1)
80103c5e: e8 9d fa ff ff call 80103700 <mycpu>
80103c63: 83 b8 a4 00 00 00 01 cmpl $0x1,0xa4(%eax)
80103c6a: 75 68 jne 80103cd4 <sched+0xa4>
panic("sched locks");
if(p->state == RUNNING)
80103c6c: 83 7b 0c 04 cmpl $0x4,0xc(%ebx)
80103c70: 74 55 je 80103cc7 <sched+0x97>
static inline uint
readeflags(void)
{
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
80103c72: 9c pushf
80103c73: 58 pop %eax
panic("sched running");
if(readeflags()&FL_IF)
80103c74: f6 c4 02 test $0x2,%ah
80103c77: 75 41 jne 80103cba <sched+0x8a>
panic("sched interruptible");
intena = mycpu()->intena;
80103c79: e8 82 fa ff ff call 80103700 <mycpu>
swtch(&p->context, mycpu()->scheduler);
80103c7e: 83 c3 1c add $0x1c,%ebx
panic("sched locks");
if(p->state == RUNNING)
panic("sched running");
if(readeflags()&FL_IF)
panic("sched interruptible");
intena = mycpu()->intena;
80103c81: 8b b0 a8 00 00 00 mov 0xa8(%eax),%esi
swtch(&p->context, mycpu()->scheduler);
80103c87: e8 74 fa ff ff call 80103700 <mycpu>
80103c8c: 83 ec 08 sub $0x8,%esp
80103c8f: ff 70 04 pushl 0x4(%eax)
80103c92: 53 push %ebx
80103c93: e8 f3 0f 00 00 call 80104c8b <swtch>
mycpu()->intena = intena;
80103c98: e8 63 fa ff ff call 80103700 <mycpu>
}
80103c9d: 83 c4 10 add $0x10,%esp
panic("sched running");
if(readeflags()&FL_IF)
panic("sched interruptible");
intena = mycpu()->intena;
swtch(&p->context, mycpu()->scheduler);
mycpu()->intena = intena;
80103ca0: 89 b0 a8 00 00 00 mov %esi,0xa8(%eax)
}
80103ca6: 8d 65 f8 lea -0x8(%ebp),%esp
80103ca9: 5b pop %ebx
80103caa: 5e pop %esi
80103cab: 5d pop %ebp
80103cac: c3 ret
{
int intena;
struct proc *p = myproc();
if(!holding(&ptable.lock))
panic("sched ptable.lock");
80103cad: 83 ec 0c sub $0xc,%esp
80103cb0: 68 07 7c 10 80 push $0x80107c07
80103cb5: e8 b6 c6 ff ff call 80100370 <panic>
if(mycpu()->ncli != 1)
panic("sched locks");
if(p->state == RUNNING)
panic("sched running");
if(readeflags()&FL_IF)
panic("sched interruptible");
80103cba: 83 ec 0c sub $0xc,%esp
80103cbd: 68 33 7c 10 80 push $0x80107c33
80103cc2: e8 a9 c6 ff ff call 80100370 <panic>
if(!holding(&ptable.lock))
panic("sched ptable.lock");
if(mycpu()->ncli != 1)
panic("sched locks");
if(p->state == RUNNING)
panic("sched running");
80103cc7: 83 ec 0c sub $0xc,%esp
80103cca: 68 25 7c 10 80 push $0x80107c25
80103ccf: e8 9c c6 ff ff call 80100370 <panic>
struct proc *p = myproc();
if(!holding(&ptable.lock))
panic("sched ptable.lock");
if(mycpu()->ncli != 1)
panic("sched locks");
80103cd4: 83 ec 0c sub $0xc,%esp
80103cd7: 68 19 7c 10 80 push $0x80107c19
80103cdc: e8 8f c6 ff ff call 80100370 <panic>
80103ce1: eb 0d jmp 80103cf0 <exit>
80103ce3: 90 nop
80103ce4: 90 nop
80103ce5: 90 nop
80103ce6: 90 nop
80103ce7: 90 nop
80103ce8: 90 nop
80103ce9: 90 nop
80103cea: 90 nop
80103ceb: 90 nop
80103cec: 90 nop
80103ced: 90 nop
80103cee: 90 nop
80103cef: 90 nop
80103cf0 <exit>:
return pid;
}
void
exit(void)
{
80103cf0: 55 push %ebp
80103cf1: 89 e5 mov %esp,%ebp
80103cf3: 57 push %edi
80103cf4: 56 push %esi
80103cf5: 53 push %ebx
80103cf6: 83 ec 0c sub $0xc,%esp
// while reading proc from the cpu structure
struct proc*
myproc(void) {
struct cpu *c;
struct proc *p;
pushcli();
80103cf9: e8 82 0b 00 00 call 80104880 <pushcli>
c = mycpu();
80103cfe: e8 fd f9 ff ff call 80103700 <mycpu>
p = c->proc;
80103d03: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80103d09: e8 62 0c 00 00 call 80104970 <popcli>
{
struct proc *curproc = myproc();
struct proc *p;
int fd;
if(curproc == initproc)
80103d0e: 39 35 b8 b5 10 80 cmp %esi,0x8010b5b8
80103d14: 8d 5e 28 lea 0x28(%esi),%ebx
80103d17: 8d 7e 68 lea 0x68(%esi),%edi
80103d1a: 0f 84 f1 00 00 00 je 80103e11 <exit+0x121>
panic("init exiting");
// Close all open files.
for(fd = 0; fd < NOFILE; fd++){
if(curproc->ofile[fd]){
80103d20: 8b 03 mov (%ebx),%eax
80103d22: 85 c0 test %eax,%eax
80103d24: 74 12 je 80103d38 <exit+0x48>
fileclose(curproc->ofile[fd]);
80103d26: 83 ec 0c sub $0xc,%esp
80103d29: 50 push %eax
80103d2a: e8 01 d1 ff ff call 80100e30 <fileclose>
curproc->ofile[fd] = 0;
80103d2f: c7 03 00 00 00 00 movl $0x0,(%ebx)
80103d35: 83 c4 10 add $0x10,%esp
80103d38: 83 c3 04 add $0x4,%ebx
if(curproc == initproc)
panic("init exiting");
// Close all open files.
for(fd = 0; fd < NOFILE; fd++){
80103d3b: 39 df cmp %ebx,%edi
80103d3d: 75 e1 jne 80103d20 <exit+0x30>
fileclose(curproc->ofile[fd]);
curproc->ofile[fd] = 0;
}
}
begin_op();
80103d3f: e8 0c ee ff ff call 80102b50 <begin_op>
iput(curproc->cwd);
80103d44: 83 ec 0c sub $0xc,%esp
80103d47: ff 76 68 pushl 0x68(%esi)
80103d4a: e8 51 da ff ff call 801017a0 <iput>
end_op();
80103d4f: e8 6c ee ff ff call 80102bc0 <end_op>
curproc->cwd = 0;
80103d54: c7 46 68 00 00 00 00 movl $0x0,0x68(%esi)
acquire(&ptable.lock);
80103d5b: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103d62: e8 59 0b 00 00 call 801048c0 <acquire>
// Parent might be sleeping in wait().
wakeup1(curproc->parent);
80103d67: 8b 56 14 mov 0x14(%esi),%edx
80103d6a: 83 c4 10 add $0x10,%esp
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103d6d: b8 54 3d 11 80 mov $0x80113d54,%eax
80103d72: eb 10 jmp 80103d84 <exit+0x94>
80103d74: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103d78: 05 88 00 00 00 add $0x88,%eax
80103d7d: 3d 54 5f 11 80 cmp $0x80115f54,%eax
80103d82: 74 1e je 80103da2 <exit+0xb2>
if(p->state == SLEEPING && p->chan == chan)
80103d84: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103d88: 75 ee jne 80103d78 <exit+0x88>
80103d8a: 3b 50 20 cmp 0x20(%eax),%edx
80103d8d: 75 e9 jne 80103d78 <exit+0x88>
p->state = RUNNABLE;
80103d8f: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103d96: 05 88 00 00 00 add $0x88,%eax
80103d9b: 3d 54 5f 11 80 cmp $0x80115f54,%eax
80103da0: 75 e2 jne 80103d84 <exit+0x94>
wakeup1(curproc->parent);
// Pass abandoned children to init.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if(p->parent == curproc){
p->parent = initproc;
80103da2: 8b 0d b8 b5 10 80 mov 0x8010b5b8,%ecx
80103da8: ba 54 3d 11 80 mov $0x80113d54,%edx
80103dad: eb 0f jmp 80103dbe <exit+0xce>
80103daf: 90 nop
// Parent might be sleeping in wait().
wakeup1(curproc->parent);
// Pass abandoned children to init.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103db0: 81 c2 88 00 00 00 add $0x88,%edx
80103db6: 81 fa 54 5f 11 80 cmp $0x80115f54,%edx
80103dbc: 74 3a je 80103df8 <exit+0x108>
if(p->parent == curproc){
80103dbe: 39 72 14 cmp %esi,0x14(%edx)
80103dc1: 75 ed jne 80103db0 <exit+0xc0>
p->parent = initproc;
if(p->state == ZOMBIE)
80103dc3: 83 7a 0c 05 cmpl $0x5,0xc(%edx)
wakeup1(curproc->parent);
// Pass abandoned children to init.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if(p->parent == curproc){
p->parent = initproc;
80103dc7: 89 4a 14 mov %ecx,0x14(%edx)
if(p->state == ZOMBIE)
80103dca: 75 e4 jne 80103db0 <exit+0xc0>
80103dcc: b8 54 3d 11 80 mov $0x80113d54,%eax
80103dd1: eb 11 jmp 80103de4 <exit+0xf4>
80103dd3: 90 nop
80103dd4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80103dd8: 05 88 00 00 00 add $0x88,%eax
80103ddd: 3d 54 5f 11 80 cmp $0x80115f54,%eax
80103de2: 74 cc je 80103db0 <exit+0xc0>
if(p->state == SLEEPING && p->chan == chan)
80103de4: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80103de8: 75 ee jne 80103dd8 <exit+0xe8>
80103dea: 3b 48 20 cmp 0x20(%eax),%ecx
80103ded: 75 e9 jne 80103dd8 <exit+0xe8>
p->state = RUNNABLE;
80103def: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
80103df6: eb e0 jmp 80103dd8 <exit+0xe8>
wakeup1(initproc);
}
}
// Jump into the scheduler, never to return.
curproc->state = ZOMBIE;
80103df8: c7 46 0c 05 00 00 00 movl $0x5,0xc(%esi)
sched();
80103dff: e8 2c fe ff ff call 80103c30 <sched>
panic("zombie exit");
80103e04: 83 ec 0c sub $0xc,%esp
80103e07: 68 54 7c 10 80 push $0x80107c54
80103e0c: e8 5f c5 ff ff call 80100370 <panic>
struct proc *curproc = myproc();
struct proc *p;
int fd;
if(curproc == initproc)
panic("init exiting");
80103e11: 83 ec 0c sub $0xc,%esp
80103e14: 68 47 7c 10 80 push $0x80107c47
80103e19: e8 52 c5 ff ff call 80100370 <panic>
80103e1e: 66 90 xchg %ax,%ax
80103e20 <yield>:
}
// Give up the CPU for one scheduling round.
void
yield(void)
{
80103e20: 55 push %ebp
80103e21: 89 e5 mov %esp,%ebp
80103e23: 53 push %ebx
80103e24: 83 ec 10 sub $0x10,%esp
acquire(&ptable.lock); //DOC: yieldlock
80103e27: 68 20 3d 11 80 push $0x80113d20
80103e2c: e8 8f 0a 00 00 call 801048c0 <acquire>
// while reading proc from the cpu structure
struct proc*
myproc(void) {
struct cpu *c;
struct proc *p;
pushcli();
80103e31: e8 4a 0a 00 00 call 80104880 <pushcli>
c = mycpu();
80103e36: e8 c5 f8 ff ff call 80103700 <mycpu>
p = c->proc;
80103e3b: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103e41: e8 2a 0b 00 00 call 80104970 <popcli>
// Give up the CPU for one scheduling round.
void
yield(void)
{
acquire(&ptable.lock); //DOC: yieldlock
myproc()->state = RUNNABLE;
80103e46: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
sched();
80103e4d: e8 de fd ff ff call 80103c30 <sched>
release(&ptable.lock);
80103e52: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103e59: e8 82 0b 00 00 call 801049e0 <release>
}
80103e5e: 83 c4 10 add $0x10,%esp
80103e61: 8b 5d fc mov -0x4(%ebp),%ebx
80103e64: c9 leave
80103e65: c3 ret
80103e66: 8d 76 00 lea 0x0(%esi),%esi
80103e69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80103e70 <sleep>:
// Atomically release lock and sleep on chan.
// Reacquires lock when awakened.
void
sleep(void *chan, struct spinlock *lk)
{
80103e70: 55 push %ebp
80103e71: 89 e5 mov %esp,%ebp
80103e73: 57 push %edi
80103e74: 56 push %esi
80103e75: 53 push %ebx
80103e76: 83 ec 0c sub $0xc,%esp
80103e79: 8b 7d 08 mov 0x8(%ebp),%edi
80103e7c: 8b 75 0c mov 0xc(%ebp),%esi
// while reading proc from the cpu structure
struct proc*
myproc(void) {
struct cpu *c;
struct proc *p;
pushcli();
80103e7f: e8 fc 09 00 00 call 80104880 <pushcli>
c = mycpu();
80103e84: e8 77 f8 ff ff call 80103700 <mycpu>
p = c->proc;
80103e89: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80103e8f: e8 dc 0a 00 00 call 80104970 <popcli>
void
sleep(void *chan, struct spinlock *lk)
{
struct proc *p = myproc();
if(p == 0)
80103e94: 85 db test %ebx,%ebx
80103e96: 0f 84 87 00 00 00 je 80103f23 <sleep+0xb3>
panic("sleep");
if(lk == 0)
80103e9c: 85 f6 test %esi,%esi
80103e9e: 74 76 je 80103f16 <sleep+0xa6>
// change p->state and then call sched.
// Once we hold ptable.lock, we can be
// guaranteed that we won't miss any wakeup
// (wakeup runs with ptable.lock locked),
// so it's okay to release lk.
if(lk != &ptable.lock){ //DOC: sleeplock0
80103ea0: 81 fe 20 3d 11 80 cmp $0x80113d20,%esi
80103ea6: 74 50 je 80103ef8 <sleep+0x88>
acquire(&ptable.lock); //DOC: sleeplock1
80103ea8: 83 ec 0c sub $0xc,%esp
80103eab: 68 20 3d 11 80 push $0x80113d20
80103eb0: e8 0b 0a 00 00 call 801048c0 <acquire>
release(lk);
80103eb5: 89 34 24 mov %esi,(%esp)
80103eb8: e8 23 0b 00 00 call 801049e0 <release>
}
// Go to sleep.
p->chan = chan;
80103ebd: 89 7b 20 mov %edi,0x20(%ebx)
p->state = SLEEPING;
80103ec0: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx)
sched();
80103ec7: e8 64 fd ff ff call 80103c30 <sched>
// Tidy up.
p->chan = 0;
80103ecc: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
// Reacquire original lock.
if(lk != &ptable.lock){ //DOC: sleeplock2
release(&ptable.lock);
80103ed3: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103eda: e8 01 0b 00 00 call 801049e0 <release>
acquire(lk);
80103edf: 89 75 08 mov %esi,0x8(%ebp)
80103ee2: 83 c4 10 add $0x10,%esp
}
}
80103ee5: 8d 65 f4 lea -0xc(%ebp),%esp
80103ee8: 5b pop %ebx
80103ee9: 5e pop %esi
80103eea: 5f pop %edi
80103eeb: 5d pop %ebp
p->chan = 0;
// Reacquire original lock.
if(lk != &ptable.lock){ //DOC: sleeplock2
release(&ptable.lock);
acquire(lk);
80103eec: e9 cf 09 00 00 jmp 801048c0 <acquire>
80103ef1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(lk != &ptable.lock){ //DOC: sleeplock0
acquire(&ptable.lock); //DOC: sleeplock1
release(lk);
}
// Go to sleep.
p->chan = chan;
80103ef8: 89 7b 20 mov %edi,0x20(%ebx)
p->state = SLEEPING;
80103efb: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx)
sched();
80103f02: e8 29 fd ff ff call 80103c30 <sched>
// Tidy up.
p->chan = 0;
80103f07: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
// Reacquire original lock.
if(lk != &ptable.lock){ //DOC: sleeplock2
release(&ptable.lock);
acquire(lk);
}
}
80103f0e: 8d 65 f4 lea -0xc(%ebp),%esp
80103f11: 5b pop %ebx
80103f12: 5e pop %esi
80103f13: 5f pop %edi
80103f14: 5d pop %ebp
80103f15: c3 ret
if(p == 0)
panic("sleep");
if(lk == 0)
panic("sleep without lk");
80103f16: 83 ec 0c sub $0xc,%esp
80103f19: 68 66 7c 10 80 push $0x80107c66
80103f1e: e8 4d c4 ff ff call 80100370 <panic>
sleep(void *chan, struct spinlock *lk)
{
struct proc *p = myproc();
if(p == 0)
panic("sleep");
80103f23: 83 ec 0c sub $0xc,%esp
80103f26: 68 60 7c 10 80 push $0x80107c60
80103f2b: e8 40 c4 ff ff call 80100370 <panic>
80103f30 <wait>:
// Wait for a child process to exit and return its pid.
// Return -1 if this process has no children.
int
wait(void)
{
80103f30: 55 push %ebp
80103f31: 89 e5 mov %esp,%ebp
80103f33: 56 push %esi
80103f34: 53 push %ebx
// while reading proc from the cpu structure
struct proc*
myproc(void) {
struct cpu *c;
struct proc *p;
pushcli();
80103f35: e8 46 09 00 00 call 80104880 <pushcli>
c = mycpu();
80103f3a: e8 c1 f7 ff ff call 80103700 <mycpu>
p = c->proc;
80103f3f: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80103f45: e8 26 0a 00 00 call 80104970 <popcli>
{
struct proc *p;
int havekids, pid;
struct proc *curproc = myproc();
acquire(&ptable.lock);
80103f4a: 83 ec 0c sub $0xc,%esp
80103f4d: 68 20 3d 11 80 push $0x80113d20
80103f52: e8 69 09 00 00 call 801048c0 <acquire>
80103f57: 83 c4 10 add $0x10,%esp
for(;;){
// Scan through table looking for exited children.
havekids = 0;
80103f5a: 31 c0 xor %eax,%eax
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103f5c: bb 54 3d 11 80 mov $0x80113d54,%ebx
80103f61: eb 13 jmp 80103f76 <wait+0x46>
80103f63: 90 nop
80103f64: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80103f68: 81 c3 88 00 00 00 add $0x88,%ebx
80103f6e: 81 fb 54 5f 11 80 cmp $0x80115f54,%ebx
80103f74: 74 22 je 80103f98 <wait+0x68>
if(p->parent != curproc)
80103f76: 39 73 14 cmp %esi,0x14(%ebx)
80103f79: 75 ed jne 80103f68 <wait+0x38>
continue;
havekids = 1;
if(p->state == ZOMBIE){
80103f7b: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
80103f7f: 74 35 je 80103fb6 <wait+0x86>
acquire(&ptable.lock);
for(;;){
// Scan through table looking for exited children.
havekids = 0;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103f81: 81 c3 88 00 00 00 add $0x88,%ebx
if(p->parent != curproc)
continue;
havekids = 1;
80103f87: b8 01 00 00 00 mov $0x1,%eax
acquire(&ptable.lock);
for(;;){
// Scan through table looking for exited children.
havekids = 0;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
80103f8c: 81 fb 54 5f 11 80 cmp $0x80115f54,%ebx
80103f92: 75 e2 jne 80103f76 <wait+0x46>
80103f94: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return pid;
}
}
// No point waiting if we don't have any children.
if(!havekids || curproc->killed){
80103f98: 85 c0 test %eax,%eax
80103f9a: 74 70 je 8010400c <wait+0xdc>
80103f9c: 8b 46 24 mov 0x24(%esi),%eax
80103f9f: 85 c0 test %eax,%eax
80103fa1: 75 69 jne 8010400c <wait+0xdc>
release(&ptable.lock);
return -1;
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(curproc, &ptable.lock); //DOC: wait-sleep
80103fa3: 83 ec 08 sub $0x8,%esp
80103fa6: 68 20 3d 11 80 push $0x80113d20
80103fab: 56 push %esi
80103fac: e8 bf fe ff ff call 80103e70 <sleep>
}
80103fb1: 83 c4 10 add $0x10,%esp
80103fb4: eb a4 jmp 80103f5a <wait+0x2a>
continue;
havekids = 1;
if(p->state == ZOMBIE){
// Found one.
pid = p->pid;
kfree(p->kstack);
80103fb6: 83 ec 0c sub $0xc,%esp
80103fb9: ff 73 08 pushl 0x8(%ebx)
if(p->parent != curproc)
continue;
havekids = 1;
if(p->state == ZOMBIE){
// Found one.
pid = p->pid;
80103fbc: 8b 73 10 mov 0x10(%ebx),%esi
kfree(p->kstack);
80103fbf: e8 1c e3 ff ff call 801022e0 <kfree>
p->kstack = 0;
freevm(p->pgdir);
80103fc4: 5a pop %edx
80103fc5: ff 73 04 pushl 0x4(%ebx)
havekids = 1;
if(p->state == ZOMBIE){
// Found one.
pid = p->pid;
kfree(p->kstack);
p->kstack = 0;
80103fc8: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
freevm(p->pgdir);
80103fcf: e8 4c 33 00 00 call 80107320 <freevm>
p->pid = 0;
80103fd4: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
p->parent = 0;
80103fdb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
p->name[0] = 0;
80103fe2: c6 43 6c 00 movb $0x0,0x6c(%ebx)
p->killed = 0;
80103fe6: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
p->state = UNUSED;
80103fed: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
release(&ptable.lock);
80103ff4: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80103ffb: e8 e0 09 00 00 call 801049e0 <release>
return pid;
80104000: 83 c4 10 add $0x10,%esp
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(curproc, &ptable.lock); //DOC: wait-sleep
}
}
80104003: 8d 65 f8 lea -0x8(%ebp),%esp
p->parent = 0;
p->name[0] = 0;
p->killed = 0;
p->state = UNUSED;
release(&ptable.lock);
return pid;
80104006: 89 f0 mov %esi,%eax
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(curproc, &ptable.lock); //DOC: wait-sleep
}
}
80104008: 5b pop %ebx
80104009: 5e pop %esi
8010400a: 5d pop %ebp
8010400b: c3 ret
}
}
// No point waiting if we don't have any children.
if(!havekids || curproc->killed){
release(&ptable.lock);
8010400c: 83 ec 0c sub $0xc,%esp
8010400f: 68 20 3d 11 80 push $0x80113d20
80104014: e8 c7 09 00 00 call 801049e0 <release>
return -1;
80104019: 83 c4 10 add $0x10,%esp
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(curproc, &ptable.lock); //DOC: wait-sleep
}
}
8010401c: 8d 65 f8 lea -0x8(%ebp),%esp
}
// No point waiting if we don't have any children.
if(!havekids || curproc->killed){
release(&ptable.lock);
return -1;
8010401f: b8 ff ff ff ff mov $0xffffffff,%eax
}
// Wait for children to exit. (See wakeup1 call in proc_exit.)
sleep(curproc, &ptable.lock); //DOC: wait-sleep
}
}
80104024: 5b pop %ebx
80104025: 5e pop %esi
80104026: 5d pop %ebp
80104027: c3 ret
80104028: 90 nop
80104029: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104030 <wakeup>:
}
// Wake up all processes sleeping on chan.
void
wakeup(void *chan)
{
80104030: 55 push %ebp
80104031: 89 e5 mov %esp,%ebp
80104033: 53 push %ebx
80104034: 83 ec 10 sub $0x10,%esp
80104037: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&ptable.lock);
8010403a: 68 20 3d 11 80 push $0x80113d20
8010403f: e8 7c 08 00 00 call 801048c0 <acquire>
80104044: 83 c4 10 add $0x10,%esp
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80104047: b8 54 3d 11 80 mov $0x80113d54,%eax
8010404c: eb 0e jmp 8010405c <wakeup+0x2c>
8010404e: 66 90 xchg %ax,%ax
80104050: 05 88 00 00 00 add $0x88,%eax
80104055: 3d 54 5f 11 80 cmp $0x80115f54,%eax
8010405a: 74 1e je 8010407a <wakeup+0x4a>
if(p->state == SLEEPING && p->chan == chan)
8010405c: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80104060: 75 ee jne 80104050 <wakeup+0x20>
80104062: 3b 58 20 cmp 0x20(%eax),%ebx
80104065: 75 e9 jne 80104050 <wakeup+0x20>
p->state = RUNNABLE;
80104067: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
8010406e: 05 88 00 00 00 add $0x88,%eax
80104073: 3d 54 5f 11 80 cmp $0x80115f54,%eax
80104078: 75 e2 jne 8010405c <wakeup+0x2c>
void
wakeup(void *chan)
{
acquire(&ptable.lock);
wakeup1(chan);
release(&ptable.lock);
8010407a: c7 45 08 20 3d 11 80 movl $0x80113d20,0x8(%ebp)
}
80104081: 8b 5d fc mov -0x4(%ebp),%ebx
80104084: c9 leave
void
wakeup(void *chan)
{
acquire(&ptable.lock);
wakeup1(chan);
release(&ptable.lock);
80104085: e9 56 09 00 00 jmp 801049e0 <release>
8010408a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104090 <kill>:
// Kill the process with the given pid.
// Process won't exit until it returns
// to user space (see trap in trap.c).
int
kill(int pid)
{
80104090: 55 push %ebp
80104091: 89 e5 mov %esp,%ebp
80104093: 53 push %ebx
80104094: 83 ec 10 sub $0x10,%esp
80104097: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *p;
acquire(&ptable.lock);
8010409a: 68 20 3d 11 80 push $0x80113d20
8010409f: e8 1c 08 00 00 call 801048c0 <acquire>
801040a4: 83 c4 10 add $0x10,%esp
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
801040a7: b8 54 3d 11 80 mov $0x80113d54,%eax
801040ac: eb 0e jmp 801040bc <kill+0x2c>
801040ae: 66 90 xchg %ax,%ax
801040b0: 05 88 00 00 00 add $0x88,%eax
801040b5: 3d 54 5f 11 80 cmp $0x80115f54,%eax
801040ba: 74 3c je 801040f8 <kill+0x68>
if(p->pid == pid){
801040bc: 39 58 10 cmp %ebx,0x10(%eax)
801040bf: 75 ef jne 801040b0 <kill+0x20>
p->killed = 1;
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
801040c1: 83 78 0c 02 cmpl $0x2,0xc(%eax)
struct proc *p;
acquire(&ptable.lock);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if(p->pid == pid){
p->killed = 1;
801040c5: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
801040cc: 74 1a je 801040e8 <kill+0x58>
p->state = RUNNABLE;
release(&ptable.lock);
801040ce: 83 ec 0c sub $0xc,%esp
801040d1: 68 20 3d 11 80 push $0x80113d20
801040d6: e8 05 09 00 00 call 801049e0 <release>
return 0;
801040db: 83 c4 10 add $0x10,%esp
801040de: 31 c0 xor %eax,%eax
}
}
release(&ptable.lock);
return -1;
}
801040e0: 8b 5d fc mov -0x4(%ebp),%ebx
801040e3: c9 leave
801040e4: c3 ret
801040e5: 8d 76 00 lea 0x0(%esi),%esi
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if(p->pid == pid){
p->killed = 1;
// Wake process from sleep if necessary.
if(p->state == SLEEPING)
p->state = RUNNABLE;
801040e8: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
801040ef: eb dd jmp 801040ce <kill+0x3e>
801040f1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
release(&ptable.lock);
return 0;
}
}
release(&ptable.lock);
801040f8: 83 ec 0c sub $0xc,%esp
801040fb: 68 20 3d 11 80 push $0x80113d20
80104100: e8 db 08 00 00 call 801049e0 <release>
return -1;
80104105: 83 c4 10 add $0x10,%esp
80104108: b8 ff ff ff ff mov $0xffffffff,%eax
}
8010410d: 8b 5d fc mov -0x4(%ebp),%ebx
80104110: c9 leave
80104111: c3 ret
80104112: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104119: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104120 <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)
{
80104120: 55 push %ebp
80104121: 89 e5 mov %esp,%ebp
80104123: 57 push %edi
80104124: 56 push %esi
80104125: 53 push %ebx
80104126: 8d 75 e8 lea -0x18(%ebp),%esi
80104129: bb c0 3d 11 80 mov $0x80113dc0,%ebx
8010412e: 83 ec 3c sub $0x3c,%esp
80104131: eb 27 jmp 8010415a <procdump+0x3a>
80104133: 90 nop
80104134: 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");
80104138: 83 ec 0c sub $0xc,%esp
8010413b: 68 2b 80 10 80 push $0x8010802b
80104140: e8 1b c5 ff ff call 80100660 <cprintf>
80104145: 83 c4 10 add $0x10,%esp
80104148: 81 c3 88 00 00 00 add $0x88,%ebx
int i;
struct proc *p;
char *state;
uint pc[10];
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
8010414e: 81 fb c0 5f 11 80 cmp $0x80115fc0,%ebx
80104154: 0f 84 7e 00 00 00 je 801041d8 <procdump+0xb8>
if(p->state == UNUSED)
8010415a: 8b 43 a0 mov -0x60(%ebx),%eax
8010415d: 85 c0 test %eax,%eax
8010415f: 74 e7 je 80104148 <procdump+0x28>
continue;
if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
80104161: 83 f8 05 cmp $0x5,%eax
state = states[p->state];
else
state = "???";
80104164: ba 77 7c 10 80 mov $0x80107c77,%edx
uint pc[10];
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
if(p->state == UNUSED)
continue;
if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
80104169: 77 11 ja 8010417c <procdump+0x5c>
8010416b: 8b 14 85 f8 7c 10 80 mov -0x7fef8308(,%eax,4),%edx
state = states[p->state];
else
state = "???";
80104172: b8 77 7c 10 80 mov $0x80107c77,%eax
80104177: 85 d2 test %edx,%edx
80104179: 0f 44 d0 cmove %eax,%edx
cprintf("%d %s %s", p->pid, state, p->name);
8010417c: 53 push %ebx
8010417d: 52 push %edx
8010417e: ff 73 a4 pushl -0x5c(%ebx)
80104181: 68 7b 7c 10 80 push $0x80107c7b
80104186: e8 d5 c4 ff ff call 80100660 <cprintf>
if(p->state == SLEEPING){
8010418b: 83 c4 10 add $0x10,%esp
8010418e: 83 7b a0 02 cmpl $0x2,-0x60(%ebx)
80104192: 75 a4 jne 80104138 <procdump+0x18>
getcallerpcs((uint*)p->context->ebp+2, pc);
80104194: 8d 45 c0 lea -0x40(%ebp),%eax
80104197: 83 ec 08 sub $0x8,%esp
8010419a: 8d 7d c0 lea -0x40(%ebp),%edi
8010419d: 50 push %eax
8010419e: 8b 43 b0 mov -0x50(%ebx),%eax
801041a1: 8b 40 0c mov 0xc(%eax),%eax
801041a4: 83 c0 08 add $0x8,%eax
801041a7: 50 push %eax
801041a8: e8 33 06 00 00 call 801047e0 <getcallerpcs>
801041ad: 83 c4 10 add $0x10,%esp
for(i=0; i<10 && pc[i] != 0; i++)
801041b0: 8b 17 mov (%edi),%edx
801041b2: 85 d2 test %edx,%edx
801041b4: 74 82 je 80104138 <procdump+0x18>
cprintf(" %p", pc[i]);
801041b6: 83 ec 08 sub $0x8,%esp
801041b9: 83 c7 04 add $0x4,%edi
801041bc: 52 push %edx
801041bd: 68 81 76 10 80 push $0x80107681
801041c2: e8 99 c4 ff ff call 80100660 <cprintf>
else
state = "???";
cprintf("%d %s %s", p->pid, state, p->name);
if(p->state == SLEEPING){
getcallerpcs((uint*)p->context->ebp+2, pc);
for(i=0; i<10 && pc[i] != 0; i++)
801041c7: 83 c4 10 add $0x10,%esp
801041ca: 39 f7 cmp %esi,%edi
801041cc: 75 e2 jne 801041b0 <procdump+0x90>
801041ce: e9 65 ff ff ff jmp 80104138 <procdump+0x18>
801041d3: 90 nop
801041d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
cprintf(" %p", pc[i]);
}
cprintf("\n");
}
}
801041d8: 8d 65 f4 lea -0xc(%ebp),%esp
801041db: 5b pop %ebx
801041dc: 5e pop %esi
801041dd: 5f pop %edi
801041de: 5d pop %ebp
801041df: c3 ret
801041e0 <clone>:
int clone(void (*function)(void *), void *arg, void *stack)
{
801041e0: 55 push %ebp
801041e1: 89 e5 mov %esp,%ebp
801041e3: 57 push %edi
801041e4: 56 push %esi
801041e5: 53 push %ebx
int next_tid = 1, num_of_thread = 0;
801041e6: 31 f6 xor %esi,%esi
}
}
int clone(void (*function)(void *), void *arg, void *stack)
{
801041e8: 83 ec 1c sub $0x1c,%esp
// while reading proc from the cpu structure
struct proc*
myproc(void) {
struct cpu *c;
struct proc *p;
pushcli();
801041eb: e8 90 06 00 00 call 80104880 <pushcli>
c = mycpu();
801041f0: e8 0b f5 ff ff call 80103700 <mycpu>
p = c->proc;
801041f5: 8b 80 ac 00 00 00 mov 0xac(%eax),%eax
801041fb: 89 c7 mov %eax,%edi
801041fd: 89 45 e4 mov %eax,-0x1c(%ebp)
popcli();
80104200: e8 6b 07 00 00 call 80104970 <popcli>
struct proc *np; // new thread
struct proc *p;
struct proc *curproc = myproc(); // current process
//struct proc *main_thread; // store main threadstruct proc *p;
int pid = curproc->pid;
acquire (&ptable.lock);
80104205: 83 ec 0c sub $0xc,%esp
int next_tid = 1, num_of_thread = 0;
struct proc *np; // new thread
struct proc *p;
struct proc *curproc = myproc(); // current process
//struct proc *main_thread; // store main threadstruct proc *p;
int pid = curproc->pid;
80104208: 8b 5f 10 mov 0x10(%edi),%ebx
acquire (&ptable.lock);
8010420b: 68 20 3d 11 80 push $0x80113d20
80104210: e8 ab 06 00 00 call 801048c0 <acquire>
80104215: 83 c4 10 add $0x10,%esp
// find next tid
for (p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80104218: b8 54 3d 11 80 mov $0x80113d54,%eax
}
int clone(void (*function)(void *), void *arg, void *stack)
{
int next_tid = 1, num_of_thread = 0;
8010421d: ba 01 00 00 00 mov $0x1,%edx
80104222: eb 10 jmp 80104234 <clone+0x54>
80104224: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
struct proc *curproc = myproc(); // current process
//struct proc *main_thread; // store main threadstruct proc *p;
int pid = curproc->pid;
acquire (&ptable.lock);
// find next tid
for (p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80104228: 05 88 00 00 00 add $0x88,%eax
8010422d: 3d 54 5f 11 80 cmp $0x80115f54,%eax
80104232: 74 23 je 80104257 <clone+0x77>
{
if (p->pid == pid)
80104234: 3b 58 10 cmp 0x10(%eax),%ebx
80104237: 75 ef jne 80104228 <clone+0x48>
{
if (p->tid > next_tid)
80104239: 8b 88 80 00 00 00 mov 0x80(%eax),%ecx
8010423f: 39 ca cmp %ecx,%edx
80104241: 0f 4c d1 cmovl %ecx,%edx
{
next_tid = p->tid;
}
if (p->state != UNUSED)
{
num_of_thread++;
80104244: 83 78 0c 01 cmpl $0x1,0xc(%eax)
80104248: 83 de ff sbb $0xffffffff,%esi
struct proc *curproc = myproc(); // current process
//struct proc *main_thread; // store main threadstruct proc *p;
int pid = curproc->pid;
acquire (&ptable.lock);
// find next tid
for (p = ptable.proc; p < &ptable.proc[NPROC]; p++)
8010424b: 05 88 00 00 00 add $0x88,%eax
80104250: 3d 54 5f 11 80 cmp $0x80115f54,%eax
80104255: 75 dd jne 80104234 <clone+0x54>
num_of_thread++;
}
}
}
next_tid++;
release(&ptable.lock);
80104257: 83 ec 0c sub $0xc,%esp
{
num_of_thread++;
}
}
}
next_tid++;
8010425a: 8d 42 01 lea 0x1(%edx),%eax
release(&ptable.lock);
8010425d: 68 20 3d 11 80 push $0x80113d20
{
num_of_thread++;
}
}
}
next_tid++;
80104262: 89 45 e0 mov %eax,-0x20(%ebp)
release(&ptable.lock);
80104265: e8 76 07 00 00 call 801049e0 <release>
if (num_of_thread >= 8)
8010426a: 83 c4 10 add $0x10,%esp
8010426d: 83 fe 07 cmp $0x7,%esi
80104270: 0f 8f fa 00 00 00 jg 80104370 <clone+0x190>
{
return -1; // if there is already 8 thread in the process
}
if((uint)stack%PGSIZE != 0)
80104276: f7 45 10 ff 0f 00 00 testl $0xfff,0x10(%ebp)
8010427d: 0f 85 ed 00 00 00 jne 80104370 <clone+0x190>
{
return -1;
}
// allocate thread
if((np = allocproc()) == 0){
80104283: e8 28 f3 ff ff call 801035b0 <allocproc>
80104288: 85 c0 test %eax,%eax
8010428a: 89 c3 mov %eax,%ebx
8010428c: 0f 84 de 00 00 00 je 80104370 <clone+0x190>
return -1;
}
np->tid = next_tid; // set tid
np->pgdir = curproc->pgdir;
80104292: 8b 7d e4 mov -0x1c(%ebp),%edi
}
// allocate thread
if((np = allocproc()) == 0){
return -1;
}
np->tid = next_tid; // set tid
80104295: 8b 45 e0 mov -0x20(%ebp),%eax
np->pgdir = curproc->pgdir;
np->sz = curproc->sz;
np->parent = curproc;
*np->tf = *curproc->tf;
80104298: b9 13 00 00 00 mov $0x13,%ecx
int *sp = stack + 4096 - 8;
// moving arg to function
np->tf->eip = (uint)function;
8010429d: 8b 55 08 mov 0x8(%ebp),%edx
}
// allocate thread
if((np = allocproc()) == 0){
return -1;
}
np->tid = next_tid; // set tid
801042a0: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
np->pgdir = curproc->pgdir;
801042a6: 8b 47 04 mov 0x4(%edi),%eax
801042a9: 89 43 04 mov %eax,0x4(%ebx)
np->sz = curproc->sz;
801042ac: 8b 07 mov (%edi),%eax
np->parent = curproc;
801042ae: 89 7b 14 mov %edi,0x14(%ebx)
if((np = allocproc()) == 0){
return -1;
}
np->tid = next_tid; // set tid
np->pgdir = curproc->pgdir;
np->sz = curproc->sz;
801042b1: 89 03 mov %eax,(%ebx)
np->parent = curproc;
*np->tf = *curproc->tf;
801042b3: 8b 77 18 mov 0x18(%edi),%esi
801042b6: 8b 7b 18 mov 0x18(%ebx),%edi
801042b9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
np->tf->esp = (uint)stack + 4096 - 8; // top of stacknp->tf->ebp = (uint)stack + 4096 - 8;
np->tf->eax = 0; // initialize return value
*(sp + 1) = (uint)arg;
*sp = 0xffffffff;
int i;
for(i = 0; i < NOFILE; i++)
801042bb: 8b 7d e4 mov -0x1c(%ebp),%edi
801042be: 31 f6 xor %esi,%esi
np->sz = curproc->sz;
np->parent = curproc;
*np->tf = *curproc->tf;
int *sp = stack + 4096 - 8;
// moving arg to function
np->tf->eip = (uint)function;
801042c0: 8b 43 18 mov 0x18(%ebx),%eax
801042c3: 89 50 38 mov %edx,0x38(%eax)
np->tf->esp = (uint)stack + 4096 - 8; // top of stacknp->tf->ebp = (uint)stack + 4096 - 8;
801042c6: 8b 55 10 mov 0x10(%ebp),%edx
801042c9: 8b 43 18 mov 0x18(%ebx),%eax
801042cc: 81 c2 f8 0f 00 00 add $0xff8,%edx
801042d2: 89 50 44 mov %edx,0x44(%eax)
np->tf->eax = 0; // initialize return value
801042d5: 8b 43 18 mov 0x18(%ebx),%eax
*(sp + 1) = (uint)arg;
801042d8: 8b 55 10 mov 0x10(%ebp),%edx
*np->tf = *curproc->tf;
int *sp = stack + 4096 - 8;
// moving arg to function
np->tf->eip = (uint)function;
np->tf->esp = (uint)stack + 4096 - 8; // top of stacknp->tf->ebp = (uint)stack + 4096 - 8;
np->tf->eax = 0; // initialize return value
801042db: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
*(sp + 1) = (uint)arg;
801042e2: 8b 45 0c mov 0xc(%ebp),%eax
*sp = 0xffffffff;
801042e5: c7 82 f8 0f 00 00 ff movl $0xffffffff,0xff8(%edx)
801042ec: ff ff ff
int *sp = stack + 4096 - 8;
// moving arg to function
np->tf->eip = (uint)function;
np->tf->esp = (uint)stack + 4096 - 8; // top of stacknp->tf->ebp = (uint)stack + 4096 - 8;
np->tf->eax = 0; // initialize return value
*(sp + 1) = (uint)arg;
801042ef: 89 82 fc 0f 00 00 mov %eax,0xffc(%edx)
801042f5: 8d 76 00 lea 0x0(%esi),%esi
*sp = 0xffffffff;
int i;
for(i = 0; i < NOFILE; i++)
if(curproc->ofile[i])
801042f8: 8b 44 b7 28 mov 0x28(%edi,%esi,4),%eax
801042fc: 85 c0 test %eax,%eax
801042fe: 74 10 je 80104310 <clone+0x130>
np->ofile[i] = filedup(curproc->ofile[i]);
80104300: 83 ec 0c sub $0xc,%esp
80104303: 50 push %eax
80104304: e8 d7 ca ff ff call 80100de0 <filedup>
80104309: 83 c4 10 add $0x10,%esp
8010430c: 89 44 b3 28 mov %eax,0x28(%ebx,%esi,4)
np->tf->esp = (uint)stack + 4096 - 8; // top of stacknp->tf->ebp = (uint)stack + 4096 - 8;
np->tf->eax = 0; // initialize return value
*(sp + 1) = (uint)arg;
*sp = 0xffffffff;
int i;
for(i = 0; i < NOFILE; i++)
80104310: 83 c6 01 add $0x1,%esi
80104313: 83 fe 10 cmp $0x10,%esi
80104316: 75 e0 jne 801042f8 <clone+0x118>
if(curproc->ofile[i])
np->ofile[i] = filedup(curproc->ofile[i]);
np->cwd = idup(curproc->cwd);
80104318: 8b 7d e4 mov -0x1c(%ebp),%edi
8010431b: 83 ec 0c sub $0xc,%esp
8010431e: ff 77 68 pushl 0x68(%edi)
80104321: e8 1a d3 ff ff call 80101640 <idup>
80104326: 89 43 68 mov %eax,0x68(%ebx)
safestrcpy(np->name, curproc->name, sizeof(curproc->name));
80104329: 89 f8 mov %edi,%eax
8010432b: 83 c4 0c add $0xc,%esp
8010432e: 83 c0 6c add $0x6c,%eax
80104331: 6a 10 push $0x10
80104333: 50 push %eax
80104334: 8d 43 6c lea 0x6c(%ebx),%eax
80104337: 50 push %eax
80104338: e8 f3 08 00 00 call 80104c30 <safestrcpy>
np->pid = curproc->pid;
8010433d: 8b 47 10 mov 0x10(%edi),%eax
80104340: 89 43 10 mov %eax,0x10(%ebx)
acquire(&ptable.lock);
80104343: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
8010434a: e8 71 05 00 00 call 801048c0 <acquire>
np->state = RUNNABLE;
8010434f: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx)
release(&ptable.lock);
80104356: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
8010435d: e8 7e 06 00 00 call 801049e0 <release>
return next_tid;
80104362: 8b 45 e0 mov -0x20(%ebp),%eax
80104365: 83 c4 10 add $0x10,%esp
}
80104368: 8d 65 f4 lea -0xc(%ebp),%esp
8010436b: 5b pop %ebx
8010436c: 5e pop %esi
8010436d: 5f pop %edi
8010436e: 5d pop %ebp
8010436f: c3 ret
80104370: 8d 65 f4 lea -0xc(%ebp),%esp
}
next_tid++;
release(&ptable.lock);
if (num_of_thread >= 8)
{
return -1; // if there is already 8 thread in the process
80104373: b8 ff ff ff ff mov $0xffffffff,%eax
np->pid = curproc->pid;
acquire(&ptable.lock);
np->state = RUNNABLE;
release(&ptable.lock);
return next_tid;
}
80104378: 5b pop %ebx
80104379: 5e pop %esi
8010437a: 5f pop %edi
8010437b: 5d pop %ebp
8010437c: c3 ret
8010437d: 8d 76 00 lea 0x0(%esi),%esi
80104380 <thread_exit>:
void thread_exit(void *retval)
{
80104380: 55 push %ebp
80104381: 89 e5 mov %esp,%ebp
80104383: 57 push %edi
80104384: 56 push %esi
80104385: 53 push %ebx
80104386: 83 ec 1c sub $0x1c,%esp
// while reading proc from the cpu structure
struct proc*
myproc(void) {
struct cpu *c;
struct proc *p;
pushcli();
80104389: e8 f2 04 00 00 call 80104880 <pushcli>
c = mycpu();
8010438e: e8 6d f3 ff ff call 80103700 <mycpu>
p = c->proc;
80104393: 8b b0 ac 00 00 00 mov 0xac(%eax),%esi
popcli();
80104399: e8 d2 05 00 00 call 80104970 <popcli>
int fd, pid, tid;
struct proc *curproc = myproc();
struct proc *p;
pid = curproc->pid;
tid = curproc->tid;
if (curproc == initproc)
8010439e: 39 35 b8 b5 10 80 cmp %esi,0x8010b5b8
{
int fd, pid, tid;
struct proc *curproc = myproc();
struct proc *p;
pid = curproc->pid;
tid = curproc->tid;
801043a4: 8b 86 80 00 00 00 mov 0x80(%esi),%eax
801043aa: 89 45 e4 mov %eax,-0x1c(%ebp)
if (curproc == initproc)
801043ad: 0f 84 6c 01 00 00 je 8010451f <thread_exit+0x19f>
panic("init exiting");
if (tid == 1) // terminate all thread
801043b3: 83 7d e4 01 cmpl $0x1,-0x1c(%ebp)
801043b7: 0f 84 5d 01 00 00 je 8010451a <thread_exit+0x19a>
801043bd: 8d 46 68 lea 0x68(%esi),%eax
void thread_exit(void *retval)
{
int fd, pid, tid;
struct proc *curproc = myproc();
struct proc *p;
pid = curproc->pid;
801043c0: 8b 5e 10 mov 0x10(%esi),%ebx
801043c3: 8d 7e 28 lea 0x28(%esi),%edi
801043c6: 89 45 e0 mov %eax,-0x20(%ebp)
801043c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
exit();
}
else // terminate thread only who has that tid
{
for(fd = 0; fd < NOFILE; fd++){
if(curproc->ofile[fd]){
801043d0: 8b 0f mov (%edi),%ecx
801043d2: 85 c9 test %ecx,%ecx
801043d4: 74 12 je 801043e8 <thread_exit+0x68>
fileclose(curproc->ofile[fd]);
801043d6: 83 ec 0c sub $0xc,%esp
801043d9: 51 push %ecx
801043da: e8 51 ca ff ff call 80100e30 <fileclose>
curproc->ofile[fd] = 0;
801043df: c7 07 00 00 00 00 movl $0x0,(%edi)
801043e5: 83 c4 10 add $0x10,%esp
801043e8: 83 c7 04 add $0x4,%edi
{
exit();
}
else // terminate thread only who has that tid
{
for(fd = 0; fd < NOFILE; fd++){
801043eb: 3b 7d e0 cmp -0x20(%ebp),%edi
801043ee: 75 e0 jne 801043d0 <thread_exit+0x50>
if(curproc->ofile[fd]){
fileclose(curproc->ofile[fd]);
curproc->ofile[fd] = 0;
}
}
begin_op();
801043f0: e8 5b e7 ff ff call 80102b50 <begin_op>
iput(curproc->cwd);
801043f5: 83 ec 0c sub $0xc,%esp
801043f8: ff 76 68 pushl 0x68(%esi)
801043fb: e8 a0 d3 ff ff call 801017a0 <iput>
end_op();
80104400: e8 bb e7 ff ff call 80102bc0 <end_op>
curproc->cwd = 0;
80104405: c7 46 68 00 00 00 00 movl $0x0,0x68(%esi)
acquire(&ptable.lock);
8010440c: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
80104413: e8 a8 04 00 00 call 801048c0 <acquire>
wakeup1(curproc->parent);
80104418: 8b 4e 14 mov 0x14(%esi),%ecx
8010441b: 83 c4 10 add $0x10,%esp
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
8010441e: b8 54 3d 11 80 mov $0x80113d54,%eax
80104423: eb 0f jmp 80104434 <thread_exit+0xb4>
80104425: 8d 76 00 lea 0x0(%esi),%esi
80104428: 05 88 00 00 00 add $0x88,%eax
8010442d: 3d 54 5f 11 80 cmp $0x80115f54,%eax
80104432: 74 1e je 80104452 <thread_exit+0xd2>
if(p->state == SLEEPING && p->chan == chan)
80104434: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80104438: 75 ee jne 80104428 <thread_exit+0xa8>
8010443a: 3b 48 20 cmp 0x20(%eax),%ecx
8010443d: 75 e9 jne 80104428 <thread_exit+0xa8>
p->state = RUNNABLE;
8010443f: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80104446: 05 88 00 00 00 add $0x88,%eax
8010444b: 3d 54 5f 11 80 cmp $0x80115f54,%eax
80104450: 75 e2 jne 80104434 <thread_exit+0xb4>
curproc->cwd = 0;
acquire(&ptable.lock);
wakeup1(curproc->parent);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) {
if (p->parent == curproc) {
p->parent = initproc;
80104452: 8b 3d b8 b5 10 80 mov 0x8010b5b8,%edi
80104458: b9 54 3d 11 80 mov $0x80113d54,%ecx
8010445d: eb 0f jmp 8010446e <thread_exit+0xee>
8010445f: 90 nop
iput(curproc->cwd);
end_op();
curproc->cwd = 0;
acquire(&ptable.lock);
wakeup1(curproc->parent);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) {
80104460: 81 c1 88 00 00 00 add $0x88,%ecx
80104466: 81 f9 54 5f 11 80 cmp $0x80115f54,%ecx
8010446c: 74 3a je 801044a8 <thread_exit+0x128>
if (p->parent == curproc) {
8010446e: 39 71 14 cmp %esi,0x14(%ecx)
80104471: 75 ed jne 80104460 <thread_exit+0xe0>
p->parent = initproc;
if (p->state == ZOMBIE)
80104473: 83 79 0c 05 cmpl $0x5,0xc(%ecx)
curproc->cwd = 0;
acquire(&ptable.lock);
wakeup1(curproc->parent);
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) {
if (p->parent == curproc) {
p->parent = initproc;
80104477: 89 79 14 mov %edi,0x14(%ecx)
if (p->state == ZOMBIE)
8010447a: 75 e4 jne 80104460 <thread_exit+0xe0>
8010447c: b8 54 3d 11 80 mov $0x80113d54,%eax
80104481: eb 11 jmp 80104494 <thread_exit+0x114>
80104483: 90 nop
80104484: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80104488: 05 88 00 00 00 add $0x88,%eax
8010448d: 3d 54 5f 11 80 cmp $0x80115f54,%eax
80104492: 74 cc je 80104460 <thread_exit+0xe0>
if(p->state == SLEEPING && p->chan == chan)
80104494: 83 78 0c 02 cmpl $0x2,0xc(%eax)
80104498: 75 ee jne 80104488 <thread_exit+0x108>
8010449a: 3b 78 20 cmp 0x20(%eax),%edi
8010449d: 75 e9 jne 80104488 <thread_exit+0x108>
p->state = RUNNABLE;
8010449f: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
801044a6: eb e0 jmp 80104488 <thread_exit+0x108>
801044a8: b9 54 3d 11 80 mov $0x80113d54,%ecx
801044ad: eb 0f jmp 801044be <thread_exit+0x13e>
801044af: 90 nop
if (p->state == ZOMBIE)
wakeup1(initproc);
}
}
// wake up sleeping threads
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801044b0: 81 c1 88 00 00 00 add $0x88,%ecx
801044b6: 81 f9 54 5f 11 80 cmp $0x80115f54,%ecx
801044bc: 74 3a je 801044f8 <thread_exit+0x178>
{
if (p->pid == pid && p->tid != tid)
801044be: 3b 59 10 cmp 0x10(%ecx),%ebx
801044c1: 75 ed jne 801044b0 <thread_exit+0x130>
801044c3: 8b 45 e4 mov -0x1c(%ebp),%eax
801044c6: 3b 81 80 00 00 00 cmp 0x80(%ecx),%eax
801044cc: 74 e2 je 801044b0 <thread_exit+0x130>
801044ce: b8 54 3d 11 80 mov $0x80113d54,%eax
801044d3: eb 0f jmp 801044e4 <thread_exit+0x164>
801044d5: 8d 76 00 lea 0x0(%esi),%esi
static void
wakeup1(void *chan)
{
struct proc *p;
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801044d8: 05 88 00 00 00 add $0x88,%eax
801044dd: 3d 54 5f 11 80 cmp $0x80115f54,%eax
801044e2: 74 cc je 801044b0 <thread_exit+0x130>
if(p->state == SLEEPING && p->chan == chan)
801044e4: 83 78 0c 02 cmpl $0x2,0xc(%eax)
801044e8: 75 ee jne 801044d8 <thread_exit+0x158>
801044ea: 39 48 20 cmp %ecx,0x20(%eax)
801044ed: 75 e9 jne 801044d8 <thread_exit+0x158>
p->state = RUNNABLE;
801044ef: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax)
801044f6: eb e0 jmp 801044d8 <thread_exit+0x158>
if (p->pid == pid && p->tid != tid)
wakeup1(p);
}
//
curproc->state = ZOMBIE;
curproc->retval = retval;
801044f8: 8b 45 08 mov 0x8(%ebp),%eax
{
if (p->pid == pid && p->tid != tid)
wakeup1(p);
}
//
curproc->state = ZOMBIE;
801044fb: c7 46 0c 05 00 00 00 movl $0x5,0xc(%esi)
curproc->retval = retval;
80104502: 89 86 84 00 00 00 mov %eax,0x84(%esi)
sched();
80104508: e8 23 f7 ff ff call 80103c30 <sched>
panic("zombie exit");
8010450d: 83 ec 0c sub $0xc,%esp
80104510: 68 54 7c 10 80 push $0x80107c54
80104515: e8 56 be ff ff call 80100370 <panic>
tid = curproc->tid;
if (curproc == initproc)
panic("init exiting");
if (tid == 1) // terminate all thread
{
exit();
8010451a: e8 d1 f7 ff ff call 80103cf0 <exit>
struct proc *curproc = myproc();
struct proc *p;
pid = curproc->pid;
tid = curproc->tid;
if (curproc == initproc)
panic("init exiting");
8010451f: 83 ec 0c sub $0xc,%esp
80104522: 68 47 7c 10 80 push $0x80107c47
80104527: e8 44 be ff ff call 80100370 <panic>
8010452c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104530 <thread_join>:
}
int thread_join(int tid, void **retval)
{
80104530: 55 push %ebp
80104531: 89 e5 mov %esp,%ebp
80104533: 57 push %edi
80104534: 56 push %esi
80104535: 53 push %ebx
80104536: 83 ec 1c sub $0x1c,%esp
80104539: 8b 55 08 mov 0x8(%ebp),%edx
8010453c: 89 55 e4 mov %edx,-0x1c(%ebp)
// while reading proc from the cpu structure
struct proc*
myproc(void) {
struct cpu *c;
struct proc *p;
pushcli();
8010453f: e8 3c 03 00 00 call 80104880 <pushcli>
c = mycpu();
80104544: e8 b7 f1 ff ff call 80103700 <mycpu>
p = c->proc;
80104549: 8b b8 ac 00 00 00 mov 0xac(%eax),%edi
popcli();
8010454f: e8 1c 04 00 00 call 80104970 <popcli>
struct proc *p;
int find_threads;
struct proc *curproc = myproc();
int pid = curproc->pid;
find_threads = 0;
acquire(&ptable.lock);
80104554: 83 ec 0c sub $0xc,%esp
int thread_join(int tid, void **retval)
{
struct proc *p;
int find_threads;
struct proc *curproc = myproc();
int pid = curproc->pid;
80104557: 8b 77 10 mov 0x10(%edi),%esi
find_threads = 0;
acquire(&ptable.lock);
8010455a: 68 20 3d 11 80 push $0x80113d20
8010455f: e8 5c 03 00 00 call 801048c0 <acquire>
{
struct proc *p;
int find_threads;
struct proc *curproc = myproc();
int pid = curproc->pid;
find_threads = 0;
80104564: 8b 55 e4 mov -0x1c(%ebp),%edx
acquire(&ptable.lock);
80104567: 83 c4 10 add $0x10,%esp
{
struct proc *p;
int find_threads;
struct proc *curproc = myproc();
int pid = curproc->pid;
find_threads = 0;
8010456a: 31 c0 xor %eax,%eax
acquire(&ptable.lock);
for(;;)
{
// Scan through table looking for exited children.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
8010456c: bb 54 3d 11 80 mov $0x80113d54,%ebx
80104571: eb 13 jmp 80104586 <thread_join+0x56>
80104573: 90 nop
80104574: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104578: 81 c3 88 00 00 00 add $0x88,%ebx
8010457e: 81 fb 54 5f 11 80 cmp $0x80115f54,%ebx
80104584: 74 2a je 801045b0 <thread_join+0x80>
{
if(p->pid != pid)
80104586: 3b 73 10 cmp 0x10(%ebx),%esi
80104589: 75 ed jne 80104578 <thread_join+0x48>
continue;
if (p->tid == tid)
8010458b: 39 93 80 00 00 00 cmp %edx,0x80(%ebx)
80104591: 75 e5 jne 80104578 <thread_join+0x48>
{
find_threads = 1;
if(p->state == ZOMBIE)
80104593: 83 7b 0c 05 cmpl $0x5,0xc(%ebx)
80104597: 74 53 je 801045ec <thread_join+0xbc>
find_threads = 0;
acquire(&ptable.lock);
for(;;)
{
// Scan through table looking for exited children.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
80104599: 81 c3 88 00 00 00 add $0x88,%ebx
{
if(p->pid != pid)
continue;
if (p->tid == tid)
{
find_threads = 1;
8010459f: b8 01 00 00 00 mov $0x1,%eax
find_threads = 0;
acquire(&ptable.lock);
for(;;)
{
// Scan through table looking for exited children.
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++)
801045a4: 81 fb 54 5f 11 80 cmp $0x80115f54,%ebx
801045aa: 75 da jne 80104586 <thread_join+0x56>
801045ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return 0;
}
}
}
// if thread is already terminated
if(p->state == UNUSED)
801045b0: 8b 1d 60 5f 11 80 mov 0x80115f60,%ebx
801045b6: 85 db test %ebx,%ebx
801045b8: 0f 84 ae 00 00 00 je 8010466c <thread_join+0x13c>
{
release(&ptable.lock);
return 0;
}
// No point waiting if we don't have any children.
if(curproc->killed)
801045be: 8b 4f 24 mov 0x24(%edi),%ecx
801045c1: 85 c9 test %ecx,%ecx
801045c3: 0f 85 86 00 00 00 jne 8010464f <thread_join+0x11f>
release(&ptable.lock);
return -1;
}
// if there is no thread who has that tid
if (find_threads == 0)
801045c9: 85 c0 test %eax,%eax
801045cb: 89 55 e0 mov %edx,-0x20(%ebp)
801045ce: 89 45 e4 mov %eax,-0x1c(%ebp)
801045d1: 74 7c je 8010464f <thread_join+0x11f>
{
release(&ptable.lock);
return -1;
}
// Wait for children to exit.
sleep(curproc, &ptable.lock);
801045d3: 83 ec 08 sub $0x8,%esp
801045d6: 68 20 3d 11 80 push $0x80113d20
801045db: 57 push %edi
801045dc: e8 8f f8 ff ff call 80103e70 <sleep>
}
801045e1: 83 c4 10 add $0x10,%esp
801045e4: 8b 45 e4 mov -0x1c(%ebp),%eax
801045e7: 8b 55 e0 mov -0x20(%ebp),%edx
801045ea: eb 80 jmp 8010456c <thread_join+0x3c>
{
find_threads = 1;
if(p->state == ZOMBIE)
{
// Found one.
kfree(p->kstack);
801045ec: 83 ec 0c sub $0xc,%esp
801045ef: ff 73 08 pushl 0x8(%ebx)
801045f2: e8 e9 dc ff ff call 801022e0 <kfree>
p->name[0] = 0;
p->killed = 0;
p->pid = 0;
p->tid = 0;
p->state = UNUSED;
*retval = (void *)p->retval;
801045f7: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
801045fd: 8b 45 0c mov 0xc(%ebp),%eax
find_threads = 1;
if(p->state == ZOMBIE)
{
// Found one.
kfree(p->kstack);
p->parent = 0;
80104600: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
p->name[0] = 0;
80104607: c6 43 6c 00 movb $0x0,0x6c(%ebx)
p->killed = 0;
8010460b: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
p->pid = 0;
80104612: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
p->tid = 0;
80104619: c7 83 80 00 00 00 00 movl $0x0,0x80(%ebx)
80104620: 00 00 00
p->state = UNUSED;
80104623: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
*retval = (void *)p->retval;
8010462a: 89 10 mov %edx,(%eax)
p->retval = 0;
8010462c: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
80104633: 00 00 00
release(&ptable.lock);
80104636: c7 04 24 20 3d 11 80 movl $0x80113d20,(%esp)
8010463d: e8 9e 03 00 00 call 801049e0 <release>
return 0;
80104642: 83 c4 10 add $0x10,%esp
80104645: 31 c0 xor %eax,%eax
}
// Wait for children to exit.
sleep(curproc, &ptable.lock);
}
return 0;
}
80104647: 8d 65 f4 lea -0xc(%ebp),%esp
8010464a: 5b pop %ebx
8010464b: 5e pop %esi
8010464c: 5f pop %edi
8010464d: 5d pop %ebp
8010464e: c3 ret
return 0;
}
// No point waiting if we don't have any children.
if(curproc->killed)
{
release(&ptable.lock);
8010464f: 83 ec 0c sub $0xc,%esp
80104652: 68 20 3d 11 80 push $0x80113d20
80104657: e8 84 03 00 00 call 801049e0 <release>
return -1;
8010465c: 83 c4 10 add $0x10,%esp
}
// Wait for children to exit.
sleep(curproc, &ptable.lock);
}
return 0;
}
8010465f: 8d 65 f4 lea -0xc(%ebp),%esp
}
// No point waiting if we don't have any children.
if(curproc->killed)
{
release(&ptable.lock);
return -1;
80104662: b8 ff ff ff ff mov $0xffffffff,%eax
}
// Wait for children to exit.
sleep(curproc, &ptable.lock);
}
return 0;
}
80104667: 5b pop %ebx
80104668: 5e pop %esi
80104669: 5f pop %edi
8010466a: 5d pop %ebp
8010466b: c3 ret
}
}
// if thread is already terminated
if(p->state == UNUSED)
{
release(&ptable.lock);
8010466c: 83 ec 0c sub $0xc,%esp
8010466f: 68 20 3d 11 80 push $0x80113d20
80104674: e8 67 03 00 00 call 801049e0 <release>
return 0;
80104679: 83 c4 10 add $0x10,%esp
8010467c: 31 c0 xor %eax,%eax
8010467e: eb c7 jmp 80104647 <thread_join+0x117>
80104680 <gettid>:
}
return 0;
}
int gettid(void)
{
80104680: 55 push %ebp
80104681: 89 e5 mov %esp,%ebp
80104683: 53 push %ebx
80104684: 83 ec 04 sub $0x4,%esp
// while reading proc from the cpu structure
struct proc*
myproc(void) {
struct cpu *c;
struct proc *p;
pushcli();
80104687: e8 f4 01 00 00 call 80104880 <pushcli>
c = mycpu();
8010468c: e8 6f f0 ff ff call 80103700 <mycpu>
p = c->proc;
80104691: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx
popcli();
80104697: e8 d4 02 00 00 call 80104970 <popcli>
}
int gettid(void)
{
struct proc *curproc = myproc(); // current process
return curproc->tid;
8010469c: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
}
801046a2: 83 c4 04 add $0x4,%esp
801046a5: 5b pop %ebx
801046a6: 5d pop %ebp
801046a7: c3 ret
801046a8: 66 90 xchg %ax,%ax
801046aa: 66 90 xchg %ax,%ax
801046ac: 66 90 xchg %ax,%ax
801046ae: 66 90 xchg %ax,%ax
801046b0 <initsleeplock>:
#include "spinlock.h"
#include "sleeplock.h"
void
initsleeplock(struct sleeplock *lk, char *name)
{
801046b0: 55 push %ebp
801046b1: 89 e5 mov %esp,%ebp
801046b3: 53 push %ebx
801046b4: 83 ec 0c sub $0xc,%esp
801046b7: 8b 5d 08 mov 0x8(%ebp),%ebx
initlock(&lk->lk, "sleep lock");
801046ba: 68 10 7d 10 80 push $0x80107d10
801046bf: 8d 43 04 lea 0x4(%ebx),%eax
801046c2: 50 push %eax
801046c3: e8 f8 00 00 00 call 801047c0 <initlock>
lk->name = name;
801046c8: 8b 45 0c mov 0xc(%ebp),%eax
lk->locked = 0;
801046cb: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
}
801046d1: 83 c4 10 add $0x10,%esp
initsleeplock(struct sleeplock *lk, char *name)
{
initlock(&lk->lk, "sleep lock");
lk->name = name;
lk->locked = 0;
lk->pid = 0;
801046d4: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
void
initsleeplock(struct sleeplock *lk, char *name)
{
initlock(&lk->lk, "sleep lock");
lk->name = name;
801046db: 89 43 38 mov %eax,0x38(%ebx)
lk->locked = 0;
lk->pid = 0;
}
801046de: 8b 5d fc mov -0x4(%ebp),%ebx
801046e1: c9 leave
801046e2: c3 ret
801046e3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801046e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801046f0 <acquiresleep>:
void
acquiresleep(struct sleeplock *lk)
{
801046f0: 55 push %ebp
801046f1: 89 e5 mov %esp,%ebp
801046f3: 56 push %esi
801046f4: 53 push %ebx
801046f5: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
801046f8: 83 ec 0c sub $0xc,%esp
801046fb: 8d 73 04 lea 0x4(%ebx),%esi
801046fe: 56 push %esi
801046ff: e8 bc 01 00 00 call 801048c0 <acquire>
while (lk->locked) {
80104704: 8b 13 mov (%ebx),%edx
80104706: 83 c4 10 add $0x10,%esp
80104709: 85 d2 test %edx,%edx
8010470b: 74 16 je 80104723 <acquiresleep+0x33>
8010470d: 8d 76 00 lea 0x0(%esi),%esi
sleep(lk, &lk->lk);
80104710: 83 ec 08 sub $0x8,%esp
80104713: 56 push %esi
80104714: 53 push %ebx
80104715: e8 56 f7 ff ff call 80103e70 <sleep>
void
acquiresleep(struct sleeplock *lk)
{
acquire(&lk->lk);
while (lk->locked) {
8010471a: 8b 03 mov (%ebx),%eax
8010471c: 83 c4 10 add $0x10,%esp
8010471f: 85 c0 test %eax,%eax
80104721: 75 ed jne 80104710 <acquiresleep+0x20>
sleep(lk, &lk->lk);
}
lk->locked = 1;
80104723: c7 03 01 00 00 00 movl $0x1,(%ebx)
lk->pid = myproc()->pid;
80104729: e8 72 f0 ff ff call 801037a0 <myproc>
8010472e: 8b 40 10 mov 0x10(%eax),%eax
80104731: 89 43 3c mov %eax,0x3c(%ebx)
release(&lk->lk);
80104734: 89 75 08 mov %esi,0x8(%ebp)
}
80104737: 8d 65 f8 lea -0x8(%ebp),%esp
8010473a: 5b pop %ebx
8010473b: 5e pop %esi
8010473c: 5d pop %ebp
while (lk->locked) {
sleep(lk, &lk->lk);
}
lk->locked = 1;
lk->pid = myproc()->pid;
release(&lk->lk);
8010473d: e9 9e 02 00 00 jmp 801049e0 <release>
80104742: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104749: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104750 <releasesleep>:
}
void
releasesleep(struct sleeplock *lk)
{
80104750: 55 push %ebp
80104751: 89 e5 mov %esp,%ebp
80104753: 56 push %esi
80104754: 53 push %ebx
80104755: 8b 5d 08 mov 0x8(%ebp),%ebx
acquire(&lk->lk);
80104758: 83 ec 0c sub $0xc,%esp
8010475b: 8d 73 04 lea 0x4(%ebx),%esi
8010475e: 56 push %esi
8010475f: e8 5c 01 00 00 call 801048c0 <acquire>
lk->locked = 0;
80104764: c7 03 00 00 00 00 movl $0x0,(%ebx)
lk->pid = 0;
8010476a: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx)
wakeup(lk);
80104771: 89 1c 24 mov %ebx,(%esp)
80104774: e8 b7 f8 ff ff call 80104030 <wakeup>
release(&lk->lk);
80104779: 89 75 08 mov %esi,0x8(%ebp)
8010477c: 83 c4 10 add $0x10,%esp
}
8010477f: 8d 65 f8 lea -0x8(%ebp),%esp
80104782: 5b pop %ebx
80104783: 5e pop %esi
80104784: 5d pop %ebp
{
acquire(&lk->lk);
lk->locked = 0;
lk->pid = 0;
wakeup(lk);
release(&lk->lk);
80104785: e9 56 02 00 00 jmp 801049e0 <release>
8010478a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104790 <holdingsleep>:
}
int
holdingsleep(struct sleeplock *lk)
{
80104790: 55 push %ebp
80104791: 89 e5 mov %esp,%ebp
80104793: 56 push %esi
80104794: 53 push %ebx
80104795: 8b 75 08 mov 0x8(%ebp),%esi
int r;
acquire(&lk->lk);
80104798: 83 ec 0c sub $0xc,%esp
8010479b: 8d 5e 04 lea 0x4(%esi),%ebx
8010479e: 53 push %ebx
8010479f: e8 1c 01 00 00 call 801048c0 <acquire>
r = lk->locked;
801047a4: 8b 36 mov (%esi),%esi
release(&lk->lk);
801047a6: 89 1c 24 mov %ebx,(%esp)
801047a9: e8 32 02 00 00 call 801049e0 <release>
return r;
}
801047ae: 8d 65 f8 lea -0x8(%ebp),%esp
801047b1: 89 f0 mov %esi,%eax
801047b3: 5b pop %ebx
801047b4: 5e pop %esi
801047b5: 5d pop %ebp
801047b6: c3 ret
801047b7: 66 90 xchg %ax,%ax
801047b9: 66 90 xchg %ax,%ax
801047bb: 66 90 xchg %ax,%ax
801047bd: 66 90 xchg %ax,%ax
801047bf: 90 nop
801047c0 <initlock>:
#include "proc.h"
#include "spinlock.h"
void
initlock(struct spinlock *lk, char *name)
{
801047c0: 55 push %ebp
801047c1: 89 e5 mov %esp,%ebp
801047c3: 8b 45 08 mov 0x8(%ebp),%eax
lk->name = name;
801047c6: 8b 55 0c mov 0xc(%ebp),%edx
lk->locked = 0;
801047c9: c7 00 00 00 00 00 movl $0x0,(%eax)
#include "spinlock.h"
void
initlock(struct spinlock *lk, char *name)
{
lk->name = name;
801047cf: 89 50 04 mov %edx,0x4(%eax)
lk->locked = 0;
lk->cpu = 0;
801047d2: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
801047d9: 5d pop %ebp
801047da: c3 ret
801047db: 90 nop
801047dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801047e0 <getcallerpcs>:
}
// Record the current call stack in pcs[] by following the %ebp chain.
void
getcallerpcs(void *v, uint pcs[])
{
801047e0: 55 push %ebp
801047e1: 89 e5 mov %esp,%ebp
801047e3: 53 push %ebx
uint *ebp;
int i;
ebp = (uint*)v - 2;
801047e4: 8b 45 08 mov 0x8(%ebp),%eax
}
// Record the current call stack in pcs[] by following the %ebp chain.
void
getcallerpcs(void *v, uint pcs[])
{
801047e7: 8b 4d 0c mov 0xc(%ebp),%ecx
uint *ebp;
int i;
ebp = (uint*)v - 2;
801047ea: 8d 50 f8 lea -0x8(%eax),%edx
for(i = 0; i < 10; i++){
801047ed: 31 c0 xor %eax,%eax
801047ef: 90 nop
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
801047f0: 8d 9a 00 00 00 80 lea -0x80000000(%edx),%ebx
801047f6: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx
801047fc: 77 1a ja 80104818 <getcallerpcs+0x38>
break;
pcs[i] = ebp[1]; // saved %eip
801047fe: 8b 5a 04 mov 0x4(%edx),%ebx
80104801: 89 1c 81 mov %ebx,(%ecx,%eax,4)
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80104804: 83 c0 01 add $0x1,%eax
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
80104807: 8b 12 mov (%edx),%edx
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80104809: 83 f8 0a cmp $0xa,%eax
8010480c: 75 e2 jne 801047f0 <getcallerpcs+0x10>
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
pcs[i] = 0;
}
8010480e: 5b pop %ebx
8010480f: 5d pop %ebp
80104810: c3 ret
80104811: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
pcs[i] = 0;
80104818: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
8010481f: 83 c0 01 add $0x1,%eax
80104822: 83 f8 0a cmp $0xa,%eax
80104825: 74 e7 je 8010480e <getcallerpcs+0x2e>
pcs[i] = 0;
80104827: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
8010482e: 83 c0 01 add $0x1,%eax
80104831: 83 f8 0a cmp $0xa,%eax
80104834: 75 e2 jne 80104818 <getcallerpcs+0x38>
80104836: eb d6 jmp 8010480e <getcallerpcs+0x2e>
80104838: 90 nop
80104839: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104840 <holding>:
}
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
80104840: 55 push %ebp
80104841: 89 e5 mov %esp,%ebp
80104843: 53 push %ebx
80104844: 83 ec 04 sub $0x4,%esp
80104847: 8b 55 08 mov 0x8(%ebp),%edx
return lock->locked && lock->cpu == mycpu();
8010484a: 8b 02 mov (%edx),%eax
8010484c: 85 c0 test %eax,%eax
8010484e: 75 10 jne 80104860 <holding+0x20>
}
80104850: 83 c4 04 add $0x4,%esp
80104853: 31 c0 xor %eax,%eax
80104855: 5b pop %ebx
80104856: 5d pop %ebp
80104857: c3 ret
80104858: 90 nop
80104859: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
return lock->locked && lock->cpu == mycpu();
80104860: 8b 5a 08 mov 0x8(%edx),%ebx
80104863: e8 98 ee ff ff call 80103700 <mycpu>
80104868: 39 c3 cmp %eax,%ebx
8010486a: 0f 94 c0 sete %al
}
8010486d: 83 c4 04 add $0x4,%esp
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
return lock->locked && lock->cpu == mycpu();
80104870: 0f b6 c0 movzbl %al,%eax
}
80104873: 5b pop %ebx
80104874: 5d pop %ebp
80104875: c3 ret
80104876: 8d 76 00 lea 0x0(%esi),%esi
80104879: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104880 <pushcli>:
// it takes two popcli to undo two pushcli. Also, if interrupts
// are off, then pushcli, popcli leaves them off.
void
pushcli(void)
{
80104880: 55 push %ebp
80104881: 89 e5 mov %esp,%ebp
80104883: 53 push %ebx
80104884: 83 ec 04 sub $0x4,%esp
80104887: 9c pushf
80104888: 5b pop %ebx
}
static inline void
cli(void)
{
asm volatile("cli");
80104889: fa cli
int eflags;
eflags = readeflags();
cli();
if(mycpu()->ncli == 0)
8010488a: e8 71 ee ff ff call 80103700 <mycpu>
8010488f: 8b 80 a4 00 00 00 mov 0xa4(%eax),%eax
80104895: 85 c0 test %eax,%eax
80104897: 75 11 jne 801048aa <pushcli+0x2a>
mycpu()->intena = eflags & FL_IF;
80104899: 81 e3 00 02 00 00 and $0x200,%ebx
8010489f: e8 5c ee ff ff call 80103700 <mycpu>
801048a4: 89 98 a8 00 00 00 mov %ebx,0xa8(%eax)
mycpu()->ncli += 1;
801048aa: e8 51 ee ff ff call 80103700 <mycpu>
801048af: 83 80 a4 00 00 00 01 addl $0x1,0xa4(%eax)
}
801048b6: 83 c4 04 add $0x4,%esp
801048b9: 5b pop %ebx
801048ba: 5d pop %ebp
801048bb: c3 ret
801048bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801048c0 <acquire>:
// Loops (spins) until the lock is acquired.
// Holding a lock for a long time may cause
// other CPUs to waste time spinning to acquire it.
void
acquire(struct spinlock *lk)
{
801048c0: 55 push %ebp
801048c1: 89 e5 mov %esp,%ebp
801048c3: 56 push %esi
801048c4: 53 push %ebx
pushcli(); // disable interrupts to avoid deadlock.
801048c5: e8 b6 ff ff ff call 80104880 <pushcli>
if(holding(lk))
801048ca: 8b 5d 08 mov 0x8(%ebp),%ebx
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
return lock->locked && lock->cpu == mycpu();
801048cd: 8b 03 mov (%ebx),%eax
801048cf: 85 c0 test %eax,%eax
801048d1: 75 7d jne 80104950 <acquire+0x90>
xchg(volatile uint *addr, uint newval)
{
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
801048d3: ba 01 00 00 00 mov $0x1,%edx
801048d8: eb 09 jmp 801048e3 <acquire+0x23>
801048da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801048e0: 8b 5d 08 mov 0x8(%ebp),%ebx
801048e3: 89 d0 mov %edx,%eax
801048e5: f0 87 03 lock xchg %eax,(%ebx)
pushcli(); // disable interrupts to avoid deadlock.
if(holding(lk))
panic("acquire");
// The xchg is atomic.
while(xchg(&lk->locked, 1) != 0)
801048e8: 85 c0 test %eax,%eax
801048ea: 75 f4 jne 801048e0 <acquire+0x20>
;
// Tell the C compiler and the processor to not move loads or stores
// past this point, to ensure that the critical section's memory
// references happen after the lock is acquired.
__sync_synchronize();
801048ec: f0 83 0c 24 00 lock orl $0x0,(%esp)
// Record info about lock acquisition for debugging.
lk->cpu = mycpu();
801048f1: 8b 5d 08 mov 0x8(%ebp),%ebx
801048f4: e8 07 ee ff ff call 80103700 <mycpu>
getcallerpcs(void *v, uint pcs[])
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
801048f9: 89 ea mov %ebp,%edx
// references happen after the lock is acquired.
__sync_synchronize();
// Record info about lock acquisition for debugging.
lk->cpu = mycpu();
getcallerpcs(&lk, lk->pcs);
801048fb: 8d 4b 0c lea 0xc(%ebx),%ecx
// past this point, to ensure that the critical section's memory
// references happen after the lock is acquired.
__sync_synchronize();
// Record info about lock acquisition for debugging.
lk->cpu = mycpu();
801048fe: 89 43 08 mov %eax,0x8(%ebx)
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80104901: 31 c0 xor %eax,%eax
80104903: 90 nop
80104904: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
80104908: 8d 9a 00 00 00 80 lea -0x80000000(%edx),%ebx
8010490e: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx
80104914: 77 1a ja 80104930 <acquire+0x70>
break;
pcs[i] = ebp[1]; // saved %eip
80104916: 8b 5a 04 mov 0x4(%edx),%ebx
80104919: 89 1c 81 mov %ebx,(%ecx,%eax,4)
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
8010491c: 83 c0 01 add $0x1,%eax
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
8010491f: 8b 12 mov (%edx),%edx
{
uint *ebp;
int i;
ebp = (uint*)v - 2;
for(i = 0; i < 10; i++){
80104921: 83 f8 0a cmp $0xa,%eax
80104924: 75 e2 jne 80104908 <acquire+0x48>
__sync_synchronize();
// Record info about lock acquisition for debugging.
lk->cpu = mycpu();
getcallerpcs(&lk, lk->pcs);
}
80104926: 8d 65 f8 lea -0x8(%ebp),%esp
80104929: 5b pop %ebx
8010492a: 5e pop %esi
8010492b: 5d pop %ebp
8010492c: c3 ret
8010492d: 8d 76 00 lea 0x0(%esi),%esi
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
pcs[i] = 0;
80104930: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
80104937: 83 c0 01 add $0x1,%eax
8010493a: 83 f8 0a cmp $0xa,%eax
8010493d: 74 e7 je 80104926 <acquire+0x66>
pcs[i] = 0;
8010493f: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff)
break;
pcs[i] = ebp[1]; // saved %eip
ebp = (uint*)ebp[0]; // saved %ebp
}
for(; i < 10; i++)
80104946: 83 c0 01 add $0x1,%eax
80104949: 83 f8 0a cmp $0xa,%eax
8010494c: 75 e2 jne 80104930 <acquire+0x70>
8010494e: eb d6 jmp 80104926 <acquire+0x66>
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
return lock->locked && lock->cpu == mycpu();
80104950: 8b 73 08 mov 0x8(%ebx),%esi
80104953: e8 a8 ed ff ff call 80103700 <mycpu>
80104958: 39 c6 cmp %eax,%esi
8010495a: 0f 85 73 ff ff ff jne 801048d3 <acquire+0x13>
void
acquire(struct spinlock *lk)
{
pushcli(); // disable interrupts to avoid deadlock.
if(holding(lk))
panic("acquire");
80104960: 83 ec 0c sub $0xc,%esp
80104963: 68 1b 7d 10 80 push $0x80107d1b
80104968: e8 03 ba ff ff call 80100370 <panic>
8010496d: 8d 76 00 lea 0x0(%esi),%esi
80104970 <popcli>:
mycpu()->ncli += 1;
}
void
popcli(void)
{
80104970: 55 push %ebp
80104971: 89 e5 mov %esp,%ebp
80104973: 83 ec 08 sub $0x8,%esp
static inline uint
readeflags(void)
{
uint eflags;
asm volatile("pushfl; popl %0" : "=r" (eflags));
80104976: 9c pushf
80104977: 58 pop %eax
if(readeflags()&FL_IF)
80104978: f6 c4 02 test $0x2,%ah
8010497b: 75 52 jne 801049cf <popcli+0x5f>
panic("popcli - interruptible");
if(--mycpu()->ncli < 0)
8010497d: e8 7e ed ff ff call 80103700 <mycpu>
80104982: 8b 88 a4 00 00 00 mov 0xa4(%eax),%ecx
80104988: 8d 51 ff lea -0x1(%ecx),%edx
8010498b: 85 d2 test %edx,%edx
8010498d: 89 90 a4 00 00 00 mov %edx,0xa4(%eax)
80104993: 78 2d js 801049c2 <popcli+0x52>
panic("popcli");
if(mycpu()->ncli == 0 && mycpu()->intena)
80104995: e8 66 ed ff ff call 80103700 <mycpu>
8010499a: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx
801049a0: 85 d2 test %edx,%edx
801049a2: 74 0c je 801049b0 <popcli+0x40>
sti();
}
801049a4: c9 leave
801049a5: c3 ret
801049a6: 8d 76 00 lea 0x0(%esi),%esi
801049a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
{
if(readeflags()&FL_IF)
panic("popcli - interruptible");
if(--mycpu()->ncli < 0)
panic("popcli");
if(mycpu()->ncli == 0 && mycpu()->intena)
801049b0: e8 4b ed ff ff call 80103700 <mycpu>
801049b5: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax
801049bb: 85 c0 test %eax,%eax
801049bd: 74 e5 je 801049a4 <popcli+0x34>
}
static inline void
sti(void)
{
asm volatile("sti");
801049bf: fb sti
sti();
}
801049c0: c9 leave
801049c1: c3 ret
popcli(void)
{
if(readeflags()&FL_IF)
panic("popcli - interruptible");
if(--mycpu()->ncli < 0)
panic("popcli");
801049c2: 83 ec 0c sub $0xc,%esp
801049c5: 68 3a 7d 10 80 push $0x80107d3a
801049ca: e8 a1 b9 ff ff call 80100370 <panic>
void
popcli(void)
{
if(readeflags()&FL_IF)
panic("popcli - interruptible");
801049cf: 83 ec 0c sub $0xc,%esp
801049d2: 68 23 7d 10 80 push $0x80107d23
801049d7: e8 94 b9 ff ff call 80100370 <panic>
801049dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801049e0 <release>:
}
// Release the lock.
void
release(struct spinlock *lk)
{
801049e0: 55 push %ebp
801049e1: 89 e5 mov %esp,%ebp
801049e3: 56 push %esi
801049e4: 53 push %ebx
801049e5: 8b 5d 08 mov 0x8(%ebp),%ebx
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
return lock->locked && lock->cpu == mycpu();
801049e8: 8b 03 mov (%ebx),%eax
801049ea: 85 c0 test %eax,%eax
801049ec: 75 12 jne 80104a00 <release+0x20>
// Release the lock.
void
release(struct spinlock *lk)
{
if(!holding(lk))
panic("release");
801049ee: 83 ec 0c sub $0xc,%esp
801049f1: 68 41 7d 10 80 push $0x80107d41
801049f6: e8 75 b9 ff ff call 80100370 <panic>
801049fb: 90 nop
801049fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
return lock->locked && lock->cpu == mycpu();
80104a00: 8b 73 08 mov 0x8(%ebx),%esi
80104a03: e8 f8 ec ff ff call 80103700 <mycpu>
80104a08: 39 c6 cmp %eax,%esi
80104a0a: 75 e2 jne 801049ee <release+0xe>
release(struct spinlock *lk)
{
if(!holding(lk))
panic("release");
lk->pcs[0] = 0;
80104a0c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
lk->cpu = 0;
80104a13: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
// Tell the C compiler and the processor to not move loads or stores
// past this point, to ensure that all the stores in the critical
// section are visible to other cores before the lock is released.
// Both the C compiler and the hardware may re-order loads and
// stores; __sync_synchronize() tells them both not to.
__sync_synchronize();
80104a1a: f0 83 0c 24 00 lock orl $0x0,(%esp)
// Release the lock, equivalent to lk->locked = 0.
// This code can't use a C assignment, since it might
// not be atomic. A real OS would use C atomics here.
asm volatile("movl $0, %0" : "+m" (lk->locked) : );
80104a1f: c7 03 00 00 00 00 movl $0x0,(%ebx)
popcli();
}
80104a25: 8d 65 f8 lea -0x8(%ebp),%esp
80104a28: 5b pop %ebx
80104a29: 5e pop %esi
80104a2a: 5d pop %ebp
// Release the lock, equivalent to lk->locked = 0.
// This code can't use a C assignment, since it might
// not be atomic. A real OS would use C atomics here.
asm volatile("movl $0, %0" : "+m" (lk->locked) : );
popcli();
80104a2b: e9 40 ff ff ff jmp 80104970 <popcli>
80104a30 <memset>:
80104a30: 55 push %ebp
80104a31: 89 e5 mov %esp,%ebp
80104a33: 57 push %edi
80104a34: 53 push %ebx
80104a35: 8b 55 08 mov 0x8(%ebp),%edx
80104a38: 8b 4d 10 mov 0x10(%ebp),%ecx
80104a3b: f6 c2 03 test $0x3,%dl
80104a3e: 75 05 jne 80104a45 <memset+0x15>
80104a40: f6 c1 03 test $0x3,%cl
80104a43: 74 13 je 80104a58 <memset+0x28>
80104a45: 89 d7 mov %edx,%edi
80104a47: 8b 45 0c mov 0xc(%ebp),%eax
80104a4a: fc cld
80104a4b: f3 aa rep stos %al,%es:(%edi)
80104a4d: 5b pop %ebx
80104a4e: 89 d0 mov %edx,%eax
80104a50: 5f pop %edi
80104a51: 5d pop %ebp
80104a52: c3 ret
80104a53: 90 nop
80104a54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104a58: 0f b6 7d 0c movzbl 0xc(%ebp),%edi
80104a5c: c1 e9 02 shr $0x2,%ecx
80104a5f: 89 fb mov %edi,%ebx
80104a61: 89 f8 mov %edi,%eax
80104a63: c1 e3 18 shl $0x18,%ebx
80104a66: c1 e0 10 shl $0x10,%eax
80104a69: 09 d8 or %ebx,%eax
80104a6b: 09 f8 or %edi,%eax
80104a6d: c1 e7 08 shl $0x8,%edi
80104a70: 09 f8 or %edi,%eax
80104a72: 89 d7 mov %edx,%edi
80104a74: fc cld
80104a75: f3 ab rep stos %eax,%es:(%edi)
80104a77: 5b pop %ebx
80104a78: 89 d0 mov %edx,%eax
80104a7a: 5f pop %edi
80104a7b: 5d pop %ebp
80104a7c: c3 ret
80104a7d: 8d 76 00 lea 0x0(%esi),%esi
80104a80 <memcmp>:
80104a80: 55 push %ebp
80104a81: 89 e5 mov %esp,%ebp
80104a83: 57 push %edi
80104a84: 56 push %esi
80104a85: 8b 45 10 mov 0x10(%ebp),%eax
80104a88: 53 push %ebx
80104a89: 8b 75 0c mov 0xc(%ebp),%esi
80104a8c: 8b 5d 08 mov 0x8(%ebp),%ebx
80104a8f: 85 c0 test %eax,%eax
80104a91: 74 29 je 80104abc <memcmp+0x3c>
80104a93: 0f b6 13 movzbl (%ebx),%edx
80104a96: 0f b6 0e movzbl (%esi),%ecx
80104a99: 38 d1 cmp %dl,%cl
80104a9b: 75 2b jne 80104ac8 <memcmp+0x48>
80104a9d: 8d 78 ff lea -0x1(%eax),%edi
80104aa0: 31 c0 xor %eax,%eax
80104aa2: eb 14 jmp 80104ab8 <memcmp+0x38>
80104aa4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104aa8: 0f b6 54 03 01 movzbl 0x1(%ebx,%eax,1),%edx
80104aad: 83 c0 01 add $0x1,%eax
80104ab0: 0f b6 0c 06 movzbl (%esi,%eax,1),%ecx
80104ab4: 38 ca cmp %cl,%dl
80104ab6: 75 10 jne 80104ac8 <memcmp+0x48>
80104ab8: 39 f8 cmp %edi,%eax
80104aba: 75 ec jne 80104aa8 <memcmp+0x28>
80104abc: 5b pop %ebx
80104abd: 31 c0 xor %eax,%eax
80104abf: 5e pop %esi
80104ac0: 5f pop %edi
80104ac1: 5d pop %ebp
80104ac2: c3 ret
80104ac3: 90 nop
80104ac4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104ac8: 0f b6 c2 movzbl %dl,%eax
80104acb: 5b pop %ebx
80104acc: 29 c8 sub %ecx,%eax
80104ace: 5e pop %esi
80104acf: 5f pop %edi
80104ad0: 5d pop %ebp
80104ad1: c3 ret
80104ad2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104ad9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104ae0 <memmove>:
80104ae0: 55 push %ebp
80104ae1: 89 e5 mov %esp,%ebp
80104ae3: 56 push %esi
80104ae4: 53 push %ebx
80104ae5: 8b 45 08 mov 0x8(%ebp),%eax
80104ae8: 8b 75 0c mov 0xc(%ebp),%esi
80104aeb: 8b 5d 10 mov 0x10(%ebp),%ebx
80104aee: 39 c6 cmp %eax,%esi
80104af0: 73 2e jae 80104b20 <memmove+0x40>
80104af2: 8d 0c 1e lea (%esi,%ebx,1),%ecx
80104af5: 39 c8 cmp %ecx,%eax
80104af7: 73 27 jae 80104b20 <memmove+0x40>
80104af9: 85 db test %ebx,%ebx
80104afb: 8d 53 ff lea -0x1(%ebx),%edx
80104afe: 74 17 je 80104b17 <memmove+0x37>
80104b00: 29 d9 sub %ebx,%ecx
80104b02: 89 cb mov %ecx,%ebx
80104b04: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104b08: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
80104b0c: 88 0c 10 mov %cl,(%eax,%edx,1)
80104b0f: 83 ea 01 sub $0x1,%edx
80104b12: 83 fa ff cmp $0xffffffff,%edx
80104b15: 75 f1 jne 80104b08 <memmove+0x28>
80104b17: 5b pop %ebx
80104b18: 5e pop %esi
80104b19: 5d pop %ebp
80104b1a: c3 ret
80104b1b: 90 nop
80104b1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104b20: 31 d2 xor %edx,%edx
80104b22: 85 db test %ebx,%ebx
80104b24: 74 f1 je 80104b17 <memmove+0x37>
80104b26: 8d 76 00 lea 0x0(%esi),%esi
80104b29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104b30: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
80104b34: 88 0c 10 mov %cl,(%eax,%edx,1)
80104b37: 83 c2 01 add $0x1,%edx
80104b3a: 39 d3 cmp %edx,%ebx
80104b3c: 75 f2 jne 80104b30 <memmove+0x50>
80104b3e: 5b pop %ebx
80104b3f: 5e pop %esi
80104b40: 5d pop %ebp
80104b41: c3 ret
80104b42: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104b49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104b50 <memcpy>:
80104b50: 55 push %ebp
80104b51: 89 e5 mov %esp,%ebp
80104b53: 5d pop %ebp
80104b54: eb 8a jmp 80104ae0 <memmove>
80104b56: 8d 76 00 lea 0x0(%esi),%esi
80104b59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104b60 <strncmp>:
80104b60: 55 push %ebp
80104b61: 89 e5 mov %esp,%ebp
80104b63: 57 push %edi
80104b64: 56 push %esi
80104b65: 8b 4d 10 mov 0x10(%ebp),%ecx
80104b68: 53 push %ebx
80104b69: 8b 7d 08 mov 0x8(%ebp),%edi
80104b6c: 8b 75 0c mov 0xc(%ebp),%esi
80104b6f: 85 c9 test %ecx,%ecx
80104b71: 74 37 je 80104baa <strncmp+0x4a>
80104b73: 0f b6 17 movzbl (%edi),%edx
80104b76: 0f b6 1e movzbl (%esi),%ebx
80104b79: 84 d2 test %dl,%dl
80104b7b: 74 3f je 80104bbc <strncmp+0x5c>
80104b7d: 38 d3 cmp %dl,%bl
80104b7f: 75 3b jne 80104bbc <strncmp+0x5c>
80104b81: 8d 47 01 lea 0x1(%edi),%eax
80104b84: 01 cf add %ecx,%edi
80104b86: eb 1b jmp 80104ba3 <strncmp+0x43>
80104b88: 90 nop
80104b89: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104b90: 0f b6 10 movzbl (%eax),%edx
80104b93: 84 d2 test %dl,%dl
80104b95: 74 21 je 80104bb8 <strncmp+0x58>
80104b97: 0f b6 19 movzbl (%ecx),%ebx
80104b9a: 83 c0 01 add $0x1,%eax
80104b9d: 89 ce mov %ecx,%esi
80104b9f: 38 da cmp %bl,%dl
80104ba1: 75 19 jne 80104bbc <strncmp+0x5c>
80104ba3: 39 c7 cmp %eax,%edi
80104ba5: 8d 4e 01 lea 0x1(%esi),%ecx
80104ba8: 75 e6 jne 80104b90 <strncmp+0x30>
80104baa: 5b pop %ebx
80104bab: 31 c0 xor %eax,%eax
80104bad: 5e pop %esi
80104bae: 5f pop %edi
80104baf: 5d pop %ebp
80104bb0: c3 ret
80104bb1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104bb8: 0f b6 5e 01 movzbl 0x1(%esi),%ebx
80104bbc: 0f b6 c2 movzbl %dl,%eax
80104bbf: 29 d8 sub %ebx,%eax
80104bc1: 5b pop %ebx
80104bc2: 5e pop %esi
80104bc3: 5f pop %edi
80104bc4: 5d pop %ebp
80104bc5: c3 ret
80104bc6: 8d 76 00 lea 0x0(%esi),%esi
80104bc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104bd0 <strncpy>:
80104bd0: 55 push %ebp
80104bd1: 89 e5 mov %esp,%ebp
80104bd3: 56 push %esi
80104bd4: 53 push %ebx
80104bd5: 8b 45 08 mov 0x8(%ebp),%eax
80104bd8: 8b 5d 0c mov 0xc(%ebp),%ebx
80104bdb: 8b 4d 10 mov 0x10(%ebp),%ecx
80104bde: 89 c2 mov %eax,%edx
80104be0: eb 19 jmp 80104bfb <strncpy+0x2b>
80104be2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104be8: 83 c3 01 add $0x1,%ebx
80104beb: 0f b6 4b ff movzbl -0x1(%ebx),%ecx
80104bef: 83 c2 01 add $0x1,%edx
80104bf2: 84 c9 test %cl,%cl
80104bf4: 88 4a ff mov %cl,-0x1(%edx)
80104bf7: 74 09 je 80104c02 <strncpy+0x32>
80104bf9: 89 f1 mov %esi,%ecx
80104bfb: 85 c9 test %ecx,%ecx
80104bfd: 8d 71 ff lea -0x1(%ecx),%esi
80104c00: 7f e6 jg 80104be8 <strncpy+0x18>
80104c02: 31 c9 xor %ecx,%ecx
80104c04: 85 f6 test %esi,%esi
80104c06: 7e 17 jle 80104c1f <strncpy+0x4f>
80104c08: 90 nop
80104c09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80104c10: c6 04 0a 00 movb $0x0,(%edx,%ecx,1)
80104c14: 89 f3 mov %esi,%ebx
80104c16: 83 c1 01 add $0x1,%ecx
80104c19: 29 cb sub %ecx,%ebx
80104c1b: 85 db test %ebx,%ebx
80104c1d: 7f f1 jg 80104c10 <strncpy+0x40>
80104c1f: 5b pop %ebx
80104c20: 5e pop %esi
80104c21: 5d pop %ebp
80104c22: c3 ret
80104c23: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104c29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104c30 <safestrcpy>:
80104c30: 55 push %ebp
80104c31: 89 e5 mov %esp,%ebp
80104c33: 56 push %esi
80104c34: 53 push %ebx
80104c35: 8b 4d 10 mov 0x10(%ebp),%ecx
80104c38: 8b 45 08 mov 0x8(%ebp),%eax
80104c3b: 8b 55 0c mov 0xc(%ebp),%edx
80104c3e: 85 c9 test %ecx,%ecx
80104c40: 7e 26 jle 80104c68 <safestrcpy+0x38>
80104c42: 8d 74 0a ff lea -0x1(%edx,%ecx,1),%esi
80104c46: 89 c1 mov %eax,%ecx
80104c48: eb 17 jmp 80104c61 <safestrcpy+0x31>
80104c4a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104c50: 83 c2 01 add $0x1,%edx
80104c53: 0f b6 5a ff movzbl -0x1(%edx),%ebx
80104c57: 83 c1 01 add $0x1,%ecx
80104c5a: 84 db test %bl,%bl
80104c5c: 88 59 ff mov %bl,-0x1(%ecx)
80104c5f: 74 04 je 80104c65 <safestrcpy+0x35>
80104c61: 39 f2 cmp %esi,%edx
80104c63: 75 eb jne 80104c50 <safestrcpy+0x20>
80104c65: c6 01 00 movb $0x0,(%ecx)
80104c68: 5b pop %ebx
80104c69: 5e pop %esi
80104c6a: 5d pop %ebp
80104c6b: c3 ret
80104c6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80104c70 <strlen>:
80104c70: 55 push %ebp
80104c71: 31 c0 xor %eax,%eax
80104c73: 89 e5 mov %esp,%ebp
80104c75: 8b 55 08 mov 0x8(%ebp),%edx
80104c78: 80 3a 00 cmpb $0x0,(%edx)
80104c7b: 74 0c je 80104c89 <strlen+0x19>
80104c7d: 8d 76 00 lea 0x0(%esi),%esi
80104c80: 83 c0 01 add $0x1,%eax
80104c83: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
80104c87: 75 f7 jne 80104c80 <strlen+0x10>
80104c89: 5d pop %ebp
80104c8a: c3 ret
80104c8b <swtch>:
80104c8b: 8b 44 24 04 mov 0x4(%esp),%eax
80104c8f: 8b 54 24 08 mov 0x8(%esp),%edx
80104c93: 55 push %ebp
80104c94: 53 push %ebx
80104c95: 56 push %esi
80104c96: 57 push %edi
80104c97: 89 20 mov %esp,(%eax)
80104c99: 89 d4 mov %edx,%esp
80104c9b: 5f pop %edi
80104c9c: 5e pop %esi
80104c9d: 5b pop %ebx
80104c9e: 5d pop %ebp
80104c9f: c3 ret
80104ca0 <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)
{
80104ca0: 55 push %ebp
80104ca1: 89 e5 mov %esp,%ebp
80104ca3: 53 push %ebx
80104ca4: 83 ec 04 sub $0x4,%esp
80104ca7: 8b 5d 08 mov 0x8(%ebp),%ebx
struct proc *curproc = myproc();
80104caa: e8 f1 ea ff ff call 801037a0 <myproc>
if(addr >= curproc->sz || addr+4 > curproc->sz)
80104caf: 8b 00 mov (%eax),%eax
80104cb1: 39 d8 cmp %ebx,%eax
80104cb3: 76 1b jbe 80104cd0 <fetchint+0x30>
80104cb5: 8d 53 04 lea 0x4(%ebx),%edx
80104cb8: 39 d0 cmp %edx,%eax
80104cba: 72 14 jb 80104cd0 <fetchint+0x30>
return -1;
*ip = *(int*)(addr);
80104cbc: 8b 45 0c mov 0xc(%ebp),%eax
80104cbf: 8b 13 mov (%ebx),%edx
80104cc1: 89 10 mov %edx,(%eax)
return 0;
80104cc3: 31 c0 xor %eax,%eax
}
80104cc5: 83 c4 04 add $0x4,%esp
80104cc8: 5b pop %ebx
80104cc9: 5d pop %ebp
80104cca: c3 ret
80104ccb: 90 nop
80104ccc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
fetchint(uint addr, int *ip)
{
struct proc *curproc = myproc();
if(addr >= curproc->sz || addr+4 > curproc->sz)
return -1;
80104cd0: b8 ff ff ff ff mov $0xffffffff,%eax
80104cd5: eb ee jmp 80104cc5 <fetchint+0x25>
80104cd7: 89 f6 mov %esi,%esi
80104cd9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104ce0 <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)
{
80104ce0: 55 push %ebp
80104ce1: 89 e5 mov %esp,%ebp
80104ce3: 53 push %ebx
80104ce4: 83 ec 04 sub $0x4,%esp
80104ce7: 8b 5d 08 mov 0x8(%ebp),%ebx
char *s, *ep;
struct proc *curproc = myproc();
80104cea: e8 b1 ea ff ff call 801037a0 <myproc>
if(addr >= curproc->sz)
80104cef: 39 18 cmp %ebx,(%eax)
80104cf1: 76 29 jbe 80104d1c <fetchstr+0x3c>
return -1;
*pp = (char*)addr;
80104cf3: 8b 4d 0c mov 0xc(%ebp),%ecx
80104cf6: 89 da mov %ebx,%edx
80104cf8: 89 19 mov %ebx,(%ecx)
ep = (char*)curproc->sz;
80104cfa: 8b 00 mov (%eax),%eax
for(s = *pp; s < ep; s++){
80104cfc: 39 c3 cmp %eax,%ebx
80104cfe: 73 1c jae 80104d1c <fetchstr+0x3c>
if(*s == 0)
80104d00: 80 3b 00 cmpb $0x0,(%ebx)
80104d03: 75 10 jne 80104d15 <fetchstr+0x35>
80104d05: eb 29 jmp 80104d30 <fetchstr+0x50>
80104d07: 89 f6 mov %esi,%esi
80104d09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104d10: 80 3a 00 cmpb $0x0,(%edx)
80104d13: 74 1b je 80104d30 <fetchstr+0x50>
if(addr >= curproc->sz)
return -1;
*pp = (char*)addr;
ep = (char*)curproc->sz;
for(s = *pp; s < ep; s++){
80104d15: 83 c2 01 add $0x1,%edx
80104d18: 39 d0 cmp %edx,%eax
80104d1a: 77 f4 ja 80104d10 <fetchstr+0x30>
if(*s == 0)
return s - *pp;
}
return -1;
}
80104d1c: 83 c4 04 add $0x4,%esp
{
char *s, *ep;
struct proc *curproc = myproc();
if(addr >= curproc->sz)
return -1;
80104d1f: b8 ff ff ff ff mov $0xffffffff,%eax
for(s = *pp; s < ep; s++){
if(*s == 0)
return s - *pp;
}
return -1;
}
80104d24: 5b pop %ebx
80104d25: 5d pop %ebp
80104d26: c3 ret
80104d27: 89 f6 mov %esi,%esi
80104d29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104d30: 83 c4 04 add $0x4,%esp
return -1;
*pp = (char*)addr;
ep = (char*)curproc->sz;
for(s = *pp; s < ep; s++){
if(*s == 0)
return s - *pp;
80104d33: 89 d0 mov %edx,%eax
80104d35: 29 d8 sub %ebx,%eax
}
return -1;
}
80104d37: 5b pop %ebx
80104d38: 5d pop %ebp
80104d39: c3 ret
80104d3a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80104d40 <argint>:
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
80104d40: 55 push %ebp
80104d41: 89 e5 mov %esp,%ebp
80104d43: 56 push %esi
80104d44: 53 push %ebx
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
80104d45: e8 56 ea ff ff call 801037a0 <myproc>
80104d4a: 8b 40 18 mov 0x18(%eax),%eax
80104d4d: 8b 55 08 mov 0x8(%ebp),%edx
80104d50: 8b 40 44 mov 0x44(%eax),%eax
80104d53: 8d 1c 90 lea (%eax,%edx,4),%ebx
// Fetch the int at addr from the current process.
int
fetchint(uint addr, int *ip)
{
struct proc *curproc = myproc();
80104d56: e8 45 ea ff ff call 801037a0 <myproc>
if(addr >= curproc->sz || addr+4 > curproc->sz)
80104d5b: 8b 00 mov (%eax),%eax
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
80104d5d: 8d 73 04 lea 0x4(%ebx),%esi
int
fetchint(uint addr, int *ip)
{
struct proc *curproc = myproc();
if(addr >= curproc->sz || addr+4 > curproc->sz)
80104d60: 39 c6 cmp %eax,%esi
80104d62: 73 1c jae 80104d80 <argint+0x40>
80104d64: 8d 53 08 lea 0x8(%ebx),%edx
80104d67: 39 d0 cmp %edx,%eax
80104d69: 72 15 jb 80104d80 <argint+0x40>
return -1;
*ip = *(int*)(addr);
80104d6b: 8b 45 0c mov 0xc(%ebp),%eax
80104d6e: 8b 53 04 mov 0x4(%ebx),%edx
80104d71: 89 10 mov %edx,(%eax)
return 0;
80104d73: 31 c0 xor %eax,%eax
// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
return fetchint((myproc()->tf->esp) + 4 + 4*n, ip);
}
80104d75: 5b pop %ebx
80104d76: 5e pop %esi
80104d77: 5d pop %ebp
80104d78: c3 ret
80104d79: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
fetchint(uint addr, int *ip)
{
struct proc *curproc = myproc();
if(addr >= curproc->sz || addr+4 > curproc->sz)
return -1;
80104d80: b8 ff ff ff ff mov $0xffffffff,%eax
80104d85: eb ee jmp 80104d75 <argint+0x35>
80104d87: 89 f6 mov %esi,%esi
80104d89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104d90 <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)
{
80104d90: 55 push %ebp
80104d91: 89 e5 mov %esp,%ebp
80104d93: 56 push %esi
80104d94: 53 push %ebx
80104d95: 83 ec 10 sub $0x10,%esp
80104d98: 8b 5d 10 mov 0x10(%ebp),%ebx
int i;
struct proc *curproc = myproc();
80104d9b: e8 00 ea ff ff call 801037a0 <myproc>
80104da0: 89 c6 mov %eax,%esi
if(argint(n, &i) < 0)
80104da2: 8d 45 f4 lea -0xc(%ebp),%eax
80104da5: 83 ec 08 sub $0x8,%esp
80104da8: 50 push %eax
80104da9: ff 75 08 pushl 0x8(%ebp)
80104dac: e8 8f ff ff ff call 80104d40 <argint>
return -1;
if(size < 0 || (uint)i >= curproc->sz || (uint)i+size > curproc->sz)
80104db1: c1 e8 1f shr $0x1f,%eax
80104db4: 83 c4 10 add $0x10,%esp
80104db7: 84 c0 test %al,%al
80104db9: 75 2d jne 80104de8 <argptr+0x58>
80104dbb: 89 d8 mov %ebx,%eax
80104dbd: c1 e8 1f shr $0x1f,%eax
80104dc0: 84 c0 test %al,%al
80104dc2: 75 24 jne 80104de8 <argptr+0x58>
80104dc4: 8b 16 mov (%esi),%edx
80104dc6: 8b 45 f4 mov -0xc(%ebp),%eax
80104dc9: 39 c2 cmp %eax,%edx
80104dcb: 76 1b jbe 80104de8 <argptr+0x58>
80104dcd: 01 c3 add %eax,%ebx
80104dcf: 39 da cmp %ebx,%edx
80104dd1: 72 15 jb 80104de8 <argptr+0x58>
return -1;
*pp = (char*)i;
80104dd3: 8b 55 0c mov 0xc(%ebp),%edx
80104dd6: 89 02 mov %eax,(%edx)
return 0;
80104dd8: 31 c0 xor %eax,%eax
}
80104dda: 8d 65 f8 lea -0x8(%ebp),%esp
80104ddd: 5b pop %ebx
80104dde: 5e pop %esi
80104ddf: 5d pop %ebp
80104de0: c3 ret
80104de1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
struct proc *curproc = myproc();
if(argint(n, &i) < 0)
return -1;
if(size < 0 || (uint)i >= curproc->sz || (uint)i+size > curproc->sz)
return -1;
80104de8: b8 ff ff ff ff mov $0xffffffff,%eax
80104ded: eb eb jmp 80104dda <argptr+0x4a>
80104def: 90 nop
80104df0 <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)
{
80104df0: 55 push %ebp
80104df1: 89 e5 mov %esp,%ebp
80104df3: 83 ec 20 sub $0x20,%esp
int addr;
if(argint(n, &addr) < 0)
80104df6: 8d 45 f4 lea -0xc(%ebp),%eax
80104df9: 50 push %eax
80104dfa: ff 75 08 pushl 0x8(%ebp)
80104dfd: e8 3e ff ff ff call 80104d40 <argint>
80104e02: 83 c4 10 add $0x10,%esp
80104e05: 85 c0 test %eax,%eax
80104e07: 78 17 js 80104e20 <argstr+0x30>
return -1;
return fetchstr(addr, pp);
80104e09: 83 ec 08 sub $0x8,%esp
80104e0c: ff 75 0c pushl 0xc(%ebp)
80104e0f: ff 75 f4 pushl -0xc(%ebp)
80104e12: e8 c9 fe ff ff call 80104ce0 <fetchstr>
80104e17: 83 c4 10 add $0x10,%esp
}
80104e1a: c9 leave
80104e1b: c3 ret
80104e1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
int
argstr(int n, char **pp)
{
int addr;
if(argint(n, &addr) < 0)
return -1;
80104e20: b8 ff ff ff ff mov $0xffffffff,%eax
return fetchstr(addr, pp);
}
80104e25: c9 leave
80104e26: c3 ret
80104e27: 89 f6 mov %esi,%esi
80104e29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80104e30 <syscall>:
[SYS_gettid] sys_gettid,
};
void
syscall(void)
{
80104e30: 55 push %ebp
80104e31: 89 e5 mov %esp,%ebp
80104e33: 56 push %esi
80104e34: 53 push %ebx
int num;
struct proc *curproc = myproc();
80104e35: e8 66 e9 ff ff call 801037a0 <myproc>
num = curproc->tf->eax;
80104e3a: 8b 70 18 mov 0x18(%eax),%esi
void
syscall(void)
{
int num;
struct proc *curproc = myproc();
80104e3d: 89 c3 mov %eax,%ebx
num = curproc->tf->eax;
80104e3f: 8b 46 1c mov 0x1c(%esi),%eax
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
80104e42: 8d 50 ff lea -0x1(%eax),%edx
80104e45: 83 fa 19 cmp $0x19,%edx
80104e48: 77 1e ja 80104e68 <syscall+0x38>
80104e4a: 8b 14 85 80 7d 10 80 mov -0x7fef8280(,%eax,4),%edx
80104e51: 85 d2 test %edx,%edx
80104e53: 74 13 je 80104e68 <syscall+0x38>
curproc->tf->eax = syscalls[num]();
80104e55: ff d2 call *%edx
80104e57: 89 46 1c mov %eax,0x1c(%esi)
} else {
cprintf("%d %s: unknown sys call %d\n",
curproc->pid, curproc->name, num);
curproc->tf->eax = -1;
}
}
80104e5a: 8d 65 f8 lea -0x8(%ebp),%esp
80104e5d: 5b pop %ebx
80104e5e: 5e pop %esi
80104e5f: 5d pop %ebp
80104e60: c3 ret
80104e61: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
num = curproc->tf->eax;
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
curproc->tf->eax = syscalls[num]();
} else {
cprintf("%d %s: unknown sys call %d\n",
80104e68: 50 push %eax
curproc->pid, curproc->name, num);
80104e69: 8d 43 6c lea 0x6c(%ebx),%eax
num = curproc->tf->eax;
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
curproc->tf->eax = syscalls[num]();
} else {
cprintf("%d %s: unknown sys call %d\n",
80104e6c: 50 push %eax
80104e6d: ff 73 10 pushl 0x10(%ebx)
80104e70: 68 49 7d 10 80 push $0x80107d49
80104e75: e8 e6 b7 ff ff call 80100660 <cprintf>
curproc->pid, curproc->name, num);
curproc->tf->eax = -1;
80104e7a: 8b 43 18 mov 0x18(%ebx),%eax
80104e7d: 83 c4 10 add $0x10,%esp
80104e80: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax)
}
}
80104e87: 8d 65 f8 lea -0x8(%ebp),%esp
80104e8a: 5b pop %ebx
80104e8b: 5e pop %esi
80104e8c: 5d pop %ebp
80104e8d: c3 ret
80104e8e: 66 90 xchg %ax,%ax
80104e90 <create>:
return -1;
}
static struct inode*
create(char *path, short type, short major, short minor)
{
80104e90: 55 push %ebp
80104e91: 89 e5 mov %esp,%ebp
80104e93: 57 push %edi
80104e94: 56 push %esi
80104e95: 53 push %ebx
uint off;
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
80104e96: 8d 75 da lea -0x26(%ebp),%esi
return -1;
}
static struct inode*
create(char *path, short type, short major, short minor)
{
80104e99: 83 ec 44 sub $0x44,%esp
80104e9c: 89 4d c0 mov %ecx,-0x40(%ebp)
80104e9f: 8b 4d 08 mov 0x8(%ebp),%ecx
uint off;
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
80104ea2: 56 push %esi
80104ea3: 50 push %eax
return -1;
}
static struct inode*
create(char *path, short type, short major, short minor)
{
80104ea4: 89 55 c4 mov %edx,-0x3c(%ebp)
80104ea7: 89 4d bc mov %ecx,-0x44(%ebp)
uint off;
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
80104eaa: e8 31 d0 ff ff call 80101ee0 <nameiparent>
80104eaf: 83 c4 10 add $0x10,%esp
80104eb2: 85 c0 test %eax,%eax
80104eb4: 0f 84 f6 00 00 00 je 80104fb0 <create+0x120>
return 0;
ilock(dp);
80104eba: 83 ec 0c sub $0xc,%esp
80104ebd: 89 c7 mov %eax,%edi
80104ebf: 50 push %eax
80104ec0: e8 ab c7 ff ff call 80101670 <ilock>
if((ip = dirlookup(dp, name, &off)) != 0){
80104ec5: 8d 45 d4 lea -0x2c(%ebp),%eax
80104ec8: 83 c4 0c add $0xc,%esp
80104ecb: 50 push %eax
80104ecc: 56 push %esi
80104ecd: 57 push %edi
80104ece: e8 cd cc ff ff call 80101ba0 <dirlookup>
80104ed3: 83 c4 10 add $0x10,%esp
80104ed6: 85 c0 test %eax,%eax
80104ed8: 89 c3 mov %eax,%ebx
80104eda: 74 54 je 80104f30 <create+0xa0>
iunlockput(dp);
80104edc: 83 ec 0c sub $0xc,%esp
80104edf: 57 push %edi
80104ee0: e8 1b ca ff ff call 80101900 <iunlockput>
ilock(ip);
80104ee5: 89 1c 24 mov %ebx,(%esp)
80104ee8: e8 83 c7 ff ff call 80101670 <ilock>
if(type == T_FILE && ip->type == T_FILE)
80104eed: 83 c4 10 add $0x10,%esp
80104ef0: 66 83 7d c4 02 cmpw $0x2,-0x3c(%ebp)
80104ef5: 75 19 jne 80104f10 <create+0x80>
80104ef7: 66 83 7b 50 02 cmpw $0x2,0x50(%ebx)
80104efc: 89 d8 mov %ebx,%eax
80104efe: 75 10 jne 80104f10 <create+0x80>
panic("create: dirlink");
iunlockput(dp);
return ip;
}
80104f00: 8d 65 f4 lea -0xc(%ebp),%esp
80104f03: 5b pop %ebx
80104f04: 5e pop %esi
80104f05: 5f pop %edi
80104f06: 5d pop %ebp
80104f07: c3 ret
80104f08: 90 nop
80104f09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if((ip = dirlookup(dp, name, &off)) != 0){
iunlockput(dp);
ilock(ip);
if(type == T_FILE && ip->type == T_FILE)
return ip;
iunlockput(ip);
80104f10: 83 ec 0c sub $0xc,%esp
80104f13: 53 push %ebx
80104f14: e8 e7 c9 ff ff call 80101900 <iunlockput>
return 0;
80104f19: 83 c4 10 add $0x10,%esp
panic("create: dirlink");
iunlockput(dp);
return ip;
}
80104f1c: 8d 65 f4 lea -0xc(%ebp),%esp
iunlockput(dp);
ilock(ip);
if(type == T_FILE && ip->type == T_FILE)
return ip;
iunlockput(ip);
return 0;
80104f1f: 31 c0 xor %eax,%eax
panic("create: dirlink");
iunlockput(dp);
return ip;
}
80104f21: 5b pop %ebx
80104f22: 5e pop %esi
80104f23: 5f pop %edi
80104f24: 5d pop %ebp
80104f25: c3 ret
80104f26: 8d 76 00 lea 0x0(%esi),%esi
80104f29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
return ip;
iunlockput(ip);
return 0;
}
if((ip = ialloc(dp->dev, type)) == 0)
80104f30: 0f bf 45 c4 movswl -0x3c(%ebp),%eax
80104f34: 83 ec 08 sub $0x8,%esp
80104f37: 50 push %eax
80104f38: ff 37 pushl (%edi)
80104f3a: e8 c1 c5 ff ff call 80101500 <ialloc>
80104f3f: 83 c4 10 add $0x10,%esp
80104f42: 85 c0 test %eax,%eax
80104f44: 89 c3 mov %eax,%ebx
80104f46: 0f 84 cc 00 00 00 je 80105018 <create+0x188>
panic("create: ialloc");
ilock(ip);
80104f4c: 83 ec 0c sub $0xc,%esp
80104f4f: 50 push %eax
80104f50: e8 1b c7 ff ff call 80101670 <ilock>
ip->major = major;
80104f55: 0f b7 45 c0 movzwl -0x40(%ebp),%eax
80104f59: 66 89 43 52 mov %ax,0x52(%ebx)
ip->minor = minor;
80104f5d: 0f b7 45 bc movzwl -0x44(%ebp),%eax
80104f61: 66 89 43 54 mov %ax,0x54(%ebx)
ip->nlink = 1;
80104f65: b8 01 00 00 00 mov $0x1,%eax
80104f6a: 66 89 43 56 mov %ax,0x56(%ebx)
iupdate(ip);
80104f6e: 89 1c 24 mov %ebx,(%esp)
80104f71: e8 4a c6 ff ff call 801015c0 <iupdate>
if(type == T_DIR){ // Create . and .. entries.
80104f76: 83 c4 10 add $0x10,%esp
80104f79: 66 83 7d c4 01 cmpw $0x1,-0x3c(%ebp)
80104f7e: 74 40 je 80104fc0 <create+0x130>
// No ip->nlink++ for ".": avoid cyclic ref count.
if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0)
panic("create dots");
}
if(dirlink(dp, name, ip->inum) < 0)
80104f80: 83 ec 04 sub $0x4,%esp
80104f83: ff 73 04 pushl 0x4(%ebx)
80104f86: 56 push %esi
80104f87: 57 push %edi
80104f88: e8 73 ce ff ff call 80101e00 <dirlink>
80104f8d: 83 c4 10 add $0x10,%esp
80104f90: 85 c0 test %eax,%eax
80104f92: 78 77 js 8010500b <create+0x17b>
panic("create: dirlink");
iunlockput(dp);
80104f94: 83 ec 0c sub $0xc,%esp
80104f97: 57 push %edi
80104f98: e8 63 c9 ff ff call 80101900 <iunlockput>
return ip;
80104f9d: 83 c4 10 add $0x10,%esp
}
80104fa0: 8d 65 f4 lea -0xc(%ebp),%esp
if(dirlink(dp, name, ip->inum) < 0)
panic("create: dirlink");
iunlockput(dp);
return ip;
80104fa3: 89 d8 mov %ebx,%eax
}
80104fa5: 5b pop %ebx
80104fa6: 5e pop %esi
80104fa7: 5f pop %edi
80104fa8: 5d pop %ebp
80104fa9: c3 ret
80104faa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
uint off;
struct inode *ip, *dp;
char name[DIRSIZ];
if((dp = nameiparent(path, name)) == 0)
return 0;
80104fb0: 31 c0 xor %eax,%eax
80104fb2: e9 49 ff ff ff jmp 80104f00 <create+0x70>
80104fb7: 89 f6 mov %esi,%esi
80104fb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
ip->minor = minor;
ip->nlink = 1;
iupdate(ip);
if(type == T_DIR){ // Create . and .. entries.
dp->nlink++; // for ".."
80104fc0: 66 83 47 56 01 addw $0x1,0x56(%edi)
iupdate(dp);
80104fc5: 83 ec 0c sub $0xc,%esp
80104fc8: 57 push %edi
80104fc9: e8 f2 c5 ff ff call 801015c0 <iupdate>
// No ip->nlink++ for ".": avoid cyclic ref count.
if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0)
80104fce: 83 c4 0c add $0xc,%esp
80104fd1: ff 73 04 pushl 0x4(%ebx)
80104fd4: 68 08 7e 10 80 push $0x80107e08
80104fd9: 53 push %ebx
80104fda: e8 21 ce ff ff call 80101e00 <dirlink>
80104fdf: 83 c4 10 add $0x10,%esp
80104fe2: 85 c0 test %eax,%eax
80104fe4: 78 18 js 80104ffe <create+0x16e>
80104fe6: 83 ec 04 sub $0x4,%esp
80104fe9: ff 77 04 pushl 0x4(%edi)
80104fec: 68 07 7e 10 80 push $0x80107e07
80104ff1: 53 push %ebx
80104ff2: e8 09 ce ff ff call 80101e00 <dirlink>
80104ff7: 83 c4 10 add $0x10,%esp
80104ffa: 85 c0 test %eax,%eax
80104ffc: 79 82 jns 80104f80 <create+0xf0>
panic("create dots");
80104ffe: 83 ec 0c sub $0xc,%esp
80105001: 68 fb 7d 10 80 push $0x80107dfb
80105006: e8 65 b3 ff ff call 80100370 <panic>
}
if(dirlink(dp, name, ip->inum) < 0)
panic("create: dirlink");
8010500b: 83 ec 0c sub $0xc,%esp
8010500e: 68 0a 7e 10 80 push $0x80107e0a
80105013: e8 58 b3 ff ff call 80100370 <panic>
iunlockput(ip);
return 0;
}
if((ip = ialloc(dp->dev, type)) == 0)
panic("create: ialloc");
80105018: 83 ec 0c sub $0xc,%esp
8010501b: 68 ec 7d 10 80 push $0x80107dec
80105020: e8 4b b3 ff ff call 80100370 <panic>
80105025: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105029: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105030 <argfd.constprop.0>:
#include "fcntl.h"
// Fetch the nth word-sized system call argument as a file descriptor
// and return both the descriptor and the corresponding struct file.
static int
argfd(int n, int *pfd, struct file **pf)
80105030: 55 push %ebp
80105031: 89 e5 mov %esp,%ebp
80105033: 56 push %esi
80105034: 53 push %ebx
80105035: 89 c6 mov %eax,%esi
{
int fd;
struct file *f;
if(argint(n, &fd) < 0)
80105037: 8d 45 f4 lea -0xc(%ebp),%eax
#include "fcntl.h"
// Fetch the nth word-sized system call argument as a file descriptor
// and return both the descriptor and the corresponding struct file.
static int
argfd(int n, int *pfd, struct file **pf)
8010503a: 89 d3 mov %edx,%ebx
8010503c: 83 ec 18 sub $0x18,%esp
{
int fd;
struct file *f;
if(argint(n, &fd) < 0)
8010503f: 50 push %eax
80105040: 6a 00 push $0x0
80105042: e8 f9 fc ff ff call 80104d40 <argint>
80105047: 83 c4 10 add $0x10,%esp
8010504a: 85 c0 test %eax,%eax
8010504c: 78 32 js 80105080 <argfd.constprop.0+0x50>
return -1;
if(fd < 0 || fd >= NOFILE || (f=myproc()->ofile[fd]) == 0)
8010504e: 83 7d f4 0f cmpl $0xf,-0xc(%ebp)
80105052: 77 2c ja 80105080 <argfd.constprop.0+0x50>
80105054: e8 47 e7 ff ff call 801037a0 <myproc>
80105059: 8b 55 f4 mov -0xc(%ebp),%edx
8010505c: 8b 44 90 28 mov 0x28(%eax,%edx,4),%eax
80105060: 85 c0 test %eax,%eax
80105062: 74 1c je 80105080 <argfd.constprop.0+0x50>
return -1;
if(pfd)
80105064: 85 f6 test %esi,%esi
80105066: 74 02 je 8010506a <argfd.constprop.0+0x3a>
*pfd = fd;
80105068: 89 16 mov %edx,(%esi)
if(pf)
8010506a: 85 db test %ebx,%ebx
8010506c: 74 22 je 80105090 <argfd.constprop.0+0x60>
*pf = f;
8010506e: 89 03 mov %eax,(%ebx)
return 0;
80105070: 31 c0 xor %eax,%eax
}
80105072: 8d 65 f8 lea -0x8(%ebp),%esp
80105075: 5b pop %ebx
80105076: 5e pop %esi
80105077: 5d pop %ebp
80105078: c3 ret
80105079: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105080: 8d 65 f8 lea -0x8(%ebp),%esp
{
int fd;
struct file *f;
if(argint(n, &fd) < 0)
return -1;
80105083: b8 ff ff ff ff mov $0xffffffff,%eax
if(pfd)
*pfd = fd;
if(pf)
*pf = f;
return 0;
}
80105088: 5b pop %ebx
80105089: 5e pop %esi
8010508a: 5d pop %ebp
8010508b: c3 ret
8010508c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
if(pfd)
*pfd = fd;
if(pf)
*pf = f;
return 0;
80105090: 31 c0 xor %eax,%eax
80105092: eb de jmp 80105072 <argfd.constprop.0+0x42>
80105094: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010509a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801050a0 <sys_dup>:
return -1;
}
int
sys_dup(void)
{
801050a0: 55 push %ebp
struct file *f;
int fd;
if(argfd(0, 0, &f) < 0)
801050a1: 31 c0 xor %eax,%eax
return -1;
}
int
sys_dup(void)
{
801050a3: 89 e5 mov %esp,%ebp
801050a5: 56 push %esi
801050a6: 53 push %ebx
struct file *f;
int fd;
if(argfd(0, 0, &f) < 0)
801050a7: 8d 55 f4 lea -0xc(%ebp),%edx
return -1;
}
int
sys_dup(void)
{
801050aa: 83 ec 10 sub $0x10,%esp
struct file *f;
int fd;
if(argfd(0, 0, &f) < 0)
801050ad: e8 7e ff ff ff call 80105030 <argfd.constprop.0>
801050b2: 85 c0 test %eax,%eax
801050b4: 78 1a js 801050d0 <sys_dup+0x30>
fdalloc(struct file *f)
{
int fd;
struct proc *curproc = myproc();
for(fd = 0; fd < NOFILE; fd++){
801050b6: 31 db xor %ebx,%ebx
struct file *f;
int fd;
if(argfd(0, 0, &f) < 0)
return -1;
if((fd=fdalloc(f)) < 0)
801050b8: 8b 75 f4 mov -0xc(%ebp),%esi
// Takes over file reference from caller on success.
static int
fdalloc(struct file *f)
{
int fd;
struct proc *curproc = myproc();
801050bb: e8 e0 e6 ff ff call 801037a0 <myproc>
for(fd = 0; fd < NOFILE; fd++){
if(curproc->ofile[fd] == 0){
801050c0: 8b 54 98 28 mov 0x28(%eax,%ebx,4),%edx
801050c4: 85 d2 test %edx,%edx
801050c6: 74 18 je 801050e0 <sys_dup+0x40>
fdalloc(struct file *f)
{
int fd;
struct proc *curproc = myproc();
for(fd = 0; fd < NOFILE; fd++){
801050c8: 83 c3 01 add $0x1,%ebx
801050cb: 83 fb 10 cmp $0x10,%ebx
801050ce: 75 f0 jne 801050c0 <sys_dup+0x20>
return -1;
if((fd=fdalloc(f)) < 0)
return -1;
filedup(f);
return fd;
}
801050d0: 8d 65 f8 lea -0x8(%ebp),%esp
{
struct file *f;
int fd;
if(argfd(0, 0, &f) < 0)
return -1;
801050d3: b8 ff ff ff ff mov $0xffffffff,%eax
if((fd=fdalloc(f)) < 0)
return -1;
filedup(f);
return fd;
}
801050d8: 5b pop %ebx
801050d9: 5e pop %esi
801050da: 5d pop %ebp
801050db: c3 ret
801050dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
int fd;
struct proc *curproc = myproc();
for(fd = 0; fd < NOFILE; fd++){
if(curproc->ofile[fd] == 0){
curproc->ofile[fd] = f;
801050e0: 89 74 98 28 mov %esi,0x28(%eax,%ebx,4)
if(argfd(0, 0, &f) < 0)
return -1;
if((fd=fdalloc(f)) < 0)
return -1;
filedup(f);
801050e4: 83 ec 0c sub $0xc,%esp
801050e7: ff 75 f4 pushl -0xc(%ebp)
801050ea: e8 f1 bc ff ff call 80100de0 <filedup>
return fd;
801050ef: 83 c4 10 add $0x10,%esp
}
801050f2: 8d 65 f8 lea -0x8(%ebp),%esp
if(argfd(0, 0, &f) < 0)
return -1;
if((fd=fdalloc(f)) < 0)
return -1;
filedup(f);
return fd;
801050f5: 89 d8 mov %ebx,%eax
}
801050f7: 5b pop %ebx
801050f8: 5e pop %esi
801050f9: 5d pop %ebp
801050fa: c3 ret
801050fb: 90 nop
801050fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105100 <sys_read>:
int
sys_read(void)
{
80105100: 55 push %ebp
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80105101: 31 c0 xor %eax,%eax
return fd;
}
int
sys_read(void)
{
80105103: 89 e5 mov %esp,%ebp
80105105: 83 ec 18 sub $0x18,%esp
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80105108: 8d 55 ec lea -0x14(%ebp),%edx
8010510b: e8 20 ff ff ff call 80105030 <argfd.constprop.0>
80105110: 85 c0 test %eax,%eax
80105112: 78 4c js 80105160 <sys_read+0x60>
80105114: 8d 45 f0 lea -0x10(%ebp),%eax
80105117: 83 ec 08 sub $0x8,%esp
8010511a: 50 push %eax
8010511b: 6a 02 push $0x2
8010511d: e8 1e fc ff ff call 80104d40 <argint>
80105122: 83 c4 10 add $0x10,%esp
80105125: 85 c0 test %eax,%eax
80105127: 78 37 js 80105160 <sys_read+0x60>
80105129: 8d 45 f4 lea -0xc(%ebp),%eax
8010512c: 83 ec 04 sub $0x4,%esp
8010512f: ff 75 f0 pushl -0x10(%ebp)
80105132: 50 push %eax
80105133: 6a 01 push $0x1
80105135: e8 56 fc ff ff call 80104d90 <argptr>
8010513a: 83 c4 10 add $0x10,%esp
8010513d: 85 c0 test %eax,%eax
8010513f: 78 1f js 80105160 <sys_read+0x60>
return -1;
return fileread(f, p, n);
80105141: 83 ec 04 sub $0x4,%esp
80105144: ff 75 f0 pushl -0x10(%ebp)
80105147: ff 75 f4 pushl -0xc(%ebp)
8010514a: ff 75 ec pushl -0x14(%ebp)
8010514d: e8 fe bd ff ff call 80100f50 <fileread>
80105152: 83 c4 10 add $0x10,%esp
}
80105155: c9 leave
80105156: c3 ret
80105157: 89 f6 mov %esi,%esi
80105159: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
return -1;
80105160: b8 ff ff ff ff mov $0xffffffff,%eax
return fileread(f, p, n);
}
80105165: c9 leave
80105166: c3 ret
80105167: 89 f6 mov %esi,%esi
80105169: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105170 <sys_write>:
int
sys_write(void)
{
80105170: 55 push %ebp
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80105171: 31 c0 xor %eax,%eax
return fileread(f, p, n);
}
int
sys_write(void)
{
80105173: 89 e5 mov %esp,%ebp
80105175: 83 ec 18 sub $0x18,%esp
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
80105178: 8d 55 ec lea -0x14(%ebp),%edx
8010517b: e8 b0 fe ff ff call 80105030 <argfd.constprop.0>
80105180: 85 c0 test %eax,%eax
80105182: 78 4c js 801051d0 <sys_write+0x60>
80105184: 8d 45 f0 lea -0x10(%ebp),%eax
80105187: 83 ec 08 sub $0x8,%esp
8010518a: 50 push %eax
8010518b: 6a 02 push $0x2
8010518d: e8 ae fb ff ff call 80104d40 <argint>
80105192: 83 c4 10 add $0x10,%esp
80105195: 85 c0 test %eax,%eax
80105197: 78 37 js 801051d0 <sys_write+0x60>
80105199: 8d 45 f4 lea -0xc(%ebp),%eax
8010519c: 83 ec 04 sub $0x4,%esp
8010519f: ff 75 f0 pushl -0x10(%ebp)
801051a2: 50 push %eax
801051a3: 6a 01 push $0x1
801051a5: e8 e6 fb ff ff call 80104d90 <argptr>
801051aa: 83 c4 10 add $0x10,%esp
801051ad: 85 c0 test %eax,%eax
801051af: 78 1f js 801051d0 <sys_write+0x60>
return -1;
return filewrite(f, p, n);
801051b1: 83 ec 04 sub $0x4,%esp
801051b4: ff 75 f0 pushl -0x10(%ebp)
801051b7: ff 75 f4 pushl -0xc(%ebp)
801051ba: ff 75 ec pushl -0x14(%ebp)
801051bd: e8 1e be ff ff call 80100fe0 <filewrite>
801051c2: 83 c4 10 add $0x10,%esp
}
801051c5: c9 leave
801051c6: c3 ret
801051c7: 89 f6 mov %esi,%esi
801051c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
struct file *f;
int n;
char *p;
if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
return -1;
801051d0: b8 ff ff ff ff mov $0xffffffff,%eax
return filewrite(f, p, n);
}
801051d5: c9 leave
801051d6: c3 ret
801051d7: 89 f6 mov %esi,%esi
801051d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801051e0 <sys_close>:
int
sys_close(void)
{
801051e0: 55 push %ebp
801051e1: 89 e5 mov %esp,%ebp
801051e3: 83 ec 18 sub $0x18,%esp
int fd;
struct file *f;
if(argfd(0, &fd, &f) < 0)
801051e6: 8d 55 f4 lea -0xc(%ebp),%edx
801051e9: 8d 45 f0 lea -0x10(%ebp),%eax
801051ec: e8 3f fe ff ff call 80105030 <argfd.constprop.0>
801051f1: 85 c0 test %eax,%eax
801051f3: 78 2b js 80105220 <sys_close+0x40>
return -1;
myproc()->ofile[fd] = 0;
801051f5: e8 a6 e5 ff ff call 801037a0 <myproc>
801051fa: 8b 55 f0 mov -0x10(%ebp),%edx
fileclose(f);
801051fd: 83 ec 0c sub $0xc,%esp
int fd;
struct file *f;
if(argfd(0, &fd, &f) < 0)
return -1;
myproc()->ofile[fd] = 0;
80105200: c7 44 90 28 00 00 00 movl $0x0,0x28(%eax,%edx,4)
80105207: 00
fileclose(f);
80105208: ff 75 f4 pushl -0xc(%ebp)
8010520b: e8 20 bc ff ff call 80100e30 <fileclose>
return 0;
80105210: 83 c4 10 add $0x10,%esp
80105213: 31 c0 xor %eax,%eax
}
80105215: c9 leave
80105216: c3 ret
80105217: 89 f6 mov %esi,%esi
80105219: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
{
int fd;
struct file *f;
if(argfd(0, &fd, &f) < 0)
return -1;
80105220: b8 ff ff ff ff mov $0xffffffff,%eax
myproc()->ofile[fd] = 0;
fileclose(f);
return 0;
}
80105225: c9 leave
80105226: c3 ret
80105227: 89 f6 mov %esi,%esi
80105229: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105230 <sys_fstat>:
int
sys_fstat(void)
{
80105230: 55 push %ebp
struct file *f;
struct stat *st;
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
80105231: 31 c0 xor %eax,%eax
return 0;
}
int
sys_fstat(void)
{
80105233: 89 e5 mov %esp,%ebp
80105235: 83 ec 18 sub $0x18,%esp
struct file *f;
struct stat *st;
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
80105238: 8d 55 f0 lea -0x10(%ebp),%edx
8010523b: e8 f0 fd ff ff call 80105030 <argfd.constprop.0>
80105240: 85 c0 test %eax,%eax
80105242: 78 2c js 80105270 <sys_fstat+0x40>
80105244: 8d 45 f4 lea -0xc(%ebp),%eax
80105247: 83 ec 04 sub $0x4,%esp
8010524a: 6a 14 push $0x14
8010524c: 50 push %eax
8010524d: 6a 01 push $0x1
8010524f: e8 3c fb ff ff call 80104d90 <argptr>
80105254: 83 c4 10 add $0x10,%esp
80105257: 85 c0 test %eax,%eax
80105259: 78 15 js 80105270 <sys_fstat+0x40>
return -1;
return filestat(f, st);
8010525b: 83 ec 08 sub $0x8,%esp
8010525e: ff 75 f4 pushl -0xc(%ebp)
80105261: ff 75 f0 pushl -0x10(%ebp)
80105264: e8 97 bc ff ff call 80100f00 <filestat>
80105269: 83 c4 10 add $0x10,%esp
}
8010526c: c9 leave
8010526d: c3 ret
8010526e: 66 90 xchg %ax,%ax
{
struct file *f;
struct stat *st;
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
return -1;
80105270: b8 ff ff ff ff mov $0xffffffff,%eax
return filestat(f, st);
}
80105275: c9 leave
80105276: c3 ret
80105277: 89 f6 mov %esi,%esi
80105279: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105280 <sys_link>:
// Create the path new as a link to the same inode as old.
int
sys_link(void)
{
80105280: 55 push %ebp
80105281: 89 e5 mov %esp,%ebp
80105283: 57 push %edi
80105284: 56 push %esi
80105285: 53 push %ebx
char name[DIRSIZ], *new, *old;
struct inode *dp, *ip;
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
80105286: 8d 45 d4 lea -0x2c(%ebp),%eax
}
// Create the path new as a link to the same inode as old.
int
sys_link(void)
{
80105289: 83 ec 34 sub $0x34,%esp
char name[DIRSIZ], *new, *old;
struct inode *dp, *ip;
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
8010528c: 50 push %eax
8010528d: 6a 00 push $0x0
8010528f: e8 5c fb ff ff call 80104df0 <argstr>
80105294: 83 c4 10 add $0x10,%esp
80105297: 85 c0 test %eax,%eax
80105299: 0f 88 fb 00 00 00 js 8010539a <sys_link+0x11a>
8010529f: 8d 45 d0 lea -0x30(%ebp),%eax
801052a2: 83 ec 08 sub $0x8,%esp
801052a5: 50 push %eax
801052a6: 6a 01 push $0x1
801052a8: e8 43 fb ff ff call 80104df0 <argstr>
801052ad: 83 c4 10 add $0x10,%esp
801052b0: 85 c0 test %eax,%eax
801052b2: 0f 88 e2 00 00 00 js 8010539a <sys_link+0x11a>
return -1;
begin_op();
801052b8: e8 93 d8 ff ff call 80102b50 <begin_op>
if((ip = namei(old)) == 0){
801052bd: 83 ec 0c sub $0xc,%esp
801052c0: ff 75 d4 pushl -0x2c(%ebp)
801052c3: e8 f8 cb ff ff call 80101ec0 <namei>
801052c8: 83 c4 10 add $0x10,%esp
801052cb: 85 c0 test %eax,%eax
801052cd: 89 c3 mov %eax,%ebx
801052cf: 0f 84 f3 00 00 00 je 801053c8 <sys_link+0x148>
end_op();
return -1;
}
ilock(ip);
801052d5: 83 ec 0c sub $0xc,%esp
801052d8: 50 push %eax
801052d9: e8 92 c3 ff ff call 80101670 <ilock>
if(ip->type == T_DIR){
801052de: 83 c4 10 add $0x10,%esp
801052e1: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
801052e6: 0f 84 c4 00 00 00 je 801053b0 <sys_link+0x130>
iunlockput(ip);
end_op();
return -1;
}
ip->nlink++;
801052ec: 66 83 43 56 01 addw $0x1,0x56(%ebx)
iupdate(ip);
801052f1: 83 ec 0c sub $0xc,%esp
iunlock(ip);
if((dp = nameiparent(new, name)) == 0)
801052f4: 8d 7d da lea -0x26(%ebp),%edi
end_op();
return -1;
}
ip->nlink++;
iupdate(ip);
801052f7: 53 push %ebx
801052f8: e8 c3 c2 ff ff call 801015c0 <iupdate>
iunlock(ip);
801052fd: 89 1c 24 mov %ebx,(%esp)
80105300: e8 4b c4 ff ff call 80101750 <iunlock>
if((dp = nameiparent(new, name)) == 0)
80105305: 58 pop %eax
80105306: 5a pop %edx
80105307: 57 push %edi
80105308: ff 75 d0 pushl -0x30(%ebp)
8010530b: e8 d0 cb ff ff call 80101ee0 <nameiparent>
80105310: 83 c4 10 add $0x10,%esp
80105313: 85 c0 test %eax,%eax
80105315: 89 c6 mov %eax,%esi
80105317: 74 5b je 80105374 <sys_link+0xf4>
goto bad;
ilock(dp);
80105319: 83 ec 0c sub $0xc,%esp
8010531c: 50 push %eax
8010531d: e8 4e c3 ff ff call 80101670 <ilock>
if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){
80105322: 83 c4 10 add $0x10,%esp
80105325: 8b 03 mov (%ebx),%eax
80105327: 39 06 cmp %eax,(%esi)
80105329: 75 3d jne 80105368 <sys_link+0xe8>
8010532b: 83 ec 04 sub $0x4,%esp
8010532e: ff 73 04 pushl 0x4(%ebx)
80105331: 57 push %edi
80105332: 56 push %esi
80105333: e8 c8 ca ff ff call 80101e00 <dirlink>
80105338: 83 c4 10 add $0x10,%esp
8010533b: 85 c0 test %eax,%eax
8010533d: 78 29 js 80105368 <sys_link+0xe8>
iunlockput(dp);
goto bad;
}
iunlockput(dp);
8010533f: 83 ec 0c sub $0xc,%esp
80105342: 56 push %esi
80105343: e8 b8 c5 ff ff call 80101900 <iunlockput>
iput(ip);
80105348: 89 1c 24 mov %ebx,(%esp)
8010534b: e8 50 c4 ff ff call 801017a0 <iput>
end_op();
80105350: e8 6b d8 ff ff call 80102bc0 <end_op>
return 0;
80105355: 83 c4 10 add $0x10,%esp
80105358: 31 c0 xor %eax,%eax
ip->nlink--;
iupdate(ip);
iunlockput(ip);
end_op();
return -1;
}
8010535a: 8d 65 f4 lea -0xc(%ebp),%esp
8010535d: 5b pop %ebx
8010535e: 5e pop %esi
8010535f: 5f pop %edi
80105360: 5d pop %ebp
80105361: c3 ret
80105362: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if((dp = nameiparent(new, name)) == 0)
goto bad;
ilock(dp);
if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){
iunlockput(dp);
80105368: 83 ec 0c sub $0xc,%esp
8010536b: 56 push %esi
8010536c: e8 8f c5 ff ff call 80101900 <iunlockput>
goto bad;
80105371: 83 c4 10 add $0x10,%esp
end_op();
return 0;
bad:
ilock(ip);
80105374: 83 ec 0c sub $0xc,%esp
80105377: 53 push %ebx
80105378: e8 f3 c2 ff ff call 80101670 <ilock>
ip->nlink--;
8010537d: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
80105382: 89 1c 24 mov %ebx,(%esp)
80105385: e8 36 c2 ff ff call 801015c0 <iupdate>
iunlockput(ip);
8010538a: 89 1c 24 mov %ebx,(%esp)
8010538d: e8 6e c5 ff ff call 80101900 <iunlockput>
end_op();
80105392: e8 29 d8 ff ff call 80102bc0 <end_op>
return -1;
80105397: 83 c4 10 add $0x10,%esp
}
8010539a: 8d 65 f4 lea -0xc(%ebp),%esp
ilock(ip);
ip->nlink--;
iupdate(ip);
iunlockput(ip);
end_op();
return -1;
8010539d: b8 ff ff ff ff mov $0xffffffff,%eax
}
801053a2: 5b pop %ebx
801053a3: 5e pop %esi
801053a4: 5f pop %edi
801053a5: 5d pop %ebp
801053a6: c3 ret
801053a7: 89 f6 mov %esi,%esi
801053a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
return -1;
}
ilock(ip);
if(ip->type == T_DIR){
iunlockput(ip);
801053b0: 83 ec 0c sub $0xc,%esp
801053b3: 53 push %ebx
801053b4: e8 47 c5 ff ff call 80101900 <iunlockput>
end_op();
801053b9: e8 02 d8 ff ff call 80102bc0 <end_op>
return -1;
801053be: 83 c4 10 add $0x10,%esp
801053c1: b8 ff ff ff ff mov $0xffffffff,%eax
801053c6: eb 92 jmp 8010535a <sys_link+0xda>
if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
return -1;
begin_op();
if((ip = namei(old)) == 0){
end_op();
801053c8: e8 f3 d7 ff ff call 80102bc0 <end_op>
return -1;
801053cd: b8 ff ff ff ff mov $0xffffffff,%eax
801053d2: eb 86 jmp 8010535a <sys_link+0xda>
801053d4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801053da: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801053e0 <sys_unlink>:
return 1;
}
int
sys_unlink(void)
{
801053e0: 55 push %ebp
801053e1: 89 e5 mov %esp,%ebp
801053e3: 57 push %edi
801053e4: 56 push %esi
801053e5: 53 push %ebx
struct inode *ip, *dp;
struct dirent de;
char name[DIRSIZ], *path;
uint off;
if(argstr(0, &path) < 0)
801053e6: 8d 45 c0 lea -0x40(%ebp),%eax
return 1;
}
int
sys_unlink(void)
{
801053e9: 83 ec 54 sub $0x54,%esp
struct inode *ip, *dp;
struct dirent de;
char name[DIRSIZ], *path;
uint off;
if(argstr(0, &path) < 0)
801053ec: 50 push %eax
801053ed: 6a 00 push $0x0
801053ef: e8 fc f9 ff ff call 80104df0 <argstr>
801053f4: 83 c4 10 add $0x10,%esp
801053f7: 85 c0 test %eax,%eax
801053f9: 0f 88 82 01 00 00 js 80105581 <sys_unlink+0x1a1>
return -1;
begin_op();
if((dp = nameiparent(path, name)) == 0){
801053ff: 8d 5d ca lea -0x36(%ebp),%ebx
uint off;
if(argstr(0, &path) < 0)
return -1;
begin_op();
80105402: e8 49 d7 ff ff call 80102b50 <begin_op>
if((dp = nameiparent(path, name)) == 0){
80105407: 83 ec 08 sub $0x8,%esp
8010540a: 53 push %ebx
8010540b: ff 75 c0 pushl -0x40(%ebp)
8010540e: e8 cd ca ff ff call 80101ee0 <nameiparent>
80105413: 83 c4 10 add $0x10,%esp
80105416: 85 c0 test %eax,%eax
80105418: 89 45 b4 mov %eax,-0x4c(%ebp)
8010541b: 0f 84 6a 01 00 00 je 8010558b <sys_unlink+0x1ab>
end_op();
return -1;
}
ilock(dp);
80105421: 8b 75 b4 mov -0x4c(%ebp),%esi
80105424: 83 ec 0c sub $0xc,%esp
80105427: 56 push %esi
80105428: e8 43 c2 ff ff call 80101670 <ilock>
// Cannot unlink "." or "..".
if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0)
8010542d: 58 pop %eax
8010542e: 5a pop %edx
8010542f: 68 08 7e 10 80 push $0x80107e08
80105434: 53 push %ebx
80105435: e8 46 c7 ff ff call 80101b80 <namecmp>
8010543a: 83 c4 10 add $0x10,%esp
8010543d: 85 c0 test %eax,%eax
8010543f: 0f 84 fc 00 00 00 je 80105541 <sys_unlink+0x161>
80105445: 83 ec 08 sub $0x8,%esp
80105448: 68 07 7e 10 80 push $0x80107e07
8010544d: 53 push %ebx
8010544e: e8 2d c7 ff ff call 80101b80 <namecmp>
80105453: 83 c4 10 add $0x10,%esp
80105456: 85 c0 test %eax,%eax
80105458: 0f 84 e3 00 00 00 je 80105541 <sys_unlink+0x161>
goto bad;
if((ip = dirlookup(dp, name, &off)) == 0)
8010545e: 8d 45 c4 lea -0x3c(%ebp),%eax
80105461: 83 ec 04 sub $0x4,%esp
80105464: 50 push %eax
80105465: 53 push %ebx
80105466: 56 push %esi
80105467: e8 34 c7 ff ff call 80101ba0 <dirlookup>
8010546c: 83 c4 10 add $0x10,%esp
8010546f: 85 c0 test %eax,%eax
80105471: 89 c3 mov %eax,%ebx
80105473: 0f 84 c8 00 00 00 je 80105541 <sys_unlink+0x161>
goto bad;
ilock(ip);
80105479: 83 ec 0c sub $0xc,%esp
8010547c: 50 push %eax
8010547d: e8 ee c1 ff ff call 80101670 <ilock>
if(ip->nlink < 1)
80105482: 83 c4 10 add $0x10,%esp
80105485: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx)
8010548a: 0f 8e 24 01 00 00 jle 801055b4 <sys_unlink+0x1d4>
panic("unlink: nlink < 1");
if(ip->type == T_DIR && !isdirempty(ip)){
80105490: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
80105495: 8d 75 d8 lea -0x28(%ebp),%esi
80105498: 74 66 je 80105500 <sys_unlink+0x120>
iunlockput(ip);
goto bad;
}
memset(&de, 0, sizeof(de));
8010549a: 83 ec 04 sub $0x4,%esp
8010549d: 6a 10 push $0x10
8010549f: 6a 00 push $0x0
801054a1: 56 push %esi
801054a2: e8 89 f5 ff ff call 80104a30 <memset>
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
801054a7: 6a 10 push $0x10
801054a9: ff 75 c4 pushl -0x3c(%ebp)
801054ac: 56 push %esi
801054ad: ff 75 b4 pushl -0x4c(%ebp)
801054b0: e8 9b c5 ff ff call 80101a50 <writei>
801054b5: 83 c4 20 add $0x20,%esp
801054b8: 83 f8 10 cmp $0x10,%eax
801054bb: 0f 85 e6 00 00 00 jne 801055a7 <sys_unlink+0x1c7>
panic("unlink: writei");
if(ip->type == T_DIR){
801054c1: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
801054c6: 0f 84 9c 00 00 00 je 80105568 <sys_unlink+0x188>
dp->nlink--;
iupdate(dp);
}
iunlockput(dp);
801054cc: 83 ec 0c sub $0xc,%esp
801054cf: ff 75 b4 pushl -0x4c(%ebp)
801054d2: e8 29 c4 ff ff call 80101900 <iunlockput>
ip->nlink--;
801054d7: 66 83 6b 56 01 subw $0x1,0x56(%ebx)
iupdate(ip);
801054dc: 89 1c 24 mov %ebx,(%esp)
801054df: e8 dc c0 ff ff call 801015c0 <iupdate>
iunlockput(ip);
801054e4: 89 1c 24 mov %ebx,(%esp)
801054e7: e8 14 c4 ff ff call 80101900 <iunlockput>
end_op();
801054ec: e8 cf d6 ff ff call 80102bc0 <end_op>
return 0;
801054f1: 83 c4 10 add $0x10,%esp
801054f4: 31 c0 xor %eax,%eax
bad:
iunlockput(dp);
end_op();
return -1;
}
801054f6: 8d 65 f4 lea -0xc(%ebp),%esp
801054f9: 5b pop %ebx
801054fa: 5e pop %esi
801054fb: 5f pop %edi
801054fc: 5d pop %ebp
801054fd: c3 ret
801054fe: 66 90 xchg %ax,%ax
isdirempty(struct inode *dp)
{
int off;
struct dirent de;
for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
80105500: 83 7b 58 20 cmpl $0x20,0x58(%ebx)
80105504: 76 94 jbe 8010549a <sys_unlink+0xba>
80105506: bf 20 00 00 00 mov $0x20,%edi
8010550b: eb 0f jmp 8010551c <sys_unlink+0x13c>
8010550d: 8d 76 00 lea 0x0(%esi),%esi
80105510: 83 c7 10 add $0x10,%edi
80105513: 3b 7b 58 cmp 0x58(%ebx),%edi
80105516: 0f 83 7e ff ff ff jae 8010549a <sys_unlink+0xba>
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
8010551c: 6a 10 push $0x10
8010551e: 57 push %edi
8010551f: 56 push %esi
80105520: 53 push %ebx
80105521: e8 2a c4 ff ff call 80101950 <readi>
80105526: 83 c4 10 add $0x10,%esp
80105529: 83 f8 10 cmp $0x10,%eax
8010552c: 75 6c jne 8010559a <sys_unlink+0x1ba>
panic("isdirempty: readi");
if(de.inum != 0)
8010552e: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp)
80105533: 74 db je 80105510 <sys_unlink+0x130>
ilock(ip);
if(ip->nlink < 1)
panic("unlink: nlink < 1");
if(ip->type == T_DIR && !isdirempty(ip)){
iunlockput(ip);
80105535: 83 ec 0c sub $0xc,%esp
80105538: 53 push %ebx
80105539: e8 c2 c3 ff ff call 80101900 <iunlockput>
goto bad;
8010553e: 83 c4 10 add $0x10,%esp
end_op();
return 0;
bad:
iunlockput(dp);
80105541: 83 ec 0c sub $0xc,%esp
80105544: ff 75 b4 pushl -0x4c(%ebp)
80105547: e8 b4 c3 ff ff call 80101900 <iunlockput>
end_op();
8010554c: e8 6f d6 ff ff call 80102bc0 <end_op>
return -1;
80105551: 83 c4 10 add $0x10,%esp
}
80105554: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
bad:
iunlockput(dp);
end_op();
return -1;
80105557: b8 ff ff ff ff mov $0xffffffff,%eax
}
8010555c: 5b pop %ebx
8010555d: 5e pop %esi
8010555e: 5f pop %edi
8010555f: 5d pop %ebp
80105560: c3 ret
80105561: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
memset(&de, 0, sizeof(de));
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("unlink: writei");
if(ip->type == T_DIR){
dp->nlink--;
80105568: 8b 45 b4 mov -0x4c(%ebp),%eax
iupdate(dp);
8010556b: 83 ec 0c sub $0xc,%esp
memset(&de, 0, sizeof(de));
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("unlink: writei");
if(ip->type == T_DIR){
dp->nlink--;
8010556e: 66 83 68 56 01 subw $0x1,0x56(%eax)
iupdate(dp);
80105573: 50 push %eax
80105574: e8 47 c0 ff ff call 801015c0 <iupdate>
80105579: 83 c4 10 add $0x10,%esp
8010557c: e9 4b ff ff ff jmp 801054cc <sys_unlink+0xec>
struct dirent de;
char name[DIRSIZ], *path;
uint off;
if(argstr(0, &path) < 0)
return -1;
80105581: b8 ff ff ff ff mov $0xffffffff,%eax
80105586: e9 6b ff ff ff jmp 801054f6 <sys_unlink+0x116>
begin_op();
if((dp = nameiparent(path, name)) == 0){
end_op();
8010558b: e8 30 d6 ff ff call 80102bc0 <end_op>
return -1;
80105590: b8 ff ff ff ff mov $0xffffffff,%eax
80105595: e9 5c ff ff ff jmp 801054f6 <sys_unlink+0x116>
int off;
struct dirent de;
for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("isdirempty: readi");
8010559a: 83 ec 0c sub $0xc,%esp
8010559d: 68 2c 7e 10 80 push $0x80107e2c
801055a2: e8 c9 ad ff ff call 80100370 <panic>
goto bad;
}
memset(&de, 0, sizeof(de));
if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
panic("unlink: writei");
801055a7: 83 ec 0c sub $0xc,%esp
801055aa: 68 3e 7e 10 80 push $0x80107e3e
801055af: e8 bc ad ff ff call 80100370 <panic>
if((ip = dirlookup(dp, name, &off)) == 0)
goto bad;
ilock(ip);
if(ip->nlink < 1)
panic("unlink: nlink < 1");
801055b4: 83 ec 0c sub $0xc,%esp
801055b7: 68 1a 7e 10 80 push $0x80107e1a
801055bc: e8 af ad ff ff call 80100370 <panic>
801055c1: eb 0d jmp 801055d0 <sys_open>
801055c3: 90 nop
801055c4: 90 nop
801055c5: 90 nop
801055c6: 90 nop
801055c7: 90 nop
801055c8: 90 nop
801055c9: 90 nop
801055ca: 90 nop
801055cb: 90 nop
801055cc: 90 nop
801055cd: 90 nop
801055ce: 90 nop
801055cf: 90 nop
801055d0 <sys_open>:
return ip;
}
int
sys_open(void)
{
801055d0: 55 push %ebp
801055d1: 89 e5 mov %esp,%ebp
801055d3: 57 push %edi
801055d4: 56 push %esi
801055d5: 53 push %ebx
char *path;
int fd, omode;
struct file *f;
struct inode *ip;
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
801055d6: 8d 45 e0 lea -0x20(%ebp),%eax
return ip;
}
int
sys_open(void)
{
801055d9: 83 ec 24 sub $0x24,%esp
char *path;
int fd, omode;
struct file *f;
struct inode *ip;
if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
801055dc: 50 push %eax
801055dd: 6a 00 push $0x0
801055df: e8 0c f8 ff ff call 80104df0 <argstr>
801055e4: 83 c4 10 add $0x10,%esp
801055e7: 85 c0 test %eax,%eax
801055e9: 0f 88 9e 00 00 00 js 8010568d <sys_open+0xbd>
801055ef: 8d 45 e4 lea -0x1c(%ebp),%eax
801055f2: 83 ec 08 sub $0x8,%esp
801055f5: 50 push %eax
801055f6: 6a 01 push $0x1
801055f8: e8 43 f7 ff ff call 80104d40 <argint>
801055fd: 83 c4 10 add $0x10,%esp
80105600: 85 c0 test %eax,%eax
80105602: 0f 88 85 00 00 00 js 8010568d <sys_open+0xbd>
return -1;
begin_op();
80105608: e8 43 d5 ff ff call 80102b50 <begin_op>
if(omode & O_CREATE){
8010560d: f6 45 e5 02 testb $0x2,-0x1b(%ebp)
80105611: 0f 85 89 00 00 00 jne 801056a0 <sys_open+0xd0>
if(ip == 0){
end_op();
return -1;
}
} else {
if((ip = namei(path)) == 0){
80105617: 83 ec 0c sub $0xc,%esp
8010561a: ff 75 e0 pushl -0x20(%ebp)
8010561d: e8 9e c8 ff ff call 80101ec0 <namei>
80105622: 83 c4 10 add $0x10,%esp
80105625: 85 c0 test %eax,%eax
80105627: 89 c6 mov %eax,%esi
80105629: 0f 84 8e 00 00 00 je 801056bd <sys_open+0xed>
end_op();
return -1;
}
ilock(ip);
8010562f: 83 ec 0c sub $0xc,%esp
80105632: 50 push %eax
80105633: e8 38 c0 ff ff call 80101670 <ilock>
if(ip->type == T_DIR && omode != O_RDONLY){
80105638: 83 c4 10 add $0x10,%esp
8010563b: 66 83 7e 50 01 cmpw $0x1,0x50(%esi)
80105640: 0f 84 d2 00 00 00 je 80105718 <sys_open+0x148>
end_op();
return -1;
}
}
if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
80105646: e8 25 b7 ff ff call 80100d70 <filealloc>
8010564b: 85 c0 test %eax,%eax
8010564d: 89 c7 mov %eax,%edi
8010564f: 74 2b je 8010567c <sys_open+0xac>
fdalloc(struct file *f)
{
int fd;
struct proc *curproc = myproc();
for(fd = 0; fd < NOFILE; fd++){
80105651: 31 db xor %ebx,%ebx
// Takes over file reference from caller on success.
static int
fdalloc(struct file *f)
{
int fd;
struct proc *curproc = myproc();
80105653: e8 48 e1 ff ff call 801037a0 <myproc>
80105658: 90 nop
80105659: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(fd = 0; fd < NOFILE; fd++){
if(curproc->ofile[fd] == 0){
80105660: 8b 54 98 28 mov 0x28(%eax,%ebx,4),%edx
80105664: 85 d2 test %edx,%edx
80105666: 74 68 je 801056d0 <sys_open+0x100>
fdalloc(struct file *f)
{
int fd;
struct proc *curproc = myproc();
for(fd = 0; fd < NOFILE; fd++){
80105668: 83 c3 01 add $0x1,%ebx
8010566b: 83 fb 10 cmp $0x10,%ebx
8010566e: 75 f0 jne 80105660 <sys_open+0x90>
}
}
if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
if(f)
fileclose(f);
80105670: 83 ec 0c sub $0xc,%esp
80105673: 57 push %edi
80105674: e8 b7 b7 ff ff call 80100e30 <fileclose>
80105679: 83 c4 10 add $0x10,%esp
iunlockput(ip);
8010567c: 83 ec 0c sub $0xc,%esp
8010567f: 56 push %esi
80105680: e8 7b c2 ff ff call 80101900 <iunlockput>
end_op();
80105685: e8 36 d5 ff ff call 80102bc0 <end_op>
return -1;
8010568a: 83 c4 10 add $0x10,%esp
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
return fd;
}
8010568d: 8d 65 f4 lea -0xc(%ebp),%esp
if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
if(f)
fileclose(f);
iunlockput(ip);
end_op();
return -1;
80105690: b8 ff ff ff ff mov $0xffffffff,%eax
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
return fd;
}
80105695: 5b pop %ebx
80105696: 5e pop %esi
80105697: 5f pop %edi
80105698: 5d pop %ebp
80105699: c3 ret
8010569a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
return -1;
begin_op();
if(omode & O_CREATE){
ip = create(path, T_FILE, 0, 0);
801056a0: 83 ec 0c sub $0xc,%esp
801056a3: 8b 45 e0 mov -0x20(%ebp),%eax
801056a6: 31 c9 xor %ecx,%ecx
801056a8: 6a 00 push $0x0
801056aa: ba 02 00 00 00 mov $0x2,%edx
801056af: e8 dc f7 ff ff call 80104e90 <create>
if(ip == 0){
801056b4: 83 c4 10 add $0x10,%esp
801056b7: 85 c0 test %eax,%eax
return -1;
begin_op();
if(omode & O_CREATE){
ip = create(path, T_FILE, 0, 0);
801056b9: 89 c6 mov %eax,%esi
if(ip == 0){
801056bb: 75 89 jne 80105646 <sys_open+0x76>
end_op();
801056bd: e8 fe d4 ff ff call 80102bc0 <end_op>
return -1;
801056c2: b8 ff ff ff ff mov $0xffffffff,%eax
801056c7: eb 43 jmp 8010570c <sys_open+0x13c>
801056c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
fileclose(f);
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
801056d0: 83 ec 0c sub $0xc,%esp
int fd;
struct proc *curproc = myproc();
for(fd = 0; fd < NOFILE; fd++){
if(curproc->ofile[fd] == 0){
curproc->ofile[fd] = f;
801056d3: 89 7c 98 28 mov %edi,0x28(%eax,%ebx,4)
fileclose(f);
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
801056d7: 56 push %esi
801056d8: e8 73 c0 ff ff call 80101750 <iunlock>
end_op();
801056dd: e8 de d4 ff ff call 80102bc0 <end_op>
f->type = FD_INODE;
801056e2: c7 07 02 00 00 00 movl $0x2,(%edi)
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
801056e8: 8b 55 e4 mov -0x1c(%ebp),%edx
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
801056eb: 83 c4 10 add $0x10,%esp
}
iunlock(ip);
end_op();
f->type = FD_INODE;
f->ip = ip;
801056ee: 89 77 10 mov %esi,0x10(%edi)
f->off = 0;
801056f1: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi)
f->readable = !(omode & O_WRONLY);
801056f8: 89 d0 mov %edx,%eax
801056fa: 83 e0 01 and $0x1,%eax
801056fd: 83 f0 01 xor $0x1,%eax
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
80105700: 83 e2 03 and $0x3,%edx
end_op();
f->type = FD_INODE;
f->ip = ip;
f->off = 0;
f->readable = !(omode & O_WRONLY);
80105703: 88 47 08 mov %al,0x8(%edi)
f->writable = (omode & O_WRONLY) || (omode & O_RDWR);
80105706: 0f 95 47 09 setne 0x9(%edi)
return fd;
8010570a: 89 d8 mov %ebx,%eax
}
8010570c: 8d 65 f4 lea -0xc(%ebp),%esp
8010570f: 5b pop %ebx
80105710: 5e pop %esi
80105711: 5f pop %edi
80105712: 5d pop %ebp
80105713: c3 ret
80105714: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if((ip = namei(path)) == 0){
end_op();
return -1;
}
ilock(ip);
if(ip->type == T_DIR && omode != O_RDONLY){
80105718: 8b 4d e4 mov -0x1c(%ebp),%ecx
8010571b: 85 c9 test %ecx,%ecx
8010571d: 0f 84 23 ff ff ff je 80105646 <sys_open+0x76>
80105723: e9 54 ff ff ff jmp 8010567c <sys_open+0xac>
80105728: 90 nop
80105729: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105730 <sys_mkdir>:
return fd;
}
int
sys_mkdir(void)
{
80105730: 55 push %ebp
80105731: 89 e5 mov %esp,%ebp
80105733: 83 ec 18 sub $0x18,%esp
char *path;
struct inode *ip;
begin_op();
80105736: e8 15 d4 ff ff call 80102b50 <begin_op>
if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){
8010573b: 8d 45 f4 lea -0xc(%ebp),%eax
8010573e: 83 ec 08 sub $0x8,%esp
80105741: 50 push %eax
80105742: 6a 00 push $0x0
80105744: e8 a7 f6 ff ff call 80104df0 <argstr>
80105749: 83 c4 10 add $0x10,%esp
8010574c: 85 c0 test %eax,%eax
8010574e: 78 30 js 80105780 <sys_mkdir+0x50>
80105750: 83 ec 0c sub $0xc,%esp
80105753: 8b 45 f4 mov -0xc(%ebp),%eax
80105756: 31 c9 xor %ecx,%ecx
80105758: 6a 00 push $0x0
8010575a: ba 01 00 00 00 mov $0x1,%edx
8010575f: e8 2c f7 ff ff call 80104e90 <create>
80105764: 83 c4 10 add $0x10,%esp
80105767: 85 c0 test %eax,%eax
80105769: 74 15 je 80105780 <sys_mkdir+0x50>
end_op();
return -1;
}
iunlockput(ip);
8010576b: 83 ec 0c sub $0xc,%esp
8010576e: 50 push %eax
8010576f: e8 8c c1 ff ff call 80101900 <iunlockput>
end_op();
80105774: e8 47 d4 ff ff call 80102bc0 <end_op>
return 0;
80105779: 83 c4 10 add $0x10,%esp
8010577c: 31 c0 xor %eax,%eax
}
8010577e: c9 leave
8010577f: c3 ret
char *path;
struct inode *ip;
begin_op();
if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){
end_op();
80105780: e8 3b d4 ff ff call 80102bc0 <end_op>
return -1;
80105785: b8 ff ff ff ff mov $0xffffffff,%eax
}
iunlockput(ip);
end_op();
return 0;
}
8010578a: c9 leave
8010578b: c3 ret
8010578c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105790 <sys_mknod>:
int
sys_mknod(void)
{
80105790: 55 push %ebp
80105791: 89 e5 mov %esp,%ebp
80105793: 83 ec 18 sub $0x18,%esp
struct inode *ip;
char *path;
int major, minor;
begin_op();
80105796: e8 b5 d3 ff ff call 80102b50 <begin_op>
if((argstr(0, &path)) < 0 ||
8010579b: 8d 45 ec lea -0x14(%ebp),%eax
8010579e: 83 ec 08 sub $0x8,%esp
801057a1: 50 push %eax
801057a2: 6a 00 push $0x0
801057a4: e8 47 f6 ff ff call 80104df0 <argstr>
801057a9: 83 c4 10 add $0x10,%esp
801057ac: 85 c0 test %eax,%eax
801057ae: 78 60 js 80105810 <sys_mknod+0x80>
argint(1, &major) < 0 ||
801057b0: 8d 45 f0 lea -0x10(%ebp),%eax
801057b3: 83 ec 08 sub $0x8,%esp
801057b6: 50 push %eax
801057b7: 6a 01 push $0x1
801057b9: e8 82 f5 ff ff call 80104d40 <argint>
struct inode *ip;
char *path;
int major, minor;
begin_op();
if((argstr(0, &path)) < 0 ||
801057be: 83 c4 10 add $0x10,%esp
801057c1: 85 c0 test %eax,%eax
801057c3: 78 4b js 80105810 <sys_mknod+0x80>
argint(1, &major) < 0 ||
argint(2, &minor) < 0 ||
801057c5: 8d 45 f4 lea -0xc(%ebp),%eax
801057c8: 83 ec 08 sub $0x8,%esp
801057cb: 50 push %eax
801057cc: 6a 02 push $0x2
801057ce: e8 6d f5 ff ff call 80104d40 <argint>
char *path;
int major, minor;
begin_op();
if((argstr(0, &path)) < 0 ||
argint(1, &major) < 0 ||
801057d3: 83 c4 10 add $0x10,%esp
801057d6: 85 c0 test %eax,%eax
801057d8: 78 36 js 80105810 <sys_mknod+0x80>
argint(2, &minor) < 0 ||
801057da: 0f bf 45 f4 movswl -0xc(%ebp),%eax
801057de: 83 ec 0c sub $0xc,%esp
801057e1: 0f bf 4d f0 movswl -0x10(%ebp),%ecx
801057e5: ba 03 00 00 00 mov $0x3,%edx
801057ea: 50 push %eax
801057eb: 8b 45 ec mov -0x14(%ebp),%eax
801057ee: e8 9d f6 ff ff call 80104e90 <create>
801057f3: 83 c4 10 add $0x10,%esp
801057f6: 85 c0 test %eax,%eax
801057f8: 74 16 je 80105810 <sys_mknod+0x80>
(ip = create(path, T_DEV, major, minor)) == 0){
end_op();
return -1;
}
iunlockput(ip);
801057fa: 83 ec 0c sub $0xc,%esp
801057fd: 50 push %eax
801057fe: e8 fd c0 ff ff call 80101900 <iunlockput>
end_op();
80105803: e8 b8 d3 ff ff call 80102bc0 <end_op>
return 0;
80105808: 83 c4 10 add $0x10,%esp
8010580b: 31 c0 xor %eax,%eax
}
8010580d: c9 leave
8010580e: c3 ret
8010580f: 90 nop
begin_op();
if((argstr(0, &path)) < 0 ||
argint(1, &major) < 0 ||
argint(2, &minor) < 0 ||
(ip = create(path, T_DEV, major, minor)) == 0){
end_op();
80105810: e8 ab d3 ff ff call 80102bc0 <end_op>
return -1;
80105815: b8 ff ff ff ff mov $0xffffffff,%eax
}
iunlockput(ip);
end_op();
return 0;
}
8010581a: c9 leave
8010581b: c3 ret
8010581c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80105820 <sys_chdir>:
int
sys_chdir(void)
{
80105820: 55 push %ebp
80105821: 89 e5 mov %esp,%ebp
80105823: 56 push %esi
80105824: 53 push %ebx
80105825: 83 ec 10 sub $0x10,%esp
char *path;
struct inode *ip;
struct proc *curproc = myproc();
80105828: e8 73 df ff ff call 801037a0 <myproc>
8010582d: 89 c6 mov %eax,%esi
begin_op();
8010582f: e8 1c d3 ff ff call 80102b50 <begin_op>
if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){
80105834: 8d 45 f4 lea -0xc(%ebp),%eax
80105837: 83 ec 08 sub $0x8,%esp
8010583a: 50 push %eax
8010583b: 6a 00 push $0x0
8010583d: e8 ae f5 ff ff call 80104df0 <argstr>
80105842: 83 c4 10 add $0x10,%esp
80105845: 85 c0 test %eax,%eax
80105847: 78 77 js 801058c0 <sys_chdir+0xa0>
80105849: 83 ec 0c sub $0xc,%esp
8010584c: ff 75 f4 pushl -0xc(%ebp)
8010584f: e8 6c c6 ff ff call 80101ec0 <namei>
80105854: 83 c4 10 add $0x10,%esp
80105857: 85 c0 test %eax,%eax
80105859: 89 c3 mov %eax,%ebx
8010585b: 74 63 je 801058c0 <sys_chdir+0xa0>
end_op();
return -1;
}
ilock(ip);
8010585d: 83 ec 0c sub $0xc,%esp
80105860: 50 push %eax
80105861: e8 0a be ff ff call 80101670 <ilock>
if(ip->type != T_DIR){
80105866: 83 c4 10 add $0x10,%esp
80105869: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx)
8010586e: 75 30 jne 801058a0 <sys_chdir+0x80>
iunlockput(ip);
end_op();
return -1;
}
iunlock(ip);
80105870: 83 ec 0c sub $0xc,%esp
80105873: 53 push %ebx
80105874: e8 d7 be ff ff call 80101750 <iunlock>
iput(curproc->cwd);
80105879: 58 pop %eax
8010587a: ff 76 68 pushl 0x68(%esi)
8010587d: e8 1e bf ff ff call 801017a0 <iput>
end_op();
80105882: e8 39 d3 ff ff call 80102bc0 <end_op>
curproc->cwd = ip;
80105887: 89 5e 68 mov %ebx,0x68(%esi)
return 0;
8010588a: 83 c4 10 add $0x10,%esp
8010588d: 31 c0 xor %eax,%eax
}
8010588f: 8d 65 f8 lea -0x8(%ebp),%esp
80105892: 5b pop %ebx
80105893: 5e pop %esi
80105894: 5d pop %ebp
80105895: c3 ret
80105896: 8d 76 00 lea 0x0(%esi),%esi
80105899: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
end_op();
return -1;
}
ilock(ip);
if(ip->type != T_DIR){
iunlockput(ip);
801058a0: 83 ec 0c sub $0xc,%esp
801058a3: 53 push %ebx
801058a4: e8 57 c0 ff ff call 80101900 <iunlockput>
end_op();
801058a9: e8 12 d3 ff ff call 80102bc0 <end_op>
return -1;
801058ae: 83 c4 10 add $0x10,%esp
801058b1: b8 ff ff ff ff mov $0xffffffff,%eax
801058b6: eb d7 jmp 8010588f <sys_chdir+0x6f>
801058b8: 90 nop
801058b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
struct inode *ip;
struct proc *curproc = myproc();
begin_op();
if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){
end_op();
801058c0: e8 fb d2 ff ff call 80102bc0 <end_op>
return -1;
801058c5: b8 ff ff ff ff mov $0xffffffff,%eax
801058ca: eb c3 jmp 8010588f <sys_chdir+0x6f>
801058cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801058d0 <sys_exec>:
return 0;
}
int
sys_exec(void)
{
801058d0: 55 push %ebp
801058d1: 89 e5 mov %esp,%ebp
801058d3: 57 push %edi
801058d4: 56 push %esi
801058d5: 53 push %ebx
char *path, *argv[MAXARG];
int i;
uint uargv, uarg;
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
801058d6: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax
return 0;
}
int
sys_exec(void)
{
801058dc: 81 ec a4 00 00 00 sub $0xa4,%esp
char *path, *argv[MAXARG];
int i;
uint uargv, uarg;
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
801058e2: 50 push %eax
801058e3: 6a 00 push $0x0
801058e5: e8 06 f5 ff ff call 80104df0 <argstr>
801058ea: 83 c4 10 add $0x10,%esp
801058ed: 85 c0 test %eax,%eax
801058ef: 78 7f js 80105970 <sys_exec+0xa0>
801058f1: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax
801058f7: 83 ec 08 sub $0x8,%esp
801058fa: 50 push %eax
801058fb: 6a 01 push $0x1
801058fd: e8 3e f4 ff ff call 80104d40 <argint>
80105902: 83 c4 10 add $0x10,%esp
80105905: 85 c0 test %eax,%eax
80105907: 78 67 js 80105970 <sys_exec+0xa0>
return -1;
}
memset(argv, 0, sizeof(argv));
80105909: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
8010590f: 83 ec 04 sub $0x4,%esp
80105912: 8d b5 68 ff ff ff lea -0x98(%ebp),%esi
80105918: 68 80 00 00 00 push $0x80
8010591d: 6a 00 push $0x0
8010591f: 8d bd 64 ff ff ff lea -0x9c(%ebp),%edi
80105925: 50 push %eax
80105926: 31 db xor %ebx,%ebx
80105928: e8 03 f1 ff ff call 80104a30 <memset>
8010592d: 83 c4 10 add $0x10,%esp
for(i=0;; i++){
if(i >= NELEM(argv))
return -1;
if(fetchint(uargv+4*i, (int*)&uarg) < 0)
80105930: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
80105936: 83 ec 08 sub $0x8,%esp
80105939: 57 push %edi
8010593a: 8d 04 98 lea (%eax,%ebx,4),%eax
8010593d: 50 push %eax
8010593e: e8 5d f3 ff ff call 80104ca0 <fetchint>
80105943: 83 c4 10 add $0x10,%esp
80105946: 85 c0 test %eax,%eax
80105948: 78 26 js 80105970 <sys_exec+0xa0>
return -1;
if(uarg == 0){
8010594a: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
80105950: 85 c0 test %eax,%eax
80105952: 74 2c je 80105980 <sys_exec+0xb0>
argv[i] = 0;
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
80105954: 83 ec 08 sub $0x8,%esp
80105957: 56 push %esi
80105958: 50 push %eax
80105959: e8 82 f3 ff ff call 80104ce0 <fetchstr>
8010595e: 83 c4 10 add $0x10,%esp
80105961: 85 c0 test %eax,%eax
80105963: 78 0b js 80105970 <sys_exec+0xa0>
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
return -1;
}
memset(argv, 0, sizeof(argv));
for(i=0;; i++){
80105965: 83 c3 01 add $0x1,%ebx
80105968: 83 c6 04 add $0x4,%esi
if(i >= NELEM(argv))
8010596b: 83 fb 20 cmp $0x20,%ebx
8010596e: 75 c0 jne 80105930 <sys_exec+0x60>
}
if(fetchstr(uarg, &argv[i]) < 0)
return -1;
}
return exec(path, argv);
}
80105970: 8d 65 f4 lea -0xc(%ebp),%esp
char *path, *argv[MAXARG];
int i;
uint uargv, uarg;
if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){
return -1;
80105973: b8 ff ff ff ff mov $0xffffffff,%eax
}
if(fetchstr(uarg, &argv[i]) < 0)
return -1;
}
return exec(path, argv);
}
80105978: 5b pop %ebx
80105979: 5e pop %esi
8010597a: 5f pop %edi
8010597b: 5d pop %ebp
8010597c: c3 ret
8010597d: 8d 76 00 lea 0x0(%esi),%esi
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
return -1;
}
return exec(path, argv);
80105980: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax
80105986: 83 ec 08 sub $0x8,%esp
if(i >= NELEM(argv))
return -1;
if(fetchint(uargv+4*i, (int*)&uarg) < 0)
return -1;
if(uarg == 0){
argv[i] = 0;
80105989: c7 84 9d 68 ff ff ff movl $0x0,-0x98(%ebp,%ebx,4)
80105990: 00 00 00 00
break;
}
if(fetchstr(uarg, &argv[i]) < 0)
return -1;
}
return exec(path, argv);
80105994: 50 push %eax
80105995: ff b5 5c ff ff ff pushl -0xa4(%ebp)
8010599b: e8 50 b0 ff ff call 801009f0 <exec>
801059a0: 83 c4 10 add $0x10,%esp
}
801059a3: 8d 65 f4 lea -0xc(%ebp),%esp
801059a6: 5b pop %ebx
801059a7: 5e pop %esi
801059a8: 5f pop %edi
801059a9: 5d pop %ebp
801059aa: c3 ret
801059ab: 90 nop
801059ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
801059b0 <sys_pipe>:
int
sys_pipe(void)
{
801059b0: 55 push %ebp
801059b1: 89 e5 mov %esp,%ebp
801059b3: 57 push %edi
801059b4: 56 push %esi
801059b5: 53 push %ebx
int *fd;
struct file *rf, *wf;
int fd0, fd1;
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
801059b6: 8d 45 dc lea -0x24(%ebp),%eax
return exec(path, argv);
}
int
sys_pipe(void)
{
801059b9: 83 ec 20 sub $0x20,%esp
int *fd;
struct file *rf, *wf;
int fd0, fd1;
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
801059bc: 6a 08 push $0x8
801059be: 50 push %eax
801059bf: 6a 00 push $0x0
801059c1: e8 ca f3 ff ff call 80104d90 <argptr>
801059c6: 83 c4 10 add $0x10,%esp
801059c9: 85 c0 test %eax,%eax
801059cb: 78 4a js 80105a17 <sys_pipe+0x67>
return -1;
if(pipealloc(&rf, &wf) < 0)
801059cd: 8d 45 e4 lea -0x1c(%ebp),%eax
801059d0: 83 ec 08 sub $0x8,%esp
801059d3: 50 push %eax
801059d4: 8d 45 e0 lea -0x20(%ebp),%eax
801059d7: 50 push %eax
801059d8: e8 13 d8 ff ff call 801031f0 <pipealloc>
801059dd: 83 c4 10 add $0x10,%esp
801059e0: 85 c0 test %eax,%eax
801059e2: 78 33 js 80105a17 <sys_pipe+0x67>
fdalloc(struct file *f)
{
int fd;
struct proc *curproc = myproc();
for(fd = 0; fd < NOFILE; fd++){
801059e4: 31 db xor %ebx,%ebx
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
return -1;
if(pipealloc(&rf, &wf) < 0)
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
801059e6: 8b 7d e0 mov -0x20(%ebp),%edi
// Takes over file reference from caller on success.
static int
fdalloc(struct file *f)
{
int fd;
struct proc *curproc = myproc();
801059e9: e8 b2 dd ff ff call 801037a0 <myproc>
801059ee: 66 90 xchg %ax,%ax
for(fd = 0; fd < NOFILE; fd++){
if(curproc->ofile[fd] == 0){
801059f0: 8b 74 98 28 mov 0x28(%eax,%ebx,4),%esi
801059f4: 85 f6 test %esi,%esi
801059f6: 74 30 je 80105a28 <sys_pipe+0x78>
fdalloc(struct file *f)
{
int fd;
struct proc *curproc = myproc();
for(fd = 0; fd < NOFILE; fd++){
801059f8: 83 c3 01 add $0x1,%ebx
801059fb: 83 fb 10 cmp $0x10,%ebx
801059fe: 75 f0 jne 801059f0 <sys_pipe+0x40>
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
if(fd0 >= 0)
myproc()->ofile[fd0] = 0;
fileclose(rf);
80105a00: 83 ec 0c sub $0xc,%esp
80105a03: ff 75 e0 pushl -0x20(%ebp)
80105a06: e8 25 b4 ff ff call 80100e30 <fileclose>
fileclose(wf);
80105a0b: 58 pop %eax
80105a0c: ff 75 e4 pushl -0x1c(%ebp)
80105a0f: e8 1c b4 ff ff call 80100e30 <fileclose>
return -1;
80105a14: 83 c4 10 add $0x10,%esp
}
fd[0] = fd0;
fd[1] = fd1;
return 0;
}
80105a17: 8d 65 f4 lea -0xc(%ebp),%esp
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
if(fd0 >= 0)
myproc()->ofile[fd0] = 0;
fileclose(rf);
fileclose(wf);
return -1;
80105a1a: b8 ff ff ff ff mov $0xffffffff,%eax
}
fd[0] = fd0;
fd[1] = fd1;
return 0;
}
80105a1f: 5b pop %ebx
80105a20: 5e pop %esi
80105a21: 5f pop %edi
80105a22: 5d pop %ebp
80105a23: c3 ret
80105a24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
int fd;
struct proc *curproc = myproc();
for(fd = 0; fd < NOFILE; fd++){
if(curproc->ofile[fd] == 0){
curproc->ofile[fd] = f;
80105a28: 8d 73 08 lea 0x8(%ebx),%esi
80105a2b: 89 7c b0 08 mov %edi,0x8(%eax,%esi,4)
if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
return -1;
if(pipealloc(&rf, &wf) < 0)
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
80105a2f: 8b 7d e4 mov -0x1c(%ebp),%edi
// Takes over file reference from caller on success.
static int
fdalloc(struct file *f)
{
int fd;
struct proc *curproc = myproc();
80105a32: e8 69 dd ff ff call 801037a0 <myproc>
for(fd = 0; fd < NOFILE; fd++){
80105a37: 31 d2 xor %edx,%edx
80105a39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(curproc->ofile[fd] == 0){
80105a40: 8b 4c 90 28 mov 0x28(%eax,%edx,4),%ecx
80105a44: 85 c9 test %ecx,%ecx
80105a46: 74 18 je 80105a60 <sys_pipe+0xb0>
fdalloc(struct file *f)
{
int fd;
struct proc *curproc = myproc();
for(fd = 0; fd < NOFILE; fd++){
80105a48: 83 c2 01 add $0x1,%edx
80105a4b: 83 fa 10 cmp $0x10,%edx
80105a4e: 75 f0 jne 80105a40 <sys_pipe+0x90>
if(pipealloc(&rf, &wf) < 0)
return -1;
fd0 = -1;
if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
if(fd0 >= 0)
myproc()->ofile[fd0] = 0;
80105a50: e8 4b dd ff ff call 801037a0 <myproc>
80105a55: c7 44 b0 08 00 00 00 movl $0x0,0x8(%eax,%esi,4)
80105a5c: 00
80105a5d: eb a1 jmp 80105a00 <sys_pipe+0x50>
80105a5f: 90 nop
int fd;
struct proc *curproc = myproc();
for(fd = 0; fd < NOFILE; fd++){
if(curproc->ofile[fd] == 0){
curproc->ofile[fd] = f;
80105a60: 89 7c 90 28 mov %edi,0x28(%eax,%edx,4)
myproc()->ofile[fd0] = 0;
fileclose(rf);
fileclose(wf);
return -1;
}
fd[0] = fd0;
80105a64: 8b 45 dc mov -0x24(%ebp),%eax
80105a67: 89 18 mov %ebx,(%eax)
fd[1] = fd1;
80105a69: 8b 45 dc mov -0x24(%ebp),%eax
80105a6c: 89 50 04 mov %edx,0x4(%eax)
return 0;
}
80105a6f: 8d 65 f4 lea -0xc(%ebp),%esp
fileclose(wf);
return -1;
}
fd[0] = fd0;
fd[1] = fd1;
return 0;
80105a72: 31 c0 xor %eax,%eax
}
80105a74: 5b pop %ebx
80105a75: 5e pop %esi
80105a76: 5f pop %edi
80105a77: 5d pop %ebp
80105a78: c3 ret
80105a79: 66 90 xchg %ax,%ax
80105a7b: 66 90 xchg %ax,%ax
80105a7d: 66 90 xchg %ax,%ax
80105a7f: 90 nop
80105a80 <sys_fork>:
#include "mmu.h"
#include "proc.h"
int
sys_fork(void)
{
80105a80: 55 push %ebp
80105a81: 89 e5 mov %esp,%ebp
return fork();
}
80105a83: 5d pop %ebp
#include "proc.h"
int
sys_fork(void)
{
return fork();
80105a84: e9 b7 de ff ff jmp 80103940 <fork>
80105a89: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105a90 <sys_chpr>:
}
int
sys_chpr (void)
{
80105a90: 55 push %ebp
80105a91: 89 e5 mov %esp,%ebp
80105a93: 83 ec 20 sub $0x20,%esp
int pid, pr;
if(argint(0, &pid) < 0)
80105a96: 8d 45 f0 lea -0x10(%ebp),%eax
80105a99: 50 push %eax
80105a9a: 6a 00 push $0x0
80105a9c: e8 9f f2 ff ff call 80104d40 <argint>
80105aa1: 83 c4 10 add $0x10,%esp
80105aa4: 85 c0 test %eax,%eax
80105aa6: 78 28 js 80105ad0 <sys_chpr+0x40>
return -1;
if(argint(1, &pr) < 0)
80105aa8: 8d 45 f4 lea -0xc(%ebp),%eax
80105aab: 83 ec 08 sub $0x8,%esp
80105aae: 50 push %eax
80105aaf: 6a 01 push $0x1
80105ab1: e8 8a f2 ff ff call 80104d40 <argint>
80105ab6: 83 c4 10 add $0x10,%esp
80105ab9: 85 c0 test %eax,%eax
80105abb: 78 13 js 80105ad0 <sys_chpr+0x40>
return -1;
return chpr ( pid, pr );
80105abd: 83 ec 08 sub $0x8,%esp
80105ac0: ff 75 f4 pushl -0xc(%ebp)
80105ac3: ff 75 f0 pushl -0x10(%ebp)
80105ac6: e8 35 e0 ff ff call 80103b00 <chpr>
80105acb: 83 c4 10 add $0x10,%esp
}
80105ace: c9 leave
80105acf: c3 ret
int
sys_chpr (void)
{
int pid, pr;
if(argint(0, &pid) < 0)
return -1;
80105ad0: b8 ff ff ff ff mov $0xffffffff,%eax
if(argint(1, &pr) < 0)
return -1;
return chpr ( pid, pr );
}
80105ad5: c9 leave
80105ad6: c3 ret
80105ad7: 89 f6 mov %esi,%esi
80105ad9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105ae0 <sys_exit>:
int
sys_exit(void)
{
80105ae0: 55 push %ebp
80105ae1: 89 e5 mov %esp,%ebp
80105ae3: 83 ec 08 sub $0x8,%esp
exit();
80105ae6: e8 05 e2 ff ff call 80103cf0 <exit>
return 0; // not reached
}
80105aeb: 31 c0 xor %eax,%eax
80105aed: c9 leave
80105aee: c3 ret
80105aef: 90 nop
80105af0 <sys_cps>:
int
sys_cps (void)
{
80105af0: 55 push %ebp
80105af1: 89 e5 mov %esp,%ebp
return cps();
}
80105af3: 5d pop %ebp
}
int
sys_cps (void)
{
return cps();
80105af4: e9 67 df ff ff jmp 80103a60 <cps>
80105af9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105b00 <sys_wait>:
}
int
sys_wait(void)
{
80105b00: 55 push %ebp
80105b01: 89 e5 mov %esp,%ebp
return wait();
}
80105b03: 5d pop %ebp
}
int
sys_wait(void)
{
return wait();
80105b04: e9 27 e4 ff ff jmp 80103f30 <wait>
80105b09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80105b10 <sys_kill>:
}
int
sys_kill(void)
{
80105b10: 55 push %ebp
80105b11: 89 e5 mov %esp,%ebp
80105b13: 83 ec 20 sub $0x20,%esp
int pid;
if(argint(0, &pid) < 0)
80105b16: 8d 45 f4 lea -0xc(%ebp),%eax
80105b19: 50 push %eax
80105b1a: 6a 00 push $0x0
80105b1c: e8 1f f2 ff ff call 80104d40 <argint>
80105b21: 83 c4 10 add $0x10,%esp
80105b24: 85 c0 test %eax,%eax
80105b26: 78 18 js 80105b40 <sys_kill+0x30>
return -1;
return kill(pid);
80105b28: 83 ec 0c sub $0xc,%esp
80105b2b: ff 75 f4 pushl -0xc(%ebp)
80105b2e: e8 5d e5 ff ff call 80104090 <kill>
80105b33: 83 c4 10 add $0x10,%esp
}
80105b36: c9 leave
80105b37: c3 ret
80105b38: 90 nop
80105b39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
sys_kill(void)
{
int pid;
if(argint(0, &pid) < 0)
return -1;
80105b40: b8 ff ff ff ff mov $0xffffffff,%eax
return kill(pid);
}
80105b45: c9 leave
80105b46: c3 ret
80105b47: 89 f6 mov %esi,%esi
80105b49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105b50 <sys_getpid>:
int
sys_getpid(void)
{
80105b50: 55 push %ebp
80105b51: 89 e5 mov %esp,%ebp
80105b53: 83 ec 08 sub $0x8,%esp
return myproc()->pid;
80105b56: e8 45 dc ff ff call 801037a0 <myproc>
80105b5b: 8b 40 10 mov 0x10(%eax),%eax
}
80105b5e: c9 leave
80105b5f: c3 ret
80105b60 <sys_sbrk>:
int
sys_sbrk(void)
{
80105b60: 55 push %ebp
80105b61: 89 e5 mov %esp,%ebp
80105b63: 53 push %ebx
int addr;
int n;
if(argint(0, &n) < 0)
80105b64: 8d 45 f4 lea -0xc(%ebp),%eax
return myproc()->pid;
}
int
sys_sbrk(void)
{
80105b67: 83 ec 1c sub $0x1c,%esp
int addr;
int n;
if(argint(0, &n) < 0)
80105b6a: 50 push %eax
80105b6b: 6a 00 push $0x0
80105b6d: e8 ce f1 ff ff call 80104d40 <argint>
80105b72: 83 c4 10 add $0x10,%esp
80105b75: 85 c0 test %eax,%eax
80105b77: 78 27 js 80105ba0 <sys_sbrk+0x40>
return -1;
addr = myproc()->sz;
80105b79: e8 22 dc ff ff call 801037a0 <myproc>
if(growproc(n) < 0)
80105b7e: 83 ec 0c sub $0xc,%esp
int addr;
int n;
if(argint(0, &n) < 0)
return -1;
addr = myproc()->sz;
80105b81: 8b 18 mov (%eax),%ebx
if(growproc(n) < 0)
80105b83: ff 75 f4 pushl -0xc(%ebp)
80105b86: e8 35 dd ff ff call 801038c0 <growproc>
80105b8b: 83 c4 10 add $0x10,%esp
80105b8e: 85 c0 test %eax,%eax
80105b90: 78 0e js 80105ba0 <sys_sbrk+0x40>
return -1;
return addr;
80105b92: 89 d8 mov %ebx,%eax
}
80105b94: 8b 5d fc mov -0x4(%ebp),%ebx
80105b97: c9 leave
80105b98: c3 ret
80105b99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
{
int addr;
int n;
if(argint(0, &n) < 0)
return -1;
80105ba0: b8 ff ff ff ff mov $0xffffffff,%eax
80105ba5: eb ed jmp 80105b94 <sys_sbrk+0x34>
80105ba7: 89 f6 mov %esi,%esi
80105ba9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105bb0 <sys_sleep>:
return addr;
}
int
sys_sleep(void)
{
80105bb0: 55 push %ebp
80105bb1: 89 e5 mov %esp,%ebp
80105bb3: 53 push %ebx
int n;
uint ticks0;
if(argint(0, &n) < 0)
80105bb4: 8d 45 f4 lea -0xc(%ebp),%eax
return addr;
}
int
sys_sleep(void)
{
80105bb7: 83 ec 1c sub $0x1c,%esp
int n;
uint ticks0;
if(argint(0, &n) < 0)
80105bba: 50 push %eax
80105bbb: 6a 00 push $0x0
80105bbd: e8 7e f1 ff ff call 80104d40 <argint>
80105bc2: 83 c4 10 add $0x10,%esp
80105bc5: 85 c0 test %eax,%eax
80105bc7: 0f 88 8a 00 00 00 js 80105c57 <sys_sleep+0xa7>
return -1;
acquire(&tickslock);
80105bcd: 83 ec 0c sub $0xc,%esp
80105bd0: 68 60 5f 11 80 push $0x80115f60
80105bd5: e8 e6 ec ff ff call 801048c0 <acquire>
ticks0 = ticks;
while(ticks - ticks0 < n){
80105bda: 8b 55 f4 mov -0xc(%ebp),%edx
80105bdd: 83 c4 10 add $0x10,%esp
uint ticks0;
if(argint(0, &n) < 0)
return -1;
acquire(&tickslock);
ticks0 = ticks;
80105be0: 8b 1d a0 67 11 80 mov 0x801167a0,%ebx
while(ticks - ticks0 < n){
80105be6: 85 d2 test %edx,%edx
80105be8: 75 27 jne 80105c11 <sys_sleep+0x61>
80105bea: eb 54 jmp 80105c40 <sys_sleep+0x90>
80105bec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(myproc()->killed){
release(&tickslock);
return -1;
}
sleep(&ticks, &tickslock);
80105bf0: 83 ec 08 sub $0x8,%esp
80105bf3: 68 60 5f 11 80 push $0x80115f60
80105bf8: 68 a0 67 11 80 push $0x801167a0
80105bfd: e8 6e e2 ff ff call 80103e70 <sleep>
if(argint(0, &n) < 0)
return -1;
acquire(&tickslock);
ticks0 = ticks;
while(ticks - ticks0 < n){
80105c02: a1 a0 67 11 80 mov 0x801167a0,%eax
80105c07: 83 c4 10 add $0x10,%esp
80105c0a: 29 d8 sub %ebx,%eax
80105c0c: 3b 45 f4 cmp -0xc(%ebp),%eax
80105c0f: 73 2f jae 80105c40 <sys_sleep+0x90>
if(myproc()->killed){
80105c11: e8 8a db ff ff call 801037a0 <myproc>
80105c16: 8b 40 24 mov 0x24(%eax),%eax
80105c19: 85 c0 test %eax,%eax
80105c1b: 74 d3 je 80105bf0 <sys_sleep+0x40>
release(&tickslock);
80105c1d: 83 ec 0c sub $0xc,%esp
80105c20: 68 60 5f 11 80 push $0x80115f60
80105c25: e8 b6 ed ff ff call 801049e0 <release>
return -1;
80105c2a: 83 c4 10 add $0x10,%esp
80105c2d: b8 ff ff ff ff mov $0xffffffff,%eax
}
sleep(&ticks, &tickslock);
}
release(&tickslock);
return 0;
}
80105c32: 8b 5d fc mov -0x4(%ebp),%ebx
80105c35: c9 leave
80105c36: c3 ret
80105c37: 89 f6 mov %esi,%esi
80105c39: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
release(&tickslock);
return -1;
}
sleep(&ticks, &tickslock);
}
release(&tickslock);
80105c40: 83 ec 0c sub $0xc,%esp
80105c43: 68 60 5f 11 80 push $0x80115f60
80105c48: e8 93 ed ff ff call 801049e0 <release>
return 0;
80105c4d: 83 c4 10 add $0x10,%esp
80105c50: 31 c0 xor %eax,%eax
}
80105c52: 8b 5d fc mov -0x4(%ebp),%ebx
80105c55: c9 leave
80105c56: c3 ret
{
int n;
uint ticks0;
if(argint(0, &n) < 0)
return -1;
80105c57: b8 ff ff ff ff mov $0xffffffff,%eax
80105c5c: eb d4 jmp 80105c32 <sys_sleep+0x82>
80105c5e: 66 90 xchg %ax,%ax
80105c60 <sys_uptime>:
// return how many clock tick interrupts have occurred
// since start.
int
sys_uptime(void)
{
80105c60: 55 push %ebp
80105c61: 89 e5 mov %esp,%ebp
80105c63: 53 push %ebx
80105c64: 83 ec 10 sub $0x10,%esp
uint xticks;
acquire(&tickslock);
80105c67: 68 60 5f 11 80 push $0x80115f60
80105c6c: e8 4f ec ff ff call 801048c0 <acquire>
xticks = ticks;
80105c71: 8b 1d a0 67 11 80 mov 0x801167a0,%ebx
release(&tickslock);
80105c77: c7 04 24 60 5f 11 80 movl $0x80115f60,(%esp)
80105c7e: e8 5d ed ff ff call 801049e0 <release>
return xticks;
}
80105c83: 89 d8 mov %ebx,%eax
80105c85: 8b 5d fc mov -0x4(%ebp),%ebx
80105c88: c9 leave
80105c89: c3 ret
80105c8a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80105c90 <sys_thread_create>:
int
sys_thread_create(void)
{
80105c90: 55 push %ebp
80105c91: 89 e5 mov %esp,%ebp
80105c93: 83 ec 1c sub $0x1c,%esp
void (* fcn)(void *);
void *arg, *stack;
int ret;
ret = -1;
if (argptr(0, (void *)&fcn, sizeof(fcn) < 0)) return ret;
80105c96: 8d 45 ec lea -0x14(%ebp),%eax
80105c99: 6a 00 push $0x0
80105c9b: 50 push %eax
80105c9c: 6a 00 push $0x0
80105c9e: e8 ed f0 ff ff call 80104d90 <argptr>
80105ca3: 83 c4 10 add $0x10,%esp
80105ca6: 85 c0 test %eax,%eax
80105ca8: 75 46 jne 80105cf0 <sys_thread_create+0x60>
if (argptr(1, (void *)&arg, sizeof(arg) < 0)) return ret;
80105caa: 8d 45 f0 lea -0x10(%ebp),%eax
80105cad: 83 ec 04 sub $0x4,%esp
80105cb0: 6a 00 push $0x0
80105cb2: 50 push %eax
80105cb3: 6a 01 push $0x1
80105cb5: e8 d6 f0 ff ff call 80104d90 <argptr>
80105cba: 83 c4 10 add $0x10,%esp
80105cbd: 85 c0 test %eax,%eax
80105cbf: 75 2f jne 80105cf0 <sys_thread_create+0x60>
if (argptr(2, (void *)&stack, sizeof(stack) < 0)) return ret;
80105cc1: 8d 45 f4 lea -0xc(%ebp),%eax
80105cc4: 83 ec 04 sub $0x4,%esp
80105cc7: 6a 00 push $0x0
80105cc9: 50 push %eax
80105cca: 6a 02 push $0x2
80105ccc: e8 bf f0 ff ff call 80104d90 <argptr>
80105cd1: 83 c4 10 add $0x10,%esp
80105cd4: 85 c0 test %eax,%eax
80105cd6: 75 18 jne 80105cf0 <sys_thread_create+0x60>
ret = clone((void *)(fcn), (void *)arg, (void *)stack);
80105cd8: 83 ec 04 sub $0x4,%esp
80105cdb: ff 75 f4 pushl -0xc(%ebp)
80105cde: ff 75 f0 pushl -0x10(%ebp)
80105ce1: ff 75 ec pushl -0x14(%ebp)
80105ce4: e8 f7 e4 ff ff call 801041e0 <clone>
return ret;
80105ce9: 83 c4 10 add $0x10,%esp
}
80105cec: c9 leave
80105ced: c3 ret
80105cee: 66 90 xchg %ax,%ax
{
void (* fcn)(void *);
void *arg, *stack;
int ret;
ret = -1;
if (argptr(0, (void *)&fcn, sizeof(fcn) < 0)) return ret;
80105cf0: b8 ff ff ff ff mov $0xffffffff,%eax
if (argptr(1, (void *)&arg, sizeof(arg) < 0)) return ret;
if (argptr(2, (void *)&stack, sizeof(stack) < 0)) return ret;
ret = clone((void *)(fcn), (void *)arg, (void *)stack);
return ret;
}
80105cf5: c9 leave
80105cf6: c3 ret
80105cf7: 89 f6 mov %esi,%esi
80105cf9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105d00 <sys_thread_exit>:
int
sys_thread_exit(void)
{
80105d00: 55 push %ebp
80105d01: 89 e5 mov %esp,%ebp
80105d03: 83 ec 1c sub $0x1c,%esp
void *retval;
if (argptr(0, (void *)&retval, sizeof(retval) < 0)) return -1;
80105d06: 8d 45 f4 lea -0xc(%ebp),%eax
80105d09: 6a 00 push $0x0
80105d0b: 50 push %eax
80105d0c: 6a 00 push $0x0
80105d0e: e8 7d f0 ff ff call 80104d90 <argptr>
80105d13: 83 c4 10 add $0x10,%esp
80105d16: 85 c0 test %eax,%eax
80105d18: 75 16 jne 80105d30 <sys_thread_exit+0x30>
thread_exit(retval);
80105d1a: 83 ec 0c sub $0xc,%esp
80105d1d: ff 75 f4 pushl -0xc(%ebp)
80105d20: e8 5b e6 ff ff call 80104380 <thread_exit>
return 1;
80105d25: 83 c4 10 add $0x10,%esp
80105d28: b8 01 00 00 00 mov $0x1,%eax
}
80105d2d: c9 leave
80105d2e: c3 ret
80105d2f: 90 nop
int
sys_thread_exit(void)
{
void *retval;
if (argptr(0, (void *)&retval, sizeof(retval) < 0)) return -1;
80105d30: b8 ff ff ff ff mov $0xffffffff,%eax
thread_exit(retval);
return 1;
}
80105d35: c9 leave
80105d36: c3 ret
80105d37: 89 f6 mov %esi,%esi
80105d39: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105d40 <sys_thread_join>:
int
sys_thread_join(void)
{
80105d40: 55 push %ebp
80105d41: 89 e5 mov %esp,%ebp
80105d43: 83 ec 1c sub $0x1c,%esp
int tid;
void **retval;
if (argptr(0, (void *)&tid, sizeof(tid) < 0)) return -1;
80105d46: 8d 45 f0 lea -0x10(%ebp),%eax
80105d49: 6a 00 push $0x0
80105d4b: 50 push %eax
80105d4c: 6a 00 push $0x0
80105d4e: e8 3d f0 ff ff call 80104d90 <argptr>
80105d53: 83 c4 10 add $0x10,%esp
80105d56: 85 c0 test %eax,%eax
80105d58: 75 2e jne 80105d88 <sys_thread_join+0x48>
if (argint(1, (int*)&retval) < 0) return -1;
80105d5a: 8d 45 f4 lea -0xc(%ebp),%eax
80105d5d: 83 ec 08 sub $0x8,%esp
80105d60: 50 push %eax
80105d61: 6a 01 push $0x1
80105d63: e8 d8 ef ff ff call 80104d40 <argint>
80105d68: 83 c4 10 add $0x10,%esp
80105d6b: 85 c0 test %eax,%eax
80105d6d: 78 19 js 80105d88 <sys_thread_join+0x48>
return thread_join(tid, retval);
80105d6f: 83 ec 08 sub $0x8,%esp
80105d72: ff 75 f4 pushl -0xc(%ebp)
80105d75: ff 75 f0 pushl -0x10(%ebp)
80105d78: e8 b3 e7 ff ff call 80104530 <thread_join>
80105d7d: 83 c4 10 add $0x10,%esp
}
80105d80: c9 leave
80105d81: c3 ret
80105d82: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
int
sys_thread_join(void)
{
int tid;
void **retval;
if (argptr(0, (void *)&tid, sizeof(tid) < 0)) return -1;
80105d88: b8 ff ff ff ff mov $0xffffffff,%eax
if (argint(1, (int*)&retval) < 0) return -1;
return thread_join(tid, retval);
}
80105d8d: c9 leave
80105d8e: c3 ret
80105d8f: 90 nop
80105d90 <sys_gettid>:
int
sys_gettid(void)
{
80105d90: 55 push %ebp
80105d91: 89 e5 mov %esp,%ebp
return gettid();
}
80105d93: 5d pop %ebp
}
int
sys_gettid(void)
{
return gettid();
80105d94: e9 e7 e8 ff ff jmp 80104680 <gettid>
80105d99 <alltraps>:
80105d99: 1e push %ds
80105d9a: 06 push %es
80105d9b: 0f a0 push %fs
80105d9d: 0f a8 push %gs
80105d9f: 60 pusha
80105da0: 66 b8 10 00 mov $0x10,%ax
80105da4: 8e d8 mov %eax,%ds
80105da6: 8e c0 mov %eax,%es
80105da8: 54 push %esp
80105da9: e8 e2 00 00 00 call 80105e90 <trap>
80105dae: 83 c4 04 add $0x4,%esp
80105db1 <trapret>:
80105db1: 61 popa
80105db2: 0f a9 pop %gs
80105db4: 0f a1 pop %fs
80105db6: 07 pop %es
80105db7: 1f pop %ds
80105db8: 83 c4 08 add $0x8,%esp
80105dbb: cf iret
80105dbc: 66 90 xchg %ax,%ax
80105dbe: 66 90 xchg %ax,%ax
80105dc0 <tvinit>:
void
tvinit(void)
{
int i;
for(i = 0; i < 256; i++)
80105dc0: 31 c0 xor %eax,%eax
80105dc2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
80105dc8: 8b 14 85 08 b0 10 80 mov -0x7fef4ff8(,%eax,4),%edx
80105dcf: b9 08 00 00 00 mov $0x8,%ecx
80105dd4: c6 04 c5 a4 5f 11 80 movb $0x0,-0x7feea05c(,%eax,8)
80105ddb: 00
80105ddc: 66 89 0c c5 a2 5f 11 mov %cx,-0x7feea05e(,%eax,8)
80105de3: 80
80105de4: c6 04 c5 a5 5f 11 80 movb $0x8e,-0x7feea05b(,%eax,8)
80105deb: 8e
80105dec: 66 89 14 c5 a0 5f 11 mov %dx,-0x7feea060(,%eax,8)
80105df3: 80
80105df4: c1 ea 10 shr $0x10,%edx
80105df7: 66 89 14 c5 a6 5f 11 mov %dx,-0x7feea05a(,%eax,8)
80105dfe: 80
void
tvinit(void)
{
int i;
for(i = 0; i < 256; i++)
80105dff: 83 c0 01 add $0x1,%eax
80105e02: 3d 00 01 00 00 cmp $0x100,%eax
80105e07: 75 bf jne 80105dc8 <tvinit+0x8>
struct spinlock tickslock;
uint ticks;
void
tvinit(void)
{
80105e09: 55 push %ebp
int i;
for(i = 0; i < 256; i++)
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80105e0a: ba 08 00 00 00 mov $0x8,%edx
struct spinlock tickslock;
uint ticks;
void
tvinit(void)
{
80105e0f: 89 e5 mov %esp,%ebp
80105e11: 83 ec 10 sub $0x10,%esp
int i;
for(i = 0; i < 256; i++)
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80105e14: a1 08 b1 10 80 mov 0x8010b108,%eax
initlock(&tickslock, "time");
80105e19: 68 4d 7e 10 80 push $0x80107e4d
80105e1e: 68 60 5f 11 80 push $0x80115f60
{
int i;
for(i = 0; i < 256; i++)
SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0);
SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER);
80105e23: 66 89 15 a2 61 11 80 mov %dx,0x801161a2
80105e2a: c6 05 a4 61 11 80 00 movb $0x0,0x801161a4
80105e31: 66 a3 a0 61 11 80 mov %ax,0x801161a0
80105e37: c1 e8 10 shr $0x10,%eax
80105e3a: c6 05 a5 61 11 80 ef movb $0xef,0x801161a5
80105e41: 66 a3 a6 61 11 80 mov %ax,0x801161a6
initlock(&tickslock, "time");
80105e47: e8 74 e9 ff ff call 801047c0 <initlock>
}
80105e4c: 83 c4 10 add $0x10,%esp
80105e4f: c9 leave
80105e50: c3 ret
80105e51: eb 0d jmp 80105e60 <idtinit>
80105e53: 90 nop
80105e54: 90 nop
80105e55: 90 nop
80105e56: 90 nop
80105e57: 90 nop
80105e58: 90 nop
80105e59: 90 nop
80105e5a: 90 nop
80105e5b: 90 nop
80105e5c: 90 nop
80105e5d: 90 nop
80105e5e: 90 nop
80105e5f: 90 nop
80105e60 <idtinit>:
void
idtinit(void)
{
80105e60: 55 push %ebp
static inline void
lidt(struct gatedesc *p, int size)
{
volatile ushort pd[3];
pd[0] = size-1;
80105e61: b8 ff 07 00 00 mov $0x7ff,%eax
80105e66: 89 e5 mov %esp,%ebp
80105e68: 83 ec 10 sub $0x10,%esp
80105e6b: 66 89 45 fa mov %ax,-0x6(%ebp)
pd[1] = (uint)p;
80105e6f: b8 a0 5f 11 80 mov $0x80115fa0,%eax
80105e74: 66 89 45 fc mov %ax,-0x4(%ebp)
pd[2] = (uint)p >> 16;
80105e78: c1 e8 10 shr $0x10,%eax
80105e7b: 66 89 45 fe mov %ax,-0x2(%ebp)
asm volatile("lidt (%0)" : : "r" (pd));
80105e7f: 8d 45 fa lea -0x6(%ebp),%eax
80105e82: 0f 01 18 lidtl (%eax)
lidt(idt, sizeof(idt));
}
80105e85: c9 leave
80105e86: c3 ret
80105e87: 89 f6 mov %esi,%esi
80105e89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80105e90 <trap>:
void
trap(struct trapframe *tf)
{
80105e90: 55 push %ebp
80105e91: 89 e5 mov %esp,%ebp
80105e93: 57 push %edi
80105e94: 56 push %esi
80105e95: 53 push %ebx
80105e96: 83 ec 1c sub $0x1c,%esp
80105e99: 8b 7d 08 mov 0x8(%ebp),%edi
if(tf->trapno == T_SYSCALL){
80105e9c: 8b 47 30 mov 0x30(%edi),%eax
80105e9f: 83 f8 40 cmp $0x40,%eax
80105ea2: 0f 84 88 01 00 00 je 80106030 <trap+0x1a0>
if(myproc()->killed)
exit();
return;
}
switch(tf->trapno){
80105ea8: 83 e8 20 sub $0x20,%eax
80105eab: 83 f8 1f cmp $0x1f,%eax
80105eae: 77 10 ja 80105ec0 <trap+0x30>
80105eb0: ff 24 85 f4 7e 10 80 jmp *-0x7fef810c(,%eax,4)
80105eb7: 89 f6 mov %esi,%esi
80105eb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
cpuid(), tf->cs, tf->eip);
lapiceoi();
break;
default:
if(myproc() == 0 || (tf->cs&3) == 0){
80105ec0: e8 db d8 ff ff call 801037a0 <myproc>
80105ec5: 85 c0 test %eax,%eax
80105ec7: 0f 84 d7 01 00 00 je 801060a4 <trap+0x214>
80105ecd: f6 47 3c 03 testb $0x3,0x3c(%edi)
80105ed1: 0f 84 cd 01 00 00 je 801060a4 <trap+0x214>
static inline uint
rcr2(void)
{
uint val;
asm volatile("movl %%cr2,%0" : "=r" (val));
80105ed7: 0f 20 d1 mov %cr2,%ecx
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 "
80105eda: 8b 57 38 mov 0x38(%edi),%edx
80105edd: 89 4d d8 mov %ecx,-0x28(%ebp)
80105ee0: 89 55 dc mov %edx,-0x24(%ebp)
80105ee3: e8 98 d8 ff ff call 80103780 <cpuid>
80105ee8: 8b 77 34 mov 0x34(%edi),%esi
80105eeb: 8b 5f 30 mov 0x30(%edi),%ebx
80105eee: 89 45 e4 mov %eax,-0x1c(%ebp)
"eip 0x%x addr 0x%x--kill proc\n",
myproc()->pid, myproc()->name, tf->trapno,
80105ef1: e8 aa d8 ff ff call 801037a0 <myproc>
80105ef6: 89 45 e0 mov %eax,-0x20(%ebp)
80105ef9: e8 a2 d8 ff ff call 801037a0 <myproc>
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 "
80105efe: 8b 4d d8 mov -0x28(%ebp),%ecx
80105f01: 8b 55 dc mov -0x24(%ebp),%edx
80105f04: 51 push %ecx
80105f05: 52 push %edx
"eip 0x%x addr 0x%x--kill proc\n",
myproc()->pid, myproc()->name, tf->trapno,
80105f06: 8b 55 e0 mov -0x20(%ebp),%edx
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 "
80105f09: ff 75 e4 pushl -0x1c(%ebp)
80105f0c: 56 push %esi
80105f0d: 53 push %ebx
"eip 0x%x addr 0x%x--kill proc\n",
myproc()->pid, myproc()->name, tf->trapno,
80105f0e: 83 c2 6c add $0x6c,%edx
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 "
80105f11: 52 push %edx
80105f12: ff 70 10 pushl 0x10(%eax)
80105f15: 68 b0 7e 10 80 push $0x80107eb0
80105f1a: e8 41 a7 ff ff call 80100660 <cprintf>
"eip 0x%x addr 0x%x--kill proc\n",
myproc()->pid, myproc()->name, tf->trapno,
tf->err, cpuid(), tf->eip, rcr2());
myproc()->killed = 1;
80105f1f: 83 c4 20 add $0x20,%esp
80105f22: e8 79 d8 ff ff call 801037a0 <myproc>
80105f27: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax)
80105f2e: 66 90 xchg %ax,%ax
}
// 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)
80105f30: e8 6b d8 ff ff call 801037a0 <myproc>
80105f35: 85 c0 test %eax,%eax
80105f37: 74 0c je 80105f45 <trap+0xb5>
80105f39: e8 62 d8 ff ff call 801037a0 <myproc>
80105f3e: 8b 50 24 mov 0x24(%eax),%edx
80105f41: 85 d2 test %edx,%edx
80105f43: 75 4b jne 80105f90 <trap+0x100>
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 &&
80105f45: e8 56 d8 ff ff call 801037a0 <myproc>
80105f4a: 85 c0 test %eax,%eax
80105f4c: 74 0b je 80105f59 <trap+0xc9>
80105f4e: e8 4d d8 ff ff call 801037a0 <myproc>
80105f53: 83 78 0c 04 cmpl $0x4,0xc(%eax)
80105f57: 74 4f je 80105fa8 <trap+0x118>
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)
80105f59: e8 42 d8 ff ff call 801037a0 <myproc>
80105f5e: 85 c0 test %eax,%eax
80105f60: 74 1d je 80105f7f <trap+0xef>
80105f62: e8 39 d8 ff ff call 801037a0 <myproc>
80105f67: 8b 40 24 mov 0x24(%eax),%eax
80105f6a: 85 c0 test %eax,%eax
80105f6c: 74 11 je 80105f7f <trap+0xef>
80105f6e: 0f b7 47 3c movzwl 0x3c(%edi),%eax
80105f72: 83 e0 03 and $0x3,%eax
80105f75: 66 83 f8 03 cmp $0x3,%ax
80105f79: 0f 84 da 00 00 00 je 80106059 <trap+0x1c9>
exit();
}
80105f7f: 8d 65 f4 lea -0xc(%ebp),%esp
80105f82: 5b pop %ebx
80105f83: 5e pop %esi
80105f84: 5f pop %edi
80105f85: 5d pop %ebp
80105f86: c3 ret
80105f87: 89 f6 mov %esi,%esi
80105f89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
}
// 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)
80105f90: 0f b7 47 3c movzwl 0x3c(%edi),%eax
80105f94: 83 e0 03 and $0x3,%eax
80105f97: 66 83 f8 03 cmp $0x3,%ax
80105f9b: 75 a8 jne 80105f45 <trap+0xb5>
exit();
80105f9d: e8 4e dd ff ff call 80103cf0 <exit>
80105fa2: eb a1 jmp 80105f45 <trap+0xb5>
80105fa4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
// 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 &&
80105fa8: 83 7f 30 20 cmpl $0x20,0x30(%edi)
80105fac: 75 ab jne 80105f59 <trap+0xc9>
tf->trapno == T_IRQ0+IRQ_TIMER)
yield();
80105fae: e8 6d de ff ff call 80103e20 <yield>
80105fb3: eb a4 jmp 80105f59 <trap+0xc9>
80105fb5: 8d 76 00 lea 0x0(%esi),%esi
return;
}
switch(tf->trapno){
case T_IRQ0 + IRQ_TIMER:
if(cpuid() == 0){
80105fb8: e8 c3 d7 ff ff call 80103780 <cpuid>
80105fbd: 85 c0 test %eax,%eax
80105fbf: 0f 84 ab 00 00 00 je 80106070 <trap+0x1e0>
}
lapiceoi();
break;
case T_IRQ0 + IRQ_IDE:
ideintr();
lapiceoi();
80105fc5: e8 46 c7 ff ff call 80102710 <lapiceoi>
break;
80105fca: e9 61 ff ff ff jmp 80105f30 <trap+0xa0>
80105fcf: 90 nop
case T_IRQ0 + IRQ_IDE+1:
// Bochs generates spurious IDE1 interrupts.
break;
case T_IRQ0 + IRQ_KBD:
kbdintr();
80105fd0: e8 fb c5 ff ff call 801025d0 <kbdintr>
lapiceoi();
80105fd5: e8 36 c7 ff ff call 80102710 <lapiceoi>
break;
80105fda: e9 51 ff ff ff jmp 80105f30 <trap+0xa0>
80105fdf: 90 nop
case T_IRQ0 + IRQ_COM1:
uartintr();
80105fe0: e8 5b 02 00 00 call 80106240 <uartintr>
lapiceoi();
80105fe5: e8 26 c7 ff ff call 80102710 <lapiceoi>
break;
80105fea: e9 41 ff ff ff jmp 80105f30 <trap+0xa0>
80105fef: 90 nop
case T_IRQ0 + 7:
case T_IRQ0 + IRQ_SPURIOUS:
cprintf("cpu%d: spurious interrupt at %x:%x\n",
80105ff0: 0f b7 5f 3c movzwl 0x3c(%edi),%ebx
80105ff4: 8b 77 38 mov 0x38(%edi),%esi
80105ff7: e8 84 d7 ff ff call 80103780 <cpuid>
80105ffc: 56 push %esi
80105ffd: 53 push %ebx
80105ffe: 50 push %eax
80105fff: 68 58 7e 10 80 push $0x80107e58
80106004: e8 57 a6 ff ff call 80100660 <cprintf>
cpuid(), tf->cs, tf->eip);
lapiceoi();
80106009: e8 02 c7 ff ff call 80102710 <lapiceoi>
break;
8010600e: 83 c4 10 add $0x10,%esp
80106011: e9 1a ff ff ff jmp 80105f30 <trap+0xa0>
80106016: 8d 76 00 lea 0x0(%esi),%esi
80106019: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
release(&tickslock);
}
lapiceoi();
break;
case T_IRQ0 + IRQ_IDE:
ideintr();
80106020: e8 2b c0 ff ff call 80102050 <ideintr>
80106025: eb 9e jmp 80105fc5 <trap+0x135>
80106027: 89 f6 mov %esi,%esi
80106029: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
void
trap(struct trapframe *tf)
{
if(tf->trapno == T_SYSCALL){
if(myproc()->killed)
80106030: e8 6b d7 ff ff call 801037a0 <myproc>
80106035: 8b 58 24 mov 0x24(%eax),%ebx
80106038: 85 db test %ebx,%ebx
8010603a: 75 2c jne 80106068 <trap+0x1d8>
exit();
myproc()->tf = tf;
8010603c: e8 5f d7 ff ff call 801037a0 <myproc>
80106041: 89 78 18 mov %edi,0x18(%eax)
syscall();
80106044: e8 e7 ed ff ff call 80104e30 <syscall>
if(myproc()->killed)
80106049: e8 52 d7 ff ff call 801037a0 <myproc>
8010604e: 8b 48 24 mov 0x24(%eax),%ecx
80106051: 85 c9 test %ecx,%ecx
80106053: 0f 84 26 ff ff ff je 80105f7f <trap+0xef>
yield();
// Check if the process has been killed since we yielded
if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER)
exit();
}
80106059: 8d 65 f4 lea -0xc(%ebp),%esp
8010605c: 5b pop %ebx
8010605d: 5e pop %esi
8010605e: 5f pop %edi
8010605f: 5d pop %ebp
if(myproc()->killed)
exit();
myproc()->tf = tf;
syscall();
if(myproc()->killed)
exit();
80106060: e9 8b dc ff ff jmp 80103cf0 <exit>
80106065: 8d 76 00 lea 0x0(%esi),%esi
void
trap(struct trapframe *tf)
{
if(tf->trapno == T_SYSCALL){
if(myproc()->killed)
exit();
80106068: e8 83 dc ff ff call 80103cf0 <exit>
8010606d: eb cd jmp 8010603c <trap+0x1ac>
8010606f: 90 nop
}
switch(tf->trapno){
case T_IRQ0 + IRQ_TIMER:
if(cpuid() == 0){
acquire(&tickslock);
80106070: 83 ec 0c sub $0xc,%esp
80106073: 68 60 5f 11 80 push $0x80115f60
80106078: e8 43 e8 ff ff call 801048c0 <acquire>
ticks++;
wakeup(&ticks);
8010607d: c7 04 24 a0 67 11 80 movl $0x801167a0,(%esp)
switch(tf->trapno){
case T_IRQ0 + IRQ_TIMER:
if(cpuid() == 0){
acquire(&tickslock);
ticks++;
80106084: 83 05 a0 67 11 80 01 addl $0x1,0x801167a0
wakeup(&ticks);
8010608b: e8 a0 df ff ff call 80104030 <wakeup>
release(&tickslock);
80106090: c7 04 24 60 5f 11 80 movl $0x80115f60,(%esp)
80106097: e8 44 e9 ff ff call 801049e0 <release>
8010609c: 83 c4 10 add $0x10,%esp
8010609f: e9 21 ff ff ff jmp 80105fc5 <trap+0x135>
801060a4: 0f 20 d6 mov %cr2,%esi
break;
default:
if(myproc() == 0 || (tf->cs&3) == 0){
// In kernel, it must be our mistake.
cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
801060a7: 8b 5f 38 mov 0x38(%edi),%ebx
801060aa: e8 d1 d6 ff ff call 80103780 <cpuid>
801060af: 83 ec 0c sub $0xc,%esp
801060b2: 56 push %esi
801060b3: 53 push %ebx
801060b4: 50 push %eax
801060b5: ff 77 30 pushl 0x30(%edi)
801060b8: 68 7c 7e 10 80 push $0x80107e7c
801060bd: e8 9e a5 ff ff call 80100660 <cprintf>
tf->trapno, cpuid(), tf->eip, rcr2());
panic("trap");
801060c2: 83 c4 14 add $0x14,%esp
801060c5: 68 52 7e 10 80 push $0x80107e52
801060ca: e8 a1 a2 ff ff call 80100370 <panic>
801060cf: 90 nop
801060d0 <uartgetc>:
}
static int
uartgetc(void)
{
if(!uart)
801060d0: a1 bc b5 10 80 mov 0x8010b5bc,%eax
outb(COM1+0, c);
}
static int
uartgetc(void)
{
801060d5: 55 push %ebp
801060d6: 89 e5 mov %esp,%ebp
if(!uart)
801060d8: 85 c0 test %eax,%eax
801060da: 74 1c je 801060f8 <uartgetc+0x28>
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
801060dc: ba fd 03 00 00 mov $0x3fd,%edx
801060e1: ec in (%dx),%al
return -1;
if(!(inb(COM1+5) & 0x01))
801060e2: a8 01 test $0x1,%al
801060e4: 74 12 je 801060f8 <uartgetc+0x28>
801060e6: ba f8 03 00 00 mov $0x3f8,%edx
801060eb: ec in (%dx),%al
return -1;
return inb(COM1+0);
801060ec: 0f b6 c0 movzbl %al,%eax
}
801060ef: 5d pop %ebp
801060f0: c3 ret
801060f1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
static int
uartgetc(void)
{
if(!uart)
return -1;
801060f8: b8 ff ff ff ff mov $0xffffffff,%eax
if(!(inb(COM1+5) & 0x01))
return -1;
return inb(COM1+0);
}
801060fd: 5d pop %ebp
801060fe: c3 ret
801060ff: 90 nop
80106100 <uartputc.part.0>:
for(p="xv6...\n"; *p; p++)
uartputc(*p);
}
void
uartputc(int c)
80106100: 55 push %ebp
80106101: 89 e5 mov %esp,%ebp
80106103: 57 push %edi
80106104: 56 push %esi
80106105: 53 push %ebx
80106106: 89 c7 mov %eax,%edi
80106108: bb 80 00 00 00 mov $0x80,%ebx
8010610d: be fd 03 00 00 mov $0x3fd,%esi
80106112: 83 ec 0c sub $0xc,%esp
80106115: eb 1b jmp 80106132 <uartputc.part.0+0x32>
80106117: 89 f6 mov %esi,%esi
80106119: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
int i;
if(!uart)
return;
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
microdelay(10);
80106120: 83 ec 0c sub $0xc,%esp
80106123: 6a 0a push $0xa
80106125: e8 06 c6 ff ff call 80102730 <microdelay>
{
int i;
if(!uart)
return;
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
8010612a: 83 c4 10 add $0x10,%esp
8010612d: 83 eb 01 sub $0x1,%ebx
80106130: 74 07 je 80106139 <uartputc.part.0+0x39>
80106132: 89 f2 mov %esi,%edx
80106134: ec in (%dx),%al
80106135: a8 20 test $0x20,%al
80106137: 74 e7 je 80106120 <uartputc.part.0+0x20>
}
static inline void
outb(ushort port, uchar data)
{
asm volatile("out %0,%1" : : "a" (data), "d" (port));
80106139: ba f8 03 00 00 mov $0x3f8,%edx
8010613e: 89 f8 mov %edi,%eax
80106140: ee out %al,(%dx)
microdelay(10);
outb(COM1+0, c);
}
80106141: 8d 65 f4 lea -0xc(%ebp),%esp
80106144: 5b pop %ebx
80106145: 5e pop %esi
80106146: 5f pop %edi
80106147: 5d pop %ebp
80106148: c3 ret
80106149: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106150 <uartinit>:
static int uart; // is there a uart?
void
uartinit(void)
{
80106150: 55 push %ebp
80106151: 31 c9 xor %ecx,%ecx
80106153: 89 c8 mov %ecx,%eax
80106155: 89 e5 mov %esp,%ebp
80106157: 57 push %edi
80106158: 56 push %esi
80106159: 53 push %ebx
8010615a: bb fa 03 00 00 mov $0x3fa,%ebx
8010615f: 89 da mov %ebx,%edx
80106161: 83 ec 0c sub $0xc,%esp
80106164: ee out %al,(%dx)
80106165: bf fb 03 00 00 mov $0x3fb,%edi
8010616a: b8 80 ff ff ff mov $0xffffff80,%eax
8010616f: 89 fa mov %edi,%edx
80106171: ee out %al,(%dx)
80106172: b8 0c 00 00 00 mov $0xc,%eax
80106177: ba f8 03 00 00 mov $0x3f8,%edx
8010617c: ee out %al,(%dx)
8010617d: be f9 03 00 00 mov $0x3f9,%esi
80106182: 89 c8 mov %ecx,%eax
80106184: 89 f2 mov %esi,%edx
80106186: ee out %al,(%dx)
80106187: b8 03 00 00 00 mov $0x3,%eax
8010618c: 89 fa mov %edi,%edx
8010618e: ee out %al,(%dx)
8010618f: ba fc 03 00 00 mov $0x3fc,%edx
80106194: 89 c8 mov %ecx,%eax
80106196: ee out %al,(%dx)
80106197: b8 01 00 00 00 mov $0x1,%eax
8010619c: 89 f2 mov %esi,%edx
8010619e: ee out %al,(%dx)
static inline uchar
inb(ushort port)
{
uchar data;
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
8010619f: ba fd 03 00 00 mov $0x3fd,%edx
801061a4: ec in (%dx),%al
outb(COM1+3, 0x03); // Lock divisor, 8 data bits.
outb(COM1+4, 0);
outb(COM1+1, 0x01); // Enable receive interrupts.
// If status is 0xFF, no serial port.
if(inb(COM1+5) == 0xFF)
801061a5: 3c ff cmp $0xff,%al
801061a7: 74 5a je 80106203 <uartinit+0xb3>
return;
uart = 1;
801061a9: c7 05 bc b5 10 80 01 movl $0x1,0x8010b5bc
801061b0: 00 00 00
801061b3: 89 da mov %ebx,%edx
801061b5: ec in (%dx),%al
801061b6: ba f8 03 00 00 mov $0x3f8,%edx
801061bb: ec in (%dx),%al
// Acknowledge pre-existing interrupt conditions;
// enable interrupts.
inb(COM1+2);
inb(COM1+0);
ioapicenable(IRQ_COM1, 0);
801061bc: 83 ec 08 sub $0x8,%esp
801061bf: bb 74 7f 10 80 mov $0x80107f74,%ebx
801061c4: 6a 00 push $0x0
801061c6: 6a 04 push $0x4
801061c8: e8 d3 c0 ff ff call 801022a0 <ioapicenable>
801061cd: 83 c4 10 add $0x10,%esp
801061d0: b8 78 00 00 00 mov $0x78,%eax
801061d5: eb 13 jmp 801061ea <uartinit+0x9a>
801061d7: 89 f6 mov %esi,%esi
801061d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
// Announce that we're here.
for(p="xv6...\n"; *p; p++)
801061e0: 83 c3 01 add $0x1,%ebx
801061e3: 0f be 03 movsbl (%ebx),%eax
801061e6: 84 c0 test %al,%al
801061e8: 74 19 je 80106203 <uartinit+0xb3>
void
uartputc(int c)
{
int i;
if(!uart)
801061ea: 8b 15 bc b5 10 80 mov 0x8010b5bc,%edx
801061f0: 85 d2 test %edx,%edx
801061f2: 74 ec je 801061e0 <uartinit+0x90>
inb(COM1+2);
inb(COM1+0);
ioapicenable(IRQ_COM1, 0);
// Announce that we're here.
for(p="xv6...\n"; *p; p++)
801061f4: 83 c3 01 add $0x1,%ebx
801061f7: e8 04 ff ff ff call 80106100 <uartputc.part.0>
801061fc: 0f be 03 movsbl (%ebx),%eax
801061ff: 84 c0 test %al,%al
80106201: 75 e7 jne 801061ea <uartinit+0x9a>
uartputc(*p);
}
80106203: 8d 65 f4 lea -0xc(%ebp),%esp
80106206: 5b pop %ebx
80106207: 5e pop %esi
80106208: 5f pop %edi
80106209: 5d pop %ebp
8010620a: c3 ret
8010620b: 90 nop
8010620c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106210 <uartputc>:
void
uartputc(int c)
{
int i;
if(!uart)
80106210: 8b 15 bc b5 10 80 mov 0x8010b5bc,%edx
uartputc(*p);
}
void
uartputc(int c)
{
80106216: 55 push %ebp
80106217: 89 e5 mov %esp,%ebp
int i;
if(!uart)
80106219: 85 d2 test %edx,%edx
uartputc(*p);
}
void
uartputc(int c)
{
8010621b: 8b 45 08 mov 0x8(%ebp),%eax
int i;
if(!uart)
8010621e: 74 10 je 80106230 <uartputc+0x20>
return;
for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++)
microdelay(10);
outb(COM1+0, c);
}
80106220: 5d pop %ebp
80106221: e9 da fe ff ff jmp 80106100 <uartputc.part.0>
80106226: 8d 76 00 lea 0x0(%esi),%esi
80106229: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106230: 5d pop %ebp
80106231: c3 ret
80106232: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106239: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106240 <uartintr>:
return inb(COM1+0);
}
void
uartintr(void)
{
80106240: 55 push %ebp
80106241: 89 e5 mov %esp,%ebp
80106243: 83 ec 14 sub $0x14,%esp
consoleintr(uartgetc);
80106246: 68 d0 60 10 80 push $0x801060d0
8010624b: e8 a0 a5 ff ff call 801007f0 <consoleintr>
}
80106250: 83 c4 10 add $0x10,%esp
80106253: c9 leave
80106254: c3 ret
80106255 <vector0>:
80106255: 6a 00 push $0x0
80106257: 6a 00 push $0x0
80106259: e9 3b fb ff ff jmp 80105d99 <alltraps>
8010625e <vector1>:
8010625e: 6a 00 push $0x0
80106260: 6a 01 push $0x1
80106262: e9 32 fb ff ff jmp 80105d99 <alltraps>
80106267 <vector2>:
80106267: 6a 00 push $0x0
80106269: 6a 02 push $0x2
8010626b: e9 29 fb ff ff jmp 80105d99 <alltraps>
80106270 <vector3>:
80106270: 6a 00 push $0x0
80106272: 6a 03 push $0x3
80106274: e9 20 fb ff ff jmp 80105d99 <alltraps>
80106279 <vector4>:
80106279: 6a 00 push $0x0
8010627b: 6a 04 push $0x4
8010627d: e9 17 fb ff ff jmp 80105d99 <alltraps>
80106282 <vector5>:
80106282: 6a 00 push $0x0
80106284: 6a 05 push $0x5
80106286: e9 0e fb ff ff jmp 80105d99 <alltraps>
8010628b <vector6>:
8010628b: 6a 00 push $0x0
8010628d: 6a 06 push $0x6
8010628f: e9 05 fb ff ff jmp 80105d99 <alltraps>
80106294 <vector7>:
80106294: 6a 00 push $0x0
80106296: 6a 07 push $0x7
80106298: e9 fc fa ff ff jmp 80105d99 <alltraps>
8010629d <vector8>:
8010629d: 6a 08 push $0x8
8010629f: e9 f5 fa ff ff jmp 80105d99 <alltraps>
801062a4 <vector9>:
801062a4: 6a 00 push $0x0
801062a6: 6a 09 push $0x9
801062a8: e9 ec fa ff ff jmp 80105d99 <alltraps>
801062ad <vector10>:
801062ad: 6a 0a push $0xa
801062af: e9 e5 fa ff ff jmp 80105d99 <alltraps>
801062b4 <vector11>:
801062b4: 6a 0b push $0xb
801062b6: e9 de fa ff ff jmp 80105d99 <alltraps>
801062bb <vector12>:
801062bb: 6a 0c push $0xc
801062bd: e9 d7 fa ff ff jmp 80105d99 <alltraps>
801062c2 <vector13>:
801062c2: 6a 0d push $0xd
801062c4: e9 d0 fa ff ff jmp 80105d99 <alltraps>
801062c9 <vector14>:
801062c9: 6a 0e push $0xe
801062cb: e9 c9 fa ff ff jmp 80105d99 <alltraps>
801062d0 <vector15>:
801062d0: 6a 00 push $0x0
801062d2: 6a 0f push $0xf
801062d4: e9 c0 fa ff ff jmp 80105d99 <alltraps>
801062d9 <vector16>:
801062d9: 6a 00 push $0x0
801062db: 6a 10 push $0x10
801062dd: e9 b7 fa ff ff jmp 80105d99 <alltraps>
801062e2 <vector17>:
801062e2: 6a 11 push $0x11
801062e4: e9 b0 fa ff ff jmp 80105d99 <alltraps>
801062e9 <vector18>:
801062e9: 6a 00 push $0x0
801062eb: 6a 12 push $0x12
801062ed: e9 a7 fa ff ff jmp 80105d99 <alltraps>
801062f2 <vector19>:
801062f2: 6a 00 push $0x0
801062f4: 6a 13 push $0x13
801062f6: e9 9e fa ff ff jmp 80105d99 <alltraps>
801062fb <vector20>:
801062fb: 6a 00 push $0x0
801062fd: 6a 14 push $0x14
801062ff: e9 95 fa ff ff jmp 80105d99 <alltraps>
80106304 <vector21>:
80106304: 6a 00 push $0x0
80106306: 6a 15 push $0x15
80106308: e9 8c fa ff ff jmp 80105d99 <alltraps>
8010630d <vector22>:
8010630d: 6a 00 push $0x0
8010630f: 6a 16 push $0x16
80106311: e9 83 fa ff ff jmp 80105d99 <alltraps>
80106316 <vector23>:
80106316: 6a 00 push $0x0
80106318: 6a 17 push $0x17
8010631a: e9 7a fa ff ff jmp 80105d99 <alltraps>
8010631f <vector24>:
8010631f: 6a 00 push $0x0
80106321: 6a 18 push $0x18
80106323: e9 71 fa ff ff jmp 80105d99 <alltraps>
80106328 <vector25>:
80106328: 6a 00 push $0x0
8010632a: 6a 19 push $0x19
8010632c: e9 68 fa ff ff jmp 80105d99 <alltraps>
80106331 <vector26>:
80106331: 6a 00 push $0x0
80106333: 6a 1a push $0x1a
80106335: e9 5f fa ff ff jmp 80105d99 <alltraps>
8010633a <vector27>:
8010633a: 6a 00 push $0x0
8010633c: 6a 1b push $0x1b
8010633e: e9 56 fa ff ff jmp 80105d99 <alltraps>
80106343 <vector28>:
80106343: 6a 00 push $0x0
80106345: 6a 1c push $0x1c
80106347: e9 4d fa ff ff jmp 80105d99 <alltraps>
8010634c <vector29>:
8010634c: 6a 00 push $0x0
8010634e: 6a 1d push $0x1d
80106350: e9 44 fa ff ff jmp 80105d99 <alltraps>
80106355 <vector30>:
80106355: 6a 00 push $0x0
80106357: 6a 1e push $0x1e
80106359: e9 3b fa ff ff jmp 80105d99 <alltraps>
8010635e <vector31>:
8010635e: 6a 00 push $0x0
80106360: 6a 1f push $0x1f
80106362: e9 32 fa ff ff jmp 80105d99 <alltraps>
80106367 <vector32>:
80106367: 6a 00 push $0x0
80106369: 6a 20 push $0x20
8010636b: e9 29 fa ff ff jmp 80105d99 <alltraps>
80106370 <vector33>:
80106370: 6a 00 push $0x0
80106372: 6a 21 push $0x21
80106374: e9 20 fa ff ff jmp 80105d99 <alltraps>
80106379 <vector34>:
80106379: 6a 00 push $0x0
8010637b: 6a 22 push $0x22
8010637d: e9 17 fa ff ff jmp 80105d99 <alltraps>
80106382 <vector35>:
80106382: 6a 00 push $0x0
80106384: 6a 23 push $0x23
80106386: e9 0e fa ff ff jmp 80105d99 <alltraps>
8010638b <vector36>:
8010638b: 6a 00 push $0x0
8010638d: 6a 24 push $0x24
8010638f: e9 05 fa ff ff jmp 80105d99 <alltraps>
80106394 <vector37>:
80106394: 6a 00 push $0x0
80106396: 6a 25 push $0x25
80106398: e9 fc f9 ff ff jmp 80105d99 <alltraps>
8010639d <vector38>:
8010639d: 6a 00 push $0x0
8010639f: 6a 26 push $0x26
801063a1: e9 f3 f9 ff ff jmp 80105d99 <alltraps>
801063a6 <vector39>:
801063a6: 6a 00 push $0x0
801063a8: 6a 27 push $0x27
801063aa: e9 ea f9 ff ff jmp 80105d99 <alltraps>
801063af <vector40>:
801063af: 6a 00 push $0x0
801063b1: 6a 28 push $0x28
801063b3: e9 e1 f9 ff ff jmp 80105d99 <alltraps>
801063b8 <vector41>:
801063b8: 6a 00 push $0x0
801063ba: 6a 29 push $0x29
801063bc: e9 d8 f9 ff ff jmp 80105d99 <alltraps>
801063c1 <vector42>:
801063c1: 6a 00 push $0x0
801063c3: 6a 2a push $0x2a
801063c5: e9 cf f9 ff ff jmp 80105d99 <alltraps>
801063ca <vector43>:
801063ca: 6a 00 push $0x0
801063cc: 6a 2b push $0x2b
801063ce: e9 c6 f9 ff ff jmp 80105d99 <alltraps>
801063d3 <vector44>:
801063d3: 6a 00 push $0x0
801063d5: 6a 2c push $0x2c
801063d7: e9 bd f9 ff ff jmp 80105d99 <alltraps>
801063dc <vector45>:
801063dc: 6a 00 push $0x0
801063de: 6a 2d push $0x2d
801063e0: e9 b4 f9 ff ff jmp 80105d99 <alltraps>
801063e5 <vector46>:
801063e5: 6a 00 push $0x0
801063e7: 6a 2e push $0x2e
801063e9: e9 ab f9 ff ff jmp 80105d99 <alltraps>
801063ee <vector47>:
801063ee: 6a 00 push $0x0
801063f0: 6a 2f push $0x2f
801063f2: e9 a2 f9 ff ff jmp 80105d99 <alltraps>
801063f7 <vector48>:
801063f7: 6a 00 push $0x0
801063f9: 6a 30 push $0x30
801063fb: e9 99 f9 ff ff jmp 80105d99 <alltraps>
80106400 <vector49>:
80106400: 6a 00 push $0x0
80106402: 6a 31 push $0x31
80106404: e9 90 f9 ff ff jmp 80105d99 <alltraps>
80106409 <vector50>:
80106409: 6a 00 push $0x0
8010640b: 6a 32 push $0x32
8010640d: e9 87 f9 ff ff jmp 80105d99 <alltraps>
80106412 <vector51>:
80106412: 6a 00 push $0x0
80106414: 6a 33 push $0x33
80106416: e9 7e f9 ff ff jmp 80105d99 <alltraps>
8010641b <vector52>:
8010641b: 6a 00 push $0x0
8010641d: 6a 34 push $0x34
8010641f: e9 75 f9 ff ff jmp 80105d99 <alltraps>
80106424 <vector53>:
80106424: 6a 00 push $0x0
80106426: 6a 35 push $0x35
80106428: e9 6c f9 ff ff jmp 80105d99 <alltraps>
8010642d <vector54>:
8010642d: 6a 00 push $0x0
8010642f: 6a 36 push $0x36
80106431: e9 63 f9 ff ff jmp 80105d99 <alltraps>
80106436 <vector55>:
80106436: 6a 00 push $0x0
80106438: 6a 37 push $0x37
8010643a: e9 5a f9 ff ff jmp 80105d99 <alltraps>
8010643f <vector56>:
8010643f: 6a 00 push $0x0
80106441: 6a 38 push $0x38
80106443: e9 51 f9 ff ff jmp 80105d99 <alltraps>
80106448 <vector57>:
80106448: 6a 00 push $0x0
8010644a: 6a 39 push $0x39
8010644c: e9 48 f9 ff ff jmp 80105d99 <alltraps>
80106451 <vector58>:
80106451: 6a 00 push $0x0
80106453: 6a 3a push $0x3a
80106455: e9 3f f9 ff ff jmp 80105d99 <alltraps>
8010645a <vector59>:
8010645a: 6a 00 push $0x0
8010645c: 6a 3b push $0x3b
8010645e: e9 36 f9 ff ff jmp 80105d99 <alltraps>
80106463 <vector60>:
80106463: 6a 00 push $0x0
80106465: 6a 3c push $0x3c
80106467: e9 2d f9 ff ff jmp 80105d99 <alltraps>
8010646c <vector61>:
8010646c: 6a 00 push $0x0
8010646e: 6a 3d push $0x3d
80106470: e9 24 f9 ff ff jmp 80105d99 <alltraps>
80106475 <vector62>:
80106475: 6a 00 push $0x0
80106477: 6a 3e push $0x3e
80106479: e9 1b f9 ff ff jmp 80105d99 <alltraps>
8010647e <vector63>:
8010647e: 6a 00 push $0x0
80106480: 6a 3f push $0x3f
80106482: e9 12 f9 ff ff jmp 80105d99 <alltraps>
80106487 <vector64>:
80106487: 6a 00 push $0x0
80106489: 6a 40 push $0x40
8010648b: e9 09 f9 ff ff jmp 80105d99 <alltraps>
80106490 <vector65>:
80106490: 6a 00 push $0x0
80106492: 6a 41 push $0x41
80106494: e9 00 f9 ff ff jmp 80105d99 <alltraps>
80106499 <vector66>:
80106499: 6a 00 push $0x0
8010649b: 6a 42 push $0x42
8010649d: e9 f7 f8 ff ff jmp 80105d99 <alltraps>
801064a2 <vector67>:
801064a2: 6a 00 push $0x0
801064a4: 6a 43 push $0x43
801064a6: e9 ee f8 ff ff jmp 80105d99 <alltraps>
801064ab <vector68>:
801064ab: 6a 00 push $0x0
801064ad: 6a 44 push $0x44
801064af: e9 e5 f8 ff ff jmp 80105d99 <alltraps>
801064b4 <vector69>:
801064b4: 6a 00 push $0x0
801064b6: 6a 45 push $0x45
801064b8: e9 dc f8 ff ff jmp 80105d99 <alltraps>
801064bd <vector70>:
801064bd: 6a 00 push $0x0
801064bf: 6a 46 push $0x46
801064c1: e9 d3 f8 ff ff jmp 80105d99 <alltraps>
801064c6 <vector71>:
801064c6: 6a 00 push $0x0
801064c8: 6a 47 push $0x47
801064ca: e9 ca f8 ff ff jmp 80105d99 <alltraps>
801064cf <vector72>:
801064cf: 6a 00 push $0x0
801064d1: 6a 48 push $0x48
801064d3: e9 c1 f8 ff ff jmp 80105d99 <alltraps>
801064d8 <vector73>:
801064d8: 6a 00 push $0x0
801064da: 6a 49 push $0x49
801064dc: e9 b8 f8 ff ff jmp 80105d99 <alltraps>
801064e1 <vector74>:
801064e1: 6a 00 push $0x0
801064e3: 6a 4a push $0x4a
801064e5: e9 af f8 ff ff jmp 80105d99 <alltraps>
801064ea <vector75>:
801064ea: 6a 00 push $0x0
801064ec: 6a 4b push $0x4b
801064ee: e9 a6 f8 ff ff jmp 80105d99 <alltraps>
801064f3 <vector76>:
801064f3: 6a 00 push $0x0
801064f5: 6a 4c push $0x4c
801064f7: e9 9d f8 ff ff jmp 80105d99 <alltraps>
801064fc <vector77>:
801064fc: 6a 00 push $0x0
801064fe: 6a 4d push $0x4d
80106500: e9 94 f8 ff ff jmp 80105d99 <alltraps>
80106505 <vector78>:
80106505: 6a 00 push $0x0
80106507: 6a 4e push $0x4e
80106509: e9 8b f8 ff ff jmp 80105d99 <alltraps>
8010650e <vector79>:
8010650e: 6a 00 push $0x0
80106510: 6a 4f push $0x4f
80106512: e9 82 f8 ff ff jmp 80105d99 <alltraps>
80106517 <vector80>:
80106517: 6a 00 push $0x0
80106519: 6a 50 push $0x50
8010651b: e9 79 f8 ff ff jmp 80105d99 <alltraps>
80106520 <vector81>:
80106520: 6a 00 push $0x0
80106522: 6a 51 push $0x51
80106524: e9 70 f8 ff ff jmp 80105d99 <alltraps>
80106529 <vector82>:
80106529: 6a 00 push $0x0
8010652b: 6a 52 push $0x52
8010652d: e9 67 f8 ff ff jmp 80105d99 <alltraps>
80106532 <vector83>:
80106532: 6a 00 push $0x0
80106534: 6a 53 push $0x53
80106536: e9 5e f8 ff ff jmp 80105d99 <alltraps>
8010653b <vector84>:
8010653b: 6a 00 push $0x0
8010653d: 6a 54 push $0x54
8010653f: e9 55 f8 ff ff jmp 80105d99 <alltraps>
80106544 <vector85>:
80106544: 6a 00 push $0x0
80106546: 6a 55 push $0x55
80106548: e9 4c f8 ff ff jmp 80105d99 <alltraps>
8010654d <vector86>:
8010654d: 6a 00 push $0x0
8010654f: 6a 56 push $0x56
80106551: e9 43 f8 ff ff jmp 80105d99 <alltraps>
80106556 <vector87>:
80106556: 6a 00 push $0x0
80106558: 6a 57 push $0x57
8010655a: e9 3a f8 ff ff jmp 80105d99 <alltraps>
8010655f <vector88>:
8010655f: 6a 00 push $0x0
80106561: 6a 58 push $0x58
80106563: e9 31 f8 ff ff jmp 80105d99 <alltraps>
80106568 <vector89>:
80106568: 6a 00 push $0x0
8010656a: 6a 59 push $0x59
8010656c: e9 28 f8 ff ff jmp 80105d99 <alltraps>
80106571 <vector90>:
80106571: 6a 00 push $0x0
80106573: 6a 5a push $0x5a
80106575: e9 1f f8 ff ff jmp 80105d99 <alltraps>
8010657a <vector91>:
8010657a: 6a 00 push $0x0
8010657c: 6a 5b push $0x5b
8010657e: e9 16 f8 ff ff jmp 80105d99 <alltraps>
80106583 <vector92>:
80106583: 6a 00 push $0x0
80106585: 6a 5c push $0x5c
80106587: e9 0d f8 ff ff jmp 80105d99 <alltraps>
8010658c <vector93>:
8010658c: 6a 00 push $0x0
8010658e: 6a 5d push $0x5d
80106590: e9 04 f8 ff ff jmp 80105d99 <alltraps>
80106595 <vector94>:
80106595: 6a 00 push $0x0
80106597: 6a 5e push $0x5e
80106599: e9 fb f7 ff ff jmp 80105d99 <alltraps>
8010659e <vector95>:
8010659e: 6a 00 push $0x0
801065a0: 6a 5f push $0x5f
801065a2: e9 f2 f7 ff ff jmp 80105d99 <alltraps>
801065a7 <vector96>:
801065a7: 6a 00 push $0x0
801065a9: 6a 60 push $0x60
801065ab: e9 e9 f7 ff ff jmp 80105d99 <alltraps>
801065b0 <vector97>:
801065b0: 6a 00 push $0x0
801065b2: 6a 61 push $0x61
801065b4: e9 e0 f7 ff ff jmp 80105d99 <alltraps>
801065b9 <vector98>:
801065b9: 6a 00 push $0x0
801065bb: 6a 62 push $0x62
801065bd: e9 d7 f7 ff ff jmp 80105d99 <alltraps>
801065c2 <vector99>:
801065c2: 6a 00 push $0x0
801065c4: 6a 63 push $0x63
801065c6: e9 ce f7 ff ff jmp 80105d99 <alltraps>
801065cb <vector100>:
801065cb: 6a 00 push $0x0
801065cd: 6a 64 push $0x64
801065cf: e9 c5 f7 ff ff jmp 80105d99 <alltraps>
801065d4 <vector101>:
801065d4: 6a 00 push $0x0
801065d6: 6a 65 push $0x65
801065d8: e9 bc f7 ff ff jmp 80105d99 <alltraps>
801065dd <vector102>:
801065dd: 6a 00 push $0x0
801065df: 6a 66 push $0x66
801065e1: e9 b3 f7 ff ff jmp 80105d99 <alltraps>
801065e6 <vector103>:
801065e6: 6a 00 push $0x0
801065e8: 6a 67 push $0x67
801065ea: e9 aa f7 ff ff jmp 80105d99 <alltraps>
801065ef <vector104>:
801065ef: 6a 00 push $0x0
801065f1: 6a 68 push $0x68
801065f3: e9 a1 f7 ff ff jmp 80105d99 <alltraps>
801065f8 <vector105>:
801065f8: 6a 00 push $0x0
801065fa: 6a 69 push $0x69
801065fc: e9 98 f7 ff ff jmp 80105d99 <alltraps>
80106601 <vector106>:
80106601: 6a 00 push $0x0
80106603: 6a 6a push $0x6a
80106605: e9 8f f7 ff ff jmp 80105d99 <alltraps>
8010660a <vector107>:
8010660a: 6a 00 push $0x0
8010660c: 6a 6b push $0x6b
8010660e: e9 86 f7 ff ff jmp 80105d99 <alltraps>
80106613 <vector108>:
80106613: 6a 00 push $0x0
80106615: 6a 6c push $0x6c
80106617: e9 7d f7 ff ff jmp 80105d99 <alltraps>
8010661c <vector109>:
8010661c: 6a 00 push $0x0
8010661e: 6a 6d push $0x6d
80106620: e9 74 f7 ff ff jmp 80105d99 <alltraps>
80106625 <vector110>:
80106625: 6a 00 push $0x0
80106627: 6a 6e push $0x6e
80106629: e9 6b f7 ff ff jmp 80105d99 <alltraps>
8010662e <vector111>:
8010662e: 6a 00 push $0x0
80106630: 6a 6f push $0x6f
80106632: e9 62 f7 ff ff jmp 80105d99 <alltraps>
80106637 <vector112>:
80106637: 6a 00 push $0x0
80106639: 6a 70 push $0x70
8010663b: e9 59 f7 ff ff jmp 80105d99 <alltraps>
80106640 <vector113>:
80106640: 6a 00 push $0x0
80106642: 6a 71 push $0x71
80106644: e9 50 f7 ff ff jmp 80105d99 <alltraps>
80106649 <vector114>:
80106649: 6a 00 push $0x0
8010664b: 6a 72 push $0x72
8010664d: e9 47 f7 ff ff jmp 80105d99 <alltraps>
80106652 <vector115>:
80106652: 6a 00 push $0x0
80106654: 6a 73 push $0x73
80106656: e9 3e f7 ff ff jmp 80105d99 <alltraps>
8010665b <vector116>:
8010665b: 6a 00 push $0x0
8010665d: 6a 74 push $0x74
8010665f: e9 35 f7 ff ff jmp 80105d99 <alltraps>
80106664 <vector117>:
80106664: 6a 00 push $0x0
80106666: 6a 75 push $0x75
80106668: e9 2c f7 ff ff jmp 80105d99 <alltraps>
8010666d <vector118>:
8010666d: 6a 00 push $0x0
8010666f: 6a 76 push $0x76
80106671: e9 23 f7 ff ff jmp 80105d99 <alltraps>
80106676 <vector119>:
80106676: 6a 00 push $0x0
80106678: 6a 77 push $0x77
8010667a: e9 1a f7 ff ff jmp 80105d99 <alltraps>
8010667f <vector120>:
8010667f: 6a 00 push $0x0
80106681: 6a 78 push $0x78
80106683: e9 11 f7 ff ff jmp 80105d99 <alltraps>
80106688 <vector121>:
80106688: 6a 00 push $0x0
8010668a: 6a 79 push $0x79
8010668c: e9 08 f7 ff ff jmp 80105d99 <alltraps>
80106691 <vector122>:
80106691: 6a 00 push $0x0
80106693: 6a 7a push $0x7a
80106695: e9 ff f6 ff ff jmp 80105d99 <alltraps>
8010669a <vector123>:
8010669a: 6a 00 push $0x0
8010669c: 6a 7b push $0x7b
8010669e: e9 f6 f6 ff ff jmp 80105d99 <alltraps>
801066a3 <vector124>:
801066a3: 6a 00 push $0x0
801066a5: 6a 7c push $0x7c
801066a7: e9 ed f6 ff ff jmp 80105d99 <alltraps>
801066ac <vector125>:
801066ac: 6a 00 push $0x0
801066ae: 6a 7d push $0x7d
801066b0: e9 e4 f6 ff ff jmp 80105d99 <alltraps>
801066b5 <vector126>:
801066b5: 6a 00 push $0x0
801066b7: 6a 7e push $0x7e
801066b9: e9 db f6 ff ff jmp 80105d99 <alltraps>
801066be <vector127>:
801066be: 6a 00 push $0x0
801066c0: 6a 7f push $0x7f
801066c2: e9 d2 f6 ff ff jmp 80105d99 <alltraps>
801066c7 <vector128>:
801066c7: 6a 00 push $0x0
801066c9: 68 80 00 00 00 push $0x80
801066ce: e9 c6 f6 ff ff jmp 80105d99 <alltraps>
801066d3 <vector129>:
801066d3: 6a 00 push $0x0
801066d5: 68 81 00 00 00 push $0x81
801066da: e9 ba f6 ff ff jmp 80105d99 <alltraps>
801066df <vector130>:
801066df: 6a 00 push $0x0
801066e1: 68 82 00 00 00 push $0x82
801066e6: e9 ae f6 ff ff jmp 80105d99 <alltraps>
801066eb <vector131>:
801066eb: 6a 00 push $0x0
801066ed: 68 83 00 00 00 push $0x83
801066f2: e9 a2 f6 ff ff jmp 80105d99 <alltraps>
801066f7 <vector132>:
801066f7: 6a 00 push $0x0
801066f9: 68 84 00 00 00 push $0x84
801066fe: e9 96 f6 ff ff jmp 80105d99 <alltraps>
80106703 <vector133>:
80106703: 6a 00 push $0x0
80106705: 68 85 00 00 00 push $0x85
8010670a: e9 8a f6 ff ff jmp 80105d99 <alltraps>
8010670f <vector134>:
8010670f: 6a 00 push $0x0
80106711: 68 86 00 00 00 push $0x86
80106716: e9 7e f6 ff ff jmp 80105d99 <alltraps>
8010671b <vector135>:
8010671b: 6a 00 push $0x0
8010671d: 68 87 00 00 00 push $0x87
80106722: e9 72 f6 ff ff jmp 80105d99 <alltraps>
80106727 <vector136>:
80106727: 6a 00 push $0x0
80106729: 68 88 00 00 00 push $0x88
8010672e: e9 66 f6 ff ff jmp 80105d99 <alltraps>
80106733 <vector137>:
80106733: 6a 00 push $0x0
80106735: 68 89 00 00 00 push $0x89
8010673a: e9 5a f6 ff ff jmp 80105d99 <alltraps>
8010673f <vector138>:
8010673f: 6a 00 push $0x0
80106741: 68 8a 00 00 00 push $0x8a
80106746: e9 4e f6 ff ff jmp 80105d99 <alltraps>
8010674b <vector139>:
8010674b: 6a 00 push $0x0
8010674d: 68 8b 00 00 00 push $0x8b
80106752: e9 42 f6 ff ff jmp 80105d99 <alltraps>
80106757 <vector140>:
80106757: 6a 00 push $0x0
80106759: 68 8c 00 00 00 push $0x8c
8010675e: e9 36 f6 ff ff jmp 80105d99 <alltraps>
80106763 <vector141>:
80106763: 6a 00 push $0x0
80106765: 68 8d 00 00 00 push $0x8d
8010676a: e9 2a f6 ff ff jmp 80105d99 <alltraps>
8010676f <vector142>:
8010676f: 6a 00 push $0x0
80106771: 68 8e 00 00 00 push $0x8e
80106776: e9 1e f6 ff ff jmp 80105d99 <alltraps>
8010677b <vector143>:
8010677b: 6a 00 push $0x0
8010677d: 68 8f 00 00 00 push $0x8f
80106782: e9 12 f6 ff ff jmp 80105d99 <alltraps>
80106787 <vector144>:
80106787: 6a 00 push $0x0
80106789: 68 90 00 00 00 push $0x90
8010678e: e9 06 f6 ff ff jmp 80105d99 <alltraps>
80106793 <vector145>:
80106793: 6a 00 push $0x0
80106795: 68 91 00 00 00 push $0x91
8010679a: e9 fa f5 ff ff jmp 80105d99 <alltraps>
8010679f <vector146>:
8010679f: 6a 00 push $0x0
801067a1: 68 92 00 00 00 push $0x92
801067a6: e9 ee f5 ff ff jmp 80105d99 <alltraps>
801067ab <vector147>:
801067ab: 6a 00 push $0x0
801067ad: 68 93 00 00 00 push $0x93
801067b2: e9 e2 f5 ff ff jmp 80105d99 <alltraps>
801067b7 <vector148>:
801067b7: 6a 00 push $0x0
801067b9: 68 94 00 00 00 push $0x94
801067be: e9 d6 f5 ff ff jmp 80105d99 <alltraps>
801067c3 <vector149>:
801067c3: 6a 00 push $0x0
801067c5: 68 95 00 00 00 push $0x95
801067ca: e9 ca f5 ff ff jmp 80105d99 <alltraps>
801067cf <vector150>:
801067cf: 6a 00 push $0x0
801067d1: 68 96 00 00 00 push $0x96
801067d6: e9 be f5 ff ff jmp 80105d99 <alltraps>
801067db <vector151>:
801067db: 6a 00 push $0x0
801067dd: 68 97 00 00 00 push $0x97
801067e2: e9 b2 f5 ff ff jmp 80105d99 <alltraps>
801067e7 <vector152>:
801067e7: 6a 00 push $0x0
801067e9: 68 98 00 00 00 push $0x98
801067ee: e9 a6 f5 ff ff jmp 80105d99 <alltraps>
801067f3 <vector153>:
801067f3: 6a 00 push $0x0
801067f5: 68 99 00 00 00 push $0x99
801067fa: e9 9a f5 ff ff jmp 80105d99 <alltraps>
801067ff <vector154>:
801067ff: 6a 00 push $0x0
80106801: 68 9a 00 00 00 push $0x9a
80106806: e9 8e f5 ff ff jmp 80105d99 <alltraps>
8010680b <vector155>:
8010680b: 6a 00 push $0x0
8010680d: 68 9b 00 00 00 push $0x9b
80106812: e9 82 f5 ff ff jmp 80105d99 <alltraps>
80106817 <vector156>:
80106817: 6a 00 push $0x0
80106819: 68 9c 00 00 00 push $0x9c
8010681e: e9 76 f5 ff ff jmp 80105d99 <alltraps>
80106823 <vector157>:
80106823: 6a 00 push $0x0
80106825: 68 9d 00 00 00 push $0x9d
8010682a: e9 6a f5 ff ff jmp 80105d99 <alltraps>
8010682f <vector158>:
8010682f: 6a 00 push $0x0
80106831: 68 9e 00 00 00 push $0x9e
80106836: e9 5e f5 ff ff jmp 80105d99 <alltraps>
8010683b <vector159>:
8010683b: 6a 00 push $0x0
8010683d: 68 9f 00 00 00 push $0x9f
80106842: e9 52 f5 ff ff jmp 80105d99 <alltraps>
80106847 <vector160>:
80106847: 6a 00 push $0x0
80106849: 68 a0 00 00 00 push $0xa0
8010684e: e9 46 f5 ff ff jmp 80105d99 <alltraps>
80106853 <vector161>:
80106853: 6a 00 push $0x0
80106855: 68 a1 00 00 00 push $0xa1
8010685a: e9 3a f5 ff ff jmp 80105d99 <alltraps>
8010685f <vector162>:
8010685f: 6a 00 push $0x0
80106861: 68 a2 00 00 00 push $0xa2
80106866: e9 2e f5 ff ff jmp 80105d99 <alltraps>
8010686b <vector163>:
8010686b: 6a 00 push $0x0
8010686d: 68 a3 00 00 00 push $0xa3
80106872: e9 22 f5 ff ff jmp 80105d99 <alltraps>
80106877 <vector164>:
80106877: 6a 00 push $0x0
80106879: 68 a4 00 00 00 push $0xa4
8010687e: e9 16 f5 ff ff jmp 80105d99 <alltraps>
80106883 <vector165>:
80106883: 6a 00 push $0x0
80106885: 68 a5 00 00 00 push $0xa5
8010688a: e9 0a f5 ff ff jmp 80105d99 <alltraps>
8010688f <vector166>:
8010688f: 6a 00 push $0x0
80106891: 68 a6 00 00 00 push $0xa6
80106896: e9 fe f4 ff ff jmp 80105d99 <alltraps>
8010689b <vector167>:
8010689b: 6a 00 push $0x0
8010689d: 68 a7 00 00 00 push $0xa7
801068a2: e9 f2 f4 ff ff jmp 80105d99 <alltraps>
801068a7 <vector168>:
801068a7: 6a 00 push $0x0
801068a9: 68 a8 00 00 00 push $0xa8
801068ae: e9 e6 f4 ff ff jmp 80105d99 <alltraps>
801068b3 <vector169>:
801068b3: 6a 00 push $0x0
801068b5: 68 a9 00 00 00 push $0xa9
801068ba: e9 da f4 ff ff jmp 80105d99 <alltraps>
801068bf <vector170>:
801068bf: 6a 00 push $0x0
801068c1: 68 aa 00 00 00 push $0xaa
801068c6: e9 ce f4 ff ff jmp 80105d99 <alltraps>
801068cb <vector171>:
801068cb: 6a 00 push $0x0
801068cd: 68 ab 00 00 00 push $0xab
801068d2: e9 c2 f4 ff ff jmp 80105d99 <alltraps>
801068d7 <vector172>:
801068d7: 6a 00 push $0x0
801068d9: 68 ac 00 00 00 push $0xac
801068de: e9 b6 f4 ff ff jmp 80105d99 <alltraps>
801068e3 <vector173>:
801068e3: 6a 00 push $0x0
801068e5: 68 ad 00 00 00 push $0xad
801068ea: e9 aa f4 ff ff jmp 80105d99 <alltraps>
801068ef <vector174>:
801068ef: 6a 00 push $0x0
801068f1: 68 ae 00 00 00 push $0xae
801068f6: e9 9e f4 ff ff jmp 80105d99 <alltraps>
801068fb <vector175>:
801068fb: 6a 00 push $0x0
801068fd: 68 af 00 00 00 push $0xaf
80106902: e9 92 f4 ff ff jmp 80105d99 <alltraps>
80106907 <vector176>:
80106907: 6a 00 push $0x0
80106909: 68 b0 00 00 00 push $0xb0
8010690e: e9 86 f4 ff ff jmp 80105d99 <alltraps>
80106913 <vector177>:
80106913: 6a 00 push $0x0
80106915: 68 b1 00 00 00 push $0xb1
8010691a: e9 7a f4 ff ff jmp 80105d99 <alltraps>
8010691f <vector178>:
8010691f: 6a 00 push $0x0
80106921: 68 b2 00 00 00 push $0xb2
80106926: e9 6e f4 ff ff jmp 80105d99 <alltraps>
8010692b <vector179>:
8010692b: 6a 00 push $0x0
8010692d: 68 b3 00 00 00 push $0xb3
80106932: e9 62 f4 ff ff jmp 80105d99 <alltraps>
80106937 <vector180>:
80106937: 6a 00 push $0x0
80106939: 68 b4 00 00 00 push $0xb4
8010693e: e9 56 f4 ff ff jmp 80105d99 <alltraps>
80106943 <vector181>:
80106943: 6a 00 push $0x0
80106945: 68 b5 00 00 00 push $0xb5
8010694a: e9 4a f4 ff ff jmp 80105d99 <alltraps>
8010694f <vector182>:
8010694f: 6a 00 push $0x0
80106951: 68 b6 00 00 00 push $0xb6
80106956: e9 3e f4 ff ff jmp 80105d99 <alltraps>
8010695b <vector183>:
8010695b: 6a 00 push $0x0
8010695d: 68 b7 00 00 00 push $0xb7
80106962: e9 32 f4 ff ff jmp 80105d99 <alltraps>
80106967 <vector184>:
80106967: 6a 00 push $0x0
80106969: 68 b8 00 00 00 push $0xb8
8010696e: e9 26 f4 ff ff jmp 80105d99 <alltraps>
80106973 <vector185>:
80106973: 6a 00 push $0x0
80106975: 68 b9 00 00 00 push $0xb9
8010697a: e9 1a f4 ff ff jmp 80105d99 <alltraps>
8010697f <vector186>:
8010697f: 6a 00 push $0x0
80106981: 68 ba 00 00 00 push $0xba
80106986: e9 0e f4 ff ff jmp 80105d99 <alltraps>
8010698b <vector187>:
8010698b: 6a 00 push $0x0
8010698d: 68 bb 00 00 00 push $0xbb
80106992: e9 02 f4 ff ff jmp 80105d99 <alltraps>
80106997 <vector188>:
80106997: 6a 00 push $0x0
80106999: 68 bc 00 00 00 push $0xbc
8010699e: e9 f6 f3 ff ff jmp 80105d99 <alltraps>
801069a3 <vector189>:
801069a3: 6a 00 push $0x0
801069a5: 68 bd 00 00 00 push $0xbd
801069aa: e9 ea f3 ff ff jmp 80105d99 <alltraps>
801069af <vector190>:
801069af: 6a 00 push $0x0
801069b1: 68 be 00 00 00 push $0xbe
801069b6: e9 de f3 ff ff jmp 80105d99 <alltraps>
801069bb <vector191>:
801069bb: 6a 00 push $0x0
801069bd: 68 bf 00 00 00 push $0xbf
801069c2: e9 d2 f3 ff ff jmp 80105d99 <alltraps>
801069c7 <vector192>:
801069c7: 6a 00 push $0x0
801069c9: 68 c0 00 00 00 push $0xc0
801069ce: e9 c6 f3 ff ff jmp 80105d99 <alltraps>
801069d3 <vector193>:
801069d3: 6a 00 push $0x0
801069d5: 68 c1 00 00 00 push $0xc1
801069da: e9 ba f3 ff ff jmp 80105d99 <alltraps>
801069df <vector194>:
801069df: 6a 00 push $0x0
801069e1: 68 c2 00 00 00 push $0xc2
801069e6: e9 ae f3 ff ff jmp 80105d99 <alltraps>
801069eb <vector195>:
801069eb: 6a 00 push $0x0
801069ed: 68 c3 00 00 00 push $0xc3
801069f2: e9 a2 f3 ff ff jmp 80105d99 <alltraps>
801069f7 <vector196>:
801069f7: 6a 00 push $0x0
801069f9: 68 c4 00 00 00 push $0xc4
801069fe: e9 96 f3 ff ff jmp 80105d99 <alltraps>
80106a03 <vector197>:
80106a03: 6a 00 push $0x0
80106a05: 68 c5 00 00 00 push $0xc5
80106a0a: e9 8a f3 ff ff jmp 80105d99 <alltraps>
80106a0f <vector198>:
80106a0f: 6a 00 push $0x0
80106a11: 68 c6 00 00 00 push $0xc6
80106a16: e9 7e f3 ff ff jmp 80105d99 <alltraps>
80106a1b <vector199>:
80106a1b: 6a 00 push $0x0
80106a1d: 68 c7 00 00 00 push $0xc7
80106a22: e9 72 f3 ff ff jmp 80105d99 <alltraps>
80106a27 <vector200>:
80106a27: 6a 00 push $0x0
80106a29: 68 c8 00 00 00 push $0xc8
80106a2e: e9 66 f3 ff ff jmp 80105d99 <alltraps>
80106a33 <vector201>:
80106a33: 6a 00 push $0x0
80106a35: 68 c9 00 00 00 push $0xc9
80106a3a: e9 5a f3 ff ff jmp 80105d99 <alltraps>
80106a3f <vector202>:
80106a3f: 6a 00 push $0x0
80106a41: 68 ca 00 00 00 push $0xca
80106a46: e9 4e f3 ff ff jmp 80105d99 <alltraps>
80106a4b <vector203>:
80106a4b: 6a 00 push $0x0
80106a4d: 68 cb 00 00 00 push $0xcb
80106a52: e9 42 f3 ff ff jmp 80105d99 <alltraps>
80106a57 <vector204>:
80106a57: 6a 00 push $0x0
80106a59: 68 cc 00 00 00 push $0xcc
80106a5e: e9 36 f3 ff ff jmp 80105d99 <alltraps>
80106a63 <vector205>:
80106a63: 6a 00 push $0x0
80106a65: 68 cd 00 00 00 push $0xcd
80106a6a: e9 2a f3 ff ff jmp 80105d99 <alltraps>
80106a6f <vector206>:
80106a6f: 6a 00 push $0x0
80106a71: 68 ce 00 00 00 push $0xce
80106a76: e9 1e f3 ff ff jmp 80105d99 <alltraps>
80106a7b <vector207>:
80106a7b: 6a 00 push $0x0
80106a7d: 68 cf 00 00 00 push $0xcf
80106a82: e9 12 f3 ff ff jmp 80105d99 <alltraps>
80106a87 <vector208>:
80106a87: 6a 00 push $0x0
80106a89: 68 d0 00 00 00 push $0xd0
80106a8e: e9 06 f3 ff ff jmp 80105d99 <alltraps>
80106a93 <vector209>:
80106a93: 6a 00 push $0x0
80106a95: 68 d1 00 00 00 push $0xd1
80106a9a: e9 fa f2 ff ff jmp 80105d99 <alltraps>
80106a9f <vector210>:
80106a9f: 6a 00 push $0x0
80106aa1: 68 d2 00 00 00 push $0xd2
80106aa6: e9 ee f2 ff ff jmp 80105d99 <alltraps>
80106aab <vector211>:
80106aab: 6a 00 push $0x0
80106aad: 68 d3 00 00 00 push $0xd3
80106ab2: e9 e2 f2 ff ff jmp 80105d99 <alltraps>
80106ab7 <vector212>:
80106ab7: 6a 00 push $0x0
80106ab9: 68 d4 00 00 00 push $0xd4
80106abe: e9 d6 f2 ff ff jmp 80105d99 <alltraps>
80106ac3 <vector213>:
80106ac3: 6a 00 push $0x0
80106ac5: 68 d5 00 00 00 push $0xd5
80106aca: e9 ca f2 ff ff jmp 80105d99 <alltraps>
80106acf <vector214>:
80106acf: 6a 00 push $0x0
80106ad1: 68 d6 00 00 00 push $0xd6
80106ad6: e9 be f2 ff ff jmp 80105d99 <alltraps>
80106adb <vector215>:
80106adb: 6a 00 push $0x0
80106add: 68 d7 00 00 00 push $0xd7
80106ae2: e9 b2 f2 ff ff jmp 80105d99 <alltraps>
80106ae7 <vector216>:
80106ae7: 6a 00 push $0x0
80106ae9: 68 d8 00 00 00 push $0xd8
80106aee: e9 a6 f2 ff ff jmp 80105d99 <alltraps>
80106af3 <vector217>:
80106af3: 6a 00 push $0x0
80106af5: 68 d9 00 00 00 push $0xd9
80106afa: e9 9a f2 ff ff jmp 80105d99 <alltraps>
80106aff <vector218>:
80106aff: 6a 00 push $0x0
80106b01: 68 da 00 00 00 push $0xda
80106b06: e9 8e f2 ff ff jmp 80105d99 <alltraps>
80106b0b <vector219>:
80106b0b: 6a 00 push $0x0
80106b0d: 68 db 00 00 00 push $0xdb
80106b12: e9 82 f2 ff ff jmp 80105d99 <alltraps>
80106b17 <vector220>:
80106b17: 6a 00 push $0x0
80106b19: 68 dc 00 00 00 push $0xdc
80106b1e: e9 76 f2 ff ff jmp 80105d99 <alltraps>
80106b23 <vector221>:
80106b23: 6a 00 push $0x0
80106b25: 68 dd 00 00 00 push $0xdd
80106b2a: e9 6a f2 ff ff jmp 80105d99 <alltraps>
80106b2f <vector222>:
80106b2f: 6a 00 push $0x0
80106b31: 68 de 00 00 00 push $0xde
80106b36: e9 5e f2 ff ff jmp 80105d99 <alltraps>
80106b3b <vector223>:
80106b3b: 6a 00 push $0x0
80106b3d: 68 df 00 00 00 push $0xdf
80106b42: e9 52 f2 ff ff jmp 80105d99 <alltraps>
80106b47 <vector224>:
80106b47: 6a 00 push $0x0
80106b49: 68 e0 00 00 00 push $0xe0
80106b4e: e9 46 f2 ff ff jmp 80105d99 <alltraps>
80106b53 <vector225>:
80106b53: 6a 00 push $0x0
80106b55: 68 e1 00 00 00 push $0xe1
80106b5a: e9 3a f2 ff ff jmp 80105d99 <alltraps>
80106b5f <vector226>:
80106b5f: 6a 00 push $0x0
80106b61: 68 e2 00 00 00 push $0xe2
80106b66: e9 2e f2 ff ff jmp 80105d99 <alltraps>
80106b6b <vector227>:
80106b6b: 6a 00 push $0x0
80106b6d: 68 e3 00 00 00 push $0xe3
80106b72: e9 22 f2 ff ff jmp 80105d99 <alltraps>
80106b77 <vector228>:
80106b77: 6a 00 push $0x0
80106b79: 68 e4 00 00 00 push $0xe4
80106b7e: e9 16 f2 ff ff jmp 80105d99 <alltraps>
80106b83 <vector229>:
80106b83: 6a 00 push $0x0
80106b85: 68 e5 00 00 00 push $0xe5
80106b8a: e9 0a f2 ff ff jmp 80105d99 <alltraps>
80106b8f <vector230>:
80106b8f: 6a 00 push $0x0
80106b91: 68 e6 00 00 00 push $0xe6
80106b96: e9 fe f1 ff ff jmp 80105d99 <alltraps>
80106b9b <vector231>:
80106b9b: 6a 00 push $0x0
80106b9d: 68 e7 00 00 00 push $0xe7
80106ba2: e9 f2 f1 ff ff jmp 80105d99 <alltraps>
80106ba7 <vector232>:
80106ba7: 6a 00 push $0x0
80106ba9: 68 e8 00 00 00 push $0xe8
80106bae: e9 e6 f1 ff ff jmp 80105d99 <alltraps>
80106bb3 <vector233>:
80106bb3: 6a 00 push $0x0
80106bb5: 68 e9 00 00 00 push $0xe9
80106bba: e9 da f1 ff ff jmp 80105d99 <alltraps>
80106bbf <vector234>:
80106bbf: 6a 00 push $0x0
80106bc1: 68 ea 00 00 00 push $0xea
80106bc6: e9 ce f1 ff ff jmp 80105d99 <alltraps>
80106bcb <vector235>:
80106bcb: 6a 00 push $0x0
80106bcd: 68 eb 00 00 00 push $0xeb
80106bd2: e9 c2 f1 ff ff jmp 80105d99 <alltraps>
80106bd7 <vector236>:
80106bd7: 6a 00 push $0x0
80106bd9: 68 ec 00 00 00 push $0xec
80106bde: e9 b6 f1 ff ff jmp 80105d99 <alltraps>
80106be3 <vector237>:
80106be3: 6a 00 push $0x0
80106be5: 68 ed 00 00 00 push $0xed
80106bea: e9 aa f1 ff ff jmp 80105d99 <alltraps>
80106bef <vector238>:
80106bef: 6a 00 push $0x0
80106bf1: 68 ee 00 00 00 push $0xee
80106bf6: e9 9e f1 ff ff jmp 80105d99 <alltraps>
80106bfb <vector239>:
80106bfb: 6a 00 push $0x0
80106bfd: 68 ef 00 00 00 push $0xef
80106c02: e9 92 f1 ff ff jmp 80105d99 <alltraps>
80106c07 <vector240>:
80106c07: 6a 00 push $0x0
80106c09: 68 f0 00 00 00 push $0xf0
80106c0e: e9 86 f1 ff ff jmp 80105d99 <alltraps>
80106c13 <vector241>:
80106c13: 6a 00 push $0x0
80106c15: 68 f1 00 00 00 push $0xf1
80106c1a: e9 7a f1 ff ff jmp 80105d99 <alltraps>
80106c1f <vector242>:
80106c1f: 6a 00 push $0x0
80106c21: 68 f2 00 00 00 push $0xf2
80106c26: e9 6e f1 ff ff jmp 80105d99 <alltraps>
80106c2b <vector243>:
80106c2b: 6a 00 push $0x0
80106c2d: 68 f3 00 00 00 push $0xf3
80106c32: e9 62 f1 ff ff jmp 80105d99 <alltraps>
80106c37 <vector244>:
80106c37: 6a 00 push $0x0
80106c39: 68 f4 00 00 00 push $0xf4
80106c3e: e9 56 f1 ff ff jmp 80105d99 <alltraps>
80106c43 <vector245>:
80106c43: 6a 00 push $0x0
80106c45: 68 f5 00 00 00 push $0xf5
80106c4a: e9 4a f1 ff ff jmp 80105d99 <alltraps>
80106c4f <vector246>:
80106c4f: 6a 00 push $0x0
80106c51: 68 f6 00 00 00 push $0xf6
80106c56: e9 3e f1 ff ff jmp 80105d99 <alltraps>
80106c5b <vector247>:
80106c5b: 6a 00 push $0x0
80106c5d: 68 f7 00 00 00 push $0xf7
80106c62: e9 32 f1 ff ff jmp 80105d99 <alltraps>
80106c67 <vector248>:
80106c67: 6a 00 push $0x0
80106c69: 68 f8 00 00 00 push $0xf8
80106c6e: e9 26 f1 ff ff jmp 80105d99 <alltraps>
80106c73 <vector249>:
80106c73: 6a 00 push $0x0
80106c75: 68 f9 00 00 00 push $0xf9
80106c7a: e9 1a f1 ff ff jmp 80105d99 <alltraps>
80106c7f <vector250>:
80106c7f: 6a 00 push $0x0
80106c81: 68 fa 00 00 00 push $0xfa
80106c86: e9 0e f1 ff ff jmp 80105d99 <alltraps>
80106c8b <vector251>:
80106c8b: 6a 00 push $0x0
80106c8d: 68 fb 00 00 00 push $0xfb
80106c92: e9 02 f1 ff ff jmp 80105d99 <alltraps>
80106c97 <vector252>:
80106c97: 6a 00 push $0x0
80106c99: 68 fc 00 00 00 push $0xfc
80106c9e: e9 f6 f0 ff ff jmp 80105d99 <alltraps>
80106ca3 <vector253>:
80106ca3: 6a 00 push $0x0
80106ca5: 68 fd 00 00 00 push $0xfd
80106caa: e9 ea f0 ff ff jmp 80105d99 <alltraps>
80106caf <vector254>:
80106caf: 6a 00 push $0x0
80106cb1: 68 fe 00 00 00 push $0xfe
80106cb6: e9 de f0 ff ff jmp 80105d99 <alltraps>
80106cbb <vector255>:
80106cbb: 6a 00 push $0x0
80106cbd: 68 ff 00 00 00 push $0xff
80106cc2: e9 d2 f0 ff ff jmp 80105d99 <alltraps>
80106cc7: 66 90 xchg %ax,%ax
80106cc9: 66 90 xchg %ax,%ax
80106ccb: 66 90 xchg %ax,%ax
80106ccd: 66 90 xchg %ax,%ax
80106ccf: 90 nop
80106cd0 <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)
{
80106cd0: 55 push %ebp
80106cd1: 89 e5 mov %esp,%ebp
80106cd3: 57 push %edi
80106cd4: 56 push %esi
80106cd5: 53 push %ebx
80106cd6: 89 d3 mov %edx,%ebx
pde_t *pde;
pte_t *pgtab;
pde = &pgdir[PDX(va)];
80106cd8: c1 ea 16 shr $0x16,%edx
80106cdb: 8d 3c 90 lea (%eax,%edx,4),%edi
// 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)
{
80106cde: 83 ec 0c sub $0xc,%esp
pde_t *pde;
pte_t *pgtab;
pde = &pgdir[PDX(va)];
if(*pde & PTE_P){
80106ce1: 8b 07 mov (%edi),%eax
80106ce3: a8 01 test $0x1,%al
80106ce5: 74 29 je 80106d10 <walkpgdir+0x40>
pgtab = (pte_t*)P2V(PTE_ADDR(*pde));
80106ce7: 25 00 f0 ff ff and $0xfffff000,%eax
80106cec: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi
// 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)];
}
80106cf2: 8d 65 f4 lea -0xc(%ebp),%esp
// 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)];
80106cf5: c1 eb 0a shr $0xa,%ebx
80106cf8: 81 e3 fc 0f 00 00 and $0xffc,%ebx
80106cfe: 8d 04 1e lea (%esi,%ebx,1),%eax
}
80106d01: 5b pop %ebx
80106d02: 5e pop %esi
80106d03: 5f pop %edi
80106d04: 5d pop %ebp
80106d05: c3 ret
80106d06: 8d 76 00 lea 0x0(%esi),%esi
80106d09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
pde = &pgdir[PDX(va)];
if(*pde & PTE_P){
pgtab = (pte_t*)P2V(PTE_ADDR(*pde));
} else {
if(!alloc || (pgtab = (pte_t*)kalloc()) == 0)
80106d10: 85 c9 test %ecx,%ecx
80106d12: 74 2c je 80106d40 <walkpgdir+0x70>
80106d14: e8 77 b7 ff ff call 80102490 <kalloc>
80106d19: 85 c0 test %eax,%eax
80106d1b: 89 c6 mov %eax,%esi
80106d1d: 74 21 je 80106d40 <walkpgdir+0x70>
return 0;
// Make sure all those PTE_P bits are zero.
memset(pgtab, 0, PGSIZE);
80106d1f: 83 ec 04 sub $0x4,%esp
80106d22: 68 00 10 00 00 push $0x1000
80106d27: 6a 00 push $0x0
80106d29: 50 push %eax
80106d2a: e8 01 dd ff ff call 80104a30 <memset>
// The permissions here are overly generous, but they can
// be further restricted by the permissions in the page table
// entries, if necessary.
*pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U;
80106d2f: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax
80106d35: 83 c4 10 add $0x10,%esp
80106d38: 83 c8 07 or $0x7,%eax
80106d3b: 89 07 mov %eax,(%edi)
80106d3d: eb b3 jmp 80106cf2 <walkpgdir+0x22>
80106d3f: 90 nop
}
return &pgtab[PTX(va)];
}
80106d40: 8d 65 f4 lea -0xc(%ebp),%esp
pde = &pgdir[PDX(va)];
if(*pde & PTE_P){
pgtab = (pte_t*)P2V(PTE_ADDR(*pde));
} else {
if(!alloc || (pgtab = (pte_t*)kalloc()) == 0)
return 0;
80106d43: 31 c0 xor %eax,%eax
// 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)];
}
80106d45: 5b pop %ebx
80106d46: 5e pop %esi
80106d47: 5f pop %edi
80106d48: 5d pop %ebp
80106d49: c3 ret
80106d4a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80106d50 <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)
{
80106d50: 55 push %ebp
80106d51: 89 e5 mov %esp,%ebp
80106d53: 57 push %edi
80106d54: 56 push %esi
80106d55: 53 push %ebx
char *a, *last;
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
80106d56: 89 d3 mov %edx,%ebx
80106d58: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
// 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)
{
80106d5e: 83 ec 1c sub $0x1c,%esp
80106d61: 89 45 e4 mov %eax,-0x1c(%ebp)
char *a, *last;
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
80106d64: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax
80106d68: 8b 7d 08 mov 0x8(%ebp),%edi
80106d6b: 25 00 f0 ff ff and $0xfffff000,%eax
80106d70: 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;
80106d73: 8b 45 0c mov 0xc(%ebp),%eax
80106d76: 29 df sub %ebx,%edi
80106d78: 83 c8 01 or $0x1,%eax
80106d7b: 89 45 dc mov %eax,-0x24(%ebp)
80106d7e: eb 15 jmp 80106d95 <mappages+0x45>
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
if(*pte & PTE_P)
80106d80: f6 00 01 testb $0x1,(%eax)
80106d83: 75 45 jne 80106dca <mappages+0x7a>
panic("remap");
*pte = pa | perm | PTE_P;
80106d85: 0b 75 dc or -0x24(%ebp),%esi
if(a == last)
80106d88: 3b 5d e0 cmp -0x20(%ebp),%ebx
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
if(*pte & PTE_P)
panic("remap");
*pte = pa | perm | PTE_P;
80106d8b: 89 30 mov %esi,(%eax)
if(a == last)
80106d8d: 74 31 je 80106dc0 <mappages+0x70>
break;
a += PGSIZE;
80106d8f: 81 c3 00 10 00 00 add $0x1000,%ebx
pte_t *pte;
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
80106d95: 8b 45 e4 mov -0x1c(%ebp),%eax
80106d98: b9 01 00 00 00 mov $0x1,%ecx
80106d9d: 89 da mov %ebx,%edx
80106d9f: 8d 34 3b lea (%ebx,%edi,1),%esi
80106da2: e8 29 ff ff ff call 80106cd0 <walkpgdir>
80106da7: 85 c0 test %eax,%eax
80106da9: 75 d5 jne 80106d80 <mappages+0x30>
break;
a += PGSIZE;
pa += PGSIZE;
}
return 0;
}
80106dab: 8d 65 f4 lea -0xc(%ebp),%esp
a = (char*)PGROUNDDOWN((uint)va);
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
80106dae: b8 ff ff ff ff mov $0xffffffff,%eax
break;
a += PGSIZE;
pa += PGSIZE;
}
return 0;
}
80106db3: 5b pop %ebx
80106db4: 5e pop %esi
80106db5: 5f pop %edi
80106db6: 5d pop %ebp
80106db7: c3 ret
80106db8: 90 nop
80106db9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106dc0: 8d 65 f4 lea -0xc(%ebp),%esp
if(a == last)
break;
a += PGSIZE;
pa += PGSIZE;
}
return 0;
80106dc3: 31 c0 xor %eax,%eax
}
80106dc5: 5b pop %ebx
80106dc6: 5e pop %esi
80106dc7: 5f pop %edi
80106dc8: 5d pop %ebp
80106dc9: c3 ret
last = (char*)PGROUNDDOWN(((uint)va) + size - 1);
for(;;){
if((pte = walkpgdir(pgdir, a, 1)) == 0)
return -1;
if(*pte & PTE_P)
panic("remap");
80106dca: 83 ec 0c sub $0xc,%esp
80106dcd: 68 7c 7f 10 80 push $0x80107f7c
80106dd2: e8 99 95 ff ff call 80100370 <panic>
80106dd7: 89 f6 mov %esi,%esi
80106dd9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106de0 <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)
80106de0: 55 push %ebp
80106de1: 89 e5 mov %esp,%ebp
80106de3: 57 push %edi
80106de4: 56 push %esi
80106de5: 53 push %ebx
uint a, pa;
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
80106de6: 8d 99 ff 0f 00 00 lea 0xfff(%ecx),%ebx
// 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)
80106dec: 89 c7 mov %eax,%edi
uint a, pa;
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
80106dee: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
// 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)
80106df4: 83 ec 1c sub $0x1c,%esp
80106df7: 89 4d e0 mov %ecx,-0x20(%ebp)
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
for(; a < oldsz; a += PGSIZE){
80106dfa: 39 d3 cmp %edx,%ebx
80106dfc: 73 66 jae 80106e64 <deallocuvm.part.0+0x84>
80106dfe: 89 d6 mov %edx,%esi
80106e00: eb 3d jmp 80106e3f <deallocuvm.part.0+0x5f>
80106e02: 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){
80106e08: 8b 10 mov (%eax),%edx
80106e0a: f6 c2 01 test $0x1,%dl
80106e0d: 74 26 je 80106e35 <deallocuvm.part.0+0x55>
pa = PTE_ADDR(*pte);
if(pa == 0)
80106e0f: 81 e2 00 f0 ff ff and $0xfffff000,%edx
80106e15: 74 58 je 80106e6f <deallocuvm.part.0+0x8f>
panic("kfree");
char *v = P2V(pa);
kfree(v);
80106e17: 83 ec 0c sub $0xc,%esp
80106e1a: 81 c2 00 00 00 80 add $0x80000000,%edx
80106e20: 89 45 e4 mov %eax,-0x1c(%ebp)
80106e23: 52 push %edx
80106e24: e8 b7 b4 ff ff call 801022e0 <kfree>
*pte = 0;
80106e29: 8b 45 e4 mov -0x1c(%ebp),%eax
80106e2c: 83 c4 10 add $0x10,%esp
80106e2f: c7 00 00 00 00 00 movl $0x0,(%eax)
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
for(; a < oldsz; a += PGSIZE){
80106e35: 81 c3 00 10 00 00 add $0x1000,%ebx
80106e3b: 39 f3 cmp %esi,%ebx
80106e3d: 73 25 jae 80106e64 <deallocuvm.part.0+0x84>
pte = walkpgdir(pgdir, (char*)a, 0);
80106e3f: 31 c9 xor %ecx,%ecx
80106e41: 89 da mov %ebx,%edx
80106e43: 89 f8 mov %edi,%eax
80106e45: e8 86 fe ff ff call 80106cd0 <walkpgdir>
if(!pte)
80106e4a: 85 c0 test %eax,%eax
80106e4c: 75 ba jne 80106e08 <deallocuvm.part.0+0x28>
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
80106e4e: 81 e3 00 00 c0 ff and $0xffc00000,%ebx
80106e54: 81 c3 00 f0 3f 00 add $0x3ff000,%ebx
if(newsz >= oldsz)
return oldsz;
a = PGROUNDUP(newsz);
for(; a < oldsz; a += PGSIZE){
80106e5a: 81 c3 00 10 00 00 add $0x1000,%ebx
80106e60: 39 f3 cmp %esi,%ebx
80106e62: 72 db jb 80106e3f <deallocuvm.part.0+0x5f>
kfree(v);
*pte = 0;
}
}
return newsz;
}
80106e64: 8b 45 e0 mov -0x20(%ebp),%eax
80106e67: 8d 65 f4 lea -0xc(%ebp),%esp
80106e6a: 5b pop %ebx
80106e6b: 5e pop %esi
80106e6c: 5f pop %edi
80106e6d: 5d pop %ebp
80106e6e: c3 ret
if(!pte)
a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;
else if((*pte & PTE_P) != 0){
pa = PTE_ADDR(*pte);
if(pa == 0)
panic("kfree");
80106e6f: 83 ec 0c sub $0xc,%esp
80106e72: 68 a6 78 10 80 push $0x801078a6
80106e77: e8 f4 94 ff ff call 80100370 <panic>
80106e7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80106e80 <seginit>:
// Set up CPU's kernel segment descriptors.
// Run once on entry on each CPU.
void
seginit(void)
{
80106e80: 55 push %ebp
80106e81: 89 e5 mov %esp,%ebp
80106e83: 83 ec 18 sub $0x18,%esp
// Map "logical" addresses to virtual addresses using identity map.
// Cannot share a CODE descriptor for both kernel and user
// because it would have to have DPL_USR, but the CPU forbids
// an interrupt from CPL=0 to DPL=3.
c = &cpus[cpuid()];
80106e86: e8 f5 c8 ff ff call 80103780 <cpuid>
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
80106e8b: 69 c0 b0 00 00 00 imul $0xb0,%eax,%eax
80106e91: 31 c9 xor %ecx,%ecx
80106e93: ba ff ff ff ff mov $0xffffffff,%edx
80106e98: 66 89 90 f8 37 11 80 mov %dx,-0x7feec808(%eax)
80106e9f: 66 89 88 fa 37 11 80 mov %cx,-0x7feec806(%eax)
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80106ea6: ba ff ff ff ff mov $0xffffffff,%edx
80106eab: 31 c9 xor %ecx,%ecx
80106ead: 66 89 90 00 38 11 80 mov %dx,-0x7feec800(%eax)
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80106eb4: ba ff ff ff ff mov $0xffffffff,%edx
// Cannot share a CODE descriptor for both kernel and user
// because it would have to have DPL_USR, but the CPU forbids
// an interrupt from CPL=0 to DPL=3.
c = &cpus[cpuid()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80106eb9: 66 89 88 02 38 11 80 mov %cx,-0x7feec7fe(%eax)
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80106ec0: 31 c9 xor %ecx,%ecx
80106ec2: 66 89 90 08 38 11 80 mov %dx,-0x7feec7f8(%eax)
80106ec9: 66 89 88 0a 38 11 80 mov %cx,-0x7feec7f6(%eax)
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
80106ed0: ba ff ff ff ff mov $0xffffffff,%edx
80106ed5: 31 c9 xor %ecx,%ecx
80106ed7: 66 89 90 10 38 11 80 mov %dx,-0x7feec7f0(%eax)
// Map "logical" addresses to virtual addresses using identity map.
// Cannot share a CODE descriptor for both kernel and user
// because it would have to have DPL_USR, but the CPU forbids
// an interrupt from CPL=0 to DPL=3.
c = &cpus[cpuid()];
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0);
80106ede: c6 80 fc 37 11 80 00 movb $0x0,-0x7feec804(%eax)
static inline void
lgdt(struct segdesc *p, int size)
{
volatile ushort pd[3];
pd[0] = size-1;
80106ee5: ba 2f 00 00 00 mov $0x2f,%edx
80106eea: c6 80 fd 37 11 80 9a movb $0x9a,-0x7feec803(%eax)
80106ef1: c6 80 fe 37 11 80 cf movb $0xcf,-0x7feec802(%eax)
80106ef8: c6 80 ff 37 11 80 00 movb $0x0,-0x7feec801(%eax)
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
80106eff: c6 80 04 38 11 80 00 movb $0x0,-0x7feec7fc(%eax)
80106f06: c6 80 05 38 11 80 92 movb $0x92,-0x7feec7fb(%eax)
80106f0d: c6 80 06 38 11 80 cf movb $0xcf,-0x7feec7fa(%eax)
80106f14: c6 80 07 38 11 80 00 movb $0x0,-0x7feec7f9(%eax)
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
80106f1b: c6 80 0c 38 11 80 00 movb $0x0,-0x7feec7f4(%eax)
80106f22: c6 80 0d 38 11 80 fa movb $0xfa,-0x7feec7f3(%eax)
80106f29: c6 80 0e 38 11 80 cf movb $0xcf,-0x7feec7f2(%eax)
80106f30: c6 80 0f 38 11 80 00 movb $0x0,-0x7feec7f1(%eax)
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
80106f37: 66 89 88 12 38 11 80 mov %cx,-0x7feec7ee(%eax)
80106f3e: c6 80 14 38 11 80 00 movb $0x0,-0x7feec7ec(%eax)
80106f45: c6 80 15 38 11 80 f2 movb $0xf2,-0x7feec7eb(%eax)
80106f4c: c6 80 16 38 11 80 cf movb $0xcf,-0x7feec7ea(%eax)
80106f53: c6 80 17 38 11 80 00 movb $0x0,-0x7feec7e9(%eax)
lgdt(c->gdt, sizeof(c->gdt));
80106f5a: 05 f0 37 11 80 add $0x801137f0,%eax
80106f5f: 66 89 55 f2 mov %dx,-0xe(%ebp)
pd[1] = (uint)p;
80106f63: 66 89 45 f4 mov %ax,-0xc(%ebp)
pd[2] = (uint)p >> 16;
80106f67: c1 e8 10 shr $0x10,%eax
80106f6a: 66 89 45 f6 mov %ax,-0xa(%ebp)
asm volatile("lgdt (%0)" : : "r" (pd));
80106f6e: 8d 45 f2 lea -0xe(%ebp),%eax
80106f71: 0f 01 10 lgdtl (%eax)
}
80106f74: c9 leave
80106f75: c3 ret
80106f76: 8d 76 00 lea 0x0(%esi),%esi
80106f79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106f80 <switchkvm>:
}
static inline void
lcr3(uint val)
{
asm volatile("movl %0,%%cr3" : : "r" (val));
80106f80: a1 a4 67 11 80 mov 0x801167a4,%eax
// Switch h/w page table register to the kernel-only page table,
// for when no process is running.
void
switchkvm(void)
{
80106f85: 55 push %ebp
80106f86: 89 e5 mov %esp,%ebp
80106f88: 05 00 00 00 80 add $0x80000000,%eax
80106f8d: 0f 22 d8 mov %eax,%cr3
lcr3(V2P(kpgdir)); // switch to the kernel page table
}
80106f90: 5d pop %ebp
80106f91: c3 ret
80106f92: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80106f99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80106fa0 <switchuvm>:
// Switch TSS and h/w page table to correspond to process p.
void
switchuvm(struct proc *p)
{
80106fa0: 55 push %ebp
80106fa1: 89 e5 mov %esp,%ebp
80106fa3: 57 push %edi
80106fa4: 56 push %esi
80106fa5: 53 push %ebx
80106fa6: 83 ec 1c sub $0x1c,%esp
80106fa9: 8b 75 08 mov 0x8(%ebp),%esi
if(p == 0)
80106fac: 85 f6 test %esi,%esi
80106fae: 0f 84 cd 00 00 00 je 80107081 <switchuvm+0xe1>
panic("switchuvm: no process");
if(p->kstack == 0)
80106fb4: 8b 46 08 mov 0x8(%esi),%eax
80106fb7: 85 c0 test %eax,%eax
80106fb9: 0f 84 dc 00 00 00 je 8010709b <switchuvm+0xfb>
panic("switchuvm: no kstack");
if(p->pgdir == 0)
80106fbf: 8b 7e 04 mov 0x4(%esi),%edi
80106fc2: 85 ff test %edi,%edi
80106fc4: 0f 84 c4 00 00 00 je 8010708e <switchuvm+0xee>
panic("switchuvm: no pgdir");
pushcli();
80106fca: e8 b1 d8 ff ff call 80104880 <pushcli>
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
80106fcf: e8 2c c7 ff ff call 80103700 <mycpu>
80106fd4: 89 c3 mov %eax,%ebx
80106fd6: e8 25 c7 ff ff call 80103700 <mycpu>
80106fdb: 89 c7 mov %eax,%edi
80106fdd: e8 1e c7 ff ff call 80103700 <mycpu>
80106fe2: 89 45 e4 mov %eax,-0x1c(%ebp)
80106fe5: 83 c7 08 add $0x8,%edi
80106fe8: e8 13 c7 ff ff call 80103700 <mycpu>
80106fed: 8b 4d e4 mov -0x1c(%ebp),%ecx
80106ff0: 83 c0 08 add $0x8,%eax
80106ff3: ba 67 00 00 00 mov $0x67,%edx
80106ff8: c1 e8 18 shr $0x18,%eax
80106ffb: 66 89 93 98 00 00 00 mov %dx,0x98(%ebx)
80107002: 66 89 bb 9a 00 00 00 mov %di,0x9a(%ebx)
80107009: c6 83 9d 00 00 00 99 movb $0x99,0x9d(%ebx)
80107010: c6 83 9e 00 00 00 40 movb $0x40,0x9e(%ebx)
80107017: 83 c1 08 add $0x8,%ecx
8010701a: 88 83 9f 00 00 00 mov %al,0x9f(%ebx)
80107020: c1 e9 10 shr $0x10,%ecx
80107023: 88 8b 9c 00 00 00 mov %cl,0x9c(%ebx)
mycpu()->gdt[SEG_TSS].s = 0;
mycpu()->ts.ss0 = SEG_KDATA << 3;
mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE;
// setting IOPL=0 in eflags *and* iomb beyond the tss segment limit
// forbids I/O instructions (e.g., inb and outb) from user space
mycpu()->ts.iomb = (ushort) 0xFFFF;
80107029: bb ff ff ff ff mov $0xffffffff,%ebx
panic("switchuvm: no pgdir");
pushcli();
mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts,
sizeof(mycpu()->ts)-1, 0);
mycpu()->gdt[SEG_TSS].s = 0;
8010702e: e8 cd c6 ff ff call 80103700 <mycpu>
80107033: 80 a0 9d 00 00 00 ef andb $0xef,0x9d(%eax)
mycpu()->ts.ss0 = SEG_KDATA << 3;
8010703a: e8 c1 c6 ff ff call 80103700 <mycpu>
8010703f: b9 10 00 00 00 mov $0x10,%ecx
80107044: 66 89 48 10 mov %cx,0x10(%eax)
mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE;
80107048: e8 b3 c6 ff ff call 80103700 <mycpu>
8010704d: 8b 56 08 mov 0x8(%esi),%edx
80107050: 8d 8a 00 10 00 00 lea 0x1000(%edx),%ecx
80107056: 89 48 0c mov %ecx,0xc(%eax)
// setting IOPL=0 in eflags *and* iomb beyond the tss segment limit
// forbids I/O instructions (e.g., inb and outb) from user space
mycpu()->ts.iomb = (ushort) 0xFFFF;
80107059: e8 a2 c6 ff ff call 80103700 <mycpu>
8010705e: 66 89 58 6e mov %bx,0x6e(%eax)
}
static inline void
ltr(ushort sel)
{
asm volatile("ltr %0" : : "r" (sel));
80107062: b8 28 00 00 00 mov $0x28,%eax
80107067: 0f 00 d8 ltr %ax
}
static inline void
lcr3(uint val)
{
asm volatile("movl %0,%%cr3" : : "r" (val));
8010706a: 8b 46 04 mov 0x4(%esi),%eax
8010706d: 05 00 00 00 80 add $0x80000000,%eax
80107072: 0f 22 d8 mov %eax,%cr3
ltr(SEG_TSS << 3);
lcr3(V2P(p->pgdir)); // switch to process's address space
popcli();
}
80107075: 8d 65 f4 lea -0xc(%ebp),%esp
80107078: 5b pop %ebx
80107079: 5e pop %esi
8010707a: 5f pop %edi
8010707b: 5d pop %ebp
// setting IOPL=0 in eflags *and* iomb beyond the tss segment limit
// forbids I/O instructions (e.g., inb and outb) from user space
mycpu()->ts.iomb = (ushort) 0xFFFF;
ltr(SEG_TSS << 3);
lcr3(V2P(p->pgdir)); // switch to process's address space
popcli();
8010707c: e9 ef d8 ff ff jmp 80104970 <popcli>
// Switch TSS and h/w page table to correspond to process p.
void
switchuvm(struct proc *p)
{
if(p == 0)
panic("switchuvm: no process");
80107081: 83 ec 0c sub $0xc,%esp
80107084: 68 82 7f 10 80 push $0x80107f82
80107089: e8 e2 92 ff ff call 80100370 <panic>
if(p->kstack == 0)
panic("switchuvm: no kstack");
if(p->pgdir == 0)
panic("switchuvm: no pgdir");
8010708e: 83 ec 0c sub $0xc,%esp
80107091: 68 ad 7f 10 80 push $0x80107fad
80107096: e8 d5 92 ff ff call 80100370 <panic>
switchuvm(struct proc *p)
{
if(p == 0)
panic("switchuvm: no process");
if(p->kstack == 0)
panic("switchuvm: no kstack");
8010709b: 83 ec 0c sub $0xc,%esp
8010709e: 68 98 7f 10 80 push $0x80107f98
801070a3: e8 c8 92 ff ff call 80100370 <panic>
801070a8: 90 nop
801070a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801070b0 <inituvm>:
// Load the initcode into address 0 of pgdir.
// sz must be less than a page.
void
inituvm(pde_t *pgdir, char *init, uint sz)
{
801070b0: 55 push %ebp
801070b1: 89 e5 mov %esp,%ebp
801070b3: 57 push %edi
801070b4: 56 push %esi
801070b5: 53 push %ebx
801070b6: 83 ec 1c sub $0x1c,%esp
801070b9: 8b 75 10 mov 0x10(%ebp),%esi
801070bc: 8b 45 08 mov 0x8(%ebp),%eax
801070bf: 8b 7d 0c mov 0xc(%ebp),%edi
char *mem;
if(sz >= PGSIZE)
801070c2: 81 fe ff 0f 00 00 cmp $0xfff,%esi
// Load the initcode into address 0 of pgdir.
// sz must be less than a page.
void
inituvm(pde_t *pgdir, char *init, uint sz)
{
801070c8: 89 45 e4 mov %eax,-0x1c(%ebp)
char *mem;
if(sz >= PGSIZE)
801070cb: 77 49 ja 80107116 <inituvm+0x66>
panic("inituvm: more than a page");
mem = kalloc();
801070cd: e8 be b3 ff ff call 80102490 <kalloc>
memset(mem, 0, PGSIZE);
801070d2: 83 ec 04 sub $0x4,%esp
{
char *mem;
if(sz >= PGSIZE)
panic("inituvm: more than a page");
mem = kalloc();
801070d5: 89 c3 mov %eax,%ebx
memset(mem, 0, PGSIZE);
801070d7: 68 00 10 00 00 push $0x1000
801070dc: 6a 00 push $0x0
801070de: 50 push %eax
801070df: e8 4c d9 ff ff call 80104a30 <memset>
mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U);
801070e4: 58 pop %eax
801070e5: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax
801070eb: b9 00 10 00 00 mov $0x1000,%ecx
801070f0: 5a pop %edx
801070f1: 6a 06 push $0x6
801070f3: 50 push %eax
801070f4: 31 d2 xor %edx,%edx
801070f6: 8b 45 e4 mov -0x1c(%ebp),%eax
801070f9: e8 52 fc ff ff call 80106d50 <mappages>
memmove(mem, init, sz);
801070fe: 89 75 10 mov %esi,0x10(%ebp)
80107101: 89 7d 0c mov %edi,0xc(%ebp)
80107104: 83 c4 10 add $0x10,%esp
80107107: 89 5d 08 mov %ebx,0x8(%ebp)
}
8010710a: 8d 65 f4 lea -0xc(%ebp),%esp
8010710d: 5b pop %ebx
8010710e: 5e pop %esi
8010710f: 5f pop %edi
80107110: 5d pop %ebp
if(sz >= PGSIZE)
panic("inituvm: more than a page");
mem = kalloc();
memset(mem, 0, PGSIZE);
mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U);
memmove(mem, init, sz);
80107111: e9 ca d9 ff ff jmp 80104ae0 <memmove>
inituvm(pde_t *pgdir, char *init, uint sz)
{
char *mem;
if(sz >= PGSIZE)
panic("inituvm: more than a page");
80107116: 83 ec 0c sub $0xc,%esp
80107119: 68 c1 7f 10 80 push $0x80107fc1
8010711e: e8 4d 92 ff ff call 80100370 <panic>
80107123: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80107129: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107130 <loaduvm>:
// Load a program segment into pgdir. addr must be page-aligned
// and the pages from addr to addr+sz must already be mapped.
int
loaduvm(pde_t *pgdir, char *addr, struct inode *ip, uint offset, uint sz)
{
80107130: 55 push %ebp
80107131: 89 e5 mov %esp,%ebp
80107133: 57 push %edi
80107134: 56 push %esi
80107135: 53 push %ebx
80107136: 83 ec 0c sub $0xc,%esp
uint i, pa, n;
pte_t *pte;
if((uint) addr % PGSIZE != 0)
80107139: f7 45 0c ff 0f 00 00 testl $0xfff,0xc(%ebp)
80107140: 0f 85 91 00 00 00 jne 801071d7 <loaduvm+0xa7>
panic("loaduvm: addr must be page aligned");
for(i = 0; i < sz; i += PGSIZE){
80107146: 8b 75 18 mov 0x18(%ebp),%esi
80107149: 31 db xor %ebx,%ebx
8010714b: 85 f6 test %esi,%esi
8010714d: 75 1a jne 80107169 <loaduvm+0x39>
8010714f: eb 6f jmp 801071c0 <loaduvm+0x90>
80107151: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107158: 81 c3 00 10 00 00 add $0x1000,%ebx
8010715e: 81 ee 00 10 00 00 sub $0x1000,%esi
80107164: 39 5d 18 cmp %ebx,0x18(%ebp)
80107167: 76 57 jbe 801071c0 <loaduvm+0x90>
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
80107169: 8b 55 0c mov 0xc(%ebp),%edx
8010716c: 8b 45 08 mov 0x8(%ebp),%eax
8010716f: 31 c9 xor %ecx,%ecx
80107171: 01 da add %ebx,%edx
80107173: e8 58 fb ff ff call 80106cd0 <walkpgdir>
80107178: 85 c0 test %eax,%eax
8010717a: 74 4e je 801071ca <loaduvm+0x9a>
panic("loaduvm: address should exist");
pa = PTE_ADDR(*pte);
8010717c: 8b 00 mov (%eax),%eax
if(sz - i < PGSIZE)
n = sz - i;
else
n = PGSIZE;
if(readi(ip, P2V(pa), offset+i, n) != n)
8010717e: 8b 4d 14 mov 0x14(%ebp),%ecx
panic("loaduvm: addr must be page aligned");
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
panic("loaduvm: address should exist");
pa = PTE_ADDR(*pte);
if(sz - i < PGSIZE)
80107181: bf 00 10 00 00 mov $0x1000,%edi
if((uint) addr % PGSIZE != 0)
panic("loaduvm: addr must be page aligned");
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
panic("loaduvm: address should exist");
pa = PTE_ADDR(*pte);
80107186: 25 00 f0 ff ff and $0xfffff000,%eax
if(sz - i < PGSIZE)
8010718b: 81 fe ff 0f 00 00 cmp $0xfff,%esi
80107191: 0f 46 fe cmovbe %esi,%edi
n = sz - i;
else
n = PGSIZE;
if(readi(ip, P2V(pa), offset+i, n) != n)
80107194: 01 d9 add %ebx,%ecx
80107196: 05 00 00 00 80 add $0x80000000,%eax
8010719b: 57 push %edi
8010719c: 51 push %ecx
8010719d: 50 push %eax
8010719e: ff 75 10 pushl 0x10(%ebp)
801071a1: e8 aa a7 ff ff call 80101950 <readi>
801071a6: 83 c4 10 add $0x10,%esp
801071a9: 39 c7 cmp %eax,%edi
801071ab: 74 ab je 80107158 <loaduvm+0x28>
return -1;
}
return 0;
}
801071ad: 8d 65 f4 lea -0xc(%ebp),%esp
if(sz - i < PGSIZE)
n = sz - i;
else
n = PGSIZE;
if(readi(ip, P2V(pa), offset+i, n) != n)
return -1;
801071b0: b8 ff ff ff ff mov $0xffffffff,%eax
}
return 0;
}
801071b5: 5b pop %ebx
801071b6: 5e pop %esi
801071b7: 5f pop %edi
801071b8: 5d pop %ebp
801071b9: c3 ret
801071ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801071c0: 8d 65 f4 lea -0xc(%ebp),%esp
else
n = PGSIZE;
if(readi(ip, P2V(pa), offset+i, n) != n)
return -1;
}
return 0;
801071c3: 31 c0 xor %eax,%eax
}
801071c5: 5b pop %ebx
801071c6: 5e pop %esi
801071c7: 5f pop %edi
801071c8: 5d pop %ebp
801071c9: c3 ret
if((uint) addr % PGSIZE != 0)
panic("loaduvm: addr must be page aligned");
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, addr+i, 0)) == 0)
panic("loaduvm: address should exist");
801071ca: 83 ec 0c sub $0xc,%esp
801071cd: 68 db 7f 10 80 push $0x80107fdb
801071d2: e8 99 91 ff ff call 80100370 <panic>
{
uint i, pa, n;
pte_t *pte;
if((uint) addr % PGSIZE != 0)
panic("loaduvm: addr must be page aligned");
801071d7: 83 ec 0c sub $0xc,%esp
801071da: 68 7c 80 10 80 push $0x8010807c
801071df: e8 8c 91 ff ff call 80100370 <panic>
801071e4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801071ea: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801071f0 <allocuvm>:
// Allocate page tables and physical memory to grow process from oldsz to
// newsz, which need not be page aligned. Returns new size or 0 on error.
int
allocuvm(pde_t *pgdir, uint oldsz, uint newsz)
{
801071f0: 55 push %ebp
801071f1: 89 e5 mov %esp,%ebp
801071f3: 57 push %edi
801071f4: 56 push %esi
801071f5: 53 push %ebx
801071f6: 83 ec 0c sub $0xc,%esp
801071f9: 8b 7d 10 mov 0x10(%ebp),%edi
char *mem;
uint a;
if(newsz >= KERNBASE)
801071fc: 85 ff test %edi,%edi
801071fe: 0f 88 ca 00 00 00 js 801072ce <allocuvm+0xde>
return 0;
if(newsz < oldsz)
80107204: 3b 7d 0c cmp 0xc(%ebp),%edi
return oldsz;
80107207: 8b 45 0c mov 0xc(%ebp),%eax
char *mem;
uint a;
if(newsz >= KERNBASE)
return 0;
if(newsz < oldsz)
8010720a: 0f 82 82 00 00 00 jb 80107292 <allocuvm+0xa2>
return oldsz;
a = PGROUNDUP(oldsz);
80107210: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx
80107216: 81 e3 00 f0 ff ff and $0xfffff000,%ebx
for(; a < newsz; a += PGSIZE){
8010721c: 39 df cmp %ebx,%edi
8010721e: 77 43 ja 80107263 <allocuvm+0x73>
80107220: e9 bb 00 00 00 jmp 801072e0 <allocuvm+0xf0>
80107225: 8d 76 00 lea 0x0(%esi),%esi
if(mem == 0){
cprintf("allocuvm out of memory\n");
deallocuvm(pgdir, newsz, oldsz);
return 0;
}
memset(mem, 0, PGSIZE);
80107228: 83 ec 04 sub $0x4,%esp
8010722b: 68 00 10 00 00 push $0x1000
80107230: 6a 00 push $0x0
80107232: 50 push %eax
80107233: e8 f8 d7 ff ff call 80104a30 <memset>
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
80107238: 58 pop %eax
80107239: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax
8010723f: b9 00 10 00 00 mov $0x1000,%ecx
80107244: 5a pop %edx
80107245: 6a 06 push $0x6
80107247: 50 push %eax
80107248: 89 da mov %ebx,%edx
8010724a: 8b 45 08 mov 0x8(%ebp),%eax
8010724d: e8 fe fa ff ff call 80106d50 <mappages>
80107252: 83 c4 10 add $0x10,%esp
80107255: 85 c0 test %eax,%eax
80107257: 78 47 js 801072a0 <allocuvm+0xb0>
return 0;
if(newsz < oldsz)
return oldsz;
a = PGROUNDUP(oldsz);
for(; a < newsz; a += PGSIZE){
80107259: 81 c3 00 10 00 00 add $0x1000,%ebx
8010725f: 39 df cmp %ebx,%edi
80107261: 76 7d jbe 801072e0 <allocuvm+0xf0>
mem = kalloc();
80107263: e8 28 b2 ff ff call 80102490 <kalloc>
if(mem == 0){
80107268: 85 c0 test %eax,%eax
if(newsz < oldsz)
return oldsz;
a = PGROUNDUP(oldsz);
for(; a < newsz; a += PGSIZE){
mem = kalloc();
8010726a: 89 c6 mov %eax,%esi
if(mem == 0){
8010726c: 75 ba jne 80107228 <allocuvm+0x38>
cprintf("allocuvm out of memory\n");
8010726e: 83 ec 0c sub $0xc,%esp
80107271: 68 f9 7f 10 80 push $0x80107ff9
80107276: e8 e5 93 ff ff call 80100660 <cprintf>
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
{
pte_t *pte;
uint a, pa;
if(newsz >= oldsz)
8010727b: 83 c4 10 add $0x10,%esp
8010727e: 3b 7d 0c cmp 0xc(%ebp),%edi
80107281: 76 4b jbe 801072ce <allocuvm+0xde>
80107283: 8b 4d 0c mov 0xc(%ebp),%ecx
80107286: 8b 45 08 mov 0x8(%ebp),%eax
80107289: 89 fa mov %edi,%edx
8010728b: e8 50 fb ff ff call 80106de0 <deallocuvm.part.0>
for(; a < newsz; a += PGSIZE){
mem = kalloc();
if(mem == 0){
cprintf("allocuvm out of memory\n");
deallocuvm(pgdir, newsz, oldsz);
return 0;
80107290: 31 c0 xor %eax,%eax
kfree(mem);
return 0;
}
}
return newsz;
}
80107292: 8d 65 f4 lea -0xc(%ebp),%esp
80107295: 5b pop %ebx
80107296: 5e pop %esi
80107297: 5f pop %edi
80107298: 5d pop %ebp
80107299: c3 ret
8010729a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
deallocuvm(pgdir, newsz, oldsz);
return 0;
}
memset(mem, 0, PGSIZE);
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
cprintf("allocuvm out of memory (2)\n");
801072a0: 83 ec 0c sub $0xc,%esp
801072a3: 68 11 80 10 80 push $0x80108011
801072a8: e8 b3 93 ff ff call 80100660 <cprintf>
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
{
pte_t *pte;
uint a, pa;
if(newsz >= oldsz)
801072ad: 83 c4 10 add $0x10,%esp
801072b0: 3b 7d 0c cmp 0xc(%ebp),%edi
801072b3: 76 0d jbe 801072c2 <allocuvm+0xd2>
801072b5: 8b 4d 0c mov 0xc(%ebp),%ecx
801072b8: 8b 45 08 mov 0x8(%ebp),%eax
801072bb: 89 fa mov %edi,%edx
801072bd: e8 1e fb ff ff call 80106de0 <deallocuvm.part.0>
}
memset(mem, 0, PGSIZE);
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
cprintf("allocuvm out of memory (2)\n");
deallocuvm(pgdir, newsz, oldsz);
kfree(mem);
801072c2: 83 ec 0c sub $0xc,%esp
801072c5: 56 push %esi
801072c6: e8 15 b0 ff ff call 801022e0 <kfree>
return 0;
801072cb: 83 c4 10 add $0x10,%esp
}
}
return newsz;
}
801072ce: 8d 65 f4 lea -0xc(%ebp),%esp
memset(mem, 0, PGSIZE);
if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){
cprintf("allocuvm out of memory (2)\n");
deallocuvm(pgdir, newsz, oldsz);
kfree(mem);
return 0;
801072d1: 31 c0 xor %eax,%eax
}
}
return newsz;
}
801072d3: 5b pop %ebx
801072d4: 5e pop %esi
801072d5: 5f pop %edi
801072d6: 5d pop %ebp
801072d7: c3 ret
801072d8: 90 nop
801072d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
801072e0: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
if(newsz < oldsz)
return oldsz;
a = PGROUNDUP(oldsz);
for(; a < newsz; a += PGSIZE){
801072e3: 89 f8 mov %edi,%eax
kfree(mem);
return 0;
}
}
return newsz;
}
801072e5: 5b pop %ebx
801072e6: 5e pop %esi
801072e7: 5f pop %edi
801072e8: 5d pop %ebp
801072e9: c3 ret
801072ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
801072f0 <deallocuvm>:
// newsz. oldsz and newsz need not be page-aligned, nor does newsz
// need to be less than oldsz. oldsz can be larger than the actual
// process size. Returns the new process size.
int
deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)
{
801072f0: 55 push %ebp
801072f1: 89 e5 mov %esp,%ebp
801072f3: 8b 55 0c mov 0xc(%ebp),%edx
801072f6: 8b 4d 10 mov 0x10(%ebp),%ecx
801072f9: 8b 45 08 mov 0x8(%ebp),%eax
pte_t *pte;
uint a, pa;
if(newsz >= oldsz)
801072fc: 39 d1 cmp %edx,%ecx
801072fe: 73 10 jae 80107310 <deallocuvm+0x20>
kfree(v);
*pte = 0;
}
}
return newsz;
}
80107300: 5d pop %ebp
80107301: e9 da fa ff ff jmp 80106de0 <deallocuvm.part.0>
80107306: 8d 76 00 lea 0x0(%esi),%esi
80107309: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
80107310: 89 d0 mov %edx,%eax
80107312: 5d pop %ebp
80107313: c3 ret
80107314: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010731a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
80107320 <freevm>:
// Free a page table and all the physical memory pages
// in the user part.
void
freevm(pde_t *pgdir)
{
80107320: 55 push %ebp
80107321: 89 e5 mov %esp,%ebp
80107323: 57 push %edi
80107324: 56 push %esi
80107325: 53 push %ebx
80107326: 83 ec 0c sub $0xc,%esp
80107329: 8b 75 08 mov 0x8(%ebp),%esi
uint i;
if(pgdir == 0)
8010732c: 85 f6 test %esi,%esi
8010732e: 74 59 je 80107389 <freevm+0x69>
80107330: 31 c9 xor %ecx,%ecx
80107332: ba 00 00 00 80 mov $0x80000000,%edx
80107337: 89 f0 mov %esi,%eax
80107339: e8 a2 fa ff ff call 80106de0 <deallocuvm.part.0>
8010733e: 89 f3 mov %esi,%ebx
80107340: 8d be 00 10 00 00 lea 0x1000(%esi),%edi
80107346: eb 0f jmp 80107357 <freevm+0x37>
80107348: 90 nop
80107349: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107350: 83 c3 04 add $0x4,%ebx
panic("freevm: no pgdir");
deallocuvm(pgdir, KERNBASE, 0);
for(i = 0; i < NPDENTRIES; i++){
80107353: 39 fb cmp %edi,%ebx
80107355: 74 23 je 8010737a <freevm+0x5a>
if(pgdir[i] & PTE_P){
80107357: 8b 03 mov (%ebx),%eax
80107359: a8 01 test $0x1,%al
8010735b: 74 f3 je 80107350 <freevm+0x30>
char * v = P2V(PTE_ADDR(pgdir[i]));
kfree(v);
8010735d: 25 00 f0 ff ff and $0xfffff000,%eax
80107362: 83 ec 0c sub $0xc,%esp
80107365: 83 c3 04 add $0x4,%ebx
80107368: 05 00 00 00 80 add $0x80000000,%eax
8010736d: 50 push %eax
8010736e: e8 6d af ff ff call 801022e0 <kfree>
80107373: 83 c4 10 add $0x10,%esp
uint i;
if(pgdir == 0)
panic("freevm: no pgdir");
deallocuvm(pgdir, KERNBASE, 0);
for(i = 0; i < NPDENTRIES; i++){
80107376: 39 fb cmp %edi,%ebx
80107378: 75 dd jne 80107357 <freevm+0x37>
if(pgdir[i] & PTE_P){
char * v = P2V(PTE_ADDR(pgdir[i]));
kfree(v);
}
}
kfree((char*)pgdir);
8010737a: 89 75 08 mov %esi,0x8(%ebp)
}
8010737d: 8d 65 f4 lea -0xc(%ebp),%esp
80107380: 5b pop %ebx
80107381: 5e pop %esi
80107382: 5f pop %edi
80107383: 5d pop %ebp
if(pgdir[i] & PTE_P){
char * v = P2V(PTE_ADDR(pgdir[i]));
kfree(v);
}
}
kfree((char*)pgdir);
80107384: e9 57 af ff ff jmp 801022e0 <kfree>
freevm(pde_t *pgdir)
{
uint i;
if(pgdir == 0)
panic("freevm: no pgdir");
80107389: 83 ec 0c sub $0xc,%esp
8010738c: 68 2d 80 10 80 push $0x8010802d
80107391: e8 da 8f ff ff call 80100370 <panic>
80107396: 8d 76 00 lea 0x0(%esi),%esi
80107399: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
801073a0 <setupkvm>:
};
// Set up kernel part of a page table.
pde_t*
setupkvm(void)
{
801073a0: 55 push %ebp
801073a1: 89 e5 mov %esp,%ebp
801073a3: 56 push %esi
801073a4: 53 push %ebx
pde_t *pgdir;
struct kmap *k;
if((pgdir = (pde_t*)kalloc()) == 0)
801073a5: e8 e6 b0 ff ff call 80102490 <kalloc>
801073aa: 85 c0 test %eax,%eax
801073ac: 74 6a je 80107418 <setupkvm+0x78>
return 0;
memset(pgdir, 0, PGSIZE);
801073ae: 83 ec 04 sub $0x4,%esp
801073b1: 89 c6 mov %eax,%esi
if (P2V(PHYSTOP) > (void*)DEVSPACE)
panic("PHYSTOP too high");
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
801073b3: bb 20 b4 10 80 mov $0x8010b420,%ebx
pde_t *pgdir;
struct kmap *k;
if((pgdir = (pde_t*)kalloc()) == 0)
return 0;
memset(pgdir, 0, PGSIZE);
801073b8: 68 00 10 00 00 push $0x1000
801073bd: 6a 00 push $0x0
801073bf: 50 push %eax
801073c0: e8 6b d6 ff ff call 80104a30 <memset>
801073c5: 83 c4 10 add $0x10,%esp
if (P2V(PHYSTOP) > (void*)DEVSPACE)
panic("PHYSTOP too high");
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
801073c8: 8b 43 04 mov 0x4(%ebx),%eax
801073cb: 8b 4b 08 mov 0x8(%ebx),%ecx
801073ce: 83 ec 08 sub $0x8,%esp
801073d1: 8b 13 mov (%ebx),%edx
801073d3: ff 73 0c pushl 0xc(%ebx)
801073d6: 50 push %eax
801073d7: 29 c1 sub %eax,%ecx
801073d9: 89 f0 mov %esi,%eax
801073db: e8 70 f9 ff ff call 80106d50 <mappages>
801073e0: 83 c4 10 add $0x10,%esp
801073e3: 85 c0 test %eax,%eax
801073e5: 78 19 js 80107400 <setupkvm+0x60>
if((pgdir = (pde_t*)kalloc()) == 0)
return 0;
memset(pgdir, 0, PGSIZE);
if (P2V(PHYSTOP) > (void*)DEVSPACE)
panic("PHYSTOP too high");
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
801073e7: 83 c3 10 add $0x10,%ebx
801073ea: 81 fb 60 b4 10 80 cmp $0x8010b460,%ebx
801073f0: 75 d6 jne 801073c8 <setupkvm+0x28>
801073f2: 89 f0 mov %esi,%eax
(uint)k->phys_start, k->perm) < 0) {
freevm(pgdir);
return 0;
}
return pgdir;
}
801073f4: 8d 65 f8 lea -0x8(%ebp),%esp
801073f7: 5b pop %ebx
801073f8: 5e pop %esi
801073f9: 5d pop %ebp
801073fa: c3 ret
801073fb: 90 nop
801073fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if (P2V(PHYSTOP) > (void*)DEVSPACE)
panic("PHYSTOP too high");
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
(uint)k->phys_start, k->perm) < 0) {
freevm(pgdir);
80107400: 83 ec 0c sub $0xc,%esp
80107403: 56 push %esi
80107404: e8 17 ff ff ff call 80107320 <freevm>
return 0;
80107409: 83 c4 10 add $0x10,%esp
}
return pgdir;
}
8010740c: 8d 65 f8 lea -0x8(%ebp),%esp
panic("PHYSTOP too high");
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
(uint)k->phys_start, k->perm) < 0) {
freevm(pgdir);
return 0;
8010740f: 31 c0 xor %eax,%eax
}
return pgdir;
}
80107411: 5b pop %ebx
80107412: 5e pop %esi
80107413: 5d pop %ebp
80107414: c3 ret
80107415: 8d 76 00 lea 0x0(%esi),%esi
{
pde_t *pgdir;
struct kmap *k;
if((pgdir = (pde_t*)kalloc()) == 0)
return 0;
80107418: 31 c0 xor %eax,%eax
8010741a: eb d8 jmp 801073f4 <setupkvm+0x54>
8010741c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80107420 <kvmalloc>:
// Allocate one page table for the machine for the kernel address
// space for scheduler processes.
void
kvmalloc(void)
{
80107420: 55 push %ebp
80107421: 89 e5 mov %esp,%ebp
80107423: 83 ec 08 sub $0x8,%esp
kpgdir = setupkvm();
80107426: e8 75 ff ff ff call 801073a0 <setupkvm>
8010742b: a3 a4 67 11 80 mov %eax,0x801167a4
80107430: 05 00 00 00 80 add $0x80000000,%eax
80107435: 0f 22 d8 mov %eax,%cr3
switchkvm();
}
80107438: c9 leave
80107439: c3 ret
8010743a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
80107440 <clearpteu>:
// Clear PTE_U on a page. Used to create an inaccessible
// page beneath the user stack.
void
clearpteu(pde_t *pgdir, char *uva)
{
80107440: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107441: 31 c9 xor %ecx,%ecx
// Clear PTE_U on a page. Used to create an inaccessible
// page beneath the user stack.
void
clearpteu(pde_t *pgdir, char *uva)
{
80107443: 89 e5 mov %esp,%ebp
80107445: 83 ec 08 sub $0x8,%esp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107448: 8b 55 0c mov 0xc(%ebp),%edx
8010744b: 8b 45 08 mov 0x8(%ebp),%eax
8010744e: e8 7d f8 ff ff call 80106cd0 <walkpgdir>
if(pte == 0)
80107453: 85 c0 test %eax,%eax
80107455: 74 05 je 8010745c <clearpteu+0x1c>
panic("clearpteu");
*pte &= ~PTE_U;
80107457: 83 20 fb andl $0xfffffffb,(%eax)
}
8010745a: c9 leave
8010745b: c3 ret
{
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
if(pte == 0)
panic("clearpteu");
8010745c: 83 ec 0c sub $0xc,%esp
8010745f: 68 3e 80 10 80 push $0x8010803e
80107464: e8 07 8f ff ff call 80100370 <panic>
80107469: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107470 <copyuvm>:
// Given a parent process's page table, create a copy
// of it for a child.
pde_t*
copyuvm(pde_t *pgdir, uint sz)
{
80107470: 55 push %ebp
80107471: 89 e5 mov %esp,%ebp
80107473: 57 push %edi
80107474: 56 push %esi
80107475: 53 push %ebx
80107476: 83 ec 1c sub $0x1c,%esp
pde_t *d;
pte_t *pte;
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
80107479: e8 22 ff ff ff call 801073a0 <setupkvm>
8010747e: 85 c0 test %eax,%eax
80107480: 89 45 e0 mov %eax,-0x20(%ebp)
80107483: 0f 84 b2 00 00 00 je 8010753b <copyuvm+0xcb>
return 0;
for(i = 0; i < sz; i += PGSIZE){
80107489: 8b 4d 0c mov 0xc(%ebp),%ecx
8010748c: 85 c9 test %ecx,%ecx
8010748e: 0f 84 9c 00 00 00 je 80107530 <copyuvm+0xc0>
80107494: 31 f6 xor %esi,%esi
80107496: eb 4a jmp 801074e2 <copyuvm+0x72>
80107498: 90 nop
80107499: 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);
801074a0: 83 ec 04 sub $0x4,%esp
801074a3: 81 c7 00 00 00 80 add $0x80000000,%edi
801074a9: 68 00 10 00 00 push $0x1000
801074ae: 57 push %edi
801074af: 50 push %eax
801074b0: e8 2b d6 ff ff call 80104ae0 <memmove>
if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0)
801074b5: 58 pop %eax
801074b6: 5a pop %edx
801074b7: 8d 93 00 00 00 80 lea -0x80000000(%ebx),%edx
801074bd: 8b 45 e0 mov -0x20(%ebp),%eax
801074c0: ff 75 e4 pushl -0x1c(%ebp)
801074c3: b9 00 10 00 00 mov $0x1000,%ecx
801074c8: 52 push %edx
801074c9: 89 f2 mov %esi,%edx
801074cb: e8 80 f8 ff ff call 80106d50 <mappages>
801074d0: 83 c4 10 add $0x10,%esp
801074d3: 85 c0 test %eax,%eax
801074d5: 78 3e js 80107515 <copyuvm+0xa5>
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
return 0;
for(i = 0; i < sz; i += PGSIZE){
801074d7: 81 c6 00 10 00 00 add $0x1000,%esi
801074dd: 39 75 0c cmp %esi,0xc(%ebp)
801074e0: 76 4e jbe 80107530 <copyuvm+0xc0>
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
801074e2: 8b 45 08 mov 0x8(%ebp),%eax
801074e5: 31 c9 xor %ecx,%ecx
801074e7: 89 f2 mov %esi,%edx
801074e9: e8 e2 f7 ff ff call 80106cd0 <walkpgdir>
801074ee: 85 c0 test %eax,%eax
801074f0: 74 5a je 8010754c <copyuvm+0xdc>
panic("copyuvm: pte should exist");
if(!(*pte & PTE_P))
801074f2: 8b 18 mov (%eax),%ebx
801074f4: f6 c3 01 test $0x1,%bl
801074f7: 74 46 je 8010753f <copyuvm+0xcf>
panic("copyuvm: page not present");
pa = PTE_ADDR(*pte);
801074f9: 89 df mov %ebx,%edi
flags = PTE_FLAGS(*pte);
801074fb: 81 e3 ff 0f 00 00 and $0xfff,%ebx
80107501: 89 5d e4 mov %ebx,-0x1c(%ebp)
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
panic("copyuvm: pte should exist");
if(!(*pte & PTE_P))
panic("copyuvm: page not present");
pa = PTE_ADDR(*pte);
80107504: 81 e7 00 f0 ff ff and $0xfffff000,%edi
flags = PTE_FLAGS(*pte);
if((mem = kalloc()) == 0)
8010750a: e8 81 af ff ff call 80102490 <kalloc>
8010750f: 85 c0 test %eax,%eax
80107511: 89 c3 mov %eax,%ebx
80107513: 75 8b jne 801074a0 <copyuvm+0x30>
goto bad;
}
return d;
bad:
freevm(d);
80107515: 83 ec 0c sub $0xc,%esp
80107518: ff 75 e0 pushl -0x20(%ebp)
8010751b: e8 00 fe ff ff call 80107320 <freevm>
return 0;
80107520: 83 c4 10 add $0x10,%esp
80107523: 31 c0 xor %eax,%eax
}
80107525: 8d 65 f4 lea -0xc(%ebp),%esp
80107528: 5b pop %ebx
80107529: 5e pop %esi
8010752a: 5f pop %edi
8010752b: 5d pop %ebp
8010752c: c3 ret
8010752d: 8d 76 00 lea 0x0(%esi),%esi
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
return 0;
for(i = 0; i < sz; i += PGSIZE){
80107530: 8b 45 e0 mov -0x20(%ebp),%eax
return d;
bad:
freevm(d);
return 0;
}
80107533: 8d 65 f4 lea -0xc(%ebp),%esp
80107536: 5b pop %ebx
80107537: 5e pop %esi
80107538: 5f pop %edi
80107539: 5d pop %ebp
8010753a: c3 ret
pte_t *pte;
uint pa, i, flags;
char *mem;
if((d = setupkvm()) == 0)
return 0;
8010753b: 31 c0 xor %eax,%eax
8010753d: eb e6 jmp 80107525 <copyuvm+0xb5>
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
panic("copyuvm: pte should exist");
if(!(*pte & PTE_P))
panic("copyuvm: page not present");
8010753f: 83 ec 0c sub $0xc,%esp
80107542: 68 62 80 10 80 push $0x80108062
80107547: e8 24 8e ff ff call 80100370 <panic>
if((d = setupkvm()) == 0)
return 0;
for(i = 0; i < sz; i += PGSIZE){
if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0)
panic("copyuvm: pte should exist");
8010754c: 83 ec 0c sub $0xc,%esp
8010754f: 68 48 80 10 80 push $0x80108048
80107554: e8 17 8e ff ff call 80100370 <panic>
80107559: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107560 <uva2ka>:
}
// Map user virtual address to kernel address.
char*
uva2ka(pde_t *pgdir, char *uva)
{
80107560: 55 push %ebp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107561: 31 c9 xor %ecx,%ecx
}
// Map user virtual address to kernel address.
char*
uva2ka(pde_t *pgdir, char *uva)
{
80107563: 89 e5 mov %esp,%ebp
80107565: 83 ec 08 sub $0x8,%esp
pte_t *pte;
pte = walkpgdir(pgdir, uva, 0);
80107568: 8b 55 0c mov 0xc(%ebp),%edx
8010756b: 8b 45 08 mov 0x8(%ebp),%eax
8010756e: e8 5d f7 ff ff call 80106cd0 <walkpgdir>
if((*pte & PTE_P) == 0)
80107573: 8b 00 mov (%eax),%eax
return 0;
if((*pte & PTE_U) == 0)
80107575: 89 c2 mov %eax,%edx
80107577: 83 e2 05 and $0x5,%edx
8010757a: 83 fa 05 cmp $0x5,%edx
8010757d: 75 11 jne 80107590 <uva2ka+0x30>
return 0;
return (char*)P2V(PTE_ADDR(*pte));
8010757f: 25 00 f0 ff ff and $0xfffff000,%eax
}
80107584: c9 leave
pte = walkpgdir(pgdir, uva, 0);
if((*pte & PTE_P) == 0)
return 0;
if((*pte & PTE_U) == 0)
return 0;
return (char*)P2V(PTE_ADDR(*pte));
80107585: 05 00 00 00 80 add $0x80000000,%eax
}
8010758a: c3 ret
8010758b: 90 nop
8010758c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
pte = walkpgdir(pgdir, uva, 0);
if((*pte & PTE_P) == 0)
return 0;
if((*pte & PTE_U) == 0)
return 0;
80107590: 31 c0 xor %eax,%eax
return (char*)P2V(PTE_ADDR(*pte));
}
80107592: c9 leave
80107593: c3 ret
80107594: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8010759a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
801075a0 <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)
{
801075a0: 55 push %ebp
801075a1: 89 e5 mov %esp,%ebp
801075a3: 57 push %edi
801075a4: 56 push %esi
801075a5: 53 push %ebx
801075a6: 83 ec 1c sub $0x1c,%esp
801075a9: 8b 5d 14 mov 0x14(%ebp),%ebx
801075ac: 8b 55 0c mov 0xc(%ebp),%edx
801075af: 8b 7d 10 mov 0x10(%ebp),%edi
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
801075b2: 85 db test %ebx,%ebx
801075b4: 75 40 jne 801075f6 <copyout+0x56>
801075b6: eb 70 jmp 80107628 <copyout+0x88>
801075b8: 90 nop
801075b9: 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);
801075c0: 8b 55 e4 mov -0x1c(%ebp),%edx
801075c3: 89 f1 mov %esi,%ecx
801075c5: 29 d1 sub %edx,%ecx
801075c7: 81 c1 00 10 00 00 add $0x1000,%ecx
801075cd: 39 d9 cmp %ebx,%ecx
801075cf: 0f 47 cb cmova %ebx,%ecx
if(n > len)
n = len;
memmove(pa0 + (va - va0), buf, n);
801075d2: 29 f2 sub %esi,%edx
801075d4: 83 ec 04 sub $0x4,%esp
801075d7: 01 d0 add %edx,%eax
801075d9: 51 push %ecx
801075da: 57 push %edi
801075db: 50 push %eax
801075dc: 89 4d e4 mov %ecx,-0x1c(%ebp)
801075df: e8 fc d4 ff ff call 80104ae0 <memmove>
len -= n;
buf += n;
801075e4: 8b 4d e4 mov -0x1c(%ebp),%ecx
{
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
801075e7: 83 c4 10 add $0x10,%esp
if(n > len)
n = len;
memmove(pa0 + (va - va0), buf, n);
len -= n;
buf += n;
va = va0 + PGSIZE;
801075ea: 8d 96 00 10 00 00 lea 0x1000(%esi),%edx
n = PGSIZE - (va - va0);
if(n > len)
n = len;
memmove(pa0 + (va - va0), buf, n);
len -= n;
buf += n;
801075f0: 01 cf add %ecx,%edi
{
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
801075f2: 29 cb sub %ecx,%ebx
801075f4: 74 32 je 80107628 <copyout+0x88>
va0 = (uint)PGROUNDDOWN(va);
801075f6: 89 d6 mov %edx,%esi
pa0 = uva2ka(pgdir, (char*)va0);
801075f8: 83 ec 08 sub $0x8,%esp
char *buf, *pa0;
uint n, va0;
buf = (char*)p;
while(len > 0){
va0 = (uint)PGROUNDDOWN(va);
801075fb: 89 55 e4 mov %edx,-0x1c(%ebp)
801075fe: 81 e6 00 f0 ff ff and $0xfffff000,%esi
pa0 = uva2ka(pgdir, (char*)va0);
80107604: 56 push %esi
80107605: ff 75 08 pushl 0x8(%ebp)
80107608: e8 53 ff ff ff call 80107560 <uva2ka>
if(pa0 == 0)
8010760d: 83 c4 10 add $0x10,%esp
80107610: 85 c0 test %eax,%eax
80107612: 75 ac jne 801075c0 <copyout+0x20>
len -= n;
buf += n;
va = va0 + PGSIZE;
}
return 0;
}
80107614: 8d 65 f4 lea -0xc(%ebp),%esp
buf = (char*)p;
while(len > 0){
va0 = (uint)PGROUNDDOWN(va);
pa0 = uva2ka(pgdir, (char*)va0);
if(pa0 == 0)
return -1;
80107617: b8 ff ff ff ff mov $0xffffffff,%eax
len -= n;
buf += n;
va = va0 + PGSIZE;
}
return 0;
}
8010761c: 5b pop %ebx
8010761d: 5e pop %esi
8010761e: 5f pop %edi
8010761f: 5d pop %ebp
80107620: c3 ret
80107621: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80107628: 8d 65 f4 lea -0xc(%ebp),%esp
memmove(pa0 + (va - va0), buf, n);
len -= n;
buf += n;
va = va0 + PGSIZE;
}
return 0;
8010762b: 31 c0 xor %eax,%eax
}
8010762d: 5b pop %ebx
8010762e: 5e pop %esi
8010762f: 5f pop %edi
80107630: 5d pop %ebp
80107631: c3 ret
| 34.816216 | 91 | 0.52907 |
74f3c7f0e90d233a46e82af686e8bbb9665eaadd | 400 | asm | Assembly | Assembler/AssemblyCode/ADC_MACRO.asm | KPU-RISC/KPU | 9f85c322e1b8489eef31f0696799e0c6c7273c0e | [
"MIT"
] | 8 | 2017-04-16T16:53:03.000Z | 2021-09-14T22:29:28.000Z | Assembler/AssemblyCode/ADC_MACRO.asm | KPU-RISC/KPU | 9f85c322e1b8489eef31f0696799e0c6c7273c0e | [
"MIT"
] | null | null | null | Assembler/AssemblyCode/ADC_MACRO.asm | KPU-RISC/KPU | 9f85c322e1b8489eef31f0696799e0c6c7273c0e | [
"MIT"
] | null | null | null | :START
MOV XL, 0xAB
MOV XH, 0xFF
MOV Y, X
; Initialize the D and E registers
MOV D, [Y] ; 253d
MOV E, 01100100b ; 100d
ADD D, E
; Write register D to the Output Port
OUTB D
JNC :DONE
MOV D, [Y + 1]
MOV E, 00000001b ; Carry Bit
ADD D, E
; Write register D to the Output Port
OUTB D
:DONE
; Stops the CPU execution
HLT
DATA 1111111110101011b, 11111101b ; 253d
DATA 1111111110101100b, 00000000b | 13.793103 | 40 | 0.71 |
f52f58b36bdae327ea76c69fe37d24570cdc2915 | 45,514 | asm | Assembly | P6/P6Judger - 100 testpoints/testpoint/testpoint20.asm | flyinglandlord/BUAA-CO-2021 | 1aa28b09762dfb2376ed2aac4126839f0e6fcf93 | [
"MIT"
] | 5 | 2021-12-05T12:58:26.000Z | 2022-03-31T02:05:13.000Z | P6/P6Judger - 100 testpoints/testpoint/testpoint20.asm | OliverDu8-24/BUAA-CO-2021 | 9959abd90de9039d751bab64f153547e76066665 | [
"MIT"
] | null | null | null | P6/P6Judger - 100 testpoints/testpoint/testpoint20.asm | OliverDu8-24/BUAA-CO-2021 | 9959abd90de9039d751bab64f153547e76066665 | [
"MIT"
] | 2 | 2021-12-19T11:49:48.000Z | 2021-12-22T10:25:38.000Z | ori $1, $0, 13
ori $2, $0, 0
ori $3, $0, 13
ori $4, $0, 3
sw $2, 0($0)
sw $3, 4($0)
sw $1, 8($0)
sw $4, 12($0)
sw $1, 16($0)
sw $4, 20($0)
sw $2, 24($0)
sw $3, 28($0)
sw $4, 32($0)
sw $2, 36($0)
sw $2, 40($0)
sw $2, 44($0)
sw $2, 48($0)
sw $4, 52($0)
sw $3, 56($0)
sw $1, 60($0)
sw $1, 64($0)
sw $3, 68($0)
sw $2, 72($0)
sw $4, 76($0)
sw $2, 80($0)
sw $4, 84($0)
sw $4, 88($0)
sw $2, 92($0)
sw $1, 96($0)
sw $2, 100($0)
sw $2, 104($0)
sw $2, 108($0)
sw $2, 112($0)
sw $3, 116($0)
sw $4, 120($0)
sw $4, 124($0)
slt $2, $2, $2
mult $2, $2
lui $3, 4
slti $2, $2, 2
TAG1:
mflo $2
bgez $2, TAG2
srav $1, $2, $2
sh $2, 0($1)
TAG2:
andi $1, $1, 15
mult $1, $1
lw $2, 0($1)
blez $1, TAG3
TAG3:
lbu $1, 0($2)
sra $3, $1, 8
lui $1, 8
mflo $1
TAG4:
bgtz $1, TAG5
lui $2, 12
sll $0, $0, 0
addu $4, $1, $1
TAG5:
lui $4, 14
mfhi $1
addiu $3, $4, 7
sll $0, $0, 0
TAG6:
sll $0, $0, 0
bne $3, $3, TAG7
mult $3, $3
srlv $4, $3, $3
TAG7:
divu $4, $4
lh $4, -7168($4)
sll $3, $4, 13
blez $3, TAG8
TAG8:
add $4, $3, $3
mflo $4
multu $4, $3
beq $3, $4, TAG9
TAG9:
lui $3, 8
blez $3, TAG10
mfhi $1
lui $3, 8
TAG10:
div $3, $3
sll $0, $0, 0
bne $3, $3, TAG11
multu $3, $3
TAG11:
bne $3, $3, TAG12
mflo $4
mthi $4
bne $3, $4, TAG12
TAG12:
mflo $2
sh $4, 0($4)
lh $3, 0($2)
lui $4, 1
TAG13:
sll $0, $0, 0
mult $4, $3
mfhi $3
andi $3, $3, 1
TAG14:
bltz $3, TAG15
addu $2, $3, $3
lhu $3, 0($3)
ori $1, $2, 13
TAG15:
sb $1, 0($1)
sb $1, 0($1)
bne $1, $1, TAG16
div $1, $1
TAG16:
slt $1, $1, $1
mult $1, $1
sb $1, 0($1)
srl $4, $1, 9
TAG17:
mtlo $4
lw $3, 0($4)
sub $2, $3, $4
mthi $4
TAG18:
blez $2, TAG19
and $1, $2, $2
bgtz $2, TAG19
sltu $2, $1, $2
TAG19:
mthi $2
beq $2, $2, TAG20
srav $3, $2, $2
sllv $1, $2, $2
TAG20:
mthi $1
beq $1, $1, TAG21
mtlo $1
mult $1, $1
TAG21:
sb $1, 0($1)
mthi $1
beq $1, $1, TAG22
sb $1, 0($1)
TAG22:
ori $4, $1, 15
lbu $3, 0($4)
sh $3, 0($1)
sra $2, $1, 6
TAG23:
sb $2, 0($2)
beq $2, $2, TAG24
lb $1, 0($2)
mflo $1
TAG24:
bltz $1, TAG25
xor $3, $1, $1
xor $2, $1, $1
mfhi $2
TAG25:
lui $1, 6
sll $0, $0, 0
mthi $2
addiu $3, $2, 3
TAG26:
multu $3, $3
mfhi $4
or $1, $4, $4
sb $4, 0($1)
TAG27:
lb $1, 0($1)
bltz $1, TAG28
lui $1, 4
bgez $1, TAG28
TAG28:
mult $1, $1
beq $1, $1, TAG29
multu $1, $1
beq $1, $1, TAG29
TAG29:
mtlo $1
divu $1, $1
mthi $1
bgtz $1, TAG30
TAG30:
addu $1, $1, $1
bne $1, $1, TAG31
sll $0, $0, 0
mfhi $4
TAG31:
bgtz $4, TAG32
sll $0, $0, 0
mthi $4
sb $4, 0($4)
TAG32:
sll $0, $0, 0
lui $4, 7
sll $0, $0, 0
mtlo $4
TAG33:
bgez $4, TAG34
mthi $4
mfhi $1
andi $3, $1, 0
TAG34:
lui $3, 11
sll $0, $0, 0
and $1, $3, $3
srl $4, $3, 1
TAG35:
sll $0, $0, 0
sll $0, $0, 0
mflo $4
lb $4, 0($2)
TAG36:
sllv $1, $4, $4
lui $1, 1
addiu $1, $1, 2
lb $4, 0($4)
TAG37:
sh $4, 0($4)
bne $4, $4, TAG38
andi $3, $4, 5
mthi $4
TAG38:
lui $3, 1
blez $3, TAG39
sll $0, $0, 0
mtlo $3
TAG39:
divu $3, $3
mfhi $2
lui $4, 1
mthi $2
TAG40:
mflo $3
srav $1, $4, $4
sll $0, $0, 0
beq $4, $4, TAG41
TAG41:
sll $0, $0, 0
lui $1, 5
sll $0, $0, 0
subu $1, $1, $1
TAG42:
blez $1, TAG43
mthi $1
sltiu $4, $1, 15
sltu $4, $4, $4
TAG43:
sll $0, $0, 0
bne $3, $3, TAG44
div $3, $3
sll $0, $0, 0
TAG44:
mfhi $1
mfhi $1
sltu $2, $1, $3
mtlo $2
TAG45:
mthi $2
sltu $4, $2, $2
lui $4, 4
mflo $1
TAG46:
mthi $1
div $1, $1
mtlo $1
beq $1, $1, TAG47
TAG47:
sb $1, 0($1)
sb $1, 0($1)
bgtz $1, TAG48
mfhi $2
TAG48:
lui $4, 2
beq $4, $2, TAG49
mfhi $2
mfhi $1
TAG49:
multu $1, $1
mflo $2
lui $3, 1
bgez $2, TAG50
TAG50:
mtlo $3
blez $3, TAG51
sll $0, $0, 0
sll $0, $0, 0
TAG51:
lui $1, 0
addiu $1, $4, 5
div $1, $1
bgez $1, TAG52
TAG52:
sll $0, $0, 0
mfhi $1
lui $3, 7
bltz $3, TAG53
TAG53:
xori $4, $3, 10
mult $4, $4
mfhi $2
mtlo $4
TAG54:
srav $4, $2, $2
sb $2, 0($2)
xor $3, $4, $4
lui $2, 13
TAG55:
multu $2, $2
beq $2, $2, TAG56
mthi $2
bgez $2, TAG56
TAG56:
sll $0, $0, 0
bne $2, $2, TAG57
sll $0, $0, 0
divu $2, $2
TAG57:
lui $1, 8
blez $2, TAG58
divu $1, $1
beq $1, $2, TAG58
TAG58:
srlv $4, $1, $1
sll $0, $0, 0
sub $4, $4, $3
addiu $1, $1, 5
TAG59:
mfhi $4
mthi $1
lui $1, 7
mflo $4
TAG60:
lbu $1, 0($4)
srav $2, $4, $4
blez $2, TAG61
mthi $4
TAG61:
mult $2, $2
mthi $2
mflo $2
mthi $2
TAG62:
mult $2, $2
bgez $2, TAG63
srav $4, $2, $2
lw $4, 0($2)
TAG63:
lui $1, 4
mthi $1
xori $4, $1, 9
sll $0, $0, 0
TAG64:
div $4, $4
bne $4, $4, TAG65
lui $3, 12
beq $3, $3, TAG65
TAG65:
mflo $2
addiu $4, $3, 14
lui $2, 3
bne $2, $2, TAG66
TAG66:
sll $0, $0, 0
sll $0, $0, 0
bne $4, $4, TAG67
lui $2, 11
TAG67:
sll $0, $0, 0
andi $4, $4, 6
lui $1, 14
lui $3, 5
TAG68:
multu $3, $3
multu $3, $3
mfhi $2
mtlo $3
TAG69:
bne $2, $2, TAG70
subu $4, $2, $2
bgez $4, TAG70
addu $3, $4, $2
TAG70:
lbu $2, 0($3)
lb $4, 0($2)
andi $3, $3, 11
mfhi $4
TAG71:
lb $4, 0($4)
sltu $3, $4, $4
lui $3, 12
srav $1, $3, $3
TAG72:
lui $4, 4
sll $0, $0, 0
xor $1, $4, $4
sb $4, 0($1)
TAG73:
multu $1, $1
lh $3, 0($1)
sb $1, -256($3)
mflo $3
TAG74:
lhu $1, 0($3)
mflo $2
blez $2, TAG75
multu $1, $2
TAG75:
blez $2, TAG76
mtlo $2
bgez $2, TAG76
mflo $2
TAG76:
addiu $4, $2, 3
mfhi $4
lw $3, 0($4)
lui $3, 3
TAG77:
lui $3, 3
srav $4, $3, $3
multu $3, $3
mtlo $4
TAG78:
mtlo $4
lui $2, 9
lui $2, 12
mtlo $2
TAG79:
mtlo $2
sll $0, $0, 0
subu $1, $2, $2
sub $2, $2, $1
TAG80:
subu $2, $2, $2
sb $2, 0($2)
mfhi $3
nor $3, $2, $2
TAG81:
mtlo $3
sw $3, 1($3)
xori $3, $3, 10
sb $3, 11($3)
TAG82:
ori $4, $3, 7
addiu $3, $3, 15
lb $1, 9($4)
mtlo $3
TAG83:
sb $1, 11($1)
mult $1, $1
lh $4, 11($1)
sllv $1, $4, $4
TAG84:
srl $1, $1, 6
slt $1, $1, $1
lui $3, 12
beq $1, $1, TAG85
TAG85:
mfhi $1
multu $1, $1
mtlo $3
lui $1, 4
TAG86:
bne $1, $1, TAG87
mfhi $1
mflo $3
mflo $1
TAG87:
beq $1, $1, TAG88
divu $1, $1
mflo $1
mtlo $1
TAG88:
sll $0, $0, 0
addiu $2, $2, 15
lui $3, 8
multu $2, $3
TAG89:
lui $4, 12
xor $1, $3, $4
sll $0, $0, 0
mflo $4
TAG90:
sll $0, $0, 0
bgtz $4, TAG91
lui $4, 13
bne $4, $4, TAG91
TAG91:
multu $4, $4
mtlo $4
mthi $4
mult $4, $4
TAG92:
sll $0, $0, 0
sll $0, $0, 0
lui $1, 1
div $4, $4
TAG93:
srl $1, $1, 7
lui $1, 10
divu $1, $1
sll $4, $1, 7
TAG94:
mflo $3
sb $4, 0($3)
lui $2, 11
lui $1, 10
TAG95:
mthi $1
or $1, $1, $1
slt $3, $1, $1
mtlo $1
TAG96:
or $1, $3, $3
lui $2, 8
mfhi $2
and $2, $1, $2
TAG97:
lbu $3, 0($2)
bgtz $3, TAG98
sll $1, $2, 10
sllv $3, $3, $2
TAG98:
mult $3, $3
divu $3, $3
beq $3, $3, TAG99
ori $3, $3, 14
TAG99:
sll $0, $0, 0
mfhi $4
lui $3, 0
ori $3, $3, 7
TAG100:
mtlo $3
lui $2, 13
beq $3, $2, TAG101
andi $1, $3, 10
TAG101:
beq $1, $1, TAG102
multu $1, $1
beq $1, $1, TAG102
andi $2, $1, 14
TAG102:
sll $0, $0, 0
lui $4, 1
sll $0, $0, 0
sll $0, $0, 0
TAG103:
multu $4, $4
mthi $4
or $2, $4, $4
lui $2, 13
TAG104:
mthi $2
lui $2, 0
bgez $2, TAG105
mtlo $2
TAG105:
mflo $1
lw $4, 0($1)
sh $2, 0($1)
sll $0, $0, 0
TAG106:
sll $0, $0, 0
sll $0, $0, 0
bgtz $4, TAG107
sll $0, $0, 0
TAG107:
bgtz $4, TAG108
mult $4, $4
ori $3, $4, 6
lui $4, 13
TAG108:
sll $0, $0, 0
sw $1, 0($1)
sh $1, 0($1)
lui $3, 10
TAG109:
sll $0, $0, 0
lui $3, 2
lw $2, 0($2)
bne $2, $3, TAG110
TAG110:
sub $2, $2, $2
sh $2, 0($2)
lui $3, 11
addiu $1, $3, 3
TAG111:
beq $1, $1, TAG112
mflo $2
lw $4, 0($2)
sh $4, 0($2)
TAG112:
sll $0, $0, 0
bgtz $4, TAG113
mfhi $2
lui $3, 7
TAG113:
andi $4, $3, 11
lui $4, 11
sll $0, $0, 0
lui $3, 4
TAG114:
sll $0, $0, 0
sll $0, $0, 0
bne $3, $3, TAG115
srlv $2, $3, $3
TAG115:
or $1, $2, $2
lui $3, 6
mfhi $2
sltiu $2, $2, 0
TAG116:
mtlo $2
nor $4, $2, $2
srav $1, $2, $4
srav $4, $4, $1
TAG117:
sll $0, $0, 0
lui $2, 1
lui $2, 4
slti $2, $2, 7
TAG118:
bltz $2, TAG119
sh $2, 0($2)
blez $2, TAG119
lui $3, 1
TAG119:
lui $3, 1
sltiu $1, $3, 5
bne $3, $3, TAG120
mthi $3
TAG120:
bne $1, $1, TAG121
lhu $3, 0($1)
beq $1, $3, TAG121
slti $4, $1, 1
TAG121:
sb $4, 0($4)
lui $2, 1
sb $4, 0($4)
sll $0, $0, 0
TAG122:
sll $0, $0, 0
mfhi $1
sll $3, $2, 11
mtlo $4
TAG123:
beq $3, $3, TAG124
sll $0, $0, 0
lbu $1, 0($3)
addiu $4, $1, 13
TAG124:
sb $4, 0($4)
mthi $4
bgtz $4, TAG125
slti $2, $4, 3
TAG125:
nor $3, $2, $2
bltz $3, TAG126
mflo $3
lbu $4, 0($3)
TAG126:
sb $4, 0($4)
xor $1, $4, $4
bne $1, $4, TAG127
sll $1, $1, 3
TAG127:
lw $3, 0($1)
bne $3, $1, TAG128
sb $3, 0($1)
mfhi $2
TAG128:
sb $2, 0($2)
multu $2, $2
sb $2, 0($2)
bne $2, $2, TAG129
TAG129:
lui $3, 13
lb $2, 0($2)
sll $0, $0, 0
addu $2, $3, $1
TAG130:
xor $2, $2, $2
xori $3, $2, 7
or $3, $2, $2
lui $1, 5
TAG131:
mtlo $1
sll $0, $0, 0
mfhi $3
mflo $3
TAG132:
beq $3, $3, TAG133
mfhi $4
sll $2, $3, 15
mfhi $2
TAG133:
mult $2, $2
mfhi $2
lui $4, 9
bgtz $2, TAG134
TAG134:
slti $2, $4, 1
bne $2, $2, TAG135
sll $0, $0, 0
addu $2, $4, $1
TAG135:
bltz $2, TAG136
or $4, $2, $2
mflo $3
beq $4, $4, TAG136
TAG136:
and $2, $3, $3
bne $2, $2, TAG137
mult $2, $2
blez $3, TAG137
TAG137:
mflo $4
srav $4, $2, $2
mfhi $1
mult $2, $1
TAG138:
sb $1, 0($1)
mtlo $1
bne $1, $1, TAG139
sltiu $1, $1, 3
TAG139:
mthi $1
bgez $1, TAG140
lui $2, 7
slt $2, $2, $1
TAG140:
div $2, $2
sra $4, $2, 1
slti $2, $2, 6
sltu $3, $2, $2
TAG141:
bne $3, $3, TAG142
mthi $3
sllv $4, $3, $3
bne $4, $3, TAG142
TAG142:
lui $4, 0
sll $2, $4, 10
beq $4, $4, TAG143
sh $2, 0($2)
TAG143:
bgez $2, TAG144
ori $2, $2, 13
sh $2, 0($2)
bgtz $2, TAG144
TAG144:
mflo $4
mtlo $2
mflo $3
mflo $2
TAG145:
div $2, $2
subu $3, $2, $2
lui $4, 14
blez $2, TAG146
TAG146:
lui $3, 2
sll $0, $0, 0
mthi $3
or $4, $4, $4
TAG147:
bltz $4, TAG148
multu $4, $4
subu $4, $4, $4
lbu $3, 0($4)
TAG148:
sb $3, 0($3)
bltz $3, TAG149
srlv $4, $3, $3
mult $3, $4
TAG149:
bne $4, $4, TAG150
mult $4, $4
lui $4, 12
mthi $4
TAG150:
sll $0, $0, 0
multu $1, $1
mtlo $1
lbu $1, 0($1)
TAG151:
sw $1, 0($1)
srav $4, $1, $1
lui $4, 15
mthi $1
TAG152:
lui $3, 12
mfhi $3
mult $4, $3
bltz $3, TAG153
TAG153:
mthi $3
addiu $2, $3, 14
sra $4, $2, 8
lui $4, 7
TAG154:
subu $3, $4, $4
lui $1, 0
beq $3, $4, TAG155
subu $1, $3, $3
TAG155:
lbu $4, 0($1)
lbu $1, 0($1)
sh $1, 0($1)
lh $1, 0($1)
TAG156:
bgtz $1, TAG157
lbu $4, 0($1)
ori $1, $4, 5
subu $2, $4, $1
TAG157:
srl $2, $2, 11
srl $3, $2, 12
blez $2, TAG158
divu $3, $3
TAG158:
mtlo $3
mflo $1
mthi $3
sltiu $2, $1, 9
TAG159:
mflo $3
lui $1, 3
sb $3, 0($2)
bgez $3, TAG160
TAG160:
mtlo $1
addu $2, $1, $1
lui $3, 7
srl $2, $1, 10
TAG161:
mfhi $4
slt $1, $4, $2
sw $2, -192($2)
lw $1, 0($1)
TAG162:
mtlo $1
mthi $1
blez $1, TAG163
lb $3, -192($1)
TAG163:
sw $3, 64($3)
sra $1, $3, 12
bne $3, $3, TAG164
divu $1, $3
TAG164:
beq $1, $1, TAG165
lui $1, 10
mult $1, $1
bgtz $1, TAG165
TAG165:
sll $0, $0, 0
bne $1, $1, TAG166
mthi $1
andi $3, $1, 0
TAG166:
sltu $3, $3, $3
lui $4, 1
mult $4, $3
sltiu $4, $4, 3
TAG167:
sh $4, 0($4)
sra $2, $4, 12
sw $2, 0($4)
mflo $1
TAG168:
bne $1, $1, TAG169
lbu $4, 0($1)
lui $4, 4
bgez $1, TAG169
TAG169:
sll $0, $0, 0
beq $4, $1, TAG170
mult $1, $4
sll $0, $0, 0
TAG170:
mult $1, $1
sll $4, $1, 1
mfhi $4
srav $1, $4, $4
TAG171:
bltz $1, TAG172
addi $3, $1, 6
sltiu $3, $3, 7
sltu $2, $1, $1
TAG172:
lui $3, 9
bltz $2, TAG173
mfhi $1
srav $4, $1, $1
TAG173:
lui $3, 14
multu $4, $4
and $2, $3, $4
lui $1, 3
TAG174:
mthi $1
mult $1, $1
mult $1, $1
mtlo $1
TAG175:
lui $2, 12
mult $1, $1
blez $2, TAG176
subu $4, $1, $2
TAG176:
sll $0, $0, 0
mtlo $4
beq $4, $4, TAG177
sll $0, $0, 0
TAG177:
lui $3, 2
sll $0, $0, 0
mflo $2
sll $0, $0, 0
TAG178:
bgez $2, TAG179
mflo $2
mfhi $3
sllv $1, $3, $2
TAG179:
lui $4, 13
sb $1, 0($1)
lui $3, 10
sll $0, $0, 0
TAG180:
sll $0, $0, 0
lui $2, 11
bne $3, $2, TAG181
sll $0, $0, 0
TAG181:
mfhi $2
lb $3, 0($2)
lb $2, 0($2)
lb $3, 0($1)
TAG182:
mfhi $1
lbu $2, 0($1)
srl $2, $3, 11
lui $3, 9
TAG183:
lui $2, 3
mult $2, $3
beq $3, $3, TAG184
multu $3, $2
TAG184:
andi $3, $2, 9
srlv $2, $2, $2
mthi $2
mfhi $3
TAG185:
mfhi $2
mflo $3
multu $2, $3
lh $1, 0($3)
TAG186:
bltz $1, TAG187
lui $1, 11
subu $4, $1, $1
lui $3, 14
TAG187:
slti $2, $3, 4
lw $3, 0($2)
mult $3, $2
bne $2, $3, TAG188
TAG188:
lui $1, 14
mthi $1
lui $2, 1
mult $1, $1
TAG189:
bne $2, $2, TAG190
mfhi $1
bgez $2, TAG190
mfhi $3
TAG190:
multu $3, $3
lui $1, 15
lbu $1, -196($3)
and $3, $3, $1
TAG191:
beq $3, $3, TAG192
sw $3, 0($3)
beq $3, $3, TAG192
sw $3, 0($3)
TAG192:
sw $3, 0($3)
mtlo $3
add $1, $3, $3
slti $2, $1, 6
TAG193:
bne $2, $2, TAG194
sb $2, 0($2)
sb $2, 0($2)
sb $2, 0($2)
TAG194:
lui $1, 7
mtlo $1
bgtz $1, TAG195
mult $1, $2
TAG195:
sll $0, $0, 0
mthi $3
sra $4, $3, 9
mthi $1
TAG196:
sw $4, 0($4)
multu $4, $4
mult $4, $4
lui $3, 10
TAG197:
bne $3, $3, TAG198
sll $0, $0, 0
beq $3, $3, TAG198
sllv $4, $3, $3
TAG198:
sll $0, $0, 0
bgez $4, TAG199
sll $0, $0, 0
sw $2, 0($2)
TAG199:
mthi $2
sb $2, 0($2)
lui $1, 10
lui $3, 7
TAG200:
mtlo $3
beq $3, $3, TAG201
mtlo $3
sra $3, $3, 3
TAG201:
bne $3, $3, TAG202
div $3, $3
sllv $2, $3, $3
bne $3, $3, TAG202
TAG202:
addiu $4, $2, 15
sll $3, $4, 11
divu $3, $3
bltz $4, TAG203
TAG203:
mtlo $3
sll $0, $0, 0
sll $0, $0, 0
blez $3, TAG204
TAG204:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
beq $2, $2, TAG205
TAG205:
sll $0, $0, 0
sll $0, $0, 0
lui $2, 9
sll $0, $0, 0
TAG206:
bne $2, $2, TAG207
mult $2, $2
mfhi $1
lui $2, 11
TAG207:
beq $2, $2, TAG208
nor $1, $2, $2
sb $1, 0($1)
beq $2, $2, TAG208
TAG208:
sll $0, $0, 0
multu $1, $1
mult $1, $1
sll $4, $1, 11
TAG209:
addu $2, $4, $4
lui $3, 11
addiu $3, $3, 7
div $3, $4
TAG210:
bgtz $3, TAG211
sllv $2, $3, $3
mthi $2
mult $2, $3
TAG211:
lui $2, 8
bgez $2, TAG212
andi $2, $2, 12
mult $2, $2
TAG212:
sw $2, 0($2)
lhu $3, 0($2)
mtlo $2
lbu $3, 0($3)
TAG213:
mflo $4
lui $4, 13
lui $1, 14
divu $4, $1
TAG214:
mthi $1
lui $1, 13
and $1, $1, $1
addu $2, $1, $1
TAG215:
sll $0, $0, 0
mthi $2
lui $2, 10
sll $0, $0, 0
TAG216:
beq $2, $2, TAG217
div $2, $2
mflo $4
bgez $2, TAG217
TAG217:
sll $0, $0, 0
addu $3, $4, $4
beq $4, $3, TAG218
sll $0, $0, 0
TAG218:
bne $4, $4, TAG219
lui $4, 11
sll $0, $0, 0
sll $0, $0, 0
TAG219:
mthi $2
bgez $2, TAG220
mthi $2
mflo $1
TAG220:
lui $1, 5
mflo $3
addiu $4, $3, 1
srl $3, $3, 6
TAG221:
lbu $4, 0($3)
lbu $1, 0($4)
lh $3, 0($4)
mfhi $1
TAG222:
sll $0, $0, 0
multu $1, $3
mfhi $4
multu $1, $3
TAG223:
lbu $3, 0($4)
lui $3, 4
mthi $3
xori $2, $3, 9
TAG224:
sll $0, $0, 0
sltu $4, $3, $3
andi $2, $3, 11
srl $4, $4, 5
TAG225:
lw $3, 0($4)
mfhi $3
sll $0, $0, 0
nor $2, $3, $3
TAG226:
bgez $2, TAG227
multu $2, $2
mtlo $2
beq $2, $2, TAG227
TAG227:
sll $0, $0, 0
bltz $2, TAG228
srl $4, $2, 5
mfhi $3
TAG228:
mtlo $3
beq $3, $3, TAG229
mflo $3
addi $4, $3, 8
TAG229:
addiu $3, $4, 13
bgez $3, TAG230
mflo $2
lw $2, 0($4)
TAG230:
sll $0, $0, 0
mflo $2
subu $4, $2, $2
lui $4, 11
TAG231:
bne $4, $4, TAG232
addu $1, $4, $4
mtlo $4
lui $4, 15
TAG232:
srl $3, $4, 11
bne $3, $4, TAG233
mult $3, $3
divu $4, $4
TAG233:
mflo $1
and $1, $1, $1
sll $0, $0, 0
srav $4, $3, $1
TAG234:
bne $4, $4, TAG235
lb $2, -480($4)
sb $4, 0($2)
mthi $4
TAG235:
bne $2, $2, TAG236
mult $2, $2
mtlo $2
sltu $4, $2, $2
TAG236:
bgtz $4, TAG237
lh $1, 0($4)
sh $1, -224($1)
sub $1, $4, $4
TAG237:
sllv $2, $1, $1
mtlo $2
mflo $2
slt $2, $2, $2
TAG238:
sltiu $2, $2, 0
bltz $2, TAG239
sra $3, $2, 14
lui $2, 7
TAG239:
lui $1, 0
bne $1, $2, TAG240
sltiu $1, $2, 3
mult $2, $1
TAG240:
xori $3, $1, 9
bne $3, $1, TAG241
mtlo $3
addi $1, $3, 4
TAG241:
mult $1, $1
sltiu $4, $1, 12
beq $1, $1, TAG242
divu $4, $4
TAG242:
divu $4, $4
sb $4, 0($4)
lbu $4, 0($4)
divu $4, $4
TAG243:
bgtz $4, TAG244
mflo $4
mfhi $4
lbu $1, 0($4)
TAG244:
lui $3, 1
mflo $2
addiu $2, $3, 5
srav $3, $2, $2
TAG245:
slti $3, $3, 2
lui $1, 5
bltz $1, TAG246
mtlo $1
TAG246:
subu $1, $1, $1
bne $1, $1, TAG247
mfhi $1
lui $2, 4
TAG247:
bgez $2, TAG248
mfhi $4
sw $2, 0($2)
sltiu $1, $2, 14
TAG248:
lb $3, 0($1)
nor $1, $1, $3
sb $1, 0($1)
mfhi $1
TAG249:
bltz $1, TAG250
ori $1, $1, 15
mthi $1
mthi $1
TAG250:
sb $1, 0($1)
lbu $1, 0($1)
bgez $1, TAG251
lb $1, 0($1)
TAG251:
lui $3, 7
lbu $1, 0($1)
sll $0, $0, 0
sltu $4, $1, $3
TAG252:
srl $3, $4, 6
srl $4, $3, 15
ori $4, $4, 8
srlv $4, $4, $4
TAG253:
bgtz $4, TAG254
lhu $4, 0($4)
or $1, $4, $4
lui $1, 12
TAG254:
sll $0, $0, 0
sll $0, $0, 0
mflo $3
lui $3, 2
TAG255:
mtlo $3
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
TAG256:
mthi $4
sw $4, -480($4)
lh $1, -480($4)
slti $1, $1, 9
TAG257:
sltiu $3, $1, 10
mtlo $1
nor $1, $3, $1
addu $3, $3, $1
TAG258:
mult $3, $3
ori $3, $3, 4
lb $1, 1($3)
divu $1, $1
TAG259:
mflo $2
lui $1, 15
blez $2, TAG260
sll $0, $0, 0
TAG260:
mfhi $2
lui $2, 12
mult $2, $1
multu $1, $2
TAG261:
bne $2, $2, TAG262
multu $2, $2
bne $2, $2, TAG262
lui $4, 15
TAG262:
sll $0, $0, 0
andi $2, $4, 1
sra $1, $4, 8
lb $4, -3840($1)
TAG263:
beq $4, $4, TAG264
divu $4, $4
div $4, $4
mthi $4
TAG264:
div $4, $4
blez $4, TAG265
sw $4, 32($4)
lui $2, 2
TAG265:
mthi $2
addiu $2, $2, 10
sh $2, 0($2)
mfhi $1
TAG266:
sw $1, 0($1)
mflo $3
bgtz $3, TAG267
lui $2, 5
TAG267:
mflo $3
lui $1, 9
sb $1, 0($3)
mflo $1
TAG268:
mthi $1
mthi $1
mflo $4
multu $4, $1
TAG269:
sb $4, 0($4)
sb $4, 0($4)
srlv $1, $4, $4
mult $1, $1
TAG270:
mfhi $2
addi $2, $2, 15
lui $2, 0
beq $2, $2, TAG271
TAG271:
addiu $2, $2, 15
nor $2, $2, $2
lui $3, 1
divu $2, $2
TAG272:
sll $0, $0, 0
mtlo $3
sll $0, $0, 0
sll $0, $0, 0
TAG273:
addu $4, $3, $3
sll $0, $0, 0
subu $1, $4, $3
mthi $1
TAG274:
div $1, $1
bne $1, $1, TAG275
mfhi $1
xori $3, $1, 5
TAG275:
mflo $4
lb $1, 0($4)
lb $3, 0($3)
andi $2, $3, 12
TAG276:
mflo $2
lb $4, 0($2)
bgez $2, TAG277
mtlo $4
TAG277:
addiu $3, $4, 0
multu $4, $3
mflo $1
blez $4, TAG278
TAG278:
mult $1, $1
mult $1, $1
beq $1, $1, TAG279
mult $1, $1
TAG279:
sb $1, 0($1)
lui $3, 12
bltz $3, TAG280
lbu $3, 0($1)
TAG280:
mflo $2
blez $3, TAG281
nor $3, $3, $2
divu $3, $2
TAG281:
sllv $1, $3, $3
mtlo $1
lui $1, 4
div $1, $1
TAG282:
addiu $2, $1, 3
divu $2, $1
bltz $2, TAG283
addu $3, $2, $1
TAG283:
multu $3, $3
beq $3, $3, TAG284
mfhi $2
blez $2, TAG284
TAG284:
mthi $2
beq $2, $2, TAG285
sw $2, 0($2)
mtlo $2
TAG285:
subu $3, $2, $2
mflo $4
mthi $4
mthi $3
TAG286:
sllv $2, $4, $4
sll $0, $0, 0
xor $1, $2, $4
beq $2, $1, TAG287
TAG287:
div $1, $1
sra $2, $1, 6
mflo $4
mtlo $1
TAG288:
lui $3, 9
lui $1, 4
sll $0, $0, 0
mflo $1
TAG289:
beq $1, $1, TAG290
sll $0, $0, 0
srav $3, $2, $2
sh $2, 0($2)
TAG290:
mtlo $3
sll $0, $0, 0
blez $3, TAG291
sll $0, $0, 0
TAG291:
sll $0, $0, 0
divu $3, $3
srl $4, $3, 0
sll $0, $0, 0
TAG292:
sll $0, $0, 0
sll $0, $0, 0
bne $4, $4, TAG293
mult $4, $4
TAG293:
mfhi $2
blez $2, TAG294
sllv $2, $4, $2
bgez $4, TAG294
TAG294:
mthi $2
lb $3, 0($2)
mflo $2
addiu $3, $3, 13
TAG295:
bne $3, $3, TAG296
slt $4, $3, $3
addiu $4, $3, 9
mfhi $4
TAG296:
multu $4, $4
sra $4, $4, 10
lui $1, 10
beq $1, $1, TAG297
TAG297:
mthi $1
divu $1, $1
bltz $1, TAG298
mtlo $1
TAG298:
sll $2, $1, 0
div $2, $2
lui $4, 10
addiu $2, $4, 3
TAG299:
ori $1, $2, 5
mthi $2
bne $2, $1, TAG300
sll $0, $0, 0
TAG300:
bne $3, $3, TAG301
sb $3, 0($3)
srlv $1, $3, $3
lb $3, 0($3)
TAG301:
mthi $3
xori $4, $3, 2
div $4, $3
slti $3, $3, 1
TAG302:
bgtz $3, TAG303
mtlo $3
lui $4, 15
lhu $1, 0($3)
TAG303:
divu $1, $1
bltz $1, TAG304
subu $4, $1, $1
sra $3, $1, 8
TAG304:
slti $1, $3, 14
bltz $1, TAG305
lb $4, 0($1)
and $2, $4, $3
TAG305:
addu $3, $2, $2
blez $3, TAG306
mthi $3
lb $4, 0($2)
TAG306:
bne $4, $4, TAG307
addiu $1, $4, 2
div $1, $4
mtlo $4
TAG307:
lui $2, 2
blez $2, TAG308
multu $2, $2
mflo $2
TAG308:
addu $1, $2, $2
mult $1, $2
add $4, $2, $1
mfhi $1
TAG309:
mtlo $1
lb $4, 0($1)
sh $4, 0($4)
nor $2, $4, $4
TAG310:
lui $3, 4
div $3, $2
lw $4, 1($2)
beq $4, $4, TAG311
TAG311:
lh $4, 0($4)
bgez $4, TAG312
addi $1, $4, 13
sh $4, 0($1)
TAG312:
subu $3, $1, $1
subu $4, $1, $1
lui $3, 15
sw $4, 0($4)
TAG313:
mthi $3
beq $3, $3, TAG314
sltiu $3, $3, 10
multu $3, $3
TAG314:
sb $3, 0($3)
sb $3, 0($3)
sra $2, $3, 9
mthi $3
TAG315:
mfhi $3
bgez $2, TAG316
mthi $3
mfhi $3
TAG316:
xor $4, $3, $3
bgez $4, TAG317
lui $2, 4
sll $4, $3, 10
TAG317:
beq $4, $4, TAG318
lw $2, 0($4)
lhu $2, 0($4)
sw $4, 0($4)
TAG318:
lui $2, 10
bgtz $2, TAG319
sll $0, $0, 0
mthi $2
TAG319:
and $1, $2, $2
multu $1, $1
mtlo $1
bne $2, $2, TAG320
TAG320:
lui $2, 12
slti $4, $1, 2
sll $0, $0, 0
mflo $1
TAG321:
sll $0, $0, 0
lui $3, 12
srl $4, $1, 5
bne $4, $3, TAG322
TAG322:
mfhi $1
bgez $1, TAG323
sb $4, -20480($4)
lbu $4, 0($4)
TAG323:
sll $0, $0, 0
srl $4, $2, 15
xori $1, $2, 5
mflo $4
TAG324:
beq $4, $4, TAG325
and $1, $4, $4
mult $4, $1
sllv $1, $4, $4
TAG325:
sll $0, $0, 0
sll $0, $0, 0
beq $1, $1, TAG326
multu $1, $1
TAG326:
div $1, $1
mtlo $1
srl $3, $1, 1
sll $0, $0, 0
TAG327:
mflo $1
sra $2, $1, 9
lui $4, 14
mfhi $3
TAG328:
mfhi $3
blez $3, TAG329
multu $3, $3
lb $1, 0($3)
TAG329:
sll $0, $0, 0
sb $1, 0($3)
mult $1, $3
sll $0, $0, 0
TAG330:
bne $3, $3, TAG331
multu $3, $3
and $1, $3, $3
beq $1, $1, TAG331
TAG331:
multu $1, $1
bltz $1, TAG332
lbu $2, 0($1)
sltu $2, $2, $2
TAG332:
andi $4, $2, 15
lw $3, 0($4)
mthi $4
mfhi $2
TAG333:
addu $1, $2, $2
mfhi $2
add $1, $2, $2
xor $1, $1, $1
TAG334:
lh $1, 0($1)
addiu $2, $1, 8
blez $2, TAG335
lui $1, 12
TAG335:
mult $1, $1
slti $1, $1, 11
lui $2, 13
mflo $3
TAG336:
bgez $3, TAG337
multu $3, $3
sub $4, $3, $3
srav $4, $4, $3
TAG337:
sub $3, $4, $4
lui $3, 10
andi $2, $3, 10
sltiu $1, $3, 11
TAG338:
lb $1, 0($1)
sh $1, 0($1)
mult $1, $1
lui $2, 14
TAG339:
ori $1, $2, 15
bne $2, $1, TAG340
sll $0, $0, 0
mflo $2
TAG340:
and $4, $2, $2
mthi $2
multu $4, $4
bne $4, $2, TAG341
TAG341:
sll $0, $0, 0
sll $0, $0, 0
lui $3, 4
sll $0, $0, 0
TAG342:
bgez $3, TAG343
addiu $4, $3, 9
sltiu $4, $3, 9
mflo $2
TAG343:
beq $2, $2, TAG344
sll $0, $0, 0
mthi $2
addi $4, $2, 13
TAG344:
sll $0, $0, 0
lui $1, 3
lui $1, 7
sll $4, $4, 2
TAG345:
lui $3, 3
sll $0, $0, 0
bne $3, $4, TAG346
sll $0, $0, 0
TAG346:
sra $1, $1, 15
mthi $1
lui $1, 2
sll $0, $0, 0
TAG347:
bgez $1, TAG348
sll $0, $0, 0
ori $3, $3, 2
beq $3, $3, TAG348
TAG348:
subu $2, $3, $3
multu $3, $2
mtlo $3
mfhi $4
TAG349:
xor $1, $4, $4
blez $1, TAG350
mult $1, $1
mtlo $4
TAG350:
lui $1, 14
bltz $1, TAG351
sll $0, $0, 0
lui $4, 6
TAG351:
lui $1, 4
mflo $3
mtlo $4
bne $1, $4, TAG352
TAG352:
multu $3, $3
addu $2, $3, $3
beq $3, $2, TAG353
mtlo $2
TAG353:
bne $2, $2, TAG354
lui $2, 1
lui $3, 5
beq $3, $3, TAG354
TAG354:
subu $1, $3, $3
blez $1, TAG355
sltiu $4, $1, 7
addiu $1, $1, 3
TAG355:
multu $1, $1
beq $1, $1, TAG356
mfhi $3
bltz $1, TAG356
TAG356:
multu $3, $3
lui $1, 8
sll $0, $0, 0
sll $0, $0, 0
TAG357:
sll $0, $0, 0
mfhi $1
bgtz $1, TAG358
andi $2, $1, 2
TAG358:
bltz $2, TAG359
mthi $2
bgez $2, TAG359
sh $2, 0($2)
TAG359:
mtlo $2
sll $2, $2, 10
bne $2, $2, TAG360
multu $2, $2
TAG360:
sb $2, 0($2)
sb $2, 0($2)
lui $1, 7
mfhi $4
TAG361:
multu $4, $4
mult $4, $4
mfhi $4
sb $4, 0($4)
TAG362:
sb $4, 0($4)
sh $4, 0($4)
multu $4, $4
blez $4, TAG363
TAG363:
lbu $4, 0($4)
bgtz $4, TAG364
mfhi $4
mult $4, $4
TAG364:
sh $4, 0($4)
mtlo $4
sw $4, 0($4)
bltz $4, TAG365
TAG365:
mult $4, $4
mtlo $4
lui $3, 1
addu $1, $3, $4
TAG366:
sll $0, $0, 0
addu $4, $1, $1
div $4, $4
lui $2, 0
TAG367:
lh $3, 0($2)
blez $2, TAG368
mthi $2
mfhi $1
TAG368:
bne $1, $1, TAG369
sll $0, $0, 0
bgtz $1, TAG369
sll $0, $0, 0
TAG369:
lui $3, 4
sll $0, $0, 0
bne $3, $3, TAG370
sll $0, $0, 0
TAG370:
srl $1, $3, 6
mflo $4
slt $2, $1, $3
bne $3, $1, TAG371
TAG371:
mult $2, $2
mthi $2
mtlo $2
lui $2, 2
TAG372:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
TAG373:
multu $1, $1
mtlo $1
mult $1, $1
nor $2, $1, $1
TAG374:
mflo $3
mthi $2
sll $0, $0, 0
subu $2, $1, $3
TAG375:
sll $0, $0, 0
bne $2, $2, TAG376
sll $0, $0, 0
mthi $2
TAG376:
srlv $2, $2, $2
bgez $2, TAG377
addu $3, $2, $2
slti $1, $2, 4
TAG377:
xori $2, $1, 14
mtlo $2
lui $3, 3
mflo $1
TAG378:
lui $1, 10
bne $1, $1, TAG379
mult $1, $1
sll $0, $0, 0
TAG379:
lui $4, 12
and $4, $1, $1
lui $4, 7
sll $0, $0, 0
TAG380:
mtlo $3
mflo $1
sll $0, $0, 0
mflo $1
TAG381:
mflo $3
mflo $4
srav $3, $4, $1
sll $0, $0, 0
TAG382:
sb $2, 0($2)
divu $2, $2
ori $4, $2, 5
bltz $2, TAG383
TAG383:
andi $2, $4, 11
or $1, $2, $2
bltz $4, TAG384
sb $4, 0($1)
TAG384:
sra $2, $1, 11
srav $3, $1, $2
sb $1, 0($3)
sra $3, $3, 2
TAG385:
lui $4, 9
sra $2, $4, 13
mfhi $3
beq $2, $3, TAG386
TAG386:
lui $4, 10
bne $3, $4, TAG387
mult $4, $3
lui $2, 14
TAG387:
div $2, $2
srav $3, $2, $2
addu $1, $2, $3
multu $1, $3
TAG388:
nor $4, $1, $1
blez $1, TAG389
mfhi $1
sb $4, 73($4)
TAG389:
mtlo $1
mflo $2
multu $1, $2
mult $1, $1
TAG390:
mtlo $2
mflo $2
bgtz $2, TAG391
sra $4, $2, 7
TAG391:
lbu $4, 0($4)
bgez $4, TAG392
mfhi $1
xori $2, $1, 11
TAG392:
multu $2, $2
bne $2, $2, TAG393
sh $2, 0($2)
lb $2, 0($2)
TAG393:
xor $4, $2, $2
sb $4, 0($4)
mult $2, $4
sw $2, 0($4)
TAG394:
sra $2, $4, 7
bne $2, $4, TAG395
mfhi $2
multu $2, $4
TAG395:
mthi $2
ori $3, $2, 2
lw $2, 0($2)
beq $3, $2, TAG396
TAG396:
sllv $2, $2, $2
bgez $2, TAG397
sw $2, 0($2)
lhu $4, 0($2)
TAG397:
ori $1, $4, 13
sh $4, 0($4)
beq $4, $1, TAG398
lui $2, 6
TAG398:
bgez $2, TAG399
multu $2, $2
mtlo $2
sh $2, 0($2)
TAG399:
multu $2, $2
sll $0, $0, 0
div $2, $2
bgez $2, TAG400
TAG400:
slti $2, $2, 15
or $4, $2, $2
mthi $2
bgtz $4, TAG401
TAG401:
mthi $4
lb $4, 0($4)
and $4, $4, $4
mult $4, $4
TAG402:
bne $4, $4, TAG403
sh $4, 0($4)
bne $4, $4, TAG403
slti $4, $4, 12
TAG403:
beq $4, $4, TAG404
sb $4, 0($4)
mtlo $4
mult $4, $4
TAG404:
sltiu $2, $4, 0
sb $4, 0($2)
add $2, $2, $4
lb $3, 0($4)
TAG405:
bltz $3, TAG406
mthi $3
mfhi $2
bne $2, $2, TAG406
TAG406:
mfhi $1
sltu $3, $2, $1
lui $1, 7
sll $0, $0, 0
TAG407:
mtlo $1
divu $1, $1
lui $1, 2
beq $1, $1, TAG408
TAG408:
lui $3, 4
beq $3, $3, TAG409
andi $4, $1, 12
lw $3, 0($1)
TAG409:
bne $3, $3, TAG410
mtlo $3
mult $3, $3
lui $1, 8
TAG410:
beq $1, $1, TAG411
mthi $1
bgtz $1, TAG411
multu $1, $1
TAG411:
sll $0, $0, 0
sll $0, $0, 0
mfhi $1
sll $0, $0, 0
TAG412:
andi $1, $1, 6
subu $2, $1, $1
slti $3, $2, 3
blez $1, TAG413
TAG413:
lui $2, 14
bne $3, $3, TAG414
sb $3, 0($3)
mtlo $3
TAG414:
lui $1, 6
lui $3, 10
sra $1, $1, 15
xori $3, $3, 8
TAG415:
multu $3, $3
beq $3, $3, TAG416
sll $0, $0, 0
mflo $4
TAG416:
sw $4, 0($4)
multu $4, $4
lui $3, 7
blez $3, TAG417
TAG417:
lui $4, 5
sll $0, $0, 0
mtlo $4
lui $1, 9
TAG418:
mflo $2
beq $1, $1, TAG419
and $3, $1, $1
lui $3, 5
TAG419:
mflo $1
mult $3, $1
addiu $4, $1, 13
blez $4, TAG420
TAG420:
sll $0, $0, 0
sll $0, $0, 0
bne $4, $4, TAG421
sll $0, $0, 0
TAG421:
mfhi $4
divu $4, $4
sb $4, 0($4)
lb $1, 0($4)
TAG422:
mflo $3
bltz $1, TAG423
sb $1, 0($1)
mflo $3
TAG423:
multu $3, $3
mtlo $3
beq $3, $3, TAG424
mtlo $3
TAG424:
divu $3, $3
sb $3, 0($3)
mflo $4
addu $4, $4, $3
TAG425:
lh $2, 0($4)
mflo $3
mtlo $3
mflo $1
TAG426:
mthi $1
sb $1, 0($1)
bltz $1, TAG427
mthi $1
TAG427:
lui $2, 7
beq $1, $1, TAG428
sll $3, $1, 1
sh $1, 0($3)
TAG428:
nor $3, $3, $3
lui $3, 13
sll $0, $0, 0
sll $0, $0, 0
TAG429:
mflo $4
sll $0, $0, 0
mthi $4
mflo $3
TAG430:
subu $3, $3, $3
mflo $3
addiu $2, $3, 0
sb $3, 0($3)
TAG431:
bgez $2, TAG432
lb $4, 0($2)
divu $4, $2
sw $4, 0($2)
TAG432:
mult $4, $4
mult $4, $4
sb $4, 0($4)
beq $4, $4, TAG433
TAG433:
sb $4, 0($4)
mthi $4
lb $2, 0($4)
bne $2, $2, TAG434
TAG434:
sra $4, $2, 13
mfhi $2
mtlo $2
mult $2, $2
TAG435:
sltiu $3, $2, 7
mflo $4
bgez $2, TAG436
mflo $2
TAG436:
mthi $2
addiu $4, $2, 1
ori $1, $4, 1
divu $1, $4
TAG437:
lbu $4, 0($1)
sb $4, 0($1)
lui $1, 7
xori $3, $1, 0
TAG438:
mfhi $4
addiu $3, $4, 0
sb $4, 0($3)
mthi $3
TAG439:
sllv $3, $3, $3
addiu $2, $3, 2
beq $3, $3, TAG440
lbu $3, 0($2)
TAG440:
bgez $3, TAG441
sllv $1, $3, $3
lui $2, 12
xori $3, $2, 2
TAG441:
beq $3, $3, TAG442
lui $2, 10
sh $3, 0($3)
blez $3, TAG442
TAG442:
xori $4, $2, 4
xori $2, $2, 12
addiu $2, $4, 4
lui $1, 6
TAG443:
mthi $1
lui $2, 5
mthi $2
mtlo $1
TAG444:
xori $1, $2, 6
mult $1, $1
mflo $1
bgez $2, TAG445
TAG445:
mthi $1
lui $1, 2
mthi $1
sll $0, $0, 0
TAG446:
bne $1, $1, TAG447
mflo $4
sll $0, $0, 0
addu $4, $1, $4
TAG447:
addiu $4, $4, 6
mult $4, $4
lui $4, 9
sll $0, $0, 0
TAG448:
mthi $1
mult $1, $1
slti $2, $1, 7
blez $1, TAG449
TAG449:
multu $2, $2
sra $3, $2, 1
mthi $3
beq $3, $3, TAG450
TAG450:
mfhi $3
sll $1, $3, 8
multu $1, $1
mflo $1
TAG451:
mfhi $2
lui $3, 0
blez $1, TAG452
lui $2, 13
TAG452:
bltz $2, TAG453
mult $2, $2
divu $2, $2
mtlo $2
TAG453:
mthi $2
bne $2, $2, TAG454
mfhi $1
bgez $1, TAG454
TAG454:
andi $4, $1, 0
blez $4, TAG455
sll $1, $4, 0
bne $4, $1, TAG455
TAG455:
mult $1, $1
lui $2, 5
lhu $4, 0($1)
bltz $4, TAG456
TAG456:
lui $2, 12
lui $2, 13
mfhi $3
mtlo $3
TAG457:
bne $3, $3, TAG458
sllv $4, $3, $3
beq $4, $3, TAG458
sw $3, 0($3)
TAG458:
lui $2, 6
addu $1, $2, $2
divu $4, $1
sll $0, $0, 0
TAG459:
mthi $1
addiu $4, $1, 9
subu $1, $4, $4
bltz $1, TAG460
TAG460:
lbu $1, 0($1)
addiu $1, $1, 10
lui $3, 0
lui $1, 2
TAG461:
srav $1, $1, $1
mflo $4
andi $1, $1, 13
blez $1, TAG462
TAG462:
sra $3, $1, 10
bgtz $3, TAG463
sh $3, 0($1)
andi $4, $3, 5
TAG463:
beq $4, $4, TAG464
lbu $3, 0($4)
sh $4, 0($4)
lhu $3, 0($3)
TAG464:
lw $1, 0($3)
addu $2, $1, $1
addu $1, $2, $3
bgez $1, TAG465
TAG465:
sh $1, 0($1)
bltz $1, TAG466
multu $1, $1
mult $1, $1
TAG466:
lui $3, 7
bgtz $3, TAG467
sll $0, $0, 0
bne $1, $4, TAG467
TAG467:
sltu $2, $4, $4
mflo $2
blez $2, TAG468
nor $2, $2, $4
TAG468:
multu $2, $2
lui $1, 13
mtlo $2
divu $2, $2
TAG469:
sll $0, $0, 0
mtlo $1
blez $1, TAG470
mult $1, $1
TAG470:
sll $0, $0, 0
sll $0, $0, 0
lh $4, 0($4)
sltiu $3, $1, 10
TAG471:
lw $4, 0($3)
xor $4, $3, $3
lb $3, 0($3)
lhu $1, 0($4)
TAG472:
beq $1, $1, TAG473
multu $1, $1
lh $2, 0($1)
blez $2, TAG473
TAG473:
sw $2, 1($2)
slti $2, $2, 1
bne $2, $2, TAG474
mflo $2
TAG474:
mflo $1
mult $2, $1
beq $1, $2, TAG475
multu $1, $1
TAG475:
bgtz $1, TAG476
lui $3, 7
mthi $1
bne $3, $3, TAG476
TAG476:
addiu $4, $3, 9
srav $1, $4, $4
sll $0, $0, 0
lui $4, 14
TAG477:
sll $0, $0, 0
mult $4, $3
mtlo $4
bne $3, $3, TAG478
TAG478:
mthi $3
bne $3, $3, TAG479
mflo $3
sllv $4, $3, $3
TAG479:
sll $0, $0, 0
div $4, $4
mult $4, $4
bne $4, $4, TAG480
TAG480:
xori $1, $4, 4
bne $1, $4, TAG481
div $1, $1
mfhi $1
TAG481:
sll $0, $0, 0
srl $4, $1, 1
mtlo $1
mtlo $1
TAG482:
bgtz $4, TAG483
div $4, $4
lui $3, 0
lh $4, 0($4)
TAG483:
lui $1, 7
subu $1, $1, $4
sw $4, 2($1)
sb $1, 2($1)
TAG484:
sw $1, 2($1)
subu $2, $1, $1
lhu $1, 2($1)
lui $3, 4
TAG485:
sll $0, $0, 0
multu $3, $3
multu $3, $3
lui $2, 0
TAG486:
lui $1, 6
mthi $1
lbu $2, 0($2)
bgez $1, TAG487
TAG487:
mtlo $2
bne $2, $2, TAG488
mfhi $1
blez $2, TAG488
TAG488:
sll $0, $0, 0
sll $0, $0, 0
mthi $4
sll $0, $0, 0
TAG489:
mult $4, $4
and $2, $4, $4
multu $4, $4
div $2, $4
TAG490:
sll $0, $0, 0
lui $1, 5
addiu $2, $1, 7
lui $4, 7
TAG491:
sll $0, $0, 0
bne $3, $3, TAG492
mtlo $4
div $3, $3
TAG492:
div $3, $3
bgtz $3, TAG493
div $3, $3
lui $2, 5
TAG493:
lui $3, 8
slt $4, $2, $3
and $1, $3, $3
sb $1, 0($4)
TAG494:
sll $0, $0, 0
bltz $1, TAG495
sll $0, $0, 0
divu $1, $1
TAG495:
sll $0, $0, 0
sll $0, $0, 0
bgez $1, TAG496
sll $0, $0, 0
TAG496:
multu $4, $4
sb $4, 0($4)
lui $3, 4
mtlo $4
TAG497:
bgez $3, TAG498
mtlo $3
srl $4, $3, 12
mtlo $4
TAG498:
div $4, $4
bgez $4, TAG499
multu $4, $4
mthi $4
TAG499:
lb $3, 0($4)
sb $3, 0($4)
bgtz $3, TAG500
div $3, $4
TAG500:
beq $3, $3, TAG501
sb $3, 0($3)
subu $3, $3, $3
mthi $3
TAG501:
mflo $2
sb $3, 0($2)
mtlo $2
sb $2, 0($3)
TAG502:
divu $2, $2
multu $2, $2
sb $2, 0($2)
sll $4, $2, 4
TAG503:
div $4, $4
div $4, $4
slt $2, $4, $4
lb $1, 0($2)
TAG504:
mflo $2
addiu $2, $1, 3
beq $1, $2, TAG505
lui $2, 2
TAG505:
bne $2, $2, TAG506
lui $4, 11
sll $0, $0, 0
sll $2, $4, 4
TAG506:
sll $0, $0, 0
beq $2, $1, TAG507
addiu $2, $1, 10
bne $2, $2, TAG507
TAG507:
mthi $2
mult $2, $2
lbu $4, 0($2)
sb $2, 0($4)
TAG508:
lbu $3, 0($4)
sh $4, 0($3)
lui $1, 2
lui $4, 9
TAG509:
mthi $4
multu $4, $4
srav $2, $4, $4
bgez $2, TAG510
TAG510:
mfhi $3
lbu $1, 0($3)
bne $1, $1, TAG511
mflo $4
TAG511:
sh $4, 0($4)
sb $4, 0($4)
bne $4, $4, TAG512
mfhi $3
TAG512:
lui $4, 1
sll $0, $0, 0
bne $3, $2, TAG513
sll $0, $0, 0
TAG513:
beq $4, $4, TAG514
mthi $4
beq $4, $4, TAG514
mtlo $4
TAG514:
srl $2, $4, 15
bltz $4, TAG515
addu $1, $2, $4
sll $0, $0, 0
TAG515:
sll $0, $0, 0
sll $0, $0, 0
sb $2, 0($2)
mfhi $4
TAG516:
mult $4, $4
mthi $4
xor $1, $4, $4
sll $0, $0, 0
TAG517:
blez $3, TAG518
lbu $4, 0($3)
bne $3, $4, TAG518
lui $3, 6
TAG518:
div $3, $3
mtlo $3
mult $3, $3
mtlo $3
TAG519:
bne $3, $3, TAG520
sll $0, $0, 0
blez $3, TAG520
mult $4, $4
TAG520:
lui $4, 8
mult $4, $4
sll $0, $0, 0
sll $0, $0, 0
TAG521:
sll $0, $0, 0
bgtz $3, TAG522
sll $0, $0, 0
bgtz $3, TAG522
TAG522:
mflo $2
mult $2, $4
sll $0, $0, 0
mflo $2
TAG523:
beq $2, $2, TAG524
sb $2, 0($2)
mtlo $2
mflo $1
TAG524:
lb $1, 0($1)
mflo $1
lui $1, 10
mflo $1
TAG525:
sh $1, 0($1)
bltz $1, TAG526
mflo $2
mthi $2
TAG526:
bne $2, $2, TAG527
mflo $1
mult $1, $2
multu $1, $2
TAG527:
sw $1, 0($1)
bne $1, $1, TAG528
lh $4, 0($1)
mthi $4
TAG528:
nor $4, $4, $4
bne $4, $4, TAG529
multu $4, $4
sh $4, 1($4)
TAG529:
sb $4, 1($4)
sh $4, 1($4)
bltz $4, TAG530
lh $2, 1($4)
TAG530:
mflo $2
addu $3, $2, $2
lhu $2, 0($3)
bne $2, $3, TAG531
TAG531:
lb $1, 0($2)
add $4, $2, $1
mthi $1
beq $2, $2, TAG532
TAG532:
nor $3, $4, $4
addiu $3, $4, 1
mflo $1
bne $4, $3, TAG533
TAG533:
mult $1, $1
lb $2, 0($1)
divu $1, $1
sb $1, 0($1)
TAG534:
or $4, $2, $2
xori $3, $2, 7
mthi $3
lhu $3, 1($4)
TAG535:
beq $3, $3, TAG536
mthi $3
sw $3, 0($3)
mfhi $3
TAG536:
mtlo $3
sh $3, -511($3)
slt $4, $3, $3
lhu $1, -511($3)
TAG537:
sll $3, $1, 15
sll $0, $0, 0
mtlo $1
multu $1, $1
TAG538:
srl $3, $3, 5
xor $1, $3, $3
bne $3, $3, TAG539
lh $3, 0($1)
TAG539:
sra $1, $3, 10
lw $3, -511($3)
mflo $4
slt $4, $4, $1
TAG540:
lui $4, 5
mthi $4
sll $0, $0, 0
sll $0, $0, 0
TAG541:
lw $4, 0($1)
addiu $2, $4, 6
addiu $2, $1, 1
mflo $4
TAG542:
mfhi $3
sll $0, $0, 0
ori $4, $4, 4
multu $4, $4
TAG543:
mult $4, $4
sra $2, $4, 3
lui $2, 11
sll $4, $2, 11
TAG544:
mtlo $4
div $4, $4
div $4, $4
sll $0, $0, 0
TAG545:
lui $1, 11
mfhi $3
sll $0, $0, 0
bltz $4, TAG546
TAG546:
mult $3, $3
mflo $4
andi $3, $4, 4
lui $3, 14
TAG547:
multu $3, $3
blez $3, TAG548
srav $1, $3, $3
addiu $1, $3, 9
TAG548:
sll $0, $0, 0
mtlo $4
mtlo $1
mflo $3
TAG549:
lui $4, 11
div $4, $4
blez $3, TAG550
xori $2, $3, 7
TAG550:
mflo $3
multu $3, $3
mthi $3
sll $0, $0, 0
TAG551:
mthi $3
sb $3, 0($3)
mtlo $3
lb $1, 0($3)
TAG552:
lb $2, 0($1)
sb $2, 0($2)
slti $2, $1, 9
subu $4, $2, $2
TAG553:
xor $2, $4, $4
bltz $2, TAG554
sb $2, 0($4)
lui $2, 1
TAG554:
addiu $1, $2, 12
bne $2, $2, TAG555
mthi $2
xor $3, $2, $2
TAG555:
beq $3, $3, TAG556
sltu $1, $3, $3
mtlo $1
lhu $4, 0($1)
TAG556:
sh $4, 0($4)
mthi $4
srl $2, $4, 10
lui $2, 13
TAG557:
lui $3, 4
nor $4, $3, $2
slt $3, $3, $3
sll $0, $0, 0
TAG558:
mtlo $2
mfhi $4
lui $2, 15
sll $0, $0, 0
TAG559:
mfhi $2
mfhi $1
mfhi $3
mthi $2
TAG560:
beq $3, $3, TAG561
multu $3, $3
mflo $1
div $3, $3
TAG561:
sra $2, $1, 12
lw $4, 0($2)
sllv $1, $1, $2
sw $1, 0($1)
TAG562:
srav $3, $1, $1
mflo $3
slti $2, $3, 4
lui $3, 0
TAG563:
blez $3, TAG564
mfhi $4
divu $4, $3
sll $3, $3, 2
TAG564:
sh $3, 0($3)
multu $3, $3
bne $3, $3, TAG565
lui $4, 4
TAG565:
sra $2, $4, 4
sb $2, -16384($2)
mtlo $4
sltu $2, $4, $4
TAG566:
lui $4, 14
bgtz $4, TAG567
lui $4, 14
sh $4, 0($4)
TAG567:
slti $4, $4, 12
lui $4, 3
sll $0, $0, 0
lui $4, 14
TAG568:
mtlo $4
mthi $4
mult $4, $4
sll $0, $0, 0
TAG569:
sll $0, $0, 0
beq $4, $4, TAG570
mflo $4
mflo $4
TAG570:
slt $2, $4, $4
lui $4, 9
lui $4, 7
multu $2, $2
TAG571:
mthi $4
divu $4, $4
sll $0, $0, 0
blez $4, TAG572
TAG572:
mfhi $1
mfhi $1
mthi $1
mult $4, $4
TAG573:
multu $1, $1
sllv $4, $1, $1
lhu $2, 0($4)
sb $2, 0($1)
TAG574:
addu $1, $2, $2
lui $2, 11
sllv $3, $1, $1
or $3, $2, $1
TAG575:
sll $0, $0, 0
sll $3, $3, 13
sll $0, $0, 0
mfhi $1
TAG576:
lui $4, 7
mtlo $4
mult $4, $1
lui $4, 3
TAG577:
bne $4, $4, TAG578
lui $1, 14
mthi $4
xori $2, $4, 12
TAG578:
mfhi $2
beq $2, $2, TAG579
sll $0, $0, 0
srlv $4, $3, $2
TAG579:
bne $4, $4, TAG580
sll $0, $0, 0
sll $0, $0, 0
bne $4, $4, TAG580
TAG580:
ori $2, $1, 11
bgtz $2, TAG581
sll $0, $0, 0
sub $1, $2, $1
TAG581:
sll $0, $0, 0
lui $2, 14
addiu $2, $2, 12
lui $1, 15
TAG582:
mfhi $4
sll $0, $0, 0
or $3, $1, $4
bgtz $3, TAG583
TAG583:
div $3, $3
mult $3, $3
andi $3, $3, 6
subu $3, $3, $3
TAG584:
mthi $3
bne $3, $3, TAG585
lhu $2, 0($3)
sh $2, 0($3)
TAG585:
lhu $2, 0($2)
addi $1, $2, 8
mtlo $2
bgtz $1, TAG586
TAG586:
lbu $1, 0($1)
mfhi $1
blez $1, TAG587
mult $1, $1
TAG587:
lb $2, 0($1)
bne $1, $2, TAG588
and $1, $2, $1
add $3, $1, $2
TAG588:
lw $2, 0($3)
sh $3, 0($2)
sb $2, 0($3)
bne $2, $2, TAG589
TAG589:
sw $2, 0($2)
mfhi $1
lbu $4, 0($2)
mflo $1
TAG590:
andi $4, $1, 4
mfhi $2
bgtz $2, TAG591
nor $3, $2, $2
TAG591:
mflo $2
xor $3, $2, $2
lhu $3, 0($2)
subu $2, $3, $3
TAG592:
multu $2, $2
lhu $1, 0($2)
sb $2, 0($1)
nor $2, $2, $2
TAG593:
bne $2, $2, TAG594
lhu $4, 1($2)
bne $2, $2, TAG594
sltiu $2, $4, 10
TAG594:
sb $2, 0($2)
mfhi $1
beq $1, $2, TAG595
sb $1, 0($2)
TAG595:
or $4, $1, $1
bne $1, $1, TAG596
mult $1, $1
mfhi $3
TAG596:
mfhi $2
sb $3, 0($3)
mflo $3
addiu $3, $2, 13
TAG597:
sltiu $2, $3, 11
lui $4, 1
blez $3, TAG598
mtlo $2
TAG598:
bltz $4, TAG599
mthi $4
lui $2, 15
bne $4, $2, TAG599
TAG599:
mflo $3
mtlo $2
lui $2, 7
beq $2, $2, TAG600
TAG600:
sll $0, $0, 0
srl $3, $2, 7
xori $4, $2, 8
div $4, $2
TAG601:
bgtz $4, TAG602
addu $3, $4, $4
lui $1, 15
lui $1, 0
TAG602:
bne $1, $1, TAG603
lui $4, 7
sll $0, $0, 0
sw $4, 0($1)
TAG603:
beq $2, $2, TAG604
mflo $3
bgtz $3, TAG604
lui $1, 10
TAG604:
mtlo $1
multu $1, $1
beq $1, $1, TAG605
xori $4, $1, 7
TAG605:
bgez $4, TAG606
srl $3, $4, 11
lui $1, 12
blez $3, TAG606
TAG606:
lui $3, 4
sra $2, $1, 1
lui $3, 7
bgtz $2, TAG607
TAG607:
mtlo $3
divu $3, $3
beq $3, $3, TAG608
addiu $3, $3, 15
TAG608:
beq $3, $3, TAG609
nor $2, $3, $3
bltz $3, TAG609
mflo $3
TAG609:
div $3, $3
sll $0, $0, 0
lui $3, 7
lui $1, 11
TAG610:
bgez $1, TAG611
sll $0, $0, 0
lui $2, 7
mflo $3
TAG611:
bne $3, $3, TAG612
mthi $3
mult $3, $3
lui $2, 14
TAG612:
mthi $2
beq $2, $2, TAG613
sll $0, $0, 0
lh $2, 0($3)
TAG613:
mthi $2
lui $4, 8
lui $3, 8
lui $4, 9
TAG614:
div $4, $4
sll $0, $0, 0
beq $4, $4, TAG615
addu $4, $4, $4
TAG615:
beq $4, $4, TAG616
subu $3, $4, $4
beq $4, $4, TAG616
sw $4, 0($4)
TAG616:
beq $3, $3, TAG617
srlv $4, $3, $3
mult $4, $3
sw $4, 0($3)
TAG617:
multu $4, $4
sltiu $3, $4, 15
sb $4, 0($4)
sb $4, 0($3)
TAG618:
bltz $3, TAG619
mthi $3
bgtz $3, TAG619
lui $1, 2
TAG619:
lui $3, 15
bgez $3, TAG620
mfhi $3
sb $3, 0($3)
TAG620:
andi $4, $3, 13
beq $3, $4, TAG621
mthi $4
add $2, $4, $3
TAG621:
blez $2, TAG622
sll $0, $0, 0
multu $2, $2
div $2, $2
TAG622:
div $2, $2
multu $2, $2
bgtz $2, TAG623
divu $2, $2
TAG623:
mthi $2
blez $2, TAG624
mfhi $4
sll $0, $0, 0
TAG624:
xori $3, $3, 7
divu $3, $3
bne $3, $3, TAG625
mthi $3
TAG625:
bgtz $3, TAG626
mflo $1
beq $3, $3, TAG626
sw $1, 0($3)
TAG626:
mtlo $1
mthi $1
lbu $1, 0($1)
bne $1, $1, TAG627
TAG627:
multu $1, $1
xor $4, $1, $1
sra $1, $1, 9
srl $4, $4, 8
TAG628:
srl $1, $4, 5
xor $4, $4, $4
lb $3, 0($1)
mflo $1
TAG629:
bgtz $1, TAG630
mtlo $1
sw $1, 0($1)
lui $3, 4
TAG630:
mflo $4
mthi $3
addiu $2, $3, 8
sllv $3, $4, $2
TAG631:
beq $3, $3, TAG632
lb $3, 0($3)
andi $2, $3, 7
addi $2, $3, 6
TAG632:
sll $0, $0, 0
bgez $2, TAG633
mfhi $3
andi $2, $3, 12
TAG633:
mult $2, $2
sll $0, $0, 0
sltu $2, $2, $2
bltz $2, TAG634
TAG634:
lbu $3, 0($2)
sb $2, 0($3)
or $3, $2, $2
sll $2, $3, 7
TAG635:
mfhi $2
subu $2, $2, $2
addu $3, $2, $2
sb $2, 0($2)
TAG636:
mtlo $3
sllv $4, $3, $3
sw $3, 0($3)
lw $1, 0($4)
TAG637:
multu $1, $1
mthi $1
bne $1, $1, TAG638
nor $4, $1, $1
TAG638:
sll $0, $0, 0
mthi $4
ori $3, $4, 8
srlv $3, $3, $4
TAG639:
mflo $4
lui $1, 3
lui $2, 10
beq $3, $1, TAG640
TAG640:
sll $0, $0, 0
bgtz $2, TAG641
sll $0, $0, 0
beq $1, $2, TAG641
TAG641:
mfhi $3
lui $4, 11
mthi $3
bgez $4, TAG642
TAG642:
lui $1, 14
mthi $1
addiu $1, $1, 10
srl $3, $4, 1
TAG643:
blez $3, TAG644
sll $1, $3, 11
subu $3, $1, $3
multu $3, $3
TAG644:
and $2, $3, $3
mfhi $1
srl $3, $1, 0
beq $3, $2, TAG645
TAG645:
mfhi $2
bltz $2, TAG646
xori $1, $2, 14
nor $1, $2, $2
TAG646:
mtlo $1
srav $3, $1, $1
sll $0, $0, 0
sltiu $4, $4, 3
TAG647:
sltu $3, $4, $4
beq $3, $4, TAG648
sb $4, 0($4)
mflo $3
TAG648:
multu $3, $3
sltu $1, $3, $3
lw $1, 0($3)
lbu $1, 0($1)
TAG649:
mthi $1
bne $1, $1, TAG650
slti $3, $1, 4
mtlo $1
TAG650:
sb $3, 0($3)
mflo $1
bgez $3, TAG651
mtlo $1
TAG651:
sb $1, 0($1)
lh $2, 0($1)
mthi $2
sh $1, 0($1)
TAG652:
bltz $2, TAG653
sw $2, -256($2)
bne $2, $2, TAG653
mthi $2
TAG653:
multu $2, $2
lbu $3, -256($2)
lui $4, 7
beq $4, $2, TAG654
TAG654:
mtlo $4
bgez $4, TAG655
lui $4, 14
sub $4, $4, $4
TAG655:
sll $0, $0, 0
mthi $4
mfhi $4
mflo $1
TAG656:
lui $3, 5
multu $1, $3
sll $0, $0, 0
sll $0, $0, 0
TAG657:
sll $0, $0, 0
mult $3, $3
sltiu $3, $3, 12
sb $3, 0($3)
TAG658:
bne $3, $3, TAG659
lw $1, 0($3)
mthi $1
lui $2, 0
TAG659:
mfhi $3
lw $4, 0($2)
divu $3, $4
bgez $2, TAG660
TAG660:
mfhi $3
lui $1, 2
sh $4, -256($4)
mtlo $3
TAG661:
mflo $3
bgez $1, TAG662
nor $3, $1, $1
lb $3, 0($3)
TAG662:
bltz $3, TAG663
mflo $2
lw $4, 0($3)
sh $3, 0($4)
TAG663:
bltz $4, TAG664
mfhi $1
beq $1, $4, TAG664
multu $4, $1
TAG664:
xor $2, $1, $1
beq $2, $2, TAG665
mtlo $1
lbu $1, 0($1)
TAG665:
lui $4, 5
sll $0, $0, 0
lw $1, 0($1)
sw $4, -256($1)
TAG666:
lui $2, 10
bgtz $1, TAG667
multu $1, $1
blez $2, TAG667
TAG667:
addiu $4, $2, 0
mthi $2
or $4, $2, $2
sll $0, $0, 0
TAG668:
bne $4, $4, TAG669
sll $0, $0, 0
lui $3, 4
mflo $2
TAG669:
lui $4, 3
sll $0, $0, 0
sll $0, $0, 0
blez $4, TAG670
TAG670:
mthi $4
sll $0, $0, 0
subu $3, $2, $2
div $3, $4
TAG671:
lui $4, 14
bne $4, $3, TAG672
mult $4, $3
lh $1, 0($4)
TAG672:
bgtz $1, TAG673
mtlo $1
mthi $1
andi $2, $1, 7
TAG673:
sll $1, $2, 11
bne $2, $2, TAG674
mflo $4
bgtz $4, TAG674
TAG674:
mfhi $3
srav $4, $4, $3
lb $1, -256($4)
mthi $4
TAG675:
mult $1, $1
sllv $1, $1, $1
multu $1, $1
or $2, $1, $1
TAG676:
sltu $1, $2, $2
bltz $2, TAG677
lhu $1, 0($1)
mtlo $1
TAG677:
lui $2, 14
slti $1, $1, 1
sllv $2, $1, $2
and $3, $1, $2
TAG678:
bgtz $3, TAG679
mult $3, $3
div $3, $3
srl $4, $3, 5
TAG679:
mflo $2
mflo $1
divu $1, $2
sb $1, 0($2)
TAG680:
subu $1, $1, $1
blez $1, TAG681
sh $1, 0($1)
mflo $4
TAG681:
sw $4, -256($4)
div $4, $4
beq $4, $4, TAG682
mthi $4
TAG682:
srlv $4, $4, $4
sb $4, -256($4)
beq $4, $4, TAG683
mult $4, $4
TAG683:
divu $4, $4
mthi $4
lui $4, 4
and $3, $4, $4
TAG684:
sll $0, $0, 0
lui $1, 10
bgez $1, TAG685
mfhi $1
TAG685:
mtlo $1
mfhi $3
subu $3, $3, $1
mflo $1
TAG686:
mult $1, $1
mult $1, $1
lhu $1, -256($1)
mtlo $1
TAG687:
multu $1, $1
slti $3, $1, 10
mthi $1
lui $3, 9
TAG688:
mfhi $4
mflo $2
sltiu $1, $3, 4
sra $2, $2, 3
TAG689:
divu $2, $2
addu $2, $2, $2
divu $2, $2
blez $2, TAG690
TAG690:
slti $1, $2, 5
bltz $1, TAG691
sh $1, 0($1)
sw $1, -16384($2)
TAG691:
lh $3, 0($1)
multu $1, $3
mthi $3
srl $1, $3, 9
TAG692:
mfhi $4
sb $1, 0($1)
lui $3, 3
and $2, $3, $1
TAG693:
mflo $2
beq $2, $2, TAG694
mfhi $3
or $1, $2, $2
TAG694:
beq $1, $1, TAG695
sltiu $4, $1, 13
bne $1, $1, TAG695
sub $3, $1, $1
TAG695:
lui $3, 1
slt $1, $3, $3
lui $1, 12
sll $0, $0, 0
TAG696:
lui $4, 14
sll $0, $0, 0
mthi $4
and $4, $4, $4
TAG697:
divu $4, $4
beq $4, $4, TAG698
sll $0, $0, 0
sb $4, 0($4)
TAG698:
blez $4, TAG699
sll $0, $0, 0
beq $4, $4, TAG699
srav $3, $4, $4
TAG699:
sll $0, $0, 0
mflo $2
lui $2, 4
lui $1, 10
TAG700:
mult $1, $1
beq $1, $1, TAG701
andi $4, $1, 9
xor $1, $1, $4
TAG701:
lui $4, 5
mflo $1
beq $1, $1, TAG702
sra $1, $1, 3
TAG702:
lui $4, 10
xori $1, $4, 12
sll $0, $0, 0
sll $0, $0, 0
TAG703:
beq $3, $3, TAG704
sll $0, $0, 0
lui $3, 13
lbu $3, 0($1)
TAG704:
div $3, $3
bne $3, $3, TAG705
lui $1, 8
andi $3, $3, 2
TAG705:
bltz $3, TAG706
or $3, $3, $3
mthi $3
mfhi $3
TAG706:
bne $3, $3, TAG707
sw $3, 0($3)
andi $3, $3, 3
add $4, $3, $3
TAG707:
mthi $4
andi $4, $4, 4
mtlo $4
sb $4, 0($4)
TAG708:
bgtz $4, TAG709
mult $4, $4
lw $2, 0($4)
lw $2, 0($4)
TAG709:
lui $1, 4
multu $1, $1
lhu $3, 0($2)
slti $1, $3, 15
TAG710:
mult $1, $1
lbu $3, 0($1)
lui $4, 2
beq $1, $3, TAG711
TAG711:
mfhi $3
bne $4, $4, TAG712
mthi $3
lui $4, 15
TAG712:
lui $2, 3
subu $2, $2, $4
sll $0, $0, 0
sll $0, $0, 0
TAG713:
sra $3, $4, 6
mthi $4
xori $4, $3, 7
srlv $2, $4, $4
TAG714:
slti $4, $2, 7
lhu $2, 0($2)
divu $2, $2
mthi $2
TAG715:
lui $2, 6
mthi $2
slt $3, $2, $2
mtlo $3
TAG716:
sb $3, 0($3)
sll $4, $3, 5
lui $3, 12
beq $4, $4, TAG717
TAG717:
sll $0, $0, 0
addu $1, $3, $3
sll $0, $0, 0
sll $0, $0, 0
TAG718:
sll $0, $0, 0
multu $1, $1
beq $1, $1, TAG719
mflo $2
TAG719:
lui $1, 6
beq $2, $1, TAG720
addu $2, $1, $1
lui $1, 6
TAG720:
mtlo $1
mult $1, $1
mfhi $2
mflo $1
TAG721:
sltu $3, $1, $1
lbu $1, 0($1)
mfhi $1
mflo $1
TAG722:
mthi $1
lh $4, 0($1)
sh $1, 0($4)
mflo $4
TAG723:
bne $4, $4, TAG724
andi $2, $4, 10
mtlo $4
sb $2, 0($4)
TAG724:
mfhi $4
sh $2, 0($2)
addi $1, $2, 12
bgez $2, TAG725
TAG725:
addiu $3, $1, 5
blez $3, TAG726
div $3, $3
beq $3, $3, TAG726
TAG726:
nor $4, $3, $3
subu $4, $3, $4
sb $4, 0($3)
ori $3, $4, 5
TAG727:
bne $3, $3, TAG728
lui $2, 13
bgez $2, TAG728
lbu $1, 0($3)
TAG728:
mtlo $1
mult $1, $1
sh $1, 0($1)
sh $1, 0($1)
TAG729:
addi $1, $1, 1
mtlo $1
mult $1, $1
lui $4, 13
TAG730:
divu $4, $4
beq $4, $4, TAG731
multu $4, $4
sb $4, 0($4)
TAG731:
div $4, $4
bne $4, $4, TAG732
mtlo $4
mfhi $3
TAG732:
lui $2, 0
lui $2, 4
sltu $2, $2, $2
mflo $2
TAG733:
subu $2, $2, $2
mthi $2
mtlo $2
lui $1, 4
TAG734:
beq $1, $1, TAG735
mult $1, $1
bne $1, $1, TAG735
subu $2, $1, $1
TAG735:
srl $3, $2, 9
sw $3, 0($3)
lui $3, 10
slt $4, $3, $2
TAG736:
bne $4, $4, TAG737
lb $2, 0($4)
mthi $2
subu $1, $2, $2
TAG737:
mtlo $1
mthi $1
bgez $1, TAG738
sh $1, 0($1)
TAG738:
ori $1, $1, 14
lui $1, 7
sll $0, $0, 0
lui $4, 15
TAG739:
sll $0, $0, 0
sll $0, $0, 0
mthi $4
lui $2, 0
TAG740:
blez $2, TAG741
addi $4, $2, 14
sra $1, $2, 4
lui $4, 14
TAG741:
bgtz $4, TAG742
lui $1, 3
lbu $3, 0($4)
lui $2, 1
TAG742:
addi $4, $2, 8
lb $2, 0($4)
lui $4, 5
bgez $4, TAG743
TAG743:
sll $3, $4, 13
lui $1, 3
sll $0, $0, 0
sra $1, $3, 1
TAG744:
mflo $2
mult $2, $2
multu $1, $2
bltz $2, TAG745
TAG745:
lbu $3, 0($2)
lui $2, 11
mthi $3
srl $4, $2, 4
TAG746:
sll $0, $0, 0
mflo $4
beq $4, $4, TAG747
mtlo $4
TAG747:
mflo $2
bne $2, $4, TAG748
lw $2, 0($4)
mflo $3
TAG748:
mult $3, $3
srl $1, $3, 7
sltiu $4, $1, 11
beq $1, $1, TAG749
TAG749:
addiu $1, $4, 4
beq $4, $1, TAG750
multu $1, $4
nor $3, $4, $4
TAG750:
nop
nop
test_end:
beq $0, $0, test_end
nop | 12.005803 | 21 | 0.542075 |
23c1ad032e673691525c02c0a0d99b378d932eee | 1,280 | asm | Assembly | programs/oeis/011/A011848.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/011/A011848.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/011/A011848.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A011848: a(n) = floor(binomial(n,2)/2).
; 0,0,0,1,3,5,7,10,14,18,22,27,33,39,45,52,60,68,76,85,95,105,115,126,138,150,162,175,189,203,217,232,248,264,280,297,315,333,351,370,390,410,430,451,473,495,517,540,564,588,612,637,663,689,715,742,770,798,826,855,885,915,945,976,1008,1040,1072,1105,1139,1173,1207,1242,1278,1314,1350,1387,1425,1463,1501,1540,1580,1620,1660,1701,1743,1785,1827,1870,1914,1958,2002,2047,2093,2139,2185,2232,2280,2328,2376,2425,2475,2525,2575,2626,2678,2730,2782,2835,2889,2943,2997,3052,3108,3164,3220,3277,3335,3393,3451,3510,3570,3630,3690,3751,3813,3875,3937,4000,4064,4128,4192,4257,4323,4389,4455,4522,4590,4658,4726,4795,4865,4935,5005,5076,5148,5220,5292,5365,5439,5513,5587,5662,5738,5814,5890,5967,6045,6123,6201,6280,6360,6440,6520,6601,6683,6765,6847,6930,7014,7098,7182,7267,7353,7439,7525,7612,7700,7788,7876,7965,8055,8145,8235,8326,8418,8510,8602,8695,8789,8883,8977,9072,9168,9264,9360,9457,9555,9653,9751,9850,9950,10050,10150,10251,10353,10455,10557,10660,10764,10868,10972,11077,11183,11289,11395,11502,11610,11718,11826,11935,12045,12155,12265,12376,12488,12600,12712,12825,12939,13053,13167,13282,13398,13514,13630,13747,13865,13983,14101,14220,14340,14460,14580,14701,14823,14945,15067,15190,15314,15438
mov $1,$0
bin $1,2
div $1,2
| 182.857143 | 1,208 | 0.778906 |
ba446dcaaa44e23c948f310da49d8cd52db24545 | 720 | asm | Assembly | data/mapObjects/route3.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 16 | 2018-08-28T21:47:01.000Z | 2022-02-20T20:29:59.000Z | data/mapObjects/route3.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 5 | 2019-04-03T19:53:11.000Z | 2022-03-11T22:49:34.000Z | data/mapObjects/route3.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 2 | 2019-12-09T19:46:02.000Z | 2020-12-05T21:36:30.000Z | Route3Object:
db $2c ; border block
db $0 ; warps
db $1 ; signs
db $9, $3b, $a ; Route3Text10
db $9 ; objects
object SPRITE_BLACK_HAIR_BOY_2, $39, $b, STAY, NONE, $1 ; person
object SPRITE_BUG_CATCHER, $a, $6, STAY, RIGHT, $2, OPP_BUG_CATCHER, $4
object SPRITE_BUG_CATCHER, $e, $4, STAY, DOWN, $3, OPP_YOUNGSTER, $1
object SPRITE_LASS, $10, $9, STAY, LEFT, $4, OPP_LASS, $1
object SPRITE_BUG_CATCHER, $13, $5, STAY, DOWN, $5, OPP_BUG_CATCHER, $5
object SPRITE_LASS, $17, $4, STAY, LEFT, $6, OPP_LASS, $2
object SPRITE_BUG_CATCHER, $16, $9, STAY, LEFT, $7, OPP_YOUNGSTER, $2
object SPRITE_BUG_CATCHER, $18, $6, STAY, RIGHT, $8, OPP_BUG_CATCHER, $6
object SPRITE_LASS, $21, $a, STAY, UP, $9, OPP_LASS, $3
| 37.894737 | 73 | 0.675 |
771ce97b63c248a610f75681e141a097a4ef22a5 | 8,272 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1775.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_1775.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_1775.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 %r12
push %r15
push %r8
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x13afc, %rbx
nop
dec %r15
mov $0x6162636465666768, %r8
movq %r8, (%rbx)
xor %r12, %r12
lea addresses_A_ht+0x16dec, %rsi
lea addresses_WC_ht+0xbebf, %rdi
nop
nop
nop
cmp $35842, %rbp
mov $112, %rcx
rep movsb
nop
nop
xor $7802, %rbp
lea addresses_normal_ht+0xdb5, %rsi
clflush (%rsi)
nop
nop
nop
and %rbp, %rbp
mov (%rsi), %r15w
nop
nop
nop
nop
nop
and $26706, %rbx
lea addresses_WC_ht+0x18594, %r12
sub $42917, %rcx
movb $0x61, (%r12)
nop
nop
dec %rbp
lea addresses_normal_ht+0xa79c, %r8
nop
nop
nop
nop
nop
sub %rbx, %rbx
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
vmovups %ymm7, (%r8)
nop
nop
dec %rcx
lea addresses_UC_ht+0x4dec, %rcx
nop
nop
nop
nop
inc %r12
mov (%rcx), %rbp
nop
sub %rbx, %rbx
lea addresses_UC_ht+0x1bc2c, %rbp
nop
nop
nop
xor %rbx, %rbx
mov (%rbp), %esi
nop
nop
nop
nop
add %rsi, %rsi
lea addresses_A_ht+0x31ec, %rbp
nop
nop
nop
nop
sub %rcx, %rcx
mov (%rbp), %r12d
nop
nop
nop
nop
xor $22565, %rdi
lea addresses_UC_ht+0x8b5c, %rsi
nop
nop
and %r12, %r12
mov (%rsi), %r15d
nop
sub $1605, %rdi
lea addresses_D_ht+0x57ec, %rsi
lea addresses_D_ht+0x6a0c, %rdi
nop
add $47790, %rbp
mov $53, %rcx
rep movsl
nop
add %rdi, %rdi
lea addresses_WT_ht+0x185ec, %rsi
lea addresses_A_ht+0xc46c, %rdi
sub %rbp, %rbp
mov $62, %rcx
rep movsl
nop
nop
xor %rbp, %rbp
lea addresses_WT_ht+0x1e334, %rcx
nop
nop
nop
nop
cmp $5076, %rsi
movups (%rcx), %xmm2
vpextrq $1, %xmm2, %r15
xor $62231, %rbp
lea addresses_A_ht+0x990c, %rsi
lea addresses_normal_ht+0xa5af, %rdi
nop
add $45386, %rbp
mov $17, %rcx
rep movsw
nop
nop
nop
nop
sub %r15, %r15
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r8
push %r9
push %rax
push %rbp
// Store
lea addresses_RW+0x11a2c, %r10
nop
nop
nop
nop
add $26578, %r11
mov $0x5152535455565758, %r12
movq %r12, %xmm0
vmovups %ymm0, (%r10)
// Exception!!!
mov (0), %r8
cmp $36279, %r10
// Store
lea addresses_A+0x1c3ec, %rax
nop
nop
nop
nop
dec %r11
mov $0x5152535455565758, %r10
movq %r10, %xmm7
vmovups %ymm7, (%rax)
nop
nop
add $45643, %r12
// Store
lea addresses_WC+0xc59c, %r8
nop
nop
nop
nop
nop
add $36664, %rbp
movl $0x51525354, (%r8)
nop
nop
nop
nop
xor %r10, %r10
// Store
lea addresses_normal+0x15a54, %r9
nop
xor $21674, %rbp
mov $0x5152535455565758, %rax
movq %rax, %xmm5
vmovntdq %ymm5, (%r9)
nop
nop
nop
nop
xor %r9, %r9
// Faulty Load
lea addresses_RW+0x35ec, %r9
cmp %r10, %r10
mov (%r9), %r8
lea oracles, %rbp
and $0xff, %r8
shlq $12, %r8
mov (%rbp,%r8,1), %r8
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 8, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 3}}
[Faulty Load]
{'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}}
{'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 2}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': 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
*/
| 32.3125 | 2,999 | 0.653772 |
63d4c28b82c13aa3642618ce4fd2826714f62b9d | 29 | asm | Assembly | share/cowrie/arch/src/nop-hppa64.asm | a-M0nster/cowrie-1 | 992d9699e24eb29bd356ef3591f45adeecbc426f | [
"BSD-3-Clause"
] | 2,316 | 2015-06-25T18:51:02.000Z | 2022-03-29T23:31:16.000Z | share/cowrie/arch/src/nop-hppa64.asm | a-M0nster/cowrie-1 | 992d9699e24eb29bd356ef3591f45adeecbc426f | [
"BSD-3-Clause"
] | 632 | 2015-07-08T19:02:05.000Z | 2022-03-20T03:20:56.000Z | share/cowrie/arch/src/nop-hppa64.asm | a-M0nster/cowrie-1 | 992d9699e24eb29bd356ef3591f45adeecbc426f | [
"BSD-3-Clause"
] | 486 | 2015-08-12T05:02:45.000Z | 2022-03-27T19:54:02.000Z | .text
.globl main
main:
nop
| 5.8 | 11 | 0.689655 |
0fa26b5d09bcc70baf6770f6ead7ae11f3e8e014 | 56,767 | asm | Assembly | grep.asm | vishal-pathare/xv6-public | 257a840c8c3b8aab8244b69a3a17765ac0d685a5 | [
"MIT-0"
] | null | null | null | grep.asm | vishal-pathare/xv6-public | 257a840c8c3b8aab8244b69a3a17765ac0d685a5 | [
"MIT-0"
] | null | null | null | grep.asm | vishal-pathare/xv6-public | 257a840c8c3b8aab8244b69a3a17765ac0d685a5 | [
"MIT-0"
] | null | null | null |
_grep: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
}
}
int
main(int argc, char *argv[])
{
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: 57 push %edi
e: 56 push %esi
f: 53 push %ebx
10: 51 push %ecx
11: 83 ec 18 sub $0x18,%esp
14: 8b 01 mov (%ecx),%eax
16: 8b 59 04 mov 0x4(%ecx),%ebx
19: 89 45 e4 mov %eax,-0x1c(%ebp)
int fd, i;
char *pattern;
if(argc <= 1){
1c: 83 f8 01 cmp $0x1,%eax
1f: 7e 6f jle 90 <main+0x90>
printf(2, "usage: grep pattern [file ...]\n");
exit();
}
pattern = argv[1];
21: 8b 43 04 mov 0x4(%ebx),%eax
24: 83 c3 08 add $0x8,%ebx
if(argc <= 2){
27: 83 7d e4 02 cmpl $0x2,-0x1c(%ebp)
grep(pattern, 0);
exit();
}
for(i = 2; i < argc; i++){
2b: be 02 00 00 00 mov $0x2,%esi
pattern = argv[1];
30: 89 45 e0 mov %eax,-0x20(%ebp)
if(argc <= 2){
33: 75 2d jne 62 <main+0x62>
35: eb 6c jmp a3 <main+0xa3>
37: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
3e: 66 90 xchg %ax,%ax
if((fd = open(argv[i], 0)) < 0){
printf(1, "grep: cannot open %s\n", argv[i]);
exit();
}
grep(pattern, fd);
40: 83 ec 08 sub $0x8,%esp
for(i = 2; i < argc; i++){
43: 83 c6 01 add $0x1,%esi
46: 83 c3 04 add $0x4,%ebx
grep(pattern, fd);
49: 50 push %eax
4a: ff 75 e0 pushl -0x20(%ebp)
4d: e8 7e 01 00 00 call 1d0 <grep>
close(fd);
52: 89 3c 24 mov %edi,(%esp)
55: e8 91 05 00 00 call 5eb <close>
for(i = 2; i < argc; i++){
5a: 83 c4 10 add $0x10,%esp
5d: 39 75 e4 cmp %esi,-0x1c(%ebp)
60: 7e 29 jle 8b <main+0x8b>
if((fd = open(argv[i], 0)) < 0){
62: 83 ec 08 sub $0x8,%esp
65: 6a 00 push $0x0
67: ff 33 pushl (%ebx)
69: e8 95 05 00 00 call 603 <open>
6e: 83 c4 10 add $0x10,%esp
71: 89 c7 mov %eax,%edi
73: 85 c0 test %eax,%eax
75: 79 c9 jns 40 <main+0x40>
printf(1, "grep: cannot open %s\n", argv[i]);
77: 50 push %eax
78: ff 33 pushl (%ebx)
7a: 68 b8 0a 00 00 push $0xab8
7f: 6a 01 push $0x1
81: e8 aa 06 00 00 call 730 <printf>
exit();
86: e8 38 05 00 00 call 5c3 <exit>
}
exit();
8b: e8 33 05 00 00 call 5c3 <exit>
printf(2, "usage: grep pattern [file ...]\n");
90: 51 push %ecx
91: 51 push %ecx
92: 68 98 0a 00 00 push $0xa98
97: 6a 02 push $0x2
99: e8 92 06 00 00 call 730 <printf>
exit();
9e: e8 20 05 00 00 call 5c3 <exit>
grep(pattern, 0);
a3: 52 push %edx
a4: 52 push %edx
a5: 6a 00 push $0x0
a7: 50 push %eax
a8: e8 23 01 00 00 call 1d0 <grep>
exit();
ad: e8 11 05 00 00 call 5c3 <exit>
b2: 66 90 xchg %ax,%ax
b4: 66 90 xchg %ax,%ax
b6: 66 90 xchg %ax,%ax
b8: 66 90 xchg %ax,%ax
ba: 66 90 xchg %ax,%ax
bc: 66 90 xchg %ax,%ax
be: 66 90 xchg %ax,%ax
000000c0 <matchhere>:
return 0;
}
// matchhere: search for re at beginning of text
int matchhere(char *re, char *text)
{
c0: 55 push %ebp
c1: 89 e5 mov %esp,%ebp
c3: 57 push %edi
c4: 56 push %esi
c5: 53 push %ebx
c6: 83 ec 0c sub $0xc,%esp
c9: 8b 75 08 mov 0x8(%ebp),%esi
cc: 8b 5d 0c mov 0xc(%ebp),%ebx
if(re[0] == '\0')
cf: 0f b6 06 movzbl (%esi),%eax
d2: 84 c0 test %al,%al
d4: 75 2d jne 103 <matchhere+0x43>
d6: e9 7d 00 00 00 jmp 158 <matchhere+0x98>
db: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
df: 90 nop
return 1;
if(re[1] == '*')
return matchstar(re[0], re+2, text);
if(re[0] == '$' && re[1] == '\0')
return *text == '\0';
e0: 0f b6 0b movzbl (%ebx),%ecx
if(re[0] == '$' && re[1] == '\0')
e3: 80 fa 24 cmp $0x24,%dl
e6: 75 04 jne ec <matchhere+0x2c>
e8: 84 c0 test %al,%al
ea: 74 79 je 165 <matchhere+0xa5>
if(*text!='\0' && (re[0]=='.' || re[0]==*text))
ec: 84 c9 test %cl,%cl
ee: 74 58 je 148 <matchhere+0x88>
f0: 38 d1 cmp %dl,%cl
f2: 74 05 je f9 <matchhere+0x39>
f4: 80 fa 2e cmp $0x2e,%dl
f7: 75 4f jne 148 <matchhere+0x88>
return matchhere(re+1, text+1);
f9: 83 c3 01 add $0x1,%ebx
fc: 83 c6 01 add $0x1,%esi
if(re[0] == '\0')
ff: 84 c0 test %al,%al
101: 74 55 je 158 <matchhere+0x98>
if(re[1] == '*')
103: 89 c2 mov %eax,%edx
105: 0f b6 46 01 movzbl 0x1(%esi),%eax
109: 3c 2a cmp $0x2a,%al
10b: 75 d3 jne e0 <matchhere+0x20>
return matchstar(re[0], re+2, text);
10d: 83 c6 02 add $0x2,%esi
110: 0f be fa movsbl %dl,%edi
return 0;
}
// matchstar: search for c*re at beginning of text
int matchstar(int c, char *re, char *text)
113: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
117: 90 nop
{
do{ // a * matches zero or more instances
if(matchhere(re, text))
118: 83 ec 08 sub $0x8,%esp
11b: 53 push %ebx
11c: 56 push %esi
11d: e8 9e ff ff ff call c0 <matchhere>
122: 83 c4 10 add $0x10,%esp
125: 85 c0 test %eax,%eax
127: 75 2f jne 158 <matchhere+0x98>
return 1;
}while(*text!='\0' && (*text++==c || c=='.'));
129: 0f be 13 movsbl (%ebx),%edx
12c: 84 d2 test %dl,%dl
12e: 74 0c je 13c <matchhere+0x7c>
130: 83 c3 01 add $0x1,%ebx
133: 83 ff 2e cmp $0x2e,%edi
136: 74 e0 je 118 <matchhere+0x58>
138: 39 fa cmp %edi,%edx
13a: 74 dc je 118 <matchhere+0x58>
}
13c: 8d 65 f4 lea -0xc(%ebp),%esp
13f: 5b pop %ebx
140: 5e pop %esi
141: 5f pop %edi
142: 5d pop %ebp
143: c3 ret
144: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
148: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
14b: 31 c0 xor %eax,%eax
}
14d: 5b pop %ebx
14e: 5e pop %esi
14f: 5f pop %edi
150: 5d pop %ebp
151: c3 ret
152: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
158: 8d 65 f4 lea -0xc(%ebp),%esp
return 1;
15b: b8 01 00 00 00 mov $0x1,%eax
}
160: 5b pop %ebx
161: 5e pop %esi
162: 5f pop %edi
163: 5d pop %ebp
164: c3 ret
return *text == '\0';
165: 31 c0 xor %eax,%eax
167: 84 c9 test %cl,%cl
169: 0f 94 c0 sete %al
16c: eb ce jmp 13c <matchhere+0x7c>
16e: 66 90 xchg %ax,%ax
00000170 <match>:
{
170: 55 push %ebp
171: 89 e5 mov %esp,%ebp
173: 56 push %esi
174: 53 push %ebx
175: 8b 5d 08 mov 0x8(%ebp),%ebx
178: 8b 75 0c mov 0xc(%ebp),%esi
if(re[0] == '^')
17b: 80 3b 5e cmpb $0x5e,(%ebx)
17e: 75 11 jne 191 <match+0x21>
180: eb 2e jmp 1b0 <match+0x40>
182: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
}while(*text++ != '\0');
188: 83 c6 01 add $0x1,%esi
18b: 80 7e ff 00 cmpb $0x0,-0x1(%esi)
18f: 74 16 je 1a7 <match+0x37>
if(matchhere(re, text))
191: 83 ec 08 sub $0x8,%esp
194: 56 push %esi
195: 53 push %ebx
196: e8 25 ff ff ff call c0 <matchhere>
19b: 83 c4 10 add $0x10,%esp
19e: 85 c0 test %eax,%eax
1a0: 74 e6 je 188 <match+0x18>
return 1;
1a2: b8 01 00 00 00 mov $0x1,%eax
}
1a7: 8d 65 f8 lea -0x8(%ebp),%esp
1aa: 5b pop %ebx
1ab: 5e pop %esi
1ac: 5d pop %ebp
1ad: c3 ret
1ae: 66 90 xchg %ax,%ax
return matchhere(re+1, text);
1b0: 83 c3 01 add $0x1,%ebx
1b3: 89 5d 08 mov %ebx,0x8(%ebp)
}
1b6: 8d 65 f8 lea -0x8(%ebp),%esp
1b9: 5b pop %ebx
1ba: 5e pop %esi
1bb: 5d pop %ebp
return matchhere(re+1, text);
1bc: e9 ff fe ff ff jmp c0 <matchhere>
1c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1c8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1cf: 90 nop
000001d0 <grep>:
{
1d0: 55 push %ebp
1d1: 89 e5 mov %esp,%ebp
1d3: 57 push %edi
1d4: 56 push %esi
1d5: 53 push %ebx
1d6: 83 ec 1c sub $0x1c,%esp
1d9: 8b 7d 08 mov 0x8(%ebp),%edi
m = 0;
1dc: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
return matchhere(re+1, text);
1e3: 8d 47 01 lea 0x1(%edi),%eax
1e6: 89 45 d8 mov %eax,-0x28(%ebp)
1e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
while((n = read(fd, buf+m, sizeof(buf)-m-1)) > 0){
1f0: 8b 4d dc mov -0x24(%ebp),%ecx
1f3: b8 ff 03 00 00 mov $0x3ff,%eax
1f8: 83 ec 04 sub $0x4,%esp
1fb: 29 c8 sub %ecx,%eax
1fd: 50 push %eax
1fe: 8d 81 80 0e 00 00 lea 0xe80(%ecx),%eax
204: 50 push %eax
205: ff 75 0c pushl 0xc(%ebp)
208: e8 ce 03 00 00 call 5db <read>
20d: 83 c4 10 add $0x10,%esp
210: 85 c0 test %eax,%eax
212: 0f 8e e5 00 00 00 jle 2fd <grep+0x12d>
m += n;
218: 01 45 dc add %eax,-0x24(%ebp)
21b: 8b 4d dc mov -0x24(%ebp),%ecx
p = buf;
21e: c7 45 e4 80 0e 00 00 movl $0xe80,-0x1c(%ebp)
buf[m] = '\0';
225: c6 81 80 0e 00 00 00 movb $0x0,0xe80(%ecx)
while((q = strchr(p, '\n')) != 0){
22c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
230: 83 ec 08 sub $0x8,%esp
233: 6a 0a push $0xa
235: ff 75 e4 pushl -0x1c(%ebp)
238: e8 03 02 00 00 call 440 <strchr>
23d: 83 c4 10 add $0x10,%esp
240: 89 c3 mov %eax,%ebx
242: 85 c0 test %eax,%eax
244: 74 72 je 2b8 <grep+0xe8>
*q = 0;
246: c6 03 00 movb $0x0,(%ebx)
write(1, p, q+1 - p);
249: 8d 43 01 lea 0x1(%ebx),%eax
if(re[0] == '^')
24c: 80 3f 5e cmpb $0x5e,(%edi)
write(1, p, q+1 - p);
24f: 89 45 e0 mov %eax,-0x20(%ebp)
252: 8b 75 e4 mov -0x1c(%ebp),%esi
if(re[0] == '^')
255: 75 12 jne 269 <grep+0x99>
257: eb 47 jmp 2a0 <grep+0xd0>
259: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}while(*text++ != '\0');
260: 83 c6 01 add $0x1,%esi
263: 80 7e ff 00 cmpb $0x0,-0x1(%esi)
267: 74 2b je 294 <grep+0xc4>
if(matchhere(re, text))
269: 83 ec 08 sub $0x8,%esp
26c: 56 push %esi
26d: 57 push %edi
26e: e8 4d fe ff ff call c0 <matchhere>
273: 83 c4 10 add $0x10,%esp
276: 85 c0 test %eax,%eax
278: 74 e6 je 260 <grep+0x90>
write(1, p, q+1 - p);
27a: 8b 55 e4 mov -0x1c(%ebp),%edx
27d: 8b 45 e0 mov -0x20(%ebp),%eax
280: 83 ec 04 sub $0x4,%esp
*q = '\n';
283: c6 03 0a movb $0xa,(%ebx)
write(1, p, q+1 - p);
286: 29 d0 sub %edx,%eax
288: 50 push %eax
289: 52 push %edx
28a: 6a 01 push $0x1
28c: e8 52 03 00 00 call 5e3 <write>
291: 83 c4 10 add $0x10,%esp
p = q+1;
294: 8b 45 e0 mov -0x20(%ebp),%eax
297: 89 45 e4 mov %eax,-0x1c(%ebp)
29a: eb 94 jmp 230 <grep+0x60>
29c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return matchhere(re+1, text);
2a0: 83 ec 08 sub $0x8,%esp
2a3: 56 push %esi
2a4: ff 75 d8 pushl -0x28(%ebp)
2a7: e8 14 fe ff ff call c0 <matchhere>
2ac: 83 c4 10 add $0x10,%esp
if(match(pattern, p)){
2af: 85 c0 test %eax,%eax
2b1: 74 e1 je 294 <grep+0xc4>
2b3: eb c5 jmp 27a <grep+0xaa>
2b5: 8d 76 00 lea 0x0(%esi),%esi
if(p == buf)
2b8: 8b 55 e4 mov -0x1c(%ebp),%edx
2bb: 81 fa 80 0e 00 00 cmp $0xe80,%edx
2c1: 74 2e je 2f1 <grep+0x121>
if(m > 0){
2c3: 8b 4d dc mov -0x24(%ebp),%ecx
2c6: 85 c9 test %ecx,%ecx
2c8: 0f 8e 22 ff ff ff jle 1f0 <grep+0x20>
m -= p - buf;
2ce: 89 d0 mov %edx,%eax
memmove(buf, p, m);
2d0: 83 ec 04 sub $0x4,%esp
m -= p - buf;
2d3: 2d 80 0e 00 00 sub $0xe80,%eax
2d8: 29 c1 sub %eax,%ecx
memmove(buf, p, m);
2da: 51 push %ecx
2db: 52 push %edx
2dc: 68 80 0e 00 00 push $0xe80
m -= p - buf;
2e1: 89 4d dc mov %ecx,-0x24(%ebp)
memmove(buf, p, m);
2e4: e8 a7 02 00 00 call 590 <memmove>
2e9: 83 c4 10 add $0x10,%esp
2ec: e9 ff fe ff ff jmp 1f0 <grep+0x20>
m = 0;
2f1: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
2f8: e9 f3 fe ff ff jmp 1f0 <grep+0x20>
}
2fd: 8d 65 f4 lea -0xc(%ebp),%esp
300: 5b pop %ebx
301: 5e pop %esi
302: 5f pop %edi
303: 5d pop %ebp
304: c3 ret
305: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
30c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000310 <matchstar>:
{
310: 55 push %ebp
311: 89 e5 mov %esp,%ebp
313: 57 push %edi
314: 56 push %esi
315: 53 push %ebx
316: 83 ec 0c sub $0xc,%esp
319: 8b 5d 08 mov 0x8(%ebp),%ebx
31c: 8b 75 0c mov 0xc(%ebp),%esi
31f: 8b 7d 10 mov 0x10(%ebp),%edi
322: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(matchhere(re, text))
328: 83 ec 08 sub $0x8,%esp
32b: 57 push %edi
32c: 56 push %esi
32d: e8 8e fd ff ff call c0 <matchhere>
332: 83 c4 10 add $0x10,%esp
335: 89 c2 mov %eax,%edx
337: 85 c0 test %eax,%eax
339: 75 25 jne 360 <matchstar+0x50>
}while(*text!='\0' && (*text++==c || c=='.'));
33b: 0f be 07 movsbl (%edi),%eax
33e: 84 c0 test %al,%al
340: 74 0c je 34e <matchstar+0x3e>
342: 83 c7 01 add $0x1,%edi
345: 39 d8 cmp %ebx,%eax
347: 74 df je 328 <matchstar+0x18>
349: 83 fb 2e cmp $0x2e,%ebx
34c: 74 da je 328 <matchstar+0x18>
}
34e: 8d 65 f4 lea -0xc(%ebp),%esp
351: 89 d0 mov %edx,%eax
353: 5b pop %ebx
354: 5e pop %esi
355: 5f pop %edi
356: 5d pop %ebp
357: c3 ret
358: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
35f: 90 nop
360: 8d 65 f4 lea -0xc(%ebp),%esp
return 1;
363: ba 01 00 00 00 mov $0x1,%edx
}
368: 5b pop %ebx
369: 89 d0 mov %edx,%eax
36b: 5e pop %esi
36c: 5f pop %edi
36d: 5d pop %ebp
36e: c3 ret
36f: 90 nop
00000370 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
370: 55 push %ebp
char *os;
os = s;
while((*s++ = *t++) != 0)
371: 31 c0 xor %eax,%eax
{
373: 89 e5 mov %esp,%ebp
375: 53 push %ebx
376: 8b 4d 08 mov 0x8(%ebp),%ecx
379: 8b 5d 0c mov 0xc(%ebp),%ebx
37c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
while((*s++ = *t++) != 0)
380: 0f b6 14 03 movzbl (%ebx,%eax,1),%edx
384: 88 14 01 mov %dl,(%ecx,%eax,1)
387: 83 c0 01 add $0x1,%eax
38a: 84 d2 test %dl,%dl
38c: 75 f2 jne 380 <strcpy+0x10>
;
return os;
}
38e: 8b 5d fc mov -0x4(%ebp),%ebx
391: 89 c8 mov %ecx,%eax
393: c9 leave
394: c3 ret
395: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
39c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
000003a0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
3a0: 55 push %ebp
3a1: 89 e5 mov %esp,%ebp
3a3: 53 push %ebx
3a4: 8b 4d 08 mov 0x8(%ebp),%ecx
3a7: 8b 55 0c mov 0xc(%ebp),%edx
while(*p && *p == *q)
3aa: 0f b6 01 movzbl (%ecx),%eax
3ad: 0f b6 1a movzbl (%edx),%ebx
3b0: 84 c0 test %al,%al
3b2: 75 1d jne 3d1 <strcmp+0x31>
3b4: eb 2a jmp 3e0 <strcmp+0x40>
3b6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
3bd: 8d 76 00 lea 0x0(%esi),%esi
3c0: 0f b6 41 01 movzbl 0x1(%ecx),%eax
p++, q++;
3c4: 83 c1 01 add $0x1,%ecx
3c7: 83 c2 01 add $0x1,%edx
return (uchar)*p - (uchar)*q;
3ca: 0f b6 1a movzbl (%edx),%ebx
while(*p && *p == *q)
3cd: 84 c0 test %al,%al
3cf: 74 0f je 3e0 <strcmp+0x40>
3d1: 38 d8 cmp %bl,%al
3d3: 74 eb je 3c0 <strcmp+0x20>
return (uchar)*p - (uchar)*q;
3d5: 29 d8 sub %ebx,%eax
}
3d7: 8b 5d fc mov -0x4(%ebp),%ebx
3da: c9 leave
3db: c3 ret
3dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
3e0: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
3e2: 29 d8 sub %ebx,%eax
}
3e4: 8b 5d fc mov -0x4(%ebp),%ebx
3e7: c9 leave
3e8: c3 ret
3e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000003f0 <strlen>:
uint
strlen(const char *s)
{
3f0: 55 push %ebp
3f1: 89 e5 mov %esp,%ebp
3f3: 8b 55 08 mov 0x8(%ebp),%edx
int n;
for(n = 0; s[n]; n++)
3f6: 80 3a 00 cmpb $0x0,(%edx)
3f9: 74 15 je 410 <strlen+0x20>
3fb: 31 c0 xor %eax,%eax
3fd: 8d 76 00 lea 0x0(%esi),%esi
400: 83 c0 01 add $0x1,%eax
403: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
407: 89 c1 mov %eax,%ecx
409: 75 f5 jne 400 <strlen+0x10>
;
return n;
}
40b: 89 c8 mov %ecx,%eax
40d: 5d pop %ebp
40e: c3 ret
40f: 90 nop
for(n = 0; s[n]; n++)
410: 31 c9 xor %ecx,%ecx
}
412: 5d pop %ebp
413: 89 c8 mov %ecx,%eax
415: c3 ret
416: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
41d: 8d 76 00 lea 0x0(%esi),%esi
00000420 <memset>:
void*
memset(void *dst, int c, uint n)
{
420: 55 push %ebp
421: 89 e5 mov %esp,%ebp
423: 57 push %edi
424: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
427: 8b 4d 10 mov 0x10(%ebp),%ecx
42a: 8b 45 0c mov 0xc(%ebp),%eax
42d: 89 d7 mov %edx,%edi
42f: fc cld
430: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
432: 8b 7d fc mov -0x4(%ebp),%edi
435: 89 d0 mov %edx,%eax
437: c9 leave
438: c3 ret
439: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000440 <strchr>:
char*
strchr(const char *s, char c)
{
440: 55 push %ebp
441: 89 e5 mov %esp,%ebp
443: 8b 45 08 mov 0x8(%ebp),%eax
446: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx
for(; *s; s++)
44a: 0f b6 10 movzbl (%eax),%edx
44d: 84 d2 test %dl,%dl
44f: 75 12 jne 463 <strchr+0x23>
451: eb 1d jmp 470 <strchr+0x30>
453: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
457: 90 nop
458: 0f b6 50 01 movzbl 0x1(%eax),%edx
45c: 83 c0 01 add $0x1,%eax
45f: 84 d2 test %dl,%dl
461: 74 0d je 470 <strchr+0x30>
if(*s == c)
463: 38 d1 cmp %dl,%cl
465: 75 f1 jne 458 <strchr+0x18>
return (char*)s;
return 0;
}
467: 5d pop %ebp
468: c3 ret
469: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return 0;
470: 31 c0 xor %eax,%eax
}
472: 5d pop %ebp
473: c3 ret
474: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
47b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
47f: 90 nop
00000480 <gets>:
char*
gets(char *buf, int max)
{
480: 55 push %ebp
481: 89 e5 mov %esp,%ebp
483: 57 push %edi
484: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
485: 31 f6 xor %esi,%esi
{
487: 53 push %ebx
488: 89 f3 mov %esi,%ebx
48a: 83 ec 1c sub $0x1c,%esp
48d: 8b 7d 08 mov 0x8(%ebp),%edi
for(i=0; i+1 < max; ){
490: eb 2f jmp 4c1 <gets+0x41>
492: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cc = read(0, &c, 1);
498: 83 ec 04 sub $0x4,%esp
49b: 8d 45 e7 lea -0x19(%ebp),%eax
49e: 6a 01 push $0x1
4a0: 50 push %eax
4a1: 6a 00 push $0x0
4a3: e8 33 01 00 00 call 5db <read>
if(cc < 1)
4a8: 83 c4 10 add $0x10,%esp
4ab: 85 c0 test %eax,%eax
4ad: 7e 1c jle 4cb <gets+0x4b>
break;
buf[i++] = c;
4af: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
if(c == '\n' || c == '\r')
4b3: 83 c7 01 add $0x1,%edi
buf[i++] = c;
4b6: 88 47 ff mov %al,-0x1(%edi)
if(c == '\n' || c == '\r')
4b9: 3c 0a cmp $0xa,%al
4bb: 74 23 je 4e0 <gets+0x60>
4bd: 3c 0d cmp $0xd,%al
4bf: 74 1f je 4e0 <gets+0x60>
for(i=0; i+1 < max; ){
4c1: 83 c3 01 add $0x1,%ebx
buf[i++] = c;
4c4: 89 fe mov %edi,%esi
for(i=0; i+1 < max; ){
4c6: 3b 5d 0c cmp 0xc(%ebp),%ebx
4c9: 7c cd jl 498 <gets+0x18>
4cb: 89 f3 mov %esi,%ebx
break;
}
buf[i] = '\0';
return buf;
}
4cd: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
4d0: c6 03 00 movb $0x0,(%ebx)
}
4d3: 8d 65 f4 lea -0xc(%ebp),%esp
4d6: 5b pop %ebx
4d7: 5e pop %esi
4d8: 5f pop %edi
4d9: 5d pop %ebp
4da: c3 ret
4db: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
4df: 90 nop
buf[i] = '\0';
4e0: 8b 75 08 mov 0x8(%ebp),%esi
}
4e3: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
4e6: 01 de add %ebx,%esi
4e8: 89 f3 mov %esi,%ebx
4ea: c6 03 00 movb $0x0,(%ebx)
}
4ed: 8d 65 f4 lea -0xc(%ebp),%esp
4f0: 5b pop %ebx
4f1: 5e pop %esi
4f2: 5f pop %edi
4f3: 5d pop %ebp
4f4: c3 ret
4f5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
4fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000500 <stat>:
int
stat(const char *n, struct stat *st)
{
500: 55 push %ebp
501: 89 e5 mov %esp,%ebp
503: 56 push %esi
504: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
505: 83 ec 08 sub $0x8,%esp
508: 6a 00 push $0x0
50a: ff 75 08 pushl 0x8(%ebp)
50d: e8 f1 00 00 00 call 603 <open>
if(fd < 0)
512: 83 c4 10 add $0x10,%esp
515: 85 c0 test %eax,%eax
517: 78 27 js 540 <stat+0x40>
return -1;
r = fstat(fd, st);
519: 83 ec 08 sub $0x8,%esp
51c: ff 75 0c pushl 0xc(%ebp)
51f: 89 c3 mov %eax,%ebx
521: 50 push %eax
522: e8 f4 00 00 00 call 61b <fstat>
close(fd);
527: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
52a: 89 c6 mov %eax,%esi
close(fd);
52c: e8 ba 00 00 00 call 5eb <close>
return r;
531: 83 c4 10 add $0x10,%esp
}
534: 8d 65 f8 lea -0x8(%ebp),%esp
537: 89 f0 mov %esi,%eax
539: 5b pop %ebx
53a: 5e pop %esi
53b: 5d pop %ebp
53c: c3 ret
53d: 8d 76 00 lea 0x0(%esi),%esi
return -1;
540: be ff ff ff ff mov $0xffffffff,%esi
545: eb ed jmp 534 <stat+0x34>
547: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
54e: 66 90 xchg %ax,%ax
00000550 <atoi>:
int
atoi(const char *s)
{
550: 55 push %ebp
551: 89 e5 mov %esp,%ebp
553: 53 push %ebx
554: 8b 55 08 mov 0x8(%ebp),%edx
int n;
n = 0;
while('0' <= *s && *s <= '9')
557: 0f be 02 movsbl (%edx),%eax
55a: 8d 48 d0 lea -0x30(%eax),%ecx
55d: 80 f9 09 cmp $0x9,%cl
n = 0;
560: b9 00 00 00 00 mov $0x0,%ecx
while('0' <= *s && *s <= '9')
565: 77 1e ja 585 <atoi+0x35>
567: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
56e: 66 90 xchg %ax,%ax
n = n*10 + *s++ - '0';
570: 83 c2 01 add $0x1,%edx
573: 8d 0c 89 lea (%ecx,%ecx,4),%ecx
576: 8d 4c 48 d0 lea -0x30(%eax,%ecx,2),%ecx
while('0' <= *s && *s <= '9')
57a: 0f be 02 movsbl (%edx),%eax
57d: 8d 58 d0 lea -0x30(%eax),%ebx
580: 80 fb 09 cmp $0x9,%bl
583: 76 eb jbe 570 <atoi+0x20>
return n;
}
585: 8b 5d fc mov -0x4(%ebp),%ebx
588: 89 c8 mov %ecx,%eax
58a: c9 leave
58b: c3 ret
58c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000590 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
590: 55 push %ebp
591: 89 e5 mov %esp,%ebp
593: 57 push %edi
594: 8b 45 10 mov 0x10(%ebp),%eax
597: 8b 55 08 mov 0x8(%ebp),%edx
59a: 56 push %esi
59b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
59e: 85 c0 test %eax,%eax
5a0: 7e 13 jle 5b5 <memmove+0x25>
5a2: 01 d0 add %edx,%eax
dst = vdst;
5a4: 89 d7 mov %edx,%edi
5a6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
5ad: 8d 76 00 lea 0x0(%esi),%esi
*dst++ = *src++;
5b0: a4 movsb %ds:(%esi),%es:(%edi)
while(n-- > 0)
5b1: 39 f8 cmp %edi,%eax
5b3: 75 fb jne 5b0 <memmove+0x20>
return vdst;
}
5b5: 5e pop %esi
5b6: 89 d0 mov %edx,%eax
5b8: 5f pop %edi
5b9: 5d pop %ebp
5ba: c3 ret
000005bb <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
5bb: b8 01 00 00 00 mov $0x1,%eax
5c0: cd 40 int $0x40
5c2: c3 ret
000005c3 <exit>:
SYSCALL(exit)
5c3: b8 02 00 00 00 mov $0x2,%eax
5c8: cd 40 int $0x40
5ca: c3 ret
000005cb <wait>:
SYSCALL(wait)
5cb: b8 03 00 00 00 mov $0x3,%eax
5d0: cd 40 int $0x40
5d2: c3 ret
000005d3 <pipe>:
SYSCALL(pipe)
5d3: b8 04 00 00 00 mov $0x4,%eax
5d8: cd 40 int $0x40
5da: c3 ret
000005db <read>:
SYSCALL(read)
5db: b8 05 00 00 00 mov $0x5,%eax
5e0: cd 40 int $0x40
5e2: c3 ret
000005e3 <write>:
SYSCALL(write)
5e3: b8 10 00 00 00 mov $0x10,%eax
5e8: cd 40 int $0x40
5ea: c3 ret
000005eb <close>:
SYSCALL(close)
5eb: b8 15 00 00 00 mov $0x15,%eax
5f0: cd 40 int $0x40
5f2: c3 ret
000005f3 <kill>:
SYSCALL(kill)
5f3: b8 06 00 00 00 mov $0x6,%eax
5f8: cd 40 int $0x40
5fa: c3 ret
000005fb <exec>:
SYSCALL(exec)
5fb: b8 07 00 00 00 mov $0x7,%eax
600: cd 40 int $0x40
602: c3 ret
00000603 <open>:
SYSCALL(open)
603: b8 0f 00 00 00 mov $0xf,%eax
608: cd 40 int $0x40
60a: c3 ret
0000060b <mknod>:
SYSCALL(mknod)
60b: b8 11 00 00 00 mov $0x11,%eax
610: cd 40 int $0x40
612: c3 ret
00000613 <unlink>:
SYSCALL(unlink)
613: b8 12 00 00 00 mov $0x12,%eax
618: cd 40 int $0x40
61a: c3 ret
0000061b <fstat>:
SYSCALL(fstat)
61b: b8 08 00 00 00 mov $0x8,%eax
620: cd 40 int $0x40
622: c3 ret
00000623 <link>:
SYSCALL(link)
623: b8 13 00 00 00 mov $0x13,%eax
628: cd 40 int $0x40
62a: c3 ret
0000062b <mkdir>:
SYSCALL(mkdir)
62b: b8 14 00 00 00 mov $0x14,%eax
630: cd 40 int $0x40
632: c3 ret
00000633 <chdir>:
SYSCALL(chdir)
633: b8 09 00 00 00 mov $0x9,%eax
638: cd 40 int $0x40
63a: c3 ret
0000063b <dup>:
SYSCALL(dup)
63b: b8 0a 00 00 00 mov $0xa,%eax
640: cd 40 int $0x40
642: c3 ret
00000643 <getpid>:
SYSCALL(getpid)
643: b8 0b 00 00 00 mov $0xb,%eax
648: cd 40 int $0x40
64a: c3 ret
0000064b <sbrk>:
SYSCALL(sbrk)
64b: b8 0c 00 00 00 mov $0xc,%eax
650: cd 40 int $0x40
652: c3 ret
00000653 <sleep>:
SYSCALL(sleep)
653: b8 0d 00 00 00 mov $0xd,%eax
658: cd 40 int $0x40
65a: c3 ret
0000065b <uptime>:
SYSCALL(uptime)
65b: b8 0e 00 00 00 mov $0xe,%eax
660: cd 40 int $0x40
662: c3 ret
00000663 <getyear>:
SYSCALL(getyear)
663: b8 16 00 00 00 mov $0x16,%eax
668: cd 40 int $0x40
66a: c3 ret
0000066b <lseek>:
66b: b8 17 00 00 00 mov $0x17,%eax
670: cd 40 int $0x40
672: c3 ret
673: 66 90 xchg %ax,%ax
675: 66 90 xchg %ax,%ax
677: 66 90 xchg %ax,%ax
679: 66 90 xchg %ax,%ax
67b: 66 90 xchg %ax,%ax
67d: 66 90 xchg %ax,%ax
67f: 90 nop
00000680 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
680: 55 push %ebp
681: 89 e5 mov %esp,%ebp
683: 57 push %edi
684: 56 push %esi
685: 53 push %ebx
686: 83 ec 3c sub $0x3c,%esp
689: 89 4d c4 mov %ecx,-0x3c(%ebp)
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
68c: 89 d1 mov %edx,%ecx
{
68e: 89 45 b8 mov %eax,-0x48(%ebp)
if(sgn && xx < 0){
691: 85 d2 test %edx,%edx
693: 0f 89 7f 00 00 00 jns 718 <printint+0x98>
699: f6 45 08 01 testb $0x1,0x8(%ebp)
69d: 74 79 je 718 <printint+0x98>
neg = 1;
69f: c7 45 bc 01 00 00 00 movl $0x1,-0x44(%ebp)
x = -xx;
6a6: f7 d9 neg %ecx
} else {
x = xx;
}
i = 0;
6a8: 31 db xor %ebx,%ebx
6aa: 8d 75 d7 lea -0x29(%ebp),%esi
6ad: 8d 76 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
6b0: 89 c8 mov %ecx,%eax
6b2: 31 d2 xor %edx,%edx
6b4: 89 cf mov %ecx,%edi
6b6: f7 75 c4 divl -0x3c(%ebp)
6b9: 0f b6 92 d8 0a 00 00 movzbl 0xad8(%edx),%edx
6c0: 89 45 c0 mov %eax,-0x40(%ebp)
6c3: 89 d8 mov %ebx,%eax
6c5: 8d 5b 01 lea 0x1(%ebx),%ebx
}while((x /= base) != 0);
6c8: 8b 4d c0 mov -0x40(%ebp),%ecx
buf[i++] = digits[x % base];
6cb: 88 14 1e mov %dl,(%esi,%ebx,1)
}while((x /= base) != 0);
6ce: 39 7d c4 cmp %edi,-0x3c(%ebp)
6d1: 76 dd jbe 6b0 <printint+0x30>
if(neg)
6d3: 8b 4d bc mov -0x44(%ebp),%ecx
6d6: 85 c9 test %ecx,%ecx
6d8: 74 0c je 6e6 <printint+0x66>
buf[i++] = '-';
6da: c6 44 1d d8 2d movb $0x2d,-0x28(%ebp,%ebx,1)
buf[i++] = digits[x % base];
6df: 89 d8 mov %ebx,%eax
buf[i++] = '-';
6e1: ba 2d 00 00 00 mov $0x2d,%edx
while(--i >= 0)
6e6: 8b 7d b8 mov -0x48(%ebp),%edi
6e9: 8d 5c 05 d7 lea -0x29(%ebp,%eax,1),%ebx
6ed: eb 07 jmp 6f6 <printint+0x76>
6ef: 90 nop
putc(fd, buf[i]);
6f0: 0f b6 13 movzbl (%ebx),%edx
6f3: 83 eb 01 sub $0x1,%ebx
write(fd, &c, 1);
6f6: 83 ec 04 sub $0x4,%esp
6f9: 88 55 d7 mov %dl,-0x29(%ebp)
6fc: 6a 01 push $0x1
6fe: 56 push %esi
6ff: 57 push %edi
700: e8 de fe ff ff call 5e3 <write>
while(--i >= 0)
705: 83 c4 10 add $0x10,%esp
708: 39 de cmp %ebx,%esi
70a: 75 e4 jne 6f0 <printint+0x70>
}
70c: 8d 65 f4 lea -0xc(%ebp),%esp
70f: 5b pop %ebx
710: 5e pop %esi
711: 5f pop %edi
712: 5d pop %ebp
713: c3 ret
714: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
718: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp)
71f: eb 87 jmp 6a8 <printint+0x28>
721: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
728: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
72f: 90 nop
00000730 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
730: 55 push %ebp
731: 89 e5 mov %esp,%ebp
733: 57 push %edi
734: 56 push %esi
735: 53 push %ebx
736: 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++){
739: 8b 75 0c mov 0xc(%ebp),%esi
73c: 0f b6 1e movzbl (%esi),%ebx
73f: 84 db test %bl,%bl
741: 0f 84 b8 00 00 00 je 7ff <printf+0xcf>
ap = (uint*)(void*)&fmt + 1;
747: 8d 45 10 lea 0x10(%ebp),%eax
74a: 83 c6 01 add $0x1,%esi
write(fd, &c, 1);
74d: 8d 7d e7 lea -0x19(%ebp),%edi
state = 0;
750: 31 d2 xor %edx,%edx
ap = (uint*)(void*)&fmt + 1;
752: 89 45 d0 mov %eax,-0x30(%ebp)
755: eb 37 jmp 78e <printf+0x5e>
757: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
75e: 66 90 xchg %ax,%ax
760: 89 55 d4 mov %edx,-0x2c(%ebp)
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
763: ba 25 00 00 00 mov $0x25,%edx
if(c == '%'){
768: 83 f8 25 cmp $0x25,%eax
76b: 74 17 je 784 <printf+0x54>
write(fd, &c, 1);
76d: 83 ec 04 sub $0x4,%esp
770: 88 5d e7 mov %bl,-0x19(%ebp)
773: 6a 01 push $0x1
775: 57 push %edi
776: ff 75 08 pushl 0x8(%ebp)
779: e8 65 fe ff ff call 5e3 <write>
77e: 8b 55 d4 mov -0x2c(%ebp),%edx
} else {
putc(fd, c);
781: 83 c4 10 add $0x10,%esp
for(i = 0; fmt[i]; i++){
784: 0f b6 1e movzbl (%esi),%ebx
787: 83 c6 01 add $0x1,%esi
78a: 84 db test %bl,%bl
78c: 74 71 je 7ff <printf+0xcf>
c = fmt[i] & 0xff;
78e: 0f be cb movsbl %bl,%ecx
791: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
794: 85 d2 test %edx,%edx
796: 74 c8 je 760 <printf+0x30>
}
} else if(state == '%'){
798: 83 fa 25 cmp $0x25,%edx
79b: 75 e7 jne 784 <printf+0x54>
if(c == 'd'){
79d: 83 f8 64 cmp $0x64,%eax
7a0: 0f 84 9a 00 00 00 je 840 <printf+0x110>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
7a6: 81 e1 f7 00 00 00 and $0xf7,%ecx
7ac: 83 f9 70 cmp $0x70,%ecx
7af: 74 5f je 810 <printf+0xe0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
7b1: 83 f8 73 cmp $0x73,%eax
7b4: 0f 84 d6 00 00 00 je 890 <printf+0x160>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
7ba: 83 f8 63 cmp $0x63,%eax
7bd: 0f 84 8d 00 00 00 je 850 <printf+0x120>
putc(fd, *ap);
ap++;
} else if(c == '%'){
7c3: 83 f8 25 cmp $0x25,%eax
7c6: 0f 84 b4 00 00 00 je 880 <printf+0x150>
write(fd, &c, 1);
7cc: 83 ec 04 sub $0x4,%esp
7cf: c6 45 e7 25 movb $0x25,-0x19(%ebp)
7d3: 6a 01 push $0x1
7d5: 57 push %edi
7d6: ff 75 08 pushl 0x8(%ebp)
7d9: e8 05 fe ff ff call 5e3 <write>
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
7de: 88 5d e7 mov %bl,-0x19(%ebp)
write(fd, &c, 1);
7e1: 83 c4 0c add $0xc,%esp
7e4: 6a 01 push $0x1
for(i = 0; fmt[i]; i++){
7e6: 83 c6 01 add $0x1,%esi
write(fd, &c, 1);
7e9: 57 push %edi
7ea: ff 75 08 pushl 0x8(%ebp)
7ed: e8 f1 fd ff ff call 5e3 <write>
for(i = 0; fmt[i]; i++){
7f2: 0f b6 5e ff movzbl -0x1(%esi),%ebx
putc(fd, c);
7f6: 83 c4 10 add $0x10,%esp
}
state = 0;
7f9: 31 d2 xor %edx,%edx
for(i = 0; fmt[i]; i++){
7fb: 84 db test %bl,%bl
7fd: 75 8f jne 78e <printf+0x5e>
}
}
}
7ff: 8d 65 f4 lea -0xc(%ebp),%esp
802: 5b pop %ebx
803: 5e pop %esi
804: 5f pop %edi
805: 5d pop %ebp
806: c3 ret
807: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
80e: 66 90 xchg %ax,%ax
printint(fd, *ap, 16, 0);
810: 83 ec 0c sub $0xc,%esp
813: b9 10 00 00 00 mov $0x10,%ecx
818: 6a 00 push $0x0
81a: 8b 5d d0 mov -0x30(%ebp),%ebx
81d: 8b 45 08 mov 0x8(%ebp),%eax
820: 8b 13 mov (%ebx),%edx
822: e8 59 fe ff ff call 680 <printint>
ap++;
827: 89 d8 mov %ebx,%eax
829: 83 c4 10 add $0x10,%esp
state = 0;
82c: 31 d2 xor %edx,%edx
ap++;
82e: 83 c0 04 add $0x4,%eax
831: 89 45 d0 mov %eax,-0x30(%ebp)
834: e9 4b ff ff ff jmp 784 <printf+0x54>
839: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
printint(fd, *ap, 10, 1);
840: 83 ec 0c sub $0xc,%esp
843: b9 0a 00 00 00 mov $0xa,%ecx
848: 6a 01 push $0x1
84a: eb ce jmp 81a <printf+0xea>
84c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
putc(fd, *ap);
850: 8b 5d d0 mov -0x30(%ebp),%ebx
write(fd, &c, 1);
853: 83 ec 04 sub $0x4,%esp
putc(fd, *ap);
856: 8b 03 mov (%ebx),%eax
write(fd, &c, 1);
858: 6a 01 push $0x1
ap++;
85a: 83 c3 04 add $0x4,%ebx
write(fd, &c, 1);
85d: 57 push %edi
85e: ff 75 08 pushl 0x8(%ebp)
putc(fd, *ap);
861: 88 45 e7 mov %al,-0x19(%ebp)
write(fd, &c, 1);
864: e8 7a fd ff ff call 5e3 <write>
ap++;
869: 89 5d d0 mov %ebx,-0x30(%ebp)
86c: 83 c4 10 add $0x10,%esp
state = 0;
86f: 31 d2 xor %edx,%edx
871: e9 0e ff ff ff jmp 784 <printf+0x54>
876: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
87d: 8d 76 00 lea 0x0(%esi),%esi
putc(fd, c);
880: 88 5d e7 mov %bl,-0x19(%ebp)
write(fd, &c, 1);
883: 83 ec 04 sub $0x4,%esp
886: e9 59 ff ff ff jmp 7e4 <printf+0xb4>
88b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
88f: 90 nop
s = (char*)*ap;
890: 8b 45 d0 mov -0x30(%ebp),%eax
893: 8b 18 mov (%eax),%ebx
ap++;
895: 83 c0 04 add $0x4,%eax
898: 89 45 d0 mov %eax,-0x30(%ebp)
if(s == 0)
89b: 85 db test %ebx,%ebx
89d: 74 17 je 8b6 <printf+0x186>
while(*s != 0){
89f: 0f b6 03 movzbl (%ebx),%eax
state = 0;
8a2: 31 d2 xor %edx,%edx
while(*s != 0){
8a4: 84 c0 test %al,%al
8a6: 0f 84 d8 fe ff ff je 784 <printf+0x54>
8ac: 89 75 d4 mov %esi,-0x2c(%ebp)
8af: 89 de mov %ebx,%esi
8b1: 8b 5d 08 mov 0x8(%ebp),%ebx
8b4: eb 1a jmp 8d0 <printf+0x1a0>
s = "(null)";
8b6: bb ce 0a 00 00 mov $0xace,%ebx
while(*s != 0){
8bb: 89 75 d4 mov %esi,-0x2c(%ebp)
8be: b8 28 00 00 00 mov $0x28,%eax
8c3: 89 de mov %ebx,%esi
8c5: 8b 5d 08 mov 0x8(%ebp),%ebx
8c8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8cf: 90 nop
write(fd, &c, 1);
8d0: 83 ec 04 sub $0x4,%esp
s++;
8d3: 83 c6 01 add $0x1,%esi
8d6: 88 45 e7 mov %al,-0x19(%ebp)
write(fd, &c, 1);
8d9: 6a 01 push $0x1
8db: 57 push %edi
8dc: 53 push %ebx
8dd: e8 01 fd ff ff call 5e3 <write>
while(*s != 0){
8e2: 0f b6 06 movzbl (%esi),%eax
8e5: 83 c4 10 add $0x10,%esp
8e8: 84 c0 test %al,%al
8ea: 75 e4 jne 8d0 <printf+0x1a0>
state = 0;
8ec: 8b 75 d4 mov -0x2c(%ebp),%esi
8ef: 31 d2 xor %edx,%edx
8f1: e9 8e fe ff ff jmp 784 <printf+0x54>
8f6: 66 90 xchg %ax,%ax
8f8: 66 90 xchg %ax,%ax
8fa: 66 90 xchg %ax,%ax
8fc: 66 90 xchg %ax,%ax
8fe: 66 90 xchg %ax,%ax
00000900 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
900: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
901: a1 80 12 00 00 mov 0x1280,%eax
{
906: 89 e5 mov %esp,%ebp
908: 57 push %edi
909: 56 push %esi
90a: 53 push %ebx
90b: 8b 5d 08 mov 0x8(%ebp),%ebx
bp = (Header*)ap - 1;
90e: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
911: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
918: 89 c2 mov %eax,%edx
91a: 8b 00 mov (%eax),%eax
91c: 39 ca cmp %ecx,%edx
91e: 73 30 jae 950 <free+0x50>
920: 39 c1 cmp %eax,%ecx
922: 72 04 jb 928 <free+0x28>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
924: 39 c2 cmp %eax,%edx
926: 72 f0 jb 918 <free+0x18>
break;
if(bp + bp->s.size == p->s.ptr){
928: 8b 73 fc mov -0x4(%ebx),%esi
92b: 8d 3c f1 lea (%ecx,%esi,8),%edi
92e: 39 f8 cmp %edi,%eax
930: 74 30 je 962 <free+0x62>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
932: 89 43 f8 mov %eax,-0x8(%ebx)
if(p + p->s.size == bp){
935: 8b 42 04 mov 0x4(%edx),%eax
938: 8d 34 c2 lea (%edx,%eax,8),%esi
93b: 39 f1 cmp %esi,%ecx
93d: 74 3a je 979 <free+0x79>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
93f: 89 0a mov %ecx,(%edx)
freep = p;
}
941: 5b pop %ebx
freep = p;
942: 89 15 80 12 00 00 mov %edx,0x1280
}
948: 5e pop %esi
949: 5f pop %edi
94a: 5d pop %ebp
94b: c3 ret
94c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
950: 39 c2 cmp %eax,%edx
952: 72 c4 jb 918 <free+0x18>
954: 39 c1 cmp %eax,%ecx
956: 73 c0 jae 918 <free+0x18>
if(bp + bp->s.size == p->s.ptr){
958: 8b 73 fc mov -0x4(%ebx),%esi
95b: 8d 3c f1 lea (%ecx,%esi,8),%edi
95e: 39 f8 cmp %edi,%eax
960: 75 d0 jne 932 <free+0x32>
bp->s.size += p->s.ptr->s.size;
962: 03 70 04 add 0x4(%eax),%esi
965: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
968: 8b 02 mov (%edx),%eax
96a: 8b 00 mov (%eax),%eax
96c: 89 43 f8 mov %eax,-0x8(%ebx)
if(p + p->s.size == bp){
96f: 8b 42 04 mov 0x4(%edx),%eax
972: 8d 34 c2 lea (%edx,%eax,8),%esi
975: 39 f1 cmp %esi,%ecx
977: 75 c6 jne 93f <free+0x3f>
p->s.size += bp->s.size;
979: 03 43 fc add -0x4(%ebx),%eax
freep = p;
97c: 89 15 80 12 00 00 mov %edx,0x1280
p->s.size += bp->s.size;
982: 89 42 04 mov %eax,0x4(%edx)
p->s.ptr = bp->s.ptr;
985: 8b 43 f8 mov -0x8(%ebx),%eax
988: 89 02 mov %eax,(%edx)
}
98a: 5b pop %ebx
98b: 5e pop %esi
98c: 5f pop %edi
98d: 5d pop %ebp
98e: c3 ret
98f: 90 nop
00000990 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
990: 55 push %ebp
991: 89 e5 mov %esp,%ebp
993: 57 push %edi
994: 56 push %esi
995: 53 push %ebx
996: 83 ec 1c sub $0x1c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
999: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
99c: 8b 3d 80 12 00 00 mov 0x1280,%edi
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
9a2: 8d 70 07 lea 0x7(%eax),%esi
9a5: c1 ee 03 shr $0x3,%esi
9a8: 83 c6 01 add $0x1,%esi
if((prevp = freep) == 0){
9ab: 85 ff test %edi,%edi
9ad: 0f 84 ad 00 00 00 je a60 <malloc+0xd0>
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
9b3: 8b 07 mov (%edi),%eax
if(p->s.size >= nunits){
9b5: 8b 48 04 mov 0x4(%eax),%ecx
9b8: 39 f1 cmp %esi,%ecx
9ba: 73 71 jae a2d <malloc+0x9d>
9bc: 81 fe 00 10 00 00 cmp $0x1000,%esi
9c2: bb 00 10 00 00 mov $0x1000,%ebx
9c7: 0f 43 de cmovae %esi,%ebx
p = sbrk(nu * sizeof(Header));
9ca: 8d 0c dd 00 00 00 00 lea 0x0(,%ebx,8),%ecx
9d1: 89 4d e4 mov %ecx,-0x1c(%ebp)
9d4: eb 1b jmp 9f1 <malloc+0x61>
9d6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
9dd: 8d 76 00 lea 0x0(%esi),%esi
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
9e0: 8b 10 mov (%eax),%edx
if(p->s.size >= nunits){
9e2: 8b 4a 04 mov 0x4(%edx),%ecx
9e5: 39 f1 cmp %esi,%ecx
9e7: 73 4f jae a38 <malloc+0xa8>
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
9e9: 8b 3d 80 12 00 00 mov 0x1280,%edi
9ef: 89 d0 mov %edx,%eax
9f1: 39 c7 cmp %eax,%edi
9f3: 75 eb jne 9e0 <malloc+0x50>
p = sbrk(nu * sizeof(Header));
9f5: 83 ec 0c sub $0xc,%esp
9f8: ff 75 e4 pushl -0x1c(%ebp)
9fb: e8 4b fc ff ff call 64b <sbrk>
if(p == (char*)-1)
a00: 83 c4 10 add $0x10,%esp
a03: 83 f8 ff cmp $0xffffffff,%eax
a06: 74 1b je a23 <malloc+0x93>
hp->s.size = nu;
a08: 89 58 04 mov %ebx,0x4(%eax)
free((void*)(hp + 1));
a0b: 83 ec 0c sub $0xc,%esp
a0e: 83 c0 08 add $0x8,%eax
a11: 50 push %eax
a12: e8 e9 fe ff ff call 900 <free>
return freep;
a17: a1 80 12 00 00 mov 0x1280,%eax
if((p = morecore(nunits)) == 0)
a1c: 83 c4 10 add $0x10,%esp
a1f: 85 c0 test %eax,%eax
a21: 75 bd jne 9e0 <malloc+0x50>
return 0;
}
}
a23: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
a26: 31 c0 xor %eax,%eax
}
a28: 5b pop %ebx
a29: 5e pop %esi
a2a: 5f pop %edi
a2b: 5d pop %ebp
a2c: c3 ret
if(p->s.size >= nunits){
a2d: 89 c2 mov %eax,%edx
a2f: 89 f8 mov %edi,%eax
a31: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(p->s.size == nunits)
a38: 39 ce cmp %ecx,%esi
a3a: 74 54 je a90 <malloc+0x100>
p->s.size -= nunits;
a3c: 29 f1 sub %esi,%ecx
a3e: 89 4a 04 mov %ecx,0x4(%edx)
p += p->s.size;
a41: 8d 14 ca lea (%edx,%ecx,8),%edx
p->s.size = nunits;
a44: 89 72 04 mov %esi,0x4(%edx)
freep = prevp;
a47: a3 80 12 00 00 mov %eax,0x1280
}
a4c: 8d 65 f4 lea -0xc(%ebp),%esp
return (void*)(p + 1);
a4f: 8d 42 08 lea 0x8(%edx),%eax
}
a52: 5b pop %ebx
a53: 5e pop %esi
a54: 5f pop %edi
a55: 5d pop %ebp
a56: c3 ret
a57: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
a5e: 66 90 xchg %ax,%ax
base.s.ptr = freep = prevp = &base;
a60: c7 05 80 12 00 00 84 movl $0x1284,0x1280
a67: 12 00 00
base.s.size = 0;
a6a: bf 84 12 00 00 mov $0x1284,%edi
base.s.ptr = freep = prevp = &base;
a6f: c7 05 84 12 00 00 84 movl $0x1284,0x1284
a76: 12 00 00
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
a79: 89 f8 mov %edi,%eax
base.s.size = 0;
a7b: c7 05 88 12 00 00 00 movl $0x0,0x1288
a82: 00 00 00
if(p->s.size >= nunits){
a85: e9 32 ff ff ff jmp 9bc <malloc+0x2c>
a8a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
prevp->s.ptr = p->s.ptr;
a90: 8b 0a mov (%edx),%ecx
a92: 89 08 mov %ecx,(%eax)
a94: eb b1 jmp a47 <malloc+0xb7>
| 35.193428 | 60 | 0.410573 |
dff726773dcc84fc1469c02470fac7f32c2a94f6 | 1,319 | asm | Assembly | roms/tests/ppu/sprite_hit_tests_2005.10.05/source/06.right_edge.asm | MrKOSMOS/ANESE | 8ae814d615479b1496c98033a1f5bc4da5921c6f | [
"MIT"
] | 1,461 | 2022-02-25T17:44:34.000Z | 2022-03-30T06:18:29.000Z | nes/tests/sprite_hit_tests_2005.10.05/source/06.right_edge.asm | nickmass/mass-nes | 9f8652aca403f4338346ad5a27667aa0989f6305 | [
"MIT"
] | 17 | 2016-10-30T12:46:35.000Z | 2020-01-31T11:34:38.000Z | nes/tests/sprite_hit_tests_2005.10.05/source/06.right_edge.asm | nickmass/mass-nes | 9f8652aca403f4338346ad5a27667aa0989f6305 | [
"MIT"
] | 47 | 2016-10-24T00:30:56.000Z | 2022-02-10T15:19:41.000Z | ; Tests sprite 0 hit with regard to column 255 (ignored) and off
; right edge of screen.
.include "prefix_sprite_hit.a"
test_name:
.db "SPRITE HIT RIGHT EDGE",0
.code
reset:
jsr begin_sprite_hit_tests
lda #solid_tile
jsr fill_nametable
lda #0
sta sprite_attr
lda #120
sta sprite_y
; Basic
lda #solid_tile
sta sprite_tile
lda #255
sta sprite_x
lda #2;) Should always miss when X = 255
ldx #$1e
jsr sprite_should_miss
lda #254
sta sprite_x
lda #3;) Should hit; sprite has pixels < 255
ldx #$1e
jsr sprite_should_hit
; Detailed
lda #upper_right_tile
sta sprite_tile
lda #248
sta sprite_x
lda #4;) Should miss; sprite pixel is at 255
ldx #$1e
jsr sprite_should_miss
lda #247
sta sprite_x
lda #5;) Should hit; sprite pixel is at 254
ldx #$1e
jsr sprite_should_hit
lda #upper_left_tile
sta sprite_tile
lda #254
sta sprite_x
lda #6;) Should also hit; sprite pixel is at 254
ldx #$1e
jsr sprite_should_hit
jmp tests_passed
| 21.622951 | 64 | 0.537528 |
d10b391c303ac93ce404d59c5216b6d75d0a44fc | 955 | asm | Assembly | PIC16-ASSEMBLY/45_usart_Receiver.asm | EnesMercan/PIC-MCU-Projects | 8edb6017cd362cb975d6f4e613f78d0e529f6ac9 | [
"MIT"
] | 1 | 2022-01-03T08:03:11.000Z | 2022-01-03T08:03:11.000Z | PIC16-ASSEMBLY/45_usart_Receiver.asm | EnesMercan/PIC-MCU-Projects | 8edb6017cd362cb975d6f4e613f78d0e529f6ac9 | [
"MIT"
] | null | null | null | PIC16-ASSEMBLY/45_usart_Receiver.asm | EnesMercan/PIC-MCU-Projects | 8edb6017cd362cb975d6f4e613f78d0e529f6ac9 | [
"MIT"
] | null | null | null | ; bilgisayardan rx pinine ascii kodlu karakterler gonderiliyor
; bu 8 bit karakterler rb4-5-6-7 ve ra0-1-2-3 teki ledlerde gosteriliyor
LIST P =16F628A
#include "p16f628a.inc"
; CONFIG
; __config 0x3F38
__CONFIG _FOSC_INTOSCIO & _WDTE_OFF & _PWRTE_OFF & _MCLRE_ON & _BOREN_OFF & _LVP_OFF & _CPD_OFF & _CP_OFF
ORG H'0000'
MOVLW H'07'
MOVWF CMCON
CLRF PORTA
CLRF PORTB
BANKSEL TRISA
MOVLW H'F0' ; RA0~RA3 AS OUTPUT
MOVWF TRISA
MOVWF B'00000010' ; RX INPUT
MOVLW D'25' ; 9600 BAUND RATE
MOVWF SPBRG
MOVLW B'00000100' ; SYNC=0, BRGH=1
MOVWF TXSTA
BANKSEL PORTB
MOVLW B'10010000' ; SPEN=1, CREN=1
MOVWF RCSTA
LED_GONDER
CALL VERI_AL
MOVWF PORTA
MOVWF PORTB
GOTO LED_GONDER
VERI_AL
BTFSS PIR1,RCIF ; RCIF is 1 ?
GOTO VERI_AL
MOVWF RCREG,W
RETURN
END
| 19.895833 | 106 | 0.602094 |
606af17d9b2491a5f3a5102347b18e6790dace34 | 374 | asm | Assembly | programs/oeis/269/A269468.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/269/A269468.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/269/A269468.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A269468: Number of length-4 0..n arrays with no repeated value equal to the previous repeated value.
; 10,66,228,580,1230,2310,3976,6408,9810,14410,20460,28236,38038,50190,65040,82960,104346,129618,159220,193620,233310,278806,330648,389400,455650,530010,613116,705628,808230,921630,1046560,1183776,1334058
mov $1,$0
add $1,2
pow $1,2
sub $1,1
pow $1,2
add $1,1
add $1,$0
| 34 | 204 | 0.762032 |
f07b3922ae87c6f415fa77229015083b760171ba | 868 | asm | Assembly | oeis/302/A302323.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/302/A302323.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/302/A302323.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A302323: Number of 2Xn 0..1 arrays with every element equal to 0, 1, 2 or 4 horizontally, diagonally or antidiagonally adjacent elements, with upper left element zero.
; Submitted by Jon Maiga
; 2,8,20,52,136,360,960,2576,6944,18784,50944,138432,376704,1026176,2797568,7631104,20824576,56845824,155209728,423848960,1157593088,3161835520,8636760064,23592996864,64451125248,176071467008,481011630080,1314099085312,3590087213056,9808104161280,26795845877760,73206826336256,200003196944384,546415751593984,1492829307142144,4078472937603072,11142570129752064,30442017415233536,83169037651017728,227221835254595584,620781196055412736,1696004963108388864,4633570119304347648,12659145766778961920
mov $1,5
mov $2,2
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
mul $0,2
| 37.73913 | 495 | 0.793779 |
8b2eae988c56dcdd68c77080fa56ef0b5573ccea | 684 | asm | Assembly | learn-assembly/asm101/asm101-01.asm | hailehong95/Practice-Coding | 729acdd596f15657b717975bfa54da1e39114f8a | [
"MIT"
] | null | null | null | learn-assembly/asm101/asm101-01.asm | hailehong95/Practice-Coding | 729acdd596f15657b717975bfa54da1e39114f8a | [
"MIT"
] | null | null | null | learn-assembly/asm101/asm101-01.asm | hailehong95/Practice-Coding | 729acdd596f15657b717975bfa54da1e39114f8a | [
"MIT"
] | null | null | null | ; asm101-01: Cau truc chung cua mot chuong trinh asm
; Khai bao kich thuoc chuong trinh
.model small
; Khai bao kich thuoc ngan xep (Stack)
.stack 100h
; Khai bao doan du lieu
.data
; Const, Variable, Array... duoc khai bao tai day
; Khai bao doan code
.code
main proc
; Khoi tao thanh ghi DS (Neu doan .data co khai bao cac du lieu: bien, hang, mang...)
mov ax, @data
mov ds, ax
; Do something here!
; Ket thuc chuong trinh
mov ah, 4ch
int 21h
main endp
end main
; Note:
; - Neu doan du lieu (.data) co khai bao cac bien, hang, mang... thi ta moi can khoi tao thanh ghi ds
; - Cau truc chung nay hau nhu chuong trinh nao cung giong nhau | 20.117647 | 101 | 0.663743 |
c0a9abc0b6d05f7b1a54aec14c547c38ebc4693a | 366 | asm | Assembly | oeis/075/A075909.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/075/A075909.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/075/A075909.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A075909: Sixth column of triangle A075499.
; Submitted by Christian Krause
; 1,84,4256,169344,5843712,183794688,5421678592,152720375808,4157366140928,110282217357312,2867778350481408,73424436820180992,1857023919127527424,46511918954689069056,1155904251854380335104
mov $1,$0
mov $0,2
pow $0,$1
seq $1,75511 ; Sixth column of triangle A075497.
mul $1,$0
mov $0,$1
| 33.272727 | 189 | 0.808743 |
1bd0d590f19ddf2410a88784656f584f4c9aeeb5 | 4,334 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_187.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_0xca_notsx.log_21829_187.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_0xca_notsx.log_21829_187.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 %r13
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
// REPMOV
lea addresses_WC+0x980d, %rsi
lea addresses_A+0x1078d, %rdi
nop
nop
nop
nop
nop
add %r9, %r9
mov $2, %rcx
rep movsw
nop
nop
nop
and $47750, %rsi
// REPMOV
lea addresses_normal+0x1417d, %rsi
lea addresses_WT+0x159bd, %rdi
nop
nop
add $49695, %rbp
mov $27, %rcx
rep movsw
nop
nop
nop
nop
cmp $58594, %rdi
// Faulty Load
lea addresses_WT+0x1e78d, %r9
sub $56887, %rcx
movups (%r9), %xmm6
vpextrq $1, %xmm6, %rdi
lea oracles, %rcx
and $0xff, %rdi
shlq $12, %rdi
mov (%rcx,%rdi,1), %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
{'src': {'congruent': 7, 'same': False, 'type': 'addresses_WC'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_A'}, 'OP': 'REPM'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_WT'}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'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
*/
| 57.786667 | 2,999 | 0.661975 |
9fbb2fd4e0a6cfe2580fba04d1b10e65ebf6a12b | 589 | asm | Assembly | helloworld.asm | wdomitrz/Asembler_basic | 790f76836969274af8a5a4061ea0cf4f48ef6c8d | [
"MIT"
] | null | null | null | helloworld.asm | wdomitrz/Asembler_basic | 790f76836969274af8a5a4061ea0cf4f48ef6c8d | [
"MIT"
] | null | null | null | helloworld.asm | wdomitrz/Asembler_basic | 790f76836969274af8a5a4061ea0cf4f48ef6c8d | [
"MIT"
] | null | null | null | SECTION .data
tekst db 'Hello World', 0x0A, 0x00 ; tu zapisałem sobie tekst do wypisania
SECTION .text
global _start
_start: ; tu zaczynam wykonywanie kodu
mov edx, 12 ; wrzucam długość tekstu na edx
mov ecx, tekst ; wrzucam tekst na ecx
mov ebx, 1 ; wrzucam oznaczenie, że wyjście ma być wrzucone do stdout
mov eax, 4 ; wrzucam kod sys_write na eax
int 0x80 ; wykonuję funkcję z podanymi wcześniej argumentami
mov ebx, 0 ; wrzucam kod wyjścia 0 na ebx (brak błędów)
mov eax, 1 ; wrzucam kod sys_exit na eax
int 0x80 ; uruchamiam funkcję z tymi argumentami
| 32.722222 | 74 | 0.728353 |
12b3f9e68ddb0777acccfc113955260335ae907e | 708 | asm | Assembly | oeis/306/A306447.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/306/A306447.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/306/A306447.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A306447: Number of (undirected) Hamiltonian cycles in the n-antiprism graph.
; 3,9,16,29,56,110,225,469,991,2110,4511,9666,20736,44511,95575,205253,440828,946817,2033628,4367986,9381949,20151433,43283195,92967882,199685571,428904390,921243268,1978737467,4250128235,9128846273,19607840040,42115660645,90460186816,194299347958,417335382041,896394264573,1925364376407,4135488287382,8882611304551,19078952255498,40979663151752,88020178967063,189058457525823,406078478611453,872215572629908,1873430987378377,4023940611249380,8643018158635770,18564330368512629,39874307297033265
mul $0,2
mov $1,$0
sub $0,3
add $1,1
seq $1,1609 ; a(1) = a(2) = 1, a(3) = 4; thereafter a(n) = a(n-1) + a(n-3).
add $0,$1
add $0,5
| 64.363636 | 495 | 0.805085 |
dfbc5d39f2477be810f8dc2a0705331fea5a1ef0 | 3,174 | asm | Assembly | asm/Sorting-Floor.asm | hixio-mh/hrm-cpu | e119e1952807aa3a299b61af3e5607497ecfac92 | [
"MIT"
] | 24 | 2015-10-22T00:12:30.000Z | 2022-02-21T22:23:39.000Z | asm/Sorting-Floor.asm | hixio-mh/hrm-cpu | e119e1952807aa3a299b61af3e5607497ecfac92 | [
"MIT"
] | 27 | 2015-10-21T04:21:10.000Z | 2015-11-05T00:55:12.000Z | asm/Sorting-Floor.asm | hixio-mh/hrm-cpu | e119e1952807aa3a299b61af3e5607497ecfac92 | [
"MIT"
] | null | null | null | -- HUMAN RESOURCE MACHINE PROGRAM --
-- 41-Sorting-Floor - SIZE 20/34 - SPEED 689/714 --
a:
b:
BUMPUP 24
INBOX
JUMPZ d
COPYTO [24]
JUMP a
COMMENT 1
c:
COPYFROM [19]
OUTBOX
COPYFROM [24]
COPYTO [19]
COMMENT 2
d:
BUMPDN 24
JUMPZ b
COPYTO 23
COMMENT 0
e:
COPYFROM 23
COPYTO 19
f:
BUMPDN 23
JUMPZ c
COPYFROM [23]
SUB [19]
JUMPN e
JUMP f
DEFINE COMMENT 0
eJyzZ2BgyBGbbcMtrlV6TjRxMwOYf9zSXeKaRY3SKuu3ugkOIDFTyab8crmm/BmaliUgvqKFZ9AfS+H2
P5b5m0D8Lh/xHdY+iZvF/Ob2pfoFJDH718RnBYUVacWlHz4RZ32MNaHs0MREjWkPEnVCQOolCyb7shdO
zGMvZDgF4lfn/3JjL3ztHl0aEfimSiU1tTasaFFddmNwXeHErbVvZ/pVHV/DXvjxFFNu7mX17ICrID07
zy3Wdr2ww+rixb3ZRhfjrky5oHJjyoV198PP770XdLrmEkhNwrG92T8PddRr7zGbCuIvvlNcsO5J4UT1
51wzGEbBKBgFDACEg2JI;
DEFINE COMMENT 1
eJxLYGBgeCjy2p1NWHJ6qDDTSgPRa6tvyPZuuKAmvkNI59dOoDRDjph0mai8ZQmIHSqs5jJRJMhRSGeV
NYif67otOsMxtdDS+kbXWkvXKSbmB+eAxJ+YPYrgtzydFeq0ZJ6Bi+1SkFiQf6n/MV/BFSD2Fr9fbmcC
nZ1mRpg4b4z+5aYV1+J3Iu5KZGVcTbxtrErqt2CtUpC6sux/5ZfTHlTKJk+vc0o0aF2ccKNrccLbmfpJ
FQufpn5e6ZO5al1mQf4mz7Kda1vLBVeoVLydaVbe37+08HD13bxLVSAzJtQfjXKo/55e25DdWNvwdiZI
TK+h1H9qc3pAe8fH8J4eldQ7PfNzr3Volca28ZS7NS+r3d/6tYOx23UKW3/UYpB67smeQTXzrIPNl032
BfFTZlsHi87eFh00x76FaY7eMpAYx/kgR9cLDOFTLry8vfD0zAtXjkQcAYlPP6xVemoPS0fArpPdIH76
7fm5OfeX1So9/trBMApGwQADAIfwl7k;
DEFINE COMMENT 2
eJxbyMDAYMFzQ9yCJ8rAmONW5n7OvdnXePZm1yhplQKlGAosMvXPGkcZsBgKmt7Sc3a6pbfQR9xAJyTb
ZGasiK1K6hcnlVQDl7hEOdejUdxudzzkXK9Z9Npn6vNbbtK6ZL5YG2RGery34byYKIOZEausecPvePwO
/xhuHpmboBVXXLA7ubggLmN+rnr2rczA3Jp4uzz+sPe5k31TckycO7Nm2zglluudiJuqAzLnTAOLqF5D
iIJDvXsxiP+taSlXaL+B0J5JN8SfTQlRmD5lkxZbP5PZ/O4dVgWtO6xAanLElsyrFz0456RgxcKX3Imb
13Dt3xvLNfPCby7Ha9d4ztydKML76obsv1cgtWeNvZd063kvUdEWXPFLY/b61Rom235plB06rB135Zbe
mbtnjZse8VsueHDdmu2WiO3MCyK2OsfVbMoOqdls2FdgsXPtLhO9ZbeA+kFmebg/fNPqEXC11WPDviJP
8R3rvX7tvOmjc1zML+5Kf8DEhxzBls9dQyyf84avuz8zouxQUvTTVYej3s4E6X2a6r3kclrQFq4UrRcg
/t+MioU7CnauXVV6Z/fV8oCrM8rO3HUpsny+IPfhm8tp0z+C1CxvOr7mW1PdxuC6sKfBdZfegsTedddt
jJrcu+HDnGurQfyWqRw7ZSd1fAKx25b1bpi59PFpo0XuzyYvtP8OEuvdfW7Pq22L9sdtTT88ddOK81wb
FzxYsTHs6dNNvK/Wbt36nnFX1eel+7K/yB3c+n7VobCnPw+x3eI+dOVM2L4N++x2v94FMoPjfMxX1wvZ
XxQuab1ov8pwqv3q9nNJ19fdr7z171X67Ydvcu4/fKP0WPrl3ycTH954lntZ5EXFQoZRMKAAAHqdJ0w;
DEFINE LABEL 19
eJyzY2Bg4HabbXPdusc228TEOVGnxe+Fpmzoao0VMZ6aNfGfDF9m/LGULlOzWVZ71Ea4/br13L5dJm0L
/HSPr2lUS9wM1M7g4T57fYJX24JUP+kyjuAWv8bQmbH7wrIbf4fHNKlGNeX7x6QHVMaZOIckmDg7JYq7
RqbohDxNFU27nKbYdjlNfjnIjEdF4juiS+WXzyjjmjG3SidErNbZKbgu335Cfb59duNZzyfNRil8bSGT
2zt+7QSp96tqmLC/9XkniB00J99+82xnp5TZ/8p9Z3xeaTXz2uq8xddWO66bvR4kv3TfbJsv+6oa2PYx
rTx+8vPKeTd2rmUYBaNgFIABAGt/Zu8;
DEFINE LABEL 23
eJwTZACCmLgrJ+Ksj31OyN+0ImVZ7bqM9ICybDWXzTmPIsIKhdvfVNVcEqtluxVc9/J2bUPA1ZftQVt6
ep53Ppzg7NQyNUSBYRSMglEwZAEAYrwgmw;
DEFINE LABEL 24
eJxTY2Bg4FCxNfqqMtvGRTWsSFfJe8ldxbqN4SqJmwPsEjcDpRkcAs56lvuGTH7t/Xmltc/OtU6JO9eC
xDmC92a/iLiVuTGaLR3EX+g/28Y/Rs9YNtnWCMS/mye/XLJgd09mwa1MyQKG8MDcNt3MAiazhmJnp65q
9+JdjYUT97e2LZjV7r1EuEtv2bvujvo7PRGBof331BmoDD6tzb0Mom/fXOhz7ep+r6xzLX5ip65EPjvs
Xuy8f27fl32S0533ey/ZczBxs/WJo2fvnRG9OeXCmbsWV/feq7ylcuPpw4+nZj8tO3T31c611a8Pznn/
UrGt8HFXnPtD2VCJ22ou1HbvKBgF9AIAz9tx3A;
| 38.707317 | 80 | 0.877757 |
bcccc312710a92456f6f8f87bc35502556f1f63b | 863 | asm | Assembly | oeis/339/A339355.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/339/A339355.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/339/A339355.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A339355: Maximum number of copies of a 12345 permutation pattern in an alternating (or zig-zag) permutation of length n + 7.
; Submitted by Jamie Morken(s2)
; 8,16,64,112,272,432,832,1232,2072,2912,4480,6048,8736,11424,15744,20064,26664,33264,42944,52624,66352,80080,99008,117936,143416,168896,202496,236096,279616,323136,378624,434112,503880,573648,660288,746928,853328,959728,1089088,1218448
mov $2,1
lpb $2
sub $2,1
mov $7,$0
mov $11,$0
lpb $7
mov $0,$11
sub $7,1
sub $0,$7
mov $9,2
lpb $9
sub $9,1
add $0,$9
sub $0,1
mov $5,$0
div $5,2
add $5,2
mov $3,$5
mul $3,$5
mov $4,$3
bin $4,2
mov $5,$4
mov $10,$9
lpb $10
mov $8,$5
sub $10,1
lpe
lpe
mov $5,$8
div $5,6
mul $5,8
add $6,$5
lpe
lpe
mov $0,$6
add $0,8
| 21.04878 | 236 | 0.567787 |
0636c35f9e43913952cba0014e7b77a4b7f7ab0e | 78 | asm | Assembly | Practice/Assignments assembly class/20.asm | WardunIslam/CSE331L_Section_7_Summer_2020_NSU | 4f36bf223c44afd2233a243a2f8ba92df18f5545 | [
"MIT"
] | null | null | null | Practice/Assignments assembly class/20.asm | WardunIslam/CSE331L_Section_7_Summer_2020_NSU | 4f36bf223c44afd2233a243a2f8ba92df18f5545 | [
"MIT"
] | null | null | null | Practice/Assignments assembly class/20.asm | WardunIslam/CSE331L_Section_7_Summer_2020_NSU | 4f36bf223c44afd2233a243a2f8ba92df18f5545 | [
"MIT"
] | null | null | null | org 100h
L1: NOP
CNGSB: MOV BL, 0FFH
XOR BL, 080H
L2: HLT
ret
| 5.2 | 19 | 0.551282 |
eaddaf1aed52f162fd9b097656a45d2a5e1b0841 | 711 | asm | Assembly | oeis/199/A199710.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/199/A199710.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/199/A199710.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A199710: Expansion of (1+x-14*x^2+13*x^3)/(1-28*x^2+169*x^4).
; Submitted by Christian Krause
; 1,1,14,41,223,979,3878,20483,70897,408073,1329734,7964417,25250959,154039339,482301806,2967115019,9237038497,57046572241,177128072702,1095861584537,3398526529663,21043253658307,65224098543926,404010494645843,1251923775716881,7755983981829721,24030993066149174,148889777896084721,461292687756023983,2858152488161149339,8854957428989461118,54865897204073863643,169980343780936858177,1053217351214833943713,3262961820367013100014,20217749206526867468297,62636252871298037768479,388103245427445352624819
mov $3,1
lpb $0
sub $0,1
add $2,$3
mov $3,$1
mov $1,$2
dif $2,2
mul $3,13
add $3,$2
lpe
mov $0,$3
| 44.4375 | 501 | 0.814346 |
83229dabe845e606394095c4373abab97aedb681 | 290 | asm | Assembly | sk/sfx/89.asm | Cancer52/flamedriver | 9ee6cf02c137dcd63e85a559907284283421e7ba | [
"0BSD"
] | 9 | 2017-10-09T20:28:45.000Z | 2021-06-29T21:19:20.000Z | sk/sfx/89.asm | Cancer52/flamedriver | 9ee6cf02c137dcd63e85a559907284283421e7ba | [
"0BSD"
] | 12 | 2018-08-01T13:52:20.000Z | 2022-02-21T02:19:37.000Z | sk/sfx/89.asm | Cancer52/flamedriver | 9ee6cf02c137dcd63e85a559907284283421e7ba | [
"0BSD"
] | 2 | 2018-02-17T19:50:36.000Z | 2019-10-30T19:28:06.000Z | Sound_89_Header:
smpsHeaderStartSong 3
smpsHeaderVoice Sound_89_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cPSG2, Sound_89_PSG2, $FB, $02
; PSG2 Data
Sound_89_PSG2:
dc.b nD4, $05
smpsStop
; Song seems to not use any FM voices
Sound_89_Voices:
| 18.125 | 52 | 0.77931 |
37d1675219231ffc48fc7130f3cd02c95ce0a158 | 2,478 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48_notsx.log_6_1948.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48_notsx.log_6_1948.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48_notsx.log_6_1948.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 %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x1aa52, %rbx
nop
add %rdi, %rdi
mov $0x6162636465666768, %rcx
movq %rcx, (%rbx)
nop
nop
nop
nop
add %r11, %r11
lea addresses_WT_ht+0xe04a, %rsi
lea addresses_UC_ht+0x18cd2, %rdi
nop
nop
nop
add $32076, %r10
mov $49, %rcx
rep movsw
nop
nop
and $23265, %rcx
lea addresses_D_ht+0x109d2, %rcx
nop
nop
nop
nop
xor $41532, %rbx
vmovups (%rcx), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $1, %xmm6, %rdi
nop
nop
dec %r10
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r8
push %r9
push %rdi
push %rdx
push %rsi
// Store
mov $0x4bd4870000000cda, %rsi
nop
nop
nop
nop
add $21563, %r12
movb $0x51, (%rsi)
nop
sub %r8, %r8
// Store
lea addresses_A+0x97b2, %r15
nop
nop
nop
nop
xor %rdx, %rdx
movl $0x51525354, (%r15)
nop
cmp $46065, %rdi
// Store
lea addresses_UC+0x97ee, %rsi
nop
nop
nop
nop
add %rdx, %rdx
mov $0x5152535455565758, %rdi
movq %rdi, %xmm0
movups %xmm0, (%rsi)
add $42627, %rdx
// Faulty Load
lea addresses_A+0x1bd2, %r9
clflush (%r9)
nop
and %r15, %r15
vmovups (%r9), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $0, %xmm4, %rsi
lea oracles, %rdx
and $0xff, %rsi
shlq $12, %rsi
mov (%rdx,%rsi,1), %rsi
pop %rsi
pop %rdx
pop %rdi
pop %r9
pop %r8
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_NC', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_A', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC', 'congruent': 2}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_D_ht', 'congruent': 7}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 6, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 9}}
{'00': 6}
00 00 00 00 00 00
*/
| 18.916031 | 148 | 0.645682 |
23701725dc2f42b19189085cd9fba7e8767681b0 | 4,254 | asm | Assembly | level-with-item.asm | Sagiri/held-item-level-evolution | 3e443a684028dfc9a1a90591dac3246652a0897d | [
"BSD-2-Clause"
] | 1 | 2021-03-26T11:56:47.000Z | 2021-03-26T11:56:47.000Z | level-with-item.asm | Zeturic/held-item-level-evolution | 3e443a684028dfc9a1a90591dac3246652a0897d | [
"BSD-2-Clause"
] | null | null | null | level-with-item.asm | Zeturic/held-item-level-evolution | 3e443a684028dfc9a1a90591dac3246652a0897d | [
"BSD-2-Clause"
] | 1 | 2018-11-14T13:29:50.000Z | 2018-11-14T13:29:50.000Z | true equ 1
false equ 0
.include "config.asm"
.definelabel Task_EvolutionScene_hook_addr, 0x080CED62
.definelabel Task_EvolutionScene_hook_return, 0x080CED6E
.definelabel GetEvolutionTargetSpecies_hook1_addr, 0x08043110
.definelabel GetEvolutionTargetSpecies_hook1_return1, 0x08042F96
.definelabel GetEvolutionTargetSpecies_hook1_return2, 0x0804311C
.definelabel GetEvolutionTargetSpecies_hook2_addr, 0x08042F08
.definelabel GetEvolutionTargetSpecies_hook2_return, 0x08042F12
.definelabel GetMonData, 0x0803FBE8
.definelabel SetMonData, 0x0804037C
.definelabel FlagGet, 0x0806E6D0
.definelabel FlagSet, 0x0806E680
.definelabel FlagClear, 0x0806E6A8
.definelabel noevo, 0x08043110
.definelabel yesevo, 0x08043008
.definelabel off_8042FC0, 0x08042FC0
.definelabel jpt_8042FB8, readu32(rom_gba, off_8042FC0 & 0x1FFFFFF)
MON_DATA_SPECIES equ 11
MON_DATA_HELD_ITEM equ 12
MON_DATA_BEAUTY equ 23
// -----------------------------------------------------------------------------
.gba
.thumb
.open rom_gba, test_gba, 0x08000000
.org free_space
.area 200
.align 2
level_with_item:
push {r1-r5}
mov r4, r2
mov r5, r3
// GetMonData(pokemon, MON_DATA_HELD_ITEM)
mov r0, r8
mov r1, MON_DATA_HELD_ITEM
ldr r3, =GetMonData |1
bl @@call
mov r1, r7
mov r2, EVOLUTIONS_PER_POKEMON * 8
mul r1, r2
add r1, r4
add r1, r5
ldrh r1, [r1, #2]
cmp r0, r1
bne @@noevo
.if hook
// FlagSet(FLAG_HELD_ITEM_EVOLUTION)
ldr r0, =FLAG_HELD_ITEM_EVOLUTION
ldr r3, =FlagSet |1
bl @@call
.endif
@@yesevo:
pop {r1-r5}
ldr r0, =yesevo |1
bx r0
@@noevo:
pop {r1-r5}
ldr r0, =noevo |1
bx r0
@@call:
bx r3
// intercepts the code responsible for updating the species after a
// successful evolution, to conditionally remove the held item
Task_EvolutionScene_hook:
// this is code from the offset we hooked
add r2, r1
add r2, #0xC
mov r0, r9
mov r1, #MON_DATA_SPECIES
ldr r3, =SetMonData |1
bl @@call
// return early if the flag isn't set
ldr r0, =FLAG_HELD_ITEM_EVOLUTION
ldr r3, =FlagGet |1
bl @@call
cmp r0, #0
beq @@return
// remove item if we're still here (e.g. flag was set)
mov r0, r9
mov r1, #MON_DATA_HELD_ITEM
ldr r2, =@@zero
ldr r3, =SetMonData |1
bl @@call
@@return:
ldr r3, =Task_EvolutionScene_hook_return |1
@@call:
bx r3
@@zero:
.halfword 0x0
// prevents level-triggered evolutions from overriding one another
// first match gets priority
GetEvolutionTargetSpecies_hook1:
// this is adapted from code at the offset we hooked
ldr r0, [sp, #4]
add r0, #1
str r0, [sp, #4]
cmp r0, EVOLUTIONS_PER_POKEMON - 1
bgt @@return2
mov r0, r10
cmp r0, #0
bne @@return2
@@return1:
ldr r0, =GetEvolutionTargetSpecies_hook1_return1 |1
bx r0
@@return2:
ldr r0, =GetEvolutionTargetSpecies_hook1_return2 |1
bx r0
GetEvolutionTargetSpecies_hook2:
// FlagClear(FLAG_HELD_ITEM_EVOLUTION)
ldr r0, =FLAG_HELD_ITEM_EVOLUTION
ldr r3, =FlagClear |1
bl @@call
// GetMonData(pokemon, MON_DATA_BEAUTY)
mov r0, r8
mov r1, MON_DATA_BEAUTY
ldr r3, =GetMonData |1
bl @@call
ldr r3, =GetEvolutionTargetSpecies_hook2_return |1
@@call:
bx r3
.pool
.endarea
.org jpt_8042FB8 + (EVO_HELD_ITEM -1) * 4
.word level_with_item
.if hook
.org Task_EvolutionScene_hook_addr
.area 0xC, 0xFE
ldr r3, =Task_EvolutionScene_hook |1
bx r3
.pool
.endarea
.org GetEvolutionTargetSpecies_hook1_addr
.area 0xC, 0xFE
ldr r0, =GetEvolutionTargetSpecies_hook1 |1
bx r0
.pool
.endarea
.org GetEvolutionTargetSpecies_hook2_addr
.area 0xA, 0xFF
ldr r3, =GetEvolutionTargetSpecies_hook2 |1
bx r3
.pool
.endarea
.endif
.close
| 22.870968 | 80 | 0.620827 |
277ddca1f6ffd000f686f26a04761c54409da1a2 | 149 | asm | Assembly | tests/testdata/tbuilder-in-16-bad.asm | roycrippen/sicxe | fdca37f56c95f2a76a78455f86a90e4b89329a54 | [
"MIT"
] | null | null | null | tests/testdata/tbuilder-in-16-bad.asm | roycrippen/sicxe | fdca37f56c95f2a76a78455f86a90e4b89329a54 | [
"MIT"
] | null | null | null | tests/testdata/tbuilder-in-16-bad.asm | roycrippen/sicxe | fdca37f56c95f2a76a78455f86a90e4b89329a54 | [
"MIT"
] | null | null | null | test START 0
EXTDEF foo
foo EQU 1 * 2 * 3 * 4 + 500 . error: exported symbol must be relative
END test
| 29.8 | 83 | 0.483221 |
99ef57e9a5c8a7f761e0d4e6f63cc0e9972fe8e7 | 1,649 | asm | Assembly | src/util/oli/app/apperr.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | src/util/oli/app/apperr.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | src/util/oli/app/apperr.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | * unrecoverable applitcation error handling 20/06-92 O.Fink
*
include win1_mac_oli
include win1_keys_qlv
include win1_keys_qdos_io
include win1_keys_qdos_sms
section utility
xdef ut_appr
;+++
; report unrecoverable application error
; close primary window, if still open
;
; Entry no exit
; d0 error code
;---
ut_appr
move.l d0,d7
bpl.s kill
xjsr ut_gpwjb ; get primary ID
bne.s no_prim
xjsr do_close ; close if still open open
no_prim
lea con_blk,a1 ; setup error window
move.w opw.con,a2
jsr (a2)
bne.s kill
moveq #iow.defb,d0
moveq #$80,d1
moveq #4,d2
xjsr do_io
bsr.s f_jbnm ; write job name
bsr.s write
bne.s kill
lea m_fail,a1 ; has failed etc.
bsr.s write
bne.s kill
moveq #iow.sink,d0 ; red ink
moveq #2,d1
jsr do_io
bne.s kill
move.l d7,d0 ; error message
bgt.s er_user ; user defined error msg
move.w ut.werms,a2
jsr (a2)
wait
moveq #iow.ecur,d0 ; wait for user response
jsr do_io
bne.s kill
moveq #iob.fbyt,d0
jsr do_io
bne.s kill
moveq #iow.dcur,d0
jsr do_io
kill
xjsr ut_kill
er_user
move.l d0,a1
bsr.s write
bra.s wait
f_jbnm subr d1-d3/a0
moveq #sms.info,d0
trap #do.sms2
moveq #sms.injb,d0
moveq #0,d2
trap #do.sms2
bne.s kill
lea 8(a0),a1
subend
write subr d2/a1
move.w (a1)+,d2
moveq #iob.smul,d0
jsr do_io
subend
m_fail dc.w 36
dc.b ' ... has failed with the error',10,' '
con_blk
dc.b 2,2,7,0
dc.w 448,40,32,80
end
| 17.923913 | 65 | 0.604002 |
c085ed46991386e949d2f7a3a1b6ebc84fdc51d8 | 277 | asm | Assembly | libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_iy/sp1_InsertCharStruct.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_iy/sp1_InsertCharStruct.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_iy/sp1_InsertCharStruct.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | ; void sp1_InsertCharStruct(struct sp1_update *u, struct sp1_cs *cs)
SECTION code_temp_sp1
PUBLIC _sp1_InsertCharStruct
_sp1_InsertCharStruct:
pop af
pop de
pop hl
push hl
push de
push af
INCLUDE "temp/sp1/zx/sprites/asm_sp1_InsertCharStruct.asm"
| 15.388889 | 68 | 0.743682 |
dc977e6d4a3ed8738c163725da4da26e7aa80d9c | 128 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math48/lm/z80/derror_nannc.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/math/float/math48/lm/z80/derror_nannc.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/math/float/math48/lm/z80/derror_nannc.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_clib
SECTION code_fp_math48
PUBLIC derror_nannc
EXTERN am48_derror_nannc
defc derror_nannc = am48_derror_nannc
| 12.8 | 37 | 0.867188 |
00146d01a04ac5293871059c7da43c375d204285 | 197 | asm | Assembly | LearnAssembly/chap5/test.asm | wisemountain/wise.learn | a8e1343a7d5fd791a3327c108268f752e56b63d7 | [
"MIT"
] | 3 | 2021-04-23T04:01:55.000Z | 2021-09-20T12:47:53.000Z | LearnAssembly/chap5/test.asm | wisemountain/wise.learn | a8e1343a7d5fd791a3327c108268f752e56b63d7 | [
"MIT"
] | null | null | null | LearnAssembly/chap5/test.asm | wisemountain/wise.learn | a8e1343a7d5fd791a3327c108268f752e56b63d7 | [
"MIT"
] | null | null | null | segment .data
a dq 175
b dq 4097
segment .text
global _start
_start:
mov rax, [a] ; mov a into rax
add rax, [b] ; add b to rax
xor rax, rax
mov rax, 60
mov rdi, 0
syscall
| 13.133333 | 33 | 0.598985 |
8c966a20129adfecfa52884cbd181e37dae384b3 | 2,241 | asm | Assembly | Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2.log_142_1005.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2.log_142_1005.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2.log_142_1005.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 %r14
push %r15
push %r9
push %rax
push %rbp
push %rdx
lea addresses_normal_ht+0x1a81a, %r14
nop
nop
nop
cmp $56847, %rdx
mov $0x6162636465666768, %r15
movq %r15, %xmm3
vmovups %ymm3, (%r14)
nop
sub %rax, %rax
lea addresses_D_ht+0x14082, %r14
nop
and %r9, %r9
mov (%r14), %ebp
nop
sub %r15, %r15
pop %rdx
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r9
push %rax
push %rbp
push %rbx
push %rcx
push %rsi
// Store
lea addresses_UC+0x1e3da, %rbp
nop
inc %r9
mov $0x5152535455565758, %rbx
movq %rbx, %xmm6
movups %xmm6, (%rbp)
nop
nop
nop
nop
sub %rbx, %rbx
// Store
mov $0x5da, %rsi
nop
nop
nop
sub $4108, %r14
movw $0x5152, (%rsi)
nop
add $45935, %r9
// Faulty Load
lea addresses_US+0x18bda, %rax
nop
nop
nop
nop
add $31219, %rbp
movb (%rax), %cl
lea oracles, %rbx
and $0xff, %rcx
shlq $12, %rcx
mov (%rbx,%rcx,1), %rcx
pop %rsi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'00': 142}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 22.188119 | 425 | 0.647479 |
a87f9f7d69a3719df2eb0a0a8261df1ed07b0aa4 | 607 | asm | Assembly | oeis/333/A333473.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/333/A333473.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/333/A333473.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A333473: a(n) = [x^n] ( S(x/(1 + x) )^n, where S(x) = (1 - x - sqrt(1 - 6*x + x^2))/(2*x) is the o.g.f. of the large Schröder numbers A006318.
; Submitted by Christian Krause
; 1,2,12,92,752,6352,54768,478928,4231424,37680320,337622912,3040354176,27492359936,249463806464,2270319909632,20714443816192,189418898063360,1735482632719360,15928224355854336,146414296847992832,1347721096376573952,12421053168197722112
mov $3,$0
mov $5,$0
add $5,1
lpb $5
mov $0,$3
sub $5,1
sub $0,$5
mov $1,$3
bin $1,$0
mul $0,2
mov $2,$5
sub $2,$5
sub $2,$3
bin $2,$0
mul $1,$2
add $4,$1
lpe
mov $0,$4
| 26.391304 | 236 | 0.662273 |
dda46a97c3ab7aef2224ccc1bf9b0d878a46498e | 7,549 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_1895.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_1895.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_1895.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 %r12
push %r13
push %r14
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x18307, %rsi
nop
nop
sub %r12, %r12
movb $0x61, (%rsi)
nop
nop
cmp $20394, %rcx
lea addresses_WT_ht+0x3e07, %rsi
lea addresses_WT_ht+0x15307, %rdi
nop
cmp %r13, %r13
mov $49, %rcx
rep movsq
nop
nop
sub %r13, %r13
lea addresses_A_ht+0x1ef87, %rsi
lea addresses_A_ht+0x17367, %rdi
nop
nop
nop
add $21221, %rax
mov $98, %rcx
rep movsb
nop
nop
cmp %r13, %r13
lea addresses_WT_ht+0x1c197, %r13
nop
sub %r12, %r12
mov $0x6162636465666768, %rax
movq %rax, %xmm5
vmovups %ymm5, (%r13)
nop
and %r14, %r14
lea addresses_normal_ht+0x1ba07, %rsi
clflush (%rsi)
nop
nop
nop
nop
cmp %rcx, %rcx
vmovups (%rsi), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $0, %xmm4, %rdi
nop
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_normal_ht+0x5b97, %rsi
lea addresses_A_ht+0xa647, %rdi
nop
nop
nop
nop
nop
xor $47005, %rbp
mov $42, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp $2463, %rcx
lea addresses_WC_ht+0x10907, %rsi
nop
nop
nop
sub $21289, %rbp
mov (%rsi), %r12
and $58329, %rdi
lea addresses_WT_ht+0x18d07, %r12
nop
nop
nop
nop
nop
xor %rbp, %rbp
movups (%r12), %xmm2
vpextrq $0, %xmm2, %r13
nop
nop
dec %rcx
lea addresses_A_ht+0xffe7, %rsi
lea addresses_WC_ht+0x18273, %rdi
nop
nop
nop
nop
xor %r13, %r13
mov $109, %rcx
rep movsb
inc %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r14
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %r8
push %rbp
push %rdi
push %rdx
// Load
lea addresses_US+0x10607, %r14
nop
cmp %r8, %r8
mov (%r14), %r15w
nop
nop
nop
nop
sub $28449, %r14
// Load
lea addresses_WC+0x17117, %rbp
nop
nop
nop
nop
nop
xor %rdx, %rdx
mov (%rbp), %r14
nop
nop
nop
add $2476, %rdx
// Store
lea addresses_RW+0x16047, %rdx
and $20625, %rdi
mov $0x5152535455565758, %r10
movq %r10, (%rdx)
nop
nop
nop
sub $24253, %rbp
// Store
lea addresses_WC+0x3947, %r8
nop
nop
nop
sub $55414, %rdx
mov $0x5152535455565758, %rbp
movq %rbp, %xmm5
vmovups %ymm5, (%r8)
xor $49679, %r10
// Load
lea addresses_UC+0xb70f, %rdi
xor $2757, %r14
mov (%rdi), %bp
nop
nop
add %r14, %r14
// Faulty Load
lea addresses_UC+0x15b07, %rbp
nop
nop
inc %r10
mov (%rbp), %edx
lea oracles, %rbp
and $0xff, %rdx
shlq $12, %rdx
mov (%rbp,%rdx,1), %rdx
pop %rdx
pop %rdi
pop %rbp
pop %r8
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
{'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'src': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_RW'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WC'}}
{'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 7, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 33.551111 | 2,999 | 0.655054 |
c7258a7beed300c8a19599289764f3580e6cd664 | 1,805 | asm | Assembly | programs/oeis/216/A216244.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/216/A216244.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/216/A216244.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A216244: Numbers a(n) such that a(n)^2 + prime(n)^2 = m^2 for some integer m.
; 4,12,24,60,84,144,180,264,420,480,684,840,924,1104,1404,1740,1860,2244,2520,2664,3120,3444,3960,4704,5100,5304,5724,5940,6384,8064,8580,9384,9660,11100,11400,12324,13284,13944,14964,16020,16380,18240,18624,19404,19800,22260,24864,25764,26220,27144,28560,29040,31500,33024,34584,36180,36720,38364,39480,40044,42924,47124,48360,48984,50244,54780,56784,60204,60900,62304,64440,67344,69564,71820,73344,75660,78804,80400,83640,87780,88620,92880,93744,96360,98124,100800,104424,106260,107184,109044,114720,118584,120540,124500,126504,129540,135720,136764,146340,149604,155124,158484,161880,163020,166464,172284,175824,179400,180600,184224,187884,190344,191580,199080,205440,206724,209304,213204,217140,218460,226464,229164,233244,238740,245700,251340,258480,264264,268644,273060,276024,282000,286524,289560,295680,298764,309684,317604,327240,328860,337020,338664,341964,343620,351960,363804,367224,368940,372384,384564,388080,389844,393384,411324,414960,422280,431520,438984,442740,448404,454104,467544,471420,477264,483144,491040,497004,509040,513084,519180,521220,531480,533544,539760,550200,552300,562860,564984,571380,590784,595140,597324,601704,608304,614940,623844,630564,637320,662400,664704,676284,685620,697380,704484,711624,721200,735684,740544,747864,755220,757680,765084,780000,792540,815364,817920,823044,830760,833340,841104,846300,848904,854124,869880,872520,880464,926160,934344,942564,953580,978600,992640,1012464,1018164,1021020,1026744,1035360,1046904,1052700,1055604,1064340,1081920,1096680,1099644,1105584,1108560,1114524,1123500,1141560,1159764,1171980,1190424,1199700,1205904,1215240,1227744,1234020,1246620,1252944,1275204
cal $0,74367 ; (p^2-5)/4 for odd primes p.
mov $1,$0
div $1,2
mul $1,4
add $1,4
| 200.555556 | 1,642 | 0.824377 |
53036f432dd6bd1b2f390c6bdfc2a353e247e042 | 330 | asm | Assembly | programs/oeis/142/A142150.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/142/A142150.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/142/A142150.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A142150: The nonnegative integers interleaved with 0's.
; 0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47,0,48,0,49,0
mov $1,$0
dif $1,2
sub $0,$1
| 47.142857 | 241 | 0.609091 |
cfc8952d63356e8cf5ae7e4af1cc6de6e597fd39 | 274 | asm | Assembly | mySub.asm | TheDoebes/mips-assembly-adventure | fccbb3779999ca6b5b007aa6ca497deea3dc0186 | [
"MIT"
] | null | null | null | mySub.asm | TheDoebes/mips-assembly-adventure | fccbb3779999ca6b5b007aa6ca497deea3dc0186 | [
"MIT"
] | null | null | null | mySub.asm | TheDoebes/mips-assembly-adventure | fccbb3779999ca6b5b007aa6ca497deea3dc0186 | [
"MIT"
] | null | null | null | .data
numberOne: .word 20 #declare integer words
numberTwo: .word 8
.text #for the intructions
lw $s0, numberOne #s0 gets a value of 20
lw $s1, numberTwo #s1 gets a vlue of 8
sub $t0, $s0, $s1 #t0 = s0 - s1 = 20 - 8
#print result
li $v0, 1
move $a0, $t0
syscall | 21.076923 | 43 | 0.649635 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.