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
0e6429715b9f09b7885e687122ce1c5eeae50978
2,942
asm
Assembly
source/texmap/tmap_llt.asm
arbruijn/d2gl
829b1990384b78087f3249feec7df13912e0da05
[ "Unlicense" ]
null
null
null
source/texmap/tmap_llt.asm
arbruijn/d2gl
829b1990384b78087f3249feec7df13912e0da05
[ "Unlicense" ]
null
null
null
source/texmap/tmap_llt.asm
arbruijn/d2gl
829b1990384b78087f3249feec7df13912e0da05
[ "Unlicense" ]
null
null
null
; THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX ; SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO ; END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A ; ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS ; IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS ; SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE ; FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE ; CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS ; AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. ; COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. .386 option oldstructs .nolist include pstypes.inc include psmacros.inc include tmap_inc.asm .list assume cs:_TEXT, ds:_DATA _DATA segment dword public USE32 'DATA' rcsid db "$Id: tmap_llt.asm 1.2 1996/01/24 18:33:44 matt Exp $" align 4 num_big_steps dd ? _DATA ends _TEXT segment para public USE32 'CODE' align 16 public asm_tmap_scanline_llt_ asm_tmap_scanline_llt_: START_TIMER push eax push ecx push edx push ebx push ebp push esi push edi ; set edi = address of first pixel to modify mov edi, _dest_row_data mov eax, _fx_v shr eax, 6 mov edx, _fx_u shl edx, 10 mov dx, ax ; EDX=U:V in 6.10 format mov eax, _fx_dv_dx shr eax, 6 mov esi, _fx_du_dx shl esi, 10 mov si, ax ; ESI=DU:DV in 6.10 format mov ebx, _fx_l mov ebp, _fx_dl_dx mov ecx, _pixptr mov eax, _loop_count inc eax mov _loop_count, eax shr eax, 3 je DoLeftOverPixels mov num_big_steps, eax and _loop_count, 7 NextPixelBlock: COUNT = 0 REPT 8 mov eax, edx shr ax, 10 rol eax, 6 and eax, 0ffffh add edx, esi mov al, [ecx+eax] mov ah, bh add ebx, ebp cmp al, 255 je @f mov al, _gr_fade_table[eax] mov [edi+COUNT], al @@: COUNT = COUNT + 1 ENDM add edi, COUNT dec num_big_steps jne NextPixelBlock DoLeftOverPixels: mov eax,_loop_count test eax, -1 jz _none_to_do shr eax, 1 je one_more_pix mov _loop_count, eax pushf NextPixel: COUNT = 0 REPT 2 mov eax, edx shr ax, 10 rol eax, 6 and eax, 0ffffh add edx, esi mov al, [ecx+eax] mov ah, bh add ebx, ebp cmp al, 255 je @f mov al, _gr_fade_table[eax] mov [edi+COUNT], al @@: COUNT = COUNT + 1 ENDM add edi, COUNT dec _loop_count jne NextPixel popf jnc _none_to_do one_more_pix: mov eax, edx shr ax, 10 rol eax, 6 and eax, 0ffffh mov al, [ecx+eax] mov ah, bh cmp al, 255 je @f mov al, _gr_fade_table[eax] mov [edi], al @@: _none_to_do: pop edi pop esi pop ebp pop ebx pop edx pop ecx pop eax STOP_TIMER ret _TEXT ends end
17.616766
78
0.662475
b3fb9fffccc1948360de19fd5806b24f56351f66
710
asm
Assembly
programs/oeis/158/A158560.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/158/A158560.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/158/A158560.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A158560: a(n) = 30n^2 - 1. ; 29,119,269,479,749,1079,1469,1919,2429,2999,3629,4319,5069,5879,6749,7679,8669,9719,10829,11999,13229,14519,15869,17279,18749,20279,21869,23519,25229,26999,28829,30719,32669,34679,36749,38879,41069,43319,45629,47999,50429,52919,55469,58079,60749,63479,66269,69119,72029,74999,78029,81119,84269,87479,90749,94079,97469,100919,104429,107999,111629,115319,119069,122879,126749,130679,134669,138719,142829,146999,151229,155519,159869,164279,168749,173279,177869,182519,187229,191999,196829,201719,206669,211679,216749,221879,227069,232319,237629,242999,248429,253919,259469,265079,270749,276479,282269,288119,294029,299999 mov $1,2 add $1,$0 mul $1,$0 mul $1,30 add $1,29 mov $0,$1
71
620
0.795775
cd657ff9699514ce6a119cf09967fd404c32ef57
301
asm
Assembly
programs/oeis/016/A016190.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/016/A016190.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/016/A016190.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A016190: Expansion of 1/((1-9x)(1-11x)). ; 1,20,301,4040,51001,620060,7352101,85656080,985263601,11225320100,126965305501,1427999420120,15990423157801,178436520564140,1985678518660501,22048354837360160,244384923399813601 add $0,1 mov $1,11 pow $1,$0 mov $2,9 pow $2,$0 sub $1,$2 div $1,2 mov $0,$1
25.083333
179
0.757475
341e805d9ea63a8a97672997702ac93c5d569030
1,141
asm
Assembly
programs/oeis/154/A154571.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/154/A154571.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/154/A154571.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A154571: Numbers that are congruent to {0, 3, 4, 5, 7, 8} mod 12. ; 0,3,4,5,7,8,12,15,16,17,19,20,24,27,28,29,31,32,36,39,40,41,43,44,48,51,52,53,55,56,60,63,64,65,67,68,72,75,76,77,79,80,84,87,88,89,91,92,96,99,100,101,103,104,108,111,112,113,115,116,120,123,124,125,127,128,132,135,136,137,139,140,144,147,148,149,151,152,156,159,160,161,163,164,168,171,172,173,175,176,180,183,184,185,187,188,192,195,196,197,199,200,204,207,208,209,211,212,216,219,220,221,223,224,228,231,232,233,235,236,240,243,244,245,247,248,252,255,256,257,259,260,264,267,268,269,271,272,276,279,280,281,283,284,288,291,292,293,295,296,300,303,304,305,307,308,312,315,316,317,319,320,324,327,328,329,331,332,336,339,340,341,343,344,348,351,352,353,355,356,360,363,364,365,367,368,372,375,376,377,379,380,384,387,388,389,391,392,396,399,400,401,403,404,408,411,412,413,415,416,420,423,424,425,427,428,432,435,436,437,439,440,444,447,448,449,451,452,456,459,460,461,463,464,468,471,472,473,475,476,480,483,484,485,487,488,492,495,496,497 mov $3,$0 mod $0,6 mov $2,$3 add $2,$3 sub $2,1 mov $1,$2 lpb $0,1 mov $4,$0 div $0,4 sub $1,$4 add $1,2 lpe add $1,1
67.117647
945
0.701139
c88031348df85ff0570f9ffa80529ef4ca9ce3c2
1,221
asm
Assembly
programs/oeis/250/A250120.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/250/A250120.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/250/A250120.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A250120: Coordination sequence for planar net 3.3.3.3.6 (also called the fsz net). ; 1,5,9,15,19,24,29,33,39,43,48,53,57,63,67,72,77,81,87,91,96,101,105,111,115,120,125,129,135,139,144,149,153,159,163,168,173,177,183,187,192,197,201,207,211,216,221,225,231,235,240,245,249,255,259,264,269,273,279,283,288,293,297,303,307,312,317,321,327,331,336,341,345,351,355,360,365,369,375,379,384,389,393,399,403,408,413,417,423,427,432,437,441,447,451,456,461,465,471,475,480,485,489,495,499,504,509,513,519,523,528,533,537,543,547,552,557,561,567,571,576,581,585,591,595,600,605,609,615,619,624,629,633,639,643,648,653,657,663,667,672,677,681,687,691,696,701,705,711,715,720,725,729,735,739,744,749,753,759,763,768,773,777,783,787,792,797,801,807,811,816,821,825,831,835,840,845,849,855,859,864,869,873,879,883,888,893,897,903,907,912,917,921,927,931,936,941,945,951,955,960,965,969,975,979,984,989,993,999,1003,1008,1013,1017,1023,1027,1032,1037,1041,1047,1051,1056,1061,1065,1071,1075,1080,1085,1089,1095,1099,1104,1109,1113,1119,1123,1128,1133,1137,1143,1147,1152,1157,1161,1167,1171,1176,1181,1185,1191,1195 mul $0,2 mov $1,1 add $1,$0 mov $2,$1 add $2,3 lpb $0,1 sub $0,1 trn $1,$2 add $1,3 sub $2,2 trn $2,3 lpe
76.3125
1,018
0.727273
7fbe64aeea3d3ea68be93a6f70f7b82537f41d5b
1,004
asm
Assembly
EjerciciosClase/slides4x5.asm
adeandak/OPC
4384259c5f4e46d67a6c4417ea72953a62ccd901
[ "MIT" ]
null
null
null
EjerciciosClase/slides4x5.asm
adeandak/OPC
4384259c5f4e46d67a6c4417ea72953a62ccd901
[ "MIT" ]
null
null
null
EjerciciosClase/slides4x5.asm
adeandak/OPC
4384259c5f4e46d67a6c4417ea72953a62ccd901
[ "MIT" ]
null
null
null
TITLE *MASM Template (slides4x5x6.asm)* ; Descripcion: ; BGslides4x5 ; INCLUDE \masm32\Irvine\Irvine32.inc INCLUDELIB \masm32\Irvine\Irvine32.lib INCLUDELIB \masm32\Irvine\User32.lib INCLUDELIB \masm32\Irvine\Kernel32.lib .DATA val1 WORD 2000h val2 WORD 100h .CODE ; Procedimiento principal main PROC ; 2000h * 100h, using 16-bit operands MOV EAX, 0 MOV EDX, 0 MOV AX,val1 MUL val2 ; DX:AX = 00200000h, CF=1 call DumpRegs call CrLf ; ++++++++ ; 12345h * 1000h, using 32-bit operands MOV EAX,12345h MOV EBX,1000h MUL EBX ; EDX:EAX = 0000000012345000h, CF=0 call DumpRegs call CrLf ; ++++++++ ; 5h * 10h, using 8-bit operands MOV EAX, 0 MOV EBX, 0 MOV AL,05h MOV BL,10h MUL BL ; AH:AL = 0050h, CF=0 call DumpRegs call CrLf exit main ENDP ; Termina el procedimiento principal ; Termina el area de Ensamble END main
18.254545
56
0.599602
79f1a36dc465e224facaa53adcf946f849ace45e
261
asm
Assembly
core/src/code_generation/tests/ifelse-1.asm
mari-linhares/GoCompiler
dc87ff118ee5752fa1da3271ae57679a8ac449a3
[ "Apache-2.0" ]
1
2019-03-01T23:20:03.000Z
2019-03-01T23:20:03.000Z
core/src/code_generation/tests/ifelse-1.asm
mari-linhares/GoCompiler
dc87ff118ee5752fa1da3271ae57679a8ac449a3
[ "Apache-2.0" ]
null
null
null
core/src/code_generation/tests/ifelse-1.asm
mari-linhares/GoCompiler
dc87ff118ee5752fa1da3271ae57679a8ac449a3
[ "Apache-2.0" ]
null
null
null
100: LD SP, #4000 108: LD R1, #10 116: ST a, R1 124: LD R2, #2 132: ST b, R2 function block 1000: SUB R3, R1, R2 1008: BLEZ R3, #1048 1016: AND R4, #true, #false 1024: LD R0, R4 1032: BR *0(SP) 1040: BR #1064 1048: LD R0, #false 1056: BR *0(SP) function main
14.5
27
0.632184
b7a94ab8d3a4c58d8b25252ddf38ed7ec055f915
4,272
asm
Assembly
constants/scgb_constants.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
6
2021-06-19T06:41:19.000Z
2022-02-15T17:12:33.000Z
constants/scgb_constants.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
null
null
null
constants/scgb_constants.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
2
2021-08-11T19:47:07.000Z
2022-01-01T07:07:56.000Z
; GetSGBLayout arguments (see engine/gfx/cgb_layouts.asm and engine/gfx/sgb_layouts.asm) const_def const SCGB_BATTLE_GRAYSCALE const SCGB_BATTLE_COLORS const SCGB_POKEGEAR_PALS const SCGB_STATS_SCREEN_HP_PALS const SCGB_POKEDEX const SCGB_SLOT_MACHINE const SCGB_BETA_TITLE_SCREEN const SCGB_GS_INTRO const SCGB_DIPLOMA const SCGB_MAPPALS const SCGB_PARTY_MENU const SCGB_EVOLUTION const SCGB_GS_TITLE_SCREEN const SCGB_0D const SCGB_MOVE_LIST const SCGB_BETA_PIKACHU_MINIGAME const SCGB_POKEDEX_SEARCH_OPTION const SCGB_BETA_POKER const SCGB_POKEPIC const SCGB_MAGNET_TRAIN const SCGB_PACKPALS const SCGB_TRAINER_CARD const SCGB_POKEDEX_UNOWN_MODE const SCGB_BILLS_PC const SCGB_UNOWN_PUZZLE const SCGB_GAMEFREAK_LOGO const SCGB_PLAYER_OR_MON_FRONTPIC_PALS const SCGB_TRADE_TUBE const SCGB_TRAINER_OR_MON_FRONTPIC_PALS const SCGB_MYSTERY_GIFT const SCGB_1E const SCGB_MINING_GAME const SCGB_INTRO_BOTH_PLAYER_PALS const SCGB_INTRO_SANDGEM const SCGB_CHOOSE_STARTER const SCGB_CHOOSE_STARTER_POKEPIC SCGB_PARTY_MENU_HP_PALS EQU -4 SCGB_RAM EQU -1 ; PredefPals indexes (see gfx/sgb/predef.pal) ; GetPredefPal arguments (see engine/gfx/color.asm) const_def const PREDEFPAL_00 const PREDEFPAL_PALLET const PREDEFPAL_VIRIDIAN const PREDEFPAL_PEWTER const PREDEFPAL_CERULEAN const PREDEFPAL_LAVENDER const PREDEFPAL_VERMILION const PREDEFPAL_CELADON const PREDEFPAL_FUCHSIA const PREDEFPAL_CINNABAR const PREDEFPAL_SAFFRON const PREDEFPAL_INDIGO const PREDEFPAL_NEW_BARK const PREDEFPAL_CHERRYGROVE const PREDEFPAL_VIOLET const PREDEFPAL_AZALEA const PREDEFPAL_GOLDENROD const PREDEFPAL_ECRUTEAK const PREDEFPAL_OLIVINE const PREDEFPAL_CIANWOOD const PREDEFPAL_MAHOGANY const PREDEFPAL_BLACKTHORN const PREDEFPAL_LAKE_OF_RAGE const PREDEFPAL_SILVER_CAVE const PREDEFPAL_DUNGEONS const PREDEFPAL_NITE const PREDEFPAL_BLACKOUT const PREDEFPAL_DIPLOMA ; RB_MEWMON const PREDEFPAL_TRADE_TUBE ; RB_BLUEMON const PREDEFPAL_POKEDEX ; RB_REDMON const PREDEFPAL_RB_CYANMON const PREDEFPAL_RB_PURPLEMON const PREDEFPAL_RB_BROWNMON const PREDEFPAL_RB_GREENMON const PREDEFPAL_RB_PINKMON const PREDEFPAL_RB_YELLOWMON const PREDEFPAL_CGB_BADGE ; RB_GREYMON const PREDEFPAL_BETA_SHINY_MEWMON const PREDEFPAL_BETA_SHINY_BLUEMON const PREDEFPAL_BETA_SHINY_REDMON const PREDEFPAL_BETA_SHINY_CYANMON const PREDEFPAL_BETA_SHINY_PURPLEMON const PREDEFPAL_BETA_SHINY_BROWNMON const PREDEFPAL_BETA_SHINY_GREENMON const PREDEFPAL_BETA_SHINY_PINKMON const PREDEFPAL_BETA_SHINY_YELLOWMON const PREDEFPAL_PARTY_ICON ; BETA_SHINY_GREYMON const PREDEFPAL_HP_GREEN const PREDEFPAL_HP_YELLOW const PREDEFPAL_HP_RED const PREDEFPAL_POKEGEAR const PREDEFPAL_BETA_LOGO_1 const PREDEFPAL_BETA_LOGO_2 const PREDEFPAL_GS_INTRO_GAMEFREAK_LOGO const PREDEFPAL_GS_INTRO_SHELLDER_LAPRAS const PREDEFPAL_BETA_INTRO_LAPRAS const PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_BG const PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_OB const PREDEFPAL_GS_INTRO_STARTERS_TRANSITION const PREDEFPAL_BETA_INTRO_VENUSAUR const PREDEFPAL_PACK ; GS_INTRO_CHARIZARD const PREDEFPAL_SLOT_MACHINE_0 const PREDEFPAL_SLOT_MACHINE_1 const PREDEFPAL_SLOT_MACHINE_2 const PREDEFPAL_SLOT_MACHINE_3 const PREDEFPAL_BETA_POKER_0 const PREDEFPAL_BETA_POKER_1 const PREDEFPAL_BETA_POKER_2 const PREDEFPAL_BETA_POKER_3 const PREDEFPAL_BETA_RADIO const PREDEFPAL_BETA_POKEGEAR const PREDEFPAL_47 const PREDEFPAL_GS_TITLE_SCREEN_0 const PREDEFPAL_GS_TITLE_SCREEN_1 const PREDEFPAL_GS_TITLE_SCREEN_2 const PREDEFPAL_GS_TITLE_SCREEN_3 const PREDEFPAL_UNOWN_PUZZLE const PREDEFPAL_GAMEFREAK_LOGO_OB const PREDEFPAL_GAMEFREAK_LOGO_BG ; SGB system command codes ; http://gbdev.gg8.se/wiki/articles/SGB_Functions#SGB_System_Command_Table const_def const SGB_PAL01 const SGB_PAL23 const SGB_PAL03 const SGB_PAL12 const SGB_ATTR_BLK const SGB_ATTR_LIN const SGB_ATTR_DIV const SGB_ATTR_CHR const SGB_SOUND const SGB_SOU_TRN const SGB_PAL_SET const SGB_PAL_TRN const SGB_ATRC_EN const SGB_TEST_EN const SGB_ICON_EN const SGB_DATA_SND const SGB_DATA_TRN const SGB_MLT_REG const SGB_JUMP const SGB_CHR_TRN const SGB_PCT_TRN const SGB_ATTR_TRN const SGB_ATTR_SET const SGB_MASK_EN const SGB_OBJ_TRN PALPACKET_LENGTH EQU $10
27.384615
88
0.878979
d575093ad10ee39d9b821957e6b47f8770f4fd45
3,125
asm
Assembly
externals/mpir-3.0.0/mpn/x86/pentium/mul_2.asm
JaminChan/eos_win
c03e57151cfe152d0d3120abb13226f4df74f37e
[ "MIT" ]
1
2018-08-14T03:52:21.000Z
2018-08-14T03:52:21.000Z
externals/mpir-3.0.0/mpn/x86/pentium/mul_2.asm
JaminChan/eos_win
c03e57151cfe152d0d3120abb13226f4df74f37e
[ "MIT" ]
null
null
null
externals/mpir-3.0.0/mpn/x86/pentium/mul_2.asm
JaminChan/eos_win
c03e57151cfe152d0d3120abb13226f4df74f37e
[ "MIT" ]
null
null
null
dnl Intel Pentium mpn_mul_2 -- mpn by 2-limb multiplication. dnl Copyright 2001, 2002 Free Software Foundation, Inc. dnl dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Lesser General Public License as dnl published by the Free Software Foundation; either version 2.1 of the dnl License, or (at your option) any later version. dnl dnl The GNU MP Library is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl Lesser General Public License for more details. dnl dnl You should have received a copy of the GNU Lesser General Public dnl License along with the GNU MP Library; see the file COPYING.LIB. If dnl not, write to the Free Software Foundation, Inc., 51 Franklin Street, dnl Fifth Floor, Boston, MA 02110-1301, USA. */ include(`../config.m4') C P5: 24.0 cycles/limb C mp_limb_t mpn_mul_2 (mp_ptr dst, mp_srcptr src, mp_size_t size, C mp_srcptr mult); C C At 24 c/l this is only 2 cycles faster than a separate mul_1 and addmul_1, C but has the advantage of making just one pass over the operands. C C There's not enough registers to use PARAM_MULT directly, so the multiplier C limbs are transferred to local variables on the stack. defframe(PARAM_MULT, 16) defframe(PARAM_SIZE, 12) defframe(PARAM_SRC, 8) defframe(PARAM_DST, 4) dnl re-use parameter space define(VAR_MULT_LOW, `PARAM_SRC') define(VAR_MULT_HIGH,`PARAM_DST') TEXT ALIGN(8) PROLOGUE(mpn_mul_2) deflit(`FRAME',0) pushl %esi FRAME_pushl() pushl %edi FRAME_pushl() movl PARAM_SRC, %esi movl PARAM_DST, %edi movl PARAM_MULT, %eax movl PARAM_SIZE, %ecx movl 4(%eax), %edx C mult high movl (%eax), %eax C mult low movl %eax, VAR_MULT_LOW movl %edx, VAR_MULT_HIGH pushl %ebx FRAME_pushl() pushl %ebp FRAME_pushl() mull (%esi) C src[0] * mult[0] movl %eax, %ebp C in case src==dst movl (%esi), %eax C src[0] movl %ebp, (%edi) C dst[0] movl %edx, %ebx C initial low carry xorl %ebp, %ebp C initial high carry leal (%edi,%ecx,4), %edi C dst end mull VAR_MULT_HIGH C src[0] * mult[1] subl $2, %ecx C size-2 js L(done) leal 8(%esi,%ecx,4), %esi C &src[size] xorl $-1, %ecx C -(size-1) L(top): C eax low prod C ebx low carry C ecx counter, negative C edx high prod C esi src end C edi dst end C ebp high carry (0 or -1) andl $1, %ebp C 1 or 0 addl %eax, %ebx adcl %edx, %ebp ASSERT(nc) movl (%esi,%ecx,4), %eax mull VAR_MULT_LOW addl %eax, %ebx C low carry movl (%esi,%ecx,4), %eax adcl %ebp, %edx C high carry movl %ebx, (%edi,%ecx,4) sbbl %ebp, %ebp C new high carry, -1 or 0 movl %edx, %ebx C new low carry mull VAR_MULT_HIGH incl %ecx jnz L(top) L(done): andl $1, %ebp C 1 or 0 addl %ebx, %eax adcl %ebp, %edx ASSERT(nc) movl %eax, (%edi) C store carry low movl %edx, %eax C return carry high popl %ebp popl %ebx popl %edi popl %esi ret EPILOGUE()
22.007042
76
0.69696
d0346ce30fcfbc46e2cd0404fb7152607666b386
561
asm
Assembly
examples and results/Draw sun/user_code[for user].asm
Hollbrok/CPU_cpp_version
cb68128e1b0d3ce51fcf9cdd5c2a39277365acd5
[ "MIT" ]
5
2021-03-31T20:40:12.000Z
2021-04-10T22:14:33.000Z
04. CPU/examples and results/Draw sun/user_code[for user].asm
Hollbrok/Ilab-2020-21
819a30dc4485ad874c273e9a01ca4adcf8bb2ea0
[ "MIT" ]
1
2021-04-10T21:43:29.000Z
2021-04-10T21:43:29.000Z
04. CPU/examples and results/Draw sun/user_code[for user].asm
Hollbrok/Ilab-2020-21
819a30dc4485ad874c273e9a01ca4adcf8bb2ea0
[ "MIT" ]
2
2021-04-10T21:52:03.000Z
2021-06-04T18:00:17.000Z
push 25 push 100 push 125 pop rcx pop rbx pop rax push rcx pop (2) ; кладем пиксель из стека в оперативку push rbx pop (1) ; кладем пиксель из стека в оперативку push rax pop (0) ; кладем пиксель из стека в оперативку fill push 255 push 255 push 0 pop rcx pop rbx pop rax push rcx pop (5) ; кладем пиксель из стека в оперативку push rbx pop (4) ; кладем пиксель из стека в оперативку push rax pop (3) ; кладем пиксель из стека в оперативку push 300 push 0 push 100 circ hlt
13.046512
49
0.636364
b76fc0c7545b3f5c4c406b0ff7006c4ddc2981d2
2,263
asm
Assembly
programs/oeis/211/A211612.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/211/A211612.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/211/A211612.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A211612: Number of ordered triples (w,x,y) with all terms in {-n,...-1,1,...,n} and w+x+y>=0. ; 0,4,35,117,274,530,909,1435,2132,3024,4135,5489,7110,9022,11249,13815,16744,20060,23787,27949,32570,37674,43285,49427,56124,63400,71279,79785,88942,98774,109305,120559,132560,145332,158899,173285,188514,204610,221597,239499,258340,278144,298935,320737,343574,367470,392449,418535,445752,474124,503675,534429,566410,599642,634149,669955,707084,745560,785407,826649,869310,913414,958985,1006047,1054624,1104740,1156419,1209685,1264562,1321074,1379245,1439099,1500660,1563952,1628999,1695825,1764454,1834910,1907217,1981399,2057480,2135484,2215435,2297357,2381274,2467210,2555189,2645235,2737372,2831624,2928015,3026569,3127310,3230262,3335449,3442895,3552624,3664660,3779027,3895749,4014850,4136354,4260285,4386667,4515524,4646880,4780759,4917185,5056182,5197774,5341985,5488839,5638360,5790572,5945499,6103165,6263594,6426810,6592837,6761699,6933420,7108024,7285535,7465977,7649374,7835750,8025129,8217535,8412992,8611524,8813155,9017909,9225810,9436882,9651149,9868635,10089364,10313360,10540647,10771249,11005190,11242494,11483185,11727287,11974824,12225820,12480299,12738285,12999802,13264874,13533525,13805779,14081660,14361192,14644399,14931305,15221934,15516310,15814457,16116399,16422160,16731764,17045235,17362597,17683874,18009090,18338269,18671435,19008612,19349824,19695095,20044449,20397910,20755502,21117249,21483175,21853304,22227660,22606267,22989149,23376330,23767834,24163685,24563907,24968524,25377560,25791039,26208985,26631422,27058374,27489865,27925919,28366560,28811812,29261699,29716245,30175474,30639410,31108077,31581499,32059700,32542704,33030535,33523217,34020774,34523230,35030609,35542935,36060232,36582524,37109835,37642189,38179610,38722122,39269749,39822515,40380444,40943560,41511887,42085449,42664270,43248374,43837785,44432527,45032624,45638100,46248979,46865285,47487042,48114274,48747005,49385259,50029060,50678432,51333399,51993985,52660214,53332110,54009697,54692999,55382040,56076844,56777435,57483837,58196074,58914170,59638149,60368035,61103852,61845624 mul $0,2 mov $2,$0 lpb $0,1 add $0,$2 add $3,$2 lpb $2,1 sub $2,1 add $4,$3 lpe lpb $0,1 sub $0,4 add $5,$4 add $4,3 lpe mov $1,$5 lpe
113.15
1,996
0.828988
2173fb450aec409773a62dbd13e5031d78f4ed82
462
asm
Assembly
experiments/count/cas.4.3/count.checker.asm
phlo/concubine
2a3bc9474878951aef54e8c7b6c47c5b4ac02fb1
[ "MIT" ]
null
null
null
experiments/count/cas.4.3/count.checker.asm
phlo/concubine
2a3bc9474878951aef54e8c7b6c47c5b4ac02fb1
[ "MIT" ]
null
null
null
experiments/count/cas.4.3/count.checker.asm
phlo/concubine
2a3bc9474878951aef54e8c7b6c47c5b4ac02fb1
[ "MIT" ]
null
null
null
# Paul McKenney's Statistical Counter (PerfBook 5.2) # # Summation (checker) thread: EXIT 1 if global counter is not incremented 3 # times by 4 threads (heap[0] != 3 * 4). # # steps: # * total = 5 # # template parameter: # * 12 = expected global counter value # CHECK 0 # start checker thread ADDI 12 # expected result CMP 0 # compare to global JNZ error # check result EXIT 0 # result == 4 * 3 error: EXIT 1 # error: result != 4 * 3
25.666667
75
0.640693
46e90c6a87426ddaa6c616a85d6acf7071a57569
498
asm
Assembly
CPU/cpu_test/test_storage/test1_branch_bgez.asm
SilenceX12138/MIPS-Microsystems
d389b706b0930151a710b544db436c2883af958b
[ "MIT" ]
55
2021-09-06T12:12:47.000Z
2022-01-15T04:30:53.000Z
CPU/cpu_test/test_storage/test1_branch_bgez.asm
SilenceX12138/MIPS-Microsystems
d389b706b0930151a710b544db436c2883af958b
[ "MIT" ]
null
null
null
CPU/cpu_test/test_storage/test1_branch_bgez.asm
SilenceX12138/MIPS-Microsystems
d389b706b0930151a710b544db436c2883af958b
[ "MIT" ]
null
null
null
lui $2,0xffff ori $2,$2,0xfffe bgez $2,target ori $2,$0,2119 xori $3,$2,2395 andi $3,$3,4937 addiu $4,$3,7887 target: bgez $2,target1 addi $3,$2,293 ori $3,$0,2039 target1: bgez $0,target2 add $4,$4,2345 ori $4,$0,9392 target2: sub $6,$4,$3 lui $4,0xffff ori $3,$0,0xfffe ori $2,$0,4 or $5,$0,$2 or $2,$3,$4 sw $2,0($5) lw $6,4($0) bgez $6,target3 ori $3,$0,2582 ori $4,$0,8378 ori $2,$0,4526 nor $6,$3,$4 nor $5,$2,$3 xor $7,$3,$6 xor $8,$3,$2 target3: bgez $8,target4 and $3,$3,$4 target4:
11.857143
16
0.60241
933faf9c823e73574d68599ddc37282aeed2970c
655
asm
Assembly
programs/oeis/135/A135521.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/135/A135521.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/135/A135521.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A135521: a(n) = 2^(A091090(n)) - 1. ; 1,1,3,1,3,1,7,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,63,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,63,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,127,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,63,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,127,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,63,1,3,1,7,1,3,1,15,1,3,1,7,1,3,1,31,1,3,1,7,1,3,1,15,1,3,1 add $0,2 lpb $0 gcd $0,4096 mul $0,2 lpe mov $1,$0 div $1,2 mul $1,2 sub $1,1
50.384615
533
0.528244
4c551d6741c772cf68718a986abbcc5d1f45561d
326
asm
Assembly
MASM programs/smlno.asm
Abhicake/MPMC-LAB-Programs
598c0db844e37dbb17548f25b9bccb42ca08d507
[ "MIT" ]
1
2020-05-24T05:37:16.000Z
2020-05-24T05:37:16.000Z
MASM programs/smlno.asm
Abhicake/MPMC-Lab-Programs
598c0db844e37dbb17548f25b9bccb42ca08d507
[ "MIT" ]
null
null
null
MASM programs/smlno.asm
Abhicake/MPMC-Lab-Programs
598c0db844e37dbb17548f25b9bccb42ca08d507
[ "MIT" ]
null
null
null
; smallest no. Assume cs:code , ds:data data segment data ends code segment start: mov ax,0ffffh; mov si , 0200h; mov cx,[si] mov cx,[si]; back: inc si; inc si cmp ax,[si] JB go mov ax,[si] go: loop back mov di,0251 mov [di],ax; ;mov [di+1] , ah; int 03h code ends end start ; o/p: ; ax = smallest no.
10.1875
24
0.613497
654fb3f5408d6aca5159a8a7644860ca4892c1ec
2,050
asm
Assembly
engine/battle/move_effects/sketch.asm
genterz/pokecross
5e62ab6c23e624ea82d599af306f9c52d768a8b4
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
engine/battle/move_effects/sketch.asm
genterz/pokecross
5e62ab6c23e624ea82d599af306f9c52d768a8b4
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
engine/battle/move_effects/sketch.asm
genterz/pokecross
5e62ab6c23e624ea82d599af306f9c52d768a8b4
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
BattleCommand_Sketch: ; sketch call ClearLastMove ; Don't sketch during a link battle ld a, [wLinkMode] and a jr z, .not_linked call AnimateFailedMove jp PrintNothingHappened .not_linked ; If the opponent has a substitute up, fail. call CheckSubstituteOpp jp nz, .fail ; If the opponent is transformed, fail. ld a, BATTLE_VARS_SUBSTATUS5_OPP call GetBattleVarAddr bit SUBSTATUS_TRANSFORMED, [hl] jp nz, .fail ; Get the user's moveset in its party struct. ; This move replacement shall be permanent. ; Pointer will be in de. ld a, MON_MOVES call UserPartyAttr ld d, h ld e, l ; Get the battle move structs. ld hl, wBattleMonMoves ldh a, [hBattleTurn] and a jr z, .get_last_move ld hl, wEnemyMonMoves .get_last_move ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP call GetBattleVar ld [wNamedObjectIndexBuffer], a ld b, a ; Fail if move is invalid or is Struggle. and a jr z, .fail cp STRUGGLE jr z, .fail ; Fail if user already knows that move ld c, NUM_MOVES .does_user_already_know_move ld a, [hli] cp b jr z, .fail dec c jr nz, .does_user_already_know_move ; Find Sketch in the user's moveset. ; Pointer in hl, and index in c. dec hl ld c, NUM_MOVES .find_sketch dec c ld a, [hld] cp SKETCH jr nz, .find_sketch inc hl ; The Sketched move is loaded to that slot. ld a, b ld [hl], a ; Copy the base PP from that move. push bc push hl dec a ld hl, Moves + MOVE_PP call GetMoveAttr pop hl ld bc, wBattleMonPP - wBattleMonMoves add hl, bc ld [hl], a pop bc ldh a, [hBattleTurn] and a jr z, .user_trainer ld a, [wBattleMode] dec a jr nz, .user_trainer ; wildmon ld a, [hl] push bc ld hl, wWildMonPP ld b, 0 add hl, bc ld [hl], a ld hl, wWildMonMoves add hl, bc pop bc ld [hl], b jr .done_copy .user_trainer ld a, [hl] push af ld l, c ld h, 0 add hl, de ld a, b ld [hl], a pop af ld de, MON_PP - MON_MOVES add hl, de ld [hl], a .done_copy call GetMoveName call AnimateCurrentMove ld hl, SketchedText jp StdBattleTextbox .fail call AnimateFailedMove jp PrintDidntAffect
17.372881
45
0.716585
f6e9e9db387295b843c508e2b1691c1da0ee1c35
680
asm
Assembly
programs/oeis/195/A195316.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/195/A195316.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/195/A195316.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A195316: Centered 36-gonal numbers. ; 1,37,109,217,361,541,757,1009,1297,1621,1981,2377,2809,3277,3781,4321,4897,5509,6157,6841,7561,8317,9109,9937,10801,11701,12637,13609,14617,15661,16741,17857,19009,20197,21421,22681,23977,25309,26677,28081,29521,30997,32509,34057,35641,37261,38917,40609,42337,44101,45901,47737,49609,51517,53461,55441,57457,59509,61597,63721,65881,68077,70309,72577,74881,77221,79597,82009,84457,86941,89461,92017,94609,97237,99901,102601,105337,108109,110917,113761,116641,119557,122509,125497,128521,131581,134677,137809,140977,144181,147421,150697,154009,157357,160741,164161,167617,171109,174637,178201 sub $1,$0 bin $1,2 mul $1,36 add $1,1 mov $0,$1
75.555556
592
0.802941
f2c3fa2edc4d2a92469d092e6210041341b67d71
8,299
asm
Assembly
unfinished/cracktro_gigascreen/cracktro3_unfinished.asm
alexanderbazhenoff/zx-spectrum-various
80cf61cb8cc6f9b5b1cd6ce9b0e394323afe346e
[ "MIT" ]
null
null
null
unfinished/cracktro_gigascreen/cracktro3_unfinished.asm
alexanderbazhenoff/zx-spectrum-various
80cf61cb8cc6f9b5b1cd6ce9b0e394323afe346e
[ "MIT" ]
null
null
null
unfinished/cracktro_gigascreen/cracktro3_unfinished.asm
alexanderbazhenoff/zx-spectrum-various
80cf61cb8cc6f9b5b1cd6ce9b0e394323afe346e
[ "MIT" ]
null
null
null
; This Source Code Form is subject to the terms of the MIT ; hLicense. If a copy of the MPL was not distributed with ; this file, You can obtain one at https://github.com/aws/mit-0 ; sunshine cracktro by alx^bw. almost done but never released. ORG #6000 ATTR_MODE EQU 0 TEXT_BUFFER_PIX EQU #F040 ;[#0FC0] TEXT_BUFFER_ATR1 EQU #EE00 ;[#0240] TEXT_BUFFER_ATR2 EQU #EB00 ;[#0240] TEXT_BUFFER_BEGIN EQU TEXT_BUFFER_ATR2 ENTR EQU #0D ENTR_WR EQU #0A TAB EQU #08 IF0 ATTR_MODE ATRI0 EQU 2 ATRI1 EQU 1 ATRI2 EQU 3 ATRI4 EQU 5 ENDIF IF0 ATTR_MODE-1 ATRI0 EQU 2 ATRI1 EQU 2 ATRI2 EQU 3 ATRI4 EQU 6 ENDIF IF0 ATTR_MODE-2 ATRI0 EQU 2 ATRI1 EQU 2 ATRI2 EQU 4 ATRI4 EQU 6 ENDIF IF0 ATTR_MODE-3 ATRI0 EQU 2 ATRI1 EQU 1 ATRI2 EQU 4 ATRI4 EQU 6 ENDIF IF0 ATTR_MODE-4 ATRI0 EQU 2 ATRI1 EQU 1 ATRI2 EQU 5 ATRI4 EQU 6 ENDIF IF0 ATTR_MODE-5 ATRI0 EQU 2 ATRI1 EQU 2 ATRI2 EQU 5 ATRI4 EQU 6 ENDIF IF0 ATTR_MODE-6 ATRI0 EQU 2 ATRI1 EQU 1 ATRI2 EQU 4 ATRI4 EQU 5 ENDIF IF0 ATTR_MODE-7 ATRI0 EQU 2 ATRI1 EQU 3 ATRI2 EQU 4 ATRI4 EQU 6 ENDIF MACRO ATR0 DB #C0+ATRI0,#40+ATRI0 ENDM MACRO ATR1A DB #C0+ATRI1,ATRI0 ENDM MACRO ATR1B DB #C0+ATRI1,#07 ENDM MACRO ATR2A DB #C0+ATRI1,#40+ATRI1 ENDM MACRO ATR2B DB #C0+ATRI1,ATRI4 ENDM MACRO ATR3A DB #C0+ATRI2,#40+ATRI2 ENDM MACRO ATR3B DB #C0+ATRI2,#40+ATRI1 ENDM MACRO ATR4A DB #80+ATRI4,#40+ATRI2 ENDM MACRO ATR4B DB #C7,#40+ATRI2 ENDM MACRO ATR5A DB #C0+ATRI4,#40+ATRI4 ENDM MACRO ATR5B DB #C0+ATRI4,#47 ENDM MACRO ATR6A DB #C7,#47 ENDM MACRO ATR6B DB #C7,#40+ATRI1 ENDM CALL CLS ; CALL INSTALL CALL CLEAR_BUFFER LD IX,TEXT1 CALL PRINT_PAGE CALL OUTPUT_BUFFER MWL HALT LD HL,TEXT_BUFFER_ATR1 CALL OUTATR HALT LD HL,TEXT_BUFFER_ATR2 CALL OUTATR CALL #1F54 RET NC JR C,MWL RET OUTATR LD DE,#5804 LD BC,#1818 OUTAL PUSH BC LD B,0 LDIR EX DE,HL LD C,8 ADD HL,BC EX DE,HL POP BC DJNZ OUTAL RET ;-------- CLEAR SCREEN ROUTINES ------------------------ CLS EI HALT LD HL,#5800 LD DE,#5801 LD BC,#02FF LD (HL),L PUSH HL LDIR POP HL LD A,C CLS2L DEC HL LD (HL),A CP (HL) JR Z,CLS2L RET ;-------- CLEAR BUFFER ROUTINES ------------------------ CLEAR_BUFFER XOR A LD HL,TEXT_BUFFER_BEGIN-1 CL_BR_L INC HL LD (HL),A CP (HL) JR Z,CL_BR_L RET ;-------- OUTPUT BUFFER ROUTINES ----------------------- OUTPUT_BUFFER LD HL,TEXT_BUFFER_PIX LD DE,#4004 LD BC,#0718 OTPBF_L PUSH BC PUSH HL OTPBFL1 PUSH BC PUSH HL PUSH DE LD BC,#18 LDIR POP DE CALL DOWN_DE POP HL LD BC,24*24 ADD HL,BC POP BC DJNZ OTPBFL1 CALL DOWN_DE POP HL LD C,#18 ADD HL,BC POP BC DEC C JR NZ,OTPBF_L RET ;-------- PRINT PAGE ROUTINES -------------------------- PRINT_PAGE LD BC,#100 EXX LD HL,TEXT_BUFFER_PIX LD DE,TEXT_BUFFER_ATR2 PRNTPGL LD A,(IX) OR A RET Z BIT 7,A JR Z,NO_CHANGE_ATR EXX AND #7F LD E,A INC IX LD D,(IX) EXX JP PR_PG0 NO_CHANGE_ATR LD BC,#18 CP ENTR_WR JR NZ,NO_ENTER_WR EXX INC B EXX EX DE,HL ADD HL,BC EX DE,HL ADD HL,BC JR PR_PG0 NO_ENTER_WR CP ENTR JR NZ,NO_ENTER LD HL,TEXT_BUFFER_PIX-#18 LD DE,TEXT_BUFFER_ATR2-#18 EXX INC B LD A,B LD C,0 EXX LD C,#18 ENTR_AL EX DE,HL ADD HL,BC EX DE,HL ADD HL,BC DEC A JR NZ,ENTR_AL JR PR_PG0 NO_ENTER CP TAB JR NZ,NO_TAB INC IX LD B,(IX) TAB_L INC HL INC DE CALL POS_MNG DJNZ TAB_L JR PR_PG0 NO_TAB ;---PRINT CHR PUSH DE PUSH HL PUSH HL LD L,A LD H,0 DUP 3 ADD HL,HL EDUP LD BC,FONT-#100 ADD HL,BC EX DE,HL POP HL LD BC,#240 DUP 6 LD A,(DE) LD (HL),A INC DE ADD HL,BC EDUP LD A,(DE) LD (HL),A POP HL POP DE EXX PUSH DE EXX POP BC EX DE,HL LD (HL),C LD A,H DUP 3 INC H EDUP LD (HL),B LD H,A EX DE,HL INC HL INC DE CALL POS_MNG PR_PG0 INC IX JP PRNTPGL POS_MNG EXX INC C LD A,C CP #18 JR NZ,NO_NXTL LD C,0 INC B NO_NXTL EXX RET ;------- COUNTER FOR THE NEXT LINE ON SCR$ (DE) -------- DOWN_DE INC D LD A,D AND 7 RET NZ LD A,E ADD A,#20 LD E,A RET C LD A,D SUB 8 LD D,A RET ; ----- load font FONT INCBIN "razdolb_.f" TEXT1 ATR5B DB "WATCHA" ATR3A DB "!",ENTR,ENTR ATR6B DB "IT" ATR3B DB "'" ATR6B DB "S " ATR3B DB "TIME " ATR2B DB "TO " ATR3A DB "GET" ATR4B DB TAB,20,"SOMETHING" ATR1A DB "...",ENTR ATR4B DB "..." ATR5A DB "SOMETHING " ATR2B DB "FROM" ATR3A DB TAB,18,"THE " ATR2A DB "DEEP " ATR1B DB "PAST" ATR1A DB TAB,8,"IN " ATR3B DB "GAMEMAKING" ATR5B DB TAB,19,"HYSTORY" ATR1A DB "." ATR2B DB "..." ATR6A DB "SOMETHING" ATR4B DB TAB,19,"REALLY " ATR3A DB "COOL " ATR3B DB "WHICH" ATR1A DB TAB,5,"INVADES " ATR5A DB "OUR" ATR2A DB TAB,15,"(" ATR1B DB "AND " ATR3A DB "I " ATR2B DB "HOPE " ATR5B DB "YOUR" ATR2A DB ")" ATR6B DB TAB,14,"ATTENTION" ATR3A DB "." ATR3B DB "..." ATR4B DB "SOMETHING" ATR3A DB TAB,21,"SPECIAL " ATR4B DB "TO " ATR1A DB "HELP" ATR1B DB TAB,6,"YOU " ATR5B DB "TO " ATR2A DB "REMEMBER" ATR5A DB TAB,12,"THESE " ATR3B DB "SPLENDID" ATR6A DB TAB,14,"TAPE-TIMES" ATR1B DB "!" ATR1A DB "SO" ATR3A DB ",",ENTR_WR ATR6B DB "IT" ATR1A DB "'" ATR6B DB "S " ATR6A DB "TIME " ATR3B DB "TO " ATR2B DB "GET" ATR3A DB TAB,10,"THE " ATR2A DB "NEW" ATR5B DB TAB,12,"RELEASE",ENTR_WR ATR1B DB "FROM " ATR5A DB "US" ATR1A DB "!" DB 0 ;-------- INSTALL ALL ---------------------------------- INSTALL LD HL,INST_ LD DE,#4000 LD BC,INSTALL_END-INST_ PUSH DE LDIR RET INST_ DISP #4000 RET ENT INSTALL_END ZUZU DISPLAY "END: ",ZUZU
17.182195
64
0.425714
479271b3501c3f06e7884314ca944fafa45637ef
97
asm
Assembly
programs/oeis/028/A028738.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/028/A028738.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/028/A028738.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A028738: Nonsquares mod 25. ; 2,3,5,7,8,10,12,13,15,17,18,20,22,23 mul $0,5 div $0,3 add $0,2
13.857143
38
0.618557
385341c403f78d8bab4bf6e071052a293d90f1fa
25
asm
Assembly
test/asm/divzero-section-bank.asm
orbea/rgbds
91889fc14abbf705271bb484e89e349e08f76477
[ "MIT" ]
522
2017-02-25T21:10:13.000Z
2020-09-13T14:26:18.000Z
test/asm/divzero-section-bank.asm
orbea/rgbds
91889fc14abbf705271bb484e89e349e08f76477
[ "MIT" ]
405
2017-02-25T21:32:37.000Z
2020-09-13T16:43:29.000Z
test/asm/divzero-section-bank.asm
orbea/rgbds
91889fc14abbf705271bb484e89e349e08f76477
[ "MIT" ]
84
2017-02-25T21:10:26.000Z
2020-09-13T14:28:25.000Z
SECTION "sec", ROMX[1/0]
12.5
24
0.64
bdc8d73621b426165cd2630ff597741d96ec861d
405
asm
Assembly
programs/oeis/292/A292510.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/292/A292510.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/292/A292510.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A292510: a(n) = smallest k >= 1 such that {1, p(n,2), p(n,3), ..., p(n,k)} can be partitioned into two sets with equal sums, where p(n,m) is m-th n-gonal number. ; 4,7,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 mov $1,4 lpb $1 add $1,$0 dif $1,2 lpe add $1,3 mov $0,$1
36.818182
177
0.548148
b28b8e0eef6403a14af12407e1533eac4fb510f2
180
asm
Assembly
ffight/lcs/boss/13.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
6
2020-10-14T15:29:10.000Z
2022-02-12T18:58:54.000Z
ffight/lcs/boss/13.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
null
null
null
ffight/lcs/boss/13.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
1
2020-12-17T08:59:10.000Z
2020-12-17T08:59:10.000Z
copyright zengfr site:http://github.com/zengfr/romhack 006216 move.w ($8,A3), ($14,A4) [boss+13, container+13, enemy+13] copyright zengfr site:http://github.com/zengfr/romhack
30
67
0.733333
cf4dd56dc02a12e52919379feef057be55102cfd
445
asm
Assembly
programs/oeis/060/A060937.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/060/A060937.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/060/A060937.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A060937: Number of iterations of d(n) (A000005) needed to reach 2 starting at n (n is counted). ; 1,2,3,2,4,2,4,3,4,2,5,2,4,4,3,2,5,2,5,4,4,2,5,3,4,4,5,2,5,2,5,4,4,4,4,2,4,4,5,2,5,2,5,5,4,2,5,3,5,4,5,2,5,4,5,4,4,2,6,2,4,5,3,4,5,2,5,4,5,2,6,2,4,5,5,4,5,2,5,3,4,2,6,4,4,4,5,2,6,4,5,4,4,4,6,2,5,5,4,2 add $0,1 lpb $0 seq $0,5 ; d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n. sub $0,1 add $1,1 lpe add $1,1 mov $0,$1
37.083333
201
0.575281
e7ab2a44f4f3832e1d0a6ea4538a63dd93606455
608
asm
Assembly
oeis/312/A312909.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/312/A312909.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/312/A312909.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A312909: Coordination sequence Gal.6.150.2 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; Submitted by Christian Krause ; 1,4,9,13,17,23,27,31,37,41,45,50,54,58,63,67,71,77,81,85,91,95,99,104,108,112,117,121,125,131,135,139,145,149,153,158,162,166,171,175,179,185,189,193,199,203,207,212,216,220 mov $1,$0 seq $0,311257 ; Coordination sequence Gal.6.115.2 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. add $1,1 div $1,3 add $0,$1
60.8
182
0.745066
0b61daee92d518074c51ff79682978e534e63d5d
3,533
asm
Assembly
HookFunctions.asm
obaniu2006/Win32-Inline-API-hook
5d59e241ba8605036182d1c868677f88ad6e8489
[ "Apache-2.0" ]
3
2021-03-05T03:20:37.000Z
2022-01-11T02:38:32.000Z
HookFunctions.asm
obaniu2006/Win32-Inline-API-hook
5d59e241ba8605036182d1c868677f88ad6e8489
[ "Apache-2.0" ]
null
null
null
HookFunctions.asm
obaniu2006/Win32-Inline-API-hook
5d59e241ba8605036182d1c868677f88ad6e8489
[ "Apache-2.0" ]
null
null
null
;Copyright (c) 2015 droidwolf(droidwolf2006@gmail.com) ;All rights reserved. ; ;Licensed under the Apache License, Version 2.0 (the "License"); ;you may not use this file except in compliance with the License. ;You may obtain a copy of the License at ; ; http://www.apache.org/licenses/LICENSE-2.0 ; ;Unless required by applicable law or agreed to in writing, software ;distributed under the License is distributed on an "AS IS" BASIS, ;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;See the License for the specific language governing permissions and ;limitations under the License. .data szKernel32 db 'kernel32',0 ;Kernel32动态连接库 szNtdll db 'ntdll',0 HasCheckCurrentPID_IsProtect dd 0 ;szQUAT db '"',0 ;打开进程句柄API szOpenProcess db 'OpenProcess',0 pOpenProcess dd 0 OpenProcess_Header db SizeFnHead dup(0) szZwOpenFile db 'ZwOpenFile',0 pZwOpenFile dd 0 ZwOpenFile_Header db SizeFnHead dup(0) include macro.inc my_OpenProcess proc dwDesiredAccess,bInheritHandle,dwProcessId local vpt:DWORD .if !g_IsUnHook mov eax,dwProcessId WhileEAXIsProtectPID_ExitProc .endif EntryCritical invoke ResumeFn,pOpenProcess,offset OpenProcess_Header InvokePtr pOpenProcess, dwDesiredAccess,bInheritHandle,dwProcessId push eax invoke ReplaceFn,pOpenProcess,offset my_OpenProcess,0;offset OpenProcess_Header LeaveCritical pop eax ret my_OpenProcess endp my_ZwOpenFile proc FileHandle,DesiredAccess, ObjectAttributes,IoStatusBlock,ShareAccess,OpenOptions local vpt .if !g_IsUnHook push ebx mov eax,ObjectAttributes ;OBJECT_ATTRIBUTES 结构 mov ebx,[eax+8] ;PUNICODE_STRING 结构 mov eax,[ebx] ;Length .if eax >=g_LenDirectoryW invoke StrStrIW,[ebx+4],offset g_strDirectoryW .if eax mov eax,3221225487 ;无文件 pop ebx ret .endif .endif pop ebx .endif EntryCritical RemoveProtect pZwOpenFile,addr vpt WriteFuncHeader pZwOpenFile,offset ZwOpenFile_Header InvokePtr pZwOpenFile,FileHandle,DesiredAccess, ObjectAttributes,IoStatusBlock,ShareAccess,OpenOptions push eax WriteFuncHeaderJmp pZwOpenFile,offset my_ZwOpenFile ReProtect pZwOpenFile,vpt LeaveCritical pop eax ret my_ZwOpenFile endp ;***************************************************************************** ; 功能:开始Api挂钩 ; 参数: ; 返回:不为0为成功 ;***************************************************************************** StartApiHK proc invoke GetCurrentProcessId WhileEAXIsProtectPID_ExitProc EntryCritical .if !pZwOpenFile invoke GetProcPtr,offset szNtdll,offset szZwOpenFile mov pZwOpenFile,eax .endif .if pZwOpenFile invoke ReplaceFn,pZwOpenFile,offset my_ZwOpenFile,offset ZwOpenFile_Header .endif .if !pOpenProcess invoke GetProcPtr,offset szKernel32,offset szOpenProcess mov pOpenProcess,eax .endif .if pOpenProcess invoke ReplaceFn,pOpenProcess,offset my_OpenProcess,offset OpenProcess_Header .endif LeaveCritical ret StartApiHK endp ;***************************************************************************** ; 功能:停止Api挂钩 ; 参数: ; 返回:不为0为成功 ;***************************************************************************** StopApiHK proc EntryCritical .if pOpenProcess invoke ResumeFn,pOpenProcess,offset OpenProcess_Header mov pOpenProcess,0 .endif .if pZwOpenFile invoke ResumeFn,pZwOpenFile,offset ZwOpenFile_Header mov pZwOpenFile,0 .endif LeaveCritical ret StopApiHK endp
24.880282
104
0.694311
80efb149d225f31fba1882ad5ef8360ab294d067
2,856
asm
Assembly
Assembler/AssemblyCode/LowLevel/POPF_MACRO.asm
KPU-RISC/KPU
9f85c322e1b8489eef31f0696799e0c6c7273c0e
[ "MIT" ]
8
2017-04-16T16:53:03.000Z
2021-09-14T22:29:28.000Z
Assembler/AssemblyCode/LowLevel/POPF_MACRO.asm
KPU-RISC/KPU
9f85c322e1b8489eef31f0696799e0c6c7273c0e
[ "MIT" ]
null
null
null
Assembler/AssemblyCode/LowLevel/POPF_MACRO.asm
KPU-RISC/KPU
9f85c322e1b8489eef31f0696799e0c6c7273c0e
[ "MIT" ]
null
null
null
; Set register XL to "11111111" SET A, "1111" SET B, "1111" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XL ; Set register XH to "11111111" SET A, "1111" SET B, "1111" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XH MOV16 SP, X ; Set register D to "00000001" SET A, "0000" SET B, "0001" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT D ; Set register E to "00000001" SET A, "0000" SET B, "0001" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT E ; Perform a "SUB D, E" operation ; This sets the Zero flag to 1 MOV_ALU_IN A, E NOT MOV_ALU_C_TO_AB A SET B, "0001" ADD MOV_ALU_C_TO_AB B MOV_ALU_IN A, D ADD MOV_ALU_OUT D ; ==================== ; PUSHF implementation ; ==================== ; 1. Store the flags in the "FlagsOutBuffer" FLAGS_TO_OUTBUFFER ; 2. Store the flags from the "FlagsOutBuffer" onto the stack MOV16 M, SP STORE_FLAGS ; 3. Decrement the stack pointer by 1 ; 3.1. Set register XL to "11111111" SET A, "1111" SET B, "1111" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XL ; 3.2. Set register XH to "11111111" SET A, "1111" SET B, "1111" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XH ; 3.3. Decrement the stack pointer MOV16 J, X MOV16 X, SP 16BIT_ADDER MOV16 SP, X ; ===================== ; Set register D to "00000100" SET A, "0000" SET B, "0100" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT D ; Set register E to "00000001" SET A, "0000" SET B, "0001" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT E ; Perform a "SUB D, E" operation ; This sets the Zero flag to 1 MOV_ALU_IN A, E NOT MOV_ALU_C_TO_AB A SET B, "0001" ADD MOV_ALU_C_TO_AB B MOV_ALU_IN A, D ADD MOV_ALU_OUT D ; ==================== ; POPF implementation ; ==================== ; 1. Increment the stack pointer by 1 ; 1.1. Set register XL to "00000001" SET A, "0000" SET B, "0001" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XL ; 1.2. Set register XH to "00000000" SET A, "0000" SET B, "0000" SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A SHL MOV_ALU_C_TO_AB A OR MOV_ALU_OUT XH ; 1.3. Increment the stack pointer MOV16 J, X MOV16 X, SP 16BIT_ADDER MOV16 SP, X ; 2.1. Load the flags into the "FlagsInBuffer" register MOV16 M, SP LOAD_FLAGS ; 3.1. Move the content from the FlagsInBuffer" to the Flags register. ; The FLAGS register contains finally the value "110" INBUFFER_TO_FLAGS ; ========================= HLT
13.665072
70
0.72549
98fe532355b1fd03a562557aea85045da5851af8
383
asm
Assembly
programs/oeis/271/A271035.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/271/A271035.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/271/A271035.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A271035: Number of 3 X 3 X 3 triangular 0..n arrays with some element less than a w, nw or ne neighbor exactly once. ; 10,72,294,896,2268,5040,10164,19008,33462,56056,90090,139776,210392,308448,441864,620160,854658,1158696,1547854,2040192,2656500,3420560,4359420,5503680,6887790,8550360,10534482,12888064,15664176,18921408 mov $1,$0 add $1,5 bin $1,$0 add $0,5 mul $1,$0 mul $1,2
38.3
205
0.762402
18e1e5125202fd3543613ef07f80cb1e8d501210
681
asm
Assembly
oeis/163/A163071.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/163/A163071.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/163/A163071.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A163071: a(n) = ((4+sqrt(5))*(3+sqrt(5))^n + (4-sqrt(5))*(3-sqrt(5))^n)/2. ; 4,17,86,448,2344,12272,64256,336448,1761664,9224192,48298496,252894208,1324171264,6933450752,36304019456,190090313728,995325804544,5211593572352,27288258215936,142883175006208,748146017173504,3917343403016192,20511476349403136,107399484484354048,562351001508511744,2944508071113654272,15417644420647878656,80727834239432654848,422696427754004414464,2213267229566295867392,11588817666381757546496,60679837080025361809408,317723751814625140670464,1663623162567649396785152,8710843968147395818029056 add $0,1 mov $1,7 mov $2,-3 lpb $0 sub $0,1 add $1,$2 add $2,$1 mul $1,4 lpe div $1,4 mov $0,$1
45.4
498
0.807636
58bdacc53d2a57217f57945439e45c1f634966ee
2,650
asm
Assembly
data/tilesets/omanyte_word_room_collision.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
data/tilesets/omanyte_word_room_collision.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
data/tilesets/omanyte_word_room_collision.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
tilecoll WALL, WALL, WALL, WALL ; 00 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13 tilecoll WALL, WALL, WALL, FLOOR ; 14 tilecoll WALL, WALL, FLOOR, FLOOR ; 15 tilecoll WALL, WALL, FLOOR, FLOOR ; 16 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 17 tilecoll WALL, WALL, FLOOR, FLOOR ; 18 tilecoll WALL, WALL, FLOOR, WALL ; 19 tilecoll WALL, FLOOR, WALL, FLOOR ; 1a tilecoll FLOOR, WALL, FLOOR, WALL ; 1b tilecoll FLOOR, FLOOR, FLOOR, PIT ; 1c tilecoll WALL, WALL, WALL, WALL ; 1d tilecoll WALL, WALL, WALL, WALL ; 1e tilecoll WALL, WALL, WALL, WALL ; 1f tilecoll WALL, WALL, WALL, WALL ; 20 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 21 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
40.769231
41
0.710189
687355561a90468d0175dc7039937e586bbc6a4c
8,885
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_4k_sm_/i9-9900K_12_0xa0_notsx.log_21829_1635.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_4k_sm_/i9-9900K_12_0xa0_notsx.log_21829_1635.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_4k_sm_/i9-9900K_12_0xa0_notsx.log_21829_1635.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 %rcx push %rdi push %rsi lea addresses_D_ht+0x18b85, %r9 nop nop nop nop dec %rbp mov (%r9), %r14d nop nop nop add %rax, %rax lea addresses_WT_ht+0x1901c, %rsi lea addresses_A_ht+0x69c, %rdi nop nop nop nop nop sub %rbp, %rbp mov $4, %rcx rep movsb inc %rcx lea addresses_normal_ht+0x10940, %rsi lea addresses_WC_ht+0x5a9c, %rdi nop nop nop add $22543, %r15 mov $64, %rcx rep movsw nop nop nop nop xor %rsi, %rsi lea addresses_A_ht+0x1d29c, %rcx nop nop nop nop nop dec %rdi movb $0x61, (%rcx) nop nop nop nop nop and %rax, %rax lea addresses_WT_ht+0x931c, %rax nop nop nop nop sub %rbp, %rbp mov $0x6162636465666768, %r15 movq %r15, (%rax) nop nop nop nop inc %rdi lea addresses_WT_ht+0x2c54, %rsi nop and $43565, %r9 mov $0x6162636465666768, %rax movq %rax, (%rsi) nop nop nop nop xor $39059, %r14 lea addresses_D_ht+0x1d39c, %rax nop nop and %rcx, %rcx movups (%rax), %xmm5 vpextrq $1, %xmm5, %r15 nop nop nop nop xor %r15, %r15 lea addresses_D_ht+0x1083c, %rsi lea addresses_UC_ht+0x691c, %rdi clflush (%rdi) nop nop add %rax, %rax mov $81, %rcx rep movsb nop nop nop nop cmp %rax, %rax pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r15 pop %r14 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r8 push %r9 push %rcx push %rdi push %rdx push %rsi // Store lea addresses_WC+0x167e4, %r11 xor %rdi, %rdi movl $0x51525354, (%r11) nop nop sub %r9, %r9 // Store lea addresses_D+0x1555c, %r10 nop nop nop nop xor $28804, %rdx mov $0x5152535455565758, %r8 movq %r8, (%r10) nop nop nop nop nop lfence // Store lea addresses_A+0x1b15c, %r12 nop nop cmp $9265, %r10 movw $0x5152, (%r12) nop nop add $46686, %r8 // Store lea addresses_A+0x1229c, %r11 nop nop nop nop nop xor %rdx, %rdx movw $0x5152, (%r11) nop nop inc %r10 // Load lea addresses_RW+0x1629c, %rdi clflush (%rdi) nop nop nop dec %r10 movups (%rdi), %xmm6 vpextrq $1, %xmm6, %r9 nop sub %r8, %r8 // Store lea addresses_PSE+0xfa9c, %r11 nop nop add $7472, %r9 movl $0x51525354, (%r11) nop nop nop nop cmp $40058, %r10 // Store lea addresses_A+0x1169c, %r9 and $53761, %r11 mov $0x5152535455565758, %rdi movq %rdi, %xmm3 movups %xmm3, (%r9) nop nop nop add %rdi, %rdi // Store lea addresses_WT+0x17a9c, %r12 cmp %r11, %r11 mov $0x5152535455565758, %r8 movq %r8, %xmm6 vmovups %ymm6, (%r12) nop sub $7893, %rdi // REPMOV lea addresses_WC+0x14c6c, %rsi lea addresses_normal+0xa29c, %rdi clflush (%rsi) nop nop nop add $31478, %r8 mov $44, %rcx rep movsb cmp $26125, %r12 // Load lea addresses_WC+0x1359c, %r12 and %r11, %r11 mov (%r12), %r9 // Exception!!! nop nop nop nop nop mov (0), %rdi nop nop nop dec %r12 // Load lea addresses_US+0xa5dc, %rcx nop nop nop nop nop sub %r8, %r8 vmovups (%rcx), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %r9 nop sub $26265, %r12 // Faulty Load lea addresses_PSE+0xfa9c, %rdx inc %r10 mov (%rdx), %ecx lea oracles, %r12 and $0xff, %rcx shlq $12, %rcx mov (%r12,%rcx,1), %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 2}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 10}} {'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 8}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 11}} {'src': {'type': 'addresses_WC', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal', 'congruent': 7, 'same': False}} {'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'} {'src': {'type': 'addresses_US', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 5}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_PSE', 'AVXalign': True, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}} {'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 7}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 6}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 3}} {'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}} {'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 */
28.569132
2,999
0.650647
b12c778f709e38ebeba4c73f3f9922ab5ac6e1eb
6,570
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1417.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1417.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1417.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 %r14 push %r15 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x1d4a8, %rbp and $32142, %r12 mov (%rbp), %r15w nop and $3725, %rcx lea addresses_D_ht+0x94f8, %rsi lea addresses_UC_ht+0x1cc46, %rdi clflush (%rsi) nop nop nop nop add $1046, %rdx mov $35, %rcx rep movsl nop nop add $39939, %rdi lea addresses_WC_ht+0x1be88, %rsi nop nop nop nop sub $53765, %rbp movb (%rsi), %r15b nop and %r12, %r12 lea addresses_WT_ht+0x18e5, %rsi lea addresses_UC_ht+0xa518, %rdi sub %r14, %r14 mov $18, %rcx rep movsw nop nop nop add %r15, %r15 lea addresses_A_ht+0xbfa8, %rdx nop dec %r15 vmovups (%rdx), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %rbp nop nop nop inc %r15 lea addresses_WT_ht+0xb528, %rsi lea addresses_normal_ht+0xd86c, %rdi clflush (%rdi) nop nop nop nop nop xor $57294, %r15 mov $57, %rcx rep movsw dec %rdx lea addresses_A_ht+0x7ec0, %rsi lea addresses_WT_ht+0x19430, %rdi clflush (%rsi) nop nop nop nop nop and %r12, %r12 mov $122, %rcx rep movsw nop nop nop nop nop cmp $35381, %rdx lea addresses_UC_ht+0xb06e, %rsi lea addresses_WT_ht+0x77a8, %rdi nop nop nop cmp $13781, %r15 mov $104, %rcx rep movsw nop nop sub $61247, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r15 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r8 push %rax push %rbp push %rbx push %rdx // Load mov $0x3194e00000009a8, %rbx nop xor %rbp, %rbp mov (%rbx), %dx nop xor $23086, %r10 // Store lea addresses_normal+0x51a8, %rbp nop nop nop nop xor $971, %rax movl $0x51525354, (%rbp) nop nop nop add %rbx, %rbx // Faulty Load lea addresses_WC+0xa3a8, %r13 nop nop nop nop nop xor %r10, %r10 mov (%r13), %rbp lea oracles, %rdx and $0xff, %rbp shlq $12, %rbp mov (%rdx,%rbp,1), %rbp pop %rdx pop %rbx pop %rbp pop %rax pop %r8 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 9, 'size': 4, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'congruent': 7, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
36.5
2,999
0.658904
d535a527191b90f76fa7fbf0f03d2c1c9b99a878
775
asm
Assembly
oeis/183/A183304.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/183/A183304.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/183/A183304.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A183304: Half the number of nX3 binary arrays with no element equal to a strict majority of its horizontal and vertical neighbors ; Submitted by Jamie Morken(s2) ; 1,4,9,19,42,93,205,452,997,2199,4850,10697,23593,52036,114769,253131,558298,1231365,2715861,5990020,13211405,29138671,64267362,141746129,312630929,689529220,1520804569,3354240067,7398009354,16316823277,35987886621,79373782596,175064388469,386116663559,851607109714,1878278607897,4142673879353,9136954868420,20152188344737,44447050568827,98031056006074,216214300356885,476875651282597,1051782358571268,2319779017499421,5116433686281439,11284649731134146,24889078479767713,54894590645816865 mov $1,1 mov $2,3 mov $3,1 lpb $0 sub $0,1 add $4,$3 add $2,$4 mov $4,$1 mov $1,$3 mov $3,$2 lpe mov $0,$3
45.588235
490
0.810323
48674137c5f844935a632fd69edc6800aeb1bdd7
328
asm
Assembly
programs/oeis/097/A097482.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/097/A097482.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/097/A097482.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A097482: a(1) = 1, a(2) = 1, a(n) = floor(sqrt(a(n-2)*a(n-1))) + 3 for n > 2. ; 1,1,4,5,7,8,10,11,13,14,16,17,19,20,22,23,25,26,28,29,31,32,34,35,37,38,40,41,43,44,46,47,49,50,52,53,55,56,58,59,61,62,64,65,67,68,70,71,73,74,76,77,79,80,82,83,85,86,88,89,91,92,94,95,97,98,100 mul $0,3 lpb $0 bin $0,4 lpe div $0,2 add $0,1
32.8
197
0.585366
277efcd6069ac3299808498189911ea2473b28ca
925
asm
Assembly
programs/oeis/100/A100833.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/100/A100833.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/100/A100833.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A100833: Smallest positive palindrome-free and squarefree sequence. ; 1,2,3,1,2,4,1,2,3,1,2,5,1,2,3,1,2,4,1,2,3,1,2,6,1,2,3,1,2,4,1,2,3,1,2,5,1,2,3,1,2,4,1,2,3,1,2,7,1,2,3,1,2,4,1,2,3,1,2,5,1,2,3,1,2,4,1,2,3,1,2,6,1,2,3,1,2,4,1,2,3,1,2,5,1,2,3,1,2,4,1,2,3,1,2,8,1,2,3,1,2,4,1,2,3,1,2,5,1,2,3,1,2,4,1,2,3,1,2,6,1,2,3,1,2,4,1,2,3,1,2,5,1,2,3,1,2,4,1,2,3,1,2,7,1,2,3,1,2,4,1,2,3,1,2,5,1,2,3,1,2,4,1,2,3,1,2,6,1,2,3,1,2,4,1,2,3,1,2,5,1,2,3,1,2,4,1,2,3,1,2,9,1,2,3,1,2,4,1,2,3,1,2,5,1,2,3,1,2,4,1,2,3,1,2,6,1,2,3,1,2,4,1,2,3,1,2,5,1,2,3,1,2,4,1,2,3,1,2,7,1,2,3,1,2,4,1,2,3,1 mov $10,$0 mov $12,2 lpb $12,1 clr $0,10 mov $0,$10 sub $12,1 add $0,$12 sub $0,1 mov $2,$0 add $3,$0 div $3,3 lpb $2,1 sub $0,$3 mov $2,$5 lpe lpb $0,1 add $9,$0 div $0,2 lpe mov $1,$9 mov $13,$12 lpb $13,1 mov $11,$1 sub $13,1 lpe lpe lpb $10,1 mov $10,0 sub $11,$1 lpe mov $1,$11 add $1,1
25.694444
501
0.512432
33a21f83e39d6133706dcc922718214dda2ce7d4
4,814
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1445.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_1445.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_1445.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r9 push %rbx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x1ca70, %rdi and %rbx, %rbx movups (%rdi), %xmm2 vpextrq $1, %xmm2, %r10 nop nop nop cmp $25364, %r9 lea addresses_A_ht+0x4c78, %r12 nop nop and %rdx, %rdx mov (%r12), %rsi nop nop and %rsi, %rsi lea addresses_WC_ht+0xbc78, %rbx nop cmp %r9, %r9 mov $0x6162636465666768, %r12 movq %r12, %xmm6 and $0xffffffffffffffc0, %rbx movaps %xmm6, (%rbx) nop nop nop cmp %rdi, %rdi pop %rsi pop %rdx pop %rdi pop %rbx pop %r9 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r15 push %r8 push %rbp push %rbx // Store mov $0x188, %r15 sub $30845, %r13 movl $0x51525354, (%r15) and %r15, %r15 // Faulty Load lea addresses_WT+0x11478, %r12 nop nop nop nop dec %rbx mov (%r12), %r14w lea oracles, %rbp and $0xff, %r14 shlq $12, %r14 mov (%rbp,%r14,1), %r14 pop %rbx pop %rbp pop %r8 pop %r15 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_P'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
49.628866
2,999
0.657665
48cdd5e8979612219508abee0000ae3414cbeaad
144
asm
Assembly
other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/ツール/tool/sfxdos/fdcdrv.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/ツール/tool/sfxdos/fdcdrv.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/ヨッシーアイランド/ツール/tool/sfxdos/fdcdrv.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
Name: fdcdrv.asm Type: file Size: 26413 Last-Modified: '2016-05-13T04:52:55Z' SHA-1: FFE70632AF7547244E9A5245E232D2C2F383BE1C Description: null
20.571429
47
0.8125
a558fdab56d58a95932f7d322fb0caec8285d896
518
asm
Assembly
programs/oeis/178/A178389.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/178/A178389.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/178/A178389.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A178389: Multiples of 3 in A175461. ; 21,69,93,141,213,237,309,381,453,501,573,597,669,717,789,813,933,1077,1101,1149,1293,1317,1389,1437,1461,1509,1797,1821,1893,1941,2157,2181,2229,2253,2469,2517,2589,2661,2733,2757,2901,2949,2973,3093,3117,3189 mov $2,$0 add $2,1 pow $2,2 lpb $2 add $1,6 sub $2,1 mov $3,$1 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,2 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe div $1,2 sub $1,4 mul $1,6 add $1,21 mov $0,$1
21.583333
211
0.656371
268d76b2e34d5123dfd2821664dd1cde419fae3e
64
asm
Assembly
data/maps/headers/TradeCenter.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
data/maps/headers/TradeCenter.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
data/maps/headers/TradeCenter.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
map_header TradeCenter, TRADE_CENTER, CLUB, 0 end_map_header
16
46
0.8125
3b16a09af5338759a7212b766389ffce63bd716c
159
asm
Assembly
src/PJ/rexlib/mathlib/log.asm
AnimatorPro/Animator-Pro
6d0b68cd94bb5cfde2cdd05e9a7c8ee1e1cb3cbb
[ "BSD-3-Clause" ]
119
2015-01-10T15:13:50.000Z
2022-01-24T04:54:34.000Z
src/PJ/rexlib/mathlib/log.asm
AnimatorPro/Animator-Pro
6d0b68cd94bb5cfde2cdd05e9a7c8ee1e1cb3cbb
[ "BSD-3-Clause" ]
6
2015-10-22T20:14:59.000Z
2021-07-10T03:25:21.000Z
src/PJ/rexlib/mathlib/log.asm
AnimatorPro/Animator-Pro
6d0b68cd94bb5cfde2cdd05e9a7c8ee1e1cb3cbb
[ "BSD-3-Clause" ]
27
2015-04-24T22:55:30.000Z
2022-01-21T13:54:00.000Z
include mathhost.i CGROUP group code code segment dword 'CODE' assume cs:CGROUP,ds:CGROUP MATHLIB_2JUMP log _r_ml_log math_log code ends end
13.25
37
0.735849
fd04ab83094d64b608fd7d91504a7dd4d99384f5
7,013
asm
Assembly
Transynther/x86/_processed/NC/_ht_st_zr_/i7-8650U_0xd2_notsx.log_818_1402.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_ht_st_zr_/i7-8650U_0xd2_notsx.log_818_1402.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_ht_st_zr_/i7-8650U_0xd2_notsx.log_818_1402.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %r15 push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0xdb42, %r11 nop nop add %rsi, %rsi mov $0x6162636465666768, %rdx movq %rdx, %xmm1 vmovups %ymm1, (%r11) nop cmp %r14, %r14 lea addresses_UC_ht+0x16042, %r14 nop nop nop nop nop add $46444, %r13 movl $0x61626364, (%r14) nop nop nop nop dec %r15 lea addresses_normal_ht+0x11362, %r13 nop nop nop nop nop cmp %rdx, %rdx vmovups (%r13), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %r11 nop and %rdx, %rdx lea addresses_WT_ht+0xcf42, %r13 nop nop nop nop sub $18251, %rcx vmovups (%r13), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $1, %xmm4, %r15 nop nop nop and %rcx, %rcx lea addresses_WC_ht+0x13f7e, %r15 and $19473, %r14 mov $0x6162636465666768, %rcx movq %rcx, (%r15) nop sub $21647, %r14 lea addresses_WT_ht+0x79f1, %rdx cmp $60985, %rsi movb (%rdx), %r14b nop nop add %r13, %r13 lea addresses_WT_ht+0x19e0a, %rsi lea addresses_A_ht+0x1cf96, %rdi nop nop dec %r13 mov $100, %rcx rep movsb nop and %rdi, %rdi lea addresses_A_ht+0x1d395, %r11 nop add %r13, %r13 mov (%r11), %rcx add %rdi, %rdi lea addresses_A_ht+0x191e2, %rdi nop nop xor $38954, %rdx vmovups (%rdi), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $1, %xmm6, %rcx nop nop nop add $63731, %r11 lea addresses_D_ht+0x3d72, %rdi nop nop and $49071, %rsi mov (%rdi), %dx cmp $15389, %r15 lea addresses_D_ht+0x157d6, %r13 dec %rdx mov (%r13), %esi and $4376, %r11 pop %rsi pop %rdx pop %rdi pop %rcx pop %r15 pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r14 push %r15 push %rbp push %rcx push %rdi push %rdx push %rsi // REPMOV lea addresses_WT+0x1ff3e, %rsi lea addresses_A+0x14b42, %rdi nop nop nop sub $10844, %rdx mov $71, %rcx rep movsq nop nop add %rsi, %rsi // Store lea addresses_D+0x1ef92, %r15 nop nop nop nop xor %r14, %r14 mov $0x5152535455565758, %rcx movq %rcx, (%r15) nop nop nop add $2373, %r15 // Store lea addresses_A+0x1082a, %rdi nop nop nop nop nop add %rcx, %rcx mov $0x5152535455565758, %rbp movq %rbp, (%rdi) nop nop nop nop nop add %rdx, %rdx // Faulty Load mov $0x459c5f0000000f42, %r15 nop nop nop nop nop dec %rsi vmovups (%r15), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $0, %xmm0, %rcx lea oracles, %r15 and $0xff, %rcx shlq $12, %rcx mov (%r15,%rcx,1), %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r15 pop %r14 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 2, 'same': False}} {'39': 417, '00': 26, '44': 256, '49': 103, '45': 16} 39 39 39 00 44 00 00 49 44 00 44 49 39 44 49 39 39 49 45 00 39 39 39 49 44 49 39 44 00 44 44 49 44 39 44 44 44 39 39 39 44 49 39 45 44 39 49 49 39 44 44 39 44 44 39 39 00 39 49 49 39 39 49 44 39 39 44 39 39 39 39 39 39 39 39 49 49 44 39 39 39 44 49 39 39 39 39 39 44 39 39 39 44 44 39 39 44 39 44 49 49 39 44 44 39 44 39 39 39 39 44 00 39 39 39 39 44 39 45 44 39 39 39 44 49 44 39 39 49 39 39 39 39 49 39 39 39 39 39 49 39 00 39 44 44 44 39 45 44 39 39 49 44 39 49 45 44 44 39 39 39 44 49 49 39 49 44 39 00 44 44 39 39 39 39 44 39 39 39 39 44 39 39 44 49 49 44 44 39 39 44 39 39 49 39 39 39 39 39 39 39 39 44 44 39 39 44 39 39 45 49 39 39 39 39 44 44 39 49 44 44 44 39 49 39 44 44 44 39 00 39 44 39 49 49 44 39 39 39 44 49 44 39 44 44 39 39 44 39 39 44 39 39 44 39 39 44 44 39 45 44 39 44 49 49 39 39 44 39 39 44 39 39 39 00 39 49 44 44 39 44 39 39 39 44 44 49 39 39 39 00 49 39 39 39 39 39 49 44 44 49 39 39 49 39 39 49 44 39 44 39 39 39 39 44 44 44 44 44 49 49 39 39 39 39 44 39 44 39 39 39 39 39 49 44 44 39 44 39 49 39 39 39 00 44 39 39 39 44 44 39 39 39 45 49 39 49 44 39 49 39 39 39 00 44 39 39 44 44 39 39 39 39 39 39 39 39 39 44 00 39 44 39 39 39 39 39 49 39 44 39 39 39 44 44 44 44 39 44 44 39 39 49 44 49 39 44 39 44 44 49 49 00 39 39 45 39 44 44 39 49 44 39 44 44 39 39 49 44 44 44 39 44 39 39 39 39 44 39 39 39 39 39 44 49 44 49 44 44 44 44 49 39 44 39 39 39 44 44 39 44 44 39 44 49 44 44 44 49 00 39 44 39 44 44 39 39 44 00 39 39 39 49 39 39 39 39 45 39 39 39 39 44 39 44 49 39 44 44 39 39 39 49 39 39 44 44 39 39 39 39 39 49 39 39 44 39 44 39 39 39 44 39 39 39 49 49 44 49 39 49 44 39 39 39 39 00 39 44 39 44 39 39 39 39 44 44 39 39 44 44 44 49 44 44 39 39 49 39 44 39 44 39 49 44 39 49 39 44 39 44 39 49 44 44 44 44 39 39 44 39 39 39 39 44 49 39 39 39 39 44 44 39 44 39 44 39 39 44 00 49 44 49 44 44 45 39 39 39 49 45 44 00 39 39 39 44 39 39 44 49 44 49 39 44 39 44 39 39 39 39 39 49 44 49 39 49 45 44 39 44 39 44 44 39 44 39 44 39 44 39 39 39 39 00 44 44 39 44 44 39 39 39 44 39 39 44 39 44 44 44 49 39 45 39 49 39 39 49 44 44 49 39 39 44 44 44 39 39 49 44 39 39 39 39 44 44 39 44 49 44 39 39 44 49 39 44 44 49 39 39 44 44 44 39 49 39 44 44 39 39 49 44 00 39 39 39 44 39 39 44 39 44 49 44 39 39 39 44 39 39 39 39 39 49 44 39 39 39 39 39 39 39 39 39 44 39 39 44 44 44 45 39 39 49 39 00 39 44 39 44 44 44 44 44 44 39 44 39 39 39 44 39 39 39 44 39 39 44 39 44 44 44 39 39 49 44 39 39 49 39 39 45 39 44 39 39 39 39 39 39 49 00 44 44 39 44 49 */
32.317972
2,453
0.651932
11d7a771b3bd334575d13e24c8b5d548ccd1610c
595
asm
Assembly
programs/oeis/004/A004152.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/004/A004152.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/004/A004152.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A004152: Sum of digits of n!. ; 1,1,2,6,6,3,9,9,9,27,27,36,27,27,45,45,63,63,54,45,54,63,72,99,81,72,81,108,90,126,117,135,108,144,144,144,171,153,108,189,189,144,189,180,216,207,216,225,234,225,216,198,279,279,261,279,333,270,288,324,288,315,306,333,324,351,351,369,342,351,459,423,432,315,378,432,441,432,423,441,450,486,477,486,477,414,495,495,531,549,585,594,540,513,549,585,648,648,639,648 seq $0,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). seq $0,7953 ; Digital sum (i.e., sum of digits) of n; also called digsum(n).
99.166667
364
0.702521
eb246a6f8423321e393d1a9b17ebe6f96b44a561
448
asm
Assembly
examples/hello-world/hello-world.asm
egeldenhuys/cos284
489a3380dd8283834d60d0b45b2cae70c992f48f
[ "MIT" ]
2
2018-11-02T18:46:50.000Z
2019-07-11T10:24:56.000Z
examples/hello-world/hello-world.asm
egeldenhuys/cos284
489a3380dd8283834d60d0b45b2cae70c992f48f
[ "MIT" ]
null
null
null
examples/hello-world/hello-world.asm
egeldenhuys/cos284
489a3380dd8283834d60d0b45b2cae70c992f48f
[ "MIT" ]
null
null
null
segment .data hello_string: db "Hello World!", 0x0a ; 0x0a is a new line character hello_string_len: equ $ - hello_string ; $ is here segment .text global _start _start: mov eax,1 ; sys_write mov edi,1 ; std out mov edx,hello_string_len ; The number of characters lea rsi,[hello_string] ; Set char *buf syscall ; Write to screen mov eax,60 ; sys_exit xor edi, edi ; Set return code to 0 syscall ; Exit(0)
26.352941
72
0.671875
8b342d102fdf94863a7ccd2fa770a921aaf4760a
570,606
asm
Assembly
kernel.asm
codeMasterHacker/cs153
09c56e5148fe3ba3e105381c171f1f9ce1aabc88
[ "MIT-0" ]
null
null
null
kernel.asm
codeMasterHacker/cs153
09c56e5148fe3ba3e105381c171f1f9ce1aabc88
[ "MIT-0" ]
null
null
null
kernel.asm
codeMasterHacker/cs153
09c56e5148fe3ba3e105381c171f1f9ce1aabc88
[ "MIT-0" ]
null
null
null
kernel: file format elf32-i386 Disassembly of section .text: 80100000 <multiboot_header>: 80100000: 02 b0 ad 1b 00 00 add 0x1bad(%eax),%dh 80100006: 00 00 add %al,(%eax) 80100008: fe 4f 52 decb 0x52(%edi) 8010000b: e4 .byte 0xe4 8010000c <entry>: # 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 90 10 00 mov $0x109000,%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 c0 b5 10 80 mov $0x8010b5c0,%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 30 2e 10 80 mov $0x80102e30,%eax jmp *%eax 80100032: ff e0 jmp *%eax 80100034: 66 90 xchg %ax,%ax 80100036: 66 90 xchg %ax,%ax 80100038: 66 90 xchg %ax,%ax 8010003a: 66 90 xchg %ax,%ax 8010003c: 66 90 xchg %ax,%ax 8010003e: 66 90 xchg %ax,%ax 80100040 <binit>: struct buf head; } bcache; void binit(void) { 80100040: 55 push %ebp 80100041: 89 e5 mov %esp,%ebp 80100043: 53 push %ebx //PAGEBREAK! // Create linked list of buffers bcache.head.prev = &bcache.head; bcache.head.next = &bcache.head; for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 80100044: bb f4 b5 10 80 mov $0x8010b5f4,%ebx { 80100049: 83 ec 14 sub $0x14,%esp initlock(&bcache.lock, "bcache"); 8010004c: c7 44 24 04 80 6e 10 movl $0x80106e80,0x4(%esp) 80100053: 80 80100054: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) 8010005b: e8 60 40 00 00 call 801040c0 <initlock> bcache.head.next = &bcache.head; 80100060: ba bc fc 10 80 mov $0x8010fcbc,%edx bcache.head.prev = &bcache.head; 80100065: c7 05 0c fd 10 80 bc movl $0x8010fcbc,0x8010fd0c 8010006c: fc 10 80 bcache.head.next = &bcache.head; 8010006f: c7 05 10 fd 10 80 bc movl $0x8010fcbc,0x8010fd10 80100076: fc 10 80 80100079: eb 09 jmp 80100084 <binit+0x44> 8010007b: 90 nop 8010007c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100080: 89 da mov %ebx,%edx for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 80100082: 89 c3 mov %eax,%ebx 80100084: 8d 43 0c lea 0xc(%ebx),%eax b->next = bcache.head.next; 80100087: 89 53 54 mov %edx,0x54(%ebx) b->prev = &bcache.head; 8010008a: c7 43 50 bc fc 10 80 movl $0x8010fcbc,0x50(%ebx) initsleeplock(&b->lock, "buffer"); 80100091: 89 04 24 mov %eax,(%esp) 80100094: c7 44 24 04 87 6e 10 movl $0x80106e87,0x4(%esp) 8010009b: 80 8010009c: e8 0f 3f 00 00 call 80103fb0 <initsleeplock> bcache.head.next->prev = b; 801000a1: a1 10 fd 10 80 mov 0x8010fd10,%eax 801000a6: 89 58 50 mov %ebx,0x50(%eax) for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 801000a9: 8d 83 5c 02 00 00 lea 0x25c(%ebx),%eax 801000af: 3d bc fc 10 80 cmp $0x8010fcbc,%eax bcache.head.next = b; 801000b4: 89 1d 10 fd 10 80 mov %ebx,0x8010fd10 for(b = bcache.buf; b < bcache.buf+NBUF; b++){ 801000ba: 75 c4 jne 80100080 <binit+0x40> } } 801000bc: 83 c4 14 add $0x14,%esp 801000bf: 5b pop %ebx 801000c0: 5d pop %ebp 801000c1: c3 ret 801000c2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801000c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801000d0 <bread>: } // Return a locked buf with the contents of the indicated block. struct buf* bread(uint dev, uint blockno) { 801000d0: 55 push %ebp 801000d1: 89 e5 mov %esp,%ebp 801000d3: 57 push %edi 801000d4: 56 push %esi 801000d5: 53 push %ebx 801000d6: 83 ec 1c sub $0x1c,%esp 801000d9: 8b 75 08 mov 0x8(%ebp),%esi acquire(&bcache.lock); 801000dc: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) { 801000e3: 8b 7d 0c mov 0xc(%ebp),%edi acquire(&bcache.lock); 801000e6: e8 c5 40 00 00 call 801041b0 <acquire> for(b = bcache.head.next; b != &bcache.head; b = b->next){ 801000eb: 8b 1d 10 fd 10 80 mov 0x8010fd10,%ebx 801000f1: 81 fb bc fc 10 80 cmp $0x8010fcbc,%ebx 801000f7: 75 12 jne 8010010b <bread+0x3b> 801000f9: eb 25 jmp 80100120 <bread+0x50> 801000fb: 90 nop 801000fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100100: 8b 5b 54 mov 0x54(%ebx),%ebx 80100103: 81 fb bc fc 10 80 cmp $0x8010fcbc,%ebx 80100109: 74 15 je 80100120 <bread+0x50> if(b->dev == dev && b->blockno == blockno){ 8010010b: 3b 73 04 cmp 0x4(%ebx),%esi 8010010e: 75 f0 jne 80100100 <bread+0x30> 80100110: 3b 7b 08 cmp 0x8(%ebx),%edi 80100113: 75 eb jne 80100100 <bread+0x30> b->refcnt++; 80100115: 83 43 4c 01 addl $0x1,0x4c(%ebx) 80100119: eb 3f jmp 8010015a <bread+0x8a> 8010011b: 90 nop 8010011c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(b = bcache.head.prev; b != &bcache.head; b = b->prev){ 80100120: 8b 1d 0c fd 10 80 mov 0x8010fd0c,%ebx 80100126: 81 fb bc fc 10 80 cmp $0x8010fcbc,%ebx 8010012c: 75 0d jne 8010013b <bread+0x6b> 8010012e: eb 58 jmp 80100188 <bread+0xb8> 80100130: 8b 5b 50 mov 0x50(%ebx),%ebx 80100133: 81 fb bc fc 10 80 cmp $0x8010fcbc,%ebx 80100139: 74 4d je 80100188 <bread+0xb8> if(b->refcnt == 0 && (b->flags & B_DIRTY) == 0) { 8010013b: 8b 43 4c mov 0x4c(%ebx),%eax 8010013e: 85 c0 test %eax,%eax 80100140: 75 ee jne 80100130 <bread+0x60> 80100142: f6 03 04 testb $0x4,(%ebx) 80100145: 75 e9 jne 80100130 <bread+0x60> b->dev = dev; 80100147: 89 73 04 mov %esi,0x4(%ebx) b->blockno = blockno; 8010014a: 89 7b 08 mov %edi,0x8(%ebx) b->flags = 0; 8010014d: c7 03 00 00 00 00 movl $0x0,(%ebx) b->refcnt = 1; 80100153: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx) release(&bcache.lock); 8010015a: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) 80100161: e8 3a 41 00 00 call 801042a0 <release> acquiresleep(&b->lock); 80100166: 8d 43 0c lea 0xc(%ebx),%eax 80100169: 89 04 24 mov %eax,(%esp) 8010016c: e8 7f 3e 00 00 call 80103ff0 <acquiresleep> struct buf *b; b = bget(dev, blockno); if((b->flags & B_VALID) == 0) { 80100171: f6 03 02 testb $0x2,(%ebx) 80100174: 75 08 jne 8010017e <bread+0xae> iderw(b); 80100176: 89 1c 24 mov %ebx,(%esp) 80100179: e8 e2 1f 00 00 call 80102160 <iderw> } return b; } 8010017e: 83 c4 1c add $0x1c,%esp 80100181: 89 d8 mov %ebx,%eax 80100183: 5b pop %ebx 80100184: 5e pop %esi 80100185: 5f pop %edi 80100186: 5d pop %ebp 80100187: c3 ret panic("bget: no buffers"); 80100188: c7 04 24 8e 6e 10 80 movl $0x80106e8e,(%esp) 8010018f: e8 cc 01 00 00 call 80100360 <panic> 80100194: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8010019a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801001a0 <bwrite>: // Write b's contents to disk. Must be locked. void bwrite(struct buf *b) { 801001a0: 55 push %ebp 801001a1: 89 e5 mov %esp,%ebp 801001a3: 53 push %ebx 801001a4: 83 ec 14 sub $0x14,%esp 801001a7: 8b 5d 08 mov 0x8(%ebp),%ebx if(!holdingsleep(&b->lock)) 801001aa: 8d 43 0c lea 0xc(%ebx),%eax 801001ad: 89 04 24 mov %eax,(%esp) 801001b0: e8 db 3e 00 00 call 80104090 <holdingsleep> 801001b5: 85 c0 test %eax,%eax 801001b7: 74 10 je 801001c9 <bwrite+0x29> panic("bwrite"); b->flags |= B_DIRTY; 801001b9: 83 0b 04 orl $0x4,(%ebx) iderw(b); 801001bc: 89 5d 08 mov %ebx,0x8(%ebp) } 801001bf: 83 c4 14 add $0x14,%esp 801001c2: 5b pop %ebx 801001c3: 5d pop %ebp iderw(b); 801001c4: e9 97 1f 00 00 jmp 80102160 <iderw> panic("bwrite"); 801001c9: c7 04 24 9f 6e 10 80 movl $0x80106e9f,(%esp) 801001d0: e8 8b 01 00 00 call 80100360 <panic> 801001d5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801001d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801001e0 <brelse>: // Release a locked buffer. // Move to the head of the MRU list. void brelse(struct buf *b) { 801001e0: 55 push %ebp 801001e1: 89 e5 mov %esp,%ebp 801001e3: 56 push %esi 801001e4: 53 push %ebx 801001e5: 83 ec 10 sub $0x10,%esp 801001e8: 8b 5d 08 mov 0x8(%ebp),%ebx if(!holdingsleep(&b->lock)) 801001eb: 8d 73 0c lea 0xc(%ebx),%esi 801001ee: 89 34 24 mov %esi,(%esp) 801001f1: e8 9a 3e 00 00 call 80104090 <holdingsleep> 801001f6: 85 c0 test %eax,%eax 801001f8: 74 5b je 80100255 <brelse+0x75> panic("brelse"); releasesleep(&b->lock); 801001fa: 89 34 24 mov %esi,(%esp) 801001fd: e8 4e 3e 00 00 call 80104050 <releasesleep> acquire(&bcache.lock); 80100202: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) 80100209: e8 a2 3f 00 00 call 801041b0 <acquire> b->refcnt--; if (b->refcnt == 0) { 8010020e: 83 6b 4c 01 subl $0x1,0x4c(%ebx) 80100212: 75 2f jne 80100243 <brelse+0x63> // no one is waiting for it. b->next->prev = b->prev; 80100214: 8b 43 54 mov 0x54(%ebx),%eax 80100217: 8b 53 50 mov 0x50(%ebx),%edx 8010021a: 89 50 50 mov %edx,0x50(%eax) b->prev->next = b->next; 8010021d: 8b 43 50 mov 0x50(%ebx),%eax 80100220: 8b 53 54 mov 0x54(%ebx),%edx 80100223: 89 50 54 mov %edx,0x54(%eax) b->next = bcache.head.next; 80100226: a1 10 fd 10 80 mov 0x8010fd10,%eax b->prev = &bcache.head; 8010022b: c7 43 50 bc fc 10 80 movl $0x8010fcbc,0x50(%ebx) b->next = bcache.head.next; 80100232: 89 43 54 mov %eax,0x54(%ebx) bcache.head.next->prev = b; 80100235: a1 10 fd 10 80 mov 0x8010fd10,%eax 8010023a: 89 58 50 mov %ebx,0x50(%eax) bcache.head.next = b; 8010023d: 89 1d 10 fd 10 80 mov %ebx,0x8010fd10 } release(&bcache.lock); 80100243: c7 45 08 c0 b5 10 80 movl $0x8010b5c0,0x8(%ebp) } 8010024a: 83 c4 10 add $0x10,%esp 8010024d: 5b pop %ebx 8010024e: 5e pop %esi 8010024f: 5d pop %ebp release(&bcache.lock); 80100250: e9 4b 40 00 00 jmp 801042a0 <release> panic("brelse"); 80100255: c7 04 24 a6 6e 10 80 movl $0x80106ea6,(%esp) 8010025c: e8 ff 00 00 00 call 80100360 <panic> 80100261: 66 90 xchg %ax,%ax 80100263: 66 90 xchg %ax,%ax 80100265: 66 90 xchg %ax,%ax 80100267: 66 90 xchg %ax,%ax 80100269: 66 90 xchg %ax,%ax 8010026b: 66 90 xchg %ax,%ax 8010026d: 66 90 xchg %ax,%ax 8010026f: 90 nop 80100270 <consoleread>: } } int consoleread(struct inode *ip, char *dst, int n) { 80100270: 55 push %ebp 80100271: 89 e5 mov %esp,%ebp 80100273: 57 push %edi 80100274: 56 push %esi 80100275: 53 push %ebx 80100276: 83 ec 1c sub $0x1c,%esp 80100279: 8b 7d 08 mov 0x8(%ebp),%edi 8010027c: 8b 75 0c mov 0xc(%ebp),%esi uint target; int c; iunlock(ip); 8010027f: 89 3c 24 mov %edi,(%esp) 80100282: e8 49 15 00 00 call 801017d0 <iunlock> target = n; acquire(&cons.lock); 80100287: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010028e: e8 1d 3f 00 00 call 801041b0 <acquire> while(n > 0){ 80100293: 8b 55 10 mov 0x10(%ebp),%edx 80100296: 85 d2 test %edx,%edx 80100298: 0f 8e bc 00 00 00 jle 8010035a <consoleread+0xea> 8010029e: 8b 5d 10 mov 0x10(%ebp),%ebx 801002a1: eb 25 jmp 801002c8 <consoleread+0x58> 801002a3: 90 nop 801002a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(input.r == input.w){ if(myproc()->killed){ 801002a8: e8 33 34 00 00 call 801036e0 <myproc> 801002ad: 8b 40 24 mov 0x24(%eax),%eax 801002b0: 85 c0 test %eax,%eax 801002b2: 75 74 jne 80100328 <consoleread+0xb8> release(&cons.lock); ilock(ip); return -1; } sleep(&input.r, &cons.lock); 801002b4: c7 44 24 04 20 a5 10 movl $0x8010a520,0x4(%esp) 801002bb: 80 801002bc: c7 04 24 a0 ff 10 80 movl $0x8010ffa0,(%esp) 801002c3: e8 88 39 00 00 call 80103c50 <sleep> while(input.r == input.w){ 801002c8: a1 a0 ff 10 80 mov 0x8010ffa0,%eax 801002cd: 3b 05 a4 ff 10 80 cmp 0x8010ffa4,%eax 801002d3: 74 d3 je 801002a8 <consoleread+0x38> } c = input.buf[input.r++ % INPUT_BUF]; 801002d5: 8d 50 01 lea 0x1(%eax),%edx 801002d8: 89 15 a0 ff 10 80 mov %edx,0x8010ffa0 801002de: 89 c2 mov %eax,%edx 801002e0: 83 e2 7f and $0x7f,%edx 801002e3: 0f b6 8a 20 ff 10 80 movzbl -0x7fef00e0(%edx),%ecx 801002ea: 0f be d1 movsbl %cl,%edx if(c == C('D')){ // EOF 801002ed: 83 fa 04 cmp $0x4,%edx 801002f0: 74 57 je 80100349 <consoleread+0xd9> // caller gets a 0-byte result. input.r--; } break; } *dst++ = c; 801002f2: 83 c6 01 add $0x1,%esi --n; 801002f5: 83 eb 01 sub $0x1,%ebx if(c == '\n') 801002f8: 83 fa 0a cmp $0xa,%edx *dst++ = c; 801002fb: 88 4e ff mov %cl,-0x1(%esi) if(c == '\n') 801002fe: 74 53 je 80100353 <consoleread+0xe3> while(n > 0){ 80100300: 85 db test %ebx,%ebx 80100302: 75 c4 jne 801002c8 <consoleread+0x58> 80100304: 8b 45 10 mov 0x10(%ebp),%eax break; } release(&cons.lock); 80100307: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010030e: 89 45 e4 mov %eax,-0x1c(%ebp) 80100311: e8 8a 3f 00 00 call 801042a0 <release> ilock(ip); 80100316: 89 3c 24 mov %edi,(%esp) 80100319: e8 d2 13 00 00 call 801016f0 <ilock> 8010031e: 8b 45 e4 mov -0x1c(%ebp),%eax return target - n; 80100321: eb 1e jmp 80100341 <consoleread+0xd1> 80100323: 90 nop 80100324: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi release(&cons.lock); 80100328: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010032f: e8 6c 3f 00 00 call 801042a0 <release> ilock(ip); 80100334: 89 3c 24 mov %edi,(%esp) 80100337: e8 b4 13 00 00 call 801016f0 <ilock> return -1; 8010033c: b8 ff ff ff ff mov $0xffffffff,%eax } 80100341: 83 c4 1c add $0x1c,%esp 80100344: 5b pop %ebx 80100345: 5e pop %esi 80100346: 5f pop %edi 80100347: 5d pop %ebp 80100348: c3 ret if(n < target){ 80100349: 39 5d 10 cmp %ebx,0x10(%ebp) 8010034c: 76 05 jbe 80100353 <consoleread+0xe3> input.r--; 8010034e: a3 a0 ff 10 80 mov %eax,0x8010ffa0 80100353: 8b 45 10 mov 0x10(%ebp),%eax 80100356: 29 d8 sub %ebx,%eax 80100358: eb ad jmp 80100307 <consoleread+0x97> while(n > 0){ 8010035a: 31 c0 xor %eax,%eax 8010035c: eb a9 jmp 80100307 <consoleread+0x97> 8010035e: 66 90 xchg %ax,%ax 80100360 <panic>: { 80100360: 55 push %ebp 80100361: 89 e5 mov %esp,%ebp 80100363: 56 push %esi 80100364: 53 push %ebx 80100365: 83 ec 40 sub $0x40,%esp } static inline void cli(void) { asm volatile("cli"); 80100368: fa cli cons.locking = 0; 80100369: c7 05 54 a5 10 80 00 movl $0x0,0x8010a554 80100370: 00 00 00 getcallerpcs(&s, pcs); 80100373: 8d 5d d0 lea -0x30(%ebp),%ebx cprintf("lapicid %d: panic: ", lapicid()); 80100376: e8 25 24 00 00 call 801027a0 <lapicid> 8010037b: 8d 75 f8 lea -0x8(%ebp),%esi 8010037e: c7 04 24 ad 6e 10 80 movl $0x80106ead,(%esp) 80100385: 89 44 24 04 mov %eax,0x4(%esp) 80100389: e8 c2 02 00 00 call 80100650 <cprintf> cprintf(s); 8010038e: 8b 45 08 mov 0x8(%ebp),%eax 80100391: 89 04 24 mov %eax,(%esp) 80100394: e8 b7 02 00 00 call 80100650 <cprintf> cprintf("\n"); 80100399: c7 04 24 a9 75 10 80 movl $0x801075a9,(%esp) 801003a0: e8 ab 02 00 00 call 80100650 <cprintf> getcallerpcs(&s, pcs); 801003a5: 8d 45 08 lea 0x8(%ebp),%eax 801003a8: 89 5c 24 04 mov %ebx,0x4(%esp) 801003ac: 89 04 24 mov %eax,(%esp) 801003af: e8 2c 3d 00 00 call 801040e0 <getcallerpcs> 801003b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi cprintf(" %p", pcs[i]); 801003b8: 8b 03 mov (%ebx),%eax 801003ba: 83 c3 04 add $0x4,%ebx 801003bd: c7 04 24 c1 6e 10 80 movl $0x80106ec1,(%esp) 801003c4: 89 44 24 04 mov %eax,0x4(%esp) 801003c8: e8 83 02 00 00 call 80100650 <cprintf> for(i=0; i<10; i++) 801003cd: 39 f3 cmp %esi,%ebx 801003cf: 75 e7 jne 801003b8 <panic+0x58> panicked = 1; // freeze other CPU 801003d1: c7 05 58 a5 10 80 01 movl $0x1,0x8010a558 801003d8: 00 00 00 801003db: eb fe jmp 801003db <panic+0x7b> 801003dd: 8d 76 00 lea 0x0(%esi),%esi 801003e0 <consputc>: if(panicked){ 801003e0: 8b 15 58 a5 10 80 mov 0x8010a558,%edx 801003e6: 85 d2 test %edx,%edx 801003e8: 74 06 je 801003f0 <consputc+0x10> 801003ea: fa cli 801003eb: eb fe jmp 801003eb <consputc+0xb> 801003ed: 8d 76 00 lea 0x0(%esi),%esi { 801003f0: 55 push %ebp 801003f1: 89 e5 mov %esp,%ebp 801003f3: 57 push %edi 801003f4: 56 push %esi 801003f5: 53 push %ebx 801003f6: 89 c3 mov %eax,%ebx 801003f8: 83 ec 1c sub $0x1c,%esp if(c == BACKSPACE){ 801003fb: 3d 00 01 00 00 cmp $0x100,%eax 80100400: 0f 84 ac 00 00 00 je 801004b2 <consputc+0xd2> uartputc(c); 80100406: 89 04 24 mov %eax,(%esp) 80100409: e8 72 54 00 00 call 80105880 <uartputc> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010040e: bf d4 03 00 00 mov $0x3d4,%edi 80100413: b8 0e 00 00 00 mov $0xe,%eax 80100418: 89 fa mov %edi,%edx 8010041a: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 8010041b: be d5 03 00 00 mov $0x3d5,%esi 80100420: 89 f2 mov %esi,%edx 80100422: ec in (%dx),%al pos = inb(CRTPORT+1) << 8; 80100423: 0f b6 c8 movzbl %al,%ecx asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80100426: 89 fa mov %edi,%edx 80100428: c1 e1 08 shl $0x8,%ecx 8010042b: b8 0f 00 00 00 mov $0xf,%eax 80100430: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80100431: 89 f2 mov %esi,%edx 80100433: ec in (%dx),%al pos |= inb(CRTPORT+1); 80100434: 0f b6 c0 movzbl %al,%eax 80100437: 09 c1 or %eax,%ecx if(c == '\n') 80100439: 83 fb 0a cmp $0xa,%ebx 8010043c: 0f 84 0d 01 00 00 je 8010054f <consputc+0x16f> else if(c == BACKSPACE){ 80100442: 81 fb 00 01 00 00 cmp $0x100,%ebx 80100448: 0f 84 e8 00 00 00 je 80100536 <consputc+0x156> crt[pos++] = (c&0xff) | 0x0700; // black on white 8010044e: 0f b6 db movzbl %bl,%ebx 80100451: 80 cf 07 or $0x7,%bh 80100454: 8d 79 01 lea 0x1(%ecx),%edi 80100457: 66 89 9c 09 00 80 0b mov %bx,-0x7ff48000(%ecx,%ecx,1) 8010045e: 80 if(pos < 0 || pos > 25*80) 8010045f: 81 ff d0 07 00 00 cmp $0x7d0,%edi 80100465: 0f 87 bf 00 00 00 ja 8010052a <consputc+0x14a> if((pos/80) >= 24){ // Scroll up. 8010046b: 81 ff 7f 07 00 00 cmp $0x77f,%edi 80100471: 7f 68 jg 801004db <consputc+0xfb> 80100473: 89 f8 mov %edi,%eax 80100475: 89 fb mov %edi,%ebx 80100477: c1 e8 08 shr $0x8,%eax 8010047a: 89 c6 mov %eax,%esi 8010047c: 8d 8c 3f 00 80 0b 80 lea -0x7ff48000(%edi,%edi,1),%ecx asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80100483: bf d4 03 00 00 mov $0x3d4,%edi 80100488: b8 0e 00 00 00 mov $0xe,%eax 8010048d: 89 fa mov %edi,%edx 8010048f: ee out %al,(%dx) 80100490: 89 f0 mov %esi,%eax 80100492: b2 d5 mov $0xd5,%dl 80100494: ee out %al,(%dx) 80100495: b8 0f 00 00 00 mov $0xf,%eax 8010049a: 89 fa mov %edi,%edx 8010049c: ee out %al,(%dx) 8010049d: 89 d8 mov %ebx,%eax 8010049f: b2 d5 mov $0xd5,%dl 801004a1: ee out %al,(%dx) crt[pos] = ' ' | 0x0700; 801004a2: b8 20 07 00 00 mov $0x720,%eax 801004a7: 66 89 01 mov %ax,(%ecx) } 801004aa: 83 c4 1c add $0x1c,%esp 801004ad: 5b pop %ebx 801004ae: 5e pop %esi 801004af: 5f pop %edi 801004b0: 5d pop %ebp 801004b1: c3 ret uartputc('\b'); uartputc(' '); uartputc('\b'); 801004b2: c7 04 24 08 00 00 00 movl $0x8,(%esp) 801004b9: e8 c2 53 00 00 call 80105880 <uartputc> 801004be: c7 04 24 20 00 00 00 movl $0x20,(%esp) 801004c5: e8 b6 53 00 00 call 80105880 <uartputc> 801004ca: c7 04 24 08 00 00 00 movl $0x8,(%esp) 801004d1: e8 aa 53 00 00 call 80105880 <uartputc> 801004d6: e9 33 ff ff ff jmp 8010040e <consputc+0x2e> memmove(crt, crt+80, sizeof(crt[0])*23*80); 801004db: c7 44 24 08 60 0e 00 movl $0xe60,0x8(%esp) 801004e2: 00 pos -= 80; 801004e3: 8d 5f b0 lea -0x50(%edi),%ebx memmove(crt, crt+80, sizeof(crt[0])*23*80); 801004e6: c7 44 24 04 a0 80 0b movl $0x800b80a0,0x4(%esp) 801004ed: 80 memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos)); 801004ee: 8d b4 1b 00 80 0b 80 lea -0x7ff48000(%ebx,%ebx,1),%esi memmove(crt, crt+80, sizeof(crt[0])*23*80); 801004f5: c7 04 24 00 80 0b 80 movl $0x800b8000,(%esp) 801004fc: e8 8f 3e 00 00 call 80104390 <memmove> memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos)); 80100501: b8 d0 07 00 00 mov $0x7d0,%eax 80100506: 29 f8 sub %edi,%eax 80100508: 01 c0 add %eax,%eax 8010050a: 89 34 24 mov %esi,(%esp) 8010050d: 89 44 24 08 mov %eax,0x8(%esp) 80100511: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80100518: 00 80100519: e8 d2 3d 00 00 call 801042f0 <memset> 8010051e: 89 f1 mov %esi,%ecx 80100520: be 07 00 00 00 mov $0x7,%esi 80100525: e9 59 ff ff ff jmp 80100483 <consputc+0xa3> panic("pos under/overflow"); 8010052a: c7 04 24 c5 6e 10 80 movl $0x80106ec5,(%esp) 80100531: e8 2a fe ff ff call 80100360 <panic> if(pos > 0) --pos; 80100536: 85 c9 test %ecx,%ecx 80100538: 8d 79 ff lea -0x1(%ecx),%edi 8010053b: 0f 85 1e ff ff ff jne 8010045f <consputc+0x7f> 80100541: b9 00 80 0b 80 mov $0x800b8000,%ecx 80100546: 31 db xor %ebx,%ebx 80100548: 31 f6 xor %esi,%esi 8010054a: e9 34 ff ff ff jmp 80100483 <consputc+0xa3> pos += 80 - pos%80; 8010054f: 89 c8 mov %ecx,%eax 80100551: ba 67 66 66 66 mov $0x66666667,%edx 80100556: f7 ea imul %edx 80100558: c1 ea 05 shr $0x5,%edx 8010055b: 8d 04 92 lea (%edx,%edx,4),%eax 8010055e: c1 e0 04 shl $0x4,%eax 80100561: 8d 78 50 lea 0x50(%eax),%edi 80100564: e9 f6 fe ff ff jmp 8010045f <consputc+0x7f> 80100569: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80100570 <printint>: { 80100570: 55 push %ebp 80100571: 89 e5 mov %esp,%ebp 80100573: 57 push %edi 80100574: 56 push %esi 80100575: 89 d6 mov %edx,%esi 80100577: 53 push %ebx 80100578: 83 ec 1c sub $0x1c,%esp if(sign && (sign = xx < 0)) 8010057b: 85 c9 test %ecx,%ecx 8010057d: 74 61 je 801005e0 <printint+0x70> 8010057f: 85 c0 test %eax,%eax 80100581: 79 5d jns 801005e0 <printint+0x70> x = -xx; 80100583: f7 d8 neg %eax 80100585: bf 01 00 00 00 mov $0x1,%edi i = 0; 8010058a: 31 c9 xor %ecx,%ecx 8010058c: eb 04 jmp 80100592 <printint+0x22> 8010058e: 66 90 xchg %ax,%ax buf[i++] = digits[x % base]; 80100590: 89 d9 mov %ebx,%ecx 80100592: 31 d2 xor %edx,%edx 80100594: f7 f6 div %esi 80100596: 8d 59 01 lea 0x1(%ecx),%ebx 80100599: 0f b6 92 f0 6e 10 80 movzbl -0x7fef9110(%edx),%edx }while((x /= base) != 0); 801005a0: 85 c0 test %eax,%eax buf[i++] = digits[x % base]; 801005a2: 88 54 1d d7 mov %dl,-0x29(%ebp,%ebx,1) }while((x /= base) != 0); 801005a6: 75 e8 jne 80100590 <printint+0x20> if(sign) 801005a8: 85 ff test %edi,%edi buf[i++] = digits[x % base]; 801005aa: 89 d8 mov %ebx,%eax if(sign) 801005ac: 74 08 je 801005b6 <printint+0x46> buf[i++] = '-'; 801005ae: 8d 59 02 lea 0x2(%ecx),%ebx 801005b1: c6 44 05 d8 2d movb $0x2d,-0x28(%ebp,%eax,1) while(--i >= 0) 801005b6: 83 eb 01 sub $0x1,%ebx 801005b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi consputc(buf[i]); 801005c0: 0f be 44 1d d8 movsbl -0x28(%ebp,%ebx,1),%eax while(--i >= 0) 801005c5: 83 eb 01 sub $0x1,%ebx consputc(buf[i]); 801005c8: e8 13 fe ff ff call 801003e0 <consputc> while(--i >= 0) 801005cd: 83 fb ff cmp $0xffffffff,%ebx 801005d0: 75 ee jne 801005c0 <printint+0x50> } 801005d2: 83 c4 1c add $0x1c,%esp 801005d5: 5b pop %ebx 801005d6: 5e pop %esi 801005d7: 5f pop %edi 801005d8: 5d pop %ebp 801005d9: c3 ret 801005da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi x = xx; 801005e0: 31 ff xor %edi,%edi 801005e2: eb a6 jmp 8010058a <printint+0x1a> 801005e4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801005ea: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801005f0 <consolewrite>: int consolewrite(struct inode *ip, char *buf, int n) { 801005f0: 55 push %ebp 801005f1: 89 e5 mov %esp,%ebp 801005f3: 57 push %edi 801005f4: 56 push %esi 801005f5: 53 push %ebx 801005f6: 83 ec 1c sub $0x1c,%esp int i; iunlock(ip); 801005f9: 8b 45 08 mov 0x8(%ebp),%eax { 801005fc: 8b 75 10 mov 0x10(%ebp),%esi iunlock(ip); 801005ff: 89 04 24 mov %eax,(%esp) 80100602: e8 c9 11 00 00 call 801017d0 <iunlock> acquire(&cons.lock); 80100607: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010060e: e8 9d 3b 00 00 call 801041b0 <acquire> 80100613: 8b 7d 0c mov 0xc(%ebp),%edi for(i = 0; i < n; i++) 80100616: 85 f6 test %esi,%esi 80100618: 8d 1c 37 lea (%edi,%esi,1),%ebx 8010061b: 7e 12 jle 8010062f <consolewrite+0x3f> 8010061d: 8d 76 00 lea 0x0(%esi),%esi consputc(buf[i] & 0xff); 80100620: 0f b6 07 movzbl (%edi),%eax 80100623: 83 c7 01 add $0x1,%edi 80100626: e8 b5 fd ff ff call 801003e0 <consputc> for(i = 0; i < n; i++) 8010062b: 39 df cmp %ebx,%edi 8010062d: 75 f1 jne 80100620 <consolewrite+0x30> release(&cons.lock); 8010062f: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 80100636: e8 65 3c 00 00 call 801042a0 <release> ilock(ip); 8010063b: 8b 45 08 mov 0x8(%ebp),%eax 8010063e: 89 04 24 mov %eax,(%esp) 80100641: e8 aa 10 00 00 call 801016f0 <ilock> return n; } 80100646: 83 c4 1c add $0x1c,%esp 80100649: 89 f0 mov %esi,%eax 8010064b: 5b pop %ebx 8010064c: 5e pop %esi 8010064d: 5f pop %edi 8010064e: 5d pop %ebp 8010064f: c3 ret 80100650 <cprintf>: { 80100650: 55 push %ebp 80100651: 89 e5 mov %esp,%ebp 80100653: 57 push %edi 80100654: 56 push %esi 80100655: 53 push %ebx 80100656: 83 ec 1c sub $0x1c,%esp locking = cons.locking; 80100659: a1 54 a5 10 80 mov 0x8010a554,%eax if(locking) 8010065e: 85 c0 test %eax,%eax locking = cons.locking; 80100660: 89 45 e0 mov %eax,-0x20(%ebp) if(locking) 80100663: 0f 85 27 01 00 00 jne 80100790 <cprintf+0x140> if (fmt == 0) 80100669: 8b 45 08 mov 0x8(%ebp),%eax 8010066c: 85 c0 test %eax,%eax 8010066e: 89 c1 mov %eax,%ecx 80100670: 0f 84 2b 01 00 00 je 801007a1 <cprintf+0x151> for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ 80100676: 0f b6 00 movzbl (%eax),%eax 80100679: 31 db xor %ebx,%ebx 8010067b: 89 cf mov %ecx,%edi 8010067d: 8d 75 0c lea 0xc(%ebp),%esi 80100680: 85 c0 test %eax,%eax 80100682: 75 4c jne 801006d0 <cprintf+0x80> 80100684: eb 5f jmp 801006e5 <cprintf+0x95> 80100686: 66 90 xchg %ax,%ax c = fmt[++i] & 0xff; 80100688: 83 c3 01 add $0x1,%ebx 8010068b: 0f b6 14 1f movzbl (%edi,%ebx,1),%edx if(c == 0) 8010068f: 85 d2 test %edx,%edx 80100691: 74 52 je 801006e5 <cprintf+0x95> switch(c){ 80100693: 83 fa 70 cmp $0x70,%edx 80100696: 74 72 je 8010070a <cprintf+0xba> 80100698: 7f 66 jg 80100700 <cprintf+0xb0> 8010069a: 83 fa 25 cmp $0x25,%edx 8010069d: 8d 76 00 lea 0x0(%esi),%esi 801006a0: 0f 84 a2 00 00 00 je 80100748 <cprintf+0xf8> 801006a6: 83 fa 64 cmp $0x64,%edx 801006a9: 75 7d jne 80100728 <cprintf+0xd8> printint(*argp++, 10, 1); 801006ab: 8d 46 04 lea 0x4(%esi),%eax 801006ae: b9 01 00 00 00 mov $0x1,%ecx 801006b3: 89 45 e4 mov %eax,-0x1c(%ebp) 801006b6: 8b 06 mov (%esi),%eax 801006b8: ba 0a 00 00 00 mov $0xa,%edx 801006bd: e8 ae fe ff ff call 80100570 <printint> 801006c2: 8b 75 e4 mov -0x1c(%ebp),%esi for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ 801006c5: 83 c3 01 add $0x1,%ebx 801006c8: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 801006cc: 85 c0 test %eax,%eax 801006ce: 74 15 je 801006e5 <cprintf+0x95> if(c != '%'){ 801006d0: 83 f8 25 cmp $0x25,%eax 801006d3: 74 b3 je 80100688 <cprintf+0x38> consputc(c); 801006d5: e8 06 fd ff ff call 801003e0 <consputc> for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ 801006da: 83 c3 01 add $0x1,%ebx 801006dd: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 801006e1: 85 c0 test %eax,%eax 801006e3: 75 eb jne 801006d0 <cprintf+0x80> if(locking) 801006e5: 8b 45 e0 mov -0x20(%ebp),%eax 801006e8: 85 c0 test %eax,%eax 801006ea: 74 0c je 801006f8 <cprintf+0xa8> release(&cons.lock); 801006ec: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 801006f3: e8 a8 3b 00 00 call 801042a0 <release> } 801006f8: 83 c4 1c add $0x1c,%esp 801006fb: 5b pop %ebx 801006fc: 5e pop %esi 801006fd: 5f pop %edi 801006fe: 5d pop %ebp 801006ff: c3 ret switch(c){ 80100700: 83 fa 73 cmp $0x73,%edx 80100703: 74 53 je 80100758 <cprintf+0x108> 80100705: 83 fa 78 cmp $0x78,%edx 80100708: 75 1e jne 80100728 <cprintf+0xd8> printint(*argp++, 16, 0); 8010070a: 8d 46 04 lea 0x4(%esi),%eax 8010070d: 31 c9 xor %ecx,%ecx 8010070f: 89 45 e4 mov %eax,-0x1c(%ebp) 80100712: 8b 06 mov (%esi),%eax 80100714: ba 10 00 00 00 mov $0x10,%edx 80100719: e8 52 fe ff ff call 80100570 <printint> 8010071e: 8b 75 e4 mov -0x1c(%ebp),%esi break; 80100721: eb a2 jmp 801006c5 <cprintf+0x75> 80100723: 90 nop 80100724: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi consputc('%'); 80100728: b8 25 00 00 00 mov $0x25,%eax 8010072d: 89 55 e4 mov %edx,-0x1c(%ebp) 80100730: e8 ab fc ff ff call 801003e0 <consputc> consputc(c); 80100735: 8b 55 e4 mov -0x1c(%ebp),%edx 80100738: 89 d0 mov %edx,%eax 8010073a: e8 a1 fc ff ff call 801003e0 <consputc> 8010073f: eb 99 jmp 801006da <cprintf+0x8a> 80100741: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi consputc('%'); 80100748: b8 25 00 00 00 mov $0x25,%eax 8010074d: e8 8e fc ff ff call 801003e0 <consputc> break; 80100752: e9 6e ff ff ff jmp 801006c5 <cprintf+0x75> 80100757: 90 nop if((s = (char*)*argp++) == 0) 80100758: 8d 46 04 lea 0x4(%esi),%eax 8010075b: 8b 36 mov (%esi),%esi 8010075d: 89 45 e4 mov %eax,-0x1c(%ebp) s = "(null)"; 80100760: b8 d8 6e 10 80 mov $0x80106ed8,%eax 80100765: 85 f6 test %esi,%esi 80100767: 0f 44 f0 cmove %eax,%esi for(; *s; s++) 8010076a: 0f be 06 movsbl (%esi),%eax 8010076d: 84 c0 test %al,%al 8010076f: 74 16 je 80100787 <cprintf+0x137> 80100771: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80100778: 83 c6 01 add $0x1,%esi consputc(*s); 8010077b: e8 60 fc ff ff call 801003e0 <consputc> for(; *s; s++) 80100780: 0f be 06 movsbl (%esi),%eax 80100783: 84 c0 test %al,%al 80100785: 75 f1 jne 80100778 <cprintf+0x128> if((s = (char*)*argp++) == 0) 80100787: 8b 75 e4 mov -0x1c(%ebp),%esi 8010078a: e9 36 ff ff ff jmp 801006c5 <cprintf+0x75> 8010078f: 90 nop acquire(&cons.lock); 80100790: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 80100797: e8 14 3a 00 00 call 801041b0 <acquire> 8010079c: e9 c8 fe ff ff jmp 80100669 <cprintf+0x19> panic("null fmt"); 801007a1: c7 04 24 df 6e 10 80 movl $0x80106edf,(%esp) 801007a8: e8 b3 fb ff ff call 80100360 <panic> 801007ad: 8d 76 00 lea 0x0(%esi),%esi 801007b0 <consoleintr>: { 801007b0: 55 push %ebp 801007b1: 89 e5 mov %esp,%ebp 801007b3: 57 push %edi 801007b4: 56 push %esi int c, doprocdump = 0; 801007b5: 31 f6 xor %esi,%esi { 801007b7: 53 push %ebx 801007b8: 83 ec 1c sub $0x1c,%esp 801007bb: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&cons.lock); 801007be: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 801007c5: e8 e6 39 00 00 call 801041b0 <acquire> 801007ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi while((c = getc()) >= 0){ 801007d0: ff d3 call *%ebx 801007d2: 85 c0 test %eax,%eax 801007d4: 89 c7 mov %eax,%edi 801007d6: 78 48 js 80100820 <consoleintr+0x70> switch(c){ 801007d8: 83 ff 10 cmp $0x10,%edi 801007db: 0f 84 2f 01 00 00 je 80100910 <consoleintr+0x160> 801007e1: 7e 5d jle 80100840 <consoleintr+0x90> 801007e3: 83 ff 15 cmp $0x15,%edi 801007e6: 0f 84 d4 00 00 00 je 801008c0 <consoleintr+0x110> 801007ec: 83 ff 7f cmp $0x7f,%edi 801007ef: 90 nop 801007f0: 75 53 jne 80100845 <consoleintr+0x95> if(input.e != input.w){ 801007f2: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 801007f7: 3b 05 a4 ff 10 80 cmp 0x8010ffa4,%eax 801007fd: 74 d1 je 801007d0 <consoleintr+0x20> input.e--; 801007ff: 83 e8 01 sub $0x1,%eax 80100802: a3 a8 ff 10 80 mov %eax,0x8010ffa8 consputc(BACKSPACE); 80100807: b8 00 01 00 00 mov $0x100,%eax 8010080c: e8 cf fb ff ff call 801003e0 <consputc> while((c = getc()) >= 0){ 80100811: ff d3 call *%ebx 80100813: 85 c0 test %eax,%eax 80100815: 89 c7 mov %eax,%edi 80100817: 79 bf jns 801007d8 <consoleintr+0x28> 80100819: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi release(&cons.lock); 80100820: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 80100827: e8 74 3a 00 00 call 801042a0 <release> if(doprocdump) { 8010082c: 85 f6 test %esi,%esi 8010082e: 0f 85 ec 00 00 00 jne 80100920 <consoleintr+0x170> } 80100834: 83 c4 1c add $0x1c,%esp 80100837: 5b pop %ebx 80100838: 5e pop %esi 80100839: 5f pop %edi 8010083a: 5d pop %ebp 8010083b: c3 ret 8010083c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi switch(c){ 80100840: 83 ff 08 cmp $0x8,%edi 80100843: 74 ad je 801007f2 <consoleintr+0x42> if(c != 0 && input.e-input.r < INPUT_BUF){ 80100845: 85 ff test %edi,%edi 80100847: 74 87 je 801007d0 <consoleintr+0x20> 80100849: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 8010084e: 89 c2 mov %eax,%edx 80100850: 2b 15 a0 ff 10 80 sub 0x8010ffa0,%edx 80100856: 83 fa 7f cmp $0x7f,%edx 80100859: 0f 87 71 ff ff ff ja 801007d0 <consoleintr+0x20> input.buf[input.e++ % INPUT_BUF] = c; 8010085f: 8d 50 01 lea 0x1(%eax),%edx 80100862: 83 e0 7f and $0x7f,%eax c = (c == '\r') ? '\n' : c; 80100865: 83 ff 0d cmp $0xd,%edi input.buf[input.e++ % INPUT_BUF] = c; 80100868: 89 15 a8 ff 10 80 mov %edx,0x8010ffa8 c = (c == '\r') ? '\n' : c; 8010086e: 0f 84 b8 00 00 00 je 8010092c <consoleintr+0x17c> input.buf[input.e++ % INPUT_BUF] = c; 80100874: 89 f9 mov %edi,%ecx 80100876: 88 88 20 ff 10 80 mov %cl,-0x7fef00e0(%eax) consputc(c); 8010087c: 89 f8 mov %edi,%eax 8010087e: e8 5d fb ff ff call 801003e0 <consputc> if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){ 80100883: 83 ff 04 cmp $0x4,%edi 80100886: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 8010088b: 74 19 je 801008a6 <consoleintr+0xf6> 8010088d: 83 ff 0a cmp $0xa,%edi 80100890: 74 14 je 801008a6 <consoleintr+0xf6> 80100892: 8b 0d a0 ff 10 80 mov 0x8010ffa0,%ecx 80100898: 8d 91 80 00 00 00 lea 0x80(%ecx),%edx 8010089e: 39 d0 cmp %edx,%eax 801008a0: 0f 85 2a ff ff ff jne 801007d0 <consoleintr+0x20> wakeup(&input.r); 801008a6: c7 04 24 a0 ff 10 80 movl $0x8010ffa0,(%esp) input.w = input.e; 801008ad: a3 a4 ff 10 80 mov %eax,0x8010ffa4 wakeup(&input.r); 801008b2: e8 39 35 00 00 call 80103df0 <wakeup> 801008b7: e9 14 ff ff ff jmp 801007d0 <consoleintr+0x20> 801008bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(input.e != input.w && 801008c0: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 801008c5: 3b 05 a4 ff 10 80 cmp 0x8010ffa4,%eax 801008cb: 75 2b jne 801008f8 <consoleintr+0x148> 801008cd: e9 fe fe ff ff jmp 801007d0 <consoleintr+0x20> 801008d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi input.e--; 801008d8: a3 a8 ff 10 80 mov %eax,0x8010ffa8 consputc(BACKSPACE); 801008dd: b8 00 01 00 00 mov $0x100,%eax 801008e2: e8 f9 fa ff ff call 801003e0 <consputc> while(input.e != input.w && 801008e7: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 801008ec: 3b 05 a4 ff 10 80 cmp 0x8010ffa4,%eax 801008f2: 0f 84 d8 fe ff ff je 801007d0 <consoleintr+0x20> input.buf[(input.e-1) % INPUT_BUF] != '\n'){ 801008f8: 83 e8 01 sub $0x1,%eax 801008fb: 89 c2 mov %eax,%edx 801008fd: 83 e2 7f and $0x7f,%edx while(input.e != input.w && 80100900: 80 ba 20 ff 10 80 0a cmpb $0xa,-0x7fef00e0(%edx) 80100907: 75 cf jne 801008d8 <consoleintr+0x128> 80100909: e9 c2 fe ff ff jmp 801007d0 <consoleintr+0x20> 8010090e: 66 90 xchg %ax,%ax doprocdump = 1; 80100910: be 01 00 00 00 mov $0x1,%esi 80100915: e9 b6 fe ff ff jmp 801007d0 <consoleintr+0x20> 8010091a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi } 80100920: 83 c4 1c add $0x1c,%esp 80100923: 5b pop %ebx 80100924: 5e pop %esi 80100925: 5f pop %edi 80100926: 5d pop %ebp procdump(); // now call procdump() wo. cons.lock held 80100927: e9 b4 35 00 00 jmp 80103ee0 <procdump> input.buf[input.e++ % INPUT_BUF] = c; 8010092c: c6 80 20 ff 10 80 0a movb $0xa,-0x7fef00e0(%eax) consputc(c); 80100933: b8 0a 00 00 00 mov $0xa,%eax 80100938: e8 a3 fa ff ff call 801003e0 <consputc> 8010093d: a1 a8 ff 10 80 mov 0x8010ffa8,%eax 80100942: e9 5f ff ff ff jmp 801008a6 <consoleintr+0xf6> 80100947: 89 f6 mov %esi,%esi 80100949: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80100950 <consoleinit>: void consoleinit(void) { 80100950: 55 push %ebp 80100951: 89 e5 mov %esp,%ebp 80100953: 83 ec 18 sub $0x18,%esp initlock(&cons.lock, "console"); 80100956: c7 44 24 04 e8 6e 10 movl $0x80106ee8,0x4(%esp) 8010095d: 80 8010095e: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 80100965: e8 56 37 00 00 call 801040c0 <initlock> devsw[CONSOLE].write = consolewrite; devsw[CONSOLE].read = consoleread; cons.locking = 1; ioapicenable(IRQ_KBD, 0); 8010096a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80100971: 00 80100972: c7 04 24 01 00 00 00 movl $0x1,(%esp) devsw[CONSOLE].write = consolewrite; 80100979: c7 05 6c 09 11 80 f0 movl $0x801005f0,0x8011096c 80100980: 05 10 80 devsw[CONSOLE].read = consoleread; 80100983: c7 05 68 09 11 80 70 movl $0x80100270,0x80110968 8010098a: 02 10 80 cons.locking = 1; 8010098d: c7 05 54 a5 10 80 01 movl $0x1,0x8010a554 80100994: 00 00 00 ioapicenable(IRQ_KBD, 0); 80100997: e8 54 19 00 00 call 801022f0 <ioapicenable> } 8010099c: c9 leave 8010099d: c3 ret 8010099e: 66 90 xchg %ax,%ax 801009a0 <exec>: #include "x86.h" #include "elf.h" int exec(char *path, char **argv) { 801009a0: 55 push %ebp 801009a1: 89 e5 mov %esp,%ebp 801009a3: 57 push %edi 801009a4: 56 push %esi 801009a5: 53 push %ebx 801009a6: 81 ec 2c 01 00 00 sub $0x12c,%esp uint argc, sz, sp, ustack[3+MAXARG+1]; struct elfhdr elf; struct inode *ip; struct proghdr ph; pde_t *pgdir, *oldpgdir; struct proc *curproc = myproc(); 801009ac: e8 2f 2d 00 00 call 801036e0 <myproc> 801009b1: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp) begin_op(); 801009b7: e8 94 21 00 00 call 80102b50 <begin_op> if((ip = namei(path)) == 0){ 801009bc: 8b 45 08 mov 0x8(%ebp),%eax 801009bf: 89 04 24 mov %eax,(%esp) 801009c2: e8 79 15 00 00 call 80101f40 <namei> 801009c7: 85 c0 test %eax,%eax 801009c9: 89 c3 mov %eax,%ebx 801009cb: 0f 84 b9 01 00 00 je 80100b8a <exec+0x1ea> end_op(); cprintf("exec: fail\n"); return -1; } ilock(ip); 801009d1: 89 04 24 mov %eax,(%esp) 801009d4: e8 17 0d 00 00 call 801016f0 <ilock> pgdir = 0; // Check ELF header if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf)) 801009d9: 8d 85 24 ff ff ff lea -0xdc(%ebp),%eax 801009df: c7 44 24 0c 34 00 00 movl $0x34,0xc(%esp) 801009e6: 00 801009e7: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 801009ee: 00 801009ef: 89 44 24 04 mov %eax,0x4(%esp) 801009f3: 89 1c 24 mov %ebx,(%esp) 801009f6: e8 a5 0f 00 00 call 801019a0 <readi> 801009fb: 83 f8 34 cmp $0x34,%eax 801009fe: 74 20 je 80100a20 <exec+0x80> bad: if(pgdir) freevm(pgdir); if(ip){ iunlockput(ip); 80100a00: 89 1c 24 mov %ebx,(%esp) 80100a03: e8 48 0f 00 00 call 80101950 <iunlockput> end_op(); 80100a08: e8 b3 21 00 00 call 80102bc0 <end_op> } return -1; 80100a0d: b8 ff ff ff ff mov $0xffffffff,%eax } 80100a12: 81 c4 2c 01 00 00 add $0x12c,%esp 80100a18: 5b pop %ebx 80100a19: 5e pop %esi 80100a1a: 5f pop %edi 80100a1b: 5d pop %ebp 80100a1c: c3 ret 80100a1d: 8d 76 00 lea 0x0(%esi),%esi if(elf.magic != ELF_MAGIC) 80100a20: 81 bd 24 ff ff ff 7f cmpl $0x464c457f,-0xdc(%ebp) 80100a27: 45 4c 46 80100a2a: 75 d4 jne 80100a00 <exec+0x60> if((pgdir = setupkvm()) == 0) 80100a2c: e8 5f 60 00 00 call 80106a90 <setupkvm> 80100a31: 85 c0 test %eax,%eax 80100a33: 89 85 f0 fe ff ff mov %eax,-0x110(%ebp) 80100a39: 74 c5 je 80100a00 <exec+0x60> for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ 80100a3b: 66 83 bd 50 ff ff ff cmpw $0x0,-0xb0(%ebp) 80100a42: 00 80100a43: 8b b5 40 ff ff ff mov -0xc0(%ebp),%esi sz = 0; 80100a49: c7 85 ec fe ff ff 00 movl $0x0,-0x114(%ebp) 80100a50: 00 00 00 for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){ 80100a53: 0f 84 da 00 00 00 je 80100b33 <exec+0x193> 80100a59: 31 ff xor %edi,%edi 80100a5b: eb 18 jmp 80100a75 <exec+0xd5> 80100a5d: 8d 76 00 lea 0x0(%esi),%esi 80100a60: 0f b7 85 50 ff ff ff movzwl -0xb0(%ebp),%eax 80100a67: 83 c7 01 add $0x1,%edi 80100a6a: 83 c6 20 add $0x20,%esi 80100a6d: 39 f8 cmp %edi,%eax 80100a6f: 0f 8e be 00 00 00 jle 80100b33 <exec+0x193> if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph)) 80100a75: 8d 85 04 ff ff ff lea -0xfc(%ebp),%eax 80100a7b: c7 44 24 0c 20 00 00 movl $0x20,0xc(%esp) 80100a82: 00 80100a83: 89 74 24 08 mov %esi,0x8(%esp) 80100a87: 89 44 24 04 mov %eax,0x4(%esp) 80100a8b: 89 1c 24 mov %ebx,(%esp) 80100a8e: e8 0d 0f 00 00 call 801019a0 <readi> 80100a93: 83 f8 20 cmp $0x20,%eax 80100a96: 0f 85 84 00 00 00 jne 80100b20 <exec+0x180> if(ph.type != ELF_PROG_LOAD) 80100a9c: 83 bd 04 ff ff ff 01 cmpl $0x1,-0xfc(%ebp) 80100aa3: 75 bb jne 80100a60 <exec+0xc0> if(ph.memsz < ph.filesz) 80100aa5: 8b 85 18 ff ff ff mov -0xe8(%ebp),%eax 80100aab: 3b 85 14 ff ff ff cmp -0xec(%ebp),%eax 80100ab1: 72 6d jb 80100b20 <exec+0x180> if(ph.vaddr + ph.memsz < ph.vaddr) 80100ab3: 03 85 0c ff ff ff add -0xf4(%ebp),%eax 80100ab9: 72 65 jb 80100b20 <exec+0x180> if((sz = allocuvm(pgdir, sz, ph.vaddr + ph.memsz)) == 0) 80100abb: 89 44 24 08 mov %eax,0x8(%esp) 80100abf: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax 80100ac5: 89 44 24 04 mov %eax,0x4(%esp) 80100ac9: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100acf: 89 04 24 mov %eax,(%esp) 80100ad2: e8 19 5e 00 00 call 801068f0 <allocuvm> 80100ad7: 85 c0 test %eax,%eax 80100ad9: 89 85 ec fe ff ff mov %eax,-0x114(%ebp) 80100adf: 74 3f je 80100b20 <exec+0x180> if(ph.vaddr % PGSIZE != 0) 80100ae1: 8b 85 0c ff ff ff mov -0xf4(%ebp),%eax 80100ae7: a9 ff 0f 00 00 test $0xfff,%eax 80100aec: 75 32 jne 80100b20 <exec+0x180> if(loaduvm(pgdir, (char*)ph.vaddr, ip, ph.off, ph.filesz) < 0) 80100aee: 8b 95 14 ff ff ff mov -0xec(%ebp),%edx 80100af4: 89 44 24 04 mov %eax,0x4(%esp) 80100af8: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100afe: 89 5c 24 08 mov %ebx,0x8(%esp) 80100b02: 89 54 24 10 mov %edx,0x10(%esp) 80100b06: 8b 95 08 ff ff ff mov -0xf8(%ebp),%edx 80100b0c: 89 04 24 mov %eax,(%esp) 80100b0f: 89 54 24 0c mov %edx,0xc(%esp) 80100b13: e8 18 5d 00 00 call 80106830 <loaduvm> 80100b18: 85 c0 test %eax,%eax 80100b1a: 0f 89 40 ff ff ff jns 80100a60 <exec+0xc0> freevm(pgdir); 80100b20: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100b26: 89 04 24 mov %eax,(%esp) 80100b29: e8 e2 5e 00 00 call 80106a10 <freevm> 80100b2e: e9 cd fe ff ff jmp 80100a00 <exec+0x60> iunlockput(ip); 80100b33: 89 1c 24 mov %ebx,(%esp) 80100b36: e8 15 0e 00 00 call 80101950 <iunlockput> 80100b3b: 90 nop 80100b3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi end_op(); 80100b40: e8 7b 20 00 00 call 80102bc0 <end_op> if((sz = allocuvm(pgdir, sz, sz + PGSIZE)) == 0) 80100b45: 8b 8d ec fe ff ff mov -0x114(%ebp),%ecx 80100b4b: 89 c8 mov %ecx,%eax 80100b4d: 05 00 10 00 00 add $0x1000,%eax 80100b52: 89 44 24 08 mov %eax,0x8(%esp) 80100b56: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100b5c: 89 4c 24 04 mov %ecx,0x4(%esp) 80100b60: 89 04 24 mov %eax,(%esp) 80100b63: e8 88 5d 00 00 call 801068f0 <allocuvm> 80100b68: 85 c0 test %eax,%eax 80100b6a: 89 85 e8 fe ff ff mov %eax,-0x118(%ebp) 80100b70: 75 33 jne 80100ba5 <exec+0x205> freevm(pgdir); 80100b72: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100b78: 89 04 24 mov %eax,(%esp) 80100b7b: e8 90 5e 00 00 call 80106a10 <freevm> return -1; 80100b80: b8 ff ff ff ff mov $0xffffffff,%eax 80100b85: e9 88 fe ff ff jmp 80100a12 <exec+0x72> end_op(); 80100b8a: e8 31 20 00 00 call 80102bc0 <end_op> cprintf("exec: fail\n"); 80100b8f: c7 04 24 01 6f 10 80 movl $0x80106f01,(%esp) 80100b96: e8 b5 fa ff ff call 80100650 <cprintf> return -1; 80100b9b: b8 ff ff ff ff mov $0xffffffff,%eax 80100ba0: e9 6d fe ff ff jmp 80100a12 <exec+0x72> clearpteu(pgdir, (char*)(sz - PGSIZE)); 80100ba5: 8b 85 e8 fe ff ff mov -0x118(%ebp),%eax 80100bab: 8b bd f0 fe ff ff mov -0x110(%ebp),%edi 80100bb1: 2d 00 10 00 00 sub $0x1000,%eax 80100bb6: 89 44 24 04 mov %eax,0x4(%esp) 80100bba: 89 3c 24 mov %edi,(%esp) 80100bbd: e8 7e 5f 00 00 call 80106b40 <clearpteu> if ((allocuvm(pgdir, oldSize, newSize)) == 0) 80100bc2: c7 44 24 08 fc ff ff movl $0x7ffffffc,0x8(%esp) 80100bc9: 7f 80100bca: c7 44 24 04 fc ef ff movl $0x7fffeffc,0x4(%esp) 80100bd1: 7f 80100bd2: 89 3c 24 mov %edi,(%esp) 80100bd5: e8 16 5d 00 00 call 801068f0 <allocuvm> 80100bda: 85 c0 test %eax,%eax 80100bdc: 74 94 je 80100b72 <exec+0x1d2> curproc->stackPages = 1; 80100bde: 8b 85 f4 fe ff ff mov -0x10c(%ebp),%eax 80100be4: c7 80 80 00 00 00 01 movl $0x1,0x80(%eax) 80100beb: 00 00 00 for(argc = 0; argv[argc]; argc++) { 80100bee: 8b 45 0c mov 0xc(%ebp),%eax 80100bf1: 8b 00 mov (%eax),%eax 80100bf3: 85 c0 test %eax,%eax 80100bf5: 0f 84 71 01 00 00 je 80100d6c <exec+0x3cc> 80100bfb: 8b 4d 0c mov 0xc(%ebp),%ecx 80100bfe: 31 f6 xor %esi,%esi sp = newSize; 80100c00: bb fc ff ff 7f mov $0x7ffffffc,%ebx for(argc = 0; argv[argc]; argc++) { 80100c05: 89 cf mov %ecx,%edi 80100c07: 8d 51 04 lea 0x4(%ecx),%edx 80100c0a: 89 f1 mov %esi,%ecx 80100c0c: 89 fe mov %edi,%esi 80100c0e: 89 cf mov %ecx,%edi 80100c10: eb 12 jmp 80100c24 <exec+0x284> 80100c12: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100c18: 83 c2 04 add $0x4,%edx if(argc >= MAXARG) 80100c1b: 83 ff 20 cmp $0x20,%edi 80100c1e: 0f 84 4e ff ff ff je 80100b72 <exec+0x1d2> sp = (sp - (strlen(argv[argc]) + 1)) & ~3; 80100c24: 89 04 24 mov %eax,(%esp) 80100c27: 89 95 ec fe ff ff mov %edx,-0x114(%ebp) 80100c2d: e8 de 38 00 00 call 80104510 <strlen> 80100c32: f7 d0 not %eax 80100c34: 01 c3 add %eax,%ebx if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) 80100c36: 8b 06 mov (%esi),%eax sp = (sp - (strlen(argv[argc]) + 1)) & ~3; 80100c38: 83 e3 fc and $0xfffffffc,%ebx if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) 80100c3b: 89 04 24 mov %eax,(%esp) 80100c3e: e8 cd 38 00 00 call 80104510 <strlen> 80100c43: 83 c0 01 add $0x1,%eax 80100c46: 89 44 24 0c mov %eax,0xc(%esp) 80100c4a: 8b 06 mov (%esi),%eax 80100c4c: 89 5c 24 04 mov %ebx,0x4(%esp) 80100c50: 89 44 24 08 mov %eax,0x8(%esp) 80100c54: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100c5a: 89 04 24 mov %eax,(%esp) 80100c5d: e8 0e 61 00 00 call 80106d70 <copyout> 80100c62: 85 c0 test %eax,%eax 80100c64: 0f 88 08 ff ff ff js 80100b72 <exec+0x1d2> for(argc = 0; argv[argc]; argc++) { 80100c6a: 8b 95 ec fe ff ff mov -0x114(%ebp),%edx ustack[3+argc] = sp; 80100c70: 8d 8d 58 ff ff ff lea -0xa8(%ebp),%ecx 80100c76: 89 9c bd 64 ff ff ff mov %ebx,-0x9c(%ebp,%edi,4) for(argc = 0; argv[argc]; argc++) { 80100c7d: 83 c7 01 add $0x1,%edi 80100c80: 8b 02 mov (%edx),%eax 80100c82: 89 d6 mov %edx,%esi 80100c84: 85 c0 test %eax,%eax 80100c86: 75 90 jne 80100c18 <exec+0x278> 80100c88: 89 fe mov %edi,%esi ustack[2] = sp - (argc+1)*4; // argv pointer 80100c8a: 8d 04 b5 04 00 00 00 lea 0x4(,%esi,4),%eax 80100c91: 89 da mov %ebx,%edx 80100c93: 29 c2 sub %eax,%edx sp -= (3+argc+1) * 4; 80100c95: 83 c0 0c add $0xc,%eax 80100c98: 29 c3 sub %eax,%ebx if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100c9a: 89 44 24 0c mov %eax,0xc(%esp) 80100c9e: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100ca4: 89 4c 24 08 mov %ecx,0x8(%esp) 80100ca8: 89 5c 24 04 mov %ebx,0x4(%esp) ustack[3+argc] = 0; 80100cac: c7 84 b5 64 ff ff ff movl $0x0,-0x9c(%ebp,%esi,4) 80100cb3: 00 00 00 00 if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100cb7: 89 04 24 mov %eax,(%esp) ustack[0] = 0xffffffff; // fake return PC 80100cba: c7 85 58 ff ff ff ff movl $0xffffffff,-0xa8(%ebp) 80100cc1: ff ff ff ustack[1] = argc; 80100cc4: 89 b5 5c ff ff ff mov %esi,-0xa4(%ebp) ustack[2] = sp - (argc+1)*4; // argv pointer 80100cca: 89 95 60 ff ff ff mov %edx,-0xa0(%ebp) if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100cd0: e8 9b 60 00 00 call 80106d70 <copyout> 80100cd5: 85 c0 test %eax,%eax 80100cd7: 0f 88 95 fe ff ff js 80100b72 <exec+0x1d2> for(last=s=path; *s; s++) 80100cdd: 8b 45 08 mov 0x8(%ebp),%eax 80100ce0: 0f b6 10 movzbl (%eax),%edx 80100ce3: 84 d2 test %dl,%dl 80100ce5: 74 19 je 80100d00 <exec+0x360> 80100ce7: 8b 4d 08 mov 0x8(%ebp),%ecx 80100cea: 83 c0 01 add $0x1,%eax last = s+1; 80100ced: 80 fa 2f cmp $0x2f,%dl for(last=s=path; *s; s++) 80100cf0: 0f b6 10 movzbl (%eax),%edx last = s+1; 80100cf3: 0f 44 c8 cmove %eax,%ecx 80100cf6: 83 c0 01 add $0x1,%eax for(last=s=path; *s; s++) 80100cf9: 84 d2 test %dl,%dl 80100cfb: 75 f0 jne 80100ced <exec+0x34d> 80100cfd: 89 4d 08 mov %ecx,0x8(%ebp) safestrcpy(curproc->name, last, sizeof(curproc->name)); 80100d00: 8b bd f4 fe ff ff mov -0x10c(%ebp),%edi 80100d06: 8b 45 08 mov 0x8(%ebp),%eax 80100d09: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80100d10: 00 80100d11: 89 44 24 04 mov %eax,0x4(%esp) 80100d15: 89 f8 mov %edi,%eax 80100d17: 83 c0 6c add $0x6c,%eax 80100d1a: 89 04 24 mov %eax,(%esp) 80100d1d: e8 ae 37 00 00 call 801044d0 <safestrcpy> sz = PGROUNDUP(sz); 80100d22: 8b 85 e8 fe ff ff mov -0x118(%ebp),%eax curproc->pgdir = pgdir; 80100d28: 8b 95 f0 fe ff ff mov -0x110(%ebp),%edx oldpgdir = curproc->pgdir; 80100d2e: 8b 77 04 mov 0x4(%edi),%esi curproc->userStackTop = sp; //lab3 80100d31: 89 5f 7c mov %ebx,0x7c(%edi) sz = PGROUNDUP(sz); 80100d34: 05 ff 0f 00 00 add $0xfff,%eax 80100d39: 25 00 f0 ff ff and $0xfffff000,%eax 80100d3e: 89 07 mov %eax,(%edi) curproc->tf->eip = elf.entry; // main 80100d40: 8b 47 18 mov 0x18(%edi),%eax curproc->pgdir = pgdir; 80100d43: 89 57 04 mov %edx,0x4(%edi) curproc->tf->eip = elf.entry; // main 80100d46: 8b 95 3c ff ff ff mov -0xc4(%ebp),%edx 80100d4c: 89 50 38 mov %edx,0x38(%eax) curproc->tf->esp = sp; 80100d4f: 8b 47 18 mov 0x18(%edi),%eax 80100d52: 89 58 44 mov %ebx,0x44(%eax) switchuvm(curproc); 80100d55: 89 3c 24 mov %edi,(%esp) 80100d58: e8 33 59 00 00 call 80106690 <switchuvm> freevm(oldpgdir); 80100d5d: 89 34 24 mov %esi,(%esp) 80100d60: e8 ab 5c 00 00 call 80106a10 <freevm> return 0; 80100d65: 31 c0 xor %eax,%eax 80100d67: e9 a6 fc ff ff jmp 80100a12 <exec+0x72> sp = newSize; 80100d6c: bb fc ff ff 7f mov $0x7ffffffc,%ebx for(argc = 0; argv[argc]; argc++) { 80100d71: 31 f6 xor %esi,%esi 80100d73: 8d 8d 58 ff ff ff lea -0xa8(%ebp),%ecx 80100d79: e9 0c ff ff ff jmp 80100c8a <exec+0x2ea> 80100d7e: 66 90 xchg %ax,%ax 80100d80 <fileinit>: struct file file[NFILE]; } ftable; void fileinit(void) { 80100d80: 55 push %ebp 80100d81: 89 e5 mov %esp,%ebp 80100d83: 83 ec 18 sub $0x18,%esp initlock(&ftable.lock, "ftable"); 80100d86: c7 44 24 04 0d 6f 10 movl $0x80106f0d,0x4(%esp) 80100d8d: 80 80100d8e: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100d95: e8 26 33 00 00 call 801040c0 <initlock> } 80100d9a: c9 leave 80100d9b: c3 ret 80100d9c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100da0 <filealloc>: // Allocate a file structure. struct file* filealloc(void) { 80100da0: 55 push %ebp 80100da1: 89 e5 mov %esp,%ebp 80100da3: 53 push %ebx struct file *f; acquire(&ftable.lock); for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100da4: bb f4 ff 10 80 mov $0x8010fff4,%ebx { 80100da9: 83 ec 14 sub $0x14,%esp acquire(&ftable.lock); 80100dac: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100db3: e8 f8 33 00 00 call 801041b0 <acquire> 80100db8: eb 11 jmp 80100dcb <filealloc+0x2b> 80100dba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100dc0: 83 c3 18 add $0x18,%ebx 80100dc3: 81 fb 54 09 11 80 cmp $0x80110954,%ebx 80100dc9: 74 25 je 80100df0 <filealloc+0x50> if(f->ref == 0){ 80100dcb: 8b 43 04 mov 0x4(%ebx),%eax 80100dce: 85 c0 test %eax,%eax 80100dd0: 75 ee jne 80100dc0 <filealloc+0x20> f->ref = 1; release(&ftable.lock); 80100dd2: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) f->ref = 1; 80100dd9: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) release(&ftable.lock); 80100de0: e8 bb 34 00 00 call 801042a0 <release> return f; } } release(&ftable.lock); return 0; } 80100de5: 83 c4 14 add $0x14,%esp return f; 80100de8: 89 d8 mov %ebx,%eax } 80100dea: 5b pop %ebx 80100deb: 5d pop %ebp 80100dec: c3 ret 80100ded: 8d 76 00 lea 0x0(%esi),%esi release(&ftable.lock); 80100df0: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100df7: e8 a4 34 00 00 call 801042a0 <release> } 80100dfc: 83 c4 14 add $0x14,%esp return 0; 80100dff: 31 c0 xor %eax,%eax } 80100e01: 5b pop %ebx 80100e02: 5d pop %ebp 80100e03: c3 ret 80100e04: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100e0a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80100e10 <filedup>: // Increment ref count for file f. struct file* filedup(struct file *f) { 80100e10: 55 push %ebp 80100e11: 89 e5 mov %esp,%ebp 80100e13: 53 push %ebx 80100e14: 83 ec 14 sub $0x14,%esp 80100e17: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&ftable.lock); 80100e1a: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100e21: e8 8a 33 00 00 call 801041b0 <acquire> if(f->ref < 1) 80100e26: 8b 43 04 mov 0x4(%ebx),%eax 80100e29: 85 c0 test %eax,%eax 80100e2b: 7e 1a jle 80100e47 <filedup+0x37> panic("filedup"); f->ref++; 80100e2d: 83 c0 01 add $0x1,%eax 80100e30: 89 43 04 mov %eax,0x4(%ebx) release(&ftable.lock); 80100e33: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100e3a: e8 61 34 00 00 call 801042a0 <release> return f; } 80100e3f: 83 c4 14 add $0x14,%esp 80100e42: 89 d8 mov %ebx,%eax 80100e44: 5b pop %ebx 80100e45: 5d pop %ebp 80100e46: c3 ret panic("filedup"); 80100e47: c7 04 24 14 6f 10 80 movl $0x80106f14,(%esp) 80100e4e: e8 0d f5 ff ff call 80100360 <panic> 80100e53: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100e59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80100e60 <fileclose>: // Close file f. (Decrement ref count, close when reaches 0.) void fileclose(struct file *f) { 80100e60: 55 push %ebp 80100e61: 89 e5 mov %esp,%ebp 80100e63: 57 push %edi 80100e64: 56 push %esi 80100e65: 53 push %ebx 80100e66: 83 ec 1c sub $0x1c,%esp 80100e69: 8b 7d 08 mov 0x8(%ebp),%edi struct file ff; acquire(&ftable.lock); 80100e6c: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100e73: e8 38 33 00 00 call 801041b0 <acquire> if(f->ref < 1) 80100e78: 8b 57 04 mov 0x4(%edi),%edx 80100e7b: 85 d2 test %edx,%edx 80100e7d: 0f 8e 89 00 00 00 jle 80100f0c <fileclose+0xac> panic("fileclose"); if(--f->ref > 0){ 80100e83: 83 ea 01 sub $0x1,%edx 80100e86: 85 d2 test %edx,%edx 80100e88: 89 57 04 mov %edx,0x4(%edi) 80100e8b: 74 13 je 80100ea0 <fileclose+0x40> release(&ftable.lock); 80100e8d: c7 45 08 c0 ff 10 80 movl $0x8010ffc0,0x8(%ebp) else if(ff.type == FD_INODE){ begin_op(); iput(ff.ip); end_op(); } } 80100e94: 83 c4 1c add $0x1c,%esp 80100e97: 5b pop %ebx 80100e98: 5e pop %esi 80100e99: 5f pop %edi 80100e9a: 5d pop %ebp release(&ftable.lock); 80100e9b: e9 00 34 00 00 jmp 801042a0 <release> ff = *f; 80100ea0: 0f b6 47 09 movzbl 0x9(%edi),%eax 80100ea4: 8b 37 mov (%edi),%esi 80100ea6: 8b 5f 0c mov 0xc(%edi),%ebx f->type = FD_NONE; 80100ea9: c7 07 00 00 00 00 movl $0x0,(%edi) ff = *f; 80100eaf: 88 45 e7 mov %al,-0x19(%ebp) 80100eb2: 8b 47 10 mov 0x10(%edi),%eax release(&ftable.lock); 80100eb5: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) ff = *f; 80100ebc: 89 45 e0 mov %eax,-0x20(%ebp) release(&ftable.lock); 80100ebf: e8 dc 33 00 00 call 801042a0 <release> if(ff.type == FD_PIPE) 80100ec4: 83 fe 01 cmp $0x1,%esi 80100ec7: 74 0f je 80100ed8 <fileclose+0x78> else if(ff.type == FD_INODE){ 80100ec9: 83 fe 02 cmp $0x2,%esi 80100ecc: 74 22 je 80100ef0 <fileclose+0x90> } 80100ece: 83 c4 1c add $0x1c,%esp 80100ed1: 5b pop %ebx 80100ed2: 5e pop %esi 80100ed3: 5f pop %edi 80100ed4: 5d pop %ebp 80100ed5: c3 ret 80100ed6: 66 90 xchg %ax,%ax pipeclose(ff.pipe, ff.writable); 80100ed8: 0f be 75 e7 movsbl -0x19(%ebp),%esi 80100edc: 89 1c 24 mov %ebx,(%esp) 80100edf: 89 74 24 04 mov %esi,0x4(%esp) 80100ee3: e8 b8 23 00 00 call 801032a0 <pipeclose> 80100ee8: eb e4 jmp 80100ece <fileclose+0x6e> 80100eea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi begin_op(); 80100ef0: e8 5b 1c 00 00 call 80102b50 <begin_op> iput(ff.ip); 80100ef5: 8b 45 e0 mov -0x20(%ebp),%eax 80100ef8: 89 04 24 mov %eax,(%esp) 80100efb: e8 10 09 00 00 call 80101810 <iput> } 80100f00: 83 c4 1c add $0x1c,%esp 80100f03: 5b pop %ebx 80100f04: 5e pop %esi 80100f05: 5f pop %edi 80100f06: 5d pop %ebp end_op(); 80100f07: e9 b4 1c 00 00 jmp 80102bc0 <end_op> panic("fileclose"); 80100f0c: c7 04 24 1c 6f 10 80 movl $0x80106f1c,(%esp) 80100f13: e8 48 f4 ff ff call 80100360 <panic> 80100f18: 90 nop 80100f19: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80100f20 <filestat>: // Get metadata about file f. int filestat(struct file *f, struct stat *st) { 80100f20: 55 push %ebp 80100f21: 89 e5 mov %esp,%ebp 80100f23: 53 push %ebx 80100f24: 83 ec 14 sub $0x14,%esp 80100f27: 8b 5d 08 mov 0x8(%ebp),%ebx if(f->type == FD_INODE){ 80100f2a: 83 3b 02 cmpl $0x2,(%ebx) 80100f2d: 75 31 jne 80100f60 <filestat+0x40> ilock(f->ip); 80100f2f: 8b 43 10 mov 0x10(%ebx),%eax 80100f32: 89 04 24 mov %eax,(%esp) 80100f35: e8 b6 07 00 00 call 801016f0 <ilock> stati(f->ip, st); 80100f3a: 8b 45 0c mov 0xc(%ebp),%eax 80100f3d: 89 44 24 04 mov %eax,0x4(%esp) 80100f41: 8b 43 10 mov 0x10(%ebx),%eax 80100f44: 89 04 24 mov %eax,(%esp) 80100f47: e8 24 0a 00 00 call 80101970 <stati> iunlock(f->ip); 80100f4c: 8b 43 10 mov 0x10(%ebx),%eax 80100f4f: 89 04 24 mov %eax,(%esp) 80100f52: e8 79 08 00 00 call 801017d0 <iunlock> return 0; } return -1; } 80100f57: 83 c4 14 add $0x14,%esp return 0; 80100f5a: 31 c0 xor %eax,%eax } 80100f5c: 5b pop %ebx 80100f5d: 5d pop %ebp 80100f5e: c3 ret 80100f5f: 90 nop 80100f60: 83 c4 14 add $0x14,%esp return -1; 80100f63: b8 ff ff ff ff mov $0xffffffff,%eax } 80100f68: 5b pop %ebx 80100f69: 5d pop %ebp 80100f6a: c3 ret 80100f6b: 90 nop 80100f6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100f70 <fileread>: // Read from file f. int fileread(struct file *f, char *addr, int n) { 80100f70: 55 push %ebp 80100f71: 89 e5 mov %esp,%ebp 80100f73: 57 push %edi 80100f74: 56 push %esi 80100f75: 53 push %ebx 80100f76: 83 ec 1c sub $0x1c,%esp 80100f79: 8b 5d 08 mov 0x8(%ebp),%ebx 80100f7c: 8b 75 0c mov 0xc(%ebp),%esi 80100f7f: 8b 7d 10 mov 0x10(%ebp),%edi int r; if(f->readable == 0) 80100f82: 80 7b 08 00 cmpb $0x0,0x8(%ebx) 80100f86: 74 68 je 80100ff0 <fileread+0x80> return -1; if(f->type == FD_PIPE) 80100f88: 8b 03 mov (%ebx),%eax 80100f8a: 83 f8 01 cmp $0x1,%eax 80100f8d: 74 49 je 80100fd8 <fileread+0x68> return piperead(f->pipe, addr, n); if(f->type == FD_INODE){ 80100f8f: 83 f8 02 cmp $0x2,%eax 80100f92: 75 63 jne 80100ff7 <fileread+0x87> ilock(f->ip); 80100f94: 8b 43 10 mov 0x10(%ebx),%eax 80100f97: 89 04 24 mov %eax,(%esp) 80100f9a: e8 51 07 00 00 call 801016f0 <ilock> if((r = readi(f->ip, addr, f->off, n)) > 0) 80100f9f: 89 7c 24 0c mov %edi,0xc(%esp) 80100fa3: 8b 43 14 mov 0x14(%ebx),%eax 80100fa6: 89 74 24 04 mov %esi,0x4(%esp) 80100faa: 89 44 24 08 mov %eax,0x8(%esp) 80100fae: 8b 43 10 mov 0x10(%ebx),%eax 80100fb1: 89 04 24 mov %eax,(%esp) 80100fb4: e8 e7 09 00 00 call 801019a0 <readi> 80100fb9: 85 c0 test %eax,%eax 80100fbb: 89 c6 mov %eax,%esi 80100fbd: 7e 03 jle 80100fc2 <fileread+0x52> f->off += r; 80100fbf: 01 43 14 add %eax,0x14(%ebx) iunlock(f->ip); 80100fc2: 8b 43 10 mov 0x10(%ebx),%eax 80100fc5: 89 04 24 mov %eax,(%esp) 80100fc8: e8 03 08 00 00 call 801017d0 <iunlock> if((r = readi(f->ip, addr, f->off, n)) > 0) 80100fcd: 89 f0 mov %esi,%eax return r; } panic("fileread"); } 80100fcf: 83 c4 1c add $0x1c,%esp 80100fd2: 5b pop %ebx 80100fd3: 5e pop %esi 80100fd4: 5f pop %edi 80100fd5: 5d pop %ebp 80100fd6: c3 ret 80100fd7: 90 nop return piperead(f->pipe, addr, n); 80100fd8: 8b 43 0c mov 0xc(%ebx),%eax 80100fdb: 89 45 08 mov %eax,0x8(%ebp) } 80100fde: 83 c4 1c add $0x1c,%esp 80100fe1: 5b pop %ebx 80100fe2: 5e pop %esi 80100fe3: 5f pop %edi 80100fe4: 5d pop %ebp return piperead(f->pipe, addr, n); 80100fe5: e9 36 24 00 00 jmp 80103420 <piperead> 80100fea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 80100ff0: b8 ff ff ff ff mov $0xffffffff,%eax 80100ff5: eb d8 jmp 80100fcf <fileread+0x5f> panic("fileread"); 80100ff7: c7 04 24 26 6f 10 80 movl $0x80106f26,(%esp) 80100ffe: e8 5d f3 ff ff call 80100360 <panic> 80101003: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101009: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101010 <filewrite>: //PAGEBREAK! // Write to file f. int filewrite(struct file *f, char *addr, int n) { 80101010: 55 push %ebp 80101011: 89 e5 mov %esp,%ebp 80101013: 57 push %edi 80101014: 56 push %esi 80101015: 53 push %ebx 80101016: 83 ec 2c sub $0x2c,%esp 80101019: 8b 45 0c mov 0xc(%ebp),%eax 8010101c: 8b 7d 08 mov 0x8(%ebp),%edi 8010101f: 89 45 dc mov %eax,-0x24(%ebp) 80101022: 8b 45 10 mov 0x10(%ebp),%eax int r; if(f->writable == 0) 80101025: 80 7f 09 00 cmpb $0x0,0x9(%edi) { 80101029: 89 45 e4 mov %eax,-0x1c(%ebp) if(f->writable == 0) 8010102c: 0f 84 ae 00 00 00 je 801010e0 <filewrite+0xd0> return -1; if(f->type == FD_PIPE) 80101032: 8b 07 mov (%edi),%eax 80101034: 83 f8 01 cmp $0x1,%eax 80101037: 0f 84 c2 00 00 00 je 801010ff <filewrite+0xef> return pipewrite(f->pipe, addr, n); if(f->type == FD_INODE){ 8010103d: 83 f8 02 cmp $0x2,%eax 80101040: 0f 85 d7 00 00 00 jne 8010111d <filewrite+0x10d> // 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){ 80101046: 8b 45 e4 mov -0x1c(%ebp),%eax 80101049: 31 db xor %ebx,%ebx 8010104b: 85 c0 test %eax,%eax 8010104d: 7f 31 jg 80101080 <filewrite+0x70> 8010104f: e9 9c 00 00 00 jmp 801010f0 <filewrite+0xe0> 80101054: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi begin_op(); ilock(f->ip); if ((r = writei(f->ip, addr + i, f->off, n1)) > 0) f->off += r; iunlock(f->ip); 80101058: 8b 4f 10 mov 0x10(%edi),%ecx f->off += r; 8010105b: 01 47 14 add %eax,0x14(%edi) 8010105e: 89 45 e0 mov %eax,-0x20(%ebp) iunlock(f->ip); 80101061: 89 0c 24 mov %ecx,(%esp) 80101064: e8 67 07 00 00 call 801017d0 <iunlock> end_op(); 80101069: e8 52 1b 00 00 call 80102bc0 <end_op> 8010106e: 8b 45 e0 mov -0x20(%ebp),%eax if(r < 0) break; if(r != n1) 80101071: 39 f0 cmp %esi,%eax 80101073: 0f 85 98 00 00 00 jne 80101111 <filewrite+0x101> panic("short filewrite"); i += r; 80101079: 01 c3 add %eax,%ebx while(i < n){ 8010107b: 39 5d e4 cmp %ebx,-0x1c(%ebp) 8010107e: 7e 70 jle 801010f0 <filewrite+0xe0> int n1 = n - i; 80101080: 8b 75 e4 mov -0x1c(%ebp),%esi 80101083: b8 00 1a 00 00 mov $0x1a00,%eax 80101088: 29 de sub %ebx,%esi 8010108a: 81 fe 00 1a 00 00 cmp $0x1a00,%esi 80101090: 0f 4f f0 cmovg %eax,%esi begin_op(); 80101093: e8 b8 1a 00 00 call 80102b50 <begin_op> ilock(f->ip); 80101098: 8b 47 10 mov 0x10(%edi),%eax 8010109b: 89 04 24 mov %eax,(%esp) 8010109e: e8 4d 06 00 00 call 801016f0 <ilock> if ((r = writei(f->ip, addr + i, f->off, n1)) > 0) 801010a3: 89 74 24 0c mov %esi,0xc(%esp) 801010a7: 8b 47 14 mov 0x14(%edi),%eax 801010aa: 89 44 24 08 mov %eax,0x8(%esp) 801010ae: 8b 45 dc mov -0x24(%ebp),%eax 801010b1: 01 d8 add %ebx,%eax 801010b3: 89 44 24 04 mov %eax,0x4(%esp) 801010b7: 8b 47 10 mov 0x10(%edi),%eax 801010ba: 89 04 24 mov %eax,(%esp) 801010bd: e8 de 09 00 00 call 80101aa0 <writei> 801010c2: 85 c0 test %eax,%eax 801010c4: 7f 92 jg 80101058 <filewrite+0x48> iunlock(f->ip); 801010c6: 8b 4f 10 mov 0x10(%edi),%ecx 801010c9: 89 45 e0 mov %eax,-0x20(%ebp) 801010cc: 89 0c 24 mov %ecx,(%esp) 801010cf: e8 fc 06 00 00 call 801017d0 <iunlock> end_op(); 801010d4: e8 e7 1a 00 00 call 80102bc0 <end_op> if(r < 0) 801010d9: 8b 45 e0 mov -0x20(%ebp),%eax 801010dc: 85 c0 test %eax,%eax 801010de: 74 91 je 80101071 <filewrite+0x61> } return i == n ? n : -1; } panic("filewrite"); } 801010e0: 83 c4 2c add $0x2c,%esp return -1; 801010e3: b8 ff ff ff ff mov $0xffffffff,%eax } 801010e8: 5b pop %ebx 801010e9: 5e pop %esi 801010ea: 5f pop %edi 801010eb: 5d pop %ebp 801010ec: c3 ret 801010ed: 8d 76 00 lea 0x0(%esi),%esi return i == n ? n : -1; 801010f0: 3b 5d e4 cmp -0x1c(%ebp),%ebx 801010f3: 89 d8 mov %ebx,%eax 801010f5: 75 e9 jne 801010e0 <filewrite+0xd0> } 801010f7: 83 c4 2c add $0x2c,%esp 801010fa: 5b pop %ebx 801010fb: 5e pop %esi 801010fc: 5f pop %edi 801010fd: 5d pop %ebp 801010fe: c3 ret return pipewrite(f->pipe, addr, n); 801010ff: 8b 47 0c mov 0xc(%edi),%eax 80101102: 89 45 08 mov %eax,0x8(%ebp) } 80101105: 83 c4 2c add $0x2c,%esp 80101108: 5b pop %ebx 80101109: 5e pop %esi 8010110a: 5f pop %edi 8010110b: 5d pop %ebp return pipewrite(f->pipe, addr, n); 8010110c: e9 1f 22 00 00 jmp 80103330 <pipewrite> panic("short filewrite"); 80101111: c7 04 24 2f 6f 10 80 movl $0x80106f2f,(%esp) 80101118: e8 43 f2 ff ff call 80100360 <panic> panic("filewrite"); 8010111d: c7 04 24 35 6f 10 80 movl $0x80106f35,(%esp) 80101124: e8 37 f2 ff ff call 80100360 <panic> 80101129: 66 90 xchg %ax,%ax 8010112b: 66 90 xchg %ax,%ax 8010112d: 66 90 xchg %ax,%ax 8010112f: 90 nop 80101130 <balloc>: // Blocks. // Allocate a zeroed disk block. static uint balloc(uint dev) { 80101130: 55 push %ebp 80101131: 89 e5 mov %esp,%ebp 80101133: 57 push %edi 80101134: 56 push %esi 80101135: 53 push %ebx 80101136: 83 ec 2c sub $0x2c,%esp 80101139: 89 45 d8 mov %eax,-0x28(%ebp) int b, bi, m; struct buf *bp; bp = 0; for(b = 0; b < sb.size; b += BPB){ 8010113c: a1 c0 09 11 80 mov 0x801109c0,%eax 80101141: 85 c0 test %eax,%eax 80101143: 0f 84 8c 00 00 00 je 801011d5 <balloc+0xa5> 80101149: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) bp = bread(dev, BBLOCK(b, sb)); 80101150: 8b 75 dc mov -0x24(%ebp),%esi 80101153: 89 f0 mov %esi,%eax 80101155: c1 f8 0c sar $0xc,%eax 80101158: 03 05 d8 09 11 80 add 0x801109d8,%eax 8010115e: 89 44 24 04 mov %eax,0x4(%esp) 80101162: 8b 45 d8 mov -0x28(%ebp),%eax 80101165: 89 04 24 mov %eax,(%esp) 80101168: e8 63 ef ff ff call 801000d0 <bread> 8010116d: 89 45 e4 mov %eax,-0x1c(%ebp) 80101170: a1 c0 09 11 80 mov 0x801109c0,%eax 80101175: 89 45 e0 mov %eax,-0x20(%ebp) for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 80101178: 31 c0 xor %eax,%eax 8010117a: eb 33 jmp 801011af <balloc+0x7f> 8010117c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi m = 1 << (bi % 8); if((bp->data[bi/8] & m) == 0){ // Is block free? 80101180: 8b 5d e4 mov -0x1c(%ebp),%ebx 80101183: 89 c2 mov %eax,%edx m = 1 << (bi % 8); 80101185: 89 c1 mov %eax,%ecx if((bp->data[bi/8] & m) == 0){ // Is block free? 80101187: c1 fa 03 sar $0x3,%edx m = 1 << (bi % 8); 8010118a: 83 e1 07 and $0x7,%ecx 8010118d: bf 01 00 00 00 mov $0x1,%edi 80101192: d3 e7 shl %cl,%edi if((bp->data[bi/8] & m) == 0){ // Is block free? 80101194: 0f b6 5c 13 5c movzbl 0x5c(%ebx,%edx,1),%ebx m = 1 << (bi % 8); 80101199: 89 f9 mov %edi,%ecx if((bp->data[bi/8] & m) == 0){ // Is block free? 8010119b: 0f b6 fb movzbl %bl,%edi 8010119e: 85 cf test %ecx,%edi 801011a0: 74 46 je 801011e8 <balloc+0xb8> for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 801011a2: 83 c0 01 add $0x1,%eax 801011a5: 83 c6 01 add $0x1,%esi 801011a8: 3d 00 10 00 00 cmp $0x1000,%eax 801011ad: 74 05 je 801011b4 <balloc+0x84> 801011af: 3b 75 e0 cmp -0x20(%ebp),%esi 801011b2: 72 cc jb 80101180 <balloc+0x50> brelse(bp); bzero(dev, b + bi); return b + bi; } } brelse(bp); 801011b4: 8b 45 e4 mov -0x1c(%ebp),%eax 801011b7: 89 04 24 mov %eax,(%esp) 801011ba: e8 21 f0 ff ff call 801001e0 <brelse> for(b = 0; b < sb.size; b += BPB){ 801011bf: 81 45 dc 00 10 00 00 addl $0x1000,-0x24(%ebp) 801011c6: 8b 45 dc mov -0x24(%ebp),%eax 801011c9: 3b 05 c0 09 11 80 cmp 0x801109c0,%eax 801011cf: 0f 82 7b ff ff ff jb 80101150 <balloc+0x20> } panic("balloc: out of blocks"); 801011d5: c7 04 24 3f 6f 10 80 movl $0x80106f3f,(%esp) 801011dc: e8 7f f1 ff ff call 80100360 <panic> 801011e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi bp->data[bi/8] |= m; // Mark block in use. 801011e8: 09 d9 or %ebx,%ecx 801011ea: 8b 5d e4 mov -0x1c(%ebp),%ebx 801011ed: 88 4c 13 5c mov %cl,0x5c(%ebx,%edx,1) log_write(bp); 801011f1: 89 1c 24 mov %ebx,(%esp) 801011f4: e8 f7 1a 00 00 call 80102cf0 <log_write> brelse(bp); 801011f9: 89 1c 24 mov %ebx,(%esp) 801011fc: e8 df ef ff ff call 801001e0 <brelse> bp = bread(dev, bno); 80101201: 8b 45 d8 mov -0x28(%ebp),%eax 80101204: 89 74 24 04 mov %esi,0x4(%esp) 80101208: 89 04 24 mov %eax,(%esp) 8010120b: e8 c0 ee ff ff call 801000d0 <bread> memset(bp->data, 0, BSIZE); 80101210: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 80101217: 00 80101218: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010121f: 00 bp = bread(dev, bno); 80101220: 89 c3 mov %eax,%ebx memset(bp->data, 0, BSIZE); 80101222: 8d 40 5c lea 0x5c(%eax),%eax 80101225: 89 04 24 mov %eax,(%esp) 80101228: e8 c3 30 00 00 call 801042f0 <memset> log_write(bp); 8010122d: 89 1c 24 mov %ebx,(%esp) 80101230: e8 bb 1a 00 00 call 80102cf0 <log_write> brelse(bp); 80101235: 89 1c 24 mov %ebx,(%esp) 80101238: e8 a3 ef ff ff call 801001e0 <brelse> } 8010123d: 83 c4 2c add $0x2c,%esp 80101240: 89 f0 mov %esi,%eax 80101242: 5b pop %ebx 80101243: 5e pop %esi 80101244: 5f pop %edi 80101245: 5d pop %ebp 80101246: c3 ret 80101247: 89 f6 mov %esi,%esi 80101249: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101250 <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) { 80101250: 55 push %ebp 80101251: 89 e5 mov %esp,%ebp 80101253: 57 push %edi 80101254: 89 c7 mov %eax,%edi 80101256: 56 push %esi struct inode *ip, *empty; acquire(&icache.lock); // Is the inode already cached? empty = 0; 80101257: 31 f6 xor %esi,%esi { 80101259: 53 push %ebx for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 8010125a: bb 14 0a 11 80 mov $0x80110a14,%ebx { 8010125f: 83 ec 1c sub $0x1c,%esp acquire(&icache.lock); 80101262: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) { 80101269: 89 55 e4 mov %edx,-0x1c(%ebp) acquire(&icache.lock); 8010126c: e8 3f 2f 00 00 call 801041b0 <acquire> for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 80101271: 8b 55 e4 mov -0x1c(%ebp),%edx 80101274: eb 14 jmp 8010128a <iget+0x3a> 80101276: 66 90 xchg %ax,%ax if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){ ip->ref++; release(&icache.lock); return ip; } if(empty == 0 && ip->ref == 0) // Remember empty slot. 80101278: 85 f6 test %esi,%esi 8010127a: 74 3c je 801012b8 <iget+0x68> for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 8010127c: 81 c3 90 00 00 00 add $0x90,%ebx 80101282: 81 fb 34 26 11 80 cmp $0x80112634,%ebx 80101288: 74 46 je 801012d0 <iget+0x80> if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){ 8010128a: 8b 4b 08 mov 0x8(%ebx),%ecx 8010128d: 85 c9 test %ecx,%ecx 8010128f: 7e e7 jle 80101278 <iget+0x28> 80101291: 39 3b cmp %edi,(%ebx) 80101293: 75 e3 jne 80101278 <iget+0x28> 80101295: 39 53 04 cmp %edx,0x4(%ebx) 80101298: 75 de jne 80101278 <iget+0x28> ip->ref++; 8010129a: 83 c1 01 add $0x1,%ecx return ip; 8010129d: 89 de mov %ebx,%esi release(&icache.lock); 8010129f: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) ip->ref++; 801012a6: 89 4b 08 mov %ecx,0x8(%ebx) release(&icache.lock); 801012a9: e8 f2 2f 00 00 call 801042a0 <release> ip->ref = 1; ip->valid = 0; release(&icache.lock); return ip; } 801012ae: 83 c4 1c add $0x1c,%esp 801012b1: 89 f0 mov %esi,%eax 801012b3: 5b pop %ebx 801012b4: 5e pop %esi 801012b5: 5f pop %edi 801012b6: 5d pop %ebp 801012b7: c3 ret 801012b8: 85 c9 test %ecx,%ecx 801012ba: 0f 44 f3 cmove %ebx,%esi for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 801012bd: 81 c3 90 00 00 00 add $0x90,%ebx 801012c3: 81 fb 34 26 11 80 cmp $0x80112634,%ebx 801012c9: 75 bf jne 8010128a <iget+0x3a> 801012cb: 90 nop 801012cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(empty == 0) 801012d0: 85 f6 test %esi,%esi 801012d2: 74 29 je 801012fd <iget+0xad> ip->dev = dev; 801012d4: 89 3e mov %edi,(%esi) ip->inum = inum; 801012d6: 89 56 04 mov %edx,0x4(%esi) ip->ref = 1; 801012d9: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi) ip->valid = 0; 801012e0: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi) release(&icache.lock); 801012e7: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 801012ee: e8 ad 2f 00 00 call 801042a0 <release> } 801012f3: 83 c4 1c add $0x1c,%esp 801012f6: 89 f0 mov %esi,%eax 801012f8: 5b pop %ebx 801012f9: 5e pop %esi 801012fa: 5f pop %edi 801012fb: 5d pop %ebp 801012fc: c3 ret panic("iget: no inodes"); 801012fd: c7 04 24 55 6f 10 80 movl $0x80106f55,(%esp) 80101304: e8 57 f0 ff ff call 80100360 <panic> 80101309: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101310 <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) { 80101310: 55 push %ebp 80101311: 89 e5 mov %esp,%ebp 80101313: 57 push %edi 80101314: 56 push %esi 80101315: 53 push %ebx 80101316: 89 c3 mov %eax,%ebx 80101318: 83 ec 1c sub $0x1c,%esp uint addr, *a; struct buf *bp; if(bn < NDIRECT){ 8010131b: 83 fa 0b cmp $0xb,%edx 8010131e: 77 18 ja 80101338 <bmap+0x28> 80101320: 8d 34 90 lea (%eax,%edx,4),%esi if((addr = ip->addrs[bn]) == 0) 80101323: 8b 46 5c mov 0x5c(%esi),%eax 80101326: 85 c0 test %eax,%eax 80101328: 74 66 je 80101390 <bmap+0x80> brelse(bp); return addr; } panic("bmap: out of range"); } 8010132a: 83 c4 1c add $0x1c,%esp 8010132d: 5b pop %ebx 8010132e: 5e pop %esi 8010132f: 5f pop %edi 80101330: 5d pop %ebp 80101331: c3 ret 80101332: 8d b6 00 00 00 00 lea 0x0(%esi),%esi bn -= NDIRECT; 80101338: 8d 72 f4 lea -0xc(%edx),%esi if(bn < NINDIRECT){ 8010133b: 83 fe 7f cmp $0x7f,%esi 8010133e: 77 77 ja 801013b7 <bmap+0xa7> if((addr = ip->addrs[NDIRECT]) == 0) 80101340: 8b 80 8c 00 00 00 mov 0x8c(%eax),%eax 80101346: 85 c0 test %eax,%eax 80101348: 74 5e je 801013a8 <bmap+0x98> bp = bread(ip->dev, addr); 8010134a: 89 44 24 04 mov %eax,0x4(%esp) 8010134e: 8b 03 mov (%ebx),%eax 80101350: 89 04 24 mov %eax,(%esp) 80101353: e8 78 ed ff ff call 801000d0 <bread> if((addr = a[bn]) == 0){ 80101358: 8d 54 b0 5c lea 0x5c(%eax,%esi,4),%edx bp = bread(ip->dev, addr); 8010135c: 89 c7 mov %eax,%edi if((addr = a[bn]) == 0){ 8010135e: 8b 32 mov (%edx),%esi 80101360: 85 f6 test %esi,%esi 80101362: 75 19 jne 8010137d <bmap+0x6d> a[bn] = addr = balloc(ip->dev); 80101364: 8b 03 mov (%ebx),%eax 80101366: 89 55 e4 mov %edx,-0x1c(%ebp) 80101369: e8 c2 fd ff ff call 80101130 <balloc> 8010136e: 8b 55 e4 mov -0x1c(%ebp),%edx 80101371: 89 02 mov %eax,(%edx) 80101373: 89 c6 mov %eax,%esi log_write(bp); 80101375: 89 3c 24 mov %edi,(%esp) 80101378: e8 73 19 00 00 call 80102cf0 <log_write> brelse(bp); 8010137d: 89 3c 24 mov %edi,(%esp) 80101380: e8 5b ee ff ff call 801001e0 <brelse> } 80101385: 83 c4 1c add $0x1c,%esp brelse(bp); 80101388: 89 f0 mov %esi,%eax } 8010138a: 5b pop %ebx 8010138b: 5e pop %esi 8010138c: 5f pop %edi 8010138d: 5d pop %ebp 8010138e: c3 ret 8010138f: 90 nop ip->addrs[bn] = addr = balloc(ip->dev); 80101390: 8b 03 mov (%ebx),%eax 80101392: e8 99 fd ff ff call 80101130 <balloc> 80101397: 89 46 5c mov %eax,0x5c(%esi) } 8010139a: 83 c4 1c add $0x1c,%esp 8010139d: 5b pop %ebx 8010139e: 5e pop %esi 8010139f: 5f pop %edi 801013a0: 5d pop %ebp 801013a1: c3 ret 801013a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi ip->addrs[NDIRECT] = addr = balloc(ip->dev); 801013a8: 8b 03 mov (%ebx),%eax 801013aa: e8 81 fd ff ff call 80101130 <balloc> 801013af: 89 83 8c 00 00 00 mov %eax,0x8c(%ebx) 801013b5: eb 93 jmp 8010134a <bmap+0x3a> panic("bmap: out of range"); 801013b7: c7 04 24 65 6f 10 80 movl $0x80106f65,(%esp) 801013be: e8 9d ef ff ff call 80100360 <panic> 801013c3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801013c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801013d0 <readsb>: { 801013d0: 55 push %ebp 801013d1: 89 e5 mov %esp,%ebp 801013d3: 56 push %esi 801013d4: 53 push %ebx 801013d5: 83 ec 10 sub $0x10,%esp bp = bread(dev, 1); 801013d8: 8b 45 08 mov 0x8(%ebp),%eax 801013db: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 801013e2: 00 { 801013e3: 8b 75 0c mov 0xc(%ebp),%esi bp = bread(dev, 1); 801013e6: 89 04 24 mov %eax,(%esp) 801013e9: e8 e2 ec ff ff call 801000d0 <bread> memmove(sb, bp->data, sizeof(*sb)); 801013ee: 89 34 24 mov %esi,(%esp) 801013f1: c7 44 24 08 1c 00 00 movl $0x1c,0x8(%esp) 801013f8: 00 bp = bread(dev, 1); 801013f9: 89 c3 mov %eax,%ebx memmove(sb, bp->data, sizeof(*sb)); 801013fb: 8d 40 5c lea 0x5c(%eax),%eax 801013fe: 89 44 24 04 mov %eax,0x4(%esp) 80101402: e8 89 2f 00 00 call 80104390 <memmove> brelse(bp); 80101407: 89 5d 08 mov %ebx,0x8(%ebp) } 8010140a: 83 c4 10 add $0x10,%esp 8010140d: 5b pop %ebx 8010140e: 5e pop %esi 8010140f: 5d pop %ebp brelse(bp); 80101410: e9 cb ed ff ff jmp 801001e0 <brelse> 80101415: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101419: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101420 <bfree>: { 80101420: 55 push %ebp 80101421: 89 e5 mov %esp,%ebp 80101423: 57 push %edi 80101424: 89 d7 mov %edx,%edi 80101426: 56 push %esi 80101427: 53 push %ebx 80101428: 89 c3 mov %eax,%ebx 8010142a: 83 ec 1c sub $0x1c,%esp readsb(dev, &sb); 8010142d: 89 04 24 mov %eax,(%esp) 80101430: c7 44 24 04 c0 09 11 movl $0x801109c0,0x4(%esp) 80101437: 80 80101438: e8 93 ff ff ff call 801013d0 <readsb> bp = bread(dev, BBLOCK(b, sb)); 8010143d: 89 fa mov %edi,%edx 8010143f: c1 ea 0c shr $0xc,%edx 80101442: 03 15 d8 09 11 80 add 0x801109d8,%edx 80101448: 89 1c 24 mov %ebx,(%esp) m = 1 << (bi % 8); 8010144b: bb 01 00 00 00 mov $0x1,%ebx bp = bread(dev, BBLOCK(b, sb)); 80101450: 89 54 24 04 mov %edx,0x4(%esp) 80101454: e8 77 ec ff ff call 801000d0 <bread> m = 1 << (bi % 8); 80101459: 89 f9 mov %edi,%ecx bi = b % BPB; 8010145b: 81 e7 ff 0f 00 00 and $0xfff,%edi 80101461: 89 fa mov %edi,%edx m = 1 << (bi % 8); 80101463: 83 e1 07 and $0x7,%ecx if((bp->data[bi/8] & m) == 0) 80101466: c1 fa 03 sar $0x3,%edx m = 1 << (bi % 8); 80101469: d3 e3 shl %cl,%ebx bp = bread(dev, BBLOCK(b, sb)); 8010146b: 89 c6 mov %eax,%esi if((bp->data[bi/8] & m) == 0) 8010146d: 0f b6 44 10 5c movzbl 0x5c(%eax,%edx,1),%eax 80101472: 0f b6 c8 movzbl %al,%ecx 80101475: 85 d9 test %ebx,%ecx 80101477: 74 20 je 80101499 <bfree+0x79> bp->data[bi/8] &= ~m; 80101479: f7 d3 not %ebx 8010147b: 21 c3 and %eax,%ebx 8010147d: 88 5c 16 5c mov %bl,0x5c(%esi,%edx,1) log_write(bp); 80101481: 89 34 24 mov %esi,(%esp) 80101484: e8 67 18 00 00 call 80102cf0 <log_write> brelse(bp); 80101489: 89 34 24 mov %esi,(%esp) 8010148c: e8 4f ed ff ff call 801001e0 <brelse> } 80101491: 83 c4 1c add $0x1c,%esp 80101494: 5b pop %ebx 80101495: 5e pop %esi 80101496: 5f pop %edi 80101497: 5d pop %ebp 80101498: c3 ret panic("freeing free block"); 80101499: c7 04 24 78 6f 10 80 movl $0x80106f78,(%esp) 801014a0: e8 bb ee ff ff call 80100360 <panic> 801014a5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801014a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801014b0 <iinit>: { 801014b0: 55 push %ebp 801014b1: 89 e5 mov %esp,%ebp 801014b3: 53 push %ebx 801014b4: bb 20 0a 11 80 mov $0x80110a20,%ebx 801014b9: 83 ec 24 sub $0x24,%esp initlock(&icache.lock, "icache"); 801014bc: c7 44 24 04 8b 6f 10 movl $0x80106f8b,0x4(%esp) 801014c3: 80 801014c4: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 801014cb: e8 f0 2b 00 00 call 801040c0 <initlock> initsleeplock(&icache.inode[i].lock, "inode"); 801014d0: 89 1c 24 mov %ebx,(%esp) 801014d3: 81 c3 90 00 00 00 add $0x90,%ebx 801014d9: c7 44 24 04 92 6f 10 movl $0x80106f92,0x4(%esp) 801014e0: 80 801014e1: e8 ca 2a 00 00 call 80103fb0 <initsleeplock> for(i = 0; i < NINODE; i++) { 801014e6: 81 fb 40 26 11 80 cmp $0x80112640,%ebx 801014ec: 75 e2 jne 801014d0 <iinit+0x20> readsb(dev, &sb); 801014ee: 8b 45 08 mov 0x8(%ebp),%eax 801014f1: c7 44 24 04 c0 09 11 movl $0x801109c0,0x4(%esp) 801014f8: 80 801014f9: 89 04 24 mov %eax,(%esp) 801014fc: e8 cf fe ff ff call 801013d0 <readsb> cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d\ 80101501: a1 d8 09 11 80 mov 0x801109d8,%eax 80101506: c7 04 24 f8 6f 10 80 movl $0x80106ff8,(%esp) 8010150d: 89 44 24 1c mov %eax,0x1c(%esp) 80101511: a1 d4 09 11 80 mov 0x801109d4,%eax 80101516: 89 44 24 18 mov %eax,0x18(%esp) 8010151a: a1 d0 09 11 80 mov 0x801109d0,%eax 8010151f: 89 44 24 14 mov %eax,0x14(%esp) 80101523: a1 cc 09 11 80 mov 0x801109cc,%eax 80101528: 89 44 24 10 mov %eax,0x10(%esp) 8010152c: a1 c8 09 11 80 mov 0x801109c8,%eax 80101531: 89 44 24 0c mov %eax,0xc(%esp) 80101535: a1 c4 09 11 80 mov 0x801109c4,%eax 8010153a: 89 44 24 08 mov %eax,0x8(%esp) 8010153e: a1 c0 09 11 80 mov 0x801109c0,%eax 80101543: 89 44 24 04 mov %eax,0x4(%esp) 80101547: e8 04 f1 ff ff call 80100650 <cprintf> } 8010154c: 83 c4 24 add $0x24,%esp 8010154f: 5b pop %ebx 80101550: 5d pop %ebp 80101551: c3 ret 80101552: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101559: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101560 <ialloc>: { 80101560: 55 push %ebp 80101561: 89 e5 mov %esp,%ebp 80101563: 57 push %edi 80101564: 56 push %esi 80101565: 53 push %ebx 80101566: 83 ec 2c sub $0x2c,%esp 80101569: 8b 45 0c mov 0xc(%ebp),%eax for(inum = 1; inum < sb.ninodes; inum++){ 8010156c: 83 3d c8 09 11 80 01 cmpl $0x1,0x801109c8 { 80101573: 8b 7d 08 mov 0x8(%ebp),%edi 80101576: 89 45 e4 mov %eax,-0x1c(%ebp) for(inum = 1; inum < sb.ninodes; inum++){ 80101579: 0f 86 a2 00 00 00 jbe 80101621 <ialloc+0xc1> 8010157f: be 01 00 00 00 mov $0x1,%esi 80101584: bb 01 00 00 00 mov $0x1,%ebx 80101589: eb 1a jmp 801015a5 <ialloc+0x45> 8010158b: 90 nop 8010158c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi brelse(bp); 80101590: 89 14 24 mov %edx,(%esp) for(inum = 1; inum < sb.ninodes; inum++){ 80101593: 83 c3 01 add $0x1,%ebx brelse(bp); 80101596: e8 45 ec ff ff call 801001e0 <brelse> for(inum = 1; inum < sb.ninodes; inum++){ 8010159b: 89 de mov %ebx,%esi 8010159d: 3b 1d c8 09 11 80 cmp 0x801109c8,%ebx 801015a3: 73 7c jae 80101621 <ialloc+0xc1> bp = bread(dev, IBLOCK(inum, sb)); 801015a5: 89 f0 mov %esi,%eax 801015a7: c1 e8 03 shr $0x3,%eax 801015aa: 03 05 d4 09 11 80 add 0x801109d4,%eax 801015b0: 89 3c 24 mov %edi,(%esp) 801015b3: 89 44 24 04 mov %eax,0x4(%esp) 801015b7: e8 14 eb ff ff call 801000d0 <bread> 801015bc: 89 c2 mov %eax,%edx dip = (struct dinode*)bp->data + inum%IPB; 801015be: 89 f0 mov %esi,%eax 801015c0: 83 e0 07 and $0x7,%eax 801015c3: c1 e0 06 shl $0x6,%eax 801015c6: 8d 4c 02 5c lea 0x5c(%edx,%eax,1),%ecx if(dip->type == 0){ // a free inode 801015ca: 66 83 39 00 cmpw $0x0,(%ecx) 801015ce: 75 c0 jne 80101590 <ialloc+0x30> memset(dip, 0, sizeof(*dip)); 801015d0: 89 0c 24 mov %ecx,(%esp) 801015d3: c7 44 24 08 40 00 00 movl $0x40,0x8(%esp) 801015da: 00 801015db: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801015e2: 00 801015e3: 89 55 dc mov %edx,-0x24(%ebp) 801015e6: 89 4d e0 mov %ecx,-0x20(%ebp) 801015e9: e8 02 2d 00 00 call 801042f0 <memset> dip->type = type; 801015ee: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax log_write(bp); // mark it allocated on the disk 801015f2: 8b 55 dc mov -0x24(%ebp),%edx dip->type = type; 801015f5: 8b 4d e0 mov -0x20(%ebp),%ecx log_write(bp); // mark it allocated on the disk 801015f8: 89 55 e4 mov %edx,-0x1c(%ebp) dip->type = type; 801015fb: 66 89 01 mov %ax,(%ecx) log_write(bp); // mark it allocated on the disk 801015fe: 89 14 24 mov %edx,(%esp) 80101601: e8 ea 16 00 00 call 80102cf0 <log_write> brelse(bp); 80101606: 8b 55 e4 mov -0x1c(%ebp),%edx 80101609: 89 14 24 mov %edx,(%esp) 8010160c: e8 cf eb ff ff call 801001e0 <brelse> } 80101611: 83 c4 2c add $0x2c,%esp return iget(dev, inum); 80101614: 89 f2 mov %esi,%edx } 80101616: 5b pop %ebx return iget(dev, inum); 80101617: 89 f8 mov %edi,%eax } 80101619: 5e pop %esi 8010161a: 5f pop %edi 8010161b: 5d pop %ebp return iget(dev, inum); 8010161c: e9 2f fc ff ff jmp 80101250 <iget> panic("ialloc: no inodes"); 80101621: c7 04 24 98 6f 10 80 movl $0x80106f98,(%esp) 80101628: e8 33 ed ff ff call 80100360 <panic> 8010162d: 8d 76 00 lea 0x0(%esi),%esi 80101630 <iupdate>: { 80101630: 55 push %ebp 80101631: 89 e5 mov %esp,%ebp 80101633: 56 push %esi 80101634: 53 push %ebx 80101635: 83 ec 10 sub $0x10,%esp 80101638: 8b 5d 08 mov 0x8(%ebp),%ebx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 8010163b: 8b 43 04 mov 0x4(%ebx),%eax memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 8010163e: 83 c3 5c add $0x5c,%ebx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 80101641: c1 e8 03 shr $0x3,%eax 80101644: 03 05 d4 09 11 80 add 0x801109d4,%eax 8010164a: 89 44 24 04 mov %eax,0x4(%esp) 8010164e: 8b 43 a4 mov -0x5c(%ebx),%eax 80101651: 89 04 24 mov %eax,(%esp) 80101654: e8 77 ea ff ff call 801000d0 <bread> dip = (struct dinode*)bp->data + ip->inum%IPB; 80101659: 8b 53 a8 mov -0x58(%ebx),%edx 8010165c: 83 e2 07 and $0x7,%edx 8010165f: c1 e2 06 shl $0x6,%edx 80101662: 8d 54 10 5c lea 0x5c(%eax,%edx,1),%edx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 80101666: 89 c6 mov %eax,%esi dip->type = ip->type; 80101668: 0f b7 43 f4 movzwl -0xc(%ebx),%eax memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 8010166c: 83 c2 0c add $0xc,%edx dip->type = ip->type; 8010166f: 66 89 42 f4 mov %ax,-0xc(%edx) dip->major = ip->major; 80101673: 0f b7 43 f6 movzwl -0xa(%ebx),%eax 80101677: 66 89 42 f6 mov %ax,-0xa(%edx) dip->minor = ip->minor; 8010167b: 0f b7 43 f8 movzwl -0x8(%ebx),%eax 8010167f: 66 89 42 f8 mov %ax,-0x8(%edx) dip->nlink = ip->nlink; 80101683: 0f b7 43 fa movzwl -0x6(%ebx),%eax 80101687: 66 89 42 fa mov %ax,-0x6(%edx) dip->size = ip->size; 8010168b: 8b 43 fc mov -0x4(%ebx),%eax 8010168e: 89 42 fc mov %eax,-0x4(%edx) memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 80101691: 89 5c 24 04 mov %ebx,0x4(%esp) 80101695: 89 14 24 mov %edx,(%esp) 80101698: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 8010169f: 00 801016a0: e8 eb 2c 00 00 call 80104390 <memmove> log_write(bp); 801016a5: 89 34 24 mov %esi,(%esp) 801016a8: e8 43 16 00 00 call 80102cf0 <log_write> brelse(bp); 801016ad: 89 75 08 mov %esi,0x8(%ebp) } 801016b0: 83 c4 10 add $0x10,%esp 801016b3: 5b pop %ebx 801016b4: 5e pop %esi 801016b5: 5d pop %ebp brelse(bp); 801016b6: e9 25 eb ff ff jmp 801001e0 <brelse> 801016bb: 90 nop 801016bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801016c0 <idup>: { 801016c0: 55 push %ebp 801016c1: 89 e5 mov %esp,%ebp 801016c3: 53 push %ebx 801016c4: 83 ec 14 sub $0x14,%esp 801016c7: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&icache.lock); 801016ca: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 801016d1: e8 da 2a 00 00 call 801041b0 <acquire> ip->ref++; 801016d6: 83 43 08 01 addl $0x1,0x8(%ebx) release(&icache.lock); 801016da: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 801016e1: e8 ba 2b 00 00 call 801042a0 <release> } 801016e6: 83 c4 14 add $0x14,%esp 801016e9: 89 d8 mov %ebx,%eax 801016eb: 5b pop %ebx 801016ec: 5d pop %ebp 801016ed: c3 ret 801016ee: 66 90 xchg %ax,%ax 801016f0 <ilock>: { 801016f0: 55 push %ebp 801016f1: 89 e5 mov %esp,%ebp 801016f3: 56 push %esi 801016f4: 53 push %ebx 801016f5: 83 ec 10 sub $0x10,%esp 801016f8: 8b 5d 08 mov 0x8(%ebp),%ebx if(ip == 0 || ip->ref < 1) 801016fb: 85 db test %ebx,%ebx 801016fd: 0f 84 b3 00 00 00 je 801017b6 <ilock+0xc6> 80101703: 8b 53 08 mov 0x8(%ebx),%edx 80101706: 85 d2 test %edx,%edx 80101708: 0f 8e a8 00 00 00 jle 801017b6 <ilock+0xc6> acquiresleep(&ip->lock); 8010170e: 8d 43 0c lea 0xc(%ebx),%eax 80101711: 89 04 24 mov %eax,(%esp) 80101714: e8 d7 28 00 00 call 80103ff0 <acquiresleep> if(ip->valid == 0){ 80101719: 8b 43 4c mov 0x4c(%ebx),%eax 8010171c: 85 c0 test %eax,%eax 8010171e: 74 08 je 80101728 <ilock+0x38> } 80101720: 83 c4 10 add $0x10,%esp 80101723: 5b pop %ebx 80101724: 5e pop %esi 80101725: 5d pop %ebp 80101726: c3 ret 80101727: 90 nop bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 80101728: 8b 43 04 mov 0x4(%ebx),%eax 8010172b: c1 e8 03 shr $0x3,%eax 8010172e: 03 05 d4 09 11 80 add 0x801109d4,%eax 80101734: 89 44 24 04 mov %eax,0x4(%esp) 80101738: 8b 03 mov (%ebx),%eax 8010173a: 89 04 24 mov %eax,(%esp) 8010173d: e8 8e e9 ff ff call 801000d0 <bread> dip = (struct dinode*)bp->data + ip->inum%IPB; 80101742: 8b 53 04 mov 0x4(%ebx),%edx 80101745: 83 e2 07 and $0x7,%edx 80101748: c1 e2 06 shl $0x6,%edx 8010174b: 8d 54 10 5c lea 0x5c(%eax,%edx,1),%edx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 8010174f: 89 c6 mov %eax,%esi ip->type = dip->type; 80101751: 0f b7 02 movzwl (%edx),%eax memmove(ip->addrs, dip->addrs, sizeof(ip->addrs)); 80101754: 83 c2 0c add $0xc,%edx ip->type = dip->type; 80101757: 66 89 43 50 mov %ax,0x50(%ebx) ip->major = dip->major; 8010175b: 0f b7 42 f6 movzwl -0xa(%edx),%eax 8010175f: 66 89 43 52 mov %ax,0x52(%ebx) ip->minor = dip->minor; 80101763: 0f b7 42 f8 movzwl -0x8(%edx),%eax 80101767: 66 89 43 54 mov %ax,0x54(%ebx) ip->nlink = dip->nlink; 8010176b: 0f b7 42 fa movzwl -0x6(%edx),%eax 8010176f: 66 89 43 56 mov %ax,0x56(%ebx) ip->size = dip->size; 80101773: 8b 42 fc mov -0x4(%edx),%eax 80101776: 89 43 58 mov %eax,0x58(%ebx) memmove(ip->addrs, dip->addrs, sizeof(ip->addrs)); 80101779: 8d 43 5c lea 0x5c(%ebx),%eax 8010177c: 89 54 24 04 mov %edx,0x4(%esp) 80101780: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 80101787: 00 80101788: 89 04 24 mov %eax,(%esp) 8010178b: e8 00 2c 00 00 call 80104390 <memmove> brelse(bp); 80101790: 89 34 24 mov %esi,(%esp) 80101793: e8 48 ea ff ff call 801001e0 <brelse> if(ip->type == 0) 80101798: 66 83 7b 50 00 cmpw $0x0,0x50(%ebx) ip->valid = 1; 8010179d: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx) if(ip->type == 0) 801017a4: 0f 85 76 ff ff ff jne 80101720 <ilock+0x30> panic("ilock: no type"); 801017aa: c7 04 24 b0 6f 10 80 movl $0x80106fb0,(%esp) 801017b1: e8 aa eb ff ff call 80100360 <panic> panic("ilock"); 801017b6: c7 04 24 aa 6f 10 80 movl $0x80106faa,(%esp) 801017bd: e8 9e eb ff ff call 80100360 <panic> 801017c2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801017c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801017d0 <iunlock>: { 801017d0: 55 push %ebp 801017d1: 89 e5 mov %esp,%ebp 801017d3: 56 push %esi 801017d4: 53 push %ebx 801017d5: 83 ec 10 sub $0x10,%esp 801017d8: 8b 5d 08 mov 0x8(%ebp),%ebx if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1) 801017db: 85 db test %ebx,%ebx 801017dd: 74 24 je 80101803 <iunlock+0x33> 801017df: 8d 73 0c lea 0xc(%ebx),%esi 801017e2: 89 34 24 mov %esi,(%esp) 801017e5: e8 a6 28 00 00 call 80104090 <holdingsleep> 801017ea: 85 c0 test %eax,%eax 801017ec: 74 15 je 80101803 <iunlock+0x33> 801017ee: 8b 43 08 mov 0x8(%ebx),%eax 801017f1: 85 c0 test %eax,%eax 801017f3: 7e 0e jle 80101803 <iunlock+0x33> releasesleep(&ip->lock); 801017f5: 89 75 08 mov %esi,0x8(%ebp) } 801017f8: 83 c4 10 add $0x10,%esp 801017fb: 5b pop %ebx 801017fc: 5e pop %esi 801017fd: 5d pop %ebp releasesleep(&ip->lock); 801017fe: e9 4d 28 00 00 jmp 80104050 <releasesleep> panic("iunlock"); 80101803: c7 04 24 bf 6f 10 80 movl $0x80106fbf,(%esp) 8010180a: e8 51 eb ff ff call 80100360 <panic> 8010180f: 90 nop 80101810 <iput>: { 80101810: 55 push %ebp 80101811: 89 e5 mov %esp,%ebp 80101813: 57 push %edi 80101814: 56 push %esi 80101815: 53 push %ebx 80101816: 83 ec 1c sub $0x1c,%esp 80101819: 8b 75 08 mov 0x8(%ebp),%esi acquiresleep(&ip->lock); 8010181c: 8d 7e 0c lea 0xc(%esi),%edi 8010181f: 89 3c 24 mov %edi,(%esp) 80101822: e8 c9 27 00 00 call 80103ff0 <acquiresleep> if(ip->valid && ip->nlink == 0){ 80101827: 8b 56 4c mov 0x4c(%esi),%edx 8010182a: 85 d2 test %edx,%edx 8010182c: 74 07 je 80101835 <iput+0x25> 8010182e: 66 83 7e 56 00 cmpw $0x0,0x56(%esi) 80101833: 74 2b je 80101860 <iput+0x50> releasesleep(&ip->lock); 80101835: 89 3c 24 mov %edi,(%esp) 80101838: e8 13 28 00 00 call 80104050 <releasesleep> acquire(&icache.lock); 8010183d: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101844: e8 67 29 00 00 call 801041b0 <acquire> ip->ref--; 80101849: 83 6e 08 01 subl $0x1,0x8(%esi) release(&icache.lock); 8010184d: c7 45 08 e0 09 11 80 movl $0x801109e0,0x8(%ebp) } 80101854: 83 c4 1c add $0x1c,%esp 80101857: 5b pop %ebx 80101858: 5e pop %esi 80101859: 5f pop %edi 8010185a: 5d pop %ebp release(&icache.lock); 8010185b: e9 40 2a 00 00 jmp 801042a0 <release> acquire(&icache.lock); 80101860: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101867: e8 44 29 00 00 call 801041b0 <acquire> int r = ip->ref; 8010186c: 8b 5e 08 mov 0x8(%esi),%ebx release(&icache.lock); 8010186f: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101876: e8 25 2a 00 00 call 801042a0 <release> if(r == 1){ 8010187b: 83 fb 01 cmp $0x1,%ebx 8010187e: 75 b5 jne 80101835 <iput+0x25> 80101880: 8d 4e 30 lea 0x30(%esi),%ecx 80101883: 89 f3 mov %esi,%ebx 80101885: 89 7d e4 mov %edi,-0x1c(%ebp) 80101888: 89 cf mov %ecx,%edi 8010188a: eb 0b jmp 80101897 <iput+0x87> 8010188c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101890: 83 c3 04 add $0x4,%ebx { int i, j; struct buf *bp; uint *a; for(i = 0; i < NDIRECT; i++){ 80101893: 39 fb cmp %edi,%ebx 80101895: 74 19 je 801018b0 <iput+0xa0> if(ip->addrs[i]){ 80101897: 8b 53 5c mov 0x5c(%ebx),%edx 8010189a: 85 d2 test %edx,%edx 8010189c: 74 f2 je 80101890 <iput+0x80> bfree(ip->dev, ip->addrs[i]); 8010189e: 8b 06 mov (%esi),%eax 801018a0: e8 7b fb ff ff call 80101420 <bfree> ip->addrs[i] = 0; 801018a5: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) 801018ac: eb e2 jmp 80101890 <iput+0x80> 801018ae: 66 90 xchg %ax,%ax } } if(ip->addrs[NDIRECT]){ 801018b0: 8b 86 8c 00 00 00 mov 0x8c(%esi),%eax 801018b6: 8b 7d e4 mov -0x1c(%ebp),%edi 801018b9: 85 c0 test %eax,%eax 801018bb: 75 2b jne 801018e8 <iput+0xd8> brelse(bp); bfree(ip->dev, ip->addrs[NDIRECT]); ip->addrs[NDIRECT] = 0; } ip->size = 0; 801018bd: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) iupdate(ip); 801018c4: 89 34 24 mov %esi,(%esp) 801018c7: e8 64 fd ff ff call 80101630 <iupdate> ip->type = 0; 801018cc: 31 c0 xor %eax,%eax 801018ce: 66 89 46 50 mov %ax,0x50(%esi) iupdate(ip); 801018d2: 89 34 24 mov %esi,(%esp) 801018d5: e8 56 fd ff ff call 80101630 <iupdate> ip->valid = 0; 801018da: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi) 801018e1: e9 4f ff ff ff jmp 80101835 <iput+0x25> 801018e6: 66 90 xchg %ax,%ax bp = bread(ip->dev, ip->addrs[NDIRECT]); 801018e8: 89 44 24 04 mov %eax,0x4(%esp) 801018ec: 8b 06 mov (%esi),%eax for(j = 0; j < NINDIRECT; j++){ 801018ee: 31 db xor %ebx,%ebx bp = bread(ip->dev, ip->addrs[NDIRECT]); 801018f0: 89 04 24 mov %eax,(%esp) 801018f3: e8 d8 e7 ff ff call 801000d0 <bread> for(j = 0; j < NINDIRECT; j++){ 801018f8: 89 7d e0 mov %edi,-0x20(%ebp) a = (uint*)bp->data; 801018fb: 8d 48 5c lea 0x5c(%eax),%ecx bp = bread(ip->dev, ip->addrs[NDIRECT]); 801018fe: 89 45 e4 mov %eax,-0x1c(%ebp) for(j = 0; j < NINDIRECT; j++){ 80101901: 89 cf mov %ecx,%edi 80101903: 31 c0 xor %eax,%eax 80101905: eb 0e jmp 80101915 <iput+0x105> 80101907: 90 nop 80101908: 83 c3 01 add $0x1,%ebx 8010190b: 81 fb 80 00 00 00 cmp $0x80,%ebx 80101911: 89 d8 mov %ebx,%eax 80101913: 74 10 je 80101925 <iput+0x115> if(a[j]) 80101915: 8b 14 87 mov (%edi,%eax,4),%edx 80101918: 85 d2 test %edx,%edx 8010191a: 74 ec je 80101908 <iput+0xf8> bfree(ip->dev, a[j]); 8010191c: 8b 06 mov (%esi),%eax 8010191e: e8 fd fa ff ff call 80101420 <bfree> 80101923: eb e3 jmp 80101908 <iput+0xf8> brelse(bp); 80101925: 8b 45 e4 mov -0x1c(%ebp),%eax 80101928: 8b 7d e0 mov -0x20(%ebp),%edi 8010192b: 89 04 24 mov %eax,(%esp) 8010192e: e8 ad e8 ff ff call 801001e0 <brelse> bfree(ip->dev, ip->addrs[NDIRECT]); 80101933: 8b 96 8c 00 00 00 mov 0x8c(%esi),%edx 80101939: 8b 06 mov (%esi),%eax 8010193b: e8 e0 fa ff ff call 80101420 <bfree> ip->addrs[NDIRECT] = 0; 80101940: c7 86 8c 00 00 00 00 movl $0x0,0x8c(%esi) 80101947: 00 00 00 8010194a: e9 6e ff ff ff jmp 801018bd <iput+0xad> 8010194f: 90 nop 80101950 <iunlockput>: { 80101950: 55 push %ebp 80101951: 89 e5 mov %esp,%ebp 80101953: 53 push %ebx 80101954: 83 ec 14 sub $0x14,%esp 80101957: 8b 5d 08 mov 0x8(%ebp),%ebx iunlock(ip); 8010195a: 89 1c 24 mov %ebx,(%esp) 8010195d: e8 6e fe ff ff call 801017d0 <iunlock> iput(ip); 80101962: 89 5d 08 mov %ebx,0x8(%ebp) } 80101965: 83 c4 14 add $0x14,%esp 80101968: 5b pop %ebx 80101969: 5d pop %ebp iput(ip); 8010196a: e9 a1 fe ff ff jmp 80101810 <iput> 8010196f: 90 nop 80101970 <stati>: // Copy stat information from inode. // Caller must hold ip->lock. void stati(struct inode *ip, struct stat *st) { 80101970: 55 push %ebp 80101971: 89 e5 mov %esp,%ebp 80101973: 8b 55 08 mov 0x8(%ebp),%edx 80101976: 8b 45 0c mov 0xc(%ebp),%eax st->dev = ip->dev; 80101979: 8b 0a mov (%edx),%ecx 8010197b: 89 48 04 mov %ecx,0x4(%eax) st->ino = ip->inum; 8010197e: 8b 4a 04 mov 0x4(%edx),%ecx 80101981: 89 48 08 mov %ecx,0x8(%eax) st->type = ip->type; 80101984: 0f b7 4a 50 movzwl 0x50(%edx),%ecx 80101988: 66 89 08 mov %cx,(%eax) st->nlink = ip->nlink; 8010198b: 0f b7 4a 56 movzwl 0x56(%edx),%ecx 8010198f: 66 89 48 0c mov %cx,0xc(%eax) st->size = ip->size; 80101993: 8b 52 58 mov 0x58(%edx),%edx 80101996: 89 50 10 mov %edx,0x10(%eax) } 80101999: 5d pop %ebp 8010199a: c3 ret 8010199b: 90 nop 8010199c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801019a0 <readi>: //PAGEBREAK! // Read data from inode. // Caller must hold ip->lock. int readi(struct inode *ip, char *dst, uint off, uint n) { 801019a0: 55 push %ebp 801019a1: 89 e5 mov %esp,%ebp 801019a3: 57 push %edi 801019a4: 56 push %esi 801019a5: 53 push %ebx 801019a6: 83 ec 2c sub $0x2c,%esp 801019a9: 8b 45 0c mov 0xc(%ebp),%eax 801019ac: 8b 7d 08 mov 0x8(%ebp),%edi 801019af: 8b 75 10 mov 0x10(%ebp),%esi 801019b2: 89 45 e0 mov %eax,-0x20(%ebp) 801019b5: 8b 45 14 mov 0x14(%ebp),%eax uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 801019b8: 66 83 7f 50 03 cmpw $0x3,0x50(%edi) { 801019bd: 89 45 e4 mov %eax,-0x1c(%ebp) if(ip->type == T_DEV){ 801019c0: 0f 84 aa 00 00 00 je 80101a70 <readi+0xd0> if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read) return -1; return devsw[ip->major].read(ip, dst, n); } if(off > ip->size || off + n < off) 801019c6: 8b 47 58 mov 0x58(%edi),%eax 801019c9: 39 f0 cmp %esi,%eax 801019cb: 0f 82 c7 00 00 00 jb 80101a98 <readi+0xf8> 801019d1: 8b 5d e4 mov -0x1c(%ebp),%ebx 801019d4: 89 da mov %ebx,%edx 801019d6: 01 f2 add %esi,%edx 801019d8: 0f 82 ba 00 00 00 jb 80101a98 <readi+0xf8> return -1; if(off + n > ip->size) n = ip->size - off; 801019de: 89 c1 mov %eax,%ecx 801019e0: 29 f1 sub %esi,%ecx 801019e2: 39 d0 cmp %edx,%eax 801019e4: 0f 43 cb cmovae %ebx,%ecx for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 801019e7: 31 c0 xor %eax,%eax 801019e9: 85 c9 test %ecx,%ecx n = ip->size - off; 801019eb: 89 4d e4 mov %ecx,-0x1c(%ebp) for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 801019ee: 74 70 je 80101a60 <readi+0xc0> 801019f0: 89 7d d8 mov %edi,-0x28(%ebp) 801019f3: 89 c7 mov %eax,%edi 801019f5: 8d 76 00 lea 0x0(%esi),%esi bp = bread(ip->dev, bmap(ip, off/BSIZE)); 801019f8: 8b 5d d8 mov -0x28(%ebp),%ebx 801019fb: 89 f2 mov %esi,%edx 801019fd: c1 ea 09 shr $0x9,%edx 80101a00: 89 d8 mov %ebx,%eax 80101a02: e8 09 f9 ff ff call 80101310 <bmap> 80101a07: 89 44 24 04 mov %eax,0x4(%esp) 80101a0b: 8b 03 mov (%ebx),%eax m = min(n - tot, BSIZE - off%BSIZE); 80101a0d: bb 00 02 00 00 mov $0x200,%ebx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101a12: 89 04 24 mov %eax,(%esp) 80101a15: e8 b6 e6 ff ff call 801000d0 <bread> m = min(n - tot, BSIZE - off%BSIZE); 80101a1a: 8b 4d e4 mov -0x1c(%ebp),%ecx 80101a1d: 29 f9 sub %edi,%ecx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101a1f: 89 c2 mov %eax,%edx m = min(n - tot, BSIZE - off%BSIZE); 80101a21: 89 f0 mov %esi,%eax 80101a23: 25 ff 01 00 00 and $0x1ff,%eax 80101a28: 29 c3 sub %eax,%ebx memmove(dst, bp->data + off%BSIZE, m); 80101a2a: 8d 44 02 5c lea 0x5c(%edx,%eax,1),%eax m = min(n - tot, BSIZE - off%BSIZE); 80101a2e: 39 cb cmp %ecx,%ebx memmove(dst, bp->data + off%BSIZE, m); 80101a30: 89 44 24 04 mov %eax,0x4(%esp) 80101a34: 8b 45 e0 mov -0x20(%ebp),%eax m = min(n - tot, BSIZE - off%BSIZE); 80101a37: 0f 47 d9 cmova %ecx,%ebx memmove(dst, bp->data + off%BSIZE, m); 80101a3a: 89 5c 24 08 mov %ebx,0x8(%esp) for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 80101a3e: 01 df add %ebx,%edi 80101a40: 01 de add %ebx,%esi memmove(dst, bp->data + off%BSIZE, m); 80101a42: 89 55 dc mov %edx,-0x24(%ebp) 80101a45: 89 04 24 mov %eax,(%esp) 80101a48: e8 43 29 00 00 call 80104390 <memmove> brelse(bp); 80101a4d: 8b 55 dc mov -0x24(%ebp),%edx 80101a50: 89 14 24 mov %edx,(%esp) 80101a53: e8 88 e7 ff ff call 801001e0 <brelse> for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 80101a58: 01 5d e0 add %ebx,-0x20(%ebp) 80101a5b: 39 7d e4 cmp %edi,-0x1c(%ebp) 80101a5e: 77 98 ja 801019f8 <readi+0x58> } return n; 80101a60: 8b 45 e4 mov -0x1c(%ebp),%eax } 80101a63: 83 c4 2c add $0x2c,%esp 80101a66: 5b pop %ebx 80101a67: 5e pop %esi 80101a68: 5f pop %edi 80101a69: 5d pop %ebp 80101a6a: c3 ret 80101a6b: 90 nop 80101a6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read) 80101a70: 0f bf 47 52 movswl 0x52(%edi),%eax 80101a74: 66 83 f8 09 cmp $0x9,%ax 80101a78: 77 1e ja 80101a98 <readi+0xf8> 80101a7a: 8b 04 c5 60 09 11 80 mov -0x7feef6a0(,%eax,8),%eax 80101a81: 85 c0 test %eax,%eax 80101a83: 74 13 je 80101a98 <readi+0xf8> return devsw[ip->major].read(ip, dst, n); 80101a85: 8b 75 e4 mov -0x1c(%ebp),%esi 80101a88: 89 75 10 mov %esi,0x10(%ebp) } 80101a8b: 83 c4 2c add $0x2c,%esp 80101a8e: 5b pop %ebx 80101a8f: 5e pop %esi 80101a90: 5f pop %edi 80101a91: 5d pop %ebp return devsw[ip->major].read(ip, dst, n); 80101a92: ff e0 jmp *%eax 80101a94: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80101a98: b8 ff ff ff ff mov $0xffffffff,%eax 80101a9d: eb c4 jmp 80101a63 <readi+0xc3> 80101a9f: 90 nop 80101aa0 <writei>: // PAGEBREAK! // Write data to inode. // Caller must hold ip->lock. int writei(struct inode *ip, char *src, uint off, uint n) { 80101aa0: 55 push %ebp 80101aa1: 89 e5 mov %esp,%ebp 80101aa3: 57 push %edi 80101aa4: 56 push %esi 80101aa5: 53 push %ebx 80101aa6: 83 ec 2c sub $0x2c,%esp 80101aa9: 8b 45 08 mov 0x8(%ebp),%eax 80101aac: 8b 75 0c mov 0xc(%ebp),%esi 80101aaf: 8b 4d 14 mov 0x14(%ebp),%ecx uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 80101ab2: 66 83 78 50 03 cmpw $0x3,0x50(%eax) { 80101ab7: 89 75 dc mov %esi,-0x24(%ebp) 80101aba: 8b 75 10 mov 0x10(%ebp),%esi 80101abd: 89 45 d8 mov %eax,-0x28(%ebp) 80101ac0: 89 4d e0 mov %ecx,-0x20(%ebp) if(ip->type == T_DEV){ 80101ac3: 0f 84 b7 00 00 00 je 80101b80 <writei+0xe0> if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write) return -1; return devsw[ip->major].write(ip, src, n); } if(off > ip->size || off + n < off) 80101ac9: 8b 45 d8 mov -0x28(%ebp),%eax 80101acc: 39 70 58 cmp %esi,0x58(%eax) 80101acf: 0f 82 e3 00 00 00 jb 80101bb8 <writei+0x118> 80101ad5: 8b 4d e0 mov -0x20(%ebp),%ecx 80101ad8: 89 c8 mov %ecx,%eax 80101ada: 01 f0 add %esi,%eax 80101adc: 0f 82 d6 00 00 00 jb 80101bb8 <writei+0x118> return -1; if(off + n > MAXFILE*BSIZE) 80101ae2: 3d 00 18 01 00 cmp $0x11800,%eax 80101ae7: 0f 87 cb 00 00 00 ja 80101bb8 <writei+0x118> return -1; for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101aed: 85 c9 test %ecx,%ecx 80101aef: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 80101af6: 74 77 je 80101b6f <writei+0xcf> bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101af8: 8b 7d d8 mov -0x28(%ebp),%edi 80101afb: 89 f2 mov %esi,%edx m = min(n - tot, BSIZE - off%BSIZE); 80101afd: bb 00 02 00 00 mov $0x200,%ebx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101b02: c1 ea 09 shr $0x9,%edx 80101b05: 89 f8 mov %edi,%eax 80101b07: e8 04 f8 ff ff call 80101310 <bmap> 80101b0c: 89 44 24 04 mov %eax,0x4(%esp) 80101b10: 8b 07 mov (%edi),%eax 80101b12: 89 04 24 mov %eax,(%esp) 80101b15: e8 b6 e5 ff ff call 801000d0 <bread> m = min(n - tot, BSIZE - off%BSIZE); 80101b1a: 8b 4d e0 mov -0x20(%ebp),%ecx 80101b1d: 2b 4d e4 sub -0x1c(%ebp),%ecx memmove(bp->data + off%BSIZE, src, m); 80101b20: 8b 55 dc mov -0x24(%ebp),%edx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101b23: 89 c7 mov %eax,%edi m = min(n - tot, BSIZE - off%BSIZE); 80101b25: 89 f0 mov %esi,%eax 80101b27: 25 ff 01 00 00 and $0x1ff,%eax 80101b2c: 29 c3 sub %eax,%ebx 80101b2e: 39 cb cmp %ecx,%ebx 80101b30: 0f 47 d9 cmova %ecx,%ebx memmove(bp->data + off%BSIZE, src, m); 80101b33: 8d 44 07 5c lea 0x5c(%edi,%eax,1),%eax for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101b37: 01 de add %ebx,%esi memmove(bp->data + off%BSIZE, src, m); 80101b39: 89 54 24 04 mov %edx,0x4(%esp) 80101b3d: 89 5c 24 08 mov %ebx,0x8(%esp) 80101b41: 89 04 24 mov %eax,(%esp) 80101b44: e8 47 28 00 00 call 80104390 <memmove> log_write(bp); 80101b49: 89 3c 24 mov %edi,(%esp) 80101b4c: e8 9f 11 00 00 call 80102cf0 <log_write> brelse(bp); 80101b51: 89 3c 24 mov %edi,(%esp) 80101b54: e8 87 e6 ff ff call 801001e0 <brelse> for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101b59: 01 5d e4 add %ebx,-0x1c(%ebp) 80101b5c: 8b 45 e4 mov -0x1c(%ebp),%eax 80101b5f: 01 5d dc add %ebx,-0x24(%ebp) 80101b62: 39 45 e0 cmp %eax,-0x20(%ebp) 80101b65: 77 91 ja 80101af8 <writei+0x58> } if(n > 0 && off > ip->size){ 80101b67: 8b 45 d8 mov -0x28(%ebp),%eax 80101b6a: 39 70 58 cmp %esi,0x58(%eax) 80101b6d: 72 39 jb 80101ba8 <writei+0x108> ip->size = off; iupdate(ip); } return n; 80101b6f: 8b 45 e0 mov -0x20(%ebp),%eax } 80101b72: 83 c4 2c add $0x2c,%esp 80101b75: 5b pop %ebx 80101b76: 5e pop %esi 80101b77: 5f pop %edi 80101b78: 5d pop %ebp 80101b79: c3 ret 80101b7a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write) 80101b80: 0f bf 40 52 movswl 0x52(%eax),%eax 80101b84: 66 83 f8 09 cmp $0x9,%ax 80101b88: 77 2e ja 80101bb8 <writei+0x118> 80101b8a: 8b 04 c5 64 09 11 80 mov -0x7feef69c(,%eax,8),%eax 80101b91: 85 c0 test %eax,%eax 80101b93: 74 23 je 80101bb8 <writei+0x118> return devsw[ip->major].write(ip, src, n); 80101b95: 89 4d 10 mov %ecx,0x10(%ebp) } 80101b98: 83 c4 2c add $0x2c,%esp 80101b9b: 5b pop %ebx 80101b9c: 5e pop %esi 80101b9d: 5f pop %edi 80101b9e: 5d pop %ebp return devsw[ip->major].write(ip, src, n); 80101b9f: ff e0 jmp *%eax 80101ba1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi ip->size = off; 80101ba8: 8b 45 d8 mov -0x28(%ebp),%eax 80101bab: 89 70 58 mov %esi,0x58(%eax) iupdate(ip); 80101bae: 89 04 24 mov %eax,(%esp) 80101bb1: e8 7a fa ff ff call 80101630 <iupdate> 80101bb6: eb b7 jmp 80101b6f <writei+0xcf> } 80101bb8: 83 c4 2c add $0x2c,%esp return -1; 80101bbb: b8 ff ff ff ff mov $0xffffffff,%eax } 80101bc0: 5b pop %ebx 80101bc1: 5e pop %esi 80101bc2: 5f pop %edi 80101bc3: 5d pop %ebp 80101bc4: c3 ret 80101bc5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101bc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101bd0 <namecmp>: //PAGEBREAK! // Directories int namecmp(const char *s, const char *t) { 80101bd0: 55 push %ebp 80101bd1: 89 e5 mov %esp,%ebp 80101bd3: 83 ec 18 sub $0x18,%esp return strncmp(s, t, DIRSIZ); 80101bd6: 8b 45 0c mov 0xc(%ebp),%eax 80101bd9: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101be0: 00 80101be1: 89 44 24 04 mov %eax,0x4(%esp) 80101be5: 8b 45 08 mov 0x8(%ebp),%eax 80101be8: 89 04 24 mov %eax,(%esp) 80101beb: e8 20 28 00 00 call 80104410 <strncmp> } 80101bf0: c9 leave 80101bf1: c3 ret 80101bf2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101bf9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101c00 <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) { 80101c00: 55 push %ebp 80101c01: 89 e5 mov %esp,%ebp 80101c03: 57 push %edi 80101c04: 56 push %esi 80101c05: 53 push %ebx 80101c06: 83 ec 2c sub $0x2c,%esp 80101c09: 8b 5d 08 mov 0x8(%ebp),%ebx uint off, inum; struct dirent de; if(dp->type != T_DIR) 80101c0c: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80101c11: 0f 85 97 00 00 00 jne 80101cae <dirlookup+0xae> panic("dirlookup not DIR"); for(off = 0; off < dp->size; off += sizeof(de)){ 80101c17: 8b 53 58 mov 0x58(%ebx),%edx 80101c1a: 31 ff xor %edi,%edi 80101c1c: 8d 75 d8 lea -0x28(%ebp),%esi 80101c1f: 85 d2 test %edx,%edx 80101c21: 75 0d jne 80101c30 <dirlookup+0x30> 80101c23: eb 73 jmp 80101c98 <dirlookup+0x98> 80101c25: 8d 76 00 lea 0x0(%esi),%esi 80101c28: 83 c7 10 add $0x10,%edi 80101c2b: 39 7b 58 cmp %edi,0x58(%ebx) 80101c2e: 76 68 jbe 80101c98 <dirlookup+0x98> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101c30: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101c37: 00 80101c38: 89 7c 24 08 mov %edi,0x8(%esp) 80101c3c: 89 74 24 04 mov %esi,0x4(%esp) 80101c40: 89 1c 24 mov %ebx,(%esp) 80101c43: e8 58 fd ff ff call 801019a0 <readi> 80101c48: 83 f8 10 cmp $0x10,%eax 80101c4b: 75 55 jne 80101ca2 <dirlookup+0xa2> panic("dirlookup read"); if(de.inum == 0) 80101c4d: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80101c52: 74 d4 je 80101c28 <dirlookup+0x28> return strncmp(s, t, DIRSIZ); 80101c54: 8d 45 da lea -0x26(%ebp),%eax 80101c57: 89 44 24 04 mov %eax,0x4(%esp) 80101c5b: 8b 45 0c mov 0xc(%ebp),%eax 80101c5e: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101c65: 00 80101c66: 89 04 24 mov %eax,(%esp) 80101c69: e8 a2 27 00 00 call 80104410 <strncmp> continue; if(namecmp(name, de.name) == 0){ 80101c6e: 85 c0 test %eax,%eax 80101c70: 75 b6 jne 80101c28 <dirlookup+0x28> // entry matches path element if(poff) 80101c72: 8b 45 10 mov 0x10(%ebp),%eax 80101c75: 85 c0 test %eax,%eax 80101c77: 74 05 je 80101c7e <dirlookup+0x7e> *poff = off; 80101c79: 8b 45 10 mov 0x10(%ebp),%eax 80101c7c: 89 38 mov %edi,(%eax) inum = de.inum; 80101c7e: 0f b7 55 d8 movzwl -0x28(%ebp),%edx return iget(dp->dev, inum); 80101c82: 8b 03 mov (%ebx),%eax 80101c84: e8 c7 f5 ff ff call 80101250 <iget> } } return 0; } 80101c89: 83 c4 2c add $0x2c,%esp 80101c8c: 5b pop %ebx 80101c8d: 5e pop %esi 80101c8e: 5f pop %edi 80101c8f: 5d pop %ebp 80101c90: c3 ret 80101c91: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101c98: 83 c4 2c add $0x2c,%esp return 0; 80101c9b: 31 c0 xor %eax,%eax } 80101c9d: 5b pop %ebx 80101c9e: 5e pop %esi 80101c9f: 5f pop %edi 80101ca0: 5d pop %ebp 80101ca1: c3 ret panic("dirlookup read"); 80101ca2: c7 04 24 d9 6f 10 80 movl $0x80106fd9,(%esp) 80101ca9: e8 b2 e6 ff ff call 80100360 <panic> panic("dirlookup not DIR"); 80101cae: c7 04 24 c7 6f 10 80 movl $0x80106fc7,(%esp) 80101cb5: e8 a6 e6 ff ff call 80100360 <panic> 80101cba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101cc0 <namex>: // If parent != 0, return the inode for the parent and copy the final // path element into name, which must have room for DIRSIZ bytes. // Must be called inside a transaction since it calls iput(). static struct inode* namex(char *path, int nameiparent, char *name) { 80101cc0: 55 push %ebp 80101cc1: 89 e5 mov %esp,%ebp 80101cc3: 57 push %edi 80101cc4: 89 cf mov %ecx,%edi 80101cc6: 56 push %esi 80101cc7: 53 push %ebx 80101cc8: 89 c3 mov %eax,%ebx 80101cca: 83 ec 2c sub $0x2c,%esp struct inode *ip, *next; if(*path == '/') 80101ccd: 80 38 2f cmpb $0x2f,(%eax) { 80101cd0: 89 55 e0 mov %edx,-0x20(%ebp) if(*path == '/') 80101cd3: 0f 84 51 01 00 00 je 80101e2a <namex+0x16a> ip = iget(ROOTDEV, ROOTINO); else ip = idup(myproc()->cwd); 80101cd9: e8 02 1a 00 00 call 801036e0 <myproc> 80101cde: 8b 70 68 mov 0x68(%eax),%esi acquire(&icache.lock); 80101ce1: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101ce8: e8 c3 24 00 00 call 801041b0 <acquire> ip->ref++; 80101ced: 83 46 08 01 addl $0x1,0x8(%esi) release(&icache.lock); 80101cf1: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101cf8: e8 a3 25 00 00 call 801042a0 <release> 80101cfd: eb 04 jmp 80101d03 <namex+0x43> 80101cff: 90 nop path++; 80101d00: 83 c3 01 add $0x1,%ebx while(*path == '/') 80101d03: 0f b6 03 movzbl (%ebx),%eax 80101d06: 3c 2f cmp $0x2f,%al 80101d08: 74 f6 je 80101d00 <namex+0x40> if(*path == 0) 80101d0a: 84 c0 test %al,%al 80101d0c: 0f 84 ed 00 00 00 je 80101dff <namex+0x13f> while(*path != '/' && *path != 0) 80101d12: 0f b6 03 movzbl (%ebx),%eax 80101d15: 89 da mov %ebx,%edx 80101d17: 84 c0 test %al,%al 80101d19: 0f 84 b1 00 00 00 je 80101dd0 <namex+0x110> 80101d1f: 3c 2f cmp $0x2f,%al 80101d21: 75 0f jne 80101d32 <namex+0x72> 80101d23: e9 a8 00 00 00 jmp 80101dd0 <namex+0x110> 80101d28: 3c 2f cmp $0x2f,%al 80101d2a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101d30: 74 0a je 80101d3c <namex+0x7c> path++; 80101d32: 83 c2 01 add $0x1,%edx while(*path != '/' && *path != 0) 80101d35: 0f b6 02 movzbl (%edx),%eax 80101d38: 84 c0 test %al,%al 80101d3a: 75 ec jne 80101d28 <namex+0x68> 80101d3c: 89 d1 mov %edx,%ecx 80101d3e: 29 d9 sub %ebx,%ecx if(len >= DIRSIZ) 80101d40: 83 f9 0d cmp $0xd,%ecx 80101d43: 0f 8e 8f 00 00 00 jle 80101dd8 <namex+0x118> memmove(name, s, DIRSIZ); 80101d49: 89 5c 24 04 mov %ebx,0x4(%esp) 80101d4d: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101d54: 00 80101d55: 89 3c 24 mov %edi,(%esp) 80101d58: 89 55 e4 mov %edx,-0x1c(%ebp) 80101d5b: e8 30 26 00 00 call 80104390 <memmove> path++; 80101d60: 8b 55 e4 mov -0x1c(%ebp),%edx 80101d63: 89 d3 mov %edx,%ebx while(*path == '/') 80101d65: 80 3a 2f cmpb $0x2f,(%edx) 80101d68: 75 0e jne 80101d78 <namex+0xb8> 80101d6a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi path++; 80101d70: 83 c3 01 add $0x1,%ebx while(*path == '/') 80101d73: 80 3b 2f cmpb $0x2f,(%ebx) 80101d76: 74 f8 je 80101d70 <namex+0xb0> while((path = skipelem(path, name)) != 0){ ilock(ip); 80101d78: 89 34 24 mov %esi,(%esp) 80101d7b: e8 70 f9 ff ff call 801016f0 <ilock> if(ip->type != T_DIR){ 80101d80: 66 83 7e 50 01 cmpw $0x1,0x50(%esi) 80101d85: 0f 85 85 00 00 00 jne 80101e10 <namex+0x150> iunlockput(ip); return 0; } if(nameiparent && *path == '\0'){ 80101d8b: 8b 55 e0 mov -0x20(%ebp),%edx 80101d8e: 85 d2 test %edx,%edx 80101d90: 74 09 je 80101d9b <namex+0xdb> 80101d92: 80 3b 00 cmpb $0x0,(%ebx) 80101d95: 0f 84 a5 00 00 00 je 80101e40 <namex+0x180> // Stop one level early. iunlock(ip); return ip; } if((next = dirlookup(ip, name, 0)) == 0){ 80101d9b: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80101da2: 00 80101da3: 89 7c 24 04 mov %edi,0x4(%esp) 80101da7: 89 34 24 mov %esi,(%esp) 80101daa: e8 51 fe ff ff call 80101c00 <dirlookup> 80101daf: 85 c0 test %eax,%eax 80101db1: 74 5d je 80101e10 <namex+0x150> iunlock(ip); 80101db3: 89 34 24 mov %esi,(%esp) 80101db6: 89 45 e4 mov %eax,-0x1c(%ebp) 80101db9: e8 12 fa ff ff call 801017d0 <iunlock> iput(ip); 80101dbe: 89 34 24 mov %esi,(%esp) 80101dc1: e8 4a fa ff ff call 80101810 <iput> iunlockput(ip); return 0; } iunlockput(ip); ip = next; 80101dc6: 8b 45 e4 mov -0x1c(%ebp),%eax 80101dc9: 89 c6 mov %eax,%esi 80101dcb: e9 33 ff ff ff jmp 80101d03 <namex+0x43> while(*path != '/' && *path != 0) 80101dd0: 31 c9 xor %ecx,%ecx 80101dd2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi memmove(name, s, len); 80101dd8: 89 4c 24 08 mov %ecx,0x8(%esp) 80101ddc: 89 5c 24 04 mov %ebx,0x4(%esp) 80101de0: 89 3c 24 mov %edi,(%esp) 80101de3: 89 55 dc mov %edx,-0x24(%ebp) 80101de6: 89 4d e4 mov %ecx,-0x1c(%ebp) 80101de9: e8 a2 25 00 00 call 80104390 <memmove> name[len] = 0; 80101dee: 8b 4d e4 mov -0x1c(%ebp),%ecx 80101df1: 8b 55 dc mov -0x24(%ebp),%edx 80101df4: c6 04 0f 00 movb $0x0,(%edi,%ecx,1) 80101df8: 89 d3 mov %edx,%ebx 80101dfa: e9 66 ff ff ff jmp 80101d65 <namex+0xa5> } if(nameiparent){ 80101dff: 8b 45 e0 mov -0x20(%ebp),%eax 80101e02: 85 c0 test %eax,%eax 80101e04: 75 4c jne 80101e52 <namex+0x192> 80101e06: 89 f0 mov %esi,%eax iput(ip); return 0; } return ip; } 80101e08: 83 c4 2c add $0x2c,%esp 80101e0b: 5b pop %ebx 80101e0c: 5e pop %esi 80101e0d: 5f pop %edi 80101e0e: 5d pop %ebp 80101e0f: c3 ret iunlock(ip); 80101e10: 89 34 24 mov %esi,(%esp) 80101e13: e8 b8 f9 ff ff call 801017d0 <iunlock> iput(ip); 80101e18: 89 34 24 mov %esi,(%esp) 80101e1b: e8 f0 f9 ff ff call 80101810 <iput> } 80101e20: 83 c4 2c add $0x2c,%esp return 0; 80101e23: 31 c0 xor %eax,%eax } 80101e25: 5b pop %ebx 80101e26: 5e pop %esi 80101e27: 5f pop %edi 80101e28: 5d pop %ebp 80101e29: c3 ret ip = iget(ROOTDEV, ROOTINO); 80101e2a: ba 01 00 00 00 mov $0x1,%edx 80101e2f: b8 01 00 00 00 mov $0x1,%eax 80101e34: e8 17 f4 ff ff call 80101250 <iget> 80101e39: 89 c6 mov %eax,%esi 80101e3b: e9 c3 fe ff ff jmp 80101d03 <namex+0x43> iunlock(ip); 80101e40: 89 34 24 mov %esi,(%esp) 80101e43: e8 88 f9 ff ff call 801017d0 <iunlock> } 80101e48: 83 c4 2c add $0x2c,%esp return ip; 80101e4b: 89 f0 mov %esi,%eax } 80101e4d: 5b pop %ebx 80101e4e: 5e pop %esi 80101e4f: 5f pop %edi 80101e50: 5d pop %ebp 80101e51: c3 ret iput(ip); 80101e52: 89 34 24 mov %esi,(%esp) 80101e55: e8 b6 f9 ff ff call 80101810 <iput> return 0; 80101e5a: 31 c0 xor %eax,%eax 80101e5c: eb aa jmp 80101e08 <namex+0x148> 80101e5e: 66 90 xchg %ax,%ax 80101e60 <dirlink>: { 80101e60: 55 push %ebp 80101e61: 89 e5 mov %esp,%ebp 80101e63: 57 push %edi 80101e64: 56 push %esi 80101e65: 53 push %ebx 80101e66: 83 ec 2c sub $0x2c,%esp 80101e69: 8b 5d 08 mov 0x8(%ebp),%ebx if((ip = dirlookup(dp, name, 0)) != 0){ 80101e6c: 8b 45 0c mov 0xc(%ebp),%eax 80101e6f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80101e76: 00 80101e77: 89 1c 24 mov %ebx,(%esp) 80101e7a: 89 44 24 04 mov %eax,0x4(%esp) 80101e7e: e8 7d fd ff ff call 80101c00 <dirlookup> 80101e83: 85 c0 test %eax,%eax 80101e85: 0f 85 8b 00 00 00 jne 80101f16 <dirlink+0xb6> for(off = 0; off < dp->size; off += sizeof(de)){ 80101e8b: 8b 43 58 mov 0x58(%ebx),%eax 80101e8e: 31 ff xor %edi,%edi 80101e90: 8d 75 d8 lea -0x28(%ebp),%esi 80101e93: 85 c0 test %eax,%eax 80101e95: 75 13 jne 80101eaa <dirlink+0x4a> 80101e97: eb 35 jmp 80101ece <dirlink+0x6e> 80101e99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101ea0: 8d 57 10 lea 0x10(%edi),%edx 80101ea3: 39 53 58 cmp %edx,0x58(%ebx) 80101ea6: 89 d7 mov %edx,%edi 80101ea8: 76 24 jbe 80101ece <dirlink+0x6e> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101eaa: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101eb1: 00 80101eb2: 89 7c 24 08 mov %edi,0x8(%esp) 80101eb6: 89 74 24 04 mov %esi,0x4(%esp) 80101eba: 89 1c 24 mov %ebx,(%esp) 80101ebd: e8 de fa ff ff call 801019a0 <readi> 80101ec2: 83 f8 10 cmp $0x10,%eax 80101ec5: 75 5e jne 80101f25 <dirlink+0xc5> if(de.inum == 0) 80101ec7: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80101ecc: 75 d2 jne 80101ea0 <dirlink+0x40> strncpy(de.name, name, DIRSIZ); 80101ece: 8b 45 0c mov 0xc(%ebp),%eax 80101ed1: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101ed8: 00 80101ed9: 89 44 24 04 mov %eax,0x4(%esp) 80101edd: 8d 45 da lea -0x26(%ebp),%eax 80101ee0: 89 04 24 mov %eax,(%esp) 80101ee3: e8 98 25 00 00 call 80104480 <strncpy> de.inum = inum; 80101ee8: 8b 45 10 mov 0x10(%ebp),%eax if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101eeb: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101ef2: 00 80101ef3: 89 7c 24 08 mov %edi,0x8(%esp) 80101ef7: 89 74 24 04 mov %esi,0x4(%esp) 80101efb: 89 1c 24 mov %ebx,(%esp) de.inum = inum; 80101efe: 66 89 45 d8 mov %ax,-0x28(%ebp) if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101f02: e8 99 fb ff ff call 80101aa0 <writei> 80101f07: 83 f8 10 cmp $0x10,%eax 80101f0a: 75 25 jne 80101f31 <dirlink+0xd1> return 0; 80101f0c: 31 c0 xor %eax,%eax } 80101f0e: 83 c4 2c add $0x2c,%esp 80101f11: 5b pop %ebx 80101f12: 5e pop %esi 80101f13: 5f pop %edi 80101f14: 5d pop %ebp 80101f15: c3 ret iput(ip); 80101f16: 89 04 24 mov %eax,(%esp) 80101f19: e8 f2 f8 ff ff call 80101810 <iput> return -1; 80101f1e: b8 ff ff ff ff mov $0xffffffff,%eax 80101f23: eb e9 jmp 80101f0e <dirlink+0xae> panic("dirlink read"); 80101f25: c7 04 24 e8 6f 10 80 movl $0x80106fe8,(%esp) 80101f2c: e8 2f e4 ff ff call 80100360 <panic> panic("dirlink"); 80101f31: c7 04 24 66 76 10 80 movl $0x80107666,(%esp) 80101f38: e8 23 e4 ff ff call 80100360 <panic> 80101f3d: 8d 76 00 lea 0x0(%esi),%esi 80101f40 <namei>: struct inode* namei(char *path) { 80101f40: 55 push %ebp char name[DIRSIZ]; return namex(path, 0, name); 80101f41: 31 d2 xor %edx,%edx { 80101f43: 89 e5 mov %esp,%ebp 80101f45: 83 ec 18 sub $0x18,%esp return namex(path, 0, name); 80101f48: 8b 45 08 mov 0x8(%ebp),%eax 80101f4b: 8d 4d ea lea -0x16(%ebp),%ecx 80101f4e: e8 6d fd ff ff call 80101cc0 <namex> } 80101f53: c9 leave 80101f54: c3 ret 80101f55: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101f59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101f60 <nameiparent>: struct inode* nameiparent(char *path, char *name) { 80101f60: 55 push %ebp return namex(path, 1, name); 80101f61: ba 01 00 00 00 mov $0x1,%edx { 80101f66: 89 e5 mov %esp,%ebp return namex(path, 1, name); 80101f68: 8b 4d 0c mov 0xc(%ebp),%ecx 80101f6b: 8b 45 08 mov 0x8(%ebp),%eax } 80101f6e: 5d pop %ebp return namex(path, 1, name); 80101f6f: e9 4c fd ff ff jmp 80101cc0 <namex> 80101f74: 66 90 xchg %ax,%ax 80101f76: 66 90 xchg %ax,%ax 80101f78: 66 90 xchg %ax,%ax 80101f7a: 66 90 xchg %ax,%ax 80101f7c: 66 90 xchg %ax,%ax 80101f7e: 66 90 xchg %ax,%ax 80101f80 <idestart>: } // Start the request for b. Caller must hold idelock. static void idestart(struct buf *b) { 80101f80: 55 push %ebp 80101f81: 89 e5 mov %esp,%ebp 80101f83: 56 push %esi 80101f84: 89 c6 mov %eax,%esi 80101f86: 53 push %ebx 80101f87: 83 ec 10 sub $0x10,%esp if(b == 0) 80101f8a: 85 c0 test %eax,%eax 80101f8c: 0f 84 99 00 00 00 je 8010202b <idestart+0xab> panic("idestart"); if(b->blockno >= FSSIZE) 80101f92: 8b 48 08 mov 0x8(%eax),%ecx 80101f95: 81 f9 e7 03 00 00 cmp $0x3e7,%ecx 80101f9b: 0f 87 7e 00 00 00 ja 8010201f <idestart+0x9f> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80101fa1: ba f7 01 00 00 mov $0x1f7,%edx 80101fa6: 66 90 xchg %ax,%ax 80101fa8: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 80101fa9: 83 e0 c0 and $0xffffffc0,%eax 80101fac: 3c 40 cmp $0x40,%al 80101fae: 75 f8 jne 80101fa8 <idestart+0x28> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80101fb0: 31 db xor %ebx,%ebx 80101fb2: ba f6 03 00 00 mov $0x3f6,%edx 80101fb7: 89 d8 mov %ebx,%eax 80101fb9: ee out %al,(%dx) 80101fba: ba f2 01 00 00 mov $0x1f2,%edx 80101fbf: b8 01 00 00 00 mov $0x1,%eax 80101fc4: ee out %al,(%dx) 80101fc5: 0f b6 c1 movzbl %cl,%eax 80101fc8: b2 f3 mov $0xf3,%dl 80101fca: ee out %al,(%dx) idewait(0); outb(0x3f6, 0); // generate interrupt outb(0x1f2, sector_per_block); // number of sectors outb(0x1f3, sector & 0xff); outb(0x1f4, (sector >> 8) & 0xff); 80101fcb: 89 c8 mov %ecx,%eax 80101fcd: b2 f4 mov $0xf4,%dl 80101fcf: c1 f8 08 sar $0x8,%eax 80101fd2: ee out %al,(%dx) 80101fd3: b2 f5 mov $0xf5,%dl 80101fd5: 89 d8 mov %ebx,%eax 80101fd7: ee out %al,(%dx) outb(0x1f5, (sector >> 16) & 0xff); outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f)); 80101fd8: 0f b6 46 04 movzbl 0x4(%esi),%eax 80101fdc: b2 f6 mov $0xf6,%dl 80101fde: 83 e0 01 and $0x1,%eax 80101fe1: c1 e0 04 shl $0x4,%eax 80101fe4: 83 c8 e0 or $0xffffffe0,%eax 80101fe7: ee out %al,(%dx) if(b->flags & B_DIRTY){ 80101fe8: f6 06 04 testb $0x4,(%esi) 80101feb: 75 13 jne 80102000 <idestart+0x80> 80101fed: ba f7 01 00 00 mov $0x1f7,%edx 80101ff2: b8 20 00 00 00 mov $0x20,%eax 80101ff7: ee out %al,(%dx) outb(0x1f7, write_cmd); outsl(0x1f0, b->data, BSIZE/4); } else { outb(0x1f7, read_cmd); } } 80101ff8: 83 c4 10 add $0x10,%esp 80101ffb: 5b pop %ebx 80101ffc: 5e pop %esi 80101ffd: 5d pop %ebp 80101ffe: c3 ret 80101fff: 90 nop 80102000: b2 f7 mov $0xf7,%dl 80102002: b8 30 00 00 00 mov $0x30,%eax 80102007: ee out %al,(%dx) asm volatile("cld; rep outsl" : 80102008: b9 80 00 00 00 mov $0x80,%ecx outsl(0x1f0, b->data, BSIZE/4); 8010200d: 83 c6 5c add $0x5c,%esi 80102010: ba f0 01 00 00 mov $0x1f0,%edx 80102015: fc cld 80102016: f3 6f rep outsl %ds:(%esi),(%dx) } 80102018: 83 c4 10 add $0x10,%esp 8010201b: 5b pop %ebx 8010201c: 5e pop %esi 8010201d: 5d pop %ebp 8010201e: c3 ret panic("incorrect blockno"); 8010201f: c7 04 24 54 70 10 80 movl $0x80107054,(%esp) 80102026: e8 35 e3 ff ff call 80100360 <panic> panic("idestart"); 8010202b: c7 04 24 4b 70 10 80 movl $0x8010704b,(%esp) 80102032: e8 29 e3 ff ff call 80100360 <panic> 80102037: 89 f6 mov %esi,%esi 80102039: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102040 <ideinit>: { 80102040: 55 push %ebp 80102041: 89 e5 mov %esp,%ebp 80102043: 83 ec 18 sub $0x18,%esp initlock(&idelock, "ide"); 80102046: c7 44 24 04 66 70 10 movl $0x80107066,0x4(%esp) 8010204d: 80 8010204e: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 80102055: e8 66 20 00 00 call 801040c0 <initlock> ioapicenable(IRQ_IDE, ncpu - 1); 8010205a: a1 00 2d 11 80 mov 0x80112d00,%eax 8010205f: c7 04 24 0e 00 00 00 movl $0xe,(%esp) 80102066: 83 e8 01 sub $0x1,%eax 80102069: 89 44 24 04 mov %eax,0x4(%esp) 8010206d: e8 7e 02 00 00 call 801022f0 <ioapicenable> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102072: ba f7 01 00 00 mov $0x1f7,%edx 80102077: 90 nop 80102078: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 80102079: 83 e0 c0 and $0xffffffc0,%eax 8010207c: 3c 40 cmp $0x40,%al 8010207e: 75 f8 jne 80102078 <ideinit+0x38> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102080: ba f6 01 00 00 mov $0x1f6,%edx 80102085: b8 f0 ff ff ff mov $0xfffffff0,%eax 8010208a: ee out %al,(%dx) 8010208b: b9 e8 03 00 00 mov $0x3e8,%ecx asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102090: b2 f7 mov $0xf7,%dl 80102092: eb 09 jmp 8010209d <ideinit+0x5d> 80102094: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(i=0; i<1000; i++){ 80102098: 83 e9 01 sub $0x1,%ecx 8010209b: 74 0f je 801020ac <ideinit+0x6c> 8010209d: ec in (%dx),%al if(inb(0x1f7) != 0){ 8010209e: 84 c0 test %al,%al 801020a0: 74 f6 je 80102098 <ideinit+0x58> havedisk1 = 1; 801020a2: c7 05 60 a5 10 80 01 movl $0x1,0x8010a560 801020a9: 00 00 00 asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801020ac: ba f6 01 00 00 mov $0x1f6,%edx 801020b1: b8 e0 ff ff ff mov $0xffffffe0,%eax 801020b6: ee out %al,(%dx) } 801020b7: c9 leave 801020b8: c3 ret 801020b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801020c0 <ideintr>: // Interrupt handler. void ideintr(void) { 801020c0: 55 push %ebp 801020c1: 89 e5 mov %esp,%ebp 801020c3: 57 push %edi 801020c4: 56 push %esi 801020c5: 53 push %ebx 801020c6: 83 ec 1c sub $0x1c,%esp struct buf *b; // First queued buffer is the active request. acquire(&idelock); 801020c9: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 801020d0: e8 db 20 00 00 call 801041b0 <acquire> if((b = idequeue) == 0){ 801020d5: 8b 1d 64 a5 10 80 mov 0x8010a564,%ebx 801020db: 85 db test %ebx,%ebx 801020dd: 74 30 je 8010210f <ideintr+0x4f> release(&idelock); return; } idequeue = b->qnext; 801020df: 8b 43 58 mov 0x58(%ebx),%eax 801020e2: a3 64 a5 10 80 mov %eax,0x8010a564 // Read data if needed. if(!(b->flags & B_DIRTY) && idewait(1) >= 0) 801020e7: 8b 33 mov (%ebx),%esi 801020e9: f7 c6 04 00 00 00 test $0x4,%esi 801020ef: 74 37 je 80102128 <ideintr+0x68> insl(0x1f0, b->data, BSIZE/4); // Wake process waiting for this buf. b->flags |= B_VALID; b->flags &= ~B_DIRTY; 801020f1: 83 e6 fb and $0xfffffffb,%esi 801020f4: 83 ce 02 or $0x2,%esi 801020f7: 89 33 mov %esi,(%ebx) wakeup(b); 801020f9: 89 1c 24 mov %ebx,(%esp) 801020fc: e8 ef 1c 00 00 call 80103df0 <wakeup> // Start disk on next buf in queue. if(idequeue != 0) 80102101: a1 64 a5 10 80 mov 0x8010a564,%eax 80102106: 85 c0 test %eax,%eax 80102108: 74 05 je 8010210f <ideintr+0x4f> idestart(idequeue); 8010210a: e8 71 fe ff ff call 80101f80 <idestart> release(&idelock); 8010210f: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 80102116: e8 85 21 00 00 call 801042a0 <release> release(&idelock); } 8010211b: 83 c4 1c add $0x1c,%esp 8010211e: 5b pop %ebx 8010211f: 5e pop %esi 80102120: 5f pop %edi 80102121: 5d pop %ebp 80102122: c3 ret 80102123: 90 nop 80102124: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102128: ba f7 01 00 00 mov $0x1f7,%edx 8010212d: 8d 76 00 lea 0x0(%esi),%esi 80102130: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 80102131: 89 c1 mov %eax,%ecx 80102133: 83 e1 c0 and $0xffffffc0,%ecx 80102136: 80 f9 40 cmp $0x40,%cl 80102139: 75 f5 jne 80102130 <ideintr+0x70> if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0) 8010213b: a8 21 test $0x21,%al 8010213d: 75 b2 jne 801020f1 <ideintr+0x31> insl(0x1f0, b->data, BSIZE/4); 8010213f: 8d 7b 5c lea 0x5c(%ebx),%edi asm volatile("cld; rep insl" : 80102142: b9 80 00 00 00 mov $0x80,%ecx 80102147: ba f0 01 00 00 mov $0x1f0,%edx 8010214c: fc cld 8010214d: f3 6d rep insl (%dx),%es:(%edi) 8010214f: 8b 33 mov (%ebx),%esi 80102151: eb 9e jmp 801020f1 <ideintr+0x31> 80102153: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102159: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102160 <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) { 80102160: 55 push %ebp 80102161: 89 e5 mov %esp,%ebp 80102163: 53 push %ebx 80102164: 83 ec 14 sub $0x14,%esp 80102167: 8b 5d 08 mov 0x8(%ebp),%ebx struct buf **pp; if(!holdingsleep(&b->lock)) 8010216a: 8d 43 0c lea 0xc(%ebx),%eax 8010216d: 89 04 24 mov %eax,(%esp) 80102170: e8 1b 1f 00 00 call 80104090 <holdingsleep> 80102175: 85 c0 test %eax,%eax 80102177: 0f 84 9e 00 00 00 je 8010221b <iderw+0xbb> panic("iderw: buf not locked"); if((b->flags & (B_VALID|B_DIRTY)) == B_VALID) 8010217d: 8b 03 mov (%ebx),%eax 8010217f: 83 e0 06 and $0x6,%eax 80102182: 83 f8 02 cmp $0x2,%eax 80102185: 0f 84 a8 00 00 00 je 80102233 <iderw+0xd3> panic("iderw: nothing to do"); if(b->dev != 0 && !havedisk1) 8010218b: 8b 53 04 mov 0x4(%ebx),%edx 8010218e: 85 d2 test %edx,%edx 80102190: 74 0d je 8010219f <iderw+0x3f> 80102192: a1 60 a5 10 80 mov 0x8010a560,%eax 80102197: 85 c0 test %eax,%eax 80102199: 0f 84 88 00 00 00 je 80102227 <iderw+0xc7> panic("iderw: ide disk 1 not present"); acquire(&idelock); //DOC:acquire-lock 8010219f: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 801021a6: e8 05 20 00 00 call 801041b0 <acquire> // Append b to idequeue. b->qnext = 0; for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 801021ab: a1 64 a5 10 80 mov 0x8010a564,%eax b->qnext = 0; 801021b0: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 801021b7: 85 c0 test %eax,%eax 801021b9: 75 07 jne 801021c2 <iderw+0x62> 801021bb: eb 4e jmp 8010220b <iderw+0xab> 801021bd: 8d 76 00 lea 0x0(%esi),%esi 801021c0: 89 d0 mov %edx,%eax 801021c2: 8b 50 58 mov 0x58(%eax),%edx 801021c5: 85 d2 test %edx,%edx 801021c7: 75 f7 jne 801021c0 <iderw+0x60> 801021c9: 83 c0 58 add $0x58,%eax ; *pp = b; 801021cc: 89 18 mov %ebx,(%eax) // Start disk if necessary. if(idequeue == b) 801021ce: 39 1d 64 a5 10 80 cmp %ebx,0x8010a564 801021d4: 74 3c je 80102212 <iderw+0xb2> idestart(b); // Wait for request to finish. while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 801021d6: 8b 03 mov (%ebx),%eax 801021d8: 83 e0 06 and $0x6,%eax 801021db: 83 f8 02 cmp $0x2,%eax 801021de: 74 1a je 801021fa <iderw+0x9a> sleep(b, &idelock); 801021e0: c7 44 24 04 80 a5 10 movl $0x8010a580,0x4(%esp) 801021e7: 80 801021e8: 89 1c 24 mov %ebx,(%esp) 801021eb: e8 60 1a 00 00 call 80103c50 <sleep> while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 801021f0: 8b 13 mov (%ebx),%edx 801021f2: 83 e2 06 and $0x6,%edx 801021f5: 83 fa 02 cmp $0x2,%edx 801021f8: 75 e6 jne 801021e0 <iderw+0x80> } release(&idelock); 801021fa: c7 45 08 80 a5 10 80 movl $0x8010a580,0x8(%ebp) } 80102201: 83 c4 14 add $0x14,%esp 80102204: 5b pop %ebx 80102205: 5d pop %ebp release(&idelock); 80102206: e9 95 20 00 00 jmp 801042a0 <release> for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 8010220b: b8 64 a5 10 80 mov $0x8010a564,%eax 80102210: eb ba jmp 801021cc <iderw+0x6c> idestart(b); 80102212: 89 d8 mov %ebx,%eax 80102214: e8 67 fd ff ff call 80101f80 <idestart> 80102219: eb bb jmp 801021d6 <iderw+0x76> panic("iderw: buf not locked"); 8010221b: c7 04 24 6a 70 10 80 movl $0x8010706a,(%esp) 80102222: e8 39 e1 ff ff call 80100360 <panic> panic("iderw: ide disk 1 not present"); 80102227: c7 04 24 95 70 10 80 movl $0x80107095,(%esp) 8010222e: e8 2d e1 ff ff call 80100360 <panic> panic("iderw: nothing to do"); 80102233: c7 04 24 80 70 10 80 movl $0x80107080,(%esp) 8010223a: e8 21 e1 ff ff call 80100360 <panic> 8010223f: 90 nop 80102240 <ioapicinit>: ioapic->data = data; } void ioapicinit(void) { 80102240: 55 push %ebp 80102241: 89 e5 mov %esp,%ebp 80102243: 56 push %esi 80102244: 53 push %ebx 80102245: 83 ec 10 sub $0x10,%esp int i, id, maxintr; ioapic = (volatile struct ioapic*)IOAPIC; 80102248: c7 05 34 26 11 80 00 movl $0xfec00000,0x80112634 8010224f: 00 c0 fe ioapic->reg = reg; 80102252: c7 05 00 00 c0 fe 01 movl $0x1,0xfec00000 80102259: 00 00 00 return ioapic->data; 8010225c: 8b 15 34 26 11 80 mov 0x80112634,%edx 80102262: 8b 42 10 mov 0x10(%edx),%eax ioapic->reg = reg; 80102265: c7 02 00 00 00 00 movl $0x0,(%edx) return ioapic->data; 8010226b: 8b 1d 34 26 11 80 mov 0x80112634,%ebx maxintr = (ioapicread(REG_VER) >> 16) & 0xFF; id = ioapicread(REG_ID) >> 24; if(id != ioapicid) 80102271: 0f b6 15 60 27 11 80 movzbl 0x80112760,%edx maxintr = (ioapicread(REG_VER) >> 16) & 0xFF; 80102278: c1 e8 10 shr $0x10,%eax 8010227b: 0f b6 f0 movzbl %al,%esi return ioapic->data; 8010227e: 8b 43 10 mov 0x10(%ebx),%eax id = ioapicread(REG_ID) >> 24; 80102281: c1 e8 18 shr $0x18,%eax if(id != ioapicid) 80102284: 39 c2 cmp %eax,%edx 80102286: 74 12 je 8010229a <ioapicinit+0x5a> cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n"); 80102288: c7 04 24 b4 70 10 80 movl $0x801070b4,(%esp) 8010228f: e8 bc e3 ff ff call 80100650 <cprintf> 80102294: 8b 1d 34 26 11 80 mov 0x80112634,%ebx 8010229a: ba 10 00 00 00 mov $0x10,%edx 8010229f: 31 c0 xor %eax,%eax 801022a1: eb 07 jmp 801022aa <ioapicinit+0x6a> 801022a3: 90 nop 801022a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801022a8: 89 cb mov %ecx,%ebx ioapic->reg = reg; 801022aa: 89 13 mov %edx,(%ebx) ioapic->data = data; 801022ac: 8b 1d 34 26 11 80 mov 0x80112634,%ebx 801022b2: 8d 48 20 lea 0x20(%eax),%ecx // Mark all interrupts edge-triggered, active high, disabled, // and not routed to any CPUs. for(i = 0; i <= maxintr; i++){ ioapicwrite(REG_TABLE+2*i, INT_DISABLED | (T_IRQ0 + i)); 801022b5: 81 c9 00 00 01 00 or $0x10000,%ecx for(i = 0; i <= maxintr; i++){ 801022bb: 83 c0 01 add $0x1,%eax ioapic->data = data; 801022be: 89 4b 10 mov %ecx,0x10(%ebx) 801022c1: 8d 4a 01 lea 0x1(%edx),%ecx 801022c4: 83 c2 02 add $0x2,%edx ioapic->reg = reg; 801022c7: 89 0b mov %ecx,(%ebx) ioapic->data = data; 801022c9: 8b 0d 34 26 11 80 mov 0x80112634,%ecx for(i = 0; i <= maxintr; i++){ 801022cf: 39 c6 cmp %eax,%esi ioapic->data = data; 801022d1: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx) for(i = 0; i <= maxintr; i++){ 801022d8: 7d ce jge 801022a8 <ioapicinit+0x68> ioapicwrite(REG_TABLE+2*i+1, 0); } } 801022da: 83 c4 10 add $0x10,%esp 801022dd: 5b pop %ebx 801022de: 5e pop %esi 801022df: 5d pop %ebp 801022e0: c3 ret 801022e1: eb 0d jmp 801022f0 <ioapicenable> 801022e3: 90 nop 801022e4: 90 nop 801022e5: 90 nop 801022e6: 90 nop 801022e7: 90 nop 801022e8: 90 nop 801022e9: 90 nop 801022ea: 90 nop 801022eb: 90 nop 801022ec: 90 nop 801022ed: 90 nop 801022ee: 90 nop 801022ef: 90 nop 801022f0 <ioapicenable>: void ioapicenable(int irq, int cpunum) { 801022f0: 55 push %ebp 801022f1: 89 e5 mov %esp,%ebp 801022f3: 8b 55 08 mov 0x8(%ebp),%edx 801022f6: 53 push %ebx 801022f7: 8b 45 0c mov 0xc(%ebp),%eax // Mark interrupt edge-triggered, active high, // enabled, and routed to the given cpunum, // which happens to be that cpu's APIC ID. ioapicwrite(REG_TABLE+2*irq, T_IRQ0 + irq); 801022fa: 8d 5a 20 lea 0x20(%edx),%ebx 801022fd: 8d 4c 12 10 lea 0x10(%edx,%edx,1),%ecx ioapic->reg = reg; 80102301: 8b 15 34 26 11 80 mov 0x80112634,%edx ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24); 80102307: c1 e0 18 shl $0x18,%eax ioapic->reg = reg; 8010230a: 89 0a mov %ecx,(%edx) ioapic->data = data; 8010230c: 8b 15 34 26 11 80 mov 0x80112634,%edx ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24); 80102312: 83 c1 01 add $0x1,%ecx ioapic->data = data; 80102315: 89 5a 10 mov %ebx,0x10(%edx) ioapic->reg = reg; 80102318: 89 0a mov %ecx,(%edx) ioapic->data = data; 8010231a: 8b 15 34 26 11 80 mov 0x80112634,%edx 80102320: 89 42 10 mov %eax,0x10(%edx) } 80102323: 5b pop %ebx 80102324: 5d pop %ebp 80102325: c3 ret 80102326: 66 90 xchg %ax,%ax 80102328: 66 90 xchg %ax,%ax 8010232a: 66 90 xchg %ax,%ax 8010232c: 66 90 xchg %ax,%ax 8010232e: 66 90 xchg %ax,%ax 80102330 <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) { 80102330: 55 push %ebp 80102331: 89 e5 mov %esp,%ebp 80102333: 53 push %ebx 80102334: 83 ec 14 sub $0x14,%esp 80102337: 8b 5d 08 mov 0x8(%ebp),%ebx struct run *r; if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP) 8010233a: f7 c3 ff 0f 00 00 test $0xfff,%ebx 80102340: 75 7c jne 801023be <kfree+0x8e> 80102342: 81 fb f4 59 11 80 cmp $0x801159f4,%ebx 80102348: 72 74 jb 801023be <kfree+0x8e> 8010234a: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 80102350: 3d ff ff ff 0d cmp $0xdffffff,%eax 80102355: 77 67 ja 801023be <kfree+0x8e> panic("kfree"); // Fill with junk to catch dangling refs. memset(v, 1, PGSIZE); 80102357: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010235e: 00 8010235f: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80102366: 00 80102367: 89 1c 24 mov %ebx,(%esp) 8010236a: e8 81 1f 00 00 call 801042f0 <memset> if(kmem.use_lock) 8010236f: 8b 15 74 26 11 80 mov 0x80112674,%edx 80102375: 85 d2 test %edx,%edx 80102377: 75 37 jne 801023b0 <kfree+0x80> acquire(&kmem.lock); r = (struct run*)v; r->next = kmem.freelist; 80102379: a1 78 26 11 80 mov 0x80112678,%eax 8010237e: 89 03 mov %eax,(%ebx) kmem.freelist = r; if(kmem.use_lock) 80102380: a1 74 26 11 80 mov 0x80112674,%eax kmem.freelist = r; 80102385: 89 1d 78 26 11 80 mov %ebx,0x80112678 if(kmem.use_lock) 8010238b: 85 c0 test %eax,%eax 8010238d: 75 09 jne 80102398 <kfree+0x68> release(&kmem.lock); } 8010238f: 83 c4 14 add $0x14,%esp 80102392: 5b pop %ebx 80102393: 5d pop %ebp 80102394: c3 ret 80102395: 8d 76 00 lea 0x0(%esi),%esi release(&kmem.lock); 80102398: c7 45 08 40 26 11 80 movl $0x80112640,0x8(%ebp) } 8010239f: 83 c4 14 add $0x14,%esp 801023a2: 5b pop %ebx 801023a3: 5d pop %ebp release(&kmem.lock); 801023a4: e9 f7 1e 00 00 jmp 801042a0 <release> 801023a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi acquire(&kmem.lock); 801023b0: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 801023b7: e8 f4 1d 00 00 call 801041b0 <acquire> 801023bc: eb bb jmp 80102379 <kfree+0x49> panic("kfree"); 801023be: c7 04 24 e6 70 10 80 movl $0x801070e6,(%esp) 801023c5: e8 96 df ff ff call 80100360 <panic> 801023ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801023d0 <freerange>: { 801023d0: 55 push %ebp 801023d1: 89 e5 mov %esp,%ebp 801023d3: 56 push %esi 801023d4: 53 push %ebx 801023d5: 83 ec 10 sub $0x10,%esp p = (char*)PGROUNDUP((uint)vstart); 801023d8: 8b 45 08 mov 0x8(%ebp),%eax { 801023db: 8b 75 0c mov 0xc(%ebp),%esi p = (char*)PGROUNDUP((uint)vstart); 801023de: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 801023e4: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 801023ea: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 801023f0: 39 de cmp %ebx,%esi 801023f2: 73 08 jae 801023fc <freerange+0x2c> 801023f4: eb 18 jmp 8010240e <freerange+0x3e> 801023f6: 66 90 xchg %ax,%ax 801023f8: 89 da mov %ebx,%edx 801023fa: 89 c3 mov %eax,%ebx kfree(p); 801023fc: 89 14 24 mov %edx,(%esp) 801023ff: e8 2c ff ff ff call 80102330 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102404: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 8010240a: 39 f0 cmp %esi,%eax 8010240c: 76 ea jbe 801023f8 <freerange+0x28> } 8010240e: 83 c4 10 add $0x10,%esp 80102411: 5b pop %ebx 80102412: 5e pop %esi 80102413: 5d pop %ebp 80102414: c3 ret 80102415: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102419: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102420 <kinit1>: { 80102420: 55 push %ebp 80102421: 89 e5 mov %esp,%ebp 80102423: 56 push %esi 80102424: 53 push %ebx 80102425: 83 ec 10 sub $0x10,%esp 80102428: 8b 75 0c mov 0xc(%ebp),%esi initlock(&kmem.lock, "kmem"); 8010242b: c7 44 24 04 ec 70 10 movl $0x801070ec,0x4(%esp) 80102432: 80 80102433: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 8010243a: e8 81 1c 00 00 call 801040c0 <initlock> p = (char*)PGROUNDUP((uint)vstart); 8010243f: 8b 45 08 mov 0x8(%ebp),%eax kmem.use_lock = 0; 80102442: c7 05 74 26 11 80 00 movl $0x0,0x80112674 80102449: 00 00 00 p = (char*)PGROUNDUP((uint)vstart); 8010244c: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 80102452: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102458: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 8010245e: 39 de cmp %ebx,%esi 80102460: 73 0a jae 8010246c <kinit1+0x4c> 80102462: eb 1a jmp 8010247e <kinit1+0x5e> 80102464: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102468: 89 da mov %ebx,%edx 8010246a: 89 c3 mov %eax,%ebx kfree(p); 8010246c: 89 14 24 mov %edx,(%esp) 8010246f: e8 bc fe ff ff call 80102330 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102474: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 8010247a: 39 c6 cmp %eax,%esi 8010247c: 73 ea jae 80102468 <kinit1+0x48> } 8010247e: 83 c4 10 add $0x10,%esp 80102481: 5b pop %ebx 80102482: 5e pop %esi 80102483: 5d pop %ebp 80102484: c3 ret 80102485: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102489: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102490 <kinit2>: { 80102490: 55 push %ebp 80102491: 89 e5 mov %esp,%ebp 80102493: 56 push %esi 80102494: 53 push %ebx 80102495: 83 ec 10 sub $0x10,%esp p = (char*)PGROUNDUP((uint)vstart); 80102498: 8b 45 08 mov 0x8(%ebp),%eax { 8010249b: 8b 75 0c mov 0xc(%ebp),%esi p = (char*)PGROUNDUP((uint)vstart); 8010249e: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 801024a4: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 801024aa: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 801024b0: 39 de cmp %ebx,%esi 801024b2: 73 08 jae 801024bc <kinit2+0x2c> 801024b4: eb 18 jmp 801024ce <kinit2+0x3e> 801024b6: 66 90 xchg %ax,%ax 801024b8: 89 da mov %ebx,%edx 801024ba: 89 c3 mov %eax,%ebx kfree(p); 801024bc: 89 14 24 mov %edx,(%esp) 801024bf: e8 6c fe ff ff call 80102330 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 801024c4: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 801024ca: 39 c6 cmp %eax,%esi 801024cc: 73 ea jae 801024b8 <kinit2+0x28> kmem.use_lock = 1; 801024ce: c7 05 74 26 11 80 01 movl $0x1,0x80112674 801024d5: 00 00 00 } 801024d8: 83 c4 10 add $0x10,%esp 801024db: 5b pop %ebx 801024dc: 5e pop %esi 801024dd: 5d pop %ebp 801024de: c3 ret 801024df: 90 nop 801024e0 <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) { 801024e0: 55 push %ebp 801024e1: 89 e5 mov %esp,%ebp 801024e3: 53 push %ebx 801024e4: 83 ec 14 sub $0x14,%esp struct run *r; if(kmem.use_lock) 801024e7: a1 74 26 11 80 mov 0x80112674,%eax 801024ec: 85 c0 test %eax,%eax 801024ee: 75 30 jne 80102520 <kalloc+0x40> acquire(&kmem.lock); r = kmem.freelist; 801024f0: 8b 1d 78 26 11 80 mov 0x80112678,%ebx if(r) 801024f6: 85 db test %ebx,%ebx 801024f8: 74 08 je 80102502 <kalloc+0x22> kmem.freelist = r->next; 801024fa: 8b 13 mov (%ebx),%edx 801024fc: 89 15 78 26 11 80 mov %edx,0x80112678 if(kmem.use_lock) 80102502: 85 c0 test %eax,%eax 80102504: 74 0c je 80102512 <kalloc+0x32> release(&kmem.lock); 80102506: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 8010250d: e8 8e 1d 00 00 call 801042a0 <release> return (char*)r; } 80102512: 83 c4 14 add $0x14,%esp 80102515: 89 d8 mov %ebx,%eax 80102517: 5b pop %ebx 80102518: 5d pop %ebp 80102519: c3 ret 8010251a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi acquire(&kmem.lock); 80102520: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 80102527: e8 84 1c 00 00 call 801041b0 <acquire> 8010252c: a1 74 26 11 80 mov 0x80112674,%eax 80102531: eb bd jmp 801024f0 <kalloc+0x10> 80102533: 66 90 xchg %ax,%ax 80102535: 66 90 xchg %ax,%ax 80102537: 66 90 xchg %ax,%ax 80102539: 66 90 xchg %ax,%ax 8010253b: 66 90 xchg %ax,%ax 8010253d: 66 90 xchg %ax,%ax 8010253f: 90 nop 80102540 <kbdgetc>: asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102540: ba 64 00 00 00 mov $0x64,%edx 80102545: ec in (%dx),%al normalmap, shiftmap, ctlmap, ctlmap }; uint st, data, c; st = inb(KBSTATP); if((st & KBS_DIB) == 0) 80102546: a8 01 test $0x1,%al 80102548: 0f 84 ba 00 00 00 je 80102608 <kbdgetc+0xc8> 8010254e: b2 60 mov $0x60,%dl 80102550: ec in (%dx),%al return -1; data = inb(KBDATAP); 80102551: 0f b6 c8 movzbl %al,%ecx if(data == 0xE0){ 80102554: 81 f9 e0 00 00 00 cmp $0xe0,%ecx 8010255a: 0f 84 88 00 00 00 je 801025e8 <kbdgetc+0xa8> shift |= E0ESC; return 0; } else if(data & 0x80){ 80102560: 84 c0 test %al,%al 80102562: 79 2c jns 80102590 <kbdgetc+0x50> // Key released data = (shift & E0ESC ? data : data & 0x7F); 80102564: 8b 15 b4 a5 10 80 mov 0x8010a5b4,%edx 8010256a: f6 c2 40 test $0x40,%dl 8010256d: 75 05 jne 80102574 <kbdgetc+0x34> 8010256f: 89 c1 mov %eax,%ecx 80102571: 83 e1 7f and $0x7f,%ecx shift &= ~(shiftcode[data] | E0ESC); 80102574: 0f b6 81 20 72 10 80 movzbl -0x7fef8de0(%ecx),%eax 8010257b: 83 c8 40 or $0x40,%eax 8010257e: 0f b6 c0 movzbl %al,%eax 80102581: f7 d0 not %eax 80102583: 21 d0 and %edx,%eax 80102585: a3 b4 a5 10 80 mov %eax,0x8010a5b4 return 0; 8010258a: 31 c0 xor %eax,%eax 8010258c: c3 ret 8010258d: 8d 76 00 lea 0x0(%esi),%esi { 80102590: 55 push %ebp 80102591: 89 e5 mov %esp,%ebp 80102593: 53 push %ebx 80102594: 8b 1d b4 a5 10 80 mov 0x8010a5b4,%ebx } else if(shift & E0ESC){ 8010259a: f6 c3 40 test $0x40,%bl 8010259d: 74 09 je 801025a8 <kbdgetc+0x68> // Last character was an E0 escape; or with 0x80 data |= 0x80; 8010259f: 83 c8 80 or $0xffffff80,%eax shift &= ~E0ESC; 801025a2: 83 e3 bf and $0xffffffbf,%ebx data |= 0x80; 801025a5: 0f b6 c8 movzbl %al,%ecx } shift |= shiftcode[data]; 801025a8: 0f b6 91 20 72 10 80 movzbl -0x7fef8de0(%ecx),%edx shift ^= togglecode[data]; 801025af: 0f b6 81 20 71 10 80 movzbl -0x7fef8ee0(%ecx),%eax shift |= shiftcode[data]; 801025b6: 09 da or %ebx,%edx shift ^= togglecode[data]; 801025b8: 31 c2 xor %eax,%edx c = charcode[shift & (CTL | SHIFT)][data]; 801025ba: 89 d0 mov %edx,%eax 801025bc: 83 e0 03 and $0x3,%eax 801025bf: 8b 04 85 00 71 10 80 mov -0x7fef8f00(,%eax,4),%eax shift ^= togglecode[data]; 801025c6: 89 15 b4 a5 10 80 mov %edx,0x8010a5b4 if(shift & CAPSLOCK){ 801025cc: 83 e2 08 and $0x8,%edx c = charcode[shift & (CTL | SHIFT)][data]; 801025cf: 0f b6 04 08 movzbl (%eax,%ecx,1),%eax if(shift & CAPSLOCK){ 801025d3: 74 0b je 801025e0 <kbdgetc+0xa0> if('a' <= c && c <= 'z') 801025d5: 8d 50 9f lea -0x61(%eax),%edx 801025d8: 83 fa 19 cmp $0x19,%edx 801025db: 77 1b ja 801025f8 <kbdgetc+0xb8> c += 'A' - 'a'; 801025dd: 83 e8 20 sub $0x20,%eax else if('A' <= c && c <= 'Z') c += 'a' - 'A'; } return c; } 801025e0: 5b pop %ebx 801025e1: 5d pop %ebp 801025e2: c3 ret 801025e3: 90 nop 801025e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi shift |= E0ESC; 801025e8: 83 0d b4 a5 10 80 40 orl $0x40,0x8010a5b4 return 0; 801025ef: 31 c0 xor %eax,%eax 801025f1: c3 ret 801025f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi else if('A' <= c && c <= 'Z') 801025f8: 8d 48 bf lea -0x41(%eax),%ecx c += 'a' - 'A'; 801025fb: 8d 50 20 lea 0x20(%eax),%edx 801025fe: 83 f9 19 cmp $0x19,%ecx 80102601: 0f 46 c2 cmovbe %edx,%eax return c; 80102604: eb da jmp 801025e0 <kbdgetc+0xa0> 80102606: 66 90 xchg %ax,%ax return -1; 80102608: b8 ff ff ff ff mov $0xffffffff,%eax 8010260d: c3 ret 8010260e: 66 90 xchg %ax,%ax 80102610 <kbdintr>: void kbdintr(void) { 80102610: 55 push %ebp 80102611: 89 e5 mov %esp,%ebp 80102613: 83 ec 18 sub $0x18,%esp consoleintr(kbdgetc); 80102616: c7 04 24 40 25 10 80 movl $0x80102540,(%esp) 8010261d: e8 8e e1 ff ff call 801007b0 <consoleintr> } 80102622: c9 leave 80102623: c3 ret 80102624: 66 90 xchg %ax,%ax 80102626: 66 90 xchg %ax,%ax 80102628: 66 90 xchg %ax,%ax 8010262a: 66 90 xchg %ax,%ax 8010262c: 66 90 xchg %ax,%ax 8010262e: 66 90 xchg %ax,%ax 80102630 <fill_rtcdate>: return inb(CMOS_RETURN); } static void fill_rtcdate(struct rtcdate *r) { 80102630: 55 push %ebp 80102631: 89 c1 mov %eax,%ecx 80102633: 89 e5 mov %esp,%ebp asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102635: ba 70 00 00 00 mov $0x70,%edx 8010263a: 53 push %ebx 8010263b: 31 c0 xor %eax,%eax 8010263d: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 8010263e: bb 71 00 00 00 mov $0x71,%ebx 80102643: 89 da mov %ebx,%edx 80102645: ec in (%dx),%al return inb(CMOS_RETURN); 80102646: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102649: b2 70 mov $0x70,%dl 8010264b: 89 01 mov %eax,(%ecx) 8010264d: b8 02 00 00 00 mov $0x2,%eax 80102652: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102653: 89 da mov %ebx,%edx 80102655: ec in (%dx),%al 80102656: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102659: b2 70 mov $0x70,%dl 8010265b: 89 41 04 mov %eax,0x4(%ecx) 8010265e: b8 04 00 00 00 mov $0x4,%eax 80102663: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102664: 89 da mov %ebx,%edx 80102666: ec in (%dx),%al 80102667: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010266a: b2 70 mov $0x70,%dl 8010266c: 89 41 08 mov %eax,0x8(%ecx) 8010266f: b8 07 00 00 00 mov $0x7,%eax 80102674: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102675: 89 da mov %ebx,%edx 80102677: ec in (%dx),%al 80102678: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010267b: b2 70 mov $0x70,%dl 8010267d: 89 41 0c mov %eax,0xc(%ecx) 80102680: b8 08 00 00 00 mov $0x8,%eax 80102685: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102686: 89 da mov %ebx,%edx 80102688: ec in (%dx),%al 80102689: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010268c: b2 70 mov $0x70,%dl 8010268e: 89 41 10 mov %eax,0x10(%ecx) 80102691: b8 09 00 00 00 mov $0x9,%eax 80102696: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102697: 89 da mov %ebx,%edx 80102699: ec in (%dx),%al 8010269a: 0f b6 d8 movzbl %al,%ebx 8010269d: 89 59 14 mov %ebx,0x14(%ecx) r->minute = cmos_read(MINS); r->hour = cmos_read(HOURS); r->day = cmos_read(DAY); r->month = cmos_read(MONTH); r->year = cmos_read(YEAR); } 801026a0: 5b pop %ebx 801026a1: 5d pop %ebp 801026a2: c3 ret 801026a3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801026a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801026b0 <lapicinit>: if(!lapic) 801026b0: a1 7c 26 11 80 mov 0x8011267c,%eax { 801026b5: 55 push %ebp 801026b6: 89 e5 mov %esp,%ebp if(!lapic) 801026b8: 85 c0 test %eax,%eax 801026ba: 0f 84 c0 00 00 00 je 80102780 <lapicinit+0xd0> lapic[index] = value; 801026c0: c7 80 f0 00 00 00 3f movl $0x13f,0xf0(%eax) 801026c7: 01 00 00 lapic[ID]; // wait for write to finish, by reading 801026ca: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026cd: c7 80 e0 03 00 00 0b movl $0xb,0x3e0(%eax) 801026d4: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026d7: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026da: c7 80 20 03 00 00 20 movl $0x20020,0x320(%eax) 801026e1: 00 02 00 lapic[ID]; // wait for write to finish, by reading 801026e4: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026e7: c7 80 80 03 00 00 80 movl $0x989680,0x380(%eax) 801026ee: 96 98 00 lapic[ID]; // wait for write to finish, by reading 801026f1: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026f4: c7 80 50 03 00 00 00 movl $0x10000,0x350(%eax) 801026fb: 00 01 00 lapic[ID]; // wait for write to finish, by reading 801026fe: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 80102701: c7 80 60 03 00 00 00 movl $0x10000,0x360(%eax) 80102708: 00 01 00 lapic[ID]; // wait for write to finish, by reading 8010270b: 8b 50 20 mov 0x20(%eax),%edx if(((lapic[VER]>>16) & 0xFF) >= 4) 8010270e: 8b 50 30 mov 0x30(%eax),%edx 80102711: c1 ea 10 shr $0x10,%edx 80102714: 80 fa 03 cmp $0x3,%dl 80102717: 77 6f ja 80102788 <lapicinit+0xd8> lapic[index] = value; 80102719: c7 80 70 03 00 00 33 movl $0x33,0x370(%eax) 80102720: 00 00 00 lapic[ID]; // wait for write to finish, by reading 80102723: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 80102726: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax) 8010272d: 00 00 00 lapic[ID]; // wait for write to finish, by reading 80102730: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 80102733: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax) 8010273a: 00 00 00 lapic[ID]; // wait for write to finish, by reading 8010273d: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 80102740: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax) 80102747: 00 00 00 lapic[ID]; // wait for write to finish, by reading 8010274a: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010274d: c7 80 10 03 00 00 00 movl $0x0,0x310(%eax) 80102754: 00 00 00 lapic[ID]; // wait for write to finish, by reading 80102757: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010275a: c7 80 00 03 00 00 00 movl $0x88500,0x300(%eax) 80102761: 85 08 00 lapic[ID]; // wait for write to finish, by reading 80102764: 8b 50 20 mov 0x20(%eax),%edx 80102767: 90 nop while(lapic[ICRLO] & DELIVS) 80102768: 8b 90 00 03 00 00 mov 0x300(%eax),%edx 8010276e: 80 e6 10 and $0x10,%dh 80102771: 75 f5 jne 80102768 <lapicinit+0xb8> lapic[index] = value; 80102773: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 8010277a: 00 00 00 lapic[ID]; // wait for write to finish, by reading 8010277d: 8b 40 20 mov 0x20(%eax),%eax } 80102780: 5d pop %ebp 80102781: c3 ret 80102782: 8d b6 00 00 00 00 lea 0x0(%esi),%esi lapic[index] = value; 80102788: c7 80 40 03 00 00 00 movl $0x10000,0x340(%eax) 8010278f: 00 01 00 lapic[ID]; // wait for write to finish, by reading 80102792: 8b 50 20 mov 0x20(%eax),%edx 80102795: eb 82 jmp 80102719 <lapicinit+0x69> 80102797: 89 f6 mov %esi,%esi 80102799: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801027a0 <lapicid>: if (!lapic) 801027a0: a1 7c 26 11 80 mov 0x8011267c,%eax { 801027a5: 55 push %ebp 801027a6: 89 e5 mov %esp,%ebp if (!lapic) 801027a8: 85 c0 test %eax,%eax 801027aa: 74 0c je 801027b8 <lapicid+0x18> return lapic[ID] >> 24; 801027ac: 8b 40 20 mov 0x20(%eax),%eax } 801027af: 5d pop %ebp return lapic[ID] >> 24; 801027b0: c1 e8 18 shr $0x18,%eax } 801027b3: c3 ret 801027b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 801027b8: 31 c0 xor %eax,%eax } 801027ba: 5d pop %ebp 801027bb: c3 ret 801027bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801027c0 <lapiceoi>: if(lapic) 801027c0: a1 7c 26 11 80 mov 0x8011267c,%eax { 801027c5: 55 push %ebp 801027c6: 89 e5 mov %esp,%ebp if(lapic) 801027c8: 85 c0 test %eax,%eax 801027ca: 74 0d je 801027d9 <lapiceoi+0x19> lapic[index] = value; 801027cc: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax) 801027d3: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801027d6: 8b 40 20 mov 0x20(%eax),%eax } 801027d9: 5d pop %ebp 801027da: c3 ret 801027db: 90 nop 801027dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801027e0 <microdelay>: { 801027e0: 55 push %ebp 801027e1: 89 e5 mov %esp,%ebp } 801027e3: 5d pop %ebp 801027e4: c3 ret 801027e5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801027e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801027f0 <lapicstartap>: { 801027f0: 55 push %ebp asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801027f1: ba 70 00 00 00 mov $0x70,%edx 801027f6: 89 e5 mov %esp,%ebp 801027f8: b8 0f 00 00 00 mov $0xf,%eax 801027fd: 53 push %ebx 801027fe: 8b 4d 08 mov 0x8(%ebp),%ecx 80102801: 8b 5d 0c mov 0xc(%ebp),%ebx 80102804: ee out %al,(%dx) 80102805: b8 0a 00 00 00 mov $0xa,%eax 8010280a: b2 71 mov $0x71,%dl 8010280c: ee out %al,(%dx) wrv[0] = 0; 8010280d: 31 c0 xor %eax,%eax 8010280f: 66 a3 67 04 00 80 mov %ax,0x80000467 wrv[1] = addr >> 4; 80102815: 89 d8 mov %ebx,%eax 80102817: c1 e8 04 shr $0x4,%eax 8010281a: 66 a3 69 04 00 80 mov %ax,0x80000469 lapic[index] = value; 80102820: a1 7c 26 11 80 mov 0x8011267c,%eax lapicw(ICRHI, apicid<<24); 80102825: c1 e1 18 shl $0x18,%ecx lapicw(ICRLO, STARTUP | (addr>>12)); 80102828: c1 eb 0c shr $0xc,%ebx lapic[index] = value; 8010282b: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 80102831: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 80102834: c7 80 00 03 00 00 00 movl $0xc500,0x300(%eax) 8010283b: c5 00 00 lapic[ID]; // wait for write to finish, by reading 8010283e: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 80102841: c7 80 00 03 00 00 00 movl $0x8500,0x300(%eax) 80102848: 85 00 00 lapic[ID]; // wait for write to finish, by reading 8010284b: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010284e: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 80102854: 8b 50 20 mov 0x20(%eax),%edx lapicw(ICRLO, STARTUP | (addr>>12)); 80102857: 89 da mov %ebx,%edx 80102859: 80 ce 06 or $0x6,%dh lapic[index] = value; 8010285c: 89 90 00 03 00 00 mov %edx,0x300(%eax) lapic[ID]; // wait for write to finish, by reading 80102862: 8b 58 20 mov 0x20(%eax),%ebx lapic[index] = value; 80102865: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 8010286b: 8b 48 20 mov 0x20(%eax),%ecx lapic[index] = value; 8010286e: 89 90 00 03 00 00 mov %edx,0x300(%eax) lapic[ID]; // wait for write to finish, by reading 80102874: 8b 40 20 mov 0x20(%eax),%eax } 80102877: 5b pop %ebx 80102878: 5d pop %ebp 80102879: c3 ret 8010287a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102880 <cmostime>: // qemu seems to use 24-hour GWT and the values are BCD encoded void cmostime(struct rtcdate *r) { 80102880: 55 push %ebp 80102881: ba 70 00 00 00 mov $0x70,%edx 80102886: 89 e5 mov %esp,%ebp 80102888: b8 0b 00 00 00 mov $0xb,%eax 8010288d: 57 push %edi 8010288e: 56 push %esi 8010288f: 53 push %ebx 80102890: 83 ec 4c sub $0x4c,%esp 80102893: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102894: b2 71 mov $0x71,%dl 80102896: ec in (%dx),%al 80102897: 88 45 b7 mov %al,-0x49(%ebp) 8010289a: 8d 5d b8 lea -0x48(%ebp),%ebx struct rtcdate t1, t2; int sb, bcd; sb = cmos_read(CMOS_STATB); bcd = (sb & (1 << 2)) == 0; 8010289d: 80 65 b7 04 andb $0x4,-0x49(%ebp) 801028a1: 8d 7d d0 lea -0x30(%ebp),%edi 801028a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801028a8: be 70 00 00 00 mov $0x70,%esi // make sure CMOS doesn't modify time while we read it for(;;) { fill_rtcdate(&t1); 801028ad: 89 d8 mov %ebx,%eax 801028af: e8 7c fd ff ff call 80102630 <fill_rtcdate> 801028b4: b8 0a 00 00 00 mov $0xa,%eax 801028b9: 89 f2 mov %esi,%edx 801028bb: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801028bc: ba 71 00 00 00 mov $0x71,%edx 801028c1: ec in (%dx),%al if(cmos_read(CMOS_STATA) & CMOS_UIP) 801028c2: 84 c0 test %al,%al 801028c4: 78 e7 js 801028ad <cmostime+0x2d> continue; fill_rtcdate(&t2); 801028c6: 89 f8 mov %edi,%eax 801028c8: e8 63 fd ff ff call 80102630 <fill_rtcdate> if(memcmp(&t1, &t2, sizeof(t1)) == 0) 801028cd: c7 44 24 08 18 00 00 movl $0x18,0x8(%esp) 801028d4: 00 801028d5: 89 7c 24 04 mov %edi,0x4(%esp) 801028d9: 89 1c 24 mov %ebx,(%esp) 801028dc: e8 5f 1a 00 00 call 80104340 <memcmp> 801028e1: 85 c0 test %eax,%eax 801028e3: 75 c3 jne 801028a8 <cmostime+0x28> break; } // convert if(bcd) { 801028e5: 80 7d b7 00 cmpb $0x0,-0x49(%ebp) 801028e9: 75 78 jne 80102963 <cmostime+0xe3> #define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf)) CONV(second); 801028eb: 8b 45 b8 mov -0x48(%ebp),%eax 801028ee: 89 c2 mov %eax,%edx 801028f0: 83 e0 0f and $0xf,%eax 801028f3: c1 ea 04 shr $0x4,%edx 801028f6: 8d 14 92 lea (%edx,%edx,4),%edx 801028f9: 8d 04 50 lea (%eax,%edx,2),%eax 801028fc: 89 45 b8 mov %eax,-0x48(%ebp) CONV(minute); 801028ff: 8b 45 bc mov -0x44(%ebp),%eax 80102902: 89 c2 mov %eax,%edx 80102904: 83 e0 0f and $0xf,%eax 80102907: c1 ea 04 shr $0x4,%edx 8010290a: 8d 14 92 lea (%edx,%edx,4),%edx 8010290d: 8d 04 50 lea (%eax,%edx,2),%eax 80102910: 89 45 bc mov %eax,-0x44(%ebp) CONV(hour ); 80102913: 8b 45 c0 mov -0x40(%ebp),%eax 80102916: 89 c2 mov %eax,%edx 80102918: 83 e0 0f and $0xf,%eax 8010291b: c1 ea 04 shr $0x4,%edx 8010291e: 8d 14 92 lea (%edx,%edx,4),%edx 80102921: 8d 04 50 lea (%eax,%edx,2),%eax 80102924: 89 45 c0 mov %eax,-0x40(%ebp) CONV(day ); 80102927: 8b 45 c4 mov -0x3c(%ebp),%eax 8010292a: 89 c2 mov %eax,%edx 8010292c: 83 e0 0f and $0xf,%eax 8010292f: c1 ea 04 shr $0x4,%edx 80102932: 8d 14 92 lea (%edx,%edx,4),%edx 80102935: 8d 04 50 lea (%eax,%edx,2),%eax 80102938: 89 45 c4 mov %eax,-0x3c(%ebp) CONV(month ); 8010293b: 8b 45 c8 mov -0x38(%ebp),%eax 8010293e: 89 c2 mov %eax,%edx 80102940: 83 e0 0f and $0xf,%eax 80102943: c1 ea 04 shr $0x4,%edx 80102946: 8d 14 92 lea (%edx,%edx,4),%edx 80102949: 8d 04 50 lea (%eax,%edx,2),%eax 8010294c: 89 45 c8 mov %eax,-0x38(%ebp) CONV(year ); 8010294f: 8b 45 cc mov -0x34(%ebp),%eax 80102952: 89 c2 mov %eax,%edx 80102954: 83 e0 0f and $0xf,%eax 80102957: c1 ea 04 shr $0x4,%edx 8010295a: 8d 14 92 lea (%edx,%edx,4),%edx 8010295d: 8d 04 50 lea (%eax,%edx,2),%eax 80102960: 89 45 cc mov %eax,-0x34(%ebp) #undef CONV } *r = t1; 80102963: 8b 4d 08 mov 0x8(%ebp),%ecx 80102966: 8b 45 b8 mov -0x48(%ebp),%eax 80102969: 89 01 mov %eax,(%ecx) 8010296b: 8b 45 bc mov -0x44(%ebp),%eax 8010296e: 89 41 04 mov %eax,0x4(%ecx) 80102971: 8b 45 c0 mov -0x40(%ebp),%eax 80102974: 89 41 08 mov %eax,0x8(%ecx) 80102977: 8b 45 c4 mov -0x3c(%ebp),%eax 8010297a: 89 41 0c mov %eax,0xc(%ecx) 8010297d: 8b 45 c8 mov -0x38(%ebp),%eax 80102980: 89 41 10 mov %eax,0x10(%ecx) 80102983: 8b 45 cc mov -0x34(%ebp),%eax 80102986: 89 41 14 mov %eax,0x14(%ecx) r->year += 2000; 80102989: 81 41 14 d0 07 00 00 addl $0x7d0,0x14(%ecx) } 80102990: 83 c4 4c add $0x4c,%esp 80102993: 5b pop %ebx 80102994: 5e pop %esi 80102995: 5f pop %edi 80102996: 5d pop %ebp 80102997: c3 ret 80102998: 66 90 xchg %ax,%ax 8010299a: 66 90 xchg %ax,%ax 8010299c: 66 90 xchg %ax,%ax 8010299e: 66 90 xchg %ax,%ax 801029a0 <install_trans>: } // Copy committed blocks from log to their home location static void install_trans(void) { 801029a0: 55 push %ebp 801029a1: 89 e5 mov %esp,%ebp 801029a3: 57 push %edi 801029a4: 56 push %esi 801029a5: 53 push %ebx int tail; for (tail = 0; tail < log.lh.n; tail++) { 801029a6: 31 db xor %ebx,%ebx { 801029a8: 83 ec 1c sub $0x1c,%esp for (tail = 0; tail < log.lh.n; tail++) { 801029ab: a1 c8 26 11 80 mov 0x801126c8,%eax 801029b0: 85 c0 test %eax,%eax 801029b2: 7e 78 jle 80102a2c <install_trans+0x8c> 801029b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block 801029b8: a1 b4 26 11 80 mov 0x801126b4,%eax 801029bd: 01 d8 add %ebx,%eax 801029bf: 83 c0 01 add $0x1,%eax 801029c2: 89 44 24 04 mov %eax,0x4(%esp) 801029c6: a1 c4 26 11 80 mov 0x801126c4,%eax 801029cb: 89 04 24 mov %eax,(%esp) 801029ce: e8 fd d6 ff ff call 801000d0 <bread> 801029d3: 89 c7 mov %eax,%edi struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 801029d5: 8b 04 9d cc 26 11 80 mov -0x7feed934(,%ebx,4),%eax for (tail = 0; tail < log.lh.n; tail++) { 801029dc: 83 c3 01 add $0x1,%ebx struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 801029df: 89 44 24 04 mov %eax,0x4(%esp) 801029e3: a1 c4 26 11 80 mov 0x801126c4,%eax 801029e8: 89 04 24 mov %eax,(%esp) 801029eb: e8 e0 d6 ff ff call 801000d0 <bread> memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst 801029f0: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 801029f7: 00 struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 801029f8: 89 c6 mov %eax,%esi memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst 801029fa: 8d 47 5c lea 0x5c(%edi),%eax 801029fd: 89 44 24 04 mov %eax,0x4(%esp) 80102a01: 8d 46 5c lea 0x5c(%esi),%eax 80102a04: 89 04 24 mov %eax,(%esp) 80102a07: e8 84 19 00 00 call 80104390 <memmove> bwrite(dbuf); // write dst to disk 80102a0c: 89 34 24 mov %esi,(%esp) 80102a0f: e8 8c d7 ff ff call 801001a0 <bwrite> brelse(lbuf); 80102a14: 89 3c 24 mov %edi,(%esp) 80102a17: e8 c4 d7 ff ff call 801001e0 <brelse> brelse(dbuf); 80102a1c: 89 34 24 mov %esi,(%esp) 80102a1f: e8 bc d7 ff ff call 801001e0 <brelse> for (tail = 0; tail < log.lh.n; tail++) { 80102a24: 39 1d c8 26 11 80 cmp %ebx,0x801126c8 80102a2a: 7f 8c jg 801029b8 <install_trans+0x18> } } 80102a2c: 83 c4 1c add $0x1c,%esp 80102a2f: 5b pop %ebx 80102a30: 5e pop %esi 80102a31: 5f pop %edi 80102a32: 5d pop %ebp 80102a33: c3 ret 80102a34: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102a3a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80102a40 <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) { 80102a40: 55 push %ebp 80102a41: 89 e5 mov %esp,%ebp 80102a43: 57 push %edi 80102a44: 56 push %esi 80102a45: 53 push %ebx 80102a46: 83 ec 1c sub $0x1c,%esp struct buf *buf = bread(log.dev, log.start); 80102a49: a1 b4 26 11 80 mov 0x801126b4,%eax 80102a4e: 89 44 24 04 mov %eax,0x4(%esp) 80102a52: a1 c4 26 11 80 mov 0x801126c4,%eax 80102a57: 89 04 24 mov %eax,(%esp) 80102a5a: e8 71 d6 ff ff call 801000d0 <bread> struct logheader *hb = (struct logheader *) (buf->data); int i; hb->n = log.lh.n; 80102a5f: 8b 1d c8 26 11 80 mov 0x801126c8,%ebx for (i = 0; i < log.lh.n; i++) { 80102a65: 31 d2 xor %edx,%edx 80102a67: 85 db test %ebx,%ebx struct buf *buf = bread(log.dev, log.start); 80102a69: 89 c7 mov %eax,%edi hb->n = log.lh.n; 80102a6b: 89 58 5c mov %ebx,0x5c(%eax) 80102a6e: 8d 70 5c lea 0x5c(%eax),%esi for (i = 0; i < log.lh.n; i++) { 80102a71: 7e 17 jle 80102a8a <write_head+0x4a> 80102a73: 90 nop 80102a74: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi hb->block[i] = log.lh.block[i]; 80102a78: 8b 0c 95 cc 26 11 80 mov -0x7feed934(,%edx,4),%ecx 80102a7f: 89 4c 96 04 mov %ecx,0x4(%esi,%edx,4) for (i = 0; i < log.lh.n; i++) { 80102a83: 83 c2 01 add $0x1,%edx 80102a86: 39 da cmp %ebx,%edx 80102a88: 75 ee jne 80102a78 <write_head+0x38> } bwrite(buf); 80102a8a: 89 3c 24 mov %edi,(%esp) 80102a8d: e8 0e d7 ff ff call 801001a0 <bwrite> brelse(buf); 80102a92: 89 3c 24 mov %edi,(%esp) 80102a95: e8 46 d7 ff ff call 801001e0 <brelse> } 80102a9a: 83 c4 1c add $0x1c,%esp 80102a9d: 5b pop %ebx 80102a9e: 5e pop %esi 80102a9f: 5f pop %edi 80102aa0: 5d pop %ebp 80102aa1: c3 ret 80102aa2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80102aa9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102ab0 <initlog>: { 80102ab0: 55 push %ebp 80102ab1: 89 e5 mov %esp,%ebp 80102ab3: 56 push %esi 80102ab4: 53 push %ebx 80102ab5: 83 ec 30 sub $0x30,%esp 80102ab8: 8b 5d 08 mov 0x8(%ebp),%ebx initlock(&log.lock, "log"); 80102abb: c7 44 24 04 20 73 10 movl $0x80107320,0x4(%esp) 80102ac2: 80 80102ac3: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102aca: e8 f1 15 00 00 call 801040c0 <initlock> readsb(dev, &sb); 80102acf: 8d 45 dc lea -0x24(%ebp),%eax 80102ad2: 89 44 24 04 mov %eax,0x4(%esp) 80102ad6: 89 1c 24 mov %ebx,(%esp) 80102ad9: e8 f2 e8 ff ff call 801013d0 <readsb> log.start = sb.logstart; 80102ade: 8b 45 ec mov -0x14(%ebp),%eax log.size = sb.nlog; 80102ae1: 8b 55 e8 mov -0x18(%ebp),%edx struct buf *buf = bread(log.dev, log.start); 80102ae4: 89 1c 24 mov %ebx,(%esp) log.dev = dev; 80102ae7: 89 1d c4 26 11 80 mov %ebx,0x801126c4 struct buf *buf = bread(log.dev, log.start); 80102aed: 89 44 24 04 mov %eax,0x4(%esp) log.size = sb.nlog; 80102af1: 89 15 b8 26 11 80 mov %edx,0x801126b8 log.start = sb.logstart; 80102af7: a3 b4 26 11 80 mov %eax,0x801126b4 struct buf *buf = bread(log.dev, log.start); 80102afc: e8 cf d5 ff ff call 801000d0 <bread> for (i = 0; i < log.lh.n; i++) { 80102b01: 31 d2 xor %edx,%edx log.lh.n = lh->n; 80102b03: 8b 58 5c mov 0x5c(%eax),%ebx 80102b06: 8d 70 5c lea 0x5c(%eax),%esi for (i = 0; i < log.lh.n; i++) { 80102b09: 85 db test %ebx,%ebx log.lh.n = lh->n; 80102b0b: 89 1d c8 26 11 80 mov %ebx,0x801126c8 for (i = 0; i < log.lh.n; i++) { 80102b11: 7e 17 jle 80102b2a <initlog+0x7a> 80102b13: 90 nop 80102b14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi log.lh.block[i] = lh->block[i]; 80102b18: 8b 4c 96 04 mov 0x4(%esi,%edx,4),%ecx 80102b1c: 89 0c 95 cc 26 11 80 mov %ecx,-0x7feed934(,%edx,4) for (i = 0; i < log.lh.n; i++) { 80102b23: 83 c2 01 add $0x1,%edx 80102b26: 39 da cmp %ebx,%edx 80102b28: 75 ee jne 80102b18 <initlog+0x68> brelse(buf); 80102b2a: 89 04 24 mov %eax,(%esp) 80102b2d: e8 ae d6 ff ff call 801001e0 <brelse> static void recover_from_log(void) { read_head(); install_trans(); // if committed, copy from log to disk 80102b32: e8 69 fe ff ff call 801029a0 <install_trans> log.lh.n = 0; 80102b37: c7 05 c8 26 11 80 00 movl $0x0,0x801126c8 80102b3e: 00 00 00 write_head(); // clear the log 80102b41: e8 fa fe ff ff call 80102a40 <write_head> } 80102b46: 83 c4 30 add $0x30,%esp 80102b49: 5b pop %ebx 80102b4a: 5e pop %esi 80102b4b: 5d pop %ebp 80102b4c: c3 ret 80102b4d: 8d 76 00 lea 0x0(%esi),%esi 80102b50 <begin_op>: } // called at the start of each FS system call. void begin_op(void) { 80102b50: 55 push %ebp 80102b51: 89 e5 mov %esp,%ebp 80102b53: 83 ec 18 sub $0x18,%esp acquire(&log.lock); 80102b56: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102b5d: e8 4e 16 00 00 call 801041b0 <acquire> 80102b62: eb 18 jmp 80102b7c <begin_op+0x2c> 80102b64: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(1){ if(log.committing){ sleep(&log, &log.lock); 80102b68: c7 44 24 04 80 26 11 movl $0x80112680,0x4(%esp) 80102b6f: 80 80102b70: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102b77: e8 d4 10 00 00 call 80103c50 <sleep> if(log.committing){ 80102b7c: a1 c0 26 11 80 mov 0x801126c0,%eax 80102b81: 85 c0 test %eax,%eax 80102b83: 75 e3 jne 80102b68 <begin_op+0x18> } else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){ 80102b85: a1 bc 26 11 80 mov 0x801126bc,%eax 80102b8a: 8b 15 c8 26 11 80 mov 0x801126c8,%edx 80102b90: 83 c0 01 add $0x1,%eax 80102b93: 8d 0c 80 lea (%eax,%eax,4),%ecx 80102b96: 8d 14 4a lea (%edx,%ecx,2),%edx 80102b99: 83 fa 1e cmp $0x1e,%edx 80102b9c: 7f ca jg 80102b68 <begin_op+0x18> // this op might exhaust log space; wait for commit. sleep(&log, &log.lock); } else { log.outstanding += 1; release(&log.lock); 80102b9e: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) log.outstanding += 1; 80102ba5: a3 bc 26 11 80 mov %eax,0x801126bc release(&log.lock); 80102baa: e8 f1 16 00 00 call 801042a0 <release> break; } } } 80102baf: c9 leave 80102bb0: c3 ret 80102bb1: eb 0d jmp 80102bc0 <end_op> 80102bb3: 90 nop 80102bb4: 90 nop 80102bb5: 90 nop 80102bb6: 90 nop 80102bb7: 90 nop 80102bb8: 90 nop 80102bb9: 90 nop 80102bba: 90 nop 80102bbb: 90 nop 80102bbc: 90 nop 80102bbd: 90 nop 80102bbe: 90 nop 80102bbf: 90 nop 80102bc0 <end_op>: // called at the end of each FS system call. // commits if this was the last outstanding operation. void end_op(void) { 80102bc0: 55 push %ebp 80102bc1: 89 e5 mov %esp,%ebp 80102bc3: 57 push %edi 80102bc4: 56 push %esi 80102bc5: 53 push %ebx 80102bc6: 83 ec 1c sub $0x1c,%esp int do_commit = 0; acquire(&log.lock); 80102bc9: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102bd0: e8 db 15 00 00 call 801041b0 <acquire> log.outstanding -= 1; 80102bd5: a1 bc 26 11 80 mov 0x801126bc,%eax if(log.committing) 80102bda: 8b 15 c0 26 11 80 mov 0x801126c0,%edx log.outstanding -= 1; 80102be0: 83 e8 01 sub $0x1,%eax if(log.committing) 80102be3: 85 d2 test %edx,%edx log.outstanding -= 1; 80102be5: a3 bc 26 11 80 mov %eax,0x801126bc if(log.committing) 80102bea: 0f 85 f3 00 00 00 jne 80102ce3 <end_op+0x123> panic("log.committing"); if(log.outstanding == 0){ 80102bf0: 85 c0 test %eax,%eax 80102bf2: 0f 85 cb 00 00 00 jne 80102cc3 <end_op+0x103> // begin_op() may be waiting for log space, // and decrementing log.outstanding has decreased // the amount of reserved space. wakeup(&log); } release(&log.lock); 80102bf8: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) } static void commit() { if (log.lh.n > 0) { 80102bff: 31 db xor %ebx,%ebx log.committing = 1; 80102c01: c7 05 c0 26 11 80 01 movl $0x1,0x801126c0 80102c08: 00 00 00 release(&log.lock); 80102c0b: e8 90 16 00 00 call 801042a0 <release> if (log.lh.n > 0) { 80102c10: a1 c8 26 11 80 mov 0x801126c8,%eax 80102c15: 85 c0 test %eax,%eax 80102c17: 0f 8e 90 00 00 00 jle 80102cad <end_op+0xed> 80102c1d: 8d 76 00 lea 0x0(%esi),%esi struct buf *to = bread(log.dev, log.start+tail+1); // log block 80102c20: a1 b4 26 11 80 mov 0x801126b4,%eax 80102c25: 01 d8 add %ebx,%eax 80102c27: 83 c0 01 add $0x1,%eax 80102c2a: 89 44 24 04 mov %eax,0x4(%esp) 80102c2e: a1 c4 26 11 80 mov 0x801126c4,%eax 80102c33: 89 04 24 mov %eax,(%esp) 80102c36: e8 95 d4 ff ff call 801000d0 <bread> 80102c3b: 89 c6 mov %eax,%esi struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102c3d: 8b 04 9d cc 26 11 80 mov -0x7feed934(,%ebx,4),%eax for (tail = 0; tail < log.lh.n; tail++) { 80102c44: 83 c3 01 add $0x1,%ebx struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102c47: 89 44 24 04 mov %eax,0x4(%esp) 80102c4b: a1 c4 26 11 80 mov 0x801126c4,%eax 80102c50: 89 04 24 mov %eax,(%esp) 80102c53: e8 78 d4 ff ff call 801000d0 <bread> memmove(to->data, from->data, BSIZE); 80102c58: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 80102c5f: 00 struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102c60: 89 c7 mov %eax,%edi memmove(to->data, from->data, BSIZE); 80102c62: 8d 40 5c lea 0x5c(%eax),%eax 80102c65: 89 44 24 04 mov %eax,0x4(%esp) 80102c69: 8d 46 5c lea 0x5c(%esi),%eax 80102c6c: 89 04 24 mov %eax,(%esp) 80102c6f: e8 1c 17 00 00 call 80104390 <memmove> bwrite(to); // write the log 80102c74: 89 34 24 mov %esi,(%esp) 80102c77: e8 24 d5 ff ff call 801001a0 <bwrite> brelse(from); 80102c7c: 89 3c 24 mov %edi,(%esp) 80102c7f: e8 5c d5 ff ff call 801001e0 <brelse> brelse(to); 80102c84: 89 34 24 mov %esi,(%esp) 80102c87: e8 54 d5 ff ff call 801001e0 <brelse> for (tail = 0; tail < log.lh.n; tail++) { 80102c8c: 3b 1d c8 26 11 80 cmp 0x801126c8,%ebx 80102c92: 7c 8c jl 80102c20 <end_op+0x60> write_log(); // Write modified blocks from cache to log write_head(); // Write header to disk -- the real commit 80102c94: e8 a7 fd ff ff call 80102a40 <write_head> install_trans(); // Now install writes to home locations 80102c99: e8 02 fd ff ff call 801029a0 <install_trans> log.lh.n = 0; 80102c9e: c7 05 c8 26 11 80 00 movl $0x0,0x801126c8 80102ca5: 00 00 00 write_head(); // Erase the transaction from the log 80102ca8: e8 93 fd ff ff call 80102a40 <write_head> acquire(&log.lock); 80102cad: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102cb4: e8 f7 14 00 00 call 801041b0 <acquire> log.committing = 0; 80102cb9: c7 05 c0 26 11 80 00 movl $0x0,0x801126c0 80102cc0: 00 00 00 wakeup(&log); 80102cc3: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102cca: e8 21 11 00 00 call 80103df0 <wakeup> release(&log.lock); 80102ccf: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102cd6: e8 c5 15 00 00 call 801042a0 <release> } 80102cdb: 83 c4 1c add $0x1c,%esp 80102cde: 5b pop %ebx 80102cdf: 5e pop %esi 80102ce0: 5f pop %edi 80102ce1: 5d pop %ebp 80102ce2: c3 ret panic("log.committing"); 80102ce3: c7 04 24 24 73 10 80 movl $0x80107324,(%esp) 80102cea: e8 71 d6 ff ff call 80100360 <panic> 80102cef: 90 nop 80102cf0 <log_write>: // modify bp->data[] // log_write(bp) // brelse(bp) void log_write(struct buf *b) { 80102cf0: 55 push %ebp 80102cf1: 89 e5 mov %esp,%ebp 80102cf3: 53 push %ebx 80102cf4: 83 ec 14 sub $0x14,%esp int i; if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) 80102cf7: a1 c8 26 11 80 mov 0x801126c8,%eax { 80102cfc: 8b 5d 08 mov 0x8(%ebp),%ebx if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) 80102cff: 83 f8 1d cmp $0x1d,%eax 80102d02: 0f 8f 98 00 00 00 jg 80102da0 <log_write+0xb0> 80102d08: 8b 0d b8 26 11 80 mov 0x801126b8,%ecx 80102d0e: 8d 51 ff lea -0x1(%ecx),%edx 80102d11: 39 d0 cmp %edx,%eax 80102d13: 0f 8d 87 00 00 00 jge 80102da0 <log_write+0xb0> panic("too big a transaction"); if (log.outstanding < 1) 80102d19: a1 bc 26 11 80 mov 0x801126bc,%eax 80102d1e: 85 c0 test %eax,%eax 80102d20: 0f 8e 86 00 00 00 jle 80102dac <log_write+0xbc> panic("log_write outside of trans"); acquire(&log.lock); 80102d26: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102d2d: e8 7e 14 00 00 call 801041b0 <acquire> for (i = 0; i < log.lh.n; i++) { 80102d32: 8b 15 c8 26 11 80 mov 0x801126c8,%edx 80102d38: 83 fa 00 cmp $0x0,%edx 80102d3b: 7e 54 jle 80102d91 <log_write+0xa1> if (log.lh.block[i] == b->blockno) // log absorbtion 80102d3d: 8b 4b 08 mov 0x8(%ebx),%ecx for (i = 0; i < log.lh.n; i++) { 80102d40: 31 c0 xor %eax,%eax if (log.lh.block[i] == b->blockno) // log absorbtion 80102d42: 39 0d cc 26 11 80 cmp %ecx,0x801126cc 80102d48: 75 0f jne 80102d59 <log_write+0x69> 80102d4a: eb 3c jmp 80102d88 <log_write+0x98> 80102d4c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102d50: 39 0c 85 cc 26 11 80 cmp %ecx,-0x7feed934(,%eax,4) 80102d57: 74 2f je 80102d88 <log_write+0x98> for (i = 0; i < log.lh.n; i++) { 80102d59: 83 c0 01 add $0x1,%eax 80102d5c: 39 d0 cmp %edx,%eax 80102d5e: 75 f0 jne 80102d50 <log_write+0x60> break; } log.lh.block[i] = b->blockno; 80102d60: 89 0c 95 cc 26 11 80 mov %ecx,-0x7feed934(,%edx,4) if (i == log.lh.n) log.lh.n++; 80102d67: 83 c2 01 add $0x1,%edx 80102d6a: 89 15 c8 26 11 80 mov %edx,0x801126c8 b->flags |= B_DIRTY; // prevent eviction 80102d70: 83 0b 04 orl $0x4,(%ebx) release(&log.lock); 80102d73: c7 45 08 80 26 11 80 movl $0x80112680,0x8(%ebp) } 80102d7a: 83 c4 14 add $0x14,%esp 80102d7d: 5b pop %ebx 80102d7e: 5d pop %ebp release(&log.lock); 80102d7f: e9 1c 15 00 00 jmp 801042a0 <release> 80102d84: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi log.lh.block[i] = b->blockno; 80102d88: 89 0c 85 cc 26 11 80 mov %ecx,-0x7feed934(,%eax,4) 80102d8f: eb df jmp 80102d70 <log_write+0x80> 80102d91: 8b 43 08 mov 0x8(%ebx),%eax 80102d94: a3 cc 26 11 80 mov %eax,0x801126cc if (i == log.lh.n) 80102d99: 75 d5 jne 80102d70 <log_write+0x80> 80102d9b: eb ca jmp 80102d67 <log_write+0x77> 80102d9d: 8d 76 00 lea 0x0(%esi),%esi panic("too big a transaction"); 80102da0: c7 04 24 33 73 10 80 movl $0x80107333,(%esp) 80102da7: e8 b4 d5 ff ff call 80100360 <panic> panic("log_write outside of trans"); 80102dac: c7 04 24 49 73 10 80 movl $0x80107349,(%esp) 80102db3: e8 a8 d5 ff ff call 80100360 <panic> 80102db8: 66 90 xchg %ax,%ax 80102dba: 66 90 xchg %ax,%ax 80102dbc: 66 90 xchg %ax,%ax 80102dbe: 66 90 xchg %ax,%ax 80102dc0 <mpmain>: } // Common CPU setup code. static void mpmain(void) { 80102dc0: 55 push %ebp 80102dc1: 89 e5 mov %esp,%ebp 80102dc3: 53 push %ebx 80102dc4: 83 ec 14 sub $0x14,%esp cprintf("cpu%d: starting %d\n", cpuid(), cpuid()); 80102dc7: e8 f4 08 00 00 call 801036c0 <cpuid> 80102dcc: 89 c3 mov %eax,%ebx 80102dce: e8 ed 08 00 00 call 801036c0 <cpuid> 80102dd3: 89 5c 24 08 mov %ebx,0x8(%esp) 80102dd7: c7 04 24 64 73 10 80 movl $0x80107364,(%esp) 80102dde: 89 44 24 04 mov %eax,0x4(%esp) 80102de2: e8 69 d8 ff ff call 80100650 <cprintf> idtinit(); // load idt register 80102de7: e8 c4 27 00 00 call 801055b0 <idtinit> xchg(&(mycpu()->started), 1); // tell startothers() we're up 80102dec: e8 4f 08 00 00 call 80103640 <mycpu> 80102df1: 89 c2 mov %eax,%edx xchg(volatile uint *addr, uint newval) { uint result; // The + in "+m" denotes a read-modify-write operand. asm volatile("lock; xchgl %0, %1" : 80102df3: b8 01 00 00 00 mov $0x1,%eax 80102df8: f0 87 82 a0 00 00 00 lock xchg %eax,0xa0(%edx) scheduler(); // start running processes 80102dff: e8 9c 0b 00 00 call 801039a0 <scheduler> 80102e04: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102e0a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80102e10 <mpenter>: { 80102e10: 55 push %ebp 80102e11: 89 e5 mov %esp,%ebp 80102e13: 83 ec 08 sub $0x8,%esp switchkvm(); 80102e16: e8 55 38 00 00 call 80106670 <switchkvm> seginit(); 80102e1b: e8 10 37 00 00 call 80106530 <seginit> lapicinit(); 80102e20: e8 8b f8 ff ff call 801026b0 <lapicinit> mpmain(); 80102e25: e8 96 ff ff ff call 80102dc0 <mpmain> 80102e2a: 66 90 xchg %ax,%ax 80102e2c: 66 90 xchg %ax,%ax 80102e2e: 66 90 xchg %ax,%ax 80102e30 <main>: { 80102e30: 55 push %ebp 80102e31: 89 e5 mov %esp,%ebp 80102e33: 53 push %ebx // 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++){ 80102e34: bb 80 27 11 80 mov $0x80112780,%ebx { 80102e39: 83 e4 f0 and $0xfffffff0,%esp 80102e3c: 83 ec 10 sub $0x10,%esp kinit1(end, P2V(4*1024*1024)); // phys page allocator 80102e3f: c7 44 24 04 00 00 40 movl $0x80400000,0x4(%esp) 80102e46: 80 80102e47: c7 04 24 f4 59 11 80 movl $0x801159f4,(%esp) 80102e4e: e8 cd f5 ff ff call 80102420 <kinit1> kvmalloc(); // kernel page table 80102e53: e8 c8 3c 00 00 call 80106b20 <kvmalloc> mpinit(); // detect other processors 80102e58: e8 73 01 00 00 call 80102fd0 <mpinit> 80102e5d: 8d 76 00 lea 0x0(%esi),%esi lapicinit(); // interrupt controller 80102e60: e8 4b f8 ff ff call 801026b0 <lapicinit> seginit(); // segment descriptors 80102e65: e8 c6 36 00 00 call 80106530 <seginit> picinit(); // disable pic 80102e6a: e8 21 03 00 00 call 80103190 <picinit> 80102e6f: 90 nop ioapicinit(); // another interrupt controller 80102e70: e8 cb f3 ff ff call 80102240 <ioapicinit> consoleinit(); // console hardware 80102e75: e8 d6 da ff ff call 80100950 <consoleinit> uartinit(); // serial port 80102e7a: e8 51 2a 00 00 call 801058d0 <uartinit> 80102e7f: 90 nop pinit(); // process table 80102e80: e8 9b 07 00 00 call 80103620 <pinit> shminit(); // shared memory 80102e85: e8 76 3f 00 00 call 80106e00 <shminit> tvinit(); // trap vectors 80102e8a: e8 81 26 00 00 call 80105510 <tvinit> 80102e8f: 90 nop binit(); // buffer cache 80102e90: e8 ab d1 ff ff call 80100040 <binit> fileinit(); // file table 80102e95: e8 e6 de ff ff call 80100d80 <fileinit> ideinit(); // disk 80102e9a: e8 a1 f1 ff ff call 80102040 <ideinit> memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); 80102e9f: c7 44 24 08 8a 00 00 movl $0x8a,0x8(%esp) 80102ea6: 00 80102ea7: c7 44 24 04 8c a4 10 movl $0x8010a48c,0x4(%esp) 80102eae: 80 80102eaf: c7 04 24 00 70 00 80 movl $0x80007000,(%esp) 80102eb6: e8 d5 14 00 00 call 80104390 <memmove> for(c = cpus; c < cpus+ncpu; c++){ 80102ebb: 69 05 00 2d 11 80 b0 imul $0xb0,0x80112d00,%eax 80102ec2: 00 00 00 80102ec5: 05 80 27 11 80 add $0x80112780,%eax 80102eca: 39 d8 cmp %ebx,%eax 80102ecc: 76 65 jbe 80102f33 <main+0x103> 80102ece: 66 90 xchg %ax,%ax if(c == mycpu()) // We've started already. 80102ed0: e8 6b 07 00 00 call 80103640 <mycpu> 80102ed5: 39 d8 cmp %ebx,%eax 80102ed7: 74 41 je 80102f1a <main+0xea> continue; // Tell entryother.S what stack to use, where to enter, and what // pgdir to use. We cannot use kpgdir yet, because the AP processor // is running in low memory, so we use entrypgdir for the APs too. stack = kalloc(); 80102ed9: e8 02 f6 ff ff call 801024e0 <kalloc> *(void**)(code-4) = stack + KSTACKSIZE; *(void**)(code-8) = mpenter; 80102ede: c7 05 f8 6f 00 80 10 movl $0x80102e10,0x80006ff8 80102ee5: 2e 10 80 *(int**)(code-12) = (void *) V2P(entrypgdir); 80102ee8: c7 05 f4 6f 00 80 00 movl $0x109000,0x80006ff4 80102eef: 90 10 00 *(void**)(code-4) = stack + KSTACKSIZE; 80102ef2: 05 00 10 00 00 add $0x1000,%eax 80102ef7: a3 fc 6f 00 80 mov %eax,0x80006ffc lapicstartap(c->apicid, V2P(code)); 80102efc: 0f b6 03 movzbl (%ebx),%eax 80102eff: c7 44 24 04 00 70 00 movl $0x7000,0x4(%esp) 80102f06: 00 80102f07: 89 04 24 mov %eax,(%esp) 80102f0a: e8 e1 f8 ff ff call 801027f0 <lapicstartap> 80102f0f: 90 nop // wait for cpu to finish mpmain() while(c->started == 0) 80102f10: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 80102f16: 85 c0 test %eax,%eax 80102f18: 74 f6 je 80102f10 <main+0xe0> for(c = cpus; c < cpus+ncpu; c++){ 80102f1a: 69 05 00 2d 11 80 b0 imul $0xb0,0x80112d00,%eax 80102f21: 00 00 00 80102f24: 81 c3 b0 00 00 00 add $0xb0,%ebx 80102f2a: 05 80 27 11 80 add $0x80112780,%eax 80102f2f: 39 c3 cmp %eax,%ebx 80102f31: 72 9d jb 80102ed0 <main+0xa0> kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers() 80102f33: c7 44 24 04 00 00 00 movl $0x8e000000,0x4(%esp) 80102f3a: 8e 80102f3b: c7 04 24 00 00 40 80 movl $0x80400000,(%esp) 80102f42: e8 49 f5 ff ff call 80102490 <kinit2> userinit(); // first user process 80102f47: e8 c4 07 00 00 call 80103710 <userinit> mpmain(); // finish this processor's setup 80102f4c: e8 6f fe ff ff call 80102dc0 <mpmain> 80102f51: 66 90 xchg %ax,%ax 80102f53: 66 90 xchg %ax,%ax 80102f55: 66 90 xchg %ax,%ax 80102f57: 66 90 xchg %ax,%ax 80102f59: 66 90 xchg %ax,%ax 80102f5b: 66 90 xchg %ax,%ax 80102f5d: 66 90 xchg %ax,%ax 80102f5f: 90 nop 80102f60 <mpsearch1>: } // Look for an MP structure in the len bytes at addr. static struct mp* mpsearch1(uint a, int len) { 80102f60: 55 push %ebp 80102f61: 89 e5 mov %esp,%ebp 80102f63: 56 push %esi uchar *e, *p, *addr; addr = P2V(a); 80102f64: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi { 80102f6a: 53 push %ebx e = addr+len; 80102f6b: 8d 1c 16 lea (%esi,%edx,1),%ebx { 80102f6e: 83 ec 10 sub $0x10,%esp for(p = addr; p < e; p += sizeof(struct mp)) 80102f71: 39 de cmp %ebx,%esi 80102f73: 73 3c jae 80102fb1 <mpsearch1+0x51> 80102f75: 8d 76 00 lea 0x0(%esi),%esi if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) 80102f78: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 80102f7f: 00 80102f80: c7 44 24 04 78 73 10 movl $0x80107378,0x4(%esp) 80102f87: 80 80102f88: 89 34 24 mov %esi,(%esp) 80102f8b: e8 b0 13 00 00 call 80104340 <memcmp> 80102f90: 85 c0 test %eax,%eax 80102f92: 75 16 jne 80102faa <mpsearch1+0x4a> 80102f94: 31 c9 xor %ecx,%ecx 80102f96: 31 d2 xor %edx,%edx sum += addr[i]; 80102f98: 0f b6 04 16 movzbl (%esi,%edx,1),%eax for(i=0; i<len; i++) 80102f9c: 83 c2 01 add $0x1,%edx sum += addr[i]; 80102f9f: 01 c1 add %eax,%ecx for(i=0; i<len; i++) 80102fa1: 83 fa 10 cmp $0x10,%edx 80102fa4: 75 f2 jne 80102f98 <mpsearch1+0x38> if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) 80102fa6: 84 c9 test %cl,%cl 80102fa8: 74 10 je 80102fba <mpsearch1+0x5a> for(p = addr; p < e; p += sizeof(struct mp)) 80102faa: 83 c6 10 add $0x10,%esi 80102fad: 39 f3 cmp %esi,%ebx 80102faf: 77 c7 ja 80102f78 <mpsearch1+0x18> return (struct mp*)p; return 0; } 80102fb1: 83 c4 10 add $0x10,%esp return 0; 80102fb4: 31 c0 xor %eax,%eax } 80102fb6: 5b pop %ebx 80102fb7: 5e pop %esi 80102fb8: 5d pop %ebp 80102fb9: c3 ret 80102fba: 83 c4 10 add $0x10,%esp 80102fbd: 89 f0 mov %esi,%eax 80102fbf: 5b pop %ebx 80102fc0: 5e pop %esi 80102fc1: 5d pop %ebp 80102fc2: c3 ret 80102fc3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102fc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102fd0 <mpinit>: return conf; } void mpinit(void) { 80102fd0: 55 push %ebp 80102fd1: 89 e5 mov %esp,%ebp 80102fd3: 57 push %edi 80102fd4: 56 push %esi 80102fd5: 53 push %ebx 80102fd6: 83 ec 1c sub $0x1c,%esp if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){ 80102fd9: 0f b6 05 0f 04 00 80 movzbl 0x8000040f,%eax 80102fe0: 0f b6 15 0e 04 00 80 movzbl 0x8000040e,%edx 80102fe7: c1 e0 08 shl $0x8,%eax 80102fea: 09 d0 or %edx,%eax 80102fec: c1 e0 04 shl $0x4,%eax 80102fef: 85 c0 test %eax,%eax 80102ff1: 75 1b jne 8010300e <mpinit+0x3e> p = ((bda[0x14]<<8)|bda[0x13])*1024; 80102ff3: 0f b6 05 14 04 00 80 movzbl 0x80000414,%eax 80102ffa: 0f b6 15 13 04 00 80 movzbl 0x80000413,%edx 80103001: c1 e0 08 shl $0x8,%eax 80103004: 09 d0 or %edx,%eax 80103006: c1 e0 0a shl $0xa,%eax if((mp = mpsearch1(p-1024, 1024))) 80103009: 2d 00 04 00 00 sub $0x400,%eax if((mp = mpsearch1(p, 1024))) 8010300e: ba 00 04 00 00 mov $0x400,%edx 80103013: e8 48 ff ff ff call 80102f60 <mpsearch1> 80103018: 85 c0 test %eax,%eax 8010301a: 89 c7 mov %eax,%edi 8010301c: 0f 84 22 01 00 00 je 80103144 <mpinit+0x174> if((mp = mpsearch()) == 0 || mp->physaddr == 0) 80103022: 8b 77 04 mov 0x4(%edi),%esi 80103025: 85 f6 test %esi,%esi 80103027: 0f 84 30 01 00 00 je 8010315d <mpinit+0x18d> conf = (struct mpconf*) P2V((uint) mp->physaddr); 8010302d: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax if(memcmp(conf, "PCMP", 4) != 0) 80103033: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 8010303a: 00 8010303b: c7 44 24 04 7d 73 10 movl $0x8010737d,0x4(%esp) 80103042: 80 80103043: 89 04 24 mov %eax,(%esp) conf = (struct mpconf*) P2V((uint) mp->physaddr); 80103046: 89 45 e4 mov %eax,-0x1c(%ebp) if(memcmp(conf, "PCMP", 4) != 0) 80103049: e8 f2 12 00 00 call 80104340 <memcmp> 8010304e: 85 c0 test %eax,%eax 80103050: 0f 85 07 01 00 00 jne 8010315d <mpinit+0x18d> if(conf->version != 1 && conf->version != 4) 80103056: 0f b6 86 06 00 00 80 movzbl -0x7ffffffa(%esi),%eax 8010305d: 3c 04 cmp $0x4,%al 8010305f: 0f 85 0b 01 00 00 jne 80103170 <mpinit+0x1a0> if(sum((uchar*)conf, conf->length) != 0) 80103065: 0f b7 86 04 00 00 80 movzwl -0x7ffffffc(%esi),%eax for(i=0; i<len; i++) 8010306c: 85 c0 test %eax,%eax 8010306e: 74 21 je 80103091 <mpinit+0xc1> sum = 0; 80103070: 31 c9 xor %ecx,%ecx for(i=0; i<len; i++) 80103072: 31 d2 xor %edx,%edx 80103074: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi sum += addr[i]; 80103078: 0f b6 9c 16 00 00 00 movzbl -0x80000000(%esi,%edx,1),%ebx 8010307f: 80 for(i=0; i<len; i++) 80103080: 83 c2 01 add $0x1,%edx sum += addr[i]; 80103083: 01 d9 add %ebx,%ecx for(i=0; i<len; i++) 80103085: 39 d0 cmp %edx,%eax 80103087: 7f ef jg 80103078 <mpinit+0xa8> if(sum((uchar*)conf, conf->length) != 0) 80103089: 84 c9 test %cl,%cl 8010308b: 0f 85 cc 00 00 00 jne 8010315d <mpinit+0x18d> struct mp *mp; struct mpconf *conf; struct mpproc *proc; struct mpioapic *ioapic; if((conf = mpconfig(&mp)) == 0) 80103091: 8b 45 e4 mov -0x1c(%ebp),%eax 80103094: 85 c0 test %eax,%eax 80103096: 0f 84 c1 00 00 00 je 8010315d <mpinit+0x18d> panic("Expect to run on an SMP"); ismp = 1; lapic = (uint*)conf->lapicaddr; 8010309c: 8b 86 24 00 00 80 mov -0x7fffffdc(%esi),%eax ismp = 1; 801030a2: bb 01 00 00 00 mov $0x1,%ebx lapic = (uint*)conf->lapicaddr; 801030a7: a3 7c 26 11 80 mov %eax,0x8011267c for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 801030ac: 0f b7 96 04 00 00 80 movzwl -0x7ffffffc(%esi),%edx 801030b3: 8d 86 2c 00 00 80 lea -0x7fffffd4(%esi),%eax 801030b9: 03 55 e4 add -0x1c(%ebp),%edx 801030bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801030c0: 39 c2 cmp %eax,%edx 801030c2: 76 1b jbe 801030df <mpinit+0x10f> 801030c4: 0f b6 08 movzbl (%eax),%ecx switch(*p){ 801030c7: 80 f9 04 cmp $0x4,%cl 801030ca: 77 74 ja 80103140 <mpinit+0x170> 801030cc: ff 24 8d bc 73 10 80 jmp *-0x7fef8c44(,%ecx,4) 801030d3: 90 nop 801030d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi p += sizeof(struct mpioapic); continue; case MPBUS: case MPIOINTR: case MPLINTR: p += 8; 801030d8: 83 c0 08 add $0x8,%eax for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 801030db: 39 c2 cmp %eax,%edx 801030dd: 77 e5 ja 801030c4 <mpinit+0xf4> default: ismp = 0; break; } } if(!ismp) 801030df: 85 db test %ebx,%ebx 801030e1: 0f 84 93 00 00 00 je 8010317a <mpinit+0x1aa> panic("Didn't find a suitable machine"); if(mp->imcrp){ 801030e7: 80 7f 0c 00 cmpb $0x0,0xc(%edi) 801030eb: 74 12 je 801030ff <mpinit+0x12f> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801030ed: ba 22 00 00 00 mov $0x22,%edx 801030f2: b8 70 00 00 00 mov $0x70,%eax 801030f7: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801030f8: b2 23 mov $0x23,%dl 801030fa: ec in (%dx),%al // Bochs doesn't support IMCR, so this doesn't run on Bochs. // But it would on real hardware. outb(0x22, 0x70); // Select IMCR outb(0x23, inb(0x23) | 1); // Mask external interrupts. 801030fb: 83 c8 01 or $0x1,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801030fe: ee out %al,(%dx) } } 801030ff: 83 c4 1c add $0x1c,%esp 80103102: 5b pop %ebx 80103103: 5e pop %esi 80103104: 5f pop %edi 80103105: 5d pop %ebp 80103106: c3 ret 80103107: 90 nop if(ncpu < NCPU) { 80103108: 8b 35 00 2d 11 80 mov 0x80112d00,%esi 8010310e: 83 fe 07 cmp $0x7,%esi 80103111: 7f 17 jg 8010312a <mpinit+0x15a> cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu 80103113: 0f b6 48 01 movzbl 0x1(%eax),%ecx 80103117: 69 f6 b0 00 00 00 imul $0xb0,%esi,%esi ncpu++; 8010311d: 83 05 00 2d 11 80 01 addl $0x1,0x80112d00 cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu 80103124: 88 8e 80 27 11 80 mov %cl,-0x7feed880(%esi) p += sizeof(struct mpproc); 8010312a: 83 c0 14 add $0x14,%eax continue; 8010312d: eb 91 jmp 801030c0 <mpinit+0xf0> 8010312f: 90 nop ioapicid = ioapic->apicno; 80103130: 0f b6 48 01 movzbl 0x1(%eax),%ecx p += sizeof(struct mpioapic); 80103134: 83 c0 08 add $0x8,%eax ioapicid = ioapic->apicno; 80103137: 88 0d 60 27 11 80 mov %cl,0x80112760 continue; 8010313d: eb 81 jmp 801030c0 <mpinit+0xf0> 8010313f: 90 nop ismp = 0; 80103140: 31 db xor %ebx,%ebx 80103142: eb 83 jmp 801030c7 <mpinit+0xf7> return mpsearch1(0xF0000, 0x10000); 80103144: ba 00 00 01 00 mov $0x10000,%edx 80103149: b8 00 00 0f 00 mov $0xf0000,%eax 8010314e: e8 0d fe ff ff call 80102f60 <mpsearch1> if((mp = mpsearch()) == 0 || mp->physaddr == 0) 80103153: 85 c0 test %eax,%eax return mpsearch1(0xF0000, 0x10000); 80103155: 89 c7 mov %eax,%edi if((mp = mpsearch()) == 0 || mp->physaddr == 0) 80103157: 0f 85 c5 fe ff ff jne 80103022 <mpinit+0x52> panic("Expect to run on an SMP"); 8010315d: c7 04 24 82 73 10 80 movl $0x80107382,(%esp) 80103164: e8 f7 d1 ff ff call 80100360 <panic> 80103169: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(conf->version != 1 && conf->version != 4) 80103170: 3c 01 cmp $0x1,%al 80103172: 0f 84 ed fe ff ff je 80103065 <mpinit+0x95> 80103178: eb e3 jmp 8010315d <mpinit+0x18d> panic("Didn't find a suitable machine"); 8010317a: c7 04 24 9c 73 10 80 movl $0x8010739c,(%esp) 80103181: e8 da d1 ff ff call 80100360 <panic> 80103186: 66 90 xchg %ax,%ax 80103188: 66 90 xchg %ax,%ax 8010318a: 66 90 xchg %ax,%ax 8010318c: 66 90 xchg %ax,%ax 8010318e: 66 90 xchg %ax,%ax 80103190 <picinit>: #define IO_PIC2 0xA0 // Slave (IRQs 8-15) // Don't use the 8259A interrupt controllers. Xv6 assumes SMP hardware. void picinit(void) { 80103190: 55 push %ebp 80103191: ba 21 00 00 00 mov $0x21,%edx 80103196: 89 e5 mov %esp,%ebp 80103198: b8 ff ff ff ff mov $0xffffffff,%eax 8010319d: ee out %al,(%dx) 8010319e: b2 a1 mov $0xa1,%dl 801031a0: ee out %al,(%dx) // mask all interrupts outb(IO_PIC1+1, 0xFF); outb(IO_PIC2+1, 0xFF); } 801031a1: 5d pop %ebp 801031a2: c3 ret 801031a3: 66 90 xchg %ax,%ax 801031a5: 66 90 xchg %ax,%ax 801031a7: 66 90 xchg %ax,%ax 801031a9: 66 90 xchg %ax,%ax 801031ab: 66 90 xchg %ax,%ax 801031ad: 66 90 xchg %ax,%ax 801031af: 90 nop 801031b0 <pipealloc>: int writeopen; // write fd is still open }; int pipealloc(struct file **f0, struct file **f1) { 801031b0: 55 push %ebp 801031b1: 89 e5 mov %esp,%ebp 801031b3: 57 push %edi 801031b4: 56 push %esi 801031b5: 53 push %ebx 801031b6: 83 ec 1c sub $0x1c,%esp 801031b9: 8b 75 08 mov 0x8(%ebp),%esi 801031bc: 8b 5d 0c mov 0xc(%ebp),%ebx struct pipe *p; p = 0; *f0 = *f1 = 0; 801031bf: c7 03 00 00 00 00 movl $0x0,(%ebx) 801031c5: c7 06 00 00 00 00 movl $0x0,(%esi) if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0) 801031cb: e8 d0 db ff ff call 80100da0 <filealloc> 801031d0: 85 c0 test %eax,%eax 801031d2: 89 06 mov %eax,(%esi) 801031d4: 0f 84 a4 00 00 00 je 8010327e <pipealloc+0xce> 801031da: e8 c1 db ff ff call 80100da0 <filealloc> 801031df: 85 c0 test %eax,%eax 801031e1: 89 03 mov %eax,(%ebx) 801031e3: 0f 84 87 00 00 00 je 80103270 <pipealloc+0xc0> goto bad; if((p = (struct pipe*)kalloc()) == 0) 801031e9: e8 f2 f2 ff ff call 801024e0 <kalloc> 801031ee: 85 c0 test %eax,%eax 801031f0: 89 c7 mov %eax,%edi 801031f2: 74 7c je 80103270 <pipealloc+0xc0> goto bad; p->readopen = 1; 801031f4: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax) 801031fb: 00 00 00 p->writeopen = 1; 801031fe: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax) 80103205: 00 00 00 p->nwrite = 0; 80103208: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax) 8010320f: 00 00 00 p->nread = 0; 80103212: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax) 80103219: 00 00 00 initlock(&p->lock, "pipe"); 8010321c: 89 04 24 mov %eax,(%esp) 8010321f: c7 44 24 04 d0 73 10 movl $0x801073d0,0x4(%esp) 80103226: 80 80103227: e8 94 0e 00 00 call 801040c0 <initlock> (*f0)->type = FD_PIPE; 8010322c: 8b 06 mov (%esi),%eax 8010322e: c7 00 01 00 00 00 movl $0x1,(%eax) (*f0)->readable = 1; 80103234: 8b 06 mov (%esi),%eax 80103236: c6 40 08 01 movb $0x1,0x8(%eax) (*f0)->writable = 0; 8010323a: 8b 06 mov (%esi),%eax 8010323c: c6 40 09 00 movb $0x0,0x9(%eax) (*f0)->pipe = p; 80103240: 8b 06 mov (%esi),%eax 80103242: 89 78 0c mov %edi,0xc(%eax) (*f1)->type = FD_PIPE; 80103245: 8b 03 mov (%ebx),%eax 80103247: c7 00 01 00 00 00 movl $0x1,(%eax) (*f1)->readable = 0; 8010324d: 8b 03 mov (%ebx),%eax 8010324f: c6 40 08 00 movb $0x0,0x8(%eax) (*f1)->writable = 1; 80103253: 8b 03 mov (%ebx),%eax 80103255: c6 40 09 01 movb $0x1,0x9(%eax) (*f1)->pipe = p; 80103259: 8b 03 mov (%ebx),%eax return 0; 8010325b: 31 db xor %ebx,%ebx (*f1)->pipe = p; 8010325d: 89 78 0c mov %edi,0xc(%eax) if(*f0) fileclose(*f0); if(*f1) fileclose(*f1); return -1; } 80103260: 83 c4 1c add $0x1c,%esp 80103263: 89 d8 mov %ebx,%eax 80103265: 5b pop %ebx 80103266: 5e pop %esi 80103267: 5f pop %edi 80103268: 5d pop %ebp 80103269: c3 ret 8010326a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(*f0) 80103270: 8b 06 mov (%esi),%eax 80103272: 85 c0 test %eax,%eax 80103274: 74 08 je 8010327e <pipealloc+0xce> fileclose(*f0); 80103276: 89 04 24 mov %eax,(%esp) 80103279: e8 e2 db ff ff call 80100e60 <fileclose> if(*f1) 8010327e: 8b 03 mov (%ebx),%eax return -1; 80103280: bb ff ff ff ff mov $0xffffffff,%ebx if(*f1) 80103285: 85 c0 test %eax,%eax 80103287: 74 d7 je 80103260 <pipealloc+0xb0> fileclose(*f1); 80103289: 89 04 24 mov %eax,(%esp) 8010328c: e8 cf db ff ff call 80100e60 <fileclose> } 80103291: 83 c4 1c add $0x1c,%esp 80103294: 89 d8 mov %ebx,%eax 80103296: 5b pop %ebx 80103297: 5e pop %esi 80103298: 5f pop %edi 80103299: 5d pop %ebp 8010329a: c3 ret 8010329b: 90 nop 8010329c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801032a0 <pipeclose>: void pipeclose(struct pipe *p, int writable) { 801032a0: 55 push %ebp 801032a1: 89 e5 mov %esp,%ebp 801032a3: 56 push %esi 801032a4: 53 push %ebx 801032a5: 83 ec 10 sub $0x10,%esp 801032a8: 8b 5d 08 mov 0x8(%ebp),%ebx 801032ab: 8b 75 0c mov 0xc(%ebp),%esi acquire(&p->lock); 801032ae: 89 1c 24 mov %ebx,(%esp) 801032b1: e8 fa 0e 00 00 call 801041b0 <acquire> if(writable){ 801032b6: 85 f6 test %esi,%esi 801032b8: 74 3e je 801032f8 <pipeclose+0x58> p->writeopen = 0; wakeup(&p->nread); 801032ba: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax p->writeopen = 0; 801032c0: c7 83 40 02 00 00 00 movl $0x0,0x240(%ebx) 801032c7: 00 00 00 wakeup(&p->nread); 801032ca: 89 04 24 mov %eax,(%esp) 801032cd: e8 1e 0b 00 00 call 80103df0 <wakeup> } else { p->readopen = 0; wakeup(&p->nwrite); } if(p->readopen == 0 && p->writeopen == 0){ 801032d2: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx 801032d8: 85 d2 test %edx,%edx 801032da: 75 0a jne 801032e6 <pipeclose+0x46> 801032dc: 8b 83 40 02 00 00 mov 0x240(%ebx),%eax 801032e2: 85 c0 test %eax,%eax 801032e4: 74 32 je 80103318 <pipeclose+0x78> release(&p->lock); kfree((char*)p); } else release(&p->lock); 801032e6: 89 5d 08 mov %ebx,0x8(%ebp) } 801032e9: 83 c4 10 add $0x10,%esp 801032ec: 5b pop %ebx 801032ed: 5e pop %esi 801032ee: 5d pop %ebp release(&p->lock); 801032ef: e9 ac 0f 00 00 jmp 801042a0 <release> 801032f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi wakeup(&p->nwrite); 801032f8: 8d 83 38 02 00 00 lea 0x238(%ebx),%eax p->readopen = 0; 801032fe: c7 83 3c 02 00 00 00 movl $0x0,0x23c(%ebx) 80103305: 00 00 00 wakeup(&p->nwrite); 80103308: 89 04 24 mov %eax,(%esp) 8010330b: e8 e0 0a 00 00 call 80103df0 <wakeup> 80103310: eb c0 jmp 801032d2 <pipeclose+0x32> 80103312: 8d b6 00 00 00 00 lea 0x0(%esi),%esi release(&p->lock); 80103318: 89 1c 24 mov %ebx,(%esp) 8010331b: e8 80 0f 00 00 call 801042a0 <release> kfree((char*)p); 80103320: 89 5d 08 mov %ebx,0x8(%ebp) } 80103323: 83 c4 10 add $0x10,%esp 80103326: 5b pop %ebx 80103327: 5e pop %esi 80103328: 5d pop %ebp kfree((char*)p); 80103329: e9 02 f0 ff ff jmp 80102330 <kfree> 8010332e: 66 90 xchg %ax,%ax 80103330 <pipewrite>: //PAGEBREAK: 40 int pipewrite(struct pipe *p, char *addr, int n) { 80103330: 55 push %ebp 80103331: 89 e5 mov %esp,%ebp 80103333: 57 push %edi 80103334: 56 push %esi 80103335: 53 push %ebx 80103336: 83 ec 1c sub $0x1c,%esp 80103339: 8b 5d 08 mov 0x8(%ebp),%ebx int i; acquire(&p->lock); 8010333c: 89 1c 24 mov %ebx,(%esp) 8010333f: e8 6c 0e 00 00 call 801041b0 <acquire> for(i = 0; i < n; i++){ 80103344: 8b 4d 10 mov 0x10(%ebp),%ecx 80103347: 85 c9 test %ecx,%ecx 80103349: 0f 8e b2 00 00 00 jle 80103401 <pipewrite+0xd1> 8010334f: 8b 4d 0c mov 0xc(%ebp),%ecx while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full if(p->readopen == 0 || myproc()->killed){ release(&p->lock); return -1; } wakeup(&p->nread); 80103352: 8d bb 34 02 00 00 lea 0x234(%ebx),%edi 80103358: 8b 83 38 02 00 00 mov 0x238(%ebx),%eax sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep 8010335e: 8d b3 38 02 00 00 lea 0x238(%ebx),%esi 80103364: 89 4d e4 mov %ecx,-0x1c(%ebp) 80103367: 03 4d 10 add 0x10(%ebp),%ecx 8010336a: 89 4d e0 mov %ecx,-0x20(%ebp) while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 8010336d: 8b 8b 34 02 00 00 mov 0x234(%ebx),%ecx 80103373: 81 c1 00 02 00 00 add $0x200,%ecx 80103379: 39 c8 cmp %ecx,%eax 8010337b: 74 38 je 801033b5 <pipewrite+0x85> 8010337d: eb 55 jmp 801033d4 <pipewrite+0xa4> 8010337f: 90 nop if(p->readopen == 0 || myproc()->killed){ 80103380: e8 5b 03 00 00 call 801036e0 <myproc> 80103385: 8b 40 24 mov 0x24(%eax),%eax 80103388: 85 c0 test %eax,%eax 8010338a: 75 33 jne 801033bf <pipewrite+0x8f> wakeup(&p->nread); 8010338c: 89 3c 24 mov %edi,(%esp) 8010338f: e8 5c 0a 00 00 call 80103df0 <wakeup> sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep 80103394: 89 5c 24 04 mov %ebx,0x4(%esp) 80103398: 89 34 24 mov %esi,(%esp) 8010339b: e8 b0 08 00 00 call 80103c50 <sleep> while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 801033a0: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax 801033a6: 8b 93 38 02 00 00 mov 0x238(%ebx),%edx 801033ac: 05 00 02 00 00 add $0x200,%eax 801033b1: 39 c2 cmp %eax,%edx 801033b3: 75 23 jne 801033d8 <pipewrite+0xa8> if(p->readopen == 0 || myproc()->killed){ 801033b5: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx 801033bb: 85 d2 test %edx,%edx 801033bd: 75 c1 jne 80103380 <pipewrite+0x50> release(&p->lock); 801033bf: 89 1c 24 mov %ebx,(%esp) 801033c2: e8 d9 0e 00 00 call 801042a0 <release> return -1; 801033c7: b8 ff ff ff ff mov $0xffffffff,%eax p->data[p->nwrite++ % PIPESIZE] = addr[i]; } wakeup(&p->nread); //DOC: pipewrite-wakeup1 release(&p->lock); return n; } 801033cc: 83 c4 1c add $0x1c,%esp 801033cf: 5b pop %ebx 801033d0: 5e pop %esi 801033d1: 5f pop %edi 801033d2: 5d pop %ebp 801033d3: c3 ret while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 801033d4: 89 c2 mov %eax,%edx 801033d6: 66 90 xchg %ax,%ax p->data[p->nwrite++ % PIPESIZE] = addr[i]; 801033d8: 8b 4d e4 mov -0x1c(%ebp),%ecx 801033db: 8d 42 01 lea 0x1(%edx),%eax 801033de: 81 e2 ff 01 00 00 and $0x1ff,%edx 801033e4: 89 83 38 02 00 00 mov %eax,0x238(%ebx) 801033ea: 83 45 e4 01 addl $0x1,-0x1c(%ebp) 801033ee: 0f b6 09 movzbl (%ecx),%ecx 801033f1: 88 4c 13 34 mov %cl,0x34(%ebx,%edx,1) for(i = 0; i < n; i++){ 801033f5: 8b 4d e4 mov -0x1c(%ebp),%ecx 801033f8: 3b 4d e0 cmp -0x20(%ebp),%ecx 801033fb: 0f 85 6c ff ff ff jne 8010336d <pipewrite+0x3d> wakeup(&p->nread); //DOC: pipewrite-wakeup1 80103401: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax 80103407: 89 04 24 mov %eax,(%esp) 8010340a: e8 e1 09 00 00 call 80103df0 <wakeup> release(&p->lock); 8010340f: 89 1c 24 mov %ebx,(%esp) 80103412: e8 89 0e 00 00 call 801042a0 <release> return n; 80103417: 8b 45 10 mov 0x10(%ebp),%eax 8010341a: eb b0 jmp 801033cc <pipewrite+0x9c> 8010341c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103420 <piperead>: int piperead(struct pipe *p, char *addr, int n) { 80103420: 55 push %ebp 80103421: 89 e5 mov %esp,%ebp 80103423: 57 push %edi 80103424: 56 push %esi 80103425: 53 push %ebx 80103426: 83 ec 1c sub $0x1c,%esp 80103429: 8b 75 08 mov 0x8(%ebp),%esi 8010342c: 8b 7d 0c mov 0xc(%ebp),%edi int i; acquire(&p->lock); 8010342f: 89 34 24 mov %esi,(%esp) 80103432: e8 79 0d 00 00 call 801041b0 <acquire> while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 80103437: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 8010343d: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 80103443: 75 5b jne 801034a0 <piperead+0x80> 80103445: 8b 9e 40 02 00 00 mov 0x240(%esi),%ebx 8010344b: 85 db test %ebx,%ebx 8010344d: 74 51 je 801034a0 <piperead+0x80> if(myproc()->killed){ release(&p->lock); return -1; } sleep(&p->nread, &p->lock); //DOC: piperead-sleep 8010344f: 8d 9e 34 02 00 00 lea 0x234(%esi),%ebx 80103455: eb 25 jmp 8010347c <piperead+0x5c> 80103457: 90 nop 80103458: 89 74 24 04 mov %esi,0x4(%esp) 8010345c: 89 1c 24 mov %ebx,(%esp) 8010345f: e8 ec 07 00 00 call 80103c50 <sleep> while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 80103464: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 8010346a: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 80103470: 75 2e jne 801034a0 <piperead+0x80> 80103472: 8b 96 40 02 00 00 mov 0x240(%esi),%edx 80103478: 85 d2 test %edx,%edx 8010347a: 74 24 je 801034a0 <piperead+0x80> if(myproc()->killed){ 8010347c: e8 5f 02 00 00 call 801036e0 <myproc> 80103481: 8b 48 24 mov 0x24(%eax),%ecx 80103484: 85 c9 test %ecx,%ecx 80103486: 74 d0 je 80103458 <piperead+0x38> release(&p->lock); 80103488: 89 34 24 mov %esi,(%esp) 8010348b: e8 10 0e 00 00 call 801042a0 <release> addr[i] = p->data[p->nread++ % PIPESIZE]; } wakeup(&p->nwrite); //DOC: piperead-wakeup release(&p->lock); return i; } 80103490: 83 c4 1c add $0x1c,%esp return -1; 80103493: b8 ff ff ff ff mov $0xffffffff,%eax } 80103498: 5b pop %ebx 80103499: 5e pop %esi 8010349a: 5f pop %edi 8010349b: 5d pop %ebp 8010349c: c3 ret 8010349d: 8d 76 00 lea 0x0(%esi),%esi for(i = 0; i < n; i++){ //DOC: piperead-copy 801034a0: 8b 55 10 mov 0x10(%ebp),%edx if(p->nread == p->nwrite) 801034a3: 31 db xor %ebx,%ebx for(i = 0; i < n; i++){ //DOC: piperead-copy 801034a5: 85 d2 test %edx,%edx 801034a7: 7f 2b jg 801034d4 <piperead+0xb4> 801034a9: eb 31 jmp 801034dc <piperead+0xbc> 801034ab: 90 nop 801034ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi addr[i] = p->data[p->nread++ % PIPESIZE]; 801034b0: 8d 48 01 lea 0x1(%eax),%ecx 801034b3: 25 ff 01 00 00 and $0x1ff,%eax 801034b8: 89 8e 34 02 00 00 mov %ecx,0x234(%esi) 801034be: 0f b6 44 06 34 movzbl 0x34(%esi,%eax,1),%eax 801034c3: 88 04 1f mov %al,(%edi,%ebx,1) for(i = 0; i < n; i++){ //DOC: piperead-copy 801034c6: 83 c3 01 add $0x1,%ebx 801034c9: 3b 5d 10 cmp 0x10(%ebp),%ebx 801034cc: 74 0e je 801034dc <piperead+0xbc> if(p->nread == p->nwrite) 801034ce: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 801034d4: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 801034da: 75 d4 jne 801034b0 <piperead+0x90> wakeup(&p->nwrite); //DOC: piperead-wakeup 801034dc: 8d 86 38 02 00 00 lea 0x238(%esi),%eax 801034e2: 89 04 24 mov %eax,(%esp) 801034e5: e8 06 09 00 00 call 80103df0 <wakeup> release(&p->lock); 801034ea: 89 34 24 mov %esi,(%esp) 801034ed: e8 ae 0d 00 00 call 801042a0 <release> } 801034f2: 83 c4 1c add $0x1c,%esp return i; 801034f5: 89 d8 mov %ebx,%eax } 801034f7: 5b pop %ebx 801034f8: 5e pop %esi 801034f9: 5f pop %edi 801034fa: 5d pop %ebp 801034fb: c3 ret 801034fc: 66 90 xchg %ax,%ax 801034fe: 66 90 xchg %ax,%ax 80103500 <allocproc>: // If found, change state to EMBRYO and initialize // state required to run in the kernel. // Otherwise return 0. static struct proc* allocproc(void) { 80103500: 55 push %ebp 80103501: 89 e5 mov %esp,%ebp 80103503: 53 push %ebx struct proc *p; char *sp; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103504: bb 54 2d 11 80 mov $0x80112d54,%ebx { 80103509: 83 ec 14 sub $0x14,%esp acquire(&ptable.lock); 8010350c: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103513: e8 98 0c 00 00 call 801041b0 <acquire> 80103518: eb 14 jmp 8010352e <allocproc+0x2e> 8010351a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103520: 81 c3 84 00 00 00 add $0x84,%ebx 80103526: 81 fb 54 4e 11 80 cmp $0x80114e54,%ebx 8010352c: 74 7a je 801035a8 <allocproc+0xa8> if(p->state == UNUSED) 8010352e: 8b 43 0c mov 0xc(%ebx),%eax 80103531: 85 c0 test %eax,%eax 80103533: 75 eb jne 80103520 <allocproc+0x20> release(&ptable.lock); return 0; found: p->state = EMBRYO; p->pid = nextpid++; 80103535: a1 04 a0 10 80 mov 0x8010a004,%eax release(&ptable.lock); 8010353a: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) p->state = EMBRYO; 80103541: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx) p->pid = nextpid++; 80103548: 8d 50 01 lea 0x1(%eax),%edx 8010354b: 89 15 04 a0 10 80 mov %edx,0x8010a004 80103551: 89 43 10 mov %eax,0x10(%ebx) release(&ptable.lock); 80103554: e8 47 0d 00 00 call 801042a0 <release> // Allocate kernel stack. if((p->kstack = kalloc()) == 0){ 80103559: e8 82 ef ff ff call 801024e0 <kalloc> 8010355e: 85 c0 test %eax,%eax 80103560: 89 43 08 mov %eax,0x8(%ebx) 80103563: 74 57 je 801035bc <allocproc+0xbc> return 0; } sp = p->kstack + KSTACKSIZE; // Leave room for trap frame. sp -= sizeof *p->tf; 80103565: 8d 90 b4 0f 00 00 lea 0xfb4(%eax),%edx // Set up new context to start executing at forkret, // which returns to trapret. sp -= 4; *(uint*)sp = (uint)trapret; sp -= sizeof *p->context; 8010356b: 05 9c 0f 00 00 add $0xf9c,%eax sp -= sizeof *p->tf; 80103570: 89 53 18 mov %edx,0x18(%ebx) *(uint*)sp = (uint)trapret; 80103573: c7 40 14 05 55 10 80 movl $0x80105505,0x14(%eax) p->context = (struct context*)sp; memset(p->context, 0, sizeof *p->context); 8010357a: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 80103581: 00 80103582: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80103589: 00 8010358a: 89 04 24 mov %eax,(%esp) p->context = (struct context*)sp; 8010358d: 89 43 1c mov %eax,0x1c(%ebx) memset(p->context, 0, sizeof *p->context); 80103590: e8 5b 0d 00 00 call 801042f0 <memset> p->context->eip = (uint)forkret; 80103595: 8b 43 1c mov 0x1c(%ebx),%eax 80103598: c7 40 10 d0 35 10 80 movl $0x801035d0,0x10(%eax) return p; 8010359f: 89 d8 mov %ebx,%eax } 801035a1: 83 c4 14 add $0x14,%esp 801035a4: 5b pop %ebx 801035a5: 5d pop %ebp 801035a6: c3 ret 801035a7: 90 nop release(&ptable.lock); 801035a8: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801035af: e8 ec 0c 00 00 call 801042a0 <release> } 801035b4: 83 c4 14 add $0x14,%esp return 0; 801035b7: 31 c0 xor %eax,%eax } 801035b9: 5b pop %ebx 801035ba: 5d pop %ebp 801035bb: c3 ret p->state = UNUSED; 801035bc: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) return 0; 801035c3: eb dc jmp 801035a1 <allocproc+0xa1> 801035c5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801035c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801035d0 <forkret>: // A fork child's very first scheduling by scheduler() // will swtch here. "Return" to user space. void forkret(void) { 801035d0: 55 push %ebp 801035d1: 89 e5 mov %esp,%ebp 801035d3: 83 ec 18 sub $0x18,%esp static int first = 1; // Still holding ptable.lock from scheduler. release(&ptable.lock); 801035d6: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801035dd: e8 be 0c 00 00 call 801042a0 <release> if (first) { 801035e2: a1 00 a0 10 80 mov 0x8010a000,%eax 801035e7: 85 c0 test %eax,%eax 801035e9: 75 05 jne 801035f0 <forkret+0x20> iinit(ROOTDEV); initlog(ROOTDEV); } // Return to "caller", actually trapret (see allocproc). } 801035eb: c9 leave 801035ec: c3 ret 801035ed: 8d 76 00 lea 0x0(%esi),%esi iinit(ROOTDEV); 801035f0: c7 04 24 01 00 00 00 movl $0x1,(%esp) first = 0; 801035f7: c7 05 00 a0 10 80 00 movl $0x0,0x8010a000 801035fe: 00 00 00 iinit(ROOTDEV); 80103601: e8 aa de ff ff call 801014b0 <iinit> initlog(ROOTDEV); 80103606: c7 04 24 01 00 00 00 movl $0x1,(%esp) 8010360d: e8 9e f4 ff ff call 80102ab0 <initlog> } 80103612: c9 leave 80103613: c3 ret 80103614: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8010361a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80103620 <pinit>: { 80103620: 55 push %ebp 80103621: 89 e5 mov %esp,%ebp 80103623: 83 ec 18 sub $0x18,%esp initlock(&ptable.lock, "ptable"); 80103626: c7 44 24 04 d5 73 10 movl $0x801073d5,0x4(%esp) 8010362d: 80 8010362e: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103635: e8 86 0a 00 00 call 801040c0 <initlock> } 8010363a: c9 leave 8010363b: c3 ret 8010363c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103640 <mycpu>: { 80103640: 55 push %ebp 80103641: 89 e5 mov %esp,%ebp 80103643: 56 push %esi 80103644: 53 push %ebx 80103645: 83 ec 10 sub $0x10,%esp asm volatile("pushfl; popl %0" : "=r" (eflags)); 80103648: 9c pushf 80103649: 58 pop %eax if(readeflags()&FL_IF) 8010364a: f6 c4 02 test $0x2,%ah 8010364d: 75 57 jne 801036a6 <mycpu+0x66> apicid = lapicid(); 8010364f: e8 4c f1 ff ff call 801027a0 <lapicid> for (i = 0; i < ncpu; ++i) { 80103654: 8b 35 00 2d 11 80 mov 0x80112d00,%esi 8010365a: 85 f6 test %esi,%esi 8010365c: 7e 3c jle 8010369a <mycpu+0x5a> if (cpus[i].apicid == apicid) 8010365e: 0f b6 15 80 27 11 80 movzbl 0x80112780,%edx 80103665: 39 c2 cmp %eax,%edx 80103667: 74 2d je 80103696 <mycpu+0x56> 80103669: b9 30 28 11 80 mov $0x80112830,%ecx for (i = 0; i < ncpu; ++i) { 8010366e: 31 d2 xor %edx,%edx 80103670: 83 c2 01 add $0x1,%edx 80103673: 39 f2 cmp %esi,%edx 80103675: 74 23 je 8010369a <mycpu+0x5a> if (cpus[i].apicid == apicid) 80103677: 0f b6 19 movzbl (%ecx),%ebx 8010367a: 81 c1 b0 00 00 00 add $0xb0,%ecx 80103680: 39 c3 cmp %eax,%ebx 80103682: 75 ec jne 80103670 <mycpu+0x30> return &cpus[i]; 80103684: 69 c2 b0 00 00 00 imul $0xb0,%edx,%eax } 8010368a: 83 c4 10 add $0x10,%esp 8010368d: 5b pop %ebx 8010368e: 5e pop %esi 8010368f: 5d pop %ebp return &cpus[i]; 80103690: 05 80 27 11 80 add $0x80112780,%eax } 80103695: c3 ret for (i = 0; i < ncpu; ++i) { 80103696: 31 d2 xor %edx,%edx 80103698: eb ea jmp 80103684 <mycpu+0x44> panic("unknown apicid\n"); 8010369a: c7 04 24 dc 73 10 80 movl $0x801073dc,(%esp) 801036a1: e8 ba cc ff ff call 80100360 <panic> panic("mycpu called with interrupts enabled\n"); 801036a6: c7 04 24 b8 74 10 80 movl $0x801074b8,(%esp) 801036ad: e8 ae cc ff ff call 80100360 <panic> 801036b2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801036b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801036c0 <cpuid>: cpuid() { 801036c0: 55 push %ebp 801036c1: 89 e5 mov %esp,%ebp 801036c3: 83 ec 08 sub $0x8,%esp return mycpu()-cpus; 801036c6: e8 75 ff ff ff call 80103640 <mycpu> } 801036cb: c9 leave return mycpu()-cpus; 801036cc: 2d 80 27 11 80 sub $0x80112780,%eax 801036d1: c1 f8 04 sar $0x4,%eax 801036d4: 69 c0 a3 8b 2e ba imul $0xba2e8ba3,%eax,%eax } 801036da: c3 ret 801036db: 90 nop 801036dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801036e0 <myproc>: myproc(void) { 801036e0: 55 push %ebp 801036e1: 89 e5 mov %esp,%ebp 801036e3: 53 push %ebx 801036e4: 83 ec 04 sub $0x4,%esp pushcli(); 801036e7: e8 84 0a 00 00 call 80104170 <pushcli> c = mycpu(); 801036ec: e8 4f ff ff ff call 80103640 <mycpu> p = c->proc; 801036f1: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx popcli(); 801036f7: e8 34 0b 00 00 call 80104230 <popcli> } 801036fc: 83 c4 04 add $0x4,%esp 801036ff: 89 d8 mov %ebx,%eax 80103701: 5b pop %ebx 80103702: 5d pop %ebp 80103703: c3 ret 80103704: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8010370a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80103710 <userinit>: { 80103710: 55 push %ebp 80103711: 89 e5 mov %esp,%ebp 80103713: 53 push %ebx 80103714: 83 ec 14 sub $0x14,%esp p = allocproc(); 80103717: e8 e4 fd ff ff call 80103500 <allocproc> 8010371c: 89 c3 mov %eax,%ebx initproc = p; 8010371e: a3 b8 a5 10 80 mov %eax,0x8010a5b8 if((p->pgdir = setupkvm()) == 0) 80103723: e8 68 33 00 00 call 80106a90 <setupkvm> 80103728: 85 c0 test %eax,%eax 8010372a: 89 43 04 mov %eax,0x4(%ebx) 8010372d: 0f 84 d4 00 00 00 je 80103807 <userinit+0xf7> inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size); 80103733: 89 04 24 mov %eax,(%esp) 80103736: c7 44 24 08 2c 00 00 movl $0x2c,0x8(%esp) 8010373d: 00 8010373e: c7 44 24 04 60 a4 10 movl $0x8010a460,0x4(%esp) 80103745: 80 80103746: e8 55 30 00 00 call 801067a0 <inituvm> p->sz = PGSIZE; 8010374b: c7 03 00 10 00 00 movl $0x1000,(%ebx) memset(p->tf, 0, sizeof(*p->tf)); 80103751: c7 44 24 08 4c 00 00 movl $0x4c,0x8(%esp) 80103758: 00 80103759: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80103760: 00 80103761: 8b 43 18 mov 0x18(%ebx),%eax 80103764: 89 04 24 mov %eax,(%esp) 80103767: e8 84 0b 00 00 call 801042f0 <memset> p->tf->cs = (SEG_UCODE << 3) | DPL_USER; 8010376c: 8b 43 18 mov 0x18(%ebx),%eax 8010376f: ba 1b 00 00 00 mov $0x1b,%edx p->tf->ds = (SEG_UDATA << 3) | DPL_USER; 80103774: b9 23 00 00 00 mov $0x23,%ecx p->tf->cs = (SEG_UCODE << 3) | DPL_USER; 80103779: 66 89 50 3c mov %dx,0x3c(%eax) p->tf->ds = (SEG_UDATA << 3) | DPL_USER; 8010377d: 8b 43 18 mov 0x18(%ebx),%eax 80103780: 66 89 48 2c mov %cx,0x2c(%eax) p->tf->es = p->tf->ds; 80103784: 8b 43 18 mov 0x18(%ebx),%eax 80103787: 0f b7 50 2c movzwl 0x2c(%eax),%edx 8010378b: 66 89 50 28 mov %dx,0x28(%eax) p->tf->ss = p->tf->ds; 8010378f: 8b 43 18 mov 0x18(%ebx),%eax 80103792: 0f b7 50 2c movzwl 0x2c(%eax),%edx 80103796: 66 89 50 48 mov %dx,0x48(%eax) p->tf->eflags = FL_IF; 8010379a: 8b 43 18 mov 0x18(%ebx),%eax 8010379d: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax) p->tf->esp = PGSIZE; 801037a4: 8b 43 18 mov 0x18(%ebx),%eax 801037a7: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax) p->tf->eip = 0; // beginning of initcode.S 801037ae: 8b 43 18 mov 0x18(%ebx),%eax 801037b1: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) safestrcpy(p->name, "initcode", sizeof(p->name)); 801037b8: 8d 43 6c lea 0x6c(%ebx),%eax 801037bb: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 801037c2: 00 801037c3: c7 44 24 04 05 74 10 movl $0x80107405,0x4(%esp) 801037ca: 80 801037cb: 89 04 24 mov %eax,(%esp) 801037ce: e8 fd 0c 00 00 call 801044d0 <safestrcpy> p->cwd = namei("/"); 801037d3: c7 04 24 0e 74 10 80 movl $0x8010740e,(%esp) 801037da: e8 61 e7 ff ff call 80101f40 <namei> 801037df: 89 43 68 mov %eax,0x68(%ebx) acquire(&ptable.lock); 801037e2: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801037e9: e8 c2 09 00 00 call 801041b0 <acquire> p->state = RUNNABLE; 801037ee: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx) release(&ptable.lock); 801037f5: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801037fc: e8 9f 0a 00 00 call 801042a0 <release> } 80103801: 83 c4 14 add $0x14,%esp 80103804: 5b pop %ebx 80103805: 5d pop %ebp 80103806: c3 ret panic("userinit: out of memory?"); 80103807: c7 04 24 ec 73 10 80 movl $0x801073ec,(%esp) 8010380e: e8 4d cb ff ff call 80100360 <panic> 80103813: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80103819: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103820 <growproc>: { 80103820: 55 push %ebp 80103821: 89 e5 mov %esp,%ebp 80103823: 56 push %esi 80103824: 53 push %ebx 80103825: 83 ec 10 sub $0x10,%esp 80103828: 8b 75 08 mov 0x8(%ebp),%esi struct proc *curproc = myproc(); 8010382b: e8 b0 fe ff ff call 801036e0 <myproc> if(n > 0){ 80103830: 83 fe 00 cmp $0x0,%esi struct proc *curproc = myproc(); 80103833: 89 c3 mov %eax,%ebx sz = curproc->sz; 80103835: 8b 00 mov (%eax),%eax if(n > 0){ 80103837: 7e 2f jle 80103868 <growproc+0x48> if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0) 80103839: 01 c6 add %eax,%esi 8010383b: 89 74 24 08 mov %esi,0x8(%esp) 8010383f: 89 44 24 04 mov %eax,0x4(%esp) 80103843: 8b 43 04 mov 0x4(%ebx),%eax 80103846: 89 04 24 mov %eax,(%esp) 80103849: e8 a2 30 00 00 call 801068f0 <allocuvm> 8010384e: 85 c0 test %eax,%eax 80103850: 74 36 je 80103888 <growproc+0x68> curproc->sz = sz; 80103852: 89 03 mov %eax,(%ebx) switchuvm(curproc); 80103854: 89 1c 24 mov %ebx,(%esp) 80103857: e8 34 2e 00 00 call 80106690 <switchuvm> return 0; 8010385c: 31 c0 xor %eax,%eax } 8010385e: 83 c4 10 add $0x10,%esp 80103861: 5b pop %ebx 80103862: 5e pop %esi 80103863: 5d pop %ebp 80103864: c3 ret 80103865: 8d 76 00 lea 0x0(%esi),%esi } else if(n < 0){ 80103868: 74 e8 je 80103852 <growproc+0x32> if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0) 8010386a: 01 c6 add %eax,%esi 8010386c: 89 74 24 08 mov %esi,0x8(%esp) 80103870: 89 44 24 04 mov %eax,0x4(%esp) 80103874: 8b 43 04 mov 0x4(%ebx),%eax 80103877: 89 04 24 mov %eax,(%esp) 8010387a: e8 71 31 00 00 call 801069f0 <deallocuvm> 8010387f: 85 c0 test %eax,%eax 80103881: 75 cf jne 80103852 <growproc+0x32> 80103883: 90 nop 80103884: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80103888: b8 ff ff ff ff mov $0xffffffff,%eax 8010388d: eb cf jmp 8010385e <growproc+0x3e> 8010388f: 90 nop 80103890 <fork>: { 80103890: 55 push %ebp 80103891: 89 e5 mov %esp,%ebp 80103893: 57 push %edi 80103894: 56 push %esi 80103895: 53 push %ebx 80103896: 83 ec 1c sub $0x1c,%esp struct proc *curproc = myproc(); 80103899: e8 42 fe ff ff call 801036e0 <myproc> 8010389e: 89 c3 mov %eax,%ebx if((np = allocproc()) == 0){ 801038a0: e8 5b fc ff ff call 80103500 <allocproc> 801038a5: 85 c0 test %eax,%eax 801038a7: 89 c7 mov %eax,%edi 801038a9: 89 45 e4 mov %eax,-0x1c(%ebp) 801038ac: 0f 84 c4 00 00 00 je 80103976 <fork+0xe6> if((np->pgdir = copyuvm(curproc->pgdir, curproc->sz)) == 0){ 801038b2: 8b 03 mov (%ebx),%eax 801038b4: 89 44 24 04 mov %eax,0x4(%esp) 801038b8: 8b 43 04 mov 0x4(%ebx),%eax 801038bb: 89 04 24 mov %eax,(%esp) 801038be: e8 ad 32 00 00 call 80106b70 <copyuvm> 801038c3: 85 c0 test %eax,%eax 801038c5: 89 47 04 mov %eax,0x4(%edi) 801038c8: 0f 84 af 00 00 00 je 8010397d <fork+0xed> np->sz = curproc->sz; 801038ce: 8b 03 mov (%ebx),%eax 801038d0: 8b 4d e4 mov -0x1c(%ebp),%ecx 801038d3: 89 01 mov %eax,(%ecx) np->userStackTop = curproc->userStackTop; //lab3 801038d5: 8b 43 7c mov 0x7c(%ebx),%eax *np->tf = *curproc->tf; 801038d8: 8b 79 18 mov 0x18(%ecx),%edi np->parent = curproc; 801038db: 89 59 14 mov %ebx,0x14(%ecx) np->userStackTop = curproc->userStackTop; //lab3 801038de: 89 41 7c mov %eax,0x7c(%ecx) *np->tf = *curproc->tf; 801038e1: 8b 73 18 mov 0x18(%ebx),%esi 801038e4: 89 c8 mov %ecx,%eax 801038e6: b9 13 00 00 00 mov $0x13,%ecx 801038eb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) for(i = 0; i < NOFILE; i++) 801038ed: 31 f6 xor %esi,%esi np->tf->eax = 0; 801038ef: 8b 40 18 mov 0x18(%eax),%eax 801038f2: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) 801038f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(curproc->ofile[i]) 80103900: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax 80103904: 85 c0 test %eax,%eax 80103906: 74 0f je 80103917 <fork+0x87> np->ofile[i] = filedup(curproc->ofile[i]); 80103908: 89 04 24 mov %eax,(%esp) 8010390b: e8 00 d5 ff ff call 80100e10 <filedup> 80103910: 8b 55 e4 mov -0x1c(%ebp),%edx 80103913: 89 44 b2 28 mov %eax,0x28(%edx,%esi,4) for(i = 0; i < NOFILE; i++) 80103917: 83 c6 01 add $0x1,%esi 8010391a: 83 fe 10 cmp $0x10,%esi 8010391d: 75 e1 jne 80103900 <fork+0x70> np->cwd = idup(curproc->cwd); 8010391f: 8b 43 68 mov 0x68(%ebx),%eax safestrcpy(np->name, curproc->name, sizeof(curproc->name)); 80103922: 83 c3 6c add $0x6c,%ebx np->cwd = idup(curproc->cwd); 80103925: 89 04 24 mov %eax,(%esp) 80103928: e8 93 dd ff ff call 801016c0 <idup> 8010392d: 8b 7d e4 mov -0x1c(%ebp),%edi 80103930: 89 47 68 mov %eax,0x68(%edi) safestrcpy(np->name, curproc->name, sizeof(curproc->name)); 80103933: 8d 47 6c lea 0x6c(%edi),%eax 80103936: 89 5c 24 04 mov %ebx,0x4(%esp) 8010393a: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80103941: 00 80103942: 89 04 24 mov %eax,(%esp) 80103945: e8 86 0b 00 00 call 801044d0 <safestrcpy> pid = np->pid; 8010394a: 8b 5f 10 mov 0x10(%edi),%ebx acquire(&ptable.lock); 8010394d: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103954: e8 57 08 00 00 call 801041b0 <acquire> np->state = RUNNABLE; 80103959: c7 47 0c 03 00 00 00 movl $0x3,0xc(%edi) release(&ptable.lock); 80103960: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103967: e8 34 09 00 00 call 801042a0 <release> return pid; 8010396c: 89 d8 mov %ebx,%eax } 8010396e: 83 c4 1c add $0x1c,%esp 80103971: 5b pop %ebx 80103972: 5e pop %esi 80103973: 5f pop %edi 80103974: 5d pop %ebp 80103975: c3 ret return -1; 80103976: b8 ff ff ff ff mov $0xffffffff,%eax 8010397b: eb f1 jmp 8010396e <fork+0xde> kfree(np->kstack); 8010397d: 8b 7d e4 mov -0x1c(%ebp),%edi 80103980: 8b 47 08 mov 0x8(%edi),%eax 80103983: 89 04 24 mov %eax,(%esp) 80103986: e8 a5 e9 ff ff call 80102330 <kfree> return -1; 8010398b: b8 ff ff ff ff mov $0xffffffff,%eax np->kstack = 0; 80103990: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) np->state = UNUSED; 80103997: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) return -1; 8010399e: eb ce jmp 8010396e <fork+0xde> 801039a0 <scheduler>: { 801039a0: 55 push %ebp 801039a1: 89 e5 mov %esp,%ebp 801039a3: 57 push %edi 801039a4: 56 push %esi 801039a5: 53 push %ebx 801039a6: 83 ec 1c sub $0x1c,%esp struct cpu *c = mycpu(); 801039a9: e8 92 fc ff ff call 80103640 <mycpu> 801039ae: 89 c6 mov %eax,%esi c->proc = 0; 801039b0: c7 80 ac 00 00 00 00 movl $0x0,0xac(%eax) 801039b7: 00 00 00 801039ba: 8d 78 04 lea 0x4(%eax),%edi 801039bd: 8d 76 00 lea 0x0(%esi),%esi asm volatile("sti"); 801039c0: fb sti acquire(&ptable.lock); 801039c1: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801039c8: bb 54 2d 11 80 mov $0x80112d54,%ebx acquire(&ptable.lock); 801039cd: e8 de 07 00 00 call 801041b0 <acquire> 801039d2: eb 12 jmp 801039e6 <scheduler+0x46> 801039d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801039d8: 81 c3 84 00 00 00 add $0x84,%ebx 801039de: 81 fb 54 4e 11 80 cmp $0x80114e54,%ebx 801039e4: 74 4a je 80103a30 <scheduler+0x90> if(p->state != RUNNABLE) 801039e6: 83 7b 0c 03 cmpl $0x3,0xc(%ebx) 801039ea: 75 ec jne 801039d8 <scheduler+0x38> c->proc = p; 801039ec: 89 9e ac 00 00 00 mov %ebx,0xac(%esi) switchuvm(p); 801039f2: 89 1c 24 mov %ebx,(%esp) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801039f5: 81 c3 84 00 00 00 add $0x84,%ebx switchuvm(p); 801039fb: e8 90 2c 00 00 call 80106690 <switchuvm> swtch(&(c->scheduler), p->context); 80103a00: 8b 43 98 mov -0x68(%ebx),%eax p->state = RUNNING; 80103a03: c7 43 88 04 00 00 00 movl $0x4,-0x78(%ebx) swtch(&(c->scheduler), p->context); 80103a0a: 89 3c 24 mov %edi,(%esp) 80103a0d: 89 44 24 04 mov %eax,0x4(%esp) 80103a11: e8 15 0b 00 00 call 8010452b <swtch> switchkvm(); 80103a16: e8 55 2c 00 00 call 80106670 <switchkvm> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103a1b: 81 fb 54 4e 11 80 cmp $0x80114e54,%ebx c->proc = 0; 80103a21: c7 86 ac 00 00 00 00 movl $0x0,0xac(%esi) 80103a28: 00 00 00 for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103a2b: 75 b9 jne 801039e6 <scheduler+0x46> 80103a2d: 8d 76 00 lea 0x0(%esi),%esi release(&ptable.lock); 80103a30: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103a37: e8 64 08 00 00 call 801042a0 <release> } 80103a3c: eb 82 jmp 801039c0 <scheduler+0x20> 80103a3e: 66 90 xchg %ax,%ax 80103a40 <sched>: { 80103a40: 55 push %ebp 80103a41: 89 e5 mov %esp,%ebp 80103a43: 56 push %esi 80103a44: 53 push %ebx 80103a45: 83 ec 10 sub $0x10,%esp struct proc *p = myproc(); 80103a48: e8 93 fc ff ff call 801036e0 <myproc> if(!holding(&ptable.lock)) 80103a4d: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) struct proc *p = myproc(); 80103a54: 89 c3 mov %eax,%ebx if(!holding(&ptable.lock)) 80103a56: e8 e5 06 00 00 call 80104140 <holding> 80103a5b: 85 c0 test %eax,%eax 80103a5d: 74 4f je 80103aae <sched+0x6e> if(mycpu()->ncli != 1) 80103a5f: e8 dc fb ff ff call 80103640 <mycpu> 80103a64: 83 b8 a4 00 00 00 01 cmpl $0x1,0xa4(%eax) 80103a6b: 75 65 jne 80103ad2 <sched+0x92> if(p->state == RUNNING) 80103a6d: 83 7b 0c 04 cmpl $0x4,0xc(%ebx) 80103a71: 74 53 je 80103ac6 <sched+0x86> asm volatile("pushfl; popl %0" : "=r" (eflags)); 80103a73: 9c pushf 80103a74: 58 pop %eax if(readeflags()&FL_IF) 80103a75: f6 c4 02 test $0x2,%ah 80103a78: 75 40 jne 80103aba <sched+0x7a> intena = mycpu()->intena; 80103a7a: e8 c1 fb ff ff call 80103640 <mycpu> swtch(&p->context, mycpu()->scheduler); 80103a7f: 83 c3 1c add $0x1c,%ebx intena = mycpu()->intena; 80103a82: 8b b0 a8 00 00 00 mov 0xa8(%eax),%esi swtch(&p->context, mycpu()->scheduler); 80103a88: e8 b3 fb ff ff call 80103640 <mycpu> 80103a8d: 8b 40 04 mov 0x4(%eax),%eax 80103a90: 89 1c 24 mov %ebx,(%esp) 80103a93: 89 44 24 04 mov %eax,0x4(%esp) 80103a97: e8 8f 0a 00 00 call 8010452b <swtch> mycpu()->intena = intena; 80103a9c: e8 9f fb ff ff call 80103640 <mycpu> 80103aa1: 89 b0 a8 00 00 00 mov %esi,0xa8(%eax) } 80103aa7: 83 c4 10 add $0x10,%esp 80103aaa: 5b pop %ebx 80103aab: 5e pop %esi 80103aac: 5d pop %ebp 80103aad: c3 ret panic("sched ptable.lock"); 80103aae: c7 04 24 10 74 10 80 movl $0x80107410,(%esp) 80103ab5: e8 a6 c8 ff ff call 80100360 <panic> panic("sched interruptible"); 80103aba: c7 04 24 3c 74 10 80 movl $0x8010743c,(%esp) 80103ac1: e8 9a c8 ff ff call 80100360 <panic> panic("sched running"); 80103ac6: c7 04 24 2e 74 10 80 movl $0x8010742e,(%esp) 80103acd: e8 8e c8 ff ff call 80100360 <panic> panic("sched locks"); 80103ad2: c7 04 24 22 74 10 80 movl $0x80107422,(%esp) 80103ad9: e8 82 c8 ff ff call 80100360 <panic> 80103ade: 66 90 xchg %ax,%ax 80103ae0 <exit>: { 80103ae0: 55 push %ebp 80103ae1: 89 e5 mov %esp,%ebp 80103ae3: 56 push %esi if(curproc == initproc) 80103ae4: 31 f6 xor %esi,%esi { 80103ae6: 53 push %ebx 80103ae7: 83 ec 10 sub $0x10,%esp struct proc *curproc = myproc(); 80103aea: e8 f1 fb ff ff call 801036e0 <myproc> if(curproc == initproc) 80103aef: 3b 05 b8 a5 10 80 cmp 0x8010a5b8,%eax struct proc *curproc = myproc(); 80103af5: 89 c3 mov %eax,%ebx if(curproc == initproc) 80103af7: 0f 84 fd 00 00 00 je 80103bfa <exit+0x11a> 80103afd: 8d 76 00 lea 0x0(%esi),%esi if(curproc->ofile[fd]){ 80103b00: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax 80103b04: 85 c0 test %eax,%eax 80103b06: 74 10 je 80103b18 <exit+0x38> fileclose(curproc->ofile[fd]); 80103b08: 89 04 24 mov %eax,(%esp) 80103b0b: e8 50 d3 ff ff call 80100e60 <fileclose> curproc->ofile[fd] = 0; 80103b10: c7 44 b3 28 00 00 00 movl $0x0,0x28(%ebx,%esi,4) 80103b17: 00 for(fd = 0; fd < NOFILE; fd++){ 80103b18: 83 c6 01 add $0x1,%esi 80103b1b: 83 fe 10 cmp $0x10,%esi 80103b1e: 75 e0 jne 80103b00 <exit+0x20> begin_op(); 80103b20: e8 2b f0 ff ff call 80102b50 <begin_op> iput(curproc->cwd); 80103b25: 8b 43 68 mov 0x68(%ebx),%eax 80103b28: 89 04 24 mov %eax,(%esp) 80103b2b: e8 e0 dc ff ff call 80101810 <iput> end_op(); 80103b30: e8 8b f0 ff ff call 80102bc0 <end_op> curproc->cwd = 0; 80103b35: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) acquire(&ptable.lock); 80103b3c: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103b43: e8 68 06 00 00 call 801041b0 <acquire> wakeup1(curproc->parent); 80103b48: 8b 43 14 mov 0x14(%ebx),%eax static void wakeup1(void *chan) { struct proc *p; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103b4b: ba 54 2d 11 80 mov $0x80112d54,%edx 80103b50: eb 14 jmp 80103b66 <exit+0x86> 80103b52: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80103b58: 81 c2 84 00 00 00 add $0x84,%edx 80103b5e: 81 fa 54 4e 11 80 cmp $0x80114e54,%edx 80103b64: 74 20 je 80103b86 <exit+0xa6> if(p->state == SLEEPING && p->chan == chan) 80103b66: 83 7a 0c 02 cmpl $0x2,0xc(%edx) 80103b6a: 75 ec jne 80103b58 <exit+0x78> 80103b6c: 3b 42 20 cmp 0x20(%edx),%eax 80103b6f: 75 e7 jne 80103b58 <exit+0x78> p->state = RUNNABLE; 80103b71: c7 42 0c 03 00 00 00 movl $0x3,0xc(%edx) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103b78: 81 c2 84 00 00 00 add $0x84,%edx 80103b7e: 81 fa 54 4e 11 80 cmp $0x80114e54,%edx 80103b84: 75 e0 jne 80103b66 <exit+0x86> p->parent = initproc; 80103b86: a1 b8 a5 10 80 mov 0x8010a5b8,%eax 80103b8b: b9 54 2d 11 80 mov $0x80112d54,%ecx 80103b90: eb 14 jmp 80103ba6 <exit+0xc6> 80103b92: 8d b6 00 00 00 00 lea 0x0(%esi),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103b98: 81 c1 84 00 00 00 add $0x84,%ecx 80103b9e: 81 f9 54 4e 11 80 cmp $0x80114e54,%ecx 80103ba4: 74 3c je 80103be2 <exit+0x102> if(p->parent == curproc){ 80103ba6: 39 59 14 cmp %ebx,0x14(%ecx) 80103ba9: 75 ed jne 80103b98 <exit+0xb8> if(p->state == ZOMBIE) 80103bab: 83 79 0c 05 cmpl $0x5,0xc(%ecx) p->parent = initproc; 80103baf: 89 41 14 mov %eax,0x14(%ecx) if(p->state == ZOMBIE) 80103bb2: 75 e4 jne 80103b98 <exit+0xb8> 80103bb4: ba 54 2d 11 80 mov $0x80112d54,%edx 80103bb9: eb 13 jmp 80103bce <exit+0xee> 80103bbb: 90 nop 80103bbc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103bc0: 81 c2 84 00 00 00 add $0x84,%edx 80103bc6: 81 fa 54 4e 11 80 cmp $0x80114e54,%edx 80103bcc: 74 ca je 80103b98 <exit+0xb8> if(p->state == SLEEPING && p->chan == chan) 80103bce: 83 7a 0c 02 cmpl $0x2,0xc(%edx) 80103bd2: 75 ec jne 80103bc0 <exit+0xe0> 80103bd4: 3b 42 20 cmp 0x20(%edx),%eax 80103bd7: 75 e7 jne 80103bc0 <exit+0xe0> p->state = RUNNABLE; 80103bd9: c7 42 0c 03 00 00 00 movl $0x3,0xc(%edx) 80103be0: eb de jmp 80103bc0 <exit+0xe0> curproc->state = ZOMBIE; 80103be2: c7 43 0c 05 00 00 00 movl $0x5,0xc(%ebx) sched(); 80103be9: e8 52 fe ff ff call 80103a40 <sched> panic("zombie exit"); 80103bee: c7 04 24 5d 74 10 80 movl $0x8010745d,(%esp) 80103bf5: e8 66 c7 ff ff call 80100360 <panic> panic("init exiting"); 80103bfa: c7 04 24 50 74 10 80 movl $0x80107450,(%esp) 80103c01: e8 5a c7 ff ff call 80100360 <panic> 80103c06: 8d 76 00 lea 0x0(%esi),%esi 80103c09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103c10 <yield>: { 80103c10: 55 push %ebp 80103c11: 89 e5 mov %esp,%ebp 80103c13: 83 ec 18 sub $0x18,%esp acquire(&ptable.lock); //DOC: yieldlock 80103c16: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103c1d: e8 8e 05 00 00 call 801041b0 <acquire> myproc()->state = RUNNABLE; 80103c22: e8 b9 fa ff ff call 801036e0 <myproc> 80103c27: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) sched(); 80103c2e: e8 0d fe ff ff call 80103a40 <sched> release(&ptable.lock); 80103c33: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103c3a: e8 61 06 00 00 call 801042a0 <release> } 80103c3f: c9 leave 80103c40: c3 ret 80103c41: eb 0d jmp 80103c50 <sleep> 80103c43: 90 nop 80103c44: 90 nop 80103c45: 90 nop 80103c46: 90 nop 80103c47: 90 nop 80103c48: 90 nop 80103c49: 90 nop 80103c4a: 90 nop 80103c4b: 90 nop 80103c4c: 90 nop 80103c4d: 90 nop 80103c4e: 90 nop 80103c4f: 90 nop 80103c50 <sleep>: { 80103c50: 55 push %ebp 80103c51: 89 e5 mov %esp,%ebp 80103c53: 57 push %edi 80103c54: 56 push %esi 80103c55: 53 push %ebx 80103c56: 83 ec 1c sub $0x1c,%esp 80103c59: 8b 7d 08 mov 0x8(%ebp),%edi 80103c5c: 8b 75 0c mov 0xc(%ebp),%esi struct proc *p = myproc(); 80103c5f: e8 7c fa ff ff call 801036e0 <myproc> if(p == 0) 80103c64: 85 c0 test %eax,%eax struct proc *p = myproc(); 80103c66: 89 c3 mov %eax,%ebx if(p == 0) 80103c68: 0f 84 7c 00 00 00 je 80103cea <sleep+0x9a> if(lk == 0) 80103c6e: 85 f6 test %esi,%esi 80103c70: 74 6c je 80103cde <sleep+0x8e> if(lk != &ptable.lock){ //DOC: sleeplock0 80103c72: 81 fe 20 2d 11 80 cmp $0x80112d20,%esi 80103c78: 74 46 je 80103cc0 <sleep+0x70> acquire(&ptable.lock); //DOC: sleeplock1 80103c7a: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103c81: e8 2a 05 00 00 call 801041b0 <acquire> release(lk); 80103c86: 89 34 24 mov %esi,(%esp) 80103c89: e8 12 06 00 00 call 801042a0 <release> p->chan = chan; 80103c8e: 89 7b 20 mov %edi,0x20(%ebx) p->state = SLEEPING; 80103c91: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx) sched(); 80103c98: e8 a3 fd ff ff call 80103a40 <sched> p->chan = 0; 80103c9d: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) release(&ptable.lock); 80103ca4: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103cab: e8 f0 05 00 00 call 801042a0 <release> acquire(lk); 80103cb0: 89 75 08 mov %esi,0x8(%ebp) } 80103cb3: 83 c4 1c add $0x1c,%esp 80103cb6: 5b pop %ebx 80103cb7: 5e pop %esi 80103cb8: 5f pop %edi 80103cb9: 5d pop %ebp acquire(lk); 80103cba: e9 f1 04 00 00 jmp 801041b0 <acquire> 80103cbf: 90 nop p->chan = chan; 80103cc0: 89 78 20 mov %edi,0x20(%eax) p->state = SLEEPING; 80103cc3: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax) sched(); 80103cca: e8 71 fd ff ff call 80103a40 <sched> p->chan = 0; 80103ccf: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) } 80103cd6: 83 c4 1c add $0x1c,%esp 80103cd9: 5b pop %ebx 80103cda: 5e pop %esi 80103cdb: 5f pop %edi 80103cdc: 5d pop %ebp 80103cdd: c3 ret panic("sleep without lk"); 80103cde: c7 04 24 6f 74 10 80 movl $0x8010746f,(%esp) 80103ce5: e8 76 c6 ff ff call 80100360 <panic> panic("sleep"); 80103cea: c7 04 24 69 74 10 80 movl $0x80107469,(%esp) 80103cf1: e8 6a c6 ff ff call 80100360 <panic> 80103cf6: 8d 76 00 lea 0x0(%esi),%esi 80103cf9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103d00 <wait>: { 80103d00: 55 push %ebp 80103d01: 89 e5 mov %esp,%ebp 80103d03: 56 push %esi 80103d04: 53 push %ebx 80103d05: 83 ec 10 sub $0x10,%esp struct proc *curproc = myproc(); 80103d08: e8 d3 f9 ff ff call 801036e0 <myproc> acquire(&ptable.lock); 80103d0d: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) struct proc *curproc = myproc(); 80103d14: 89 c6 mov %eax,%esi acquire(&ptable.lock); 80103d16: e8 95 04 00 00 call 801041b0 <acquire> havekids = 0; 80103d1b: 31 c0 xor %eax,%eax for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103d1d: bb 54 2d 11 80 mov $0x80112d54,%ebx 80103d22: eb 12 jmp 80103d36 <wait+0x36> 80103d24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103d28: 81 c3 84 00 00 00 add $0x84,%ebx 80103d2e: 81 fb 54 4e 11 80 cmp $0x80114e54,%ebx 80103d34: 74 22 je 80103d58 <wait+0x58> if(p->parent != curproc) 80103d36: 39 73 14 cmp %esi,0x14(%ebx) 80103d39: 75 ed jne 80103d28 <wait+0x28> if(p->state == ZOMBIE){ 80103d3b: 83 7b 0c 05 cmpl $0x5,0xc(%ebx) 80103d3f: 74 34 je 80103d75 <wait+0x75> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103d41: 81 c3 84 00 00 00 add $0x84,%ebx havekids = 1; 80103d47: b8 01 00 00 00 mov $0x1,%eax for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103d4c: 81 fb 54 4e 11 80 cmp $0x80114e54,%ebx 80103d52: 75 e2 jne 80103d36 <wait+0x36> 80103d54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(!havekids || curproc->killed){ 80103d58: 85 c0 test %eax,%eax 80103d5a: 74 6e je 80103dca <wait+0xca> 80103d5c: 8b 46 24 mov 0x24(%esi),%eax 80103d5f: 85 c0 test %eax,%eax 80103d61: 75 67 jne 80103dca <wait+0xca> sleep(curproc, &ptable.lock); //DOC: wait-sleep 80103d63: c7 44 24 04 20 2d 11 movl $0x80112d20,0x4(%esp) 80103d6a: 80 80103d6b: 89 34 24 mov %esi,(%esp) 80103d6e: e8 dd fe ff ff call 80103c50 <sleep> } 80103d73: eb a6 jmp 80103d1b <wait+0x1b> kfree(p->kstack); 80103d75: 8b 43 08 mov 0x8(%ebx),%eax pid = p->pid; 80103d78: 8b 73 10 mov 0x10(%ebx),%esi kfree(p->kstack); 80103d7b: 89 04 24 mov %eax,(%esp) 80103d7e: e8 ad e5 ff ff call 80102330 <kfree> freevm(p->pgdir); 80103d83: 8b 43 04 mov 0x4(%ebx),%eax p->kstack = 0; 80103d86: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) freevm(p->pgdir); 80103d8d: 89 04 24 mov %eax,(%esp) 80103d90: e8 7b 2c 00 00 call 80106a10 <freevm> release(&ptable.lock); 80103d95: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) p->pid = 0; 80103d9c: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) p->parent = 0; 80103da3: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) p->name[0] = 0; 80103daa: c6 43 6c 00 movb $0x0,0x6c(%ebx) p->killed = 0; 80103dae: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) p->state = UNUSED; 80103db5: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) release(&ptable.lock); 80103dbc: e8 df 04 00 00 call 801042a0 <release> } 80103dc1: 83 c4 10 add $0x10,%esp return pid; 80103dc4: 89 f0 mov %esi,%eax } 80103dc6: 5b pop %ebx 80103dc7: 5e pop %esi 80103dc8: 5d pop %ebp 80103dc9: c3 ret release(&ptable.lock); 80103dca: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103dd1: e8 ca 04 00 00 call 801042a0 <release> } 80103dd6: 83 c4 10 add $0x10,%esp return -1; 80103dd9: b8 ff ff ff ff mov $0xffffffff,%eax } 80103dde: 5b pop %ebx 80103ddf: 5e pop %esi 80103de0: 5d pop %ebp 80103de1: c3 ret 80103de2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80103de9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103df0 <wakeup>: } // Wake up all processes sleeping on chan. void wakeup(void *chan) { 80103df0: 55 push %ebp 80103df1: 89 e5 mov %esp,%ebp 80103df3: 53 push %ebx 80103df4: 83 ec 14 sub $0x14,%esp 80103df7: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&ptable.lock); 80103dfa: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103e01: e8 aa 03 00 00 call 801041b0 <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103e06: b8 54 2d 11 80 mov $0x80112d54,%eax 80103e0b: eb 0f jmp 80103e1c <wakeup+0x2c> 80103e0d: 8d 76 00 lea 0x0(%esi),%esi 80103e10: 05 84 00 00 00 add $0x84,%eax 80103e15: 3d 54 4e 11 80 cmp $0x80114e54,%eax 80103e1a: 74 24 je 80103e40 <wakeup+0x50> if(p->state == SLEEPING && p->chan == chan) 80103e1c: 83 78 0c 02 cmpl $0x2,0xc(%eax) 80103e20: 75 ee jne 80103e10 <wakeup+0x20> 80103e22: 3b 58 20 cmp 0x20(%eax),%ebx 80103e25: 75 e9 jne 80103e10 <wakeup+0x20> p->state = RUNNABLE; 80103e27: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103e2e: 05 84 00 00 00 add $0x84,%eax 80103e33: 3d 54 4e 11 80 cmp $0x80114e54,%eax 80103e38: 75 e2 jne 80103e1c <wakeup+0x2c> 80103e3a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi wakeup1(chan); release(&ptable.lock); 80103e40: c7 45 08 20 2d 11 80 movl $0x80112d20,0x8(%ebp) } 80103e47: 83 c4 14 add $0x14,%esp 80103e4a: 5b pop %ebx 80103e4b: 5d pop %ebp release(&ptable.lock); 80103e4c: e9 4f 04 00 00 jmp 801042a0 <release> 80103e51: eb 0d jmp 80103e60 <kill> 80103e53: 90 nop 80103e54: 90 nop 80103e55: 90 nop 80103e56: 90 nop 80103e57: 90 nop 80103e58: 90 nop 80103e59: 90 nop 80103e5a: 90 nop 80103e5b: 90 nop 80103e5c: 90 nop 80103e5d: 90 nop 80103e5e: 90 nop 80103e5f: 90 nop 80103e60 <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) { 80103e60: 55 push %ebp 80103e61: 89 e5 mov %esp,%ebp 80103e63: 53 push %ebx 80103e64: 83 ec 14 sub $0x14,%esp 80103e67: 8b 5d 08 mov 0x8(%ebp),%ebx struct proc *p; acquire(&ptable.lock); 80103e6a: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103e71: e8 3a 03 00 00 call 801041b0 <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103e76: b8 54 2d 11 80 mov $0x80112d54,%eax 80103e7b: eb 0f jmp 80103e8c <kill+0x2c> 80103e7d: 8d 76 00 lea 0x0(%esi),%esi 80103e80: 05 84 00 00 00 add $0x84,%eax 80103e85: 3d 54 4e 11 80 cmp $0x80114e54,%eax 80103e8a: 74 3c je 80103ec8 <kill+0x68> if(p->pid == pid){ 80103e8c: 39 58 10 cmp %ebx,0x10(%eax) 80103e8f: 75 ef jne 80103e80 <kill+0x20> p->killed = 1; // Wake process from sleep if necessary. if(p->state == SLEEPING) 80103e91: 83 78 0c 02 cmpl $0x2,0xc(%eax) p->killed = 1; 80103e95: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) if(p->state == SLEEPING) 80103e9c: 74 1a je 80103eb8 <kill+0x58> p->state = RUNNABLE; release(&ptable.lock); 80103e9e: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103ea5: e8 f6 03 00 00 call 801042a0 <release> return 0; } } release(&ptable.lock); return -1; } 80103eaa: 83 c4 14 add $0x14,%esp return 0; 80103ead: 31 c0 xor %eax,%eax } 80103eaf: 5b pop %ebx 80103eb0: 5d pop %ebp 80103eb1: c3 ret 80103eb2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi p->state = RUNNABLE; 80103eb8: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) 80103ebf: eb dd jmp 80103e9e <kill+0x3e> 80103ec1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi release(&ptable.lock); 80103ec8: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103ecf: e8 cc 03 00 00 call 801042a0 <release> } 80103ed4: 83 c4 14 add $0x14,%esp return -1; 80103ed7: b8 ff ff ff ff mov $0xffffffff,%eax } 80103edc: 5b pop %ebx 80103edd: 5d pop %ebp 80103ede: c3 ret 80103edf: 90 nop 80103ee0 <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) { 80103ee0: 55 push %ebp 80103ee1: 89 e5 mov %esp,%ebp 80103ee3: 57 push %edi 80103ee4: 56 push %esi 80103ee5: 53 push %ebx 80103ee6: bb c0 2d 11 80 mov $0x80112dc0,%ebx 80103eeb: 83 ec 4c sub $0x4c,%esp 80103eee: 8d 75 e8 lea -0x18(%ebp),%esi 80103ef1: eb 23 jmp 80103f16 <procdump+0x36> 80103ef3: 90 nop 80103ef4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(p->state == SLEEPING){ getcallerpcs((uint*)p->context->ebp+2, pc); for(i=0; i<10 && pc[i] != 0; i++) cprintf(" %p", pc[i]); } cprintf("\n"); 80103ef8: c7 04 24 a9 75 10 80 movl $0x801075a9,(%esp) 80103eff: e8 4c c7 ff ff call 80100650 <cprintf> 80103f04: 81 c3 84 00 00 00 add $0x84,%ebx for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103f0a: 81 fb c0 4e 11 80 cmp $0x80114ec0,%ebx 80103f10: 0f 84 8a 00 00 00 je 80103fa0 <procdump+0xc0> if(p->state == UNUSED) 80103f16: 8b 43 a0 mov -0x60(%ebx),%eax 80103f19: 85 c0 test %eax,%eax 80103f1b: 74 e7 je 80103f04 <procdump+0x24> if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) 80103f1d: 83 f8 05 cmp $0x5,%eax state = "???"; 80103f20: ba 80 74 10 80 mov $0x80107480,%edx if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) 80103f25: 77 11 ja 80103f38 <procdump+0x58> 80103f27: 8b 14 85 e0 74 10 80 mov -0x7fef8b20(,%eax,4),%edx state = "???"; 80103f2e: b8 80 74 10 80 mov $0x80107480,%eax 80103f33: 85 d2 test %edx,%edx 80103f35: 0f 44 d0 cmove %eax,%edx cprintf("%d %s %s", p->pid, state, p->name); 80103f38: 8b 43 a4 mov -0x5c(%ebx),%eax 80103f3b: 89 5c 24 0c mov %ebx,0xc(%esp) 80103f3f: 89 54 24 08 mov %edx,0x8(%esp) 80103f43: c7 04 24 84 74 10 80 movl $0x80107484,(%esp) 80103f4a: 89 44 24 04 mov %eax,0x4(%esp) 80103f4e: e8 fd c6 ff ff call 80100650 <cprintf> if(p->state == SLEEPING){ 80103f53: 83 7b a0 02 cmpl $0x2,-0x60(%ebx) 80103f57: 75 9f jne 80103ef8 <procdump+0x18> getcallerpcs((uint*)p->context->ebp+2, pc); 80103f59: 8d 45 c0 lea -0x40(%ebp),%eax 80103f5c: 89 44 24 04 mov %eax,0x4(%esp) 80103f60: 8b 43 b0 mov -0x50(%ebx),%eax 80103f63: 8d 7d c0 lea -0x40(%ebp),%edi 80103f66: 8b 40 0c mov 0xc(%eax),%eax 80103f69: 83 c0 08 add $0x8,%eax 80103f6c: 89 04 24 mov %eax,(%esp) 80103f6f: e8 6c 01 00 00 call 801040e0 <getcallerpcs> 80103f74: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(i=0; i<10 && pc[i] != 0; i++) 80103f78: 8b 17 mov (%edi),%edx 80103f7a: 85 d2 test %edx,%edx 80103f7c: 0f 84 76 ff ff ff je 80103ef8 <procdump+0x18> cprintf(" %p", pc[i]); 80103f82: 89 54 24 04 mov %edx,0x4(%esp) 80103f86: 83 c7 04 add $0x4,%edi 80103f89: c7 04 24 c1 6e 10 80 movl $0x80106ec1,(%esp) 80103f90: e8 bb c6 ff ff call 80100650 <cprintf> for(i=0; i<10 && pc[i] != 0; i++) 80103f95: 39 f7 cmp %esi,%edi 80103f97: 75 df jne 80103f78 <procdump+0x98> 80103f99: e9 5a ff ff ff jmp 80103ef8 <procdump+0x18> 80103f9e: 66 90 xchg %ax,%ax } } 80103fa0: 83 c4 4c add $0x4c,%esp 80103fa3: 5b pop %ebx 80103fa4: 5e pop %esi 80103fa5: 5f pop %edi 80103fa6: 5d pop %ebp 80103fa7: c3 ret 80103fa8: 66 90 xchg %ax,%ax 80103faa: 66 90 xchg %ax,%ax 80103fac: 66 90 xchg %ax,%ax 80103fae: 66 90 xchg %ax,%ax 80103fb0 <initsleeplock>: #include "spinlock.h" #include "sleeplock.h" void initsleeplock(struct sleeplock *lk, char *name) { 80103fb0: 55 push %ebp 80103fb1: 89 e5 mov %esp,%ebp 80103fb3: 53 push %ebx 80103fb4: 83 ec 14 sub $0x14,%esp 80103fb7: 8b 5d 08 mov 0x8(%ebp),%ebx initlock(&lk->lk, "sleep lock"); 80103fba: c7 44 24 04 f8 74 10 movl $0x801074f8,0x4(%esp) 80103fc1: 80 80103fc2: 8d 43 04 lea 0x4(%ebx),%eax 80103fc5: 89 04 24 mov %eax,(%esp) 80103fc8: e8 f3 00 00 00 call 801040c0 <initlock> lk->name = name; 80103fcd: 8b 45 0c mov 0xc(%ebp),%eax lk->locked = 0; 80103fd0: c7 03 00 00 00 00 movl $0x0,(%ebx) lk->pid = 0; 80103fd6: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) lk->name = name; 80103fdd: 89 43 38 mov %eax,0x38(%ebx) } 80103fe0: 83 c4 14 add $0x14,%esp 80103fe3: 5b pop %ebx 80103fe4: 5d pop %ebp 80103fe5: c3 ret 80103fe6: 8d 76 00 lea 0x0(%esi),%esi 80103fe9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103ff0 <acquiresleep>: void acquiresleep(struct sleeplock *lk) { 80103ff0: 55 push %ebp 80103ff1: 89 e5 mov %esp,%ebp 80103ff3: 56 push %esi 80103ff4: 53 push %ebx 80103ff5: 83 ec 10 sub $0x10,%esp 80103ff8: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&lk->lk); 80103ffb: 8d 73 04 lea 0x4(%ebx),%esi 80103ffe: 89 34 24 mov %esi,(%esp) 80104001: e8 aa 01 00 00 call 801041b0 <acquire> while (lk->locked) { 80104006: 8b 13 mov (%ebx),%edx 80104008: 85 d2 test %edx,%edx 8010400a: 74 16 je 80104022 <acquiresleep+0x32> 8010400c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi sleep(lk, &lk->lk); 80104010: 89 74 24 04 mov %esi,0x4(%esp) 80104014: 89 1c 24 mov %ebx,(%esp) 80104017: e8 34 fc ff ff call 80103c50 <sleep> while (lk->locked) { 8010401c: 8b 03 mov (%ebx),%eax 8010401e: 85 c0 test %eax,%eax 80104020: 75 ee jne 80104010 <acquiresleep+0x20> } lk->locked = 1; 80104022: c7 03 01 00 00 00 movl $0x1,(%ebx) lk->pid = myproc()->pid; 80104028: e8 b3 f6 ff ff call 801036e0 <myproc> 8010402d: 8b 40 10 mov 0x10(%eax),%eax 80104030: 89 43 3c mov %eax,0x3c(%ebx) release(&lk->lk); 80104033: 89 75 08 mov %esi,0x8(%ebp) } 80104036: 83 c4 10 add $0x10,%esp 80104039: 5b pop %ebx 8010403a: 5e pop %esi 8010403b: 5d pop %ebp release(&lk->lk); 8010403c: e9 5f 02 00 00 jmp 801042a0 <release> 80104041: eb 0d jmp 80104050 <releasesleep> 80104043: 90 nop 80104044: 90 nop 80104045: 90 nop 80104046: 90 nop 80104047: 90 nop 80104048: 90 nop 80104049: 90 nop 8010404a: 90 nop 8010404b: 90 nop 8010404c: 90 nop 8010404d: 90 nop 8010404e: 90 nop 8010404f: 90 nop 80104050 <releasesleep>: void releasesleep(struct sleeplock *lk) { 80104050: 55 push %ebp 80104051: 89 e5 mov %esp,%ebp 80104053: 56 push %esi 80104054: 53 push %ebx 80104055: 83 ec 10 sub $0x10,%esp 80104058: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&lk->lk); 8010405b: 8d 73 04 lea 0x4(%ebx),%esi 8010405e: 89 34 24 mov %esi,(%esp) 80104061: e8 4a 01 00 00 call 801041b0 <acquire> lk->locked = 0; 80104066: c7 03 00 00 00 00 movl $0x0,(%ebx) lk->pid = 0; 8010406c: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) wakeup(lk); 80104073: 89 1c 24 mov %ebx,(%esp) 80104076: e8 75 fd ff ff call 80103df0 <wakeup> release(&lk->lk); 8010407b: 89 75 08 mov %esi,0x8(%ebp) } 8010407e: 83 c4 10 add $0x10,%esp 80104081: 5b pop %ebx 80104082: 5e pop %esi 80104083: 5d pop %ebp release(&lk->lk); 80104084: e9 17 02 00 00 jmp 801042a0 <release> 80104089: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104090 <holdingsleep>: int holdingsleep(struct sleeplock *lk) { 80104090: 55 push %ebp 80104091: 89 e5 mov %esp,%ebp 80104093: 56 push %esi 80104094: 53 push %ebx 80104095: 83 ec 10 sub $0x10,%esp 80104098: 8b 5d 08 mov 0x8(%ebp),%ebx int r; acquire(&lk->lk); 8010409b: 8d 73 04 lea 0x4(%ebx),%esi 8010409e: 89 34 24 mov %esi,(%esp) 801040a1: e8 0a 01 00 00 call 801041b0 <acquire> r = lk->locked; 801040a6: 8b 1b mov (%ebx),%ebx release(&lk->lk); 801040a8: 89 34 24 mov %esi,(%esp) 801040ab: e8 f0 01 00 00 call 801042a0 <release> return r; } 801040b0: 83 c4 10 add $0x10,%esp 801040b3: 89 d8 mov %ebx,%eax 801040b5: 5b pop %ebx 801040b6: 5e pop %esi 801040b7: 5d pop %ebp 801040b8: c3 ret 801040b9: 66 90 xchg %ax,%ax 801040bb: 66 90 xchg %ax,%ax 801040bd: 66 90 xchg %ax,%ax 801040bf: 90 nop 801040c0 <initlock>: #include "proc.h" #include "spinlock.h" void initlock(struct spinlock *lk, char *name) { 801040c0: 55 push %ebp 801040c1: 89 e5 mov %esp,%ebp 801040c3: 8b 45 08 mov 0x8(%ebp),%eax lk->name = name; 801040c6: 8b 55 0c mov 0xc(%ebp),%edx lk->locked = 0; 801040c9: c7 00 00 00 00 00 movl $0x0,(%eax) lk->name = name; 801040cf: 89 50 04 mov %edx,0x4(%eax) lk->cpu = 0; 801040d2: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) } 801040d9: 5d pop %ebp 801040da: c3 ret 801040db: 90 nop 801040dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801040e0 <getcallerpcs>: } // Record the current call stack in pcs[] by following the %ebp chain. void getcallerpcs(void *v, uint pcs[]) { 801040e0: 55 push %ebp 801040e1: 89 e5 mov %esp,%ebp uint *ebp; int i; ebp = (uint*)v - 2; 801040e3: 8b 45 08 mov 0x8(%ebp),%eax { 801040e6: 8b 4d 0c mov 0xc(%ebp),%ecx 801040e9: 53 push %ebx ebp = (uint*)v - 2; 801040ea: 8d 50 f8 lea -0x8(%eax),%edx for(i = 0; i < 10; i++){ 801040ed: 31 c0 xor %eax,%eax 801040ef: 90 nop if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) 801040f0: 8d 9a 00 00 00 80 lea -0x80000000(%edx),%ebx 801040f6: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx 801040fc: 77 1a ja 80104118 <getcallerpcs+0x38> break; pcs[i] = ebp[1]; // saved %eip 801040fe: 8b 5a 04 mov 0x4(%edx),%ebx 80104101: 89 1c 81 mov %ebx,(%ecx,%eax,4) for(i = 0; i < 10; i++){ 80104104: 83 c0 01 add $0x1,%eax ebp = (uint*)ebp[0]; // saved %ebp 80104107: 8b 12 mov (%edx),%edx for(i = 0; i < 10; i++){ 80104109: 83 f8 0a cmp $0xa,%eax 8010410c: 75 e2 jne 801040f0 <getcallerpcs+0x10> } for(; i < 10; i++) pcs[i] = 0; } 8010410e: 5b pop %ebx 8010410f: 5d pop %ebp 80104110: c3 ret 80104111: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi pcs[i] = 0; 80104118: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) for(; i < 10; i++) 8010411f: 83 c0 01 add $0x1,%eax 80104122: 83 f8 0a cmp $0xa,%eax 80104125: 74 e7 je 8010410e <getcallerpcs+0x2e> pcs[i] = 0; 80104127: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) for(; i < 10; i++) 8010412e: 83 c0 01 add $0x1,%eax 80104131: 83 f8 0a cmp $0xa,%eax 80104134: 75 e2 jne 80104118 <getcallerpcs+0x38> 80104136: eb d6 jmp 8010410e <getcallerpcs+0x2e> 80104138: 90 nop 80104139: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104140 <holding>: // Check whether this cpu is holding the lock. int holding(struct spinlock *lock) { 80104140: 55 push %ebp return lock->locked && lock->cpu == mycpu(); 80104141: 31 c0 xor %eax,%eax { 80104143: 89 e5 mov %esp,%ebp 80104145: 53 push %ebx 80104146: 83 ec 04 sub $0x4,%esp 80104149: 8b 55 08 mov 0x8(%ebp),%edx return lock->locked && lock->cpu == mycpu(); 8010414c: 8b 0a mov (%edx),%ecx 8010414e: 85 c9 test %ecx,%ecx 80104150: 74 10 je 80104162 <holding+0x22> 80104152: 8b 5a 08 mov 0x8(%edx),%ebx 80104155: e8 e6 f4 ff ff call 80103640 <mycpu> 8010415a: 39 c3 cmp %eax,%ebx 8010415c: 0f 94 c0 sete %al 8010415f: 0f b6 c0 movzbl %al,%eax } 80104162: 83 c4 04 add $0x4,%esp 80104165: 5b pop %ebx 80104166: 5d pop %ebp 80104167: c3 ret 80104168: 90 nop 80104169: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104170 <pushcli>: // it takes two popcli to undo two pushcli. Also, if interrupts // are off, then pushcli, popcli leaves them off. void pushcli(void) { 80104170: 55 push %ebp 80104171: 89 e5 mov %esp,%ebp 80104173: 53 push %ebx 80104174: 83 ec 04 sub $0x4,%esp 80104177: 9c pushf 80104178: 5b pop %ebx asm volatile("cli"); 80104179: fa cli int eflags; eflags = readeflags(); cli(); if(mycpu()->ncli == 0) 8010417a: e8 c1 f4 ff ff call 80103640 <mycpu> 8010417f: 8b 80 a4 00 00 00 mov 0xa4(%eax),%eax 80104185: 85 c0 test %eax,%eax 80104187: 75 11 jne 8010419a <pushcli+0x2a> mycpu()->intena = eflags & FL_IF; 80104189: e8 b2 f4 ff ff call 80103640 <mycpu> 8010418e: 81 e3 00 02 00 00 and $0x200,%ebx 80104194: 89 98 a8 00 00 00 mov %ebx,0xa8(%eax) mycpu()->ncli += 1; 8010419a: e8 a1 f4 ff ff call 80103640 <mycpu> 8010419f: 83 80 a4 00 00 00 01 addl $0x1,0xa4(%eax) } 801041a6: 83 c4 04 add $0x4,%esp 801041a9: 5b pop %ebx 801041aa: 5d pop %ebp 801041ab: c3 ret 801041ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801041b0 <acquire>: { 801041b0: 55 push %ebp 801041b1: 89 e5 mov %esp,%ebp 801041b3: 53 push %ebx 801041b4: 83 ec 14 sub $0x14,%esp pushcli(); // disable interrupts to avoid deadlock. 801041b7: e8 b4 ff ff ff call 80104170 <pushcli> if(holding(lk)) 801041bc: 8b 55 08 mov 0x8(%ebp),%edx return lock->locked && lock->cpu == mycpu(); 801041bf: 8b 02 mov (%edx),%eax 801041c1: 85 c0 test %eax,%eax 801041c3: 75 43 jne 80104208 <acquire+0x58> asm volatile("lock; xchgl %0, %1" : 801041c5: b9 01 00 00 00 mov $0x1,%ecx 801041ca: eb 07 jmp 801041d3 <acquire+0x23> 801041cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801041d0: 8b 55 08 mov 0x8(%ebp),%edx 801041d3: 89 c8 mov %ecx,%eax 801041d5: f0 87 02 lock xchg %eax,(%edx) while(xchg(&lk->locked, 1) != 0) 801041d8: 85 c0 test %eax,%eax 801041da: 75 f4 jne 801041d0 <acquire+0x20> __sync_synchronize(); 801041dc: 0f ae f0 mfence lk->cpu = mycpu(); 801041df: 8b 5d 08 mov 0x8(%ebp),%ebx 801041e2: e8 59 f4 ff ff call 80103640 <mycpu> 801041e7: 89 43 08 mov %eax,0x8(%ebx) getcallerpcs(&lk, lk->pcs); 801041ea: 8b 45 08 mov 0x8(%ebp),%eax 801041ed: 83 c0 0c add $0xc,%eax 801041f0: 89 44 24 04 mov %eax,0x4(%esp) 801041f4: 8d 45 08 lea 0x8(%ebp),%eax 801041f7: 89 04 24 mov %eax,(%esp) 801041fa: e8 e1 fe ff ff call 801040e0 <getcallerpcs> } 801041ff: 83 c4 14 add $0x14,%esp 80104202: 5b pop %ebx 80104203: 5d pop %ebp 80104204: c3 ret 80104205: 8d 76 00 lea 0x0(%esi),%esi return lock->locked && lock->cpu == mycpu(); 80104208: 8b 5a 08 mov 0x8(%edx),%ebx 8010420b: e8 30 f4 ff ff call 80103640 <mycpu> if(holding(lk)) 80104210: 39 c3 cmp %eax,%ebx 80104212: 74 05 je 80104219 <acquire+0x69> 80104214: 8b 55 08 mov 0x8(%ebp),%edx 80104217: eb ac jmp 801041c5 <acquire+0x15> panic("acquire"); 80104219: c7 04 24 03 75 10 80 movl $0x80107503,(%esp) 80104220: e8 3b c1 ff ff call 80100360 <panic> 80104225: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104229: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104230 <popcli>: void popcli(void) { 80104230: 55 push %ebp 80104231: 89 e5 mov %esp,%ebp 80104233: 83 ec 18 sub $0x18,%esp asm volatile("pushfl; popl %0" : "=r" (eflags)); 80104236: 9c pushf 80104237: 58 pop %eax if(readeflags()&FL_IF) 80104238: f6 c4 02 test $0x2,%ah 8010423b: 75 49 jne 80104286 <popcli+0x56> panic("popcli - interruptible"); if(--mycpu()->ncli < 0) 8010423d: e8 fe f3 ff ff call 80103640 <mycpu> 80104242: 8b 88 a4 00 00 00 mov 0xa4(%eax),%ecx 80104248: 8d 51 ff lea -0x1(%ecx),%edx 8010424b: 85 d2 test %edx,%edx 8010424d: 89 90 a4 00 00 00 mov %edx,0xa4(%eax) 80104253: 78 25 js 8010427a <popcli+0x4a> panic("popcli"); if(mycpu()->ncli == 0 && mycpu()->intena) 80104255: e8 e6 f3 ff ff call 80103640 <mycpu> 8010425a: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx 80104260: 85 d2 test %edx,%edx 80104262: 74 04 je 80104268 <popcli+0x38> sti(); } 80104264: c9 leave 80104265: c3 ret 80104266: 66 90 xchg %ax,%ax if(mycpu()->ncli == 0 && mycpu()->intena) 80104268: e8 d3 f3 ff ff call 80103640 <mycpu> 8010426d: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax 80104273: 85 c0 test %eax,%eax 80104275: 74 ed je 80104264 <popcli+0x34> asm volatile("sti"); 80104277: fb sti } 80104278: c9 leave 80104279: c3 ret panic("popcli"); 8010427a: c7 04 24 22 75 10 80 movl $0x80107522,(%esp) 80104281: e8 da c0 ff ff call 80100360 <panic> panic("popcli - interruptible"); 80104286: c7 04 24 0b 75 10 80 movl $0x8010750b,(%esp) 8010428d: e8 ce c0 ff ff call 80100360 <panic> 80104292: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104299: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801042a0 <release>: { 801042a0: 55 push %ebp 801042a1: 89 e5 mov %esp,%ebp 801042a3: 56 push %esi 801042a4: 53 push %ebx 801042a5: 83 ec 10 sub $0x10,%esp 801042a8: 8b 5d 08 mov 0x8(%ebp),%ebx return lock->locked && lock->cpu == mycpu(); 801042ab: 8b 03 mov (%ebx),%eax 801042ad: 85 c0 test %eax,%eax 801042af: 75 0f jne 801042c0 <release+0x20> panic("release"); 801042b1: c7 04 24 29 75 10 80 movl $0x80107529,(%esp) 801042b8: e8 a3 c0 ff ff call 80100360 <panic> 801042bd: 8d 76 00 lea 0x0(%esi),%esi return lock->locked && lock->cpu == mycpu(); 801042c0: 8b 73 08 mov 0x8(%ebx),%esi 801042c3: e8 78 f3 ff ff call 80103640 <mycpu> if(!holding(lk)) 801042c8: 39 c6 cmp %eax,%esi 801042ca: 75 e5 jne 801042b1 <release+0x11> lk->pcs[0] = 0; 801042cc: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) lk->cpu = 0; 801042d3: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) __sync_synchronize(); 801042da: 0f ae f0 mfence asm volatile("movl $0, %0" : "+m" (lk->locked) : ); 801042dd: c7 03 00 00 00 00 movl $0x0,(%ebx) } 801042e3: 83 c4 10 add $0x10,%esp 801042e6: 5b pop %ebx 801042e7: 5e pop %esi 801042e8: 5d pop %ebp popcli(); 801042e9: e9 42 ff ff ff jmp 80104230 <popcli> 801042ee: 66 90 xchg %ax,%ax 801042f0 <memset>: #include "types.h" #include "x86.h" void* memset(void *dst, int c, uint n) { 801042f0: 55 push %ebp 801042f1: 89 e5 mov %esp,%ebp 801042f3: 8b 55 08 mov 0x8(%ebp),%edx 801042f6: 57 push %edi 801042f7: 8b 4d 10 mov 0x10(%ebp),%ecx 801042fa: 53 push %ebx if ((int)dst%4 == 0 && n%4 == 0){ 801042fb: f6 c2 03 test $0x3,%dl 801042fe: 75 05 jne 80104305 <memset+0x15> 80104300: f6 c1 03 test $0x3,%cl 80104303: 74 13 je 80104318 <memset+0x28> asm volatile("cld; rep stosb" : 80104305: 89 d7 mov %edx,%edi 80104307: 8b 45 0c mov 0xc(%ebp),%eax 8010430a: fc cld 8010430b: f3 aa rep stos %al,%es:(%edi) c &= 0xFF; stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4); } else stosb(dst, c, n); return dst; } 8010430d: 5b pop %ebx 8010430e: 89 d0 mov %edx,%eax 80104310: 5f pop %edi 80104311: 5d pop %ebp 80104312: c3 ret 80104313: 90 nop 80104314: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi c &= 0xFF; 80104318: 0f b6 7d 0c movzbl 0xc(%ebp),%edi stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4); 8010431c: c1 e9 02 shr $0x2,%ecx 8010431f: 89 f8 mov %edi,%eax 80104321: 89 fb mov %edi,%ebx 80104323: c1 e0 18 shl $0x18,%eax 80104326: c1 e3 10 shl $0x10,%ebx 80104329: 09 d8 or %ebx,%eax 8010432b: 09 f8 or %edi,%eax 8010432d: c1 e7 08 shl $0x8,%edi 80104330: 09 f8 or %edi,%eax asm volatile("cld; rep stosl" : 80104332: 89 d7 mov %edx,%edi 80104334: fc cld 80104335: f3 ab rep stos %eax,%es:(%edi) } 80104337: 5b pop %ebx 80104338: 89 d0 mov %edx,%eax 8010433a: 5f pop %edi 8010433b: 5d pop %ebp 8010433c: c3 ret 8010433d: 8d 76 00 lea 0x0(%esi),%esi 80104340 <memcmp>: int memcmp(const void *v1, const void *v2, uint n) { 80104340: 55 push %ebp 80104341: 89 e5 mov %esp,%ebp 80104343: 8b 45 10 mov 0x10(%ebp),%eax 80104346: 57 push %edi 80104347: 56 push %esi 80104348: 8b 75 0c mov 0xc(%ebp),%esi 8010434b: 53 push %ebx 8010434c: 8b 5d 08 mov 0x8(%ebp),%ebx const uchar *s1, *s2; s1 = v1; s2 = v2; while(n-- > 0){ 8010434f: 85 c0 test %eax,%eax 80104351: 8d 78 ff lea -0x1(%eax),%edi 80104354: 74 26 je 8010437c <memcmp+0x3c> if(*s1 != *s2) 80104356: 0f b6 03 movzbl (%ebx),%eax 80104359: 31 d2 xor %edx,%edx 8010435b: 0f b6 0e movzbl (%esi),%ecx 8010435e: 38 c8 cmp %cl,%al 80104360: 74 16 je 80104378 <memcmp+0x38> 80104362: eb 24 jmp 80104388 <memcmp+0x48> 80104364: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104368: 0f b6 44 13 01 movzbl 0x1(%ebx,%edx,1),%eax 8010436d: 83 c2 01 add $0x1,%edx 80104370: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 80104374: 38 c8 cmp %cl,%al 80104376: 75 10 jne 80104388 <memcmp+0x48> while(n-- > 0){ 80104378: 39 fa cmp %edi,%edx 8010437a: 75 ec jne 80104368 <memcmp+0x28> return *s1 - *s2; s1++, s2++; } return 0; } 8010437c: 5b pop %ebx return 0; 8010437d: 31 c0 xor %eax,%eax } 8010437f: 5e pop %esi 80104380: 5f pop %edi 80104381: 5d pop %ebp 80104382: c3 ret 80104383: 90 nop 80104384: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104388: 5b pop %ebx return *s1 - *s2; 80104389: 29 c8 sub %ecx,%eax } 8010438b: 5e pop %esi 8010438c: 5f pop %edi 8010438d: 5d pop %ebp 8010438e: c3 ret 8010438f: 90 nop 80104390 <memmove>: void* memmove(void *dst, const void *src, uint n) { 80104390: 55 push %ebp 80104391: 89 e5 mov %esp,%ebp 80104393: 57 push %edi 80104394: 8b 45 08 mov 0x8(%ebp),%eax 80104397: 56 push %esi 80104398: 8b 75 0c mov 0xc(%ebp),%esi 8010439b: 53 push %ebx 8010439c: 8b 5d 10 mov 0x10(%ebp),%ebx const char *s; char *d; s = src; d = dst; if(s < d && s + n > d){ 8010439f: 39 c6 cmp %eax,%esi 801043a1: 73 35 jae 801043d8 <memmove+0x48> 801043a3: 8d 0c 1e lea (%esi,%ebx,1),%ecx 801043a6: 39 c8 cmp %ecx,%eax 801043a8: 73 2e jae 801043d8 <memmove+0x48> s += n; d += n; while(n-- > 0) 801043aa: 85 db test %ebx,%ebx d += n; 801043ac: 8d 3c 18 lea (%eax,%ebx,1),%edi while(n-- > 0) 801043af: 8d 53 ff lea -0x1(%ebx),%edx 801043b2: 74 1b je 801043cf <memmove+0x3f> 801043b4: f7 db neg %ebx 801043b6: 8d 34 19 lea (%ecx,%ebx,1),%esi 801043b9: 01 fb add %edi,%ebx 801043bb: 90 nop 801043bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *--d = *--s; 801043c0: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 801043c4: 88 0c 13 mov %cl,(%ebx,%edx,1) while(n-- > 0) 801043c7: 83 ea 01 sub $0x1,%edx 801043ca: 83 fa ff cmp $0xffffffff,%edx 801043cd: 75 f1 jne 801043c0 <memmove+0x30> } else while(n-- > 0) *d++ = *s++; return dst; } 801043cf: 5b pop %ebx 801043d0: 5e pop %esi 801043d1: 5f pop %edi 801043d2: 5d pop %ebp 801043d3: c3 ret 801043d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(n-- > 0) 801043d8: 31 d2 xor %edx,%edx 801043da: 85 db test %ebx,%ebx 801043dc: 74 f1 je 801043cf <memmove+0x3f> 801043de: 66 90 xchg %ax,%ax *d++ = *s++; 801043e0: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 801043e4: 88 0c 10 mov %cl,(%eax,%edx,1) 801043e7: 83 c2 01 add $0x1,%edx while(n-- > 0) 801043ea: 39 da cmp %ebx,%edx 801043ec: 75 f2 jne 801043e0 <memmove+0x50> } 801043ee: 5b pop %ebx 801043ef: 5e pop %esi 801043f0: 5f pop %edi 801043f1: 5d pop %ebp 801043f2: c3 ret 801043f3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801043f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104400 <memcpy>: // memcpy exists to placate GCC. Use memmove. void* memcpy(void *dst, const void *src, uint n) { 80104400: 55 push %ebp 80104401: 89 e5 mov %esp,%ebp return memmove(dst, src, n); } 80104403: 5d pop %ebp return memmove(dst, src, n); 80104404: eb 8a jmp 80104390 <memmove> 80104406: 8d 76 00 lea 0x0(%esi),%esi 80104409: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104410 <strncmp>: int strncmp(const char *p, const char *q, uint n) { 80104410: 55 push %ebp 80104411: 89 e5 mov %esp,%ebp 80104413: 56 push %esi 80104414: 8b 75 10 mov 0x10(%ebp),%esi 80104417: 53 push %ebx 80104418: 8b 4d 08 mov 0x8(%ebp),%ecx 8010441b: 8b 5d 0c mov 0xc(%ebp),%ebx while(n > 0 && *p && *p == *q) 8010441e: 85 f6 test %esi,%esi 80104420: 74 30 je 80104452 <strncmp+0x42> 80104422: 0f b6 01 movzbl (%ecx),%eax 80104425: 84 c0 test %al,%al 80104427: 74 2f je 80104458 <strncmp+0x48> 80104429: 0f b6 13 movzbl (%ebx),%edx 8010442c: 38 d0 cmp %dl,%al 8010442e: 75 46 jne 80104476 <strncmp+0x66> 80104430: 8d 51 01 lea 0x1(%ecx),%edx 80104433: 01 ce add %ecx,%esi 80104435: eb 14 jmp 8010444b <strncmp+0x3b> 80104437: 90 nop 80104438: 0f b6 02 movzbl (%edx),%eax 8010443b: 84 c0 test %al,%al 8010443d: 74 31 je 80104470 <strncmp+0x60> 8010443f: 0f b6 19 movzbl (%ecx),%ebx 80104442: 83 c2 01 add $0x1,%edx 80104445: 38 d8 cmp %bl,%al 80104447: 75 17 jne 80104460 <strncmp+0x50> n--, p++, q++; 80104449: 89 cb mov %ecx,%ebx while(n > 0 && *p && *p == *q) 8010444b: 39 f2 cmp %esi,%edx n--, p++, q++; 8010444d: 8d 4b 01 lea 0x1(%ebx),%ecx while(n > 0 && *p && *p == *q) 80104450: 75 e6 jne 80104438 <strncmp+0x28> if(n == 0) return 0; return (uchar)*p - (uchar)*q; } 80104452: 5b pop %ebx return 0; 80104453: 31 c0 xor %eax,%eax } 80104455: 5e pop %esi 80104456: 5d pop %ebp 80104457: c3 ret 80104458: 0f b6 1b movzbl (%ebx),%ebx while(n > 0 && *p && *p == *q) 8010445b: 31 c0 xor %eax,%eax 8010445d: 8d 76 00 lea 0x0(%esi),%esi return (uchar)*p - (uchar)*q; 80104460: 0f b6 d3 movzbl %bl,%edx 80104463: 29 d0 sub %edx,%eax } 80104465: 5b pop %ebx 80104466: 5e pop %esi 80104467: 5d pop %ebp 80104468: c3 ret 80104469: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104470: 0f b6 5b 01 movzbl 0x1(%ebx),%ebx 80104474: eb ea jmp 80104460 <strncmp+0x50> while(n > 0 && *p && *p == *q) 80104476: 89 d3 mov %edx,%ebx 80104478: eb e6 jmp 80104460 <strncmp+0x50> 8010447a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80104480 <strncpy>: char* strncpy(char *s, const char *t, int n) { 80104480: 55 push %ebp 80104481: 89 e5 mov %esp,%ebp 80104483: 8b 45 08 mov 0x8(%ebp),%eax 80104486: 56 push %esi 80104487: 8b 4d 10 mov 0x10(%ebp),%ecx 8010448a: 53 push %ebx 8010448b: 8b 5d 0c mov 0xc(%ebp),%ebx char *os; os = s; while(n-- > 0 && (*s++ = *t++) != 0) 8010448e: 89 c2 mov %eax,%edx 80104490: eb 19 jmp 801044ab <strncpy+0x2b> 80104492: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80104498: 83 c3 01 add $0x1,%ebx 8010449b: 0f b6 4b ff movzbl -0x1(%ebx),%ecx 8010449f: 83 c2 01 add $0x1,%edx 801044a2: 84 c9 test %cl,%cl 801044a4: 88 4a ff mov %cl,-0x1(%edx) 801044a7: 74 09 je 801044b2 <strncpy+0x32> 801044a9: 89 f1 mov %esi,%ecx 801044ab: 85 c9 test %ecx,%ecx 801044ad: 8d 71 ff lea -0x1(%ecx),%esi 801044b0: 7f e6 jg 80104498 <strncpy+0x18> ; while(n-- > 0) 801044b2: 31 c9 xor %ecx,%ecx 801044b4: 85 f6 test %esi,%esi 801044b6: 7e 0f jle 801044c7 <strncpy+0x47> *s++ = 0; 801044b8: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) 801044bc: 89 f3 mov %esi,%ebx 801044be: 83 c1 01 add $0x1,%ecx 801044c1: 29 cb sub %ecx,%ebx while(n-- > 0) 801044c3: 85 db test %ebx,%ebx 801044c5: 7f f1 jg 801044b8 <strncpy+0x38> return os; } 801044c7: 5b pop %ebx 801044c8: 5e pop %esi 801044c9: 5d pop %ebp 801044ca: c3 ret 801044cb: 90 nop 801044cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801044d0 <safestrcpy>: // Like strncpy but guaranteed to NUL-terminate. char* safestrcpy(char *s, const char *t, int n) { 801044d0: 55 push %ebp 801044d1: 89 e5 mov %esp,%ebp 801044d3: 8b 4d 10 mov 0x10(%ebp),%ecx 801044d6: 56 push %esi 801044d7: 8b 45 08 mov 0x8(%ebp),%eax 801044da: 53 push %ebx 801044db: 8b 55 0c mov 0xc(%ebp),%edx char *os; os = s; if(n <= 0) 801044de: 85 c9 test %ecx,%ecx 801044e0: 7e 26 jle 80104508 <safestrcpy+0x38> 801044e2: 8d 74 0a ff lea -0x1(%edx,%ecx,1),%esi 801044e6: 89 c1 mov %eax,%ecx 801044e8: eb 17 jmp 80104501 <safestrcpy+0x31> 801044ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return os; while(--n > 0 && (*s++ = *t++) != 0) 801044f0: 83 c2 01 add $0x1,%edx 801044f3: 0f b6 5a ff movzbl -0x1(%edx),%ebx 801044f7: 83 c1 01 add $0x1,%ecx 801044fa: 84 db test %bl,%bl 801044fc: 88 59 ff mov %bl,-0x1(%ecx) 801044ff: 74 04 je 80104505 <safestrcpy+0x35> 80104501: 39 f2 cmp %esi,%edx 80104503: 75 eb jne 801044f0 <safestrcpy+0x20> ; *s = 0; 80104505: c6 01 00 movb $0x0,(%ecx) return os; } 80104508: 5b pop %ebx 80104509: 5e pop %esi 8010450a: 5d pop %ebp 8010450b: c3 ret 8010450c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104510 <strlen>: int strlen(const char *s) { 80104510: 55 push %ebp int n; for(n = 0; s[n]; n++) 80104511: 31 c0 xor %eax,%eax { 80104513: 89 e5 mov %esp,%ebp 80104515: 8b 55 08 mov 0x8(%ebp),%edx for(n = 0; s[n]; n++) 80104518: 80 3a 00 cmpb $0x0,(%edx) 8010451b: 74 0c je 80104529 <strlen+0x19> 8010451d: 8d 76 00 lea 0x0(%esi),%esi 80104520: 83 c0 01 add $0x1,%eax 80104523: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1) 80104527: 75 f7 jne 80104520 <strlen+0x10> ; return n; } 80104529: 5d pop %ebp 8010452a: c3 ret 8010452b <swtch>: # Save current register context in old # and then load register context from new. .globl swtch swtch: movl 4(%esp), %eax 8010452b: 8b 44 24 04 mov 0x4(%esp),%eax movl 8(%esp), %edx 8010452f: 8b 54 24 08 mov 0x8(%esp),%edx # Save old callee-save registers pushl %ebp 80104533: 55 push %ebp pushl %ebx 80104534: 53 push %ebx pushl %esi 80104535: 56 push %esi pushl %edi 80104536: 57 push %edi # Switch stacks movl %esp, (%eax) 80104537: 89 20 mov %esp,(%eax) movl %edx, %esp 80104539: 89 d4 mov %edx,%esp # Load new callee-save registers popl %edi 8010453b: 5f pop %edi popl %esi 8010453c: 5e pop %esi popl %ebx 8010453d: 5b pop %ebx popl %ebp 8010453e: 5d pop %ebp ret 8010453f: c3 ret 80104540 <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) { 80104540: 55 push %ebp 80104541: 89 e5 mov %esp,%ebp 80104543: 56 push %esi 80104544: 53 push %ebx 80104545: 83 ec 10 sub $0x10,%esp 80104548: 8b 5d 08 mov 0x8(%ebp),%ebx struct proc *curproc = myproc(); 8010454b: e8 90 f1 ff ff call 801036e0 <myproc> cprintf("HELP fecthint \n"); 80104550: c7 04 24 31 75 10 80 movl $0x80107531,(%esp) struct proc *curproc = myproc(); 80104557: 89 c6 mov %eax,%esi cprintf("HELP fecthint \n"); 80104559: e8 f2 c0 ff ff call 80100650 <cprintf> cprintf("sz: %d\n", curproc->sz); 8010455e: 8b 06 mov (%esi),%eax 80104560: c7 04 24 41 75 10 80 movl $0x80107541,(%esp) 80104567: 89 44 24 04 mov %eax,0x4(%esp) 8010456b: e8 e0 c0 ff ff call 80100650 <cprintf> cprintf("addr: %d\n", addr); 80104570: 89 5c 24 04 mov %ebx,0x4(%esp) 80104574: c7 04 24 49 75 10 80 movl $0x80107549,(%esp) 8010457b: e8 d0 c0 ff ff call 80100650 <cprintf> // if(addr >= curproc->sz || addr+4 > curproc->sz || addr <= curproc->userStackTop || addr-4 < curproc->userStackTop) // return -1; *ip = *(int*)(addr); 80104580: 8b 45 0c mov 0xc(%ebp),%eax 80104583: 8b 13 mov (%ebx),%edx 80104585: 89 10 mov %edx,(%eax) return 0; } 80104587: 83 c4 10 add $0x10,%esp 8010458a: 31 c0 xor %eax,%eax 8010458c: 5b pop %ebx 8010458d: 5e pop %esi 8010458e: 5d pop %ebp 8010458f: c3 ret 80104590 <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) { 80104590: 55 push %ebp 80104591: 89 e5 mov %esp,%ebp 80104593: 53 push %ebx 80104594: 83 ec 14 sub $0x14,%esp 80104597: 8b 5d 0c mov 0xc(%ebp),%ebx char *s, *ep; // struct proc *curproc = myproc(); cprintf("HELP fecthstr \n"); 8010459a: c7 04 24 53 75 10 80 movl $0x80107553,(%esp) 801045a1: e8 aa c0 ff ff call 80100650 <cprintf> // if(addr >= curproc->sz || addr <= curproc->userStackTop) // return -1; *pp = (char*)addr; 801045a6: 8b 45 08 mov 0x8(%ebp),%eax 801045a9: 89 03 mov %eax,(%ebx) // ep = (char*)curproc->sz; //lab3 ep = (char*)(KERNBASE-4); cprintf("ep: %d\n", ep); 801045ab: c7 44 24 04 fc ff ff movl $0x7ffffffc,0x4(%esp) 801045b2: 7f 801045b3: c7 04 24 63 75 10 80 movl $0x80107563,(%esp) 801045ba: e8 91 c0 ff ff call 80100650 <cprintf> cprintf("pp: %d\n", *pp); 801045bf: 8b 03 mov (%ebx),%eax 801045c1: c7 04 24 6b 75 10 80 movl $0x8010756b,(%esp) 801045c8: 89 44 24 04 mov %eax,0x4(%esp) 801045cc: e8 7f c0 ff ff call 80100650 <cprintf> cprintf("HELP fecthstr below ep call \n"); 801045d1: c7 04 24 73 75 10 80 movl $0x80107573,(%esp) 801045d8: e8 73 c0 ff ff call 80100650 <cprintf> for(s = *pp; s < ep; s++){ 801045dd: 8b 13 mov (%ebx),%edx 801045df: 81 fa fb ff ff 7f cmp $0x7ffffffb,%edx 801045e5: 77 18 ja 801045ff <fetchstr+0x6f> if(*s == 0) 801045e7: 80 3a 00 cmpb $0x0,(%edx) 801045ea: 89 d0 mov %edx,%eax 801045ec: 75 07 jne 801045f5 <fetchstr+0x65> 801045ee: eb 30 jmp 80104620 <fetchstr+0x90> 801045f0: 80 38 00 cmpb $0x0,(%eax) 801045f3: 74 23 je 80104618 <fetchstr+0x88> for(s = *pp; s < ep; s++){ 801045f5: 83 c0 01 add $0x1,%eax 801045f8: 3d fc ff ff 7f cmp $0x7ffffffc,%eax 801045fd: 75 f1 jne 801045f0 <fetchstr+0x60> return s - *pp; } cprintf("HELP fecthstr return -1 \n"); 801045ff: c7 04 24 91 75 10 80 movl $0x80107591,(%esp) 80104606: e8 45 c0 ff ff call 80100650 <cprintf> return -1; 8010460b: b8 ff ff ff ff mov $0xffffffff,%eax } 80104610: 83 c4 14 add $0x14,%esp 80104613: 5b pop %ebx 80104614: 5d pop %ebp 80104615: c3 ret 80104616: 66 90 xchg %ax,%ax 80104618: 83 c4 14 add $0x14,%esp 8010461b: 29 d0 sub %edx,%eax 8010461d: 5b pop %ebx 8010461e: 5d pop %ebp 8010461f: c3 ret if(*s == 0) 80104620: 31 c0 xor %eax,%eax return s - *pp; 80104622: eb ec jmp 80104610 <fetchstr+0x80> 80104624: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8010462a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80104630 <argint>: // Fetch the nth 32-bit system call argument. int argint(int n, int *ip) { 80104630: 55 push %ebp 80104631: 89 e5 mov %esp,%ebp 80104633: 56 push %esi 80104634: 8b 75 0c mov 0xc(%ebp),%esi 80104637: 53 push %ebx 80104638: 8b 5d 08 mov 0x8(%ebp),%ebx return fetchint((myproc()->tf->esp) + 4 + 4*n, ip); 8010463b: e8 a0 f0 ff ff call 801036e0 <myproc> 80104640: 89 75 0c mov %esi,0xc(%ebp) 80104643: 8b 40 18 mov 0x18(%eax),%eax 80104646: 8b 40 44 mov 0x44(%eax),%eax 80104649: 8d 44 98 04 lea 0x4(%eax,%ebx,4),%eax 8010464d: 89 45 08 mov %eax,0x8(%ebp) } 80104650: 5b pop %ebx 80104651: 5e pop %esi 80104652: 5d pop %ebp return fetchint((myproc()->tf->esp) + 4 + 4*n, ip); 80104653: e9 e8 fe ff ff jmp 80104540 <fetchint> 80104658: 90 nop 80104659: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104660 <argptr>: // Fetch the nth word-sized system call argument as a pointer // to a block of memory of size bytes. Check that the pointer // lies within the process address space. int argptr(int n, char **pp, int size) { 80104660: 55 push %ebp 80104661: 89 e5 mov %esp,%ebp 80104663: 83 ec 28 sub $0x28,%esp int i; // struct proc *curproc = myproc(); cprintf("HELP argptr \n"); 80104666: c7 04 24 ab 75 10 80 movl $0x801075ab,(%esp) 8010466d: e8 de bf ff ff call 80100650 <cprintf> if(argint(n, &i) < 0) 80104672: 8d 45 f4 lea -0xc(%ebp),%eax 80104675: 89 44 24 04 mov %eax,0x4(%esp) 80104679: 8b 45 08 mov 0x8(%ebp),%eax 8010467c: 89 04 24 mov %eax,(%esp) 8010467f: e8 ac ff ff ff call 80104630 <argint> 80104684: 85 c0 test %eax,%eax 80104686: 78 18 js 801046a0 <argptr+0x40> return -1; // if(size < 0 || (uint)i >= curproc->sz || (uint)i+size > curproc->sz || (uint)i <= curproc->userStackTop || (uint)i-size < curproc->userStackTop) if(size < 0) 80104688: 8b 45 10 mov 0x10(%ebp),%eax 8010468b: 85 c0 test %eax,%eax 8010468d: 78 11 js 801046a0 <argptr+0x40> return -1; *pp = (char*)i; 8010468f: 8b 45 0c mov 0xc(%ebp),%eax 80104692: 8b 55 f4 mov -0xc(%ebp),%edx 80104695: 89 10 mov %edx,(%eax) return 0; 80104697: 31 c0 xor %eax,%eax } 80104699: c9 leave 8010469a: c3 ret 8010469b: 90 nop 8010469c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 801046a0: b8 ff ff ff ff mov $0xffffffff,%eax } 801046a5: c9 leave 801046a6: c3 ret 801046a7: 89 f6 mov %esi,%esi 801046a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801046b0 <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) { 801046b0: 55 push %ebp 801046b1: 89 e5 mov %esp,%ebp 801046b3: 83 ec 28 sub $0x28,%esp int addr; if(argint(n, &addr) < 0) 801046b6: 8d 45 f4 lea -0xc(%ebp),%eax 801046b9: 89 44 24 04 mov %eax,0x4(%esp) 801046bd: 8b 45 08 mov 0x8(%ebp),%eax 801046c0: 89 04 24 mov %eax,(%esp) 801046c3: e8 68 ff ff ff call 80104630 <argint> 801046c8: 85 c0 test %eax,%eax 801046ca: 78 14 js 801046e0 <argstr+0x30> return -1; return fetchstr(addr, pp); 801046cc: 8b 45 0c mov 0xc(%ebp),%eax 801046cf: 89 44 24 04 mov %eax,0x4(%esp) 801046d3: 8b 45 f4 mov -0xc(%ebp),%eax 801046d6: 89 04 24 mov %eax,(%esp) 801046d9: e8 b2 fe ff ff call 80104590 <fetchstr> } 801046de: c9 leave 801046df: c3 ret return -1; 801046e0: b8 ff ff ff ff mov $0xffffffff,%eax } 801046e5: c9 leave 801046e6: c3 ret 801046e7: 89 f6 mov %esi,%esi 801046e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801046f0 <syscall>: [SYS_shm_close] sys_shm_close }; void syscall(void) { 801046f0: 55 push %ebp 801046f1: 89 e5 mov %esp,%ebp 801046f3: 56 push %esi 801046f4: 53 push %ebx 801046f5: 83 ec 10 sub $0x10,%esp int num; struct proc *curproc = myproc(); 801046f8: e8 e3 ef ff ff call 801036e0 <myproc> num = curproc->tf->eax; 801046fd: 8b 70 18 mov 0x18(%eax),%esi struct proc *curproc = myproc(); 80104700: 89 c3 mov %eax,%ebx num = curproc->tf->eax; 80104702: 8b 46 1c mov 0x1c(%esi),%eax if(num > 0 && num < NELEM(syscalls) && syscalls[num]) { 80104705: 8d 50 ff lea -0x1(%eax),%edx 80104708: 83 fa 16 cmp $0x16,%edx 8010470b: 77 1b ja 80104728 <syscall+0x38> 8010470d: 8b 14 85 e0 75 10 80 mov -0x7fef8a20(,%eax,4),%edx 80104714: 85 d2 test %edx,%edx 80104716: 74 10 je 80104728 <syscall+0x38> curproc->tf->eax = syscalls[num](); 80104718: ff d2 call *%edx 8010471a: 89 46 1c mov %eax,0x1c(%esi) } else { cprintf("%d %s: unknown sys call %d\n", curproc->pid, curproc->name, num); curproc->tf->eax = -1; } } 8010471d: 83 c4 10 add $0x10,%esp 80104720: 5b pop %ebx 80104721: 5e pop %esi 80104722: 5d pop %ebp 80104723: c3 ret 80104724: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi cprintf("%d %s: unknown sys call %d\n", 80104728: 89 44 24 0c mov %eax,0xc(%esp) curproc->pid, curproc->name, num); 8010472c: 8d 43 6c lea 0x6c(%ebx),%eax 8010472f: 89 44 24 08 mov %eax,0x8(%esp) cprintf("%d %s: unknown sys call %d\n", 80104733: 8b 43 10 mov 0x10(%ebx),%eax 80104736: c7 04 24 b9 75 10 80 movl $0x801075b9,(%esp) 8010473d: 89 44 24 04 mov %eax,0x4(%esp) 80104741: e8 0a bf ff ff call 80100650 <cprintf> curproc->tf->eax = -1; 80104746: 8b 43 18 mov 0x18(%ebx),%eax 80104749: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax) } 80104750: 83 c4 10 add $0x10,%esp 80104753: 5b pop %ebx 80104754: 5e pop %esi 80104755: 5d pop %ebp 80104756: c3 ret 80104757: 66 90 xchg %ax,%ax 80104759: 66 90 xchg %ax,%ax 8010475b: 66 90 xchg %ax,%ax 8010475d: 66 90 xchg %ax,%ax 8010475f: 90 nop 80104760 <fdalloc>: // Allocate a file descriptor for the given file. // Takes over file reference from caller on success. static int fdalloc(struct file *f) { 80104760: 55 push %ebp 80104761: 89 e5 mov %esp,%ebp 80104763: 53 push %ebx 80104764: 89 c3 mov %eax,%ebx 80104766: 83 ec 04 sub $0x4,%esp int fd; struct proc *curproc = myproc(); 80104769: e8 72 ef ff ff call 801036e0 <myproc> for(fd = 0; fd < NOFILE; fd++){ 8010476e: 31 d2 xor %edx,%edx if(curproc->ofile[fd] == 0){ 80104770: 8b 4c 90 28 mov 0x28(%eax,%edx,4),%ecx 80104774: 85 c9 test %ecx,%ecx 80104776: 74 18 je 80104790 <fdalloc+0x30> for(fd = 0; fd < NOFILE; fd++){ 80104778: 83 c2 01 add $0x1,%edx 8010477b: 83 fa 10 cmp $0x10,%edx 8010477e: 75 f0 jne 80104770 <fdalloc+0x10> curproc->ofile[fd] = f; return fd; } } return -1; } 80104780: 83 c4 04 add $0x4,%esp return -1; 80104783: b8 ff ff ff ff mov $0xffffffff,%eax } 80104788: 5b pop %ebx 80104789: 5d pop %ebp 8010478a: c3 ret 8010478b: 90 nop 8010478c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi curproc->ofile[fd] = f; 80104790: 89 5c 90 28 mov %ebx,0x28(%eax,%edx,4) } 80104794: 83 c4 04 add $0x4,%esp return fd; 80104797: 89 d0 mov %edx,%eax } 80104799: 5b pop %ebx 8010479a: 5d pop %ebp 8010479b: c3 ret 8010479c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801047a0 <create>: return -1; } static struct inode* create(char *path, short type, short major, short minor) { 801047a0: 55 push %ebp 801047a1: 89 e5 mov %esp,%ebp 801047a3: 57 push %edi 801047a4: 56 push %esi 801047a5: 53 push %ebx 801047a6: 83 ec 4c sub $0x4c,%esp 801047a9: 89 4d c0 mov %ecx,-0x40(%ebp) 801047ac: 8b 4d 08 mov 0x8(%ebp),%ecx uint off; struct inode *ip, *dp; char name[DIRSIZ]; if((dp = nameiparent(path, name)) == 0) 801047af: 8d 5d da lea -0x26(%ebp),%ebx 801047b2: 89 5c 24 04 mov %ebx,0x4(%esp) 801047b6: 89 04 24 mov %eax,(%esp) { 801047b9: 89 55 c4 mov %edx,-0x3c(%ebp) 801047bc: 89 4d bc mov %ecx,-0x44(%ebp) if((dp = nameiparent(path, name)) == 0) 801047bf: e8 9c d7 ff ff call 80101f60 <nameiparent> 801047c4: 85 c0 test %eax,%eax 801047c6: 89 c7 mov %eax,%edi 801047c8: 0f 84 da 00 00 00 je 801048a8 <create+0x108> return 0; ilock(dp); 801047ce: 89 04 24 mov %eax,(%esp) 801047d1: e8 1a cf ff ff call 801016f0 <ilock> if((ip = dirlookup(dp, name, &off)) != 0){ 801047d6: 8d 45 d4 lea -0x2c(%ebp),%eax 801047d9: 89 44 24 08 mov %eax,0x8(%esp) 801047dd: 89 5c 24 04 mov %ebx,0x4(%esp) 801047e1: 89 3c 24 mov %edi,(%esp) 801047e4: e8 17 d4 ff ff call 80101c00 <dirlookup> 801047e9: 85 c0 test %eax,%eax 801047eb: 89 c6 mov %eax,%esi 801047ed: 74 41 je 80104830 <create+0x90> iunlockput(dp); 801047ef: 89 3c 24 mov %edi,(%esp) 801047f2: e8 59 d1 ff ff call 80101950 <iunlockput> ilock(ip); 801047f7: 89 34 24 mov %esi,(%esp) 801047fa: e8 f1 ce ff ff call 801016f0 <ilock> if(type == T_FILE && ip->type == T_FILE) 801047ff: 66 83 7d c4 02 cmpw $0x2,-0x3c(%ebp) 80104804: 75 12 jne 80104818 <create+0x78> 80104806: 66 83 7e 50 02 cmpw $0x2,0x50(%esi) 8010480b: 89 f0 mov %esi,%eax 8010480d: 75 09 jne 80104818 <create+0x78> panic("create: dirlink"); iunlockput(dp); return ip; } 8010480f: 83 c4 4c add $0x4c,%esp 80104812: 5b pop %ebx 80104813: 5e pop %esi 80104814: 5f pop %edi 80104815: 5d pop %ebp 80104816: c3 ret 80104817: 90 nop iunlockput(ip); 80104818: 89 34 24 mov %esi,(%esp) 8010481b: e8 30 d1 ff ff call 80101950 <iunlockput> } 80104820: 83 c4 4c add $0x4c,%esp return 0; 80104823: 31 c0 xor %eax,%eax } 80104825: 5b pop %ebx 80104826: 5e pop %esi 80104827: 5f pop %edi 80104828: 5d pop %ebp 80104829: c3 ret 8010482a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if((ip = ialloc(dp->dev, type)) == 0) 80104830: 0f bf 45 c4 movswl -0x3c(%ebp),%eax 80104834: 89 44 24 04 mov %eax,0x4(%esp) 80104838: 8b 07 mov (%edi),%eax 8010483a: 89 04 24 mov %eax,(%esp) 8010483d: e8 1e cd ff ff call 80101560 <ialloc> 80104842: 85 c0 test %eax,%eax 80104844: 89 c6 mov %eax,%esi 80104846: 0f 84 bf 00 00 00 je 8010490b <create+0x16b> ilock(ip); 8010484c: 89 04 24 mov %eax,(%esp) 8010484f: e8 9c ce ff ff call 801016f0 <ilock> ip->major = major; 80104854: 0f b7 45 c0 movzwl -0x40(%ebp),%eax 80104858: 66 89 46 52 mov %ax,0x52(%esi) ip->minor = minor; 8010485c: 0f b7 45 bc movzwl -0x44(%ebp),%eax 80104860: 66 89 46 54 mov %ax,0x54(%esi) ip->nlink = 1; 80104864: b8 01 00 00 00 mov $0x1,%eax 80104869: 66 89 46 56 mov %ax,0x56(%esi) iupdate(ip); 8010486d: 89 34 24 mov %esi,(%esp) 80104870: e8 bb cd ff ff call 80101630 <iupdate> if(type == T_DIR){ // Create . and .. entries. 80104875: 66 83 7d c4 01 cmpw $0x1,-0x3c(%ebp) 8010487a: 74 34 je 801048b0 <create+0x110> if(dirlink(dp, name, ip->inum) < 0) 8010487c: 8b 46 04 mov 0x4(%esi),%eax 8010487f: 89 5c 24 04 mov %ebx,0x4(%esp) 80104883: 89 3c 24 mov %edi,(%esp) 80104886: 89 44 24 08 mov %eax,0x8(%esp) 8010488a: e8 d1 d5 ff ff call 80101e60 <dirlink> 8010488f: 85 c0 test %eax,%eax 80104891: 78 6c js 801048ff <create+0x15f> iunlockput(dp); 80104893: 89 3c 24 mov %edi,(%esp) 80104896: e8 b5 d0 ff ff call 80101950 <iunlockput> } 8010489b: 83 c4 4c add $0x4c,%esp return ip; 8010489e: 89 f0 mov %esi,%eax } 801048a0: 5b pop %ebx 801048a1: 5e pop %esi 801048a2: 5f pop %edi 801048a3: 5d pop %ebp 801048a4: c3 ret 801048a5: 8d 76 00 lea 0x0(%esi),%esi return 0; 801048a8: 31 c0 xor %eax,%eax 801048aa: e9 60 ff ff ff jmp 8010480f <create+0x6f> 801048af: 90 nop dp->nlink++; // for ".." 801048b0: 66 83 47 56 01 addw $0x1,0x56(%edi) iupdate(dp); 801048b5: 89 3c 24 mov %edi,(%esp) 801048b8: e8 73 cd ff ff call 80101630 <iupdate> if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0) 801048bd: 8b 46 04 mov 0x4(%esi),%eax 801048c0: c7 44 24 04 5c 76 10 movl $0x8010765c,0x4(%esp) 801048c7: 80 801048c8: 89 34 24 mov %esi,(%esp) 801048cb: 89 44 24 08 mov %eax,0x8(%esp) 801048cf: e8 8c d5 ff ff call 80101e60 <dirlink> 801048d4: 85 c0 test %eax,%eax 801048d6: 78 1b js 801048f3 <create+0x153> 801048d8: 8b 47 04 mov 0x4(%edi),%eax 801048db: c7 44 24 04 5b 76 10 movl $0x8010765b,0x4(%esp) 801048e2: 80 801048e3: 89 34 24 mov %esi,(%esp) 801048e6: 89 44 24 08 mov %eax,0x8(%esp) 801048ea: e8 71 d5 ff ff call 80101e60 <dirlink> 801048ef: 85 c0 test %eax,%eax 801048f1: 79 89 jns 8010487c <create+0xdc> panic("create dots"); 801048f3: c7 04 24 4f 76 10 80 movl $0x8010764f,(%esp) 801048fa: e8 61 ba ff ff call 80100360 <panic> panic("create: dirlink"); 801048ff: c7 04 24 5e 76 10 80 movl $0x8010765e,(%esp) 80104906: e8 55 ba ff ff call 80100360 <panic> panic("create: ialloc"); 8010490b: c7 04 24 40 76 10 80 movl $0x80107640,(%esp) 80104912: e8 49 ba ff ff call 80100360 <panic> 80104917: 89 f6 mov %esi,%esi 80104919: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104920 <argfd.constprop.0>: argfd(int n, int *pfd, struct file **pf) 80104920: 55 push %ebp 80104921: 89 e5 mov %esp,%ebp 80104923: 56 push %esi 80104924: 89 c6 mov %eax,%esi 80104926: 53 push %ebx 80104927: 89 d3 mov %edx,%ebx 80104929: 83 ec 20 sub $0x20,%esp if(argint(n, &fd) < 0) 8010492c: 8d 45 f4 lea -0xc(%ebp),%eax 8010492f: 89 44 24 04 mov %eax,0x4(%esp) 80104933: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010493a: e8 f1 fc ff ff call 80104630 <argint> 8010493f: 85 c0 test %eax,%eax 80104941: 78 2d js 80104970 <argfd.constprop.0+0x50> if(fd < 0 || fd >= NOFILE || (f=myproc()->ofile[fd]) == 0) 80104943: 83 7d f4 0f cmpl $0xf,-0xc(%ebp) 80104947: 77 27 ja 80104970 <argfd.constprop.0+0x50> 80104949: e8 92 ed ff ff call 801036e0 <myproc> 8010494e: 8b 55 f4 mov -0xc(%ebp),%edx 80104951: 8b 44 90 28 mov 0x28(%eax,%edx,4),%eax 80104955: 85 c0 test %eax,%eax 80104957: 74 17 je 80104970 <argfd.constprop.0+0x50> if(pfd) 80104959: 85 f6 test %esi,%esi 8010495b: 74 02 je 8010495f <argfd.constprop.0+0x3f> *pfd = fd; 8010495d: 89 16 mov %edx,(%esi) if(pf) 8010495f: 85 db test %ebx,%ebx 80104961: 74 1d je 80104980 <argfd.constprop.0+0x60> *pf = f; 80104963: 89 03 mov %eax,(%ebx) return 0; 80104965: 31 c0 xor %eax,%eax } 80104967: 83 c4 20 add $0x20,%esp 8010496a: 5b pop %ebx 8010496b: 5e pop %esi 8010496c: 5d pop %ebp 8010496d: c3 ret 8010496e: 66 90 xchg %ax,%ax 80104970: 83 c4 20 add $0x20,%esp return -1; 80104973: b8 ff ff ff ff mov $0xffffffff,%eax } 80104978: 5b pop %ebx 80104979: 5e pop %esi 8010497a: 5d pop %ebp 8010497b: c3 ret 8010497c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80104980: 31 c0 xor %eax,%eax 80104982: eb e3 jmp 80104967 <argfd.constprop.0+0x47> 80104984: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8010498a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80104990 <sys_dup>: { 80104990: 55 push %ebp if(argfd(0, 0, &f) < 0) 80104991: 31 c0 xor %eax,%eax { 80104993: 89 e5 mov %esp,%ebp 80104995: 53 push %ebx 80104996: 83 ec 24 sub $0x24,%esp if(argfd(0, 0, &f) < 0) 80104999: 8d 55 f4 lea -0xc(%ebp),%edx 8010499c: e8 7f ff ff ff call 80104920 <argfd.constprop.0> 801049a1: 85 c0 test %eax,%eax 801049a3: 78 23 js 801049c8 <sys_dup+0x38> if((fd=fdalloc(f)) < 0) 801049a5: 8b 45 f4 mov -0xc(%ebp),%eax 801049a8: e8 b3 fd ff ff call 80104760 <fdalloc> 801049ad: 85 c0 test %eax,%eax 801049af: 89 c3 mov %eax,%ebx 801049b1: 78 15 js 801049c8 <sys_dup+0x38> filedup(f); 801049b3: 8b 45 f4 mov -0xc(%ebp),%eax 801049b6: 89 04 24 mov %eax,(%esp) 801049b9: e8 52 c4 ff ff call 80100e10 <filedup> return fd; 801049be: 89 d8 mov %ebx,%eax } 801049c0: 83 c4 24 add $0x24,%esp 801049c3: 5b pop %ebx 801049c4: 5d pop %ebp 801049c5: c3 ret 801049c6: 66 90 xchg %ax,%ax return -1; 801049c8: b8 ff ff ff ff mov $0xffffffff,%eax 801049cd: eb f1 jmp 801049c0 <sys_dup+0x30> 801049cf: 90 nop 801049d0 <sys_read>: { 801049d0: 55 push %ebp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 801049d1: 31 c0 xor %eax,%eax { 801049d3: 89 e5 mov %esp,%ebp 801049d5: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 801049d8: 8d 55 ec lea -0x14(%ebp),%edx 801049db: e8 40 ff ff ff call 80104920 <argfd.constprop.0> 801049e0: 85 c0 test %eax,%eax 801049e2: 78 54 js 80104a38 <sys_read+0x68> 801049e4: 8d 45 f0 lea -0x10(%ebp),%eax 801049e7: 89 44 24 04 mov %eax,0x4(%esp) 801049eb: c7 04 24 02 00 00 00 movl $0x2,(%esp) 801049f2: e8 39 fc ff ff call 80104630 <argint> 801049f7: 85 c0 test %eax,%eax 801049f9: 78 3d js 80104a38 <sys_read+0x68> 801049fb: 8b 45 f0 mov -0x10(%ebp),%eax 801049fe: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104a05: 89 44 24 08 mov %eax,0x8(%esp) 80104a09: 8d 45 f4 lea -0xc(%ebp),%eax 80104a0c: 89 44 24 04 mov %eax,0x4(%esp) 80104a10: e8 4b fc ff ff call 80104660 <argptr> 80104a15: 85 c0 test %eax,%eax 80104a17: 78 1f js 80104a38 <sys_read+0x68> return fileread(f, p, n); 80104a19: 8b 45 f0 mov -0x10(%ebp),%eax 80104a1c: 89 44 24 08 mov %eax,0x8(%esp) 80104a20: 8b 45 f4 mov -0xc(%ebp),%eax 80104a23: 89 44 24 04 mov %eax,0x4(%esp) 80104a27: 8b 45 ec mov -0x14(%ebp),%eax 80104a2a: 89 04 24 mov %eax,(%esp) 80104a2d: e8 3e c5 ff ff call 80100f70 <fileread> } 80104a32: c9 leave 80104a33: c3 ret 80104a34: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80104a38: b8 ff ff ff ff mov $0xffffffff,%eax } 80104a3d: c9 leave 80104a3e: c3 ret 80104a3f: 90 nop 80104a40 <sys_write>: { 80104a40: 55 push %ebp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 80104a41: 31 c0 xor %eax,%eax { 80104a43: 89 e5 mov %esp,%ebp 80104a45: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 80104a48: 8d 55 ec lea -0x14(%ebp),%edx 80104a4b: e8 d0 fe ff ff call 80104920 <argfd.constprop.0> 80104a50: 85 c0 test %eax,%eax 80104a52: 78 54 js 80104aa8 <sys_write+0x68> 80104a54: 8d 45 f0 lea -0x10(%ebp),%eax 80104a57: 89 44 24 04 mov %eax,0x4(%esp) 80104a5b: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80104a62: e8 c9 fb ff ff call 80104630 <argint> 80104a67: 85 c0 test %eax,%eax 80104a69: 78 3d js 80104aa8 <sys_write+0x68> 80104a6b: 8b 45 f0 mov -0x10(%ebp),%eax 80104a6e: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104a75: 89 44 24 08 mov %eax,0x8(%esp) 80104a79: 8d 45 f4 lea -0xc(%ebp),%eax 80104a7c: 89 44 24 04 mov %eax,0x4(%esp) 80104a80: e8 db fb ff ff call 80104660 <argptr> 80104a85: 85 c0 test %eax,%eax 80104a87: 78 1f js 80104aa8 <sys_write+0x68> return filewrite(f, p, n); 80104a89: 8b 45 f0 mov -0x10(%ebp),%eax 80104a8c: 89 44 24 08 mov %eax,0x8(%esp) 80104a90: 8b 45 f4 mov -0xc(%ebp),%eax 80104a93: 89 44 24 04 mov %eax,0x4(%esp) 80104a97: 8b 45 ec mov -0x14(%ebp),%eax 80104a9a: 89 04 24 mov %eax,(%esp) 80104a9d: e8 6e c5 ff ff call 80101010 <filewrite> } 80104aa2: c9 leave 80104aa3: c3 ret 80104aa4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80104aa8: b8 ff ff ff ff mov $0xffffffff,%eax } 80104aad: c9 leave 80104aae: c3 ret 80104aaf: 90 nop 80104ab0 <sys_close>: { 80104ab0: 55 push %ebp 80104ab1: 89 e5 mov %esp,%ebp 80104ab3: 83 ec 28 sub $0x28,%esp if(argfd(0, &fd, &f) < 0) 80104ab6: 8d 55 f4 lea -0xc(%ebp),%edx 80104ab9: 8d 45 f0 lea -0x10(%ebp),%eax 80104abc: e8 5f fe ff ff call 80104920 <argfd.constprop.0> 80104ac1: 85 c0 test %eax,%eax 80104ac3: 78 23 js 80104ae8 <sys_close+0x38> myproc()->ofile[fd] = 0; 80104ac5: e8 16 ec ff ff call 801036e0 <myproc> 80104aca: 8b 55 f0 mov -0x10(%ebp),%edx 80104acd: c7 44 90 28 00 00 00 movl $0x0,0x28(%eax,%edx,4) 80104ad4: 00 fileclose(f); 80104ad5: 8b 45 f4 mov -0xc(%ebp),%eax 80104ad8: 89 04 24 mov %eax,(%esp) 80104adb: e8 80 c3 ff ff call 80100e60 <fileclose> return 0; 80104ae0: 31 c0 xor %eax,%eax } 80104ae2: c9 leave 80104ae3: c3 ret 80104ae4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80104ae8: b8 ff ff ff ff mov $0xffffffff,%eax } 80104aed: c9 leave 80104aee: c3 ret 80104aef: 90 nop 80104af0 <sys_fstat>: { 80104af0: 55 push %ebp if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0) 80104af1: 31 c0 xor %eax,%eax { 80104af3: 89 e5 mov %esp,%ebp 80104af5: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0) 80104af8: 8d 55 f0 lea -0x10(%ebp),%edx 80104afb: e8 20 fe ff ff call 80104920 <argfd.constprop.0> 80104b00: 85 c0 test %eax,%eax 80104b02: 78 34 js 80104b38 <sys_fstat+0x48> 80104b04: 8d 45 f4 lea -0xc(%ebp),%eax 80104b07: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 80104b0e: 00 80104b0f: 89 44 24 04 mov %eax,0x4(%esp) 80104b13: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104b1a: e8 41 fb ff ff call 80104660 <argptr> 80104b1f: 85 c0 test %eax,%eax 80104b21: 78 15 js 80104b38 <sys_fstat+0x48> return filestat(f, st); 80104b23: 8b 45 f4 mov -0xc(%ebp),%eax 80104b26: 89 44 24 04 mov %eax,0x4(%esp) 80104b2a: 8b 45 f0 mov -0x10(%ebp),%eax 80104b2d: 89 04 24 mov %eax,(%esp) 80104b30: e8 eb c3 ff ff call 80100f20 <filestat> } 80104b35: c9 leave 80104b36: c3 ret 80104b37: 90 nop return -1; 80104b38: b8 ff ff ff ff mov $0xffffffff,%eax } 80104b3d: c9 leave 80104b3e: c3 ret 80104b3f: 90 nop 80104b40 <sys_link>: { 80104b40: 55 push %ebp 80104b41: 89 e5 mov %esp,%ebp 80104b43: 57 push %edi 80104b44: 56 push %esi 80104b45: 53 push %ebx 80104b46: 83 ec 3c sub $0x3c,%esp if(argstr(0, &old) < 0 || argstr(1, &new) < 0) 80104b49: 8d 45 d4 lea -0x2c(%ebp),%eax 80104b4c: 89 44 24 04 mov %eax,0x4(%esp) 80104b50: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104b57: e8 54 fb ff ff call 801046b0 <argstr> 80104b5c: 85 c0 test %eax,%eax 80104b5e: 0f 88 e6 00 00 00 js 80104c4a <sys_link+0x10a> 80104b64: 8d 45 d0 lea -0x30(%ebp),%eax 80104b67: 89 44 24 04 mov %eax,0x4(%esp) 80104b6b: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104b72: e8 39 fb ff ff call 801046b0 <argstr> 80104b77: 85 c0 test %eax,%eax 80104b79: 0f 88 cb 00 00 00 js 80104c4a <sys_link+0x10a> begin_op(); 80104b7f: e8 cc df ff ff call 80102b50 <begin_op> if((ip = namei(old)) == 0){ 80104b84: 8b 45 d4 mov -0x2c(%ebp),%eax 80104b87: 89 04 24 mov %eax,(%esp) 80104b8a: e8 b1 d3 ff ff call 80101f40 <namei> 80104b8f: 85 c0 test %eax,%eax 80104b91: 89 c3 mov %eax,%ebx 80104b93: 0f 84 ac 00 00 00 je 80104c45 <sys_link+0x105> ilock(ip); 80104b99: 89 04 24 mov %eax,(%esp) 80104b9c: e8 4f cb ff ff call 801016f0 <ilock> if(ip->type == T_DIR){ 80104ba1: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104ba6: 0f 84 91 00 00 00 je 80104c3d <sys_link+0xfd> ip->nlink++; 80104bac: 66 83 43 56 01 addw $0x1,0x56(%ebx) if((dp = nameiparent(new, name)) == 0) 80104bb1: 8d 7d da lea -0x26(%ebp),%edi iupdate(ip); 80104bb4: 89 1c 24 mov %ebx,(%esp) 80104bb7: e8 74 ca ff ff call 80101630 <iupdate> iunlock(ip); 80104bbc: 89 1c 24 mov %ebx,(%esp) 80104bbf: e8 0c cc ff ff call 801017d0 <iunlock> if((dp = nameiparent(new, name)) == 0) 80104bc4: 8b 45 d0 mov -0x30(%ebp),%eax 80104bc7: 89 7c 24 04 mov %edi,0x4(%esp) 80104bcb: 89 04 24 mov %eax,(%esp) 80104bce: e8 8d d3 ff ff call 80101f60 <nameiparent> 80104bd3: 85 c0 test %eax,%eax 80104bd5: 89 c6 mov %eax,%esi 80104bd7: 74 4f je 80104c28 <sys_link+0xe8> ilock(dp); 80104bd9: 89 04 24 mov %eax,(%esp) 80104bdc: e8 0f cb ff ff call 801016f0 <ilock> if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){ 80104be1: 8b 03 mov (%ebx),%eax 80104be3: 39 06 cmp %eax,(%esi) 80104be5: 75 39 jne 80104c20 <sys_link+0xe0> 80104be7: 8b 43 04 mov 0x4(%ebx),%eax 80104bea: 89 7c 24 04 mov %edi,0x4(%esp) 80104bee: 89 34 24 mov %esi,(%esp) 80104bf1: 89 44 24 08 mov %eax,0x8(%esp) 80104bf5: e8 66 d2 ff ff call 80101e60 <dirlink> 80104bfa: 85 c0 test %eax,%eax 80104bfc: 78 22 js 80104c20 <sys_link+0xe0> iunlockput(dp); 80104bfe: 89 34 24 mov %esi,(%esp) 80104c01: e8 4a cd ff ff call 80101950 <iunlockput> iput(ip); 80104c06: 89 1c 24 mov %ebx,(%esp) 80104c09: e8 02 cc ff ff call 80101810 <iput> end_op(); 80104c0e: e8 ad df ff ff call 80102bc0 <end_op> } 80104c13: 83 c4 3c add $0x3c,%esp return 0; 80104c16: 31 c0 xor %eax,%eax } 80104c18: 5b pop %ebx 80104c19: 5e pop %esi 80104c1a: 5f pop %edi 80104c1b: 5d pop %ebp 80104c1c: c3 ret 80104c1d: 8d 76 00 lea 0x0(%esi),%esi iunlockput(dp); 80104c20: 89 34 24 mov %esi,(%esp) 80104c23: e8 28 cd ff ff call 80101950 <iunlockput> ilock(ip); 80104c28: 89 1c 24 mov %ebx,(%esp) 80104c2b: e8 c0 ca ff ff call 801016f0 <ilock> ip->nlink--; 80104c30: 66 83 6b 56 01 subw $0x1,0x56(%ebx) iupdate(ip); 80104c35: 89 1c 24 mov %ebx,(%esp) 80104c38: e8 f3 c9 ff ff call 80101630 <iupdate> iunlockput(ip); 80104c3d: 89 1c 24 mov %ebx,(%esp) 80104c40: e8 0b cd ff ff call 80101950 <iunlockput> end_op(); 80104c45: e8 76 df ff ff call 80102bc0 <end_op> } 80104c4a: 83 c4 3c add $0x3c,%esp return -1; 80104c4d: b8 ff ff ff ff mov $0xffffffff,%eax } 80104c52: 5b pop %ebx 80104c53: 5e pop %esi 80104c54: 5f pop %edi 80104c55: 5d pop %ebp 80104c56: c3 ret 80104c57: 89 f6 mov %esi,%esi 80104c59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104c60 <sys_unlink>: { 80104c60: 55 push %ebp 80104c61: 89 e5 mov %esp,%ebp 80104c63: 57 push %edi 80104c64: 56 push %esi 80104c65: 53 push %ebx 80104c66: 83 ec 5c sub $0x5c,%esp if(argstr(0, &path) < 0) 80104c69: 8d 45 c0 lea -0x40(%ebp),%eax 80104c6c: 89 44 24 04 mov %eax,0x4(%esp) 80104c70: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104c77: e8 34 fa ff ff call 801046b0 <argstr> 80104c7c: 85 c0 test %eax,%eax 80104c7e: 0f 88 76 01 00 00 js 80104dfa <sys_unlink+0x19a> begin_op(); 80104c84: e8 c7 de ff ff call 80102b50 <begin_op> if((dp = nameiparent(path, name)) == 0){ 80104c89: 8b 45 c0 mov -0x40(%ebp),%eax 80104c8c: 8d 5d ca lea -0x36(%ebp),%ebx 80104c8f: 89 5c 24 04 mov %ebx,0x4(%esp) 80104c93: 89 04 24 mov %eax,(%esp) 80104c96: e8 c5 d2 ff ff call 80101f60 <nameiparent> 80104c9b: 85 c0 test %eax,%eax 80104c9d: 89 45 b4 mov %eax,-0x4c(%ebp) 80104ca0: 0f 84 4f 01 00 00 je 80104df5 <sys_unlink+0x195> ilock(dp); 80104ca6: 8b 75 b4 mov -0x4c(%ebp),%esi 80104ca9: 89 34 24 mov %esi,(%esp) 80104cac: e8 3f ca ff ff call 801016f0 <ilock> if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0) 80104cb1: c7 44 24 04 5c 76 10 movl $0x8010765c,0x4(%esp) 80104cb8: 80 80104cb9: 89 1c 24 mov %ebx,(%esp) 80104cbc: e8 0f cf ff ff call 80101bd0 <namecmp> 80104cc1: 85 c0 test %eax,%eax 80104cc3: 0f 84 21 01 00 00 je 80104dea <sys_unlink+0x18a> 80104cc9: c7 44 24 04 5b 76 10 movl $0x8010765b,0x4(%esp) 80104cd0: 80 80104cd1: 89 1c 24 mov %ebx,(%esp) 80104cd4: e8 f7 ce ff ff call 80101bd0 <namecmp> 80104cd9: 85 c0 test %eax,%eax 80104cdb: 0f 84 09 01 00 00 je 80104dea <sys_unlink+0x18a> if((ip = dirlookup(dp, name, &off)) == 0) 80104ce1: 8d 45 c4 lea -0x3c(%ebp),%eax 80104ce4: 89 5c 24 04 mov %ebx,0x4(%esp) 80104ce8: 89 44 24 08 mov %eax,0x8(%esp) 80104cec: 89 34 24 mov %esi,(%esp) 80104cef: e8 0c cf ff ff call 80101c00 <dirlookup> 80104cf4: 85 c0 test %eax,%eax 80104cf6: 89 c3 mov %eax,%ebx 80104cf8: 0f 84 ec 00 00 00 je 80104dea <sys_unlink+0x18a> ilock(ip); 80104cfe: 89 04 24 mov %eax,(%esp) 80104d01: e8 ea c9 ff ff call 801016f0 <ilock> if(ip->nlink < 1) 80104d06: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx) 80104d0b: 0f 8e 24 01 00 00 jle 80104e35 <sys_unlink+0x1d5> if(ip->type == T_DIR && !isdirempty(ip)){ 80104d11: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104d16: 8d 75 d8 lea -0x28(%ebp),%esi 80104d19: 74 7d je 80104d98 <sys_unlink+0x138> memset(&de, 0, sizeof(de)); 80104d1b: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80104d22: 00 80104d23: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80104d2a: 00 80104d2b: 89 34 24 mov %esi,(%esp) 80104d2e: e8 bd f5 ff ff call 801042f0 <memset> if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80104d33: 8b 45 c4 mov -0x3c(%ebp),%eax 80104d36: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80104d3d: 00 80104d3e: 89 74 24 04 mov %esi,0x4(%esp) 80104d42: 89 44 24 08 mov %eax,0x8(%esp) 80104d46: 8b 45 b4 mov -0x4c(%ebp),%eax 80104d49: 89 04 24 mov %eax,(%esp) 80104d4c: e8 4f cd ff ff call 80101aa0 <writei> 80104d51: 83 f8 10 cmp $0x10,%eax 80104d54: 0f 85 cf 00 00 00 jne 80104e29 <sys_unlink+0x1c9> if(ip->type == T_DIR){ 80104d5a: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104d5f: 0f 84 a3 00 00 00 je 80104e08 <sys_unlink+0x1a8> iunlockput(dp); 80104d65: 8b 45 b4 mov -0x4c(%ebp),%eax 80104d68: 89 04 24 mov %eax,(%esp) 80104d6b: e8 e0 cb ff ff call 80101950 <iunlockput> ip->nlink--; 80104d70: 66 83 6b 56 01 subw $0x1,0x56(%ebx) iupdate(ip); 80104d75: 89 1c 24 mov %ebx,(%esp) 80104d78: e8 b3 c8 ff ff call 80101630 <iupdate> iunlockput(ip); 80104d7d: 89 1c 24 mov %ebx,(%esp) 80104d80: e8 cb cb ff ff call 80101950 <iunlockput> end_op(); 80104d85: e8 36 de ff ff call 80102bc0 <end_op> } 80104d8a: 83 c4 5c add $0x5c,%esp return 0; 80104d8d: 31 c0 xor %eax,%eax } 80104d8f: 5b pop %ebx 80104d90: 5e pop %esi 80104d91: 5f pop %edi 80104d92: 5d pop %ebp 80104d93: c3 ret 80104d94: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){ 80104d98: 83 7b 58 20 cmpl $0x20,0x58(%ebx) 80104d9c: 0f 86 79 ff ff ff jbe 80104d1b <sys_unlink+0xbb> 80104da2: bf 20 00 00 00 mov $0x20,%edi 80104da7: eb 15 jmp 80104dbe <sys_unlink+0x15e> 80104da9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104db0: 8d 57 10 lea 0x10(%edi),%edx 80104db3: 3b 53 58 cmp 0x58(%ebx),%edx 80104db6: 0f 83 5f ff ff ff jae 80104d1b <sys_unlink+0xbb> 80104dbc: 89 d7 mov %edx,%edi if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80104dbe: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80104dc5: 00 80104dc6: 89 7c 24 08 mov %edi,0x8(%esp) 80104dca: 89 74 24 04 mov %esi,0x4(%esp) 80104dce: 89 1c 24 mov %ebx,(%esp) 80104dd1: e8 ca cb ff ff call 801019a0 <readi> 80104dd6: 83 f8 10 cmp $0x10,%eax 80104dd9: 75 42 jne 80104e1d <sys_unlink+0x1bd> if(de.inum != 0) 80104ddb: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80104de0: 74 ce je 80104db0 <sys_unlink+0x150> iunlockput(ip); 80104de2: 89 1c 24 mov %ebx,(%esp) 80104de5: e8 66 cb ff ff call 80101950 <iunlockput> iunlockput(dp); 80104dea: 8b 45 b4 mov -0x4c(%ebp),%eax 80104ded: 89 04 24 mov %eax,(%esp) 80104df0: e8 5b cb ff ff call 80101950 <iunlockput> end_op(); 80104df5: e8 c6 dd ff ff call 80102bc0 <end_op> } 80104dfa: 83 c4 5c add $0x5c,%esp return -1; 80104dfd: b8 ff ff ff ff mov $0xffffffff,%eax } 80104e02: 5b pop %ebx 80104e03: 5e pop %esi 80104e04: 5f pop %edi 80104e05: 5d pop %ebp 80104e06: c3 ret 80104e07: 90 nop dp->nlink--; 80104e08: 8b 45 b4 mov -0x4c(%ebp),%eax 80104e0b: 66 83 68 56 01 subw $0x1,0x56(%eax) iupdate(dp); 80104e10: 89 04 24 mov %eax,(%esp) 80104e13: e8 18 c8 ff ff call 80101630 <iupdate> 80104e18: e9 48 ff ff ff jmp 80104d65 <sys_unlink+0x105> panic("isdirempty: readi"); 80104e1d: c7 04 24 80 76 10 80 movl $0x80107680,(%esp) 80104e24: e8 37 b5 ff ff call 80100360 <panic> panic("unlink: writei"); 80104e29: c7 04 24 92 76 10 80 movl $0x80107692,(%esp) 80104e30: e8 2b b5 ff ff call 80100360 <panic> panic("unlink: nlink < 1"); 80104e35: c7 04 24 6e 76 10 80 movl $0x8010766e,(%esp) 80104e3c: e8 1f b5 ff ff call 80100360 <panic> 80104e41: eb 0d jmp 80104e50 <sys_open> 80104e43: 90 nop 80104e44: 90 nop 80104e45: 90 nop 80104e46: 90 nop 80104e47: 90 nop 80104e48: 90 nop 80104e49: 90 nop 80104e4a: 90 nop 80104e4b: 90 nop 80104e4c: 90 nop 80104e4d: 90 nop 80104e4e: 90 nop 80104e4f: 90 nop 80104e50 <sys_open>: int sys_open(void) { 80104e50: 55 push %ebp 80104e51: 89 e5 mov %esp,%ebp 80104e53: 57 push %edi 80104e54: 56 push %esi 80104e55: 53 push %ebx 80104e56: 83 ec 2c sub $0x2c,%esp char *path; int fd, omode; struct file *f; struct inode *ip; if(argstr(0, &path) < 0 || argint(1, &omode) < 0) 80104e59: 8d 45 e0 lea -0x20(%ebp),%eax 80104e5c: 89 44 24 04 mov %eax,0x4(%esp) 80104e60: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104e67: e8 44 f8 ff ff call 801046b0 <argstr> 80104e6c: 85 c0 test %eax,%eax 80104e6e: 0f 88 d1 00 00 00 js 80104f45 <sys_open+0xf5> 80104e74: 8d 45 e4 lea -0x1c(%ebp),%eax 80104e77: 89 44 24 04 mov %eax,0x4(%esp) 80104e7b: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104e82: e8 a9 f7 ff ff call 80104630 <argint> 80104e87: 85 c0 test %eax,%eax 80104e89: 0f 88 b6 00 00 00 js 80104f45 <sys_open+0xf5> return -1; begin_op(); 80104e8f: e8 bc dc ff ff call 80102b50 <begin_op> if(omode & O_CREATE){ 80104e94: f6 45 e5 02 testb $0x2,-0x1b(%ebp) 80104e98: 0f 85 82 00 00 00 jne 80104f20 <sys_open+0xd0> if(ip == 0){ end_op(); return -1; } } else { if((ip = namei(path)) == 0){ 80104e9e: 8b 45 e0 mov -0x20(%ebp),%eax 80104ea1: 89 04 24 mov %eax,(%esp) 80104ea4: e8 97 d0 ff ff call 80101f40 <namei> 80104ea9: 85 c0 test %eax,%eax 80104eab: 89 c6 mov %eax,%esi 80104ead: 0f 84 8d 00 00 00 je 80104f40 <sys_open+0xf0> end_op(); return -1; } ilock(ip); 80104eb3: 89 04 24 mov %eax,(%esp) 80104eb6: e8 35 c8 ff ff call 801016f0 <ilock> if(ip->type == T_DIR && omode != O_RDONLY){ 80104ebb: 66 83 7e 50 01 cmpw $0x1,0x50(%esi) 80104ec0: 0f 84 92 00 00 00 je 80104f58 <sys_open+0x108> end_op(); return -1; } } if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){ 80104ec6: e8 d5 be ff ff call 80100da0 <filealloc> 80104ecb: 85 c0 test %eax,%eax 80104ecd: 89 c3 mov %eax,%ebx 80104ecf: 0f 84 93 00 00 00 je 80104f68 <sys_open+0x118> 80104ed5: e8 86 f8 ff ff call 80104760 <fdalloc> 80104eda: 85 c0 test %eax,%eax 80104edc: 89 c7 mov %eax,%edi 80104ede: 0f 88 94 00 00 00 js 80104f78 <sys_open+0x128> fileclose(f); iunlockput(ip); end_op(); return -1; } iunlock(ip); 80104ee4: 89 34 24 mov %esi,(%esp) 80104ee7: e8 e4 c8 ff ff call 801017d0 <iunlock> end_op(); 80104eec: e8 cf dc ff ff call 80102bc0 <end_op> f->type = FD_INODE; 80104ef1: c7 03 02 00 00 00 movl $0x2,(%ebx) f->ip = ip; f->off = 0; f->readable = !(omode & O_WRONLY); 80104ef7: 8b 45 e4 mov -0x1c(%ebp),%eax f->ip = ip; 80104efa: 89 73 10 mov %esi,0x10(%ebx) f->off = 0; 80104efd: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) f->readable = !(omode & O_WRONLY); 80104f04: 89 c2 mov %eax,%edx 80104f06: 83 e2 01 and $0x1,%edx 80104f09: 83 f2 01 xor $0x1,%edx f->writable = (omode & O_WRONLY) || (omode & O_RDWR); 80104f0c: a8 03 test $0x3,%al f->readable = !(omode & O_WRONLY); 80104f0e: 88 53 08 mov %dl,0x8(%ebx) return fd; 80104f11: 89 f8 mov %edi,%eax f->writable = (omode & O_WRONLY) || (omode & O_RDWR); 80104f13: 0f 95 43 09 setne 0x9(%ebx) } 80104f17: 83 c4 2c add $0x2c,%esp 80104f1a: 5b pop %ebx 80104f1b: 5e pop %esi 80104f1c: 5f pop %edi 80104f1d: 5d pop %ebp 80104f1e: c3 ret 80104f1f: 90 nop ip = create(path, T_FILE, 0, 0); 80104f20: 8b 45 e0 mov -0x20(%ebp),%eax 80104f23: 31 c9 xor %ecx,%ecx 80104f25: ba 02 00 00 00 mov $0x2,%edx 80104f2a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104f31: e8 6a f8 ff ff call 801047a0 <create> if(ip == 0){ 80104f36: 85 c0 test %eax,%eax ip = create(path, T_FILE, 0, 0); 80104f38: 89 c6 mov %eax,%esi if(ip == 0){ 80104f3a: 75 8a jne 80104ec6 <sys_open+0x76> 80104f3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi end_op(); 80104f40: e8 7b dc ff ff call 80102bc0 <end_op> } 80104f45: 83 c4 2c add $0x2c,%esp return -1; 80104f48: b8 ff ff ff ff mov $0xffffffff,%eax } 80104f4d: 5b pop %ebx 80104f4e: 5e pop %esi 80104f4f: 5f pop %edi 80104f50: 5d pop %ebp 80104f51: c3 ret 80104f52: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(ip->type == T_DIR && omode != O_RDONLY){ 80104f58: 8b 45 e4 mov -0x1c(%ebp),%eax 80104f5b: 85 c0 test %eax,%eax 80104f5d: 0f 84 63 ff ff ff je 80104ec6 <sys_open+0x76> 80104f63: 90 nop 80104f64: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi iunlockput(ip); 80104f68: 89 34 24 mov %esi,(%esp) 80104f6b: e8 e0 c9 ff ff call 80101950 <iunlockput> 80104f70: eb ce jmp 80104f40 <sys_open+0xf0> 80104f72: 8d b6 00 00 00 00 lea 0x0(%esi),%esi fileclose(f); 80104f78: 89 1c 24 mov %ebx,(%esp) 80104f7b: e8 e0 be ff ff call 80100e60 <fileclose> 80104f80: eb e6 jmp 80104f68 <sys_open+0x118> 80104f82: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104f89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104f90 <sys_mkdir>: int sys_mkdir(void) { 80104f90: 55 push %ebp 80104f91: 89 e5 mov %esp,%ebp 80104f93: 83 ec 28 sub $0x28,%esp char *path; struct inode *ip; begin_op(); 80104f96: e8 b5 db ff ff call 80102b50 <begin_op> if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){ 80104f9b: 8d 45 f4 lea -0xc(%ebp),%eax 80104f9e: 89 44 24 04 mov %eax,0x4(%esp) 80104fa2: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104fa9: e8 02 f7 ff ff call 801046b0 <argstr> 80104fae: 85 c0 test %eax,%eax 80104fb0: 78 2e js 80104fe0 <sys_mkdir+0x50> 80104fb2: 8b 45 f4 mov -0xc(%ebp),%eax 80104fb5: 31 c9 xor %ecx,%ecx 80104fb7: ba 01 00 00 00 mov $0x1,%edx 80104fbc: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104fc3: e8 d8 f7 ff ff call 801047a0 <create> 80104fc8: 85 c0 test %eax,%eax 80104fca: 74 14 je 80104fe0 <sys_mkdir+0x50> end_op(); return -1; } iunlockput(ip); 80104fcc: 89 04 24 mov %eax,(%esp) 80104fcf: e8 7c c9 ff ff call 80101950 <iunlockput> end_op(); 80104fd4: e8 e7 db ff ff call 80102bc0 <end_op> return 0; 80104fd9: 31 c0 xor %eax,%eax } 80104fdb: c9 leave 80104fdc: c3 ret 80104fdd: 8d 76 00 lea 0x0(%esi),%esi end_op(); 80104fe0: e8 db db ff ff call 80102bc0 <end_op> return -1; 80104fe5: b8 ff ff ff ff mov $0xffffffff,%eax } 80104fea: c9 leave 80104feb: c3 ret 80104fec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104ff0 <sys_mknod>: int sys_mknod(void) { 80104ff0: 55 push %ebp 80104ff1: 89 e5 mov %esp,%ebp 80104ff3: 83 ec 28 sub $0x28,%esp struct inode *ip; char *path; int major, minor; begin_op(); 80104ff6: e8 55 db ff ff call 80102b50 <begin_op> if((argstr(0, &path)) < 0 || 80104ffb: 8d 45 ec lea -0x14(%ebp),%eax 80104ffe: 89 44 24 04 mov %eax,0x4(%esp) 80105002: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105009: e8 a2 f6 ff ff call 801046b0 <argstr> 8010500e: 85 c0 test %eax,%eax 80105010: 78 5e js 80105070 <sys_mknod+0x80> argint(1, &major) < 0 || 80105012: 8d 45 f0 lea -0x10(%ebp),%eax 80105015: 89 44 24 04 mov %eax,0x4(%esp) 80105019: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80105020: e8 0b f6 ff ff call 80104630 <argint> if((argstr(0, &path)) < 0 || 80105025: 85 c0 test %eax,%eax 80105027: 78 47 js 80105070 <sys_mknod+0x80> argint(2, &minor) < 0 || 80105029: 8d 45 f4 lea -0xc(%ebp),%eax 8010502c: 89 44 24 04 mov %eax,0x4(%esp) 80105030: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80105037: e8 f4 f5 ff ff call 80104630 <argint> argint(1, &major) < 0 || 8010503c: 85 c0 test %eax,%eax 8010503e: 78 30 js 80105070 <sys_mknod+0x80> (ip = create(path, T_DEV, major, minor)) == 0){ 80105040: 0f bf 45 f4 movswl -0xc(%ebp),%eax argint(2, &minor) < 0 || 80105044: ba 03 00 00 00 mov $0x3,%edx (ip = create(path, T_DEV, major, minor)) == 0){ 80105049: 0f bf 4d f0 movswl -0x10(%ebp),%ecx 8010504d: 89 04 24 mov %eax,(%esp) argint(2, &minor) < 0 || 80105050: 8b 45 ec mov -0x14(%ebp),%eax 80105053: e8 48 f7 ff ff call 801047a0 <create> 80105058: 85 c0 test %eax,%eax 8010505a: 74 14 je 80105070 <sys_mknod+0x80> end_op(); return -1; } iunlockput(ip); 8010505c: 89 04 24 mov %eax,(%esp) 8010505f: e8 ec c8 ff ff call 80101950 <iunlockput> end_op(); 80105064: e8 57 db ff ff call 80102bc0 <end_op> return 0; 80105069: 31 c0 xor %eax,%eax } 8010506b: c9 leave 8010506c: c3 ret 8010506d: 8d 76 00 lea 0x0(%esi),%esi end_op(); 80105070: e8 4b db ff ff call 80102bc0 <end_op> return -1; 80105075: b8 ff ff ff ff mov $0xffffffff,%eax } 8010507a: c9 leave 8010507b: c3 ret 8010507c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80105080 <sys_chdir>: int sys_chdir(void) { 80105080: 55 push %ebp 80105081: 89 e5 mov %esp,%ebp 80105083: 56 push %esi 80105084: 53 push %ebx 80105085: 83 ec 20 sub $0x20,%esp char *path; struct inode *ip; struct proc *curproc = myproc(); 80105088: e8 53 e6 ff ff call 801036e0 <myproc> 8010508d: 89 c6 mov %eax,%esi begin_op(); 8010508f: e8 bc da ff ff call 80102b50 <begin_op> if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){ 80105094: 8d 45 f4 lea -0xc(%ebp),%eax 80105097: 89 44 24 04 mov %eax,0x4(%esp) 8010509b: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801050a2: e8 09 f6 ff ff call 801046b0 <argstr> 801050a7: 85 c0 test %eax,%eax 801050a9: 78 4a js 801050f5 <sys_chdir+0x75> 801050ab: 8b 45 f4 mov -0xc(%ebp),%eax 801050ae: 89 04 24 mov %eax,(%esp) 801050b1: e8 8a ce ff ff call 80101f40 <namei> 801050b6: 85 c0 test %eax,%eax 801050b8: 89 c3 mov %eax,%ebx 801050ba: 74 39 je 801050f5 <sys_chdir+0x75> end_op(); return -1; } ilock(ip); 801050bc: 89 04 24 mov %eax,(%esp) 801050bf: e8 2c c6 ff ff call 801016f0 <ilock> if(ip->type != T_DIR){ 801050c4: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) iunlockput(ip); 801050c9: 89 1c 24 mov %ebx,(%esp) if(ip->type != T_DIR){ 801050cc: 75 22 jne 801050f0 <sys_chdir+0x70> end_op(); return -1; } iunlock(ip); 801050ce: e8 fd c6 ff ff call 801017d0 <iunlock> iput(curproc->cwd); 801050d3: 8b 46 68 mov 0x68(%esi),%eax 801050d6: 89 04 24 mov %eax,(%esp) 801050d9: e8 32 c7 ff ff call 80101810 <iput> end_op(); 801050de: e8 dd da ff ff call 80102bc0 <end_op> curproc->cwd = ip; return 0; 801050e3: 31 c0 xor %eax,%eax curproc->cwd = ip; 801050e5: 89 5e 68 mov %ebx,0x68(%esi) } 801050e8: 83 c4 20 add $0x20,%esp 801050eb: 5b pop %ebx 801050ec: 5e pop %esi 801050ed: 5d pop %ebp 801050ee: c3 ret 801050ef: 90 nop iunlockput(ip); 801050f0: e8 5b c8 ff ff call 80101950 <iunlockput> end_op(); 801050f5: e8 c6 da ff ff call 80102bc0 <end_op> } 801050fa: 83 c4 20 add $0x20,%esp return -1; 801050fd: b8 ff ff ff ff mov $0xffffffff,%eax } 80105102: 5b pop %ebx 80105103: 5e pop %esi 80105104: 5d pop %ebp 80105105: c3 ret 80105106: 8d 76 00 lea 0x0(%esi),%esi 80105109: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105110 <sys_exec>: int sys_exec(void) { 80105110: 55 push %ebp 80105111: 89 e5 mov %esp,%ebp 80105113: 57 push %edi 80105114: 56 push %esi 80105115: 53 push %ebx 80105116: 81 ec ac 00 00 00 sub $0xac,%esp char *path, *argv[MAXARG]; int i; uint uargv, uarg; if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0){ 8010511c: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax 80105122: 89 44 24 04 mov %eax,0x4(%esp) 80105126: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010512d: e8 7e f5 ff ff call 801046b0 <argstr> 80105132: 85 c0 test %eax,%eax 80105134: 0f 88 84 00 00 00 js 801051be <sys_exec+0xae> 8010513a: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax 80105140: 89 44 24 04 mov %eax,0x4(%esp) 80105144: c7 04 24 01 00 00 00 movl $0x1,(%esp) 8010514b: e8 e0 f4 ff ff call 80104630 <argint> 80105150: 85 c0 test %eax,%eax 80105152: 78 6a js 801051be <sys_exec+0xae> return -1; } memset(argv, 0, sizeof(argv)); 80105154: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax for(i=0;; i++){ 8010515a: 31 db xor %ebx,%ebx memset(argv, 0, sizeof(argv)); 8010515c: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp) 80105163: 00 80105164: 8d b5 68 ff ff ff lea -0x98(%ebp),%esi 8010516a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80105171: 00 80105172: 8d bd 64 ff ff ff lea -0x9c(%ebp),%edi 80105178: 89 04 24 mov %eax,(%esp) 8010517b: e8 70 f1 ff ff call 801042f0 <memset> if(i >= NELEM(argv)) return -1; if(fetchint(uargv+4*i, (int*)&uarg) < 0) 80105180: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax 80105186: 89 7c 24 04 mov %edi,0x4(%esp) 8010518a: 8d 04 98 lea (%eax,%ebx,4),%eax 8010518d: 89 04 24 mov %eax,(%esp) 80105190: e8 ab f3 ff ff call 80104540 <fetchint> 80105195: 85 c0 test %eax,%eax 80105197: 78 25 js 801051be <sys_exec+0xae> return -1; if(uarg == 0){ 80105199: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax 8010519f: 85 c0 test %eax,%eax 801051a1: 74 2d je 801051d0 <sys_exec+0xc0> argv[i] = 0; break; } if(fetchstr(uarg, &argv[i]) < 0) 801051a3: 89 74 24 04 mov %esi,0x4(%esp) 801051a7: 89 04 24 mov %eax,(%esp) 801051aa: e8 e1 f3 ff ff call 80104590 <fetchstr> 801051af: 85 c0 test %eax,%eax 801051b1: 78 0b js 801051be <sys_exec+0xae> for(i=0;; i++){ 801051b3: 83 c3 01 add $0x1,%ebx 801051b6: 83 c6 04 add $0x4,%esi if(i >= NELEM(argv)) 801051b9: 83 fb 20 cmp $0x20,%ebx 801051bc: 75 c2 jne 80105180 <sys_exec+0x70> return -1; } return exec(path, argv); } 801051be: 81 c4 ac 00 00 00 add $0xac,%esp return -1; 801051c4: b8 ff ff ff ff mov $0xffffffff,%eax } 801051c9: 5b pop %ebx 801051ca: 5e pop %esi 801051cb: 5f pop %edi 801051cc: 5d pop %ebp 801051cd: c3 ret 801051ce: 66 90 xchg %ax,%ax return exec(path, argv); 801051d0: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax 801051d6: 89 44 24 04 mov %eax,0x4(%esp) 801051da: 8b 85 5c ff ff ff mov -0xa4(%ebp),%eax argv[i] = 0; 801051e0: c7 84 9d 68 ff ff ff movl $0x0,-0x98(%ebp,%ebx,4) 801051e7: 00 00 00 00 return exec(path, argv); 801051eb: 89 04 24 mov %eax,(%esp) 801051ee: e8 ad b7 ff ff call 801009a0 <exec> } 801051f3: 81 c4 ac 00 00 00 add $0xac,%esp 801051f9: 5b pop %ebx 801051fa: 5e pop %esi 801051fb: 5f pop %edi 801051fc: 5d pop %ebp 801051fd: c3 ret 801051fe: 66 90 xchg %ax,%ax 80105200 <sys_pipe>: int sys_pipe(void) { 80105200: 55 push %ebp 80105201: 89 e5 mov %esp,%ebp 80105203: 53 push %ebx 80105204: 83 ec 24 sub $0x24,%esp int *fd; struct file *rf, *wf; int fd0, fd1; if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0) 80105207: 8d 45 ec lea -0x14(%ebp),%eax 8010520a: c7 44 24 08 08 00 00 movl $0x8,0x8(%esp) 80105211: 00 80105212: 89 44 24 04 mov %eax,0x4(%esp) 80105216: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010521d: e8 3e f4 ff ff call 80104660 <argptr> 80105222: 85 c0 test %eax,%eax 80105224: 78 6d js 80105293 <sys_pipe+0x93> return -1; if(pipealloc(&rf, &wf) < 0) 80105226: 8d 45 f4 lea -0xc(%ebp),%eax 80105229: 89 44 24 04 mov %eax,0x4(%esp) 8010522d: 8d 45 f0 lea -0x10(%ebp),%eax 80105230: 89 04 24 mov %eax,(%esp) 80105233: e8 78 df ff ff call 801031b0 <pipealloc> 80105238: 85 c0 test %eax,%eax 8010523a: 78 57 js 80105293 <sys_pipe+0x93> return -1; fd0 = -1; if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){ 8010523c: 8b 45 f0 mov -0x10(%ebp),%eax 8010523f: e8 1c f5 ff ff call 80104760 <fdalloc> 80105244: 85 c0 test %eax,%eax 80105246: 89 c3 mov %eax,%ebx 80105248: 78 33 js 8010527d <sys_pipe+0x7d> 8010524a: 8b 45 f4 mov -0xc(%ebp),%eax 8010524d: e8 0e f5 ff ff call 80104760 <fdalloc> 80105252: 85 c0 test %eax,%eax 80105254: 78 1a js 80105270 <sys_pipe+0x70> myproc()->ofile[fd0] = 0; fileclose(rf); fileclose(wf); return -1; } fd[0] = fd0; 80105256: 8b 55 ec mov -0x14(%ebp),%edx 80105259: 89 1a mov %ebx,(%edx) fd[1] = fd1; 8010525b: 8b 55 ec mov -0x14(%ebp),%edx 8010525e: 89 42 04 mov %eax,0x4(%edx) return 0; } 80105261: 83 c4 24 add $0x24,%esp return 0; 80105264: 31 c0 xor %eax,%eax } 80105266: 5b pop %ebx 80105267: 5d pop %ebp 80105268: c3 ret 80105269: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi myproc()->ofile[fd0] = 0; 80105270: e8 6b e4 ff ff call 801036e0 <myproc> 80105275: c7 44 98 28 00 00 00 movl $0x0,0x28(%eax,%ebx,4) 8010527c: 00 fileclose(rf); 8010527d: 8b 45 f0 mov -0x10(%ebp),%eax 80105280: 89 04 24 mov %eax,(%esp) 80105283: e8 d8 bb ff ff call 80100e60 <fileclose> fileclose(wf); 80105288: 8b 45 f4 mov -0xc(%ebp),%eax 8010528b: 89 04 24 mov %eax,(%esp) 8010528e: e8 cd bb ff ff call 80100e60 <fileclose> } 80105293: 83 c4 24 add $0x24,%esp return -1; 80105296: b8 ff ff ff ff mov $0xffffffff,%eax } 8010529b: 5b pop %ebx 8010529c: 5d pop %ebp 8010529d: c3 ret 8010529e: 66 90 xchg %ax,%ax 801052a0 <sys_shm_open>: #include "param.h" #include "memlayout.h" #include "mmu.h" #include "proc.h" int sys_shm_open(void) { 801052a0: 55 push %ebp 801052a1: 89 e5 mov %esp,%ebp 801052a3: 83 ec 28 sub $0x28,%esp int id; char **pointer; if(argint(0, &id) < 0) 801052a6: 8d 45 f0 lea -0x10(%ebp),%eax 801052a9: 89 44 24 04 mov %eax,0x4(%esp) 801052ad: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801052b4: e8 77 f3 ff ff call 80104630 <argint> 801052b9: 85 c0 test %eax,%eax 801052bb: 78 33 js 801052f0 <sys_shm_open+0x50> return -1; if(argptr(1, (char **) (&pointer),4)<0) 801052bd: 8d 45 f4 lea -0xc(%ebp),%eax 801052c0: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 801052c7: 00 801052c8: 89 44 24 04 mov %eax,0x4(%esp) 801052cc: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801052d3: e8 88 f3 ff ff call 80104660 <argptr> 801052d8: 85 c0 test %eax,%eax 801052da: 78 14 js 801052f0 <sys_shm_open+0x50> return -1; return shm_open(id, pointer); 801052dc: 8b 45 f4 mov -0xc(%ebp),%eax 801052df: 89 44 24 04 mov %eax,0x4(%esp) 801052e3: 8b 45 f0 mov -0x10(%ebp),%eax 801052e6: 89 04 24 mov %eax,(%esp) 801052e9: e8 72 1b 00 00 call 80106e60 <shm_open> } 801052ee: c9 leave 801052ef: c3 ret return -1; 801052f0: b8 ff ff ff ff mov $0xffffffff,%eax } 801052f5: c9 leave 801052f6: c3 ret 801052f7: 89 f6 mov %esi,%esi 801052f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105300 <sys_shm_close>: int sys_shm_close(void) { 80105300: 55 push %ebp 80105301: 89 e5 mov %esp,%ebp 80105303: 83 ec 28 sub $0x28,%esp int id; if(argint(0, &id) < 0) 80105306: 8d 45 f4 lea -0xc(%ebp),%eax 80105309: 89 44 24 04 mov %eax,0x4(%esp) 8010530d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105314: e8 17 f3 ff ff call 80104630 <argint> 80105319: 85 c0 test %eax,%eax 8010531b: 78 13 js 80105330 <sys_shm_close+0x30> return -1; return shm_close(id); 8010531d: 8b 45 f4 mov -0xc(%ebp),%eax 80105320: 89 04 24 mov %eax,(%esp) 80105323: e8 48 1b 00 00 call 80106e70 <shm_close> } 80105328: c9 leave 80105329: c3 ret 8010532a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 80105330: b8 ff ff ff ff mov $0xffffffff,%eax } 80105335: c9 leave 80105336: c3 ret 80105337: 89 f6 mov %esi,%esi 80105339: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105340 <sys_fork>: int sys_fork(void) { 80105340: 55 push %ebp 80105341: 89 e5 mov %esp,%ebp return fork(); } 80105343: 5d pop %ebp return fork(); 80105344: e9 47 e5 ff ff jmp 80103890 <fork> 80105349: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80105350 <sys_exit>: int sys_exit(void) { 80105350: 55 push %ebp 80105351: 89 e5 mov %esp,%ebp 80105353: 83 ec 08 sub $0x8,%esp exit(); 80105356: e8 85 e7 ff ff call 80103ae0 <exit> return 0; // not reached } 8010535b: 31 c0 xor %eax,%eax 8010535d: c9 leave 8010535e: c3 ret 8010535f: 90 nop 80105360 <sys_wait>: int sys_wait(void) { 80105360: 55 push %ebp 80105361: 89 e5 mov %esp,%ebp return wait(); } 80105363: 5d pop %ebp return wait(); 80105364: e9 97 e9 ff ff jmp 80103d00 <wait> 80105369: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80105370 <sys_kill>: int sys_kill(void) { 80105370: 55 push %ebp 80105371: 89 e5 mov %esp,%ebp 80105373: 83 ec 28 sub $0x28,%esp int pid; if(argint(0, &pid) < 0) 80105376: 8d 45 f4 lea -0xc(%ebp),%eax 80105379: 89 44 24 04 mov %eax,0x4(%esp) 8010537d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105384: e8 a7 f2 ff ff call 80104630 <argint> 80105389: 85 c0 test %eax,%eax 8010538b: 78 13 js 801053a0 <sys_kill+0x30> return -1; return kill(pid); 8010538d: 8b 45 f4 mov -0xc(%ebp),%eax 80105390: 89 04 24 mov %eax,(%esp) 80105393: e8 c8 ea ff ff call 80103e60 <kill> } 80105398: c9 leave 80105399: c3 ret 8010539a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 801053a0: b8 ff ff ff ff mov $0xffffffff,%eax } 801053a5: c9 leave 801053a6: c3 ret 801053a7: 89 f6 mov %esi,%esi 801053a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801053b0 <sys_getpid>: int sys_getpid(void) { 801053b0: 55 push %ebp 801053b1: 89 e5 mov %esp,%ebp 801053b3: 83 ec 08 sub $0x8,%esp return myproc()->pid; 801053b6: e8 25 e3 ff ff call 801036e0 <myproc> 801053bb: 8b 40 10 mov 0x10(%eax),%eax } 801053be: c9 leave 801053bf: c3 ret 801053c0 <sys_sbrk>: int sys_sbrk(void) { 801053c0: 55 push %ebp 801053c1: 89 e5 mov %esp,%ebp 801053c3: 53 push %ebx 801053c4: 83 ec 24 sub $0x24,%esp int addr; int n; if(argint(0, &n) < 0) 801053c7: 8d 45 f4 lea -0xc(%ebp),%eax 801053ca: 89 44 24 04 mov %eax,0x4(%esp) 801053ce: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801053d5: e8 56 f2 ff ff call 80104630 <argint> 801053da: 85 c0 test %eax,%eax 801053dc: 78 22 js 80105400 <sys_sbrk+0x40> return -1; addr = myproc()->sz; 801053de: e8 fd e2 ff ff call 801036e0 <myproc> if(growproc(n) < 0) 801053e3: 8b 55 f4 mov -0xc(%ebp),%edx addr = myproc()->sz; 801053e6: 8b 18 mov (%eax),%ebx if(growproc(n) < 0) 801053e8: 89 14 24 mov %edx,(%esp) 801053eb: e8 30 e4 ff ff call 80103820 <growproc> 801053f0: 85 c0 test %eax,%eax 801053f2: 78 0c js 80105400 <sys_sbrk+0x40> return -1; return addr; 801053f4: 89 d8 mov %ebx,%eax } 801053f6: 83 c4 24 add $0x24,%esp 801053f9: 5b pop %ebx 801053fa: 5d pop %ebp 801053fb: c3 ret 801053fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80105400: b8 ff ff ff ff mov $0xffffffff,%eax 80105405: eb ef jmp 801053f6 <sys_sbrk+0x36> 80105407: 89 f6 mov %esi,%esi 80105409: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105410 <sys_sleep>: int sys_sleep(void) { 80105410: 55 push %ebp 80105411: 89 e5 mov %esp,%ebp 80105413: 53 push %ebx 80105414: 83 ec 24 sub $0x24,%esp int n; uint ticks0; if(argint(0, &n) < 0) 80105417: 8d 45 f4 lea -0xc(%ebp),%eax 8010541a: 89 44 24 04 mov %eax,0x4(%esp) 8010541e: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105425: e8 06 f2 ff ff call 80104630 <argint> 8010542a: 85 c0 test %eax,%eax 8010542c: 78 7e js 801054ac <sys_sleep+0x9c> return -1; acquire(&tickslock); 8010542e: c7 04 24 60 4e 11 80 movl $0x80114e60,(%esp) 80105435: e8 76 ed ff ff call 801041b0 <acquire> ticks0 = ticks; while(ticks - ticks0 < n){ 8010543a: 8b 55 f4 mov -0xc(%ebp),%edx ticks0 = ticks; 8010543d: 8b 1d a0 56 11 80 mov 0x801156a0,%ebx while(ticks - ticks0 < n){ 80105443: 85 d2 test %edx,%edx 80105445: 75 29 jne 80105470 <sys_sleep+0x60> 80105447: eb 4f jmp 80105498 <sys_sleep+0x88> 80105449: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(myproc()->killed){ release(&tickslock); return -1; } sleep(&ticks, &tickslock); 80105450: c7 44 24 04 60 4e 11 movl $0x80114e60,0x4(%esp) 80105457: 80 80105458: c7 04 24 a0 56 11 80 movl $0x801156a0,(%esp) 8010545f: e8 ec e7 ff ff call 80103c50 <sleep> while(ticks - ticks0 < n){ 80105464: a1 a0 56 11 80 mov 0x801156a0,%eax 80105469: 29 d8 sub %ebx,%eax 8010546b: 3b 45 f4 cmp -0xc(%ebp),%eax 8010546e: 73 28 jae 80105498 <sys_sleep+0x88> if(myproc()->killed){ 80105470: e8 6b e2 ff ff call 801036e0 <myproc> 80105475: 8b 40 24 mov 0x24(%eax),%eax 80105478: 85 c0 test %eax,%eax 8010547a: 74 d4 je 80105450 <sys_sleep+0x40> release(&tickslock); 8010547c: c7 04 24 60 4e 11 80 movl $0x80114e60,(%esp) 80105483: e8 18 ee ff ff call 801042a0 <release> return -1; 80105488: b8 ff ff ff ff mov $0xffffffff,%eax } release(&tickslock); return 0; } 8010548d: 83 c4 24 add $0x24,%esp 80105490: 5b pop %ebx 80105491: 5d pop %ebp 80105492: c3 ret 80105493: 90 nop 80105494: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi release(&tickslock); 80105498: c7 04 24 60 4e 11 80 movl $0x80114e60,(%esp) 8010549f: e8 fc ed ff ff call 801042a0 <release> } 801054a4: 83 c4 24 add $0x24,%esp return 0; 801054a7: 31 c0 xor %eax,%eax } 801054a9: 5b pop %ebx 801054aa: 5d pop %ebp 801054ab: c3 ret return -1; 801054ac: b8 ff ff ff ff mov $0xffffffff,%eax 801054b1: eb da jmp 8010548d <sys_sleep+0x7d> 801054b3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801054b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801054c0 <sys_uptime>: // return how many clock tick interrupts have occurred // since start. int sys_uptime(void) { 801054c0: 55 push %ebp 801054c1: 89 e5 mov %esp,%ebp 801054c3: 53 push %ebx 801054c4: 83 ec 14 sub $0x14,%esp uint xticks; acquire(&tickslock); 801054c7: c7 04 24 60 4e 11 80 movl $0x80114e60,(%esp) 801054ce: e8 dd ec ff ff call 801041b0 <acquire> xticks = ticks; 801054d3: 8b 1d a0 56 11 80 mov 0x801156a0,%ebx release(&tickslock); 801054d9: c7 04 24 60 4e 11 80 movl $0x80114e60,(%esp) 801054e0: e8 bb ed ff ff call 801042a0 <release> return xticks; } 801054e5: 83 c4 14 add $0x14,%esp 801054e8: 89 d8 mov %ebx,%eax 801054ea: 5b pop %ebx 801054eb: 5d pop %ebp 801054ec: c3 ret 801054ed <alltraps>: # vectors.S sends all traps here. .globl alltraps alltraps: # Build trap frame. pushl %ds 801054ed: 1e push %ds pushl %es 801054ee: 06 push %es pushl %fs 801054ef: 0f a0 push %fs pushl %gs 801054f1: 0f a8 push %gs pushal 801054f3: 60 pusha # Set up data segments. movw $(SEG_KDATA<<3), %ax 801054f4: 66 b8 10 00 mov $0x10,%ax movw %ax, %ds 801054f8: 8e d8 mov %eax,%ds movw %ax, %es 801054fa: 8e c0 mov %eax,%es # Call trap(tf), where tf=%esp pushl %esp 801054fc: 54 push %esp call trap 801054fd: e8 de 00 00 00 call 801055e0 <trap> addl $4, %esp 80105502: 83 c4 04 add $0x4,%esp 80105505 <trapret>: # Return falls through to trapret... .globl trapret trapret: popal 80105505: 61 popa popl %gs 80105506: 0f a9 pop %gs popl %fs 80105508: 0f a1 pop %fs popl %es 8010550a: 07 pop %es popl %ds 8010550b: 1f pop %ds addl $0x8, %esp # trapno and errcode 8010550c: 83 c4 08 add $0x8,%esp iret 8010550f: cf iret 80105510 <tvinit>: void tvinit(void) { int i; for(i = 0; i < 256; i++) 80105510: 31 c0 xor %eax,%eax 80105512: 8d b6 00 00 00 00 lea 0x0(%esi),%esi SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0); 80105518: 8b 14 85 08 a0 10 80 mov -0x7fef5ff8(,%eax,4),%edx 8010551f: b9 08 00 00 00 mov $0x8,%ecx 80105524: 66 89 0c c5 a2 4e 11 mov %cx,-0x7feeb15e(,%eax,8) 8010552b: 80 8010552c: c6 04 c5 a4 4e 11 80 movb $0x0,-0x7feeb15c(,%eax,8) 80105533: 00 80105534: c6 04 c5 a5 4e 11 80 movb $0x8e,-0x7feeb15b(,%eax,8) 8010553b: 8e 8010553c: 66 89 14 c5 a0 4e 11 mov %dx,-0x7feeb160(,%eax,8) 80105543: 80 80105544: c1 ea 10 shr $0x10,%edx 80105547: 66 89 14 c5 a6 4e 11 mov %dx,-0x7feeb15a(,%eax,8) 8010554e: 80 for(i = 0; i < 256; i++) 8010554f: 83 c0 01 add $0x1,%eax 80105552: 3d 00 01 00 00 cmp $0x100,%eax 80105557: 75 bf jne 80105518 <tvinit+0x8> { 80105559: 55 push %ebp SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 8010555a: ba 08 00 00 00 mov $0x8,%edx { 8010555f: 89 e5 mov %esp,%ebp 80105561: 83 ec 18 sub $0x18,%esp SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 80105564: a1 08 a1 10 80 mov 0x8010a108,%eax initlock(&tickslock, "time"); 80105569: c7 44 24 04 a1 76 10 movl $0x801076a1,0x4(%esp) 80105570: 80 80105571: c7 04 24 60 4e 11 80 movl $0x80114e60,(%esp) SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 80105578: 66 89 15 a2 50 11 80 mov %dx,0x801150a2 8010557f: 66 a3 a0 50 11 80 mov %ax,0x801150a0 80105585: c1 e8 10 shr $0x10,%eax 80105588: c6 05 a4 50 11 80 00 movb $0x0,0x801150a4 8010558f: c6 05 a5 50 11 80 ef movb $0xef,0x801150a5 80105596: 66 a3 a6 50 11 80 mov %ax,0x801150a6 initlock(&tickslock, "time"); 8010559c: e8 1f eb ff ff call 801040c0 <initlock> } 801055a1: c9 leave 801055a2: c3 ret 801055a3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801055a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801055b0 <idtinit>: void idtinit(void) { 801055b0: 55 push %ebp pd[0] = size-1; 801055b1: b8 ff 07 00 00 mov $0x7ff,%eax 801055b6: 89 e5 mov %esp,%ebp 801055b8: 83 ec 10 sub $0x10,%esp 801055bb: 66 89 45 fa mov %ax,-0x6(%ebp) pd[1] = (uint)p; 801055bf: b8 a0 4e 11 80 mov $0x80114ea0,%eax 801055c4: 66 89 45 fc mov %ax,-0x4(%ebp) pd[2] = (uint)p >> 16; 801055c8: c1 e8 10 shr $0x10,%eax 801055cb: 66 89 45 fe mov %ax,-0x2(%ebp) asm volatile("lidt (%0)" : : "r" (pd)); 801055cf: 8d 45 fa lea -0x6(%ebp),%eax 801055d2: 0f 01 18 lidtl (%eax) lidt(idt, sizeof(idt)); } 801055d5: c9 leave 801055d6: c3 ret 801055d7: 89 f6 mov %esi,%esi 801055d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801055e0 <trap>: //PAGEBREAK: 41 void trap(struct trapframe *tf) { 801055e0: 55 push %ebp 801055e1: 89 e5 mov %esp,%ebp 801055e3: 57 push %edi 801055e4: 56 push %esi 801055e5: 53 push %ebx 801055e6: 83 ec 3c sub $0x3c,%esp 801055e9: 8b 5d 08 mov 0x8(%ebp),%ebx if(tf->trapno == T_SYSCALL){ 801055ec: 8b 43 30 mov 0x30(%ebx),%eax 801055ef: 83 f8 40 cmp $0x40,%eax 801055f2: 0f 84 a0 01 00 00 je 80105798 <trap+0x1b8> if(myproc()->killed) exit(); return; } switch(tf->trapno){ 801055f8: 83 e8 20 sub $0x20,%eax 801055fb: 83 f8 1f cmp $0x1f,%eax 801055fe: 77 08 ja 80105608 <trap+0x28> 80105600: ff 24 85 48 77 10 80 jmp *-0x7fef88b8(,%eax,4) 80105607: 90 nop lapiceoi(); break; //PAGEBREAK: 13 default: if(myproc() == 0 || (tf->cs&3) == 0){ 80105608: e8 d3 e0 ff ff call 801036e0 <myproc> 8010560d: 85 c0 test %eax,%eax 8010560f: 90 nop 80105610: 0f 84 fa 01 00 00 je 80105810 <trap+0x230> 80105616: f6 43 3c 03 testb $0x3,0x3c(%ebx) 8010561a: 0f 84 f0 01 00 00 je 80105810 <trap+0x230> static inline uint rcr2(void) { uint val; asm volatile("movl %%cr2,%0" : "=r" (val)); 80105620: 0f 20 d1 mov %cr2,%ecx cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", tf->trapno, cpuid(), tf->eip, rcr2()); panic("trap"); } // In user space, assume process misbehaved. cprintf("pid %d %s: trap %d err %d on cpu %d " 80105623: 8b 53 38 mov 0x38(%ebx),%edx 80105626: 89 4d d8 mov %ecx,-0x28(%ebp) 80105629: 89 55 dc mov %edx,-0x24(%ebp) 8010562c: e8 8f e0 ff ff call 801036c0 <cpuid> 80105631: 8b 73 30 mov 0x30(%ebx),%esi 80105634: 89 c7 mov %eax,%edi 80105636: 8b 43 34 mov 0x34(%ebx),%eax 80105639: 89 45 e4 mov %eax,-0x1c(%ebp) "eip 0x%x addr 0x%x--kill proc\n", myproc()->pid, myproc()->name, tf->trapno, 8010563c: e8 9f e0 ff ff call 801036e0 <myproc> 80105641: 89 45 e0 mov %eax,-0x20(%ebp) 80105644: e8 97 e0 ff ff call 801036e0 <myproc> cprintf("pid %d %s: trap %d err %d on cpu %d " 80105649: 8b 55 dc mov -0x24(%ebp),%edx 8010564c: 89 74 24 0c mov %esi,0xc(%esp) myproc()->pid, myproc()->name, tf->trapno, 80105650: 8b 75 e0 mov -0x20(%ebp),%esi cprintf("pid %d %s: trap %d err %d on cpu %d " 80105653: 8b 4d d8 mov -0x28(%ebp),%ecx 80105656: 89 7c 24 14 mov %edi,0x14(%esp) 8010565a: 89 54 24 18 mov %edx,0x18(%esp) 8010565e: 8b 55 e4 mov -0x1c(%ebp),%edx myproc()->pid, myproc()->name, tf->trapno, 80105661: 83 c6 6c add $0x6c,%esi cprintf("pid %d %s: trap %d err %d on cpu %d " 80105664: 89 4c 24 1c mov %ecx,0x1c(%esp) myproc()->pid, myproc()->name, tf->trapno, 80105668: 89 74 24 08 mov %esi,0x8(%esp) cprintf("pid %d %s: trap %d err %d on cpu %d " 8010566c: 89 54 24 10 mov %edx,0x10(%esp) 80105670: 8b 40 10 mov 0x10(%eax),%eax 80105673: c7 04 24 04 77 10 80 movl $0x80107704,(%esp) 8010567a: 89 44 24 04 mov %eax,0x4(%esp) 8010567e: e8 cd af ff ff call 80100650 <cprintf> tf->err, cpuid(), tf->eip, rcr2()); myproc()->killed = 1; 80105683: e8 58 e0 ff ff call 801036e0 <myproc> 80105688: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) 8010568f: 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(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER) 80105690: e8 4b e0 ff ff call 801036e0 <myproc> 80105695: 85 c0 test %eax,%eax 80105697: 74 0c je 801056a5 <trap+0xc5> 80105699: e8 42 e0 ff ff call 801036e0 <myproc> 8010569e: 8b 50 24 mov 0x24(%eax),%edx 801056a1: 85 d2 test %edx,%edx 801056a3: 75 4b jne 801056f0 <trap+0x110> exit(); // Force process to give up CPU on clock tick. // If interrupts were on while locks held, would need to check nlock. if(myproc() && myproc()->state == RUNNING && 801056a5: e8 36 e0 ff ff call 801036e0 <myproc> 801056aa: 85 c0 test %eax,%eax 801056ac: 74 0d je 801056bb <trap+0xdb> 801056ae: 66 90 xchg %ax,%ax 801056b0: e8 2b e0 ff ff call 801036e0 <myproc> 801056b5: 83 78 0c 04 cmpl $0x4,0xc(%eax) 801056b9: 74 4d je 80105708 <trap+0x128> tf->trapno == T_IRQ0+IRQ_TIMER) yield(); // Check if the process has been killed since we yielded if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER) 801056bb: e8 20 e0 ff ff call 801036e0 <myproc> 801056c0: 85 c0 test %eax,%eax 801056c2: 74 1d je 801056e1 <trap+0x101> 801056c4: e8 17 e0 ff ff call 801036e0 <myproc> 801056c9: 8b 40 24 mov 0x24(%eax),%eax 801056cc: 85 c0 test %eax,%eax 801056ce: 74 11 je 801056e1 <trap+0x101> 801056d0: 0f b7 43 3c movzwl 0x3c(%ebx),%eax 801056d4: 83 e0 03 and $0x3,%eax 801056d7: 66 83 f8 03 cmp $0x3,%ax 801056db: 0f 84 e8 00 00 00 je 801057c9 <trap+0x1e9> exit(); } 801056e1: 83 c4 3c add $0x3c,%esp 801056e4: 5b pop %ebx 801056e5: 5e pop %esi 801056e6: 5f pop %edi 801056e7: 5d pop %ebp 801056e8: c3 ret 801056e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER) 801056f0: 0f b7 43 3c movzwl 0x3c(%ebx),%eax 801056f4: 83 e0 03 and $0x3,%eax 801056f7: 66 83 f8 03 cmp $0x3,%ax 801056fb: 75 a8 jne 801056a5 <trap+0xc5> exit(); 801056fd: e8 de e3 ff ff call 80103ae0 <exit> 80105702: eb a1 jmp 801056a5 <trap+0xc5> 80105704: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(myproc() && myproc()->state == RUNNING && 80105708: 83 7b 30 20 cmpl $0x20,0x30(%ebx) 8010570c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80105710: 75 a9 jne 801056bb <trap+0xdb> yield(); 80105712: e8 f9 e4 ff ff call 80103c10 <yield> 80105717: eb a2 jmp 801056bb <trap+0xdb> 80105719: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(cpuid() == 0){ 80105720: e8 9b df ff ff call 801036c0 <cpuid> 80105725: 85 c0 test %eax,%eax 80105727: 0f 84 b3 00 00 00 je 801057e0 <trap+0x200> 8010572d: 8d 76 00 lea 0x0(%esi),%esi lapiceoi(); 80105730: e8 8b d0 ff ff call 801027c0 <lapiceoi> break; 80105735: e9 56 ff ff ff jmp 80105690 <trap+0xb0> 8010573a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi kbdintr(); 80105740: e8 cb ce ff ff call 80102610 <kbdintr> lapiceoi(); 80105745: e8 76 d0 ff ff call 801027c0 <lapiceoi> break; 8010574a: e9 41 ff ff ff jmp 80105690 <trap+0xb0> 8010574f: 90 nop uartintr(); 80105750: e8 1b 02 00 00 call 80105970 <uartintr> lapiceoi(); 80105755: e8 66 d0 ff ff call 801027c0 <lapiceoi> break; 8010575a: e9 31 ff ff ff jmp 80105690 <trap+0xb0> 8010575f: 90 nop cprintf("cpu%d: spurious interrupt at %x:%x\n", 80105760: 8b 7b 38 mov 0x38(%ebx),%edi 80105763: 0f b7 73 3c movzwl 0x3c(%ebx),%esi 80105767: e8 54 df ff ff call 801036c0 <cpuid> 8010576c: c7 04 24 ac 76 10 80 movl $0x801076ac,(%esp) 80105773: 89 7c 24 0c mov %edi,0xc(%esp) 80105777: 89 74 24 08 mov %esi,0x8(%esp) 8010577b: 89 44 24 04 mov %eax,0x4(%esp) 8010577f: e8 cc ae ff ff call 80100650 <cprintf> lapiceoi(); 80105784: e8 37 d0 ff ff call 801027c0 <lapiceoi> break; 80105789: e9 02 ff ff ff jmp 80105690 <trap+0xb0> 8010578e: 66 90 xchg %ax,%ax ideintr(); 80105790: e8 2b c9 ff ff call 801020c0 <ideintr> 80105795: eb 96 jmp 8010572d <trap+0x14d> 80105797: 90 nop 80105798: 90 nop 80105799: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(myproc()->killed) 801057a0: e8 3b df ff ff call 801036e0 <myproc> 801057a5: 8b 70 24 mov 0x24(%eax),%esi 801057a8: 85 f6 test %esi,%esi 801057aa: 75 2c jne 801057d8 <trap+0x1f8> myproc()->tf = tf; 801057ac: e8 2f df ff ff call 801036e0 <myproc> 801057b1: 89 58 18 mov %ebx,0x18(%eax) syscall(); 801057b4: e8 37 ef ff ff call 801046f0 <syscall> if(myproc()->killed) 801057b9: e8 22 df ff ff call 801036e0 <myproc> 801057be: 8b 48 24 mov 0x24(%eax),%ecx 801057c1: 85 c9 test %ecx,%ecx 801057c3: 0f 84 18 ff ff ff je 801056e1 <trap+0x101> } 801057c9: 83 c4 3c add $0x3c,%esp 801057cc: 5b pop %ebx 801057cd: 5e pop %esi 801057ce: 5f pop %edi 801057cf: 5d pop %ebp exit(); 801057d0: e9 0b e3 ff ff jmp 80103ae0 <exit> 801057d5: 8d 76 00 lea 0x0(%esi),%esi exit(); 801057d8: e8 03 e3 ff ff call 80103ae0 <exit> 801057dd: eb cd jmp 801057ac <trap+0x1cc> 801057df: 90 nop acquire(&tickslock); 801057e0: c7 04 24 60 4e 11 80 movl $0x80114e60,(%esp) 801057e7: e8 c4 e9 ff ff call 801041b0 <acquire> wakeup(&ticks); 801057ec: c7 04 24 a0 56 11 80 movl $0x801156a0,(%esp) ticks++; 801057f3: 83 05 a0 56 11 80 01 addl $0x1,0x801156a0 wakeup(&ticks); 801057fa: e8 f1 e5 ff ff call 80103df0 <wakeup> release(&tickslock); 801057ff: c7 04 24 60 4e 11 80 movl $0x80114e60,(%esp) 80105806: e8 95 ea ff ff call 801042a0 <release> 8010580b: e9 1d ff ff ff jmp 8010572d <trap+0x14d> 80105810: 0f 20 d7 mov %cr2,%edi cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", 80105813: 8b 73 38 mov 0x38(%ebx),%esi 80105816: e8 a5 de ff ff call 801036c0 <cpuid> 8010581b: 89 7c 24 10 mov %edi,0x10(%esp) 8010581f: 89 74 24 0c mov %esi,0xc(%esp) 80105823: 89 44 24 08 mov %eax,0x8(%esp) 80105827: 8b 43 30 mov 0x30(%ebx),%eax 8010582a: c7 04 24 d0 76 10 80 movl $0x801076d0,(%esp) 80105831: 89 44 24 04 mov %eax,0x4(%esp) 80105835: e8 16 ae ff ff call 80100650 <cprintf> panic("trap"); 8010583a: c7 04 24 a6 76 10 80 movl $0x801076a6,(%esp) 80105841: e8 1a ab ff ff call 80100360 <panic> 80105846: 66 90 xchg %ax,%ax 80105848: 66 90 xchg %ax,%ax 8010584a: 66 90 xchg %ax,%ax 8010584c: 66 90 xchg %ax,%ax 8010584e: 66 90 xchg %ax,%ax 80105850 <uartgetc>: } static int uartgetc(void) { if(!uart) 80105850: a1 bc a5 10 80 mov 0x8010a5bc,%eax { 80105855: 55 push %ebp 80105856: 89 e5 mov %esp,%ebp if(!uart) 80105858: 85 c0 test %eax,%eax 8010585a: 74 14 je 80105870 <uartgetc+0x20> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 8010585c: ba fd 03 00 00 mov $0x3fd,%edx 80105861: ec in (%dx),%al return -1; if(!(inb(COM1+5) & 0x01)) 80105862: a8 01 test $0x1,%al 80105864: 74 0a je 80105870 <uartgetc+0x20> 80105866: b2 f8 mov $0xf8,%dl 80105868: ec in (%dx),%al return -1; return inb(COM1+0); 80105869: 0f b6 c0 movzbl %al,%eax } 8010586c: 5d pop %ebp 8010586d: c3 ret 8010586e: 66 90 xchg %ax,%ax return -1; 80105870: b8 ff ff ff ff mov $0xffffffff,%eax } 80105875: 5d pop %ebp 80105876: c3 ret 80105877: 89 f6 mov %esi,%esi 80105879: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105880 <uartputc>: if(!uart) 80105880: a1 bc a5 10 80 mov 0x8010a5bc,%eax 80105885: 85 c0 test %eax,%eax 80105887: 74 3f je 801058c8 <uartputc+0x48> { 80105889: 55 push %ebp 8010588a: 89 e5 mov %esp,%ebp 8010588c: 56 push %esi 8010588d: be fd 03 00 00 mov $0x3fd,%esi 80105892: 53 push %ebx if(!uart) 80105893: bb 80 00 00 00 mov $0x80,%ebx { 80105898: 83 ec 10 sub $0x10,%esp 8010589b: eb 14 jmp 801058b1 <uartputc+0x31> 8010589d: 8d 76 00 lea 0x0(%esi),%esi microdelay(10); 801058a0: c7 04 24 0a 00 00 00 movl $0xa,(%esp) 801058a7: e8 34 cf ff ff call 801027e0 <microdelay> for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++) 801058ac: 83 eb 01 sub $0x1,%ebx 801058af: 74 07 je 801058b8 <uartputc+0x38> 801058b1: 89 f2 mov %esi,%edx 801058b3: ec in (%dx),%al 801058b4: a8 20 test $0x20,%al 801058b6: 74 e8 je 801058a0 <uartputc+0x20> outb(COM1+0, c); 801058b8: 0f b6 45 08 movzbl 0x8(%ebp),%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801058bc: ba f8 03 00 00 mov $0x3f8,%edx 801058c1: ee out %al,(%dx) } 801058c2: 83 c4 10 add $0x10,%esp 801058c5: 5b pop %ebx 801058c6: 5e pop %esi 801058c7: 5d pop %ebp 801058c8: f3 c3 repz ret 801058ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801058d0 <uartinit>: { 801058d0: 55 push %ebp 801058d1: 31 c9 xor %ecx,%ecx 801058d3: 89 e5 mov %esp,%ebp 801058d5: 89 c8 mov %ecx,%eax 801058d7: 57 push %edi 801058d8: bf fa 03 00 00 mov $0x3fa,%edi 801058dd: 56 push %esi 801058de: 89 fa mov %edi,%edx 801058e0: 53 push %ebx 801058e1: 83 ec 1c sub $0x1c,%esp 801058e4: ee out %al,(%dx) 801058e5: be fb 03 00 00 mov $0x3fb,%esi 801058ea: b8 80 ff ff ff mov $0xffffff80,%eax 801058ef: 89 f2 mov %esi,%edx 801058f1: ee out %al,(%dx) 801058f2: b8 0c 00 00 00 mov $0xc,%eax 801058f7: b2 f8 mov $0xf8,%dl 801058f9: ee out %al,(%dx) 801058fa: bb f9 03 00 00 mov $0x3f9,%ebx 801058ff: 89 c8 mov %ecx,%eax 80105901: 89 da mov %ebx,%edx 80105903: ee out %al,(%dx) 80105904: b8 03 00 00 00 mov $0x3,%eax 80105909: 89 f2 mov %esi,%edx 8010590b: ee out %al,(%dx) 8010590c: b2 fc mov $0xfc,%dl 8010590e: 89 c8 mov %ecx,%eax 80105910: ee out %al,(%dx) 80105911: b8 01 00 00 00 mov $0x1,%eax 80105916: 89 da mov %ebx,%edx 80105918: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80105919: b2 fd mov $0xfd,%dl 8010591b: ec in (%dx),%al if(inb(COM1+5) == 0xFF) 8010591c: 3c ff cmp $0xff,%al 8010591e: 74 42 je 80105962 <uartinit+0x92> uart = 1; 80105920: c7 05 bc a5 10 80 01 movl $0x1,0x8010a5bc 80105927: 00 00 00 8010592a: 89 fa mov %edi,%edx 8010592c: ec in (%dx),%al 8010592d: b2 f8 mov $0xf8,%dl 8010592f: ec in (%dx),%al ioapicenable(IRQ_COM1, 0); 80105930: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80105937: 00 for(p="xv6...\n"; *p; p++) 80105938: bb c8 77 10 80 mov $0x801077c8,%ebx ioapicenable(IRQ_COM1, 0); 8010593d: c7 04 24 04 00 00 00 movl $0x4,(%esp) 80105944: e8 a7 c9 ff ff call 801022f0 <ioapicenable> for(p="xv6...\n"; *p; p++) 80105949: b8 78 00 00 00 mov $0x78,%eax 8010594e: 66 90 xchg %ax,%ax uartputc(*p); 80105950: 89 04 24 mov %eax,(%esp) for(p="xv6...\n"; *p; p++) 80105953: 83 c3 01 add $0x1,%ebx uartputc(*p); 80105956: e8 25 ff ff ff call 80105880 <uartputc> for(p="xv6...\n"; *p; p++) 8010595b: 0f be 03 movsbl (%ebx),%eax 8010595e: 84 c0 test %al,%al 80105960: 75 ee jne 80105950 <uartinit+0x80> } 80105962: 83 c4 1c add $0x1c,%esp 80105965: 5b pop %ebx 80105966: 5e pop %esi 80105967: 5f pop %edi 80105968: 5d pop %ebp 80105969: c3 ret 8010596a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80105970 <uartintr>: void uartintr(void) { 80105970: 55 push %ebp 80105971: 89 e5 mov %esp,%ebp 80105973: 83 ec 18 sub $0x18,%esp consoleintr(uartgetc); 80105976: c7 04 24 50 58 10 80 movl $0x80105850,(%esp) 8010597d: e8 2e ae ff ff call 801007b0 <consoleintr> } 80105982: c9 leave 80105983: c3 ret 80105984 <vector0>: # generated by vectors.pl - do not edit # handlers .globl alltraps .globl vector0 vector0: pushl $0 80105984: 6a 00 push $0x0 pushl $0 80105986: 6a 00 push $0x0 jmp alltraps 80105988: e9 60 fb ff ff jmp 801054ed <alltraps> 8010598d <vector1>: .globl vector1 vector1: pushl $0 8010598d: 6a 00 push $0x0 pushl $1 8010598f: 6a 01 push $0x1 jmp alltraps 80105991: e9 57 fb ff ff jmp 801054ed <alltraps> 80105996 <vector2>: .globl vector2 vector2: pushl $0 80105996: 6a 00 push $0x0 pushl $2 80105998: 6a 02 push $0x2 jmp alltraps 8010599a: e9 4e fb ff ff jmp 801054ed <alltraps> 8010599f <vector3>: .globl vector3 vector3: pushl $0 8010599f: 6a 00 push $0x0 pushl $3 801059a1: 6a 03 push $0x3 jmp alltraps 801059a3: e9 45 fb ff ff jmp 801054ed <alltraps> 801059a8 <vector4>: .globl vector4 vector4: pushl $0 801059a8: 6a 00 push $0x0 pushl $4 801059aa: 6a 04 push $0x4 jmp alltraps 801059ac: e9 3c fb ff ff jmp 801054ed <alltraps> 801059b1 <vector5>: .globl vector5 vector5: pushl $0 801059b1: 6a 00 push $0x0 pushl $5 801059b3: 6a 05 push $0x5 jmp alltraps 801059b5: e9 33 fb ff ff jmp 801054ed <alltraps> 801059ba <vector6>: .globl vector6 vector6: pushl $0 801059ba: 6a 00 push $0x0 pushl $6 801059bc: 6a 06 push $0x6 jmp alltraps 801059be: e9 2a fb ff ff jmp 801054ed <alltraps> 801059c3 <vector7>: .globl vector7 vector7: pushl $0 801059c3: 6a 00 push $0x0 pushl $7 801059c5: 6a 07 push $0x7 jmp alltraps 801059c7: e9 21 fb ff ff jmp 801054ed <alltraps> 801059cc <vector8>: .globl vector8 vector8: pushl $8 801059cc: 6a 08 push $0x8 jmp alltraps 801059ce: e9 1a fb ff ff jmp 801054ed <alltraps> 801059d3 <vector9>: .globl vector9 vector9: pushl $0 801059d3: 6a 00 push $0x0 pushl $9 801059d5: 6a 09 push $0x9 jmp alltraps 801059d7: e9 11 fb ff ff jmp 801054ed <alltraps> 801059dc <vector10>: .globl vector10 vector10: pushl $10 801059dc: 6a 0a push $0xa jmp alltraps 801059de: e9 0a fb ff ff jmp 801054ed <alltraps> 801059e3 <vector11>: .globl vector11 vector11: pushl $11 801059e3: 6a 0b push $0xb jmp alltraps 801059e5: e9 03 fb ff ff jmp 801054ed <alltraps> 801059ea <vector12>: .globl vector12 vector12: pushl $12 801059ea: 6a 0c push $0xc jmp alltraps 801059ec: e9 fc fa ff ff jmp 801054ed <alltraps> 801059f1 <vector13>: .globl vector13 vector13: pushl $13 801059f1: 6a 0d push $0xd jmp alltraps 801059f3: e9 f5 fa ff ff jmp 801054ed <alltraps> 801059f8 <vector14>: .globl vector14 vector14: pushl $14 801059f8: 6a 0e push $0xe jmp alltraps 801059fa: e9 ee fa ff ff jmp 801054ed <alltraps> 801059ff <vector15>: .globl vector15 vector15: pushl $0 801059ff: 6a 00 push $0x0 pushl $15 80105a01: 6a 0f push $0xf jmp alltraps 80105a03: e9 e5 fa ff ff jmp 801054ed <alltraps> 80105a08 <vector16>: .globl vector16 vector16: pushl $0 80105a08: 6a 00 push $0x0 pushl $16 80105a0a: 6a 10 push $0x10 jmp alltraps 80105a0c: e9 dc fa ff ff jmp 801054ed <alltraps> 80105a11 <vector17>: .globl vector17 vector17: pushl $17 80105a11: 6a 11 push $0x11 jmp alltraps 80105a13: e9 d5 fa ff ff jmp 801054ed <alltraps> 80105a18 <vector18>: .globl vector18 vector18: pushl $0 80105a18: 6a 00 push $0x0 pushl $18 80105a1a: 6a 12 push $0x12 jmp alltraps 80105a1c: e9 cc fa ff ff jmp 801054ed <alltraps> 80105a21 <vector19>: .globl vector19 vector19: pushl $0 80105a21: 6a 00 push $0x0 pushl $19 80105a23: 6a 13 push $0x13 jmp alltraps 80105a25: e9 c3 fa ff ff jmp 801054ed <alltraps> 80105a2a <vector20>: .globl vector20 vector20: pushl $0 80105a2a: 6a 00 push $0x0 pushl $20 80105a2c: 6a 14 push $0x14 jmp alltraps 80105a2e: e9 ba fa ff ff jmp 801054ed <alltraps> 80105a33 <vector21>: .globl vector21 vector21: pushl $0 80105a33: 6a 00 push $0x0 pushl $21 80105a35: 6a 15 push $0x15 jmp alltraps 80105a37: e9 b1 fa ff ff jmp 801054ed <alltraps> 80105a3c <vector22>: .globl vector22 vector22: pushl $0 80105a3c: 6a 00 push $0x0 pushl $22 80105a3e: 6a 16 push $0x16 jmp alltraps 80105a40: e9 a8 fa ff ff jmp 801054ed <alltraps> 80105a45 <vector23>: .globl vector23 vector23: pushl $0 80105a45: 6a 00 push $0x0 pushl $23 80105a47: 6a 17 push $0x17 jmp alltraps 80105a49: e9 9f fa ff ff jmp 801054ed <alltraps> 80105a4e <vector24>: .globl vector24 vector24: pushl $0 80105a4e: 6a 00 push $0x0 pushl $24 80105a50: 6a 18 push $0x18 jmp alltraps 80105a52: e9 96 fa ff ff jmp 801054ed <alltraps> 80105a57 <vector25>: .globl vector25 vector25: pushl $0 80105a57: 6a 00 push $0x0 pushl $25 80105a59: 6a 19 push $0x19 jmp alltraps 80105a5b: e9 8d fa ff ff jmp 801054ed <alltraps> 80105a60 <vector26>: .globl vector26 vector26: pushl $0 80105a60: 6a 00 push $0x0 pushl $26 80105a62: 6a 1a push $0x1a jmp alltraps 80105a64: e9 84 fa ff ff jmp 801054ed <alltraps> 80105a69 <vector27>: .globl vector27 vector27: pushl $0 80105a69: 6a 00 push $0x0 pushl $27 80105a6b: 6a 1b push $0x1b jmp alltraps 80105a6d: e9 7b fa ff ff jmp 801054ed <alltraps> 80105a72 <vector28>: .globl vector28 vector28: pushl $0 80105a72: 6a 00 push $0x0 pushl $28 80105a74: 6a 1c push $0x1c jmp alltraps 80105a76: e9 72 fa ff ff jmp 801054ed <alltraps> 80105a7b <vector29>: .globl vector29 vector29: pushl $0 80105a7b: 6a 00 push $0x0 pushl $29 80105a7d: 6a 1d push $0x1d jmp alltraps 80105a7f: e9 69 fa ff ff jmp 801054ed <alltraps> 80105a84 <vector30>: .globl vector30 vector30: pushl $0 80105a84: 6a 00 push $0x0 pushl $30 80105a86: 6a 1e push $0x1e jmp alltraps 80105a88: e9 60 fa ff ff jmp 801054ed <alltraps> 80105a8d <vector31>: .globl vector31 vector31: pushl $0 80105a8d: 6a 00 push $0x0 pushl $31 80105a8f: 6a 1f push $0x1f jmp alltraps 80105a91: e9 57 fa ff ff jmp 801054ed <alltraps> 80105a96 <vector32>: .globl vector32 vector32: pushl $0 80105a96: 6a 00 push $0x0 pushl $32 80105a98: 6a 20 push $0x20 jmp alltraps 80105a9a: e9 4e fa ff ff jmp 801054ed <alltraps> 80105a9f <vector33>: .globl vector33 vector33: pushl $0 80105a9f: 6a 00 push $0x0 pushl $33 80105aa1: 6a 21 push $0x21 jmp alltraps 80105aa3: e9 45 fa ff ff jmp 801054ed <alltraps> 80105aa8 <vector34>: .globl vector34 vector34: pushl $0 80105aa8: 6a 00 push $0x0 pushl $34 80105aaa: 6a 22 push $0x22 jmp alltraps 80105aac: e9 3c fa ff ff jmp 801054ed <alltraps> 80105ab1 <vector35>: .globl vector35 vector35: pushl $0 80105ab1: 6a 00 push $0x0 pushl $35 80105ab3: 6a 23 push $0x23 jmp alltraps 80105ab5: e9 33 fa ff ff jmp 801054ed <alltraps> 80105aba <vector36>: .globl vector36 vector36: pushl $0 80105aba: 6a 00 push $0x0 pushl $36 80105abc: 6a 24 push $0x24 jmp alltraps 80105abe: e9 2a fa ff ff jmp 801054ed <alltraps> 80105ac3 <vector37>: .globl vector37 vector37: pushl $0 80105ac3: 6a 00 push $0x0 pushl $37 80105ac5: 6a 25 push $0x25 jmp alltraps 80105ac7: e9 21 fa ff ff jmp 801054ed <alltraps> 80105acc <vector38>: .globl vector38 vector38: pushl $0 80105acc: 6a 00 push $0x0 pushl $38 80105ace: 6a 26 push $0x26 jmp alltraps 80105ad0: e9 18 fa ff ff jmp 801054ed <alltraps> 80105ad5 <vector39>: .globl vector39 vector39: pushl $0 80105ad5: 6a 00 push $0x0 pushl $39 80105ad7: 6a 27 push $0x27 jmp alltraps 80105ad9: e9 0f fa ff ff jmp 801054ed <alltraps> 80105ade <vector40>: .globl vector40 vector40: pushl $0 80105ade: 6a 00 push $0x0 pushl $40 80105ae0: 6a 28 push $0x28 jmp alltraps 80105ae2: e9 06 fa ff ff jmp 801054ed <alltraps> 80105ae7 <vector41>: .globl vector41 vector41: pushl $0 80105ae7: 6a 00 push $0x0 pushl $41 80105ae9: 6a 29 push $0x29 jmp alltraps 80105aeb: e9 fd f9 ff ff jmp 801054ed <alltraps> 80105af0 <vector42>: .globl vector42 vector42: pushl $0 80105af0: 6a 00 push $0x0 pushl $42 80105af2: 6a 2a push $0x2a jmp alltraps 80105af4: e9 f4 f9 ff ff jmp 801054ed <alltraps> 80105af9 <vector43>: .globl vector43 vector43: pushl $0 80105af9: 6a 00 push $0x0 pushl $43 80105afb: 6a 2b push $0x2b jmp alltraps 80105afd: e9 eb f9 ff ff jmp 801054ed <alltraps> 80105b02 <vector44>: .globl vector44 vector44: pushl $0 80105b02: 6a 00 push $0x0 pushl $44 80105b04: 6a 2c push $0x2c jmp alltraps 80105b06: e9 e2 f9 ff ff jmp 801054ed <alltraps> 80105b0b <vector45>: .globl vector45 vector45: pushl $0 80105b0b: 6a 00 push $0x0 pushl $45 80105b0d: 6a 2d push $0x2d jmp alltraps 80105b0f: e9 d9 f9 ff ff jmp 801054ed <alltraps> 80105b14 <vector46>: .globl vector46 vector46: pushl $0 80105b14: 6a 00 push $0x0 pushl $46 80105b16: 6a 2e push $0x2e jmp alltraps 80105b18: e9 d0 f9 ff ff jmp 801054ed <alltraps> 80105b1d <vector47>: .globl vector47 vector47: pushl $0 80105b1d: 6a 00 push $0x0 pushl $47 80105b1f: 6a 2f push $0x2f jmp alltraps 80105b21: e9 c7 f9 ff ff jmp 801054ed <alltraps> 80105b26 <vector48>: .globl vector48 vector48: pushl $0 80105b26: 6a 00 push $0x0 pushl $48 80105b28: 6a 30 push $0x30 jmp alltraps 80105b2a: e9 be f9 ff ff jmp 801054ed <alltraps> 80105b2f <vector49>: .globl vector49 vector49: pushl $0 80105b2f: 6a 00 push $0x0 pushl $49 80105b31: 6a 31 push $0x31 jmp alltraps 80105b33: e9 b5 f9 ff ff jmp 801054ed <alltraps> 80105b38 <vector50>: .globl vector50 vector50: pushl $0 80105b38: 6a 00 push $0x0 pushl $50 80105b3a: 6a 32 push $0x32 jmp alltraps 80105b3c: e9 ac f9 ff ff jmp 801054ed <alltraps> 80105b41 <vector51>: .globl vector51 vector51: pushl $0 80105b41: 6a 00 push $0x0 pushl $51 80105b43: 6a 33 push $0x33 jmp alltraps 80105b45: e9 a3 f9 ff ff jmp 801054ed <alltraps> 80105b4a <vector52>: .globl vector52 vector52: pushl $0 80105b4a: 6a 00 push $0x0 pushl $52 80105b4c: 6a 34 push $0x34 jmp alltraps 80105b4e: e9 9a f9 ff ff jmp 801054ed <alltraps> 80105b53 <vector53>: .globl vector53 vector53: pushl $0 80105b53: 6a 00 push $0x0 pushl $53 80105b55: 6a 35 push $0x35 jmp alltraps 80105b57: e9 91 f9 ff ff jmp 801054ed <alltraps> 80105b5c <vector54>: .globl vector54 vector54: pushl $0 80105b5c: 6a 00 push $0x0 pushl $54 80105b5e: 6a 36 push $0x36 jmp alltraps 80105b60: e9 88 f9 ff ff jmp 801054ed <alltraps> 80105b65 <vector55>: .globl vector55 vector55: pushl $0 80105b65: 6a 00 push $0x0 pushl $55 80105b67: 6a 37 push $0x37 jmp alltraps 80105b69: e9 7f f9 ff ff jmp 801054ed <alltraps> 80105b6e <vector56>: .globl vector56 vector56: pushl $0 80105b6e: 6a 00 push $0x0 pushl $56 80105b70: 6a 38 push $0x38 jmp alltraps 80105b72: e9 76 f9 ff ff jmp 801054ed <alltraps> 80105b77 <vector57>: .globl vector57 vector57: pushl $0 80105b77: 6a 00 push $0x0 pushl $57 80105b79: 6a 39 push $0x39 jmp alltraps 80105b7b: e9 6d f9 ff ff jmp 801054ed <alltraps> 80105b80 <vector58>: .globl vector58 vector58: pushl $0 80105b80: 6a 00 push $0x0 pushl $58 80105b82: 6a 3a push $0x3a jmp alltraps 80105b84: e9 64 f9 ff ff jmp 801054ed <alltraps> 80105b89 <vector59>: .globl vector59 vector59: pushl $0 80105b89: 6a 00 push $0x0 pushl $59 80105b8b: 6a 3b push $0x3b jmp alltraps 80105b8d: e9 5b f9 ff ff jmp 801054ed <alltraps> 80105b92 <vector60>: .globl vector60 vector60: pushl $0 80105b92: 6a 00 push $0x0 pushl $60 80105b94: 6a 3c push $0x3c jmp alltraps 80105b96: e9 52 f9 ff ff jmp 801054ed <alltraps> 80105b9b <vector61>: .globl vector61 vector61: pushl $0 80105b9b: 6a 00 push $0x0 pushl $61 80105b9d: 6a 3d push $0x3d jmp alltraps 80105b9f: e9 49 f9 ff ff jmp 801054ed <alltraps> 80105ba4 <vector62>: .globl vector62 vector62: pushl $0 80105ba4: 6a 00 push $0x0 pushl $62 80105ba6: 6a 3e push $0x3e jmp alltraps 80105ba8: e9 40 f9 ff ff jmp 801054ed <alltraps> 80105bad <vector63>: .globl vector63 vector63: pushl $0 80105bad: 6a 00 push $0x0 pushl $63 80105baf: 6a 3f push $0x3f jmp alltraps 80105bb1: e9 37 f9 ff ff jmp 801054ed <alltraps> 80105bb6 <vector64>: .globl vector64 vector64: pushl $0 80105bb6: 6a 00 push $0x0 pushl $64 80105bb8: 6a 40 push $0x40 jmp alltraps 80105bba: e9 2e f9 ff ff jmp 801054ed <alltraps> 80105bbf <vector65>: .globl vector65 vector65: pushl $0 80105bbf: 6a 00 push $0x0 pushl $65 80105bc1: 6a 41 push $0x41 jmp alltraps 80105bc3: e9 25 f9 ff ff jmp 801054ed <alltraps> 80105bc8 <vector66>: .globl vector66 vector66: pushl $0 80105bc8: 6a 00 push $0x0 pushl $66 80105bca: 6a 42 push $0x42 jmp alltraps 80105bcc: e9 1c f9 ff ff jmp 801054ed <alltraps> 80105bd1 <vector67>: .globl vector67 vector67: pushl $0 80105bd1: 6a 00 push $0x0 pushl $67 80105bd3: 6a 43 push $0x43 jmp alltraps 80105bd5: e9 13 f9 ff ff jmp 801054ed <alltraps> 80105bda <vector68>: .globl vector68 vector68: pushl $0 80105bda: 6a 00 push $0x0 pushl $68 80105bdc: 6a 44 push $0x44 jmp alltraps 80105bde: e9 0a f9 ff ff jmp 801054ed <alltraps> 80105be3 <vector69>: .globl vector69 vector69: pushl $0 80105be3: 6a 00 push $0x0 pushl $69 80105be5: 6a 45 push $0x45 jmp alltraps 80105be7: e9 01 f9 ff ff jmp 801054ed <alltraps> 80105bec <vector70>: .globl vector70 vector70: pushl $0 80105bec: 6a 00 push $0x0 pushl $70 80105bee: 6a 46 push $0x46 jmp alltraps 80105bf0: e9 f8 f8 ff ff jmp 801054ed <alltraps> 80105bf5 <vector71>: .globl vector71 vector71: pushl $0 80105bf5: 6a 00 push $0x0 pushl $71 80105bf7: 6a 47 push $0x47 jmp alltraps 80105bf9: e9 ef f8 ff ff jmp 801054ed <alltraps> 80105bfe <vector72>: .globl vector72 vector72: pushl $0 80105bfe: 6a 00 push $0x0 pushl $72 80105c00: 6a 48 push $0x48 jmp alltraps 80105c02: e9 e6 f8 ff ff jmp 801054ed <alltraps> 80105c07 <vector73>: .globl vector73 vector73: pushl $0 80105c07: 6a 00 push $0x0 pushl $73 80105c09: 6a 49 push $0x49 jmp alltraps 80105c0b: e9 dd f8 ff ff jmp 801054ed <alltraps> 80105c10 <vector74>: .globl vector74 vector74: pushl $0 80105c10: 6a 00 push $0x0 pushl $74 80105c12: 6a 4a push $0x4a jmp alltraps 80105c14: e9 d4 f8 ff ff jmp 801054ed <alltraps> 80105c19 <vector75>: .globl vector75 vector75: pushl $0 80105c19: 6a 00 push $0x0 pushl $75 80105c1b: 6a 4b push $0x4b jmp alltraps 80105c1d: e9 cb f8 ff ff jmp 801054ed <alltraps> 80105c22 <vector76>: .globl vector76 vector76: pushl $0 80105c22: 6a 00 push $0x0 pushl $76 80105c24: 6a 4c push $0x4c jmp alltraps 80105c26: e9 c2 f8 ff ff jmp 801054ed <alltraps> 80105c2b <vector77>: .globl vector77 vector77: pushl $0 80105c2b: 6a 00 push $0x0 pushl $77 80105c2d: 6a 4d push $0x4d jmp alltraps 80105c2f: e9 b9 f8 ff ff jmp 801054ed <alltraps> 80105c34 <vector78>: .globl vector78 vector78: pushl $0 80105c34: 6a 00 push $0x0 pushl $78 80105c36: 6a 4e push $0x4e jmp alltraps 80105c38: e9 b0 f8 ff ff jmp 801054ed <alltraps> 80105c3d <vector79>: .globl vector79 vector79: pushl $0 80105c3d: 6a 00 push $0x0 pushl $79 80105c3f: 6a 4f push $0x4f jmp alltraps 80105c41: e9 a7 f8 ff ff jmp 801054ed <alltraps> 80105c46 <vector80>: .globl vector80 vector80: pushl $0 80105c46: 6a 00 push $0x0 pushl $80 80105c48: 6a 50 push $0x50 jmp alltraps 80105c4a: e9 9e f8 ff ff jmp 801054ed <alltraps> 80105c4f <vector81>: .globl vector81 vector81: pushl $0 80105c4f: 6a 00 push $0x0 pushl $81 80105c51: 6a 51 push $0x51 jmp alltraps 80105c53: e9 95 f8 ff ff jmp 801054ed <alltraps> 80105c58 <vector82>: .globl vector82 vector82: pushl $0 80105c58: 6a 00 push $0x0 pushl $82 80105c5a: 6a 52 push $0x52 jmp alltraps 80105c5c: e9 8c f8 ff ff jmp 801054ed <alltraps> 80105c61 <vector83>: .globl vector83 vector83: pushl $0 80105c61: 6a 00 push $0x0 pushl $83 80105c63: 6a 53 push $0x53 jmp alltraps 80105c65: e9 83 f8 ff ff jmp 801054ed <alltraps> 80105c6a <vector84>: .globl vector84 vector84: pushl $0 80105c6a: 6a 00 push $0x0 pushl $84 80105c6c: 6a 54 push $0x54 jmp alltraps 80105c6e: e9 7a f8 ff ff jmp 801054ed <alltraps> 80105c73 <vector85>: .globl vector85 vector85: pushl $0 80105c73: 6a 00 push $0x0 pushl $85 80105c75: 6a 55 push $0x55 jmp alltraps 80105c77: e9 71 f8 ff ff jmp 801054ed <alltraps> 80105c7c <vector86>: .globl vector86 vector86: pushl $0 80105c7c: 6a 00 push $0x0 pushl $86 80105c7e: 6a 56 push $0x56 jmp alltraps 80105c80: e9 68 f8 ff ff jmp 801054ed <alltraps> 80105c85 <vector87>: .globl vector87 vector87: pushl $0 80105c85: 6a 00 push $0x0 pushl $87 80105c87: 6a 57 push $0x57 jmp alltraps 80105c89: e9 5f f8 ff ff jmp 801054ed <alltraps> 80105c8e <vector88>: .globl vector88 vector88: pushl $0 80105c8e: 6a 00 push $0x0 pushl $88 80105c90: 6a 58 push $0x58 jmp alltraps 80105c92: e9 56 f8 ff ff jmp 801054ed <alltraps> 80105c97 <vector89>: .globl vector89 vector89: pushl $0 80105c97: 6a 00 push $0x0 pushl $89 80105c99: 6a 59 push $0x59 jmp alltraps 80105c9b: e9 4d f8 ff ff jmp 801054ed <alltraps> 80105ca0 <vector90>: .globl vector90 vector90: pushl $0 80105ca0: 6a 00 push $0x0 pushl $90 80105ca2: 6a 5a push $0x5a jmp alltraps 80105ca4: e9 44 f8 ff ff jmp 801054ed <alltraps> 80105ca9 <vector91>: .globl vector91 vector91: pushl $0 80105ca9: 6a 00 push $0x0 pushl $91 80105cab: 6a 5b push $0x5b jmp alltraps 80105cad: e9 3b f8 ff ff jmp 801054ed <alltraps> 80105cb2 <vector92>: .globl vector92 vector92: pushl $0 80105cb2: 6a 00 push $0x0 pushl $92 80105cb4: 6a 5c push $0x5c jmp alltraps 80105cb6: e9 32 f8 ff ff jmp 801054ed <alltraps> 80105cbb <vector93>: .globl vector93 vector93: pushl $0 80105cbb: 6a 00 push $0x0 pushl $93 80105cbd: 6a 5d push $0x5d jmp alltraps 80105cbf: e9 29 f8 ff ff jmp 801054ed <alltraps> 80105cc4 <vector94>: .globl vector94 vector94: pushl $0 80105cc4: 6a 00 push $0x0 pushl $94 80105cc6: 6a 5e push $0x5e jmp alltraps 80105cc8: e9 20 f8 ff ff jmp 801054ed <alltraps> 80105ccd <vector95>: .globl vector95 vector95: pushl $0 80105ccd: 6a 00 push $0x0 pushl $95 80105ccf: 6a 5f push $0x5f jmp alltraps 80105cd1: e9 17 f8 ff ff jmp 801054ed <alltraps> 80105cd6 <vector96>: .globl vector96 vector96: pushl $0 80105cd6: 6a 00 push $0x0 pushl $96 80105cd8: 6a 60 push $0x60 jmp alltraps 80105cda: e9 0e f8 ff ff jmp 801054ed <alltraps> 80105cdf <vector97>: .globl vector97 vector97: pushl $0 80105cdf: 6a 00 push $0x0 pushl $97 80105ce1: 6a 61 push $0x61 jmp alltraps 80105ce3: e9 05 f8 ff ff jmp 801054ed <alltraps> 80105ce8 <vector98>: .globl vector98 vector98: pushl $0 80105ce8: 6a 00 push $0x0 pushl $98 80105cea: 6a 62 push $0x62 jmp alltraps 80105cec: e9 fc f7 ff ff jmp 801054ed <alltraps> 80105cf1 <vector99>: .globl vector99 vector99: pushl $0 80105cf1: 6a 00 push $0x0 pushl $99 80105cf3: 6a 63 push $0x63 jmp alltraps 80105cf5: e9 f3 f7 ff ff jmp 801054ed <alltraps> 80105cfa <vector100>: .globl vector100 vector100: pushl $0 80105cfa: 6a 00 push $0x0 pushl $100 80105cfc: 6a 64 push $0x64 jmp alltraps 80105cfe: e9 ea f7 ff ff jmp 801054ed <alltraps> 80105d03 <vector101>: .globl vector101 vector101: pushl $0 80105d03: 6a 00 push $0x0 pushl $101 80105d05: 6a 65 push $0x65 jmp alltraps 80105d07: e9 e1 f7 ff ff jmp 801054ed <alltraps> 80105d0c <vector102>: .globl vector102 vector102: pushl $0 80105d0c: 6a 00 push $0x0 pushl $102 80105d0e: 6a 66 push $0x66 jmp alltraps 80105d10: e9 d8 f7 ff ff jmp 801054ed <alltraps> 80105d15 <vector103>: .globl vector103 vector103: pushl $0 80105d15: 6a 00 push $0x0 pushl $103 80105d17: 6a 67 push $0x67 jmp alltraps 80105d19: e9 cf f7 ff ff jmp 801054ed <alltraps> 80105d1e <vector104>: .globl vector104 vector104: pushl $0 80105d1e: 6a 00 push $0x0 pushl $104 80105d20: 6a 68 push $0x68 jmp alltraps 80105d22: e9 c6 f7 ff ff jmp 801054ed <alltraps> 80105d27 <vector105>: .globl vector105 vector105: pushl $0 80105d27: 6a 00 push $0x0 pushl $105 80105d29: 6a 69 push $0x69 jmp alltraps 80105d2b: e9 bd f7 ff ff jmp 801054ed <alltraps> 80105d30 <vector106>: .globl vector106 vector106: pushl $0 80105d30: 6a 00 push $0x0 pushl $106 80105d32: 6a 6a push $0x6a jmp alltraps 80105d34: e9 b4 f7 ff ff jmp 801054ed <alltraps> 80105d39 <vector107>: .globl vector107 vector107: pushl $0 80105d39: 6a 00 push $0x0 pushl $107 80105d3b: 6a 6b push $0x6b jmp alltraps 80105d3d: e9 ab f7 ff ff jmp 801054ed <alltraps> 80105d42 <vector108>: .globl vector108 vector108: pushl $0 80105d42: 6a 00 push $0x0 pushl $108 80105d44: 6a 6c push $0x6c jmp alltraps 80105d46: e9 a2 f7 ff ff jmp 801054ed <alltraps> 80105d4b <vector109>: .globl vector109 vector109: pushl $0 80105d4b: 6a 00 push $0x0 pushl $109 80105d4d: 6a 6d push $0x6d jmp alltraps 80105d4f: e9 99 f7 ff ff jmp 801054ed <alltraps> 80105d54 <vector110>: .globl vector110 vector110: pushl $0 80105d54: 6a 00 push $0x0 pushl $110 80105d56: 6a 6e push $0x6e jmp alltraps 80105d58: e9 90 f7 ff ff jmp 801054ed <alltraps> 80105d5d <vector111>: .globl vector111 vector111: pushl $0 80105d5d: 6a 00 push $0x0 pushl $111 80105d5f: 6a 6f push $0x6f jmp alltraps 80105d61: e9 87 f7 ff ff jmp 801054ed <alltraps> 80105d66 <vector112>: .globl vector112 vector112: pushl $0 80105d66: 6a 00 push $0x0 pushl $112 80105d68: 6a 70 push $0x70 jmp alltraps 80105d6a: e9 7e f7 ff ff jmp 801054ed <alltraps> 80105d6f <vector113>: .globl vector113 vector113: pushl $0 80105d6f: 6a 00 push $0x0 pushl $113 80105d71: 6a 71 push $0x71 jmp alltraps 80105d73: e9 75 f7 ff ff jmp 801054ed <alltraps> 80105d78 <vector114>: .globl vector114 vector114: pushl $0 80105d78: 6a 00 push $0x0 pushl $114 80105d7a: 6a 72 push $0x72 jmp alltraps 80105d7c: e9 6c f7 ff ff jmp 801054ed <alltraps> 80105d81 <vector115>: .globl vector115 vector115: pushl $0 80105d81: 6a 00 push $0x0 pushl $115 80105d83: 6a 73 push $0x73 jmp alltraps 80105d85: e9 63 f7 ff ff jmp 801054ed <alltraps> 80105d8a <vector116>: .globl vector116 vector116: pushl $0 80105d8a: 6a 00 push $0x0 pushl $116 80105d8c: 6a 74 push $0x74 jmp alltraps 80105d8e: e9 5a f7 ff ff jmp 801054ed <alltraps> 80105d93 <vector117>: .globl vector117 vector117: pushl $0 80105d93: 6a 00 push $0x0 pushl $117 80105d95: 6a 75 push $0x75 jmp alltraps 80105d97: e9 51 f7 ff ff jmp 801054ed <alltraps> 80105d9c <vector118>: .globl vector118 vector118: pushl $0 80105d9c: 6a 00 push $0x0 pushl $118 80105d9e: 6a 76 push $0x76 jmp alltraps 80105da0: e9 48 f7 ff ff jmp 801054ed <alltraps> 80105da5 <vector119>: .globl vector119 vector119: pushl $0 80105da5: 6a 00 push $0x0 pushl $119 80105da7: 6a 77 push $0x77 jmp alltraps 80105da9: e9 3f f7 ff ff jmp 801054ed <alltraps> 80105dae <vector120>: .globl vector120 vector120: pushl $0 80105dae: 6a 00 push $0x0 pushl $120 80105db0: 6a 78 push $0x78 jmp alltraps 80105db2: e9 36 f7 ff ff jmp 801054ed <alltraps> 80105db7 <vector121>: .globl vector121 vector121: pushl $0 80105db7: 6a 00 push $0x0 pushl $121 80105db9: 6a 79 push $0x79 jmp alltraps 80105dbb: e9 2d f7 ff ff jmp 801054ed <alltraps> 80105dc0 <vector122>: .globl vector122 vector122: pushl $0 80105dc0: 6a 00 push $0x0 pushl $122 80105dc2: 6a 7a push $0x7a jmp alltraps 80105dc4: e9 24 f7 ff ff jmp 801054ed <alltraps> 80105dc9 <vector123>: .globl vector123 vector123: pushl $0 80105dc9: 6a 00 push $0x0 pushl $123 80105dcb: 6a 7b push $0x7b jmp alltraps 80105dcd: e9 1b f7 ff ff jmp 801054ed <alltraps> 80105dd2 <vector124>: .globl vector124 vector124: pushl $0 80105dd2: 6a 00 push $0x0 pushl $124 80105dd4: 6a 7c push $0x7c jmp alltraps 80105dd6: e9 12 f7 ff ff jmp 801054ed <alltraps> 80105ddb <vector125>: .globl vector125 vector125: pushl $0 80105ddb: 6a 00 push $0x0 pushl $125 80105ddd: 6a 7d push $0x7d jmp alltraps 80105ddf: e9 09 f7 ff ff jmp 801054ed <alltraps> 80105de4 <vector126>: .globl vector126 vector126: pushl $0 80105de4: 6a 00 push $0x0 pushl $126 80105de6: 6a 7e push $0x7e jmp alltraps 80105de8: e9 00 f7 ff ff jmp 801054ed <alltraps> 80105ded <vector127>: .globl vector127 vector127: pushl $0 80105ded: 6a 00 push $0x0 pushl $127 80105def: 6a 7f push $0x7f jmp alltraps 80105df1: e9 f7 f6 ff ff jmp 801054ed <alltraps> 80105df6 <vector128>: .globl vector128 vector128: pushl $0 80105df6: 6a 00 push $0x0 pushl $128 80105df8: 68 80 00 00 00 push $0x80 jmp alltraps 80105dfd: e9 eb f6 ff ff jmp 801054ed <alltraps> 80105e02 <vector129>: .globl vector129 vector129: pushl $0 80105e02: 6a 00 push $0x0 pushl $129 80105e04: 68 81 00 00 00 push $0x81 jmp alltraps 80105e09: e9 df f6 ff ff jmp 801054ed <alltraps> 80105e0e <vector130>: .globl vector130 vector130: pushl $0 80105e0e: 6a 00 push $0x0 pushl $130 80105e10: 68 82 00 00 00 push $0x82 jmp alltraps 80105e15: e9 d3 f6 ff ff jmp 801054ed <alltraps> 80105e1a <vector131>: .globl vector131 vector131: pushl $0 80105e1a: 6a 00 push $0x0 pushl $131 80105e1c: 68 83 00 00 00 push $0x83 jmp alltraps 80105e21: e9 c7 f6 ff ff jmp 801054ed <alltraps> 80105e26 <vector132>: .globl vector132 vector132: pushl $0 80105e26: 6a 00 push $0x0 pushl $132 80105e28: 68 84 00 00 00 push $0x84 jmp alltraps 80105e2d: e9 bb f6 ff ff jmp 801054ed <alltraps> 80105e32 <vector133>: .globl vector133 vector133: pushl $0 80105e32: 6a 00 push $0x0 pushl $133 80105e34: 68 85 00 00 00 push $0x85 jmp alltraps 80105e39: e9 af f6 ff ff jmp 801054ed <alltraps> 80105e3e <vector134>: .globl vector134 vector134: pushl $0 80105e3e: 6a 00 push $0x0 pushl $134 80105e40: 68 86 00 00 00 push $0x86 jmp alltraps 80105e45: e9 a3 f6 ff ff jmp 801054ed <alltraps> 80105e4a <vector135>: .globl vector135 vector135: pushl $0 80105e4a: 6a 00 push $0x0 pushl $135 80105e4c: 68 87 00 00 00 push $0x87 jmp alltraps 80105e51: e9 97 f6 ff ff jmp 801054ed <alltraps> 80105e56 <vector136>: .globl vector136 vector136: pushl $0 80105e56: 6a 00 push $0x0 pushl $136 80105e58: 68 88 00 00 00 push $0x88 jmp alltraps 80105e5d: e9 8b f6 ff ff jmp 801054ed <alltraps> 80105e62 <vector137>: .globl vector137 vector137: pushl $0 80105e62: 6a 00 push $0x0 pushl $137 80105e64: 68 89 00 00 00 push $0x89 jmp alltraps 80105e69: e9 7f f6 ff ff jmp 801054ed <alltraps> 80105e6e <vector138>: .globl vector138 vector138: pushl $0 80105e6e: 6a 00 push $0x0 pushl $138 80105e70: 68 8a 00 00 00 push $0x8a jmp alltraps 80105e75: e9 73 f6 ff ff jmp 801054ed <alltraps> 80105e7a <vector139>: .globl vector139 vector139: pushl $0 80105e7a: 6a 00 push $0x0 pushl $139 80105e7c: 68 8b 00 00 00 push $0x8b jmp alltraps 80105e81: e9 67 f6 ff ff jmp 801054ed <alltraps> 80105e86 <vector140>: .globl vector140 vector140: pushl $0 80105e86: 6a 00 push $0x0 pushl $140 80105e88: 68 8c 00 00 00 push $0x8c jmp alltraps 80105e8d: e9 5b f6 ff ff jmp 801054ed <alltraps> 80105e92 <vector141>: .globl vector141 vector141: pushl $0 80105e92: 6a 00 push $0x0 pushl $141 80105e94: 68 8d 00 00 00 push $0x8d jmp alltraps 80105e99: e9 4f f6 ff ff jmp 801054ed <alltraps> 80105e9e <vector142>: .globl vector142 vector142: pushl $0 80105e9e: 6a 00 push $0x0 pushl $142 80105ea0: 68 8e 00 00 00 push $0x8e jmp alltraps 80105ea5: e9 43 f6 ff ff jmp 801054ed <alltraps> 80105eaa <vector143>: .globl vector143 vector143: pushl $0 80105eaa: 6a 00 push $0x0 pushl $143 80105eac: 68 8f 00 00 00 push $0x8f jmp alltraps 80105eb1: e9 37 f6 ff ff jmp 801054ed <alltraps> 80105eb6 <vector144>: .globl vector144 vector144: pushl $0 80105eb6: 6a 00 push $0x0 pushl $144 80105eb8: 68 90 00 00 00 push $0x90 jmp alltraps 80105ebd: e9 2b f6 ff ff jmp 801054ed <alltraps> 80105ec2 <vector145>: .globl vector145 vector145: pushl $0 80105ec2: 6a 00 push $0x0 pushl $145 80105ec4: 68 91 00 00 00 push $0x91 jmp alltraps 80105ec9: e9 1f f6 ff ff jmp 801054ed <alltraps> 80105ece <vector146>: .globl vector146 vector146: pushl $0 80105ece: 6a 00 push $0x0 pushl $146 80105ed0: 68 92 00 00 00 push $0x92 jmp alltraps 80105ed5: e9 13 f6 ff ff jmp 801054ed <alltraps> 80105eda <vector147>: .globl vector147 vector147: pushl $0 80105eda: 6a 00 push $0x0 pushl $147 80105edc: 68 93 00 00 00 push $0x93 jmp alltraps 80105ee1: e9 07 f6 ff ff jmp 801054ed <alltraps> 80105ee6 <vector148>: .globl vector148 vector148: pushl $0 80105ee6: 6a 00 push $0x0 pushl $148 80105ee8: 68 94 00 00 00 push $0x94 jmp alltraps 80105eed: e9 fb f5 ff ff jmp 801054ed <alltraps> 80105ef2 <vector149>: .globl vector149 vector149: pushl $0 80105ef2: 6a 00 push $0x0 pushl $149 80105ef4: 68 95 00 00 00 push $0x95 jmp alltraps 80105ef9: e9 ef f5 ff ff jmp 801054ed <alltraps> 80105efe <vector150>: .globl vector150 vector150: pushl $0 80105efe: 6a 00 push $0x0 pushl $150 80105f00: 68 96 00 00 00 push $0x96 jmp alltraps 80105f05: e9 e3 f5 ff ff jmp 801054ed <alltraps> 80105f0a <vector151>: .globl vector151 vector151: pushl $0 80105f0a: 6a 00 push $0x0 pushl $151 80105f0c: 68 97 00 00 00 push $0x97 jmp alltraps 80105f11: e9 d7 f5 ff ff jmp 801054ed <alltraps> 80105f16 <vector152>: .globl vector152 vector152: pushl $0 80105f16: 6a 00 push $0x0 pushl $152 80105f18: 68 98 00 00 00 push $0x98 jmp alltraps 80105f1d: e9 cb f5 ff ff jmp 801054ed <alltraps> 80105f22 <vector153>: .globl vector153 vector153: pushl $0 80105f22: 6a 00 push $0x0 pushl $153 80105f24: 68 99 00 00 00 push $0x99 jmp alltraps 80105f29: e9 bf f5 ff ff jmp 801054ed <alltraps> 80105f2e <vector154>: .globl vector154 vector154: pushl $0 80105f2e: 6a 00 push $0x0 pushl $154 80105f30: 68 9a 00 00 00 push $0x9a jmp alltraps 80105f35: e9 b3 f5 ff ff jmp 801054ed <alltraps> 80105f3a <vector155>: .globl vector155 vector155: pushl $0 80105f3a: 6a 00 push $0x0 pushl $155 80105f3c: 68 9b 00 00 00 push $0x9b jmp alltraps 80105f41: e9 a7 f5 ff ff jmp 801054ed <alltraps> 80105f46 <vector156>: .globl vector156 vector156: pushl $0 80105f46: 6a 00 push $0x0 pushl $156 80105f48: 68 9c 00 00 00 push $0x9c jmp alltraps 80105f4d: e9 9b f5 ff ff jmp 801054ed <alltraps> 80105f52 <vector157>: .globl vector157 vector157: pushl $0 80105f52: 6a 00 push $0x0 pushl $157 80105f54: 68 9d 00 00 00 push $0x9d jmp alltraps 80105f59: e9 8f f5 ff ff jmp 801054ed <alltraps> 80105f5e <vector158>: .globl vector158 vector158: pushl $0 80105f5e: 6a 00 push $0x0 pushl $158 80105f60: 68 9e 00 00 00 push $0x9e jmp alltraps 80105f65: e9 83 f5 ff ff jmp 801054ed <alltraps> 80105f6a <vector159>: .globl vector159 vector159: pushl $0 80105f6a: 6a 00 push $0x0 pushl $159 80105f6c: 68 9f 00 00 00 push $0x9f jmp alltraps 80105f71: e9 77 f5 ff ff jmp 801054ed <alltraps> 80105f76 <vector160>: .globl vector160 vector160: pushl $0 80105f76: 6a 00 push $0x0 pushl $160 80105f78: 68 a0 00 00 00 push $0xa0 jmp alltraps 80105f7d: e9 6b f5 ff ff jmp 801054ed <alltraps> 80105f82 <vector161>: .globl vector161 vector161: pushl $0 80105f82: 6a 00 push $0x0 pushl $161 80105f84: 68 a1 00 00 00 push $0xa1 jmp alltraps 80105f89: e9 5f f5 ff ff jmp 801054ed <alltraps> 80105f8e <vector162>: .globl vector162 vector162: pushl $0 80105f8e: 6a 00 push $0x0 pushl $162 80105f90: 68 a2 00 00 00 push $0xa2 jmp alltraps 80105f95: e9 53 f5 ff ff jmp 801054ed <alltraps> 80105f9a <vector163>: .globl vector163 vector163: pushl $0 80105f9a: 6a 00 push $0x0 pushl $163 80105f9c: 68 a3 00 00 00 push $0xa3 jmp alltraps 80105fa1: e9 47 f5 ff ff jmp 801054ed <alltraps> 80105fa6 <vector164>: .globl vector164 vector164: pushl $0 80105fa6: 6a 00 push $0x0 pushl $164 80105fa8: 68 a4 00 00 00 push $0xa4 jmp alltraps 80105fad: e9 3b f5 ff ff jmp 801054ed <alltraps> 80105fb2 <vector165>: .globl vector165 vector165: pushl $0 80105fb2: 6a 00 push $0x0 pushl $165 80105fb4: 68 a5 00 00 00 push $0xa5 jmp alltraps 80105fb9: e9 2f f5 ff ff jmp 801054ed <alltraps> 80105fbe <vector166>: .globl vector166 vector166: pushl $0 80105fbe: 6a 00 push $0x0 pushl $166 80105fc0: 68 a6 00 00 00 push $0xa6 jmp alltraps 80105fc5: e9 23 f5 ff ff jmp 801054ed <alltraps> 80105fca <vector167>: .globl vector167 vector167: pushl $0 80105fca: 6a 00 push $0x0 pushl $167 80105fcc: 68 a7 00 00 00 push $0xa7 jmp alltraps 80105fd1: e9 17 f5 ff ff jmp 801054ed <alltraps> 80105fd6 <vector168>: .globl vector168 vector168: pushl $0 80105fd6: 6a 00 push $0x0 pushl $168 80105fd8: 68 a8 00 00 00 push $0xa8 jmp alltraps 80105fdd: e9 0b f5 ff ff jmp 801054ed <alltraps> 80105fe2 <vector169>: .globl vector169 vector169: pushl $0 80105fe2: 6a 00 push $0x0 pushl $169 80105fe4: 68 a9 00 00 00 push $0xa9 jmp alltraps 80105fe9: e9 ff f4 ff ff jmp 801054ed <alltraps> 80105fee <vector170>: .globl vector170 vector170: pushl $0 80105fee: 6a 00 push $0x0 pushl $170 80105ff0: 68 aa 00 00 00 push $0xaa jmp alltraps 80105ff5: e9 f3 f4 ff ff jmp 801054ed <alltraps> 80105ffa <vector171>: .globl vector171 vector171: pushl $0 80105ffa: 6a 00 push $0x0 pushl $171 80105ffc: 68 ab 00 00 00 push $0xab jmp alltraps 80106001: e9 e7 f4 ff ff jmp 801054ed <alltraps> 80106006 <vector172>: .globl vector172 vector172: pushl $0 80106006: 6a 00 push $0x0 pushl $172 80106008: 68 ac 00 00 00 push $0xac jmp alltraps 8010600d: e9 db f4 ff ff jmp 801054ed <alltraps> 80106012 <vector173>: .globl vector173 vector173: pushl $0 80106012: 6a 00 push $0x0 pushl $173 80106014: 68 ad 00 00 00 push $0xad jmp alltraps 80106019: e9 cf f4 ff ff jmp 801054ed <alltraps> 8010601e <vector174>: .globl vector174 vector174: pushl $0 8010601e: 6a 00 push $0x0 pushl $174 80106020: 68 ae 00 00 00 push $0xae jmp alltraps 80106025: e9 c3 f4 ff ff jmp 801054ed <alltraps> 8010602a <vector175>: .globl vector175 vector175: pushl $0 8010602a: 6a 00 push $0x0 pushl $175 8010602c: 68 af 00 00 00 push $0xaf jmp alltraps 80106031: e9 b7 f4 ff ff jmp 801054ed <alltraps> 80106036 <vector176>: .globl vector176 vector176: pushl $0 80106036: 6a 00 push $0x0 pushl $176 80106038: 68 b0 00 00 00 push $0xb0 jmp alltraps 8010603d: e9 ab f4 ff ff jmp 801054ed <alltraps> 80106042 <vector177>: .globl vector177 vector177: pushl $0 80106042: 6a 00 push $0x0 pushl $177 80106044: 68 b1 00 00 00 push $0xb1 jmp alltraps 80106049: e9 9f f4 ff ff jmp 801054ed <alltraps> 8010604e <vector178>: .globl vector178 vector178: pushl $0 8010604e: 6a 00 push $0x0 pushl $178 80106050: 68 b2 00 00 00 push $0xb2 jmp alltraps 80106055: e9 93 f4 ff ff jmp 801054ed <alltraps> 8010605a <vector179>: .globl vector179 vector179: pushl $0 8010605a: 6a 00 push $0x0 pushl $179 8010605c: 68 b3 00 00 00 push $0xb3 jmp alltraps 80106061: e9 87 f4 ff ff jmp 801054ed <alltraps> 80106066 <vector180>: .globl vector180 vector180: pushl $0 80106066: 6a 00 push $0x0 pushl $180 80106068: 68 b4 00 00 00 push $0xb4 jmp alltraps 8010606d: e9 7b f4 ff ff jmp 801054ed <alltraps> 80106072 <vector181>: .globl vector181 vector181: pushl $0 80106072: 6a 00 push $0x0 pushl $181 80106074: 68 b5 00 00 00 push $0xb5 jmp alltraps 80106079: e9 6f f4 ff ff jmp 801054ed <alltraps> 8010607e <vector182>: .globl vector182 vector182: pushl $0 8010607e: 6a 00 push $0x0 pushl $182 80106080: 68 b6 00 00 00 push $0xb6 jmp alltraps 80106085: e9 63 f4 ff ff jmp 801054ed <alltraps> 8010608a <vector183>: .globl vector183 vector183: pushl $0 8010608a: 6a 00 push $0x0 pushl $183 8010608c: 68 b7 00 00 00 push $0xb7 jmp alltraps 80106091: e9 57 f4 ff ff jmp 801054ed <alltraps> 80106096 <vector184>: .globl vector184 vector184: pushl $0 80106096: 6a 00 push $0x0 pushl $184 80106098: 68 b8 00 00 00 push $0xb8 jmp alltraps 8010609d: e9 4b f4 ff ff jmp 801054ed <alltraps> 801060a2 <vector185>: .globl vector185 vector185: pushl $0 801060a2: 6a 00 push $0x0 pushl $185 801060a4: 68 b9 00 00 00 push $0xb9 jmp alltraps 801060a9: e9 3f f4 ff ff jmp 801054ed <alltraps> 801060ae <vector186>: .globl vector186 vector186: pushl $0 801060ae: 6a 00 push $0x0 pushl $186 801060b0: 68 ba 00 00 00 push $0xba jmp alltraps 801060b5: e9 33 f4 ff ff jmp 801054ed <alltraps> 801060ba <vector187>: .globl vector187 vector187: pushl $0 801060ba: 6a 00 push $0x0 pushl $187 801060bc: 68 bb 00 00 00 push $0xbb jmp alltraps 801060c1: e9 27 f4 ff ff jmp 801054ed <alltraps> 801060c6 <vector188>: .globl vector188 vector188: pushl $0 801060c6: 6a 00 push $0x0 pushl $188 801060c8: 68 bc 00 00 00 push $0xbc jmp alltraps 801060cd: e9 1b f4 ff ff jmp 801054ed <alltraps> 801060d2 <vector189>: .globl vector189 vector189: pushl $0 801060d2: 6a 00 push $0x0 pushl $189 801060d4: 68 bd 00 00 00 push $0xbd jmp alltraps 801060d9: e9 0f f4 ff ff jmp 801054ed <alltraps> 801060de <vector190>: .globl vector190 vector190: pushl $0 801060de: 6a 00 push $0x0 pushl $190 801060e0: 68 be 00 00 00 push $0xbe jmp alltraps 801060e5: e9 03 f4 ff ff jmp 801054ed <alltraps> 801060ea <vector191>: .globl vector191 vector191: pushl $0 801060ea: 6a 00 push $0x0 pushl $191 801060ec: 68 bf 00 00 00 push $0xbf jmp alltraps 801060f1: e9 f7 f3 ff ff jmp 801054ed <alltraps> 801060f6 <vector192>: .globl vector192 vector192: pushl $0 801060f6: 6a 00 push $0x0 pushl $192 801060f8: 68 c0 00 00 00 push $0xc0 jmp alltraps 801060fd: e9 eb f3 ff ff jmp 801054ed <alltraps> 80106102 <vector193>: .globl vector193 vector193: pushl $0 80106102: 6a 00 push $0x0 pushl $193 80106104: 68 c1 00 00 00 push $0xc1 jmp alltraps 80106109: e9 df f3 ff ff jmp 801054ed <alltraps> 8010610e <vector194>: .globl vector194 vector194: pushl $0 8010610e: 6a 00 push $0x0 pushl $194 80106110: 68 c2 00 00 00 push $0xc2 jmp alltraps 80106115: e9 d3 f3 ff ff jmp 801054ed <alltraps> 8010611a <vector195>: .globl vector195 vector195: pushl $0 8010611a: 6a 00 push $0x0 pushl $195 8010611c: 68 c3 00 00 00 push $0xc3 jmp alltraps 80106121: e9 c7 f3 ff ff jmp 801054ed <alltraps> 80106126 <vector196>: .globl vector196 vector196: pushl $0 80106126: 6a 00 push $0x0 pushl $196 80106128: 68 c4 00 00 00 push $0xc4 jmp alltraps 8010612d: e9 bb f3 ff ff jmp 801054ed <alltraps> 80106132 <vector197>: .globl vector197 vector197: pushl $0 80106132: 6a 00 push $0x0 pushl $197 80106134: 68 c5 00 00 00 push $0xc5 jmp alltraps 80106139: e9 af f3 ff ff jmp 801054ed <alltraps> 8010613e <vector198>: .globl vector198 vector198: pushl $0 8010613e: 6a 00 push $0x0 pushl $198 80106140: 68 c6 00 00 00 push $0xc6 jmp alltraps 80106145: e9 a3 f3 ff ff jmp 801054ed <alltraps> 8010614a <vector199>: .globl vector199 vector199: pushl $0 8010614a: 6a 00 push $0x0 pushl $199 8010614c: 68 c7 00 00 00 push $0xc7 jmp alltraps 80106151: e9 97 f3 ff ff jmp 801054ed <alltraps> 80106156 <vector200>: .globl vector200 vector200: pushl $0 80106156: 6a 00 push $0x0 pushl $200 80106158: 68 c8 00 00 00 push $0xc8 jmp alltraps 8010615d: e9 8b f3 ff ff jmp 801054ed <alltraps> 80106162 <vector201>: .globl vector201 vector201: pushl $0 80106162: 6a 00 push $0x0 pushl $201 80106164: 68 c9 00 00 00 push $0xc9 jmp alltraps 80106169: e9 7f f3 ff ff jmp 801054ed <alltraps> 8010616e <vector202>: .globl vector202 vector202: pushl $0 8010616e: 6a 00 push $0x0 pushl $202 80106170: 68 ca 00 00 00 push $0xca jmp alltraps 80106175: e9 73 f3 ff ff jmp 801054ed <alltraps> 8010617a <vector203>: .globl vector203 vector203: pushl $0 8010617a: 6a 00 push $0x0 pushl $203 8010617c: 68 cb 00 00 00 push $0xcb jmp alltraps 80106181: e9 67 f3 ff ff jmp 801054ed <alltraps> 80106186 <vector204>: .globl vector204 vector204: pushl $0 80106186: 6a 00 push $0x0 pushl $204 80106188: 68 cc 00 00 00 push $0xcc jmp alltraps 8010618d: e9 5b f3 ff ff jmp 801054ed <alltraps> 80106192 <vector205>: .globl vector205 vector205: pushl $0 80106192: 6a 00 push $0x0 pushl $205 80106194: 68 cd 00 00 00 push $0xcd jmp alltraps 80106199: e9 4f f3 ff ff jmp 801054ed <alltraps> 8010619e <vector206>: .globl vector206 vector206: pushl $0 8010619e: 6a 00 push $0x0 pushl $206 801061a0: 68 ce 00 00 00 push $0xce jmp alltraps 801061a5: e9 43 f3 ff ff jmp 801054ed <alltraps> 801061aa <vector207>: .globl vector207 vector207: pushl $0 801061aa: 6a 00 push $0x0 pushl $207 801061ac: 68 cf 00 00 00 push $0xcf jmp alltraps 801061b1: e9 37 f3 ff ff jmp 801054ed <alltraps> 801061b6 <vector208>: .globl vector208 vector208: pushl $0 801061b6: 6a 00 push $0x0 pushl $208 801061b8: 68 d0 00 00 00 push $0xd0 jmp alltraps 801061bd: e9 2b f3 ff ff jmp 801054ed <alltraps> 801061c2 <vector209>: .globl vector209 vector209: pushl $0 801061c2: 6a 00 push $0x0 pushl $209 801061c4: 68 d1 00 00 00 push $0xd1 jmp alltraps 801061c9: e9 1f f3 ff ff jmp 801054ed <alltraps> 801061ce <vector210>: .globl vector210 vector210: pushl $0 801061ce: 6a 00 push $0x0 pushl $210 801061d0: 68 d2 00 00 00 push $0xd2 jmp alltraps 801061d5: e9 13 f3 ff ff jmp 801054ed <alltraps> 801061da <vector211>: .globl vector211 vector211: pushl $0 801061da: 6a 00 push $0x0 pushl $211 801061dc: 68 d3 00 00 00 push $0xd3 jmp alltraps 801061e1: e9 07 f3 ff ff jmp 801054ed <alltraps> 801061e6 <vector212>: .globl vector212 vector212: pushl $0 801061e6: 6a 00 push $0x0 pushl $212 801061e8: 68 d4 00 00 00 push $0xd4 jmp alltraps 801061ed: e9 fb f2 ff ff jmp 801054ed <alltraps> 801061f2 <vector213>: .globl vector213 vector213: pushl $0 801061f2: 6a 00 push $0x0 pushl $213 801061f4: 68 d5 00 00 00 push $0xd5 jmp alltraps 801061f9: e9 ef f2 ff ff jmp 801054ed <alltraps> 801061fe <vector214>: .globl vector214 vector214: pushl $0 801061fe: 6a 00 push $0x0 pushl $214 80106200: 68 d6 00 00 00 push $0xd6 jmp alltraps 80106205: e9 e3 f2 ff ff jmp 801054ed <alltraps> 8010620a <vector215>: .globl vector215 vector215: pushl $0 8010620a: 6a 00 push $0x0 pushl $215 8010620c: 68 d7 00 00 00 push $0xd7 jmp alltraps 80106211: e9 d7 f2 ff ff jmp 801054ed <alltraps> 80106216 <vector216>: .globl vector216 vector216: pushl $0 80106216: 6a 00 push $0x0 pushl $216 80106218: 68 d8 00 00 00 push $0xd8 jmp alltraps 8010621d: e9 cb f2 ff ff jmp 801054ed <alltraps> 80106222 <vector217>: .globl vector217 vector217: pushl $0 80106222: 6a 00 push $0x0 pushl $217 80106224: 68 d9 00 00 00 push $0xd9 jmp alltraps 80106229: e9 bf f2 ff ff jmp 801054ed <alltraps> 8010622e <vector218>: .globl vector218 vector218: pushl $0 8010622e: 6a 00 push $0x0 pushl $218 80106230: 68 da 00 00 00 push $0xda jmp alltraps 80106235: e9 b3 f2 ff ff jmp 801054ed <alltraps> 8010623a <vector219>: .globl vector219 vector219: pushl $0 8010623a: 6a 00 push $0x0 pushl $219 8010623c: 68 db 00 00 00 push $0xdb jmp alltraps 80106241: e9 a7 f2 ff ff jmp 801054ed <alltraps> 80106246 <vector220>: .globl vector220 vector220: pushl $0 80106246: 6a 00 push $0x0 pushl $220 80106248: 68 dc 00 00 00 push $0xdc jmp alltraps 8010624d: e9 9b f2 ff ff jmp 801054ed <alltraps> 80106252 <vector221>: .globl vector221 vector221: pushl $0 80106252: 6a 00 push $0x0 pushl $221 80106254: 68 dd 00 00 00 push $0xdd jmp alltraps 80106259: e9 8f f2 ff ff jmp 801054ed <alltraps> 8010625e <vector222>: .globl vector222 vector222: pushl $0 8010625e: 6a 00 push $0x0 pushl $222 80106260: 68 de 00 00 00 push $0xde jmp alltraps 80106265: e9 83 f2 ff ff jmp 801054ed <alltraps> 8010626a <vector223>: .globl vector223 vector223: pushl $0 8010626a: 6a 00 push $0x0 pushl $223 8010626c: 68 df 00 00 00 push $0xdf jmp alltraps 80106271: e9 77 f2 ff ff jmp 801054ed <alltraps> 80106276 <vector224>: .globl vector224 vector224: pushl $0 80106276: 6a 00 push $0x0 pushl $224 80106278: 68 e0 00 00 00 push $0xe0 jmp alltraps 8010627d: e9 6b f2 ff ff jmp 801054ed <alltraps> 80106282 <vector225>: .globl vector225 vector225: pushl $0 80106282: 6a 00 push $0x0 pushl $225 80106284: 68 e1 00 00 00 push $0xe1 jmp alltraps 80106289: e9 5f f2 ff ff jmp 801054ed <alltraps> 8010628e <vector226>: .globl vector226 vector226: pushl $0 8010628e: 6a 00 push $0x0 pushl $226 80106290: 68 e2 00 00 00 push $0xe2 jmp alltraps 80106295: e9 53 f2 ff ff jmp 801054ed <alltraps> 8010629a <vector227>: .globl vector227 vector227: pushl $0 8010629a: 6a 00 push $0x0 pushl $227 8010629c: 68 e3 00 00 00 push $0xe3 jmp alltraps 801062a1: e9 47 f2 ff ff jmp 801054ed <alltraps> 801062a6 <vector228>: .globl vector228 vector228: pushl $0 801062a6: 6a 00 push $0x0 pushl $228 801062a8: 68 e4 00 00 00 push $0xe4 jmp alltraps 801062ad: e9 3b f2 ff ff jmp 801054ed <alltraps> 801062b2 <vector229>: .globl vector229 vector229: pushl $0 801062b2: 6a 00 push $0x0 pushl $229 801062b4: 68 e5 00 00 00 push $0xe5 jmp alltraps 801062b9: e9 2f f2 ff ff jmp 801054ed <alltraps> 801062be <vector230>: .globl vector230 vector230: pushl $0 801062be: 6a 00 push $0x0 pushl $230 801062c0: 68 e6 00 00 00 push $0xe6 jmp alltraps 801062c5: e9 23 f2 ff ff jmp 801054ed <alltraps> 801062ca <vector231>: .globl vector231 vector231: pushl $0 801062ca: 6a 00 push $0x0 pushl $231 801062cc: 68 e7 00 00 00 push $0xe7 jmp alltraps 801062d1: e9 17 f2 ff ff jmp 801054ed <alltraps> 801062d6 <vector232>: .globl vector232 vector232: pushl $0 801062d6: 6a 00 push $0x0 pushl $232 801062d8: 68 e8 00 00 00 push $0xe8 jmp alltraps 801062dd: e9 0b f2 ff ff jmp 801054ed <alltraps> 801062e2 <vector233>: .globl vector233 vector233: pushl $0 801062e2: 6a 00 push $0x0 pushl $233 801062e4: 68 e9 00 00 00 push $0xe9 jmp alltraps 801062e9: e9 ff f1 ff ff jmp 801054ed <alltraps> 801062ee <vector234>: .globl vector234 vector234: pushl $0 801062ee: 6a 00 push $0x0 pushl $234 801062f0: 68 ea 00 00 00 push $0xea jmp alltraps 801062f5: e9 f3 f1 ff ff jmp 801054ed <alltraps> 801062fa <vector235>: .globl vector235 vector235: pushl $0 801062fa: 6a 00 push $0x0 pushl $235 801062fc: 68 eb 00 00 00 push $0xeb jmp alltraps 80106301: e9 e7 f1 ff ff jmp 801054ed <alltraps> 80106306 <vector236>: .globl vector236 vector236: pushl $0 80106306: 6a 00 push $0x0 pushl $236 80106308: 68 ec 00 00 00 push $0xec jmp alltraps 8010630d: e9 db f1 ff ff jmp 801054ed <alltraps> 80106312 <vector237>: .globl vector237 vector237: pushl $0 80106312: 6a 00 push $0x0 pushl $237 80106314: 68 ed 00 00 00 push $0xed jmp alltraps 80106319: e9 cf f1 ff ff jmp 801054ed <alltraps> 8010631e <vector238>: .globl vector238 vector238: pushl $0 8010631e: 6a 00 push $0x0 pushl $238 80106320: 68 ee 00 00 00 push $0xee jmp alltraps 80106325: e9 c3 f1 ff ff jmp 801054ed <alltraps> 8010632a <vector239>: .globl vector239 vector239: pushl $0 8010632a: 6a 00 push $0x0 pushl $239 8010632c: 68 ef 00 00 00 push $0xef jmp alltraps 80106331: e9 b7 f1 ff ff jmp 801054ed <alltraps> 80106336 <vector240>: .globl vector240 vector240: pushl $0 80106336: 6a 00 push $0x0 pushl $240 80106338: 68 f0 00 00 00 push $0xf0 jmp alltraps 8010633d: e9 ab f1 ff ff jmp 801054ed <alltraps> 80106342 <vector241>: .globl vector241 vector241: pushl $0 80106342: 6a 00 push $0x0 pushl $241 80106344: 68 f1 00 00 00 push $0xf1 jmp alltraps 80106349: e9 9f f1 ff ff jmp 801054ed <alltraps> 8010634e <vector242>: .globl vector242 vector242: pushl $0 8010634e: 6a 00 push $0x0 pushl $242 80106350: 68 f2 00 00 00 push $0xf2 jmp alltraps 80106355: e9 93 f1 ff ff jmp 801054ed <alltraps> 8010635a <vector243>: .globl vector243 vector243: pushl $0 8010635a: 6a 00 push $0x0 pushl $243 8010635c: 68 f3 00 00 00 push $0xf3 jmp alltraps 80106361: e9 87 f1 ff ff jmp 801054ed <alltraps> 80106366 <vector244>: .globl vector244 vector244: pushl $0 80106366: 6a 00 push $0x0 pushl $244 80106368: 68 f4 00 00 00 push $0xf4 jmp alltraps 8010636d: e9 7b f1 ff ff jmp 801054ed <alltraps> 80106372 <vector245>: .globl vector245 vector245: pushl $0 80106372: 6a 00 push $0x0 pushl $245 80106374: 68 f5 00 00 00 push $0xf5 jmp alltraps 80106379: e9 6f f1 ff ff jmp 801054ed <alltraps> 8010637e <vector246>: .globl vector246 vector246: pushl $0 8010637e: 6a 00 push $0x0 pushl $246 80106380: 68 f6 00 00 00 push $0xf6 jmp alltraps 80106385: e9 63 f1 ff ff jmp 801054ed <alltraps> 8010638a <vector247>: .globl vector247 vector247: pushl $0 8010638a: 6a 00 push $0x0 pushl $247 8010638c: 68 f7 00 00 00 push $0xf7 jmp alltraps 80106391: e9 57 f1 ff ff jmp 801054ed <alltraps> 80106396 <vector248>: .globl vector248 vector248: pushl $0 80106396: 6a 00 push $0x0 pushl $248 80106398: 68 f8 00 00 00 push $0xf8 jmp alltraps 8010639d: e9 4b f1 ff ff jmp 801054ed <alltraps> 801063a2 <vector249>: .globl vector249 vector249: pushl $0 801063a2: 6a 00 push $0x0 pushl $249 801063a4: 68 f9 00 00 00 push $0xf9 jmp alltraps 801063a9: e9 3f f1 ff ff jmp 801054ed <alltraps> 801063ae <vector250>: .globl vector250 vector250: pushl $0 801063ae: 6a 00 push $0x0 pushl $250 801063b0: 68 fa 00 00 00 push $0xfa jmp alltraps 801063b5: e9 33 f1 ff ff jmp 801054ed <alltraps> 801063ba <vector251>: .globl vector251 vector251: pushl $0 801063ba: 6a 00 push $0x0 pushl $251 801063bc: 68 fb 00 00 00 push $0xfb jmp alltraps 801063c1: e9 27 f1 ff ff jmp 801054ed <alltraps> 801063c6 <vector252>: .globl vector252 vector252: pushl $0 801063c6: 6a 00 push $0x0 pushl $252 801063c8: 68 fc 00 00 00 push $0xfc jmp alltraps 801063cd: e9 1b f1 ff ff jmp 801054ed <alltraps> 801063d2 <vector253>: .globl vector253 vector253: pushl $0 801063d2: 6a 00 push $0x0 pushl $253 801063d4: 68 fd 00 00 00 push $0xfd jmp alltraps 801063d9: e9 0f f1 ff ff jmp 801054ed <alltraps> 801063de <vector254>: .globl vector254 vector254: pushl $0 801063de: 6a 00 push $0x0 pushl $254 801063e0: 68 fe 00 00 00 push $0xfe jmp alltraps 801063e5: e9 03 f1 ff ff jmp 801054ed <alltraps> 801063ea <vector255>: .globl vector255 vector255: pushl $0 801063ea: 6a 00 push $0x0 pushl $255 801063ec: 68 ff 00 00 00 push $0xff jmp alltraps 801063f1: e9 f7 f0 ff ff jmp 801054ed <alltraps> 801063f6: 66 90 xchg %ax,%ax 801063f8: 66 90 xchg %ax,%ax 801063fa: 66 90 xchg %ax,%ax 801063fc: 66 90 xchg %ax,%ax 801063fe: 66 90 xchg %ax,%ax 80106400 <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) { 80106400: 55 push %ebp 80106401: 89 e5 mov %esp,%ebp 80106403: 57 push %edi 80106404: 56 push %esi 80106405: 89 d6 mov %edx,%esi pde_t *pde; pte_t *pgtab; pde = &pgdir[PDX(va)]; 80106407: c1 ea 16 shr $0x16,%edx { 8010640a: 53 push %ebx pde = &pgdir[PDX(va)]; 8010640b: 8d 3c 90 lea (%eax,%edx,4),%edi { 8010640e: 83 ec 1c sub $0x1c,%esp if(*pde & PTE_P){ 80106411: 8b 1f mov (%edi),%ebx 80106413: f6 c3 01 test $0x1,%bl 80106416: 74 28 je 80106440 <walkpgdir+0x40> pgtab = (pte_t*)P2V(PTE_ADDR(*pde)); 80106418: 81 e3 00 f0 ff ff and $0xfffff000,%ebx 8010641e: 81 c3 00 00 00 80 add $0x80000000,%ebx // The permissions here are overly generous, but they can // be further restricted by the permissions in the page table // entries, if necessary. *pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U; } return &pgtab[PTX(va)]; 80106424: c1 ee 0a shr $0xa,%esi } 80106427: 83 c4 1c add $0x1c,%esp return &pgtab[PTX(va)]; 8010642a: 89 f2 mov %esi,%edx 8010642c: 81 e2 fc 0f 00 00 and $0xffc,%edx 80106432: 8d 04 13 lea (%ebx,%edx,1),%eax } 80106435: 5b pop %ebx 80106436: 5e pop %esi 80106437: 5f pop %edi 80106438: 5d pop %ebp 80106439: c3 ret 8010643a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(!alloc || (pgtab = (pte_t*)kalloc()) == 0) 80106440: 85 c9 test %ecx,%ecx 80106442: 74 34 je 80106478 <walkpgdir+0x78> 80106444: e8 97 c0 ff ff call 801024e0 <kalloc> 80106449: 85 c0 test %eax,%eax 8010644b: 89 c3 mov %eax,%ebx 8010644d: 74 29 je 80106478 <walkpgdir+0x78> memset(pgtab, 0, PGSIZE); 8010644f: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106456: 00 80106457: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010645e: 00 8010645f: 89 04 24 mov %eax,(%esp) 80106462: e8 89 de ff ff call 801042f0 <memset> *pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U; 80106467: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 8010646d: 83 c8 07 or $0x7,%eax 80106470: 89 07 mov %eax,(%edi) 80106472: eb b0 jmp 80106424 <walkpgdir+0x24> 80106474: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi } 80106478: 83 c4 1c add $0x1c,%esp return 0; 8010647b: 31 c0 xor %eax,%eax } 8010647d: 5b pop %ebx 8010647e: 5e pop %esi 8010647f: 5f pop %edi 80106480: 5d pop %ebp 80106481: c3 ret 80106482: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106489: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106490 <deallocuvm.part.0>: // Deallocate user pages to bring the process size from oldsz to // newsz. oldsz and newsz need not be page-aligned, nor does newsz // need to be less than oldsz. oldsz can be larger than the actual // process size. Returns the new process size. int deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) 80106490: 55 push %ebp 80106491: 89 e5 mov %esp,%ebp 80106493: 57 push %edi 80106494: 89 c7 mov %eax,%edi 80106496: 56 push %esi 80106497: 89 d6 mov %edx,%esi 80106499: 53 push %ebx uint a, pa; if(newsz >= oldsz) return oldsz; a = PGROUNDUP(newsz); 8010649a: 8d 99 ff 0f 00 00 lea 0xfff(%ecx),%ebx deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) 801064a0: 83 ec 1c sub $0x1c,%esp a = PGROUNDUP(newsz); 801064a3: 81 e3 00 f0 ff ff and $0xfffff000,%ebx for(; a < oldsz; a += PGSIZE){ 801064a9: 39 d3 cmp %edx,%ebx deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) 801064ab: 89 4d e0 mov %ecx,-0x20(%ebp) for(; a < oldsz; a += PGSIZE){ 801064ae: 72 3b jb 801064eb <deallocuvm.part.0+0x5b> 801064b0: eb 5e jmp 80106510 <deallocuvm.part.0+0x80> 801064b2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi pte = walkpgdir(pgdir, (char*)a, 0); if(!pte) a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE; else if((*pte & PTE_P) != 0){ 801064b8: 8b 10 mov (%eax),%edx 801064ba: f6 c2 01 test $0x1,%dl 801064bd: 74 22 je 801064e1 <deallocuvm.part.0+0x51> pa = PTE_ADDR(*pte); if(pa == 0) 801064bf: 81 e2 00 f0 ff ff and $0xfffff000,%edx 801064c5: 74 54 je 8010651b <deallocuvm.part.0+0x8b> panic("kfree"); char *v = P2V(pa); 801064c7: 81 c2 00 00 00 80 add $0x80000000,%edx kfree(v); 801064cd: 89 14 24 mov %edx,(%esp) 801064d0: 89 45 e4 mov %eax,-0x1c(%ebp) 801064d3: e8 58 be ff ff call 80102330 <kfree> *pte = 0; 801064d8: 8b 45 e4 mov -0x1c(%ebp),%eax 801064db: c7 00 00 00 00 00 movl $0x0,(%eax) for(; a < oldsz; a += PGSIZE){ 801064e1: 81 c3 00 10 00 00 add $0x1000,%ebx 801064e7: 39 f3 cmp %esi,%ebx 801064e9: 73 25 jae 80106510 <deallocuvm.part.0+0x80> pte = walkpgdir(pgdir, (char*)a, 0); 801064eb: 31 c9 xor %ecx,%ecx 801064ed: 89 da mov %ebx,%edx 801064ef: 89 f8 mov %edi,%eax 801064f1: e8 0a ff ff ff call 80106400 <walkpgdir> if(!pte) 801064f6: 85 c0 test %eax,%eax 801064f8: 75 be jne 801064b8 <deallocuvm.part.0+0x28> a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE; 801064fa: 81 e3 00 00 c0 ff and $0xffc00000,%ebx 80106500: 81 c3 00 f0 3f 00 add $0x3ff000,%ebx for(; a < oldsz; a += PGSIZE){ 80106506: 81 c3 00 10 00 00 add $0x1000,%ebx 8010650c: 39 f3 cmp %esi,%ebx 8010650e: 72 db jb 801064eb <deallocuvm.part.0+0x5b> } } return newsz; } 80106510: 8b 45 e0 mov -0x20(%ebp),%eax 80106513: 83 c4 1c add $0x1c,%esp 80106516: 5b pop %ebx 80106517: 5e pop %esi 80106518: 5f pop %edi 80106519: 5d pop %ebp 8010651a: c3 ret panic("kfree"); 8010651b: c7 04 24 e6 70 10 80 movl $0x801070e6,(%esp) 80106522: e8 39 9e ff ff call 80100360 <panic> 80106527: 89 f6 mov %esi,%esi 80106529: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106530 <seginit>: { 80106530: 55 push %ebp 80106531: 89 e5 mov %esp,%ebp 80106533: 83 ec 18 sub $0x18,%esp c = &cpus[cpuid()]; 80106536: e8 85 d1 ff ff call 801036c0 <cpuid> c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 8010653b: 31 c9 xor %ecx,%ecx 8010653d: ba ff ff ff ff mov $0xffffffff,%edx c = &cpus[cpuid()]; 80106542: 69 c0 b0 00 00 00 imul $0xb0,%eax,%eax 80106548: 05 80 27 11 80 add $0x80112780,%eax c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 8010654d: 66 89 50 78 mov %dx,0x78(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 80106551: ba ff ff ff ff mov $0xffffffff,%edx lgdt(c->gdt, sizeof(c->gdt)); 80106556: 83 c0 70 add $0x70,%eax c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 80106559: 66 89 48 0a mov %cx,0xa(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 8010655d: 31 c9 xor %ecx,%ecx 8010655f: 66 89 50 10 mov %dx,0x10(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 80106563: ba ff ff ff ff mov $0xffffffff,%edx c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 80106568: 66 89 48 12 mov %cx,0x12(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 8010656c: 31 c9 xor %ecx,%ecx 8010656e: 66 89 50 18 mov %dx,0x18(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 80106572: ba ff ff ff ff mov $0xffffffff,%edx c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 80106577: 66 89 48 1a mov %cx,0x1a(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 8010657b: 31 c9 xor %ecx,%ecx c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 8010657d: c6 40 0d 9a movb $0x9a,0xd(%eax) 80106581: c6 40 0e cf movb $0xcf,0xe(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 80106585: c6 40 15 92 movb $0x92,0x15(%eax) 80106589: c6 40 16 cf movb $0xcf,0x16(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 8010658d: c6 40 1d fa movb $0xfa,0x1d(%eax) 80106591: c6 40 1e cf movb $0xcf,0x1e(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 80106595: c6 40 25 f2 movb $0xf2,0x25(%eax) 80106599: c6 40 26 cf movb $0xcf,0x26(%eax) 8010659d: 66 89 50 20 mov %dx,0x20(%eax) pd[0] = size-1; 801065a1: ba 2f 00 00 00 mov $0x2f,%edx c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 801065a6: c6 40 0c 00 movb $0x0,0xc(%eax) 801065aa: c6 40 0f 00 movb $0x0,0xf(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 801065ae: c6 40 14 00 movb $0x0,0x14(%eax) 801065b2: c6 40 17 00 movb $0x0,0x17(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 801065b6: c6 40 1c 00 movb $0x0,0x1c(%eax) 801065ba: c6 40 1f 00 movb $0x0,0x1f(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 801065be: 66 89 48 22 mov %cx,0x22(%eax) 801065c2: c6 40 24 00 movb $0x0,0x24(%eax) 801065c6: c6 40 27 00 movb $0x0,0x27(%eax) 801065ca: 66 89 55 f2 mov %dx,-0xe(%ebp) pd[1] = (uint)p; 801065ce: 66 89 45 f4 mov %ax,-0xc(%ebp) pd[2] = (uint)p >> 16; 801065d2: c1 e8 10 shr $0x10,%eax 801065d5: 66 89 45 f6 mov %ax,-0xa(%ebp) asm volatile("lgdt (%0)" : : "r" (pd)); 801065d9: 8d 45 f2 lea -0xe(%ebp),%eax 801065dc: 0f 01 10 lgdtl (%eax) } 801065df: c9 leave 801065e0: c3 ret 801065e1: eb 0d jmp 801065f0 <mappages> 801065e3: 90 nop 801065e4: 90 nop 801065e5: 90 nop 801065e6: 90 nop 801065e7: 90 nop 801065e8: 90 nop 801065e9: 90 nop 801065ea: 90 nop 801065eb: 90 nop 801065ec: 90 nop 801065ed: 90 nop 801065ee: 90 nop 801065ef: 90 nop 801065f0 <mappages>: { 801065f0: 55 push %ebp 801065f1: 89 e5 mov %esp,%ebp 801065f3: 57 push %edi 801065f4: 56 push %esi 801065f5: 53 push %ebx 801065f6: 83 ec 1c sub $0x1c,%esp 801065f9: 8b 45 0c mov 0xc(%ebp),%eax last = (char*)PGROUNDDOWN(((uint)va) + size - 1); 801065fc: 8b 55 10 mov 0x10(%ebp),%edx { 801065ff: 8b 7d 14 mov 0x14(%ebp),%edi *pte = pa | perm | PTE_P; 80106602: 83 4d 18 01 orl $0x1,0x18(%ebp) a = (char*)PGROUNDDOWN((uint)va); 80106606: 89 c3 mov %eax,%ebx 80106608: 81 e3 00 f0 ff ff and $0xfffff000,%ebx last = (char*)PGROUNDDOWN(((uint)va) + size - 1); 8010660e: 8d 44 10 ff lea -0x1(%eax,%edx,1),%eax 80106612: 29 df sub %ebx,%edi 80106614: 89 45 e4 mov %eax,-0x1c(%ebp) 80106617: 81 65 e4 00 f0 ff ff andl $0xfffff000,-0x1c(%ebp) 8010661e: eb 15 jmp 80106635 <mappages+0x45> if(*pte & PTE_P) 80106620: f6 00 01 testb $0x1,(%eax) 80106623: 75 3d jne 80106662 <mappages+0x72> *pte = pa | perm | PTE_P; 80106625: 0b 75 18 or 0x18(%ebp),%esi if(a == last) 80106628: 3b 5d e4 cmp -0x1c(%ebp),%ebx *pte = pa | perm | PTE_P; 8010662b: 89 30 mov %esi,(%eax) if(a == last) 8010662d: 74 29 je 80106658 <mappages+0x68> a += PGSIZE; 8010662f: 81 c3 00 10 00 00 add $0x1000,%ebx if((pte = walkpgdir(pgdir, a, 1)) == 0) 80106635: 8b 45 08 mov 0x8(%ebp),%eax 80106638: b9 01 00 00 00 mov $0x1,%ecx 8010663d: 89 da mov %ebx,%edx 8010663f: 8d 34 3b lea (%ebx,%edi,1),%esi 80106642: e8 b9 fd ff ff call 80106400 <walkpgdir> 80106647: 85 c0 test %eax,%eax 80106649: 75 d5 jne 80106620 <mappages+0x30> } 8010664b: 83 c4 1c add $0x1c,%esp return -1; 8010664e: b8 ff ff ff ff mov $0xffffffff,%eax } 80106653: 5b pop %ebx 80106654: 5e pop %esi 80106655: 5f pop %edi 80106656: 5d pop %ebp 80106657: c3 ret 80106658: 83 c4 1c add $0x1c,%esp return 0; 8010665b: 31 c0 xor %eax,%eax } 8010665d: 5b pop %ebx 8010665e: 5e pop %esi 8010665f: 5f pop %edi 80106660: 5d pop %ebp 80106661: c3 ret panic("remap"); 80106662: c7 04 24 d0 77 10 80 movl $0x801077d0,(%esp) 80106669: e8 f2 9c ff ff call 80100360 <panic> 8010666e: 66 90 xchg %ax,%ax 80106670 <switchkvm>: lcr3(V2P(kpgdir)); // switch to the kernel page table 80106670: a1 a4 56 11 80 mov 0x801156a4,%eax { 80106675: 55 push %ebp 80106676: 89 e5 mov %esp,%ebp lcr3(V2P(kpgdir)); // switch to the kernel page table 80106678: 05 00 00 00 80 add $0x80000000,%eax } static inline void lcr3(uint val) { asm volatile("movl %0,%%cr3" : : "r" (val)); 8010667d: 0f 22 d8 mov %eax,%cr3 } 80106680: 5d pop %ebp 80106681: c3 ret 80106682: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106689: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106690 <switchuvm>: { 80106690: 55 push %ebp 80106691: 89 e5 mov %esp,%ebp 80106693: 57 push %edi 80106694: 56 push %esi 80106695: 53 push %ebx 80106696: 83 ec 1c sub $0x1c,%esp 80106699: 8b 75 08 mov 0x8(%ebp),%esi if(p == 0) 8010669c: 85 f6 test %esi,%esi 8010669e: 0f 84 cd 00 00 00 je 80106771 <switchuvm+0xe1> if(p->kstack == 0) 801066a4: 8b 46 08 mov 0x8(%esi),%eax 801066a7: 85 c0 test %eax,%eax 801066a9: 0f 84 da 00 00 00 je 80106789 <switchuvm+0xf9> if(p->pgdir == 0) 801066af: 8b 7e 04 mov 0x4(%esi),%edi 801066b2: 85 ff test %edi,%edi 801066b4: 0f 84 c3 00 00 00 je 8010677d <switchuvm+0xed> pushcli(); 801066ba: e8 b1 da ff ff call 80104170 <pushcli> mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts, 801066bf: e8 7c cf ff ff call 80103640 <mycpu> 801066c4: 89 c3 mov %eax,%ebx 801066c6: e8 75 cf ff ff call 80103640 <mycpu> 801066cb: 89 c7 mov %eax,%edi 801066cd: e8 6e cf ff ff call 80103640 <mycpu> 801066d2: 83 c7 08 add $0x8,%edi 801066d5: 89 45 e4 mov %eax,-0x1c(%ebp) 801066d8: e8 63 cf ff ff call 80103640 <mycpu> 801066dd: 8b 4d e4 mov -0x1c(%ebp),%ecx 801066e0: ba 67 00 00 00 mov $0x67,%edx 801066e5: 66 89 93 98 00 00 00 mov %dx,0x98(%ebx) 801066ec: 66 89 bb 9a 00 00 00 mov %di,0x9a(%ebx) 801066f3: c6 83 9d 00 00 00 99 movb $0x99,0x9d(%ebx) 801066fa: 83 c1 08 add $0x8,%ecx 801066fd: c1 e9 10 shr $0x10,%ecx 80106700: 83 c0 08 add $0x8,%eax 80106703: c1 e8 18 shr $0x18,%eax 80106706: 88 8b 9c 00 00 00 mov %cl,0x9c(%ebx) 8010670c: c6 83 9e 00 00 00 40 movb $0x40,0x9e(%ebx) 80106713: 88 83 9f 00 00 00 mov %al,0x9f(%ebx) mycpu()->ts.iomb = (ushort) 0xFFFF; 80106719: bb ff ff ff ff mov $0xffffffff,%ebx mycpu()->gdt[SEG_TSS].s = 0; 8010671e: e8 1d cf ff ff call 80103640 <mycpu> 80106723: 80 a0 9d 00 00 00 ef andb $0xef,0x9d(%eax) mycpu()->ts.ss0 = SEG_KDATA << 3; 8010672a: e8 11 cf ff ff call 80103640 <mycpu> 8010672f: b9 10 00 00 00 mov $0x10,%ecx 80106734: 66 89 48 10 mov %cx,0x10(%eax) mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE; 80106738: e8 03 cf ff ff call 80103640 <mycpu> 8010673d: 8b 56 08 mov 0x8(%esi),%edx 80106740: 8d 8a 00 10 00 00 lea 0x1000(%edx),%ecx 80106746: 89 48 0c mov %ecx,0xc(%eax) mycpu()->ts.iomb = (ushort) 0xFFFF; 80106749: e8 f2 ce ff ff call 80103640 <mycpu> 8010674e: 66 89 58 6e mov %bx,0x6e(%eax) asm volatile("ltr %0" : : "r" (sel)); 80106752: b8 28 00 00 00 mov $0x28,%eax 80106757: 0f 00 d8 ltr %ax lcr3(V2P(p->pgdir)); // switch to process's address space 8010675a: 8b 46 04 mov 0x4(%esi),%eax 8010675d: 05 00 00 00 80 add $0x80000000,%eax asm volatile("movl %0,%%cr3" : : "r" (val)); 80106762: 0f 22 d8 mov %eax,%cr3 } 80106765: 83 c4 1c add $0x1c,%esp 80106768: 5b pop %ebx 80106769: 5e pop %esi 8010676a: 5f pop %edi 8010676b: 5d pop %ebp popcli(); 8010676c: e9 bf da ff ff jmp 80104230 <popcli> panic("switchuvm: no process"); 80106771: c7 04 24 d6 77 10 80 movl $0x801077d6,(%esp) 80106778: e8 e3 9b ff ff call 80100360 <panic> panic("switchuvm: no pgdir"); 8010677d: c7 04 24 01 78 10 80 movl $0x80107801,(%esp) 80106784: e8 d7 9b ff ff call 80100360 <panic> panic("switchuvm: no kstack"); 80106789: c7 04 24 ec 77 10 80 movl $0x801077ec,(%esp) 80106790: e8 cb 9b ff ff call 80100360 <panic> 80106795: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106799: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801067a0 <inituvm>: { 801067a0: 55 push %ebp 801067a1: 89 e5 mov %esp,%ebp 801067a3: 57 push %edi 801067a4: 56 push %esi 801067a5: 53 push %ebx 801067a6: 83 ec 2c sub $0x2c,%esp 801067a9: 8b 75 10 mov 0x10(%ebp),%esi 801067ac: 8b 55 08 mov 0x8(%ebp),%edx 801067af: 8b 7d 0c mov 0xc(%ebp),%edi if(sz >= PGSIZE) 801067b2: 81 fe ff 0f 00 00 cmp $0xfff,%esi 801067b8: 77 64 ja 8010681e <inituvm+0x7e> 801067ba: 89 55 e4 mov %edx,-0x1c(%ebp) mem = kalloc(); 801067bd: e8 1e bd ff ff call 801024e0 <kalloc> memset(mem, 0, PGSIZE); 801067c2: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801067c9: 00 801067ca: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801067d1: 00 801067d2: 89 04 24 mov %eax,(%esp) mem = kalloc(); 801067d5: 89 c3 mov %eax,%ebx memset(mem, 0, PGSIZE); 801067d7: e8 14 db ff ff call 801042f0 <memset> mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U); 801067dc: 8b 55 e4 mov -0x1c(%ebp),%edx 801067df: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 801067e5: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp) 801067ec: 00 801067ed: 89 44 24 0c mov %eax,0xc(%esp) 801067f1: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801067f8: 00 801067f9: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106800: 00 80106801: 89 14 24 mov %edx,(%esp) 80106804: e8 e7 fd ff ff call 801065f0 <mappages> memmove(mem, init, sz); 80106809: 89 75 10 mov %esi,0x10(%ebp) 8010680c: 89 7d 0c mov %edi,0xc(%ebp) 8010680f: 89 5d 08 mov %ebx,0x8(%ebp) } 80106812: 83 c4 2c add $0x2c,%esp 80106815: 5b pop %ebx 80106816: 5e pop %esi 80106817: 5f pop %edi 80106818: 5d pop %ebp memmove(mem, init, sz); 80106819: e9 72 db ff ff jmp 80104390 <memmove> panic("inituvm: more than a page"); 8010681e: c7 04 24 15 78 10 80 movl $0x80107815,(%esp) 80106825: e8 36 9b ff ff call 80100360 <panic> 8010682a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106830 <loaduvm>: { 80106830: 55 push %ebp 80106831: 89 e5 mov %esp,%ebp 80106833: 57 push %edi 80106834: 56 push %esi 80106835: 53 push %ebx 80106836: 83 ec 1c sub $0x1c,%esp if((uint) addr % PGSIZE != 0) 80106839: f7 45 0c ff 0f 00 00 testl $0xfff,0xc(%ebp) 80106840: 0f 85 98 00 00 00 jne 801068de <loaduvm+0xae> for(i = 0; i < sz; i += PGSIZE){ 80106846: 8b 75 18 mov 0x18(%ebp),%esi 80106849: 31 db xor %ebx,%ebx 8010684b: 85 f6 test %esi,%esi 8010684d: 75 1a jne 80106869 <loaduvm+0x39> 8010684f: eb 77 jmp 801068c8 <loaduvm+0x98> 80106851: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106858: 81 c3 00 10 00 00 add $0x1000,%ebx 8010685e: 81 ee 00 10 00 00 sub $0x1000,%esi 80106864: 39 5d 18 cmp %ebx,0x18(%ebp) 80106867: 76 5f jbe 801068c8 <loaduvm+0x98> 80106869: 8b 55 0c mov 0xc(%ebp),%edx if((pte = walkpgdir(pgdir, addr+i, 0)) == 0) 8010686c: 31 c9 xor %ecx,%ecx 8010686e: 8b 45 08 mov 0x8(%ebp),%eax 80106871: 01 da add %ebx,%edx 80106873: e8 88 fb ff ff call 80106400 <walkpgdir> 80106878: 85 c0 test %eax,%eax 8010687a: 74 56 je 801068d2 <loaduvm+0xa2> pa = PTE_ADDR(*pte); 8010687c: 8b 00 mov (%eax),%eax n = PGSIZE; 8010687e: bf 00 10 00 00 mov $0x1000,%edi 80106883: 8b 4d 14 mov 0x14(%ebp),%ecx pa = PTE_ADDR(*pte); 80106886: 25 00 f0 ff ff and $0xfffff000,%eax n = PGSIZE; 8010688b: 81 fe 00 10 00 00 cmp $0x1000,%esi 80106891: 0f 42 fe cmovb %esi,%edi if(readi(ip, P2V(pa), offset+i, n) != n) 80106894: 05 00 00 00 80 add $0x80000000,%eax 80106899: 89 44 24 04 mov %eax,0x4(%esp) 8010689d: 8b 45 10 mov 0x10(%ebp),%eax 801068a0: 01 d9 add %ebx,%ecx 801068a2: 89 7c 24 0c mov %edi,0xc(%esp) 801068a6: 89 4c 24 08 mov %ecx,0x8(%esp) 801068aa: 89 04 24 mov %eax,(%esp) 801068ad: e8 ee b0 ff ff call 801019a0 <readi> 801068b2: 39 f8 cmp %edi,%eax 801068b4: 74 a2 je 80106858 <loaduvm+0x28> } 801068b6: 83 c4 1c add $0x1c,%esp return -1; 801068b9: b8 ff ff ff ff mov $0xffffffff,%eax } 801068be: 5b pop %ebx 801068bf: 5e pop %esi 801068c0: 5f pop %edi 801068c1: 5d pop %ebp 801068c2: c3 ret 801068c3: 90 nop 801068c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801068c8: 83 c4 1c add $0x1c,%esp return 0; 801068cb: 31 c0 xor %eax,%eax } 801068cd: 5b pop %ebx 801068ce: 5e pop %esi 801068cf: 5f pop %edi 801068d0: 5d pop %ebp 801068d1: c3 ret panic("loaduvm: address should exist"); 801068d2: c7 04 24 2f 78 10 80 movl $0x8010782f,(%esp) 801068d9: e8 82 9a ff ff call 80100360 <panic> panic("loaduvm: addr must be page aligned"); 801068de: c7 04 24 d0 78 10 80 movl $0x801078d0,(%esp) 801068e5: e8 76 9a ff ff call 80100360 <panic> 801068ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801068f0 <allocuvm>: { 801068f0: 55 push %ebp 801068f1: 89 e5 mov %esp,%ebp 801068f3: 57 push %edi 801068f4: 56 push %esi 801068f5: 53 push %ebx 801068f6: 83 ec 2c sub $0x2c,%esp 801068f9: 8b 7d 10 mov 0x10(%ebp),%edi if(newsz >= KERNBASE) 801068fc: 85 ff test %edi,%edi 801068fe: 0f 88 8f 00 00 00 js 80106993 <allocuvm+0xa3> if(newsz < oldsz) 80106904: 3b 7d 0c cmp 0xc(%ebp),%edi return oldsz; 80106907: 8b 45 0c mov 0xc(%ebp),%eax if(newsz < oldsz) 8010690a: 0f 82 85 00 00 00 jb 80106995 <allocuvm+0xa5> a = PGROUNDUP(oldsz); 80106910: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx 80106916: 81 e3 00 f0 ff ff and $0xfffff000,%ebx for(; a < newsz; a += PGSIZE){ 8010691c: 39 df cmp %ebx,%edi 8010691e: 77 57 ja 80106977 <allocuvm+0x87> 80106920: eb 7e jmp 801069a0 <allocuvm+0xb0> 80106922: 8d b6 00 00 00 00 lea 0x0(%esi),%esi memset(mem, 0, PGSIZE); 80106928: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010692f: 00 80106930: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106937: 00 80106938: 89 04 24 mov %eax,(%esp) 8010693b: e8 b0 d9 ff ff call 801042f0 <memset> if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){ 80106940: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax 80106946: 89 44 24 0c mov %eax,0xc(%esp) 8010694a: 8b 45 08 mov 0x8(%ebp),%eax 8010694d: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp) 80106954: 00 80106955: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010695c: 00 8010695d: 89 5c 24 04 mov %ebx,0x4(%esp) 80106961: 89 04 24 mov %eax,(%esp) 80106964: e8 87 fc ff ff call 801065f0 <mappages> 80106969: 85 c0 test %eax,%eax 8010696b: 78 43 js 801069b0 <allocuvm+0xc0> for(; a < newsz; a += PGSIZE){ 8010696d: 81 c3 00 10 00 00 add $0x1000,%ebx 80106973: 39 df cmp %ebx,%edi 80106975: 76 29 jbe 801069a0 <allocuvm+0xb0> mem = kalloc(); 80106977: e8 64 bb ff ff call 801024e0 <kalloc> if(mem == 0){ 8010697c: 85 c0 test %eax,%eax mem = kalloc(); 8010697e: 89 c6 mov %eax,%esi if(mem == 0){ 80106980: 75 a6 jne 80106928 <allocuvm+0x38> cprintf("allocuvm out of memory\n"); 80106982: c7 04 24 4d 78 10 80 movl $0x8010784d,(%esp) 80106989: e8 c2 9c ff ff call 80100650 <cprintf> if(newsz >= oldsz) 8010698e: 3b 7d 0c cmp 0xc(%ebp),%edi 80106991: 77 47 ja 801069da <allocuvm+0xea> return 0; 80106993: 31 c0 xor %eax,%eax } 80106995: 83 c4 2c add $0x2c,%esp 80106998: 5b pop %ebx 80106999: 5e pop %esi 8010699a: 5f pop %edi 8010699b: 5d pop %ebp 8010699c: c3 ret 8010699d: 8d 76 00 lea 0x0(%esi),%esi 801069a0: 83 c4 2c add $0x2c,%esp 801069a3: 89 f8 mov %edi,%eax 801069a5: 5b pop %ebx 801069a6: 5e pop %esi 801069a7: 5f pop %edi 801069a8: 5d pop %ebp 801069a9: c3 ret 801069aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cprintf("allocuvm out of memory (2)\n"); 801069b0: c7 04 24 65 78 10 80 movl $0x80107865,(%esp) 801069b7: e8 94 9c ff ff call 80100650 <cprintf> if(newsz >= oldsz) 801069bc: 3b 7d 0c cmp 0xc(%ebp),%edi 801069bf: 76 0d jbe 801069ce <allocuvm+0xde> 801069c1: 8b 4d 0c mov 0xc(%ebp),%ecx 801069c4: 89 fa mov %edi,%edx 801069c6: 8b 45 08 mov 0x8(%ebp),%eax 801069c9: e8 c2 fa ff ff call 80106490 <deallocuvm.part.0> kfree(mem); 801069ce: 89 34 24 mov %esi,(%esp) 801069d1: e8 5a b9 ff ff call 80102330 <kfree> return 0; 801069d6: 31 c0 xor %eax,%eax 801069d8: eb bb jmp 80106995 <allocuvm+0xa5> 801069da: 8b 4d 0c mov 0xc(%ebp),%ecx 801069dd: 89 fa mov %edi,%edx 801069df: 8b 45 08 mov 0x8(%ebp),%eax 801069e2: e8 a9 fa ff ff call 80106490 <deallocuvm.part.0> return 0; 801069e7: 31 c0 xor %eax,%eax 801069e9: eb aa jmp 80106995 <allocuvm+0xa5> 801069eb: 90 nop 801069ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801069f0 <deallocuvm>: { 801069f0: 55 push %ebp 801069f1: 89 e5 mov %esp,%ebp 801069f3: 8b 55 0c mov 0xc(%ebp),%edx 801069f6: 8b 4d 10 mov 0x10(%ebp),%ecx 801069f9: 8b 45 08 mov 0x8(%ebp),%eax if(newsz >= oldsz) 801069fc: 39 d1 cmp %edx,%ecx 801069fe: 73 08 jae 80106a08 <deallocuvm+0x18> } 80106a00: 5d pop %ebp 80106a01: e9 8a fa ff ff jmp 80106490 <deallocuvm.part.0> 80106a06: 66 90 xchg %ax,%ax 80106a08: 89 d0 mov %edx,%eax 80106a0a: 5d pop %ebp 80106a0b: c3 ret 80106a0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106a10 <freevm>: // Free a page table and all the physical memory pages // in the user part. void freevm(pde_t *pgdir) { 80106a10: 55 push %ebp 80106a11: 89 e5 mov %esp,%ebp 80106a13: 56 push %esi 80106a14: 53 push %ebx 80106a15: 83 ec 10 sub $0x10,%esp 80106a18: 8b 75 08 mov 0x8(%ebp),%esi uint i; if(pgdir == 0) 80106a1b: 85 f6 test %esi,%esi 80106a1d: 74 59 je 80106a78 <freevm+0x68> 80106a1f: 31 c9 xor %ecx,%ecx 80106a21: ba 00 00 00 80 mov $0x80000000,%edx 80106a26: 89 f0 mov %esi,%eax panic("freevm: no pgdir"); deallocuvm(pgdir, KERNBASE, 0); for(i = 0; i < NPDENTRIES; i++){ 80106a28: 31 db xor %ebx,%ebx 80106a2a: e8 61 fa ff ff call 80106490 <deallocuvm.part.0> 80106a2f: eb 12 jmp 80106a43 <freevm+0x33> 80106a31: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106a38: 83 c3 01 add $0x1,%ebx 80106a3b: 81 fb 00 04 00 00 cmp $0x400,%ebx 80106a41: 74 27 je 80106a6a <freevm+0x5a> if(pgdir[i] & PTE_P){ 80106a43: 8b 14 9e mov (%esi,%ebx,4),%edx 80106a46: f6 c2 01 test $0x1,%dl 80106a49: 74 ed je 80106a38 <freevm+0x28> char * v = P2V(PTE_ADDR(pgdir[i])); 80106a4b: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(i = 0; i < NPDENTRIES; i++){ 80106a51: 83 c3 01 add $0x1,%ebx char * v = P2V(PTE_ADDR(pgdir[i])); 80106a54: 81 c2 00 00 00 80 add $0x80000000,%edx kfree(v); 80106a5a: 89 14 24 mov %edx,(%esp) 80106a5d: e8 ce b8 ff ff call 80102330 <kfree> for(i = 0; i < NPDENTRIES; i++){ 80106a62: 81 fb 00 04 00 00 cmp $0x400,%ebx 80106a68: 75 d9 jne 80106a43 <freevm+0x33> } } kfree((char*)pgdir); 80106a6a: 89 75 08 mov %esi,0x8(%ebp) } 80106a6d: 83 c4 10 add $0x10,%esp 80106a70: 5b pop %ebx 80106a71: 5e pop %esi 80106a72: 5d pop %ebp kfree((char*)pgdir); 80106a73: e9 b8 b8 ff ff jmp 80102330 <kfree> panic("freevm: no pgdir"); 80106a78: c7 04 24 81 78 10 80 movl $0x80107881,(%esp) 80106a7f: e8 dc 98 ff ff call 80100360 <panic> 80106a84: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106a8a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80106a90 <setupkvm>: { 80106a90: 55 push %ebp 80106a91: 89 e5 mov %esp,%ebp 80106a93: 56 push %esi 80106a94: 53 push %ebx 80106a95: 83 ec 20 sub $0x20,%esp if((pgdir = (pde_t*)kalloc()) == 0) 80106a98: e8 43 ba ff ff call 801024e0 <kalloc> 80106a9d: 85 c0 test %eax,%eax 80106a9f: 89 c6 mov %eax,%esi 80106aa1: 74 75 je 80106b18 <setupkvm+0x88> memset(pgdir, 0, PGSIZE); 80106aa3: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106aaa: 00 for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 80106aab: bb 20 a4 10 80 mov $0x8010a420,%ebx memset(pgdir, 0, PGSIZE); 80106ab0: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106ab7: 00 80106ab8: 89 04 24 mov %eax,(%esp) 80106abb: e8 30 d8 ff ff call 801042f0 <memset> if(mappages(pgdir, k->virt, k->phys_end - k->phys_start, 80106ac0: 8b 53 0c mov 0xc(%ebx),%edx 80106ac3: 8b 43 04 mov 0x4(%ebx),%eax 80106ac6: 89 34 24 mov %esi,(%esp) 80106ac9: 89 54 24 10 mov %edx,0x10(%esp) 80106acd: 8b 53 08 mov 0x8(%ebx),%edx 80106ad0: 89 44 24 0c mov %eax,0xc(%esp) 80106ad4: 29 c2 sub %eax,%edx 80106ad6: 8b 03 mov (%ebx),%eax 80106ad8: 89 54 24 08 mov %edx,0x8(%esp) 80106adc: 89 44 24 04 mov %eax,0x4(%esp) 80106ae0: e8 0b fb ff ff call 801065f0 <mappages> 80106ae5: 85 c0 test %eax,%eax 80106ae7: 78 17 js 80106b00 <setupkvm+0x70> for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 80106ae9: 83 c3 10 add $0x10,%ebx 80106aec: 81 fb 60 a4 10 80 cmp $0x8010a460,%ebx 80106af2: 72 cc jb 80106ac0 <setupkvm+0x30> 80106af4: 89 f0 mov %esi,%eax } 80106af6: 83 c4 20 add $0x20,%esp 80106af9: 5b pop %ebx 80106afa: 5e pop %esi 80106afb: 5d pop %ebp 80106afc: c3 ret 80106afd: 8d 76 00 lea 0x0(%esi),%esi freevm(pgdir); 80106b00: 89 34 24 mov %esi,(%esp) 80106b03: e8 08 ff ff ff call 80106a10 <freevm> } 80106b08: 83 c4 20 add $0x20,%esp return 0; 80106b0b: 31 c0 xor %eax,%eax } 80106b0d: 5b pop %ebx 80106b0e: 5e pop %esi 80106b0f: 5d pop %ebp 80106b10: c3 ret 80106b11: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80106b18: 31 c0 xor %eax,%eax 80106b1a: eb da jmp 80106af6 <setupkvm+0x66> 80106b1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106b20 <kvmalloc>: { 80106b20: 55 push %ebp 80106b21: 89 e5 mov %esp,%ebp 80106b23: 83 ec 08 sub $0x8,%esp kpgdir = setupkvm(); 80106b26: e8 65 ff ff ff call 80106a90 <setupkvm> 80106b2b: a3 a4 56 11 80 mov %eax,0x801156a4 lcr3(V2P(kpgdir)); // switch to the kernel page table 80106b30: 05 00 00 00 80 add $0x80000000,%eax 80106b35: 0f 22 d8 mov %eax,%cr3 } 80106b38: c9 leave 80106b39: c3 ret 80106b3a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106b40 <clearpteu>: // Clear PTE_U on a page. Used to create an inaccessible // page beneath the user stack. void clearpteu(pde_t *pgdir, char *uva) { 80106b40: 55 push %ebp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 80106b41: 31 c9 xor %ecx,%ecx { 80106b43: 89 e5 mov %esp,%ebp 80106b45: 83 ec 18 sub $0x18,%esp pte = walkpgdir(pgdir, uva, 0); 80106b48: 8b 55 0c mov 0xc(%ebp),%edx 80106b4b: 8b 45 08 mov 0x8(%ebp),%eax 80106b4e: e8 ad f8 ff ff call 80106400 <walkpgdir> if(pte == 0) 80106b53: 85 c0 test %eax,%eax 80106b55: 74 05 je 80106b5c <clearpteu+0x1c> panic("clearpteu"); *pte &= ~PTE_U; 80106b57: 83 20 fb andl $0xfffffffb,(%eax) } 80106b5a: c9 leave 80106b5b: c3 ret panic("clearpteu"); 80106b5c: c7 04 24 92 78 10 80 movl $0x80107892,(%esp) 80106b63: e8 f8 97 ff ff call 80100360 <panic> 80106b68: 90 nop 80106b69: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106b70 <copyuvm>: // Given a parent process's page table, create a copy // of it for a child. pde_t* copyuvm(pde_t *pgdir, uint sz) { 80106b70: 55 push %ebp 80106b71: 89 e5 mov %esp,%ebp 80106b73: 57 push %edi 80106b74: 56 push %esi 80106b75: 53 push %ebx 80106b76: 83 ec 2c sub $0x2c,%esp pde_t *d; pte_t *pte; uint pa, i, flags; char *mem; if((d = setupkvm()) == 0) 80106b79: e8 12 ff ff ff call 80106a90 <setupkvm> 80106b7e: 85 c0 test %eax,%eax 80106b80: 89 45 e0 mov %eax,-0x20(%ebp) 80106b83: 0f 84 86 01 00 00 je 80106d0f <copyuvm+0x19f> return 0; for(i = 0; i < sz; i += PGSIZE){ 80106b89: 8b 45 0c mov 0xc(%ebp),%eax 80106b8c: 85 c0 test %eax,%eax 80106b8e: 0f 84 ac 00 00 00 je 80106c40 <copyuvm+0xd0> 80106b94: 31 db xor %ebx,%ebx 80106b96: eb 51 jmp 80106be9 <copyuvm+0x79> panic("copyuvm: page not present"); pa = PTE_ADDR(*pte); flags = PTE_FLAGS(*pte); if((mem = kalloc()) == 0) goto bad; memmove(mem, (char*)P2V(pa), PGSIZE); 80106b98: 81 c7 00 00 00 80 add $0x80000000,%edi 80106b9e: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106ba5: 00 80106ba6: 89 7c 24 04 mov %edi,0x4(%esp) 80106baa: 89 04 24 mov %eax,(%esp) 80106bad: e8 de d7 ff ff call 80104390 <memmove> if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) 80106bb2: 8b 45 e4 mov -0x1c(%ebp),%eax 80106bb5: 8d 96 00 00 00 80 lea -0x80000000(%esi),%edx 80106bbb: 89 54 24 0c mov %edx,0xc(%esp) 80106bbf: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106bc6: 00 80106bc7: 89 5c 24 04 mov %ebx,0x4(%esp) 80106bcb: 89 44 24 10 mov %eax,0x10(%esp) 80106bcf: 8b 45 e0 mov -0x20(%ebp),%eax 80106bd2: 89 04 24 mov %eax,(%esp) 80106bd5: e8 16 fa ff ff call 801065f0 <mappages> 80106bda: 85 c0 test %eax,%eax 80106bdc: 78 4d js 80106c2b <copyuvm+0xbb> for(i = 0; i < sz; i += PGSIZE){ 80106bde: 81 c3 00 10 00 00 add $0x1000,%ebx 80106be4: 39 5d 0c cmp %ebx,0xc(%ebp) 80106be7: 76 57 jbe 80106c40 <copyuvm+0xd0> if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0) 80106be9: 8b 45 08 mov 0x8(%ebp),%eax 80106bec: 31 c9 xor %ecx,%ecx 80106bee: 89 da mov %ebx,%edx 80106bf0: e8 0b f8 ff ff call 80106400 <walkpgdir> 80106bf5: 85 c0 test %eax,%eax 80106bf7: 0f 84 25 01 00 00 je 80106d22 <copyuvm+0x1b2> if(!(*pte & PTE_P)) 80106bfd: 8b 30 mov (%eax),%esi 80106bff: f7 c6 01 00 00 00 test $0x1,%esi 80106c05: 0f 84 0b 01 00 00 je 80106d16 <copyuvm+0x1a6> pa = PTE_ADDR(*pte); 80106c0b: 89 f7 mov %esi,%edi flags = PTE_FLAGS(*pte); 80106c0d: 81 e6 ff 0f 00 00 and $0xfff,%esi 80106c13: 89 75 e4 mov %esi,-0x1c(%ebp) pa = PTE_ADDR(*pte); 80106c16: 81 e7 00 f0 ff ff and $0xfffff000,%edi if((mem = kalloc()) == 0) 80106c1c: e8 bf b8 ff ff call 801024e0 <kalloc> 80106c21: 85 c0 test %eax,%eax 80106c23: 89 c6 mov %eax,%esi 80106c25: 0f 85 6d ff ff ff jne 80106b98 <copyuvm+0x28> } return d; bad: freevm(d); 80106c2b: 8b 45 e0 mov -0x20(%ebp),%eax 80106c2e: 89 04 24 mov %eax,(%esp) 80106c31: e8 da fd ff ff call 80106a10 <freevm> return 0; 80106c36: 31 c0 xor %eax,%eax } 80106c38: 83 c4 2c add $0x2c,%esp 80106c3b: 5b pop %ebx 80106c3c: 5e pop %esi 80106c3d: 5f pop %edi 80106c3e: 5d pop %ebp 80106c3f: c3 ret for (i = myproc()->userStackTop - myproc()->stackPages*PGSIZE + 4; i < myproc()->userStackTop; i += PGSIZE) { 80106c40: e8 9b ca ff ff call 801036e0 <myproc> 80106c45: 8b 58 7c mov 0x7c(%eax),%ebx 80106c48: e8 93 ca ff ff call 801036e0 <myproc> 80106c4d: 8b 80 80 00 00 00 mov 0x80(%eax),%eax 80106c53: f7 d8 neg %eax 80106c55: c1 e0 0c shl $0xc,%eax 80106c58: 8d 5c 03 04 lea 0x4(%ebx,%eax,1),%ebx 80106c5c: e9 95 00 00 00 jmp 80106cf6 <copyuvm+0x186> 80106c61: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if ((pte = walkpgdir(pgdir, (void *) i, 0)) == 0) 80106c68: 8b 45 08 mov 0x8(%ebp),%eax 80106c6b: 31 c9 xor %ecx,%ecx 80106c6d: 89 da mov %ebx,%edx 80106c6f: e8 8c f7 ff ff call 80106400 <walkpgdir> 80106c74: 85 c0 test %eax,%eax 80106c76: 0f 84 a6 00 00 00 je 80106d22 <copyuvm+0x1b2> if (!(*pte & PTE_P)) 80106c7c: 8b 30 mov (%eax),%esi 80106c7e: f7 c6 01 00 00 00 test $0x1,%esi 80106c84: 0f 84 8c 00 00 00 je 80106d16 <copyuvm+0x1a6> pa = PTE_ADDR(*pte); 80106c8a: 89 f7 mov %esi,%edi flags = PTE_FLAGS(*pte); 80106c8c: 81 e6 ff 0f 00 00 and $0xfff,%esi 80106c92: 89 75 e4 mov %esi,-0x1c(%ebp) pa = PTE_ADDR(*pte); 80106c95: 81 e7 00 f0 ff ff and $0xfffff000,%edi if ((mem = kalloc()) == 0) 80106c9b: e8 40 b8 ff ff call 801024e0 <kalloc> 80106ca0: 85 c0 test %eax,%eax 80106ca2: 89 c6 mov %eax,%esi 80106ca4: 74 85 je 80106c2b <copyuvm+0xbb> memmove(mem, (char *) P2V(pa), PGSIZE); 80106ca6: 81 c7 00 00 00 80 add $0x80000000,%edi 80106cac: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106cb3: 00 80106cb4: 89 7c 24 04 mov %edi,0x4(%esp) 80106cb8: 89 04 24 mov %eax,(%esp) 80106cbb: e8 d0 d6 ff ff call 80104390 <memmove> if (mappages(d, (void *) i, PGSIZE, V2P(mem), flags) < 0) 80106cc0: 8b 45 e4 mov -0x1c(%ebp),%eax 80106cc3: 8d 96 00 00 00 80 lea -0x80000000(%esi),%edx 80106cc9: 89 54 24 0c mov %edx,0xc(%esp) 80106ccd: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106cd4: 00 80106cd5: 89 5c 24 04 mov %ebx,0x4(%esp) 80106cd9: 89 44 24 10 mov %eax,0x10(%esp) 80106cdd: 8b 45 e0 mov -0x20(%ebp),%eax 80106ce0: 89 04 24 mov %eax,(%esp) 80106ce3: e8 08 f9 ff ff call 801065f0 <mappages> 80106ce8: 85 c0 test %eax,%eax 80106cea: 0f 88 3b ff ff ff js 80106c2b <copyuvm+0xbb> for (i = myproc()->userStackTop - myproc()->stackPages*PGSIZE + 4; i < myproc()->userStackTop; i += PGSIZE) { 80106cf0: 81 c3 00 10 00 00 add $0x1000,%ebx 80106cf6: e8 e5 c9 ff ff call 801036e0 <myproc> 80106cfb: 3b 58 7c cmp 0x7c(%eax),%ebx 80106cfe: 0f 82 64 ff ff ff jb 80106c68 <copyuvm+0xf8> 80106d04: 8b 45 e0 mov -0x20(%ebp),%eax } 80106d07: 83 c4 2c add $0x2c,%esp 80106d0a: 5b pop %ebx 80106d0b: 5e pop %esi 80106d0c: 5f pop %edi 80106d0d: 5d pop %ebp 80106d0e: c3 ret return 0; 80106d0f: 31 c0 xor %eax,%eax 80106d11: e9 22 ff ff ff jmp 80106c38 <copyuvm+0xc8> panic("copyuvm: page not present"); 80106d16: c7 04 24 b6 78 10 80 movl $0x801078b6,(%esp) 80106d1d: e8 3e 96 ff ff call 80100360 <panic> panic("copyuvm: pte should exist"); 80106d22: c7 04 24 9c 78 10 80 movl $0x8010789c,(%esp) 80106d29: e8 32 96 ff ff call 80100360 <panic> 80106d2e: 66 90 xchg %ax,%ax 80106d30 <uva2ka>: //PAGEBREAK! // Map user virtual address to kernel address. char* uva2ka(pde_t *pgdir, char *uva) { 80106d30: 55 push %ebp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 80106d31: 31 c9 xor %ecx,%ecx { 80106d33: 89 e5 mov %esp,%ebp 80106d35: 83 ec 08 sub $0x8,%esp pte = walkpgdir(pgdir, uva, 0); 80106d38: 8b 55 0c mov 0xc(%ebp),%edx 80106d3b: 8b 45 08 mov 0x8(%ebp),%eax 80106d3e: e8 bd f6 ff ff call 80106400 <walkpgdir> if((*pte & PTE_P) == 0) 80106d43: 8b 00 mov (%eax),%eax 80106d45: 89 c2 mov %eax,%edx 80106d47: 83 e2 05 and $0x5,%edx return 0; if((*pte & PTE_U) == 0) 80106d4a: 83 fa 05 cmp $0x5,%edx 80106d4d: 75 11 jne 80106d60 <uva2ka+0x30> return 0; return (char*)P2V(PTE_ADDR(*pte)); 80106d4f: 25 00 f0 ff ff and $0xfffff000,%eax 80106d54: 05 00 00 00 80 add $0x80000000,%eax } 80106d59: c9 leave 80106d5a: c3 ret 80106d5b: 90 nop 80106d5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80106d60: 31 c0 xor %eax,%eax } 80106d62: c9 leave 80106d63: c3 ret 80106d64: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106d6a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80106d70 <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) { 80106d70: 55 push %ebp 80106d71: 89 e5 mov %esp,%ebp 80106d73: 57 push %edi 80106d74: 56 push %esi 80106d75: 53 push %ebx 80106d76: 83 ec 1c sub $0x1c,%esp 80106d79: 8b 5d 14 mov 0x14(%ebp),%ebx 80106d7c: 8b 4d 0c mov 0xc(%ebp),%ecx 80106d7f: 8b 7d 10 mov 0x10(%ebp),%edi char *buf, *pa0; uint n, va0; buf = (char*)p; while(len > 0){ 80106d82: 85 db test %ebx,%ebx 80106d84: 75 3a jne 80106dc0 <copyout+0x50> 80106d86: eb 68 jmp 80106df0 <copyout+0x80> va0 = (uint)PGROUNDDOWN(va); pa0 = uva2ka(pgdir, (char*)va0); if(pa0 == 0) return -1; n = PGSIZE - (va - va0); 80106d88: 8b 4d e4 mov -0x1c(%ebp),%ecx 80106d8b: 89 f2 mov %esi,%edx if(n > len) n = len; memmove(pa0 + (va - va0), buf, n); 80106d8d: 89 7c 24 04 mov %edi,0x4(%esp) n = PGSIZE - (va - va0); 80106d91: 29 ca sub %ecx,%edx 80106d93: 81 c2 00 10 00 00 add $0x1000,%edx 80106d99: 39 da cmp %ebx,%edx 80106d9b: 0f 47 d3 cmova %ebx,%edx memmove(pa0 + (va - va0), buf, n); 80106d9e: 29 f1 sub %esi,%ecx 80106da0: 01 c8 add %ecx,%eax 80106da2: 89 54 24 08 mov %edx,0x8(%esp) 80106da6: 89 04 24 mov %eax,(%esp) 80106da9: 89 55 e4 mov %edx,-0x1c(%ebp) 80106dac: e8 df d5 ff ff call 80104390 <memmove> len -= n; buf += n; 80106db1: 8b 55 e4 mov -0x1c(%ebp),%edx va = va0 + PGSIZE; 80106db4: 8d 8e 00 10 00 00 lea 0x1000(%esi),%ecx buf += n; 80106dba: 01 d7 add %edx,%edi while(len > 0){ 80106dbc: 29 d3 sub %edx,%ebx 80106dbe: 74 30 je 80106df0 <copyout+0x80> pa0 = uva2ka(pgdir, (char*)va0); 80106dc0: 8b 45 08 mov 0x8(%ebp),%eax va0 = (uint)PGROUNDDOWN(va); 80106dc3: 89 ce mov %ecx,%esi 80106dc5: 81 e6 00 f0 ff ff and $0xfffff000,%esi pa0 = uva2ka(pgdir, (char*)va0); 80106dcb: 89 74 24 04 mov %esi,0x4(%esp) va0 = (uint)PGROUNDDOWN(va); 80106dcf: 89 4d e4 mov %ecx,-0x1c(%ebp) pa0 = uva2ka(pgdir, (char*)va0); 80106dd2: 89 04 24 mov %eax,(%esp) 80106dd5: e8 56 ff ff ff call 80106d30 <uva2ka> if(pa0 == 0) 80106dda: 85 c0 test %eax,%eax 80106ddc: 75 aa jne 80106d88 <copyout+0x18> } return 0; } 80106dde: 83 c4 1c add $0x1c,%esp return -1; 80106de1: b8 ff ff ff ff mov $0xffffffff,%eax } 80106de6: 5b pop %ebx 80106de7: 5e pop %esi 80106de8: 5f pop %edi 80106de9: 5d pop %ebp 80106dea: c3 ret 80106deb: 90 nop 80106dec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106df0: 83 c4 1c add $0x1c,%esp return 0; 80106df3: 31 c0 xor %eax,%eax } 80106df5: 5b pop %ebx 80106df6: 5e pop %esi 80106df7: 5f pop %edi 80106df8: 5d pop %ebp 80106df9: c3 ret 80106dfa: 66 90 xchg %ax,%ax 80106dfc: 66 90 xchg %ax,%ax 80106dfe: 66 90 xchg %ax,%ax 80106e00 <shminit>: char *frame; int refcnt; } shm_pages[64]; } shm_table; void shminit() { 80106e00: 55 push %ebp 80106e01: 89 e5 mov %esp,%ebp 80106e03: 83 ec 18 sub $0x18,%esp int i; initlock(&(shm_table.lock), "SHM lock"); 80106e06: c7 44 24 04 f4 78 10 movl $0x801078f4,0x4(%esp) 80106e0d: 80 80106e0e: c7 04 24 c0 56 11 80 movl $0x801156c0,(%esp) 80106e15: e8 a6 d2 ff ff call 801040c0 <initlock> acquire(&(shm_table.lock)); 80106e1a: c7 04 24 c0 56 11 80 movl $0x801156c0,(%esp) 80106e21: e8 8a d3 ff ff call 801041b0 <acquire> 80106e26: b8 f4 56 11 80 mov $0x801156f4,%eax 80106e2b: 90 nop 80106e2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for (i = 0; i< 64; i++) { shm_table.shm_pages[i].id =0; 80106e30: c7 00 00 00 00 00 movl $0x0,(%eax) 80106e36: 83 c0 0c add $0xc,%eax shm_table.shm_pages[i].frame =0; 80106e39: c7 40 f8 00 00 00 00 movl $0x0,-0x8(%eax) shm_table.shm_pages[i].refcnt =0; 80106e40: c7 40 fc 00 00 00 00 movl $0x0,-0x4(%eax) for (i = 0; i< 64; i++) { 80106e47: 3d f4 59 11 80 cmp $0x801159f4,%eax 80106e4c: 75 e2 jne 80106e30 <shminit+0x30> } release(&(shm_table.lock)); 80106e4e: c7 04 24 c0 56 11 80 movl $0x801156c0,(%esp) 80106e55: e8 46 d4 ff ff call 801042a0 <release> } 80106e5a: c9 leave 80106e5b: c3 ret 80106e5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106e60 <shm_open>: int shm_open(int id, char **pointer) { 80106e60: 55 push %ebp return 0; //added to remove compiler warning -- you should decide what to return } 80106e61: 31 c0 xor %eax,%eax int shm_open(int id, char **pointer) { 80106e63: 89 e5 mov %esp,%ebp } 80106e65: 5d pop %ebp 80106e66: c3 ret 80106e67: 89 f6 mov %esi,%esi 80106e69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106e70 <shm_close>: int shm_close(int id) { 80106e70: 55 push %ebp return 0; //added to remove compiler warning -- you should decide what to return } 80106e71: 31 c0 xor %eax,%eax int shm_close(int id) { 80106e73: 89 e5 mov %esp,%ebp } 80106e75: 5d pop %ebp 80106e76: c3 ret
38.037864
148
0.529348
457e5826d8ce6d79ea12c231c18cb6ea3c9fc14a
1,977
asm
Assembly
Transynther/x86/_processed/P/_un_/i9-9900K_12_0xa0_notsx.log_2_725.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/P/_un_/i9-9900K_12_0xa0_notsx.log_2_725.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/P/_un_/i9-9900K_12_0xa0_notsx.log_2_725.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %r8 push %rcx push %rdi push %rsi lea addresses_WT_ht+0x47ba, %rsi lea addresses_D_ht+0x1ec5a, %rdi nop nop nop nop xor %r8, %r8 mov $80, %rcx rep movsl nop and $53169, %r14 lea addresses_normal_ht+0x1a15a, %r14 nop add %r11, %r11 mov (%r14), %esi nop nop nop nop nop sub %r8, %r8 pop %rsi pop %rdi pop %rcx pop %r8 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %r9 push %rcx push %rdi push %rsi // REPMOV lea addresses_PSE+0xeeca, %rsi lea addresses_WT+0x1775a, %rdi nop nop nop nop xor $65419, %r11 mov $89, %rcx rep movsq nop nop nop nop sub %r11, %r11 // REPMOV lea addresses_US+0x15f5a, %rsi lea addresses_normal+0x1eb0a, %rdi clflush (%rsi) clflush (%rdi) nop nop nop nop cmp $8393, %r14 mov $39, %rcx rep movsb and $4425, %r11 // Faulty Load mov $0x35a, %r11 nop nop nop and $12933, %r9 mov (%r11), %ecx lea oracles, %r11 and $0xff, %rcx shlq $12, %rcx mov (%r11,%rcx,1), %rcx pop %rsi pop %rdi pop %rcx pop %r9 pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_P', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'src': {'type': 'addresses_PSE', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT', 'congruent': 10, 'same': False}} {'src': {'type': 'addresses_US', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal', 'congruent': 4, 'same': False}} [Faulty Load] {'src': {'type': 'addresses_P', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}} {'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'} {'75': 1, '8f': 1} 75 8f */
17.651786
147
0.648963
d7d62bad714346455ba9aff44b50bee1866cb902
2,866
asm
Assembly
chap18/ex9/peeling.asm
JamesType/optimization-manual
61cdcebb16e0768a6ab7e85ed535e64e9d8cc31a
[ "0BSD" ]
374
2021-06-08T10:42:01.000Z
2022-03-29T14:21:45.000Z
chap18/ex9/peeling.asm
JamesType/optimization-manual
61cdcebb16e0768a6ab7e85ed535e64e9d8cc31a
[ "0BSD" ]
1
2021-06-11T20:24:02.000Z
2021-06-11T20:24:02.000Z
chap18/ex9/peeling.asm
JamesType/optimization-manual
61cdcebb16e0768a6ab7e85ed535e64e9d8cc31a
[ "0BSD" ]
39
2021-06-08T11:25:29.000Z
2022-03-05T05:14:17.000Z
; ; Copyright (C) 2021 by Intel Corporation ; ; Permission to use, copy, modify, and/or distribute this software for any ; purpose with or without fee is hereby granted. ; ; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH ; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY ; AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, ; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM ; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR ; OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ; PERFORMANCE OF THIS SOFTWARE. ; ; .globl peel ; void peel(float *out, const float *in, uint64_t width, float add_value, float alfa); ; On entry: ; rcx = out ; rdx = in ; r8 = width ; xmm3 = add_value ; [rsp+48] = alfa .data indices DD 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 .code peel PROC public push rbx mov rax, rdx ; mov rax, pImage ( Input ) mov rbx, rcx ; mov rbx, pOutImage ( Output ) mov r11, r8 ; mov r11, len ; movss xmm3, addValue vpbroadcastd zmm3, xmm3 ; movss xmm1, alfa vpbroadcastd zmm4, dword ptr[rsp+48] xor r10, r10 xor r9, r9 vmovups zmm0, indices ; vmovups zmm0, [indices] vpbroadcastd zmm5, ecx peeling: mov r8, rbx and r8, 03Fh jz endofpeeling ; nothing to peel neg r8 add r8, 64 ; 64 - X ; now in r8 we have the number of bytes to the closest alignment mov r9, r8 sar r9, 2 ; now r9 contains number of elements in peeling vpbroadcastd zmm5, r9d vpcmpd k2, zmm0, zmm5, 1 ; compare lower to produce mask for peeling vmovups zmm1 {k2}{z}, zmmword ptr[rax] vfmadd213ps zmm1 {k2}{z}, zmm4, zmm3 vmovups zmmword ptr[rbx] {k2}, zmm1 ; unaligned store endofpeeling: sub r11, r9 mov r10, r11 sar r10, 4 ; number of full iterations jz remainder ; no full iterations mainloop: vmovups zmm1, zmmword ptr[rax + r8] vfmadd213ps zmm1, zmm4, zmm3 vmovaps zmmword ptr[rbx + r8], zmm1 ; aligned store is safe here !! add r8, 40h sub r10, 1 jne mainloop remainder: ; produce mask for remainder and r11, 0Fh ; number of elements in remainder jz endloop ; no elements in remainder vpbroadcastd zmm2, r11d vpcmpd k2, zmm0, zmm2, 1 ; compare lower vmovups zmm1 {k2}{z}, zmmword ptr[rax + r8] vfmadd213ps zmm1 {k2}{z}, zmm4, zmm3 vmovaps zmmword ptr[rbx + r8] {k2}, zmm1 ; aligned endloop: vzeroupper pop rbx ret peel ENDP end
32.202247
87
0.610258
a2eff7ddacd8150ac9e1e79c99f711fef4462597
6,044
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_21829_1496.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_21829_1496.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_21829_1496.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 %r15 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x9c19, %r10 nop nop nop add $5560, %r15 mov (%r10), %esi nop nop nop nop nop add $25768, %rax lea addresses_UC_ht+0xaed9, %r14 nop nop sub %r10, %r10 mov $0x6162636465666768, %rdx movq %rdx, %xmm2 movups %xmm2, (%r14) nop nop nop nop nop cmp $33931, %rdx lea addresses_WT_ht+0x18659, %rsi lea addresses_WC_ht+0x1e2d9, %rdi clflush (%rdi) nop nop xor %rdx, %rdx mov $27, %rcx rep movsq add %rcx, %rcx lea addresses_WC_ht+0xac21, %r14 nop nop nop add %rsi, %rsi movb (%r14), %dl cmp %rax, %rax lea addresses_A_ht+0x2dd9, %rsi lea addresses_normal_ht+0x177ad, %rdi nop nop inc %r15 mov $98, %rcx rep movsq nop nop nop nop cmp %r10, %r10 lea addresses_WT_ht+0x182d9, %rsi lea addresses_UC_ht+0x62d9, %rdi nop nop nop and $231, %rdx mov $117, %rcx rep movsq and %rcx, %rcx lea addresses_WT_ht+0x135ba, %rdx nop add %r15, %r15 movb $0x61, (%rdx) nop nop nop cmp %r10, %r10 pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r15 pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r8 push %rax push %rcx push %rdi push %rdx push %rsi // Store lea addresses_UC+0x1c6d9, %rcx nop nop nop nop nop xor %r8, %r8 movl $0x51525354, (%rcx) nop nop nop xor $10554, %rdx // Faulty Load lea addresses_WT+0x6d9, %rdi nop nop nop nop nop xor %rsi, %rsi vmovaps (%rdi), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $1, %xmm1, %rax lea oracles, %r8 and $0xff, %rax shlq $12, %rax mov (%r8,%rax,1), %rax pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r8 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT', 'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 11}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': True, 'congruent': 8, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}} {'49': 3846, '00': 5267, '45': 12716} 00 00 45 45 45 45 00 45 45 45 45 00 49 45 49 45 45 45 45 45 45 00 45 45 45 49 45 45 45 49 45 45 45 49 00 49 00 45 00 49 49 49 45 00 45 45 45 45 45 45 45 45 49 49 00 45 45 45 00 00 45 45 45 45 45 49 49 45 45 45 45 45 45 45 45 49 00 45 45 00 45 45 45 45 00 00 45 45 45 45 45 45 49 45 45 49 45 00 00 49 45 45 49 00 49 45 00 49 49 00 00 45 45 45 45 45 45 45 49 00 45 45 00 49 00 49 49 45 49 45 45 45 45 45 00 45 00 45 45 45 49 49 45 45 49 45 45 45 45 45 49 45 45 45 45 00 49 49 45 00 45 00 45 45 45 00 45 45 49 00 00 00 49 49 00 45 45 45 45 49 00 45 45 45 49 00 00 00 00 45 45 00 45 00 45 45 45 45 45 00 45 49 00 45 45 45 45 45 45 49 49 45 00 49 45 45 45 45 45 45 45 45 45 49 00 00 45 45 49 49 45 00 00 49 45 45 45 49 45 00 49 45 45 00 45 45 00 45 00 45 49 45 45 00 45 45 49 00 45 00 45 45 45 00 45 00 49 45 45 49 45 45 45 45 45 45 00 49 45 45 45 49 45 49 00 45 45 49 45 45 45 00 45 45 45 45 00 45 49 45 45 49 45 49 45 45 45 00 45 00 45 49 00 45 45 00 45 45 00 45 45 45 45 49 00 45 45 00 45 45 49 45 49 00 45 45 00 00 49 45 00 45 45 45 45 45 45 49 45 00 45 45 45 00 45 45 00 00 49 49 49 45 00 45 00 45 45 00 45 49 00 45 00 00 45 00 45 00 45 00 45 45 49 45 00 45 00 00 00 45 45 45 00 45 45 45 00 45 49 45 45 45 00 45 00 45 49 45 49 45 45 00 45 49 00 45 00 45 49 00 00 45 45 00 49 00 49 45 49 00 45 49 45 45 45 45 49 00 45 49 45 45 49 45 00 00 45 45 00 00 45 45 45 45 45 45 45 45 00 49 45 49 00 45 45 45 49 49 45 45 45 45 49 45 00 00 45 45 45 45 49 45 45 45 49 00 45 45 45 45 45 45 49 00 45 00 45 45 00 45 00 49 00 45 00 49 45 45 45 49 49 49 45 45 45 45 00 45 45 45 45 45 45 00 45 00 45 45 45 49 00 45 45 45 49 45 00 45 45 45 49 45 00 45 45 45 00 00 45 00 45 00 45 45 45 49 45 45 45 45 45 00 45 45 45 00 00 45 45 49 45 00 45 45 45 49 45 45 45 45 45 45 45 45 45 49 45 45 45 45 00 00 00 45 45 45 49 45 45 45 49 00 45 45 45 49 45 00 45 45 45 49 45 45 45 45 00 49 45 45 00 45 45 45 45 00 49 00 45 00 45 00 45 45 49 00 49 49 45 49 45 00 45 45 00 45 49 00 00 45 45 45 49 45 49 49 45 45 00 49 49 45 45 49 45 45 00 45 45 00 45 00 49 49 45 45 49 00 45 45 45 00 45 49 45 45 00 45 49 45 45 00 49 00 45 49 00 49 49 00 45 45 45 45 00 45 45 45 49 45 49 49 49 45 45 45 45 45 45 49 45 49 00 49 00 45 49 45 45 45 45 45 00 49 45 45 49 45 49 49 45 00 49 00 45 45 00 00 45 45 00 49 45 00 45 45 45 49 45 00 45 00 45 45 00 49 45 45 45 45 45 45 49 45 45 45 49 45 00 00 00 45 00 00 49 45 45 45 45 45 00 45 49 49 49 00 45 45 45 49 49 45 49 00 45 45 49 45 45 45 00 45 45 49 45 00 45 45 45 00 45 45 00 45 45 45 45 00 00 00 45 00 45 45 49 45 45 45 45 00 45 45 45 45 45 45 00 45 00 45 45 45 00 45 45 45 00 45 45 45 00 00 49 00 45 45 00 45 45 45 45 49 45 45 45 49 45 00 00 45 45 45 49 49 45 49 45 45 49 45 45 49 45 00 45 00 00 45 45 49 00 45 00 00 45 45 00 45 00 49 45 45 45 45 45 49 45 45 45 00 49 45 45 49 00 45 00 49 49 00 45 45 45 45 00 45 49 00 49 45 45 45 45 45 49 45 45 45 45 45 49 49 45 45 45 45 45 00 45 00 45 00 45 00 45 00 45 45 45 49 45 49 49 45 45 49 45 49 45 49 00 00 00 45 45 49 45 45 45 45 49 45 45 45 00 45 45 49 45 00 */
38.496815
2,999
0.65867
ce3309d11e8d140f742ee6e3fdf888d1f94c0f02
433
asm
Assembly
libsrc/msx/gen_ldirvm.asm
Toysoft/z88dk
f930bef9ac4feeec91a07303b79ddd9071131a24
[ "ClArtistic" ]
null
null
null
libsrc/msx/gen_ldirvm.asm
Toysoft/z88dk
f930bef9ac4feeec91a07303b79ddd9071131a24
[ "ClArtistic" ]
null
null
null
libsrc/msx/gen_ldirvm.asm
Toysoft/z88dk
f930bef9ac4feeec91a07303b79ddd9071131a24
[ "ClArtistic" ]
1
2019-12-03T23:28:20.000Z
2019-12-03T23:28:20.000Z
; ; z88dk library: Generic VDP support code ; ; FILVRM ; ; ; $Id: gen_ldirvm.asm,v 1.3 2016-06-16 19:30:25 dom Exp $ ; SECTION code_clib PUBLIC LDIRVM PUBLIC _LDIRVM EXTERN SETWRT INCLUDE "msx/vdp.inc" LDIRVM: _LDIRVM: ex de,hl push bc call SETWRT pop hl IF VDP_DATA >= 0 ld bc,VDP_DATA ENDIF loop: ld a,(de) IF VDP_DATA < 0 ld (-VDP_DATA),a ELSE out (c),a ENDIF inc de dec hl ld a,h or l jr nz,loop ret
11.102564
57
0.662818
e2201ee95b1b1c7e54efd96059336f1e4bec4922
2,580
asm
Assembly
src/data_const.asm
maziac/dezogif
e92f6a0e21ac6b465349e193417e3f19721f763d
[ "MIT" ]
2
2020-05-25T09:25:46.000Z
2020-12-30T10:43:58.000Z
src/data_const.asm
maziac/dezogif
e92f6a0e21ac6b465349e193417e3f19721f763d
[ "MIT" ]
null
null
null
src/data_const.asm
maziac/dezogif
e92f6a0e21ac6b465349e193417e3f19721f763d
[ "MIT" ]
null
null
null
;=========================================================================== ; data.asm ; ; All volatile data is defined here. ; ; Note: The area does not need to be copied. i.e. is initialized on the fly. ;=========================================================================== ; The dezogif program version: MACRO PRG_VERSION defb "v2.0.0" ENDM ;=========================================================================== ; Magic number addresses to recognize the debugger ;=========================================================================== magic_number_a: equ 0x0000 ; Address 0x0000 (0xE000) magic_number_b: equ 0x0001 magic_number_c: equ 0x0066 ; Address 0x0066 (0xE066) magic_number_d: equ 0x0067 ;=========================================================================== ; Const data ;=========================================================================== ; 16 bit build time build_time_abs: defw BUILD_TIME16 build_time_rel = build_time_abs-MAIN_ADDR; ; UI INTRO_TEXT: defb AT, 0, 0 defb "ZX Next UART DeZog Interface" defb AT, 0, 1*8 PRG_VERSION defb " (DZRP v" defb DZRP_VERSION.MAJOR+'0', '.', DZRP_VERSION.MINOR+'0', '.', DZRP_VERSION.PATCH+'0' defb ")" defb AT, 0, 2*8 defb "ESP UART Baudrate: " STRINGIFY BAUDRATE defb AT, 0, 3*8 defb "Video timing:" defb AT, 0, 6*8 defb "Keys:" defb AT, 0, 7*8 defb "1 = Joy 1" defb AT, 0, 8*8 defb "2 = Joy 2" defb AT, 0, 9*8 defb "3 = No joystick port" defb AT, 0, 10*8 defb "R = Reset" defb AT, 0, 11*8 defb "B = Border" defb 0 JOY1_SELECTED_TEXT: defb AT, 0, 4*8, "Using Joy 1 (left)", 0 JOY2_SELECTED_TEXT: defb AT, 0, 4*8, "Using Joy 2 (right)", 0 NOJOY_SELECTED_TEXT: defb AT, 0, 4*8, "No joystick port used.", 0 SELECTED_TEXT_TABLE: defw NOJOY_SELECTED_TEXT defw JOY1_SELECTED_TEXT defw JOY2_SELECTED_TEXT BORDER_OFF_TEXT: defb AT, 11*8, 11*8, "off", 0 BORDER_ON_TEXT: defb AT, 11*8, 11*8, "on", 0 ; Error texts TEXT_LAST_ERROR: defb AT, 0, 13*8, "Last Error:", AT, 0, 14*8, 0 TEXT_ERROR_RX_TIMEOUT: defb "RX Timeout", 0 TEXT_ERROR_TX_TIMEOUT: defb "TX Timeout", 0 TEXT_ERROR_WRONG_FUNC_NUMBER: defb "Wrong function number", 0 TEXT_ERROR_WRITE_MAIN_BANK: defb "CMD_WRITE_BANK: Can't write to bank " STRINGIFY MAIN_BANK defb ". Bank is used by DeZog.", 0 ERROR_TEXT_TABLE: defw TEXT_ERROR_RX_TIMEOUT defw TEXT_ERROR_TX_TIMEOUT defw TEXT_ERROR_WRONG_FUNC_NUMBER defw TEXT_ERROR_WRITE_MAIN_BANK
25.544554
89
0.54845
39386a74349b27c64358019b4212b9e7a98b8b7e
11,615
asm
Assembly
aplib.asm
Nun-z/final_fantasy_vi_widescreen
27ab750baf4761347848156a4d81560ac11a4c9a
[ "MIT" ]
null
null
null
aplib.asm
Nun-z/final_fantasy_vi_widescreen
27ab750baf4761347848156a4d81560ac11a4c9a
[ "MIT" ]
null
null
null
aplib.asm
Nun-z/final_fantasy_vi_widescreen
27ab750baf4761347848156a4d81560ac11a4c9a
[ "MIT" ]
null
null
null
; *************************************************************************** ; *************************************************************************** ; ; aplib.asm ; ; 65C816 decompressor for data stored in Jorgen Ibsen's aPLib format. ; ; Includes support for Emmanuel Marty's enhancements to the aPLib format. ; ; The code is 413 bytes long. ; ; This code is written for the ASAR assembler. ; ; Based off of the NMOS 6502 decompressor, Copyright 2019, John Brandwood: ; https://github.com/emmanuel-marty/apultra/blob/master/asm/6502/aplib_6502.asm ; ; Distributed under the Boost Software License, Version 1.0. ; ; Permission is hereby granted, free of charge, to any person or organization ; obtaining a copy of the software and accompanying documentation covered by ; this license (the "Software") to use, reproduce, display, distribute, ; execute, and transmit the Software, and to prepare derivative works of the ; Software, and to permit third-parties to whom the Software is furnished to ; do so, all subject to the following: ; ; The copyright notices in the Software and this entire statement, including ; the above license grant, this restriction and the following disclaimer, ; must be included in all copies of the Software, in whole or in part, and ; all derivative works of the Software, unless such copies or derivative ; works are solely in the form of machine-executable object code generated by ; a source language processor. ; ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ; FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT ; SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE ; FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ; ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ; DEALINGS IN THE SOFTWARE. ; ; *************************************************************************** ; *************************************************************************** ; *************************************************************************** ; *************************************************************************** ; ; Decompression Macros ; ; ; Macro to increment the source pointer to the next page. ; opt: duplication: removes costly jmps. ; macro GET_SRC(srcptr) lda [<srcptr>], y ; opt: keep lowbyte in reg. iny ; inc src addr. bne + inc <srcptr>+1 ; highbyte in zeropage. bne + inc <srcptr>+2 ; page in zeropage. +: endmacro ; ; Macro for byte & bit handling. ; opt: duplication: removes costly jmps. ; macro LOAD_BIT(bitbuf, srcptr) %GET_SRC(<srcptr>) ; Reload an empty bit-buffer rol ; from the compressed source. sta <bitbuf> endmacro ; ; Macro for gamma handling. ; opt: duplication: removes costly jmps. ; macro GET_GAMMA(bitbuf, winptr, srcptr) lda #$1 ; Get a gamma-coded value. --: asl <bitbuf> bne ++ tcs ; opt: 2-cycle. %LOAD_BIT(<bitbuf>, <srcptr>) ; Reload an empty bit-buffer tsc ; opt: 2-cycle. ++: rol rol <winptr>+1 asl <bitbuf> bne ++ tcs ; opt: 2-cycle. %LOAD_BIT(<bitbuf>, <srcptr>) ; Reload an empty bit-buffer tsc ; opt: 2-cycle. ++: bcs -- endmacro ; *************************************************************************** ; *************************************************************************** ; ; apl_decompress - Decompress data stored in Jorgen Ibsen's aPLib format. ; ; Uses: lots! ; ; As an optimization, the code to handle window offsets > 64768 bytes has ; been removed, since these don't occur with a 16-bit address range. ; ; As an optimization, the code to handle window offsets > 32000 bytes can ; be commented-out, since these don't occur in typical 8-bit computer usage. ; ; Overall opts: reorder, reduce register pressure on y & x, use stack ptr, mvn, remove subroutine jumps. ; scratch : 1-byte ; bitbuf : 1-byte ; offset : 2-byte. ; spbuf : 2-byte. ; winptr : 2-byte. ; srcptr : 3-byte. ; dstptr : 3-byte. macro APL(scratch, bitbuf, offset, spbuf, winptr, srcptr, dstptr) apl_decompress: ; setup init. sep #$30 phb ; push bank. lda <dstptr>+2 ; load new bank. pha plb rep #$30 sei ; disable interrupts. lda $00 sta $004200 ; disable nmi. tsc ; opt: use sp as free reg. sta <spbuf> ; store sp. sep #$30 ; ---. ldy <srcptr> ; Initialize source index. stz <srcptr> ; Opt: set lowbyte to zero. lda #$80 ; Initialize an empty sta <bitbuf> ; bit-buffer. ; ; 0 bbbbbbbb - One byte from compressed data, i.e. a "literal". ; .literal: %GET_SRC(<srcptr>) .write_byte: ldx #$00 ; LWM=0. sta (<dstptr>) ; Write the byte directly to the output. inc <dstptr> bne .next_tag inc <dstptr>+1 .next_tag: asl <bitbuf> ; 0 bbbbbbbb bne .skip0 %LOAD_BIT(<bitbuf>, <srcptr>) ; opt: no jsr. .skip0: bcc .literal .skip1: asl <bitbuf> ; 1 0 <offset> <length> bne .skip2 %LOAD_BIT(<bitbuf>, <srcptr>) ; opt: no jsr. .skip2: bcc .copy_large asl <bitbuf> ; 1 1 0 dddddddn bne .skip3 %LOAD_BIT(<bitbuf>, <srcptr>) ; opt: no jsr. .skip3: bcc .copy_normal ; 1 1 1 dddd - Copy 1 byte within 15 bytes (or zero). .copy_short: lda #$10 .nibble_loop: asl <bitbuf> bne .skip4 tax ; opt: 2-cycle. %LOAD_BIT(<bitbuf>, <srcptr>) ; opt: no jsr. txa ; opt: 2-cycle. .skip4: rol bcc .nibble_loop beq .write_byte ; Offset=0 means write zero. sta <scratch> ; opt: remove eor, tay, iny, dec, inc, ldy, beq. lda <dstptr> ; instead sbc directly, it's faster. tax ; opt: 2-cycle. sbc <scratch> sta <dstptr> lda (<dstptr>) ; Read the byte directly from the destination window. stx <dstptr> ; opt: 2-cycle. bra .write_byte .finished: rep #$30 ; Fin. lda <spbuf> ; load sp. tcs ; restore sp. lda $80 sta $004200 ; enable cli ; enable interrupts. sep #$30 plb ; restore bank. rep #$30 rts ; All decompressed! ; ; 1 1 0 dddddddn - Copy 2 or 3 within 128 bytes. ; .copy_normal: %GET_SRC(<srcptr>) ; 1 1 0 dddddddn lsr beq .finished ; Offset 0 == EOF. sta <offset> ; Preserve offset. tdc ; opt: Clear high byte of length sta <offset>+1 adc #$1 ; opt: (-1 hoisting), Low byte of length. bra .copy_page ; NZ from previous ADC. ; ; 1 0 <offset> <length> - gamma-coded LZSS pair. ; .copy_large: %GET_GAMMA(<bitbuf>, <winptr>, <srcptr>) ; opt: no jsr, Get length. cpx #$1 ; CC if LWM==0, CS if LWM==1. sbc #$2 ; -3 if LWM==0, -2 if LWM==1. stz <winptr>+1 ; opt: clear highbyte of window. bcs .normal_pair ; CC if LWM==0 && offset==2. tdc ; opt: clear high byte of length %GET_GAMMA(<bitbuf>, <winptr>, <srcptr>) ; opt: no jsr, Get length. bra .match_minus1 ; Use previous Offset. .match_minus1: dec ; opt: low byte of length -1 .copy_page: ; opt: mvn, Calc address of match and store. sty <scratch> ; opt: 2-cycle, store srcptr lowbyte. rep #$30 tcs ; opt: 2-cycle, store 2 byte length. lda <dstptr> ; load precomputed destptr. tay ; transfer cur dest. sec ; non opt: need to keep this. sbc <offset> ; opt: subtract full offset in one go. tax ; transfer src. tsc ; opt: 2-cycle, load 2 byte length. mvn $7f, $7f ; opt: mvn. sty <dstptr> ; opt: free computation of next dstptr sep #$30 ldx #$01 ; transfer 1 to x. ; LWM=1. ldy <scratch> ; opt: 2-cycle, load srcptr lowbyte. jmp .next_tag .normal_pair: tax ; opt: keep for cmp. stx <offset>+1 ; Save bits 8..15 of offset. %GET_SRC(<srcptr>) ; opt: no jsr. sta <offset> ; Save bits 0...7 of offset. %GET_GAMMA(<bitbuf>, <winptr>, <srcptr>) ; opt: no jsr. xba ; non-opt: put together length. lda <winptr>+1 ; load highbyte of length. xba ; non-opt: put together length. ; opt: instruction hoisting & reduction, removal of adcs, dec, inc. cpx #$00 ; If offset < 256. beq .lt256 cpx #$7D ; If offset >= 32000, length += 1. bcs .match_plus1 cpx #$05 ; If offset >= 1280, length += 0. bcs .copy_page bra .match_minus1 .lt256: ldx <offset> ; If offset < 128, length += 1. bmi .match_minus1 .match_plus1: inc bra .copy_page .end: endmacro
42.083333
104
0.437624
a6612f1b8f161eb0ac9682b99f652932ba01bc3a
43,413
asm
Assembly
ps.asm
anishkasachdeva/XV6_Operating_System
7bb874de6900f6f1ba72c0f27ed96c470d566f1d
[ "MIT-0" ]
null
null
null
ps.asm
anishkasachdeva/XV6_Operating_System
7bb874de6900f6f1ba72c0f27ed96c470d566f1d
[ "MIT-0" ]
null
null
null
ps.asm
anishkasachdeva/XV6_Operating_System
7bb874de6900f6f1ba72c0f27ed96c470d566f1d
[ "MIT-0" ]
null
null
null
_ps: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "user.h" #include "fcntl.h" int main(int argc, char *argv[]) { 0: 8d 4c 24 04 lea 0x4(%esp),%ecx 4: 83 e4 f0 and $0xfffffff0,%esp 7: ff 71 fc pushl -0x4(%ecx) a: 55 push %ebp b: 89 e5 mov %esp,%ebp d: 51 push %ecx e: 83 ec 04 sub $0x4,%esp cps(); 11: e8 f4 02 00 00 call 30a <cps> exit(); 16: e8 47 02 00 00 call 262 <exit> 1b: 66 90 xchg %ax,%ax 1d: 66 90 xchg %ax,%ax 1f: 90 nop 00000020 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, const char *t) { 20: 55 push %ebp 21: 89 e5 mov %esp,%ebp 23: 53 push %ebx 24: 8b 45 08 mov 0x8(%ebp),%eax 27: 8b 4d 0c mov 0xc(%ebp),%ecx char *os; os = s; while((*s++ = *t++) != 0) 2a: 89 c2 mov %eax,%edx 2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 30: 83 c1 01 add $0x1,%ecx 33: 0f b6 59 ff movzbl -0x1(%ecx),%ebx 37: 83 c2 01 add $0x1,%edx 3a: 84 db test %bl,%bl 3c: 88 5a ff mov %bl,-0x1(%edx) 3f: 75 ef jne 30 <strcpy+0x10> ; return os; } 41: 5b pop %ebx 42: 5d pop %ebp 43: c3 ret 44: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 4a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000050 <strcmp>: int strcmp(const char *p, const char *q) { 50: 55 push %ebp 51: 89 e5 mov %esp,%ebp 53: 56 push %esi 54: 53 push %ebx 55: 8b 55 08 mov 0x8(%ebp),%edx 58: 8b 4d 0c mov 0xc(%ebp),%ecx while(*p && *p == *q) 5b: 0f b6 02 movzbl (%edx),%eax 5e: 0f b6 19 movzbl (%ecx),%ebx 61: 84 c0 test %al,%al 63: 75 1e jne 83 <strcmp+0x33> 65: eb 29 jmp 90 <strcmp+0x40> 67: 89 f6 mov %esi,%esi 69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi p++, q++; 70: 83 c2 01 add $0x1,%edx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 73: 0f b6 02 movzbl (%edx),%eax p++, q++; 76: 8d 71 01 lea 0x1(%ecx),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 79: 0f b6 59 01 movzbl 0x1(%ecx),%ebx 7d: 84 c0 test %al,%al 7f: 74 0f je 90 <strcmp+0x40> 81: 89 f1 mov %esi,%ecx 83: 38 d8 cmp %bl,%al 85: 74 e9 je 70 <strcmp+0x20> p++, q++; return (uchar)*p - (uchar)*q; 87: 29 d8 sub %ebx,%eax } 89: 5b pop %ebx 8a: 5e pop %esi 8b: 5d pop %ebp 8c: c3 ret 8d: 8d 76 00 lea 0x0(%esi),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 90: 31 c0 xor %eax,%eax p++, q++; return (uchar)*p - (uchar)*q; 92: 29 d8 sub %ebx,%eax } 94: 5b pop %ebx 95: 5e pop %esi 96: 5d pop %ebp 97: c3 ret 98: 90 nop 99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 000000a0 <strlen>: uint strlen(const char *s) { a0: 55 push %ebp a1: 89 e5 mov %esp,%ebp a3: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) a6: 80 39 00 cmpb $0x0,(%ecx) a9: 74 12 je bd <strlen+0x1d> ab: 31 d2 xor %edx,%edx ad: 8d 76 00 lea 0x0(%esi),%esi b0: 83 c2 01 add $0x1,%edx b3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) b7: 89 d0 mov %edx,%eax b9: 75 f5 jne b0 <strlen+0x10> ; return n; } bb: 5d pop %ebp bc: c3 ret uint strlen(const char *s) { int n; for(n = 0; s[n]; n++) bd: 31 c0 xor %eax,%eax ; return n; } bf: 5d pop %ebp c0: c3 ret c1: eb 0d jmp d0 <memset> c3: 90 nop c4: 90 nop c5: 90 nop c6: 90 nop c7: 90 nop c8: 90 nop c9: 90 nop ca: 90 nop cb: 90 nop cc: 90 nop cd: 90 nop ce: 90 nop cf: 90 nop 000000d0 <memset>: void* memset(void *dst, int c, uint n) { d0: 55 push %ebp d1: 89 e5 mov %esp,%ebp d3: 57 push %edi d4: 8b 55 08 mov 0x8(%ebp),%edx } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : d7: 8b 4d 10 mov 0x10(%ebp),%ecx da: 8b 45 0c mov 0xc(%ebp),%eax dd: 89 d7 mov %edx,%edi df: fc cld e0: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } e2: 89 d0 mov %edx,%eax e4: 5f pop %edi e5: 5d pop %ebp e6: c3 ret e7: 89 f6 mov %esi,%esi e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000000f0 <strchr>: char* strchr(const char *s, char c) { f0: 55 push %ebp f1: 89 e5 mov %esp,%ebp f3: 53 push %ebx f4: 8b 45 08 mov 0x8(%ebp),%eax f7: 8b 5d 0c mov 0xc(%ebp),%ebx for(; *s; s++) fa: 0f b6 10 movzbl (%eax),%edx fd: 84 d2 test %dl,%dl ff: 74 1d je 11e <strchr+0x2e> if(*s == c) 101: 38 d3 cmp %dl,%bl 103: 89 d9 mov %ebx,%ecx 105: 75 0d jne 114 <strchr+0x24> 107: eb 17 jmp 120 <strchr+0x30> 109: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 110: 38 ca cmp %cl,%dl 112: 74 0c je 120 <strchr+0x30> } char* strchr(const char *s, char c) { for(; *s; s++) 114: 83 c0 01 add $0x1,%eax 117: 0f b6 10 movzbl (%eax),%edx 11a: 84 d2 test %dl,%dl 11c: 75 f2 jne 110 <strchr+0x20> if(*s == c) return (char*)s; return 0; 11e: 31 c0 xor %eax,%eax } 120: 5b pop %ebx 121: 5d pop %ebp 122: c3 ret 123: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 129: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000130 <gets>: char* gets(char *buf, int max) { 130: 55 push %ebp 131: 89 e5 mov %esp,%ebp 133: 57 push %edi 134: 56 push %esi 135: 53 push %ebx int i, cc; char c; for(i=0; i+1 < max; ){ 136: 31 f6 xor %esi,%esi cc = read(0, &c, 1); 138: 8d 7d e7 lea -0x19(%ebp),%edi return 0; } char* gets(char *buf, int max) { 13b: 83 ec 1c sub $0x1c,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 13e: eb 29 jmp 169 <gets+0x39> cc = read(0, &c, 1); 140: 83 ec 04 sub $0x4,%esp 143: 6a 01 push $0x1 145: 57 push %edi 146: 6a 00 push $0x0 148: e8 2d 01 00 00 call 27a <read> if(cc < 1) 14d: 83 c4 10 add $0x10,%esp 150: 85 c0 test %eax,%eax 152: 7e 1d jle 171 <gets+0x41> break; buf[i++] = c; 154: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 158: 8b 55 08 mov 0x8(%ebp),%edx 15b: 89 de mov %ebx,%esi if(c == '\n' || c == '\r') 15d: 3c 0a cmp $0xa,%al for(i=0; i+1 < max; ){ cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; 15f: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1) if(c == '\n' || c == '\r') 163: 74 1b je 180 <gets+0x50> 165: 3c 0d cmp $0xd,%al 167: 74 17 je 180 <gets+0x50> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 169: 8d 5e 01 lea 0x1(%esi),%ebx 16c: 3b 5d 0c cmp 0xc(%ebp),%ebx 16f: 7c cf jl 140 <gets+0x10> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 171: 8b 45 08 mov 0x8(%ebp),%eax 174: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } 178: 8d 65 f4 lea -0xc(%ebp),%esp 17b: 5b pop %ebx 17c: 5e pop %esi 17d: 5f pop %edi 17e: 5d pop %ebp 17f: c3 ret break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 180: 8b 45 08 mov 0x8(%ebp),%eax gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 183: 89 de mov %ebx,%esi break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 185: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } 189: 8d 65 f4 lea -0xc(%ebp),%esp 18c: 5b pop %ebx 18d: 5e pop %esi 18e: 5f pop %edi 18f: 5d pop %ebp 190: c3 ret 191: eb 0d jmp 1a0 <stat> 193: 90 nop 194: 90 nop 195: 90 nop 196: 90 nop 197: 90 nop 198: 90 nop 199: 90 nop 19a: 90 nop 19b: 90 nop 19c: 90 nop 19d: 90 nop 19e: 90 nop 19f: 90 nop 000001a0 <stat>: int stat(const char *n, struct stat *st) { 1a0: 55 push %ebp 1a1: 89 e5 mov %esp,%ebp 1a3: 56 push %esi 1a4: 53 push %ebx int fd; int r; fd = open(n, O_RDONLY); 1a5: 83 ec 08 sub $0x8,%esp 1a8: 6a 00 push $0x0 1aa: ff 75 08 pushl 0x8(%ebp) 1ad: e8 f0 00 00 00 call 2a2 <open> if(fd < 0) 1b2: 83 c4 10 add $0x10,%esp 1b5: 85 c0 test %eax,%eax 1b7: 78 27 js 1e0 <stat+0x40> return -1; r = fstat(fd, st); 1b9: 83 ec 08 sub $0x8,%esp 1bc: ff 75 0c pushl 0xc(%ebp) 1bf: 89 c3 mov %eax,%ebx 1c1: 50 push %eax 1c2: e8 f3 00 00 00 call 2ba <fstat> 1c7: 89 c6 mov %eax,%esi close(fd); 1c9: 89 1c 24 mov %ebx,(%esp) 1cc: e8 b9 00 00 00 call 28a <close> return r; 1d1: 83 c4 10 add $0x10,%esp 1d4: 89 f0 mov %esi,%eax } 1d6: 8d 65 f8 lea -0x8(%ebp),%esp 1d9: 5b pop %ebx 1da: 5e pop %esi 1db: 5d pop %ebp 1dc: c3 ret 1dd: 8d 76 00 lea 0x0(%esi),%esi int fd; int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; 1e0: b8 ff ff ff ff mov $0xffffffff,%eax 1e5: eb ef jmp 1d6 <stat+0x36> 1e7: 89 f6 mov %esi,%esi 1e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000001f0 <atoi>: return r; } int atoi(const char *s) { 1f0: 55 push %ebp 1f1: 89 e5 mov %esp,%ebp 1f3: 53 push %ebx 1f4: 8b 4d 08 mov 0x8(%ebp),%ecx int n; n = 0; while('0' <= *s && *s <= '9') 1f7: 0f be 11 movsbl (%ecx),%edx 1fa: 8d 42 d0 lea -0x30(%edx),%eax 1fd: 3c 09 cmp $0x9,%al 1ff: b8 00 00 00 00 mov $0x0,%eax 204: 77 1f ja 225 <atoi+0x35> 206: 8d 76 00 lea 0x0(%esi),%esi 209: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi n = n*10 + *s++ - '0'; 210: 8d 04 80 lea (%eax,%eax,4),%eax 213: 83 c1 01 add $0x1,%ecx 216: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 21a: 0f be 11 movsbl (%ecx),%edx 21d: 8d 5a d0 lea -0x30(%edx),%ebx 220: 80 fb 09 cmp $0x9,%bl 223: 76 eb jbe 210 <atoi+0x20> n = n*10 + *s++ - '0'; return n; } 225: 5b pop %ebx 226: 5d pop %ebp 227: c3 ret 228: 90 nop 229: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000230 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { 230: 55 push %ebp 231: 89 e5 mov %esp,%ebp 233: 56 push %esi 234: 53 push %ebx 235: 8b 5d 10 mov 0x10(%ebp),%ebx 238: 8b 45 08 mov 0x8(%ebp),%eax 23b: 8b 75 0c mov 0xc(%ebp),%esi char *dst; const char *src; dst = vdst; src = vsrc; while(n-- > 0) 23e: 85 db test %ebx,%ebx 240: 7e 14 jle 256 <memmove+0x26> 242: 31 d2 xor %edx,%edx 244: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *dst++ = *src++; 248: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 24c: 88 0c 10 mov %cl,(%eax,%edx,1) 24f: 83 c2 01 add $0x1,%edx char *dst; const char *src; dst = vdst; src = vsrc; while(n-- > 0) 252: 39 da cmp %ebx,%edx 254: 75 f2 jne 248 <memmove+0x18> *dst++ = *src++; return vdst; } 256: 5b pop %ebx 257: 5e pop %esi 258: 5d pop %ebp 259: c3 ret 0000025a <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 25a: b8 01 00 00 00 mov $0x1,%eax 25f: cd 40 int $0x40 261: c3 ret 00000262 <exit>: SYSCALL(exit) 262: b8 02 00 00 00 mov $0x2,%eax 267: cd 40 int $0x40 269: c3 ret 0000026a <wait>: SYSCALL(wait) 26a: b8 03 00 00 00 mov $0x3,%eax 26f: cd 40 int $0x40 271: c3 ret 00000272 <pipe>: SYSCALL(pipe) 272: b8 04 00 00 00 mov $0x4,%eax 277: cd 40 int $0x40 279: c3 ret 0000027a <read>: SYSCALL(read) 27a: b8 05 00 00 00 mov $0x5,%eax 27f: cd 40 int $0x40 281: c3 ret 00000282 <write>: SYSCALL(write) 282: b8 10 00 00 00 mov $0x10,%eax 287: cd 40 int $0x40 289: c3 ret 0000028a <close>: SYSCALL(close) 28a: b8 15 00 00 00 mov $0x15,%eax 28f: cd 40 int $0x40 291: c3 ret 00000292 <kill>: SYSCALL(kill) 292: b8 06 00 00 00 mov $0x6,%eax 297: cd 40 int $0x40 299: c3 ret 0000029a <exec>: SYSCALL(exec) 29a: b8 07 00 00 00 mov $0x7,%eax 29f: cd 40 int $0x40 2a1: c3 ret 000002a2 <open>: SYSCALL(open) 2a2: b8 0f 00 00 00 mov $0xf,%eax 2a7: cd 40 int $0x40 2a9: c3 ret 000002aa <mknod>: SYSCALL(mknod) 2aa: b8 11 00 00 00 mov $0x11,%eax 2af: cd 40 int $0x40 2b1: c3 ret 000002b2 <unlink>: SYSCALL(unlink) 2b2: b8 12 00 00 00 mov $0x12,%eax 2b7: cd 40 int $0x40 2b9: c3 ret 000002ba <fstat>: SYSCALL(fstat) 2ba: b8 08 00 00 00 mov $0x8,%eax 2bf: cd 40 int $0x40 2c1: c3 ret 000002c2 <link>: SYSCALL(link) 2c2: b8 13 00 00 00 mov $0x13,%eax 2c7: cd 40 int $0x40 2c9: c3 ret 000002ca <mkdir>: SYSCALL(mkdir) 2ca: b8 14 00 00 00 mov $0x14,%eax 2cf: cd 40 int $0x40 2d1: c3 ret 000002d2 <chdir>: SYSCALL(chdir) 2d2: b8 09 00 00 00 mov $0x9,%eax 2d7: cd 40 int $0x40 2d9: c3 ret 000002da <dup>: SYSCALL(dup) 2da: b8 0a 00 00 00 mov $0xa,%eax 2df: cd 40 int $0x40 2e1: c3 ret 000002e2 <getpid>: SYSCALL(getpid) 2e2: b8 0b 00 00 00 mov $0xb,%eax 2e7: cd 40 int $0x40 2e9: c3 ret 000002ea <sbrk>: SYSCALL(sbrk) 2ea: b8 0c 00 00 00 mov $0xc,%eax 2ef: cd 40 int $0x40 2f1: c3 ret 000002f2 <sleep>: SYSCALL(sleep) 2f2: b8 0d 00 00 00 mov $0xd,%eax 2f7: cd 40 int $0x40 2f9: c3 ret 000002fa <waitx>: SYSCALL(waitx) 2fa: b8 16 00 00 00 mov $0x16,%eax 2ff: cd 40 int $0x40 301: c3 ret 00000302 <getpinfo>: SYSCALL(getpinfo) 302: b8 17 00 00 00 mov $0x17,%eax 307: cd 40 int $0x40 309: c3 ret 0000030a <cps>: SYSCALL(cps) 30a: b8 18 00 00 00 mov $0x18,%eax 30f: cd 40 int $0x40 311: c3 ret 00000312 <set_priority>: 312: b8 19 00 00 00 mov $0x19,%eax 317: cd 40 int $0x40 319: c3 ret 31a: 66 90 xchg %ax,%ax 31c: 66 90 xchg %ax,%ax 31e: 66 90 xchg %ax,%ax 00000320 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 320: 55 push %ebp 321: 89 e5 mov %esp,%ebp 323: 57 push %edi 324: 56 push %esi 325: 53 push %ebx 326: 89 c6 mov %eax,%esi 328: 83 ec 3c sub $0x3c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 32b: 8b 5d 08 mov 0x8(%ebp),%ebx 32e: 85 db test %ebx,%ebx 330: 74 7e je 3b0 <printint+0x90> 332: 89 d0 mov %edx,%eax 334: c1 e8 1f shr $0x1f,%eax 337: 84 c0 test %al,%al 339: 74 75 je 3b0 <printint+0x90> neg = 1; x = -xx; 33b: 89 d0 mov %edx,%eax int i, neg; uint x; neg = 0; if(sgn && xx < 0){ neg = 1; 33d: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) x = -xx; 344: f7 d8 neg %eax 346: 89 75 c0 mov %esi,-0x40(%ebp) } else { x = xx; } i = 0; 349: 31 ff xor %edi,%edi 34b: 8d 5d d7 lea -0x29(%ebp),%ebx 34e: 89 ce mov %ecx,%esi 350: eb 08 jmp 35a <printint+0x3a> 352: 8d b6 00 00 00 00 lea 0x0(%esi),%esi do{ buf[i++] = digits[x % base]; 358: 89 cf mov %ecx,%edi 35a: 31 d2 xor %edx,%edx 35c: 8d 4f 01 lea 0x1(%edi),%ecx 35f: f7 f6 div %esi 361: 0f b6 92 e8 06 00 00 movzbl 0x6e8(%edx),%edx }while((x /= base) != 0); 368: 85 c0 test %eax,%eax x = xx; } i = 0; do{ buf[i++] = digits[x % base]; 36a: 88 14 0b mov %dl,(%ebx,%ecx,1) }while((x /= base) != 0); 36d: 75 e9 jne 358 <printint+0x38> if(neg) 36f: 8b 45 c4 mov -0x3c(%ebp),%eax 372: 8b 75 c0 mov -0x40(%ebp),%esi 375: 85 c0 test %eax,%eax 377: 74 08 je 381 <printint+0x61> buf[i++] = '-'; 379: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1) 37e: 8d 4f 02 lea 0x2(%edi),%ecx 381: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi 385: 8d 76 00 lea 0x0(%esi),%esi 388: 0f b6 07 movzbl (%edi),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 38b: 83 ec 04 sub $0x4,%esp 38e: 83 ef 01 sub $0x1,%edi 391: 6a 01 push $0x1 393: 53 push %ebx 394: 56 push %esi 395: 88 45 d7 mov %al,-0x29(%ebp) 398: e8 e5 fe ff ff call 282 <write> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 39d: 83 c4 10 add $0x10,%esp 3a0: 39 df cmp %ebx,%edi 3a2: 75 e4 jne 388 <printint+0x68> putc(fd, buf[i]); } 3a4: 8d 65 f4 lea -0xc(%ebp),%esp 3a7: 5b pop %ebx 3a8: 5e pop %esi 3a9: 5f pop %edi 3aa: 5d pop %ebp 3ab: c3 ret 3ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi neg = 0; if(sgn && xx < 0){ neg = 1; x = -xx; } else { x = xx; 3b0: 89 d0 mov %edx,%eax static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 3b2: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 3b9: eb 8b jmp 346 <printint+0x26> 3bb: 90 nop 3bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 000003c0 <printf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 3c0: 55 push %ebp 3c1: 89 e5 mov %esp,%ebp 3c3: 57 push %edi 3c4: 56 push %esi 3c5: 53 push %ebx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 3c6: 8d 45 10 lea 0x10(%ebp),%eax } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 3c9: 83 ec 2c sub $0x2c,%esp int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 3cc: 8b 75 0c mov 0xc(%ebp),%esi } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 3cf: 8b 7d 08 mov 0x8(%ebp),%edi int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 3d2: 89 45 d0 mov %eax,-0x30(%ebp) 3d5: 0f b6 1e movzbl (%esi),%ebx 3d8: 83 c6 01 add $0x1,%esi 3db: 84 db test %bl,%bl 3dd: 0f 84 b0 00 00 00 je 493 <printf+0xd3> 3e3: 31 d2 xor %edx,%edx 3e5: eb 39 jmp 420 <printf+0x60> 3e7: 89 f6 mov %esi,%esi 3e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 3f0: 83 f8 25 cmp $0x25,%eax 3f3: 89 55 d4 mov %edx,-0x2c(%ebp) state = '%'; 3f6: ba 25 00 00 00 mov $0x25,%edx state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 3fb: 74 18 je 415 <printf+0x55> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 3fd: 8d 45 e2 lea -0x1e(%ebp),%eax 400: 83 ec 04 sub $0x4,%esp 403: 88 5d e2 mov %bl,-0x1e(%ebp) 406: 6a 01 push $0x1 408: 50 push %eax 409: 57 push %edi 40a: e8 73 fe ff ff call 282 <write> 40f: 8b 55 d4 mov -0x2c(%ebp),%edx 412: 83 c4 10 add $0x10,%esp 415: 83 c6 01 add $0x1,%esi int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 418: 0f b6 5e ff movzbl -0x1(%esi),%ebx 41c: 84 db test %bl,%bl 41e: 74 73 je 493 <printf+0xd3> c = fmt[i] & 0xff; if(state == 0){ 420: 85 d2 test %edx,%edx uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; 422: 0f be cb movsbl %bl,%ecx 425: 0f b6 c3 movzbl %bl,%eax if(state == 0){ 428: 74 c6 je 3f0 <printf+0x30> if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 42a: 83 fa 25 cmp $0x25,%edx 42d: 75 e6 jne 415 <printf+0x55> if(c == 'd'){ 42f: 83 f8 64 cmp $0x64,%eax 432: 0f 84 f8 00 00 00 je 530 <printf+0x170> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 438: 81 e1 f7 00 00 00 and $0xf7,%ecx 43e: 83 f9 70 cmp $0x70,%ecx 441: 74 5d je 4a0 <printf+0xe0> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 443: 83 f8 73 cmp $0x73,%eax 446: 0f 84 84 00 00 00 je 4d0 <printf+0x110> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 44c: 83 f8 63 cmp $0x63,%eax 44f: 0f 84 ea 00 00 00 je 53f <printf+0x17f> putc(fd, *ap); ap++; } else if(c == '%'){ 455: 83 f8 25 cmp $0x25,%eax 458: 0f 84 c2 00 00 00 je 520 <printf+0x160> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 45e: 8d 45 e7 lea -0x19(%ebp),%eax 461: 83 ec 04 sub $0x4,%esp 464: c6 45 e7 25 movb $0x25,-0x19(%ebp) 468: 6a 01 push $0x1 46a: 50 push %eax 46b: 57 push %edi 46c: e8 11 fe ff ff call 282 <write> 471: 83 c4 0c add $0xc,%esp 474: 8d 45 e6 lea -0x1a(%ebp),%eax 477: 88 5d e6 mov %bl,-0x1a(%ebp) 47a: 6a 01 push $0x1 47c: 50 push %eax 47d: 57 push %edi 47e: 83 c6 01 add $0x1,%esi 481: e8 fc fd ff ff call 282 <write> int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 486: 0f b6 5e ff movzbl -0x1(%esi),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 48a: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 48d: 31 d2 xor %edx,%edx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 48f: 84 db test %bl,%bl 491: 75 8d jne 420 <printf+0x60> putc(fd, c); } state = 0; } } } 493: 8d 65 f4 lea -0xc(%ebp),%esp 496: 5b pop %ebx 497: 5e pop %esi 498: 5f pop %edi 499: 5d pop %ebp 49a: c3 ret 49b: 90 nop 49c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 4a0: 83 ec 0c sub $0xc,%esp 4a3: b9 10 00 00 00 mov $0x10,%ecx 4a8: 6a 00 push $0x0 4aa: 8b 5d d0 mov -0x30(%ebp),%ebx 4ad: 89 f8 mov %edi,%eax 4af: 8b 13 mov (%ebx),%edx 4b1: e8 6a fe ff ff call 320 <printint> ap++; 4b6: 89 d8 mov %ebx,%eax 4b8: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 4bb: 31 d2 xor %edx,%edx if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); ap++; 4bd: 83 c0 04 add $0x4,%eax 4c0: 89 45 d0 mov %eax,-0x30(%ebp) 4c3: e9 4d ff ff ff jmp 415 <printf+0x55> 4c8: 90 nop 4c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi } else if(c == 's'){ s = (char*)*ap; 4d0: 8b 45 d0 mov -0x30(%ebp),%eax 4d3: 8b 18 mov (%eax),%ebx ap++; 4d5: 83 c0 04 add $0x4,%eax 4d8: 89 45 d0 mov %eax,-0x30(%ebp) if(s == 0) s = "(null)"; 4db: b8 e0 06 00 00 mov $0x6e0,%eax 4e0: 85 db test %ebx,%ebx 4e2: 0f 44 d8 cmove %eax,%ebx while(*s != 0){ 4e5: 0f b6 03 movzbl (%ebx),%eax 4e8: 84 c0 test %al,%al 4ea: 74 23 je 50f <printf+0x14f> 4ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 4f0: 88 45 e3 mov %al,-0x1d(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 4f3: 8d 45 e3 lea -0x1d(%ebp),%eax 4f6: 83 ec 04 sub $0x4,%esp 4f9: 6a 01 push $0x1 ap++; if(s == 0) s = "(null)"; while(*s != 0){ putc(fd, *s); s++; 4fb: 83 c3 01 add $0x1,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 4fe: 50 push %eax 4ff: 57 push %edi 500: e8 7d fd ff ff call 282 <write> } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 505: 0f b6 03 movzbl (%ebx),%eax 508: 83 c4 10 add $0x10,%esp 50b: 84 c0 test %al,%al 50d: 75 e1 jne 4f0 <printf+0x130> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 50f: 31 d2 xor %edx,%edx 511: e9 ff fe ff ff jmp 415 <printf+0x55> 516: 8d 76 00 lea 0x0(%esi),%esi 519: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 520: 83 ec 04 sub $0x4,%esp 523: 88 5d e5 mov %bl,-0x1b(%ebp) 526: 8d 45 e5 lea -0x1b(%ebp),%eax 529: 6a 01 push $0x1 52b: e9 4c ff ff ff jmp 47c <printf+0xbc> } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 530: 83 ec 0c sub $0xc,%esp 533: b9 0a 00 00 00 mov $0xa,%ecx 538: 6a 01 push $0x1 53a: e9 6b ff ff ff jmp 4aa <printf+0xea> 53f: 8b 5d d0 mov -0x30(%ebp),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 542: 83 ec 04 sub $0x4,%esp 545: 8b 03 mov (%ebx),%eax 547: 6a 01 push $0x1 549: 88 45 e4 mov %al,-0x1c(%ebp) 54c: 8d 45 e4 lea -0x1c(%ebp),%eax 54f: 50 push %eax 550: 57 push %edi 551: e8 2c fd ff ff call 282 <write> 556: e9 5b ff ff ff jmp 4b6 <printf+0xf6> 55b: 66 90 xchg %ax,%ax 55d: 66 90 xchg %ax,%ax 55f: 90 nop 00000560 <free>: static Header base; static Header *freep; void free(void *ap) { 560: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 561: a1 80 09 00 00 mov 0x980,%eax static Header base; static Header *freep; void free(void *ap) { 566: 89 e5 mov %esp,%ebp 568: 57 push %edi 569: 56 push %esi 56a: 53 push %ebx 56b: 8b 5d 08 mov 0x8(%ebp),%ebx Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 56e: 8b 10 mov (%eax),%edx void free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; 570: 8d 4b f8 lea -0x8(%ebx),%ecx for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 573: 39 c8 cmp %ecx,%eax 575: 73 19 jae 590 <free+0x30> 577: 89 f6 mov %esi,%esi 579: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 580: 39 d1 cmp %edx,%ecx 582: 72 1c jb 5a0 <free+0x40> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 584: 39 d0 cmp %edx,%eax 586: 73 18 jae 5a0 <free+0x40> static Header base; static Header *freep; void free(void *ap) { 588: 89 d0 mov %edx,%eax Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 58a: 39 c8 cmp %ecx,%eax if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 58c: 8b 10 mov (%eax),%edx free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 58e: 72 f0 jb 580 <free+0x20> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 590: 39 d0 cmp %edx,%eax 592: 72 f4 jb 588 <free+0x28> 594: 39 d1 cmp %edx,%ecx 596: 73 f0 jae 588 <free+0x28> 598: 90 nop 599: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi break; if(bp + bp->s.size == p->s.ptr){ 5a0: 8b 73 fc mov -0x4(%ebx),%esi 5a3: 8d 3c f1 lea (%ecx,%esi,8),%edi 5a6: 39 d7 cmp %edx,%edi 5a8: 74 19 je 5c3 <free+0x63> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 5aa: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 5ad: 8b 50 04 mov 0x4(%eax),%edx 5b0: 8d 34 d0 lea (%eax,%edx,8),%esi 5b3: 39 f1 cmp %esi,%ecx 5b5: 74 23 je 5da <free+0x7a> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 5b7: 89 08 mov %ecx,(%eax) freep = p; 5b9: a3 80 09 00 00 mov %eax,0x980 } 5be: 5b pop %ebx 5bf: 5e pop %esi 5c0: 5f pop %edi 5c1: 5d pop %ebp 5c2: c3 ret bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ bp->s.size += p->s.ptr->s.size; 5c3: 03 72 04 add 0x4(%edx),%esi 5c6: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 5c9: 8b 10 mov (%eax),%edx 5cb: 8b 12 mov (%edx),%edx 5cd: 89 53 f8 mov %edx,-0x8(%ebx) } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ 5d0: 8b 50 04 mov 0x4(%eax),%edx 5d3: 8d 34 d0 lea (%eax,%edx,8),%esi 5d6: 39 f1 cmp %esi,%ecx 5d8: 75 dd jne 5b7 <free+0x57> p->s.size += bp->s.size; 5da: 03 53 fc add -0x4(%ebx),%edx p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; freep = p; 5dd: a3 80 09 00 00 mov %eax,0x980 bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ p->s.size += bp->s.size; 5e2: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 5e5: 8b 53 f8 mov -0x8(%ebx),%edx 5e8: 89 10 mov %edx,(%eax) } else p->s.ptr = bp; freep = p; } 5ea: 5b pop %ebx 5eb: 5e pop %esi 5ec: 5f pop %edi 5ed: 5d pop %ebp 5ee: c3 ret 5ef: 90 nop 000005f0 <malloc>: return freep; } void* malloc(uint nbytes) { 5f0: 55 push %ebp 5f1: 89 e5 mov %esp,%ebp 5f3: 57 push %edi 5f4: 56 push %esi 5f5: 53 push %ebx 5f6: 83 ec 0c sub $0xc,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 5f9: 8b 45 08 mov 0x8(%ebp),%eax if((prevp = freep) == 0){ 5fc: 8b 15 80 09 00 00 mov 0x980,%edx malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 602: 8d 78 07 lea 0x7(%eax),%edi 605: c1 ef 03 shr $0x3,%edi 608: 83 c7 01 add $0x1,%edi if((prevp = freep) == 0){ 60b: 85 d2 test %edx,%edx 60d: 0f 84 a3 00 00 00 je 6b6 <malloc+0xc6> 613: 8b 02 mov (%edx),%eax 615: 8b 48 04 mov 0x4(%eax),%ecx base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ 618: 39 cf cmp %ecx,%edi 61a: 76 74 jbe 690 <malloc+0xa0> 61c: 81 ff 00 10 00 00 cmp $0x1000,%edi 622: be 00 10 00 00 mov $0x1000,%esi 627: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx 62e: 0f 43 f7 cmovae %edi,%esi 631: ba 00 80 00 00 mov $0x8000,%edx 636: 81 ff ff 0f 00 00 cmp $0xfff,%edi 63c: 0f 46 da cmovbe %edx,%ebx 63f: eb 10 jmp 651 <malloc+0x61> 641: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 648: 8b 02 mov (%edx),%eax if(p->s.size >= nunits){ 64a: 8b 48 04 mov 0x4(%eax),%ecx 64d: 39 cf cmp %ecx,%edi 64f: 76 3f jbe 690 <malloc+0xa0> p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 651: 39 05 80 09 00 00 cmp %eax,0x980 657: 89 c2 mov %eax,%edx 659: 75 ed jne 648 <malloc+0x58> char *p; Header *hp; if(nu < 4096) nu = 4096; p = sbrk(nu * sizeof(Header)); 65b: 83 ec 0c sub $0xc,%esp 65e: 53 push %ebx 65f: e8 86 fc ff ff call 2ea <sbrk> if(p == (char*)-1) 664: 83 c4 10 add $0x10,%esp 667: 83 f8 ff cmp $0xffffffff,%eax 66a: 74 1c je 688 <malloc+0x98> return 0; hp = (Header*)p; hp->s.size = nu; 66c: 89 70 04 mov %esi,0x4(%eax) free((void*)(hp + 1)); 66f: 83 ec 0c sub $0xc,%esp 672: 83 c0 08 add $0x8,%eax 675: 50 push %eax 676: e8 e5 fe ff ff call 560 <free> return freep; 67b: 8b 15 80 09 00 00 mov 0x980,%edx } freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) 681: 83 c4 10 add $0x10,%esp 684: 85 d2 test %edx,%edx 686: 75 c0 jne 648 <malloc+0x58> return 0; 688: 31 c0 xor %eax,%eax 68a: eb 1c jmp 6a8 <malloc+0xb8> 68c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ if(p->s.size == nunits) 690: 39 cf cmp %ecx,%edi 692: 74 1c je 6b0 <malloc+0xc0> prevp->s.ptr = p->s.ptr; else { p->s.size -= nunits; 694: 29 f9 sub %edi,%ecx 696: 89 48 04 mov %ecx,0x4(%eax) p += p->s.size; 699: 8d 04 c8 lea (%eax,%ecx,8),%eax p->s.size = nunits; 69c: 89 78 04 mov %edi,0x4(%eax) } freep = prevp; 69f: 89 15 80 09 00 00 mov %edx,0x980 return (void*)(p + 1); 6a5: 83 c0 08 add $0x8,%eax } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } } 6a8: 8d 65 f4 lea -0xc(%ebp),%esp 6ab: 5b pop %ebx 6ac: 5e pop %esi 6ad: 5f pop %edi 6ae: 5d pop %ebp 6af: c3 ret base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ if(p->s.size == nunits) prevp->s.ptr = p->s.ptr; 6b0: 8b 08 mov (%eax),%ecx 6b2: 89 0a mov %ecx,(%edx) 6b4: eb e9 jmp 69f <malloc+0xaf> Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 6b6: c7 05 80 09 00 00 84 movl $0x984,0x980 6bd: 09 00 00 6c0: c7 05 84 09 00 00 84 movl $0x984,0x984 6c7: 09 00 00 base.s.size = 0; 6ca: b8 84 09 00 00 mov $0x984,%eax 6cf: c7 05 88 09 00 00 00 movl $0x0,0x988 6d6: 00 00 00 6d9: e9 3e ff ff ff jmp 61c <malloc+0x2c>
29.734932
60
0.41066
c10802750cf9e8e4fb6c8851ef923cdd90238d3e
114
asm
Assembly
libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_atanh.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_atanh.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_atanh.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_am9511 PUBLIC cam32_sccz80_atanh EXTERN _am9511_atanh defc cam32_sccz80_atanh = _am9511_atanh
12.666667
39
0.868421
37408cd0a48dc50070e195a5b5092f2c62a86364
653
asm
Assembly
libsrc/_DEVELOPMENT/arch/zxn/memory/z80/asm_zxn_read_sysvar_bank_state.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/arch/zxn/memory/z80/asm_zxn_read_sysvar_bank_state.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/arch/zxn/memory/z80/asm_zxn_read_sysvar_bank_state.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; =============================================================== ; 2017 ; =============================================================== ; ; unsigned int zxn_read_sysvar_bank_state(void) ; ; =============================================================== INCLUDE "config_private.inc" SECTION code_clib SECTION code_arch PUBLIC asm_zxn_read_sysvar_bank_state asm_zxn_read_sysvar_bank_state: ; read system variables BANKM and BANK678 ; (convenience function) ; ; enter : none ; ; exit : h = BANK678 ; l = BANKM ; ; uses : a, hl ld hl,(__SYSVAR_BANKM) ld a,(__SYSVAR_BANK678) ld h,a ret
19.205882
65
0.456355
2497efa19e11dfab7e712e436d0195bc93a94637
6,051
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_zr_un_/i7-7700_9_0xca.log_21829_1197.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_zr_un_/i7-7700_9_0xca.log_21829_1197.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_zr_un_/i7-7700_9_0xca.log_21829_1197.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 %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x12999, %r13 nop nop nop inc %r12 mov $0x6162636465666768, %r11 movq %r11, (%r13) nop nop nop cmp $21756, %rcx lea addresses_D_ht+0x14f09, %rsi lea addresses_WC_ht+0xc489, %rdi clflush (%rdi) nop nop nop nop dec %rbx mov $80, %rcx rep movsb nop nop nop nop xor $46417, %rdi lea addresses_normal_ht+0xb789, %rsi clflush (%rsi) xor $10874, %r12 movw $0x6162, (%rsi) nop nop nop and $10290, %rsi lea addresses_normal_ht+0xab89, %rdi nop nop nop nop xor %rcx, %rcx movb $0x61, (%rdi) nop nop nop cmp %r13, %r13 lea addresses_D_ht+0x14751, %rsi lea addresses_normal_ht+0x6d19, %rdi nop nop xor %r9, %r9 mov $39, %rcx rep movsw xor $51619, %r9 lea addresses_WT_ht+0x7f89, %rdi nop nop nop nop xor %rsi, %rsi mov $0x6162636465666768, %r11 movq %r11, %xmm7 vmovups %ymm7, (%rdi) nop cmp %r11, %r11 pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r15 push %r9 push %rbp push %rcx push %rdi push %rdx push %rsi // Load lea addresses_D+0x14389, %rbp nop nop sub %r9, %r9 mov (%rbp), %r15d nop nop nop nop nop sub %r9, %r9 // REPMOV lea addresses_RW+0xeb89, %rsi lea addresses_PSE+0xbb89, %rdi nop nop add %rdx, %rdx mov $82, %rcx rep movsb nop nop sub %rcx, %rcx // Faulty Load mov $0x3d99d60000000b89, %rsi nop nop nop nop sub $6533, %rdx mov (%rsi), %r15d lea oracles, %rdx and $0xff, %r15 shlq $12, %r15 mov (%rdx,%r15,1), %r15 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': True, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} {'src': {'congruent': 2, 'AVXalign': True, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_RW'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_PSE'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': True, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': True, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}} {'32': 21323, '00': 492, '90': 14} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 00 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32 32 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
37.583851
2,999
0.658899
541ac910a037a0770324b5243049eb5b9d4a8bb2
3,387
asm
Assembly
libraries/lib.source/console/screen_lores.asm
paulscottrobson/next-hla-6
eaaf2ec51d6346d36d903dca494b498efe9dc48b
[ "MIT" ]
1
2020-06-10T09:57:49.000Z
2020-06-10T09:57:49.000Z
libraries/lib.source/console/screen_lores.asm
paulscottrobson/next-hla-6
eaaf2ec51d6346d36d903dca494b498efe9dc48b
[ "MIT" ]
null
null
null
libraries/lib.source/console/screen_lores.asm
paulscottrobson/next-hla-6
eaaf2ec51d6346d36d903dca494b498efe9dc48b
[ "MIT" ]
null
null
null
; ********************************************************************************* ; ********************************************************************************* ; ; File: screen_lores.asm ; Purpose: LowRes console interface, sprites enabled. ; Date : 1st January 2019 ; Author: paul@robsons.org.uk ; ; ********************************************************************************* ; ********************************************************************************* ; ********************************************************************************* ; ; Clear LowRes Display. ; ; ********************************************************************************* GFXInitialiseLowRes: push af push bc push de db $ED,$91,$15,$83 ; Enable LowRes and enable Sprites xor a ; layer 2 off. ld bc,$123B ; out to layer 2 port out (c),a ld hl,$4000 ; erase the bank to $00 ld de,$6000 LowClearScreen: ; assume default palette :) xor a ld (hl),a ld (de),a inc hl inc de ld a,h cp $58 jr nz,LowClearScreen xor a out ($FE),a pop de pop bc pop af ld hl,$0C10 ; resolution is 16x12 chars ld de,GFXPrintCharacterLowRes ret ; ; Print Character E Colour D @ HL ; GFXPrintCharacterLowRes: push af push bc push de push hl push ix ld b,e ; save character in B ld a,e and $7F cp 32 jr c,__LPExit add hl,hl add hl,hl ld a,h ; check in range 192*4 = 768 cp 3 jr nc,__LPExit ld a,d ; only lower 3 bits of colour and 7 ld c,a ; C is foreground push hl ld a,b ; get char back ld b,0 ; B = no flip colour. bit 7,a jr z,__LowNotReverse ; but 7 set, flip is $FF dec b __LowNotReverse: and $7F ; offset from space sub $20 ld l,a ; put into HL ld h,0 add hl,hl ; x 8 add hl,hl add hl,hl push hl ; transfer to IX pop ix push bc ; add the font base to it. ld bc,(SIFontBase) add ix,bc pop bc pop hl ex de,hl ld a,e ; put DE => HL and 192 ; these are part of Y ld l,a ; Y multiplied by 4 then 32 = 128 ld h,d add hl,hl add hl,hl add hl,hl add hl,hl set 6,h ; put into $4000 range ld a,15*4 ; mask for X, which has been premultiplied. and e ; and with E, gives X position add a,a ; now multiplied by 8. ld e,a ; DE is x offset. ld d,0 add hl,de ld a,h cp $58 ; need to be shifted to 2nd chunk ? jr c,__LowNotLower2 ld de,$0800 add hl,de __LowNotLower2: ld e,8 ; do 8 rows __LowOuter: push hl ; save start ld d,8 ; do 8 columns ld a,(ix+0) ; get the bit pattern xor b inc ix __LowLoop: ld (hl),0 ; background add a,a ; shift pattern left jr nc,__LowNotSet ld (hl),c ; if MSB was set, overwrite with fgr __LowNotSet: inc l dec d ; do a row jr nz, __LowLoop pop hl ; restore, go 256 bytes down. push de ld de,128 add hl,de pop de dec e ; do 8 rows jr nz,__LowOuter __LPExit: pop ix pop hl pop de pop bc pop af ret
22.430464
83
0.450841
0d73f92cec8f62e9ed7ebc431de1f0cc0287be61
4,556
asm
Assembly
Transynther/x86/_processed/NONE/_st_zr_un_/i7-7700_9_0x48.log_21829_2344.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_st_zr_un_/i7-7700_9_0x48.log_21829_2344.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_st_zr_un_/i7-7700_9_0x48.log_21829_2344.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r8 push %r9 push %rax push %rdi push %rdx lea addresses_WT_ht+0x18823, %r11 nop nop nop nop nop sub %r8, %r8 movl $0x61626364, (%r11) nop nop and $64073, %r9 lea addresses_normal_ht+0x6c23, %rax nop nop nop nop nop cmp %r9, %r9 movups (%rax), %xmm4 vpextrq $0, %xmm4, %r13 nop nop nop sub $62818, %rdi lea addresses_WT_ht+0x16f23, %r11 sub $56376, %rdx mov (%r11), %r13 nop nop nop nop nop sub $802, %rax pop %rdx pop %rdi pop %rax pop %r9 pop %r8 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %rax push %rbx push %rcx push %rdi // Faulty Load lea addresses_A+0x10823, %r12 and $45329, %rdi mov (%r12), %ax lea oracles, %r12 and $0xff, %rax shlq $12, %rax mov (%r12,%rax,1), %rax pop %rdi pop %rcx pop %rbx pop %rax pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 8, 'size': 8, 'same': False, 'NT': False}} {'3d': 24, '18': 1, '00': 21804} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
51.772727
2,999
0.658911
bc3654e9008bcb6d9b508ec38a468a87ae8ab68f
484
asm
Assembly
oeis/069/A069011.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/069/A069011.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/069/A069011.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A069011: Triangle with T(n,k) = n^2 + k^2. ; 0,1,2,4,5,8,9,10,13,18,16,17,20,25,32,25,26,29,34,41,50,36,37,40,45,52,61,72,49,50,53,58,65,74,85,98,64,65,68,73,80,89,100,113,128,81,82,85,90,97,106,117,130,145,162,100,101,104,109,116,125,136,149,164,181,200,121,122,125,130,137,146,157,170,185,202,221,242,144,145,148,153,160,169,180,193,208,225,244,265,288,169,170,173,178,185,194,205,218,233 lpb $0 add $2,1 sub $0,$2 lpe pow $0,2 pow $2,2 add $2,2 add $2,$0 mov $0,$2 sub $0,2
34.571429
347
0.659091
1c4a5a3674974e07522bf24ec986e460c1c74287
6,965
asm
Assembly
Transynther/x86/_processed/NONE/_un_xt_sm_/i7-7700_9_0x48.log_21829_263.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_un_xt_sm_/i7-7700_9_0x48.log_21829_263.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_un_xt_sm_/i7-7700_9_0x48.log_21829_263.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 %r9 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_UC_ht+0xd6c1, %rsi lea addresses_WC_ht+0x11649, %rdi xor $62333, %rax mov $16, %rcx rep movsb cmp %rdi, %rdi lea addresses_D_ht+0x194a1, %rsi lea addresses_A_ht+0x12a15, %rdi nop nop nop nop sub %rbp, %rbp mov $27, %rcx rep movsq nop nop nop nop nop cmp %rbp, %rbp lea addresses_UC_ht+0x18119, %r13 nop nop add $2773, %r9 mov (%r13), %ebp nop nop inc %rsi lea addresses_A_ht+0x172ee, %rbp nop add $51515, %r9 movups (%rbp), %xmm0 vpextrq $0, %xmm0, %rax and %rbp, %rbp lea addresses_D_ht+0xbb2d, %r13 sub %rsi, %rsi movl $0x61626364, (%r13) nop nop nop nop nop sub %rax, %rax lea addresses_D_ht+0xc1c1, %rsi lea addresses_normal_ht+0x4d01, %rdi nop nop nop cmp %r10, %r10 mov $28, %rcx rep movsw nop add $36560, %r9 lea addresses_UC_ht+0x12ab1, %rsi nop nop xor $21032, %r9 movb (%rsi), %cl nop nop nop nop cmp $22686, %rbp lea addresses_D_ht+0x1e061, %rsi lea addresses_D_ht+0x59c1, %rdi sub $59271, %rax mov $112, %rcx rep movsl nop add $58737, %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r15 push %r9 push %rbp push %rcx push %rdx // Store lea addresses_PSE+0xbcc3, %rbp nop nop xor $48173, %r9 movb $0x51, (%rbp) nop nop nop dec %rdx // Store lea addresses_WT+0x59c1, %r10 nop nop nop nop sub $17484, %r15 mov $0x5152535455565758, %rcx movq %rcx, (%r10) nop nop nop add $23533, %r12 // Store lea addresses_PSE+0x78a1, %rbp and %rdx, %rdx mov $0x5152535455565758, %r10 movq %r10, %xmm6 vmovups %ymm6, (%rbp) nop nop xor %rcx, %rcx // Store mov $0x59a31b000000037d, %rbp xor %r15, %r15 mov $0x5152535455565758, %rdx movq %rdx, (%rbp) nop and %r12, %r12 // Faulty Load lea addresses_WT+0x59c1, %r15 sub $64452, %r9 movups (%r15), %xmm0 vpextrq $0, %xmm0, %rdx lea oracles, %r10 and $0xff, %rdx shlq $12, %rdx mov (%r10,%rdx,1), %rdx pop %rdx pop %rcx pop %rbp pop %r9 pop %r15 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 1, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 2, 'size': 8, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 1, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 1, 'size': 4, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}} {'58': 21828, 'a0': 1} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
37.648649
2,999
0.654702
aaabd71def681f2249ee5ec3b262c21653953400
343
asm
Assembly
programs/oeis/258/A258935.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/258/A258935.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/258/A258935.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A258935: Independence number of Keller graphs. ; 4,5,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,4294967296,8589934592 mov $1,2 pow $1,$0 lpb $0 mov $0,1 mul $1,2 sub $1,3 lpe add $1,3
28.583333
220
0.763848
b0a1c12c53e52c8bf95d36edaddda10c4ca8ac3f
510
asm
Assembly
verify/alfy/2_simple/sum.alfy.asm
alexandruradovici/alf-alfy-asm-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
null
null
null
verify/alfy/2_simple/sum.alfy.asm
alexandruradovici/alf-alfy-asm-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
2
2017-05-18T20:29:57.000Z
2017-05-19T19:03:07.000Z
verify/alfy/2_simple/sum.alfy.asm
alexandruradovici/alf-alfy-asm-language-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
null
null
null
; script start: ; asm readnumber r2 ; x: r3 set r3 0 store r3 r2 ; asm readnumber r2 ; y: r3 set r3 4 store r3 r2 ; attribution ; expression + ; x: r3 set r3 0 load r3 r3 ; y: r4 set r4 4 load r4 r4 add r2 r3 r4 ; s: r3 set r3 8 store r3 r2 ; asm ; s: r2 set r2 8 load r2 r2 writenumber r2 stop
16.451613
22
0.384314
99351c9a1601739f150698208cfce8d476a4379a
2,691
asm
Assembly
SNES_16x16/mainB.asm
nesdoug/M1TE2
7a048c0423a6510981af94ead81a728a309d00f0
[ "MIT" ]
23
2020-01-17T14:52:22.000Z
2021-10-11T11:25:33.000Z
SNES_16x16/mainB.asm
nesdoug/M1TE2
7a048c0423a6510981af94ead81a728a309d00f0
[ "MIT" ]
1
2021-07-18T04:58:04.000Z
2021-07-18T14:22:56.000Z
SNES_16x16/mainB.asm
nesdoug/M1TE2
7a048c0423a6510981af94ead81a728a309d00f0
[ "MIT" ]
null
null
null
; SNES 16x16 tiles test, with RLE compression .p816 .smart .include "regs.asm" .include "variables.asm" .include "macros.asm" .include "init.asm" .include "unrle.asm" .segment "CODE" ; enters here in forced blank Main: .a16 ; the setting from init code .i16 phk plb ; DMA from BG_Palette to CGRAM A8 lda #16 sta CGADD ; $2121 cgram address stz $4300 ; transfer mode 0 = 1 register write once lda #$22 ; $2122 sta $4301 ; destination, cgram data ldx #.loword(BG_Palette) stx $4302 ; source lda #^BG_Palette sta $4304 ; bank ldx #32 stx $4305 ; length lda #1 sta MDMAEN ; $420b start dma, channel 0 ; make sure color zero is black too stz CGADD ; $2121 cgram address stz $2122 ; cg data stz $2122 ; cg data ; DMA from Tiles to VRAM lda #V_INC_1 ; the value $80 sta VMAIN ; $2115 = set the increment mode +1 ldx #$0000 stx VMADDL ; set an address in the vram of $0000 ; decompress Tiles to VRAM UNPACK_TO_VRAM Tiles ; DMA from Tilemap to VRAM ldx #$6000 stx VMADDL ; set an address in the vram of $6000 ; decompress UNPACK_TO_VRAM Tilemap ;UNPACK_TO_VRAM puts AXY in 16 bit A8 lda #1|BG_ALL_16x16 ; mode 1, tilesize 16x16 sta BGMODE ; $2105 ; 210b = tilesets for bg 1 and bg 2 ; (210c for bg 3 and bg 4) ; steps of $1000 -321-321... bg2 bg1 stz BG12NBA ; $210b BG 1 and 2 TILES at VRAM address $0000 ; 2107 map address bg 1, steps of $400, but -54321yx ; y/x = map size... 0,0 = 32x32 tiles ; $6000 / $100 = $60 lda #$60 ; address $6000 sta BG1SC ; $2107 lda #BG1_ON ; only bg 1 is active sta TM ; $212c lda #FULL_BRIGHT ; $0f = turn the screen on (end forced blank) sta INIDISP ; $2100 Infinite_Loop: A8 XY16 jsr Wait_NMI ;code goes here jmp Infinite_Loop Wait_NMI: .a8 .i16 ;should work fine regardless of size of A lda in_nmi ;load A register with previous in_nmi @check_again: WAI ;wait for an interrupt cmp in_nmi ;compare A to current in_nmi ;wait for it to change ;make sure it was an nmi interrupt beq @check_again rts ;jsl here DMA_VRAM: .a16 .i16 ; do during forced blank ; first set VRAM_Addr and VRAM_Inc ; a = source ; x = source bank ; y = length in bytes php rep #$30 ;axy16 sta $4302 ; source and 4303 sep #$20 ;a8 txa sta $4304 ; bank lda #$18 sta $4301 ; destination, vram data sty $4305 ; length, and 4306 lda #1 sta $4300 ; transfer mode, 2 registers, write once = 2 bytes sta $420b ; start dma, channel 0 plp rtl .include "header.asm" .segment "RODATA1" BG_Palette: ; 32 bytes .incbin "M1TE/moon.pal" Tiles: ; 4bpp tileset compressed .incbin "RLE/moon_chr.rle" Tilemap: ; tilemap compressed .incbin "RLE/moon_map.rle"
16.509202
63
0.680045
23355354334a77dabff180b3c54cefc1f99cacf4
356
asm
Assembly
testsuite/ubivm/expected/attr_real_2.asm
alexgarzao/UOP
12460841ff2b9991d2f7f461635b1f551413823f
[ "MIT" ]
null
null
null
testsuite/ubivm/expected/attr_real_2.asm
alexgarzao/UOP
12460841ff2b9991d2f7f461635b1f551413823f
[ "MIT" ]
null
null
null
testsuite/ubivm/expected/attr_real_2.asm
alexgarzao/UOP
12460841ff2b9991d2f7f461635b1f551413823f
[ "MIT" ]
null
null
null
Entity start No options Constants 0 S start 1 S var1 2 R 10.990000 3 I 1 4 S io.writeln End Valid context (always) No properties Def start No parameters Local variables 0 real var1 End No results ldconst 2 --> [10.990000] stvar 0 --> [var1] ldvar 0 --> [var1] ldconst 3 --> [1] lcall 4 --> [io.writeln] stop End End
13.692308
27
0.629213
ad0044e1e767824ef7364e6b88ae0e8c48381379
10,041
asm
Assembly
x86/Move_IsPseudoLegal.asm
lantonov/asm
b9ddd4ed9a8c73cbd3600608847769f4690c293c
[ "BSD-3-Clause" ]
150
2016-11-26T05:41:31.000Z
2022-02-09T20:54:53.000Z
x86/Move_IsPseudoLegal.asm
lantonov/asm
b9ddd4ed9a8c73cbd3600608847769f4690c293c
[ "BSD-3-Clause" ]
199
2016-12-07T22:13:00.000Z
2022-03-22T15:42:18.000Z
x86/Move_IsPseudoLegal.asm
lantonov/asm
b9ddd4ed9a8c73cbd3600608847769f4690c293c
[ "BSD-3-Clause" ]
95
2016-11-24T22:57:13.000Z
2022-01-24T19:42:10.000Z
calign 16 Move_IsPseudoLegal: ; in: rbp address of Pos ; rbx address of State ; ecx move ; out: rax = 0 if move is not pseudo legal ; rax !=0 if move is pseudo legal could be anything nonzero ; ; we need to make sure the move is legal for the special types ; promotion ; castling ; epcapture ; so we also require checkinfo to be set ;ProfileInc Move_IsPseudoLegal push rsi rdi r12 r13 r14 r15 mov eax, dword[rbp+Pos.sideToMove] mov esi, eax xor eax, 1 ; r8d = from ; r9d = to mov r8d, ecx shr r8d, 6 and r8d, 63 mov r9d, ecx and r9d, 63 ;ProfileInc moveUnpack ; r11 = FROM PIECE movzx r11d, byte[rbp+Pos.board+r8] ; r14 = bitboard of our pieces ; r15 = bitboard of all pieces mov r14, qword[rbp+Pos.typeBB+8*rsi] mov r15, qword[rbp+Pos.typeBB+8*rax] or r15, r14 ; ecx = MOVE_TYPE ; rdi = bitboard of to square r9d ; r10 = -(MOVE_TYPE==0) & rdi ; eax = move mov eax, ecx shr ecx, 12 cmp ecx, 1 sbb r10, r10 xor edi, edi bts rdi, r9 and r10, rdi ; r13 = checkers ; r12 = -1 if checkers!=0 ; = 0 if checkers==0 mov r12, qword[rbx+State.checkersBB] mov r13, r12 neg r12 sbb r12, r12 ; make sure that our piece is on from square and r11d, 7 bt r14, r8 jnc .ReturnFalse cmp ecx, MOVE_TYPE_PROM jae .Special ; make sure that we don't capture our own piece mov eax, dword[.JmpTable+4*r11] bt r14, r9 jc .ReturnFalse jmp rax calign 8 .JmpTable: dd .NoPiece dd .NoPiece dd .Pawn dd .Knight dd .Bishop dd .Rook dd .Queen dd .King calign 8 .NoPiece: .ReturnFalse: xor eax, eax pop r15 r14 r13 r12 rdi rsi ret calign 8 .Knight: mov rax, qword[KnightAttacks+8*r8] and rax, r10 test rax, r12 jnz .Checkers pop r15 r14 r13 r12 rdi rsi ret calign 8 .Bishop: BishopAttacks rax, r8, r15, r11 and rax, r10 test rax, r12 jnz .Checkers pop r15 r14 r13 r12 rdi rsi ret calign 8 .Rook: RookAttacks rax, r8, r15, r11 and rax, r10 test rax, r12 jnz .Checkers pop r15 r14 r13 r12 rdi rsi ret calign 8 .Queen: RookAttacks rax, r8, r15, r11 BishopAttacks r9, r8, r15, r11 or rax, r9 and rax, r10 test rax, r12 jnz .Checkers pop r15 r14 r13 r12 rdi rsi ret calign 8 .Checkers: ; if moving P|R|B|Q and in check, filter some moves out mov rcx, qword [rbp+Pos.typeBB+8*King] _tzcnt rax, r13 shl eax, 6+3 and rcx, r14 _tzcnt rcx, rcx mov rax, qword[BetweenBB+rax+8*rcx] or rax, r13 ; if more than one checker, must move king lea rcx, [r13-1] test rcx, r13 jnz .ReturnFalse ; move must be a blocking evasion or a capture of the checking piece and rax, rdi pop r15 r14 r13 r12 rdi rsi ret calign 8 .Pawn: mov r11d, esi shl r11d, 6+3 mov rdx, 0x00FFFFFFFFFFFF00 mov eax, r8d xor eax, r9d cmp eax, 16 je .DoublePawn xor eax, eax xor esi, 1 lea ecx, [2*rsi-1] lea ecx, [r8+8*rcx] bts rax, rcx _andn rax, r15, rax mov rcx, [rbp+Pos.typeBB+8*rsi] and rcx, qword[PawnAttacks+r11+8*r8] or rax, rcx and rax, rdx and rax, r10 test rax, r12 jnz .Checkers pop r15 r14 r13 r12 rdi rsi ret calign 8 .DoublePawn: ; make sure that two squares are clear lea eax, [r8+r9] shr eax, 1 mov rdx, rdi bts rdx, rax test rdx, r15 jnz .DPawnReturnFalse ; make sure that from is on home mov eax, r8d shr eax, 3 lea ecx, [1+5*rsi] cmp eax, ecx jne .DPawnReturnFalse or eax, -1 test r12, r12 jnz .Checkers pop r15 r14 r13 r12 rdi rsi ret .DPawnReturnFalse: xor eax, eax pop r15 r14 r13 r12 rdi rsi ret calign 8 .King: mov r11d, esi shl r11d, 6+3 mov rdx, qword[rbx+State.checkersBB] mov rax, qword[KingAttacks+8*r8] and rax, r10 test rax, r12 jnz .KingCheckers pop r15 r14 r13 r12 rdi rsi ret calign 8 .KingCheckers: ; r14 = their pieces ; r15 = pieces ^ our king _andn r14, r14, r15 btr r15, r8 mov rax, qword[KingAttacks+8*r9] and rax, qword[rbp+Pos.typeBB+8*King] mov rdx, qword[KnightAttacks+8*r9] and rdx, qword[rbp+Pos.typeBB+8*Knight] or rax, rdx mov rdx, qword[PawnAttacks+r11+8*r9] and rdx, qword[rbp+Pos.typeBB+8*Pawn] or rax, rdx RookAttacks rdx, r9, r15, r10 mov rcx, qword[rbp+Pos.typeBB+8*Rook] or rcx, qword[rbp+Pos.typeBB+8*Queen] and rdx, rcx or rax, rdx BishopAttacks rdx, r9, r15, r10 mov rcx, qword[rbp+Pos.typeBB+8*Bishop] or rcx, qword[rbp+Pos.typeBB+8*Queen] and rdx, rcx or rax, rdx and rax, r14 cmp rax, 1 sbb eax, eax pop r15 r14 r13 r12 rdi rsi ret calign 8 .Special: cmp ecx, MOVE_TYPE_EPCAP je .EpCapture jae .Castle .Promotion: cmp r11d, Pawn jne .ReturnFalse bt r14, r9 jc .ReturnFalse mov r11d, esi shl r11d, 6+3 lea ecx, [rsi-1] xor esi, 1 and ecx, 56 mov edx, 0x0FF shl rdx, cl xor eax, eax lea ecx, [2*rsi-1] lea ecx, [r8+8*rcx] bts rax, rcx _andn rax, r15, rax mov rcx, [rbp+Pos.typeBB+8*rsi] and rcx, qword[PawnAttacks+r11+8*r8] or rax, rcx and rax, rdx xor esi, 1 and rax, rdi jz .ReturnFalse test rax, r12 jnz .PromotionCheckers ; we are not in check so make sure pawn is not pinned .PromotionCheckPinned: or eax, -1 mov rcx, qword[rbx+State.pinned] bt rcx, r8 jnc @f shl r8d, 6+3 mov rax, qword[rbp+Pos.typeBB+8*King] and rax, qword[rbp+Pos.typeBB+8*rsi] and rax, qword[LineBB+r8+8*r9] @@: pop r15 r14 r13 r12 rdi rsi ret .PromotionCheckers: ; if moving P|R|B|Q and in check, filter some moves out mov rcx, qword [rbp+Pos.typeBB+8*King] _tzcnt rax, r13 shl eax, 6+3 and rcx, r14 _tzcnt rcx, rcx mov rax, qword[BetweenBB+rax+8*rcx] or rax, r13 ; if more than one checker, must move king lea rcx, [r13-1] test rcx, r13 jnz .ReturnFalse ; move must be a blocking evasion or a capture of the checking piece test rax, rdi jz .ReturnFalse jmp .PromotionCheckPinned .EpCapture: ; make sure destination is empty bt r15, r9 jc .ReturnFalse ; make sure that it is our pawn moving mov eax, r11d and eax, 7 cmp eax, Pawn jne .ReturnFalse ; make sure to is epsquare cmp r9l, byte[rbx+State.epSquare] jne .ReturnFalse ; make sure from->to is a pawn attack mov r11d, esi shl r11d, 6+3 mov rax, qword[PawnAttacks+r11+8*r8] bt rax, r9 jnc .ReturnFalse ; make sure capsq=r10=r9+pawnpush is their pawn lea r10d, [2*rsi-1] lea r10d, [r9+8*r10] xor esi, 1 lea eax, [Pawn+8*rsi] cmp al, byte[rbp+Pos.board+r10] jne .ReturnFalse ; rdi = ksq = square<KING>(us) mov rdi, qword[rbp+Pos.typeBB+8*King] and rdi, r14 _tzcnt rdi, rdi ; r15 = occupied = (pieces() ^ from ^ capsq) | to btr r15, r8 btr r15, r10 bts r15, r9 ; r14 = their pieces mov r14, qword[rbp+Pos.typeBB+8*rsi] ; check for rook attacks RookAttacks rax, rdi, r15, rdx mov rcx, qword[rbp+Pos.typeBB+8*Rook] or rcx, qword[rbp+Pos.typeBB+8*Queen] and rcx, r14 test rax, rcx jnz .ReturnFalse ; check for bishop attacks BishopAttacks rax, rdi, r15, rdx mov rcx, qword[rbp+Pos.typeBB+8*Bishop] or rcx, qword[rbp+Pos.typeBB+8*Queen] and rcx, r14 test rax, rcx jnz .ReturnFalse or eax, -1 pop r15 r14 r13 r12 rdi rsi ret calign 8 .Castle: ; CastlingJmp expects ; r13 their pieces ; r14 all pieces _andn r13, r14, r15 mov r14, r15 test r12, r12 jnz .CastleReturnFalse cmp ecx, MOVE_TYPE_CASTLE jne .ReturnFalse test esi, esi jnz .CastleBlack .CastleWhite: cmp eax, dword[rbp-Thread.rootPos+Thread.castling_movgen+4*0] je .CastleCheck_WhiteOO cmp eax, dword[rbp-Thread.rootPos+Thread.castling_movgen+4*1] je .CastleCheck_WhiteOOO .CastleReturnFalse: xor eax, eax pop r15 r14 r13 r12 rdi rsi ret .CastleBlack: cmp eax, dword[rbp-Thread.rootPos+Thread.castling_movgen+4*2] je .CastleCheck_BlackOO cmp eax, dword[rbp-Thread.rootPos+Thread.castling_movgen+4*3] je .CastleCheck_BlackOOO jmp .CastleReturnFalse .CastleCheck_WhiteOO: movzx eax, byte[rbx+State.castlingRights] mov rcx, qword[rbp-Thread.rootPos+Thread.castling_path+8*0] and rcx, r15 and eax, 1 shl 0 xor eax, 1 shl 0 or rax, rcx jnz .ReturnFalse call CastleOOLegal_White pop r15 r14 r13 r12 rdi rsi ret .CastleCheck_BlackOO: movzx eax, byte[rbx+State.castlingRights] mov rcx, qword[rbp-Thread.rootPos+Thread.castling_path+8*2] and rcx, r15 and eax, 1 shl 2 xor eax, 1 shl 2 or rax, rcx jnz .CastleReturnFalse call CastleOOLegal_Black pop r15 r14 r13 r12 rdi rsi ret .CastleCheck_WhiteOOO: movzx eax, byte[rbx+State.castlingRights] mov rcx, qword[rbp-Thread.rootPos+Thread.castling_path+8*1] and rcx, r15 and eax, 1 shl 1 xor eax, 1 shl 1 or rax, rcx jnz .CastleReturnFalse call CastleOOOLegal_White pop r15 r14 r13 r12 rdi rsi ret .CastleCheck_BlackOOO: movzx eax, byte[rbx+State.castlingRights] mov rcx, qword[rbp-Thread.rootPos+Thread.castling_path+8*3] and rcx, r15 and eax, 1 shl 3 xor eax, 1 shl 3 or rax, rcx jnz .CastleReturnFalse call CastleOOOLegal_Black pop r15 r14 r13 r12 rdi rsi ret
20.491837
70
0.607908
a3d596ab3e53a71464415597f1599b2d3b43df8b
2,441
asm
Assembly
Program06/Prog06.asm
jasarsoft/asm-example
9a65a1eac11881c5b8086c293a223a8cebeb444e
[ "Apache-2.0" ]
1
2018-06-09T07:11:35.000Z
2018-06-09T07:11:35.000Z
Program06/Prog06.asm
jasarsoft/asm-example
9a65a1eac11881c5b8086c293a223a8cebeb444e
[ "Apache-2.0" ]
null
null
null
Program06/Prog06.asm
jasarsoft/asm-example
9a65a1eac11881c5b8086c293a223a8cebeb444e
[ "Apache-2.0" ]
null
null
null
;Zadatak 6: Vrijeme ispisa iz memorije racunara Prog06 Segment ;definicija segmenta assume CS:Prog06, DS:Prog06 ;pocetak CS i DS segmenta Start: mov ax, Prog06 ;pocetak na DS mov ds, ax mov ax, 0b800h ;adreas video memorije u ES registru mov es, ax cikl: mov ax, 0200h ;citanje vremena iz sistemsog casovnika int 1ah call vrisp ;ispisivanje vremena mov ax, 0100h ;taster int 16h jz cikl ;ne, nazad mov ax, 0 ;iscita vrijednost int 16h mov ax, 4c00h ;nazad int 21h vrisp Proc ;program za ispisivanje vremena mov di, 0 ;monitor, lijevo gore mov ah, 15 ;crna pozadina bijeli karakter mov bx, cx ;bx <== sati, minuti call isp1 ;sati na ekranu inc di ;mjesto za separator inc di call isp1 ;minute na ekranu inc di ;spearator inc di mov bh, dh ;bh <== sekunde call isp1 ;sekunde na ekrnau mov al, "-" ;separator mov es:[di-6], ax ;na odgovarajuce pozicije mov es:[di-12], ax ret ;povratak na galvni program vrisp Endp ;kraj podrograma ;ISP1 Procedura ---------------- isp1 Proc ;podprogram ispis 1 mov cx, 2 ;ispisivanje 2 cifre cikl1: push cx mov cx, 4 ;BCD broj (4 bita) mov al, 0 cikl2: shl bx, 1 ;dio BX registra (BCD broj) rcl al, 1 loop cikl2 or al, 30h ;bin ==> ASCII mov es:[di], ax ;u video memoriju inc di ;sljedeca pozicija inc di pop cx ;druga cifra loop cikl1 ret ;nazad na program odakle je pozvan isp1 Endp Prog06 Ends ;kraj segmenta End Start
31.701299
75
0.410078
7765a68b1fea5eb515f55c4267812a818bd20068
509
asm
Assembly
sample1.asm
jmacIndy/cpu
e328039f8ad47e0af0a9382a936b9029e6a8e8ea
[ "MIT" ]
null
null
null
sample1.asm
jmacIndy/cpu
e328039f8ad47e0af0a9382a936b9029e6a8e8ea
[ "MIT" ]
null
null
null
sample1.asm
jmacIndy/cpu
e328039f8ad47e0af0a9382a936b9029e6a8e8ea
[ "MIT" ]
null
null
null
// this is sample input for assembler .CONSTANT ADD1 2 ADD2 0x07 LOOPSIZE 0x0A .DATA RES1 RES2 COUNTER .CODE SET0 ADD1 // use variables for this addition SET1 ADD2 ADD STOR RES1 PRT RES1 CALL SUB1 HALT SUB1 SET0 0x04 // use literals for this addition SET1 9 ADD STOR RES2 PRT RES2 // setup loop; run through 10 times - backwards SET0 LOOPSIZE JB STOR COUNTER PRT COUNTER DEC0 TST JNZ JB RET
15.90625
49
0.59725
402ce2658bfee4fa454703b94c1a398957020b96
455
asm
Assembly
programs/oeis/302/A302254.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/302/A302254.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/302/A302254.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A302254: Exponent of the group of the Gaussian integers in a reduced system modulo (1+i)^n. ; 1,1,2,4,4,4,4,4,8,8,16,16,32,32,64,64,128,128,256,256,512,512,1024,1024,2048,2048,4096,4096,8192,8192,16384,16384,32768,32768,65536,65536,131072,131072,262144,262144,524288,524288,1048576,1048576,2097152,2097152,4194304,4194304,8388608,8388608 trn $0,1 mov $1,1 mov $2,5 trn $2,$0 mov $3,3 lpb $0 mul $1,2 trn $3,$2 sub $0,$3 trn $0,1 mov $3,1 lpe
28.4375
245
0.707692
f6b759c6237afa7b73accdbda7723c072f48702b
6,108
asm
Assembly
2004-summer/mp1/mp1.asm
ece291/machine-problems
5f91f9f2ddceb7cda1e14c2973d83023a42d9929
[ "RSA-MD" ]
3
2016-07-16T04:33:49.000Z
2021-07-13T16:18:17.000Z
2004-summer/mp1/mp1.asm
ece291/machine-problems
5f91f9f2ddceb7cda1e14c2973d83023a42d9929
[ "RSA-MD" ]
null
null
null
2004-summer/mp1/mp1.asm
ece291/machine-problems
5f91f9f2ddceb7cda1e14c2973d83023a42d9929
[ "RSA-MD" ]
null
null
null
; MP1 - Gradebook ; Your Name ; Today's Date ; ; Ryan Chmiel, Summer 2004 ; University of Illinois, Urbana-Champaign ; Dept. of Electrical and Computer Engineering ; ; Version 1.0 BITS 16 ;====== SECTION 1: Define constants ======================================= CR EQU 0Dh LF EQU 0Ah NUMSTUDENTS EQU 30 NUMRANGES EQU 5 ;====== SECTION 2: Declare external routines ============================== ; Declare external library routines EXTERN dspmsg, mp1xit EXTERN libCalculateScores, libCalculateRanges, libConstructStarString, libDisplayHistogram ; Declare local routines GLOBAL CalculateScores, CalculateRanges, ConstructStarString, DisplayHistogram ; Make program variables global GLOBAL Grades, IntroString, EnterString, StarString, RangeStrings, RangeCount ;====== SECTION 3: Define stack segment =================================== SEGMENT stkseg STACK ; *** STACK SEGMENT *** resb 64*8 stacktop: resb 0 ; work around NASM bug ;====== SECTION 4: Define code segment ==================================== SEGMENT code ; *** CODE SEGMENT *** ;====== SECTION 5: Declare variables for main procedure =================== ; These are the grades obtained by 30 sample students in ECE 291. ; Each row corresponds to one student. The grades are listed as ; follows: ; ; HW0,HW1,HW2,HW3,HW4,HW5,HW6,MP0,MP1,MP2,MP3,MP4,EX1,EX2,FINAL,PROJECT,TOTAL ; ; Note that the total is initially 0,0 as you need to reserve a word for the ; total (2 bytes), and you will need to calculate the total in your program. Grades db 20,20,20,20,20,61,20,30,53,71,84,80, 97,116,122,122,0,0 db 20,20,20,20,20,61,20,30,60,60,84,90,120, 84,112,112,0,0 db 20,20,20,20,20,20, 0,30,64,70,85,70, 73,104,134,134,0,0 db 20,20,20,20,20,20,20,30,64,74,81,90, 91,106,120, 99,0,0 db 20,20,20,15,20,20, 0,30,65,74,85,90, 85,109,143,154,0,0 db 20,20,10, 0, 0, 5,20,30,40,35,65,60, 70, 62, 96,100,0,0 db 20,20,20,20,20,73, 0,30,48,70,80,70, 73, 45,129,123,0,0 db 20,20,17,20,20,20,20,30,65,80,85,90,110,105,139,128,0,0 db 14,18,18,16,13,20, 5,30,50,70,80,84,119,103,124,103,0,0 db 20,20,20,20,20,20,20,30,55,73,85,80, 59, 66,115,120,0,0 db 20,20,20,17,16,20, 2,30,50,70,80,90, 92, 99,115,130,0,0 db 20,20,20,20,20,20,20,30,65,80,85,90,101,102,113,134,0,0 db 20,20,20,20,20,20, 7,30,55,75,85,90, 78, 84,124,145,0,0 db 20,10,20,20,20,20,20,30,49,72,80,80, 77, 89,134,114,0,0 db 20,20,20,20,20,20,20,20,62,72,60,90, 90, 97,132,133,0,0 db 20,20,20,20,19, 0, 0,20,54,74,70,70, 74,101,121, 80,0,0 db 16,19,18,17,16,15, 0,20,50,71,81,80,104, 75,125,126,0,0 db 20,20,20,20,20,20,20,30,55,75,84, 0,112,107,136,155,0,0 db 20,20,20,11,20,12, 0,30,49,44,79,90,106,103,101,119,0,0 db 20,20,20,20,20,20,20,20,20,40,40,70, 84,117,110,115,0,0 db 20,20,20,20,20,20,20,20,46,75,82,70,106, 96,122,153,0,0 db 20,18, 7, 0,20,20,20,20,46,70,78,30,118,108,132,131,0,0 db 20,20,20, 0,20,20, 0,30,55,75,85,90,101,108,141,151,0,0 db 20,20,20,20,20,73,20, 0,47,73,81,90, 67, 79,131,128,0,0 db 20,20,20,20,20,20,20,30,52,72,80,90, 94, 86,146,111,0,0 db 20,20,20,20,20,20,20,20,55,70,81,90, 46, 99,129,134,0,0 db 20,20,20,20,20,20,20,20,51,71,81,70,108,104,131,120,0,0 db 20,20,20,20,63,52,10,30,55,70,80,60,104, 86,114,121,0,0 db 20, 0, 0,20,20,20, 9,20,48,70,79,55, 81,119,109,107,0,0 db 20,20,20,20,20,20,20,30,20,40,40,50,120,100,150,160,0,0 IntroString db CR,LF,'ECE 291 Summer 2004',CR,LF,'MP1 - Gradebook',CR,LF,CR,LF,'$' ; Mimics hitting the enter key EnterString db CR,LF,'$' ; String used to hold one bar of the histogram. The string will contain up to ; 30 stars (*) followed by a dollar sign to terminate the string StarString times 31 db 0 ; Strings to define the grade ranges RangeStrings db ' (A) 900-1000 ','$' db ' (B) 800-899 ','$' db ' (C) 700-799 ','$' db ' (D) 600-699 ','$' db ' (F) < 600 ','$' ; Array holding the number of scores that fall into each of the ranges above. ; The number of A grades is stored in the first cell of the array, and so on... RangeCount times 5 db 0 ;====== SECTION 6: Program initialization ================================= ..start: mov ax, cs ; Initialize Default Segment register mov ds, ax mov ax, stkseg ; Initialize Stack Segment register mov ss, ax mov sp, stacktop ; Initialize Stack Pointer register ;====== SECTION 7: Main procedure ========================================= MAIN: mov dx, IntroString call dspmsg call CalculateScores call CalculateRanges call DisplayHistogram call mp1xit ;====== SECTION 8: Your subroutines ======================================= ;-------------------------------------------------------------- ;-- Replace library calls with your code! -- ;-- [Save all reg values that you modify] -- ;-- Do not forget to add function headers -- ;-------------------------------------------------------------- ;-------------------------------------------------------------- ;-- CalculateScores() -- ;-------------------------------------------------------------- CalculateScores call libCalculateScores ret ;-------------------------------------------------------------- ;-- CalculateRanges() -- ;-------------------------------------------------------------- CalculateRanges call libCalculateRanges ret ;-------------------------------------------------------------- ;-- ConstructStarString() -- ;-------------------------------------------------------------- ConstructStarString call libConstructStarString ret ;-------------------------------------------------------------- ;-- DisplayHistogram() -- ;-------------------------------------------------------------- DisplayHistogram call libDisplayHistogram ret
34.704545
90
0.531925
07041d52f47f5324723c2efaecb484e7c69095ef
375
asm
Assembly
arch/x86_64/cpu/task.asm
PoisonNinja/quark
0cc2b8191f0c5cbd856caac688bfdac54a7d3369
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
3
2019-08-01T03:16:31.000Z
2022-02-17T06:52:26.000Z
arch/x86_64/cpu/task.asm
PoisonNinja/quark
0cc2b8191f0c5cbd856caac688bfdac54a7d3369
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
32
2018-03-26T20:10:44.000Z
2020-07-13T03:01:42.000Z
arch/x86_64/cpu/task.asm
PoisonNinja/quark
0cc2b8191f0c5cbd856caac688bfdac54a7d3369
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
1
2018-08-29T21:31:06.000Z
2018-08-29T21:31:06.000Z
%include "common.inc" ; void do_task_switch(addr_t* old_stack, addr_t* new_stack); ; rdi = old stack, rsi = new stack global do_task_switch do_task_switch: pushfq push rbp push rbx push r12 push r13 push r14 push r15 mov [rdi], rsp mov rsp, [rsi] pop r15 pop r14 pop r13 pop r12 pop rbx pop rbp popf ret
14.423077
60
0.610667
f94acffd16ee2c3fe06991b221e064d5cdde7e22
3,265
asm
Assembly
kernel/support/keyboard.asm
paulscottrobson/MZ-Compiler
6f992844f6f447fbaf65569e3c70fb7dfc086b7e
[ "MIT" ]
null
null
null
kernel/support/keyboard.asm
paulscottrobson/MZ-Compiler
6f992844f6f447fbaf65569e3c70fb7dfc086b7e
[ "MIT" ]
null
null
null
kernel/support/keyboard.asm
paulscottrobson/MZ-Compiler
6f992844f6f447fbaf65569e3c70fb7dfc086b7e
[ "MIT" ]
null
null
null
; ********************************************************************************* ; ********************************************************************************* ; ; File: keyboard.asm ; Purpose: Spectrum Keyboard Interface ; Date : 8th November 2018 ; Author: paul@robsons.org.uk ; ; ********************************************************************************* ; ********************************************************************************* ; ********************************************************************************* ; ; Scan the keyboard, return currently pressed key code in A ; ; ********************************************************************************* IOScanKeyboard: push bc push de push hl ld hl,__kr_no_shift_table ; firstly identify shift state. ld c,$FE ; check CAPS SHIFT (emulator : left shift) ld b,$FE in a,(c) bit 0,a jr nz,__kr1 ld hl,__kr_shift_table jr __kr2 __kr1: ld b,$7F ; check SYMBOL SHIFT (emulator : right shift) in a,(c) bit 1,a jr nz,__kr2 ld hl,__kr_symbol_shift_table __kr2: ld e,$FE ; scan pattern. __kr3: ld a,e ; work out the mask, so we don't detect shift keys ld d,$1E ; $FE row, don't check the least significant bit. cp $FE jr z,___kr4 ld d,$01D ; $7F row, don't check the 2nd least significant bit cp $7F jr z,___kr4 ld d,$01F ; check all bits. ___kr4: ld b,e ; scan the keyboard ld c,$FE in a,(c) cpl ; make that active high. and d ; and with check value. jr nz,__kr_keypressed ; exit loop if key pressed. inc hl ; next set of keyboard characters inc hl inc hl inc hl inc hl ld a,e ; get pattern add a,a ; shift left or 1 ; set bit 1. ld e,a cp $FF ; finished when all 1's. jr nz,__kr3 xor a jr __kr_exit ; no key found, return with zero. ; __kr_keypressed: inc hl ; shift right until carry set rra jr nc,__kr_keypressed dec hl ; undo the last inc hl ld a,(hl) ; get the character number. __kr_exit: pop hl pop de pop bc ret ; ********************************************************************************* ; Keyboard Mapping Tables ; ********************************************************************************* ; ; $FEFE-$7FFE scan, bit 0-4, active low ; ; 8:Backspace 13:Return 20-23:Left Down Up Right ; 27:Break 32-95: Std ASCII ; __kr_no_shift_table: db 0, 'Z','X','C','V', 'A','S','D','F','G' db 'Q','W','E','R','T', '1','2','3','4','5' db '0','9','8','7','6', 'P','O','I','U','Y' db 13, 'L','K','J','H', ' ', 0, 'M','N','B' __kr_symbol_shift_table: db 0, ':', 0, '?','/', '~','|','\','{','}' db 0, 0, 0 ,'<','>', '!','@','#','$','%' db '_',')','(',"'",'&', '"',';', 0, ']','[' db 13, '=','+','-','^', ' ', 0, '.',',','*' __kr_shift_table: db 0, ':',0 ,'?','/', '~','|','\','{','}' db 0, 0, 0 ,'<','>', '!','@','#','$',20 db 8, ')',23, 22, 21, '"',';', 0, ']','[' db 27, '=','+','-','^', ' ', 0, '.',',','*'
29.414414
83
0.384992
324ae6c251f2c815b8204d2535683e449f71fadf
403
asm
Assembly
programs/oeis/077/A077904.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/077/A077904.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/077/A077904.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A077904: Expansion of (1-x)^(-1)/(1+x-2*x^3). ; 1,0,1,2,-1,4,1,-2,11,-8,5,18,-33,44,-7,-58,147,-160,45,250,-569,660,-159,-978,2299,-2616,661,3938,-9169,10492,-2615,-15722,36707,-41936,10493,62922,-146793,167780,-41935,-251650,587211,-671080,167781,1006642,-2348801,2684364,-671079,-4026522 mov $1,1 lpb $0 mov $2,$0 sub $0,1 seq $2,77973 ; Expansion of 1/(1+x-2*x^3). add $1,$2 lpe mov $0,$1
33.583333
243
0.635236
be207ad3e1e9d1daa263fc6ad62355fca05e8827
1,181
asm
Assembly
test/Patch/X86_64/WIN64_RunRealExec.asm
clayne/QBDI
01adf4f75b9ef47edfc9225d51585b1ef6961016
[ "Apache-2.0" ]
null
null
null
test/Patch/X86_64/WIN64_RunRealExec.asm
clayne/QBDI
01adf4f75b9ef47edfc9225d51585b1ef6961016
[ "Apache-2.0" ]
null
null
null
test/Patch/X86_64/WIN64_RunRealExec.asm
clayne/QBDI
01adf4f75b9ef47edfc9225d51585b1ef6961016
[ "Apache-2.0" ]
null
null
null
; ; This file is part of QBDI. ; ; Copyright 2017 - 2022 Quarkslab ; ; Licensed under the Apache License, Version 2.0 (the "License"); ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; http://www.apache.org/licenses/LICENSE-2.0 ; ; Unless required by applicable law or agreed to in writing, software ; distributed under the License is distributed on an "AS IS" BASIS, ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; See the License for the specific language governing permissions and ; limitations under the License. ; PUBLIC runRealExec .CODE runRealExec PROC push r15; push r14; push r13; push r12; push r11; push r10; push r9; push r8; push rbp; push rdi; push rsi; push rdx; push rcx; push rbx; push rax; mov rdi, rdx; call rcx; pop rax; pop rbx; pop rcx; pop rdx; pop rsi; pop rdi; pop rbp; pop r8; pop r9; pop r10; pop r11; pop r12; pop r13; pop r14; pop r15; ret; runRealExec ENDP END
20.016949
75
0.614733
1334938a27f2920327029b32eb0cd2dbc51fb8a1
685
asm
Assembly
programs/oeis/195/A195617.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/195/A195617.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/195/A195617.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A195617: Numerators b(n) of Pythagorean approximations b(n)/a(n) to 3. ; 35,1333,50615,1922041,72986939,2771581645,105247115567,3996618809905,151766267660819,5763121552301221,218846852719785575,8310417281799550633,315577009855663138475,11983615957233399711421,455061829365013525895519,17280365899913280584318305,656198842367339648678200067,24918275644058993369187284245,946238275631874408380438601239,35932136198367168525087479562841,1364474937262320529544943784786715,51814115479769812954182776342332333 mul $0,2 add $0,3 seq $0,5667 ; Numerators of continued fraction convergents to sqrt(10). sub $0,117 div $0,6 mul $0,9 add $0,172 div $0,2 sub $0,85 div $0,5 mul $0,2 add $0,35
42.8125
433
0.846715
e023946999f17ffaded46fb4378e94c855f1f0a4
67
asm
Assembly
nes-test-roms/mmc3_irq_tests/source/prefix_swap.asm
joebentley/ones
d2c7d21bd94dda9d312c56a197cddec164035d4f
[ "BSD-2-Clause" ]
1,461
2022-02-25T17:44:34.000Z
2022-03-30T06:18:29.000Z
rustnes-dev/test_roms/mmc3_irq_tests/source/prefix_swap.asm
w1n5t0n99/rustnes
2d03cc0c5dcc33d6f4ca35a009b2aee9c0d096d4
[ "MIT" ]
17
2016-10-30T12:46:35.000Z
2020-01-31T11:34:38.000Z
rustnes-dev/test_roms/mmc3_irq_tests/source/prefix_swap.asm
w1n5t0n99/rustnes
2d03cc0c5dcc33d6f4ca35a009b2aee9c0d096d4
[ "MIT" ]
47
2016-10-24T00:30:56.000Z
2022-02-10T15:19:41.000Z
.include "prefix_cpu.a" .include "util.a" .include "ppu_sync.a"
16.75
24
0.686567
6bc2f7a49ca5e8a18e2098e32f15639317e88b76
280
asm
Assembly
programs/oeis/114/A114364.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/114/A114364.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/114/A114364.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A114364: a(n) = n*(n+1)^2. ; 4,18,48,100,180,294,448,648,900,1210,1584,2028,2548,3150,3840,4624,5508,6498,7600,8820,10164,11638,13248,15000,16900,18954,21168,23548,26100,28830,31744,34848,38148,41650,45360,49284,53428,57798,62400 mov $1,$0 add $0,2 pow $0,2 add $1,1 mul $1,$0
31.111111
202
0.714286
f0bfb94843b194040981f0fe173ba9e469010ea7
346
asm
Assembly
programs/oeis/290/A290699.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/290/A290699.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/290/A290699.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A290699: a(n) = 2^n - n + n^2. ; 0,2,6,14,28,52,94,170,312,584,1114,2158,4228,8348,16566,32978,65776,131344,262450,524630,1048956,2097572,4194766,8389114,16777768,33555032,67109514,134218430,268436212,536871724,1073742694,2147484578,4294968288,8589935648,17179870306 sub $0,1 mov $2,2 pow $2,$0 sub $3,$0 bin $3,2 add $2,$3 mov $0,$2 mul $0,2
28.833333
235
0.731214
ba1ba629e7469f74e8dfa20ae35e840306ad8694
20
asm
Assembly
tests/value_error.asm
brekekekex/RiSC-16_assembler
b5571af95a77ff906a7cf3728d78bc7e8eae9613
[ "Unlicense" ]
null
null
null
tests/value_error.asm
brekekekex/RiSC-16_assembler
b5571af95a77ff906a7cf3728d78bc7e8eae9613
[ "Unlicense" ]
null
null
null
tests/value_error.asm
brekekekex/RiSC-16_assembler
b5571af95a77ff906a7cf3728d78bc7e8eae9613
[ "Unlicense" ]
null
null
null
addi r1, r0, 34234
10
19
0.65
6b23a54841d294e14304684a78ac8f58c5b1d6a4
615
asm
Assembly
oeis/062/A062457.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/062/A062457.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/062/A062457.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A062457: a(n) = prime(n)^n. ; 2,9,125,2401,161051,4826809,410338673,16983563041,1801152661463,420707233300201,25408476896404831,6582952005840035281,925103102315013629321,73885357344138503765449,12063348350820368238715343,3876269050118516845397872321,1271991467017507741703714391419,136753052840548005895349735207881,49593099428404263766544428188098203,10596610576391421032662867140133202401,1348279907365869037210940254745047725673,559494740587480879172162808385362976196641,137656310293626928473255626953462008797108987 mov $2,$0 seq $0,6005 ; The odd prime numbers together with 1. add $2,1 pow $0,$2 max $0,2
68.333333
492
0.882927
dde1b75cf79897c87d0b095859c3c6872117826e
275
asm
Assembly
programs/oeis/109/A109049.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/109/A109049.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/109/A109049.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A109049: a(n) = lcm(n, 8). ; 0,8,8,24,8,40,24,56,8,72,40,88,24,104,56,120,16,136,72,152,40,168,88,184,24,200,104,216,56,232,120,248,32,264,136,280,72,296,152,312,40,328,168,344,88,360,184,376,48,392,200,408,104,424,216,440,56,456,232 mov $1,$0 gcd $1,8 div $0,$1 mul $0,8
34.375
206
0.654545
360882bea5359e5f0240f16ab0889059e89922f2
65
asm
Assembly
BitEpicness/TestAssembly.asm
davidov541/BitEpicness
6f2dfddff55f4d9054bd9670dc49851a3444b0ef
[ "Apache-2.0" ]
null
null
null
BitEpicness/TestAssembly.asm
davidov541/BitEpicness
6f2dfddff55f4d9054bd9670dc49851a3444b0ef
[ "Apache-2.0" ]
null
null
null
BitEpicness/TestAssembly.asm
davidov541/BitEpicness
6f2dfddff55f4d9054bd9670dc49851a3444b0ef
[ "Apache-2.0" ]
null
null
null
L1: ldi $s0, 50 ldi $s1, 100 add $s0, $s1 swn $rr, $0, $0
13
17
0.476923
0d32c94368792cfa2bef335a696e8a27d138a3a5
693
asm
Assembly
programs/oeis/180/A180118.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/180/A180118.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/180/A180118.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A180118: a(n) = Sum_{k=1..n} (k+2)!/k! = Sum_{k=1..n} (k+2)*(k+1). ; 0,6,18,38,68,110,166,238,328,438,570,726,908,1118,1358,1630,1936,2278,2658,3078,3540,4046,4598,5198,5848,6550,7306,8118,8988,9918,10910,11966,13088,14278,15538,16870,18276,19758,21318,22958,24680,26486,28378,30358,32428,34590,36846,39198,41648,44198,46850,49606,52468,55438,58518,61710,65016,68438,71978,75638,79420,83326,87358,91518,95808,100230,104786,109478,114308,119278,124390,129646,135048,140598,146298,152150,158156,164318,170638,177118,183760,190566,197538,204678,211988,219470,227126,234958,242968,251158,259530,268086,276828,285758,294878,304190,313696,323398,333298,343398 add $0,3 bin $0,3 sub $0,1 mul $0,2
86.625
586
0.772006
a9a64b8fbaaee79c943db1043e32b17d02f45eb9
2,513
asm
Assembly
code/actors.asm
martendo7/cookie-shooter-gb
b733f227e154cf63392f85dd72ac79f39937135a
[ "MIT" ]
3
2021-04-22T01:21:25.000Z
2021-05-30T21:17:52.000Z
code/actors.asm
martendo/cookie-shooter-gb
b733f227e154cf63392f85dd72ac79f39937135a
[ "MIT" ]
1
2021-05-13T00:30:35.000Z
2021-05-13T23:22:55.000Z
code/actors.asm
martendo/cookie-shooter-gb
b733f227e154cf63392f85dd72ac79f39937135a
[ "MIT" ]
null
null
null
INCLUDE "defines.inc" SECTION "Actor Variables", HRAM ; The index of the next available OAM slot hNextAvailableOAMSlot:: DS 1 SECTION "Common Actor Code", ROM0 ; Hide all objects in OAM by zeroing their Y positions HideAllObjects:: ld hl, wShadowOAM HideAllObjectsAtAddress:: ld d, OAM_COUNT HideObjects: ld bc, sizeof_OAM_ATTRS xor a, a .loop ld [hl], a add hl, bc dec d jr nz, .loop ret ; Hide all objects that aren't the player HideAllActors:: ld hl, wShadowOAM + (PLAYER_OBJ_COUNT * sizeof_OAM_ATTRS) ld d, OAM_COUNT - PLAYER_OBJ_COUNT jr HideObjects ; Hide objects starting at hNextAvailableOAMSlot HideUnusedObjects:: ldh a, [hNextAvailableOAMSlot] ld b, a ld a, OAM_COUNT sub a, b ret z ; Nothing to do ld d, a ld a, b ASSERT sizeof_OAM_ATTRS == 4 add a, a add a, a ld l, a ld h, HIGH(wShadowOAM) jr HideObjects ; Find an empty slot in an actor table ; @param hl Pointer to actor data ; @param b Maximum number of actors ; @return cf Set if no empty slot was found, otherwise reset FindEmptyActorSlot:: ; Clear carry (no instructions in the loop affect the carry) and a, a .loop ld a, [hli] ASSERT NO_ACTOR == -1 inc a ret z inc l dec b jr nz, .loop ; No more slots scf ret ; Use an index to active actors and return it in de ; @param a N - the index to active actors ; @param c Maximum number of actors ; @param de Pointer to actor position table ; @return de Pointer to Nth active actor PointDEToNthActiveActor:: inc a ld b, a ld l, a ; Save for comparing ld h, c ; Save for resetting .loop ld a, [de] ; Y position ASSERT NO_ACTOR == -1 inc a ; No actor, skip jr z, .next dec b ret z .next dec c jr nz, .noWrap ; Reached end of table ld a, b cp a, l ; No active actors? jr nz, :+ ; Don't draw anything -> skip return to DrawXXX pop af ret : ; Wrap back to beginning ASSERT LOW(wCookiePosTable) == LOW(wLaserPosTable) ld e, LOW(wCookiePosTable) ld c, h jr .loop .noWrap ASSERT ACTOR_SIZE == 2 inc e inc e jr .loop
23.268519
66
0.562674
0b765cde7fd38b11a818696962d964500d1b5ee3
27,386
asm
Assembly
Glaux.asm
hexagonix/Fontes
108c7468c736ed30561953f5c185f8e498b88c2d
[ "MIT" ]
null
null
null
Glaux.asm
hexagonix/Fontes
108c7468c736ed30561953f5c185f8e498b88c2d
[ "MIT" ]
null
null
null
Glaux.asm
hexagonix/Fontes
108c7468c736ed30561953f5c185f8e498b88c2d
[ "MIT" ]
null
null
null
;; Fonte derivada do projeto GlauxOS (projeto descontinuado) assinatura: db "HFNT" unicode_0000: times 16 db 0 unicode_0033: db 00000000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00000000b db 00000000b db 00001000b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0034: db 00000000b db 00010100b db 00010100b db 00010100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0035: db 00000000b db 00100100b db 00100100b db 01111110b db 00100100b db 00100100b db 00100100b db 00100100b db 01111110b db 00100100b db 00100100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0036: db 00000000b db 00001000b db 00011100b db 00101010b db 00101000b db 00011000b db 00001100b db 00001010b db 00101010b db 00011100b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0037: db 00000000b db 00100010b db 01010100b db 00100100b db 00001000b db 00001000b db 00010000b db 00010000b db 00100100b db 00101010b db 01000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0038: db 00000000b db 00011000b db 00100100b db 01000100b db 01001000b db 01010000b db 00100000b db 01010000b db 01001010b db 01000100b db 00111010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0039: db 00000000b db 00001000b db 00001000b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0040: db 00000000b db 00000100b db 00001000b db 00001000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00001000b db 00001000b db 00000100b db 00000000b unicode_0041: db 00000000b db 00100000b db 00010000b db 00010000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00010000b db 00010000b db 00100000b db 00000000b unicode_0042: db 00000000b db 00001000b db 00101010b db 00011100b db 00101010b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0043: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00001000b db 00001000b db 00111110b db 00001000b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0044: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00001000b db 00001000b db 00010000b db 00100000b db 00000000b db 00000000b db 00000000b unicode_0045: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0046: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00001000b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0047: db 00000000b db 00000010b db 00000010b db 00000100b db 00000100b db 00001000b db 00001000b db 00010000b db 00010000b db 00100000b db 00100000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b unicode_0048: db 00000000b db 00011000b db 00100100b db 01000010b db 01000010b db 01001010b db 01010010b db 01000010b db 01000010b db 00100100b db 00011000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0049: db 00000000b db 00001000b db 00001000b db 00011000b db 00101000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00011100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0050: db 00000000b db 00111000b db 01000100b db 00000010b db 00000010b db 00000100b db 00001000b db 00010000b db 00100000b db 01000000b db 01111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0051: db 00000000b db 00111000b db 01000100b db 00000010b db 00000100b db 00011000b db 00000100b db 00000010b db 00000010b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0052: db 00000000b db 00000100b db 00000100b db 00001100b db 00010100b db 00100100b db 01000100b db 01111110b db 00000100b db 00000100b db 00000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0053: db 00000000b db 01111110b db 01000000b db 01000000b db 01000000b db 01111000b db 00000100b db 00000010b db 00000010b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0054: db 00000000b db 00011100b db 00100010b db 01000000b db 01000000b db 01011000b db 01100100b db 01000010b db 01000010b db 00100100b db 00011000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0055: db 00000000b db 01111110b db 00000010b db 00000100b db 00000100b db 00001000b db 00001000b db 00010000b db 00010000b db 00100000b db 00100000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0056: db 00000000b db 00011000b db 00100100b db 01000010b db 00100100b db 00011000b db 00100100b db 01000010b db 01000010b db 00100100b db 00011000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0057: db 00000000b db 00011000b db 00100100b db 01000010b db 01000010b db 00100110b db 00011010b db 00000010b db 00000010b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0058: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00001000b db 00001000b db 00000000b db 00000000b db 00001000b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0059: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00001000b db 00001000b db 00000000b db 00000000b db 00001000b db 00001000b db 00010000b db 00100000b db 00000000b db 00000000b db 00000000b unicode_0060: db 00000000b db 00000000b db 00000000b db 00000000b db 00000100b db 00001000b db 00010000b db 00100000b db 00010000b db 00001000b db 00000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0061: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00111110b db 00000000b db 00111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0062: db 00000000b db 00000000b db 00000000b db 00000000b db 00100000b db 00010000b db 00001000b db 00000100b db 00001000b db 00010000b db 00100000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0063: db 00000000b db 00111000b db 01000100b db 00000010b db 00000010b db 00000100b db 00001000b db 00010000b db 00000000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0064: db 00000000b db 00011000b db 00100100b db 01000010b db 01000010b db 01001110b db 01010010b db 01010010b db 01001110b db 00100000b db 00011100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0065: db 00000000b db 00001000b db 00001000b db 00010100b db 00010100b db 00100010b db 00111110b db 00100010b db 01000001b db 01000001b db 01000001b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0066: db 00000000b db 01111000b db 01000100b db 01000010b db 01000100b db 01111000b db 01000100b db 01000010b db 01000010b db 01000100b db 01111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0067: db 00000000b db 00011100b db 00100010b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 00100010b db 00011100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0068: db 00000000b db 01111000b db 01000100b db 01000010b db 01000010b db 01000010b db 01000010b db 01000010b db 01000010b db 01000100b db 01111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0069: db 00000000b db 01111110b db 01000000b db 01000000b db 01000000b db 01111100b db 01000000b db 01000000b db 01000000b db 01000000b db 01111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0070: db 00000000b db 01111110b db 01000000b db 01000000b db 01000000b db 01111100b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0071: db 00000000b db 00011100b db 00100010b db 01000000b db 01000000b db 01000000b db 01001110b db 01000010b db 01000010b db 00100010b db 00011100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0072: db 00000000b db 01000010b db 01000010b db 01000010b db 01000010b db 01111110b db 01000010b db 01000010b db 01000010b db 01000010b db 01000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0073: db 00000000b db 00011100b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00011100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0074: db 00000000b db 00000100b db 00000100b db 00000100b db 00000100b db 00000100b db 00000100b db 00000100b db 00000100b db 01001000b db 00110000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0075: db 00000000b db 01000010b db 01000100b db 01001000b db 01010000b db 01100000b db 01010000b db 01001000b db 01000100b db 01000010b db 01000001b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0076: db 00000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0077: db 00000000b db 01000001b db 01000001b db 01100011b db 01010101b db 01010101b db 01001001b db 01001001b db 01000001b db 01000001b db 01000001b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0078: db 00000000b db 01000010b db 01000010b db 01100010b db 01010010b db 01010010b db 01001010b db 01001010b db 01000110b db 01000010b db 01000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0079: db 00000000b db 00011100b db 00100010b db 01000001b db 01000001b db 01000001b db 01000001b db 01000001b db 01000001b db 00100010b db 00011100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0080: db 00000000b db 01111000b db 01000100b db 01000010b db 01000010b db 01000100b db 01111000b db 01000000b db 01000000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0081: db 00000000b db 00011100b db 00100010b db 01000001b db 01000001b db 01000001b db 01000001b db 01000001b db 01000101b db 00100010b db 00011101b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0082: db 00000000b db 01111000b db 01000100b db 01000010b db 01000010b db 01000100b db 01111000b db 01010000b db 01001000b db 01000100b db 01000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0083: db 00000000b db 00011100b db 00100010b db 01000000b db 01000000b db 00110000b db 00001100b db 00000010b db 00000010b db 01000100b db 00111000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0084: db 00000000b db 00111110b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0085: db 00000000b db 01000001b db 01000001b db 01000001b db 01000001b db 01000001b db 01000001b db 01000001b db 01000001b db 00100010b db 00011100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0086: db 00000000b db 01000001b db 01000001b db 01000001b db 00100010b db 00100010b db 00100010b db 00010100b db 00010100b db 00001000b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0087: db 00000000b db 01000001b db 01000001b db 01000001b db 01001001b db 01001001b db 01010101b db 01010101b db 01100011b db 01000001b db 01000001b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0088: db 00000000b db 00100010b db 00100010b db 00010100b db 00010100b db 00001000b db 00001000b db 00010100b db 00010100b db 00100010b db 00100010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0089: db 00000000b db 00100010b db 00100010b db 00100010b db 00010100b db 00010100b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0090: db 00000000b db 00111110b db 00000010b db 00000100b db 00000100b db 00001000b db 00001000b db 00010000b db 00010000b db 00100000b db 00111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0091: db 00000000b db 00011110b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00011110b db 00000000b unicode_0092: db 00000000b db 01000000b db 01000000b db 00100000b db 00100000b db 00010000b db 00010000b db 00001000b db 00001000b db 00000100b db 00000100b db 00000010b db 00000010b db 00000000b db 00000000b db 00000000b unicode_0093: db 00000000b db 01111000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 01111000b db 00000000b unicode_0094: db 00000000b db 00001000b db 00010100b db 00100010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0095: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 11111111b db 00000000b unicode_0096: db 00000000b db 00010000b db 00001000b db 00000100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0097: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00111000b db 00000100b db 00111100b db 01000100b db 01000100b db 00111010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0098: db 00000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01011000b db 01100100b db 01000010b db 01000010b db 01100100b db 01011000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0099: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00011100b db 00100010b db 01000000b db 01000000b db 00100010b db 00011100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0100: db 00000000b db 00000010b db 00000010b db 00000010b db 00000010b db 00011010b db 00100110b db 01000010b db 01000010b db 00100110b db 00011010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0101: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00111100b db 01000010b db 01111100b db 01000000b db 00100010b db 00011100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0102: db 00000000b db 00000110b db 00001000b db 00010000b db 00010000b db 00111110b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0103: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00011010b db 00100110b db 01000010b db 01000010b db 00100110b db 00011010b db 00000010b db 00000010b db 01000100b db 00111000b db 00000000b unicode_0104: db 00000000b db 01000000b db 01000000b db 01000000b db 01000000b db 01011000b db 01100100b db 01000010b db 01000010b db 01000010b db 01000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0105: db 00000000b db 00000000b db 00000000b db 00001000b db 00000000b db 00111000b db 00001000b db 00001000b db 00001000b db 00001000b db 00000110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0106: db 00000000b db 00000000b db 00000000b db 00000100b db 00000000b db 00011100b db 00000100b db 00000100b db 00000100b db 00000100b db 00000100b db 00000100b db 00000100b db 01001000b db 00110000b db 00000000b unicode_0107: db 00000000b db 00100000b db 00100000b db 00100000b db 00100000b db 00100100b db 00101000b db 00110000b db 00101000b db 00100100b db 00100010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0108: db 00000000b db 00111000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00000110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0109: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01010100b db 01101010b db 01001001b db 01001001b db 01001001b db 01001001b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0110: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01011000b db 01100100b db 01000010b db 01000010b db 01000010b db 01000010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0111: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00011000b db 00100100b db 01000010b db 01000010b db 00100100b db 00011000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0112: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01011000b db 01100100b db 01000010b db 01000010b db 01100100b db 01011000b db 01000000b db 01000000b db 01000000b db 01000000b db 00000000b unicode_0113: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00011010b db 00100110b db 01000010b db 01000010b db 00100110b db 00011010b db 00000010b db 00000010b db 00000010b db 00000010b db 00000000b unicode_0114: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01011100b db 01100010b db 01000000b db 01000000b db 01000000b db 01000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0115: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00111100b db 01000010b db 00110000b db 00001100b db 01000010b db 00111100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0116: db 00000000b db 00001000b db 00001000b db 00001000b db 00001000b db 00111110b db 00001000b db 00001000b db 00001000b db 00001000b db 00000110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0117: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01000010b db 01000010b db 01000010b db 01000010b db 00100110b db 00011010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0118: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01000001b db 01000001b db 00100010b db 00100010b db 00010100b db 00001000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0119: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01000001b db 01000001b db 01001001b db 01001001b db 01010101b db 00100010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0120: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00100010b db 00010100b db 00001000b db 00001000b db 00010100b db 00100010b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0121: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01000010b db 01000010b db 00100010b db 00100100b db 00010100b db 00001000b db 00001000b db 00010000b db 00010000b db 01100000b db 00000000b unicode_0122: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 01111110b db 00000100b db 00001000b db 00010000b db 00100000b db 01111110b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0123: db 00000000b db 00000110b db 00001000b db 00001000b db 00001000b db 00001000b db 00010000b db 01100000b db 00010000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00000110b db 00000000b unicode_0124: db 00000000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00001000b db 00000000b db 00000000b db 00000000b unicode_0125: db 00000000b db 01100000b db 00010000b db 00010000b db 00010000b db 00010000b db 00001000b db 00000110b db 00001000b db 00010000b db 00010000b db 00010000b db 00010000b db 00010000b db 01100000b db 00000000b unicode_0126: db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00110010b db 01001100b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b db 00000000b unicode_0127: db 00000000b db 01111110b db 01000010b db 01000010b db 01000010b db 01000010b db 01000010b db 01000010b db 01000010b db 01000010b db 01000010b db 01000010b db 01000010b db 01000010b db 01111110b db 00000000b
15.949913
60
0.655335
37fcb0d88260a9f5e09bc206d5179cc21aad54e2
730
asm
Assembly
programs/oeis/213/A213243.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/213/A213243.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/213/A213243.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A213243: Number of nonzero elements in GF(2^n) that are cubes. ; 1,1,7,5,31,21,127,85,511,341,2047,1365,8191,5461,32767,21845,131071,87381,524287,349525,2097151,1398101,8388607,5592405,33554431,22369621,134217727,89478485,536870911,357913941,2147483647,1431655765,8589934591,5726623061,34359738367,22906492245,137438953471,91625968981,549755813887,366503875925,2199023255551,1466015503701,8796093022207,5864062014805,35184372088831,23456248059221,140737488355327,93824992236885,562949953421311,375299968947541,2251799813685247,1501199875790165,9007199254740991,6004799503160661 mov $3,2 lpb $0,1 sub $0,1 mul $3,2 lpe add $0,$3 sub $0,1 add $0,$3 sub $0,$3 mov $2,6 gcd $2,$0 div $0,$2 mov $1,$0 div $1,2 mul $1,2 add $1,1
36.5
514
0.80137
ee144277b2ab24b836e14013a8b1dbceef6b9444
398
asm
Assembly
oeis/127/A127533.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/127/A127533.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/127/A127533.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A127533: Sum of jump-lengths of all binary trees with n edges. ; Submitted by Jamie Morken(s4) ; 0,0,0,2,17,100,506,2366,10556,45696,193800,810084,3350479,13748020,56071470,227613750,920540040,3711935040,14932102320,59951235420,240316859250,962056169256,3847193657076,15370712686252,61364157982952 mov $1,$0 mul $1,2 mov $2,$0 mov $0,1 add $0,$1 sub $2,3 bin $0,$2 bin $1,$2 add $1,$0 mov $0,$1
26.533333
202
0.751256
44d83ab6989c37b9efa78c95c47e54a9e1352470
479
asm
Assembly
Chapter_8/Program 8.4_SSE_packed/x86/Program_8.4_NASM.asm
chen150182055/Assembly
e5e76bea438a3752b59775098205a77aa7087110
[ "MIT" ]
272
2016-12-28T02:24:21.000Z
2022-03-30T21:05:37.000Z
Chapter_8/Program 8.4_SSE_packed/x86/Program_8.4_NASM.asm
chen150182055/Assembly
e5e76bea438a3752b59775098205a77aa7087110
[ "MIT" ]
1
2018-04-17T19:47:52.000Z
2018-04-17T19:47:52.000Z
Chapter_8/Program 8.4_SSE_packed/x86/Program_8.4_NASM.asm
chen150182055/Assembly
e5e76bea438a3752b59775098205a77aa7087110
[ "MIT" ]
62
2017-02-02T14:39:37.000Z
2022-01-04T09:02:07.000Z
; Program 8.4 ; SSE Packed Operations - NASM (32-bit) ; Copyright (c) 2017 Hall & Slonka section .data align 16 ; 16-byte alignment vectorA: dd 1.2, 3.4, 5.6, 7.8 vectorB: dd 7.8, 5.6, 3.4, 1.2 section .bss result: resd 4 ; space for storing results section .text global _main _main: movaps xmm0, [vectorA] ; move aligned packed SP vectorA to XMM0 addps xmm0, [vectorB] ; add vectorB to XMM0 movaps [result], xmm0 ; move data to result mov eax, 1 mov ebx, 0 int 80h
19.958333
64
0.691023
8b6cd3056cd26d6f7d9c6cf863c2a06fed51288c
24,430
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math16/c/asm/cosf16.asm
geoffmcl/z88dk
a7eb96a7ae11251b213d1c5754f6717443c5c7ff
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/float/math16/c/asm/cosf16.asm
geoffmcl/z88dk
a7eb96a7ae11251b213d1c5754f6717443c5c7ff
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/float/math16/c/asm/cosf16.asm
geoffmcl/z88dk
a7eb96a7ae11251b213d1c5754f6717443c5c7ff
[ "ClArtistic" ]
null
null
null
;* * * * * Small-C/Plus z88dk * * * * * ; Version: 16668-1b318d7b8-20200708 ; ; Reconstructed for z80 Module Assembler ; ; Module compile time: Sat Jul 11 20:26:34 2020 C_LINE 0,"cosf16.c" MODULE cosf16_c INCLUDE "z80_crt0.hdr" C_LINE 0,"math16.h" C_LINE 0,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 8,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 9,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 10,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 12,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 13,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 14,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 16,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 17,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 18,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 20,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 21,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 22,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 24,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 25,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 26,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 28,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 29,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 30,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 60,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 63,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 81,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 82,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/stdint.h" C_LINE 34,"math16.h" C_LINE 0,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 22,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 39,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 51,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 145,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 148,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 151,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 154,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 155,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 160,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 163,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 166,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 170,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 173,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 176,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 180,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 183,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 186,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 190,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 193,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 196,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 199,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 200,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 204,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 207,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 208,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 212,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 213,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 217,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 218,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 223,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 226,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 229,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 232,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 235,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 239,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 242,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 243,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 248,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 249,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 253,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 256,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 260,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 263,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 266,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 269,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 273,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 276,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 279,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 282,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 285,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 288,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 291,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 294,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 298,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 299,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 303,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 304,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 308,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 309,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 313,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 314,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 319,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 320,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 324,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 328,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 329,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 333,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 334,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 339,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 340,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 345,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 346,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 350,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 351,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 356,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 357,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 362,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 363,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 367,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 368,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 372,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 373,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 377,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 378,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 382,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 383,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 387,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 388,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 426,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 429,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 433,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 436,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 440,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 443,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 446,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 449,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 453,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 456,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 459,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 462,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 465,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 468,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 472,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 473,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 477,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 478,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 482,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 483,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 487,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 488,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 493,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 494,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 498,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 499,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 503,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 504,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 509,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 512,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 516,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 520,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 523,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 526,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 529,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 530,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 534,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 535,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 540,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 543,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 546,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 550,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 553,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 556,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 560,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 563,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 566,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 569,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 572,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 575,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 578,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 579,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 584,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 587,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 590,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 593,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 597,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 598,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 602,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 603,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 607,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 608,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 612,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 613,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 617,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 618,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 622,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 623,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 627,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 628,"/home/phillip/Z80/z88dk/lib/config/../..//include/_DEVELOPMENT/sccz80/math.h" C_LINE 35,"math16.h" C_LINE 33,"cosf16.c" C_LINE 35,"cosf16.c" C_LINE 36,"cosf16.c" C_LINE 38,"cosf16.c" SECTION code_compiler ; Function cosf16 flags 0x00000288 __smallc __z88dk_fastcall ; _Float16 half_tcosf16(_Float16 xx) ; parameter '_Float16 xx' at 2 size(2) C_LINE 39,"cosf16.c::cosf16" .cosf16 GLOBAL _cosf16 ._cosf16 push hl push bc push bc push bc push bc dec sp pop hl ld l,+(1 % 256) push hl ld hl,7 ;const add hl,sp ex de,hl ld hl,9 ;const add hl,sp ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a ex de,hl ;l_pint ld (hl),e inc hl ld (hl),d ex de,hl ld hl,7 ;const add hl,sp ld e,(hl) inc hl ld d,(hl) push de ld hl,0 ;const call l_f16_lt ld a,h or l jp z,i_2 ld hl,7 ;const add hl,sp push hl ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a ld a,h xor 128 ld h,a pop de ex de,hl ;l_pint ld (hl),e inc hl ld (hl),d ex de,hl .i_2 ld hl,1 ;const add hl,sp push hl ld hl,9 ;const add hl,sp ld e,(hl) inc hl ld d,(hl) push de ld hl,15639 ;const call l_f16_mul call l_f16_f2sint pop de ex de,hl ;l_pint ld (hl),e inc hl ld (hl),d ex de,hl ld hl,5 ;const add hl,sp push hl ld hl,3 ;const add hl,sp ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a call l_f16_uint2f pop de ex de,hl ;l_pint ld (hl),e inc hl ld (hl),d ex de,hl ld hl,1 ;const add hl,sp ld a,(hl) and +(1 % 256) ld l,a ld h,0 and a jp z,i_4 ld hl,1 ;const add hl,sp inc (hl) ld a,(hl) inc hl jr nz,ASMPC+3 inc (hl) ld h,(hl) ld l,a ld hl,5 ;const add hl,sp push hl ld e,(hl) inc hl ld d,(hl) push de ld hl,15360 ;const call l_f16_add pop de ex de,hl ;l_pint ld (hl),e inc hl ld (hl),d ex de,hl .i_4 ld hl,1 ;const add hl,sp push hl ld a,(hl) and +(7 % 256) ld l,a ld h,0 pop de ex de,hl ;l_pint ld (hl),e inc hl ld (hl),d ex de,hl ld hl,1 ;const add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,3 and a sbc hl,de jp nc,i_5 ld hl,0 ;const add hl,sp push hl ld a,(hl) ;l_gchar ld l,a rla sbc a ld h,a ld a,l ;l_neg cpl ld l,a ld a,h cpl ld h,a inc hl ld a,l ld l,a ;l_sxt rla sbc a ld h,a pop de ld a,l ld (de),a ld hl,1 ;const add hl,sp push hl ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a ld bc,-4 add hl,bc pop de ex de,hl ;l_pint ld (hl),e inc hl ld (hl),d ex de,hl .i_5 ld hl,1 ;const add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,1 and a sbc hl,de jp nc,i_6 ld hl,0 ;const add hl,sp push hl ld a,(hl) ;l_gchar ld l,a rla sbc a ld h,a ld a,l ;l_neg cpl ld l,a ld a,h cpl ld h,a inc hl ld a,l ld l,a ;l_sxt rla sbc a ld h,a pop de ld a,l ld (de),a .i_6 ld hl,7 ;const add hl,sp push hl ld e,(hl) inc hl ld d,(hl) push de ld hl,9 ;const add hl,sp ld e,(hl) inc hl ld d,(hl) push de ld hl,14920 ;const call l_f16_mul call l_f16_sub pop de ex de,hl ;l_pint ld (hl),e inc hl ld (hl),d ex de,hl ld hl,3 ;const add hl,sp push hl ld hl,9 ;const add hl,sp ld e,(hl) inc hl ld d,(hl) push de ld hl,11 ;const add hl,sp ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a call l_f16_mul pop de ex de,hl ;l_pint ld (hl),e inc hl ld (hl),d ex de,hl ld hl,1 ;const add hl,sp ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a ld de,1 and a sbc hl,de scf jr z,ASMPC+3 ccf jp c,i_9 ld hl,1 ;const add hl,sp ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a ld de,2 and a sbc hl,de jp nz,i_8 .i_9 ld hl,5 ;const add hl,sp push hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) push de ld hl,_f16_coeff_sin push hl ld hl,3 ;const push hl call polyf16_callee push hl ld hl,11 ;const add hl,sp ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a call l_f16_mul push hl ld hl,11 ;const add hl,sp ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a call l_f16_add pop de ex de,hl ;l_pint ld (hl),e inc hl ld (hl),d ex de,hl jp i_11 .i_8 ld hl,5 ;const add hl,sp push hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) push de ld hl,_f16_coeff_cos push hl ld hl,4 ;const push hl call polyf16_callee push hl ld hl,7 ;const add hl,sp ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a ld a,-1 call l_f16_ldexp call l_f16_sub push hl ld hl,15360 ;const call l_f16_add pop de ex de,hl ;l_pint ld (hl),e inc hl ld (hl),d ex de,hl .i_11 ld hl,0 ;const add hl,sp ld a,(hl) ;l_gchar ld l,a rla sbc a ld h,a ld a,l rla jp nc,i_13 ld hl,5 ;const add hl,sp ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a ld a,h xor 128 ld h,a jp i_14 .i_13 ld hl,5 ;const add hl,sp ld a,(hl) ;l_gint inc hl ld h,(hl) ld l,a .i_14 exx ld hl,11 ;const add hl,sp ld sp,hl exx ret ; --- Start of Static Variables --- SECTION bss_compiler SECTION code_compiler ; --- Start of Scope Defns --- GLOBAL acos GLOBAL asin GLOBAL atan GLOBAL atan2 GLOBAL atan2_callee GLOBAL cos GLOBAL sin GLOBAL tan GLOBAL acosh GLOBAL asinh GLOBAL atanh GLOBAL cosh GLOBAL sinh GLOBAL tanh GLOBAL exp GLOBAL exp2 GLOBAL expm1 GLOBAL frexp GLOBAL frexp_callee GLOBAL ilogb GLOBAL ldexp GLOBAL ldexp_callee GLOBAL scalbn GLOBAL scalbn_callee GLOBAL scalbln GLOBAL scalbln_callee GLOBAL log GLOBAL log10 GLOBAL log1p GLOBAL log2 GLOBAL logb GLOBAL fabs GLOBAL hypot GLOBAL hypot_callee GLOBAL pow GLOBAL pow_callee GLOBAL sqrt GLOBAL cbrt GLOBAL erf GLOBAL erfc GLOBAL lgamma GLOBAL tgamma GLOBAL ceil GLOBAL floor GLOBAL nearbyint GLOBAL rint GLOBAL lrint GLOBAL round GLOBAL lround GLOBAL trunc GLOBAL modf GLOBAL modf_callee GLOBAL fmod GLOBAL fmod_callee GLOBAL remainder GLOBAL remainder_callee GLOBAL remquo GLOBAL remquo_callee GLOBAL copysign GLOBAL copysign_callee GLOBAL nan GLOBAL nextafter GLOBAL nextafter_callee GLOBAL nexttoward GLOBAL nexttoward_callee GLOBAL fdim GLOBAL fdim_callee GLOBAL fmax GLOBAL fmax_callee GLOBAL fmin GLOBAL fmin_callee GLOBAL fma GLOBAL fma_callee GLOBAL isgreater GLOBAL isgreater_callee GLOBAL isgreaterequal GLOBAL isgreaterequal_callee GLOBAL isless GLOBAL isless_callee GLOBAL islessequal GLOBAL islessequal_callee GLOBAL islessgreater GLOBAL islessgreater_callee GLOBAL isunordered GLOBAL isunordered_callee GLOBAL f16_f48 GLOBAL f48_f16 GLOBAL f16_f32 GLOBAL f32_f16 GLOBAL i16_f16 GLOBAL u16_f16 GLOBAL i32_f16 GLOBAL u32_f16 GLOBAL f16_i8 GLOBAL f16_i16 GLOBAL f16_i32 GLOBAL f16_u8 GLOBAL f16_u16 GLOBAL f16_u32 GLOBAL addf16 GLOBAL addf16_callee GLOBAL subf16 GLOBAL subf16_callee GLOBAL mulf16 GLOBAL mulf16_callee GLOBAL divf16 GLOBAL divf16_callee GLOBAL fmaf16 GLOBAL fmaf16_callee GLOBAL polyf16 GLOBAL polyf16_callee GLOBAL hypotf16 GLOBAL hypotf16_callee GLOBAL invf16 GLOBAL invsqrtf16 GLOBAL sqrtf16 GLOBAL div2f16 GLOBAL mul2f16 GLOBAL mul10f16 GLOBAL frexpf16 GLOBAL frexpf16_callee GLOBAL ldexpf16 GLOBAL ldexpf16_callee GLOBAL acosf16 GLOBAL asinf16 GLOBAL atanf16 GLOBAL cosf16 GLOBAL sinf16 GLOBAL tanf16 GLOBAL expf16 GLOBAL exp2f16 GLOBAL exp10f16 GLOBAL logf16 GLOBAL log2f16 GLOBAL log10f16 GLOBAL powf16 GLOBAL powf16_callee GLOBAL fabsf16 GLOBAL negf16 GLOBAL ceilf16 GLOBAL floorf16 GLOBAL isgreaterf16 GLOBAL isgreaterf16_callee GLOBAL isgreaterequalf16 GLOBAL isgreaterequalf16_callee GLOBAL islessf16 GLOBAL islessf16_callee GLOBAL islessequalf16 GLOBAL islessequalf16_callee GLOBAL islessgreaterf16 GLOBAL islessgreaterf16_callee GLOBAL isnotequalf16 GLOBAL isnotequalf16_callee GLOBAL isunorderedf16 GLOBAL isunorderedf16_callee GLOBAL _f16_coeff_sin GLOBAL _f16_coeff_cos ; --- End of Scope Defns --- ; --- End of Compilation ---
31.522581
91
0.721899
92c6a14fb39bb20d96bf9e6fb67c10df4d9eaa0f
39,259
asm
Assembly
getmaxpid_test.asm
SOOJEONGKIMM/Operating-System-3
06e31c5ae210ff9dfdf03f0e0151fea0dc1f0995
[ "MIT-0" ]
null
null
null
getmaxpid_test.asm
SOOJEONGKIMM/Operating-System-3
06e31c5ae210ff9dfdf03f0e0151fea0dc1f0995
[ "MIT-0" ]
null
null
null
getmaxpid_test.asm
SOOJEONGKIMM/Operating-System-3
06e31c5ae210ff9dfdf03f0e0151fea0dc1f0995
[ "MIT-0" ]
null
null
null
_getmaxpid_test: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "types.h" #include "stat.h" #include "user.h" #include "fcntl.h" int main(void) { 0: 8d 4c 24 04 lea 0x4(%esp),%ecx 4: 83 e4 f0 and $0xfffffff0,%esp 7: ff 71 fc pushl -0x4(%ecx) a: 55 push %ebp b: 89 e5 mov %esp,%ebp d: 51 push %ecx e: 83 ec 04 sub $0x4,%esp getmaxpid(); 11: e8 14 03 00 00 call 32a <getmaxpid> exit(); 16: e8 57 02 00 00 call 272 <exit> 1b: 66 90 xchg %ax,%ax 1d: 66 90 xchg %ax,%ax 1f: 90 nop 00000020 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, const char *t) { 20: 55 push %ebp 21: 89 e5 mov %esp,%ebp 23: 53 push %ebx 24: 8b 45 08 mov 0x8(%ebp),%eax 27: 8b 4d 0c mov 0xc(%ebp),%ecx char *os; os = s; while((*s++ = *t++) != 0) 2a: 89 c2 mov %eax,%edx 2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 30: 83 c1 01 add $0x1,%ecx 33: 0f b6 59 ff movzbl -0x1(%ecx),%ebx 37: 83 c2 01 add $0x1,%edx 3a: 84 db test %bl,%bl 3c: 88 5a ff mov %bl,-0x1(%edx) 3f: 75 ef jne 30 <strcpy+0x10> ; return os; } 41: 5b pop %ebx 42: 5d pop %ebp 43: c3 ret 44: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 4a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 00000050 <strcmp>: int strcmp(const char *p, const char *q) { 50: 55 push %ebp 51: 89 e5 mov %esp,%ebp 53: 53 push %ebx 54: 8b 55 08 mov 0x8(%ebp),%edx 57: 8b 4d 0c mov 0xc(%ebp),%ecx while(*p && *p == *q) 5a: 0f b6 02 movzbl (%edx),%eax 5d: 0f b6 19 movzbl (%ecx),%ebx 60: 84 c0 test %al,%al 62: 75 1c jne 80 <strcmp+0x30> 64: eb 2a jmp 90 <strcmp+0x40> 66: 8d 76 00 lea 0x0(%esi),%esi 69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi p++, q++; 70: 83 c2 01 add $0x1,%edx while(*p && *p == *q) 73: 0f b6 02 movzbl (%edx),%eax p++, q++; 76: 83 c1 01 add $0x1,%ecx 79: 0f b6 19 movzbl (%ecx),%ebx while(*p && *p == *q) 7c: 84 c0 test %al,%al 7e: 74 10 je 90 <strcmp+0x40> 80: 38 d8 cmp %bl,%al 82: 74 ec je 70 <strcmp+0x20> return (uchar)*p - (uchar)*q; 84: 29 d8 sub %ebx,%eax } 86: 5b pop %ebx 87: 5d pop %ebp 88: c3 ret 89: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 90: 31 c0 xor %eax,%eax return (uchar)*p - (uchar)*q; 92: 29 d8 sub %ebx,%eax } 94: 5b pop %ebx 95: 5d pop %ebp 96: c3 ret 97: 89 f6 mov %esi,%esi 99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000000a0 <strlen>: uint strlen(const char *s) { a0: 55 push %ebp a1: 89 e5 mov %esp,%ebp a3: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) a6: 80 39 00 cmpb $0x0,(%ecx) a9: 74 15 je c0 <strlen+0x20> ab: 31 d2 xor %edx,%edx ad: 8d 76 00 lea 0x0(%esi),%esi b0: 83 c2 01 add $0x1,%edx b3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) b7: 89 d0 mov %edx,%eax b9: 75 f5 jne b0 <strlen+0x10> ; return n; } bb: 5d pop %ebp bc: c3 ret bd: 8d 76 00 lea 0x0(%esi),%esi for(n = 0; s[n]; n++) c0: 31 c0 xor %eax,%eax } c2: 5d pop %ebp c3: c3 ret c4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi ca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 000000d0 <memset>: void* memset(void *dst, int c, uint n) { d0: 55 push %ebp d1: 89 e5 mov %esp,%ebp d3: 57 push %edi d4: 8b 55 08 mov 0x8(%ebp),%edx } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : d7: 8b 4d 10 mov 0x10(%ebp),%ecx da: 8b 45 0c mov 0xc(%ebp),%eax dd: 89 d7 mov %edx,%edi df: fc cld e0: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } e2: 89 d0 mov %edx,%eax e4: 5f pop %edi e5: 5d pop %ebp e6: c3 ret e7: 89 f6 mov %esi,%esi e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000000f0 <strchr>: char* strchr(const char *s, char c) { f0: 55 push %ebp f1: 89 e5 mov %esp,%ebp f3: 53 push %ebx f4: 8b 45 08 mov 0x8(%ebp),%eax f7: 8b 5d 0c mov 0xc(%ebp),%ebx for(; *s; s++) fa: 0f b6 10 movzbl (%eax),%edx fd: 84 d2 test %dl,%dl ff: 74 1d je 11e <strchr+0x2e> if(*s == c) 101: 38 d3 cmp %dl,%bl 103: 89 d9 mov %ebx,%ecx 105: 75 0d jne 114 <strchr+0x24> 107: eb 17 jmp 120 <strchr+0x30> 109: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 110: 38 ca cmp %cl,%dl 112: 74 0c je 120 <strchr+0x30> for(; *s; s++) 114: 83 c0 01 add $0x1,%eax 117: 0f b6 10 movzbl (%eax),%edx 11a: 84 d2 test %dl,%dl 11c: 75 f2 jne 110 <strchr+0x20> return (char*)s; return 0; 11e: 31 c0 xor %eax,%eax } 120: 5b pop %ebx 121: 5d pop %ebp 122: c3 ret 123: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 129: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000130 <gets>: char* gets(char *buf, int max) { 130: 55 push %ebp 131: 89 e5 mov %esp,%ebp 133: 57 push %edi 134: 56 push %esi 135: 53 push %ebx int i, cc; char c; for(i=0; i+1 < max; ){ 136: 31 f6 xor %esi,%esi 138: 89 f3 mov %esi,%ebx { 13a: 83 ec 1c sub $0x1c,%esp 13d: 8b 7d 08 mov 0x8(%ebp),%edi for(i=0; i+1 < max; ){ 140: eb 2f jmp 171 <gets+0x41> 142: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cc = read(0, &c, 1); 148: 8d 45 e7 lea -0x19(%ebp),%eax 14b: 83 ec 04 sub $0x4,%esp 14e: 6a 01 push $0x1 150: 50 push %eax 151: 6a 00 push $0x0 153: e8 32 01 00 00 call 28a <read> if(cc < 1) 158: 83 c4 10 add $0x10,%esp 15b: 85 c0 test %eax,%eax 15d: 7e 1c jle 17b <gets+0x4b> break; buf[i++] = c; 15f: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 163: 83 c7 01 add $0x1,%edi 166: 88 47 ff mov %al,-0x1(%edi) if(c == '\n' || c == '\r') 169: 3c 0a cmp $0xa,%al 16b: 74 23 je 190 <gets+0x60> 16d: 3c 0d cmp $0xd,%al 16f: 74 1f je 190 <gets+0x60> for(i=0; i+1 < max; ){ 171: 83 c3 01 add $0x1,%ebx 174: 3b 5d 0c cmp 0xc(%ebp),%ebx 177: 89 fe mov %edi,%esi 179: 7c cd jl 148 <gets+0x18> 17b: 89 f3 mov %esi,%ebx break; } buf[i] = '\0'; return buf; } 17d: 8b 45 08 mov 0x8(%ebp),%eax buf[i] = '\0'; 180: c6 03 00 movb $0x0,(%ebx) } 183: 8d 65 f4 lea -0xc(%ebp),%esp 186: 5b pop %ebx 187: 5e pop %esi 188: 5f pop %edi 189: 5d pop %ebp 18a: c3 ret 18b: 90 nop 18c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 190: 8b 75 08 mov 0x8(%ebp),%esi 193: 8b 45 08 mov 0x8(%ebp),%eax 196: 01 de add %ebx,%esi 198: 89 f3 mov %esi,%ebx buf[i] = '\0'; 19a: c6 03 00 movb $0x0,(%ebx) } 19d: 8d 65 f4 lea -0xc(%ebp),%esp 1a0: 5b pop %ebx 1a1: 5e pop %esi 1a2: 5f pop %edi 1a3: 5d pop %ebp 1a4: c3 ret 1a5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000001b0 <stat>: int stat(const char *n, struct stat *st) { 1b0: 55 push %ebp 1b1: 89 e5 mov %esp,%ebp 1b3: 56 push %esi 1b4: 53 push %ebx int fd; int r; fd = open(n, O_RDONLY); 1b5: 83 ec 08 sub $0x8,%esp 1b8: 6a 00 push $0x0 1ba: ff 75 08 pushl 0x8(%ebp) 1bd: e8 f0 00 00 00 call 2b2 <open> if(fd < 0) 1c2: 83 c4 10 add $0x10,%esp 1c5: 85 c0 test %eax,%eax 1c7: 78 27 js 1f0 <stat+0x40> return -1; r = fstat(fd, st); 1c9: 83 ec 08 sub $0x8,%esp 1cc: ff 75 0c pushl 0xc(%ebp) 1cf: 89 c3 mov %eax,%ebx 1d1: 50 push %eax 1d2: e8 f3 00 00 00 call 2ca <fstat> close(fd); 1d7: 89 1c 24 mov %ebx,(%esp) r = fstat(fd, st); 1da: 89 c6 mov %eax,%esi close(fd); 1dc: e8 b9 00 00 00 call 29a <close> return r; 1e1: 83 c4 10 add $0x10,%esp } 1e4: 8d 65 f8 lea -0x8(%ebp),%esp 1e7: 89 f0 mov %esi,%eax 1e9: 5b pop %ebx 1ea: 5e pop %esi 1eb: 5d pop %ebp 1ec: c3 ret 1ed: 8d 76 00 lea 0x0(%esi),%esi return -1; 1f0: be ff ff ff ff mov $0xffffffff,%esi 1f5: eb ed jmp 1e4 <stat+0x34> 1f7: 89 f6 mov %esi,%esi 1f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000200 <atoi>: int atoi(const char *s) { 200: 55 push %ebp 201: 89 e5 mov %esp,%ebp 203: 53 push %ebx 204: 8b 4d 08 mov 0x8(%ebp),%ecx int n; n = 0; while('0' <= *s && *s <= '9') 207: 0f be 11 movsbl (%ecx),%edx 20a: 8d 42 d0 lea -0x30(%edx),%eax 20d: 3c 09 cmp $0x9,%al n = 0; 20f: b8 00 00 00 00 mov $0x0,%eax while('0' <= *s && *s <= '9') 214: 77 1f ja 235 <atoi+0x35> 216: 8d 76 00 lea 0x0(%esi),%esi 219: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi n = n*10 + *s++ - '0'; 220: 8d 04 80 lea (%eax,%eax,4),%eax 223: 83 c1 01 add $0x1,%ecx 226: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax while('0' <= *s && *s <= '9') 22a: 0f be 11 movsbl (%ecx),%edx 22d: 8d 5a d0 lea -0x30(%edx),%ebx 230: 80 fb 09 cmp $0x9,%bl 233: 76 eb jbe 220 <atoi+0x20> return n; } 235: 5b pop %ebx 236: 5d pop %ebp 237: c3 ret 238: 90 nop 239: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000240 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { 240: 55 push %ebp 241: 89 e5 mov %esp,%ebp 243: 56 push %esi 244: 53 push %ebx 245: 8b 5d 10 mov 0x10(%ebp),%ebx 248: 8b 45 08 mov 0x8(%ebp),%eax 24b: 8b 75 0c mov 0xc(%ebp),%esi char *dst; const char *src; dst = vdst; src = vsrc; while(n-- > 0) 24e: 85 db test %ebx,%ebx 250: 7e 14 jle 266 <memmove+0x26> 252: 31 d2 xor %edx,%edx 254: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *dst++ = *src++; 258: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 25c: 88 0c 10 mov %cl,(%eax,%edx,1) 25f: 83 c2 01 add $0x1,%edx while(n-- > 0) 262: 39 d3 cmp %edx,%ebx 264: 75 f2 jne 258 <memmove+0x18> return vdst; } 266: 5b pop %ebx 267: 5e pop %esi 268: 5d pop %ebp 269: c3 ret 0000026a <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 26a: b8 01 00 00 00 mov $0x1,%eax 26f: cd 40 int $0x40 271: c3 ret 00000272 <exit>: SYSCALL(exit) 272: b8 02 00 00 00 mov $0x2,%eax 277: cd 40 int $0x40 279: c3 ret 0000027a <wait>: SYSCALL(wait) 27a: b8 03 00 00 00 mov $0x3,%eax 27f: cd 40 int $0x40 281: c3 ret 00000282 <pipe>: SYSCALL(pipe) 282: b8 04 00 00 00 mov $0x4,%eax 287: cd 40 int $0x40 289: c3 ret 0000028a <read>: SYSCALL(read) 28a: b8 05 00 00 00 mov $0x5,%eax 28f: cd 40 int $0x40 291: c3 ret 00000292 <write>: SYSCALL(write) 292: b8 10 00 00 00 mov $0x10,%eax 297: cd 40 int $0x40 299: c3 ret 0000029a <close>: SYSCALL(close) 29a: b8 15 00 00 00 mov $0x15,%eax 29f: cd 40 int $0x40 2a1: c3 ret 000002a2 <kill>: SYSCALL(kill) 2a2: b8 06 00 00 00 mov $0x6,%eax 2a7: cd 40 int $0x40 2a9: c3 ret 000002aa <exec>: SYSCALL(exec) 2aa: b8 07 00 00 00 mov $0x7,%eax 2af: cd 40 int $0x40 2b1: c3 ret 000002b2 <open>: SYSCALL(open) 2b2: b8 0f 00 00 00 mov $0xf,%eax 2b7: cd 40 int $0x40 2b9: c3 ret 000002ba <mknod>: SYSCALL(mknod) 2ba: b8 11 00 00 00 mov $0x11,%eax 2bf: cd 40 int $0x40 2c1: c3 ret 000002c2 <unlink>: SYSCALL(unlink) 2c2: b8 12 00 00 00 mov $0x12,%eax 2c7: cd 40 int $0x40 2c9: c3 ret 000002ca <fstat>: SYSCALL(fstat) 2ca: b8 08 00 00 00 mov $0x8,%eax 2cf: cd 40 int $0x40 2d1: c3 ret 000002d2 <link>: SYSCALL(link) 2d2: b8 13 00 00 00 mov $0x13,%eax 2d7: cd 40 int $0x40 2d9: c3 ret 000002da <mkdir>: SYSCALL(mkdir) 2da: b8 14 00 00 00 mov $0x14,%eax 2df: cd 40 int $0x40 2e1: c3 ret 000002e2 <chdir>: SYSCALL(chdir) 2e2: b8 09 00 00 00 mov $0x9,%eax 2e7: cd 40 int $0x40 2e9: c3 ret 000002ea <dup>: SYSCALL(dup) 2ea: b8 0a 00 00 00 mov $0xa,%eax 2ef: cd 40 int $0x40 2f1: c3 ret 000002f2 <getpid>: SYSCALL(getpid) 2f2: b8 0b 00 00 00 mov $0xb,%eax 2f7: cd 40 int $0x40 2f9: c3 ret 000002fa <sbrk>: SYSCALL(sbrk) 2fa: b8 0c 00 00 00 mov $0xc,%eax 2ff: cd 40 int $0x40 301: c3 ret 00000302 <sleep>: SYSCALL(sleep) 302: b8 0d 00 00 00 mov $0xd,%eax 307: cd 40 int $0x40 309: c3 ret 0000030a <uptime>: SYSCALL(uptime) 30a: b8 0e 00 00 00 mov $0xe,%eax 30f: cd 40 int $0x40 311: c3 ret 00000312 <hello>: SYSCALL(hello) 312: b8 16 00 00 00 mov $0x16,%eax 317: cd 40 int $0x40 319: c3 ret 0000031a <helloname>: SYSCALL(helloname) 31a: b8 17 00 00 00 mov $0x17,%eax 31f: cd 40 int $0x40 321: c3 ret 00000322 <getnumproc>: SYSCALL(getnumproc) 322: b8 18 00 00 00 mov $0x18,%eax 327: cd 40 int $0x40 329: c3 ret 0000032a <getmaxpid>: SYSCALL(getmaxpid) 32a: b8 19 00 00 00 mov $0x19,%eax 32f: cd 40 int $0x40 331: c3 ret 00000332 <getprocinfo>: SYSCALL(getprocinfo) 332: b8 1a 00 00 00 mov $0x1a,%eax 337: cd 40 int $0x40 339: c3 ret 0000033a <setprio>: SYSCALL(setprio) 33a: b8 1b 00 00 00 mov $0x1b,%eax 33f: cd 40 int $0x40 341: c3 ret 00000342 <getprio>: SYSCALL(getprio) 342: b8 1c 00 00 00 mov $0x1c,%eax 347: cd 40 int $0x40 349: c3 ret 34a: 66 90 xchg %ax,%ax 34c: 66 90 xchg %ax,%ax 34e: 66 90 xchg %ax,%ax 00000350 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 350: 55 push %ebp 351: 89 e5 mov %esp,%ebp 353: 57 push %edi 354: 56 push %esi 355: 53 push %ebx 356: 83 ec 3c sub $0x3c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 359: 85 d2 test %edx,%edx { 35b: 89 45 c0 mov %eax,-0x40(%ebp) neg = 1; x = -xx; 35e: 89 d0 mov %edx,%eax if(sgn && xx < 0){ 360: 79 76 jns 3d8 <printint+0x88> 362: f6 45 08 01 testb $0x1,0x8(%ebp) 366: 74 70 je 3d8 <printint+0x88> x = -xx; 368: f7 d8 neg %eax neg = 1; 36a: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) } else { x = xx; } i = 0; 371: 31 f6 xor %esi,%esi 373: 8d 5d d7 lea -0x29(%ebp),%ebx 376: eb 0a jmp 382 <printint+0x32> 378: 90 nop 379: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi do{ buf[i++] = digits[x % base]; 380: 89 fe mov %edi,%esi 382: 31 d2 xor %edx,%edx 384: 8d 7e 01 lea 0x1(%esi),%edi 387: f7 f1 div %ecx 389: 0f b6 92 50 07 00 00 movzbl 0x750(%edx),%edx }while((x /= base) != 0); 390: 85 c0 test %eax,%eax buf[i++] = digits[x % base]; 392: 88 14 3b mov %dl,(%ebx,%edi,1) }while((x /= base) != 0); 395: 75 e9 jne 380 <printint+0x30> if(neg) 397: 8b 45 c4 mov -0x3c(%ebp),%eax 39a: 85 c0 test %eax,%eax 39c: 74 08 je 3a6 <printint+0x56> buf[i++] = '-'; 39e: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1) 3a3: 8d 7e 02 lea 0x2(%esi),%edi 3a6: 8d 74 3d d7 lea -0x29(%ebp,%edi,1),%esi 3aa: 8b 7d c0 mov -0x40(%ebp),%edi 3ad: 8d 76 00 lea 0x0(%esi),%esi 3b0: 0f b6 06 movzbl (%esi),%eax write(fd, &c, 1); 3b3: 83 ec 04 sub $0x4,%esp 3b6: 83 ee 01 sub $0x1,%esi 3b9: 6a 01 push $0x1 3bb: 53 push %ebx 3bc: 57 push %edi 3bd: 88 45 d7 mov %al,-0x29(%ebp) 3c0: e8 cd fe ff ff call 292 <write> while(--i >= 0) 3c5: 83 c4 10 add $0x10,%esp 3c8: 39 de cmp %ebx,%esi 3ca: 75 e4 jne 3b0 <printint+0x60> putc(fd, buf[i]); } 3cc: 8d 65 f4 lea -0xc(%ebp),%esp 3cf: 5b pop %ebx 3d0: 5e pop %esi 3d1: 5f pop %edi 3d2: 5d pop %ebp 3d3: c3 ret 3d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi neg = 0; 3d8: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 3df: eb 90 jmp 371 <printint+0x21> 3e1: eb 0d jmp 3f0 <printf> 3e3: 90 nop 3e4: 90 nop 3e5: 90 nop 3e6: 90 nop 3e7: 90 nop 3e8: 90 nop 3e9: 90 nop 3ea: 90 nop 3eb: 90 nop 3ec: 90 nop 3ed: 90 nop 3ee: 90 nop 3ef: 90 nop 000003f0 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 3f0: 55 push %ebp 3f1: 89 e5 mov %esp,%ebp 3f3: 57 push %edi 3f4: 56 push %esi 3f5: 53 push %ebx 3f6: 83 ec 2c sub $0x2c,%esp int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 3f9: 8b 75 0c mov 0xc(%ebp),%esi 3fc: 0f b6 1e movzbl (%esi),%ebx 3ff: 84 db test %bl,%bl 401: 0f 84 b3 00 00 00 je 4ba <printf+0xca> ap = (uint*)(void*)&fmt + 1; 407: 8d 45 10 lea 0x10(%ebp),%eax 40a: 83 c6 01 add $0x1,%esi state = 0; 40d: 31 ff xor %edi,%edi ap = (uint*)(void*)&fmt + 1; 40f: 89 45 d4 mov %eax,-0x2c(%ebp) 412: eb 2f jmp 443 <printf+0x53> 414: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 418: 83 f8 25 cmp $0x25,%eax 41b: 0f 84 a7 00 00 00 je 4c8 <printf+0xd8> write(fd, &c, 1); 421: 8d 45 e2 lea -0x1e(%ebp),%eax 424: 83 ec 04 sub $0x4,%esp 427: 88 5d e2 mov %bl,-0x1e(%ebp) 42a: 6a 01 push $0x1 42c: 50 push %eax 42d: ff 75 08 pushl 0x8(%ebp) 430: e8 5d fe ff ff call 292 <write> 435: 83 c4 10 add $0x10,%esp 438: 83 c6 01 add $0x1,%esi for(i = 0; fmt[i]; i++){ 43b: 0f b6 5e ff movzbl -0x1(%esi),%ebx 43f: 84 db test %bl,%bl 441: 74 77 je 4ba <printf+0xca> if(state == 0){ 443: 85 ff test %edi,%edi c = fmt[i] & 0xff; 445: 0f be cb movsbl %bl,%ecx 448: 0f b6 c3 movzbl %bl,%eax if(state == 0){ 44b: 74 cb je 418 <printf+0x28> state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 44d: 83 ff 25 cmp $0x25,%edi 450: 75 e6 jne 438 <printf+0x48> if(c == 'd'){ 452: 83 f8 64 cmp $0x64,%eax 455: 0f 84 05 01 00 00 je 560 <printf+0x170> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 45b: 81 e1 f7 00 00 00 and $0xf7,%ecx 461: 83 f9 70 cmp $0x70,%ecx 464: 74 72 je 4d8 <printf+0xe8> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 466: 83 f8 73 cmp $0x73,%eax 469: 0f 84 99 00 00 00 je 508 <printf+0x118> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 46f: 83 f8 63 cmp $0x63,%eax 472: 0f 84 08 01 00 00 je 580 <printf+0x190> putc(fd, *ap); ap++; } else if(c == '%'){ 478: 83 f8 25 cmp $0x25,%eax 47b: 0f 84 ef 00 00 00 je 570 <printf+0x180> write(fd, &c, 1); 481: 8d 45 e7 lea -0x19(%ebp),%eax 484: 83 ec 04 sub $0x4,%esp 487: c6 45 e7 25 movb $0x25,-0x19(%ebp) 48b: 6a 01 push $0x1 48d: 50 push %eax 48e: ff 75 08 pushl 0x8(%ebp) 491: e8 fc fd ff ff call 292 <write> 496: 83 c4 0c add $0xc,%esp 499: 8d 45 e6 lea -0x1a(%ebp),%eax 49c: 88 5d e6 mov %bl,-0x1a(%ebp) 49f: 6a 01 push $0x1 4a1: 50 push %eax 4a2: ff 75 08 pushl 0x8(%ebp) 4a5: 83 c6 01 add $0x1,%esi } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 4a8: 31 ff xor %edi,%edi write(fd, &c, 1); 4aa: e8 e3 fd ff ff call 292 <write> for(i = 0; fmt[i]; i++){ 4af: 0f b6 5e ff movzbl -0x1(%esi),%ebx write(fd, &c, 1); 4b3: 83 c4 10 add $0x10,%esp for(i = 0; fmt[i]; i++){ 4b6: 84 db test %bl,%bl 4b8: 75 89 jne 443 <printf+0x53> } } } 4ba: 8d 65 f4 lea -0xc(%ebp),%esp 4bd: 5b pop %ebx 4be: 5e pop %esi 4bf: 5f pop %edi 4c0: 5d pop %ebp 4c1: c3 ret 4c2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi state = '%'; 4c8: bf 25 00 00 00 mov $0x25,%edi 4cd: e9 66 ff ff ff jmp 438 <printf+0x48> 4d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi printint(fd, *ap, 16, 0); 4d8: 83 ec 0c sub $0xc,%esp 4db: b9 10 00 00 00 mov $0x10,%ecx 4e0: 6a 00 push $0x0 4e2: 8b 7d d4 mov -0x2c(%ebp),%edi 4e5: 8b 45 08 mov 0x8(%ebp),%eax 4e8: 8b 17 mov (%edi),%edx 4ea: e8 61 fe ff ff call 350 <printint> ap++; 4ef: 89 f8 mov %edi,%eax 4f1: 83 c4 10 add $0x10,%esp state = 0; 4f4: 31 ff xor %edi,%edi ap++; 4f6: 83 c0 04 add $0x4,%eax 4f9: 89 45 d4 mov %eax,-0x2c(%ebp) 4fc: e9 37 ff ff ff jmp 438 <printf+0x48> 501: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi s = (char*)*ap; 508: 8b 45 d4 mov -0x2c(%ebp),%eax 50b: 8b 08 mov (%eax),%ecx ap++; 50d: 83 c0 04 add $0x4,%eax 510: 89 45 d4 mov %eax,-0x2c(%ebp) if(s == 0) 513: 85 c9 test %ecx,%ecx 515: 0f 84 8e 00 00 00 je 5a9 <printf+0x1b9> while(*s != 0){ 51b: 0f b6 01 movzbl (%ecx),%eax state = 0; 51e: 31 ff xor %edi,%edi s = (char*)*ap; 520: 89 cb mov %ecx,%ebx while(*s != 0){ 522: 84 c0 test %al,%al 524: 0f 84 0e ff ff ff je 438 <printf+0x48> 52a: 89 75 d0 mov %esi,-0x30(%ebp) 52d: 89 de mov %ebx,%esi 52f: 8b 5d 08 mov 0x8(%ebp),%ebx 532: 8d 7d e3 lea -0x1d(%ebp),%edi 535: 8d 76 00 lea 0x0(%esi),%esi write(fd, &c, 1); 538: 83 ec 04 sub $0x4,%esp s++; 53b: 83 c6 01 add $0x1,%esi 53e: 88 45 e3 mov %al,-0x1d(%ebp) write(fd, &c, 1); 541: 6a 01 push $0x1 543: 57 push %edi 544: 53 push %ebx 545: e8 48 fd ff ff call 292 <write> while(*s != 0){ 54a: 0f b6 06 movzbl (%esi),%eax 54d: 83 c4 10 add $0x10,%esp 550: 84 c0 test %al,%al 552: 75 e4 jne 538 <printf+0x148> 554: 8b 75 d0 mov -0x30(%ebp),%esi state = 0; 557: 31 ff xor %edi,%edi 559: e9 da fe ff ff jmp 438 <printf+0x48> 55e: 66 90 xchg %ax,%ax printint(fd, *ap, 10, 1); 560: 83 ec 0c sub $0xc,%esp 563: b9 0a 00 00 00 mov $0xa,%ecx 568: 6a 01 push $0x1 56a: e9 73 ff ff ff jmp 4e2 <printf+0xf2> 56f: 90 nop write(fd, &c, 1); 570: 83 ec 04 sub $0x4,%esp 573: 88 5d e5 mov %bl,-0x1b(%ebp) 576: 8d 45 e5 lea -0x1b(%ebp),%eax 579: 6a 01 push $0x1 57b: e9 21 ff ff ff jmp 4a1 <printf+0xb1> putc(fd, *ap); 580: 8b 7d d4 mov -0x2c(%ebp),%edi write(fd, &c, 1); 583: 83 ec 04 sub $0x4,%esp putc(fd, *ap); 586: 8b 07 mov (%edi),%eax write(fd, &c, 1); 588: 6a 01 push $0x1 ap++; 58a: 83 c7 04 add $0x4,%edi putc(fd, *ap); 58d: 88 45 e4 mov %al,-0x1c(%ebp) write(fd, &c, 1); 590: 8d 45 e4 lea -0x1c(%ebp),%eax 593: 50 push %eax 594: ff 75 08 pushl 0x8(%ebp) 597: e8 f6 fc ff ff call 292 <write> ap++; 59c: 89 7d d4 mov %edi,-0x2c(%ebp) 59f: 83 c4 10 add $0x10,%esp state = 0; 5a2: 31 ff xor %edi,%edi 5a4: e9 8f fe ff ff jmp 438 <printf+0x48> s = "(null)"; 5a9: bb 48 07 00 00 mov $0x748,%ebx while(*s != 0){ 5ae: b8 28 00 00 00 mov $0x28,%eax 5b3: e9 72 ff ff ff jmp 52a <printf+0x13a> 5b8: 66 90 xchg %ax,%ax 5ba: 66 90 xchg %ax,%ax 5bc: 66 90 xchg %ax,%ax 5be: 66 90 xchg %ax,%ax 000005c0 <free>: static Header base; static Header *freep; void free(void *ap) { 5c0: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 5c1: a1 f4 09 00 00 mov 0x9f4,%eax { 5c6: 89 e5 mov %esp,%ebp 5c8: 57 push %edi 5c9: 56 push %esi 5ca: 53 push %ebx 5cb: 8b 5d 08 mov 0x8(%ebp),%ebx bp = (Header*)ap - 1; 5ce: 8d 4b f8 lea -0x8(%ebx),%ecx 5d1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 5d8: 39 c8 cmp %ecx,%eax 5da: 8b 10 mov (%eax),%edx 5dc: 73 32 jae 610 <free+0x50> 5de: 39 d1 cmp %edx,%ecx 5e0: 72 04 jb 5e6 <free+0x26> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 5e2: 39 d0 cmp %edx,%eax 5e4: 72 32 jb 618 <free+0x58> break; if(bp + bp->s.size == p->s.ptr){ 5e6: 8b 73 fc mov -0x4(%ebx),%esi 5e9: 8d 3c f1 lea (%ecx,%esi,8),%edi 5ec: 39 fa cmp %edi,%edx 5ee: 74 30 je 620 <free+0x60> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 5f0: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 5f3: 8b 50 04 mov 0x4(%eax),%edx 5f6: 8d 34 d0 lea (%eax,%edx,8),%esi 5f9: 39 f1 cmp %esi,%ecx 5fb: 74 3a je 637 <free+0x77> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 5fd: 89 08 mov %ecx,(%eax) freep = p; 5ff: a3 f4 09 00 00 mov %eax,0x9f4 } 604: 5b pop %ebx 605: 5e pop %esi 606: 5f pop %edi 607: 5d pop %ebp 608: c3 ret 609: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 610: 39 d0 cmp %edx,%eax 612: 72 04 jb 618 <free+0x58> 614: 39 d1 cmp %edx,%ecx 616: 72 ce jb 5e6 <free+0x26> { 618: 89 d0 mov %edx,%eax 61a: eb bc jmp 5d8 <free+0x18> 61c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi bp->s.size += p->s.ptr->s.size; 620: 03 72 04 add 0x4(%edx),%esi 623: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 626: 8b 10 mov (%eax),%edx 628: 8b 12 mov (%edx),%edx 62a: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 62d: 8b 50 04 mov 0x4(%eax),%edx 630: 8d 34 d0 lea (%eax,%edx,8),%esi 633: 39 f1 cmp %esi,%ecx 635: 75 c6 jne 5fd <free+0x3d> p->s.size += bp->s.size; 637: 03 53 fc add -0x4(%ebx),%edx freep = p; 63a: a3 f4 09 00 00 mov %eax,0x9f4 p->s.size += bp->s.size; 63f: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 642: 8b 53 f8 mov -0x8(%ebx),%edx 645: 89 10 mov %edx,(%eax) } 647: 5b pop %ebx 648: 5e pop %esi 649: 5f pop %edi 64a: 5d pop %ebp 64b: c3 ret 64c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00000650 <malloc>: return freep; } void* malloc(uint nbytes) { 650: 55 push %ebp 651: 89 e5 mov %esp,%ebp 653: 57 push %edi 654: 56 push %esi 655: 53 push %ebx 656: 83 ec 0c sub $0xc,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 659: 8b 45 08 mov 0x8(%ebp),%eax if((prevp = freep) == 0){ 65c: 8b 15 f4 09 00 00 mov 0x9f4,%edx nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 662: 8d 78 07 lea 0x7(%eax),%edi 665: c1 ef 03 shr $0x3,%edi 668: 83 c7 01 add $0x1,%edi if((prevp = freep) == 0){ 66b: 85 d2 test %edx,%edx 66d: 0f 84 9d 00 00 00 je 710 <malloc+0xc0> 673: 8b 02 mov (%edx),%eax 675: 8b 48 04 mov 0x4(%eax),%ecx base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ 678: 39 cf cmp %ecx,%edi 67a: 76 6c jbe 6e8 <malloc+0x98> 67c: 81 ff 00 10 00 00 cmp $0x1000,%edi 682: bb 00 10 00 00 mov $0x1000,%ebx 687: 0f 43 df cmovae %edi,%ebx p = sbrk(nu * sizeof(Header)); 68a: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 691: eb 0e jmp 6a1 <malloc+0x51> 693: 90 nop 694: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 698: 8b 02 mov (%edx),%eax if(p->s.size >= nunits){ 69a: 8b 48 04 mov 0x4(%eax),%ecx 69d: 39 f9 cmp %edi,%ecx 69f: 73 47 jae 6e8 <malloc+0x98> p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 6a1: 39 05 f4 09 00 00 cmp %eax,0x9f4 6a7: 89 c2 mov %eax,%edx 6a9: 75 ed jne 698 <malloc+0x48> p = sbrk(nu * sizeof(Header)); 6ab: 83 ec 0c sub $0xc,%esp 6ae: 56 push %esi 6af: e8 46 fc ff ff call 2fa <sbrk> if(p == (char*)-1) 6b4: 83 c4 10 add $0x10,%esp 6b7: 83 f8 ff cmp $0xffffffff,%eax 6ba: 74 1c je 6d8 <malloc+0x88> hp->s.size = nu; 6bc: 89 58 04 mov %ebx,0x4(%eax) free((void*)(hp + 1)); 6bf: 83 ec 0c sub $0xc,%esp 6c2: 83 c0 08 add $0x8,%eax 6c5: 50 push %eax 6c6: e8 f5 fe ff ff call 5c0 <free> return freep; 6cb: 8b 15 f4 09 00 00 mov 0x9f4,%edx if((p = morecore(nunits)) == 0) 6d1: 83 c4 10 add $0x10,%esp 6d4: 85 d2 test %edx,%edx 6d6: 75 c0 jne 698 <malloc+0x48> return 0; } } 6d8: 8d 65 f4 lea -0xc(%ebp),%esp return 0; 6db: 31 c0 xor %eax,%eax } 6dd: 5b pop %ebx 6de: 5e pop %esi 6df: 5f pop %edi 6e0: 5d pop %ebp 6e1: c3 ret 6e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(p->s.size == nunits) 6e8: 39 cf cmp %ecx,%edi 6ea: 74 54 je 740 <malloc+0xf0> p->s.size -= nunits; 6ec: 29 f9 sub %edi,%ecx 6ee: 89 48 04 mov %ecx,0x4(%eax) p += p->s.size; 6f1: 8d 04 c8 lea (%eax,%ecx,8),%eax p->s.size = nunits; 6f4: 89 78 04 mov %edi,0x4(%eax) freep = prevp; 6f7: 89 15 f4 09 00 00 mov %edx,0x9f4 } 6fd: 8d 65 f4 lea -0xc(%ebp),%esp return (void*)(p + 1); 700: 83 c0 08 add $0x8,%eax } 703: 5b pop %ebx 704: 5e pop %esi 705: 5f pop %edi 706: 5d pop %ebp 707: c3 ret 708: 90 nop 709: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi base.s.ptr = freep = prevp = &base; 710: c7 05 f4 09 00 00 f8 movl $0x9f8,0x9f4 717: 09 00 00 71a: c7 05 f8 09 00 00 f8 movl $0x9f8,0x9f8 721: 09 00 00 base.s.size = 0; 724: b8 f8 09 00 00 mov $0x9f8,%eax 729: c7 05 fc 09 00 00 00 movl $0x0,0x9fc 730: 00 00 00 733: e9 44 ff ff ff jmp 67c <malloc+0x2c> 738: 90 nop 739: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi prevp->s.ptr = p->s.ptr; 740: 8b 08 mov (%eax),%ecx 742: 89 0a mov %ecx,(%edx) 744: eb b1 jmp 6f7 <malloc+0xa7>
33.468883
60
0.410479
0f89b6830e2e88be6a30e1317ae60e2813b764b7
7,197
asm
Assembly
Driver/Sound/BSD16/bsnwav.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Driver/Sound/BSD16/bsnwav.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Driver/Sound/BSD16/bsnwav.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @******************************************************** Copyright (C) Dirk Lausecker -- All Rights Reserved PROJECT: BestSound Treiber DATEI: bsnwav.asm AUTOR: Dirk Lausecker REVISION HISTORY: Name Datum Beschreibung ---- ----- ------------ DL 06.10.98 Init DL 20.02.2000 Ableitung BSNWAV.ASM DL 02.03.2000 bsOptions Bit 0 definiert DL 25.10.2000 Translations for NewDeal ROUTINEN: Name Description ---- ----------- BSDNWGetStatus returns bsStatus and dacStatus BSDNWGetAIState returns aiStatus BSDNWStartPlay Starting Play *****************************************************************@ BSNW_STATE_IDLE equ 0 ; Soundcard idle ; The states 1 and 2 are reserved for recording BSNW_PLAY_PREPARE equ 3 ; NewWave-Play Prepare state BSNW_PLAY_RUN equ 4 ; NewWave-Play Run State ;///////////////////////////////// ; Globals ;///////////////////////////////// idata segment bsOptions byte 1 ; Bit 0 -> ISR must clear old ; DMA bufferhalf bsPause byte 0 ; 1 = Pause 2 = Restart idata ends ;=========================================================== LoadableCode segment resource ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ; ; BSDNWSetPause ; ; Pause Mode ; ; IN: cl Mode 0 = request mode ; 1 = PAUSE ; 2 = RESTART ; ; OUT: ch current mode ; ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BSDNWSetPause proc far uses ax,bx,dx,ds .enter mov ax,segment dgroup mov ds,ax mov ch,0 ; default value tst ds:[dacStatus] ; old WAV-Output ? jnz done mov al,ds:[bsStatus] ; NewWave Play cmp al,BSNW_PLAY_RUN ; running ? jnz done ;---------------------------- ; PAUSE / RESTART ;---------------------------- mov ch,ds:[bsPause] ; current mode cmp cl,ch ; new mode equal old mode ? jz done ; yes cmp ch,1 ; current mode = PAUSE ? jz nopause ; yes cmp cl,1 ; new mode = PAUSE ? jnz nopause ; nein ; ; PAUSE ; SBDDACWriteDSP DSP_DMA_HALT,0 mov ch,1 mov ds:[bsPause],ch jmp done ; ; PAUSE already active ; nopause: cmp cl,2 ; new mode = RESTART ? jnz done ; no ; ; RESTART ; SBDDACWriteDSP DSP_DMA_CONTINUE,0 mov ch,2 mov ds:[bsPause],ch done: .leave ret BSDNWSetPause endp ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ; ; BSDNWGetStatus ; ; will return dacStatus/bsStatus ; ; IN: - ; ; OUT: cl bsStatus ; ch dacStatus ; ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BSDNWGetStatus proc far uses ax,bx,dx,ds .enter mov ax,segment dgroup mov ds,ax mov ch,ds:[dacStatus] mov cl,ds:[bsStatus] .leave ret BSDNWGetStatus endp ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ; ; BSDNWStartPlay ; ; Start WAV-output ; Top-Level UP will call other subroutines ; ; OUT: cx 0 = OK ; 1 = error ; ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BSDNWStartPlay proc far uses ax,bx,dx,di,ds .enter mov ax,segment dgroup ; dgroup setzen mov ds,ax ;------------------- ; dacStatus = idle ? ;------------------- tst ds:[dacStatus] ; active ? jnz error ; yes mov ds:[bsStatus],BSNW_PLAY_PREPARE clr ds:[bsRecDataFlag] ; clear DataFlag ;------------------- ; DSP Samplerate ;------------------- SBDDACWriteDSP DSP_SET_SAMPLE_RATE, 0 ; DSP-Command mov cx,ds:[bsRecSamplerate] SBDDACWriteDSP ch, 0 ; Samplerate SBDDACWriteDSP cl, 0 ;------------------------ ; Flags initialisieren ;------------------------ mov ds:[bsStatus],BSNW_PLAY_RUN clr ds:[bsRecDataHalf] clr ds:[bsRecDataFlag] ;------------------------ ; DSP Transfercommand ;------------------------ mov al,ds:[bsRecBits] cmp al,16 ; 16 Bit jnz bit8 SBDDACWriteDSP DSP_16BIT_OUTPUT, 0 ; Command mov bh,DSP_MODE_16BIT_MONO mov al,ds:[bsRecChannels] cmp al,1 ; Mono ? jz mono mov bh,DSP_MODE_16BIT_STEREO jmp mono bit8: SBDDACWriteDSP DSP_8BIT_OUTPUT, 0 ; Command mov bh,DSP_MODE_8BIT_MONO mov al,ds:[bsRecChannels] cmp al,1 ; Mono ? jz mono mov bh,DSP_MODE_8BIT_STEREO mono: SBDDACWriteDSP bh, 0 ; Mode (Mono/Stereo) mov cx,ds:[bufferO2] mov al,ds:[bsRecBits] cmp al,16 ; 16 Bit jnz blocksize shr cx,1 blocksize: dec cx ; Blocksize - 1 SBDDACWriteDSP cl, 0 SBDDACWriteDSP ch, 0 ;------------------------ ; Start AutoInit Transfer ;------------------------ mov cx,0 ; no error jmp done ; --> End ;------------------------ ; Error ;------------------------ error: mov ds:[bsStatus],BS_STATE_IDLE mov cx,1 clc ; CY = 1 done: .leave ret BSDNWStartPlay endp ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ; ; BSDNWGetAIState ; ; Will return state of Autoinittransfer ; ; ; IN: ch >0 -> set bsOptions (cl) ; cl bsOptions ; ; OUT: cl bsRecDataFlag ; ch bsRecDataHalf ; ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BSDNWGetAIState proc far uses ax,bx,dx,ds .enter mov ax,segment dgroup mov ds,ax ;------------------- ; set bsOptions ;------------------- tst ch ; setting bsOptions ? jz noset ; no mov ds:[bsOptions],cl ; yes noset: mov ch,ds:[bsRecDataHalf] mov cl,ds:[bsRecDataFlag] .leave ret BSDNWGetAIState endp LoadableCode ends ResidentCode segment resource ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ; ; BSNWISR ; ; ISR for NewWavePlay ; Will be called if half of the buffer ; was played ; ; IN: - ; ; OUT: - ; ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BSNWISR proc far uses ax,cx,ds,di,es .enter tst ds:[bufferO2] ; Buffer existent ? jz done ; no (zerosize) mov di,0 ; Offsetpointer mov cx,ds:[bufferO2] ;----------------------------- ; clear old halfbuffer ;----------------------------- mov ah,ds:[bsOptions] or ah,1 ; Bit 1 ? jz done ; no, not delete mov al,ds:[bsRecDataHalf] tst al ; lower half jz firstbuf mov di,cx ; upper half firstbuf: mov ax,ds:[bufferSegment] mov es,ax ; Segmentaddress mov ah,080h mov al,ds:[bsRecBits] cmp al,16 ; 16 Bit ? jnz next ; no mov ah,0 ; yes, clear with 0 next: mov es:[di],ah ; clear Buffer inc di dec cx jnz next ;------------------------ ; Set Flags ;------------------------ ; bsRecDataFlag will be incremented by every INT. ; The Data-Writer must decrement this flag ; Values above 2 will indicate problems with the transfer speed ; done: inc ds:[bsRecDataFlag] mov al,ds:[bsRecDataHalf] xor al,01h ; swap mov ds:[bsRecDataHalf],al .leave ret BSNWISR endp if 0 ; /* ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ; ; BSDNWStartAI ; ; Start AutoInit Transfer ; for Playing ; ; ; IN: - ; ; OUT: CY TRUE = Fehler ; ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BSDNWStartAI proc near uses ax,bx,dx,di,ds .enter mov ax,segment dgroup ; dgroup setzen mov ds,ax clr ds:[bsRecDataHalf] clr ds:[bsRecDataFlag] ; SBDDACWriteDSP DSP_DMA_PCM_AI_MONO_LOW, 0 ; AutoInit Output ; 8 Bit Mono AI-Transfer clc .leave ret BSDNWStartAI endp ;*/ endif ResidentCode ends
17.9925
67
0.524663
8274c42de10f6063623d92b1fd750f865503132f
17,893
asm
Assembly
main.asm
Ajordat/Walkie-asm
e013e038ccee24b99e63aaa341f359ee4296b79a
[ "MIT" ]
null
null
null
main.asm
Ajordat/Walkie-asm
e013e038ccee24b99e63aaa341f359ee4296b79a
[ "MIT" ]
null
null
null
main.asm
Ajordat/Walkie-asm
e013e038ccee24b99e63aaa341f359ee4296b79a
[ "MIT" ]
null
null
null
LIST P=18F4321, F=INHX32 #include <P18F4321.INC> ;****************** ;* CONFIGURACIONS * ;****************** CONFIG OSC = HSPLL CONFIG PBADEN = DIG CONFIG WDT = OFF ;************* ;* VARIABLES * ;************* SIZEH EQU 0x00 ;DUES VARIABLES PER SABER QUANTES LLETRES TENIM SIZEL EQU 0x01 WORD EQU 0x02 ;VARIABLE PER A LLEGIR LA TRANSMISSIÓ REBUDA TIMES EQU 0x03 ;VARIABLE PER A CONTROLAR EL REBOT DELS POLSADORS ;VARIABLES LEDS HORIZ EQU 0x04 ;QUAN ESTÀ ACTIVA REALITZA LA RUTINA DE "ROTACIÓ" DELS LEDS LEDS_HZ EQU 0x05 ;VARIABLE PER A CONTROLAR LA FREQÜÈNCIA DELS LEDS RIGHT_NOTLEFT EQU 0x06 ;INDICA EL SENTIT DE LA ROTACIÓ DELS LEDS BLINK EQU 0x07 ;VARIABLE PER A CONTROLAR LA FREQÜÈNCIA DELS LEDS RES_DIV EQU 0x08 ;EMMAGATZEMEM EL RESULTAT DE LA DIVISIÓ PER 10 SEG_L EQU 0x12 ;DUES VARIABLES PER A SABER EL TEMPS DELS 10 SEGONS SEG_H EQU 0x13 LEDS_10S EQU 0x14 ;FLAG PER A SABER SI HEM D'ESTAR PENDENTS DELS 10 SEGONS WAIT EQU 0x09 ;FLAG PER A ESPERAR A LA INTERRUPCIÓ PER LA TRANSMISSIÓ RF ;VARIABLES BOTONS F_REBOTS_LOAD EQU 0x0A ;FLAG PELS REBOTS DEL BOTÓ DE LOAD F_REBOTS_SEND EQU 0x0B ;FLAG PELS REBOTS DEL BOTÓ DE SEND LOADED EQU 0x0C ;FLAG PER SABER SI S'HA FET L'ACCIÓ DE CARREGAR SENT EQU 0x0D ;FLAG PER SABER SI S'HA FET L'ACCIÓ D'ENVIAR N_SIZEL EQU 0x0E ;DUES VARIABLES PER A SABER QUANTES LLETRES PORTEM ENVIADES N_SIZEH EQU 0x0F INDEX EQU 0x10 ;VARIABLE PER SABER QUANTS BITS D'UNA PARAULA HEM ENVIAT N_LEDS EQU 0x11 ;VARIABLE PER SABER QUAN HEM D'ACTIVAR UN NOU LED DURANT LA TX DE RF ;************* ;* CONSTANTS * ;************* INIT_FSR0H EQU 0x00 ;VALOR DE FSR0H A L'INICI DE L'ARRAY INIT_FSR0L EQU 0x80 ;VALOR DE FSR0L A L'INICI DE L'ARRAY INIT_MSGH EQU 0x00 INIT_MSGL EQU 0x7E CAP_MSGH EQU 0x04 CAP_MSGL EQU 0x48 F_5HZ EQU 0x13 ;NOMBRE DE COPS QUE HA DE SALTAR LA INTERRUPCIÓ PER A QUE HAGI PASSAT UN PERÍODE DE 5HZ F_10HZ EQU 0x09 ;NOMBRE DE COPS QUE HA DE SALTAR LA INTERRUPCIÓ PER A QUE HAGI PASSAT UN PERÍODE DE 10HZ F_20HZ EQU 0x06 ;NOMBRE DE COPS QUE HA DE SALTAR LA INTERRUPCIÓ PER A QUE HAGI PASSAT UN PERÍODE DE 20HZ LOAD_BYTE EQU 0xAA ;BYTE QUE S'ENVIA DEL PC A LA PIC PER A INDICAR QUE S'HA DE CARREGAR A LA RAM. EQUIVALENT A UN SYN. SEND_BYTE EQU 0xEE ;BYTE QUE S'ENVIA DE LA PIC AL PC PER A DEMANAR UN BYTE MÉS DE LA CADENA. EQUIVALENT A UN ACK. END_BYTE EQU 0xFF ;BYTE QUE S'ENVIA DEL PC A LA PIC PER A INDICAR QUE JA S'HA ENVIAT TOTA LA CADENA. EQUIVALENT A UN FIN. SEG_10_H EQU 0x07 ;NOMBRE DE COPS QUE HA DE SALTAR LA INTERRUPCIÓ PER A QUE PASSIN 10 SEGONS (PART ALTA) SEG_10_L EQU 0xD0 ;NOMBRE DE COPS QUE HA DE SALTAR LA INTERRUPCIÓ PER A QUE PASSIN 10 SEGONS (PART BAIXA) ;********************************* ; VECTORS DE RESET I INTERRUPCIÓ * ;********************************* ORG 0x000000 RESET_VECTOR goto MAIN ORG 0x000008 HI_INT_VECTOR goto HIGH_INT ORG 0x000018 LOW_INT_VECTOR retfie FAST ;*********************************** ;* RUTINES DE SERVEI D'INTERRUPCIÓ * ;*********************************** ;* ; * A LA INTERRUPCIÓ TORNEM A INICIAR EL TIMER PER A QUE TORNI A SALTAR AQUESTA, FIQUEM A 0 EL FLAG WAIT I ; * INCREMENTEM ELS COMPTADORS QUE S'UTILITZEN A LES SEGÜENTS FUNCIONALITATS: CONTROLAR ELS REBOTS, CONTROLAR LA ; * FREQÜÈNCIA DELS LEDS I ESPERAR 10 SEGONS ; */ HIGH_INT call INIT_TMR incf TIMES, 1, 0 incf LEDS_HZ, 1, 0 clrf WAIT, 0 incf SEG_L, 1, 0 btfsc STATUS, C, 0 incf SEG_H, 1, 0 retfie FAST ;********* ;* INITS * ;********* INIT_VARS clrf SIZEH, 0 clrf SIZEL, 0 clrf HORIZ, 0 clrf BLINK, 0 clrf RIGHT_NOTLEFT, 0 clrf LEDS_HZ, 0 movlw INIT_MSGL movwf FSR0L, 0 movlw INIT_MSGH movwf FSR0H, 0 movlw CAP_MSGH movwf POSTINC0, 0 movlw CAP_MSGL movwf POSTINC0, 0 return INIT_PORTS bsf TRISC, 7, 0 ;SIO_RX INPUT bsf TRISC, 6, 0 ;SIO_TX INPUT bcf TRISC, 2, 0 ;RF OUTPUT bsf TRISC, 1, 0 ;LOAD_BTN INPUT bsf TRISC, 0, 0 ;SEND_BTN INPUT bcf TRISB, 1, 0 ;LEDS[9] OUTPUT bcf TRISB, 0, 0 ;LEDS[8] OUTPUT clrf TRISD, 0 ;LEDS[7..0] OUTPUT clrf LATD, 0 ;APAGUEM ELS LEDS clrf LATB, 0 return INIT_INTS bcf RCON, IPEN, 0 ;ACTIVEM NOMÉS LA INTERRUPCIÓ DEL TIMER0 movlw 0xA0 movwf INTCON, 0 movlw 0x88 movwf T0CON, 0 return INIT_EUSART ;INICIALITZEM L'EUSART movlw 0x26 movwf TXSTA, 0 movlw 0x90 movwf RCSTA, 0 movlw 0x81 movwf SPBRG, 0 clrf BAUDCON, 0 return ;INTERRUPCIÓ CADA 5ms INIT_TMR movlw 0x3C movwf TMR0H, 0 movlw 0xB0 movwf TMR0L, 0 bcf INTCON, TMR0IF return ;******** ;* MAIN * ;******** MAIN call INIT_VARS call INIT_PORTS call INIT_INTS call INIT_EUSART call INIT_TMR BUCLE ;COMPROVEM SI HEM REBUT UN BYTE DES DE L'ORDINADOR btfsc PIR1, RCIF, 0 goto RX_PC ;COMPROVEM SI HEM DE MOURE ELS LEDS EN HORITZONTAL (COCHE FANTASTICO) tstfsz HORIZ goto LEDS_HORIZ ;COMPROVEM SI HEM DE PARPALLEJAR ELS LEDS tstfsz BLINK goto LEDS_BLINK ;COMPROVEM SI HEM DE COMPROVAR ELS 10 SEGONS tstfsz LEDS_10S goto LEDS_SEG CHECK_LOAD_BTN ;COMPROVEM SI EL POLSADOR DE LOAD ESTÀ ACTIU btfsc PORTC, 1, 0 goto LOAD_BTN ;SI NO ESTÀ ACTIU, BAIXEM EL FLAG QUE INDICA QUE JA HEM FET LA TASCA DE CARREGAR clrf LOADED, 0 ;goto CHECK_SEND_BTN ? CHECK_LOAD_FLAG ;COMPROVEM SI JA HEM FET LA TASCA DE CARREGAR tstfsz LOADED, 0 goto CHECK_SEND_BTN ;EN CAS QUE NO HO HAGUEM FET, MIREM SI ESTEM EN "ZONA" DE REBOTS tstfsz F_REBOTS_LOAD goto CHECK_LOAD_15MS ;SI HO ESTEM, MIREM SI JA HA PASSAT goto CHECK_SEND_BTN ;SI NO HO ESTEM, COMPROVEM EL POLSADOR DE SEND CHECK_LOAD_15MS ;MIREM SI JA HA PASSAT PROU TEMPS PER SALTAR ELS REBOTS movlw 0x02 cpfsgt TIMES, 0 goto CHECK_SEND_BTN ;SI JA HA PASSAT EL TEMPS TORNEM A MIRAR SI DESPRÉS DELS REBOTS EL POLSADOR SEGUEIX ACTIU O NO ;SI NO HO ESTÀ, ES TRACTAVA D'UN REBOT, ALTRAMENT ENS HAVIEN PITJAT clrf F_REBOTS_LOAD, 0 btfss PORTC, 1, 0 goto CHECK_SEND_BTN ;COM QUE ES TRACTA D'UNA INSTRUCCIÓ DE CARREGAR: ;ENVIEM UNA PETICIÓ DE CADENA A L'ORDINADOR movlw SEND_BYTE movwf TXREG, 0 ;ACTIVEM EL FLAG QUE INDICA QUE HEM D'ESPERAR 10 SEGONS setf LEDS_10S, 0 ;RESETEJEM EL COMPTADOR DELS 10 SEGONS clrf SEG_L, 0 clrf SEG_H, 0 ;DESACTIVEM QUALSEVOL ACTIVITAT DELS LEDS clrf BLINK, 0 clrf HORIZ, 0 ;ACTIVEM EL FLAG QUE INDICA QUE JA HEM FET LA FUNCIONALITAT DE CARREGAR setf LOADED, 0 goto CHECK_SEND_BTN LOAD_BTN ;COMPROVEM SI JA HEM FET LA CARREGA DE CADENA tstfsz LOADED, 0 goto CHECK_SEND_BTN ;SI NO L'HEM FET MIREM SI ESTEM EN ESPAI DE REBOTS tstfsz F_REBOTS_LOAD ;SI HI ESTEM, COMPROVEM SI JA HI HAURIEM DE SORTIR goto CHECK_LOAD_15MS ;SI NO HO ESTEM, HI ENTREM clrf TIMES, 0 setf F_REBOTS_LOAD, 0 goto CHECK_SEND_BTN CHECK_SEND_BTN ;COMPROVEM SI EL POLSADOR DE SEND ESTÀ ACTIU btfsc PORTC, 0, 0 goto SEND_BTN ;SI NO ESTÀ ACTIU, BAIXEM EL FLAG QUE INDICA QUE JA HEM FET LA TASCA D'ENVIAR clrf SENT, 0 ;goto BUCLE ? CHECK_SEND_FLAG ;COMPROVEM SI JA HEM FET LA TASCA D'ENVIAR tstfsz SENT, 0 goto BUCLE ;EN CAS QUE NO HO HAGUEM FET, MIREM SI ESTEM EN "ZONA" DE REBOTS tstfsz F_REBOTS_SEND goto CHECK_SEND_15MS ;SI HO ESTEM, MIREM SI JA HA PASSAT goto BUCLE ;SI NO HO ESTEM, TORNEM A L'INICI DEL BUCLE CHECK_SEND_15MS ;MIREM SI JA HA PASSAT PROU TEMPS PER SALTAR ELS REBOTS movlw 0x02 cpfsgt TIMES, 0 goto BUCLE ;SI JA HA PASSAT EL TEMPS TORNEM A MIRAR SI DESPRÉS DELS REBOTS EL POLSADOR SEGUEIX ACTIU O NO ;SI NO HO ESTÀ, ES TRACTAVA D'UN REBOT, ALTRAMENT ENS HAVIEN PITJAT clrf F_REBOTS_SEND, 0 btfss PORTC, 0, 0 goto BUCLE ;EN CAS QUE HAGUEM D'ENVIAR, ACTIVEM EL FLAG DE QUE JA HO HEM FET I HO FEM setf SENT, 0 goto SEND_RF SEND_BTN ;COMPROVEM SI JA HEM FET L'ENVIAMENT tstfsz SENT, 0 goto BUCLE ;SI NO L'HEM FET MIREM SI ESTEM EN ESPAI DE REBOTS tstfsz F_REBOTS_SEND ;SI HI ESTEM, COMPROVEM SI JA HI HAURIEM DE SORTIR goto CHECK_SEND_15MS ;SI NO HO ESTEM, HI ENTREM clrf TIMES, 0 setf F_REBOTS_SEND, 0 goto BUCLE ;SITUACIÓ EN LA QUE HEM REBUT UN BYTE PER LA SIO RX_PC ;ATUREM EL COMPTADOR DELS 10 SEGONS I EL MOVIMENT HORITZONTAL clrf LEDS_10S, 0 clrf HORIZ, 0 ;ENS SITUEM A L'INICI DE LA CADENA movlw INIT_FSR0L movwf FSR0L, 0 movlw INIT_FSR0H movwf FSR0H, 0 ;LLEGIM EL BYTE REBUT I MIREM SI ES TRACTA DEL CAS DE CARREGAR UNA CADENA A LA RAM O BÉ ;S'HA D'ENVIAR PER RF EL CONTINGUT movff RCREG, WORD movlw LOAD_BYTE cpfseq WORD, 0 ;S'HA DE TRANSMETRE PER RF goto SEND_MESSAGE ;S'HA DE CARREGAR UNA CADENA ;FIQUEM A ZERO EL COMPTADOR DE LLETRES DE LA CADENA ;clrf SIZEL, 0 movlw 0x02 movwf SIZEL, 0 clrf SIZEH, 0 ;COM QUE UTILITZEM UN PROTOCOL ORIENTAT A CONNEXIÓ, S'ESTABLEIX UN DIALEG, AIXÍ QUE PER ASSEGURAR QUE NO ;ES PERDRÀ CAP BYTE L'ORDINADOR S'HA D'ESPERAR A QUE LA PIC LI CONTESTI DEMANA_CHAR ;TRANSMETEM A L'ORDINADOR EL BYTE SEND_BYTE QUE VOL DIR QUE LI DEMANEM UN ALTRE CARÀCTER DE LA CADENA movlw SEND_BYTE movwf TXREG, 0 ;ESPEREM QUE L'ORDINADOR ENS CONTESTI btfss PIR1, RCIF, 0 goto $-2 ;LLEGIM EL BYTE REBUT I EL COMPAREM AMB EL BYTE QUE INDICA UN FINAL DE CADENA. movff RCREG, WORD movlw END_BYTE cpfseq WORD, 0 ;SI ENCARA NO S'HA ACABAT LA CADENA, GUARDEM EL CARÀCTER REBUT A LA RAM goto GUARDA_CHAR ;SI S'HA ACABAT LA CÀRREGA FEM PARPALLEJAR ELS LEDS A 5HZ movlw F_5HZ movwf BLINK, 0 clrf LATD, 0 clrf LATB, 0 ;INDIQUEM A L'ORDINADOR QUE HEM REBUT EL FINAL DE CADENA movlw END_BYTE movwf TXREG, 0 ;setf TXREG, 0 goto BUCLE GUARDA_CHAR ;PER CADA BYTE QUE REBEM INCREMENTEM EL COMPTADOR DE MIDA DE LA CADENA incf SIZEL, 1, 0 btfsc STATUS, C, 0 incf SIZEH, 1, 0 ;I ESCRIVIM EL NOU BYTE A LA RAM movff WORD, POSTINC0 goto DEMANA_CHAR ;SITUACIÓ EN LA QUE HEM DE TRANSMETRE EL CONTINGUT DE LA RAM PER RF SEND_MESSAGE ;SI HEM REBUT L'INSTRUCCIÓ DE TRANSMISSIÓ PER LA SIO LI HEM DE CONTESTAR movlw SEND_BYTE movwf TXREG, 0 SEND_RF ;ELIMINEM L'ACTIVITAT DELS LEDS clrf LEDS_10S, 0 clrf HORIZ, 0 ;MIREM SI PODEM TRANSMETRE (TENIM CARREGAT UN MISSATGE) tstfsz SIZEL, 0 goto RF_OK tstfsz SIZEH, 0 goto RF_OK RF_KO ;SI NO PODEM TRANSMETRE PER RF INICIEM EL MOVIMENT HORITZONTAL DELS LEDS movlw 0x03 movwf LATD, 0 clrf LATB, 0 setf HORIZ, 0 clrf BLINK, 0 goto BUCLE RF_OK ;EN CAS QUE SI QUE PODEM TRANSMETRE: ;PER A ENCENDRE DE MANERA PROGRESSIVA ELS 10 LEDS NECESSITEM EL RESULTAT DE LA MIDA DE LA CADENA ENTRE 10 ;DIVIDIM ENTRE 10 I APAGUEM ELS LEDS call DIV_10 clrf LATD, 0 clrf LATB, 0 clrf N_LEDS, 0 SEND_RAM ;SITUEM EL PUNTER A L'INICI DE LA CADENA ;movlw INIT_FSR0H movlw INIT_MSGH movwf FSR0H, 0 ;movlw INIT_FSR0L movlw INIT_MSGL movwf FSR0L, 0 ;LLEGIM LA PARAULA A TRANSMETRE movff POSTINC0, WORD ;ENVIEM UN FLANC POSITIU (L'HAUREM D'ENVIAR SI O SI, JA SIGUI PER LA PRIMERA PART L'UN 1 O LA SEGONA D'UN 0) call RF_1 ;ROTEM LA PARAULA A ENVIAR CAP A L'ESQUERRA (TRANSMETEM DE MÉS A MENYS PES) rlcf WORD, 1, 0 btfsc STATUS, C, 0 ;SI EL PRIMER BIT ÉS UN 1 JA PODEM TRANSMETRE LA RESTA DE PARAULES goto ENVIA_TRAMA ;SI EL PRIMER BIT ÉS UN 0 ENVIEM UN 0 ABANS DE TRANSMETRE LA RESTA DE PARAULES call RF_0 ENVIA_TRAMA ;INICIALITZEM L'ÍNDEX DELS BITS DE LA PARAULA A 1 PERQUÈ JA HEM ENVIAT EL PRIMER movlw 0x01 movwf INDEX, 0 ;INICIALITZEM L'ÍNDEX DE LES PARAULES A TRANSMETRE A 0. LA TRANSMISSIÓ ACABARÀ QUAN AQUEST COMPTADOR VALGUI ;EL MATEIX QUE LA MIDA DE LA CADENA clrf N_SIZEL, 0 clrf N_SIZEH, 0 CHECK_SIZE ;COMPAREM SI JA HEM TRANSMÈS TOTES LES LLETRES movf SIZEH, 0, 0 cpfseq N_SIZEH, 0 goto BUCLE_WORD movf SIZEL, 0, 0 cpfslt N_SIZEL, 0 ;SI L'ÍNDEX HA SOBREPASSAT LA MIDA DEL MISSATGE VOL DIR QUE JA HEM ACABAT. goto END_ENVIA_TRAMA BUCLE_WORD ;SI NO HEM ACABAT DE TRANSMETRE UNA PARAULA ENVIEM EL SEGÜENT BIT rlcf WORD, 1, 0 btfss STATUS, C, 0 ;SI ES TRACTA D'UN 0, PRIMER ENVIEM UN NIVELL A 5V I DESPRÉS UN A 0V goto SEND_0 ;SI ES TRACTA D'UN 1, PRIMER ENVIEM UN NIVELL A 0V I DESPRÉS UN A 5V SEND_1 call RF_0 call RF_1 goto CHECK_WORD SEND_0 call RF_1 call RF_0 ;COMPROVEM SI JA HEM ENVIAT TOTS ELS BITS D'UNA PARAULA CHECK_WORD incf INDEX, 1, 0 movlw 0x08 cpfseq INDEX, 0 ;SI NO HEM ACABAT AMB LA PARAULA ANEM A TRANSMETRE EL SEGÜENT BIT goto BUCLE_WORD ;SI HEM ACABAT RESETEJEM L'ÍNDEX DELS BITS D'UN BYTE I AUGMENTEM L'ÍNDEX DE LLETRES TRANSMESES clrf INDEX, 0 incf N_SIZEL, 1, 0 btfsc STATUS, C, 0 incf N_SIZEH, 1, 0 movff POSTINC0, WORD ;LEDS ;AUGMENTEM TAMBÉ L'ÍNDEX DE LA PROPORCIÓ DE LLETRES TRANSMESES. ;QUAN AQUEST ÍNDEX ARRIBA AL RESULTAT DE LA DIVISIÓ VOL DIR QUE HEM D'ENCENDRE UN LED MÉS incf N_LEDS, 1, 0 movf N_LEDS, 0, 0 cpfseq RES_DIV, 0 ;SI NO HEM D'ENCENDRE UN ALTRE LED TORNEM A AGAFAR UN NOU BYTE DE LA RAM goto CHECK_SIZE ;SI EL BIT DE MÉS PES DEL PORTD ESTÀ ACTIU VOL DIR QUE JA HEM OMPLERT UN REGISTRE, AIXÍ QUE HEM DE MOURE ;DEL SEGON REGISTRE DE LEDS (PORTB) btfss PORTD, 7, 0 ;SI NO HEM OMPLERT EL PORTD goto NEXT_LED ;SI JA HEM OMPLERT EL PORTD bsf LATB, 7, 0 rlncf LATB, 1, 0 NEXT_LED ;PER A ENCENDRE PROGRESSIVAMENT ELS LEDS ACTIVEM EL BIT DE MÉS PES I ROTEM SENSE CARRY CAP A L'ESQUERRA bsf LATD, 7, 0 rlncf LATD, 1, 0 clrf N_LEDS, 0 goto CHECK_SIZE END_ENVIA_TRAMA ;SI JA HEM ACABAT DE TRANSMETRE L'ÚLTIM BIT DE L'ÚLTIM BYTE ENS ESPEREM A QUE AQUEST ESTIGUI EL SEU TEMPS EN ;L'ESTAT PERTINENT I DESPRÉS BAIXEM EL SENYAL DE TRANSMISSIÓ call RF_0 ;JA HEM ENVIAT TOTS ELS BITS, AIXÃ’ IMPLICA EL 100% DE CARÀCTERS ENVIATS, AIXÍ QUE ACTIVEM TOTS ELS LEDS ;(REALMENT UNA MICA INNECESSARI JA QUE DE SEGUIDA VA AL BUCLE I INICIA EL PARPALLEIG) setf LATB, 0 setf LATD, 0 ;ACTIVA EL PARPALLEIG A 10HZ movlw F_10HZ movwf BLINK, 0 goto BUCLE RF_0 ;FUNCIÓ QUE S'ESPERA A QUE SALTI UNA INTERRUPCIÓ I DESPRÉS FICA A 0 LA TRANSMISSIÓ RF setf WAIT, 0 tstfsz WAIT, 0 goto $-2 bcf LATC, 2, 0 return RF_1 ;FUNCIÓ QUE S'ESPERA A QUE SALTI UNA INTERRUPCIÓ I DESPRÉS FICA A 1 LA TRANSMISSIÓ RF setf WAIT, 0 tstfsz WAIT, 0 goto $-2 bsf LATC, 2, 0 return LEDS_HORIZ ;ARRIBEM EN AQUEST CAS SI HEM DE MOURE HORITZONTALMENT ELS LEDS movlw F_20HZ cpfsgt LEDS_HZ ;SI NO HA PASSAT PROU TEMPS COM PER CANVIAR L'ESTAT DELS LEDS ANEM AL SEGÜENT CONDICIONAL DEL BUCLE goto CHECK_LOAD_BTN tstfsz RIGHT_NOTLEFT ;MOVIMENT A LA DRETA goto MOVE_RIGHT ;MOVIMENT A L'ESQUERRA MOVE_LEFT ;EL MOVIMENT FUNCIONA DE LA SEGÜENT MANERA: SI HEM ARRIBAT AL BIT RB1 VOL DIR QUE HEM DE CANVIAR DE DIRECCIÓ. ;EN CAS CONTRARI ROTEM AMB CARRY CAP A L'ESQUERRA EL REGISTRE LATD. SI HI HA CARRY ROTEM EL LATB. clrf RIGHT_NOTLEFT btfsc PORTB, 1, 0 goto MOVE_RIGHT rlcf LATD, 1, 0 btfsc STATUS, C, 0 rlcf LATB, 1, 0 ;RESETEJEM EL COMPTADOR DE FREQÜÈNCIA DELS LEDS clrf LEDS_HZ, 0 goto CHECK_LOAD_BTN MOVE_RIGHT ;EL MOVIMENT FUNCIONA DE LA SEGÜENT MANERA: SI HEM ARRIBAT AL BIT RD0 VOL DIR QUE HEM DE CANVIAR DE DIRECCIÓ. ;EN CAS CONTRARI ROTEM AMB CARRY CAP A LA DRETA EL REGISTRE LATB I EL LATD. setf RIGHT_NOTLEFT btfsc PORTD, 0, 0 goto MOVE_LEFT rrcf LATB, 1, 0 rrcf LATD, 1, 0 ;RESETEJEM EL COMPTADOR DE FREQÜÈNCIA DELS LEDS clrf LEDS_HZ, 0 goto CHECK_LOAD_BTN LEDS_BLINK ;SI VOLEM PARPELLEJAR ELS LEDS ESCRIVIM A BLINK LA FREQÜÈNCIA A LA QUE VOLEM FER-HO. movf BLINK, 0, 0 cpfsgt LEDS_HZ ;SI NO HA PASSAT PROU TEMPS COM PER CANVIAR L'ESTAT DELS LEDS ANEM AL SEGÜENT CONDICIONAL DEL BUCLE goto CHECK_LOAD_BTN ;NEGUEM ELS LEDS, RESETEJEM LA VARIABLE DE FRQÜÈNCIA DELS LEDS I ANEM AL SEGÜENT CONDICIONAL DEL BUCLE comf LATD, 1, 0 comf LATB, 1, 0 clrf LEDS_HZ, 0 goto CHECK_LOAD_BTN LEDS_SEG ;MIREM SI JA HAN PASSAT 10 SEGONS movlw SEG_10_L cpfseq SEG_L, 0 goto CHECK_LOAD_BTN movlw SEG_10_H cpfseq SEG_H, 0 goto CHECK_LOAD_BTN ;SI JA HAN PASSAT DESACTIVEM EL FLAG PER A COMPTAR 10 SEGONS I ACTIVEM EL MOVIMENT HORITZONTAL clrf LEDS_10S, 0 movlw 0x03 movwf LATD, 0 clrf LATB, 0 setf HORIZ, 0 clrf BLINK, 0 goto CHECK_LOAD_BTN DIV_10 ;FUNCIÓ PER A DIVIDIR SIZE ENTRE 10 I DEIXAR EL RESULTAT A RES_DIV. EL PROCEDIMENT PER A OBTENIR EL RESULTAT ÉS ;EL SEGÜENT: ;SUMEM DOS AL VALOR DE LA PART BAIXA DE SIZE movf SIZEL, 0, 0 addlw 0x02 ;EN CAS QUE ES DONI OVERFLOW AUGMENTEM LA PART ALTA DE SIZE btfsc STATUS, C, 0 incf SIZEH, 1, 0 ;MULTIPLIQUEM (SIZEL+2) PER 51 mullw 0x33 ;DEL RESULTAT NOMÉS ENS INTERESSA LA PART ALTA movf PRODH, 0, 0 ;SI LA PART ALTA DE SIZE ÉS DIFERENT A 0 SUMEM 51 AL RESULTAT btfsc SIZEH, 0, 0 addlw 0x33 movwf RES_DIV, 0 ;DIVIDEM EL RESULTAT OBTINGUT FINS EL MOMENT ENTRE 2 rrcf RES_DIV, 1, 0 return ;******* ;* END * ;******* END
30.173693
123
0.677192
9b59221b832c30ac952344438e54b918b034133f
192
asm
Assembly
libsrc/_DEVELOPMENT/inttypes/c/sccz80/_imaxdiv__callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/inttypes/c/sccz80/_imaxdiv__callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/inttypes/c/sccz80/_imaxdiv__callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; void _imaxdiv_(imaxdiv_t *md, intmax_t numer, intmax_t denom) SECTION code_clib SECTION code_inttypes PUBLIC _imaxdiv__callee EXTERN _ldiv__callee defc _imaxdiv__callee = _ldiv__callee
16
63
0.833333
40aa2e5fa0caba80986ddc2af094097543dd699b
6,748
asm
Assembly
compiler/ti-cgt-arm_18.12.4.LTS/lib/src/u_div16.asm
JosiahCraw/TI-Arm-Docker
23c0f4caf1638512bf53241531c69289c4e82488
[ "MIT" ]
null
null
null
compiler/ti-cgt-arm_18.12.4.LTS/lib/src/u_div16.asm
JosiahCraw/TI-Arm-Docker
23c0f4caf1638512bf53241531c69289c4e82488
[ "MIT" ]
null
null
null
compiler/ti-cgt-arm_18.12.4.LTS/lib/src/u_div16.asm
JosiahCraw/TI-Arm-Docker
23c0f4caf1638512bf53241531c69289c4e82488
[ "MIT" ]
null
null
null
;****************************************************************************** ;* U_DIV16.ASM - 16 BIT STATE - * ;* * ;* Copyright (c) 1996 Texas Instruments Incorporated * ;* http://www.ti.com/ * ;* * ;* 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 Texas Instruments Incorporated nor the names * ;* of its contributors may be used to endorse or promote products * ;* derived from this software without specific prior written * ;* permission. * ;* * ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * ;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * ;* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * ;* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * ;* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * ;* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * ;* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * ;* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * ;* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ;* * ;****************************************************************************** ;**************************************************************************** ;* U$DIV/U$MOD - DIVIDE TWO UNSIGNED 32 BIT NUMBERS - SMALL CODE SIZE VERSION ;* ;**************************************************************************** ;* ;* o DIVIDEND IS IN r0 ;* o DIVISOR IS IN r1 ;* ;* o QUOTIENT IS PLACED IN r1 ;* o REMAINDER IS PLACED IN r0 ;* ;* o DIVIDE BY ZERO RETURNS ZERO ;* ;* o EABI MODE, QUOTIENT IN r0, REMAINDER IN r1 ;* o EABI MODE, DIVIDE BY ZERO RETURNS ;* - 0 IF DIVIDEND == 0 ;* - UINT_MAX IF DIVIDEND > 0 ;* ;**************************************************************************** .thumb .if __TI_EABI_ASSEMBLER ; ASSIGN EXTERNAL NAMES .ref __aeabi_idiv0 .asg __aeabi_uidivmod, __TI_U$DIV ; BASED ON RTS BEING BUILT .else .clink .asg U$DIV, __TI_U$DIV .endif dvs .set r2 ; WORK COPY OF THE DIVISOR (SHIFTED) quo .set r3 ; WORK COPY OF THE QUOTIENT max .set r4 ; MAX DIVIDEND FOR DIVISOR SHIFT AMOUNT .if !__TI_EABI_ASSEMBLER .if __TI_ARM9ABI_ASSEMBLER .thumbfunc U$MOD .endif .global U$MOD U$MOD: .endif .if __TI_ARM9ABI_ASSEMBLER | __TI_EABI_ASSEMBLER .thumbfunc __TI_U$DIV .endif .global __TI_U$DIV .if __TI_EABI_ASSEMBLER .global __aeabi_uidiv __aeabi_uidiv: .endif __TI_U$DIV: .asmfunc stack_usage(16) .if __TI_ARM7ABI_ASSEMBLER | __TI_ARM9ABI_ASSEMBLER | !__TI_TMS470_V4__ PUSH {r2-r4, lr} ; SAVE CONTEXT .else PUSH {r2-r5} .endif MOVS dvs, r1 ; CHECK FOR DIVISION BY ZERO BEQ _div_by_zero_ ; MOVS quo, #0 ; INITIALIZE THE QUOTIENT MOVS max, #1 ; LSLS max, max, #31 ; CMP r0, max ; SETUP THE MAX DIVIDEND WHEN BCS _udvs_loop_ ; CALCULATING THE DIVISOR SHIFT MOVS max, r0 ; AMOUNT _udvs_loop_: CMP max, dvs ; BLS _udiv_ ; LSLS dvs, dvs, #1 ; CALCULATE THE MAXIMUM DIVISOR B _udvs_loop_ ; SHIFT AMOUNT _udiv_: CMP r0, dvs ; IF DIVIDEND IS LARGER THAN DIVISOR, ADCS quo, quo ; SHIFT A 1 INTO THE QUOTIENT, ELSE 0 CMP r0, dvs ; IF DIVIDEND IS LARGER THAN DIVISOR, BCC _cc1_ ; SUBTRACT THE DIVISOR, SUBS r0, r0, dvs ; _cc1_: CMP r1, dvs ; IF THERE IS SHIFTED DIVISOR, THEN BCS _cc2_ ; LSRS dvs, dvs, #1 ; CONTINUE THE LOOP. B _udiv_ ; _cc2_: MOVS r1, quo ; ELSE DONE. PLACE THE QUOTIENT .if __TI_EABI_ASSEMBLER ; EABI RTS, QUOT IN R0, REM IN R1 MOVS r2, r0 ; SWAP R0 & R1 MOVS r0, r1 MOVS r1, r2 .endif .if __TI_ARM7ABI_ASSEMBLER | __TI_ARM9ABI_ASSEMBLER | !__TI_TMS470_V4__ POP {r2-r4, pc} ; IT ITS RIGHT PLACE. .else POP {r2-r5} BX lr .endif _div_by_zero_: .if __TI_EABI_ASSEMBLER ; EABI RTS, QUOT IN R0, REM IN R1 CMP r0, #0 BEQ _divi_zero_ MVNS r0, r1 ; IF DIVIDEND IS +VE, RETURN UINT_MAX ; R1 IS ZERO AT THIS POINT _divi_zero_: .if __TI_TMS470_V4__ MOV r5, lr BL __aeabi_idiv0 MOV lr, r5 .else BL __aeabi_idiv0 .endif .else MOVS r0, #0 ; DIVIDE BY ZERO RETURNS ZERO .endif .if __TI_ARM7ABI_ASSEMBLER | __TI_ARM9ABI_ASSEMBLER | !__TI_TMS470_V4__ POP {r2-r4, pc} ; .else POP {r2-r5} BX lr .endif .endasmfunc .end
41.398773
79
0.47051
d12330552da865cde22c25d69bc95fcd25e3ebb7
9,290
asm
Assembly
1541/64tass/erproc.asm
silverdr/assembly
c2851f7033223e089285dce22443b7e219ed4f61
[ "Unlicense" ]
23
2015-03-23T15:16:57.000Z
2022-03-18T12:43:42.000Z
1541/64tass/erproc.asm
silverdr/assembly
c2851f7033223e089285dce22443b7e219ed4f61
[ "Unlicense" ]
null
null
null
1541/64tass/erproc.asm
silverdr/assembly
c2851f7033223e089285dce22443b7e219ed4f61
[ "Unlicense" ]
8
2016-04-13T11:19:35.000Z
2021-12-22T07:39:00.000Z
; error processing ; controller errors ; 0 (1) no error ; 20 (2) can't find block header ; 21 (3) no synch character ; 22 (4) data block not present ; 23 (5) checksum error in data ; 24 (16) byte decoding error ; 25 (7) write-verify error ; 26 (8) write w/ write protect on ; 27 (9) checksum error in header ; 28 (10) data extends into next block ; 29 (11) disk i.d. mismatch ; command errors ; 30 general syntax ; 31 invalid command ; 32 long line ; 33 invalid filname ; 34 no file given ; 39 command file not found ; 50 record not present ; 51 overflow in record ; 52 file too large ; 60 file open for write ; 61 file not open ; 62 file not found ; 63 file exists ; 64 file type mismatch ; 65 no block ; 66 illegal track or sector ; 67 illegal system t or s ; 70 no channels available ; 71 directory error ; 72 disk full ; 73 cbm dos v2.6 ; 74 drive not ready ; 1 files scratched response badsyn =$30 badcmd =$31 longln =$32 badfn =$33 nofile =$34 nocfil =$39 norec =$50 recovf =$51 bigfil =$52 filopn =$60 filnop =$61 flntfd =$62 flexst =$63 mistyp =$64 noblk =$65 badts =$66 systs =$67 nochnl =$70 direrr =$71 dskful =$72 cbmv2 =$73 nodriv =$74 ; error message table ; leading errror numbers, ; text with 1st & last chars ; or'ed with $80, ; tokens for key words are ; less than $10 (and'ed w/ $80) errtab ; " OK" .text 0,$a0,'O',$cb ;"read error" .text $20,$21,$22,$23,$24,$27 .text $d2,'EAD',$89 ;" file too large" .text $52,$83,' TOO LARG',$c5 ;" record not present" .text $50,$8b,6,' PRESEN',$d4 ;"overflow in record" .text $51,$cf,'VERFLOW ' .text 'IN',$8b ;" write error" .text $25,$28,$8a,$89 ;" write protect on" .text $26,$8a,' PROTECT O',$ce ;" disk id mismatch" .text $29,$88,' ID',$85 ;"syntax error" .text $30,$31,$32,$33,$34 .text $d3,'YNTAX',$89 ;" write file open" .text $60,$8a,3,$84 ;" file exists" .text $63,$83,' EXIST',$d3 ;" file type mismatch" .text $64,$83,' TYPE',$85 ;"no block" .text $65,$ce,'O BLOC',$cb ;"illegal track or sector" .text $66,$67,$c9,'LLEGAL TRACK' .text ' OR SECTO',$d2 ;" file not open" .text $61,$83,6,$84 ;" file not found" .text $39,$62,$83,6,$87 ;" files scratched" .text 1,$83,'S SCRATCHE',$c4 ;"no channel" .text $70,$ce,'O CHANNE',$cc ;"dir error" .text $71,$c4,'IR',$89 ;" disk full" .text $72,$88,' FUL',$cc ;"cbm dos v2.6 1541" .text $73,$c3,'BM DOS V2.6 154',$b1 ;"drive not ready" .text $74,$c4,'RIVE',6,' READ',$d9 ; error token key words ; words used more than once ;"error" .text 9,$c5,'RRO',$d2 ;"write" .text $a,$d7,'RIT',$c5 ;"file" .text 3,$c6,'IL',$c5 ;"open" .text 4,$cf,'PE',$ce ;"mismatch" .text 5,$cd,'ISMATC',$c8 ;"not" .text 6,$ce,'O',$d4 ;"found" .text 7,$c6,'OUN',$c4 ;"disk" .text 8,$c4,'IS',$cb ;"record" .text $b,$d2,'ECOR',$c4 etend =* ; controller error entry ; .a= error # ; .x= job # error pha stx jobnum rtch46 txa asl a tax lda hdrs,x ; 4/12********* track,sector sta track lda hdrs+1,x ; 4/12********* sta sector pla and #$f ; convert controller... beq err1 ; ...errors to dos errors cmp #$f ; check nodrive error bne err2 lda #nodriv bne err3 ; bra err1 lda #6 ; code=16-->14 err2 ora #$20 tax dex dex txa err3 pha lda cmdnum cmp #val bne err4 lda #$ff sta cmdnum pla jsr errmsg jsr initdr ; init for validate jmp cmder3 err4 pla cmder2 jsr errmsg cmder3 jsr clrcb ; clear cmdbuf lda #0 sta wbam ; clear after error jsr erron ; set error led jsr freich ; free internal channel lda #0 ; clear pointers sta buftab+cbptr ldx #topwrt txs ; purge stack lda orgsa and #$f sta sa cmp #$f beq err10 sei lda lsnact bne lsnerr lda tlkact bne tlkerr ldx sa lda lintab,x cmp #$ff beq err10 and #$f sta lindx jmp tlerr ; talker error recovery ; if command channel, release dav ; if data channel, force not ready ; and release channel tlkerr jsr fndrch ; jsr iterr ; *** rom - 05 fix 8/18/83 *** .byte $ea,$ea,$ea ; fill in 'jsr' bne tlerr ; finish ; listener error recovery ; if command channel, release rfd ; if data channel, force not ready ; and release channel lsnerr jsr fndwch ; jsr ilerr ; *** rom - 05 fix 8/18/83 *** .byte $ea,$ea,$ea ; fill in 'jsr' tlerr jsr typfil cmp #reltyp bcs err10 jsr frechn err10 jmp idle ; convert hex to bcd hexdec tax ;<><><><><><><><><><><><><><><><><><><><><><><><><><><><> jmp ptch67 ; *** rom ds 05/15/86 *** ; lda #0 ; sed hex0 cpx #0 beq hex5 clc adc #1 dex jmp hex0 ;<><><><><><><><><><><><><><><><><><><><><><><><><><><><> hex5 cld ; convert bcd to ascii dec ; return bcd in .x ; store ascii in (temp),y bcddec tax lsr a lsr a lsr a lsr a jsr bcd2 txa bcd2 and #$f ora #$30 sta (cb+2),y iny rts ; transfer error message to ; error buffer okerr jsr erroff lda #0 errts0 ldy #0 sty track sty sector errmsg ldy #0 ldx #<errbuf stx cb+2 ldx #>errbuf stx cb+3 jsr bcddec ; convert error # lda #',' sta (cb+2),y iny lda errbuf sta chndat+errchn txa ; error # in .x jsr ermove ; move message ermsg2 lda #',' sta (cb+2),y iny lda track jsr hexdec ; convert track # lda #',' sta (cb+2),y iny lda sector ; convert sector # jsr hexdec dey tya clc adc #<errbuf ; set last char sta lstchr+errchn inc cb+2 lda #rdytlk sta chnrdy+errchn rts ;**********************************; ;* ermove - move error message *; ;* from errtab to errbuf. *; ;* fully recursive for token *; ;* word prosessing. *; ;* input: .a= bcd error number *; ;**********************************; ermove tax ; save .a lda r0 ; save r0,r0+1 pha lda r0+1 pha lda #<errtab ; set pointer to table sta r0 lda #>errtab sta r0+1 txa ; restore .a ldx #0 ; .x=0 for indirect e10 cmp (r0,x) ; ?error # = table entry? beq e50 ; yes, send message pha ; save error # jsr eadv2 ; check & advance ptr bcc e30 ; more #'s to check e20 jsr eadv2 ; advance past this message bcc e20 e30 lda r0+1 ; check ptr cmp #>etend bcc e40 ; <, continue bne e45 ; >, quit lda #<etend cmp r0 bcc e45 ; past end of table e40 pla ; restore error # jmp e10 ; check next entry e45 pla ; pop error # jmp e90 ; go quit e50 ; the number has been located jsr eadv1 bcc e50 ; advance past other #'s e55 jsr e60 jsr eadv1 bcc e55 jsr e60 ; check for token or last word e90 pla ; all finished sta r0+1 ; restore r0 pla sta r0 rts e60 cmp #$20 ; (max token #)+1 bcs e70 ; not a token tax lda #$20 ; implied leading space sta (cb+2),y iny txa ; restore token # jsr ermove ; add token word to message rts e70 sta (cb+2),y ; put char in message iny rts ;error advance & check eadv1 ; pre-increment inc r0 ; advance ptr bne ea10 inc r0+1 ea10 lda (r0,x) ; get current entry asl a ; .c=1 is end or beginning lda (r0,x) and #$7f ; mask off bit7 rts eadv2 ; post-increment jsr ea10 ; check table entry inc r0 bne ea20 inc r0+1 ea20 rts
21.910377
62
0.461572
24a6bfc811c615e80029e06260ad5ce81aad5016
152
asm
Assembly
libsrc/graphics/laser500/plot_MODE2.asm
bahmanrafatjoo/z88dk
001b7eab7fa2e94ee7210ff483c789e15e8d6a40
[ "ClArtistic" ]
null
null
null
libsrc/graphics/laser500/plot_MODE2.asm
bahmanrafatjoo/z88dk
001b7eab7fa2e94ee7210ff483c789e15e8d6a40
[ "ClArtistic" ]
null
null
null
libsrc/graphics/laser500/plot_MODE2.asm
bahmanrafatjoo/z88dk
001b7eab7fa2e94ee7210ff483c789e15e8d6a40
[ "ClArtistic" ]
1
2019-12-03T23:28:20.000Z
2019-12-03T23:28:20.000Z
SECTION code_clib PUBLIC plot_MODE2 .plot_MODE2 defc NEEDplot = 1 INCLUDE "graphics/laser500/w_pixel_MODE2.asm"
15.2
53
0.618421
d8b4cf1942190b9431a98e8507c5d9a25933280d
882
asm
Assembly
programs/oeis/022/A022411.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/022/A022411.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/022/A022411.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A022411: a(n) = a(n-1) + a(n-2) + 1, with a(0)=3, a(1)=12. ; 3,12,16,29,46,76,123,200,324,525,850,1376,2227,3604,5832,9437,15270,24708,39979,64688,104668,169357,274026,443384,717411,1160796,1878208,3039005,4917214,7956220,12873435,20829656,33703092,54532749,88235842,142768592,231004435,373773028,604777464,978550493,1583327958,2561878452,4145206411,6707084864,10852291276,17559376141,28411667418,45971043560,74382710979,120353754540,194736465520,315090220061,509826685582,824916905644,1334743591227,2159660496872,3494404088100,5654064584973,9148468673074,14802533258048,23951001931123,38753535189172,62704537120296,101458072309469,164162609429766,265620681739236,429783291169003,695403972908240,1125187264077244,1820591236985485,2945778501062730,4766369738048216,7712148239110947 mov $1,3 mov $2,4 mov $3,8 lpb $0,1 sub $0,1 add $1,1 add $3,$2 mov $2,$1 mov $1,$3 lpe
63
721
0.818594
92da895626a618175f759fef311510a00aa6513b
251
asm
Assembly
src/sys/WaitKeyCycle.asm
beckadamtheinventor/BOSos
42471126eb47517fc1beec15960b72a9cb76601b
[ "BSD-3-Clause" ]
1
2019-07-21T20:51:38.000Z
2019-07-21T20:51:38.000Z
src/sys/WaitKeyCycle.asm
beckadamtheinventor/BOSos
42471126eb47517fc1beec15960b72a9cb76601b
[ "BSD-3-Clause" ]
null
null
null
src/sys/WaitKeyCycle.asm
beckadamtheinventor/BOSos
42471126eb47517fc1beec15960b72a9cb76601b
[ "BSD-3-Clause" ]
null
null
null
;@DOES Wait until a key is pressed, then wait until it's released, then return the keycode ;@OUTPUT A = keycode ;@DESTROYS HL,DE,BC,AF sys_WaitKeyCycle: call sys_GetKey jr z,sys_WaitKeyCycle push af .loop: call kb_AnyKey jr z,.loop pop af ret
17.928571
90
0.74502
7f3e22f3f7a9e12de820b42a7d6c6f5f0d1783cd
211
asm
Assembly
programs/oeis/117/A117802.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/117/A117802.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/117/A117802.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A117802: Numbers with an "a" in Dutch. ; 8,12,28,38,48,58,68,78,88,98,108,118,128,138,148,158,168,178,188,198,208,218,228,238,248,258,268 mul $0,5 lpb $0 sub $0,3 mul $0,2 lpe mov $1,$0 mul $1,2 add $1,8
17.583333
98
0.63981
7e932752be9c63f6380f32db64d4105176ce1968
3,352
asm
Assembly
binary16/fwld.asm
DW0RKiN/Floating-point-Library-for-Z80
494add6bc20922f4a634fbbacb32d8bd4dd185a7
[ "MIT" ]
12
2020-02-17T09:07:02.000Z
2022-02-09T22:15:34.000Z
binary16/fwld.asm
DW0RKiN/Floating-point-Library-for-Z80
494add6bc20922f4a634fbbacb32d8bd4dd185a7
[ "MIT" ]
null
null
null
binary16/fwld.asm
DW0RKiN/Floating-point-Library-for-Z80
494add6bc20922f4a634fbbacb32d8bd4dd185a7
[ "MIT" ]
1
2021-06-21T23:30:28.000Z
2021-06-21T23:30:28.000Z
if not defined @FWLD ; Load Word. Convert unsigned 16-bit integer into floating-point number ; In: HL = Word to convert ; Out: HL = floating point representation ; Pollutes: AF @FWLD: if not defined FWLD ; ***************************************** FWLD ; * ; ***************************************** endif LD A, H ; 1:4 OR A ; 1:4 JR z, FWLD_BYTE ; 2:12/7 CP 2*EXP_PLUS_ONE ; 2:7 JR c, FWLD_LOSSLESS ; 2:12/7 LD A, BIAS/EXP_PLUS_ONE+16 ; 2:7 HL = xxxx xxxx xxxx xxxx FWLD_NORM: ADD HL, HL ; 1:11 DEC A ; 1:4 JR nc, FWLD_NORM ; 2:12/7 ADD HL, HL ; 1:11 ADC A, A ; 1:4 ADD HL, HL ; 1:11 ADC A, A ; 1:4 AHL = 0eee eemm mmmm mmmm ?rrr rrrr RL L ; 2:8 check for rounding LD L, H ; 1:4 LD H, A ; 1:4 RET nc ; 1:11/5 0 rrrr rrr0 if carry_flow_warning CCF ; 1:4 endif RET z ; 1:11/5 1 0000 0000 INC L ; 1:4 rounding up RET nz ; 1:11/5 INC H ; 1:4 RET ; 1:10 FWLD_BYTE: ; HL = 0000 0000 xxxx xxxx OR L ; 1:4 RET z ; 1:5/11 LD H, BIAS/EXP_PLUS_ONE+8 ; 2:7 FWLD_BYTE_NORM: ADD A, A ; 1:4 DEC H ; 1:4 JR nc, FWLD_BYTE_NORM ; 2:12/7 LD L, A ; 1:4 ADD HL, HL ; 1:11 ADD HL, HL ; 1:11 RET with reset carry RET ; 1:10 FWLD_LOSSLESS: ; HL = 0000 0xxx xxxx xxxx, set carry ; $100 => $5C00 ; $200 => $6000, $300 => $6200 ; $400 => $6400, $500 => $6500, $600 => $6600, $700 => $6700 AND IMPBIT_MASK ; 2:7 LD A, BIAS+EXP_PLUS_ONE*(MANT_BITS-1) ; 2:7 JR nz, FWLD_LOSSLESS_E ; 2:12/7 if 1 FWLD_LOSSLESS_N: ADD HL, HL ; 1:11 SUB $04 ; 2:7 BIT 2, H ; 2:8 JR z, FWLD_LOSSLESS_N ; 2:12/7 else ADD HL, HL ; 1:11 SUB $04 ; 2:7 BIT 2, H ; 2:8 JR nz, FWLD_LOSSLESS_E ; 2:12/7 ADD HL, HL ; 1:11 SUB $04 ; 2:7 endif FWLD_LOSSLESS_E: ADD A, H ; 1:4 RET with reset carry LD H, A ; 1:4 RET ; 1:10 endif
40.385542
110
0.302804
c33f41adf1c129bf5ab8964c29ed2be46d64fb39
1,426
asm
Assembly
LAB 4/Lab4Task5.asm
smellycattt/Microprocessor-Programming
9046490ba7f8e97963995a32589de4ea1bdb0ef5
[ "MIT" ]
1
2019-02-15T21:21:24.000Z
2019-02-15T21:21:24.000Z
LAB 4/Lab4Task5.asm
jyotishmaan/Microprocessor-Programming
7139e9ba0c9fd6f452003ecf07f76b02cb6c1773
[ "MIT" ]
null
null
null
LAB 4/Lab4Task5.asm
jyotishmaan/Microprocessor-Programming
7139e9ba0c9fd6f452003ecf07f76b02cb6c1773
[ "MIT" ]
null
null
null
.Model Tiny .386 .DATA FILE DB 'ABCD2.txt',0 READMAX DB 40 READACTUAL DB ? STORE DB 40 DUP('0') NEWLINE DB 0DH, 0AH READMAX2 DB 40 READACTUAL2 DB ? STORE2 DB 40 DUP('0') .CODE .Startup ;CREATING THE FILE MOV AH, 3CH LEA DX, FILE MOV CL, 2; INT 21H ;TAKING INPUT FROM THE KEYBOARD FOR NAME MOV AH, 0AH LEA DX, READMAX INT 21H ;TAKING INPUT FROM THE KEYBOARD FOR ID MOV AH, 0AH LEA DX, READMAX2 INT 21H ;OPENING THE FILE LEA DX, FILE MOV AH, 3DH MOV AL, 02H INT 21H ;WRITING DATA INTO THE FILE -- NAME MOV BX,AX ;TRANSFERRING THE FILE HANDLE MOV AH, 40H MOV CL, READACTUAL MOV CH, 00H LEA DX, STORE INT 21H ;MOVING THE POINTER TO THE END OF THE FILE MOV AH, 42H MOV DL, READACTUAL MOV DH, 00H MOV CX, 00H ; DISPLACEMENT STORED IN COMBINATION OF CX:DX MOV AL, 00H INT 21H ;WRITING DATA INTO THE FILE -- NEWLINE MOV AH, 40H MOV CL, READACTUAL MOV CH, 00H LEA DX, NEWLINE INT 21H ;MOVING THE POINTER TO THE END OF THE FILE MOV AH, 42H MOV DL, READACTUAL MOV DH, 00H ADD DX, 2 ;FOR NEWLINE CHARACTERS MOV CX, 00H ; DISPLACEMENT STORED IN COMBINATION OF CX:DX MOV AL, 00H INT 21H ;WRITING DATA INTO THE FILE --- ID MOV AH, 40H MOV CL, READACTUAL2 MOV CH, 00H LEA DX, STORE2 INT 21H ;CLOSING THE FILE MOV AH, 3EH INT 21H .EXIT END
15.844444
59
0.631837
828405425948dbe166021a542f32704a921391bf
1,943
asm
Assembly
programs/oeis/231/A231671.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/231/A231671.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/231/A231671.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A231671: a(n) = Sum_{i=0..n} digsum_5(i)^4, where digsum_5(i) = A053824(i). ; 0,1,17,98,354,355,371,452,708,1333,1349,1430,1686,2311,3607,3688,3944,4569,5865,8266,8522,9147,10443,12844,16940,16941,16957,17038,17294,17919,17935,18016,18272,18897,20193,20274,20530,21155,22451,24852,25108,25733,27029,29430,33526,34151,35447,37848,41944,48505,48521,48602,48858,49483,50779,50860,51116,51741,53037,55438,55694,56319,57615,60016,64112,64737,66033,68434,72530,79091,80387,82788,86884,93445,103445,103526,103782,104407,105703,108104,108360,108985,110281,112682,116778,117403,118699,121100,125196,131757,133053,135454,139550,146111,156111,158512,162608,169169,179169,193810,194066,194691,195987,198388,202484,203109,204405,206806,210902,217463,218759,221160,225256,231817,241817,244218,248314,254875,264875,279516,283612,290173,300173,314814,335550,335551,335567,335648,335904,336529,336545,336626,336882,337507,338803,338884,339140,339765,341061,343462,343718,344343,345639,348040,352136,352761,354057,356458,360554,367115,367131,367212,367468,368093,369389,369470,369726,370351,371647,374048,374304,374929,376225,378626,382722,383347,384643,387044,391140,397701,398997,401398,405494,412055,422055,422136,422392,423017,424313,426714,426970,427595,428891,431292,435388,436013,437309,439710,443806,450367,451663,454064,458160,464721,474721,477122,481218,487779,497779,512420,512676,513301,514597,516998,521094,521719,523015,525416,529512,536073,537369,539770,543866,550427,560427,562828,566924,573485,583485,598126,602222,608783,618783,633424,654160,654785,656081,658482,662578,669139,670435,672836,676932,683493,693493,695894,699990,706551,716551,731192,735288,741849,751849,766490,787226,793787,803787,818428,839164,867725 mov $5,$0 add $5,1 lpb $5 mov $0,$2 sub $5,1 sub $0,$5 cal $0,53824 ; Sum of digits of (n written in base 5). mul $0,2 mov $3,$0 pow $3,4 mov $4,$3 mul $3,2 sub $3,$4 div $3,8 add $1,$3 lpe div $1,2
92.52381
1,640
0.79825
e73583b5ab3663ac95f4ce996bab4ebab0624710
7,085
asm
Assembly
codec/encoder/core/x86/sample_sc.asm
cantinac/openh264
fbc179fb823061ea886bff925dec90a2f687a04d
[ "BSD-2-Clause" ]
1
2015-11-08T08:02:28.000Z
2015-11-08T08:02:28.000Z
codec/encoder/core/x86/sample_sc.asm
weizhenwei/openh264
f27b22f07c6973e78cf18aee4471c49af9d62462
[ "BSD-2-Clause" ]
null
null
null
codec/encoder/core/x86/sample_sc.asm
weizhenwei/openh264
f27b22f07c6973e78cf18aee4471c49af9d62462
[ "BSD-2-Clause" ]
null
null
null
;*! ;* \copy ;* Copyright (c) 2009-2013, Cisco Systems ;* 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. ;* ;* 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 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ;* POSSIBILITY OF SUCH DAMAGE. ;* ;*************************************************************************/ %include "asm_inc.asm" SECTION .text ;********************************************************************************************************************************** ; ; uint32_t SampleSad16x16Hor8_sse41( uint8_t *src, int32_t stride_src, uint8_t *ref, int32_t stride_ref, uint16 base_cost[8], int32_t *index_min_cost ) ; ; \note: ; src need align with 16 bytes, ref is optional ; \return value: ; return minimal SAD cost, according index carried by index_min_cost ;********************************************************************************************************************************** ; try 8 mv via offset ; xmm7 store sad costs %macro SAD_16x16_LINE_SSE41 4 ; src, ref, stride_src, stride_ref movdqa xmm0, [%1] movdqu xmm1, [%2] movdqu xmm2, [%2+8h] movdqa xmm3, xmm1 movdqa xmm4, xmm2 mpsadbw xmm1, xmm0, 0 ; 000 B paddw xmm7, xmm1 ; accumulate cost mpsadbw xmm3, xmm0, 5 ; 101 B paddw xmm7, xmm3 ; accumulate cost mpsadbw xmm2, xmm0, 2 ; 010 B paddw xmm7, xmm2 ; accumulate cost mpsadbw xmm4, xmm0, 7 ; 111 B paddw xmm7, xmm4 ; accumulate cost add %1, %3 add %2, %4 %endmacro ; end of SAD_16x16_LINE_SSE41 %macro SAD_16x16_LINE_SSE41E 4 ; src, ref, stride_src, stride_ref movdqa xmm0, [%1] movdqu xmm1, [%2] movdqu xmm2, [%2+8h] movdqa xmm3, xmm1 movdqa xmm4, xmm2 mpsadbw xmm1, xmm0, 0 ; 000 B paddw xmm7, xmm1 ; accumulate cost mpsadbw xmm3, xmm0, 5 ; 101 B paddw xmm7, xmm3 ; accumulate cost mpsadbw xmm2, xmm0, 2 ; 010 B paddw xmm7, xmm2 ; accumulate cost mpsadbw xmm4, xmm0, 7 ; 111 B paddw xmm7, xmm4 ; accumulate cost %endmacro ; end of SAD_16x16_LINE_SSE41E WELS_EXTERN SampleSad16x16Hor8_sse41 ;push ebx ;push esi ;mov eax, [esp+12] ; src ;mov ecx, [esp+16] ; stride_src ;mov ebx, [esp+20] ; ref ;mov edx, [esp+24] ; stride_ref ;mov esi, [esp+28] ; base_cost %assign push_num 0 LOAD_6_PARA PUSH_XMM 8 SIGN_EXTENSION r1, r1d SIGN_EXTENSION r3, r3d pxor xmm7, xmm7 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41 r0, r2, r1, r3 SAD_16x16_LINE_SSE41E r0, r2, r1, r3 pxor xmm0, xmm0 movdqa xmm6, xmm7 punpcklwd xmm6, xmm0 punpckhwd xmm7, xmm0 movdqa xmm5, [r4] movdqa xmm4, xmm5 punpcklwd xmm4, xmm0 punpckhwd xmm5, xmm0 paddd xmm4, xmm6 paddd xmm5, xmm7 movdqa xmm3, xmm4 pminud xmm3, xmm5 pshufd xmm2, xmm3, 01001110B pminud xmm2, xmm3 pshufd xmm3, xmm2, 10110001B pminud xmm2, xmm3 movd retrd, xmm2 pcmpeqd xmm4, xmm2 movmskps r2d, xmm4 bsf r1d, r2d jnz near WRITE_INDEX pcmpeqd xmm5, xmm2 movmskps r2d, xmm5 bsf r1d, r2d add r1d, 4 WRITE_INDEX: mov [r5], r1d POP_XMM LOAD_6_PARA_POP ret ;********************************************************************************************************************************** ; ; uint32_t SampleSad8x8Hor8_sse41( uint8_t *src, int32_t stride_src, uint8_t *ref, int32_t stride_ref, uint16_t base_cost[8], int32_t *index_min_cost ) ; ; \note: ; src and ref is optional to align with 16 due inter 8x8 ; \return value: ; return minimal SAD cost, according index carried by index_min_cost ; ;********************************************************************************************************************************** ; try 8 mv via offset ; xmm7 store sad costs %macro SAD_8x8_LINE_SSE41 4 ; src, ref, stride_src, stride_ref movdqu xmm0, [%1] movdqu xmm1, [%2] movdqa xmm2, xmm1 mpsadbw xmm1, xmm0, 0 ; 000 B paddw xmm7, xmm1 ; accumulate cost mpsadbw xmm2, xmm0, 5 ; 101 B paddw xmm7, xmm2 ; accumulate cost add %1, %3 add %2, %4 %endmacro ; end of SAD_8x8_LINE_SSE41 %macro SAD_8x8_LINE_SSE41E 4 ; src, ref, stride_src, stride_ref movdqu xmm0, [%1] movdqu xmm1, [%2] movdqa xmm2, xmm1 mpsadbw xmm1, xmm0, 0 ; 000 B paddw xmm7, xmm1 ; accumulate cost mpsadbw xmm2, xmm0, 5 ; 101 B paddw xmm7, xmm2 ; accumulate cost %endmacro ; end of SAD_8x8_LINE_SSE41E WELS_EXTERN SampleSad8x8Hor8_sse41 %assign push_num 0 LOAD_6_PARA PUSH_XMM 8 SIGN_EXTENSION r1, r1d SIGN_EXTENSION r3, r3d movdqa xmm7, [r4] ; load base cost list SAD_8x8_LINE_SSE41 r0, r2, r1, r3 SAD_8x8_LINE_SSE41 r0, r2, r1, r3 SAD_8x8_LINE_SSE41 r0, r2, r1, r3 SAD_8x8_LINE_SSE41 r0, r2, r1, r3 SAD_8x8_LINE_SSE41 r0, r2, r1, r3 SAD_8x8_LINE_SSE41 r0, r2, r1, r3 SAD_8x8_LINE_SSE41 r0, r2, r1, r3 SAD_8x8_LINE_SSE41E r0, r2, r1, r3 phminposuw xmm0, xmm7 ; horizon search the minimal sad cost and its index movd retrd, xmm0 ; for return: DEST[15:0] <- MIN, DEST[31:16] <- INDEX mov r1d, retrd and retrd, 0xFFFF sar r1d, 16 mov [r5], r1d POP_XMM LOAD_6_PARA_POP ret
31.349558
151
0.611715
40bef43ccba184e8011962f835cf89de66f0b90d
8,229
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_ht_st_zr_/i9-9900K_12_0xa0_notsx.log_21829_1738.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_ht_st_zr_/i9-9900K_12_0xa0_notsx.log_21829_1738.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_ht_st_zr_/i9-9900K_12_0xa0_notsx.log_21829_1738.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 %r15 push %r8 push %rax push %rcx push %rdi push %rsi lea addresses_WC_ht+0x1de4f, %rsi nop nop xor %r11, %r11 movb $0x61, (%rsi) nop add $10778, %rsi lea addresses_WC_ht+0x1c4f, %r15 clflush (%r15) nop sub %r8, %r8 mov (%r15), %si nop add $45258, %rsi lea addresses_WT_ht+0x19500, %r12 nop nop xor $41879, %rcx mov (%r12), %rax nop nop sub %r11, %r11 lea addresses_UC_ht+0x7dd7, %rsi nop nop lfence vmovups (%rsi), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $0, %xmm4, %rcx nop nop nop nop add %r12, %r12 lea addresses_UC_ht+0x3a4f, %r15 nop nop nop nop nop and $3402, %r11 movb $0x61, (%r15) nop xor %rsi, %rsi lea addresses_UC_ht+0x102ef, %r11 nop nop cmp $12692, %r15 movl $0x61626364, (%r11) nop nop nop cmp %r8, %r8 lea addresses_A_ht+0x15b63, %r8 nop add $11824, %r12 movb $0x61, (%r8) nop nop nop nop xor $26172, %rsi lea addresses_D_ht+0x12e4f, %rax nop nop nop and $5954, %r15 mov (%rax), %r11d nop nop add %rcx, %rcx lea addresses_normal_ht+0x1ebaf, %rsi lea addresses_A_ht+0xa33f, %rdi nop nop nop sub %r11, %r11 mov $24, %rcx rep movsb nop nop add $18984, %rsi lea addresses_normal_ht+0x10a4f, %r11 nop nop nop nop nop inc %r8 mov (%r11), %rax nop and $34769, %rdi lea addresses_WT_ht+0x1d053, %rsi lea addresses_WC_ht+0x4a5, %rdi nop cmp $663, %rax mov $83, %rcx rep movsq nop nop cmp $21833, %r15 lea addresses_WT_ht+0x954f, %r15 nop nop nop nop dec %r12 movb $0x61, (%r15) nop nop nop nop and $50055, %r8 pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r15 push %r8 push %r9 push %rbp push %rbx push %rcx push %rdi push %rsi // Load lea addresses_UC+0x95cf, %rbx nop sub $35422, %r9 mov (%rbx), %r15w nop nop dec %r12 // REPMOV lea addresses_normal+0x3a4f, %rsi lea addresses_A+0x11bd, %rdi nop nop nop nop nop and $5385, %r9 mov $118, %rcx rep movsq nop nop nop nop dec %r12 // Store lea addresses_normal+0xaf2f, %r12 nop nop nop nop nop add $40950, %rbx mov $0x5152535455565758, %rcx movq %rcx, %xmm4 vmovups %ymm4, (%r12) xor $17967, %r9 // Store lea addresses_PSE+0x1af7, %rdi nop nop nop nop nop cmp $38896, %r8 mov $0x5152535455565758, %rsi movq %rsi, %xmm6 movups %xmm6, (%rdi) inc %r8 // Load lea addresses_normal+0x9a4f, %rbx nop nop nop nop nop add %rdi, %rdi mov (%rbx), %r8d cmp %r9, %r9 // Faulty Load mov $0x6ac2d0000000024f, %r8 nop nop nop nop nop xor $31835, %rdi movaps (%r8), %xmm2 vpextrq $1, %xmm2, %rbp lea oracles, %rcx and $0xff, %rbp shlq $12, %rbp mov (%rcx,%rbp,1), %rbp pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r8 pop %r15 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A', 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}} {'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_NC', 'AVXalign': True, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}} {'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 7}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 10}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 4}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 2}} {'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 4, 'same': True}} {'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 7}} {'47': 4, '34': 21639, '44': 47, '00': 139} 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 47 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 44 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 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.288973
2,999
0.65172