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
633db98a01ce14b1220165dde125002079692a09
1,006
asm
Assembly
src/util/oli/wm/wsiz.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/util/oli/wm/wsiz.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/util/oli/wm/wsiz.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
; calculate window size include win1_mac_oli include win1_keys_wwork include win1_keys_wdef_long section utility xdef xwm_wsiz xref ut_appr ;+++ ; calculate window size ; ; Entry Exit ; d1.l size (or -1 for max) new size ; a0 channel id ; a3 wdef ;--- xwm_wsiz subr d2/d3/a3 move.b wd_wattr+wda_shdd(a3),d0 ; shadow x ext.w d0 mulu #ww.shadx,d0 move.w d0,d2 swap d2 move.b wd_wattr+wda_shdd(a3),d0 ; shadow y ext.w d0 mulu #ww.shady,d0 move.w d0,d2 move.w wd_wattr+wda_borw(a3),d0 ; border x lsl.w #1,d0 swap d0 move.w wd_wattr+wda_borw(a3),d0 ; border y lsl.l #1,d0 add.l d0,d2 ; d2 border/shadow pixels move.l d1,d3 ; d3 requested size bpl.s siz_ok move.l #$7fff7fff,d3 siz_ok xjsr ut_gwlma ; d1 screen limits bne ut_appr sub.l d2,d1 ; ...less border/shadow cmp.w d3,d1 bge.s y_ok move.w d1,d3 y_ok swap d3 swap d1 cmp.w d3,d1 bge.s x_ok move.w d1,d3 x_ok andi.w #-4,d3 ; x size multiple of 4 swap d3 move.l d3,d1 moveq #0,d0 exit subend end
17.344828
44
0.687873
61b669e4aa84e99fe072c47998f02570f3a3849d
603
asm
Assembly
test/fibonacci.asm
zephray/Dramite
34cf8beb35f37dcf5303a391c4c5e6b3f554776b
[ "MIT" ]
4
2018-09-17T02:13:12.000Z
2021-08-12T12:16:59.000Z
test/fibonacci.asm
CapaciPort/Dramite
34cf8beb35f37dcf5303a391c4c5e6b3f554776b
[ "MIT" ]
null
null
null
test/fibonacci.asm
CapaciPort/Dramite
34cf8beb35f37dcf5303a391c4c5e6b3f554776b
[ "MIT" ]
2
2019-12-28T13:15:57.000Z
2020-12-13T17:24:14.000Z
; fibonacci.asm ; ; $ nasm -v ; NASM version 2.11.08 ; $ nasm fibonacci.asm -o fibonacci.bin ; $ hexdump -C fibonacci.bin ; 00000000 66 31 db 66 b9 09 00 00 00 66 31 d2 66 b8 01 00 |f1.f.....f1.f...| ; 00000010 00 00 eb 00 66 89 da 66 89 c3 66 01 d0 66 49 66 |....f..f..f..fIf| ; 00000020 83 f9 00 75 ef f4 |...u..| ; 00000026 ; $ section .text global _start _start: xor ebx, ebx mov ecx, 0x09 xor edx, edx mov eax, 0x01 jmp loop1 loop1: mov edx, ebx mov ebx, eax add eax, edx dec ecx cmp ecx, 0x00 jne loop1 hlt
19.451613
80
0.558872
817e284bbf10395bd4f85ba4d41e5c9b107c1f5d
347
asm
Assembly
source/lli_end.asm
mateuszstompor/Linked-List-x86-64-ASM
0652d03458ef65e93a6cad4586dacbd5893c5ed6
[ "MIT" ]
5
2019-07-12T11:30:22.000Z
2022-03-07T18:39:52.000Z
source/lli_end.asm
mateuszstompor/Linked-List-x86-64-ASM
0652d03458ef65e93a6cad4586dacbd5893c5ed6
[ "MIT" ]
6
2019-07-22T21:34:01.000Z
2020-02-09T15:09:10.000Z
source/lli_end.asm
mateuszstompor/Linked-List-x86-64-ASM
0652d03458ef65e93a6cad4586dacbd5893c5ed6
[ "MIT" ]
null
null
null
; ; Created by Mateusz Stompór on 25/06/2019. ; %include "source/offsets.asm" %include "source/iterator.asm" %include "source/constants.asm" %include "source/memory_management.asm" global LLI_END section .text LLI_END: add rsi, LL_LIST_LAST_OFFSET mov rcx, [rsi] mov qword [rdi], NULL_PTR add rdi, 8 mov [rdi], rcx ret
16.52381
43
0.694524
df400f02d596c1f828360eb02a7d1e6cedafed1d
319
asm
Assembly
oeis/165/A165801.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/165/A165801.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/165/A165801.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A165801: f(n), f(f(n)), ... are all prime, where f(n) = (n-1)/2. Stop when f(...f(n)...) is less than 4. ; 1,2,3,5,7,11,15,23,47,95 seq $0,279078 ; Maximum starting value of X such that repeated replacement of X with X-ceiling(X/8) requires n steps to reach 0. seq $0,52955 ; a(2n) = 2*2^n - 1, a(2n+1) = 3*2^n - 1.
53.166667
128
0.605016
009cc6211b8fffb9b58d7761cba1a87c9b294095
819
asm
Assembly
programs/oeis/157/A157619.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/157/A157619.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/157/A157619.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A157619: 31250n - 22150. ; 9100,40350,71600,102850,134100,165350,196600,227850,259100,290350,321600,352850,384100,415350,446600,477850,509100,540350,571600,602850,634100,665350,696600,727850,759100,790350,821600,852850,884100,915350,946600,977850,1009100,1040350,1071600,1102850,1134100,1165350,1196600,1227850,1259100,1290350,1321600,1352850,1384100,1415350,1446600,1477850,1509100,1540350,1571600,1602850,1634100,1665350,1696600,1727850,1759100,1790350,1821600,1852850,1884100,1915350,1946600,1977850,2009100,2040350,2071600,2102850,2134100,2165350,2196600,2227850,2259100,2290350,2321600,2352850,2384100,2415350,2446600,2477850,2509100,2540350,2571600,2602850,2634100,2665350,2696600,2727850,2759100,2790350,2821600,2852850,2884100,2915350,2946600,2977850,3009100,3040350,3071600,3102850 mul $0,31250 add $0,9100
136.5
765
0.85348
50cdbdbbccfe1f2dfc6f4b7d564cfd9995173fb8
10,599
asm
Assembly
uuu/src/cells/storage/seaborgium/seaborgium.asm
ekscrypto/Unununium
4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f
[ "BSD-2-Clause" ]
7
2019-03-04T08:53:33.000Z
2022-01-28T19:32:12.000Z
uuu/src/cells/storage/seaborgium/seaborgium.asm
ekscrypto/Unununium
4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f
[ "BSD-2-Clause" ]
null
null
null
uuu/src/cells/storage/seaborgium/seaborgium.asm
ekscrypto/Unununium
4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f
[ "BSD-2-Clause" ]
null
null
null
;; $Header: /cvsroot/uuu/uuu/src/cells/storage/seaborgium/seaborgium.asm,v 1.21 2001/12/10 16:58:27 instinc Exp $ ;; Seaborgium cell Copyright 2001 Phil Frost ;; A tempoary ramdisk Distrubited under the BSD license ;; ;; status: ;; ------- ;; highly hacked; currently designed only to give a minimal, one disk, totally ;; worthless FS. [bits 32] ; ----------------------------------- ; defines ;============================================================================== ;%define _DEBUG_ %define _RAMDISK_SIZE_ 2000000 ; 2MB ( base 10 :P ) ; ----------------------------------- ; strucs ;============================================================================== struc local_file_descriptor .global: resb file_descriptor_size .pos: resd 1 endstruc ; ----------------------------------- ; cell init ;============================================================================== section .c_init jmp start s_malloc_error: db "[Seaborgium] Error allocating memory for ramdisk",0 s_operational: db "[Seaborgium] Initialization completed ($Revision: 1.21 $)",0 s_device: db "/rd/0",0 malloc_error: mov esi, s_malloc_error externfunc sys_log.print_string jmp finished start: pushad ; allocate memory for disk ---===--- mov ecx, _RAMDISK_SIZE_ xor edx, edx externfunc mem.alloc jc malloc_error mov [p_disk], edi dbg_print "ramdisk created at 0x",1 %ifdef _DEBUG_ push edx mov edx, edi externfunc hex_out, system_log pop edx externfunc terminate_log, system_log %endif ; _DEBUG_ ; register with devfs ---===--- mov ebx, _open mov esi, s_device externfunc devfs.register mov esi, s_operational externfunc sys_log.print_string finished: popad ; ----------------------------------- ; section .text ;============================================================================== section .text ; ----------------------------------- ; __read ;============================================================================== __read: ;> ;; parameters: ;; ----------- ;; ECX = number of bytes ;; EDI = pointer to buffer to put data in ;; EBX = file handle ;; ;; returned values: ;; ---------------- ;; EDI = unchanged ;; errors as usual ;< dbg_print "reading",0 mov eax, [ebx+local_file_descriptor.pos] .engage: ; __raw_read uses this mov esi, eax add esi, [p_disk] ; set up the source ; check to see if we can read that much add eax, ecx cmp eax, _RAMDISK_SIZE_ ja near _too_big ; engage! ---===--- push edi rep movsb ; could probally be better with movsd, but this is a hack... pop edi clc retn ; ----------------------------------- ; __write ;============================================================================== __write: ;> ;; parameters: ;; ----------- ;; ECX = number of bytes ;; ESI = pointer to buffer to read data from ;; EBX = file handle ;; ;; returned values: ;; ---------------- ;; errors as usual ;< mov eax, [ebx+local_file_descriptor.pos] .engage: ; __raw_write uses this ; calc the abs. pointer to where we write to ---===--- mov edi, eax add edi, [p_disk] ; check to see if they write too much ---===--- add eax, ecx cmp eax, _RAMDISK_SIZE_ ja _too_big ; engage! ---===--- dbg_print "writing to 0x",1 %ifdef _DEBUG_ push edx mov edx, edi externfunc hex_out, system_log pop edx externfunc terminate_log, system_log %endif ; _DEBUG_ rep movsb retn ; ----------------------------------- ; __raw_read ;============================================================================== __raw_read: ;> ;; reads as if this was a disk with 512b sector size ;; ;; parameters: ;; ----------- ;; EDX:EAX = 64 bit LBA ;; ECX = number of sectors to read ;; EDI = pointer to buffer to put data in ;; EBX = pointer to file handle ;; ;; returned values: ;; ---------------- ;; EDI = unchanged ;; errors as usual ;< dbg_print "raw reading",0 test edx, edx jnz _error test eax, 0xff800000 jnz _error shl eax, 9 ; mul by 512 shl ecx, 9 jmp __read.engage ; ----------------------------------- ; __raw_write ;============================================================================== __raw_write: ;> ;; writes as if this was a disk with 512b sector size ;; ;; parameters: ;; ----------- ;; EDX:EAX = 64 bit LBA ;; ECX = number of sectors to read ;; ESI = pointer to buffer to read data from ;; EBX = file handle ;< test edx, edx jnz _error test eax, 0xff800000 jnz _error shl eax, 9 ; mul by 512 shl ecx, 9 jmp __write.engage ; ----------------------------------- ; __seek_start ;============================================================================== __seek_start: ;> ;; moves the position pointer of a file to specified point. This flavor moves ;; to an absloute position relitive to the start of the file. ;; ;; parameters: ;; ----------- ;; EDX:EAX = position to seek to, unsigned ;; EBX = file handle ;; ;; returned values: ;; ---------------- ;; EBX = unchanged ;; errors as usual ;< test edx, edx jnz _error ; we can't have more than 4gb of ram...so...eh..no. cmp eax, _RAMDISK_SIZE_ jae _error mov [ebx+local_file_descriptor.pos], eax clc retn ; ----------------------------------- ; __seek_cur ;============================================================================== __seek_cur: ;> ;; moves the position pointer of a file to specified point. This flavor moves ;; to a position relitive to the current location. ;; ;; parameters: ;; ----------- ;; EDX:EAX = amount to seek, signed ;; EBX = file handle ;; ;; returned values: ;; ---------------- ;; EBX = unchanged ;; errors as usual ;< ; XXX doesn't check to see if seek goes past file test edx, 0x80000000 jnz .negitive ; jmp is seek is neg test edx, edx jnz _error ; we can't seek that much add [ebx+local_file_descriptor.pos], eax jmp .done .negitive: not edx neg eax sbb edx, -1 ; neg edx:eax test edx, edx jnz _error ; we can't seek that much sub [ebx+local_file_descriptor.pos], eax .done: clc retn ; ----------------------------------- ; __seek_end ;============================================================================== __seek_end: ;> ;; moves the position pointer of a file to specified point. This flavor moves ;; to a position relitive to the end of the file. That means that a 0 will get ;; you pointed at a new byte, and 1 will get you pointed at the last byte of ;; the file. ;; ;; parameters: ;; ----------- ;; EDX:EAX = amount to seek back from the end, unsigned ;; EBX = file handle ;; ;; returned values: ;; ---------------- ;; EBX = unchanged ;; errors as usual ;< ;; XXX doesn't expand the file in the case that it's appended to test edx, edx jnz _error mov edx, _RAMDISK_SIZE_ sub edx, eax js _error mov [ebx+local_file_descriptor.pos], edx clc retn ; ----------------------------------- ; __error ;============================================================================== __error: _error: _too_big: ; jumped to when there is not enough space on the ramdisk xor eax, eax dec eax stc retn ; ----------------------------------- ; _open ;============================================================================== _open: push edx mov ecx, local_file_descriptor_size externfunc mem.alloc mov dword[edi+file_descriptor.op_table], our_op_table pop dword[edi+file_descriptor.fs_descriptor] xor edx, edx mov [edi+local_file_descriptor.pos], edx mov ebx, edi retn ; ----------------------------------- ; cell info ;============================================================================== section .c_info db 0, 0, 1, 'a' dd str_cellname dd str_author dd str_copyrights str_cellname: dd "Seaborgium - simple ramdisk" str_author: dd 'Phil "Indigo" Frost (daboy@xgs.dhs.org)' str_copyrights: dd 'Copyright 2001 by Phil Frost; distributed under the BSD license' ; ----------------------------------- ; data ;============================================================================== section .data align 4 global p_disk ; for fs_test p_disk: dd 0 ; pointer to the disk's RAM chunk our_file_descriptor: istruc local_file_descriptor at local_file_descriptor.global istruc file_descriptor at file_descriptor.op_table, dd our_op_table iend at local_file_descriptor.pos, dd 0 ; position in the file iend our_op_table: istruc file_op_table at file_op_table.close, dd __error at file_op_table.read, dd __read at file_op_table.write, dd __write at file_op_table.raw_read, dd __raw_read at file_op_table.raw_write, dd __raw_write at file_op_table.seek_cur, dd __error at file_op_table.seek_start, dd __error at file_op_table.seek_end, dd __error at file_op_table.read_fork, dd __error at file_op_table.write_fork, dd __error at file_op_table.link, dd __error at file_op_table.unlink, dd __error at file_op_table.create, dd __error at file_op_table.rename, dd __error at file_op_table.copy, dd __error at file_op_table.truncate, dd __error at file_op_table.attrib, dd __error iend
25.85122
113
0.469478
6d842c6b1f34ab51171d665fc4d8f3c183519e4f
3,857
asm
Assembly
S4/HW_Lab/linear_search.asm
akxavier/Assignments
968e657dcdbf78cef72d3c5450c73c341c1fa91d
[ "MIT" ]
null
null
null
S4/HW_Lab/linear_search.asm
akxavier/Assignments
968e657dcdbf78cef72d3c5450c73c341c1fa91d
[ "MIT" ]
null
null
null
S4/HW_Lab/linear_search.asm
akxavier/Assignments
968e657dcdbf78cef72d3c5450c73c341c1fa91d
[ "MIT" ]
null
null
null
;linear search section .data msg1 : db 'Enter array size : ' l1 : equ $-msg1 msg2 : db 'Enter array element : ' l2 : equ $-msg2 msg3 : db 'Enter item to be searched : ' l3 : equ $-msg3 msg_found : db 'Element found at position ' l_found : equ $-msg_found msg_notfound : db 'Element not found' l_notfound : equ $-msg_notfound newline : db 10 section .bss array : resb 50 d1 : resb 1 d2 : resb 1 n : resb 1 count : resb 1 junk : resb 1 item : resb 1 section .text global _start: _start: mov eax, 4 mov ebx, 1 mov ecx, msg1 mov edx, l1 int 80h mov eax, 3 mov ebx, 0 mov ecx, d1 mov edx, 1 int 80h mov eax, 3 mov ebx, 0 mov ecx, d2 mov edx, 1 int 80h mov eax, 3 mov ebx, 0 mov ecx, junk mov edx, 1 int 80h ;calculate array size sub byte[d1], 30h sub byte[d2], 30h mov al, byte[d1] mov bl, 10 mul bl add al, byte[d2] mov byte[n], al ;n stores array size ;ebx stores array starting address mov ebx, array ;initialize loop variable to zero mov byte[count], 0 reading: push ebx mov eax, 4 mov ebx, 1 mov ecx, msg2 mov edx, l2 int 80h mov eax, 3 mov ebx, 0 mov ecx, d1 mov edx, 1 int 80h mov eax, 3 mov ebx, 0 mov ecx, d2 mov edx, 1 int 80h mov eax, 3 mov ebx, 0 mov ecx, junk mov edx, 1 int 80h ;calculate array element sub byte[d1], 30h sub byte[d2], 30h mov al, byte[d1] mov bl, 10 mul bl add al, byte[d2] ;store array element pop ebx mov byte[ebx], al add ebx, 1 inc byte[count] mov al, byte[n] cmp byte[count], al jb reading ;read item to be searched mov eax, 4 mov ebx, 1 mov ecx, msg3 mov edx, l3 int 80h mov eax, 3 mov ebx, 0 mov ecx, d1 mov edx, 1 int 80h mov eax, 3 mov ebx, 0 mov ecx, d2 mov edx, 1 int 80h mov eax, 3 mov ebx, 0 mov ecx, junk mov edx, 1 int 80h ;calculate item to be searched sub byte[d1], 30h sub byte[d2], 30h mov al, byte[d1] mov bl, 10 mul bl add al, byte[d2] mov byte[item], al ;ebx contains array address mov ebx, array ;count initialized to zero mov byte[count], 0 ;cl contains array length mov cl, byte[n] search: mov al, byte[ebx] cmp al, byte[item] je found add ebx, 1 inc byte[count] cmp byte[count], cl jb search not_found: mov eax, 4 mov ebx, 1 mov ecx, msg_notfound mov edx, l_notfound int 80h mov eax, 4 mov ebx, 1 mov ecx, newline mov edx, 1 int 80h jmp exit found: mov eax, 4 mov ebx, 1 mov ecx, msg_found mov edx, l_found int 80h ;count contains the position of item mov ah, 0 mov al, byte[count] mov bl, 10 div bl mov byte[d1], al mov byte[d2], ah add byte[d1], 30h add byte[d2], 30h mov eax, 4 mov ebx, 1 mov ecx, d1 mov edx, 1 int 80h mov eax, 4 mov ebx, 1 mov ecx, d2 mov edx, 1 int 80h mov eax, 4 mov ebx, 1 mov ecx, newline mov edx, 1 int 80h exit: mov eax, 1 mov ebx, 0 int 80h
17.295964
44
0.47524
c09fbcce18ae2e4a4d8decf9e2ffa719ae7e34bc
5,905
asm
Assembly
src/vars.asm
fjpena/sword-of-ianna-msx2
f104f46a677e4b21f42fbed478307a0bb1d372f3
[ "Apache-2.0" ]
43
2017-10-21T23:01:25.000Z
2022-02-21T17:45:11.000Z
src/vars.asm
fjpena/sword-of-ianna-msx2
f104f46a677e4b21f42fbed478307a0bb1d372f3
[ "Apache-2.0" ]
null
null
null
src/vars.asm
fjpena/sword-of-ianna-msx2
f104f46a677e4b21f42fbed478307a0bb1d372f3
[ "Apache-2.0" ]
6
2017-10-23T05:48:50.000Z
2022-01-06T03:11:49.000Z
; MSX BIOS definitions RAM_Start EQU $C000 ENASLT EQU $0024 ;enable slot RSLREG EQU $0138 ;read primary slot select register EXPTBL EQU $FCC1 ;slot is expanded or not CLIKSW EQU $F3DB ; variable to set/reset the keyboard click sound ; Engine variables string_area: ds 2048 OBJECT_DATA: ds 256 ; $C800, keep this in mind when porting! script_area: EQU string_area+2 LEVEL_SCREEN_ADDRESSES: ds 128 ; SFX and music data music_addr: ds 4096 ; music will be on a fixed location ($C980), and we'll load it from disk/cart music_sfx: ds 1100 ; ($D980) ; Music code MUSIC_CODE: ds 2000 ; it is 1902 for now, but let's play safe MUSIC_ROM_PAGE EQU 40 ; Checkpoint save area CHECKPOINT_AREA: ds 512 CURRENT_SCREEN_MAP: ds 403 CURRENT_SCREEN_MAP_FG: EQU CURRENT_SCREEN_MAP + 160 CURRENT_SCREEN_HARDNESS_MAP: EQU CURRENT_SCREEN_MAP + 320 CURRENT_SCREEN_OBJECTS: EQU CURRENT_SCREEN_MAP + 360 curscreen_animtiles: ds 30 ndirtyrects: ds 1 tiles_dirty: ds 192 SPDATA: ds 128 ENTITY_DATA: ds 96 ; 12 bytes, 8 entities simulatedsprite: ds 7 simulated_object: ds 8 newx: ds 1 newy: ds 1 deltax: ds 1 deltay: ds 1 stairy: ds 1 ; value to climb up/down the stairs cannotmove_reason: db 1 checkstair: ds 1 forcemove: ds 1 ycur: ds 1 y0: ds 1 y1: ds 1 adjustx: ds 1 hitting_entity_looking_at: ds 1 self_injury: ds 1 canhang_delta: ds 1 canhang_half: ds 1 slash_deltax_1: ds 1 slash_deltax_2: ds 1 slash_hits_x: ds 1 wait_alternate: ds 1 ; Scratch area for player and enemies, used for: ; - Temporary script storage ; - Subscript execution ; - WARNING: bytes 6-7 are reserved for subscript storage!!!! scratch_area_player: ds 8 ; scratch area for player scripts scratch_area_enemy1: ds 8 ; scratch area for enemy scripts scratch_area_enemy2: ds 8 ; scratch area for enemy scripts scratch_area_obj1: ds 8 ; scratch area for enemy scripts scratch_area_obj2: ds 8 ; scratch area for enemy scripts scratch_area_obj3: ds 8 ; scratch area for enemy scripts scratch_area_obj4: ds 8 ; scratch area for enemy scripts scratch_area_obj5: ds 8 ; scratch area for enemy scripts ; Weapon constants WEAPON_SWORD: EQU 0 WEAPON_ECLIPSE: EQU 1 WEAPON_AXE: EQU 2 WEAPON_BLADE: EQU 3 ; Variables slot2address: db 1 FrameCounter: ds 2 msx2ISR: ds 2 UserISR ds 2 InterruptBuffer: ds 5 delay60HZ: ds 1 frames_lock: ds 1 ;5:PAL, 6: NTSC ; VDP variables tileDat: ds 15 ; buffer for tile commands fgtileDat: ds 15 ; buffer for foreground tile commands dirtyTileDat: ds 15 ; buffer to transfer dirty tiles cmdDat: ds 15 ; buffer with command data charDat: ds 15 ; buffer for char commands charDat2: ds 15 ; buffer for char commands, when drawing directly on the front buffer charDat3: ds 15 ; buffer for char commands, when drawing with transparency vdpCmdSprite: ds 15 ; buffer for sprite commands fillDat: ds 15 ; buffer for fill commands vdpCmdWeapon: ds 15 ; buffer for weapon in score area lineMoveDat: ds 15 ; buffer for line moves (used in menu) vdpCopyDat: ds 15 ; buffer for general copies scoreDat: ds 15 ; buffer for score area usage currentPal: ds 32 ; current palette ; Memory handling vabiables ROMBank0: ds 1 ROMBank1: ds 1 thisslt: ds 1 ; Music variables music_playing: ds 1 music_state: ds 1 ; 0: music+fx, 1: music only, 2: fx only music_save: db 0 ; Entity variables ENTITY_SIZE: EQU 12 ENTITY_PLAYER_POINTER: EQU ENTITY_DATA ENTITY_ENEMY1_POINTER: EQU ENTITY_DATA+12 ENTITY_ENEMY2_POINTER: EQU ENTITY_DATA+24 ENTITY_OBJECT1_POINTER: EQU ENTITY_DATA+36 ENTITY_OBJECT2_POINTER: EQU ENTITY_DATA+48 ENTITY_OBJECT3_POINTER: EQU ENTITY_DATA+60 ENTITY_OBJECT4_POINTER: EQU ENTITY_DATA+72 ENTITY_OBJECT5_POINTER: EQU ENTITY_DATA+84 ; Game variables joystick_state: db 0 level_nscreens: db 0 level_nscripts: db 0 level_nstrings: db 0 level_width: db 0 level_height: db 0 level_tiles_addr: dw 0 level_stiles_addr: dw 0 level_stilecolors_addr: dw 0 level_string_en_addr: dw 0 level_string_addr: dw 0 curscreen_numanimtiles: db 0 frames_noredraw: db 0 animate_tile: db 0 entity_sprite_base: dw 0 entity_current: dw 0 global_timer: db 0 initial_coordx: db 0 initial_coordy: db 0 entity_joystick: db 0 ; Inventory handling variables inv_current_object: db 0 inv_first_obj: db 0 inv_refresh: db 0 ; refresh inventory? INVENTORY_SIZE EQU 6 inventory: ds INVENTORY_SIZE inv_what_to_print: db 0 ; 0: barbarian, 1: enemy 1, 2: enemy 2 score_semaphore: db 0 currentx: db 0 current_levelx: db 0 current_levely: db 0 ; Barbarian state player_dead: db 0 player_available_weapons: db 0,0,0,0 player_level: db 0 player_experience: db 0 player_current_weapon: db 0 show_passwd: ds 1 current_level: ds 1 language: ds 1 screen_changed: ds 1 action_flags: ds 1 action_random_number: ds 1 action_fight_scratch: ds 2 saved_hardness: ds 1 saveA: ds 1 newscreen: ds 1 toggle_amount: ds 1 randData: ds 2 action_ack: ds 1 sprite_rom_page: ds 1 draw_char: ds 1 draw_blank: ds 1 BARBARIAN_ROM_PAGE: EQU 2 BARBARIAN_ADDITIONAL_ROM_PAGE: EQU 3 score_password_value: db 0,0,0,0,0 rom_offset_weapon: ds 1 ; Menu variables save_level: db 0 password_string: db " ",0 password_value: db 0, 0, 0, 0, 0 ; current_level | player_available_weapons, player_level, player_exp, player_current_weapon, cksum score_password_string: db "PASSWORD:1234567890",0 start_delta: db 0 current_delta: db 0 current_y: db 0 menu_counter: db 0 menu_option: db 0 menu_running: db 0 menu_timer: db 0 menu_loops: db 0 credit_timer: db 0 credit_current: db 0 current_string_list: dw 0 string_list: dw string_1, string_2, string_3, string_4_1 string_list_es: dw string_1, string_2, string_3_es, string_4_1 menu_in_jukebox: db 0 menu_delay: db 0 ; Intro/ending variables intro_var: db 0 number_screens: db 0 menu_string_list: dw 0 menu_screen_list: dw 0 menu_cls_counter: db 0 intro_shown: db 0 slideshow_rom_page: db 0 END_VARS:
28.389423
138
0.77138
86f94b662802b742165d448f4140dea6364e4902
5,642
asm
Assembly
sdk-6.5.16/tools/led/example/sdk56560.asm
copslock/broadcom_cpri
8e2767676e26faae270cf485591902a4c50cf0c5
[ "Spencer-94" ]
null
null
null
sdk-6.5.16/tools/led/example/sdk56560.asm
copslock/broadcom_cpri
8e2767676e26faae270cf485591902a4c50cf0c5
[ "Spencer-94" ]
null
null
null
sdk-6.5.16/tools/led/example/sdk56560.asm
copslock/broadcom_cpri
8e2767676e26faae270cf485591902a4c50cf0c5
[ "Spencer-94" ]
null
null
null
; ; ; ; This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. ; ; Copyright 2007-2019 Broadcom Inc. All rights reserved. ; ; ; This is the default program for the BCM5656x/BCM5676x. ; There are two LED processors on BCM5656x/BCM5676x. ; Each LED processor accomodates 36 ports. ; LED processor 0 : Physical Ports 1-36 ; LED processor 1 : Physical Ports 37-72 ; ; To start the first one, use the following commands from BCM: ; ; led 0 load sdk56560.hex ; led 0 auto on ; led 0 start ; To start the second one: ; ; led 1 load sdk56560.hex ; led 1 auto on ; led 1 start ; ; The are 2 LEDs per port one for Link(Top) and one for activity(Bottom). ; ; Each chip drives only its own LEDs and needs to write them in the order: ; L01/A01, L02/A02, ..., L36/A36 ; ; There are two bits per Ethernet LED for activity with the following colors: ; ZERO, ZERO Black ; ZERO, ONE Amber ; ONE, ZERO Green ; ; This program assumes link status is kept current in bit 0 of RAM byte (0xA0 + portnum). ; Generally, a program running on the main CPU must update these ; locations on link change; see linkscan callback in ; $SDK/src/appl/diag/ledproc.c. ; ; Current implementation: ; ; L01 reflects port 1 link status: ; Black: no link ; Green: Link ; ; A01 reflects port 1 activity status: ; Black: no activity ; Blinking Green and Black: TX activity ; Blinking Amber and Black: RX activity ; Blinking Green and Amber: TX and RX activity ; ; TICKS EQU 1 SECOND_TICKS EQU (30*TICKS) TXRX_ALT_TICKS EQU (SECOND_TICKS) MIN_PORT EQU 0 NUM_PORT EQU 35 MAX_PORT EQU 36 ; Assumptions ; Link status is injected by SDK from Linkscan task at PORTDATA offset ; ; Main Update Routine ; ; This routine is called once per tick. ; update: ld a,MIN_PORT port_loop: call link_status ; Top LED for this port call chk_activity ; Bottom LED for this port inc a cmp a,MAX_PORT jnz port_loop ; Update various timers inc (TXRX_ALT_COUNT) send 248 ; offset to shift bits so as to align LEDs on board intuitively ; Activity status LED update chk_activity: call get_txact ;get TX activity jnc act1 ;TX not active, check if RX active jmp act2 ;TX active, check if RX active ret act1: call get_rxact jnc led_black ;no activity jmp blink_amber ;only RX active ret act2: call get_rxact jnc blink_green ;only TX active jmp blink_amg ;TX and RX both active ret ; Link status LED update link_status: call get_link jnc led_black jmp led_green clc ret ; ; get_link ; ; This routine finds the link status for a port. ; Link info is in bit 0 of the byte read from PORTDATA[port] ; ; Inputs: Port number in a ; Outputs: Carry flag set if link is up, clear if link is down. ; Destroys: b ; get_link: clc ld b,PORTDATA add b,a ld b,(b) tst b,0 ret ; ; get_txact ; ; This routine finds the TX activity status for a port. ; TX activity info is in bit 4 of the byte read from PORTDATA[port] ; ; Inputs: Port number in a ; Outputs: Carry flag set if TX activity is in progress, clear if not.. ; Destroys: b ; get_txact: clc ld b,PORTDATA add b,a ld b,(b) tst b,4 ret ; ; get_rxact ; ; This routine finds the RX activity status for a port. ; TX activity info is in bit 5 of the byte read from PORTDATA[port] ; ; Inputs: Port number in a ; Outputs: Carry flag set if RX activity is in progress, clear if not.. ; Destroys: b ; get_rxact: clc ld b,PORTDATA add b,a ld b,(b) tst b,5 ret ; ; blink_amber, blink_green, blink_amg ; Alteration between respective colors based on timer ; blink_amber: ld b, (TXRX_ALT_COUNT) and b, TXRX_ALT_TICKS jnz led_amber jmp led_black clc ret blink_green: ld b, (TXRX_ALT_COUNT) and b, TXRX_ALT_TICKS jnz led_green jmp led_black clc ret blink_amg: ld b, (TXRX_ALT_COUNT) and b, TXRX_ALT_TICKS jnz led_amber jmp led_green clc ret ; ; led_black, led_amber, led_green ; ; Inputs: None ; Outputs: Two bits to the LED stream indicating color ; Destroys: None ; led_black: pushst ZERO pack pushst ZERO pack ret led_amber: pushst ONE pack pushst ZERO pack ret led_green: pushst ZERO pack pushst ONE pack ret ; ; Variables (SDK software initializes LED memory from 0xa0-0xff to 0) ; TXRX_ALT_COUNT equ 0xe0 ; ; Port data, which must be updated continually by main CPU's ; linkscan task. See $SDK/src/appl/diag/ledproc.c for examples. ; In this program, bit 0 is assumed to contain the link up/down status. ; ;LED scan chain assembly area ;Offset 0x20680 for LED 0 ;Offset 0x21680 for LED 1 PORTDATA equ 0xa0 ; Size 4 bytes for each port starting A0,A4 ... ZERO equ 0xE ; always 0 ONE equ 0xF ; always 1
22.842105
133
0.6028
f38028b4c92ae05e5938100a7ab53f3d8401a320
179
asm
Assembly
data/pokemon/dex_entries/infernape.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
6
2021-06-19T06:41:19.000Z
2022-02-15T17:12:33.000Z
data/pokemon/dex_entries/infernape.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
null
null
null
data/pokemon/dex_entries/infernape.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
3
2021-01-15T18:45:40.000Z
2021-10-16T03:35:27.000Z
db "FLAME@" ; species name db "It tosses its" next "enemies around" next "with agility. It" page "uses all its limbs" next "to fight in its " next "own unique style.@"
17.9
27
0.659218
42a89fc6a7e1fc7ec17a39c53dc3e12b4d4890ce
992
asm
Assembly
Tests/sample3.asm
13xforever/x86-assembly-textmate-bundle
f1bb62f77b776d87d0fd85b0276d4237ff72c43c
[ "MIT" ]
69
2015-04-16T18:01:22.000Z
2022-02-15T07:54:26.000Z
Tests/sample3.asm
javiercbk/x86-assembly-textmate-bundle
62d700e0196f62ef4353a9b95c2e64beb0a6afda
[ "MIT" ]
17
2016-09-20T08:49:09.000Z
2021-02-19T15:01:04.000Z
Tests/sample3.asm
javiercbk/x86-assembly-textmate-bundle
62d700e0196f62ef4353a9b95c2e64beb0a6afda
[ "MIT" ]
19
2016-05-31T07:11:14.000Z
2021-07-19T10:17:12.000Z
.data .align 16 v1: .float 1.1, 2.2, 3.3, 4.4 v2: .float 5.5, 6.6, 7.7, 8.8 v3: .float 0, 0, 0, 0 .text .global _start _start: movaps v1,%xmm0 # load v1 into xmm0 to xmm6 movaps v1,%xmm1 # using movaps since v1 is 16 byte aligned movaps v1,%xmm2 movaps v1,%xmm3 movaps v1,%xmm4 movaps v1,%xmm5 movaps v1,%xmm6 shufps $0x1b, %xmm0, %xmm0 # reverse order of the 4 floats shufps $0x00, %xmm1, %xmm1 # Broadcast least significant element to all elements shufps $0x55, %xmm2, %xmm2 # Broadcast second element to all elements shufps $0xAA, %xmm3, %xmm3 # Broadcast third element to all elements shufps $0xFF, %xmm4, %xmm4 # Broadcast most significant element to all elements shufps $0x39, %xmm5, %xmm5 # Rotate elements right shufps $0x93, %xmm6, %xmm6 # Rotate elements left movups %xmm0,v3 # store v1 in v3 ret
36.740741
88
0.586694
73a1c5d32d699c4016cacfad308e9b815b1e1ba1
987
nasm
Assembly
UefiPayloadPkg/UefiPayloadEntry/Ia32/SecEntry.nasm
kavyak11/Upl_Rebased
a5dc96cd3846b9eeb856f649c0ecf3a02b94fdb1
[ "Python-2.0", "Zlib", "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-3-Clause" ]
null
null
null
UefiPayloadPkg/UefiPayloadEntry/Ia32/SecEntry.nasm
kavyak11/Upl_Rebased
a5dc96cd3846b9eeb856f649c0ecf3a02b94fdb1
[ "Python-2.0", "Zlib", "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-3-Clause" ]
null
null
null
UefiPayloadPkg/UefiPayloadEntry/Ia32/SecEntry.nasm
kavyak11/Upl_Rebased
a5dc96cd3846b9eeb856f649c0ecf3a02b94fdb1
[ "Python-2.0", "Zlib", "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-3-Clause" ]
null
null
null
;------------------------------------------------------------------------------ ;* ;* Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR> ;* SPDX-License-Identifier: BSD-2-Clause-Patent ;------------------------------------------------------------------------------ #include <Base.h> SECTION .text extern ASM_PFX(PayloadEntry) extern ASM_PFX(PcdGet32 (PcdPayloadStackTop)) ; ; SecCore Entry Point ; ; Processor is in flat protected mode global ASM_PFX(_ModuleEntryPoint) ASM_PFX(_ModuleEntryPoint): ; ; Disable all the interrupts ; cli ; ; Save the bootloader stack pointer ; mov eax, esp mov esp, FixedPcdGet32 (PcdPayloadStackTop) ; ; Prepare data strcuture at stack top ; push 0 push dword [eax + 8] push 0 push dword [eax + 4] ; ; Push arguments for entry point ; push dword [eax + 8] push dword [eax + 4] ; ; Call into C code ; call ASM_PFX(PayloadEntry) jmp $
18.277778
79
0.54306
400ac24cf916df88acea8770077a3829176e6275
715
asm
Assembly
oeis/178/A178821.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/178/A178821.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/178/A178821.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A178821: Triangle read by rows: T(n,k) = binomial(n+4,4) * binomial(n,k), 0 <= k <= n. ; Submitted by Christian Krause ; 1,5,5,15,30,15,35,105,105,35,70,280,420,280,70,126,630,1260,1260,630,126,210,1260,3150,4200,3150,1260,210,330,2310,6930,11550,11550,6930,2310,330,495,3960,13860,27720,34650,27720,13860,3960,495,715,6435,25740,60060,90090,90090,60060,25740,6435,715,1001,10010,45045,120120,210210,252252,210210,120120,45045,10010,1001,1365,15015,75075,225225,450450,630630,630630,450450,225225,75075,15015,1365,1820,21840,120120,400400,900900,1441440,1681680,1441440,900900,400400,120120,21840,1820,2380,30940,185640 lpb $0 add $2,1 sub $0,$2 lpe mov $1,$2 bin $1,$0 add $2,4 bin $2,4 mul $1,$2 mov $0,$1
47.666667
500
0.741259
54608161a3276070213d3ff822627e5b5edc6902
130
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_ix/___fs2sint.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_ix/___fs2sint.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/c/sdcc_ix/___fs2sint.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 ___fs2sint EXTERN cm48_sdccixp_ds2sint defc ___fs2sint = cm48_sdccixp_ds2sint
13
38
0.869231
364e3e01f1491b19b5d2909f5b15a93d385c7d85
397
asm
Assembly
programs/oeis/026/A026817.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/026/A026817.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/026/A026817.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A026817: Number of sets which can be obtained by selecting unique elements from two sets with 2n and 3n elements respectively and n common elements. ; 6,23,51,90,140,201,273,356,450,555,671,798,936,1085,1245,1416,1598,1791,1995,2210,2436,2673,2921,3180,3450,3731,4023,4326,4640,4965,5301,5648,6006,6375,6755,7146,7548,7961,8385,8820,9266,9723,10191,10670 mul $0,11 add $0,12 bin $0,2 div $0,11
49.625
205
0.768262
4f1da978fdc5dfbc88108147832c7dab5df3ea6c
2,629
asm
Assembly
Assembly Works 2/TASK_1_Lab_2.asm
AhmadVakil/Assembly-C_Micro-Controller
0e48bf9b3aff2b20a6b3df50cdca6c45f50df0a2
[ "MIT" ]
null
null
null
Assembly Works 2/TASK_1_Lab_2.asm
AhmadVakil/Assembly-C_Micro-Controller
0e48bf9b3aff2b20a6b3df50cdca6c45f50df0a2
[ "MIT" ]
null
null
null
Assembly Works 2/TASK_1_Lab_2.asm
AhmadVakil/Assembly-C_Micro-Controller
0e48bf9b3aff2b20a6b3df50cdca6c45f50df0a2
[ "MIT" ]
null
null
null
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; 1DT301, Computer Technology I ; Date: 2016-09-29 ; Author: ; Ahmadreza Vakilalroayayi ; ; ; Lab number: 2 ; Title: How to use the PORTs. Digital input/output. Subroutine call. ; ; Hardware: STK600, CPU ATmega2560 ; ; Function: Switch between ring counter and johnson counter with SW0. ; ; Input ports: When SW0 is pressed the subroutines will be changed(SW0==PORTA) ; ; Output ports: PORTB ; ; Subroutines: If applicable. ; Included files: m2560def.inc ; ; Other information: ; ; Changes in program: (Description and date) ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< .include "m2560def.inc" ; Initialize SP, Stack Pointer ldi r20, HIGH(RAMEND) ; R20 = high part of RAMEND address out SPH,R20 ; SPH = high part of RAMEND address ldi R20, low(RAMEND) ; R20 = low part of RAMEND address out SPL,R20 ; SPL = low part of RAMEND address ldi r16,0b11111111 ; ALL pins will be available to use as output out DDRB, r16 ldi r21,0b00000000; A is input out DDRA, r21 johnson_loop: in r21,PINA ; Get the value from PINA and register it on r21 cpi r21,0b11111110 ; if Switch one pressed go to Ring_Counter breq ring_counter out PORTB, r16 ; Show the value of r16 on PORTB call delay ; Call the delay subroutine com r16 ; Reverse r16 lsl r16 ; Shift r16 to left inc r16 ; increase r16 com r16 ; Reverse r16 again cpi r16,0x00 ; compare if all LEDs are ON brne johnson_loop ; If all LEDs are on then go back to johnson_loop cpi r16,0x00 ; compare r16 with 0 breq off_all_leds ; If all ON then ==> off_all_leds one by one and go backward off_all_leds: ldi r16,0b00000000 out PORTB,r16 ; Going backward in johnson counter backward_loop: in r21,PINA cpi r21,0b11111110 breq ring_counter out PORTB, r16 call delay com r16 dec r16 lsr r16 com r16 cpi r16,0xFF breq johnson_loop cpi r16,0x00 brne backward_loop ; Delay subroutine delay: push r18 push r19 push r20 ldi r18, 3 ldi r19, 138 ldi r20, 86 L1: dec r20 brne L1 dec r19 brne L1 dec r18 brne L1 rjmp PC+1 pop r20 pop r19 pop r18 ret ring_counter: ring_loop: in r22,PINA cpi r22,0b11111110 breq change_to_johnson out PORTB, r16 call delay lsl r16 inc r16 cpi r16,0xFF brne ring_loop end: ldi r16,0b11111110 rjmp ring_loop rjmp ring_counter change_to_johnson: ldi r16,0b11111111 rjmp johnson_loop change_to_ring: ldi r16,0b11111110; A is input rjmp ring_counter
17.071429
79
0.658425
eaa9b8e2ee9f0d4fb007bba9948d2e8dc6aa0be6
1,520
asm
Assembly
uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/Rivl/Ia32/RivlCall.asm
sunnywang-arm/edk2-test
475be9f7a70d012705eca64dd24a9eeaed643183
[ "BSD-2-Clause" ]
47
2018-10-15T02:34:39.000Z
2022-02-07T11:02:45.000Z
uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/Rivl/Ia32/RivlCall.asm
sunnywang-arm/edk2-test
475be9f7a70d012705eca64dd24a9eeaed643183
[ "BSD-2-Clause" ]
null
null
null
uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/Rivl/Ia32/RivlCall.asm
sunnywang-arm/edk2-test
475be9f7a70d012705eca64dd24a9eeaed643183
[ "BSD-2-Clause" ]
78
2018-10-08T01:17:19.000Z
2022-03-16T14:33:15.000Z
;@file ; ; Copyright 2006 - 2010 Unified EFI, Inc.<BR> ; Copyright (c) 2010, Intel Corporation. All rights reserved.<BR> ; ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; ;++ TITLE RivlCall.asm: Rivlcall routine .686p .model flat .code ;------------------------------------------------------------------------------------------------------- ; UINTN RivlCall (VOID *FuncAddr, UINTN CallingType, UINTN Number, UINTN *StackTop, UINTN *StackBottom); ;------------------------------------------------------------------------------------------------------- RivlCall PROC PUBLIC push ebp mov ebp, esp mov ecx, [ebp + 10h] mov edi, [ebp + 18h] @@: push [edi] lea edi, [edi - 4] loop @B mov eax, [ebp + 8] call eax ; ; fix ESP for __cdecl (default) ; do nothing for __stdcall ; mov ebx, [ebp + 0ch] cmp ebx, 0 jne @@Exit mov ebx, [ebp + 10h] shl ebx, 3 add esp, ebx; @@Exit: pop ebp ret RivlCall ENDP END
26.666667
105
0.504605
5cc3222522ddd17ca1d42f4003fe46fb8c7e4bf7
405
asm
Assembly
programs/oeis/286/A286016.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/286/A286016.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/286/A286016.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A286016: Signed continued fraction expansion with all signs negative of tanh(1). ; 1,5,2,2,2,2,9,2,2,2,2,2,2,2,2,13,2,2,2,2,2,2,2,2,2,2,2,2,17,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,21,2,2,2,2,2,2 mov $1,2 mov $2,$0 lpb $2 trn $2,$3 add $3,4 mov $5,$2 lpb $5 trn $4,5 trn $5,$3 lpe lpb $4 sub $3,$3 add $3,1 mov $4,3 lpe trn $2,1 mov $4,5 lpe add $1,3 add $1,$3 sub $1,4
16.2
108
0.535802
34eb898e0af200ee985812509f12f878c67c7d7b
149
asm
Assembly
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/mak.lzh/mak/kart-init-e.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/mak.lzh/mak/kart-init-e.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/mak.lzh/mak/kart-init-e.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
Name: kart-init-e.asm Type: file Size: 57645 Last-Modified: '1992-08-06T07:17:01Z' SHA-1: 0E495B9127E964C5D90CEDD865B9AA1FF8B2D22C Description: null
21.285714
47
0.805369
e338f5b8d51d74bd834e1dfa37b1069f5defa533
1,243
asm
Assembly
programs/oeis/001/A001552.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/001/A001552.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/001/A001552.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A001552: 1^n + 2^n + ... + 5^n. ; 5,15,55,225,979,4425,20515,96825,462979,2235465,10874275,53201625,261453379,1289414505,6376750435,31605701625,156925970179,780248593545,3883804424995,19349527020825,96470431101379,481245667164585,2401809362313955,11991391850823225,59886402198414979,299149971105959625,1494622260945073315,7468602621165012825,37324983455717958979,186552813930161650665,932475702012291199075,4661225176771363733625,23301512962485156261379,116489114362298809149705,582371773717052304627235,2911563687325667231369625,14556637744944425468330179,72778466058049780944008745,363873439923749202040333795,1819291639053315835898544825,9096155955706563566893653379,45479570828397868988644819785,227393018365764887075113934755,1136945748796872609851610123225,5684651372075393751813516198979,28422947373397605556855075614825,142113498921040116885345695286115,710562542827317566455217645208825,3552792907042781637051562368414979,17763885306891861033922048348265865,88819109621330649452109782646083875,444094280454617223052386011629145625 mov $4,$0 mov $0,5 mov $2,5 mov $3,$4 lpb $0 mov $1,$0 sub $0,1 pow $1,$3 add $2,$1 lpe gcd $0,2 mul $1,2 add $1,5 mul $2,5 add $2,$0 add $1,$2 sub $1,59 div $1,10 mul $1,2 add $1,5 mov $0,$1
49.72
1,007
0.861625
2d19559d370f48a7189fefda87762cdb3a383576
656,107
asm
Assembly
lab02/lab2/kernel.asm
ahchu1993/opsys
b3405cdf48e99654b4bbc2bad8b3cd4ce1cbd09f
[ "Xnet", "X11" ]
null
null
null
lab02/lab2/kernel.asm
ahchu1993/opsys
b3405cdf48e99654b4bbc2bad8b3cd4ce1cbd09f
[ "Xnet", "X11" ]
null
null
null
lab02/lab2/kernel.asm
ahchu1993/opsys
b3405cdf48e99654b4bbc2bad8b3cd4ce1cbd09f
[ "Xnet", "X11" ]
null
null
null
kernel: file format elf32-i386 Disassembly of section .text: 80100000 <multiboot_header>: 80100000: 02 b0 ad 1b 00 00 add 0x1bad(%eax),%dh 80100006: 00 00 add %al,(%eax) 80100008: fe 4f 52 decb 0x52(%edi) 8010000b: e4 0f in $0xf,%al 8010000c <entry>: # Entering xv6 on boot processor, with paging off. .globl entry entry: # Turn on page size extension for 4Mbyte pages movl %cr4, %eax 8010000c: 0f 20 e0 mov %cr4,%eax orl $(CR4_PSE), %eax 8010000f: 83 c8 10 or $0x10,%eax movl %eax, %cr4 80100012: 0f 22 e0 mov %eax,%cr4 # Set page directory movl $(V2P_WO(entrypgdir)), %eax 80100015: b8 00 a0 10 00 mov $0x10a000,%eax movl %eax, %cr3 8010001a: 0f 22 d8 mov %eax,%cr3 # Turn on paging. movl %cr0, %eax 8010001d: 0f 20 c0 mov %cr0,%eax orl $(CR0_PG|CR0_WP), %eax 80100020: 0d 00 00 01 80 or $0x80010000,%eax movl %eax, %cr0 80100025: 0f 22 c0 mov %eax,%cr0 # Set up the stack pointer. movl $(stack + KSTACKSIZE), %esp 80100028: bc 70 c6 10 80 mov $0x8010c670,%esp # Jump to main(), and switch to executing at # high addresses. The indirect call is needed because # the assembler produces a PC-relative instruction # for a direct jump. mov $main, %eax 8010002d: b8 bd 33 10 80 mov $0x801033bd,%eax jmp *%eax 80100032: ff e0 jmp *%eax 80100034 <binit>: struct buf head; } bcache; void binit(void) { 80100034: 55 push %ebp 80100035: 89 e5 mov %esp,%ebp 80100037: 83 ec 28 sub $0x28,%esp struct buf *b; initlock(&bcache.lock, "bcache"); 8010003a: c7 44 24 04 a8 85 10 movl $0x801085a8,0x4(%esp) 80100041: 80 80100042: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 80100049: e8 7b 4e 00 00 call 80104ec9 <initlock> //PAGEBREAK! // Create linked list of buffers bcache.head.prev = &bcache.head; 8010004e: c7 05 b0 db 10 80 a4 movl $0x8010dba4,0x8010dbb0 80100055: db 10 80 bcache.head.next = &bcache.head; 80100058: c7 05 b4 db 10 80 a4 movl $0x8010dba4,0x8010dbb4 8010005f: db 10 80 for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 80100062: c7 45 f4 b4 c6 10 80 movl $0x8010c6b4,-0xc(%ebp) 80100069: eb 3a jmp 801000a5 <binit+0x71> b->next = bcache.head.next; 8010006b: 8b 15 b4 db 10 80 mov 0x8010dbb4,%edx 80100071: 8b 45 f4 mov -0xc(%ebp),%eax 80100074: 89 50 10 mov %edx,0x10(%eax) b->prev = &bcache.head; 80100077: 8b 45 f4 mov -0xc(%ebp),%eax 8010007a: c7 40 0c a4 db 10 80 movl $0x8010dba4,0xc(%eax) b->dev = -1; 80100081: 8b 45 f4 mov -0xc(%ebp),%eax 80100084: c7 40 04 ff ff ff ff movl $0xffffffff,0x4(%eax) bcache.head.next->prev = b; 8010008b: a1 b4 db 10 80 mov 0x8010dbb4,%eax 80100090: 8b 55 f4 mov -0xc(%ebp),%edx 80100093: 89 50 0c mov %edx,0xc(%eax) bcache.head.next = b; 80100096: 8b 45 f4 mov -0xc(%ebp),%eax 80100099: a3 b4 db 10 80 mov %eax,0x8010dbb4 //PAGEBREAK! // Create linked list of buffers bcache.head.prev = &bcache.head; bcache.head.next = &bcache.head; for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 8010009e: 81 45 f4 18 02 00 00 addl $0x218,-0xc(%ebp) 801000a5: 81 7d f4 a4 db 10 80 cmpl $0x8010dba4,-0xc(%ebp) 801000ac: 72 bd jb 8010006b <binit+0x37> b->prev = &bcache.head; b->dev = -1; bcache.head.next->prev = b; bcache.head.next = b; } } 801000ae: c9 leave 801000af: c3 ret 801000b0 <bget>: // Look through buffer cache for sector on device dev. // If not found, allocate fresh block. // In either case, return B_BUSY buffer. static struct buf* bget(uint dev, uint sector) { 801000b0: 55 push %ebp 801000b1: 89 e5 mov %esp,%ebp 801000b3: 83 ec 28 sub $0x28,%esp struct buf *b; acquire(&bcache.lock); 801000b6: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 801000bd: e8 28 4e 00 00 call 80104eea <acquire> loop: // Is the sector already cached? for(b = bcache.head.next; b != &bcache.head; b = b->next){ 801000c2: a1 b4 db 10 80 mov 0x8010dbb4,%eax 801000c7: 89 45 f4 mov %eax,-0xc(%ebp) 801000ca: eb 63 jmp 8010012f <bget+0x7f> if(b->dev == dev && b->sector == sector){ 801000cc: 8b 45 f4 mov -0xc(%ebp),%eax 801000cf: 8b 40 04 mov 0x4(%eax),%eax 801000d2: 3b 45 08 cmp 0x8(%ebp),%eax 801000d5: 75 4f jne 80100126 <bget+0x76> 801000d7: 8b 45 f4 mov -0xc(%ebp),%eax 801000da: 8b 40 08 mov 0x8(%eax),%eax 801000dd: 3b 45 0c cmp 0xc(%ebp),%eax 801000e0: 75 44 jne 80100126 <bget+0x76> if(!(b->flags & B_BUSY)){ 801000e2: 8b 45 f4 mov -0xc(%ebp),%eax 801000e5: 8b 00 mov (%eax),%eax 801000e7: 83 e0 01 and $0x1,%eax 801000ea: 85 c0 test %eax,%eax 801000ec: 75 23 jne 80100111 <bget+0x61> b->flags |= B_BUSY; 801000ee: 8b 45 f4 mov -0xc(%ebp),%eax 801000f1: 8b 00 mov (%eax),%eax 801000f3: 83 c8 01 or $0x1,%eax 801000f6: 89 c2 mov %eax,%edx 801000f8: 8b 45 f4 mov -0xc(%ebp),%eax 801000fb: 89 10 mov %edx,(%eax) release(&bcache.lock); 801000fd: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 80100104: e8 43 4e 00 00 call 80104f4c <release> return b; 80100109: 8b 45 f4 mov -0xc(%ebp),%eax 8010010c: e9 93 00 00 00 jmp 801001a4 <bget+0xf4> } sleep(b, &bcache.lock); 80100111: c7 44 24 04 80 c6 10 movl $0x8010c680,0x4(%esp) 80100118: 80 80100119: 8b 45 f4 mov -0xc(%ebp),%eax 8010011c: 89 04 24 mov %eax,(%esp) 8010011f: e8 43 4a 00 00 call 80104b67 <sleep> goto loop; 80100124: eb 9c jmp 801000c2 <bget+0x12> acquire(&bcache.lock); loop: // Is the sector already cached? for(b = bcache.head.next; b != &bcache.head; b = b->next){ 80100126: 8b 45 f4 mov -0xc(%ebp),%eax 80100129: 8b 40 10 mov 0x10(%eax),%eax 8010012c: 89 45 f4 mov %eax,-0xc(%ebp) 8010012f: 81 7d f4 a4 db 10 80 cmpl $0x8010dba4,-0xc(%ebp) 80100136: 75 94 jne 801000cc <bget+0x1c> goto loop; } } // Not cached; recycle some non-busy and clean buffer. for(b = bcache.head.prev; b != &bcache.head; b = b->prev){ 80100138: a1 b0 db 10 80 mov 0x8010dbb0,%eax 8010013d: 89 45 f4 mov %eax,-0xc(%ebp) 80100140: eb 4d jmp 8010018f <bget+0xdf> if((b->flags & B_BUSY) == 0 && (b->flags & B_DIRTY) == 0){ 80100142: 8b 45 f4 mov -0xc(%ebp),%eax 80100145: 8b 00 mov (%eax),%eax 80100147: 83 e0 01 and $0x1,%eax 8010014a: 85 c0 test %eax,%eax 8010014c: 75 38 jne 80100186 <bget+0xd6> 8010014e: 8b 45 f4 mov -0xc(%ebp),%eax 80100151: 8b 00 mov (%eax),%eax 80100153: 83 e0 04 and $0x4,%eax 80100156: 85 c0 test %eax,%eax 80100158: 75 2c jne 80100186 <bget+0xd6> b->dev = dev; 8010015a: 8b 45 f4 mov -0xc(%ebp),%eax 8010015d: 8b 55 08 mov 0x8(%ebp),%edx 80100160: 89 50 04 mov %edx,0x4(%eax) b->sector = sector; 80100163: 8b 45 f4 mov -0xc(%ebp),%eax 80100166: 8b 55 0c mov 0xc(%ebp),%edx 80100169: 89 50 08 mov %edx,0x8(%eax) b->flags = B_BUSY; 8010016c: 8b 45 f4 mov -0xc(%ebp),%eax 8010016f: c7 00 01 00 00 00 movl $0x1,(%eax) release(&bcache.lock); 80100175: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 8010017c: e8 cb 4d 00 00 call 80104f4c <release> return b; 80100181: 8b 45 f4 mov -0xc(%ebp),%eax 80100184: eb 1e jmp 801001a4 <bget+0xf4> goto loop; } } // Not cached; recycle some non-busy and clean buffer. for(b = bcache.head.prev; b != &bcache.head; b = b->prev){ 80100186: 8b 45 f4 mov -0xc(%ebp),%eax 80100189: 8b 40 0c mov 0xc(%eax),%eax 8010018c: 89 45 f4 mov %eax,-0xc(%ebp) 8010018f: 81 7d f4 a4 db 10 80 cmpl $0x8010dba4,-0xc(%ebp) 80100196: 75 aa jne 80100142 <bget+0x92> b->flags = B_BUSY; release(&bcache.lock); return b; } } panic("bget: no buffers"); 80100198: c7 04 24 af 85 10 80 movl $0x801085af,(%esp) 8010019f: e8 96 03 00 00 call 8010053a <panic> } 801001a4: c9 leave 801001a5: c3 ret 801001a6 <bread>: // Return a B_BUSY buf with the contents of the indicated disk sector. struct buf* bread(uint dev, uint sector) { 801001a6: 55 push %ebp 801001a7: 89 e5 mov %esp,%ebp 801001a9: 83 ec 28 sub $0x28,%esp struct buf *b; b = bget(dev, sector); 801001ac: 8b 45 0c mov 0xc(%ebp),%eax 801001af: 89 44 24 04 mov %eax,0x4(%esp) 801001b3: 8b 45 08 mov 0x8(%ebp),%eax 801001b6: 89 04 24 mov %eax,(%esp) 801001b9: e8 f2 fe ff ff call 801000b0 <bget> 801001be: 89 45 f4 mov %eax,-0xc(%ebp) if(!(b->flags & B_VALID)) 801001c1: 8b 45 f4 mov -0xc(%ebp),%eax 801001c4: 8b 00 mov (%eax),%eax 801001c6: 83 e0 02 and $0x2,%eax 801001c9: 85 c0 test %eax,%eax 801001cb: 75 0b jne 801001d8 <bread+0x32> iderw(b); 801001cd: 8b 45 f4 mov -0xc(%ebp),%eax 801001d0: 89 04 24 mov %eax,(%esp) 801001d3: e8 c1 25 00 00 call 80102799 <iderw> return b; 801001d8: 8b 45 f4 mov -0xc(%ebp),%eax } 801001db: c9 leave 801001dc: c3 ret 801001dd <bwrite>: // Write b's contents to disk. Must be B_BUSY. void bwrite(struct buf *b) { 801001dd: 55 push %ebp 801001de: 89 e5 mov %esp,%ebp 801001e0: 83 ec 18 sub $0x18,%esp if((b->flags & B_BUSY) == 0) 801001e3: 8b 45 08 mov 0x8(%ebp),%eax 801001e6: 8b 00 mov (%eax),%eax 801001e8: 83 e0 01 and $0x1,%eax 801001eb: 85 c0 test %eax,%eax 801001ed: 75 0c jne 801001fb <bwrite+0x1e> panic("bwrite"); 801001ef: c7 04 24 c0 85 10 80 movl $0x801085c0,(%esp) 801001f6: e8 3f 03 00 00 call 8010053a <panic> b->flags |= B_DIRTY; 801001fb: 8b 45 08 mov 0x8(%ebp),%eax 801001fe: 8b 00 mov (%eax),%eax 80100200: 83 c8 04 or $0x4,%eax 80100203: 89 c2 mov %eax,%edx 80100205: 8b 45 08 mov 0x8(%ebp),%eax 80100208: 89 10 mov %edx,(%eax) iderw(b); 8010020a: 8b 45 08 mov 0x8(%ebp),%eax 8010020d: 89 04 24 mov %eax,(%esp) 80100210: e8 84 25 00 00 call 80102799 <iderw> } 80100215: c9 leave 80100216: c3 ret 80100217 <brelse>: // Release a B_BUSY buffer. // Move to the head of the MRU list. void brelse(struct buf *b) { 80100217: 55 push %ebp 80100218: 89 e5 mov %esp,%ebp 8010021a: 83 ec 18 sub $0x18,%esp if((b->flags & B_BUSY) == 0) 8010021d: 8b 45 08 mov 0x8(%ebp),%eax 80100220: 8b 00 mov (%eax),%eax 80100222: 83 e0 01 and $0x1,%eax 80100225: 85 c0 test %eax,%eax 80100227: 75 0c jne 80100235 <brelse+0x1e> panic("brelse"); 80100229: c7 04 24 c7 85 10 80 movl $0x801085c7,(%esp) 80100230: e8 05 03 00 00 call 8010053a <panic> acquire(&bcache.lock); 80100235: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 8010023c: e8 a9 4c 00 00 call 80104eea <acquire> b->next->prev = b->prev; 80100241: 8b 45 08 mov 0x8(%ebp),%eax 80100244: 8b 40 10 mov 0x10(%eax),%eax 80100247: 8b 55 08 mov 0x8(%ebp),%edx 8010024a: 8b 52 0c mov 0xc(%edx),%edx 8010024d: 89 50 0c mov %edx,0xc(%eax) b->prev->next = b->next; 80100250: 8b 45 08 mov 0x8(%ebp),%eax 80100253: 8b 40 0c mov 0xc(%eax),%eax 80100256: 8b 55 08 mov 0x8(%ebp),%edx 80100259: 8b 52 10 mov 0x10(%edx),%edx 8010025c: 89 50 10 mov %edx,0x10(%eax) b->next = bcache.head.next; 8010025f: 8b 15 b4 db 10 80 mov 0x8010dbb4,%edx 80100265: 8b 45 08 mov 0x8(%ebp),%eax 80100268: 89 50 10 mov %edx,0x10(%eax) b->prev = &bcache.head; 8010026b: 8b 45 08 mov 0x8(%ebp),%eax 8010026e: c7 40 0c a4 db 10 80 movl $0x8010dba4,0xc(%eax) bcache.head.next->prev = b; 80100275: a1 b4 db 10 80 mov 0x8010dbb4,%eax 8010027a: 8b 55 08 mov 0x8(%ebp),%edx 8010027d: 89 50 0c mov %edx,0xc(%eax) bcache.head.next = b; 80100280: 8b 45 08 mov 0x8(%ebp),%eax 80100283: a3 b4 db 10 80 mov %eax,0x8010dbb4 b->flags &= ~B_BUSY; 80100288: 8b 45 08 mov 0x8(%ebp),%eax 8010028b: 8b 00 mov (%eax),%eax 8010028d: 83 e0 fe and $0xfffffffe,%eax 80100290: 89 c2 mov %eax,%edx 80100292: 8b 45 08 mov 0x8(%ebp),%eax 80100295: 89 10 mov %edx,(%eax) wakeup(b); 80100297: 8b 45 08 mov 0x8(%ebp),%eax 8010029a: 89 04 24 mov %eax,(%esp) 8010029d: e8 09 4a 00 00 call 80104cab <wakeup> release(&bcache.lock); 801002a2: c7 04 24 80 c6 10 80 movl $0x8010c680,(%esp) 801002a9: e8 9e 4c 00 00 call 80104f4c <release> } 801002ae: c9 leave 801002af: c3 ret 801002b0 <inb>: // Routines to let C code use special x86 instructions. static inline uchar inb(ushort port) { 801002b0: 55 push %ebp 801002b1: 89 e5 mov %esp,%ebp 801002b3: 83 ec 14 sub $0x14,%esp 801002b6: 8b 45 08 mov 0x8(%ebp),%eax 801002b9: 66 89 45 ec mov %ax,-0x14(%ebp) uchar data; asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801002bd: 0f b7 45 ec movzwl -0x14(%ebp),%eax 801002c1: 89 c2 mov %eax,%edx 801002c3: ec in (%dx),%al 801002c4: 88 45 ff mov %al,-0x1(%ebp) return data; 801002c7: 0f b6 45 ff movzbl -0x1(%ebp),%eax } 801002cb: c9 leave 801002cc: c3 ret 801002cd <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 801002cd: 55 push %ebp 801002ce: 89 e5 mov %esp,%ebp 801002d0: 83 ec 08 sub $0x8,%esp 801002d3: 8b 55 08 mov 0x8(%ebp),%edx 801002d6: 8b 45 0c mov 0xc(%ebp),%eax 801002d9: 66 89 55 fc mov %dx,-0x4(%ebp) 801002dd: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801002e0: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 801002e4: 0f b7 55 fc movzwl -0x4(%ebp),%edx 801002e8: ee out %al,(%dx) } 801002e9: c9 leave 801002ea: c3 ret 801002eb <cli>: asm volatile("movw %0, %%gs" : : "r" (v)); } static inline void cli(void) { 801002eb: 55 push %ebp 801002ec: 89 e5 mov %esp,%ebp asm volatile("cli"); 801002ee: fa cli } 801002ef: 5d pop %ebp 801002f0: c3 ret 801002f1 <printint>: int locking; } cons; static void printint(int xx, int base, int sign) { 801002f1: 55 push %ebp 801002f2: 89 e5 mov %esp,%ebp 801002f4: 56 push %esi 801002f5: 53 push %ebx 801002f6: 83 ec 30 sub $0x30,%esp static char digits[] = "0123456789abcdef"; char buf[16]; int i; uint x; if(sign && (sign = xx < 0)) 801002f9: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801002fd: 74 1c je 8010031b <printint+0x2a> 801002ff: 8b 45 08 mov 0x8(%ebp),%eax 80100302: c1 e8 1f shr $0x1f,%eax 80100305: 0f b6 c0 movzbl %al,%eax 80100308: 89 45 10 mov %eax,0x10(%ebp) 8010030b: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010030f: 74 0a je 8010031b <printint+0x2a> x = -xx; 80100311: 8b 45 08 mov 0x8(%ebp),%eax 80100314: f7 d8 neg %eax 80100316: 89 45 f0 mov %eax,-0x10(%ebp) 80100319: eb 06 jmp 80100321 <printint+0x30> else x = xx; 8010031b: 8b 45 08 mov 0x8(%ebp),%eax 8010031e: 89 45 f0 mov %eax,-0x10(%ebp) i = 0; 80100321: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 80100328: 8b 4d f4 mov -0xc(%ebp),%ecx 8010032b: 8d 41 01 lea 0x1(%ecx),%eax 8010032e: 89 45 f4 mov %eax,-0xc(%ebp) 80100331: 8b 5d 0c mov 0xc(%ebp),%ebx 80100334: 8b 45 f0 mov -0x10(%ebp),%eax 80100337: ba 00 00 00 00 mov $0x0,%edx 8010033c: f7 f3 div %ebx 8010033e: 89 d0 mov %edx,%eax 80100340: 0f b6 80 04 90 10 80 movzbl -0x7fef6ffc(%eax),%eax 80100347: 88 44 0d e0 mov %al,-0x20(%ebp,%ecx,1) }while((x /= base) != 0); 8010034b: 8b 75 0c mov 0xc(%ebp),%esi 8010034e: 8b 45 f0 mov -0x10(%ebp),%eax 80100351: ba 00 00 00 00 mov $0x0,%edx 80100356: f7 f6 div %esi 80100358: 89 45 f0 mov %eax,-0x10(%ebp) 8010035b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 8010035f: 75 c7 jne 80100328 <printint+0x37> if(sign) 80100361: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 80100365: 74 10 je 80100377 <printint+0x86> buf[i++] = '-'; 80100367: 8b 45 f4 mov -0xc(%ebp),%eax 8010036a: 8d 50 01 lea 0x1(%eax),%edx 8010036d: 89 55 f4 mov %edx,-0xc(%ebp) 80100370: c6 44 05 e0 2d movb $0x2d,-0x20(%ebp,%eax,1) while(--i >= 0) 80100375: eb 18 jmp 8010038f <printint+0x9e> 80100377: eb 16 jmp 8010038f <printint+0x9e> consputc(buf[i]); 80100379: 8d 55 e0 lea -0x20(%ebp),%edx 8010037c: 8b 45 f4 mov -0xc(%ebp),%eax 8010037f: 01 d0 add %edx,%eax 80100381: 0f b6 00 movzbl (%eax),%eax 80100384: 0f be c0 movsbl %al,%eax 80100387: 89 04 24 mov %eax,(%esp) 8010038a: e8 c1 03 00 00 call 80100750 <consputc> }while((x /= base) != 0); if(sign) buf[i++] = '-'; while(--i >= 0) 8010038f: 83 6d f4 01 subl $0x1,-0xc(%ebp) 80100393: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80100397: 79 e0 jns 80100379 <printint+0x88> consputc(buf[i]); } 80100399: 83 c4 30 add $0x30,%esp 8010039c: 5b pop %ebx 8010039d: 5e pop %esi 8010039e: 5d pop %ebp 8010039f: c3 ret 801003a0 <cprintf>: //PAGEBREAK: 50 // Print to the console. only understands %d, %x, %p, %s. void cprintf(char *fmt, ...) { 801003a0: 55 push %ebp 801003a1: 89 e5 mov %esp,%ebp 801003a3: 83 ec 38 sub $0x38,%esp int i, c, locking; uint *argp; char *s; locking = cons.locking; 801003a6: a1 14 b6 10 80 mov 0x8010b614,%eax 801003ab: 89 45 e8 mov %eax,-0x18(%ebp) if(locking) 801003ae: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) 801003b2: 74 0c je 801003c0 <cprintf+0x20> acquire(&cons.lock); 801003b4: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp) 801003bb: e8 2a 4b 00 00 call 80104eea <acquire> if (fmt == 0) 801003c0: 8b 45 08 mov 0x8(%ebp),%eax 801003c3: 85 c0 test %eax,%eax 801003c5: 75 0c jne 801003d3 <cprintf+0x33> panic("null fmt"); 801003c7: c7 04 24 ce 85 10 80 movl $0x801085ce,(%esp) 801003ce: e8 67 01 00 00 call 8010053a <panic> argp = (uint*)(void*)(&fmt + 1); 801003d3: 8d 45 0c lea 0xc(%ebp),%eax 801003d6: 89 45 f0 mov %eax,-0x10(%ebp) for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ 801003d9: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 801003e0: e9 21 01 00 00 jmp 80100506 <cprintf+0x166> if(c != '%'){ 801003e5: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 801003e9: 74 10 je 801003fb <cprintf+0x5b> consputc(c); 801003eb: 8b 45 e4 mov -0x1c(%ebp),%eax 801003ee: 89 04 24 mov %eax,(%esp) 801003f1: e8 5a 03 00 00 call 80100750 <consputc> continue; 801003f6: e9 07 01 00 00 jmp 80100502 <cprintf+0x162> } c = fmt[++i] & 0xff; 801003fb: 8b 55 08 mov 0x8(%ebp),%edx 801003fe: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80100402: 8b 45 f4 mov -0xc(%ebp),%eax 80100405: 01 d0 add %edx,%eax 80100407: 0f b6 00 movzbl (%eax),%eax 8010040a: 0f be c0 movsbl %al,%eax 8010040d: 25 ff 00 00 00 and $0xff,%eax 80100412: 89 45 e4 mov %eax,-0x1c(%ebp) if(c == 0) 80100415: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 80100419: 75 05 jne 80100420 <cprintf+0x80> break; 8010041b: e9 06 01 00 00 jmp 80100526 <cprintf+0x186> switch(c){ 80100420: 8b 45 e4 mov -0x1c(%ebp),%eax 80100423: 83 f8 70 cmp $0x70,%eax 80100426: 74 4f je 80100477 <cprintf+0xd7> 80100428: 83 f8 70 cmp $0x70,%eax 8010042b: 7f 13 jg 80100440 <cprintf+0xa0> 8010042d: 83 f8 25 cmp $0x25,%eax 80100430: 0f 84 a6 00 00 00 je 801004dc <cprintf+0x13c> 80100436: 83 f8 64 cmp $0x64,%eax 80100439: 74 14 je 8010044f <cprintf+0xaf> 8010043b: e9 aa 00 00 00 jmp 801004ea <cprintf+0x14a> 80100440: 83 f8 73 cmp $0x73,%eax 80100443: 74 57 je 8010049c <cprintf+0xfc> 80100445: 83 f8 78 cmp $0x78,%eax 80100448: 74 2d je 80100477 <cprintf+0xd7> 8010044a: e9 9b 00 00 00 jmp 801004ea <cprintf+0x14a> case 'd': printint(*argp++, 10, 1); 8010044f: 8b 45 f0 mov -0x10(%ebp),%eax 80100452: 8d 50 04 lea 0x4(%eax),%edx 80100455: 89 55 f0 mov %edx,-0x10(%ebp) 80100458: 8b 00 mov (%eax),%eax 8010045a: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 80100461: 00 80100462: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp) 80100469: 00 8010046a: 89 04 24 mov %eax,(%esp) 8010046d: e8 7f fe ff ff call 801002f1 <printint> break; 80100472: e9 8b 00 00 00 jmp 80100502 <cprintf+0x162> case 'x': case 'p': printint(*argp++, 16, 0); 80100477: 8b 45 f0 mov -0x10(%ebp),%eax 8010047a: 8d 50 04 lea 0x4(%eax),%edx 8010047d: 89 55 f0 mov %edx,-0x10(%ebp) 80100480: 8b 00 mov (%eax),%eax 80100482: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80100489: 00 8010048a: c7 44 24 04 10 00 00 movl $0x10,0x4(%esp) 80100491: 00 80100492: 89 04 24 mov %eax,(%esp) 80100495: e8 57 fe ff ff call 801002f1 <printint> break; 8010049a: eb 66 jmp 80100502 <cprintf+0x162> case 's': if((s = (char*)*argp++) == 0) 8010049c: 8b 45 f0 mov -0x10(%ebp),%eax 8010049f: 8d 50 04 lea 0x4(%eax),%edx 801004a2: 89 55 f0 mov %edx,-0x10(%ebp) 801004a5: 8b 00 mov (%eax),%eax 801004a7: 89 45 ec mov %eax,-0x14(%ebp) 801004aa: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 801004ae: 75 09 jne 801004b9 <cprintf+0x119> s = "(null)"; 801004b0: c7 45 ec d7 85 10 80 movl $0x801085d7,-0x14(%ebp) for(; *s; s++) 801004b7: eb 17 jmp 801004d0 <cprintf+0x130> 801004b9: eb 15 jmp 801004d0 <cprintf+0x130> consputc(*s); 801004bb: 8b 45 ec mov -0x14(%ebp),%eax 801004be: 0f b6 00 movzbl (%eax),%eax 801004c1: 0f be c0 movsbl %al,%eax 801004c4: 89 04 24 mov %eax,(%esp) 801004c7: e8 84 02 00 00 call 80100750 <consputc> printint(*argp++, 16, 0); break; case 's': if((s = (char*)*argp++) == 0) s = "(null)"; for(; *s; s++) 801004cc: 83 45 ec 01 addl $0x1,-0x14(%ebp) 801004d0: 8b 45 ec mov -0x14(%ebp),%eax 801004d3: 0f b6 00 movzbl (%eax),%eax 801004d6: 84 c0 test %al,%al 801004d8: 75 e1 jne 801004bb <cprintf+0x11b> consputc(*s); break; 801004da: eb 26 jmp 80100502 <cprintf+0x162> case '%': consputc('%'); 801004dc: c7 04 24 25 00 00 00 movl $0x25,(%esp) 801004e3: e8 68 02 00 00 call 80100750 <consputc> break; 801004e8: eb 18 jmp 80100502 <cprintf+0x162> default: // Print unknown % sequence to draw attention. consputc('%'); 801004ea: c7 04 24 25 00 00 00 movl $0x25,(%esp) 801004f1: e8 5a 02 00 00 call 80100750 <consputc> consputc(c); 801004f6: 8b 45 e4 mov -0x1c(%ebp),%eax 801004f9: 89 04 24 mov %eax,(%esp) 801004fc: e8 4f 02 00 00 call 80100750 <consputc> break; 80100501: 90 nop if (fmt == 0) panic("null fmt"); argp = (uint*)(void*)(&fmt + 1); for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ 80100502: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80100506: 8b 55 08 mov 0x8(%ebp),%edx 80100509: 8b 45 f4 mov -0xc(%ebp),%eax 8010050c: 01 d0 add %edx,%eax 8010050e: 0f b6 00 movzbl (%eax),%eax 80100511: 0f be c0 movsbl %al,%eax 80100514: 25 ff 00 00 00 and $0xff,%eax 80100519: 89 45 e4 mov %eax,-0x1c(%ebp) 8010051c: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 80100520: 0f 85 bf fe ff ff jne 801003e5 <cprintf+0x45> consputc(c); break; } } if(locking) 80100526: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) 8010052a: 74 0c je 80100538 <cprintf+0x198> release(&cons.lock); 8010052c: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp) 80100533: e8 14 4a 00 00 call 80104f4c <release> } 80100538: c9 leave 80100539: c3 ret 8010053a <panic>: void panic(char *s) { 8010053a: 55 push %ebp 8010053b: 89 e5 mov %esp,%ebp 8010053d: 83 ec 48 sub $0x48,%esp int i; uint pcs[10]; cli(); 80100540: e8 a6 fd ff ff call 801002eb <cli> cons.locking = 0; 80100545: c7 05 14 b6 10 80 00 movl $0x0,0x8010b614 8010054c: 00 00 00 cprintf("cpu%d: panic: ", cpu->id); 8010054f: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80100555: 0f b6 00 movzbl (%eax),%eax 80100558: 0f b6 c0 movzbl %al,%eax 8010055b: 89 44 24 04 mov %eax,0x4(%esp) 8010055f: c7 04 24 de 85 10 80 movl $0x801085de,(%esp) 80100566: e8 35 fe ff ff call 801003a0 <cprintf> cprintf(s); 8010056b: 8b 45 08 mov 0x8(%ebp),%eax 8010056e: 89 04 24 mov %eax,(%esp) 80100571: e8 2a fe ff ff call 801003a0 <cprintf> cprintf("\n"); 80100576: c7 04 24 ed 85 10 80 movl $0x801085ed,(%esp) 8010057d: e8 1e fe ff ff call 801003a0 <cprintf> getcallerpcs(&s, pcs); 80100582: 8d 45 cc lea -0x34(%ebp),%eax 80100585: 89 44 24 04 mov %eax,0x4(%esp) 80100589: 8d 45 08 lea 0x8(%ebp),%eax 8010058c: 89 04 24 mov %eax,(%esp) 8010058f: e8 07 4a 00 00 call 80104f9b <getcallerpcs> for(i=0; i<10; i++) 80100594: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 8010059b: eb 1b jmp 801005b8 <panic+0x7e> cprintf(" %p", pcs[i]); 8010059d: 8b 45 f4 mov -0xc(%ebp),%eax 801005a0: 8b 44 85 cc mov -0x34(%ebp,%eax,4),%eax 801005a4: 89 44 24 04 mov %eax,0x4(%esp) 801005a8: c7 04 24 ef 85 10 80 movl $0x801085ef,(%esp) 801005af: e8 ec fd ff ff call 801003a0 <cprintf> cons.locking = 0; cprintf("cpu%d: panic: ", cpu->id); cprintf(s); cprintf("\n"); getcallerpcs(&s, pcs); for(i=0; i<10; i++) 801005b4: 83 45 f4 01 addl $0x1,-0xc(%ebp) 801005b8: 83 7d f4 09 cmpl $0x9,-0xc(%ebp) 801005bc: 7e df jle 8010059d <panic+0x63> cprintf(" %p", pcs[i]); panicked = 1; // freeze other CPU 801005be: c7 05 c0 b5 10 80 01 movl $0x1,0x8010b5c0 801005c5: 00 00 00 for(;;) ; 801005c8: eb fe jmp 801005c8 <panic+0x8e> 801005ca <cgaputc>: #define CRTPORT 0x3d4 static ushort *crt = (ushort*)P2V(0xb8000); // CGA memory static void cgaputc(int c) { 801005ca: 55 push %ebp 801005cb: 89 e5 mov %esp,%ebp 801005cd: 83 ec 28 sub $0x28,%esp int pos; // Cursor position: col + 80*row. outb(CRTPORT, 14); 801005d0: c7 44 24 04 0e 00 00 movl $0xe,0x4(%esp) 801005d7: 00 801005d8: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp) 801005df: e8 e9 fc ff ff call 801002cd <outb> pos = inb(CRTPORT+1) << 8; 801005e4: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp) 801005eb: e8 c0 fc ff ff call 801002b0 <inb> 801005f0: 0f b6 c0 movzbl %al,%eax 801005f3: c1 e0 08 shl $0x8,%eax 801005f6: 89 45 f4 mov %eax,-0xc(%ebp) outb(CRTPORT, 15); 801005f9: c7 44 24 04 0f 00 00 movl $0xf,0x4(%esp) 80100600: 00 80100601: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp) 80100608: e8 c0 fc ff ff call 801002cd <outb> pos |= inb(CRTPORT+1); 8010060d: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp) 80100614: e8 97 fc ff ff call 801002b0 <inb> 80100619: 0f b6 c0 movzbl %al,%eax 8010061c: 09 45 f4 or %eax,-0xc(%ebp) if(c == '\n') 8010061f: 83 7d 08 0a cmpl $0xa,0x8(%ebp) 80100623: 75 30 jne 80100655 <cgaputc+0x8b> pos += 80 - pos%80; 80100625: 8b 4d f4 mov -0xc(%ebp),%ecx 80100628: ba 67 66 66 66 mov $0x66666667,%edx 8010062d: 89 c8 mov %ecx,%eax 8010062f: f7 ea imul %edx 80100631: c1 fa 05 sar $0x5,%edx 80100634: 89 c8 mov %ecx,%eax 80100636: c1 f8 1f sar $0x1f,%eax 80100639: 29 c2 sub %eax,%edx 8010063b: 89 d0 mov %edx,%eax 8010063d: c1 e0 02 shl $0x2,%eax 80100640: 01 d0 add %edx,%eax 80100642: c1 e0 04 shl $0x4,%eax 80100645: 29 c1 sub %eax,%ecx 80100647: 89 ca mov %ecx,%edx 80100649: b8 50 00 00 00 mov $0x50,%eax 8010064e: 29 d0 sub %edx,%eax 80100650: 01 45 f4 add %eax,-0xc(%ebp) 80100653: eb 35 jmp 8010068a <cgaputc+0xc0> else if(c == BACKSPACE){ 80100655: 81 7d 08 00 01 00 00 cmpl $0x100,0x8(%ebp) 8010065c: 75 0c jne 8010066a <cgaputc+0xa0> if(pos > 0) --pos; 8010065e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80100662: 7e 26 jle 8010068a <cgaputc+0xc0> 80100664: 83 6d f4 01 subl $0x1,-0xc(%ebp) 80100668: eb 20 jmp 8010068a <cgaputc+0xc0> } else crt[pos++] = (c&0xff) | 0x0700; // black on white 8010066a: 8b 0d 00 90 10 80 mov 0x80109000,%ecx 80100670: 8b 45 f4 mov -0xc(%ebp),%eax 80100673: 8d 50 01 lea 0x1(%eax),%edx 80100676: 89 55 f4 mov %edx,-0xc(%ebp) 80100679: 01 c0 add %eax,%eax 8010067b: 8d 14 01 lea (%ecx,%eax,1),%edx 8010067e: 8b 45 08 mov 0x8(%ebp),%eax 80100681: 0f b6 c0 movzbl %al,%eax 80100684: 80 cc 07 or $0x7,%ah 80100687: 66 89 02 mov %ax,(%edx) if((pos/80) >= 24){ // Scroll up. 8010068a: 81 7d f4 7f 07 00 00 cmpl $0x77f,-0xc(%ebp) 80100691: 7e 53 jle 801006e6 <cgaputc+0x11c> memmove(crt, crt+80, sizeof(crt[0])*23*80); 80100693: a1 00 90 10 80 mov 0x80109000,%eax 80100698: 8d 90 a0 00 00 00 lea 0xa0(%eax),%edx 8010069e: a1 00 90 10 80 mov 0x80109000,%eax 801006a3: c7 44 24 08 60 0e 00 movl $0xe60,0x8(%esp) 801006aa: 00 801006ab: 89 54 24 04 mov %edx,0x4(%esp) 801006af: 89 04 24 mov %eax,(%esp) 801006b2: e8 56 4b 00 00 call 8010520d <memmove> pos -= 80; 801006b7: 83 6d f4 50 subl $0x50,-0xc(%ebp) memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos)); 801006bb: b8 80 07 00 00 mov $0x780,%eax 801006c0: 2b 45 f4 sub -0xc(%ebp),%eax 801006c3: 8d 14 00 lea (%eax,%eax,1),%edx 801006c6: a1 00 90 10 80 mov 0x80109000,%eax 801006cb: 8b 4d f4 mov -0xc(%ebp),%ecx 801006ce: 01 c9 add %ecx,%ecx 801006d0: 01 c8 add %ecx,%eax 801006d2: 89 54 24 08 mov %edx,0x8(%esp) 801006d6: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801006dd: 00 801006de: 89 04 24 mov %eax,(%esp) 801006e1: e8 58 4a 00 00 call 8010513e <memset> } outb(CRTPORT, 14); 801006e6: c7 44 24 04 0e 00 00 movl $0xe,0x4(%esp) 801006ed: 00 801006ee: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp) 801006f5: e8 d3 fb ff ff call 801002cd <outb> outb(CRTPORT+1, pos>>8); 801006fa: 8b 45 f4 mov -0xc(%ebp),%eax 801006fd: c1 f8 08 sar $0x8,%eax 80100700: 0f b6 c0 movzbl %al,%eax 80100703: 89 44 24 04 mov %eax,0x4(%esp) 80100707: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp) 8010070e: e8 ba fb ff ff call 801002cd <outb> outb(CRTPORT, 15); 80100713: c7 44 24 04 0f 00 00 movl $0xf,0x4(%esp) 8010071a: 00 8010071b: c7 04 24 d4 03 00 00 movl $0x3d4,(%esp) 80100722: e8 a6 fb ff ff call 801002cd <outb> outb(CRTPORT+1, pos); 80100727: 8b 45 f4 mov -0xc(%ebp),%eax 8010072a: 0f b6 c0 movzbl %al,%eax 8010072d: 89 44 24 04 mov %eax,0x4(%esp) 80100731: c7 04 24 d5 03 00 00 movl $0x3d5,(%esp) 80100738: e8 90 fb ff ff call 801002cd <outb> crt[pos] = ' ' | 0x0700; 8010073d: a1 00 90 10 80 mov 0x80109000,%eax 80100742: 8b 55 f4 mov -0xc(%ebp),%edx 80100745: 01 d2 add %edx,%edx 80100747: 01 d0 add %edx,%eax 80100749: 66 c7 00 20 07 movw $0x720,(%eax) } 8010074e: c9 leave 8010074f: c3 ret 80100750 <consputc>: void consputc(int c) { 80100750: 55 push %ebp 80100751: 89 e5 mov %esp,%ebp 80100753: 83 ec 18 sub $0x18,%esp if(panicked){ 80100756: a1 c0 b5 10 80 mov 0x8010b5c0,%eax 8010075b: 85 c0 test %eax,%eax 8010075d: 74 07 je 80100766 <consputc+0x16> cli(); 8010075f: e8 87 fb ff ff call 801002eb <cli> for(;;) ; 80100764: eb fe jmp 80100764 <consputc+0x14> } if(c == BACKSPACE){ 80100766: 81 7d 08 00 01 00 00 cmpl $0x100,0x8(%ebp) 8010076d: 75 26 jne 80100795 <consputc+0x45> uartputc('\b'); uartputc(' '); uartputc('\b'); 8010076f: c7 04 24 08 00 00 00 movl $0x8,(%esp) 80100776: e8 6f 64 00 00 call 80106bea <uartputc> 8010077b: c7 04 24 20 00 00 00 movl $0x20,(%esp) 80100782: e8 63 64 00 00 call 80106bea <uartputc> 80100787: c7 04 24 08 00 00 00 movl $0x8,(%esp) 8010078e: e8 57 64 00 00 call 80106bea <uartputc> 80100793: eb 0b jmp 801007a0 <consputc+0x50> } else uartputc(c); 80100795: 8b 45 08 mov 0x8(%ebp),%eax 80100798: 89 04 24 mov %eax,(%esp) 8010079b: e8 4a 64 00 00 call 80106bea <uartputc> cgaputc(c); 801007a0: 8b 45 08 mov 0x8(%ebp),%eax 801007a3: 89 04 24 mov %eax,(%esp) 801007a6: e8 1f fe ff ff call 801005ca <cgaputc> } 801007ab: c9 leave 801007ac: c3 ret 801007ad <consoleintr>: #define C(x) ((x)-'@') // Control-x void consoleintr(int (*getc)(void)) { 801007ad: 55 push %ebp 801007ae: 89 e5 mov %esp,%ebp 801007b0: 83 ec 28 sub $0x28,%esp int c; acquire(&input.lock); 801007b3: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 801007ba: e8 2b 47 00 00 call 80104eea <acquire> while((c = getc()) >= 0){ 801007bf: e9 37 01 00 00 jmp 801008fb <consoleintr+0x14e> switch(c){ 801007c4: 8b 45 f4 mov -0xc(%ebp),%eax 801007c7: 83 f8 10 cmp $0x10,%eax 801007ca: 74 1e je 801007ea <consoleintr+0x3d> 801007cc: 83 f8 10 cmp $0x10,%eax 801007cf: 7f 0a jg 801007db <consoleintr+0x2e> 801007d1: 83 f8 08 cmp $0x8,%eax 801007d4: 74 64 je 8010083a <consoleintr+0x8d> 801007d6: e9 91 00 00 00 jmp 8010086c <consoleintr+0xbf> 801007db: 83 f8 15 cmp $0x15,%eax 801007de: 74 2f je 8010080f <consoleintr+0x62> 801007e0: 83 f8 7f cmp $0x7f,%eax 801007e3: 74 55 je 8010083a <consoleintr+0x8d> 801007e5: e9 82 00 00 00 jmp 8010086c <consoleintr+0xbf> case C('P'): // Process listing. procdump(); 801007ea: e8 62 45 00 00 call 80104d51 <procdump> break; 801007ef: e9 07 01 00 00 jmp 801008fb <consoleintr+0x14e> case C('U'): // Kill line. while(input.e != input.w && input.buf[(input.e-1) % INPUT_BUF] != '\n'){ input.e--; 801007f4: a1 7c de 10 80 mov 0x8010de7c,%eax 801007f9: 83 e8 01 sub $0x1,%eax 801007fc: a3 7c de 10 80 mov %eax,0x8010de7c consputc(BACKSPACE); 80100801: c7 04 24 00 01 00 00 movl $0x100,(%esp) 80100808: e8 43 ff ff ff call 80100750 <consputc> 8010080d: eb 01 jmp 80100810 <consoleintr+0x63> switch(c){ case C('P'): // Process listing. procdump(); break; case C('U'): // Kill line. while(input.e != input.w && 8010080f: 90 nop 80100810: 8b 15 7c de 10 80 mov 0x8010de7c,%edx 80100816: a1 78 de 10 80 mov 0x8010de78,%eax 8010081b: 39 c2 cmp %eax,%edx 8010081d: 74 16 je 80100835 <consoleintr+0x88> input.buf[(input.e-1) % INPUT_BUF] != '\n'){ 8010081f: a1 7c de 10 80 mov 0x8010de7c,%eax 80100824: 83 e8 01 sub $0x1,%eax 80100827: 83 e0 7f and $0x7f,%eax 8010082a: 0f b6 80 f4 dd 10 80 movzbl -0x7fef220c(%eax),%eax switch(c){ case C('P'): // Process listing. procdump(); break; case C('U'): // Kill line. while(input.e != input.w && 80100831: 3c 0a cmp $0xa,%al 80100833: 75 bf jne 801007f4 <consoleintr+0x47> input.buf[(input.e-1) % INPUT_BUF] != '\n'){ input.e--; consputc(BACKSPACE); } break; 80100835: e9 c1 00 00 00 jmp 801008fb <consoleintr+0x14e> case C('H'): case '\x7f': // Backspace if(input.e != input.w){ 8010083a: 8b 15 7c de 10 80 mov 0x8010de7c,%edx 80100840: a1 78 de 10 80 mov 0x8010de78,%eax 80100845: 39 c2 cmp %eax,%edx 80100847: 74 1e je 80100867 <consoleintr+0xba> input.e--; 80100849: a1 7c de 10 80 mov 0x8010de7c,%eax 8010084e: 83 e8 01 sub $0x1,%eax 80100851: a3 7c de 10 80 mov %eax,0x8010de7c consputc(BACKSPACE); 80100856: c7 04 24 00 01 00 00 movl $0x100,(%esp) 8010085d: e8 ee fe ff ff call 80100750 <consputc> } break; 80100862: e9 94 00 00 00 jmp 801008fb <consoleintr+0x14e> 80100867: e9 8f 00 00 00 jmp 801008fb <consoleintr+0x14e> default: if(c != 0 && input.e-input.r < INPUT_BUF){ 8010086c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80100870: 0f 84 84 00 00 00 je 801008fa <consoleintr+0x14d> 80100876: 8b 15 7c de 10 80 mov 0x8010de7c,%edx 8010087c: a1 74 de 10 80 mov 0x8010de74,%eax 80100881: 29 c2 sub %eax,%edx 80100883: 89 d0 mov %edx,%eax 80100885: 83 f8 7f cmp $0x7f,%eax 80100888: 77 70 ja 801008fa <consoleintr+0x14d> c = (c == '\r') ? '\n' : c; 8010088a: 83 7d f4 0d cmpl $0xd,-0xc(%ebp) 8010088e: 74 05 je 80100895 <consoleintr+0xe8> 80100890: 8b 45 f4 mov -0xc(%ebp),%eax 80100893: eb 05 jmp 8010089a <consoleintr+0xed> 80100895: b8 0a 00 00 00 mov $0xa,%eax 8010089a: 89 45 f4 mov %eax,-0xc(%ebp) input.buf[input.e++ % INPUT_BUF] = c; 8010089d: a1 7c de 10 80 mov 0x8010de7c,%eax 801008a2: 8d 50 01 lea 0x1(%eax),%edx 801008a5: 89 15 7c de 10 80 mov %edx,0x8010de7c 801008ab: 83 e0 7f and $0x7f,%eax 801008ae: 89 c2 mov %eax,%edx 801008b0: 8b 45 f4 mov -0xc(%ebp),%eax 801008b3: 88 82 f4 dd 10 80 mov %al,-0x7fef220c(%edx) consputc(c); 801008b9: 8b 45 f4 mov -0xc(%ebp),%eax 801008bc: 89 04 24 mov %eax,(%esp) 801008bf: e8 8c fe ff ff call 80100750 <consputc> if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){ 801008c4: 83 7d f4 0a cmpl $0xa,-0xc(%ebp) 801008c8: 74 18 je 801008e2 <consoleintr+0x135> 801008ca: 83 7d f4 04 cmpl $0x4,-0xc(%ebp) 801008ce: 74 12 je 801008e2 <consoleintr+0x135> 801008d0: a1 7c de 10 80 mov 0x8010de7c,%eax 801008d5: 8b 15 74 de 10 80 mov 0x8010de74,%edx 801008db: 83 ea 80 sub $0xffffff80,%edx 801008de: 39 d0 cmp %edx,%eax 801008e0: 75 18 jne 801008fa <consoleintr+0x14d> input.w = input.e; 801008e2: a1 7c de 10 80 mov 0x8010de7c,%eax 801008e7: a3 78 de 10 80 mov %eax,0x8010de78 wakeup(&input.r); 801008ec: c7 04 24 74 de 10 80 movl $0x8010de74,(%esp) 801008f3: e8 b3 43 00 00 call 80104cab <wakeup> } } break; 801008f8: eb 00 jmp 801008fa <consoleintr+0x14d> 801008fa: 90 nop consoleintr(int (*getc)(void)) { int c; acquire(&input.lock); while((c = getc()) >= 0){ 801008fb: 8b 45 08 mov 0x8(%ebp),%eax 801008fe: ff d0 call *%eax 80100900: 89 45 f4 mov %eax,-0xc(%ebp) 80100903: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80100907: 0f 89 b7 fe ff ff jns 801007c4 <consoleintr+0x17> } } break; } } release(&input.lock); 8010090d: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 80100914: e8 33 46 00 00 call 80104f4c <release> } 80100919: c9 leave 8010091a: c3 ret 8010091b <consoleread>: int consoleread(struct inode *ip, char *dst, int n) { 8010091b: 55 push %ebp 8010091c: 89 e5 mov %esp,%ebp 8010091e: 83 ec 28 sub $0x28,%esp uint target; int c; iunlock(ip); 80100921: 8b 45 08 mov 0x8(%ebp),%eax 80100924: 89 04 24 mov %eax,(%esp) 80100927: e8 75 10 00 00 call 801019a1 <iunlock> target = n; 8010092c: 8b 45 10 mov 0x10(%ebp),%eax 8010092f: 89 45 f4 mov %eax,-0xc(%ebp) acquire(&input.lock); 80100932: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 80100939: e8 ac 45 00 00 call 80104eea <acquire> while(n > 0){ 8010093e: e9 aa 00 00 00 jmp 801009ed <consoleread+0xd2> while(input.r == input.w){ 80100943: eb 42 jmp 80100987 <consoleread+0x6c> if(proc->killed){ 80100945: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010094b: 8b 40 24 mov 0x24(%eax),%eax 8010094e: 85 c0 test %eax,%eax 80100950: 74 21 je 80100973 <consoleread+0x58> release(&input.lock); 80100952: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 80100959: e8 ee 45 00 00 call 80104f4c <release> ilock(ip); 8010095e: 8b 45 08 mov 0x8(%ebp),%eax 80100961: 89 04 24 mov %eax,(%esp) 80100964: e8 ea 0e 00 00 call 80101853 <ilock> return -1; 80100969: b8 ff ff ff ff mov $0xffffffff,%eax 8010096e: e9 a5 00 00 00 jmp 80100a18 <consoleread+0xfd> } sleep(&input.r, &input.lock); 80100973: c7 44 24 04 c0 dd 10 movl $0x8010ddc0,0x4(%esp) 8010097a: 80 8010097b: c7 04 24 74 de 10 80 movl $0x8010de74,(%esp) 80100982: e8 e0 41 00 00 call 80104b67 <sleep> iunlock(ip); target = n; acquire(&input.lock); while(n > 0){ while(input.r == input.w){ 80100987: 8b 15 74 de 10 80 mov 0x8010de74,%edx 8010098d: a1 78 de 10 80 mov 0x8010de78,%eax 80100992: 39 c2 cmp %eax,%edx 80100994: 74 af je 80100945 <consoleread+0x2a> ilock(ip); return -1; } sleep(&input.r, &input.lock); } c = input.buf[input.r++ % INPUT_BUF]; 80100996: a1 74 de 10 80 mov 0x8010de74,%eax 8010099b: 8d 50 01 lea 0x1(%eax),%edx 8010099e: 89 15 74 de 10 80 mov %edx,0x8010de74 801009a4: 83 e0 7f and $0x7f,%eax 801009a7: 0f b6 80 f4 dd 10 80 movzbl -0x7fef220c(%eax),%eax 801009ae: 0f be c0 movsbl %al,%eax 801009b1: 89 45 f0 mov %eax,-0x10(%ebp) if(c == C('D')){ // EOF 801009b4: 83 7d f0 04 cmpl $0x4,-0x10(%ebp) 801009b8: 75 19 jne 801009d3 <consoleread+0xb8> if(n < target){ 801009ba: 8b 45 10 mov 0x10(%ebp),%eax 801009bd: 3b 45 f4 cmp -0xc(%ebp),%eax 801009c0: 73 0f jae 801009d1 <consoleread+0xb6> // Save ^D for next time, to make sure // caller gets a 0-byte result. input.r--; 801009c2: a1 74 de 10 80 mov 0x8010de74,%eax 801009c7: 83 e8 01 sub $0x1,%eax 801009ca: a3 74 de 10 80 mov %eax,0x8010de74 } break; 801009cf: eb 26 jmp 801009f7 <consoleread+0xdc> 801009d1: eb 24 jmp 801009f7 <consoleread+0xdc> } *dst++ = c; 801009d3: 8b 45 0c mov 0xc(%ebp),%eax 801009d6: 8d 50 01 lea 0x1(%eax),%edx 801009d9: 89 55 0c mov %edx,0xc(%ebp) 801009dc: 8b 55 f0 mov -0x10(%ebp),%edx 801009df: 88 10 mov %dl,(%eax) --n; 801009e1: 83 6d 10 01 subl $0x1,0x10(%ebp) if(c == '\n') 801009e5: 83 7d f0 0a cmpl $0xa,-0x10(%ebp) 801009e9: 75 02 jne 801009ed <consoleread+0xd2> break; 801009eb: eb 0a jmp 801009f7 <consoleread+0xdc> int c; iunlock(ip); target = n; acquire(&input.lock); while(n > 0){ 801009ed: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801009f1: 0f 8f 4c ff ff ff jg 80100943 <consoleread+0x28> *dst++ = c; --n; if(c == '\n') break; } release(&input.lock); 801009f7: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 801009fe: e8 49 45 00 00 call 80104f4c <release> ilock(ip); 80100a03: 8b 45 08 mov 0x8(%ebp),%eax 80100a06: 89 04 24 mov %eax,(%esp) 80100a09: e8 45 0e 00 00 call 80101853 <ilock> return target - n; 80100a0e: 8b 45 10 mov 0x10(%ebp),%eax 80100a11: 8b 55 f4 mov -0xc(%ebp),%edx 80100a14: 29 c2 sub %eax,%edx 80100a16: 89 d0 mov %edx,%eax } 80100a18: c9 leave 80100a19: c3 ret 80100a1a <consolewrite>: int consolewrite(struct inode *ip, char *buf, int n) { 80100a1a: 55 push %ebp 80100a1b: 89 e5 mov %esp,%ebp 80100a1d: 83 ec 28 sub $0x28,%esp int i; iunlock(ip); 80100a20: 8b 45 08 mov 0x8(%ebp),%eax 80100a23: 89 04 24 mov %eax,(%esp) 80100a26: e8 76 0f 00 00 call 801019a1 <iunlock> acquire(&cons.lock); 80100a2b: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp) 80100a32: e8 b3 44 00 00 call 80104eea <acquire> for(i = 0; i < n; i++) 80100a37: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80100a3e: eb 1d jmp 80100a5d <consolewrite+0x43> consputc(buf[i] & 0xff); 80100a40: 8b 55 f4 mov -0xc(%ebp),%edx 80100a43: 8b 45 0c mov 0xc(%ebp),%eax 80100a46: 01 d0 add %edx,%eax 80100a48: 0f b6 00 movzbl (%eax),%eax 80100a4b: 0f be c0 movsbl %al,%eax 80100a4e: 0f b6 c0 movzbl %al,%eax 80100a51: 89 04 24 mov %eax,(%esp) 80100a54: e8 f7 fc ff ff call 80100750 <consputc> { int i; iunlock(ip); acquire(&cons.lock); for(i = 0; i < n; i++) 80100a59: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80100a5d: 8b 45 f4 mov -0xc(%ebp),%eax 80100a60: 3b 45 10 cmp 0x10(%ebp),%eax 80100a63: 7c db jl 80100a40 <consolewrite+0x26> consputc(buf[i] & 0xff); release(&cons.lock); 80100a65: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp) 80100a6c: e8 db 44 00 00 call 80104f4c <release> ilock(ip); 80100a71: 8b 45 08 mov 0x8(%ebp),%eax 80100a74: 89 04 24 mov %eax,(%esp) 80100a77: e8 d7 0d 00 00 call 80101853 <ilock> return n; 80100a7c: 8b 45 10 mov 0x10(%ebp),%eax } 80100a7f: c9 leave 80100a80: c3 ret 80100a81 <consoleinit>: void consoleinit(void) { 80100a81: 55 push %ebp 80100a82: 89 e5 mov %esp,%ebp 80100a84: 83 ec 18 sub $0x18,%esp initlock(&cons.lock, "console"); 80100a87: c7 44 24 04 f3 85 10 movl $0x801085f3,0x4(%esp) 80100a8e: 80 80100a8f: c7 04 24 e0 b5 10 80 movl $0x8010b5e0,(%esp) 80100a96: e8 2e 44 00 00 call 80104ec9 <initlock> initlock(&input.lock, "input"); 80100a9b: c7 44 24 04 fb 85 10 movl $0x801085fb,0x4(%esp) 80100aa2: 80 80100aa3: c7 04 24 c0 dd 10 80 movl $0x8010ddc0,(%esp) 80100aaa: e8 1a 44 00 00 call 80104ec9 <initlock> devsw[CONSOLE].write = consolewrite; 80100aaf: c7 05 2c e8 10 80 1a movl $0x80100a1a,0x8010e82c 80100ab6: 0a 10 80 devsw[CONSOLE].read = consoleread; 80100ab9: c7 05 28 e8 10 80 1b movl $0x8010091b,0x8010e828 80100ac0: 09 10 80 cons.locking = 1; 80100ac3: c7 05 14 b6 10 80 01 movl $0x1,0x8010b614 80100aca: 00 00 00 picenable(IRQ_KBD); 80100acd: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80100ad4: e8 81 2f 00 00 call 80103a5a <picenable> ioapicenable(IRQ_KBD, 0); 80100ad9: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80100ae0: 00 80100ae1: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80100ae8: e8 68 1e 00 00 call 80102955 <ioapicenable> } 80100aed: c9 leave 80100aee: c3 ret 80100aef <exec>: #include "x86.h" #include "elf.h" int exec(char *path, char **argv) { 80100aef: 55 push %ebp 80100af0: 89 e5 mov %esp,%ebp 80100af2: 81 ec 38 01 00 00 sub $0x138,%esp struct elfhdr elf; struct inode *ip; struct proghdr ph; pde_t *pgdir, *oldpgdir; if((ip = namei(path)) == 0) 80100af8: 8b 45 08 mov 0x8(%ebp),%eax 80100afb: 89 04 24 mov %eax,(%esp) 80100afe: e8 fb 18 00 00 call 801023fe <namei> 80100b03: 89 45 d8 mov %eax,-0x28(%ebp) 80100b06: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 80100b0a: 75 0a jne 80100b16 <exec+0x27> return -1; 80100b0c: b8 ff ff ff ff mov $0xffffffff,%eax 80100b11: e9 ea 03 00 00 jmp 80100f00 <exec+0x411> ilock(ip); 80100b16: 8b 45 d8 mov -0x28(%ebp),%eax 80100b19: 89 04 24 mov %eax,(%esp) 80100b1c: e8 32 0d 00 00 call 80101853 <ilock> pgdir = 0; 80100b21: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) // Check ELF header if(readi(ip, (char*)&elf, 0, sizeof(elf)) < sizeof(elf)) 80100b28: c7 44 24 0c 34 00 00 movl $0x34,0xc(%esp) 80100b2f: 00 80100b30: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80100b37: 00 80100b38: 8d 85 0c ff ff ff lea -0xf4(%ebp),%eax 80100b3e: 89 44 24 04 mov %eax,0x4(%esp) 80100b42: 8b 45 d8 mov -0x28(%ebp),%eax 80100b45: 89 04 24 mov %eax,(%esp) 80100b48: e8 13 12 00 00 call 80101d60 <readi> 80100b4d: 83 f8 33 cmp $0x33,%eax 80100b50: 77 05 ja 80100b57 <exec+0x68> goto bad; 80100b52: e9 82 03 00 00 jmp 80100ed9 <exec+0x3ea> if(elf.magic != ELF_MAGIC) 80100b57: 8b 85 0c ff ff ff mov -0xf4(%ebp),%eax 80100b5d: 3d 7f 45 4c 46 cmp $0x464c457f,%eax 80100b62: 74 05 je 80100b69 <exec+0x7a> goto bad; 80100b64: e9 70 03 00 00 jmp 80100ed9 <exec+0x3ea> if((pgdir = setupkvm()) == 0) 80100b69: e8 cd 71 00 00 call 80107d3b <setupkvm> 80100b6e: 89 45 d4 mov %eax,-0x2c(%ebp) 80100b71: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 80100b75: 75 05 jne 80100b7c <exec+0x8d> goto bad; 80100b77: e9 5d 03 00 00 jmp 80100ed9 <exec+0x3ea> // Load program into memory. sz = 0; 80100b7c: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ 80100b83: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) 80100b8a: 8b 85 28 ff ff ff mov -0xd8(%ebp),%eax 80100b90: 89 45 e8 mov %eax,-0x18(%ebp) 80100b93: e9 cb 00 00 00 jmp 80100c63 <exec+0x174> if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph)) 80100b98: 8b 45 e8 mov -0x18(%ebp),%eax 80100b9b: c7 44 24 0c 20 00 00 movl $0x20,0xc(%esp) 80100ba2: 00 80100ba3: 89 44 24 08 mov %eax,0x8(%esp) 80100ba7: 8d 85 ec fe ff ff lea -0x114(%ebp),%eax 80100bad: 89 44 24 04 mov %eax,0x4(%esp) 80100bb1: 8b 45 d8 mov -0x28(%ebp),%eax 80100bb4: 89 04 24 mov %eax,(%esp) 80100bb7: e8 a4 11 00 00 call 80101d60 <readi> 80100bbc: 83 f8 20 cmp $0x20,%eax 80100bbf: 74 05 je 80100bc6 <exec+0xd7> goto bad; 80100bc1: e9 13 03 00 00 jmp 80100ed9 <exec+0x3ea> if(ph.type != ELF_PROG_LOAD) 80100bc6: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax 80100bcc: 83 f8 01 cmp $0x1,%eax 80100bcf: 74 05 je 80100bd6 <exec+0xe7> continue; 80100bd1: e9 80 00 00 00 jmp 80100c56 <exec+0x167> if(ph.memsz < ph.filesz) 80100bd6: 8b 95 00 ff ff ff mov -0x100(%ebp),%edx 80100bdc: 8b 85 fc fe ff ff mov -0x104(%ebp),%eax 80100be2: 39 c2 cmp %eax,%edx 80100be4: 73 05 jae 80100beb <exec+0xfc> goto bad; 80100be6: e9 ee 02 00 00 jmp 80100ed9 <exec+0x3ea> if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0) 80100beb: 8b 95 f4 fe ff ff mov -0x10c(%ebp),%edx 80100bf1: 8b 85 00 ff ff ff mov -0x100(%ebp),%eax 80100bf7: 01 d0 add %edx,%eax 80100bf9: 89 44 24 08 mov %eax,0x8(%esp) 80100bfd: 8b 45 e0 mov -0x20(%ebp),%eax 80100c00: 89 44 24 04 mov %eax,0x4(%esp) 80100c04: 8b 45 d4 mov -0x2c(%ebp),%eax 80100c07: 89 04 24 mov %eax,(%esp) 80100c0a: e8 fa 74 00 00 call 80108109 <allocuvm> 80100c0f: 89 45 e0 mov %eax,-0x20(%ebp) 80100c12: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 80100c16: 75 05 jne 80100c1d <exec+0x12e> goto bad; 80100c18: e9 bc 02 00 00 jmp 80100ed9 <exec+0x3ea> if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0) 80100c1d: 8b 8d fc fe ff ff mov -0x104(%ebp),%ecx 80100c23: 8b 95 f0 fe ff ff mov -0x110(%ebp),%edx 80100c29: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax 80100c2f: 89 4c 24 10 mov %ecx,0x10(%esp) 80100c33: 89 54 24 0c mov %edx,0xc(%esp) 80100c37: 8b 55 d8 mov -0x28(%ebp),%edx 80100c3a: 89 54 24 08 mov %edx,0x8(%esp) 80100c3e: 89 44 24 04 mov %eax,0x4(%esp) 80100c42: 8b 45 d4 mov -0x2c(%ebp),%eax 80100c45: 89 04 24 mov %eax,(%esp) 80100c48: e8 d1 73 00 00 call 8010801e <loaduvm> 80100c4d: 85 c0 test %eax,%eax 80100c4f: 79 05 jns 80100c56 <exec+0x167> goto bad; 80100c51: e9 83 02 00 00 jmp 80100ed9 <exec+0x3ea> if((pgdir = setupkvm()) == 0) goto bad; // Load program into memory. sz = 0; for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ 80100c56: 83 45 ec 01 addl $0x1,-0x14(%ebp) 80100c5a: 8b 45 e8 mov -0x18(%ebp),%eax 80100c5d: 83 c0 20 add $0x20,%eax 80100c60: 89 45 e8 mov %eax,-0x18(%ebp) 80100c63: 0f b7 85 38 ff ff ff movzwl -0xc8(%ebp),%eax 80100c6a: 0f b7 c0 movzwl %ax,%eax 80100c6d: 3b 45 ec cmp -0x14(%ebp),%eax 80100c70: 0f 8f 22 ff ff ff jg 80100b98 <exec+0xa9> if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0) goto bad; if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0) goto bad; } iunlockput(ip); 80100c76: 8b 45 d8 mov -0x28(%ebp),%eax 80100c79: 89 04 24 mov %eax,(%esp) 80100c7c: e8 56 0e 00 00 call 80101ad7 <iunlockput> ip = 0; 80100c81: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) // Allocate two pages at the next page boundary. // Make the first inaccessible. Use the second as the user stack. sz = PGROUNDUP(sz); 80100c88: 8b 45 e0 mov -0x20(%ebp),%eax 80100c8b: 05 ff 0f 00 00 add $0xfff,%eax 80100c90: 25 00 f0 ff ff and $0xfffff000,%eax 80100c95: 89 45 e0 mov %eax,-0x20(%ebp) if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0) 80100c98: 8b 45 e0 mov -0x20(%ebp),%eax 80100c9b: 05 00 20 00 00 add $0x2000,%eax 80100ca0: 89 44 24 08 mov %eax,0x8(%esp) 80100ca4: 8b 45 e0 mov -0x20(%ebp),%eax 80100ca7: 89 44 24 04 mov %eax,0x4(%esp) 80100cab: 8b 45 d4 mov -0x2c(%ebp),%eax 80100cae: 89 04 24 mov %eax,(%esp) 80100cb1: e8 53 74 00 00 call 80108109 <allocuvm> 80100cb6: 89 45 e0 mov %eax,-0x20(%ebp) 80100cb9: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 80100cbd: 75 05 jne 80100cc4 <exec+0x1d5> goto bad; 80100cbf: e9 15 02 00 00 jmp 80100ed9 <exec+0x3ea> proc->pstack = (uint *)sz; 80100cc4: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100cca: 8b 55 e0 mov -0x20(%ebp),%edx 80100ccd: 89 50 7c mov %edx,0x7c(%eax) clearpteu(pgdir, (char*)(sz - 2*PGSIZE)); 80100cd0: 8b 45 e0 mov -0x20(%ebp),%eax 80100cd3: 2d 00 20 00 00 sub $0x2000,%eax 80100cd8: 89 44 24 04 mov %eax,0x4(%esp) 80100cdc: 8b 45 d4 mov -0x2c(%ebp),%eax 80100cdf: 89 04 24 mov %eax,(%esp) 80100ce2: e8 52 76 00 00 call 80108339 <clearpteu> sp = sz; 80100ce7: 8b 45 e0 mov -0x20(%ebp),%eax 80100cea: 89 45 dc mov %eax,-0x24(%ebp) // Push argument strings, prepare rest of stack in ustack. for(argc = 0; argv[argc]; argc++) { 80100ced: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 80100cf4: e9 9a 00 00 00 jmp 80100d93 <exec+0x2a4> if(argc >= MAXARG) 80100cf9: 83 7d e4 1f cmpl $0x1f,-0x1c(%ebp) 80100cfd: 76 05 jbe 80100d04 <exec+0x215> goto bad; 80100cff: e9 d5 01 00 00 jmp 80100ed9 <exec+0x3ea> sp = (sp - (strlen(argv[argc]) + 1)) & ~3; 80100d04: 8b 45 e4 mov -0x1c(%ebp),%eax 80100d07: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80100d0e: 8b 45 0c mov 0xc(%ebp),%eax 80100d11: 01 d0 add %edx,%eax 80100d13: 8b 00 mov (%eax),%eax 80100d15: 89 04 24 mov %eax,(%esp) 80100d18: e8 8b 46 00 00 call 801053a8 <strlen> 80100d1d: 8b 55 dc mov -0x24(%ebp),%edx 80100d20: 29 c2 sub %eax,%edx 80100d22: 89 d0 mov %edx,%eax 80100d24: 83 e8 01 sub $0x1,%eax 80100d27: 83 e0 fc and $0xfffffffc,%eax 80100d2a: 89 45 dc mov %eax,-0x24(%ebp) if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) 80100d2d: 8b 45 e4 mov -0x1c(%ebp),%eax 80100d30: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80100d37: 8b 45 0c mov 0xc(%ebp),%eax 80100d3a: 01 d0 add %edx,%eax 80100d3c: 8b 00 mov (%eax),%eax 80100d3e: 89 04 24 mov %eax,(%esp) 80100d41: e8 62 46 00 00 call 801053a8 <strlen> 80100d46: 83 c0 01 add $0x1,%eax 80100d49: 89 c2 mov %eax,%edx 80100d4b: 8b 45 e4 mov -0x1c(%ebp),%eax 80100d4e: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 80100d55: 8b 45 0c mov 0xc(%ebp),%eax 80100d58: 01 c8 add %ecx,%eax 80100d5a: 8b 00 mov (%eax),%eax 80100d5c: 89 54 24 0c mov %edx,0xc(%esp) 80100d60: 89 44 24 08 mov %eax,0x8(%esp) 80100d64: 8b 45 dc mov -0x24(%ebp),%eax 80100d67: 89 44 24 04 mov %eax,0x4(%esp) 80100d6b: 8b 45 d4 mov -0x2c(%ebp),%eax 80100d6e: 89 04 24 mov %eax,(%esp) 80100d71: e8 88 77 00 00 call 801084fe <copyout> 80100d76: 85 c0 test %eax,%eax 80100d78: 79 05 jns 80100d7f <exec+0x290> goto bad; 80100d7a: e9 5a 01 00 00 jmp 80100ed9 <exec+0x3ea> ustack[3+argc] = sp; 80100d7f: 8b 45 e4 mov -0x1c(%ebp),%eax 80100d82: 8d 50 03 lea 0x3(%eax),%edx 80100d85: 8b 45 dc mov -0x24(%ebp),%eax 80100d88: 89 84 95 40 ff ff ff mov %eax,-0xc0(%ebp,%edx,4) clearpteu(pgdir, (char*)(sz - 2*PGSIZE)); sp = sz; // Push argument strings, prepare rest of stack in ustack. for(argc = 0; argv[argc]; argc++) { 80100d8f: 83 45 e4 01 addl $0x1,-0x1c(%ebp) 80100d93: 8b 45 e4 mov -0x1c(%ebp),%eax 80100d96: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80100d9d: 8b 45 0c mov 0xc(%ebp),%eax 80100da0: 01 d0 add %edx,%eax 80100da2: 8b 00 mov (%eax),%eax 80100da4: 85 c0 test %eax,%eax 80100da6: 0f 85 4d ff ff ff jne 80100cf9 <exec+0x20a> 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; 80100dac: 8b 45 e4 mov -0x1c(%ebp),%eax 80100daf: 83 c0 03 add $0x3,%eax 80100db2: c7 84 85 40 ff ff ff movl $0x0,-0xc0(%ebp,%eax,4) 80100db9: 00 00 00 00 ustack[0] = 0xffffffff; // fake return PC 80100dbd: c7 85 40 ff ff ff ff movl $0xffffffff,-0xc0(%ebp) 80100dc4: ff ff ff ustack[1] = argc; 80100dc7: 8b 45 e4 mov -0x1c(%ebp),%eax 80100dca: 89 85 44 ff ff ff mov %eax,-0xbc(%ebp) ustack[2] = sp - (argc+1)*4; // argv pointer 80100dd0: 8b 45 e4 mov -0x1c(%ebp),%eax 80100dd3: 83 c0 01 add $0x1,%eax 80100dd6: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80100ddd: 8b 45 dc mov -0x24(%ebp),%eax 80100de0: 29 d0 sub %edx,%eax 80100de2: 89 85 48 ff ff ff mov %eax,-0xb8(%ebp) sp -= (3+argc+1) * 4; 80100de8: 8b 45 e4 mov -0x1c(%ebp),%eax 80100deb: 83 c0 04 add $0x4,%eax 80100dee: c1 e0 02 shl $0x2,%eax 80100df1: 29 45 dc sub %eax,-0x24(%ebp) if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100df4: 8b 45 e4 mov -0x1c(%ebp),%eax 80100df7: 83 c0 04 add $0x4,%eax 80100dfa: c1 e0 02 shl $0x2,%eax 80100dfd: 89 44 24 0c mov %eax,0xc(%esp) 80100e01: 8d 85 40 ff ff ff lea -0xc0(%ebp),%eax 80100e07: 89 44 24 08 mov %eax,0x8(%esp) 80100e0b: 8b 45 dc mov -0x24(%ebp),%eax 80100e0e: 89 44 24 04 mov %eax,0x4(%esp) 80100e12: 8b 45 d4 mov -0x2c(%ebp),%eax 80100e15: 89 04 24 mov %eax,(%esp) 80100e18: e8 e1 76 00 00 call 801084fe <copyout> 80100e1d: 85 c0 test %eax,%eax 80100e1f: 79 05 jns 80100e26 <exec+0x337> goto bad; 80100e21: e9 b3 00 00 00 jmp 80100ed9 <exec+0x3ea> // Save program name for debugging. for(last=s=path; *s; s++) 80100e26: 8b 45 08 mov 0x8(%ebp),%eax 80100e29: 89 45 f4 mov %eax,-0xc(%ebp) 80100e2c: 8b 45 f4 mov -0xc(%ebp),%eax 80100e2f: 89 45 f0 mov %eax,-0x10(%ebp) 80100e32: eb 17 jmp 80100e4b <exec+0x35c> if(*s == '/') 80100e34: 8b 45 f4 mov -0xc(%ebp),%eax 80100e37: 0f b6 00 movzbl (%eax),%eax 80100e3a: 3c 2f cmp $0x2f,%al 80100e3c: 75 09 jne 80100e47 <exec+0x358> last = s+1; 80100e3e: 8b 45 f4 mov -0xc(%ebp),%eax 80100e41: 83 c0 01 add $0x1,%eax 80100e44: 89 45 f0 mov %eax,-0x10(%ebp) sp -= (3+argc+1) * 4; if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) goto bad; // Save program name for debugging. for(last=s=path; *s; s++) 80100e47: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80100e4b: 8b 45 f4 mov -0xc(%ebp),%eax 80100e4e: 0f b6 00 movzbl (%eax),%eax 80100e51: 84 c0 test %al,%al 80100e53: 75 df jne 80100e34 <exec+0x345> if(*s == '/') last = s+1; safestrcpy(proc->name, last, sizeof(proc->name)); 80100e55: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100e5b: 8d 50 6c lea 0x6c(%eax),%edx 80100e5e: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80100e65: 00 80100e66: 8b 45 f0 mov -0x10(%ebp),%eax 80100e69: 89 44 24 04 mov %eax,0x4(%esp) 80100e6d: 89 14 24 mov %edx,(%esp) 80100e70: e8 e9 44 00 00 call 8010535e <safestrcpy> // Commit to the user image. oldpgdir = proc->pgdir; 80100e75: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100e7b: 8b 40 04 mov 0x4(%eax),%eax 80100e7e: 89 45 d0 mov %eax,-0x30(%ebp) proc->pgdir = pgdir; 80100e81: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100e87: 8b 55 d4 mov -0x2c(%ebp),%edx 80100e8a: 89 50 04 mov %edx,0x4(%eax) proc->sz = sz; 80100e8d: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100e93: 8b 55 e0 mov -0x20(%ebp),%edx 80100e96: 89 10 mov %edx,(%eax) proc->tf->eip = elf.entry; // main 80100e98: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100e9e: 8b 40 18 mov 0x18(%eax),%eax 80100ea1: 8b 95 24 ff ff ff mov -0xdc(%ebp),%edx 80100ea7: 89 50 38 mov %edx,0x38(%eax) proc->tf->esp = sp; 80100eaa: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100eb0: 8b 40 18 mov 0x18(%eax),%eax 80100eb3: 8b 55 dc mov -0x24(%ebp),%edx 80100eb6: 89 50 44 mov %edx,0x44(%eax) switchuvm(proc); 80100eb9: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80100ebf: 89 04 24 mov %eax,(%esp) 80100ec2: e8 65 6f 00 00 call 80107e2c <switchuvm> freevm(oldpgdir); 80100ec7: 8b 45 d0 mov -0x30(%ebp),%eax 80100eca: 89 04 24 mov %eax,(%esp) 80100ecd: e8 cd 73 00 00 call 8010829f <freevm> return 0; 80100ed2: b8 00 00 00 00 mov $0x0,%eax 80100ed7: eb 27 jmp 80100f00 <exec+0x411> bad: if(pgdir) 80100ed9: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 80100edd: 74 0b je 80100eea <exec+0x3fb> freevm(pgdir); 80100edf: 8b 45 d4 mov -0x2c(%ebp),%eax 80100ee2: 89 04 24 mov %eax,(%esp) 80100ee5: e8 b5 73 00 00 call 8010829f <freevm> if(ip) 80100eea: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 80100eee: 74 0b je 80100efb <exec+0x40c> iunlockput(ip); 80100ef0: 8b 45 d8 mov -0x28(%ebp),%eax 80100ef3: 89 04 24 mov %eax,(%esp) 80100ef6: e8 dc 0b 00 00 call 80101ad7 <iunlockput> return -1; 80100efb: b8 ff ff ff ff mov $0xffffffff,%eax } 80100f00: c9 leave 80100f01: c3 ret 80100f02 <fileinit>: struct file file[NFILE]; } ftable; void fileinit(void) { 80100f02: 55 push %ebp 80100f03: 89 e5 mov %esp,%ebp 80100f05: 83 ec 18 sub $0x18,%esp initlock(&ftable.lock, "ftable"); 80100f08: c7 44 24 04 01 86 10 movl $0x80108601,0x4(%esp) 80100f0f: 80 80100f10: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100f17: e8 ad 3f 00 00 call 80104ec9 <initlock> } 80100f1c: c9 leave 80100f1d: c3 ret 80100f1e <filealloc>: // Allocate a file structure. struct file* filealloc(void) { 80100f1e: 55 push %ebp 80100f1f: 89 e5 mov %esp,%ebp 80100f21: 83 ec 28 sub $0x28,%esp struct file *f; acquire(&ftable.lock); 80100f24: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100f2b: e8 ba 3f 00 00 call 80104eea <acquire> for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100f30: c7 45 f4 b4 de 10 80 movl $0x8010deb4,-0xc(%ebp) 80100f37: eb 29 jmp 80100f62 <filealloc+0x44> if(f->ref == 0){ 80100f39: 8b 45 f4 mov -0xc(%ebp),%eax 80100f3c: 8b 40 04 mov 0x4(%eax),%eax 80100f3f: 85 c0 test %eax,%eax 80100f41: 75 1b jne 80100f5e <filealloc+0x40> f->ref = 1; 80100f43: 8b 45 f4 mov -0xc(%ebp),%eax 80100f46: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) release(&ftable.lock); 80100f4d: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100f54: e8 f3 3f 00 00 call 80104f4c <release> return f; 80100f59: 8b 45 f4 mov -0xc(%ebp),%eax 80100f5c: eb 1e jmp 80100f7c <filealloc+0x5e> filealloc(void) { struct file *f; acquire(&ftable.lock); for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100f5e: 83 45 f4 18 addl $0x18,-0xc(%ebp) 80100f62: 81 7d f4 14 e8 10 80 cmpl $0x8010e814,-0xc(%ebp) 80100f69: 72 ce jb 80100f39 <filealloc+0x1b> f->ref = 1; release(&ftable.lock); return f; } } release(&ftable.lock); 80100f6b: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100f72: e8 d5 3f 00 00 call 80104f4c <release> return 0; 80100f77: b8 00 00 00 00 mov $0x0,%eax } 80100f7c: c9 leave 80100f7d: c3 ret 80100f7e <filedup>: // Increment ref count for file f. struct file* filedup(struct file *f) { 80100f7e: 55 push %ebp 80100f7f: 89 e5 mov %esp,%ebp 80100f81: 83 ec 18 sub $0x18,%esp acquire(&ftable.lock); 80100f84: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100f8b: e8 5a 3f 00 00 call 80104eea <acquire> if(f->ref < 1) 80100f90: 8b 45 08 mov 0x8(%ebp),%eax 80100f93: 8b 40 04 mov 0x4(%eax),%eax 80100f96: 85 c0 test %eax,%eax 80100f98: 7f 0c jg 80100fa6 <filedup+0x28> panic("filedup"); 80100f9a: c7 04 24 08 86 10 80 movl $0x80108608,(%esp) 80100fa1: e8 94 f5 ff ff call 8010053a <panic> f->ref++; 80100fa6: 8b 45 08 mov 0x8(%ebp),%eax 80100fa9: 8b 40 04 mov 0x4(%eax),%eax 80100fac: 8d 50 01 lea 0x1(%eax),%edx 80100faf: 8b 45 08 mov 0x8(%ebp),%eax 80100fb2: 89 50 04 mov %edx,0x4(%eax) release(&ftable.lock); 80100fb5: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100fbc: e8 8b 3f 00 00 call 80104f4c <release> return f; 80100fc1: 8b 45 08 mov 0x8(%ebp),%eax } 80100fc4: c9 leave 80100fc5: c3 ret 80100fc6 <fileclose>: // Close file f. (Decrement ref count, close when reaches 0.) void fileclose(struct file *f) { 80100fc6: 55 push %ebp 80100fc7: 89 e5 mov %esp,%ebp 80100fc9: 83 ec 38 sub $0x38,%esp struct file ff; acquire(&ftable.lock); 80100fcc: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80100fd3: e8 12 3f 00 00 call 80104eea <acquire> if(f->ref < 1) 80100fd8: 8b 45 08 mov 0x8(%ebp),%eax 80100fdb: 8b 40 04 mov 0x4(%eax),%eax 80100fde: 85 c0 test %eax,%eax 80100fe0: 7f 0c jg 80100fee <fileclose+0x28> panic("fileclose"); 80100fe2: c7 04 24 10 86 10 80 movl $0x80108610,(%esp) 80100fe9: e8 4c f5 ff ff call 8010053a <panic> if(--f->ref > 0){ 80100fee: 8b 45 08 mov 0x8(%ebp),%eax 80100ff1: 8b 40 04 mov 0x4(%eax),%eax 80100ff4: 8d 50 ff lea -0x1(%eax),%edx 80100ff7: 8b 45 08 mov 0x8(%ebp),%eax 80100ffa: 89 50 04 mov %edx,0x4(%eax) 80100ffd: 8b 45 08 mov 0x8(%ebp),%eax 80101000: 8b 40 04 mov 0x4(%eax),%eax 80101003: 85 c0 test %eax,%eax 80101005: 7e 11 jle 80101018 <fileclose+0x52> release(&ftable.lock); 80101007: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 8010100e: e8 39 3f 00 00 call 80104f4c <release> 80101013: e9 82 00 00 00 jmp 8010109a <fileclose+0xd4> return; } ff = *f; 80101018: 8b 45 08 mov 0x8(%ebp),%eax 8010101b: 8b 10 mov (%eax),%edx 8010101d: 89 55 e0 mov %edx,-0x20(%ebp) 80101020: 8b 50 04 mov 0x4(%eax),%edx 80101023: 89 55 e4 mov %edx,-0x1c(%ebp) 80101026: 8b 50 08 mov 0x8(%eax),%edx 80101029: 89 55 e8 mov %edx,-0x18(%ebp) 8010102c: 8b 50 0c mov 0xc(%eax),%edx 8010102f: 89 55 ec mov %edx,-0x14(%ebp) 80101032: 8b 50 10 mov 0x10(%eax),%edx 80101035: 89 55 f0 mov %edx,-0x10(%ebp) 80101038: 8b 40 14 mov 0x14(%eax),%eax 8010103b: 89 45 f4 mov %eax,-0xc(%ebp) f->ref = 0; 8010103e: 8b 45 08 mov 0x8(%ebp),%eax 80101041: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) f->type = FD_NONE; 80101048: 8b 45 08 mov 0x8(%ebp),%eax 8010104b: c7 00 00 00 00 00 movl $0x0,(%eax) release(&ftable.lock); 80101051: c7 04 24 80 de 10 80 movl $0x8010de80,(%esp) 80101058: e8 ef 3e 00 00 call 80104f4c <release> if(ff.type == FD_PIPE) 8010105d: 8b 45 e0 mov -0x20(%ebp),%eax 80101060: 83 f8 01 cmp $0x1,%eax 80101063: 75 18 jne 8010107d <fileclose+0xb7> pipeclose(ff.pipe, ff.writable); 80101065: 0f b6 45 e9 movzbl -0x17(%ebp),%eax 80101069: 0f be d0 movsbl %al,%edx 8010106c: 8b 45 ec mov -0x14(%ebp),%eax 8010106f: 89 54 24 04 mov %edx,0x4(%esp) 80101073: 89 04 24 mov %eax,(%esp) 80101076: e8 8f 2c 00 00 call 80103d0a <pipeclose> 8010107b: eb 1d jmp 8010109a <fileclose+0xd4> else if(ff.type == FD_INODE){ 8010107d: 8b 45 e0 mov -0x20(%ebp),%eax 80101080: 83 f8 02 cmp $0x2,%eax 80101083: 75 15 jne 8010109a <fileclose+0xd4> begin_trans(); 80101085: e8 53 21 00 00 call 801031dd <begin_trans> iput(ff.ip); 8010108a: 8b 45 f0 mov -0x10(%ebp),%eax 8010108d: 89 04 24 mov %eax,(%esp) 80101090: e8 71 09 00 00 call 80101a06 <iput> commit_trans(); 80101095: e8 8c 21 00 00 call 80103226 <commit_trans> } } 8010109a: c9 leave 8010109b: c3 ret 8010109c <filestat>: // Get metadata about file f. int filestat(struct file *f, struct stat *st) { 8010109c: 55 push %ebp 8010109d: 89 e5 mov %esp,%ebp 8010109f: 83 ec 18 sub $0x18,%esp if(f->type == FD_INODE){ 801010a2: 8b 45 08 mov 0x8(%ebp),%eax 801010a5: 8b 00 mov (%eax),%eax 801010a7: 83 f8 02 cmp $0x2,%eax 801010aa: 75 38 jne 801010e4 <filestat+0x48> ilock(f->ip); 801010ac: 8b 45 08 mov 0x8(%ebp),%eax 801010af: 8b 40 10 mov 0x10(%eax),%eax 801010b2: 89 04 24 mov %eax,(%esp) 801010b5: e8 99 07 00 00 call 80101853 <ilock> stati(f->ip, st); 801010ba: 8b 45 08 mov 0x8(%ebp),%eax 801010bd: 8b 40 10 mov 0x10(%eax),%eax 801010c0: 8b 55 0c mov 0xc(%ebp),%edx 801010c3: 89 54 24 04 mov %edx,0x4(%esp) 801010c7: 89 04 24 mov %eax,(%esp) 801010ca: e8 4c 0c 00 00 call 80101d1b <stati> iunlock(f->ip); 801010cf: 8b 45 08 mov 0x8(%ebp),%eax 801010d2: 8b 40 10 mov 0x10(%eax),%eax 801010d5: 89 04 24 mov %eax,(%esp) 801010d8: e8 c4 08 00 00 call 801019a1 <iunlock> return 0; 801010dd: b8 00 00 00 00 mov $0x0,%eax 801010e2: eb 05 jmp 801010e9 <filestat+0x4d> } return -1; 801010e4: b8 ff ff ff ff mov $0xffffffff,%eax } 801010e9: c9 leave 801010ea: c3 ret 801010eb <fileread>: // Read from file f. int fileread(struct file *f, char *addr, int n) { 801010eb: 55 push %ebp 801010ec: 89 e5 mov %esp,%ebp 801010ee: 83 ec 28 sub $0x28,%esp int r; if(f->readable == 0) 801010f1: 8b 45 08 mov 0x8(%ebp),%eax 801010f4: 0f b6 40 08 movzbl 0x8(%eax),%eax 801010f8: 84 c0 test %al,%al 801010fa: 75 0a jne 80101106 <fileread+0x1b> return -1; 801010fc: b8 ff ff ff ff mov $0xffffffff,%eax 80101101: e9 9f 00 00 00 jmp 801011a5 <fileread+0xba> if(f->type == FD_PIPE) 80101106: 8b 45 08 mov 0x8(%ebp),%eax 80101109: 8b 00 mov (%eax),%eax 8010110b: 83 f8 01 cmp $0x1,%eax 8010110e: 75 1e jne 8010112e <fileread+0x43> return piperead(f->pipe, addr, n); 80101110: 8b 45 08 mov 0x8(%ebp),%eax 80101113: 8b 40 0c mov 0xc(%eax),%eax 80101116: 8b 55 10 mov 0x10(%ebp),%edx 80101119: 89 54 24 08 mov %edx,0x8(%esp) 8010111d: 8b 55 0c mov 0xc(%ebp),%edx 80101120: 89 54 24 04 mov %edx,0x4(%esp) 80101124: 89 04 24 mov %eax,(%esp) 80101127: e8 5f 2d 00 00 call 80103e8b <piperead> 8010112c: eb 77 jmp 801011a5 <fileread+0xba> if(f->type == FD_INODE){ 8010112e: 8b 45 08 mov 0x8(%ebp),%eax 80101131: 8b 00 mov (%eax),%eax 80101133: 83 f8 02 cmp $0x2,%eax 80101136: 75 61 jne 80101199 <fileread+0xae> ilock(f->ip); 80101138: 8b 45 08 mov 0x8(%ebp),%eax 8010113b: 8b 40 10 mov 0x10(%eax),%eax 8010113e: 89 04 24 mov %eax,(%esp) 80101141: e8 0d 07 00 00 call 80101853 <ilock> if((r = readi(f->ip, addr, f->off, n)) > 0) 80101146: 8b 4d 10 mov 0x10(%ebp),%ecx 80101149: 8b 45 08 mov 0x8(%ebp),%eax 8010114c: 8b 50 14 mov 0x14(%eax),%edx 8010114f: 8b 45 08 mov 0x8(%ebp),%eax 80101152: 8b 40 10 mov 0x10(%eax),%eax 80101155: 89 4c 24 0c mov %ecx,0xc(%esp) 80101159: 89 54 24 08 mov %edx,0x8(%esp) 8010115d: 8b 55 0c mov 0xc(%ebp),%edx 80101160: 89 54 24 04 mov %edx,0x4(%esp) 80101164: 89 04 24 mov %eax,(%esp) 80101167: e8 f4 0b 00 00 call 80101d60 <readi> 8010116c: 89 45 f4 mov %eax,-0xc(%ebp) 8010116f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80101173: 7e 11 jle 80101186 <fileread+0x9b> f->off += r; 80101175: 8b 45 08 mov 0x8(%ebp),%eax 80101178: 8b 50 14 mov 0x14(%eax),%edx 8010117b: 8b 45 f4 mov -0xc(%ebp),%eax 8010117e: 01 c2 add %eax,%edx 80101180: 8b 45 08 mov 0x8(%ebp),%eax 80101183: 89 50 14 mov %edx,0x14(%eax) iunlock(f->ip); 80101186: 8b 45 08 mov 0x8(%ebp),%eax 80101189: 8b 40 10 mov 0x10(%eax),%eax 8010118c: 89 04 24 mov %eax,(%esp) 8010118f: e8 0d 08 00 00 call 801019a1 <iunlock> return r; 80101194: 8b 45 f4 mov -0xc(%ebp),%eax 80101197: eb 0c jmp 801011a5 <fileread+0xba> } panic("fileread"); 80101199: c7 04 24 1a 86 10 80 movl $0x8010861a,(%esp) 801011a0: e8 95 f3 ff ff call 8010053a <panic> } 801011a5: c9 leave 801011a6: c3 ret 801011a7 <filewrite>: //PAGEBREAK! // Write to file f. int filewrite(struct file *f, char *addr, int n) { 801011a7: 55 push %ebp 801011a8: 89 e5 mov %esp,%ebp 801011aa: 53 push %ebx 801011ab: 83 ec 24 sub $0x24,%esp int r; if(f->writable == 0) 801011ae: 8b 45 08 mov 0x8(%ebp),%eax 801011b1: 0f b6 40 09 movzbl 0x9(%eax),%eax 801011b5: 84 c0 test %al,%al 801011b7: 75 0a jne 801011c3 <filewrite+0x1c> return -1; 801011b9: b8 ff ff ff ff mov $0xffffffff,%eax 801011be: e9 20 01 00 00 jmp 801012e3 <filewrite+0x13c> if(f->type == FD_PIPE) 801011c3: 8b 45 08 mov 0x8(%ebp),%eax 801011c6: 8b 00 mov (%eax),%eax 801011c8: 83 f8 01 cmp $0x1,%eax 801011cb: 75 21 jne 801011ee <filewrite+0x47> return pipewrite(f->pipe, addr, n); 801011cd: 8b 45 08 mov 0x8(%ebp),%eax 801011d0: 8b 40 0c mov 0xc(%eax),%eax 801011d3: 8b 55 10 mov 0x10(%ebp),%edx 801011d6: 89 54 24 08 mov %edx,0x8(%esp) 801011da: 8b 55 0c mov 0xc(%ebp),%edx 801011dd: 89 54 24 04 mov %edx,0x4(%esp) 801011e1: 89 04 24 mov %eax,(%esp) 801011e4: e8 b3 2b 00 00 call 80103d9c <pipewrite> 801011e9: e9 f5 00 00 00 jmp 801012e3 <filewrite+0x13c> if(f->type == FD_INODE){ 801011ee: 8b 45 08 mov 0x8(%ebp),%eax 801011f1: 8b 00 mov (%eax),%eax 801011f3: 83 f8 02 cmp $0x2,%eax 801011f6: 0f 85 db 00 00 00 jne 801012d7 <filewrite+0x130> // the maximum log transaction size, including // i-node, indirect block, allocation blocks, // and 2 blocks of slop for non-aligned writes. // this really belongs lower down, since writei() // might be writing a device like the console. int max = ((LOGSIZE-1-1-2) / 2) * 512; 801011fc: c7 45 ec 00 06 00 00 movl $0x600,-0x14(%ebp) int i = 0; 80101203: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) while(i < n){ 8010120a: e9 a8 00 00 00 jmp 801012b7 <filewrite+0x110> int n1 = n - i; 8010120f: 8b 45 f4 mov -0xc(%ebp),%eax 80101212: 8b 55 10 mov 0x10(%ebp),%edx 80101215: 29 c2 sub %eax,%edx 80101217: 89 d0 mov %edx,%eax 80101219: 89 45 f0 mov %eax,-0x10(%ebp) if(n1 > max) 8010121c: 8b 45 f0 mov -0x10(%ebp),%eax 8010121f: 3b 45 ec cmp -0x14(%ebp),%eax 80101222: 7e 06 jle 8010122a <filewrite+0x83> n1 = max; 80101224: 8b 45 ec mov -0x14(%ebp),%eax 80101227: 89 45 f0 mov %eax,-0x10(%ebp) begin_trans(); 8010122a: e8 ae 1f 00 00 call 801031dd <begin_trans> ilock(f->ip); 8010122f: 8b 45 08 mov 0x8(%ebp),%eax 80101232: 8b 40 10 mov 0x10(%eax),%eax 80101235: 89 04 24 mov %eax,(%esp) 80101238: e8 16 06 00 00 call 80101853 <ilock> if ((r = writei(f->ip, addr + i, f->off, n1)) > 0) 8010123d: 8b 4d f0 mov -0x10(%ebp),%ecx 80101240: 8b 45 08 mov 0x8(%ebp),%eax 80101243: 8b 50 14 mov 0x14(%eax),%edx 80101246: 8b 5d f4 mov -0xc(%ebp),%ebx 80101249: 8b 45 0c mov 0xc(%ebp),%eax 8010124c: 01 c3 add %eax,%ebx 8010124e: 8b 45 08 mov 0x8(%ebp),%eax 80101251: 8b 40 10 mov 0x10(%eax),%eax 80101254: 89 4c 24 0c mov %ecx,0xc(%esp) 80101258: 89 54 24 08 mov %edx,0x8(%esp) 8010125c: 89 5c 24 04 mov %ebx,0x4(%esp) 80101260: 89 04 24 mov %eax,(%esp) 80101263: e8 5c 0c 00 00 call 80101ec4 <writei> 80101268: 89 45 e8 mov %eax,-0x18(%ebp) 8010126b: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) 8010126f: 7e 11 jle 80101282 <filewrite+0xdb> f->off += r; 80101271: 8b 45 08 mov 0x8(%ebp),%eax 80101274: 8b 50 14 mov 0x14(%eax),%edx 80101277: 8b 45 e8 mov -0x18(%ebp),%eax 8010127a: 01 c2 add %eax,%edx 8010127c: 8b 45 08 mov 0x8(%ebp),%eax 8010127f: 89 50 14 mov %edx,0x14(%eax) iunlock(f->ip); 80101282: 8b 45 08 mov 0x8(%ebp),%eax 80101285: 8b 40 10 mov 0x10(%eax),%eax 80101288: 89 04 24 mov %eax,(%esp) 8010128b: e8 11 07 00 00 call 801019a1 <iunlock> commit_trans(); 80101290: e8 91 1f 00 00 call 80103226 <commit_trans> if(r < 0) 80101295: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) 80101299: 79 02 jns 8010129d <filewrite+0xf6> break; 8010129b: eb 26 jmp 801012c3 <filewrite+0x11c> if(r != n1) 8010129d: 8b 45 e8 mov -0x18(%ebp),%eax 801012a0: 3b 45 f0 cmp -0x10(%ebp),%eax 801012a3: 74 0c je 801012b1 <filewrite+0x10a> panic("short filewrite"); 801012a5: c7 04 24 23 86 10 80 movl $0x80108623,(%esp) 801012ac: e8 89 f2 ff ff call 8010053a <panic> i += r; 801012b1: 8b 45 e8 mov -0x18(%ebp),%eax 801012b4: 01 45 f4 add %eax,-0xc(%ebp) // and 2 blocks of slop for non-aligned writes. // this really belongs lower down, since writei() // might be writing a device like the console. int max = ((LOGSIZE-1-1-2) / 2) * 512; int i = 0; while(i < n){ 801012b7: 8b 45 f4 mov -0xc(%ebp),%eax 801012ba: 3b 45 10 cmp 0x10(%ebp),%eax 801012bd: 0f 8c 4c ff ff ff jl 8010120f <filewrite+0x68> break; if(r != n1) panic("short filewrite"); i += r; } return i == n ? n : -1; 801012c3: 8b 45 f4 mov -0xc(%ebp),%eax 801012c6: 3b 45 10 cmp 0x10(%ebp),%eax 801012c9: 75 05 jne 801012d0 <filewrite+0x129> 801012cb: 8b 45 10 mov 0x10(%ebp),%eax 801012ce: eb 05 jmp 801012d5 <filewrite+0x12e> 801012d0: b8 ff ff ff ff mov $0xffffffff,%eax 801012d5: eb 0c jmp 801012e3 <filewrite+0x13c> } panic("filewrite"); 801012d7: c7 04 24 33 86 10 80 movl $0x80108633,(%esp) 801012de: e8 57 f2 ff ff call 8010053a <panic> } 801012e3: 83 c4 24 add $0x24,%esp 801012e6: 5b pop %ebx 801012e7: 5d pop %ebp 801012e8: c3 ret 801012e9 <readsb>: static void itrunc(struct inode*); // Read the super block. void readsb(int dev, struct superblock *sb) { 801012e9: 55 push %ebp 801012ea: 89 e5 mov %esp,%ebp 801012ec: 83 ec 28 sub $0x28,%esp struct buf *bp; bp = bread(dev, 1); 801012ef: 8b 45 08 mov 0x8(%ebp),%eax 801012f2: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 801012f9: 00 801012fa: 89 04 24 mov %eax,(%esp) 801012fd: e8 a4 ee ff ff call 801001a6 <bread> 80101302: 89 45 f4 mov %eax,-0xc(%ebp) memmove(sb, bp->data, sizeof(*sb)); 80101305: 8b 45 f4 mov -0xc(%ebp),%eax 80101308: 83 c0 18 add $0x18,%eax 8010130b: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80101312: 00 80101313: 89 44 24 04 mov %eax,0x4(%esp) 80101317: 8b 45 0c mov 0xc(%ebp),%eax 8010131a: 89 04 24 mov %eax,(%esp) 8010131d: e8 eb 3e 00 00 call 8010520d <memmove> brelse(bp); 80101322: 8b 45 f4 mov -0xc(%ebp),%eax 80101325: 89 04 24 mov %eax,(%esp) 80101328: e8 ea ee ff ff call 80100217 <brelse> } 8010132d: c9 leave 8010132e: c3 ret 8010132f <bzero>: // Zero a block. static void bzero(int dev, int bno) { 8010132f: 55 push %ebp 80101330: 89 e5 mov %esp,%ebp 80101332: 83 ec 28 sub $0x28,%esp struct buf *bp; bp = bread(dev, bno); 80101335: 8b 55 0c mov 0xc(%ebp),%edx 80101338: 8b 45 08 mov 0x8(%ebp),%eax 8010133b: 89 54 24 04 mov %edx,0x4(%esp) 8010133f: 89 04 24 mov %eax,(%esp) 80101342: e8 5f ee ff ff call 801001a6 <bread> 80101347: 89 45 f4 mov %eax,-0xc(%ebp) memset(bp->data, 0, BSIZE); 8010134a: 8b 45 f4 mov -0xc(%ebp),%eax 8010134d: 83 c0 18 add $0x18,%eax 80101350: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 80101357: 00 80101358: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010135f: 00 80101360: 89 04 24 mov %eax,(%esp) 80101363: e8 d6 3d 00 00 call 8010513e <memset> log_write(bp); 80101368: 8b 45 f4 mov -0xc(%ebp),%eax 8010136b: 89 04 24 mov %eax,(%esp) 8010136e: e8 0b 1f 00 00 call 8010327e <log_write> brelse(bp); 80101373: 8b 45 f4 mov -0xc(%ebp),%eax 80101376: 89 04 24 mov %eax,(%esp) 80101379: e8 99 ee ff ff call 80100217 <brelse> } 8010137e: c9 leave 8010137f: c3 ret 80101380 <balloc>: // Blocks. // Allocate a zeroed disk block. static uint balloc(uint dev) { 80101380: 55 push %ebp 80101381: 89 e5 mov %esp,%ebp 80101383: 83 ec 38 sub $0x38,%esp int b, bi, m; struct buf *bp; struct superblock sb; bp = 0; 80101386: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) readsb(dev, &sb); 8010138d: 8b 45 08 mov 0x8(%ebp),%eax 80101390: 8d 55 d8 lea -0x28(%ebp),%edx 80101393: 89 54 24 04 mov %edx,0x4(%esp) 80101397: 89 04 24 mov %eax,(%esp) 8010139a: e8 4a ff ff ff call 801012e9 <readsb> for(b = 0; b < sb.size; b += BPB){ 8010139f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 801013a6: e9 07 01 00 00 jmp 801014b2 <balloc+0x132> bp = bread(dev, BBLOCK(b, sb.ninodes)); 801013ab: 8b 45 f4 mov -0xc(%ebp),%eax 801013ae: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 801013b4: 85 c0 test %eax,%eax 801013b6: 0f 48 c2 cmovs %edx,%eax 801013b9: c1 f8 0c sar $0xc,%eax 801013bc: 8b 55 e0 mov -0x20(%ebp),%edx 801013bf: c1 ea 03 shr $0x3,%edx 801013c2: 01 d0 add %edx,%eax 801013c4: 83 c0 03 add $0x3,%eax 801013c7: 89 44 24 04 mov %eax,0x4(%esp) 801013cb: 8b 45 08 mov 0x8(%ebp),%eax 801013ce: 89 04 24 mov %eax,(%esp) 801013d1: e8 d0 ed ff ff call 801001a6 <bread> 801013d6: 89 45 ec mov %eax,-0x14(%ebp) for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 801013d9: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 801013e0: e9 9d 00 00 00 jmp 80101482 <balloc+0x102> m = 1 << (bi % 8); 801013e5: 8b 45 f0 mov -0x10(%ebp),%eax 801013e8: 99 cltd 801013e9: c1 ea 1d shr $0x1d,%edx 801013ec: 01 d0 add %edx,%eax 801013ee: 83 e0 07 and $0x7,%eax 801013f1: 29 d0 sub %edx,%eax 801013f3: ba 01 00 00 00 mov $0x1,%edx 801013f8: 89 c1 mov %eax,%ecx 801013fa: d3 e2 shl %cl,%edx 801013fc: 89 d0 mov %edx,%eax 801013fe: 89 45 e8 mov %eax,-0x18(%ebp) if((bp->data[bi/8] & m) == 0){ // Is block free? 80101401: 8b 45 f0 mov -0x10(%ebp),%eax 80101404: 8d 50 07 lea 0x7(%eax),%edx 80101407: 85 c0 test %eax,%eax 80101409: 0f 48 c2 cmovs %edx,%eax 8010140c: c1 f8 03 sar $0x3,%eax 8010140f: 8b 55 ec mov -0x14(%ebp),%edx 80101412: 0f b6 44 02 18 movzbl 0x18(%edx,%eax,1),%eax 80101417: 0f b6 c0 movzbl %al,%eax 8010141a: 23 45 e8 and -0x18(%ebp),%eax 8010141d: 85 c0 test %eax,%eax 8010141f: 75 5d jne 8010147e <balloc+0xfe> bp->data[bi/8] |= m; // Mark block in use. 80101421: 8b 45 f0 mov -0x10(%ebp),%eax 80101424: 8d 50 07 lea 0x7(%eax),%edx 80101427: 85 c0 test %eax,%eax 80101429: 0f 48 c2 cmovs %edx,%eax 8010142c: c1 f8 03 sar $0x3,%eax 8010142f: 8b 55 ec mov -0x14(%ebp),%edx 80101432: 0f b6 54 02 18 movzbl 0x18(%edx,%eax,1),%edx 80101437: 89 d1 mov %edx,%ecx 80101439: 8b 55 e8 mov -0x18(%ebp),%edx 8010143c: 09 ca or %ecx,%edx 8010143e: 89 d1 mov %edx,%ecx 80101440: 8b 55 ec mov -0x14(%ebp),%edx 80101443: 88 4c 02 18 mov %cl,0x18(%edx,%eax,1) log_write(bp); 80101447: 8b 45 ec mov -0x14(%ebp),%eax 8010144a: 89 04 24 mov %eax,(%esp) 8010144d: e8 2c 1e 00 00 call 8010327e <log_write> brelse(bp); 80101452: 8b 45 ec mov -0x14(%ebp),%eax 80101455: 89 04 24 mov %eax,(%esp) 80101458: e8 ba ed ff ff call 80100217 <brelse> bzero(dev, b + bi); 8010145d: 8b 45 f0 mov -0x10(%ebp),%eax 80101460: 8b 55 f4 mov -0xc(%ebp),%edx 80101463: 01 c2 add %eax,%edx 80101465: 8b 45 08 mov 0x8(%ebp),%eax 80101468: 89 54 24 04 mov %edx,0x4(%esp) 8010146c: 89 04 24 mov %eax,(%esp) 8010146f: e8 bb fe ff ff call 8010132f <bzero> return b + bi; 80101474: 8b 45 f0 mov -0x10(%ebp),%eax 80101477: 8b 55 f4 mov -0xc(%ebp),%edx 8010147a: 01 d0 add %edx,%eax 8010147c: eb 4e jmp 801014cc <balloc+0x14c> bp = 0; readsb(dev, &sb); for(b = 0; b < sb.size; b += BPB){ bp = bread(dev, BBLOCK(b, sb.ninodes)); for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 8010147e: 83 45 f0 01 addl $0x1,-0x10(%ebp) 80101482: 81 7d f0 ff 0f 00 00 cmpl $0xfff,-0x10(%ebp) 80101489: 7f 15 jg 801014a0 <balloc+0x120> 8010148b: 8b 45 f0 mov -0x10(%ebp),%eax 8010148e: 8b 55 f4 mov -0xc(%ebp),%edx 80101491: 01 d0 add %edx,%eax 80101493: 89 c2 mov %eax,%edx 80101495: 8b 45 d8 mov -0x28(%ebp),%eax 80101498: 39 c2 cmp %eax,%edx 8010149a: 0f 82 45 ff ff ff jb 801013e5 <balloc+0x65> brelse(bp); bzero(dev, b + bi); return b + bi; } } brelse(bp); 801014a0: 8b 45 ec mov -0x14(%ebp),%eax 801014a3: 89 04 24 mov %eax,(%esp) 801014a6: e8 6c ed ff ff call 80100217 <brelse> struct buf *bp; struct superblock sb; bp = 0; readsb(dev, &sb); for(b = 0; b < sb.size; b += BPB){ 801014ab: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp) 801014b2: 8b 55 f4 mov -0xc(%ebp),%edx 801014b5: 8b 45 d8 mov -0x28(%ebp),%eax 801014b8: 39 c2 cmp %eax,%edx 801014ba: 0f 82 eb fe ff ff jb 801013ab <balloc+0x2b> return b + bi; } } brelse(bp); } panic("balloc: out of blocks"); 801014c0: c7 04 24 3d 86 10 80 movl $0x8010863d,(%esp) 801014c7: e8 6e f0 ff ff call 8010053a <panic> } 801014cc: c9 leave 801014cd: c3 ret 801014ce <bfree>: // Free a disk block. static void bfree(int dev, uint b) { 801014ce: 55 push %ebp 801014cf: 89 e5 mov %esp,%ebp 801014d1: 83 ec 38 sub $0x38,%esp struct buf *bp; struct superblock sb; int bi, m; readsb(dev, &sb); 801014d4: 8d 45 dc lea -0x24(%ebp),%eax 801014d7: 89 44 24 04 mov %eax,0x4(%esp) 801014db: 8b 45 08 mov 0x8(%ebp),%eax 801014de: 89 04 24 mov %eax,(%esp) 801014e1: e8 03 fe ff ff call 801012e9 <readsb> bp = bread(dev, BBLOCK(b, sb.ninodes)); 801014e6: 8b 45 0c mov 0xc(%ebp),%eax 801014e9: c1 e8 0c shr $0xc,%eax 801014ec: 89 c2 mov %eax,%edx 801014ee: 8b 45 e4 mov -0x1c(%ebp),%eax 801014f1: c1 e8 03 shr $0x3,%eax 801014f4: 01 d0 add %edx,%eax 801014f6: 8d 50 03 lea 0x3(%eax),%edx 801014f9: 8b 45 08 mov 0x8(%ebp),%eax 801014fc: 89 54 24 04 mov %edx,0x4(%esp) 80101500: 89 04 24 mov %eax,(%esp) 80101503: e8 9e ec ff ff call 801001a6 <bread> 80101508: 89 45 f4 mov %eax,-0xc(%ebp) bi = b % BPB; 8010150b: 8b 45 0c mov 0xc(%ebp),%eax 8010150e: 25 ff 0f 00 00 and $0xfff,%eax 80101513: 89 45 f0 mov %eax,-0x10(%ebp) m = 1 << (bi % 8); 80101516: 8b 45 f0 mov -0x10(%ebp),%eax 80101519: 99 cltd 8010151a: c1 ea 1d shr $0x1d,%edx 8010151d: 01 d0 add %edx,%eax 8010151f: 83 e0 07 and $0x7,%eax 80101522: 29 d0 sub %edx,%eax 80101524: ba 01 00 00 00 mov $0x1,%edx 80101529: 89 c1 mov %eax,%ecx 8010152b: d3 e2 shl %cl,%edx 8010152d: 89 d0 mov %edx,%eax 8010152f: 89 45 ec mov %eax,-0x14(%ebp) if((bp->data[bi/8] & m) == 0) 80101532: 8b 45 f0 mov -0x10(%ebp),%eax 80101535: 8d 50 07 lea 0x7(%eax),%edx 80101538: 85 c0 test %eax,%eax 8010153a: 0f 48 c2 cmovs %edx,%eax 8010153d: c1 f8 03 sar $0x3,%eax 80101540: 8b 55 f4 mov -0xc(%ebp),%edx 80101543: 0f b6 44 02 18 movzbl 0x18(%edx,%eax,1),%eax 80101548: 0f b6 c0 movzbl %al,%eax 8010154b: 23 45 ec and -0x14(%ebp),%eax 8010154e: 85 c0 test %eax,%eax 80101550: 75 0c jne 8010155e <bfree+0x90> panic("freeing free block"); 80101552: c7 04 24 53 86 10 80 movl $0x80108653,(%esp) 80101559: e8 dc ef ff ff call 8010053a <panic> bp->data[bi/8] &= ~m; 8010155e: 8b 45 f0 mov -0x10(%ebp),%eax 80101561: 8d 50 07 lea 0x7(%eax),%edx 80101564: 85 c0 test %eax,%eax 80101566: 0f 48 c2 cmovs %edx,%eax 80101569: c1 f8 03 sar $0x3,%eax 8010156c: 8b 55 f4 mov -0xc(%ebp),%edx 8010156f: 0f b6 54 02 18 movzbl 0x18(%edx,%eax,1),%edx 80101574: 8b 4d ec mov -0x14(%ebp),%ecx 80101577: f7 d1 not %ecx 80101579: 21 ca and %ecx,%edx 8010157b: 89 d1 mov %edx,%ecx 8010157d: 8b 55 f4 mov -0xc(%ebp),%edx 80101580: 88 4c 02 18 mov %cl,0x18(%edx,%eax,1) log_write(bp); 80101584: 8b 45 f4 mov -0xc(%ebp),%eax 80101587: 89 04 24 mov %eax,(%esp) 8010158a: e8 ef 1c 00 00 call 8010327e <log_write> brelse(bp); 8010158f: 8b 45 f4 mov -0xc(%ebp),%eax 80101592: 89 04 24 mov %eax,(%esp) 80101595: e8 7d ec ff ff call 80100217 <brelse> } 8010159a: c9 leave 8010159b: c3 ret 8010159c <iinit>: struct inode inode[NINODE]; } icache; void iinit(void) { 8010159c: 55 push %ebp 8010159d: 89 e5 mov %esp,%ebp 8010159f: 83 ec 18 sub $0x18,%esp initlock(&icache.lock, "icache"); 801015a2: c7 44 24 04 66 86 10 movl $0x80108666,0x4(%esp) 801015a9: 80 801015aa: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 801015b1: e8 13 39 00 00 call 80104ec9 <initlock> } 801015b6: c9 leave 801015b7: c3 ret 801015b8 <ialloc>: //PAGEBREAK! // Allocate a new inode with the given type on device dev. // A free inode has a type of zero. struct inode* ialloc(uint dev, short type) { 801015b8: 55 push %ebp 801015b9: 89 e5 mov %esp,%ebp 801015bb: 83 ec 38 sub $0x38,%esp 801015be: 8b 45 0c mov 0xc(%ebp),%eax 801015c1: 66 89 45 d4 mov %ax,-0x2c(%ebp) int inum; struct buf *bp; struct dinode *dip; struct superblock sb; readsb(dev, &sb); 801015c5: 8b 45 08 mov 0x8(%ebp),%eax 801015c8: 8d 55 dc lea -0x24(%ebp),%edx 801015cb: 89 54 24 04 mov %edx,0x4(%esp) 801015cf: 89 04 24 mov %eax,(%esp) 801015d2: e8 12 fd ff ff call 801012e9 <readsb> for(inum = 1; inum < sb.ninodes; inum++){ 801015d7: c7 45 f4 01 00 00 00 movl $0x1,-0xc(%ebp) 801015de: e9 98 00 00 00 jmp 8010167b <ialloc+0xc3> bp = bread(dev, IBLOCK(inum)); 801015e3: 8b 45 f4 mov -0xc(%ebp),%eax 801015e6: c1 e8 03 shr $0x3,%eax 801015e9: 83 c0 02 add $0x2,%eax 801015ec: 89 44 24 04 mov %eax,0x4(%esp) 801015f0: 8b 45 08 mov 0x8(%ebp),%eax 801015f3: 89 04 24 mov %eax,(%esp) 801015f6: e8 ab eb ff ff call 801001a6 <bread> 801015fb: 89 45 f0 mov %eax,-0x10(%ebp) dip = (struct dinode*)bp->data + inum%IPB; 801015fe: 8b 45 f0 mov -0x10(%ebp),%eax 80101601: 8d 50 18 lea 0x18(%eax),%edx 80101604: 8b 45 f4 mov -0xc(%ebp),%eax 80101607: 83 e0 07 and $0x7,%eax 8010160a: c1 e0 06 shl $0x6,%eax 8010160d: 01 d0 add %edx,%eax 8010160f: 89 45 ec mov %eax,-0x14(%ebp) if(dip->type == 0){ // a free inode 80101612: 8b 45 ec mov -0x14(%ebp),%eax 80101615: 0f b7 00 movzwl (%eax),%eax 80101618: 66 85 c0 test %ax,%ax 8010161b: 75 4f jne 8010166c <ialloc+0xb4> memset(dip, 0, sizeof(*dip)); 8010161d: c7 44 24 08 40 00 00 movl $0x40,0x8(%esp) 80101624: 00 80101625: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010162c: 00 8010162d: 8b 45 ec mov -0x14(%ebp),%eax 80101630: 89 04 24 mov %eax,(%esp) 80101633: e8 06 3b 00 00 call 8010513e <memset> dip->type = type; 80101638: 8b 45 ec mov -0x14(%ebp),%eax 8010163b: 0f b7 55 d4 movzwl -0x2c(%ebp),%edx 8010163f: 66 89 10 mov %dx,(%eax) log_write(bp); // mark it allocated on the disk 80101642: 8b 45 f0 mov -0x10(%ebp),%eax 80101645: 89 04 24 mov %eax,(%esp) 80101648: e8 31 1c 00 00 call 8010327e <log_write> brelse(bp); 8010164d: 8b 45 f0 mov -0x10(%ebp),%eax 80101650: 89 04 24 mov %eax,(%esp) 80101653: e8 bf eb ff ff call 80100217 <brelse> return iget(dev, inum); 80101658: 8b 45 f4 mov -0xc(%ebp),%eax 8010165b: 89 44 24 04 mov %eax,0x4(%esp) 8010165f: 8b 45 08 mov 0x8(%ebp),%eax 80101662: 89 04 24 mov %eax,(%esp) 80101665: e8 e5 00 00 00 call 8010174f <iget> 8010166a: eb 29 jmp 80101695 <ialloc+0xdd> } brelse(bp); 8010166c: 8b 45 f0 mov -0x10(%ebp),%eax 8010166f: 89 04 24 mov %eax,(%esp) 80101672: e8 a0 eb ff ff call 80100217 <brelse> struct dinode *dip; struct superblock sb; readsb(dev, &sb); for(inum = 1; inum < sb.ninodes; inum++){ 80101677: 83 45 f4 01 addl $0x1,-0xc(%ebp) 8010167b: 8b 55 f4 mov -0xc(%ebp),%edx 8010167e: 8b 45 e4 mov -0x1c(%ebp),%eax 80101681: 39 c2 cmp %eax,%edx 80101683: 0f 82 5a ff ff ff jb 801015e3 <ialloc+0x2b> brelse(bp); return iget(dev, inum); } brelse(bp); } panic("ialloc: no inodes"); 80101689: c7 04 24 6d 86 10 80 movl $0x8010866d,(%esp) 80101690: e8 a5 ee ff ff call 8010053a <panic> } 80101695: c9 leave 80101696: c3 ret 80101697 <iupdate>: // Copy a modified in-memory inode to disk. void iupdate(struct inode *ip) { 80101697: 55 push %ebp 80101698: 89 e5 mov %esp,%ebp 8010169a: 83 ec 28 sub $0x28,%esp struct buf *bp; struct dinode *dip; bp = bread(ip->dev, IBLOCK(ip->inum)); 8010169d: 8b 45 08 mov 0x8(%ebp),%eax 801016a0: 8b 40 04 mov 0x4(%eax),%eax 801016a3: c1 e8 03 shr $0x3,%eax 801016a6: 8d 50 02 lea 0x2(%eax),%edx 801016a9: 8b 45 08 mov 0x8(%ebp),%eax 801016ac: 8b 00 mov (%eax),%eax 801016ae: 89 54 24 04 mov %edx,0x4(%esp) 801016b2: 89 04 24 mov %eax,(%esp) 801016b5: e8 ec ea ff ff call 801001a6 <bread> 801016ba: 89 45 f4 mov %eax,-0xc(%ebp) dip = (struct dinode*)bp->data + ip->inum%IPB; 801016bd: 8b 45 f4 mov -0xc(%ebp),%eax 801016c0: 8d 50 18 lea 0x18(%eax),%edx 801016c3: 8b 45 08 mov 0x8(%ebp),%eax 801016c6: 8b 40 04 mov 0x4(%eax),%eax 801016c9: 83 e0 07 and $0x7,%eax 801016cc: c1 e0 06 shl $0x6,%eax 801016cf: 01 d0 add %edx,%eax 801016d1: 89 45 f0 mov %eax,-0x10(%ebp) dip->type = ip->type; 801016d4: 8b 45 08 mov 0x8(%ebp),%eax 801016d7: 0f b7 50 10 movzwl 0x10(%eax),%edx 801016db: 8b 45 f0 mov -0x10(%ebp),%eax 801016de: 66 89 10 mov %dx,(%eax) dip->major = ip->major; 801016e1: 8b 45 08 mov 0x8(%ebp),%eax 801016e4: 0f b7 50 12 movzwl 0x12(%eax),%edx 801016e8: 8b 45 f0 mov -0x10(%ebp),%eax 801016eb: 66 89 50 02 mov %dx,0x2(%eax) dip->minor = ip->minor; 801016ef: 8b 45 08 mov 0x8(%ebp),%eax 801016f2: 0f b7 50 14 movzwl 0x14(%eax),%edx 801016f6: 8b 45 f0 mov -0x10(%ebp),%eax 801016f9: 66 89 50 04 mov %dx,0x4(%eax) dip->nlink = ip->nlink; 801016fd: 8b 45 08 mov 0x8(%ebp),%eax 80101700: 0f b7 50 16 movzwl 0x16(%eax),%edx 80101704: 8b 45 f0 mov -0x10(%ebp),%eax 80101707: 66 89 50 06 mov %dx,0x6(%eax) dip->size = ip->size; 8010170b: 8b 45 08 mov 0x8(%ebp),%eax 8010170e: 8b 50 18 mov 0x18(%eax),%edx 80101711: 8b 45 f0 mov -0x10(%ebp),%eax 80101714: 89 50 08 mov %edx,0x8(%eax) memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 80101717: 8b 45 08 mov 0x8(%ebp),%eax 8010171a: 8d 50 1c lea 0x1c(%eax),%edx 8010171d: 8b 45 f0 mov -0x10(%ebp),%eax 80101720: 83 c0 0c add $0xc,%eax 80101723: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 8010172a: 00 8010172b: 89 54 24 04 mov %edx,0x4(%esp) 8010172f: 89 04 24 mov %eax,(%esp) 80101732: e8 d6 3a 00 00 call 8010520d <memmove> log_write(bp); 80101737: 8b 45 f4 mov -0xc(%ebp),%eax 8010173a: 89 04 24 mov %eax,(%esp) 8010173d: e8 3c 1b 00 00 call 8010327e <log_write> brelse(bp); 80101742: 8b 45 f4 mov -0xc(%ebp),%eax 80101745: 89 04 24 mov %eax,(%esp) 80101748: e8 ca ea ff ff call 80100217 <brelse> } 8010174d: c9 leave 8010174e: c3 ret 8010174f <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) { 8010174f: 55 push %ebp 80101750: 89 e5 mov %esp,%ebp 80101752: 83 ec 28 sub $0x28,%esp struct inode *ip, *empty; acquire(&icache.lock); 80101755: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 8010175c: e8 89 37 00 00 call 80104eea <acquire> // Is the inode already cached? empty = 0; 80101761: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 80101768: c7 45 f4 b4 e8 10 80 movl $0x8010e8b4,-0xc(%ebp) 8010176f: eb 59 jmp 801017ca <iget+0x7b> if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){ 80101771: 8b 45 f4 mov -0xc(%ebp),%eax 80101774: 8b 40 08 mov 0x8(%eax),%eax 80101777: 85 c0 test %eax,%eax 80101779: 7e 35 jle 801017b0 <iget+0x61> 8010177b: 8b 45 f4 mov -0xc(%ebp),%eax 8010177e: 8b 00 mov (%eax),%eax 80101780: 3b 45 08 cmp 0x8(%ebp),%eax 80101783: 75 2b jne 801017b0 <iget+0x61> 80101785: 8b 45 f4 mov -0xc(%ebp),%eax 80101788: 8b 40 04 mov 0x4(%eax),%eax 8010178b: 3b 45 0c cmp 0xc(%ebp),%eax 8010178e: 75 20 jne 801017b0 <iget+0x61> ip->ref++; 80101790: 8b 45 f4 mov -0xc(%ebp),%eax 80101793: 8b 40 08 mov 0x8(%eax),%eax 80101796: 8d 50 01 lea 0x1(%eax),%edx 80101799: 8b 45 f4 mov -0xc(%ebp),%eax 8010179c: 89 50 08 mov %edx,0x8(%eax) release(&icache.lock); 8010179f: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 801017a6: e8 a1 37 00 00 call 80104f4c <release> return ip; 801017ab: 8b 45 f4 mov -0xc(%ebp),%eax 801017ae: eb 6f jmp 8010181f <iget+0xd0> } if(empty == 0 && ip->ref == 0) // Remember empty slot. 801017b0: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 801017b4: 75 10 jne 801017c6 <iget+0x77> 801017b6: 8b 45 f4 mov -0xc(%ebp),%eax 801017b9: 8b 40 08 mov 0x8(%eax),%eax 801017bc: 85 c0 test %eax,%eax 801017be: 75 06 jne 801017c6 <iget+0x77> empty = ip; 801017c0: 8b 45 f4 mov -0xc(%ebp),%eax 801017c3: 89 45 f0 mov %eax,-0x10(%ebp) acquire(&icache.lock); // Is the inode already cached? empty = 0; for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 801017c6: 83 45 f4 50 addl $0x50,-0xc(%ebp) 801017ca: 81 7d f4 54 f8 10 80 cmpl $0x8010f854,-0xc(%ebp) 801017d1: 72 9e jb 80101771 <iget+0x22> if(empty == 0 && ip->ref == 0) // Remember empty slot. empty = ip; } // Recycle an inode cache entry. if(empty == 0) 801017d3: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 801017d7: 75 0c jne 801017e5 <iget+0x96> panic("iget: no inodes"); 801017d9: c7 04 24 7f 86 10 80 movl $0x8010867f,(%esp) 801017e0: e8 55 ed ff ff call 8010053a <panic> ip = empty; 801017e5: 8b 45 f0 mov -0x10(%ebp),%eax 801017e8: 89 45 f4 mov %eax,-0xc(%ebp) ip->dev = dev; 801017eb: 8b 45 f4 mov -0xc(%ebp),%eax 801017ee: 8b 55 08 mov 0x8(%ebp),%edx 801017f1: 89 10 mov %edx,(%eax) ip->inum = inum; 801017f3: 8b 45 f4 mov -0xc(%ebp),%eax 801017f6: 8b 55 0c mov 0xc(%ebp),%edx 801017f9: 89 50 04 mov %edx,0x4(%eax) ip->ref = 1; 801017fc: 8b 45 f4 mov -0xc(%ebp),%eax 801017ff: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) ip->flags = 0; 80101806: 8b 45 f4 mov -0xc(%ebp),%eax 80101809: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) release(&icache.lock); 80101810: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101817: e8 30 37 00 00 call 80104f4c <release> return ip; 8010181c: 8b 45 f4 mov -0xc(%ebp),%eax } 8010181f: c9 leave 80101820: c3 ret 80101821 <idup>: // Increment reference count for ip. // Returns ip to enable ip = idup(ip1) idiom. struct inode* idup(struct inode *ip) { 80101821: 55 push %ebp 80101822: 89 e5 mov %esp,%ebp 80101824: 83 ec 18 sub $0x18,%esp acquire(&icache.lock); 80101827: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 8010182e: e8 b7 36 00 00 call 80104eea <acquire> ip->ref++; 80101833: 8b 45 08 mov 0x8(%ebp),%eax 80101836: 8b 40 08 mov 0x8(%eax),%eax 80101839: 8d 50 01 lea 0x1(%eax),%edx 8010183c: 8b 45 08 mov 0x8(%ebp),%eax 8010183f: 89 50 08 mov %edx,0x8(%eax) release(&icache.lock); 80101842: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101849: e8 fe 36 00 00 call 80104f4c <release> return ip; 8010184e: 8b 45 08 mov 0x8(%ebp),%eax } 80101851: c9 leave 80101852: c3 ret 80101853 <ilock>: // Lock the given inode. // Reads the inode from disk if necessary. void ilock(struct inode *ip) { 80101853: 55 push %ebp 80101854: 89 e5 mov %esp,%ebp 80101856: 83 ec 28 sub $0x28,%esp struct buf *bp; struct dinode *dip; if(ip == 0 || ip->ref < 1) 80101859: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 8010185d: 74 0a je 80101869 <ilock+0x16> 8010185f: 8b 45 08 mov 0x8(%ebp),%eax 80101862: 8b 40 08 mov 0x8(%eax),%eax 80101865: 85 c0 test %eax,%eax 80101867: 7f 0c jg 80101875 <ilock+0x22> panic("ilock"); 80101869: c7 04 24 8f 86 10 80 movl $0x8010868f,(%esp) 80101870: e8 c5 ec ff ff call 8010053a <panic> acquire(&icache.lock); 80101875: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 8010187c: e8 69 36 00 00 call 80104eea <acquire> while(ip->flags & I_BUSY) 80101881: eb 13 jmp 80101896 <ilock+0x43> sleep(ip, &icache.lock); 80101883: c7 44 24 04 80 e8 10 movl $0x8010e880,0x4(%esp) 8010188a: 80 8010188b: 8b 45 08 mov 0x8(%ebp),%eax 8010188e: 89 04 24 mov %eax,(%esp) 80101891: e8 d1 32 00 00 call 80104b67 <sleep> if(ip == 0 || ip->ref < 1) panic("ilock"); acquire(&icache.lock); while(ip->flags & I_BUSY) 80101896: 8b 45 08 mov 0x8(%ebp),%eax 80101899: 8b 40 0c mov 0xc(%eax),%eax 8010189c: 83 e0 01 and $0x1,%eax 8010189f: 85 c0 test %eax,%eax 801018a1: 75 e0 jne 80101883 <ilock+0x30> sleep(ip, &icache.lock); ip->flags |= I_BUSY; 801018a3: 8b 45 08 mov 0x8(%ebp),%eax 801018a6: 8b 40 0c mov 0xc(%eax),%eax 801018a9: 83 c8 01 or $0x1,%eax 801018ac: 89 c2 mov %eax,%edx 801018ae: 8b 45 08 mov 0x8(%ebp),%eax 801018b1: 89 50 0c mov %edx,0xc(%eax) release(&icache.lock); 801018b4: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 801018bb: e8 8c 36 00 00 call 80104f4c <release> if(!(ip->flags & I_VALID)){ 801018c0: 8b 45 08 mov 0x8(%ebp),%eax 801018c3: 8b 40 0c mov 0xc(%eax),%eax 801018c6: 83 e0 02 and $0x2,%eax 801018c9: 85 c0 test %eax,%eax 801018cb: 0f 85 ce 00 00 00 jne 8010199f <ilock+0x14c> bp = bread(ip->dev, IBLOCK(ip->inum)); 801018d1: 8b 45 08 mov 0x8(%ebp),%eax 801018d4: 8b 40 04 mov 0x4(%eax),%eax 801018d7: c1 e8 03 shr $0x3,%eax 801018da: 8d 50 02 lea 0x2(%eax),%edx 801018dd: 8b 45 08 mov 0x8(%ebp),%eax 801018e0: 8b 00 mov (%eax),%eax 801018e2: 89 54 24 04 mov %edx,0x4(%esp) 801018e6: 89 04 24 mov %eax,(%esp) 801018e9: e8 b8 e8 ff ff call 801001a6 <bread> 801018ee: 89 45 f4 mov %eax,-0xc(%ebp) dip = (struct dinode*)bp->data + ip->inum%IPB; 801018f1: 8b 45 f4 mov -0xc(%ebp),%eax 801018f4: 8d 50 18 lea 0x18(%eax),%edx 801018f7: 8b 45 08 mov 0x8(%ebp),%eax 801018fa: 8b 40 04 mov 0x4(%eax),%eax 801018fd: 83 e0 07 and $0x7,%eax 80101900: c1 e0 06 shl $0x6,%eax 80101903: 01 d0 add %edx,%eax 80101905: 89 45 f0 mov %eax,-0x10(%ebp) ip->type = dip->type; 80101908: 8b 45 f0 mov -0x10(%ebp),%eax 8010190b: 0f b7 10 movzwl (%eax),%edx 8010190e: 8b 45 08 mov 0x8(%ebp),%eax 80101911: 66 89 50 10 mov %dx,0x10(%eax) ip->major = dip->major; 80101915: 8b 45 f0 mov -0x10(%ebp),%eax 80101918: 0f b7 50 02 movzwl 0x2(%eax),%edx 8010191c: 8b 45 08 mov 0x8(%ebp),%eax 8010191f: 66 89 50 12 mov %dx,0x12(%eax) ip->minor = dip->minor; 80101923: 8b 45 f0 mov -0x10(%ebp),%eax 80101926: 0f b7 50 04 movzwl 0x4(%eax),%edx 8010192a: 8b 45 08 mov 0x8(%ebp),%eax 8010192d: 66 89 50 14 mov %dx,0x14(%eax) ip->nlink = dip->nlink; 80101931: 8b 45 f0 mov -0x10(%ebp),%eax 80101934: 0f b7 50 06 movzwl 0x6(%eax),%edx 80101938: 8b 45 08 mov 0x8(%ebp),%eax 8010193b: 66 89 50 16 mov %dx,0x16(%eax) ip->size = dip->size; 8010193f: 8b 45 f0 mov -0x10(%ebp),%eax 80101942: 8b 50 08 mov 0x8(%eax),%edx 80101945: 8b 45 08 mov 0x8(%ebp),%eax 80101948: 89 50 18 mov %edx,0x18(%eax) memmove(ip->addrs, dip->addrs, sizeof(ip->addrs)); 8010194b: 8b 45 f0 mov -0x10(%ebp),%eax 8010194e: 8d 50 0c lea 0xc(%eax),%edx 80101951: 8b 45 08 mov 0x8(%ebp),%eax 80101954: 83 c0 1c add $0x1c,%eax 80101957: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 8010195e: 00 8010195f: 89 54 24 04 mov %edx,0x4(%esp) 80101963: 89 04 24 mov %eax,(%esp) 80101966: e8 a2 38 00 00 call 8010520d <memmove> brelse(bp); 8010196b: 8b 45 f4 mov -0xc(%ebp),%eax 8010196e: 89 04 24 mov %eax,(%esp) 80101971: e8 a1 e8 ff ff call 80100217 <brelse> ip->flags |= I_VALID; 80101976: 8b 45 08 mov 0x8(%ebp),%eax 80101979: 8b 40 0c mov 0xc(%eax),%eax 8010197c: 83 c8 02 or $0x2,%eax 8010197f: 89 c2 mov %eax,%edx 80101981: 8b 45 08 mov 0x8(%ebp),%eax 80101984: 89 50 0c mov %edx,0xc(%eax) if(ip->type == 0) 80101987: 8b 45 08 mov 0x8(%ebp),%eax 8010198a: 0f b7 40 10 movzwl 0x10(%eax),%eax 8010198e: 66 85 c0 test %ax,%ax 80101991: 75 0c jne 8010199f <ilock+0x14c> panic("ilock: no type"); 80101993: c7 04 24 95 86 10 80 movl $0x80108695,(%esp) 8010199a: e8 9b eb ff ff call 8010053a <panic> } } 8010199f: c9 leave 801019a0: c3 ret 801019a1 <iunlock>: // Unlock the given inode. void iunlock(struct inode *ip) { 801019a1: 55 push %ebp 801019a2: 89 e5 mov %esp,%ebp 801019a4: 83 ec 18 sub $0x18,%esp if(ip == 0 || !(ip->flags & I_BUSY) || ip->ref < 1) 801019a7: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 801019ab: 74 17 je 801019c4 <iunlock+0x23> 801019ad: 8b 45 08 mov 0x8(%ebp),%eax 801019b0: 8b 40 0c mov 0xc(%eax),%eax 801019b3: 83 e0 01 and $0x1,%eax 801019b6: 85 c0 test %eax,%eax 801019b8: 74 0a je 801019c4 <iunlock+0x23> 801019ba: 8b 45 08 mov 0x8(%ebp),%eax 801019bd: 8b 40 08 mov 0x8(%eax),%eax 801019c0: 85 c0 test %eax,%eax 801019c2: 7f 0c jg 801019d0 <iunlock+0x2f> panic("iunlock"); 801019c4: c7 04 24 a4 86 10 80 movl $0x801086a4,(%esp) 801019cb: e8 6a eb ff ff call 8010053a <panic> acquire(&icache.lock); 801019d0: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 801019d7: e8 0e 35 00 00 call 80104eea <acquire> ip->flags &= ~I_BUSY; 801019dc: 8b 45 08 mov 0x8(%ebp),%eax 801019df: 8b 40 0c mov 0xc(%eax),%eax 801019e2: 83 e0 fe and $0xfffffffe,%eax 801019e5: 89 c2 mov %eax,%edx 801019e7: 8b 45 08 mov 0x8(%ebp),%eax 801019ea: 89 50 0c mov %edx,0xc(%eax) wakeup(ip); 801019ed: 8b 45 08 mov 0x8(%ebp),%eax 801019f0: 89 04 24 mov %eax,(%esp) 801019f3: e8 b3 32 00 00 call 80104cab <wakeup> release(&icache.lock); 801019f8: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 801019ff: e8 48 35 00 00 call 80104f4c <release> } 80101a04: c9 leave 80101a05: c3 ret 80101a06 <iput>: // be recycled. // If that was the last reference and the inode has no links // to it, free the inode (and its content) on disk. void iput(struct inode *ip) { 80101a06: 55 push %ebp 80101a07: 89 e5 mov %esp,%ebp 80101a09: 83 ec 18 sub $0x18,%esp acquire(&icache.lock); 80101a0c: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101a13: e8 d2 34 00 00 call 80104eea <acquire> if(ip->ref == 1 && (ip->flags & I_VALID) && ip->nlink == 0){ 80101a18: 8b 45 08 mov 0x8(%ebp),%eax 80101a1b: 8b 40 08 mov 0x8(%eax),%eax 80101a1e: 83 f8 01 cmp $0x1,%eax 80101a21: 0f 85 93 00 00 00 jne 80101aba <iput+0xb4> 80101a27: 8b 45 08 mov 0x8(%ebp),%eax 80101a2a: 8b 40 0c mov 0xc(%eax),%eax 80101a2d: 83 e0 02 and $0x2,%eax 80101a30: 85 c0 test %eax,%eax 80101a32: 0f 84 82 00 00 00 je 80101aba <iput+0xb4> 80101a38: 8b 45 08 mov 0x8(%ebp),%eax 80101a3b: 0f b7 40 16 movzwl 0x16(%eax),%eax 80101a3f: 66 85 c0 test %ax,%ax 80101a42: 75 76 jne 80101aba <iput+0xb4> // inode has no links: truncate and free inode. if(ip->flags & I_BUSY) 80101a44: 8b 45 08 mov 0x8(%ebp),%eax 80101a47: 8b 40 0c mov 0xc(%eax),%eax 80101a4a: 83 e0 01 and $0x1,%eax 80101a4d: 85 c0 test %eax,%eax 80101a4f: 74 0c je 80101a5d <iput+0x57> panic("iput busy"); 80101a51: c7 04 24 ac 86 10 80 movl $0x801086ac,(%esp) 80101a58: e8 dd ea ff ff call 8010053a <panic> ip->flags |= I_BUSY; 80101a5d: 8b 45 08 mov 0x8(%ebp),%eax 80101a60: 8b 40 0c mov 0xc(%eax),%eax 80101a63: 83 c8 01 or $0x1,%eax 80101a66: 89 c2 mov %eax,%edx 80101a68: 8b 45 08 mov 0x8(%ebp),%eax 80101a6b: 89 50 0c mov %edx,0xc(%eax) release(&icache.lock); 80101a6e: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101a75: e8 d2 34 00 00 call 80104f4c <release> itrunc(ip); 80101a7a: 8b 45 08 mov 0x8(%ebp),%eax 80101a7d: 89 04 24 mov %eax,(%esp) 80101a80: e8 7d 01 00 00 call 80101c02 <itrunc> ip->type = 0; 80101a85: 8b 45 08 mov 0x8(%ebp),%eax 80101a88: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) iupdate(ip); 80101a8e: 8b 45 08 mov 0x8(%ebp),%eax 80101a91: 89 04 24 mov %eax,(%esp) 80101a94: e8 fe fb ff ff call 80101697 <iupdate> acquire(&icache.lock); 80101a99: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101aa0: e8 45 34 00 00 call 80104eea <acquire> ip->flags = 0; 80101aa5: 8b 45 08 mov 0x8(%ebp),%eax 80101aa8: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) wakeup(ip); 80101aaf: 8b 45 08 mov 0x8(%ebp),%eax 80101ab2: 89 04 24 mov %eax,(%esp) 80101ab5: e8 f1 31 00 00 call 80104cab <wakeup> } ip->ref--; 80101aba: 8b 45 08 mov 0x8(%ebp),%eax 80101abd: 8b 40 08 mov 0x8(%eax),%eax 80101ac0: 8d 50 ff lea -0x1(%eax),%edx 80101ac3: 8b 45 08 mov 0x8(%ebp),%eax 80101ac6: 89 50 08 mov %edx,0x8(%eax) release(&icache.lock); 80101ac9: c7 04 24 80 e8 10 80 movl $0x8010e880,(%esp) 80101ad0: e8 77 34 00 00 call 80104f4c <release> } 80101ad5: c9 leave 80101ad6: c3 ret 80101ad7 <iunlockput>: // Common idiom: unlock, then put. void iunlockput(struct inode *ip) { 80101ad7: 55 push %ebp 80101ad8: 89 e5 mov %esp,%ebp 80101ada: 83 ec 18 sub $0x18,%esp iunlock(ip); 80101add: 8b 45 08 mov 0x8(%ebp),%eax 80101ae0: 89 04 24 mov %eax,(%esp) 80101ae3: e8 b9 fe ff ff call 801019a1 <iunlock> iput(ip); 80101ae8: 8b 45 08 mov 0x8(%ebp),%eax 80101aeb: 89 04 24 mov %eax,(%esp) 80101aee: e8 13 ff ff ff call 80101a06 <iput> } 80101af3: c9 leave 80101af4: c3 ret 80101af5 <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) { 80101af5: 55 push %ebp 80101af6: 89 e5 mov %esp,%ebp 80101af8: 53 push %ebx 80101af9: 83 ec 24 sub $0x24,%esp uint addr, *a; struct buf *bp; if(bn < NDIRECT){ 80101afc: 83 7d 0c 0b cmpl $0xb,0xc(%ebp) 80101b00: 77 3e ja 80101b40 <bmap+0x4b> if((addr = ip->addrs[bn]) == 0) 80101b02: 8b 45 08 mov 0x8(%ebp),%eax 80101b05: 8b 55 0c mov 0xc(%ebp),%edx 80101b08: 83 c2 04 add $0x4,%edx 80101b0b: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax 80101b0f: 89 45 f4 mov %eax,-0xc(%ebp) 80101b12: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80101b16: 75 20 jne 80101b38 <bmap+0x43> ip->addrs[bn] = addr = balloc(ip->dev); 80101b18: 8b 45 08 mov 0x8(%ebp),%eax 80101b1b: 8b 00 mov (%eax),%eax 80101b1d: 89 04 24 mov %eax,(%esp) 80101b20: e8 5b f8 ff ff call 80101380 <balloc> 80101b25: 89 45 f4 mov %eax,-0xc(%ebp) 80101b28: 8b 45 08 mov 0x8(%ebp),%eax 80101b2b: 8b 55 0c mov 0xc(%ebp),%edx 80101b2e: 8d 4a 04 lea 0x4(%edx),%ecx 80101b31: 8b 55 f4 mov -0xc(%ebp),%edx 80101b34: 89 54 88 0c mov %edx,0xc(%eax,%ecx,4) return addr; 80101b38: 8b 45 f4 mov -0xc(%ebp),%eax 80101b3b: e9 bc 00 00 00 jmp 80101bfc <bmap+0x107> } bn -= NDIRECT; 80101b40: 83 6d 0c 0c subl $0xc,0xc(%ebp) if(bn < NINDIRECT){ 80101b44: 83 7d 0c 7f cmpl $0x7f,0xc(%ebp) 80101b48: 0f 87 a2 00 00 00 ja 80101bf0 <bmap+0xfb> // Load indirect block, allocating if necessary. if((addr = ip->addrs[NDIRECT]) == 0) 80101b4e: 8b 45 08 mov 0x8(%ebp),%eax 80101b51: 8b 40 4c mov 0x4c(%eax),%eax 80101b54: 89 45 f4 mov %eax,-0xc(%ebp) 80101b57: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80101b5b: 75 19 jne 80101b76 <bmap+0x81> ip->addrs[NDIRECT] = addr = balloc(ip->dev); 80101b5d: 8b 45 08 mov 0x8(%ebp),%eax 80101b60: 8b 00 mov (%eax),%eax 80101b62: 89 04 24 mov %eax,(%esp) 80101b65: e8 16 f8 ff ff call 80101380 <balloc> 80101b6a: 89 45 f4 mov %eax,-0xc(%ebp) 80101b6d: 8b 45 08 mov 0x8(%ebp),%eax 80101b70: 8b 55 f4 mov -0xc(%ebp),%edx 80101b73: 89 50 4c mov %edx,0x4c(%eax) bp = bread(ip->dev, addr); 80101b76: 8b 45 08 mov 0x8(%ebp),%eax 80101b79: 8b 00 mov (%eax),%eax 80101b7b: 8b 55 f4 mov -0xc(%ebp),%edx 80101b7e: 89 54 24 04 mov %edx,0x4(%esp) 80101b82: 89 04 24 mov %eax,(%esp) 80101b85: e8 1c e6 ff ff call 801001a6 <bread> 80101b8a: 89 45 f0 mov %eax,-0x10(%ebp) a = (uint*)bp->data; 80101b8d: 8b 45 f0 mov -0x10(%ebp),%eax 80101b90: 83 c0 18 add $0x18,%eax 80101b93: 89 45 ec mov %eax,-0x14(%ebp) if((addr = a[bn]) == 0){ 80101b96: 8b 45 0c mov 0xc(%ebp),%eax 80101b99: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80101ba0: 8b 45 ec mov -0x14(%ebp),%eax 80101ba3: 01 d0 add %edx,%eax 80101ba5: 8b 00 mov (%eax),%eax 80101ba7: 89 45 f4 mov %eax,-0xc(%ebp) 80101baa: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80101bae: 75 30 jne 80101be0 <bmap+0xeb> a[bn] = addr = balloc(ip->dev); 80101bb0: 8b 45 0c mov 0xc(%ebp),%eax 80101bb3: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80101bba: 8b 45 ec mov -0x14(%ebp),%eax 80101bbd: 8d 1c 02 lea (%edx,%eax,1),%ebx 80101bc0: 8b 45 08 mov 0x8(%ebp),%eax 80101bc3: 8b 00 mov (%eax),%eax 80101bc5: 89 04 24 mov %eax,(%esp) 80101bc8: e8 b3 f7 ff ff call 80101380 <balloc> 80101bcd: 89 45 f4 mov %eax,-0xc(%ebp) 80101bd0: 8b 45 f4 mov -0xc(%ebp),%eax 80101bd3: 89 03 mov %eax,(%ebx) log_write(bp); 80101bd5: 8b 45 f0 mov -0x10(%ebp),%eax 80101bd8: 89 04 24 mov %eax,(%esp) 80101bdb: e8 9e 16 00 00 call 8010327e <log_write> } brelse(bp); 80101be0: 8b 45 f0 mov -0x10(%ebp),%eax 80101be3: 89 04 24 mov %eax,(%esp) 80101be6: e8 2c e6 ff ff call 80100217 <brelse> return addr; 80101beb: 8b 45 f4 mov -0xc(%ebp),%eax 80101bee: eb 0c jmp 80101bfc <bmap+0x107> } panic("bmap: out of range"); 80101bf0: c7 04 24 b6 86 10 80 movl $0x801086b6,(%esp) 80101bf7: e8 3e e9 ff ff call 8010053a <panic> } 80101bfc: 83 c4 24 add $0x24,%esp 80101bff: 5b pop %ebx 80101c00: 5d pop %ebp 80101c01: c3 ret 80101c02 <itrunc>: // to it (no directory entries referring to it) // and has no in-memory reference to it (is // not an open file or current directory). static void itrunc(struct inode *ip) { 80101c02: 55 push %ebp 80101c03: 89 e5 mov %esp,%ebp 80101c05: 83 ec 28 sub $0x28,%esp int i, j; struct buf *bp; uint *a; for(i = 0; i < NDIRECT; i++){ 80101c08: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80101c0f: eb 44 jmp 80101c55 <itrunc+0x53> if(ip->addrs[i]){ 80101c11: 8b 45 08 mov 0x8(%ebp),%eax 80101c14: 8b 55 f4 mov -0xc(%ebp),%edx 80101c17: 83 c2 04 add $0x4,%edx 80101c1a: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax 80101c1e: 85 c0 test %eax,%eax 80101c20: 74 2f je 80101c51 <itrunc+0x4f> bfree(ip->dev, ip->addrs[i]); 80101c22: 8b 45 08 mov 0x8(%ebp),%eax 80101c25: 8b 55 f4 mov -0xc(%ebp),%edx 80101c28: 83 c2 04 add $0x4,%edx 80101c2b: 8b 54 90 0c mov 0xc(%eax,%edx,4),%edx 80101c2f: 8b 45 08 mov 0x8(%ebp),%eax 80101c32: 8b 00 mov (%eax),%eax 80101c34: 89 54 24 04 mov %edx,0x4(%esp) 80101c38: 89 04 24 mov %eax,(%esp) 80101c3b: e8 8e f8 ff ff call 801014ce <bfree> ip->addrs[i] = 0; 80101c40: 8b 45 08 mov 0x8(%ebp),%eax 80101c43: 8b 55 f4 mov -0xc(%ebp),%edx 80101c46: 83 c2 04 add $0x4,%edx 80101c49: c7 44 90 0c 00 00 00 movl $0x0,0xc(%eax,%edx,4) 80101c50: 00 { int i, j; struct buf *bp; uint *a; for(i = 0; i < NDIRECT; i++){ 80101c51: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80101c55: 83 7d f4 0b cmpl $0xb,-0xc(%ebp) 80101c59: 7e b6 jle 80101c11 <itrunc+0xf> bfree(ip->dev, ip->addrs[i]); ip->addrs[i] = 0; } } if(ip->addrs[NDIRECT]){ 80101c5b: 8b 45 08 mov 0x8(%ebp),%eax 80101c5e: 8b 40 4c mov 0x4c(%eax),%eax 80101c61: 85 c0 test %eax,%eax 80101c63: 0f 84 9b 00 00 00 je 80101d04 <itrunc+0x102> bp = bread(ip->dev, ip->addrs[NDIRECT]); 80101c69: 8b 45 08 mov 0x8(%ebp),%eax 80101c6c: 8b 50 4c mov 0x4c(%eax),%edx 80101c6f: 8b 45 08 mov 0x8(%ebp),%eax 80101c72: 8b 00 mov (%eax),%eax 80101c74: 89 54 24 04 mov %edx,0x4(%esp) 80101c78: 89 04 24 mov %eax,(%esp) 80101c7b: e8 26 e5 ff ff call 801001a6 <bread> 80101c80: 89 45 ec mov %eax,-0x14(%ebp) a = (uint*)bp->data; 80101c83: 8b 45 ec mov -0x14(%ebp),%eax 80101c86: 83 c0 18 add $0x18,%eax 80101c89: 89 45 e8 mov %eax,-0x18(%ebp) for(j = 0; j < NINDIRECT; j++){ 80101c8c: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 80101c93: eb 3b jmp 80101cd0 <itrunc+0xce> if(a[j]) 80101c95: 8b 45 f0 mov -0x10(%ebp),%eax 80101c98: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80101c9f: 8b 45 e8 mov -0x18(%ebp),%eax 80101ca2: 01 d0 add %edx,%eax 80101ca4: 8b 00 mov (%eax),%eax 80101ca6: 85 c0 test %eax,%eax 80101ca8: 74 22 je 80101ccc <itrunc+0xca> bfree(ip->dev, a[j]); 80101caa: 8b 45 f0 mov -0x10(%ebp),%eax 80101cad: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80101cb4: 8b 45 e8 mov -0x18(%ebp),%eax 80101cb7: 01 d0 add %edx,%eax 80101cb9: 8b 10 mov (%eax),%edx 80101cbb: 8b 45 08 mov 0x8(%ebp),%eax 80101cbe: 8b 00 mov (%eax),%eax 80101cc0: 89 54 24 04 mov %edx,0x4(%esp) 80101cc4: 89 04 24 mov %eax,(%esp) 80101cc7: e8 02 f8 ff ff call 801014ce <bfree> } if(ip->addrs[NDIRECT]){ bp = bread(ip->dev, ip->addrs[NDIRECT]); a = (uint*)bp->data; for(j = 0; j < NINDIRECT; j++){ 80101ccc: 83 45 f0 01 addl $0x1,-0x10(%ebp) 80101cd0: 8b 45 f0 mov -0x10(%ebp),%eax 80101cd3: 83 f8 7f cmp $0x7f,%eax 80101cd6: 76 bd jbe 80101c95 <itrunc+0x93> if(a[j]) bfree(ip->dev, a[j]); } brelse(bp); 80101cd8: 8b 45 ec mov -0x14(%ebp),%eax 80101cdb: 89 04 24 mov %eax,(%esp) 80101cde: e8 34 e5 ff ff call 80100217 <brelse> bfree(ip->dev, ip->addrs[NDIRECT]); 80101ce3: 8b 45 08 mov 0x8(%ebp),%eax 80101ce6: 8b 50 4c mov 0x4c(%eax),%edx 80101ce9: 8b 45 08 mov 0x8(%ebp),%eax 80101cec: 8b 00 mov (%eax),%eax 80101cee: 89 54 24 04 mov %edx,0x4(%esp) 80101cf2: 89 04 24 mov %eax,(%esp) 80101cf5: e8 d4 f7 ff ff call 801014ce <bfree> ip->addrs[NDIRECT] = 0; 80101cfa: 8b 45 08 mov 0x8(%ebp),%eax 80101cfd: c7 40 4c 00 00 00 00 movl $0x0,0x4c(%eax) } ip->size = 0; 80101d04: 8b 45 08 mov 0x8(%ebp),%eax 80101d07: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) iupdate(ip); 80101d0e: 8b 45 08 mov 0x8(%ebp),%eax 80101d11: 89 04 24 mov %eax,(%esp) 80101d14: e8 7e f9 ff ff call 80101697 <iupdate> } 80101d19: c9 leave 80101d1a: c3 ret 80101d1b <stati>: // Copy stat information from inode. void stati(struct inode *ip, struct stat *st) { 80101d1b: 55 push %ebp 80101d1c: 89 e5 mov %esp,%ebp st->dev = ip->dev; 80101d1e: 8b 45 08 mov 0x8(%ebp),%eax 80101d21: 8b 00 mov (%eax),%eax 80101d23: 89 c2 mov %eax,%edx 80101d25: 8b 45 0c mov 0xc(%ebp),%eax 80101d28: 89 50 04 mov %edx,0x4(%eax) st->ino = ip->inum; 80101d2b: 8b 45 08 mov 0x8(%ebp),%eax 80101d2e: 8b 50 04 mov 0x4(%eax),%edx 80101d31: 8b 45 0c mov 0xc(%ebp),%eax 80101d34: 89 50 08 mov %edx,0x8(%eax) st->type = ip->type; 80101d37: 8b 45 08 mov 0x8(%ebp),%eax 80101d3a: 0f b7 50 10 movzwl 0x10(%eax),%edx 80101d3e: 8b 45 0c mov 0xc(%ebp),%eax 80101d41: 66 89 10 mov %dx,(%eax) st->nlink = ip->nlink; 80101d44: 8b 45 08 mov 0x8(%ebp),%eax 80101d47: 0f b7 50 16 movzwl 0x16(%eax),%edx 80101d4b: 8b 45 0c mov 0xc(%ebp),%eax 80101d4e: 66 89 50 0c mov %dx,0xc(%eax) st->size = ip->size; 80101d52: 8b 45 08 mov 0x8(%ebp),%eax 80101d55: 8b 50 18 mov 0x18(%eax),%edx 80101d58: 8b 45 0c mov 0xc(%ebp),%eax 80101d5b: 89 50 10 mov %edx,0x10(%eax) } 80101d5e: 5d pop %ebp 80101d5f: c3 ret 80101d60 <readi>: //PAGEBREAK! // Read data from inode. int readi(struct inode *ip, char *dst, uint off, uint n) { 80101d60: 55 push %ebp 80101d61: 89 e5 mov %esp,%ebp 80101d63: 83 ec 28 sub $0x28,%esp uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 80101d66: 8b 45 08 mov 0x8(%ebp),%eax 80101d69: 0f b7 40 10 movzwl 0x10(%eax),%eax 80101d6d: 66 83 f8 03 cmp $0x3,%ax 80101d71: 75 60 jne 80101dd3 <readi+0x73> if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read) 80101d73: 8b 45 08 mov 0x8(%ebp),%eax 80101d76: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101d7a: 66 85 c0 test %ax,%ax 80101d7d: 78 20 js 80101d9f <readi+0x3f> 80101d7f: 8b 45 08 mov 0x8(%ebp),%eax 80101d82: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101d86: 66 83 f8 09 cmp $0x9,%ax 80101d8a: 7f 13 jg 80101d9f <readi+0x3f> 80101d8c: 8b 45 08 mov 0x8(%ebp),%eax 80101d8f: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101d93: 98 cwtl 80101d94: 8b 04 c5 20 e8 10 80 mov -0x7fef17e0(,%eax,8),%eax 80101d9b: 85 c0 test %eax,%eax 80101d9d: 75 0a jne 80101da9 <readi+0x49> return -1; 80101d9f: b8 ff ff ff ff mov $0xffffffff,%eax 80101da4: e9 19 01 00 00 jmp 80101ec2 <readi+0x162> return devsw[ip->major].read(ip, dst, n); 80101da9: 8b 45 08 mov 0x8(%ebp),%eax 80101dac: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101db0: 98 cwtl 80101db1: 8b 04 c5 20 e8 10 80 mov -0x7fef17e0(,%eax,8),%eax 80101db8: 8b 55 14 mov 0x14(%ebp),%edx 80101dbb: 89 54 24 08 mov %edx,0x8(%esp) 80101dbf: 8b 55 0c mov 0xc(%ebp),%edx 80101dc2: 89 54 24 04 mov %edx,0x4(%esp) 80101dc6: 8b 55 08 mov 0x8(%ebp),%edx 80101dc9: 89 14 24 mov %edx,(%esp) 80101dcc: ff d0 call *%eax 80101dce: e9 ef 00 00 00 jmp 80101ec2 <readi+0x162> } if(off > ip->size || off + n < off) 80101dd3: 8b 45 08 mov 0x8(%ebp),%eax 80101dd6: 8b 40 18 mov 0x18(%eax),%eax 80101dd9: 3b 45 10 cmp 0x10(%ebp),%eax 80101ddc: 72 0d jb 80101deb <readi+0x8b> 80101dde: 8b 45 14 mov 0x14(%ebp),%eax 80101de1: 8b 55 10 mov 0x10(%ebp),%edx 80101de4: 01 d0 add %edx,%eax 80101de6: 3b 45 10 cmp 0x10(%ebp),%eax 80101de9: 73 0a jae 80101df5 <readi+0x95> return -1; 80101deb: b8 ff ff ff ff mov $0xffffffff,%eax 80101df0: e9 cd 00 00 00 jmp 80101ec2 <readi+0x162> if(off + n > ip->size) 80101df5: 8b 45 14 mov 0x14(%ebp),%eax 80101df8: 8b 55 10 mov 0x10(%ebp),%edx 80101dfb: 01 c2 add %eax,%edx 80101dfd: 8b 45 08 mov 0x8(%ebp),%eax 80101e00: 8b 40 18 mov 0x18(%eax),%eax 80101e03: 39 c2 cmp %eax,%edx 80101e05: 76 0c jbe 80101e13 <readi+0xb3> n = ip->size - off; 80101e07: 8b 45 08 mov 0x8(%ebp),%eax 80101e0a: 8b 40 18 mov 0x18(%eax),%eax 80101e0d: 2b 45 10 sub 0x10(%ebp),%eax 80101e10: 89 45 14 mov %eax,0x14(%ebp) for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 80101e13: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80101e1a: e9 94 00 00 00 jmp 80101eb3 <readi+0x153> bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101e1f: 8b 45 10 mov 0x10(%ebp),%eax 80101e22: c1 e8 09 shr $0x9,%eax 80101e25: 89 44 24 04 mov %eax,0x4(%esp) 80101e29: 8b 45 08 mov 0x8(%ebp),%eax 80101e2c: 89 04 24 mov %eax,(%esp) 80101e2f: e8 c1 fc ff ff call 80101af5 <bmap> 80101e34: 8b 55 08 mov 0x8(%ebp),%edx 80101e37: 8b 12 mov (%edx),%edx 80101e39: 89 44 24 04 mov %eax,0x4(%esp) 80101e3d: 89 14 24 mov %edx,(%esp) 80101e40: e8 61 e3 ff ff call 801001a6 <bread> 80101e45: 89 45 f0 mov %eax,-0x10(%ebp) m = min(n - tot, BSIZE - off%BSIZE); 80101e48: 8b 45 10 mov 0x10(%ebp),%eax 80101e4b: 25 ff 01 00 00 and $0x1ff,%eax 80101e50: 89 c2 mov %eax,%edx 80101e52: b8 00 02 00 00 mov $0x200,%eax 80101e57: 29 d0 sub %edx,%eax 80101e59: 89 c2 mov %eax,%edx 80101e5b: 8b 45 f4 mov -0xc(%ebp),%eax 80101e5e: 8b 4d 14 mov 0x14(%ebp),%ecx 80101e61: 29 c1 sub %eax,%ecx 80101e63: 89 c8 mov %ecx,%eax 80101e65: 39 c2 cmp %eax,%edx 80101e67: 0f 46 c2 cmovbe %edx,%eax 80101e6a: 89 45 ec mov %eax,-0x14(%ebp) memmove(dst, bp->data + off%BSIZE, m); 80101e6d: 8b 45 10 mov 0x10(%ebp),%eax 80101e70: 25 ff 01 00 00 and $0x1ff,%eax 80101e75: 8d 50 10 lea 0x10(%eax),%edx 80101e78: 8b 45 f0 mov -0x10(%ebp),%eax 80101e7b: 01 d0 add %edx,%eax 80101e7d: 8d 50 08 lea 0x8(%eax),%edx 80101e80: 8b 45 ec mov -0x14(%ebp),%eax 80101e83: 89 44 24 08 mov %eax,0x8(%esp) 80101e87: 89 54 24 04 mov %edx,0x4(%esp) 80101e8b: 8b 45 0c mov 0xc(%ebp),%eax 80101e8e: 89 04 24 mov %eax,(%esp) 80101e91: e8 77 33 00 00 call 8010520d <memmove> brelse(bp); 80101e96: 8b 45 f0 mov -0x10(%ebp),%eax 80101e99: 89 04 24 mov %eax,(%esp) 80101e9c: e8 76 e3 ff ff call 80100217 <brelse> if(off > ip->size || off + n < off) return -1; if(off + n > ip->size) n = ip->size - off; for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 80101ea1: 8b 45 ec mov -0x14(%ebp),%eax 80101ea4: 01 45 f4 add %eax,-0xc(%ebp) 80101ea7: 8b 45 ec mov -0x14(%ebp),%eax 80101eaa: 01 45 10 add %eax,0x10(%ebp) 80101ead: 8b 45 ec mov -0x14(%ebp),%eax 80101eb0: 01 45 0c add %eax,0xc(%ebp) 80101eb3: 8b 45 f4 mov -0xc(%ebp),%eax 80101eb6: 3b 45 14 cmp 0x14(%ebp),%eax 80101eb9: 0f 82 60 ff ff ff jb 80101e1f <readi+0xbf> bp = bread(ip->dev, bmap(ip, off/BSIZE)); m = min(n - tot, BSIZE - off%BSIZE); memmove(dst, bp->data + off%BSIZE, m); brelse(bp); } return n; 80101ebf: 8b 45 14 mov 0x14(%ebp),%eax } 80101ec2: c9 leave 80101ec3: c3 ret 80101ec4 <writei>: // PAGEBREAK! // Write data to inode. int writei(struct inode *ip, char *src, uint off, uint n) { 80101ec4: 55 push %ebp 80101ec5: 89 e5 mov %esp,%ebp 80101ec7: 83 ec 28 sub $0x28,%esp uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 80101eca: 8b 45 08 mov 0x8(%ebp),%eax 80101ecd: 0f b7 40 10 movzwl 0x10(%eax),%eax 80101ed1: 66 83 f8 03 cmp $0x3,%ax 80101ed5: 75 60 jne 80101f37 <writei+0x73> if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write) 80101ed7: 8b 45 08 mov 0x8(%ebp),%eax 80101eda: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101ede: 66 85 c0 test %ax,%ax 80101ee1: 78 20 js 80101f03 <writei+0x3f> 80101ee3: 8b 45 08 mov 0x8(%ebp),%eax 80101ee6: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101eea: 66 83 f8 09 cmp $0x9,%ax 80101eee: 7f 13 jg 80101f03 <writei+0x3f> 80101ef0: 8b 45 08 mov 0x8(%ebp),%eax 80101ef3: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101ef7: 98 cwtl 80101ef8: 8b 04 c5 24 e8 10 80 mov -0x7fef17dc(,%eax,8),%eax 80101eff: 85 c0 test %eax,%eax 80101f01: 75 0a jne 80101f0d <writei+0x49> return -1; 80101f03: b8 ff ff ff ff mov $0xffffffff,%eax 80101f08: e9 44 01 00 00 jmp 80102051 <writei+0x18d> return devsw[ip->major].write(ip, src, n); 80101f0d: 8b 45 08 mov 0x8(%ebp),%eax 80101f10: 0f b7 40 12 movzwl 0x12(%eax),%eax 80101f14: 98 cwtl 80101f15: 8b 04 c5 24 e8 10 80 mov -0x7fef17dc(,%eax,8),%eax 80101f1c: 8b 55 14 mov 0x14(%ebp),%edx 80101f1f: 89 54 24 08 mov %edx,0x8(%esp) 80101f23: 8b 55 0c mov 0xc(%ebp),%edx 80101f26: 89 54 24 04 mov %edx,0x4(%esp) 80101f2a: 8b 55 08 mov 0x8(%ebp),%edx 80101f2d: 89 14 24 mov %edx,(%esp) 80101f30: ff d0 call *%eax 80101f32: e9 1a 01 00 00 jmp 80102051 <writei+0x18d> } if(off > ip->size || off + n < off) 80101f37: 8b 45 08 mov 0x8(%ebp),%eax 80101f3a: 8b 40 18 mov 0x18(%eax),%eax 80101f3d: 3b 45 10 cmp 0x10(%ebp),%eax 80101f40: 72 0d jb 80101f4f <writei+0x8b> 80101f42: 8b 45 14 mov 0x14(%ebp),%eax 80101f45: 8b 55 10 mov 0x10(%ebp),%edx 80101f48: 01 d0 add %edx,%eax 80101f4a: 3b 45 10 cmp 0x10(%ebp),%eax 80101f4d: 73 0a jae 80101f59 <writei+0x95> return -1; 80101f4f: b8 ff ff ff ff mov $0xffffffff,%eax 80101f54: e9 f8 00 00 00 jmp 80102051 <writei+0x18d> if(off + n > MAXFILE*BSIZE) 80101f59: 8b 45 14 mov 0x14(%ebp),%eax 80101f5c: 8b 55 10 mov 0x10(%ebp),%edx 80101f5f: 01 d0 add %edx,%eax 80101f61: 3d 00 18 01 00 cmp $0x11800,%eax 80101f66: 76 0a jbe 80101f72 <writei+0xae> return -1; 80101f68: b8 ff ff ff ff mov $0xffffffff,%eax 80101f6d: e9 df 00 00 00 jmp 80102051 <writei+0x18d> for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101f72: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80101f79: e9 9f 00 00 00 jmp 8010201d <writei+0x159> bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101f7e: 8b 45 10 mov 0x10(%ebp),%eax 80101f81: c1 e8 09 shr $0x9,%eax 80101f84: 89 44 24 04 mov %eax,0x4(%esp) 80101f88: 8b 45 08 mov 0x8(%ebp),%eax 80101f8b: 89 04 24 mov %eax,(%esp) 80101f8e: e8 62 fb ff ff call 80101af5 <bmap> 80101f93: 8b 55 08 mov 0x8(%ebp),%edx 80101f96: 8b 12 mov (%edx),%edx 80101f98: 89 44 24 04 mov %eax,0x4(%esp) 80101f9c: 89 14 24 mov %edx,(%esp) 80101f9f: e8 02 e2 ff ff call 801001a6 <bread> 80101fa4: 89 45 f0 mov %eax,-0x10(%ebp) m = min(n - tot, BSIZE - off%BSIZE); 80101fa7: 8b 45 10 mov 0x10(%ebp),%eax 80101faa: 25 ff 01 00 00 and $0x1ff,%eax 80101faf: 89 c2 mov %eax,%edx 80101fb1: b8 00 02 00 00 mov $0x200,%eax 80101fb6: 29 d0 sub %edx,%eax 80101fb8: 89 c2 mov %eax,%edx 80101fba: 8b 45 f4 mov -0xc(%ebp),%eax 80101fbd: 8b 4d 14 mov 0x14(%ebp),%ecx 80101fc0: 29 c1 sub %eax,%ecx 80101fc2: 89 c8 mov %ecx,%eax 80101fc4: 39 c2 cmp %eax,%edx 80101fc6: 0f 46 c2 cmovbe %edx,%eax 80101fc9: 89 45 ec mov %eax,-0x14(%ebp) memmove(bp->data + off%BSIZE, src, m); 80101fcc: 8b 45 10 mov 0x10(%ebp),%eax 80101fcf: 25 ff 01 00 00 and $0x1ff,%eax 80101fd4: 8d 50 10 lea 0x10(%eax),%edx 80101fd7: 8b 45 f0 mov -0x10(%ebp),%eax 80101fda: 01 d0 add %edx,%eax 80101fdc: 8d 50 08 lea 0x8(%eax),%edx 80101fdf: 8b 45 ec mov -0x14(%ebp),%eax 80101fe2: 89 44 24 08 mov %eax,0x8(%esp) 80101fe6: 8b 45 0c mov 0xc(%ebp),%eax 80101fe9: 89 44 24 04 mov %eax,0x4(%esp) 80101fed: 89 14 24 mov %edx,(%esp) 80101ff0: e8 18 32 00 00 call 8010520d <memmove> log_write(bp); 80101ff5: 8b 45 f0 mov -0x10(%ebp),%eax 80101ff8: 89 04 24 mov %eax,(%esp) 80101ffb: e8 7e 12 00 00 call 8010327e <log_write> brelse(bp); 80102000: 8b 45 f0 mov -0x10(%ebp),%eax 80102003: 89 04 24 mov %eax,(%esp) 80102006: e8 0c e2 ff ff call 80100217 <brelse> if(off > ip->size || off + n < off) return -1; if(off + n > MAXFILE*BSIZE) return -1; for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 8010200b: 8b 45 ec mov -0x14(%ebp),%eax 8010200e: 01 45 f4 add %eax,-0xc(%ebp) 80102011: 8b 45 ec mov -0x14(%ebp),%eax 80102014: 01 45 10 add %eax,0x10(%ebp) 80102017: 8b 45 ec mov -0x14(%ebp),%eax 8010201a: 01 45 0c add %eax,0xc(%ebp) 8010201d: 8b 45 f4 mov -0xc(%ebp),%eax 80102020: 3b 45 14 cmp 0x14(%ebp),%eax 80102023: 0f 82 55 ff ff ff jb 80101f7e <writei+0xba> memmove(bp->data + off%BSIZE, src, m); log_write(bp); brelse(bp); } if(n > 0 && off > ip->size){ 80102029: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 8010202d: 74 1f je 8010204e <writei+0x18a> 8010202f: 8b 45 08 mov 0x8(%ebp),%eax 80102032: 8b 40 18 mov 0x18(%eax),%eax 80102035: 3b 45 10 cmp 0x10(%ebp),%eax 80102038: 73 14 jae 8010204e <writei+0x18a> ip->size = off; 8010203a: 8b 45 08 mov 0x8(%ebp),%eax 8010203d: 8b 55 10 mov 0x10(%ebp),%edx 80102040: 89 50 18 mov %edx,0x18(%eax) iupdate(ip); 80102043: 8b 45 08 mov 0x8(%ebp),%eax 80102046: 89 04 24 mov %eax,(%esp) 80102049: e8 49 f6 ff ff call 80101697 <iupdate> } return n; 8010204e: 8b 45 14 mov 0x14(%ebp),%eax } 80102051: c9 leave 80102052: c3 ret 80102053 <namecmp>: //PAGEBREAK! // Directories int namecmp(const char *s, const char *t) { 80102053: 55 push %ebp 80102054: 89 e5 mov %esp,%ebp 80102056: 83 ec 18 sub $0x18,%esp return strncmp(s, t, DIRSIZ); 80102059: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80102060: 00 80102061: 8b 45 0c mov 0xc(%ebp),%eax 80102064: 89 44 24 04 mov %eax,0x4(%esp) 80102068: 8b 45 08 mov 0x8(%ebp),%eax 8010206b: 89 04 24 mov %eax,(%esp) 8010206e: e8 3d 32 00 00 call 801052b0 <strncmp> } 80102073: c9 leave 80102074: c3 ret 80102075 <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) { 80102075: 55 push %ebp 80102076: 89 e5 mov %esp,%ebp 80102078: 83 ec 38 sub $0x38,%esp uint off, inum; struct dirent de; if(dp->type != T_DIR) 8010207b: 8b 45 08 mov 0x8(%ebp),%eax 8010207e: 0f b7 40 10 movzwl 0x10(%eax),%eax 80102082: 66 83 f8 01 cmp $0x1,%ax 80102086: 74 0c je 80102094 <dirlookup+0x1f> panic("dirlookup not DIR"); 80102088: c7 04 24 c9 86 10 80 movl $0x801086c9,(%esp) 8010208f: e8 a6 e4 ff ff call 8010053a <panic> for(off = 0; off < dp->size; off += sizeof(de)){ 80102094: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 8010209b: e9 88 00 00 00 jmp 80102128 <dirlookup+0xb3> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 801020a0: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 801020a7: 00 801020a8: 8b 45 f4 mov -0xc(%ebp),%eax 801020ab: 89 44 24 08 mov %eax,0x8(%esp) 801020af: 8d 45 e0 lea -0x20(%ebp),%eax 801020b2: 89 44 24 04 mov %eax,0x4(%esp) 801020b6: 8b 45 08 mov 0x8(%ebp),%eax 801020b9: 89 04 24 mov %eax,(%esp) 801020bc: e8 9f fc ff ff call 80101d60 <readi> 801020c1: 83 f8 10 cmp $0x10,%eax 801020c4: 74 0c je 801020d2 <dirlookup+0x5d> panic("dirlink read"); 801020c6: c7 04 24 db 86 10 80 movl $0x801086db,(%esp) 801020cd: e8 68 e4 ff ff call 8010053a <panic> if(de.inum == 0) 801020d2: 0f b7 45 e0 movzwl -0x20(%ebp),%eax 801020d6: 66 85 c0 test %ax,%ax 801020d9: 75 02 jne 801020dd <dirlookup+0x68> continue; 801020db: eb 47 jmp 80102124 <dirlookup+0xaf> if(namecmp(name, de.name) == 0){ 801020dd: 8d 45 e0 lea -0x20(%ebp),%eax 801020e0: 83 c0 02 add $0x2,%eax 801020e3: 89 44 24 04 mov %eax,0x4(%esp) 801020e7: 8b 45 0c mov 0xc(%ebp),%eax 801020ea: 89 04 24 mov %eax,(%esp) 801020ed: e8 61 ff ff ff call 80102053 <namecmp> 801020f2: 85 c0 test %eax,%eax 801020f4: 75 2e jne 80102124 <dirlookup+0xaf> // entry matches path element if(poff) 801020f6: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801020fa: 74 08 je 80102104 <dirlookup+0x8f> *poff = off; 801020fc: 8b 45 10 mov 0x10(%ebp),%eax 801020ff: 8b 55 f4 mov -0xc(%ebp),%edx 80102102: 89 10 mov %edx,(%eax) inum = de.inum; 80102104: 0f b7 45 e0 movzwl -0x20(%ebp),%eax 80102108: 0f b7 c0 movzwl %ax,%eax 8010210b: 89 45 f0 mov %eax,-0x10(%ebp) return iget(dp->dev, inum); 8010210e: 8b 45 08 mov 0x8(%ebp),%eax 80102111: 8b 00 mov (%eax),%eax 80102113: 8b 55 f0 mov -0x10(%ebp),%edx 80102116: 89 54 24 04 mov %edx,0x4(%esp) 8010211a: 89 04 24 mov %eax,(%esp) 8010211d: e8 2d f6 ff ff call 8010174f <iget> 80102122: eb 18 jmp 8010213c <dirlookup+0xc7> struct dirent de; if(dp->type != T_DIR) panic("dirlookup not DIR"); for(off = 0; off < dp->size; off += sizeof(de)){ 80102124: 83 45 f4 10 addl $0x10,-0xc(%ebp) 80102128: 8b 45 08 mov 0x8(%ebp),%eax 8010212b: 8b 40 18 mov 0x18(%eax),%eax 8010212e: 3b 45 f4 cmp -0xc(%ebp),%eax 80102131: 0f 87 69 ff ff ff ja 801020a0 <dirlookup+0x2b> inum = de.inum; return iget(dp->dev, inum); } } return 0; 80102137: b8 00 00 00 00 mov $0x0,%eax } 8010213c: c9 leave 8010213d: c3 ret 8010213e <dirlink>: // Write a new directory entry (name, inum) into the directory dp. int dirlink(struct inode *dp, char *name, uint inum) { 8010213e: 55 push %ebp 8010213f: 89 e5 mov %esp,%ebp 80102141: 83 ec 38 sub $0x38,%esp int off; struct dirent de; struct inode *ip; // Check that name is not present. if((ip = dirlookup(dp, name, 0)) != 0){ 80102144: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 8010214b: 00 8010214c: 8b 45 0c mov 0xc(%ebp),%eax 8010214f: 89 44 24 04 mov %eax,0x4(%esp) 80102153: 8b 45 08 mov 0x8(%ebp),%eax 80102156: 89 04 24 mov %eax,(%esp) 80102159: e8 17 ff ff ff call 80102075 <dirlookup> 8010215e: 89 45 f0 mov %eax,-0x10(%ebp) 80102161: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80102165: 74 15 je 8010217c <dirlink+0x3e> iput(ip); 80102167: 8b 45 f0 mov -0x10(%ebp),%eax 8010216a: 89 04 24 mov %eax,(%esp) 8010216d: e8 94 f8 ff ff call 80101a06 <iput> return -1; 80102172: b8 ff ff ff ff mov $0xffffffff,%eax 80102177: e9 b7 00 00 00 jmp 80102233 <dirlink+0xf5> } // Look for an empty dirent. for(off = 0; off < dp->size; off += sizeof(de)){ 8010217c: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80102183: eb 46 jmp 801021cb <dirlink+0x8d> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80102185: 8b 45 f4 mov -0xc(%ebp),%eax 80102188: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 8010218f: 00 80102190: 89 44 24 08 mov %eax,0x8(%esp) 80102194: 8d 45 e0 lea -0x20(%ebp),%eax 80102197: 89 44 24 04 mov %eax,0x4(%esp) 8010219b: 8b 45 08 mov 0x8(%ebp),%eax 8010219e: 89 04 24 mov %eax,(%esp) 801021a1: e8 ba fb ff ff call 80101d60 <readi> 801021a6: 83 f8 10 cmp $0x10,%eax 801021a9: 74 0c je 801021b7 <dirlink+0x79> panic("dirlink read"); 801021ab: c7 04 24 db 86 10 80 movl $0x801086db,(%esp) 801021b2: e8 83 e3 ff ff call 8010053a <panic> if(de.inum == 0) 801021b7: 0f b7 45 e0 movzwl -0x20(%ebp),%eax 801021bb: 66 85 c0 test %ax,%ax 801021be: 75 02 jne 801021c2 <dirlink+0x84> break; 801021c0: eb 16 jmp 801021d8 <dirlink+0x9a> iput(ip); return -1; } // Look for an empty dirent. for(off = 0; off < dp->size; off += sizeof(de)){ 801021c2: 8b 45 f4 mov -0xc(%ebp),%eax 801021c5: 83 c0 10 add $0x10,%eax 801021c8: 89 45 f4 mov %eax,-0xc(%ebp) 801021cb: 8b 55 f4 mov -0xc(%ebp),%edx 801021ce: 8b 45 08 mov 0x8(%ebp),%eax 801021d1: 8b 40 18 mov 0x18(%eax),%eax 801021d4: 39 c2 cmp %eax,%edx 801021d6: 72 ad jb 80102185 <dirlink+0x47> panic("dirlink read"); if(de.inum == 0) break; } strncpy(de.name, name, DIRSIZ); 801021d8: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 801021df: 00 801021e0: 8b 45 0c mov 0xc(%ebp),%eax 801021e3: 89 44 24 04 mov %eax,0x4(%esp) 801021e7: 8d 45 e0 lea -0x20(%ebp),%eax 801021ea: 83 c0 02 add $0x2,%eax 801021ed: 89 04 24 mov %eax,(%esp) 801021f0: e8 11 31 00 00 call 80105306 <strncpy> de.inum = inum; 801021f5: 8b 45 10 mov 0x10(%ebp),%eax 801021f8: 66 89 45 e0 mov %ax,-0x20(%ebp) if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 801021fc: 8b 45 f4 mov -0xc(%ebp),%eax 801021ff: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80102206: 00 80102207: 89 44 24 08 mov %eax,0x8(%esp) 8010220b: 8d 45 e0 lea -0x20(%ebp),%eax 8010220e: 89 44 24 04 mov %eax,0x4(%esp) 80102212: 8b 45 08 mov 0x8(%ebp),%eax 80102215: 89 04 24 mov %eax,(%esp) 80102218: e8 a7 fc ff ff call 80101ec4 <writei> 8010221d: 83 f8 10 cmp $0x10,%eax 80102220: 74 0c je 8010222e <dirlink+0xf0> panic("dirlink"); 80102222: c7 04 24 e8 86 10 80 movl $0x801086e8,(%esp) 80102229: e8 0c e3 ff ff call 8010053a <panic> return 0; 8010222e: b8 00 00 00 00 mov $0x0,%eax } 80102233: c9 leave 80102234: c3 ret 80102235 <skipelem>: // skipelem("a", name) = "", setting name = "a" // skipelem("", name) = skipelem("////", name) = 0 // static char* skipelem(char *path, char *name) { 80102235: 55 push %ebp 80102236: 89 e5 mov %esp,%ebp 80102238: 83 ec 28 sub $0x28,%esp char *s; int len; while(*path == '/') 8010223b: eb 04 jmp 80102241 <skipelem+0xc> path++; 8010223d: 83 45 08 01 addl $0x1,0x8(%ebp) skipelem(char *path, char *name) { char *s; int len; while(*path == '/') 80102241: 8b 45 08 mov 0x8(%ebp),%eax 80102244: 0f b6 00 movzbl (%eax),%eax 80102247: 3c 2f cmp $0x2f,%al 80102249: 74 f2 je 8010223d <skipelem+0x8> path++; if(*path == 0) 8010224b: 8b 45 08 mov 0x8(%ebp),%eax 8010224e: 0f b6 00 movzbl (%eax),%eax 80102251: 84 c0 test %al,%al 80102253: 75 0a jne 8010225f <skipelem+0x2a> return 0; 80102255: b8 00 00 00 00 mov $0x0,%eax 8010225a: e9 86 00 00 00 jmp 801022e5 <skipelem+0xb0> s = path; 8010225f: 8b 45 08 mov 0x8(%ebp),%eax 80102262: 89 45 f4 mov %eax,-0xc(%ebp) while(*path != '/' && *path != 0) 80102265: eb 04 jmp 8010226b <skipelem+0x36> path++; 80102267: 83 45 08 01 addl $0x1,0x8(%ebp) while(*path == '/') path++; if(*path == 0) return 0; s = path; while(*path != '/' && *path != 0) 8010226b: 8b 45 08 mov 0x8(%ebp),%eax 8010226e: 0f b6 00 movzbl (%eax),%eax 80102271: 3c 2f cmp $0x2f,%al 80102273: 74 0a je 8010227f <skipelem+0x4a> 80102275: 8b 45 08 mov 0x8(%ebp),%eax 80102278: 0f b6 00 movzbl (%eax),%eax 8010227b: 84 c0 test %al,%al 8010227d: 75 e8 jne 80102267 <skipelem+0x32> path++; len = path - s; 8010227f: 8b 55 08 mov 0x8(%ebp),%edx 80102282: 8b 45 f4 mov -0xc(%ebp),%eax 80102285: 29 c2 sub %eax,%edx 80102287: 89 d0 mov %edx,%eax 80102289: 89 45 f0 mov %eax,-0x10(%ebp) if(len >= DIRSIZ) 8010228c: 83 7d f0 0d cmpl $0xd,-0x10(%ebp) 80102290: 7e 1c jle 801022ae <skipelem+0x79> memmove(name, s, DIRSIZ); 80102292: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80102299: 00 8010229a: 8b 45 f4 mov -0xc(%ebp),%eax 8010229d: 89 44 24 04 mov %eax,0x4(%esp) 801022a1: 8b 45 0c mov 0xc(%ebp),%eax 801022a4: 89 04 24 mov %eax,(%esp) 801022a7: e8 61 2f 00 00 call 8010520d <memmove> else { memmove(name, s, len); name[len] = 0; } while(*path == '/') 801022ac: eb 2a jmp 801022d8 <skipelem+0xa3> path++; len = path - s; if(len >= DIRSIZ) memmove(name, s, DIRSIZ); else { memmove(name, s, len); 801022ae: 8b 45 f0 mov -0x10(%ebp),%eax 801022b1: 89 44 24 08 mov %eax,0x8(%esp) 801022b5: 8b 45 f4 mov -0xc(%ebp),%eax 801022b8: 89 44 24 04 mov %eax,0x4(%esp) 801022bc: 8b 45 0c mov 0xc(%ebp),%eax 801022bf: 89 04 24 mov %eax,(%esp) 801022c2: e8 46 2f 00 00 call 8010520d <memmove> name[len] = 0; 801022c7: 8b 55 f0 mov -0x10(%ebp),%edx 801022ca: 8b 45 0c mov 0xc(%ebp),%eax 801022cd: 01 d0 add %edx,%eax 801022cf: c6 00 00 movb $0x0,(%eax) } while(*path == '/') 801022d2: eb 04 jmp 801022d8 <skipelem+0xa3> path++; 801022d4: 83 45 08 01 addl $0x1,0x8(%ebp) memmove(name, s, DIRSIZ); else { memmove(name, s, len); name[len] = 0; } while(*path == '/') 801022d8: 8b 45 08 mov 0x8(%ebp),%eax 801022db: 0f b6 00 movzbl (%eax),%eax 801022de: 3c 2f cmp $0x2f,%al 801022e0: 74 f2 je 801022d4 <skipelem+0x9f> path++; return path; 801022e2: 8b 45 08 mov 0x8(%ebp),%eax } 801022e5: c9 leave 801022e6: c3 ret 801022e7 <namex>: // Look up and return the inode for a path name. // If parent != 0, return the inode for the parent and copy the final // path element into name, which must have room for DIRSIZ bytes. static struct inode* namex(char *path, int nameiparent, char *name) { 801022e7: 55 push %ebp 801022e8: 89 e5 mov %esp,%ebp 801022ea: 83 ec 28 sub $0x28,%esp struct inode *ip, *next; if(*path == '/') 801022ed: 8b 45 08 mov 0x8(%ebp),%eax 801022f0: 0f b6 00 movzbl (%eax),%eax 801022f3: 3c 2f cmp $0x2f,%al 801022f5: 75 1c jne 80102313 <namex+0x2c> ip = iget(ROOTDEV, ROOTINO); 801022f7: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 801022fe: 00 801022ff: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80102306: e8 44 f4 ff ff call 8010174f <iget> 8010230b: 89 45 f4 mov %eax,-0xc(%ebp) else ip = idup(proc->cwd); while((path = skipelem(path, name)) != 0){ 8010230e: e9 af 00 00 00 jmp 801023c2 <namex+0xdb> struct inode *ip, *next; if(*path == '/') ip = iget(ROOTDEV, ROOTINO); else ip = idup(proc->cwd); 80102313: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80102319: 8b 40 68 mov 0x68(%eax),%eax 8010231c: 89 04 24 mov %eax,(%esp) 8010231f: e8 fd f4 ff ff call 80101821 <idup> 80102324: 89 45 f4 mov %eax,-0xc(%ebp) while((path = skipelem(path, name)) != 0){ 80102327: e9 96 00 00 00 jmp 801023c2 <namex+0xdb> ilock(ip); 8010232c: 8b 45 f4 mov -0xc(%ebp),%eax 8010232f: 89 04 24 mov %eax,(%esp) 80102332: e8 1c f5 ff ff call 80101853 <ilock> if(ip->type != T_DIR){ 80102337: 8b 45 f4 mov -0xc(%ebp),%eax 8010233a: 0f b7 40 10 movzwl 0x10(%eax),%eax 8010233e: 66 83 f8 01 cmp $0x1,%ax 80102342: 74 15 je 80102359 <namex+0x72> iunlockput(ip); 80102344: 8b 45 f4 mov -0xc(%ebp),%eax 80102347: 89 04 24 mov %eax,(%esp) 8010234a: e8 88 f7 ff ff call 80101ad7 <iunlockput> return 0; 8010234f: b8 00 00 00 00 mov $0x0,%eax 80102354: e9 a3 00 00 00 jmp 801023fc <namex+0x115> } if(nameiparent && *path == '\0'){ 80102359: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 8010235d: 74 1d je 8010237c <namex+0x95> 8010235f: 8b 45 08 mov 0x8(%ebp),%eax 80102362: 0f b6 00 movzbl (%eax),%eax 80102365: 84 c0 test %al,%al 80102367: 75 13 jne 8010237c <namex+0x95> // Stop one level early. iunlock(ip); 80102369: 8b 45 f4 mov -0xc(%ebp),%eax 8010236c: 89 04 24 mov %eax,(%esp) 8010236f: e8 2d f6 ff ff call 801019a1 <iunlock> return ip; 80102374: 8b 45 f4 mov -0xc(%ebp),%eax 80102377: e9 80 00 00 00 jmp 801023fc <namex+0x115> } if((next = dirlookup(ip, name, 0)) == 0){ 8010237c: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80102383: 00 80102384: 8b 45 10 mov 0x10(%ebp),%eax 80102387: 89 44 24 04 mov %eax,0x4(%esp) 8010238b: 8b 45 f4 mov -0xc(%ebp),%eax 8010238e: 89 04 24 mov %eax,(%esp) 80102391: e8 df fc ff ff call 80102075 <dirlookup> 80102396: 89 45 f0 mov %eax,-0x10(%ebp) 80102399: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 8010239d: 75 12 jne 801023b1 <namex+0xca> iunlockput(ip); 8010239f: 8b 45 f4 mov -0xc(%ebp),%eax 801023a2: 89 04 24 mov %eax,(%esp) 801023a5: e8 2d f7 ff ff call 80101ad7 <iunlockput> return 0; 801023aa: b8 00 00 00 00 mov $0x0,%eax 801023af: eb 4b jmp 801023fc <namex+0x115> } iunlockput(ip); 801023b1: 8b 45 f4 mov -0xc(%ebp),%eax 801023b4: 89 04 24 mov %eax,(%esp) 801023b7: e8 1b f7 ff ff call 80101ad7 <iunlockput> ip = next; 801023bc: 8b 45 f0 mov -0x10(%ebp),%eax 801023bf: 89 45 f4 mov %eax,-0xc(%ebp) if(*path == '/') ip = iget(ROOTDEV, ROOTINO); else ip = idup(proc->cwd); while((path = skipelem(path, name)) != 0){ 801023c2: 8b 45 10 mov 0x10(%ebp),%eax 801023c5: 89 44 24 04 mov %eax,0x4(%esp) 801023c9: 8b 45 08 mov 0x8(%ebp),%eax 801023cc: 89 04 24 mov %eax,(%esp) 801023cf: e8 61 fe ff ff call 80102235 <skipelem> 801023d4: 89 45 08 mov %eax,0x8(%ebp) 801023d7: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 801023db: 0f 85 4b ff ff ff jne 8010232c <namex+0x45> return 0; } iunlockput(ip); ip = next; } if(nameiparent){ 801023e1: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 801023e5: 74 12 je 801023f9 <namex+0x112> iput(ip); 801023e7: 8b 45 f4 mov -0xc(%ebp),%eax 801023ea: 89 04 24 mov %eax,(%esp) 801023ed: e8 14 f6 ff ff call 80101a06 <iput> return 0; 801023f2: b8 00 00 00 00 mov $0x0,%eax 801023f7: eb 03 jmp 801023fc <namex+0x115> } return ip; 801023f9: 8b 45 f4 mov -0xc(%ebp),%eax } 801023fc: c9 leave 801023fd: c3 ret 801023fe <namei>: struct inode* namei(char *path) { 801023fe: 55 push %ebp 801023ff: 89 e5 mov %esp,%ebp 80102401: 83 ec 28 sub $0x28,%esp char name[DIRSIZ]; return namex(path, 0, name); 80102404: 8d 45 ea lea -0x16(%ebp),%eax 80102407: 89 44 24 08 mov %eax,0x8(%esp) 8010240b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102412: 00 80102413: 8b 45 08 mov 0x8(%ebp),%eax 80102416: 89 04 24 mov %eax,(%esp) 80102419: e8 c9 fe ff ff call 801022e7 <namex> } 8010241e: c9 leave 8010241f: c3 ret 80102420 <nameiparent>: struct inode* nameiparent(char *path, char *name) { 80102420: 55 push %ebp 80102421: 89 e5 mov %esp,%ebp 80102423: 83 ec 18 sub $0x18,%esp return namex(path, 1, name); 80102426: 8b 45 0c mov 0xc(%ebp),%eax 80102429: 89 44 24 08 mov %eax,0x8(%esp) 8010242d: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80102434: 00 80102435: 8b 45 08 mov 0x8(%ebp),%eax 80102438: 89 04 24 mov %eax,(%esp) 8010243b: e8 a7 fe ff ff call 801022e7 <namex> } 80102440: c9 leave 80102441: c3 ret 80102442 <inb>: // Routines to let C code use special x86 instructions. static inline uchar inb(ushort port) { 80102442: 55 push %ebp 80102443: 89 e5 mov %esp,%ebp 80102445: 83 ec 14 sub $0x14,%esp 80102448: 8b 45 08 mov 0x8(%ebp),%eax 8010244b: 66 89 45 ec mov %ax,-0x14(%ebp) uchar data; asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 8010244f: 0f b7 45 ec movzwl -0x14(%ebp),%eax 80102453: 89 c2 mov %eax,%edx 80102455: ec in (%dx),%al 80102456: 88 45 ff mov %al,-0x1(%ebp) return data; 80102459: 0f b6 45 ff movzbl -0x1(%ebp),%eax } 8010245d: c9 leave 8010245e: c3 ret 8010245f <insl>: static inline void insl(int port, void *addr, int cnt) { 8010245f: 55 push %ebp 80102460: 89 e5 mov %esp,%ebp 80102462: 57 push %edi 80102463: 53 push %ebx asm volatile("cld; rep insl" : 80102464: 8b 55 08 mov 0x8(%ebp),%edx 80102467: 8b 4d 0c mov 0xc(%ebp),%ecx 8010246a: 8b 45 10 mov 0x10(%ebp),%eax 8010246d: 89 cb mov %ecx,%ebx 8010246f: 89 df mov %ebx,%edi 80102471: 89 c1 mov %eax,%ecx 80102473: fc cld 80102474: f3 6d rep insl (%dx),%es:(%edi) 80102476: 89 c8 mov %ecx,%eax 80102478: 89 fb mov %edi,%ebx 8010247a: 89 5d 0c mov %ebx,0xc(%ebp) 8010247d: 89 45 10 mov %eax,0x10(%ebp) "=D" (addr), "=c" (cnt) : "d" (port), "0" (addr), "1" (cnt) : "memory", "cc"); } 80102480: 5b pop %ebx 80102481: 5f pop %edi 80102482: 5d pop %ebp 80102483: c3 ret 80102484 <outb>: static inline void outb(ushort port, uchar data) { 80102484: 55 push %ebp 80102485: 89 e5 mov %esp,%ebp 80102487: 83 ec 08 sub $0x8,%esp 8010248a: 8b 55 08 mov 0x8(%ebp),%edx 8010248d: 8b 45 0c mov 0xc(%ebp),%eax 80102490: 66 89 55 fc mov %dx,-0x4(%ebp) 80102494: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102497: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 8010249b: 0f b7 55 fc movzwl -0x4(%ebp),%edx 8010249f: ee out %al,(%dx) } 801024a0: c9 leave 801024a1: c3 ret 801024a2 <outsl>: asm volatile("out %0,%1" : : "a" (data), "d" (port)); } static inline void outsl(int port, const void *addr, int cnt) { 801024a2: 55 push %ebp 801024a3: 89 e5 mov %esp,%ebp 801024a5: 56 push %esi 801024a6: 53 push %ebx asm volatile("cld; rep outsl" : 801024a7: 8b 55 08 mov 0x8(%ebp),%edx 801024aa: 8b 4d 0c mov 0xc(%ebp),%ecx 801024ad: 8b 45 10 mov 0x10(%ebp),%eax 801024b0: 89 cb mov %ecx,%ebx 801024b2: 89 de mov %ebx,%esi 801024b4: 89 c1 mov %eax,%ecx 801024b6: fc cld 801024b7: f3 6f rep outsl %ds:(%esi),(%dx) 801024b9: 89 c8 mov %ecx,%eax 801024bb: 89 f3 mov %esi,%ebx 801024bd: 89 5d 0c mov %ebx,0xc(%ebp) 801024c0: 89 45 10 mov %eax,0x10(%ebp) "=S" (addr), "=c" (cnt) : "d" (port), "0" (addr), "1" (cnt) : "cc"); } 801024c3: 5b pop %ebx 801024c4: 5e pop %esi 801024c5: 5d pop %ebp 801024c6: c3 ret 801024c7 <idewait>: static void idestart(struct buf*); // Wait for IDE disk to become ready. static int idewait(int checkerr) { 801024c7: 55 push %ebp 801024c8: 89 e5 mov %esp,%ebp 801024ca: 83 ec 14 sub $0x14,%esp int r; while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 801024cd: 90 nop 801024ce: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp) 801024d5: e8 68 ff ff ff call 80102442 <inb> 801024da: 0f b6 c0 movzbl %al,%eax 801024dd: 89 45 fc mov %eax,-0x4(%ebp) 801024e0: 8b 45 fc mov -0x4(%ebp),%eax 801024e3: 25 c0 00 00 00 and $0xc0,%eax 801024e8: 83 f8 40 cmp $0x40,%eax 801024eb: 75 e1 jne 801024ce <idewait+0x7> ; if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0) 801024ed: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 801024f1: 74 11 je 80102504 <idewait+0x3d> 801024f3: 8b 45 fc mov -0x4(%ebp),%eax 801024f6: 83 e0 21 and $0x21,%eax 801024f9: 85 c0 test %eax,%eax 801024fb: 74 07 je 80102504 <idewait+0x3d> return -1; 801024fd: b8 ff ff ff ff mov $0xffffffff,%eax 80102502: eb 05 jmp 80102509 <idewait+0x42> return 0; 80102504: b8 00 00 00 00 mov $0x0,%eax } 80102509: c9 leave 8010250a: c3 ret 8010250b <ideinit>: void ideinit(void) { 8010250b: 55 push %ebp 8010250c: 89 e5 mov %esp,%ebp 8010250e: 83 ec 28 sub $0x28,%esp int i; initlock(&idelock, "ide"); 80102511: c7 44 24 04 f0 86 10 movl $0x801086f0,0x4(%esp) 80102518: 80 80102519: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 80102520: e8 a4 29 00 00 call 80104ec9 <initlock> picenable(IRQ_IDE); 80102525: c7 04 24 0e 00 00 00 movl $0xe,(%esp) 8010252c: e8 29 15 00 00 call 80103a5a <picenable> ioapicenable(IRQ_IDE, ncpu - 1); 80102531: a1 20 ff 10 80 mov 0x8010ff20,%eax 80102536: 83 e8 01 sub $0x1,%eax 80102539: 89 44 24 04 mov %eax,0x4(%esp) 8010253d: c7 04 24 0e 00 00 00 movl $0xe,(%esp) 80102544: e8 0c 04 00 00 call 80102955 <ioapicenable> idewait(0); 80102549: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80102550: e8 72 ff ff ff call 801024c7 <idewait> // Check if disk 1 is present outb(0x1f6, 0xe0 | (1<<4)); 80102555: c7 44 24 04 f0 00 00 movl $0xf0,0x4(%esp) 8010255c: 00 8010255d: c7 04 24 f6 01 00 00 movl $0x1f6,(%esp) 80102564: e8 1b ff ff ff call 80102484 <outb> for(i=0; i<1000; i++){ 80102569: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80102570: eb 20 jmp 80102592 <ideinit+0x87> if(inb(0x1f7) != 0){ 80102572: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp) 80102579: e8 c4 fe ff ff call 80102442 <inb> 8010257e: 84 c0 test %al,%al 80102580: 74 0c je 8010258e <ideinit+0x83> havedisk1 = 1; 80102582: c7 05 58 b6 10 80 01 movl $0x1,0x8010b658 80102589: 00 00 00 break; 8010258c: eb 0d jmp 8010259b <ideinit+0x90> ioapicenable(IRQ_IDE, ncpu - 1); idewait(0); // Check if disk 1 is present outb(0x1f6, 0xe0 | (1<<4)); for(i=0; i<1000; i++){ 8010258e: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80102592: 81 7d f4 e7 03 00 00 cmpl $0x3e7,-0xc(%ebp) 80102599: 7e d7 jle 80102572 <ideinit+0x67> break; } } // Switch back to disk 0. outb(0x1f6, 0xe0 | (0<<4)); 8010259b: c7 44 24 04 e0 00 00 movl $0xe0,0x4(%esp) 801025a2: 00 801025a3: c7 04 24 f6 01 00 00 movl $0x1f6,(%esp) 801025aa: e8 d5 fe ff ff call 80102484 <outb> } 801025af: c9 leave 801025b0: c3 ret 801025b1 <idestart>: // Start the request for b. Caller must hold idelock. static void idestart(struct buf *b) { 801025b1: 55 push %ebp 801025b2: 89 e5 mov %esp,%ebp 801025b4: 83 ec 18 sub $0x18,%esp if(b == 0) 801025b7: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 801025bb: 75 0c jne 801025c9 <idestart+0x18> panic("idestart"); 801025bd: c7 04 24 f4 86 10 80 movl $0x801086f4,(%esp) 801025c4: e8 71 df ff ff call 8010053a <panic> idewait(0); 801025c9: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801025d0: e8 f2 fe ff ff call 801024c7 <idewait> outb(0x3f6, 0); // generate interrupt 801025d5: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801025dc: 00 801025dd: c7 04 24 f6 03 00 00 movl $0x3f6,(%esp) 801025e4: e8 9b fe ff ff call 80102484 <outb> outb(0x1f2, 1); // number of sectors 801025e9: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 801025f0: 00 801025f1: c7 04 24 f2 01 00 00 movl $0x1f2,(%esp) 801025f8: e8 87 fe ff ff call 80102484 <outb> outb(0x1f3, b->sector & 0xff); 801025fd: 8b 45 08 mov 0x8(%ebp),%eax 80102600: 8b 40 08 mov 0x8(%eax),%eax 80102603: 0f b6 c0 movzbl %al,%eax 80102606: 89 44 24 04 mov %eax,0x4(%esp) 8010260a: c7 04 24 f3 01 00 00 movl $0x1f3,(%esp) 80102611: e8 6e fe ff ff call 80102484 <outb> outb(0x1f4, (b->sector >> 8) & 0xff); 80102616: 8b 45 08 mov 0x8(%ebp),%eax 80102619: 8b 40 08 mov 0x8(%eax),%eax 8010261c: c1 e8 08 shr $0x8,%eax 8010261f: 0f b6 c0 movzbl %al,%eax 80102622: 89 44 24 04 mov %eax,0x4(%esp) 80102626: c7 04 24 f4 01 00 00 movl $0x1f4,(%esp) 8010262d: e8 52 fe ff ff call 80102484 <outb> outb(0x1f5, (b->sector >> 16) & 0xff); 80102632: 8b 45 08 mov 0x8(%ebp),%eax 80102635: 8b 40 08 mov 0x8(%eax),%eax 80102638: c1 e8 10 shr $0x10,%eax 8010263b: 0f b6 c0 movzbl %al,%eax 8010263e: 89 44 24 04 mov %eax,0x4(%esp) 80102642: c7 04 24 f5 01 00 00 movl $0x1f5,(%esp) 80102649: e8 36 fe ff ff call 80102484 <outb> outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((b->sector>>24)&0x0f)); 8010264e: 8b 45 08 mov 0x8(%ebp),%eax 80102651: 8b 40 04 mov 0x4(%eax),%eax 80102654: 83 e0 01 and $0x1,%eax 80102657: c1 e0 04 shl $0x4,%eax 8010265a: 89 c2 mov %eax,%edx 8010265c: 8b 45 08 mov 0x8(%ebp),%eax 8010265f: 8b 40 08 mov 0x8(%eax),%eax 80102662: c1 e8 18 shr $0x18,%eax 80102665: 83 e0 0f and $0xf,%eax 80102668: 09 d0 or %edx,%eax 8010266a: 83 c8 e0 or $0xffffffe0,%eax 8010266d: 0f b6 c0 movzbl %al,%eax 80102670: 89 44 24 04 mov %eax,0x4(%esp) 80102674: c7 04 24 f6 01 00 00 movl $0x1f6,(%esp) 8010267b: e8 04 fe ff ff call 80102484 <outb> if(b->flags & B_DIRTY){ 80102680: 8b 45 08 mov 0x8(%ebp),%eax 80102683: 8b 00 mov (%eax),%eax 80102685: 83 e0 04 and $0x4,%eax 80102688: 85 c0 test %eax,%eax 8010268a: 74 34 je 801026c0 <idestart+0x10f> outb(0x1f7, IDE_CMD_WRITE); 8010268c: c7 44 24 04 30 00 00 movl $0x30,0x4(%esp) 80102693: 00 80102694: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp) 8010269b: e8 e4 fd ff ff call 80102484 <outb> outsl(0x1f0, b->data, 512/4); 801026a0: 8b 45 08 mov 0x8(%ebp),%eax 801026a3: 83 c0 18 add $0x18,%eax 801026a6: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp) 801026ad: 00 801026ae: 89 44 24 04 mov %eax,0x4(%esp) 801026b2: c7 04 24 f0 01 00 00 movl $0x1f0,(%esp) 801026b9: e8 e4 fd ff ff call 801024a2 <outsl> 801026be: eb 14 jmp 801026d4 <idestart+0x123> } else { outb(0x1f7, IDE_CMD_READ); 801026c0: c7 44 24 04 20 00 00 movl $0x20,0x4(%esp) 801026c7: 00 801026c8: c7 04 24 f7 01 00 00 movl $0x1f7,(%esp) 801026cf: e8 b0 fd ff ff call 80102484 <outb> } } 801026d4: c9 leave 801026d5: c3 ret 801026d6 <ideintr>: // Interrupt handler. void ideintr(void) { 801026d6: 55 push %ebp 801026d7: 89 e5 mov %esp,%ebp 801026d9: 83 ec 28 sub $0x28,%esp struct buf *b; // First queued buffer is the active request. acquire(&idelock); 801026dc: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 801026e3: e8 02 28 00 00 call 80104eea <acquire> if((b = idequeue) == 0){ 801026e8: a1 54 b6 10 80 mov 0x8010b654,%eax 801026ed: 89 45 f4 mov %eax,-0xc(%ebp) 801026f0: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801026f4: 75 11 jne 80102707 <ideintr+0x31> release(&idelock); 801026f6: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 801026fd: e8 4a 28 00 00 call 80104f4c <release> // cprintf("spurious IDE interrupt\n"); return; 80102702: e9 90 00 00 00 jmp 80102797 <ideintr+0xc1> } idequeue = b->qnext; 80102707: 8b 45 f4 mov -0xc(%ebp),%eax 8010270a: 8b 40 14 mov 0x14(%eax),%eax 8010270d: a3 54 b6 10 80 mov %eax,0x8010b654 // Read data if needed. if(!(b->flags & B_DIRTY) && idewait(1) >= 0) 80102712: 8b 45 f4 mov -0xc(%ebp),%eax 80102715: 8b 00 mov (%eax),%eax 80102717: 83 e0 04 and $0x4,%eax 8010271a: 85 c0 test %eax,%eax 8010271c: 75 2e jne 8010274c <ideintr+0x76> 8010271e: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80102725: e8 9d fd ff ff call 801024c7 <idewait> 8010272a: 85 c0 test %eax,%eax 8010272c: 78 1e js 8010274c <ideintr+0x76> insl(0x1f0, b->data, 512/4); 8010272e: 8b 45 f4 mov -0xc(%ebp),%eax 80102731: 83 c0 18 add $0x18,%eax 80102734: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp) 8010273b: 00 8010273c: 89 44 24 04 mov %eax,0x4(%esp) 80102740: c7 04 24 f0 01 00 00 movl $0x1f0,(%esp) 80102747: e8 13 fd ff ff call 8010245f <insl> // Wake process waiting for this buf. b->flags |= B_VALID; 8010274c: 8b 45 f4 mov -0xc(%ebp),%eax 8010274f: 8b 00 mov (%eax),%eax 80102751: 83 c8 02 or $0x2,%eax 80102754: 89 c2 mov %eax,%edx 80102756: 8b 45 f4 mov -0xc(%ebp),%eax 80102759: 89 10 mov %edx,(%eax) b->flags &= ~B_DIRTY; 8010275b: 8b 45 f4 mov -0xc(%ebp),%eax 8010275e: 8b 00 mov (%eax),%eax 80102760: 83 e0 fb and $0xfffffffb,%eax 80102763: 89 c2 mov %eax,%edx 80102765: 8b 45 f4 mov -0xc(%ebp),%eax 80102768: 89 10 mov %edx,(%eax) wakeup(b); 8010276a: 8b 45 f4 mov -0xc(%ebp),%eax 8010276d: 89 04 24 mov %eax,(%esp) 80102770: e8 36 25 00 00 call 80104cab <wakeup> // Start disk on next buf in queue. if(idequeue != 0) 80102775: a1 54 b6 10 80 mov 0x8010b654,%eax 8010277a: 85 c0 test %eax,%eax 8010277c: 74 0d je 8010278b <ideintr+0xb5> idestart(idequeue); 8010277e: a1 54 b6 10 80 mov 0x8010b654,%eax 80102783: 89 04 24 mov %eax,(%esp) 80102786: e8 26 fe ff ff call 801025b1 <idestart> release(&idelock); 8010278b: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 80102792: e8 b5 27 00 00 call 80104f4c <release> } 80102797: c9 leave 80102798: c3 ret 80102799 <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) { 80102799: 55 push %ebp 8010279a: 89 e5 mov %esp,%ebp 8010279c: 83 ec 28 sub $0x28,%esp struct buf **pp; if(!(b->flags & B_BUSY)) 8010279f: 8b 45 08 mov 0x8(%ebp),%eax 801027a2: 8b 00 mov (%eax),%eax 801027a4: 83 e0 01 and $0x1,%eax 801027a7: 85 c0 test %eax,%eax 801027a9: 75 0c jne 801027b7 <iderw+0x1e> panic("iderw: buf not busy"); 801027ab: c7 04 24 fd 86 10 80 movl $0x801086fd,(%esp) 801027b2: e8 83 dd ff ff call 8010053a <panic> if((b->flags & (B_VALID|B_DIRTY)) == B_VALID) 801027b7: 8b 45 08 mov 0x8(%ebp),%eax 801027ba: 8b 00 mov (%eax),%eax 801027bc: 83 e0 06 and $0x6,%eax 801027bf: 83 f8 02 cmp $0x2,%eax 801027c2: 75 0c jne 801027d0 <iderw+0x37> panic("iderw: nothing to do"); 801027c4: c7 04 24 11 87 10 80 movl $0x80108711,(%esp) 801027cb: e8 6a dd ff ff call 8010053a <panic> if(b->dev != 0 && !havedisk1) 801027d0: 8b 45 08 mov 0x8(%ebp),%eax 801027d3: 8b 40 04 mov 0x4(%eax),%eax 801027d6: 85 c0 test %eax,%eax 801027d8: 74 15 je 801027ef <iderw+0x56> 801027da: a1 58 b6 10 80 mov 0x8010b658,%eax 801027df: 85 c0 test %eax,%eax 801027e1: 75 0c jne 801027ef <iderw+0x56> panic("iderw: ide disk 1 not present"); 801027e3: c7 04 24 26 87 10 80 movl $0x80108726,(%esp) 801027ea: e8 4b dd ff ff call 8010053a <panic> acquire(&idelock); //DOC:acquire-lock 801027ef: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 801027f6: e8 ef 26 00 00 call 80104eea <acquire> // Append b to idequeue. b->qnext = 0; 801027fb: 8b 45 08 mov 0x8(%ebp),%eax 801027fe: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 80102805: c7 45 f4 54 b6 10 80 movl $0x8010b654,-0xc(%ebp) 8010280c: eb 0b jmp 80102819 <iderw+0x80> 8010280e: 8b 45 f4 mov -0xc(%ebp),%eax 80102811: 8b 00 mov (%eax),%eax 80102813: 83 c0 14 add $0x14,%eax 80102816: 89 45 f4 mov %eax,-0xc(%ebp) 80102819: 8b 45 f4 mov -0xc(%ebp),%eax 8010281c: 8b 00 mov (%eax),%eax 8010281e: 85 c0 test %eax,%eax 80102820: 75 ec jne 8010280e <iderw+0x75> ; *pp = b; 80102822: 8b 45 f4 mov -0xc(%ebp),%eax 80102825: 8b 55 08 mov 0x8(%ebp),%edx 80102828: 89 10 mov %edx,(%eax) // Start disk if necessary. if(idequeue == b) 8010282a: a1 54 b6 10 80 mov 0x8010b654,%eax 8010282f: 3b 45 08 cmp 0x8(%ebp),%eax 80102832: 75 0d jne 80102841 <iderw+0xa8> idestart(b); 80102834: 8b 45 08 mov 0x8(%ebp),%eax 80102837: 89 04 24 mov %eax,(%esp) 8010283a: e8 72 fd ff ff call 801025b1 <idestart> // Wait for request to finish. while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 8010283f: eb 15 jmp 80102856 <iderw+0xbd> 80102841: eb 13 jmp 80102856 <iderw+0xbd> sleep(b, &idelock); 80102843: c7 44 24 04 20 b6 10 movl $0x8010b620,0x4(%esp) 8010284a: 80 8010284b: 8b 45 08 mov 0x8(%ebp),%eax 8010284e: 89 04 24 mov %eax,(%esp) 80102851: e8 11 23 00 00 call 80104b67 <sleep> // Start disk if necessary. if(idequeue == b) idestart(b); // Wait for request to finish. while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 80102856: 8b 45 08 mov 0x8(%ebp),%eax 80102859: 8b 00 mov (%eax),%eax 8010285b: 83 e0 06 and $0x6,%eax 8010285e: 83 f8 02 cmp $0x2,%eax 80102861: 75 e0 jne 80102843 <iderw+0xaa> sleep(b, &idelock); } release(&idelock); 80102863: c7 04 24 20 b6 10 80 movl $0x8010b620,(%esp) 8010286a: e8 dd 26 00 00 call 80104f4c <release> } 8010286f: c9 leave 80102870: c3 ret 80102871 <ioapicread>: uint data; }; static uint ioapicread(int reg) { 80102871: 55 push %ebp 80102872: 89 e5 mov %esp,%ebp ioapic->reg = reg; 80102874: a1 54 f8 10 80 mov 0x8010f854,%eax 80102879: 8b 55 08 mov 0x8(%ebp),%edx 8010287c: 89 10 mov %edx,(%eax) return ioapic->data; 8010287e: a1 54 f8 10 80 mov 0x8010f854,%eax 80102883: 8b 40 10 mov 0x10(%eax),%eax } 80102886: 5d pop %ebp 80102887: c3 ret 80102888 <ioapicwrite>: static void ioapicwrite(int reg, uint data) { 80102888: 55 push %ebp 80102889: 89 e5 mov %esp,%ebp ioapic->reg = reg; 8010288b: a1 54 f8 10 80 mov 0x8010f854,%eax 80102890: 8b 55 08 mov 0x8(%ebp),%edx 80102893: 89 10 mov %edx,(%eax) ioapic->data = data; 80102895: a1 54 f8 10 80 mov 0x8010f854,%eax 8010289a: 8b 55 0c mov 0xc(%ebp),%edx 8010289d: 89 50 10 mov %edx,0x10(%eax) } 801028a0: 5d pop %ebp 801028a1: c3 ret 801028a2 <ioapicinit>: void ioapicinit(void) { 801028a2: 55 push %ebp 801028a3: 89 e5 mov %esp,%ebp 801028a5: 83 ec 28 sub $0x28,%esp int i, id, maxintr; if(!ismp) 801028a8: a1 24 f9 10 80 mov 0x8010f924,%eax 801028ad: 85 c0 test %eax,%eax 801028af: 75 05 jne 801028b6 <ioapicinit+0x14> return; 801028b1: e9 9d 00 00 00 jmp 80102953 <ioapicinit+0xb1> ioapic = (volatile struct ioapic*)IOAPIC; 801028b6: c7 05 54 f8 10 80 00 movl $0xfec00000,0x8010f854 801028bd: 00 c0 fe maxintr = (ioapicread(REG_VER) >> 16) & 0xFF; 801028c0: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801028c7: e8 a5 ff ff ff call 80102871 <ioapicread> 801028cc: c1 e8 10 shr $0x10,%eax 801028cf: 25 ff 00 00 00 and $0xff,%eax 801028d4: 89 45 f0 mov %eax,-0x10(%ebp) id = ioapicread(REG_ID) >> 24; 801028d7: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801028de: e8 8e ff ff ff call 80102871 <ioapicread> 801028e3: c1 e8 18 shr $0x18,%eax 801028e6: 89 45 ec mov %eax,-0x14(%ebp) if(id != ioapicid) 801028e9: 0f b6 05 20 f9 10 80 movzbl 0x8010f920,%eax 801028f0: 0f b6 c0 movzbl %al,%eax 801028f3: 3b 45 ec cmp -0x14(%ebp),%eax 801028f6: 74 0c je 80102904 <ioapicinit+0x62> cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n"); 801028f8: c7 04 24 44 87 10 80 movl $0x80108744,(%esp) 801028ff: e8 9c da ff ff call 801003a0 <cprintf> // Mark all interrupts edge-triggered, active high, disabled, // and not routed to any CPUs. for(i = 0; i <= maxintr; i++){ 80102904: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 8010290b: eb 3e jmp 8010294b <ioapicinit+0xa9> ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i)); 8010290d: 8b 45 f4 mov -0xc(%ebp),%eax 80102910: 83 c0 20 add $0x20,%eax 80102913: 0d 00 00 01 00 or $0x10000,%eax 80102918: 8b 55 f4 mov -0xc(%ebp),%edx 8010291b: 83 c2 08 add $0x8,%edx 8010291e: 01 d2 add %edx,%edx 80102920: 89 44 24 04 mov %eax,0x4(%esp) 80102924: 89 14 24 mov %edx,(%esp) 80102927: e8 5c ff ff ff call 80102888 <ioapicwrite> ioapicwrite(REG_TABLE+2*i+1, 0); 8010292c: 8b 45 f4 mov -0xc(%ebp),%eax 8010292f: 83 c0 08 add $0x8,%eax 80102932: 01 c0 add %eax,%eax 80102934: 83 c0 01 add $0x1,%eax 80102937: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010293e: 00 8010293f: 89 04 24 mov %eax,(%esp) 80102942: e8 41 ff ff ff call 80102888 <ioapicwrite> if(id != ioapicid) cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n"); // Mark all interrupts edge-triggered, active high, disabled, // and not routed to any CPUs. for(i = 0; i <= maxintr; i++){ 80102947: 83 45 f4 01 addl $0x1,-0xc(%ebp) 8010294b: 8b 45 f4 mov -0xc(%ebp),%eax 8010294e: 3b 45 f0 cmp -0x10(%ebp),%eax 80102951: 7e ba jle 8010290d <ioapicinit+0x6b> ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i)); ioapicwrite(REG_TABLE+2*i+1, 0); } } 80102953: c9 leave 80102954: c3 ret 80102955 <ioapicenable>: void ioapicenable(int irq, int cpunum) { 80102955: 55 push %ebp 80102956: 89 e5 mov %esp,%ebp 80102958: 83 ec 08 sub $0x8,%esp if(!ismp) 8010295b: a1 24 f9 10 80 mov 0x8010f924,%eax 80102960: 85 c0 test %eax,%eax 80102962: 75 02 jne 80102966 <ioapicenable+0x11> return; 80102964: eb 37 jmp 8010299d <ioapicenable+0x48> // Mark interrupt edge-triggered, active high, // enabled, and routed to the given cpunum, // which happens to be that cpu's APIC ID. ioapicwrite(REG_TABLE+2*irq, T_IRQ0 + irq); 80102966: 8b 45 08 mov 0x8(%ebp),%eax 80102969: 83 c0 20 add $0x20,%eax 8010296c: 8b 55 08 mov 0x8(%ebp),%edx 8010296f: 83 c2 08 add $0x8,%edx 80102972: 01 d2 add %edx,%edx 80102974: 89 44 24 04 mov %eax,0x4(%esp) 80102978: 89 14 24 mov %edx,(%esp) 8010297b: e8 08 ff ff ff call 80102888 <ioapicwrite> ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24); 80102980: 8b 45 0c mov 0xc(%ebp),%eax 80102983: c1 e0 18 shl $0x18,%eax 80102986: 8b 55 08 mov 0x8(%ebp),%edx 80102989: 83 c2 08 add $0x8,%edx 8010298c: 01 d2 add %edx,%edx 8010298e: 83 c2 01 add $0x1,%edx 80102991: 89 44 24 04 mov %eax,0x4(%esp) 80102995: 89 14 24 mov %edx,(%esp) 80102998: e8 eb fe ff ff call 80102888 <ioapicwrite> } 8010299d: c9 leave 8010299e: c3 ret 8010299f <v2p>: #define KERNBASE 0x80000000 // First kernel virtual address #define KERNLINK (KERNBASE+EXTMEM) // Address where kernel is linked #ifndef __ASSEMBLER__ static inline uint v2p(void *a) { return ((uint) (a)) - KERNBASE; } 8010299f: 55 push %ebp 801029a0: 89 e5 mov %esp,%ebp 801029a2: 8b 45 08 mov 0x8(%ebp),%eax 801029a5: 05 00 00 00 80 add $0x80000000,%eax 801029aa: 5d pop %ebp 801029ab: c3 ret 801029ac <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) { 801029ac: 55 push %ebp 801029ad: 89 e5 mov %esp,%ebp 801029af: 83 ec 18 sub $0x18,%esp initlock(&kmem.lock, "kmem"); 801029b2: c7 44 24 04 76 87 10 movl $0x80108776,0x4(%esp) 801029b9: 80 801029ba: c7 04 24 60 f8 10 80 movl $0x8010f860,(%esp) 801029c1: e8 03 25 00 00 call 80104ec9 <initlock> kmem.use_lock = 0; 801029c6: c7 05 94 f8 10 80 00 movl $0x0,0x8010f894 801029cd: 00 00 00 freerange(vstart, vend); 801029d0: 8b 45 0c mov 0xc(%ebp),%eax 801029d3: 89 44 24 04 mov %eax,0x4(%esp) 801029d7: 8b 45 08 mov 0x8(%ebp),%eax 801029da: 89 04 24 mov %eax,(%esp) 801029dd: e8 26 00 00 00 call 80102a08 <freerange> } 801029e2: c9 leave 801029e3: c3 ret 801029e4 <kinit2>: void kinit2(void *vstart, void *vend) { 801029e4: 55 push %ebp 801029e5: 89 e5 mov %esp,%ebp 801029e7: 83 ec 18 sub $0x18,%esp freerange(vstart, vend); 801029ea: 8b 45 0c mov 0xc(%ebp),%eax 801029ed: 89 44 24 04 mov %eax,0x4(%esp) 801029f1: 8b 45 08 mov 0x8(%ebp),%eax 801029f4: 89 04 24 mov %eax,(%esp) 801029f7: e8 0c 00 00 00 call 80102a08 <freerange> kmem.use_lock = 1; 801029fc: c7 05 94 f8 10 80 01 movl $0x1,0x8010f894 80102a03: 00 00 00 } 80102a06: c9 leave 80102a07: c3 ret 80102a08 <freerange>: void freerange(void *vstart, void *vend) { 80102a08: 55 push %ebp 80102a09: 89 e5 mov %esp,%ebp 80102a0b: 83 ec 28 sub $0x28,%esp char *p; p = (char*)PGROUNDUP((uint)vstart); 80102a0e: 8b 45 08 mov 0x8(%ebp),%eax 80102a11: 05 ff 0f 00 00 add $0xfff,%eax 80102a16: 25 00 f0 ff ff and $0xfffff000,%eax 80102a1b: 89 45 f4 mov %eax,-0xc(%ebp) for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102a1e: eb 12 jmp 80102a32 <freerange+0x2a> kfree(p); 80102a20: 8b 45 f4 mov -0xc(%ebp),%eax 80102a23: 89 04 24 mov %eax,(%esp) 80102a26: e8 16 00 00 00 call 80102a41 <kfree> void freerange(void *vstart, void *vend) { char *p; p = (char*)PGROUNDUP((uint)vstart); for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102a2b: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp) 80102a32: 8b 45 f4 mov -0xc(%ebp),%eax 80102a35: 05 00 10 00 00 add $0x1000,%eax 80102a3a: 3b 45 0c cmp 0xc(%ebp),%eax 80102a3d: 76 e1 jbe 80102a20 <freerange+0x18> kfree(p); } 80102a3f: c9 leave 80102a40: c3 ret 80102a41 <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) { 80102a41: 55 push %ebp 80102a42: 89 e5 mov %esp,%ebp 80102a44: 83 ec 28 sub $0x28,%esp struct run *r; if((uint)v % PGSIZE || v < end || v2p(v) >= PHYSTOP) 80102a47: 8b 45 08 mov 0x8(%ebp),%eax 80102a4a: 25 ff 0f 00 00 and $0xfff,%eax 80102a4f: 85 c0 test %eax,%eax 80102a51: 75 1b jne 80102a6e <kfree+0x2d> 80102a53: 81 7d 08 1c 29 11 80 cmpl $0x8011291c,0x8(%ebp) 80102a5a: 72 12 jb 80102a6e <kfree+0x2d> 80102a5c: 8b 45 08 mov 0x8(%ebp),%eax 80102a5f: 89 04 24 mov %eax,(%esp) 80102a62: e8 38 ff ff ff call 8010299f <v2p> 80102a67: 3d ff ff ff 0d cmp $0xdffffff,%eax 80102a6c: 76 0c jbe 80102a7a <kfree+0x39> panic("kfree"); 80102a6e: c7 04 24 7b 87 10 80 movl $0x8010877b,(%esp) 80102a75: e8 c0 da ff ff call 8010053a <panic> // Fill with junk to catch dangling refs. memset(v, 1, PGSIZE); 80102a7a: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80102a81: 00 80102a82: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80102a89: 00 80102a8a: 8b 45 08 mov 0x8(%ebp),%eax 80102a8d: 89 04 24 mov %eax,(%esp) 80102a90: e8 a9 26 00 00 call 8010513e <memset> if(kmem.use_lock) 80102a95: a1 94 f8 10 80 mov 0x8010f894,%eax 80102a9a: 85 c0 test %eax,%eax 80102a9c: 74 0c je 80102aaa <kfree+0x69> acquire(&kmem.lock); 80102a9e: c7 04 24 60 f8 10 80 movl $0x8010f860,(%esp) 80102aa5: e8 40 24 00 00 call 80104eea <acquire> r = (struct run*)v; 80102aaa: 8b 45 08 mov 0x8(%ebp),%eax 80102aad: 89 45 f4 mov %eax,-0xc(%ebp) r->next = kmem.freelist; 80102ab0: 8b 15 98 f8 10 80 mov 0x8010f898,%edx 80102ab6: 8b 45 f4 mov -0xc(%ebp),%eax 80102ab9: 89 10 mov %edx,(%eax) kmem.freelist = r; 80102abb: 8b 45 f4 mov -0xc(%ebp),%eax 80102abe: a3 98 f8 10 80 mov %eax,0x8010f898 if(kmem.use_lock) 80102ac3: a1 94 f8 10 80 mov 0x8010f894,%eax 80102ac8: 85 c0 test %eax,%eax 80102aca: 74 0c je 80102ad8 <kfree+0x97> release(&kmem.lock); 80102acc: c7 04 24 60 f8 10 80 movl $0x8010f860,(%esp) 80102ad3: e8 74 24 00 00 call 80104f4c <release> } 80102ad8: c9 leave 80102ad9: c3 ret 80102ada <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) { 80102ada: 55 push %ebp 80102adb: 89 e5 mov %esp,%ebp 80102add: 83 ec 28 sub $0x28,%esp struct run *r; if(kmem.use_lock) 80102ae0: a1 94 f8 10 80 mov 0x8010f894,%eax 80102ae5: 85 c0 test %eax,%eax 80102ae7: 74 0c je 80102af5 <kalloc+0x1b> acquire(&kmem.lock); 80102ae9: c7 04 24 60 f8 10 80 movl $0x8010f860,(%esp) 80102af0: e8 f5 23 00 00 call 80104eea <acquire> r = kmem.freelist; 80102af5: a1 98 f8 10 80 mov 0x8010f898,%eax 80102afa: 89 45 f4 mov %eax,-0xc(%ebp) if(r) 80102afd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80102b01: 74 0a je 80102b0d <kalloc+0x33> kmem.freelist = r->next; 80102b03: 8b 45 f4 mov -0xc(%ebp),%eax 80102b06: 8b 00 mov (%eax),%eax 80102b08: a3 98 f8 10 80 mov %eax,0x8010f898 if(kmem.use_lock) 80102b0d: a1 94 f8 10 80 mov 0x8010f894,%eax 80102b12: 85 c0 test %eax,%eax 80102b14: 74 0c je 80102b22 <kalloc+0x48> release(&kmem.lock); 80102b16: c7 04 24 60 f8 10 80 movl $0x8010f860,(%esp) 80102b1d: e8 2a 24 00 00 call 80104f4c <release> return (char*)r; 80102b22: 8b 45 f4 mov -0xc(%ebp),%eax } 80102b25: c9 leave 80102b26: c3 ret 80102b27 <inb>: // Routines to let C code use special x86 instructions. static inline uchar inb(ushort port) { 80102b27: 55 push %ebp 80102b28: 89 e5 mov %esp,%ebp 80102b2a: 83 ec 14 sub $0x14,%esp 80102b2d: 8b 45 08 mov 0x8(%ebp),%eax 80102b30: 66 89 45 ec mov %ax,-0x14(%ebp) uchar data; asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102b34: 0f b7 45 ec movzwl -0x14(%ebp),%eax 80102b38: 89 c2 mov %eax,%edx 80102b3a: ec in (%dx),%al 80102b3b: 88 45 ff mov %al,-0x1(%ebp) return data; 80102b3e: 0f b6 45 ff movzbl -0x1(%ebp),%eax } 80102b42: c9 leave 80102b43: c3 ret 80102b44 <kbdgetc>: #include "defs.h" #include "kbd.h" int kbdgetc(void) { 80102b44: 55 push %ebp 80102b45: 89 e5 mov %esp,%ebp 80102b47: 83 ec 14 sub $0x14,%esp static uchar *charcode[4] = { normalmap, shiftmap, ctlmap, ctlmap }; uint st, data, c; st = inb(KBSTATP); 80102b4a: c7 04 24 64 00 00 00 movl $0x64,(%esp) 80102b51: e8 d1 ff ff ff call 80102b27 <inb> 80102b56: 0f b6 c0 movzbl %al,%eax 80102b59: 89 45 f4 mov %eax,-0xc(%ebp) if((st & KBS_DIB) == 0) 80102b5c: 8b 45 f4 mov -0xc(%ebp),%eax 80102b5f: 83 e0 01 and $0x1,%eax 80102b62: 85 c0 test %eax,%eax 80102b64: 75 0a jne 80102b70 <kbdgetc+0x2c> return -1; 80102b66: b8 ff ff ff ff mov $0xffffffff,%eax 80102b6b: e9 25 01 00 00 jmp 80102c95 <kbdgetc+0x151> data = inb(KBDATAP); 80102b70: c7 04 24 60 00 00 00 movl $0x60,(%esp) 80102b77: e8 ab ff ff ff call 80102b27 <inb> 80102b7c: 0f b6 c0 movzbl %al,%eax 80102b7f: 89 45 fc mov %eax,-0x4(%ebp) if(data == 0xE0){ 80102b82: 81 7d fc e0 00 00 00 cmpl $0xe0,-0x4(%ebp) 80102b89: 75 17 jne 80102ba2 <kbdgetc+0x5e> shift |= E0ESC; 80102b8b: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102b90: 83 c8 40 or $0x40,%eax 80102b93: a3 5c b6 10 80 mov %eax,0x8010b65c return 0; 80102b98: b8 00 00 00 00 mov $0x0,%eax 80102b9d: e9 f3 00 00 00 jmp 80102c95 <kbdgetc+0x151> } else if(data & 0x80){ 80102ba2: 8b 45 fc mov -0x4(%ebp),%eax 80102ba5: 25 80 00 00 00 and $0x80,%eax 80102baa: 85 c0 test %eax,%eax 80102bac: 74 45 je 80102bf3 <kbdgetc+0xaf> // Key released data = (shift & E0ESC ? data : data & 0x7F); 80102bae: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102bb3: 83 e0 40 and $0x40,%eax 80102bb6: 85 c0 test %eax,%eax 80102bb8: 75 08 jne 80102bc2 <kbdgetc+0x7e> 80102bba: 8b 45 fc mov -0x4(%ebp),%eax 80102bbd: 83 e0 7f and $0x7f,%eax 80102bc0: eb 03 jmp 80102bc5 <kbdgetc+0x81> 80102bc2: 8b 45 fc mov -0x4(%ebp),%eax 80102bc5: 89 45 fc mov %eax,-0x4(%ebp) shift &= ~(shiftcode[data] | E0ESC); 80102bc8: 8b 45 fc mov -0x4(%ebp),%eax 80102bcb: 05 20 90 10 80 add $0x80109020,%eax 80102bd0: 0f b6 00 movzbl (%eax),%eax 80102bd3: 83 c8 40 or $0x40,%eax 80102bd6: 0f b6 c0 movzbl %al,%eax 80102bd9: f7 d0 not %eax 80102bdb: 89 c2 mov %eax,%edx 80102bdd: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102be2: 21 d0 and %edx,%eax 80102be4: a3 5c b6 10 80 mov %eax,0x8010b65c return 0; 80102be9: b8 00 00 00 00 mov $0x0,%eax 80102bee: e9 a2 00 00 00 jmp 80102c95 <kbdgetc+0x151> } else if(shift & E0ESC){ 80102bf3: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102bf8: 83 e0 40 and $0x40,%eax 80102bfb: 85 c0 test %eax,%eax 80102bfd: 74 14 je 80102c13 <kbdgetc+0xcf> // Last character was an E0 escape; or with 0x80 data |= 0x80; 80102bff: 81 4d fc 80 00 00 00 orl $0x80,-0x4(%ebp) shift &= ~E0ESC; 80102c06: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c0b: 83 e0 bf and $0xffffffbf,%eax 80102c0e: a3 5c b6 10 80 mov %eax,0x8010b65c } shift |= shiftcode[data]; 80102c13: 8b 45 fc mov -0x4(%ebp),%eax 80102c16: 05 20 90 10 80 add $0x80109020,%eax 80102c1b: 0f b6 00 movzbl (%eax),%eax 80102c1e: 0f b6 d0 movzbl %al,%edx 80102c21: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c26: 09 d0 or %edx,%eax 80102c28: a3 5c b6 10 80 mov %eax,0x8010b65c shift ^= togglecode[data]; 80102c2d: 8b 45 fc mov -0x4(%ebp),%eax 80102c30: 05 20 91 10 80 add $0x80109120,%eax 80102c35: 0f b6 00 movzbl (%eax),%eax 80102c38: 0f b6 d0 movzbl %al,%edx 80102c3b: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c40: 31 d0 xor %edx,%eax 80102c42: a3 5c b6 10 80 mov %eax,0x8010b65c c = charcode[shift & (CTL | SHIFT)][data]; 80102c47: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c4c: 83 e0 03 and $0x3,%eax 80102c4f: 8b 14 85 20 95 10 80 mov -0x7fef6ae0(,%eax,4),%edx 80102c56: 8b 45 fc mov -0x4(%ebp),%eax 80102c59: 01 d0 add %edx,%eax 80102c5b: 0f b6 00 movzbl (%eax),%eax 80102c5e: 0f b6 c0 movzbl %al,%eax 80102c61: 89 45 f8 mov %eax,-0x8(%ebp) if(shift & CAPSLOCK){ 80102c64: a1 5c b6 10 80 mov 0x8010b65c,%eax 80102c69: 83 e0 08 and $0x8,%eax 80102c6c: 85 c0 test %eax,%eax 80102c6e: 74 22 je 80102c92 <kbdgetc+0x14e> if('a' <= c && c <= 'z') 80102c70: 83 7d f8 60 cmpl $0x60,-0x8(%ebp) 80102c74: 76 0c jbe 80102c82 <kbdgetc+0x13e> 80102c76: 83 7d f8 7a cmpl $0x7a,-0x8(%ebp) 80102c7a: 77 06 ja 80102c82 <kbdgetc+0x13e> c += 'A' - 'a'; 80102c7c: 83 6d f8 20 subl $0x20,-0x8(%ebp) 80102c80: eb 10 jmp 80102c92 <kbdgetc+0x14e> else if('A' <= c && c <= 'Z') 80102c82: 83 7d f8 40 cmpl $0x40,-0x8(%ebp) 80102c86: 76 0a jbe 80102c92 <kbdgetc+0x14e> 80102c88: 83 7d f8 5a cmpl $0x5a,-0x8(%ebp) 80102c8c: 77 04 ja 80102c92 <kbdgetc+0x14e> c += 'a' - 'A'; 80102c8e: 83 45 f8 20 addl $0x20,-0x8(%ebp) } return c; 80102c92: 8b 45 f8 mov -0x8(%ebp),%eax } 80102c95: c9 leave 80102c96: c3 ret 80102c97 <kbdintr>: void kbdintr(void) { 80102c97: 55 push %ebp 80102c98: 89 e5 mov %esp,%ebp 80102c9a: 83 ec 18 sub $0x18,%esp consoleintr(kbdgetc); 80102c9d: c7 04 24 44 2b 10 80 movl $0x80102b44,(%esp) 80102ca4: e8 04 db ff ff call 801007ad <consoleintr> } 80102ca9: c9 leave 80102caa: c3 ret 80102cab <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 80102cab: 55 push %ebp 80102cac: 89 e5 mov %esp,%ebp 80102cae: 83 ec 08 sub $0x8,%esp 80102cb1: 8b 55 08 mov 0x8(%ebp),%edx 80102cb4: 8b 45 0c mov 0xc(%ebp),%eax 80102cb7: 66 89 55 fc mov %dx,-0x4(%ebp) 80102cbb: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102cbe: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 80102cc2: 0f b7 55 fc movzwl -0x4(%ebp),%edx 80102cc6: ee out %al,(%dx) } 80102cc7: c9 leave 80102cc8: c3 ret 80102cc9 <readeflags>: asm volatile("ltr %0" : : "r" (sel)); } static inline uint readeflags(void) { 80102cc9: 55 push %ebp 80102cca: 89 e5 mov %esp,%ebp 80102ccc: 83 ec 10 sub $0x10,%esp uint eflags; asm volatile("pushfl; popl %0" : "=r" (eflags)); 80102ccf: 9c pushf 80102cd0: 58 pop %eax 80102cd1: 89 45 fc mov %eax,-0x4(%ebp) return eflags; 80102cd4: 8b 45 fc mov -0x4(%ebp),%eax } 80102cd7: c9 leave 80102cd8: c3 ret 80102cd9 <lapicw>: volatile uint *lapic; // Initialized in mp.c static void lapicw(int index, int value) { 80102cd9: 55 push %ebp 80102cda: 89 e5 mov %esp,%ebp lapic[index] = value; 80102cdc: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102ce1: 8b 55 08 mov 0x8(%ebp),%edx 80102ce4: c1 e2 02 shl $0x2,%edx 80102ce7: 01 c2 add %eax,%edx 80102ce9: 8b 45 0c mov 0xc(%ebp),%eax 80102cec: 89 02 mov %eax,(%edx) lapic[ID]; // wait for write to finish, by reading 80102cee: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102cf3: 83 c0 20 add $0x20,%eax 80102cf6: 8b 00 mov (%eax),%eax } 80102cf8: 5d pop %ebp 80102cf9: c3 ret 80102cfa <lapicinit>: //PAGEBREAK! void lapicinit(void) { 80102cfa: 55 push %ebp 80102cfb: 89 e5 mov %esp,%ebp 80102cfd: 83 ec 08 sub $0x8,%esp if(!lapic) 80102d00: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102d05: 85 c0 test %eax,%eax 80102d07: 75 05 jne 80102d0e <lapicinit+0x14> return; 80102d09: e9 43 01 00 00 jmp 80102e51 <lapicinit+0x157> // Enable local APIC; set spurious interrupt vector. lapicw(SVR, ENABLE | (T_IRQ0 + IRQ_SPURIOUS)); 80102d0e: c7 44 24 04 3f 01 00 movl $0x13f,0x4(%esp) 80102d15: 00 80102d16: c7 04 24 3c 00 00 00 movl $0x3c,(%esp) 80102d1d: e8 b7 ff ff ff call 80102cd9 <lapicw> // The timer repeatedly counts down at bus frequency // from lapic[TICR] and then issues an interrupt. // If xv6 cared more about precise timekeeping, // TICR would be calibrated using an external time source. lapicw(TDCR, X1); 80102d22: c7 44 24 04 0b 00 00 movl $0xb,0x4(%esp) 80102d29: 00 80102d2a: c7 04 24 f8 00 00 00 movl $0xf8,(%esp) 80102d31: e8 a3 ff ff ff call 80102cd9 <lapicw> lapicw(TIMER, PERIODIC | (T_IRQ0 + IRQ_TIMER)); 80102d36: c7 44 24 04 20 00 02 movl $0x20020,0x4(%esp) 80102d3d: 00 80102d3e: c7 04 24 c8 00 00 00 movl $0xc8,(%esp) 80102d45: e8 8f ff ff ff call 80102cd9 <lapicw> lapicw(TICR, 10000000); 80102d4a: c7 44 24 04 80 96 98 movl $0x989680,0x4(%esp) 80102d51: 00 80102d52: c7 04 24 e0 00 00 00 movl $0xe0,(%esp) 80102d59: e8 7b ff ff ff call 80102cd9 <lapicw> // Disable logical interrupt lines. lapicw(LINT0, MASKED); 80102d5e: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp) 80102d65: 00 80102d66: c7 04 24 d4 00 00 00 movl $0xd4,(%esp) 80102d6d: e8 67 ff ff ff call 80102cd9 <lapicw> lapicw(LINT1, MASKED); 80102d72: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp) 80102d79: 00 80102d7a: c7 04 24 d8 00 00 00 movl $0xd8,(%esp) 80102d81: e8 53 ff ff ff call 80102cd9 <lapicw> // Disable performance counter overflow interrupts // on machines that provide that interrupt entry. if(((lapic[VER]>>16) & 0xFF) >= 4) 80102d86: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102d8b: 83 c0 30 add $0x30,%eax 80102d8e: 8b 00 mov (%eax),%eax 80102d90: c1 e8 10 shr $0x10,%eax 80102d93: 0f b6 c0 movzbl %al,%eax 80102d96: 83 f8 03 cmp $0x3,%eax 80102d99: 76 14 jbe 80102daf <lapicinit+0xb5> lapicw(PCINT, MASKED); 80102d9b: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp) 80102da2: 00 80102da3: c7 04 24 d0 00 00 00 movl $0xd0,(%esp) 80102daa: e8 2a ff ff ff call 80102cd9 <lapicw> // Map error interrupt to IRQ_ERROR. lapicw(ERROR, T_IRQ0 + IRQ_ERROR); 80102daf: c7 44 24 04 33 00 00 movl $0x33,0x4(%esp) 80102db6: 00 80102db7: c7 04 24 dc 00 00 00 movl $0xdc,(%esp) 80102dbe: e8 16 ff ff ff call 80102cd9 <lapicw> // Clear error status register (requires back-to-back writes). lapicw(ESR, 0); 80102dc3: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102dca: 00 80102dcb: c7 04 24 a0 00 00 00 movl $0xa0,(%esp) 80102dd2: e8 02 ff ff ff call 80102cd9 <lapicw> lapicw(ESR, 0); 80102dd7: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102dde: 00 80102ddf: c7 04 24 a0 00 00 00 movl $0xa0,(%esp) 80102de6: e8 ee fe ff ff call 80102cd9 <lapicw> // Ack any outstanding interrupts. lapicw(EOI, 0); 80102deb: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102df2: 00 80102df3: c7 04 24 2c 00 00 00 movl $0x2c,(%esp) 80102dfa: e8 da fe ff ff call 80102cd9 <lapicw> // Send an Init Level De-Assert to synchronise arbitration ID's. lapicw(ICRHI, 0); 80102dff: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102e06: 00 80102e07: c7 04 24 c4 00 00 00 movl $0xc4,(%esp) 80102e0e: e8 c6 fe ff ff call 80102cd9 <lapicw> lapicw(ICRLO, BCAST | INIT | LEVEL); 80102e13: c7 44 24 04 00 85 08 movl $0x88500,0x4(%esp) 80102e1a: 00 80102e1b: c7 04 24 c0 00 00 00 movl $0xc0,(%esp) 80102e22: e8 b2 fe ff ff call 80102cd9 <lapicw> while(lapic[ICRLO] & DELIVS) 80102e27: 90 nop 80102e28: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102e2d: 05 00 03 00 00 add $0x300,%eax 80102e32: 8b 00 mov (%eax),%eax 80102e34: 25 00 10 00 00 and $0x1000,%eax 80102e39: 85 c0 test %eax,%eax 80102e3b: 75 eb jne 80102e28 <lapicinit+0x12e> ; // Enable interrupts on the APIC (but not on the processor). lapicw(TPR, 0); 80102e3d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102e44: 00 80102e45: c7 04 24 20 00 00 00 movl $0x20,(%esp) 80102e4c: e8 88 fe ff ff call 80102cd9 <lapicw> } 80102e51: c9 leave 80102e52: c3 ret 80102e53 <cpunum>: int cpunum(void) { 80102e53: 55 push %ebp 80102e54: 89 e5 mov %esp,%ebp 80102e56: 83 ec 18 sub $0x18,%esp // Cannot call cpu when interrupts are enabled: // result not guaranteed to last long enough to be used! // Would prefer to panic but even printing is chancy here: // almost everything, including cprintf and panic, calls cpu, // often indirectly through acquire and release. if(readeflags()&FL_IF){ 80102e59: e8 6b fe ff ff call 80102cc9 <readeflags> 80102e5e: 25 00 02 00 00 and $0x200,%eax 80102e63: 85 c0 test %eax,%eax 80102e65: 74 25 je 80102e8c <cpunum+0x39> static int n; if(n++ == 0) 80102e67: a1 60 b6 10 80 mov 0x8010b660,%eax 80102e6c: 8d 50 01 lea 0x1(%eax),%edx 80102e6f: 89 15 60 b6 10 80 mov %edx,0x8010b660 80102e75: 85 c0 test %eax,%eax 80102e77: 75 13 jne 80102e8c <cpunum+0x39> cprintf("cpu called from %x with interrupts enabled\n", 80102e79: 8b 45 04 mov 0x4(%ebp),%eax 80102e7c: 89 44 24 04 mov %eax,0x4(%esp) 80102e80: c7 04 24 84 87 10 80 movl $0x80108784,(%esp) 80102e87: e8 14 d5 ff ff call 801003a0 <cprintf> __builtin_return_address(0)); } if(lapic) 80102e8c: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102e91: 85 c0 test %eax,%eax 80102e93: 74 0f je 80102ea4 <cpunum+0x51> return lapic[ID]>>24; 80102e95: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102e9a: 83 c0 20 add $0x20,%eax 80102e9d: 8b 00 mov (%eax),%eax 80102e9f: c1 e8 18 shr $0x18,%eax 80102ea2: eb 05 jmp 80102ea9 <cpunum+0x56> return 0; 80102ea4: b8 00 00 00 00 mov $0x0,%eax } 80102ea9: c9 leave 80102eaa: c3 ret 80102eab <lapiceoi>: // Acknowledge interrupt. void lapiceoi(void) { 80102eab: 55 push %ebp 80102eac: 89 e5 mov %esp,%ebp 80102eae: 83 ec 08 sub $0x8,%esp if(lapic) 80102eb1: a1 9c f8 10 80 mov 0x8010f89c,%eax 80102eb6: 85 c0 test %eax,%eax 80102eb8: 74 14 je 80102ece <lapiceoi+0x23> lapicw(EOI, 0); 80102eba: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80102ec1: 00 80102ec2: c7 04 24 2c 00 00 00 movl $0x2c,(%esp) 80102ec9: e8 0b fe ff ff call 80102cd9 <lapicw> } 80102ece: c9 leave 80102ecf: c3 ret 80102ed0 <microdelay>: // Spin for a given number of microseconds. // On real hardware would want to tune this dynamically. void microdelay(int us) { 80102ed0: 55 push %ebp 80102ed1: 89 e5 mov %esp,%ebp } 80102ed3: 5d pop %ebp 80102ed4: c3 ret 80102ed5 <lapicstartap>: // Start additional processor running entry code at addr. // See Appendix B of MultiProcessor Specification. void lapicstartap(uchar apicid, uint addr) { 80102ed5: 55 push %ebp 80102ed6: 89 e5 mov %esp,%ebp 80102ed8: 83 ec 1c sub $0x1c,%esp 80102edb: 8b 45 08 mov 0x8(%ebp),%eax 80102ede: 88 45 ec mov %al,-0x14(%ebp) ushort *wrv; // "The BSP must initialize CMOS shutdown code to 0AH // and the warm reset vector (DWORD based at 40:67) to point at // the AP startup code prior to the [universal startup algorithm]." outb(IO_RTC, 0xF); // offset 0xF is shutdown code 80102ee1: c7 44 24 04 0f 00 00 movl $0xf,0x4(%esp) 80102ee8: 00 80102ee9: c7 04 24 70 00 00 00 movl $0x70,(%esp) 80102ef0: e8 b6 fd ff ff call 80102cab <outb> outb(IO_RTC+1, 0x0A); 80102ef5: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp) 80102efc: 00 80102efd: c7 04 24 71 00 00 00 movl $0x71,(%esp) 80102f04: e8 a2 fd ff ff call 80102cab <outb> wrv = (ushort*)P2V((0x40<<4 | 0x67)); // Warm reset vector 80102f09: c7 45 f8 67 04 00 80 movl $0x80000467,-0x8(%ebp) wrv[0] = 0; 80102f10: 8b 45 f8 mov -0x8(%ebp),%eax 80102f13: 66 c7 00 00 00 movw $0x0,(%eax) wrv[1] = addr >> 4; 80102f18: 8b 45 f8 mov -0x8(%ebp),%eax 80102f1b: 8d 50 02 lea 0x2(%eax),%edx 80102f1e: 8b 45 0c mov 0xc(%ebp),%eax 80102f21: c1 e8 04 shr $0x4,%eax 80102f24: 66 89 02 mov %ax,(%edx) // "Universal startup algorithm." // Send INIT (level-triggered) interrupt to reset other CPU. lapicw(ICRHI, apicid<<24); 80102f27: 0f b6 45 ec movzbl -0x14(%ebp),%eax 80102f2b: c1 e0 18 shl $0x18,%eax 80102f2e: 89 44 24 04 mov %eax,0x4(%esp) 80102f32: c7 04 24 c4 00 00 00 movl $0xc4,(%esp) 80102f39: e8 9b fd ff ff call 80102cd9 <lapicw> lapicw(ICRLO, INIT | LEVEL | ASSERT); 80102f3e: c7 44 24 04 00 c5 00 movl $0xc500,0x4(%esp) 80102f45: 00 80102f46: c7 04 24 c0 00 00 00 movl $0xc0,(%esp) 80102f4d: e8 87 fd ff ff call 80102cd9 <lapicw> microdelay(200); 80102f52: c7 04 24 c8 00 00 00 movl $0xc8,(%esp) 80102f59: e8 72 ff ff ff call 80102ed0 <microdelay> lapicw(ICRLO, INIT | LEVEL); 80102f5e: c7 44 24 04 00 85 00 movl $0x8500,0x4(%esp) 80102f65: 00 80102f66: c7 04 24 c0 00 00 00 movl $0xc0,(%esp) 80102f6d: e8 67 fd ff ff call 80102cd9 <lapicw> microdelay(100); // should be 10ms, but too slow in Bochs! 80102f72: c7 04 24 64 00 00 00 movl $0x64,(%esp) 80102f79: e8 52 ff ff ff call 80102ed0 <microdelay> // Send startup IPI (twice!) to enter code. // Regular hardware is supposed to only accept a STARTUP // when it is in the halted state due to an INIT. So the second // should be ignored, but it is part of the official Intel algorithm. // Bochs complains about the second one. Too bad for Bochs. for(i = 0; i < 2; i++){ 80102f7e: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 80102f85: eb 40 jmp 80102fc7 <lapicstartap+0xf2> lapicw(ICRHI, apicid<<24); 80102f87: 0f b6 45 ec movzbl -0x14(%ebp),%eax 80102f8b: c1 e0 18 shl $0x18,%eax 80102f8e: 89 44 24 04 mov %eax,0x4(%esp) 80102f92: c7 04 24 c4 00 00 00 movl $0xc4,(%esp) 80102f99: e8 3b fd ff ff call 80102cd9 <lapicw> lapicw(ICRLO, STARTUP | (addr>>12)); 80102f9e: 8b 45 0c mov 0xc(%ebp),%eax 80102fa1: c1 e8 0c shr $0xc,%eax 80102fa4: 80 cc 06 or $0x6,%ah 80102fa7: 89 44 24 04 mov %eax,0x4(%esp) 80102fab: c7 04 24 c0 00 00 00 movl $0xc0,(%esp) 80102fb2: e8 22 fd ff ff call 80102cd9 <lapicw> microdelay(200); 80102fb7: c7 04 24 c8 00 00 00 movl $0xc8,(%esp) 80102fbe: e8 0d ff ff ff call 80102ed0 <microdelay> // Send startup IPI (twice!) to enter code. // Regular hardware is supposed to only accept a STARTUP // when it is in the halted state due to an INIT. So the second // should be ignored, but it is part of the official Intel algorithm. // Bochs complains about the second one. Too bad for Bochs. for(i = 0; i < 2; i++){ 80102fc3: 83 45 fc 01 addl $0x1,-0x4(%ebp) 80102fc7: 83 7d fc 01 cmpl $0x1,-0x4(%ebp) 80102fcb: 7e ba jle 80102f87 <lapicstartap+0xb2> lapicw(ICRHI, apicid<<24); lapicw(ICRLO, STARTUP | (addr>>12)); microdelay(200); } } 80102fcd: c9 leave 80102fce: c3 ret 80102fcf <initlog>: static void recover_from_log(void); void initlog(void) { 80102fcf: 55 push %ebp 80102fd0: 89 e5 mov %esp,%ebp 80102fd2: 83 ec 28 sub $0x28,%esp if (sizeof(struct logheader) >= BSIZE) panic("initlog: too big logheader"); struct superblock sb; initlock(&log.lock, "log"); 80102fd5: c7 44 24 04 b0 87 10 movl $0x801087b0,0x4(%esp) 80102fdc: 80 80102fdd: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 80102fe4: e8 e0 1e 00 00 call 80104ec9 <initlock> readsb(ROOTDEV, &sb); 80102fe9: 8d 45 e8 lea -0x18(%ebp),%eax 80102fec: 89 44 24 04 mov %eax,0x4(%esp) 80102ff0: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80102ff7: e8 ed e2 ff ff call 801012e9 <readsb> log.start = sb.size - sb.nlog; 80102ffc: 8b 55 e8 mov -0x18(%ebp),%edx 80102fff: 8b 45 f4 mov -0xc(%ebp),%eax 80103002: 29 c2 sub %eax,%edx 80103004: 89 d0 mov %edx,%eax 80103006: a3 d4 f8 10 80 mov %eax,0x8010f8d4 log.size = sb.nlog; 8010300b: 8b 45 f4 mov -0xc(%ebp),%eax 8010300e: a3 d8 f8 10 80 mov %eax,0x8010f8d8 log.dev = ROOTDEV; 80103013: c7 05 e0 f8 10 80 01 movl $0x1,0x8010f8e0 8010301a: 00 00 00 recover_from_log(); 8010301d: e8 9a 01 00 00 call 801031bc <recover_from_log> } 80103022: c9 leave 80103023: c3 ret 80103024 <install_trans>: // Copy committed blocks from log to their home location static void install_trans(void) { 80103024: 55 push %ebp 80103025: 89 e5 mov %esp,%ebp 80103027: 83 ec 28 sub $0x28,%esp int tail; for (tail = 0; tail < log.lh.n; tail++) { 8010302a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80103031: e9 8c 00 00 00 jmp 801030c2 <install_trans+0x9e> struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block 80103036: 8b 15 d4 f8 10 80 mov 0x8010f8d4,%edx 8010303c: 8b 45 f4 mov -0xc(%ebp),%eax 8010303f: 01 d0 add %edx,%eax 80103041: 83 c0 01 add $0x1,%eax 80103044: 89 c2 mov %eax,%edx 80103046: a1 e0 f8 10 80 mov 0x8010f8e0,%eax 8010304b: 89 54 24 04 mov %edx,0x4(%esp) 8010304f: 89 04 24 mov %eax,(%esp) 80103052: e8 4f d1 ff ff call 801001a6 <bread> 80103057: 89 45 f0 mov %eax,-0x10(%ebp) struct buf *dbuf = bread(log.dev, log.lh.sector[tail]); // read dst 8010305a: 8b 45 f4 mov -0xc(%ebp),%eax 8010305d: 83 c0 10 add $0x10,%eax 80103060: 8b 04 85 a8 f8 10 80 mov -0x7fef0758(,%eax,4),%eax 80103067: 89 c2 mov %eax,%edx 80103069: a1 e0 f8 10 80 mov 0x8010f8e0,%eax 8010306e: 89 54 24 04 mov %edx,0x4(%esp) 80103072: 89 04 24 mov %eax,(%esp) 80103075: e8 2c d1 ff ff call 801001a6 <bread> 8010307a: 89 45 ec mov %eax,-0x14(%ebp) memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst 8010307d: 8b 45 f0 mov -0x10(%ebp),%eax 80103080: 8d 50 18 lea 0x18(%eax),%edx 80103083: 8b 45 ec mov -0x14(%ebp),%eax 80103086: 83 c0 18 add $0x18,%eax 80103089: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 80103090: 00 80103091: 89 54 24 04 mov %edx,0x4(%esp) 80103095: 89 04 24 mov %eax,(%esp) 80103098: e8 70 21 00 00 call 8010520d <memmove> bwrite(dbuf); // write dst to disk 8010309d: 8b 45 ec mov -0x14(%ebp),%eax 801030a0: 89 04 24 mov %eax,(%esp) 801030a3: e8 35 d1 ff ff call 801001dd <bwrite> brelse(lbuf); 801030a8: 8b 45 f0 mov -0x10(%ebp),%eax 801030ab: 89 04 24 mov %eax,(%esp) 801030ae: e8 64 d1 ff ff call 80100217 <brelse> brelse(dbuf); 801030b3: 8b 45 ec mov -0x14(%ebp),%eax 801030b6: 89 04 24 mov %eax,(%esp) 801030b9: e8 59 d1 ff ff call 80100217 <brelse> static void install_trans(void) { int tail; for (tail = 0; tail < log.lh.n; tail++) { 801030be: 83 45 f4 01 addl $0x1,-0xc(%ebp) 801030c2: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 801030c7: 3b 45 f4 cmp -0xc(%ebp),%eax 801030ca: 0f 8f 66 ff ff ff jg 80103036 <install_trans+0x12> memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst bwrite(dbuf); // write dst to disk brelse(lbuf); brelse(dbuf); } } 801030d0: c9 leave 801030d1: c3 ret 801030d2 <read_head>: // Read the log header from disk into the in-memory log header static void read_head(void) { 801030d2: 55 push %ebp 801030d3: 89 e5 mov %esp,%ebp 801030d5: 83 ec 28 sub $0x28,%esp struct buf *buf = bread(log.dev, log.start); 801030d8: a1 d4 f8 10 80 mov 0x8010f8d4,%eax 801030dd: 89 c2 mov %eax,%edx 801030df: a1 e0 f8 10 80 mov 0x8010f8e0,%eax 801030e4: 89 54 24 04 mov %edx,0x4(%esp) 801030e8: 89 04 24 mov %eax,(%esp) 801030eb: e8 b6 d0 ff ff call 801001a6 <bread> 801030f0: 89 45 f0 mov %eax,-0x10(%ebp) struct logheader *lh = (struct logheader *) (buf->data); 801030f3: 8b 45 f0 mov -0x10(%ebp),%eax 801030f6: 83 c0 18 add $0x18,%eax 801030f9: 89 45 ec mov %eax,-0x14(%ebp) int i; log.lh.n = lh->n; 801030fc: 8b 45 ec mov -0x14(%ebp),%eax 801030ff: 8b 00 mov (%eax),%eax 80103101: a3 e4 f8 10 80 mov %eax,0x8010f8e4 for (i = 0; i < log.lh.n; i++) { 80103106: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 8010310d: eb 1b jmp 8010312a <read_head+0x58> log.lh.sector[i] = lh->sector[i]; 8010310f: 8b 45 ec mov -0x14(%ebp),%eax 80103112: 8b 55 f4 mov -0xc(%ebp),%edx 80103115: 8b 44 90 04 mov 0x4(%eax,%edx,4),%eax 80103119: 8b 55 f4 mov -0xc(%ebp),%edx 8010311c: 83 c2 10 add $0x10,%edx 8010311f: 89 04 95 a8 f8 10 80 mov %eax,-0x7fef0758(,%edx,4) { struct buf *buf = bread(log.dev, log.start); struct logheader *lh = (struct logheader *) (buf->data); int i; log.lh.n = lh->n; for (i = 0; i < log.lh.n; i++) { 80103126: 83 45 f4 01 addl $0x1,-0xc(%ebp) 8010312a: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 8010312f: 3b 45 f4 cmp -0xc(%ebp),%eax 80103132: 7f db jg 8010310f <read_head+0x3d> log.lh.sector[i] = lh->sector[i]; } brelse(buf); 80103134: 8b 45 f0 mov -0x10(%ebp),%eax 80103137: 89 04 24 mov %eax,(%esp) 8010313a: e8 d8 d0 ff ff call 80100217 <brelse> } 8010313f: c9 leave 80103140: c3 ret 80103141 <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) { 80103141: 55 push %ebp 80103142: 89 e5 mov %esp,%ebp 80103144: 83 ec 28 sub $0x28,%esp struct buf *buf = bread(log.dev, log.start); 80103147: a1 d4 f8 10 80 mov 0x8010f8d4,%eax 8010314c: 89 c2 mov %eax,%edx 8010314e: a1 e0 f8 10 80 mov 0x8010f8e0,%eax 80103153: 89 54 24 04 mov %edx,0x4(%esp) 80103157: 89 04 24 mov %eax,(%esp) 8010315a: e8 47 d0 ff ff call 801001a6 <bread> 8010315f: 89 45 f0 mov %eax,-0x10(%ebp) struct logheader *hb = (struct logheader *) (buf->data); 80103162: 8b 45 f0 mov -0x10(%ebp),%eax 80103165: 83 c0 18 add $0x18,%eax 80103168: 89 45 ec mov %eax,-0x14(%ebp) int i; hb->n = log.lh.n; 8010316b: 8b 15 e4 f8 10 80 mov 0x8010f8e4,%edx 80103171: 8b 45 ec mov -0x14(%ebp),%eax 80103174: 89 10 mov %edx,(%eax) for (i = 0; i < log.lh.n; i++) { 80103176: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 8010317d: eb 1b jmp 8010319a <write_head+0x59> hb->sector[i] = log.lh.sector[i]; 8010317f: 8b 45 f4 mov -0xc(%ebp),%eax 80103182: 83 c0 10 add $0x10,%eax 80103185: 8b 0c 85 a8 f8 10 80 mov -0x7fef0758(,%eax,4),%ecx 8010318c: 8b 45 ec mov -0x14(%ebp),%eax 8010318f: 8b 55 f4 mov -0xc(%ebp),%edx 80103192: 89 4c 90 04 mov %ecx,0x4(%eax,%edx,4) { struct buf *buf = bread(log.dev, log.start); struct logheader *hb = (struct logheader *) (buf->data); int i; hb->n = log.lh.n; for (i = 0; i < log.lh.n; i++) { 80103196: 83 45 f4 01 addl $0x1,-0xc(%ebp) 8010319a: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 8010319f: 3b 45 f4 cmp -0xc(%ebp),%eax 801031a2: 7f db jg 8010317f <write_head+0x3e> hb->sector[i] = log.lh.sector[i]; } bwrite(buf); 801031a4: 8b 45 f0 mov -0x10(%ebp),%eax 801031a7: 89 04 24 mov %eax,(%esp) 801031aa: e8 2e d0 ff ff call 801001dd <bwrite> brelse(buf); 801031af: 8b 45 f0 mov -0x10(%ebp),%eax 801031b2: 89 04 24 mov %eax,(%esp) 801031b5: e8 5d d0 ff ff call 80100217 <brelse> } 801031ba: c9 leave 801031bb: c3 ret 801031bc <recover_from_log>: static void recover_from_log(void) { 801031bc: 55 push %ebp 801031bd: 89 e5 mov %esp,%ebp 801031bf: 83 ec 08 sub $0x8,%esp read_head(); 801031c2: e8 0b ff ff ff call 801030d2 <read_head> install_trans(); // if committed, copy from log to disk 801031c7: e8 58 fe ff ff call 80103024 <install_trans> log.lh.n = 0; 801031cc: c7 05 e4 f8 10 80 00 movl $0x0,0x8010f8e4 801031d3: 00 00 00 write_head(); // clear the log 801031d6: e8 66 ff ff ff call 80103141 <write_head> } 801031db: c9 leave 801031dc: c3 ret 801031dd <begin_trans>: void begin_trans(void) { 801031dd: 55 push %ebp 801031de: 89 e5 mov %esp,%ebp 801031e0: 83 ec 18 sub $0x18,%esp acquire(&log.lock); 801031e3: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 801031ea: e8 fb 1c 00 00 call 80104eea <acquire> while (log.busy) { 801031ef: eb 14 jmp 80103205 <begin_trans+0x28> sleep(&log, &log.lock); 801031f1: c7 44 24 04 a0 f8 10 movl $0x8010f8a0,0x4(%esp) 801031f8: 80 801031f9: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 80103200: e8 62 19 00 00 call 80104b67 <sleep> void begin_trans(void) { acquire(&log.lock); while (log.busy) { 80103205: a1 dc f8 10 80 mov 0x8010f8dc,%eax 8010320a: 85 c0 test %eax,%eax 8010320c: 75 e3 jne 801031f1 <begin_trans+0x14> sleep(&log, &log.lock); } log.busy = 1; 8010320e: c7 05 dc f8 10 80 01 movl $0x1,0x8010f8dc 80103215: 00 00 00 release(&log.lock); 80103218: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 8010321f: e8 28 1d 00 00 call 80104f4c <release> } 80103224: c9 leave 80103225: c3 ret 80103226 <commit_trans>: void commit_trans(void) { 80103226: 55 push %ebp 80103227: 89 e5 mov %esp,%ebp 80103229: 83 ec 18 sub $0x18,%esp if (log.lh.n > 0) { 8010322c: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 80103231: 85 c0 test %eax,%eax 80103233: 7e 19 jle 8010324e <commit_trans+0x28> write_head(); // Write header to disk -- the real commit 80103235: e8 07 ff ff ff call 80103141 <write_head> install_trans(); // Now install writes to home locations 8010323a: e8 e5 fd ff ff call 80103024 <install_trans> log.lh.n = 0; 8010323f: c7 05 e4 f8 10 80 00 movl $0x0,0x8010f8e4 80103246: 00 00 00 write_head(); // Erase the transaction from the log 80103249: e8 f3 fe ff ff call 80103141 <write_head> } acquire(&log.lock); 8010324e: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 80103255: e8 90 1c 00 00 call 80104eea <acquire> log.busy = 0; 8010325a: c7 05 dc f8 10 80 00 movl $0x0,0x8010f8dc 80103261: 00 00 00 wakeup(&log); 80103264: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 8010326b: e8 3b 1a 00 00 call 80104cab <wakeup> release(&log.lock); 80103270: c7 04 24 a0 f8 10 80 movl $0x8010f8a0,(%esp) 80103277: e8 d0 1c 00 00 call 80104f4c <release> } 8010327c: c9 leave 8010327d: c3 ret 8010327e <log_write>: // modify bp->data[] // log_write(bp) // brelse(bp) void log_write(struct buf *b) { 8010327e: 55 push %ebp 8010327f: 89 e5 mov %esp,%ebp 80103281: 83 ec 28 sub $0x28,%esp int i; if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) 80103284: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 80103289: 83 f8 09 cmp $0x9,%eax 8010328c: 7f 12 jg 801032a0 <log_write+0x22> 8010328e: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 80103293: 8b 15 d8 f8 10 80 mov 0x8010f8d8,%edx 80103299: 83 ea 01 sub $0x1,%edx 8010329c: 39 d0 cmp %edx,%eax 8010329e: 7c 0c jl 801032ac <log_write+0x2e> panic("too big a transaction"); 801032a0: c7 04 24 b4 87 10 80 movl $0x801087b4,(%esp) 801032a7: e8 8e d2 ff ff call 8010053a <panic> if (!log.busy) 801032ac: a1 dc f8 10 80 mov 0x8010f8dc,%eax 801032b1: 85 c0 test %eax,%eax 801032b3: 75 0c jne 801032c1 <log_write+0x43> panic("write outside of trans"); 801032b5: c7 04 24 ca 87 10 80 movl $0x801087ca,(%esp) 801032bc: e8 79 d2 ff ff call 8010053a <panic> for (i = 0; i < log.lh.n; i++) { 801032c1: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 801032c8: eb 1f jmp 801032e9 <log_write+0x6b> if (log.lh.sector[i] == b->sector) // log absorbtion? 801032ca: 8b 45 f4 mov -0xc(%ebp),%eax 801032cd: 83 c0 10 add $0x10,%eax 801032d0: 8b 04 85 a8 f8 10 80 mov -0x7fef0758(,%eax,4),%eax 801032d7: 89 c2 mov %eax,%edx 801032d9: 8b 45 08 mov 0x8(%ebp),%eax 801032dc: 8b 40 08 mov 0x8(%eax),%eax 801032df: 39 c2 cmp %eax,%edx 801032e1: 75 02 jne 801032e5 <log_write+0x67> break; 801032e3: eb 0e jmp 801032f3 <log_write+0x75> if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) panic("too big a transaction"); if (!log.busy) panic("write outside of trans"); for (i = 0; i < log.lh.n; i++) { 801032e5: 83 45 f4 01 addl $0x1,-0xc(%ebp) 801032e9: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 801032ee: 3b 45 f4 cmp -0xc(%ebp),%eax 801032f1: 7f d7 jg 801032ca <log_write+0x4c> if (log.lh.sector[i] == b->sector) // log absorbtion? break; } log.lh.sector[i] = b->sector; 801032f3: 8b 45 08 mov 0x8(%ebp),%eax 801032f6: 8b 40 08 mov 0x8(%eax),%eax 801032f9: 8b 55 f4 mov -0xc(%ebp),%edx 801032fc: 83 c2 10 add $0x10,%edx 801032ff: 89 04 95 a8 f8 10 80 mov %eax,-0x7fef0758(,%edx,4) struct buf *lbuf = bread(b->dev, log.start+i+1); 80103306: 8b 15 d4 f8 10 80 mov 0x8010f8d4,%edx 8010330c: 8b 45 f4 mov -0xc(%ebp),%eax 8010330f: 01 d0 add %edx,%eax 80103311: 83 c0 01 add $0x1,%eax 80103314: 89 c2 mov %eax,%edx 80103316: 8b 45 08 mov 0x8(%ebp),%eax 80103319: 8b 40 04 mov 0x4(%eax),%eax 8010331c: 89 54 24 04 mov %edx,0x4(%esp) 80103320: 89 04 24 mov %eax,(%esp) 80103323: e8 7e ce ff ff call 801001a6 <bread> 80103328: 89 45 f0 mov %eax,-0x10(%ebp) memmove(lbuf->data, b->data, BSIZE); 8010332b: 8b 45 08 mov 0x8(%ebp),%eax 8010332e: 8d 50 18 lea 0x18(%eax),%edx 80103331: 8b 45 f0 mov -0x10(%ebp),%eax 80103334: 83 c0 18 add $0x18,%eax 80103337: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 8010333e: 00 8010333f: 89 54 24 04 mov %edx,0x4(%esp) 80103343: 89 04 24 mov %eax,(%esp) 80103346: e8 c2 1e 00 00 call 8010520d <memmove> bwrite(lbuf); 8010334b: 8b 45 f0 mov -0x10(%ebp),%eax 8010334e: 89 04 24 mov %eax,(%esp) 80103351: e8 87 ce ff ff call 801001dd <bwrite> brelse(lbuf); 80103356: 8b 45 f0 mov -0x10(%ebp),%eax 80103359: 89 04 24 mov %eax,(%esp) 8010335c: e8 b6 ce ff ff call 80100217 <brelse> if (i == log.lh.n) 80103361: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 80103366: 3b 45 f4 cmp -0xc(%ebp),%eax 80103369: 75 0d jne 80103378 <log_write+0xfa> log.lh.n++; 8010336b: a1 e4 f8 10 80 mov 0x8010f8e4,%eax 80103370: 83 c0 01 add $0x1,%eax 80103373: a3 e4 f8 10 80 mov %eax,0x8010f8e4 b->flags |= B_DIRTY; // XXX prevent eviction 80103378: 8b 45 08 mov 0x8(%ebp),%eax 8010337b: 8b 00 mov (%eax),%eax 8010337d: 83 c8 04 or $0x4,%eax 80103380: 89 c2 mov %eax,%edx 80103382: 8b 45 08 mov 0x8(%ebp),%eax 80103385: 89 10 mov %edx,(%eax) } 80103387: c9 leave 80103388: c3 ret 80103389 <v2p>: 80103389: 55 push %ebp 8010338a: 89 e5 mov %esp,%ebp 8010338c: 8b 45 08 mov 0x8(%ebp),%eax 8010338f: 05 00 00 00 80 add $0x80000000,%eax 80103394: 5d pop %ebp 80103395: c3 ret 80103396 <p2v>: static inline void *p2v(uint a) { return (void *) ((a) + KERNBASE); } 80103396: 55 push %ebp 80103397: 89 e5 mov %esp,%ebp 80103399: 8b 45 08 mov 0x8(%ebp),%eax 8010339c: 05 00 00 00 80 add $0x80000000,%eax 801033a1: 5d pop %ebp 801033a2: c3 ret 801033a3 <xchg>: asm volatile("sti"); } static inline uint xchg(volatile uint *addr, uint newval) { 801033a3: 55 push %ebp 801033a4: 89 e5 mov %esp,%ebp 801033a6: 83 ec 10 sub $0x10,%esp uint result; // The + in "+m" denotes a read-modify-write operand. asm volatile("lock; xchgl %0, %1" : 801033a9: 8b 55 08 mov 0x8(%ebp),%edx 801033ac: 8b 45 0c mov 0xc(%ebp),%eax 801033af: 8b 4d 08 mov 0x8(%ebp),%ecx 801033b2: f0 87 02 lock xchg %eax,(%edx) 801033b5: 89 45 fc mov %eax,-0x4(%ebp) "+m" (*addr), "=a" (result) : "1" (newval) : "cc"); return result; 801033b8: 8b 45 fc mov -0x4(%ebp),%eax } 801033bb: c9 leave 801033bc: c3 ret 801033bd <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) { 801033bd: 55 push %ebp 801033be: 89 e5 mov %esp,%ebp 801033c0: 83 e4 f0 and $0xfffffff0,%esp 801033c3: 83 ec 10 sub $0x10,%esp kinit1(end, P2V(4*1024*1024)); // phys page allocator 801033c6: c7 44 24 04 00 00 40 movl $0x80400000,0x4(%esp) 801033cd: 80 801033ce: c7 04 24 1c 29 11 80 movl $0x8011291c,(%esp) 801033d5: e8 d2 f5 ff ff call 801029ac <kinit1> kvmalloc(); // kernel page table 801033da: e8 19 4a 00 00 call 80107df8 <kvmalloc> mpinit(); // collect info about this machine 801033df: e8 46 04 00 00 call 8010382a <mpinit> lapicinit(); 801033e4: e8 11 f9 ff ff call 80102cfa <lapicinit> seginit(); // set up segments 801033e9: e8 9d 43 00 00 call 8010778b <seginit> cprintf("\ncpu%d: starting xv6\n\n", cpu->id); 801033ee: 65 a1 00 00 00 00 mov %gs:0x0,%eax 801033f4: 0f b6 00 movzbl (%eax),%eax 801033f7: 0f b6 c0 movzbl %al,%eax 801033fa: 89 44 24 04 mov %eax,0x4(%esp) 801033fe: c7 04 24 e1 87 10 80 movl $0x801087e1,(%esp) 80103405: e8 96 cf ff ff call 801003a0 <cprintf> picinit(); // interrupt controller 8010340a: e8 79 06 00 00 call 80103a88 <picinit> ioapicinit(); // another interrupt controller 8010340f: e8 8e f4 ff ff call 801028a2 <ioapicinit> consoleinit(); // I/O devices & their interrupts 80103414: e8 68 d6 ff ff call 80100a81 <consoleinit> uartinit(); // serial port 80103419: e8 bc 36 00 00 call 80106ada <uartinit> pinit(); // process table 8010341e: e8 f1 0b 00 00 call 80104014 <pinit> tvinit(); // trap vectors 80103423: e8 64 32 00 00 call 8010668c <tvinit> binit(); // buffer cache 80103428: e8 07 cc ff ff call 80100034 <binit> fileinit(); // file table 8010342d: e8 d0 da ff ff call 80100f02 <fileinit> iinit(); // inode cache 80103432: e8 65 e1 ff ff call 8010159c <iinit> ideinit(); // disk 80103437: e8 cf f0 ff ff call 8010250b <ideinit> if(!ismp) 8010343c: a1 24 f9 10 80 mov 0x8010f924,%eax 80103441: 85 c0 test %eax,%eax 80103443: 75 05 jne 8010344a <main+0x8d> timerinit(); // uniprocessor timer 80103445: e8 8d 31 00 00 call 801065d7 <timerinit> startothers(); // start other processors 8010344a: e8 7f 00 00 00 call 801034ce <startothers> kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers() 8010344f: c7 44 24 04 00 00 00 movl $0x8e000000,0x4(%esp) 80103456: 8e 80103457: c7 04 24 00 00 40 80 movl $0x80400000,(%esp) 8010345e: e8 81 f5 ff ff call 801029e4 <kinit2> userinit(); // first user process 80103463: e8 ca 0c 00 00 call 80104132 <userinit> // Finish setting up this processor in mpmain. mpmain(); 80103468: e8 1a 00 00 00 call 80103487 <mpmain> 8010346d <mpenter>: } // Other CPUs jump here from entryother.S. static void mpenter(void) { 8010346d: 55 push %ebp 8010346e: 89 e5 mov %esp,%ebp 80103470: 83 ec 08 sub $0x8,%esp switchkvm(); 80103473: e8 97 49 00 00 call 80107e0f <switchkvm> seginit(); 80103478: e8 0e 43 00 00 call 8010778b <seginit> lapicinit(); 8010347d: e8 78 f8 ff ff call 80102cfa <lapicinit> mpmain(); 80103482: e8 00 00 00 00 call 80103487 <mpmain> 80103487 <mpmain>: } // Common CPU setup code. static void mpmain(void) { 80103487: 55 push %ebp 80103488: 89 e5 mov %esp,%ebp 8010348a: 83 ec 18 sub $0x18,%esp cprintf("cpu%d: starting\n", cpu->id); 8010348d: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80103493: 0f b6 00 movzbl (%eax),%eax 80103496: 0f b6 c0 movzbl %al,%eax 80103499: 89 44 24 04 mov %eax,0x4(%esp) 8010349d: c7 04 24 f8 87 10 80 movl $0x801087f8,(%esp) 801034a4: e8 f7 ce ff ff call 801003a0 <cprintf> idtinit(); // load idt register 801034a9: e8 52 33 00 00 call 80106800 <idtinit> xchg(&cpu->started, 1); // tell startothers() we're up 801034ae: 65 a1 00 00 00 00 mov %gs:0x0,%eax 801034b4: 05 a8 00 00 00 add $0xa8,%eax 801034b9: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 801034c0: 00 801034c1: 89 04 24 mov %eax,(%esp) 801034c4: e8 da fe ff ff call 801033a3 <xchg> scheduler(); // start running processes 801034c9: e8 c5 14 00 00 call 80104993 <scheduler> 801034ce <startothers>: pde_t entrypgdir[]; // For entry.S // Start the non-boot (AP) processors. static void startothers(void) { 801034ce: 55 push %ebp 801034cf: 89 e5 mov %esp,%ebp 801034d1: 53 push %ebx 801034d2: 83 ec 24 sub $0x24,%esp char *stack; // Write entry code to unused memory at 0x7000. // The linker has placed the image of entryother.S in // _binary_entryother_start. code = p2v(0x7000); 801034d5: c7 04 24 00 70 00 00 movl $0x7000,(%esp) 801034dc: e8 b5 fe ff ff call 80103396 <p2v> 801034e1: 89 45 f0 mov %eax,-0x10(%ebp) memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); 801034e4: b8 8a 00 00 00 mov $0x8a,%eax 801034e9: 89 44 24 08 mov %eax,0x8(%esp) 801034ed: c7 44 24 04 2c b5 10 movl $0x8010b52c,0x4(%esp) 801034f4: 80 801034f5: 8b 45 f0 mov -0x10(%ebp),%eax 801034f8: 89 04 24 mov %eax,(%esp) 801034fb: e8 0d 1d 00 00 call 8010520d <memmove> for(c = cpus; c < cpus+ncpu; c++){ 80103500: c7 45 f4 40 f9 10 80 movl $0x8010f940,-0xc(%ebp) 80103507: e9 85 00 00 00 jmp 80103591 <startothers+0xc3> if(c == cpus+cpunum()) // We've started already. 8010350c: e8 42 f9 ff ff call 80102e53 <cpunum> 80103511: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax 80103517: 05 40 f9 10 80 add $0x8010f940,%eax 8010351c: 3b 45 f4 cmp -0xc(%ebp),%eax 8010351f: 75 02 jne 80103523 <startothers+0x55> continue; 80103521: eb 67 jmp 8010358a <startothers+0xbc> // Tell entryother.S what stack to use, where to enter, and what // pgdir to use. We cannot use kpgdir yet, because the AP processor // is running in low memory, so we use entrypgdir for the APs too. stack = kalloc(); 80103523: e8 b2 f5 ff ff call 80102ada <kalloc> 80103528: 89 45 ec mov %eax,-0x14(%ebp) *(void**)(code-4) = stack + KSTACKSIZE; 8010352b: 8b 45 f0 mov -0x10(%ebp),%eax 8010352e: 83 e8 04 sub $0x4,%eax 80103531: 8b 55 ec mov -0x14(%ebp),%edx 80103534: 81 c2 00 10 00 00 add $0x1000,%edx 8010353a: 89 10 mov %edx,(%eax) *(void**)(code-8) = mpenter; 8010353c: 8b 45 f0 mov -0x10(%ebp),%eax 8010353f: 83 e8 08 sub $0x8,%eax 80103542: c7 00 6d 34 10 80 movl $0x8010346d,(%eax) *(int**)(code-12) = (void *) v2p(entrypgdir); 80103548: 8b 45 f0 mov -0x10(%ebp),%eax 8010354b: 8d 58 f4 lea -0xc(%eax),%ebx 8010354e: c7 04 24 00 a0 10 80 movl $0x8010a000,(%esp) 80103555: e8 2f fe ff ff call 80103389 <v2p> 8010355a: 89 03 mov %eax,(%ebx) lapicstartap(c->id, v2p(code)); 8010355c: 8b 45 f0 mov -0x10(%ebp),%eax 8010355f: 89 04 24 mov %eax,(%esp) 80103562: e8 22 fe ff ff call 80103389 <v2p> 80103567: 8b 55 f4 mov -0xc(%ebp),%edx 8010356a: 0f b6 12 movzbl (%edx),%edx 8010356d: 0f b6 d2 movzbl %dl,%edx 80103570: 89 44 24 04 mov %eax,0x4(%esp) 80103574: 89 14 24 mov %edx,(%esp) 80103577: e8 59 f9 ff ff call 80102ed5 <lapicstartap> // wait for cpu to finish mpmain() while(c->started == 0) 8010357c: 90 nop 8010357d: 8b 45 f4 mov -0xc(%ebp),%eax 80103580: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax 80103586: 85 c0 test %eax,%eax 80103588: 74 f3 je 8010357d <startothers+0xaf> // The linker has placed the image of entryother.S in // _binary_entryother_start. code = p2v(0x7000); memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); for(c = cpus; c < cpus+ncpu; c++){ 8010358a: 81 45 f4 bc 00 00 00 addl $0xbc,-0xc(%ebp) 80103591: a1 20 ff 10 80 mov 0x8010ff20,%eax 80103596: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax 8010359c: 05 40 f9 10 80 add $0x8010f940,%eax 801035a1: 3b 45 f4 cmp -0xc(%ebp),%eax 801035a4: 0f 87 62 ff ff ff ja 8010350c <startothers+0x3e> // wait for cpu to finish mpmain() while(c->started == 0) ; } } 801035aa: 83 c4 24 add $0x24,%esp 801035ad: 5b pop %ebx 801035ae: 5d pop %ebp 801035af: c3 ret 801035b0 <p2v>: 801035b0: 55 push %ebp 801035b1: 89 e5 mov %esp,%ebp 801035b3: 8b 45 08 mov 0x8(%ebp),%eax 801035b6: 05 00 00 00 80 add $0x80000000,%eax 801035bb: 5d pop %ebp 801035bc: c3 ret 801035bd <inb>: // Routines to let C code use special x86 instructions. static inline uchar inb(ushort port) { 801035bd: 55 push %ebp 801035be: 89 e5 mov %esp,%ebp 801035c0: 83 ec 14 sub $0x14,%esp 801035c3: 8b 45 08 mov 0x8(%ebp),%eax 801035c6: 66 89 45 ec mov %ax,-0x14(%ebp) uchar data; asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801035ca: 0f b7 45 ec movzwl -0x14(%ebp),%eax 801035ce: 89 c2 mov %eax,%edx 801035d0: ec in (%dx),%al 801035d1: 88 45 ff mov %al,-0x1(%ebp) return data; 801035d4: 0f b6 45 ff movzbl -0x1(%ebp),%eax } 801035d8: c9 leave 801035d9: c3 ret 801035da <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 801035da: 55 push %ebp 801035db: 89 e5 mov %esp,%ebp 801035dd: 83 ec 08 sub $0x8,%esp 801035e0: 8b 55 08 mov 0x8(%ebp),%edx 801035e3: 8b 45 0c mov 0xc(%ebp),%eax 801035e6: 66 89 55 fc mov %dx,-0x4(%ebp) 801035ea: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801035ed: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 801035f1: 0f b7 55 fc movzwl -0x4(%ebp),%edx 801035f5: ee out %al,(%dx) } 801035f6: c9 leave 801035f7: c3 ret 801035f8 <mpbcpu>: int ncpu; uchar ioapicid; int mpbcpu(void) { 801035f8: 55 push %ebp 801035f9: 89 e5 mov %esp,%ebp return bcpu-cpus; 801035fb: a1 64 b6 10 80 mov 0x8010b664,%eax 80103600: 89 c2 mov %eax,%edx 80103602: b8 40 f9 10 80 mov $0x8010f940,%eax 80103607: 29 c2 sub %eax,%edx 80103609: 89 d0 mov %edx,%eax 8010360b: c1 f8 02 sar $0x2,%eax 8010360e: 69 c0 cf 46 7d 67 imul $0x677d46cf,%eax,%eax } 80103614: 5d pop %ebp 80103615: c3 ret 80103616 <sum>: static uchar sum(uchar *addr, int len) { 80103616: 55 push %ebp 80103617: 89 e5 mov %esp,%ebp 80103619: 83 ec 10 sub $0x10,%esp int i, sum; sum = 0; 8010361c: c7 45 f8 00 00 00 00 movl $0x0,-0x8(%ebp) for(i=0; i<len; i++) 80103623: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 8010362a: eb 15 jmp 80103641 <sum+0x2b> sum += addr[i]; 8010362c: 8b 55 fc mov -0x4(%ebp),%edx 8010362f: 8b 45 08 mov 0x8(%ebp),%eax 80103632: 01 d0 add %edx,%eax 80103634: 0f b6 00 movzbl (%eax),%eax 80103637: 0f b6 c0 movzbl %al,%eax 8010363a: 01 45 f8 add %eax,-0x8(%ebp) sum(uchar *addr, int len) { int i, sum; sum = 0; for(i=0; i<len; i++) 8010363d: 83 45 fc 01 addl $0x1,-0x4(%ebp) 80103641: 8b 45 fc mov -0x4(%ebp),%eax 80103644: 3b 45 0c cmp 0xc(%ebp),%eax 80103647: 7c e3 jl 8010362c <sum+0x16> sum += addr[i]; return sum; 80103649: 8b 45 f8 mov -0x8(%ebp),%eax } 8010364c: c9 leave 8010364d: c3 ret 8010364e <mpsearch1>: // Look for an MP structure in the len bytes at addr. static struct mp* mpsearch1(uint a, int len) { 8010364e: 55 push %ebp 8010364f: 89 e5 mov %esp,%ebp 80103651: 83 ec 28 sub $0x28,%esp uchar *e, *p, *addr; addr = p2v(a); 80103654: 8b 45 08 mov 0x8(%ebp),%eax 80103657: 89 04 24 mov %eax,(%esp) 8010365a: e8 51 ff ff ff call 801035b0 <p2v> 8010365f: 89 45 f0 mov %eax,-0x10(%ebp) e = addr+len; 80103662: 8b 55 0c mov 0xc(%ebp),%edx 80103665: 8b 45 f0 mov -0x10(%ebp),%eax 80103668: 01 d0 add %edx,%eax 8010366a: 89 45 ec mov %eax,-0x14(%ebp) for(p = addr; p < e; p += sizeof(struct mp)) 8010366d: 8b 45 f0 mov -0x10(%ebp),%eax 80103670: 89 45 f4 mov %eax,-0xc(%ebp) 80103673: eb 3f jmp 801036b4 <mpsearch1+0x66> if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) 80103675: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 8010367c: 00 8010367d: c7 44 24 04 0c 88 10 movl $0x8010880c,0x4(%esp) 80103684: 80 80103685: 8b 45 f4 mov -0xc(%ebp),%eax 80103688: 89 04 24 mov %eax,(%esp) 8010368b: e8 25 1b 00 00 call 801051b5 <memcmp> 80103690: 85 c0 test %eax,%eax 80103692: 75 1c jne 801036b0 <mpsearch1+0x62> 80103694: c7 44 24 04 10 00 00 movl $0x10,0x4(%esp) 8010369b: 00 8010369c: 8b 45 f4 mov -0xc(%ebp),%eax 8010369f: 89 04 24 mov %eax,(%esp) 801036a2: e8 6f ff ff ff call 80103616 <sum> 801036a7: 84 c0 test %al,%al 801036a9: 75 05 jne 801036b0 <mpsearch1+0x62> return (struct mp*)p; 801036ab: 8b 45 f4 mov -0xc(%ebp),%eax 801036ae: eb 11 jmp 801036c1 <mpsearch1+0x73> { uchar *e, *p, *addr; addr = p2v(a); e = addr+len; for(p = addr; p < e; p += sizeof(struct mp)) 801036b0: 83 45 f4 10 addl $0x10,-0xc(%ebp) 801036b4: 8b 45 f4 mov -0xc(%ebp),%eax 801036b7: 3b 45 ec cmp -0x14(%ebp),%eax 801036ba: 72 b9 jb 80103675 <mpsearch1+0x27> if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) return (struct mp*)p; return 0; 801036bc: b8 00 00 00 00 mov $0x0,%eax } 801036c1: c9 leave 801036c2: c3 ret 801036c3 <mpsearch>: // 1) in the first KB of the EBDA; // 2) in the last KB of system base memory; // 3) in the BIOS ROM between 0xE0000 and 0xFFFFF. static struct mp* mpsearch(void) { 801036c3: 55 push %ebp 801036c4: 89 e5 mov %esp,%ebp 801036c6: 83 ec 28 sub $0x28,%esp uchar *bda; uint p; struct mp *mp; bda = (uchar *) P2V(0x400); 801036c9: c7 45 f4 00 04 00 80 movl $0x80000400,-0xc(%ebp) if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){ 801036d0: 8b 45 f4 mov -0xc(%ebp),%eax 801036d3: 83 c0 0f add $0xf,%eax 801036d6: 0f b6 00 movzbl (%eax),%eax 801036d9: 0f b6 c0 movzbl %al,%eax 801036dc: c1 e0 08 shl $0x8,%eax 801036df: 89 c2 mov %eax,%edx 801036e1: 8b 45 f4 mov -0xc(%ebp),%eax 801036e4: 83 c0 0e add $0xe,%eax 801036e7: 0f b6 00 movzbl (%eax),%eax 801036ea: 0f b6 c0 movzbl %al,%eax 801036ed: 09 d0 or %edx,%eax 801036ef: c1 e0 04 shl $0x4,%eax 801036f2: 89 45 f0 mov %eax,-0x10(%ebp) 801036f5: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 801036f9: 74 21 je 8010371c <mpsearch+0x59> if((mp = mpsearch1(p, 1024))) 801036fb: c7 44 24 04 00 04 00 movl $0x400,0x4(%esp) 80103702: 00 80103703: 8b 45 f0 mov -0x10(%ebp),%eax 80103706: 89 04 24 mov %eax,(%esp) 80103709: e8 40 ff ff ff call 8010364e <mpsearch1> 8010370e: 89 45 ec mov %eax,-0x14(%ebp) 80103711: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 80103715: 74 50 je 80103767 <mpsearch+0xa4> return mp; 80103717: 8b 45 ec mov -0x14(%ebp),%eax 8010371a: eb 5f jmp 8010377b <mpsearch+0xb8> } else { p = ((bda[0x14]<<8)|bda[0x13])*1024; 8010371c: 8b 45 f4 mov -0xc(%ebp),%eax 8010371f: 83 c0 14 add $0x14,%eax 80103722: 0f b6 00 movzbl (%eax),%eax 80103725: 0f b6 c0 movzbl %al,%eax 80103728: c1 e0 08 shl $0x8,%eax 8010372b: 89 c2 mov %eax,%edx 8010372d: 8b 45 f4 mov -0xc(%ebp),%eax 80103730: 83 c0 13 add $0x13,%eax 80103733: 0f b6 00 movzbl (%eax),%eax 80103736: 0f b6 c0 movzbl %al,%eax 80103739: 09 d0 or %edx,%eax 8010373b: c1 e0 0a shl $0xa,%eax 8010373e: 89 45 f0 mov %eax,-0x10(%ebp) if((mp = mpsearch1(p-1024, 1024))) 80103741: 8b 45 f0 mov -0x10(%ebp),%eax 80103744: 2d 00 04 00 00 sub $0x400,%eax 80103749: c7 44 24 04 00 04 00 movl $0x400,0x4(%esp) 80103750: 00 80103751: 89 04 24 mov %eax,(%esp) 80103754: e8 f5 fe ff ff call 8010364e <mpsearch1> 80103759: 89 45 ec mov %eax,-0x14(%ebp) 8010375c: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 80103760: 74 05 je 80103767 <mpsearch+0xa4> return mp; 80103762: 8b 45 ec mov -0x14(%ebp),%eax 80103765: eb 14 jmp 8010377b <mpsearch+0xb8> } return mpsearch1(0xF0000, 0x10000); 80103767: c7 44 24 04 00 00 01 movl $0x10000,0x4(%esp) 8010376e: 00 8010376f: c7 04 24 00 00 0f 00 movl $0xf0000,(%esp) 80103776: e8 d3 fe ff ff call 8010364e <mpsearch1> } 8010377b: c9 leave 8010377c: c3 ret 8010377d <mpconfig>: // Check for correct signature, calculate the checksum and, // if correct, check the version. // To do: check extended table checksum. static struct mpconf* mpconfig(struct mp **pmp) { 8010377d: 55 push %ebp 8010377e: 89 e5 mov %esp,%ebp 80103780: 83 ec 28 sub $0x28,%esp struct mpconf *conf; struct mp *mp; if((mp = mpsearch()) == 0 || mp->physaddr == 0) 80103783: e8 3b ff ff ff call 801036c3 <mpsearch> 80103788: 89 45 f4 mov %eax,-0xc(%ebp) 8010378b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 8010378f: 74 0a je 8010379b <mpconfig+0x1e> 80103791: 8b 45 f4 mov -0xc(%ebp),%eax 80103794: 8b 40 04 mov 0x4(%eax),%eax 80103797: 85 c0 test %eax,%eax 80103799: 75 0a jne 801037a5 <mpconfig+0x28> return 0; 8010379b: b8 00 00 00 00 mov $0x0,%eax 801037a0: e9 83 00 00 00 jmp 80103828 <mpconfig+0xab> conf = (struct mpconf*) p2v((uint) mp->physaddr); 801037a5: 8b 45 f4 mov -0xc(%ebp),%eax 801037a8: 8b 40 04 mov 0x4(%eax),%eax 801037ab: 89 04 24 mov %eax,(%esp) 801037ae: e8 fd fd ff ff call 801035b0 <p2v> 801037b3: 89 45 f0 mov %eax,-0x10(%ebp) if(memcmp(conf, "PCMP", 4) != 0) 801037b6: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 801037bd: 00 801037be: c7 44 24 04 11 88 10 movl $0x80108811,0x4(%esp) 801037c5: 80 801037c6: 8b 45 f0 mov -0x10(%ebp),%eax 801037c9: 89 04 24 mov %eax,(%esp) 801037cc: e8 e4 19 00 00 call 801051b5 <memcmp> 801037d1: 85 c0 test %eax,%eax 801037d3: 74 07 je 801037dc <mpconfig+0x5f> return 0; 801037d5: b8 00 00 00 00 mov $0x0,%eax 801037da: eb 4c jmp 80103828 <mpconfig+0xab> if(conf->version != 1 && conf->version != 4) 801037dc: 8b 45 f0 mov -0x10(%ebp),%eax 801037df: 0f b6 40 06 movzbl 0x6(%eax),%eax 801037e3: 3c 01 cmp $0x1,%al 801037e5: 74 12 je 801037f9 <mpconfig+0x7c> 801037e7: 8b 45 f0 mov -0x10(%ebp),%eax 801037ea: 0f b6 40 06 movzbl 0x6(%eax),%eax 801037ee: 3c 04 cmp $0x4,%al 801037f0: 74 07 je 801037f9 <mpconfig+0x7c> return 0; 801037f2: b8 00 00 00 00 mov $0x0,%eax 801037f7: eb 2f jmp 80103828 <mpconfig+0xab> if(sum((uchar*)conf, conf->length) != 0) 801037f9: 8b 45 f0 mov -0x10(%ebp),%eax 801037fc: 0f b7 40 04 movzwl 0x4(%eax),%eax 80103800: 0f b7 c0 movzwl %ax,%eax 80103803: 89 44 24 04 mov %eax,0x4(%esp) 80103807: 8b 45 f0 mov -0x10(%ebp),%eax 8010380a: 89 04 24 mov %eax,(%esp) 8010380d: e8 04 fe ff ff call 80103616 <sum> 80103812: 84 c0 test %al,%al 80103814: 74 07 je 8010381d <mpconfig+0xa0> return 0; 80103816: b8 00 00 00 00 mov $0x0,%eax 8010381b: eb 0b jmp 80103828 <mpconfig+0xab> *pmp = mp; 8010381d: 8b 45 08 mov 0x8(%ebp),%eax 80103820: 8b 55 f4 mov -0xc(%ebp),%edx 80103823: 89 10 mov %edx,(%eax) return conf; 80103825: 8b 45 f0 mov -0x10(%ebp),%eax } 80103828: c9 leave 80103829: c3 ret 8010382a <mpinit>: void mpinit(void) { 8010382a: 55 push %ebp 8010382b: 89 e5 mov %esp,%ebp 8010382d: 83 ec 38 sub $0x38,%esp struct mp *mp; struct mpconf *conf; struct mpproc *proc; struct mpioapic *ioapic; bcpu = &cpus[0]; 80103830: c7 05 64 b6 10 80 40 movl $0x8010f940,0x8010b664 80103837: f9 10 80 if((conf = mpconfig(&mp)) == 0) 8010383a: 8d 45 e0 lea -0x20(%ebp),%eax 8010383d: 89 04 24 mov %eax,(%esp) 80103840: e8 38 ff ff ff call 8010377d <mpconfig> 80103845: 89 45 f0 mov %eax,-0x10(%ebp) 80103848: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 8010384c: 75 05 jne 80103853 <mpinit+0x29> return; 8010384e: e9 9c 01 00 00 jmp 801039ef <mpinit+0x1c5> ismp = 1; 80103853: c7 05 24 f9 10 80 01 movl $0x1,0x8010f924 8010385a: 00 00 00 lapic = (uint*)conf->lapicaddr; 8010385d: 8b 45 f0 mov -0x10(%ebp),%eax 80103860: 8b 40 24 mov 0x24(%eax),%eax 80103863: a3 9c f8 10 80 mov %eax,0x8010f89c for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 80103868: 8b 45 f0 mov -0x10(%ebp),%eax 8010386b: 83 c0 2c add $0x2c,%eax 8010386e: 89 45 f4 mov %eax,-0xc(%ebp) 80103871: 8b 45 f0 mov -0x10(%ebp),%eax 80103874: 0f b7 40 04 movzwl 0x4(%eax),%eax 80103878: 0f b7 d0 movzwl %ax,%edx 8010387b: 8b 45 f0 mov -0x10(%ebp),%eax 8010387e: 01 d0 add %edx,%eax 80103880: 89 45 ec mov %eax,-0x14(%ebp) 80103883: e9 f4 00 00 00 jmp 8010397c <mpinit+0x152> switch(*p){ 80103888: 8b 45 f4 mov -0xc(%ebp),%eax 8010388b: 0f b6 00 movzbl (%eax),%eax 8010388e: 0f b6 c0 movzbl %al,%eax 80103891: 83 f8 04 cmp $0x4,%eax 80103894: 0f 87 bf 00 00 00 ja 80103959 <mpinit+0x12f> 8010389a: 8b 04 85 54 88 10 80 mov -0x7fef77ac(,%eax,4),%eax 801038a1: ff e0 jmp *%eax case MPPROC: proc = (struct mpproc*)p; 801038a3: 8b 45 f4 mov -0xc(%ebp),%eax 801038a6: 89 45 e8 mov %eax,-0x18(%ebp) if(ncpu != proc->apicid){ 801038a9: 8b 45 e8 mov -0x18(%ebp),%eax 801038ac: 0f b6 40 01 movzbl 0x1(%eax),%eax 801038b0: 0f b6 d0 movzbl %al,%edx 801038b3: a1 20 ff 10 80 mov 0x8010ff20,%eax 801038b8: 39 c2 cmp %eax,%edx 801038ba: 74 2d je 801038e9 <mpinit+0xbf> cprintf("mpinit: ncpu=%d apicid=%d\n", ncpu, proc->apicid); 801038bc: 8b 45 e8 mov -0x18(%ebp),%eax 801038bf: 0f b6 40 01 movzbl 0x1(%eax),%eax 801038c3: 0f b6 d0 movzbl %al,%edx 801038c6: a1 20 ff 10 80 mov 0x8010ff20,%eax 801038cb: 89 54 24 08 mov %edx,0x8(%esp) 801038cf: 89 44 24 04 mov %eax,0x4(%esp) 801038d3: c7 04 24 16 88 10 80 movl $0x80108816,(%esp) 801038da: e8 c1 ca ff ff call 801003a0 <cprintf> ismp = 0; 801038df: c7 05 24 f9 10 80 00 movl $0x0,0x8010f924 801038e6: 00 00 00 } if(proc->flags & MPBOOT) 801038e9: 8b 45 e8 mov -0x18(%ebp),%eax 801038ec: 0f b6 40 03 movzbl 0x3(%eax),%eax 801038f0: 0f b6 c0 movzbl %al,%eax 801038f3: 83 e0 02 and $0x2,%eax 801038f6: 85 c0 test %eax,%eax 801038f8: 74 15 je 8010390f <mpinit+0xe5> bcpu = &cpus[ncpu]; 801038fa: a1 20 ff 10 80 mov 0x8010ff20,%eax 801038ff: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax 80103905: 05 40 f9 10 80 add $0x8010f940,%eax 8010390a: a3 64 b6 10 80 mov %eax,0x8010b664 cpus[ncpu].id = ncpu; 8010390f: 8b 15 20 ff 10 80 mov 0x8010ff20,%edx 80103915: a1 20 ff 10 80 mov 0x8010ff20,%eax 8010391a: 69 d2 bc 00 00 00 imul $0xbc,%edx,%edx 80103920: 81 c2 40 f9 10 80 add $0x8010f940,%edx 80103926: 88 02 mov %al,(%edx) ncpu++; 80103928: a1 20 ff 10 80 mov 0x8010ff20,%eax 8010392d: 83 c0 01 add $0x1,%eax 80103930: a3 20 ff 10 80 mov %eax,0x8010ff20 p += sizeof(struct mpproc); 80103935: 83 45 f4 14 addl $0x14,-0xc(%ebp) continue; 80103939: eb 41 jmp 8010397c <mpinit+0x152> case MPIOAPIC: ioapic = (struct mpioapic*)p; 8010393b: 8b 45 f4 mov -0xc(%ebp),%eax 8010393e: 89 45 e4 mov %eax,-0x1c(%ebp) ioapicid = ioapic->apicno; 80103941: 8b 45 e4 mov -0x1c(%ebp),%eax 80103944: 0f b6 40 01 movzbl 0x1(%eax),%eax 80103948: a2 20 f9 10 80 mov %al,0x8010f920 p += sizeof(struct mpioapic); 8010394d: 83 45 f4 08 addl $0x8,-0xc(%ebp) continue; 80103951: eb 29 jmp 8010397c <mpinit+0x152> case MPBUS: case MPIOINTR: case MPLINTR: p += 8; 80103953: 83 45 f4 08 addl $0x8,-0xc(%ebp) continue; 80103957: eb 23 jmp 8010397c <mpinit+0x152> default: cprintf("mpinit: unknown config type %x\n", *p); 80103959: 8b 45 f4 mov -0xc(%ebp),%eax 8010395c: 0f b6 00 movzbl (%eax),%eax 8010395f: 0f b6 c0 movzbl %al,%eax 80103962: 89 44 24 04 mov %eax,0x4(%esp) 80103966: c7 04 24 34 88 10 80 movl $0x80108834,(%esp) 8010396d: e8 2e ca ff ff call 801003a0 <cprintf> ismp = 0; 80103972: c7 05 24 f9 10 80 00 movl $0x0,0x8010f924 80103979: 00 00 00 bcpu = &cpus[0]; if((conf = mpconfig(&mp)) == 0) return; ismp = 1; lapic = (uint*)conf->lapicaddr; for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 8010397c: 8b 45 f4 mov -0xc(%ebp),%eax 8010397f: 3b 45 ec cmp -0x14(%ebp),%eax 80103982: 0f 82 00 ff ff ff jb 80103888 <mpinit+0x5e> default: cprintf("mpinit: unknown config type %x\n", *p); ismp = 0; } } if(!ismp){ 80103988: a1 24 f9 10 80 mov 0x8010f924,%eax 8010398d: 85 c0 test %eax,%eax 8010398f: 75 1d jne 801039ae <mpinit+0x184> // Didn't like what we found; fall back to no MP. ncpu = 1; 80103991: c7 05 20 ff 10 80 01 movl $0x1,0x8010ff20 80103998: 00 00 00 lapic = 0; 8010399b: c7 05 9c f8 10 80 00 movl $0x0,0x8010f89c 801039a2: 00 00 00 ioapicid = 0; 801039a5: c6 05 20 f9 10 80 00 movb $0x0,0x8010f920 return; 801039ac: eb 41 jmp 801039ef <mpinit+0x1c5> } if(mp->imcrp){ 801039ae: 8b 45 e0 mov -0x20(%ebp),%eax 801039b1: 0f b6 40 0c movzbl 0xc(%eax),%eax 801039b5: 84 c0 test %al,%al 801039b7: 74 36 je 801039ef <mpinit+0x1c5> // Bochs doesn't support IMCR, so this doesn't run on Bochs. // But it would on real hardware. outb(0x22, 0x70); // Select IMCR 801039b9: c7 44 24 04 70 00 00 movl $0x70,0x4(%esp) 801039c0: 00 801039c1: c7 04 24 22 00 00 00 movl $0x22,(%esp) 801039c8: e8 0d fc ff ff call 801035da <outb> outb(0x23, inb(0x23) | 1); // Mask external interrupts. 801039cd: c7 04 24 23 00 00 00 movl $0x23,(%esp) 801039d4: e8 e4 fb ff ff call 801035bd <inb> 801039d9: 83 c8 01 or $0x1,%eax 801039dc: 0f b6 c0 movzbl %al,%eax 801039df: 89 44 24 04 mov %eax,0x4(%esp) 801039e3: c7 04 24 23 00 00 00 movl $0x23,(%esp) 801039ea: e8 eb fb ff ff call 801035da <outb> } } 801039ef: c9 leave 801039f0: c3 ret 801039f1 <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 801039f1: 55 push %ebp 801039f2: 89 e5 mov %esp,%ebp 801039f4: 83 ec 08 sub $0x8,%esp 801039f7: 8b 55 08 mov 0x8(%ebp),%edx 801039fa: 8b 45 0c mov 0xc(%ebp),%eax 801039fd: 66 89 55 fc mov %dx,-0x4(%ebp) 80103a01: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80103a04: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 80103a08: 0f b7 55 fc movzwl -0x4(%ebp),%edx 80103a0c: ee out %al,(%dx) } 80103a0d: c9 leave 80103a0e: c3 ret 80103a0f <picsetmask>: // Initial IRQ mask has interrupt 2 enabled (for slave 8259A). static ushort irqmask = 0xFFFF & ~(1<<IRQ_SLAVE); static void picsetmask(ushort mask) { 80103a0f: 55 push %ebp 80103a10: 89 e5 mov %esp,%ebp 80103a12: 83 ec 0c sub $0xc,%esp 80103a15: 8b 45 08 mov 0x8(%ebp),%eax 80103a18: 66 89 45 fc mov %ax,-0x4(%ebp) irqmask = mask; 80103a1c: 0f b7 45 fc movzwl -0x4(%ebp),%eax 80103a20: 66 a3 00 b0 10 80 mov %ax,0x8010b000 outb(IO_PIC1+1, mask); 80103a26: 0f b7 45 fc movzwl -0x4(%ebp),%eax 80103a2a: 0f b6 c0 movzbl %al,%eax 80103a2d: 89 44 24 04 mov %eax,0x4(%esp) 80103a31: c7 04 24 21 00 00 00 movl $0x21,(%esp) 80103a38: e8 b4 ff ff ff call 801039f1 <outb> outb(IO_PIC2+1, mask >> 8); 80103a3d: 0f b7 45 fc movzwl -0x4(%ebp),%eax 80103a41: 66 c1 e8 08 shr $0x8,%ax 80103a45: 0f b6 c0 movzbl %al,%eax 80103a48: 89 44 24 04 mov %eax,0x4(%esp) 80103a4c: c7 04 24 a1 00 00 00 movl $0xa1,(%esp) 80103a53: e8 99 ff ff ff call 801039f1 <outb> } 80103a58: c9 leave 80103a59: c3 ret 80103a5a <picenable>: void picenable(int irq) { 80103a5a: 55 push %ebp 80103a5b: 89 e5 mov %esp,%ebp 80103a5d: 83 ec 04 sub $0x4,%esp picsetmask(irqmask & ~(1<<irq)); 80103a60: 8b 45 08 mov 0x8(%ebp),%eax 80103a63: ba 01 00 00 00 mov $0x1,%edx 80103a68: 89 c1 mov %eax,%ecx 80103a6a: d3 e2 shl %cl,%edx 80103a6c: 89 d0 mov %edx,%eax 80103a6e: f7 d0 not %eax 80103a70: 89 c2 mov %eax,%edx 80103a72: 0f b7 05 00 b0 10 80 movzwl 0x8010b000,%eax 80103a79: 21 d0 and %edx,%eax 80103a7b: 0f b7 c0 movzwl %ax,%eax 80103a7e: 89 04 24 mov %eax,(%esp) 80103a81: e8 89 ff ff ff call 80103a0f <picsetmask> } 80103a86: c9 leave 80103a87: c3 ret 80103a88 <picinit>: // Initialize the 8259A interrupt controllers. void picinit(void) { 80103a88: 55 push %ebp 80103a89: 89 e5 mov %esp,%ebp 80103a8b: 83 ec 08 sub $0x8,%esp // mask all interrupts outb(IO_PIC1+1, 0xFF); 80103a8e: c7 44 24 04 ff 00 00 movl $0xff,0x4(%esp) 80103a95: 00 80103a96: c7 04 24 21 00 00 00 movl $0x21,(%esp) 80103a9d: e8 4f ff ff ff call 801039f1 <outb> outb(IO_PIC2+1, 0xFF); 80103aa2: c7 44 24 04 ff 00 00 movl $0xff,0x4(%esp) 80103aa9: 00 80103aaa: c7 04 24 a1 00 00 00 movl $0xa1,(%esp) 80103ab1: e8 3b ff ff ff call 801039f1 <outb> // ICW1: 0001g0hi // g: 0 = edge triggering, 1 = level triggering // h: 0 = cascaded PICs, 1 = master only // i: 0 = no ICW4, 1 = ICW4 required outb(IO_PIC1, 0x11); 80103ab6: c7 44 24 04 11 00 00 movl $0x11,0x4(%esp) 80103abd: 00 80103abe: c7 04 24 20 00 00 00 movl $0x20,(%esp) 80103ac5: e8 27 ff ff ff call 801039f1 <outb> // ICW2: Vector offset outb(IO_PIC1+1, T_IRQ0); 80103aca: c7 44 24 04 20 00 00 movl $0x20,0x4(%esp) 80103ad1: 00 80103ad2: c7 04 24 21 00 00 00 movl $0x21,(%esp) 80103ad9: e8 13 ff ff ff call 801039f1 <outb> // ICW3: (master PIC) bit mask of IR lines connected to slaves // (slave PIC) 3-bit # of slave's connection to master outb(IO_PIC1+1, 1<<IRQ_SLAVE); 80103ade: c7 44 24 04 04 00 00 movl $0x4,0x4(%esp) 80103ae5: 00 80103ae6: c7 04 24 21 00 00 00 movl $0x21,(%esp) 80103aed: e8 ff fe ff ff call 801039f1 <outb> // m: 0 = slave PIC, 1 = master PIC // (ignored when b is 0, as the master/slave role // can be hardwired). // a: 1 = Automatic EOI mode // p: 0 = MCS-80/85 mode, 1 = intel x86 mode outb(IO_PIC1+1, 0x3); 80103af2: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp) 80103af9: 00 80103afa: c7 04 24 21 00 00 00 movl $0x21,(%esp) 80103b01: e8 eb fe ff ff call 801039f1 <outb> // Set up slave (8259A-2) outb(IO_PIC2, 0x11); // ICW1 80103b06: c7 44 24 04 11 00 00 movl $0x11,0x4(%esp) 80103b0d: 00 80103b0e: c7 04 24 a0 00 00 00 movl $0xa0,(%esp) 80103b15: e8 d7 fe ff ff call 801039f1 <outb> outb(IO_PIC2+1, T_IRQ0 + 8); // ICW2 80103b1a: c7 44 24 04 28 00 00 movl $0x28,0x4(%esp) 80103b21: 00 80103b22: c7 04 24 a1 00 00 00 movl $0xa1,(%esp) 80103b29: e8 c3 fe ff ff call 801039f1 <outb> outb(IO_PIC2+1, IRQ_SLAVE); // ICW3 80103b2e: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp) 80103b35: 00 80103b36: c7 04 24 a1 00 00 00 movl $0xa1,(%esp) 80103b3d: e8 af fe ff ff call 801039f1 <outb> // NB Automatic EOI mode doesn't tend to work on the slave. // Linux source code says it's "to be investigated". outb(IO_PIC2+1, 0x3); // ICW4 80103b42: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp) 80103b49: 00 80103b4a: c7 04 24 a1 00 00 00 movl $0xa1,(%esp) 80103b51: e8 9b fe ff ff call 801039f1 <outb> // OCW3: 0ef01prs // ef: 0x = NOP, 10 = clear specific mask, 11 = set specific mask // p: 0 = no polling, 1 = polling mode // rs: 0x = NOP, 10 = read IRR, 11 = read ISR outb(IO_PIC1, 0x68); // clear specific mask 80103b56: c7 44 24 04 68 00 00 movl $0x68,0x4(%esp) 80103b5d: 00 80103b5e: c7 04 24 20 00 00 00 movl $0x20,(%esp) 80103b65: e8 87 fe ff ff call 801039f1 <outb> outb(IO_PIC1, 0x0a); // read IRR by default 80103b6a: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp) 80103b71: 00 80103b72: c7 04 24 20 00 00 00 movl $0x20,(%esp) 80103b79: e8 73 fe ff ff call 801039f1 <outb> outb(IO_PIC2, 0x68); // OCW3 80103b7e: c7 44 24 04 68 00 00 movl $0x68,0x4(%esp) 80103b85: 00 80103b86: c7 04 24 a0 00 00 00 movl $0xa0,(%esp) 80103b8d: e8 5f fe ff ff call 801039f1 <outb> outb(IO_PIC2, 0x0a); // OCW3 80103b92: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp) 80103b99: 00 80103b9a: c7 04 24 a0 00 00 00 movl $0xa0,(%esp) 80103ba1: e8 4b fe ff ff call 801039f1 <outb> if(irqmask != 0xFFFF) 80103ba6: 0f b7 05 00 b0 10 80 movzwl 0x8010b000,%eax 80103bad: 66 83 f8 ff cmp $0xffff,%ax 80103bb1: 74 12 je 80103bc5 <picinit+0x13d> picsetmask(irqmask); 80103bb3: 0f b7 05 00 b0 10 80 movzwl 0x8010b000,%eax 80103bba: 0f b7 c0 movzwl %ax,%eax 80103bbd: 89 04 24 mov %eax,(%esp) 80103bc0: e8 4a fe ff ff call 80103a0f <picsetmask> } 80103bc5: c9 leave 80103bc6: c3 ret 80103bc7 <pipealloc>: int writeopen; // write fd is still open }; int pipealloc(struct file **f0, struct file **f1) { 80103bc7: 55 push %ebp 80103bc8: 89 e5 mov %esp,%ebp 80103bca: 83 ec 28 sub $0x28,%esp struct pipe *p; p = 0; 80103bcd: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) *f0 = *f1 = 0; 80103bd4: 8b 45 0c mov 0xc(%ebp),%eax 80103bd7: c7 00 00 00 00 00 movl $0x0,(%eax) 80103bdd: 8b 45 0c mov 0xc(%ebp),%eax 80103be0: 8b 10 mov (%eax),%edx 80103be2: 8b 45 08 mov 0x8(%ebp),%eax 80103be5: 89 10 mov %edx,(%eax) if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0) 80103be7: e8 32 d3 ff ff call 80100f1e <filealloc> 80103bec: 8b 55 08 mov 0x8(%ebp),%edx 80103bef: 89 02 mov %eax,(%edx) 80103bf1: 8b 45 08 mov 0x8(%ebp),%eax 80103bf4: 8b 00 mov (%eax),%eax 80103bf6: 85 c0 test %eax,%eax 80103bf8: 0f 84 c8 00 00 00 je 80103cc6 <pipealloc+0xff> 80103bfe: e8 1b d3 ff ff call 80100f1e <filealloc> 80103c03: 8b 55 0c mov 0xc(%ebp),%edx 80103c06: 89 02 mov %eax,(%edx) 80103c08: 8b 45 0c mov 0xc(%ebp),%eax 80103c0b: 8b 00 mov (%eax),%eax 80103c0d: 85 c0 test %eax,%eax 80103c0f: 0f 84 b1 00 00 00 je 80103cc6 <pipealloc+0xff> goto bad; if((p = (struct pipe*)kalloc()) == 0) 80103c15: e8 c0 ee ff ff call 80102ada <kalloc> 80103c1a: 89 45 f4 mov %eax,-0xc(%ebp) 80103c1d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80103c21: 75 05 jne 80103c28 <pipealloc+0x61> goto bad; 80103c23: e9 9e 00 00 00 jmp 80103cc6 <pipealloc+0xff> p->readopen = 1; 80103c28: 8b 45 f4 mov -0xc(%ebp),%eax 80103c2b: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax) 80103c32: 00 00 00 p->writeopen = 1; 80103c35: 8b 45 f4 mov -0xc(%ebp),%eax 80103c38: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax) 80103c3f: 00 00 00 p->nwrite = 0; 80103c42: 8b 45 f4 mov -0xc(%ebp),%eax 80103c45: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax) 80103c4c: 00 00 00 p->nread = 0; 80103c4f: 8b 45 f4 mov -0xc(%ebp),%eax 80103c52: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax) 80103c59: 00 00 00 initlock(&p->lock, "pipe"); 80103c5c: 8b 45 f4 mov -0xc(%ebp),%eax 80103c5f: c7 44 24 04 68 88 10 movl $0x80108868,0x4(%esp) 80103c66: 80 80103c67: 89 04 24 mov %eax,(%esp) 80103c6a: e8 5a 12 00 00 call 80104ec9 <initlock> (*f0)->type = FD_PIPE; 80103c6f: 8b 45 08 mov 0x8(%ebp),%eax 80103c72: 8b 00 mov (%eax),%eax 80103c74: c7 00 01 00 00 00 movl $0x1,(%eax) (*f0)->readable = 1; 80103c7a: 8b 45 08 mov 0x8(%ebp),%eax 80103c7d: 8b 00 mov (%eax),%eax 80103c7f: c6 40 08 01 movb $0x1,0x8(%eax) (*f0)->writable = 0; 80103c83: 8b 45 08 mov 0x8(%ebp),%eax 80103c86: 8b 00 mov (%eax),%eax 80103c88: c6 40 09 00 movb $0x0,0x9(%eax) (*f0)->pipe = p; 80103c8c: 8b 45 08 mov 0x8(%ebp),%eax 80103c8f: 8b 00 mov (%eax),%eax 80103c91: 8b 55 f4 mov -0xc(%ebp),%edx 80103c94: 89 50 0c mov %edx,0xc(%eax) (*f1)->type = FD_PIPE; 80103c97: 8b 45 0c mov 0xc(%ebp),%eax 80103c9a: 8b 00 mov (%eax),%eax 80103c9c: c7 00 01 00 00 00 movl $0x1,(%eax) (*f1)->readable = 0; 80103ca2: 8b 45 0c mov 0xc(%ebp),%eax 80103ca5: 8b 00 mov (%eax),%eax 80103ca7: c6 40 08 00 movb $0x0,0x8(%eax) (*f1)->writable = 1; 80103cab: 8b 45 0c mov 0xc(%ebp),%eax 80103cae: 8b 00 mov (%eax),%eax 80103cb0: c6 40 09 01 movb $0x1,0x9(%eax) (*f1)->pipe = p; 80103cb4: 8b 45 0c mov 0xc(%ebp),%eax 80103cb7: 8b 00 mov (%eax),%eax 80103cb9: 8b 55 f4 mov -0xc(%ebp),%edx 80103cbc: 89 50 0c mov %edx,0xc(%eax) return 0; 80103cbf: b8 00 00 00 00 mov $0x0,%eax 80103cc4: eb 42 jmp 80103d08 <pipealloc+0x141> //PAGEBREAK: 20 bad: if(p) 80103cc6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80103cca: 74 0b je 80103cd7 <pipealloc+0x110> kfree((char*)p); 80103ccc: 8b 45 f4 mov -0xc(%ebp),%eax 80103ccf: 89 04 24 mov %eax,(%esp) 80103cd2: e8 6a ed ff ff call 80102a41 <kfree> if(*f0) 80103cd7: 8b 45 08 mov 0x8(%ebp),%eax 80103cda: 8b 00 mov (%eax),%eax 80103cdc: 85 c0 test %eax,%eax 80103cde: 74 0d je 80103ced <pipealloc+0x126> fileclose(*f0); 80103ce0: 8b 45 08 mov 0x8(%ebp),%eax 80103ce3: 8b 00 mov (%eax),%eax 80103ce5: 89 04 24 mov %eax,(%esp) 80103ce8: e8 d9 d2 ff ff call 80100fc6 <fileclose> if(*f1) 80103ced: 8b 45 0c mov 0xc(%ebp),%eax 80103cf0: 8b 00 mov (%eax),%eax 80103cf2: 85 c0 test %eax,%eax 80103cf4: 74 0d je 80103d03 <pipealloc+0x13c> fileclose(*f1); 80103cf6: 8b 45 0c mov 0xc(%ebp),%eax 80103cf9: 8b 00 mov (%eax),%eax 80103cfb: 89 04 24 mov %eax,(%esp) 80103cfe: e8 c3 d2 ff ff call 80100fc6 <fileclose> return -1; 80103d03: b8 ff ff ff ff mov $0xffffffff,%eax } 80103d08: c9 leave 80103d09: c3 ret 80103d0a <pipeclose>: void pipeclose(struct pipe *p, int writable) { 80103d0a: 55 push %ebp 80103d0b: 89 e5 mov %esp,%ebp 80103d0d: 83 ec 18 sub $0x18,%esp acquire(&p->lock); 80103d10: 8b 45 08 mov 0x8(%ebp),%eax 80103d13: 89 04 24 mov %eax,(%esp) 80103d16: e8 cf 11 00 00 call 80104eea <acquire> if(writable){ 80103d1b: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 80103d1f: 74 1f je 80103d40 <pipeclose+0x36> p->writeopen = 0; 80103d21: 8b 45 08 mov 0x8(%ebp),%eax 80103d24: c7 80 40 02 00 00 00 movl $0x0,0x240(%eax) 80103d2b: 00 00 00 wakeup(&p->nread); 80103d2e: 8b 45 08 mov 0x8(%ebp),%eax 80103d31: 05 34 02 00 00 add $0x234,%eax 80103d36: 89 04 24 mov %eax,(%esp) 80103d39: e8 6d 0f 00 00 call 80104cab <wakeup> 80103d3e: eb 1d jmp 80103d5d <pipeclose+0x53> } else { p->readopen = 0; 80103d40: 8b 45 08 mov 0x8(%ebp),%eax 80103d43: c7 80 3c 02 00 00 00 movl $0x0,0x23c(%eax) 80103d4a: 00 00 00 wakeup(&p->nwrite); 80103d4d: 8b 45 08 mov 0x8(%ebp),%eax 80103d50: 05 38 02 00 00 add $0x238,%eax 80103d55: 89 04 24 mov %eax,(%esp) 80103d58: e8 4e 0f 00 00 call 80104cab <wakeup> } if(p->readopen == 0 && p->writeopen == 0){ 80103d5d: 8b 45 08 mov 0x8(%ebp),%eax 80103d60: 8b 80 3c 02 00 00 mov 0x23c(%eax),%eax 80103d66: 85 c0 test %eax,%eax 80103d68: 75 25 jne 80103d8f <pipeclose+0x85> 80103d6a: 8b 45 08 mov 0x8(%ebp),%eax 80103d6d: 8b 80 40 02 00 00 mov 0x240(%eax),%eax 80103d73: 85 c0 test %eax,%eax 80103d75: 75 18 jne 80103d8f <pipeclose+0x85> release(&p->lock); 80103d77: 8b 45 08 mov 0x8(%ebp),%eax 80103d7a: 89 04 24 mov %eax,(%esp) 80103d7d: e8 ca 11 00 00 call 80104f4c <release> kfree((char*)p); 80103d82: 8b 45 08 mov 0x8(%ebp),%eax 80103d85: 89 04 24 mov %eax,(%esp) 80103d88: e8 b4 ec ff ff call 80102a41 <kfree> 80103d8d: eb 0b jmp 80103d9a <pipeclose+0x90> } else release(&p->lock); 80103d8f: 8b 45 08 mov 0x8(%ebp),%eax 80103d92: 89 04 24 mov %eax,(%esp) 80103d95: e8 b2 11 00 00 call 80104f4c <release> } 80103d9a: c9 leave 80103d9b: c3 ret 80103d9c <pipewrite>: //PAGEBREAK: 40 int pipewrite(struct pipe *p, char *addr, int n) { 80103d9c: 55 push %ebp 80103d9d: 89 e5 mov %esp,%ebp 80103d9f: 83 ec 28 sub $0x28,%esp int i; acquire(&p->lock); 80103da2: 8b 45 08 mov 0x8(%ebp),%eax 80103da5: 89 04 24 mov %eax,(%esp) 80103da8: e8 3d 11 00 00 call 80104eea <acquire> for(i = 0; i < n; i++){ 80103dad: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80103db4: e9 a6 00 00 00 jmp 80103e5f <pipewrite+0xc3> while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 80103db9: eb 57 jmp 80103e12 <pipewrite+0x76> if(p->readopen == 0 || proc->killed){ 80103dbb: 8b 45 08 mov 0x8(%ebp),%eax 80103dbe: 8b 80 3c 02 00 00 mov 0x23c(%eax),%eax 80103dc4: 85 c0 test %eax,%eax 80103dc6: 74 0d je 80103dd5 <pipewrite+0x39> 80103dc8: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80103dce: 8b 40 24 mov 0x24(%eax),%eax 80103dd1: 85 c0 test %eax,%eax 80103dd3: 74 15 je 80103dea <pipewrite+0x4e> release(&p->lock); 80103dd5: 8b 45 08 mov 0x8(%ebp),%eax 80103dd8: 89 04 24 mov %eax,(%esp) 80103ddb: e8 6c 11 00 00 call 80104f4c <release> return -1; 80103de0: b8 ff ff ff ff mov $0xffffffff,%eax 80103de5: e9 9f 00 00 00 jmp 80103e89 <pipewrite+0xed> } wakeup(&p->nread); 80103dea: 8b 45 08 mov 0x8(%ebp),%eax 80103ded: 05 34 02 00 00 add $0x234,%eax 80103df2: 89 04 24 mov %eax,(%esp) 80103df5: e8 b1 0e 00 00 call 80104cab <wakeup> sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep 80103dfa: 8b 45 08 mov 0x8(%ebp),%eax 80103dfd: 8b 55 08 mov 0x8(%ebp),%edx 80103e00: 81 c2 38 02 00 00 add $0x238,%edx 80103e06: 89 44 24 04 mov %eax,0x4(%esp) 80103e0a: 89 14 24 mov %edx,(%esp) 80103e0d: e8 55 0d 00 00 call 80104b67 <sleep> { int i; acquire(&p->lock); for(i = 0; i < n; i++){ while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 80103e12: 8b 45 08 mov 0x8(%ebp),%eax 80103e15: 8b 90 38 02 00 00 mov 0x238(%eax),%edx 80103e1b: 8b 45 08 mov 0x8(%ebp),%eax 80103e1e: 8b 80 34 02 00 00 mov 0x234(%eax),%eax 80103e24: 05 00 02 00 00 add $0x200,%eax 80103e29: 39 c2 cmp %eax,%edx 80103e2b: 74 8e je 80103dbb <pipewrite+0x1f> return -1; } wakeup(&p->nread); sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep } p->data[p->nwrite++ % PIPESIZE] = addr[i]; 80103e2d: 8b 45 08 mov 0x8(%ebp),%eax 80103e30: 8b 80 38 02 00 00 mov 0x238(%eax),%eax 80103e36: 8d 48 01 lea 0x1(%eax),%ecx 80103e39: 8b 55 08 mov 0x8(%ebp),%edx 80103e3c: 89 8a 38 02 00 00 mov %ecx,0x238(%edx) 80103e42: 25 ff 01 00 00 and $0x1ff,%eax 80103e47: 89 c1 mov %eax,%ecx 80103e49: 8b 55 f4 mov -0xc(%ebp),%edx 80103e4c: 8b 45 0c mov 0xc(%ebp),%eax 80103e4f: 01 d0 add %edx,%eax 80103e51: 0f b6 10 movzbl (%eax),%edx 80103e54: 8b 45 08 mov 0x8(%ebp),%eax 80103e57: 88 54 08 34 mov %dl,0x34(%eax,%ecx,1) pipewrite(struct pipe *p, char *addr, int n) { int i; acquire(&p->lock); for(i = 0; i < n; i++){ 80103e5b: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80103e5f: 8b 45 f4 mov -0xc(%ebp),%eax 80103e62: 3b 45 10 cmp 0x10(%ebp),%eax 80103e65: 0f 8c 4e ff ff ff jl 80103db9 <pipewrite+0x1d> wakeup(&p->nread); sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep } p->data[p->nwrite++ % PIPESIZE] = addr[i]; } wakeup(&p->nread); //DOC: pipewrite-wakeup1 80103e6b: 8b 45 08 mov 0x8(%ebp),%eax 80103e6e: 05 34 02 00 00 add $0x234,%eax 80103e73: 89 04 24 mov %eax,(%esp) 80103e76: e8 30 0e 00 00 call 80104cab <wakeup> release(&p->lock); 80103e7b: 8b 45 08 mov 0x8(%ebp),%eax 80103e7e: 89 04 24 mov %eax,(%esp) 80103e81: e8 c6 10 00 00 call 80104f4c <release> return n; 80103e86: 8b 45 10 mov 0x10(%ebp),%eax } 80103e89: c9 leave 80103e8a: c3 ret 80103e8b <piperead>: int piperead(struct pipe *p, char *addr, int n) { 80103e8b: 55 push %ebp 80103e8c: 89 e5 mov %esp,%ebp 80103e8e: 53 push %ebx 80103e8f: 83 ec 24 sub $0x24,%esp int i; acquire(&p->lock); 80103e92: 8b 45 08 mov 0x8(%ebp),%eax 80103e95: 89 04 24 mov %eax,(%esp) 80103e98: e8 4d 10 00 00 call 80104eea <acquire> while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 80103e9d: eb 3a jmp 80103ed9 <piperead+0x4e> if(proc->killed){ 80103e9f: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80103ea5: 8b 40 24 mov 0x24(%eax),%eax 80103ea8: 85 c0 test %eax,%eax 80103eaa: 74 15 je 80103ec1 <piperead+0x36> release(&p->lock); 80103eac: 8b 45 08 mov 0x8(%ebp),%eax 80103eaf: 89 04 24 mov %eax,(%esp) 80103eb2: e8 95 10 00 00 call 80104f4c <release> return -1; 80103eb7: b8 ff ff ff ff mov $0xffffffff,%eax 80103ebc: e9 b5 00 00 00 jmp 80103f76 <piperead+0xeb> } sleep(&p->nread, &p->lock); //DOC: piperead-sleep 80103ec1: 8b 45 08 mov 0x8(%ebp),%eax 80103ec4: 8b 55 08 mov 0x8(%ebp),%edx 80103ec7: 81 c2 34 02 00 00 add $0x234,%edx 80103ecd: 89 44 24 04 mov %eax,0x4(%esp) 80103ed1: 89 14 24 mov %edx,(%esp) 80103ed4: e8 8e 0c 00 00 call 80104b67 <sleep> piperead(struct pipe *p, char *addr, int n) { int i; acquire(&p->lock); while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 80103ed9: 8b 45 08 mov 0x8(%ebp),%eax 80103edc: 8b 90 34 02 00 00 mov 0x234(%eax),%edx 80103ee2: 8b 45 08 mov 0x8(%ebp),%eax 80103ee5: 8b 80 38 02 00 00 mov 0x238(%eax),%eax 80103eeb: 39 c2 cmp %eax,%edx 80103eed: 75 0d jne 80103efc <piperead+0x71> 80103eef: 8b 45 08 mov 0x8(%ebp),%eax 80103ef2: 8b 80 40 02 00 00 mov 0x240(%eax),%eax 80103ef8: 85 c0 test %eax,%eax 80103efa: 75 a3 jne 80103e9f <piperead+0x14> release(&p->lock); return -1; } sleep(&p->nread, &p->lock); //DOC: piperead-sleep } for(i = 0; i < n; i++){ //DOC: piperead-copy 80103efc: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80103f03: eb 4b jmp 80103f50 <piperead+0xc5> if(p->nread == p->nwrite) 80103f05: 8b 45 08 mov 0x8(%ebp),%eax 80103f08: 8b 90 34 02 00 00 mov 0x234(%eax),%edx 80103f0e: 8b 45 08 mov 0x8(%ebp),%eax 80103f11: 8b 80 38 02 00 00 mov 0x238(%eax),%eax 80103f17: 39 c2 cmp %eax,%edx 80103f19: 75 02 jne 80103f1d <piperead+0x92> break; 80103f1b: eb 3b jmp 80103f58 <piperead+0xcd> addr[i] = p->data[p->nread++ % PIPESIZE]; 80103f1d: 8b 55 f4 mov -0xc(%ebp),%edx 80103f20: 8b 45 0c mov 0xc(%ebp),%eax 80103f23: 8d 1c 02 lea (%edx,%eax,1),%ebx 80103f26: 8b 45 08 mov 0x8(%ebp),%eax 80103f29: 8b 80 34 02 00 00 mov 0x234(%eax),%eax 80103f2f: 8d 48 01 lea 0x1(%eax),%ecx 80103f32: 8b 55 08 mov 0x8(%ebp),%edx 80103f35: 89 8a 34 02 00 00 mov %ecx,0x234(%edx) 80103f3b: 25 ff 01 00 00 and $0x1ff,%eax 80103f40: 89 c2 mov %eax,%edx 80103f42: 8b 45 08 mov 0x8(%ebp),%eax 80103f45: 0f b6 44 10 34 movzbl 0x34(%eax,%edx,1),%eax 80103f4a: 88 03 mov %al,(%ebx) release(&p->lock); return -1; } sleep(&p->nread, &p->lock); //DOC: piperead-sleep } for(i = 0; i < n; i++){ //DOC: piperead-copy 80103f4c: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80103f50: 8b 45 f4 mov -0xc(%ebp),%eax 80103f53: 3b 45 10 cmp 0x10(%ebp),%eax 80103f56: 7c ad jl 80103f05 <piperead+0x7a> if(p->nread == p->nwrite) break; addr[i] = p->data[p->nread++ % PIPESIZE]; } wakeup(&p->nwrite); //DOC: piperead-wakeup 80103f58: 8b 45 08 mov 0x8(%ebp),%eax 80103f5b: 05 38 02 00 00 add $0x238,%eax 80103f60: 89 04 24 mov %eax,(%esp) 80103f63: e8 43 0d 00 00 call 80104cab <wakeup> release(&p->lock); 80103f68: 8b 45 08 mov 0x8(%ebp),%eax 80103f6b: 89 04 24 mov %eax,(%esp) 80103f6e: e8 d9 0f 00 00 call 80104f4c <release> return i; 80103f73: 8b 45 f4 mov -0xc(%ebp),%eax } 80103f76: 83 c4 24 add $0x24,%esp 80103f79: 5b pop %ebx 80103f7a: 5d pop %ebp 80103f7b: c3 ret 80103f7c <readeflags>: asm volatile("ltr %0" : : "r" (sel)); } static inline uint readeflags(void) { 80103f7c: 55 push %ebp 80103f7d: 89 e5 mov %esp,%ebp 80103f7f: 83 ec 10 sub $0x10,%esp uint eflags; asm volatile("pushfl; popl %0" : "=r" (eflags)); 80103f82: 9c pushf 80103f83: 58 pop %eax 80103f84: 89 45 fc mov %eax,-0x4(%ebp) return eflags; 80103f87: 8b 45 fc mov -0x4(%ebp),%eax } 80103f8a: c9 leave 80103f8b: c3 ret 80103f8c <sti>: asm volatile("cli"); } static inline void sti(void) { 80103f8c: 55 push %ebp 80103f8d: 89 e5 mov %esp,%ebp asm volatile("sti"); 80103f8f: fb sti } 80103f90: 5d pop %ebp 80103f91: c3 ret 80103f92 <memcop>: static void wakeup1(void *chan); void* memcop(void *dst, void *src, uint n) { 80103f92: 55 push %ebp 80103f93: 89 e5 mov %esp,%ebp 80103f95: 83 ec 10 sub $0x10,%esp const char *s; char *d; s = src; 80103f98: 8b 45 0c mov 0xc(%ebp),%eax 80103f9b: 89 45 fc mov %eax,-0x4(%ebp) d = dst; 80103f9e: 8b 45 08 mov 0x8(%ebp),%eax 80103fa1: 89 45 f8 mov %eax,-0x8(%ebp) if(s < d && s + n > d){ 80103fa4: 8b 45 fc mov -0x4(%ebp),%eax 80103fa7: 3b 45 f8 cmp -0x8(%ebp),%eax 80103faa: 73 3d jae 80103fe9 <memcop+0x57> 80103fac: 8b 45 10 mov 0x10(%ebp),%eax 80103faf: 8b 55 fc mov -0x4(%ebp),%edx 80103fb2: 01 d0 add %edx,%eax 80103fb4: 3b 45 f8 cmp -0x8(%ebp),%eax 80103fb7: 76 30 jbe 80103fe9 <memcop+0x57> s += n; 80103fb9: 8b 45 10 mov 0x10(%ebp),%eax 80103fbc: 01 45 fc add %eax,-0x4(%ebp) d += n; 80103fbf: 8b 45 10 mov 0x10(%ebp),%eax 80103fc2: 01 45 f8 add %eax,-0x8(%ebp) while(n-- > 0) 80103fc5: eb 13 jmp 80103fda <memcop+0x48> *--d = *--s; 80103fc7: 83 6d f8 01 subl $0x1,-0x8(%ebp) 80103fcb: 83 6d fc 01 subl $0x1,-0x4(%ebp) 80103fcf: 8b 45 fc mov -0x4(%ebp),%eax 80103fd2: 0f b6 10 movzbl (%eax),%edx 80103fd5: 8b 45 f8 mov -0x8(%ebp),%eax 80103fd8: 88 10 mov %dl,(%eax) s = src; d = dst; if(s < d && s + n > d){ s += n; d += n; while(n-- > 0) 80103fda: 8b 45 10 mov 0x10(%ebp),%eax 80103fdd: 8d 50 ff lea -0x1(%eax),%edx 80103fe0: 89 55 10 mov %edx,0x10(%ebp) 80103fe3: 85 c0 test %eax,%eax 80103fe5: 75 e0 jne 80103fc7 <memcop+0x35> const char *s; char *d; s = src; d = dst; if(s < d && s + n > d){ 80103fe7: eb 26 jmp 8010400f <memcop+0x7d> s += n; d += n; while(n-- > 0) *--d = *--s; } else while(n-- > 0) 80103fe9: eb 17 jmp 80104002 <memcop+0x70> *d++ = *s++; 80103feb: 8b 45 f8 mov -0x8(%ebp),%eax 80103fee: 8d 50 01 lea 0x1(%eax),%edx 80103ff1: 89 55 f8 mov %edx,-0x8(%ebp) 80103ff4: 8b 55 fc mov -0x4(%ebp),%edx 80103ff7: 8d 4a 01 lea 0x1(%edx),%ecx 80103ffa: 89 4d fc mov %ecx,-0x4(%ebp) 80103ffd: 0f b6 12 movzbl (%edx),%edx 80104000: 88 10 mov %dl,(%eax) s += n; d += n; while(n-- > 0) *--d = *--s; } else while(n-- > 0) 80104002: 8b 45 10 mov 0x10(%ebp),%eax 80104005: 8d 50 ff lea -0x1(%eax),%edx 80104008: 89 55 10 mov %edx,0x10(%ebp) 8010400b: 85 c0 test %eax,%eax 8010400d: 75 dc jne 80103feb <memcop+0x59> *d++ = *s++; return dst; 8010400f: 8b 45 08 mov 0x8(%ebp),%eax } 80104012: c9 leave 80104013: c3 ret 80104014 <pinit>: void pinit(void) { 80104014: 55 push %ebp 80104015: 89 e5 mov %esp,%ebp 80104017: 83 ec 18 sub $0x18,%esp initlock(&ptable.lock, "ptable"); 8010401a: c7 44 24 04 70 88 10 movl $0x80108870,0x4(%esp) 80104021: 80 80104022: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104029: e8 9b 0e 00 00 call 80104ec9 <initlock> } 8010402e: c9 leave 8010402f: c3 ret 80104030 <allocproc>: // If found, change state to EMBRYO and initialize // state required to run in the kernel. // Otherwise return 0. static struct proc* allocproc(void) { 80104030: 55 push %ebp 80104031: 89 e5 mov %esp,%ebp 80104033: 83 ec 28 sub $0x28,%esp struct proc *p; char *sp; acquire(&ptable.lock); 80104036: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 8010403d: e8 a8 0e 00 00 call 80104eea <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80104042: c7 45 f4 74 ff 10 80 movl $0x8010ff74,-0xc(%ebp) 80104049: eb 53 jmp 8010409e <allocproc+0x6e> if(p->state == UNUSED) 8010404b: 8b 45 f4 mov -0xc(%ebp),%eax 8010404e: 8b 40 0c mov 0xc(%eax),%eax 80104051: 85 c0 test %eax,%eax 80104053: 75 42 jne 80104097 <allocproc+0x67> goto found; 80104055: 90 nop release(&ptable.lock); return 0; found: p->state = EMBRYO; 80104056: 8b 45 f4 mov -0xc(%ebp),%eax 80104059: c7 40 0c 01 00 00 00 movl $0x1,0xc(%eax) p->pid = nextpid++; 80104060: a1 04 b0 10 80 mov 0x8010b004,%eax 80104065: 8d 50 01 lea 0x1(%eax),%edx 80104068: 89 15 04 b0 10 80 mov %edx,0x8010b004 8010406e: 8b 55 f4 mov -0xc(%ebp),%edx 80104071: 89 42 10 mov %eax,0x10(%edx) release(&ptable.lock); 80104074: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 8010407b: e8 cc 0e 00 00 call 80104f4c <release> // Allocate kernel stack. if((p->kstack = kalloc()) == 0){ 80104080: e8 55 ea ff ff call 80102ada <kalloc> 80104085: 8b 55 f4 mov -0xc(%ebp),%edx 80104088: 89 42 08 mov %eax,0x8(%edx) 8010408b: 8b 45 f4 mov -0xc(%ebp),%eax 8010408e: 8b 40 08 mov 0x8(%eax),%eax 80104091: 85 c0 test %eax,%eax 80104093: 75 36 jne 801040cb <allocproc+0x9b> 80104095: eb 23 jmp 801040ba <allocproc+0x8a> { struct proc *p; char *sp; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80104097: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp) 8010409e: 81 7d f4 74 20 11 80 cmpl $0x80112074,-0xc(%ebp) 801040a5: 72 a4 jb 8010404b <allocproc+0x1b> if(p->state == UNUSED) goto found; release(&ptable.lock); 801040a7: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 801040ae: e8 99 0e 00 00 call 80104f4c <release> return 0; 801040b3: b8 00 00 00 00 mov $0x0,%eax 801040b8: eb 76 jmp 80104130 <allocproc+0x100> p->pid = nextpid++; release(&ptable.lock); // Allocate kernel stack. if((p->kstack = kalloc()) == 0){ p->state = UNUSED; 801040ba: 8b 45 f4 mov -0xc(%ebp),%eax 801040bd: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) return 0; 801040c4: b8 00 00 00 00 mov $0x0,%eax 801040c9: eb 65 jmp 80104130 <allocproc+0x100> } sp = p->kstack + KSTACKSIZE; 801040cb: 8b 45 f4 mov -0xc(%ebp),%eax 801040ce: 8b 40 08 mov 0x8(%eax),%eax 801040d1: 05 00 10 00 00 add $0x1000,%eax 801040d6: 89 45 f0 mov %eax,-0x10(%ebp) // Leave room for trap frame. sp -= sizeof *p->tf; 801040d9: 83 6d f0 4c subl $0x4c,-0x10(%ebp) p->tf = (struct trapframe*)sp; 801040dd: 8b 45 f4 mov -0xc(%ebp),%eax 801040e0: 8b 55 f0 mov -0x10(%ebp),%edx 801040e3: 89 50 18 mov %edx,0x18(%eax) // Set up new context to start executing at forkret, // which returns to trapret. sp -= 4; 801040e6: 83 6d f0 04 subl $0x4,-0x10(%ebp) *(uint*)sp = (uint)trapret; 801040ea: ba 47 66 10 80 mov $0x80106647,%edx 801040ef: 8b 45 f0 mov -0x10(%ebp),%eax 801040f2: 89 10 mov %edx,(%eax) sp -= sizeof *p->context; 801040f4: 83 6d f0 14 subl $0x14,-0x10(%ebp) p->context = (struct context*)sp; 801040f8: 8b 45 f4 mov -0xc(%ebp),%eax 801040fb: 8b 55 f0 mov -0x10(%ebp),%edx 801040fe: 89 50 1c mov %edx,0x1c(%eax) memset(p->context, 0, sizeof *p->context); 80104101: 8b 45 f4 mov -0xc(%ebp),%eax 80104104: 8b 40 1c mov 0x1c(%eax),%eax 80104107: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 8010410e: 00 8010410f: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80104116: 00 80104117: 89 04 24 mov %eax,(%esp) 8010411a: e8 1f 10 00 00 call 8010513e <memset> p->context->eip = (uint)forkret; 8010411f: 8b 45 f4 mov -0xc(%ebp),%eax 80104122: 8b 40 1c mov 0x1c(%eax),%eax 80104125: ba 3b 4b 10 80 mov $0x80104b3b,%edx 8010412a: 89 50 10 mov %edx,0x10(%eax) return p; 8010412d: 8b 45 f4 mov -0xc(%ebp),%eax } 80104130: c9 leave 80104131: c3 ret 80104132 <userinit>: //PAGEBREAK: 32 // Set up first user process. void userinit(void) { 80104132: 55 push %ebp 80104133: 89 e5 mov %esp,%ebp 80104135: 83 ec 28 sub $0x28,%esp struct proc *p; extern char _binary_initcode_start[], _binary_initcode_size[]; p = allocproc(); 80104138: e8 f3 fe ff ff call 80104030 <allocproc> 8010413d: 89 45 f4 mov %eax,-0xc(%ebp) initproc = p; 80104140: 8b 45 f4 mov -0xc(%ebp),%eax 80104143: a3 68 b6 10 80 mov %eax,0x8010b668 if((p->pgdir = setupkvm()) == 0) 80104148: e8 ee 3b 00 00 call 80107d3b <setupkvm> 8010414d: 8b 55 f4 mov -0xc(%ebp),%edx 80104150: 89 42 04 mov %eax,0x4(%edx) 80104153: 8b 45 f4 mov -0xc(%ebp),%eax 80104156: 8b 40 04 mov 0x4(%eax),%eax 80104159: 85 c0 test %eax,%eax 8010415b: 75 0c jne 80104169 <userinit+0x37> panic("userinit: out of memory?"); 8010415d: c7 04 24 77 88 10 80 movl $0x80108877,(%esp) 80104164: e8 d1 c3 ff ff call 8010053a <panic> inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size); 80104169: ba 2c 00 00 00 mov $0x2c,%edx 8010416e: 8b 45 f4 mov -0xc(%ebp),%eax 80104171: 8b 40 04 mov 0x4(%eax),%eax 80104174: 89 54 24 08 mov %edx,0x8(%esp) 80104178: c7 44 24 04 00 b5 10 movl $0x8010b500,0x4(%esp) 8010417f: 80 80104180: 89 04 24 mov %eax,(%esp) 80104183: e8 0b 3e 00 00 call 80107f93 <inituvm> p->sz = PGSIZE; 80104188: 8b 45 f4 mov -0xc(%ebp),%eax 8010418b: c7 00 00 10 00 00 movl $0x1000,(%eax) memset(p->tf, 0, sizeof(*p->tf)); 80104191: 8b 45 f4 mov -0xc(%ebp),%eax 80104194: 8b 40 18 mov 0x18(%eax),%eax 80104197: c7 44 24 08 4c 00 00 movl $0x4c,0x8(%esp) 8010419e: 00 8010419f: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801041a6: 00 801041a7: 89 04 24 mov %eax,(%esp) 801041aa: e8 8f 0f 00 00 call 8010513e <memset> p->tf->cs = (SEG_UCODE << 3) | DPL_USER; 801041af: 8b 45 f4 mov -0xc(%ebp),%eax 801041b2: 8b 40 18 mov 0x18(%eax),%eax 801041b5: 66 c7 40 3c 23 00 movw $0x23,0x3c(%eax) p->tf->ds = (SEG_UDATA << 3) | DPL_USER; 801041bb: 8b 45 f4 mov -0xc(%ebp),%eax 801041be: 8b 40 18 mov 0x18(%eax),%eax 801041c1: 66 c7 40 2c 2b 00 movw $0x2b,0x2c(%eax) p->tf->es = p->tf->ds; 801041c7: 8b 45 f4 mov -0xc(%ebp),%eax 801041ca: 8b 40 18 mov 0x18(%eax),%eax 801041cd: 8b 55 f4 mov -0xc(%ebp),%edx 801041d0: 8b 52 18 mov 0x18(%edx),%edx 801041d3: 0f b7 52 2c movzwl 0x2c(%edx),%edx 801041d7: 66 89 50 28 mov %dx,0x28(%eax) p->tf->ss = p->tf->ds; 801041db: 8b 45 f4 mov -0xc(%ebp),%eax 801041de: 8b 40 18 mov 0x18(%eax),%eax 801041e1: 8b 55 f4 mov -0xc(%ebp),%edx 801041e4: 8b 52 18 mov 0x18(%edx),%edx 801041e7: 0f b7 52 2c movzwl 0x2c(%edx),%edx 801041eb: 66 89 50 48 mov %dx,0x48(%eax) p->tf->eflags = FL_IF; 801041ef: 8b 45 f4 mov -0xc(%ebp),%eax 801041f2: 8b 40 18 mov 0x18(%eax),%eax 801041f5: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax) p->tf->esp = PGSIZE; 801041fc: 8b 45 f4 mov -0xc(%ebp),%eax 801041ff: 8b 40 18 mov 0x18(%eax),%eax 80104202: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax) p->tf->eip = 0; // beginning of initcode.S 80104209: 8b 45 f4 mov -0xc(%ebp),%eax 8010420c: 8b 40 18 mov 0x18(%eax),%eax 8010420f: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) safestrcpy(p->name, "initcode", sizeof(p->name)); 80104216: 8b 45 f4 mov -0xc(%ebp),%eax 80104219: 83 c0 6c add $0x6c,%eax 8010421c: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80104223: 00 80104224: c7 44 24 04 90 88 10 movl $0x80108890,0x4(%esp) 8010422b: 80 8010422c: 89 04 24 mov %eax,(%esp) 8010422f: e8 2a 11 00 00 call 8010535e <safestrcpy> p->cwd = namei("/"); 80104234: c7 04 24 99 88 10 80 movl $0x80108899,(%esp) 8010423b: e8 be e1 ff ff call 801023fe <namei> 80104240: 8b 55 f4 mov -0xc(%ebp),%edx 80104243: 89 42 68 mov %eax,0x68(%edx) p->state = RUNNABLE; 80104246: 8b 45 f4 mov -0xc(%ebp),%eax 80104249: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) } 80104250: c9 leave 80104251: c3 ret 80104252 <growproc>: // Grow current process's memory by n bytes. // Return 0 on success, -1 on failure. int growproc(int n) { 80104252: 55 push %ebp 80104253: 89 e5 mov %esp,%ebp 80104255: 83 ec 28 sub $0x28,%esp uint sz; sz = proc->sz; 80104258: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010425e: 8b 00 mov (%eax),%eax 80104260: 89 45 f4 mov %eax,-0xc(%ebp) if(n > 0){ 80104263: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 80104267: 7e 34 jle 8010429d <growproc+0x4b> if((sz = allocuvm(proc->pgdir, sz, sz + n)) == 0) 80104269: 8b 55 08 mov 0x8(%ebp),%edx 8010426c: 8b 45 f4 mov -0xc(%ebp),%eax 8010426f: 01 c2 add %eax,%edx 80104271: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104277: 8b 40 04 mov 0x4(%eax),%eax 8010427a: 89 54 24 08 mov %edx,0x8(%esp) 8010427e: 8b 55 f4 mov -0xc(%ebp),%edx 80104281: 89 54 24 04 mov %edx,0x4(%esp) 80104285: 89 04 24 mov %eax,(%esp) 80104288: e8 7c 3e 00 00 call 80108109 <allocuvm> 8010428d: 89 45 f4 mov %eax,-0xc(%ebp) 80104290: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80104294: 75 41 jne 801042d7 <growproc+0x85> return -1; 80104296: b8 ff ff ff ff mov $0xffffffff,%eax 8010429b: eb 58 jmp 801042f5 <growproc+0xa3> } else if(n < 0){ 8010429d: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 801042a1: 79 34 jns 801042d7 <growproc+0x85> if((sz = deallocuvm(proc->pgdir, sz, sz + n)) == 0) 801042a3: 8b 55 08 mov 0x8(%ebp),%edx 801042a6: 8b 45 f4 mov -0xc(%ebp),%eax 801042a9: 01 c2 add %eax,%edx 801042ab: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801042b1: 8b 40 04 mov 0x4(%eax),%eax 801042b4: 89 54 24 08 mov %edx,0x8(%esp) 801042b8: 8b 55 f4 mov -0xc(%ebp),%edx 801042bb: 89 54 24 04 mov %edx,0x4(%esp) 801042bf: 89 04 24 mov %eax,(%esp) 801042c2: e8 1c 3f 00 00 call 801081e3 <deallocuvm> 801042c7: 89 45 f4 mov %eax,-0xc(%ebp) 801042ca: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801042ce: 75 07 jne 801042d7 <growproc+0x85> return -1; 801042d0: b8 ff ff ff ff mov $0xffffffff,%eax 801042d5: eb 1e jmp 801042f5 <growproc+0xa3> } proc->sz = sz; 801042d7: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801042dd: 8b 55 f4 mov -0xc(%ebp),%edx 801042e0: 89 10 mov %edx,(%eax) switchuvm(proc); 801042e2: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801042e8: 89 04 24 mov %eax,(%esp) 801042eb: e8 3c 3b 00 00 call 80107e2c <switchuvm> return 0; 801042f0: b8 00 00 00 00 mov $0x0,%eax } 801042f5: c9 leave 801042f6: c3 ret 801042f7 <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) { 801042f7: 55 push %ebp 801042f8: 89 e5 mov %esp,%ebp 801042fa: 57 push %edi 801042fb: 56 push %esi 801042fc: 53 push %ebx 801042fd: 83 ec 2c sub $0x2c,%esp int i, pid; struct proc *np; // Allocate process. if((np = allocproc()) == 0) 80104300: e8 2b fd ff ff call 80104030 <allocproc> 80104305: 89 45 e0 mov %eax,-0x20(%ebp) 80104308: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 8010430c: 75 0a jne 80104318 <fork+0x21> return -1; 8010430e: b8 ff ff ff ff mov $0xffffffff,%eax 80104313: e9 47 01 00 00 jmp 8010445f <fork+0x168> // Copy process state from p. if((np->pgdir = copyuvm(proc->pgdir, proc->sz)) == 0){ 80104318: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010431e: 8b 10 mov (%eax),%edx 80104320: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104326: 8b 40 04 mov 0x4(%eax),%eax 80104329: 89 54 24 04 mov %edx,0x4(%esp) 8010432d: 89 04 24 mov %eax,(%esp) 80104330: e8 4a 40 00 00 call 8010837f <copyuvm> 80104335: 8b 55 e0 mov -0x20(%ebp),%edx 80104338: 89 42 04 mov %eax,0x4(%edx) 8010433b: 8b 45 e0 mov -0x20(%ebp),%eax 8010433e: 8b 40 04 mov 0x4(%eax),%eax 80104341: 85 c0 test %eax,%eax 80104343: 75 2c jne 80104371 <fork+0x7a> kfree(np->kstack); 80104345: 8b 45 e0 mov -0x20(%ebp),%eax 80104348: 8b 40 08 mov 0x8(%eax),%eax 8010434b: 89 04 24 mov %eax,(%esp) 8010434e: e8 ee e6 ff ff call 80102a41 <kfree> np->kstack = 0; 80104353: 8b 45 e0 mov -0x20(%ebp),%eax 80104356: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) np->state = UNUSED; 8010435d: 8b 45 e0 mov -0x20(%ebp),%eax 80104360: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) return -1; 80104367: b8 ff ff ff ff mov $0xffffffff,%eax 8010436c: e9 ee 00 00 00 jmp 8010445f <fork+0x168> } np->sz = proc->sz; 80104371: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104377: 8b 10 mov (%eax),%edx 80104379: 8b 45 e0 mov -0x20(%ebp),%eax 8010437c: 89 10 mov %edx,(%eax) np->parent = proc; 8010437e: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 80104385: 8b 45 e0 mov -0x20(%ebp),%eax 80104388: 89 50 14 mov %edx,0x14(%eax) *np->tf = *proc->tf; 8010438b: 8b 45 e0 mov -0x20(%ebp),%eax 8010438e: 8b 50 18 mov 0x18(%eax),%edx 80104391: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104397: 8b 40 18 mov 0x18(%eax),%eax 8010439a: 89 c3 mov %eax,%ebx 8010439c: b8 13 00 00 00 mov $0x13,%eax 801043a1: 89 d7 mov %edx,%edi 801043a3: 89 de mov %ebx,%esi 801043a5: 89 c1 mov %eax,%ecx 801043a7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) np->isthread = 0; 801043a9: 8b 45 e0 mov -0x20(%ebp),%eax 801043ac: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 801043b3: 00 00 00 // Clear %eax so that fork returns 0 in the child. np->tf->eax = 0; 801043b6: 8b 45 e0 mov -0x20(%ebp),%eax 801043b9: 8b 40 18 mov 0x18(%eax),%eax 801043bc: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) for(i = 0; i < NOFILE; i++) 801043c3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 801043ca: eb 3d jmp 80104409 <fork+0x112> if(proc->ofile[i]) 801043cc: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801043d2: 8b 55 e4 mov -0x1c(%ebp),%edx 801043d5: 83 c2 08 add $0x8,%edx 801043d8: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 801043dc: 85 c0 test %eax,%eax 801043de: 74 25 je 80104405 <fork+0x10e> np->ofile[i] = filedup(proc->ofile[i]); 801043e0: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801043e6: 8b 55 e4 mov -0x1c(%ebp),%edx 801043e9: 83 c2 08 add $0x8,%edx 801043ec: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 801043f0: 89 04 24 mov %eax,(%esp) 801043f3: e8 86 cb ff ff call 80100f7e <filedup> 801043f8: 8b 55 e0 mov -0x20(%ebp),%edx 801043fb: 8b 4d e4 mov -0x1c(%ebp),%ecx 801043fe: 83 c1 08 add $0x8,%ecx 80104401: 89 44 8a 08 mov %eax,0x8(%edx,%ecx,4) np->isthread = 0; // Clear %eax so that fork returns 0 in the child. np->tf->eax = 0; for(i = 0; i < NOFILE; i++) 80104405: 83 45 e4 01 addl $0x1,-0x1c(%ebp) 80104409: 83 7d e4 0f cmpl $0xf,-0x1c(%ebp) 8010440d: 7e bd jle 801043cc <fork+0xd5> if(proc->ofile[i]) np->ofile[i] = filedup(proc->ofile[i]); np->cwd = idup(proc->cwd); 8010440f: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104415: 8b 40 68 mov 0x68(%eax),%eax 80104418: 89 04 24 mov %eax,(%esp) 8010441b: e8 01 d4 ff ff call 80101821 <idup> 80104420: 8b 55 e0 mov -0x20(%ebp),%edx 80104423: 89 42 68 mov %eax,0x68(%edx) pid = np->pid; 80104426: 8b 45 e0 mov -0x20(%ebp),%eax 80104429: 8b 40 10 mov 0x10(%eax),%eax 8010442c: 89 45 dc mov %eax,-0x24(%ebp) np->state = RUNNABLE; 8010442f: 8b 45 e0 mov -0x20(%ebp),%eax 80104432: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) safestrcpy(np->name, proc->name, sizeof(proc->name)); 80104439: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010443f: 8d 50 6c lea 0x6c(%eax),%edx 80104442: 8b 45 e0 mov -0x20(%ebp),%eax 80104445: 83 c0 6c add $0x6c,%eax 80104448: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 8010444f: 00 80104450: 89 54 24 04 mov %edx,0x4(%esp) 80104454: 89 04 24 mov %eax,(%esp) 80104457: e8 02 0f 00 00 call 8010535e <safestrcpy> return pid; 8010445c: 8b 45 dc mov -0x24(%ebp),%eax } 8010445f: 83 c4 2c add $0x2c,%esp 80104462: 5b pop %ebx 80104463: 5e pop %esi 80104464: 5f pop %edi 80104465: 5d pop %ebp 80104466: c3 ret 80104467 <clone>: //creat a new process but used parent pgdir. int clone(int stack, int size, int routine, int arg){ 80104467: 55 push %ebp 80104468: 89 e5 mov %esp,%ebp 8010446a: 57 push %edi 8010446b: 56 push %esi 8010446c: 53 push %ebx 8010446d: 81 ec bc 00 00 00 sub $0xbc,%esp int i, pid; struct proc *np; //cprintf("in clone\n"); // Allocate process. if((np = allocproc()) == 0) 80104473: e8 b8 fb ff ff call 80104030 <allocproc> 80104478: 89 45 dc mov %eax,-0x24(%ebp) 8010447b: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 8010447f: 75 0a jne 8010448b <clone+0x24> return -1; 80104481: b8 ff ff ff ff mov $0xffffffff,%eax 80104486: e9 f4 01 00 00 jmp 8010467f <clone+0x218> if((stack % PGSIZE) != 0 || stack == 0 || routine == 0) 8010448b: 8b 45 08 mov 0x8(%ebp),%eax 8010448e: 25 ff 0f 00 00 and $0xfff,%eax 80104493: 85 c0 test %eax,%eax 80104495: 75 0c jne 801044a3 <clone+0x3c> 80104497: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 8010449b: 74 06 je 801044a3 <clone+0x3c> 8010449d: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801044a1: 75 0a jne 801044ad <clone+0x46> return -1; 801044a3: b8 ff ff ff ff mov $0xffffffff,%eax 801044a8: e9 d2 01 00 00 jmp 8010467f <clone+0x218> np->pgdir = proc->pgdir; 801044ad: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801044b3: 8b 50 04 mov 0x4(%eax),%edx 801044b6: 8b 45 dc mov -0x24(%ebp),%eax 801044b9: 89 50 04 mov %edx,0x4(%eax) np->sz = proc->sz; 801044bc: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801044c2: 8b 10 mov (%eax),%edx 801044c4: 8b 45 dc mov -0x24(%ebp),%eax 801044c7: 89 10 mov %edx,(%eax) np->parent = proc; 801044c9: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 801044d0: 8b 45 dc mov -0x24(%ebp),%eax 801044d3: 89 50 14 mov %edx,0x14(%eax) *np->tf = *proc->tf; 801044d6: 8b 45 dc mov -0x24(%ebp),%eax 801044d9: 8b 50 18 mov 0x18(%eax),%edx 801044dc: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801044e2: 8b 40 18 mov 0x18(%eax),%eax 801044e5: 89 c3 mov %eax,%ebx 801044e7: b8 13 00 00 00 mov $0x13,%eax 801044ec: 89 d7 mov %edx,%edi 801044ee: 89 de mov %ebx,%esi 801044f0: 89 c1 mov %eax,%ecx 801044f2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) np->isthread = 1; 801044f4: 8b 45 dc mov -0x24(%ebp),%eax 801044f7: c7 80 80 00 00 00 01 movl $0x1,0x80(%eax) 801044fe: 00 00 00 pid = np->pid; 80104501: 8b 45 dc mov -0x24(%ebp),%eax 80104504: 8b 40 10 mov 0x10(%eax),%eax 80104507: 89 45 d8 mov %eax,-0x28(%ebp) struct proc *pp; pp = proc; 8010450a: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104510: 89 45 e0 mov %eax,-0x20(%ebp) while(pp->isthread == 1){ 80104513: eb 09 jmp 8010451e <clone+0xb7> pp = pp->parent; 80104515: 8b 45 e0 mov -0x20(%ebp),%eax 80104518: 8b 40 14 mov 0x14(%eax),%eax 8010451b: 89 45 e0 mov %eax,-0x20(%ebp) np->isthread = 1; pid = np->pid; struct proc *pp; pp = proc; while(pp->isthread == 1){ 8010451e: 8b 45 e0 mov -0x20(%ebp),%eax 80104521: 8b 80 80 00 00 00 mov 0x80(%eax),%eax 80104527: 83 f8 01 cmp $0x1,%eax 8010452a: 74 e9 je 80104515 <clone+0xae> pp = pp->parent; } np->parent = pp; 8010452c: 8b 45 dc mov -0x24(%ebp),%eax 8010452f: 8b 55 e0 mov -0x20(%ebp),%edx 80104532: 89 50 14 mov %edx,0x14(%eax) //need to be modified as point to the same address //*np->ofile = *proc->ofile; for(i = 0; i < NOFILE; i++) 80104535: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 8010453c: eb 3d jmp 8010457b <clone+0x114> if(proc->ofile[i]) 8010453e: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104544: 8b 55 e4 mov -0x1c(%ebp),%edx 80104547: 83 c2 08 add $0x8,%edx 8010454a: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 8010454e: 85 c0 test %eax,%eax 80104550: 74 25 je 80104577 <clone+0x110> np->ofile[i] = filedup(proc->ofile[i]); 80104552: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104558: 8b 55 e4 mov -0x1c(%ebp),%edx 8010455b: 83 c2 08 add $0x8,%edx 8010455e: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 80104562: 89 04 24 mov %eax,(%esp) 80104565: e8 14 ca ff ff call 80100f7e <filedup> 8010456a: 8b 55 dc mov -0x24(%ebp),%edx 8010456d: 8b 4d e4 mov -0x1c(%ebp),%ecx 80104570: 83 c1 08 add $0x8,%ecx 80104573: 89 44 8a 08 mov %eax,0x8(%edx,%ecx,4) pp = pp->parent; } np->parent = pp; //need to be modified as point to the same address //*np->ofile = *proc->ofile; for(i = 0; i < NOFILE; i++) 80104577: 83 45 e4 01 addl $0x1,-0x1c(%ebp) 8010457b: 83 7d e4 0f cmpl $0xf,-0x1c(%ebp) 8010457f: 7e bd jle 8010453e <clone+0xd7> if(proc->ofile[i]) np->ofile[i] = filedup(proc->ofile[i]); // Clear %eax so that fork returns 0 in the child. np->tf->eax = 0; 80104581: 8b 45 dc mov -0x24(%ebp),%eax 80104584: 8b 40 18 mov 0x18(%eax),%eax 80104587: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) uint ustack[MAXARG]; uint sp = stack + PGSIZE; 8010458e: 8b 45 08 mov 0x8(%ebp),%eax 80104591: 05 00 10 00 00 add $0x1000,%eax 80104596: 89 45 d4 mov %eax,-0x2c(%ebp) // //modify here <<<<< np->tf->ebp = sp; 80104599: 8b 45 dc mov -0x24(%ebp),%eax 8010459c: 8b 40 18 mov 0x18(%eax),%eax 8010459f: 8b 55 d4 mov -0x2c(%ebp),%edx 801045a2: 89 50 08 mov %edx,0x8(%eax) ustack[0] = 0xffffffff; 801045a5: c7 85 54 ff ff ff ff movl $0xffffffff,-0xac(%ebp) 801045ac: ff ff ff ustack[1] = arg; 801045af: 8b 45 14 mov 0x14(%ebp),%eax 801045b2: 89 85 58 ff ff ff mov %eax,-0xa8(%ebp) sp -= 8; 801045b8: 83 6d d4 08 subl $0x8,-0x2c(%ebp) if(copyout(np->pgdir,sp,ustack,8)<0){ 801045bc: 8b 45 dc mov -0x24(%ebp),%eax 801045bf: 8b 40 04 mov 0x4(%eax),%eax 801045c2: c7 44 24 0c 08 00 00 movl $0x8,0xc(%esp) 801045c9: 00 801045ca: 8d 95 54 ff ff ff lea -0xac(%ebp),%edx 801045d0: 89 54 24 08 mov %edx,0x8(%esp) 801045d4: 8b 55 d4 mov -0x2c(%ebp),%edx 801045d7: 89 54 24 04 mov %edx,0x4(%esp) 801045db: 89 04 24 mov %eax,(%esp) 801045de: e8 1b 3f 00 00 call 801084fe <copyout> 801045e3: 85 c0 test %eax,%eax 801045e5: 79 16 jns 801045fd <clone+0x196> cprintf("push arg fails\n"); 801045e7: c7 04 24 9b 88 10 80 movl $0x8010889b,(%esp) 801045ee: e8 ad bd ff ff call 801003a0 <cprintf> return -1; 801045f3: b8 ff ff ff ff mov $0xffffffff,%eax 801045f8: e9 82 00 00 00 jmp 8010467f <clone+0x218> } np->tf->eip = routine; 801045fd: 8b 45 dc mov -0x24(%ebp),%eax 80104600: 8b 40 18 mov 0x18(%eax),%eax 80104603: 8b 55 10 mov 0x10(%ebp),%edx 80104606: 89 50 38 mov %edx,0x38(%eax) np->tf->esp = sp; 80104609: 8b 45 dc mov -0x24(%ebp),%eax 8010460c: 8b 40 18 mov 0x18(%eax),%eax 8010460f: 8b 55 d4 mov -0x2c(%ebp),%edx 80104612: 89 50 44 mov %edx,0x44(%eax) np->cwd = idup(proc->cwd); 80104615: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010461b: 8b 40 68 mov 0x68(%eax),%eax 8010461e: 89 04 24 mov %eax,(%esp) 80104621: e8 fb d1 ff ff call 80101821 <idup> 80104626: 8b 55 dc mov -0x24(%ebp),%edx 80104629: 89 42 68 mov %eax,0x68(%edx) switchuvm(np); 8010462c: 8b 45 dc mov -0x24(%ebp),%eax 8010462f: 89 04 24 mov %eax,(%esp) 80104632: e8 f5 37 00 00 call 80107e2c <switchuvm> acquire(&ptable.lock); 80104637: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 8010463e: e8 a7 08 00 00 call 80104eea <acquire> np->state = RUNNABLE; 80104643: 8b 45 dc mov -0x24(%ebp),%eax 80104646: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) release(&ptable.lock); 8010464d: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104654: e8 f3 08 00 00 call 80104f4c <release> safestrcpy(np->name, proc->name, sizeof(proc->name)); 80104659: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010465f: 8d 50 6c lea 0x6c(%eax),%edx 80104662: 8b 45 dc mov -0x24(%ebp),%eax 80104665: 83 c0 6c add $0x6c,%eax 80104668: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 8010466f: 00 80104670: 89 54 24 04 mov %edx,0x4(%esp) 80104674: 89 04 24 mov %eax,(%esp) 80104677: e8 e2 0c 00 00 call 8010535e <safestrcpy> return pid; 8010467c: 8b 45 d8 mov -0x28(%ebp),%eax } 8010467f: 81 c4 bc 00 00 00 add $0xbc,%esp 80104685: 5b pop %ebx 80104686: 5e pop %esi 80104687: 5f pop %edi 80104688: 5d pop %ebp 80104689: c3 ret 8010468a <exit>: // Exit the current process. Does not return. // An exited process remains in the zombie state // until its parent calls wait() to find out it exited. void exit(void) { 8010468a: 55 push %ebp 8010468b: 89 e5 mov %esp,%ebp 8010468d: 83 ec 28 sub $0x28,%esp struct proc *p; int fd; if(proc == initproc) 80104690: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 80104697: a1 68 b6 10 80 mov 0x8010b668,%eax 8010469c: 39 c2 cmp %eax,%edx 8010469e: 75 0c jne 801046ac <exit+0x22> panic("init exiting"); 801046a0: c7 04 24 ab 88 10 80 movl $0x801088ab,(%esp) 801046a7: e8 8e be ff ff call 8010053a <panic> // Close all open files. for(fd = 0; fd < NOFILE; fd++){ 801046ac: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 801046b3: eb 44 jmp 801046f9 <exit+0x6f> if(proc->ofile[fd]){ 801046b5: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801046bb: 8b 55 f0 mov -0x10(%ebp),%edx 801046be: 83 c2 08 add $0x8,%edx 801046c1: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 801046c5: 85 c0 test %eax,%eax 801046c7: 74 2c je 801046f5 <exit+0x6b> fileclose(proc->ofile[fd]); 801046c9: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801046cf: 8b 55 f0 mov -0x10(%ebp),%edx 801046d2: 83 c2 08 add $0x8,%edx 801046d5: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 801046d9: 89 04 24 mov %eax,(%esp) 801046dc: e8 e5 c8 ff ff call 80100fc6 <fileclose> proc->ofile[fd] = 0; 801046e1: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801046e7: 8b 55 f0 mov -0x10(%ebp),%edx 801046ea: 83 c2 08 add $0x8,%edx 801046ed: c7 44 90 08 00 00 00 movl $0x0,0x8(%eax,%edx,4) 801046f4: 00 if(proc == initproc) panic("init exiting"); // Close all open files. for(fd = 0; fd < NOFILE; fd++){ 801046f5: 83 45 f0 01 addl $0x1,-0x10(%ebp) 801046f9: 83 7d f0 0f cmpl $0xf,-0x10(%ebp) 801046fd: 7e b6 jle 801046b5 <exit+0x2b> fileclose(proc->ofile[fd]); proc->ofile[fd] = 0; } } iput(proc->cwd); 801046ff: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104705: 8b 40 68 mov 0x68(%eax),%eax 80104708: 89 04 24 mov %eax,(%esp) 8010470b: e8 f6 d2 ff ff call 80101a06 <iput> proc->cwd = 0; 80104710: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104716: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) acquire(&ptable.lock); 8010471d: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104724: e8 c1 07 00 00 call 80104eea <acquire> // Parent might be sleeping in wait(). wakeup1(proc->parent); 80104729: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010472f: 8b 40 14 mov 0x14(%eax),%eax 80104732: 89 04 24 mov %eax,(%esp) 80104735: e8 c8 04 00 00 call 80104c02 <wakeup1> // Pass abandoned children to init. for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 8010473a: c7 45 f4 74 ff 10 80 movl $0x8010ff74,-0xc(%ebp) 80104741: eb 3b jmp 8010477e <exit+0xf4> if(p->parent == proc){ 80104743: 8b 45 f4 mov -0xc(%ebp),%eax 80104746: 8b 50 14 mov 0x14(%eax),%edx 80104749: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010474f: 39 c2 cmp %eax,%edx 80104751: 75 24 jne 80104777 <exit+0xed> p->parent = initproc; 80104753: 8b 15 68 b6 10 80 mov 0x8010b668,%edx 80104759: 8b 45 f4 mov -0xc(%ebp),%eax 8010475c: 89 50 14 mov %edx,0x14(%eax) if(p->state == ZOMBIE) 8010475f: 8b 45 f4 mov -0xc(%ebp),%eax 80104762: 8b 40 0c mov 0xc(%eax),%eax 80104765: 83 f8 05 cmp $0x5,%eax 80104768: 75 0d jne 80104777 <exit+0xed> wakeup1(initproc); 8010476a: a1 68 b6 10 80 mov 0x8010b668,%eax 8010476f: 89 04 24 mov %eax,(%esp) 80104772: e8 8b 04 00 00 call 80104c02 <wakeup1> // Parent might be sleeping in wait(). wakeup1(proc->parent); // Pass abandoned children to init. for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104777: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp) 8010477e: 81 7d f4 74 20 11 80 cmpl $0x80112074,-0xc(%ebp) 80104785: 72 bc jb 80104743 <exit+0xb9> wakeup1(initproc); } } // Jump into the scheduler, never to return. proc->state = ZOMBIE; 80104787: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010478d: c7 40 0c 05 00 00 00 movl $0x5,0xc(%eax) sched(); 80104794: e8 95 02 00 00 call 80104a2e <sched> panic("zombie exit"); 80104799: c7 04 24 b8 88 10 80 movl $0x801088b8,(%esp) 801047a0: e8 95 bd ff ff call 8010053a <panic> 801047a5 <texit>: } void texit(void) { 801047a5: 55 push %ebp 801047a6: 89 e5 mov %esp,%ebp 801047a8: 83 ec 28 sub $0x28,%esp // struct proc *p; int fd; if(proc == initproc) 801047ab: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 801047b2: a1 68 b6 10 80 mov 0x8010b668,%eax 801047b7: 39 c2 cmp %eax,%edx 801047b9: 75 0c jne 801047c7 <texit+0x22> panic("init exiting"); 801047bb: c7 04 24 ab 88 10 80 movl $0x801088ab,(%esp) 801047c2: e8 73 bd ff ff call 8010053a <panic> // Close all open files. for(fd = 0; fd < NOFILE; fd++){ 801047c7: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 801047ce: eb 44 jmp 80104814 <texit+0x6f> if(proc->ofile[fd]){ 801047d0: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801047d6: 8b 55 f4 mov -0xc(%ebp),%edx 801047d9: 83 c2 08 add $0x8,%edx 801047dc: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 801047e0: 85 c0 test %eax,%eax 801047e2: 74 2c je 80104810 <texit+0x6b> fileclose(proc->ofile[fd]); 801047e4: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801047ea: 8b 55 f4 mov -0xc(%ebp),%edx 801047ed: 83 c2 08 add $0x8,%edx 801047f0: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 801047f4: 89 04 24 mov %eax,(%esp) 801047f7: e8 ca c7 ff ff call 80100fc6 <fileclose> proc->ofile[fd] = 0; 801047fc: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104802: 8b 55 f4 mov -0xc(%ebp),%edx 80104805: 83 c2 08 add $0x8,%edx 80104808: c7 44 90 08 00 00 00 movl $0x0,0x8(%eax,%edx,4) 8010480f: 00 if(proc == initproc) panic("init exiting"); // Close all open files. for(fd = 0; fd < NOFILE; fd++){ 80104810: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80104814: 83 7d f4 0f cmpl $0xf,-0xc(%ebp) 80104818: 7e b6 jle 801047d0 <texit+0x2b> if(proc->ofile[fd]){ fileclose(proc->ofile[fd]); proc->ofile[fd] = 0; } } iput(proc->cwd); 8010481a: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104820: 8b 40 68 mov 0x68(%eax),%eax 80104823: 89 04 24 mov %eax,(%esp) 80104826: e8 db d1 ff ff call 80101a06 <iput> proc->cwd = 0; 8010482b: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104831: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) acquire(&ptable.lock); 80104838: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 8010483f: e8 a6 06 00 00 call 80104eea <acquire> // Parent might be sleeping in wait(). wakeup1(proc->parent); 80104844: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010484a: 8b 40 14 mov 0x14(%eax),%eax 8010484d: 89 04 24 mov %eax,(%esp) 80104850: e8 ad 03 00 00 call 80104c02 <wakeup1> // if(p->state == ZOMBIE) // wakeup1(initproc); // } // } // Jump into the scheduler, never to return. proc->state = ZOMBIE; 80104855: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010485b: c7 40 0c 05 00 00 00 movl $0x5,0xc(%eax) sched(); 80104862: e8 c7 01 00 00 call 80104a2e <sched> panic("zombie exit"); 80104867: c7 04 24 b8 88 10 80 movl $0x801088b8,(%esp) 8010486e: e8 c7 bc ff ff call 8010053a <panic> 80104873 <wait>: } // Wait for a child process to exit and return its pid. // Return -1 if this process has no children. int wait(void) { 80104873: 55 push %ebp 80104874: 89 e5 mov %esp,%ebp 80104876: 83 ec 28 sub $0x28,%esp struct proc *p; int havekids, pid; acquire(&ptable.lock); 80104879: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104880: e8 65 06 00 00 call 80104eea <acquire> for(;;){ // Scan through table looking for zombie children. havekids = 0; 80104885: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 8010488c: c7 45 f4 74 ff 10 80 movl $0x8010ff74,-0xc(%ebp) 80104893: e9 ab 00 00 00 jmp 80104943 <wait+0xd0> // if(p->parent != proc && p->isthread ==1) if(p->parent != proc) 80104898: 8b 45 f4 mov -0xc(%ebp),%eax 8010489b: 8b 50 14 mov 0x14(%eax),%edx 8010489e: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801048a4: 39 c2 cmp %eax,%edx 801048a6: 74 05 je 801048ad <wait+0x3a> continue; 801048a8: e9 8f 00 00 00 jmp 8010493c <wait+0xc9> havekids = 1; 801048ad: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) if(p->state == ZOMBIE){ 801048b4: 8b 45 f4 mov -0xc(%ebp),%eax 801048b7: 8b 40 0c mov 0xc(%eax),%eax 801048ba: 83 f8 05 cmp $0x5,%eax 801048bd: 75 7d jne 8010493c <wait+0xc9> // Found one. pid = p->pid; 801048bf: 8b 45 f4 mov -0xc(%ebp),%eax 801048c2: 8b 40 10 mov 0x10(%eax),%eax 801048c5: 89 45 ec mov %eax,-0x14(%ebp) kfree(p->kstack); 801048c8: 8b 45 f4 mov -0xc(%ebp),%eax 801048cb: 8b 40 08 mov 0x8(%eax),%eax 801048ce: 89 04 24 mov %eax,(%esp) 801048d1: e8 6b e1 ff ff call 80102a41 <kfree> p->kstack = 0; 801048d6: 8b 45 f4 mov -0xc(%ebp),%eax 801048d9: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) if(p->isthread != 1){ 801048e0: 8b 45 f4 mov -0xc(%ebp),%eax 801048e3: 8b 80 80 00 00 00 mov 0x80(%eax),%eax 801048e9: 83 f8 01 cmp $0x1,%eax 801048ec: 74 0e je 801048fc <wait+0x89> freevm(p->pgdir); 801048ee: 8b 45 f4 mov -0xc(%ebp),%eax 801048f1: 8b 40 04 mov 0x4(%eax),%eax 801048f4: 89 04 24 mov %eax,(%esp) 801048f7: e8 a3 39 00 00 call 8010829f <freevm> } p->state = UNUSED; 801048fc: 8b 45 f4 mov -0xc(%ebp),%eax 801048ff: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) p->pid = 0; 80104906: 8b 45 f4 mov -0xc(%ebp),%eax 80104909: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) p->parent = 0; 80104910: 8b 45 f4 mov -0xc(%ebp),%eax 80104913: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) p->name[0] = 0; 8010491a: 8b 45 f4 mov -0xc(%ebp),%eax 8010491d: c6 40 6c 00 movb $0x0,0x6c(%eax) p->killed = 0; 80104921: 8b 45 f4 mov -0xc(%ebp),%eax 80104924: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) release(&ptable.lock); 8010492b: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104932: e8 15 06 00 00 call 80104f4c <release> return pid; 80104937: 8b 45 ec mov -0x14(%ebp),%eax 8010493a: eb 55 jmp 80104991 <wait+0x11e> acquire(&ptable.lock); for(;;){ // Scan through table looking for zombie children. havekids = 0; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 8010493c: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp) 80104943: 81 7d f4 74 20 11 80 cmpl $0x80112074,-0xc(%ebp) 8010494a: 0f 82 48 ff ff ff jb 80104898 <wait+0x25> return pid; } } // No point waiting if we don't have any children. if(!havekids || proc->killed){ 80104950: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80104954: 74 0d je 80104963 <wait+0xf0> 80104956: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010495c: 8b 40 24 mov 0x24(%eax),%eax 8010495f: 85 c0 test %eax,%eax 80104961: 74 13 je 80104976 <wait+0x103> release(&ptable.lock); 80104963: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 8010496a: e8 dd 05 00 00 call 80104f4c <release> return -1; 8010496f: b8 ff ff ff ff mov $0xffffffff,%eax 80104974: eb 1b jmp 80104991 <wait+0x11e> } // Wait for children to exit. (See wakeup1 call in proc_exit.) sleep(proc, &ptable.lock); //DOC: wait-sleep 80104976: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010497c: c7 44 24 04 40 ff 10 movl $0x8010ff40,0x4(%esp) 80104983: 80 80104984: 89 04 24 mov %eax,(%esp) 80104987: e8 db 01 00 00 call 80104b67 <sleep> } 8010498c: e9 f4 fe ff ff jmp 80104885 <wait+0x12> } 80104991: c9 leave 80104992: c3 ret 80104993 <scheduler>: // - swtch to start running that process // - eventually that process transfers control // via swtch back to the scheduler. void scheduler(void) { 80104993: 55 push %ebp 80104994: 89 e5 mov %esp,%ebp 80104996: 83 ec 28 sub $0x28,%esp struct proc *p; for(;;){ // Enable interrupts on this processor. sti(); 80104999: e8 ee f5 ff ff call 80103f8c <sti> // Loop over process table looking for process to run. acquire(&ptable.lock); 8010499e: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 801049a5: e8 40 05 00 00 call 80104eea <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801049aa: c7 45 f4 74 ff 10 80 movl $0x8010ff74,-0xc(%ebp) 801049b1: eb 61 jmp 80104a14 <scheduler+0x81> if(p->state != RUNNABLE) 801049b3: 8b 45 f4 mov -0xc(%ebp),%eax 801049b6: 8b 40 0c mov 0xc(%eax),%eax 801049b9: 83 f8 03 cmp $0x3,%eax 801049bc: 74 02 je 801049c0 <scheduler+0x2d> continue; 801049be: eb 4d jmp 80104a0d <scheduler+0x7a> // Switch to chosen process. It is the process's job // to release ptable.lock and then reacquire it // before jumping back to us. proc = p; 801049c0: 8b 45 f4 mov -0xc(%ebp),%eax 801049c3: 65 a3 04 00 00 00 mov %eax,%gs:0x4 switchuvm(p); 801049c9: 8b 45 f4 mov -0xc(%ebp),%eax 801049cc: 89 04 24 mov %eax,(%esp) 801049cf: e8 58 34 00 00 call 80107e2c <switchuvm> p->state = RUNNING; 801049d4: 8b 45 f4 mov -0xc(%ebp),%eax 801049d7: c7 40 0c 04 00 00 00 movl $0x4,0xc(%eax) swtch(&cpu->scheduler, proc->context); 801049de: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801049e4: 8b 40 1c mov 0x1c(%eax),%eax 801049e7: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 801049ee: 83 c2 04 add $0x4,%edx 801049f1: 89 44 24 04 mov %eax,0x4(%esp) 801049f5: 89 14 24 mov %edx,(%esp) 801049f8: e8 d2 09 00 00 call 801053cf <swtch> switchkvm(); 801049fd: e8 0d 34 00 00 call 80107e0f <switchkvm> // Process is done running for now. // It should have changed its p->state before coming back. proc = 0; 80104a02: 65 c7 05 04 00 00 00 movl $0x0,%gs:0x4 80104a09: 00 00 00 00 // Enable interrupts on this processor. sti(); // Loop over process table looking for process to run. acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104a0d: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp) 80104a14: 81 7d f4 74 20 11 80 cmpl $0x80112074,-0xc(%ebp) 80104a1b: 72 96 jb 801049b3 <scheduler+0x20> // Process is done running for now. // It should have changed its p->state before coming back. proc = 0; } release(&ptable.lock); 80104a1d: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104a24: e8 23 05 00 00 call 80104f4c <release> } 80104a29: e9 6b ff ff ff jmp 80104999 <scheduler+0x6> 80104a2e <sched>: // Enter scheduler. Must hold only ptable.lock // and have changed proc->state. void sched(void) { 80104a2e: 55 push %ebp 80104a2f: 89 e5 mov %esp,%ebp 80104a31: 83 ec 28 sub $0x28,%esp int intena; if(!holding(&ptable.lock)) 80104a34: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104a3b: e8 d4 05 00 00 call 80105014 <holding> 80104a40: 85 c0 test %eax,%eax 80104a42: 75 0c jne 80104a50 <sched+0x22> panic("sched ptable.lock"); 80104a44: c7 04 24 c4 88 10 80 movl $0x801088c4,(%esp) 80104a4b: e8 ea ba ff ff call 8010053a <panic> if(cpu->ncli != 1){ 80104a50: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80104a56: 8b 80 ac 00 00 00 mov 0xac(%eax),%eax 80104a5c: 83 f8 01 cmp $0x1,%eax 80104a5f: 74 35 je 80104a96 <sched+0x68> cprintf("current proc %d\n cpu->ncli %d\n",proc->pid,cpu->ncli); 80104a61: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80104a67: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx 80104a6d: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104a73: 8b 40 10 mov 0x10(%eax),%eax 80104a76: 89 54 24 08 mov %edx,0x8(%esp) 80104a7a: 89 44 24 04 mov %eax,0x4(%esp) 80104a7e: c7 04 24 d8 88 10 80 movl $0x801088d8,(%esp) 80104a85: e8 16 b9 ff ff call 801003a0 <cprintf> panic("sched locks"); 80104a8a: c7 04 24 f7 88 10 80 movl $0x801088f7,(%esp) 80104a91: e8 a4 ba ff ff call 8010053a <panic> } if(proc->state == RUNNING) 80104a96: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104a9c: 8b 40 0c mov 0xc(%eax),%eax 80104a9f: 83 f8 04 cmp $0x4,%eax 80104aa2: 75 0c jne 80104ab0 <sched+0x82> panic("sched running"); 80104aa4: c7 04 24 03 89 10 80 movl $0x80108903,(%esp) 80104aab: e8 8a ba ff ff call 8010053a <panic> if(readeflags()&FL_IF) 80104ab0: e8 c7 f4 ff ff call 80103f7c <readeflags> 80104ab5: 25 00 02 00 00 and $0x200,%eax 80104aba: 85 c0 test %eax,%eax 80104abc: 74 0c je 80104aca <sched+0x9c> panic("sched interruptible"); 80104abe: c7 04 24 11 89 10 80 movl $0x80108911,(%esp) 80104ac5: e8 70 ba ff ff call 8010053a <panic> intena = cpu->intena; 80104aca: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80104ad0: 8b 80 b0 00 00 00 mov 0xb0(%eax),%eax 80104ad6: 89 45 f4 mov %eax,-0xc(%ebp) swtch(&proc->context, cpu->scheduler); 80104ad9: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80104adf: 8b 40 04 mov 0x4(%eax),%eax 80104ae2: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 80104ae9: 83 c2 1c add $0x1c,%edx 80104aec: 89 44 24 04 mov %eax,0x4(%esp) 80104af0: 89 14 24 mov %edx,(%esp) 80104af3: e8 d7 08 00 00 call 801053cf <swtch> cpu->intena = intena; 80104af8: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80104afe: 8b 55 f4 mov -0xc(%ebp),%edx 80104b01: 89 90 b0 00 00 00 mov %edx,0xb0(%eax) } 80104b07: c9 leave 80104b08: c3 ret 80104b09 <yield>: // Give up the CPU for one scheduling round. void yield(void) { 80104b09: 55 push %ebp 80104b0a: 89 e5 mov %esp,%ebp 80104b0c: 83 ec 18 sub $0x18,%esp acquire(&ptable.lock); //DOC: yieldlock 80104b0f: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104b16: e8 cf 03 00 00 call 80104eea <acquire> proc->state = RUNNABLE; 80104b1b: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104b21: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) sched(); 80104b28: e8 01 ff ff ff call 80104a2e <sched> release(&ptable.lock); 80104b2d: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104b34: e8 13 04 00 00 call 80104f4c <release> } 80104b39: c9 leave 80104b3a: c3 ret 80104b3b <forkret>: // A fork child's very first scheduling by scheduler() // will swtch here. "Return" to user space. void forkret(void) { 80104b3b: 55 push %ebp 80104b3c: 89 e5 mov %esp,%ebp 80104b3e: 83 ec 18 sub $0x18,%esp static int first = 1; // Still holding ptable.lock from scheduler. release(&ptable.lock); 80104b41: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104b48: e8 ff 03 00 00 call 80104f4c <release> if (first) { 80104b4d: a1 08 b0 10 80 mov 0x8010b008,%eax 80104b52: 85 c0 test %eax,%eax 80104b54: 74 0f je 80104b65 <forkret+0x2a> // Some initialization functions must be run in the context // of a regular process (e.g., they call sleep), and thus cannot // be run from main(). first = 0; 80104b56: c7 05 08 b0 10 80 00 movl $0x0,0x8010b008 80104b5d: 00 00 00 initlog(); 80104b60: e8 6a e4 ff ff call 80102fcf <initlog> } // Return to "caller", actually trapret (see allocproc). } 80104b65: c9 leave 80104b66: c3 ret 80104b67 <sleep>: // Atomically release lock and sleep on chan. // Reacquires lock when awakened. void sleep(void *chan, struct spinlock *lk) { 80104b67: 55 push %ebp 80104b68: 89 e5 mov %esp,%ebp 80104b6a: 83 ec 18 sub $0x18,%esp if(proc == 0) 80104b6d: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104b73: 85 c0 test %eax,%eax 80104b75: 75 0c jne 80104b83 <sleep+0x1c> panic("sleep"); 80104b77: c7 04 24 25 89 10 80 movl $0x80108925,(%esp) 80104b7e: e8 b7 b9 ff ff call 8010053a <panic> if(lk == 0) 80104b83: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 80104b87: 75 0c jne 80104b95 <sleep+0x2e> panic("sleep without lk"); 80104b89: c7 04 24 2b 89 10 80 movl $0x8010892b,(%esp) 80104b90: e8 a5 b9 ff ff call 8010053a <panic> // change p->state and then call sched. // Once we hold ptable.lock, we can be // guaranteed that we won't miss any wakeup // (wakeup runs with ptable.lock locked), // so it's okay to release lk. if(lk != &ptable.lock){ //DOC: sleeplock0 80104b95: 81 7d 0c 40 ff 10 80 cmpl $0x8010ff40,0xc(%ebp) 80104b9c: 74 17 je 80104bb5 <sleep+0x4e> acquire(&ptable.lock); //DOC: sleeplock1 80104b9e: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104ba5: e8 40 03 00 00 call 80104eea <acquire> release(lk); 80104baa: 8b 45 0c mov 0xc(%ebp),%eax 80104bad: 89 04 24 mov %eax,(%esp) 80104bb0: e8 97 03 00 00 call 80104f4c <release> } // Go to sleep. proc->chan = chan; 80104bb5: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104bbb: 8b 55 08 mov 0x8(%ebp),%edx 80104bbe: 89 50 20 mov %edx,0x20(%eax) proc->state = SLEEPING; 80104bc1: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104bc7: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax) sched(); 80104bce: e8 5b fe ff ff call 80104a2e <sched> // Tidy up. proc->chan = 0; 80104bd3: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104bd9: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) // Reacquire original lock. if(lk != &ptable.lock){ //DOC: sleeplock2 80104be0: 81 7d 0c 40 ff 10 80 cmpl $0x8010ff40,0xc(%ebp) 80104be7: 74 17 je 80104c00 <sleep+0x99> release(&ptable.lock); 80104be9: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104bf0: e8 57 03 00 00 call 80104f4c <release> acquire(lk); 80104bf5: 8b 45 0c mov 0xc(%ebp),%eax 80104bf8: 89 04 24 mov %eax,(%esp) 80104bfb: e8 ea 02 00 00 call 80104eea <acquire> } } 80104c00: c9 leave 80104c01: c3 ret 80104c02 <wakeup1>: //PAGEBREAK! // Wake up all processes sleeping on chan. // The ptable lock must be held. static void wakeup1(void *chan) { 80104c02: 55 push %ebp 80104c03: 89 e5 mov %esp,%ebp 80104c05: 83 ec 10 sub $0x10,%esp struct proc *p; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80104c08: c7 45 fc 74 ff 10 80 movl $0x8010ff74,-0x4(%ebp) 80104c0f: eb 27 jmp 80104c38 <wakeup1+0x36> if(p->state == SLEEPING && p->chan == chan) 80104c11: 8b 45 fc mov -0x4(%ebp),%eax 80104c14: 8b 40 0c mov 0xc(%eax),%eax 80104c17: 83 f8 02 cmp $0x2,%eax 80104c1a: 75 15 jne 80104c31 <wakeup1+0x2f> 80104c1c: 8b 45 fc mov -0x4(%ebp),%eax 80104c1f: 8b 40 20 mov 0x20(%eax),%eax 80104c22: 3b 45 08 cmp 0x8(%ebp),%eax 80104c25: 75 0a jne 80104c31 <wakeup1+0x2f> p->state = RUNNABLE; 80104c27: 8b 45 fc mov -0x4(%ebp),%eax 80104c2a: 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++) 80104c31: 81 45 fc 84 00 00 00 addl $0x84,-0x4(%ebp) 80104c38: 81 7d fc 74 20 11 80 cmpl $0x80112074,-0x4(%ebp) 80104c3f: 72 d0 jb 80104c11 <wakeup1+0xf> if(p->state == SLEEPING && p->chan == chan) p->state = RUNNABLE; } 80104c41: c9 leave 80104c42: c3 ret 80104c43 <twakeup>: void twakeup(int tid){ 80104c43: 55 push %ebp 80104c44: 89 e5 mov %esp,%ebp 80104c46: 83 ec 28 sub $0x28,%esp struct proc *p; acquire(&ptable.lock); 80104c49: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104c50: e8 95 02 00 00 call 80104eea <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104c55: c7 45 f4 74 ff 10 80 movl $0x8010ff74,-0xc(%ebp) 80104c5c: eb 36 jmp 80104c94 <twakeup+0x51> if(p->state == SLEEPING && p->pid == tid && p->isthread == 1){ 80104c5e: 8b 45 f4 mov -0xc(%ebp),%eax 80104c61: 8b 40 0c mov 0xc(%eax),%eax 80104c64: 83 f8 02 cmp $0x2,%eax 80104c67: 75 24 jne 80104c8d <twakeup+0x4a> 80104c69: 8b 45 f4 mov -0xc(%ebp),%eax 80104c6c: 8b 40 10 mov 0x10(%eax),%eax 80104c6f: 3b 45 08 cmp 0x8(%ebp),%eax 80104c72: 75 19 jne 80104c8d <twakeup+0x4a> 80104c74: 8b 45 f4 mov -0xc(%ebp),%eax 80104c77: 8b 80 80 00 00 00 mov 0x80(%eax),%eax 80104c7d: 83 f8 01 cmp $0x1,%eax 80104c80: 75 0b jne 80104c8d <twakeup+0x4a> wakeup1(p); 80104c82: 8b 45 f4 mov -0xc(%ebp),%eax 80104c85: 89 04 24 mov %eax,(%esp) 80104c88: e8 75 ff ff ff call 80104c02 <wakeup1> void twakeup(int tid){ struct proc *p; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104c8d: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp) 80104c94: 81 7d f4 74 20 11 80 cmpl $0x80112074,-0xc(%ebp) 80104c9b: 72 c1 jb 80104c5e <twakeup+0x1b> if(p->state == SLEEPING && p->pid == tid && p->isthread == 1){ wakeup1(p); } } release(&ptable.lock); 80104c9d: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104ca4: e8 a3 02 00 00 call 80104f4c <release> } 80104ca9: c9 leave 80104caa: c3 ret 80104cab <wakeup>: // Wake up all processes sleeping on chan. void wakeup(void *chan) { 80104cab: 55 push %ebp 80104cac: 89 e5 mov %esp,%ebp 80104cae: 83 ec 18 sub $0x18,%esp acquire(&ptable.lock); 80104cb1: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104cb8: e8 2d 02 00 00 call 80104eea <acquire> wakeup1(chan); 80104cbd: 8b 45 08 mov 0x8(%ebp),%eax 80104cc0: 89 04 24 mov %eax,(%esp) 80104cc3: e8 3a ff ff ff call 80104c02 <wakeup1> release(&ptable.lock); 80104cc8: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104ccf: e8 78 02 00 00 call 80104f4c <release> } 80104cd4: c9 leave 80104cd5: c3 ret 80104cd6 <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) { 80104cd6: 55 push %ebp 80104cd7: 89 e5 mov %esp,%ebp 80104cd9: 83 ec 28 sub $0x28,%esp struct proc *p; acquire(&ptable.lock); 80104cdc: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104ce3: e8 02 02 00 00 call 80104eea <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104ce8: c7 45 f4 74 ff 10 80 movl $0x8010ff74,-0xc(%ebp) 80104cef: eb 44 jmp 80104d35 <kill+0x5f> if(p->pid == pid){ 80104cf1: 8b 45 f4 mov -0xc(%ebp),%eax 80104cf4: 8b 40 10 mov 0x10(%eax),%eax 80104cf7: 3b 45 08 cmp 0x8(%ebp),%eax 80104cfa: 75 32 jne 80104d2e <kill+0x58> p->killed = 1; 80104cfc: 8b 45 f4 mov -0xc(%ebp),%eax 80104cff: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) // Wake process from sleep if necessary. if(p->state == SLEEPING) 80104d06: 8b 45 f4 mov -0xc(%ebp),%eax 80104d09: 8b 40 0c mov 0xc(%eax),%eax 80104d0c: 83 f8 02 cmp $0x2,%eax 80104d0f: 75 0a jne 80104d1b <kill+0x45> p->state = RUNNABLE; 80104d11: 8b 45 f4 mov -0xc(%ebp),%eax 80104d14: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) release(&ptable.lock); 80104d1b: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104d22: e8 25 02 00 00 call 80104f4c <release> return 0; 80104d27: b8 00 00 00 00 mov $0x0,%eax 80104d2c: eb 21 jmp 80104d4f <kill+0x79> kill(int pid) { struct proc *p; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104d2e: 81 45 f4 84 00 00 00 addl $0x84,-0xc(%ebp) 80104d35: 81 7d f4 74 20 11 80 cmpl $0x80112074,-0xc(%ebp) 80104d3c: 72 b3 jb 80104cf1 <kill+0x1b> p->state = RUNNABLE; release(&ptable.lock); return 0; } } release(&ptable.lock); 80104d3e: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104d45: e8 02 02 00 00 call 80104f4c <release> return -1; 80104d4a: b8 ff ff ff ff mov $0xffffffff,%eax } 80104d4f: c9 leave 80104d50: c3 ret 80104d51 <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) { 80104d51: 55 push %ebp 80104d52: 89 e5 mov %esp,%ebp 80104d54: 83 ec 58 sub $0x58,%esp int i; struct proc *p; char *state; uint pc[10]; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104d57: c7 45 f0 74 ff 10 80 movl $0x8010ff74,-0x10(%ebp) 80104d5e: e9 d9 00 00 00 jmp 80104e3c <procdump+0xeb> if(p->state == UNUSED) 80104d63: 8b 45 f0 mov -0x10(%ebp),%eax 80104d66: 8b 40 0c mov 0xc(%eax),%eax 80104d69: 85 c0 test %eax,%eax 80104d6b: 75 05 jne 80104d72 <procdump+0x21> continue; 80104d6d: e9 c3 00 00 00 jmp 80104e35 <procdump+0xe4> if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) 80104d72: 8b 45 f0 mov -0x10(%ebp),%eax 80104d75: 8b 40 0c mov 0xc(%eax),%eax 80104d78: 83 f8 05 cmp $0x5,%eax 80104d7b: 77 23 ja 80104da0 <procdump+0x4f> 80104d7d: 8b 45 f0 mov -0x10(%ebp),%eax 80104d80: 8b 40 0c mov 0xc(%eax),%eax 80104d83: 8b 04 85 0c b0 10 80 mov -0x7fef4ff4(,%eax,4),%eax 80104d8a: 85 c0 test %eax,%eax 80104d8c: 74 12 je 80104da0 <procdump+0x4f> state = states[p->state]; 80104d8e: 8b 45 f0 mov -0x10(%ebp),%eax 80104d91: 8b 40 0c mov 0xc(%eax),%eax 80104d94: 8b 04 85 0c b0 10 80 mov -0x7fef4ff4(,%eax,4),%eax 80104d9b: 89 45 ec mov %eax,-0x14(%ebp) 80104d9e: eb 07 jmp 80104da7 <procdump+0x56> else state = "???"; 80104da0: c7 45 ec 3c 89 10 80 movl $0x8010893c,-0x14(%ebp) cprintf("%d %s %s", p->pid, state, p->name); 80104da7: 8b 45 f0 mov -0x10(%ebp),%eax 80104daa: 8d 50 6c lea 0x6c(%eax),%edx 80104dad: 8b 45 f0 mov -0x10(%ebp),%eax 80104db0: 8b 40 10 mov 0x10(%eax),%eax 80104db3: 89 54 24 0c mov %edx,0xc(%esp) 80104db7: 8b 55 ec mov -0x14(%ebp),%edx 80104dba: 89 54 24 08 mov %edx,0x8(%esp) 80104dbe: 89 44 24 04 mov %eax,0x4(%esp) 80104dc2: c7 04 24 40 89 10 80 movl $0x80108940,(%esp) 80104dc9: e8 d2 b5 ff ff call 801003a0 <cprintf> if(p->state == SLEEPING){ 80104dce: 8b 45 f0 mov -0x10(%ebp),%eax 80104dd1: 8b 40 0c mov 0xc(%eax),%eax 80104dd4: 83 f8 02 cmp $0x2,%eax 80104dd7: 75 50 jne 80104e29 <procdump+0xd8> getcallerpcs((uint*)p->context->ebp+2, pc); 80104dd9: 8b 45 f0 mov -0x10(%ebp),%eax 80104ddc: 8b 40 1c mov 0x1c(%eax),%eax 80104ddf: 8b 40 0c mov 0xc(%eax),%eax 80104de2: 83 c0 08 add $0x8,%eax 80104de5: 8d 55 c4 lea -0x3c(%ebp),%edx 80104de8: 89 54 24 04 mov %edx,0x4(%esp) 80104dec: 89 04 24 mov %eax,(%esp) 80104def: e8 a7 01 00 00 call 80104f9b <getcallerpcs> for(i=0; i<10 && pc[i] != 0; i++) 80104df4: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80104dfb: eb 1b jmp 80104e18 <procdump+0xc7> cprintf(" %p", pc[i]); 80104dfd: 8b 45 f4 mov -0xc(%ebp),%eax 80104e00: 8b 44 85 c4 mov -0x3c(%ebp,%eax,4),%eax 80104e04: 89 44 24 04 mov %eax,0x4(%esp) 80104e08: c7 04 24 49 89 10 80 movl $0x80108949,(%esp) 80104e0f: e8 8c b5 ff ff call 801003a0 <cprintf> else state = "???"; cprintf("%d %s %s", p->pid, state, p->name); if(p->state == SLEEPING){ getcallerpcs((uint*)p->context->ebp+2, pc); for(i=0; i<10 && pc[i] != 0; i++) 80104e14: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80104e18: 83 7d f4 09 cmpl $0x9,-0xc(%ebp) 80104e1c: 7f 0b jg 80104e29 <procdump+0xd8> 80104e1e: 8b 45 f4 mov -0xc(%ebp),%eax 80104e21: 8b 44 85 c4 mov -0x3c(%ebp,%eax,4),%eax 80104e25: 85 c0 test %eax,%eax 80104e27: 75 d4 jne 80104dfd <procdump+0xac> cprintf(" %p", pc[i]); } cprintf("\n"); 80104e29: c7 04 24 4d 89 10 80 movl $0x8010894d,(%esp) 80104e30: e8 6b b5 ff ff call 801003a0 <cprintf> int i; struct proc *p; char *state; uint pc[10]; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80104e35: 81 45 f0 84 00 00 00 addl $0x84,-0x10(%ebp) 80104e3c: 81 7d f0 74 20 11 80 cmpl $0x80112074,-0x10(%ebp) 80104e43: 0f 82 1a ff ff ff jb 80104d63 <procdump+0x12> for(i=0; i<10 && pc[i] != 0; i++) cprintf(" %p", pc[i]); } cprintf("\n"); } } 80104e49: c9 leave 80104e4a: c3 ret 80104e4b <tsleep>: void tsleep(void){ 80104e4b: 55 push %ebp 80104e4c: 89 e5 mov %esp,%ebp 80104e4e: 83 ec 18 sub $0x18,%esp acquire(&ptable.lock); 80104e51: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104e58: e8 8d 00 00 00 call 80104eea <acquire> sleep(proc, &ptable.lock); 80104e5d: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80104e63: c7 44 24 04 40 ff 10 movl $0x8010ff40,0x4(%esp) 80104e6a: 80 80104e6b: 89 04 24 mov %eax,(%esp) 80104e6e: e8 f4 fc ff ff call 80104b67 <sleep> release(&ptable.lock); 80104e73: c7 04 24 40 ff 10 80 movl $0x8010ff40,(%esp) 80104e7a: e8 cd 00 00 00 call 80104f4c <release> } 80104e7f: c9 leave 80104e80: c3 ret 80104e81 <test>: void test(int function){ 80104e81: 55 push %ebp 80104e82: 89 e5 mov %esp,%ebp 80104e84: 83 ec 18 sub $0x18,%esp panic("Gone Wrong NOOB"); 80104e87: c7 04 24 4f 89 10 80 movl $0x8010894f,(%esp) 80104e8e: e8 a7 b6 ff ff call 8010053a <panic> 80104e93 <readeflags>: asm volatile("ltr %0" : : "r" (sel)); } static inline uint readeflags(void) { 80104e93: 55 push %ebp 80104e94: 89 e5 mov %esp,%ebp 80104e96: 83 ec 10 sub $0x10,%esp uint eflags; asm volatile("pushfl; popl %0" : "=r" (eflags)); 80104e99: 9c pushf 80104e9a: 58 pop %eax 80104e9b: 89 45 fc mov %eax,-0x4(%ebp) return eflags; 80104e9e: 8b 45 fc mov -0x4(%ebp),%eax } 80104ea1: c9 leave 80104ea2: c3 ret 80104ea3 <cli>: asm volatile("movw %0, %%gs" : : "r" (v)); } static inline void cli(void) { 80104ea3: 55 push %ebp 80104ea4: 89 e5 mov %esp,%ebp asm volatile("cli"); 80104ea6: fa cli } 80104ea7: 5d pop %ebp 80104ea8: c3 ret 80104ea9 <sti>: static inline void sti(void) { 80104ea9: 55 push %ebp 80104eaa: 89 e5 mov %esp,%ebp asm volatile("sti"); 80104eac: fb sti } 80104ead: 5d pop %ebp 80104eae: c3 ret 80104eaf <xchg>: static inline uint xchg(volatile uint *addr, uint newval) { 80104eaf: 55 push %ebp 80104eb0: 89 e5 mov %esp,%ebp 80104eb2: 83 ec 10 sub $0x10,%esp uint result; // The + in "+m" denotes a read-modify-write operand. asm volatile("lock; xchgl %0, %1" : 80104eb5: 8b 55 08 mov 0x8(%ebp),%edx 80104eb8: 8b 45 0c mov 0xc(%ebp),%eax 80104ebb: 8b 4d 08 mov 0x8(%ebp),%ecx 80104ebe: f0 87 02 lock xchg %eax,(%edx) 80104ec1: 89 45 fc mov %eax,-0x4(%ebp) "+m" (*addr), "=a" (result) : "1" (newval) : "cc"); return result; 80104ec4: 8b 45 fc mov -0x4(%ebp),%eax } 80104ec7: c9 leave 80104ec8: c3 ret 80104ec9 <initlock>: #include "proc.h" #include "spinlock.h" void initlock(struct spinlock *lk, char *name) { 80104ec9: 55 push %ebp 80104eca: 89 e5 mov %esp,%ebp lk->name = name; 80104ecc: 8b 45 08 mov 0x8(%ebp),%eax 80104ecf: 8b 55 0c mov 0xc(%ebp),%edx 80104ed2: 89 50 04 mov %edx,0x4(%eax) lk->locked = 0; 80104ed5: 8b 45 08 mov 0x8(%ebp),%eax 80104ed8: c7 00 00 00 00 00 movl $0x0,(%eax) lk->cpu = 0; 80104ede: 8b 45 08 mov 0x8(%ebp),%eax 80104ee1: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) } 80104ee8: 5d pop %ebp 80104ee9: c3 ret 80104eea <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) { 80104eea: 55 push %ebp 80104eeb: 89 e5 mov %esp,%ebp 80104eed: 83 ec 18 sub $0x18,%esp pushcli(); // disable interrupts to avoid deadlock. 80104ef0: e8 49 01 00 00 call 8010503e <pushcli> if(holding(lk)) 80104ef5: 8b 45 08 mov 0x8(%ebp),%eax 80104ef8: 89 04 24 mov %eax,(%esp) 80104efb: e8 14 01 00 00 call 80105014 <holding> 80104f00: 85 c0 test %eax,%eax 80104f02: 74 0c je 80104f10 <acquire+0x26> panic("acquire"); 80104f04: c7 04 24 89 89 10 80 movl $0x80108989,(%esp) 80104f0b: e8 2a b6 ff ff call 8010053a <panic> // The xchg is atomic. // It also serializes, so that reads after acquire are not // reordered before it. while(xchg(&lk->locked, 1) != 0) 80104f10: 90 nop 80104f11: 8b 45 08 mov 0x8(%ebp),%eax 80104f14: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80104f1b: 00 80104f1c: 89 04 24 mov %eax,(%esp) 80104f1f: e8 8b ff ff ff call 80104eaf <xchg> 80104f24: 85 c0 test %eax,%eax 80104f26: 75 e9 jne 80104f11 <acquire+0x27> ; // Record info about lock acquisition for debugging. lk->cpu = cpu; 80104f28: 8b 45 08 mov 0x8(%ebp),%eax 80104f2b: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 80104f32: 89 50 08 mov %edx,0x8(%eax) getcallerpcs(&lk, lk->pcs); 80104f35: 8b 45 08 mov 0x8(%ebp),%eax 80104f38: 83 c0 0c add $0xc,%eax 80104f3b: 89 44 24 04 mov %eax,0x4(%esp) 80104f3f: 8d 45 08 lea 0x8(%ebp),%eax 80104f42: 89 04 24 mov %eax,(%esp) 80104f45: e8 51 00 00 00 call 80104f9b <getcallerpcs> } 80104f4a: c9 leave 80104f4b: c3 ret 80104f4c <release>: // Release the lock. void release(struct spinlock *lk) { 80104f4c: 55 push %ebp 80104f4d: 89 e5 mov %esp,%ebp 80104f4f: 83 ec 18 sub $0x18,%esp if(!holding(lk)) 80104f52: 8b 45 08 mov 0x8(%ebp),%eax 80104f55: 89 04 24 mov %eax,(%esp) 80104f58: e8 b7 00 00 00 call 80105014 <holding> 80104f5d: 85 c0 test %eax,%eax 80104f5f: 75 0c jne 80104f6d <release+0x21> panic("release"); 80104f61: c7 04 24 91 89 10 80 movl $0x80108991,(%esp) 80104f68: e8 cd b5 ff ff call 8010053a <panic> lk->pcs[0] = 0; 80104f6d: 8b 45 08 mov 0x8(%ebp),%eax 80104f70: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) lk->cpu = 0; 80104f77: 8b 45 08 mov 0x8(%ebp),%eax 80104f7a: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) // But the 2007 Intel 64 Architecture Memory Ordering White // Paper says that Intel 64 and IA-32 will not move a load // after a store. So lock->locked = 0 would work here. // The xchg being asm volatile ensures gcc emits it after // the above assignments (and after the critical section). xchg(&lk->locked, 0); 80104f81: 8b 45 08 mov 0x8(%ebp),%eax 80104f84: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80104f8b: 00 80104f8c: 89 04 24 mov %eax,(%esp) 80104f8f: e8 1b ff ff ff call 80104eaf <xchg> popcli(); 80104f94: e8 e9 00 00 00 call 80105082 <popcli> } 80104f99: c9 leave 80104f9a: c3 ret 80104f9b <getcallerpcs>: // Record the current call stack in pcs[] by following the %ebp chain. void getcallerpcs(void *v, uint pcs[]) { 80104f9b: 55 push %ebp 80104f9c: 89 e5 mov %esp,%ebp 80104f9e: 83 ec 10 sub $0x10,%esp uint *ebp; int i; ebp = (uint*)v - 2; 80104fa1: 8b 45 08 mov 0x8(%ebp),%eax 80104fa4: 83 e8 08 sub $0x8,%eax 80104fa7: 89 45 fc mov %eax,-0x4(%ebp) for(i = 0; i < 10; i++){ 80104faa: c7 45 f8 00 00 00 00 movl $0x0,-0x8(%ebp) 80104fb1: eb 38 jmp 80104feb <getcallerpcs+0x50> if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) 80104fb3: 83 7d fc 00 cmpl $0x0,-0x4(%ebp) 80104fb7: 74 38 je 80104ff1 <getcallerpcs+0x56> 80104fb9: 81 7d fc ff ff ff 7f cmpl $0x7fffffff,-0x4(%ebp) 80104fc0: 76 2f jbe 80104ff1 <getcallerpcs+0x56> 80104fc2: 83 7d fc ff cmpl $0xffffffff,-0x4(%ebp) 80104fc6: 74 29 je 80104ff1 <getcallerpcs+0x56> break; pcs[i] = ebp[1]; // saved %eip 80104fc8: 8b 45 f8 mov -0x8(%ebp),%eax 80104fcb: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80104fd2: 8b 45 0c mov 0xc(%ebp),%eax 80104fd5: 01 c2 add %eax,%edx 80104fd7: 8b 45 fc mov -0x4(%ebp),%eax 80104fda: 8b 40 04 mov 0x4(%eax),%eax 80104fdd: 89 02 mov %eax,(%edx) ebp = (uint*)ebp[0]; // saved %ebp 80104fdf: 8b 45 fc mov -0x4(%ebp),%eax 80104fe2: 8b 00 mov (%eax),%eax 80104fe4: 89 45 fc mov %eax,-0x4(%ebp) { uint *ebp; int i; ebp = (uint*)v - 2; for(i = 0; i < 10; i++){ 80104fe7: 83 45 f8 01 addl $0x1,-0x8(%ebp) 80104feb: 83 7d f8 09 cmpl $0x9,-0x8(%ebp) 80104fef: 7e c2 jle 80104fb3 <getcallerpcs+0x18> if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) break; pcs[i] = ebp[1]; // saved %eip ebp = (uint*)ebp[0]; // saved %ebp } for(; i < 10; i++) 80104ff1: eb 19 jmp 8010500c <getcallerpcs+0x71> pcs[i] = 0; 80104ff3: 8b 45 f8 mov -0x8(%ebp),%eax 80104ff6: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80104ffd: 8b 45 0c mov 0xc(%ebp),%eax 80105000: 01 d0 add %edx,%eax 80105002: c7 00 00 00 00 00 movl $0x0,(%eax) if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) break; pcs[i] = ebp[1]; // saved %eip ebp = (uint*)ebp[0]; // saved %ebp } for(; i < 10; i++) 80105008: 83 45 f8 01 addl $0x1,-0x8(%ebp) 8010500c: 83 7d f8 09 cmpl $0x9,-0x8(%ebp) 80105010: 7e e1 jle 80104ff3 <getcallerpcs+0x58> pcs[i] = 0; } 80105012: c9 leave 80105013: c3 ret 80105014 <holding>: // Check whether this cpu is holding the lock. int holding(struct spinlock *lock) { 80105014: 55 push %ebp 80105015: 89 e5 mov %esp,%ebp return lock->locked && lock->cpu == cpu; 80105017: 8b 45 08 mov 0x8(%ebp),%eax 8010501a: 8b 00 mov (%eax),%eax 8010501c: 85 c0 test %eax,%eax 8010501e: 74 17 je 80105037 <holding+0x23> 80105020: 8b 45 08 mov 0x8(%ebp),%eax 80105023: 8b 50 08 mov 0x8(%eax),%edx 80105026: 65 a1 00 00 00 00 mov %gs:0x0,%eax 8010502c: 39 c2 cmp %eax,%edx 8010502e: 75 07 jne 80105037 <holding+0x23> 80105030: b8 01 00 00 00 mov $0x1,%eax 80105035: eb 05 jmp 8010503c <holding+0x28> 80105037: b8 00 00 00 00 mov $0x0,%eax } 8010503c: 5d pop %ebp 8010503d: c3 ret 8010503e <pushcli>: // it takes two popcli to undo two pushcli. Also, if interrupts // are off, then pushcli, popcli leaves them off. void pushcli(void) { 8010503e: 55 push %ebp 8010503f: 89 e5 mov %esp,%ebp 80105041: 83 ec 10 sub $0x10,%esp int eflags; eflags = readeflags(); 80105044: e8 4a fe ff ff call 80104e93 <readeflags> 80105049: 89 45 fc mov %eax,-0x4(%ebp) cli(); 8010504c: e8 52 fe ff ff call 80104ea3 <cli> if(cpu->ncli++ == 0) 80105051: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 80105058: 8b 82 ac 00 00 00 mov 0xac(%edx),%eax 8010505e: 8d 48 01 lea 0x1(%eax),%ecx 80105061: 89 8a ac 00 00 00 mov %ecx,0xac(%edx) 80105067: 85 c0 test %eax,%eax 80105069: 75 15 jne 80105080 <pushcli+0x42> cpu->intena = eflags & FL_IF; 8010506b: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80105071: 8b 55 fc mov -0x4(%ebp),%edx 80105074: 81 e2 00 02 00 00 and $0x200,%edx 8010507a: 89 90 b0 00 00 00 mov %edx,0xb0(%eax) } 80105080: c9 leave 80105081: c3 ret 80105082 <popcli>: void popcli(void) { 80105082: 55 push %ebp 80105083: 89 e5 mov %esp,%ebp 80105085: 83 ec 18 sub $0x18,%esp if(readeflags()&FL_IF) 80105088: e8 06 fe ff ff call 80104e93 <readeflags> 8010508d: 25 00 02 00 00 and $0x200,%eax 80105092: 85 c0 test %eax,%eax 80105094: 74 0c je 801050a2 <popcli+0x20> panic("popcli - interruptible"); 80105096: c7 04 24 99 89 10 80 movl $0x80108999,(%esp) 8010509d: e8 98 b4 ff ff call 8010053a <panic> if(--cpu->ncli < 0) 801050a2: 65 a1 00 00 00 00 mov %gs:0x0,%eax 801050a8: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx 801050ae: 83 ea 01 sub $0x1,%edx 801050b1: 89 90 ac 00 00 00 mov %edx,0xac(%eax) 801050b7: 8b 80 ac 00 00 00 mov 0xac(%eax),%eax 801050bd: 85 c0 test %eax,%eax 801050bf: 79 0c jns 801050cd <popcli+0x4b> panic("popcli"); 801050c1: c7 04 24 b0 89 10 80 movl $0x801089b0,(%esp) 801050c8: e8 6d b4 ff ff call 8010053a <panic> if(cpu->ncli == 0 && cpu->intena) 801050cd: 65 a1 00 00 00 00 mov %gs:0x0,%eax 801050d3: 8b 80 ac 00 00 00 mov 0xac(%eax),%eax 801050d9: 85 c0 test %eax,%eax 801050db: 75 15 jne 801050f2 <popcli+0x70> 801050dd: 65 a1 00 00 00 00 mov %gs:0x0,%eax 801050e3: 8b 80 b0 00 00 00 mov 0xb0(%eax),%eax 801050e9: 85 c0 test %eax,%eax 801050eb: 74 05 je 801050f2 <popcli+0x70> sti(); 801050ed: e8 b7 fd ff ff call 80104ea9 <sti> } 801050f2: c9 leave 801050f3: c3 ret 801050f4 <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 801050f4: 55 push %ebp 801050f5: 89 e5 mov %esp,%ebp 801050f7: 57 push %edi 801050f8: 53 push %ebx asm volatile("cld; rep stosb" : 801050f9: 8b 4d 08 mov 0x8(%ebp),%ecx 801050fc: 8b 55 10 mov 0x10(%ebp),%edx 801050ff: 8b 45 0c mov 0xc(%ebp),%eax 80105102: 89 cb mov %ecx,%ebx 80105104: 89 df mov %ebx,%edi 80105106: 89 d1 mov %edx,%ecx 80105108: fc cld 80105109: f3 aa rep stos %al,%es:(%edi) 8010510b: 89 ca mov %ecx,%edx 8010510d: 89 fb mov %edi,%ebx 8010510f: 89 5d 08 mov %ebx,0x8(%ebp) 80105112: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 80105115: 5b pop %ebx 80105116: 5f pop %edi 80105117: 5d pop %ebp 80105118: c3 ret 80105119 <stosl>: static inline void stosl(void *addr, int data, int cnt) { 80105119: 55 push %ebp 8010511a: 89 e5 mov %esp,%ebp 8010511c: 57 push %edi 8010511d: 53 push %ebx asm volatile("cld; rep stosl" : 8010511e: 8b 4d 08 mov 0x8(%ebp),%ecx 80105121: 8b 55 10 mov 0x10(%ebp),%edx 80105124: 8b 45 0c mov 0xc(%ebp),%eax 80105127: 89 cb mov %ecx,%ebx 80105129: 89 df mov %ebx,%edi 8010512b: 89 d1 mov %edx,%ecx 8010512d: fc cld 8010512e: f3 ab rep stos %eax,%es:(%edi) 80105130: 89 ca mov %ecx,%edx 80105132: 89 fb mov %edi,%ebx 80105134: 89 5d 08 mov %ebx,0x8(%ebp) 80105137: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 8010513a: 5b pop %ebx 8010513b: 5f pop %edi 8010513c: 5d pop %ebp 8010513d: c3 ret 8010513e <memset>: #include "types.h" #include "x86.h" void* memset(void *dst, int c, uint n) { 8010513e: 55 push %ebp 8010513f: 89 e5 mov %esp,%ebp 80105141: 83 ec 0c sub $0xc,%esp if ((int)dst%4 == 0 && n%4 == 0){ 80105144: 8b 45 08 mov 0x8(%ebp),%eax 80105147: 83 e0 03 and $0x3,%eax 8010514a: 85 c0 test %eax,%eax 8010514c: 75 49 jne 80105197 <memset+0x59> 8010514e: 8b 45 10 mov 0x10(%ebp),%eax 80105151: 83 e0 03 and $0x3,%eax 80105154: 85 c0 test %eax,%eax 80105156: 75 3f jne 80105197 <memset+0x59> c &= 0xFF; 80105158: 81 65 0c ff 00 00 00 andl $0xff,0xc(%ebp) stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4); 8010515f: 8b 45 10 mov 0x10(%ebp),%eax 80105162: c1 e8 02 shr $0x2,%eax 80105165: 89 c2 mov %eax,%edx 80105167: 8b 45 0c mov 0xc(%ebp),%eax 8010516a: c1 e0 18 shl $0x18,%eax 8010516d: 89 c1 mov %eax,%ecx 8010516f: 8b 45 0c mov 0xc(%ebp),%eax 80105172: c1 e0 10 shl $0x10,%eax 80105175: 09 c1 or %eax,%ecx 80105177: 8b 45 0c mov 0xc(%ebp),%eax 8010517a: c1 e0 08 shl $0x8,%eax 8010517d: 09 c8 or %ecx,%eax 8010517f: 0b 45 0c or 0xc(%ebp),%eax 80105182: 89 54 24 08 mov %edx,0x8(%esp) 80105186: 89 44 24 04 mov %eax,0x4(%esp) 8010518a: 8b 45 08 mov 0x8(%ebp),%eax 8010518d: 89 04 24 mov %eax,(%esp) 80105190: e8 84 ff ff ff call 80105119 <stosl> 80105195: eb 19 jmp 801051b0 <memset+0x72> } else stosb(dst, c, n); 80105197: 8b 45 10 mov 0x10(%ebp),%eax 8010519a: 89 44 24 08 mov %eax,0x8(%esp) 8010519e: 8b 45 0c mov 0xc(%ebp),%eax 801051a1: 89 44 24 04 mov %eax,0x4(%esp) 801051a5: 8b 45 08 mov 0x8(%ebp),%eax 801051a8: 89 04 24 mov %eax,(%esp) 801051ab: e8 44 ff ff ff call 801050f4 <stosb> return dst; 801051b0: 8b 45 08 mov 0x8(%ebp),%eax } 801051b3: c9 leave 801051b4: c3 ret 801051b5 <memcmp>: int memcmp(const void *v1, const void *v2, uint n) { 801051b5: 55 push %ebp 801051b6: 89 e5 mov %esp,%ebp 801051b8: 83 ec 10 sub $0x10,%esp const uchar *s1, *s2; s1 = v1; 801051bb: 8b 45 08 mov 0x8(%ebp),%eax 801051be: 89 45 fc mov %eax,-0x4(%ebp) s2 = v2; 801051c1: 8b 45 0c mov 0xc(%ebp),%eax 801051c4: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0){ 801051c7: eb 30 jmp 801051f9 <memcmp+0x44> if(*s1 != *s2) 801051c9: 8b 45 fc mov -0x4(%ebp),%eax 801051cc: 0f b6 10 movzbl (%eax),%edx 801051cf: 8b 45 f8 mov -0x8(%ebp),%eax 801051d2: 0f b6 00 movzbl (%eax),%eax 801051d5: 38 c2 cmp %al,%dl 801051d7: 74 18 je 801051f1 <memcmp+0x3c> return *s1 - *s2; 801051d9: 8b 45 fc mov -0x4(%ebp),%eax 801051dc: 0f b6 00 movzbl (%eax),%eax 801051df: 0f b6 d0 movzbl %al,%edx 801051e2: 8b 45 f8 mov -0x8(%ebp),%eax 801051e5: 0f b6 00 movzbl (%eax),%eax 801051e8: 0f b6 c0 movzbl %al,%eax 801051eb: 29 c2 sub %eax,%edx 801051ed: 89 d0 mov %edx,%eax 801051ef: eb 1a jmp 8010520b <memcmp+0x56> s1++, s2++; 801051f1: 83 45 fc 01 addl $0x1,-0x4(%ebp) 801051f5: 83 45 f8 01 addl $0x1,-0x8(%ebp) { const uchar *s1, *s2; s1 = v1; s2 = v2; while(n-- > 0){ 801051f9: 8b 45 10 mov 0x10(%ebp),%eax 801051fc: 8d 50 ff lea -0x1(%eax),%edx 801051ff: 89 55 10 mov %edx,0x10(%ebp) 80105202: 85 c0 test %eax,%eax 80105204: 75 c3 jne 801051c9 <memcmp+0x14> if(*s1 != *s2) return *s1 - *s2; s1++, s2++; } return 0; 80105206: b8 00 00 00 00 mov $0x0,%eax } 8010520b: c9 leave 8010520c: c3 ret 8010520d <memmove>: void* memmove(void *dst, const void *src, uint n) { 8010520d: 55 push %ebp 8010520e: 89 e5 mov %esp,%ebp 80105210: 83 ec 10 sub $0x10,%esp const char *s; char *d; s = src; 80105213: 8b 45 0c mov 0xc(%ebp),%eax 80105216: 89 45 fc mov %eax,-0x4(%ebp) d = dst; 80105219: 8b 45 08 mov 0x8(%ebp),%eax 8010521c: 89 45 f8 mov %eax,-0x8(%ebp) if(s < d && s + n > d){ 8010521f: 8b 45 fc mov -0x4(%ebp),%eax 80105222: 3b 45 f8 cmp -0x8(%ebp),%eax 80105225: 73 3d jae 80105264 <memmove+0x57> 80105227: 8b 45 10 mov 0x10(%ebp),%eax 8010522a: 8b 55 fc mov -0x4(%ebp),%edx 8010522d: 01 d0 add %edx,%eax 8010522f: 3b 45 f8 cmp -0x8(%ebp),%eax 80105232: 76 30 jbe 80105264 <memmove+0x57> s += n; 80105234: 8b 45 10 mov 0x10(%ebp),%eax 80105237: 01 45 fc add %eax,-0x4(%ebp) d += n; 8010523a: 8b 45 10 mov 0x10(%ebp),%eax 8010523d: 01 45 f8 add %eax,-0x8(%ebp) while(n-- > 0) 80105240: eb 13 jmp 80105255 <memmove+0x48> *--d = *--s; 80105242: 83 6d f8 01 subl $0x1,-0x8(%ebp) 80105246: 83 6d fc 01 subl $0x1,-0x4(%ebp) 8010524a: 8b 45 fc mov -0x4(%ebp),%eax 8010524d: 0f b6 10 movzbl (%eax),%edx 80105250: 8b 45 f8 mov -0x8(%ebp),%eax 80105253: 88 10 mov %dl,(%eax) s = src; d = dst; if(s < d && s + n > d){ s += n; d += n; while(n-- > 0) 80105255: 8b 45 10 mov 0x10(%ebp),%eax 80105258: 8d 50 ff lea -0x1(%eax),%edx 8010525b: 89 55 10 mov %edx,0x10(%ebp) 8010525e: 85 c0 test %eax,%eax 80105260: 75 e0 jne 80105242 <memmove+0x35> const char *s; char *d; s = src; d = dst; if(s < d && s + n > d){ 80105262: eb 26 jmp 8010528a <memmove+0x7d> s += n; d += n; while(n-- > 0) *--d = *--s; } else while(n-- > 0) 80105264: eb 17 jmp 8010527d <memmove+0x70> *d++ = *s++; 80105266: 8b 45 f8 mov -0x8(%ebp),%eax 80105269: 8d 50 01 lea 0x1(%eax),%edx 8010526c: 89 55 f8 mov %edx,-0x8(%ebp) 8010526f: 8b 55 fc mov -0x4(%ebp),%edx 80105272: 8d 4a 01 lea 0x1(%edx),%ecx 80105275: 89 4d fc mov %ecx,-0x4(%ebp) 80105278: 0f b6 12 movzbl (%edx),%edx 8010527b: 88 10 mov %dl,(%eax) s += n; d += n; while(n-- > 0) *--d = *--s; } else while(n-- > 0) 8010527d: 8b 45 10 mov 0x10(%ebp),%eax 80105280: 8d 50 ff lea -0x1(%eax),%edx 80105283: 89 55 10 mov %edx,0x10(%ebp) 80105286: 85 c0 test %eax,%eax 80105288: 75 dc jne 80105266 <memmove+0x59> *d++ = *s++; return dst; 8010528a: 8b 45 08 mov 0x8(%ebp),%eax } 8010528d: c9 leave 8010528e: c3 ret 8010528f <memcpy>: // memcpy exists to placate GCC. Use memmove. void* memcpy(void *dst, const void *src, uint n) { 8010528f: 55 push %ebp 80105290: 89 e5 mov %esp,%ebp 80105292: 83 ec 0c sub $0xc,%esp return memmove(dst, src, n); 80105295: 8b 45 10 mov 0x10(%ebp),%eax 80105298: 89 44 24 08 mov %eax,0x8(%esp) 8010529c: 8b 45 0c mov 0xc(%ebp),%eax 8010529f: 89 44 24 04 mov %eax,0x4(%esp) 801052a3: 8b 45 08 mov 0x8(%ebp),%eax 801052a6: 89 04 24 mov %eax,(%esp) 801052a9: e8 5f ff ff ff call 8010520d <memmove> } 801052ae: c9 leave 801052af: c3 ret 801052b0 <strncmp>: int strncmp(const char *p, const char *q, uint n) { 801052b0: 55 push %ebp 801052b1: 89 e5 mov %esp,%ebp while(n > 0 && *p && *p == *q) 801052b3: eb 0c jmp 801052c1 <strncmp+0x11> n--, p++, q++; 801052b5: 83 6d 10 01 subl $0x1,0x10(%ebp) 801052b9: 83 45 08 01 addl $0x1,0x8(%ebp) 801052bd: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strncmp(const char *p, const char *q, uint n) { while(n > 0 && *p && *p == *q) 801052c1: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801052c5: 74 1a je 801052e1 <strncmp+0x31> 801052c7: 8b 45 08 mov 0x8(%ebp),%eax 801052ca: 0f b6 00 movzbl (%eax),%eax 801052cd: 84 c0 test %al,%al 801052cf: 74 10 je 801052e1 <strncmp+0x31> 801052d1: 8b 45 08 mov 0x8(%ebp),%eax 801052d4: 0f b6 10 movzbl (%eax),%edx 801052d7: 8b 45 0c mov 0xc(%ebp),%eax 801052da: 0f b6 00 movzbl (%eax),%eax 801052dd: 38 c2 cmp %al,%dl 801052df: 74 d4 je 801052b5 <strncmp+0x5> n--, p++, q++; if(n == 0) 801052e1: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 801052e5: 75 07 jne 801052ee <strncmp+0x3e> return 0; 801052e7: b8 00 00 00 00 mov $0x0,%eax 801052ec: eb 16 jmp 80105304 <strncmp+0x54> return (uchar)*p - (uchar)*q; 801052ee: 8b 45 08 mov 0x8(%ebp),%eax 801052f1: 0f b6 00 movzbl (%eax),%eax 801052f4: 0f b6 d0 movzbl %al,%edx 801052f7: 8b 45 0c mov 0xc(%ebp),%eax 801052fa: 0f b6 00 movzbl (%eax),%eax 801052fd: 0f b6 c0 movzbl %al,%eax 80105300: 29 c2 sub %eax,%edx 80105302: 89 d0 mov %edx,%eax } 80105304: 5d pop %ebp 80105305: c3 ret 80105306 <strncpy>: char* strncpy(char *s, const char *t, int n) { 80105306: 55 push %ebp 80105307: 89 e5 mov %esp,%ebp 80105309: 83 ec 10 sub $0x10,%esp char *os; os = s; 8010530c: 8b 45 08 mov 0x8(%ebp),%eax 8010530f: 89 45 fc mov %eax,-0x4(%ebp) while(n-- > 0 && (*s++ = *t++) != 0) 80105312: 90 nop 80105313: 8b 45 10 mov 0x10(%ebp),%eax 80105316: 8d 50 ff lea -0x1(%eax),%edx 80105319: 89 55 10 mov %edx,0x10(%ebp) 8010531c: 85 c0 test %eax,%eax 8010531e: 7e 1e jle 8010533e <strncpy+0x38> 80105320: 8b 45 08 mov 0x8(%ebp),%eax 80105323: 8d 50 01 lea 0x1(%eax),%edx 80105326: 89 55 08 mov %edx,0x8(%ebp) 80105329: 8b 55 0c mov 0xc(%ebp),%edx 8010532c: 8d 4a 01 lea 0x1(%edx),%ecx 8010532f: 89 4d 0c mov %ecx,0xc(%ebp) 80105332: 0f b6 12 movzbl (%edx),%edx 80105335: 88 10 mov %dl,(%eax) 80105337: 0f b6 00 movzbl (%eax),%eax 8010533a: 84 c0 test %al,%al 8010533c: 75 d5 jne 80105313 <strncpy+0xd> ; while(n-- > 0) 8010533e: eb 0c jmp 8010534c <strncpy+0x46> *s++ = 0; 80105340: 8b 45 08 mov 0x8(%ebp),%eax 80105343: 8d 50 01 lea 0x1(%eax),%edx 80105346: 89 55 08 mov %edx,0x8(%ebp) 80105349: c6 00 00 movb $0x0,(%eax) char *os; os = s; while(n-- > 0 && (*s++ = *t++) != 0) ; while(n-- > 0) 8010534c: 8b 45 10 mov 0x10(%ebp),%eax 8010534f: 8d 50 ff lea -0x1(%eax),%edx 80105352: 89 55 10 mov %edx,0x10(%ebp) 80105355: 85 c0 test %eax,%eax 80105357: 7f e7 jg 80105340 <strncpy+0x3a> *s++ = 0; return os; 80105359: 8b 45 fc mov -0x4(%ebp),%eax } 8010535c: c9 leave 8010535d: c3 ret 8010535e <safestrcpy>: // Like strncpy but guaranteed to NUL-terminate. char* safestrcpy(char *s, const char *t, int n) { 8010535e: 55 push %ebp 8010535f: 89 e5 mov %esp,%ebp 80105361: 83 ec 10 sub $0x10,%esp char *os; os = s; 80105364: 8b 45 08 mov 0x8(%ebp),%eax 80105367: 89 45 fc mov %eax,-0x4(%ebp) if(n <= 0) 8010536a: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010536e: 7f 05 jg 80105375 <safestrcpy+0x17> return os; 80105370: 8b 45 fc mov -0x4(%ebp),%eax 80105373: eb 31 jmp 801053a6 <safestrcpy+0x48> while(--n > 0 && (*s++ = *t++) != 0) 80105375: 83 6d 10 01 subl $0x1,0x10(%ebp) 80105379: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010537d: 7e 1e jle 8010539d <safestrcpy+0x3f> 8010537f: 8b 45 08 mov 0x8(%ebp),%eax 80105382: 8d 50 01 lea 0x1(%eax),%edx 80105385: 89 55 08 mov %edx,0x8(%ebp) 80105388: 8b 55 0c mov 0xc(%ebp),%edx 8010538b: 8d 4a 01 lea 0x1(%edx),%ecx 8010538e: 89 4d 0c mov %ecx,0xc(%ebp) 80105391: 0f b6 12 movzbl (%edx),%edx 80105394: 88 10 mov %dl,(%eax) 80105396: 0f b6 00 movzbl (%eax),%eax 80105399: 84 c0 test %al,%al 8010539b: 75 d8 jne 80105375 <safestrcpy+0x17> ; *s = 0; 8010539d: 8b 45 08 mov 0x8(%ebp),%eax 801053a0: c6 00 00 movb $0x0,(%eax) return os; 801053a3: 8b 45 fc mov -0x4(%ebp),%eax } 801053a6: c9 leave 801053a7: c3 ret 801053a8 <strlen>: int strlen(const char *s) { 801053a8: 55 push %ebp 801053a9: 89 e5 mov %esp,%ebp 801053ab: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 801053ae: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 801053b5: eb 04 jmp 801053bb <strlen+0x13> 801053b7: 83 45 fc 01 addl $0x1,-0x4(%ebp) 801053bb: 8b 55 fc mov -0x4(%ebp),%edx 801053be: 8b 45 08 mov 0x8(%ebp),%eax 801053c1: 01 d0 add %edx,%eax 801053c3: 0f b6 00 movzbl (%eax),%eax 801053c6: 84 c0 test %al,%al 801053c8: 75 ed jne 801053b7 <strlen+0xf> ; return n; 801053ca: 8b 45 fc mov -0x4(%ebp),%eax } 801053cd: c9 leave 801053ce: c3 ret 801053cf <swtch>: # Save current register context in old # and then load register context from new. .globl swtch swtch: movl 4(%esp), %eax 801053cf: 8b 44 24 04 mov 0x4(%esp),%eax movl 8(%esp), %edx 801053d3: 8b 54 24 08 mov 0x8(%esp),%edx # Save old callee-save registers pushl %ebp 801053d7: 55 push %ebp pushl %ebx 801053d8: 53 push %ebx pushl %esi 801053d9: 56 push %esi pushl %edi 801053da: 57 push %edi # Switch stacks movl %esp, (%eax) 801053db: 89 20 mov %esp,(%eax) movl %edx, %esp 801053dd: 89 d4 mov %edx,%esp # Load new callee-save registers popl %edi 801053df: 5f pop %edi popl %esi 801053e0: 5e pop %esi popl %ebx 801053e1: 5b pop %ebx popl %ebp 801053e2: 5d pop %ebp ret 801053e3: c3 ret 801053e4 <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) { 801053e4: 55 push %ebp 801053e5: 89 e5 mov %esp,%ebp if(addr >= proc->sz || addr+4 > proc->sz) 801053e7: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801053ed: 8b 00 mov (%eax),%eax 801053ef: 3b 45 08 cmp 0x8(%ebp),%eax 801053f2: 76 12 jbe 80105406 <fetchint+0x22> 801053f4: 8b 45 08 mov 0x8(%ebp),%eax 801053f7: 8d 50 04 lea 0x4(%eax),%edx 801053fa: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105400: 8b 00 mov (%eax),%eax 80105402: 39 c2 cmp %eax,%edx 80105404: 76 07 jbe 8010540d <fetchint+0x29> return -1; 80105406: b8 ff ff ff ff mov $0xffffffff,%eax 8010540b: eb 0f jmp 8010541c <fetchint+0x38> *ip = *(int*)(addr); 8010540d: 8b 45 08 mov 0x8(%ebp),%eax 80105410: 8b 10 mov (%eax),%edx 80105412: 8b 45 0c mov 0xc(%ebp),%eax 80105415: 89 10 mov %edx,(%eax) return 0; 80105417: b8 00 00 00 00 mov $0x0,%eax } 8010541c: 5d pop %ebp 8010541d: c3 ret 8010541e <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) { 8010541e: 55 push %ebp 8010541f: 89 e5 mov %esp,%ebp 80105421: 83 ec 10 sub $0x10,%esp char *s, *ep; if(addr >= proc->sz) 80105424: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010542a: 8b 00 mov (%eax),%eax 8010542c: 3b 45 08 cmp 0x8(%ebp),%eax 8010542f: 77 07 ja 80105438 <fetchstr+0x1a> return -1; 80105431: b8 ff ff ff ff mov $0xffffffff,%eax 80105436: eb 46 jmp 8010547e <fetchstr+0x60> *pp = (char*)addr; 80105438: 8b 55 08 mov 0x8(%ebp),%edx 8010543b: 8b 45 0c mov 0xc(%ebp),%eax 8010543e: 89 10 mov %edx,(%eax) ep = (char*)proc->sz; 80105440: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105446: 8b 00 mov (%eax),%eax 80105448: 89 45 f8 mov %eax,-0x8(%ebp) for(s = *pp; s < ep; s++) 8010544b: 8b 45 0c mov 0xc(%ebp),%eax 8010544e: 8b 00 mov (%eax),%eax 80105450: 89 45 fc mov %eax,-0x4(%ebp) 80105453: eb 1c jmp 80105471 <fetchstr+0x53> if(*s == 0) 80105455: 8b 45 fc mov -0x4(%ebp),%eax 80105458: 0f b6 00 movzbl (%eax),%eax 8010545b: 84 c0 test %al,%al 8010545d: 75 0e jne 8010546d <fetchstr+0x4f> return s - *pp; 8010545f: 8b 55 fc mov -0x4(%ebp),%edx 80105462: 8b 45 0c mov 0xc(%ebp),%eax 80105465: 8b 00 mov (%eax),%eax 80105467: 29 c2 sub %eax,%edx 80105469: 89 d0 mov %edx,%eax 8010546b: eb 11 jmp 8010547e <fetchstr+0x60> if(addr >= proc->sz) return -1; *pp = (char*)addr; ep = (char*)proc->sz; for(s = *pp; s < ep; s++) 8010546d: 83 45 fc 01 addl $0x1,-0x4(%ebp) 80105471: 8b 45 fc mov -0x4(%ebp),%eax 80105474: 3b 45 f8 cmp -0x8(%ebp),%eax 80105477: 72 dc jb 80105455 <fetchstr+0x37> if(*s == 0) return s - *pp; return -1; 80105479: b8 ff ff ff ff mov $0xffffffff,%eax } 8010547e: c9 leave 8010547f: c3 ret 80105480 <argint>: // Fetch the nth 32-bit system call argument. int argint(int n, int *ip) { 80105480: 55 push %ebp 80105481: 89 e5 mov %esp,%ebp 80105483: 83 ec 08 sub $0x8,%esp return fetchint(proc->tf->esp + 4 + 4*n, ip); 80105486: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010548c: 8b 40 18 mov 0x18(%eax),%eax 8010548f: 8b 50 44 mov 0x44(%eax),%edx 80105492: 8b 45 08 mov 0x8(%ebp),%eax 80105495: c1 e0 02 shl $0x2,%eax 80105498: 01 d0 add %edx,%eax 8010549a: 8d 50 04 lea 0x4(%eax),%edx 8010549d: 8b 45 0c mov 0xc(%ebp),%eax 801054a0: 89 44 24 04 mov %eax,0x4(%esp) 801054a4: 89 14 24 mov %edx,(%esp) 801054a7: e8 38 ff ff ff call 801053e4 <fetchint> } 801054ac: c9 leave 801054ad: c3 ret 801054ae <argptr>: // Fetch the nth word-sized system call argument as a pointer // to a block of memory of size n bytes. Check that the pointer // lies within the process address space. int argptr(int n, char **pp, int size) { 801054ae: 55 push %ebp 801054af: 89 e5 mov %esp,%ebp 801054b1: 83 ec 18 sub $0x18,%esp int i; if(argint(n, &i) < 0) 801054b4: 8d 45 fc lea -0x4(%ebp),%eax 801054b7: 89 44 24 04 mov %eax,0x4(%esp) 801054bb: 8b 45 08 mov 0x8(%ebp),%eax 801054be: 89 04 24 mov %eax,(%esp) 801054c1: e8 ba ff ff ff call 80105480 <argint> 801054c6: 85 c0 test %eax,%eax 801054c8: 79 07 jns 801054d1 <argptr+0x23> return -1; 801054ca: b8 ff ff ff ff mov $0xffffffff,%eax 801054cf: eb 3d jmp 8010550e <argptr+0x60> if((uint)i >= proc->sz || (uint)i+size > proc->sz) 801054d1: 8b 45 fc mov -0x4(%ebp),%eax 801054d4: 89 c2 mov %eax,%edx 801054d6: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801054dc: 8b 00 mov (%eax),%eax 801054de: 39 c2 cmp %eax,%edx 801054e0: 73 16 jae 801054f8 <argptr+0x4a> 801054e2: 8b 45 fc mov -0x4(%ebp),%eax 801054e5: 89 c2 mov %eax,%edx 801054e7: 8b 45 10 mov 0x10(%ebp),%eax 801054ea: 01 c2 add %eax,%edx 801054ec: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801054f2: 8b 00 mov (%eax),%eax 801054f4: 39 c2 cmp %eax,%edx 801054f6: 76 07 jbe 801054ff <argptr+0x51> return -1; 801054f8: b8 ff ff ff ff mov $0xffffffff,%eax 801054fd: eb 0f jmp 8010550e <argptr+0x60> *pp = (char*)i; 801054ff: 8b 45 fc mov -0x4(%ebp),%eax 80105502: 89 c2 mov %eax,%edx 80105504: 8b 45 0c mov 0xc(%ebp),%eax 80105507: 89 10 mov %edx,(%eax) return 0; 80105509: b8 00 00 00 00 mov $0x0,%eax } 8010550e: c9 leave 8010550f: c3 ret 80105510 <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) { 80105510: 55 push %ebp 80105511: 89 e5 mov %esp,%ebp 80105513: 83 ec 18 sub $0x18,%esp int addr; if(argint(n, &addr) < 0) 80105516: 8d 45 fc lea -0x4(%ebp),%eax 80105519: 89 44 24 04 mov %eax,0x4(%esp) 8010551d: 8b 45 08 mov 0x8(%ebp),%eax 80105520: 89 04 24 mov %eax,(%esp) 80105523: e8 58 ff ff ff call 80105480 <argint> 80105528: 85 c0 test %eax,%eax 8010552a: 79 07 jns 80105533 <argstr+0x23> return -1; 8010552c: b8 ff ff ff ff mov $0xffffffff,%eax 80105531: eb 12 jmp 80105545 <argstr+0x35> return fetchstr(addr, pp); 80105533: 8b 45 fc mov -0x4(%ebp),%eax 80105536: 8b 55 0c mov 0xc(%ebp),%edx 80105539: 89 54 24 04 mov %edx,0x4(%esp) 8010553d: 89 04 24 mov %eax,(%esp) 80105540: e8 d9 fe ff ff call 8010541e <fetchstr> } 80105545: c9 leave 80105546: c3 ret 80105547 <syscall>: [SYS_test] sys_test, }; void syscall(void) { 80105547: 55 push %ebp 80105548: 89 e5 mov %esp,%ebp 8010554a: 53 push %ebx 8010554b: 83 ec 24 sub $0x24,%esp int num; num = proc->tf->eax; 8010554e: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105554: 8b 40 18 mov 0x18(%eax),%eax 80105557: 8b 40 1c mov 0x1c(%eax),%eax 8010555a: 89 45 f4 mov %eax,-0xc(%ebp) if(num > 0 && num < NELEM(syscalls) && syscalls[num]) { 8010555d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105561: 7e 30 jle 80105593 <syscall+0x4c> 80105563: 8b 45 f4 mov -0xc(%ebp),%eax 80105566: 83 f8 1a cmp $0x1a,%eax 80105569: 77 28 ja 80105593 <syscall+0x4c> 8010556b: 8b 45 f4 mov -0xc(%ebp),%eax 8010556e: 8b 04 85 40 b0 10 80 mov -0x7fef4fc0(,%eax,4),%eax 80105575: 85 c0 test %eax,%eax 80105577: 74 1a je 80105593 <syscall+0x4c> proc->tf->eax = syscalls[num](); 80105579: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010557f: 8b 58 18 mov 0x18(%eax),%ebx 80105582: 8b 45 f4 mov -0xc(%ebp),%eax 80105585: 8b 04 85 40 b0 10 80 mov -0x7fef4fc0(,%eax,4),%eax 8010558c: ff d0 call *%eax 8010558e: 89 43 1c mov %eax,0x1c(%ebx) 80105591: eb 3d jmp 801055d0 <syscall+0x89> } else { cprintf("%d %s: unknown sys call %d\n", proc->pid, proc->name, num); 80105593: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105599: 8d 48 6c lea 0x6c(%eax),%ecx 8010559c: 65 a1 04 00 00 00 mov %gs:0x4,%eax num = proc->tf->eax; if(num > 0 && num < NELEM(syscalls) && syscalls[num]) { proc->tf->eax = syscalls[num](); } else { cprintf("%d %s: unknown sys call %d\n", 801055a2: 8b 40 10 mov 0x10(%eax),%eax 801055a5: 8b 55 f4 mov -0xc(%ebp),%edx 801055a8: 89 54 24 0c mov %edx,0xc(%esp) 801055ac: 89 4c 24 08 mov %ecx,0x8(%esp) 801055b0: 89 44 24 04 mov %eax,0x4(%esp) 801055b4: c7 04 24 b7 89 10 80 movl $0x801089b7,(%esp) 801055bb: e8 e0 ad ff ff call 801003a0 <cprintf> proc->pid, proc->name, num); proc->tf->eax = -1; 801055c0: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801055c6: 8b 40 18 mov 0x18(%eax),%eax 801055c9: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax) } } 801055d0: 83 c4 24 add $0x24,%esp 801055d3: 5b pop %ebx 801055d4: 5d pop %ebp 801055d5: c3 ret 801055d6 <argfd>: // Fetch the nth word-sized system call argument as a file descriptor // and return both the descriptor and the corresponding struct file. static int argfd(int n, int *pfd, struct file **pf) { 801055d6: 55 push %ebp 801055d7: 89 e5 mov %esp,%ebp 801055d9: 83 ec 28 sub $0x28,%esp int fd; struct file *f; if(argint(n, &fd) < 0) 801055dc: 8d 45 f0 lea -0x10(%ebp),%eax 801055df: 89 44 24 04 mov %eax,0x4(%esp) 801055e3: 8b 45 08 mov 0x8(%ebp),%eax 801055e6: 89 04 24 mov %eax,(%esp) 801055e9: e8 92 fe ff ff call 80105480 <argint> 801055ee: 85 c0 test %eax,%eax 801055f0: 79 07 jns 801055f9 <argfd+0x23> return -1; 801055f2: b8 ff ff ff ff mov $0xffffffff,%eax 801055f7: eb 50 jmp 80105649 <argfd+0x73> if(fd < 0 || fd >= NOFILE || (f=proc->ofile[fd]) == 0) 801055f9: 8b 45 f0 mov -0x10(%ebp),%eax 801055fc: 85 c0 test %eax,%eax 801055fe: 78 21 js 80105621 <argfd+0x4b> 80105600: 8b 45 f0 mov -0x10(%ebp),%eax 80105603: 83 f8 0f cmp $0xf,%eax 80105606: 7f 19 jg 80105621 <argfd+0x4b> 80105608: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010560e: 8b 55 f0 mov -0x10(%ebp),%edx 80105611: 83 c2 08 add $0x8,%edx 80105614: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 80105618: 89 45 f4 mov %eax,-0xc(%ebp) 8010561b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 8010561f: 75 07 jne 80105628 <argfd+0x52> return -1; 80105621: b8 ff ff ff ff mov $0xffffffff,%eax 80105626: eb 21 jmp 80105649 <argfd+0x73> if(pfd) 80105628: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 8010562c: 74 08 je 80105636 <argfd+0x60> *pfd = fd; 8010562e: 8b 55 f0 mov -0x10(%ebp),%edx 80105631: 8b 45 0c mov 0xc(%ebp),%eax 80105634: 89 10 mov %edx,(%eax) if(pf) 80105636: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 8010563a: 74 08 je 80105644 <argfd+0x6e> *pf = f; 8010563c: 8b 45 10 mov 0x10(%ebp),%eax 8010563f: 8b 55 f4 mov -0xc(%ebp),%edx 80105642: 89 10 mov %edx,(%eax) return 0; 80105644: b8 00 00 00 00 mov $0x0,%eax } 80105649: c9 leave 8010564a: c3 ret 8010564b <fdalloc>: // Allocate a file descriptor for the given file. // Takes over file reference from caller on success. static int fdalloc(struct file *f) { 8010564b: 55 push %ebp 8010564c: 89 e5 mov %esp,%ebp 8010564e: 83 ec 10 sub $0x10,%esp int fd; for(fd = 0; fd < NOFILE; fd++){ 80105651: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 80105658: eb 30 jmp 8010568a <fdalloc+0x3f> if(proc->ofile[fd] == 0){ 8010565a: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105660: 8b 55 fc mov -0x4(%ebp),%edx 80105663: 83 c2 08 add $0x8,%edx 80105666: 8b 44 90 08 mov 0x8(%eax,%edx,4),%eax 8010566a: 85 c0 test %eax,%eax 8010566c: 75 18 jne 80105686 <fdalloc+0x3b> proc->ofile[fd] = f; 8010566e: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105674: 8b 55 fc mov -0x4(%ebp),%edx 80105677: 8d 4a 08 lea 0x8(%edx),%ecx 8010567a: 8b 55 08 mov 0x8(%ebp),%edx 8010567d: 89 54 88 08 mov %edx,0x8(%eax,%ecx,4) return fd; 80105681: 8b 45 fc mov -0x4(%ebp),%eax 80105684: eb 0f jmp 80105695 <fdalloc+0x4a> static int fdalloc(struct file *f) { int fd; for(fd = 0; fd < NOFILE; fd++){ 80105686: 83 45 fc 01 addl $0x1,-0x4(%ebp) 8010568a: 83 7d fc 0f cmpl $0xf,-0x4(%ebp) 8010568e: 7e ca jle 8010565a <fdalloc+0xf> if(proc->ofile[fd] == 0){ proc->ofile[fd] = f; return fd; } } return -1; 80105690: b8 ff ff ff ff mov $0xffffffff,%eax } 80105695: c9 leave 80105696: c3 ret 80105697 <sys_dup>: int sys_dup(void) { 80105697: 55 push %ebp 80105698: 89 e5 mov %esp,%ebp 8010569a: 83 ec 28 sub $0x28,%esp struct file *f; int fd; if(argfd(0, 0, &f) < 0) 8010569d: 8d 45 f0 lea -0x10(%ebp),%eax 801056a0: 89 44 24 08 mov %eax,0x8(%esp) 801056a4: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801056ab: 00 801056ac: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801056b3: e8 1e ff ff ff call 801055d6 <argfd> 801056b8: 85 c0 test %eax,%eax 801056ba: 79 07 jns 801056c3 <sys_dup+0x2c> return -1; 801056bc: b8 ff ff ff ff mov $0xffffffff,%eax 801056c1: eb 29 jmp 801056ec <sys_dup+0x55> if((fd=fdalloc(f)) < 0) 801056c3: 8b 45 f0 mov -0x10(%ebp),%eax 801056c6: 89 04 24 mov %eax,(%esp) 801056c9: e8 7d ff ff ff call 8010564b <fdalloc> 801056ce: 89 45 f4 mov %eax,-0xc(%ebp) 801056d1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801056d5: 79 07 jns 801056de <sys_dup+0x47> return -1; 801056d7: b8 ff ff ff ff mov $0xffffffff,%eax 801056dc: eb 0e jmp 801056ec <sys_dup+0x55> filedup(f); 801056de: 8b 45 f0 mov -0x10(%ebp),%eax 801056e1: 89 04 24 mov %eax,(%esp) 801056e4: e8 95 b8 ff ff call 80100f7e <filedup> return fd; 801056e9: 8b 45 f4 mov -0xc(%ebp),%eax } 801056ec: c9 leave 801056ed: c3 ret 801056ee <sys_read>: int sys_read(void) { 801056ee: 55 push %ebp 801056ef: 89 e5 mov %esp,%ebp 801056f1: 83 ec 28 sub $0x28,%esp struct file *f; int n; char *p; if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 801056f4: 8d 45 f4 lea -0xc(%ebp),%eax 801056f7: 89 44 24 08 mov %eax,0x8(%esp) 801056fb: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80105702: 00 80105703: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010570a: e8 c7 fe ff ff call 801055d6 <argfd> 8010570f: 85 c0 test %eax,%eax 80105711: 78 35 js 80105748 <sys_read+0x5a> 80105713: 8d 45 f0 lea -0x10(%ebp),%eax 80105716: 89 44 24 04 mov %eax,0x4(%esp) 8010571a: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80105721: e8 5a fd ff ff call 80105480 <argint> 80105726: 85 c0 test %eax,%eax 80105728: 78 1e js 80105748 <sys_read+0x5a> 8010572a: 8b 45 f0 mov -0x10(%ebp),%eax 8010572d: 89 44 24 08 mov %eax,0x8(%esp) 80105731: 8d 45 ec lea -0x14(%ebp),%eax 80105734: 89 44 24 04 mov %eax,0x4(%esp) 80105738: c7 04 24 01 00 00 00 movl $0x1,(%esp) 8010573f: e8 6a fd ff ff call 801054ae <argptr> 80105744: 85 c0 test %eax,%eax 80105746: 79 07 jns 8010574f <sys_read+0x61> return -1; 80105748: b8 ff ff ff ff mov $0xffffffff,%eax 8010574d: eb 19 jmp 80105768 <sys_read+0x7a> return fileread(f, p, n); 8010574f: 8b 4d f0 mov -0x10(%ebp),%ecx 80105752: 8b 55 ec mov -0x14(%ebp),%edx 80105755: 8b 45 f4 mov -0xc(%ebp),%eax 80105758: 89 4c 24 08 mov %ecx,0x8(%esp) 8010575c: 89 54 24 04 mov %edx,0x4(%esp) 80105760: 89 04 24 mov %eax,(%esp) 80105763: e8 83 b9 ff ff call 801010eb <fileread> } 80105768: c9 leave 80105769: c3 ret 8010576a <sys_write>: int sys_write(void) { 8010576a: 55 push %ebp 8010576b: 89 e5 mov %esp,%ebp 8010576d: 83 ec 28 sub $0x28,%esp struct file *f; int n; char *p; if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 80105770: 8d 45 f4 lea -0xc(%ebp),%eax 80105773: 89 44 24 08 mov %eax,0x8(%esp) 80105777: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010577e: 00 8010577f: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105786: e8 4b fe ff ff call 801055d6 <argfd> 8010578b: 85 c0 test %eax,%eax 8010578d: 78 35 js 801057c4 <sys_write+0x5a> 8010578f: 8d 45 f0 lea -0x10(%ebp),%eax 80105792: 89 44 24 04 mov %eax,0x4(%esp) 80105796: c7 04 24 02 00 00 00 movl $0x2,(%esp) 8010579d: e8 de fc ff ff call 80105480 <argint> 801057a2: 85 c0 test %eax,%eax 801057a4: 78 1e js 801057c4 <sys_write+0x5a> 801057a6: 8b 45 f0 mov -0x10(%ebp),%eax 801057a9: 89 44 24 08 mov %eax,0x8(%esp) 801057ad: 8d 45 ec lea -0x14(%ebp),%eax 801057b0: 89 44 24 04 mov %eax,0x4(%esp) 801057b4: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801057bb: e8 ee fc ff ff call 801054ae <argptr> 801057c0: 85 c0 test %eax,%eax 801057c2: 79 07 jns 801057cb <sys_write+0x61> return -1; 801057c4: b8 ff ff ff ff mov $0xffffffff,%eax 801057c9: eb 19 jmp 801057e4 <sys_write+0x7a> return filewrite(f, p, n); 801057cb: 8b 4d f0 mov -0x10(%ebp),%ecx 801057ce: 8b 55 ec mov -0x14(%ebp),%edx 801057d1: 8b 45 f4 mov -0xc(%ebp),%eax 801057d4: 89 4c 24 08 mov %ecx,0x8(%esp) 801057d8: 89 54 24 04 mov %edx,0x4(%esp) 801057dc: 89 04 24 mov %eax,(%esp) 801057df: e8 c3 b9 ff ff call 801011a7 <filewrite> } 801057e4: c9 leave 801057e5: c3 ret 801057e6 <sys_close>: int sys_close(void) { 801057e6: 55 push %ebp 801057e7: 89 e5 mov %esp,%ebp 801057e9: 83 ec 28 sub $0x28,%esp int fd; struct file *f; if(argfd(0, &fd, &f) < 0) 801057ec: 8d 45 f0 lea -0x10(%ebp),%eax 801057ef: 89 44 24 08 mov %eax,0x8(%esp) 801057f3: 8d 45 f4 lea -0xc(%ebp),%eax 801057f6: 89 44 24 04 mov %eax,0x4(%esp) 801057fa: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105801: e8 d0 fd ff ff call 801055d6 <argfd> 80105806: 85 c0 test %eax,%eax 80105808: 79 07 jns 80105811 <sys_close+0x2b> return -1; 8010580a: b8 ff ff ff ff mov $0xffffffff,%eax 8010580f: eb 24 jmp 80105835 <sys_close+0x4f> proc->ofile[fd] = 0; 80105811: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80105817: 8b 55 f4 mov -0xc(%ebp),%edx 8010581a: 83 c2 08 add $0x8,%edx 8010581d: c7 44 90 08 00 00 00 movl $0x0,0x8(%eax,%edx,4) 80105824: 00 fileclose(f); 80105825: 8b 45 f0 mov -0x10(%ebp),%eax 80105828: 89 04 24 mov %eax,(%esp) 8010582b: e8 96 b7 ff ff call 80100fc6 <fileclose> return 0; 80105830: b8 00 00 00 00 mov $0x0,%eax } 80105835: c9 leave 80105836: c3 ret 80105837 <sys_fstat>: int sys_fstat(void) { 80105837: 55 push %ebp 80105838: 89 e5 mov %esp,%ebp 8010583a: 83 ec 28 sub $0x28,%esp struct file *f; struct stat *st; if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0) 8010583d: 8d 45 f4 lea -0xc(%ebp),%eax 80105840: 89 44 24 08 mov %eax,0x8(%esp) 80105844: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010584b: 00 8010584c: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105853: e8 7e fd ff ff call 801055d6 <argfd> 80105858: 85 c0 test %eax,%eax 8010585a: 78 1f js 8010587b <sys_fstat+0x44> 8010585c: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 80105863: 00 80105864: 8d 45 f0 lea -0x10(%ebp),%eax 80105867: 89 44 24 04 mov %eax,0x4(%esp) 8010586b: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80105872: e8 37 fc ff ff call 801054ae <argptr> 80105877: 85 c0 test %eax,%eax 80105879: 79 07 jns 80105882 <sys_fstat+0x4b> return -1; 8010587b: b8 ff ff ff ff mov $0xffffffff,%eax 80105880: eb 12 jmp 80105894 <sys_fstat+0x5d> return filestat(f, st); 80105882: 8b 55 f0 mov -0x10(%ebp),%edx 80105885: 8b 45 f4 mov -0xc(%ebp),%eax 80105888: 89 54 24 04 mov %edx,0x4(%esp) 8010588c: 89 04 24 mov %eax,(%esp) 8010588f: e8 08 b8 ff ff call 8010109c <filestat> } 80105894: c9 leave 80105895: c3 ret 80105896 <sys_link>: // Create the path new as a link to the same inode as old. int sys_link(void) { 80105896: 55 push %ebp 80105897: 89 e5 mov %esp,%ebp 80105899: 83 ec 38 sub $0x38,%esp char name[DIRSIZ], *new, *old; struct inode *dp, *ip; if(argstr(0, &old) < 0 || argstr(1, &new) < 0) 8010589c: 8d 45 d8 lea -0x28(%ebp),%eax 8010589f: 89 44 24 04 mov %eax,0x4(%esp) 801058a3: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801058aa: e8 61 fc ff ff call 80105510 <argstr> 801058af: 85 c0 test %eax,%eax 801058b1: 78 17 js 801058ca <sys_link+0x34> 801058b3: 8d 45 dc lea -0x24(%ebp),%eax 801058b6: 89 44 24 04 mov %eax,0x4(%esp) 801058ba: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801058c1: e8 4a fc ff ff call 80105510 <argstr> 801058c6: 85 c0 test %eax,%eax 801058c8: 79 0a jns 801058d4 <sys_link+0x3e> return -1; 801058ca: b8 ff ff ff ff mov $0xffffffff,%eax 801058cf: e9 3d 01 00 00 jmp 80105a11 <sys_link+0x17b> if((ip = namei(old)) == 0) 801058d4: 8b 45 d8 mov -0x28(%ebp),%eax 801058d7: 89 04 24 mov %eax,(%esp) 801058da: e8 1f cb ff ff call 801023fe <namei> 801058df: 89 45 f4 mov %eax,-0xc(%ebp) 801058e2: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801058e6: 75 0a jne 801058f2 <sys_link+0x5c> return -1; 801058e8: b8 ff ff ff ff mov $0xffffffff,%eax 801058ed: e9 1f 01 00 00 jmp 80105a11 <sys_link+0x17b> begin_trans(); 801058f2: e8 e6 d8 ff ff call 801031dd <begin_trans> ilock(ip); 801058f7: 8b 45 f4 mov -0xc(%ebp),%eax 801058fa: 89 04 24 mov %eax,(%esp) 801058fd: e8 51 bf ff ff call 80101853 <ilock> if(ip->type == T_DIR){ 80105902: 8b 45 f4 mov -0xc(%ebp),%eax 80105905: 0f b7 40 10 movzwl 0x10(%eax),%eax 80105909: 66 83 f8 01 cmp $0x1,%ax 8010590d: 75 1a jne 80105929 <sys_link+0x93> iunlockput(ip); 8010590f: 8b 45 f4 mov -0xc(%ebp),%eax 80105912: 89 04 24 mov %eax,(%esp) 80105915: e8 bd c1 ff ff call 80101ad7 <iunlockput> commit_trans(); 8010591a: e8 07 d9 ff ff call 80103226 <commit_trans> return -1; 8010591f: b8 ff ff ff ff mov $0xffffffff,%eax 80105924: e9 e8 00 00 00 jmp 80105a11 <sys_link+0x17b> } ip->nlink++; 80105929: 8b 45 f4 mov -0xc(%ebp),%eax 8010592c: 0f b7 40 16 movzwl 0x16(%eax),%eax 80105930: 8d 50 01 lea 0x1(%eax),%edx 80105933: 8b 45 f4 mov -0xc(%ebp),%eax 80105936: 66 89 50 16 mov %dx,0x16(%eax) iupdate(ip); 8010593a: 8b 45 f4 mov -0xc(%ebp),%eax 8010593d: 89 04 24 mov %eax,(%esp) 80105940: e8 52 bd ff ff call 80101697 <iupdate> iunlock(ip); 80105945: 8b 45 f4 mov -0xc(%ebp),%eax 80105948: 89 04 24 mov %eax,(%esp) 8010594b: e8 51 c0 ff ff call 801019a1 <iunlock> if((dp = nameiparent(new, name)) == 0) 80105950: 8b 45 dc mov -0x24(%ebp),%eax 80105953: 8d 55 e2 lea -0x1e(%ebp),%edx 80105956: 89 54 24 04 mov %edx,0x4(%esp) 8010595a: 89 04 24 mov %eax,(%esp) 8010595d: e8 be ca ff ff call 80102420 <nameiparent> 80105962: 89 45 f0 mov %eax,-0x10(%ebp) 80105965: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105969: 75 02 jne 8010596d <sys_link+0xd7> goto bad; 8010596b: eb 68 jmp 801059d5 <sys_link+0x13f> ilock(dp); 8010596d: 8b 45 f0 mov -0x10(%ebp),%eax 80105970: 89 04 24 mov %eax,(%esp) 80105973: e8 db be ff ff call 80101853 <ilock> if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){ 80105978: 8b 45 f0 mov -0x10(%ebp),%eax 8010597b: 8b 10 mov (%eax),%edx 8010597d: 8b 45 f4 mov -0xc(%ebp),%eax 80105980: 8b 00 mov (%eax),%eax 80105982: 39 c2 cmp %eax,%edx 80105984: 75 20 jne 801059a6 <sys_link+0x110> 80105986: 8b 45 f4 mov -0xc(%ebp),%eax 80105989: 8b 40 04 mov 0x4(%eax),%eax 8010598c: 89 44 24 08 mov %eax,0x8(%esp) 80105990: 8d 45 e2 lea -0x1e(%ebp),%eax 80105993: 89 44 24 04 mov %eax,0x4(%esp) 80105997: 8b 45 f0 mov -0x10(%ebp),%eax 8010599a: 89 04 24 mov %eax,(%esp) 8010599d: e8 9c c7 ff ff call 8010213e <dirlink> 801059a2: 85 c0 test %eax,%eax 801059a4: 79 0d jns 801059b3 <sys_link+0x11d> iunlockput(dp); 801059a6: 8b 45 f0 mov -0x10(%ebp),%eax 801059a9: 89 04 24 mov %eax,(%esp) 801059ac: e8 26 c1 ff ff call 80101ad7 <iunlockput> goto bad; 801059b1: eb 22 jmp 801059d5 <sys_link+0x13f> } iunlockput(dp); 801059b3: 8b 45 f0 mov -0x10(%ebp),%eax 801059b6: 89 04 24 mov %eax,(%esp) 801059b9: e8 19 c1 ff ff call 80101ad7 <iunlockput> iput(ip); 801059be: 8b 45 f4 mov -0xc(%ebp),%eax 801059c1: 89 04 24 mov %eax,(%esp) 801059c4: e8 3d c0 ff ff call 80101a06 <iput> commit_trans(); 801059c9: e8 58 d8 ff ff call 80103226 <commit_trans> return 0; 801059ce: b8 00 00 00 00 mov $0x0,%eax 801059d3: eb 3c jmp 80105a11 <sys_link+0x17b> bad: ilock(ip); 801059d5: 8b 45 f4 mov -0xc(%ebp),%eax 801059d8: 89 04 24 mov %eax,(%esp) 801059db: e8 73 be ff ff call 80101853 <ilock> ip->nlink--; 801059e0: 8b 45 f4 mov -0xc(%ebp),%eax 801059e3: 0f b7 40 16 movzwl 0x16(%eax),%eax 801059e7: 8d 50 ff lea -0x1(%eax),%edx 801059ea: 8b 45 f4 mov -0xc(%ebp),%eax 801059ed: 66 89 50 16 mov %dx,0x16(%eax) iupdate(ip); 801059f1: 8b 45 f4 mov -0xc(%ebp),%eax 801059f4: 89 04 24 mov %eax,(%esp) 801059f7: e8 9b bc ff ff call 80101697 <iupdate> iunlockput(ip); 801059fc: 8b 45 f4 mov -0xc(%ebp),%eax 801059ff: 89 04 24 mov %eax,(%esp) 80105a02: e8 d0 c0 ff ff call 80101ad7 <iunlockput> commit_trans(); 80105a07: e8 1a d8 ff ff call 80103226 <commit_trans> return -1; 80105a0c: b8 ff ff ff ff mov $0xffffffff,%eax } 80105a11: c9 leave 80105a12: c3 ret 80105a13 <isdirempty>: // Is the directory dp empty except for "." and ".." ? static int isdirempty(struct inode *dp) { 80105a13: 55 push %ebp 80105a14: 89 e5 mov %esp,%ebp 80105a16: 83 ec 38 sub $0x38,%esp int off; struct dirent de; for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){ 80105a19: c7 45 f4 20 00 00 00 movl $0x20,-0xc(%ebp) 80105a20: eb 4b jmp 80105a6d <isdirempty+0x5a> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80105a22: 8b 45 f4 mov -0xc(%ebp),%eax 80105a25: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80105a2c: 00 80105a2d: 89 44 24 08 mov %eax,0x8(%esp) 80105a31: 8d 45 e4 lea -0x1c(%ebp),%eax 80105a34: 89 44 24 04 mov %eax,0x4(%esp) 80105a38: 8b 45 08 mov 0x8(%ebp),%eax 80105a3b: 89 04 24 mov %eax,(%esp) 80105a3e: e8 1d c3 ff ff call 80101d60 <readi> 80105a43: 83 f8 10 cmp $0x10,%eax 80105a46: 74 0c je 80105a54 <isdirempty+0x41> panic("isdirempty: readi"); 80105a48: c7 04 24 d3 89 10 80 movl $0x801089d3,(%esp) 80105a4f: e8 e6 aa ff ff call 8010053a <panic> if(de.inum != 0) 80105a54: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax 80105a58: 66 85 c0 test %ax,%ax 80105a5b: 74 07 je 80105a64 <isdirempty+0x51> return 0; 80105a5d: b8 00 00 00 00 mov $0x0,%eax 80105a62: eb 1b jmp 80105a7f <isdirempty+0x6c> isdirempty(struct inode *dp) { int off; struct dirent de; for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){ 80105a64: 8b 45 f4 mov -0xc(%ebp),%eax 80105a67: 83 c0 10 add $0x10,%eax 80105a6a: 89 45 f4 mov %eax,-0xc(%ebp) 80105a6d: 8b 55 f4 mov -0xc(%ebp),%edx 80105a70: 8b 45 08 mov 0x8(%ebp),%eax 80105a73: 8b 40 18 mov 0x18(%eax),%eax 80105a76: 39 c2 cmp %eax,%edx 80105a78: 72 a8 jb 80105a22 <isdirempty+0xf> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) panic("isdirempty: readi"); if(de.inum != 0) return 0; } return 1; 80105a7a: b8 01 00 00 00 mov $0x1,%eax } 80105a7f: c9 leave 80105a80: c3 ret 80105a81 <sys_unlink>: //PAGEBREAK! int sys_unlink(void) { 80105a81: 55 push %ebp 80105a82: 89 e5 mov %esp,%ebp 80105a84: 83 ec 48 sub $0x48,%esp struct inode *ip, *dp; struct dirent de; char name[DIRSIZ], *path; uint off; if(argstr(0, &path) < 0) 80105a87: 8d 45 cc lea -0x34(%ebp),%eax 80105a8a: 89 44 24 04 mov %eax,0x4(%esp) 80105a8e: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105a95: e8 76 fa ff ff call 80105510 <argstr> 80105a9a: 85 c0 test %eax,%eax 80105a9c: 79 0a jns 80105aa8 <sys_unlink+0x27> return -1; 80105a9e: b8 ff ff ff ff mov $0xffffffff,%eax 80105aa3: e9 aa 01 00 00 jmp 80105c52 <sys_unlink+0x1d1> if((dp = nameiparent(path, name)) == 0) 80105aa8: 8b 45 cc mov -0x34(%ebp),%eax 80105aab: 8d 55 d2 lea -0x2e(%ebp),%edx 80105aae: 89 54 24 04 mov %edx,0x4(%esp) 80105ab2: 89 04 24 mov %eax,(%esp) 80105ab5: e8 66 c9 ff ff call 80102420 <nameiparent> 80105aba: 89 45 f4 mov %eax,-0xc(%ebp) 80105abd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105ac1: 75 0a jne 80105acd <sys_unlink+0x4c> return -1; 80105ac3: b8 ff ff ff ff mov $0xffffffff,%eax 80105ac8: e9 85 01 00 00 jmp 80105c52 <sys_unlink+0x1d1> begin_trans(); 80105acd: e8 0b d7 ff ff call 801031dd <begin_trans> ilock(dp); 80105ad2: 8b 45 f4 mov -0xc(%ebp),%eax 80105ad5: 89 04 24 mov %eax,(%esp) 80105ad8: e8 76 bd ff ff call 80101853 <ilock> // Cannot unlink "." or "..". if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0) 80105add: c7 44 24 04 e5 89 10 movl $0x801089e5,0x4(%esp) 80105ae4: 80 80105ae5: 8d 45 d2 lea -0x2e(%ebp),%eax 80105ae8: 89 04 24 mov %eax,(%esp) 80105aeb: e8 63 c5 ff ff call 80102053 <namecmp> 80105af0: 85 c0 test %eax,%eax 80105af2: 0f 84 45 01 00 00 je 80105c3d <sys_unlink+0x1bc> 80105af8: c7 44 24 04 e7 89 10 movl $0x801089e7,0x4(%esp) 80105aff: 80 80105b00: 8d 45 d2 lea -0x2e(%ebp),%eax 80105b03: 89 04 24 mov %eax,(%esp) 80105b06: e8 48 c5 ff ff call 80102053 <namecmp> 80105b0b: 85 c0 test %eax,%eax 80105b0d: 0f 84 2a 01 00 00 je 80105c3d <sys_unlink+0x1bc> goto bad; if((ip = dirlookup(dp, name, &off)) == 0) 80105b13: 8d 45 c8 lea -0x38(%ebp),%eax 80105b16: 89 44 24 08 mov %eax,0x8(%esp) 80105b1a: 8d 45 d2 lea -0x2e(%ebp),%eax 80105b1d: 89 44 24 04 mov %eax,0x4(%esp) 80105b21: 8b 45 f4 mov -0xc(%ebp),%eax 80105b24: 89 04 24 mov %eax,(%esp) 80105b27: e8 49 c5 ff ff call 80102075 <dirlookup> 80105b2c: 89 45 f0 mov %eax,-0x10(%ebp) 80105b2f: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105b33: 75 05 jne 80105b3a <sys_unlink+0xb9> goto bad; 80105b35: e9 03 01 00 00 jmp 80105c3d <sys_unlink+0x1bc> ilock(ip); 80105b3a: 8b 45 f0 mov -0x10(%ebp),%eax 80105b3d: 89 04 24 mov %eax,(%esp) 80105b40: e8 0e bd ff ff call 80101853 <ilock> if(ip->nlink < 1) 80105b45: 8b 45 f0 mov -0x10(%ebp),%eax 80105b48: 0f b7 40 16 movzwl 0x16(%eax),%eax 80105b4c: 66 85 c0 test %ax,%ax 80105b4f: 7f 0c jg 80105b5d <sys_unlink+0xdc> panic("unlink: nlink < 1"); 80105b51: c7 04 24 ea 89 10 80 movl $0x801089ea,(%esp) 80105b58: e8 dd a9 ff ff call 8010053a <panic> if(ip->type == T_DIR && !isdirempty(ip)){ 80105b5d: 8b 45 f0 mov -0x10(%ebp),%eax 80105b60: 0f b7 40 10 movzwl 0x10(%eax),%eax 80105b64: 66 83 f8 01 cmp $0x1,%ax 80105b68: 75 1f jne 80105b89 <sys_unlink+0x108> 80105b6a: 8b 45 f0 mov -0x10(%ebp),%eax 80105b6d: 89 04 24 mov %eax,(%esp) 80105b70: e8 9e fe ff ff call 80105a13 <isdirempty> 80105b75: 85 c0 test %eax,%eax 80105b77: 75 10 jne 80105b89 <sys_unlink+0x108> iunlockput(ip); 80105b79: 8b 45 f0 mov -0x10(%ebp),%eax 80105b7c: 89 04 24 mov %eax,(%esp) 80105b7f: e8 53 bf ff ff call 80101ad7 <iunlockput> goto bad; 80105b84: e9 b4 00 00 00 jmp 80105c3d <sys_unlink+0x1bc> } memset(&de, 0, sizeof(de)); 80105b89: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80105b90: 00 80105b91: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80105b98: 00 80105b99: 8d 45 e0 lea -0x20(%ebp),%eax 80105b9c: 89 04 24 mov %eax,(%esp) 80105b9f: e8 9a f5 ff ff call 8010513e <memset> if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80105ba4: 8b 45 c8 mov -0x38(%ebp),%eax 80105ba7: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80105bae: 00 80105baf: 89 44 24 08 mov %eax,0x8(%esp) 80105bb3: 8d 45 e0 lea -0x20(%ebp),%eax 80105bb6: 89 44 24 04 mov %eax,0x4(%esp) 80105bba: 8b 45 f4 mov -0xc(%ebp),%eax 80105bbd: 89 04 24 mov %eax,(%esp) 80105bc0: e8 ff c2 ff ff call 80101ec4 <writei> 80105bc5: 83 f8 10 cmp $0x10,%eax 80105bc8: 74 0c je 80105bd6 <sys_unlink+0x155> panic("unlink: writei"); 80105bca: c7 04 24 fc 89 10 80 movl $0x801089fc,(%esp) 80105bd1: e8 64 a9 ff ff call 8010053a <panic> if(ip->type == T_DIR){ 80105bd6: 8b 45 f0 mov -0x10(%ebp),%eax 80105bd9: 0f b7 40 10 movzwl 0x10(%eax),%eax 80105bdd: 66 83 f8 01 cmp $0x1,%ax 80105be1: 75 1c jne 80105bff <sys_unlink+0x17e> dp->nlink--; 80105be3: 8b 45 f4 mov -0xc(%ebp),%eax 80105be6: 0f b7 40 16 movzwl 0x16(%eax),%eax 80105bea: 8d 50 ff lea -0x1(%eax),%edx 80105bed: 8b 45 f4 mov -0xc(%ebp),%eax 80105bf0: 66 89 50 16 mov %dx,0x16(%eax) iupdate(dp); 80105bf4: 8b 45 f4 mov -0xc(%ebp),%eax 80105bf7: 89 04 24 mov %eax,(%esp) 80105bfa: e8 98 ba ff ff call 80101697 <iupdate> } iunlockput(dp); 80105bff: 8b 45 f4 mov -0xc(%ebp),%eax 80105c02: 89 04 24 mov %eax,(%esp) 80105c05: e8 cd be ff ff call 80101ad7 <iunlockput> ip->nlink--; 80105c0a: 8b 45 f0 mov -0x10(%ebp),%eax 80105c0d: 0f b7 40 16 movzwl 0x16(%eax),%eax 80105c11: 8d 50 ff lea -0x1(%eax),%edx 80105c14: 8b 45 f0 mov -0x10(%ebp),%eax 80105c17: 66 89 50 16 mov %dx,0x16(%eax) iupdate(ip); 80105c1b: 8b 45 f0 mov -0x10(%ebp),%eax 80105c1e: 89 04 24 mov %eax,(%esp) 80105c21: e8 71 ba ff ff call 80101697 <iupdate> iunlockput(ip); 80105c26: 8b 45 f0 mov -0x10(%ebp),%eax 80105c29: 89 04 24 mov %eax,(%esp) 80105c2c: e8 a6 be ff ff call 80101ad7 <iunlockput> commit_trans(); 80105c31: e8 f0 d5 ff ff call 80103226 <commit_trans> return 0; 80105c36: b8 00 00 00 00 mov $0x0,%eax 80105c3b: eb 15 jmp 80105c52 <sys_unlink+0x1d1> bad: iunlockput(dp); 80105c3d: 8b 45 f4 mov -0xc(%ebp),%eax 80105c40: 89 04 24 mov %eax,(%esp) 80105c43: e8 8f be ff ff call 80101ad7 <iunlockput> commit_trans(); 80105c48: e8 d9 d5 ff ff call 80103226 <commit_trans> return -1; 80105c4d: b8 ff ff ff ff mov $0xffffffff,%eax } 80105c52: c9 leave 80105c53: c3 ret 80105c54 <create>: static struct inode* create(char *path, short type, short major, short minor) { 80105c54: 55 push %ebp 80105c55: 89 e5 mov %esp,%ebp 80105c57: 83 ec 48 sub $0x48,%esp 80105c5a: 8b 4d 0c mov 0xc(%ebp),%ecx 80105c5d: 8b 55 10 mov 0x10(%ebp),%edx 80105c60: 8b 45 14 mov 0x14(%ebp),%eax 80105c63: 66 89 4d d4 mov %cx,-0x2c(%ebp) 80105c67: 66 89 55 d0 mov %dx,-0x30(%ebp) 80105c6b: 66 89 45 cc mov %ax,-0x34(%ebp) uint off; struct inode *ip, *dp; char name[DIRSIZ]; if((dp = nameiparent(path, name)) == 0) 80105c6f: 8d 45 de lea -0x22(%ebp),%eax 80105c72: 89 44 24 04 mov %eax,0x4(%esp) 80105c76: 8b 45 08 mov 0x8(%ebp),%eax 80105c79: 89 04 24 mov %eax,(%esp) 80105c7c: e8 9f c7 ff ff call 80102420 <nameiparent> 80105c81: 89 45 f4 mov %eax,-0xc(%ebp) 80105c84: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105c88: 75 0a jne 80105c94 <create+0x40> return 0; 80105c8a: b8 00 00 00 00 mov $0x0,%eax 80105c8f: e9 7e 01 00 00 jmp 80105e12 <create+0x1be> ilock(dp); 80105c94: 8b 45 f4 mov -0xc(%ebp),%eax 80105c97: 89 04 24 mov %eax,(%esp) 80105c9a: e8 b4 bb ff ff call 80101853 <ilock> if((ip = dirlookup(dp, name, &off)) != 0){ 80105c9f: 8d 45 ec lea -0x14(%ebp),%eax 80105ca2: 89 44 24 08 mov %eax,0x8(%esp) 80105ca6: 8d 45 de lea -0x22(%ebp),%eax 80105ca9: 89 44 24 04 mov %eax,0x4(%esp) 80105cad: 8b 45 f4 mov -0xc(%ebp),%eax 80105cb0: 89 04 24 mov %eax,(%esp) 80105cb3: e8 bd c3 ff ff call 80102075 <dirlookup> 80105cb8: 89 45 f0 mov %eax,-0x10(%ebp) 80105cbb: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105cbf: 74 47 je 80105d08 <create+0xb4> iunlockput(dp); 80105cc1: 8b 45 f4 mov -0xc(%ebp),%eax 80105cc4: 89 04 24 mov %eax,(%esp) 80105cc7: e8 0b be ff ff call 80101ad7 <iunlockput> ilock(ip); 80105ccc: 8b 45 f0 mov -0x10(%ebp),%eax 80105ccf: 89 04 24 mov %eax,(%esp) 80105cd2: e8 7c bb ff ff call 80101853 <ilock> if(type == T_FILE && ip->type == T_FILE) 80105cd7: 66 83 7d d4 02 cmpw $0x2,-0x2c(%ebp) 80105cdc: 75 15 jne 80105cf3 <create+0x9f> 80105cde: 8b 45 f0 mov -0x10(%ebp),%eax 80105ce1: 0f b7 40 10 movzwl 0x10(%eax),%eax 80105ce5: 66 83 f8 02 cmp $0x2,%ax 80105ce9: 75 08 jne 80105cf3 <create+0x9f> return ip; 80105ceb: 8b 45 f0 mov -0x10(%ebp),%eax 80105cee: e9 1f 01 00 00 jmp 80105e12 <create+0x1be> iunlockput(ip); 80105cf3: 8b 45 f0 mov -0x10(%ebp),%eax 80105cf6: 89 04 24 mov %eax,(%esp) 80105cf9: e8 d9 bd ff ff call 80101ad7 <iunlockput> return 0; 80105cfe: b8 00 00 00 00 mov $0x0,%eax 80105d03: e9 0a 01 00 00 jmp 80105e12 <create+0x1be> } if((ip = ialloc(dp->dev, type)) == 0) 80105d08: 0f bf 55 d4 movswl -0x2c(%ebp),%edx 80105d0c: 8b 45 f4 mov -0xc(%ebp),%eax 80105d0f: 8b 00 mov (%eax),%eax 80105d11: 89 54 24 04 mov %edx,0x4(%esp) 80105d15: 89 04 24 mov %eax,(%esp) 80105d18: e8 9b b8 ff ff call 801015b8 <ialloc> 80105d1d: 89 45 f0 mov %eax,-0x10(%ebp) 80105d20: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105d24: 75 0c jne 80105d32 <create+0xde> panic("create: ialloc"); 80105d26: c7 04 24 0b 8a 10 80 movl $0x80108a0b,(%esp) 80105d2d: e8 08 a8 ff ff call 8010053a <panic> ilock(ip); 80105d32: 8b 45 f0 mov -0x10(%ebp),%eax 80105d35: 89 04 24 mov %eax,(%esp) 80105d38: e8 16 bb ff ff call 80101853 <ilock> ip->major = major; 80105d3d: 8b 45 f0 mov -0x10(%ebp),%eax 80105d40: 0f b7 55 d0 movzwl -0x30(%ebp),%edx 80105d44: 66 89 50 12 mov %dx,0x12(%eax) ip->minor = minor; 80105d48: 8b 45 f0 mov -0x10(%ebp),%eax 80105d4b: 0f b7 55 cc movzwl -0x34(%ebp),%edx 80105d4f: 66 89 50 14 mov %dx,0x14(%eax) ip->nlink = 1; 80105d53: 8b 45 f0 mov -0x10(%ebp),%eax 80105d56: 66 c7 40 16 01 00 movw $0x1,0x16(%eax) iupdate(ip); 80105d5c: 8b 45 f0 mov -0x10(%ebp),%eax 80105d5f: 89 04 24 mov %eax,(%esp) 80105d62: e8 30 b9 ff ff call 80101697 <iupdate> if(type == T_DIR){ // Create . and .. entries. 80105d67: 66 83 7d d4 01 cmpw $0x1,-0x2c(%ebp) 80105d6c: 75 6a jne 80105dd8 <create+0x184> dp->nlink++; // for ".." 80105d6e: 8b 45 f4 mov -0xc(%ebp),%eax 80105d71: 0f b7 40 16 movzwl 0x16(%eax),%eax 80105d75: 8d 50 01 lea 0x1(%eax),%edx 80105d78: 8b 45 f4 mov -0xc(%ebp),%eax 80105d7b: 66 89 50 16 mov %dx,0x16(%eax) iupdate(dp); 80105d7f: 8b 45 f4 mov -0xc(%ebp),%eax 80105d82: 89 04 24 mov %eax,(%esp) 80105d85: e8 0d b9 ff ff call 80101697 <iupdate> // No ip->nlink++ for ".": avoid cyclic ref count. if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0) 80105d8a: 8b 45 f0 mov -0x10(%ebp),%eax 80105d8d: 8b 40 04 mov 0x4(%eax),%eax 80105d90: 89 44 24 08 mov %eax,0x8(%esp) 80105d94: c7 44 24 04 e5 89 10 movl $0x801089e5,0x4(%esp) 80105d9b: 80 80105d9c: 8b 45 f0 mov -0x10(%ebp),%eax 80105d9f: 89 04 24 mov %eax,(%esp) 80105da2: e8 97 c3 ff ff call 8010213e <dirlink> 80105da7: 85 c0 test %eax,%eax 80105da9: 78 21 js 80105dcc <create+0x178> 80105dab: 8b 45 f4 mov -0xc(%ebp),%eax 80105dae: 8b 40 04 mov 0x4(%eax),%eax 80105db1: 89 44 24 08 mov %eax,0x8(%esp) 80105db5: c7 44 24 04 e7 89 10 movl $0x801089e7,0x4(%esp) 80105dbc: 80 80105dbd: 8b 45 f0 mov -0x10(%ebp),%eax 80105dc0: 89 04 24 mov %eax,(%esp) 80105dc3: e8 76 c3 ff ff call 8010213e <dirlink> 80105dc8: 85 c0 test %eax,%eax 80105dca: 79 0c jns 80105dd8 <create+0x184> panic("create dots"); 80105dcc: c7 04 24 1a 8a 10 80 movl $0x80108a1a,(%esp) 80105dd3: e8 62 a7 ff ff call 8010053a <panic> } if(dirlink(dp, name, ip->inum) < 0) 80105dd8: 8b 45 f0 mov -0x10(%ebp),%eax 80105ddb: 8b 40 04 mov 0x4(%eax),%eax 80105dde: 89 44 24 08 mov %eax,0x8(%esp) 80105de2: 8d 45 de lea -0x22(%ebp),%eax 80105de5: 89 44 24 04 mov %eax,0x4(%esp) 80105de9: 8b 45 f4 mov -0xc(%ebp),%eax 80105dec: 89 04 24 mov %eax,(%esp) 80105def: e8 4a c3 ff ff call 8010213e <dirlink> 80105df4: 85 c0 test %eax,%eax 80105df6: 79 0c jns 80105e04 <create+0x1b0> panic("create: dirlink"); 80105df8: c7 04 24 26 8a 10 80 movl $0x80108a26,(%esp) 80105dff: e8 36 a7 ff ff call 8010053a <panic> iunlockput(dp); 80105e04: 8b 45 f4 mov -0xc(%ebp),%eax 80105e07: 89 04 24 mov %eax,(%esp) 80105e0a: e8 c8 bc ff ff call 80101ad7 <iunlockput> return ip; 80105e0f: 8b 45 f0 mov -0x10(%ebp),%eax } 80105e12: c9 leave 80105e13: c3 ret 80105e14 <sys_open>: int sys_open(void) { 80105e14: 55 push %ebp 80105e15: 89 e5 mov %esp,%ebp 80105e17: 83 ec 38 sub $0x38,%esp char *path; int fd, omode; struct file *f; struct inode *ip; if(argstr(0, &path) < 0 || argint(1, &omode) < 0) 80105e1a: 8d 45 e8 lea -0x18(%ebp),%eax 80105e1d: 89 44 24 04 mov %eax,0x4(%esp) 80105e21: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105e28: e8 e3 f6 ff ff call 80105510 <argstr> 80105e2d: 85 c0 test %eax,%eax 80105e2f: 78 17 js 80105e48 <sys_open+0x34> 80105e31: 8d 45 e4 lea -0x1c(%ebp),%eax 80105e34: 89 44 24 04 mov %eax,0x4(%esp) 80105e38: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80105e3f: e8 3c f6 ff ff call 80105480 <argint> 80105e44: 85 c0 test %eax,%eax 80105e46: 79 0a jns 80105e52 <sys_open+0x3e> return -1; 80105e48: b8 ff ff ff ff mov $0xffffffff,%eax 80105e4d: e9 48 01 00 00 jmp 80105f9a <sys_open+0x186> if(omode & O_CREATE){ 80105e52: 8b 45 e4 mov -0x1c(%ebp),%eax 80105e55: 25 00 02 00 00 and $0x200,%eax 80105e5a: 85 c0 test %eax,%eax 80105e5c: 74 40 je 80105e9e <sys_open+0x8a> begin_trans(); 80105e5e: e8 7a d3 ff ff call 801031dd <begin_trans> ip = create(path, T_FILE, 0, 0); 80105e63: 8b 45 e8 mov -0x18(%ebp),%eax 80105e66: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 80105e6d: 00 80105e6e: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80105e75: 00 80105e76: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp) 80105e7d: 00 80105e7e: 89 04 24 mov %eax,(%esp) 80105e81: e8 ce fd ff ff call 80105c54 <create> 80105e86: 89 45 f4 mov %eax,-0xc(%ebp) commit_trans(); 80105e89: e8 98 d3 ff ff call 80103226 <commit_trans> if(ip == 0) 80105e8e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105e92: 75 5c jne 80105ef0 <sys_open+0xdc> return -1; 80105e94: b8 ff ff ff ff mov $0xffffffff,%eax 80105e99: e9 fc 00 00 00 jmp 80105f9a <sys_open+0x186> } else { if((ip = namei(path)) == 0) 80105e9e: 8b 45 e8 mov -0x18(%ebp),%eax 80105ea1: 89 04 24 mov %eax,(%esp) 80105ea4: e8 55 c5 ff ff call 801023fe <namei> 80105ea9: 89 45 f4 mov %eax,-0xc(%ebp) 80105eac: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105eb0: 75 0a jne 80105ebc <sys_open+0xa8> return -1; 80105eb2: b8 ff ff ff ff mov $0xffffffff,%eax 80105eb7: e9 de 00 00 00 jmp 80105f9a <sys_open+0x186> ilock(ip); 80105ebc: 8b 45 f4 mov -0xc(%ebp),%eax 80105ebf: 89 04 24 mov %eax,(%esp) 80105ec2: e8 8c b9 ff ff call 80101853 <ilock> if(ip->type == T_DIR && omode != O_RDONLY){ 80105ec7: 8b 45 f4 mov -0xc(%ebp),%eax 80105eca: 0f b7 40 10 movzwl 0x10(%eax),%eax 80105ece: 66 83 f8 01 cmp $0x1,%ax 80105ed2: 75 1c jne 80105ef0 <sys_open+0xdc> 80105ed4: 8b 45 e4 mov -0x1c(%ebp),%eax 80105ed7: 85 c0 test %eax,%eax 80105ed9: 74 15 je 80105ef0 <sys_open+0xdc> iunlockput(ip); 80105edb: 8b 45 f4 mov -0xc(%ebp),%eax 80105ede: 89 04 24 mov %eax,(%esp) 80105ee1: e8 f1 bb ff ff call 80101ad7 <iunlockput> return -1; 80105ee6: b8 ff ff ff ff mov $0xffffffff,%eax 80105eeb: e9 aa 00 00 00 jmp 80105f9a <sys_open+0x186> } } if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){ 80105ef0: e8 29 b0 ff ff call 80100f1e <filealloc> 80105ef5: 89 45 f0 mov %eax,-0x10(%ebp) 80105ef8: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105efc: 74 14 je 80105f12 <sys_open+0xfe> 80105efe: 8b 45 f0 mov -0x10(%ebp),%eax 80105f01: 89 04 24 mov %eax,(%esp) 80105f04: e8 42 f7 ff ff call 8010564b <fdalloc> 80105f09: 89 45 ec mov %eax,-0x14(%ebp) 80105f0c: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 80105f10: 79 23 jns 80105f35 <sys_open+0x121> if(f) 80105f12: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80105f16: 74 0b je 80105f23 <sys_open+0x10f> fileclose(f); 80105f18: 8b 45 f0 mov -0x10(%ebp),%eax 80105f1b: 89 04 24 mov %eax,(%esp) 80105f1e: e8 a3 b0 ff ff call 80100fc6 <fileclose> iunlockput(ip); 80105f23: 8b 45 f4 mov -0xc(%ebp),%eax 80105f26: 89 04 24 mov %eax,(%esp) 80105f29: e8 a9 bb ff ff call 80101ad7 <iunlockput> return -1; 80105f2e: b8 ff ff ff ff mov $0xffffffff,%eax 80105f33: eb 65 jmp 80105f9a <sys_open+0x186> } iunlock(ip); 80105f35: 8b 45 f4 mov -0xc(%ebp),%eax 80105f38: 89 04 24 mov %eax,(%esp) 80105f3b: e8 61 ba ff ff call 801019a1 <iunlock> f->type = FD_INODE; 80105f40: 8b 45 f0 mov -0x10(%ebp),%eax 80105f43: c7 00 02 00 00 00 movl $0x2,(%eax) f->ip = ip; 80105f49: 8b 45 f0 mov -0x10(%ebp),%eax 80105f4c: 8b 55 f4 mov -0xc(%ebp),%edx 80105f4f: 89 50 10 mov %edx,0x10(%eax) f->off = 0; 80105f52: 8b 45 f0 mov -0x10(%ebp),%eax 80105f55: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) f->readable = !(omode & O_WRONLY); 80105f5c: 8b 45 e4 mov -0x1c(%ebp),%eax 80105f5f: 83 e0 01 and $0x1,%eax 80105f62: 85 c0 test %eax,%eax 80105f64: 0f 94 c0 sete %al 80105f67: 89 c2 mov %eax,%edx 80105f69: 8b 45 f0 mov -0x10(%ebp),%eax 80105f6c: 88 50 08 mov %dl,0x8(%eax) f->writable = (omode & O_WRONLY) || (omode & O_RDWR); 80105f6f: 8b 45 e4 mov -0x1c(%ebp),%eax 80105f72: 83 e0 01 and $0x1,%eax 80105f75: 85 c0 test %eax,%eax 80105f77: 75 0a jne 80105f83 <sys_open+0x16f> 80105f79: 8b 45 e4 mov -0x1c(%ebp),%eax 80105f7c: 83 e0 02 and $0x2,%eax 80105f7f: 85 c0 test %eax,%eax 80105f81: 74 07 je 80105f8a <sys_open+0x176> 80105f83: b8 01 00 00 00 mov $0x1,%eax 80105f88: eb 05 jmp 80105f8f <sys_open+0x17b> 80105f8a: b8 00 00 00 00 mov $0x0,%eax 80105f8f: 89 c2 mov %eax,%edx 80105f91: 8b 45 f0 mov -0x10(%ebp),%eax 80105f94: 88 50 09 mov %dl,0x9(%eax) return fd; 80105f97: 8b 45 ec mov -0x14(%ebp),%eax } 80105f9a: c9 leave 80105f9b: c3 ret 80105f9c <sys_mkdir>: int sys_mkdir(void) { 80105f9c: 55 push %ebp 80105f9d: 89 e5 mov %esp,%ebp 80105f9f: 83 ec 28 sub $0x28,%esp char *path; struct inode *ip; begin_trans(); 80105fa2: e8 36 d2 ff ff call 801031dd <begin_trans> if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){ 80105fa7: 8d 45 f0 lea -0x10(%ebp),%eax 80105faa: 89 44 24 04 mov %eax,0x4(%esp) 80105fae: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105fb5: e8 56 f5 ff ff call 80105510 <argstr> 80105fba: 85 c0 test %eax,%eax 80105fbc: 78 2c js 80105fea <sys_mkdir+0x4e> 80105fbe: 8b 45 f0 mov -0x10(%ebp),%eax 80105fc1: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 80105fc8: 00 80105fc9: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80105fd0: 00 80105fd1: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80105fd8: 00 80105fd9: 89 04 24 mov %eax,(%esp) 80105fdc: e8 73 fc ff ff call 80105c54 <create> 80105fe1: 89 45 f4 mov %eax,-0xc(%ebp) 80105fe4: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80105fe8: 75 0c jne 80105ff6 <sys_mkdir+0x5a> commit_trans(); 80105fea: e8 37 d2 ff ff call 80103226 <commit_trans> return -1; 80105fef: b8 ff ff ff ff mov $0xffffffff,%eax 80105ff4: eb 15 jmp 8010600b <sys_mkdir+0x6f> } iunlockput(ip); 80105ff6: 8b 45 f4 mov -0xc(%ebp),%eax 80105ff9: 89 04 24 mov %eax,(%esp) 80105ffc: e8 d6 ba ff ff call 80101ad7 <iunlockput> commit_trans(); 80106001: e8 20 d2 ff ff call 80103226 <commit_trans> return 0; 80106006: b8 00 00 00 00 mov $0x0,%eax } 8010600b: c9 leave 8010600c: c3 ret 8010600d <sys_mknod>: int sys_mknod(void) { 8010600d: 55 push %ebp 8010600e: 89 e5 mov %esp,%ebp 80106010: 83 ec 38 sub $0x38,%esp struct inode *ip; char *path; int len; int major, minor; begin_trans(); 80106013: e8 c5 d1 ff ff call 801031dd <begin_trans> if((len=argstr(0, &path)) < 0 || 80106018: 8d 45 ec lea -0x14(%ebp),%eax 8010601b: 89 44 24 04 mov %eax,0x4(%esp) 8010601f: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106026: e8 e5 f4 ff ff call 80105510 <argstr> 8010602b: 89 45 f4 mov %eax,-0xc(%ebp) 8010602e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80106032: 78 5e js 80106092 <sys_mknod+0x85> argint(1, &major) < 0 || 80106034: 8d 45 e8 lea -0x18(%ebp),%eax 80106037: 89 44 24 04 mov %eax,0x4(%esp) 8010603b: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80106042: e8 39 f4 ff ff call 80105480 <argint> char *path; int len; int major, minor; begin_trans(); if((len=argstr(0, &path)) < 0 || 80106047: 85 c0 test %eax,%eax 80106049: 78 47 js 80106092 <sys_mknod+0x85> argint(1, &major) < 0 || argint(2, &minor) < 0 || 8010604b: 8d 45 e4 lea -0x1c(%ebp),%eax 8010604e: 89 44 24 04 mov %eax,0x4(%esp) 80106052: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80106059: e8 22 f4 ff ff call 80105480 <argint> int len; int major, minor; begin_trans(); if((len=argstr(0, &path)) < 0 || argint(1, &major) < 0 || 8010605e: 85 c0 test %eax,%eax 80106060: 78 30 js 80106092 <sys_mknod+0x85> argint(2, &minor) < 0 || (ip = create(path, T_DEV, major, minor)) == 0){ 80106062: 8b 45 e4 mov -0x1c(%ebp),%eax 80106065: 0f bf c8 movswl %ax,%ecx 80106068: 8b 45 e8 mov -0x18(%ebp),%eax 8010606b: 0f bf d0 movswl %ax,%edx 8010606e: 8b 45 ec mov -0x14(%ebp),%eax int major, minor; begin_trans(); if((len=argstr(0, &path)) < 0 || argint(1, &major) < 0 || argint(2, &minor) < 0 || 80106071: 89 4c 24 0c mov %ecx,0xc(%esp) 80106075: 89 54 24 08 mov %edx,0x8(%esp) 80106079: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp) 80106080: 00 80106081: 89 04 24 mov %eax,(%esp) 80106084: e8 cb fb ff ff call 80105c54 <create> 80106089: 89 45 f0 mov %eax,-0x10(%ebp) 8010608c: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80106090: 75 0c jne 8010609e <sys_mknod+0x91> (ip = create(path, T_DEV, major, minor)) == 0){ commit_trans(); 80106092: e8 8f d1 ff ff call 80103226 <commit_trans> return -1; 80106097: b8 ff ff ff ff mov $0xffffffff,%eax 8010609c: eb 15 jmp 801060b3 <sys_mknod+0xa6> } iunlockput(ip); 8010609e: 8b 45 f0 mov -0x10(%ebp),%eax 801060a1: 89 04 24 mov %eax,(%esp) 801060a4: e8 2e ba ff ff call 80101ad7 <iunlockput> commit_trans(); 801060a9: e8 78 d1 ff ff call 80103226 <commit_trans> return 0; 801060ae: b8 00 00 00 00 mov $0x0,%eax } 801060b3: c9 leave 801060b4: c3 ret 801060b5 <sys_chdir>: int sys_chdir(void) { 801060b5: 55 push %ebp 801060b6: 89 e5 mov %esp,%ebp 801060b8: 83 ec 28 sub $0x28,%esp char *path; struct inode *ip; if(argstr(0, &path) < 0 || (ip = namei(path)) == 0) 801060bb: 8d 45 f0 lea -0x10(%ebp),%eax 801060be: 89 44 24 04 mov %eax,0x4(%esp) 801060c2: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801060c9: e8 42 f4 ff ff call 80105510 <argstr> 801060ce: 85 c0 test %eax,%eax 801060d0: 78 14 js 801060e6 <sys_chdir+0x31> 801060d2: 8b 45 f0 mov -0x10(%ebp),%eax 801060d5: 89 04 24 mov %eax,(%esp) 801060d8: e8 21 c3 ff ff call 801023fe <namei> 801060dd: 89 45 f4 mov %eax,-0xc(%ebp) 801060e0: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801060e4: 75 07 jne 801060ed <sys_chdir+0x38> return -1; 801060e6: b8 ff ff ff ff mov $0xffffffff,%eax 801060eb: eb 57 jmp 80106144 <sys_chdir+0x8f> ilock(ip); 801060ed: 8b 45 f4 mov -0xc(%ebp),%eax 801060f0: 89 04 24 mov %eax,(%esp) 801060f3: e8 5b b7 ff ff call 80101853 <ilock> if(ip->type != T_DIR){ 801060f8: 8b 45 f4 mov -0xc(%ebp),%eax 801060fb: 0f b7 40 10 movzwl 0x10(%eax),%eax 801060ff: 66 83 f8 01 cmp $0x1,%ax 80106103: 74 12 je 80106117 <sys_chdir+0x62> iunlockput(ip); 80106105: 8b 45 f4 mov -0xc(%ebp),%eax 80106108: 89 04 24 mov %eax,(%esp) 8010610b: e8 c7 b9 ff ff call 80101ad7 <iunlockput> return -1; 80106110: b8 ff ff ff ff mov $0xffffffff,%eax 80106115: eb 2d jmp 80106144 <sys_chdir+0x8f> } iunlock(ip); 80106117: 8b 45 f4 mov -0xc(%ebp),%eax 8010611a: 89 04 24 mov %eax,(%esp) 8010611d: e8 7f b8 ff ff call 801019a1 <iunlock> iput(proc->cwd); 80106122: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106128: 8b 40 68 mov 0x68(%eax),%eax 8010612b: 89 04 24 mov %eax,(%esp) 8010612e: e8 d3 b8 ff ff call 80101a06 <iput> proc->cwd = ip; 80106133: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106139: 8b 55 f4 mov -0xc(%ebp),%edx 8010613c: 89 50 68 mov %edx,0x68(%eax) return 0; 8010613f: b8 00 00 00 00 mov $0x0,%eax } 80106144: c9 leave 80106145: c3 ret 80106146 <sys_exec>: int sys_exec(void) { 80106146: 55 push %ebp 80106147: 89 e5 mov %esp,%ebp 80106149: 81 ec a8 00 00 00 sub $0xa8,%esp char *path, *argv[MAXARG]; int i; uint uargv, uarg; if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){ 8010614f: 8d 45 f0 lea -0x10(%ebp),%eax 80106152: 89 44 24 04 mov %eax,0x4(%esp) 80106156: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010615d: e8 ae f3 ff ff call 80105510 <argstr> 80106162: 85 c0 test %eax,%eax 80106164: 78 1a js 80106180 <sys_exec+0x3a> 80106166: 8d 85 6c ff ff ff lea -0x94(%ebp),%eax 8010616c: 89 44 24 04 mov %eax,0x4(%esp) 80106170: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80106177: e8 04 f3 ff ff call 80105480 <argint> 8010617c: 85 c0 test %eax,%eax 8010617e: 79 0a jns 8010618a <sys_exec+0x44> return -1; 80106180: b8 ff ff ff ff mov $0xffffffff,%eax 80106185: e9 c8 00 00 00 jmp 80106252 <sys_exec+0x10c> } memset(argv, 0, sizeof(argv)); 8010618a: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp) 80106191: 00 80106192: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106199: 00 8010619a: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax 801061a0: 89 04 24 mov %eax,(%esp) 801061a3: e8 96 ef ff ff call 8010513e <memset> for(i=0;; i++){ 801061a8: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) if(i >= NELEM(argv)) 801061af: 8b 45 f4 mov -0xc(%ebp),%eax 801061b2: 83 f8 1f cmp $0x1f,%eax 801061b5: 76 0a jbe 801061c1 <sys_exec+0x7b> return -1; 801061b7: b8 ff ff ff ff mov $0xffffffff,%eax 801061bc: e9 91 00 00 00 jmp 80106252 <sys_exec+0x10c> if(fetchint(uargv+4*i, (int*)&uarg) < 0) 801061c1: 8b 45 f4 mov -0xc(%ebp),%eax 801061c4: c1 e0 02 shl $0x2,%eax 801061c7: 89 c2 mov %eax,%edx 801061c9: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax 801061cf: 01 c2 add %eax,%edx 801061d1: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax 801061d7: 89 44 24 04 mov %eax,0x4(%esp) 801061db: 89 14 24 mov %edx,(%esp) 801061de: e8 01 f2 ff ff call 801053e4 <fetchint> 801061e3: 85 c0 test %eax,%eax 801061e5: 79 07 jns 801061ee <sys_exec+0xa8> return -1; 801061e7: b8 ff ff ff ff mov $0xffffffff,%eax 801061ec: eb 64 jmp 80106252 <sys_exec+0x10c> if(uarg == 0){ 801061ee: 8b 85 68 ff ff ff mov -0x98(%ebp),%eax 801061f4: 85 c0 test %eax,%eax 801061f6: 75 26 jne 8010621e <sys_exec+0xd8> argv[i] = 0; 801061f8: 8b 45 f4 mov -0xc(%ebp),%eax 801061fb: c7 84 85 70 ff ff ff movl $0x0,-0x90(%ebp,%eax,4) 80106202: 00 00 00 00 break; 80106206: 90 nop } if(fetchstr(uarg, &argv[i]) < 0) return -1; } return exec(path, argv); 80106207: 8b 45 f0 mov -0x10(%ebp),%eax 8010620a: 8d 95 70 ff ff ff lea -0x90(%ebp),%edx 80106210: 89 54 24 04 mov %edx,0x4(%esp) 80106214: 89 04 24 mov %eax,(%esp) 80106217: e8 d3 a8 ff ff call 80100aef <exec> 8010621c: eb 34 jmp 80106252 <sys_exec+0x10c> return -1; if(uarg == 0){ argv[i] = 0; break; } if(fetchstr(uarg, &argv[i]) < 0) 8010621e: 8d 85 70 ff ff ff lea -0x90(%ebp),%eax 80106224: 8b 55 f4 mov -0xc(%ebp),%edx 80106227: c1 e2 02 shl $0x2,%edx 8010622a: 01 c2 add %eax,%edx 8010622c: 8b 85 68 ff ff ff mov -0x98(%ebp),%eax 80106232: 89 54 24 04 mov %edx,0x4(%esp) 80106236: 89 04 24 mov %eax,(%esp) 80106239: e8 e0 f1 ff ff call 8010541e <fetchstr> 8010623e: 85 c0 test %eax,%eax 80106240: 79 07 jns 80106249 <sys_exec+0x103> return -1; 80106242: b8 ff ff ff ff mov $0xffffffff,%eax 80106247: eb 09 jmp 80106252 <sys_exec+0x10c> if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){ return -1; } memset(argv, 0, sizeof(argv)); for(i=0;; i++){ 80106249: 83 45 f4 01 addl $0x1,-0xc(%ebp) argv[i] = 0; break; } if(fetchstr(uarg, &argv[i]) < 0) return -1; } 8010624d: e9 5d ff ff ff jmp 801061af <sys_exec+0x69> return exec(path, argv); } 80106252: c9 leave 80106253: c3 ret 80106254 <sys_pipe>: int sys_pipe(void) { 80106254: 55 push %ebp 80106255: 89 e5 mov %esp,%ebp 80106257: 83 ec 38 sub $0x38,%esp int *fd; struct file *rf, *wf; int fd0, fd1; if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0) 8010625a: c7 44 24 08 08 00 00 movl $0x8,0x8(%esp) 80106261: 00 80106262: 8d 45 ec lea -0x14(%ebp),%eax 80106265: 89 44 24 04 mov %eax,0x4(%esp) 80106269: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106270: e8 39 f2 ff ff call 801054ae <argptr> 80106275: 85 c0 test %eax,%eax 80106277: 79 0a jns 80106283 <sys_pipe+0x2f> return -1; 80106279: b8 ff ff ff ff mov $0xffffffff,%eax 8010627e: e9 9b 00 00 00 jmp 8010631e <sys_pipe+0xca> if(pipealloc(&rf, &wf) < 0) 80106283: 8d 45 e4 lea -0x1c(%ebp),%eax 80106286: 89 44 24 04 mov %eax,0x4(%esp) 8010628a: 8d 45 e8 lea -0x18(%ebp),%eax 8010628d: 89 04 24 mov %eax,(%esp) 80106290: e8 32 d9 ff ff call 80103bc7 <pipealloc> 80106295: 85 c0 test %eax,%eax 80106297: 79 07 jns 801062a0 <sys_pipe+0x4c> return -1; 80106299: b8 ff ff ff ff mov $0xffffffff,%eax 8010629e: eb 7e jmp 8010631e <sys_pipe+0xca> fd0 = -1; 801062a0: c7 45 f4 ff ff ff ff movl $0xffffffff,-0xc(%ebp) if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){ 801062a7: 8b 45 e8 mov -0x18(%ebp),%eax 801062aa: 89 04 24 mov %eax,(%esp) 801062ad: e8 99 f3 ff ff call 8010564b <fdalloc> 801062b2: 89 45 f4 mov %eax,-0xc(%ebp) 801062b5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801062b9: 78 14 js 801062cf <sys_pipe+0x7b> 801062bb: 8b 45 e4 mov -0x1c(%ebp),%eax 801062be: 89 04 24 mov %eax,(%esp) 801062c1: e8 85 f3 ff ff call 8010564b <fdalloc> 801062c6: 89 45 f0 mov %eax,-0x10(%ebp) 801062c9: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 801062cd: 79 37 jns 80106306 <sys_pipe+0xb2> if(fd0 >= 0) 801062cf: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 801062d3: 78 14 js 801062e9 <sys_pipe+0x95> proc->ofile[fd0] = 0; 801062d5: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801062db: 8b 55 f4 mov -0xc(%ebp),%edx 801062de: 83 c2 08 add $0x8,%edx 801062e1: c7 44 90 08 00 00 00 movl $0x0,0x8(%eax,%edx,4) 801062e8: 00 fileclose(rf); 801062e9: 8b 45 e8 mov -0x18(%ebp),%eax 801062ec: 89 04 24 mov %eax,(%esp) 801062ef: e8 d2 ac ff ff call 80100fc6 <fileclose> fileclose(wf); 801062f4: 8b 45 e4 mov -0x1c(%ebp),%eax 801062f7: 89 04 24 mov %eax,(%esp) 801062fa: e8 c7 ac ff ff call 80100fc6 <fileclose> return -1; 801062ff: b8 ff ff ff ff mov $0xffffffff,%eax 80106304: eb 18 jmp 8010631e <sys_pipe+0xca> } fd[0] = fd0; 80106306: 8b 45 ec mov -0x14(%ebp),%eax 80106309: 8b 55 f4 mov -0xc(%ebp),%edx 8010630c: 89 10 mov %edx,(%eax) fd[1] = fd1; 8010630e: 8b 45 ec mov -0x14(%ebp),%eax 80106311: 8d 50 04 lea 0x4(%eax),%edx 80106314: 8b 45 f0 mov -0x10(%ebp),%eax 80106317: 89 02 mov %eax,(%edx) return 0; 80106319: b8 00 00 00 00 mov $0x0,%eax } 8010631e: c9 leave 8010631f: c3 ret 80106320 <sys_fork>: #include "mmu.h" #include "proc.h" int sys_fork(void) { 80106320: 55 push %ebp 80106321: 89 e5 mov %esp,%ebp 80106323: 83 ec 08 sub $0x8,%esp return fork(); 80106326: e8 cc df ff ff call 801042f7 <fork> } 8010632b: c9 leave 8010632c: c3 ret 8010632d <sys_clone>: int sys_clone(){ 8010632d: 55 push %ebp 8010632e: 89 e5 mov %esp,%ebp 80106330: 53 push %ebx 80106331: 83 ec 24 sub $0x24,%esp int stack; int size; int routine; int arg; if(argint(1,&size) < 0 || size <=0 || argint(0,&stack) <0 || 80106334: 8d 45 f0 lea -0x10(%ebp),%eax 80106337: 89 44 24 04 mov %eax,0x4(%esp) 8010633b: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80106342: e8 39 f1 ff ff call 80105480 <argint> 80106347: 85 c0 test %eax,%eax 80106349: 78 4c js 80106397 <sys_clone+0x6a> 8010634b: 8b 45 f0 mov -0x10(%ebp),%eax 8010634e: 85 c0 test %eax,%eax 80106350: 7e 45 jle 80106397 <sys_clone+0x6a> 80106352: 8d 45 f4 lea -0xc(%ebp),%eax 80106355: 89 44 24 04 mov %eax,0x4(%esp) 80106359: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106360: e8 1b f1 ff ff call 80105480 <argint> 80106365: 85 c0 test %eax,%eax 80106367: 78 2e js 80106397 <sys_clone+0x6a> argint(2,&routine) < 0 || argint(3,&arg)<0){ 80106369: 8d 45 ec lea -0x14(%ebp),%eax 8010636c: 89 44 24 04 mov %eax,0x4(%esp) 80106370: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80106377: e8 04 f1 ff ff call 80105480 <argint> int stack; int size; int routine; int arg; if(argint(1,&size) < 0 || size <=0 || argint(0,&stack) <0 || 8010637c: 85 c0 test %eax,%eax 8010637e: 78 17 js 80106397 <sys_clone+0x6a> argint(2,&routine) < 0 || argint(3,&arg)<0){ 80106380: 8d 45 e8 lea -0x18(%ebp),%eax 80106383: 89 44 24 04 mov %eax,0x4(%esp) 80106387: c7 04 24 03 00 00 00 movl $0x3,(%esp) 8010638e: e8 ed f0 ff ff call 80105480 <argint> 80106393: 85 c0 test %eax,%eax 80106395: 79 07 jns 8010639e <sys_clone+0x71> return -1; 80106397: b8 ff ff ff ff mov $0xffffffff,%eax 8010639c: eb 20 jmp 801063be <sys_clone+0x91> } return clone(stack,size,routine,arg); 8010639e: 8b 5d e8 mov -0x18(%ebp),%ebx 801063a1: 8b 4d ec mov -0x14(%ebp),%ecx 801063a4: 8b 55 f0 mov -0x10(%ebp),%edx 801063a7: 8b 45 f4 mov -0xc(%ebp),%eax 801063aa: 89 5c 24 0c mov %ebx,0xc(%esp) 801063ae: 89 4c 24 08 mov %ecx,0x8(%esp) 801063b2: 89 54 24 04 mov %edx,0x4(%esp) 801063b6: 89 04 24 mov %eax,(%esp) 801063b9: e8 a9 e0 ff ff call 80104467 <clone> } 801063be: 83 c4 24 add $0x24,%esp 801063c1: 5b pop %ebx 801063c2: 5d pop %ebp 801063c3: c3 ret 801063c4 <sys_exit>: int sys_exit(void) { 801063c4: 55 push %ebp 801063c5: 89 e5 mov %esp,%ebp 801063c7: 83 ec 08 sub $0x8,%esp exit(); 801063ca: e8 bb e2 ff ff call 8010468a <exit> return 0; // not reached 801063cf: b8 00 00 00 00 mov $0x0,%eax } 801063d4: c9 leave 801063d5: c3 ret 801063d6 <sys_texit>: int sys_texit(void) { 801063d6: 55 push %ebp 801063d7: 89 e5 mov %esp,%ebp 801063d9: 83 ec 08 sub $0x8,%esp texit(); 801063dc: e8 c4 e3 ff ff call 801047a5 <texit> return 0; 801063e1: b8 00 00 00 00 mov $0x0,%eax } 801063e6: c9 leave 801063e7: c3 ret 801063e8 <sys_wait>: int sys_wait(void) { 801063e8: 55 push %ebp 801063e9: 89 e5 mov %esp,%ebp 801063eb: 83 ec 08 sub $0x8,%esp return wait(); 801063ee: e8 80 e4 ff ff call 80104873 <wait> } 801063f3: c9 leave 801063f4: c3 ret 801063f5 <sys_kill>: int sys_kill(void) { 801063f5: 55 push %ebp 801063f6: 89 e5 mov %esp,%ebp 801063f8: 83 ec 28 sub $0x28,%esp int pid; if(argint(0, &pid) < 0) 801063fb: 8d 45 f4 lea -0xc(%ebp),%eax 801063fe: 89 44 24 04 mov %eax,0x4(%esp) 80106402: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106409: e8 72 f0 ff ff call 80105480 <argint> 8010640e: 85 c0 test %eax,%eax 80106410: 79 07 jns 80106419 <sys_kill+0x24> return -1; 80106412: b8 ff ff ff ff mov $0xffffffff,%eax 80106417: eb 0b jmp 80106424 <sys_kill+0x2f> return kill(pid); 80106419: 8b 45 f4 mov -0xc(%ebp),%eax 8010641c: 89 04 24 mov %eax,(%esp) 8010641f: e8 b2 e8 ff ff call 80104cd6 <kill> } 80106424: c9 leave 80106425: c3 ret 80106426 <sys_getpid>: int sys_getpid(void) { 80106426: 55 push %ebp 80106427: 89 e5 mov %esp,%ebp return proc->pid; 80106429: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010642f: 8b 40 10 mov 0x10(%eax),%eax } 80106432: 5d pop %ebp 80106433: c3 ret 80106434 <sys_sbrk>: int sys_sbrk(void) { 80106434: 55 push %ebp 80106435: 89 e5 mov %esp,%ebp 80106437: 83 ec 28 sub $0x28,%esp int addr; int n; if(argint(0, &n) < 0) 8010643a: 8d 45 f0 lea -0x10(%ebp),%eax 8010643d: 89 44 24 04 mov %eax,0x4(%esp) 80106441: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106448: e8 33 f0 ff ff call 80105480 <argint> 8010644d: 85 c0 test %eax,%eax 8010644f: 79 07 jns 80106458 <sys_sbrk+0x24> return -1; 80106451: b8 ff ff ff ff mov $0xffffffff,%eax 80106456: eb 24 jmp 8010647c <sys_sbrk+0x48> addr = proc->sz; 80106458: 65 a1 04 00 00 00 mov %gs:0x4,%eax 8010645e: 8b 00 mov (%eax),%eax 80106460: 89 45 f4 mov %eax,-0xc(%ebp) if(growproc(n) < 0) 80106463: 8b 45 f0 mov -0x10(%ebp),%eax 80106466: 89 04 24 mov %eax,(%esp) 80106469: e8 e4 dd ff ff call 80104252 <growproc> 8010646e: 85 c0 test %eax,%eax 80106470: 79 07 jns 80106479 <sys_sbrk+0x45> return -1; 80106472: b8 ff ff ff ff mov $0xffffffff,%eax 80106477: eb 03 jmp 8010647c <sys_sbrk+0x48> return addr; 80106479: 8b 45 f4 mov -0xc(%ebp),%eax } 8010647c: c9 leave 8010647d: c3 ret 8010647e <sys_sleep>: int sys_sleep(void) { 8010647e: 55 push %ebp 8010647f: 89 e5 mov %esp,%ebp 80106481: 83 ec 28 sub $0x28,%esp int n; uint ticks0; if(argint(0, &n) < 0) 80106484: 8d 45 f0 lea -0x10(%ebp),%eax 80106487: 89 44 24 04 mov %eax,0x4(%esp) 8010648b: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106492: e8 e9 ef ff ff call 80105480 <argint> 80106497: 85 c0 test %eax,%eax 80106499: 79 07 jns 801064a2 <sys_sleep+0x24> return -1; 8010649b: b8 ff ff ff ff mov $0xffffffff,%eax 801064a0: eb 6c jmp 8010650e <sys_sleep+0x90> acquire(&tickslock); 801064a2: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 801064a9: e8 3c ea ff ff call 80104eea <acquire> ticks0 = ticks; 801064ae: a1 c0 28 11 80 mov 0x801128c0,%eax 801064b3: 89 45 f4 mov %eax,-0xc(%ebp) while(ticks - ticks0 < n){ 801064b6: eb 34 jmp 801064ec <sys_sleep+0x6e> if(proc->killed){ 801064b8: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801064be: 8b 40 24 mov 0x24(%eax),%eax 801064c1: 85 c0 test %eax,%eax 801064c3: 74 13 je 801064d8 <sys_sleep+0x5a> release(&tickslock); 801064c5: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 801064cc: e8 7b ea ff ff call 80104f4c <release> return -1; 801064d1: b8 ff ff ff ff mov $0xffffffff,%eax 801064d6: eb 36 jmp 8010650e <sys_sleep+0x90> } sleep(&ticks, &tickslock); 801064d8: c7 44 24 04 80 20 11 movl $0x80112080,0x4(%esp) 801064df: 80 801064e0: c7 04 24 c0 28 11 80 movl $0x801128c0,(%esp) 801064e7: e8 7b e6 ff ff call 80104b67 <sleep> if(argint(0, &n) < 0) return -1; acquire(&tickslock); ticks0 = ticks; while(ticks - ticks0 < n){ 801064ec: a1 c0 28 11 80 mov 0x801128c0,%eax 801064f1: 2b 45 f4 sub -0xc(%ebp),%eax 801064f4: 89 c2 mov %eax,%edx 801064f6: 8b 45 f0 mov -0x10(%ebp),%eax 801064f9: 39 c2 cmp %eax,%edx 801064fb: 72 bb jb 801064b8 <sys_sleep+0x3a> release(&tickslock); return -1; } sleep(&ticks, &tickslock); } release(&tickslock); 801064fd: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 80106504: e8 43 ea ff ff call 80104f4c <release> return 0; 80106509: b8 00 00 00 00 mov $0x0,%eax } 8010650e: c9 leave 8010650f: c3 ret 80106510 <sys_uptime>: // return how many clock tick interrupts have occurred // since start. int sys_uptime(void) { 80106510: 55 push %ebp 80106511: 89 e5 mov %esp,%ebp 80106513: 83 ec 28 sub $0x28,%esp uint xticks; acquire(&tickslock); 80106516: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 8010651d: e8 c8 e9 ff ff call 80104eea <acquire> xticks = ticks; 80106522: a1 c0 28 11 80 mov 0x801128c0,%eax 80106527: 89 45 f4 mov %eax,-0xc(%ebp) release(&tickslock); 8010652a: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 80106531: e8 16 ea ff ff call 80104f4c <release> return xticks; 80106536: 8b 45 f4 mov -0xc(%ebp),%eax } 80106539: c9 leave 8010653a: c3 ret 8010653b <sys_tsleep>: int sys_tsleep(void) { 8010653b: 55 push %ebp 8010653c: 89 e5 mov %esp,%ebp 8010653e: 83 ec 08 sub $0x8,%esp tsleep(); 80106541: e8 05 e9 ff ff call 80104e4b <tsleep> return 0; 80106546: b8 00 00 00 00 mov $0x0,%eax } 8010654b: c9 leave 8010654c: c3 ret 8010654d <sys_twakeup>: int sys_twakeup(void) { 8010654d: 55 push %ebp 8010654e: 89 e5 mov %esp,%ebp 80106550: 83 ec 28 sub $0x28,%esp int tid; if(argint(0,&tid) < 0){ 80106553: 8d 45 f4 lea -0xc(%ebp),%eax 80106556: 89 44 24 04 mov %eax,0x4(%esp) 8010655a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106561: e8 1a ef ff ff call 80105480 <argint> 80106566: 85 c0 test %eax,%eax 80106568: 79 07 jns 80106571 <sys_twakeup+0x24> return -1; 8010656a: b8 ff ff ff ff mov $0xffffffff,%eax 8010656f: eb 10 jmp 80106581 <sys_twakeup+0x34> } twakeup(tid); 80106571: 8b 45 f4 mov -0xc(%ebp),%eax 80106574: 89 04 24 mov %eax,(%esp) 80106577: e8 c7 e6 ff ff call 80104c43 <twakeup> return 0; 8010657c: b8 00 00 00 00 mov $0x0,%eax } 80106581: c9 leave 80106582: c3 ret 80106583 <sys_test>: int sys_test(void) { 80106583: 55 push %ebp 80106584: 89 e5 mov %esp,%ebp 80106586: 83 ec 28 sub $0x28,%esp int id; if(argint(0,&id) < 0){ 80106589: 8d 45 f4 lea -0xc(%ebp),%eax 8010658c: 89 44 24 04 mov %eax,0x4(%esp) 80106590: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106597: e8 e4 ee ff ff call 80105480 <argint> 8010659c: 85 c0 test %eax,%eax 8010659e: 79 07 jns 801065a7 <sys_test+0x24> return -1; 801065a0: b8 ff ff ff ff mov $0xffffffff,%eax 801065a5: eb 10 jmp 801065b7 <sys_test+0x34> } test(id); 801065a7: 8b 45 f4 mov -0xc(%ebp),%eax 801065aa: 89 04 24 mov %eax,(%esp) 801065ad: e8 cf e8 ff ff call 80104e81 <test> return 0; 801065b2: b8 00 00 00 00 mov $0x0,%eax } 801065b7: c9 leave 801065b8: c3 ret 801065b9 <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 801065b9: 55 push %ebp 801065ba: 89 e5 mov %esp,%ebp 801065bc: 83 ec 08 sub $0x8,%esp 801065bf: 8b 55 08 mov 0x8(%ebp),%edx 801065c2: 8b 45 0c mov 0xc(%ebp),%eax 801065c5: 66 89 55 fc mov %dx,-0x4(%ebp) 801065c9: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801065cc: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 801065d0: 0f b7 55 fc movzwl -0x4(%ebp),%edx 801065d4: ee out %al,(%dx) } 801065d5: c9 leave 801065d6: c3 ret 801065d7 <timerinit>: #define TIMER_RATEGEN 0x04 // mode 2, rate generator #define TIMER_16BIT 0x30 // r/w counter 16 bits, LSB first void timerinit(void) { 801065d7: 55 push %ebp 801065d8: 89 e5 mov %esp,%ebp 801065da: 83 ec 18 sub $0x18,%esp // Interrupt 100 times/sec. outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); 801065dd: c7 44 24 04 34 00 00 movl $0x34,0x4(%esp) 801065e4: 00 801065e5: c7 04 24 43 00 00 00 movl $0x43,(%esp) 801065ec: e8 c8 ff ff ff call 801065b9 <outb> outb(IO_TIMER1, TIMER_DIV(100) % 256); 801065f1: c7 44 24 04 9c 00 00 movl $0x9c,0x4(%esp) 801065f8: 00 801065f9: c7 04 24 40 00 00 00 movl $0x40,(%esp) 80106600: e8 b4 ff ff ff call 801065b9 <outb> outb(IO_TIMER1, TIMER_DIV(100) / 256); 80106605: c7 44 24 04 2e 00 00 movl $0x2e,0x4(%esp) 8010660c: 00 8010660d: c7 04 24 40 00 00 00 movl $0x40,(%esp) 80106614: e8 a0 ff ff ff call 801065b9 <outb> picenable(IRQ_TIMER); 80106619: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80106620: e8 35 d4 ff ff call 80103a5a <picenable> } 80106625: c9 leave 80106626: c3 ret 80106627 <alltraps>: # vectors.S sends all traps here. .globl alltraps alltraps: # Build trap frame. pushl %ds 80106627: 1e push %ds pushl %es 80106628: 06 push %es pushl %fs 80106629: 0f a0 push %fs pushl %gs 8010662b: 0f a8 push %gs pushal 8010662d: 60 pusha # Set up data and per-cpu segments. movw $(SEG_KDATA<<3), %ax 8010662e: 66 b8 10 00 mov $0x10,%ax movw %ax, %ds 80106632: 8e d8 mov %eax,%ds movw %ax, %es 80106634: 8e c0 mov %eax,%es movw $(SEG_KCPU<<3), %ax 80106636: 66 b8 18 00 mov $0x18,%ax movw %ax, %fs 8010663a: 8e e0 mov %eax,%fs movw %ax, %gs 8010663c: 8e e8 mov %eax,%gs # Call trap(tf), where tf=%esp pushl %esp 8010663e: 54 push %esp call trap 8010663f: e8 d8 01 00 00 call 8010681c <trap> addl $4, %esp 80106644: 83 c4 04 add $0x4,%esp 80106647 <trapret>: # Return falls through to trapret... .globl trapret trapret: popal 80106647: 61 popa popl %gs 80106648: 0f a9 pop %gs popl %fs 8010664a: 0f a1 pop %fs popl %es 8010664c: 07 pop %es popl %ds 8010664d: 1f pop %ds addl $0x8, %esp # trapno and errcode 8010664e: 83 c4 08 add $0x8,%esp iret 80106651: cf iret 80106652 <lidt>: struct gatedesc; static inline void lidt(struct gatedesc *p, int size) { 80106652: 55 push %ebp 80106653: 89 e5 mov %esp,%ebp 80106655: 83 ec 10 sub $0x10,%esp volatile ushort pd[3]; pd[0] = size-1; 80106658: 8b 45 0c mov 0xc(%ebp),%eax 8010665b: 83 e8 01 sub $0x1,%eax 8010665e: 66 89 45 fa mov %ax,-0x6(%ebp) pd[1] = (uint)p; 80106662: 8b 45 08 mov 0x8(%ebp),%eax 80106665: 66 89 45 fc mov %ax,-0x4(%ebp) pd[2] = (uint)p >> 16; 80106669: 8b 45 08 mov 0x8(%ebp),%eax 8010666c: c1 e8 10 shr $0x10,%eax 8010666f: 66 89 45 fe mov %ax,-0x2(%ebp) asm volatile("lidt (%0)" : : "r" (pd)); 80106673: 8d 45 fa lea -0x6(%ebp),%eax 80106676: 0f 01 18 lidtl (%eax) } 80106679: c9 leave 8010667a: c3 ret 8010667b <rcr2>: return result; } static inline uint rcr2(void) { 8010667b: 55 push %ebp 8010667c: 89 e5 mov %esp,%ebp 8010667e: 83 ec 10 sub $0x10,%esp uint val; asm volatile("movl %%cr2,%0" : "=r" (val)); 80106681: 0f 20 d0 mov %cr2,%eax 80106684: 89 45 fc mov %eax,-0x4(%ebp) return val; 80106687: 8b 45 fc mov -0x4(%ebp),%eax } 8010668a: c9 leave 8010668b: c3 ret 8010668c <tvinit>: struct spinlock tickslock; uint ticks; void tvinit(void) { 8010668c: 55 push %ebp 8010668d: 89 e5 mov %esp,%ebp 8010668f: 83 ec 28 sub $0x28,%esp int i; for(i = 0; i < 256; i++) 80106692: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80106699: e9 c3 00 00 00 jmp 80106761 <tvinit+0xd5> SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0); 8010669e: 8b 45 f4 mov -0xc(%ebp),%eax 801066a1: 8b 04 85 ac b0 10 80 mov -0x7fef4f54(,%eax,4),%eax 801066a8: 89 c2 mov %eax,%edx 801066aa: 8b 45 f4 mov -0xc(%ebp),%eax 801066ad: 66 89 14 c5 c0 20 11 mov %dx,-0x7feedf40(,%eax,8) 801066b4: 80 801066b5: 8b 45 f4 mov -0xc(%ebp),%eax 801066b8: 66 c7 04 c5 c2 20 11 movw $0x8,-0x7feedf3e(,%eax,8) 801066bf: 80 08 00 801066c2: 8b 45 f4 mov -0xc(%ebp),%eax 801066c5: 0f b6 14 c5 c4 20 11 movzbl -0x7feedf3c(,%eax,8),%edx 801066cc: 80 801066cd: 83 e2 e0 and $0xffffffe0,%edx 801066d0: 88 14 c5 c4 20 11 80 mov %dl,-0x7feedf3c(,%eax,8) 801066d7: 8b 45 f4 mov -0xc(%ebp),%eax 801066da: 0f b6 14 c5 c4 20 11 movzbl -0x7feedf3c(,%eax,8),%edx 801066e1: 80 801066e2: 83 e2 1f and $0x1f,%edx 801066e5: 88 14 c5 c4 20 11 80 mov %dl,-0x7feedf3c(,%eax,8) 801066ec: 8b 45 f4 mov -0xc(%ebp),%eax 801066ef: 0f b6 14 c5 c5 20 11 movzbl -0x7feedf3b(,%eax,8),%edx 801066f6: 80 801066f7: 83 e2 f0 and $0xfffffff0,%edx 801066fa: 83 ca 0e or $0xe,%edx 801066fd: 88 14 c5 c5 20 11 80 mov %dl,-0x7feedf3b(,%eax,8) 80106704: 8b 45 f4 mov -0xc(%ebp),%eax 80106707: 0f b6 14 c5 c5 20 11 movzbl -0x7feedf3b(,%eax,8),%edx 8010670e: 80 8010670f: 83 e2 ef and $0xffffffef,%edx 80106712: 88 14 c5 c5 20 11 80 mov %dl,-0x7feedf3b(,%eax,8) 80106719: 8b 45 f4 mov -0xc(%ebp),%eax 8010671c: 0f b6 14 c5 c5 20 11 movzbl -0x7feedf3b(,%eax,8),%edx 80106723: 80 80106724: 83 e2 9f and $0xffffff9f,%edx 80106727: 88 14 c5 c5 20 11 80 mov %dl,-0x7feedf3b(,%eax,8) 8010672e: 8b 45 f4 mov -0xc(%ebp),%eax 80106731: 0f b6 14 c5 c5 20 11 movzbl -0x7feedf3b(,%eax,8),%edx 80106738: 80 80106739: 83 ca 80 or $0xffffff80,%edx 8010673c: 88 14 c5 c5 20 11 80 mov %dl,-0x7feedf3b(,%eax,8) 80106743: 8b 45 f4 mov -0xc(%ebp),%eax 80106746: 8b 04 85 ac b0 10 80 mov -0x7fef4f54(,%eax,4),%eax 8010674d: c1 e8 10 shr $0x10,%eax 80106750: 89 c2 mov %eax,%edx 80106752: 8b 45 f4 mov -0xc(%ebp),%eax 80106755: 66 89 14 c5 c6 20 11 mov %dx,-0x7feedf3a(,%eax,8) 8010675c: 80 void tvinit(void) { int i; for(i = 0; i < 256; i++) 8010675d: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80106761: 81 7d f4 ff 00 00 00 cmpl $0xff,-0xc(%ebp) 80106768: 0f 8e 30 ff ff ff jle 8010669e <tvinit+0x12> SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0); SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 8010676e: a1 ac b1 10 80 mov 0x8010b1ac,%eax 80106773: 66 a3 c0 22 11 80 mov %ax,0x801122c0 80106779: 66 c7 05 c2 22 11 80 movw $0x8,0x801122c2 80106780: 08 00 80106782: 0f b6 05 c4 22 11 80 movzbl 0x801122c4,%eax 80106789: 83 e0 e0 and $0xffffffe0,%eax 8010678c: a2 c4 22 11 80 mov %al,0x801122c4 80106791: 0f b6 05 c4 22 11 80 movzbl 0x801122c4,%eax 80106798: 83 e0 1f and $0x1f,%eax 8010679b: a2 c4 22 11 80 mov %al,0x801122c4 801067a0: 0f b6 05 c5 22 11 80 movzbl 0x801122c5,%eax 801067a7: 83 c8 0f or $0xf,%eax 801067aa: a2 c5 22 11 80 mov %al,0x801122c5 801067af: 0f b6 05 c5 22 11 80 movzbl 0x801122c5,%eax 801067b6: 83 e0 ef and $0xffffffef,%eax 801067b9: a2 c5 22 11 80 mov %al,0x801122c5 801067be: 0f b6 05 c5 22 11 80 movzbl 0x801122c5,%eax 801067c5: 83 c8 60 or $0x60,%eax 801067c8: a2 c5 22 11 80 mov %al,0x801122c5 801067cd: 0f b6 05 c5 22 11 80 movzbl 0x801122c5,%eax 801067d4: 83 c8 80 or $0xffffff80,%eax 801067d7: a2 c5 22 11 80 mov %al,0x801122c5 801067dc: a1 ac b1 10 80 mov 0x8010b1ac,%eax 801067e1: c1 e8 10 shr $0x10,%eax 801067e4: 66 a3 c6 22 11 80 mov %ax,0x801122c6 initlock(&tickslock, "time"); 801067ea: c7 44 24 04 38 8a 10 movl $0x80108a38,0x4(%esp) 801067f1: 80 801067f2: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 801067f9: e8 cb e6 ff ff call 80104ec9 <initlock> } 801067fe: c9 leave 801067ff: c3 ret 80106800 <idtinit>: void idtinit(void) { 80106800: 55 push %ebp 80106801: 89 e5 mov %esp,%ebp 80106803: 83 ec 08 sub $0x8,%esp lidt(idt, sizeof(idt)); 80106806: c7 44 24 04 00 08 00 movl $0x800,0x4(%esp) 8010680d: 00 8010680e: c7 04 24 c0 20 11 80 movl $0x801120c0,(%esp) 80106815: e8 38 fe ff ff call 80106652 <lidt> } 8010681a: c9 leave 8010681b: c3 ret 8010681c <trap>: //PAGEBREAK: 41 void trap(struct trapframe *tf) { 8010681c: 55 push %ebp 8010681d: 89 e5 mov %esp,%ebp 8010681f: 57 push %edi 80106820: 56 push %esi 80106821: 53 push %ebx 80106822: 83 ec 3c sub $0x3c,%esp if(tf->trapno == T_SYSCALL){ 80106825: 8b 45 08 mov 0x8(%ebp),%eax 80106828: 8b 40 30 mov 0x30(%eax),%eax 8010682b: 83 f8 40 cmp $0x40,%eax 8010682e: 75 3f jne 8010686f <trap+0x53> if(proc->killed) 80106830: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106836: 8b 40 24 mov 0x24(%eax),%eax 80106839: 85 c0 test %eax,%eax 8010683b: 74 05 je 80106842 <trap+0x26> exit(); 8010683d: e8 48 de ff ff call 8010468a <exit> proc->tf = tf; 80106842: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106848: 8b 55 08 mov 0x8(%ebp),%edx 8010684b: 89 50 18 mov %edx,0x18(%eax) syscall(); 8010684e: e8 f4 ec ff ff call 80105547 <syscall> if(proc->killed) 80106853: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106859: 8b 40 24 mov 0x24(%eax),%eax 8010685c: 85 c0 test %eax,%eax 8010685e: 74 0a je 8010686a <trap+0x4e> exit(); 80106860: e8 25 de ff ff call 8010468a <exit> return; 80106865: e9 2d 02 00 00 jmp 80106a97 <trap+0x27b> 8010686a: e9 28 02 00 00 jmp 80106a97 <trap+0x27b> } switch(tf->trapno){ 8010686f: 8b 45 08 mov 0x8(%ebp),%eax 80106872: 8b 40 30 mov 0x30(%eax),%eax 80106875: 83 e8 20 sub $0x20,%eax 80106878: 83 f8 1f cmp $0x1f,%eax 8010687b: 0f 87 bc 00 00 00 ja 8010693d <trap+0x121> 80106881: 8b 04 85 e0 8a 10 80 mov -0x7fef7520(,%eax,4),%eax 80106888: ff e0 jmp *%eax case T_IRQ0 + IRQ_TIMER: if(cpu->id == 0){ 8010688a: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80106890: 0f b6 00 movzbl (%eax),%eax 80106893: 84 c0 test %al,%al 80106895: 75 31 jne 801068c8 <trap+0xac> acquire(&tickslock); 80106897: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 8010689e: e8 47 e6 ff ff call 80104eea <acquire> ticks++; 801068a3: a1 c0 28 11 80 mov 0x801128c0,%eax 801068a8: 83 c0 01 add $0x1,%eax 801068ab: a3 c0 28 11 80 mov %eax,0x801128c0 wakeup(&ticks); 801068b0: c7 04 24 c0 28 11 80 movl $0x801128c0,(%esp) 801068b7: e8 ef e3 ff ff call 80104cab <wakeup> release(&tickslock); 801068bc: c7 04 24 80 20 11 80 movl $0x80112080,(%esp) 801068c3: e8 84 e6 ff ff call 80104f4c <release> } lapiceoi(); 801068c8: e8 de c5 ff ff call 80102eab <lapiceoi> break; 801068cd: e9 41 01 00 00 jmp 80106a13 <trap+0x1f7> case T_IRQ0 + IRQ_IDE: ideintr(); 801068d2: e8 ff bd ff ff call 801026d6 <ideintr> lapiceoi(); 801068d7: e8 cf c5 ff ff call 80102eab <lapiceoi> break; 801068dc: e9 32 01 00 00 jmp 80106a13 <trap+0x1f7> case T_IRQ0 + IRQ_IDE+1: // Bochs generates spurious IDE1 interrupts. break; case T_IRQ0 + IRQ_KBD: kbdintr(); 801068e1: e8 b1 c3 ff ff call 80102c97 <kbdintr> lapiceoi(); 801068e6: e8 c0 c5 ff ff call 80102eab <lapiceoi> break; 801068eb: e9 23 01 00 00 jmp 80106a13 <trap+0x1f7> case T_IRQ0 + IRQ_COM1: uartintr(); 801068f0: e8 97 03 00 00 call 80106c8c <uartintr> lapiceoi(); 801068f5: e8 b1 c5 ff ff call 80102eab <lapiceoi> break; 801068fa: e9 14 01 00 00 jmp 80106a13 <trap+0x1f7> case T_IRQ0 + 7: case T_IRQ0 + IRQ_SPURIOUS: cprintf("cpu%d: spurious interrupt at %x:%x\n", 801068ff: 8b 45 08 mov 0x8(%ebp),%eax 80106902: 8b 48 38 mov 0x38(%eax),%ecx cpu->id, tf->cs, tf->eip); 80106905: 8b 45 08 mov 0x8(%ebp),%eax 80106908: 0f b7 40 3c movzwl 0x3c(%eax),%eax uartintr(); lapiceoi(); break; case T_IRQ0 + 7: case T_IRQ0 + IRQ_SPURIOUS: cprintf("cpu%d: spurious interrupt at %x:%x\n", 8010690c: 0f b7 d0 movzwl %ax,%edx cpu->id, tf->cs, tf->eip); 8010690f: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80106915: 0f b6 00 movzbl (%eax),%eax uartintr(); lapiceoi(); break; case T_IRQ0 + 7: case T_IRQ0 + IRQ_SPURIOUS: cprintf("cpu%d: spurious interrupt at %x:%x\n", 80106918: 0f b6 c0 movzbl %al,%eax 8010691b: 89 4c 24 0c mov %ecx,0xc(%esp) 8010691f: 89 54 24 08 mov %edx,0x8(%esp) 80106923: 89 44 24 04 mov %eax,0x4(%esp) 80106927: c7 04 24 40 8a 10 80 movl $0x80108a40,(%esp) 8010692e: e8 6d 9a ff ff call 801003a0 <cprintf> cpu->id, tf->cs, tf->eip); lapiceoi(); 80106933: e8 73 c5 ff ff call 80102eab <lapiceoi> break; 80106938: e9 d6 00 00 00 jmp 80106a13 <trap+0x1f7> //PAGEBREAK: 13 default: if(proc == 0 || (tf->cs&3) == 0){ 8010693d: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106943: 85 c0 test %eax,%eax 80106945: 74 11 je 80106958 <trap+0x13c> 80106947: 8b 45 08 mov 0x8(%ebp),%eax 8010694a: 0f b7 40 3c movzwl 0x3c(%eax),%eax 8010694e: 0f b7 c0 movzwl %ax,%eax 80106951: 83 e0 03 and $0x3,%eax 80106954: 85 c0 test %eax,%eax 80106956: 75 46 jne 8010699e <trap+0x182> // In kernel, it must be our mistake. cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", 80106958: e8 1e fd ff ff call 8010667b <rcr2> 8010695d: 8b 55 08 mov 0x8(%ebp),%edx 80106960: 8b 5a 38 mov 0x38(%edx),%ebx tf->trapno, cpu->id, tf->eip, rcr2()); 80106963: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 8010696a: 0f b6 12 movzbl (%edx),%edx //PAGEBREAK: 13 default: if(proc == 0 || (tf->cs&3) == 0){ // In kernel, it must be our mistake. cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", 8010696d: 0f b6 ca movzbl %dl,%ecx 80106970: 8b 55 08 mov 0x8(%ebp),%edx 80106973: 8b 52 30 mov 0x30(%edx),%edx 80106976: 89 44 24 10 mov %eax,0x10(%esp) 8010697a: 89 5c 24 0c mov %ebx,0xc(%esp) 8010697e: 89 4c 24 08 mov %ecx,0x8(%esp) 80106982: 89 54 24 04 mov %edx,0x4(%esp) 80106986: c7 04 24 64 8a 10 80 movl $0x80108a64,(%esp) 8010698d: e8 0e 9a ff ff call 801003a0 <cprintf> tf->trapno, cpu->id, tf->eip, rcr2()); panic("trap"); 80106992: c7 04 24 96 8a 10 80 movl $0x80108a96,(%esp) 80106999: e8 9c 9b ff ff call 8010053a <panic> } // In user space, assume process misbehaved. cprintf("pid %d %s: trap %d err %d on cpu %d " 8010699e: e8 d8 fc ff ff call 8010667b <rcr2> 801069a3: 89 c2 mov %eax,%edx 801069a5: 8b 45 08 mov 0x8(%ebp),%eax 801069a8: 8b 78 38 mov 0x38(%eax),%edi "eip 0x%x addr 0x%x--kill proc\n", proc->pid, proc->name, tf->trapno, tf->err, cpu->id, tf->eip, 801069ab: 65 a1 00 00 00 00 mov %gs:0x0,%eax 801069b1: 0f b6 00 movzbl (%eax),%eax cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", tf->trapno, cpu->id, tf->eip, rcr2()); panic("trap"); } // In user space, assume process misbehaved. cprintf("pid %d %s: trap %d err %d on cpu %d " 801069b4: 0f b6 f0 movzbl %al,%esi 801069b7: 8b 45 08 mov 0x8(%ebp),%eax 801069ba: 8b 58 34 mov 0x34(%eax),%ebx 801069bd: 8b 45 08 mov 0x8(%ebp),%eax 801069c0: 8b 48 30 mov 0x30(%eax),%ecx "eip 0x%x addr 0x%x--kill proc\n", proc->pid, proc->name, tf->trapno, tf->err, cpu->id, tf->eip, 801069c3: 65 a1 04 00 00 00 mov %gs:0x4,%eax 801069c9: 83 c0 6c add $0x6c,%eax 801069cc: 89 45 e4 mov %eax,-0x1c(%ebp) 801069cf: 65 a1 04 00 00 00 mov %gs:0x4,%eax cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", tf->trapno, cpu->id, tf->eip, rcr2()); panic("trap"); } // In user space, assume process misbehaved. cprintf("pid %d %s: trap %d err %d on cpu %d " 801069d5: 8b 40 10 mov 0x10(%eax),%eax 801069d8: 89 54 24 1c mov %edx,0x1c(%esp) 801069dc: 89 7c 24 18 mov %edi,0x18(%esp) 801069e0: 89 74 24 14 mov %esi,0x14(%esp) 801069e4: 89 5c 24 10 mov %ebx,0x10(%esp) 801069e8: 89 4c 24 0c mov %ecx,0xc(%esp) 801069ec: 8b 75 e4 mov -0x1c(%ebp),%esi 801069ef: 89 74 24 08 mov %esi,0x8(%esp) 801069f3: 89 44 24 04 mov %eax,0x4(%esp) 801069f7: c7 04 24 9c 8a 10 80 movl $0x80108a9c,(%esp) 801069fe: e8 9d 99 ff ff call 801003a0 <cprintf> "eip 0x%x addr 0x%x--kill proc\n", proc->pid, proc->name, tf->trapno, tf->err, cpu->id, tf->eip, rcr2()); proc->killed = 1; 80106a03: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106a09: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) 80106a10: eb 01 jmp 80106a13 <trap+0x1f7> ideintr(); lapiceoi(); break; case T_IRQ0 + IRQ_IDE+1: // Bochs generates spurious IDE1 interrupts. break; 80106a12: 90 nop } // Force process exit if it has been killed and is in user space. // (If it is still executing in the kernel, let it keep running // until it gets to the regular system call return.) if(proc && proc->killed && (tf->cs&3) == DPL_USER) 80106a13: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106a19: 85 c0 test %eax,%eax 80106a1b: 74 24 je 80106a41 <trap+0x225> 80106a1d: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106a23: 8b 40 24 mov 0x24(%eax),%eax 80106a26: 85 c0 test %eax,%eax 80106a28: 74 17 je 80106a41 <trap+0x225> 80106a2a: 8b 45 08 mov 0x8(%ebp),%eax 80106a2d: 0f b7 40 3c movzwl 0x3c(%eax),%eax 80106a31: 0f b7 c0 movzwl %ax,%eax 80106a34: 83 e0 03 and $0x3,%eax 80106a37: 83 f8 03 cmp $0x3,%eax 80106a3a: 75 05 jne 80106a41 <trap+0x225> exit(); 80106a3c: e8 49 dc ff ff call 8010468a <exit> // Force process to give up CPU on clock tick. // If interrupts were on while locks held, would need to check nlock. if(proc && proc->state == RUNNING && tf->trapno == T_IRQ0+IRQ_TIMER) 80106a41: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106a47: 85 c0 test %eax,%eax 80106a49: 74 1e je 80106a69 <trap+0x24d> 80106a4b: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106a51: 8b 40 0c mov 0xc(%eax),%eax 80106a54: 83 f8 04 cmp $0x4,%eax 80106a57: 75 10 jne 80106a69 <trap+0x24d> 80106a59: 8b 45 08 mov 0x8(%ebp),%eax 80106a5c: 8b 40 30 mov 0x30(%eax),%eax 80106a5f: 83 f8 20 cmp $0x20,%eax 80106a62: 75 05 jne 80106a69 <trap+0x24d> yield(); 80106a64: e8 a0 e0 ff ff call 80104b09 <yield> // Check if the process has been killed since we yielded if(proc && proc->killed && (tf->cs&3) == DPL_USER) 80106a69: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106a6f: 85 c0 test %eax,%eax 80106a71: 74 24 je 80106a97 <trap+0x27b> 80106a73: 65 a1 04 00 00 00 mov %gs:0x4,%eax 80106a79: 8b 40 24 mov 0x24(%eax),%eax 80106a7c: 85 c0 test %eax,%eax 80106a7e: 74 17 je 80106a97 <trap+0x27b> 80106a80: 8b 45 08 mov 0x8(%ebp),%eax 80106a83: 0f b7 40 3c movzwl 0x3c(%eax),%eax 80106a87: 0f b7 c0 movzwl %ax,%eax 80106a8a: 83 e0 03 and $0x3,%eax 80106a8d: 83 f8 03 cmp $0x3,%eax 80106a90: 75 05 jne 80106a97 <trap+0x27b> exit(); 80106a92: e8 f3 db ff ff call 8010468a <exit> } 80106a97: 83 c4 3c add $0x3c,%esp 80106a9a: 5b pop %ebx 80106a9b: 5e pop %esi 80106a9c: 5f pop %edi 80106a9d: 5d pop %ebp 80106a9e: c3 ret 80106a9f <inb>: // Routines to let C code use special x86 instructions. static inline uchar inb(ushort port) { 80106a9f: 55 push %ebp 80106aa0: 89 e5 mov %esp,%ebp 80106aa2: 83 ec 14 sub $0x14,%esp 80106aa5: 8b 45 08 mov 0x8(%ebp),%eax 80106aa8: 66 89 45 ec mov %ax,-0x14(%ebp) uchar data; asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80106aac: 0f b7 45 ec movzwl -0x14(%ebp),%eax 80106ab0: 89 c2 mov %eax,%edx 80106ab2: ec in (%dx),%al 80106ab3: 88 45 ff mov %al,-0x1(%ebp) return data; 80106ab6: 0f b6 45 ff movzbl -0x1(%ebp),%eax } 80106aba: c9 leave 80106abb: c3 ret 80106abc <outb>: "memory", "cc"); } static inline void outb(ushort port, uchar data) { 80106abc: 55 push %ebp 80106abd: 89 e5 mov %esp,%ebp 80106abf: 83 ec 08 sub $0x8,%esp 80106ac2: 8b 55 08 mov 0x8(%ebp),%edx 80106ac5: 8b 45 0c mov 0xc(%ebp),%eax 80106ac8: 66 89 55 fc mov %dx,-0x4(%ebp) 80106acc: 88 45 f8 mov %al,-0x8(%ebp) asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80106acf: 0f b6 45 f8 movzbl -0x8(%ebp),%eax 80106ad3: 0f b7 55 fc movzwl -0x4(%ebp),%edx 80106ad7: ee out %al,(%dx) } 80106ad8: c9 leave 80106ad9: c3 ret 80106ada <uartinit>: static int uart; // is there a uart? void uartinit(void) { 80106ada: 55 push %ebp 80106adb: 89 e5 mov %esp,%ebp 80106add: 83 ec 28 sub $0x28,%esp char *p; // Turn off the FIFO outb(COM1+2, 0); 80106ae0: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106ae7: 00 80106ae8: c7 04 24 fa 03 00 00 movl $0x3fa,(%esp) 80106aef: e8 c8 ff ff ff call 80106abc <outb> // 9600 baud, 8 data bits, 1 stop bit, parity off. outb(COM1+3, 0x80); // Unlock divisor 80106af4: c7 44 24 04 80 00 00 movl $0x80,0x4(%esp) 80106afb: 00 80106afc: c7 04 24 fb 03 00 00 movl $0x3fb,(%esp) 80106b03: e8 b4 ff ff ff call 80106abc <outb> outb(COM1+0, 115200/9600); 80106b08: c7 44 24 04 0c 00 00 movl $0xc,0x4(%esp) 80106b0f: 00 80106b10: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp) 80106b17: e8 a0 ff ff ff call 80106abc <outb> outb(COM1+1, 0); 80106b1c: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106b23: 00 80106b24: c7 04 24 f9 03 00 00 movl $0x3f9,(%esp) 80106b2b: e8 8c ff ff ff call 80106abc <outb> outb(COM1+3, 0x03); // Lock divisor, 8 data bits. 80106b30: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp) 80106b37: 00 80106b38: c7 04 24 fb 03 00 00 movl $0x3fb,(%esp) 80106b3f: e8 78 ff ff ff call 80106abc <outb> outb(COM1+4, 0); 80106b44: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106b4b: 00 80106b4c: c7 04 24 fc 03 00 00 movl $0x3fc,(%esp) 80106b53: e8 64 ff ff ff call 80106abc <outb> outb(COM1+1, 0x01); // Enable receive interrupts. 80106b58: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80106b5f: 00 80106b60: c7 04 24 f9 03 00 00 movl $0x3f9,(%esp) 80106b67: e8 50 ff ff ff call 80106abc <outb> // If status is 0xFF, no serial port. if(inb(COM1+5) == 0xFF) 80106b6c: c7 04 24 fd 03 00 00 movl $0x3fd,(%esp) 80106b73: e8 27 ff ff ff call 80106a9f <inb> 80106b78: 3c ff cmp $0xff,%al 80106b7a: 75 02 jne 80106b7e <uartinit+0xa4> return; 80106b7c: eb 6a jmp 80106be8 <uartinit+0x10e> uart = 1; 80106b7e: c7 05 6c b6 10 80 01 movl $0x1,0x8010b66c 80106b85: 00 00 00 // Acknowledge pre-existing interrupt conditions; // enable interrupts. inb(COM1+2); 80106b88: c7 04 24 fa 03 00 00 movl $0x3fa,(%esp) 80106b8f: e8 0b ff ff ff call 80106a9f <inb> inb(COM1+0); 80106b94: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp) 80106b9b: e8 ff fe ff ff call 80106a9f <inb> picenable(IRQ_COM1); 80106ba0: c7 04 24 04 00 00 00 movl $0x4,(%esp) 80106ba7: e8 ae ce ff ff call 80103a5a <picenable> ioapicenable(IRQ_COM1, 0); 80106bac: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106bb3: 00 80106bb4: c7 04 24 04 00 00 00 movl $0x4,(%esp) 80106bbb: e8 95 bd ff ff call 80102955 <ioapicenable> // Announce that we're here. for(p="xv6...\n"; *p; p++) 80106bc0: c7 45 f4 60 8b 10 80 movl $0x80108b60,-0xc(%ebp) 80106bc7: eb 15 jmp 80106bde <uartinit+0x104> uartputc(*p); 80106bc9: 8b 45 f4 mov -0xc(%ebp),%eax 80106bcc: 0f b6 00 movzbl (%eax),%eax 80106bcf: 0f be c0 movsbl %al,%eax 80106bd2: 89 04 24 mov %eax,(%esp) 80106bd5: e8 10 00 00 00 call 80106bea <uartputc> inb(COM1+0); picenable(IRQ_COM1); ioapicenable(IRQ_COM1, 0); // Announce that we're here. for(p="xv6...\n"; *p; p++) 80106bda: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80106bde: 8b 45 f4 mov -0xc(%ebp),%eax 80106be1: 0f b6 00 movzbl (%eax),%eax 80106be4: 84 c0 test %al,%al 80106be6: 75 e1 jne 80106bc9 <uartinit+0xef> uartputc(*p); } 80106be8: c9 leave 80106be9: c3 ret 80106bea <uartputc>: void uartputc(int c) { 80106bea: 55 push %ebp 80106beb: 89 e5 mov %esp,%ebp 80106bed: 83 ec 28 sub $0x28,%esp int i; if(!uart) 80106bf0: a1 6c b6 10 80 mov 0x8010b66c,%eax 80106bf5: 85 c0 test %eax,%eax 80106bf7: 75 02 jne 80106bfb <uartputc+0x11> return; 80106bf9: eb 4b jmp 80106c46 <uartputc+0x5c> for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++) 80106bfb: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80106c02: eb 10 jmp 80106c14 <uartputc+0x2a> microdelay(10); 80106c04: c7 04 24 0a 00 00 00 movl $0xa,(%esp) 80106c0b: e8 c0 c2 ff ff call 80102ed0 <microdelay> { int i; if(!uart) return; for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++) 80106c10: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80106c14: 83 7d f4 7f cmpl $0x7f,-0xc(%ebp) 80106c18: 7f 16 jg 80106c30 <uartputc+0x46> 80106c1a: c7 04 24 fd 03 00 00 movl $0x3fd,(%esp) 80106c21: e8 79 fe ff ff call 80106a9f <inb> 80106c26: 0f b6 c0 movzbl %al,%eax 80106c29: 83 e0 20 and $0x20,%eax 80106c2c: 85 c0 test %eax,%eax 80106c2e: 74 d4 je 80106c04 <uartputc+0x1a> microdelay(10); outb(COM1+0, c); 80106c30: 8b 45 08 mov 0x8(%ebp),%eax 80106c33: 0f b6 c0 movzbl %al,%eax 80106c36: 89 44 24 04 mov %eax,0x4(%esp) 80106c3a: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp) 80106c41: e8 76 fe ff ff call 80106abc <outb> } 80106c46: c9 leave 80106c47: c3 ret 80106c48 <uartgetc>: static int uartgetc(void) { 80106c48: 55 push %ebp 80106c49: 89 e5 mov %esp,%ebp 80106c4b: 83 ec 04 sub $0x4,%esp if(!uart) 80106c4e: a1 6c b6 10 80 mov 0x8010b66c,%eax 80106c53: 85 c0 test %eax,%eax 80106c55: 75 07 jne 80106c5e <uartgetc+0x16> return -1; 80106c57: b8 ff ff ff ff mov $0xffffffff,%eax 80106c5c: eb 2c jmp 80106c8a <uartgetc+0x42> if(!(inb(COM1+5) & 0x01)) 80106c5e: c7 04 24 fd 03 00 00 movl $0x3fd,(%esp) 80106c65: e8 35 fe ff ff call 80106a9f <inb> 80106c6a: 0f b6 c0 movzbl %al,%eax 80106c6d: 83 e0 01 and $0x1,%eax 80106c70: 85 c0 test %eax,%eax 80106c72: 75 07 jne 80106c7b <uartgetc+0x33> return -1; 80106c74: b8 ff ff ff ff mov $0xffffffff,%eax 80106c79: eb 0f jmp 80106c8a <uartgetc+0x42> return inb(COM1+0); 80106c7b: c7 04 24 f8 03 00 00 movl $0x3f8,(%esp) 80106c82: e8 18 fe ff ff call 80106a9f <inb> 80106c87: 0f b6 c0 movzbl %al,%eax } 80106c8a: c9 leave 80106c8b: c3 ret 80106c8c <uartintr>: void uartintr(void) { 80106c8c: 55 push %ebp 80106c8d: 89 e5 mov %esp,%ebp 80106c8f: 83 ec 18 sub $0x18,%esp consoleintr(uartgetc); 80106c92: c7 04 24 48 6c 10 80 movl $0x80106c48,(%esp) 80106c99: e8 0f 9b ff ff call 801007ad <consoleintr> } 80106c9e: c9 leave 80106c9f: c3 ret 80106ca0 <vector0>: # generated by vectors.pl - do not edit # handlers .globl alltraps .globl vector0 vector0: pushl $0 80106ca0: 6a 00 push $0x0 pushl $0 80106ca2: 6a 00 push $0x0 jmp alltraps 80106ca4: e9 7e f9 ff ff jmp 80106627 <alltraps> 80106ca9 <vector1>: .globl vector1 vector1: pushl $0 80106ca9: 6a 00 push $0x0 pushl $1 80106cab: 6a 01 push $0x1 jmp alltraps 80106cad: e9 75 f9 ff ff jmp 80106627 <alltraps> 80106cb2 <vector2>: .globl vector2 vector2: pushl $0 80106cb2: 6a 00 push $0x0 pushl $2 80106cb4: 6a 02 push $0x2 jmp alltraps 80106cb6: e9 6c f9 ff ff jmp 80106627 <alltraps> 80106cbb <vector3>: .globl vector3 vector3: pushl $0 80106cbb: 6a 00 push $0x0 pushl $3 80106cbd: 6a 03 push $0x3 jmp alltraps 80106cbf: e9 63 f9 ff ff jmp 80106627 <alltraps> 80106cc4 <vector4>: .globl vector4 vector4: pushl $0 80106cc4: 6a 00 push $0x0 pushl $4 80106cc6: 6a 04 push $0x4 jmp alltraps 80106cc8: e9 5a f9 ff ff jmp 80106627 <alltraps> 80106ccd <vector5>: .globl vector5 vector5: pushl $0 80106ccd: 6a 00 push $0x0 pushl $5 80106ccf: 6a 05 push $0x5 jmp alltraps 80106cd1: e9 51 f9 ff ff jmp 80106627 <alltraps> 80106cd6 <vector6>: .globl vector6 vector6: pushl $0 80106cd6: 6a 00 push $0x0 pushl $6 80106cd8: 6a 06 push $0x6 jmp alltraps 80106cda: e9 48 f9 ff ff jmp 80106627 <alltraps> 80106cdf <vector7>: .globl vector7 vector7: pushl $0 80106cdf: 6a 00 push $0x0 pushl $7 80106ce1: 6a 07 push $0x7 jmp alltraps 80106ce3: e9 3f f9 ff ff jmp 80106627 <alltraps> 80106ce8 <vector8>: .globl vector8 vector8: pushl $8 80106ce8: 6a 08 push $0x8 jmp alltraps 80106cea: e9 38 f9 ff ff jmp 80106627 <alltraps> 80106cef <vector9>: .globl vector9 vector9: pushl $0 80106cef: 6a 00 push $0x0 pushl $9 80106cf1: 6a 09 push $0x9 jmp alltraps 80106cf3: e9 2f f9 ff ff jmp 80106627 <alltraps> 80106cf8 <vector10>: .globl vector10 vector10: pushl $10 80106cf8: 6a 0a push $0xa jmp alltraps 80106cfa: e9 28 f9 ff ff jmp 80106627 <alltraps> 80106cff <vector11>: .globl vector11 vector11: pushl $11 80106cff: 6a 0b push $0xb jmp alltraps 80106d01: e9 21 f9 ff ff jmp 80106627 <alltraps> 80106d06 <vector12>: .globl vector12 vector12: pushl $12 80106d06: 6a 0c push $0xc jmp alltraps 80106d08: e9 1a f9 ff ff jmp 80106627 <alltraps> 80106d0d <vector13>: .globl vector13 vector13: pushl $13 80106d0d: 6a 0d push $0xd jmp alltraps 80106d0f: e9 13 f9 ff ff jmp 80106627 <alltraps> 80106d14 <vector14>: .globl vector14 vector14: pushl $14 80106d14: 6a 0e push $0xe jmp alltraps 80106d16: e9 0c f9 ff ff jmp 80106627 <alltraps> 80106d1b <vector15>: .globl vector15 vector15: pushl $0 80106d1b: 6a 00 push $0x0 pushl $15 80106d1d: 6a 0f push $0xf jmp alltraps 80106d1f: e9 03 f9 ff ff jmp 80106627 <alltraps> 80106d24 <vector16>: .globl vector16 vector16: pushl $0 80106d24: 6a 00 push $0x0 pushl $16 80106d26: 6a 10 push $0x10 jmp alltraps 80106d28: e9 fa f8 ff ff jmp 80106627 <alltraps> 80106d2d <vector17>: .globl vector17 vector17: pushl $17 80106d2d: 6a 11 push $0x11 jmp alltraps 80106d2f: e9 f3 f8 ff ff jmp 80106627 <alltraps> 80106d34 <vector18>: .globl vector18 vector18: pushl $0 80106d34: 6a 00 push $0x0 pushl $18 80106d36: 6a 12 push $0x12 jmp alltraps 80106d38: e9 ea f8 ff ff jmp 80106627 <alltraps> 80106d3d <vector19>: .globl vector19 vector19: pushl $0 80106d3d: 6a 00 push $0x0 pushl $19 80106d3f: 6a 13 push $0x13 jmp alltraps 80106d41: e9 e1 f8 ff ff jmp 80106627 <alltraps> 80106d46 <vector20>: .globl vector20 vector20: pushl $0 80106d46: 6a 00 push $0x0 pushl $20 80106d48: 6a 14 push $0x14 jmp alltraps 80106d4a: e9 d8 f8 ff ff jmp 80106627 <alltraps> 80106d4f <vector21>: .globl vector21 vector21: pushl $0 80106d4f: 6a 00 push $0x0 pushl $21 80106d51: 6a 15 push $0x15 jmp alltraps 80106d53: e9 cf f8 ff ff jmp 80106627 <alltraps> 80106d58 <vector22>: .globl vector22 vector22: pushl $0 80106d58: 6a 00 push $0x0 pushl $22 80106d5a: 6a 16 push $0x16 jmp alltraps 80106d5c: e9 c6 f8 ff ff jmp 80106627 <alltraps> 80106d61 <vector23>: .globl vector23 vector23: pushl $0 80106d61: 6a 00 push $0x0 pushl $23 80106d63: 6a 17 push $0x17 jmp alltraps 80106d65: e9 bd f8 ff ff jmp 80106627 <alltraps> 80106d6a <vector24>: .globl vector24 vector24: pushl $0 80106d6a: 6a 00 push $0x0 pushl $24 80106d6c: 6a 18 push $0x18 jmp alltraps 80106d6e: e9 b4 f8 ff ff jmp 80106627 <alltraps> 80106d73 <vector25>: .globl vector25 vector25: pushl $0 80106d73: 6a 00 push $0x0 pushl $25 80106d75: 6a 19 push $0x19 jmp alltraps 80106d77: e9 ab f8 ff ff jmp 80106627 <alltraps> 80106d7c <vector26>: .globl vector26 vector26: pushl $0 80106d7c: 6a 00 push $0x0 pushl $26 80106d7e: 6a 1a push $0x1a jmp alltraps 80106d80: e9 a2 f8 ff ff jmp 80106627 <alltraps> 80106d85 <vector27>: .globl vector27 vector27: pushl $0 80106d85: 6a 00 push $0x0 pushl $27 80106d87: 6a 1b push $0x1b jmp alltraps 80106d89: e9 99 f8 ff ff jmp 80106627 <alltraps> 80106d8e <vector28>: .globl vector28 vector28: pushl $0 80106d8e: 6a 00 push $0x0 pushl $28 80106d90: 6a 1c push $0x1c jmp alltraps 80106d92: e9 90 f8 ff ff jmp 80106627 <alltraps> 80106d97 <vector29>: .globl vector29 vector29: pushl $0 80106d97: 6a 00 push $0x0 pushl $29 80106d99: 6a 1d push $0x1d jmp alltraps 80106d9b: e9 87 f8 ff ff jmp 80106627 <alltraps> 80106da0 <vector30>: .globl vector30 vector30: pushl $0 80106da0: 6a 00 push $0x0 pushl $30 80106da2: 6a 1e push $0x1e jmp alltraps 80106da4: e9 7e f8 ff ff jmp 80106627 <alltraps> 80106da9 <vector31>: .globl vector31 vector31: pushl $0 80106da9: 6a 00 push $0x0 pushl $31 80106dab: 6a 1f push $0x1f jmp alltraps 80106dad: e9 75 f8 ff ff jmp 80106627 <alltraps> 80106db2 <vector32>: .globl vector32 vector32: pushl $0 80106db2: 6a 00 push $0x0 pushl $32 80106db4: 6a 20 push $0x20 jmp alltraps 80106db6: e9 6c f8 ff ff jmp 80106627 <alltraps> 80106dbb <vector33>: .globl vector33 vector33: pushl $0 80106dbb: 6a 00 push $0x0 pushl $33 80106dbd: 6a 21 push $0x21 jmp alltraps 80106dbf: e9 63 f8 ff ff jmp 80106627 <alltraps> 80106dc4 <vector34>: .globl vector34 vector34: pushl $0 80106dc4: 6a 00 push $0x0 pushl $34 80106dc6: 6a 22 push $0x22 jmp alltraps 80106dc8: e9 5a f8 ff ff jmp 80106627 <alltraps> 80106dcd <vector35>: .globl vector35 vector35: pushl $0 80106dcd: 6a 00 push $0x0 pushl $35 80106dcf: 6a 23 push $0x23 jmp alltraps 80106dd1: e9 51 f8 ff ff jmp 80106627 <alltraps> 80106dd6 <vector36>: .globl vector36 vector36: pushl $0 80106dd6: 6a 00 push $0x0 pushl $36 80106dd8: 6a 24 push $0x24 jmp alltraps 80106dda: e9 48 f8 ff ff jmp 80106627 <alltraps> 80106ddf <vector37>: .globl vector37 vector37: pushl $0 80106ddf: 6a 00 push $0x0 pushl $37 80106de1: 6a 25 push $0x25 jmp alltraps 80106de3: e9 3f f8 ff ff jmp 80106627 <alltraps> 80106de8 <vector38>: .globl vector38 vector38: pushl $0 80106de8: 6a 00 push $0x0 pushl $38 80106dea: 6a 26 push $0x26 jmp alltraps 80106dec: e9 36 f8 ff ff jmp 80106627 <alltraps> 80106df1 <vector39>: .globl vector39 vector39: pushl $0 80106df1: 6a 00 push $0x0 pushl $39 80106df3: 6a 27 push $0x27 jmp alltraps 80106df5: e9 2d f8 ff ff jmp 80106627 <alltraps> 80106dfa <vector40>: .globl vector40 vector40: pushl $0 80106dfa: 6a 00 push $0x0 pushl $40 80106dfc: 6a 28 push $0x28 jmp alltraps 80106dfe: e9 24 f8 ff ff jmp 80106627 <alltraps> 80106e03 <vector41>: .globl vector41 vector41: pushl $0 80106e03: 6a 00 push $0x0 pushl $41 80106e05: 6a 29 push $0x29 jmp alltraps 80106e07: e9 1b f8 ff ff jmp 80106627 <alltraps> 80106e0c <vector42>: .globl vector42 vector42: pushl $0 80106e0c: 6a 00 push $0x0 pushl $42 80106e0e: 6a 2a push $0x2a jmp alltraps 80106e10: e9 12 f8 ff ff jmp 80106627 <alltraps> 80106e15 <vector43>: .globl vector43 vector43: pushl $0 80106e15: 6a 00 push $0x0 pushl $43 80106e17: 6a 2b push $0x2b jmp alltraps 80106e19: e9 09 f8 ff ff jmp 80106627 <alltraps> 80106e1e <vector44>: .globl vector44 vector44: pushl $0 80106e1e: 6a 00 push $0x0 pushl $44 80106e20: 6a 2c push $0x2c jmp alltraps 80106e22: e9 00 f8 ff ff jmp 80106627 <alltraps> 80106e27 <vector45>: .globl vector45 vector45: pushl $0 80106e27: 6a 00 push $0x0 pushl $45 80106e29: 6a 2d push $0x2d jmp alltraps 80106e2b: e9 f7 f7 ff ff jmp 80106627 <alltraps> 80106e30 <vector46>: .globl vector46 vector46: pushl $0 80106e30: 6a 00 push $0x0 pushl $46 80106e32: 6a 2e push $0x2e jmp alltraps 80106e34: e9 ee f7 ff ff jmp 80106627 <alltraps> 80106e39 <vector47>: .globl vector47 vector47: pushl $0 80106e39: 6a 00 push $0x0 pushl $47 80106e3b: 6a 2f push $0x2f jmp alltraps 80106e3d: e9 e5 f7 ff ff jmp 80106627 <alltraps> 80106e42 <vector48>: .globl vector48 vector48: pushl $0 80106e42: 6a 00 push $0x0 pushl $48 80106e44: 6a 30 push $0x30 jmp alltraps 80106e46: e9 dc f7 ff ff jmp 80106627 <alltraps> 80106e4b <vector49>: .globl vector49 vector49: pushl $0 80106e4b: 6a 00 push $0x0 pushl $49 80106e4d: 6a 31 push $0x31 jmp alltraps 80106e4f: e9 d3 f7 ff ff jmp 80106627 <alltraps> 80106e54 <vector50>: .globl vector50 vector50: pushl $0 80106e54: 6a 00 push $0x0 pushl $50 80106e56: 6a 32 push $0x32 jmp alltraps 80106e58: e9 ca f7 ff ff jmp 80106627 <alltraps> 80106e5d <vector51>: .globl vector51 vector51: pushl $0 80106e5d: 6a 00 push $0x0 pushl $51 80106e5f: 6a 33 push $0x33 jmp alltraps 80106e61: e9 c1 f7 ff ff jmp 80106627 <alltraps> 80106e66 <vector52>: .globl vector52 vector52: pushl $0 80106e66: 6a 00 push $0x0 pushl $52 80106e68: 6a 34 push $0x34 jmp alltraps 80106e6a: e9 b8 f7 ff ff jmp 80106627 <alltraps> 80106e6f <vector53>: .globl vector53 vector53: pushl $0 80106e6f: 6a 00 push $0x0 pushl $53 80106e71: 6a 35 push $0x35 jmp alltraps 80106e73: e9 af f7 ff ff jmp 80106627 <alltraps> 80106e78 <vector54>: .globl vector54 vector54: pushl $0 80106e78: 6a 00 push $0x0 pushl $54 80106e7a: 6a 36 push $0x36 jmp alltraps 80106e7c: e9 a6 f7 ff ff jmp 80106627 <alltraps> 80106e81 <vector55>: .globl vector55 vector55: pushl $0 80106e81: 6a 00 push $0x0 pushl $55 80106e83: 6a 37 push $0x37 jmp alltraps 80106e85: e9 9d f7 ff ff jmp 80106627 <alltraps> 80106e8a <vector56>: .globl vector56 vector56: pushl $0 80106e8a: 6a 00 push $0x0 pushl $56 80106e8c: 6a 38 push $0x38 jmp alltraps 80106e8e: e9 94 f7 ff ff jmp 80106627 <alltraps> 80106e93 <vector57>: .globl vector57 vector57: pushl $0 80106e93: 6a 00 push $0x0 pushl $57 80106e95: 6a 39 push $0x39 jmp alltraps 80106e97: e9 8b f7 ff ff jmp 80106627 <alltraps> 80106e9c <vector58>: .globl vector58 vector58: pushl $0 80106e9c: 6a 00 push $0x0 pushl $58 80106e9e: 6a 3a push $0x3a jmp alltraps 80106ea0: e9 82 f7 ff ff jmp 80106627 <alltraps> 80106ea5 <vector59>: .globl vector59 vector59: pushl $0 80106ea5: 6a 00 push $0x0 pushl $59 80106ea7: 6a 3b push $0x3b jmp alltraps 80106ea9: e9 79 f7 ff ff jmp 80106627 <alltraps> 80106eae <vector60>: .globl vector60 vector60: pushl $0 80106eae: 6a 00 push $0x0 pushl $60 80106eb0: 6a 3c push $0x3c jmp alltraps 80106eb2: e9 70 f7 ff ff jmp 80106627 <alltraps> 80106eb7 <vector61>: .globl vector61 vector61: pushl $0 80106eb7: 6a 00 push $0x0 pushl $61 80106eb9: 6a 3d push $0x3d jmp alltraps 80106ebb: e9 67 f7 ff ff jmp 80106627 <alltraps> 80106ec0 <vector62>: .globl vector62 vector62: pushl $0 80106ec0: 6a 00 push $0x0 pushl $62 80106ec2: 6a 3e push $0x3e jmp alltraps 80106ec4: e9 5e f7 ff ff jmp 80106627 <alltraps> 80106ec9 <vector63>: .globl vector63 vector63: pushl $0 80106ec9: 6a 00 push $0x0 pushl $63 80106ecb: 6a 3f push $0x3f jmp alltraps 80106ecd: e9 55 f7 ff ff jmp 80106627 <alltraps> 80106ed2 <vector64>: .globl vector64 vector64: pushl $0 80106ed2: 6a 00 push $0x0 pushl $64 80106ed4: 6a 40 push $0x40 jmp alltraps 80106ed6: e9 4c f7 ff ff jmp 80106627 <alltraps> 80106edb <vector65>: .globl vector65 vector65: pushl $0 80106edb: 6a 00 push $0x0 pushl $65 80106edd: 6a 41 push $0x41 jmp alltraps 80106edf: e9 43 f7 ff ff jmp 80106627 <alltraps> 80106ee4 <vector66>: .globl vector66 vector66: pushl $0 80106ee4: 6a 00 push $0x0 pushl $66 80106ee6: 6a 42 push $0x42 jmp alltraps 80106ee8: e9 3a f7 ff ff jmp 80106627 <alltraps> 80106eed <vector67>: .globl vector67 vector67: pushl $0 80106eed: 6a 00 push $0x0 pushl $67 80106eef: 6a 43 push $0x43 jmp alltraps 80106ef1: e9 31 f7 ff ff jmp 80106627 <alltraps> 80106ef6 <vector68>: .globl vector68 vector68: pushl $0 80106ef6: 6a 00 push $0x0 pushl $68 80106ef8: 6a 44 push $0x44 jmp alltraps 80106efa: e9 28 f7 ff ff jmp 80106627 <alltraps> 80106eff <vector69>: .globl vector69 vector69: pushl $0 80106eff: 6a 00 push $0x0 pushl $69 80106f01: 6a 45 push $0x45 jmp alltraps 80106f03: e9 1f f7 ff ff jmp 80106627 <alltraps> 80106f08 <vector70>: .globl vector70 vector70: pushl $0 80106f08: 6a 00 push $0x0 pushl $70 80106f0a: 6a 46 push $0x46 jmp alltraps 80106f0c: e9 16 f7 ff ff jmp 80106627 <alltraps> 80106f11 <vector71>: .globl vector71 vector71: pushl $0 80106f11: 6a 00 push $0x0 pushl $71 80106f13: 6a 47 push $0x47 jmp alltraps 80106f15: e9 0d f7 ff ff jmp 80106627 <alltraps> 80106f1a <vector72>: .globl vector72 vector72: pushl $0 80106f1a: 6a 00 push $0x0 pushl $72 80106f1c: 6a 48 push $0x48 jmp alltraps 80106f1e: e9 04 f7 ff ff jmp 80106627 <alltraps> 80106f23 <vector73>: .globl vector73 vector73: pushl $0 80106f23: 6a 00 push $0x0 pushl $73 80106f25: 6a 49 push $0x49 jmp alltraps 80106f27: e9 fb f6 ff ff jmp 80106627 <alltraps> 80106f2c <vector74>: .globl vector74 vector74: pushl $0 80106f2c: 6a 00 push $0x0 pushl $74 80106f2e: 6a 4a push $0x4a jmp alltraps 80106f30: e9 f2 f6 ff ff jmp 80106627 <alltraps> 80106f35 <vector75>: .globl vector75 vector75: pushl $0 80106f35: 6a 00 push $0x0 pushl $75 80106f37: 6a 4b push $0x4b jmp alltraps 80106f39: e9 e9 f6 ff ff jmp 80106627 <alltraps> 80106f3e <vector76>: .globl vector76 vector76: pushl $0 80106f3e: 6a 00 push $0x0 pushl $76 80106f40: 6a 4c push $0x4c jmp alltraps 80106f42: e9 e0 f6 ff ff jmp 80106627 <alltraps> 80106f47 <vector77>: .globl vector77 vector77: pushl $0 80106f47: 6a 00 push $0x0 pushl $77 80106f49: 6a 4d push $0x4d jmp alltraps 80106f4b: e9 d7 f6 ff ff jmp 80106627 <alltraps> 80106f50 <vector78>: .globl vector78 vector78: pushl $0 80106f50: 6a 00 push $0x0 pushl $78 80106f52: 6a 4e push $0x4e jmp alltraps 80106f54: e9 ce f6 ff ff jmp 80106627 <alltraps> 80106f59 <vector79>: .globl vector79 vector79: pushl $0 80106f59: 6a 00 push $0x0 pushl $79 80106f5b: 6a 4f push $0x4f jmp alltraps 80106f5d: e9 c5 f6 ff ff jmp 80106627 <alltraps> 80106f62 <vector80>: .globl vector80 vector80: pushl $0 80106f62: 6a 00 push $0x0 pushl $80 80106f64: 6a 50 push $0x50 jmp alltraps 80106f66: e9 bc f6 ff ff jmp 80106627 <alltraps> 80106f6b <vector81>: .globl vector81 vector81: pushl $0 80106f6b: 6a 00 push $0x0 pushl $81 80106f6d: 6a 51 push $0x51 jmp alltraps 80106f6f: e9 b3 f6 ff ff jmp 80106627 <alltraps> 80106f74 <vector82>: .globl vector82 vector82: pushl $0 80106f74: 6a 00 push $0x0 pushl $82 80106f76: 6a 52 push $0x52 jmp alltraps 80106f78: e9 aa f6 ff ff jmp 80106627 <alltraps> 80106f7d <vector83>: .globl vector83 vector83: pushl $0 80106f7d: 6a 00 push $0x0 pushl $83 80106f7f: 6a 53 push $0x53 jmp alltraps 80106f81: e9 a1 f6 ff ff jmp 80106627 <alltraps> 80106f86 <vector84>: .globl vector84 vector84: pushl $0 80106f86: 6a 00 push $0x0 pushl $84 80106f88: 6a 54 push $0x54 jmp alltraps 80106f8a: e9 98 f6 ff ff jmp 80106627 <alltraps> 80106f8f <vector85>: .globl vector85 vector85: pushl $0 80106f8f: 6a 00 push $0x0 pushl $85 80106f91: 6a 55 push $0x55 jmp alltraps 80106f93: e9 8f f6 ff ff jmp 80106627 <alltraps> 80106f98 <vector86>: .globl vector86 vector86: pushl $0 80106f98: 6a 00 push $0x0 pushl $86 80106f9a: 6a 56 push $0x56 jmp alltraps 80106f9c: e9 86 f6 ff ff jmp 80106627 <alltraps> 80106fa1 <vector87>: .globl vector87 vector87: pushl $0 80106fa1: 6a 00 push $0x0 pushl $87 80106fa3: 6a 57 push $0x57 jmp alltraps 80106fa5: e9 7d f6 ff ff jmp 80106627 <alltraps> 80106faa <vector88>: .globl vector88 vector88: pushl $0 80106faa: 6a 00 push $0x0 pushl $88 80106fac: 6a 58 push $0x58 jmp alltraps 80106fae: e9 74 f6 ff ff jmp 80106627 <alltraps> 80106fb3 <vector89>: .globl vector89 vector89: pushl $0 80106fb3: 6a 00 push $0x0 pushl $89 80106fb5: 6a 59 push $0x59 jmp alltraps 80106fb7: e9 6b f6 ff ff jmp 80106627 <alltraps> 80106fbc <vector90>: .globl vector90 vector90: pushl $0 80106fbc: 6a 00 push $0x0 pushl $90 80106fbe: 6a 5a push $0x5a jmp alltraps 80106fc0: e9 62 f6 ff ff jmp 80106627 <alltraps> 80106fc5 <vector91>: .globl vector91 vector91: pushl $0 80106fc5: 6a 00 push $0x0 pushl $91 80106fc7: 6a 5b push $0x5b jmp alltraps 80106fc9: e9 59 f6 ff ff jmp 80106627 <alltraps> 80106fce <vector92>: .globl vector92 vector92: pushl $0 80106fce: 6a 00 push $0x0 pushl $92 80106fd0: 6a 5c push $0x5c jmp alltraps 80106fd2: e9 50 f6 ff ff jmp 80106627 <alltraps> 80106fd7 <vector93>: .globl vector93 vector93: pushl $0 80106fd7: 6a 00 push $0x0 pushl $93 80106fd9: 6a 5d push $0x5d jmp alltraps 80106fdb: e9 47 f6 ff ff jmp 80106627 <alltraps> 80106fe0 <vector94>: .globl vector94 vector94: pushl $0 80106fe0: 6a 00 push $0x0 pushl $94 80106fe2: 6a 5e push $0x5e jmp alltraps 80106fe4: e9 3e f6 ff ff jmp 80106627 <alltraps> 80106fe9 <vector95>: .globl vector95 vector95: pushl $0 80106fe9: 6a 00 push $0x0 pushl $95 80106feb: 6a 5f push $0x5f jmp alltraps 80106fed: e9 35 f6 ff ff jmp 80106627 <alltraps> 80106ff2 <vector96>: .globl vector96 vector96: pushl $0 80106ff2: 6a 00 push $0x0 pushl $96 80106ff4: 6a 60 push $0x60 jmp alltraps 80106ff6: e9 2c f6 ff ff jmp 80106627 <alltraps> 80106ffb <vector97>: .globl vector97 vector97: pushl $0 80106ffb: 6a 00 push $0x0 pushl $97 80106ffd: 6a 61 push $0x61 jmp alltraps 80106fff: e9 23 f6 ff ff jmp 80106627 <alltraps> 80107004 <vector98>: .globl vector98 vector98: pushl $0 80107004: 6a 00 push $0x0 pushl $98 80107006: 6a 62 push $0x62 jmp alltraps 80107008: e9 1a f6 ff ff jmp 80106627 <alltraps> 8010700d <vector99>: .globl vector99 vector99: pushl $0 8010700d: 6a 00 push $0x0 pushl $99 8010700f: 6a 63 push $0x63 jmp alltraps 80107011: e9 11 f6 ff ff jmp 80106627 <alltraps> 80107016 <vector100>: .globl vector100 vector100: pushl $0 80107016: 6a 00 push $0x0 pushl $100 80107018: 6a 64 push $0x64 jmp alltraps 8010701a: e9 08 f6 ff ff jmp 80106627 <alltraps> 8010701f <vector101>: .globl vector101 vector101: pushl $0 8010701f: 6a 00 push $0x0 pushl $101 80107021: 6a 65 push $0x65 jmp alltraps 80107023: e9 ff f5 ff ff jmp 80106627 <alltraps> 80107028 <vector102>: .globl vector102 vector102: pushl $0 80107028: 6a 00 push $0x0 pushl $102 8010702a: 6a 66 push $0x66 jmp alltraps 8010702c: e9 f6 f5 ff ff jmp 80106627 <alltraps> 80107031 <vector103>: .globl vector103 vector103: pushl $0 80107031: 6a 00 push $0x0 pushl $103 80107033: 6a 67 push $0x67 jmp alltraps 80107035: e9 ed f5 ff ff jmp 80106627 <alltraps> 8010703a <vector104>: .globl vector104 vector104: pushl $0 8010703a: 6a 00 push $0x0 pushl $104 8010703c: 6a 68 push $0x68 jmp alltraps 8010703e: e9 e4 f5 ff ff jmp 80106627 <alltraps> 80107043 <vector105>: .globl vector105 vector105: pushl $0 80107043: 6a 00 push $0x0 pushl $105 80107045: 6a 69 push $0x69 jmp alltraps 80107047: e9 db f5 ff ff jmp 80106627 <alltraps> 8010704c <vector106>: .globl vector106 vector106: pushl $0 8010704c: 6a 00 push $0x0 pushl $106 8010704e: 6a 6a push $0x6a jmp alltraps 80107050: e9 d2 f5 ff ff jmp 80106627 <alltraps> 80107055 <vector107>: .globl vector107 vector107: pushl $0 80107055: 6a 00 push $0x0 pushl $107 80107057: 6a 6b push $0x6b jmp alltraps 80107059: e9 c9 f5 ff ff jmp 80106627 <alltraps> 8010705e <vector108>: .globl vector108 vector108: pushl $0 8010705e: 6a 00 push $0x0 pushl $108 80107060: 6a 6c push $0x6c jmp alltraps 80107062: e9 c0 f5 ff ff jmp 80106627 <alltraps> 80107067 <vector109>: .globl vector109 vector109: pushl $0 80107067: 6a 00 push $0x0 pushl $109 80107069: 6a 6d push $0x6d jmp alltraps 8010706b: e9 b7 f5 ff ff jmp 80106627 <alltraps> 80107070 <vector110>: .globl vector110 vector110: pushl $0 80107070: 6a 00 push $0x0 pushl $110 80107072: 6a 6e push $0x6e jmp alltraps 80107074: e9 ae f5 ff ff jmp 80106627 <alltraps> 80107079 <vector111>: .globl vector111 vector111: pushl $0 80107079: 6a 00 push $0x0 pushl $111 8010707b: 6a 6f push $0x6f jmp alltraps 8010707d: e9 a5 f5 ff ff jmp 80106627 <alltraps> 80107082 <vector112>: .globl vector112 vector112: pushl $0 80107082: 6a 00 push $0x0 pushl $112 80107084: 6a 70 push $0x70 jmp alltraps 80107086: e9 9c f5 ff ff jmp 80106627 <alltraps> 8010708b <vector113>: .globl vector113 vector113: pushl $0 8010708b: 6a 00 push $0x0 pushl $113 8010708d: 6a 71 push $0x71 jmp alltraps 8010708f: e9 93 f5 ff ff jmp 80106627 <alltraps> 80107094 <vector114>: .globl vector114 vector114: pushl $0 80107094: 6a 00 push $0x0 pushl $114 80107096: 6a 72 push $0x72 jmp alltraps 80107098: e9 8a f5 ff ff jmp 80106627 <alltraps> 8010709d <vector115>: .globl vector115 vector115: pushl $0 8010709d: 6a 00 push $0x0 pushl $115 8010709f: 6a 73 push $0x73 jmp alltraps 801070a1: e9 81 f5 ff ff jmp 80106627 <alltraps> 801070a6 <vector116>: .globl vector116 vector116: pushl $0 801070a6: 6a 00 push $0x0 pushl $116 801070a8: 6a 74 push $0x74 jmp alltraps 801070aa: e9 78 f5 ff ff jmp 80106627 <alltraps> 801070af <vector117>: .globl vector117 vector117: pushl $0 801070af: 6a 00 push $0x0 pushl $117 801070b1: 6a 75 push $0x75 jmp alltraps 801070b3: e9 6f f5 ff ff jmp 80106627 <alltraps> 801070b8 <vector118>: .globl vector118 vector118: pushl $0 801070b8: 6a 00 push $0x0 pushl $118 801070ba: 6a 76 push $0x76 jmp alltraps 801070bc: e9 66 f5 ff ff jmp 80106627 <alltraps> 801070c1 <vector119>: .globl vector119 vector119: pushl $0 801070c1: 6a 00 push $0x0 pushl $119 801070c3: 6a 77 push $0x77 jmp alltraps 801070c5: e9 5d f5 ff ff jmp 80106627 <alltraps> 801070ca <vector120>: .globl vector120 vector120: pushl $0 801070ca: 6a 00 push $0x0 pushl $120 801070cc: 6a 78 push $0x78 jmp alltraps 801070ce: e9 54 f5 ff ff jmp 80106627 <alltraps> 801070d3 <vector121>: .globl vector121 vector121: pushl $0 801070d3: 6a 00 push $0x0 pushl $121 801070d5: 6a 79 push $0x79 jmp alltraps 801070d7: e9 4b f5 ff ff jmp 80106627 <alltraps> 801070dc <vector122>: .globl vector122 vector122: pushl $0 801070dc: 6a 00 push $0x0 pushl $122 801070de: 6a 7a push $0x7a jmp alltraps 801070e0: e9 42 f5 ff ff jmp 80106627 <alltraps> 801070e5 <vector123>: .globl vector123 vector123: pushl $0 801070e5: 6a 00 push $0x0 pushl $123 801070e7: 6a 7b push $0x7b jmp alltraps 801070e9: e9 39 f5 ff ff jmp 80106627 <alltraps> 801070ee <vector124>: .globl vector124 vector124: pushl $0 801070ee: 6a 00 push $0x0 pushl $124 801070f0: 6a 7c push $0x7c jmp alltraps 801070f2: e9 30 f5 ff ff jmp 80106627 <alltraps> 801070f7 <vector125>: .globl vector125 vector125: pushl $0 801070f7: 6a 00 push $0x0 pushl $125 801070f9: 6a 7d push $0x7d jmp alltraps 801070fb: e9 27 f5 ff ff jmp 80106627 <alltraps> 80107100 <vector126>: .globl vector126 vector126: pushl $0 80107100: 6a 00 push $0x0 pushl $126 80107102: 6a 7e push $0x7e jmp alltraps 80107104: e9 1e f5 ff ff jmp 80106627 <alltraps> 80107109 <vector127>: .globl vector127 vector127: pushl $0 80107109: 6a 00 push $0x0 pushl $127 8010710b: 6a 7f push $0x7f jmp alltraps 8010710d: e9 15 f5 ff ff jmp 80106627 <alltraps> 80107112 <vector128>: .globl vector128 vector128: pushl $0 80107112: 6a 00 push $0x0 pushl $128 80107114: 68 80 00 00 00 push $0x80 jmp alltraps 80107119: e9 09 f5 ff ff jmp 80106627 <alltraps> 8010711e <vector129>: .globl vector129 vector129: pushl $0 8010711e: 6a 00 push $0x0 pushl $129 80107120: 68 81 00 00 00 push $0x81 jmp alltraps 80107125: e9 fd f4 ff ff jmp 80106627 <alltraps> 8010712a <vector130>: .globl vector130 vector130: pushl $0 8010712a: 6a 00 push $0x0 pushl $130 8010712c: 68 82 00 00 00 push $0x82 jmp alltraps 80107131: e9 f1 f4 ff ff jmp 80106627 <alltraps> 80107136 <vector131>: .globl vector131 vector131: pushl $0 80107136: 6a 00 push $0x0 pushl $131 80107138: 68 83 00 00 00 push $0x83 jmp alltraps 8010713d: e9 e5 f4 ff ff jmp 80106627 <alltraps> 80107142 <vector132>: .globl vector132 vector132: pushl $0 80107142: 6a 00 push $0x0 pushl $132 80107144: 68 84 00 00 00 push $0x84 jmp alltraps 80107149: e9 d9 f4 ff ff jmp 80106627 <alltraps> 8010714e <vector133>: .globl vector133 vector133: pushl $0 8010714e: 6a 00 push $0x0 pushl $133 80107150: 68 85 00 00 00 push $0x85 jmp alltraps 80107155: e9 cd f4 ff ff jmp 80106627 <alltraps> 8010715a <vector134>: .globl vector134 vector134: pushl $0 8010715a: 6a 00 push $0x0 pushl $134 8010715c: 68 86 00 00 00 push $0x86 jmp alltraps 80107161: e9 c1 f4 ff ff jmp 80106627 <alltraps> 80107166 <vector135>: .globl vector135 vector135: pushl $0 80107166: 6a 00 push $0x0 pushl $135 80107168: 68 87 00 00 00 push $0x87 jmp alltraps 8010716d: e9 b5 f4 ff ff jmp 80106627 <alltraps> 80107172 <vector136>: .globl vector136 vector136: pushl $0 80107172: 6a 00 push $0x0 pushl $136 80107174: 68 88 00 00 00 push $0x88 jmp alltraps 80107179: e9 a9 f4 ff ff jmp 80106627 <alltraps> 8010717e <vector137>: .globl vector137 vector137: pushl $0 8010717e: 6a 00 push $0x0 pushl $137 80107180: 68 89 00 00 00 push $0x89 jmp alltraps 80107185: e9 9d f4 ff ff jmp 80106627 <alltraps> 8010718a <vector138>: .globl vector138 vector138: pushl $0 8010718a: 6a 00 push $0x0 pushl $138 8010718c: 68 8a 00 00 00 push $0x8a jmp alltraps 80107191: e9 91 f4 ff ff jmp 80106627 <alltraps> 80107196 <vector139>: .globl vector139 vector139: pushl $0 80107196: 6a 00 push $0x0 pushl $139 80107198: 68 8b 00 00 00 push $0x8b jmp alltraps 8010719d: e9 85 f4 ff ff jmp 80106627 <alltraps> 801071a2 <vector140>: .globl vector140 vector140: pushl $0 801071a2: 6a 00 push $0x0 pushl $140 801071a4: 68 8c 00 00 00 push $0x8c jmp alltraps 801071a9: e9 79 f4 ff ff jmp 80106627 <alltraps> 801071ae <vector141>: .globl vector141 vector141: pushl $0 801071ae: 6a 00 push $0x0 pushl $141 801071b0: 68 8d 00 00 00 push $0x8d jmp alltraps 801071b5: e9 6d f4 ff ff jmp 80106627 <alltraps> 801071ba <vector142>: .globl vector142 vector142: pushl $0 801071ba: 6a 00 push $0x0 pushl $142 801071bc: 68 8e 00 00 00 push $0x8e jmp alltraps 801071c1: e9 61 f4 ff ff jmp 80106627 <alltraps> 801071c6 <vector143>: .globl vector143 vector143: pushl $0 801071c6: 6a 00 push $0x0 pushl $143 801071c8: 68 8f 00 00 00 push $0x8f jmp alltraps 801071cd: e9 55 f4 ff ff jmp 80106627 <alltraps> 801071d2 <vector144>: .globl vector144 vector144: pushl $0 801071d2: 6a 00 push $0x0 pushl $144 801071d4: 68 90 00 00 00 push $0x90 jmp alltraps 801071d9: e9 49 f4 ff ff jmp 80106627 <alltraps> 801071de <vector145>: .globl vector145 vector145: pushl $0 801071de: 6a 00 push $0x0 pushl $145 801071e0: 68 91 00 00 00 push $0x91 jmp alltraps 801071e5: e9 3d f4 ff ff jmp 80106627 <alltraps> 801071ea <vector146>: .globl vector146 vector146: pushl $0 801071ea: 6a 00 push $0x0 pushl $146 801071ec: 68 92 00 00 00 push $0x92 jmp alltraps 801071f1: e9 31 f4 ff ff jmp 80106627 <alltraps> 801071f6 <vector147>: .globl vector147 vector147: pushl $0 801071f6: 6a 00 push $0x0 pushl $147 801071f8: 68 93 00 00 00 push $0x93 jmp alltraps 801071fd: e9 25 f4 ff ff jmp 80106627 <alltraps> 80107202 <vector148>: .globl vector148 vector148: pushl $0 80107202: 6a 00 push $0x0 pushl $148 80107204: 68 94 00 00 00 push $0x94 jmp alltraps 80107209: e9 19 f4 ff ff jmp 80106627 <alltraps> 8010720e <vector149>: .globl vector149 vector149: pushl $0 8010720e: 6a 00 push $0x0 pushl $149 80107210: 68 95 00 00 00 push $0x95 jmp alltraps 80107215: e9 0d f4 ff ff jmp 80106627 <alltraps> 8010721a <vector150>: .globl vector150 vector150: pushl $0 8010721a: 6a 00 push $0x0 pushl $150 8010721c: 68 96 00 00 00 push $0x96 jmp alltraps 80107221: e9 01 f4 ff ff jmp 80106627 <alltraps> 80107226 <vector151>: .globl vector151 vector151: pushl $0 80107226: 6a 00 push $0x0 pushl $151 80107228: 68 97 00 00 00 push $0x97 jmp alltraps 8010722d: e9 f5 f3 ff ff jmp 80106627 <alltraps> 80107232 <vector152>: .globl vector152 vector152: pushl $0 80107232: 6a 00 push $0x0 pushl $152 80107234: 68 98 00 00 00 push $0x98 jmp alltraps 80107239: e9 e9 f3 ff ff jmp 80106627 <alltraps> 8010723e <vector153>: .globl vector153 vector153: pushl $0 8010723e: 6a 00 push $0x0 pushl $153 80107240: 68 99 00 00 00 push $0x99 jmp alltraps 80107245: e9 dd f3 ff ff jmp 80106627 <alltraps> 8010724a <vector154>: .globl vector154 vector154: pushl $0 8010724a: 6a 00 push $0x0 pushl $154 8010724c: 68 9a 00 00 00 push $0x9a jmp alltraps 80107251: e9 d1 f3 ff ff jmp 80106627 <alltraps> 80107256 <vector155>: .globl vector155 vector155: pushl $0 80107256: 6a 00 push $0x0 pushl $155 80107258: 68 9b 00 00 00 push $0x9b jmp alltraps 8010725d: e9 c5 f3 ff ff jmp 80106627 <alltraps> 80107262 <vector156>: .globl vector156 vector156: pushl $0 80107262: 6a 00 push $0x0 pushl $156 80107264: 68 9c 00 00 00 push $0x9c jmp alltraps 80107269: e9 b9 f3 ff ff jmp 80106627 <alltraps> 8010726e <vector157>: .globl vector157 vector157: pushl $0 8010726e: 6a 00 push $0x0 pushl $157 80107270: 68 9d 00 00 00 push $0x9d jmp alltraps 80107275: e9 ad f3 ff ff jmp 80106627 <alltraps> 8010727a <vector158>: .globl vector158 vector158: pushl $0 8010727a: 6a 00 push $0x0 pushl $158 8010727c: 68 9e 00 00 00 push $0x9e jmp alltraps 80107281: e9 a1 f3 ff ff jmp 80106627 <alltraps> 80107286 <vector159>: .globl vector159 vector159: pushl $0 80107286: 6a 00 push $0x0 pushl $159 80107288: 68 9f 00 00 00 push $0x9f jmp alltraps 8010728d: e9 95 f3 ff ff jmp 80106627 <alltraps> 80107292 <vector160>: .globl vector160 vector160: pushl $0 80107292: 6a 00 push $0x0 pushl $160 80107294: 68 a0 00 00 00 push $0xa0 jmp alltraps 80107299: e9 89 f3 ff ff jmp 80106627 <alltraps> 8010729e <vector161>: .globl vector161 vector161: pushl $0 8010729e: 6a 00 push $0x0 pushl $161 801072a0: 68 a1 00 00 00 push $0xa1 jmp alltraps 801072a5: e9 7d f3 ff ff jmp 80106627 <alltraps> 801072aa <vector162>: .globl vector162 vector162: pushl $0 801072aa: 6a 00 push $0x0 pushl $162 801072ac: 68 a2 00 00 00 push $0xa2 jmp alltraps 801072b1: e9 71 f3 ff ff jmp 80106627 <alltraps> 801072b6 <vector163>: .globl vector163 vector163: pushl $0 801072b6: 6a 00 push $0x0 pushl $163 801072b8: 68 a3 00 00 00 push $0xa3 jmp alltraps 801072bd: e9 65 f3 ff ff jmp 80106627 <alltraps> 801072c2 <vector164>: .globl vector164 vector164: pushl $0 801072c2: 6a 00 push $0x0 pushl $164 801072c4: 68 a4 00 00 00 push $0xa4 jmp alltraps 801072c9: e9 59 f3 ff ff jmp 80106627 <alltraps> 801072ce <vector165>: .globl vector165 vector165: pushl $0 801072ce: 6a 00 push $0x0 pushl $165 801072d0: 68 a5 00 00 00 push $0xa5 jmp alltraps 801072d5: e9 4d f3 ff ff jmp 80106627 <alltraps> 801072da <vector166>: .globl vector166 vector166: pushl $0 801072da: 6a 00 push $0x0 pushl $166 801072dc: 68 a6 00 00 00 push $0xa6 jmp alltraps 801072e1: e9 41 f3 ff ff jmp 80106627 <alltraps> 801072e6 <vector167>: .globl vector167 vector167: pushl $0 801072e6: 6a 00 push $0x0 pushl $167 801072e8: 68 a7 00 00 00 push $0xa7 jmp alltraps 801072ed: e9 35 f3 ff ff jmp 80106627 <alltraps> 801072f2 <vector168>: .globl vector168 vector168: pushl $0 801072f2: 6a 00 push $0x0 pushl $168 801072f4: 68 a8 00 00 00 push $0xa8 jmp alltraps 801072f9: e9 29 f3 ff ff jmp 80106627 <alltraps> 801072fe <vector169>: .globl vector169 vector169: pushl $0 801072fe: 6a 00 push $0x0 pushl $169 80107300: 68 a9 00 00 00 push $0xa9 jmp alltraps 80107305: e9 1d f3 ff ff jmp 80106627 <alltraps> 8010730a <vector170>: .globl vector170 vector170: pushl $0 8010730a: 6a 00 push $0x0 pushl $170 8010730c: 68 aa 00 00 00 push $0xaa jmp alltraps 80107311: e9 11 f3 ff ff jmp 80106627 <alltraps> 80107316 <vector171>: .globl vector171 vector171: pushl $0 80107316: 6a 00 push $0x0 pushl $171 80107318: 68 ab 00 00 00 push $0xab jmp alltraps 8010731d: e9 05 f3 ff ff jmp 80106627 <alltraps> 80107322 <vector172>: .globl vector172 vector172: pushl $0 80107322: 6a 00 push $0x0 pushl $172 80107324: 68 ac 00 00 00 push $0xac jmp alltraps 80107329: e9 f9 f2 ff ff jmp 80106627 <alltraps> 8010732e <vector173>: .globl vector173 vector173: pushl $0 8010732e: 6a 00 push $0x0 pushl $173 80107330: 68 ad 00 00 00 push $0xad jmp alltraps 80107335: e9 ed f2 ff ff jmp 80106627 <alltraps> 8010733a <vector174>: .globl vector174 vector174: pushl $0 8010733a: 6a 00 push $0x0 pushl $174 8010733c: 68 ae 00 00 00 push $0xae jmp alltraps 80107341: e9 e1 f2 ff ff jmp 80106627 <alltraps> 80107346 <vector175>: .globl vector175 vector175: pushl $0 80107346: 6a 00 push $0x0 pushl $175 80107348: 68 af 00 00 00 push $0xaf jmp alltraps 8010734d: e9 d5 f2 ff ff jmp 80106627 <alltraps> 80107352 <vector176>: .globl vector176 vector176: pushl $0 80107352: 6a 00 push $0x0 pushl $176 80107354: 68 b0 00 00 00 push $0xb0 jmp alltraps 80107359: e9 c9 f2 ff ff jmp 80106627 <alltraps> 8010735e <vector177>: .globl vector177 vector177: pushl $0 8010735e: 6a 00 push $0x0 pushl $177 80107360: 68 b1 00 00 00 push $0xb1 jmp alltraps 80107365: e9 bd f2 ff ff jmp 80106627 <alltraps> 8010736a <vector178>: .globl vector178 vector178: pushl $0 8010736a: 6a 00 push $0x0 pushl $178 8010736c: 68 b2 00 00 00 push $0xb2 jmp alltraps 80107371: e9 b1 f2 ff ff jmp 80106627 <alltraps> 80107376 <vector179>: .globl vector179 vector179: pushl $0 80107376: 6a 00 push $0x0 pushl $179 80107378: 68 b3 00 00 00 push $0xb3 jmp alltraps 8010737d: e9 a5 f2 ff ff jmp 80106627 <alltraps> 80107382 <vector180>: .globl vector180 vector180: pushl $0 80107382: 6a 00 push $0x0 pushl $180 80107384: 68 b4 00 00 00 push $0xb4 jmp alltraps 80107389: e9 99 f2 ff ff jmp 80106627 <alltraps> 8010738e <vector181>: .globl vector181 vector181: pushl $0 8010738e: 6a 00 push $0x0 pushl $181 80107390: 68 b5 00 00 00 push $0xb5 jmp alltraps 80107395: e9 8d f2 ff ff jmp 80106627 <alltraps> 8010739a <vector182>: .globl vector182 vector182: pushl $0 8010739a: 6a 00 push $0x0 pushl $182 8010739c: 68 b6 00 00 00 push $0xb6 jmp alltraps 801073a1: e9 81 f2 ff ff jmp 80106627 <alltraps> 801073a6 <vector183>: .globl vector183 vector183: pushl $0 801073a6: 6a 00 push $0x0 pushl $183 801073a8: 68 b7 00 00 00 push $0xb7 jmp alltraps 801073ad: e9 75 f2 ff ff jmp 80106627 <alltraps> 801073b2 <vector184>: .globl vector184 vector184: pushl $0 801073b2: 6a 00 push $0x0 pushl $184 801073b4: 68 b8 00 00 00 push $0xb8 jmp alltraps 801073b9: e9 69 f2 ff ff jmp 80106627 <alltraps> 801073be <vector185>: .globl vector185 vector185: pushl $0 801073be: 6a 00 push $0x0 pushl $185 801073c0: 68 b9 00 00 00 push $0xb9 jmp alltraps 801073c5: e9 5d f2 ff ff jmp 80106627 <alltraps> 801073ca <vector186>: .globl vector186 vector186: pushl $0 801073ca: 6a 00 push $0x0 pushl $186 801073cc: 68 ba 00 00 00 push $0xba jmp alltraps 801073d1: e9 51 f2 ff ff jmp 80106627 <alltraps> 801073d6 <vector187>: .globl vector187 vector187: pushl $0 801073d6: 6a 00 push $0x0 pushl $187 801073d8: 68 bb 00 00 00 push $0xbb jmp alltraps 801073dd: e9 45 f2 ff ff jmp 80106627 <alltraps> 801073e2 <vector188>: .globl vector188 vector188: pushl $0 801073e2: 6a 00 push $0x0 pushl $188 801073e4: 68 bc 00 00 00 push $0xbc jmp alltraps 801073e9: e9 39 f2 ff ff jmp 80106627 <alltraps> 801073ee <vector189>: .globl vector189 vector189: pushl $0 801073ee: 6a 00 push $0x0 pushl $189 801073f0: 68 bd 00 00 00 push $0xbd jmp alltraps 801073f5: e9 2d f2 ff ff jmp 80106627 <alltraps> 801073fa <vector190>: .globl vector190 vector190: pushl $0 801073fa: 6a 00 push $0x0 pushl $190 801073fc: 68 be 00 00 00 push $0xbe jmp alltraps 80107401: e9 21 f2 ff ff jmp 80106627 <alltraps> 80107406 <vector191>: .globl vector191 vector191: pushl $0 80107406: 6a 00 push $0x0 pushl $191 80107408: 68 bf 00 00 00 push $0xbf jmp alltraps 8010740d: e9 15 f2 ff ff jmp 80106627 <alltraps> 80107412 <vector192>: .globl vector192 vector192: pushl $0 80107412: 6a 00 push $0x0 pushl $192 80107414: 68 c0 00 00 00 push $0xc0 jmp alltraps 80107419: e9 09 f2 ff ff jmp 80106627 <alltraps> 8010741e <vector193>: .globl vector193 vector193: pushl $0 8010741e: 6a 00 push $0x0 pushl $193 80107420: 68 c1 00 00 00 push $0xc1 jmp alltraps 80107425: e9 fd f1 ff ff jmp 80106627 <alltraps> 8010742a <vector194>: .globl vector194 vector194: pushl $0 8010742a: 6a 00 push $0x0 pushl $194 8010742c: 68 c2 00 00 00 push $0xc2 jmp alltraps 80107431: e9 f1 f1 ff ff jmp 80106627 <alltraps> 80107436 <vector195>: .globl vector195 vector195: pushl $0 80107436: 6a 00 push $0x0 pushl $195 80107438: 68 c3 00 00 00 push $0xc3 jmp alltraps 8010743d: e9 e5 f1 ff ff jmp 80106627 <alltraps> 80107442 <vector196>: .globl vector196 vector196: pushl $0 80107442: 6a 00 push $0x0 pushl $196 80107444: 68 c4 00 00 00 push $0xc4 jmp alltraps 80107449: e9 d9 f1 ff ff jmp 80106627 <alltraps> 8010744e <vector197>: .globl vector197 vector197: pushl $0 8010744e: 6a 00 push $0x0 pushl $197 80107450: 68 c5 00 00 00 push $0xc5 jmp alltraps 80107455: e9 cd f1 ff ff jmp 80106627 <alltraps> 8010745a <vector198>: .globl vector198 vector198: pushl $0 8010745a: 6a 00 push $0x0 pushl $198 8010745c: 68 c6 00 00 00 push $0xc6 jmp alltraps 80107461: e9 c1 f1 ff ff jmp 80106627 <alltraps> 80107466 <vector199>: .globl vector199 vector199: pushl $0 80107466: 6a 00 push $0x0 pushl $199 80107468: 68 c7 00 00 00 push $0xc7 jmp alltraps 8010746d: e9 b5 f1 ff ff jmp 80106627 <alltraps> 80107472 <vector200>: .globl vector200 vector200: pushl $0 80107472: 6a 00 push $0x0 pushl $200 80107474: 68 c8 00 00 00 push $0xc8 jmp alltraps 80107479: e9 a9 f1 ff ff jmp 80106627 <alltraps> 8010747e <vector201>: .globl vector201 vector201: pushl $0 8010747e: 6a 00 push $0x0 pushl $201 80107480: 68 c9 00 00 00 push $0xc9 jmp alltraps 80107485: e9 9d f1 ff ff jmp 80106627 <alltraps> 8010748a <vector202>: .globl vector202 vector202: pushl $0 8010748a: 6a 00 push $0x0 pushl $202 8010748c: 68 ca 00 00 00 push $0xca jmp alltraps 80107491: e9 91 f1 ff ff jmp 80106627 <alltraps> 80107496 <vector203>: .globl vector203 vector203: pushl $0 80107496: 6a 00 push $0x0 pushl $203 80107498: 68 cb 00 00 00 push $0xcb jmp alltraps 8010749d: e9 85 f1 ff ff jmp 80106627 <alltraps> 801074a2 <vector204>: .globl vector204 vector204: pushl $0 801074a2: 6a 00 push $0x0 pushl $204 801074a4: 68 cc 00 00 00 push $0xcc jmp alltraps 801074a9: e9 79 f1 ff ff jmp 80106627 <alltraps> 801074ae <vector205>: .globl vector205 vector205: pushl $0 801074ae: 6a 00 push $0x0 pushl $205 801074b0: 68 cd 00 00 00 push $0xcd jmp alltraps 801074b5: e9 6d f1 ff ff jmp 80106627 <alltraps> 801074ba <vector206>: .globl vector206 vector206: pushl $0 801074ba: 6a 00 push $0x0 pushl $206 801074bc: 68 ce 00 00 00 push $0xce jmp alltraps 801074c1: e9 61 f1 ff ff jmp 80106627 <alltraps> 801074c6 <vector207>: .globl vector207 vector207: pushl $0 801074c6: 6a 00 push $0x0 pushl $207 801074c8: 68 cf 00 00 00 push $0xcf jmp alltraps 801074cd: e9 55 f1 ff ff jmp 80106627 <alltraps> 801074d2 <vector208>: .globl vector208 vector208: pushl $0 801074d2: 6a 00 push $0x0 pushl $208 801074d4: 68 d0 00 00 00 push $0xd0 jmp alltraps 801074d9: e9 49 f1 ff ff jmp 80106627 <alltraps> 801074de <vector209>: .globl vector209 vector209: pushl $0 801074de: 6a 00 push $0x0 pushl $209 801074e0: 68 d1 00 00 00 push $0xd1 jmp alltraps 801074e5: e9 3d f1 ff ff jmp 80106627 <alltraps> 801074ea <vector210>: .globl vector210 vector210: pushl $0 801074ea: 6a 00 push $0x0 pushl $210 801074ec: 68 d2 00 00 00 push $0xd2 jmp alltraps 801074f1: e9 31 f1 ff ff jmp 80106627 <alltraps> 801074f6 <vector211>: .globl vector211 vector211: pushl $0 801074f6: 6a 00 push $0x0 pushl $211 801074f8: 68 d3 00 00 00 push $0xd3 jmp alltraps 801074fd: e9 25 f1 ff ff jmp 80106627 <alltraps> 80107502 <vector212>: .globl vector212 vector212: pushl $0 80107502: 6a 00 push $0x0 pushl $212 80107504: 68 d4 00 00 00 push $0xd4 jmp alltraps 80107509: e9 19 f1 ff ff jmp 80106627 <alltraps> 8010750e <vector213>: .globl vector213 vector213: pushl $0 8010750e: 6a 00 push $0x0 pushl $213 80107510: 68 d5 00 00 00 push $0xd5 jmp alltraps 80107515: e9 0d f1 ff ff jmp 80106627 <alltraps> 8010751a <vector214>: .globl vector214 vector214: pushl $0 8010751a: 6a 00 push $0x0 pushl $214 8010751c: 68 d6 00 00 00 push $0xd6 jmp alltraps 80107521: e9 01 f1 ff ff jmp 80106627 <alltraps> 80107526 <vector215>: .globl vector215 vector215: pushl $0 80107526: 6a 00 push $0x0 pushl $215 80107528: 68 d7 00 00 00 push $0xd7 jmp alltraps 8010752d: e9 f5 f0 ff ff jmp 80106627 <alltraps> 80107532 <vector216>: .globl vector216 vector216: pushl $0 80107532: 6a 00 push $0x0 pushl $216 80107534: 68 d8 00 00 00 push $0xd8 jmp alltraps 80107539: e9 e9 f0 ff ff jmp 80106627 <alltraps> 8010753e <vector217>: .globl vector217 vector217: pushl $0 8010753e: 6a 00 push $0x0 pushl $217 80107540: 68 d9 00 00 00 push $0xd9 jmp alltraps 80107545: e9 dd f0 ff ff jmp 80106627 <alltraps> 8010754a <vector218>: .globl vector218 vector218: pushl $0 8010754a: 6a 00 push $0x0 pushl $218 8010754c: 68 da 00 00 00 push $0xda jmp alltraps 80107551: e9 d1 f0 ff ff jmp 80106627 <alltraps> 80107556 <vector219>: .globl vector219 vector219: pushl $0 80107556: 6a 00 push $0x0 pushl $219 80107558: 68 db 00 00 00 push $0xdb jmp alltraps 8010755d: e9 c5 f0 ff ff jmp 80106627 <alltraps> 80107562 <vector220>: .globl vector220 vector220: pushl $0 80107562: 6a 00 push $0x0 pushl $220 80107564: 68 dc 00 00 00 push $0xdc jmp alltraps 80107569: e9 b9 f0 ff ff jmp 80106627 <alltraps> 8010756e <vector221>: .globl vector221 vector221: pushl $0 8010756e: 6a 00 push $0x0 pushl $221 80107570: 68 dd 00 00 00 push $0xdd jmp alltraps 80107575: e9 ad f0 ff ff jmp 80106627 <alltraps> 8010757a <vector222>: .globl vector222 vector222: pushl $0 8010757a: 6a 00 push $0x0 pushl $222 8010757c: 68 de 00 00 00 push $0xde jmp alltraps 80107581: e9 a1 f0 ff ff jmp 80106627 <alltraps> 80107586 <vector223>: .globl vector223 vector223: pushl $0 80107586: 6a 00 push $0x0 pushl $223 80107588: 68 df 00 00 00 push $0xdf jmp alltraps 8010758d: e9 95 f0 ff ff jmp 80106627 <alltraps> 80107592 <vector224>: .globl vector224 vector224: pushl $0 80107592: 6a 00 push $0x0 pushl $224 80107594: 68 e0 00 00 00 push $0xe0 jmp alltraps 80107599: e9 89 f0 ff ff jmp 80106627 <alltraps> 8010759e <vector225>: .globl vector225 vector225: pushl $0 8010759e: 6a 00 push $0x0 pushl $225 801075a0: 68 e1 00 00 00 push $0xe1 jmp alltraps 801075a5: e9 7d f0 ff ff jmp 80106627 <alltraps> 801075aa <vector226>: .globl vector226 vector226: pushl $0 801075aa: 6a 00 push $0x0 pushl $226 801075ac: 68 e2 00 00 00 push $0xe2 jmp alltraps 801075b1: e9 71 f0 ff ff jmp 80106627 <alltraps> 801075b6 <vector227>: .globl vector227 vector227: pushl $0 801075b6: 6a 00 push $0x0 pushl $227 801075b8: 68 e3 00 00 00 push $0xe3 jmp alltraps 801075bd: e9 65 f0 ff ff jmp 80106627 <alltraps> 801075c2 <vector228>: .globl vector228 vector228: pushl $0 801075c2: 6a 00 push $0x0 pushl $228 801075c4: 68 e4 00 00 00 push $0xe4 jmp alltraps 801075c9: e9 59 f0 ff ff jmp 80106627 <alltraps> 801075ce <vector229>: .globl vector229 vector229: pushl $0 801075ce: 6a 00 push $0x0 pushl $229 801075d0: 68 e5 00 00 00 push $0xe5 jmp alltraps 801075d5: e9 4d f0 ff ff jmp 80106627 <alltraps> 801075da <vector230>: .globl vector230 vector230: pushl $0 801075da: 6a 00 push $0x0 pushl $230 801075dc: 68 e6 00 00 00 push $0xe6 jmp alltraps 801075e1: e9 41 f0 ff ff jmp 80106627 <alltraps> 801075e6 <vector231>: .globl vector231 vector231: pushl $0 801075e6: 6a 00 push $0x0 pushl $231 801075e8: 68 e7 00 00 00 push $0xe7 jmp alltraps 801075ed: e9 35 f0 ff ff jmp 80106627 <alltraps> 801075f2 <vector232>: .globl vector232 vector232: pushl $0 801075f2: 6a 00 push $0x0 pushl $232 801075f4: 68 e8 00 00 00 push $0xe8 jmp alltraps 801075f9: e9 29 f0 ff ff jmp 80106627 <alltraps> 801075fe <vector233>: .globl vector233 vector233: pushl $0 801075fe: 6a 00 push $0x0 pushl $233 80107600: 68 e9 00 00 00 push $0xe9 jmp alltraps 80107605: e9 1d f0 ff ff jmp 80106627 <alltraps> 8010760a <vector234>: .globl vector234 vector234: pushl $0 8010760a: 6a 00 push $0x0 pushl $234 8010760c: 68 ea 00 00 00 push $0xea jmp alltraps 80107611: e9 11 f0 ff ff jmp 80106627 <alltraps> 80107616 <vector235>: .globl vector235 vector235: pushl $0 80107616: 6a 00 push $0x0 pushl $235 80107618: 68 eb 00 00 00 push $0xeb jmp alltraps 8010761d: e9 05 f0 ff ff jmp 80106627 <alltraps> 80107622 <vector236>: .globl vector236 vector236: pushl $0 80107622: 6a 00 push $0x0 pushl $236 80107624: 68 ec 00 00 00 push $0xec jmp alltraps 80107629: e9 f9 ef ff ff jmp 80106627 <alltraps> 8010762e <vector237>: .globl vector237 vector237: pushl $0 8010762e: 6a 00 push $0x0 pushl $237 80107630: 68 ed 00 00 00 push $0xed jmp alltraps 80107635: e9 ed ef ff ff jmp 80106627 <alltraps> 8010763a <vector238>: .globl vector238 vector238: pushl $0 8010763a: 6a 00 push $0x0 pushl $238 8010763c: 68 ee 00 00 00 push $0xee jmp alltraps 80107641: e9 e1 ef ff ff jmp 80106627 <alltraps> 80107646 <vector239>: .globl vector239 vector239: pushl $0 80107646: 6a 00 push $0x0 pushl $239 80107648: 68 ef 00 00 00 push $0xef jmp alltraps 8010764d: e9 d5 ef ff ff jmp 80106627 <alltraps> 80107652 <vector240>: .globl vector240 vector240: pushl $0 80107652: 6a 00 push $0x0 pushl $240 80107654: 68 f0 00 00 00 push $0xf0 jmp alltraps 80107659: e9 c9 ef ff ff jmp 80106627 <alltraps> 8010765e <vector241>: .globl vector241 vector241: pushl $0 8010765e: 6a 00 push $0x0 pushl $241 80107660: 68 f1 00 00 00 push $0xf1 jmp alltraps 80107665: e9 bd ef ff ff jmp 80106627 <alltraps> 8010766a <vector242>: .globl vector242 vector242: pushl $0 8010766a: 6a 00 push $0x0 pushl $242 8010766c: 68 f2 00 00 00 push $0xf2 jmp alltraps 80107671: e9 b1 ef ff ff jmp 80106627 <alltraps> 80107676 <vector243>: .globl vector243 vector243: pushl $0 80107676: 6a 00 push $0x0 pushl $243 80107678: 68 f3 00 00 00 push $0xf3 jmp alltraps 8010767d: e9 a5 ef ff ff jmp 80106627 <alltraps> 80107682 <vector244>: .globl vector244 vector244: pushl $0 80107682: 6a 00 push $0x0 pushl $244 80107684: 68 f4 00 00 00 push $0xf4 jmp alltraps 80107689: e9 99 ef ff ff jmp 80106627 <alltraps> 8010768e <vector245>: .globl vector245 vector245: pushl $0 8010768e: 6a 00 push $0x0 pushl $245 80107690: 68 f5 00 00 00 push $0xf5 jmp alltraps 80107695: e9 8d ef ff ff jmp 80106627 <alltraps> 8010769a <vector246>: .globl vector246 vector246: pushl $0 8010769a: 6a 00 push $0x0 pushl $246 8010769c: 68 f6 00 00 00 push $0xf6 jmp alltraps 801076a1: e9 81 ef ff ff jmp 80106627 <alltraps> 801076a6 <vector247>: .globl vector247 vector247: pushl $0 801076a6: 6a 00 push $0x0 pushl $247 801076a8: 68 f7 00 00 00 push $0xf7 jmp alltraps 801076ad: e9 75 ef ff ff jmp 80106627 <alltraps> 801076b2 <vector248>: .globl vector248 vector248: pushl $0 801076b2: 6a 00 push $0x0 pushl $248 801076b4: 68 f8 00 00 00 push $0xf8 jmp alltraps 801076b9: e9 69 ef ff ff jmp 80106627 <alltraps> 801076be <vector249>: .globl vector249 vector249: pushl $0 801076be: 6a 00 push $0x0 pushl $249 801076c0: 68 f9 00 00 00 push $0xf9 jmp alltraps 801076c5: e9 5d ef ff ff jmp 80106627 <alltraps> 801076ca <vector250>: .globl vector250 vector250: pushl $0 801076ca: 6a 00 push $0x0 pushl $250 801076cc: 68 fa 00 00 00 push $0xfa jmp alltraps 801076d1: e9 51 ef ff ff jmp 80106627 <alltraps> 801076d6 <vector251>: .globl vector251 vector251: pushl $0 801076d6: 6a 00 push $0x0 pushl $251 801076d8: 68 fb 00 00 00 push $0xfb jmp alltraps 801076dd: e9 45 ef ff ff jmp 80106627 <alltraps> 801076e2 <vector252>: .globl vector252 vector252: pushl $0 801076e2: 6a 00 push $0x0 pushl $252 801076e4: 68 fc 00 00 00 push $0xfc jmp alltraps 801076e9: e9 39 ef ff ff jmp 80106627 <alltraps> 801076ee <vector253>: .globl vector253 vector253: pushl $0 801076ee: 6a 00 push $0x0 pushl $253 801076f0: 68 fd 00 00 00 push $0xfd jmp alltraps 801076f5: e9 2d ef ff ff jmp 80106627 <alltraps> 801076fa <vector254>: .globl vector254 vector254: pushl $0 801076fa: 6a 00 push $0x0 pushl $254 801076fc: 68 fe 00 00 00 push $0xfe jmp alltraps 80107701: e9 21 ef ff ff jmp 80106627 <alltraps> 80107706 <vector255>: .globl vector255 vector255: pushl $0 80107706: 6a 00 push $0x0 pushl $255 80107708: 68 ff 00 00 00 push $0xff jmp alltraps 8010770d: e9 15 ef ff ff jmp 80106627 <alltraps> 80107712 <lgdt>: struct segdesc; static inline void lgdt(struct segdesc *p, int size) { 80107712: 55 push %ebp 80107713: 89 e5 mov %esp,%ebp 80107715: 83 ec 10 sub $0x10,%esp volatile ushort pd[3]; pd[0] = size-1; 80107718: 8b 45 0c mov 0xc(%ebp),%eax 8010771b: 83 e8 01 sub $0x1,%eax 8010771e: 66 89 45 fa mov %ax,-0x6(%ebp) pd[1] = (uint)p; 80107722: 8b 45 08 mov 0x8(%ebp),%eax 80107725: 66 89 45 fc mov %ax,-0x4(%ebp) pd[2] = (uint)p >> 16; 80107729: 8b 45 08 mov 0x8(%ebp),%eax 8010772c: c1 e8 10 shr $0x10,%eax 8010772f: 66 89 45 fe mov %ax,-0x2(%ebp) asm volatile("lgdt (%0)" : : "r" (pd)); 80107733: 8d 45 fa lea -0x6(%ebp),%eax 80107736: 0f 01 10 lgdtl (%eax) } 80107739: c9 leave 8010773a: c3 ret 8010773b <ltr>: asm volatile("lidt (%0)" : : "r" (pd)); } static inline void ltr(ushort sel) { 8010773b: 55 push %ebp 8010773c: 89 e5 mov %esp,%ebp 8010773e: 83 ec 04 sub $0x4,%esp 80107741: 8b 45 08 mov 0x8(%ebp),%eax 80107744: 66 89 45 fc mov %ax,-0x4(%ebp) asm volatile("ltr %0" : : "r" (sel)); 80107748: 0f b7 45 fc movzwl -0x4(%ebp),%eax 8010774c: 0f 00 d8 ltr %ax } 8010774f: c9 leave 80107750: c3 ret 80107751 <loadgs>: return eflags; } static inline void loadgs(ushort v) { 80107751: 55 push %ebp 80107752: 89 e5 mov %esp,%ebp 80107754: 83 ec 04 sub $0x4,%esp 80107757: 8b 45 08 mov 0x8(%ebp),%eax 8010775a: 66 89 45 fc mov %ax,-0x4(%ebp) asm volatile("movw %0, %%gs" : : "r" (v)); 8010775e: 0f b7 45 fc movzwl -0x4(%ebp),%eax 80107762: 8e e8 mov %eax,%gs } 80107764: c9 leave 80107765: c3 ret 80107766 <lcr3>: return val; } static inline void lcr3(uint val) { 80107766: 55 push %ebp 80107767: 89 e5 mov %esp,%ebp asm volatile("movl %0,%%cr3" : : "r" (val)); 80107769: 8b 45 08 mov 0x8(%ebp),%eax 8010776c: 0f 22 d8 mov %eax,%cr3 } 8010776f: 5d pop %ebp 80107770: c3 ret 80107771 <v2p>: #define KERNBASE 0x80000000 // First kernel virtual address #define KERNLINK (KERNBASE+EXTMEM) // Address where kernel is linked #ifndef __ASSEMBLER__ static inline uint v2p(void *a) { return ((uint) (a)) - KERNBASE; } 80107771: 55 push %ebp 80107772: 89 e5 mov %esp,%ebp 80107774: 8b 45 08 mov 0x8(%ebp),%eax 80107777: 05 00 00 00 80 add $0x80000000,%eax 8010777c: 5d pop %ebp 8010777d: c3 ret 8010777e <p2v>: static inline void *p2v(uint a) { return (void *) ((a) + KERNBASE); } 8010777e: 55 push %ebp 8010777f: 89 e5 mov %esp,%ebp 80107781: 8b 45 08 mov 0x8(%ebp),%eax 80107784: 05 00 00 00 80 add $0x80000000,%eax 80107789: 5d pop %ebp 8010778a: c3 ret 8010778b <seginit>: // Set up CPU's kernel segment descriptors. // Run once on entry on each CPU. void seginit(void) { 8010778b: 55 push %ebp 8010778c: 89 e5 mov %esp,%ebp 8010778e: 53 push %ebx 8010778f: 83 ec 24 sub $0x24,%esp // Map "logical" addresses to virtual addresses using identity map. // Cannot share a CODE descriptor for both kernel and user // because it would have to have DPL_USR, but the CPU forbids // an interrupt from CPL=0 to DPL=3. c = &cpus[cpunum()]; 80107792: e8 bc b6 ff ff call 80102e53 <cpunum> 80107797: 69 c0 bc 00 00 00 imul $0xbc,%eax,%eax 8010779d: 05 40 f9 10 80 add $0x8010f940,%eax 801077a2: 89 45 f4 mov %eax,-0xc(%ebp) c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 801077a5: 8b 45 f4 mov -0xc(%ebp),%eax 801077a8: 66 c7 40 78 ff ff movw $0xffff,0x78(%eax) 801077ae: 8b 45 f4 mov -0xc(%ebp),%eax 801077b1: 66 c7 40 7a 00 00 movw $0x0,0x7a(%eax) 801077b7: 8b 45 f4 mov -0xc(%ebp),%eax 801077ba: c6 40 7c 00 movb $0x0,0x7c(%eax) 801077be: 8b 45 f4 mov -0xc(%ebp),%eax 801077c1: 0f b6 50 7d movzbl 0x7d(%eax),%edx 801077c5: 83 e2 f0 and $0xfffffff0,%edx 801077c8: 83 ca 0a or $0xa,%edx 801077cb: 88 50 7d mov %dl,0x7d(%eax) 801077ce: 8b 45 f4 mov -0xc(%ebp),%eax 801077d1: 0f b6 50 7d movzbl 0x7d(%eax),%edx 801077d5: 83 ca 10 or $0x10,%edx 801077d8: 88 50 7d mov %dl,0x7d(%eax) 801077db: 8b 45 f4 mov -0xc(%ebp),%eax 801077de: 0f b6 50 7d movzbl 0x7d(%eax),%edx 801077e2: 83 e2 9f and $0xffffff9f,%edx 801077e5: 88 50 7d mov %dl,0x7d(%eax) 801077e8: 8b 45 f4 mov -0xc(%ebp),%eax 801077eb: 0f b6 50 7d movzbl 0x7d(%eax),%edx 801077ef: 83 ca 80 or $0xffffff80,%edx 801077f2: 88 50 7d mov %dl,0x7d(%eax) 801077f5: 8b 45 f4 mov -0xc(%ebp),%eax 801077f8: 0f b6 50 7e movzbl 0x7e(%eax),%edx 801077fc: 83 ca 0f or $0xf,%edx 801077ff: 88 50 7e mov %dl,0x7e(%eax) 80107802: 8b 45 f4 mov -0xc(%ebp),%eax 80107805: 0f b6 50 7e movzbl 0x7e(%eax),%edx 80107809: 83 e2 ef and $0xffffffef,%edx 8010780c: 88 50 7e mov %dl,0x7e(%eax) 8010780f: 8b 45 f4 mov -0xc(%ebp),%eax 80107812: 0f b6 50 7e movzbl 0x7e(%eax),%edx 80107816: 83 e2 df and $0xffffffdf,%edx 80107819: 88 50 7e mov %dl,0x7e(%eax) 8010781c: 8b 45 f4 mov -0xc(%ebp),%eax 8010781f: 0f b6 50 7e movzbl 0x7e(%eax),%edx 80107823: 83 ca 40 or $0x40,%edx 80107826: 88 50 7e mov %dl,0x7e(%eax) 80107829: 8b 45 f4 mov -0xc(%ebp),%eax 8010782c: 0f b6 50 7e movzbl 0x7e(%eax),%edx 80107830: 83 ca 80 or $0xffffff80,%edx 80107833: 88 50 7e mov %dl,0x7e(%eax) 80107836: 8b 45 f4 mov -0xc(%ebp),%eax 80107839: c6 40 7f 00 movb $0x0,0x7f(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 8010783d: 8b 45 f4 mov -0xc(%ebp),%eax 80107840: 66 c7 80 80 00 00 00 movw $0xffff,0x80(%eax) 80107847: ff ff 80107849: 8b 45 f4 mov -0xc(%ebp),%eax 8010784c: 66 c7 80 82 00 00 00 movw $0x0,0x82(%eax) 80107853: 00 00 80107855: 8b 45 f4 mov -0xc(%ebp),%eax 80107858: c6 80 84 00 00 00 00 movb $0x0,0x84(%eax) 8010785f: 8b 45 f4 mov -0xc(%ebp),%eax 80107862: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx 80107869: 83 e2 f0 and $0xfffffff0,%edx 8010786c: 83 ca 02 or $0x2,%edx 8010786f: 88 90 85 00 00 00 mov %dl,0x85(%eax) 80107875: 8b 45 f4 mov -0xc(%ebp),%eax 80107878: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx 8010787f: 83 ca 10 or $0x10,%edx 80107882: 88 90 85 00 00 00 mov %dl,0x85(%eax) 80107888: 8b 45 f4 mov -0xc(%ebp),%eax 8010788b: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx 80107892: 83 e2 9f and $0xffffff9f,%edx 80107895: 88 90 85 00 00 00 mov %dl,0x85(%eax) 8010789b: 8b 45 f4 mov -0xc(%ebp),%eax 8010789e: 0f b6 90 85 00 00 00 movzbl 0x85(%eax),%edx 801078a5: 83 ca 80 or $0xffffff80,%edx 801078a8: 88 90 85 00 00 00 mov %dl,0x85(%eax) 801078ae: 8b 45 f4 mov -0xc(%ebp),%eax 801078b1: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx 801078b8: 83 ca 0f or $0xf,%edx 801078bb: 88 90 86 00 00 00 mov %dl,0x86(%eax) 801078c1: 8b 45 f4 mov -0xc(%ebp),%eax 801078c4: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx 801078cb: 83 e2 ef and $0xffffffef,%edx 801078ce: 88 90 86 00 00 00 mov %dl,0x86(%eax) 801078d4: 8b 45 f4 mov -0xc(%ebp),%eax 801078d7: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx 801078de: 83 e2 df and $0xffffffdf,%edx 801078e1: 88 90 86 00 00 00 mov %dl,0x86(%eax) 801078e7: 8b 45 f4 mov -0xc(%ebp),%eax 801078ea: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx 801078f1: 83 ca 40 or $0x40,%edx 801078f4: 88 90 86 00 00 00 mov %dl,0x86(%eax) 801078fa: 8b 45 f4 mov -0xc(%ebp),%eax 801078fd: 0f b6 90 86 00 00 00 movzbl 0x86(%eax),%edx 80107904: 83 ca 80 or $0xffffff80,%edx 80107907: 88 90 86 00 00 00 mov %dl,0x86(%eax) 8010790d: 8b 45 f4 mov -0xc(%ebp),%eax 80107910: c6 80 87 00 00 00 00 movb $0x0,0x87(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 80107917: 8b 45 f4 mov -0xc(%ebp),%eax 8010791a: 66 c7 80 90 00 00 00 movw $0xffff,0x90(%eax) 80107921: ff ff 80107923: 8b 45 f4 mov -0xc(%ebp),%eax 80107926: 66 c7 80 92 00 00 00 movw $0x0,0x92(%eax) 8010792d: 00 00 8010792f: 8b 45 f4 mov -0xc(%ebp),%eax 80107932: c6 80 94 00 00 00 00 movb $0x0,0x94(%eax) 80107939: 8b 45 f4 mov -0xc(%ebp),%eax 8010793c: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx 80107943: 83 e2 f0 and $0xfffffff0,%edx 80107946: 83 ca 0a or $0xa,%edx 80107949: 88 90 95 00 00 00 mov %dl,0x95(%eax) 8010794f: 8b 45 f4 mov -0xc(%ebp),%eax 80107952: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx 80107959: 83 ca 10 or $0x10,%edx 8010795c: 88 90 95 00 00 00 mov %dl,0x95(%eax) 80107962: 8b 45 f4 mov -0xc(%ebp),%eax 80107965: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx 8010796c: 83 ca 60 or $0x60,%edx 8010796f: 88 90 95 00 00 00 mov %dl,0x95(%eax) 80107975: 8b 45 f4 mov -0xc(%ebp),%eax 80107978: 0f b6 90 95 00 00 00 movzbl 0x95(%eax),%edx 8010797f: 83 ca 80 or $0xffffff80,%edx 80107982: 88 90 95 00 00 00 mov %dl,0x95(%eax) 80107988: 8b 45 f4 mov -0xc(%ebp),%eax 8010798b: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx 80107992: 83 ca 0f or $0xf,%edx 80107995: 88 90 96 00 00 00 mov %dl,0x96(%eax) 8010799b: 8b 45 f4 mov -0xc(%ebp),%eax 8010799e: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx 801079a5: 83 e2 ef and $0xffffffef,%edx 801079a8: 88 90 96 00 00 00 mov %dl,0x96(%eax) 801079ae: 8b 45 f4 mov -0xc(%ebp),%eax 801079b1: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx 801079b8: 83 e2 df and $0xffffffdf,%edx 801079bb: 88 90 96 00 00 00 mov %dl,0x96(%eax) 801079c1: 8b 45 f4 mov -0xc(%ebp),%eax 801079c4: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx 801079cb: 83 ca 40 or $0x40,%edx 801079ce: 88 90 96 00 00 00 mov %dl,0x96(%eax) 801079d4: 8b 45 f4 mov -0xc(%ebp),%eax 801079d7: 0f b6 90 96 00 00 00 movzbl 0x96(%eax),%edx 801079de: 83 ca 80 or $0xffffff80,%edx 801079e1: 88 90 96 00 00 00 mov %dl,0x96(%eax) 801079e7: 8b 45 f4 mov -0xc(%ebp),%eax 801079ea: c6 80 97 00 00 00 00 movb $0x0,0x97(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 801079f1: 8b 45 f4 mov -0xc(%ebp),%eax 801079f4: 66 c7 80 98 00 00 00 movw $0xffff,0x98(%eax) 801079fb: ff ff 801079fd: 8b 45 f4 mov -0xc(%ebp),%eax 80107a00: 66 c7 80 9a 00 00 00 movw $0x0,0x9a(%eax) 80107a07: 00 00 80107a09: 8b 45 f4 mov -0xc(%ebp),%eax 80107a0c: c6 80 9c 00 00 00 00 movb $0x0,0x9c(%eax) 80107a13: 8b 45 f4 mov -0xc(%ebp),%eax 80107a16: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx 80107a1d: 83 e2 f0 and $0xfffffff0,%edx 80107a20: 83 ca 02 or $0x2,%edx 80107a23: 88 90 9d 00 00 00 mov %dl,0x9d(%eax) 80107a29: 8b 45 f4 mov -0xc(%ebp),%eax 80107a2c: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx 80107a33: 83 ca 10 or $0x10,%edx 80107a36: 88 90 9d 00 00 00 mov %dl,0x9d(%eax) 80107a3c: 8b 45 f4 mov -0xc(%ebp),%eax 80107a3f: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx 80107a46: 83 ca 60 or $0x60,%edx 80107a49: 88 90 9d 00 00 00 mov %dl,0x9d(%eax) 80107a4f: 8b 45 f4 mov -0xc(%ebp),%eax 80107a52: 0f b6 90 9d 00 00 00 movzbl 0x9d(%eax),%edx 80107a59: 83 ca 80 or $0xffffff80,%edx 80107a5c: 88 90 9d 00 00 00 mov %dl,0x9d(%eax) 80107a62: 8b 45 f4 mov -0xc(%ebp),%eax 80107a65: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx 80107a6c: 83 ca 0f or $0xf,%edx 80107a6f: 88 90 9e 00 00 00 mov %dl,0x9e(%eax) 80107a75: 8b 45 f4 mov -0xc(%ebp),%eax 80107a78: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx 80107a7f: 83 e2 ef and $0xffffffef,%edx 80107a82: 88 90 9e 00 00 00 mov %dl,0x9e(%eax) 80107a88: 8b 45 f4 mov -0xc(%ebp),%eax 80107a8b: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx 80107a92: 83 e2 df and $0xffffffdf,%edx 80107a95: 88 90 9e 00 00 00 mov %dl,0x9e(%eax) 80107a9b: 8b 45 f4 mov -0xc(%ebp),%eax 80107a9e: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx 80107aa5: 83 ca 40 or $0x40,%edx 80107aa8: 88 90 9e 00 00 00 mov %dl,0x9e(%eax) 80107aae: 8b 45 f4 mov -0xc(%ebp),%eax 80107ab1: 0f b6 90 9e 00 00 00 movzbl 0x9e(%eax),%edx 80107ab8: 83 ca 80 or $0xffffff80,%edx 80107abb: 88 90 9e 00 00 00 mov %dl,0x9e(%eax) 80107ac1: 8b 45 f4 mov -0xc(%ebp),%eax 80107ac4: c6 80 9f 00 00 00 00 movb $0x0,0x9f(%eax) // Map cpu, and curproc c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0); 80107acb: 8b 45 f4 mov -0xc(%ebp),%eax 80107ace: 05 b4 00 00 00 add $0xb4,%eax 80107ad3: 89 c3 mov %eax,%ebx 80107ad5: 8b 45 f4 mov -0xc(%ebp),%eax 80107ad8: 05 b4 00 00 00 add $0xb4,%eax 80107add: c1 e8 10 shr $0x10,%eax 80107ae0: 89 c1 mov %eax,%ecx 80107ae2: 8b 45 f4 mov -0xc(%ebp),%eax 80107ae5: 05 b4 00 00 00 add $0xb4,%eax 80107aea: c1 e8 18 shr $0x18,%eax 80107aed: 89 c2 mov %eax,%edx 80107aef: 8b 45 f4 mov -0xc(%ebp),%eax 80107af2: 66 c7 80 88 00 00 00 movw $0x0,0x88(%eax) 80107af9: 00 00 80107afb: 8b 45 f4 mov -0xc(%ebp),%eax 80107afe: 66 89 98 8a 00 00 00 mov %bx,0x8a(%eax) 80107b05: 8b 45 f4 mov -0xc(%ebp),%eax 80107b08: 88 88 8c 00 00 00 mov %cl,0x8c(%eax) 80107b0e: 8b 45 f4 mov -0xc(%ebp),%eax 80107b11: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx 80107b18: 83 e1 f0 and $0xfffffff0,%ecx 80107b1b: 83 c9 02 or $0x2,%ecx 80107b1e: 88 88 8d 00 00 00 mov %cl,0x8d(%eax) 80107b24: 8b 45 f4 mov -0xc(%ebp),%eax 80107b27: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx 80107b2e: 83 c9 10 or $0x10,%ecx 80107b31: 88 88 8d 00 00 00 mov %cl,0x8d(%eax) 80107b37: 8b 45 f4 mov -0xc(%ebp),%eax 80107b3a: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx 80107b41: 83 e1 9f and $0xffffff9f,%ecx 80107b44: 88 88 8d 00 00 00 mov %cl,0x8d(%eax) 80107b4a: 8b 45 f4 mov -0xc(%ebp),%eax 80107b4d: 0f b6 88 8d 00 00 00 movzbl 0x8d(%eax),%ecx 80107b54: 83 c9 80 or $0xffffff80,%ecx 80107b57: 88 88 8d 00 00 00 mov %cl,0x8d(%eax) 80107b5d: 8b 45 f4 mov -0xc(%ebp),%eax 80107b60: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx 80107b67: 83 e1 f0 and $0xfffffff0,%ecx 80107b6a: 88 88 8e 00 00 00 mov %cl,0x8e(%eax) 80107b70: 8b 45 f4 mov -0xc(%ebp),%eax 80107b73: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx 80107b7a: 83 e1 ef and $0xffffffef,%ecx 80107b7d: 88 88 8e 00 00 00 mov %cl,0x8e(%eax) 80107b83: 8b 45 f4 mov -0xc(%ebp),%eax 80107b86: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx 80107b8d: 83 e1 df and $0xffffffdf,%ecx 80107b90: 88 88 8e 00 00 00 mov %cl,0x8e(%eax) 80107b96: 8b 45 f4 mov -0xc(%ebp),%eax 80107b99: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx 80107ba0: 83 c9 40 or $0x40,%ecx 80107ba3: 88 88 8e 00 00 00 mov %cl,0x8e(%eax) 80107ba9: 8b 45 f4 mov -0xc(%ebp),%eax 80107bac: 0f b6 88 8e 00 00 00 movzbl 0x8e(%eax),%ecx 80107bb3: 83 c9 80 or $0xffffff80,%ecx 80107bb6: 88 88 8e 00 00 00 mov %cl,0x8e(%eax) 80107bbc: 8b 45 f4 mov -0xc(%ebp),%eax 80107bbf: 88 90 8f 00 00 00 mov %dl,0x8f(%eax) lgdt(c->gdt, sizeof(c->gdt)); 80107bc5: 8b 45 f4 mov -0xc(%ebp),%eax 80107bc8: 83 c0 70 add $0x70,%eax 80107bcb: c7 44 24 04 38 00 00 movl $0x38,0x4(%esp) 80107bd2: 00 80107bd3: 89 04 24 mov %eax,(%esp) 80107bd6: e8 37 fb ff ff call 80107712 <lgdt> loadgs(SEG_KCPU << 3); 80107bdb: c7 04 24 18 00 00 00 movl $0x18,(%esp) 80107be2: e8 6a fb ff ff call 80107751 <loadgs> // Initialize cpu-local storage. cpu = c; 80107be7: 8b 45 f4 mov -0xc(%ebp),%eax 80107bea: 65 a3 00 00 00 00 mov %eax,%gs:0x0 proc = 0; 80107bf0: 65 c7 05 04 00 00 00 movl $0x0,%gs:0x4 80107bf7: 00 00 00 00 } 80107bfb: 83 c4 24 add $0x24,%esp 80107bfe: 5b pop %ebx 80107bff: 5d pop %ebp 80107c00: c3 ret 80107c01 <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) { 80107c01: 55 push %ebp 80107c02: 89 e5 mov %esp,%ebp 80107c04: 83 ec 28 sub $0x28,%esp pde_t *pde; pte_t *pgtab; pde = &pgdir[PDX(va)]; 80107c07: 8b 45 0c mov 0xc(%ebp),%eax 80107c0a: c1 e8 16 shr $0x16,%eax 80107c0d: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80107c14: 8b 45 08 mov 0x8(%ebp),%eax 80107c17: 01 d0 add %edx,%eax 80107c19: 89 45 f0 mov %eax,-0x10(%ebp) if(*pde & PTE_P){ 80107c1c: 8b 45 f0 mov -0x10(%ebp),%eax 80107c1f: 8b 00 mov (%eax),%eax 80107c21: 83 e0 01 and $0x1,%eax 80107c24: 85 c0 test %eax,%eax 80107c26: 74 17 je 80107c3f <walkpgdir+0x3e> pgtab = (pte_t*)p2v(PTE_ADDR(*pde)); 80107c28: 8b 45 f0 mov -0x10(%ebp),%eax 80107c2b: 8b 00 mov (%eax),%eax 80107c2d: 25 00 f0 ff ff and $0xfffff000,%eax 80107c32: 89 04 24 mov %eax,(%esp) 80107c35: e8 44 fb ff ff call 8010777e <p2v> 80107c3a: 89 45 f4 mov %eax,-0xc(%ebp) 80107c3d: eb 4b jmp 80107c8a <walkpgdir+0x89> } else { if(!alloc || (pgtab = (pte_t*)kalloc()) == 0) 80107c3f: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 80107c43: 74 0e je 80107c53 <walkpgdir+0x52> 80107c45: e8 90 ae ff ff call 80102ada <kalloc> 80107c4a: 89 45 f4 mov %eax,-0xc(%ebp) 80107c4d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80107c51: 75 07 jne 80107c5a <walkpgdir+0x59> return 0; 80107c53: b8 00 00 00 00 mov $0x0,%eax 80107c58: eb 47 jmp 80107ca1 <walkpgdir+0xa0> // Make sure all those PTE_P bits are zero. memset(pgtab, 0, PGSIZE); 80107c5a: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80107c61: 00 80107c62: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80107c69: 00 80107c6a: 8b 45 f4 mov -0xc(%ebp),%eax 80107c6d: 89 04 24 mov %eax,(%esp) 80107c70: e8 c9 d4 ff ff call 8010513e <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; 80107c75: 8b 45 f4 mov -0xc(%ebp),%eax 80107c78: 89 04 24 mov %eax,(%esp) 80107c7b: e8 f1 fa ff ff call 80107771 <v2p> 80107c80: 83 c8 07 or $0x7,%eax 80107c83: 89 c2 mov %eax,%edx 80107c85: 8b 45 f0 mov -0x10(%ebp),%eax 80107c88: 89 10 mov %edx,(%eax) } return &pgtab[PTX(va)]; 80107c8a: 8b 45 0c mov 0xc(%ebp),%eax 80107c8d: c1 e8 0c shr $0xc,%eax 80107c90: 25 ff 03 00 00 and $0x3ff,%eax 80107c95: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 80107c9c: 8b 45 f4 mov -0xc(%ebp),%eax 80107c9f: 01 d0 add %edx,%eax } 80107ca1: c9 leave 80107ca2: c3 ret 80107ca3 <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) { 80107ca3: 55 push %ebp 80107ca4: 89 e5 mov %esp,%ebp 80107ca6: 83 ec 28 sub $0x28,%esp char *a, *last; pte_t *pte; a = (char*)PGROUNDDOWN((uint)va); 80107ca9: 8b 45 0c mov 0xc(%ebp),%eax 80107cac: 25 00 f0 ff ff and $0xfffff000,%eax 80107cb1: 89 45 f4 mov %eax,-0xc(%ebp) last = (char*)PGROUNDDOWN(((uint)va) + size - 1); 80107cb4: 8b 55 0c mov 0xc(%ebp),%edx 80107cb7: 8b 45 10 mov 0x10(%ebp),%eax 80107cba: 01 d0 add %edx,%eax 80107cbc: 83 e8 01 sub $0x1,%eax 80107cbf: 25 00 f0 ff ff and $0xfffff000,%eax 80107cc4: 89 45 f0 mov %eax,-0x10(%ebp) for(;;){ if((pte = walkpgdir(pgdir, a, 1)) == 0) 80107cc7: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 80107cce: 00 80107ccf: 8b 45 f4 mov -0xc(%ebp),%eax 80107cd2: 89 44 24 04 mov %eax,0x4(%esp) 80107cd6: 8b 45 08 mov 0x8(%ebp),%eax 80107cd9: 89 04 24 mov %eax,(%esp) 80107cdc: e8 20 ff ff ff call 80107c01 <walkpgdir> 80107ce1: 89 45 ec mov %eax,-0x14(%ebp) 80107ce4: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 80107ce8: 75 07 jne 80107cf1 <mappages+0x4e> return -1; 80107cea: b8 ff ff ff ff mov $0xffffffff,%eax 80107cef: eb 48 jmp 80107d39 <mappages+0x96> if(*pte & PTE_P) 80107cf1: 8b 45 ec mov -0x14(%ebp),%eax 80107cf4: 8b 00 mov (%eax),%eax 80107cf6: 83 e0 01 and $0x1,%eax 80107cf9: 85 c0 test %eax,%eax 80107cfb: 74 0c je 80107d09 <mappages+0x66> panic("remap"); 80107cfd: c7 04 24 68 8b 10 80 movl $0x80108b68,(%esp) 80107d04: e8 31 88 ff ff call 8010053a <panic> *pte = pa | perm | PTE_P; 80107d09: 8b 45 18 mov 0x18(%ebp),%eax 80107d0c: 0b 45 14 or 0x14(%ebp),%eax 80107d0f: 83 c8 01 or $0x1,%eax 80107d12: 89 c2 mov %eax,%edx 80107d14: 8b 45 ec mov -0x14(%ebp),%eax 80107d17: 89 10 mov %edx,(%eax) if(a == last) 80107d19: 8b 45 f4 mov -0xc(%ebp),%eax 80107d1c: 3b 45 f0 cmp -0x10(%ebp),%eax 80107d1f: 75 08 jne 80107d29 <mappages+0x86> break; 80107d21: 90 nop a += PGSIZE; pa += PGSIZE; } return 0; 80107d22: b8 00 00 00 00 mov $0x0,%eax 80107d27: eb 10 jmp 80107d39 <mappages+0x96> if(*pte & PTE_P) panic("remap"); *pte = pa | perm | PTE_P; if(a == last) break; a += PGSIZE; 80107d29: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp) pa += PGSIZE; 80107d30: 81 45 14 00 10 00 00 addl $0x1000,0x14(%ebp) } 80107d37: eb 8e jmp 80107cc7 <mappages+0x24> return 0; } 80107d39: c9 leave 80107d3a: c3 ret 80107d3b <setupkvm>: }; // Set up kernel part of a page table. pde_t* setupkvm(void) { 80107d3b: 55 push %ebp 80107d3c: 89 e5 mov %esp,%ebp 80107d3e: 53 push %ebx 80107d3f: 83 ec 34 sub $0x34,%esp pde_t *pgdir; struct kmap *k; if((pgdir = (pde_t*)kalloc()) == 0) 80107d42: e8 93 ad ff ff call 80102ada <kalloc> 80107d47: 89 45 f0 mov %eax,-0x10(%ebp) 80107d4a: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80107d4e: 75 0a jne 80107d5a <setupkvm+0x1f> return 0; 80107d50: b8 00 00 00 00 mov $0x0,%eax 80107d55: e9 98 00 00 00 jmp 80107df2 <setupkvm+0xb7> memset(pgdir, 0, PGSIZE); 80107d5a: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80107d61: 00 80107d62: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80107d69: 00 80107d6a: 8b 45 f0 mov -0x10(%ebp),%eax 80107d6d: 89 04 24 mov %eax,(%esp) 80107d70: e8 c9 d3 ff ff call 8010513e <memset> if (p2v(PHYSTOP) > (void*)DEVSPACE) 80107d75: c7 04 24 00 00 00 0e movl $0xe000000,(%esp) 80107d7c: e8 fd f9 ff ff call 8010777e <p2v> 80107d81: 3d 00 00 00 fe cmp $0xfe000000,%eax 80107d86: 76 0c jbe 80107d94 <setupkvm+0x59> panic("PHYSTOP too high"); 80107d88: c7 04 24 6e 8b 10 80 movl $0x80108b6e,(%esp) 80107d8f: e8 a6 87 ff ff call 8010053a <panic> for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 80107d94: c7 45 f4 c0 b4 10 80 movl $0x8010b4c0,-0xc(%ebp) 80107d9b: eb 49 jmp 80107de6 <setupkvm+0xab> if(mappages(pgdir, k->virt, k->phys_end - k->phys_start, 80107d9d: 8b 45 f4 mov -0xc(%ebp),%eax 80107da0: 8b 48 0c mov 0xc(%eax),%ecx 80107da3: 8b 45 f4 mov -0xc(%ebp),%eax 80107da6: 8b 50 04 mov 0x4(%eax),%edx 80107da9: 8b 45 f4 mov -0xc(%ebp),%eax 80107dac: 8b 58 08 mov 0x8(%eax),%ebx 80107daf: 8b 45 f4 mov -0xc(%ebp),%eax 80107db2: 8b 40 04 mov 0x4(%eax),%eax 80107db5: 29 c3 sub %eax,%ebx 80107db7: 8b 45 f4 mov -0xc(%ebp),%eax 80107dba: 8b 00 mov (%eax),%eax 80107dbc: 89 4c 24 10 mov %ecx,0x10(%esp) 80107dc0: 89 54 24 0c mov %edx,0xc(%esp) 80107dc4: 89 5c 24 08 mov %ebx,0x8(%esp) 80107dc8: 89 44 24 04 mov %eax,0x4(%esp) 80107dcc: 8b 45 f0 mov -0x10(%ebp),%eax 80107dcf: 89 04 24 mov %eax,(%esp) 80107dd2: e8 cc fe ff ff call 80107ca3 <mappages> 80107dd7: 85 c0 test %eax,%eax 80107dd9: 79 07 jns 80107de2 <setupkvm+0xa7> (uint)k->phys_start, k->perm) < 0) return 0; 80107ddb: b8 00 00 00 00 mov $0x0,%eax 80107de0: eb 10 jmp 80107df2 <setupkvm+0xb7> if((pgdir = (pde_t*)kalloc()) == 0) return 0; memset(pgdir, 0, PGSIZE); if (p2v(PHYSTOP) > (void*)DEVSPACE) panic("PHYSTOP too high"); for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 80107de2: 83 45 f4 10 addl $0x10,-0xc(%ebp) 80107de6: 81 7d f4 00 b5 10 80 cmpl $0x8010b500,-0xc(%ebp) 80107ded: 72 ae jb 80107d9d <setupkvm+0x62> if(mappages(pgdir, k->virt, k->phys_end - k->phys_start, (uint)k->phys_start, k->perm) < 0) return 0; return pgdir; 80107def: 8b 45 f0 mov -0x10(%ebp),%eax } 80107df2: 83 c4 34 add $0x34,%esp 80107df5: 5b pop %ebx 80107df6: 5d pop %ebp 80107df7: c3 ret 80107df8 <kvmalloc>: // Allocate one page table for the machine for the kernel address // space for scheduler processes. void kvmalloc(void) { 80107df8: 55 push %ebp 80107df9: 89 e5 mov %esp,%ebp 80107dfb: 83 ec 08 sub $0x8,%esp kpgdir = setupkvm(); 80107dfe: e8 38 ff ff ff call 80107d3b <setupkvm> 80107e03: a3 18 29 11 80 mov %eax,0x80112918 switchkvm(); 80107e08: e8 02 00 00 00 call 80107e0f <switchkvm> } 80107e0d: c9 leave 80107e0e: c3 ret 80107e0f <switchkvm>: // Switch h/w page table register to the kernel-only page table, // for when no process is running. void switchkvm(void) { 80107e0f: 55 push %ebp 80107e10: 89 e5 mov %esp,%ebp 80107e12: 83 ec 04 sub $0x4,%esp lcr3(v2p(kpgdir)); // switch to the kernel page table 80107e15: a1 18 29 11 80 mov 0x80112918,%eax 80107e1a: 89 04 24 mov %eax,(%esp) 80107e1d: e8 4f f9 ff ff call 80107771 <v2p> 80107e22: 89 04 24 mov %eax,(%esp) 80107e25: e8 3c f9 ff ff call 80107766 <lcr3> } 80107e2a: c9 leave 80107e2b: c3 ret 80107e2c <switchuvm>: // Switch TSS and h/w page table to correspond to process p. void switchuvm(struct proc *p) { 80107e2c: 55 push %ebp 80107e2d: 89 e5 mov %esp,%ebp 80107e2f: 53 push %ebx 80107e30: 83 ec 14 sub $0x14,%esp pushcli(); 80107e33: e8 06 d2 ff ff call 8010503e <pushcli> cpu->gdt[SEG_TSS] = SEG16(STS_T32A, &cpu->ts, sizeof(cpu->ts)-1, 0); 80107e38: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80107e3e: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 80107e45: 83 c2 08 add $0x8,%edx 80107e48: 89 d3 mov %edx,%ebx 80107e4a: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 80107e51: 83 c2 08 add $0x8,%edx 80107e54: c1 ea 10 shr $0x10,%edx 80107e57: 89 d1 mov %edx,%ecx 80107e59: 65 8b 15 00 00 00 00 mov %gs:0x0,%edx 80107e60: 83 c2 08 add $0x8,%edx 80107e63: c1 ea 18 shr $0x18,%edx 80107e66: 66 c7 80 a0 00 00 00 movw $0x67,0xa0(%eax) 80107e6d: 67 00 80107e6f: 66 89 98 a2 00 00 00 mov %bx,0xa2(%eax) 80107e76: 88 88 a4 00 00 00 mov %cl,0xa4(%eax) 80107e7c: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx 80107e83: 83 e1 f0 and $0xfffffff0,%ecx 80107e86: 83 c9 09 or $0x9,%ecx 80107e89: 88 88 a5 00 00 00 mov %cl,0xa5(%eax) 80107e8f: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx 80107e96: 83 c9 10 or $0x10,%ecx 80107e99: 88 88 a5 00 00 00 mov %cl,0xa5(%eax) 80107e9f: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx 80107ea6: 83 e1 9f and $0xffffff9f,%ecx 80107ea9: 88 88 a5 00 00 00 mov %cl,0xa5(%eax) 80107eaf: 0f b6 88 a5 00 00 00 movzbl 0xa5(%eax),%ecx 80107eb6: 83 c9 80 or $0xffffff80,%ecx 80107eb9: 88 88 a5 00 00 00 mov %cl,0xa5(%eax) 80107ebf: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx 80107ec6: 83 e1 f0 and $0xfffffff0,%ecx 80107ec9: 88 88 a6 00 00 00 mov %cl,0xa6(%eax) 80107ecf: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx 80107ed6: 83 e1 ef and $0xffffffef,%ecx 80107ed9: 88 88 a6 00 00 00 mov %cl,0xa6(%eax) 80107edf: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx 80107ee6: 83 e1 df and $0xffffffdf,%ecx 80107ee9: 88 88 a6 00 00 00 mov %cl,0xa6(%eax) 80107eef: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx 80107ef6: 83 c9 40 or $0x40,%ecx 80107ef9: 88 88 a6 00 00 00 mov %cl,0xa6(%eax) 80107eff: 0f b6 88 a6 00 00 00 movzbl 0xa6(%eax),%ecx 80107f06: 83 e1 7f and $0x7f,%ecx 80107f09: 88 88 a6 00 00 00 mov %cl,0xa6(%eax) 80107f0f: 88 90 a7 00 00 00 mov %dl,0xa7(%eax) cpu->gdt[SEG_TSS].s = 0; 80107f15: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80107f1b: 0f b6 90 a5 00 00 00 movzbl 0xa5(%eax),%edx 80107f22: 83 e2 ef and $0xffffffef,%edx 80107f25: 88 90 a5 00 00 00 mov %dl,0xa5(%eax) cpu->ts.ss0 = SEG_KDATA << 3; 80107f2b: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80107f31: 66 c7 40 10 10 00 movw $0x10,0x10(%eax) cpu->ts.esp0 = (uint)proc->kstack + KSTACKSIZE; 80107f37: 65 a1 00 00 00 00 mov %gs:0x0,%eax 80107f3d: 65 8b 15 04 00 00 00 mov %gs:0x4,%edx 80107f44: 8b 52 08 mov 0x8(%edx),%edx 80107f47: 81 c2 00 10 00 00 add $0x1000,%edx 80107f4d: 89 50 0c mov %edx,0xc(%eax) ltr(SEG_TSS << 3); 80107f50: c7 04 24 30 00 00 00 movl $0x30,(%esp) 80107f57: e8 df f7 ff ff call 8010773b <ltr> if(p->pgdir == 0) 80107f5c: 8b 45 08 mov 0x8(%ebp),%eax 80107f5f: 8b 40 04 mov 0x4(%eax),%eax 80107f62: 85 c0 test %eax,%eax 80107f64: 75 0c jne 80107f72 <switchuvm+0x146> panic("switchuvm: no pgdir"); 80107f66: c7 04 24 7f 8b 10 80 movl $0x80108b7f,(%esp) 80107f6d: e8 c8 85 ff ff call 8010053a <panic> lcr3(v2p(p->pgdir)); // switch to new address space 80107f72: 8b 45 08 mov 0x8(%ebp),%eax 80107f75: 8b 40 04 mov 0x4(%eax),%eax 80107f78: 89 04 24 mov %eax,(%esp) 80107f7b: e8 f1 f7 ff ff call 80107771 <v2p> 80107f80: 89 04 24 mov %eax,(%esp) 80107f83: e8 de f7 ff ff call 80107766 <lcr3> popcli(); 80107f88: e8 f5 d0 ff ff call 80105082 <popcli> } 80107f8d: 83 c4 14 add $0x14,%esp 80107f90: 5b pop %ebx 80107f91: 5d pop %ebp 80107f92: c3 ret 80107f93 <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) { 80107f93: 55 push %ebp 80107f94: 89 e5 mov %esp,%ebp 80107f96: 83 ec 38 sub $0x38,%esp char *mem; if(sz >= PGSIZE) 80107f99: 81 7d 10 ff 0f 00 00 cmpl $0xfff,0x10(%ebp) 80107fa0: 76 0c jbe 80107fae <inituvm+0x1b> panic("inituvm: more than a page"); 80107fa2: c7 04 24 93 8b 10 80 movl $0x80108b93,(%esp) 80107fa9: e8 8c 85 ff ff call 8010053a <panic> mem = kalloc(); 80107fae: e8 27 ab ff ff call 80102ada <kalloc> 80107fb3: 89 45 f4 mov %eax,-0xc(%ebp) memset(mem, 0, PGSIZE); 80107fb6: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80107fbd: 00 80107fbe: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80107fc5: 00 80107fc6: 8b 45 f4 mov -0xc(%ebp),%eax 80107fc9: 89 04 24 mov %eax,(%esp) 80107fcc: e8 6d d1 ff ff call 8010513e <memset> mappages(pgdir, 0, PGSIZE, v2p(mem), PTE_W|PTE_U); 80107fd1: 8b 45 f4 mov -0xc(%ebp),%eax 80107fd4: 89 04 24 mov %eax,(%esp) 80107fd7: e8 95 f7 ff ff call 80107771 <v2p> 80107fdc: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp) 80107fe3: 00 80107fe4: 89 44 24 0c mov %eax,0xc(%esp) 80107fe8: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80107fef: 00 80107ff0: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80107ff7: 00 80107ff8: 8b 45 08 mov 0x8(%ebp),%eax 80107ffb: 89 04 24 mov %eax,(%esp) 80107ffe: e8 a0 fc ff ff call 80107ca3 <mappages> memmove(mem, init, sz); 80108003: 8b 45 10 mov 0x10(%ebp),%eax 80108006: 89 44 24 08 mov %eax,0x8(%esp) 8010800a: 8b 45 0c mov 0xc(%ebp),%eax 8010800d: 89 44 24 04 mov %eax,0x4(%esp) 80108011: 8b 45 f4 mov -0xc(%ebp),%eax 80108014: 89 04 24 mov %eax,(%esp) 80108017: e8 f1 d1 ff ff call 8010520d <memmove> } 8010801c: c9 leave 8010801d: c3 ret 8010801e <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) { 8010801e: 55 push %ebp 8010801f: 89 e5 mov %esp,%ebp 80108021: 53 push %ebx 80108022: 83 ec 24 sub $0x24,%esp uint i, pa, n; pte_t *pte; if((uint) addr % PGSIZE != 0) 80108025: 8b 45 0c mov 0xc(%ebp),%eax 80108028: 25 ff 0f 00 00 and $0xfff,%eax 8010802d: 85 c0 test %eax,%eax 8010802f: 74 0c je 8010803d <loaduvm+0x1f> panic("loaduvm: addr must be page aligned"); 80108031: c7 04 24 b0 8b 10 80 movl $0x80108bb0,(%esp) 80108038: e8 fd 84 ff ff call 8010053a <panic> for(i = 0; i < sz; i += PGSIZE){ 8010803d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 80108044: e9 a9 00 00 00 jmp 801080f2 <loaduvm+0xd4> if((pte = walkpgdir(pgdir, addr+i, 0)) == 0) 80108049: 8b 45 f4 mov -0xc(%ebp),%eax 8010804c: 8b 55 0c mov 0xc(%ebp),%edx 8010804f: 01 d0 add %edx,%eax 80108051: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80108058: 00 80108059: 89 44 24 04 mov %eax,0x4(%esp) 8010805d: 8b 45 08 mov 0x8(%ebp),%eax 80108060: 89 04 24 mov %eax,(%esp) 80108063: e8 99 fb ff ff call 80107c01 <walkpgdir> 80108068: 89 45 ec mov %eax,-0x14(%ebp) 8010806b: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 8010806f: 75 0c jne 8010807d <loaduvm+0x5f> panic("loaduvm: address should exist"); 80108071: c7 04 24 d3 8b 10 80 movl $0x80108bd3,(%esp) 80108078: e8 bd 84 ff ff call 8010053a <panic> pa = PTE_ADDR(*pte); 8010807d: 8b 45 ec mov -0x14(%ebp),%eax 80108080: 8b 00 mov (%eax),%eax 80108082: 25 00 f0 ff ff and $0xfffff000,%eax 80108087: 89 45 e8 mov %eax,-0x18(%ebp) if(sz - i < PGSIZE) 8010808a: 8b 45 f4 mov -0xc(%ebp),%eax 8010808d: 8b 55 18 mov 0x18(%ebp),%edx 80108090: 29 c2 sub %eax,%edx 80108092: 89 d0 mov %edx,%eax 80108094: 3d ff 0f 00 00 cmp $0xfff,%eax 80108099: 77 0f ja 801080aa <loaduvm+0x8c> n = sz - i; 8010809b: 8b 45 f4 mov -0xc(%ebp),%eax 8010809e: 8b 55 18 mov 0x18(%ebp),%edx 801080a1: 29 c2 sub %eax,%edx 801080a3: 89 d0 mov %edx,%eax 801080a5: 89 45 f0 mov %eax,-0x10(%ebp) 801080a8: eb 07 jmp 801080b1 <loaduvm+0x93> else n = PGSIZE; 801080aa: c7 45 f0 00 10 00 00 movl $0x1000,-0x10(%ebp) if(readi(ip, p2v(pa), offset+i, n) != n) 801080b1: 8b 45 f4 mov -0xc(%ebp),%eax 801080b4: 8b 55 14 mov 0x14(%ebp),%edx 801080b7: 8d 1c 02 lea (%edx,%eax,1),%ebx 801080ba: 8b 45 e8 mov -0x18(%ebp),%eax 801080bd: 89 04 24 mov %eax,(%esp) 801080c0: e8 b9 f6 ff ff call 8010777e <p2v> 801080c5: 8b 55 f0 mov -0x10(%ebp),%edx 801080c8: 89 54 24 0c mov %edx,0xc(%esp) 801080cc: 89 5c 24 08 mov %ebx,0x8(%esp) 801080d0: 89 44 24 04 mov %eax,0x4(%esp) 801080d4: 8b 45 10 mov 0x10(%ebp),%eax 801080d7: 89 04 24 mov %eax,(%esp) 801080da: e8 81 9c ff ff call 80101d60 <readi> 801080df: 3b 45 f0 cmp -0x10(%ebp),%eax 801080e2: 74 07 je 801080eb <loaduvm+0xcd> return -1; 801080e4: b8 ff ff ff ff mov $0xffffffff,%eax 801080e9: eb 18 jmp 80108103 <loaduvm+0xe5> uint i, pa, n; pte_t *pte; if((uint) addr % PGSIZE != 0) panic("loaduvm: addr must be page aligned"); for(i = 0; i < sz; i += PGSIZE){ 801080eb: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp) 801080f2: 8b 45 f4 mov -0xc(%ebp),%eax 801080f5: 3b 45 18 cmp 0x18(%ebp),%eax 801080f8: 0f 82 4b ff ff ff jb 80108049 <loaduvm+0x2b> else n = PGSIZE; if(readi(ip, p2v(pa), offset+i, n) != n) return -1; } return 0; 801080fe: b8 00 00 00 00 mov $0x0,%eax } 80108103: 83 c4 24 add $0x24,%esp 80108106: 5b pop %ebx 80108107: 5d pop %ebp 80108108: c3 ret 80108109 <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) { 80108109: 55 push %ebp 8010810a: 89 e5 mov %esp,%ebp 8010810c: 83 ec 38 sub $0x38,%esp char *mem; uint a; if(newsz >= KERNBASE) 8010810f: 8b 45 10 mov 0x10(%ebp),%eax 80108112: 85 c0 test %eax,%eax 80108114: 79 0a jns 80108120 <allocuvm+0x17> return 0; 80108116: b8 00 00 00 00 mov $0x0,%eax 8010811b: e9 c1 00 00 00 jmp 801081e1 <allocuvm+0xd8> if(newsz < oldsz) 80108120: 8b 45 10 mov 0x10(%ebp),%eax 80108123: 3b 45 0c cmp 0xc(%ebp),%eax 80108126: 73 08 jae 80108130 <allocuvm+0x27> return oldsz; 80108128: 8b 45 0c mov 0xc(%ebp),%eax 8010812b: e9 b1 00 00 00 jmp 801081e1 <allocuvm+0xd8> a = PGROUNDUP(oldsz); 80108130: 8b 45 0c mov 0xc(%ebp),%eax 80108133: 05 ff 0f 00 00 add $0xfff,%eax 80108138: 25 00 f0 ff ff and $0xfffff000,%eax 8010813d: 89 45 f4 mov %eax,-0xc(%ebp) for(; a < newsz; a += PGSIZE){ 80108140: e9 8d 00 00 00 jmp 801081d2 <allocuvm+0xc9> mem = kalloc(); 80108145: e8 90 a9 ff ff call 80102ada <kalloc> 8010814a: 89 45 f0 mov %eax,-0x10(%ebp) if(mem == 0){ 8010814d: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80108151: 75 2c jne 8010817f <allocuvm+0x76> cprintf("allocuvm out of memory\n"); 80108153: c7 04 24 f1 8b 10 80 movl $0x80108bf1,(%esp) 8010815a: e8 41 82 ff ff call 801003a0 <cprintf> deallocuvm(pgdir, newsz, oldsz); 8010815f: 8b 45 0c mov 0xc(%ebp),%eax 80108162: 89 44 24 08 mov %eax,0x8(%esp) 80108166: 8b 45 10 mov 0x10(%ebp),%eax 80108169: 89 44 24 04 mov %eax,0x4(%esp) 8010816d: 8b 45 08 mov 0x8(%ebp),%eax 80108170: 89 04 24 mov %eax,(%esp) 80108173: e8 6b 00 00 00 call 801081e3 <deallocuvm> return 0; 80108178: b8 00 00 00 00 mov $0x0,%eax 8010817d: eb 62 jmp 801081e1 <allocuvm+0xd8> } memset(mem, 0, PGSIZE); 8010817f: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80108186: 00 80108187: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010818e: 00 8010818f: 8b 45 f0 mov -0x10(%ebp),%eax 80108192: 89 04 24 mov %eax,(%esp) 80108195: e8 a4 cf ff ff call 8010513e <memset> mappages(pgdir, (char*)a, PGSIZE, v2p(mem), PTE_W|PTE_U); 8010819a: 8b 45 f0 mov -0x10(%ebp),%eax 8010819d: 89 04 24 mov %eax,(%esp) 801081a0: e8 cc f5 ff ff call 80107771 <v2p> 801081a5: 8b 55 f4 mov -0xc(%ebp),%edx 801081a8: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp) 801081af: 00 801081b0: 89 44 24 0c mov %eax,0xc(%esp) 801081b4: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801081bb: 00 801081bc: 89 54 24 04 mov %edx,0x4(%esp) 801081c0: 8b 45 08 mov 0x8(%ebp),%eax 801081c3: 89 04 24 mov %eax,(%esp) 801081c6: e8 d8 fa ff ff call 80107ca3 <mappages> return 0; if(newsz < oldsz) return oldsz; a = PGROUNDUP(oldsz); for(; a < newsz; a += PGSIZE){ 801081cb: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp) 801081d2: 8b 45 f4 mov -0xc(%ebp),%eax 801081d5: 3b 45 10 cmp 0x10(%ebp),%eax 801081d8: 0f 82 67 ff ff ff jb 80108145 <allocuvm+0x3c> return 0; } memset(mem, 0, PGSIZE); mappages(pgdir, (char*)a, PGSIZE, v2p(mem), PTE_W|PTE_U); } return newsz; 801081de: 8b 45 10 mov 0x10(%ebp),%eax } 801081e1: c9 leave 801081e2: c3 ret 801081e3 <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) { 801081e3: 55 push %ebp 801081e4: 89 e5 mov %esp,%ebp 801081e6: 83 ec 28 sub $0x28,%esp pte_t *pte; uint a, pa; if(newsz >= oldsz) 801081e9: 8b 45 10 mov 0x10(%ebp),%eax 801081ec: 3b 45 0c cmp 0xc(%ebp),%eax 801081ef: 72 08 jb 801081f9 <deallocuvm+0x16> return oldsz; 801081f1: 8b 45 0c mov 0xc(%ebp),%eax 801081f4: e9 a4 00 00 00 jmp 8010829d <deallocuvm+0xba> a = PGROUNDUP(newsz); 801081f9: 8b 45 10 mov 0x10(%ebp),%eax 801081fc: 05 ff 0f 00 00 add $0xfff,%eax 80108201: 25 00 f0 ff ff and $0xfffff000,%eax 80108206: 89 45 f4 mov %eax,-0xc(%ebp) for(; a < oldsz; a += PGSIZE){ 80108209: e9 80 00 00 00 jmp 8010828e <deallocuvm+0xab> pte = walkpgdir(pgdir, (char*)a, 0); 8010820e: 8b 45 f4 mov -0xc(%ebp),%eax 80108211: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80108218: 00 80108219: 89 44 24 04 mov %eax,0x4(%esp) 8010821d: 8b 45 08 mov 0x8(%ebp),%eax 80108220: 89 04 24 mov %eax,(%esp) 80108223: e8 d9 f9 ff ff call 80107c01 <walkpgdir> 80108228: 89 45 f0 mov %eax,-0x10(%ebp) if(!pte) 8010822b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 8010822f: 75 09 jne 8010823a <deallocuvm+0x57> a += (NPTENTRIES - 1) * PGSIZE; 80108231: 81 45 f4 00 f0 3f 00 addl $0x3ff000,-0xc(%ebp) 80108238: eb 4d jmp 80108287 <deallocuvm+0xa4> else if((*pte & PTE_P) != 0){ 8010823a: 8b 45 f0 mov -0x10(%ebp),%eax 8010823d: 8b 00 mov (%eax),%eax 8010823f: 83 e0 01 and $0x1,%eax 80108242: 85 c0 test %eax,%eax 80108244: 74 41 je 80108287 <deallocuvm+0xa4> pa = PTE_ADDR(*pte); 80108246: 8b 45 f0 mov -0x10(%ebp),%eax 80108249: 8b 00 mov (%eax),%eax 8010824b: 25 00 f0 ff ff and $0xfffff000,%eax 80108250: 89 45 ec mov %eax,-0x14(%ebp) if(pa == 0) 80108253: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 80108257: 75 0c jne 80108265 <deallocuvm+0x82> panic("kfree"); 80108259: c7 04 24 09 8c 10 80 movl $0x80108c09,(%esp) 80108260: e8 d5 82 ff ff call 8010053a <panic> char *v = p2v(pa); 80108265: 8b 45 ec mov -0x14(%ebp),%eax 80108268: 89 04 24 mov %eax,(%esp) 8010826b: e8 0e f5 ff ff call 8010777e <p2v> 80108270: 89 45 e8 mov %eax,-0x18(%ebp) kfree(v); 80108273: 8b 45 e8 mov -0x18(%ebp),%eax 80108276: 89 04 24 mov %eax,(%esp) 80108279: e8 c3 a7 ff ff call 80102a41 <kfree> *pte = 0; 8010827e: 8b 45 f0 mov -0x10(%ebp),%eax 80108281: c7 00 00 00 00 00 movl $0x0,(%eax) if(newsz >= oldsz) return oldsz; a = PGROUNDUP(newsz); for(; a < oldsz; a += PGSIZE){ 80108287: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp) 8010828e: 8b 45 f4 mov -0xc(%ebp),%eax 80108291: 3b 45 0c cmp 0xc(%ebp),%eax 80108294: 0f 82 74 ff ff ff jb 8010820e <deallocuvm+0x2b> char *v = p2v(pa); kfree(v); *pte = 0; } } return newsz; 8010829a: 8b 45 10 mov 0x10(%ebp),%eax } 8010829d: c9 leave 8010829e: c3 ret 8010829f <freevm>: // Free a page table and all the physical memory pages // in the user part. void freevm(pde_t *pgdir) { 8010829f: 55 push %ebp 801082a0: 89 e5 mov %esp,%ebp 801082a2: 83 ec 28 sub $0x28,%esp uint i; if(pgdir == 0) 801082a5: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 801082a9: 75 0c jne 801082b7 <freevm+0x18> panic("freevm: no pgdir"); 801082ab: c7 04 24 0f 8c 10 80 movl $0x80108c0f,(%esp) 801082b2: e8 83 82 ff ff call 8010053a <panic> deallocuvm(pgdir, KERNBASE, 0); 801082b7: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 801082be: 00 801082bf: c7 44 24 04 00 00 00 movl $0x80000000,0x4(%esp) 801082c6: 80 801082c7: 8b 45 08 mov 0x8(%ebp),%eax 801082ca: 89 04 24 mov %eax,(%esp) 801082cd: e8 11 ff ff ff call 801081e3 <deallocuvm> for(i = 0; i < NPDENTRIES; i++){ 801082d2: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 801082d9: eb 48 jmp 80108323 <freevm+0x84> if(pgdir[i] & PTE_P){ 801082db: 8b 45 f4 mov -0xc(%ebp),%eax 801082de: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 801082e5: 8b 45 08 mov 0x8(%ebp),%eax 801082e8: 01 d0 add %edx,%eax 801082ea: 8b 00 mov (%eax),%eax 801082ec: 83 e0 01 and $0x1,%eax 801082ef: 85 c0 test %eax,%eax 801082f1: 74 2c je 8010831f <freevm+0x80> char * v = p2v(PTE_ADDR(pgdir[i])); 801082f3: 8b 45 f4 mov -0xc(%ebp),%eax 801082f6: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 801082fd: 8b 45 08 mov 0x8(%ebp),%eax 80108300: 01 d0 add %edx,%eax 80108302: 8b 00 mov (%eax),%eax 80108304: 25 00 f0 ff ff and $0xfffff000,%eax 80108309: 89 04 24 mov %eax,(%esp) 8010830c: e8 6d f4 ff ff call 8010777e <p2v> 80108311: 89 45 f0 mov %eax,-0x10(%ebp) kfree(v); 80108314: 8b 45 f0 mov -0x10(%ebp),%eax 80108317: 89 04 24 mov %eax,(%esp) 8010831a: e8 22 a7 ff ff call 80102a41 <kfree> uint i; if(pgdir == 0) panic("freevm: no pgdir"); deallocuvm(pgdir, KERNBASE, 0); for(i = 0; i < NPDENTRIES; i++){ 8010831f: 83 45 f4 01 addl $0x1,-0xc(%ebp) 80108323: 81 7d f4 ff 03 00 00 cmpl $0x3ff,-0xc(%ebp) 8010832a: 76 af jbe 801082db <freevm+0x3c> if(pgdir[i] & PTE_P){ char * v = p2v(PTE_ADDR(pgdir[i])); kfree(v); } } kfree((char*)pgdir); 8010832c: 8b 45 08 mov 0x8(%ebp),%eax 8010832f: 89 04 24 mov %eax,(%esp) 80108332: e8 0a a7 ff ff call 80102a41 <kfree> } 80108337: c9 leave 80108338: c3 ret 80108339 <clearpteu>: // Clear PTE_U on a page. Used to create an inaccessible // page beneath the user stack. void clearpteu(pde_t *pgdir, char *uva) { 80108339: 55 push %ebp 8010833a: 89 e5 mov %esp,%ebp 8010833c: 83 ec 28 sub $0x28,%esp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 8010833f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80108346: 00 80108347: 8b 45 0c mov 0xc(%ebp),%eax 8010834a: 89 44 24 04 mov %eax,0x4(%esp) 8010834e: 8b 45 08 mov 0x8(%ebp),%eax 80108351: 89 04 24 mov %eax,(%esp) 80108354: e8 a8 f8 ff ff call 80107c01 <walkpgdir> 80108359: 89 45 f4 mov %eax,-0xc(%ebp) if(pte == 0) 8010835c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 80108360: 75 0c jne 8010836e <clearpteu+0x35> panic("clearpteu"); 80108362: c7 04 24 20 8c 10 80 movl $0x80108c20,(%esp) 80108369: e8 cc 81 ff ff call 8010053a <panic> *pte &= ~PTE_U; 8010836e: 8b 45 f4 mov -0xc(%ebp),%eax 80108371: 8b 00 mov (%eax),%eax 80108373: 83 e0 fb and $0xfffffffb,%eax 80108376: 89 c2 mov %eax,%edx 80108378: 8b 45 f4 mov -0xc(%ebp),%eax 8010837b: 89 10 mov %edx,(%eax) } 8010837d: c9 leave 8010837e: c3 ret 8010837f <copyuvm>: // Given a parent process's page table, create a copy // of it for a child. pde_t* copyuvm(pde_t *pgdir, uint sz) { 8010837f: 55 push %ebp 80108380: 89 e5 mov %esp,%ebp 80108382: 53 push %ebx 80108383: 83 ec 44 sub $0x44,%esp pde_t *d; pte_t *pte; uint pa, i, flags; char *mem; if((d = setupkvm()) == 0) 80108386: e8 b0 f9 ff ff call 80107d3b <setupkvm> 8010838b: 89 45 f0 mov %eax,-0x10(%ebp) 8010838e: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 80108392: 75 0a jne 8010839e <copyuvm+0x1f> return 0; 80108394: b8 00 00 00 00 mov $0x0,%eax 80108399: e9 fd 00 00 00 jmp 8010849b <copyuvm+0x11c> for(i = 0; i < sz; i += PGSIZE){ 8010839e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 801083a5: e9 d0 00 00 00 jmp 8010847a <copyuvm+0xfb> if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0) 801083aa: 8b 45 f4 mov -0xc(%ebp),%eax 801083ad: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 801083b4: 00 801083b5: 89 44 24 04 mov %eax,0x4(%esp) 801083b9: 8b 45 08 mov 0x8(%ebp),%eax 801083bc: 89 04 24 mov %eax,(%esp) 801083bf: e8 3d f8 ff ff call 80107c01 <walkpgdir> 801083c4: 89 45 ec mov %eax,-0x14(%ebp) 801083c7: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 801083cb: 75 0c jne 801083d9 <copyuvm+0x5a> panic("copyuvm: pte should exist"); 801083cd: c7 04 24 2a 8c 10 80 movl $0x80108c2a,(%esp) 801083d4: e8 61 81 ff ff call 8010053a <panic> if(!(*pte & PTE_P)) 801083d9: 8b 45 ec mov -0x14(%ebp),%eax 801083dc: 8b 00 mov (%eax),%eax 801083de: 83 e0 01 and $0x1,%eax 801083e1: 85 c0 test %eax,%eax 801083e3: 75 0c jne 801083f1 <copyuvm+0x72> panic("copyuvm: page not present"); 801083e5: c7 04 24 44 8c 10 80 movl $0x80108c44,(%esp) 801083ec: e8 49 81 ff ff call 8010053a <panic> pa = PTE_ADDR(*pte); 801083f1: 8b 45 ec mov -0x14(%ebp),%eax 801083f4: 8b 00 mov (%eax),%eax 801083f6: 25 00 f0 ff ff and $0xfffff000,%eax 801083fb: 89 45 e8 mov %eax,-0x18(%ebp) flags = PTE_FLAGS(*pte); 801083fe: 8b 45 ec mov -0x14(%ebp),%eax 80108401: 8b 00 mov (%eax),%eax 80108403: 25 ff 0f 00 00 and $0xfff,%eax 80108408: 89 45 e4 mov %eax,-0x1c(%ebp) if((mem = kalloc()) == 0) 8010840b: e8 ca a6 ff ff call 80102ada <kalloc> 80108410: 89 45 e0 mov %eax,-0x20(%ebp) 80108413: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) 80108417: 75 02 jne 8010841b <copyuvm+0x9c> goto bad; 80108419: eb 70 jmp 8010848b <copyuvm+0x10c> memmove(mem, (char*)p2v(pa), PGSIZE); 8010841b: 8b 45 e8 mov -0x18(%ebp),%eax 8010841e: 89 04 24 mov %eax,(%esp) 80108421: e8 58 f3 ff ff call 8010777e <p2v> 80108426: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010842d: 00 8010842e: 89 44 24 04 mov %eax,0x4(%esp) 80108432: 8b 45 e0 mov -0x20(%ebp),%eax 80108435: 89 04 24 mov %eax,(%esp) 80108438: e8 d0 cd ff ff call 8010520d <memmove> if(mappages(d, (void*)i, PGSIZE, v2p(mem), flags) < 0) 8010843d: 8b 5d e4 mov -0x1c(%ebp),%ebx 80108440: 8b 45 e0 mov -0x20(%ebp),%eax 80108443: 89 04 24 mov %eax,(%esp) 80108446: e8 26 f3 ff ff call 80107771 <v2p> 8010844b: 8b 55 f4 mov -0xc(%ebp),%edx 8010844e: 89 5c 24 10 mov %ebx,0x10(%esp) 80108452: 89 44 24 0c mov %eax,0xc(%esp) 80108456: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010845d: 00 8010845e: 89 54 24 04 mov %edx,0x4(%esp) 80108462: 8b 45 f0 mov -0x10(%ebp),%eax 80108465: 89 04 24 mov %eax,(%esp) 80108468: e8 36 f8 ff ff call 80107ca3 <mappages> 8010846d: 85 c0 test %eax,%eax 8010846f: 79 02 jns 80108473 <copyuvm+0xf4> goto bad; 80108471: eb 18 jmp 8010848b <copyuvm+0x10c> uint pa, i, flags; char *mem; if((d = setupkvm()) == 0) return 0; for(i = 0; i < sz; i += PGSIZE){ 80108473: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp) 8010847a: 8b 45 f4 mov -0xc(%ebp),%eax 8010847d: 3b 45 0c cmp 0xc(%ebp),%eax 80108480: 0f 82 24 ff ff ff jb 801083aa <copyuvm+0x2b> goto bad; memmove(mem, (char*)p2v(pa), PGSIZE); if(mappages(d, (void*)i, PGSIZE, v2p(mem), flags) < 0) goto bad; } return d; 80108486: 8b 45 f0 mov -0x10(%ebp),%eax 80108489: eb 10 jmp 8010849b <copyuvm+0x11c> bad: freevm(d); 8010848b: 8b 45 f0 mov -0x10(%ebp),%eax 8010848e: 89 04 24 mov %eax,(%esp) 80108491: e8 09 fe ff ff call 8010829f <freevm> return 0; 80108496: b8 00 00 00 00 mov $0x0,%eax } 8010849b: 83 c4 44 add $0x44,%esp 8010849e: 5b pop %ebx 8010849f: 5d pop %ebp 801084a0: c3 ret 801084a1 <uva2ka>: //PAGEBREAK! // Map user virtual address to kernel address. char* uva2ka(pde_t *pgdir, char *uva) { 801084a1: 55 push %ebp 801084a2: 89 e5 mov %esp,%ebp 801084a4: 83 ec 28 sub $0x28,%esp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 801084a7: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 801084ae: 00 801084af: 8b 45 0c mov 0xc(%ebp),%eax 801084b2: 89 44 24 04 mov %eax,0x4(%esp) 801084b6: 8b 45 08 mov 0x8(%ebp),%eax 801084b9: 89 04 24 mov %eax,(%esp) 801084bc: e8 40 f7 ff ff call 80107c01 <walkpgdir> 801084c1: 89 45 f4 mov %eax,-0xc(%ebp) if((*pte & PTE_P) == 0) 801084c4: 8b 45 f4 mov -0xc(%ebp),%eax 801084c7: 8b 00 mov (%eax),%eax 801084c9: 83 e0 01 and $0x1,%eax 801084cc: 85 c0 test %eax,%eax 801084ce: 75 07 jne 801084d7 <uva2ka+0x36> return 0; 801084d0: b8 00 00 00 00 mov $0x0,%eax 801084d5: eb 25 jmp 801084fc <uva2ka+0x5b> if((*pte & PTE_U) == 0) 801084d7: 8b 45 f4 mov -0xc(%ebp),%eax 801084da: 8b 00 mov (%eax),%eax 801084dc: 83 e0 04 and $0x4,%eax 801084df: 85 c0 test %eax,%eax 801084e1: 75 07 jne 801084ea <uva2ka+0x49> return 0; 801084e3: b8 00 00 00 00 mov $0x0,%eax 801084e8: eb 12 jmp 801084fc <uva2ka+0x5b> return (char*)p2v(PTE_ADDR(*pte)); 801084ea: 8b 45 f4 mov -0xc(%ebp),%eax 801084ed: 8b 00 mov (%eax),%eax 801084ef: 25 00 f0 ff ff and $0xfffff000,%eax 801084f4: 89 04 24 mov %eax,(%esp) 801084f7: e8 82 f2 ff ff call 8010777e <p2v> } 801084fc: c9 leave 801084fd: c3 ret 801084fe <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) { 801084fe: 55 push %ebp 801084ff: 89 e5 mov %esp,%ebp 80108501: 83 ec 28 sub $0x28,%esp char *buf, *pa0; uint n, va0; buf = (char*)p; 80108504: 8b 45 10 mov 0x10(%ebp),%eax 80108507: 89 45 f4 mov %eax,-0xc(%ebp) while(len > 0){ 8010850a: e9 87 00 00 00 jmp 80108596 <copyout+0x98> va0 = (uint)PGROUNDDOWN(va); 8010850f: 8b 45 0c mov 0xc(%ebp),%eax 80108512: 25 00 f0 ff ff and $0xfffff000,%eax 80108517: 89 45 ec mov %eax,-0x14(%ebp) pa0 = uva2ka(pgdir, (char*)va0); 8010851a: 8b 45 ec mov -0x14(%ebp),%eax 8010851d: 89 44 24 04 mov %eax,0x4(%esp) 80108521: 8b 45 08 mov 0x8(%ebp),%eax 80108524: 89 04 24 mov %eax,(%esp) 80108527: e8 75 ff ff ff call 801084a1 <uva2ka> 8010852c: 89 45 e8 mov %eax,-0x18(%ebp) if(pa0 == 0) 8010852f: 83 7d e8 00 cmpl $0x0,-0x18(%ebp) 80108533: 75 07 jne 8010853c <copyout+0x3e> return -1; 80108535: b8 ff ff ff ff mov $0xffffffff,%eax 8010853a: eb 69 jmp 801085a5 <copyout+0xa7> n = PGSIZE - (va - va0); 8010853c: 8b 45 0c mov 0xc(%ebp),%eax 8010853f: 8b 55 ec mov -0x14(%ebp),%edx 80108542: 29 c2 sub %eax,%edx 80108544: 89 d0 mov %edx,%eax 80108546: 05 00 10 00 00 add $0x1000,%eax 8010854b: 89 45 f0 mov %eax,-0x10(%ebp) if(n > len) 8010854e: 8b 45 f0 mov -0x10(%ebp),%eax 80108551: 3b 45 14 cmp 0x14(%ebp),%eax 80108554: 76 06 jbe 8010855c <copyout+0x5e> n = len; 80108556: 8b 45 14 mov 0x14(%ebp),%eax 80108559: 89 45 f0 mov %eax,-0x10(%ebp) memmove(pa0 + (va - va0), buf, n); 8010855c: 8b 45 ec mov -0x14(%ebp),%eax 8010855f: 8b 55 0c mov 0xc(%ebp),%edx 80108562: 29 c2 sub %eax,%edx 80108564: 8b 45 e8 mov -0x18(%ebp),%eax 80108567: 01 c2 add %eax,%edx 80108569: 8b 45 f0 mov -0x10(%ebp),%eax 8010856c: 89 44 24 08 mov %eax,0x8(%esp) 80108570: 8b 45 f4 mov -0xc(%ebp),%eax 80108573: 89 44 24 04 mov %eax,0x4(%esp) 80108577: 89 14 24 mov %edx,(%esp) 8010857a: e8 8e cc ff ff call 8010520d <memmove> len -= n; 8010857f: 8b 45 f0 mov -0x10(%ebp),%eax 80108582: 29 45 14 sub %eax,0x14(%ebp) buf += n; 80108585: 8b 45 f0 mov -0x10(%ebp),%eax 80108588: 01 45 f4 add %eax,-0xc(%ebp) va = va0 + PGSIZE; 8010858b: 8b 45 ec mov -0x14(%ebp),%eax 8010858e: 05 00 10 00 00 add $0x1000,%eax 80108593: 89 45 0c mov %eax,0xc(%ebp) { char *buf, *pa0; uint n, va0; buf = (char*)p; while(len > 0){ 80108596: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 8010859a: 0f 85 6f ff ff ff jne 8010850f <copyout+0x11> memmove(pa0 + (va - va0), buf, n); len -= n; buf += n; va = va0 + PGSIZE; } return 0; 801085a0: b8 00 00 00 00 mov $0x0,%eax } 801085a5: c9 leave 801085a6: c3 ret
37.776773
74
0.537938
50dbe42cae7b561790684f5dbd9ab1c433aa7d00
385
asm
Assembly
Working Disassembly/General/Sprites/SS Entry/DPLC - Special Stage Entry Flash.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
5
2021-07-09T08:17:56.000Z
2022-02-27T19:57:47.000Z
Working Disassembly/General/Sprites/SS Entry/DPLC - Special Stage Entry Flash.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
null
null
null
Working Disassembly/General/Sprites/SS Entry/DPLC - Special Stage Entry Flash.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
null
null
null
DPLC_61BFA: dc.w word_61C02-DPLC_61BFA dc.w word_61C0A-DPLC_61BFA dc.w word_61C12-DPLC_61BFA dc.w word_61C1C-DPLC_61BFA word_61C02: dc.w 2 dc.w 2 dc.w $35 dc.w $90 word_61C0A: dc.w 2 dc.w $A3 dc.w $E7 dc.w $161 word_61C12: dc.w 3 dc.w $182 dc.w $1BB dc.w $273 dc.w $2B1 word_61C1C: dc.w 1 dc.w $182 dc.w $1BB dc.w 1 dc.w $273 dc.w $2B1
16.041667
39
0.623377
f0872c6a82891421963462b70441f0aa129c1be5
458
asm
Assembly
oeis/192/A192305.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/192/A192305.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/192/A192305.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A192305: 0-sequence of reduction of (2n) by x^2 -> x+1. ; Submitted by Jon Maiga ; 2,2,8,16,36,72,142,270,504,924,1672,2992,5306,9338,16328,28392,49132,84664,145350,248710,424312,721972,1225488,2075616,3508466,5919602,9970952,16768960,28161204,47229864,79112062,132362622,221216376,369341388,616061848,1026669712,1709502122,2844208874,4728518600,7855572120 mov $3,1 lpb $0 mov $2,$3 add $3,$1 mov $1,$0 sub $0,1 add $1,$2 lpe mov $0,$3 mul $0,2
30.533333
275
0.735808
f3213e42b9af3cd377cf1f8a9e9564edcae28eaa
1,091
asm
Assembly
bbc/error.asm
peter-mount/departures8bit
cb0cd95503c9d0872d1cfaf3579c6f7c9ece282f
[ "Apache-2.0" ]
null
null
null
bbc/error.asm
peter-mount/departures8bit
cb0cd95503c9d0872d1cfaf3579c6f7c9ece282f
[ "Apache-2.0" ]
null
null
null
bbc/error.asm
peter-mount/departures8bit
cb0cd95503c9d0872d1cfaf3579c6f7c9ece282f
[ "Apache-2.0" ]
null
null
null
; ******************************************************************************** ; Handle errors from BRK instructions. ; ; Errors raised with: ; BRK ; EQUB error code (unused) ; EQUS error string ; BRK or EQUB 0 to terminate string ; ******************************************************************************** .errorHandler LDX #&FF ; Reset the stack TXS LDA #&7C ; Clear escape condition JSR osbyte LDY #0 LDA (brkAddress),Y ; error code BEQ errorHandler4 JSR writeHex JSR writeSpace .errorHandler3 INY ; Skip the error code .errorHandler0 LDA (brkAddress),Y BEQ errorHandler1 ; Found end JSR osascii INY BNE errorHandler0 .errorHandler1 JSR osnewl ; Force newline .errorHandler4 JMP mainMenu ; Back to the main menu .errEscape JSR osnewl ; Force newline BRK EQUS &11, "Escape", 0 .errSyntax BRK EQUS &12, "Syntax", 0
24.795455
82
0.461045
dfe5cfd6429dabcc3352e8fba3a6d4c302402c0e
5,530
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_225.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_225.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_225.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 %r14 push %r9 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x4003, %rdi nop nop nop nop xor %rdx, %rdx mov (%rdi), %r9 nop nop sub $52574, %rdx lea addresses_normal_ht+0x1eceb, %r9 sub $36005, %r13 mov $0x6162636465666768, %r14 movq %r14, %xmm7 movups %xmm7, (%r9) nop nop nop nop lfence lea addresses_UC_ht+0x9b34, %rsi lea addresses_normal_ht+0x9903, %rdi nop nop nop nop and $56722, %r9 mov $40, %rcx rep movsl nop nop nop nop nop cmp $55219, %r13 lea addresses_UC_ht+0x17c3, %rsi lea addresses_A_ht+0x253, %rdi clflush (%rsi) nop nop cmp $42096, %rbp mov $113, %rcx rep movsq nop nop nop add $61963, %r13 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r9 push %rbp push %rbx push %rdx // Load lea addresses_RW+0x1e5a5, %r11 clflush (%r11) nop nop nop nop nop xor %rdx, %rdx movups (%r11), %xmm7 vpextrq $1, %xmm7, %r13 nop nop xor $35556, %r9 // Store lea addresses_normal+0x1da03, %rbx nop nop nop nop and %r13, %r13 movw $0x5152, (%rbx) nop nop nop nop and %rdx, %rdx // Faulty Load lea addresses_WC+0x12903, %r11 nop nop nop nop xor $9636, %rbp movb (%r11), %bl lea oracles, %r11 and $0xff, %rbx shlq $12, %rbx mov (%r11,%rbx,1), %rbx pop %rdx pop %rbx pop %rbp pop %r9 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 8}} [Faulty Load] {'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 3}} {'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}} {'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}} {'38': 21829} 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 */
38.402778
2,999
0.66094
2a2bc7efb7ed82ccea86f4fa563fac49d531c649
752
asm
Assembly
oeis/228/A228920.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/228/A228920.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/228/A228920.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A228920: Number of solutions to Sum_{i=1..n} x_i^2 == 0 (mod 4) with x_i in 0..3. ; Submitted by Christian Krause ; 2,4,8,32,192,1024,4608,18432,69632,262144,1015808,4063232,16515072,67108864,270532608,1082130432,4311744512,17179869184,68585259008,274341036032,1098437885952,4398046511104,17600775979008,70403103916032,281543696187392,1125899906842624,4503049871556608,18012199486226432,72053195991416832,288230376151711744,1152956688978935808,4611826755915743232,18447025548686262272,73786976294838206464,295145653379539140608,1180582613518156562432,4722348468471135731712,18889465931478580854784 mul $0,2 mov $2,1 lpb $0 sub $0,2 sub $1,$3 mul $1,2 mul $2,2 add $2,$3 add $3,$1 mul $1,4 add $1,$2 mul $3,2 lpe mov $0,$2 mul $0,2
37.6
483
0.791223
4f932b4631bd486dcc3e10faa9a9af66dbc89b4c
7,835
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_1408.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_1408.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_1408.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 %r8 push %r9 push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x1d6b, %r8 nop nop nop nop nop xor $53839, %rcx movb (%r8), %r9b nop cmp %rdx, %rdx lea addresses_D_ht+0x40b, %rbx inc %r12 mov $0x6162636465666768, %r8 movq %r8, (%rbx) nop cmp $10863, %rcx lea addresses_D_ht+0x107ef, %rbx nop nop nop nop nop add $63610, %rax mov $0x6162636465666768, %rdx movq %rdx, (%rbx) add $47980, %rcx lea addresses_WC_ht+0x3d0b, %rsi lea addresses_WT_ht+0x1570b, %rdi nop nop nop cmp %r12, %r12 mov $6, %rcx rep movsq cmp %rcx, %rcx lea addresses_normal_ht+0xfa7b, %rax nop nop inc %r8 mov (%rax), %rbx nop nop nop nop dec %rdi lea addresses_D_ht+0xa5, %rcx cmp %r9, %r9 movw $0x6162, (%rcx) nop nop nop nop nop sub $8944, %r12 lea addresses_D_ht+0x71b9, %rsi lea addresses_UC_ht+0xf80b, %rdi clflush (%rdi) nop xor %r9, %r9 mov $108, %rcx rep movsw nop nop nop nop cmp $55629, %rdi lea addresses_UC_ht+0x224, %rsi lea addresses_WT_ht+0xe50b, %rdi clflush (%rsi) nop nop nop nop xor $65394, %rbx mov $125, %rcx rep movsb nop nop xor $60314, %rbx lea addresses_A_ht+0xbf09, %rdx nop nop inc %rsi mov $0x6162636465666768, %r8 movq %r8, %xmm2 and $0xffffffffffffffc0, %rdx vmovntdq %ymm2, (%rdx) nop nop nop nop nop sub %rax, %rax lea addresses_normal_ht+0x1d66b, %rcx nop nop nop nop nop sub $21884, %r8 mov $0x6162636465666768, %rax movq %rax, (%rcx) nop nop nop xor $104, %rdi lea addresses_WT_ht+0x8d8b, %rsi lea addresses_D_ht+0xc54b, %rdi and %r12, %r12 mov $110, %rcx rep movsb nop nop add $13831, %r8 lea addresses_WT_ht+0xf077, %r12 cmp %r9, %r9 movb $0x61, (%r12) nop nop nop add $13151, %rdi lea addresses_WT_ht+0xd9eb, %r9 nop nop nop nop nop sub $21980, %r8 mov (%r9), %r12d nop nop nop inc %rcx lea addresses_WT_ht+0xb30b, %rsi lea addresses_UC_ht+0x664b, %rdi nop nop nop sub %rax, %rax mov $1, %rcx rep movsw nop nop inc %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r8 pop %r12 ret .global s_faulty_load s_faulty_load: push %r14 push %r15 push %r9 push %rcx push %rdi push %rdx push %rsi // REPMOV lea addresses_PSE+0x11bab, %rsi lea addresses_WC+0x1af0b, %rdi nop nop nop nop nop add %r15, %r15 mov $34, %rcx rep movsq nop nop nop nop cmp %r14, %r14 // Faulty Load lea addresses_WC+0x1af0b, %r9 nop nop nop nop inc %rdx mov (%r9), %ecx lea oracles, %r15 and $0xff, %rcx shlq $12, %rcx mov (%r15,%rcx,1), %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r15 pop %r14 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_PSE'}, 'dst': {'same': True, 'congruent': 0, 'type': 'addresses_WC'}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WC', 'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_WT_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 4}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_D_ht'}, 'dst': {'same': True, 'congruent': 8, 'type': 'addresses_UC_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 1}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'dst': {'same': True, 'congruent': 6, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 1}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
32.645833
2,999
0.65769
dffb3dfcc0f4a6495081fb48fa8b3773648e2fee
5,411
asm
Assembly
Transynther/x86/_processed/US/_zr_un_/i7-7700_9_0xca.log_486_321.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/US/_zr_un_/i7-7700_9_0xca.log_486_321.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/US/_zr_un_/i7-7700_9_0xca.log_486_321.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 %r8 push %rcx push %rdi push %rsi lea addresses_WT_ht+0x1ba15, %r13 nop sub %r8, %r8 mov $0x6162636465666768, %r10 movq %r10, %xmm3 vmovups %ymm3, (%r13) nop nop sub $13439, %r12 lea addresses_WT_ht+0x2f4e, %r11 nop nop nop dec %rcx mov (%r11), %rsi nop add $37744, %r11 lea addresses_normal_ht+0x871e, %rsi clflush (%rsi) nop nop add $24893, %r12 mov $0x6162636465666768, %r8 movq %r8, %xmm3 vmovups %ymm3, (%rsi) nop nop nop nop xor %r8, %r8 lea addresses_A_ht+0x9ca2, %r8 nop nop nop add %r13, %r13 movl $0x61626364, (%r8) nop nop nop nop cmp %rsi, %rsi lea addresses_WC_ht+0x43fe, %r12 clflush (%r12) nop nop nop nop nop inc %r10 mov $0x6162636465666768, %r13 movq %r13, (%r12) nop nop nop cmp $57609, %rsi lea addresses_UC_ht+0xffe, %r13 clflush (%r13) add %rcx, %rcx mov (%r13), %r10 cmp %r10, %r10 lea addresses_WT_ht+0x10b8e, %rsi lea addresses_D_ht+0xe0e, %rdi add $25756, %r12 mov $51, %rcx rep movsq nop nop nop nop and $52208, %r8 lea addresses_D_ht+0xcffe, %r8 nop nop sub $36638, %r13 mov (%r8), %r11w nop nop nop sub $33076, %rsi lea addresses_A_ht+0x1392e, %r11 nop nop cmp %rcx, %rcx movb (%r11), %r13b nop nop nop nop nop cmp $36134, %rcx lea addresses_A_ht+0xaafe, %rsi lea addresses_WT_ht+0x18ffe, %rdi nop nop nop nop cmp $46562, %r13 mov $51, %rcx rep movsb nop sub $3583, %r13 lea addresses_D_ht+0x177e, %r13 nop sub $18140, %rsi movb $0x61, (%r13) nop nop nop nop nop and $49696, %r11 pop %rsi pop %rdi pop %rcx pop %r8 pop %r13 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r8 push %rax push %rcx push %rdi push %rsi // REPMOV lea addresses_A+0xafde, %rsi lea addresses_WC+0xfffe, %rdi nop nop sub $25236, %rax mov $95, %rcx rep movsw sub $38566, %r11 // Faulty Load lea addresses_US+0x1cffe, %r11 clflush (%r11) nop nop nop inc %r8 mov (%r11), %ax lea oracles, %r8 and $0xff, %rax shlq $12, %rax mov (%r8,%rax,1), %rax pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_A'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_WC'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 3, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC_ht'}} {'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}} {'src': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}} {'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_D_ht'}} {'00': 467, '5f': 19} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 5f 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 5f 00 00 00 */
27.748718
1,457
0.65219
36afdb3595a9725b076eb213a952689f996d7ebc
284
asm
Assembly
programs/oeis/182/A182214.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/182/A182214.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/182/A182214.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A182214: Bondage number of the Cartesian product graph G = C_n X K_2. ; 3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3,2,2,4,3 mov $1,$0 add $1,6 mul $1,3 mod $1,4 trn $1,1 add $1,2
28.4
155
0.566901
b2c710bed07c41e21f278510873194a4269a4be6
6,321
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_695.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_695.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_695.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r14 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0xde3, %rsi nop xor %r10, %r10 movb (%rsi), %r13b nop nop xor $17249, %r14 lea addresses_A_ht+0xfb43, %rsi lea addresses_A_ht+0x17479, %rdi nop nop dec %rbp mov $96, %rcx rep movsw nop xor $29598, %rcx lea addresses_UC_ht+0x13f63, %r13 nop nop cmp %rsi, %rsi movl $0x61626364, (%r13) nop and $27939, %rsi lea addresses_UC_ht+0x6f7, %r14 dec %rsi movl $0x61626364, (%r14) nop nop nop nop and $35185, %rsi lea addresses_UC_ht+0x9263, %rsi lea addresses_WC_ht+0x1b833, %rdi nop nop nop nop xor %rdx, %rdx mov $82, %rcx rep movsq nop nop nop nop nop sub $34435, %r13 lea addresses_WC_ht+0xd8b3, %r13 add %rdi, %rdi movw $0x6162, (%r13) xor $1007, %rdx lea addresses_WT_ht+0x14e53, %rbp nop nop nop nop nop add $41785, %r13 movups (%rbp), %xmm6 vpextrq $1, %xmm6, %rsi nop nop xor %rcx, %rcx lea addresses_A_ht+0x101c3, %rbp nop nop nop nop sub %r13, %r13 movb $0x61, (%rbp) nop nop nop and %rsi, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r14 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %r15 push %rbp push %rcx push %rdx push %rsi // Load lea addresses_D+0x1b2a3, %r10 nop add $46927, %rbp mov (%r10), %esi nop nop nop nop nop xor %r15, %r15 // Store lea addresses_WT+0x4531, %rcx add %r15, %r15 mov $0x5152535455565758, %r10 movq %r10, %xmm3 vmovups %ymm3, (%rcx) sub $40271, %r15 // Faulty Load lea addresses_D+0x3a63, %rcx nop nop nop add %r14, %r14 mov (%rcx), %r10d lea oracles, %r14 and $0xff, %r10 shlq $12, %r10 mov (%r14,%r10,1), %r10 pop %rsi pop %rdx pop %rcx pop %rbp pop %r15 pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_D', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WT', 'size': 32, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': True, 'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False}} {'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False}} {'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False}} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
38.542683
2,999
0.654801
cc3312e249e853391f3082e381afdf8e3b172f9f
350
asm
Assembly
libsrc/stdio/ansi/ace/f_ansi_cls.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/stdio/ansi/ace/f_ansi_cls.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/stdio/ansi/ace/f_ansi_cls.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; ; ANSI Video handling for the Jupiter ACE ; ; CLS - Clear the screen ; ; ; Stefano Bodrato - Feb. 2001 ; ; ; $Id: f_ansi_cls.asm,v 1.4 2016-04-04 18:31:22 dom Exp $ ; SECTION code_clib PUBLIC ansi_cls .ansi_cls ld hl,$2400 ld (hl),32 ;' ' ld d,h ld e,l inc de ld bc,32*24 ldir ;;; ;;; The ROM cls call: ;;; call 457 ;;; ret
11.666667
57
0.597143
c9df391f42e03cd2c050c925c5a957f0aa410d7a
24,776
asm
Assembly
src/test/ref/examples/nes/nes-conio.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/test/ref/examples/nes/nes-conio.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/test/ref/examples/nes/nes-conio.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
// NES conio printing /// @file /// Nintendo Entertainment System (NES /// /// https://en.wikipedia.org/wiki/Nintendo_Entertainment_System_(Model_NES-101) /// https://github.com/gregkrsak/first_nes /// @file /// Ricoh 2C02 - NES Picture Processing Unit (PPU) /// /// Ricoh RP2C02 (NTSC version) / RP2C07 (PAL version), /// https://en.wikipedia.org/wiki/Picture_Processing_Unit /// https://wiki.nesdev.com/w/index.php/PPU_registers /// http://nesdev.com/2C02%20technical%20reference.TXT /// Based on: https://github.com/gregkrsak/first_nes written by Greg M. Krsak, 2018. .cpu _6502 // Nintendo Entertainment System (NES) ROM (Mapper 0 NROM, Vertical Mirroring) // https://sadistech.com/nesromtool/romdoc.html // https://forums.nesdev.com/viewtopic.php?f=2&t=9896 // https://github.com/gregkrsak/first_nes .file [name="nes-conio.nes", type="bin", segments="NesRom"] .file [name="nes-conio.nes_hdr", type="bin", segments="Header"] .file [name="nes-conio.nes_prg", type="bin", segments="ProgramRom"] .file [name="nes-conio.nes_chr", type="bin", segments="CharacterRom"] .segmentdef Header [ start=$0000, min=$0000, max=$000f, fill ] .segmentdef Tiles [ start=$0000, min=$0000, max=$1fff, fill ] .segmentdef Code [ start=$c000, min=$c000, max=$fff9 ] .segmentdef Data [ startAfter="Code", min=$c000, max=$fff9 ] .segmentdef Vectors [ start=$fffa, min=$fffa, max=$ffff ] .segmentdef GameRam [start=$200,max=$7ff, virtual] .segmentdef ProgramRom [ segments="Code, Data, Vectors" ] .segmentdef CharacterRom [ segments="Tiles" ] .segmentdef NesRom .segment NesRom .segmentout [ segments="Header" ] .segmentout [ segments="ProgramRom" ] .segmentout [ segments="CharacterRom" ] .segment Header .text @"NES\$1a" .byte $01 // 1x 16KB ROM (PRG) .byte $01 // 1x 8KB VROM (CHR) .byte %00000001 // Mapper nibble 0000 == No mapping (a simple 16KB PRG + 8KB CHR game) // Mirroring nibble 0001 == Vertical mirroring only /// Standard Controller Right Button .const JOY_RIGHT = 1 /// Standard Controller Left Button .const JOY_LEFT = 2 /// Standard Controller Down Button .const JOY_DOWN = 4 /// Standard Controller Up Button .const JOY_UP = 8 .const OFFSET_STRUCT_RICOH_2A03_DMC_FREQ = $10 .const OFFSET_STRUCT_RICOH_2C02_PPUMASK = 1 .const OFFSET_STRUCT_RICOH_2C02_PPUSTATUS = 2 .const OFFSET_STRUCT_RICOH_2A03_JOY1 = $16 .const OFFSET_STRUCT_RICOH_2C02_PPUADDR = 6 .const OFFSET_STRUCT_RICOH_2C02_PPUDATA = 7 .const OFFSET_STRUCT_RICOH_2C02_PPUSCROLL = 5 .const SIZEOF_CHAR = 1 /// $2000-$23bf $03c0 Name table 0 .label PPU_NAME_TABLE_0 = $2000 /// $23c0-$23ff $0040 Attribute table 0 .label PPU_ATTRIBUTE_TABLE_0 = $23c0 /// $27c0-$27ff $0040 Attribute table 1 .label PPU_ATTRIBUTE_TABLE_1 = $27c0 /// $3000-$3eff $0f00 Mirrors of $2000-$2eff /// $3f00-$3f1f $0020 Palette RAM indexes .label PPU_PALETTE = $3f00 /// PPU Status Register for reading in ASM .label PPU_PPUSTATUS = $2002 /// PPU Data Register for reading in ASM .label PPU_PPUDATA = $2007 /// APU Frame Counter /// generates low-frequency clocks for the channels and an optional 60 Hz interrupt. /// https://wiki.nesdev.com/w/index.php/APU_Frame_Counter /// ------+-----+--------------------------------------------------------------- /// $4017 | W | FR_COUNTER Frame Counter Set mode and interrupt /// ------+-----+--------------------------------------------------------------- /// | 7 | Sequencer mode: 0 selects 4-step sequence, 1 selects 5-step sequence /// | 6 | Interrupt inhibit flag. If set, the frame interrupt flag is cleared, otherwise it is unaffected. /// ------+-----+--------------------------------------------------------------- /// Side effects After 3 or 4 CPU clock cycles*, the timer is reset. /// If the mode flag is set, then both "quarter frame" and "half frame" signals are also generated. .label FR_COUNTER = $4017 /// Pointer to the start of RAM memory .label MEMORY = 0 /// NES Picture Processing Unit (PPU) .label PPU = $2000 /// NES CPU and audion processing unit (APU) .label APU = $4000 // The current cursor x-position .label conio_cursor_x = $12 // The current cursor y-position .label conio_cursor_y = $f // The current text cursor line start .label conio_line_text = $10 .label x_scroll = $1c .label y_scroll = $1b .segment Code __start: { // __ma char conio_cursor_x = 0 lda #0 sta.z conio_cursor_x // __ma char conio_cursor_y = 0 sta.z conio_cursor_y // __ma char *conio_line_text = CONIO_SCREEN_TEXT lda #<PPU_NAME_TABLE_0 sta.z conio_line_text lda #>PPU_NAME_TABLE_0 sta.z conio_line_text+1 // volatile char x_scroll lda #0 sta.z x_scroll // volatile char y_scroll sta.z y_scroll jsr main rts } // NMI Called when the PPU refreshes the screen (also known as the V-Blank period) vblank: { pha txa pha tya pha // char joy = readJoy1() // Read controller 1 jsr readJoy1 tax // joy&JOY_DOWN txa and #JOY_DOWN // if(joy&JOY_DOWN) cmp #0 beq __b1 // if(++y_scroll==240) inc.z y_scroll lda #$f0 cmp.z y_scroll bne __b1 // y_scroll=0 lda #0 sta.z y_scroll __b1: // joy&JOY_UP txa and #JOY_UP // if(joy&JOY_UP) cmp #0 beq __b2 // if(--y_scroll==255) dec.z y_scroll lda #$ff cmp.z y_scroll bne __b2 // y_scroll=239 lda #$ef sta.z y_scroll __b2: // joy&JOY_LEFT txa and #JOY_LEFT // if(joy&JOY_LEFT) cmp #0 beq __b3 // x_scroll++; inc.z x_scroll __b3: // joy&JOY_RIGHT txa and #JOY_RIGHT // if(joy&JOY_RIGHT) cmp #0 beq __b4 // x_scroll--; dec.z x_scroll __b4: // PPU->PPUSCROLL = x_scroll lda.z x_scroll sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL // PPU->PPUSCROLL = y_scroll lda.z y_scroll sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL // } pla tay pla tax pla rti } // RESET Called when the NES is reset, including when it is turned on. main: { .const screensizex1_return = $20 .const screensizey1_return = $1e .const screensizey2_return = $1e .const screensizex2_return = $20 .const screensizey3_return = $1e .label x = $18 .label y = $19 .label i = $17 // asm cld ldx #$ff txs // PPU->PPUCTRL = 0 lda #0 sta PPU // PPU->PPUMASK = 0 sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK // *FR_COUNTER = 0b01000000 lda #$40 sta FR_COUNTER // APU->DMC_FREQ = 0b01000000 sta APU+OFFSET_STRUCT_RICOH_2A03_DMC_FREQ // asm lda PPU_PPUSTATUS initNES1_waitForVBlank1: // PPU->PPUSTATUS&0x80 lda #$80 and PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS // while(!(PPU->PPUSTATUS&0x80)) cmp #0 beq initNES1_waitForVBlank1 ldx #0 initNES1___b1: // (MEMORY+0x000)[i] = 0 lda #0 sta.z MEMORY,x // (MEMORY+0x100)[i] = 0 sta MEMORY+$100,x // (MEMORY+0x200)[i] = 0 sta MEMORY+$200,x // (MEMORY+0x300)[i] = 0 sta MEMORY+$300,x // (MEMORY+0x400)[i] = 0 sta MEMORY+$400,x // (MEMORY+0x500)[i] = 0 sta MEMORY+$500,x // (MEMORY+0x600)[i] = 0 sta MEMORY+$600,x // (MEMORY+0x700)[i] = 0 sta MEMORY+$700,x // while (++i) inx cpx #0 bne initNES1___b1 initNES1_waitForVBlank2: // PPU->PPUSTATUS&0x80 lda #$80 and PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS // while(!(PPU->PPUSTATUS&0x80)) cmp #0 beq initNES1_waitForVBlank2 // asm lda PPU_PPUSTATUS // ppuDataTransfer(PPU_PALETTE, PALETTE, sizeof(PALETTE)) // Transfer the palette lda #<$20*SIZEOF_CHAR sta.z ppuDataTransfer.size lda #>$20*SIZEOF_CHAR sta.z ppuDataTransfer.size+1 lda #<PALETTE sta.z ppuDataTransfer.cpuData lda #>PALETTE sta.z ppuDataTransfer.cpuData+1 lda #<PPU_PALETTE sta.z ppuDataTransfer.ppuDataPrepare1_ppuData lda #>PPU_PALETTE sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 jsr ppuDataTransfer // ppuDataFill(PPU_ATTRIBUTE_TABLE_0, 0, 0x40) // Fill the PPU attribute table ldx #0 lda #<$40 sta.z ppuDataFill.size lda #>$40 sta.z ppuDataFill.size+1 lda #<PPU_ATTRIBUTE_TABLE_0 sta.z ppuDataFill.ppuDataPrepare1_ppuData lda #>PPU_ATTRIBUTE_TABLE_0 sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 jsr ppuDataFill // ppuDataFill(PPU_ATTRIBUTE_TABLE_1, 0, 0x40) ldx #0 lda #<$40 sta.z ppuDataFill.size lda #>$40 sta.z ppuDataFill.size+1 lda #<PPU_ATTRIBUTE_TABLE_1 sta.z ppuDataFill.ppuDataPrepare1_ppuData lda #>PPU_ATTRIBUTE_TABLE_1 sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 jsr ppuDataFill // clrscr() // Print a string jsr clrscr lda #1 sta.z x __b7: // for(char x=1;x<screensizex()-1;x++) lda.z x cmp #screensizex1_return-1 bcc __b1 lda #1 sta.z y __b9: // for(char y=1;y<screensizey()-3;y++) lda.z y cmp #screensizey2_return-3 bcc __b2 lda #0 sta.z i __b11: // for(char i=0;i<screensizey();i++) lda.z i cmp #screensizey3_return bcc __b3 // x_scroll = 0 lda #0 sta.z x_scroll // y_scroll = -8 lda #-8 sta.z y_scroll // PPU->PPUCTRL = 0b10000000 lda #$80 sta PPU // PPU->PPUMASK = 0b00011110 lda #$1e sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK __b4: // Infinite loop jmp __b4 __b3: // uctoa(i&0xf, num_buffer, HEXADECIMAL) lda #$f and.z i tax jsr uctoa // cputsxy(i, i, num_buffer) ldx.z i txa jsr cputsxy // for(char i=0;i<screensizey();i++) inc.z i jmp __b11 __b2: // cputcxy(1, y, 'i') lda.z y ldy #'i' ldx #1 jsr cputcxy // cputcxy(screensizex()-2, y, 'i') lda.z y ldy #'i' ldx #screensizex2_return-2 jsr cputcxy // for(char y=1;y<screensizey()-3;y++) inc.z y jmp __b9 __b1: // cputcxy(x, 1, '-') ldx.z x ldy #'-' lda #1 jsr cputcxy // cputcxy(x, screensizey()-4, '-') ldx.z x ldy #'-' lda #screensizey1_return-4 jsr cputcxy // for(char x=1;x<screensizex()-1;x++) inc.z x jmp __b7 } // Read Standard Controller #1 // Returns a byte representing the pushed buttons // - bit 0: right // - bit 1: left // - bit 2: down // - bit 3: up // - bit 4: start // - bit 5: select // - bit 6: B // - bit 7: A readJoy1: { .label __1 = $1a // APU->JOY1 = 1 // Latch the controller buttons lda #1 sta APU+OFFSET_STRUCT_RICOH_2A03_JOY1 // APU->JOY1 = 0 lda #0 sta APU+OFFSET_STRUCT_RICOH_2A03_JOY1 tax __b1: // for(char i=0;i<8;i++) cpx #8 bcc __b2 // } rts __b2: // joy<<1 asl sta.z __1 // APU->JOY1&1 lda #1 and APU+OFFSET_STRUCT_RICOH_2A03_JOY1 // joy = joy<<1 | APU->JOY1&1 ora.z __1 // for(char i=0;i<8;i++) inx jmp __b1 } // Transfer a number of bytes from the CPU memory to the PPU memory // - ppuData : Pointer in the PPU memory // - cpuData : Pointer to the CPU memory (RAM of ROM) // - size : The number of bytes to transfer // void ppuDataTransfer(__zp(2) void * const ppuData, __zp(4) void * const cpuData, __zp(8) unsigned int size) ppuDataTransfer: { .label ppuDataPrepare1_ppuData = 2 .label cpuSrc = 4 .label i = 6 .label ppuData = 2 .label cpuData = 4 .label size = 8 // BYTE1(ppuData) lda.z ppuDataPrepare1_ppuData+1 // PPU->PPUADDR = BYTE1(ppuData) sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR // BYTE0(ppuData) lda.z ppuDataPrepare1_ppuData // PPU->PPUADDR = BYTE0(ppuData) sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR lda #<0 sta.z i sta.z i+1 __b1: // for(unsigned int i=0;i<size;i++) lda.z i+1 cmp.z size+1 bcc __b2 bne !+ lda.z i cmp.z size bcc __b2 !: // } rts __b2: // ppuDataPut(*cpuSrc++) ldy #0 lda (cpuSrc),y // PPU->PPUDATA = val sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA // ppuDataPut(*cpuSrc++); inc.z cpuSrc bne !+ inc.z cpuSrc+1 !: // for(unsigned int i=0;i<size;i++) inc.z i bne !+ inc.z i+1 !: jmp __b1 } // Fill a number of bytes in the PPU memory // - ppuData : Pointer in the PPU memory // - size : The number of bytes to transfer // void ppuDataFill(void * const ppuData, __register(X) char val, __zp(4) unsigned int size) ppuDataFill: { .label ppuDataPrepare1_ppuData = 2 .label i = 8 .label size = 4 // BYTE1(ppuData) lda.z ppuDataPrepare1_ppuData+1 // PPU->PPUADDR = BYTE1(ppuData) sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR // BYTE0(ppuData) lda.z ppuDataPrepare1_ppuData // PPU->PPUADDR = BYTE0(ppuData) sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR lda #<0 sta.z i sta.z i+1 // Transfer to PPU __b1: // for(unsigned int i=0;i<size;i++) lda.z i+1 cmp.z size+1 bcc ppuDataPut1 bne !+ lda.z i cmp.z size bcc ppuDataPut1 !: // } rts ppuDataPut1: // PPU->PPUDATA = val stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA // for(unsigned int i=0;i<size;i++) inc.z i bne !+ inc.z i+1 !: jmp __b1 } // clears the screen and moves the cursor to the upper left-hand corner of the screen. clrscr: { // ppuDataFill(CONIO_SCREEN_TEXT, ' ', 0x3c0) ldx #' ' lda #<$3c0 sta.z ppuDataFill.size lda #>$3c0 sta.z ppuDataFill.size+1 lda #<PPU_NAME_TABLE_0 sta.z ppuDataFill.ppuDataPrepare1_ppuData lda #>PPU_NAME_TABLE_0 sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 jsr ppuDataFill // conio_cursor_x = 0 lda #0 sta.z conio_cursor_x // conio_cursor_y = 0 sta.z conio_cursor_y // conio_line_text = CONIO_SCREEN_TEXT lda #<PPU_NAME_TABLE_0 sta.z conio_line_text lda #>PPU_NAME_TABLE_0 sta.z conio_line_text+1 // } rts } // Converts unsigned number value to a string representing it in RADIX format. // If the leading digits are zero they are not included in the string. // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) // void uctoa(__register(X) char value, __zp(6) char *buffer, char radix) uctoa: { .const max_digits = 2 .label digit_value = $e .label buffer = 6 .label digit = $15 .label started = $16 lda #<num_buffer sta.z buffer lda #>num_buffer sta.z buffer+1 lda #0 sta.z started sta.z digit __b1: // for( char digit=0; digit<max_digits-1; digit++ ) lda.z digit cmp #max_digits-1 bcc __b2 // *buffer++ = DIGITS[(char)value] lda DIGITS,x ldy #0 sta (buffer),y // *buffer++ = DIGITS[(char)value]; inc.z buffer bne !+ inc.z buffer+1 !: // *buffer = 0 lda #0 tay sta (buffer),y // } rts __b2: // unsigned char digit_value = digit_values[digit] ldy.z digit lda RADIX_HEXADECIMAL_VALUES_CHAR,y sta.z digit_value // if (started || value >= digit_value) lda.z started bne __b5 cpx.z digit_value bcs __b5 __b4: // for( char digit=0; digit<max_digits-1; digit++ ) inc.z digit jmp __b1 __b5: // uctoa_append(buffer++, value, digit_value) jsr uctoa_append // uctoa_append(buffer++, value, digit_value) // value = uctoa_append(buffer++, value, digit_value) // value = uctoa_append(buffer++, value, digit_value); inc.z buffer bne !+ inc.z buffer+1 !: lda #1 sta.z started jmp __b4 } // Move cursor and output a NUL-terminated string // Same as "gotoxy (x, y); puts (s);" // void cputsxy(__register(X) char x, __register(A) char y, const char *s) cputsxy: { // gotoxy(x, y) jsr gotoxy // cputs(s) jsr cputs // } rts } // Move cursor and output one character // Same as "gotoxy (x, y); cputc (c);" // void cputcxy(__register(X) char x, __register(A) char y, __register(Y) char c) cputcxy: { // gotoxy(x, y) jsr gotoxy // cputc(c) tya tax jsr cputc // } rts } // Used to convert a single digit of an unsigned number value to a string representation // Counts a single digit up from '0' as long as the value is larger than sub. // Each time the digit is increased sub is subtracted from value. // - buffer : pointer to the char that receives the digit // - value : The value where the digit will be derived from // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. // __register(X) char uctoa_append(__zp(6) char *buffer, __register(X) char value, __zp($e) char sub) uctoa_append: { .label buffer = 6 .label sub = $e ldy #0 __b1: // while (value >= sub) cpx.z sub bcs __b2 // *buffer = DIGITS[digit] lda DIGITS,y ldy #0 sta (buffer),y // } rts __b2: // digit++; iny // value -= sub txa sec sbc.z sub tax jmp __b1 } // Set the cursor to the specified position // void gotoxy(__register(X) char x, __register(A) char y) gotoxy: { .label __5 = $13 .label __6 = $13 .label line_offset = $13 // if(y>CONIO_HEIGHT) cmp #$1e+1 bcc __b1 lda #0 __b1: // if(x>=CONIO_WIDTH) cpx #$20 bcc __b2 ldx #0 __b2: // conio_cursor_x = x stx.z conio_cursor_x // conio_cursor_y = y sta.z conio_cursor_y // unsigned int line_offset = (unsigned int)y*CONIO_WIDTH sta.z __6 lda #0 sta.z __6+1 asl.z line_offset rol.z line_offset+1 asl.z line_offset rol.z line_offset+1 asl.z line_offset rol.z line_offset+1 asl.z line_offset rol.z line_offset+1 asl.z line_offset rol.z line_offset+1 // CONIO_SCREEN_TEXT + line_offset lda.z __5 clc adc #<PPU_NAME_TABLE_0 sta.z __5 lda.z __5+1 adc #>PPU_NAME_TABLE_0 sta.z __5+1 // conio_line_text = CONIO_SCREEN_TEXT + line_offset lda.z __5 sta.z conio_line_text lda.z __5+1 sta.z conio_line_text+1 // } rts } // Output a NUL-terminated string at the current cursor position // void cputs(__zp($13) const char *s) cputs: { .label s = $13 lda #<num_buffer sta.z s lda #>num_buffer sta.z s+1 __b1: // while(c=*s++) ldy #0 lda (s),y inc.z s bne !+ inc.z s+1 !: cmp #0 bne __b2 // } rts __b2: // cputc(c) tax jsr cputc jmp __b1 } // Output one character at the current cursor position // Moves the cursor forward. Scrolls the entire screen if needed // void cputc(__register(X) char c) cputc: { // if(c=='\n') cpx #'\n' beq __b1 // conio_line_text+conio_cursor_x lda.z conio_cursor_x clc adc.z conio_line_text sta.z ppuDataSet.ppuData lda #0 adc.z conio_line_text+1 sta.z ppuDataSet.ppuData+1 // ppuDataSet(conio_line_text+conio_cursor_x, c) txa jsr ppuDataSet // if(++conio_cursor_x==CONIO_WIDTH) inc.z conio_cursor_x lda #$20 cmp.z conio_cursor_x bne __breturn // cputln() jsr cputln __breturn: // } rts __b1: // cputln() jsr cputln rts } // Set one byte in PPU memory // - ppuData : Pointer in the PPU memory // - val : The value to set // void ppuDataSet(__zp($a) char * const ppuData, __register(A) char val) ppuDataSet: { .label ppuData = $a // BYTE1(ppuData) ldx.z ppuData+1 // PPU->PPUADDR = BYTE1(ppuData) stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR // BYTE0(ppuData) ldx.z ppuData // PPU->PPUADDR = BYTE0(ppuData) stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR // PPU->PPUDATA = val sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA // } rts } // Print a newline cputln: { // conio_line_text += CONIO_WIDTH lda #$20 clc adc.z conio_line_text sta.z conio_line_text bcc !+ inc.z conio_line_text+1 !: // conio_cursor_x = 0 lda #0 sta.z conio_cursor_x // conio_cursor_y++; inc.z conio_cursor_y // cscroll() jsr cscroll // } rts } // Scroll the entire screen if the cursor is beyond the last line cscroll: { // Scroll lines up .label line1 = $c .label line2 = $a // if(conio_cursor_y==CONIO_HEIGHT) lda #$1e cmp.z conio_cursor_y bne __breturn lda #<PPU_NAME_TABLE_0 sta.z line1 lda #>PPU_NAME_TABLE_0 sta.z line1+1 lda #<PPU_NAME_TABLE_0+$20 sta.z line2 lda #>PPU_NAME_TABLE_0+$20 sta.z line2+1 ldx #0 __b1: // for(char y=0;y<CONIO_HEIGHT-1;y++) cpx #$1e-1 bcc __b2 // ppuDataFill(CONIO_SCREEN_TEXT+CONIO_BYTES-CONIO_WIDTH, ' ', CONIO_WIDTH) // Fill last line with space ldx #' ' lda #<$20 sta.z ppuDataFill.size lda #>$20 sta.z ppuDataFill.size+1 lda #<PPU_NAME_TABLE_0+$1e*$20-$20 sta.z ppuDataFill.ppuDataPrepare1_ppuData lda #>PPU_NAME_TABLE_0+$1e*$20-$20 sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 jsr ppuDataFill // conio_line_text -= CONIO_WIDTH sec lda.z conio_line_text sbc #$20 sta.z conio_line_text lda.z conio_line_text+1 sbc #0 sta.z conio_line_text+1 // conio_cursor_y--; dec.z conio_cursor_y __breturn: // } rts __b2: // ppuDataFetch(conio_cscroll_buffer, line2, CONIO_WIDTH) lda.z line2 sta.z ppuDataFetch.ppuData lda.z line2+1 sta.z ppuDataFetch.ppuData+1 jsr ppuDataFetch // ppuDataTransfer(line1, conio_cscroll_buffer, CONIO_WIDTH) lda.z line1 sta.z ppuDataTransfer.ppuData lda.z line1+1 sta.z ppuDataTransfer.ppuData+1 lda #<$20 sta.z ppuDataTransfer.size lda #>$20 sta.z ppuDataTransfer.size+1 lda #<conio_cscroll_buffer sta.z ppuDataTransfer.cpuData lda #>conio_cscroll_buffer sta.z ppuDataTransfer.cpuData+1 jsr ppuDataTransfer // line1 += CONIO_WIDTH lda #$20 clc adc.z line1 sta.z line1 bcc !+ inc.z line1+1 !: // line2 += CONIO_WIDTH lda #$20 clc adc.z line2 sta.z line2 bcc !+ inc.z line2+1 !: // for(char y=0;y<CONIO_HEIGHT-1;y++) inx jmp __b1 } // Transfer a number of bytes from the PPU memory to the CPU memory // - cpuData : Pointer to the CPU memory (RAM of ROM) // - ppuData : Pointer in the PPU memory // - size : The number of bytes to transfer // void ppuDataFetch(void * const cpuData, __zp(8) void * const ppuData, unsigned int size) ppuDataFetch: { .const size = $20 .label cpuData = conio_cscroll_buffer // Fetch from PPU to CPU .label cpuDst = 4 .label i = 2 .label ppuData = 8 // BYTE1(ppuData) lda.z ppuData+1 // PPU->PPUADDR = BYTE1(ppuData) sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR // BYTE0(ppuData) lda.z ppuData // PPU->PPUADDR = BYTE0(ppuData) sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR // asm // Perform a dummy-read to discard the current value in the data read buffer and update it with the first byte from the PPU address lda PPU_PPUDATA lda #<cpuData sta.z cpuDst lda #>cpuData sta.z cpuDst+1 lda #<0 sta.z i sta.z i+1 __b1: // for(unsigned int i=0;i<size;i++) lda.z i+1 cmp #>size bcc ppuDataRead1 bne !+ lda.z i cmp #<size bcc ppuDataRead1 !: // } rts ppuDataRead1: // return PPU->PPUDATA; lda PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA // *cpuDst++ = ppuDataRead() ldy #0 sta (cpuDst),y // *cpuDst++ = ppuDataRead(); inc.z cpuDst bne !+ inc.z cpuDst+1 !: // for(unsigned int i=0;i<size;i++) inc.z i bne !+ inc.z i+1 !: jmp __b1 } .segment GameRam // Buffer used for scrolling the NES screen conio_cscroll_buffer: .fill $20, 0 .segment Data // The digits used for numbers DIGITS: .text "0123456789abcdef" // Values of hexadecimal digits RADIX_HEXADECIMAL_VALUES_CHAR: .byte $10 .segment GameRam num_buffer: .fill $b, 0 .segment Data // Color Palette PALETTE: .byte 1, $21, $f, $30, 1, $21, $f, $30, 1, $21, $f, $30, 1, $21, $f, $30, 1, $f, $30, 8, 1, $f, $18, 8, 1, $30, $37, $1a, $f, $f, $f, $f .segment Tiles TILES: .var filechargen = LoadBinary("characters.901225-01.bin") .for(var c=0; c<256; c++) { // Plane 0 .fill 8, filechargen.get(c*8+i) // Plane 1 .fill 8, 0 } .segment Vectors VECTORS: .word vblank, main, 0
25.281633
147
0.622538
c17faa7af29f55f0308d874ad450983d715e2c93
922
asm
Assembly
S-F200VX_20180920_WithFactory/Factory_Funs.asm
xcwk/8-Pads-WiFi-Fat-Scale
50023e1c9246398e0d76c6de84307d2be226b826
[ "Unlicense" ]
1
2019-07-23T11:38:41.000Z
2019-07-23T11:38:41.000Z
S-F200VX_20180920_WithFactory/Factory_Funs.asm
xcwk/8-Pads-WiFi-Fat-Scale
50023e1c9246398e0d76c6de84307d2be226b826
[ "Unlicense" ]
null
null
null
S-F200VX_20180920_WithFactory/Factory_Funs.asm
xcwk/8-Pads-WiFi-Fat-Scale
50023e1c9246398e0d76c6de84307d2be226b826
[ "Unlicense" ]
2
2020-03-25T15:07:37.000Z
2020-04-17T07:33:32.000Z
;================================================== ;==== Factory_Funs.ASM ;================================================== Factory_Mark_ADDR_H EQU 010H Factory_Mark_ADDR_L EQU 011H Factory_Mark_Value_H EQU 0A5H Factory_Mark_Value_L EQU 05AH F_Factory_Chk_Mark: ; MOVLW Factory_Mark_ADDR_H MOVWF BIE_ADDR CALL F_18MXX_BIE_RD_BYTE MOVFW BIE_BYTE MOVWF REG0 ; MOVLW Factory_Mark_ADDR_L MOVWF BIE_ADDR CALL F_18MXX_BIE_RD_BYTE MOVFW BIE_BYTE MOVWF REG1 RETURN ;--- Input: BIE_ADDR,BIE_BYTE ;--- F_18MXX_BIE_WR_BYTE F_Factory_WR_Mark: ;--- MOVLW Factory_Mark_ADDR_H MOVWF BIE_ADDR MOVLW Factory_Mark_Value_H MOVWF BIE_BYTE CALL F_18MXX_BIE_WR_BYTE MOVLW 20 CALL cs_delay_1ms ;--- MOVLW Factory_Mark_ADDR_L MOVWF BIE_ADDR MOVLW Factory_Mark_Value_L MOVWF BIE_BYTE CALL F_18MXX_BIE_WR_BYTE MOVLW 20 CALL cs_delay_1ms RETURN
20.488889
51
0.665944
6f465c3d72c04bcb94d8aa3c16ec6a3f8169a724
970
asm
Assembly
ALINK/rtn.asm
DarkRiDDeR/mandelbrotin-fractal-generation-NASM
69f4e4cb98ad8bae983b3e76e7c38c5a7861acb6
[ "MIT" ]
3
2016-07-19T06:49:01.000Z
2018-04-25T06:46:25.000Z
ALINK/rtn.asm
DarkRiDDeR/mandelbrotin-fractal-generation-NASM
69f4e4cb98ad8bae983b3e76e7c38c5a7861acb6
[ "MIT" ]
null
null
null
ALINK/rtn.asm
DarkRiDDeR/mandelbrotin-fractal-generation-NASM
69f4e4cb98ad8bae983b3e76e7c38c5a7861acb6
[ "MIT" ]
null
null
null
;NASM Win32 resource sample ; compile and link with ; ;nasm -fobj rtn.asm ; ;alink -oPE rtn win32.lib rtn.res [extern DialogBoxParamA] [extern GetModuleHandleA] [extern ExitProcess] [extern EndDialog] WM_INITDIALOG equ 0110h WM_COMMAND equ 0111h IDOK equ 1 [segment code public use32 class='CODE'] ..start: enter 0,0 push byte 0 call GetModuleHandleA mov [handle],eax push byte 0 push dword DProc push byte 0 push dword string push byte 0 call DialogBoxParamA push dword [handle] call ExitProcess leave ret DProc: %define lparam ebp+20 %define wparam ebp+16 %define msg ebp+12 %define hdlg ebp+8 enter 0,0 mov eax,[msg] cmp eax,WM_INITDIALOG je @@wm_init cmp eax,WM_COMMAND je @@wm_command @@unhandled: xor eax,eax leave ret 16 @@wm_init: mov eax,1 leave ret 16 @@wm_command: cmp dword [wparam],IDOK jne @@unhandled push byte 1 push dword [hdlg] call EndDialog mov eax,1 leave ret 16 [segment data public] handle dd 0 string db 'ABOUTDLG',0
14.057971
40
0.747423
f9aa4c6531409803eb0796617705b045bcc0cd2a
819
asm
Assembly
oeis/193/A193643.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/193/A193643.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/193/A193643.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A193643: Number of arrays of -3..3 integers x(1..n) with every x(i) in a subsequence of length 1 or 2 with sum zero ; Submitted by Jon Maiga ; 1,7,19,67,217,721,2377,7855,25939,85675,282961,934561,3086641,10194487,33670099,111204787,367284457,1213058161,4006458937,13232434975,43703763859,144343726555,476734943521,1574548557121,5200380614881,17175690401767,56727451820179,187358045862307,618801589407097,2043762814083601,6750090031657897,22294032909057295,73632188758829779,243190599185546635,803203986315469681,2652802558131955681,8761611660711336721,28937637540265965847,95574524281509234259,315661210384793668627,1042558155435890240137 lpb $0 sub $0,1 add $1,$3 add $4,$2 add $2,2 add $2,$3 mov $3,$4 mov $4,$2 add $2,2 add $2,$1 mov $1,0 add $3,$4 lpe mov $0,$2 div $0,4 mul $0,6 add $0,1
37.227273
498
0.782662
94faa2616c7efc6defe310e53981f6092c476acd
556
asm
Assembly
oeis/070/A070951.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/070/A070951.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/070/A070951.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A070951: Number of 0's in n-th row of triangle in A070950. ; Submitted by Christian Krause ; 0,0,2,1,5,2,8,3,10,7,10,9,13,8,16,9,18,16,17,15,20,20,22,19,23,24,27,22,27,25,30,24,39,28,40,25,41,31,39,34,34,42,40,38,51,36,51,44,53,46,58,44,53,47,60,46,56,55,61,50,60,53,66,49,65,75,68,66,68,72,64,65,72,79,66,73,75,68,77,73,73,84,84,73,88,70,95,87,86,93,95,70,106,86,99,83,99,98,98,89 add $0,1 seq $0,265701 ; Number of ON (black) cells in the n-th iteration of the "Rule 135" elementary cellular automaton starting with a single ON (black) cell. sub $0,2
69.5
290
0.692446
2f2bede77bd4720d770d0310442dc3f2111e5e2e
1,434
asm
Assembly
programs/oeis/187/A187710.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/187/A187710.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/187/A187710.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A187710: a(n) = n^2 + n + 10. ; 10,12,16,22,30,40,52,66,82,100,120,142,166,192,220,250,282,316,352,390,430,472,516,562,610,660,712,766,822,880,940,1002,1066,1132,1200,1270,1342,1416,1492,1570,1650,1732,1816,1902,1990,2080,2172,2266,2362,2460,2560,2662,2766,2872,2980,3090,3202,3316,3432,3550,3670,3792,3916,4042,4170,4300,4432,4566,4702,4840,4980,5122,5266,5412,5560,5710,5862,6016,6172,6330,6490,6652,6816,6982,7150,7320,7492,7666,7842,8020,8200,8382,8566,8752,8940,9130,9322,9516,9712,9910,10110,10312,10516,10722,10930,11140,11352,11566,11782,12000,12220,12442,12666,12892,13120,13350,13582,13816,14052,14290,14530,14772,15016,15262,15510,15760,16012,16266,16522,16780,17040,17302,17566,17832,18100,18370,18642,18916,19192,19470,19750,20032,20316,20602,20890,21180,21472,21766,22062,22360,22660,22962,23266,23572,23880,24190,24502,24816,25132,25450,25770,26092,26416,26742,27070,27400,27732,28066,28402,28740,29080,29422,29766,30112,30460,30810,31162,31516,31872,32230,32590,32952,33316,33682,34050,34420,34792,35166,35542,35920,36300,36682,37066,37452,37840,38230,38622,39016,39412,39810,40210,40612,41016,41422,41830,42240,42652,43066,43482,43900,44320,44742,45166,45592,46020,46450,46882,47316,47752,48190,48630,49072,49516,49962,50410,50860,51312,51766,52222,52680,53140,53602,54066,54532,55000,55470,55942,56416,56892,57370,57850,58332,58816,59302,59790,60280,60772,61266,61762,62260 mov $1,$0 pow $1,2 add $1,$0 add $1,10
179.25
1,361
0.798466
39021b79951b325492295fe9c67a0293bc2d8545
574
asm
Assembly
Microprocessor/bcd_aas.asm
Nmane1612/Nihar-Mane
aa4db52a384f706a431c994e4e12d8e5e0cd8402
[ "Apache-2.0" ]
3
2019-12-27T06:07:37.000Z
2020-07-01T08:51:32.000Z
Microprocessor/bcd_aas.asm
Nihar16/Personal-Repository
0d319eeb8dbfa3f7c3eb8501829939ecd6923464
[ "MIT" ]
null
null
null
Microprocessor/bcd_aas.asm
Nihar16/Personal-Repository
0d319eeb8dbfa3f7c3eb8501829939ecd6923464
[ "MIT" ]
null
null
null
; this is an example of aas instruction, ; it is used to subtract huge bcd numbers (binary coded decimals). name "bcd_aas" org 100h ; make 5 - 8 ; al = 0fdh (not in binary coded decimal form) mov al, 05h mov bl, 08h sub al, bl ; convert to binary coded decimal, ; al = 7 ; and 1 is borrowed from ah, like calculating 15 - 8: aas ; convert to printable symbol: or al, 30h ; print char in al using bios teletype function: mov ah, 0eh int 10h ; wait for any key press: mov ah, 0 int 16h ret ; return control to operating system.
16.4
67
0.660279
a05f4b0539417c155b7b3ae0b898ffad363a925e
365
asm
Assembly
controlFlow/if_statement.asm
DanerSound/MIPS-from-scratch
e56bc5e4a0ade738e63f0ae827afbff94a8a7efd
[ "MIT" ]
2
2018-07-16T20:23:52.000Z
2019-03-08T18:49:39.000Z
controlFlow/if_statement.asm
DanerSound/MIPS-from-scratch
e56bc5e4a0ade738e63f0ae827afbff94a8a7efd
[ "MIT" ]
3
2018-03-22T15:47:59.000Z
2019-03-06T11:21:35.000Z
controlFlow/if_statement.asm
DanerSound/MIPS-from-scratch
e56bc5e4a0ade738e63f0ae827afbff94a8a7efd
[ "MIT" ]
5
2018-03-22T15:49:10.000Z
2018-07-24T07:46:10.000Z
# simple workflow to understand the if- construct # .data .text main: li $t1,50 li $t2,50 bne $t1, $t2, label # if(t1!=t2) do label add $t1, $t2, $t2 # else t1=t2+t2 j after # this row is mandatory to break the linear execution label: sub $t2, $t1, $t1 after: # do something diferent, in this case only finish li $v0,10 syscall
26.071429
64
0.624658
ab9cab5ebc633f54f1dde2e59f03f2a025f3b8ed
2,480
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i7-8650U_0xd2_notsx.log_73_861.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-8650U_0xd2_notsx.log_73_861.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-8650U_0xd2_notsx.log_73_861.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 %r15 push %r8 lea addresses_WC_ht+0x1c4e4, %r15 add $22615, %r13 mov $0x6162636465666768, %r8 movq %r8, %xmm3 movups %xmm3, (%r15) nop nop nop nop nop and $26058, %r8 pop %r8 pop %r15 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r9 push %rcx push %rdi push %rdx // Store lea addresses_RW+0x817a, %rdi nop nop xor %r11, %r11 movw $0x5152, (%rdi) nop and %r9, %r9 // Store lea addresses_US+0x3f24, %r9 nop nop nop nop sub $19633, %r10 mov $0x5152535455565758, %r11 movq %r11, %xmm2 vmovups %ymm2, (%r9) nop nop nop nop nop cmp $58466, %r14 // Store mov $0x8f4, %r9 nop nop sub $50404, %r14 movb $0x51, (%r9) nop nop nop nop nop cmp %r11, %r11 // Store lea addresses_WC+0x1ab0a, %rdi nop add $29827, %r11 mov $0x5152535455565758, %r9 movq %r9, (%rdi) nop and %rdi, %rdi // Store mov $0xa1a, %r10 clflush (%r10) xor %r9, %r9 movw $0x5152, (%r10) nop nop nop nop nop cmp $13486, %r14 // Faulty Load lea addresses_WT+0xbf7a, %r9 and $60014, %r10 mov (%r9), %r14d lea oracles, %rcx and $0xff, %r14 shlq $12, %r14 mov (%rcx,%r14,1), %r14 pop %rdx pop %rdi pop %rcx pop %r9 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 4, 'AVXalign': True, 'NT': True, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'39': 73} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
19.84
218
0.63629
d943657d708cc3814194e3bea5bd32433b73f442
1,543
asm
Assembly
programs/oeis/245/A245764.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/245/A245764.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/245/A245764.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A245764: a(n) = 2*(n^2 + 1) + n*(1 + (-1)^n). ; 2,4,14,20,42,52,86,100,146,164,222,244,314,340,422,452,546,580,686,724,842,884,1014,1060,1202,1252,1406,1460,1626,1684,1862,1924,2114,2180,2382,2452,2666,2740,2966,3044,3282,3364,3614,3700,3962,4052,4326,4420,4706,4804,5102,5204,5514,5620,5942,6052,6386,6500,6846,6964,7322,7444,7814,7940,8322,8452,8846,8980,9386,9524,9942,10084,10514,10660,11102,11252,11706,11860,12326,12484,12962,13124,13614,13780,14282,14452,14966,15140,15666,15844,16382,16564,17114,17300,17862,18052,18626,18820,19406,19604,20202,20404,21014,21220,21842,22052,22686,22900,23546,23764,24422,24644,25314,25540,26222,26452,27146,27380,28086,28324,29042,29284,30014,30260,31002,31252,32006,32260,33026,33284,34062,34324,35114,35380,36182,36452,37266,37540,38366,38644,39482,39764,40614,40900,41762,42052,42926,43220,44106,44404,45302,45604,46514,46820,47742,48052,48986,49300,50246,50564,51522,51844,52814,53140,54122,54452,55446,55780,56786,57124,58142,58484,59514,59860,60902,61252,62306,62660,63726,64084,65162,65524,66614,66980,68082,68452,69566,69940,71066,71444,72582,72964,74114,74500,75662,76052,77226,77620,78806,79204,80402,80804,82014,82420,83642,84052,85286,85700,86946,87364,88622,89044,90314,90740,92022,92452,93746,94180,95486,95924,97242,97684,99014,99460,100802,101252,102606,103060,104426,104884,106262,106724,108114,108580,109982,110452,111866,112340,113766,114244,115682,116164,117614,118100,119562,120052,121526,122020,123506,124004 mov $1,-2 bin $1,$0 trn $1,$0 add $1,$0 mul $1,$0 mul $1,2 add $1,2
140.272727
1,425
0.794556
e027f0872c553287d037176537c9a371c9f1ddab
5,569
asm
Assembly
Transynther/x86/_processed/US/_ht_zr_/i7-8650U_0xd2.log_1379_1450.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/US/_ht_zr_/i7-8650U_0xd2.log_1379_1450.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/US/_ht_zr_/i7-8650U_0xd2.log_1379_1450.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 %r14 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x15a79, %rsi lea addresses_WC_ht+0x5e19, %rdi nop nop nop nop xor $2004, %rax mov $57, %rcx rep movsw nop nop nop nop sub %rdx, %rdx lea addresses_A_ht+0x1d879, %rsi lea addresses_WC_ht+0x10299, %rdi nop nop dec %r14 mov $98, %rcx rep movsl nop nop nop add %r14, %r14 lea addresses_normal_ht+0x20f9, %rdx cmp $7800, %r10 movups (%rdx), %xmm4 vpextrq $0, %xmm4, %rsi nop nop add $28524, %r14 lea addresses_D_ht+0xabe, %rcx add %r14, %r14 mov $0x6162636465666768, %r10 movq %r10, %xmm0 and $0xffffffffffffffc0, %rcx movaps %xmm0, (%rcx) nop nop nop sub $13751, %rdi lea addresses_normal_ht+0xc79, %r14 nop nop nop xor $63700, %rax mov (%r14), %si and %rax, %rax lea addresses_WT_ht+0x7839, %rax nop nop nop nop and %rcx, %rcx vmovups (%rax), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $1, %xmm3, %rdi nop nop dec %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r9 push %rbp push %rdi push %rdx // Faulty Load lea addresses_US+0x3279, %r12 clflush (%r12) nop nop nop nop cmp %rbp, %rbp vmovups (%r12), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %rdx lea oracles, %r11 and $0xff, %rdx shlq $12, %rdx mov (%r11,%rdx,1), %rdx pop %rdx pop %rdi pop %rbp pop %r9 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'45': 1060, '00': 293, '49': 26} 45 00 45 00 45 45 45 45 45 45 45 45 45 45 45 00 45 00 45 45 45 45 45 00 45 45 45 00 00 45 45 45 00 45 00 45 00 45 45 45 45 00 49 45 45 00 00 45 45 45 45 45 45 00 45 45 45 45 45 45 45 45 45 45 00 45 00 00 00 45 45 45 45 45 45 45 45 45 45 45 45 45 45 00 45 45 00 00 45 45 45 45 45 45 00 45 45 00 45 45 45 45 45 00 00 45 45 45 00 45 45 45 45 45 00 45 00 45 45 00 45 45 45 00 45 45 45 45 45 45 45 45 45 45 00 45 45 45 00 45 45 45 45 45 45 45 45 00 49 45 45 45 45 45 00 45 45 45 00 00 45 45 45 45 00 45 00 45 00 45 45 45 45 00 45 45 45 45 45 45 00 45 45 00 45 45 45 45 00 45 45 45 45 00 45 45 45 45 45 45 45 45 45 45 45 00 45 45 45 00 45 00 45 00 45 45 45 45 45 45 45 45 45 00 00 45 45 00 45 45 45 45 45 45 45 00 45 45 00 45 45 00 45 45 00 45 00 45 00 45 45 45 45 45 45 45 45 45 00 45 45 45 45 45 45 00 45 45 00 45 45 45 45 45 00 45 00 45 45 45 00 00 45 45 45 45 45 45 00 45 45 45 45 45 45 45 45 45 00 45 45 45 45 45 45 45 45 00 45 45 45 45 45 00 45 45 45 45 45 45 45 45 45 00 49 00 45 45 45 45 45 45 45 45 45 00 45 45 45 45 00 45 00 45 45 00 45 45 45 45 45 49 45 45 45 45 00 45 45 45 45 00 45 45 45 45 45 45 45 45 45 00 45 45 45 45 45 00 00 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 00 45 45 00 45 45 45 00 45 45 00 00 45 45 45 45 00 00 45 45 45 45 45 45 45 00 45 45 45 45 45 45 45 45 45 45 45 00 45 00 00 45 00 00 45 00 00 45 45 45 45 45 49 00 45 45 00 45 45 45 45 45 45 45 45 00 45 45 45 45 45 45 00 45 45 45 45 45 45 45 45 45 45 45 45 00 45 45 00 45 45 00 00 45 45 00 45 45 45 45 45 45 45 45 45 45 45 45 45 45 00 45 45 45 45 00 49 45 45 45 45 45 00 45 45 45 45 00 45 45 45 45 45 45 00 45 45 45 00 45 45 45 45 45 00 45 45 45 45 49 45 45 45 00 00 45 45 45 45 00 45 45 00 45 45 45 45 00 45 45 45 45 45 45 00 00 00 45 45 00 45 45 45 00 45 45 45 45 45 00 45 45 45 00 00 45 00 49 00 45 45 45 45 00 45 00 49 45 45 45 00 00 45 45 45 45 00 45 45 45 45 00 45 45 45 00 00 45 45 45 45 00 45 45 45 45 45 45 45 45 45 45 00 45 45 45 45 45 45 00 45 45 45 45 45 45 45 45 00 00 45 45 45 45 45 45 45 45 45 00 00 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 00 45 00 45 45 00 45 00 45 00 45 45 45 45 45 45 45 45 45 45 45 45 00 45 45 45 00 45 45 45 00 45 00 45 45 45 00 45 45 45 45 45 45 45 45 45 45 45 49 45 45 45 45 00 45 45 45 00 45 45 00 45 45 45 45 00 45 00 45 45 45 45 45 45 49 45 45 45 00 45 45 45 00 45 00 45 00 45 00 45 00 45 45 45 45 00 45 45 45 45 00 00 00 45 45 45 45 00 45 45 45 45 00 45 45 45 45 00 45 45 45 45 45 45 45 45 45 00 45 45 45 49 00 45 00 00 45 45 00 45 45 00 45 49 45 00 45 45 00 45 45 45 45 45 45 45 45 45 45 00 00 45 45 45 45 45 45 00 45 45 45 45 45 45 45 45 00 45 45 45 45 45 00 45 00 45 45 45 45 45 45 00 45 00 00 45 45 00 45 45 49 45 45 45 45 45 45 45 45 45 45 45 00 45 00 45 45 45 00 00 00 00 45 00 45 00 45 00 45 45 45 45 00 45 45 00 00 45 00 00 00 45 45 45 00 45 45 45 45 00 45 49 45 45 00 45 00 45 45 00 45 45 00 45 45 45 45 45 45 45 45 00 45 45 45 00 00 45 45 45 45 45 45 45 45 45 00 45 45 45 45 45 45 45 00 00 45 45 00 45 00 45 45 45 45 00 45 45 00 45 45 45 45 45 45 45 */
43.507813
2,999
0.660801
85b18baf2cac8726bfd2e4d1cb490c12e52b71df
103
asm
Assembly
PCMgrLoader/shellcode_x64.asm
fengjixuchui/PCMgr
00a576f33221baec273a9f543c8429daa1fe605f
[ "MIT" ]
40
2020-04-20T13:59:04.000Z
2022-03-31T03:03:51.000Z
PCMgrLoader/shellcode_x64.asm
fengjixuchui/PCMgr
00a576f33221baec273a9f543c8429daa1fe605f
[ "MIT" ]
2
2020-05-08T15:13:15.000Z
2021-02-14T12:51:36.000Z
PCMgrLoader/shellcode_x64.asm
fengjixuchui/PCMgr
00a576f33221baec273a9f543c8429daa1fe605f
[ "MIT" ]
19
2020-04-03T11:32:19.000Z
2022-03-10T12:52:10.000Z
.data .code MGetCurrentPeb PROC mov rbx, 0 mov rbx, GS:[60h] mov rax, rbx ret MGetCurrentPeb ENDP END
9.363636
19
0.747573
de774eca0b0303e5bcac4150177d43797ab51b41
539
asm
Assembly
oeis/073/A073010.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/073/A073010.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/073/A073010.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A073010: Decimal expansion of Pi/sqrt(27). ; Submitted by Jon Maiga ; 6,0,4,5,9,9,7,8,8,0,7,8,0,7,2,6,1,6,8,6,4,6,9,2,7,5,2,5,4,7,3,8,5,2,4,4,0,9,4,6,8,8,7,4,9,3,6,4,2,4,6,8,5,8,5,2,3,2,9,4,9,7,8,4,6,2,7,0,7,7,2,7,0,4,2,1,1,7,9,6,1,2,2,8,0,4,1,6,6,2,7,3,7,3,5,3,3,8,9,6 mov $1,1 mov $2,1 mov $3,$0 mul $3,5 lpb $3 mul $1,$3 mov $5,$3 mul $5,4 add $5,2 mul $2,$5 add $1,$2 div $5,$2 add $5,$0 div $1,$5 div $2,$5 sub $3,1 lpe mul $1,10 mov $4,10 pow $4,$0 div $2,$4 mul $2,2 div $1,$2 add $1,$4 mov $0,$1 mod $0,10
17.387097
201
0.523191
a0465d3fd9b48db01a12054819b2e0c234cf0e76
286
asm
Assembly
programs/oeis/040/A040120.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/040/A040120.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/040/A040120.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A040120: Continued fraction for sqrt(132). ; 11,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2,22,2 sub $0,1 mod $0,2 mul $0,11 add $0,2 pow $0,2 sub $0,2 div $0,8 add $0,2
23.833333
166
0.608392
4859e81c2bb15c9fee88e1e50d51334621241c3b
343
asm
Assembly
programs/oeis/158/A158137.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/158/A158137.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/158/A158137.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A158137: Period 9: repeat [-2,4,-2,4,-2,-2,1,1,-2]. ; -2,4,-2,4,-2,-2,1,1,-2,-2,4,-2,4,-2,-2,1,1,-2,-2,4,-2,4,-2,-2,1,1,-2,-2,4,-2,4,-2,-2,1,1,-2,-2,4,-2,4,-2,-2,1,1,-2,-2,4,-2,4,-2,-2,1,1,-2,-2,4,-2,4,-2,-2,1,1,-2,-2,4,-2,4,-2,-2,1,1,-2,-2,4,-2,4,-2,-2,1,1,-2,-2,4,-2 seq $0,158090 ; Period 9: repeat [0, 6, 0, 6, 0, 0, 3, 3, 0]. sub $0,2
57.166667
216
0.437318
bd287c9f63b21f1104f16c707da4fdd78a26e917
91,775
asm
Assembly
patch.asm
hansbonini/-GBA-Spiderman-3
2e1ca0d5aa584d46b0057c2255104fbbb55864b9
[ "MIT" ]
null
null
null
patch.asm
hansbonini/-GBA-Spiderman-3
2e1ca0d5aa584d46b0057c2255104fbbb55864b9
[ "MIT" ]
null
null
null
patch.asm
hansbonini/-GBA-Spiderman-3
2e1ca0d5aa584d46b0057c2255104fbbb55864b9
[ "MIT" ]
null
null
null
;//---------------------------------- ;// [GBA] Spider Man 3 ;//---------------------------------- ;// Asm patch for Translation ;//---------------------------------- endian lsb output "spiderman3_br.gba",create origin $00000000 insert "spiderman3.gba" map '0',$30, 10 map 'A',$41, 26 map 'a',$61, 26 ;//-------- Pointer: 0000 -------- origin ($000F634C) dd $08000000 + text_0000 ;//-------- Text: 0000 -------- origin $000F69F0 text_0000: dd $080F69EC db " " dw $0000 ;//-------- Pointer: 0001 -------- origin ($000F6350) dd $08000000 + text_0001 ;//-------- Text: 0001 -------- origin $000F69F8 text_0001: dd $08000000 + text_0000 + $4 db "%d%%" dw $0000 ;//-------- Pointer: 0002 -------- origin ($000F6354) dd $08000000 + text_0002 ;//-------- Text: 0002 -------- origin $000F6A04 text_0002: dd $08000000 + text_0001 + $4 db "%d/%d" dw $0000 ;//-------- Pointer: 0003 -------- origin ($000F6358) dd $08000000 + text_0003 ;//-------- Text: 0003 -------- origin $000F6A10 text_0003: dd $08000000 + text_0002 + $4 db "SM" dw $0000 ;//-------- Pointer: 0004 -------- origin ($000F635C) dd $08000000 + text_0004 ;//-------- Text: 0004 -------- origin $000F6A18 text_0004: dd $08000000 + text_0003 + $4 db "DS" dw $0000 ;//-------- Pointer: 0005 -------- origin ($000F6360) dd $08000000 + text_0005 ;//-------- Text: 0005 -------- origin $000F6A20 text_0005: dd $08000000 + text_0004 + $4 db "x = %d, y = %d" dw $0000 ;//-------- Pointer: 0006 -------- origin ($000F6364) dd $08000000 + text_0006 ;//-------- Text: 0006 -------- origin $000F6A34 text_0006: dd $08000000 + text_0005 + $4 db "BS" dw $0000 ;//-------- Pointer: 0007 -------- origin ($000F6368) dd $08000000 + text_0007 ;//-------- Text: 0007 -------- origin $000F6A3C text_0007: dd $08000000 + text_0006 + $4 db "TM" dw $0000 ;//-------- Pointer: 0008 -------- origin ($000F636C) dd $08000000 + text_0008 ;//-------- Text: 0008 -------- origin $000F6A44 text_0008: dd $08000000 + text_0007 + $4 db "Fran",$E7,"ais" dw $0000 ;//-------- Pointer: 0009 -------- origin ($000F6370) dd $08000000 + text_0009 ;//-------- Text: 0009 -------- origin $000F6A54 text_0009: dd $08000000 + text_0008 + $4 db "Italiano" dw $0000 ;//-------- Pointer: 0010 -------- origin ($000F6374) dd $08000000 + text_0010 ;//-------- Text: 0010 -------- origin $000F6A64 text_0010: dd $08000000 + text_0009 + $4 db "English USA" dw $0000 ;//-------- Pointer: 0011 -------- origin ($000F6378) dd $08000000 + text_0011 ;//-------- Text: 0011 -------- origin $000F6A74 text_0011: dd $08000000 + text_0010 + $4 db "English UK" dw $0000 ;//-------- Pointer: 0012 -------- origin ($000F637C) dd $08000000 + text_0012 ;//-------- Text: 0012 -------- origin $000F6A84 text_0012: dd $08000000 + text_0011 + $4 db "Deutsch" dw $0000 ;//-------- Pointer: 0013 -------- origin ($000F6380) dd $08000000 + text_0013 ;//-------- Text: 0013 -------- origin $000F6A90 text_0013: dd $08000000 + text_0012 + $4 db "Espa",$F1,"ol" dw $0000 ;//-------- Pointer: 0014 -------- origin ($000F6384) dd $08000000 + text_0014 ;//-------- Text: 0014 -------- origin $000F6A9C text_0014: dd $08000000 + text_0013 + $4 db "marquee ID not specified" dw $0000 ;//-------- Pointer: 0015 -------- origin ($000F6388) dd $08000000 + text_0015 ;//-------- Text: 0015 -------- origin $000F6ABC text_0015: dd $08000000 + text_0014 + $4 db "no matching marquee found - please make an entry in marquee table" dw $0000 ;//-------- Pointer: 0016 -------- origin ($000F638C) dd $08000000 + text_0016 ;//-------- Text: 0016 -------- origin $000F6B04 text_0016: dd $08000000 + text_0015 + $4 db "dialog ID not specified" dw $0000 ;//-------- Pointer: 0017 -------- origin ($000F6390) dd $08000000 + text_0017 ;//-------- Text: 0017 -------- origin $000F6B20 text_0017: dd $08000000 + text_0016 + $4 db "no matching dialog found - please make an entry in dialog table" dw $0000 ;//-------- Pointer: 0018 -------- origin ($000F6394) dd $08000000 + text_0018 ;//-------- Text: 0018 -------- origin $000F6B64 text_0018: dd $08000000 + text_0017 + $4 db "I can't stand on anything! I have to stick to the walls and ceilings..." dw $0000 ;//-------- Pointer: 0019 -------- origin ($000F6398) dd $08000000 + text_0019 ;//-------- Text: 0019 -------- origin $000F6BB4 text_0019: dd $08000000 + text_0018 + $4 db "Time to see what's going on!" dw $0000 ;//-------- Pointer: 0020 -------- origin ($000F639C) dd $08000000 + text_0020 ;//-------- Text: 0020 -------- origin $000F6BD8 text_0020: dd $08000000 + text_0019 + $4 db "Punching ? icons gives me hints!" dw $0000 ;//-------- Pointer: 0021 -------- origin ($000F63A0) dd $08000000 + text_0021 ;//-------- Text: 0021 -------- origin $000F6C00 text_0021: dd $08000000 + text_0020 + $4 db "What a mess! Who could've done this?" dw $0000 ;//-------- Pointer: 0022 -------- origin ($000F63A4) dd $08000000 + text_0022 ;//-------- Text: 0022 -------- origin $000F6C2C text_0022: dd $08000000 + text_0021 + $4 db "Sandman can't follow me over the water!" dw $0000 ;//-------- Pointer: 0023 -------- origin ($000F63A8) dd $08000000 + text_0023 ;//-------- Text: 0023 -------- origin $000F6C58 text_0023: dd $08000000 + text_0022 + $4 db "Feel the power of a knuckle sand-wich!" dw $0000 ;//-------- Pointer: 0024 -------- origin ($000F63AC) dd $08000000 + text_0024 ;//-------- Text: 0024 -------- origin $000F6C84 text_0024: dd $08000000 + text_0023 + $4 db "Those bombs must be down here somewhere..." dw $0000 ;//-------- Pointer: 0025 -------- origin ($000F63B0) dd $08000000 + text_0025 ;//-------- Text: 0025 -------- origin $000F6CB4 text_0025: dd $08000000 + text_0024 + $4 db "I wonder where these guys get their bombs? " db "Not to mention those oh-so" db "fashionable matching jumpsuits?" dw $0000 ;//-------- Pointer: 0026 -------- origin ($000F63B4) dd $08000000 + text_0026 ;//-------- Text: 0026 -------- origin $000F6D20 text_0026: dd $08000000 + text_0025 + $4 db "I think I hear a subway train below." dw $0000 ;//-------- Pointer: 0027 -------- origin ($000F63B8) dd $08000000 + text_0027 ;//-------- Text: 0027 -------- origin $000F6D4C text_0027: dd $08000000 + text_0026 + $4 db "The bomb's in the head car of this train. Have to hurry!" dw $0000 ;//-------- Pointer: 0028 -------- origin ($000F63BC) dd $08000000 + text_0028 ;//-------- Text: 0028 -------- origin $000F6D8C text_0028: dd $08000000 + text_0027 + $4 db "That was the last of the bombs. Now to find the coward who planted them!" dw $0000 ;//-------- Pointer: 0029 -------- origin ($000F63C0) dd $08000000 + text_0029 ;//-------- Text: 0029 -------- origin $000F6DDC text_0029: dd $08000000 + text_0028 + $4 db "Jonah's on that helicopter. I have to follow it!" dw $0000 ;//-------- Pointer: 0030 -------- origin ($000F63C4) dd $08000000 + text_0030 ;//-------- Text: 0030 -------- origin $000F6E14 text_0030: dd $08000000 + text_0029 + $4 db "There's the helicopter... it's landed! Time to ",$93,"de-fuse",$94," this bomber!" dw $0000 ;//-------- Pointer: 0031 -------- origin ($000F63C8) dd $08000000 + text_0031 ;//-------- Text: 0031 -------- origin $000F6E60 text_0031: dd $08000000 + text_0030 + $4 db "Spider-Man, you've become more than a nuisance. I can see I'll have to take care of you myself." dw $0000 ;//-------- Pointer: 0032 -------- origin ($000F63CC) dd $08000000 + text_0032 ;//-------- Text: 0032 -------- origin $000F6EC4 text_0032: dd $08000000 + text_0031 + $4 db "Just so we're clear, bomb boy: when I clean your clock, it's because you tried to blow up my city. NOT because you kidnapped the flattop. Got that?" dw $0000 ;//-------- Pointer: 0033 -------- origin ($000F63D0) dd $08000000 + text_0033 ;//-------- Text: 0033 -------- origin $000F6F5C text_0033: dd $08000000 + text_0032 + $4 db "I think I hear someone in trouble." dw $0000 ;//-------- Pointer: 0034 -------- origin ($000F63D4) dd $08000000 + text_0034 ;//-------- Text: 0034 -------- origin $000F6F84 text_0034: dd $08000000 + text_0033 + $4 db "I think that was it. Time to find Sparky!" dw $0000 ;//-------- Pointer: 0035 -------- origin ($000F63D8) dd $08000000 + text_0035 ;//-------- Text: 0035 -------- origin $000F6FB4 text_0035: dd $08000000 + text_0034 + $4 db "Electro! Where's the D.A.?" dw $0000 ;//-------- Pointer: 0036 -------- origin ($000F63DC) dd $08000000 + text_0036 ;//-------- Text: 0036 -------- origin $000F6FD4 text_0036: dd $08000000 + text_0035 + $4 db "That's none of your concern, webhead. After I'm done with you they'll call you the lightning bug!" dw $0000 ;//-------- Pointer: 0037 -------- origin ($000F63E0) dd $08000000 + text_0037 ;//-------- Text: 0037 -------- origin $000F703C text_0037: dd $08000000 + text_0036 + $4 db "Talking to you gets me all charged up. Let's see if I can return the favor!" dw $0000 ;//-------- Pointer: 0038 -------- origin ($000F63E4) dd $08000000 + text_0038 ;//-------- Text: 0038 -------- origin $000F708C text_0038: dd $08000000 + text_0037 + $4 db "Shocking turn of events, eh, Sparky?" dw $0000 ;//-------- Pointer: 0039 -------- origin ($000F63E8) dd $08000000 + text_0039 ;//-------- Text: 0039 -------- origin $000F70B8 text_0039: dd $08000000 + text_0038 + $4 db "Ah, there's the D.A. -- looks like he's all right. Lucky for you, Electro. Otherwise I might need to overcharge you again." dw $0000 ;//-------- Pointer: 0040 -------- origin ($000F63EC) dd $08000000 + text_0040 ;//-------- Text: 0040 -------- origin $000F7138 text_0040: dd $08000000 + text_0039 + $4 db "You thought I was destroyed by your feeble attempt, but you've only made me stronger!" dw $0000 ;//-------- Pointer: 0041 -------- origin ($000F63F0) dd $08000000 + text_0041 ;//-------- Text: 0041 -------- origin $000F7194 text_0041: dd $08000000 + text_0040 + $4 db "Yeah, I can smell you from here!" dw $0000 ;//-------- Pointer: 0042 -------- origin ($000F63F4) dd $08000000 + text_0042 ;//-------- Text: 0042 -------- origin $000F71BC text_0042: dd $08000000 + text_0041 + $4 db "Feel the wrath of my sea of sand!" dw $0000 ;//-------- Pointer: 0043 -------- origin ($000F63F8) dd $08000000 + text_0043 ;//-------- Text: 0043 -------- origin $000F71E4 text_0043: dd $08000000 + text_0042 + $4 db "No amount of sand can hold up to water. I bet if I turn on enough water mains he'll just flow away!" dw $0000 ;//-------- Pointer: 0044 -------- origin ($000F63FC) dd $08000000 + text_0044 ;//-------- Text: 0044 -------- origin $000F724C text_0044: dd $08000000 + text_0043 + $4 db "Press ",$80," to jump." dw $0000 ;//-------- Pointer: 0045 -------- origin ($000F6400) dd $08000000 + text_0045 ;//-------- Text: 0045 -------- origin $000F7264 text_0045: dd $08000000 + text_0044 + $4 db "Run toward hint markers for gameplay tips!" dw $0000 ;//-------- Pointer: 0046 -------- origin ($000F6404) dd $08000000 + text_0046 ;//-------- Text: 0046 -------- origin $000F7294 text_0046: dd $08000000 + text_0045 + $4 db "Press ",$81," to punch." dw $0000 ;//-------- Pointer: 0047 -------- origin ($000F6408) dd $08000000 + text_0047 ;//-------- Text: 0047 -------- origin $000F72AC text_0047: dd $08000000 + text_0046 + $4 db "Pull his leg..." dw $0000 ;//-------- Pointer: 0048 -------- origin ($000F640C) dd $08000000 + text_0048 ;//-------- Text: 0048 -------- origin $000F72C0 text_0048: dd $08000000 + text_0047 + $4 db "Play with fire..." dw $0000 ;//-------- Pointer: 0049 -------- origin ($000F6410) dd $08000000 + text_0049 ;//-------- Text: 0049 -------- origin $000F72D8 text_0049: dd $08000000 + text_0048 + $4 db "Need to find a way down!" dw $0000 ;//-------- Pointer: 0050 -------- origin ($000F6414) dd $08000000 + text_0050 ;//-------- Text: 0050 -------- origin $000F72F8 text_0050: dd $08000000 + text_0049 + $4 db "Train coming!" dw $0000 ;//-------- Pointer: 0051 -------- origin ($000F6418) dd $08000000 + text_0051 ;//-------- Text: 0051 -------- origin $000F730C text_0051: dd $08000000 + text_0050 + $4 db "Sand on the tracks?" dw $0000 ;//-------- Pointer: 0052 -------- origin ($000F641C) dd $08000000 + text_0052 ;//-------- Text: 0052 -------- origin $000F7324 text_0052: dd $08000000 + text_0051 + $4 db "I can't defeat this guy, I'd better run!" dw $0000 ;//-------- Pointer: 0053 -------- origin ($000F6420) dd $08000000 + text_0053 ;//-------- Text: 0053 -------- origin $000F7354 text_0053: dd $08000000 + text_0052 + $4 db "A civilian is in danger!" dw $0000 ;//-------- Pointer: 0054 -------- origin ($000F6424) dd $08000000 + text_0054 ;//-------- Text: 0054 -------- origin $000F7374 text_0054: dd $08000000 + text_0053 + $4 db "More civilians are in trouble. Hurry!" dw $0000 ;//-------- Pointer: 0055 -------- origin ($000F6428) dd $08000000 + text_0055 ;//-------- Text: 0055 -------- origin $000F73A0 text_0055: dd $08000000 + text_0054 + $4 db "The building is collapsing!" dw $0000 ;//-------- Pointer: 0056 -------- origin ($000F642C) dd $08000000 + text_0056 ;//-------- Text: 0056 -------- origin $000F73C0 text_0056: dd $08000000 + text_0055 + $4 db "Can't break this wall without the black suit!" dw $0000 ;//-------- Pointer: 0057 -------- origin ($000F6430) dd $08000000 + text_0057 ;//-------- Text: 0057 -------- origin $000F73F4 text_0057: dd $08000000 + text_0056 + $4 db "I need to find a red key." dw $0000 ;//-------- Pointer: 0058 -------- origin ($000F6434) dd $08000000 + text_0058 ;//-------- Text: 0058 -------- origin $000F7414 text_0058: dd $08000000 + text_0057 + $4 db "I need a blue key." dw $0000 ;//-------- Pointer: 0059 -------- origin ($000F6438) dd $08000000 + text_0059 ;//-------- Text: 0059 -------- origin $000F742C text_0059: dd $08000000 + text_0058 + $4 db "I need to find a yellow key." dw $0000 ;//-------- Pointer: 0060 -------- origin ($000F643C) dd $08000000 + text_0060 ;//-------- Text: 0060 -------- origin $000F7450 text_0060: dd $08000000 + text_0059 + $4 db "You found a red key." dw $0000 ;//-------- Pointer: 0061 -------- origin ($000F6440) dd $08000000 + text_0061 ;//-------- Text: 0061 -------- origin $000F746C text_0061: dd $08000000 + text_0060 + $4 db "You found a blue key." dw $0000 ;//-------- Pointer: 0062 -------- origin ($000F6444) dd $08000000 + text_0062 ;//-------- Text: 0062 -------- origin $000F7488 text_0062: dd $08000000 + text_0061 + $4 db "You found a yellow key." dw $0000 ;//-------- Pointer: 0063 -------- origin ($000F6448) dd $08000000 + text_0063 ;//-------- Text: 0063 -------- origin $000F74A4 text_0063: dd $08000000 + text_0062 + $4 db "There's another room above me..." dw $0000 ;//-------- Pointer: 0064 -------- origin ($000F644C) dd $08000000 + text_0064 ;//-------- Text: 0064 -------- origin $000F74CC text_0064: dd $08000000 + text_0063 + $4 db "Get out of the building!" dw $0000 ;//-------- Pointer: 0065 -------- origin ($000F6450) dd $08000000 + text_0065 ;//-------- Text: 0065 -------- origin $000F74EC text_0065: dd $08000000 + text_0064 + $4 db "Place a camera for intel..." dw $0000 ;//-------- Pointer: 0066 -------- origin ($000F6454) dd $08000000 + text_0066 ;//-------- Text: 0066 -------- origin $000F750C text_0066: dd $08000000 + text_0065 + $4 db "Diagonal web zipping can be useful." dw $0000 ;//-------- Pointer: 0067 -------- origin ($000F6458) dd $08000000 + text_0067 ;//-------- Text: 0067 -------- origin $000F7534 text_0067: dd $08000000 + text_0066 + $4 db "Breaking objects fills the purple Rage Meter." dw $0000 ;//-------- Pointer: 0068 -------- origin ($000F645C) dd $08000000 + text_0068 ;//-------- Text: 0068 -------- origin $000F7568 text_0068: dd $08000000 + text_0067 + $4 db "Damaging enemies also fills the Rage Meter." dw $0000 ;//-------- Pointer: 0069 -------- origin ($000F6460) dd $08000000 + text_0069 ;//-------- Text: 0069 -------- origin $000F7598 text_0069: dd $08000000 + text_0068 + $4 db "Uh oh... the quicksand is rising!" dw $0000 ;//-------- Pointer: 0070 -------- origin ($000F6464) dd $08000000 + text_0070 ;//-------- Text: 0070 -------- origin $000F75C0 text_0070: dd $08000000 + text_0069 + $4 db "Turn on water mains to slow the sand down." dw $0000 ;//-------- Pointer: 0071 -------- origin ($000F6468) dd $08000000 + text_0071 ;//-------- Text: 0071 -------- origin $000F75F0 text_0071: dd $08000000 + text_0070 + $4 db "Collect a Rage Power-Up to get the black suit instantly." dw $0000 ;//-------- Pointer: 0072 -------- origin ($000F646C) dd $08000000 + text_0072 ;//-------- Text: 0072 -------- origin $000F7630 text_0072: dd $08000000 + text_0071 + $4 db "Switches disable electric barriers." dw $0000 ;//-------- Pointer: 0073 -------- origin ($000F6470) dd $08000000 + text_0073 ;//-------- Text: 0073 -------- origin $000F7658 text_0073: dd $08000000 + text_0072 + $4 db "Don't let Sandman out of your sight!" dw $0000 ;//-------- Pointer: 0074 -------- origin ($000F6474) dd $08000000 + text_0074 ;//-------- Text: 0074 -------- origin $000F7684 text_0074: dd $08000000 + text_0073 + $4 db "Thugs are already here. Kingpin must've tipped off Electro!" dw $0000 ;//-------- Pointer: 0075 -------- origin ($000F6478) dd $08000000 + text_0075 ;//-------- Text: 0075 -------- origin $000F76C4 text_0075: dd $08000000 + text_0074 + $4 db "Good job! You saved the subway from complete disaster!" dw $0000 ;//-------- Pointer: 0076 -------- origin ($000F647C) dd $08000000 + text_0076 ;//-------- Text: 0076 -------- origin $000F7700 text_0076: dd $08000000 + text_0075 + $4 db "What a mess! I've got to rescue all the civilians and get out of here!" dw $0000 ;//-------- Pointer: 0077 -------- origin ($000F6480) dd $08000000 + text_0077 ;//-------- Text: 0077 -------- origin $000F774C text_0077: dd $08000000 + text_0076 + $4 db "Mad Bomber has hidden bombs around the city! I've got to find and disable them all!" dw $0000 ;//-------- Pointer: 0078 -------- origin ($000F6484) dd $08000000 + text_0078 ;//-------- Text: 0078 -------- origin $000F77A4 text_0078: dd $08000000 + text_0077 + $4 db "Hit the valve switches to water down the sand!" dw $0000 ;//-------- Pointer: 0079 -------- origin ($000F6488) dd $08000000 + text_0079 ;//-------- Text: 0079 -------- origin $000F77D8 text_0079: dd $08000000 + text_0078 + $4 db "I can't let Kingpin get away! I have to stay on his limo!" dw $0000 ;//-------- Pointer: 0080 -------- origin ($000F648C) dd $08000000 + text_0080 ;//-------- Text: 0080 -------- origin $000F7818 text_0080: dd $08000000 + text_0079 + $4 db "There's Kingpin's limo!" dw $0000 ;//-------- Pointer: 0081 -------- origin ($000F6490) dd $08000000 + text_0081 ;//-------- Text: 0081 -------- origin $000F7834 text_0081: dd $08000000 + text_0080 + $4 db "So far, so good. I'll need to web the other cameras, then find Kingpin's office!" dw $0000 ;//-------- Pointer: 0082 -------- origin ($000F6494) dd $08000000 + text_0082 ;//-------- Text: 0082 -------- origin $000F788C text_0082: dd $08000000 + text_0081 + $4 db "Aaaarrrggghhhhhh..." dw $0000 ;//-------- Pointer: 0083 -------- origin ($000F6498) dd $08000000 + text_0083 ;//-------- Text: 0083 -------- origin $000F78A4 text_0083: dd $08000000 + text_0082 + $4 db "Back to the bottom of the ocean for you, beach boy!" dw $0000 ;//-------- Pointer: 0084 -------- origin ($000F649C) dd $08000000 + text_0084 ;//-------- Text: 0084 -------- origin $000F78DC text_0084: dd $08000000 + text_0083 + $4 db "Rescue the civilian!" dw $0000 ;//-------- Pointer: 0085 -------- origin ($000F64A0) dd $08000000 + text_0085 ;//-------- Text: 0085 -------- origin $000F78F8 text_0085: dd $08000000 + text_0084 + $4 db "Rescue the civilians!" dw $0000 ;//-------- Pointer: 0086 -------- origin ($000F64A4) dd $08000000 + text_0086 ;//-------- Text: 0086 -------- origin $000F7914 text_0086: dd $08000000 + text_0085 + $4 db "Disable the bomb!" dw $0000 ;//-------- Pointer: 0087 -------- origin ($000F64A8) dd $08000000 + text_0087 ;//-------- Text: 0087 -------- origin $000F792C text_0087: dd $08000000 + text_0086 + $4 db "Disable the subway bomb!" dw $0000 ;//-------- Pointer: 0088 -------- origin ($000F64AC) dd $08000000 + text_0088 ;//-------- Text: 0088 -------- origin $000F794C text_0088: dd $08000000 + text_0087 + $4 db "You haven't disabled all the bombs!" dw $0000 ;//-------- Pointer: 0089 -------- origin ($000F64B0) dd $08000000 + text_0089 ;//-------- Text: 0089 -------- origin $000F7974 text_0089: dd $08000000 + text_0088 + $4 db "You haven't disabled the bomb!" dw $0000 ;//-------- Pointer: 0090 -------- origin ($000F64B4) dd $08000000 + text_0090 ;//-------- Text: 0090 -------- origin $000F7998 text_0090: dd $08000000 + text_0089 + $4 db "You haven't rescued all the civilians!" dw $0000 ;//-------- Pointer: 0091 -------- origin ($000F64B8) dd $08000000 + text_0091 ;//-------- Text: 0091 -------- origin $000F79C4 text_0091: dd $08000000 + text_0090 + $4 db "You haven't disabled all the cameras!" dw $0000 ;//-------- Pointer: 0092 -------- origin ($000F64BC) dd $08000000 + text_0092 ;//-------- Text: 0092 -------- origin $000F79F0 text_0092: dd $08000000 + text_0091 + $4 db "Get to the subway train!" dw $0000 ;//-------- Pointer: 0093 -------- origin ($000F64C0) dd $08000000 + text_0093 ;//-------- Text: 0093 -------- origin $000F7A10 text_0093: dd $08000000 + text_0092 + $4 db "You lost the subway train!" dw $0000 ;//-------- Pointer: 0094 -------- origin ($000F64C4) dd $08000000 + text_0094 ;//-------- Text: 0094 -------- origin $000F7A30 text_0094: dd $08000000 + text_0093 + $4 db "Press ",$80," in midair to web swing." dw $0000 ;//-------- Pointer: 0095 -------- origin ($000F64C8) dd $08000000 + text_0095 ;//-------- Text: 0095 -------- origin $000F7A54 text_0095: dd $08000000 + text_0094 + $4 db "Press ",$80," and HOLD the +Control Pad to stick to a wall or ceiling to crawl on it." dw $0000 ;//-------- Pointer: 0096 -------- origin ($000F64CC) dd $08000000 + text_0096 ;//-------- Text: 0096 -------- origin $000F7AA8 text_0096: dd $08000000 + text_0095 + $4 db "Press ",$81," near switches to activate them." dw $0000 ;//-------- Pointer: 0097 -------- origin ($000F64D0) dd $08000000 + text_0097 ;//-------- Text: 0097 -------- origin $000F7AD4 text_0097: dd $08000000 + text_0096 + $4 db "Use the compass to help Spider-Man reach his objectives. When the compass is active, press SELECT to view your current objective." dw $0000 ;//-------- Pointer: 0098 -------- origin ($000F64D4) dd $08000000 + text_0098 ;//-------- Text: 0098 -------- origin $000F7B5C text_0098: dd $08000000 + text_0097 + $4 db "Webbing can also be used to gum up sprinklers and redirect the flow of water." dw $0000 ;//-------- Pointer: 0099 -------- origin ($000F64D8) dd $08000000 + text_0099 ;//-------- Text: 0099 -------- origin $000F7BB0 text_0099: dd $08000000 + text_0098 + $4 db "Webbing can be used to stop fans for a few seconds." dw $0000 ;//-------- Pointer: 0100 -------- origin ($000F64DC) dd $08000000 + text_0100 ;//-------- Text: 0100 -------- origin $000F7BE8 text_0100: dd $08000000 + text_0099 + $4 db "A timer will appear inside the compass if a goal needs to be completed quickly." dw $0000 ;//-------- Pointer: 0101 -------- origin ($000F64E0) dd $08000000 + text_0101 ;//-------- Text: 0101 -------- origin $000F7C3C text_0101: dd $08000000 + text_0100 + $4 db "To aim the Web Zip, use the +Control Pad to aim, then HOLD ",$87," to zip to a surface." dw $0000 ;//-------- Pointer: 0102 -------- origin ($000F64E4) dd $08000000 + text_0102 ;//-------- Text: 0102 -------- origin $000F7C94 text_0102: dd $08000000 + text_0101 + $4 db "To Web Pull an enemy, HOLD ",$87," to web and hold them, while holding them use the +Control Pad to pull the enemy towards you." dw $0000 ;//-------- Pointer: 0103 -------- origin ($000F64E8) dd $08000000 + text_0103 ;//-------- Text: 0103 -------- origin $000F7D14 text_0103: dd $08000000 + text_0102 + $4 db "Press ",$87," to web an enemy." dw $0000 ;//-------- Pointer: 0104 -------- origin ($000F64EC) dd $08000000 + text_0104 ;//-------- Text: 0104 -------- origin $000F7D34 text_0104: dd $08000000 + text_0103 + $4 db "Goblin! He must have had something to do with that bomb. I need to stop him before he does more damage!" dw $0000 ;//-------- Pointer: 0105 -------- origin ($000F64F0) dd $08000000 + text_0105 ;//-------- Text: 0105 -------- origin $000F7DA0 text_0105: dd $08000000 + text_0104 + $4 db "There's Goblin! Time to stop him." dw $0000 ;//-------- Pointer: 0106 -------- origin ($000F64F4) dd $08000000 + text_0106 ;//-------- Text: 0106 -------- origin $000F7DC8 text_0106: dd $08000000 + text_0105 + $4 db "Try to kick Goblin off his board!" dw $0000 ;//-------- Pointer: 0107 -------- origin ($000F64F8) dd $08000000 + text_0107 ;//-------- Text: 0107 -------- origin $000F7DF0 text_0107: dd $08000000 + text_0106 + $4 db "Goblin got away!" dw $0000 ;//-------- Pointer: 0108 -------- origin ($000F64FC) dd $08000000 + text_0108 ;//-------- Text: 0108 -------- origin $000F7E08 text_0108: dd $08000000 + text_0107 + $4 db "While in the black suit, press and hold ",$87," to Web Uppercut an enemy." dw $0000 ;//-------- Pointer: 0109 -------- origin ($000F6500) dd $08000000 + text_0109 ;//-------- Text: 0109 -------- origin $000F7E50 text_0109: dd $08000000 + text_0108 + $4 db "The floor has collapsed." dw $0000 ;//-------- Pointer: 0110 -------- origin ($000F6504) dd $08000000 + text_0110 ;//-------- Text: 0110 -------- origin $000F7E70 text_0110: dd $08000000 + text_0109 + $4 db "You didn't get there in time." dw $0000 ;//-------- Pointer: 0111 -------- origin ($000F6508) dd $08000000 + text_0111 ;//-------- Text: 0111 -------- origin $000F7E94 text_0111: dd $08000000 + text_0110 + $4 db "Get to the next area and rescue the civilians." dw $0000 ;//-------- Pointer: 0112 -------- origin ($000F650C) dd $08000000 + text_0112 ;//-------- Text: 0112 -------- origin $000F7EC8 text_0112: dd $08000000 + text_0111 + $4 db "You didn't get out in time." dw $0000 ;//-------- Pointer: 0113 -------- origin ($000F6510) dd $08000000 + text_0113 ;//-------- Text: 0113 -------- origin $000F7EE8 text_0113: dd $08000000 + text_0112 + $4 db "If Spider-Man's purple Rage Meter gets full, he gets the black suit." dw $0000 ;//-------- Pointer: 0114 -------- origin ($000F6514) dd $08000000 + text_0114 ;//-------- Text: 0114 -------- origin $000F7F34 text_0114: dd $08000000 + text_0113 + $4 db "Some walls can only be broken while you're wearing the black suit." dw $0000 ;//-------- Pointer: 0115 -------- origin ($000F6518) dd $08000000 + text_0115 ;//-------- Text: 0115 -------- origin $000F7F7C text_0115: dd $08000000 + text_0114 + $4 db "I feel so much stronger..." dw $0000 ;//-------- Pointer: 0116 -------- origin ($000F651C) dd $08000000 + text_0116 ;//-------- Text: 0116 -------- origin $000F7F9C text_0116: dd $08000000 + text_0115 + $4 db "Collect Web Power-Ups to increase web time." dw $0000 ;//-------- Pointer: 0117 -------- origin ($000F6520) dd $08000000 + text_0117 ;//-------- Text: 0117 -------- origin $000F7FCC text_0117: dd $08000000 + text_0116 + $4 db "Collect Damage Power-Ups to increase damage!" dw $0000 ;//-------- Pointer: 0118 -------- origin ($000F6524) dd $08000000 + text_0118 ;//-------- Text: 0118 -------- origin $000F8000 text_0118: dd $08000000 + text_0117 + $4 db "If you get hit, you lose the black suit, but your health will be full again." dw $0000 ;//-------- Pointer: 0119 -------- origin ($000F6528) dd $08000000 + text_0119 ;//-------- Text: 0119 -------- origin $000F8054 text_0119: dd $08000000 + text_0118 + $4 db "To save a civilian, HOLD ",$87," to attach web, then press +Control Pad backwards to pull." dw $0000 ;//-------- Pointer: 0120 -------- origin ($000F652C) dd $08000000 + text_0120 ;//-------- Text: 0120 -------- origin $000F80B0 text_0120: dd $08000000 + text_0119 + $4 dd $08000000 + text_0049 + $4 db "Need to find a way up!" dw $0000 ;//-------- Pointer: 0121 -------- origin ($000F6530) dd $08000000 + text_0120 + $4 ;//-------- Pointer: 0122 -------- origin ($000F6534) dd $08000000 + text_0122 ;//-------- Text: 0122 -------- origin $000F80D0 text_0122: dd $08000000 + text_0120 + $8 db "I bet Electro can be overloaded and blown like a fuse." dw $0000 ;//-------- Pointer: 0123 -------- origin ($000F6538) dd $08000000 + text_0123 ;//-------- Text: 0123 -------- origin $000F810C text_0123: dd $08000000 + text_0122 + $4 db "I could knock him into this generator to overload him!" dw $0000 ;//-------- Pointer: 0124 -------- origin ($000F653C) dd $08000000 + text_0124 ;//-------- Text: 0124 -------- origin $000F8148 text_0124: dd $08000000 + text_0123 + $4 db "I need to web all the surveillance cameras so I can sneak into Kingpin's office." dw $0000 ;//-------- Pointer: 0125 -------- origin ($000F6540) dd $08000000 + text_0125 ;//-------- Text: 0125 -------- origin $000F81A0 text_0125: dd $08000000 + text_0124 + $4 db "By HOLDING ",$86," while attacking, Spider-Man will use kick attacks." dw $0000 ;//-------- Pointer: 0126 -------- origin ($000F6544) dd $08000000 + text_0126 ;//-------- Text: 0126 -------- origin $000F81E4 text_0126: dd $08000000 + text_0125 + $4 db "If you press ",$80," while HOLDING ",$86," and " db "+Control Pad backwards, you can perform a backward dodge." dw $0000 ;//-------- Pointer: 0127 -------- origin ($000F6548) dd $08000000 + text_0127 ;//-------- Text: 0127 -------- origin $000F8248 text_0127: dd $08000000 + text_0126 + $4 db "If you press ",$80," while HOLDING ",$86," and ",$83," , you can perform a forward roll." dw $0000 ;//-------- Pointer: 0128 -------- origin ($000F654C) dd $08000000 + text_0128 ;//-------- Text: 0128 -------- origin $000F8294 text_0128: dd $08000000 + text_0127 + $4 db "If you press ",$80," while HOLDING ",$86," and " db "+Control Pad forwards, you can perform a forward dash." dw $0000 ;//-------- Pointer: 0129 -------- origin ($000F6550) dd $08000000 + text_0129 ;//-------- Text: 0129 -------- origin $000F82F4 text_0129: dd $08000000 + text_0128 + $4 db "To perform a powerful dash while in the black suit, quickly tap +Control Pad forward twice." dw $0000 ;//-------- Pointer: 0130 -------- origin ($000F6554) dd $08000000 + text_0130 ;//-------- Text: 0130 -------- origin $000F8354 text_0130: dd $08000000 + text_0129 + $4 db "Wonder what's down there?" dw $0000 ;//-------- Pointer: 0131 -------- origin ($000F6558) dd $08000000 + text_0131 ;//-------- Text: 0131 -------- origin $000F8374 text_0131: dd $08000000 + text_0130 + $4 dd $08000000 + text_0107 + $4 db "SPIDER-MAN: Let's see if you've got a glass jaw. Get it? Because, you know, glass is made of sand, and -- hey, where'd you go?" dw $0000 ;//-------- Pointer: 0132 -------- origin ($000F655C) dd $08000000 + text_0131 + 4 ;//-------- Pointer: 0133 -------- origin ($000F6560) dd $08000000 + text_0133 ;//-------- Text: 0133 -------- origin $000F83FC text_0133: dd $08000000 + text_0131 + $8 db "SANDMAN: Keep talkin', bug-man!" dw $0000 ;//-------- Pointer: 0134 -------- origin ($000F6564) dd $08000000 + text_0134 ;//-------- Text: 0134 -------- origin $000F8420 text_0134: dd $08000000 + text_0133 + $4 db "Use Web Posts to Web Pull Spider-Man up!" dw $0000 ;//-------- Pointer: 0135 -------- origin ($000F6568) dd $08000000 + text_0135 ;//-------- Text: 0135 -------- origin $000F8450 text_0135: dd $08000000 + text_0134 + $4 db "Look out for the train!" dw $0000 ;//-------- Pointer: 0136 -------- origin ($000F656C) dd $08000000 + text_0136 ;//-------- Text: 0136 -------- origin $000F846C text_0136: dd $08000000 + text_0135 + $4 db "Press ",$81," to attack the sand wall!" dw $0000 ;//-------- Pointer: 0137 -------- origin ($000F6570) dd $08000000 + text_0137 ;//-------- Text: 0137 -------- origin $000F8494 text_0137: dd $08000000 + text_0136 + $4 db "Sandman cannot be defeated! Run!" dw $0000 ;//-------- Pointer: 0138 -------- origin ($000F6574) dd $08000000 + text_0138 ;//-------- Text: 0138 -------- origin $000F84BC text_0138: dd $08000000 + text_0137 + $4 db "Close, but no salami!" dw $0000 ;//-------- Pointer: 0139 -------- origin ($000F6578) dd $08000000 + text_0139 ;//-------- Text: 0139 -------- origin $000F84D8 text_0139: dd $08000000 + text_0138 + $4 db "What's with all these blades?" dw $0000 ;//-------- Pointer: 0140 -------- origin ($000F657C) dd $08000000 + text_0140 ;//-------- Text: 0140 -------- origin $000F84FC text_0140: dd $08000000 + text_0139 + $4 db "I'm Freeeeee Fallin!" dw $0000 ;//-------- Pointer: 0141 -------- origin ($000F6580) dd $08000000 + text_0141 ;//-------- Text: 0141 -------- origin $000F8518 text_0141: dd $08000000 + text_0140 + $4 db "Rabbit tracks?" dw $0000 ;//-------- Pointer: 0142 -------- origin ($000F6584) dd $08000000 + text_0142 ;//-------- Text: 0142 -------- origin $000F852C text_0142: dd $08000000 + text_0141 + $4 db "Bear tracks?" dw $0000 ;//-------- Pointer: 0143 -------- origin ($000F6588) dd $08000000 + text_0143 ;//-------- Text: 0143 -------- origin $000F8540 text_0143: dd $08000000 + text_0142 + $4 db "Train tracks?!" dw $0000 ;//-------- Pointer: 0144 -------- origin ($000F658C) dd $08000000 + text_0144 ;//-------- Text: 0144 -------- origin $000F8554 text_0144: dd $08000000 + text_0143 + $4 db "I can't let Sandman out of my sight!" dw $0000 ;//-------- Pointer: 0145 -------- origin ($000F6590) dd $08000000 + text_0145 ;//-------- Text: 0145 -------- origin $000F8580 text_0145: dd $08000000 + text_0144 + $4 db "Oh no, Sandman can go through walls! I need to find another way!" dw $0000 ;//-------- Pointer: 0146 -------- origin ($000F6594) dd $08000000 + text_0146 ;//-------- Text: 0146 -------- origin $000F85C8 text_0146: dd $08000000 + text_0145 + $4 db "Need to find another way!" dw $0000 ;//-------- Pointer: 0147 -------- origin ($000F6598) dd $08000000 + text_0147 ;//-------- Text: 0147 -------- origin $000F85E8 text_0147: dd $08000000 + text_0146 + $4 db "Come and get me, webhead!" dw $0000 ;//-------- Pointer: 0148 -------- origin ($000F659C) dd $08000000 + text_0148 ;//-------- Text: 0148 -------- origin $000F8608 text_0148: dd $08000000 + text_0147 + $4 db "Almost there!" dw $0000 ;//-------- Pointer: 0149 -------- origin ($000F65A0) dd $08000000 + text_0149 ;//-------- Text: 0149 -------- origin $000F861C text_0149: dd $08000000 + text_0148 + $4 db "Sandman got away!" dw $0000 ;//-------- Pointer: 0150 -------- origin ($000F65A4) dd $08000000 + text_0150 ;//-------- Text: 0150 -------- origin $000F8634 text_0150: dd $08000000 + text_0149 + $4 db "Time to die, Spider-Man!" dw $0000 ;//-------- Pointer: 0151 -------- origin ($000F65A8) dd $08000000 + text_0151 ;//-------- Text: 0151 -------- origin $000F8654 text_0151: dd $08000000 + text_0150 + $4 db "Another sand wall?!" dw $0000 ;//-------- Pointer: 0152 -------- origin ($000F65AC) dd $08000000 + text_0152 ;//-------- Text: 0152 -------- origin $000F866C text_0152: dd $08000000 + text_0151 + $4 db "I think I need more water." dw $0000 ;//-------- Pointer: 0153 -------- origin ($000F65B0) dd $08000000 + text_0153 ;//-------- Text: 0153 -------- origin $000F868C text_0153: dd $08000000 + text_0152 + $4 db "Need to find a way to defeat Sandman!" dw $0000 ;//-------- Pointer: 0154 -------- origin ($000F65B4) dd $08000000 + text_0154 ;//-------- Text: 0154 -------- origin $000F86B8 text_0154: dd $08000000 + text_0153 + $4 db "I could use this valve to turn on the water!" dw $0000 ;//-------- Pointer: 0155 -------- origin ($000F65B8) dd $08000000 + text_0155 ;//-------- Text: 0155 -------- origin $000F86EC text_0155: dd $08000000 + text_0154 + $4 db "I bet THIS is enough water to defeat Sandman! Just need to hit that switch..." dw $0000 ;//-------- Pointer: 0156 -------- origin ($000F65BC) dd $08000000 + text_0156 ;//-------- Text: 0156 -------- origin $000F8740 text_0156: dd $08000000 + text_0155 + $4 db "Nothing like a good flush!" dw $0000 ;//-------- Pointer: 0157 -------- origin ($000F65C0) dd $08000000 + text_0157 ;//-------- Text: 0157 -------- origin $000F8760 text_0157: dd $08000000 + text_0156 + $4 db "Need to get the door open!" dw $0000 ;//-------- Pointer: 0158 -------- origin ($000F65C4) dd $08000000 + text_0158 ;//-------- Text: 0158 -------- origin $000F8780 text_0158: dd $08000000 + text_0157 + $4 db "This text will explain why Spidey finds himself in the Chemical Factory" dw $0000 ;//-------- Pointer: 0159 -------- origin ($000F65C8) dd $08000000 + text_0159 ;//-------- Text: 0159 -------- origin $000F87CC text_0159: dd $08000000 + text_0158 + $4 db "Try to get a rocket to hit this window!" dw $0000 ;//-------- Pointer: 0160 -------- origin ($000F65CC) dd $08000000 + text_0160 ;//-------- Text: 0160 -------- origin $000F87F8 text_0160: dd $08000000 + text_0159 + $4 db "Try to web the bomb in his hand!" dw $0000 ;//-------- Pointer: 0161 -------- origin ($000F65D0) dd $08000000 + text_0161 ;//-------- Text: 0161 -------- origin $000F8820 text_0161: dd $08000000 + text_0160 + $4 db "Try the rocket again?" dw $0000 ;//-------- Pointer: 0162 -------- origin ($000F65D4) dd $08000000 + text_0162 ;//-------- Text: 0162 -------- origin $000F883C text_0162: dd $08000000 + text_0161 + $4 db "Mad Bomber! I need to take this goon down!" dw $0000 ;//-------- Pointer: 0163 -------- origin ($000F65D8) dd $08000000 + text_0163 ;//-------- Text: 0163 -------- origin $000F886C text_0163: dd $08000000 + text_0162 + $4 db "The limo got away!" dw $0000 ;//-------- Pointer: 0164 -------- origin ($000F65DC) dd $08000000 + text_0164 ;//-------- Text: 0164 -------- origin $000F8884 text_0164: dd $08000000 + text_0163 + $4 db "Okay, fat man, now's the time when you make like Santa and give me what I want." dw $0000 ;//-------- Pointer: 0165 -------- origin ($000F65E0) dd $08000000 + text_0165 ;//-------- Text: 0165 -------- origin $000F88D8 text_0165: dd $08000000 + text_0164 + $4 db "And what is it that you want? As you broke into my home like a common burglar, I assume you're after the jewelry and electronics?" dw $0000 ;//-------- Pointer: 0166 -------- origin ($000F65E4) dd $08000000 + text_0166 ;//-------- Text: 0166 -------- origin $000F8960 text_0166: dd $08000000 + text_0165 + $4 db "I want the Assistant D.A. back, unharmed. And I want your goon Electro, preferably harmed." dw $0000 ;//-------- Pointer: 0167 -------- origin ($000F65E8) dd $08000000 + text_0167 ;//-------- Text: 0167 -------- origin $000F89C0 text_0167: dd $08000000 + text_0166 + $4 db "Electro had a few questions for our city's esteemed prosecutor. As you can imagine, my friend can be quite persuasive. I believe you'll find them both at the construction site for my new Fisk Tower building. " dw $0000 ;//-------- Pointer: 0168 -------- origin ($000F65EC) dd $08000000 + text_0168 ;//-------- Text: 0168 -------- origin $000F8A98 text_0168: dd $08000000 + text_0167 + $4 db "Just like that, huh? What's the catch?" dw $0000 ;//-------- Pointer: 0169 -------- origin ($000F65F0) dd $08000000 + text_0169 ;//-------- Text: 0169 -------- origin $000F8AC4 text_0169: dd $08000000 + text_0168 + $4 db "I can't imagine what you're talking about. And considering I'm sitting here calmly discussing this with a trespasser, I believe you should consider yourself lucky I'm not simply calling the police on you." dw $0000 ;//-------- Pointer: 0170 -------- origin ($000F65F4) dd $08000000 + text_0170 ;//-------- Text: 0170 -------- origin $000F8B98 text_0170: dd $08000000 + text_0169 + $4 db "One of these days, Fisk, I'll trip you up. I just hope when I do, there's no one within 20 yards who might get crushed." dw $0000 ;//-------- Pointer: 0171 -------- origin ($000F65F8) dd $08000000 + text_0171 ;//-------- Text: 0171 -------- origin $000F8C14 text_0171: dd $08000000 + text_0170 + $4 db "This switch might help somehow!" dw $0000 ;//-------- Pointer: 0172 -------- origin ($000F65FC) dd $08000000 + text_0172 ;//-------- Text: 0172 -------- origin $000F8C38 text_0172: dd $08000000 + text_0171 + $4 db "Venom is getting away!" dw $0000 ;//-------- Pointer: 0173 -------- origin ($000F6600) dd $08000000 + text_0173 ;//-------- Text: 0173 -------- origin $000F8C54 text_0173: dd $08000000 + text_0172 + $4 db "Good thing this is here!" dw $0000 ;//-------- Pointer: 0174 -------- origin ($000F6604) dd $08000000 + text_0174 ;//-------- Text: 0174 -------- origin $000F8C74 text_0174: dd $08000000 + text_0173 + $4 db "This wall could be the key!" dw $0000 ;//-------- Pointer: 0175 -------- origin ($000F6608) dd $08000000 + text_0175 ;//-------- Text: 0175 -------- origin $000F8C94 text_0175: dd $08000000 + text_0174 + $4 db "I have to find Venom's weakness!" dw $0000 ;//-------- Pointer: 0176 -------- origin ($000F660C) dd $08000000 + text_0176 ;//-------- Text: 0176 -------- origin $000F8CBC text_0176: dd $08000000 + text_0175 + $4 db "Venom can be stunned by noise!" dw $0000 ;//-------- Pointer: 0177 -------- origin ($000F6610) dd $08000000 + text_0177 ;//-------- Text: 0177 -------- origin $000F8CE0 text_0177: dd $08000000 + text_0176 + $4 db "Last level! Now it's time for Venom's fall!" dw $0000 ;//-------- Pointer: 0178 -------- origin ($000F6614) dd $08000000 + text_0178 ;//-------- Text: 0178 -------- origin $000F8D10 text_0178: dd $08000000 + text_0177 + $4 db "Placeholder , text undetermined at this time." dw $0000 ;//-------- Pointer: 0179 -------- origin ($000F6618) dd $08000000 + text_0179 ;//-------- Text: 0179 -------- origin $000F8D44 text_0179: dd $08000000 + text_0178 + $4 db "REWARD! WEB PULL" db " press SELECT" dw $0000 ;//-------- Pointer: 0180 -------- origin ($000F661C) dd $08000000 + text_0180 ;//-------- Text: 0180 -------- origin $000F8D70 text_0180: dd $08000000 + text_0179 + $4 db "REWARD! AREA ATTACKS" db " press SELECT" dw $0000 ;//-------- Pointer: 0181 -------- origin ($000F6620) dd $08000000 + text_0181 ;//-------- Text: 0181 -------- origin $000F8DA0 text_0181: dd $08000000 + text_0180 + $4 db "REWARD! UPPERCUTS" db " press SELECT" dw $0000 ;//-------- Pointer: 0182 -------- origin ($000F6624) dd $08000000 + text_0182 ;//-------- Text: 0182 -------- origin $000F8DCC text_0182: dd $08000000 + text_0181 + $4 db "REWARD! THE BLACK SUIT" db " press SELECT" dw $0000 ;//-------- Pointer: 0183 -------- origin ($000F6628) dd $08000000 + text_0183 ;//-------- Text: 0183 -------- origin $000F8E00 text_0183: dd $08000000 + text_0182 + $4 db "You opened the door." dw $0000 ;//-------- Pointer: 0184 -------- origin ($000F662C) dd $08000000 + text_0184 ;//-------- Text: 0184 -------- origin $000F8E1C text_0184: dd $08000000 + text_0183 + $4 db "Electric Barrier Off" dw $0000 ;//-------- Pointer: 0185 -------- origin ($000F6630) dd $08000000 + text_0185 ;//-------- Text: 0185 -------- origin $000F8E38 text_0185: dd $08000000 + text_0184 + $4 db "Was that Stan the Man I just saw?" dw $0000 ;//-------- Pointer: 0186 -------- origin ($000F6634) dd $08000000 + text_0186 ;//-------- Text: 0186 -------- origin $000F8E60 text_0186: dd $08000000 + text_0185 + $4 db "It's just your friendly neighborhood Spider-Man." dw $0000 ;//-------- Pointer: 0187 -------- origin ($000F6638) dd $08000000 + text_0187 ;//-------- Text: 0187 -------- origin $000F8E98 text_0187: dd $08000000 + text_0186 + $4 db "I love my job." dw $0000 ;//-------- Pointer: 0188 -------- origin ($000F663C) dd $08000000 + text_0188 ;//-------- Text: 0188 -------- origin $000F8EAC text_0188: dd $08000000 + text_0187 + $4 db "Up, up, and a WEB!" dw $0000 ;//-------- Pointer: 0189 -------- origin ($000F6640) dd $08000000 + text_0189 ;//-------- Text: 0189 -------- origin $000F8EC4 text_0189: dd $08000000 + text_0188 + $4 db "Must be hero time!" dw $0000 ;//-------- Pointer: 0190 -------- origin ($000F6644) dd $08000000 + text_0190 ;//-------- Text: 0190 -------- origin $000F8EDC text_0190: dd $08000000 + text_0189 + $4 db "My fists are getting sore from so much punching..." dw $0000 ;//-------- Pointer: 0191 -------- origin ($000F6648) dd $08000000 + text_0191 ;//-------- Text: 0191 -------- origin $000F8F14 text_0191: dd $08000000 + text_0190 + $4 db "Maybe I should take up knitting..." dw $0000 ;//-------- Pointer: 0192 -------- origin ($000F664C) dd $08000000 + text_0192 ;//-------- Text: 0192 -------- origin $000F8F3C text_0192: dd $08000000 + text_0191 + $4 db "Do I look fat in these tights?" dw $0000 ;//-------- Pointer: 0193 -------- origin ($000F6650) dd $08000000 + text_0193 ;//-------- Text: 0193 -------- origin $000F8F60 text_0193: dd $08000000 + text_0192 + $4 db "These punks have issues." dw $0000 ;//-------- Pointer: 0194 -------- origin ($000F6654) dd $08000000 + text_0194 ;//-------- Text: 0194 -------- origin $000F8F80 text_0194: dd $08000000 + text_0193 + $4 db "Only in New York..." dw $0000 ;//-------- Pointer: 0195 -------- origin ($000F6658) dd $08000000 + text_0195 ;//-------- Text: 0195 -------- origin $000F8F98 text_0195: dd $08000000 + text_0194 + $4 db "Thugs R Us must have had a clearance sale." dw $0000 ;//-------- Pointer: 0196 -------- origin ($000F665C) dd $08000000 + text_0196 ;//-------- Text: 0196 -------- origin $000F8FC8 text_0196: dd $08000000 + text_0195 + $4 db "Are we having fun yet?" dw $0000 ;//-------- Pointer: 0197 -------- origin ($000F6660) dd $08000000 + text_0197 ;//-------- Text: 0197 -------- origin $000F8FE4 text_0197: dd $08000000 + text_0196 + $4 db "Whew! I need a sidekick or something." dw $0000 ;//-------- Pointer: 0198 -------- origin ($000F6664) dd $08000000 + text_0198 ;//-------- Text: 0198 -------- origin $000F9010 text_0198: dd $08000000 + text_0197 + $4 db "Never a dull moment..." dw $0000 ;//-------- Pointer: 0199 -------- origin ($000F6668) dd $08000000 + text_0199 ;//-------- Text: 0199 -------- origin $000F902C text_0199: dd $08000000 + text_0198 + $4 db "I need pockets in this suit!" dw $0000 ;//-------- Pointer: 0200 -------- origin ($000F666C) dd $08000000 + text_0200 ;//-------- Text: 0200 -------- origin $000F9050 text_0200: dd $08000000 + text_0199 + $4 db "It's all fun and games 'til someone gets hurt." dw $0000 ;//-------- Pointer: 0201 -------- origin ($000F6670) dd $08000000 + text_0201 ;//-------- Text: 0201 -------- origin $000F9084 text_0201: dd $08000000 + text_0200 + $4 db "Super heroes need hugs too!" dw $0000 ;//-------- Pointer: 0202 -------- origin ($000F6674) dd $08000000 + text_0202 ;//-------- Text: 0202 -------- origin $000F90A4 text_0202: dd $08000000 + text_0201 + $4 db "I smell apple pie!" dw $0000 ;//-------- Pointer: 0203 -------- origin ($000F6678) dd $08000000 + text_0203 ;//-------- Text: 0203 -------- origin $000F90BC text_0203: dd $08000000 + text_0202 + $4 db "Thought I heard a bat..." dw $0000 ;//-------- Pointer: 0204 -------- origin ($000F667C) dd $08000000 + text_0204 ;//-------- Text: 0204 -------- origin $000F90DC text_0204: dd $08000000 + text_0203 + $4 db "Haven't these guys heard of breath mints?" dw $0000 ;//-------- Pointer: 0205 -------- origin ($000F6680) dd $08000000 + text_0205 ;//-------- Text: 0205 -------- origin $000F910C text_0205: dd $08000000 + text_0204 + $4 db "When this is all over I'm getting myself a nice pizza." dw $0000 ;//-------- Pointer: 0206 -------- origin ($000F6684) dd $08000000 + text_0206 ;//-------- Text: 0206 -------- origin $000F9148 text_0206: dd $08000000 + text_0205 + $4 dd $08000000 + text_0198 + $4 db "When will these guys learn?" dw $0000 ;//-------- Pointer: 0207 -------- origin ($000F6688) dd $08000000 + text_0206 + $4 ;//-------- Pointer: 0208 -------- origin ($000F668C) dd $08000000 + text_0208 ;//-------- Text: 0208 -------- origin $000F916C text_0208: dd $08000000 + text_0206 + $8 db "Here I come to save the day!" dw $0000 ;//-------- Pointer: 0209 -------- origin ($000F6690) dd $08000000 + text_0209 ;//-------- Text: 0209 -------- origin $000F9190 text_0209: dd $08000000 + text_0208 + $4 db "I bet Captain America doesn't have days like this." dw $0000 ;//-------- Pointer: 0210 -------- origin ($000F6694) dd $08000000 + text_0210 ;//-------- Text: 0210 -------- origin $000F91C8 text_0210: dd $08000000 + text_0209 + $4 db "Something stinks here, and it isn't me." dw $0000 ;//-------- Pointer: 0211 -------- origin ($000F6698) dd $08000000 + text_0211 ;//-------- Text: 0211 -------- origin $000F91F4 text_0211: dd $08000000 + text_0210 + $4 db "Why must we fight?" dw $0000 ;//-------- Pointer: 0212 -------- origin ($000F669C) dd $08000000 + text_0212 ;//-------- Text: 0212 -------- origin $000F920C text_0212: dd $08000000 + text_0211 + $4 db "Fun and games..." dw $0000 ;//-------- Pointer: 0213 -------- origin ($000F66A0) dd $08000000 + text_0213 ;//-------- Text: 0213 -------- origin $000F9224 text_0213: dd $08000000 + text_0212 + $4 db "My feet hurt!" dw $0000 ;//-------- Pointer: 0214 -------- origin ($000F66A4) dd $08000000 + text_0214 ;//-------- Text: 0214 -------- origin $000F9238 text_0214: dd $08000000 + text_0213 + $4 db "You'll shoot your eye out!" dw $0000 ;//-------- Pointer: 0215 -------- origin ($000F66A8) dd $08000000 + text_0215 ;//-------- Text: 0215 -------- origin $000F9258 text_0215: dd $08000000 + text_0214 + $4 db "Look, there's Spider-Man!" dw $0000 ;//-------- Pointer: 0216 -------- origin ($000F66AC) dd $08000000 + text_0216 ;//-------- Text: 0216 -------- origin $000F9278 text_0216: dd $08000000 + text_0215 + $4 db "Let's get him!" dw $0000 ;//-------- Pointer: 0217 -------- origin ($000F66B0) dd $08000000 + text_0217 ;//-------- Text: 0217 -------- origin $000F928C text_0217: dd $08000000 + text_0216 + $4 db "Spider-Man, you're goin' down!" dw $0000 ;//-------- Pointer: 0218 -------- origin ($000F66B4) dd $08000000 + text_0218 ;//-------- Text: 0218 -------- origin $000F92B0 text_0218: dd $08000000 + text_0217 + $4 db "Get him!" dw $0000 ;//-------- Pointer: 0219 -------- origin ($000F66B8) dd $08000000 + text_0219 ;//-------- Text: 0219 -------- origin $000F92C0 text_0219: dd $08000000 + text_0218 + $4 db "Squash that bug!" dw $0000 ;//-------- Pointer: 0220 -------- origin ($000F66BC) dd $08000000 + text_0220 ;//-------- Text: 0220 -------- origin $000F92D8 text_0220: dd $08000000 + text_0219 + $4 db "You're dead, bug-man!" dw $0000 ;//-------- Pointer: 0221 -------- origin ($000F66C0) dd $08000000 + text_0221 ;//-------- Text: 0221 -------- origin $000F92F4 text_0221: dd $08000000 + text_0220 + $4 db "Webhead, you're dead!" dw $0000 ;//-------- Pointer: 0222 -------- origin ($000F66C4) dd $08000000 + text_0222 ;//-------- Text: 0222 -------- origin $000F9310 text_0222: dd $08000000 + text_0221 + $4 db "Eat this, webhead!" dw $0000 ;//-------- Pointer: 0223 -------- origin ($000F66C8) dd $08000000 + text_0223 ;//-------- Text: 0223 -------- origin $000F9328 text_0223: dd $08000000 + text_0222 + $4 db "There he is!" dw $0000 ;//-------- Pointer: 0224 -------- origin ($000F66CC) dd $08000000 + text_0224 ;//-------- Text: 0224 -------- origin $000F933C text_0224: dd $08000000 + text_0223 + $4 db "Surround him!" dw $0000 ;//-------- Pointer: 0225 -------- origin ($000F66D0) dd $08000000 + text_0225 ;//-------- Text: 0225 -------- origin $000F9350 text_0225: dd $08000000 + text_0224 + $4 db "Gonna mess you up!" dw $0000 ;//-------- Pointer: 0226 -------- origin ($000F66D4) dd $08000000 + text_0226 ;//-------- Text: 0226 -------- origin $000F9368 text_0226: dd $08000000 + text_0225 + $4 db "Now you're dead!" dw $0000 ;//-------- Pointer: 0227 -------- origin ($000F66D8) dd $08000000 + text_0227 ;//-------- Text: 0227 -------- origin $000F9380 text_0227: dd $08000000 + text_0226 + $4 db "You're toast!" dw $0000 ;//-------- Pointer: 0228 -------- origin ($000F66DC) dd $08000000 + text_0228 ;//-------- Text: 0228 -------- origin $000F9394 text_0228: dd $08000000 + text_0227 + $4 db "Take him out!" dw $0000 ;//-------- Pointer: 0229 -------- origin ($000F66E0) dd $08000000 + text_0229 ;//-------- Text: 0229 -------- origin $000F93A8 text_0229: dd $08000000 + text_0228 + $4 db "Die, Spider-Man!" dw $0000 ;//-------- Pointer: 0230 -------- origin ($000F66E4) dd $08000000 + text_0230 ;//-------- Text: 0230 -------- origin $000F93C0 text_0230: dd $08000000 + text_0229 + $4 db "End of the line, hero!" dw $0000 ;//-------- Pointer: 0231 -------- origin ($000F66E8) dd $08000000 + text_0231 ;//-------- Text: 0231 -------- origin $000F93DC text_0231: dd $08000000 + text_0230 + $4 db "C'mere, tights!" dw $0000 ;//-------- Pointer: 0232 -------- origin ($000F66EC) dd $08000000 + text_0232 ;//-------- Text: 0232 -------- origin $000F93F0 text_0232: dd $08000000 + text_0231 + $4 db "You gonna die, Spidey!" dw $0000 ;//-------- Pointer: 0233 -------- origin ($000F66F0) dd $08000000 + text_0233 ;//-------- Text: 0233 -------- origin $000F940C text_0233: dd $08000000 + text_0232 + $4 db "Lights out, wall-crawler!" dw $0000 ;//-------- Pointer: 0234 -------- origin ($000F66F4) dd $08000000 + text_0234 ;//-------- Text: 0234 -------- origin $000F942C text_0234: dd $08000000 + text_0233 + $4 db "Take it, hero!" dw $0000 ;//-------- Pointer: 0235 -------- origin ($000F66F8) dd $08000000 + text_0235 ;//-------- Text: 0235 -------- origin $000F9440 text_0235: dd $08000000 + text_0234 + $4 db "Take him down!" dw $0000 ;//-------- Pointer: 0236 -------- origin ($000F66FC) dd $08000000 + text_0236 ;//-------- Text: 0236 -------- origin $000F9454 text_0236: dd $08000000 + text_0235 + $4 db "You can't win!" dw $0000 ;//-------- Pointer: 0237 -------- origin ($000F6700) dd $08000000 + text_0237 ;//-------- Text: 0237 -------- origin $000F9468 text_0237: dd $08000000 + text_0236 + $4 db "Nice guys finish dead!" dw $0000 ;//-------- Pointer: 0238 -------- origin ($000F6704) dd $08000000 + text_0238 ;//-------- Text: 0238 -------- origin $000F9484 text_0238: dd $08000000 + text_0237 + $4 db "We got you now!" dw $0000 ;//-------- Pointer: 0239 -------- origin ($000F6708) dd $08000000 + text_0239 ;//-------- Text: 0239 -------- origin $000F9498 text_0239: dd $08000000 + text_0238 + $4 db "Now you get yours!" dw $0000 ;//-------- Pointer: 0240 -------- origin ($000F670C) dd $08000000 + text_0240 ;//-------- Text: 0240 -------- origin $000F94B0 text_0240: dd $08000000 + text_0239 + $4 db "He's all mine." dw $0000 ;//-------- Pointer: 0241 -------- origin ($000F6710) dd $08000000 + text_0241 ;//-------- Text: 0241 -------- origin $000F94C4 text_0241: dd $08000000 + text_0240 + $4 db "Your swinging days are over!" dw $0000 ;//-------- Pointer: 0242 -------- origin ($000F6714) dd $08000000 + text_0242 ;//-------- Text: 0242 -------- origin $000F94E8 text_0242: dd $08000000 + text_0241 + $4 db "Time to die!" dw $0000 ;//-------- Pointer: 0243 -------- origin ($000F6718) dd $08000000 + text_0243 ;//-------- Text: 0243 -------- origin $000F94FC text_0243: dd $08000000 + text_0242 + $4 db "Crush him!" dw $0000 ;//-------- Pointer: 0244 -------- origin ($000F671C) dd $08000000 + text_0244 ;//-------- Text: 0244 -------- origin $000F950C text_0244: dd $08000000 + text_0243 + $4 db "Now we've got you!" dw $0000 ;//-------- Pointer: 0245 -------- origin ($000F6720) dd $08000000 + text_0245 ;//-------- Text: 0245 -------- origin $000F9524 text_0245: dd $08000000 + text_0244 + $4 db "Not a bad find." dw $0000 ;//-------- Pointer: 0246 -------- origin ($000F6724) dd $08000000 + text_0246 ;//-------- Text: 0246 -------- origin $000F9538 text_0246: dd $08000000 + text_0245 + $4 db "Now who's gonna pay for that?" dw $0000 ;//-------- Pointer: 0247 -------- origin ($000F6728) dd $08000000 + text_0247 ;//-------- Text: 0247 -------- origin $000F955C text_0247: dd $08000000 + text_0246 + $4 db "Lucky no one was inside that crate!" dw $0000 ;//-------- Pointer: 0248 -------- origin ($000F672C) dd $08000000 + text_0248 ;//-------- Text: 0248 -------- origin $000F9584 text_0248: dd $08000000 + text_0247 + $4 dd $08000000 + text_0247 + $4 db "Freebies!" dw $0000 ;//-------- Pointer: 0249 -------- origin ($000F6730) dd $08000000 + text_0248 + $4 ;//-------- Pointer: 0250 -------- origin ($000F6734) dd $08000000 + text_0250 ;//-------- Text: 0250 -------- origin $000F9598 text_0250: dd $08000000 + text_0248 + $8 dd $08000000 + text_0248 + $8 dd $08000000 + text_0244 + $4 dd $08000000 + text_0244 + $4 dd $08000000 + text_0244 + $4 dd $08000000 + text_0244 + $4 db "SPIDER-MAN: Well, the city seems quiet today. Guess I can head home now --" dw $0000 ;//-------- Pointer: 0251 -------- origin ($000F6738) dd $08000000 + text_0250 + $4 ;//-------- Pointer: 0252 -------- origin ($000F673C) dd $08000000 + text_0250 + $8 ;//-------- Pointer: 0253 -------- origin ($000F6740) dd $08000000 + text_0250 + $C ;//-------- Pointer: 0254 -------- origin ($000F6744) dd $08000000 + text_0250 + $10 ;//-------- Pointer: 0255 -------- origin ($000F6748) dd $08000000 + text_0250 + $14 ;//-------- Pointer: 0256 -------- origin ($000F674C) dd $08000000 + text_0256 ;//-------- Text: 0256 -------- origin $000F95FC text_0256: dd $08000000 + text_0250 + $18 db "SPIDER-MAN: On second thought, this seems like another typical day in the life of your friendly neighborhood Spider-Man." dw $0000 ;//-------- Pointer: 0257 -------- origin ($000F6750) dd $08000000 + text_0257 ;//-------- Text: 0257 -------- origin $000F967C text_0257: dd $08000000 + text_0256 + $4 db "SPIDER-MAN: Much as I'd like to feed Electro a knuckle-and-web sandwich, bombs under the city gets priority." dw $0000 ;//-------- Pointer: 0258 -------- origin ($000F6754) dd $08000000 + text_0258 ;//-------- Text: 0258 -------- origin $000F96F0 text_0258: dd $08000000 + text_0257 + $4 db "SPIDER-MAN: With Kingpin and Electro dealt with, now I've got to deal with those bombs planted under the city! Best way to get underground will be the subway tunnels..." dw $0000 ;//-------- Pointer: 0259 -------- origin ($000F6758) dd $08000000 + text_0259 ;//-------- Text: 0259 -------- origin $000F97A0 text_0259: dd $08000000 + text_0258 + $4 db "SPIDER-MAN: If I try to keep up this pace I'm going to need a long vacation... aw geez, now what? MAD BOMBER: Attention, people of New York..." dw $0000 ;//-------- Pointer: 0260 -------- origin ($000F675C) dd $08000000 + text_0260 ;//-------- Text: 0260 -------- origin $000F9834 text_0260: dd $08000000 + text_0259 + $4 db "MAD BOMBER:...your misguided protectors have incurred my wrath, which you must now suffer. A series of explosions will soon rock Manhattan, and there is nothing even your costumed protector, Spider-Man, can do about it!" dw $0000 ;//-------- Pointer: 0261 -------- origin ($000F6760) dd $08000000 + text_0261 ;//-------- Text: 0261 -------- origin $000F9914 text_0261: dd $08000000 + text_0260 + $C dd $08000000 + text_0000 + $4 db "SPIDER-MAN: The only lead I have on the bomber is that he called Jonah personally to warn him about the first bombs. Maybe JJJ knows more about where he might be --" dw $0000 ;//-------- Pointer: 0262 -------- origin ($000F6764) dd $08000000 + text_0260 + $4 ;//-------- Pointer: 0263 -------- origin ($000F6768) dd $08000000 + text_0263 ;//-------- Text: 0263 -------- origin $000F99C4 text_0263: dd $08000000 + text_0260 + $8 db text_0000+$4,"MAD BOMBER: You see, Jonah? I'm not the kind of guy you can just hit. I hit back! JAMESON: Buddy, I don't even know who you are. MAD BOMBER: I",$92,"m Luke Carlyle! The man your rag of a newspaper tried to ruin! You got the city to investigate my company and you don",$92,"t even have the decency to remember who I am?! JAMESON: You were ripping people off! You",$92,"re a crook! My job is exposing scum like you! MAD BOMBER: You should watch your mouth..." dw $0000 ;//-------- Pointer: 0264 -------- origin ($000F676C) dd $08000000 + text_0263 + 4 ;//-------- Pointer: 0265 -------- origin ($000F6770) dd $08000000 + text_0265 ;//-------- Text: 0265 -------- origin $000F9B84 text_0265: dd $08000000 + text_0263 + $8 db "SPIDER-MAN: Yeah, right... that'll be the day! MAD BOMBER: You -- I left you to burn! SPIDER-MAN: Why, yes you did. And that wasn't very nice! Now hand over Mr. Flattop there, and just maybe I'll find it in my heart to --" dw $0000 ;//-------- Pointer: 0266 -------- origin ($000F6774) dd $08000000 + text_0266 ;//-------- Text: 0266 -------- origin $000F9C68 text_0266: dd $08000000 + text_0265 + $4 db "MAD BOMBER: No! I got what I came for, and you're not taking it away!" dw $0000 ;//-------- Pointer: 0267 -------- origin ($000F6778) dd $08000000 + text_0267 ;//-------- Text: 0267 -------- origin $000F9CB4 text_0267: dd $08000000 + text_0266 + $4 db "GUARD: Stop right there! SANDMAN: Bullets? Please." dw $0000 ;//-------- Pointer: 0268 -------- origin ($000F677C) dd $08000000 + text_0268 ;//-------- Text: 0268 -------- origin $000F9CEC text_0268: dd $08000000 + text_0267 + $4 db "SPIDER-MAN: Hmm. Catch the bad guy or save the innocents? Easy choice... " dw $0000 ;//-------- Pointer: 0269 -------- origin ($000F6780) dd $08000000 + text_0269 ;//-------- Text: 0269 -------- origin $000F9D3C text_0269: dd $08000000 + text_0268 + $4 db "SPIDER-MAN: What --?! What happened to my costume? And why do I feel... kind of... different?" dw $0000 ;//-------- Pointer: 0270 -------- origin ($000F6784) dd $08000000 + text_0270 ;//-------- Text: 0270 -------- origin $000F9DA0 text_0270: dd $08000000 + text_0269 + $4 db "SPIDER-MAN: Hmm. No time to figure it out right now... looks like some kind of gang-related incident down in the warehouse district." dw $0000 ;//-------- Pointer: 0271 -------- origin ($000F6788) dd $08000000 + text_0271 ;//-------- Text: 0271 -------- origin $000F9E2C text_0271: dd $08000000 + text_0270 + $4 db "SPIDER-MAN: Whew, between the black suit costume, mad bombers and D.A. kidnappings, I almost forgot about Sandman." dw $0000 ;//-------- Pointer: 0272 -------- origin ($000F678C) dd $08000000 + text_0272 ;//-------- Text: 0272 -------- origin $000F9EA4 text_0272: dd $08000000 + text_0271 + $4 db "SPIDER-MAN: Marko likes banks, so if I just keep patrolling them, eventually -- aha! There he is!" dw $0000 ;//-------- Pointer: 0273 -------- origin ($000F6790) dd $08000000 + text_0273 ;//-------- Text: 0273 -------- origin $000F9F0C text_0273: dd $08000000 + text_0272 + $4 db "SPIDER-MAN: I need to get this thing off me. Seems kind of stuck, though... " dw $0000 ;//-------- Pointer: 0274 -------- origin ($000F6794) dd $08000000 + text_0274 ;//-------- Text: 0274 -------- origin $000F9F60 text_0274: dd $08000000 + text_0273 + $4 db "SPIDER-MAN: Gaah! The church bells -- so loud! Wait -- the noise is driving this suit off of me! Good riddance!" dw $0000 ;//-------- Pointer: 0275 -------- origin ($000F6798) dd $08000000 + text_0275 ;//-------- Text: 0275 -------- origin $000F9FD4 text_0275: dd $08000000 + text_0274 + $4 db "BROCK: What",$92,"s wrong with me? Why am I so hated? It",$92,"s all Peter and Spider-Man",$92,"s fault",$97,"I..." dw $0000 ;//-------- Pointer: 0276 -------- origin ($000F679C) dd $08000000 + text_0276 ;//-------- Text: 0276 -------- origin $000FA034 text_0276: dd $08000000 + text_0275 + $4 db "BROCK: Aaiigh!" dw $0000 ;//-------- Pointer: 0277 -------- origin ($000F67A0) dd $08000000 + text_0277 ;//-------- Text: 0277 -------- origin $000FA048 text_0277: dd $08000000 + text_0276 + $4 db "BROCK: I -- we -- are Venom... and Spider-Man must die..." dw $0000 ;//-------- Pointer: 0278 -------- origin ($000F67A4) dd $08000000 + text_0278 ;//-------- Text: 0278 -------- origin $000FA088 text_0278: dd $08000000 + text_0277 + $4 db "SPIDER-MAN: Maybe things will start to get back to normal -- oh, no! Spider-sense! " dw $0000 ;//-------- Pointer: 0279 -------- origin ($000F67A8) dd $08000000 + text_0279 ;//-------- Text: 0279 -------- origin $000FA0E0 text_0279: dd $08000000 + text_0278 + $4 db "SPIDER-MAN: Unnh!" dw $0000 ;//-------- Pointer: 0280 -------- origin ($000F67AC) dd $08000000 + text_0280 ;//-------- Text: 0280 -------- origin $000FA0F8 text_0280: dd $08000000 + text_0279 + $4 db "SPIDER-MAN: The bomb threat will have to wait until I've dealt with Electro!" dw $0000 ;//-------- Pointer: 0281 -------- origin ($000F67B0) dd $08000000 + text_0281 ;//-------- Text: 0281 -------- origin $000FA14C text_0281: dd $08000000 + text_0280 + $4 db "SPIDER-MAN: With Carlyle in custody, now I'll need to deal with Electro causing chaos at that press conference!" dw $0000 ;//-------- Pointer: 0282 -------- origin ($000F67B4) dd $08000000 + text_0282 ;//-------- Text: 0282 -------- origin $000FA1C0 text_0282: dd $08000000 + text_0281 + $4 db "SPIDER-MAN: Lost him! Wait -- getting into that limo -- that's the Kingpin! He must have hired Electro to kidnap the Assistant D.A.! Which means he probably knows where they both are..." dw $0000 ;//-------- Pointer: 0283 -------- origin ($000F67B8) dd $08000000 + text_0283 ;//-------- Text: 0283 -------- origin $000FA280 text_0283: dd $08000000 + text_0282 + $4 db "SPIDER-MAN: Normally I don't do the 'break and enter' thing. But in the case of Wilson Fisk, who probably hired Electro to kidnap the Assistant D.A., I think I'll make a big, fat exception..." dw $0000 ;//-------- Pointer: 0284 -------- origin ($000F67BC) dd $08000000 + text_0284 ;//-------- Text: 0284 -------- origin $000FA344 text_0284: dd $08000000 + text_0283 + $4 db "SPIDER-MAN: Hey, this meeting is for press only, so I",$92,"ll have to see your credentials! ELECTRO: If you want me to leave, Spider-Man, all you had to do was ask! But before I go, how about I just eliminate you now so you don",$92,"t bother me later?" dw $0000 ;//-------- Pointer: 0285 -------- origin ($000F67C0) dd $08000000 + text_0285 ;//-------- Text: 0285 -------- origin $000FA43C text_0285: dd $08000000 + text_0284 + $4 db "ELECTRO: I",$92,"m sorry, but now I really do have to leave. I",$92,"ll just take the Assistant D.A. along with me to keep me company. So long, Spider-Man!" dw $0000 ;//-------- Pointer: 0286 -------- origin ($000F67C4) dd $08000000 + text_0286 ;//-------- Text: 0286 -------- origin $000FA4D0 text_0286: dd $08000000 + text_0285 + $4 db "SPIDER-MAN: I'll let you explain all this to the cops, Jonah. You seem to know this guy better than I do. JAMESON: Why'd you save me? Trying to trick me into changing my mind about you? 'Cause I'm not going to fall for --" dw $0000 ;//-------- Pointer: 0287 -------- origin ($000F67C8) dd $08000000 + text_0287 ;//-------- Text: 0287 -------- origin $000FA5B4 text_0287: dd $08000000 + text_0286 + $4 db "SPIDER-MAN: Save it, Jonah. I'm pretty sure that door over there is locked, so you should probably be focusing your energy on finding a way down from this roof. Oh, and watch out for the holes in the floor. Have a nice day! JAMESON: Why, you --!" dw $0000 ;//-------- Pointer: 0288 -------- origin ($000F67CC) dd $08000000 + text_0288 ;//-------- Text: 0288 -------- origin $000FA6B0 text_0288: dd $08000000 + text_0287 + $4 db "SPIDER-MAN: That new Goblin just has to be Harry Osborn. I hope I didn't hurt him too badly. At least he won't be able to blow anything else up..." dw $0000 ;//-------- Pointer: 0289 -------- origin ($000F67D0) dd $08000000 + text_0289 ;//-------- Text: 0289 -------- origin $000FA748 text_0289: dd $08000000 + text_0288 + $4 db "POLICE RADIO: All units in vicinity of section 4, respond to a 10-30 in progress at Muni-Metro Bank on 14th Street... repeat, all units --" dw $0000 ;//-------- Pointer: 0290 -------- origin ($000F67D4) dd $08000000 + text_0290 ;//-------- Text: 0290 -------- origin $000FA7D8 text_0290: dd $08000000 + text_0289 + $4 db "SPIDER-MAN: And now a bank robbery? Ah, a hero's work is never done..." dw $0000 ;//-------- Pointer: 0291 -------- origin ($000F67D8) dd $08000000 + text_0291 ;//-------- Text: 0291 -------- origin $000FA824 text_0291: dd $08000000 + text_0290 + $4 db "SANDMAN: Hey, Spider-Man..." dw $0000 ;//-------- Pointer: 0292 -------- origin ($000F67DC) dd $08000000 + text_0292 ;//-------- Text: 0292 -------- origin $000FA844 text_0292: dd $08000000 + text_0291 + $4 db "SPIDER-MAN: Wha-- unnh!" dw $0000 ;//-------- Pointer: 0293 -------- origin ($000F67E0) dd $08000000 + text_0293 ;//-------- Text: 0293 -------- origin $000FA860 text_0293: dd $08000000 + text_0292 + $4 db "SPIDER-MAN: Whew, looks like I'm clear of that... that sand guy. I hate to turn tail like that, but how do you beat someone, something like that? Got to figure out a way to do it..." dw $0000 ;//-------- Pointer: 0294 -------- origin ($000F67E4) dd $08000000 + text_0294 ;//-------- Text: 0294 -------- origin $000FA91C text_0294: dd $08000000 + text_0293 + $4 db "SPIDER-MAN: Maybe I'll just sleep on it... " dw $0000 ;//-------- Pointer: 0295 -------- origin ($000F67E8) dd $08000000 + text_0295 ;//-------- Text: 0295 -------- origin $000FA94C text_0295: dd $08000000 + text_0294 + $4 dd $08000000 + text_0000 + $4 db "SPIDER-MAN: Sheesh, late again. Have to get to the Daily Bugle before Jonah blows his stack!" dw $0000 ;//-------- Pointer: 0296 -------- origin ($000F67EC) dd $08000000 + text_0295 + $4 ;//-------- Pointer: 0297 -------- origin ($000F67F0) dd $08000000 + text_0297 ;//-------- Text: 0297 -------- origin $000FA9B4 text_0297: dd $08000000 + text_0295 + $8 db "JAMESON: Parker! Where have you been? You think you don",$92,"t have to be here on time like everyone else? PARKER: But... I",$92,"m freelance... JAMESON: Never mind. I was going to send you to the D.A.",$92,"s office for a news conference they just announced. Word is the city's gonna launch a major investigation of Wilson Fisk. But you weren't here, so I sent Brock. PETER: Eddie Brock? But -- JAMESON: Shh. It's starting." dw $0000 ;//-------- Pointer: 0298 -------- origin ($000F67F4) dd $08000000 + text_0298 ;//-------- Text: 0298 -------- origin $000FAB50 text_0298: dd $08000000 + text_0297 + $4 db "HARDY: Thank you for coming. I",$92,"m Assistant District Attorney Michael Hardy, and I",$92,"m pleased to announce that the office of the District Attorney is launching a full criminal investigation of Wilson Fisk -- a man whose organized crime influence is so pervasive that he is often called ",$93,"the Kingpin of Crime",$94,". I will be personally leading the --" dw $0000 ;//-------- Pointer: 0299 -------- origin ($000F67F8) dd $08000000 + text_0299 ;//-------- Text: 0299 -------- origin $000FACAC text_0299: dd $08000000 + text_0298 + $4 db "ELECTRO: You won't be leading anything, Hardy!" dw $0000 ;//-------- Pointer: 0300 -------- origin ($000F67FC) dd $08000000 + text_0300 ;//-------- Text: 0300 -------- origin $000FACE0 text_0300: dd $08000000 + text_0299 + $4 db "JAMESON: Whoa, now there's some news happening! I hope Brock gets some good shots. Assuming he doesn't GET shot." dw $0000 ;//-------- Pointer: 0301 -------- origin ($000F6800) dd $08000000 + text_0301 ;//-------- Text: 0301 -------- origin $000FAD58 text_0301: dd $08000000 + text_0300 + $4 db "JAMESON: This is Jameson. CALLER: Hello, Jonah. Don",$92,"t hang up. I",$92,"ve planted bombs under the city. In just a short while they",$92,"ll explode, collapsing the buildings above them and killing thousands. JAMESON: What? Bombs under the city? Who is this? CALLER: Who I am isn",$92,"t important. What",$92,"s important is that this city has an unpaid debt, and I",$92,"m going to collect it in blood. >CLICK<" dw $0000 ;//-------- Pointer: 0302 -------- origin ($000F6804) dd $08000000 + text_0302 ;//-------- Text: 0302 -------- origin $000FAEDC text_0302: dd $08000000 + text_0301 + $4 db "JAMESON: Great, just what I needed today, another whackjob. Anyway, like I was saying, Parker --" dw $0000 ;//-------- Pointer: 0303 -------- origin ($000F6808) dd $08000000 + text_0303 ;//-------- Text: 0303 -------- origin $000FAF44 text_0303: dd $08000000 + text_0302 + $4 db "JAMESON: Parker?" dw $0000 ;//-------- Pointer: 0304 -------- origin ($000F680C) dd $08000000 + text_0304 ;//-------- Text: 0304 -------- origin $000FAF5C text_0304: dd $08000000 + text_0303 + $4 db "SPIDER-MAN: Two emergencies at once... where's a Spider-clone when you need one? More importantly, which crisis do I tackle first?" dw $0000 ;//-------- Pointer: 0305 -------- origin ($000F6810) dd $08000000 + text_0305 ;//-------- Text: 0305 -------- origin $000FAFE4 text_0305: dd $08000000 + text_0304 + $4 db "SPIDER-MAN: I... I think I killed him. It's this black suit... making me brutal... turning me into something I don't want to be... " dw $0000 ;//-------- Pointer: 0306 -------- origin ($000F6814) dd $08000000 + text_0306 ;//-------- Text: 0306 -------- origin $000FB06C text_0306: dd $08000000 + text_0305 + $4 db "SPIDER-MAN: Sheesh, now what? Who the heck are you?" dw $0000 ;//-------- Pointer: 0307 -------- origin ($000F6818) dd $08000000 + text_0307 ;//-------- Text: 0307 -------- origin $000FB0A4 text_0307: dd $08000000 + text_0306 + $4 db "VENOM: We are Venom... and you must die..." dw $0000 ;//-------- Pointer: 0308 -------- origin ($000F681C) dd $08000000 + text_0308 ;//-------- Text: 0308 -------- origin $000FB0D4 text_0308: dd $08000000 + text_0307 + $4 db "SPIDER-MAN: You know, it's one thing to threaten my life. I'm used to that. But when you copy my fashion sense, you're crossing the line!" dw $0000 ;//-------- Pointer: 0309 -------- origin ($000F6820) dd $08000000 + text_0309 ;//-------- Text: 0309 -------- origin $000FB164 text_0309: dd $08000000 + text_0308 + $4 db "SPIDER-MAN: That does not look good. I'd better go get to a phone and get that guy some medical attention. And maybe a muzzle... " dw $0000 ;//-------- Pointer: 0310 -------- origin ($000F6824) dd $08000000 + text_0310 ;//-------- Text: 0310 -------- origin $000FB1EC text_0310: dd $08000000 + text_0309 + $4 db "The End?" dw $0000 ;//-------- Pointer: 0311 -------- origin ($000F6828) dd $08000000 + text_0311 ;//-------- Text: 0311 -------- origin $000FB1FC text_0311: dd $08000000 + text_0310 + $4 db "Start Game" dw $0000 ;//-------- Pointer: 0312 -------- origin ($000F682C) dd $08000000 + text_0312 ;//-------- Text: 0312 -------- origin $000FB20C text_0312: dd $08000000 + text_0311 + $4 db "View Credits" dw $0000 ;//-------- Pointer: 0313 -------- origin ($000F6830) dd $08000000 + text_0313 ;//-------- Text: 0313 -------- origin $000FB220 text_0313: dd $08000000 + text_0312 + $4 db "Resume" dw $0000 ;//-------- Pointer: 0314 -------- origin ($000F6834) dd $08000000 + text_0314 ;//-------- Text: 0314 -------- origin $000FB22C text_0314: dd $08000000 + text_0313 + $4 db "Quit Level" dw $0000 ;//-------- Pointer: 0315 -------- origin ($000F6838) dd $08000000 + text_0315 ;//-------- Text: 0315 -------- origin $000FB23C text_0315: dd $08000000 + text_0314 + $4 db "Sleep" dw $0000 ;//-------- Pointer: 0316 -------- origin ($000F683C) dd $08000000 + text_0316 ;//-------- Text: 0316 -------- origin $000FB248 text_0316: dd $08000000 + text_0315 + $4 db "Sound" dw $0000 ;//-------- Pointer: 0317 -------- origin ($000F6840) dd $08000000 + text_0317 ;//-------- Text: 0317 -------- origin $000FB254 text_0317: dd $08000000 + text_0316 + $4 db "Level Complete!" dw $0000 ;//-------- Pointer: 0318 -------- origin ($000F6844) dd $08000000 + text_0318 ;//-------- Text: 0318 -------- origin $000FB268 text_0318: dd $08000000 + text_0317 + $4 db "Max Health Increased!" dw $0000 ;//-------- Pointer: 0319 -------- origin ($000F6848) dd $08000000 + text_0319 ;//-------- Text: 0319 -------- origin $000FB284 text_0319: dd $08000000 + text_0318 + $4 db "Music Volume : " dw $0000 ;//-------- Pointer: 0320 -------- origin ($000F684C) dd $08000000 + text_0320 ;//-------- Text: 0320 -------- origin $000FB298 text_0320: dd $08000000 + text_0319 + $4 db "SFX Volume : " dw $0000 ;//-------- Pointer: 0321 -------- origin ($000F6850) dd $08000000 + text_0321 ;//-------- Text: 0321 -------- origin $000FB2AC text_0321: dd $08000000 + text_0320 + $4 db "Quit Level?" dw $0000 ;//-------- Pointer: 0322 -------- origin ($000F6854) dd $08000000 + text_0322 ;//-------- Text: 0322 -------- origin $000FB2BC text_0322: dd $08000000 + text_0321 + $4 db "Cancel" dw $0000 ;//-------- Pointer: 0323 -------- origin ($000F6858) dd $08000000 + text_0323 ;//-------- Text: 0323 -------- origin $000FB2C8 text_0323: dd $08000000 + text_0322 + $4 db "Quit" dw $0000 ;//-------- Pointer: 0324 -------- origin ($000F685C) dd $08000000 + text_0324 ;//-------- Text: 0324 -------- origin $000FB2D4 text_0324: dd $08000000 + text_0323 + $4 db "Sleep Now?" dw $0000 ;//-------- Pointer: 0325 -------- origin ($000F6860) dd $08000000 + text_0325 ;//-------- Text: 0325 -------- origin $000FB2E4 text_0325: dd $08000000 + text_0324 + $4 db "Press SELECT + ",$86," + ",$87 db "to Wake" dw $0000 ;//-------- Pointer: 0326 -------- origin ($000F6864) dd $08000000 + text_0326 ;//-------- Text: 0326 -------- origin $000FB308 text_0326: dd $08000000 + text_0325 + $4 db "Reward Menu" dw $0000 ;//-------- Pointer: 0327 -------- origin ($000F6868) dd $08000000 + text_0327 ;//-------- Text: 0327 -------- origin $000FB318 text_0327: dd $08000000 + text_0326 + $4 db "Boss Reward" dw $0000 ;//-------- Pointer: 0328 -------- origin ($000F686C) dd $08000000 + text_0328 ;//-------- Text: 0328 -------- origin $000FB328 text_0328: dd $08000000 + text_0327 + $4 db "Goblin Rewards" dw $0000 ;//-------- Pointer: 0329 -------- origin ($000F6870) dd $08000000 + text_0329 ;//-------- Text: 0329 -------- origin $000FB33C text_0329: dd $08000000 + text_0328 + $4 db " WebPull" dw $0000 ;//-------- Pointer: 0330 -------- origin ($000F6874) dd $08000000 + text_0330 ;//-------- Text: 0330 -------- origin $000FB34C text_0330: dd $08000000 + text_0329 + $4 db "HOLD ",$87," and +Control Pad" dw $0000 ;//-------- Pointer: 0331 -------- origin ($000F6878) dd $08000000 + text_0331 ;//-------- Text: 0331 -------- origin $000FB368 text_0331: dd $08000000 + text_0330 + $4 db "Mad Bomber Rewards" dw $0000 ;//-------- Pointer: 0332 -------- origin ($000F687C) dd $08000000 + text_0332 ;//-------- Text: 0332 -------- origin $000FB380 text_0332: dd $08000000 + text_0331 + $4 db " Area Punch" dw $0000 ;//-------- Pointer: 0333 -------- origin ($000F6880) dd $08000000 + text_0333 ;//-------- Text: 0333 -------- origin $000FB394 text_0333: dd $08000000 + text_0332 + $4 db $82," + ",$81 dw $0000 ;//-------- Pointer: 0334 -------- origin ($000F6884) dd $08000000 + text_0334 ;//-------- Text: 0334 -------- origin $000FB3A0 text_0334: dd $08000000 + text_0333 + $4 db " Area Kick" dw $0000 ;//-------- Pointer: 0335 -------- origin ($000F6888) dd $08000000 + text_0335 ;//-------- Text: 0335 -------- origin $000FB3B4 text_0335: dd $08000000 + text_0334 + $4 db "HOLD ",$86," + ",$82," + ",$81 dw $0000 ;//-------- Pointer: 0336 -------- origin ($000F688C) dd $08000000 + text_0336 ;//-------- Text: 0336 -------- origin $000FB3C8 text_0336: dd $08000000 + text_0335 + $4 db "Electro Rewards" dw $0000 ;//-------- Pointer: 0337 -------- origin ($000F6890) dd $08000000 + text_0337 ;//-------- Text: 0337 -------- origin $000FB3DC text_0337: dd $08000000 + text_0336 + $4 db " Up Punch" dw $0000 ;//-------- Pointer: 0338 -------- origin ($000F6894) dd $08000000 + text_0338 ;//-------- Text: 0338 -------- origin $000FB3EC text_0338: dd $08000000 + text_0337 + $4 db $82,$85," or ",$82,$84," + ",$81 dw $0000 ;//-------- Pointer: 0339 -------- origin ($000F6898) dd $08000000 + text_0339 ;//-------- Text: 0339 -------- origin $000FB400 text_0339: dd $08000000 + text_0338 + $4 db " Up Kick" dw $0000 ;//-------- Pointer: 0340 -------- origin ($000F689C) dd $08000000 + text_0340 ;//-------- Text: 0340 -------- origin $000FB410 text_0340: dd $08000000 + text_0339 + $4 db "HOLD ",$86," + ",$82,$85," or ",$82,$84," + ",$81 dw $0000 ;//-------- Pointer: 0341 -------- origin ($000F68A0) dd $08000000 + text_0341 ;//-------- Text: 0341 -------- origin $000FB42C text_0341: dd $08000000 + text_0340 + $4 db "Difficulty" dw $0000 ;//-------- Pointer: 0342 -------- origin ($000F68A4) dd $08000000 + text_0342 ;//-------- Text: 0342 -------- origin $000FB43C text_0342: dd $08000000 + text_0341 + $4 db "Select a Slot" dw $0000 ;//-------- Pointer: 0343 -------- origin ($000F68A8) dd $08000000 + text_0343 ;//-------- Text: 0343 -------- origin $000FB450 text_0343: dd $08000000 + text_0342 + $4 db "Erase a Slot" dw $0000 ;//-------- Pointer: 0344 -------- origin ($000F68AC) dd $08000000 + text_0344 ;//-------- Text: 0344 -------- origin $000FB464 text_0344: dd $08000000 + text_0343 + $4 db "Erase Slot %d" dw $0000 ;//-------- Pointer: 0345 -------- origin ($000F68B0) dd $08000000 + text_0345 ;//-------- Text: 0345 -------- origin $000FB478 text_0345: dd $08000000 + text_0344 + $4 db "Are You Sure?" dw $0000 ;//-------- Pointer: 0346 -------- origin ($000F68B4) dd $08000000 + text_0346 ;//-------- Text: 0346 -------- origin $000FB48C text_0346: dd $08000000 + text_0345 + $4 db "New Game" dw $0000 ;//-------- Pointer: 0347 -------- origin ($000F68B8) dd $08000000 + text_0347 ;//-------- Text: 0347 -------- origin $000FB49C text_0347: dd $08000000 + text_0346 + $4 db "Slot %d - %d%%" dw $0000 ;//-------- Pointer: 0348 -------- origin ($000F68BC) dd $08000000 + text_0348 ;//-------- Text: 0348 -------- origin $000FB4B0 text_0348: dd $08000000 + text_0347 + $4 db "Erase" dw $0000 ;//-------- Pointer: 0349 -------- origin ($000F68C0) dd $08000000 + text_0349 ;//-------- Text: 0349 -------- origin $000FB4BC text_0349: dd $08000000 + text_0348 + $4 db $81," Back ",$80," Select" dw $0000 ;//-------- Pointer: 0350 -------- origin ($000F68C4) dd $08000000 + text_0350 ;//-------- Text: 0350 -------- origin $000FB4D8 text_0350: dd $08000000 + text_0349 + $4 db $80," Select" dw $0000 ;//-------- Pointer: 0351 -------- origin ($000F68C8) dd $08000000 + text_0351 ;//-------- Text: 0351 -------- origin $000FB4E8 text_0351: dd $08000000 + text_0350 + $4 db $81," Back" dw $0000 ;//-------- Pointer: 0352 -------- origin ($000F68CC) dd $08000000 + text_0352 ;//-------- Text: 0352 -------- origin $000FB4F4 text_0352: dd $08000000 + text_0351 + $4 dd $08000000 + text_0349 + $4 dd $08000000 + text_0349 + $4 dd $08000000 + text_0349 + $4 dd $08000000 + text_0349 + $4 dd $08000000 + text_0349 + $4 db $85," Adjust ",$84 dw $0000 ;//-------- Pointer: 0353 -------- origin ($000F68D0) dd $08000000 + text_0352 + $4 ;//-------- Pointer: 0354 -------- origin ($000F68D4) dd $08000000 + text_0352 + $8 ;//-------- Pointer: 0355 -------- origin ($000F68D8) dd $08000000 + text_0352 + $C ;//-------- Pointer: 0356 -------- origin ($000F68DC) dd $08000000 + text_0352 + $10 ;//-------- Pointer: 0357 -------- origin ($000F68E0) dd $08000000 + text_0352 + $14 ;//-------- Pointer: 0358 -------- origin ($000F68E4) dd $08000000 + text_0358 ;//-------- Text: 0358 -------- origin $000FB518 text_0358: dd $08000000 + text_0352 + $18 db "Language" dw $0000 ;//-------- Pointer: 0359 -------- origin ($000F68E8) dd $08000000 + text_0359 ;//-------- Text: 0359 -------- origin $000FB528 text_0359: dd $08000000 + text_0358 + $4 db "PAUSED" dw $0000 ;//-------- Pointer: 0360 -------- origin ($000F68EC) dd $08000000 + text_0360 ;//-------- Text: 0360 -------- origin $000FB534 text_0360: dd $08000000 + text_0359 + $4 db "Test" dw $0000 ;//-------- Pointer: 0361 -------- origin ($000F68F0) dd $08000000 + text_0361 ;//-------- Text: 0361 -------- origin $000FB540 text_0361: dd $08000000 + text_0360 + $4 db "Chapter 1" dw $0000 ;//-------- Pointer: 0362 -------- origin ($000F68F4) dd $08000000 + text_0362 ;//-------- Text: 0362 -------- origin $000FB550 text_0362: dd $08000000 + text_0361 + $4 db "Chapter 2" dw $0000 ;//-------- Pointer: 0363 -------- origin ($000F68F8) dd $08000000 + text_0363 ;//-------- Text: 0363 -------- origin $000FB560 text_0363: dd $08000000 + text_0362 + $4 db "Chapter 3" dw $0000 ;//-------- Pointer: 0364 -------- origin ($000F68FC) dd $08000000 + text_0364 ;//-------- Text: 0364 -------- origin $000FB570 text_0364: dd $08000000 + text_0363 + $4 db "Chapter 4" dw $0000 ;//-------- Pointer: 0365 -------- origin ($000F6900) dd $08000000 + text_0365 ;//-------- Text: 0365 -------- origin $000FB580 text_0365: dd $08000000 + text_0364 + $4 db "Chapter 5" dw $0000 ;//-------- Pointer: 0366 -------- origin ($000F6904) dd $08000000 + text_0366 ;//-------- Text: 0366 -------- origin $000FB590 text_0366: dd $08000000 + text_0365 + $4 db "Chapter 6" dw $0000 ;//-------- Pointer: 0367 -------- origin ($000F6908) dd $08000000 + text_0367 ;//-------- Text: 0367 -------- origin $000FB5A0 text_0367: dd $08000000 + text_0366 + $4 db "Chapter 7" dw $0000 ;//-------- Pointer: 0368 -------- origin ($000F690C) dd $08000000 + text_0368 ;//-------- Text: 0368 -------- origin $000FB5B0 text_0368: dd $08000000 + text_0367 + $4 db "Chapter 8" dw $0000 ;//-------- Pointer: 0369 -------- origin ($000F6910) dd $08000000 + text_0369 ;//-------- Text: 0369 -------- origin $000FB5C0 text_0369: dd $08000000 + text_0368 + $4 db "Chapter 9" dw $0000 ;//-------- Pointer: 0370 -------- origin ($000F6914) dd $08000000 + text_0370 ;//-------- Text: 0370 -------- origin $000FB5D0 text_0370: dd $08000000 + text_0369 + $4 db "Chapter 10" dw $0000 ;//-------- Pointer: 0371 -------- origin ($000F6918) dd $08000000 + text_0371 ;//-------- Text: 0371 -------- origin $000FB5E0 text_0371: dd $08000000 + text_0370 + $4 db "Chapter 11" dw $0000 ;//-------- Pointer: 0372 -------- origin ($000F691C) dd $08000000 + text_0372 ;//-------- Text: 0372 -------- origin $000FB5F0 text_0372: dd $08000000 + text_0371 + $4 db "mapScreen" dw $0000 ;//-------- Pointer: 0373 -------- origin ($000F6920) dd $08000000 + text_0373 ;//-------- Text: 0373 -------- origin $000FB600 text_0373: dd $08000000 + text_0372 + $4 db "test" dw $0000 ;//-------- Pointer: 0374 -------- origin ($000F6924) dd $08000000 + text_0374 ;//-------- Text: 0374 -------- origin $000FB60C text_0374: dd $08000000 + text_0373 + $4 db "test2" dw $0000 ;//-------- Pointer: 0375 -------- origin ($000F6928) dd $08000000 + text_0375 ;//-------- Text: 0375 -------- origin $000FB618 text_0375: dd $08000000 + text_0374 + $4 db "Helloworld" dw $0000 ;//-------- Pointer: 0376 -------- origin ($000F692C) dd $08000000 + text_0376 ;//-------- Text: 0376 -------- origin $000FB628 text_0376: dd $08000000 + text_0375 + $4 db "Search and Rescue" dw $0000 ;//-------- Pointer: 0377 -------- origin ($000F6930) dd $08000000 + text_0377 ;//-------- Text: 0377 -------- origin $000FB640 text_0377: dd $08000000 + text_0376 + $4 db "Subway Rumble" dw $0000 ;//-------- Pointer: 0378 -------- origin ($000F6934) dd $08000000 + text_0378 ;//-------- Text: 0378 -------- origin $000FB654 text_0378: dd $08000000 + text_0377 + $4 db "Toxic Shock" dw $0000 ;//-------- Pointer: 0379 -------- origin ($000F6938) dd $08000000 + text_0379 ;//-------- Text: 0379 -------- origin $000FB664 text_0379: dd $08000000 + text_0378 + $4 db "Bombs Away" dw $0000
24.551899
476
0.565666
8e66368a38e28808aec69da147816aa0ab0f41f1
180
asm
Assembly
libsrc/_DEVELOPMENT/compress/aplib/z80/__aplib_getbitbc.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/compress/aplib/z80/__aplib_getbitbc.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/compress/aplib/z80/__aplib_getbitbc.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_clib SECTION code_compress_aplib PUBLIC __aplib_getbitbc EXTERN __aplib_getbit __aplib_getbitbc: sla c rl b call __aplib_getbit ret z inc bc ret
11.25
27
0.761111
9c7c0de812a3e5071b34f6e6237b5e80d6be0b17
672
asm
Assembly
Lab03/Write an assembly program that prints Hello World five times and then prints Bye world. Hints Use unconditional CMP, conditional JE, JNE instruction.asm
Deboraj-roy/COMPUTER-ORGANIZATION-AND-ARCHITECTURE-C-
7ad0268edada61a648499557948d174ae1faea8b
[ "MIT" ]
null
null
null
Lab03/Write an assembly program that prints Hello World five times and then prints Bye world. Hints Use unconditional CMP, conditional JE, JNE instruction.asm
Deboraj-roy/COMPUTER-ORGANIZATION-AND-ARCHITECTURE-C-
7ad0268edada61a648499557948d174ae1faea8b
[ "MIT" ]
1
2022-03-16T14:31:47.000Z
2022-03-16T14:31:47.000Z
Lab03/Write an assembly program that prints Hello World five times and then prints Bye world. Hints Use unconditional CMP, conditional JE, JNE instruction.asm
Deboraj-roy/COMPUTER-ORGANIZATION-AND-ARCHITECTURE-C-
7ad0268edada61a648499557948d174ae1faea8b
[ "MIT" ]
null
null
null
;Write an assembly program that prints Hello World five times and then prints Bye world. Hints: Use unconditional CMP, conditional JE, JNE instruction .MODEL SMALL .STACK 100H .DATA CR EQU '0DH' LF EQU '0AH' MSG DB 'HELLO WORLD $' .CODE MAIN PROC MOV AX,@DATA MOV DS,AX MOV CX,5 PRINT_: LEA DX,MSG MOV AH,9 INT 21H MOV AH, 2 ; carriage return MOV DL, 0DH INT 21H MOV DL, 0AH ; line feed INT 21H DEC CX JNZ PRINT_ MOV AH,4CH INT 21H MAIN ENDP END MAIN
15.272727
152
0.5
b14f7ec1356d213ecaedab5e9b6b84f607148312
102
asm
Assembly
modules/divide.asm
antuniooh/assembly-calculator
5e364c5cfdb0aa90958dc168e546c305cda1ee5a
[ "MIT" ]
2
2021-05-08T20:51:42.000Z
2021-05-08T20:52:06.000Z
modules/divide.asm
antuniooh/assembly-calculator
5e364c5cfdb0aa90958dc168e546c305cda1ee5a
[ "MIT" ]
null
null
null
modules/divide.asm
antuniooh/assembly-calculator
5e364c5cfdb0aa90958dc168e546c305cda1ee5a
[ "MIT" ]
2
2020-12-14T00:09:01.000Z
2021-03-25T14:07:08.000Z
DIVIDE: MOV R4, #'/' MOV R0, #0h MOV A, #50h ADD A, R0 MOV R0, A MOV A, @R0 ACALL CONTINUECODE
11.333333
19
0.588235
af55beda864e30157c145823d047c1344c09c1ad
670
asm
Assembly
oeis/111/A111215.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/111/A111215.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/111/A111215.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A111215: Numbers k such that 4k + 5 is prime. ; Submitted by Jon Maiga ; 0,2,3,6,8,9,12,14,17,21,23,24,26,27,33,36,38,42,44,47,48,56,57,59,63,66,68,69,72,77,78,83,86,87,92,96,98,99,101,104,107,111,113,114,126,129,134,138,141,143,147,149,152,153,159,162,164,167,168,174,176,182,188,189,191,192,198,201,204,206,212,213,218,219,231,233,234,237,243,248,251,252,254,257,261,264,266,272,273,276,278,281,287,294,297,299,302,303,306,308 mov $2,36 mul $2,$0 mov $4,4 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,4 lpe mov $0,$4 div $0,4 sub $0,1
30.454545
357
0.658209
bb17c6fc4d4f1b77a89e127baf72f090a48f98a8
499
asm
Assembly
programs/oeis/166/A166362.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/166/A166362.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/166/A166362.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A166362: a(n) = phi(nonprime(n)). ; 1,2,2,4,6,4,4,6,8,8,6,8,12,10,8,20,12,18,12,8,16,20,16,24,12,18,24,16,12,20,24,22,16,42,20,32,24,18,40,24,36,28,16,30,36,32,48,20,32,44,24,24,36,40,36,60,24,32,54,40,24,64,42,56,40,24,72,44,60,46,72,32,42,60,40,32,48,48,52,36,40,72,48,36,88,56,72,58,96,32,110,60,80,60,100,36,64,84,48,40 seq $0,18252 ; The nonprime numbers: 1 together with the composite numbers, A002808. sub $0,1 seq $0,10 ; Euler totient function phi(n): count numbers <= n and prime to n.
71.285714
289
0.669339
5cc4d4bb881594f7b55a50c7dc00e0bf63afe1c4
275
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/___h2sint_callee.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/___h2sint_callee.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/sdcc/___h2sint_callee.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_math16 PUBLIC ___h2sint_callee PUBLIC _i16_f16_fastcall EXTERN cm16_sdcc___h2sint_callee EXTERN cm16_sdcc___h2sint_fastcall defc ___h2sint_callee = cm16_sdcc___h2sint_callee defc _i16_f16_fastcall = cm16_sdcc___h2sint_fastcall
22.916667
56
0.810909
3e5df999a6319569415da348063ef6daa6c39291
460
asm
Assembly
c_asm/19-passing_and_return_value/math_func.asm
karng87/nasm_game
a97fdb09459efffc561d2122058c348c93f1dc87
[ "MIT" ]
null
null
null
c_asm/19-passing_and_return_value/math_func.asm
karng87/nasm_game
a97fdb09459efffc561d2122058c348c93f1dc87
[ "MIT" ]
null
null
null
c_asm/19-passing_and_return_value/math_func.asm
karng87/nasm_game
a97fdb09459efffc561d2122058c348c93f1dc87
[ "MIT" ]
null
null
null
section .data section .bss section .text global add add: add rdi, rsi mov rax, rdi ret global sub sub: sub rdi, rsi mov rax, rdi ret global mul mul: mov rax, rdi mul rsi ret global div_i div_i: cvtsi2ss xmm0, rdi cvtsi2ss xmm1, rsi divss xmm0, xmm1 ret global div_f div_f: divss xmm0, xmm1 ret
13.142857
26
0.482609
6f13d8b6841828ea70574eb7814caa72fc882552
8,016
asm
Assembly
audio/music/rockettheme.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
audio/music/rockettheme.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
audio/music/rockettheme.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
Music_RocketTheme: musicheader 4, 1, Music_RocketTheme_Ch1 musicheader 1, 2, Music_RocketTheme_Ch2 musicheader 1, 3, Music_RocketTheme_Ch3 musicheader 1, 4, Music_RocketTheme_Ch4 Music_RocketTheme_Ch1: tempo 128 volume $77 dutycycle $3 stereopanning $f vibrato $5, $64 notetype $c, $a8 octave 4 note C_, 1 note D_, 1 Music_RocketTheme_branch_f768b: dutycycle $3 notetype $c, $a8 callchannel Music_RocketTheme_branch_f74e6 dutycycle $1 intensity $a8 callchannel Music_RocketTheme_branch_f74f7 callchannel Music_RocketTheme_branch_f758a octave 4 note F#, 1 note __, 1 intensity $53 callchannel Music_RocketTheme_branch_f750c intensity $c3 callchannel Music_RocketTheme_branch_f750c intensity $e3 callchannel Music_RocketTheme_branch_f750c note __, 16 dutycycle $0 notetype $6, $b3 vibrato $6, $64 callchannel Music_RocketTheme_branch_f7727 octave 4 note F_, 1 note F#, 3 note F_, 2 note __, 2 note D#, 2 note __, 2 note C_, 2 note D_, 2 note D#, 2 note C_, 2 octave 3 note A#, 2 note G_, 2 note A#, 2 octave 4 note C_, 2 note __, 4 note D_, 4 note __, 4 note D#, 4 note __, 4 note D#, 2 note F#, 2 callchannel Music_RocketTheme_branch_f7727 octave 3 note F#, 1 note G_, 3 note F_, 2 note __, 2 note D#, 2 note __, 2 note C_, 2 note D_, 2 note D#, 2 note C_, 2 octave 2 note A#, 2 note G_, 2 note A#, 2 octave 3 note C_, 2 note __, 4 note D_, 4 note __, 4 note D#, 4 note F_, 2 note E_, 2 note D#, 2 note D_, 2 Music_RocketTheme_branch_f76ef: note __, 4 note F_, 2 note __, 14 note F#, 2 note __, 10 loopchannel 3, Music_RocketTheme_branch_f76ef note __, 4 note F_, 2 note __, 14 note F#, 2 note __, 2 note F#, 2 note __, 2 note D#, 2 note C_, 2 Music_RocketTheme_branch_f7701: note F#, 2 note A_, 2 loopchannel 4, Music_RocketTheme_branch_f7701 Music_RocketTheme_branch_f7707: note G_, 2 note A#, 2 loopchannel 4, Music_RocketTheme_branch_f7707 Music_RocketTheme_branch_f770d: note G#, 2 note B_, 2 loopchannel 4, Music_RocketTheme_branch_f770d Music_RocketTheme_branch_f7713: octave 3 note A_, 2 octave 4 note C_, 2 loopchannel 4, Music_RocketTheme_branch_f7713 notetype $c, $b3 note __, 16 note __, 12 note F_, 2 note C_, 1 note D_, 1 loopchannel 0, Music_RocketTheme_branch_f768b Music_RocketTheme_branch_f7727: note __, 7 note B_, 1 octave 4 note C_, 2 note __, 6 note C_, 2 note __, 2 octave 3 note G_, 2 note __, 6 octave 4 note D#, 12 note D_, 8 octave 3 note A#, 2 note __, 6 note G_, 2 note __, 2 note A_, 2 note __, 2 note A#, 2 note __, 10 endchannel Music_RocketTheme_Ch2: stereopanning $ff vibrato $4, $64 dutycycle $3 notetype $c, $b7 octave 5 note C_, 1 note D_, 1 Music_RocketTheme_branch_f774b: notetype $c, $b7 callchannel Music_RocketTheme_branch_f7547 intensity $b7 callchannel Music_RocketTheme_branch_f758a octave 5 note C_, 1 note __, 1 callchannel Music_RocketTheme_branch_f7554 intensity $53 callchannel Music_RocketTheme_branch_f7568 intensity $c3 callchannel Music_RocketTheme_branch_f7568 intensity $e3 callchannel Music_RocketTheme_branch_f7568 callchannel Music_RocketTheme_branch_f756f vibrato $6, $64 callchannel Music_RocketTheme_branch_f7800 octave 4 note A_, 1 vibrato $0, $0 intensity $b8 note A#, 14 vibrato $5, $22 intensity $b7 note A#, 5 vibrato $6, $64 notetype $c, $b7 note A#, 12 note __, 2 octave 5 note C_, 1 note D_, 1 callchannel Music_RocketTheme_branch_f7800 note B_, 1 vibrato $0, $0 intensity $b8 octave 4 note C_, 14 vibrato $5, $22 intensity $b7 note C_, 5 vibrato $6, $64 notetype $c, $b7 note C_, 12 octave 3 note A#, 1 note A_, 1 note G#, 1 note G_, 1 notetype $6, $b7 callchannel Music_RocketTheme_branch_f781c octave 4 note D_, 1 note D#, 9 note D_, 1 note C#, 1 note C_, 12 note F_, 2 note __, 2 note F#, 2 note __, 2 callchannel Music_RocketTheme_branch_f781c octave 3 note B_, 2 note __, 2 octave 4 note C_, 2 note __, 2 note D_, 2 note __, 2 note D#, 8 note __, 4 note D_, 2 note __, 2 note C_, 2 octave 3 note G_, 2 note B_, 1 octave 4 note C_, 15 note C#, 16 note D_, 16 note D#, 16 note E_, 2 note C#, 2 octave 3 note A#, 2 note G_, 2 octave 4 note F_, 2 note D_, 2 octave 3 note B_, 2 note G#, 2 octave 4 note F#, 2 note D#, 2 note C_, 2 octave 3 note A_, 2 octave 4 note G_, 2 note E_, 2 note C#, 2 octave 3 note A#, 2 octave 4 note G#, 2 note F_, 2 note D_, 2 octave 3 note B_, 2 octave 4 note A_, 2 note F#, 2 note D#, 2 note C_, 2 note A#, 2 note G_, 2 note E_, 2 note C#, 2 note B_, 4 octave 5 note C_, 2 note D_, 2 loopchannel 0, Music_RocketTheme_branch_f774b Music_RocketTheme_branch_f7800: notetype $6, $b7 note __, 7 octave 4 note D_, 1 note D#, 2 note __, 6 note D#, 2 note __, 2 note C_, 2 note __, 6 note F#, 12 note F_, 8 note D#, 2 note __, 6 note C_, 2 note __, 2 note D_, 2 note __, 2 note D#, 2 note __, 2 octave 3 note D#, 2 note __, 2 note D#, 2 note __, 2 endchannel Music_RocketTheme_branch_f781c: octave 3 note B_, 1 octave 4 note C_, 3 note D#, 4 note C_, 4 note F#, 8 note F_, 8 note C_, 4 endchannel Music_RocketTheme_Ch3: stereopanning $f0 vibrato $4, $22 notetype $c, $14 note __, 2 Music_RocketTheme_branch_f782f: notetype $c, $14 callchannel Music_RocketTheme_branch_f75bf callchannel Music_RocketTheme_branch_f75fe callchannel Music_RocketTheme_branch_f75fe intensity $24 callchannel Music_RocketTheme_branch_f7623 intensity $14 callchannel Music_RocketTheme_branch_f75cc callchannel Music_RocketTheme_branch_f7623 callchannel Music_RocketTheme_branch_f75e1 callchannel Music_RocketTheme_branch_f75fe callchannel Music_RocketTheme_branch_f75fe callchannel Music_RocketTheme_branch_f75fe callchannel Music_RocketTheme_branch_f75fe callchannel Music_RocketTheme_branch_f7623 callchannel Music_RocketTheme_branch_f75cc callchannel Music_RocketTheme_branch_f7623 callchannel Music_RocketTheme_branch_f75cc octave 3 note C_, 1 note __, 1 octave 4 note C_, 1 note __, 1 octave 3 note C_, 1 note __, 1 note C_, 1 note __, 1 note C#, 1 note __, 1 octave 4 note C#, 1 note __, 1 octave 3 note A#, 1 note G_, 1 note E_, 1 note C#, 1 note D_, 1 note __, 1 octave 4 note D_, 1 note __, 1 octave 3 note D_, 1 note __, 1 note D_, 1 note __, 1 note D#, 1 note __, 1 octave 4 note D#, 1 note __, 1 note C_, 1 octave 3 note A_, 1 note F#, 1 note D#, 1 note E_, 1 note __, 1 octave 4 note C#, 1 note __, 1 octave 3 note F_, 1 note __, 1 octave 4 note D_, 1 note __, 1 octave 3 note F#, 1 note __, 1 octave 4 note D#, 1 note __, 1 octave 3 note G_, 1 note __, 1 octave 4 note E_, 1 note __, 1 octave 3 note G#, 1 note __, 1 octave 4 note F_, 1 note __, 1 octave 3 note A_, 1 note __, 1 octave 4 note F#, 1 note __, 1 octave 3 note A#, 1 note __, 1 octave 4 note G_, 1 note __, 1 octave 3 note B_, 2 octave 4 note G#, 1 note __, 1 loopchannel 0, Music_RocketTheme_branch_f782f Music_RocketTheme_Ch4: togglenoise $3 notetype $c note __, 2 Music_RocketTheme_branch_f78c3: callchannel Music_RocketTheme_branch_f765c callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f765c Music_RocketTheme_branch_f78de: note A#, 2 note F#, 2 note D_, 2 note F#, 2 note A#, 2 note F#, 2 note D_, 2 note F#, 2 loopchannel 11, Music_RocketTheme_branch_f78de callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f765c callchannel Music_RocketTheme_branch_f765c loopchannel 0, Music_RocketTheme_branch_f78c3
16.875789
47
0.730414
95544e4c3907627151589295153035a74b974b53
347
nasm
Assembly
Projetos/F-Assembly/src/nasm/examples/Linha.nasm
juanjorgegarcia/Z01
7d49ef8f476f9c8e9f187a62f96fdca7bcd46314
[ "Unlicense" ]
null
null
null
Projetos/F-Assembly/src/nasm/examples/Linha.nasm
juanjorgegarcia/Z01
7d49ef8f476f9c8e9f187a62f96fdca7bcd46314
[ "Unlicense" ]
67
2018-03-13T21:40:05.000Z
2018-05-23T19:17:13.000Z
Projetos/F-Assembly/src/nasm/examples/Linha.nasm
juanjorgegarcia/Z01
7d49ef8f476f9c8e9f187a62f96fdca7bcd46314
[ "Unlicense" ]
3
2018-03-07T01:27:37.000Z
2018-03-23T19:35:14.000Z
; carrega x"FF" em S (todos pxs em '1') leaw $0, %A movw %A, %S notw %S ; linha 1 leaw $17389, %A ;16384 movw %S, (%A) incw %A movw %S, (%A) incw %A movw %S, (%A) incw %A movw %S, (%A) leaw $17409, %A movw %S, (%A) incw %A movw %S, (%A) incw %A movw %S, (%A) incw %A movw %S, (%A)
13.88
40
0.432277
460353b0439ad33da3193279dd2b29c0ba7f1153
128
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/___fs2schar.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/___fs2schar.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/___fs2schar.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_math32 PUBLIC ___fs2schar EXTERN cm32_sdcc___fs2schar defc ___fs2schar = cm32_sdcc___fs2schar
18.285714
43
0.773438
af24655026e4dc725c727a222104c1d462e6e4bd
7,664
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_sm_/i3-7100_9_0x84_notsx.log_21829_2231.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_sm_/i3-7100_9_0x84_notsx.log_21829_2231.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_sm_/i3-7100_9_0x84_notsx.log_21829_2231.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 %r8 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x1c9f, %rbx nop sub $36814, %r12 mov (%rbx), %ax nop nop sub %rsi, %rsi lea addresses_normal_ht+0x49b7, %rsi lea addresses_WT_ht+0x1ddb7, %rdi nop cmp %r8, %r8 mov $12, %rcx rep movsb sub $65350, %rdi lea addresses_UC_ht+0x180b7, %rbx add $61198, %rax mov (%rbx), %r12d nop nop nop nop nop cmp $8843, %rax lea addresses_normal_ht+0x89ff, %rsi lea addresses_UC_ht+0x11eb7, %rdi nop nop nop nop and $47947, %r13 mov $71, %rcx rep movsl nop nop nop nop nop add %rdi, %rdi lea addresses_WT_ht+0x1c937, %r12 nop cmp %rdi, %rdi mov (%r12), %esi nop nop nop xor %r8, %r8 lea addresses_WT_ht+0x19cb7, %rax nop nop nop nop cmp $55022, %r13 movl $0x61626364, (%rax) nop nop nop xor %r13, %r13 lea addresses_WT_ht+0x34b7, %rbx nop inc %r12 mov (%rbx), %ax nop sub $9104, %rcx lea addresses_A_ht+0x118b7, %rcx nop nop nop add %rbx, %rbx mov $0x6162636465666768, %rsi movq %rsi, %xmm6 vmovups %ymm6, (%rcx) nop nop nop nop nop sub $46772, %r8 lea addresses_normal_ht+0x4617, %rsi lea addresses_normal_ht+0x17737, %rdi nop nop nop nop xor $64858, %r13 mov $63, %rcx rep movsl nop nop nop nop nop dec %rax lea addresses_UC_ht+0x4de8, %rdi nop cmp %r8, %r8 mov (%rdi), %rbx nop nop lfence lea addresses_UC_ht+0x67b1, %rsi lea addresses_A_ht+0x1c747, %rdi cmp %rax, %rax mov $117, %rcx rep movsw nop nop sub $9013, %rbx lea addresses_A_ht+0x16ac7, %rcx nop nop nop nop xor %r8, %r8 movups (%rcx), %xmm3 vpextrq $1, %xmm3, %rsi nop nop nop add $16444, %r8 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r8 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %rbx push %rdi push %rdx // Store lea addresses_normal+0x1c4b7, %r13 nop add %r12, %r12 movl $0x51525354, (%r13) nop nop nop nop nop cmp %rbx, %rbx // Load lea addresses_US+0x16117, %r11 clflush (%r11) nop nop nop sub $38016, %rdx mov (%r11), %edi nop sub $32110, %r13 // Store lea addresses_UC+0x1a277, %r11 nop nop nop nop dec %r13 movw $0x5152, (%r11) nop add $53042, %r13 // Faulty Load lea addresses_normal+0x1c4b7, %r11 nop nop nop sub %rdx, %rdx mov (%r11), %r13w lea oracles, %rbx and $0xff, %r13 shlq $12, %r13 mov (%rbx,%r13,1), %r13 pop %rdx pop %rdi pop %rbx pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_US', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 5, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_normal', 'same': True, 'size': 2, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': True}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'54': 21829} 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 */
33.467249
2,999
0.655532
c584d4facae29a84b52fa7b2f3f45cd7c519e9cc
1,416
asm
Assembly
src/gfx/ico_ice.asm
beckadamtheinventor/BOSshell5
04b2b4bdb6d9b415dd5e9c7fbfa3218dc4571400
[ "BSD-3-Clause" ]
2
2019-09-25T04:28:00.000Z
2019-09-26T00:46:40.000Z
src/gfx/ico_ice.asm
beckadamtheinventor/BOSshell5
04b2b4bdb6d9b415dd5e9c7fbfa3218dc4571400
[ "BSD-3-Clause" ]
null
null
null
src/gfx/ico_ice.asm
beckadamtheinventor/BOSshell5
04b2b4bdb6d9b415dd5e9c7fbfa3218dc4571400
[ "BSD-3-Clause" ]
null
null
null
; convpng v7.3 ; 8 bpp image _ico_ice_size equ 258 _ico_ice: db 16,16 db 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh db 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh db 0FFh,0FFh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,095h,03Dh,03Dh,03Dh,03Dh,03Dh,03Dh,03Dh,06Bh,012h,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,06Bh,06Bh,06Bh,06Bh,000h,000h,000h,000h,06Bh,06Bh,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,012h,012h,012h,000h,000h,000h,000h,000h,000h,06Bh,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,06Bh,06Bh,06Bh,000h,000h,06Bh,06Bh,000h,000h,06Bh,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,012h,03Dh,03Dh,000h,000h,03Dh,03Dh,000h,000h,012h,012h,06Bh,0FFh,0FFh db 0FFh,0FFh,06Bh,06Bh,000h,000h,000h,000h,000h,000h,000h,000h,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,02Ch,02Ch,000h,000h,000h,000h,000h,000h,000h,000h,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,06Bh,06Bh,000h,000h,06Bh,06Bh,06Bh,06Bh,000h,000h,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,03Dh,03Dh,000h,000h,03Dh,03Dh,012h,012h,000h,000h,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,06Bh,06Bh,000h,000h,06Bh,06Bh,06Bh,06Bh,000h,000h,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,06Bh,06Bh,000h,000h,000h,000h,000h,000h,000h,000h,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,03Dh,03Dh,000h,000h,000h,000h,000h,000h,000h,000h,06Bh,06Bh,0FFh,0FFh db 0FFh,0FFh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,06Bh,0FFh,0FFh
61.565217
83
0.782486
deb0b881f9300dbff82f6c115fd4e45b68c79cc2
7,313
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_633.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_633.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_633.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r13 push %r14 push %r15 push %rcx push %rdi push %rsi lea addresses_WC_ht+0xbeeb, %rdi nop nop sub %r15, %r15 mov $0x6162636465666768, %r13 movq %r13, %xmm6 vmovups %ymm6, (%rdi) nop nop nop nop inc %rcx lea addresses_UC_ht+0xe46b, %r15 nop nop nop nop nop and %rcx, %rcx vmovups (%r15), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %r12 nop inc %r12 lea addresses_UC_ht+0x41db, %r11 nop nop nop and %r14, %r14 movl $0x61626364, (%r11) nop and $46372, %r15 lea addresses_WC_ht+0x158eb, %rsi lea addresses_normal_ht+0xaeb, %rdi and $63129, %r15 mov $74, %rcx rep movsb nop nop nop cmp %r15, %r15 lea addresses_D_ht+0x32eb, %rcx nop nop nop sub $20921, %rsi mov (%rcx), %di nop nop nop dec %rcx lea addresses_WT_ht+0x120eb, %r14 nop nop nop nop and %rsi, %rsi mov $0x6162636465666768, %r13 movq %r13, %xmm1 movups %xmm1, (%r14) nop nop nop nop nop sub %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %r15 pop %r14 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r14 push %r9 push %rbp push %rcx push %rdi push %rsi // Load lea addresses_WC+0x150eb, %rcx nop nop nop dec %r14 movb (%rcx), %r9b nop nop nop nop nop and %r10, %r10 // Store lea addresses_UC+0x56ab, %r9 nop nop nop nop add %r10, %r10 mov $0x5152535455565758, %rbp movq %rbp, %xmm1 movups %xmm1, (%r9) nop nop nop cmp $22532, %r14 // REPMOV lea addresses_D+0xd3cb, %rsi lea addresses_normal+0x107eb, %rdi nop xor %r10, %r10 mov $108, %rcx rep movsw nop nop nop nop and $37062, %r10 // Load mov $0xf3b, %r14 and %rbp, %rbp mov (%r14), %si nop nop nop nop nop and $60982, %r10 // Load lea addresses_RW+0x4fb, %rdi nop nop add %r14, %r14 mov (%rdi), %rbp nop nop nop nop nop xor $30916, %rbp // Store lea addresses_D+0x1c2a3, %rdi nop nop nop inc %rcx movl $0x51525354, (%rdi) nop nop xor $3021, %rcx // Store mov $0x5a059000000004eb, %rbp nop nop nop and %r9, %r9 mov $0x5152535455565758, %r14 movq %r14, %xmm3 movaps %xmm3, (%rbp) nop nop nop nop nop cmp %r12, %r12 // Faulty Load lea addresses_normal+0x150eb, %rdi nop nop cmp %rcx, %rcx movups (%rdi), %xmm3 vpextrq $0, %xmm3, %rbp lea oracles, %rdi and $0xff, %rbp shlq $12, %rbp mov (%rdi,%rbp,1), %rbp pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r14 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 11, 'same': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 5, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_D'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_normal'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3, 'same': False, 'type': 'addresses_P'}, 'OP': 'LOAD'} {'src': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 2, 'same': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 6, 'same': False, 'type': 'addresses_NC'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 9, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
31.119149
2,999
0.653904
b37107005d822bd7d6ec3d32055a9ae7add14651
541
asm
Assembly
libsrc/math/mbf32/c/sccz80/ceil.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/math/mbf32/c/sccz80/ceil.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/math/mbf32/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_mbf32 PUBLIC ceil EXTERN msbios EXTERN ___mbf32_setup_single EXTERN ___mbf32_return EXTERN ___mbf32_FPADD EXTERN ___mbf32_FPREG EXTERN ___mbf32_discard_fraction ceil: call ___mbf32_setup_single call ___mbf32_discard_fraction ld a,(___mbf32_FPREG+2) ;sign rlca jp nc,___mbf32_return ; This is negative, so we have to add one ld bc,$8100 ld de,$0000 IF __CPU_INTEL__|__CPU_GBZ80__ call ___mbf32_FPADD ELSE ld ix,___mbf32_FPADD call msbios ENDIF jp ___mbf32_return
18.033333
42
0.757856
7b721eceaeee321328f722476be068efeaf24f97
2,441
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2.log_29_1819.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-8650U_0xd2.log_29_1819.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-8650U_0xd2.log_29_1819.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 %r14 push %rbx push %rcx push %rdx lea addresses_normal_ht+0x1ea3d, %r14 nop nop xor $39430, %rdx mov $0x6162636465666768, %rbx movq %rbx, %xmm2 vmovups %ymm2, (%r14) nop xor %r11, %r11 lea addresses_normal_ht+0xf57d, %r10 nop nop nop and %rcx, %rcx mov (%r10), %r14 nop xor %r10, %r10 pop %rdx pop %rcx pop %rbx pop %r14 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r15 push %r8 push %rax push %rdi // Store lea addresses_normal+0x1c32d, %r8 nop and %r12, %r12 mov $0x5152535455565758, %rax movq %rax, %xmm0 movups %xmm0, (%r8) nop nop nop nop xor $31082, %r8 // Load lea addresses_WC+0x18b7d, %r15 nop nop nop nop inc %r14 mov (%r15), %r12w cmp $56099, %r13 // Store lea addresses_WC+0x18b7d, %rax nop nop nop dec %r15 mov $0x5152535455565758, %r12 movq %r12, %xmm7 movups %xmm7, (%rax) nop nop nop nop nop cmp $30130, %r13 // Store lea addresses_WC+0x497d, %rdi and $23035, %r8 movb $0x51, (%rdi) nop nop cmp %r8, %r8 // Faulty Load lea addresses_WC+0x18b7d, %r13 nop nop nop sub $19683, %r14 mov (%r13), %r12d lea oracles, %r15 and $0xff, %r12 shlq $12, %r12 mov (%r15,%r12,1), %r12 pop %rdi pop %rax pop %r8 pop %r15 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 4, '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': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'58': 29} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
19.220472
129
0.646047
850daa4a28cd4421060508ccb9dbd2a380c9dfee
775
asm
Assembly
programs/oeis/277/A277237.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/277/A277237.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/277/A277237.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A277237: Number of strings of length n composed of symbols from the circular list [1,2,3,4,5,6] such that adjacent symbols in the string must be adjacent in the list. No runs of length 2 or more are allowed for symbols 1, 3 and 5. ; 1,6,15,39,99,255,651,1671,4275,10959,28059,71895,184131,471711,1208235,3095079,7928019,20308335,52020411,133253751,341335395,874350399,2239691979,5737093575,14695861491,37644235791,96427681755,247004624919,632715351939,1620733851615 cal $0,277236 ; Number of strings of length n composed of symbols from the circular list [1,2,3,4] such that adjacent symbols in the string must be adjacent in the list. No runs of length 2 or more are allowed for symbols 1 and 3. mov $1,$0 mul $0,2 sub $1,2 div $1,2 sub $0,$1 add $0,1 mov $1,$0 sub $1,2
59.615385
234
0.770323
1c588a42620fa377242a58290aa9036d31a5cf22
8,463
asm
Assembly
Library/GrObj/UI/uiConvertControl.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/GrObj/UI/uiConvertControl.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/GrObj/UI/uiConvertControl.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1991 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: uiConvertControl.asm AUTHOR: Jon Witort REVISION HISTORY: Name Date Description ---- ---- ----------- jon 24 feb 1992 Initial version. DESCRIPTION: Code for the GrObjConvertControlClass $Id: uiConvertControl.asm,v 1.1 97/04/04 18:06:15 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GrObjUIControllerCode segment resource COMMENT @---------------------------------------------------------------------- MESSAGE: GrObjConvertControlGetInfo -- MSG_GEN_CONTROL_GET_INFO for GrObjConvertControlClass DESCRIPTION: Return group PASS: *ds:si - instance data es - segment of GrObjConvertControlClass ax - The message cx:dx - GenControlBuildInfo structure to fill in RETURN: none DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 10/31/91 Initial version ------------------------------------------------------------------------------@ GrObjConvertControlGetInfo method dynamic GrObjConvertControlClass, MSG_GEN_CONTROL_GET_INFO mov si, offset GOCC_dupInfo call CopyDupInfoCommon ret GrObjConvertControlGetInfo endm GOCC_dupInfo GenControlBuildInfo < mask GCBF_SUSPEND_ON_APPLY, ; GCBI_flags GOCC_IniFileKey, ; GCBI_initFileKey GOCC_gcnList, ; GCBI_gcnList length GOCC_gcnList, ; GCBI_gcnCount GOCC_notifyList, ; GCBI_notificationList length GOCC_notifyList, ; GCBI_notificationCount GOCCName, ; GCBI_controllerName handle GrObjConvertControlUI, ; GCBI_dupBlock GOCC_childList, ; GCBI_childList length GOCC_childList, ; GCBI_childCount GOCC_featuresList, ; GCBI_featuresList length GOCC_featuresList, ; GCBI_featuresCount GOCC_DEFAULT_FEATURES, ; GCBI_features handle GrObjConvertToolControlUI, ; GCBI_dupBlock GOCC_toolList, ; GCBI_childList length GOCC_toolList, ; GCBI_childCount GOCC_toolFeaturesList, ; GCBI_featuresList length GOCC_toolFeaturesList, ; GCBI_featuresCount GOCC_DEFAULT_TOOLBOX_FEATURES, ; GCBI_features GOCC_helpContext> ; GCBI_helpContext if FULL_EXECUTE_IN_PLACE GrObjControlInfoXIP segment resource endif GOCC_helpContext char "dbGrObjConvert", 0 GOCC_IniFileKey char "GrObjConvert", 0 GOCC_gcnList GCNListType \ <MANUFACTURER_ID_GEOWORKS, \ GAGCNLT_APP_TARGET_NOTIFY_GROBJ_BODY_SELECTION_STATE_CHANGE> GOCC_notifyList NotificationType \ <MANUFACTURER_ID_GEOWORKS, GWNT_GROBJ_BODY_SELECTION_STATE_CHANGE> ;--- GOCC_childList GenControlChildInfo \ <offset GrObjConvertToBitmapTrigger, mask GOCCF_CONVERT_TO_BITMAP, mask GCCF_IS_DIRECTLY_A_FEATURE>, <offset GrObjConvertToGraphicTrigger, mask GOCCF_CONVERT_TO_GRAPHIC, mask GCCF_IS_DIRECTLY_A_FEATURE>, <offset GrObjConvertFromGraphicTrigger, mask GOCCF_CONVERT_FROM_GRAPHIC, mask GCCF_IS_DIRECTLY_A_FEATURE> GOCC_featuresList GenControlFeaturesInfo \ <offset GrObjConvertFromGraphicTrigger, ConvertFromGraphicName, 0>, <offset GrObjConvertToGraphicTrigger, ConvertToGraphicName, 0>, <offset GrObjConvertToBitmapTrigger, ConvertToBitmapName, 0> GOCC_toolList GenControlChildInfo \ <offset GrObjConvertToBitmapTool, mask GOCCF_CONVERT_TO_BITMAP, mask GCCF_IS_DIRECTLY_A_FEATURE>, <offset GrObjConvertToGraphicTool, mask GOCCF_CONVERT_TO_GRAPHIC, mask GCCF_IS_DIRECTLY_A_FEATURE>, <offset GrObjConvertFromGraphicTool, mask GOCCF_CONVERT_FROM_GRAPHIC, mask GCCF_IS_DIRECTLY_A_FEATURE> GOCC_toolFeaturesList GenControlFeaturesInfo \ <offset GrObjConvertFromGraphicTool, ConvertFromGraphicName, 0>, <offset GrObjConvertToGraphicTool, ConvertToGraphicName, 0>, <offset GrObjConvertToBitmapTool, ConvertToBitmapName, 0> if FULL_EXECUTE_IN_PLACE GrObjControlInfoXIP ends endif COMMENT @---------------------------------------------------------------------- MESSAGE: GrObjConvertControlUpdateUI -- MSG_GEN_CONTROL_UPDATE_UI for GrObjConvertControlClass DESCRIPTION: Handle notification of type change PASS: *ds:si - instance data es - segment of GrObjConvertControlClass ax - MSG_GEN_CONTROL_UPDATE_UI RETURN: nothing DESTROYED: ax REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jon 11 feb 1992 Initial version ------------------------------------------------------------------------------@ GrObjConvertControlUpdateUI method dynamic GrObjConvertControlClass, MSG_GEN_CONTROL_UPDATE_UI uses cx .enter mov cx, 1 mov ax, mask GOCCF_CONVERT_TO_BITMAP mov si, offset GrObjConvertToBitmapTrigger call GrObjControlUpdateUIBasedOnNumSelectedAndFeatureSet mov si, offset GrObjConvertToBitmapTool call GrObjControlUpdateToolBasedOnNumSelectedAndToolboxFeatureSet mov ax, mask GOCCF_CONVERT_TO_GRAPHIC mov si, offset GrObjConvertToGraphicTrigger call GrObjControlUpdateUIBasedOnNumSelectedAndFeatureSet mov si, offset GrObjConvertToGraphicTool call GrObjControlUpdateToolBasedOnNumSelectedAndToolboxFeatureSet mov cx, mask GSSF_UNGROUPABLE mov ax, mask GOCCF_CONVERT_FROM_GRAPHIC mov si, offset GrObjConvertFromGraphicTrigger call GrObjControlUpdateUIBasedOnSelectionFlagsAndFeatureSet mov si, offset GrObjConvertFromGraphicTool call GrObjControlUpdateToolBasedOnSelectionFlagsAndToolboxFeatureSet .leave ret GrObjConvertControlUpdateUI endm GrObjUIControllerCode ends GrObjUIControllerActionCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GrObjConvertControlConvertToBitmap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: GrObjConvertControl method for MSG_GOCC_CONVERT_TO_BITMAP Called by: Pass: *ds:si = GrObjConvertControl object ds:di = GrObjConvertControl instance Return: nothing Destroyed: ax, bx, di Comments: Revision History: Name Date Description ---- ------------ ----------- jon Feb 24, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GrObjConvertControlConvertToBitmap method dynamic GrObjConvertControlClass, MSG_GOCC_CONVERT_TO_BITMAP .enter mov ax, MSG_GB_CONVERT_SELECTED_GROBJS_TO_BITMAP call GrObjControlOutputActionRegsToBody .leave ret GrObjConvertControlConvertToBitmap endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GrObjConvertControlConvertToGraphic %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: GrObjConvertControl method for MSG_GOCC_CONVERT_TO_GRAPHIC Called by: Pass: *ds:si = GrObjConvertControl object ds:di = GrObjConvertControl instance Return: nothing Destroyed: ax, bx, di Comments: Revision History: Name Date Description ---- ------------ ----------- jon Feb 24, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GrObjConvertControlConvertToGraphic method dynamic GrObjConvertControlClass, MSG_GOCC_CONVERT_TO_GRAPHIC .enter mov ax, MSG_GB_GROUP_SELECTED_GROBJS call GrObjControlOutputActionRegsToBody .leave ret GrObjConvertControlConvertToGraphic endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GrObjConvertControlConvertFromGraphic %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: GrObjConvertControl method for MSG_GOCC_CONVERT_FROM_GRAPHIC Called by: Pass: *ds:si = GrObjConvertControl object ds:di = GrObjConvertControl instance Return: nothing Destroyed: ax, bx, di Comments: Revision History: Name Date Description ---- ------------ ----------- jon Feb 24, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GrObjConvertControlConvertFromGraphic method dynamic GrObjConvertControlClass, MSG_GOCC_CONVERT_FROM_GRAPHIC .enter mov ax, MSG_GB_UNGROUP_SELECTED_GROUPS call GrObjControlOutputActionRegsToBody .leave ret GrObjConvertControlConvertFromGraphic endm GrObjUIControllerActionCode ends
27.656863
109
0.686754
bbcb387daac48ff0972508451b3f2264993f2131
375
asm
Assembly
oeis/008/A008507.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/008/A008507.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/008/A008507.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A008507: Number of odd composite numbers less than n-th odd prime. ; 0,0,0,1,1,2,2,3,5,5,7,8,8,9,11,13,13,15,16,16,18,19,21,24,25,25,26,26,27,33,34,36,36,40,40,42,44,45,47,49,49,53,53,54,54,59,64,65,65,66,68,68,72,74,76,78,78,80,81,81,85,91,92,92,93,99,101,105,105,106,108,111,113,115,116,118 mov $2,$0 seq $0,98090 ; Numbers k such that 2k-3 is prime. sub $0,$2 sub $0,3
46.875
225
0.669333
9182f0293a6f3ecf64f437510699109aa11dbd11
4,000
asm
Assembly
UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmInit.asm
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
4
2017-11-17T21:25:36.000Z
2019-10-08T05:32:00.000Z
UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmInit.asm
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
5
2020-12-25T05:24:37.000Z
2021-01-11T01:01:01.000Z
UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmInit.asm
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
16
2020-07-31T17:57:27.000Z
2021-03-10T14:32:36.000Z
;------------------------------------------------------------------------------ ; ; Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR> ; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BSD License ; which accompanies this distribution. The full text of the license may be found at ; http://opensource.org/licenses/bsd-license.php. ; ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ; ; Module Name: ; ; SmmInit.Asm ; ; Abstract: ; ; Functions for relocating SMBASE's for all processors ; ;------------------------------------------------------------------------------- EXTERNDEF SmmInitHandler:PROC EXTERNDEF gSmmCr0:DWORD EXTERNDEF gSmmCr3:DWORD EXTERNDEF gSmmCr4:DWORD EXTERNDEF gSmmJmpAddr:QWORD EXTERNDEF gcSmmInitTemplate:BYTE EXTERNDEF gcSmmInitSize:WORD EXTERNDEF mRebasedFlag:PTR BYTE EXTERNDEF mSmmRelocationOriginalAddress:QWORD EXTERNDEF mRebasedFlagAddr32:DWORD EXTERNDEF mSmmRelocationOriginalAddressPtr32:DWORD EXTERNDEF gSmmInitStack:QWORD EXTERNDEF gcSmiInitGdtr:FWORD .code gcSmiInitGdtr LABEL FWORD DW 0 DQ 0 SmmStartup PROC DB 66h, 0b8h ; mov eax, imm32 gSmmCr3 DD ? mov cr3, rax DB 66h, 2eh lgdt fword ptr [ebp + (offset gcSmiInitGdtr - SmmStartup)] DB 66h, 0b8h ; mov eax, imm32 gSmmCr4 DD ? or ah, 2 ; enable XMM registers access mov cr4, rax DB 66h mov ecx, 0c0000080h ; IA32_EFER MSR rdmsr or ah, 1 ; set LME bit wrmsr DB 66h, 0b8h ; mov eax, imm32 gSmmCr0 DD ? mov cr0, rax ; enable protected mode & paging DB 66h, 0eah ; far jmp to long mode gSmmJmpAddr DQ @LongMode @LongMode: ; long-mode starts here DB 48h, 0bch ; mov rsp, imm64 gSmmInitStack DQ ? and sp, 0fff0h ; make sure RSP is 16-byte aligned ; ; Accoring to X64 calling convention, XMM0~5 are volatile, we need to save ; them before calling C-function. ; sub rsp, 60h movdqa [rsp], xmm0 movdqa [rsp + 10h], xmm1 movdqa [rsp + 20h], xmm2 movdqa [rsp + 30h], xmm3 movdqa [rsp + 40h], xmm4 movdqa [rsp + 50h], xmm5 add rsp, -20h call SmmInitHandler add rsp, 20h ; ; Restore XMM0~5 after calling C-function. ; movdqa xmm0, [rsp] movdqa xmm1, [rsp + 10h] movdqa xmm2, [rsp + 20h] movdqa xmm3, [rsp + 30h] movdqa xmm4, [rsp + 40h] movdqa xmm5, [rsp + 50h] rsm SmmStartup ENDP gcSmmInitTemplate LABEL BYTE _SmmInitTemplate PROC DB 66h, 2eh, 8bh, 2eh ; mov ebp, cs:[@F] DW @L1 - _SmmInitTemplate + 8000h DB 66h, 81h, 0edh, 00h, 00h, 03h, 00 ; sub ebp, 30000h jmp bp ; jmp ebp actually @L1: DQ SmmStartup _SmmInitTemplate ENDP gcSmmInitSize DW $ - gcSmmInitTemplate SmmRelocationSemaphoreComplete PROC push rax mov rax, mRebasedFlag mov byte ptr [rax], 1 pop rax jmp [mSmmRelocationOriginalAddress] SmmRelocationSemaphoreComplete ENDP ; ; Semaphore code running in 32-bit mode ; SmmRelocationSemaphoreComplete32 PROC ; ; mov byte ptr [], 1 ; db 0c6h, 05h mRebasedFlagAddr32 dd 0 db 1 ; ; jmp dword ptr [] ; db 0ffh, 25h mSmmRelocationOriginalAddressPtr32 dd 0 SmmRelocationSemaphoreComplete32 ENDP END
30.075188
85
0.55775
4d2371b9e397d7526daea35cb2b63673b4742a97
290
asm
Assembly
programs/oeis/010/A010955.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/010/A010955.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/010/A010955.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A010955: Binomial coefficient C(39,n). ; 1,39,741,9139,82251,575757,3262623,15380937,61523748,211915132,635745396,1676056044,3910797436,8122425444,15084504396,25140840660,37711260990,51021117810,62359143990,68923264410,68923264410,62359143990,51021117810,37711260990 mov $1,39 bin $1,$0
48.333333
227
0.837931
6f9526a4185bb52057a1eeb1de2ed69771a9f05a
305
asm
Assembly
oeis/176/A176040.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/176/A176040.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/176/A176040.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A176040: Periodic sequence: Repeat 3, 1. ; Submitted by Christian Krause ; 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1 gcd $0,2 mul $0,2 sub $0,1
38.125
201
0.563934
9530baea5903942c66e78af86194904da66e35cc
248
asm
Assembly
libsrc/_DEVELOPMENT/target/vgl/driver/terminal/vgl_01_output_2000/vgl_01_output_2000_iterm_msg_bell.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
38
2021-06-18T12:56:15.000Z
2022-03-12T20:38:40.000Z
libsrc/_DEVELOPMENT/target/vgl/driver/terminal/vgl_01_output_2000/vgl_01_output_2000_iterm_msg_bell.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
2
2021-06-20T16:28:12.000Z
2021-11-17T21:33:56.000Z
libsrc/_DEVELOPMENT/target/vgl/driver/terminal/vgl_01_output_2000/vgl_01_output_2000_iterm_msg_bell.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
6
2021-06-18T18:18:36.000Z
2021-12-22T08:01:32.000Z
INCLUDE "config_private.inc" SECTION code_driver SECTION code_driver_terminal_output PUBLIC vgl_01_output_2000_iterm_msg_bell EXTERN vgl_01_output_2000_oterm_msg_bell defc vgl_01_output_2000_iterm_msg_bell = vgl_01_output_2000_oterm_msg_bell
19.076923
74
0.903226
3e3a39ad2d822193b96bcb92f51d32bb19b48d3c
3,157
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_1_1449.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_1_1449.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_1_1449.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 %r9 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x3b7d, %rsi lea addresses_A_ht+0xf95d, %rdi nop nop nop nop add $43642, %rdx mov $18, %rcx rep movsq nop nop sub %rdi, %rdi lea addresses_D_ht+0xb6fd, %r11 nop cmp %rbp, %rbp mov (%r11), %r9 nop nop nop nop dec %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %rax push %rbp push %rcx push %rdx push %rsi // Store lea addresses_normal+0xe47d, %rax nop xor $15775, %rcx movw $0x5152, (%rax) add $13454, %rdx // Store lea addresses_A+0x18561, %r12 and %rax, %rax movb $0x51, (%r12) nop nop and $34384, %rcx // Store lea addresses_WC+0x146eb, %r12 nop nop nop sub %r10, %r10 mov $0x5152535455565758, %rbp movq %rbp, %xmm3 movntdq %xmm3, (%r12) nop nop nop nop cmp $6219, %rax // Store lea addresses_normal+0xe47d, %r12 nop nop nop nop nop add $53234, %r10 mov $0x5152535455565758, %rbp movq %rbp, %xmm2 movups %xmm2, (%r12) nop nop and %rax, %rax // Store lea addresses_D+0x7f9d, %r10 nop sub $51250, %rdx movw $0x5152, (%r10) nop nop nop nop cmp $34759, %rbp // Store lea addresses_WT+0xc77d, %rax clflush (%rax) nop nop nop nop nop sub $28816, %rdx movw $0x5152, (%rax) nop nop nop nop xor %rsi, %rsi // Store lea addresses_US+0x1c87d, %r10 nop nop nop nop nop add %r12, %r12 movw $0x5152, (%r10) nop nop nop inc %rcx // Faulty Load lea addresses_normal+0xe47d, %r12 clflush (%r12) nop nop nop add $41146, %r10 mov (%r12), %rdx lea oracles, %r12 and $0xff, %rdx shlq $12, %rdx mov (%r12,%rdx,1), %rdx pop %rsi pop %rdx pop %rcx pop %rbp pop %rax pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A', 'same': False, 'size': 1, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC', 'same': False, 'size': 16, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_normal', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_D', 'same': True, 'size': 2, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_US', 'same': False, 'size': 2, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_normal', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'58': 1} 58 */
17.9375
146
0.642065
38740d13de0c05a7c03976546c9b4366df4b294b
1,082
asm
Assembly
programs/oeis/024/A024053.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/024/A024053.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/024/A024053.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A024053: a(n) = 5^n - n^4. ; 1,4,9,44,369,2500,14329,75724,386529,1946564,9755625,48813484,244119889,1220674564,6103477209,30517527500,152587825089,762939369604,3814697160649,19073486197804,95367431480625,476837158008644,2384185790781369,11920928954798284,59604644775058849,298023223876562500,1490116119384308649,7450580596923296684,37252902984618525969,186264514923094995844,931322574615477705625,4656612873077391654604,23283064365386961842049,116415321826934813267204,582076609134674070929289,2910383045673370359827500,14551915228366851804961009,72759576141834259031328964,363797880709171295163930489,1818989403545856475827764684,9094947017729282379147830625,45474735088646411895749127364,227373675443232059478756653929,1136868377216160297393795409324,5684341886080801486968990392529,28421709430404007434844966602500,142108547152020037174224849038169,710542735760100185871124262698444,3552713678800500929355621332582209,17763568394002504646778106683688324,88817841970012523233890533441015625,444089209850062616169452667229562924 mov $1,5 pow $1,$0 pow $0,4 sub $1,$0 mov $0,$1
120.222222
1,003
0.913124
8e15945e0bebdd9c2f3e55ea4f0855ea8629cbf9
2,815
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_25_565.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_25_565.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_25_565.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 %rbx push %rcx lea addresses_normal_ht+0xbc47, %r15 clflush (%r15) nop nop nop nop nop dec %r9 movw $0x6162, (%r15) nop nop nop nop nop sub $17030, %r14 lea addresses_normal_ht+0x13187, %rbp nop nop dec %rbx mov (%rbp), %cx nop sub $43399, %rbp pop %rcx pop %rbx pop %rbp pop %rax pop %r9 pop %r15 pop %r14 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r15 push %r9 push %rcx push %rdi push %rsi // REPMOV lea addresses_D+0x1987, %rsi lea addresses_WC+0x1f587, %rdi nop nop nop nop add %r9, %r9 mov $61, %rcx rep movsb nop and %r9, %r9 // Store lea addresses_WT+0x138f7, %r10 clflush (%r10) nop nop sub $58216, %r14 mov $0x5152535455565758, %rdi movq %rdi, %xmm6 movups %xmm6, (%r10) nop and %rsi, %rsi // REPMOV lea addresses_UC+0x12087, %rsi lea addresses_D+0x13987, %rdi clflush (%rdi) and %r15, %r15 mov $56, %rcx rep movsl nop nop nop nop sub $32708, %rdi // Store mov $0x7e1e00000000187, %rsi sub %r10, %r10 movw $0x5152, (%rsi) // Exception!!! nop nop nop nop mov (0), %r15 nop nop dec %rsi // Load lea addresses_D+0x13b87, %rsi and $35682, %rdi vmovups (%rsi), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $1, %xmm2, %r11 xor %r10, %r10 // Faulty Load lea addresses_D+0x1987, %rdi nop nop dec %r15 mov (%rdi), %ecx lea oracles, %r10 and $0xff, %rcx shlq $12, %rcx mov (%r10,%rcx,1), %rcx pop %rsi pop %rdi pop %rcx pop %r9 pop %r15 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_D', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_WC', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_D', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': True}} {'36': 25} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
18.766667
142
0.642629
95859c57ca24370c39231d99ae5b0738e2a1a5d5
2,169
asm
Assembly
libsrc/_DEVELOPMENT/math/integer/fast/l_fast_divs_16_16x16.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/integer/fast/l_fast_divs_16_16x16.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/integer/fast/l_fast_divs_16_16x16.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
SECTION code_math PUBLIC l_fast_divs_16_16x16, l0_fast_divs_16_16x16 EXTERN l0_fast_divu_16_16x16, error_divide_by_zero_mc ; alternate entry to swap dividend / divisor ex de,hl l_fast_divs_16_16x16: ; signed division of two 16-bit numbers ; ; enter : hl = 16-bit dividend ; de = 16-bit divisor ; ; exit : success ; ; hl = hl / de ; de = hl % de ; carry reset ; ; divide by zero ; ; hl = INT_MAX or INT_MIN ; de = dividend ; carry set, errno = EDOM ; ; uses : af, bc, de, hl ; test for divide by zero ld a,d or e jr z, divide_by_zero l0_fast_divs_16_16x16: ; C standard requires that the result of division satisfy ; a = (a/b)*b + a%b ; remainder takes sign of the dividend ld b,h ; b = MSB of dividend ld c,d ; c = MSB of divisor push bc ; save sign info ld a,h rla jr nc, dividend_ok xor a sub l ld l,a sbc a,a sub h ld h,a ; take absolute value of dividend dividend_ok: ld a,d rla jr nc, divisor_ok xor a sub e ld e,a sbc a,a sub d ld d,a ; take absolute value of divisor divisor_ok: ; perform unsigned division call l0_fast_divu_16_16x16 ; hl = unsigned quotient ; de = unsigned remainder pop bc ; bc = sign info ld a,b xor c jp p, quotient_ok xor a sub l ld l,a sbc a,a sub h ld h,a ; negate quotient if signs differ or a quotient_ok: bit 7,b ret z ; if dividend > 0 xor a sub e ld e,a sbc a,a sub d ld d,a ; make remainder negative or a ret divide_by_zero: ex de,hl ; de = dividend call error_divide_by_zero_mc ld h,$7f ; hl = INT_MAX bit 7,d ret z ; if dividend > 0 inc hl ; hl = INT_MIN ret
17.491935
64
0.496542
5be0e32d3eb095eeb3b74f8da517a7c998912413
150
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_ix/___fsmul_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_ix/___fsmul_callee.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/c/sdcc_ix/___fsmul_callee.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 ___fsmul_callee EXTERN cm48_sdccixp_dsmul_callee defc ___fsmul_callee = cm48_sdccixp_dsmul_callee
15
48
0.886667
842821f1bf16d5a9e9ad388bc7ffc582e2f14ec9
4,355
asm
Assembly
Cdata.asm
ItaiCuker/Assembly8086CrossyRoad
414e0403edebe376f1151b965daafb9f27c48f7e
[ "MIT" ]
null
null
null
Cdata.asm
ItaiCuker/Assembly8086CrossyRoad
414e0403edebe376f1151b965daafb9f27c48f7e
[ "MIT" ]
null
null
null
Cdata.asm
ItaiCuker/Assembly8086CrossyRoad
414e0403edebe376f1151b965daafb9f27c48f7e
[ "MIT" ]
null
null
null
;vars of file filename dw ? ; משתנה ששמים בו את הכתובת של התמונה filePos dw ? ; המיקום של התמונה במסך filehandle dw ? ; פעולות ההדפסה של התמונה משתמשות בו כדי לדעת מה התמונה filewidth dw ? ; רוחב התמונה fileheight dw ? ; גובה התמונה Header db 54 dup (0) ; הכותרת של התמונה ( מועתק לשם המידע לגבי התמונה) Palette db 256*4 dup (0) ; הפלטה של התמונה ScrLine db 320 dup (0) ; מועבר לשם כל פעם שורה מהתמונה כדי להעתיק ErrorMsg db 'Error', 13, 10,'$' ; אם יש בעיה בפתיחה של הקובץ (תמונה) אז זה יודפס ;Time var Clock equ es:6ch ; המקום בזיכרון שבו יש את השעה ;pictures background db 'test.bmp',0 ; התמונה משמשת כהדפסה הראשונית של הרקע של המשחק status db 'Status.bmp',0 ; התמונה משמשת כסטטוס של המשחק ( החלק הכחול שלמעלה) menu db 'MENU.bmp',0 ; התמונה של המסך התחלה של המשחק instructions db 'Instruct.bmp',0 ; התמונה של ההסבר על המשחק pauseM db 'pause.bmp',0 ; (כשלוחצים esc) תמונה העצירה של המשחק hitM db 'death.bmp',0 ; תמונת פסילה של המשחק (כשהשחקן נפסל) pauseKeep db 160*56 dup (?) ; שומר את המשחק מאוחרי מסך העצירה pauseMask db 160*56 dup (0) ; מוחק את הרקע איפה שמסך העצירה יודפס כדי להחזיר אותו אם המשתמש ירצה ;proc used vars widthh dw ? ; משתנה בשימוש כללי. רוחב height dw ? ;משתנה בשימוש כללי. גובה Pos dw ? ; משתנה בשימוש כללי. מיקום במסך ;chicken vars ;dimensions of chicken c_height dw 15 ; גובה של ציור הציפור c_width dw 11 ; רוחב של ציור הציפור ;location of chicken c_y dw 12 ; מיקום בציר הוואי של הציפור c_x dw 10 ; מיקום בציר האיקס של הציפור ;positions of chicken c_pos dw 170*320+146 ; מיקום נוכחי של הציפור c_oldPos dw 170*320+146 ; המיקום הקודם של הציפור ;photos of chicken lastC dw offset chickenUp ; התמונה האחרונה של הציפור c_Scrkeep db 15*11 dup (28h) ; שומר את הרקע מאחורי הציפור ;sidewalk/road vars sr_road db 320*15 dup (0) ; המשתנה שמדפיסים איתו את הכביש sr_grass db 320*15 dup (28h) ; המשתנה שמדפיסים איתו את המדרכה sr_height dw 15 ; גובה מדרכה/כביש sr_width dw 320 ; רוחב מדרכה/כביש ;car vars car_height dw 10 ; גובה מכונית car_width dw 22 ; רוחב מכונית color db ? ; צבע המכונית lastpos dw ? ; המיקום האחרון של מכונית בכביש ;Array vars. cell dw 0 ; מס' התא במערך הדו מימדי row dw 0 ; מס' הטור במערך הדו מימדי linePos dw 0 ; המיקום של כביש/מדרכה במסך ; המערך של המשחק. להלן תוכן התאים ; linePos, road/grass, speed of road, timer of road, direction of road, number of cars, pos1, col1, pos2, col2, pos3, col3, pos4, col4 ; המערך בגודל 12 שורות על 14 תאים worldArr dw 1900h,0,0,0,0,0,0,0,0,0,0,0,0,0 dw 2bc0h,0,0,0,0,0,0,0,0,0,0,0,0,0 dw 3e80h,0,0,0,0,0,0,0,0,0,0,0,0,0 dw 5140h,0,0,0,0,0,0,0,0,0,0,0,0,0 dw 6400h,0,0,0,0,0,0,0,0,0,0,0,0,0 dw 76c0h,0,0,0,0,0,0,0,0,0,0,0,0,0 dw 8980h,0,0,0,0,0,0,0,0,0,0,0,0,0 dw 9c40h,0,0,0,0,0,0,0,0,0,0,0,0,0 dw 0af00h,0,0,0,0,0,0,0,0,0,0,0,0,0 dw 0c1c0h,0,0,0,0,0,0,0,0,0,0,0,0,0 dw 0d480h,0,0,0,0,0,0,0,0,0,0,0,0,0 dw 0e740h,0,0,0,0,0,0,0,0,0,0,0,0,0 ;line vars. roadCount db 0 ; המשתנה אוגר כמה כבישים היו ברצף lastLine db 0 ; המשתנה אוגר אם השורה האחרונה הייתה כביש או מדרכה ;Randomizer vars Seed dw 0 ; משתנה המס' האחרון של הרנדומיזר והמס' ההתחלתי שלו seedCount db 0 ; משתנה צובר כדי לבדוק מה גודל הסדרה של המס' הרנדומלים shrSize db ? ; משתנה שמגדיר מה יהיה גודל המס' הרנדומלי ע"י שימוש ב shr randNum dw ? ; המס' הרנדומלי ;difficulty vars Dif_speed dw 0 ; צובר את מס' השורות החדשות כדי לשנות את המהירות המינימלית DIf_carN dw 0 ; צובר את מס' השורות כדי לשנות את מס' המכוניות המינימלי minCars dw 1 ; מס' המכוניות המינימלי minSpeed dw 0fh ; מהירות המכונית המינימלית ;Score variables score dw 0 ; הניקוד של המשחק topScore dw 0 ; השיא של אותה הרצה של המשחק divisorArr dw 10000,1000,100,10,1,0 ; מערך של מס' בעלי מס' ספרות שונה כדי לקבל את הספרה בכל קפיצה
50.057471
135
0.602755
ce1d5d5d8643c9bc2c64d52681e21bd5208ab895
706
asm
Assembly
programs/oeis/130/A130857.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/130/A130857.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/130/A130857.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A130857: a(n) = (n-1)*n*(n+1)*(n+2)*(2n+11)/120. ; 0,3,17,57,147,322,630,1134,1914,3069,4719,7007,10101,14196,19516,26316,34884,45543,58653,74613,93863,116886,144210,176410,214110,257985,308763,367227,434217,510632,597432,695640,806344,930699,1069929 mov $14,$0 mov $16,$0 lpb $16,1 clr $0,14 mov $0,$14 sub $16,1 sub $0,$16 mov $11,$0 mov $13,$0 lpb $13,1 clr $0,11 mov $0,$11 sub $13,1 sub $0,$13 mov $8,$0 mov $10,$0 lpb $10,1 mov $0,$8 sub $10,1 sub $0,$10 mov $1,$0 mul $0,5 mul $1,2 mov $2,$0 div $2,5 pow $2,2 add $1,$2 add $9,$1 lpe add $12,$9 lpe add $15,$12 lpe mov $1,$15
18.578947
201
0.529745
7a16bd6d64b00c852c81e4969814cd12321ba8c2
9,771
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_881_974.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_881_974.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_881_974.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r8 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_normal_ht+0x1b835, %rcx nop sub $18820, %r13 mov (%rcx), %eax sub $30841, %rax lea addresses_D_ht+0x73d5, %r8 nop dec %r9 mov $0x6162636465666768, %r10 movq %r10, %xmm4 and $0xffffffffffffffc0, %r8 vmovaps %ymm4, (%r8) nop nop nop sub $41871, %rcx lea addresses_A_ht+0xca45, %rsi lea addresses_A_ht+0x1d715, %rdi nop nop nop add %r8, %r8 mov $20, %rcx rep movsl nop sub $24163, %rax lea addresses_UC_ht+0x1df15, %rsi lea addresses_WT_ht+0x9315, %rdi and %r8, %r8 mov $45, %rcx rep movsw nop dec %rax lea addresses_D_ht+0x13f15, %rsi lea addresses_WC_ht+0x4f15, %rdi nop dec %rax mov $49, %rcx rep movsw nop xor $2562, %rcx lea addresses_WT_ht+0x315, %rsi nop nop nop and %r13, %r13 movups (%rsi), %xmm6 vpextrq $0, %xmm6, %r8 nop nop nop dec %rcx lea addresses_D_ht+0x1af25, %rdi cmp %r10, %r10 movb (%rdi), %r13b nop sub $1606, %rsi lea addresses_UC_ht+0xdf15, %rcx nop nop nop nop add $36151, %rdi mov $0x6162636465666768, %r8 movq %r8, %xmm7 and $0xffffffffffffffc0, %rcx vmovntdq %ymm7, (%rcx) nop nop xor %rcx, %rcx lea addresses_WC_ht+0x15d0e, %rax nop nop nop nop nop sub $30470, %rcx movb $0x61, (%rax) nop nop nop xor $40963, %rdi lea addresses_UC_ht+0x7915, %r9 nop nop nop add $62986, %rax movups (%r9), %xmm4 vpextrq $1, %xmm4, %r10 cmp $60080, %rsi lea addresses_A_ht+0x15f27, %rcx nop nop nop nop and $43057, %r13 movups (%rcx), %xmm4 vpextrq $1, %xmm4, %r10 nop nop nop nop and $1487, %rdi lea addresses_normal_ht+0x6895, %rsi lea addresses_UC_ht+0x1b915, %rdi nop sub %r9, %r9 mov $57, %rcx rep movsq nop nop nop nop sub $45209, %rax lea addresses_D_ht+0x11115, %r8 nop cmp $38990, %rax movb $0x61, (%r8) nop nop nop nop nop add %rcx, %rcx lea addresses_A_ht+0x4835, %rax xor $18086, %rdi mov (%rax), %r8w nop sub %rcx, %rcx lea addresses_WT_ht+0x4315, %r9 clflush (%r9) nop xor %rdi, %rdi mov $0x6162636465666768, %rax movq %rax, %xmm2 and $0xffffffffffffffc0, %r9 vmovaps %ymm2, (%r9) nop nop nop sub %r9, %r9 pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r9 push %rcx push %rdi push %rsi // Load lea addresses_RW+0x19495, %rdi nop nop nop sub %r13, %r13 mov (%rdi), %esi nop nop nop nop and $15550, %r9 // Store lea addresses_RW+0xad15, %r9 nop nop sub %r12, %r12 mov $0x5152535455565758, %rdi movq %rdi, (%r9) nop nop nop nop nop xor %rsi, %rsi // Store lea addresses_A+0xc8eb, %r9 nop nop add %r13, %r13 movl $0x51525354, (%r9) nop nop and $6940, %r12 // Store lea addresses_UC+0x1f7c5, %rcx nop nop sub %r14, %r14 mov $0x5152535455565758, %r9 movq %r9, %xmm3 movups %xmm3, (%rcx) nop nop nop nop dec %r12 // Store lea addresses_PSE+0x1b515, %r12 and %r9, %r9 movl $0x51525354, (%r12) nop nop nop nop xor %r9, %r9 // Store lea addresses_UC+0xa595, %r9 nop nop nop xor %rdi, %rdi mov $0x5152535455565758, %r12 movq %r12, (%r9) nop nop inc %r12 // Store lea addresses_normal+0x18f15, %rdi nop cmp $1980, %r9 movw $0x5152, (%rdi) nop nop nop nop nop xor $36709, %r9 // Store lea addresses_normal+0xb4f5, %rdi clflush (%rdi) nop add %r14, %r14 mov $0x5152535455565758, %r9 movq %r9, %xmm3 movups %xmm3, (%rdi) cmp %rsi, %rsi // Store lea addresses_A+0x12315, %r12 add %r9, %r9 mov $0x5152535455565758, %rsi movq %rsi, %xmm1 movaps %xmm1, (%r12) nop dec %r12 // Faulty Load lea addresses_normal+0x2f15, %rsi nop nop nop cmp %r9, %r9 vmovups (%rsi), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $0, %xmm5, %r12 lea oracles, %rdi and $0xff, %r12 shlq $12, %r12 mov (%rdi,%r12,1), %r12 pop %rsi pop %rdi pop %rcx pop %r9 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6, 'same': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_RW'}, 'OP': 'STOR'} {'dst': {'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'} {'dst': {'NT': True, 'AVXalign': True, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 5, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'src': {'congruent': 11, 'same': True, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'dst': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'34': 881} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
29.430723
2,642
0.650803
87352facd63f0ff21902a61c5b45482c3d09ce5b
309
asm
Assembly
programs/oeis/089/A089207.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/089/A089207.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/089/A089207.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A089207: a(n) = 4n^3 + 2n^2. ; 6,40,126,288,550,936,1470,2176,3078,4200,5566,7200,9126,11368,13950,16896,20230,23976,28158,32800,37926,43560,49726,56448,63750,71656,80190,89376,99238,109800,121086,133120,145926,159528,173950,189216 add $0,1 mul $0,2 mov $1,$0 pow $0,2 pow $1,3 add $1,$0 div $1,4 mul $1,2
25.75
202
0.711974
e58bbff3cef6d71de54171cafb6fc2a27e6066c3
1,848
asm
Assembly
src/XenobladeChroniclesX/Mods/CollectiblesCatchRange/patch_catch.asm
lilystudent2016/cemu_graphic_packs
a7aaa6d07df0d5ca3f6475d741fb8b80fadd1a46
[ "CC0-1.0" ]
1,002
2017-01-10T13:10:55.000Z
2020-11-20T18:34:19.000Z
src/XenobladeChroniclesX/Mods/CollectiblesCatchRange/patch_catch.asm
lilystudent2016/cemu_graphic_packs
a7aaa6d07df0d5ca3f6475d741fb8b80fadd1a46
[ "CC0-1.0" ]
347
2017-01-11T21:13:20.000Z
2020-11-27T11:33:05.000Z
src/XenobladeChroniclesX/Mods/CollectiblesCatchRange/patch_catch.asm
lilystudent2016/cemu_graphic_packs
a7aaa6d07df0d5ca3f6475d741fb8b80fadd1a46
[ "CC0-1.0" ]
850
2017-01-10T06:06:43.000Z
2020-11-06T21:16:49.000Z
[XCX_COLLECTIBLESRANGE_ALL] moduleMatches = 0xF882D5CF, 0x30B6E091, 0xAB97DE6B ; 1.0.1E, 1.0.2U, 1.0.1U .origin = codecave ; ---------------------------------------------------------------------------- ; WHO : cfs::CfPopManagerItem::updateTouchItem((void)) ; WHAT : Initialize collectibles distance _rangeInnerConst: .float 40.0 _heightInnerConst: .float 8.0 _rangeDollConst: .float 64.0 _heightDollConst: .float 64.0 _rangeFlightConst: .float 64.0 _heightFlightConst: .float 52.0 _itemRangeInner: lis r5, _rangeInnerConst@ha lfs f10, _rangeInnerConst@l(r5) fadd f10, f9, f10 blr _itemHeightInner: lis r5, _heightInnerConst@ha lfs f12, _heightInnerConst@l(r5) fadd f12, f10, f12 blr _itemRangeDoll: lis r5, _rangeDollConst@ha lfs f9, _rangeDollConst@l(r5) fadd f9, f6, f9 blr _itemHeightDoll: lis r5, _heightDollConst@ha lfs f10, _heightDollConst@l(r5) fadd f10, f7, f10 blr _itemRangeFlight: lis r5, _rangeFlightConst@ha lfs f10, _rangeFlightConst@l(r5) fadd f10, f12, f10 blr _itemHeightFlight: lis r5, _heightFlightConst@ha lfs f0, _heightFlightConst@l(r5) fadd f0, f13, f0 blr [XCX_COLLECTIBLESRANGE] ################################################################################################# moduleMatches = 0xF882D5CF, 0x30B6E091 ; 1.0.1E, 1.0.2U 0x02389B80 = bla _itemRangeInner 0x02389BB8 = bla _itemHeightInner 0x02389C3C = bla _itemRangeDoll 0x02389C74 = bla _itemHeightDoll 0x02389CEC = bla _itemRangeFlight 0x02389D30 = bla _itemHeightFlight [XCX_COLLECTIBLESRANGE_1U] ################################################################################################# moduleMatches = 0xAB97DE6B ; 1.0.1U 0x02389B10 = bla _itemRangeInner 0x02389B48 = bla _itemHeightInner 0x02389BCC = bla _itemRangeDoll 0x02389C04 = bla _itemHeightDoll 0x02389C7C = bla _itemRangeFlight 0x02389CC0 = bla _itemHeightFlight
23.692308
124
0.67316
0ab05af595f61dea2dac26085fc3e075709e0227
1,356
asm
Assembly
src/test/ref/intermediates-struct.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/test/ref/intermediates-struct.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/test/ref/intermediates-struct.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
// Test intermediate vars // Commodore 64 PRG executable file .file [name="intermediates-struct.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) .const OFFSET_STRUCT_DATA_D = 1 .const SIZEOF_STRUCT_DATA = 2 .label SCREEN = $400 .segment Code main: { .label x = 2 .label y = 4 // struct Data x = sum(1,2) ldx #2 lda #1 jsr sum // struct Data x = sum(1,2) ldy #SIZEOF_STRUCT_DATA !: lda sum.return-1,y sta x-1,y dey bne !- // SCREEN[idx++] = x.c lda.z x sta SCREEN // struct Data y = sum(3, 4) ldx #4 lda #3 jsr sum // struct Data y = sum(3, 4) ldy #SIZEOF_STRUCT_DATA !: lda sum.return-1,y sta y-1,y dey bne !- // SCREEN[idx++] = y.d lda.z y+OFFSET_STRUCT_DATA_D sta SCREEN+1 // } rts } // __zp(6) struct Data sum(__register(A) char a, __register(X) char b) sum: { .label return = 6 .label d = 8 // a+b stx.z $ff clc adc.z $ff // struct Data d = { a+b, b } sta.z d stx.z d+OFFSET_STRUCT_DATA_D // return d; ldy #SIZEOF_STRUCT_DATA !: lda d-1,y sta return-1,y dey bne !- // } rts }
19.652174
71
0.575221
0e2efaa754f10fae7479842ec53aa4eb6d752c90
788
asm
Assembly
examples/mix-c-asm/sources/mynum-v850.asm
JohnHau/cmake-tutorial
7ba24e39927fd506ba65fe5387e0b847906030cd
[ "MIT" ]
14
2021-11-12T05:30:26.000Z
2022-03-24T07:03:18.000Z
examples/mix-c-asm/sources/mynum-v850.asm
JohnHau/cmake-tutorial
7ba24e39927fd506ba65fe5387e0b847906030cd
[ "MIT" ]
3
2021-10-21T03:13:51.000Z
2022-02-14T15:45:25.000Z
examples/mix-c-asm/sources/mynum-v850.asm
JohnHau/cmake-tutorial
7ba24e39927fd506ba65fe5387e0b847906030cd
[ "MIT" ]
4
2021-11-05T09:40:17.000Z
2022-03-27T12:11:02.000Z
NAME mynum RSEG CSTACK:DATA:SORT:NOROOT(2) EXTERN ?longjmp10 EXTERN ?longjmp2 EXTERN ?longjmp6 EXTERN ?setjmp10 EXTERN ?setjmp2 EXTERN ?setjmp6 PUBWEAK ?setjmp_save_lock10 PUBWEAK ?setjmp_save_lock2 PUBWEAK ?setjmp_save_lock6 PUBLIC mynum RSEG `CODE`:CODE:NOROOT(2) CODE mynum: MOVEA 42,zero,r1 JMP [lp] RSEG `CODE`:CODE:NOROOT(2) ?setjmp_save_lock10: REQUIRE ?setjmp10 REQUIRE ?longjmp10 RSEG `CODE`:CODE:NOROOT(2) ?setjmp_save_lock6: REQUIRE ?setjmp6 REQUIRE ?longjmp6 RSEG `CODE`:CODE:NOROOT(2) ?setjmp_save_lock2: REQUIRE ?setjmp2 REQUIRE ?longjmp2 END
19.7
39
0.568528
b1a804cbac0cd5884cbf7e4fb11154f8d40eac99
1,314
asm
Assembly
programs/oeis/004/A004116.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/004/A004116.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/004/A004116.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A004116: a(n) = floor((n^2 + 6n - 3)/4). ; 1,3,6,9,13,17,22,27,33,39,46,53,61,69,78,87,97,107,118,129,141,153,166,179,193,207,222,237,253,269,286,303,321,339,358,377,397,417,438,459,481,503,526,549,573,597,622,647,673,699,726,753,781,809,838,867,897,927,958,989,1021,1053,1086,1119,1153,1187,1222,1257,1293,1329,1366,1403,1441,1479,1518,1557,1597,1637,1678,1719,1761,1803,1846,1889,1933,1977,2022,2067,2113,2159,2206,2253,2301,2349,2398,2447,2497,2547,2598,2649,2701,2753,2806,2859,2913,2967,3022,3077,3133,3189,3246,3303,3361,3419,3478,3537,3597,3657,3718,3779,3841,3903,3966,4029,4093,4157,4222,4287,4353,4419,4486,4553,4621,4689,4758,4827,4897,4967,5038,5109,5181,5253,5326,5399,5473,5547,5622,5697,5773,5849,5926,6003,6081,6159,6238,6317,6397,6477,6558,6639,6721,6803,6886,6969,7053,7137,7222,7307,7393,7479,7566,7653,7741,7829,7918,8007,8097,8187,8278,8369,8461,8553,8646,8739,8833,8927,9022,9117,9213,9309,9406,9503,9601,9699,9798,9897,9997,10097,10198,10299,10401,10503,10606,10709,10813,10917,11022,11127,11233,11339,11446,11553,11661,11769,11878,11987,12097,12207,12318,12429,12541,12653,12766,12879,12993,13107,13222,13337,13453,13569,13686,13803,13921,14039,14158,14277,14397,14517,14638,14759,14881,15003,15126,15249,15373,15497,15622,15747,15873,15999 add $0,4 mov $1,$0 pow $1,2 div $1,4 sub $1,3
146
1,223
0.773973
b91be9e8d93659e8749011f204c6ee88817571c5
505
asm
Assembly
programs/oeis/294/A294017.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/294/A294017.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/294/A294017.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A294017: Partial sums of A294016. ; 1,5,12,26,43,73,106,154,211,285,362,472,585,719,872,1056,1243,1473,1706,1984,2285,2615,2948,3354,3773,4225,4704,5240,5779,6403,7030,7720,8441,9203,9992,10892,11795,12743,13726,14810,15897,17093,18292,19572,20919,22319,23722,25278,26851,28511,30214,32010,33809 lpb $0 mov $2,$0 sub $0,1 seq $2,294016 ; a(n) = sum of all divisors of all positive integers <= n, minus the sum of remainders of n mod k, for k = 1, 2, 3, ..., n. add $1,$2 lpe add $1,1 mov $0,$1
42.083333
261
0.70099
21e115bf188884845433f3a88665421afa8bc3e2
474
asm
Assembly
examples/audio_beep.asm
KCreate/mos6502
78f9128d991c8e47f4f8dfc5324ccaf18e1a85fb
[ "MIT" ]
13
2018-03-03T15:08:32.000Z
2022-03-16T20:57:25.000Z
examples/audio_beep.asm
KCreate/mos6502
78f9128d991c8e47f4f8dfc5324ccaf18e1a85fb
[ "MIT" ]
null
null
null
examples/audio_beep.asm
KCreate/mos6502
78f9128d991c8e47f4f8dfc5324ccaf18e1a85fb
[ "MIT" ]
null
null
null
; this program beeps audio channel 1 ; some commonly used addresses .def ADDR_CLOCK1 0x4906 .def ADDR_AUDIO1 0x4908 .RST ; setup the audio channel lda #$D1 sta ADDR_AUDIO1 ; setup toggle byte lda #$18 sta TOGGLE ; setup the clock lda #$16 sta ADDR_CLOCK1 ; loop .LOOP nop jmp .LOOP .IRQ lda ADDR_AUDIO1 ldx TOGGLE sta TOGGLE txa sta ADDR_AUDIO1 rti ; used to store the last value inside audio channel 1 .org 0x00 .BYTE TOGGLE
12.810811
55
0.694093
3bef946a255c5a198cda79b271dedc27a088915d
3,355
asm
Assembly
Modellazione_e_analisi_di_sistemi/eclipse_workspace_mas/esercizi/scaricati/producerConsumerRaff.asm
katema-official/Universita_magistrale_anno_1.2
8123bef1e519e1047bc359499fc2d8f229a19363
[ "MIT" ]
null
null
null
Modellazione_e_analisi_di_sistemi/eclipse_workspace_mas/esercizi/scaricati/producerConsumerRaff.asm
katema-official/Universita_magistrale_anno_1.2
8123bef1e519e1047bc359499fc2d8f229a19363
[ "MIT" ]
null
null
null
Modellazione_e_analisi_di_sistemi/eclipse_workspace_mas/esercizi/scaricati/producerConsumerRaff.asm
katema-official/Universita_magistrale_anno_1.2
8123bef1e519e1047bc359499fc2d8f229a19363
[ "MIT" ]
null
null
null
asm producerConsumerRaff //Produttore - Consumatore // - un solo produttore ed un solo consumatore // - ogni product prodotto dal produttore viene consumato dal consumatore // - gli accessi al buffer devono essere sincronizzati //la funzione booleana waiting($b in Buffer) dice se un agente e' in attesa del //buffer. Un agente in attesa sul buffer viene opportunamente svegliato. //il buffer e' modellato in modo esplicito. //il produttore ed il consumatore si mettono in wait sul buffer import ../StandardLibrary signature: domain Producer subsetof Agent domain Consumer subsetof Agent dynamic abstract domain Products abstract domain Buffer dynamic controlled waiting: Buffer -> Agent // agente in attesa sul buffer (non una lista. Solo un agente puo' essere in attesa) dynamic controlled run: Agent -> Boolean // se l'agente puo' eseguire le sue azioni dynamic controlled inBuffer: Buffer -> Products // contenuto del buffer dynamic controlled consumedProducts: Consumer -> Powerset(Products) // prodotti consumati static producer: Producer static consumer: Consumer static buffer: Buffer definitions: rule r_writeBuffer($b in Buffer, $p in Products) = inBuffer($b) := $p // mette il prodotto nel buffer rule r_readBuffer($b in Buffer) = par consumedProducts(self) := including(consumedProducts(self), inBuffer($b)) //legge il valore dal buffer inBuffer($b) := undef // svuota il buffer endpar //l'agent si mette in attesa sul buffer rule r_waiting($b in Buffer) = par waiting($b) := self run(self) := false endpar //sveglia l'agente che e' in attesa sul buffer rule r_notify($b in Buffer) = run(waiting($b)) := true rule r_produce = if(run(self)) then par extend Products with $newProduct do r_writeBuffer[buffer, $newProduct] // mette il prodotto sul buffer r_waiting[buffer] // si mette in attesa sul buffer r_notify[buffer] // dice al buffer di svegliare l'agente in attesa endpar endif rule r_consume = if(run(self)) then par r_readBuffer[buffer] // legge un prodotto dal buffer r_waiting[buffer] // si mette in attesa sul buffer r_notify[buffer] // dice al buffer di svegliare l'agente in attesa endpar endif //quando il produttore e' in esecuzione il buffer deve essere vuoto (undef) invariant over buffer: run(producer) iff isUndef(inBuffer(buffer)) //quando il consumatore e' in esecuzione il buffer deve essere pieno invariant over buffer: run(consumer) iff isDef(inBuffer(buffer)) //se un elemento e' sul buffer non e' tra gli elementi consumati dal consumatore invariant over buffer: isDef(inBuffer(buffer)) implies not(contains(consumedProducts(consumer), inBuffer(buffer))) //il produttore e il consumatore non sono mai in esecuzione nello stesso momento invariant over run: run(producer) xor run(consumer) //il consumatore consuma tutti i prodotti generati dal produttore invariant over run: run(producer) implies (forall $p in Products with contains(consumedProducts(consumer), $p)) main rule r_Main = par program(producer) program(consumer) endpar default init s0: function waiting($b in Buffer) = consumer function run($a in Agent) = if($a=producer) then true else false endif function consumedProducts($c in Consumer) = {} agent Producer: r_produce[] agent Consumer: r_consume[]
33.217822
129
0.743666
e4f304767045e5491d709c357705025754971b06
1,850
asm
Assembly
chrissalo/dot1.asm
mikepea/vectrex-playground
0de7d2d6db0914d915f4334402f747ab3bcdc7e6
[ "0BSD" ]
5
2018-01-14T10:03:50.000Z
2020-01-17T13:53:49.000Z
chrissalo/dot1.asm
mikepea/vectrex-playground
0de7d2d6db0914d915f4334402f747ab3bcdc7e6
[ "0BSD" ]
null
null
null
chrissalo/dot1.asm
mikepea/vectrex-playground
0de7d2d6db0914d915f4334402f747ab3bcdc7e6
[ "0BSD" ]
null
null
null
;*************************************************************************** ; DEFINE SECTION ;*************************************************************************** include "VECTREX.I" ; vectrex function includes ; start of vectrex memory with cartridge name... org 0 ;*************************************************************************** ; HEADER SECTION ;*************************************************************************** db "g GCE 1998", $80 ; 'g' is copyright sign dw music1 ; music from the rom db $F8, $50, $20, -$56 ; height, width, rel y, rel x ; (from 0,0) db "PLOT A DOT",$80 ; some game information, ; ending with $80 db 0 ; end of game header ;*************************************************************************** ; CODE SECTION ;*************************************************************************** ; here the cartridge program starts off main: jsr Wait_Recal ; Vectrex BIOS recalibration jsr Intensity_5F ; Sets the intensity of the ; vector beam to $5f ; special attention here!!! jsr Dot_here ; Plot a dot at the center of ; the screen bra main ; and repeat forever ;*************************************************************************** end main ;***************************************************************************
57.8125
77
0.257838
3e2dff68f65539eea66b812187ea7f664f9002a8
726
asm
Assembly
ch11/Keybd.asm
William0Friend/my_masm
e8073266c03c01424ad84b9ed9cf13e9da1eabb1
[ "Apache-2.0" ]
null
null
null
ch11/Keybd.asm
William0Friend/my_masm
e8073266c03c01424ad84b9ed9cf13e9da1eabb1
[ "Apache-2.0" ]
null
null
null
ch11/Keybd.asm
William0Friend/my_masm
e8073266c03c01424ad84b9ed9cf13e9da1eabb1
[ "Apache-2.0" ]
null
null
null
; Keyboard Toggle Keys (Keybd.asm) ; This program shows how to detect the states of various ; keyboard toggle keys. Before you run the program, hold ; down a selected key. INCLUDE Irvine32.inc INCLUDE Macros.inc ; GetKeyState sets bit 0 in EAX if a toggle key is ; currently on (CapsLock, NumLock, ScrollLock). ; It sets the high bit of EAX if the specified key is ; currently down. .code main PROC INVOKE GetKeyState, VK_NUMLOCK test al,1 .IF !Zero? mWrite <"The NumLock key is ON",0dh,0ah> .ENDIF INVOKE GetKeyState, VK_LSHIFT call DumpRegs test eax,80000000h .IF !Zero? mWrite <"The Left Shift key is currently DOWN",0dh,0ah> .ENDIF exit main ENDP END main
22
59
0.694215
d544218b120b4b9fbd95aa2da120960688161645
762
asm
Assembly
programs/oeis/186/A186226.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/186/A186226.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/186/A186226.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A186226: Adjusted joint rank sequence of (g(j)) and (f(i)) with f(i) after g(j) when f(i)=g(j), where f and g are the triangular numbers and pentagonal numbers. Complement of A186225. ; 1,4,7,10,12,15,18,21,23,26,29,31,34,37,40,42,45,48,51,53,56,59,62,64,67,70,72,75,78,81,83,86,89,92,94,97,100,103,105,108,111,113,116,119,122,124,127,130,133,135,138,141,144,146,149,152,154,157,160,163,165,168,171,174,176,179,182,184,187,190,193,195,198,201,204,206,209,212,215,217,220,223,225,228,231,234,236,239,242,245,247,250,253,256,258,261,264,266,269,272 mov $2,$0 mov $3,$0 lpb $0,1 add $2,$0 lpb $0,1 add $1,$0 sub $0,1 lpe add $1,1 add $2,1 lpb $1,1 trn $1,$2 sub $2,1 lpe add $1,$2 lpe lpb $3,1 add $1,1 sub $3,1 lpe add $1,1
30.48
362
0.645669
491d39a5ae0fda1e739f6743a373f1b7995b3e63
2,019
asm
Assembly
programs/oeis/305/A305271.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/305/A305271.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/305/A305271.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A305271: a(n) = 680*2^n - 548. ; 132,812,2172,4892,10332,21212,42972,86492,173532,347612,695772,1392092,2784732,5570012,11140572,22281692,44563932,89128412,178257372,356515292,713031132,1426062812,2852126172,5704252892,11408506332,22817013212,45634026972,91268054492,182536109532,365072219612,730144439772,1460288880092,2920577760732,5841155522012,11682311044572,23364622089692,46729244179932,93458488360412,186916976721372,373833953443292,747667906887132,1495335813774812,2990671627550172,5981343255100892,11962686510202332,23925373020405212,47850746040810972,95701492081622492,191402984163245532,382805968326491612,765611936652983772,1531223873305968092,3062447746611936732,6124895493223874012,12249790986447748572,24499581972895497692,48999163945790995932,97998327891581992412,195996655783163985372,391993311566327971292,783986623132655943132,1567973246265311886812,3135946492530623774172,6271892985061247548892,12543785970122495098332,25087571940244990197212,50175143880489980394972,100350287760979960790492,200700575521959921581532,401401151043919843163612,802802302087839686327772,1605604604175679372656092,3211209208351358745312732,6422418416702717490626012,12844836833405434981252572,25689673666810869962505692,51379347333621739925011932,102758694667243479850024412,205517389334486959700049372,411034778668973919400099292,822069557337947838800199132,1644139114675895677600398812,3288278229351791355200798172,6576556458703582710401596892,13153112917407165420803194332,26306225834814330841606389212,52612451669628661683212778972,105224903339257323366425558492,210449806678514646732851117532,420899613357029293465702235612,841799226714058586931404471772,1683598453428117173862808944092,3367196906856234347725617888732,6734393813712468695451235778012,13468787627424937390902471556572,26937575254849874781804943113692,53875150509699749563609886227932,107750301019399499127219772456412,215500602038798998254439544913372,431001204077597996508879089827292 mov $1,2 pow $1,$0 sub $1,1 mul $1,680 add $1,132 mov $0,$1
201.9
1,924
0.928182
87edd73d767800f0a2b88766d1df09cd142fb834
13,784
asm
Assembly
src/nes/trackdata.asm
apvilkko/jane8-musicdisk
86d1ffa8c268f782b23e2b0bb32c62620eadfb58
[ "MIT" ]
null
null
null
src/nes/trackdata.asm
apvilkko/jane8-musicdisk
86d1ffa8c268f782b23e2b0bb32c62620eadfb58
[ "MIT" ]
null
null
null
src/nes/trackdata.asm
apvilkko/jane8-musicdisk
86d1ffa8c268f782b23e2b0bb32c62620eadfb58
[ "MIT" ]
null
null
null
cybass11: db $fc,$83,$7f,$bf,$83,$7f,$df,$81,$7f,$bf,$83,$7f,$bf,$83,$7f,$bf,$83,$7f,$df,$81,$7f,$bf,$83,$7f,$bf,$83,$7f,$df,$81,$7f,$bf,$83,$7f,$df,$81,$7f,$bf,$83,$7f,$df,$81,$7f,$df,$81,$7f,$bf,$83,$7f,$ef,$80,$ff cybass12: db $fc,$83,$7f,$bf,$83,$7f,$df,$81,$7f,$bf,$83,$7f,$bf,$83,$7f,$bf,$83,$7f,$df,$81,$7f,$bf,$83,$7f,$bf,$83,$7f,$1a,$82,$7f,$bf,$83,$7f,$1a,$82,$7f,$bf,$83,$7f,$93,$81,$7f,$93,$81,$7f,$bf,$83,$7f,$ef,$80,$ff cybass1: db $fc,$83,$f0,<cybass11,>cybass11,$07,$f0,<cybass12,>cybass12,$01,$ff cybass7: db $fc,$83,$7f,$34,$84,$7f,$1a,$82,$7f,$34,$84,$7f,$34,$84,$7f,$34,$84,$7f,$1a,$82,$7f,$34,$84,$7f,$34,$84,$7f,$1a,$82,$7f,$34,$84,$7f,$1a,$82,$7f,$34,$84,$7f,$1a,$82,$7f,$1a,$82,$7f,$34,$84,$7f,$0c,$81,$ff cybass6: db $fc,$83,$7f,$b8,$84,$7f,$5c,$82,$7f,$b8,$84,$7f,$b8,$84,$7f,$b8,$84,$7f,$5c,$82,$7f,$b8,$84,$7f,$b8,$84,$7f,$5c,$82,$7f,$b8,$84,$7f,$5c,$82,$7f,$b8,$84,$7f,$5c,$82,$7f,$5c,$82,$7f,$b8,$84,$7f,$2d,$81,$ff cybass5: db $fc,$83,$7f,$00,$85,$7f,$80,$82,$7f,$00,$85,$7f,$00,$85,$7f,$00,$85,$7f,$80,$82,$7f,$00,$85,$7f,$00,$85,$7f,$80,$82,$7f,$00,$85,$7f,$80,$82,$7f,$00,$85,$7f,$80,$82,$7f,$80,$82,$7f,$00,$85,$7f,$3f,$81,$ff cybass4: db $fc,$83,$7f,$ce,$82,$7f,$67,$81,$7f,$ce,$82,$7f,$ce,$82,$7f,$ce,$82,$7f,$67,$81,$7f,$ce,$82,$7f,$ce,$82,$7f,$67,$81,$7f,$ce,$82,$7f,$67,$81,$7f,$ce,$82,$7f,$67,$81,$7f,$67,$81,$7f,$ce,$82,$7f,$b3,$80,$ff cybasse1: db $fc,$83,$f0,<cybass6,>cybass6,$02,$f0,<cybass11,>cybass11,$02,$ff cybasse2: db $fc,$83,$f0,<cybass4,>cybass4,$01,$f0,<cybass6,>cybass6,$01,$f0,<cybass11,>cybass11,$01,$f0,<cybass5,>cybass5,$01,$f0,<cybass6,>cybass6,$01,$f0,<cybass7,>cybass7,$01,$f0,<cybass5,>cybass5,$01,$f0,<cybass11,>cybass11,$01,$ff cylead1: db $fc,$82,$9f,$00,$df,$81,$00,$00,$00,$00,$9f,$00,$0c,$81,$94,$00,$df,$81,$9f,$00,$3f,$81,$94,$00,$0c,$81,$9f,$00,$c9,$80,$9f,$00,$d5,$80,$92,$00,$3f,$81,$9f,$00,$0c,$81,$9f,$00,$ef,$80,$92,$00,$d5,$80,$94,$00,$0c,$81,$92,$00,$0c,$81,$9f,$00,$3f,$81,$00,$00,$00,$00,$00,$00,$00,$00,$94,$00,$3f,$81,$92,$00,$3f,$81,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff cystring1: db $fc,$25,$59,$00,$3f,$09,$56,$00,$3f,$09,$54,$00,$3f,$09,$53,$00,$3f,$09,$59,$00,$d5,$08,$56,$00,$d5,$08,$54,$00,$d5,$08,$53,$00,$d5,$08,$59,$00,$0c,$09,$56,$00,$0c,$09,$54,$00,$0c,$09,$53,$00,$0c,$09,$59,$00,$ef,$08,$56,$00,$ef,$08,$54,$00,$ef,$08,$53,$00,$ef,$08,$59,$00,$3f,$09,$56,$00,$3f,$09,$54,$00,$3f,$09,$53,$00,$3f,$09,$59,$00,$ef,$08,$56,$00,$ef,$08,$54,$00,$ef,$08,$53,$00,$ef,$08,$59,$00,$9f,$08,$56,$00,$9f,$08,$54,$00,$9f,$08,$53,$00,$9f,$08,$59,$00,$d5,$08,$56,$00,$d5,$08,$54,$00,$d5,$08,$53,$00,$d5,$08,$ff cystring2: db $fc,$25,$59,$00,$c9,$08,$56,$00,$c9,$08,$54,$00,$c9,$08,$53,$00,$c9,$08,$00,$00,$00,$00,$00,$00,$00,$00,$59,$00,$d5,$08,$56,$00,$d5,$08,$59,$00,$3f,$09,$00,$00,$00,$00,$54,$00,$3f,$09,$53,$00,$3f,$09,$59,$00,$ef,$08,$56,$00,$ef,$08,$54,$00,$ef,$08,$53,$00,$ef,$08,$ff cystring3: db $fc,$25,$59,$00,$96,$08,$56,$00,$96,$08,$59,$00,$9f,$08,$00,$00,$00,$00,$59,$00,$ef,$08,$00,$00,$00,$00,$59,$00,$c9,$08,$00,$00,$00,$00,$59,$00,$3f,$09,$00,$00,$00,$00,$54,$00,$3f,$09,$53,$00,$3f,$09,$59,$00,$d5,$08,$56,$00,$d5,$08,$54,$00,$d5,$08,$53,$00,$d5,$08,$59,$00,$96,$08,$56,$00,$96,$08,$54,$00,$96,$08,$53,$00,$96,$08,$59,$00,$b3,$08,$56,$00,$b3,$08,$54,$00,$b3,$08,$53,$00,$b3,$08,$59,$00,$9f,$08,$56,$00,$9f,$08,$59,$00,$d5,$08,$00,$00,$00,$00,$59,$00,$c9,$08,$00,$00,$00,$00,$59,$00,$ef,$08,$00,$00,$00,$00,$ff cylead21: db $fc,$82,$9f,$00,$df,$81,$00,$00,$00,$00,$9f,$00,$c9,$80,$94,$00,$df,$81,$9f,$00,$d5,$80,$9f,$00,$c9,$80,$92,$00,$c9,$80,$9f,$00,$0c,$81,$92,$00,$d5,$80,$9f,$00,$ef,$80,$94,$00,$0c,$81,$92,$00,$0c,$81,$94,$00,$ef,$80,$92,$00,$ef,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff cylead22: db $fc,$82,$9f,$00,$df,$81,$00,$00,$00,$00,$9f,$00,$c9,$80,$94,$00,$df,$81,$9f,$00,$d5,$80,$9f,$00,$c9,$80,$92,$00,$c9,$80,$9f,$00,$b3,$80,$92,$00,$d5,$80,$9f,$00,$9f,$80,$94,$00,$b3,$80,$92,$00,$b3,$80,$94,$00,$9f,$80,$92,$00,$9f,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff cylead2: db $fc,$82,$f0,<cylead21,>cylead21,$03,$f0,<cylead22,>cylead22,$01,$ff cylead3: db $fc,$82,$9f,$00,$96,$80,$00,$00,$00,$00,$00,$00,$00,$00,$9f,$00,$96,$80,$9f,$00,$9f,$80,$00,$00,$00,$00,$9f,$00,$96,$80,$92,$00,$96,$80,$9f,$00,$ef,$80,$94,$00,$96,$80,$9f,$00,$c9,$80,$94,$00,$ef,$80,$92,$00,$ef,$80,$94,$00,$c9,$80,$92,$00,$c9,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$9f,$00,$9f,$80,$00,$00,$00,$00,$9f,$00,$b3,$80,$9f,$00,$9f,$80,$92,$00,$9f,$80,$9f,$00,$ef,$80,$92,$00,$b3,$80,$9f,$00,$3f,$81,$94,$00,$ef,$80,$92,$00,$ef,$80,$94,$00,$3f,$81,$92,$00,$3f,$81,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$9f,$00,$77,$80,$00,$00,$00,$00,$00,$00,$00,$00,$9f,$00,$77,$80,$9f,$00,$86,$80,$00,$00,$00,$00,$9f,$00,$77,$80,$92,$00,$77,$80,$9f,$00,$d5,$80,$94,$00,$77,$80,$9f,$00,$c9,$80,$94,$00,$d5,$80,$92,$00,$d5,$80,$94,$00,$c9,$80,$92,$00,$c9,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$9f,$00,$3f,$81,$9f,$00,$d5,$80,$9f,$00,$9f,$80,$94,$00,$3f,$81,$9f,$00,$c9,$80,$92,$00,$d5,$80,$9f,$00,$d5,$80,$9f,$00,$ef,$80,$92,$00,$c9,$80,$94,$00,$d5,$80,$92,$00,$d5,$80,$92,$00,$ef,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff cybd1: db $fc,$84,$01,$00,$00,$00,$01,$00,$00,$00,$01,$00,$00,$00,$01,$00,$00,$00,$ff cybd1f: db $fc,$84,$01,$00,$00,$00,$01,$00,$00,$00,$01,$00,$00,$00,$01,$01,$01,$00,$ff cybd1h: db $fc,$84,$f0,<cybd1,>cybd1,$01,$f0,<cybd1f,>cybd1f,$01,$ff cybd2: db $fc,$84,$f0,<cybd1,>cybd1,$07,$f0,<cybd1f,>cybd1f,$01,$ff cybd1cl: db $fc,$84,$01,$00,$00,$00,$03,$00,$00,$82,$01,$00,$00,$00,$03,$00,$00,$82,$ff cybd1clhh: db $fc,$84,$01,$00,$04,$00,$03,$00,$04,$82,$01,$00,$04,$00,$03,$00,$04,$82,$01,$00,$04,$00,$03,$00,$04,$82,$01,$84,$04,$00,$03,$84,$04,$82,$ff cybd1clho: db $fc,$84,$01,$00,$08,$00,$01,$00,$08,$00,$01,$00,$08,$00,$01,$00,$08,$00,$01,$00,$08,$00,$01,$00,$08,$00,$01,$84,$08,$00,$01,$84,$08,$00,$ff cybd2cl: db $fc,$84,$f0,<cybd1cl,>cybd1cl,$07,$01,$00,$00,$00,$03,$00,$00,$00,$01,$00,$00,$00,$03,$01,$01,$82,$ff cybd2clhh: db $fc,$84,$f0,<cybd1clhh,>cybd1clhh,$03,$01,$00,$04,$00,$03,$00,$04,$82,$01,$00,$04,$00,$03,$00,$04,$82,$01,$00,$04,$00,$03,$00,$04,$82,$01,$84,$06,$00,$03,$07,$05,$02,$ff cybd2clho: db $fc,$84,$f0,<cybd1clho,>cybd1clho,$03,$01,$00,$08,$00,$01,$00,$08,$00,$01,$00,$08,$00,$01,$00,$08,$00,$01,$00,$08,$00,$01,$00,$08,$00,$01,$84,$0a,$00,$03,$07,$09,$02,$ff cydrfull1: db $fc,$84,$01,$00,$08,$00,$03,$00,$08,$82,$01,$00,$08,$00,$03,$00,$08,$82,$01,$00,$08,$00,$03,$00,$08,$82,$01,$84,$08,$00,$03,$84,$08,$82,$ff cydrfull2: db $fc,$84,$01,$00,$08,$00,$03,$00,$08,$82,$01,$00,$08,$00,$03,$00,$08,$82,$01,$00,$08,$00,$03,$00,$08,$82,$01,$84,$08,$00,$03,$05,$09,$82,$ff cydrfull: db $fc,$84,$f0,<cydrfull1,>cydrfull1,$03,$f0,<cydrfull2,>cydrfull2,$01,$ff cyintro: db $f0,<cybass1,>cybass1,$01,$f0,<cybd2,>cybd2,$01,$fe,$ff cyintro2: db $f0,<cybass1,>cybass1,$01,$f0,<cybd2,>cybd2,$01,$f0,<cystring1,>cystring1,$01,$fe,$ff cymel1: db $f0,<cybass1,>cybass1,$01,$f0,<cybd2cl,>cybd2cl,$01,$f0,<cystring1,>cystring1,$01,$f0,<cylead1,>cylead1,$04,$fe,$ff cymel1hh: db $f0,<cybass1,>cybass1,$01,$f0,<cybd2clhh,>cybd2clhh,$01,$f0,<cystring1,>cystring1,$01,$f0,<cylead1,>cylead1,$04,$fe,$ff cymel1ho: db $f0,<cybass1,>cybass1,$01,$f0,<cybd2clho,>cybd2clho,$01,$f0,<cystring1,>cystring1,$01,$f0,<cylead1,>cylead1,$04,$fe,$ff cybreak1: db $f0,<cybass11,>cybass11,$04,$f0,<cylead1,>cylead1,$02,$fe,$ff cybreak1bd: db $f0,<cybass11,>cybass11,$02,$f0,<cylead1,>cylead1,$01,$f0,<cybd1,>cybd1,$02,$fe,$ff cybreak1bdf: db $f0,<cybass11,>cybass11,$02,$f0,<cylead1,>cylead1,$01,$f0,<cybd1h,>cybd1h,$01,$fe,$ff cyemph1: db $f0,<cylead2,>cylead2,$01,$f0,<cystring2,>cystring2,$02,$f0,<cybd2clhh,>cybd2clhh,$01,$f0,<cybasse1,>cybasse1,$02,$fe,$ff cyemph2: db $f0,<cybasse2,>cybasse2,$01,$f0,<cystring3,>cystring3,$01,$f0,<cydrfull,>cydrfull,$01,$f0,<cylead3,>cylead3,$01,$fe,$ff cytrack: db $fb,$1e,$f0,<cyintro,>cyintro,$01,$f0,<cyintro2,>cyintro2,$01,$f0,<cymel1,>cymel1,$01,$f0,<cymel1hh,>cymel1hh,$01,$f0,<cybreak1,>cybreak1,$01,$f0,<cybreak1bd,>cybreak1bd,$01,$f0,<cybreak1bdf,>cybreak1bdf,$01,$f0,<cymel1ho,>cymel1ho,$01,$f0,<cyemph1,>cyemph1,$01,$f0,<cyemph2,>cyemph2,$02,$ff subd1n: db $fc,$84,$01,$00,$00,$00,$01,$00,$00,$00,$01,$00,$00,$00,$01,$00,$00,$00,$ff subd1f: db $fc,$84,$01,$00,$00,$00,$01,$00,$00,$00,$01,$00,$00,$00,$01,$00,$01,$01,$ff subd1: db $fc,$84,$f0,<subd1n,>subd1n,$03,$f0,<subd1f,>subd1f,$01,$ff subd1ncl: db $fc,$84,$01,$00,$00,$00,$03,$00,$00,$82,$01,$00,$00,$00,$03,$00,$00,$82,$ff subd1fcl: db $fc,$84,$01,$00,$00,$00,$03,$00,$00,$82,$01,$00,$00,$00,$03,$00,$01,$03,$ff subd1cl: db $fc,$84,$f0,<subd1ncl,>subd1ncl,$03,$f0,<subd1fcl,>subd1fcl,$01,$ff subd1nhh: db $fc,$84,$01,$04,$08,$00,$03,$00,$04,$82,$01,$04,$08,$00,$03,$00,$04,$82,$ff subd1fhh: db $fc,$84,$01,$04,$08,$00,$03,$00,$04,$82,$01,$04,$08,$00,$03,$00,$05,$03,$ff subd1hh: db $fc,$84,$f0,<subd1nhh,>subd1nhh,$03,$f0,<subd1fhh,>subd1fhh,$01,$ff subass1n: db $fc,$83,$7f,$89,$83,$7f,$c4,$81,$7f,$89,$83,$7f,$89,$83,$7f,$89,$83,$7f,$89,$83,$7f,$c4,$81,$7f,$89,$83,$7f,$c4,$81,$7f,$89,$83,$7f,$7c,$81,$7f,$c4,$81,$7f,$89,$83,$7f,$89,$83,$7f,$c4,$81,$7f,$89,$83,$ff subass1f: db $fc,$83,$7f,$3a,$82,$7f,$1c,$81,$7f,$3a,$82,$7f,$3a,$82,$7f,$3a,$82,$7f,$3a,$82,$7f,$1c,$81,$7f,$3a,$82,$7f,$fb,$81,$7f,$f8,$83,$7f,$52,$81,$7f,$fb,$81,$7f,$f8,$83,$7f,$f8,$83,$7f,$fb,$81,$7f,$f8,$83,$ff subass1e: db $fc,$83,$7f,$f8,$83,$7f,$fb,$81,$7f,$f8,$83,$7f,$f8,$83,$7f,$f8,$83,$7f,$f8,$83,$7f,$fb,$81,$7f,$f8,$83,$7f,$fb,$81,$7f,$f8,$83,$7f,$52,$81,$7f,$fb,$81,$7f,$f8,$83,$7f,$f8,$83,$7f,$fb,$81,$7f,$f8,$83,$ff subass1b: db $fc,$83,$7f,$a6,$82,$7f,$52,$81,$7f,$a6,$82,$7f,$a6,$82,$7f,$a6,$82,$7f,$a6,$82,$7f,$52,$81,$7f,$a6,$82,$7f,$52,$81,$7f,$a6,$82,$7f,$7c,$81,$7f,$52,$81,$7f,$a6,$82,$7f,$a6,$82,$7f,$52,$81,$7f,$a6,$82,$ff subass1: db $fc,$83,$f0,<subass1f,>subass1f,$01,$f0,<subass1n,>subass1n,$03,$f0,<subass1e,>subass1e,$01,$f0,<subass1b,>subass1b,$01,$f0,<subass1n,>subass1n,$02,$ff sulead21: db $fc,$82,$9f,$00,$3a,$82,$00,$00,$00,$00,$9f,$00,$2d,$81,$9f,$00,$3a,$82,$92,$00,$3a,$82,$9f,$00,$2d,$81,$9f,$00,$3a,$82,$92,$00,$3a,$82,$9f,$00,$52,$81,$92,$00,$2d,$81,$9f,$00,$fb,$81,$9f,$00,$52,$81,$9f,$00,$fb,$81,$94,$00,$fb,$81,$9f,$00,$c4,$81,$92,$00,$52,$81,$ff sulead2f: db $fc,$82,$9f,$00,$89,$83,$00,$00,$00,$00,$00,$00,$00,$00,$9f,$00,$5c,$82,$92,$00,$89,$83,$00,$00,$00,$00,$9f,$00,$89,$83,$92,$00,$5c,$82,$00,$00,$00,$00,$94,$00,$89,$83,$9f,$00,$89,$83,$00,$00,$00,$00,$9f,$00,$5c,$82,$94,$00,$89,$83,$92,$00,$89,$83,$94,$00,$5c,$82,$ff sulead22: db $fc,$82,$9f,$00,$f8,$83,$00,$00,$00,$00,$00,$00,$00,$00,$9f,$00,$a6,$82,$92,$00,$f8,$83,$00,$00,$00,$00,$9f,$00,$52,$81,$9f,$00,$f8,$83,$9f,$00,$52,$81,$94,$00,$52,$81,$9f,$00,$f8,$83,$9f,$00,$52,$81,$9f,$00,$a6,$82,$94,$00,$f8,$83,$92,$00,$f8,$83,$92,$00,$52,$81,$9f,$00,$2d,$81,$00,$00,$00,$00,$00,$00,$00,$00,$9f,$00,$a6,$82,$92,$00,$2d,$81,$00,$00,$00,$00,$9f,$00,$c4,$81,$92,$00,$a6,$82,$9f,$00,$fd,$80,$94,$00,$c4,$81,$9f,$00,$0c,$81,$9f,$00,$a6,$82,$92,$00,$fd,$80,$9f,$00,$c4,$81,$9f,$00,$52,$81,$92,$00,$a6,$82,$9f,$00,$2d,$81,$92,$00,$c4,$81,$92,$00,$52,$81,$9f,$00,$5c,$82,$92,$00,$2d,$81,$00,$00,$00,$00,$9f,$00,$89,$83,$92,$00,$5c,$82,$00,$00,$00,$00,$94,$00,$89,$83,$9f,$00,$89,$83,$00,$00,$00,$00,$9f,$00,$5c,$82,$94,$00,$89,$83,$92,$00,$89,$83,$94,$00,$5c,$82,$9f,$00,$fd,$80,$00,$00,$00,$00,$00,$00,$00,$00,$9f,$00,$5c,$82,$92,$00,$fd,$80,$00,$00,$00,$00,$9f,$00,$e1,$80,$9f,$00,$89,$83,$9f,$00,$c9,$80,$9f,$00,$52,$81,$9f,$00,$89,$83,$92,$00,$89,$83,$9f,$00,$5c,$82,$92,$00,$52,$81,$9f,$00,$2d,$81,$94,$00,$5c,$82,$ff sulead2: db $fc,$82,$f0,<sulead21,>sulead21,$01,$f0,<sulead2f,>sulead2f,$03,$f0,<sulead22,>sulead22,$01,$ff suintro: db $f0,<subass1,>subass1,$01,$f0,<subd1cl,>subd1cl,$02,$fe,$ff suintro2: db $f0,<subass1,>subass1,$01,$f0,<subd1hh,>subd1hh,$02,$fe,$ff subreakdown1: db $f0,<sulead2,>sulead2,$01,$fe,$ff sufull1: db $f0,<subass1,>subass1,$01,$f0,<sulead2,>sulead2,$01,$f0,<subd1hh,>subd1hh,$02,$fe,$ff sutrack: db $fb,$1a,$f0,<sufull1,>sufull1,$01,$ff
106.852713
2,000
0.544109
95be16a54eee0a5f30760c7a5603113dbcb017fa
1,366
asm
Assembly
areatri_alterado.asm
gust-luiz/UnB_System-Software-projects
a9ce4717ff50b4d022ddd74a6ee942c00cb11b46
[ "MIT" ]
null
null
null
areatri_alterado.asm
gust-luiz/UnB_System-Software-projects
a9ce4717ff50b4d022ddd74a6ee942c00cb11b46
[ "MIT" ]
null
null
null
areatri_alterado.asm
gust-luiz/UnB_System-Software-projects
a9ce4717ff50b4d022ddd74a6ee942c00cb11b46
[ "MIT" ]
null
null
null
TAMSTRBASE EQU 30 TAMSTRALTURA EQU 30 TAMSTRRESULT EQU 20 TAMSTREXIT EQU 20 TAMSHOWSTR EQU 5 ;tamanho para EscreverString - variar para verificar se exibe corretamente a quantidade SECTION TEXT S_INPUT STRBASE, TAMSTRBASE ; escreva msg para solicitar o valor da base S_INPUT STRALTURA, TAMSTRALTURA ; escreva msg para solicitar o valor da altura S_INPUT STRRESULT, TAMSTRRESULT ; escreva msg para quando for exibir o resultado S_INPUT STREXIT, TAMSTREXIT ; escreva msg para solicitar um char para encerrar o programa S_OUTPUT STRBASE, TAMSHOWSTR ; apresenta msg solicitando base INPUT VALORES ; Lê a base B S_OUTPUT STRALTURA, TAMSHOWSTR ; apresenta msg solicitando altura INPUT VALORES + 1 ; Lê a altura H LOAD VALORES ; Carrega B no acumulador MULT VALORES + 1 ; ACC tem B*H DIV DOIS ; ACC tem o resultado de (B+H)/2 STORE VALORES + 2 ; Coloca soma (B+H)/2 em R S_OUTPUT STRRESULT, TAMSHOWSTR ; apresenta msg sobre o resultado OUTPUT VALORES + 2 ; Escreve o resultado S_OUTPUT STREXIT, TAMSTREXIT ; apresenta msg solicitando um caracter C_INPUT CHAREXIT C_OUTPUT CHAREXIT ; exibe o caracter informado STOP ; Termina a execução do programa SECTION DATA STRBASE: SPACE 25 STRALTURA: SPACE 25 STRRESULT: SPACE 25 STREXIT: SPACE 25 CHAREXIT: SPACE 1 VALORES: SPACE 3 ; 0:base 1:altura 2:resultado DOIS: CONST 2 ; Reserva espaço para uma constante
35.025641
104
0.785505
aa3528e237d26444a9dcdb754a58b88230ee1e44
75
asm
Assembly
libsrc/_DEVELOPMENT/EXAMPLES/zx/demo_sp1/BlackStar/mus/song1.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/EXAMPLES/zx/demo_sp1/BlackStar/mus/song1.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/EXAMPLES/zx/demo_sp1/BlackStar/mus/song1.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION rodata_user PUBLIC _song1 _song1: BINARY "song1.ntropic.zx7"
9.375
29
0.76
18ef1e6a49bd1a6b118a1a5c21bb5b135c038581
378
asm
Assembly
oeis/208/A208653.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/208/A208653.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/208/A208653.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A208653: Product{C(n-1,i) : 1<=i<=floor[(n+1)/2]}. ; Submitted by Christian Krause ; 1,1,1,3,4,50,90,5145,12544,3429216,11340000,15219319500,68309049600,457937132487120,2790771598030416,94609025993497640625,783056974947287040000,135476575389769051389952000 mov $1,2 mov $2,$0 lpb $0 sub $0,1 div $0,2 mov $3,$2 bin $3,$0 mul $0,2 mul $1,$3 lpe mov $0,$1 div $0,2
22.235294
173
0.701058
e077e1e0d57d995411cfa1dc5fe0cbabd596c5dc
7,779
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca_notsx.log_21829_213.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_213.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_213.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 %r8 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_WT_ht+0x1c820, %r13 nop sub %r9, %r9 movb $0x61, (%r13) nop xor %rcx, %rcx lea addresses_WC_ht+0xd424, %rsi lea addresses_D_ht+0x107d4, %rdi nop nop cmp %r9, %r9 mov $3, %rcx rep movsq nop nop nop nop cmp $47079, %rsi lea addresses_A_ht+0x159b4, %rsi lea addresses_UC_ht+0x9c24, %rdi nop nop nop xor $57649, %r12 mov $92, %rcx rep movsl nop nop nop nop xor %rdi, %rdi lea addresses_D_ht+0xfbba, %rsi lea addresses_WC_ht+0x12424, %rdi nop nop nop nop and %rax, %rax mov $73, %rcx rep movsq nop nop sub %r12, %r12 lea addresses_WT_ht+0xf624, %rcx nop nop nop nop nop xor %rax, %rax mov $0x6162636465666768, %r9 movq %r9, %xmm0 and $0xffffffffffffffc0, %rcx movntdq %xmm0, (%rcx) nop nop nop and $43352, %rsi lea addresses_A_ht+0xb364, %rdi nop nop nop nop nop dec %rsi movb (%rdi), %r13b nop add %r9, %r9 lea addresses_WT_ht+0x13424, %rdi nop nop dec %r9 vmovups (%rdi), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %r13 nop nop nop nop nop xor %r12, %r12 lea addresses_UC_ht+0x4764, %rax nop nop nop nop nop add %r13, %r13 movb (%rax), %r12b nop nop nop nop nop and $58965, %r8 pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r14 push %r9 push %rbx push %rcx // Store lea addresses_WT+0x18c24, %r11 nop nop inc %rbx movb $0x51, (%r11) nop add %rbx, %rbx // Store lea addresses_PSE+0x1cc64, %r9 nop and $37427, %r10 movw $0x5152, (%r9) nop nop nop nop nop add %r10, %r10 // Store lea addresses_PSE+0x6824, %r9 nop nop dec %r14 mov $0x5152535455565758, %r10 movq %r10, %xmm2 vmovups %ymm2, (%r9) nop nop sub $62550, %r14 // Load lea addresses_normal+0x17d2b, %r14 nop nop nop cmp %r9, %r9 vmovups (%r14), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $0, %xmm4, %rbx nop nop nop nop nop sub %r11, %r11 // Store lea addresses_A+0x14e0c, %r10 nop nop nop nop nop and %rcx, %rcx movw $0x5152, (%r10) nop nop nop nop nop and %rcx, %rcx // Store lea addresses_D+0xe564, %rbx clflush (%rbx) nop nop nop sub %rcx, %rcx movb $0x51, (%rbx) nop dec %r11 // Store lea addresses_WC+0xe0a4, %r10 and $5633, %rcx movw $0x5152, (%r10) nop nop nop and $28160, %r9 // Faulty Load lea addresses_WT+0x18c24, %rcx nop nop add %rbx, %rbx movb (%rcx), %r11b lea oracles, %r10 and $0xff, %r11 shlq $12, %r11 mov (%r10,%r11,1), %r11 pop %rcx pop %rbx pop %r9 pop %r14 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 10, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 2, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'} {'dst': {'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 5, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 7, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'src': {'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 4, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'src': {'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'dst': {'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 11, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'51': 21829} 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 */
30.505882
2,999
0.652397
bb485a7f2e6b76e0808e2551b18b119a90901809
298
asm
Assembly
programs/oeis/100/A100286.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/100/A100286.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/100/A100286.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A100286: Expansion of (1+2x^2-2x^3+2x^4)/(1-x+x^2-x^3+x^4-x^5). ; 1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2,1,1,2,0,0,2 sub $0,743 dif $0,2 gcd $0,$0 add $0,20 mod $0,3
33.111111
181
0.52349
ef91526085fd36fb561a055e75110e5a1661a1c4
13,897
asm
Assembly
src/strategies/x86_asm/picture-x86-asm-satd.asm
fador/kvazaar
55bb8ee17f96a9625b8c10bce7c82fa91e7eec09
[ "BSD-3-Clause" ]
512
2015-01-13T21:42:48.000Z
2022-03-31T17:57:28.000Z
src/strategies/x86_asm/picture-x86-asm-satd.asm
fador/kvazaar
55bb8ee17f96a9625b8c10bce7c82fa91e7eec09
[ "BSD-3-Clause" ]
217
2015-01-04T16:06:49.000Z
2022-03-30T12:54:29.000Z
src/strategies/x86_asm/picture-x86-asm-satd.asm
fador/kvazaar
55bb8ee17f96a9625b8c10bce7c82fa91e7eec09
[ "BSD-3-Clause" ]
179
2015-01-05T08:58:40.000Z
2022-03-29T07:08:24.000Z
;/***************************************************************************** ; * This file is part of Kvazaar HEVC encoder. ; * ; * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors ; * All rights reserved. ; * ; * Redistribution and use in source and binary forms, with or without modification, ; * are permitted provided that the following conditions are met: ; * ; * * Redistributions of source code must retain the above copyright notice, this ; * list of conditions and the following disclaimer. ; * ; * * Redistributions in binary form must reproduce the above copyright notice, this ; * list of conditions and the following disclaimer in the documentation and/or ; * other materials provided with the distribution. ; * ; * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its ; * contributors may be used to endorse or promote products derived from ; * this software without specific prior written permission. ; * ; * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ; * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ; * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ; * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ; * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ; * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ; ****************************************************************************/ %include "x86inc.asm" ;cglobal and RET macros are from the x86.inc ;they push and pop the necessary registers to ;stack depending on the operating system ;Usage: cglobal name, %1, %2, %3 ;1%: Number of arguments ;2%: Number of registers used ;3%: Number of xmm registers used. ;More info in x86inc.asm SECTION .text ;Set x86inc.asm macros to use avx and xmm registers INIT_XMM avx ;KVZ_ZERO_EXTEND_WD ;zero extend all packed words in xmm to dwords in 2 xmm registers ;%1 source register ;%2 lower destination register ;%3 higher destination register %macro KVZ_ZERO_EXTEND_WD 3 ;Zero extend high 64 bits vmovhlps %3, %1 vpmovzxwd %3, %3 ;Zero extend low 64 bits vpmovzxwd %2, %1 %endmacro ; KVZ_ZERO_EXTEND_WD ; Use nondestructive horizontal add and sub to calculate both at the same time. ; TODO: It would probably be possible to do this with 3 registers (destructive vphsubw). ; args: ; 1, 2: input registers ; 3, 4: output registers %macro SATD_HORIZONTAL_SUB_AND_ADD 4 ; TODO: It might be possible to do this with 3 registers? ;First stage vphaddw %3, %1, %2 vphsubw %4, %1, %2 ;Second stage vphaddw %1, %3, %4 vphsubw %2, %3, %4 ;Third stage vphaddw %3, %1, %2 vphsubw %4, %1, %2 %endmacro ; SATD_HORIZONTAL_SUB_AND_ADD ;KVZ_SATD_8X8_STRIDE ;Calculates SATD of a 8x8 block inside a frame with stride ;r0 address of the first value(reference) ;r1 address of the first value(current) ;r2 stride ; ;The Result is written in the register r4 %macro KVZ_SATD_8X8_STRIDE 0 ;Calculate differences of the 8 rows into ;registers m0-m7 vpmovzxbw m0, [r0] vpmovzxbw m7, [r2] vpsubw m0, m7 vpmovzxbw m1, [r0+r1] vpmovzxbw m7, [r2+r3] vpsubw m1, m7 ;Set r0 and r2 2 rows forward lea r0, [r0+r1*2] lea r2, [r2+r3*2] vpmovzxbw m2, [r0] vpmovzxbw m7, [r2] vpsubw m2, m7 vpmovzxbw m3, [r0+r1] vpmovzxbw m7, [r2+r3] vpsubw m3, m7 lea r0, [r0+r1*2] lea r2, [r2+r3*2] vpmovzxbw m4, [r0] vpmovzxbw m7, [r2] vpsubw m4, m7 vpmovzxbw m5, [r0+r1] vpmovzxbw m7, [r2+r3] vpsubw m5, m7 lea r0, [r0+r1*2] lea r2, [r2+r3*2] vpmovzxbw m6, [r0] vpmovzxbw m7, [r2] vpsubw m6, m7 ;32-bit AVX doesn't have registers ;xmm8-xmm15, use stack instead %if ARCH_X86_64 vpmovzxbw m7, [r0+r1] vpmovzxbw m8, [r2+r3] vpsubw m7, m8 %else %define temp0 esp+16*3 %define temp1 esp+16*2 %define temp2 esp+16*1 %define temp3 esp+16*0 ;Reserve memory for 4 x 128 bits. sub esp, 16*4 vpmovzxbw m7, [r2+r3] vmovdqu [temp0], m7 vpmovzxbw m7, [r0+r1] vpsubw m7, [temp0] ;Put rows 5-8 to stack vmovdqu [temp0], m4 vmovdqu [temp1], m5 vmovdqu [temp2], m6 vmovdqu [temp3], m7 %endif ;Hadamard transform (FWHT algorithm) ;Horizontal transform %if ARCH_X86_64 ;Calculate horizontal transform for each row. ;Transforms of two rows are interleaved in register pairs. ;(m8 and m9, m10 and m11,...) SATD_HORIZONTAL_SUB_AND_ADD m0, m1, m8, m9 SATD_HORIZONTAL_SUB_AND_ADD m2, m3, m10, m11 SATD_HORIZONTAL_SUB_AND_ADD m4, m5, m12, m13 SATD_HORIZONTAL_SUB_AND_ADD m6, m7, m14, m15 %else ;Calculate horizontal transforms for the first four rows. ;Then load the other four into the registers and store ;ready transforms in the stack. ;Input registers are m0-m3, results are written in ;registers m4-m7 (and memory). SATD_HORIZONTAL_SUB_AND_ADD m0, m1, m4, m5 SATD_HORIZONTAL_SUB_AND_ADD m2, m3, m6, m7 vmovdqu m3, [temp3] vmovdqu m2, [temp2] vmovdqu m1, [temp1] vmovdqu m0, [temp0] vmovdqu [temp3], m7 vmovdqu [temp2], m6 vmovdqu [temp1], m5 vmovdqu [temp0], m4 SATD_HORIZONTAL_SUB_AND_ADD m0, m1, m4, m5 SATD_HORIZONTAL_SUB_AND_ADD m2, m3, m6, m7 %endif ;Vertical transform ;Transform columns of the 8x8 block. ;First sum the interleaved horizontally ;transformed values with one horizontal add ;for each pair of rows. Then calculate ;with regular packed additions and ;subtractions. %if ARCH_X86_64 ;Horizontally transformed values are in registers m8-m15 ;Results are written in m0-m7 ;First stage vphaddw m0, m8, m9 vphsubw m1, m8, m9 vphaddw m2, m10, m11 vphsubw m3, m10, m11 vphaddw m4, m12, m13 vphsubw m5, m12, m13 vphaddw m6, m14, m15 vphsubw m7, m14, m15 ;Second stage vpaddw m8, m0, m2 vpaddw m9, m1, m3 vpsubw m10, m0, m2 vpsubw m11, m1, m3 vpaddw m12, m4, m6 vpaddw m13, m5, m7 vpsubw m14, m4, m6 vpsubw m15, m5, m7 ;Third stage vpaddw m0, m8, m12 vpaddw m1, m9, m13 vpaddw m2, m10, m14 vpaddw m3, m11, m15 vpsubw m4, m8, m12 vpsubw m5, m9, m13 vpsubw m6, m10, m14 vpsubw m7, m11, m15 %else ;Transformed values are in registers m4-m7 ;and in memory(temp0-temp3). Transformed values ;are written in m4-m7. Also calculate absolute ;values for them and accumulate into ymm0. ;First stage vphaddw m0, m4, m5 vphsubw m1, m4, m5 vphaddw m2, m6, m7 vphsubw m3, m6, m7 ;Second stage vpaddw m4, m0, m2 vpaddw m5, m1, m3 vpsubw m6, m0, m2 vpsubw m7, m1, m3 vmovdqu m3, [temp3] vmovdqu m2, [temp2] vmovdqu m1, [temp1] vmovdqu m0, [temp0] vmovdqu [temp3], m7 vmovdqu [temp2], m6 vmovdqu [temp1], m5 vmovdqu [temp0], m4 ;First stage (second half) vphaddw m4, m0, m1 vphsubw m5, m0, m1 vphaddw m6, m2, m3 vphsubw m7, m2, m3 ;Second stage (second half) vpaddw m0, m4, m6 vpaddw m1, m5, m7 vpsubw m2, m4, m6 vpsubw m3, m5, m7 ;Third stage vpaddw m4, m0, [temp0] vpaddw m5, m1, [temp1] vpsubw m6, m0, [temp0] vpsubw m7, m1, [temp1] ;Calculate the absolute values and ;zero extend 16-bit values to 32-bit ;values. Then sum the values. vpabsw m4, m4 KVZ_ZERO_EXTEND_WD m4, m4, m1 vpaddd m4, m1 vpabsw m5, m5 KVZ_ZERO_EXTEND_WD m5, m5, m1 vpaddd m5, m1 vpabsw m6, m6 KVZ_ZERO_EXTEND_WD m6, m6, m1 vpaddd m6, m1 vpabsw m7, m7 KVZ_ZERO_EXTEND_WD m7, m7, m1 vpaddd m7, m1 vpaddd m0, m4, m5 vpaddd m0, m6 vpaddd m0, m7 ;Repeat for the rest vpaddw m4, m2, [temp2] vpaddw m5, m3, [temp3] vpsubw m6, m2, [temp2] vpsubw m7, m3, [temp3] vpabsw m4, m4 KVZ_ZERO_EXTEND_WD m4, m4, m1 vpaddd m4, m1 vpabsw m5, m5 KVZ_ZERO_EXTEND_WD m5, m5, m1 vpaddd m5, m1 vpabsw m6, m6 KVZ_ZERO_EXTEND_WD m6, m6, m1 vpaddd m6, m1 vpabsw m7, m7 KVZ_ZERO_EXTEND_WD m7, m7, m1 vpaddd m7, m1 ;Sum the other half of the packed results to ymm4 vpaddd m4, m5 vpaddd m4, m6 vpaddd m4, m7 ;Sum all packed results to ymm0 vpaddd m0, m4 %endif %if ARCH_X86_64 ;Calculate the absolute values and ;zero extend 16-bit values to 32-bit ;values. In other words: extend xmm to ;corresponding ymm. vpabsw m0, m0 KVZ_ZERO_EXTEND_WD m0, m0, m8 vpaddd m0, m8 vpabsw m1, m1 KVZ_ZERO_EXTEND_WD m1, m1, m8 vpaddd m1, m8 vpabsw m2, m2 KVZ_ZERO_EXTEND_WD m2, m2, m8 vpaddd m1, m8 vpabsw m3, m3 KVZ_ZERO_EXTEND_WD m3, m3, m8 vpaddd m3, m8 vpabsw m4, m4 KVZ_ZERO_EXTEND_WD m4, m4, m8 vpaddd m4, m8 vpabsw m5, m5 KVZ_ZERO_EXTEND_WD m5, m5, m8 vpaddd m5, m8 vpabsw m6, m6 KVZ_ZERO_EXTEND_WD m6, m6, m8 vpaddd m6, m8 vpabsw m7, m7 KVZ_ZERO_EXTEND_WD m7, m7, m8 vpaddd m7, m8 ;Calculate packed sum of transformed values to ymm0 vpaddd m0, m1 vpaddd m0, m2 vpaddd m0, m3 vpaddd m0, m4 vpaddd m0, m5 vpaddd m0, m6 vpaddd m0, m7 %endif ;Sum the packed values to m0[32:0] vphaddd m0, m0 vphaddd m0, m0 ;The result is in the lowest 32 bits in m0 vmovd r4d, m0 ;8x8 Hadamard transform requires ;adding 2 and dividing by 4 add r4, 2 shr r4, 2 ;Zero high 128 bits of ymm registers to ;prevent AVX-SSE transition penalty. vzeroupper %if ARCH_X86_64 == 0 add esp, 16*4 %endif %endmacro ; KVZ_SATD_8X8_STRIDE ;KVZ_SATD_4X4 ;Calculates SATD of the 16 consequtive bytes in memory ;r0 address of the first value(current) ;r1 address of the first value(reference) cglobal satd_4x4, 2, 2, 6 ;Load 8 bytes from memory and zero extend ;to 16-bit values. Calculate difference. vpmovzxbw m0, [r0] vpmovzxbw m2, [r1] vpsubw m0, m2 vpmovzxbw m1, [r0+8] vpmovzxbw m3, [r1+8] vpsubw m1, m3 ;Hadamard transform ;Horizontal phase ;First stage vphaddw m4, m0, m1 vphsubw m5, m0, m1 ;Second stage vphaddw m0, m4, m5 vphsubw m1, m4, m5 ;Vertical phase ;First stage vphaddw m4, m0, m1 vphsubw m5, m0, m1 ;Second stage vphaddw m0, m4, m5 vphsubw m1, m4, m5 ;Calculate absolute values vpabsw m0, m0 vpabsw m1, m1 ;Sum the all the transformed values vpaddw m0, m1 vphaddw m0, m0 vphaddw m0, m0 vphaddw m0, m0 ;Extract the lowest 16 bits of m0 ;into eax vpextrw eax, m0, 0 ;4x4 Hadamard transform requires ;Addition of 1 and division by 2 add eax, 1 shr eax, 1 RET ;KVZ_SATD_8X8 ;Calculates SATD of a 8x8 block inside a frame with stride ;r0 address of the first value(reference) ;r1 address of the first value(current) ;r2 stride %if ARCH_X86_64 cglobal satd_8x8, 4, 5, 16 %else cglobal satd_8x8, 4, 5, 8 %endif ;Set arguments mov r2, r1 mov r1, 8 mov r3, 8 ;Calculate 8x8 SATD. Result is written ;in the register r4. KVZ_SATD_8X8_STRIDE mov rax, r4 RET ;KVZ_SATD_NXN ;Calculates SATD of a NxN block inside a frame with stride ;r0 address of the first value(reference) ;r1 address of the first value(current) %macro KVZ_SATD_NXN 1 %if ARCH_X86_64 cglobal satd_%1x%1, 2, 7, 16 %else cglobal satd_%1x%1, 2, 7, 8 %endif ;Set arguments mov r2, r1 mov r1, %1 mov r3, %1 ;Zero r5 and r6 xor r5, r5 xor r6, r6 ;Calculate SATDs of each 8x8 sub-blocks ;and accumulate the results in r6. Repeat yloop ;N times. Repeat xloop N times. r4 and r5 are counters ;for the loops. .yloop ;zero r4 xor r4, r4 .xloop push r4 ;Calculate SATD of the sub-block. Result is ;written in the register r4. KVZ_SATD_8X8_STRIDE add r6, r4 ;Set r2 and r0 to the next sub-block ;on the same row sub r2, 6*%1-8 sub r0, 6*%1-8 pop r4 add r4, 8 cmp r4, %1 jne .xloop ;Set r2 and r0 to the first sub-block ;on the next row(of 8x8 sub-blocks) add r2, 7*%1 add r0, 7*%1 add r5, 8 cmp r5, %1 jne .yloop mov rax, r6 RET %endmacro ; KVZ_SATD_NXN KVZ_SATD_NXN 16 KVZ_SATD_NXN 32 KVZ_SATD_NXN 64
24.126736
88
0.600633
9e0a0e2d15b3c9e631284442a41122ff39e31c86
1,919
asm
Assembly
cmos.asm
creaktive/LockIt
1632739ee1aafb466b2b7e78586da0cc0b97ba3a
[ "Artistic-1.0-Perl" ]
1
2017-07-04T02:52:01.000Z
2017-07-04T02:52:01.000Z
cmos.asm
creaktive/LockIt
1632739ee1aafb466b2b7e78586da0cc0b97ba3a
[ "Artistic-1.0-Perl" ]
null
null
null
cmos.asm
creaktive/LockIt
1632739ee1aafb466b2b7e78586da0cc0b97ba3a
[ "Artistic-1.0-Perl" ]
null
null
null
locals .286 .model large, PASCAL GLOBAL ReadCMOS:PROC GLOBAL WriteCMOS:PROC GLOBAL ReadCMOSW:PROC GLOBAL WriteCMOSW:PROC GLOBAL CalculateChecksum:PROC .data .code ;************************************* ; CMOS Accessing routines ;************************************* ReadCMOS PROC PASCAL ARG CMOSfunc:BYTE xor ax, ax mov al, [CMOSfunc] out 70h, al in al, 71h ret ENDP ReadCMOS WriteCMOS PROC PASCAL ARG Location:BYTE, Value:BYTE USES ax mov al, [Location] out 70h, al mov al, [Value] out 71h, al ret ENDP WriteCMOS ReadCMOSW PROC PASCAL ARG Location:WORD USES bx push [Location] call ReadCMOS mov bh, al inc [Location] push [Location] call ReadCMOS mov bl, al mov ax, bx ret ENDP ReadCMOSW WriteCMOSW PROC PASCAL ARG Location:WORD, Value:WORD USES ax, bx push [Location] push [WORD PTR Value+1] call WriteCMOS inc [Location] push [Location] push [WORD PTR Value+0] call WriteCMOS ret ENDP WriteCMOSW ;************************************* ; CMOS Checksum routines ;************************************* CalculateChecksum PROC PASCAL ARG From:BYTE, To:BYTE USES bx, cx xor bx, bx mov cl, [From] jmp short CheckEnd Looping: push cx call ReadCMOS add bx, ax inc cl CheckEnd: cmp cl, [To] jle short Looping mov ax, bx ret ENDP CalculateChecksum END
17.605505
42
0.442418
a420f9f9d18983eb44d177e8512dacf458fdc5b1
147
asm
Assembly
libsrc/_DEVELOPMENT/font/fzx/fonts/kk/_ff_kk_MontereyLatin1.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_MontereyLatin1.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_MontereyLatin1.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_MontereyLatin1 _ff_kk_MontereyLatin1: BINARY "font/fzx/fonts/kk/Monterey_Latin1.fzx"
14.7
46
0.857143
9ad5a034215cabbd37c1c61a5c2c378395a3974a
285
asm
Assembly
programs/oeis/155/A155590.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/155/A155590.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/155/A155590.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A155590: 7^n+2^n-1^n. ; 1,8,52,350,2416,16838,117712,823670,5765056,40354118,282476272,1977328790,13841291296,96889018598,678223089232,4747561542710,33232930635136,232630514118278,1628413598172592,11398895185897430 mov $1,7 pow $1,$0 mov $2,2 pow $2,$0 add $1,$2 mov $0,$1 sub $0,1
25.909091
192
0.768421
a554974491991ef9a8b8d167a1b12e8d26c76e18
317
asm
Assembly
libsrc/_DEVELOPMENT/arch/sms/SMSlib/c/sccz80/SMS_updateSpriteImage.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/arch/sms/SMSlib/c/sccz80/SMS_updateSpriteImage.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/arch/sms/SMSlib/c/sccz80/SMS_updateSpriteImage.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; void SMS_updateSpriteImage(signed char sprite, unsigned char image) SECTION code_clib SECTION code_SMSlib PUBLIC SMS_updateSpriteImage EXTERN asm_SMSlib_updateSpriteImage SMS_updateSpriteImage: pop af pop bc pop de push de push bc push af ld a,c jp asm_SMSlib_updateSpriteImage
14.409091
69
0.760252